From ea3f92605761e1ff17d858df303dc375df7efc1c Mon Sep 17 00:00:00 2001
From: jhendersonHDF
Date: Thu, 12 Oct 2023 11:32:23 -0500
Subject: [PATCH] 1.14 sync with develop (#3660)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* Rework tools.cmake and add C flags (#3110)
* Fix gh pages so that the doxygen files are uploaded (#3102)
* Add workspace path
* add debug
* Make one job so workspace files are available
* Put doxygen docs under docs folder in gh-pages
* Fix a misc warning in test/vol.c (#3112)
The compiler complains about using integers instead of size_t
for some sizes.
* Remove H5detect and H5make_libsettings (#3104)
Removes H5detect and H5make_libsettings from the build and replaces
their functionality with things that don't affect cross-compiling.
H5detect --> floating-point types are now detected on library load
H5make_libsettings --> Moved functionality to a new H5build_settings.c template file
* clang-tidy clang-analyzer-core issues addressed (#3113)
src/H5system.c:1293:13: warning: Dereference of null pointer
[clang-analyzer-core.NullDereference]
src/H5trace.c:4048:17: warning: Passed-by-value struct argument contains
uninitialized data (e.g., via the field chain: 'initial.user')
[clang-analyzer-core.CallAndMessage]
* Add note for issue 3056 (#3117)
* Use 1.14 toolchain (#3116)
* Remove the checkposix script (#3122)
This script was used to ensure that all non-HDF5 calls were prefixed
with 'HD'. We are removing this scheme so this script is no longer
needed.
* Remove unused HD macros (#3120)
* Remove unused HD macros
The library prefixes most C and POSIX API calls with 'HD'. We are
going to start removing these so the code looks like normal C.
This PR removes most of the unused HD markup macros.
* Replace ntohl/ntohs
* Adds an optional version arg to bin/format_source (#3119)
* Clean up mirror VFD code in utils dir (#3121)
* Remove dead code
* Replace mybzero with memset
* Replace hbool_t/TRUE/FALSE with bool/true/false
* Fix spelling issues flagged by codespell (#3130)
* Make autogen.sh output message consistent (#3128)
* Add Python for HDF-EOS zoo description (#3129)
* Fix function name in comment in ros3 VFD (#3131)
* Revert long double checks (#3133)
* Revert "Remove long double conversion work-arounds (#3097)"
This reverts commit 1e1dac1dac58fa18f6b7788346d1ba7d3315b0f9.
* Update comments to reflect newer systems
* Add java options to build scripts (#3127)
* Add java options to build scripts
Previously, cmakehdf5 turned on compiling of the java interface
by default due to a value set in cacheinit.cmake.
Now, consistent with how Fortran and CPP interfaces are handled,
the script overwrites this default value to disable the libraries,
fixing #2958.
I also implemented the --enable-java/--disable java options for
cmakehdf5, and -java for buildhdf5.
Allen said these scripts should mention that
compilers are to be specified in environment variables, but missing
compilers causes errors at the CMake level, and
CMake's error messages are already pretty informative (See the one
in #2958 about JAVA_COMPILER).
* Removed .lnt linter files (#3143)
These were last usefully modified in 2004
* Fix path to libhdf5.settings in cmakehdf5 (#3140)
* Many clang -Wextra-semi-stmt fixes (#2537)
* Adds semicolons to function-like macros
* Adds a do..while(0) loop to some macros
* Removes semicolons when inappropriate, especially H5E_TRY_BEGIN/END
* Remove HD prefix from network calls (#3142)
HDsocket(), etc. Only affects the mirror VFD and its test code.
* Remove hbool_t/TRUE/FALSE from java (#3145)
Replaces with bool/true/false
* CMake: (feature) ROS3 and cmake config file. (#3146)
- Added a cmake variable to the hdf5-config.cmake file which
indicate if the library has been build with or without the
read-only S3 functionality.
* Define minimal permissions for new GitHub workflows (#3147)
* Track s3 i/o when S3COMMS_DEBUG enabled (#3139)
* Track s3 i/o when S3COMMS_DEBUG enabled
* Fix the snapshots workflow (#3148)
* Add upload url as artifact
* Change doxygen path and comment log-url upload
* zip doxygen files for upload
* add workspace var
* chore: fix grammar (#3150)
* chore: fix grammar
* Removes the HD prefix from java C99 calls (#3149)
POSIX calls (HDstrndup, etc.) are unchanged
* Correct the zip usage (#3153)
* Many fixes to various compiler warnings (#3124)
* Fixed various -Wmissing-variable-declarations by adding static keyword
* In a few cases, renamed the variable suffix from _g to _s.
* Fixed some -Wmissing-variable-declarations by using different declaration macros
* Fixed various -Wconditional-uninitialized warnings by just initializing variable to zero
* Fixed various -Wcomma warnings
* Fixed clang -Wstrict-prototypes warnings
* Fixed various -Wunused-variable warnings
* Updated some casts to fix the only 3 -Wcast-qual warnings
* Fixed the only -Wsometimes-uninitialized warning
* Create Security Policy (#3152)
* Fix #1978 h5vers usage message. (#3162)
Update Platforms Tested in RELEASE.txt.
* speed-up building HDF5 (#3087)
Disables building the tests when building the netCDF, etc.
* Remove dead code behind #ifdef OLD_WAY (#3163)
* Remove H5F_evict_tagged_metadata() (#3165)
The rest of the library just calls H5AC_evict_tagged_metadata()
directly.
* Add missing space in zip command (#3167)
* Fixed check for a VOL's async compatibility (#3164)
* cap flag fix in test
* added async comp. output
* Update Linux workflows (#3173)
* Consolidate environment setup
* Turn on ros3 VFD in CMake (Linux only)
* Add gh-pages doxygen link (#3175)
* Fix the doxygen to gh pages and artifact creation (#3176)
* Tidy the list of options in main.yml (#3181)
* Remove HD/hbool_t from fortran (#3182)
* Remove HD/hbool_t from high-level lib (#3183)
* Remove HDva_(arg|copy|end|start) (#3184)
* Drop HD prefix & hbool_t from H5TS (#3180)
* Remove HD from fork/exec*/wait* (#3190)
These are not C99 but are hidden behind ifdefs and are highly
unlikely to ever have non-POSIX equivalents.
* Fix assertion failure when attempting to use IOC VFD directly (#3187)
* Rename HDqsort() to qsort() (#3193)
* Rename HDqsort() to qsort()
* Committing clang-format changes
---------
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Rename HDpipe() to pipe() (#3192)
Pipe is POSIX but implemented in Microsoft's CRT
* Rename HDassert() to assert() (#3191)
* Change HDassert to assert
* Fix bin/make_err
* Rename HD(f)printf() to (f)printf() (#3194)
* Add note about HDF5_VOL_CONNECTOR to tools usage (#3159)
* Rename HDsystem() to system() (#3197)
system() is only used in the iopipe test and the things it calls
(which are POSIX-y) are protected by an ifdef.
* Remove HD from HDposix_memalign() (#3196)
The posix_memalign call is only used in the direct VFD, which can only
be built if posix_memalign() is available.
* Remove HD from memory allocate/free calls (#3195)
* HDcalloc
* HDfree
* HDmalloc
* HDrealloc
* chore: fix grammar (#3207)
* docs: remove redundancy in Data Transfer section of user guide (#3208)
* Remove checks for setsysinfo, which is unused (#3205)
* Autotools
* CMake
* Remove HD from protected POSIX calls (#3203)
These calls are non-C99 but protected by ifdefs and have no Windows
equivalents:
* HDalarm
* HDasprintf
* HDclock_gettime
* HDfcntl
* HDgethostname
* HDgetrusage
* HDsymlink
* Rename HDato*() to ato*() (#3201)
* Remove some "Programmer" comments (#3209)
These are meaningless noise.
Removes the "Programmer" lines on comment start lines:
/* Programmer: John Smith
These complicate my sed script that will rip out the rest of
the comments.
* Rename HDexit() and related to exit(), etc. (#3202)
* HDatexit
* HDexit
* HD_exit
* Remove HD from strto* calls (#3204)
* HDstrtod
* HDstrtol
* HDstrtoll
* HDstrtoul
* HDstrtoull
* HDstrtoumax
* Remove HD from C std lib file ops (#3206)
* HDfclose
* HDferror
* HDfeof
* HDfflush
* HDfopen
* HDfread
* HDfwrite
* Remove programmer/date from comments (#3210)
* Removes Programmer: and Date: fields
* Fixes a few Modifications: fields leftover from previous work
* Remove HD from HDmem* calls (#3211)
* Remove HD from HDis* (e.g., isalpha) (#3212)
* HDisalnum
* HDisalpha
* HDiscntrl
* HDisdigit
* HDisgraph
* HDislower
* HDisprint
* HDispunct
* HDisspace
* HDisupper
* HDisxdigit
* Update actions for release option, fix branch for daily build (#3185)
* Update actions for release option, fix branch for daily build
* Scheduled workflows run on latest commit on the develop
* Add snapshots location
* docs: improve consistency in verb form (#3076) (#3188)
* fix gh action if statements (#3213)
* Adjust presets timeout and fix build script VS versions (#3215)
* Several ros3vfd logging improvements
* Committing clang-format changes
* Update COPYING (#3231)
Fixed old support URL.
* addresses compilation fortran warnings on Frontier (#3236)
* Fix doc for H5allocate_memory (#3240)
* merge bbrelease to release (#3232)
* merge bbrelease to release
* Fix pre-req workflow
* Replace support.hdfgroup.org URLs for alternative COPYING file (#3228)
* Replace support.hdfgroup.org URLs for alternative COPYING file
locations in copyright headers with https://www.hdfgroup.org/licenses.
Replace support.hdfgroup.org URL for alternative COPYING_LBNL_HDF5
with github URL.
Tweak chkcopyright script for change from UICOPYRIGHTSTR to
THGCOPYRIGHTSTR.
* Replace 1_10 reference with develop branch (#3227)
* Switch CI to use release script (#3242)
* Subfiling VFD source cleanup (#3241)
* Subfiling VFD source cleanup
Modularize Subfiling CMake code into separate CMakeLists.txt file
Update Mercury util code to latest version and update Copyright
Generate mercury_util_config.h header file instead of using
pre-generated file
Remove unnecessary Mercury functionality
Fix minor warning in Subfiling VFD code
* Remove Mercury headers from Autotools publicly-distributed header list
* install h5fuse.sh in bin dir. (#3244)
* Disable h5py until fixed properly without spack (#3243)
* ROS3: (feature) Temporary security credentials (#3030)
- Implemented support for AWS temporary security credentials.
For this kind of credentials also a session/security token
should be included in the request by adding the
x-amz-security-token header.
Co-authored-by: Larry Knox
Co-authored-by: Jordan Henderson
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Avoid truncating at null byte when copying to std::string (#3083)
---------
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Fix CMake builds when Subfiling VFD isn't enabled (#3250)
* Fix CMake builds when Subfiling VFD isn't enabled
* Add Subfiling VFD entry to hdf5-config.cmake.in
* Fix some warnings in developer builds (#3247)
* Fix some warnings in developer builds
* Switch approach to Winline flag
* Fixed more warnings about extra semicolons (#3249)
* Require semi-colon after H5_CHECK_OVERFLOW calls
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Fix warning in H5C__UPDATE_STATS_FOR_DIRTY_PIN macro (#3259)
Add braces to H5C__UPDATE_STATS_FOR_DIRTY_PIN macro to fix warning
causing Werror Release builds to fail
* Update DEFAULT_API_VERSION documentation for CMake (#3255)
* Update DEFAULT_API_VERSION documentation for CMake
* Fix hint
---------
Co-authored-by: Larry Knox
* changed the scope of #ifdef DOXYGEN to now include H5D multi-functions (#3254)
* Option changed but not all references (#3252)
* Option changed but not all references
* remove quotes from binary var
* Move 1.12.3 release to October (#3263)
* Fixed some -Wunused-variable warnings and one Wsometimes-uninitialized warning (#3260)
* removed the use of encoded single apostrophe (#3261)
* removed the use of encoded single apostrophe, and fix H5Dread_chunk from write to read
* updated sanitizer paragraph
* fixed brief description for H5Fget_info
* ROS3: (fix) Replaced HDfprintf (#3266)
- Replaced the HDfprintf() functions by fprintf() to be consistent
with other parts of the library.
* chore: make VRFY output consistent (#3268)
* CMake: (fix) Threads dependency (#3267)
- If the HDF5 library has been build with either thread-safety or
subfiling VFD feature on it will have an additional dependency
on a threading library. This dependency has been added to the
hdf-config.cmake.in file.
* chore: fix grammar - get hang -> get hung (#3272)
* Another round of fixing -Wextra-semi-stmt warnings (#3264)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* chore: fix typo - persent -> present (#3273)
* Remove py-pip from h5py action (#3265)
* Update release schedule (#3317)
* Move 1.12.3 to November
* Add 1.14.3 in October
* Update README.md w/ 1.4.3 info (#3318)
* Switch parallel compression to use vector I/O (#3245)
Updates parallel compression feature to use vector I/O instead of
creating and passing down MPI derived types to VFD
* Fix incorrect error check in H5Ofill.c for undefined fill values (#3312)
* Fix H5Otoken_to_str call in h5dump and other minor cleanup (#3314)
* Fix loading plugin fails with missing directory GH issue #3248 (#3315)
* Made HGOTO_ERROR a do-while loop (#3308)
* Made HGOTO_ERROR a do-while loop
* Update files to skip list and ignore_words_list (#3321)
* Update files to skip list and ignore_words_list for codespell to not
check files generated by autotools. Autotools generate misspellings
that can't be fixed in HDF5 code.
* Windows runtime items go into the bin folder (#3320)
* A couple of documentation items to fix (#3332)
* Fix h5repack for variable-length datatyped datasets (#3331)
* Fix CVE-2018-11202 (#3330)
A malformed file could result in chunk index memory leaks. Under most
conditions (i.e., when the --enable-using-memchecker option is NOT
used), this would result in a small memory leak and and infinite loop
and abort when shutting down the library. The infinite loop would be
due to the "free list" package not being able to clear its resources
so the library couldn't shut down. When the "using a memory checker"
option is used, the free lists are disabled so there is just a memory
leak with no abort on library shutdown.
The chunk index resources are now correctly cleaned up when reading
misparsed files and valgrind confirms no memory leaks.
* Fix CVE-2018-13867 (#3336)
* Fixes the last of the -Wextra-semi-stmt warnings (#3326)
* Fixed extra semi warning by adjusting alternative macro definitions
* Find-replace H5E_END_TRY; -> H5E_END_TRY
* Made H5Epush_goto a do-while loop, fixed indentation
* Made GOTOERROR and ERRMSG do-while loops
* Made Hgoto_error and Hgoto_done do-while loops
* Made vrfy_cint_type and vrfy_ctype do-while loops
* Made TEST_TYPE_CONTIG and others do-while loops
* Removed extraneous semi-colons
* Committing clang-format changes
---------
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Fix a typo in RELEASE.txt
* Fix assertion failure in H5D__mpio_collective_filtered_vec_io (#3340)
* Make h5dump spacing consistent when printing VLEN datatype (#3351)
* Fix for the bug exposed from running test/set_extent.c when selection… (#3319)
* Fix for the bug exposed from running test/set_extent.c when selection I/O is enabled.
This is a fix from Neil.
The test/set_extent.c is modified to test for selection I/O enabled.
* Add Fortran ES module to deploy list (#3341)
* Add Fortran ES module to deploy list
* Change fortran mod file export to use a list of names
* test(parallel): verify FALSE case (#3356)
* Implementation of the mpio driver with selection I/O. (#3222)
* This changes the default selection I/O to on for MPIO.
* Work around a testphdf5 failure on Cray MPICH machines (#3361)
* set H5_PAC_C_MAX_REAL_PRECISION default to 0 when cross sompiling with (#3364)
CMake to fix Fortran build failures.
* Add RELEASE.txt notes for recent selection I/O work. (#3374)
* Fix possible performance regression introduced with in-place type conversion in 1.14.2 (#3376)
* Correct script (#3377)
* Correct CI settings (#3384)
* Correct CI settings
* Correct plugin file name
* restore CI tarball name prefix to match bin/release (#3385)
* Fix assertion failure during file close on error (#3387)
* Fix compile failures with H5C_DO_MEMORY_SANITY_CHECKS enabled (#3388)
* Fix valgrind warning about write of uninitialized bytes (#3389)
* Fix valgrind warning about write of uninitialized bytes in ScaleOffset filter (#3390)
* Update presets, examples uncompress, szip cache (#3391)
* Fix serial to parallel chunked dataset file space allocation bug (#3394)
* chore: fix typo (#3405)
* Fix for CVE-2016-4332 (#3406)
This CVE issue was previously listed as fixed (via HDFFV-9950) back in
2016, but with no confirmation test. Now that test files exist for
the 2016 Talos CVE issues, we found that CVE-2016-4332 can raise an
assert in debug builds.
This fix replaces the assert with pointer checks that don't raise
errors or asserts. Since the function is in cleanup code, we do our
best to close and free things, even when presented with partially-
initialized structs.
Fixes CVE-2016-4332 and HDFFV-9950 (confirmed via the cve_hdf5 repo)
* Fix ph5diff tests for MPIEXEC_MAX_NUMPROCS=1 (#3407)
* Enable szip by default in Autotools (#3412)
Since libaec is so prevalent and BSD-licensed for both encode and
decode, we build the szip filter by default when the szip or aec
libraries are found.
* Re-enable SZIP default to ON in CMake (#3414)
The Autotools were handled in a separate commit
* Fix Heap-buffer-overflow WRITE in H5MM_memcpy (#3368)
* Add Intel oneAPI actions (#2949) (#2977)
* ci: add Intel oneAPI actions (#2949)
* ci: fix CMake installation
* ci: use absolute paths for libtool installation
* ci(oneAPI): update compiler versions and use cron
* Add RELEASE.txt entry for compound performance regression fix (#3376) (#3416)
* chore: remove gubbins comment (#3420)
* Add other types and full type to enum/str/vlen dataformat for structblock[begin/end] (#3353)
* Avoid H5Ocopy in h5repack for variable-length string types (#3419)
* Skip atomicity tests for OpenMPI major versions < 5 (#3421)
* Fix an issue with use of uninitialized memory in trefer_deprec.c test (#3422)
* Add parallel examples in doxygen (#3413)
* Fix use of uninitialized value in testpar/t_dset.c test (#3423)
* Remove extraneous "33" in RELEASE.txt (#3425)
* Revise file close assertion failure fix (#3418)
* Remove intel oneapi warning (#3426)
* Fix for CVE-2018-15671. h5stat -S $POC will result in a crash with segmenetation fault. (#3427)
It is because the object in the testfile points back to the root group.
When the tool tries to traverse the object, it goes back to the root group and then back again.
* chore: match function call and VRFY() output (#3428)
* Fix the Fortran extension used in example links (#3430)
* Put H5T_CONV_ab macros in do..while loops (#3432)
Ever since a recent round of macro cleanup, bin/trace and clang-format
have been bickering over what H5Tconv.c should look like and neither
produces readable code.
This change puts the top-level H5T_CONV_ab macros in do..while loops,
adds appropriate semicolons, and adds the missing H5_CLANG_DIAG_ON|OFF
and H5_GCC_CLANG_DIAG_ON|OFF macros to the list of statement macros
clang-format recognizes. H5Tconv.c is now readable and both bin/trace
and clang-format are happy.
* Convert some H5MM calls to standard C equivalents (#2382)
* H5MM_calloc and malloc are now mapped to stdlib C calls
* H5MM_memcpy now maps directly to memcpy in release builds
* H5MM_memcpy is still implemented as a separate function that
checks for buffer overlap when H5MM_DEBUG is defined
(default w/ debug builds)
* Switches many library memcpy calls to use H5MM_memcpy
* Fixes a possible zero allocation in H5Olayout.c
* Add 1.14.4 to the release schedule (#3434)
* Output stderr file in CMake testing on failure (#3431)
* Add Intel oneAPI badges (#3433)
* Add a CVE regression test action (#3445)
*
* Disable SZIP for Intel oneAPI Action (#3449)
* Disable SZIP for Intel oneAPI Action
* Disable Fortran and parallel
* Update VOL CMake for REST VOL (#3450)
* Update VOL CMake for REST VOL
* Prevent linking static libs to VOLs
* Add an h5py badge to README.md (#3477)
* Removed all the ranks printing out testing information (#3457)
* Fix Subfiling VFD IOC assignment bug (#3456)
* Correct java test dimension (#3482)
* Support CMake VOL builds with FetchContent from local directory (#3455)
* Update VOL CMake for REST VOL
* Prevent linking static libs to VOLs
* index on fetch_local: 5c5c3f1505 Prevent linking static libs to VOLs
* index on (no branch): 9a36d3e7b1 On fetch_local: WIP:add source dir fetch option for vols
* Allow building of VOL from local source
* Move LOCAL_DIR option to HDF5_VOL_ALLOW_EXTERNAL
* Fix the Fortran include dir in install config files (#3454)
* Convert hbool_t --> bool in examples (#3492)
* Fix some minor formatting for consistency (#3499)
* Create scorecard.yml (#3508)
Bring in OSSF Scorecard code scanner as a GitHub action
* Convert hbool_t --> bool in testpar (#3495)
* hbool_t/TRUE/FALSE --> bool/true/false in tools (#3491)
* Convert hbool_t --> bool in test (#3494)
* Convert hbool_t --> bool in src (#3496)
* hbool_t --> bool in src
* Does not remove TRUE/FALSE
* Public header files are unchanged
* Public API calls are unchanged
* TRUE/FALSE --> true/false in src
* Add deprecation notice for hbool_t
* Added new Fortran API wrappers (#3511)
* Added new wrappers for
h5get_free_list_sizes_f
H5Sselect_intersect_block_f
H5Sselect_shape_same_f
h5pget_no_selection_io_cause_f
h5pget_mpio_no_collective_cause_f
H5Lvisit_by_name_f
H5Lvisit_f
H5Fget_info_f
h5dwrite_chunk_f
h5dread_chunk_f
* added h5pget_file_space_page_size_f, h5pset_file_space_page_size_f, h5pget_file_space_strategy_f, h5pset_file_space_strategy_f, h5info tests
* added fortran tests
* Update tH5F.F90
* misc. fortran fixes for failing CI dailty tests (#3523)
* fixed H5Lvisit* interface
* changed integer type for direct write
* Consistent initialization of hid_t in the tests (#3521)
* Fix windows cpack with debug (#3525)
* Add missing row for the ROS3 VFD in table #3415 (#3517)
* fixed nvidia compiler issue (#3527)
* Identify functions in a subgroup (#3530)
* quiet warning on sunspot (gcc 11.2.0) (#3534)
* Add API examples doxygen page (#3500)
* removed C_INT32_T from Fortran APIs (#3537)
* Add NVHPC 23.7 GitHub Actions (#3509)
* Add NVHPC 27.3 GitHub Actions
* Address @derobins review
* Remove HD prefix from math functions (#3538)
* Remove HD prefix from HDlog10 calls (#3539)
Was missed in a previous commit and causes building subfiling to
fail.
* fixed arg to C H5Dwrite_chunk (#3541)
* Strip HD prefix from string/char C API calls (#3540)
* Strip HD prefix from string/char C API calls
* HD(f)(put|get)(s|c)
* HDstr*
* HDv*printf
* HD(s)(print|scan)f
* HDperror
But NOT:
* HDstrcase*
* HDvasprintf
* HDstrtok_r
* HDstrndup
As those are not C99 and have portability work-around
implementations. They will be handled later.
* Fix th5_system.c screwup
* Convert main.yml CI into callable workflows (#3529)
* Fix broken URL. (#3546)
* Fix grammar (#3545)
* Update oneAPI-C/A badge yml links. (#3564)
* Check return values from HDF5 API calls. (#3556)
* Adds link to h5fuse.sh in testpar for autotools (#3557)
* Make the h5fuse.sh utility available to parallel subfiling tests so h5fuse testing is not skipped.
* Some minor formatting and text changes (#3563)
* Fix typos and grammar in t_pread. (#3565)
* Fix typo (givin->given) in test/testframe.c. (#3567)
* Fix ifx unused variable hdferr warning. (#3568)
* Correct comments about H5Z_FILTER_NONE (#3572)
* Update release script. (#3577)
* fixed function declaration (#3579)
* Fixed GH-3554 (#3584)
Removed the extra condition
* Remove h5dwalk.1 man page. (#3589)
* Removed the use of -commons linking option on Darwin (#3581)
Removed the use of -commons linking option on Darwin as COMMON and EQUIVALENCE is no long used
* Fix docs for H5Pset_dxpl_mpio_collective_opt() (#3594)
* Fix typo: arange->arrange in src/H5Cmpio.c. (#3597)
* Fix docs for H5Acreate2 and H5Acreate_by_name (#3598)
* Use HDoff_t with lseek consistently (#3600)
lseek on Windows uses __int64 for both the offset and return type
instead of off_t like most POSIX systems. This changes ensures we
use HDoff_t (which is typdef'd correctly on Windows) w/ lseek.
* Replaces HDgetenv with getenv (#3599)
* Develop tools move (#3580)
Reorganizes the tools files to support the VOL tests
* Clean up Subfiling VFD header doxygen formatting (#3601)
* Remove `sh` to run bash script. (#3590)
* Correct path name of ddl file to be changed (#3607)
* Fix potential uninitialized variable (#3602)
Moves a union initialization up a bit so it's performed before code
that can jump to the cleanup target, where file descriptors could
be checked without being initialized.
This could only happen in test code and only in an out-of-memory
situation.
Fixes Coverity 1542254
* Remove unnecessary assignment in test generator (#3603)
Fixes what looks like a copy/paste/modify error in the format convert
test file generator, where an array element is assigned one value
and them immediately overwritten by another value.
Fixes Coverity issue 1542285
* Remove useless define TRUE/FALSE statements. (#3604)
* Fix typo behaviour and dependes. (#3605)
* Fix typos (#3609)
* Fixed unused variable in H5CS.c (#3552) (#3612)
* Fixed #3552
* Fix grammar (#3614)
* Cleanup unused statements (#3553) (#3617)
Removed unnecessary assert statements and noise comments.
* Fix Intel oneAPI icc warning (#3619)
* Fix several spelling/grammar issues (#3621)
* Add HPC CDash to README.md (#3623)
* Disable static + thread-safe on Windows w/ CMake (#3622)
The thread-safety feature on Windows requires a hook in DllMain() and
thus is only available when HDF5 is built as a shared library.
This was previously a warning, but has now been elevated to a fatal
error that cannot be overridden with ALLOW_UNSUPPORTED.
Fixes GitHub #3613
* Remove unused member from H5D_shared_t struct. (#3628)
* Remove old EXTERNALPROJECT_ADD in favor of FETCH_CONTENT (#3624)
* Fix grammar (#3635)
* Disambiguate error output messages. (#3634)
* Disambiguate error output messages.
* Address @brtnfld review.
* Fail CMake on Windows when sub-filing VFD is enabled (#3636)
* Improve consistency in past tense usage (#3638)
* Split out test logic to separate file (#3639)
* Drop MPI-2 support (#3643)
* Switch IEEE flags for NAG Fortran (#3644)
Default is -ieee=stop, which causes problems when the H5T
module performs floating-point type introspection.
The new mode is -ieee=full
* Remove 1.10.11 info from README.md (#3646)
* Fixes GH#1027 compilation error (#3654)
* Remove 1.10 badge (#3650)
* Use real URLs and updated names for plugins (#3651)
* synchronize TGZ naming convention/usage
* Update parallel compression feature to support multi-dataset I/O (#3591)
* Add more tests for selection I/O. (#3528)
* Adjust 1.14 files after merging
---------
---
.github/workflows/autotools.yml | 54 +
.github/workflows/clang-format-check.yml | 2 +-
.github/workflows/clang-format-fix.yml | 2 +-
.github/workflows/cmake-ctest.yml | 2 +-
.github/workflows/cmake.yml | 46 +
.github/workflows/codespell.yml | 2 +-
.github/workflows/cve.yml | 51 +
.github/workflows/daily-build.yml | 2 +
.github/workflows/hdfeos5.yml | 2 +-
.github/workflows/intel-auto.yml | 97 +
.github/workflows/intel-cmake.yml | 81 +
.github/workflows/linux-nvhpc-auto.yml | 58 +
.github/workflows/linux-nvhpc.yml | 56 +
.github/workflows/main-auto-par.yml | 137 +
.github/workflows/main-auto-spc.yml | 509 +
.github/workflows/main-auto.yml | 182 +
.github/workflows/main-cmake.yml | 251 +
.github/workflows/main.yml | 623 +-
.github/workflows/netcdf.yml | 4 +-
.github/workflows/release-files.yml | 4 +-
.github/workflows/release.yml | 2 +-
.github/workflows/scorecard.yml | 68 +
.github/workflows/tarball.yml | 2 +-
CMakeFilters.cmake | 54 +-
CMakeLists.txt | 114 +-
CMakePlugins.cmake | 28 +-
CMakePresets.json | 64 +-
CMakeTests.cmake | 109 +
CMakeVOL.cmake | 1 -
bin/h5vers | 4 +-
bin/make_err | 4 +-
bin/release | 131 +-
c++/src/H5DcreatProp.cpp | 2 +-
c++/test/tarray.cpp | 2 +-
c++/test/tattr.cpp | 10 +-
c++/test/titerate.cpp | 20 +-
c++/test/tobject.cpp | 2 +-
c++/test/tvlstr.cpp | 34 +-
config/cmake-presets/hidden-presets.json | 4 +-
config/cmake/ConfigureChecks.cmake | 7 -
config/cmake/H5pubconf.h.in | 3 -
config/cmake/HDF5PluginCache.cmake | 8 +-
config/cmake/HDF5PluginMacros.cmake | 23 +-
config/cmake/HDFCompilerFlags.cmake | 1 +
config/cmake/HDFLibMacros.cmake | 158 +-
config/cmake/cacheinit.cmake | 92 +-
config/cmake/mccacheinit.cmake | 2 +-
config/linux-gnulibc1 | 9 +-
configure.ac | 22 +-
doc/parallel-compression.md | 51 +-
doxygen/Doxyfile.in | 38 -
doxygen/dox/ExamplesAPI.dox | 2 +-
doxygen/examples/Filters.html | 4 +-
doxygen/examples/tables/fileDriverLists.dox | 144 +-
doxygen/examples/tables/propertyLists.dox | 17 +-
examples/h5_interm_group.c | 2 -
examples/ph5_filtered_writes.c | 2 +-
examples/ph5_filtered_writes_no_sel.c | 4 +-
examples/ph5_subfiling.c | 2 +-
fortran/src/H5Aff.F90 | 3 +
fortran/src/H5Dff.F90 | 148 +
fortran/src/H5Fff.F90 | 68 +
fortran/src/H5Lff.F90 | 130 +-
fortran/src/H5Off.F90 | 2 +-
fortran/src/H5Pf.c | 141 -
fortran/src/H5Pff.F90 | 300 +-
fortran/src/H5Sff.F90 | 87 +-
fortran/src/H5_buildiface.F90 | 4 +-
fortran/src/H5_f.c | 41 +-
fortran/src/H5_ff.F90 | 129 +-
fortran/src/H5f90global.F90 | 72 +-
fortran/src/H5f90proto.h | 2 -
fortran/src/hdf5_fortrandll.def.in | 15 +
fortran/test/CMakeLists.txt | 1 -
fortran/test/Makefile.am | 2 +-
fortran/test/fortranlib_test.F90 | 13 +
fortran/test/fortranlib_test_1_8.F90 | 6 +
fortran/test/fortranlib_test_F03.F90 | 10 +-
fortran/test/tH5D.F90 | 170 +-
fortran/test/tH5F.F90 | 2244 ++--
fortran/test/tH5F_F03.F90 | 177 -
fortran/test/tH5L_F03.F90 | 289 +-
fortran/test/tH5MISC_1_8.F90 | 64 +
fortran/test/tH5P_F03.F90 | 2 -
fortran/test/tH5Sselect.F90 | 53 +-
fortran/test/tHDF5_F03.F90 | 1 -
fortran/testpar/hyper.F90 | 70 +-
hl/c++/test/ptableTest.cpp | 8 +-
hl/fortran/src/CMakeLists.txt | 2 +
hl/fortran/src/H5DOff.F90 | 91 +
hl/fortran/src/Makefile.am | 3 +-
hl/fortran/src/hdf5_hl_fortrandll.def.in | 2 +
hl/src/H5LD.c | 4 +-
hl/src/H5LT.c | 4 +-
hl/test/CMakeTests.cmake | 2 +-
hl/test/{ => testfiles}/dsdata.txt | 0
hl/test/{ => testfiles}/dslat.txt | 0
hl/test/{ => testfiles}/dslon.txt | 0
hl/test/{ => testfiles}/dtype_file.txt | 0
.../{ => testfiles}/dtype_file_readable.txt | 0
hl/test/{ => testfiles}/earth.pal | 0
hl/test/{ => testfiles}/image24pixel.txt | 0
hl/test/{ => testfiles}/image24plane.txt | 0
hl/test/{ => testfiles}/image8.txt | 0
hl/test/{ => testfiles}/sepia.pal | 0
hl/test/{ => testfiles}/test_ds_be.h5 | Bin
.../test_ds_be_new_ref-32bit.h5 | Bin
hl/test/{ => testfiles}/test_ds_be_new_ref.h5 | Bin
hl/test/{ => testfiles}/test_ds_le.h5 | Bin
hl/test/{ => testfiles}/test_ds_le_new_ref.h5 | Bin
hl/test/{ => testfiles}/test_ld.h5 | Bin
hl/test/{ => testfiles}/test_table_be.h5 | Bin
hl/test/{ => testfiles}/test_table_cray.h5 | Bin
hl/test/{ => testfiles}/test_table_le.h5 | Bin
hl/test/{ => testfiles}/usa.wri | 0
hl/tools/gif2h5/CMakeTests.cmake | 6 +-
hl/tools/h5watch/CMakeTests.cmake | 2 +-
hl/tools/h5watch/extend_dset.c | 4 +-
hl/tools/h5watch/h5watch.c | 10 +-
.../{ => h5watch}/testfiles/w-err-cmpd1.err | 0
.../{ => h5watch}/testfiles/w-err-cmpd2.err | 0
.../{ => h5watch}/testfiles/w-err-cmpd3.err | 0
.../{ => h5watch}/testfiles/w-err-cmpd4.err | 0
.../{ => h5watch}/testfiles/w-err-cmpd5.err | 0
.../testfiles/w-err-dset-nomax.err | 0
.../testfiles/w-err-dset-none.err | 0
.../{ => h5watch}/testfiles/w-err-dset1.err | 0
.../{ => h5watch}/testfiles/w-err-dset2.err | 0
.../{ => h5watch}/testfiles/w-err-file.err | 0
.../{ => h5watch}/testfiles/w-err-poll.ddl | 0
.../{ => h5watch}/testfiles/w-err-poll0.ddl | 0
.../{ => h5watch}/testfiles/w-err-std.ddl | 0
.../{ => h5watch}/testfiles/w-err-width.ddl | 0
.../testfiles/w-ext-cmpd-esc-f1.ddl | 0
.../testfiles/w-ext-cmpd-esc-f3.ddl | 0
.../testfiles/w-ext-cmpd-esc-ff2.ddl | 0
.../testfiles/w-ext-cmpd-esc.ddl | 0
.../{ => h5watch}/testfiles/w-ext-cmpd-f1.ddl | 0
.../{ => h5watch}/testfiles/w-ext-cmpd-f2.ddl | 0
.../testfiles/w-ext-cmpd-ff3.ddl | 0
.../testfiles/w-ext-cmpd-label.ddl | 0
.../testfiles/w-ext-cmpd-two-f1.ddl | 0
.../testfiles/w-ext-cmpd-two-f3.ddl | 0
.../testfiles/w-ext-cmpd-two-ff2.ddl | 0
.../testfiles/w-ext-cmpd-two.ddl | 0
.../{ => h5watch}/testfiles/w-ext-cmpd.ddl | 0
.../{ => h5watch}/testfiles/w-ext-early.ddl | 0
.../{ => h5watch}/testfiles/w-ext-late.ddl | 0
.../{ => h5watch}/testfiles/w-ext-one-d.ddl | 0
.../testfiles/w-ext-one-simple.ddl | 0
.../{ => h5watch}/testfiles/w-ext-one.ddl | 0
.../{ => h5watch}/testfiles/w-ext-two-d.ddl | 0
.../testfiles/w-ext-two-width.ddl | 0
.../{ => h5watch}/testfiles/w-ext-two.ddl | 0
hl/tools/{ => h5watch}/testfiles/w-help1.ddl | 0
hl/tools/h5watch/testh5watch.sh.in | 20 +-
java/src/hdf/hdf5lib/H5.java | 2 +-
java/src/jni/h5util.c | 6 +-
java/test/CMakeLists.txt | 24 +-
java/test/junit.sh.in | 14 +-
release_docs/INSTALL_CMake.txt | 129 +-
release_docs/INSTALL_Cygwin.txt | 1 +
release_docs/NEWSLETTER.txt | 2 +-
release_docs/RELEASE.txt | 120 +-
src/H5.c | 109 +-
src/H5A.c | 109 +-
src/H5AC.c | 108 +-
src/H5ACdbg.c | 34 +-
src/H5ACmpio.c | 34 +-
src/H5ACpkg.h | 18 +-
src/H5ACprivate.h | 76 +-
src/H5ACpublic.h | 12 +-
src/H5Abtree2.c | 6 +-
src/H5Adense.c | 60 +-
src/H5Adeprec.c | 6 +-
src/H5Aint.c | 155 +-
src/H5Apkg.h | 12 +-
src/H5Apublic.h | 22 +-
src/H5Atest.c | 12 +-
src/H5B.c | 50 +-
src/H5B2.c | 50 +-
src/H5B2cache.c | 30 +-
src/H5B2dbg.c | 14 +-
src/H5B2hdr.c | 4 +-
src/H5B2int.c | 40 +-
src/H5B2internal.c | 56 +-
src/H5B2leaf.c | 24 +-
src/H5B2pkg.h | 16 +-
src/H5B2private.h | 4 +-
src/H5B2test.c | 4 +-
src/H5Bcache.c | 6 +-
src/H5Bprivate.h | 12 +-
src/H5C.c | 164 +-
src/H5CS.c | 13 +-
src/H5CX.c | 243 +-
src/H5CXprivate.h | 33 +-
src/H5Cdbg.c | 60 +-
src/H5Centry.c | 405 +-
src/H5Cepoch.c | 7 +-
src/H5Cimage.c | 120 +-
src/H5Cint.c | 158 +-
src/H5Clog.c | 20 +-
src/H5Clog.h | 6 +-
src/H5Clog_json.c | 109 +-
src/H5Clog_trace.c | 101 +-
src/H5Cmpio.c | 84 +-
src/H5Cpkg.h | 96 +-
src/H5Cprefetched.c | 4 +-
src/H5Cprivate.h | 171 +-
src/H5Cquery.c | 19 +-
src/H5Ctag.c | 64 +-
src/H5Ctest.c | 10 +-
src/H5D.c | 38 +-
src/H5Dbtree.c | 102 +-
src/H5Dbtree2.c | 60 +-
src/H5Dchunk.c | 673 +-
src/H5Dcompact.c | 32 +-
src/H5Dcontig.c | 82 +-
src/H5Ddeprec.c | 8 +-
src/H5Dearray.c | 60 +-
src/H5Defl.c | 4 +-
src/H5Dfarray.c | 58 +-
src/H5Dfill.c | 22 +-
src/H5Dint.c | 256 +-
src/H5Dio.c | 135 +-
src/H5Dlayout.c | 33 +-
src/H5Dmpio.c | 2211 ++--
src/H5Dnone.c | 32 +-
src/H5Doh.c | 18 +-
src/H5Dpkg.h | 193 +-
src/H5Dprivate.h | 6 +-
src/H5Dscatgath.c | 58 +-
src/H5Dselect.c | 12 +-
src/H5Dsingle.c | 40 +-
src/H5Dtest.c | 4 +-
src/H5Dvirtual.c | 132 +-
src/H5E.c | 56 +-
src/H5EA.c | 40 +-
src/H5EAcache.c | 62 +-
src/H5EAdbg.c | 6 +-
src/H5EAdblkpage.c | 4 +-
src/H5EAdblock.c | 8 +-
src/H5EAhdr.c | 4 +-
src/H5EAiblock.c | 8 +-
src/H5EApkg.h | 24 +-
src/H5EAsblock.c | 8 +-
src/H5EAtest.c | 2 +-
src/H5ES.c | 2 +-
src/H5ESint.c | 32 +-
src/H5ESpkg.h | 6 +-
src/H5Edeprec.c | 6 +-
src/H5Eint.c | 30 +-
src/H5Epkg.h | 4 +-
src/H5Eprivate.h | 12 +-
src/H5Epublic.h | 2 +-
src/H5F.c | 44 +-
src/H5FA.c | 22 +-
src/H5FAcache.c | 30 +-
src/H5FAdblkpage.c | 4 +-
src/H5FAdblock.c | 8 +-
src/H5FAhdr.c | 4 +-
src/H5FApkg.h | 10 +-
src/H5FAtest.c | 2 +-
src/H5FD.c | 60 +-
src/H5FDcore.c | 82 +-
src/H5FDcore.h | 6 +-
src/H5FDdirect.c | 52 +-
src/H5FDfamily.c | 104 +-
src/H5FDhdfs.c | 11 +-
src/H5FDint.c | 176 +-
src/H5FDlog.c | 32 +-
src/H5FDmirror.c | 111 +-
src/H5FDmirror_priv.h | 16 +-
src/H5FDmpi.c | 2 +-
src/H5FDmpio.c | 275 +-
src/H5FDmpio.h | 20 +-
src/H5FDmulti.c | 60 +-
src/H5FDmulti.h | 8 +-
src/H5FDonion.c | 100 +-
src/H5FDonion_header.c | 18 +-
src/H5FDonion_history.c | 14 +-
src/H5FDonion_index.c | 57 +-
src/H5FDonion_index.h | 6 +-
src/H5FDpkg.h | 2 +-
src/H5FDprivate.h | 30 +-
src/H5FDros3.c | 39 +-
src/H5FDros3.h | 8 +-
src/H5FDs3comms.c | 188 +-
src/H5FDs3comms.h | 11 +-
src/H5FDsec2.c | 36 +-
src/H5FDspace.c | 10 +-
src/H5FDsplitter.c | 88 +-
src/H5FDstdio.c | 16 +-
src/H5FDsubfiling/H5FDioc.c | 59 +-
src/H5FDsubfiling/H5FDioc_int.c | 2 +-
src/H5FDsubfiling/H5FDioc_priv.h | 18 +-
src/H5FDsubfiling/H5FDioc_threads.c | 48 +-
src/H5FDsubfiling/H5FDsubfile_int.c | 1 +
src/H5FDsubfiling/H5FDsubfiling.c | 110 +-
src/H5FDsubfiling/H5FDsubfiling.h | 48 +-
src/H5FDsubfiling/H5FDsubfiling_priv.h | 2 +
src/H5FDsubfiling/H5subfiling_common.c | 149 +-
src/H5FDtest.c | 14 +-
src/H5FL.c | 36 +-
src/H5FLprivate.h | 10 +-
src/H5FO.c | 16 +-
src/H5FOprivate.h | 6 +-
src/H5FS.c | 18 +-
src/H5FScache.c | 28 +-
src/H5FSpkg.h | 8 +-
src/H5FSprivate.h | 2 +-
src/H5FSsection.c | 161 +-
src/H5Faccum.c | 44 +-
src/H5Fcwfs.c | 10 +-
src/H5Fdeprec.c | 4 +-
src/H5Fefc.c | 4 +-
src/H5Fint.c | 231 +-
src/H5Fio.c | 4 +-
src/H5Fmodule.h | 14 +-
src/H5Fmount.c | 20 +-
src/H5Fmpi.c | 61 +-
src/H5Fpkg.h | 94 +-
src/H5Fprivate.h | 80 +-
src/H5Fpublic.h | 10 +-
src/H5Fquery.c | 86 +-
src/H5Fspace.c | 6 +-
src/H5Fsuper.c | 94 +-
src/H5Fsuper_cache.c | 32 +-
src/H5Ftest.c | 20 +-
src/H5G.c | 26 +-
src/H5Gbtree2.c | 2 +-
src/H5Gcache.c | 4 +-
src/H5Gcompact.c | 20 +-
src/H5Gdense.c | 40 +-
src/H5Gdeprec.c | 10 +-
src/H5Gent.c | 6 +-
src/H5Gint.c | 58 +-
src/H5Glink.c | 16 +-
src/H5Gloc.c | 36 +-
src/H5Gname.c | 82 +-
src/H5Gnode.c | 60 +-
src/H5Gobj.c | 62 +-
src/H5Goh.c | 4 +-
src/H5Gpkg.h | 19 +-
src/H5Gprivate.h | 18 +-
src/H5Groot.c | 16 +-
src/H5Gstab.c | 28 +-
src/H5Gtest.c | 106 +-
src/H5Gtraverse.c | 70 +-
src/H5HF.c | 8 +-
src/H5HFcache.c | 154 +-
src/H5HFdbg.c | 31 +-
src/H5HFdblock.c | 18 +-
src/H5HFhdr.c | 34 +-
src/H5HFhuge.c | 28 +-
src/H5HFiblock.c | 60 +-
src/H5HFiter.c | 16 +-
src/H5HFman.c | 6 +-
src/H5HFpkg.h | 74 +-
src/H5HFprivate.h | 11 +-
src/H5HFsection.c | 112 +-
src/H5HFspace.c | 10 +-
src/H5HFtest.c | 6 +-
src/H5HFtiny.c | 6 +-
src/H5HG.c | 4 +-
src/H5HGcache.c | 6 +-
src/H5HGdbg.c | 6 +-
src/H5HL.c | 14 +-
src/H5HLcache.c | 12 +-
src/H5HLdbg.c | 2 +-
src/H5HLdblk.c | 2 +-
src/H5HLpkg.h | 2 +-
src/H5I.c | 42 +-
src/H5Iint.c | 62 +-
src/H5Ipkg.h | 8 +-
src/H5Iprivate.h | 13 +-
src/H5Itest.c | 12 +-
src/H5L.c | 86 +-
src/H5Ldeprec.c | 28 +-
src/H5Lexternal.c | 6 +-
src/H5Lint.c | 102 +-
src/H5Lmodule.h | 26 +-
src/H5Lpkg.h | 4 +-
src/H5Lprivate.h | 4 +-
src/H5Lpublic.h | 8 +-
src/H5M.c | 36 +-
src/H5MF.c | 166 +-
src/H5MFaggr.c | 28 +-
src/H5MFpkg.h | 8 +-
src/H5MFprivate.h | 4 +-
src/H5MFsection.c | 30 +-
src/H5MM.c | 65 +-
src/H5MMprivate.h | 22 +-
src/H5O.c | 60 +-
src/H5Oainfo.c | 24 +-
src/H5Oalloc.c | 243 +-
src/H5Oattr.c | 27 +-
src/H5Oattribute.c | 132 +-
src/H5Obogus.c | 8 +-
src/H5Obtreek.c | 9 +-
src/H5Ocache.c | 64 +-
src/H5Ocache_image.c | 8 +-
src/H5Ochunk.c | 4 +-
src/H5Ocont.c | 8 +-
src/H5Ocopy.c | 112 +-
src/H5Ocopy_ref.c | 16 +-
src/H5Odbg.c | 36 +-
src/H5Odeprec.c | 26 +-
src/H5Odrvinfo.c | 8 +-
src/H5Odtype.c | 113 +-
src/H5Oefl.c | 24 +-
src/H5Ofill.c | 34 +-
src/H5Oflush.c | 18 +-
src/H5Ofsinfo.c | 14 +-
src/H5Oginfo.c | 13 +-
src/H5Oint.c | 124 +-
src/H5Olayout.c | 53 +-
src/H5Olinfo.c | 24 +-
src/H5Olink.c | 36 +-
src/H5Omessage.c | 84 +-
src/H5Omtime.c | 23 +-
src/H5Oname.c | 13 +-
src/H5Opkg.h | 64 +-
src/H5Opline.c | 22 +-
src/H5Oprivate.h | 87 +-
src/H5Opublic.h | 2 +-
src/H5Orefcount.c | 14 +-
src/H5Osdspace.c | 10 +-
src/H5Oshared.c | 10 +-
src/H5Oshared.h | 6 +-
src/H5Oshmesg.c | 8 +-
src/H5Ostab.c | 15 +-
src/H5Otest.c | 70 +-
src/H5P.c | 30 +-
src/H5PB.c | 58 +-
src/H5PBpkg.h | 2 +-
src/H5PBprivate.h | 2 +-
src/H5PL.c | 12 +-
src/H5PLint.c | 28 +-
src/H5PLpath.c | 88 +-
src/H5PLpkg.h | 13 +-
src/H5PLplugin_cache.c | 29 +-
src/H5Pdapl.c | 20 +-
src/H5Pdcpl.c | 86 +-
src/H5Pdeprec.c | 10 +-
src/H5Pdxpl.c | 44 +-
src/H5Pencdec.c | 40 +-
src/H5Pfapl.c | 217 +-
src/H5Pfcpl.c | 8 +-
src/H5Pfmpl.c | 6 +-
src/H5Pgcpl.c | 24 +-
src/H5Pint.c | 108 +-
src/H5Plapl.c | 28 +-
src/H5Pocpl.c | 24 +-
src/H5Pocpypl.c | 10 +-
src/H5Ppkg.h | 16 +-
src/H5Pprivate.h | 10 +-
src/H5Ppublic.h | 121 +-
src/H5Ptest.c | 2 +-
src/H5R.c | 32 +-
src/H5RS.c | 30 +-
src/H5Rdeprec.c | 20 +-
src/H5Rint.c | 69 +-
src/H5Rpkg.h | 4 +-
src/H5S.c | 80 +-
src/H5SL.c | 4 +-
src/H5SM.c | 122 +-
src/H5SMcache.c | 20 +-
src/H5Sall.c | 52 +-
src/H5Sdeprec.c | 2 +-
src/H5Shyper.c | 555 +-
src/H5Smpio.c | 76 +-
src/H5Snone.c | 36 +-
src/H5Spkg.h | 10 +-
src/H5Spoint.c | 72 +-
src/H5Sprivate.h | 27 +-
src/H5Spublic.h | 5 +-
src/H5Sselect.c | 118 +-
src/H5Stest.c | 8 +-
src/H5T.c | 346 +-
src/H5TS.c | 8 +-
src/H5Tarray.c | 8 +-
src/H5Tbit.c | 32 +-
src/H5Tcommit.c | 42 +-
src/H5Tcompound.c | 28 +-
src/H5Tconv.c | 378 +-
src/H5Tdeprec.c | 2 +-
src/H5Tenum.c | 16 +-
src/H5Tfields.c | 41 +-
src/H5Tinit_float.c | 18 +-
src/H5Tmodule.h | 2 +-
src/H5Tnative.c | 14 +-
src/H5Toh.c | 4 +-
src/H5Topaque.c | 2 +-
src/H5Tpkg.h | 29 +-
src/H5Tprivate.h | 12 +-
src/H5Tref.c | 91 +-
src/H5Tvisit.c | 4 +-
src/H5Tvlen.c | 76 +-
src/H5VL.c | 32 +-
src/H5VLcallback.c | 346 +-
src/H5VLint.c | 128 +-
src/H5VLmodule.h | 2 +-
src/H5VLnative.c | 6 +-
src/H5VLnative_attr.c | 8 +-
src/H5VLnative_blob.c | 2 +-
src/H5VLnative_dataset.c | 18 +-
src/H5VLnative_file.c | 26 +-
src/H5VLnative_link.c | 4 +-
src/H5VLnative_object.c | 4 +-
src/H5VLnative_token.c | 6 +-
src/H5VLpassthru.c | 2 +-
src/H5VLpkg.h | 16 +-
src/H5VLprivate.h | 20 +-
src/H5VM.c | 34 +-
src/H5VMprivate.h | 30 +-
src/H5Z.c | 121 +-
src/H5Zdeflate.c | 2 +-
src/H5Znbit.c | 38 +-
src/H5Zprivate.h | 2 +-
src/H5Zpublic.h | 2 +-
src/H5Zscaleoffset.c | 36 +-
src/H5Zszip.c | 6 +-
src/H5Ztrans.c | 70 +-
src/H5checksum.c | 4 +-
src/H5dbg.c | 14 +-
src/H5encode.h | 9 +-
src/H5mpi.c | 48 +-
src/H5overflow.txt | 2 +-
src/H5private.h | 261 +-
src/H5public.h | 12 +-
src/H5system.c | 64 +-
src/H5timer.c | 65 +-
src/H5trace.c | 44 +-
test/API/H5_api_async_test.c | 80 +-
test/API/H5_api_attribute_test.c | 224 +-
test/API/H5_api_dataset_test.c | 138 +-
test/API/H5_api_datatype_test.c | 32 +-
test/API/H5_api_file_test.c | 12 +-
test/API/H5_api_group_test.c | 41 +-
test/API/H5_api_link_test.c | 932 +-
test/API/H5_api_misc_test.c | 46 +-
test/API/H5_api_object_test.c | 84 +-
test/API/H5_api_test.c | 43 +-
test/API/H5_api_test_util.c | 50 +-
test/API/H5_api_test_util.h | 4 +-
test/API/driver/CMakeLists.txt | 4 +-
test/API/tarray.c | 30 +-
test/API/tattr.c | 817 +-
test/API/tcoords.c | 26 +-
test/API/testhdf5.c | 70 +-
test/API/testhdf5.h | 30 +-
test/API/tfile.c | 348 +-
test/API/tgenprop.c | 44 +-
test/API/th5o.c | 28 +-
test/API/th5s.c | 422 +-
test/API/tid.c | 48 +-
test/API/titerate.c | 92 +-
test/API/tmisc.c | 140 +-
test/API/trefer.c | 16 +-
test/API/tselect.c | 777 +-
test/API/tunicode.c | 84 +-
test/API/tvlstr.c | 44 +-
test/API/tvltypes.c | 186 +-
test/CMakePassthroughVOLTests.cmake | 10 +-
test/CMakeTests.cmake | 13 +-
test/CMakeVFDTests.cmake | 10 +-
test/accum.c | 70 +-
test/accum_swmr_reader.c | 12 +-
test/app_ref.c | 8 +-
test/atomic_reader.c | 2 +-
test/atomic_writer.c | 2 +-
test/big.c | 63 +-
test/bittests.c | 72 +-
test/btree2.c | 1088 +-
test/cache.c | 10196 ++++++++--------
test/cache_api.c | 487 +-
test/cache_common.c | 683 +-
test/cache_common.h | 154 +-
test/cache_image.c | 1657 ++-
test/cache_logging.c | 66 +-
test/cache_tagging.c | 442 +-
test/chunk_info.c | 42 +-
test/cmpd_dset.c | 1314 +-
test/cmpd_dtransform.c | 8 +-
test/cork.c | 156 +-
test/cross_read.c | 48 +-
test/dangle.c | 16 +-
test/del_many_dense_attrs.c | 26 +-
test/direct_chunk.c | 119 +-
test/dsets.c | 797 +-
test/dt_arith.c | 286 +-
test/dtransform.c | 48 +-
test/dtypes.c | 390 +-
test/earray.c | 167 +-
test/efc.c | 16 +-
test/enc_dec_plist.c | 74 +-
test/enc_dec_plist_cross_platform.c | 56 +-
test/enum.c | 4 +-
test/error_test.c | 70 +-
test/event_set.c | 20 +-
test/evict_on_close.c | 120 +-
test/external.c | 288 +-
test/external_common.c | 10 +-
test/external_common.h | 2 +-
test/external_env.c | 50 +-
test/farray.c | 126 +-
test/fheap.c | 348 +-
test/file_image.c | 70 +-
test/filenotclosed.c | 20 +-
test/fillval.c | 139 +-
test/filter_fail.c | 28 +-
test/filter_plugin.c | 150 +-
test/flush1.c | 62 +-
test/flush2.c | 90 +-
test/flushrefresh.c | 22 +-
test/freespace.c | 72 +-
test/gen_bad_offset.c | 8 +-
test/gen_bad_ohdr.c | 28 +-
test/gen_bogus.c | 26 +-
test/gen_bounds.c | 58 +-
test/gen_cross.c | 56 +-
test/gen_deflate.c | 2 +-
test/gen_file_image.c | 2 +-
test/gen_filespace.c | 24 +-
test/gen_filters.c | 24 +-
test/gen_new_fill.c | 3 +-
test/gen_new_group.c | 12 +-
test/gen_old_group.c | 4 +-
test/gen_plist.c | 78 +-
test/gen_udlinks.c | 6 +-
test/genall5.c | 1008 +-
test/genall5.h | 16 +-
test/getname.c | 76 +-
test/gheap.c | 58 +-
test/h5test.c | 160 +-
test/h5test.h | 25 +-
test/hdfs.c | 80 +-
test/hyperslab.c | 59 +-
test/istore.c | 34 +-
test/lheap.c | 28 +-
test/links.c | 3004 ++---
test/links_env.c | 28 +-
test/mdset.c | 12 +-
test/mf.c | 656 +-
test/mirror_vfd.c | 100 +-
test/mount.c | 327 +-
test/mtime.c | 26 +-
test/ntypes.c | 149 +-
test/objcopy.c | 1677 ++-
test/objcopy_ref.c | 215 +-
test/ohdr.c | 228 +-
test/onion.c | 92 +-
test/page_buffer.c | 120 +-
test/reserved.c | 29 +-
test/ros3.c | 183 +-
test/s3comms.c | 160 +-
test/select_io_dset.c | 317 +-
test/set_extent.c | 210 +-
test/stab.c | 244 +-
test/swmr.c | 361 +-
test/swmr_common.c | 4 +-
test/swmr_generator.c | 36 +-
test/swmr_reader.c | 30 +-
test/swmr_remove_reader.c | 2 +-
test/swmr_sparse_reader.c | 2 +-
test/swmr_sparse_writer.c | 6 +-
test/swmr_start_write.c | 26 +-
test/swmr_writer.c | 34 +-
test/tarray.c | 30 +-
test/tattr.c | 869 +-
test/tcheck_version.c | 4 +-
test/tcoords.c | 26 +-
test/{ => testfiles}/aggr.h5 | Bin
test/{ => testfiles}/bad_compound.h5 | Bin
test/{ => testfiles}/bad_offset.h5 | Bin
test/{ => testfiles}/be_data.h5 | Bin
test/{ => testfiles}/be_extlink1.h5 | Bin
test/{ => testfiles}/be_extlink2.h5 | Bin
test/{ => testfiles}/btree_idx_1_6.h5 | Bin
test/{ => testfiles}/btree_idx_1_8.h5 | Bin
test/{ => testfiles}/corrupt_stab_msg.h5 | Bin
test/{ => testfiles}/cve_2020_10810.h5 | Bin
test/testfiles/cve_2020_10812.h5 | Bin 0 -> 2565 bytes
test/{ => testfiles}/deflate.h5 | Bin
test/{ => testfiles}/family_v16-000000.h5 | Bin
test/{ => testfiles}/family_v16-000001.h5 | Bin
test/{ => testfiles}/family_v16-000002.h5 | Bin
test/{ => testfiles}/family_v16-000003.h5 | Bin
test/{ => testfiles}/file_image_core_test.h5 | Bin
test/{ => testfiles}/filespace_1_6.h5 | Bin
test/{ => testfiles}/filespace_1_8.h5 | Bin
test/{ => testfiles}/fill18.h5 | Bin
test/{ => testfiles}/fill_old.h5 | Bin
test/{ => testfiles}/filter_error.h5 | Bin
test/{ => testfiles}/fsm_aggr_nopersist.h5 | Bin
test/{ => testfiles}/fsm_aggr_persist.h5 | Bin
test/{ => testfiles}/group_old.h5 | Bin
test/{ => testfiles}/h5fc_ext1_f.h5 | Bin
test/{ => testfiles}/h5fc_ext1_i.h5 | Bin
test/{ => testfiles}/h5fc_ext2_if.h5 | Bin
test/{ => testfiles}/h5fc_ext2_sf.h5 | Bin
test/{ => testfiles}/h5fc_ext3_isf.h5 | Bin
test/{ => testfiles}/h5fc_ext_none.h5 | Bin
test/{ => testfiles}/le_data.h5 | Bin
test/{ => testfiles}/le_extlink1.h5 | Bin
test/{ => testfiles}/le_extlink2.h5 | Bin
...emleak_H5O_dtype_decode_helper_H5Odtype.h5 | Bin
test/{ => testfiles}/mergemsg.h5 | Bin
test/{ => testfiles}/multi_file_v16-r.h5 | Bin
test/{ => testfiles}/multi_file_v16-s.h5 | Bin
test/{ => testfiles}/noencoder.h5 | Bin
test/{ => testfiles}/none.h5 | Bin
test/{ => testfiles}/paged_nopersist.h5 | Bin
test/{ => testfiles}/paged_persist.h5 | Bin
test/{ => testfiles}/specmetaread.h5 | Bin
test/{ => testfiles}/tarrold.h5 | Bin
test/{ => testfiles}/tbad_msg_count.h5 | Bin
test/{ => testfiles}/tbogus.h5 | Bin
test/{ => testfiles}/test_filters_be.h5 | Bin
test/{ => testfiles}/test_filters_le.h5 | Bin
test/{ => testfiles}/th5s.h5 | Bin
test/{ => testfiles}/tlayouto.h5 | Bin
test/{ => testfiles}/tmtimen.h5 | Bin
test/{ => testfiles}/tmtimeo.h5 | Bin
{tools => test}/testfiles/tnullspace.h5 | Bin
test/{ => testfiles}/tsizeslheap.h5 | Bin
test/testframe.c | 70 +-
test/testhdf5.c | 2 +-
test/testhdf5.h | 2 +-
test/testmeta.c | 8 +-
test/tfile.c | 474 +-
test/tgenprop.c | 44 +-
test/th5_system.c | 88 +-
test/th5o.c | 50 +-
test/th5s.c | 469 +-
test/thread_id.c | 16 +-
test/tid.c | 52 +-
test/timer.c | 18 +-
test/titerate.c | 102 +-
test/tmisc.c | 227 +-
test/trefer.c | 38 +-
test/trefer_deprec.c | 102 +-
test/trefstr.c | 64 +-
test/tselect.c | 787 +-
test/tskiplist.c | 2 +-
test/tsohm.c | 168 +-
test/ttsafe.c | 16 +-
test/tunicode.c | 86 +-
test/tvlstr.c | 44 +-
test/tvltypes.c | 236 +-
test/twriteorder.c | 4 +-
test/unlink.c | 201 +-
test/unregister.c | 18 +-
test/use.h | 6 +-
test/use_append_chunk.c | 26 +-
test/use_append_chunk_mirror.c | 16 +-
test/use_append_mchunks.c | 22 +-
test/use_common.c | 16 +-
test/use_disable_mdc_flushes.c | 8 +-
test/vds.c | 342 +-
test/vds_env.c | 47 +-
test/vds_swmr_gen.c | 14 +-
test/vds_swmr_reader.c | 10 +-
test/vds_swmr_writer.c | 10 +-
test/vfd.c | 525 +-
test/vfd_plugin.c | 40 +-
test/vol.c | 98 +-
test/vol_plugin.c | 32 +-
testpar/API/H5_api_async_test_parallel.c | 100 +-
testpar/API/H5_api_dataset_test_parallel.c | 50 +-
testpar/API/H5_api_file_test_parallel.c | 8 +-
testpar/API/H5_api_test_parallel.c | 22 +-
testpar/API/H5_api_test_parallel.h | 8 +-
testpar/API/t_bigio.c | 4 +-
testpar/API/t_chunk_alloc.c | 2 -
testpar/API/t_coll_chunk.c | 2 +-
testpar/API/t_dset.c | 40 +-
testpar/API/t_file.c | 88 +-
testpar/API/t_file_image.c | 24 +-
testpar/API/t_filter_read.c | 2 +-
testpar/API/t_mdset.c | 68 +-
testpar/API/t_prop.c | 24 +-
testpar/API/t_shapesame.c | 165 +-
testpar/API/t_span_tree.c | 124 +-
testpar/API/testphdf5.c | 4 +-
testpar/API/testphdf5.h | 20 +-
testpar/t_2Gio.c | 70 +-
testpar/t_bigio.c | 14 +-
testpar/t_cache.c | 879 +-
testpar/t_cache_image.c | 704 +-
testpar/t_chunk_alloc.c | 2 -
testpar/t_dset.c | 76 +-
testpar/t_file.c | 98 +-
testpar/t_file_image.c | 32 +-
testpar/t_filter_read.c | 2 +-
testpar/t_filters_parallel.c | 8462 +++++++------
testpar/t_filters_parallel.h | 5 +
testpar/t_init_term.c | 6 +-
testpar/t_mdset.c | 74 +-
testpar/t_pflush1.c | 8 +-
testpar/t_pflush2.c | 8 +-
testpar/t_pmulti_dset.c | 36 +-
testpar/t_pread.c | 238 +-
testpar/t_prop.c | 24 +-
testpar/t_select_io_dset.c | 66 +-
testpar/t_shapesame.c | 240 +-
testpar/t_span_tree.c | 118 +-
testpar/t_subfiling_vfd.c | 242 +-
testpar/t_vfd.c | 566 +-
testpar/testphdf5.c | 16 +-
testpar/testphdf5.h | 12 +-
tools/lib/h5diff.c | 110 +-
tools/lib/h5diff.h | 8 +-
tools/lib/h5diff_array.c | 182 +-
tools/lib/h5diff_attr.c | 36 +-
tools/lib/h5diff_dset.c | 20 +-
tools/lib/h5diff_util.c | 2 +-
tools/lib/h5tools.c | 260 +-
tools/lib/h5tools.h | 48 +-
tools/lib/h5tools_dump.c | 504 +-
tools/lib/h5tools_dump.h | 64 +-
tools/lib/h5tools_error.h | 4 +-
tools/lib/h5tools_ref.c | 8 +-
tools/lib/h5tools_str.c | 64 +-
tools/lib/h5tools_utils.c | 84 +-
tools/lib/h5tools_utils.h | 6 +-
tools/lib/h5trav.c | 72 +-
tools/lib/h5trav.h | 18 +-
tools/libtest/h5tools_test_utils.c | 92 +-
tools/src/h5copy/h5copy.c | 32 +-
tools/src/h5diff/h5diff_common.c | 30 +-
tools/src/h5diff/ph5diff_main.c | 4 +-
tools/src/h5dump/h5dump.c | 158 +-
tools/src/h5dump/h5dump.h | 6 +-
tools/src/h5dump/h5dump_ddl.c | 202 +-
tools/src/h5dump/h5dump_defines.h | 6 +-
tools/src/h5dump/h5dump_extern.h | 2 +-
tools/src/h5dump/h5dump_xml.c | 556 +-
tools/src/h5format_convert/h5format_convert.c | 18 +-
tools/src/h5import/h5import.c | 474 +-
tools/src/h5jam/h5jam.c | 20 +-
tools/src/h5jam/h5unjam.c | 12 +-
tools/src/h5ls/h5ls.c | 526 +-
tools/src/h5perf/pio_engine.c | 30 +-
tools/src/h5perf/pio_perf.c | 50 +-
tools/src/h5perf/sio_engine.c | 55 +-
tools/src/h5perf/sio_perf.c | 44 +-
tools/src/h5repack/h5repack.c | 8 +-
tools/src/h5repack/h5repack.h | 10 +-
tools/src/h5repack/h5repack_copy.c | 76 +-
tools/src/h5repack/h5repack_filters.c | 6 +-
tools/src/h5repack/h5repack_main.c | 84 +-
tools/src/h5repack/h5repack_opttable.c | 40 +-
tools/src/h5repack/h5repack_parse.c | 48 +-
tools/src/h5repack/h5repack_refs.c | 2 +-
tools/src/h5repack/h5repack_verify.c | 4 +-
tools/src/h5stat/h5stat.c | 108 +-
tools/src/misc/h5clear.c | 22 +-
tools/src/misc/h5debug.c | 16 +-
tools/src/misc/h5delete.c | 6 +-
tools/src/misc/h5mkgrp.c | 38 +-
tools/src/misc/h5repart.c | 88 +-
tools/test/h5copy/CMakeTests.cmake | 39 +-
.../h5copy_extlinks_src.out.ls | 0
.../{testfiles => expected}/h5copy_help1.ddl | 0
.../{testfiles => expected}/h5copy_help2.ddl | 0
.../{testfiles => expected}/h5copy_misc1.err | 0
.../{testfiles => expected}/h5copy_misc1.out | 0
.../h5copy_plugin_fail_ERR.out.h5.txt | 0
.../h5copy_plugin_test.out.h5.txt | 0
.../{testfiles => expected}/h5copy_ref.out.ls | 0
.../{testfiles => expected}/h5copytst.out.ls | 0
.../h5copytst_new.out.ls | 0
.../{testfiles => expected}/tudfilter.h5.txt | 0
.../tudfilter.h5_ERR.txt | 0
tools/test/h5copy/h5copygentest.c | 2 +-
tools/test/h5copy/testh5copy.sh.in | 14 +-
tools/test/h5diff/CMakeTests.cmake | 625 +-
.../{testfiles => expected}/dangling_link.err | 0
.../{testfiles => expected}/h5diff_10.txt | 0
.../{testfiles => expected}/h5diff_100.txt | 0
.../{testfiles => expected}/h5diff_101.txt | 0
.../{testfiles => expected}/h5diff_101w.txt | 0
.../{testfiles => expected}/h5diff_102.txt | 0
.../{testfiles => expected}/h5diff_102w.txt | 0
.../{testfiles => expected}/h5diff_103.txt | 0
.../{testfiles => expected}/h5diff_103w.txt | 0
.../{testfiles => expected}/h5diff_104.txt | 0
.../{testfiles => expected}/h5diff_104w.txt | 0
.../{testfiles => expected}/h5diff_11.txt | 0
.../{testfiles => expected}/h5diff_12.txt | 0
.../{testfiles => expected}/h5diff_13.txt | 0
.../{testfiles => expected}/h5diff_14.txt | 0
.../{testfiles => expected}/h5diff_15.txt | 0
.../{testfiles => expected}/h5diff_16_1.txt | 0
.../{testfiles => expected}/h5diff_16_2.txt | 0
.../{testfiles => expected}/h5diff_16_3.txt | 0
.../{testfiles => expected}/h5diff_17.txt | 0
.../{testfiles => expected}/h5diff_171.txt | 0
.../{testfiles => expected}/h5diff_172.txt | 0
.../{testfiles => expected}/h5diff_18.txt | 0
.../{testfiles => expected}/h5diff_18_1.txt | 0
.../{testfiles => expected}/h5diff_19.txt | 0
.../{testfiles => expected}/h5diff_20.txt | 0
.../{testfiles => expected}/h5diff_200.txt | 0
.../{testfiles => expected}/h5diff_201.txt | 0
.../{testfiles => expected}/h5diff_202.txt | 0
.../{testfiles => expected}/h5diff_203.txt | 0
.../{testfiles => expected}/h5diff_204.txt | 0
.../{testfiles => expected}/h5diff_205.txt | 0
.../{testfiles => expected}/h5diff_206.txt | 0
.../{testfiles => expected}/h5diff_207.txt | 0
.../{testfiles => expected}/h5diff_208.txt | 0
.../{testfiles => expected}/h5diff_21.txt | 0
.../{testfiles => expected}/h5diff_22.txt | 0
.../{testfiles => expected}/h5diff_220.txt | 0
.../{testfiles => expected}/h5diff_221.txt | 0
.../{testfiles => expected}/h5diff_222.txt | 0
.../{testfiles => expected}/h5diff_223.txt | 0
.../{testfiles => expected}/h5diff_224.txt | 0
.../{testfiles => expected}/h5diff_23.txt | 0
.../{testfiles => expected}/h5diff_24.txt | 0
.../{testfiles => expected}/h5diff_25.txt | 0
.../{testfiles => expected}/h5diff_26.txt | 0
.../{testfiles => expected}/h5diff_27.txt | 0
.../{testfiles => expected}/h5diff_28.txt | 0
.../{testfiles => expected}/h5diff_30.txt | 0
.../{testfiles => expected}/h5diff_300.txt | 0
.../{testfiles => expected}/h5diff_400.txt | 0
.../{testfiles => expected}/h5diff_401.txt | 0
.../{testfiles => expected}/h5diff_402.txt | 0
.../{testfiles => expected}/h5diff_403.txt | 0
.../{testfiles => expected}/h5diff_404.txt | 0
.../{testfiles => expected}/h5diff_405.txt | 0
.../{testfiles => expected}/h5diff_406.txt | 0
.../{testfiles => expected}/h5diff_407.txt | 0
.../{testfiles => expected}/h5diff_408.txt | 0
.../{testfiles => expected}/h5diff_409.txt | 0
.../{testfiles => expected}/h5diff_410.txt | 0
.../{testfiles => expected}/h5diff_411.txt | 0
.../{testfiles => expected}/h5diff_412.txt | 0
.../{testfiles => expected}/h5diff_413.txt | 0
.../{testfiles => expected}/h5diff_414.txt | 0
.../{testfiles => expected}/h5diff_415.txt | 0
.../{testfiles => expected}/h5diff_416.txt | 0
.../{testfiles => expected}/h5diff_417.txt | 0
.../{testfiles => expected}/h5diff_418.txt | 0
.../{testfiles => expected}/h5diff_419.txt | 0
.../{testfiles => expected}/h5diff_420.txt | 0
.../{testfiles => expected}/h5diff_421.txt | 0
.../{testfiles => expected}/h5diff_422.txt | 0
.../{testfiles => expected}/h5diff_423.txt | 0
.../{testfiles => expected}/h5diff_424.txt | 0
.../{testfiles => expected}/h5diff_425.txt | 0
.../{testfiles => expected}/h5diff_450.txt | 0
.../{testfiles => expected}/h5diff_451.txt | 0
.../{testfiles => expected}/h5diff_452.txt | 0
.../{testfiles => expected}/h5diff_453.txt | 0
.../{testfiles => expected}/h5diff_454.txt | 0
.../{testfiles => expected}/h5diff_455.txt | 0
.../{testfiles => expected}/h5diff_456.txt | 0
.../{testfiles => expected}/h5diff_457.txt | 0
.../{testfiles => expected}/h5diff_458.txt | 0
.../{testfiles => expected}/h5diff_459.txt | 0
.../{testfiles => expected}/h5diff_465.txt | 0
.../{testfiles => expected}/h5diff_466.txt | 0
.../{testfiles => expected}/h5diff_467.txt | 0
.../{testfiles => expected}/h5diff_468.txt | 0
.../{testfiles => expected}/h5diff_469.txt | 0
.../{testfiles => expected}/h5diff_471.txt | 0
.../{testfiles => expected}/h5diff_472.txt | 0
.../{testfiles => expected}/h5diff_473.txt | 0
.../{testfiles => expected}/h5diff_474.txt | 0
.../{testfiles => expected}/h5diff_475.txt | 0
.../{testfiles => expected}/h5diff_480.txt | 0
.../{testfiles => expected}/h5diff_481.txt | 0
.../{testfiles => expected}/h5diff_482.txt | 0
.../{testfiles => expected}/h5diff_483.txt | 0
.../{testfiles => expected}/h5diff_484.txt | 0
.../{testfiles => expected}/h5diff_485.txt | 0
.../{testfiles => expected}/h5diff_486.txt | 0
.../{testfiles => expected}/h5diff_487.txt | 0
.../{testfiles => expected}/h5diff_50.txt | 0
.../{testfiles => expected}/h5diff_500.txt | 0
.../{testfiles => expected}/h5diff_501.txt | 0
.../{testfiles => expected}/h5diff_502.txt | 0
.../{testfiles => expected}/h5diff_503.txt | 0
.../{testfiles => expected}/h5diff_504.txt | 0
.../{testfiles => expected}/h5diff_505.txt | 0
.../{testfiles => expected}/h5diff_506.txt | 0
.../{testfiles => expected}/h5diff_507.txt | 0
.../{testfiles => expected}/h5diff_508.txt | 0
.../{testfiles => expected}/h5diff_509.txt | 0
.../{testfiles => expected}/h5diff_51.txt | 0
.../{testfiles => expected}/h5diff_510.txt | 0
.../{testfiles => expected}/h5diff_511.txt | 0
.../{testfiles => expected}/h5diff_512.txt | 0
.../{testfiles => expected}/h5diff_513.txt | 0
.../{testfiles => expected}/h5diff_514.txt | 0
.../{testfiles => expected}/h5diff_515.txt | 0
.../{testfiles => expected}/h5diff_516.txt | 0
.../{testfiles => expected}/h5diff_517.txt | 0
.../{testfiles => expected}/h5diff_518.txt | 0
.../{testfiles => expected}/h5diff_52.txt | 0
.../{testfiles => expected}/h5diff_53.txt | 0
.../{testfiles => expected}/h5diff_530.txt | 0
.../{testfiles => expected}/h5diff_54.txt | 0
.../{testfiles => expected}/h5diff_540.txt | 0
.../{testfiles => expected}/h5diff_55.txt | 0
.../{testfiles => expected}/h5diff_56.txt | 0
.../{testfiles => expected}/h5diff_57.txt | 0
.../{testfiles => expected}/h5diff_58.txt | 0
.../{testfiles => expected}/h5diff_58_ref.txt | 0
.../{testfiles => expected}/h5diff_59.txt | 0
.../{testfiles => expected}/h5diff_60.txt | 0
.../{testfiles => expected}/h5diff_600.txt | 0
.../{testfiles => expected}/h5diff_601.txt | 0
.../h5diff_601_ERR.err | 0
.../{testfiles => expected}/h5diff_603.txt | 0
.../{testfiles => expected}/h5diff_604.txt | 0
.../{testfiles => expected}/h5diff_605.txt | 0
.../{testfiles => expected}/h5diff_606.txt | 0
.../{testfiles => expected}/h5diff_607.txt | 0
.../{testfiles => expected}/h5diff_608.txt | 0
.../{testfiles => expected}/h5diff_609.txt | 0
.../{testfiles => expected}/h5diff_61.txt | 0
.../{testfiles => expected}/h5diff_610.txt | 0
.../{testfiles => expected}/h5diff_612.txt | 0
.../{testfiles => expected}/h5diff_613.txt | 0
.../{testfiles => expected}/h5diff_614.txt | 0
.../{testfiles => expected}/h5diff_615.txt | 0
.../{testfiles => expected}/h5diff_616.txt | 0
.../{testfiles => expected}/h5diff_617.txt | 0
.../{testfiles => expected}/h5diff_618.txt | 0
.../{testfiles => expected}/h5diff_619.txt | 0
.../{testfiles => expected}/h5diff_62.txt | 0
.../{testfiles => expected}/h5diff_621.txt | 0
.../{testfiles => expected}/h5diff_622.txt | 0
.../{testfiles => expected}/h5diff_623.txt | 0
.../{testfiles => expected}/h5diff_624.txt | 0
.../{testfiles => expected}/h5diff_625.txt | 0
.../{testfiles => expected}/h5diff_626.txt | 0
.../{testfiles => expected}/h5diff_627.txt | 0
.../{testfiles => expected}/h5diff_628.txt | 0
.../{testfiles => expected}/h5diff_629.txt | 0
.../{testfiles => expected}/h5diff_63.txt | 0
.../{testfiles => expected}/h5diff_630.txt | 0
.../{testfiles => expected}/h5diff_631.txt | 0
.../{testfiles => expected}/h5diff_640.txt | 0
.../{testfiles => expected}/h5diff_641.txt | 0
.../{testfiles => expected}/h5diff_642.txt | 0
.../{testfiles => expected}/h5diff_643.txt | 0
.../{testfiles => expected}/h5diff_644.txt | 0
.../{testfiles => expected}/h5diff_645.txt | 0
.../{testfiles => expected}/h5diff_646.txt | 0
.../{testfiles => expected}/h5diff_70.txt | 0
.../{testfiles => expected}/h5diff_700.txt | 0
.../{testfiles => expected}/h5diff_701.txt | 0
.../{testfiles => expected}/h5diff_702.txt | 0
.../{testfiles => expected}/h5diff_703.txt | 0
.../{testfiles => expected}/h5diff_704.txt | 0
.../{testfiles => expected}/h5diff_705.txt | 0
.../{testfiles => expected}/h5diff_706.txt | 0
.../{testfiles => expected}/h5diff_707.txt | 0
.../{testfiles => expected}/h5diff_708.txt | 0
.../{testfiles => expected}/h5diff_709.txt | 0
.../{testfiles => expected}/h5diff_710.txt | 0
.../{testfiles => expected}/h5diff_80.txt | 0
.../{testfiles => expected}/h5diff_800.txt | 0
.../{testfiles => expected}/h5diff_801.txt | 0
.../{testfiles => expected}/h5diff_830.txt | 0
.../{testfiles => expected}/h5diff_8625.txt | 0
.../{testfiles => expected}/h5diff_8639.txt | 0
.../{testfiles => expected}/h5diff_90.txt | 0
.../{testfiles => expected}/h5diff_900.txt | 0
.../{testfiles => expected}/h5diff_901.txt | 0
.../{testfiles => expected}/h5diff_902.txt | 0
.../{testfiles => expected}/h5diff_eps.txt | 0
.../{testfiles => expected}/h5diff_reg.txt | 0
.../{testfiles => expected}/h5diff_ud.txt | 0
.../{testfiles => expected}/h5diff_udfail.err | 0
.../{testfiles => expected}/h5diff_udfail.txt | 0
.../{testfiles => expected}/h5diff_v1.txt | 0
.../{testfiles => expected}/h5diff_v2.txt | 0
.../{testfiles => expected}/h5diff_v3.txt | 0
.../{testfiles => expected}/h5diff_vlstr.txt | 0
tools/test/h5diff/h5diff_plugin.sh.in | 7 +-
tools/test/h5diff/h5diffgentest.c | 118 +-
tools/test/h5diff/testh5diff.sh.in | 476 +-
tools/test/h5dump/CMakeTests.cmake | 724 +-
tools/test/h5dump/CMakeTestsPBITS.cmake | 18 +-
tools/test/h5dump/CMakeTestsVDS.cmake | 17 +-
tools/test/h5dump/CMakeTestsXML.cmake | 251 +-
tools/test/h5dump/CMakeVFDTests.cmake | 4 +-
.../tnofilename-with-packed-bits.err | 0
.../{ => pbits}/tpbitsCharLengthExceeded.err | 0
.../{ => pbits}/tpbitsCharOffsetExceeded.err | 0
.../errfiles/{ => pbits}/tpbitsIncomplete.err | 0
.../{ => pbits}/tpbitsIntLengthExceeded.err | 0
.../{ => pbits}/tpbitsIntOffsetExceeded.err | 0
.../{ => pbits}/tpbitsLengthExceeded.err | 0
.../{ => pbits}/tpbitsLengthPositive.err | 0
.../{ => pbits}/tpbitsLongLengthExceeded.err | 0
.../{ => pbits}/tpbitsLongOffsetExceeded.err | 0
.../{ => pbits}/tpbitsMaxExceeded.err | 0
.../{ => pbits}/tpbitsOffsetExceeded.err | 0
.../{ => pbits}/tpbitsOffsetNegative.err | 0
.../h5dump/expected}/charsets.ddl | 0
.../h5dump/expected}/err_attr_dspace.ddl | 0
.../h5dump/expected}/file_space.ddl | 0
.../h5dump/expected}/filter_fail.ddl | 0
.../h5dump/expected}/h5dump-help.txt | 0
.../h5dump/expected}/non_existing.ddl | 0
.../h5dump/expected}/out3.h5import | 0
.../h5dump/expected}/packedbits.ddl | 0
.../pbits/tnofilename-with-packed-bits.ddl | 0
.../h5dump/expected}/pbits/tpbitsArray.ddl | 0
.../pbits/tpbitsCharLengthExceeded.ddl | 0
.../pbits/tpbitsCharOffsetExceeded.ddl | 0
.../h5dump/expected}/pbits/tpbitsCompound.ddl | 0
.../expected}/pbits/tpbitsIncomplete.ddl | 0
.../pbits/tpbitsIntLengthExceeded.ddl | 0
.../pbits/tpbitsIntOffsetExceeded.ddl | 0
.../expected}/pbits/tpbitsLengthExceeded.ddl | 0
.../expected}/pbits/tpbitsLengthPositive.ddl | 0
.../pbits/tpbitsLongLengthExceeded.ddl | 0
.../pbits/tpbitsLongOffsetExceeded.ddl | 0
.../h5dump/expected}/pbits/tpbitsMax.ddl | 0
.../expected}/pbits/tpbitsMaxExceeded.ddl | 0
.../expected}/pbits/tpbitsOffsetExceeded.ddl | 0
.../expected}/pbits/tpbitsOffsetNegative.ddl | 0
.../expected}/pbits/tpbitsOverlapped.ddl | 0
.../h5dump/expected}/pbits/tpbitsSigned.ddl | 0
.../h5dump/expected}/pbits/tpbitsSigned2.ddl | 0
.../h5dump/expected}/pbits/tpbitsSigned4.ddl | 0
.../expected}/pbits/tpbitsSignedInt.ddl | 0
.../expected}/pbits/tpbitsSignedInt4.ddl | 0
.../expected}/pbits/tpbitsSignedInt8.ddl | 0
.../expected}/pbits/tpbitsSignedIntWhole.ddl | 0
.../expected}/pbits/tpbitsSignedLong.ddl | 0
.../expected}/pbits/tpbitsSignedLong16.ddl | 0
.../expected}/pbits/tpbitsSignedLong8.ddl | 0
.../expected}/pbits/tpbitsSignedLongLong.ddl | 0
.../pbits/tpbitsSignedLongLong16.ddl | 0
.../pbits/tpbitsSignedLongLong32.ddl | 0
.../pbits/tpbitsSignedLongLongWhole.ddl | 0
.../pbits/tpbitsSignedLongLongWhole1.ddl | 0
.../pbits/tpbitsSignedLongLongWhole63.ddl | 0
.../expected}/pbits/tpbitsSignedLongWhole.ddl | 0
.../expected}/pbits/tpbitsSignedWhole.ddl | 0
.../h5dump/expected}/pbits/tpbitsUnsigned.ddl | 0
.../expected}/pbits/tpbitsUnsigned2.ddl | 0
.../expected}/pbits/tpbitsUnsigned4.ddl | 0
.../expected}/pbits/tpbitsUnsignedInt.ddl | 0
.../expected}/pbits/tpbitsUnsignedInt4.ddl | 0
.../expected}/pbits/tpbitsUnsignedInt8.ddl | 0
.../pbits/tpbitsUnsignedIntWhole.ddl | 0
.../expected}/pbits/tpbitsUnsignedLong.ddl | 0
.../expected}/pbits/tpbitsUnsignedLong16.ddl | 0
.../expected}/pbits/tpbitsUnsignedLong8.ddl | 0
.../pbits/tpbitsUnsignedLongLong.ddl | 0
.../pbits/tpbitsUnsignedLongLong16.ddl | 0
.../pbits/tpbitsUnsignedLongLong32.ddl | 0
.../pbits/tpbitsUnsignedLongLongWhole.ddl | 0
.../pbits/tpbitsUnsignedLongLongWhole1.ddl | 0
.../pbits/tpbitsUnsignedLongLongWhole63.ddl | 0
.../pbits/tpbitsUnsignedLongWhole.ddl | 0
.../expected}/pbits/tpbitsUnsignedWhole.ddl | 0
.../h5dump/expected}/tall-1.ddl | 0
.../h5dump/expected}/tall-2.ddl | 0
.../h5dump/expected}/tall-2A.ddl | 0
.../h5dump/expected}/tall-2A0.ddl | 0
.../h5dump/expected}/tall-2B.ddl | 0
.../h5dump/expected}/tall-3.ddl | 0
.../h5dump/expected}/tall-4s.ddl | 0
.../h5dump/expected}/tall-5s.ddl | 0
.../h5dump/expected}/tall-6.ddl | 0
.../h5dump/expected}/tall-7.ddl | 0
.../h5dump/expected}/tall-7N.ddl | 0
.../h5dump/expected}/tallfilters.ddl | 0
.../h5dump/expected}/tarray1.ddl | 0
.../h5dump/expected}/tarray1_big.ddl | 0
.../h5dump/expected}/tarray2.ddl | 0
.../h5dump/expected}/tarray3.ddl | 0
.../h5dump/expected}/tarray4.ddl | 0
.../h5dump/expected}/tarray5.ddl | 0
.../h5dump/expected}/tarray6.ddl | 0
.../h5dump/expected}/tarray7.ddl | 0
.../h5dump/expected}/tarray8.ddl | 0
.../h5dump/expected}/tattr-1.ddl | 0
.../h5dump/expected}/tattr-2.ddl | 0
.../h5dump/expected}/tattr-3.ddl | 0
.../h5dump/expected}/tattr-4_be.ddl | 0
.../h5dump/expected}/tattrcontents1.ddl | 0
.../h5dump/expected}/tattrcontents2.ddl | 0
.../h5dump/expected}/tattrintsize.ddl | 0
.../h5dump/expected}/tattrreg.ddl | 0
.../h5dump/expected}/tattrregR.ddl | 0
.../h5dump/expected}/tbigdims.ddl | 0
.../h5dump/expected}/tbin1.ddl | 0
.../h5dump/expected}/tbin2.ddl | 0
.../h5dump/expected}/tbin3.ddl | 0
.../h5dump/expected}/tbin4.ddl | 0
.../h5dump/expected}/tbinregR.ddl | 0
.../h5dump/expected}/tbitnopaque_be.ddl | 0
.../h5dump/expected}/tbitnopaque_le.ddl | 0
.../h5dump/expected}/tboot1.ddl | 0
.../h5dump/expected}/tboot2.ddl | 0
.../h5dump/expected}/tboot2A.ddl | 0
.../h5dump/expected}/tboot2B.ddl | 0
.../h5dump/expected}/tchar1.ddl | 0
.../h5dump/expected}/tchunked.ddl | 0
.../h5dump/expected}/tcmpdattrintsize.ddl | 0
.../h5dump/expected}/tcmpdintarray.ddl | 0
.../h5dump/expected}/tcmpdints.ddl | 0
.../h5dump/expected}/tcmpdintsize.ddl | 0
.../h5dump/expected}/tcomp-1.ddl | 0
.../h5dump/expected}/tcomp-2.ddl | 0
.../h5dump/expected}/tcomp-3.ddl | 0
.../h5dump/expected}/tcomp-4.ddl | 0
.../h5dump/expected}/tcompact.ddl | 0
.../h5dump/expected}/tcompound_complex2.ddl | 0
.../h5dump/expected}/tcontents.ddl | 0
.../h5dump/expected}/tcontiguos.ddl | 0
.../h5dump/expected}/tdatareg.ddl | 0
.../h5dump/expected}/tdataregR.ddl | 0
.../h5dump/expected}/tdeflate.ddl | 0
.../h5dump/expected}/tdset-1.ddl | 0
.../h5dump/expected}/tdset-2.ddl | 0
.../h5dump/expected}/tdset-3s.ddl | 0
.../h5dump/expected}/tempty.ddl | 0
.../h5dump/expected}/texceedsubblock.ddl | 0
.../h5dump/expected}/texceedsubcount.ddl | 0
.../h5dump/expected}/texceedsubstart.ddl | 0
.../h5dump/expected}/texceedsubstride.ddl | 0
.../h5dump/expected}/texternal.ddl | 0
.../h5dump/expected}/textlink.ddl | 0
.../h5dump/expected}/textlinkfar.ddl | 0
.../h5dump/expected}/textlinksrc.ddl | 0
.../h5dump/expected}/tfamily.ddl | 0
.../h5dump/expected}/tfill.ddl | 0
.../h5dump/expected}/tfletcher32.ddl | 0
.../h5dump/expected}/tfloatsattrs.ddl | 0
.../h5dump/expected}/tfloatsattrs.wddl | 0
.../h5dump/expected}/tfpformat.ddl | 0
.../h5dump/expected}/tgroup-1.ddl | 0
.../h5dump/expected}/tgroup-2.ddl | 0
.../h5dump/expected}/tgrp_comments.ddl | 0
.../h5dump/expected}/tgrpnullspace.ddl | 0
.../h5dump/expected}/thlink-1.ddl | 0
.../h5dump/expected}/thlink-2.ddl | 0
.../h5dump/expected}/thlink-3.ddl | 0
.../h5dump/expected}/thlink-4.ddl | 0
.../h5dump/expected}/thlink-5.ddl | 0
.../h5dump/expected}/thyperslab.ddl | 0
.../h5dump/expected}/tindicesno.ddl | 0
.../h5dump/expected}/tindicessub1.ddl | 0
.../h5dump/expected}/tindicessub2.ddl | 0
.../h5dump/expected}/tindicessub3.ddl | 0
.../h5dump/expected}/tindicessub4.ddl | 0
.../h5dump/expected}/tindicesyes.ddl | 0
.../h5dump/expected}/tints4dims.ddl | 0
.../h5dump/expected}/tints4dimsBlock2.ddl | 0
.../h5dump/expected}/tints4dimsBlockEq.ddl | 0
.../h5dump/expected}/tints4dimsCount2.ddl | 0
.../h5dump/expected}/tints4dimsCountEq.ddl | 0
.../h5dump/expected}/tints4dimsStride2.ddl | 0
.../h5dump/expected}/tintsattrs.ddl | 0
.../h5dump/expected}/tintsnodata.ddl | 0
.../h5dump/expected}/tlarge_objname.ddl | 0
.../h5dump/expected}/tldouble.ddl | 0
.../h5dump/expected}/tldouble_scalar.ddl | 0
.../h5dump/expected}/tlonglinks.ddl | 0
.../h5dump/expected}/tloop-1.ddl | 0
.../h5dump/expected}/tmulti.ddl | 0
.../h5dump/expected}/tmultifile.ddl | 0
.../h5dump/expected}/tnamed_dtype_attr.ddl | 0
.../h5dump/expected}/tnbit.ddl | 0
.../h5dump/expected}/tnestcomp-1.ddl | 0
.../h5dump/expected}/tnestedcmpddt.ddl | 0
.../h5dump/expected}/tno-subset.ddl | 0
.../h5dump/expected}/tnoattrdata.ddl | 0
.../h5dump/expected}/tnoattrddl.ddl | 0
.../h5dump/expected}/tnodata.ddl | 0
.../h5dump/expected}/tnoddl.ddl | 0
.../h5dump/expected}/tnoddlfile.ddl | 0
.../h5dump/expected}/tnullspace.ddl | 0
.../h5dump/expected}/torderattr1.ddl | 0
.../h5dump/expected}/torderattr2.ddl | 0
.../h5dump/expected}/torderattr3.ddl | 0
.../h5dump/expected}/torderattr4.ddl | 0
.../h5dump/expected}/tordercontents1.ddl | 0
.../h5dump/expected}/tordercontents2.ddl | 0
.../h5dump/expected}/tordergr1.ddl | 0
.../h5dump/expected}/tordergr2.ddl | 0
.../h5dump/expected}/tordergr3.ddl | 0
.../h5dump/expected}/tordergr4.ddl | 0
.../h5dump/expected}/tordergr5.ddl | 0
.../h5dump/expected}/torderlinks1.ddl | 0
.../h5dump/expected}/torderlinks2.ddl | 0
.../h5dump/expected}/tperror.ddl | 0
.../h5dump/expected}/tqmarkfile.ddl | 0
.../h5dump/expected}/trawdatafile.ddl | 0
.../h5dump/expected}/trawssetfile.ddl | 0
.../h5dump/expected}/treadfilter.ddl | 0
.../h5dump/expected}/treadintfilter.ddl | 0
.../h5dump/expected}/trefer_attrR.ddl | 0
.../h5dump/expected}/trefer_compatR.ddl | 0
.../h5dump/expected}/trefer_extR.ddl | 0
.../h5dump/expected}/trefer_grpR.ddl | 0
.../h5dump/expected}/trefer_objR.ddl | 0
.../h5dump/expected}/trefer_obj_delR.ddl | 0
.../h5dump/expected}/trefer_paramR.ddl | 0
.../h5dump/expected}/trefer_regR.ddl | 0
.../h5dump/expected}/trefer_reg_1dR.ddl | 0
.../h5dump/expected}/treference.ddl | 0
.../h5dump/expected}/tsaf.ddl | 0
.../h5dump/expected}/tscalarattrintsize.ddl | 0
.../h5dump/expected}/tscalarintattrsize.ddl | 0
.../h5dump/expected}/tscalarintsize.ddl | 0
.../h5dump/expected}/tscalarstring.ddl | 0
.../h5dump/expected}/tscaleoffset.ddl | 0
.../h5dump/expected}/tshuffle.ddl | 0
.../h5dump/expected}/tslink-1.ddl | 0
.../h5dump/expected}/tslink-2.ddl | 0
.../h5dump/expected}/tslink-D.ddl | 0
.../h5dump/expected}/tsplit_file.ddl | 0
.../h5dump/expected}/tst_onion_dset_1d.ddl | 0
.../h5dump/expected}/tst_onion_dset_ext.ddl | 0
.../h5dump/expected}/tst_onion_objs.ddl | 0
.../expected}/tst_onion_revision_count.ddl | 0
.../h5dump/expected}/tstarfile.ddl | 0
.../h5dump/expected}/tstr-1.ddl | 0
.../h5dump/expected}/tstr-2.ddl | 0
.../h5dump/expected}/tstring.ddl | 0
.../h5dump/expected}/tstring2.ddl | 0
.../h5dump/expected}/tstringe.ddl | 0
.../h5dump/expected}/tszip.ddl | 0
.../h5dump/expected}/tudfilter.ddl | 0
.../h5dump/expected}/tudlink-1.ddl | 0
.../h5dump/expected}/tudlink-2.ddl | 0
.../h5dump/expected}/tuserfilter.ddl | 0
.../h5dump/expected}/tvldtypes1.ddl | 0
.../h5dump/expected}/tvldtypes2.ddl | 0
.../h5dump/expected}/tvldtypes3.ddl | 0
.../h5dump/expected}/tvldtypes4.ddl | 0
.../h5dump/expected}/tvldtypes5.ddl | 0
.../h5dump/expected}/tvlenstr_array.ddl | 0
.../h5dump/expected}/tvlstr.ddl | 0
.../h5dump/expected}/tvms.ddl | 0
.../h5dump/expected}/twidedisplay.ddl | 0
.../h5dump/expected}/twithddlfile.ddl | 0
.../h5dump/expected}/vds/tvds-1.ddl | 0
.../h5dump/expected}/vds/tvds-2.ddl | 0
.../h5dump/expected}/vds/tvds-3_1.ddl | 0
.../h5dump/expected}/vds/tvds-3_2.ddl | 0
.../h5dump/expected}/vds/tvds-4.ddl | 0
.../h5dump/expected}/vds/tvds-5.ddl | 0
.../h5dump/expected}/vds/tvds_layout-1.ddl | 0
.../h5dump/expected}/vds/tvds_layout-2.ddl | 0
.../h5dump/expected}/vds/tvds_layout-3_1.ddl | 0
.../h5dump/expected}/vds/tvds_layout-3_2.ddl | 0
.../h5dump/expected}/vds/tvds_layout-4.ddl | 0
.../h5dump/expected}/vds/tvds_layout-5.ddl | 0
.../h5dump/expected}/vds/vds-first.ddl | 0
.../h5dump/expected}/vds/vds-gap1.ddl | 0
.../h5dump/expected}/vds/vds-gap2.ddl | 0
.../h5dump/expected}/vds/vds_layout-eiger.ddl | 0
.../expected}/vds/vds_layout-maxmin.ddl | 0
.../h5dump/expected/xml}/tall-2A.h5.xml | 0
.../h5dump/expected/xml}/tall.h5.xml | 0
.../h5dump/expected/xml}/tarray1.h5.xml | 0
.../h5dump/expected/xml}/tarray2.h5.xml | 0
.../h5dump/expected/xml}/tarray3.h5.xml | 0
.../h5dump/expected/xml}/tarray6.h5.xml | 0
.../h5dump/expected/xml}/tarray7.h5.xml | 0
.../h5dump/expected/xml}/tattr.h5.xml | 0
.../h5dump/expected/xml}/tbitfields_be.h5.xml | 0
.../h5dump/expected/xml}/tbitfields_le.h5.xml | 0
.../h5dump/expected/xml}/tcompound.h5.xml | 0
.../h5dump/expected/xml}/tcompound2.h5.xml | 0
.../expected/xml}/tcompound_complex.h5.xml | 0
.../h5dump/expected/xml}/tdatareg.h5.xml | 0
.../h5dump/expected/xml}/tdset.h5.xml | 0
.../h5dump/expected/xml}/tdset2.h5.xml | 0
.../h5dump/expected/xml}/tempty-dtd-2.h5.xml | 0
.../expected/xml}/tempty-dtd-uri.h5.xml | 0
.../h5dump/expected/xml}/tempty-dtd.h5.xml | 0
.../h5dump/expected/xml}/tempty-nons-2.h5.xml | 0
.../expected/xml}/tempty-nons-uri.h5.xml | 0
.../h5dump/expected/xml}/tempty-nons.h5.xml | 0
.../h5dump/expected/xml}/tempty-ns-2.h5.xml | 0
.../h5dump/expected/xml}/tempty-ns.h5.xml | 0
.../h5dump/expected/xml}/tempty.h5.xml | 0
.../h5dump/expected/xml}/tenum.h5.xml | 0
.../h5dump/expected/xml}/test35.nc.xml | 0
.../h5dump/expected/xml}/textlink.h5.xml | 0
.../h5dump/expected/xml}/tfpformat.h5.xml | 0
.../h5dump/expected/xml}/tgroup.h5.xml | 0
.../h5dump/expected/xml}/thlink.h5.xml | 0
.../h5dump/expected/xml}/tloop.h5.xml | 0
.../h5dump/expected/xml}/tloop2.h5.xml | 0
.../h5dump/expected/xml}/tmany.h5.xml | 0
.../h5dump/expected/xml}/tname-amp.h5.xml | 0
.../h5dump/expected/xml}/tname-apos.h5.xml | 0
.../h5dump/expected/xml}/tname-gt.h5.xml | 0
.../h5dump/expected/xml}/tname-lt.h5.xml | 0
.../h5dump/expected/xml}/tname-quot.h5.xml | 0
.../h5dump/expected/xml}/tname-sp.h5.xml | 0
.../expected/xml}/tnamed_dtype_attr.h5.xml | 0
.../h5dump/expected/xml}/tnestedcomp.h5.xml | 0
.../h5dump/expected/xml}/tnodata.h5.xml | 0
.../h5dump/expected/xml}/tnullspace.h5.xml | 0
.../h5dump/expected/xml}/tobjref.h5.xml | 0
.../h5dump/expected/xml}/topaque.h5.xml | 0
.../h5dump/expected/xml}/torderattr1.h5.xml | 0
.../h5dump/expected/xml}/torderattr2.h5.xml | 0
.../h5dump/expected/xml}/torderattr3.h5.xml | 0
.../h5dump/expected/xml}/torderattr4.h5.xml | 0
.../expected/xml}/tref-escapes-at.h5.xml | 0
.../h5dump/expected/xml}/tref-escapes.h5.xml | 0
.../h5dump/expected/xml}/tref.h5.xml | 0
.../h5dump/expected/xml}/tsaf.h5.xml | 0
.../h5dump/expected/xml}/tslink.h5.xml | 0
.../h5dump/expected/xml}/tstr.h5.xml | 0
.../h5dump/expected/xml}/tstr2.h5.xml | 0
.../h5dump/expected/xml}/tstring-at.h5.xml | 0
.../h5dump/expected/xml}/tstring.h5.xml | 0
.../h5dump/expected/xml}/tudlink.h5.xml | 0
.../h5dump/expected/xml}/tvldtypes1.h5.xml | 0
.../h5dump/expected/xml}/tvldtypes2.h5.xml | 0
.../h5dump/expected/xml}/tvldtypes3.h5.xml | 0
.../h5dump/expected/xml}/tvldtypes4.h5.xml | 0
.../h5dump/expected/xml}/tvldtypes5.h5.xml | 0
.../h5dump/expected/xml}/tvlstr.h5.xml | 0
.../h5dump/expected}/zerodim.ddl | 0
.../h5dump/exportfiles}/tall-6.exp | 0
.../h5dump/exportfiles}/tbinregR.exp | 0
.../h5dump/exportfiles}/tnoddlfile.exp | 0
.../h5dump/exportfiles}/trawdatafile.exp | 0
.../h5dump/exportfiles}/trawssetfile.exp | 0
.../h5dump/exportfiles}/tstr2bin2.exp | 0
.../h5dump/exportfiles}/tstr2bin6.exp | 0
.../h5dump/exportfiles}/twithddl.exp | 0
.../h5dump/exportfiles}/twithddlfile.exp | 0
tools/test/h5dump/h5dump_plugin.sh.in | 6 +-
tools/test/h5dump/h5dumpgentest.c | 72 +-
tools/{ => test/h5dump}/testfiles/charsets.h5 | Bin
.../h5dump}/testfiles/err_attr_dspace.h5 | Bin
.../{ => test/h5dump}/testfiles/file_space.h5 | Bin
.../h5dump}/testfiles/filter_fail.h5 | Bin
.../{ => test/h5dump}/testfiles/packedbits.h5 | Bin
.../h5dump}/testfiles/t128bit_float.h5 | Bin
.../testfiles/tCVE-2021-37501_attr_decode.h5 | Bin
.../testfiles/tCVE_2018_11206_fill_new.h5 | Bin
.../testfiles/tCVE_2018_11206_fill_old.h5 | Bin
.../{ => test/h5dump}/testfiles/taindices.h5 | Bin
tools/{ => test/h5dump}/testfiles/tall.h5 | Bin
tools/{ => test/h5dump}/testfiles/tarray1.h5 | Bin
.../h5dump}/testfiles/tarray1_big.h5 | Bin
tools/{ => test/h5dump}/testfiles/tarray2.h5 | Bin
tools/{ => test/h5dump}/testfiles/tarray3.h5 | Bin
tools/{ => test/h5dump}/testfiles/tarray4.h5 | Bin
tools/{ => test/h5dump}/testfiles/tarray5.h5 | Bin
tools/{ => test/h5dump}/testfiles/tarray6.h5 | Bin
tools/{ => test/h5dump}/testfiles/tarray7.h5 | Bin
tools/{ => test/h5dump}/testfiles/tarray8.h5 | Bin
tools/{ => test/h5dump}/testfiles/tattr.h5 | Bin
tools/{ => test/h5dump}/testfiles/tattr2.h5 | Bin
.../{ => test/h5dump}/testfiles/tattr4_be.h5 | Bin
.../h5dump}/testfiles/tattrintsize.h5 | Bin
tools/{ => test/h5dump}/testfiles/tattrreg.h5 | Bin
tools/{ => test/h5dump}/testfiles/tbigdims.h5 | Bin
tools/{ => test/h5dump}/testfiles/tbinary.h5 | Bin
.../h5dump}/testfiles/tbitnopaque.h5 | Bin
tools/{ => test/h5dump}/testfiles/tchar.h5 | Bin
.../h5dump}/testfiles/tcmpdattrintsize.h5 | Bin
.../h5dump}/testfiles/tcmpdintarray.h5 | Bin
.../{ => test/h5dump}/testfiles/tcmpdints.h5 | Bin
.../h5dump}/testfiles/tcmpdintsize.h5 | Bin
.../{ => test/h5dump}/testfiles/tcompound.h5 | Bin
.../h5dump}/testfiles/tcompound_complex.h5 | Bin
.../h5dump}/testfiles/tcompound_complex2.h5 | Bin
tools/{ => test/h5dump}/testfiles/tdatareg.h5 | Bin
tools/{ => test/h5dump}/testfiles/tdset.h5 | Bin
tools/{ => test/h5dump}/testfiles/tempty.h5 | Bin
tools/{ => test/h5dump}/testfiles/textlink.h5 | Bin
.../h5dump}/testfiles/textlinkfar.h5 | Bin
.../h5dump}/testfiles/textlinksrc.h5 | Bin
.../h5dump}/testfiles/textlinktar.h5 | Bin
.../h5dump}/testfiles/tfamily00000.h5 | Bin
.../h5dump}/testfiles/tfamily00001.h5 | Bin
.../h5dump}/testfiles/tfamily00002.h5 | Bin
.../h5dump}/testfiles/tfamily00003.h5 | Bin
.../h5dump}/testfiles/tfamily00004.h5 | Bin
.../h5dump}/testfiles/tfamily00005.h5 | Bin
.../h5dump}/testfiles/tfamily00006.h5 | Bin
.../h5dump}/testfiles/tfamily00007.h5 | Bin
.../h5dump}/testfiles/tfamily00008.h5 | Bin
.../h5dump}/testfiles/tfamily00009.h5 | Bin
.../h5dump}/testfiles/tfamily00010.h5 | Bin
.../h5dump}/testfiles/tfcontents1.h5 | Bin
.../h5dump}/testfiles/tfcontents2.h5 | Bin
tools/{ => test/h5dump}/testfiles/tfilters.h5 | Bin
.../h5dump}/testfiles/tfloatsattrs.h5 | Bin
.../{ => test/h5dump}/testfiles/tfpformat.h5 | Bin
tools/{ => test/h5dump}/testfiles/tfvalues.h5 | Bin
tools/{ => test/h5dump}/testfiles/tgroup.h5 | Bin
.../h5dump}/testfiles/tgrp_comments.h5 | Bin
.../h5dump}/testfiles/tgrpnullspace.h5 | Bin
tools/{ => test/h5dump}/testfiles/thlink.h5 | Bin
.../{ => test/h5dump}/testfiles/thyperslab.h5 | Bin
.../{ => test/h5dump}/testfiles/tints4dims.h5 | Bin
.../{ => test/h5dump}/testfiles/tintsattrs.h5 | Bin
.../h5dump}/testfiles/tintsnodata.h5 | Bin
.../h5dump}/testfiles/tlarge_objname.h5 | Bin
tools/{ => test/h5dump}/testfiles/tldouble.h5 | Bin
.../h5dump}/testfiles/tldouble_scalar.h5 | Bin
.../{ => test/h5dump}/testfiles/tlonglinks.h5 | Bin
tools/{ => test/h5dump}/testfiles/tloop.h5 | Bin
tools/{ => test/h5dump}/testfiles/tmulti-b.h5 | Bin
tools/{ => test/h5dump}/testfiles/tmulti-g.h5 | 0
tools/{ => test/h5dump}/testfiles/tmulti-l.h5 | Bin
tools/{ => test/h5dump}/testfiles/tmulti-o.h5 | Bin
tools/{ => test/h5dump}/testfiles/tmulti-r.h5 | Bin
tools/{ => test/h5dump}/testfiles/tmulti-s.h5 | Bin
.../h5dump}/testfiles/tnamed_dtype_attr.h5 | Bin
.../h5dump}/testfiles/tnestedcmpddt.h5 | Bin
.../h5dump}/testfiles/tnestedcomp.h5 | Bin
.../{ => test/h5dump}/testfiles/tno-subset.h5 | Bin
tools/test/h5dump/testfiles/tnullspace.h5 | Bin 0 -> 3624 bytes
.../{ => test/h5dump}/testfiles/torderattr.h5 | Bin
tools/{ => test/h5dump}/testfiles/tordergr.h5 | Bin
.../h5dump}/testfiles/trefer_attr.h5 | Bin
.../h5dump}/testfiles/trefer_compat.h5 | Bin
.../h5dump}/testfiles/trefer_ext1.h5 | Bin
.../h5dump}/testfiles/trefer_ext2.h5 | Bin
.../{ => test/h5dump}/testfiles/trefer_grp.h5 | Bin
.../{ => test/h5dump}/testfiles/trefer_obj.h5 | Bin
.../h5dump}/testfiles/trefer_obj_del.h5 | Bin
.../h5dump}/testfiles/trefer_param.h5 | Bin
.../{ => test/h5dump}/testfiles/trefer_reg.h5 | Bin
.../h5dump}/testfiles/trefer_reg_1d.h5 | Bin
tools/{ => test/h5dump}/testfiles/tsaf.h5 | Bin
.../h5dump}/testfiles/tscalarattrintsize.h5 | Bin
.../h5dump}/testfiles/tscalarintattrsize.h5 | Bin
.../h5dump}/testfiles/tscalarintsize.h5 | Bin
.../h5dump}/testfiles/tscalarstring.h5 | Bin
tools/{ => test/h5dump}/testfiles/tslink.h5 | Bin
.../{ => test/h5dump}/testfiles/tsoftlinks.h5 | Bin
.../h5dump}/testfiles/tsplit_file-m.h5 | Bin
.../h5dump}/testfiles/tsplit_file-r.h5 | Bin
.../h5dump}/testfiles/tst_onion_dset_1d.h5 | Bin
.../testfiles/tst_onion_dset_1d.h5.onion | Bin
.../h5dump}/testfiles/tst_onion_dset_ext.h5 | Bin
.../testfiles/tst_onion_dset_ext.h5.onion | Bin
.../h5dump}/testfiles/tst_onion_objs.h5 | Bin
.../h5dump}/testfiles/tst_onion_objs.h5.onion | Bin
tools/{ => test/h5dump}/testfiles/tstr.h5 | Bin
tools/{ => test/h5dump}/testfiles/tstr2.h5 | Bin
tools/{ => test/h5dump}/testfiles/tstr3.h5 | Bin
.../{ => test/h5dump}/testfiles/tudfilter.h5 | Bin
tools/{ => test/h5dump}/testfiles/tudlink.h5 | Bin
.../{ => test/h5dump}/testfiles/tvldtypes1.h5 | Bin
.../{ => test/h5dump}/testfiles/tvldtypes2.h5 | Bin
.../{ => test/h5dump}/testfiles/tvldtypes3.h5 | Bin
.../{ => test/h5dump}/testfiles/tvldtypes4.h5 | Bin
.../{ => test/h5dump}/testfiles/tvldtypes5.h5 | Bin
.../h5dump}/testfiles/tvlenstr_array.h5 | Bin
tools/{ => test/h5dump}/testfiles/tvlstr.h5 | Bin
tools/{ => test/h5dump}/testfiles/tvms.h5 | Bin
tools/{ => test/h5dump}/testfiles/vds/1_a.h5 | Bin
tools/{ => test/h5dump}/testfiles/vds/1_b.h5 | Bin
tools/{ => test/h5dump}/testfiles/vds/1_c.h5 | Bin
tools/{ => test/h5dump}/testfiles/vds/1_d.h5 | Bin
tools/{ => test/h5dump}/testfiles/vds/1_e.h5 | Bin
tools/{ => test/h5dump}/testfiles/vds/1_f.h5 | Bin
.../{ => test/h5dump}/testfiles/vds/1_vds.h5 | Bin
tools/{ => test/h5dump}/testfiles/vds/2_a.h5 | Bin
tools/{ => test/h5dump}/testfiles/vds/2_b.h5 | Bin
tools/{ => test/h5dump}/testfiles/vds/2_c.h5 | Bin
tools/{ => test/h5dump}/testfiles/vds/2_d.h5 | Bin
tools/{ => test/h5dump}/testfiles/vds/2_e.h5 | Bin
.../{ => test/h5dump}/testfiles/vds/2_vds.h5 | Bin
.../h5dump}/testfiles/vds/3_1_vds.h5 | Bin
.../h5dump}/testfiles/vds/3_2_vds.h5 | Bin
tools/{ => test/h5dump}/testfiles/vds/4_0.h5 | Bin
tools/{ => test/h5dump}/testfiles/vds/4_1.h5 | Bin
tools/{ => test/h5dump}/testfiles/vds/4_2.h5 | Bin
.../{ => test/h5dump}/testfiles/vds/4_vds.h5 | Bin
tools/{ => test/h5dump}/testfiles/vds/5_a.h5 | Bin
tools/{ => test/h5dump}/testfiles/vds/5_b.h5 | Bin
tools/{ => test/h5dump}/testfiles/vds/5_c.h5 | Bin
.../{ => test/h5dump}/testfiles/vds/5_vds.h5 | Bin
tools/{ => test/h5dump}/testfiles/vds/a.h5 | Bin
tools/{ => test/h5dump}/testfiles/vds/b.h5 | Bin
tools/{ => test/h5dump}/testfiles/vds/c.h5 | Bin
tools/{ => test/h5dump}/testfiles/vds/d.h5 | Bin
tools/{ => test/h5dump}/testfiles/vds/f-0.h5 | Bin
tools/{ => test/h5dump}/testfiles/vds/f-3.h5 | Bin
.../h5dump}/testfiles/vds/vds-eiger.h5 | Bin
.../vds/vds-percival-unlim-maxmin.h5 | Bin
.../h5dump/testfiles/xml}/tbitfields.h5 | Bin
.../h5dump/testfiles/xml}/tcompound2.h5 | Bin
.../h5dump/testfiles/xml}/tdset2.h5 | Bin
.../h5dump/testfiles/xml}/tenum.h5 | Bin
.../h5dump/testfiles/xml}/test35.nc | Bin
.../h5dump/testfiles/xml}/tloop2.h5 | Bin
.../h5dump/testfiles/xml}/tmany.h5 | Bin
.../h5dump/testfiles/xml}/tname-amp.h5 | Bin
.../h5dump/testfiles/xml}/tname-apos.h5 | Bin
.../h5dump/testfiles/xml}/tname-gt.h5 | Bin
.../h5dump/testfiles/xml}/tname-lt.h5 | Bin
.../h5dump/testfiles/xml}/tname-quot.h5 | Bin
.../h5dump/testfiles/xml}/tname-sp.h5 | Bin
.../h5dump/testfiles/xml}/tnodata.h5 | Bin
.../h5dump/testfiles/xml}/tobjref.h5 | Bin
.../h5dump/testfiles/xml}/topaque.h5 | Bin
.../h5dump/testfiles/xml}/tref-escapes-at.h5 | Bin
.../h5dump/testfiles/xml}/tref-escapes.h5 | Bin
.../h5dump/testfiles/xml}/tref.h5 | Bin
.../h5dump/testfiles/xml}/tstring-at.h5 | Bin
.../h5dump/testfiles/xml}/tstring.h5 | Bin
tools/{ => test/h5dump}/testfiles/zerodim.h5 | Bin
tools/test/h5dump/testh5dump.sh.in | 392 +-
tools/test/h5dump/testh5dumppbits.sh.in | 140 +-
tools/test/h5dump/testh5dumpvds.sh.in | 40 +-
tools/test/h5dump/testh5dumpxml.sh.in | 185 +-
tools/test/h5format_convert/CMakeTests.cmake | 6 +-
.../{testfiles => expected}/h5fc_d_file-d.ddl | 0
.../{testfiles => expected}/h5fc_d_file.ddl | 0
.../h5fc_d_file.ddl.err | 0
.../{testfiles => expected}/h5fc_dname.ddl | 0
.../{testfiles => expected}/h5fc_dname.err | 0
.../{testfiles => expected}/h5fc_ext1_f.ddl | 0
.../{testfiles => expected}/h5fc_ext1_i.ddl | 0
.../{testfiles => expected}/h5fc_ext1_s.ddl | 0
.../{testfiles => expected}/h5fc_ext2_if.ddl | 0
.../{testfiles => expected}/h5fc_ext2_is.ddl | 0
.../{testfiles => expected}/h5fc_ext2_sf.ddl | 0
.../{testfiles => expected}/h5fc_ext3_isf.ddl | 0
.../{testfiles => expected}/h5fc_help.ddl | 0
.../h5fc_nonexistdset_file.ddl.err | 0
.../h5fc_nonexistfile.ddl.err | 0
.../{testfiles => expected}/h5fc_nooption.ddl | 0
.../{testfiles => expected}/h5fc_v_all.ddl | 0
.../{testfiles => expected}/h5fc_v_bt1.ddl | 0
.../{testfiles => expected}/h5fc_v_err.ddl | 0
.../h5fc_v_err.ddl.err | 0
.../{testfiles => expected}/h5fc_v_n_1d.ddl | 0
.../{testfiles => expected}/h5fc_v_n_all.ddl | 0
.../h5fc_v_ndata_bt1.ddl | 0
.../h5fc_v_non_chunked.ddl | 0
.../old_h5fc_ext1_f.ddl | 0
.../old_h5fc_ext1_i.ddl | 0
.../old_h5fc_ext1_s.ddl | 0
.../old_h5fc_ext2_if.ddl | 0
.../old_h5fc_ext2_is.ddl | 0
.../old_h5fc_ext2_sf.ddl | 0
.../old_h5fc_ext3_isf.ddl | 0
tools/test/h5format_convert/h5fc_chk_idx.c | 6 +-
tools/test/h5format_convert/h5fc_gentest.c | 13 +-
tools/test/h5format_convert/testh5fc.sh.in | 66 +-
tools/test/h5import/CMakeTests.cmake | 14 +-
tools/test/h5import/h5importtest.c | 4 +-
tools/test/h5import/h5importtestutil.sh.in | 9 +-
tools/test/h5jam/CMakeTests.cmake | 4 +-
.../{testfiles => expected}/h5jam-help.txt | 0
.../h5jam-ub-nohdf5.txt | 0
.../{testfiles => expected}/h5unjam-help.txt | 0
.../h5jam/{testfiles => expected}/u10.txt | 0
.../h5jam/{testfiles => expected}/u511.txt | 0
.../h5jam/{testfiles => expected}/u512.txt | 0
.../h5jam/{testfiles => expected}/u513.txt | 0
tools/test/h5jam/getub.c | 6 +-
tools/test/h5jam/h5jamgentest.c | 8 +-
tools/test/h5jam/tellub.c | 2 +-
tools/test/h5jam/testh5jam.sh.in | 20 +-
tools/test/h5ls/CMakeTests.cmake | 193 +-
tools/test/h5ls/CMakeTestsVDS.cmake | 17 +-
.../h5ls/expected}/help-1.ls | 0
.../h5ls/expected}/help-2.ls | 0
.../h5ls/expected}/help-3.ls | 0
.../h5ls/expected}/nosuchfile.ls | 0
.../h5ls/expected}/tall-1.ls | 0
.../h5ls/expected}/tall-2.ls | 0
.../h5ls/expected}/tarray1.ls | 0
.../h5ls/expected}/tattr2.ls | 0
.../h5ls/expected}/tattrreg_be.ls | 0
.../h5ls/expected}/tattrreg_le.ls | 0
.../h5ls/expected}/tcomp-1.ls | 0
.../h5ls/expected}/tdataregbe.ls | 0
.../h5ls/expected}/tdataregle.ls | 0
.../h5ls/expected}/tdset-1.ls | 0
.../h5ls/expected}/tdset_idx.ls | 0
.../h5ls/expected}/tempty.ls | 0
.../h5ls/expected}/textlink-1.ls | 0
.../h5ls/expected}/textlinksrc-1-old.ls | 0
.../h5ls/expected}/textlinksrc-1.ls | 0
.../h5ls/expected}/textlinksrc-2-old.ls | 0
.../h5ls/expected}/textlinksrc-2.ls | 0
.../h5ls/expected}/textlinksrc-3-old.ls | 0
.../h5ls/expected}/textlinksrc-3.ls | 0
.../h5ls/expected}/textlinksrc-4.ls | 0
.../h5ls/expected}/textlinksrc-5.ls | 0
.../h5ls/expected}/textlinksrc-6-old.ls | 0
.../h5ls/expected}/textlinksrc-6.ls | 0
.../h5ls/expected}/textlinksrc-7-old.ls | 0
.../h5ls/expected}/textlinksrc-7.ls | 0
.../h5ls/expected}/textlinksrc-nodangle-1.ls | 0
.../h5ls/expected}/textlinksrc-nodangle-2.ls | 0
.../h5ls/expected}/tgroup-1.ls | 0
.../h5ls/expected}/tgroup-2.ls | 0
.../h5ls/expected}/tgroup-3.ls | 0
.../h5ls/expected}/tgroup.ls | 0
.../h5ls/expected}/tgrp_comments.ls | 0
.../h5ls/expected}/tgrpnullspace.ls | 0
.../h5ls/expected}/thlink-1.ls | 0
.../h5ls/expected}/thlinks-nodangle-1.ls | 0
.../h5ls/expected}/tloop-1.ls | 0
.../h5ls/expected}/tmultifile.ls | 0
.../h5ls/expected}/tnestcomp-1.ls | 0
.../h5ls/expected}/tnestcomp-2.ls | 0
.../h5ls/expected}/tnestcomp-3.ls | 0
.../h5ls/expected}/tnestcomp-4.ls | 0
.../{testfiles => test/h5ls/expected}/tsaf.ls | 0
.../h5ls/expected}/tslink-1.ls | 0
.../h5ls/expected}/tsoftlinks-1.ls | 0
.../h5ls/expected}/tsoftlinks-2.ls | 0
.../h5ls/expected}/tsoftlinks-3.ls | 0
.../h5ls/expected}/tsoftlinks-4.ls | 0
.../h5ls/expected}/tsoftlinks-5.ls | 0
.../h5ls/expected}/tsoftlinks-nodangle-1.ls | 0
.../h5ls/expected}/tstr-1.ls | 0
.../h5ls/expected}/tudfilter.ls | 0
.../h5ls/expected}/tudlink-1.ls | 0
.../h5ls/expected}/tvldtypes1.ls | 0
.../h5ls/expected}/tvldtypes2be.ls | 0
.../h5ls/expected}/tvldtypes2le.ls | 0
.../h5ls/expected}/vds/tvds-1.ls | 0
.../h5ls/expected}/vds/tvds-2.ls | 0
.../h5ls/expected}/vds/tvds-3_1.ls | 0
.../h5ls/expected}/vds/tvds-3_2.ls | 0
.../h5ls/expected}/vds/tvds-4.ls | 0
.../h5ls/expected}/vds/tvds-5.ls | 0
tools/test/h5ls/h5ls_plugin.sh.in | 9 +-
tools/{ => test/h5ls}/testfiles/tdset_idx.h5 | Bin
tools/test/h5ls/testh5ls.sh.in | 168 +-
tools/test/h5ls/testh5lsvds.sh.in | 64 +-
tools/test/h5repack/CMakeTests.cmake | 347 +-
.../1_vds.h5-vds_dset_chunk20x10x5-v.ddl | 0
.../2_vds.h5-vds_chunk3x6x9-v.ddl | 0
.../3_1_vds.h5-vds_chunk2x5x8-v.ddl | 0
.../4_vds.h5-vds_compa-v.ddl | 0
.../4_vds.h5-vds_conti-v.ddl | 0
.../GS.h5repack_paged_nopersist.h5.ddl | 0
.../S.h5repack_fsm_aggr_persist.h5.ddl | 0
.../SP.h5repack_fsm_aggr_nopersist.h5.ddl | 0
.../SP.h5repack_paged_persist.h5.ddl | 0
.../SPT.h5repack_aggr.h5.ddl | 0
.../STG.h5repack_none.h5.ddl | 0
.../attrregion.tattrreg.h5.ddl | 0
.../crtorder.tordergr.h5.ddl | 0
.../dataregion.tdatareg.h5.ddl | 0
.../deflate_limit.h5repack_layout.h5.ddl | 0
...tlinks_src-base.h5copy_extlinks_src.h5.ddl | 0
...links_src-merge.h5copy_extlinks_src.h5.tst | 0
..._src-mergeprune.h5copy_extlinks_src.h5.ddl | 0
...links_src-prune.h5copy_extlinks_src.h5.ddl | 0
.../{testfiles => expected}/h5repack-help.txt | 0
...repack_filters.h5-gzip_verbose_filters.tst | 0
.../h5repack_layout.UD.h5-plugin_none.ddl | 0
...ack_layout.h5-dset2_chunk_20x10-errstk.tst | 0
.../h5repack_layout.h5-plugin_test.ddl | 0
...h5repack_layout.h5-plugin_version_test.ddl | 0
.../h5repack_layout.h5-plugin_zero.ddl | 0
.../h5repack_layout.h5.ddl | 0
.../onion.tst_onion_dset_1d.h5.ddl | 0
.../onion.tst_onion_dset_ext.h5.ddl | 0
.../onion.tst_onion_objs.h5.ddl | 0
.../plugin_none.h5repack_layout.UD.h5.tst | 0
.../plugin_test.h5repack_layout.h5.tst | 0
...plugin_version_test.h5repack_layout.h5.tst | 0
.../plugin_zero.h5repack_layout.h5.tst | 0
.../textlink-base.textlink.h5.ddl | 0
.../textlink-merge.textlink.h5.tst | 0
.../textlink-mergeprune.textlink.h5.ddl | 0
.../textlink-prune.textlink.h5.ddl | 0
.../textlinkfar-base.textlinkfar.h5.ddl | 0
.../textlinkfar-merge.textlinkfar.h5.tst | 0
.../textlinkfar-mergeprune.textlinkfar.h5.ddl | 0
.../textlinkfar-prune.textlinkfar.h5.ddl | 0
.../textlinksrc-base.textlinksrc.h5.ddl | 0
.../textlinksrc-merge.textlinksrc.h5.tst | 0
.../textlinksrc-mergeprune.textlinksrc.h5.ddl | 0
.../textlinksrc-prune.textlinksrc.h5.ddl | 0
.../textlinktar-base.textlinktar.h5.ddl | 0
.../textlinktar-merge.textlinktar.h5.tst | 0
.../textlinktar-mergeprune.textlinktar.h5.ddl | 0
.../textlinktar-prune.textlinktar.h5.ddl | 0
.../tsoftlinks-base.tsoftlinks.h5.ddl | 0
.../tsoftlinks-merge.tsoftlinks.h5.tst | 0
.../tsoftlinks-mergeprune.tsoftlinks.h5.ddl | 0
.../tsoftlinks-prune.tsoftlinks.h5.ddl | 0
tools/test/h5repack/h5repack.sh.in | 210 +-
tools/test/h5repack/h5repack_plugin.sh.in | 13 +-
tools/test/h5repack/h5repackgentest.c | 26 +-
tools/test/h5repack/h5repacktst.c | 190 +-
.../h5repack/testfiles/h5copy_extlinks_src.h5 | Bin 2184 -> 0 bytes
.../h5repack/testfiles/h5copy_extlinks_trg.h5 | Bin 2168 -> 0 bytes
tools/test/h5stat/CMakeTests.cmake | 6 +-
.../{testfiles => expected}/h5stat_dims1.ddl | 0
.../{testfiles => expected}/h5stat_dims2.ddl | 0
.../h5stat_err1_dims.err | 0
.../h5stat_err1_links.err | 0
.../h5stat_err1_numattrs.err | 0
.../h5stat_err2_numattrs.err | 0
.../h5stat_err_old_fill.ddl | 0
.../h5stat_err_old_fill.err | 0
.../h5stat_err_old_layout.ddl | 0
.../h5stat_err_old_layout.err | 0
.../h5stat_err_refcount.ddl | 0
.../h5stat_err_refcount.err | 0
.../h5stat_filters-F.ddl | 0
.../h5stat_filters-UD.ddl | 0
.../h5stat_filters-UT.ddl | 0
.../h5stat_filters-d.ddl | 0
.../h5stat_filters-dT.ddl | 0
.../h5stat_filters-file.ddl | 0
.../h5stat_filters-g.ddl | 0
.../h5stat_filters.ddl | 0
.../{testfiles => expected}/h5stat_help1.ddl | 0
.../{testfiles => expected}/h5stat_help2.ddl | 0
.../{testfiles => expected}/h5stat_idx.ddl | 0
.../{testfiles => expected}/h5stat_links1.ddl | 0
.../{testfiles => expected}/h5stat_links2.ddl | 0
.../{testfiles => expected}/h5stat_links3.ddl | 0
.../{testfiles => expected}/h5stat_links4.ddl | 0
.../{testfiles => expected}/h5stat_links5.ddl | 0
.../h5stat_newgrat-UA.ddl | 0
.../h5stat_newgrat-UG.ddl | 0
.../h5stat_newgrat.ddl | 0
.../{testfiles => expected}/h5stat_nofile.ddl | 0
.../{testfiles => expected}/h5stat_nofile.err | 0
.../h5stat_notexist.ddl | 0
.../h5stat_notexist.err | 0
.../h5stat_numattrs1.ddl | 0
.../h5stat_numattrs2.ddl | 0
.../h5stat_numattrs3.ddl | 0
.../h5stat_numattrs4.ddl | 0
.../{testfiles => expected}/h5stat_tsohm.ddl | 0
tools/test/h5stat/h5stat_gentest.c | 14 +-
tools/test/h5stat/testh5stat.sh.in | 86 +-
tools/test/misc/CMakeTestsClear.cmake | 7 +-
tools/test/misc/CMakeTestsMkgrp.cmake | 4 +-
tools/test/misc/CMakeTestsRepart.cmake | 2 +-
tools/test/misc/clear_open_chk.c | 4 +-
.../h5clear_equal_after_size.ddl | 0
.../h5clear_equal_before_size.ddl | 0
.../h5clear_greater_after_size.ddl | 0
.../h5clear_greater_before_size.ddl | 0
.../h5clear_less_after_size.ddl | 0
.../h5clear_less_before_size.ddl | 0
.../h5clear_missing_file.ddl | 0
.../h5clear_missing_file.err | 0
.../h5clear_no_mdc_image.err | 0
.../h5clear_noclose_after_size.ddl | 0
.../h5clear_noclose_before_size.ddl | 0
.../h5clear_open_fail.err | 0
.../h5clear_status_noclose_after_size.ddl | 0
.../{testfiles => expected}/h5clear_usage.ddl | 0
.../h5clear_user_equal_after_size.ddl | 0
.../h5clear_user_equal_before_size.ddl | 0
.../h5clear_user_greater_after_size.ddl | 0
.../h5clear_user_greater_before_size.ddl | 0
.../h5clear_user_less_after_size.ddl | 0
.../h5clear_user_less_before_size.ddl | 0
.../{testfiles => expected}/h5mkgrp_help.txt | 0
.../misc/expected}/h5mkgrp_nested_lp.ls | 0
.../misc/expected}/h5mkgrp_nested_mult_lp.ls | 0
.../misc/expected}/h5mkgrp_nested_mult_p.ls | 0
.../misc/expected}/h5mkgrp_nested_p.ls | 0
.../misc/expected}/h5mkgrp_several.ls | 0
.../misc/expected}/h5mkgrp_several_l.ls | 0
.../misc/expected}/h5mkgrp_several_p.ls | 0
.../misc/expected}/h5mkgrp_several_v.ls | 0
.../misc/expected}/h5mkgrp_single.ls | 0
.../misc/expected}/h5mkgrp_single_l.ls | 0
.../misc/expected}/h5mkgrp_single_p.ls | 0
.../misc/expected}/h5mkgrp_single_v.ls | 0
tools/test/misc/h5clear_gentest.c | 22 +-
tools/test/misc/h5perf_gentest.c | 54 +-
tools/test/misc/h5repart_gentest.c | 26 +-
tools/test/misc/talign.c | 12 +-
.../misc}/testfiles/family_file00000.h5 | Bin
.../misc}/testfiles/family_file00001.h5 | Bin
.../misc}/testfiles/family_file00002.h5 | Bin
.../misc}/testfiles/family_file00003.h5 | Bin
.../misc}/testfiles/family_file00004.h5 | Bin
.../misc}/testfiles/family_file00005.h5 | Bin
.../misc}/testfiles/family_file00006.h5 | Bin
.../misc}/testfiles/family_file00007.h5 | Bin
.../misc}/testfiles/family_file00008.h5 | Bin
.../misc}/testfiles/family_file00009.h5 | Bin
.../misc}/testfiles/family_file00010.h5 | Bin
.../misc}/testfiles/family_file00011.h5 | Bin
.../misc}/testfiles/family_file00012.h5 | Bin
.../misc}/testfiles/family_file00013.h5 | Bin
.../misc}/testfiles/family_file00014.h5 | Bin
.../misc}/testfiles/family_file00015.h5 | Bin
.../misc}/testfiles/family_file00016.h5 | Bin
.../misc}/testfiles/family_file00017.h5 | Bin
tools/test/misc/testh5clear.sh.in | 40 +-
tools/test/misc/testh5mkgrp.sh.in | 28 +-
tools/test/misc/testh5repart.sh.in | 40 +-
tools/test/misc/vds/UC_common.h | 4 -
tools/test/perform/CMakeTests.cmake | 2 +-
tools/test/perform/iopipe.c | 34 +-
tools/test/perform/overhead.c | 38 +-
tools/test/perform/perf_meta.c | 32 +-
tools/test/perform/zip_perf.c | 44 +-
utils/mirror_vfd/mirror_remote.c | 4 +-
utils/mirror_vfd/mirror_server.c | 16 +-
utils/mirror_vfd/mirror_server_stop.c | 20 +-
utils/mirror_vfd/mirror_writer.c | 4 +-
utils/subfiling_vfd/h5fuse.sh.in | 4 +-
utils/test/swmr_check_compat_vfd.c | 2 +-
utils/tools/h5dwalk/h5dwalk.1 | 42 -
utils/tools/h5dwalk/h5dwalk.c | 98 +-
utils/tools/test/h5dwalk/testh5dwalk.sh.in | 5 +-
1931 files changed, 48043 insertions(+), 42879 deletions(-)
create mode 100644 .github/workflows/autotools.yml
create mode 100644 .github/workflows/cmake.yml
create mode 100644 .github/workflows/cve.yml
create mode 100644 .github/workflows/intel-auto.yml
create mode 100644 .github/workflows/intel-cmake.yml
create mode 100644 .github/workflows/linux-nvhpc-auto.yml
create mode 100644 .github/workflows/linux-nvhpc.yml
create mode 100644 .github/workflows/main-auto-par.yml
create mode 100644 .github/workflows/main-auto-spc.yml
create mode 100644 .github/workflows/main-auto.yml
create mode 100644 .github/workflows/main-cmake.yml
create mode 100644 .github/workflows/scorecard.yml
create mode 100644 CMakeTests.cmake
delete mode 100644 fortran/test/tH5F_F03.F90
create mode 100644 hl/fortran/src/H5DOff.F90
rename hl/test/{ => testfiles}/dsdata.txt (100%)
rename hl/test/{ => testfiles}/dslat.txt (100%)
rename hl/test/{ => testfiles}/dslon.txt (100%)
rename hl/test/{ => testfiles}/dtype_file.txt (100%)
rename hl/test/{ => testfiles}/dtype_file_readable.txt (100%)
rename hl/test/{ => testfiles}/earth.pal (100%)
rename hl/test/{ => testfiles}/image24pixel.txt (100%)
rename hl/test/{ => testfiles}/image24plane.txt (100%)
rename hl/test/{ => testfiles}/image8.txt (100%)
rename hl/test/{ => testfiles}/sepia.pal (100%)
rename hl/test/{ => testfiles}/test_ds_be.h5 (100%)
rename hl/test/{ => testfiles}/test_ds_be_new_ref-32bit.h5 (100%)
rename hl/test/{ => testfiles}/test_ds_be_new_ref.h5 (100%)
rename hl/test/{ => testfiles}/test_ds_le.h5 (100%)
rename hl/test/{ => testfiles}/test_ds_le_new_ref.h5 (100%)
rename hl/test/{ => testfiles}/test_ld.h5 (100%)
rename hl/test/{ => testfiles}/test_table_be.h5 (100%)
rename hl/test/{ => testfiles}/test_table_cray.h5 (100%)
rename hl/test/{ => testfiles}/test_table_le.h5 (100%)
rename hl/test/{ => testfiles}/usa.wri (100%)
rename hl/tools/{ => h5watch}/testfiles/w-err-cmpd1.err (100%)
rename hl/tools/{ => h5watch}/testfiles/w-err-cmpd2.err (100%)
rename hl/tools/{ => h5watch}/testfiles/w-err-cmpd3.err (100%)
rename hl/tools/{ => h5watch}/testfiles/w-err-cmpd4.err (100%)
rename hl/tools/{ => h5watch}/testfiles/w-err-cmpd5.err (100%)
rename hl/tools/{ => h5watch}/testfiles/w-err-dset-nomax.err (100%)
rename hl/tools/{ => h5watch}/testfiles/w-err-dset-none.err (100%)
rename hl/tools/{ => h5watch}/testfiles/w-err-dset1.err (100%)
rename hl/tools/{ => h5watch}/testfiles/w-err-dset2.err (100%)
rename hl/tools/{ => h5watch}/testfiles/w-err-file.err (100%)
rename hl/tools/{ => h5watch}/testfiles/w-err-poll.ddl (100%)
rename hl/tools/{ => h5watch}/testfiles/w-err-poll0.ddl (100%)
rename hl/tools/{ => h5watch}/testfiles/w-err-std.ddl (100%)
rename hl/tools/{ => h5watch}/testfiles/w-err-width.ddl (100%)
rename hl/tools/{ => h5watch}/testfiles/w-ext-cmpd-esc-f1.ddl (100%)
rename hl/tools/{ => h5watch}/testfiles/w-ext-cmpd-esc-f3.ddl (100%)
rename hl/tools/{ => h5watch}/testfiles/w-ext-cmpd-esc-ff2.ddl (100%)
rename hl/tools/{ => h5watch}/testfiles/w-ext-cmpd-esc.ddl (100%)
rename hl/tools/{ => h5watch}/testfiles/w-ext-cmpd-f1.ddl (100%)
rename hl/tools/{ => h5watch}/testfiles/w-ext-cmpd-f2.ddl (100%)
rename hl/tools/{ => h5watch}/testfiles/w-ext-cmpd-ff3.ddl (100%)
rename hl/tools/{ => h5watch}/testfiles/w-ext-cmpd-label.ddl (100%)
rename hl/tools/{ => h5watch}/testfiles/w-ext-cmpd-two-f1.ddl (100%)
rename hl/tools/{ => h5watch}/testfiles/w-ext-cmpd-two-f3.ddl (100%)
rename hl/tools/{ => h5watch}/testfiles/w-ext-cmpd-two-ff2.ddl (100%)
rename hl/tools/{ => h5watch}/testfiles/w-ext-cmpd-two.ddl (100%)
rename hl/tools/{ => h5watch}/testfiles/w-ext-cmpd.ddl (100%)
rename hl/tools/{ => h5watch}/testfiles/w-ext-early.ddl (100%)
rename hl/tools/{ => h5watch}/testfiles/w-ext-late.ddl (100%)
rename hl/tools/{ => h5watch}/testfiles/w-ext-one-d.ddl (100%)
rename hl/tools/{ => h5watch}/testfiles/w-ext-one-simple.ddl (100%)
rename hl/tools/{ => h5watch}/testfiles/w-ext-one.ddl (100%)
rename hl/tools/{ => h5watch}/testfiles/w-ext-two-d.ddl (100%)
rename hl/tools/{ => h5watch}/testfiles/w-ext-two-width.ddl (100%)
rename hl/tools/{ => h5watch}/testfiles/w-ext-two.ddl (100%)
rename hl/tools/{ => h5watch}/testfiles/w-help1.ddl (100%)
rename test/{ => testfiles}/aggr.h5 (100%)
rename test/{ => testfiles}/bad_compound.h5 (100%)
rename test/{ => testfiles}/bad_offset.h5 (100%)
rename test/{ => testfiles}/be_data.h5 (100%)
rename test/{ => testfiles}/be_extlink1.h5 (100%)
rename test/{ => testfiles}/be_extlink2.h5 (100%)
rename test/{ => testfiles}/btree_idx_1_6.h5 (100%)
rename test/{ => testfiles}/btree_idx_1_8.h5 (100%)
rename test/{ => testfiles}/corrupt_stab_msg.h5 (100%)
rename test/{ => testfiles}/cve_2020_10810.h5 (100%)
create mode 100755 test/testfiles/cve_2020_10812.h5
rename test/{ => testfiles}/deflate.h5 (100%)
rename test/{ => testfiles}/family_v16-000000.h5 (100%)
rename test/{ => testfiles}/family_v16-000001.h5 (100%)
rename test/{ => testfiles}/family_v16-000002.h5 (100%)
rename test/{ => testfiles}/family_v16-000003.h5 (100%)
rename test/{ => testfiles}/file_image_core_test.h5 (100%)
rename test/{ => testfiles}/filespace_1_6.h5 (100%)
rename test/{ => testfiles}/filespace_1_8.h5 (100%)
rename test/{ => testfiles}/fill18.h5 (100%)
rename test/{ => testfiles}/fill_old.h5 (100%)
rename test/{ => testfiles}/filter_error.h5 (100%)
rename test/{ => testfiles}/fsm_aggr_nopersist.h5 (100%)
rename test/{ => testfiles}/fsm_aggr_persist.h5 (100%)
rename test/{ => testfiles}/group_old.h5 (100%)
rename test/{ => testfiles}/h5fc_ext1_f.h5 (100%)
rename test/{ => testfiles}/h5fc_ext1_i.h5 (100%)
rename test/{ => testfiles}/h5fc_ext2_if.h5 (100%)
rename test/{ => testfiles}/h5fc_ext2_sf.h5 (100%)
rename test/{ => testfiles}/h5fc_ext3_isf.h5 (100%)
rename test/{ => testfiles}/h5fc_ext_none.h5 (100%)
rename test/{ => testfiles}/le_data.h5 (100%)
rename test/{ => testfiles}/le_extlink1.h5 (100%)
rename test/{ => testfiles}/le_extlink2.h5 (100%)
rename test/{ => testfiles}/memleak_H5O_dtype_decode_helper_H5Odtype.h5 (100%)
rename test/{ => testfiles}/mergemsg.h5 (100%)
rename test/{ => testfiles}/multi_file_v16-r.h5 (100%)
rename test/{ => testfiles}/multi_file_v16-s.h5 (100%)
rename test/{ => testfiles}/noencoder.h5 (100%)
rename test/{ => testfiles}/none.h5 (100%)
rename test/{ => testfiles}/paged_nopersist.h5 (100%)
rename test/{ => testfiles}/paged_persist.h5 (100%)
rename test/{ => testfiles}/specmetaread.h5 (100%)
rename test/{ => testfiles}/tarrold.h5 (100%)
rename test/{ => testfiles}/tbad_msg_count.h5 (100%)
rename test/{ => testfiles}/tbogus.h5 (100%)
rename test/{ => testfiles}/test_filters_be.h5 (100%)
rename test/{ => testfiles}/test_filters_le.h5 (100%)
rename test/{ => testfiles}/th5s.h5 (100%)
rename test/{ => testfiles}/tlayouto.h5 (100%)
rename test/{ => testfiles}/tmtimen.h5 (100%)
rename test/{ => testfiles}/tmtimeo.h5 (100%)
rename {tools => test}/testfiles/tnullspace.h5 (100%)
rename test/{ => testfiles}/tsizeslheap.h5 (100%)
rename tools/test/h5copy/{testfiles => expected}/h5copy_extlinks_src.out.ls (100%)
rename tools/test/h5copy/{testfiles => expected}/h5copy_help1.ddl (100%)
rename tools/test/h5copy/{testfiles => expected}/h5copy_help2.ddl (100%)
rename tools/test/h5copy/{testfiles => expected}/h5copy_misc1.err (100%)
rename tools/test/h5copy/{testfiles => expected}/h5copy_misc1.out (100%)
rename tools/test/h5copy/{testfiles => expected}/h5copy_plugin_fail_ERR.out.h5.txt (100%)
rename tools/test/h5copy/{testfiles => expected}/h5copy_plugin_test.out.h5.txt (100%)
rename tools/test/h5copy/{testfiles => expected}/h5copy_ref.out.ls (100%)
rename tools/test/h5copy/{testfiles => expected}/h5copytst.out.ls (100%)
rename tools/test/h5copy/{testfiles => expected}/h5copytst_new.out.ls (100%)
rename tools/test/h5copy/{testfiles => expected}/tudfilter.h5.txt (100%)
rename tools/test/h5copy/{testfiles => expected}/tudfilter.h5_ERR.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/dangling_link.err (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_10.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_100.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_101.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_101w.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_102.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_102w.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_103.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_103w.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_104.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_104w.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_11.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_12.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_13.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_14.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_15.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_16_1.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_16_2.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_16_3.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_17.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_171.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_172.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_18.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_18_1.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_19.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_20.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_200.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_201.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_202.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_203.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_204.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_205.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_206.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_207.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_208.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_21.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_22.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_220.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_221.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_222.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_223.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_224.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_23.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_24.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_25.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_26.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_27.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_28.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_30.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_300.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_400.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_401.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_402.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_403.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_404.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_405.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_406.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_407.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_408.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_409.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_410.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_411.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_412.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_413.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_414.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_415.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_416.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_417.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_418.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_419.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_420.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_421.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_422.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_423.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_424.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_425.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_450.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_451.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_452.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_453.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_454.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_455.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_456.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_457.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_458.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_459.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_465.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_466.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_467.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_468.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_469.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_471.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_472.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_473.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_474.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_475.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_480.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_481.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_482.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_483.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_484.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_485.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_486.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_487.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_50.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_500.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_501.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_502.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_503.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_504.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_505.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_506.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_507.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_508.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_509.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_51.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_510.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_511.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_512.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_513.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_514.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_515.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_516.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_517.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_518.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_52.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_53.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_530.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_54.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_540.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_55.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_56.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_57.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_58.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_58_ref.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_59.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_60.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_600.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_601.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_601_ERR.err (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_603.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_604.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_605.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_606.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_607.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_608.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_609.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_61.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_610.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_612.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_613.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_614.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_615.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_616.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_617.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_618.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_619.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_62.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_621.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_622.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_623.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_624.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_625.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_626.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_627.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_628.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_629.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_63.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_630.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_631.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_640.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_641.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_642.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_643.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_644.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_645.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_646.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_70.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_700.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_701.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_702.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_703.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_704.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_705.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_706.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_707.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_708.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_709.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_710.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_80.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_800.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_801.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_830.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_8625.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_8639.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_90.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_900.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_901.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_902.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_eps.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_reg.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_ud.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_udfail.err (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_udfail.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_v1.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_v2.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_v3.txt (100%)
rename tools/test/h5diff/{testfiles => expected}/h5diff_vlstr.txt (100%)
rename tools/test/h5dump/errfiles/{ => pbits}/tnofilename-with-packed-bits.err (100%)
rename tools/test/h5dump/errfiles/{ => pbits}/tpbitsCharLengthExceeded.err (100%)
rename tools/test/h5dump/errfiles/{ => pbits}/tpbitsCharOffsetExceeded.err (100%)
rename tools/test/h5dump/errfiles/{ => pbits}/tpbitsIncomplete.err (100%)
rename tools/test/h5dump/errfiles/{ => pbits}/tpbitsIntLengthExceeded.err (100%)
rename tools/test/h5dump/errfiles/{ => pbits}/tpbitsIntOffsetExceeded.err (100%)
rename tools/test/h5dump/errfiles/{ => pbits}/tpbitsLengthExceeded.err (100%)
rename tools/test/h5dump/errfiles/{ => pbits}/tpbitsLengthPositive.err (100%)
rename tools/test/h5dump/errfiles/{ => pbits}/tpbitsLongLengthExceeded.err (100%)
rename tools/test/h5dump/errfiles/{ => pbits}/tpbitsLongOffsetExceeded.err (100%)
rename tools/test/h5dump/errfiles/{ => pbits}/tpbitsMaxExceeded.err (100%)
rename tools/test/h5dump/errfiles/{ => pbits}/tpbitsOffsetExceeded.err (100%)
rename tools/test/h5dump/errfiles/{ => pbits}/tpbitsOffsetNegative.err (100%)
rename tools/{testfiles => test/h5dump/expected}/charsets.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/err_attr_dspace.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/file_space.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/filter_fail.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/h5dump-help.txt (100%)
rename tools/{testfiles => test/h5dump/expected}/non_existing.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/out3.h5import (100%)
rename tools/{testfiles => test/h5dump/expected}/packedbits.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tnofilename-with-packed-bits.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsArray.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsCharLengthExceeded.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsCharOffsetExceeded.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsCompound.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsIncomplete.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsIntLengthExceeded.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsIntOffsetExceeded.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsLengthExceeded.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsLengthPositive.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsLongLengthExceeded.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsLongOffsetExceeded.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsMax.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsMaxExceeded.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsOffsetExceeded.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsOffsetNegative.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsOverlapped.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsSigned.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsSigned2.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsSigned4.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsSignedInt.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsSignedInt4.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsSignedInt8.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsSignedIntWhole.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsSignedLong.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsSignedLong16.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsSignedLong8.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsSignedLongLong.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsSignedLongLong16.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsSignedLongLong32.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsSignedLongLongWhole.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsSignedLongLongWhole1.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsSignedLongLongWhole63.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsSignedLongWhole.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsSignedWhole.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsUnsigned.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsUnsigned2.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsUnsigned4.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsUnsignedInt.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsUnsignedInt4.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsUnsignedInt8.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsUnsignedIntWhole.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsUnsignedLong.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsUnsignedLong16.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsUnsignedLong8.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsUnsignedLongLong.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsUnsignedLongLong16.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsUnsignedLongLong32.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsUnsignedLongLongWhole.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsUnsignedLongLongWhole1.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsUnsignedLongLongWhole63.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsUnsignedLongWhole.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/pbits/tpbitsUnsignedWhole.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tall-1.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tall-2.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tall-2A.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tall-2A0.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tall-2B.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tall-3.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tall-4s.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tall-5s.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tall-6.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tall-7.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tall-7N.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tallfilters.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tarray1.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tarray1_big.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tarray2.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tarray3.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tarray4.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tarray5.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tarray6.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tarray7.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tarray8.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tattr-1.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tattr-2.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tattr-3.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tattr-4_be.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tattrcontents1.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tattrcontents2.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tattrintsize.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tattrreg.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tattrregR.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tbigdims.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tbin1.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tbin2.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tbin3.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tbin4.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tbinregR.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tbitnopaque_be.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tbitnopaque_le.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tboot1.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tboot2.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tboot2A.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tboot2B.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tchar1.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tchunked.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tcmpdattrintsize.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tcmpdintarray.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tcmpdints.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tcmpdintsize.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tcomp-1.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tcomp-2.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tcomp-3.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tcomp-4.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tcompact.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tcompound_complex2.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tcontents.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tcontiguos.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tdatareg.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tdataregR.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tdeflate.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tdset-1.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tdset-2.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tdset-3s.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tempty.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/texceedsubblock.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/texceedsubcount.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/texceedsubstart.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/texceedsubstride.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/texternal.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/textlink.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/textlinkfar.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/textlinksrc.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tfamily.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tfill.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tfletcher32.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tfloatsattrs.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tfloatsattrs.wddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tfpformat.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tgroup-1.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tgroup-2.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tgrp_comments.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tgrpnullspace.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/thlink-1.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/thlink-2.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/thlink-3.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/thlink-4.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/thlink-5.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/thyperslab.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tindicesno.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tindicessub1.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tindicessub2.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tindicessub3.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tindicessub4.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tindicesyes.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tints4dims.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tints4dimsBlock2.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tints4dimsBlockEq.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tints4dimsCount2.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tints4dimsCountEq.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tints4dimsStride2.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tintsattrs.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tintsnodata.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tlarge_objname.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tldouble.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tldouble_scalar.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tlonglinks.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tloop-1.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tmulti.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tmultifile.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tnamed_dtype_attr.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tnbit.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tnestcomp-1.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tnestedcmpddt.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tno-subset.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tnoattrdata.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tnoattrddl.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tnodata.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tnoddl.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tnoddlfile.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tnullspace.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/torderattr1.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/torderattr2.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/torderattr3.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/torderattr4.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tordercontents1.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tordercontents2.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tordergr1.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tordergr2.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tordergr3.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tordergr4.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tordergr5.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/torderlinks1.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/torderlinks2.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tperror.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tqmarkfile.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/trawdatafile.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/trawssetfile.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/treadfilter.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/treadintfilter.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/trefer_attrR.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/trefer_compatR.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/trefer_extR.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/trefer_grpR.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/trefer_objR.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/trefer_obj_delR.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/trefer_paramR.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/trefer_regR.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/trefer_reg_1dR.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/treference.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tsaf.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tscalarattrintsize.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tscalarintattrsize.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tscalarintsize.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tscalarstring.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tscaleoffset.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tshuffle.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tslink-1.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tslink-2.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tslink-D.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tsplit_file.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tst_onion_dset_1d.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tst_onion_dset_ext.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tst_onion_objs.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tst_onion_revision_count.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tstarfile.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tstr-1.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tstr-2.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tstring.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tstring2.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tstringe.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tszip.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tudfilter.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tudlink-1.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tudlink-2.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tuserfilter.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tvldtypes1.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tvldtypes2.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tvldtypes3.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tvldtypes4.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tvldtypes5.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tvlenstr_array.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tvlstr.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/tvms.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/twidedisplay.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/twithddlfile.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/vds/tvds-1.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/vds/tvds-2.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/vds/tvds-3_1.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/vds/tvds-3_2.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/vds/tvds-4.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/vds/tvds-5.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/vds/tvds_layout-1.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/vds/tvds_layout-2.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/vds/tvds_layout-3_1.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/vds/tvds_layout-3_2.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/vds/tvds_layout-4.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/vds/tvds_layout-5.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/vds/vds-first.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/vds/vds-gap1.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/vds/vds-gap2.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/vds/vds_layout-eiger.ddl (100%)
rename tools/{testfiles => test/h5dump/expected}/vds/vds_layout-maxmin.ddl (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tall-2A.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tall.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tarray1.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tarray2.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tarray3.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tarray6.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tarray7.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tattr.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tbitfields_be.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tbitfields_le.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tcompound.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tcompound2.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tcompound_complex.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tdatareg.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tdset.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tdset2.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tempty-dtd-2.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tempty-dtd-uri.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tempty-dtd.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tempty-nons-2.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tempty-nons-uri.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tempty-nons.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tempty-ns-2.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tempty-ns.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tempty.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tenum.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/test35.nc.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/textlink.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tfpformat.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tgroup.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/thlink.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tloop.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tloop2.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tmany.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tname-amp.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tname-apos.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tname-gt.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tname-lt.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tname-quot.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tname-sp.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tnamed_dtype_attr.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tnestedcomp.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tnodata.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tnullspace.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tobjref.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/topaque.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/torderattr1.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/torderattr2.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/torderattr3.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/torderattr4.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tref-escapes-at.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tref-escapes.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tref.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tsaf.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tslink.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tstr.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tstr2.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tstring-at.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tstring.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tudlink.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tvldtypes1.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tvldtypes2.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tvldtypes3.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tvldtypes4.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tvldtypes5.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected/xml}/tvlstr.h5.xml (100%)
rename tools/{testfiles => test/h5dump/expected}/zerodim.ddl (100%)
rename tools/{testfiles => test/h5dump/exportfiles}/tall-6.exp (100%)
rename tools/{testfiles => test/h5dump/exportfiles}/tbinregR.exp (100%)
rename tools/{testfiles => test/h5dump/exportfiles}/tnoddlfile.exp (100%)
rename tools/{testfiles => test/h5dump/exportfiles}/trawdatafile.exp (100%)
rename tools/{testfiles => test/h5dump/exportfiles}/trawssetfile.exp (100%)
rename tools/{testfiles => test/h5dump/exportfiles}/tstr2bin2.exp (100%)
rename tools/{testfiles => test/h5dump/exportfiles}/tstr2bin6.exp (100%)
rename tools/{testfiles => test/h5dump/exportfiles}/twithddl.exp (100%)
rename tools/{testfiles => test/h5dump/exportfiles}/twithddlfile.exp (100%)
rename tools/{ => test/h5dump}/testfiles/charsets.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/err_attr_dspace.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/file_space.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/filter_fail.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/packedbits.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/t128bit_float.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tCVE-2021-37501_attr_decode.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tCVE_2018_11206_fill_new.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tCVE_2018_11206_fill_old.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/taindices.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tall.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tarray1.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tarray1_big.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tarray2.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tarray3.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tarray4.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tarray5.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tarray6.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tarray7.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tarray8.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tattr.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tattr2.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tattr4_be.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tattrintsize.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tattrreg.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tbigdims.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tbinary.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tbitnopaque.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tchar.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tcmpdattrintsize.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tcmpdintarray.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tcmpdints.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tcmpdintsize.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tcompound.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tcompound_complex.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tcompound_complex2.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tdatareg.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tdset.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tempty.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/textlink.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/textlinkfar.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/textlinksrc.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/textlinktar.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tfamily00000.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tfamily00001.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tfamily00002.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tfamily00003.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tfamily00004.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tfamily00005.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tfamily00006.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tfamily00007.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tfamily00008.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tfamily00009.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tfamily00010.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tfcontents1.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tfcontents2.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tfilters.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tfloatsattrs.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tfpformat.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tfvalues.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tgroup.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tgrp_comments.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tgrpnullspace.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/thlink.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/thyperslab.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tints4dims.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tintsattrs.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tintsnodata.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tlarge_objname.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tldouble.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tldouble_scalar.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tlonglinks.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tloop.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tmulti-b.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tmulti-g.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tmulti-l.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tmulti-o.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tmulti-r.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tmulti-s.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tnamed_dtype_attr.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tnestedcmpddt.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tnestedcomp.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tno-subset.h5 (100%)
create mode 100644 tools/test/h5dump/testfiles/tnullspace.h5
rename tools/{ => test/h5dump}/testfiles/torderattr.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tordergr.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/trefer_attr.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/trefer_compat.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/trefer_ext1.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/trefer_ext2.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/trefer_grp.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/trefer_obj.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/trefer_obj_del.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/trefer_param.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/trefer_reg.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/trefer_reg_1d.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tsaf.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tscalarattrintsize.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tscalarintattrsize.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tscalarintsize.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tscalarstring.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tslink.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tsoftlinks.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tsplit_file-m.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tsplit_file-r.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tst_onion_dset_1d.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tst_onion_dset_1d.h5.onion (100%)
rename tools/{ => test/h5dump}/testfiles/tst_onion_dset_ext.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tst_onion_dset_ext.h5.onion (100%)
rename tools/{ => test/h5dump}/testfiles/tst_onion_objs.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tst_onion_objs.h5.onion (100%)
rename tools/{ => test/h5dump}/testfiles/tstr.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tstr2.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tstr3.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tudfilter.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tudlink.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tvldtypes1.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tvldtypes2.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tvldtypes3.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tvldtypes4.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tvldtypes5.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tvlenstr_array.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tvlstr.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/tvms.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/vds/1_a.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/vds/1_b.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/vds/1_c.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/vds/1_d.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/vds/1_e.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/vds/1_f.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/vds/1_vds.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/vds/2_a.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/vds/2_b.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/vds/2_c.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/vds/2_d.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/vds/2_e.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/vds/2_vds.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/vds/3_1_vds.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/vds/3_2_vds.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/vds/4_0.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/vds/4_1.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/vds/4_2.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/vds/4_vds.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/vds/5_a.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/vds/5_b.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/vds/5_c.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/vds/5_vds.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/vds/a.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/vds/b.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/vds/c.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/vds/d.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/vds/f-0.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/vds/f-3.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/vds/vds-eiger.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/vds/vds-percival-unlim-maxmin.h5 (100%)
rename tools/{testfiles => test/h5dump/testfiles/xml}/tbitfields.h5 (100%)
rename tools/{testfiles => test/h5dump/testfiles/xml}/tcompound2.h5 (100%)
rename tools/{testfiles => test/h5dump/testfiles/xml}/tdset2.h5 (100%)
rename tools/{testfiles => test/h5dump/testfiles/xml}/tenum.h5 (100%)
rename tools/{testfiles => test/h5dump/testfiles/xml}/test35.nc (100%)
rename tools/{testfiles => test/h5dump/testfiles/xml}/tloop2.h5 (100%)
rename tools/{testfiles => test/h5dump/testfiles/xml}/tmany.h5 (100%)
rename tools/{testfiles => test/h5dump/testfiles/xml}/tname-amp.h5 (100%)
rename tools/{testfiles => test/h5dump/testfiles/xml}/tname-apos.h5 (100%)
rename tools/{testfiles => test/h5dump/testfiles/xml}/tname-gt.h5 (100%)
rename tools/{testfiles => test/h5dump/testfiles/xml}/tname-lt.h5 (100%)
rename tools/{testfiles => test/h5dump/testfiles/xml}/tname-quot.h5 (100%)
rename tools/{testfiles => test/h5dump/testfiles/xml}/tname-sp.h5 (100%)
rename tools/{testfiles => test/h5dump/testfiles/xml}/tnodata.h5 (100%)
rename tools/{testfiles => test/h5dump/testfiles/xml}/tobjref.h5 (100%)
rename tools/{testfiles => test/h5dump/testfiles/xml}/topaque.h5 (100%)
rename tools/{testfiles => test/h5dump/testfiles/xml}/tref-escapes-at.h5 (100%)
rename tools/{testfiles => test/h5dump/testfiles/xml}/tref-escapes.h5 (100%)
rename tools/{testfiles => test/h5dump/testfiles/xml}/tref.h5 (100%)
rename tools/{testfiles => test/h5dump/testfiles/xml}/tstring-at.h5 (100%)
rename tools/{testfiles => test/h5dump/testfiles/xml}/tstring.h5 (100%)
rename tools/{ => test/h5dump}/testfiles/zerodim.h5 (100%)
rename tools/test/h5format_convert/{testfiles => expected}/h5fc_d_file-d.ddl (100%)
rename tools/test/h5format_convert/{testfiles => expected}/h5fc_d_file.ddl (100%)
rename tools/test/h5format_convert/{testfiles => expected}/h5fc_d_file.ddl.err (100%)
rename tools/test/h5format_convert/{testfiles => expected}/h5fc_dname.ddl (100%)
rename tools/test/h5format_convert/{testfiles => expected}/h5fc_dname.err (100%)
rename tools/test/h5format_convert/{testfiles => expected}/h5fc_ext1_f.ddl (100%)
rename tools/test/h5format_convert/{testfiles => expected}/h5fc_ext1_i.ddl (100%)
rename tools/test/h5format_convert/{testfiles => expected}/h5fc_ext1_s.ddl (100%)
rename tools/test/h5format_convert/{testfiles => expected}/h5fc_ext2_if.ddl (100%)
rename tools/test/h5format_convert/{testfiles => expected}/h5fc_ext2_is.ddl (100%)
rename tools/test/h5format_convert/{testfiles => expected}/h5fc_ext2_sf.ddl (100%)
rename tools/test/h5format_convert/{testfiles => expected}/h5fc_ext3_isf.ddl (100%)
rename tools/test/h5format_convert/{testfiles => expected}/h5fc_help.ddl (100%)
rename tools/test/h5format_convert/{testfiles => expected}/h5fc_nonexistdset_file.ddl.err (100%)
rename tools/test/h5format_convert/{testfiles => expected}/h5fc_nonexistfile.ddl.err (100%)
rename tools/test/h5format_convert/{testfiles => expected}/h5fc_nooption.ddl (100%)
rename tools/test/h5format_convert/{testfiles => expected}/h5fc_v_all.ddl (100%)
rename tools/test/h5format_convert/{testfiles => expected}/h5fc_v_bt1.ddl (100%)
rename tools/test/h5format_convert/{testfiles => expected}/h5fc_v_err.ddl (100%)
rename tools/test/h5format_convert/{testfiles => expected}/h5fc_v_err.ddl.err (100%)
rename tools/test/h5format_convert/{testfiles => expected}/h5fc_v_n_1d.ddl (100%)
rename tools/test/h5format_convert/{testfiles => expected}/h5fc_v_n_all.ddl (100%)
rename tools/test/h5format_convert/{testfiles => expected}/h5fc_v_ndata_bt1.ddl (100%)
rename tools/test/h5format_convert/{testfiles => expected}/h5fc_v_non_chunked.ddl (100%)
rename tools/test/h5format_convert/{testfiles => expected}/old_h5fc_ext1_f.ddl (100%)
rename tools/test/h5format_convert/{testfiles => expected}/old_h5fc_ext1_i.ddl (100%)
rename tools/test/h5format_convert/{testfiles => expected}/old_h5fc_ext1_s.ddl (100%)
rename tools/test/h5format_convert/{testfiles => expected}/old_h5fc_ext2_if.ddl (100%)
rename tools/test/h5format_convert/{testfiles => expected}/old_h5fc_ext2_is.ddl (100%)
rename tools/test/h5format_convert/{testfiles => expected}/old_h5fc_ext2_sf.ddl (100%)
rename tools/test/h5format_convert/{testfiles => expected}/old_h5fc_ext3_isf.ddl (100%)
rename tools/test/h5jam/{testfiles => expected}/h5jam-help.txt (100%)
rename tools/test/h5jam/{testfiles => expected}/h5jam-ub-nohdf5.txt (100%)
rename tools/test/h5jam/{testfiles => expected}/h5unjam-help.txt (100%)
rename tools/test/h5jam/{testfiles => expected}/u10.txt (100%)
rename tools/test/h5jam/{testfiles => expected}/u511.txt (100%)
rename tools/test/h5jam/{testfiles => expected}/u512.txt (100%)
rename tools/test/h5jam/{testfiles => expected}/u513.txt (100%)
rename tools/{testfiles => test/h5ls/expected}/help-1.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/help-2.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/help-3.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/nosuchfile.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/tall-1.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/tall-2.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/tarray1.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/tattr2.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/tattrreg_be.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/tattrreg_le.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/tcomp-1.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/tdataregbe.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/tdataregle.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/tdset-1.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/tdset_idx.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/tempty.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/textlink-1.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/textlinksrc-1-old.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/textlinksrc-1.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/textlinksrc-2-old.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/textlinksrc-2.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/textlinksrc-3-old.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/textlinksrc-3.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/textlinksrc-4.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/textlinksrc-5.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/textlinksrc-6-old.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/textlinksrc-6.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/textlinksrc-7-old.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/textlinksrc-7.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/textlinksrc-nodangle-1.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/textlinksrc-nodangle-2.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/tgroup-1.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/tgroup-2.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/tgroup-3.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/tgroup.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/tgrp_comments.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/tgrpnullspace.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/thlink-1.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/thlinks-nodangle-1.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/tloop-1.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/tmultifile.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/tnestcomp-1.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/tnestcomp-2.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/tnestcomp-3.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/tnestcomp-4.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/tsaf.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/tslink-1.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/tsoftlinks-1.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/tsoftlinks-2.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/tsoftlinks-3.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/tsoftlinks-4.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/tsoftlinks-5.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/tsoftlinks-nodangle-1.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/tstr-1.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/tudfilter.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/tudlink-1.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/tvldtypes1.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/tvldtypes2be.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/tvldtypes2le.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/vds/tvds-1.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/vds/tvds-2.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/vds/tvds-3_1.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/vds/tvds-3_2.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/vds/tvds-4.ls (100%)
rename tools/{testfiles => test/h5ls/expected}/vds/tvds-5.ls (100%)
rename tools/{ => test/h5ls}/testfiles/tdset_idx.h5 (100%)
rename tools/test/h5repack/{testfiles => expected}/1_vds.h5-vds_dset_chunk20x10x5-v.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/2_vds.h5-vds_chunk3x6x9-v.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/3_1_vds.h5-vds_chunk2x5x8-v.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/4_vds.h5-vds_compa-v.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/4_vds.h5-vds_conti-v.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/GS.h5repack_paged_nopersist.h5.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/S.h5repack_fsm_aggr_persist.h5.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/SP.h5repack_fsm_aggr_nopersist.h5.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/SP.h5repack_paged_persist.h5.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/SPT.h5repack_aggr.h5.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/STG.h5repack_none.h5.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/attrregion.tattrreg.h5.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/crtorder.tordergr.h5.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/dataregion.tdatareg.h5.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/deflate_limit.h5repack_layout.h5.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/h5copy_extlinks_src-base.h5copy_extlinks_src.h5.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/h5copy_extlinks_src-merge.h5copy_extlinks_src.h5.tst (100%)
rename tools/test/h5repack/{testfiles => expected}/h5copy_extlinks_src-mergeprune.h5copy_extlinks_src.h5.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/h5copy_extlinks_src-prune.h5copy_extlinks_src.h5.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/h5repack-help.txt (100%)
rename tools/test/h5repack/{testfiles => expected}/h5repack_filters.h5-gzip_verbose_filters.tst (100%)
rename tools/test/h5repack/{testfiles => expected}/h5repack_layout.UD.h5-plugin_none.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/h5repack_layout.h5-dset2_chunk_20x10-errstk.tst (100%)
rename tools/test/h5repack/{testfiles => expected}/h5repack_layout.h5-plugin_test.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/h5repack_layout.h5-plugin_version_test.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/h5repack_layout.h5-plugin_zero.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/h5repack_layout.h5.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/onion.tst_onion_dset_1d.h5.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/onion.tst_onion_dset_ext.h5.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/onion.tst_onion_objs.h5.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/plugin_none.h5repack_layout.UD.h5.tst (100%)
rename tools/test/h5repack/{testfiles => expected}/plugin_test.h5repack_layout.h5.tst (100%)
rename tools/test/h5repack/{testfiles => expected}/plugin_version_test.h5repack_layout.h5.tst (100%)
rename tools/test/h5repack/{testfiles => expected}/plugin_zero.h5repack_layout.h5.tst (100%)
rename tools/test/h5repack/{testfiles => expected}/textlink-base.textlink.h5.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/textlink-merge.textlink.h5.tst (100%)
rename tools/test/h5repack/{testfiles => expected}/textlink-mergeprune.textlink.h5.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/textlink-prune.textlink.h5.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/textlinkfar-base.textlinkfar.h5.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/textlinkfar-merge.textlinkfar.h5.tst (100%)
rename tools/test/h5repack/{testfiles => expected}/textlinkfar-mergeprune.textlinkfar.h5.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/textlinkfar-prune.textlinkfar.h5.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/textlinksrc-base.textlinksrc.h5.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/textlinksrc-merge.textlinksrc.h5.tst (100%)
rename tools/test/h5repack/{testfiles => expected}/textlinksrc-mergeprune.textlinksrc.h5.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/textlinksrc-prune.textlinksrc.h5.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/textlinktar-base.textlinktar.h5.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/textlinktar-merge.textlinktar.h5.tst (100%)
rename tools/test/h5repack/{testfiles => expected}/textlinktar-mergeprune.textlinktar.h5.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/textlinktar-prune.textlinktar.h5.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/tsoftlinks-base.tsoftlinks.h5.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/tsoftlinks-merge.tsoftlinks.h5.tst (100%)
rename tools/test/h5repack/{testfiles => expected}/tsoftlinks-mergeprune.tsoftlinks.h5.ddl (100%)
rename tools/test/h5repack/{testfiles => expected}/tsoftlinks-prune.tsoftlinks.h5.ddl (100%)
delete mode 100644 tools/test/h5repack/testfiles/h5copy_extlinks_src.h5
delete mode 100644 tools/test/h5repack/testfiles/h5copy_extlinks_trg.h5
rename tools/test/h5stat/{testfiles => expected}/h5stat_dims1.ddl (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_dims2.ddl (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_err1_dims.err (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_err1_links.err (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_err1_numattrs.err (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_err2_numattrs.err (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_err_old_fill.ddl (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_err_old_fill.err (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_err_old_layout.ddl (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_err_old_layout.err (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_err_refcount.ddl (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_err_refcount.err (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_filters-F.ddl (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_filters-UD.ddl (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_filters-UT.ddl (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_filters-d.ddl (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_filters-dT.ddl (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_filters-file.ddl (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_filters-g.ddl (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_filters.ddl (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_help1.ddl (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_help2.ddl (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_idx.ddl (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_links1.ddl (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_links2.ddl (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_links3.ddl (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_links4.ddl (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_links5.ddl (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_newgrat-UA.ddl (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_newgrat-UG.ddl (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_newgrat.ddl (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_nofile.ddl (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_nofile.err (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_notexist.ddl (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_notexist.err (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_numattrs1.ddl (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_numattrs2.ddl (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_numattrs3.ddl (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_numattrs4.ddl (100%)
rename tools/test/h5stat/{testfiles => expected}/h5stat_tsohm.ddl (100%)
rename tools/test/misc/{testfiles => expected}/h5clear_equal_after_size.ddl (100%)
rename tools/test/misc/{testfiles => expected}/h5clear_equal_before_size.ddl (100%)
rename tools/test/misc/{testfiles => expected}/h5clear_greater_after_size.ddl (100%)
rename tools/test/misc/{testfiles => expected}/h5clear_greater_before_size.ddl (100%)
rename tools/test/misc/{testfiles => expected}/h5clear_less_after_size.ddl (100%)
rename tools/test/misc/{testfiles => expected}/h5clear_less_before_size.ddl (100%)
rename tools/test/misc/{testfiles => expected}/h5clear_missing_file.ddl (100%)
rename tools/test/misc/{testfiles => expected}/h5clear_missing_file.err (100%)
rename tools/test/misc/{testfiles => expected}/h5clear_no_mdc_image.err (100%)
rename tools/test/misc/{testfiles => expected}/h5clear_noclose_after_size.ddl (100%)
rename tools/test/misc/{testfiles => expected}/h5clear_noclose_before_size.ddl (100%)
rename tools/test/misc/{testfiles => expected}/h5clear_open_fail.err (100%)
rename tools/test/misc/{testfiles => expected}/h5clear_status_noclose_after_size.ddl (100%)
rename tools/test/misc/{testfiles => expected}/h5clear_usage.ddl (100%)
rename tools/test/misc/{testfiles => expected}/h5clear_user_equal_after_size.ddl (100%)
rename tools/test/misc/{testfiles => expected}/h5clear_user_equal_before_size.ddl (100%)
rename tools/test/misc/{testfiles => expected}/h5clear_user_greater_after_size.ddl (100%)
rename tools/test/misc/{testfiles => expected}/h5clear_user_greater_before_size.ddl (100%)
rename tools/test/misc/{testfiles => expected}/h5clear_user_less_after_size.ddl (100%)
rename tools/test/misc/{testfiles => expected}/h5clear_user_less_before_size.ddl (100%)
rename tools/test/misc/{testfiles => expected}/h5mkgrp_help.txt (100%)
rename tools/{testfiles => test/misc/expected}/h5mkgrp_nested_lp.ls (100%)
rename tools/{testfiles => test/misc/expected}/h5mkgrp_nested_mult_lp.ls (100%)
rename tools/{testfiles => test/misc/expected}/h5mkgrp_nested_mult_p.ls (100%)
rename tools/{testfiles => test/misc/expected}/h5mkgrp_nested_p.ls (100%)
rename tools/{testfiles => test/misc/expected}/h5mkgrp_several.ls (100%)
rename tools/{testfiles => test/misc/expected}/h5mkgrp_several_l.ls (100%)
rename tools/{testfiles => test/misc/expected}/h5mkgrp_several_p.ls (100%)
rename tools/{testfiles => test/misc/expected}/h5mkgrp_several_v.ls (100%)
rename tools/{testfiles => test/misc/expected}/h5mkgrp_single.ls (100%)
rename tools/{testfiles => test/misc/expected}/h5mkgrp_single_l.ls (100%)
rename tools/{testfiles => test/misc/expected}/h5mkgrp_single_p.ls (100%)
rename tools/{testfiles => test/misc/expected}/h5mkgrp_single_v.ls (100%)
rename tools/{ => test/misc}/testfiles/family_file00000.h5 (100%)
rename tools/{ => test/misc}/testfiles/family_file00001.h5 (100%)
rename tools/{ => test/misc}/testfiles/family_file00002.h5 (100%)
rename tools/{ => test/misc}/testfiles/family_file00003.h5 (100%)
rename tools/{ => test/misc}/testfiles/family_file00004.h5 (100%)
rename tools/{ => test/misc}/testfiles/family_file00005.h5 (100%)
rename tools/{ => test/misc}/testfiles/family_file00006.h5 (100%)
rename tools/{ => test/misc}/testfiles/family_file00007.h5 (100%)
rename tools/{ => test/misc}/testfiles/family_file00008.h5 (100%)
rename tools/{ => test/misc}/testfiles/family_file00009.h5 (100%)
rename tools/{ => test/misc}/testfiles/family_file00010.h5 (100%)
rename tools/{ => test/misc}/testfiles/family_file00011.h5 (100%)
rename tools/{ => test/misc}/testfiles/family_file00012.h5 (100%)
rename tools/{ => test/misc}/testfiles/family_file00013.h5 (100%)
rename tools/{ => test/misc}/testfiles/family_file00014.h5 (100%)
rename tools/{ => test/misc}/testfiles/family_file00015.h5 (100%)
rename tools/{ => test/misc}/testfiles/family_file00016.h5 (100%)
rename tools/{ => test/misc}/testfiles/family_file00017.h5 (100%)
delete mode 100644 utils/tools/h5dwalk/h5dwalk.1
diff --git a/.github/workflows/autotools.yml b/.github/workflows/autotools.yml
new file mode 100644
index 00000000000..ddc1a39d5e2
--- /dev/null
+++ b/.github/workflows/autotools.yml
@@ -0,0 +1,54 @@
+name: hdf5 1.14 autools CI
+
+# Controls when the action will run. Triggers the workflow on push or pull request
+on:
+ workflow_call:
+
+permissions:
+ contents: read
+
+# A workflow run is made up of one or more jobs that can run sequentially or
+# in parallel. We just have one job, but the matrix items defined below will
+# run in parallel.
+jobs:
+ call-workflow-special-autotools:
+ name: "Autotools Special Workflows"
+ uses: ./.github/workflows/main-auto-spc.yml
+
+ call-parallel-special-autotools:
+ name: "Autotools Parallel Special Workflows"
+ uses: ./.github/workflows/main-auto-par.yml
+
+ call-debug-thread-autotools:
+ name: "Autotools Debug Thread-Safety Workflows"
+ uses: ./.github/workflows/main-auto.yml
+ with:
+ thread_safety: enable
+ build_mode: "debug"
+
+ call-release-thread-autotools:
+ name: "Autotools Release Thread-Safety Workflows"
+ uses: ./.github/workflows/main-auto.yml
+ with:
+ thread_safety: enable
+ build_mode: "production"
+
+ call-debug-autotools:
+ name: "Autotools Debug Workflows"
+ uses: ./.github/workflows/main-auto.yml
+ with:
+ thread_safety: disable
+ build_mode: "debug"
+
+ call-release-autotools:
+ name: "Autotools Release Workflows"
+ uses: ./.github/workflows/main-auto.yml
+ with:
+ thread_safety: disable
+ build_mode: "production"
+
+ call-release-auto-intel:
+ name: "Autotools Intel Workflows"
+ uses: ./.github/workflows/intel-auto.yml
+ with:
+ build_mode: "production"
diff --git a/.github/workflows/clang-format-check.yml b/.github/workflows/clang-format-check.yml
index 56d2b48c3be..cde27c1bd29 100644
--- a/.github/workflows/clang-format-check.yml
+++ b/.github/workflows/clang-format-check.yml
@@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip-ci')"
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Run clang-format style check for C and Java code
uses: DoozyX/clang-format-lint-action@v0.13
with:
diff --git a/.github/workflows/clang-format-fix.yml b/.github/workflows/clang-format-fix.yml
index 59811181f9b..d701d23a70f 100644
--- a/.github/workflows/clang-format-fix.yml
+++ b/.github/workflows/clang-format-fix.yml
@@ -21,7 +21,7 @@ jobs:
permissions:
contents: write # In order to allow EndBug/add-and-commit to commit changes
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Fix C and Java formatting issues detected by clang-format
uses: DoozyX/clang-format-lint-action@v0.13
with:
diff --git a/.github/workflows/cmake-ctest.yml b/.github/workflows/cmake-ctest.yml
index 3c70954c0b3..c647ccaf382 100644
--- a/.github/workflows/cmake-ctest.yml
+++ b/.github/workflows/cmake-ctest.yml
@@ -1,6 +1,6 @@
name: hdf5 1.14 ctest runs
-# Controls when the action will run. Triggers the workflow on a schedule
+# Controls when the action will run. Triggers the workflow on a call
on:
workflow_call:
inputs:
diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml
new file mode 100644
index 00000000000..4ca4f681612
--- /dev/null
+++ b/.github/workflows/cmake.yml
@@ -0,0 +1,46 @@
+name: hdf5 1.14 cmake CI
+
+# Controls when the action will run. Triggers the workflow on push or pull request
+on:
+ workflow_call:
+
+permissions:
+ contents: read
+
+# A workflow run is made up of one or more jobs that can run sequentially or
+# in parallel. We just have one job, but the matrix items defined below will
+# run in parallel.
+jobs:
+ call-debug-thread-cmake:
+ name: "CMake Debug Thread-Safety Workflows"
+ uses: ./.github/workflows/main-cmake.yml
+ with:
+ thread_safety: true
+ build_mode: "Debug"
+
+ call-release-thread-cmake:
+ name: "CMake Release Thread-Safety Workflows"
+ uses: ./.github/workflows/main-cmake.yml
+ with:
+ thread_safety: true
+ build_mode: "Release"
+
+ call-debug-cmake:
+ name: "CMake Debug Workflows"
+ uses: ./.github/workflows/main-cmake.yml
+ with:
+ thread_safety: false
+ build_mode: "Debug"
+
+ call-release-cmake:
+ name: "CMake Release Workflows"
+ uses: ./.github/workflows/main-cmake.yml
+ with:
+ thread_safety: false
+ build_mode: "Release"
+
+ call-release-cmake-intel:
+ name: "CMake Intel Workflows"
+ uses: ./.github/workflows/intel-cmake.yml
+ with:
+ build_mode: "Release"
diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml
index 5640224abac..e39af687156 100644
--- a/.github/workflows/codespell.yml
+++ b/.github/workflows/codespell.yml
@@ -10,7 +10,7 @@ jobs:
name: Check for spelling errors
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- uses: codespell-project/actions-codespell@master
with:
skip: ./.github/workflows/codespell.yml,./bin/trace,./hl/tools/h5watch/h5watch.c,./tools/test/h5jam/tellub.c,./config/sanitizer/LICENSE,./config/sanitizer/sanitizers.cmake,./tools/test/h5repack/testfiles/*.dat,./test/API/driver,./configure,./bin/ltmain.sh,./bin/depcomp,./bin/config.guess,./bin/config.sub,./autom4te.cache,./m4/libtool.m4,./c++/src/*.html
diff --git a/.github/workflows/cve.yml b/.github/workflows/cve.yml
new file mode 100644
index 00000000000..54dc2994b79
--- /dev/null
+++ b/.github/workflows/cve.yml
@@ -0,0 +1,51 @@
+name: cve 1.14
+
+on:
+ workflow_dispatch:
+ push:
+ pull_request:
+ branches: [ hdf5_1_14 ]
+ paths-ignore:
+ - '.github/CODEOWNERS'
+ - '.github/FUNDING.yml'
+ - 'doc/**'
+ - 'release_docs/**'
+ - 'ACKNOWLEDGEMENTS'
+ - 'COPYING**'
+ - '**.md'
+
+# Using concurrency to cancel any in-progress job or run
+concurrency:
+ group: ${{ github.workflow }}-${{ github.sha || github.event.pull_request.number }}
+ cancel-in-progress: true
+
+permissions:
+ contents: read
+
+jobs:
+ build:
+ name: CVE regression
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Install Autotools Dependencies (Linux)
+ run: |
+ sudo apt update
+ sudo apt install automake autoconf libtool libtool-bin
+ - name: Install HDF5
+ run: |
+ ./autogen.sh
+ ./configure --prefix=/usr/local --disable-tests
+ make
+ sudo make install
+ - name: Checkout CVE test repository
+ uses: actions/checkout@v4
+ with:
+ repository: HDFGroup/cve_hdf5
+ path: cve_hdf5
+ - name: Run regression tests
+ run: |
+ cd cve_hdf5
+ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"
+ ./test_hdf5_cve.sh /usr/local/bin ./cve_out
diff --git a/.github/workflows/daily-build.yml b/.github/workflows/daily-build.yml
index 6f7655b599d..fadf6ff7c46 100644
--- a/.github/workflows/daily-build.yml
+++ b/.github/workflows/daily-build.yml
@@ -3,6 +3,8 @@ name: hdf5 1.14 daily build
# Controls when the action will run. Triggers the workflow on a schedule
on:
workflow_dispatch:
+ schedule:
+ - cron: "6 0 * * *"
permissions:
contents: read
diff --git a/.github/workflows/hdfeos5.yml b/.github/workflows/hdfeos5.yml
index 5b071b1becc..0332c9d7fb2 100644
--- a/.github/workflows/hdfeos5.yml
+++ b/.github/workflows/hdfeos5.yml
@@ -27,7 +27,7 @@ jobs:
name: Build hdfeos5
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Install Autotools Dependencies (Linux)
run: |
diff --git a/.github/workflows/intel-auto.yml b/.github/workflows/intel-auto.yml
new file mode 100644
index 00000000000..ca6b047f597
--- /dev/null
+++ b/.github/workflows/intel-auto.yml
@@ -0,0 +1,97 @@
+name: hdf5 1.14 autotools icx CI
+
+on:
+ workflow_call:
+ inputs:
+ build_mode:
+ description: "release vs. debug build"
+ required: true
+ type: string
+
+permissions:
+ contents: read
+
+jobs:
+ Intel_build_and_test:
+ name: "Intel ${{ inputs.build_mode }} -Werror (build only)"
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: Install Dependencies
+ run: |
+ sudo apt-get update
+ sudo apt-get install autoconf automake libtool libtool-bin libaec-dev
+ - name: Add oneAPI to apt
+ shell: bash
+ run: |
+ cd /tmp
+ wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
+ sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
+ rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
+ sudo add-apt-repository -y "deb https://apt.repos.intel.com/oneapi all main"
+
+ - name: Install oneAPI dpcpp and fortran compiler
+ shell: bash
+ run: |
+ sudo apt update
+ sudo apt install -y intel-oneapi-compiler-dpcpp-cpp
+ sudo apt install -y intel-oneapi-compiler-fortran
+ sudo apt install -y intel-oneapi-mpi-devel
+ sudo apt-get install doxygen graphviz
+ sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev
+ echo "CC=icx" >> $GITHUB_ENV
+ echo "CXX=icpx" >> $GITHUB_ENV
+ echo "FC=ifx" >> $GITHUB_ENV
+
+ - name: Install oneAPI MKL library
+ shell: bash
+ run: |
+ sudo apt install -y intel-oneapi-mkl-devel
+
+ - name: Autotools Configure
+ shell: bash
+ run: |
+ source /opt/intel/oneapi/setvars.sh
+ export PATH=$PATH:/opt/intel/oneapi/compiler/2023.2.1/linux/bin
+ sh ./autogen.sh
+ mkdir "${{ runner.workspace }}/build"
+ cd "${{ runner.workspace }}/build"
+ $GITHUB_WORKSPACE/configure \
+ --enable-build-mode=${{ inputs.build_mode }} \
+ --enable-shared \
+ --disable-fortran
+
+ # BUILD
+ - name: Autotools Build
+ run: |
+ source /opt/intel/oneapi/setvars.sh
+ export PATH=$PATH:/opt/intel/oneapi/compiler/2023.2.1/linux/bin
+ make -j3
+ working-directory: ${{ runner.workspace }}/build
+
+ # RUN TESTS
+ # NORMAL
+ - name: Autotools Run Tests
+ run: |
+ source /opt/intel/oneapi/setvars.sh
+ export PATH=$PATH:/opt/intel/oneapi/compiler/2023.2.1/linux/bin
+ export SYCL_DEVICE_FILTER=opencl.cpu
+ make check -j2
+ working-directory: ${{ runner.workspace }}/build
+
+ # INSTALL (note that this runs even when we don't run the tests)
+ - name: Autotools Install
+ run: |
+ source /opt/intel/oneapi/setvars.sh
+ export PATH=$PATH:/opt/intel/oneapi/compiler/2023.2.1/linux/bin
+ export SYCL_DEVICE_FILTER=opencl.cpu
+ make install
+ working-directory: ${{ runner.workspace }}/build
+
+ - name: Autotools Verify Install
+ run: |
+ source /opt/intel/oneapi/setvars.sh
+ export PATH=$PATH:/opt/intel/oneapi/compiler/2023.2.1/linux/bin
+ export SYCL_DEVICE_FILTER=opencl.cpu
+ make check-install
+ working-directory: ${{ runner.workspace }}/build
diff --git a/.github/workflows/intel-cmake.yml b/.github/workflows/intel-cmake.yml
new file mode 100644
index 00000000000..22db843aa95
--- /dev/null
+++ b/.github/workflows/intel-cmake.yml
@@ -0,0 +1,81 @@
+name: hdf5 1.14 CMake icx CI
+
+# Controls when the action will run. Triggers the workflow on a call
+on:
+ workflow_call:
+ inputs:
+ build_mode:
+ description: "release vs. debug build"
+ required: true
+ type: string
+
+permissions:
+ contents: read
+
+jobs:
+ Intel_build_and_test:
+ name: "Intel ${{ inputs.build_mode }} -Werror (build only)"
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: add oneAPI to apt
+ shell: bash
+ run: |
+ cd /tmp
+ wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
+ sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
+ rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
+ sudo add-apt-repository -y "deb https://apt.repos.intel.com/oneapi all main"
+
+ - name: Install Linux Dependencies
+ run: |
+ sudo apt update
+ sudo apt-get install ninja-build doxygen graphviz
+ sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev
+
+ - name: install oneAPI dpcpp and fortran compiler
+ shell: bash
+ run: |
+ sudo apt update
+ sudo apt install -y intel-oneapi-compiler-dpcpp-cpp
+ sudo apt install -y intel-oneapi-compiler-fortran
+
+ - name: install oneAPI MKL library
+ shell: bash
+ run: |
+ sudo apt install -y intel-oneapi-mkl-devel
+
+ - name: CMake Configure with icx
+ shell: bash
+ run: |
+ source /opt/intel/oneapi/setvars.sh
+ export PATH=$PATH:/opt/intel/oneapi/compiler/2023.2.1/linux/bin
+ mkdir "${{ runner.workspace }}/build"
+ cd "${{ runner.workspace }}/build"
+ cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake -G Ninja \
+ -DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} \
+ -DCMAKE_TOOLCHAIN_FILE=config/toolchain/intel.cmake \
+ -DMKL_ROOT="/opt/intel/oneapi/mkl/latest" \
+ -DTBB_ROOT="/opt/intel/oneapi/tbb/latest" \
+ -DLIBAEC_USE_LOCALCONTENT=OFF \
+ -DZLIB_USE_LOCALCONTENT=OFF \
+ -DHDF5_BUILD_FORTRAN=OFF \
+ $GITHUB_WORKSPACE
+
+ # BUILD
+ - name: CMake Build
+ shell: bash
+ run: |
+ source /opt/intel/oneapi/setvars.sh
+ cmake --build . --parallel 3 --config ${{ inputs.build_mode }}
+ working-directory: ${{ runner.workspace }}/build
+
+ # RUN TESTS
+ - name: CMake Run Tests
+ shell: bash
+ run: |
+ source /opt/intel/oneapi/setvars.sh
+ export SYCL_DEVICE_FILTER=opencl.cpu
+ ctest . --parallel 2 -C ${{ inputs.build_mode }} -V
+ working-directory: ${{ runner.workspace }}/build
diff --git a/.github/workflows/linux-nvhpc-auto.yml b/.github/workflows/linux-nvhpc-auto.yml
new file mode 100644
index 00000000000..fe6653e3b8b
--- /dev/null
+++ b/.github/workflows/linux-nvhpc-auto.yml
@@ -0,0 +1,58 @@
+name: linux autotools nvhpc
+
+on:
+ workflow_dispatch:
+ push:
+ pull_request:
+ branches: [ hdf5_1_14 ]
+ paths-ignore:
+ - '.github/CODEOWNERS'
+ - '.github/FUNDING.yml'
+ - 'doc/**'
+ - 'release_docs/**'
+ - 'ACKNOWLEDGEMENTS'
+ - 'COPYING**'
+ - '**.md'
+
+# Using concurrency to cancel any in-progress job or run
+concurrency:
+ group: ${{ github.workflow }}-${{ github.sha || github.event.pull_request.number }}
+ cancel-in-progress: true
+
+permissions:
+ contents: read
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Install System dependencies
+ run: |
+ sudo apt update
+ sudo apt install -y libaec-dev zlib1g-dev automake autoconf libcurl4-openssl-dev libjpeg-dev wget curl bzip2 m4 flex bison cmake libzip-dev doxygen openssl libtool libtool-bin build-essential
+ - name: Install NVHPC
+ run: |
+ curl https://developer.download.nvidia.com/hpc-sdk/ubuntu/DEB-GPG-KEY-NVIDIA-HPC-SDK | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg
+ echo 'deb [signed-by=/usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg] https://developer.download.nvidia.com/hpc-sdk/ubuntu/amd64 /' | sudo tee /etc/apt/sources.list.d/nvhpc.list
+ sudo apt-get update -y
+ sudo apt-get install -y nvhpc-23-7
+ - name: Get Sources
+ uses: actions/checkout@v4
+ - name: Test HDF5
+ env:
+ NPROCS: 2
+ run: |
+ export NVHPCSDK=/opt/nvidia/hpc_sdk
+ export OMPI_CXX=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/bin/nvc++
+ export OMPI_CC=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/bin/nvc
+ export OMPI_FC=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/bin/nvfortran
+ export LD_LIBRARY_PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/lib
+ export PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/comm_libs/openmpi4/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/bin:$PATH
+ export DESTDIR=/tmp
+ ./autogen.sh
+ ./configure CC=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/comm_libs/openmpi4/bin/mpicc FC=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/comm_libs/openmpi4/bin/mpifort FCFLAGS="-fPIC -fortranlibs" --enable-fortran --enable-shared --enable-parallel
+ cat config.log
+ make -j
+ make check -j
+ make install
+ make uninstall
diff --git a/.github/workflows/linux-nvhpc.yml b/.github/workflows/linux-nvhpc.yml
new file mode 100644
index 00000000000..17fa93c47d2
--- /dev/null
+++ b/.github/workflows/linux-nvhpc.yml
@@ -0,0 +1,56 @@
+name: linux CMake nvhpc
+
+on:
+ workflow_dispatch:
+ push:
+ pull_request:
+ branches: [ hdf5_1_14 ]
+ paths-ignore:
+ - '.github/CODEOWNERS'
+ - '.github/FUNDING.yml'
+ - 'doc/**'
+ - 'release_docs/**'
+ - 'ACKNOWLEDGEMENTS'
+ - 'COPYING**'
+ - '**.md'
+
+# Using concurrency to cancel any in-progress job or run
+concurrency:
+ group: ${{ github.workflow }}-${{ github.sha || github.event.pull_request.number }}
+ cancel-in-progress: true
+
+permissions:
+ contents: read
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Install System dependencies
+ run: |
+ sudo apt update
+ sudo apt install -y libaec-dev zlib1g-dev automake autoconf libcurl4-openssl-dev libjpeg-dev wget curl bzip2 m4 flex bison cmake libzip-dev doxygen openssl libtool libtool-bin build-essential
+ - name: Install NVHPC
+ run: |
+ curl https://developer.download.nvidia.com/hpc-sdk/ubuntu/DEB-GPG-KEY-NVIDIA-HPC-SDK | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg
+ echo 'deb [signed-by=/usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg] https://developer.download.nvidia.com/hpc-sdk/ubuntu/amd64 /' | sudo tee /etc/apt/sources.list.d/nvhpc.list
+ sudo apt-get update -y
+ sudo apt-get install -y nvhpc-23-7
+ - name: Get Sources
+ uses: actions/checkout@v4
+ - name: Test HDF5
+ env:
+ FC: nvfortran
+ CC: nvc
+ FCFLAGS: -fPIC
+ run: |
+ export NVHPCSDK=/opt/nvidia/hpc_sdk
+ export OMPI_CXX=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/bin/nvc++
+ export OMPI_CC=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/bin/nvc
+ export OMPI_FC=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/bin/nvfortran
+ export LD_LIBRARY_PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/cuda/12.2/lib64:/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/lib
+ export PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/comm_libs/openmpi4/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/bin:$PATH
+ cmake -B build -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF -DHDF5_ENABLE_PARALLEL:BOOL=ON -DHDF5_BUILD_FORTRAN:BOOL=ON
+ cat build/CMakeCache.txt
+ cmake --build build
+ ctest --test-dir build --output-on-failure
diff --git a/.github/workflows/main-auto-par.yml b/.github/workflows/main-auto-par.yml
new file mode 100644
index 00000000000..5c54f02eba2
--- /dev/null
+++ b/.github/workflows/main-auto-par.yml
@@ -0,0 +1,137 @@
+name: hdf5 1.14 autotools CI
+
+# Controls when the action will run. Triggers the workflow on a call
+on:
+ workflow_call:
+
+permissions:
+ contents: read
+
+# A workflow run is made up of one or more jobs that can run sequentially or
+# in parallel. We just have one job, but the matrix items defined below will
+# run in parallel.
+jobs:
+ #
+ # SPECIAL AUTOTOOLS BUILDS
+ #
+ # These do not run tests and are not built into the matrix and instead
+ # become NEW configs as their name would clobber one of the matrix
+ # names (so make sure the names are UNIQUE).
+ #
+
+ build_parallel_debug_werror:
+ name: "gcc DBG parallel -Werror (build only)"
+ runs-on: ubuntu-latest
+ steps:
+ # SETUP
+ # Only CMake need ninja-build, but we just install it unilaterally
+ # libssl, etc. are needed for the ros3 VFD
+ - name: Install Linux Dependencies
+ run: |
+ sudo apt update
+ sudo apt-get install ninja-build doxygen graphviz
+ sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev
+ sudo apt install gcc-12 g++-12 gfortran-12
+ sudo apt install automake autoconf libtool libtool-bin
+ sudo apt install libaec0 libaec-dev
+ sudo apt install openmpi-bin openmpi-common mpi-default-dev
+ echo "CC=mpicc" >> $GITHUB_ENV
+ echo "FC=mpif90" >> $GITHUB_ENV
+
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
+ - name: Get Sources
+ uses: actions/checkout@v4
+
+ # AUTOTOOLS CONFIGURE
+ - name: Autotools Configure
+ run: |
+ sh ./autogen.sh
+ mkdir "${{ runner.workspace }}/build"
+ cd "${{ runner.workspace }}/build"
+ CFLAGS=-Werror $GITHUB_WORKSPACE/configure \
+ --enable-build-mode=debug \
+ --enable-deprecated-symbols \
+ --with-default-api-version=v114 \
+ --enable-shared \
+ --enable-parallel \
+ --enable-subfiling-vfd \
+ --disable-cxx \
+ --disable-fortran \
+ --disable-java \
+ --disable-mirror-vfd \
+ --enable-direct-vfd \
+ --disable-ros3-vfd \
+ shell: bash
+
+ # BUILD
+ - name: Autotools Build
+ run: make -j3
+ working-directory: ${{ runner.workspace }}/build
+
+ # INSTALL (note that this runs even when we don't run the tests)
+ - name: Autotools Install
+ run: make install
+ working-directory: ${{ runner.workspace }}/build
+
+ - name: Autotools Verify Install
+ run: make check-install
+ working-directory: ${{ runner.workspace }}/build
+
+ build_parallel_release_werror:
+ name: "gcc REL parallel -Werror (build only)"
+ runs-on: ubuntu-latest
+ steps:
+ # SETUP
+ # Only CMake need ninja-build, but we just install it unilaterally
+ # libssl, etc. are needed for the ros3 VFD
+ - name: Install Linux Dependencies
+ run: |
+ sudo apt update
+ sudo apt-get install ninja-build doxygen graphviz
+ sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev
+ sudo apt install gcc-12 g++-12 gfortran-12
+ sudo apt install automake autoconf libtool libtool-bin
+ sudo apt install libaec0 libaec-dev
+ sudo apt install openmpi-bin openmpi-common mpi-default-dev
+ echo "CC=mpicc" >> $GITHUB_ENV
+ echo "FC=mpif90" >> $GITHUB_ENV
+
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
+ - name: Get Sources
+ uses: actions/checkout@v4
+
+ # AUTOTOOLS CONFIGURE
+ - name: Autotools Configure
+ run: |
+ sh ./autogen.sh
+ mkdir "${{ runner.workspace }}/build"
+ cd "${{ runner.workspace }}/build"
+ CFLAGS=-Werror $GITHUB_WORKSPACE/configure \
+ --enable-build-mode=production \
+ --enable-deprecated-symbols \
+ --with-default-api-version=v114 \
+ --enable-shared \
+ --enable-parallel \
+ --enable-subfiling-vfd \
+ --disable-cxx \
+ --disable-fortran \
+ --disable-java \
+ --disable-mirror-vfd \
+ --enable-direct-vfd \
+ --disable-ros3-vfd \
+ shell: bash
+
+ # BUILD
+ - name: Autotools Build
+ run: make -j3
+ working-directory: ${{ runner.workspace }}/build
+
+ # INSTALL (note that this runs even when we don't run the tests)
+ - name: Autotools Install
+ run: make install
+ working-directory: ${{ runner.workspace }}/build
+
+ - name: Autotools Verify Install
+ run: make check-install
+ working-directory: ${{ runner.workspace }}/build
+
diff --git a/.github/workflows/main-auto-spc.yml b/.github/workflows/main-auto-spc.yml
new file mode 100644
index 00000000000..4925a1811d5
--- /dev/null
+++ b/.github/workflows/main-auto-spc.yml
@@ -0,0 +1,509 @@
+name: hdf5 1.14 autotools special CI
+
+# Controls when the action will run. Triggers the workflow on a call
+on:
+ workflow_call:
+
+permissions:
+ contents: read
+
+# A workflow run is made up of one or more jobs that can run sequentially or
+# in parallel. We just have one job, but the matrix items defined below will
+# run in parallel.
+jobs:
+ #
+ # SPECIAL AUTOTOOLS BUILDS
+ #
+ # These do not run tests and are not built into the matrix and instead
+ # become NEW configs as their name would clobber one of the matrix
+ # names (so make sure the names are UNIQUE).
+ #
+
+ build_v1_6:
+ name: "gcc DBG v1.6 default API (build only)"
+ runs-on: ubuntu-latest
+ steps:
+ # SETUP
+ # Only CMake need ninja-build, but we just install it unilaterally
+ # libssl, etc. are needed for the ros3 VFD
+ - name: Install Linux Dependencies
+ run: |
+ sudo apt update
+ sudo apt-get install ninja-build doxygen graphviz
+ sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev
+ sudo apt install gcc-12 g++-12 gfortran-12
+ echo "CC=gcc-12" >> $GITHUB_ENV
+ echo "CXX=g++-12" >> $GITHUB_ENV
+ echo "FC=gfortran-12" >> $GITHUB_ENV
+
+ - name: Install Autotools Dependencies (Linux)
+ run: |
+ sudo apt install automake autoconf libtool libtool-bin
+ sudo apt install libaec0 libaec-dev
+
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
+ - name: Get Sources
+ uses: actions/checkout@v4
+
+ # AUTOTOOLS CONFIGURE
+ - name: Autotools Configure
+ run: |
+ sh ./autogen.sh
+ mkdir "${{ runner.workspace }}/build"
+ cd "${{ runner.workspace }}/build"
+ $GITHUB_WORKSPACE/configure \
+ --enable-build-mode=debug \
+ --enable-deprecated-symbols \
+ --with-default-api-version=v16 \
+ --enable-shared \
+ --disable-parallel \
+ --enable-cxx \
+ --enable-fortran \
+ --enable-java \
+ --enable-mirror-vfd \
+ --enable-direct-vfd \
+ --enable-ros3-vfd \
+ --with-szlib=yes
+ shell: bash
+
+ # BUILD
+ - name: Autotools Build
+ run: make -j3
+ working-directory: ${{ runner.workspace }}/build
+
+ # INSTALL (note that this runs even when we don't run the tests)
+ - name: Autotools Install
+ run: make install
+ working-directory: ${{ runner.workspace }}/build
+
+ - name: Autotools Verify Install
+ run: make check-install
+ working-directory: ${{ runner.workspace }}/build
+
+ build_v1_8:
+ name: "gcc DBG v1.8 default API (build only)"
+ runs-on: ubuntu-latest
+ steps:
+ # SETUP
+ # Only CMake need ninja-build, but we just install it unilaterally
+ # libssl, etc. are needed for the ros3 VFD
+ - name: Install Linux Dependencies
+ run: |
+ sudo apt update
+ sudo apt-get install ninja-build doxygen graphviz
+ sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev
+ sudo apt install gcc-12 g++-12 gfortran-12
+ echo "CC=gcc-12" >> $GITHUB_ENV
+ echo "CXX=g++-12" >> $GITHUB_ENV
+ echo "FC=gfortran-12" >> $GITHUB_ENV
+
+ - name: Install Autotools Dependencies (Linux)
+ run: |
+ sudo apt install automake autoconf libtool libtool-bin
+ sudo apt install libaec0 libaec-dev
+
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
+ - name: Get Sources
+ uses: actions/checkout@v4
+
+ # AUTOTOOLS CONFIGURE
+ - name: Autotools Configure
+ run: |
+ sh ./autogen.sh
+ mkdir "${{ runner.workspace }}/build"
+ cd "${{ runner.workspace }}/build"
+ $GITHUB_WORKSPACE/configure \
+ --enable-build-mode=debug \
+ --enable-deprecated-symbols \
+ --with-default-api-version=v18 \
+ --enable-shared \
+ --disable-parallel \
+ --enable-cxx \
+ --enable-fortran \
+ --enable-java \
+ --enable-mirror-vfd \
+ --enable-direct-vfd \
+ --enable-ros3-vfd \
+ --with-szlib=yes
+ shell: bash
+
+ # BUILD
+ - name: Autotools Build
+ run: make -j3
+ working-directory: ${{ runner.workspace }}/build
+
+ # INSTALL (note that this runs even when we don't run the tests)
+ - name: Autotools Install
+ run: make install
+ working-directory: ${{ runner.workspace }}/build
+
+ - name: Autotools Verify Install
+ run: make check-install
+ working-directory: ${{ runner.workspace }}/build
+
+ build_v1_10:
+ name: "gcc DBG v1.10 default API (build only)"
+ runs-on: ubuntu-latest
+ steps:
+ # SETUP
+ # Only CMake need ninja-build, but we just install it unilaterally
+ # libssl, etc. are needed for the ros3 VFD
+ - name: Install Linux Dependencies
+ run: |
+ sudo apt update
+ sudo apt-get install ninja-build doxygen graphviz
+ sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev
+ sudo apt install gcc-12 g++-12 gfortran-12
+ echo "CC=gcc-12" >> $GITHUB_ENV
+ echo "CXX=g++-12" >> $GITHUB_ENV
+ echo "FC=gfortran-12" >> $GITHUB_ENV
+
+ - name: Install Autotools Dependencies (Linux)
+ run: |
+ sudo apt install automake autoconf libtool libtool-bin
+ sudo apt install libaec0 libaec-dev
+
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
+ - name: Get Sources
+ uses: actions/checkout@v4
+
+ # AUTOTOOLS CONFIGURE
+ - name: Autotools Configure
+ run: |
+ sh ./autogen.sh
+ mkdir "${{ runner.workspace }}/build"
+ cd "${{ runner.workspace }}/build"
+ $GITHUB_WORKSPACE/configure \
+ --enable-build-mode=debug \
+ --enable-deprecated-symbols \
+ --with-default-api-version=v110 \
+ --enable-shared \
+ --disable-parallel \
+ --enable-cxx \
+ --enable-fortran \
+ --enable-java \
+ --enable-mirror-vfd \
+ --enable-direct-vfd \
+ --enable-ros3-vfd \
+ --with-szlib=yes
+ shell: bash
+
+ # BUILD
+ - name: Autotools Build
+ run: make -j3
+ working-directory: ${{ runner.workspace }}/build
+
+ # INSTALL (note that this runs even when we don't run the tests)
+ - name: Autotools Install
+ run: make install
+ working-directory: ${{ runner.workspace }}/build
+
+ - name: Autotools Verify Install
+ run: make check-install
+ working-directory: ${{ runner.workspace }}/build
+
+ build_v1_12:
+ name: "gcc DBG v1.12 default API (build only)"
+ runs-on: ubuntu-latest
+ steps:
+ # SETUP
+ # Only CMake need ninja-build, but we just install it unilaterally
+ # libssl, etc. are needed for the ros3 VFD
+ - name: Install Linux Dependencies
+ run: |
+ sudo apt update
+ sudo apt-get install ninja-build doxygen graphviz
+ sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev
+ sudo apt install gcc-12 g++-12 gfortran-12
+ echo "CC=gcc-12" >> $GITHUB_ENV
+ echo "CXX=g++-12" >> $GITHUB_ENV
+ echo "FC=gfortran-12" >> $GITHUB_ENV
+
+ - name: Install Autotools Dependencies (Linux)
+ run: |
+ sudo apt install automake autoconf libtool libtool-bin
+ sudo apt install libaec0 libaec-dev
+
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
+ - name: Get Sources
+ uses: actions/checkout@v4
+
+ # AUTOTOOLS CONFIGURE
+ - name: Autotools Configure
+ run: |
+ sh ./autogen.sh
+ mkdir "${{ runner.workspace }}/build"
+ cd "${{ runner.workspace }}/build"
+ $GITHUB_WORKSPACE/configure \
+ --enable-build-mode=debug \
+ --enable-deprecated-symbols \
+ --with-default-api-version=v112 \
+ --enable-shared \
+ --disable-parallel \
+ --enable-cxx \
+ --enable-fortran \
+ --enable-java \
+ --enable-mirror-vfd \
+ --enable-direct-vfd \
+ --enable-ros3-vfd \
+ --with-szlib=yes
+ shell: bash
+
+ # BUILD
+ - name: Autotools Build
+ run: make -j3
+ working-directory: ${{ runner.workspace }}/build
+
+ # INSTALL (note that this runs even when we don't run the tests)
+ - name: Autotools Install
+ run: make install
+ working-directory: ${{ runner.workspace }}/build
+
+ - name: Autotools Verify Install
+ run: make check-install
+ working-directory: ${{ runner.workspace }}/build
+
+ build_v1_14:
+ name: "gcc DBG v1.14 default API (build only)"
+ runs-on: ubuntu-latest
+ steps:
+ # SETUP
+ # Only CMake need ninja-build, but we just install it unilaterally
+ # libssl, etc. are needed for the ros3 VFD
+ - name: Install Linux Dependencies
+ run: |
+ sudo apt update
+ sudo apt-get install ninja-build doxygen graphviz
+ sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev
+ sudo apt install gcc-12 g++-12 gfortran-12
+ echo "CC=gcc-12" >> $GITHUB_ENV
+ echo "CXX=g++-12" >> $GITHUB_ENV
+ echo "FC=gfortran-12" >> $GITHUB_ENV
+
+ - name: Install Autotools Dependencies (Linux)
+ run: |
+ sudo apt install automake autoconf libtool libtool-bin
+ sudo apt install libaec0 libaec-dev
+
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
+ - name: Get Sources
+ uses: actions/checkout@v4
+
+ # AUTOTOOLS CONFIGURE
+ - name: Autotools Configure
+ run: |
+ sh ./autogen.sh
+ mkdir "${{ runner.workspace }}/build"
+ cd "${{ runner.workspace }}/build"
+ $GITHUB_WORKSPACE/configure \
+ --enable-build-mode=debug \
+ --enable-deprecated-symbols \
+ --with-default-api-version=v114 \
+ --enable-shared \
+ --disable-parallel \
+ --enable-cxx \
+ --enable-fortran \
+ --enable-java \
+ --enable-mirror-vfd \
+ --enable-direct-vfd \
+ --enable-ros3-vfd \
+ --with-szlib=yes
+ shell: bash
+
+ # BUILD
+ - name: Autotools Build
+ run: make -j3
+ working-directory: ${{ runner.workspace }}/build
+
+ # INSTALL (note that this runs even when we don't run the tests)
+ - name: Autotools Install
+ run: make install
+ working-directory: ${{ runner.workspace }}/build
+
+ - name: Autotools Verify Install
+ run: make check-install
+ working-directory: ${{ runner.workspace }}/build
+
+ build_no_deprecated:
+ name: "gcc no deprecated symbols (build only)"
+ runs-on: ubuntu-latest
+ steps:
+ # SETUP
+ # Only CMake need ninja-build, but we just install it unilaterally
+ # libssl, etc. are needed for the ros3 VFD
+ - name: Install Linux Dependencies
+ run: |
+ sudo apt update
+ sudo apt-get install ninja-build doxygen graphviz
+ sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev
+ sudo apt install gcc-12 g++-12 gfortran-12
+ echo "CC=gcc-12" >> $GITHUB_ENV
+ echo "CXX=g++-12" >> $GITHUB_ENV
+ echo "FC=gfortran-12" >> $GITHUB_ENV
+
+ - name: Install Autotools Dependencies (Linux)
+ run: |
+ sudo apt install automake autoconf libtool libtool-bin
+ sudo apt install libaec0 libaec-dev
+
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
+ - name: Get Sources
+ uses: actions/checkout@v4
+
+ # AUTOTOOLS CONFIGURE
+ - name: Autotools Configure
+ run: |
+ sh ./autogen.sh
+ mkdir "${{ runner.workspace }}/build"
+ cd "${{ runner.workspace }}/build"
+ $GITHUB_WORKSPACE/configure \
+ --enable-build-mode=debug \
+ --disable-deprecated-symbols \
+ --with-default-api-version=default \
+ --enable-shared \
+ --disable-parallel \
+ --enable-cxx \
+ --enable-fortran \
+ --enable-java \
+ --enable-mirror-vfd \
+ --enable-direct-vfd \
+ --enable-ros3-vfd \
+ --with-szlib=yes
+ shell: bash
+
+ # BUILD
+ - name: Autotools Build
+ run: make -j3
+ working-directory: ${{ runner.workspace }}/build
+
+ # INSTALL (note that this runs even when we don't run the tests)
+ - name: Autotools Install
+ run: make install
+ working-directory: ${{ runner.workspace }}/build
+
+ - name: Autotools Verify Install
+ run: make check-install
+ working-directory: ${{ runner.workspace }}/build
+
+ build_debug_werror:
+ name: "gcc DBG -Werror (build only)"
+ runs-on: ubuntu-latest
+ steps:
+ # SETUP
+ # Only CMake need ninja-build, but we just install it unilaterally
+ # libssl, etc. are needed for the ros3 VFD
+ - name: Install Linux Dependencies
+ run: |
+ sudo apt update
+ sudo apt-get install ninja-build doxygen graphviz
+ sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev
+ sudo apt install gcc-12 g++-12 gfortran-12
+ echo "CC=gcc-12" >> $GITHUB_ENV
+ echo "CXX=g++-12" >> $GITHUB_ENV
+ echo "FC=gfortran-12" >> $GITHUB_ENV
+
+ - name: Install Autotools Dependencies (Linux)
+ run: |
+ sudo apt install automake autoconf libtool libtool-bin
+ sudo apt install libaec0 libaec-dev
+
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
+ - name: Get Sources
+ uses: actions/checkout@v4
+
+ # AUTOTOOLS CONFIGURE
+ - name: Autotools Configure
+ run: |
+ sh ./autogen.sh
+ mkdir "${{ runner.workspace }}/build"
+ cd "${{ runner.workspace }}/build"
+ CFLAGS=-Werror $GITHUB_WORKSPACE/configure \
+ --enable-build-mode=debug \
+ --enable-deprecated-symbols \
+ --with-default-api-version=v114 \
+ --enable-shared \
+ --disable-parallel \
+ --enable-cxx \
+ --disable-fortran \
+ --enable-java \
+ --disable-mirror-vfd \
+ --enable-direct-vfd \
+ --disable-ros3-vfd \
+ --with-szlib=yes
+ shell: bash
+
+ # BUILD
+ - name: Autotools Build
+ run: make -j3
+ working-directory: ${{ runner.workspace }}/build
+
+ # INSTALL (note that this runs even when we don't run the tests)
+ - name: Autotools Install
+ run: make install
+ working-directory: ${{ runner.workspace }}/build
+
+ - name: Autotools Verify Install
+ run: make check-install
+ working-directory: ${{ runner.workspace }}/build
+
+ build_release_werror:
+ name: "gcc REL -Werror (build only)"
+ runs-on: ubuntu-latest
+ steps:
+ # SETUP
+ # Only CMake need ninja-build, but we just install it unilaterally
+ # libssl, etc. are needed for the ros3 VFD
+ - name: Install Linux Dependencies
+ run: |
+ sudo apt update
+ sudo apt-get install ninja-build doxygen graphviz
+ sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev
+ sudo apt install gcc-12 g++-12 gfortran-12
+ echo "CC=gcc-12" >> $GITHUB_ENV
+ echo "CXX=g++-12" >> $GITHUB_ENV
+ echo "FC=gfortran-12" >> $GITHUB_ENV
+
+ - name: Install Autotools Dependencies (Linux)
+ run: |
+ sudo apt install automake autoconf libtool libtool-bin
+ sudo apt install libaec0 libaec-dev
+
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
+ - name: Get Sources
+ uses: actions/checkout@v4
+
+ # AUTOTOOLS CONFIGURE
+ - name: Autotools Configure
+ run: |
+ sh ./autogen.sh
+ mkdir "${{ runner.workspace }}/build"
+ cd "${{ runner.workspace }}/build"
+ CFLAGS=-Werror $GITHUB_WORKSPACE/configure \
+ --enable-build-mode=production \
+ --enable-deprecated-symbols \
+ --with-default-api-version=v114 \
+ --enable-shared \
+ --disable-parallel \
+ --enable-cxx \
+ --disable-fortran \
+ --enable-java \
+ --disable-mirror-vfd \
+ --enable-direct-vfd \
+ --disable-ros3-vfd \
+ --with-szlib=yes
+ shell: bash
+
+ # BUILD
+ - name: Autotools Build
+ run: make -j3
+ working-directory: ${{ runner.workspace }}/build
+
+ # INSTALL (note that this runs even when we don't run the tests)
+ - name: Autotools Install
+ run: make install
+ working-directory: ${{ runner.workspace }}/build
+
+ - name: Autotools Verify Install
+ run: make check-install
+ working-directory: ${{ runner.workspace }}/build
+
diff --git a/.github/workflows/main-auto.yml b/.github/workflows/main-auto.yml
new file mode 100644
index 00000000000..c4f4252d759
--- /dev/null
+++ b/.github/workflows/main-auto.yml
@@ -0,0 +1,182 @@
+name: hdf5 1.14 autotools CI
+
+# Controls when the action will run. Triggers the workflow on a call
+on:
+ workflow_call:
+ inputs:
+ thread_safety:
+ description: "thread-safety enable/disable"
+ required: true
+ type: string
+ build_mode:
+ description: "release vs. debug build"
+ required: true
+ type: string
+
+permissions:
+ contents: read
+
+# A workflow run is made up of one or more jobs that can run sequentially or
+# in parallel. We just have one job, but the matrix items defined below will
+# run in parallel.
+jobs:
+
+ # A workflow that builds the library and runs all the tests
+ # Linux (Ubuntu) w/ gcc + Autotools
+ #
+ Autotools_build_and_test:
+ name: "GCC-${{ inputs.build_mode }}-TS=${{ inputs.thread_safety }}d"
+ # Don't run the action if the commit message says to skip CI
+ if: "!contains(github.event.head_commit.message, 'skip-ci')"
+
+ # The type of runner that the job will run on
+ runs-on: ubuntu-latest
+
+ # Steps represent a sequence of tasks that will be executed as part of the job
+ steps:
+ # SETUP
+ - name: Install Linux Dependencies
+ run: |
+ sudo apt update
+ sudo apt-get install ninja-build doxygen graphviz
+ sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev
+ sudo apt install gcc-12 g++-12 gfortran-12
+ sudo apt install automake autoconf libtool libtool-bin
+ sudo apt install libaec0 libaec-dev
+ echo "CC=gcc-12" >> $GITHUB_ENV
+ echo "CXX=g++-12" >> $GITHUB_ENV
+ echo "FC=gfortran-12" >> $GITHUB_ENV
+
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
+ - name: Get Sources
+ uses: actions/checkout@v4
+
+ # AUTOTOOLS CONFIGURE
+ - name: Autotools Configure
+ run: |
+ sh ./autogen.sh
+ mkdir "${{ runner.workspace }}/build"
+ cd "${{ runner.workspace }}/build"
+ $GITHUB_WORKSPACE/configure \
+ --enable-build-mode=${{ inputs.build_mode }} \
+ --enable-deprecated-symbols \
+ --with-default-api-version=v114 \
+ --enable-shared \
+ --disable-parallel \
+ --${{ inputs.thread_safety }}-threadsafe \
+ --enable-cxx \
+ --enable-fortran \
+ --enable-java \
+ --enable-mirror-vfd \
+ --enable-direct-vfd \
+ --enable-ros3-vfd \
+ --with-szlib=yes
+ shell: bash
+ if: ${{ inputs.thread_safety == 'disable' }}
+
+ - name: Autotools Configure (Thread-Safe)
+ run: |
+ sh ./autogen.sh
+ mkdir "${{ runner.workspace }}/build"
+ cd "${{ runner.workspace }}/build"
+ $GITHUB_WORKSPACE/configure \
+ --enable-build-mode=${{ inputs.build_mode }} \
+ --enable-shared \
+ --${{ inputs.thread_safety }}-threadsafe \
+ --disable-hl \
+ --disable-parallel \
+ --enable-mirror-vfd \
+ --enable-direct-vfd \
+ --enable-ros3-vfd \
+ --with-szlib=yes
+ shell: bash
+ if: ${{ inputs.thread_safety == 'enable' }}
+
+ # BUILD
+ - name: Autotools Build
+ run: make -j3
+ working-directory: ${{ runner.workspace }}/build
+
+ # RUN TESTS
+ # NORMAL
+ - name: Autotools Run Tests
+ run: make check -j2
+ working-directory: ${{ runner.workspace }}/build
+ if: ${{ inputs.thread_safety == 'disable' }}
+
+ # THREAD-SAFE
+ - name: Autotools Run Thread-Safe Tests
+ run: |
+ cd test
+ ./ttsafe
+ working-directory: ${{ runner.workspace }}/build
+ if: ${{ inputs.thread_safety == 'enable' }}
+
+ # INSTALL (note that this runs even when we don't run the tests)
+ - name: Autotools Install
+ run: make install
+ working-directory: ${{ runner.workspace }}/build
+
+ - name: Autotools Verify Install
+ run: make check-install
+ working-directory: ${{ runner.workspace }}/build
+
+ #
+ # The GitHub runners are inadequate for running parallel HDF5 tests,
+ # so we catch most issues in daily testing. What we have here is just
+ # a compile check to make sure nothing obvious is broken.
+ # A workflow that builds the library
+ # Parallel Linux (Ubuntu) w/ gcc + Autotools
+ #
+ Autotools_build_parallel:
+ name: "Parallel GCC-${{ inputs.build_mode }}-TS=${{ inputs.thread_safety }}d"
+ # Don't run the action if the commit message says to skip CI
+ if: "!contains(github.event.head_commit.message, 'skip-ci')"
+
+ # The type of runner that the job will run on
+ runs-on: ubuntu-latest
+
+ # Steps represent a sequence of tasks that will be executed as part of the job
+ steps:
+ # SETUP
+ - name: Install Linux Dependencies
+ run: |
+ sudo apt update
+ sudo apt-get install ninja-build doxygen graphviz
+ sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev
+ sudo apt install gcc-12 g++-12 gfortran-12
+ sudo apt install automake autoconf libtool libtool-bin
+ sudo apt install libaec0 libaec-dev
+ sudo apt install openmpi-bin openmpi-common mpi-default-dev
+ echo "CC=mpicc" >> $GITHUB_ENV
+ echo "FC=mpif90" >> $GITHUB_ENV
+
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
+ - name: Get Sources
+ uses: actions/checkout@v4
+
+ # AUTOTOOLS CONFIGURE
+ - name: Autotools Configure
+ run: |
+ sh ./autogen.sh
+ mkdir "${{ runner.workspace }}/build"
+ cd "${{ runner.workspace }}/build"
+ CC=mpicc $GITHUB_WORKSPACE/configure \
+ --enable-build-mode=${{ inputs.build_mode }} \
+ --enable-deprecated-symbols \
+ --with-default-api-version=v114 \
+ --enable-shared \
+ --enable-parallel \
+ --disable-cxx \
+ --enable-fortran \
+ --disable-java \
+ --disable-mirror-vfd \
+ --disable-direct-vfd \
+ --disable-ros3-vfd \
+ --with-szlib=yes
+ shell: bash
+
+ # BUILD
+ - name: Autotools Build
+ run: make -j3
+ working-directory: ${{ runner.workspace }}/build
diff --git a/.github/workflows/main-cmake.yml b/.github/workflows/main-cmake.yml
new file mode 100644
index 00000000000..bf53c41a013
--- /dev/null
+++ b/.github/workflows/main-cmake.yml
@@ -0,0 +1,251 @@
+name: hdf5 1.14 CMake CI
+
+# Controls when the action will run. Triggers the workflow on a call
+on:
+ workflow_call:
+ inputs:
+ thread_safety:
+ description: "thread-safety on/off"
+ required: true
+ type: boolean
+ build_mode:
+ description: "release vs. debug build"
+ required: true
+ type: string
+
+permissions:
+ contents: read
+
+# A workflow run is made up of one or more jobs that can run sequentially or
+# in parallel. We just have one job, but the matrix items defined below will
+# run in parallel.
+jobs:
+
+ # A workflow that builds the library and runs all the tests
+ CMake_build_and_test:
+ strategy:
+ # The current matrix has one dimensions:
+ #
+ # * config name
+ #
+ # Most configuration information is added via the 'include' mechanism,
+ # which will append the key-value pairs in the configuration where the
+ # names match.
+ matrix:
+ name:
+ - "Windows MSVC"
+ - "Ubuntu gcc"
+ - "MacOS Clang"
+
+ # This is where we list the bulk of the options for each configuration.
+ # The key-value pair values are usually appropriate for being CMake or
+ # Autotools configure values, so be aware of that.
+
+ include:
+
+ # Windows w/ MSVC + CMake
+ #
+ # No Fortran, parallel, or VFDs that rely on POSIX things
+ - name: "Windows MSVC"
+ os: windows-2022
+ toolchain: ""
+ cpp: ON
+ fortran: OFF
+ java: ON
+ docs: OFF
+ libaecfc: ON
+ localaec: OFF
+ zlibfc: ON
+ localzlib: OFF
+ parallel: OFF
+ mirror_vfd: OFF
+ direct_vfd: OFF
+ ros3_vfd: OFF
+ generator: "-G \"Visual Studio 17 2022\" -A x64"
+ run_tests: true
+
+ # Linux (Ubuntu) w/ gcc + CMake
+ #
+ # We might think about adding Clang, but MacOS already tests that
+ # so it's not critical
+ - name: "Ubuntu gcc"
+ os: ubuntu-latest
+ cpp: ON
+ fortran: ON
+ java: ON
+ docs: ON
+ libaecfc: ON
+ localaec: OFF
+ zlibfc: ON
+ localzlib: OFF
+ parallel: OFF
+ mirror_vfd: ON
+ direct_vfd: ON
+ ros3_vfd: ON
+ toolchain: "config/toolchain/gcc.cmake"
+ generator: "-G Ninja"
+ run_tests: true
+
+
+ # MacOS w/ Clang + CMake
+ #
+ # We could also build with the Autotools via brew installing them,
+ # but that seems unnecessary
+ - name: "MacOS Clang"
+ os: macos-13
+ cpp: ON
+ fortran: OFF
+ java: ON
+ docs: OFF
+ libaecfc: ON
+ localaec: OFF
+ zlibfc: ON
+ localzlib: OFF
+ parallel: OFF
+ mirror_vfd: ON
+ direct_vfd: OFF
+ ros3_vfd: OFF
+ toolchain: "config/toolchain/clang.cmake"
+ generator: "-G Ninja"
+ run_tests: true
+
+
+
+ # Sets the job's name from the properties
+ name: "${{ matrix.name }}-${{ inputs.build_mode }}-TS=${{ inputs.thread_safety }}"
+
+ # Don't run the action if the commit message says to skip CI
+ if: "!contains(github.event.head_commit.message, 'skip-ci')"
+
+ # The type of runner that the job will run on
+ runs-on: ${{ matrix.os }}
+
+ # Steps represent a sequence of tasks that will be executed as part of the job
+ steps:
+
+ #
+ # SETUP
+ #
+
+ #Useful for debugging
+ - name: Dump matrix context
+ run: echo '${{ toJSON(matrix) }}'
+
+ # Only CMake need ninja-build, but we just install it unilaterally
+ # libssl, etc. are needed for the ros3 VFD
+ - name: Install Linux Dependencies
+ run: |
+ sudo apt update
+ sudo apt-get install ninja-build doxygen graphviz
+ sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev
+ sudo apt install gcc-12 g++-12 gfortran-12
+ echo "CC=gcc-12" >> $GITHUB_ENV
+ echo "CXX=g++-12" >> $GITHUB_ENV
+ echo "FC=gfortran-12" >> $GITHUB_ENV
+ if: matrix.os == 'ubuntu-latest'
+
+ # CMake gets libaec from fetchcontent
+
+ - name: Install Dependencies (Windows)
+ run: choco install ninja
+ if: matrix.os == 'windows-latest'
+
+ - name: Install Dependencies (macOS)
+ run: brew install ninja doxygen
+ if: matrix.os == 'macos-13'
+
+ - name: Set environment for MSVC (Windows)
+ run: |
+ # Set these environment variables so CMake picks the correct compiler
+ echo "CXX=cl.exe" >> $GITHUB_ENV
+ echo "CC=cl.exe" >> $GITHUB_ENV
+ if: matrix.os == 'windows-latest'
+
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
+ - name: Get Sources
+ uses: actions/checkout@v4
+
+ #
+ # CMAKE CONFIGURE
+ #
+
+ - name: CMake Configure
+ run: |
+ mkdir "${{ runner.workspace }}/build"
+ cd "${{ runner.workspace }}/build"
+ cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake \
+ ${{ matrix.generator }} \
+ -DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} \
+ -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} \
+ -DBUILD_SHARED_LIBS=ON \
+ -DHDF5_ENABLE_ALL_WARNINGS=ON \
+ -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} \
+ -DHDF5_BUILD_CPP_LIB:BOOL=${{ matrix.cpp }} \
+ -DHDF5_BUILD_FORTRAN=${{ matrix.fortran }} \
+ -DHDF5_BUILD_JAVA=${{ matrix.java }} \
+ -DHDF5_BUILD_DOC=${{ matrix.docs }} \
+ -DLIBAEC_USE_LOCALCONTENT=${{ matrix.localaec }} \
+ -DZLIB_USE_LOCALCONTENT=${{ matrix.localzlib }} \
+ -DHDF5_ENABLE_MIRROR_VFD:BOOL=${{ matrix.mirror_vfd }} \
+ -DHDF5_ENABLE_DIRECT_VFD:BOOL=${{ matrix.direct_vfd }} \
+ -DHDF5_ENABLE_ROS3_VFD:BOOL=${{ matrix.ros3_vfd }} \
+ $GITHUB_WORKSPACE
+ shell: bash
+ if: "! (matrix.thread_safety)"
+
+
+ - name: CMake Configure (Thread-Safe)
+ run: |
+ mkdir "${{ runner.workspace }}/build"
+ cd "${{ runner.workspace }}/build"
+ cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake \
+ ${{ matrix.generator }} \
+ -DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} \
+ -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} \
+ -DBUILD_SHARED_LIBS=ON \
+ -DHDF5_ENABLE_ALL_WARNINGS=ON \
+ -DHDF5_ENABLE_THREADSAFE:BOOL=ON \
+ -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} \
+ -DHDF5_BUILD_CPP_LIB:BOOL=OFF \
+ -DHDF5_BUILD_FORTRAN:BOOL=OFF \
+ -DHDF5_BUILD_JAVA:BOOL=OFF \
+ -DHDF5_BUILD_HL_LIB:BOOL=OFF \
+ -DHDF5_BUILD_DOC=OFF \
+ -DLIBAEC_USE_LOCALCONTENT=${{ matrix.localaec }} \
+ -DZLIB_USE_LOCALCONTENT=${{ matrix.localzlib }} \
+ -DHDF5_ENABLE_MIRROR_VFD:BOOL=${{ matrix.mirror_vfd }} \
+ -DHDF5_ENABLE_DIRECT_VFD:BOOL=${{ matrix.direct_vfd }} \
+ -DHDF5_ENABLE_ROS3_VFD:BOOL=${{ matrix.ros3_vfd }} \
+ $GITHUB_WORKSPACE
+ shell: bash
+ if: (matrix.thread_safety)
+
+ #
+ # BUILD
+ #
+
+ - name: CMake Build
+ run: cmake --build . --parallel 3 --config ${{ inputs.build_mode }}
+ working-directory: ${{ runner.workspace }}/build
+
+ #
+ # RUN TESTS
+ #
+
+ # NORMAL
+
+ - name: CMake Run Tests
+ run: ctest . --parallel 2 -C ${{ inputs.build_mode }} -V
+ working-directory: ${{ runner.workspace }}/build
+ if: (matrix.run_tests) && ! (matrix.thread_safety)
+
+ # THREAD-SAFE
+
+ - name: CMake Run Thread-Safe Tests
+ run: ctest . --parallel 2 -C ${{ inputs.build_mode }} -V -R ttsafe
+ working-directory: ${{ runner.workspace }}/build
+ if: (matrix.run_tests) && (matrix.thread_safety)
+
+ #
+ # INSTALL (note that this runs even when we don't run the tests)
+ #
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 9944784b4de..e8921bd263a 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -27,621 +27,10 @@ permissions:
# in parallel. We just have one job, but the matrix items defined below will
# run in parallel.
jobs:
+ workflow-autotools:
+ name: "Autotools Workflows"
+ uses: ./.github/workflows/autotools.yml
- # A workflow that builds the library and runs all the tests
- build_and_test:
-
- strategy:
-
- # The current matrix has three dimensions:
- #
- # * config name
- # * thread-safety on/off
- # * release vs. debug build
- #
- # Most configuration information is added via the 'include' mechanism,
- # which will append the key-value pairs in the configuration where the
- # names match.
-
- matrix:
-
- name:
- - "Windows MSVC CMake"
- - "Ubuntu gcc CMake"
- - "Ubuntu gcc Autotools"
- - "Ubuntu gcc Autotools parallel (build only)"
- - "MacOS Clang CMake"
-
- thread_safety:
- - enabled: true
- text: " TS"
- - enabled: false
- text: ""
-
- build_mode:
- - text: " REL"
- cmake: "Release"
- autotools: "production"
- - text: " DBG"
- cmake: "Debug"
- autotools: "debug"
-
- # This is where we list the bulk of the options for each configuration.
- # The key-value pair values are usually appropriate for being CMake or
- # Autotools configure values, so be aware of that.
-
- include:
-
- # Windows w/ MSVC + CMake
- #
- # No Fortran, parallel, or VFDs that rely on POSIX things
- - name: "Windows MSVC CMake"
- os: windows-2022
- toolchain: ""
- cpp: ON
- fortran: OFF
- java: ON
- docs: OFF
- libaecfc: ON
- localaec: OFF
- zlibfc: ON
- localzlib: OFF
- parallel: OFF
- mirror_vfd: OFF
- direct_vfd: OFF
- ros3_vfd: OFF
- generator: "-G \"Visual Studio 17 2022\" -A x64"
- run_tests: true
-
- # Linux (Ubuntu) w/ gcc + CMake
- #
- # We might think about adding Clang, but MacOS already tests that
- # so it's not critical
- - name: "Ubuntu gcc CMake"
- os: ubuntu-latest
- cpp: ON
- fortran: ON
- java: ON
- docs: ON
- libaecfc: ON
- localaec: OFF
- zlibfc: ON
- localzlib: OFF
- parallel: OFF
- mirror_vfd: ON
- direct_vfd: ON
- ros3_vfd: OFF
- toolchain: "config/toolchain/gcc.cmake"
- generator: "-G Ninja"
- run_tests: true
-
- # Linux (Ubuntu) w/ gcc + Autotools
- #
- # Keep this identical to the CMake configs. Note the difference in
- # the values.
- - name: "Ubuntu gcc Autotools"
- os: ubuntu-latest
- cpp: enable
- fortran: enable
- java: enable
- docs: disable
- parallel: disable
- mirror_vfd: enable
- direct_vfd: enable
- ros3_vfd: enable
- deprec_sym: enable
- default_api: v114
- szip: yes
- toolchain: ""
- generator: "autogen"
- flags: ""
- run_tests: true
-
- # Parallel Linux (Ubuntu) w/ gcc + Autotools
- #
- # The GitHub runners are inadequate for running parallel HDF5 tests,
- # so we catch most issues in daily testing. What we have here is just
- # a compile check to make sure nothing obvious is broken.
- - name: "Ubuntu gcc Autotools parallel (build only)"
- os: ubuntu-latest
- cpp: disable
- fortran: enable
- java: disable
- docs: disable
- parallel: enable
- mirror_vfd: disable
- direct_vfd: disable
- ros3_vfd: disable
- deprec_sym: enable
- default_api: v114
- szip: yes
- toolchain: ""
- generator: "autogen"
- flags: "CC=mpicc"
- run_tests: false
-
- # MacOS w/ Clang + CMake
- #
- # We could also build with the Autotools via brew installing them,
- # but that seems unnecessary
- - name: "MacOS Clang CMake"
- os: macos-13
- cpp: ON
- fortran: OFF
- java: ON
- docs: OFF
- libaecfc: ON
- localaec: OFF
- zlibfc: ON
- localzlib: OFF
- parallel: OFF
- mirror_vfd: ON
- direct_vfd: OFF
- ros3_vfd: OFF
- toolchain: "config/toolchain/clang.cmake"
- generator: "-G Ninja"
- run_tests: true
-
-
- #
- # SPECIAL AUTOTOOLS BUILDS
- #
- # These do not run tests and are not built into the matrix and instead
- # become NEW configs as their name would clobber one of the matrix
- # names (so make sure the names are UNIQUE).
- #
-
- - name: "Ubuntu gcc Autotools v1.6 default API (build only)"
- os: ubuntu-latest
- cpp: enable
- fortran: enable
- java: enable
- docs: disable
- parallel: disable
- mirror_vfd: enable
- direct_vfd: enable
- ros3_vfd: enable
- deprec_sym: enable
- default_api: v16
- szip: yes
- toolchain: ""
- generator: "autogen"
- flags: ""
- run_tests: false
- thread_safety:
- enabled: false
- text: ""
- build_mode:
- text: " DBG"
- cmake: "Debug"
- autotools: "debug"
-
- - name: "Ubuntu gcc Autotools v1.8 default API (build only)"
- os: ubuntu-latest
- cpp: enable
- fortran: enable
- java: enable
- docs: disable
- parallel: disable
- mirror_vfd: enable
- direct_vfd: enable
- ros3_vfd: enable
- deprec_sym: enable
- default_api: v18
- szip: yes
- toolchain: ""
- generator: "autogen"
- flags: ""
- run_tests: false
- thread_safety:
- enabled: false
- text: ""
- build_mode:
- text: " DBG"
- cmake: "Debug"
- autotools: "debug"
-
- - name: "Ubuntu gcc Autotools v1.10 default API (build only)"
- os: ubuntu-latest
- cpp: enable
- fortran: enable
- java: enable
- docs: disable
- parallel: disable
- mirror_vfd: enable
- direct_vfd: enable
- ros3_vfd: enable
- deprec_sym: enable
- default_api: v110
- szip: yes
- toolchain: ""
- generator: "autogen"
- flags: ""
- run_tests: false
- thread_safety:
- enabled: false
- text: ""
- build_mode:
- text: " DBG"
- cmake: "Debug"
- autotools: "debug"
-
- - name: "Ubuntu gcc Autotools v1.12 default API (build only)"
- os: ubuntu-latest
- cpp: enable
- fortran: enable
- java: enable
- docs: disable
- parallel: disable
- mirror_vfd: enable
- direct_vfd: enable
- ros3_vfd: enable
- deprec_sym: enable
- default_api: v112
- szip: yes
- toolchain: ""
- generator: "autogen"
- flags: ""
- run_tests: false
- thread_safety:
- enabled: false
- text: ""
- build_mode:
- text: " DBG"
- cmake: "Debug"
- autotools: "debug"
-
- - name: "Ubuntu gcc Autotools no deprecated symbols (build only)"
- os: ubuntu-latest
- cpp: enable
- fortran: enable
- java: enable
- docs: disable
- parallel: disable
- mirror_vfd: enable
- direct_vfd: enable
- ros3_vfd: enable
- deprec_sym: disable
- default_api: default
- szip: yes
- toolchain: ""
- generator: "autogen"
- flags: ""
- run_tests: false
- thread_safety:
- enabled: false
- text: ""
- build_mode:
- text: " DBG"
- cmake: "Debug"
- autotools: "debug"
-
- # Debug -Werror
- - name: "Ubuntu gcc Autotools -Werror (build only)"
- os: ubuntu-latest
- cpp: enable
- fortran: disable
- java: enable
- docs: disable
- parallel: disable
- mirror_vfd: disable
- direct_vfd: enable
- ros3_vfd: disable
- deprec_sym: enable
- default_api: v114
- szip: yes
- toolchain: ""
- generator: "autogen"
- flags: "CFLAGS=-Werror"
- run_tests: false
- thread_safety:
- enabled: false
- text: ""
- build_mode:
- text: " DBG"
- cmake: "Debug"
- autotools: "debug"
-
- # Production/Release -Werror
- - name: "Ubuntu gcc Autotools -Werror (build only)"
- os: ubuntu-latest
- cpp: enable
- fortran: disable
- java: enable
- docs: disable
- parallel: disable
- mirror_vfd: disable
- direct_vfd: enable
- ros3_vfd: disable
- deprec_sym: enable
- default_api: v114
- szip: yes
- toolchain: ""
- generator: "autogen"
- flags: "CFLAGS=-Werror"
- run_tests: false
- thread_safety:
- enabled: false
- text: ""
- build_mode:
- text: " REL"
- cmake: "Release"
- autotools: "production"
-
- # Parallel Debug -Werror
- - name: "Ubuntu gcc Autotools parallel -Werror (build only)"
- os: ubuntu-latest
- cpp: disable
- fortran: disable
- java: disable
- docs: disable
- parallel: enable
- mirror_vfd: disable
- direct_vfd: enable
- ros3_vfd: disable
- deprec_sym: enable
- default_api: v114
- toolchain: ""
- generator: "autogen"
- flags: "CFLAGS=-Werror"
- run_tests: false
- thread_safety:
- enabled: false
- text: ""
- build_mode:
- text: " DBG"
- cmake: "Debug"
- autotools: "debug"
-
- # Parallel production/release -Werror
- - name: "Ubuntu gcc Autotools parallel -Werror (build only)"
- os: ubuntu-latest
- cpp: disable
- fortran: disable
- java: disable
- docs: disable
- parallel: enable
- mirror_vfd: disable
- direct_vfd: enable
- ros3_vfd: disable
- deprec_sym: enable
- default_api: v114
- toolchain: ""
- generator: "autogen"
- flags: "CFLAGS=-Werror"
- run_tests: false
- thread_safety:
- enabled: false
- text: ""
- build_mode:
- text: " REL"
- cmake: "Release"
- autotools: "production"
-
- # Sets the job's name from the properties
- name: "${{ matrix.name }}${{ matrix.build_mode.text }}${{ matrix.thread_safety.text }}"
-
- # Don't run the action if the commit message says to skip CI
- if: "!contains(github.event.head_commit.message, 'skip-ci')"
-
- # The type of runner that the job will run on
- runs-on: ${{ matrix.os }}
-
- # Steps represent a sequence of tasks that will be executed as part of the job
- steps:
-
- #
- # SETUP
- #
-
- #Useful for debugging
- - name: Dump matrix context
- run: echo '${{ toJSON(matrix) }}'
-
- # Only CMake need ninja-build, but we just install it unilaterally
- # libssl, etc. are needed for the ros3 VFD
- - name: Install Linux Dependencies
- run: |
- sudo apt update
- sudo apt-get install ninja-build doxygen graphviz
- sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev
- sudo apt install gcc-12 g++-12 gfortran-12
- echo "CC=gcc-12" >> $GITHUB_ENV
- echo "CXX=g++-12" >> $GITHUB_ENV
- echo "FC=gfortran-12" >> $GITHUB_ENV
- if: matrix.os == 'ubuntu-latest'
-
- # CMake gets libaec from fetchcontent
- - name: Install Autotools Dependencies (Linux)
- run: |
- sudo apt install automake autoconf libtool libtool-bin
- sudo apt install libaec0 libaec-dev
- if: (matrix.generator == 'autogen')
-
- - name: Install Autotools Dependencies (Linux, parallel)
- run: |
- sudo apt install openmpi-bin openmpi-common mpi-default-dev
- echo "CC=mpicc" >> $GITHUB_ENV
- echo "FC=mpif90" >> $GITHUB_ENV
- if: (matrix.generator == 'autogen') && (matrix.parallel == 'enable')
-
- - name: Install Dependencies (Windows)
- run: choco install ninja
- if: matrix.os == 'windows-latest'
-
- - name: Install Dependencies (macOS)
- run: brew install ninja doxygen
- if: matrix.os == 'macos-13'
-
- - name: Set environment for MSVC (Windows)
- run: |
- # Set these environment variables so CMake picks the correct compiler
- echo "CXX=cl.exe" >> $GITHUB_ENV
- echo "CC=cl.exe" >> $GITHUB_ENV
- if: matrix.os == 'windows-latest'
-
- # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- - name: Get Sources
- uses: actions/checkout@v3
-
- #
- # AUTOTOOLS CONFIGURE
- #
-
- - name: Autotools Configure
- run: |
- sh ./autogen.sh
- mkdir "${{ runner.workspace }}/build"
- cd "${{ runner.workspace }}/build"
- ${{ matrix.flags }} $GITHUB_WORKSPACE/configure \
- --enable-build-mode=${{ matrix.build_mode.autotools }} \
- --${{ matrix.deprec_sym }}-deprecated-symbols \
- --with-default-api-version=${{ matrix.default_api }} \
- --enable-shared \
- --${{ matrix.parallel }}-parallel \
- --${{ matrix.cpp }}-cxx \
- --${{ matrix.fortran }}-fortran \
- --${{ matrix.java }}-java \
- --${{ matrix.mirror_vfd }}-mirror-vfd \
- --${{ matrix.direct_vfd }}-direct-vfd \
- --${{ matrix.ros3_vfd }}-ros3-vfd \
- --with-szlib=${{ matrix.szip }}
- shell: bash
- if: (matrix.generator == 'autogen') && ! (matrix.thread_safety.enabled)
-
- - name: Autotools Configure (Thread-Safe)
- run: |
- sh ./autogen.sh
- mkdir "${{ runner.workspace }}/build"
- cd "${{ runner.workspace }}/build"
- ${{ matrix.flags }} $GITHUB_WORKSPACE/configure \
- --enable-build-mode=${{ matrix.build_mode.autotools }} \
- --enable-shared \
- --enable-threadsafe \
- --disable-hl \
- --${{ matrix.parallel }}-parallel \
- --${{ matrix.mirror_vfd }}-mirror-vfd \
- --${{ matrix.direct_vfd }}-direct-vfd \
- --${{ matrix.ros3_vfd }}-ros3-vfd \
- --with-szlib=${{ matrix.szip }}
- shell: bash
- if: (matrix.generator == 'autogen') && (matrix.thread_safety.enabled)
-
- #
- # CMAKE CONFIGURE
- #
-
- - name: CMake Configure
- run: |
- mkdir "${{ runner.workspace }}/build"
- cd "${{ runner.workspace }}/build"
- cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake \
- ${{ matrix.generator }} \
- -DCMAKE_BUILD_TYPE=${{ matrix.build_mode.cmake }} \
- -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} \
- -DBUILD_SHARED_LIBS=ON \
- -DHDF5_ENABLE_ALL_WARNINGS=ON \
- -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} \
- -DHDF5_BUILD_CPP_LIB:BOOL=${{ matrix.cpp }} \
- -DHDF5_BUILD_FORTRAN=${{ matrix.fortran }} \
- -DHDF5_BUILD_JAVA=${{ matrix.java }} \
- -DHDF5_BUILD_DOC=${{ matrix.docs }} \
- -DBUILD_SZIP_WITH_FETCHCONTENT=${{ matrix.libaecfc }} \
- -DLIBAEC_USE_LOCALCONTENT=${{ matrix.localaec }} \
- -DBUILD_ZLIB_WITH_FETCHCONTENT=${{ matrix.zlibfc }} \
- -DZLIB_USE_LOCALCONTENT=${{ matrix.localzlib }} \
- -DHDF5_ENABLE_MIRROR_VFD:BOOL=${{ matrix.mirror_vfd }} \
- -DHDF5_ENABLE_DIRECT_VFD:BOOL=${{ matrix.direct_vfd }} \
- -DHDF5_ENABLE_ROS3_VFD:BOOL=${{ matrix.ros3_vfd }} \
- $GITHUB_WORKSPACE
- shell: bash
- if: (matrix.generator != 'autogen') && ! (matrix.thread_safety.enabled)
-
-
- # NOTE: Windows does not support static + thread-safe
- - name: CMake Configure (Thread-Safe)
- run: |
- mkdir "${{ runner.workspace }}/build"
- cd "${{ runner.workspace }}/build"
- cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake \
- ${{ matrix.generator }} \
- -DCMAKE_BUILD_TYPE=${{ matrix.build_mode.cmake }} \
- -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} \
- -DBUILD_SHARED_LIBS=ON \
- -DBUILD_STATIC_LIBS=OFF \
- -DHDF5_ENABLE_ALL_WARNINGS=ON \
- -DHDF5_ENABLE_THREADSAFE:BOOL=ON \
- -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} \
- -DHDF5_BUILD_CPP_LIB:BOOL=OFF \
- -DHDF5_BUILD_FORTRAN:BOOL=OFF \
- -DHDF5_BUILD_JAVA:BOOL=OFF \
- -DHDF5_BUILD_HL_LIB:BOOL=OFF \
- -DHDF5_BUILD_DOC=OFF \
- -DBUILD_SZIP_WITH_FETCHCONTENT=${{ matrix.libaecfc }} \
- -DLIBAEC_USE_LOCALCONTENT=${{ matrix.localaec }} \
- -DBUILD_ZLIB_WITH_FETCHCONTENT=${{ matrix.zlibfc }} \
- -DZLIB_USE_LOCALCONTENT=${{ matrix.localzlib }} \
- -DHDF5_ENABLE_MIRROR_VFD:BOOL=${{ matrix.mirror_vfd }} \
- -DHDF5_ENABLE_DIRECT_VFD:BOOL=${{ matrix.direct_vfd }} \
- -DHDF5_ENABLE_ROS3_VFD:BOOL=${{ matrix.ros3_vfd }} \
- $GITHUB_WORKSPACE
- shell: bash
- if: (matrix.generator != 'autogen') && (matrix.thread_safety.enabled)
-
- #
- # BUILD
- #
-
- - name: Autotools Build
- run: make -j3
- working-directory: ${{ runner.workspace }}/build
- if: matrix.generator == 'autogen'
-
- - name: CMake Build
- run: cmake --build . --parallel 3 --config ${{ matrix.build_mode.cmake }}
- working-directory: ${{ runner.workspace }}/build
- if: (matrix.generator != 'autogen')
-
- #
- # RUN TESTS
- #
-
- # NORMAL
-
- - name: Autotools Run Tests
- run: make check -j2
- working-directory: ${{ runner.workspace }}/build
- if: (matrix.generator == 'autogen') && (matrix.run_tests) && ! (matrix.thread_safety.enabled)
-
- - name: CMake Run Tests
- run: ctest . --parallel 2 -C ${{ matrix.build_mode.cmake }} -V
- working-directory: ${{ runner.workspace }}/build
- if: (matrix.generator != 'autogen') && (matrix.run_tests) && ! (matrix.thread_safety.enabled)
-
- # THREAD-SAFE
-
- - name: Autotools Run Thread-Safe Tests
- run: |
- cd test
- ./ttsafe
- working-directory: ${{ runner.workspace }}/build
- if: (matrix.generator == 'autogen') && (matrix.run_tests) && (matrix.thread_safety.enabled)
-
- - name: CMake Run Thread-Safe Tests
- run: ctest . --parallel 2 -C ${{ matrix.build_mode.cmake }} -V -R ttsafe
- working-directory: ${{ runner.workspace }}/build
- if: (matrix.generator != 'autogen') && (matrix.run_tests) && (matrix.thread_safety.enabled)
-
- #
- # INSTALL (note that this runs even when we don't run the tests)
- #
-
- - name: Autotools Install
- run: make install
- working-directory: ${{ runner.workspace }}/build
- if: (matrix.generator == 'autogen')
-
- - name: Autotools Verify Install
- run: make check-install
- working-directory: ${{ runner.workspace }}/build
- if: (matrix.generator == 'autogen')
+ workflow-cmake:
+ name: "CMake Workflows"
+ uses: ./.github/workflows/cmake.yml
diff --git a/.github/workflows/netcdf.yml b/.github/workflows/netcdf.yml
index a7c9923b236..5dd3a661c73 100644
--- a/.github/workflows/netcdf.yml
+++ b/.github/workflows/netcdf.yml
@@ -31,7 +31,7 @@ jobs:
sudo apt update
sudo apt install -y libaec-dev zlib1g-dev automake autoconf libcurl4-openssl-dev libjpeg-dev wget curl bzip2 m4 flex bison cmake libzip-dev doxygen openssl libtool libtool-bin
- name: Checkout HDF5
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Install HDF5
run: |
./autogen.sh
@@ -39,7 +39,7 @@ jobs:
make -j
sudo make install -j
- name: Checkout netCDF
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
repository: unidata/netcdf-c
path: netcdf-c
diff --git a/.github/workflows/release-files.yml b/.github/workflows/release-files.yml
index 4473b420673..c80526a3746 100644
--- a/.github/workflows/release-files.yml
+++ b/.github/workflows/release-files.yml
@@ -1,4 +1,4 @@
-name: hdf5 1.14 release
+name: hdf5 1.14 release-files
# Controls when the action will run. Triggers the workflow on a schedule
on:
@@ -40,7 +40,7 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Get Sources
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
fetch-depth: 0
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 138fe001fc3..62a87787792 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -50,7 +50,7 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Get Sources
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
path: hdfsrc
diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml
new file mode 100644
index 00000000000..2803e7f09d7
--- /dev/null
+++ b/.github/workflows/scorecard.yml
@@ -0,0 +1,68 @@
+# This workflow uses actions that are not certified by GitHub. They are provided
+# by a third-party and are governed by separate terms of service, privacy
+# policy, and support documentation.
+
+name: Scorecard supply-chain security
+on:
+ # For Branch-Protection check. Only the default branch is supported. See
+ # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
+ branch_protection_rule:
+ push:
+ branches: [ "hdf5_1_14" ]
+
+# Declare default permissions as read only.
+permissions: read-all
+
+jobs:
+ analysis:
+ name: Scorecard analysis
+ runs-on: ubuntu-latest
+ permissions:
+ # Needed to upload the results to code-scanning dashboard.
+ security-events: write
+ # Needed to publish results and get a badge (see publish_results below).
+ id-token: write
+ # Uncomment the permissions below if installing in a private repository.
+ # contents: read
+ # actions: read
+
+ steps:
+ - name: "Checkout code"
+ uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
+ with:
+ persist-credentials: false
+
+ - name: "Run analysis"
+ uses: ossf/scorecard-action@e38b1902ae4f44df626f11ba0734b14fb91f8f86 # v2.1.2
+ with:
+ results_file: results.sarif
+ results_format: sarif
+ # (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
+ # - you want to enable the Branch-Protection check on a *public* repository, or
+ # - you are installing Scorecard on a *private* repository
+ # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
+ # repo_token: ${{ secrets.SCORECARD_TOKEN }}
+
+ # Public repositories:
+ # - Publish results to OpenSSF REST API for easy access by consumers
+ # - Allows the repository to include the Scorecard badge.
+ # - See https://github.com/ossf/scorecard-action#publishing-results.
+ # For private repositories:
+ # - `publish_results` will always be set to `false`, regardless
+ # of the value entered here.
+ publish_results: true
+
+ # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
+ # format to the repository Actions tab.
+ - name: "Upload artifact"
+ uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
+ with:
+ name: SARIF file
+ path: results.sarif
+ retention-days: 5
+
+ # Upload the results to GitHub's code scanning dashboard.
+ - name: "Upload to code-scanning"
+ uses: github/codeql-action/upload-sarif@17573ee1cc1b9d061760f3a006fc4aac4f944fd5 # v2.2.4
+ with:
+ sarif_file: results.sarif
diff --git a/.github/workflows/tarball.yml b/.github/workflows/tarball.yml
index 0bc21001bb3..d6c129801f4 100644
--- a/.github/workflows/tarball.yml
+++ b/.github/workflows/tarball.yml
@@ -83,7 +83,7 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Get Sources
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
path: hdfsrc
diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake
index 6573ee30a51..ced30b67a2e 100644
--- a/CMakeFilters.cmake
+++ b/CMakeFilters.cmake
@@ -13,30 +13,24 @@ option (USE_LIBAEC_STATIC "Use static AEC library " OFF)
option (ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 0)
option (SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 0)
-option (BUILD_ZLIB_WITH_FETCHCONTENT "Use FetchContent to use original source files" OFF)
-if (BUILD_ZLIB_WITH_FETCHCONTENT)
- set (ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 1)
- if (NOT ZLIB_USE_LOCALCONTENT)
- set (ZLIB_URL ${ZLIB_TGZ_ORIGPATH}/${ZLIB_TGZ_ORIGNAME})
- else ()
- set (ZLIB_URL ${TGZPATH}/${ZLIB_TGZ_ORIGNAME})
- endif ()
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Filter ZLIB file is ${ZLIB_URL}")
- endif ()
+set (ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 1)
+if (NOT ZLIB_USE_LOCALCONTENT)
+ set (ZLIB_URL ${ZLIB_TGZ_ORIGPATH}/${ZLIB_TGZ_NAME})
+else ()
+ set (ZLIB_URL ${TGZPATH}/${ZLIB_TGZ_NAME})
+endif ()
+if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Filter ZLIB file is ${ZLIB_URL}")
endif ()
-option (BUILD_SZIP_WITH_FETCHCONTENT "Use FetchContent to use original source files" OFF)
-if (BUILD_SZIP_WITH_FETCHCONTENT)
- set (SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 1)
- if (NOT LIBAEC_USE_LOCALCONTENT)
- set (SZIP_URL ${LIBAEC_TGZ_ORIGPATH}/${LIBAEC_TGZ_ORIGNAME})
- else ()
- set (SZIP_URL ${TGZPATH}/${LIBAEC_TGZ_ORIGNAME})
- endif ()
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Filter SZIP file is ${SZIP_URL}")
- endif ()
+set (SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 1)
+if (NOT LIBAEC_USE_LOCALCONTENT)
+ set (SZIP_URL ${LIBAEC_TGZ_ORIGPATH}/${LIBAEC_TGZ_NAME})
+else ()
+ set (SZIP_URL ${TGZPATH}/${LIBAEC_TGZ_NAME})
+endif ()
+if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Filter SZIP file is ${SZIP_URL}")
endif ()
include (ExternalProject)
@@ -55,18 +49,12 @@ if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MAT
if (NOT TGZPATH)
set (TGZPATH ${HDF5_SOURCE_DIR})
endif ()
- if (NOT BUILD_ZLIB_WITH_FETCHCONTENT)
- set (ZLIB_URL ${TGZPATH}/${ZLIB_TGZ_NAME})
- endif ()
if (ZLIB_USE_LOCALCONTENT)
if (NOT EXISTS "${ZLIB_URL}")
set (HDF5_ENABLE_Z_LIB_SUPPORT OFF CACHE BOOL "" FORCE)
message (VERBOSE "Filter ZLIB file ${ZLIB_URL} not found")
endif ()
endif ()
- if (NOT BUILD_SZIP_WITH_FETCHCONTENT)
- set (SZIP_URL ${TGZPATH}/${SZAEC_TGZ_NAME})
- endif ()
if (LIBAEC_USE_LOCALCONTENT)
if (NOT EXISTS "${SZIP_URL}")
set (HDF5_ENABLE_SZIP_SUPPORT OFF CACHE BOOL "" FORCE)
@@ -131,7 +119,7 @@ endif ()
#-----------------------------------------------------------------------------
# Option for SzLib support
#-----------------------------------------------------------------------------
-option (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF)
+option (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" ON)
if (HDF5_ENABLE_SZIP_SUPPORT)
option (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" ON)
if (NOT SZIP_USE_EXTERNAL)
@@ -153,13 +141,7 @@ if (HDF5_ENABLE_SZIP_SUPPORT)
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_LIBRARIES})
endif ()
else ()
- if (BUILD_SZIP_WITH_FETCHCONTENT)
- # Only tgz files available
- ORIGINAL_SZIP_LIBRARY ("TGZ" ${HDF5_ENABLE_SZIP_ENCODING})
- message (VERBOSE "SZIP is built from fetch content")
- message (VERBOSE "... with library AEC")
- set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_STATIC_LIBRARY})
- elseif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
EXTERNAL_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${HDF5_ENABLE_SZIP_ENCODING})
message (VERBOSE "Filter SZIP is built")
message (VERBOSE "... with library AEC")
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f5f5d191a3c..d96cc56ab4d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -222,6 +222,7 @@ set (HDF5_HL_CPP_SRC_DIR ${HDF5_SOURCE_DIR}/hl/c++)
set (HDF5_HL_TOOLS_DIR ${HDF5_SOURCE_DIR}/hl/tools)
set (HDF5_TOOLS_DIR ${HDF5_SOURCE_DIR}/tools)
set (HDF5_TOOLS_SRC_DIR ${HDF5_SOURCE_DIR}/tools/src)
+set (HDF5_TOOLS_TST_DIR ${HDF5_SOURCE_DIR}/tools/test)
set (HDF5_PERFORM_SRC_DIR ${HDF5_SOURCE_DIR}/tools/src/perform)
set (HDF5_UTILS_DIR ${HDF5_SOURCE_DIR}/utils)
set (HDF5_F90_SRC_DIR ${HDF5_SOURCE_DIR}/fortran)
@@ -449,6 +450,12 @@ include (${HDF_RESOURCES_DIR}/ConfigureChecks.cmake)
set (CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON)
+#-----------------------------------------------------------------------------
+# Include directories in the source or build tree should come before other
+# directories to prioritize headers in the sources over installed ones.
+#-----------------------------------------------------------------------------
+set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
+
#-----------------------------------------------------------------------------
# Mac OS X Options
#-----------------------------------------------------------------------------
@@ -722,6 +729,9 @@ set (HDF5_SRC_INCLUDE_DIRS
)
option (HDF5_ENABLE_SUBFILING_VFD "Build Parallel HDF5 Subfiling VFD" OFF)
if (HDF5_ENABLE_SUBFILING_VFD)
+ if (WIN32)
+ message (FATAL_ERROR " **** Subfiling is not supported on Windows **** ")
+ endif ()
if (NOT HDF5_ENABLE_PARALLEL)
message (FATAL_ERROR "Subfiling VFD requires a parallel HDF5 build")
else ()
@@ -730,7 +740,7 @@ if (HDF5_ENABLE_SUBFILING_VFD)
if (NOT H5_HAVE_MPI_Comm_split_type)
message (FATAL_ERROR "Subfiling VFD requires MPI-3 support for MPI_Comm_split_type")
endif ()
- endif()
+ endif ()
if (NOT DEFINED Threads_FOUND)
set (THREADS_PREFER_PTHREAD_FLAG ON)
@@ -846,13 +856,6 @@ option (HDF5_PACKAGE_EXTLIBS "CPACK - include external libraries" OFF)
if (NOT HDF5_EXTERNALLY_CONFIGURED)
if (HDF5_PACKAGE_EXTLIBS)
set (HDF5_NO_PACKAGES OFF CACHE BOOL "CPACK - Disable packaging" FORCE)
- if (HDF5_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND AND NOT BUILD_ZLIB_WITH_FETCHCONTENT)
- PACKAGE_ZLIB_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT})
- endif ()
-
- if (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND AND NOT BUILD_SZIP_WITH_FETCHCONTENT)
- PACKAGE_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT})
- endif ()
endif ()
endif ()
@@ -947,100 +950,7 @@ endif ()
#-----------------------------------------------------------------------------
option (BUILD_TESTING "Build HDF5 Unit Testing" ON)
if (BUILD_TESTING)
- set (DART_TESTING_TIMEOUT 1200
- CACHE STRING
- "Timeout in seconds for each test (default 1200=20minutes)"
- )
-
- # Generate a list of timeouts based on DART_TESTING_TIMEOUT
- math (EXPR CTEST_SHORT_TIMEOUT "${DART_TESTING_TIMEOUT} / 2")
- math (EXPR CTEST_LONG_TIMEOUT "${DART_TESTING_TIMEOUT} * 2")
- math (EXPR CTEST_VERY_LONG_TIMEOUT "${DART_TESTING_TIMEOUT} * 3")
-
- option (HDF5_TEST_API "Execute HDF5 API tests" OFF)
- mark_as_advanced (HDF5_TEST_API)
- if (HDF5_TEST_API)
- option (HDF5_TEST_API_INSTALL "Install HDF5 API tests" OFF)
- mark_as_advanced (HDF5_TEST_API_INSTALL)
-
- # Enable HDF5 Async API tests
- option (HDF5_TEST_API_ENABLE_ASYNC "Enable HDF5 Async API tests" OFF)
- mark_as_advanced (HDF5_TEST_API_ENABLE_ASYNC)
-
- # Build and use HDF5 test driver program for API tests
- option (HDF5_TEST_API_ENABLE_DRIVER "Enable HDF5 API test driver program" OFF)
- mark_as_advanced (HDF5_TEST_API_ENABLE_DRIVER)
- if (HDF5_TEST_API_ENABLE_DRIVER)
- set (HDF5_TEST_API_SERVER "" CACHE STRING "Server executable for running API tests")
- mark_as_advanced (HDF5_TEST_API_SERVER)
- endif ()
- endif ()
-
- option (HDF5_TEST_VFD "Execute tests with different VFDs" OFF)
- mark_as_advanced (HDF5_TEST_VFD)
- if (HDF5_TEST_VFD)
- option (HDF5_TEST_FHEAP_VFD "Execute tests with different VFDs" ON)
- mark_as_advanced (HDF5_TEST_FHEAP_VFD)
-
- # Initialize the list of VFDs to be used for testing and create a test folder for each VFD
- H5_SET_VFD_LIST()
- endif ()
-
- option (HDF5_TEST_PASSTHROUGH_VOL "Execute tests with different passthrough VOL connectors" OFF)
- mark_as_advanced (HDF5_TEST_PASSTHROUGH_VOL)
- if (HDF5_TEST_PASSTHROUGH_VOL)
- option (HDF5_TEST_FHEAP_PASSTHROUGH_VOL "Execute fheap test with different passthrough VOL connectors" ON)
- mark_as_advanced (HDF5_TEST_FHEAP_PASSTHROUGH VOL)
- endif ()
-
- set (H5_TEST_EXPRESS_LEVEL_DEFAULT "3")
- set (HDF_TEST_EXPRESS "${H5_TEST_EXPRESS_LEVEL_DEFAULT}"
- CACHE STRING "Control testing framework (0-3) (0 = exhaustive testing; 3 = quicker testing)")
- mark_as_advanced (HDF_TEST_EXPRESS)
- if (NOT "${HDF_TEST_EXPRESS}" STREQUAL "")
- set (H5_TEST_EXPRESS_LEVEL_DEFAULT "${HDF_TEST_EXPRESS}")
- endif ()
-
- enable_testing ()
- include (CTest)
-
- include (${HDF5_SOURCE_DIR}/CTestConfig.cmake)
- configure_file (${HDF_RESOURCES_DIR}/CTestCustom.cmake ${HDF5_BINARY_DIR}/CTestCustom.ctest @ONLY)
-
- option (HDF5_TEST_SERIAL "Execute non-parallel tests" ON)
- mark_as_advanced (HDF5_TEST_SERIAL)
-
- option (HDF5_TEST_TOOLS "Execute tools tests" ON)
- mark_as_advanced (HDF5_TEST_TOOLS)
-
- option (HDF5_TEST_EXAMPLES "Execute tests on examples" ON)
- mark_as_advanced (HDF5_TEST_EXAMPLES)
-
- option (HDF5_TEST_SWMR "Execute SWMR tests" ON)
- mark_as_advanced (HDF5_TEST_SWMR)
-
- option (HDF5_TEST_PARALLEL "Execute parallel tests" ON)
- mark_as_advanced (HDF5_TEST_PARALLEL)
-
- option (HDF5_TEST_FORTRAN "Execute fortran tests" ON)
- mark_as_advanced (HDF5_TEST_FORTRAN)
-
- option (HDF5_TEST_CPP "Execute cpp tests" ON)
- mark_as_advanced (HDF5_TEST_CPP)
-
- option (HDF5_TEST_JAVA "Execute java tests" ON)
- mark_as_advanced (HDF5_TEST_JAVA)
-
- if (NOT HDF5_EXTERNALLY_CONFIGURED)
- if (EXISTS "${HDF5_TEST_SRC_DIR}" AND IS_DIRECTORY "${HDF5_TEST_SRC_DIR}")
- add_subdirectory (test)
- endif ()
- if (H5_HAVE_PARALLEL)
- if (EXISTS "${HDF5_TEST_PAR_DIR}" AND IS_DIRECTORY "${HDF5_TEST_PAR_DIR}")
- add_subdirectory (testpar)
- endif ()
- endif ()
- endif ()
+ include (CMakeTests.cmake)
endif ()
#-----------------------------------------------------------------------------
diff --git a/CMakePlugins.cmake b/CMakePlugins.cmake
index 16fb8740fd9..b96d1ee0466 100644
--- a/CMakePlugins.cmake
+++ b/CMakePlugins.cmake
@@ -9,27 +9,41 @@
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
+option (PLUGIN_USE_EXTERNAL "Use External Library Building for filter PLUGIN" 0)
+
+set (PLUGIN_USE_EXTERNAL "Use External Library Building for PLUGIN" 1)
+if (NOT PLUGIN_USE_LOCALCONTENT)
+ set (PLUGIN_URL ${PLUGIN_TGZ_ORIGPATH}/${PLUGIN_TGZ_NAME})
+else ()
+ if (NOT H5PL_TGZPATH)
+ set (H5PL_TGZPATH ${TGZPATH})
+ endif ()
+ set (PLUGIN_URL ${H5PL_TGZPATH}/${PLUGIN_TGZ_NAME})
+endif ()
+message (STATUS "Filter PLUGIN file is ${PLUGIN_URL}")
include (ExternalProject)
#option (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO GIT TGZ)" "NO")
set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO GIT TGZ)")
set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO GIT TGZ)
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
- option (PLUGIN_USE_EXTERNAL "Use External Library Building for filter PLUGIN" 1)
+ set (PLUGIN_USE_EXTERNAL "Use External Library Building for PLUGIN" 1)
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT")
set (PLUGIN_URL ${PLUGIN_GIT_URL} CACHE STRING "Path to PLUGIN git repository")
set (PLUGIN_BRANCH ${PLUGIN_GIT_BRANCH})
elseif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
- if (NOT TGZPATH)
- set (TGZPATH ${HDF5_SOURCE_DIR})
+ if (NOT H5PL_TGZPATH)
+ set (H5PL_TGZPATH ${TGZPATH})
endif ()
- set (PLUGIN_URL ${TGZPATH}/${PLUGIN_TGZ_NAME})
- if (NOT EXISTS "${PLUGIN_URL}")
- set (HDF5_ENABLE_PLUGIN_SUPPORT OFF CACHE BOOL "" FORCE)
- message (STATUS "Filter PLUGIN file ${PLUGIN_URL} not found")
+ if (PLUGIN_USE_LOCALCONTENT)
+ if (NOT EXISTS "${PLUGIN_URL}")
+ set (HDF5_ENABLE_PLUGIN_SUPPORT OFF CACHE BOOL "" FORCE)
+ message (VERBOSE "Filter PLUGIN file ${PLUGIN_URL} not found")
+ endif ()
endif ()
else ()
set (PLUGIN_USE_EXTERNAL 0)
+ message (VERBOSE "Filter PLUGIN not built")
endif ()
endif ()
diff --git a/CMakePresets.json b/CMakePresets.json
index ee170446cf3..8e4c2c97573 100644
--- a/CMakePresets.json
+++ b/CMakePresets.json
@@ -9,22 +9,20 @@
"hidden": true,
"inherits": "ci-base",
"cacheVariables": {
- "HDF5_ALLOW_EXTERNAL_SUPPORT": "NO",
- "TGZPATH": {"type": "STRING", "value": "${sourceParentDir}/temp"}
+ "HDF5_ALLOW_EXTERNAL_SUPPORT": {"type": "STRING", "value": "TGZ"},
+ "TGZPATH": {"type": "PATH", "value": "${sourceParentDir}/temp"}
}
},
{
"name": "ci-CompressionVars",
"hidden": true,
"cacheVariables": {
- "BUILD_ZLIB_WITH_FETCHCONTENT": "ON",
"ZLIB_PACKAGE_NAME": {"type": "STRING", "value": "zlib"},
- "ZLIB_TGZ_ORIGPATH": {"type": "STRING", "value": "https://github.com/madler/zlib/releases/download/v1.2.13"},
- "ZLIB_TGZ_ORIGNAME": {"type": "STRING", "value": "zlib-1.2.13.tar.gz"},
- "BUILD_SZIP_WITH_FETCHCONTENT": "ON",
+ "ZLIB_TGZ_ORIGPATH": {"type": "STRING", "value": "https://github.com/madler/zlib/releases/download/v1.3"},
+ "ZLIB_TGZ_NAME": {"type": "STRING", "value": "zlib-1.3.tar.gz"},
"LIBAEC_PACKAGE_NAME": {"type": "STRING", "value": "libaec"},
"LIBAEC_TGZ_ORIGPATH": {"type": "STRING", "value": "https://github.com/MathisRosenhauer/libaec/releases/download/v1.0.6"},
- "LIBAEC_TGZ_ORIGNAME": {"type": "STRING", "value": "libaec-1.0.6.tar.gz"}
+ "LIBAEC_TGZ_NAME": {"type": "STRING", "value": "libaec-1.0.6.tar.gz"}
}
},
{
@@ -34,38 +32,36 @@
"cacheVariables": {
"HDF5_PACKAGE_EXTLIBS": "ON",
"ZLIB_USE_LOCALCONTENT": "OFF",
- "LIBAEC_USE_LOCALCONTENT": "OFF",
- "HDF5_ENABLE_SZIP_SUPPORT": "ON"
+ "LIBAEC_USE_LOCALCONTENT": "OFF"
}
},
{
"name": "ci-base-plugins",
"hidden": true,
"cacheVariables": {
- "PLUGIN_TGZ_NAME": {"type": "STRING", "value": "hdf5_plugins.tar.gz"},
- "PLUGIN_PACKAGE_NAME": {"type": "STRING", "value": "pl"},
- "BSHUF_TGZ_NAME": {"type": "STRING", "value": "bitshuffle.tar.gz"},
+ "PLUGIN_TGZ_NAME": {"type": "STRING", "value": "hdf5_plugins-master.tar.gz"},
+ "BSHUF_TGZ_NAME": {"type": "STRING", "value": "bitshuffle-0.5.1.tar.gz"},
"BSHUF_PACKAGE_NAME": {"type": "STRING", "value": "bshuf"},
- "BLOSC_TGZ_NAME": {"type": "STRING", "value": "c-blosc.tar.gz"},
+ "BLOSC_TGZ_NAME": {"type": "STRING", "value": "c-blosc-1.21.5.tar.gz"},
"BLOSC_PACKAGE_NAME": {"type": "STRING", "value": "blosc"},
- "BLOSC_ZLIB_TGZ_NAME": {"type": "STRING", "value": "ZLib.tar.gz"},
+ "BLOSC_ZLIB_TGZ_NAME": {"type": "STRING", "value": "zlib-1.3.tar.gz"},
"BLOSC_ZLIB_PACKAGE_NAME": {"type": "STRING", "value": "zlib"},
- "BZ2_TGZ_NAME": {"type": "STRING", "value": "BZ2.tar.gz"},
+ "BZ2_TGZ_NAME": {"type": "STRING", "value": "bzip2-bzip2-1.0.8.tar.gz"},
"BZ2_PACKAGE_NAME": {"type": "STRING", "value": "bz2"},
- "FPZIP_TGZ_NAME": {"type": "STRING", "value": "fpzip.tar.gz"},
+ "FPZIP_TGZ_NAME": {"type": "STRING", "value": "fpzip-1.3.0.tar.gz"},
"FPZIP_PACKAGE_NAME": {"type": "STRING", "value": "fpzip"},
- "JPEG_TGZ_NAME": {"type": "STRING", "value": "JPEG.tar.gz"},
+ "JPEG_TGZ_NAME": {"type": "STRING", "value": "jpegsrc.v9e.tar.gz"},
"JPEG_PACKAGE_NAME": {"type": "STRING", "value": "jpeg"},
"BUILD_LZ4_LIBRARY_SOURCE": "ON",
- "LZ4_TGZ_NAME": {"type": "STRING", "value": "lz4.tar.gz"},
+ "LZ4_TGZ_NAME": {"type": "STRING", "value": "lz4-1.9.4.tar.gz"},
"LZ4_PACKAGE_NAME": {"type": "STRING", "value": "lz4"},
- "LZF_TGZ_NAME": {"type": "STRING", "value": "lzf.tar.gz"},
+ "LZF_TGZ_NAME": {"type": "STRING", "value": "liblzf-3.6.tar.gz"},
"LZF_PACKAGE_NAME": {"type": "STRING", "value": "lzf"},
- "SZ_TGZ_NAME": {"type": "STRING", "value": "szf.tar.gz"},
+ "SZ_TGZ_NAME": {"type": "STRING", "value": "SZ-2.1.12.5.tar.gz"},
"SZ_PACKAGE_NAME": {"type": "STRING", "value": "SZ"},
- "ZFP_TGZ_NAME": {"type": "STRING", "value": "zfp.tar.gz"},
+ "ZFP_TGZ_NAME": {"type": "STRING", "value": "zfp-1.0.0.tar.gz"},
"ZFP_PACKAGE_NAME": {"type": "STRING", "value": "zfp"},
- "ZSTD_TGZ_NAME": {"type": "STRING", "value": "zstd.tar.gz"},
+ "ZSTD_TGZ_NAME": {"type": "STRING", "value": "zstd-1.5.5.tar.gz"},
"ZSTD_PACKAGE_NAME": {"type": "STRING", "value": "zstd"}
}
},
@@ -74,8 +70,10 @@
"hidden": true,
"cacheVariables": {
"HDF5_ENABLE_PLUGIN_SUPPORT": "ON",
- "PLUGIN_TGZ_ORIGPATH": {"type": "STRING", "value": "https://github.com/HDFGroup/hdf5_plugins/archive/refs/tags"},
- "PLUGIN_TGZ_ORIGNAME": {"type": "STRING", "value": "hdf5_plugins-master.tar.gz"}
+ "H5PL_ALLOW_EXTERNAL_SUPPORT": {"type": "STRING", "value": "TGZ"},
+ "PLUGIN_PACKAGE_NAME": {"type": "STRING", "value": "pl"},
+ "PLUGIN_TGZ_ORIGPATH": {"type": "STRING", "value": "https://github.com/HDFGroup/hdf5_plugins/releases/download/snapshot"},
+ "PLUGIN_TGZ_NAME": {"type": "STRING", "value": "hdf5_plugins-master.tar.gz"}
}
},
{
@@ -83,19 +81,17 @@
"hidden": true,
"inherits": ["ci-base-plugins", "ci-PluginsVars", "ci-base-tgz"],
"cacheVariables": {
- "H5PL_VERS_MAJOR": "1",
- "H5PL_VERS_MINOR": "14",
- "H5PL_VERS_RELEASE": "3"
+ "PLUGIN_USE_LOCALCONTENT": "OFF"
}
},
{
"name": "ci-ExamplesVars",
"hidden": true,
"cacheVariables": {
- "HDF5_EXAMPLES_COMPRESSED": {"type": "STRING", "value": "hdf5-examples-2.0.4.tar.gz"},
- "HDF5_EXAMPLES_COMPRESSED_DIR": {"type": "STRING", "value": "${sourceParentDir}/temp"},
- "EXAMPLES_TGZ_ORIGPATH": {"type": "STRING", "value": "https://github.com/HDFGroup/hdf5-examples/archive/refs/tags/"},
- "EXAMPLES_TGZ_ORIGNAME": {"type": "STRING", "value": "2.0.4.tar.gz"}
+ "HDF5_EXAMPLES_COMPRESSED": {"type": "STRING", "value": "hdf5-examples-master.tar.gz"},
+ "HDF5_EXAMPLES_COMPRESSED_DIR": {"type": "PATH", "value": "${sourceParentDir}/temp"},
+ "EXAMPLES_TGZ_ORIGPATH": {"type": "STRING", "value": "https://github.com/HDFGroup/hdf5-examples/releases/download/snapshot"},
+ "EXAMPLES_TGZ_ORIGNAME": {"type": "STRING", "value": "snapshot.tar.gz"}
}
},
{
@@ -112,7 +108,7 @@
{
"name": "ci-StdShar",
"hidden": true,
- "inherits": ["ci-StdCompression", "ci-StdExamples"],
+ "inherits": ["ci-StdCompression", "ci-StdExamples", "ci-StdPlugins"],
"cacheVariables": {
"HDF_PACKAGE_NAMESPACE": {"type": "STRING", "value": "hdf5::"},
"HDF5_INSTALL_MOD_FORTRAN": "NO",
@@ -187,7 +183,7 @@
"name": "ci-StdShar-GNUC",
"description": "GNUC Standard Build for x64 (Release)",
"configurePreset": "ci-StdShar-GNUC",
- "verbose": false,
+ "verbose": true,
"inherits": [
"ci-x64-Release-GNUC"
]
@@ -267,4 +263,4 @@
]
}
]
-}
\ No newline at end of file
+}
diff --git a/CMakeTests.cmake b/CMakeTests.cmake
new file mode 100644
index 00000000000..1dfa7007642
--- /dev/null
+++ b/CMakeTests.cmake
@@ -0,0 +1,109 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://www.hdfgroup.org/licenses.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+
+#-----------------------------------------------------------------------------
+# Dashboard and Testing Settings
+#-----------------------------------------------------------------------------
+ set (DART_TESTING_TIMEOUT 1200
+ CACHE STRING
+ "Timeout in seconds for each test (default 1200=20minutes)"
+ )
+
+ # Generate a list of timeouts based on DART_TESTING_TIMEOUT
+ math (EXPR CTEST_SHORT_TIMEOUT "${DART_TESTING_TIMEOUT} / 2")
+ math (EXPR CTEST_LONG_TIMEOUT "${DART_TESTING_TIMEOUT} * 2")
+ math (EXPR CTEST_VERY_LONG_TIMEOUT "${DART_TESTING_TIMEOUT} * 3")
+
+ option (HDF5_TEST_API "Execute HDF5 API tests" OFF)
+ mark_as_advanced (HDF5_TEST_API)
+ if (HDF5_TEST_API)
+ option (HDF5_TEST_API_INSTALL "Install HDF5 API tests" OFF)
+ mark_as_advanced (HDF5_TEST_API_INSTALL)
+
+ # Enable HDF5 Async API tests
+ option (HDF5_TEST_API_ENABLE_ASYNC "Enable HDF5 Async API tests" OFF)
+ mark_as_advanced (HDF5_TEST_API_ENABLE_ASYNC)
+
+ # Build and use HDF5 test driver program for API tests
+ option (HDF5_TEST_API_ENABLE_DRIVER "Enable HDF5 API test driver program" OFF)
+ mark_as_advanced (HDF5_TEST_API_ENABLE_DRIVER)
+ if (HDF5_TEST_API_ENABLE_DRIVER)
+ set (HDF5_TEST_API_SERVER "" CACHE STRING "Server executable for running API tests")
+ mark_as_advanced (HDF5_TEST_API_SERVER)
+ endif ()
+ endif ()
+
+ option (HDF5_TEST_VFD "Execute tests with different VFDs" OFF)
+ mark_as_advanced (HDF5_TEST_VFD)
+ if (HDF5_TEST_VFD)
+ option (HDF5_TEST_FHEAP_VFD "Execute tests with different VFDs" ON)
+ mark_as_advanced (HDF5_TEST_FHEAP_VFD)
+
+ # Initialize the list of VFDs to be used for testing and create a test folder for each VFD
+ H5_SET_VFD_LIST()
+ endif ()
+
+ option (HDF5_TEST_PASSTHROUGH_VOL "Execute tests with different passthrough VOL connectors" OFF)
+ mark_as_advanced (HDF5_TEST_PASSTHROUGH_VOL)
+ if (HDF5_TEST_PASSTHROUGH_VOL)
+ option (HDF5_TEST_FHEAP_PASSTHROUGH_VOL "Execute fheap test with different passthrough VOL connectors" ON)
+ mark_as_advanced (HDF5_TEST_FHEAP_PASSTHROUGH VOL)
+ endif ()
+
+ set (H5_TEST_EXPRESS_LEVEL_DEFAULT "3")
+ set (HDF_TEST_EXPRESS "${H5_TEST_EXPRESS_LEVEL_DEFAULT}"
+ CACHE STRING "Control testing framework (0-3) (0 = exhaustive testing; 3 = quicker testing)")
+ mark_as_advanced (HDF_TEST_EXPRESS)
+ if (NOT "${HDF_TEST_EXPRESS}" STREQUAL "")
+ set (H5_TEST_EXPRESS_LEVEL_DEFAULT "${HDF_TEST_EXPRESS}")
+ endif ()
+
+ enable_testing ()
+ include (CTest)
+
+ include (${HDF5_SOURCE_DIR}/CTestConfig.cmake)
+ configure_file (${HDF_RESOURCES_DIR}/CTestCustom.cmake ${HDF5_BINARY_DIR}/CTestCustom.ctest @ONLY)
+
+ option (HDF5_TEST_SERIAL "Execute non-parallel tests" ON)
+ mark_as_advanced (HDF5_TEST_SERIAL)
+
+ option (HDF5_TEST_TOOLS "Execute tools tests" ON)
+ mark_as_advanced (HDF5_TEST_TOOLS)
+
+ option (HDF5_TEST_EXAMPLES "Execute tests on examples" ON)
+ mark_as_advanced (HDF5_TEST_EXAMPLES)
+
+ option (HDF5_TEST_SWMR "Execute SWMR tests" ON)
+ mark_as_advanced (HDF5_TEST_SWMR)
+
+ option (HDF5_TEST_PARALLEL "Execute parallel tests" ON)
+ mark_as_advanced (HDF5_TEST_PARALLEL)
+
+ option (HDF5_TEST_FORTRAN "Execute fortran tests" ON)
+ mark_as_advanced (HDF5_TEST_FORTRAN)
+
+ option (HDF5_TEST_CPP "Execute cpp tests" ON)
+ mark_as_advanced (HDF5_TEST_CPP)
+
+ option (HDF5_TEST_JAVA "Execute java tests" ON)
+ mark_as_advanced (HDF5_TEST_JAVA)
+
+ if (NOT HDF5_EXTERNALLY_CONFIGURED)
+ if (EXISTS "${HDF5_TEST_SRC_DIR}" AND IS_DIRECTORY "${HDF5_TEST_SRC_DIR}")
+ add_subdirectory (test)
+ endif ()
+ if (H5_HAVE_PARALLEL)
+ if (EXISTS "${HDF5_TEST_PAR_DIR}" AND IS_DIRECTORY "${HDF5_TEST_PAR_DIR}")
+ add_subdirectory (testpar)
+ endif ()
+ endif ()
+ endif ()
diff --git a/CMakeVOL.cmake b/CMakeVOL.cmake
index 86e9d1d5596..79afa59a2fb 100644
--- a/CMakeVOL.cmake
+++ b/CMakeVOL.cmake
@@ -107,7 +107,6 @@ if (HDF5_VOL_ALLOW_EXTERNAL)
option ("HDF5_VOL_${hdf5_vol_name_upper}_TEST_PARALLEL" "Whether to test VOL connector '${hdf5_vol_name}' against the parallel API tests" OFF)
mark_as_advanced ("HDF5_VOL_${hdf5_vol_name_upper}_NAME")
- mark_as_advanced ("HDF5_VOL_${hdf5_vol_name_upper}_BRANCH")
mark_as_advanced ("HDF5_VOL_${hdf5_vol_name_upper}_TEST_PARALLEL")
if (HDF5_TEST_API)
diff --git a/bin/h5vers b/bin/h5vers
index 1133451a407..7a07f68d75c 100755
--- a/bin/h5vers
+++ b/bin/h5vers
@@ -199,7 +199,7 @@ my $TESTH5_JAVA = $file;
$TESTH5_JAVA =~ s/[^\/]*$/..\/java\/test\/TestH5.java/;
die "unable to read file: $TESTH5_JAVA\n" unless -r $file;
my $REPACK_LAYOUT_PLUGIN_VERSION = $file;
-$REPACK_LAYOUT_PLUGIN_VERSION =~ s/[^\/]*$/..\/tools\/test\/h5repack\/testfiles\/h5repack_layout.h5-plugin_version_test.ddl/;
+$REPACK_LAYOUT_PLUGIN_VERSION =~ s/[^\/]*$/..\/tools\/test\/h5repack\/expected\/h5repack_layout.h5-plugin_version_test.ddl/;
die "unable to read file: $REPACK_LAYOUT_PLUGIN_VERSION\n" unless -r $file;
# Get the current version number.
@@ -398,7 +398,7 @@ if ($TESTH5_JAVA) {
write_file($TESTH5_JAVA, $data);
}
-# Update the tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl file
+# Update the tools/test/h5repack/expected/h5repack_layout.h5-plugin_version_test.ddl file
if ($REPACK_LAYOUT_PLUGIN_VERSION) {
my $data = read_file($REPACK_LAYOUT_PLUGIN_VERSION);
my $version_string = sprintf("%d %d %d", @newver[0,1,2]);
diff --git a/bin/make_err b/bin/make_err
index eb9e909abd1..064d66c9456 100755
--- a/bin/make_err
+++ b/bin/make_err
@@ -244,7 +244,7 @@ sub create_init ($) {
print HEADER " "x(0*$indent),"assert(${name}_g==(-1));\n";
print HEADER " "x(0*$indent),"if((msg = H5E__create_msg(cls, H5E_MAJOR, \"${major{$name}}\"))==NULL)\n";
print HEADER " "x(1*$indent),"HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, \"error message initialization failed\");\n";
- print HEADER " "x(0*$indent),"if((${name}_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)\n";
+ print HEADER " "x(0*$indent),"if((${name}_g = H5I_register(H5I_ERROR_MSG, msg, false))<0)\n";
print HEADER " "x(1*$indent),"HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, \"can't register error message\");\n";
}
@@ -260,7 +260,7 @@ sub create_init ($) {
print HEADER " "x(0*$indent),"assert(${name}_g==(-1));\n";
print HEADER " "x(0*$indent),"if((msg = H5E__create_msg(cls, H5E_MINOR, \"${minor{$name}}\"))==NULL)\n";
print HEADER " "x(1*$indent),"HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, \"error message initialization failed\");\n";
- print HEADER " "x(0*$indent),"if((${name}_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)\n";
+ print HEADER " "x(0*$indent),"if((${name}_g = H5I_register(H5I_ERROR_MSG, msg, true))<0)\n";
print HEADER " "x(1*$indent),"HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, \"can't register error message\");\n";
}
}
diff --git a/bin/release b/bin/release
index 1226d33d8a1..26a756ccfe0 100755
--- a/bin/release
+++ b/bin/release
@@ -42,36 +42,36 @@ for compressing the resulting tar archive (if none are given then
using CMake on unix machines.
cmake-zip -- convert all text files to DOS style and create a zip file including cmake
scripts and .bat files to build HDF5 source using CMake on Windows.
- hpc-cmake-tgz
- -- create a tar file using the gzip default level with a build-unix.sh
- command file and all other CMake files needed to build HDF5 source
- using CMake on unix machines, with HDF5options.cmake files for serial
- and parallel builds on machines requiring batch jobs to run tests.
- The default is for parallel build, with serial only build by changing
- the HDF5options.cmake symlink to ser-HDF5options.cmake. More
- information is available in the README_HPC file.
doc -- produce the latest doc tree in addition to the archive.
-A sha256 checksum is produced for each archive created and stored in the sha256 file.
+A sha256 checksum is produced for each archive created and stored in a corresponding sha256 file.
Examples:
$ bin/release -d /tmp
/tmp/hdf5-1.8.13-RELEASE.txt
- /tmp/hdf5-1.8.13.sha256
/tmp/hdf5-1.8.13.tar
+ /tmp/hdf5-1.8.13.tar.sha256
$ bin/release -d /tmp gzip
/tmp/hdf5-1.8.13-RELEASE.txt
- /tmp/hdf5-1.8.13.sha256
+ /tmp/hdf5-1.8.13.tar
+ /tmp/hdf5-1.8.13.tar.sha256
/tmp/hdf5-1.8.13.tar.gz
+ /tmp/hdf5-1.8.13.tar.gz.sha256
$ bin/release -d /tmp tar gzip zip
/tmp/hdf5-1.8.13-RELEASE.txt
- /tmp/hdf5-1.8.13.sha256
/tmp/hdf5-1.8.13.tar
+ /tmp/hdf5-1.8.13.tar.sha256
/tmp/hdf5-1.8.13.tar.gz
- /tmp/hdf5-1.8.13.tar.zip
+ /tmp/hdf5-1.8.13.tar.gz.sha256
+ /tmp/hdf5-1.8.13.zip
+ /tmp/hdf5-1.8.13.zip.sha256
+
+The integrity of a downloaded file can be verified on Linux platforms by running
+"sha256sum --check .sha256, which will display 'OK' if the calculated
+checksum of matches the checksum in .sha256.
EOF
@@ -205,7 +205,7 @@ tar2cmakezip()
# step 3: add LIBAEC.tar.gz, ZLib.tar.gz and cmake files
cp /mnt/scr1/pre-release/hdf5/CMake/LIBAEC.tar.gz $cmziptmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmziptmpsubdir
- cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-2.0.3-Source.zip $cmziptmpsubdir
+ cp /mnt/scr1/pre-release/hdf5/CMake/hdf5-examples-master.zip $cmziptmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/hdf5_plugins-master.zip $cmziptmpsubdir
cp $cmziptmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmziptmpsubdir
cp $cmziptmpsubdir/$version/config/cmake/scripts/HDF5config.cmake $cmziptmpsubdir
@@ -297,7 +297,7 @@ tar2cmaketgz()
# step 3: add LIBAEC.tar.gz, ZLib.tar.gz and cmake files
cp /mnt/scr1/pre-release/hdf5/CMake/LIBAEC.tar.gz $cmgztmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmgztmpsubdir
- cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-2.0.3-Source.tar.gz $cmgztmpsubdir
+ cp /mnt/scr1/pre-release/hdf5/CMake/hdf5-examples-master.tar.gz $cmgztmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/hdf5_plugins-master.tar.gz $cmgztmpsubdir
cp $cmgztmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmgztmpsubdir
cp $cmgztmpsubdir/$version/config/cmake/scripts/HDF5config.cmake $cmgztmpsubdir
@@ -308,88 +308,6 @@ tar2cmaketgz()
rm -rf $cmgztmpdir
}
-# Function name: tar2hpccmaketgz
-# Convert the release tarball to a gzipped tarfile with files to run CMake build
-# and HDF5options.cmake files for parallel or serial only builds where build
-# tests are run on compute nodes using batch scripts.
-#
-# Steps:
-# 1. untar the tarball in a temporary directory;
-# Note: do this in a temporary directory to avoid changing
-# the original source directory which may be around.
-# 2. add build-unix.sh script.
-# 3. add LIBAEC.tar.gz, ZLib.tar.gz and cmake files to top level directory.
-# 4. create gzipped tar file with these contents:
-# build-unix.sh script
-# hdf5- source code directory extracted from tar file
-# CTestScript.cmake cmake file copied from /config/cmake/scripts
-# HDF5config.cmake cmake file copied from /config/cmake/scripts
-# HDF5options.cmake cmake file copied from /config/cmake/scripts
-# LIBAEC.tar.gz copied from /mnt/scr1/pre-release/hdf5/CMake
-# ZLib.tar.gz copied from /mnt/scr1/pre-release/hdf5/CMake
-#
-# 5. For HPC-CMake tgz file the following are also needed in the top-level directory:
-# README_HPC copied from release_docs
-# ser-HDF5options.cmake copied from /config/cmake/scripts/HPC
-# par-HDF5options.cmake copied from /config/cmake/scripts/HPC
-# HDF5options.cmake symlink to par-HDF5options.cmake
-#
-
-# Parameters:
-# $1 version
-# $2 release tarball
-# $3 output zipball file name
-#
-# Returns 0 if successful; 1 otherwise
-#
- # need function to create another temporary directory, extract the
- # $tmpdir/$HDF5_VERS.tar into it, create build-unix.sh,
- # add CTestScript.cmake, HDF5config.cmake, LIBAEC.tar.gz
- # ZLib.tar.gz, HDF5 examples, and then tar.gz it.
-tar2hpccmaketgz()
-{
- if [ $# -ne 3 ]; then
- echo "usage: tar2hpccmaketgz "
- return 1
- fi
- cmgztmpdir=/tmp/cmgztmpdir$$
- cmgztmpsubdir=$cmgztmpdir/HPC-CMake-$HDF5_VERS
- mkdir -p $cmgztmpsubdir
- version=$1
- tarfile=$2
- tgzfile=$3
-
- # step 1: untar tarball in cmgztmpdir
- (cd $cmgztmpsubdir; tar xf -) < $tarfile
- # sanity check
- if [ ! -d $cmgztmpsubdir/$version ]; then
- echo "untar did not create $cmgztmpsubdir/$version source dir"
- # cleanup
- rm -rf $cmgztmpdir
- return 1
- fi
-
-
- # step 2: add build-unix.sh script
- (cd $cmgztmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=Unix -C Release -V -O hdf5.log" > build-unix.sh; chmod 755 build-unix.sh)
-
- # step 3: add LIBAEC.tar.gz, ZLib.tar.gz and cmake files
- cp /mnt/scr1/pre-release/hdf5/CMake/LIBAEC.tar.gz $cmgztmpsubdir
- cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmgztmpsubdir
- cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-2.0.3-Source.tar.gz $cmgztmpsubdir
- cp /mnt/scr1/pre-release/hdf5/CMake/hdf5_plugins-master.tar.gz $cmgztmpsubdir
- cp $cmgztmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmgztmpsubdir
- cp $cmgztmpsubdir/$version/config/cmake/scripts/HDF5config.cmake $cmgztmpsubdir
-
- cp $cmgztmpsubdir/$version/release_docs/README_HPC $cmgztmpsubdir
- cp $cmgztmpsubdir/$version/config/cmake/scripts/HPC/ser-HDF5options.cmake $cmgztmpsubdir
- cp $cmgztmpsubdir/$version/config/cmake/scripts/HPC/par-HDF5options.cmake $cmgztmpsubdir
- (cd $cmgztmpsubdir; ln -s par-HDF5options.cmake HDF5options.cmake)
- tar czf $DEST/HPC-CMake-$HDF5_VERS.tar.gz -C $cmgztmpdir . || exit 1
-
- # cleanup
- rm -rf $cmgztmpdir
-}
# This command must be run at the top level of the hdf5 source directory.
# Verify this requirement.
@@ -551,43 +469,38 @@ test "$verbose" && echo " Running tar..." 1>&2
(cd "$tmpdir" && exec tar -ch --exclude-vcs -f "$HDF5_VERS.tar" "./$HDF5_IN_VERS" || exit 1 )
# Compress
-SHA256=$HDF5_VERS.sha256
+#SHA256=$HDF5_VERS.sha256
cp /dev/null $DEST/$SHA256
for comp in $methods; do
case $comp in
tar)
cp -p $tmpdir/$HDF5_VERS.tar $DEST/$HDF5_VERS.tar
- (cd $DEST; sha256sum $HDF5_VERS.tar >> $SHA256)
+ (cd $DEST; sha256sum $HDF5_VERS.tar > $HDF5_VERS.tar.sha256)
;;
gzip)
test "$verbose" && echo " Running gzip..." 1>&2
gzip -9 <$tmpdir/$HDF5_VERS.tar >$DEST/$HDF5_VERS.tar.gz
- (cd $DEST; sha256sum $HDF5_VERS.tar.gz >> $SHA256)
+ (cd $DEST; sha256sum $HDF5_VERS.tar.gz > $HDF5_VERS.tar.gz.sha256)
;;
cmake-tgz)
test "$verbose" && echo " Creating CMake tar.gz file..." 1>&2
tar2cmaketgz $HDF5_VERS $tmpdir/$HDF5_VERS.tar $DEST/CMake-$HDF5_VERS.tar.gz 1>&2
- (cd $DEST; sha256sum CMake-$HDF5_VERS.tar.gz >> $SHA256)
- ;;
- hpc-cmake-tgz)
- test "$verbose" && echo " Creating HPC-CMake tar.gz file..." 1>&2
- tar2hpccmaketgz $HDF5_VERS $tmpdir/$HDF5_VERS.tar $DEST/HPC-CMake-$HDF5_VERS.tar.gz 1>&2
- (cd $DEST; sha256sum HPC-CMake-$HDF5_VERS.tar.gz >> $SHA256)
+ (cd $DEST; sha256sum CMake-$HDF5_VERS.tar.gz > CMake-$HDF5_VERS.tar.gz.sha256)
;;
bzip2)
test "$verbose" && echo " Running bzip2..." 1>&2
bzip2 -9 <$tmpdir/$HDF5_VERS.tar >$DEST/$HDF5_VERS.tar.bz2
- (cd $DEST; sha256sum $HDF5_VERS.tar.bz2 >> $SHA256)
+ (cd $DEST; sha256sum $HDF5_VERS.tar.bz2 > $HDF5_VERS.tar.bz2.sha256)
;;
zip)
test "$verbose" && echo " Creating zip ball..." 1>&2
tar2zip $HDF5_IN_VERS $tmpdir/$HDF5_VERS.tar $DEST/$HDF5_VERS.zip 1>&2
- (cd $DEST; sha256sum $HDF5_VERS.zip >> $SHA256)
+ (cd $DEST; sha256sum $HDF5_VERS.zip > $HDF5_VERS.zip.sha256)
;;
cmake-zip)
test "$verbose" && echo " Creating CMake-zip ball..." 1>&2
tar2cmakezip $HDF5_VERS $tmpdir/$HDF5_VERS.tar $DEST/CMake-$HDF5_VERS.zip 1>&2
- (cd $DEST; sha256sum CMake-$HDF5_VERS.zip >> $SHA256)
+ (cd $DEST; sha256sum CMake-$HDF5_VERS.zip > CMake-$HDF5_VERS.zip.sha256)
;;
doc)
if [ "${DOCVERSION}" = "" ]; then
diff --git a/c++/src/H5DcreatProp.cpp b/c++/src/H5DcreatProp.cpp
index 3d0193dbec0..8b199a8091b 100644
--- a/c++/src/H5DcreatProp.cpp
+++ b/c++/src/H5DcreatProp.cpp
@@ -368,7 +368,7 @@ DSetCreatPropList::setFilter(H5Z_filter_t filter_id, unsigned int flags, size_t
///\exception H5::PropListIException
///\par Description
/// Deletes a filter from the dataset creation property list;
-/// deletes all filters if \a filter_id is \c H5Z_FILTER_NONE.
+/// deletes all filters if \a filter_id is \c H5Z_FILTER_ALL.
//--------------------------------------------------------------------------
void
DSetCreatPropList::removeFilter(H5Z_filter_t filter_id) const
diff --git a/c++/test/tarray.cpp b/c++/test/tarray.cpp
index f616dcde633..2d14264f006 100644
--- a/c++/test/tarray.cpp
+++ b/c++/test/tarray.cpp
@@ -220,7 +220,7 @@ test_array_compound_array()
// Check the 2nd field's name
H5std_string field2_name = ctype_check.getMemberName(1);
- if (HDstrcmp(field2_name.c_str(), "f") != 0)
+ if (strcmp(field2_name.c_str(), "f") != 0)
TestErrPrintf("Compound field name doesn't match!, field2_name=%s\n", field2_name.c_str());
// Get the 2nd field's datatype
diff --git a/c++/test/tattr.cpp b/c++/test/tattr.cpp
index e018ab1ee09..2f011d01ac7 100644
--- a/c++/test/tattr.cpp
+++ b/c++/test/tattr.cpp
@@ -1604,7 +1604,7 @@ test_string_attr(FileAccPropList &fapl)
// Read and verify the attribute string as a string of chars.
char flstring_att_check[ATTR_LEN];
gr_flattr1.read(fls_type, flstring_att_check);
- if (HDstrcmp(flstring_att_check, ATTRSTR_DATA.c_str()) != 0)
+ if (strcmp(flstring_att_check, ATTRSTR_DATA.c_str()) != 0)
TestErrPrintf("Line %d: Attribute data different: ATTRSTR_DATA=%s,flstring_att_check=%s\n",
__LINE__, ATTRSTR_DATA.c_str(), flstring_att_check);
@@ -1614,7 +1614,7 @@ test_string_attr(FileAccPropList &fapl)
char *fl_dyn_string_att_check;
fl_dyn_string_att_check = new char[attr_size + 1];
gr_flattr1.read(fls_type, fl_dyn_string_att_check);
- if (HDstrcmp(fl_dyn_string_att_check, ATTRSTR_DATA.c_str()) != 0)
+ if (strcmp(fl_dyn_string_att_check, ATTRSTR_DATA.c_str()) != 0)
TestErrPrintf("Line %d: Attribute data different: ATTRSTR_DATA=%s,flstring_att_check=%s\n",
__LINE__, ATTRSTR_DATA.c_str(), fl_dyn_string_att_check);
delete[] fl_dyn_string_att_check;
@@ -1629,9 +1629,9 @@ test_string_attr(FileAccPropList &fapl)
ATTRSTR_DATA.c_str(), read_flstr1.c_str());
// Read and verify the attribute string as a string of chars.
- HDstrcpy(flstring_att_check, "");
+ strcpy(flstring_att_check, "");
gr_flattr2.read(fls_type, flstring_att_check);
- if (HDstrcmp(flstring_att_check, ATTRSTR_DATA.c_str()) != 0)
+ if (strcmp(flstring_att_check, ATTRSTR_DATA.c_str()) != 0)
TestErrPrintf("Line %d: Attribute data different: ATTRSTR_DATA=%s,flstring_att_check=%s\n",
__LINE__, ATTRSTR_DATA.c_str(), flstring_att_check);
@@ -1660,7 +1660,7 @@ test_string_attr(FileAccPropList &fapl)
// Read and verify the attribute string as a string of chars.
char *string_att_check;
gr_vlattr.read(vls_type, &string_att_check);
- if (HDstrcmp(string_att_check, ATTRSTR_DATA.c_str()) != 0)
+ if (strcmp(string_att_check, ATTRSTR_DATA.c_str()) != 0)
TestErrPrintf("Line %d: Attribute data different: ATTRSTR_DATA=%s,string_att_check=%s\n",
__LINE__, ATTRSTR_DATA.c_str(), string_att_check);
free(string_att_check);
diff --git a/c++/test/titerate.cpp b/c++/test/titerate.cpp
index 4c84d8077d6..b9196d43976 100644
--- a/c++/test/titerate.cpp
+++ b/c++/test/titerate.cpp
@@ -78,7 +78,7 @@ static void printelems(const Group &group, const H5std_string &dsname, const H5s
static int
iter_strcmp(const void *s1, const void *s2)
{
- return (HDstrcmp(*reinterpret_cast(s1), *reinterpret_cast(s2)));
+ return (strcmp(*reinterpret_cast(s1), *reinterpret_cast(s2)));
}
/*-------------------------------------------------------------------------
@@ -95,7 +95,7 @@ liter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2_t H5_ATTR
static int count = 0;
static int count2 = 0;
- HDstrcpy(info->name, name);
+ strcpy(info->name, name);
switch (info->command) {
case RET_ZERO:
@@ -162,18 +162,18 @@ test_iter_group(FileAccPropList &fapl)
DataSet dataset = file.createDataSet(name, datatype, filespace);
/* Keep a copy of the dataset names */
- lnames[i] = HDstrdup(name);
- check_values(lnames[i], "HDstrdup returns NULL", __LINE__, __FILE__);
+ lnames[i] = strdup(name);
+ check_values(lnames[i], "strdup returns NULL", __LINE__, __FILE__);
}
/* Create a group and named datatype under root group for testing */
Group grp(file.createGroup(GROUP1, 0));
- lnames[NDATASETS] = HDstrdup("grp");
- check_values(lnames[NDATASETS], "HDstrdup returns NULL", __LINE__, __FILE__);
+ lnames[NDATASETS] = strdup("grp");
+ check_values(lnames[NDATASETS], "strdup returns NULL", __LINE__, __FILE__);
datatype.commit(file, "dtype");
- lnames[NDATASETS + 1] = HDstrdup("dtype");
- check_values(lnames[NDATASETS], "HDstrdup returns NULL", __LINE__, __FILE__);
+ lnames[NDATASETS + 1] = strdup("dtype");
+ check_values(lnames[NDATASETS], "strdup returns NULL", __LINE__, __FILE__);
/* Sort the dataset names */
qsort(lnames, NDATASETS + 2, sizeof(char *), iter_strcmp);
@@ -301,7 +301,7 @@ test_iter_group(FileAccPropList &fapl)
TestErrPrintf("Group iteration function walked too far!\n");
/* Verify that the correct name is retrieved */
- if(HDstrcmp(info.name, lnames[(size_t)(idx - 1)]) != 0)
+ if(strcmp(info.name, lnames[(size_t)(idx - 1)]) != 0)
TestErrPrintf("Group iteration function didn't return name correctly for link - lnames[%u] = '%s'!\n", (unsigned)(idx - 1), lnames[(size_t)(idx - 1)]);
} /* end while */
verify_val(ret, -1, "H5Literate", __LINE__, __FILE__);
@@ -327,7 +327,7 @@ test_iter_group(FileAccPropList &fapl)
TestErrPrintf("Group iteration function walked too far!\n");
/* Verify that the correct name is retrieved */
- if(HDstrcmp(info.name, lnames[(size_t)(idx - 1)]) != 0)
+ if(strcmp(info.name, lnames[(size_t)(idx - 1)]) != 0)
TestErrPrintf("Group iteration function didn't return name correctly for link - lnames[%u] = '%s'!\n", (unsigned)(idx - 1), lnames[(size_t)(idx - 1)]);
} /* end while */
verify_val(ret, -1, "H5Literate", __LINE__, __FILE__);
diff --git a/c++/test/tobject.cpp b/c++/test/tobject.cpp
index 741c628f84c..0affed1f838 100644
--- a/c++/test/tobject.cpp
+++ b/c++/test/tobject.cpp
@@ -307,7 +307,7 @@ test_get_objname_ontypes()
// Name this datatype
new_int_type.commit(grp, "IntType NATIVE_INT");
ssize_t name_len = new_int_type.getObjName(type_name); // default len
- verify_val(name_len, static_cast(HDstrlen("/typetests/IntType NATIVE_INT")),
+ verify_val(name_len, static_cast(strlen("/typetests/IntType NATIVE_INT")),
"DataType::getObjName", __LINE__, __FILE__);
verify_val(type_name, "/typetests/IntType NATIVE_INT", "DataType::getObjName", __LINE__, __FILE__);
diff --git a/c++/test/tvlstr.cpp b/c++/test/tvlstr.cpp
index 748333fa407..33710a3ba17 100644
--- a/c++/test/tvlstr.cpp
+++ b/c++/test/tvlstr.cpp
@@ -158,7 +158,7 @@ test_vlstring_dataset()
// Read and verify the dataset string as a string of chars.
dset1.read(&string_ds_check, vlst);
- if (HDstrcmp(string_ds_check, DSET1_DATA.c_str()) != 0)
+ if (strcmp(string_ds_check, DSET1_DATA.c_str()) != 0)
TestErrPrintf("Line %d: Attribute data different: DSET1_DATA=%s,string_ds_check=%s\n", __LINE__,
DSET1_DATA.c_str(), string_ds_check);
@@ -186,7 +186,7 @@ test_vlstring_dataset()
dset1.read(&string_ds_check, vlst);
// Verify data read.
- if (HDstrcmp(string_ds_check, dynstring_ds_write) != 0)
+ if (strcmp(string_ds_check, dynstring_ds_write) != 0)
TestErrPrintf("VL string datasets don't match!, dynstring_ds_write=%s, string_ds_check=%s\n",
dynstring_ds_write, string_ds_check);
free(string_ds_check);
@@ -256,7 +256,7 @@ test_vlstring_array_dataset()
hsize_t ii;
for (ii = 0; ii < SPACE1_DIM1; ii++) {
- if (HDstrcmp(string_ds_check[ii], string_ds_array[ii]) != 0)
+ if (strcmp(string_ds_check[ii], string_ds_array[ii]) != 0)
TestErrPrintf("Line %d: Dataset data different: written=%s,read=%s\n", __LINE__,
string_ds_array[ii], string_ds_check[ii]);
@@ -282,7 +282,7 @@ test_vlstring_array_dataset()
char *rdata2;
dataset2.read(&rdata2, vlst);
- if (HDstrcmp(wdata2, rdata2) != 0)
+ if (strcmp(wdata2, rdata2) != 0)
TestErrPrintf("Line %d: Dataset data different: written=%s,read=%s\n", __LINE__, wdata2, rdata2);
// Release resources from second dataset operation.
@@ -355,15 +355,15 @@ test_vlstrings_special()
// Compare data read in.
for (ii = 0; ii < SPACE1_DIM1; ii++) {
- size_t wlen = HDstrlen(wdata[ii]);
- size_t rlen = HDstrlen(rdata[ii]);
+ size_t wlen = strlen(wdata[ii]);
+ size_t rlen = strlen(rdata[ii]);
if (wlen != rlen) {
TestErrPrintf("VL data lengths don't match!, strlen(wdata[%d])=%u, strlen(rdata[%d])=%u\n",
static_cast(ii), static_cast(wlen), static_cast(ii),
static_cast(rlen));
continue;
}
- if (HDstrcmp(wdata[ii], rdata[ii]) != 0) {
+ if (strcmp(wdata[ii], rdata[ii]) != 0) {
TestErrPrintf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n",
static_cast(ii), wdata[ii], static_cast(ii), rdata[ii]);
continue;
@@ -562,13 +562,13 @@ test_compact_vlstring()
// Compare data read in
hsize_t i;
for (i = 0; i < SPACE1_DIM1; i++) {
- if (HDstrlen(wdata[i]) != strlen(rdata[i])) {
+ if (strlen(wdata[i]) != strlen(rdata[i])) {
TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",
- static_cast(i), static_cast(HDstrlen(wdata[i])), static_cast(i),
- static_cast(HDstrlen(rdata[i])));
+ static_cast(i), static_cast(strlen(wdata[i])), static_cast(i),
+ static_cast(strlen(rdata[i])));
continue;
} // end if
- if (HDstrcmp(wdata[i], rdata[i]) != 0) {
+ if (strcmp(wdata[i], rdata[i]) != 0) {
TestErrPrintf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n",
static_cast(i), wdata[i], static_cast(i), rdata[i]);
continue;
@@ -634,7 +634,7 @@ test_vlstring_attribute()
// Read and verify the attribute string as a string of chars.
char *string_att_check;
gr_attr.read(vlst, &string_att_check);
- if (HDstrcmp(string_att_check, ATTRSTR_DATA.c_str()) != 0)
+ if (strcmp(string_att_check, ATTRSTR_DATA.c_str()) != 0)
TestErrPrintf("Line %d: Attribute data different: ATTRSTR_DATA=%s,string_att_check=%s\n",
__LINE__, ATTRSTR_DATA.c_str(), string_att_check);
@@ -661,7 +661,7 @@ test_vlstring_attribute()
gr_attr.read(vlst, &string_att_check);
// Verify data read.
- if (HDstrcmp(string_att_check, string_att_write) != 0)
+ if (strcmp(string_att_check, string_att_write) != 0)
TestErrPrintf("VL string attributes don't match!, string_att_write=%s, string_att_check=%s\n",
string_att_write, string_att_check);
@@ -709,7 +709,7 @@ static void test_read_vl_string_attribute()
// Test reading "normal" sized string attribute
char *string_att_check;
att.read(vlst, &string_att_check);
- if(HDstrcmp(string_att_check,ATTRSTR_DATA.c_str())!=0)
+ if(strcmp(string_att_check,ATTRSTR_DATA.c_str())!=0)
TestErrPrintf("VL string attributes don't match!, string_att=%s, string_att_check=%s\n",ATTRSTR_DATA.c_str(),string_att_check);
free(string_att_check);
att.close();
@@ -717,7 +717,7 @@ static void test_read_vl_string_attribute()
// Test reading "large" sized string attribute
att = root.openAttribute("test_scalar_large");
att.read(vlst, &string_att_check);
- if(HDstrcmp(string_att_check,string_att_write)!=0)
+ if(strcmp(string_att_check,string_att_write)!=0)
TestErrPrintf("VL string attributes don't match!, string_att_write=%s, string_att_check=%s\n",string_att_write,string_att_check);
free(string_att_check);
free(string_att_write); // Free string allocated in test_write_vl_string_attribute
@@ -785,7 +785,7 @@ test_vlstring_array_attribute()
hsize_t ii;
for (ii = 0; ii < SPACE1_DIM1; ii++) {
- if (HDstrcmp(string_att_check[ii], string_att_array[ii]) != 0)
+ if (strcmp(string_att_check[ii], string_att_array[ii]) != 0)
TestErrPrintf("Line %d: Attribute data different: written=%s,read=%s\n", __LINE__,
string_att_check[ii], string_att_check[ii]);
@@ -834,7 +834,7 @@ read_scalar_dset(H5File &file, DataType &type, DataSpace &space, char *name, cha
dset.read(&data_read, type, space, space);
dset.close();
- if (HDstrcmp(data, data_read) != 0)
+ if (strcmp(data, data_read) != 0)
TestErrPrintf("Expected %s for dataset %s but read %s\n", data, name, data_read);
free(data_read);
diff --git a/config/cmake-presets/hidden-presets.json b/config/cmake-presets/hidden-presets.json
index 9dd4f9f8c2d..12eefa1dd4a 100644
--- a/config/cmake-presets/hidden-presets.json
+++ b/config/cmake-presets/hidden-presets.json
@@ -100,7 +100,7 @@
"name": "ci-Fortran-Clang",
"hidden": true,
"cacheVariables": {
- "CMAKE_Fortran_COMPILER": "gfortran"
+ "CMAKE_Fortran_COMPILER": {"type": "FILEPATH", "value": "gfortran"}
},
"condition": {
"type": "matches",
@@ -488,4 +488,4 @@
]
}
]
-}
\ No newline at end of file
+}
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index e928a83c38c..3d4c23b362c 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -425,13 +425,6 @@ if (MINGW OR NOT WINDOWS)
endif ()
CHECK_SYMBOL_EXISTS (TIOCGWINSZ "sys/ioctl.h" ${HDF_PREFIX}_HAVE_TIOCGWINSZ)
CHECK_SYMBOL_EXISTS (TIOCGETD "sys/ioctl.h" ${HDF_PREFIX}_HAVE_TIOCGETD)
-
- # ----------------------------------------------------------------------
- # cygwin user credentials are different then on linux
- #
- if (NOT CYGWIN AND NOT MINGW)
- CHECK_FUNCTION_EXISTS (getpwuid ${HDF_PREFIX}_HAVE_GETPWUID)
- endif ()
endif ()
#-----------------------------------------------------------------------------
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index ae56d2c5deb..e9b2dd1d9c7 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -158,9 +158,6 @@
/* Define to 1 if you have the `gethostname' function. */
#cmakedefine H5_HAVE_GETHOSTNAME @H5_HAVE_GETHOSTNAME@
-/* Define to 1 if you have the `getpwuid' function. */
-#cmakedefine H5_HAVE_GETPWUID @H5_HAVE_GETPWUID@
-
/* Define to 1 if you have the `getrusage' function. */
#cmakedefine H5_HAVE_GETRUSAGE @H5_HAVE_GETRUSAGE@
diff --git a/config/cmake/HDF5PluginCache.cmake b/config/cmake/HDF5PluginCache.cmake
index 0d1795de82b..34a97d5902a 100644
--- a/config/cmake/HDF5PluginCache.cmake
+++ b/config/cmake/HDF5PluginCache.cmake
@@ -18,7 +18,13 @@ set (H5PL_HDF5_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE STRING "HDF5 build folder"
set (H5PL_HDF5_DUMP_EXECUTABLE $ CACHE STRING "HDF5 h5dump target" FORCE)
set (H5PL_HDF5_REPACK_EXECUTABLE $ CACHE STRING "HDF5 h5repack target" FORCE)
-set (H5PL_ALLOW_EXTERNAL_SUPPORT "${HDF5_ALLOW_EXTERNAL_SUPPORT}" CACHE STRING "Allow External Library Building (NO GIT TGZ)" FORCE)
+if (NOT DEFINED H5PL_ALLOW_EXTERNAL_SUPPORT)
+ set (H5PL_ALLOW_EXTERNAL_SUPPORT "${HDF5_ALLOW_EXTERNAL_SUPPORT}" CACHE STRING "Allow External Library Building (NO GIT TGZ)" FORCE)
+endif ()
+
+if (NOT DEFINED H5PL_TGZPATH)
+ set (H5PL_TGZPATH "${TGZPATH}" CACHE PATH "PATH for finding plugin tgz file" FORCE)
+endif ()
set (H5PL_GIT_URL "https://github.com/HDFGroup/hdf5_plugins.git" CACHE STRING "Use plugins from HDF Group repository" FORCE)
set (H5PL_GIT_BRANCH "master" CACHE STRING "" FORCE)
diff --git a/config/cmake/HDF5PluginMacros.cmake b/config/cmake/HDF5PluginMacros.cmake
index da0eab5f903..aa409f710a2 100644
--- a/config/cmake/HDF5PluginMacros.cmake
+++ b/config/cmake/HDF5PluginMacros.cmake
@@ -1,3 +1,14 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://www.hdfgroup.org/licenses.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
#-------------------------------------------------------------------------------
# Plugins must be built SHARED
#-------------------------------------------------------------------------------
@@ -85,16 +96,16 @@ macro (FILTER_OPTION plname)
if (ENABLE_${plname})
option (HDF_${plname}_USE_EXTERNAL "Use External Library Building for ${PLUGIN_NAME} plugin" 0)
mark_as_advanced (HDF_${plname}_USE_EXTERNAL)
- if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ if (H5PL_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR H5PL_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
set (HDF_${plname}_USE_EXTERNAL 1 CACHE BOOL "Use External Library Building for ${PLUGIN_NAME} plugin" FORCE)
- if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT")
+ if (H5PL_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT")
set (HDF_${plname}_URL ${HDF_${plname}_GIT_URL})
set (HDF_${plname}_BRANCH ${HDF_${plname}_GIT_BRANCH})
- elseif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
- if (NOT TGZPATH)
- set (TGZPATH ${H5PL_SOURCE_DIR})
+ elseif (H5PL_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ if (NOT H5PL_COMP_TGZPATH)
+ set (H5PL_COMP_TGZPATH ${H5PL_SOURCE_DIR}/libs)
endif ()
- set (HDF_${plname}_URL ${TGZPATH}/${HDF_${plname}_TGZ_NAME})
+ set (HDF_${plname}_URL ${H5PL_COMP_TGZPATH}/${HDF_${plname}_TGZ_NAME})
endif ()
endif ()
add_subdirectory (${plname})
diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake
index 1878b9be9f8..1dca9103ef3 100644
--- a/config/cmake/HDFCompilerFlags.cmake
+++ b/config/cmake/HDFCompilerFlags.cmake
@@ -310,6 +310,7 @@ if (HDF5_ENABLE_DEBUG_APIS)
H5F_DEBUG
H5HL_DEBUG
H5I_DEBUG
+ H5MM_DEBUG
H5O_DEBUG
H5S_DEBUG
H5T_DEBUG
diff --git a/config/cmake/HDFLibMacros.cmake b/config/cmake/HDFLibMacros.cmake
index 8737b770468..4039a503825 100644
--- a/config/cmake/HDFLibMacros.cmake
+++ b/config/cmake/HDFLibMacros.cmake
@@ -10,7 +10,7 @@
# help@hdfgroup.org.
#
#-------------------------------------------------------------------------------
-macro (ORIGINAL_ZLIB_LIBRARY compress_type)
+macro (EXTERNAL_ZLIB_LIBRARY compress_type)
if (${compress_type} MATCHES "GIT")
FetchContent_Declare (HDF5_ZLIB
GIT_REPOSITORY ${ZLIB_URL}
@@ -44,7 +44,7 @@ macro (ORIGINAL_ZLIB_LIBRARY compress_type)
endmacro ()
#-------------------------------------------------------------------------------
-macro (ORIGINAL_SZIP_LIBRARY compress_type encoding)
+macro (EXTERNAL_SZIP_LIBRARY compress_type encoding)
# Only libaec library is usable
if (${compress_type} MATCHES "GIT")
FetchContent_Declare (SZIP
@@ -78,157 +78,3 @@ macro (ORIGINAL_SZIP_LIBRARY compress_type encoding)
set (SZIP_FOUND 1)
set (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIR_GEN} ${SZIP_INCLUDE_DIR})
endmacro ()
-
-#-------------------------------------------------------------------------------
-macro (EXTERNAL_SZIP_LIBRARY compress_type encoding)
- if (${compress_type} MATCHES "GIT")
- EXTERNALPROJECT_ADD (SZIP
- GIT_REPOSITORY ${SZIP_URL}
- GIT_TAG ${SZIP_BRANCH}
- INSTALL_COMMAND ""
- CMAKE_ARGS
- -DBUILD_SHARED_LIBS:BOOL=OFF
- -DSZIP_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
- -DSZIP_EXTERNALLY_CONFIGURED:BOOL=OFF
- -DCMAKE_BUILD_TYPE:STRING=${HDF_CFG_NAME}
- -DCMAKE_DEBUG_POSTFIX:STRING=${CMAKE_DEBUG_POSTFIX}
- -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
- -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
- -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
- -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
- -DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
- -DSZIP_ENABLE_ENCODING:BOOL=${encoding}
- -DHDF_USE_GNU_DIRS:STRING=${HDF5_USE_GNU_DIRS}
- -DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES}
- -DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
- -DPACKAGE_NAMESPACE=${HDF_PACKAGE_NAMESPACE}
- )
- elseif (${compress_type} MATCHES "TGZ")
- EXTERNALPROJECT_ADD (SZIP
- URL ${SZIP_URL}
- URL_MD5 ""
- INSTALL_COMMAND ""
- CMAKE_ARGS
- -DBUILD_SHARED_LIBS:BOOL=OFF
- -DSZIP_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
- -DSZIP_EXTERNALLY_CONFIGURED:BOOL=OFF
- -DCMAKE_BUILD_TYPE:STRING=${HDF_CFG_NAME}
- -DCMAKE_DEBUG_POSTFIX:STRING=${CMAKE_DEBUG_POSTFIX}
- -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
- -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
- -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
- -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
- -DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
- -DSZIP_ENABLE_ENCODING:BOOL=${encoding}
- -DHDF_USE_GNU_DIRS:STRING=${HDF5_USE_GNU_DIRS}
- -DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES}
- -DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
- -DPACKAGE_NAMESPACE=${HDF_PACKAGE_NAMESPACE}
- )
- endif ()
- externalproject_get_property (SZIP BINARY_DIR SOURCE_DIR)
-#
-##include (${BINARY_DIR}/${LIBAEC_PACKAGE_NAME}${HDF_PACKAGE_EXT}-targets.cmake)
-# Create imported target szip-static
- add_library(${HDF_PACKAGE_NAMESPACE}szaec-static STATIC IMPORTED)
- HDF_IMPORT_SET_LIB_OPTIONS (${HDF_PACKAGE_NAMESPACE}szaec-static "szaec" STATIC "")
- add_dependencies (${HDF_PACKAGE_NAMESPACE}szaec-static SZIP)
- add_library(${HDF_PACKAGE_NAMESPACE}aec-static STATIC IMPORTED)
- HDF_IMPORT_SET_LIB_OPTIONS (${HDF_PACKAGE_NAMESPACE}aec-static "aec" STATIC "")
- add_dependencies (${HDF_PACKAGE_NAMESPACE}aec-static SZIP)
- set (SZIP_STATIC_LIBRARY "${HDF_PACKAGE_NAMESPACE}szaec-static;${HDF_PACKAGE_NAMESPACE}aec-static")
- set (SZIP_LIBRARIES ${SZIP_STATIC_LIBRARY})
-
- set (SZIP_INCLUDE_DIR_GEN "${BINARY_DIR}")
- set (SZIP_INCLUDE_DIR "${SOURCE_DIR}/include")
- set (SZIP_FOUND 1)
- set (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIR_GEN} ${SZIP_INCLUDE_DIR})
-endmacro ()
-
-#-------------------------------------------------------------------------------
-macro (PACKAGE_SZIP_LIBRARY compress_type)
- add_custom_target (SZIP-GenHeader-Copy ALL
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${SZIP_INCLUDE_DIR_GEN}/aec_config.h ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/
- COMMENT "Copying ${SZIP_INCLUDE_DIR_GEN}/aec_config.h to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/"
- )
- set (EXTERNAL_HEADER_LIST ${EXTERNAL_HEADER_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/aec_config.h)
- if (${compress_type} MATCHES "GIT" OR ${compress_type} MATCHES "TGZ")
- add_dependencies (SZIP-GenHeader-Copy SZIP)
- endif ()
-endmacro ()
-
-#-------------------------------------------------------------------------------
-macro (EXTERNAL_ZLIB_LIBRARY compress_type)
- if (${compress_type} MATCHES "GIT")
- EXTERNALPROJECT_ADD (HDF5_ZLIB
- GIT_REPOSITORY ${ZLIB_URL}
- GIT_TAG ${ZLIB_BRANCH}
- INSTALL_COMMAND ""
- CMAKE_ARGS
- -DBUILD_SHARED_LIBS:BOOL=OFF
- -DZLIB_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
- -DZLIB_EXTERNALLY_CONFIGURED:BOOL=OFF
- -DCMAKE_BUILD_TYPE:STRING=${HDF_CFG_NAME}
- -DCMAKE_DEBUG_POSTFIX:STRING=${CMAKE_DEBUG_POSTFIX}
- -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
- -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
- -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
- -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
- -DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
- -DHDF_USE_GNU_DIRS:STRING=${HDF5_USE_GNU_DIRS}
- -DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES}
- -DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
- -DPACKAGE_NAMESPACE=${HDF_PACKAGE_NAMESPACE}
- )
- elseif (${compress_type} MATCHES "TGZ")
- EXTERNALPROJECT_ADD (HDF5_ZLIB
- URL ${ZLIB_URL}
- URL_MD5 ""
- INSTALL_COMMAND ""
- CMAKE_ARGS
- -DBUILD_SHARED_LIBS:BOOL=OFF
- -DZLIB_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
- -DZLIB_EXTERNALLY_CONFIGURED:BOOL=OFF
- -DCMAKE_BUILD_TYPE:STRING=${HDF_CFG_NAME}
- -DCMAKE_DEBUG_POSTFIX:STRING=${CMAKE_DEBUG_POSTFIX}
- -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
- -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
- -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
- -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
- -DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
- -DHDF_USE_GNU_DIRS:STRING=${HDF5_USE_GNU_DIRS}
- -DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES}
- -DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
- -DPACKAGE_NAMESPACE=${HDF_PACKAGE_NAMESPACE}
- )
- endif ()
- externalproject_get_property (HDF5_ZLIB BINARY_DIR SOURCE_DIR)
-
- if (NOT ZLIB_LIB_NAME)
- set (ZLIB_LIB_NAME "z")
- endif ()
-##include (${BINARY_DIR}/${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT}-targets.cmake)
-# Create imported target zlib-static
- add_library(${HDF_PACKAGE_NAMESPACE}zlib-static STATIC IMPORTED)
- HDF_IMPORT_SET_LIB_OPTIONS (${HDF_PACKAGE_NAMESPACE}zlib-static ${ZLIB_LIB_NAME} STATIC "")
- add_dependencies (${HDF_PACKAGE_NAMESPACE}zlib-static HDF5_ZLIB)
- set (ZLIB_STATIC_LIBRARY "${HDF_PACKAGE_NAMESPACE}zlib-static")
- set (ZLIB_LIBRARIES ${ZLIB_STATIC_LIBRARY})
-
- set (ZLIB_INCLUDE_DIR_GEN "${BINARY_DIR}")
- set (ZLIB_INCLUDE_DIR "${SOURCE_DIR}")
- set (ZLIB_FOUND 1)
- set (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR_GEN} ${ZLIB_INCLUDE_DIR})
-endmacro ()
-
-#-------------------------------------------------------------------------------
-macro (PACKAGE_ZLIB_LIBRARY compress_type)
- add_custom_target (ZLIB-GenHeader-Copy ALL
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${ZLIB_INCLUDE_DIR_GEN}/zconf.h ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/
- COMMENT "Copying ${ZLIB_INCLUDE_DIR_GEN}/zconf.h to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/"
- )
- set (EXTERNAL_HEADER_LIST ${EXTERNAL_HEADER_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/zconf.h)
- if (${compress_type} MATCHES "GIT" OR ${compress_type} MATCHES "TGZ")
- add_dependencies (ZLIB-GenHeader-Copy HDF5_ZLIB)
- endif ()
-endmacro ()
diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake
index a07b8d31d3c..159a4e2e56e 100644
--- a/config/cmake/cacheinit.cmake
+++ b/config/cmake/cacheinit.cmake
@@ -32,10 +32,6 @@ set_property (CACHE HDF5_INSTALL_MOD_FORTRAN PROPERTY STRINGS NO SHARED STATIC)
set (HDF5_BUILD_GENERATORS ON CACHE BOOL "Build Test Generators" FORCE)
-set (HDF5_ENABLE_SZIP_SUPPORT ON CACHE BOOL "Use SZip Filter" FORCE)
-
-set (HDF5_ENABLE_SZIP_ENCODING ON CACHE BOOL "Use SZip Encoding" FORCE)
-
set (MPIEXEC_MAX_NUMPROCS "4" CACHE STRING "Minimum number of processes for HDF parallel tests" FORCE)
set (HDF5_ENABLE_ALL_WARNINGS ON CACHE BOOL "Enable all warnings" FORCE)
@@ -50,32 +46,30 @@ set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO GIT TGZ)
########################
# compression options
########################
-
set (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE)
-set (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use HDF5_ZLib from compressed file" FORCE)
-set (ZLIB_TGZ_ORIGPATH "https://github.com/madler/zlib/releases/download/v1.2.13" CACHE STRING "Use ZLIB from original location" FORCE)
-set (ZLIB_TGZ_ORIGNAME "zlib-1.2.13.tar.gz" CACHE STRING "Use ZLIB from original compressed file" FORCE)
+set (ZLIB_TGZ_NAME "zlib-1.3.tar.gz" CACHE STRING "Use HDF5_ZLib from compressed file" FORCE)
+set (ZLIB_TGZ_ORIGPATH "https://github.com/madler/zlib/releases/download/v1.3" CACHE STRING "Use ZLIB from original location" FORCE)
set (ZLIB_USE_LOCALCONTENT ON CACHE BOOL "Use local file for ZLIB FetchContent" FORCE)
set (LIBAEC_PACKAGE_NAME "libaec" CACHE STRING "Name of AEC SZIP package" FORCE)
-set (SZAEC_TGZ_NAME "LIBAEC.tar.gz" CACHE STRING "Use SZip AEC from compressed file" FORCE)
+set (LIBAEC_TGZ_NAME "libaec-1.0.6.tar.gz" CACHE STRING "Use SZip AEC from compressed file" FORCE)
set (LIBAEC_TGZ_ORIGPATH "https://github.com/MathisRosenhauer/libaec/releases/download/v1.0.6" CACHE STRING "Use LIBAEC from original location" FORCE)
-set (LIBAEC_TGZ_ORIGNAME "libaec-1.0.6.tar.gz" CACHE STRING "Use LIBAEC from original compressed file" FORCE)
set (LIBAEC_USE_LOCALCONTENT ON CACHE BOOL "Use local file for LIBAEC FetchContent" FORCE)
########################
# API test options
########################
set (KWSYS_TGZ_ORIGPATH "https://gitlab.kitware.com/utils/kwsys/-/archive/master" CACHE STRING "Use KWSYS from original location" FORCE)
-set (KWSYS_TGZ_ORIGNAME "kwsys-master.tar.gz" CACHE STRING "Use KWSYS from original compressed file" FORCE)
+set (KWSYS_TGZ_NAME "kwsys-master.tar.gz" CACHE STRING "Use KWSYS from original compressed file" FORCE)
set (KWSYS_USE_LOCALCONTENT OFF CACHE BOOL "Use local file for KWSYS FetchContent" FORCE)
########################
# filter plugin options
########################
-set (PLUGIN_TGZ_NAME "hdf5_plugins.tar.gz" CACHE STRING "Use PLUGINS from compressed file" FORCE)
-
+set (PLUGIN_TGZ_ORIGPATH "https://github.com/HDFGroup/hdf5_plugins/releases/download/snapshots" CACHE STRING "Use PLUGINS from original location" FORCE)
+set (PLUGIN_TGZ_NAME "hdf5_plugins-master.tar.gz" CACHE STRING "Use PLUGINS from compressed file" FORCE)
+set (PLUGIN_USE_LOCALCONTENT ON CACHE BOOL "Use local file for PLUGIN FetchContent" FORCE)
set (PLUGIN_PACKAGE_NAME "pl" CACHE STRING "Name of PLUGIN package" FORCE)
set (H5PL_VERS_MAJOR "1" CACHE STRING "Major version of hdf5 package for PLUGIN package" FORCE)
set (H5PL_VERS_MINOR "14" CACHE STRING "Minor version of hdf5 package for PLUGIN package" FORCE)
@@ -85,10 +79,11 @@ set (H5PL_VERS_RELEASE "3" CACHE STRING "Release version of hdf5 package for PLU
# bitshuffle
#############
-set (BSHUF_GIT_URL "https://someurl/bitshuffle.git" CACHE STRING "Use BSHUF from HDF Group repository" FORCE)
+set (BSHUF_GIT_URL "https://github.com/kiyo-masui/bitshuffle.git" CACHE STRING "Use BSHUF from HDF repository" FORCE)
set (BSHUF_GIT_BRANCH "master" CACHE STRING "" FORCE)
-set (BSHUF_TGZ_NAME "bitshuffle.tar.gz" CACHE STRING "Use BSHUF from compressed file" FORCE)
+set (BSHUF_TGZ_ORIGPATH "https://github.com/kiyo-masui/bitshuffle/archive/refs/tags" CACHE STRING "Use PLUGINS from original location" FORCE)
+set (BSHUF_TGZ_NAME "bitshuffle-0.5.1.tar.gz" CACHE STRING "Use BSHUF from compressed file" FORCE)
set (BSHUF_PACKAGE_NAME "bshuf" CACHE STRING "Name of BSHUF package" FORCE)
@@ -96,17 +91,19 @@ set (BSHUF_PACKAGE_NAME "bshuf" CACHE STRING "Name of BSHUF package" FORCE)
# blosc
########
-set (BLOSC_GIT_URL "https://github.com/Blosc/c-blosc.git" CACHE STRING "Use BLOSC from GitHub repository" FORCE)
-set (BLOSC_GIT_BRANCH "master" CACHE STRING "" FORCE)
+set (BLOSC_GIT_URL "https://github.com/Blosc/c-blosc.git" CACHE STRING "Use BLOSC from Github repository" FORCE)
+set (BLOSC_GIT_BRANCH "main" CACHE STRING "" FORCE)
-set (BLOSC_TGZ_NAME "c-blosc.tar.gz" CACHE STRING "Use BLOSC from compressed file" FORCE)
+set (BLOSC_TGZ_ORIGPATH "https://github.com/Blosc/c-blosc/archive/refs/tags" CACHE STRING "Use PLUGINS from original location" FORCE)
+set (BLOSC_TGZ_NAME "c-blosc-1.21.5.tar.gz" CACHE STRING "Use BLOSC from compressed file" FORCE)
set (BLOSC_PACKAGE_NAME "blosc" CACHE STRING "Name of BLOSC package" FORCE)
-set (BLOSC_ZLIB_GIT_URL "https://someurl/zlib.git" CACHE STRING "Use BLOSC_ZLIB from HDF Group repository" FORCE)
-set (BLOSC_ZLIB_GIT_BRANCH "master" CACHE STRING "" FORCE)
+set (BLOSC_ZLIB_GIT_URL "https://github.com/madler/zlib.git" CACHE STRING "Use ZLIB from GitHub repository" FORCE)
+set (BLOSC_ZLIB_GIT_BRANCH "develop" CACHE STRING "" FORCE)
-set (BLOSC_ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use BLOSC_ZLib from compressed file" FORCE)
+set (BLOSC_ZLIB_TGZ_ORIGPATH "https://github.com/madler/zlib/releases/download/v1.3" CACHE STRING "Use PLUGINS from original location" FORCE)
+set (BLOSC_ZLIB_TGZ_NAME "zlib-1.3.tar.gz" CACHE STRING "Use ZLib from compressed file" FORCE)
set (BLOSC_ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of BLOSC_ZLIB package" FORCE)
@@ -114,10 +111,11 @@ set (BLOSC_ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of BLOSC_ZLIB package" FO
# bzip2
########
-set (BZ2_GIT_URL "https://someurl/bzip2.git" CACHE STRING "Use BZ2 from HDF Group repository" FORCE)
+set (BZ2_GIT_URL "https://github.com/libarchive/bzip2.git" CACHE STRING "Use BZ2 from GitHub repository" FORCE)
set (BZ2_GIT_BRANCH "master" CACHE STRING "" FORCE)
-set (BZ2_TGZ_NAME "BZ2.tar.gz" CACHE STRING "Use BZ2 from compressed file" FORCE)
+set (BZ2_TGZ_ORIGPATH "https://github.com/libarchive/bzip2/archive/refs/tags" CACHE STRING "Use PLUGINS from original location" FORCE)
+set (BZ2_TGZ_NAME "bzip2-bzip2-1.0.8.tar.gz" CACHE STRING "Use BZ2 from compressed file" FORCE)
set (BZ2_PACKAGE_NAME "bz2" CACHE STRING "Name of BZ2 package" FORCE)
@@ -125,10 +123,11 @@ set (BZ2_PACKAGE_NAME "bz2" CACHE STRING "Name of BZ2 package" FORCE)
# fpzip
########
-set (FPZIP_GIT_URL "https://https://github.com/LLNL/fpzip" CACHE STRING "Use FPZIP from GitHub repository" FORCE)
-set (FPZIP_GIT_BRANCH "master" CACHE STRING "" FORCE)
+set (FPZIP_GIT_URL "https://github.com/LLNL/fpzip.git" CACHE STRING "Use FPZIP from GitHub repository" FORCE)
+set (FPZIP_GIT_BRANCH "develop" CACHE STRING "" FORCE)
-set (FPZIP_TGZ_NAME "fpzip.tar.gz" CACHE STRING "Use FPZIP from compressed file" FORCE)
+set (FPZIP_TGZ_ORIGPATH "https://github.com/LLNL/fpzip/releases/download/1.3.0" CACHE STRING "Use PLUGINS from original location" FORCE)
+set (FPZIP_TGZ_NAME "fpzip-1.3.0.tar.gz" CACHE STRING "Use FPZIP from compressed file" FORCE)
set (FPZIP_PACKAGE_NAME "fpzip" CACHE STRING "Name of FPZIP package" FORCE)
@@ -136,11 +135,11 @@ set (FPZIP_PACKAGE_NAME "fpzip" CACHE STRING "Name of FPZIP package" FORCE)
# jpeg
#######
-set (JPEG_GIT_URL "https://someurl/jpeg.git" CACHE STRING "Use JPEG from HDF Group repository" FORCE)
-set (JPEG_GIT_BRANCH "jpeg9c" CACHE STRING "" FORCE)
+set (JPEG_GIT_URL "No repo www.ijg.org/files" CACHE STRING "Use JPEG from ILG" FORCE)
+set (JPEG_GIT_BRANCH "v9e" CACHE STRING "" FORCE)
-#set (JPEG_TGZ_NAME "JPEG9c.tar.gz" CACHE STRING "Use JPEG from compressed file" FORCE)
-set (JPEG_TGZ_NAME "JPEG.tar.gz" CACHE STRING "Use JPEG from compressed file" FORCE)
+set (JPEG_TGZ_ORIGPATH "https://www.ijg.org/files" CACHE STRING "Use PLUGINS from original location" FORCE)
+set (JPEG_TGZ_NAME "jpegsrc.v9e.tar.gz" CACHE STRING "Use JPEG from compressed file" FORCE)
set (JPEG_PACKAGE_NAME "jpeg" CACHE STRING "Name of JPEG package" FORCE)
@@ -150,10 +149,11 @@ set (JPEG_PACKAGE_NAME "jpeg" CACHE STRING "Name of JPEG package" FORCE)
set (BUILD_LZ4_LIBRARY_SOURCE ON CACHE BOOL "build the lz4 library within the plugin" FORCE)
-set (LZ4_GIT_URL "https://someurl/lz4.git" CACHE STRING "Use LZ4 from HDF Group repository" FORCE)
-set (LZ4_GIT_BRANCH "master" CACHE STRING "" FORCE)
+set (LZ4_GIT_URL "https://github.com/lz4/lz4.git" CACHE STRING "Use LZ4 from GitHub repository" FORCE)
+set (LZ4_GIT_BRANCH "dev" CACHE STRING "" FORCE)
-set (LZ4_TGZ_NAME "lz4.tar.gz" CACHE STRING "Use LZ4 from compressed file" FORCE)
+set (LZ4_TGZ_ORIGPATH "https://github.com/lz4/lz4/releases/download/v1.9.4" CACHE STRING "Use PLUGINS from original location" FORCE)
+set (LZ4_TGZ_NAME "lz4-1.9.4.tar.gz" CACHE STRING "Use LZ4 from compressed file" FORCE)
set (LZ4_PACKAGE_NAME "lz4" CACHE STRING "Name of LZ4 package" FORCE)
@@ -161,10 +161,10 @@ set (LZ4_PACKAGE_NAME "lz4" CACHE STRING "Name of LZ4 package" FORCE)
# lzf
######
-set (LZF_GIT_URL "https://someurl/lzf.git" CACHE STRING "Use LZF from HDF Group repository" FORCE)
-set (LZF_GIT_BRANCH "master" CACHE STRING "" FORCE)
+set (LZF_URL "http://software.schmorp.de/pkg/liblzf.html" CACHE STRING "LZF home" FORCE)
-set (LZF_TGZ_NAME "lzf.tar.gz" CACHE STRING "Use LZF from compressed file" FORCE)
+set (LZF_TGZ_ORIGPATH "http://dist.schmorp.de/liblzf" CACHE STRING "Use LZF from original location" FORCE)
+set (LZF_TGZ_NAME "liblzf-3.6.tar.gz" CACHE STRING "Use LZF from compressed file" FORCE)
set (LZF_PACKAGE_NAME "lzf" CACHE STRING "Name of LZF package" FORCE)
@@ -174,16 +174,19 @@ set (LZF_PACKAGE_NAME "lzf" CACHE STRING "Name of LZF package" FORCE)
#set (BUILD_MAFISC_LIBRARY_SOURCE OFF CACHE BOOL "build the mafisc library within the plugin" FORCE)
+#set (MAFISC_TGZ_ORIGPATH "" CACHE STRING "Use PLUGINS from original location" FORCE)
+#set (MAFISC_TGZ_NAME ".tar.gz" CACHE STRING "Use MAFISC from compressed file" FORCE)
#set (MAFISC_PACKAGE_NAME "mafisc" CACHE STRING "Name of MAFISC package" FORCE)
#####
# sz
#####
-set (SZ_GIT_URL "https://github.com/disheng222/SZ" CACHE STRING "Use SZ filter from GitHub repository" FORCE)
+set (SZ_GIT_URL "https://github.com/szcompressor/SZ.git" CACHE STRING "Use SZ filter from GitHub repository" FORCE)
set (SZ_GIT_BRANCH "master" CACHE STRING "" FORCE)
-set (SZ_TGZ_NAME "szf.tar.gz" CACHE STRING "Use SZ filter from compressed file" FORCE)
+set (SZ_TGZ_ORIGPATH "https://github.com/szcompressor/SZ/releases/download/v2.1.12.5" CACHE STRING "Use PLUGINS from original location" FORCE)
+set (SZ_TGZ_NAME "SZ-2.1.12.5.tar.gz" CACHE STRING "Use SZ filter from compressed file" FORCE)
set (SZ_PACKAGE_NAME "SZ" CACHE STRING "Name of SZ filter package" FORCE)
@@ -191,10 +194,11 @@ set (SZ_PACKAGE_NAME "SZ" CACHE STRING "Name of SZ filter package" FORCE)
# zfp
######
-set (ZFP_GIT_URL "https://github.com/LLNL/zfp.git" CACHE STRING "Use ZFP from GitHub repository" FORCE)
-set (ZFP_GIT_BRANCH "master" CACHE STRING "" FORCE)
+set (ZFP_GIT_URL "https://github.com/LLNL/zfp.git" CACHE STRING "Use ZFP from GitHub repository" FORCE)
+set (ZFP_GIT_BRANCH "develop" CACHE STRING "" FORCE)
-set (ZFP_TGZ_NAME "zfp.tar.gz" CACHE STRING "Use ZFP from compressed file" FORCE)
+set (ZFP_TGZ_ORIGPATH "https://github.com/LLNL/zfp/releases/download/1.0.0" CACHE STRING "Use PLUGINS from original location" FORCE)
+set (ZFP_TGZ_NAME "zfp-1.0.0.tar.gz" CACHE STRING "Use ZFP from compressed file" FORCE)
set (ZFP_PACKAGE_NAME "zfp" CACHE STRING "Name of ZFP package" FORCE)
@@ -202,10 +206,10 @@ set (ZFP_PACKAGE_NAME "zfp" CACHE STRING "Name of ZFP package" FORCE)
# zstd
######
-set (ZSTD_GIT_URL "https://github.com/facebook/zstd" CACHE STRING "Use ZSTD from repository" FORCE)
+set (ZSTD_GIT_URL "https://github.com/facebook/zstd.git" CACHE STRING "Use ZSTD from GitHub repository" FORCE)
set (ZSTD_GIT_BRANCH "dev" CACHE STRING "" FORCE)
-set (ZSTD_TGZ_NAME "zstd.tar.gz" CACHE STRING "Use ZSTD from compressed file" FORCE)
+set (ZSTD_TGZ_ORIGPATH "https://github.com/facebook/zstd/releases/download/v1.5.5" CACHE STRING "Use PLUGINS from original location" FORCE)
+set (ZSTD_TGZ_NAME "zstd-1.5.5.tar.gz" CACHE STRING "Use ZSTD from compressed file" FORCE)
set (ZSTD_PACKAGE_NAME "zstd" CACHE STRING "Name of ZSTD package" FORCE)
-
diff --git a/config/cmake/mccacheinit.cmake b/config/cmake/mccacheinit.cmake
index 068adff6269..b499371a022 100644
--- a/config/cmake/mccacheinit.cmake
+++ b/config/cmake/mccacheinit.cmake
@@ -54,7 +54,7 @@ set (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE)
set (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use ZLib from compressed file" FORCE)
set (LIBAEC_PACKAGE_NAME "libaec" CACHE STRING "Name of AEC SZIP package" FORCE)
-set (SZAEC_TGZ_NAME "LIBAEC.tar.gz" CACHE STRING "Use SZip AEC from compressed file" FORCE)
+set (LIBAEC_TGZ_NAME "LIBAEC.tar.gz" CACHE STRING "Use SZip AEC from compressed file" FORCE)
set (CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build Debug" FORCE)
diff --git a/config/linux-gnulibc1 b/config/linux-gnulibc1
index ab7e28f73dd..95d7d644fcc 100644
--- a/config/linux-gnulibc1
+++ b/config/linux-gnulibc1
@@ -131,8 +131,6 @@ case $FC_BASENAME in
H5_CFLAGS="$H5_CFLAGS"
F9XSUFFIXFLAG=""
-# We force compiler to use upper case for external names
-# (just in case since this should be a default EIP)
H5_FCFLAGS="$H5_FCFLAGS"
FSEARCH_DIRS=""
@@ -162,9 +160,10 @@ case $FC_BASENAME in
nagfor)
F9XSUFFIXFLAG=""
-# We force compiler to use upper case for external names
-# (just in case since this should be a default EIP)
- H5_FCFLAGS="$H5_FCFLAGS"
+ # NOTE: The default is -ieee=stop, which will cause problems
+ # when the H5T module performs floating-point type
+ # introspection
+ H5_FCFLAGS="$H5_FCFLAGS -ieee=full"
FSEARCH_DIRS=""
# Production
diff --git a/configure.ac b/configure.ac
index 77f2eb31a16..1a745ff4204 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1553,7 +1553,7 @@ AC_ARG_WITH([fnord],
## ----------------------------------------------------------------------
## Make the external filters list available to *.in files
## At this point it's unset (no external filters by default) but it
-## will be filled in during the deflate (zlib) and szip processing
+## will be filled in during the deflate/zlib and szip/libaec processing
## below.
##
AC_SUBST([EXTERNAL_FILTERS])
@@ -1658,13 +1658,18 @@ fi
## command-line switch. The value is an include path and/or a library path.
## If the library path is specified then it must be preceded by a comma.
##
+## libaec also implements Space Data System Standard 121.0-B-2 and has
+## an szip compatibility header. Since the AEC library is BSD licensed
+## for both encoding and decoding, we now build with the filter enabled
+## by default when the library is found.
+##
AC_SUBST([LL_PATH])
AC_SUBST([USE_FILTER_SZIP]) USE_FILTER_SZIP="no"
AC_ARG_WITH([szlib],
[AS_HELP_STRING([--with-szlib=DIR],
[Use szlib library for external szlib I/O
- filter [default=no]])],,
- [withval=no])
+ filter [default=yes]])],,
+ [withval=yes])
case "X-$withval" in
X-yes)
@@ -2025,7 +2030,7 @@ case "`uname`" in
CYGWIN*)
;;
*)
- AC_CHECK_FUNCS([GetConsoleScreenBufferInfo getpwuid])
+ AC_CHECK_FUNCS([GetConsoleScreenBufferInfo])
;;
esac
AC_CHECK_FUNCS([_scrsize ioctl])
@@ -2479,8 +2484,8 @@ AC_SUBST([INTERNAL_DEBUG_OUTPUT])
## too specialized or have huge performance hits. These
## are not listed in the "all" packages list.
##
-## all_packages="AC,B,B2,D,F,FA,FL,FS,HL,I,O,S,T,Z"
-all_packages="AC,B2,CX,D,F,HL,I,O,S,T,Z"
+## all_packages="AC,B,B2,D,F,FA,FL,FS,HL,I,MM,O,S,T,Z"
+all_packages="AC,B2,CX,D,F,HL,I,MM,O,S,T,Z"
case "X-$INTERNAL_DEBUG_OUTPUT" in
X-yes|X-all)
@@ -4188,6 +4193,11 @@ AC_CONFIG_FILES([Makefile
hl/fortran/examples/run-hlfortran-ex.sh])
AC_CONFIG_FILES([utils/subfiling_vfd/h5fuse.sh], [chmod +x utils/subfiling_vfd/h5fuse.sh])
+if test -n "$TESTPARALLEL"; then
+ if test "X$SUBFILING_VFD" = "Xyes"; then
+ AC_CONFIG_LINKS([testpar/h5fuse.sh:utils/subfiling_vfd/h5fuse.sh])
+ fi
+fi
AC_CONFIG_COMMANDS([.classes], [], [$MKDIR_P java/src/.classes;
$MKDIR_P java/test/.classes;
diff --git a/doc/parallel-compression.md b/doc/parallel-compression.md
index e4fa8228628..efe685c3a65 100644
--- a/doc/parallel-compression.md
+++ b/doc/parallel-compression.md
@@ -61,8 +61,8 @@ H5Pset_dxpl_mpio(dxpl_id, H5FD_MPIO_COLLECTIVE);
H5Dwrite(..., dxpl_id, ...);
```
-The following are two simple examples of using the parallel compression
-feature:
+The following are two simple examples of using the parallel
+compression feature:
[ph5_filtered_writes.c](https://github.com/HDFGroup/hdf5/blob/develop/examples/ph5_filtered_writes.c)
@@ -76,9 +76,30 @@ Remember that the feature requires these writes to use collective
I/O, so the MPI ranks which have nothing to contribute must still
participate in the collective write call.
+## Multi-dataset I/O support
+
+The parallel compression feature is supported when using the
+multi-dataset I/O API routines ([H5Dwrite_multi](https://hdfgroup.github.io/hdf5/group___h5_d.html#gaf6213bf3a876c1741810037ff2bb85d8)/[H5Dread_multi](https://hdfgroup.github.io/hdf5/group___h5_d.html#ga8eb1c838aff79a17de385d0707709915)), but the
+following should be kept in mind:
+
+ - Parallel writes to filtered datasets **must** still be collective,
+ even when using the multi-dataset I/O API routines
+
+ - When the multi-dataset I/O API routines are passed a mixture of
+ filtered and unfiltered datasets, the library currently has to
+ perform I/O on them separately in two phases. Since there is
+ some slight complexity involved in this, it may be best (depending
+ on the number of datasets, number of selected chunks, number of
+ filtered vs. unfiltered datasets, etc.) to make two individual
+ multi-dataset I/O calls, one for the filtered datasets and one
+ for the unfiltered datasets. When performing writes to the datasets,
+ this would also allow independent write access to the unfiltered
+ datasets if desired, while still performing collective writes to
+ the filtered datasets.
+
## Incremental file space allocation support
-HDF5's [file space allocation time](https://portal.hdfgroup.org/display/HDF5/H5P_SET_ALLOC_TIME)
+HDF5's [file space allocation time](https://hdfgroup.github.io/hdf5/group___d_c_p_l.html#ga85faefca58387bba409b65c470d7d851)
is a dataset creation property that can have significant effects
on application performance, especially if the application uses
parallel HDF5. In a serial HDF5 application, the default file space
@@ -97,7 +118,7 @@ While this strategy has worked in the past, it has some noticeable
drawbacks. For one, the larger the chunked dataset being created,
the more noticeable overhead there will be during dataset creation
as all of the data chunks are being allocated in the HDF5 file.
-Further, these data chunks will, by default, be [filled](https://portal.hdfgroup.org/display/HDF5/H5P_SET_FILL_VALUE)
+Further, these data chunks will, by default, be [filled](https://hdfgroup.github.io/hdf5/group___d_c_p_l.html#ga4335bb45b35386daa837b4ff1b9cd4a4)
with HDF5's default fill data value, leading to extraordinary
dataset creation overhead and resulting in pre-filling large
portions of a dataset that the application might have been planning
@@ -105,7 +126,7 @@ to overwrite anyway. Even worse, there will be more initial overhead
from compressing that fill data before writing it out, only to have
it read back in, unfiltered and modified the first time a chunk is
written to. In the past, it was typically suggested that parallel
-HDF5 applications should use [H5Pset_fill_time](https://portal.hdfgroup.org/display/HDF5/H5P_SET_FILL_TIME)
+HDF5 applications should use [H5Pset_fill_time](https://hdfgroup.github.io/hdf5/group___d_c_p_l.html#ga6bd822266b31f86551a9a1d79601b6a2)
with a value of `H5D_FILL_TIME_NEVER` in order to disable writing of
the fill value to dataset chunks, but this isn't ideal if the
application actually wishes to make use of fill values.
@@ -199,14 +220,14 @@ chunks to end up at addresses in the file that do not align
well with the underlying file system, possibly leading to
poor performance. As an example, Lustre performance is generally
good when writes are aligned with the chosen stripe size.
-The HDF5 application can use [H5Pset_alignment](https://portal.hdfgroup.org/display/HDF5/H5P_SET_ALIGNMENT)
+The HDF5 application can use [H5Pset_alignment](https://hdfgroup.github.io/hdf5/group___f_a_p_l.html#gab99d5af749aeb3896fd9e3ceb273677a)
to have a bit more control over where objects in the HDF5
file end up. However, do note that setting the alignment
of objects generally wastes space in the file and has the
potential to dramatically increase its resulting size, so
caution should be used when choosing the alignment parameters.
-[H5Pset_alignment](https://portal.hdfgroup.org/display/HDF5/H5P_SET_ALIGNMENT)
+[H5Pset_alignment](https://hdfgroup.github.io/hdf5/group___f_a_p_l.html#gab99d5af749aeb3896fd9e3ceb273677a)
has two parameters that control the alignment of objects in
the HDF5 file, the "threshold" value and the alignment
value. The threshold value specifies that any object greater
@@ -243,19 +264,19 @@ in a file, this can create significant amounts of free space
in the file over its lifetime and eventually cause performance
issues.
-An HDF5 application can use [H5Pset_file_space_strategy](http://portal.hdfgroup.org/display/HDF5/H5P_SET_FILE_SPACE_STRATEGY)
+An HDF5 application can use [H5Pset_file_space_strategy](https://hdfgroup.github.io/hdf5/group___f_c_p_l.html#ga167ff65f392ca3b7f1933b1cee1b9f70)
with a value of `H5F_FSPACE_STRATEGY_PAGE` to enable the paged
aggregation feature, which can accumulate metadata and raw
data for dataset data chunks into well-aligned, configurably
sized "pages" for better performance. However, note that using
the paged aggregation feature will cause any setting from
-[H5Pset_alignment](https://portal.hdfgroup.org/display/HDF5/H5P_SET_ALIGNMENT)
+[H5Pset_alignment](https://hdfgroup.github.io/hdf5/group___f_a_p_l.html#gab99d5af749aeb3896fd9e3ceb273677a)
to be ignored. While an application should be able to get
-comparable performance effects by [setting the size of these pages](http://portal.hdfgroup.org/display/HDF5/H5P_SET_FILE_SPACE_PAGE_SIZE) to be equal to the value that
-would have been set for [H5Pset_alignment](https://portal.hdfgroup.org/display/HDF5/H5P_SET_ALIGNMENT),
+comparable performance effects by [setting the size of these pages](https://hdfgroup.github.io/hdf5/group___f_c_p_l.html#gad012d7f3c2f1e1999eb1770aae3a4963) to be equal to the value that
+would have been set for [H5Pset_alignment](https://hdfgroup.github.io/hdf5/group___f_a_p_l.html#gab99d5af749aeb3896fd9e3ceb273677a),
this may not necessarily be the case and should be studied.
-Note that [H5Pset_file_space_strategy](http://portal.hdfgroup.org/display/HDF5/H5P_SET_FILE_SPACE_STRATEGY)
+Note that [H5Pset_file_space_strategy](https://hdfgroup.github.io/hdf5/group___f_c_p_l.html#ga167ff65f392ca3b7f1933b1cee1b9f70)
has a `persist` parameter. This determines whether or not the
file free space manager should include extra metadata in the
HDF5 file about free space sections in the file. If this
@@ -279,12 +300,12 @@ hid_t file_id = H5Fcreate("file.h5", H5F_ACC_TRUNC, fcpl_id, fapl_id);
While the parallel compression feature requires that the HDF5
application set and maintain collective I/O at the application
-interface level (via [H5Pset_dxpl_mpio](https://portal.hdfgroup.org/display/HDF5/H5P_SET_DXPL_MPIO)),
+interface level (via [H5Pset_dxpl_mpio](https://hdfgroup.github.io/hdf5/group___d_x_p_l.html#ga001a22b64f60b815abf5de8b4776f09e)),
it does not require that the actual MPI I/O that occurs at
the lowest layers of HDF5 be collective; independent I/O may
perform better depending on the application I/O patterns and
parallel file system performance, among other factors. The
-application may use [H5Pset_dxpl_mpio_collective_opt](https://portal.hdfgroup.org/display/HDF5/H5P_SET_DXPL_MPIO_COLLECTIVE_OPT)
+application may use [H5Pset_dxpl_mpio_collective_opt](https://hdfgroup.github.io/hdf5/group___d_x_p_l.html#gacb30d14d1791ec7ff9ee73aa148a51a3)
to control this setting and see which I/O method provides the
best performance.
@@ -297,7 +318,7 @@ H5Dwrite(..., dxpl_id, ...);
### Runtime HDF5 Library version
-An HDF5 application can use the [H5Pset_libver_bounds](http://portal.hdfgroup.org/display/HDF5/H5P_SET_LIBVER_BOUNDS)
+An HDF5 application can use the [H5Pset_libver_bounds](https://hdfgroup.github.io/hdf5/group___f_a_p_l.html#gacbe1724e7f70cd17ed687417a1d2a910)
routine to set the upper and lower bounds on library versions
to use when creating HDF5 objects. For parallel compression
specifically, setting the library version to the latest available
diff --git a/doxygen/Doxyfile.in b/doxygen/Doxyfile.in
index cddf17cdf2a..b24b9f9e509 100644
--- a/doxygen/Doxyfile.in
+++ b/doxygen/Doxyfile.in
@@ -913,35 +913,6 @@ USE_HTAGS = NO
VERBATIM_HEADERS = NO
-# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
-# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the
-# cost of reduced performance. This can be particularly helpful with template
-# rich C++ code for which doxygen's built-in parser lacks the necessary type
-# information.
-# Note: The availability of this option depends on whether or not doxygen was
-# generated with the -Duse_libclang=ON option for CMake.
-# The default value is: NO.
-
-CLANG_ASSISTED_PARSING = NO
-
-# If clang assisted parsing is enabled you can provide the compiler with command
-# line options that you would normally use when invoking the compiler. Note that
-# the include paths will already be set by doxygen for the files and directories
-# specified with INPUT and INCLUDE_PATH.
-# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-
-CLANG_OPTIONS =
-
-# If clang assisted parsing is enabled you can provide the clang parser with the
-# path to the compilation database (see:
-# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) used when the files
-# were built. This is equivalent to specifying the "-p" option to a clang tool,
-# such as clang-check. These options will then be passed to the parser.
-# Note: The availability of this option depends on whether or not doxygen was
-# generated with the -Duse_libclang=ON option for CMake.
-
-CLANG_DATABASE_PATH =
-
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
@@ -1080,15 +1051,6 @@ HTML_COLORSTYLE_SAT = 100
HTML_COLORSTYLE_GAMMA = 80
-# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
-# page will contain the date and time when the page was generated. Setting this
-# to YES can help to show when doxygen was last run and thus if the
-# documentation is up to date.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_TIMESTAMP = YES
-
# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML
# documentation will contain a main index with vertical navigation menus that
# are dynamically created via JavaScript. If disabled, the navigation index will
diff --git a/doxygen/dox/ExamplesAPI.dox b/doxygen/dox/ExamplesAPI.dox
index 8f88c4eb4b9..1db8843feb5 100644
--- a/doxygen/dox/ExamplesAPI.dox
+++ b/doxygen/dox/ExamplesAPI.dox
@@ -7,7 +7,7 @@ Navigate back: \ref index "Main" / \ref GettingStarted
The C, FORTRAN and Java examples below point to the examples in the hdf5-examples github repository. Examples for older versions of HDF5
are handled by setting the appropriate USE_API_xxx definition. HDF5-1.6 examples are in a "16"-named subdirectory.
-The Java examples are in the HDF5-1.10 source code, and the Java Object package examples are in the HDFView source.
+The Java examples are in the HDF5-1.14 source code, and the Java Object package examples are in the HDFView source.
Please note that you must comment out the "package" statement at the top when downloading a Java Object example individually.
The MATLAB and Python examples were generously provided by a user and are not tested.
diff --git a/doxygen/examples/Filters.html b/doxygen/examples/Filters.html
index 9f34be5013f..27207d5d962 100644
--- a/doxygen/examples/Filters.html
+++ b/doxygen/examples/Filters.html
@@ -242,8 +242,8 @@ Predefined Filters
it didn't exist when the data was written.
zlib
can be acquired from
-
- http://www.cdrom.com/pub/infozip/zlib/
.
+
+ https://zlib.net
.
Example
diff --git a/doxygen/examples/tables/fileDriverLists.dox b/doxygen/examples/tables/fileDriverLists.dox
index 125df635da3..b1f873f063d 100644
--- a/doxygen/examples/tables/fileDriverLists.dox
+++ b/doxygen/examples/tables/fileDriverLists.dox
@@ -8,32 +8,64 @@
Description |
+#H5FD_SEC2 |
+Serial I/O to file using Unix “section 2” functions. |
+
+
#H5FD_CORE |
Store in memory (optional backing store to disk file). |
+#H5FD_LOG |
+Store in logging file. |
+
+
#H5FD_FAMILY |
Store in a set of files. |
-#H5FD_LOG |
-Store in logging file. |
+#H5FD_MULTI |
+Store in multiple files. There are several options to control layout. |
+
+
+#H5FD_STDIO |
+Serial I/O to file using Unix “stdio” functions. |
+
+
+#H5FD_SPLITTER |
+Relays VFD calls to one VFD, and write calls to another VFD. Maintains two files. |
#H5FD_MPIO |
Store using MPI/IO. |
-#H5FD_MULTI |
-Store in multiple files. There are several options to control layout. |
+#H5FD_DIRECT |
+Forces data writes to the file directly without using the system kernel buffer. |
-#H5FD_SEC2 |
-Serial I/O to file using Unix “section 2” functions. |
+#H5FD_MIRROR |
+Serial I/O to file using Unix “stdio” functions. |
-#H5FD_STDIO |
-Serial I/O to file using Unix “stdio” functions. |
+#H5FD_HDFS |
+Read-Only access to Hadoop Distributed File System (HDFS). |
+
+
+#H5FD_ROS3 |
+Read-Only access to Amazon's S3 service. |
+
+
+#H5FD_SUBFILING |
+Derived from other "stacked" VFDs such as the splitter, mirror, and family VFDs. |
+
+
+#H5FD_IOC |
+Relays VFD calls to one VFD, and write calls to another VFD. Maintains two files. |
+
+
+#H5FD_ONION |
+Provide in-file provenance and revision/version control. |
//! [file_driver_table]
@@ -57,33 +89,6 @@ the default file driver for all systems.
#H5Pset_fapl_sec2 |
-Direct |
-#H5FD_DIRECT |
-This is the #H5FD_SEC2 driver except data is written to or read from the file
-synchronously without being cached by the system. |
-#H5Pset_fapl_direct |
-
-
-Log |
-#H5FD_LOG |
-This is the #H5FD_SEC2 driver with logging capabilities. |
-#H5Pset_fapl_log |
-
-
-Windows |
-#H5FD_WINDOWS |
-This driver was modified in HDF5-1.8.8 to be a wrapper of the POSIX driver,
-#H5FD_SEC2. This change should not affect user applications. |
-#H5Pset_fapl_windows |
-
-
-STDIO |
-#H5FD_STDIO |
-This driver uses functions from the standard C stdio.h to perform I/O
-to a single, permanent file on local disk with additional system buffering. |
-#H5Pset_fapl_stdio |
-
-
Memory |
#H5FD_CORE |
With this driver, an application can work with a file in memory for faster reads and
@@ -92,6 +97,12 @@ version of the file can be written back to disk or abandoned. |
#H5Pset_fapl_core |
+Log |
+#H5FD_LOG |
+This is the #H5FD_SEC2 driver with logging capabilities. |
+#H5Pset_fapl_log |
+
+
Family |
#H5FD_FAMILY |
With this driver, the HDF5 file's address space is partitioned into pieces and sent to
@@ -105,14 +116,21 @@ systems that do not support files larger than 2 gigabytes. |
With this driver, data can be stored in multiple files according to the type of the data.
I/O might work better if data is stored in separate files based on the type of data. The Split
driver is a special case of this driver. |
-#H5Pset_fapl_multi |
+#H5Pset_fapl_multi / #H5Pset_fapl_split |
+
+
+STDIO |
+#H5FD_STDIO |
+This driver uses functions from the standard C stdio.h to perform I/O
+to a single, permanent file on local disk with additional system buffering. |
+#H5Pset_fapl_stdio |
Split |
-H5FD_SPLIT |
+#H5FD_SPLITTER |
This file driver splits a file into two parts. One part stores metadata, and the other part
stores raw data. This splitting a file into two parts is a limited case of the Multi driver. |
-#H5Pset_fapl_split |
+#H5Pset_fapl_splitter |
Parallel |
@@ -122,6 +140,56 @@ standard for both communication and file I/O.
#H5Pset_fapl_mpio |
+Direct |
+#H5FD_DIRECT |
+This is the #H5FD_SEC2 driver except data is written to or read from the file
+synchronously without being cached by the system. |
+#H5Pset_fapl_direct |
+
+
+Mirror |
+#H5FD_MIRROR |
+Serial I/O to file using Unix “stdio” functions. |
+#H5Pset_fapl_mirror |
+
+
+HDFS |
+#H5FD_HDFS |
+Read-Only access to Hadoop Distributed File System (HDFS). |
+#H5Pset_fapl_hdfs |
+
+
+ros3 |
+#H5FD_ROS3 |
+Read-Only access to Amazon's S3 service. |
+#H5Pset_fapl_ros3 |
+
+
+Subfiling |
+#H5FD_SUBFILING |
+Derived from other "stacked" VFDs such as the splitter, mirror, and family VFDs. |
+#H5Pset_fapl_subfiling |
+
+
+IOC |
+#H5FD_IOC |
+Relays VFD calls to one VFD, and write calls to another VFD. Maintains two files. |
+#H5Pset_fapl_ioc |
+
+
+Onion |
+#H5FD_ONION |
+Provide in-file provenance and revision/version control. |
+#H5Pset_fapl_onion |
+
+
+Windows |
+#H5FD_WINDOWS |
+This driver was modified in HDF5-1.8.8 to be a wrapper of the POSIX driver,
+#H5FD_SEC2. This change should not affect user applications. |
+#H5Pset_fapl_windows |
+
+
Parallel POSIX |
H5FD_MPIPOSIX |
This driver is no longer available |
diff --git a/doxygen/examples/tables/propertyLists.dox b/doxygen/examples/tables/propertyLists.dox
index 01570fa2dbe..df6a1b05d24 100644
--- a/doxygen/examples/tables/propertyLists.dox
+++ b/doxygen/examples/tables/propertyLists.dox
@@ -351,7 +351,12 @@ larger than 2 gigabytes, or retrieves information regarding driver.
#H5Pset_fapl_log |
-Sets logging driver. |
+The logging driver is a clone of the standard SEC2 (#H5FD_SEC2) driver with additional
+facilities for logging metrics and activity to a file. |
+
+
+#H5Pset_fapl_mirror/#H5Pget_fapl_mirror |
+Modifies/queries the file driver properties of the mirror driver. |
#H5Pset_fapl_mirror/#H5Pget_fapl_mirror |
@@ -376,15 +381,23 @@ or retrieves information regarding driver.
Modifies/queries the file driver properties of the onion driver. |
+#H5Pset_fapl_ros3/#H5Pget_fapl_ros3 |
+Modifies/queries the file driver properties of the ros3 driver. |
+
+
#H5Pset_fapl_sec2 |
Sets driver for unbuffered permanent files or retrieves information regarding driver. |
#H5Pset_fapl_split |
-Sets driver for split files, a limited case of multiple files with one metadata file
+ | Sets driver for split files, a limited case of multi driver with one metadata file
and one raw data file. |
+#H5Pset_fapl_splitter/#H5Pget_fapl_splitter |
+Modifies/queries the file driver properties of the splitter driver. |
+
+
#H5Pset_fapl_stdio |
Sets driver for buffered permanent files. |
diff --git a/examples/h5_interm_group.c b/examples/h5_interm_group.c
index 679238fe217..315e7825e9a 100644
--- a/examples/h5_interm_group.c
+++ b/examples/h5_interm_group.c
@@ -18,8 +18,6 @@
#include "hdf5.h"
#define H5FILE_NAME "interm_group.h5"
-#define TRUE 1
-#define FALSE 0
int
main(void)
diff --git a/examples/ph5_filtered_writes.c b/examples/ph5_filtered_writes.c
index 104704a238a..f4ddae93fa7 100644
--- a/examples/ph5_filtered_writes.c
+++ b/examples/ph5_filtered_writes.c
@@ -102,7 +102,7 @@ fill_databuf(hsize_t start[], hsize_t count[], hsize_t stride[], C_DATATYPE *dat
static void
cleanup(char *filename)
{
- hbool_t do_cleanup = getenv(HDF5_NOCLEANUP) ? 0 : 1;
+ bool do_cleanup = getenv(HDF5_NOCLEANUP) ? false : true;
if (do_cleanup)
MPI_File_delete(filename, MPI_INFO_NULL);
diff --git a/examples/ph5_filtered_writes_no_sel.c b/examples/ph5_filtered_writes_no_sel.c
index a4d9e169c36..e3ec103604c 100644
--- a/examples/ph5_filtered_writes_no_sel.c
+++ b/examples/ph5_filtered_writes_no_sel.c
@@ -102,7 +102,7 @@ fill_databuf(hsize_t start[], hsize_t count[], hsize_t stride[], C_DATATYPE *dat
static void
cleanup(char *filename)
{
- hbool_t do_cleanup = getenv(HDF5_NOCLEANUP) ? 0 : 1;
+ bool do_cleanup = getenv(HDF5_NOCLEANUP) ? false : true;
if (do_cleanup)
MPI_File_delete(filename, MPI_INFO_NULL);
@@ -125,7 +125,7 @@ write_dataset_some_no_sel(hid_t file_id, hid_t dxpl_id)
hsize_t start[EXAMPLE_DSET_DIMS];
hsize_t stride[EXAMPLE_DSET_DIMS];
hsize_t count[EXAMPLE_DSET_DIMS];
- hbool_t no_selection;
+ bool no_selection;
hid_t dset_id = H5I_INVALID_HID;
hid_t dcpl_id = H5I_INVALID_HID;
hid_t file_dataspace = H5I_INVALID_HID;
diff --git a/examples/ph5_subfiling.c b/examples/ph5_subfiling.c
index 7d7244878b8..f9c33229bb1 100644
--- a/examples/ph5_subfiling.c
+++ b/examples/ph5_subfiling.c
@@ -51,7 +51,7 @@ typedef int EXAMPLE_DSET_C_DATATYPE;
static void
cleanup(char *filename, hid_t fapl_id)
{
- hbool_t do_cleanup = getenv(HDF5_NOCLEANUP) ? 0 : 1;
+ bool do_cleanup = getenv(HDF5_NOCLEANUP) ? false : true;
if (do_cleanup)
H5Fdelete(filename, fapl_id);
diff --git a/fortran/src/H5Aff.F90 b/fortran/src/H5Aff.F90
index 3cb1191b3de..a55773a0c1f 100644
--- a/fortran/src/H5Aff.F90
+++ b/fortran/src/H5Aff.F90
@@ -1131,6 +1131,9 @@ END FUNCTION H5Aopen_by_idx
attr_id = INT(H5Aopen_by_idx(loc_id, c_obj_name, INT(idx_type, C_INT), INT(order, C_INT), n, &
aapl_id_default, lapl_id_default), HID_T)
+ hdferr = 0
+ IF(attr_id.LT.0) hdferr = -1
+
END SUBROUTINE h5aopen_by_idx_f
!>
diff --git a/fortran/src/H5Dff.F90 b/fortran/src/H5Dff.F90
index 607357031ec..f4fe4ac5e88 100644
--- a/fortran/src/H5Dff.F90
+++ b/fortran/src/H5Dff.F90
@@ -2282,6 +2282,8 @@ END SUBROUTINE h5dfill_char
!! \param buf Buffer with data to be written to the file.
!! \param hdferr \fortran_error
!! \param xfer_prp Identifier of a transfer property list for this I/O operation.
+!!
+!! See C API: @ref H5Dread_multi()
!!
SUBROUTINE h5dread_multi_f(count, dset_id, mem_type_id, mem_space_id, file_space_id, buf, hdferr, xfer_prp)
IMPLICIT NONE
@@ -2320,6 +2322,7 @@ END FUNCTION H5Dread_multi
hdferr = H5Dread_multi(count, dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp_default, buf)
END SUBROUTINE h5dread_multi_f
+
!>
!! \ingroup FH5D
!!
@@ -2333,6 +2336,8 @@ END SUBROUTINE h5dread_multi_f
!! \param buf Buffer with data to be written to the file.
!! \param hdferr \fortran_error
!! \param xfer_prp Identifier of a transfer property list for this I/O operation.
+!!
+!! See C API: @ref H5Dwrite_multi()
!!
SUBROUTINE h5dwrite_multi_f(count, dset_id, mem_type_id, mem_space_id, file_space_id, buf, hdferr, xfer_prp)
IMPLICIT NONE
@@ -2372,6 +2377,149 @@ END FUNCTION H5Dwrite_multi
END SUBROUTINE h5dwrite_multi_f
+!>
+!! \ingroup FH5D
+!!
+!! \brief Reads a raw data chunk directly from a dataset in a file into a buffer.
+!!
+!! \param dset_id Identifier of the dataset to read from
+!! \param offset Logical position of the chunk's first element in the dataspace, \Bold{0-based indices}
+!! \param filters Mask for identifying the filters in use
+!! \param buf Buffer containing data to be read from the chunk
+!! \param hdferr \fortran_error
+!! \param dxpl_id Dataset transfer property list identifier
+!!
+!! See C API: @ref H5Dread_chunk()
+!!
+ SUBROUTINE h5dread_chunk_f(dset_id, offset, filters, buf, hdferr, dxpl_id)
+ IMPLICIT NONE
+
+ INTEGER(HID_T) , INTENT(IN) :: dset_id
+ INTEGER(HSIZE_T) , INTENT(IN), DIMENSION(:) :: offset
+ INTEGER , INTENT(INOUT) :: filters
+ TYPE(C_PTR) :: buf
+ INTEGER , INTENT(OUT) :: hdferr
+ INTEGER(HID_T) , INTENT(IN), OPTIONAL :: dxpl_id
+
+ INTEGER(HID_T) :: dxpl_id_default
+ INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: c_offset
+ INTEGER(HSIZE_T) :: i, rank
+ INTEGER(C_INT32_T) :: c_filters
+
+ INTERFACE
+ INTEGER(C_INT) FUNCTION H5Dread_chunk(dset_id, dxpl_id, offset, filters, buf) &
+ BIND(C, NAME='H5Dread_chunk')
+ IMPORT :: SIZE_T, HSIZE_T, HID_T
+ IMPORT :: C_PTR, C_INT32_T, C_INT
+ IMPLICIT NONE
+ INTEGER(HID_T) , VALUE :: dset_id
+ INTEGER(HID_T) , VALUE :: dxpl_id
+ INTEGER(HSIZE_T) , DIMENSION(*) :: offset
+ INTEGER(C_INT32_T) :: filters
+ TYPE(C_PTR) , VALUE :: buf
+ END FUNCTION H5Dread_chunk
+ END INTERFACE
+
+ dxpl_id_default = H5P_DEFAULT_F
+ IF (PRESENT(dxpl_id)) dxpl_id_default = dxpl_id
+
+ c_filters = INT(filters, KIND=C_INT32_T)
+
+ rank = SIZE(offset, KIND=HSIZE_T)
+
+ ALLOCATE(c_offset(rank), STAT=hdferr)
+ IF (hdferr .NE. 0 ) THEN
+ hdferr = -1
+ RETURN
+ ENDIF
+
+ !
+ ! Reverse dimensions due to C-FORTRAN storage order
+ !
+ DO i = 1, rank
+ c_offset(i) = offset(rank - i + 1)
+ ENDDO
+
+ hdferr = INT(H5Dread_chunk(dset_id, dxpl_id_default, c_offset, c_filters, buf))
+
+ filters = INT(c_filters)
+
+ DEALLOCATE(c_offset)
+
+ END SUBROUTINE h5dread_chunk_f
+
+!>
+!! \ingroup FH5D
+!!
+!! \brief Writes a raw data chunk from a buffer directly to a dataset in a file.
+!!
+!! \param dset_id Identifier of the dataset to write to
+!! \param filters Mask for identifying the filters in use
+!! \param offset Logical position of the chunk's first element in the dataspace, \Bold{0-based indices}
+!! \param data_size Size of the actual data to be written in bytes
+!! \param buf Buffer containing data to be written to the chunk
+!! \param hdferr \fortran_error
+!! \param dxpl_id Dataset transfer property list identifier
+!!
+!! See C API: @ref H5Dwrite_chunk()
+!!
+ SUBROUTINE h5dwrite_chunk_f(dset_id, filters, offset, data_size, buf, hdferr, dxpl_id)
+ IMPLICIT NONE
+
+ INTEGER(HID_T) , INTENT(IN) :: dset_id
+ INTEGER , INTENT(IN) :: filters
+ INTEGER(HSIZE_T) , INTENT(IN), DIMENSION(:) :: offset
+ INTEGER(SIZE_T) , INTENT(IN) :: data_size
+ TYPE(C_PTR) :: buf
+ INTEGER , INTENT(OUT) :: hdferr
+ INTEGER(HID_T) , INTENT(IN), OPTIONAL :: dxpl_id
+
+ INTEGER(HID_T) :: dxpl_id_default
+ INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: c_offset
+ INTEGER(HSIZE_T) :: i, rank
+ INTEGER(C_INT32_T) :: c_filters
+
+ INTERFACE
+ INTEGER(C_INT) FUNCTION H5Dwrite_chunk(dset_id, dxpl_id, filters, offset, data_size, buf) &
+ BIND(C, NAME='H5Dwrite_chunk')
+ IMPORT :: SIZE_T, HSIZE_T, HID_T
+ IMPORT :: C_PTR, C_INT32_T, C_INT
+ IMPLICIT NONE
+ INTEGER(HID_T) , VALUE :: dset_id
+ INTEGER(HID_T) , VALUE :: dxpl_id
+ INTEGER(C_INT32_T), VALUE :: filters
+ INTEGER(HSIZE_T), DIMENSION(*) :: offset
+ INTEGER(SIZE_T) , VALUE :: data_size
+ TYPE(C_PTR) , VALUE :: buf
+ END FUNCTION H5Dwrite_chunk
+ END INTERFACE
+
+ dxpl_id_default = H5P_DEFAULT_F
+ IF (PRESENT(dxpl_id)) dxpl_id_default = dxpl_id
+
+ rank = SIZE(offset, KIND=HSIZE_T)
+
+ ALLOCATE(c_offset(rank), STAT=hdferr)
+ IF (hdferr .NE. 0 ) THEN
+ hdferr = -1
+ RETURN
+ ENDIF
+
+ !
+ ! Reverse dimensions due to C-FORTRAN storage order
+ !
+ DO i = 1, rank
+ c_offset(i) = offset(rank - i + 1)
+ ENDDO
+
+ c_filters = INT(filters, C_INT32_T)
+
+ hdferr = INT(H5Dwrite_chunk(dset_id, dxpl_id_default, c_filters, c_offset, data_size, buf))
+
+ DEALLOCATE(c_offset)
+
+ END SUBROUTINE h5dwrite_chunk_f
+
END MODULE H5D
diff --git a/fortran/src/H5Fff.F90 b/fortran/src/H5Fff.F90
index f8a74053004..fee4d3c7cf8 100644
--- a/fortran/src/H5Fff.F90
+++ b/fortran/src/H5Fff.F90
@@ -58,6 +58,40 @@ END FUNCTION h5fis_accessible
END INTERFACE
#endif
+!> @brief H5F_info_t_super derived type.
+ TYPE, BIND(C) :: H5F_info_super_t
+ INTEGER(C_INT) :: version !< Superblock version number
+ INTEGER(HSIZE_T) :: super_size !< Superblock size
+ INTEGER(HSIZE_T) :: super_ext_size !< Superblock extension size
+ END TYPE H5F_info_super_t
+
+!> @brief H5F_info_t_free derived type.
+ TYPE, BIND(C) :: H5F_info_free_t
+ INTEGER(C_INT) :: version !< Version # of file free space management
+ INTEGER(HSIZE_T) :: meta_size !< Free space manager metadata size
+ INTEGER(HSIZE_T) :: tot_space !< Amount of free space in the file
+ END TYPE H5F_info_free_t
+
+!> @brief H5_ih_info_t derived type.
+ TYPE, BIND(C) :: H5_ih_info_t
+ INTEGER(HSIZE_T) :: index_size !< btree and/or list
+ INTEGER(HSIZE_T) :: heap_size !< Heap size
+ END TYPE H5_ih_info_t
+
+!> @brief H5F_info_t_sohm derived type.
+ TYPE, BIND(C) :: H5F_info_sohm_t
+ INTEGER(C_INT) :: version !< Version # of shared object header info
+ INTEGER(HSIZE_T) :: hdr_size !< Shared object header message header size
+ TYPE(H5_ih_info_t) :: msgs_info !< Shared object header message index & heap size
+ END TYPE H5F_info_sohm_t
+
+!> @brief h5f_info_t derived type.
+ TYPE, BIND(C) :: h5f_info_t
+ TYPE(H5F_info_super_t) :: super
+ TYPE(H5F_info_free_t) :: free
+ TYPE(H5F_info_sohm_t) :: sohm
+ END TYPE h5f_info_t
+
CONTAINS
!>
!! \ingroup FH5F
@@ -1093,5 +1127,39 @@ END FUNCTION h5fset_dset_no_attrs_hint_c
END SUBROUTINE h5fset_dset_no_attrs_hint_f
+!>
+!! \ingroup FH5F
+!!
+!! \brief Retrieves global file information
+!!
+!! \param obj_id Object identifier. The identifier may be that of a file, group, dataset, named datatype, or attribute.
+!! \param file_info Buffer for global file information
+!! \param hdferr \fortran_error
+!!
+!! See C API: @ref H5Fget_info2()
+!!
+ SUBROUTINE H5Fget_info_f(obj_id, file_info, hdferr)
+ IMPLICIT NONE
+ INTEGER(HID_T) , INTENT(IN) :: obj_id
+ TYPE(H5F_INFO_T), INTENT(OUT), TARGET :: file_info
+ INTEGER , INTENT(OUT) :: hdferr
+
+ TYPE(C_PTR) :: f_ptr
+
+ INTERFACE
+ INTEGER(C_INT) FUNCTION H5Fget_info(obj_id, file_info) BIND(C, NAME='H5Fget_info2')
+ IMPORT :: HID_T, C_PTR, C_INT, H5F_INFO_T
+ IMPLICIT NONE
+ INTEGER(HID_T), VALUE :: obj_id
+ TYPE(C_PTR), VALUE :: file_info
+ END FUNCTION H5Fget_info
+ END INTERFACE
+
+ f_ptr = C_LOC(file_info)
+
+ hdferr = INT(H5Fget_info(obj_id, f_ptr))
+
+ END SUBROUTINE H5Fget_info_f
+
END MODULE H5F
diff --git a/fortran/src/H5Lff.F90 b/fortran/src/H5Lff.F90
index c474754edcc..004e5b23fdd 100644
--- a/fortran/src/H5Lff.F90
+++ b/fortran/src/H5Lff.F90
@@ -748,7 +748,10 @@ END FUNCTION H5Lexists
link_exists_c = H5Lexists(loc_id, c_name, lapl_id_default)
link_exists = .FALSE.
- IF(link_exists_c.GT.0) link_exists = .TRUE.
+ IF(link_exists_c.GT.0_C_INT) link_exists = .TRUE.
+
+ hdferr = 0
+ IF(link_exists_c.LT.0_C_INT) hdferr = -1
hdferr = 0
IF(link_exists_c.LT.0) hdferr = -1
@@ -1462,7 +1465,7 @@ END SUBROUTINE h5literate_async_f
!!
SUBROUTINE h5literate_by_name_f(loc_id, group_name, index_type, order, &
idx, op, op_data, return_value, hdferr, lapl_id)
- USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_FUNPTR
+
IMPLICIT NONE
INTEGER(HID_T) , INTENT(IN) :: loc_id
CHARACTER(LEN=*), INTENT(IN) :: group_name
@@ -1509,4 +1512,127 @@ INTEGER FUNCTION h5literate_by_name_c(loc_id, name, namelen, index_type, order,&
END SUBROUTINE h5literate_by_name_f
+!>
+!! \ingroup FH5L
+!!
+!! \brief Recursively visits all links starting from a specified group.
+!!
+!! \param grp_id Group identifier
+!! \param idx_type Index type
+!! \param order Iteration order
+!! \param op Callback function
+!! \param op_data User-defined callback function context
+!! \param return_value The return value of the first operator that returns non-zero, or zero if
+!! all members were processed with no operator returning non-zero.
+!! \param hdferr \fortran_error
+!!
+!! See C API: @ref H5Lvisit2()
+!!
+ SUBROUTINE h5lvisit_f(grp_id, idx_type, order, op, op_data, return_value, hdferr)
+
+ IMPLICIT NONE
+
+ INTEGER(hid_t), INTENT(IN) :: grp_id
+ INTEGER , INTENT(IN) :: idx_type
+ INTEGER , INTENT(IN) :: order
+ TYPE(C_FUNPTR), INTENT(IN) :: op
+ TYPE(C_PTR) , INTENT(INOUT) :: op_data ! Declare INOUT to bypass gfortran 4.8.5 issue
+ INTEGER , INTENT(OUT) :: return_value
+ INTEGER , INTENT(OUT) :: hdferr
+
+ INTEGER(C_INT) :: return_value_c
+
+ INTERFACE
+ INTEGER(C_INT) FUNCTION H5Lvisit(grp_id, idx_type, order, op, op_data) BIND(C, NAME='H5Lvisit2')
+ IMPORT :: c_char, c_int, c_ptr, c_funptr
+ IMPORT :: HID_T
+ IMPLICIT NONE
+ INTEGER(HID_T), VALUE :: grp_id
+ INTEGER(C_INT), VALUE :: idx_type
+ INTEGER(C_INT), VALUE :: order
+ TYPE(C_FUNPTR), VALUE :: op
+ TYPE(C_PTR) , VALUE :: op_data
+ END FUNCTION H5Lvisit
+ END INTERFACE
+
+ return_value_c = INT(H5Lvisit(grp_id, INT(idx_type, C_INT), INT(order, C_INT), op, op_data))
+ return_value = INT(return_value_c)
+
+ IF(return_value.GE.0)THEN
+ hdferr = 0
+ ELSE
+ hdferr = -1
+ END IF
+
+ END SUBROUTINE H5Lvisit_f
+
+!>
+!! \ingroup FH5L
+!!
+!! \brief Recursively visits all links starting from a specified group.
+!!
+!! \param loc_id Location identifier
+!! \param group_name Group name
+!! \param idx_type Index type
+!! \param order Iteration order
+!! \param op Callback function
+!! \param op_data User-defined callback function context
+!! \param return_value The return value of the first operator that returns non-zero, or zero if
+!! all members were processed with no operator returning non-zero.
+!! \param hdferr \fortran_error
+!! \param lapl_id Link access property list
+!!
+!!
+!! See C API: @ref H5Lvisit_by_name2()
+!!
+ SUBROUTINE H5Lvisit_by_name_f(loc_id, group_name, idx_type, order, op, op_data, return_value, hdferr, lapl_id)
+
+ IMPLICIT NONE
+
+ INTEGER(HID_T) , INTENT(IN) :: loc_id
+ CHARACTER(LEN=*), INTENT(IN) :: group_name
+ INTEGER , INTENT(IN) :: idx_type
+ INTEGER , INTENT(IN) :: order
+ TYPE(C_FUNPTR) , INTENT(IN) :: op
+ TYPE(C_PTR) , INTENT(INOUT) :: op_data ! Declare INOUT to bypass gfortran 4.8.5 issue
+ INTEGER , INTENT(OUT) :: return_value
+ INTEGER , INTENT(OUT) :: hdferr
+ INTEGER(HID_T), INTENT(IN), OPTIONAL :: lapl_id
+
+ INTEGER(HID_T) :: lapl_id_default
+ CHARACTER(LEN=LEN_TRIM(group_name)+1,KIND=C_CHAR) :: c_name
+ INTEGER(C_INT) :: return_value_c
+
+ INTERFACE
+ INTEGER(C_INT) FUNCTION H5Lvisit_by_name(loc_id, group_name, idx_type, order, op, op_data, lapl_id) &
+ BIND(C, NAME='H5Lvisit_by_name2')
+ IMPORT :: C_CHAR, C_INT, C_PTR, C_FUNPTR
+ IMPORT :: HID_T
+ IMPLICIT NONE
+ INTEGER(HID_T), VALUE :: loc_id
+ CHARACTER(KIND=C_CHAR), DIMENSION(*) :: group_name
+ INTEGER(C_INT), VALUE :: idx_type
+ INTEGER(C_INT), VALUE :: order
+ TYPE(C_FUNPTR), VALUE :: op
+ TYPE(C_PTR) , VALUE :: op_data
+ INTEGER(HID_T), VALUE :: lapl_id
+ END FUNCTION H5Lvisit_by_name
+ END INTERFACE
+
+ c_name = TRIM(group_name)//C_NULL_CHAR
+
+ lapl_id_default = H5P_DEFAULT_F
+ IF(PRESENT(lapl_id)) lapl_id_default = lapl_id
+
+ return_value_c = INT(H5Lvisit_by_name(loc_id, c_name, INT(idx_type, C_INT), INT(order, C_INT), op, op_data, lapl_id_default))
+ return_value = INT(return_value_c)
+
+ IF(return_value.GE.0)THEN
+ hdferr = 0
+ ELSE
+ hdferr = -1
+ END IF
+
+ END SUBROUTINE H5Lvisit_by_name_f
+
END MODULE H5L
diff --git a/fortran/src/H5Off.F90 b/fortran/src/H5Off.F90
index 75e07176d30..4a0a1632e78 100644
--- a/fortran/src/H5Off.F90
+++ b/fortran/src/H5Off.F90
@@ -1345,7 +1345,7 @@ SUBROUTINE h5ovisit_by_name_f(loc_id, object_name, index_type, order, op, op_dat
INTEGER(C_INT) FUNCTION H5Ovisit_by_name3(loc_id, object_name, index_type, order, &
op, op_data, fields, lapl_id) BIND(C, NAME='H5Ovisit_by_name3')
IMPORT :: C_CHAR, C_PTR, C_FUNPTR, C_INT
- IMPORT :: HID_T, SIZE_T
+ IMPORT :: HID_T
IMPLICIT NONE
INTEGER(HID_T), VALUE :: loc_id
CHARACTER(KIND=C_CHAR), DIMENSION(*) :: object_name
diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c
index 0efd205aa36..3a97d7eab4a 100644
--- a/fortran/src/H5Pf.c
+++ b/fortran/src/H5Pf.c
@@ -358,76 +358,6 @@ h5pget_chunk_c(hid_t_f *prp_id, int_f *max_rank, hsize_t_f *dims)
return ret_value;
}
-/****if* H5Pf/h5pset_fill_value_c
- * NAME
- * h5pset_fill_value_c
- * PURPOSE
- * Call H5Pset_fill_value to set a fillvalue for a dataset
- * INPUTS
- * prp_id - property list identifier
- * type_id - datatype identifier (fill value is of type type_id)
- * fillvalue - fillvalue
- * RETURNS
- * 0 on success, -1 on failure
- * SOURCE
- */
-int_f
-h5pset_fill_value_c(hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue)
-/******/
-{
- int ret_value = -1;
- hid_t c_prp_id;
- hid_t c_type_id;
- herr_t ret;
-
- /*
- * Call H5Pset_fill_value function.
- */
- c_prp_id = (hid_t)*prp_id;
- c_type_id = (hid_t)*type_id;
- ret = H5Pset_fill_value(c_prp_id, c_type_id, fillvalue);
-
- if (ret < 0)
- return ret_value;
- ret_value = 0;
- return ret_value;
-}
-
-/****if* H5Pf/h5pget_fill_value_c
- * NAME
- * h5pget_fill_value_c
- * PURPOSE
- * Call H5Pget_fill_value to set a fillvalue for a dataset
- * INPUTS
- * prp_id - property list identifier
- * type_id - datatype identifier (fill value is of type type_id)
- * fillvalue - fillvalue
- * RETURNS
- * 0 on success, -1 on failure
- * SOURCE
- */
-int_f
-h5pget_fill_value_c(hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue)
-/******/
-{
- int ret_value = -1;
- hid_t c_prp_id;
- hid_t c_type_id;
- herr_t ret;
-
- /*
- * Call H5Pget_fill_value function.
- */
- c_prp_id = (hid_t)*prp_id;
- c_type_id = (hid_t)*type_id;
- ret = H5Pget_fill_value(c_prp_id, c_type_id, fillvalue);
-
- if (ret < 0)
- return ret_value;
- ret_value = 0;
- return ret_value;
-}
-
/****if* H5Pf/h5pget_version_c
* NAME
* h5pget_version_c
@@ -487,77 +417,6 @@ h5pget_version_c(hid_t_f *prp_id, int_f *boot, int_f *freelist, int_f *stab, int
}
#endif /* H5_NO_DEPRECATED_SYMBOLS */
-/****if* H5Pf/h5pget_userblock_c
- * NAME
- * h5pget_userblock_c
- * PURPOSE
- * Call H5Pget_userblock to get the size of a user block in
- * a file creation property list
- * INPUTS
- * prp_id - property list identifier
- * Outputs size - Size of the user-block in bytes
- * RETURNS
- * 0 on success, -1 on failure
- * SOURCE
- */
-int_f
-h5pget_userblock_c(hid_t_f *prp_id, hsize_t_f *size)
-/******/
-{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- hsize_t c_size;
-
- /*
- * Call H5Pget_userblock function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pget_userblock(c_prp_id, &c_size);
- if (ret < 0)
- return ret_value;
-
- *size = (hsize_t_f)c_size;
- ret_value = 0;
-
- return ret_value;
-}
-
-/****if* H5Pf/h5pset_userblock_c
- * NAME
- * h5pset_userblock_c
- * PURPOSE
- * Call H5Pset_userblock to set the size of a user block in
- * a file creation property list
- * INPUTS
- * prp_id - property list identifier
- * size - Size of the user-block in bytes
- * RETURNS
- * 0 on success, -1 on failure
- * SOURCE
- */
-int_f
-h5pset_userblock_c(hid_t_f *prp_id, hsize_t_f *size)
-/******/
-{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- hsize_t c_size;
- c_size = (hsize_t)*size;
-
- /*
- * Call H5Pset_userblock function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pset_userblock(c_prp_id, c_size);
-
- if (ret < 0)
- return ret_value;
- ret_value = 0;
- return ret_value;
-}
-
/****if* H5Pf/h5pget_sizes_c
* NAME
* h5pget_sizes_c
diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90
index da7cba26c9e..c4da8f32b06 100644
--- a/fortran/src/H5Pff.F90
+++ b/fortran/src/H5Pff.F90
@@ -101,28 +101,29 @@ MODULE H5P
MODULE PROCEDURE h5pinsert_ptr
END INTERFACE
+
INTERFACE
- INTEGER FUNCTION h5pget_fill_value_c(prp_id, type_id, fillvalue) &
- BIND(C, NAME='h5pget_fill_value_c')
- IMPORT :: c_ptr
+ INTEGER(C_INT) FUNCTION H5Pset_fill_value(prp_id, type_id, fillvalue) &
+ BIND(C, NAME='H5Pset_fill_value')
+ IMPORT :: C_INT, C_PTR
IMPORT :: HID_T
IMPLICIT NONE
- INTEGER(HID_T), INTENT(IN) :: prp_id
- INTEGER(HID_T), INTENT(IN) :: type_id
- TYPE(C_PTR), VALUE :: fillvalue
- END FUNCTION h5pget_fill_value_c
+ INTEGER(hid_t), VALUE :: prp_id
+ INTEGER(hid_t), VALUE :: type_id
+ TYPE(C_PTR) , VALUE :: fillvalue
+ END FUNCTION H5Pset_fill_value
END INTERFACE
INTERFACE
- INTEGER FUNCTION h5pset_fill_value_c(prp_id, type_id, fillvalue) &
- BIND(C, NAME='h5pset_fill_value_c')
- IMPORT :: c_ptr
+ INTEGER(C_INT) FUNCTION H5Pget_fill_value(prp_id, type_id, fillvalue) &
+ BIND(C, NAME='H5Pget_fill_value')
+ IMPORT :: C_INT, C_PTR
IMPORT :: HID_T
IMPLICIT NONE
- INTEGER(HID_T), INTENT(IN) :: prp_id
- INTEGER(HID_T), INTENT(IN) :: type_id
- TYPE(C_PTR), VALUE :: fillvalue
- END FUNCTION h5pset_fill_value_c
+ INTEGER(hid_t), VALUE :: prp_id
+ INTEGER(hid_t), VALUE :: type_id
+ TYPE(C_PTR) , VALUE :: fillvalue
+ END FUNCTION H5Pget_fill_value
END INTERFACE
INTERFACE
@@ -565,16 +566,17 @@ SUBROUTINE h5pset_userblock_f(prp_id, size, hdferr)
INTEGER(HSIZE_T), INTENT(IN) :: size
INTEGER, INTENT(OUT) :: hdferr
INTERFACE
- INTEGER FUNCTION h5pset_userblock_c(prp_id, size) &
- BIND(C,NAME='h5pset_userblock_c')
+ INTEGER FUNCTION H5Pset_userblock(prp_id, size) &
+ BIND(C,NAME='H5Pset_userblock')
IMPORT :: HID_T, HSIZE_T
IMPLICIT NONE
- INTEGER(HID_T), INTENT(IN) :: prp_id
- INTEGER(HSIZE_T), INTENT(IN) :: size
- END FUNCTION h5pset_userblock_c
+ INTEGER(HID_T) , VALUE :: prp_id
+ INTEGER(HSIZE_T), VALUE :: size
+ END FUNCTION H5Pset_userblock
END INTERFACE
- hdferr = h5pset_userblock_c(prp_id, size)
+ hdferr = H5Pset_userblock(prp_id, size)
+
END SUBROUTINE h5pset_userblock_f
!>
@@ -594,15 +596,17 @@ SUBROUTINE h5pget_userblock_f(prp_id, block_size, hdferr)
INTEGER(HSIZE_T), INTENT(OUT) :: block_size
INTEGER, INTENT(OUT) :: hdferr
INTERFACE
- INTEGER FUNCTION h5pget_userblock_c(prp_id, block_size) &
- BIND(C,NAME='h5pget_userblock_c')
+ INTEGER FUNCTION H5Pget_userblock(prp_id, block_size) &
+ BIND(C,NAME='H5Pget_userblock')
IMPORT :: HID_T, HSIZE_T
IMPLICIT NONE
- INTEGER(HID_T), INTENT(IN) :: prp_id
- INTEGER(HSIZE_T), INTENT(OUT) :: block_size
- END FUNCTION h5pget_userblock_c
+ INTEGER(HID_T) , VALUE :: prp_id
+ INTEGER(HSIZE_T) :: block_size
+ END FUNCTION H5Pget_userblock
END INTERFACE
- hdferr = h5pget_userblock_c(prp_id, block_size)
+
+ hdferr = H5Pget_userblock(prp_id, block_size)
+
END SUBROUTINE h5pget_userblock_f
!>
@@ -4592,11 +4596,12 @@ SUBROUTINE h5pset_fill_value_integer(prp_id, type_id, fillvalue, hdferr)
INTEGER(HID_T), INTENT(IN) :: type_id
INTEGER, INTENT(IN), TARGET :: fillvalue
INTEGER, INTENT(OUT) :: hdferr
+
TYPE(C_PTR) :: f_ptr ! C address
f_ptr = C_LOC(fillvalue)
- hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr)
+ hdferr = INT(H5Pset_fill_value(prp_id, type_id, f_ptr))
END SUBROUTINE h5pset_fill_value_integer
@@ -4610,7 +4615,7 @@ SUBROUTINE h5pget_fill_value_integer(prp_id, type_id, fillvalue, hdferr)
f_ptr = C_LOC(fillvalue)
- hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr)
+ hdferr = INT(H5Pget_fill_value(prp_id, type_id, f_ptr))
END SUBROUTINE h5pget_fill_value_integer
@@ -4623,7 +4628,7 @@ SUBROUTINE h5pset_fill_value_char(prp_id, type_id, fillvalue, hdferr)
TYPE(C_PTR) :: f_ptr ! C address
f_ptr = C_LOC(fillvalue(1:1))
- hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr)
+ hdferr = INT(H5Pset_fill_value(prp_id, type_id, f_ptr))
END SUBROUTINE h5pset_fill_value_char
@@ -4650,7 +4655,8 @@ SUBROUTINE h5pget_fill_value_char(prp_id, type_id, fillvalue, hdferr)
ENDIF
f_ptr = C_LOC(chr(1)(1:1))
- hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr)
+
+ hdferr = INT(H5Pget_fill_value(prp_id, type_id, f_ptr))
DO i = 1, chr_len
fillvalue(i:i) = chr(i)
@@ -4663,10 +4669,10 @@ SUBROUTINE h5pset_fill_value_ptr(prp_id, type_id, fillvalue, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: prp_id
INTEGER(HID_T), INTENT(IN) :: type_id
- TYPE(C_PTR), INTENT(IN) :: fillvalue
+ TYPE(C_PTR) :: fillvalue
INTEGER, INTENT(OUT) :: hdferr
- hdferr = h5pset_fill_value_c(prp_id, type_id, fillvalue)
+ hdferr = INT(H5Pset_fill_value(prp_id, type_id, fillvalue))
END SUBROUTINE h5pset_fill_value_ptr
@@ -4677,7 +4683,7 @@ SUBROUTINE h5pget_fill_value_ptr(prp_id, type_id, fillvalue, hdferr)
TYPE(C_PTR) , INTENT(IN) :: fillvalue
INTEGER , INTENT(OUT) :: hdferr
- hdferr = h5pget_fill_value_c(prp_id, type_id, fillvalue)
+ hdferr = INT(H5Pget_fill_value(prp_id, type_id, fillvalue))
END SUBROUTINE h5pget_fill_value_ptr
@@ -5322,8 +5328,49 @@ END FUNCTION H5Pget_fapl_ioc
hdferr = h5pget_fapl_ioc(prp_id, f_ptr)
END SUBROUTINE h5pget_fapl_ioc_f
+
#endif
+!>
+!! \ingroup FH5P
+!!
+!! \brief Retrieves local and global causes that broke collective I/O on the last parallel I/O call.
+!!
+!! \param plist_id Dataset transfer property list identifier
+!! \param local_no_collective_cause An enumerated set value indicating the causes that prevented collective I/O in the local process
+!! \param global_no_collective_cause An enumerated set value indicating the causes across all processes that prevented collective I/O
+!! \param hdferr \fortran_error
+!!
+!! See C API: @ref H5Pget_mpio_no_collective_cause()
+!!
+ SUBROUTINE h5pget_mpio_no_collective_cause_f(plist_id, local_no_collective_cause, global_no_collective_cause, hdferr)
+ IMPLICIT NONE
+ INTEGER(HID_T) , INTENT(IN) :: plist_id
+ INTEGER, INTENT(OUT) :: local_no_collective_cause
+ INTEGER, INTENT(OUT) :: global_no_collective_cause
+ INTEGER , INTENT(OUT) :: hdferr
+
+ INTEGER(C_INT32_T) :: c_local_no_collective_cause
+ INTEGER(C_INT32_T) :: c_global_no_collective_cause
+
+ INTERFACE
+ INTEGER(C_INT) FUNCTION H5Pget_mpio_no_collective_cause(plist_id, local_no_collective_cause, global_no_collective_cause) &
+ BIND(C, NAME='H5Pget_mpio_no_collective_cause')
+ IMPORT :: HID_T, C_INT, C_INT32_T
+ IMPLICIT NONE
+ INTEGER(HID_T) , VALUE :: plist_id
+ INTEGER(C_INT32_T) :: local_no_collective_cause
+ INTEGER(C_INT32_T) :: global_no_collective_cause
+ END FUNCTION H5Pget_mpio_no_collective_cause
+ END INTERFACE
+
+ hdferr = INT(H5Pget_mpio_no_collective_cause(plist_id, c_local_no_collective_cause, c_global_no_collective_cause))
+
+ local_no_collective_cause = INT(c_local_no_collective_cause)
+ global_no_collective_cause = INT(c_global_no_collective_cause)
+
+ END SUBROUTINE h5pget_mpio_no_collective_cause_f
+
!>
!! \ingroup FH5P
!!
@@ -6274,5 +6321,192 @@ END FUNCTION H5Pset_file_locking
END SUBROUTINE h5pset_file_locking_f
+!>
+!! \ingroup FH5P
+!!
+!! \brief Retrieves the cause for not performing selection or vector I/O on the last parallel I/O call.
+!!
+!! \param plist_id Dataset transfer property list identifier
+!! \param no_selection_io_cause A bitwise set value indicating the relevant causes that prevented selection I/O from being performed
+!! \param hdferr \fortran_error
+!!
+!! See C API: @ref H5Pget_no_selection_io_cause()
+!!
+ SUBROUTINE h5pget_no_selection_io_cause_f(plist_id, no_selection_io_cause, hdferr)
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN) :: plist_id
+ INTEGER , INTENT(OUT) :: no_selection_io_cause
+ INTEGER , INTENT(OUT) :: hdferr
+
+ INTEGER(C_INT32_T) :: c_no_selection_io_cause
+
+ INTERFACE
+ INTEGER(C_INT) FUNCTION H5Pget_no_selection_io_cause(plist_id, no_selection_io_cause) &
+ BIND(C, NAME='H5Pget_no_selection_io_cause')
+ IMPORT :: HID_T, C_INT, C_INT32_T
+ IMPLICIT NONE
+ INTEGER(HID_T) , VALUE :: plist_id
+ INTEGER(C_INT32_T) :: no_selection_io_cause
+ END FUNCTION H5Pget_no_selection_io_cause
+ END INTERFACE
+
+ hdferr = INT( H5Pget_no_selection_io_cause(plist_id, c_no_selection_io_cause))
+
+ no_selection_io_cause = INT(c_no_selection_io_cause)
+
+ END SUBROUTINE h5pget_no_selection_io_cause_f
+
+
+!>
+!! \ingroup FH5P
+!!
+!! \brief Sets the file space handling strategy and persisting free-space values for a file creation property list.
+!!
+!! \param plist_id File creation property list identifier
+!! \param strategy The file space handling strategy to be used. See: H5F_fspace_strategy_t
+!! \param persist Indicates whether free space should be persistent or not
+!! \param threshold The smallest free-space section size that the free space manager will track
+!! \param hdferr \fortran_error
+!!
+!! See C API: @ref H5Pset_file_space_strategy()
+!!
+ SUBROUTINE H5Pset_file_space_strategy_f(plist_id, strategy, persist, threshold, hdferr)
+ IMPLICIT NONE
+ INTEGER(HID_T) , INTENT(IN) :: plist_id
+ INTEGER , INTENT(IN) :: strategy
+ LOGICAL , INTENT(IN) :: persist
+ INTEGER(HSIZE_T), INTENT(IN) :: threshold
+ INTEGER , INTENT(OUT) :: hdferr
+
+ LOGICAL(C_BOOL) :: c_persist
+
+ INTERFACE
+ INTEGER(C_INT) FUNCTION H5Pset_file_space_strategy(plist_id, strategy, persist, threshold) &
+ BIND(C, NAME='H5Pset_file_space_strategy')
+ IMPORT :: HID_T, HSIZE_T, C_INT, C_BOOL
+ IMPLICIT NONE
+ INTEGER(HID_T) , VALUE :: plist_id
+ INTEGER(C_INT) , VALUE :: strategy
+ LOGICAL(C_BOOL) , VALUE :: persist
+ INTEGER(HSIZE_T), VALUE :: threshold
+ END FUNCTION H5Pset_file_space_strategy
+ END INTERFACE
+
+ ! Transfer value of Fortran LOGICAL to C C_BOOL type
+ c_persist = persist
+
+ hdferr = INT( H5Pset_file_space_strategy(plist_id, INT(strategy, C_INT), c_persist, threshold) )
+
+ END SUBROUTINE H5Pset_file_space_strategy_f
+
+!>
+!! \ingroup FH5P
+!!
+!! \brief Gets the file space handling strategy and persisting free-space values for a file creation property list.
+!!
+!! \param plist_id File creation property list identifier
+!! \param strategy The file space handling strategy to be used.
+!! \param persist Indicate whether free space should be persistent or not
+!! \param threshold The free-space section size threshold value
+!! \param hdferr \fortran_error
+!!
+!! See C API: @ref H5Pget_file_space_strategy()
+!!
+ SUBROUTINE h5pget_file_space_strategy_f(plist_id, strategy, persist, threshold, hdferr)
+ IMPLICIT NONE
+ INTEGER(HID_T) , INTENT(IN) :: plist_id
+ INTEGER , INTENT(OUT) :: strategy
+ LOGICAL , INTENT(OUT) :: persist
+ INTEGER(HSIZE_T), INTENT(OUT) :: threshold
+ INTEGER , INTENT(OUT) :: hdferr
+
+ LOGICAL(C_BOOL) :: c_persist
+ INTEGER(C_INT) :: c_strategy
+
+ INTERFACE
+ INTEGER(C_INT) FUNCTION H5Pget_file_space_strategy(plist_id, strategy, persist, threshold) &
+ BIND(C, NAME='H5Pget_file_space_strategy')
+ IMPORT :: HID_T, HSIZE_T, C_INT, C_BOOL
+ IMPLICIT NONE
+ INTEGER(HID_T), VALUE :: plist_id
+ INTEGER(C_INT) :: strategy
+ LOGICAL(C_BOOL) :: persist
+ INTEGER(HSIZE_T) :: threshold
+ END FUNCTION H5Pget_file_space_strategy
+ END INTERFACE
+
+
+ hdferr = INT( H5Pget_file_space_strategy(plist_id, c_strategy, c_persist, threshold) )
+
+ ! Transfer value of Fortran LOGICAL and C C_BOOL type
+ persist = .FALSE.
+ strategy = -1
+ IF(hdferr .GE. 0)THEN
+ persist = c_persist
+ strategy = INT(c_strategy)
+ ENDIF
+
+ END SUBROUTINE h5pget_file_space_strategy_f
+
+!>
+!! \ingroup FH5P
+!!
+!! \brief Sets the file space page size for a file creation property list.
+!!
+!! \param prp_id File creation property list identifier
+!! \param fsp_size File space page size
+!! \param hdferr \fortran_error
+!!
+!! See C API: @ref H5Pset_file_space_page_size()
+!!
+ SUBROUTINE h5pset_file_space_page_size_f(prp_id, fsp_size, hdferr)
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN) :: prp_id
+ INTEGER(HSIZE_T), INTENT(IN) :: fsp_size
+ INTEGER, INTENT(OUT) :: hdferr
+ INTERFACE
+ INTEGER(C_INT) FUNCTION H5Pset_file_space_page_size(prp_id, fsp_size) &
+ BIND(C,NAME='H5Pset_file_space_page_size')
+ IMPORT :: C_INT, HID_T, HSIZE_T
+ IMPLICIT NONE
+ INTEGER(HID_T) , VALUE :: prp_id
+ INTEGER(HSIZE_T), VALUE :: fsp_size
+ END FUNCTION H5Pset_file_space_page_size
+ END INTERFACE
+
+ hdferr = INT(h5pset_file_space_page_size(prp_id, fsp_size))
+
+ END SUBROUTINE h5pset_file_space_page_size_f
+
+!>
+!! \ingroup FH5P
+!!
+!! \brief Gets the file space page size for a file creation property list.
+!!
+!! \param prp_id File creation property list identifier
+!! \param fsp_size File space page size
+!! \param hdferr \fortran_error
+!!
+!! See C API: @ref H5Pget_file_space_page_size()
+!!
+ SUBROUTINE h5pget_file_space_page_size_f(prp_id, fsp_size, hdferr)
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN) :: prp_id
+ INTEGER(HSIZE_T), INTENT(OUT) :: fsp_size
+ INTEGER, INTENT(OUT) :: hdferr
+ INTERFACE
+ INTEGER(C_INT) FUNCTION H5Pget_file_space_page_size(prp_id, fsp_size) &
+ BIND(C,NAME='H5Pget_file_space_page_size')
+ IMPORT :: C_INT, HID_T, HSIZE_T
+ IMPLICIT NONE
+ INTEGER(HID_T), VALUE :: prp_id
+ INTEGER(HSIZE_T) :: fsp_size
+ END FUNCTION H5Pget_file_space_page_size
+ END INTERFACE
+
+ hdferr = INT(h5pget_file_space_page_size(prp_id, fsp_size))
+
+ END SUBROUTINE h5pget_file_space_page_size_f
+
END MODULE H5P
diff --git a/fortran/src/H5Sff.F90 b/fortran/src/H5Sff.F90
index fff32c0a6c7..5a1ca53cd46 100644
--- a/fortran/src/H5Sff.F90
+++ b/fortran/src/H5Sff.F90
@@ -436,6 +436,91 @@ END FUNCTION h5sselect_all_c
END SUBROUTINE h5sselect_all_f
+!>
+!! \ingroup FH5S
+!!
+!! \brief Checks if two selections are the same shape.
+!!
+!! \param space1_id Dataspace identifier
+!! \param space2_id Dataspace identifier
+!! \param same Value of check
+!! \param hdferr \fortran_error
+!!
+!! See C API: @ref H5Sselect_shape_same()
+!!
+ SUBROUTINE H5Sselect_shape_same_f(space1_id, space2_id, same, hdferr)
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN) :: space1_id
+ INTEGER(HID_T), INTENT(IN) :: space2_id
+ LOGICAL , INTENT(OUT) :: same
+ INTEGER , INTENT(OUT) :: hdferr
+
+ INTEGER(C_INT) :: c_same
+
+ INTERFACE
+ INTEGER(C_INT) FUNCTION H5Sselect_shape_same(space1_id, space2_id) BIND(C,NAME='H5Sselect_shape_same')
+ IMPORT :: C_INT, HID_T
+ IMPLICIT NONE
+ INTEGER(HID_T), VALUE :: space1_id
+ INTEGER(HID_T), VALUE :: space2_id
+ END FUNCTION H5Sselect_shape_same
+ END INTERFACE
+
+ c_same = H5Sselect_shape_same(space1_id, space2_id)
+
+ same = .FALSE.
+ IF(c_same .GT. 0_C_INT) same = .TRUE.
+
+ hdferr = 0
+ IF(c_same .LT. 0_C_INT) hdferr = -1
+
+ END SUBROUTINE H5Sselect_shape_same_f
+
+!>
+!! \ingroup FH5S
+!!
+!! \brief Checks if current selection intersects with a block.
+!!
+!! \param space_id Dataspace identifier
+!! \param istart Starting coordinate of the block
+!! \param iend Opposite ("ending") coordinate of the block
+!! \param intersects Dataspace intersects with the block specified
+!! \param hdferr \fortran_error
+!!
+!! See C API: @ref H5Sselect_intersect_block()
+!!
+
+ SUBROUTINE H5Sselect_intersect_block_f(space_id, istart, iend, intersects, hdferr)
+ IMPLICIT NONE
+ INTEGER(HID_T) , INTENT(IN) :: space_id
+ INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: istart
+ INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: iend
+ LOGICAL, INTENT(OUT) :: intersects
+ INTEGER, INTENT(OUT) :: hdferr
+
+ INTEGER(C_INT) :: c_intersects
+
+ INTERFACE
+ INTEGER(C_INT) FUNCTION H5Sselect_intersect_block(space_id, istart, iend) &
+ BIND(C,NAME='H5Sselect_intersect_block')
+ IMPORT :: C_INT, HID_T, HSIZE_T
+ IMPLICIT NONE
+ INTEGER(HID_T), VALUE :: space_id
+ INTEGER(HSIZE_T), DIMENSION(*) :: istart
+ INTEGER(HSIZE_T), DIMENSION(*) :: iend
+ END FUNCTION H5Sselect_intersect_block
+ END INTERFACE
+
+ c_intersects = H5Sselect_intersect_block(space_id, istart, iend)
+
+ intersects = .FALSE.
+ IF(c_intersects .GT. 0_C_INT) intersects = .TRUE.
+
+ hdferr = 0
+ IF(c_intersects .LT. 0_C_INT) hdferr = -1
+
+ END SUBROUTINE H5Sselect_intersect_block_f
+
!>
!! \ingroup FH5S
!!
@@ -808,7 +893,7 @@ END SUBROUTINE h5sset_extent_none_f
!! \param operator Flag, valid values are:
!! \li H5S_SELECT_SET_F
!! \li H5S_SELECT_OR_F
-!! \param start Array with hyperslab offsets.
+!! \param start Array with hyperslab offsets, \Bold{0-based indices}.
!! \param count Number of blocks included in the hyperslab.
!! \param hdferr \fortran_error
!! \param stride Array with hyperslab strides.
diff --git a/fortran/src/H5_buildiface.F90 b/fortran/src/H5_buildiface.F90
index 18272042b30..cd4580b8c04 100644
--- a/fortran/src/H5_buildiface.F90
+++ b/fortran/src/H5_buildiface.F90
@@ -890,7 +890,7 @@ PROGRAM H5_buildiface
WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr '
WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr '
WRITE(11,'(A)') ' f_ptr = C_LOC(fillvalue)'
- WRITE(11,'(A)') ' hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr)'
+ WRITE(11,'(A)') ' hdferr = INT(h5pset_fill_value(prp_id, type_id, f_ptr))'
WRITE(11,'(A)') ' END SUBROUTINE h5pset_fill_value_kind_'//TRIM(ADJUSTL(chr2))
ENDDO
@@ -912,7 +912,7 @@ PROGRAM H5_buildiface
WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr'
WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr'
WRITE(11,'(A)') ' f_ptr = C_LOC(fillvalue)'
- WRITE(11,'(A)') ' hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr)'
+ WRITE(11,'(A)') ' hdferr = INT(h5pget_fill_value(prp_id, type_id, f_ptr))'
WRITE(11,'(A)') ' END SUBROUTINE h5pget_fill_value_kind_'//TRIM(ADJUSTL(chr2))
ENDDO
diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c
index da2b5d92c9f..181047b5454 100644
--- a/fortran/src/H5_f.c
+++ b/fortran/src/H5_f.c
@@ -449,6 +449,34 @@ h5init_flags_c(int_f *h5d_flags, size_t_f *h5d_size_flags, int_f *h5e_flags, hid
h5d_flags[30] = (int_f)H5D_SELECTION_IO_MODE_OFF;
h5d_flags[31] = (int_f)H5D_SELECTION_IO_MODE_ON;
+ h5d_flags[32] = (int_f)H5D_MPIO_COLLECTIVE;
+ h5d_flags[33] = (int_f)H5D_MPIO_SET_INDEPENDENT;
+ h5d_flags[34] = (int_f)H5D_MPIO_DATATYPE_CONVERSION;
+ h5d_flags[35] = (int_f)H5D_MPIO_DATA_TRANSFORMS;
+ h5d_flags[36] = (int_f)H5D_MPIO_MPI_OPT_TYPES_ENV_VAR_DISABLED;
+ h5d_flags[37] = (int_f)H5D_MPIO_NOT_SIMPLE_OR_SCALAR_DATASPACES;
+ h5d_flags[38] = (int_f)H5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET;
+ h5d_flags[39] = (int_f)H5D_MPIO_PARALLEL_FILTERED_WRITES_DISABLED;
+ h5d_flags[40] = (int_f)H5D_MPIO_ERROR_WHILE_CHECKING_COLLECTIVE_POSSIBLE;
+ h5d_flags[41] = (int_f)H5D_MPIO_NO_SELECTION_IO;
+ h5d_flags[42] = (int_f)H5D_MPIO_NO_COLLECTIVE_MAX_CAUSE;
+
+ h5d_flags[43] = (int_f)H5D_SEL_IO_DISABLE_BY_API;
+ h5d_flags[44] = (int_f)H5D_SEL_IO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET;
+ h5d_flags[45] = (int_f)H5D_SEL_IO_CONTIGUOUS_SIEVE_BUFFER;
+ h5d_flags[46] = (int_f)H5D_SEL_IO_NO_VECTOR_OR_SELECTION_IO_CB;
+ h5d_flags[47] = (int_f)H5D_SEL_IO_PAGE_BUFFER;
+ h5d_flags[48] = (int_f)H5D_SEL_IO_DATASET_FILTER;
+ h5d_flags[49] = (int_f)H5D_SEL_IO_CHUNK_CACHE;
+ h5d_flags[50] = (int_f)H5D_SEL_IO_TCONV_BUF_TOO_SMALL;
+ h5d_flags[51] = (int_f)H5D_SEL_IO_BKG_BUF_TOO_SMALL;
+ h5d_flags[52] = (int_f)H5D_SEL_IO_DEFAULT_OFF;
+ h5d_flags[53] = (int_f)H5D_MPIO_NO_SELECTION_IO_CAUSES;
+
+ h5d_flags[54] = (int_f)H5D_MPIO_NO_CHUNK_OPTIMIZATION;
+ h5d_flags[55] = (int_f)H5D_MPIO_LINK_CHUNK;
+ h5d_flags[56] = (int_f)H5D_MPIO_MULTI_CHUNK;
+
/*
* H5E flags
*/
@@ -497,10 +525,15 @@ h5init_flags_c(int_f *h5d_flags, size_t_f *h5d_size_flags, int_f *h5e_flags, hid
h5f_flags[18] = (int_f)H5F_LIBVER_ERROR;
h5f_flags[19] = (int_f)H5F_LIBVER_NBOUNDS;
h5f_flags[20] = (int_f)H5F_UNLIMITED;
- h5f_flags[21] = (int_f)H5F_LIBVER_V18;
- h5f_flags[22] = (int_f)H5F_LIBVER_V110;
- h5f_flags[23] = (int_f)H5F_LIBVER_V112;
- h5f_flags[24] = (int_f)H5F_LIBVER_V114;
+ h5f_flags[21] = (int_f)H5F_FSPACE_STRATEGY_FSM_AGGR;
+ h5f_flags[22] = (int_f)H5F_FSPACE_STRATEGY_PAGE;
+ h5f_flags[23] = (int_f)H5F_FSPACE_STRATEGY_AGGR;
+ h5f_flags[24] = (int_f)H5F_FSPACE_STRATEGY_NONE;
+ h5f_flags[25] = (int_f)H5F_FSPACE_STRATEGY_NTYPES;
+ h5f_flags[26] = (int_f)H5F_LIBVER_V18;
+ h5f_flags[27] = (int_f)H5F_LIBVER_V110;
+ h5f_flags[28] = (int_f)H5F_LIBVER_V112;
+ h5f_flags[29] = (int_f)H5F_LIBVER_V114;
/*
* H5FD flags
diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90
index 2196ff8bf32..68b3dd874bb 100644
--- a/fortran/src/H5_ff.F90
+++ b/fortran/src/H5_ff.F90
@@ -56,7 +56,7 @@ MODULE H5LIB
!
! H5F flags declaration
!
- INTEGER, PARAMETER :: H5F_FLAGS_LEN = 25
+ INTEGER, PARAMETER :: H5F_FLAGS_LEN = 30
INTEGER, DIMENSION(1:H5F_FLAGS_LEN) :: H5F_flags
!
! H5generic flags declaration
@@ -74,7 +74,7 @@ MODULE H5LIB
!
! H5D flags declaration
!
- INTEGER, PARAMETER :: H5D_FLAGS_LEN = 32
+ INTEGER, PARAMETER :: H5D_FLAGS_LEN = 57
INTEGER, DIMENSION(1:H5D_FLAGS_LEN) :: H5D_flags
INTEGER, PARAMETER :: H5D_SIZE_FLAGS_LEN = 2
INTEGER(SIZE_T), DIMENSION(1:H5D_SIZE_FLAGS_LEN) :: H5D_size_flags
@@ -166,7 +166,7 @@ MODULE H5LIB
INTEGER, DIMENSION(1:H5LIB_FLAGS_LEN) :: H5LIB_flags
PUBLIC :: h5open_f, h5close_f, h5get_libversion_f, h5dont_atexit_f, h5kind_to_type, h5offsetof, h5gmtime
- PUBLIC :: h5garbage_collect_f, h5check_version_f
+ PUBLIC :: h5garbage_collect_f, h5check_version_f, h5get_free_list_sizes_f
CONTAINS
!>
@@ -348,31 +348,36 @@ END FUNCTION h5init1_flags_c
!
! H5F flags
!
- H5F_ACC_RDWR_F = H5F_flags(1)
- H5F_ACC_RDONLY_F = H5F_flags(2)
- H5F_ACC_TRUNC_F = H5F_flags(3)
- H5F_ACC_EXCL_F = H5F_flags(4)
- H5F_ACC_DEBUG_F = H5F_flags(5)
- H5F_SCOPE_LOCAL_F = H5F_flags(6)
- H5F_SCOPE_GLOBAL_F = H5F_flags(7)
- H5F_CLOSE_DEFAULT_F = H5F_flags(8)
- H5F_CLOSE_WEAK_F = H5F_flags(9)
- H5F_CLOSE_SEMI_F = H5F_flags(10)
- H5F_CLOSE_STRONG_F = H5F_flags(11)
- H5F_OBJ_FILE_F = H5F_flags(12)
- H5F_OBJ_DATASET_F = H5F_flags(13)
- H5F_OBJ_GROUP_F = H5F_flags(14)
- H5F_OBJ_DATATYPE_F = H5F_flags(15)
- H5F_OBJ_ALL_F = H5F_flags(16)
- H5F_LIBVER_EARLIEST_F = H5F_flags(17)
- H5F_LIBVER_LATEST_F = H5F_flags(18)
- H5F_LIBVER_ERROR_F = H5F_flags(19)
- H5F_LIBVER_NBOUNDS_F = H5F_flags(20)
- H5F_UNLIMITED_F = H5F_flags(21)
- H5F_LIBVER_V18_F = H5F_flags(22)
- H5F_LIBVER_V110_F = H5F_flags(23)
- H5F_LIBVER_V112_F = H5F_flags(24)
- H5F_LIBVER_V114_F = H5F_flags(25)
+ H5F_ACC_RDWR_F = H5F_flags(1)
+ H5F_ACC_RDONLY_F = H5F_flags(2)
+ H5F_ACC_TRUNC_F = H5F_flags(3)
+ H5F_ACC_EXCL_F = H5F_flags(4)
+ H5F_ACC_DEBUG_F = H5F_flags(5)
+ H5F_SCOPE_LOCAL_F = H5F_flags(6)
+ H5F_SCOPE_GLOBAL_F = H5F_flags(7)
+ H5F_CLOSE_DEFAULT_F = H5F_flags(8)
+ H5F_CLOSE_WEAK_F = H5F_flags(9)
+ H5F_CLOSE_SEMI_F = H5F_flags(10)
+ H5F_CLOSE_STRONG_F = H5F_flags(11)
+ H5F_OBJ_FILE_F = H5F_flags(12)
+ H5F_OBJ_DATASET_F = H5F_flags(13)
+ H5F_OBJ_GROUP_F = H5F_flags(14)
+ H5F_OBJ_DATATYPE_F = H5F_flags(15)
+ H5F_OBJ_ALL_F = H5F_flags(16)
+ H5F_LIBVER_EARLIEST_F = H5F_flags(17)
+ H5F_LIBVER_LATEST_F = H5F_flags(18)
+ H5F_LIBVER_ERROR_F = H5F_flags(19)
+ H5F_LIBVER_NBOUNDS_F = H5F_flags(20)
+ H5F_UNLIMITED_F = H5F_flags(21)
+ H5F_FSPACE_STRATEGY_FSM_AGGR_F = H5F_flags(22)
+ H5F_FSPACE_STRATEGY_PAGE_F = H5F_flags(23)
+ H5F_FSPACE_STRATEGY_AGGR_F = H5F_flags(24)
+ H5F_FSPACE_STRATEGY_NONE_F = H5F_flags(25)
+ H5F_FSPACE_STRATEGY_NTYPES_F = H5F_flags(26)
+ H5F_LIBVER_V18_F = H5F_flags(27)
+ H5F_LIBVER_V110_F = H5F_flags(28)
+ H5F_LIBVER_V112_F = H5F_flags(29)
+ H5F_LIBVER_V114_F = H5F_flags(30)
!
! H5generic flags
!
@@ -437,6 +442,31 @@ END FUNCTION h5init1_flags_c
H5D_SELECTION_IO_MODE_DEFAULT_F = H5D_flags(30)
H5D_SELECTION_IO_MODE_OFF_F = H5D_flags(31)
H5D_SELECTION_IO_MODE_ON_F = H5D_flags(32)
+ H5D_MPIO_COLLECTIVE_F = H5D_flags(33)
+ H5D_MPIO_SET_INDEPENDENT_F = H5D_flags(34)
+ H5D_MPIO_DATATYPE_CONVERSION_F = H5D_flags(35)
+ H5D_MPIO_DATA_TRANSFORMS_F = H5D_flags(36)
+ H5D_MPIO_MPI_OPT_TYPES_ENV_VAR_DISABLED_F = H5D_flags(37)
+ H5D_MPIO_NOT_SIMPLE_OR_SCALAR_DATASPACES_F = H5D_flags(38)
+ H5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET_F = H5D_flags(39)
+ H5D_MPIO_PARALLEL_FILTERED_WRITES_DISABLED_F = H5D_flags(40)
+ H5D_MPIO_ERROR_WHILE_CHECKING_COLLECTIVE_POSSIBLE_F = H5D_flags(41)
+ H5D_MPIO_NO_SELECTION_IO_F = H5D_flags(42)
+ H5D_MPIO_NO_COLLECTIVE_MAX_CAUSE_F = H5D_flags(43)
+ H5D_SEL_IO_DISABLE_BY_API_F = H5D_flags(44)
+ H5D_SEL_IO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET_F = H5D_flags(45)
+ H5D_SEL_IO_CONTIGUOUS_SIEVE_BUFFER_F = H5D_flags(46)
+ H5D_SEL_IO_NO_VECTOR_OR_SELECTION_IO_CB_F = H5D_flags(47)
+ H5D_SEL_IO_PAGE_BUFFER_F = H5D_flags(48)
+ H5D_SEL_IO_DATASET_FILTER_F = H5D_flags(49)
+ H5D_SEL_IO_CHUNK_CACHE_F = H5D_flags(50)
+ H5D_SEL_IO_TCONV_BUF_TOO_SMALL_F = H5D_flags(51)
+ H5D_SEL_IO_BKG_BUF_TOO_SMALL_F = H5D_flags(52)
+ H5D_SEL_IO_DEFAULT_OFF_F = H5D_flags(53)
+ H5D_MPIO_NO_SELECTION_IO_CAUSES_F = H5D_flags(54)
+ H5D_MPIO_NO_CHUNK_OPTIMIZATION_F = H5D_flags(55)
+ H5D_MPIO_LINK_CHUNK_F = H5D_flags(56)
+ H5D_MPIO_MULTI_CHUNK_F = H5D_flags(57)
H5D_CHUNK_CACHE_NSLOTS_DFLT_F = H5D_size_flags(1)
H5D_CHUNK_CACHE_NBYTES_DFLT_F = H5D_size_flags(2)
@@ -798,6 +828,8 @@ END SUBROUTINE h5close_f
!! \param minnum Minor version of the library.
!! \param relnum Release version of the library.
!! \param error \fortran_error
+!!
+!! See C API: @ref H5get_libversion()
!!
SUBROUTINE h5get_libversion_f(majnum, minnum, relnum, error)
IMPLICIT NONE
@@ -823,6 +855,8 @@ END SUBROUTINE h5get_libversion_f
!! \param minnum Minor version of the library.
!! \param relnum Release version of the library.
!! \param error \fortran_error
+!!
+!! See C API: @ref H5check_version()
!!
SUBROUTINE h5check_version_f(majnum, minnum, relnum, error)
IMPLICIT NONE
@@ -845,6 +879,8 @@ END SUBROUTINE h5check_version_f
!! \brief Garbage collects on all free-lists of all types.
!!
!! \param error \fortran_error
+!!
+!! See C API: @ref H5garbage_collect()
!!
SUBROUTINE h5garbage_collect_f(error)
IMPLICIT NONE
@@ -864,6 +900,8 @@ END SUBROUTINE h5garbage_collect_f
!! \brief Instructs library not to install atexit cleanup routine.
!!
!! \param error \fortran_error
+!!
+!! See C API: @ref H5dont_atexit()
!!
SUBROUTINE h5dont_atexit_f(error)
IMPLICIT NONE
@@ -878,6 +916,41 @@ END FUNCTION h5dont_atexit_c
END SUBROUTINE h5dont_atexit_f
+!>
+!! \ingroup FH5
+!! \brief Gets the current size of the free lists used to manage memory
+!!
+!! \param reg_size The current size of all "regular" free list memory used
+!! \param arr_size The current size of all "array" free list memory used
+!! \param blk_size The current size of all "block" free list memory used
+!! \param fac_size The current size of all "factory" free list memory used
+!! \param error \fortran_error
+!!
+!! See C API: @ref H5get_free_list_sizes()
+!!
+ SUBROUTINE h5get_free_list_sizes_f(reg_size, arr_size, blk_size, fac_size, error)
+ IMPLICIT NONE
+ INTEGER(C_SIZE_T), INTENT(OUT) :: reg_size
+ INTEGER(C_SIZE_T), INTENT(OUT) :: arr_size
+ INTEGER(C_SIZE_T), INTENT(OUT) :: blk_size
+ INTEGER(C_SIZE_T), INTENT(OUT) :: fac_size
+ INTEGER, INTENT(OUT) :: error
+
+ INTERFACE
+ INTEGER(C_INT) FUNCTION H5get_free_list_sizes(reg_size, arr_size, blk_size, fac_size) BIND(C,NAME='H5get_free_list_sizes')
+ IMPORT :: C_INT, C_SIZE_T
+ IMPLICIT NONE
+ INTEGER(C_SIZE_T), INTENT(OUT) :: reg_size
+ INTEGER(C_SIZE_T), INTENT(OUT) :: arr_size
+ INTEGER(C_SIZE_T), INTENT(OUT) :: blk_size
+ INTEGER(C_SIZE_T), INTENT(OUT) :: fac_size
+ END FUNCTION H5get_free_list_sizes
+ END INTERFACE
+
+ error = INT(H5get_free_list_sizes(reg_size, arr_size, blk_size, fac_size))
+
+ END SUBROUTINE h5get_free_list_sizes_f
+
!>
!! \ingroup FH5
!!
diff --git a/fortran/src/H5f90global.F90 b/fortran/src/H5f90global.F90
index 62b107c91fd..e60f1e83320 100644
--- a/fortran/src/H5f90global.F90
+++ b/fortran/src/H5f90global.F90
@@ -227,6 +227,11 @@ MODULE H5GLOBAL
!DEC$ATTRIBUTES DLLEXPORT :: H5F_LIBVER_V110_F
!DEC$ATTRIBUTES DLLEXPORT :: H5F_LIBVER_V112_F
!DEC$ATTRIBUTES DLLEXPORT :: H5F_LIBVER_V114_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5F_FSPACE_STRATEGY_FSM_AGGR_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5F_FSPACE_STRATEGY_PAGE_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5F_FSPACE_STRATEGY_AGGR_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5F_FSPACE_STRATEGY_NONE_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5F_FSPACE_STRATEGY_NTYPES_F
!DEC$endif
!> \addtogroup FH5F
!> @{
@@ -255,6 +260,11 @@ MODULE H5GLOBAL
INTEGER :: H5F_LIBVER_V110_F !< H5F_LIBVER_V110
INTEGER :: H5F_LIBVER_V112_F !< H5F_LIBVER_V112
INTEGER :: H5F_LIBVER_V114_F !< H5F_LIBVER_V114
+ INTEGER :: H5F_FSPACE_STRATEGY_FSM_AGGR_F !< H5F_FSPACE_STRATEGY_FSM_AGGR
+ INTEGER :: H5F_FSPACE_STRATEGY_PAGE_F !< H5F_FSPACE_STRATEGY_PAGE
+ INTEGER :: H5F_FSPACE_STRATEGY_AGGR_F !< H5F_FSPACE_STRATEGY_AGGR
+ INTEGER :: H5F_FSPACE_STRATEGY_NONE_F !< H5F_FSPACE_STRATEGY_NONE
+ INTEGER :: H5F_FSPACE_STRATEGY_NTYPES_F !< H5F_FSPACE_STRATEGY_NTYPES
!> @}
!
! H5G flags declaration
@@ -330,6 +340,34 @@ MODULE H5GLOBAL
!DEC$ATTRIBUTES DLLEXPORT :: H5D_SELECTION_IO_MODE_DEFAULT_F
!DEC$ATTRIBUTES DLLEXPORT :: H5D_SELECTION_IO_MODE_OFF_F
!DEC$ATTRIBUTES DLLEXPORT :: H5D_SELECTION_IO_MODE_ON_F
+
+ !DEC$ATTRIBUTES DLLEXPORT :: H5D_MPIO_COLLECTIVE_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5D_MPIO_SET_INDEPENDENT_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5D_MPIO_DATATYPE_CONVERSION_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5D_MPIO_DATA_TRANSFORMS_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5D_MPIO_MPI_OPT_TYPES_ENV_VAR_DISABLED_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5D_MPIO_NOT_SIMPLE_OR_SCALAR_DATASPACES_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5D_MPIO_PARALLEL_FILTERED_WRITES_DISABLED_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5D_MPIO_ERROR_WHILE_CHECKING_COLLECTIVE_POSSIBLE_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5D_MPIO_NO_SELECTION_IO_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5D_MPIO_NO_COLLECTIVE_MAX_CAUSE_F
+
+ !DEC$ATTRIBUTES DLLEXPORT :: H5D_SEL_IO_DISABLE_BY_API_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5D_SEL_IO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5D_SEL_IO_CONTIGUOUS_SIEVE_BUFFER_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5D_SEL_IO_NO_VECTOR_OR_SELECTION_IO_CB_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5D_SEL_IO_PAGE_BUFFER_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5D_SEL_IO_DATASET_FILTER_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5D_SEL_IO_CHUNK_CACHE_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5D_SEL_IO_TCONV_BUF_TOO_SMALL_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5D_SEL_IO_BKG_BUF_TOO_SMALL_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5D_SEL_IO_DEFAULT_OFF_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5D_MPIO_NO_SELECTION_IO_CAUSES_F
+
+ !DEC$ATTRIBUTES DLLEXPORT :: H5D_MPIO_NO_CHUNK_OPTIMIZATION_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5D_MPIO_LINK_CHUNK_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5D_MPIO_MULTI_CHUNK_F
!DEC$endif
!> \addtogroup FH5D
!> @{
@@ -375,9 +413,37 @@ MODULE H5GLOBAL
INTEGER :: H5D_VDS_FIRST_MISSING_F !< H5D_VDS_FIRST_MISSING
INTEGER :: H5D_VDS_LAST_AVAILABLE_F !< H5D_VDS_LAST_AVAILABLE
INTEGER :: H5D_VIRTUAL_F !< H5D_VIRTUAL
- INTEGER :: H5D_SELECTION_IO_MODE_DEFAULT_F !< H5D_SELECTION_IO_MODE_DEFAULT_F
- INTEGER :: H5D_SELECTION_IO_MODE_OFF_F !< H5D_SELECTION_IO_MODE_OFF_F
- INTEGER :: H5D_SELECTION_IO_MODE_ON_F !< H5D_SELECTION_IO_MODE_ON_F
+ INTEGER :: H5D_SELECTION_IO_MODE_DEFAULT_F !< H5D_SELECTION_IO_MODE_DEFAULT
+ INTEGER :: H5D_SELECTION_IO_MODE_OFF_F !< H5D_SELECTION_IO_MODE_OFF
+ INTEGER :: H5D_SELECTION_IO_MODE_ON_F !< H5D_SELECTION_IO_MODE_ON
+
+ INTEGER :: H5D_MPIO_COLLECTIVE_F !< H5D_MPIO_COLLECTIVE
+ INTEGER :: H5D_MPIO_SET_INDEPENDENT_F !< H5D_MPIO_SET_INDEPENDENT
+ INTEGER :: H5D_MPIO_DATATYPE_CONVERSION_F !< H5D_MPIO_DATATYPE_CONVERSION
+ INTEGER :: H5D_MPIO_DATA_TRANSFORMS_F !< H5D_MPIO_DATA_TRANSFORMS
+ INTEGER :: H5D_MPIO_MPI_OPT_TYPES_ENV_VAR_DISABLED_F !< H5D_MPIO_MPI_OPT_TYPES_ENV_VAR_DISABLED
+ INTEGER :: H5D_MPIO_NOT_SIMPLE_OR_SCALAR_DATASPACES_F !< H5D_MPIO_NOT_SIMPLE_OR_SCALAR_DATASPACES
+ INTEGER :: H5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET_F !< H5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET
+ INTEGER :: H5D_MPIO_PARALLEL_FILTERED_WRITES_DISABLED_F !< H5D_MPIO_PARALLEL_FILTERED_WRITES_DISABLED
+ INTEGER :: H5D_MPIO_ERROR_WHILE_CHECKING_COLLECTIVE_POSSIBLE_F !< H5D_MPIO_ERROR_WHILE_CHECKING_COLLECTIVE_POSSIBLE
+ INTEGER :: H5D_MPIO_NO_SELECTION_IO_F !< H5D_MPIO_NO_SELECTION_IO
+ INTEGER :: H5D_MPIO_NO_COLLECTIVE_MAX_CAUSE_F !< H5D_MPIO_NO_COLLECTIVE_MAX_CAUSE
+
+ INTEGER :: H5D_SEL_IO_DISABLE_BY_API_F !< H5D_SEL_IO_DISABLE_BY_API
+ INTEGER :: H5D_SEL_IO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET_F !< H5D_SEL_IO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET
+ INTEGER :: H5D_SEL_IO_CONTIGUOUS_SIEVE_BUFFER_F !< H5D_SEL_IO_CONTIGUOUS_SIEVE_BUFFER
+ INTEGER :: H5D_SEL_IO_NO_VECTOR_OR_SELECTION_IO_CB_F !< H5D_SEL_IO_NO_VECTOR_OR_SELECTION_IO_CB
+ INTEGER :: H5D_SEL_IO_PAGE_BUFFER_F !< H5D_SEL_IO_PAGE_BUFFER
+ INTEGER :: H5D_SEL_IO_DATASET_FILTER_F !< H5D_SEL_IO_DATASET_FILTER
+ INTEGER :: H5D_SEL_IO_CHUNK_CACHE_F !< H5D_SEL_IO_CHUNK_CACHE
+ INTEGER :: H5D_SEL_IO_TCONV_BUF_TOO_SMALL_F !< H5D_SEL_IO_TCONV_BUF_TOO_SMALL
+ INTEGER :: H5D_SEL_IO_BKG_BUF_TOO_SMALL_F !< H5D_SEL_IO_BKG_BUF_TOO_SMALL
+ INTEGER :: H5D_SEL_IO_DEFAULT_OFF_F !< H5D_SEL_IO_DEFAULT_OFF
+ INTEGER :: H5D_MPIO_NO_SELECTION_IO_CAUSES_F !< H5D_MPIO_NO_SELECTION_IO_CAUSES
+
+ INTEGER :: H5D_MPIO_NO_CHUNK_OPTIMIZATION_F !< H5D_MPIO_NO_CHUNK_OPTIMIZATION
+ INTEGER :: H5D_MPIO_LINK_CHUNK_F !< H5D_MPIO_LINK_CHUNK
+ INTEGER :: H5D_MPIO_MULTI_CHUNK_F !< H5D_MPIO_MULTI_CHUNK
!
! H5E flags declaration
!
diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h
index 5b34dd64567..28a4fa66e7b 100644
--- a/fortran/src/H5f90proto.h
+++ b/fortran/src/H5f90proto.h
@@ -376,9 +376,7 @@ H5_FCDLL int_f h5pset_deflate_c(hid_t_f *prp_id, int_f *level);
H5_FCDLL int_f h5pset_chunk_c(hid_t_f *prp_id, int_f *rank, hsize_t_f *dims);
H5_FCDLL int_f h5pget_chunk_c(hid_t_f *prp_id, int_f *max_rank, hsize_t_f *dims);
H5_FCDLL int_f h5pset_file_image_c(hid_t_f *fapl_id, void *buf_ptr, size_t_f *buf_len);
-H5_FCDLL int_f h5pset_fill_value_c(hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue);
H5_FCDLL int_f h5pget_file_image_c(hid_t_f *fapl_id, void **buf_ptr, size_t_f *buf_len);
-H5_FCDLL int_f h5pget_fill_value_c(hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue);
H5_FCDLL int_f h5pset_preserve_c(hid_t_f *prp_id, int_f *flag);
H5_FCDLL int_f h5pget_preserve_c(hid_t_f *prp_id, int_f *flag);
H5_FCDLL int_f h5pget_version_c(hid_t_f *prp_id, int_f *boot, int_f *freelist, int_f *stab, int_f *shhdr);
diff --git a/fortran/src/hdf5_fortrandll.def.in b/fortran/src/hdf5_fortrandll.def.in
index 9e1bb2e5df3..3b6600c061e 100644
--- a/fortran/src/hdf5_fortrandll.def.in
+++ b/fortran/src/hdf5_fortrandll.def.in
@@ -9,6 +9,7 @@ H5LIB_mp_H5DONT_ATEXIT_F
H5LIB_mp_H5KIND_TO_TYPE
H5LIB_mp_H5OFFSETOF
H5LIB_mp_H5GMTIME
+H5LIB_mp_H5GET_FREE_LIST_SIZES_F
; H5A
H5A_mp_H5AWRITE_CHAR_SCALAR
H5A_mp_H5AREAD_CHAR_SCALAR
@@ -101,6 +102,8 @@ H5D_mp_H5DREAD_MULTI_F
H5D_mp_H5DWRITE_MULTI_F
H5D_mp_H5DWRITE_ASYNC_F
H5D_mp_H5DREAD_ASYNC_F
+H5D_mp_H5DWRITE_CHUNK_F
+H5D_mp_H5DREAD_CHUNK_F
; H5E
H5E_mp_H5ECLEAR_F
H5E_mp_H5EPRINT_F
@@ -142,6 +145,7 @@ H5F_mp_H5FGET_FILESIZE_F
H5F_mp_H5FGET_FILE_IMAGE_F
H5F_mp_H5FGET_DSET_NO_ATTRS_HINT_F
H5F_mp_H5FSET_DSET_NO_ATTRS_HINT_F
+H5F_mp_H5FGET_INFO_F
; H5G
H5G_mp_H5GOPEN_F
H5G_mp_H5GOPEN_ASYNC_F
@@ -220,6 +224,9 @@ H5L_mp_H5LGET_NAME_BY_IDX_F
H5L_mp_H5LITERATE_F
H5L_mp_H5LITERATE_ASYNC_F
H5L_mp_H5LITERATE_BY_NAME_F
+H5L_mp_H5LVISIT_F
+H5L_mp_H5LVISIT_BY_NAME_F
+
; H5O
H5O_mp_H5OCLOSE_F
H5O_mp_H5OCLOSE_ASYNC_F
@@ -405,6 +412,11 @@ H5P_mp_H5PSET_SELECTION_IO_F
H5P_mp_H5PGET_SELECTION_IO_F
H5P_mp_H5PSET_MODIFY_WRITE_BUF_F
H5P_mp_H5PGET_MODIFY_WRITE_BUF_F
+H5P_mp_H5PGET_NO_SELECTION_IO_CAUSE_F
+H5P_mp_H5PSET_FILE_SPACE_STRATEGY_F
+H5P_mp_H5PGET_FILE_SPACE_STRATEGY_F
+H5P_mp_H5PSET_FILE_SPACE_PAGE_SIZE_F
+H5P_mp_H5PGET_FILE_SPACE_PAGE_SIZE_F
; Parallel
@H5_NOPAREXP@H5P_mp_H5PSET_FAPL_MPIO_F
@H5_NOPAREXP@H5P_mp_H5PGET_FAPL_MPIO_F
@@ -421,6 +433,7 @@ H5P_mp_H5PGET_MODIFY_WRITE_BUF_F
@H5_NOPAREXP@H5P_mp_H5PGET_ALL_COLL_METADATA_OPS_F
@H5_NOPAREXP@H5P_mp_H5PSET_COLL_METADATA_WRITE_F
@H5_NOPAREXP@H5P_mp_H5PGET_COLL_METADATA_WRITE_F
+@H5_NOPAREXP@H5P_mp_H5PGET_MPIO_NO_COLLECTIVE_CAUSE_F
; H5R
H5R_mp_H5RCREATE_OBJECT_F
H5R_mp_H5RCREATE_REGION_F
@@ -449,6 +462,8 @@ H5S_mp_H5SSELECT_ELEMENTS_F
H5S_mp_H5SSELECT_ALL_F
H5S_mp_H5SSELECT_NONE_F
H5S_mp_H5SSELECT_VALID_F
+H5S_mp_H5SSELECT_SHAPE_SAME_F
+H5S_mp_H5SSELECT_INTERSECT_BLOCK_F
H5S_mp_H5SGET_SIMPLE_EXTENT_NPOINTS_F
H5S_mp_H5SGET_SELECT_NPOINTS_F
H5S_mp_H5SGET_SIMPLE_EXTENT_NDIMS_F
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index 67c8b7568ef..ff279437602 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -285,7 +285,6 @@ endif ()
add_executable (fortranlib_test_F03
fortranlib_test_F03.F90
tH5E_F03.F90
- tH5F_F03.F90
tH5L_F03.F90
tH5O_F03.F90
tH5P_F03.F90
diff --git a/fortran/test/Makefile.am b/fortran/test/Makefile.am
index 6ceddd68139..6d11dcc07d1 100644
--- a/fortran/test/Makefile.am
+++ b/fortran/test/Makefile.am
@@ -46,7 +46,7 @@ fortranlib_test_SOURCES = tH5F.F90 tH5D.F90 tH5R.F90 tH5S.F90 tH5T.F90 tH5VL.F90
fortranlib_test_1_8_SOURCES = tH5O.F90 tH5A_1_8.F90 tH5G_1_8.F90 tH5MISC_1_8.F90 tHDF5_1_8.F90 \
fortranlib_test_1_8.F90
-fortranlib_test_F03_SOURCES = tH5E_F03.F90 tH5F_F03.F90 tH5L_F03.F90 \
+fortranlib_test_F03_SOURCES = tH5E_F03.F90 tH5L_F03.F90 \
tH5O_F03.F90 tH5P_F03.F90 tH5T_F03.F90 tHDF5_F03.F90 fortranlib_test_F03.F90
vol_connector_SOURCES=vol_connector.F90
diff --git a/fortran/test/fortranlib_test.F90 b/fortran/test/fortranlib_test.F90
index eb587a9eda8..e0a837a211b 100644
--- a/fortran/test/fortranlib_test.F90
+++ b/fortran/test/fortranlib_test.F90
@@ -92,6 +92,14 @@ PROGRAM fortranlibtest
CALL file_space("file_space",cleanup, ret_total_error)
CALL write_test_status(ret_total_error, ' File free space test', total_error)
+ ret_total_error = 0
+ CALL test_file_info("file_info",cleanup, ret_total_error)
+ CALL write_test_status(ret_total_error, ' File information test', total_error)
+
+ ret_total_error = 0
+ CALL test_get_file_image(ret_total_error)
+ CALL write_test_status(ret_total_error, ' Testing get file image ', total_error)
+
!
! '========================================='
! 'Testing DATASET Interface '
@@ -114,6 +122,11 @@ PROGRAM fortranlibtest
CALL test_dset_fill(cleanup, ret_total_error)
CALL write_test_status(ret_total_error, ' Filling dataspace elements', total_error)
+ ! Direct chunk IO
+ ret_total_error = 0
+ CALL test_direct_chunk_io(cleanup, ret_total_error)
+ CALL write_test_status(ret_total_error, ' Direct chunk IO', total_error)
+
!
! '========================================='
! 'Testing DATASPACE Interface '
diff --git a/fortran/test/fortranlib_test_1_8.F90 b/fortran/test/fortranlib_test_1_8.F90
index fde3faa3ffa..6b3e7fa5b8d 100644
--- a/fortran/test/fortranlib_test_1_8.F90
+++ b/fortran/test/fortranlib_test_1_8.F90
@@ -103,6 +103,12 @@ PROGRAM fortranlibtest
' Testing basic generic property list class creation functionality', &
total_error)
+ ret_total_error = 0
+ CALL test_freelist(ret_total_error)
+ CALL write_test_status(ret_total_error, &
+ ' Testing free list', &
+ total_error)
+
WRITE(*,*)
WRITE(*,*) ' ============================================ '
diff --git a/fortran/test/fortranlib_test_F03.F90 b/fortran/test/fortranlib_test_F03.F90
index 6c53cc070d7..85ab74432d0 100644
--- a/fortran/test/fortranlib_test_F03.F90
+++ b/fortran/test/fortranlib_test_F03.F90
@@ -135,9 +135,13 @@ PROGRAM fortranlibtest_F03
CALL write_test_status(ret_total_error, ' Test basic generic property list callback functionality', total_error)
ret_total_error = 0
- CALL test_iter_group(ret_total_error)
+ CALL test_iter_group(cleanup, ret_total_error)
CALL write_test_status(ret_total_error, ' Testing group iteration functionality', total_error)
+ ret_total_error = 0
+ CALL test_visit(cleanup, ret_total_error)
+ CALL write_test_status(ret_total_error, ' Testing link visit functionality', total_error)
+
ret_total_error = 0
CALL test_nbit(ret_total_error)
CALL write_test_status(ret_total_error, ' Testing nbit filter', total_error)
@@ -171,10 +175,6 @@ PROGRAM fortranlibtest_F03
CALL test_obj_info(ret_total_error)
CALL write_test_status(ret_total_error, ' Testing object info functions ', total_error)
- ret_total_error = 0
- CALL test_get_file_image(ret_total_error)
- CALL write_test_status(ret_total_error, ' Testing get file image ', total_error)
-
! write(*,*)
! write(*,*) '========================================='
! write(*,*) 'Testing VDS '
diff --git a/fortran/test/tH5D.F90 b/fortran/test/tH5D.F90
index b5ad6e8b894..8c1484f3ddc 100644
--- a/fortran/test/tH5D.F90
+++ b/fortran/test/tH5D.F90
@@ -990,8 +990,176 @@ SUBROUTINE test_dset_fill(cleanup, total_error)
ENDIF
ENDDO
-
END SUBROUTINE test_dset_fill
+ SUBROUTINE test_direct_chunk_io(cleanup, total_error)
+
+ USE ISO_C_BINDING
+
+ IMPLICIT NONE
+
+ LOGICAL, INTENT(IN) :: cleanup
+ INTEGER, INTENT(OUT) :: total_error
+ CHARACTER(LEN=4), PARAMETER :: filename = "doIO"
+ CHARACTER(LEN=80) :: fix_filename
+
+ CHARACTER(LEN=15), PARAMETER :: dsetname = "dset"
+
+ INTEGER :: RANK = 2
+
+ INTEGER(HID_T) :: file_id ! File identifier
+ INTEGER(HID_T) :: dset_id ! Dataset identifier
+ INTEGER(HID_T) :: dataspace ! Dataspace identifier
+ INTEGER(HID_T) :: dcpl ! dataset creation property identifier
+
+ !
+ !dataset dimensions at creation time
+ !
+ INTEGER, PARAMETER :: DIM0 = 4
+ INTEGER, PARAMETER :: DIM1 = 32
+ INTEGER(SIZE_T), PARAMETER :: CHUNK0 = DIM0
+ INTEGER(SIZE_T), PARAMETER :: CHUNK1 = DIM1/2
+ INTEGER(HSIZE_T), DIMENSION(2) :: offset
+ INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/DIM0,DIM1/)
+ INTEGER, DIMENSION(CHUNK0,CHUNK1), TARGET :: wdata1, rdata1, wdata2, rdata2
+ INTEGER(HSIZE_T), DIMENSION(2) :: chunk = (/CHUNK0, CHUNK1/)
+ INTEGER :: i, j, n
+ INTEGER :: error
+ TYPE(C_PTR) :: f_ptr
+ INTEGER :: filters
+ INTEGER(SIZE_T) :: sizeINT
+ INTEGER(HID_T) :: dxpl
+
+ !
+ !Create a new file using default properties.
+ !
+ CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error)
+ IF (error .NE. 0) THEN
+ WRITE(*,*) "Cannot modify filename"
+ STOP
+ ENDIF
+
+ CALL h5pcreate_f(H5P_DATASET_XFER_F, dxpl, error)
+ CALL check("h5pcreate_f",error,total_error)
+
+ CALL h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, file_id, error)
+ CALL check("h5fcreate_f",error,total_error)
+
+ ! Dataset Fortran
+
+ CALL h5screate_simple_f(RANK, dims, dataspace, error)
+ CALL check("h5screate_simple_f",error,total_error)
+
+ CALL h5pcreate_f(H5P_DATASET_CREATE_F, dcpl, error)
+ CALL check("h5pcreate_f",error,total_error)
+
+ CALL h5pset_chunk_f(dcpl, RANK, chunk, error)
+ CALL check("h5pset_chunk_f",error,total_error)
+
+ CALL h5dcreate_f(file_id, dsetname, H5T_NATIVE_INTEGER, dataspace, dset_id, error, dcpl )
+ CALL check("h5dcreate_f",error,total_error)
+
+ CALL h5sclose_f(dataspace, error)
+ CALL check("h5sclose_f",error,total_error)
+ CALL h5pclose_f(dcpl, error)
+ CALL check("h5pclose_f",error,total_error)
+
+ n = 0
+ DO i = 1, CHUNK0
+ DO j = 1, CHUNK1
+ n = n + 1
+ wdata1(i,j) = n
+ wdata2(i,j) = n*10
+ END DO
+ END DO
+
+#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE
+ sizeINT = storage_size(i, KIND=size_t)/storage_size(c_char_'a',c_size_t)
+#else
+ sizeINT = SIZEOF(i)
+#endif
+
+ f_ptr = C_LOC(wdata1)
+ offset(1:2) = (/0, 0/)
+ CALL H5Dwrite_chunk_f(dset_id, 0, offset, CHUNK0 * CHUNK1 * sizeINT, f_ptr, error)
+ CALL check("h5dwrite_f",error,total_error)
+
+ f_ptr = C_LOC(wdata2)
+ offset(1:2) = (/0, 16/)
+ CALL H5Dwrite_chunk_f(dset_id, 0, offset, CHUNK0 * CHUNK1 * sizeINT, f_ptr, error, dxpl)
+ CALL check("h5dwrite_f",error,total_error)
+
+ CALL h5dclose_f(dset_id, error)
+ CALL check("h5dclose_f",error,total_error)
+
+ !
+ !Close the file.
+ !
+ CALL h5fclose_f(file_id, error)
+ CALL check("h5fclose_f",error,total_error)
+
+ !
+ !read the data back
+ !
+ !Open the file.
+ !
+ CALL h5fopen_f(fix_filename, H5F_ACC_RDONLY_F, file_id, error)
+ CALL check("hfopen_f",error,total_error)
+
+ !
+ !Open the dataset.
+ !
+ CALL h5dopen_f(file_id, dsetname, dset_id, error)
+ CALL check("h5dopen_f",error,total_error)
+
+ f_ptr = C_LOC(rdata1)
+ filters = 99
+ offset(1:2) = (/0, 0/)
+ CALL H5Dread_chunk_f(dset_id, offset, filters, f_ptr, error)
+ CALL check("H5Dread_chunk_f",error,total_error)
+
+ ! Verify that the data read was correct.
+ DO i = 1, CHUNK0
+ DO j = 1, CHUNK1
+ CALL VERIFY("H5Dread_chunk_f", rdata1(i,j), wdata1(i,j), total_error)
+ IF(total_error.NE.0) EXIT
+ ENDDO
+ ENDDO
+
+ CALL VERIFY("H5Dread_chunk_f",filters, 0, total_error)
+
+ f_ptr = C_LOC(rdata2)
+ offset(1:2) = (/0, 16/)
+ CALL H5Dread_chunk_f(dset_id, offset, filters, f_ptr, error, dxpl)
+ CALL check("H5Dread_chunk_f",error,total_error)
+
+ ! Verify that the data read was correct.
+ DO i = 1, CHUNK0
+ DO j = 1, CHUNK1
+ CALL VERIFY("H5Dread_chunk_f", rdata2(i,j), wdata2(i,j), total_error)
+ IF(total_error.NE.0) EXIT
+ ENDDO
+ ENDDO
+
+ CALL VERIFY("H5Dread_chunk_f",filters, 0, total_error)
+
+ CALL h5dclose_f(dset_id, error)
+ CALL check("h5dclose_f",error,total_error)
+
+ !
+ !Close the file.
+ !
+ CALL h5fclose_f(file_id, error)
+ CALL check("h5fclose_f",error,total_error)
+
+ CALL h5pclose_f(dxpl, error)
+ CALL check("h5pclose_f",error,total_error)
+
+ IF(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error)
+ CALL check("h5_cleanup_f", error, total_error)
+
+ RETURN
+ END SUBROUTINE test_direct_chunk_io
+
END MODULE TH5D
diff --git a/fortran/test/tH5F.F90 b/fortran/test/tH5F.F90
index c255755ef55..a5b67acac9a 100644
--- a/fortran/test/tH5F.F90
+++ b/fortran/test/tH5F.F90
@@ -21,7 +21,7 @@
!
! CONTAINS SUBROUTINES
! mountingtest, reopentest, get_name_test, plisttest,
-! file_close, file_space, h5openclose
+! file_close, file_space, h5openclose, test_get_file_image
!
!*****
!
@@ -30,8 +30,17 @@
! access the dataset from the second file as a member of a group
! in the first file.
+! *****************************************
+! *** H 5 F T E S T S
+! *****************************************
+
MODULE TH5F
+ USE HDF5
+ USE TH5_MISC
+ USE TH5_MISC_GEN
+ USE ISO_C_BINDING
+
CONTAINS
SUBROUTINE h5openclose(total_error)
@@ -131,1008 +140,1311 @@ SUBROUTINE h5openclose(total_error)
RETURN
END SUBROUTINE h5openclose
- SUBROUTINE mountingtest(cleanup, total_error)
- USE HDF5 ! This module contains all necessary modules
- USE TH5_MISC
- IMPLICIT NONE
- LOGICAL, INTENT(IN) :: cleanup
- INTEGER, INTENT(INOUT) :: total_error
-
- !
- !the respective filename is "mount1.h5" and "mount2.h5"
- !
- CHARACTER(LEN=6) :: filename1
- CHARACTER(LEN=6) :: filename2
- CHARACTER(LEN=80) :: fix_filename1
- CHARACTER(LEN=80) :: fix_filename2
-
- !
- !data space rank and dimensions
- !
- INTEGER, PARAMETER :: RANK = 2
- INTEGER, PARAMETER :: NX = 4
- INTEGER, PARAMETER :: NY = 5
-
- !
- ! File identifiers
- !
- INTEGER(HID_T) :: file1_id, file2_id
-
- !
- ! Group identifier
- !
- INTEGER(HID_T) :: gid
-
- !
- ! dataset identifier
- !
- INTEGER(HID_T) :: dset_id
-
- !
- ! data space identifier
- !
- INTEGER(HID_T) :: dataspace
-
- !
- ! data type identifier
- !
- INTEGER(HID_T) :: dtype_id
-
- !
- !The dimensions for the dataset.
- !
- INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/NX,NY/)
-
- !
- !return value for testing whether a file is in hdf5 format
- !
- LOGICAL :: status
-
- !
- !flag to check operation success
- !
- INTEGER :: error
-
- !
- !general purpose integer
- !
- INTEGER :: i, j
-
- !number of objects
- INTEGER(SIZE_T) :: obj_count
- INTEGER(HID_T) :: t1, t2, t3, t4
-
- ! File numbers
- INTEGER :: file_num1
- INTEGER :: file_num2
-
- !
- !data buffers
- !
- INTEGER, DIMENSION(NX,NY) :: data_in, data_out
-
- INTEGER(HSIZE_T), DIMENSION(2) :: data_dims
- filename1 = "mount1"
- filename2 = "mount2"
-
- do i = 1,80
- fix_filename1(i:i) = " "
- fix_filename2(i:i) = " "
- enddo
- !
- !Initialize data_in buffer
- !
- do j = 1, NY
- do i = 1, NX
- data_in(i,j) = (i-1) + (j-1)
- end do
- end do
-
- !
- ! Fix names of the files
- !
- CALL h5_fixname_f(filename1, fix_filename1, H5P_DEFAULT_F, error)
- if(error .ne. 0) stop
- CALL h5_fixname_f(filename2, fix_filename2, H5P_DEFAULT_F, error)
- if(error .ne. 0) stop
-
- ! Test object counts
- CALL h5tcopy_f(H5T_NATIVE_CHARACTER, t1, error)
- CALL check(" h5tcopy_f",error,total_error)
- CALL h5tcopy_f(H5T_NATIVE_CHARACTER, t2, error)
- CALL check(" h5tcopy_f",error,total_error)
- CALL h5tcopy_f(H5T_NATIVE_CHARACTER, t3, error)
- CALL check(" h5tcopy_f",error,total_error)
- CALL h5tcopy_f(H5T_NATIVE_CHARACTER, t4, error)
- CALL check(" h5tcopy_f",error,total_error)
-
- CALL h5fget_obj_count_f(INT(H5F_OBJ_ALL_F,HID_T), H5F_OBJ_ALL_F, obj_count, error)
- CALL check(" h5fget_obj_count_f",error,total_error)
-
- IF(obj_count.NE.4)THEN
- total_error = total_error + 1
- ENDIF
+ SUBROUTINE mountingtest(cleanup, total_error)
+ USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
+ IMPLICIT NONE
+ LOGICAL, INTENT(IN) :: cleanup
+ INTEGER, INTENT(INOUT) :: total_error
- !
- !Create first file "mount1.h5" using default properties.
- !
- CALL h5fcreate_f(fix_filename1, H5F_ACC_TRUNC_F, file1_id, error)
- CALL check("h5fcreate_f",error,total_error)
+ !
+ ! the respective filenames are "mount1.h5" and "mount2.h5"
+ !
+ CHARACTER(LEN=6) :: filename1
+ CHARACTER(LEN=6) :: filename2
+ CHARACTER(LEN=80) :: fix_filename1
+ CHARACTER(LEN=80) :: fix_filename2
- CALL h5fget_obj_count_f(INT(H5F_OBJ_ALL_F,HID_T), H5F_OBJ_ALL_F, obj_count, error)
- CALL check(" h5fget_obj_count_f",error,total_error)
+ !
+ ! data space rank and dimensions
+ !
+ INTEGER, PARAMETER :: RANK = 2
+ INTEGER, PARAMETER :: NX = 4
+ INTEGER, PARAMETER :: NY = 5
- IF(obj_count.NE.5)THEN
- total_error = total_error + 1
- ENDIF
+ !
+ ! File identifiers
+ !
+ INTEGER(HID_T) :: file1_id, file2_id
- CALL h5tclose_f(t1, error)
- CALL check("h5tclose_f",error,total_error)
- CALL h5tclose_f(t2, error)
- CALL check("h5tclose_f",error,total_error)
- CALL h5tclose_f(t3, error)
- CALL check("h5tclose_f",error,total_error)
- CALL h5tclose_f(t4, error)
- CALL check("h5tclose_f",error,total_error)
+ !
+ ! Group identifier
+ !
+ INTEGER(HID_T) :: gid
- CALL h5fget_obj_count_f(INT(H5F_OBJ_ALL_F,HID_T), H5F_OBJ_ALL_F, obj_count, error)
- CALL check(" h5fget_obj_count_f",error,total_error)
+ !
+ ! dataset identifier
+ !
+ INTEGER(HID_T) :: dset_id
- IF(obj_count.NE.1)THEN
- total_error = total_error + 1
- ENDIF
+ !
+ ! data space identifier
+ !
+ INTEGER(HID_T) :: dataspace
- !
- !Create group "/G" inside file "mount1.h5".
- !
- CALL h5gcreate_f(file1_id, "/G", gid, error)
- CALL check("h5gcreate_f",error,total_error)
- !
- !close file and group identifiers.
- !
- CALL h5gclose_f(gid, error)
- CALL check("h5gclose_f",error,total_error)
- CALL h5fclose_f(file1_id, error)
- CALL check("h5fclose_f",error,total_error)
-
- !
- !Create second file "mount2.h5" using default properties.
- !
- CALL h5fcreate_f(fix_filename2, H5F_ACC_TRUNC_F, file2_id, error)
- CALL check("h5fcreate_f",error,total_error)
-
- !
- !Create data space for the dataset.
- !
- CALL h5screate_simple_f(RANK, dims, dataspace, error)
- CALL check("h5screate_simple_f",error,total_error)
-
- !
- !Create dataset "/D" inside file "mount2.h5".
- !
- CALL h5dcreate_f(file2_id, "/D", H5T_NATIVE_INTEGER, dataspace, &
- dset_id, error)
- CALL check("h5dcreate_f",error,total_error)
-
- !
- ! Write data_in to the dataset
- !
- data_dims(1) = NX
- data_dims(2) = NY
- CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data_in, data_dims, error)
- CALL check("h5dwrite_f",error,total_error)
-
- !
- !close file, dataset and dataspace identifiers.
- !
- CALL h5sclose_f(dataspace, error)
- CALL check("h5sclose_f",error,total_error)
- CALL h5dclose_f(dset_id, error)
- CALL check("h5dclose_f",error,total_error)
- CALL h5fclose_f(file2_id, error)
- CALL check("h5fclose_f",error,total_error)
-
- !
- !test whether files are accessible as HDF5 (new, VOL-safe, way)
- !
- CALL h5fis_accessible_f(fix_filename1, status, error)
- CALL check("h5fis_accessible_f",error,total_error)
- IF ( .NOT. status ) THEN
- write(*,*) "File ", fix_filename1, " is not accessible as hdf5"
- stop
- END IF
+ !
+ ! data type identifier
+ !
+ INTEGER(HID_T) :: dtype_id
- CALL h5fis_accessible_f(fix_filename2, status, error)
- CALL check("h5fis_accessible_f",error,total_error)
- IF ( .NOT. status ) THEN
- write(*,*) "File ", fix_filename2, " is not accessible as hdf5"
- stop
- END IF
+ !
+ !The dimensions for the dataset.
+ !
+ INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/NX,NY/)
- !
- !test whether files are in hdf5 format (old way)
- !
- CALL h5fis_hdf5_f(fix_filename1, status, error)
- CALL check("h5fis_hdf5_f",error,total_error)
- IF ( .NOT. status ) THEN
- write(*,*) "File ", fix_filename1, " is not in hdf5 format"
- stop
- END IF
+ !
+ !return value for testing whether a file is in hdf5 format
+ !
+ LOGICAL :: status
- CALL h5fis_hdf5_f(fix_filename2, status, error)
- CALL check("h5fis_hdf5_f",error,total_error)
- IF ( .NOT. status ) THEN
- write(*,*) "File ", fix_filename2, " is not in hdf5 format"
- stop
- END IF
+ !
+ !flag to check operation success
+ !
+ INTEGER :: error
- !
- !reopen both files.
- !
- CALL h5fopen_f (fix_filename1, H5F_ACC_RDWR_F, file1_id, error)
- CALL check("hfopen_f",error,total_error)
+ !
+ !general purpose integer
+ !
+ INTEGER :: i, j
- CALL h5fget_obj_count_f(INT(H5F_OBJ_ALL_F,HID_T), H5F_OBJ_ALL_F, obj_count, error)
- CALL check(" h5fget_obj_count_f",error,total_error)
+ !number of objects
+ INTEGER(SIZE_T) :: obj_count
+ INTEGER(HID_T) :: t1, t2, t3, t4
- IF(obj_count.NE.1)THEN
- total_error = total_error + 1
- ENDIF
+ ! File numbers
+ INTEGER :: file_num1
+ INTEGER :: file_num2
- CALL h5fopen_f (fix_filename2, H5F_ACC_RDWR_F, file2_id, error)
- CALL check("h5fopen_f",error,total_error)
+ !
+ !data buffers
+ !
+ INTEGER, DIMENSION(NX,NY) :: data_in, data_out
- CALL h5fget_obj_count_f(INT(H5F_OBJ_ALL_F,HID_T), H5F_OBJ_ALL_F, obj_count, error)
- CALL check(" h5fget_obj_count_f",error,total_error)
+ INTEGER(HSIZE_T), DIMENSION(2) :: data_dims
+ filename1 = "mount1"
+ filename2 = "mount2"
- IF(obj_count.NE.2)THEN
- total_error = total_error + 1
- ENDIF
+ do i = 1,80
+ fix_filename1(i:i) = " "
+ fix_filename2(i:i) = " "
+ enddo
+ !
+ !Initialize data_in buffer
+ !
+ do j = 1, NY
+ do i = 1, NX
+ data_in(i,j) = (i-1) + (j-1)
+ end do
+ end do
- !
- !Check file numbers
- !
- CALL h5fget_fileno_f(file1_id, file_num1, error)
- CALL check("h5fget_fileno_f",error,total_error)
- CALL h5fget_fileno_f(file2_id, file_num2, error)
- CALL check("h5fget_fileno_f",error,total_error)
- IF(file_num1 .EQ. file_num2) THEN
- write(*,*) "file numbers aren't supposed to match"
- END IF
+ !
+ ! Fix names of the files
+ !
+ CALL h5_fixname_f(filename1, fix_filename1, H5P_DEFAULT_F, error)
+ if(error .ne. 0) stop
+ CALL h5_fixname_f(filename2, fix_filename2, H5P_DEFAULT_F, error)
+ if(error .ne. 0) stop
+
+ ! Test object counts
+ CALL h5tcopy_f(H5T_NATIVE_CHARACTER, t1, error)
+ CALL check(" h5tcopy_f",error,total_error)
+ CALL h5tcopy_f(H5T_NATIVE_CHARACTER, t2, error)
+ CALL check(" h5tcopy_f",error,total_error)
+ CALL h5tcopy_f(H5T_NATIVE_CHARACTER, t3, error)
+ CALL check(" h5tcopy_f",error,total_error)
+ CALL h5tcopy_f(H5T_NATIVE_CHARACTER, t4, error)
+ CALL check(" h5tcopy_f",error,total_error)
+
+ CALL h5fget_obj_count_f(INT(H5F_OBJ_ALL_F,HID_T), H5F_OBJ_ALL_F, obj_count, error)
+ CALL check(" h5fget_obj_count_f",error,total_error)
+
+ IF(obj_count.NE.4)THEN
+ total_error = total_error + 1
+ ENDIF
- !
- !mount the second file under the first file's "/G" group.
- !
- CALL h5fmount_f (file1_id, "/G", file2_id, error)
- CALL check("h5fmount_f",error,total_error)
-
-
- !
- !Access dataset D in the first file under /G/D name.
- !
- CALL h5dopen_f(file1_id, "/G/D", dset_id, error)
- CALL check("h5dopen_f",error,total_error)
-
- !
- !Get dataset's data type.
- !
- CALL h5dget_type_f(dset_id, dtype_id, error)
- CALL check("h5dget_type_f",error,total_error)
-
- !
- !Read the dataset.
- !
- CALL h5dread_f(dset_id, dtype_id, data_out, data_dims, error)
- CALL check("h5dread_f",error,total_error)
-
- !
- !Compare the data.
- !
- do i = 1, NX
- do j = 1, NY
- IF (data_out(i,j) .NE. data_in(i, j)) THEN
- total_error = total_error + 1
- END IF
- end do
- end do
-
-
- !
- !Close dset_id and dtype_id.
- !
- CALL h5dclose_f(dset_id, error)
- CALL check("h5dclose_f",error,total_error)
- CALL h5tclose_f(dtype_id, error)
- CALL check("h5tclose_f",error,total_error)
-
- !
- !unmount the second file.
- !
- CALL h5funmount_f(file1_id, "/G", error);
- CALL check("h5funmount_f",error,total_error)
-
- !
- !Close both files.
- !
-
- CALL h5fget_obj_count_f(INT(H5F_OBJ_ALL_F,HID_T), H5F_OBJ_ALL_F, obj_count, error)
- CALL check(" h5fget_obj_count_f",error,total_error)
-
- IF(obj_count.NE.2)THEN
- total_error = total_error + 1
- ENDIF
+ !
+ !Create first file "mount1.h5" using default properties.
+ !
+ CALL h5fcreate_f(fix_filename1, H5F_ACC_TRUNC_F, file1_id, error)
+ CALL check("h5fcreate_f",error,total_error)
- CALL h5fclose_f(file1_id, error)
- CALL check("h5fclose_f",error,total_error)
- CALL h5fclose_f(file2_id, error)
- CALL check("h5fclose_f",error,total_error)
+ CALL h5fget_obj_count_f(INT(H5F_OBJ_ALL_F,HID_T), H5F_OBJ_ALL_F, obj_count, error)
+ CALL check(" h5fget_obj_count_f",error,total_error)
- CALL h5fget_obj_count_f(INT(H5F_OBJ_ALL_F,HID_T), H5F_OBJ_ALL_F, obj_count, error)
- CALL check(" h5fget_obj_count_f",error,total_error)
+ IF(obj_count.NE.5)THEN
+ total_error = total_error + 1
+ ENDIF
- IF(obj_count.NE.0)THEN
- total_error = total_error + 1
- ENDIF
+ CALL h5tclose_f(t1, error)
+ CALL check("h5tclose_f",error,total_error)
+ CALL h5tclose_f(t2, error)
+ CALL check("h5tclose_f",error,total_error)
+ CALL h5tclose_f(t3, error)
+ CALL check("h5tclose_f",error,total_error)
+ CALL h5tclose_f(t4, error)
+ CALL check("h5tclose_f",error,total_error)
- if(cleanup) CALL h5_cleanup_f(filename1, H5P_DEFAULT_F, error)
- CALL check("h5_cleanup_f", error, total_error)
- if(cleanup) CALL h5_cleanup_f(filename2, H5P_DEFAULT_F, error)
- CALL check("h5_cleanup_f", error, total_error)
- RETURN
- END SUBROUTINE mountingtest
+ CALL h5fget_obj_count_f(INT(H5F_OBJ_ALL_F,HID_T), H5F_OBJ_ALL_F, obj_count, error)
+ CALL check(" h5fget_obj_count_f",error,total_error)
-!
-! The following subroutine tests h5freopen_f.
-! It creates the file which has name "reopen.h5" and
-! the "/dset" dataset inside the file.
-! writes the data to the file, close the dataset.
-! Reopen the file based upon the file_id, open the
-! dataset use the reopen_id then reads the
-! dataset back to memory to test whether the data
-! read is identical to the data written
-!
+ IF(obj_count.NE.1)THEN
+ total_error = total_error + 1
+ ENDIF
- SUBROUTINE reopentest(cleanup, total_error)
- USE HDF5 ! This module contains all necessary modules
- USE TH5_MISC
- IMPLICIT NONE
- LOGICAL, INTENT(IN) :: cleanup
- INTEGER, INTENT(INOUT) :: total_error
-
- !
- CHARACTER(LEN=6), PARAMETER :: filename = "reopen"
- CHARACTER(LEN=80) :: fix_filename
-
- INTEGER(HID_T) :: file_id, reopen_id ! File identifiers
- INTEGER(HID_T) :: dset_id ! Dataset identifier
-
- !
- !dataset name is "dset"
- !
- CHARACTER(LEN=4), PARAMETER :: dsetname = "dset"
-
- !
- !data space rank and dimensions
- !
- INTEGER, PARAMETER :: RANK = 2
- INTEGER, PARAMETER :: NX = 4
- INTEGER, PARAMETER :: NY = 6
-
- !
- ! data space identifier
- !
- INTEGER(HID_T) :: dataspace
-
- !
- !The dimensions for the dataset.
- !
- INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/NX,NY/)
-
- !
- !flag to check operation success
- !
- INTEGER :: error
-
- !
- !general purpose integer
- !
- INTEGER :: i, j
-
- !
- !array to store data
- !
- INTEGER, DIMENSION(4,6) :: dset_data, data_out
- INTEGER(HSIZE_T), DIMENSION(2) :: data_dims
- INTEGER(HSIZE_T) :: file_size
- INTEGER :: file_num1
- INTEGER :: file_num2
- CHARACTER(LEN=80) :: file_name
- INTEGER(SIZE_T) :: name_size
-
- !
- !initialize the dset_data array which will be written to the "/dset"
- !
- do j = 1, NY
- do i = 1, NX
- dset_data(i,j) = (i-1)*6 + j;
- end do
- end do
-
- !
- !Create file "reopen.h5" using default properties.
- !
- CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error)
- if (error .ne. 0) then
- write(*,*) "Cannot modify filename"
- stop
- endif
- CALL h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, file_id, error)
- CALL check("h5fcreate_f",error,total_error)
-
- !
- !Create data space for the dataset.
- !
- CALL h5screate_simple_f(RANK, dims, dataspace, error)
- CALL check("h5screate_simple_f",error,total_error)
-
- !
- !Create dataset "/dset" inside the file .
- !
- CALL h5dcreate_f(file_id, dsetname, H5T_NATIVE_INTEGER, dataspace, &
- dset_id, error)
- CALL check("h5dcreate_f",error,total_error)
-
- !
- !Write the dataset.
- !
- data_dims(1) = NX
- data_dims(2) = NY
- CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, dset_data, data_dims, error)
- CALL check("h5dwrite_f",error,total_error)
-
- !
- !close the dataset.
- !
- CALL h5dclose_f(dset_id, error)
- CALL check("h5dclose_f",error,total_error)
-
- !
- !close the dataspace.
- !
- CALL h5sclose_f(dataspace, error)
- CALL check("h5sclose_f",error,total_error)
-
- !
- !Reopen file dsetf.h5.
- !
- CALL h5freopen_f(file_id, reopen_id, error)
- CALL check("h5freopen_f",error,total_error)
- !
- !Check file size
- !
- CALL h5fget_filesize_f(file_id, file_size, error)
- CALL check("h5fget_filesize_f",error,total_error)
-
- !
- !Check file numbers
- !
- CALL h5fget_fileno_f(file_id, file_num1, error)
- CALL check("h5fget_fileno_f",error,total_error)
- CALL h5fget_fileno_f(reopen_id, file_num2, error)
- CALL check("h5fget_fileno_f",error,total_error)
- IF(file_num1 .NE. file_num2) THEN
- write(*,*) "file numbers don't match"
- END IF
-
- !
- !Open the dataset based on the reopen_id.
- !
- CALL h5dopen_f(reopen_id, dsetname, dset_id, error)
- CALL check("h5dopen_f",error,total_error)
- !
- !Get file name from the dataset identifier
- !
- CALL h5fget_name_f(dset_id, file_name, name_size, error)
- CALL check("h5fget_name_f",error,total_error)
- IF(file_name(1:name_size) .NE. fix_filename(1:name_size)) THEN
- write(*,*) "file name obtained from the dataset id is incorrect"
- END IF
-
- !
- !Read the dataset.
- !
- CALL h5dread_f(dset_id, H5T_NATIVE_INTEGER, data_out, data_dims, error)
- CALL check("h5dread_f",error,total_error)
-
- !
- !Compare the data.
- !
- do i = 1, NX
- do j = 1, NY
- IF (data_out(i,j) .NE. dset_data(i, j)) THEN
- write(*, *) "reopen test error occurred"
- END IF
- end do
- end do
-
-
- !
- !Close the dataset.
- !
- CALL h5dclose_f(dset_id, error)
- CALL check("h5dclose_f",error,total_error)
-
- !
- !Close the file identifiers.
- !
- CALL h5fclose_f(file_id, error)
- CALL check("h5fclose_f",error,total_error)
- CALL h5fclose_f(reopen_id, error)
- CALL check("h5fclose_f",error,total_error)
-
-
- if(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error)
- CALL check("h5_cleanup_f", error, total_error)
- RETURN
-
- END SUBROUTINE reopentest
-
-! The following subroutine checks that h5fget_name_f produces
-! correct output for a given obj_id and filename.
-!
- SUBROUTINE check_get_name(obj_id, fix_filename, len_filename, total_error)
- USE HDF5 ! This module contains all necessary modules
- USE TH5_MISC
- IMPLICIT NONE
- INTEGER(HID_T) :: obj_id ! Object identifier
- CHARACTER(LEN=80), INTENT(IN) :: fix_filename ! Expected filename
- INTEGER, INTENT(IN) :: len_filename ! The length of the filename
- INTEGER, INTENT(INOUT) :: total_error ! Error count
-
- CHARACTER(LEN=80):: file_name ! Filename buffer
- INTEGER:: error ! HDF5 error code
- INTEGER(SIZE_T):: name_size ! Filename length
-
- INTEGER, PARAMETER :: sm_len = 2
- CHARACTER(LEN=len_filename) :: filename_exact
- CHARACTER(LEN=len_filename-sm_len) :: filename_sm
-
- !
- !Get file name from the dataset identifier
- !
-
- ! Use an uninitialized buffer
- CALL h5fget_name_f(obj_id, file_name, name_size, error)
- CALL check("h5fget_name_f",error,total_error)
- IF(name_size .NE. LEN_TRIM(fix_filename))THEN
- WRITE(*,*) " file name size obtained from the object id is incorrect"
- total_error = total_error + 1
- ENDIF
- IF(file_name(1:name_size) .NE. TRIM(fix_filename)) THEN
- WRITE(*,*) " file name obtained from the object id is incorrect"
+ !
+ !Create group "/G" inside file "mount1.h5".
+ !
+ CALL h5gcreate_f(file1_id, "/G", gid, error)
+ CALL check("h5gcreate_f",error,total_error)
+ !
+ !close file and group identifiers.
+ !
+ CALL h5gclose_f(gid, error)
+ CALL check("h5gclose_f",error,total_error)
+ CALL h5fclose_f(file1_id, error)
+ CALL check("h5fclose_f",error,total_error)
+
+ !
+ !Create second file "mount2.h5" using default properties.
+ !
+ CALL h5fcreate_f(fix_filename2, H5F_ACC_TRUNC_F, file2_id, error)
+ CALL check("h5fcreate_f",error,total_error)
+
+ !
+ !Create data space for the dataset.
+ !
+ CALL h5screate_simple_f(RANK, dims, dataspace, error)
+ CALL check("h5screate_simple_f",error,total_error)
+
+ !
+ !Create dataset "/D" inside file "mount2.h5".
+ !
+ CALL h5dcreate_f(file2_id, "/D", H5T_NATIVE_INTEGER, dataspace, &
+ dset_id, error)
+ CALL check("h5dcreate_f",error,total_error)
+
+ !
+ ! Write data_in to the dataset
+ !
+ data_dims(1) = NX
+ data_dims(2) = NY
+ CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data_in, data_dims, error)
+ CALL check("h5dwrite_f",error,total_error)
+
+ !
+ !close file, dataset and dataspace identifiers.
+ !
+ CALL h5sclose_f(dataspace, error)
+ CALL check("h5sclose_f",error,total_error)
+ CALL h5dclose_f(dset_id, error)
+ CALL check("h5dclose_f",error,total_error)
+ CALL h5fclose_f(file2_id, error)
+ CALL check("h5fclose_f",error,total_error)
+
+ !
+ !test whether files are accessible as HDF5 (new, VOL-safe, way)
+ !
+ CALL h5fis_accessible_f(fix_filename1, status, error)
+ CALL check("h5fis_accessible_f",error,total_error)
+ IF ( .NOT. status ) THEN
+ write(*,*) "File ", fix_filename1, " is not accessible as hdf5"
+ stop
+ END IF
+
+ CALL h5fis_accessible_f(fix_filename2, status, error)
+ CALL check("h5fis_accessible_f",error,total_error)
+ IF ( .NOT. status ) THEN
+ write(*,*) "File ", fix_filename2, " is not accessible as hdf5"
+ stop
+ END IF
+
+ !
+ !test whether files are in hdf5 format (old way)
+ !
+ CALL h5fis_hdf5_f(fix_filename1, status, error)
+ CALL check("h5fis_hdf5_f",error,total_error)
+ IF ( .NOT. status ) THEN
+ write(*,*) "File ", fix_filename1, " is not in hdf5 format"
+ stop
+ END IF
+
+ CALL h5fis_hdf5_f(fix_filename2, status, error)
+ CALL check("h5fis_hdf5_f",error,total_error)
+ IF ( .NOT. status ) THEN
+ write(*,*) "File ", fix_filename2, " is not in hdf5 format"
+ stop
+ END IF
+
+ !
+ !reopen both files.
+ !
+ CALL h5fopen_f (fix_filename1, H5F_ACC_RDWR_F, file1_id, error)
+ CALL check("hfopen_f",error,total_error)
+
+ CALL h5fget_obj_count_f(INT(H5F_OBJ_ALL_F,HID_T), H5F_OBJ_ALL_F, obj_count, error)
+ CALL check(" h5fget_obj_count_f",error,total_error)
+
+ IF(obj_count.NE.1)THEN
+ total_error = total_error + 1
+ ENDIF
+
+ CALL h5fopen_f (fix_filename2, H5F_ACC_RDWR_F, file2_id, error)
+ CALL check("h5fopen_f",error,total_error)
+
+ CALL h5fget_obj_count_f(INT(H5F_OBJ_ALL_F,HID_T), H5F_OBJ_ALL_F, obj_count, error)
+ CALL check(" h5fget_obj_count_f",error,total_error)
+
+ IF(obj_count.NE.2)THEN
+ total_error = total_error + 1
+ ENDIF
+
+ !
+ !Check file numbers
+ !
+ CALL h5fget_fileno_f(file1_id, file_num1, error)
+ CALL check("h5fget_fileno_f",error,total_error)
+ CALL h5fget_fileno_f(file2_id, file_num2, error)
+ CALL check("h5fget_fileno_f",error,total_error)
+ IF(file_num1 .EQ. file_num2) THEN
+ write(*,*) "file numbers aren't supposed to match"
+ END IF
+
+ !
+ !mount the second file under the first file's "/G" group.
+ !
+ CALL h5fmount_f (file1_id, "/G", file2_id, error)
+ CALL check("h5fmount_f",error,total_error)
+
+
+ !
+ !Access dataset D in the first file under /G/D name.
+ !
+ CALL h5dopen_f(file1_id, "/G/D", dset_id, error)
+ CALL check("h5dopen_f",error,total_error)
+
+ !
+ !Get dataset's data type.
+ !
+ CALL h5dget_type_f(dset_id, dtype_id, error)
+ CALL check("h5dget_type_f",error,total_error)
+
+ !
+ !Read the dataset.
+ !
+ CALL h5dread_f(dset_id, dtype_id, data_out, data_dims, error)
+ CALL check("h5dread_f",error,total_error)
+
+ !
+ !Compare the data.
+ !
+ do i = 1, NX
+ do j = 1, NY
+ IF (data_out(i,j) .NE. data_in(i, j)) THEN
total_error = total_error + 1
END IF
+ end do
+ end do
- ! Use a buffer initialized with spaces
- file_name(:) = " "
- CALL h5fget_name_f(obj_id, file_name, name_size, error)
- CALL check("h5fget_name_f",error,total_error)
- IF(name_size .NE. LEN_TRIM(fix_filename))THEN
- WRITE(*,*) " file name size obtained from the object id is incorrect"
- total_error = total_error + 1
- ENDIF
- IF(file_name(1:name_size) .NE. TRIM(fix_filename)) THEN
- WRITE(*,*) " file name obtained from the object id is incorrect"
- total_error = total_error + 1
- END IF
-
- ! Use a buffer initialized with non-whitespace characters
- file_name(:) = "a"
- CALL h5fget_name_f(obj_id, file_name, name_size, error)
- CALL check("h5fget_name_f",error,total_error)
- IF(name_size .NE. LEN_TRIM(fix_filename))THEN
- WRITE(*,*) " file name size obtained from the object id is incorrect"
- total_error = total_error + 1
- ENDIF
- IF(file_name(1:name_size) .NE. TRIM(fix_filename)) THEN
- WRITE(*,*) " file name obtained from the object id is incorrect"
- total_error = total_error + 1
- END IF
-
- ! Use a buffer which is the exact size needed to hold the filename
- CALL h5fget_name_f(obj_id, filename_exact, name_size, error)
- CALL check("h5fget_name_f",error,total_error)
- IF(name_size .NE. len_filename)THEN
- WRITE(*,*) " file name size obtained from the object id is incorrect"
- total_error = total_error + 1
- ENDIF
- IF(filename_exact .NE. TRIM(fix_filename)) THEN
- WRITE(*,*) " file name obtained from the object id is incorrect"
- total_error = total_error + 1
- END IF
-
- ! Use a buffer which is smaller than needed to hold the filename
- CALL h5fget_name_f(obj_id, filename_sm, name_size, error)
- CALL check("h5fget_name_f",error,total_error)
- IF(name_size .NE. len_filename)THEN
- WRITE(*,*) " file name size obtained from the object id is incorrect"
- total_error = total_error + 1
- ENDIF
- IF(filename_sm(1:len_filename-sm_len) .NE. fix_filename(1:len_filename-sm_len)) THEN
- WRITE(*,*) " file name obtained from the object id is incorrect"
- total_error = total_error + 1
- END IF
-
- END SUBROUTINE check_get_name
-
-! The following subroutine tests h5fget_name_f.
-! It creates the file which has name "filename.h5" and
-! tests that h5fget_name_f also returns the name "filename.h5"
-!
- SUBROUTINE get_name_test(cleanup, total_error)
- USE HDF5 ! This module contains all necessary modules
- USE TH5_MISC
- IMPLICIT NONE
- LOGICAL, INTENT(IN) :: cleanup
- INTEGER, INTENT(INOUT) :: total_error
-
- CHARACTER(LEN=*), PARAMETER :: filename = "filename"
- CHARACTER(LEN=80) :: fix_filename
- INTEGER :: len_filename
-
- INTEGER(HID_T) :: file_id ! File identifier
- INTEGER(HID_T) :: g_id ! Group identifier
-
- !
- ! Flag to check operation success
- !
- INTEGER :: error
-
- !
- ! Create file "filename.h5" using default properties.
- !
- CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error)
- IF (error .NE. 0) THEN
- WRITE(*,*) "Cannot modify filename"
- STOP
- ENDIF
- CALL h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, file_id, error)
- CALL check("h5fcreate_f",error,total_error)
-
- !
- ! Create group.
- !
- CALL h5gopen_f(file_id,"/",g_id, error)
- CALL check("h5gopen_f",error,total_error)
-
- len_filename = LEN_TRIM(fix_filename)
- CALL check_get_name(file_id, fix_filename, len_filename, total_error)
- CALL check_get_name(g_id, fix_filename, len_filename, total_error)
-
- ! Close the group.
- !
- CALL h5gclose_f(g_id, error)
- CALL check("h5gclose_f",error,total_error)
-
- !
- ! Close the file identifiers.
- !
- CALL h5fclose_f(file_id, error)
+ !
+ !Close dset_id and dtype_id.
+ !
+ CALL h5dclose_f(dset_id, error)
+ CALL check("h5dclose_f",error,total_error)
+ CALL h5tclose_f(dtype_id, error)
+ CALL check("h5tclose_f",error,total_error)
+
+ !
+ !unmount the second file.
+ !
+ CALL h5funmount_f(file1_id, "/G", error);
+ CALL check("h5funmount_f",error,total_error)
+
+ !
+ !Close both files.
+ !
+
+ CALL h5fget_obj_count_f(INT(H5F_OBJ_ALL_F,HID_T), H5F_OBJ_ALL_F, obj_count, error)
+ CALL check(" h5fget_obj_count_f",error,total_error)
+
+ IF(obj_count.NE.2)THEN
+ total_error = total_error + 1
+ ENDIF
+
+ CALL h5fclose_f(file1_id, error)
+ CALL check("h5fclose_f",error,total_error)
+ CALL h5fclose_f(file2_id, error)
+ CALL check("h5fclose_f",error,total_error)
+
+ CALL h5fget_obj_count_f(INT(H5F_OBJ_ALL_F,HID_T), H5F_OBJ_ALL_F, obj_count, error)
+ CALL check(" h5fget_obj_count_f",error,total_error)
+
+ IF(obj_count.NE.0)THEN
+ total_error = total_error + 1
+ ENDIF
+
+ if(cleanup) CALL h5_cleanup_f(filename1, H5P_DEFAULT_F, error)
+ CALL check("h5_cleanup_f", error, total_error)
+ if(cleanup) CALL h5_cleanup_f(filename2, H5P_DEFAULT_F, error)
+ CALL check("h5_cleanup_f", error, total_error)
+ RETURN
+ END SUBROUTINE mountingtest
+
+ !
+ ! The following subroutine tests h5freopen_f.
+ ! It creates the file which has name "reopen.h5" and
+ ! the "/dset" dataset inside the file.
+ ! writes the data to the file, close the dataset.
+ ! Reopen the file based upon the file_id, open the
+ ! dataset use the reopen_id then reads the
+ ! dataset back to memory to test whether the data
+ ! read is identical to the data written
+ !
+
+ SUBROUTINE reopentest(cleanup, total_error)
+ USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
+ IMPLICIT NONE
+ LOGICAL, INTENT(IN) :: cleanup
+ INTEGER, INTENT(INOUT) :: total_error
+
+ !
+ CHARACTER(LEN=6), PARAMETER :: filename = "reopen"
+ CHARACTER(LEN=80) :: fix_filename
+
+ INTEGER(HID_T) :: file_id, reopen_id ! File identifiers
+ INTEGER(HID_T) :: dset_id ! Dataset identifier
+
+ !
+ !dataset name is "dset"
+ !
+ CHARACTER(LEN=4), PARAMETER :: dsetname = "dset"
+
+ !
+ !data space rank and dimensions
+ !
+ INTEGER, PARAMETER :: RANK = 2
+ INTEGER, PARAMETER :: NX = 4
+ INTEGER, PARAMETER :: NY = 6
+
+ !
+ ! data space identifier
+ !
+ INTEGER(HID_T) :: dataspace
+
+ !
+ !The dimensions for the dataset.
+ !
+ INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/NX,NY/)
+
+ !
+ !flag to check operation success
+ !
+ INTEGER :: error
+
+ !
+ !general purpose integer
+ !
+ INTEGER :: i, j
+
+ !
+ !array to store data
+ !
+ INTEGER, DIMENSION(4,6) :: dset_data, data_out
+ INTEGER(HSIZE_T), DIMENSION(2) :: data_dims
+ INTEGER(HSIZE_T) :: file_size
+ INTEGER :: file_num1
+ INTEGER :: file_num2
+ CHARACTER(LEN=80) :: file_name
+ INTEGER(SIZE_T) :: name_size
+
+ !
+ !initialize the dset_data array which will be written to the "/dset"
+ !
+ do j = 1, NY
+ do i = 1, NX
+ dset_data(i,j) = (i-1)*6 + j;
+ end do
+ end do
+
+ !
+ !Create file "reopen.h5" using default properties.
+ !
+ CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error)
+ if (error .ne. 0) then
+ write(*,*) "Cannot modify filename"
+ stop
+ endif
+ CALL h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, file_id, error)
+ CALL check("h5fcreate_f",error,total_error)
+
+ !
+ !Create data space for the dataset.
+ !
+ CALL h5screate_simple_f(RANK, dims, dataspace, error)
+ CALL check("h5screate_simple_f",error,total_error)
+
+ !
+ !Create dataset "/dset" inside the file .
+ !
+ CALL h5dcreate_f(file_id, dsetname, H5T_NATIVE_INTEGER, dataspace, &
+ dset_id, error)
+ CALL check("h5dcreate_f",error,total_error)
+
+ !
+ !Write the dataset.
+ !
+ data_dims(1) = NX
+ data_dims(2) = NY
+ CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, dset_data, data_dims, error)
+ CALL check("h5dwrite_f",error,total_error)
+
+ !
+ !close the dataset.
+ !
+ CALL h5dclose_f(dset_id, error)
+ CALL check("h5dclose_f",error,total_error)
+
+ !
+ !close the dataspace.
+ !
+ CALL h5sclose_f(dataspace, error)
+ CALL check("h5sclose_f",error,total_error)
+
+ !
+ !Reopen file dsetf.h5.
+ !
+ CALL h5freopen_f(file_id, reopen_id, error)
+ CALL check("h5freopen_f",error,total_error)
+ !
+ !Check file size
+ !
+ CALL h5fget_filesize_f(file_id, file_size, error)
+ CALL check("h5fget_filesize_f",error,total_error)
+
+ !
+ !Check file numbers
+ !
+ CALL h5fget_fileno_f(file_id, file_num1, error)
+ CALL check("h5fget_fileno_f",error,total_error)
+ CALL h5fget_fileno_f(reopen_id, file_num2, error)
+ CALL check("h5fget_fileno_f",error,total_error)
+ IF(file_num1 .NE. file_num2) THEN
+ write(*,*) "file numbers don't match"
+ END IF
+
+ !
+ !Open the dataset based on the reopen_id.
+ !
+ CALL h5dopen_f(reopen_id, dsetname, dset_id, error)
+ CALL check("h5dopen_f",error,total_error)
+ !
+ !Get file name from the dataset identifier
+ !
+ CALL h5fget_name_f(dset_id, file_name, name_size, error)
+ CALL check("h5fget_name_f",error,total_error)
+ IF(file_name(1:name_size) .NE. fix_filename(1:name_size)) THEN
+ write(*,*) "file name obtained from the dataset id is incorrect"
+ END IF
+
+ !
+ !Read the dataset.
+ !
+ CALL h5dread_f(dset_id, H5T_NATIVE_INTEGER, data_out, data_dims, error)
+ CALL check("h5dread_f",error,total_error)
+
+ !
+ !Compare the data.
+ !
+ do i = 1, NX
+ do j = 1, NY
+ IF (data_out(i,j) .NE. dset_data(i, j)) THEN
+ write(*, *) "reopen test error occurred"
+ END IF
+ end do
+ end do
+
+
+ !
+ !Close the dataset.
+ !
+ CALL h5dclose_f(dset_id, error)
+ CALL check("h5dclose_f",error,total_error)
+
+ !
+ !Close the file identifiers.
+ !
+ CALL h5fclose_f(file_id, error)
+ CALL check("h5fclose_f",error,total_error)
+ CALL h5fclose_f(reopen_id, error)
+ CALL check("h5fclose_f",error,total_error)
+
+
+ if(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error)
+ CALL check("h5_cleanup_f", error, total_error)
+ RETURN
+
+ END SUBROUTINE reopentest
+
+ ! The following subroutine checks that h5fget_name_f produces
+ ! correct output for a given obj_id and filename.
+ !
+ SUBROUTINE check_get_name(obj_id, fix_filename, len_filename, total_error)
+ USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
+ IMPLICIT NONE
+ INTEGER(HID_T) :: obj_id ! Object identifier
+ CHARACTER(LEN=80), INTENT(IN) :: fix_filename ! Expected filename
+ INTEGER, INTENT(IN) :: len_filename ! The length of the filename
+ INTEGER, INTENT(INOUT) :: total_error ! Error count
+
+ CHARACTER(LEN=80):: file_name ! Filename buffer
+ INTEGER:: error ! HDF5 error code
+ INTEGER(SIZE_T):: name_size ! Filename length
+
+ INTEGER, PARAMETER :: sm_len = 2
+ CHARACTER(LEN=len_filename) :: filename_exact
+ CHARACTER(LEN=len_filename-sm_len) :: filename_sm
+
+ !
+ !Get file name from the dataset identifier
+ !
+
+ ! Use an uninitialized buffer
+ CALL h5fget_name_f(obj_id, file_name, name_size, error)
+ CALL check("h5fget_name_f",error,total_error)
+ IF(name_size .NE. LEN_TRIM(fix_filename))THEN
+ WRITE(*,*) " file name size obtained from the object id is incorrect"
+ total_error = total_error + 1
+ ENDIF
+ IF(file_name(1:name_size) .NE. TRIM(fix_filename)) THEN
+ WRITE(*,*) " file name obtained from the object id is incorrect"
+ total_error = total_error + 1
+ END IF
+
+ ! Use a buffer initialized with spaces
+ file_name(:) = " "
+ CALL h5fget_name_f(obj_id, file_name, name_size, error)
+ CALL check("h5fget_name_f",error,total_error)
+ IF(name_size .NE. LEN_TRIM(fix_filename))THEN
+ WRITE(*,*) " file name size obtained from the object id is incorrect"
+ total_error = total_error + 1
+ ENDIF
+ IF(file_name(1:name_size) .NE. TRIM(fix_filename)) THEN
+ WRITE(*,*) " file name obtained from the object id is incorrect"
+ total_error = total_error + 1
+ END IF
+
+ ! Use a buffer initialized with non-whitespace characters
+ file_name(:) = "a"
+ CALL h5fget_name_f(obj_id, file_name, name_size, error)
+ CALL check("h5fget_name_f",error,total_error)
+ IF(name_size .NE. LEN_TRIM(fix_filename))THEN
+ WRITE(*,*) " file name size obtained from the object id is incorrect"
+ total_error = total_error + 1
+ ENDIF
+ IF(file_name(1:name_size) .NE. TRIM(fix_filename)) THEN
+ WRITE(*,*) " file name obtained from the object id is incorrect"
+ total_error = total_error + 1
+ END IF
+
+ ! Use a buffer which is the exact size needed to hold the filename
+ CALL h5fget_name_f(obj_id, filename_exact, name_size, error)
+ CALL check("h5fget_name_f",error,total_error)
+ IF(name_size .NE. len_filename)THEN
+ WRITE(*,*) " file name size obtained from the object id is incorrect"
+ total_error = total_error + 1
+ ENDIF
+ IF(filename_exact .NE. TRIM(fix_filename)) THEN
+ WRITE(*,*) " file name obtained from the object id is incorrect"
+ total_error = total_error + 1
+ END IF
+
+ ! Use a buffer which is smaller than needed to hold the filename
+ CALL h5fget_name_f(obj_id, filename_sm, name_size, error)
+ CALL check("h5fget_name_f",error,total_error)
+ IF(name_size .NE. len_filename)THEN
+ WRITE(*,*) " file name size obtained from the object id is incorrect"
+ total_error = total_error + 1
+ ENDIF
+ IF(filename_sm(1:len_filename-sm_len) .NE. fix_filename(1:len_filename-sm_len)) THEN
+ WRITE(*,*) " file name obtained from the object id is incorrect"
+ total_error = total_error + 1
+ END IF
+
+ END SUBROUTINE check_get_name
+
+ ! The following subroutine tests h5fget_name_f.
+ ! It creates the file which has name "filename.h5" and
+ ! tests that h5fget_name_f also returns the name "filename.h5"
+ !
+
+ SUBROUTINE get_name_test(cleanup, total_error)
+ USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
+ IMPLICIT NONE
+ LOGICAL, INTENT(IN) :: cleanup
+ INTEGER, INTENT(INOUT) :: total_error
+
+ CHARACTER(LEN=*), PARAMETER :: filename = "filename"
+ CHARACTER(LEN=80) :: fix_filename
+ INTEGER :: len_filename
+
+ INTEGER(HID_T) :: file_id ! File identifier
+ INTEGER(HID_T) :: g_id ! Group identifier
+
+ !
+ ! Flag to check operation success
+ !
+ INTEGER :: error
+
+ !
+ ! Create file "filename.h5" using default properties.
+ !
+ CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error)
+ IF (error .NE. 0) THEN
+ WRITE(*,*) "Cannot modify filename"
+ STOP
+ ENDIF
+ CALL h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, file_id, error)
+ CALL check("h5fcreate_f",error,total_error)
+
+ !
+ ! Create group.
+ !
+ CALL h5gopen_f(file_id,"/",g_id, error)
+ CALL check("h5gopen_f",error,total_error)
+
+ len_filename = LEN_TRIM(fix_filename)
+ CALL check_get_name(file_id, fix_filename, len_filename, total_error)
+ CALL check_get_name(g_id, fix_filename, len_filename, total_error)
+
+ ! Close the group.
+ !
+ CALL h5gclose_f(g_id, error)
+ CALL check("h5gclose_f",error,total_error)
+
+ !
+ ! Close the file identifiers.
+ !
+ CALL h5fclose_f(file_id, error)
+ CALL check("h5fclose_f",error,total_error)
+
+ IF(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error)
+ CALL check("h5_cleanup_f", error, total_error)
+ RETURN
+
+ END SUBROUTINE get_name_test
+
+
+ !
+ ! The following example demonstrates how to get creation property list,
+ ! and access property list.
+ ! We first create a file using the default creation and access property
+ ! list. Then, the file was closed and reopened. We then get the
+ ! creation and access property lists of the first file. The second file is
+ ! created using the got property lists
+
+ SUBROUTINE plisttest(cleanup, total_error)
+ USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
+ IMPLICIT NONE
+ LOGICAL, INTENT(IN) :: cleanup
+ INTEGER, INTENT(INOUT) :: total_error
+
+ !
+ !file names are "plist1.h5" and "plist2.h5"
+ !
+ CHARACTER(LEN=6), PARAMETER :: filename1 = "plist1"
+ CHARACTER(LEN=80) :: fix_filename1
+ CHARACTER(LEN=6), PARAMETER :: filename2 = "plist2"
+ CHARACTER(LEN=80) :: fix_filename2
+
+ INTEGER(HID_T) :: file1_id, file2_id ! File identifiers
+ INTEGER(HID_T) :: prop_id ! File creation property list identifier
+ INTEGER(HID_T) :: access_id ! File Access property list identifier
+
+ !flag to check operation success
+ INTEGER :: error
+
+ !
+ !Create a file1 using default properties.
+ !
+ CALL h5_fixname_f(filename1, fix_filename1, H5P_DEFAULT_F, error)
+ if (error .ne. 0) then
+ write(*,*) "Cannot modify file name"
+ stop
+ endif
+ CALL h5fcreate_f(fix_filename1, H5F_ACC_TRUNC_F, file1_id, error)
+ CALL check("h5fcreate_f",error,total_error)
+
+ !
+ !Terminate access to the file.
+ !
+ CALL h5fclose_f(file1_id, error)
+ CALL check("h5fclose_f",error,total_error)
+
+ !
+ !Open an existing file.
+ !
+ CALL h5fopen_f (fix_filename1, H5F_ACC_RDWR_F, file1_id, error)
+ CALL check("h5fopen_f",error,total_error)
+
+ !
+ !get the creation property list.
+ !
+ CALL h5fget_create_plist_f(file1_id, prop_id, error)
+ CALL check("h5fget_create_plist_f",error,total_error)
+
+ !
+ !get the access property list.
+ !
+ CALL h5fget_access_plist_f(file1_id, access_id, error)
+ CALL check("h5fget_access_plist_f",error,total_error)
+
+ !
+ !based on the creation property list id and access property list id
+ !create a new file
+ !
+ CALL h5_fixname_f(filename2, fix_filename2, H5P_DEFAULT_F, error)
+ if (error .ne. 0) then
+ write(*,*) "Cannot modify file name"
+ stop
+ endif
+ CALL h5fcreate_f(fix_filename2, H5F_ACC_TRUNC_F, file2_id, error, &
+ prop_id, access_id)
+ CALL check("h5create_f",error,total_error)
+
+ !
+ !Close all the property lists.
+ !
+ CALL h5pclose_f(prop_id, error)
+ CALL check("h5pclose_f",error,total_error)
+ CALL h5pclose_f(access_id, error)
+ CALL check("h5pclose_f",error,total_error)
+
+ !
+ !Terminate access to the files.
+ !
+ CALL h5fclose_f(file1_id, error)
+ CALL check("h5fclose_f",error,total_error)
+
+ CALL h5fclose_f(file2_id, error)
+ CALL check("h5fclose_f",error,total_error)
+
+ if(cleanup) CALL h5_cleanup_f(filename1, H5P_DEFAULT_F, error)
+ CALL check("h5_cleanup_f", error, total_error)
+ if(cleanup) CALL h5_cleanup_f(filename2, H5P_DEFAULT_F, error)
+ CALL check("h5_cleanup_f", error, total_error)
+ RETURN
+
+ END SUBROUTINE plisttest
+
+
+ !
+ ! The following subroutine tests h5pget(set)_fclose_degree_f
+ !
+
+ SUBROUTINE file_close(cleanup, total_error)
+ USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
+ IMPLICIT NONE
+ LOGICAL, INTENT(IN) :: cleanup
+ INTEGER, INTENT(INOUT) :: total_error
+ INTEGER :: error
+
+ !
+ CHARACTER(LEN=10), PARAMETER :: filename = "file_close"
+ CHARACTER(LEN=80) :: fix_filename
+
+ INTEGER(HID_T) :: fid, fid_d, fid1, fid2, fid3 ! File identifiers
+ INTEGER(HID_T) :: fapl, fapl1, fapl2, fapl3 ! File access identifiers
+ INTEGER(HID_T) :: fid_d_fapl, fid1_fapl ! File access identifiers
+ LOGICAL :: flag
+ INTEGER(SIZE_T) :: obj_count, obj_countf
+ INTEGER(HID_T), ALLOCATABLE, DIMENSION(:) :: obj_ids
+ INTEGER(SIZE_T) :: i
+
+ CALL h5eset_auto_f(0, error)
+
+ CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error)
+ if (error .ne. 0) then
+ write(*,*) "Cannot modify filename"
+ stop
+ endif
+ CALL h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, fid, error)
+ CALL check("h5fcreate_f",error,total_error)
+
+ CALL h5pcreate_f(H5P_FILE_ACCESS_F, fapl, error)
+ CALL check("h5pcreate_f",error,total_error)
+ CALL h5pset_fclose_degree_f(fapl, H5F_CLOSE_DEFAULT_F, error)
+ CALL check("h5pset_fclose_degree_f",error,total_error)
+
+
+ CALL h5pcreate_f(H5P_FILE_ACCESS_F, fapl1, error)
+ CALL check("h5pcreate_f",error,total_error)
+ CALL h5pset_fclose_degree_f(fapl1, H5F_CLOSE_WEAK_F, error)
+ CALL check("h5pset_fclose_degree_f",error,total_error)
+
+
+ CALL h5pcreate_f(H5P_FILE_ACCESS_F, fapl2, error)
+ CALL check("h5pcreate_f",error,total_error)
+ CALL h5pset_fclose_degree_f(fapl2, H5F_CLOSE_SEMI_F, error)
+ CALL check("h5pset_fclose_degree_f",error,total_error)
+
+ CALL h5pcreate_f(H5P_FILE_ACCESS_F, fapl3, error)
+ CALL check("h5pcreate_f",error,total_error)
+ CALL h5pset_fclose_degree_f(fapl3, H5F_CLOSE_STRONG_F, error)
+ CALL check("h5pset_fclose_degree_f",error,total_error)
+
+ CALL h5fopen_f(fix_filename, H5F_ACC_RDWR_F, fid1, error, access_prp=fapl1)
+ CALL check("h5fopen_f",error,total_error)
+ CALL h5fopen_f(fix_filename, H5F_ACC_RDWR_F, fid_d, error, access_prp=fapl)
+ CALL check("h5fopen_f",error,total_error)
+ CALL h5fget_access_plist_f(fid1, fid1_fapl, error)
+ CALL check("h5fget_access_plist_f",error,total_error)
+ CALL h5fget_access_plist_f(fid_d, fid_d_fapl, error)
+ CALL check("h5fget_access_plist_f",error,total_error)
+
+ CALL h5pequal_f(fid_d_fapl, fid1_fapl, flag, error)
+ CALL check("h5pequal_f",error,total_error)
+ if (.NOT. flag) then
+ write(*,*) " File access lists should be equal, error "
+ total_error=total_error + 1
+ endif
+ CALL h5fopen_f(fix_filename, H5F_ACC_RDWR_F, fid2, error, access_prp=fapl2)
+ if( error .ne. -1) then
+ total_error = total_error + 1
+ write(*,*) " Open with H5F_CLOSE_SEMI should fail "
+ endif
+ CALL h5fopen_f(fix_filename, H5F_ACC_RDWR_F, fid3, error, access_prp=fapl3)
+ if( error .ne. -1) then
+ total_error = total_error + 1
+ write(*,*) " Open with H5F_CLOSE_STRONG should fail "
+ endif
+
+ CALL h5fget_obj_count_f(fid1, H5F_OBJ_ALL_F, obj_count, error)
+ CALL check("h5fget_obj_count_f",error,total_error)
+ if(error .eq.0 .and. obj_count .ne. 3) then
+ total_error = total_error + 1
+ write(*,*) "Wrong number of open objects reported, error"
+ endif
+ CALL h5fget_obj_count_f(fid1, H5F_OBJ_FILE_F, obj_countf, error)
+ CALL check("h5fget_obj_count_f",error,total_error)
+ if(error .eq.0 .and. obj_countf .ne. 3) then
+ total_error = total_error + 1
+ write(*,*) "Wrong number of open objects reported, error"
+ endif
+ allocate(obj_ids(obj_countf), stat = error)
+ CALL h5fget_obj_ids_f(fid, H5F_OBJ_FILE_F, obj_countf, obj_ids, error)
+ CALL check("h5fget_obj_ids_f",error,total_error)
+ if(error .eq. 0) then
+ do i = 1, obj_countf
+ CALL h5fclose_f(obj_ids(i), error)
CALL check("h5fclose_f",error,total_error)
+ enddo
+ endif
+
+ CALL h5fclose_f(fid, error)
+ if(error .eq. 0) then
+ total_error = total_error + 1
+ write(*,*) "File should be closed at this point, error"
+ endif
+ CALL h5fclose_f(fid1, error)
+ if(error .eq. 0) then
+ total_error = total_error + 1
+ write(*,*) "File should be closed at this point, error"
+ endif
+ CALL h5fclose_f(fid_d, error)
+ if(error .eq. 0) then
+ total_error = total_error + 1
+ write(*,*) "File should be closed at this point, error"
+ endif
+
+ if(cleanup) then
+ CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error)
+ CALL check("h5_cleanup_f", error, total_error)
+ endif
+ deallocate(obj_ids)
+ RETURN
- IF(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error)
- CALL check("h5_cleanup_f", error, total_error)
- RETURN
+ END SUBROUTINE file_close
- END SUBROUTINE get_name_test
+ !
+ ! The following subroutine tests h5fget_freespace_f
+ !
+ SUBROUTINE file_space(filename, cleanup, total_error)
+ USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
+ IMPLICIT NONE
+ CHARACTER(*), INTENT(IN) :: filename
+ LOGICAL, INTENT(IN) :: cleanup
+ INTEGER, INTENT(INOUT) :: total_error
+ INTEGER :: error
+ !
+ CHARACTER(LEN=3), PARAMETER :: grpname = "grp"
+ CHARACTER(LEN=80) :: fix_filename
+
+ INTEGER(HID_T) :: fid ! File identifiers
+ INTEGER(HSSIZE_T) :: free_space
+ INTEGER(HID_T) :: group_id ! Group identifier
+
+ INTEGER(HID_T) :: fcpl
+ INTEGER(HSIZE_T), PARAMETER :: set_usrblck_size = 512
+ INTEGER(HSIZE_T) :: usrblck_size
+
+ CALL h5eset_auto_f(0, error)
+
+ CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error)
+ if (error .ne. 0) then
+ write(*,*) "Cannot modify filename"
+ stop
+ endif
+
+ CALL h5pcreate_f(H5P_FILE_CREATE_F, fcpl, error)
+ CALL check("h5pcreate_f",error, total_error)
+
+ CALL H5Pset_userblock_f(fcpl, set_usrblck_size, error )
+ CALL check("h5pset_userblock_f", error, total_error)
+
+ CALL H5Pget_userblock_f(fcpl, usrblck_size, error )
+ CALL check("h5pget_userblock_f", error, total_error)
+
+ IF(usrblck_size .NE. set_usrblck_size) THEN
+ total_error = total_error + 1
+ WRITE(*,*) "Wrong size of a user block, ", usrblck_size
+ ENDIF
+
+ CALL h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, fid, error, creation_prp=fcpl )
+ CALL check("h5fcreate_f",error,total_error)
+
+ CALL h5pclose_f(fcpl, error)
+ CALL check("H5Pclose_f", error, total_error)
+
+ CALL h5fget_freespace_f(fid, free_space, error)
+ CALL check("h5fget_freespace_f",error,total_error)
+ IF(error .EQ.0 .AND. free_space .NE. 1248) THEN
+ total_error = total_error + 1
+ WRITE(*,*) "1: Wrong amount of free space reported, ", free_space
+ ENDIF
+
+ ! Create group in the file.
+ CALL h5gcreate_f(fid, grpname, group_id, error)
+ CALL check("h5gcreate_f",error,total_error)
+
+ ! Close group
+ CALL h5gclose_f(group_id, error)
+ CALL check("h5gclose_f", error, total_error)
+
+ ! Check the free space now
+ CALL h5fget_freespace_f(fid, free_space, error)
+ CALL check("h5fget_freespace_f",error,total_error)
+ IF(error .EQ.0 .AND. free_space .NE. 216) THEN
+ total_error = total_error + 1
+ WRITE(*,*) "2: Wrong amount of free space reported, ", free_space
+ ENDIF
+
+ !Unlink the group
+ CALL h5gunlink_f(fid, grpname, error)
+ CALL check("h5gunlink_f", error, total_error)
+
+ ! Check the free space now
+ CALL h5fget_freespace_f(fid, free_space, error)
+ CALL check("h5fget_freespace_f",error,total_error)
+ IF(error .EQ.0 .AND. free_space .NE. 1248) THEN
+ total_error = total_error + 1
+ WRITE(*,*) "3: Wrong amount of free space reported, ", free_space
+ ENDIF
+
+ IF(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error)
+ CALL check("h5_cleanup_f", error, total_error)
+ RETURN
-!
-! The following example demonstrates how to get creation property list,
-! and access property list.
-! We first create a file using the default creation and access property
-! list. Then, the file was closed and reopened. We then get the
-! creation and access property lists of the first file. The second file is
-! created using the got property lists
-
- SUBROUTINE plisttest(cleanup, total_error)
- USE HDF5 ! This module contains all necessary modules
- USE TH5_MISC
- IMPLICIT NONE
- LOGICAL, INTENT(IN) :: cleanup
- INTEGER, INTENT(INOUT) :: total_error
-
- !
- !file names are "plist1.h5" and "plist2.h5"
- !
- CHARACTER(LEN=6), PARAMETER :: filename1 = "plist1"
- CHARACTER(LEN=80) :: fix_filename1
- CHARACTER(LEN=6), PARAMETER :: filename2 = "plist2"
- CHARACTER(LEN=80) :: fix_filename2
-
- INTEGER(HID_T) :: file1_id, file2_id ! File identifiers
- INTEGER(HID_T) :: prop_id ! File creation property list identifier
- INTEGER(HID_T) :: access_id ! File Access property list identifier
-
- !flag to check operation success
- INTEGER :: error
-
- !
- !Create a file1 using default properties.
- !
- CALL h5_fixname_f(filename1, fix_filename1, H5P_DEFAULT_F, error)
- if (error .ne. 0) then
- write(*,*) "Cannot modify file name"
- stop
- endif
- CALL h5fcreate_f(fix_filename1, H5F_ACC_TRUNC_F, file1_id, error)
- CALL check("h5fcreate_f",error,total_error)
-
- !
- !Terminate access to the file.
- !
- CALL h5fclose_f(file1_id, error)
- CALL check("h5fclose_f",error,total_error)
-
- !
- !Open an existing file.
- !
- CALL h5fopen_f (fix_filename1, H5F_ACC_RDWR_F, file1_id, error)
- CALL check("h5fopen_f",error,total_error)
-
- !
- !get the creation property list.
- !
- CALL h5fget_create_plist_f(file1_id, prop_id, error)
- CALL check("h5fget_create_plist_f",error,total_error)
-
- !
- !get the access property list.
- !
- CALL h5fget_access_plist_f(file1_id, access_id, error)
- CALL check("h5fget_access_plist_f",error,total_error)
-
- !
- !based on the creation property list id and access property list id
- !create a new file
- !
- CALL h5_fixname_f(filename2, fix_filename2, H5P_DEFAULT_F, error)
- if (error .ne. 0) then
- write(*,*) "Cannot modify file name"
- stop
- endif
- CALL h5fcreate_f(fix_filename2, H5F_ACC_TRUNC_F, file2_id, error, &
- prop_id, access_id)
- CALL check("h5create_f",error,total_error)
-
- !
- !Close all the property lists.
- !
- CALL h5pclose_f(prop_id, error)
- CALL check("h5pclose_f",error,total_error)
- CALL h5pclose_f(access_id, error)
- CALL check("h5pclose_f",error,total_error)
-
- !
- !Terminate access to the files.
- !
- CALL h5fclose_f(file1_id, error)
- CALL check("h5fclose_f",error,total_error)
-
- CALL h5fclose_f(file2_id, error)
- CALL check("h5fclose_f",error,total_error)
-
- if(cleanup) CALL h5_cleanup_f(filename1, H5P_DEFAULT_F, error)
- CALL check("h5_cleanup_f", error, total_error)
- if(cleanup) CALL h5_cleanup_f(filename2, H5P_DEFAULT_F, error)
- CALL check("h5_cleanup_f", error, total_error)
- RETURN
-
- END SUBROUTINE plisttest
+ END SUBROUTINE file_space
+ !
+ ! The following subroutine tests h5fget_info_f
+ !
-!
-! The following subroutine tests h5pget(set)_fclose_degree_f
-!
+ SUBROUTINE test_file_info(filename, cleanup, total_error)
+ USE HDF5 ! This module contains all necessary modules
+ USE TH5_MISC
+ IMPLICIT NONE
+ CHARACTER(*), INTENT(IN) :: filename
+ LOGICAL, INTENT(IN) :: cleanup
+ INTEGER, INTENT(INOUT) :: total_error
+ INTEGER :: error
+ !
+ CHARACTER(LEN=3), PARAMETER :: grpname = "grp"
+ CHARACTER(LEN=80) :: fix_filename
+
+ INTEGER(HID_T) :: fid ! File identifiers
+ INTEGER(HID_T) :: group_id ! Group identifier
+
+ TYPE(H5F_INFO_T) :: file_info
+ INTEGER(HID_T) :: fapl, fcpl
+ INTEGER :: strategy
+ LOGICAL :: persist
+ INTEGER(HSIZE_T) :: threshold, fsp_size
+
+ CALL h5eset_auto_f(0, error)
+
+ CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error)
+ if (error .ne. 0) then
+ write(*,*) "Cannot modify filename"
+ stop
+ endif
+
+ CALL h5pcreate_f(H5P_FILE_ACCESS_F, fapl, error)
+ CALL check("h5pcreate_f",error, total_error)
+
+ CALL h5pcreate_f(H5P_FILE_CREATE_F, fcpl, error)
+ CALL check("h5pcreate_f",error, total_error)
+
+ CALL h5pset_libver_bounds_f(fapl, H5F_LIBVER_V114_F, H5F_LIBVER_V114_F, error)
+ CALL check("h5pset_libver_bounds_f",error, total_error)
+ CALL h5pset_file_space_strategy_f(fcpl, H5F_FSPACE_STRATEGY_PAGE_F, .TRUE., 4_HSIZE_T, error)
+ CALL check("h5pset_file_space_strategy_f",error, total_error)
+
+ CALL h5pget_file_space_strategy_f(fcpl, strategy, persist, threshold, error)
+ CALL check("h5pget_file_space_strategy_f",error, total_error)
+
+ IF(strategy .NE. H5F_FSPACE_STRATEGY_PAGE_F) THEN
+ total_error = total_error + 1
+ WRITE(*,*) "h5pget_file_space_strategy_f: wrong strategy, ",strategy
+ ENDIF
+ IF(persist .NEQV. .TRUE.) THEN
+ total_error = total_error + 1
+ WRITE(*,*) "h5pget_file_space_strategy_f: wrong persist, ",persist
+ ENDIF
+ IF(threshold .NE. 4_HSIZE_T) THEN
+ total_error = total_error + 1
+ WRITE(*,*) "h5pget_file_space_strategy_f: wrong threshold, ",threshold
+ ENDIF
+
+ CALL h5pset_file_space_page_size_f(fcpl, 512_HSIZE_T, error)
+ CALL check("H5Pset_file_space_page_size_f",error, total_error)
+
+ CALL h5pget_file_space_page_size_f(fcpl, fsp_size, error)
+ CALL check("H5Pset_file_space_page_size_f",error, total_error)
+
+ IF(fsp_size .NE. 512_HSIZE_T) THEN
+ total_error = total_error + 1
+ WRITE(*,*) "h5pget_file_space_page_size_f: wrong size, ",fsp_size
+ ENDIF
+
+ CALL h5pset_alignment_f(fapl, 1_HSIZE_T, 1024_HSIZE_T, error)
+ CALL check("h5pset_alignment_f",error, total_error)
+
+ CALL h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, fid, error, access_prp=fapl, creation_prp=fcpl)
+ CALL check("h5fcreate_f",error,total_error)
+
+ ! Create group in the file.
+ CALL h5gcreate_f(fid, grpname, group_id, error)
+ CALL check("h5gcreate_f",error,total_error)
+
+ ! Close group
+ CALL h5gclose_f(group_id, error)
+ CALL check("h5gclose_f", error, total_error)
+
+ !Unlink the group
+ CALL h5gunlink_f(fid, grpname, error)
+ CALL check("h5gunlink_f", error, total_error)
+
+ ! Check H5Fget_info_f
+ CALL h5fget_info_f(fid, file_info, error)
+ CALL check("h5fget_info_f", error, total_error)
+
+ IF(file_info%super%version .NE. 3) THEN
+ total_error = total_error + 1
+ WRITE(*,*) "Wrong super%version, ",file_info%free%tot_space
+ ENDIF
+
+ IF(file_info%super%super_size .NE. 48) THEN
+ total_error = total_error + 1
+ WRITE(*,*) "Wrong super%super_size, ",file_info%free%tot_space
+ ENDIF
+
+ IF(file_info%super%super_ext_size .NE. 156) THEN
+ total_error = total_error + 1
+ WRITE(*,*) "Wrong super%super_ext_size, ",file_info%super%super_ext_size
+ ENDIF
+
+ IF(file_info%free%version .NE. 0) THEN
+ total_error = total_error + 1
+ WRITE(*,*) "Wrong free%version, ",file_info%free%version
+ ENDIF
+
+ IF(file_info%free%tot_space .NE. 161) THEN
+ total_error = total_error + 1
+ WRITE(*,*) "Wrong free%tot_space, ",file_info%free%tot_space
+ ENDIF
+
+ IF(file_info%sohm%version.NE. 0) THEN
+ total_error = total_error + 1
+ WRITE(*,*) "Wrong sohm%version ",file_info%sohm%version
+ ENDIF
+
+ IF(file_info%sohm%hdr_size.NE. 0) THEN
+ total_error = total_error + 1
+ WRITE(*,*) "Wrong sohm%hdr_size ",file_info%sohm%hdr_size
+ ENDIF
+
+ IF(file_info%sohm%msgs_info%heap_size.NE. 0) THEN
+ total_error = total_error + 1
+ WRITE(*,*) "Wrong sohm%msgs_info%heap_size ",file_info%sohm%msgs_info%heap_size
+ ENDIF
+
+ IF(file_info%sohm%msgs_info%index_size.NE. 0) THEN
+ total_error = total_error + 1
+ WRITE(*,*) "Wrong sohm%msgs_info%heap_size ",file_info%sohm%msgs_info%index_size
+ ENDIF
+
+ CALL h5fclose_f(fid, error)
+ CALL check("h5fclose_f",error,total_error)
+
+ CALL h5pclose_f(fapl, error)
+ CALL check("H5Pclose_f", error, total_error)
+ CALL h5pclose_f(fcpl, error)
+ CALL check("H5Pclose_f", error, total_error)
+
+ if(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error)
+ CALL check("h5_cleanup_f", error, total_error)
+ RETURN
- SUBROUTINE file_close(cleanup, total_error)
- USE HDF5 ! This module contains all necessary modules
- USE TH5_MISC
- IMPLICIT NONE
- LOGICAL, INTENT(IN) :: cleanup
- INTEGER, INTENT(INOUT) :: total_error
- INTEGER :: error
-
- !
- CHARACTER(LEN=10), PARAMETER :: filename = "file_close"
- CHARACTER(LEN=80) :: fix_filename
-
- INTEGER(HID_T) :: fid, fid_d, fid1, fid2, fid3 ! File identifiers
- INTEGER(HID_T) :: fapl, fapl1, fapl2, fapl3 ! File access identifiers
- INTEGER(HID_T) :: fid_d_fapl, fid1_fapl ! File access identifiers
- LOGICAL :: flag
- INTEGER(SIZE_T) :: obj_count, obj_countf
- INTEGER(HID_T), ALLOCATABLE, DIMENSION(:) :: obj_ids
- INTEGER(SIZE_T) :: i
-
- CALL h5eset_auto_f(0, error)
-
- CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error)
- if (error .ne. 0) then
- write(*,*) "Cannot modify filename"
- stop
- endif
- CALL h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, fid, error)
- CALL check("h5fcreate_f",error,total_error)
-
- CALL h5pcreate_f(H5P_FILE_ACCESS_F, fapl, error)
- CALL check("h5pcreate_f",error,total_error)
- CALL h5pset_fclose_degree_f(fapl, H5F_CLOSE_DEFAULT_F, error)
- CALL check("h5pset_fclose_degree_f",error,total_error)
-
-
- CALL h5pcreate_f(H5P_FILE_ACCESS_F, fapl1, error)
- CALL check("h5pcreate_f",error,total_error)
- CALL h5pset_fclose_degree_f(fapl1, H5F_CLOSE_WEAK_F, error)
- CALL check("h5pset_fclose_degree_f",error,total_error)
-
-
- CALL h5pcreate_f(H5P_FILE_ACCESS_F, fapl2, error)
- CALL check("h5pcreate_f",error,total_error)
- CALL h5pset_fclose_degree_f(fapl2, H5F_CLOSE_SEMI_F, error)
- CALL check("h5pset_fclose_degree_f",error,total_error)
-
- CALL h5pcreate_f(H5P_FILE_ACCESS_F, fapl3, error)
- CALL check("h5pcreate_f",error,total_error)
- CALL h5pset_fclose_degree_f(fapl3, H5F_CLOSE_STRONG_F, error)
- CALL check("h5pset_fclose_degree_f",error,total_error)
-
- CALL h5fopen_f(fix_filename, H5F_ACC_RDWR_F, fid1, error, access_prp=fapl1)
- CALL check("h5fopen_f",error,total_error)
- CALL h5fopen_f(fix_filename, H5F_ACC_RDWR_F, fid_d, error, access_prp=fapl)
- CALL check("h5fopen_f",error,total_error)
- CALL h5fget_access_plist_f(fid1, fid1_fapl, error)
- CALL check("h5fget_access_plist_f",error,total_error)
- CALL h5fget_access_plist_f(fid_d, fid_d_fapl, error)
- CALL check("h5fget_access_plist_f",error,total_error)
-
- CALL h5pequal_f(fid_d_fapl, fid1_fapl, flag, error)
- CALL check("h5pequal_f",error,total_error)
- if (.NOT. flag) then
- write(*,*) " File access lists should be equal, error "
- total_error=total_error + 1
- endif
- CALL h5fopen_f(fix_filename, H5F_ACC_RDWR_F, fid2, error, access_prp=fapl2)
- if( error .ne. -1) then
- total_error = total_error + 1
- write(*,*) " Open with H5F_CLOSE_SEMI should fail "
- endif
- CALL h5fopen_f(fix_filename, H5F_ACC_RDWR_F, fid3, error, access_prp=fapl3)
- if( error .ne. -1) then
- total_error = total_error + 1
- write(*,*) " Open with H5F_CLOSE_STRONG should fail "
- endif
-
- CALL h5fget_obj_count_f(fid1, H5F_OBJ_ALL_F, obj_count, error)
- CALL check("h5fget_obj_count_f",error,total_error)
- if(error .eq.0 .and. obj_count .ne. 3) then
- total_error = total_error + 1
- write(*,*) "Wrong number of open objects reported, error"
- endif
- CALL h5fget_obj_count_f(fid1, H5F_OBJ_FILE_F, obj_countf, error)
- CALL check("h5fget_obj_count_f",error,total_error)
- if(error .eq.0 .and. obj_countf .ne. 3) then
- total_error = total_error + 1
- write(*,*) "Wrong number of open objects reported, error"
- endif
- allocate(obj_ids(obj_countf), stat = error)
- CALL h5fget_obj_ids_f(fid, H5F_OBJ_FILE_F, obj_countf, obj_ids, error)
- CALL check("h5fget_obj_ids_f",error,total_error)
- if(error .eq. 0) then
- do i = 1, obj_countf
- CALL h5fclose_f(obj_ids(i), error)
- CALL check("h5fclose_f",error,total_error)
- enddo
- endif
-
- CALL h5fclose_f(fid, error)
- if(error .eq. 0) then
- total_error = total_error + 1
- write(*,*) "File should be closed at this point, error"
- endif
- CALL h5fclose_f(fid1, error)
- if(error .eq. 0) then
- total_error = total_error + 1
- write(*,*) "File should be closed at this point, error"
- endif
- CALL h5fclose_f(fid_d, error)
- if(error .eq. 0) then
- total_error = total_error + 1
- write(*,*) "File should be closed at this point, error"
- endif
-
- if(cleanup) then
- CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error)
- CALL check("h5_cleanup_f", error, total_error)
- endif
- deallocate(obj_ids)
- RETURN
-
- END SUBROUTINE file_close
+ END SUBROUTINE test_file_info
-!
-! The following subroutine tests h5fget_freespace_f
-!
+ SUBROUTINE test_get_file_image(total_error)
+ !
+ ! Tests the wrapper for h5fget_file_image
+ !
+ IMPLICIT NONE
+
+ INTEGER, INTENT(INOUT) :: total_error ! returns error
+
+ CHARACTER(kind=c_char), ALLOCATABLE, DIMENSION(:), TARGET :: file_image_ptr ! Image from file
+ CHARACTER(kind=c_char), ALLOCATABLE, DIMENSION(:), TARGET :: image_ptr ! Image from h5fget_file_image_f
+
+ INTEGER, DIMENSION(1:100), TARGET :: data ! Write data
+ INTEGER :: file_sz
+ INTEGER(size_t) :: i
+ INTEGER(hid_t) :: file_id = -1 ! File identifier
+ INTEGER(hid_t) :: dset_id = -1 ! Dataset identifier
+ INTEGER(hid_t) :: space_id = -1 ! Dataspace identifier
+ INTEGER(hsize_t), DIMENSION(1:2) :: dims ! Dataset dimensions
+ INTEGER(size_t) :: itmp_a ! General purpose integer
+ INTEGER(size_t) :: image_size ! Size of image
+ TYPE(C_PTR) :: f_ptr ! Pointer
+ INTEGER(hid_t) :: fapl ! File access property
+ INTEGER :: error ! Error flag
+
+ ! Create new properties for file access
+ CALL h5pcreate_f(H5P_FILE_ACCESS_F, fapl, error)
+ CALL check("h5pcreate_f", error, total_error)
+
+ ! Set standard I/O driver
+ CALL h5pset_fapl_stdio_f(fapl, error)
+ CALL check("h5pset_fapl_stdio_f", error, total_error)
+
+ ! Create the file
+ CALL h5fcreate_f("tget_file_image.h5", H5F_ACC_TRUNC_F, file_id, error, H5P_DEFAULT_F, fapl)
+ CALL check("h5fcreate_f", error, total_error)
+
+ ! Set up data space for new data set
+ dims(1:2) = (/10,10/)
+
+ CALL h5screate_simple_f(2, dims, space_id, error)
+ CALL check("h5screate_simple_f", error, total_error)
+
+ ! Create a dataset
+ CALL h5dcreate_f(file_id, "dset 0", H5T_NATIVE_INTEGER, space_id, dset_id, error)
+ CALL check("h5dcreate_f", error, total_error)
+
+ ! Write some data to the data set
+ DO i = 1, 100
+ data(i) = INT(i)
+ ENDDO
+
+ f_ptr = C_LOC(data(1))
+ CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, f_ptr, error)
+ CALL check("h5dwrite_f",error, total_error)
+
+ ! Flush the file
+ CALL h5fflush_f(file_id, H5F_SCOPE_GLOBAL_F, error)
+ CALL check("h5fflush_f",error, total_error)
+
+ ! Open the test file using standard I/O calls
+ OPEN(UNIT=10,FILE='tget_file_image.h5', ACCESS='STREAM')
+ ! Get the size of the test file
+ !
+ ! Since we use the eoa to calculate the image size, the file size
+ ! may be larger. This is OK, as long as (in this specialized instance)
+ ! the remainder of the file is all '\0's.
+ !
+ ! With latest mods to truncate call in core file drive,
+ ! file size should match image size; get the file size
+ INQUIRE(UNIT=10, SIZE=file_sz)
+ CLOSE(UNIT=10)
+
+ ! I. Get buffer size needed to hold the buffer
+
+ ! A. Preferred way to get the size
+ f_ptr = C_NULL_PTR
+ CALL h5fget_file_image_f(file_id, f_ptr, INT(0, size_t), error, image_size)
+ CALL check("h5fget_file_image_f",error, total_error)
+ CALL verify("h5fget_file_image_f", file_sz, INT(image_size), total_error)
+
+ ! B. f_ptr set to point to an incorrect buffer, should pass anyway
+ f_ptr = C_LOC(data(1))
+ itmp_a = 1
+ CALL h5fget_file_image_f(file_id, f_ptr, itmp_a, error, image_size)
+ CALL check("h5fget_file_image_f",error, total_error)
+ CALL verify("h5fget_file_image_f", INT(itmp_a), 1, total_error) ! Routine should not change the value
+ CALL verify("h5fget_file_image_f", file_sz, INT(image_size), total_error)
+
+ ! Allocate a buffer of the appropriate size
+ ALLOCATE(image_ptr(1:image_size))
+
+ ! Load the image of the file into the buffer
+ f_ptr = C_LOC(image_ptr(1)(1:1))
+ CALL h5fget_file_image_f(file_id, f_ptr, image_size, error)
+ CALL check("h5fget_file_image_f",error, total_error)
+
+ ! Close dset and space
+ CALL h5dclose_f(dset_id, error)
+ CALL check("h5dclose_f", error, total_error)
+ CALL h5sclose_f(space_id, error)
+ CALL check("h5sclose_f", error, total_error)
+ ! Close the test file
+ CALL h5fclose_f(file_id, error)
+ CALL check("h5fclose_f",error, total_error)
+
+ ! Allocate a buffer for the test file image
+ ALLOCATE(file_image_ptr(1:image_size))
+
+ ! Open the test file using standard I/O calls
+ OPEN(UNIT=10,FILE='tget_file_image.h5', FORM='UNFORMATTED', ACCESS='STREAM')
+
+ ! Read the test file from disk into the buffer
+ DO i = 1, image_size
+ READ(10) file_image_ptr(i)
+ ENDDO
+
+ CLOSE(10)
+
+ ! verify the file and the image contain the same data
+ DO i = 1, image_size
+ ! convert one byte to an unsigned integer
+ IF( ICHAR(file_image_ptr(i)) .NE. ICHAR(image_ptr(i)))THEN
+ total_error = total_error + 1
+ EXIT
+ ENDIF
+ ENDDO
+
+ ! release resources
+ DEALLOCATE(file_image_ptr,image_ptr)
- SUBROUTINE file_space(filename, cleanup, total_error)
- USE HDF5 ! This module contains all necessary modules
- USE TH5_MISC
- IMPLICIT NONE
- CHARACTER(*), INTENT(IN) :: filename
- LOGICAL, INTENT(IN) :: cleanup
- INTEGER, INTENT(INOUT) :: total_error
- INTEGER :: error
- !
- CHARACTER(LEN=3), PARAMETER :: grpname = "grp"
- CHARACTER(LEN=80) :: fix_filename
-
- INTEGER(HID_T) :: fid ! File identifiers
- INTEGER(HSSIZE_T) :: free_space
- INTEGER(HID_T) :: group_id ! Group identifier
-
- CALL h5eset_auto_f(0, error)
-
- CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error)
- if (error .ne. 0) then
- write(*,*) "Cannot modify filename"
- stop
- endif
- CALL h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, fid, error)
- CALL check("h5fcreate_f",error,total_error)
-
- CALL h5fget_freespace_f(fid, free_space, error)
- CALL check("h5fget_freespace_f",error,total_error)
- if(error .eq.0 .and. free_space .ne. 1248) then
- total_error = total_error + 1
- write(*,*) "1: Wrong amount of free space reported, ", free_space
- endif
-
- ! Create group in the file.
- CALL h5gcreate_f(fid, grpname, group_id, error)
- CALL check("h5gcreate_f",error,total_error)
-
- ! Close group
- CALL h5gclose_f(group_id, error)
- CALL check("h5gclose_f", error, total_error)
-
- ! Check the free space now
- CALL h5fget_freespace_f(fid, free_space, error)
- CALL check("h5fget_freespace_f",error,total_error)
- if(error .eq.0 .and. free_space .ne. 216) then
- total_error = total_error + 1
- write(*,*) "2: Wrong amount of free space reported, ", free_space
- endif
-
- !Unlink the group
- CALL h5gunlink_f(fid, grpname, error)
- CALL check("h5gunlink_f", error, total_error)
-
- ! Check the free space now
- CALL h5fget_freespace_f(fid, free_space, error)
- CALL check("h5fget_freespace_f",error,total_error)
- if(error .eq.0 .and. free_space .ne. 1248) then
- total_error = total_error + 1
- write(*,*) "3: Wrong amount of free space reported, ", free_space
- endif
-
- CALL h5fclose_f(fid, error)
- CALL check("h5fclose_f",error,total_error)
-
- if(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error)
- CALL check("h5_cleanup_f", error, total_error)
- RETURN
-
- END SUBROUTINE file_space
+ END SUBROUTINE test_get_file_image
END MODULE TH5F
diff --git a/fortran/test/tH5F_F03.F90 b/fortran/test/tH5F_F03.F90
deleted file mode 100644
index 27bd30e5eba..00000000000
--- a/fortran/test/tH5F_F03.F90
+++ /dev/null
@@ -1,177 +0,0 @@
-!****h* root/fortran/test/tH5F_F03
-!
-! NAME
-! tH5F_F03.F90
-!
-! FUNCTION
-! Test FORTRAN HDF5 H5F APIs which are dependent on FORTRAN 2003
-! features.
-!
-! COPYRIGHT
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://www.hdfgroup.org/licenses. *
-! If you do not have access to either file, you may request a copy from *
-! help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-!
-! NOTES
-! Tests the H5F APIs functionalities of:
-! h5fget_file_image_f
-!
-! CONTAINS SUBROUTINES
-! test_get_file_image
-!
-!*****
-
-! *****************************************
-! *** H 5 F T E S T S
-! *****************************************
-
-MODULE TH5F_F03
-
- USE HDF5
- USE TH5_MISC
- USE TH5_MISC_GEN
- USE ISO_C_BINDING
-
-CONTAINS
-
-SUBROUTINE test_get_file_image(total_error)
- !
- ! Tests the wrapper for h5fget_file_image
- !
- IMPLICIT NONE
-
- INTEGER, INTENT(INOUT) :: total_error ! returns error
-
- CHARACTER(kind=c_char), ALLOCATABLE, DIMENSION(:), TARGET :: file_image_ptr ! Image from file
- CHARACTER(kind=c_char), ALLOCATABLE, DIMENSION(:), TARGET :: image_ptr ! Image from h5fget_file_image_f
-
- INTEGER, DIMENSION(1:100), TARGET :: data ! Write data
- INTEGER :: file_sz
- INTEGER(size_t) :: i
- INTEGER(hid_t) :: file_id = -1 ! File identifier
- INTEGER(hid_t) :: dset_id = -1 ! Dataset identifier
- INTEGER(hid_t) :: space_id = -1 ! Dataspace identifier
- INTEGER(hsize_t), DIMENSION(1:2) :: dims ! Dataset dimensions
- INTEGER(size_t) :: itmp_a ! General purpose integer
- INTEGER(size_t) :: image_size ! Size of image
- TYPE(C_PTR) :: f_ptr ! Pointer
- INTEGER(hid_t) :: fapl ! File access property
- INTEGER :: error ! Error flag
-
- ! Create new properties for file access
- CALL h5pcreate_f(H5P_FILE_ACCESS_F, fapl, error)
- CALL check("h5pcreate_f", error, total_error)
-
- ! Set standard I/O driver
- CALL h5pset_fapl_stdio_f(fapl, error)
- CALL check("h5pset_fapl_stdio_f", error, total_error)
-
- ! Create the file
- CALL h5fcreate_f("tget_file_image.h5", H5F_ACC_TRUNC_F, file_id, error, H5P_DEFAULT_F, fapl)
- CALL check("h5fcreate_f", error, total_error)
-
- ! Set up data space for new data set
- dims(1:2) = (/10,10/)
-
- CALL h5screate_simple_f(2, dims, space_id, error)
- CALL check("h5screate_simple_f", error, total_error)
-
- ! Create a dataset
- CALL h5dcreate_f(file_id, "dset 0", H5T_NATIVE_INTEGER, space_id, dset_id, error)
- CALL check("h5dcreate_f", error, total_error)
-
- ! Write some data to the data set
- DO i = 1, 100
- data(i) = INT(i)
- ENDDO
-
- f_ptr = C_LOC(data(1))
- CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, f_ptr, error)
- CALL check("h5dwrite_f",error, total_error)
-
- ! Flush the file
- CALL h5fflush_f(file_id, H5F_SCOPE_GLOBAL_F, error)
- CALL check("h5fflush_f",error, total_error)
-
- ! Open the test file using standard I/O calls
- OPEN(UNIT=10,FILE='tget_file_image.h5', ACCESS='STREAM')
- ! Get the size of the test file
- !
- ! Since we use the eoa to calculate the image size, the file size
- ! may be larger. This is OK, as long as (in this specialized instance)
- ! the remainder of the file is all '\0's.
- !
- ! With latest mods to truncate call in core file drive,
- ! file size should match image size; get the file size
- INQUIRE(UNIT=10, SIZE=file_sz)
- CLOSE(UNIT=10)
-
- ! I. Get buffer size needed to hold the buffer
-
- ! A. Preferred way to get the size
- f_ptr = C_NULL_PTR
- CALL h5fget_file_image_f(file_id, f_ptr, INT(0, size_t), error, image_size)
- CALL check("h5fget_file_image_f",error, total_error)
- CALL verify("h5fget_file_image_f", file_sz, INT(image_size), total_error)
-
- ! B. f_ptr set to point to an incorrect buffer, should pass anyway
- f_ptr = C_LOC(data(1))
- itmp_a = 1
- CALL h5fget_file_image_f(file_id, f_ptr, itmp_a, error, image_size)
- CALL check("h5fget_file_image_f",error, total_error)
- CALL verify("h5fget_file_image_f", INT(itmp_a), 1, total_error) ! Routine should not change the value
- CALL verify("h5fget_file_image_f", file_sz, INT(image_size), total_error)
-
- ! Allocate a buffer of the appropriate size
- ALLOCATE(image_ptr(1:image_size))
-
- ! Load the image of the file into the buffer
- f_ptr = C_LOC(image_ptr(1)(1:1))
- CALL h5fget_file_image_f(file_id, f_ptr, image_size, error)
- CALL check("h5fget_file_image_f",error, total_error)
-
- ! Close dset and space
- CALL h5dclose_f(dset_id, error)
- CALL check("h5dclose_f", error, total_error)
- CALL h5sclose_f(space_id, error)
- CALL check("h5sclose_f", error, total_error)
- ! Close the test file
- CALL h5fclose_f(file_id, error)
- CALL check("h5fclose_f",error, total_error)
-
- ! Allocate a buffer for the test file image
- ALLOCATE(file_image_ptr(1:image_size))
-
- ! Open the test file using standard I/O calls
- OPEN(UNIT=10,FILE='tget_file_image.h5', FORM='UNFORMATTED', ACCESS='STREAM')
-
- ! Read the test file from disk into the buffer
- DO i = 1, image_size
- READ(10) file_image_ptr(i)
- ENDDO
-
- CLOSE(10)
-
- ! verify the file and the image contain the same data
- DO i = 1, image_size
- ! convert one byte to an unsigned integer
- IF( ICHAR(file_image_ptr(i)) .NE. ICHAR(image_ptr(i)))THEN
- total_error = total_error + 1
- EXIT
- ENDIF
- ENDDO
-
- ! release resources
- DEALLOCATE(file_image_ptr,image_ptr)
-
-END SUBROUTINE test_get_file_image
-
-END MODULE TH5F_F03
diff --git a/fortran/test/tH5L_F03.F90 b/fortran/test/tH5L_F03.F90
index e09ad5e45ac..a8345c3ca58 100644
--- a/fortran/test/tH5L_F03.F90
+++ b/fortran/test/tH5L_F03.F90
@@ -27,11 +27,21 @@
! test_iter_group
!
!*****
+
+MODULE EXTENTS
+
+ IMPLICIT NONE
+
+ INTEGER, PARAMETER :: MAX_CHAR_LEN = 30
+
+END MODULE EXTENTS
+
MODULE liter_cb_mod
USE HDF5
USE TH5_MISC
USE TH5_MISC_GEN
+ USE EXTENTS
USE, INTRINSIC :: ISO_C_BINDING
IMPLICIT NONE
@@ -44,7 +54,7 @@ MODULE liter_cb_mod
! Custom group iteration callback data
TYPE, bind(c) :: iter_info
- CHARACTER(KIND=C_CHAR), DIMENSION(1:10) :: name ! The name of the object
+ CHARACTER(KIND=C_CHAR), DIMENSION(1:MAX_CHAR_LEN) :: name ! The name of the object
INTEGER(c_int) :: TYPE ! The TYPE of the object
INTEGER(c_int) :: command ! The TYPE of RETURN value
END TYPE iter_info
@@ -62,7 +72,7 @@ INTEGER(KIND=C_INT) FUNCTION liter_cb(group, name, link_info, op_data) bind(C)
IMPLICIT NONE
INTEGER(HID_T), VALUE :: group
- CHARACTER(LEN=1), DIMENSION(1:10) :: name
+ CHARACTER(LEN=1), DIMENSION(1:MAX_CHAR_LEN) :: name
TYPE (H5L_info_t) :: link_info
@@ -72,13 +82,23 @@ INTEGER(KIND=C_INT) FUNCTION liter_cb(group, name, link_info, op_data) bind(C)
INTEGER, SAVE :: count
INTEGER, SAVE :: count2
+ INTEGER :: nlen, i
+
liter_cb = 0
!!$ iter_info *info = (iter_info *)op_data;
!!$ static int count = 0;
!!$ static int count2 = 0;
-
- op_data%name(1:10) = name(1:10)
+ nlen = 0
+ DO i = 1, MAX_CHAR_LEN
+ IF( name(i) .EQ. CHAR(0) )THEN
+ nlen = i - 1
+ EXIT
+ ENDIF
+ ENDDO
+ IF(nlen.NE.0)THEN
+ op_data%name(1:nlen) = name(1:nlen)
+ ENDIF
SELECT CASE (op_data%command)
@@ -105,6 +125,63 @@ INTEGER(KIND=C_INT) FUNCTION liter_cb(group, name, link_info, op_data) bind(C)
END FUNCTION liter_cb
END MODULE liter_cb_mod
+MODULE lvisit_cb_mod
+
+ USE HDF5
+ USE TH5_MISC
+ USE TH5_MISC_GEN
+ USE EXTENTS
+ USE, INTRINSIC :: ISO_C_BINDING
+ IMPLICIT NONE
+
+ ! Custom group iteration callback data
+ TYPE, bind(c) :: visit_info
+ CHARACTER(KIND=C_CHAR), DIMENSION(1:11*MAX_CHAR_LEN) :: name ! The name of the object
+ INTEGER(c_int) :: TYPE ! The TYPE of the object
+ INTEGER(c_int) :: command ! The TYPE of RETURN value
+ INTEGER(c_int) :: n_obj ! The TYPE of RETURN value
+ END TYPE visit_info
+
+CONTAINS
+
+!***************************************************************
+!**
+!** lvisit_cb(): Custom link visit callback routine.
+!**
+!***************************************************************
+
+ INTEGER(KIND=C_INT) FUNCTION lvisit_cb(group, name, link_info, op_data) bind(C)
+
+ IMPLICIT NONE
+
+ INTEGER(HID_T), VALUE :: group
+ CHARACTER(LEN=1), DIMENSION(1:MAX_CHAR_LEN) :: name
+
+ TYPE(H5L_info_t) :: link_info
+ TYPE(visit_info) :: op_data
+
+ INTEGER :: nlen, i, istart, iend
+
+ op_data%n_obj = op_data%n_obj + 1
+
+ nlen = 1
+ DO i = 1, MAX_CHAR_LEN
+ IF( name(i) .EQ. CHAR(0) )THEN
+ nlen = i - 1
+ EXIT
+ ENDIF
+ ENDDO
+ IF(nlen.NE.0)THEN
+ istart = (op_data%n_obj-1)*MAX_CHAR_LEN + 1
+ iend = istart + MAX_CHAR_LEN - 1
+ op_data%name(istart:istart+nlen-1) = name(1:nlen)
+ ENDIF
+
+ lvisit_cb = 0
+
+ END FUNCTION lvisit_cb
+END MODULE lvisit_cb_mod
+
MODULE TH5L_F03
CONTAINS
@@ -119,18 +196,20 @@ MODULE TH5L_F03
!** test_iter_group(): Test group iteration functionality
!**
!***************************************************************
-SUBROUTINE test_iter_group(total_error)
+SUBROUTINE test_iter_group(cleanup, total_error)
USE liter_cb_mod
IMPLICIT NONE
+ LOGICAL, INTENT(IN) :: cleanup
INTEGER, INTENT(INOUT) :: total_error
+
INTEGER(HID_T) :: fapl
INTEGER(HID_T) :: file ! File ID
- INTEGER(hid_t) :: dataset ! Dataset ID
- INTEGER(hid_t) :: datatype ! Common datatype ID
- INTEGER(hid_t) :: filespace ! Common dataspace ID
- INTEGER(hid_t) :: grp ! Group ID
+ INTEGER(HID_T) :: dataset ! Dataset ID
+ INTEGER(HID_T) :: datatype ! Common datatype ID
+ INTEGER(HID_T) :: filespace ! Common dataspace ID
+ INTEGER(HID_T) :: grp ! Group ID
INTEGER i,j ! counting variable
INTEGER(hsize_t) idx ! Index in the group
CHARACTER(LEN=11) :: DATAFILE = "titerate.h5"
@@ -165,7 +244,6 @@ SUBROUTINE test_iter_group(total_error)
f1 = C_FUNLOC(liter_cb)
f2 = C_LOC(info)
-
CALL H5Literate_f(file, H5_INDEX_NAME_F, H5_ITER_INC_F, idx, f1, f2, ret_value, error)
CALL check("H5Literate_f", error, total_error)
@@ -198,7 +276,7 @@ SUBROUTINE test_iter_group(total_error)
lnames(ndatasets+2) = "grp0000000"
!!$
-!!$ lnames[NDATASETS] = HDstrdup("grp");
+!!$ lnames[NDATASETS] = strdup("grp");
!!$ CHECK(lnames[NDATASETS], NULL, "strdup");
!!$
@@ -311,6 +389,195 @@ SUBROUTINE test_iter_group(total_error)
CALL H5Fclose_f(file, error)
CALL check("H5Fclose_f", error, total_error)
+ IF(cleanup) CALL h5_cleanup_f("titerate", H5P_DEFAULT_F, error)
+ CALL check("h5_cleanup_f", error, total_error)
+
END SUBROUTINE test_iter_group
+!***************************************************************
+!**
+!** Test HL visit functionality
+!**
+!***************************************************************
+SUBROUTINE test_visit(cleanup, total_error)
+
+ USE lvisit_cb_mod
+ IMPLICIT NONE
+
+ LOGICAL, INTENT(IN) :: cleanup
+ INTEGER, INTENT(INOUT) :: total_error
+ INTEGER(HID_T) :: fapl
+ INTEGER(HID_T) :: fid
+ INTEGER(HID_T) :: gid, gid2 ! Group IDs
+ INTEGER(HID_T) :: sid ! Dataspace ID
+ INTEGER(HID_T) :: did ! Dataset ID
+ CHARACTER(LEN=11) :: DATAFILE = "tvisit.h5"
+
+ TYPE(C_FUNPTR) :: f1
+ TYPE(C_PTR) :: f2
+ TYPE(visit_info), TARGET :: udata
+
+ CHARACTER(LEN=MAX_CHAR_LEN), DIMENSION(1:11) :: obj_list
+ CHARACTER(LEN=MAX_CHAR_LEN) :: tmp
+ INTEGER :: error
+ INTEGER :: istart, iend, i, j
+ INTEGER :: ret_val
+
+ obj_list(1) = "Dataset_zero"
+ obj_list(2) = "Group1"
+ obj_list(3) = "Group1/Dataset_one"
+ obj_list(4) = "Group1/Group2"
+ obj_list(5) = "Group1/Group2/Dataset_two"
+ obj_list(6) = "hard_one"
+ obj_list(7) = "hard_two"
+ obj_list(8) = "hard_zero"
+ obj_list(9) = "soft_dangle"
+ obj_list(10) = "soft_one"
+ obj_list(11) = "soft_two"
+
+ fid = H5I_INVALID_HID_F
+ gid = H5I_INVALID_HID_F
+ gid2 = H5I_INVALID_HID_F
+ sid = H5I_INVALID_HID_F
+ did = H5I_INVALID_HID_F
+
+ ! Get the default FAPL
+ CALL H5Pcreate_f(H5P_FILE_ACCESS_F, fapl, error)
+ CALL check("h5pcreate_f", error, total_error)
+
+ ! Set the "use the latest version of the format" bounds for creating objects in the file
+ CALL H5Pset_libver_bounds_f(fapl, H5F_LIBVER_LATEST_F, H5F_LIBVER_LATEST_F, error)
+ CALL check("H5Pset_libver_bounds_f",error, total_error)
+
+ ! Create the test file with the datasets
+ CALL h5fcreate_f(DATAFILE, H5F_ACC_TRUNC_F, fid, error, H5P_DEFAULT_F, fapl)
+ CALL check("h5fcreate_f", error, total_error)
+
+ ! Create group
+ CALL h5gcreate_f(fid, "/Group1", gid, error)
+ CALL check("h5gcreate_f", error, total_error)
+
+ ! Create nested group
+ CALL h5gcreate_f(gid, "Group2", gid2, error)
+ CALL check("h5gcreate_f", error, total_error)
+
+ ! Close groups
+ CALL h5gclose_f(gid2, error)
+ CALL check("h5gclose_f", error, total_error)
+ CALL h5gclose_f(gid, error)
+ CALL check("h5gclose_f", error, total_error)
+
+ ! Create soft links to groups created
+ CALL h5lcreate_soft_f("/Group1", fid, "/soft_one", error)
+ CALL check("h5lcreate_soft_f", error, total_error)
+
+ CALL h5lcreate_soft_f("/Group1/Group2", fid, "/soft_two", error)
+ CALL check("h5lcreate_soft_f", error, total_error)
+
+ ! Create dangling soft link
+ CALL h5lcreate_soft_f("nowhere", fid, "/soft_dangle", error)
+ CALL check("h5lcreate_soft_f", error, total_error)
+
+ ! Create hard links to all groups
+ CALL h5lcreate_hard_f(fid, "/", fid, "hard_zero", error)
+ CALL check("h5lcreate_hard_f1", error, total_error)
+
+ CALL h5lcreate_hard_f(fid, "/Group1", fid, "hard_one", error)
+ CALL check("h5lcreate_hard_f2", error, total_error)
+ CALL h5lcreate_hard_f(fid, "/Group1/Group2", fid, "hard_two", error)
+ CALL check("h5lcreate_hard_f3", error, total_error)
+
+ ! Create dataset in each group
+ CALL h5screate_f(H5S_SCALAR_F, sid, error)
+ CALL check("h5screate_f", error, total_error)
+
+ CALL h5dcreate_f(fid, "/Dataset_zero", H5T_NATIVE_INTEGER, sid, did, error)
+ CALL check("h5dcreate_f", error, total_error)
+ CALL h5dclose_f(did, error)
+ CALL check("h5dclose_f", error, total_error)
+
+ CALL h5dcreate_f(fid, "/Group1/Dataset_one", H5T_NATIVE_INTEGER, sid, did, error)
+ CALL check("h5dcreate_f", error, total_error)
+ CALL h5dclose_f(did, error)
+ CALL check("h5dclose_f", error, total_error)
+
+ CALL h5dcreate_f(fid, "/Group1/Group2/Dataset_two", H5T_NATIVE_INTEGER, sid, did, error)
+ CALL check("h5dcreate_f3", error, total_error)
+ CALL h5dclose_f(did, error)
+ CALL check("h5dclose_f", error, total_error)
+
+ CALL h5sclose_f(sid, error)
+ CALL check("h5sclose_f", error, total_error)
+
+ ! Test visit functions
+
+ f1 = C_FUNLOC(lvisit_cb)
+ f2 = C_LOC(udata)
+
+ udata%n_obj = 0
+ udata%name(:) = " "
+ CALL h5lvisit_f(fid, H5_INDEX_NAME_F, H5_ITER_INC_F, f1, f2, ret_val, error)
+ CALL check("h5lvisit_f", error, total_error)
+ IF(ret_val.LT.0)THEN
+ CALL check("h5lvisit_f", -1, total_error)
+ ENDIF
+
+ IF(udata%n_obj.NE.11)THEN
+ CALL check("h5lvisit_f: Wrong number of objects visited", -1, total_error)
+ ENDIF
+
+ DO i = 1, udata%n_obj
+ istart = (i-1)*MAX_CHAR_LEN + 1
+ iend = istart + MAX_CHAR_LEN - 1
+ tmp = " "
+ DO j = 1, MAX_CHAR_LEN
+ IF(udata%name(istart+j-1) .NE. " ")THEN
+ tmp(j:j) = udata%name(istart+j-1)
+ ELSE
+ EXIT
+ ENDIF
+ ENDDO
+ IF( TRIM(tmp) .NE. TRIM(obj_list(i)) )THEN
+ CALL check("h5lvisit_f: Wrong object list from visit", -1, total_error)
+ EXIT
+ ENDIF
+ ENDDO
+
+ udata%n_obj = 0
+ udata%name(:) = " "
+ CALL h5lvisit_by_name_f(fid, "/", H5_INDEX_NAME_F, H5_ITER_INC_F, f1, f2, ret_val, error)
+ CALL check("h5lvisit_by_name_f", error, total_error)
+ IF(ret_val.LT.0)THEN
+ CALL check("h5ovisit_f", -1, total_error)
+ ENDIF
+
+ IF(udata%n_obj.NE.11)THEN
+ CALL check("h5lvisit_by_name_f: Wrong number of objects visited", -1, total_error)
+ ENDIF
+
+ DO i = 1, udata%n_obj
+ istart = (i-1)*MAX_CHAR_LEN + 1
+ iend = istart + MAX_CHAR_LEN - 1
+ tmp = " "
+ DO j = 1, MAX_CHAR_LEN
+ IF(udata%name(istart+j-1) .NE. " ")THEN
+ tmp(j:j) = udata%name(istart+j-1)
+ ELSE
+ EXIT
+ ENDIF
+ ENDDO
+ IF( TRIM(tmp) .NE. TRIM(obj_list(i)) )THEN
+ CALL check("h5lvisit_by_name_f: Wrong object list from visit", -1, total_error)
+ EXIT
+ ENDIF
+ ENDDO
+
+ CALL h5fclose_f(fid, error)
+ CALL check("h5fclose_f", error, total_error)
+
+ IF(cleanup) CALL h5_cleanup_f("tvisit", H5P_DEFAULT_F, error)
+ CALL check("h5_cleanup_f", error, total_error)
+
+END SUBROUTINE test_visit
+
END MODULE TH5L_F03
diff --git a/fortran/test/tH5MISC_1_8.F90 b/fortran/test/tH5MISC_1_8.F90
index 85f9634a94c..bd3ce3f9da9 100644
--- a/fortran/test/tH5MISC_1_8.F90
+++ b/fortran/test/tH5MISC_1_8.F90
@@ -476,4 +476,68 @@ SUBROUTINE test_scaleoffset(cleanup, total_error )
END SUBROUTINE test_scaleoffset
+SUBROUTINE test_freelist(total_error)
+
+ IMPLICIT NONE
+ INTEGER, INTENT(INOUT) :: total_error
+
+ INTEGER(hid_t) :: sid
+ INTEGER(hsize_t), DIMENSION(1:1) :: dims = (/8/)
+ INTEGER(hsize_t), DIMENSION(1:1,1:4) :: coord
+ INTEGER(size_t) :: reg_size_start ! Initial amount of regular memory allocated
+ INTEGER(size_t) :: arr_size_start ! Initial amount of array memory allocated
+ INTEGER(size_t) :: blk_size_start ! Initial amount of block memory allocated
+ INTEGER(size_t) :: fac_size_start ! Initial amount of factory memory allocated
+ INTEGER(size_t) :: reg_size_final ! Final amount of regular memory allocated
+ INTEGER(size_t) :: arr_size_final ! Final amount of array memory allocated
+ INTEGER(size_t) :: blk_size_final ! Final amount of BLOCK memory allocated
+ INTEGER(size_t) :: fac_size_final ! Final amount of factory memory allocated
+ INTEGER :: error
+
+ coord(1,1:4) = (/3,4,5,6/)
+
+ ! Create dataspace
+ ! (Allocates array free-list nodes)
+ CALL h5screate_simple_f(1, dims, sid, error)
+ CALL CHECK("h5screate_simple_f", error, total_error)
+
+ ! Select sequence of 4 points
+ CALL h5sselect_elements_f(sid, H5S_SELECT_SET_F, 1, 4_size_t, coord, error)
+ CALL CHECK("h5sselect_elements_f", error, total_error)
+
+ ! Close dataspace
+ CALL h5sclose_f(sid, error)
+ CALL CHECK("h5sclose_f", error, total_error)
+
+ ! Retrieve initial free list values
+ CALL h5get_free_list_sizes_f(reg_size_start, arr_size_start, blk_size_start, fac_size_start, error)
+ CALL check("h5get_free_list_sizes_f", error, total_error)
+
+ IF(reg_size_start.LT.0 .OR. &
+ arr_size_start.LT.0 .OR. &
+ blk_size_start.LT.0 .OR. &
+ fac_size_start.LT.0 &
+ )THEN
+ CALL check("h5get_free_list_sizes_f", -1, total_error)
+ ENDIF
+
+ CALL h5garbage_collect_f(error)
+ CALL check("h5garbage_collect_f", error, total_error)
+
+ ! Retrieve initial free list values
+ CALL h5get_free_list_sizes_f(reg_size_final, arr_size_final, blk_size_final, fac_size_final, error)
+ CALL check("h5get_free_list_sizes_f", error, total_error)
+
+ ! All the free list values should be <= previous values
+ IF( reg_size_final .GT. reg_size_start) &
+ CALL check("h5get_free_list_sizes_f: reg_size_final > reg_size_start", -1, total_error)
+ IF( arr_size_final .GT. arr_size_start) &
+ CALL check("h5get_free_list_sizes_f: arr_size_final > arr_size_start", -1, total_error)
+ IF( blk_size_final .GT. blk_size_start) &
+ CALL check("h5get_free_list_sizes_f: blk_size_final > blk_size_start", -1, total_error)
+ IF( fac_size_final .GT. fac_size_start) &
+ CALL check("h5get_free_list_sizes_f: fac_size_final > fac_size_start", -1, total_error)
+
+END SUBROUTINE test_freelist
+
END MODULE TH5MISC_1_8
diff --git a/fortran/test/tH5P_F03.F90 b/fortran/test/tH5P_F03.F90
index 606a9cd578a..4f390d5fb76 100644
--- a/fortran/test/tH5P_F03.F90
+++ b/fortran/test/tH5P_F03.F90
@@ -155,8 +155,6 @@ SUBROUTINE test_create(total_error)
fill_ctype%a = 5555.
fill_ctype%x = 55
- f_ptr = C_LOC(fill_ctype)
-
! Test various fill values
CALL H5Pset_fill_value_f(dcpl, H5T_NATIVE_CHARACTER, 'X', error)
CALL check("H5Pset_fill_value_f",error, total_error)
diff --git a/fortran/test/tH5Sselect.F90 b/fortran/test/tH5Sselect.F90
index bf1658cd5b9..6dfd7e69f06 100644
--- a/fortran/test/tH5Sselect.F90
+++ b/fortran/test/tH5Sselect.F90
@@ -126,7 +126,6 @@ SUBROUTINE test_select_hyperslab(cleanup, total_error)
INTEGER :: error
INTEGER(HSIZE_T), DIMENSION(3) :: data_dims
-
!
!This writes data to the HDF5 file.
!
@@ -807,6 +806,12 @@ SUBROUTINE test_basic_select(cleanup, total_error)
INTEGER :: error
INTEGER(HSIZE_T), DIMENSION(3) :: data_dims
+ LOGICAL :: same, intersects
+ INTEGER(HID_T) :: scalar_all_sid
+
+ INTEGER(hsize_t), DIMENSION(1:2) :: block_start = (/0, 0/) ! Start offset for BLOCK
+ INTEGER(hsize_t), DIMENSION(1:2) :: block_end = (/2, 3/) ! END offset for BLOCK
+
!
!initialize the coord array to give the selected points' position
!
@@ -848,6 +853,22 @@ SUBROUTINE test_basic_select(cleanup, total_error)
CALL h5screate_simple_f(RANK, dimsf, dataspace, error)
CALL check("h5screate_simple_f", error, total_error)
+ ! Check shape same API
+ CALL h5sselect_shape_same_f(dataspace, dataspace, same, error)
+ CALL check("h5sselect_shape_same_f", error, total_error)
+ CALL VERIFY("h5sselect_shape_same_f", same, .TRUE., total_error)
+
+ CALL h5screate_f(H5S_SCALAR_F, scalar_all_sid, error)
+ CALL check("h5screate_f", error, total_error)
+
+ same = .TRUE.
+ CALL h5sselect_shape_same_f(dataspace, scalar_all_sid, same, error)
+ CALL check("h5sselect_shape_same_f", error, total_error)
+ CALL VERIFY("h5sselect_shape_same_f", same, .FALSE., total_error)
+
+ CALL h5sclose_f(scalar_all_sid,error)
+ CALL check("h5sclose_f", error, total_error)
+
!
! Create the dataset with default properties
!
@@ -863,6 +884,33 @@ SUBROUTINE test_basic_select(cleanup, total_error)
CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, data_dims, error)
CALL check("h5dwrite_f", error, total_error)
+ ! Set selection to 'all'
+ CALL h5sselect_all_f(dataspace, error)
+ CALL check("h5sselect_all_f", error, total_error)
+
+ ! Test block intersection with 'all' selection (always true)
+ CALL h5sselect_intersect_block_f(dataspace, block_start, block_end, intersects, error)
+ CALL check("h5sselect_intersect_block_f", error, total_error)
+ CALL verify("h5sselect_intersect_block_f", intersects, .TRUE., total_error)
+
+ ! Select 2x2 region of the dataset
+ CALL h5sselect_hyperslab_f(dataspace, H5S_SELECT_SET_F, offset, count, error)
+ CALL check("h5sselect_hyperslab_f", error, total_error)
+
+ ! Check an intersecting region
+ block_start(1:2) = (/1,0/)
+ block_end(1:2) = (/2,2/)
+ CALL h5sselect_intersect_block_f(dataspace, block_start, block_end, intersects, error)
+ CALL check("h5sselect_intersect_block_f", error, total_error)
+ CALL verify("h5sselect_intersect_block_f", intersects, .TRUE., total_error)
+
+ ! Check a non-intersecting region
+ block_start(1:2) = (/2,1/)
+ block_end(1:2) = (/4,5/)
+ CALL h5sselect_intersect_block_f(dataspace, block_start, block_end, intersects, error)
+ CALL check("h5sselect_intersect_block_f", error, total_error)
+ CALL verify("h5sselect_intersect_block_f2", intersects, .FALSE., total_error)
+
!
!Close the dataspace for the dataset.
!
@@ -998,6 +1046,9 @@ SUBROUTINE test_basic_select(cleanup, total_error)
!
DEALLOCATE(pointlist)
+
+
+
!
!Close the dataspace for the dataset.
!
diff --git a/fortran/test/tHDF5_F03.F90 b/fortran/test/tHDF5_F03.F90
index dc4da313d03..1ef762609ec 100644
--- a/fortran/test/tHDF5_F03.F90
+++ b/fortran/test/tHDF5_F03.F90
@@ -28,7 +28,6 @@
MODULE THDF5_F03
USE TH5_MISC
USE TH5E_F03
- USE TH5F_F03
USE TH5L_F03
USE TH5O_F03
USE TH5P_F03
diff --git a/fortran/testpar/hyper.F90 b/fortran/testpar/hyper.F90
index 8051b38c246..edd93cf9b8f 100644
--- a/fortran/testpar/hyper.F90
+++ b/fortran/testpar/hyper.F90
@@ -51,6 +51,11 @@ SUBROUTINE hyper(length,do_collective,do_chunk, mpi_size, mpi_rank, nerrors)
INTEGER :: actual_io_mode ! The type of I/O performed by this process
LOGICAL :: is_coll
LOGICAL :: is_coll_true = .TRUE.
+
+ INTEGER :: local_no_collective_cause
+ INTEGER :: global_no_collective_cause
+ INTEGER :: no_selection_io_cause
+
!
! initialize the array data between the processes (3)
! for the 12 size array we get
@@ -231,28 +236,57 @@ SUBROUTINE hyper(length,do_collective,do_chunk, mpi_size, mpi_rank, nerrors)
CALL h5dwrite_f(dset_id,H5T_NATIVE_INTEGER,wbuf,dims,hdferror,file_space_id=fspace_id,mem_space_id=mspace_id,xfer_prp=dxpl_id)
CALL check("h5dwrite_f", hdferror, nerrors)
-
! Check h5pget_mpio_actual_io_mode_f function
CALL h5pget_mpio_actual_io_mode_f(dxpl_id, actual_io_mode, hdferror)
CALL check("h5pget_mpio_actual_io_mode_f", hdferror, nerrors)
-! MSB -- TODO FIX: skipping for now since multi-dataset
-! has no specific path for contiguous collective
-!
-! IF(do_collective.AND.do_chunk)THEN
-! IF(actual_io_mode.NE.H5D_MPIO_CHUNK_COLLECTIVE_F)THEN
-! CALL check("h5pget_mpio_actual_io_mode_f", -1, nerrors)
-! ENDIF
-! ELSEIF(.NOT.do_collective)THEN
-! IF(actual_io_mode.NE.H5D_MPIO_NO_COLLECTIVE_F)THEN
-! CALL check("h5pget_mpio_actual_io_mode_f", -1, nerrors)
-! ENDIF
-! ELSEIF( do_collective.AND.(.NOT.do_chunk))THEN
-! IF(actual_io_mode.NE.H5D_MPIO_CONTIG_COLLECTIVE_F)THEN
-! CALL check("h5pget_mpio_actual_io_mode_f", -1, nerrors)
-! ENDIF
-! ENDIF
-! MSB
+ CALL h5pget_mpio_no_collective_cause_f(dxpl_id, local_no_collective_cause, global_no_collective_cause, hdferror)
+ CALL check("h5pget_mpio_no_collective_cause_f", hdferror, nerrors)
+
+ IF(do_collective) THEN
+ IF(local_no_collective_cause .NE. H5D_MPIO_COLLECTIVE_F) &
+ CALL check("h5pget_mpio_no_collective_cause_f", -1, nerrors)
+ IF(global_no_collective_cause .NE. H5D_MPIO_COLLECTIVE_F) &
+ CALL check("h5pget_mpio_no_collective_cause_f", -1, nerrors)
+ ELSE
+ IF(local_no_collective_cause .NE. H5D_MPIO_SET_INDEPENDENT_F) &
+ CALL check("h5pget_mpio_no_collective_cause_f", -1, nerrors)
+ IF(global_no_collective_cause .NE. H5D_MPIO_SET_INDEPENDENT_F) &
+ CALL check("h5pget_mpio_no_collective_cause_f", -1, nerrors)
+ ENDIF
+
+ IF(do_collective.AND.do_chunk)THEN
+ IF(actual_io_mode.NE.H5D_MPIO_CHUNK_COLLECTIVE_F)THEN
+ CALL check("h5pget_mpio_actual_io_mode_f", -1, nerrors)
+ ENDIF
+ ELSEIF(.NOT.do_collective)THEN
+ IF(actual_io_mode.NE.H5D_MPIO_NO_COLLECTIVE_F)THEN
+ CALL check("h5pget_mpio_actual_io_mode_f", -1, nerrors)
+ ENDIF
+ ELSEIF( do_collective.AND.(.NOT.do_chunk))THEN
+ IF(actual_io_mode.NE.H5D_MPIO_CONTIG_COLLECTIVE_F)THEN
+ CALL check("h5pget_mpio_actual_io_mode_f", -1, nerrors)
+ ENDIF
+ ENDIF
+
+ CALL h5pset_selection_io_f(dxpl_id, H5D_SELECTION_IO_MODE_OFF_F, hdferror)
+ CALL check("h5pset_selection_io_f", hdferror, nerrors)
+
+ CALL h5dwrite_f(dset_id,H5T_NATIVE_INTEGER,wbuf,dims,hdferror,file_space_id=fspace_id,mem_space_id=mspace_id,xfer_prp=dxpl_id)
+ CALL check("h5dwrite_f", hdferror, nerrors)
+
+ ! Verify bitwise operations are correct
+
+ IF( IOR(H5D_MPIO_DATATYPE_CONVERSION_F,H5D_MPIO_DATA_TRANSFORMS_F).NE.6)THEN
+ PRINT*, "Incorrect bitwise operations for Fortran defined constants"
+ nerrors = nerrors + 1
+ ENDIF
+
+ CALL h5pget_no_selection_io_cause_f(dxpl_id, no_selection_io_cause, hdferror)
+ CALL check("h5pget_no_selection_io_cause_f", hdferror, nerrors)
+
+ IF(no_selection_io_cause .NE. H5D_SEL_IO_DISABLE_BY_API_F) &
+ CALL check("h5pget_no_selection_io_cause_f", -1, nerrors)
!
! close HDF5 I/O
diff --git a/hl/c++/test/ptableTest.cpp b/hl/c++/test/ptableTest.cpp
index a77a8e10102..efb97a6546a 100644
--- a/hl/c++/test/ptableTest.cpp
+++ b/hl/c++/test/ptableTest.cpp
@@ -303,7 +303,7 @@ TestCompress()
char filter_name[8];
dcpl.getFilterById(H5Z_FILTER_DEFLATE, flags, cd_nelemts, NULL, 8, filter_name, config);
- if (HDstrncmp(filter_name, "deflate", 7) != 0)
+ if (strncmp(filter_name, "deflate", 7) != 0)
H5_FAILED();
}
catch (Exception const &) {
@@ -313,7 +313,7 @@ TestCompress()
PASSED();
#else
SKIPPED();
- HDputs(" deflate filter not enabled");
+ puts(" deflate filter not enabled");
#endif /* H5_HAVE_FILTER_DEFLATE */
return 0;
}
@@ -621,7 +621,7 @@ TestHDFFV_9758()
s1[i].a = static_cast(i);
s1[i].b = 1.0F * static_cast(i * i);
s1[i].c = 1.0 / static_cast(i + 1);
- HDsnprintf(s1[i].d, STRING_LENGTH, "string%" PRIuHSIZE "", i);
+ snprintf(s1[i].d, STRING_LENGTH, "string%" PRIuHSIZE "", i);
s1[i].e = static_cast(100 + i);
}
@@ -692,7 +692,7 @@ TestHDFFV_9758()
if (s2.a != s1[i].a || s2.e != s1[i].e)
goto error;
- else if (HDstrcmp(s2.d, s1[i].d) != 0)
+ else if (strcmp(s2.d, s1[i].d) != 0)
goto error;
}
} // end of ptable block
diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt
index 0aa0f151203..d9f0af2a766 100644
--- a/hl/fortran/src/CMakeLists.txt
+++ b/hl/fortran/src/CMakeLists.txt
@@ -111,6 +111,7 @@ set (HDF5_HL_F90_F_BASE_SOURCES
${HDF5_HL_F90_SRC_SOURCE_DIR}/H5TBff.F90
${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTff.F90
${HDF5_HL_F90_SRC_SOURCE_DIR}/H5IMff.F90
+ ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5DOff.F90
)
if (BUILD_STATIC_LIBS)
@@ -242,6 +243,7 @@ set (mod_export_files
h5lt.mod
h5lt_const.mod
h5im.mod
+ h5do.mod
)
if (BUILD_STATIC_LIBS)
diff --git a/hl/fortran/src/H5DOff.F90 b/hl/fortran/src/H5DOff.F90
new file mode 100644
index 00000000000..df4157cbaba
--- /dev/null
+++ b/hl/fortran/src/H5DOff.F90
@@ -0,0 +1,91 @@
+!> @defgroup FH5DO Fortran High Level Optimized Interface
+!!
+!! @see H5DO, C-HL API
+!!
+!! @see @ref H5DO_UG, User Guide
+!!
+
+!> @ingroup FH5DO
+!!
+!! @brief This module contains Fortran interfaces for H5DO
+!
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! _____ __ __ _____ ____ _____ _______ _ _ _______
+! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __|
+! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | ****
+! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | ****
+! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | ****
+! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_|
+!
+! If you add a new function here then you MUST add the function name to the
+! Windows dll file 'hdf5_hl_fortrandll.def.in' in the hl/fortran/src directory.
+! This is needed for Windows based operating systems.
+!
+
+MODULE H5DO
+
+ USE h5fortran_types
+ USE hdf5
+ IMPLICIT NONE
+
+CONTAINS
+
+!>
+!! \ingroup FH5DO
+!!
+!! \brief Appends data to a dataset along a specified dimension.
+!!
+!! \param dset_id Dataset identifier
+!! \param dxpl_id Dataset transfer property list identifier
+!! \param axis Dataset Dimension (0-based) for the append
+!! \param extension Number of elements to append for the axis-th dimension
+!! \param memtype The memory datatype identifier
+!! \param buf Buffer with data for the append
+!! \param errcode \fortran_error
+!!
+!! See C API: @ref H5DOappend()
+!!
+ SUBROUTINE H5DOappend_f (dset_id, dxpl_id, axis, extension, memtype, buf, errcode)
+
+ IMPLICIT NONE
+
+ INTEGER(hid_t) , INTENT(IN) :: dset_id
+ INTEGER(hid_t) , INTENT(IN) :: dxpl_id
+ INTEGER , INTENT(IN) :: axis
+ INTEGER(SIZE_T), INTENT(IN) :: extension
+ INTEGER(hid_t) , INTENT(IN) :: memtype
+ TYPE(C_PTR) :: buf
+ INTEGER , INTENT(OUT) :: errcode
+
+ INTERFACE
+ INTEGER(C_INT) FUNCTION H5DOappend(dset_id, dxpl_id, axis, extension, memtype, buf) &
+ BIND(C,NAME='H5DOappend')
+
+ IMPORT :: C_INT, C_PTR
+ IMPORT :: HID_T, SIZE_T
+ IMPLICIT NONE
+
+ INTEGER(hid_t) , VALUE :: dset_id
+ INTEGER(hid_t) , VALUE :: dxpl_id
+ INTEGER(C_INT) , VALUE :: axis
+ INTEGER(SIZE_T), VALUE :: extension
+ INTEGER(hid_t) , VALUE :: memtype
+ TYPE(C_PTR) , VALUE :: buf
+ END FUNCTION H5DOappend
+ END INTERFACE
+
+ errcode = INT(H5DOappend(dset_id, dxpl_id, INT(axis,C_INT), extension, memtype, buf))
+
+ END SUBROUTINE H5DOappend_f
+
+END MODULE H5DO
diff --git a/hl/fortran/src/Makefile.am b/hl/fortran/src/Makefile.am
index 8fe618d6d31..5834c9932d7 100644
--- a/hl/fortran/src/Makefile.am
+++ b/hl/fortran/src/Makefile.am
@@ -44,7 +44,7 @@ endif
# List sources to include in the HDF5 HL Fortran library.
libhdf5hl_fortran_la_SOURCES=H5DSfc.c H5LTfc.c H5IMfc.c H5IMcc.c H5TBfc.c \
- H5DSff.F90 H5LTff.F90 H5TBff.F90 H5IMff.F90 H5LTff_gen.F90 H5TBff_gen.F90
+ H5DSff.F90 H5LTff.F90 H5TBff.F90 H5IMff.F90 H5DOff.F90 H5LTff_gen.F90 H5TBff_gen.F90
# HDF5 HL Fortran library depends on HDF5 Library.
libhdf5hl_fortran_la_LIBADD=$(LIBH5_HL) $(LIBH5F)
@@ -111,6 +111,7 @@ H5DSff.lo: $(srcdir)/H5DSff.F90
H5LTff.lo: $(srcdir)/H5LTff.F90
H5IMff.lo: $(srcdir)/H5IMff.F90
H5TBff.lo: $(srcdir)/H5TBff.F90
+H5DOff.lo: $(srcdir)/H5DOff.F90
H5LTff_gen.lo: H5LTff.lo H5LTff_gen.F90
H5TBff_gen.lo: H5TBff.lo H5LTff_gen.F90 H5TBff_gen.F90
include $(top_srcdir)/config/conclude_fc.am
diff --git a/hl/fortran/src/hdf5_hl_fortrandll.def.in b/hl/fortran/src/hdf5_hl_fortrandll.def.in
index b48cae37de2..5f6d0b31055 100644
--- a/hl/fortran/src/hdf5_hl_fortrandll.def.in
+++ b/hl/fortran/src/hdf5_hl_fortrandll.def.in
@@ -88,3 +88,5 @@ H5TB_CONST_mp_H5TBINSERT_FIELD_F_STRING
H5TB_CONST_mp_H5TBDELETE_FIELD_F
H5TB_CONST_mp_H5TBGET_TABLE_INFO_F
H5TB_CONST_mp_H5TBGET_FIELD_INFO_F
+; H5DO
+H5DO_mp_H5DOAPPEND_F
diff --git a/hl/src/H5LD.c b/hl/src/H5LD.c
index e618a66a6e6..6f140d01bc7 100644
--- a/hl/src/H5LD.c
+++ b/hl/src/H5LD.c
@@ -344,7 +344,7 @@ H5LD_get_dset_type_size(hid_t did, const char *fields)
goto done;
/* Get a copy of "fields" */
- if (NULL == (dup_fields = HDstrdup(fields)))
+ if (NULL == (dup_fields = strdup(fields)))
goto done;
/* Allocate memory for a list of H5LD_memb_t pointers to store "fields" info */
@@ -499,7 +499,7 @@ H5LD_get_dset_elmts(hid_t did, const hsize_t *prev_dims, const hsize_t *cur_dims
goto done;
/* Make a copy of "fields" */
- if (NULL == (dup_fields = HDstrdup(fields)))
+ if (NULL == (dup_fields = strdup(fields)))
goto done;
/* Allocate memory for the vector of H5LD_memb_t pointers */
diff --git a/hl/src/H5LT.c b/hl/src/H5LT.c
index d48f2400810..6bd13376bf6 100644
--- a/hl/src/H5LT.c
+++ b/hl/src/H5LT.c
@@ -1839,7 +1839,7 @@ H5LTtext_to_dtype(const char *text, H5LT_lang_t lang_type)
}
input_len = strlen(text);
- myinput = HDstrdup(text);
+ myinput = strdup(text);
if ((type_id = H5LTyyparse()) < 0) {
free(myinput);
@@ -3267,7 +3267,7 @@ H5LTpath_valid(hid_t loc_id, const char *path, hbool_t check_object_valid)
}
/* Duplicate the path to use */
- if (NULL == (tmp_path = HDstrdup(path))) {
+ if (NULL == (tmp_path = strdup(path))) {
ret_value = FAIL;
goto done;
}
diff --git a/hl/test/CMakeTests.cmake b/hl/test/CMakeTests.cmake
index 9d3ff0c2221..781ed143219 100644
--- a/hl/test/CMakeTests.cmake
+++ b/hl/test/CMakeTests.cmake
@@ -41,7 +41,7 @@ set (HL_REFERENCE_TEST_FILES
#-- Copy the necessary files.
# --------------------------------------------------------------------
foreach (h5_file ${HL_REFERENCE_TEST_FILES})
- HDFTEST_COPY_FILE("${HDF5_HL_TEST_SOURCE_DIR}/${h5_file}" "${HDF5_HL_TEST_BINARY_DIR}/${h5_file}" "hl_test_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_file}" "${HDF5_HL_TEST_BINARY_DIR}/testfiles/${h5_file}" "hl_test_files")
endforeach ()
add_custom_target(hl_test_files ALL COMMENT "Copying files needed by hl_test tests" DEPENDS ${hl_test_files_list})
diff --git a/hl/test/dsdata.txt b/hl/test/testfiles/dsdata.txt
similarity index 100%
rename from hl/test/dsdata.txt
rename to hl/test/testfiles/dsdata.txt
diff --git a/hl/test/dslat.txt b/hl/test/testfiles/dslat.txt
similarity index 100%
rename from hl/test/dslat.txt
rename to hl/test/testfiles/dslat.txt
diff --git a/hl/test/dslon.txt b/hl/test/testfiles/dslon.txt
similarity index 100%
rename from hl/test/dslon.txt
rename to hl/test/testfiles/dslon.txt
diff --git a/hl/test/dtype_file.txt b/hl/test/testfiles/dtype_file.txt
similarity index 100%
rename from hl/test/dtype_file.txt
rename to hl/test/testfiles/dtype_file.txt
diff --git a/hl/test/dtype_file_readable.txt b/hl/test/testfiles/dtype_file_readable.txt
similarity index 100%
rename from hl/test/dtype_file_readable.txt
rename to hl/test/testfiles/dtype_file_readable.txt
diff --git a/hl/test/earth.pal b/hl/test/testfiles/earth.pal
similarity index 100%
rename from hl/test/earth.pal
rename to hl/test/testfiles/earth.pal
diff --git a/hl/test/image24pixel.txt b/hl/test/testfiles/image24pixel.txt
similarity index 100%
rename from hl/test/image24pixel.txt
rename to hl/test/testfiles/image24pixel.txt
diff --git a/hl/test/image24plane.txt b/hl/test/testfiles/image24plane.txt
similarity index 100%
rename from hl/test/image24plane.txt
rename to hl/test/testfiles/image24plane.txt
diff --git a/hl/test/image8.txt b/hl/test/testfiles/image8.txt
similarity index 100%
rename from hl/test/image8.txt
rename to hl/test/testfiles/image8.txt
diff --git a/hl/test/sepia.pal b/hl/test/testfiles/sepia.pal
similarity index 100%
rename from hl/test/sepia.pal
rename to hl/test/testfiles/sepia.pal
diff --git a/hl/test/test_ds_be.h5 b/hl/test/testfiles/test_ds_be.h5
similarity index 100%
rename from hl/test/test_ds_be.h5
rename to hl/test/testfiles/test_ds_be.h5
diff --git a/hl/test/test_ds_be_new_ref-32bit.h5 b/hl/test/testfiles/test_ds_be_new_ref-32bit.h5
similarity index 100%
rename from hl/test/test_ds_be_new_ref-32bit.h5
rename to hl/test/testfiles/test_ds_be_new_ref-32bit.h5
diff --git a/hl/test/test_ds_be_new_ref.h5 b/hl/test/testfiles/test_ds_be_new_ref.h5
similarity index 100%
rename from hl/test/test_ds_be_new_ref.h5
rename to hl/test/testfiles/test_ds_be_new_ref.h5
diff --git a/hl/test/test_ds_le.h5 b/hl/test/testfiles/test_ds_le.h5
similarity index 100%
rename from hl/test/test_ds_le.h5
rename to hl/test/testfiles/test_ds_le.h5
diff --git a/hl/test/test_ds_le_new_ref.h5 b/hl/test/testfiles/test_ds_le_new_ref.h5
similarity index 100%
rename from hl/test/test_ds_le_new_ref.h5
rename to hl/test/testfiles/test_ds_le_new_ref.h5
diff --git a/hl/test/test_ld.h5 b/hl/test/testfiles/test_ld.h5
similarity index 100%
rename from hl/test/test_ld.h5
rename to hl/test/testfiles/test_ld.h5
diff --git a/hl/test/test_table_be.h5 b/hl/test/testfiles/test_table_be.h5
similarity index 100%
rename from hl/test/test_table_be.h5
rename to hl/test/testfiles/test_table_be.h5
diff --git a/hl/test/test_table_cray.h5 b/hl/test/testfiles/test_table_cray.h5
similarity index 100%
rename from hl/test/test_table_cray.h5
rename to hl/test/testfiles/test_table_cray.h5
diff --git a/hl/test/test_table_le.h5 b/hl/test/testfiles/test_table_le.h5
similarity index 100%
rename from hl/test/test_table_le.h5
rename to hl/test/testfiles/test_table_le.h5
diff --git a/hl/test/usa.wri b/hl/test/testfiles/usa.wri
similarity index 100%
rename from hl/test/usa.wri
rename to hl/test/testfiles/usa.wri
diff --git a/hl/tools/gif2h5/CMakeTests.cmake b/hl/tools/gif2h5/CMakeTests.cmake
index b2a8e27f26f..dd0ccc456a2 100644
--- a/hl/tools/gif2h5/CMakeTests.cmake
+++ b/hl/tools/gif2h5/CMakeTests.cmake
@@ -22,9 +22,9 @@ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
#
# copy test files from source to build dir
#
-HDFTEST_COPY_FILE("${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/testfiles/image1.gif" "${PROJECT_BINARY_DIR}/testfiles/image1.gif" "gif2h5_files")
-HDFTEST_COPY_FILE("${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/testfiles/h52giftst.h5" "${PROJECT_BINARY_DIR}/testfiles/h52giftst.h5" "gif2h5_files")
-HDFTEST_COPY_FILE("${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/testfiles/ex_image2.h5" "${PROJECT_BINARY_DIR}/testfiles/ex_image2.h5" "gif2h5_files")
+HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/image1.gif" "${PROJECT_BINARY_DIR}/testfiles/image1.gif" "gif2h5_files")
+HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/h52giftst.h5" "${PROJECT_BINARY_DIR}/testfiles/h52giftst.h5" "gif2h5_files")
+HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/ex_image2.h5" "${PROJECT_BINARY_DIR}/testfiles/ex_image2.h5" "gif2h5_files")
add_custom_target(gif2h5_files ALL COMMENT "Copying files needed by gif2h5 tests" DEPENDS ${gif2h5_files_list})
# Remove any output file left over from previous test run
diff --git a/hl/tools/h5watch/CMakeTests.cmake b/hl/tools/h5watch/CMakeTests.cmake
index a7828b30fa6..7c1a7f56374 100644
--- a/hl/tools/h5watch/CMakeTests.cmake
+++ b/hl/tools/h5watch/CMakeTests.cmake
@@ -58,7 +58,7 @@ set (H5WATCH_TEST_FILES
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
foreach (h5watch_file ${H5WATCH_TEST_FILES})
- HDFTEST_COPY_FILE("${HDF5_HL_TOOLS_DIR}/testfiles/${h5watch_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5watch_file}" "H5WATCH_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5watch_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5watch_file}" "H5WATCH_files")
endforeach ()
add_custom_target(H5WATCH_files ALL COMMENT "Copying files needed by H5WATCH tests" DEPENDS ${H5WATCH_files_list})
diff --git a/hl/tools/h5watch/extend_dset.c b/hl/tools/h5watch/extend_dset.c
index 443a759e3ca..abba782399a 100644
--- a/hl/tools/h5watch/extend_dset.c
+++ b/hl/tools/h5watch/extend_dset.c
@@ -403,8 +403,8 @@ main(int argc, char *argv[])
} /* end if */
/* Get the dataset name to be extended */
- fname = HDstrdup(argv[1]);
- dname = HDstrdup(argv[2]);
+ fname = strdup(argv[1]);
+ dname = strdup(argv[2]);
action1 = atoi(argv[3]);
action2 = atoi(argv[4]);
diff --git a/hl/tools/h5watch/h5watch.c b/hl/tools/h5watch/h5watch.c
index 876b5d55f28..2e6071c007b 100644
--- a/hl/tools/h5watch/h5watch.c
+++ b/hl/tools/h5watch/h5watch.c
@@ -430,7 +430,7 @@ process_cmpd_fields(hid_t fid, char *dsetname)
}
/* Make a copy of "g_list_of_fields" */
- if ((g_dup_fields = HDstrdup(g_list_of_fields)) == NULL) {
+ if ((g_dup_fields = strdup(g_list_of_fields)) == NULL) {
error_msg("error in duplicating g_list_of_fields\n");
ret_value = FAIL;
goto done;
@@ -703,7 +703,7 @@ parse_command_line(int argc, const char *const *argv)
case 'f': /* --fields= */
if (g_list_of_fields == NULL) {
- if ((g_list_of_fields = HDstrdup(H5_optarg)) == NULL) {
+ if ((g_list_of_fields = strdup(H5_optarg)) == NULL) {
error_msg("memory allocation failed (file %s:line %d)\n", __FILE__, __LINE__);
leave(EXIT_FAILURE);
}
@@ -711,7 +711,7 @@ parse_command_line(int argc, const char *const *argv)
else {
char *str;
- if ((str = HDstrdup(H5_optarg)) == NULL) {
+ if ((str = strdup(H5_optarg)) == NULL) {
error_msg("memory allocation failed (file %s:line %d)\n", __FILE__, __LINE__);
leave(EXIT_FAILURE);
}
@@ -823,7 +823,7 @@ main(int argc, char *argv[])
* then there must have been something wrong with the file (perhaps it
* doesn't exist).
*/
- if ((fname = HDstrdup(argv[H5_optind])) == NULL) {
+ if ((fname = strdup(argv[H5_optind])) == NULL) {
error_msg("memory allocation failed (file %s:line %d)\n", __FILE__, __LINE__);
h5tools_setstatus(EXIT_FAILURE);
goto done;
@@ -877,7 +877,7 @@ main(int argc, char *argv[])
else {
*dname = '/';
x = dname;
- if ((dname = HDstrdup(dname)) == NULL) {
+ if ((dname = strdup(dname)) == NULL) {
error_msg("memory allocation failed (file %s:line %d)\n", __FILE__, __LINE__);
h5tools_setstatus(EXIT_FAILURE);
goto done;
diff --git a/hl/tools/testfiles/w-err-cmpd1.err b/hl/tools/h5watch/testfiles/w-err-cmpd1.err
similarity index 100%
rename from hl/tools/testfiles/w-err-cmpd1.err
rename to hl/tools/h5watch/testfiles/w-err-cmpd1.err
diff --git a/hl/tools/testfiles/w-err-cmpd2.err b/hl/tools/h5watch/testfiles/w-err-cmpd2.err
similarity index 100%
rename from hl/tools/testfiles/w-err-cmpd2.err
rename to hl/tools/h5watch/testfiles/w-err-cmpd2.err
diff --git a/hl/tools/testfiles/w-err-cmpd3.err b/hl/tools/h5watch/testfiles/w-err-cmpd3.err
similarity index 100%
rename from hl/tools/testfiles/w-err-cmpd3.err
rename to hl/tools/h5watch/testfiles/w-err-cmpd3.err
diff --git a/hl/tools/testfiles/w-err-cmpd4.err b/hl/tools/h5watch/testfiles/w-err-cmpd4.err
similarity index 100%
rename from hl/tools/testfiles/w-err-cmpd4.err
rename to hl/tools/h5watch/testfiles/w-err-cmpd4.err
diff --git a/hl/tools/testfiles/w-err-cmpd5.err b/hl/tools/h5watch/testfiles/w-err-cmpd5.err
similarity index 100%
rename from hl/tools/testfiles/w-err-cmpd5.err
rename to hl/tools/h5watch/testfiles/w-err-cmpd5.err
diff --git a/hl/tools/testfiles/w-err-dset-nomax.err b/hl/tools/h5watch/testfiles/w-err-dset-nomax.err
similarity index 100%
rename from hl/tools/testfiles/w-err-dset-nomax.err
rename to hl/tools/h5watch/testfiles/w-err-dset-nomax.err
diff --git a/hl/tools/testfiles/w-err-dset-none.err b/hl/tools/h5watch/testfiles/w-err-dset-none.err
similarity index 100%
rename from hl/tools/testfiles/w-err-dset-none.err
rename to hl/tools/h5watch/testfiles/w-err-dset-none.err
diff --git a/hl/tools/testfiles/w-err-dset1.err b/hl/tools/h5watch/testfiles/w-err-dset1.err
similarity index 100%
rename from hl/tools/testfiles/w-err-dset1.err
rename to hl/tools/h5watch/testfiles/w-err-dset1.err
diff --git a/hl/tools/testfiles/w-err-dset2.err b/hl/tools/h5watch/testfiles/w-err-dset2.err
similarity index 100%
rename from hl/tools/testfiles/w-err-dset2.err
rename to hl/tools/h5watch/testfiles/w-err-dset2.err
diff --git a/hl/tools/testfiles/w-err-file.err b/hl/tools/h5watch/testfiles/w-err-file.err
similarity index 100%
rename from hl/tools/testfiles/w-err-file.err
rename to hl/tools/h5watch/testfiles/w-err-file.err
diff --git a/hl/tools/testfiles/w-err-poll.ddl b/hl/tools/h5watch/testfiles/w-err-poll.ddl
similarity index 100%
rename from hl/tools/testfiles/w-err-poll.ddl
rename to hl/tools/h5watch/testfiles/w-err-poll.ddl
diff --git a/hl/tools/testfiles/w-err-poll0.ddl b/hl/tools/h5watch/testfiles/w-err-poll0.ddl
similarity index 100%
rename from hl/tools/testfiles/w-err-poll0.ddl
rename to hl/tools/h5watch/testfiles/w-err-poll0.ddl
diff --git a/hl/tools/testfiles/w-err-std.ddl b/hl/tools/h5watch/testfiles/w-err-std.ddl
similarity index 100%
rename from hl/tools/testfiles/w-err-std.ddl
rename to hl/tools/h5watch/testfiles/w-err-std.ddl
diff --git a/hl/tools/testfiles/w-err-width.ddl b/hl/tools/h5watch/testfiles/w-err-width.ddl
similarity index 100%
rename from hl/tools/testfiles/w-err-width.ddl
rename to hl/tools/h5watch/testfiles/w-err-width.ddl
diff --git a/hl/tools/testfiles/w-ext-cmpd-esc-f1.ddl b/hl/tools/h5watch/testfiles/w-ext-cmpd-esc-f1.ddl
similarity index 100%
rename from hl/tools/testfiles/w-ext-cmpd-esc-f1.ddl
rename to hl/tools/h5watch/testfiles/w-ext-cmpd-esc-f1.ddl
diff --git a/hl/tools/testfiles/w-ext-cmpd-esc-f3.ddl b/hl/tools/h5watch/testfiles/w-ext-cmpd-esc-f3.ddl
similarity index 100%
rename from hl/tools/testfiles/w-ext-cmpd-esc-f3.ddl
rename to hl/tools/h5watch/testfiles/w-ext-cmpd-esc-f3.ddl
diff --git a/hl/tools/testfiles/w-ext-cmpd-esc-ff2.ddl b/hl/tools/h5watch/testfiles/w-ext-cmpd-esc-ff2.ddl
similarity index 100%
rename from hl/tools/testfiles/w-ext-cmpd-esc-ff2.ddl
rename to hl/tools/h5watch/testfiles/w-ext-cmpd-esc-ff2.ddl
diff --git a/hl/tools/testfiles/w-ext-cmpd-esc.ddl b/hl/tools/h5watch/testfiles/w-ext-cmpd-esc.ddl
similarity index 100%
rename from hl/tools/testfiles/w-ext-cmpd-esc.ddl
rename to hl/tools/h5watch/testfiles/w-ext-cmpd-esc.ddl
diff --git a/hl/tools/testfiles/w-ext-cmpd-f1.ddl b/hl/tools/h5watch/testfiles/w-ext-cmpd-f1.ddl
similarity index 100%
rename from hl/tools/testfiles/w-ext-cmpd-f1.ddl
rename to hl/tools/h5watch/testfiles/w-ext-cmpd-f1.ddl
diff --git a/hl/tools/testfiles/w-ext-cmpd-f2.ddl b/hl/tools/h5watch/testfiles/w-ext-cmpd-f2.ddl
similarity index 100%
rename from hl/tools/testfiles/w-ext-cmpd-f2.ddl
rename to hl/tools/h5watch/testfiles/w-ext-cmpd-f2.ddl
diff --git a/hl/tools/testfiles/w-ext-cmpd-ff3.ddl b/hl/tools/h5watch/testfiles/w-ext-cmpd-ff3.ddl
similarity index 100%
rename from hl/tools/testfiles/w-ext-cmpd-ff3.ddl
rename to hl/tools/h5watch/testfiles/w-ext-cmpd-ff3.ddl
diff --git a/hl/tools/testfiles/w-ext-cmpd-label.ddl b/hl/tools/h5watch/testfiles/w-ext-cmpd-label.ddl
similarity index 100%
rename from hl/tools/testfiles/w-ext-cmpd-label.ddl
rename to hl/tools/h5watch/testfiles/w-ext-cmpd-label.ddl
diff --git a/hl/tools/testfiles/w-ext-cmpd-two-f1.ddl b/hl/tools/h5watch/testfiles/w-ext-cmpd-two-f1.ddl
similarity index 100%
rename from hl/tools/testfiles/w-ext-cmpd-two-f1.ddl
rename to hl/tools/h5watch/testfiles/w-ext-cmpd-two-f1.ddl
diff --git a/hl/tools/testfiles/w-ext-cmpd-two-f3.ddl b/hl/tools/h5watch/testfiles/w-ext-cmpd-two-f3.ddl
similarity index 100%
rename from hl/tools/testfiles/w-ext-cmpd-two-f3.ddl
rename to hl/tools/h5watch/testfiles/w-ext-cmpd-two-f3.ddl
diff --git a/hl/tools/testfiles/w-ext-cmpd-two-ff2.ddl b/hl/tools/h5watch/testfiles/w-ext-cmpd-two-ff2.ddl
similarity index 100%
rename from hl/tools/testfiles/w-ext-cmpd-two-ff2.ddl
rename to hl/tools/h5watch/testfiles/w-ext-cmpd-two-ff2.ddl
diff --git a/hl/tools/testfiles/w-ext-cmpd-two.ddl b/hl/tools/h5watch/testfiles/w-ext-cmpd-two.ddl
similarity index 100%
rename from hl/tools/testfiles/w-ext-cmpd-two.ddl
rename to hl/tools/h5watch/testfiles/w-ext-cmpd-two.ddl
diff --git a/hl/tools/testfiles/w-ext-cmpd.ddl b/hl/tools/h5watch/testfiles/w-ext-cmpd.ddl
similarity index 100%
rename from hl/tools/testfiles/w-ext-cmpd.ddl
rename to hl/tools/h5watch/testfiles/w-ext-cmpd.ddl
diff --git a/hl/tools/testfiles/w-ext-early.ddl b/hl/tools/h5watch/testfiles/w-ext-early.ddl
similarity index 100%
rename from hl/tools/testfiles/w-ext-early.ddl
rename to hl/tools/h5watch/testfiles/w-ext-early.ddl
diff --git a/hl/tools/testfiles/w-ext-late.ddl b/hl/tools/h5watch/testfiles/w-ext-late.ddl
similarity index 100%
rename from hl/tools/testfiles/w-ext-late.ddl
rename to hl/tools/h5watch/testfiles/w-ext-late.ddl
diff --git a/hl/tools/testfiles/w-ext-one-d.ddl b/hl/tools/h5watch/testfiles/w-ext-one-d.ddl
similarity index 100%
rename from hl/tools/testfiles/w-ext-one-d.ddl
rename to hl/tools/h5watch/testfiles/w-ext-one-d.ddl
diff --git a/hl/tools/testfiles/w-ext-one-simple.ddl b/hl/tools/h5watch/testfiles/w-ext-one-simple.ddl
similarity index 100%
rename from hl/tools/testfiles/w-ext-one-simple.ddl
rename to hl/tools/h5watch/testfiles/w-ext-one-simple.ddl
diff --git a/hl/tools/testfiles/w-ext-one.ddl b/hl/tools/h5watch/testfiles/w-ext-one.ddl
similarity index 100%
rename from hl/tools/testfiles/w-ext-one.ddl
rename to hl/tools/h5watch/testfiles/w-ext-one.ddl
diff --git a/hl/tools/testfiles/w-ext-two-d.ddl b/hl/tools/h5watch/testfiles/w-ext-two-d.ddl
similarity index 100%
rename from hl/tools/testfiles/w-ext-two-d.ddl
rename to hl/tools/h5watch/testfiles/w-ext-two-d.ddl
diff --git a/hl/tools/testfiles/w-ext-two-width.ddl b/hl/tools/h5watch/testfiles/w-ext-two-width.ddl
similarity index 100%
rename from hl/tools/testfiles/w-ext-two-width.ddl
rename to hl/tools/h5watch/testfiles/w-ext-two-width.ddl
diff --git a/hl/tools/testfiles/w-ext-two.ddl b/hl/tools/h5watch/testfiles/w-ext-two.ddl
similarity index 100%
rename from hl/tools/testfiles/w-ext-two.ddl
rename to hl/tools/h5watch/testfiles/w-ext-two.ddl
diff --git a/hl/tools/testfiles/w-help1.ddl b/hl/tools/h5watch/testfiles/w-help1.ddl
similarity index 100%
rename from hl/tools/testfiles/w-help1.ddl
rename to hl/tools/h5watch/testfiles/w-help1.ddl
diff --git a/hl/tools/h5watch/testh5watch.sh.in b/hl/tools/h5watch/testh5watch.sh.in
index fb047cd3042..a1daeec9bf1 100644
--- a/hl/tools/h5watch/testh5watch.sh.in
+++ b/hl/tools/h5watch/testh5watch.sh.in
@@ -66,7 +66,7 @@ fi
nerrors=0
verbose=yes
-test -d ../testfiles || mkdir ../testfiles
+test -d ./testfiles || mkdir ./testfiles
# Print a line-line message left justified in a field of 70 characters
# beginning with the word "Testing".
@@ -97,9 +97,9 @@ TESTING() {
# $2 -- expected return code
# $3 and on -- arguments for h5watch
TOOLTEST() {
- expect="$srcdir/../testfiles/$1"
- actual="../testfiles/`basename $1 .ddl`.out"
- actual_err="../testfiles/`basename $1 .ddl`.err"
+ expect="$srcdir/testfiles/$1"
+ actual="testfiles/`basename $1 .ddl`.out"
+ actual_err="testfiles/`basename $1 .ddl`.err"
shift
retvalexpect=$1
shift
@@ -146,10 +146,10 @@ TOOLTEST() {
# $2 -- expected return code
# $3 and on -- arguments for h5watch
TOOLTEST_ERR() {
- expect="$srcdir/../testfiles/$1"
- expect_err="$srcdir/../testfiles/`basename $1 .ddl`.err"
- actual="../testfiles/`basename $1 .ddl`.out"
- actual_err="../testfiles/`basename $1 .ddl`.out.err"
+ expect="$srcdir/testfiles/$1"
+ expect_err="$srcdir/testfiles/`basename $1 .ddl`.err"
+ actual="testfiles/`basename $1 .ddl`.out"
+ actual_err="testfiles/`basename $1 .ddl`.out.err"
shift
retvalexpect=$1
shift
@@ -201,8 +201,8 @@ try=0
while [ $try -lt $TRY_MAX ] ;
do
cp $WATCHFILE $TESTFILE # Copy the file being watched/extended to a temporary file
- actual="../testfiles/`basename $3 .ddl`.out" # The actual output
- expect="$srcdir/../testfiles/$3" # The expected output
+ actual="testfiles/`basename $3 .ddl`.out" # The actual output
+ expect="$srcdir/testfiles/$3" # The expected output
#
# Set up options and object to h5watch
if test -z "$2"; then
diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java
index b48c72a7a51..0fcdd83189f 100644
--- a/java/src/hdf/hdf5lib/H5.java
+++ b/java/src/hdf/hdf5lib/H5.java
@@ -8607,7 +8607,7 @@ public synchronized static native boolean H5Pall_filters_avail(long dcpl_id)
* @ingroup JH5P
*
* H5Premove_filter deletes a filter from the dataset creation property list;
- * deletes all filters if filter is H5Z_FILTER_NONE
+ * deletes all filters if filter is H5Z_FILTER_ALL
*
* @param obj_id
* IN: Property list identifier.
diff --git a/java/src/jni/h5util.c b/java/src/jni/h5util.c
index 9f0117a8749..76c726a874b 100644
--- a/java/src/jni/h5util.c
+++ b/java/src/jni/h5util.c
@@ -945,7 +945,7 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i
}
else {
if (typeSize > 0) {
- if (NULL == (this_str = HDstrdup(tmp_str)))
+ if (NULL == (this_str = strdup(tmp_str)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "h5str_sprintf: failed to allocate string buffer");
}
}
@@ -3881,7 +3881,7 @@ obj_info_all(hid_t loc_id, const char *name, const H5L_info2_t *info, void *op_d
datainfo->ltype[datainfo->count] = -1;
datainfo->obj_token[datainfo->count] = H5O_TOKEN_UNDEF;
- if (NULL == (datainfo->objname[datainfo->count] = HDstrdup(name)))
+ if (NULL == (datainfo->objname[datainfo->count] = strdup(name)))
goto done;
if ((object_exists = H5Oexists_by_name(loc_id, name, H5P_DEFAULT)) < 0)
@@ -3916,7 +3916,7 @@ obj_info_max(hid_t loc_id, const char *name, const H5L_info2_t *info, void *op_d
datainfo->obj_token[datainfo->count] = H5O_TOKEN_UNDEF;
/* This will be freed by h5str_array_free(oName, n) */
- if (NULL == (datainfo->objname[datainfo->count] = HDstrdup(name)))
+ if (NULL == (datainfo->objname[datainfo->count] = strdup(name)))
goto done;
if (H5Oget_info3(loc_id, &object_info, H5O_INFO_ALL) < 0)
diff --git a/java/test/CMakeLists.txt b/java/test/CMakeLists.txt
index 9f148e21baa..967795bdd83 100644
--- a/java/test/CMakeLists.txt
+++ b/java/test/CMakeLists.txt
@@ -104,12 +104,12 @@ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/h5ex_g_iterate.orig" "${PROJECT_BINARY_
HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/h5ex_g_iterate.orig" "${PROJECT_BINARY_DIR}/h5ex_g_iterateL2.hdf" "${HDF5_JAVA_TEST_LIB_TARGET}_files")
HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/h5ex_g_iterate.orig" "${PROJECT_BINARY_DIR}/h5ex_g_iterateO1.hdf" "${HDF5_JAVA_TEST_LIB_TARGET}_files")
HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/h5ex_g_iterate.orig" "${PROJECT_BINARY_DIR}/h5ex_g_iterateO2.hdf" "${HDF5_JAVA_TEST_LIB_TARGET}_files")
-HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/trefer_reg.h5" "${PROJECT_BINARY_DIR}/trefer_reg.h5" "${HDF5_JAVA_TEST_LIB_TARGET}_files")
-HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/trefer_attr.h5" "${PROJECT_BINARY_DIR}/trefer_attr.h5" "${HDF5_JAVA_TEST_LIB_TARGET}_files")
-HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tdatareg.h5" "${PROJECT_BINARY_DIR}/tdatareg.h5" "${HDF5_JAVA_TEST_LIB_TARGET}_files")
-HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tattrreg.h5" "${PROJECT_BINARY_DIR}/tattrreg.h5" "${HDF5_JAVA_TEST_LIB_TARGET}_files")
-HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tintsattrs.h5" "${PROJECT_BINARY_DIR}/tintsattrs.h5" "${HDF5_JAVA_TEST_LIB_TARGET}_files")
-HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tfloatsattrs.h5" "${PROJECT_BINARY_DIR}/tfloatsattrs.h5" "${HDF5_JAVA_TEST_LIB_TARGET}_files")
+HDFTEST_COPY_FILE("${HDF5_TOOLS_TST_DIR}/h5dump/testfiles/trefer_reg.h5" "${PROJECT_BINARY_DIR}/trefer_reg.h5" "${HDF5_JAVA_TEST_LIB_TARGET}_files")
+HDFTEST_COPY_FILE("${HDF5_TOOLS_TST_DIR}/h5dump/testfiles/trefer_attr.h5" "${PROJECT_BINARY_DIR}/trefer_attr.h5" "${HDF5_JAVA_TEST_LIB_TARGET}_files")
+HDFTEST_COPY_FILE("${HDF5_TOOLS_TST_DIR}/h5dump/testfiles/tdatareg.h5" "${PROJECT_BINARY_DIR}/tdatareg.h5" "${HDF5_JAVA_TEST_LIB_TARGET}_files")
+HDFTEST_COPY_FILE("${HDF5_TOOLS_TST_DIR}/h5dump/testfiles/tattrreg.h5" "${PROJECT_BINARY_DIR}/tattrreg.h5" "${HDF5_JAVA_TEST_LIB_TARGET}_files")
+HDFTEST_COPY_FILE("${HDF5_TOOLS_TST_DIR}/h5dump/testfiles/tintsattrs.h5" "${PROJECT_BINARY_DIR}/tintsattrs.h5" "${HDF5_JAVA_TEST_LIB_TARGET}_files")
+HDFTEST_COPY_FILE("${HDF5_TOOLS_TST_DIR}/h5dump/testfiles/tfloatsattrs.h5" "${PROJECT_BINARY_DIR}/tfloatsattrs.h5" "${HDF5_JAVA_TEST_LIB_TARGET}_files")
add_custom_target(${HDF5_JAVA_TEST_LIB_TARGET}_files ALL COMMENT "Copying files needed by ${HDF5_JAVA_TEST_LIB_TARGET} tests" DEPENDS ${${HDF5_JAVA_TEST_LIB_TARGET}_files_list})
@@ -248,12 +248,12 @@ if (HDF5_TEST_JAVA AND HDF5_TEST_SERIAL)
HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/h5ex_g_iterate.orig" "${PROJECT_BINARY_DIR}/${voltest}/h5ex_g_iterateL2.hdf" "${HDF5_JAVA_TEST_LIB_TARGET}_${voltest}_files")
HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/h5ex_g_iterate.orig" "${PROJECT_BINARY_DIR}/${voltest}/h5ex_g_iterateO1.hdf" "${HDF5_JAVA_TEST_LIB_TARGET}_${voltest}_files")
HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/h5ex_g_iterate.orig" "${PROJECT_BINARY_DIR}/${voltest}/h5ex_g_iterateO2.hdf" "${HDF5_JAVA_TEST_LIB_TARGET}_${voltest}_files")
- HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/trefer_reg.h5" "${PROJECT_BINARY_DIR}/${voltest}/trefer_reg.h5" "${HDF5_JAVA_TEST_LIB_TARGET}_${voltest}_files")
- HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/trefer_attr.h5" "${PROJECT_BINARY_DIR}/${voltest}/trefer_attr.h5" "${HDF5_JAVA_TEST_LIB_TARGET}_${voltest}_files")
- HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tdatareg.h5" "${PROJECT_BINARY_DIR}/${voltest}/tdatareg.h5" "${HDF5_JAVA_TEST_LIB_TARGET}_${voltest}_files")
- HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tattrreg.h5" "${PROJECT_BINARY_DIR}/${voltest}/tattrreg.h5" "${HDF5_JAVA_TEST_LIB_TARGET}_${voltest}_files")
- HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tintsattrs.h5" "${PROJECT_BINARY_DIR}/${voltest}/tintsattrs.h5" "${HDF5_JAVA_TEST_LIB_TARGET}_${voltest}_files")
- HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tfloatsattrs.h5" "${PROJECT_BINARY_DIR}/${voltest}/tfloatsattrs.h5" "${HDF5_JAVA_TEST_LIB_TARGET}_${voltest}_files")
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_TST_DIR}/h5dump/testfiles/trefer_reg.h5" "${PROJECT_BINARY_DIR}/${voltest}/trefer_reg.h5" "${HDF5_JAVA_TEST_LIB_TARGET}_${voltest}_files")
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_TST_DIR}/h5dump/testfiles/trefer_attr.h5" "${PROJECT_BINARY_DIR}/${voltest}/trefer_attr.h5" "${HDF5_JAVA_TEST_LIB_TARGET}_${voltest}_files")
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_TST_DIR}/h5dump/testfiles/tdatareg.h5" "${PROJECT_BINARY_DIR}/${voltest}/tdatareg.h5" "${HDF5_JAVA_TEST_LIB_TARGET}_${voltest}_files")
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_TST_DIR}/h5dump/testfiles/tattrreg.h5" "${PROJECT_BINARY_DIR}/${voltest}/tattrreg.h5" "${HDF5_JAVA_TEST_LIB_TARGET}_${voltest}_files")
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_TST_DIR}/h5dump/testfiles/tintsattrs.h5" "${PROJECT_BINARY_DIR}/${voltest}/tintsattrs.h5" "${HDF5_JAVA_TEST_LIB_TARGET}_${voltest}_files")
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_TST_DIR}/h5dump/testfiles/tfloatsattrs.h5" "${PROJECT_BINARY_DIR}/${voltest}/tfloatsattrs.h5" "${HDF5_JAVA_TEST_LIB_TARGET}_${voltest}_files")
add_custom_target(${HDF5_JAVA_TEST_LIB_TARGET}_${voltest}_files ALL COMMENT "Copying files needed by ${HDF5_JAVA_TEST_LIB_TARGET} tests" DEPENDS ${${HDF5_JAVA_TEST_LIB_TARGET}_${voltest}_files_list})
diff --git a/java/test/junit.sh.in b/java/test/junit.sh.in
index 0690081386a..981d945965b 100644
--- a/java/test/junit.sh.in
+++ b/java/test/junit.sh.in
@@ -46,7 +46,7 @@ HDFLIB_HOME="$top_srcdir/java/lib"
BLDDIR="."
BLDLIBDIR="$BLDDIR/testlibs"
HDFTEST_HOME="$top_srcdir/java/test"
-TOOLS_TESTFILES="$top_srcdir/tools/testfiles"
+DUMP_TESTFILES="$top_srcdir/tools/test/h5dump/testfiles"
JARFILE=jar@PACKAGE_TARNAME@-@PACKAGE_VERSION@.jar
TESTJARFILE=jar@PACKAGE_TARNAME@test.jar
@@ -258,12 +258,12 @@ COPY_DATAFILES_TO_BLDDIR()
$CP -f $HDFTEST_HOME/h5ex_g_iterate.orig $BLDDIR/h5ex_g_iterateL2.hdf
$CP -f $HDFTEST_HOME/h5ex_g_iterate.orig $BLDDIR/h5ex_g_iterateO1.hdf
$CP -f $HDFTEST_HOME/h5ex_g_iterate.orig $BLDDIR/h5ex_g_iterateO2.hdf
- $CP -f $TOOLS_TESTFILES/trefer_reg.h5 $BLDDIR/trefer_reg.h5
- $CP -f $TOOLS_TESTFILES/trefer_attr.h5 $BLDDIR/trefer_attr.h5
- $CP -f $TOOLS_TESTFILES/tdatareg.h5 $BLDDIR/tdatareg.h5
- $CP -f $TOOLS_TESTFILES/tattrreg.h5 $BLDDIR/tattrreg.h5
- $CP -f $TOOLS_TESTFILES/tintsattrs.h5 $BLDDIR/tintsattrs.h5
- $CP -f $TOOLS_TESTFILES/tfloatsattrs.h5 $BLDDIR/tfloatsattrs.h5
+ $CP -f $DUMP_TESTFILES/trefer_reg.h5 $BLDDIR/trefer_reg.h5
+ $CP -f $DUMP_TESTFILES/trefer_attr.h5 $BLDDIR/trefer_attr.h5
+ $CP -f $DUMP_TESTFILES/tdatareg.h5 $BLDDIR/tdatareg.h5
+ $CP -f $DUMP_TESTFILES/tattrreg.h5 $BLDDIR/tattrreg.h5
+ $CP -f $DUMP_TESTFILES/tintsattrs.h5 $BLDDIR/tintsattrs.h5
+ $CP -f $DUMP_TESTFILES/tfloatsattrs.h5 $BLDDIR/tfloatsattrs.h5
}
CLEAN_DATAFILES_AND_BLDDIR()
diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt
index 9e0797b4bdb..8fc2dee0b63 100644
--- a/release_docs/INSTALL_CMake.txt
+++ b/release_docs/INSTALL_CMake.txt
@@ -307,7 +307,7 @@ IV. Further considerations
CMake options:
HDF5_ALLOW_EXTERNAL_SUPPORT:STRING="TGZ"
ZLIB_TGZ_NAME:STRING="zlib_src.ext"
- SZAEC_TGZ_NAME:STRING="szaec_src.ext"
+ LIBAEC_TGZ_NAME:STRING="szaec_src.ext"
TGZPATH:STRING="some_location"
where "some_location" is the URL or full path to the compressed
file and ext is the type of compression file. Also set CMAKE_BUILD_TYPE
@@ -316,12 +316,10 @@ IV. Further considerations
D. Use original source packages from a compressed file by adding the following
CMake options:
- BUILD_SZIP_WITH_FETCHCONTENT:BOOL=ON
- LIBAEC_TGZ_ORIGNAME:STRING="szip_src.ext"
+ LIBAEC_TGZ_NAME:STRING="szip_src.ext"
LIBAEC_TGZ_ORIGPATH:STRING="some_location"
- BUILD_ZLIB_WITH_FETCHCONTENT:BOOL=ON
- ZLIB_TGZ_ORIGNAME:STRING="zlib_src.ext"
+ ZLIB_TGZ_NAME:STRING="zlib_src.ext"
ZLIB_TGZ_ORIGPATH:STRING="some_location"
HDF5_ALLOW_EXTERNAL_SUPPORT:STRING="TGZ"
@@ -329,8 +327,6 @@ IV. Further considerations
ZLIB_USE_LOCALCONTENT:BOOL=OFF
LIBAEC_USE_LOCALCONTENT:BOOL=OFF
or full path to the compressed file and ext is the type of compression file.
- The individual filters are enabled by setting the BUILD__WITH_FETCHCONTENT
- CMake variable to ON.
Also set CMAKE_BUILD_TYPE to the configuration type during configuration.
See the settings in the config/cmake/cacheinit.cmake file HDF uses for testing.
@@ -527,75 +523,82 @@ These five steps are described in detail below.
set (HDF5_ALLOW_EXTERNAL_SUPPORT "TGZ" CACHE STRING "Allow External Library Building (NO GIT TGZ)" FORCE)
set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO GIT TGZ)
set (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE)
- set (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use HDF5_ZLib from compressed file" FORCE)
- set (ZLIB_TGZ_ORIGPATH "https://github.com/madler/zlib/releases/download/v1.2.13" CACHE STRING "Use ZLIB from original location" FORCE)
- set (ZLIB_TGZ_ORIGNAME "zlib-1.2.13.tar.gz" CACHE STRING "Use ZLIB from original compressed file" FORCE)
+ set (ZLIB_TGZ_NAME "zlib-1.3.tar.gz" CACHE STRING "Use HDF5_ZLib from compressed file" FORCE)
+ set (ZLIB_TGZ_ORIGPATH "https://github.com/madler/zlib/releases/download/v1.3" CACHE STRING "Use ZLIB from original location" FORCE)
+ set (ZLIB_TGZ_NAME "zlib-1.3.tar.gz" CACHE STRING "Use ZLIB from original compressed file" FORCE)
set (ZLIB_USE_LOCALCONTENT ON CACHE BOOL "Use local file for ZLIB FetchContent" FORCE)
set (LIBAEC_PACKAGE_NAME "libaec" CACHE STRING "Name of AEC SZIP package" FORCE)
- set (SZAEC_TGZ_NAME "LIBAEC.tar.gz" CACHE STRING "Use SZip AEC from compressed file" FORCE)
set (LIBAEC_TGZ_ORIGPATH "https://github.com/MathisRosenhauer/libaec/releases/download/v1.0.6" CACHE STRING "Use LIBAEC from original location" FORCE)
- set (LIBAEC_TGZ_ORIGNAME "libaec-1.0.6.tar.gz" CACHE STRING "Use LIBAEC from original compressed file" FORCE)
+ set (LIBAEC_TGZ_NAME "libaec-1.0.6.tar.gz" CACHE STRING "Use LIBAEC from original compressed file" FORCE)
set (LIBAEC_USE_LOCALCONTENT ON CACHE BOOL "Use local file for LIBAEC FetchContent" FORCE)
#######################
# filter plugin options
#######################
- set (PLUGIN_TGZ_NAME "hdf5_plugins.tar.gz" CACHE STRING "Use PLUGINS from compressed file" FORCE)
+ set (PLUGIN_TGZ_ORIGPATH "https://github.com/HDFGroup/hdf5_plugins/releases/download/snapshots" CACHE STRING "Use PLUGINS from original location" FORCE)
+ set (PLUGIN_TGZ_NAME "hdf5_plugins-master.tar.gz" CACHE STRING "Use PLUGINS from compressed file" FORCE)
+ set (PLUGIN_USE_LOCALCONTENT ON CACHE BOOL "Use local file for PLUGIN FetchContent" FORCE)
set (PLUGIN_PACKAGE_NAME "pl" CACHE STRING "Name of PLUGIN package" FORCE)
############
# bitshuffle
###########
- set (BSHUF_GIT_URL "https://someurl/bitshuffle.git" CACHE STRING "Use BSHUF from HDF repository" FORCE)
+ set (BSHUF_GIT_URL "https://github.com/kiyo-masui/bitshuffle.git" CACHE STRING "Use BSHUF from HDF repository" FORCE)
set (BSHUF_GIT_BRANCH "master" CACHE STRING "" FORCE)
- set (BSHUF_TGZ_NAME "bitshuffle.tar.gz" CACHE STRING "Use BSHUF from compressed file" FORCE)
+ set (BSHUF_TGZ_ORIGPATH "https://github.com/kiyo-masui/bitshuffle/archive/refs/tags" CACHE STRING "Use PLUGINS from original location" FORCE)
+ set (BSHUF_TGZ_NAME "bitshuffle-0.5.1.tar.gz" CACHE STRING "Use BSHUF from compressed file" FORCE)
set (BSHUF_PACKAGE_NAME "bshuf" CACHE STRING "Name of BSHUF package" FORCE)
#######
# blosc
#######
- set (BLOSC_GIT_URL "https://github.com/Blosc/c-blosc.git" CACHE STRING "Use BLOSC from Github" FORCE)
- set (BLOSC_GIT_BRANCH "master" CACHE STRING "" FORCE)
- set (BLOSC_TGZ_NAME "c-blosc.tar.gz" CACHE STRING "Use BLOSC from compressed file" FORCE)
+ set (BLOSC_GIT_URL "https://github.com/Blosc/c-blosc.git" CACHE STRING "Use BLOSC from Github repository" FORCE)
+ set (BLOSC_GIT_BRANCH "main" CACHE STRING "" FORCE)
+ set (BLOSC_TGZ_ORIGPATH "https://github.com/Blosc/c-blosc/archive/refs/tags" CACHE STRING "Use PLUGINS from original location" FORCE)
+ set (BLOSC_TGZ_NAME "c-blosc-1.21.5.tar.gz" CACHE STRING "Use BLOSC from compressed file" FORCE)
set (BLOSC_PACKAGE_NAME "blosc" CACHE STRING "Name of BLOSC package" FORCE)
- set (ZLIB_GIT_URL "https://someurl/zlib.git" CACHE STRING "Use ZLIB from HDF repo" FORCE)
- set (ZLIB_GIT_BRANCH "master" CACHE STRING "" FORCE)
- set (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use ZLib from compressed file" FORCE)
- set (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE)
+ set (BLOSC_ZLIB_GIT_URL "https://github.com/madler/zlib.git" CACHE STRING "Use ZLIB from GitHub repository" FORCE)
+ set (BLOSC_ZLIB_GIT_BRANCH "develop" CACHE STRING "" FORCE)
+ set (BLOSC_ZLIB_TGZ_ORIGPATH "https://github.com/madler/zlib/releases/download/v1.3" CACHE STRING "Use PLUGINS from original location" FORCE)
+ set (BLOSC_ZLIB_TGZ_NAME "zlib-1.3.tar.gz" CACHE STRING "Use ZLib from compressed file" FORCE)
+ set (BLOSC_ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of BLOSC_ZLIB package" FORCE)
#######
# bzip2
######
#
- set (BZ2_GIT_URL "https://someurl/bzip2.git" CACHE STRING "Use BZ2 from HDF repository" FORCE)
+ set (BZ2_GIT_URL "https://github.com/libarchive/bzip2.git" CACHE STRING "Use BZ2 from GitHub repository" FORCE)
set (BZ2_GIT_BRANCH "master" CACHE STRING "" FORCE)
- set (BZ2_TGZ_NAME "BZ2.tar.gz" CACHE STRING "Use BZ2 from compressed file" FORCE)
+ set (BZ2_TGZ_ORIGPATH "https://github.com/libarchive/bzip2/archive/refs/tags" CACHE STRING "Use PLUGINS from original location" FORCE)
+ set (BZ2_TGZ_NAME "bzip2-bzip2-1.0.8.tar.gz" CACHE STRING "Use BZ2 from compressed file" FORCE)
set (BZ2_PACKAGE_NAME "bz2" CACHE STRING "Name of BZ2 package" FORCE)
#######
# fpzip
#######
- set (FPZIP_GIT_URL "https://github.com/LLNL/fpzip" CACHE STRING "Use FPZIP from github repository" FORCE)
- set (FPZIP_GIT_BRANCH "master" CACHE STRING "" FORCE)
- set (FPZIP_TGZ_NAME "fpzip.tar.gz" CACHE STRING "Use FPZIP from compressed file" FORCE)
+ set (FPZIP_GIT_URL "https://github.com/LLNL/fpzip.git" CACHE STRING "Use FPZIP from GitHub repository" FORCE)
+ set (FPZIP_GIT_BRANCH "develop" CACHE STRING "" FORCE)
+ set (FPZIP_TGZ_ORIGPATH "https://github.com/LLNL/fpzip/releases/download/1.3.0" CACHE STRING "Use PLUGINS from original location" FORCE)
+ set (FPZIP_TGZ_NAME "fpzip-1.3.0.tar.gz" CACHE STRING "Use FPZIP from compressed file" FORCE)
set (FPZIP_PACKAGE_NAME "fpzip" CACHE STRING "Name of FPZIP package" FORCE)
######
# jpeg
######
- set (JPEG_GIT_URL "https://someurl/jpeg.git" CACHE STRING "Use JPEG from HDF repository" FORCE)
- set (JPEG_GIT_BRANCH "jpeg9c" CACHE STRING "" FORCE)
- #set (JPEG_TGZ_NAME "JPEG9c.tar.gz" CACHE STRING "Use JPEG from compressed file" FORCE)
- set (JPEG_TGZ_NAME "JPEG.tar.gz" CACHE STRING "Use JPEG from compressed file" FORCE)
+ set (JPEG_GIT_URL "No repo www.ijg.org/files" CACHE STRING "Use JPEG from ILG" FORCE)
+ set (JPEG_GIT_BRANCH "v9e" CACHE STRING "" FORCE)
+ set (JPEG_TGZ_ORIGPATH "https://www.ijg.org/files" CACHE STRING "Use PLUGINS from original location" FORCE)
+ set (JPEG_TGZ_NAME "jpegsrc.v9e.tar.gz" CACHE STRING "Use JPEG from compressed file" FORCE)
set (JPEG_PACKAGE_NAME "jpeg" CACHE STRING "Name of JPEG package" FORCE)
######
# lz4
######
set (BUILD_LZ4_LIBRARY_SOURCE ON CACHE BOOL "build the lz4 library within the plugin" FORCE)
- set (LZ4_GIT_URL "https://someurl/lz4.git" CACHE STRING "Use LZ4 from HDF repository" FORCE)
- set (LZ4_GIT_BRANCH "master" CACHE STRING "" FORCE)
- set (LZ4_TGZ_NAME "lz4.tar.gz" CACHE STRING "Use LZ4 from compressed file" FORCE)
+ set (LZ4_GIT_URL "https://github.com/lz4/lz4.git" CACHE STRING "Use LZ4 from GitHub repository" FORCE)
+ set (LZ4_GIT_BRANCH "dev" CACHE STRING "" FORCE)
+ set (LZ4_TGZ_ORIGPATH "https://github.com/lz4/lz4/releases/download/v1.9.4" CACHE STRING "Use PLUGINS from original location" FORCE)
+ set (LZ4_TGZ_NAME "lz4-1.9.4.tar.gz" CACHE STRING "Use LZ4 from compressed file" FORCE)
set (LZ4_PACKAGE_NAME "lz4" CACHE STRING "Name of LZ4 package" FORCE)
######
# lzf
######
- set (LZF_GIT_URL "https://someurl/lzf.git" CACHE STRING "Use LZF from HDF repository" FORCE)
- set (LZF_GIT_BRANCH "master" CACHE STRING "" FORCE)
- set (LZF_TGZ_NAME "lzf.tar.gz" CACHE STRING "Use LZF from compressed file" FORCE)
+ set (LZF_URL "http://software.schmorp.de/pkg/liblzf.html" CACHE STRING "LZF home" FORCE)
+ set (LZF_TGZ_ORIGPATH "http://dist.schmorp.de/liblzf" CACHE STRING "Use LZF from original location" FORCE)
+ set (LZF_TGZ_NAME "liblzf-3.6.tar.gz" CACHE STRING "Use LZF from compressed file" FORCE)
set (LZF_PACKAGE_NAME "lzf" CACHE STRING "Name of LZF package" FORCE)
########
# mafisc
@@ -605,23 +608,26 @@ These five steps are described in detail below.
######
# szf
######
- set (SZF_GIT_URL "https://github.com/disheng222/SZ" CACHE STRING "Use SZ from github repository" FORCE)
- set (SZF_GIT_BRANCH "master" CACHE STRING "" FORCE)
- set (SZF_TGZ_NAME "szf.tar.gz" CACHE STRING "Use SZ from compressed file" FORCE)
+ set (SZ_GIT_URL "https://github.com/szcompressor/SZ.git" CACHE STRING "Use SZ filter from GitHub repository" FORCE)
+ set (SZ_GIT_BRANCH "master" CACHE STRING "" FORCE)
+ set (SZ_TGZ_ORIGPATH "https://github.com/szcompressor/SZ/releases/download/v2.1.12.5" CACHE STRING "Use PLUGINS from original location" FORCE)
+ set (SZ_TGZ_NAME "SZ-2.1.12.5.tar.gz" CACHE STRING "Use SZ filter from compressed file" FORCE)
set (SZF_PACKAGE_NAME "szf" CACHE STRING "Name of SZ package" FORCE)
######
# zfp
######
- set (ZFP_GIT_URL "https://github.com/LLNL/zfp.git" CACHE STRING "Use ZFP from Github" FORCE)
- set (ZFP_GIT_BRANCH "master" CACHE STRING "" FORCE)
- set (ZFP_TGZ_NAME "zfp.tar.gz" CACHE STRING "Use ZFP from compressed file" FORCE)
+ set (ZFP_GIT_URL "https://github.com/LLNL/zfp.git" CACHE STRING "Use ZFP from GitHub repository" FORCE)
+ set (ZFP_GIT_BRANCH "develop" CACHE STRING "" FORCE)
+ set (ZFP_TGZ_ORIGPATH "https://github.com/LLNL/zfp/releases/download/1.0.0" CACHE STRING "Use PLUGINS from original location" FORCE)
+ set (ZFP_TGZ_NAME "zfp-1.0.0.tar.gz" CACHE STRING "Use ZFP from compressed file" FORCE)
set (ZFP_PACKAGE_NAME "zfp" CACHE STRING "Name of ZFP package" FORCE)
######
# zstd
######
- set (ZSTD_GIT_URL "https://github.com/facebook/zstd" CACHE STRING "Use ZSTD from repository" FORCE)
+ set (ZSTD_GIT_URL "https://github.com/facebook/zstd.git" CACHE STRING "Use ZSTD from GitHub repository" FORCE)
set (ZSTD_GIT_BRANCH "dev" CACHE STRING "" FORCE)
- set (ZSTD_TGZ_NAME "zstd.tar.gz" CACHE STRING "Use ZSTD from compressed file" FORCE)
+ set (ZSTD_TGZ_ORIGPATH "https://github.com/facebook/zstd/releases/download/v1.5.5" CACHE STRING "Use PLUGINS from original location" FORCE)
+ set (ZSTD_TGZ_NAME "zstd-1.5.5.tar.gz" CACHE STRING "Use ZSTD from compressed file" FORCE)
set (ZSTD_PACKAGE_NAME "zstd" CACHE STRING "Name of ZSTD package" FORCE)
2. Configure the cache settings
@@ -876,17 +882,26 @@ if (BUILD_TESTING)
---------------- External Library Options ---------------------
HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO GIT TGZ)" "NO"
HDF5_ENABLE_PLUGIN_SUPPORT "Enable PLUGIN Filters" OFF
-HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF
+HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" ON
HDF5_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" ON
-PLUGIN_USE_EXTERNAL "Use External Library Building for PLUGINS" 0
-ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 0
-SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 0
+
+ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 0
+ZLIB_TGZ_ORIGPATH "Use ZLIB from original location" "https://github.com/madler/zlib/releases/download/v1.2.13"
+ZLIB_TGZ_NAME "Use ZLIB from original compressed file" "zlib-1.2.13.tar.gz"
+ZLIB_USE_LOCALCONTENT "Use local file for ZLIB FetchContent" ON
+
+SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 0
if (HDF5_ENABLE_SZIP_SUPPORT)
HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" ON
+LIBAEC_TGZ_ORIGPATH "Use LIBAEC from original location" "https://github.com/MathisRosenhauer/libaec/releases/download/v1.0.6/libaec-1.0.6.tar.gz"
+LIBAEC_TGZ_NAME "Use LIBAEC from original compressed file" "libaec-v1.0.6.tar.gz"
+LIBAEC_USE_LOCALCONTENT "Use local file for LIBAEC FetchContent" ON
+
+PLUGIN_USE_EXTERNAL "Use External Library Building for PLUGINS" 0
if (WINDOWS)
- H5_DEFAULT_PLUGINDIR "%ALLUSERSPROFILE%/hdf5/lib/plugin"
+ H5_DEFAULT_PLUGINDIR "%ALLUSERSPROFILE%/hdf5/lib/plugin"
else ()
- H5_DEFAULT_PLUGINDIR "/usr/local/hdf5/lib/plugin"
+ H5_DEFAULT_PLUGINDIR "/usr/local/hdf5/lib/plugin"
endif ()
if (BUILD_SZIP_WITH_FETCHCONTENT)
LIBAEC_TGZ_ORIGPATH "Use LIBAEC from original location" "https://github.com/MathisRosenhauer/libaec/releases/download/v1.0.6/libaec-1.0.6.tar.gz"
@@ -1060,15 +1075,15 @@ Available configurations presets can be displayed by executing:
Using individual command presets (where is GNUC or MSVC or Clang):
change directory to the hdf5 source folder
- cmake --presets=ci-StdShar-
- cmake --build --presets=ci-StdShar-
- ctest --presets=ci-StdShar-
- cpack --presets=ci-StdShar-
+ cmake --preset ci-StdShar-
+ cmake --build --preset ci-StdShar-
+ ctest --preset ci-StdShar-
+ cpack --preset ci-StdShar-
Using the workflow preset to configure, build, test and package the standard configuration is:
change directory to the hdf5 source folder
- execute "cmake --workflow --presets=ci-StdShar- --fresh"
+ execute "cmake --workflow --preset ci-StdShar- --fresh"
where is GNUC or MSVC or Clang
Creating your own configurations
@@ -1088,7 +1103,7 @@ For instance, to change the support files to use a local directory, edit CMakeUs
"inherits": "ci-base",
"cacheVariables": {
"HDF5_ALLOW_EXTERNAL_SUPPORT": {"type": "STRING", "value": "TGZ"},
- "TGZPATH": {"type": "STRING", "value": "${sourceParentDir}/temp"}
+ "TGZPATH": {"type": "PATH", "value": "${sourceParentDir}/temp"}
}
},
{
diff --git a/release_docs/INSTALL_Cygwin.txt b/release_docs/INSTALL_Cygwin.txt
index a605f4df7f5..c78f61fb584 100644
--- a/release_docs/INSTALL_Cygwin.txt
+++ b/release_docs/INSTALL_Cygwin.txt
@@ -98,6 +98,7 @@ Build, Test and Install HDF5 on Cygwin
The HDF5 source code is distributed in a variety of formats which
can be unpacked with the following commands, each of which creates
+
an `hdf5-1.14.x' directory.
2.1 Non-compressed tar archive (*.tar)
diff --git a/release_docs/NEWSLETTER.txt b/release_docs/NEWSLETTER.txt
index fe4a0fd11fa..084d8921d4b 100644
--- a/release_docs/NEWSLETTER.txt
+++ b/release_docs/NEWSLETTER.txt
@@ -32,4 +32,4 @@ memory leak fixes, etc. do not require entries.
for a few years. We removed the options for using the old SZIP library. All
current szip and libaec options only work for building the libaec library.
-
\ No newline at end of file
+
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index f68775cc622..9e0a5cc9341 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -47,6 +47,39 @@ New Features
Configuration:
-------------
+ - Converted the build of libaec and zlib to use FETCH_CONTENT with CMake.
+
+ Using the CMake FetchContent module, the external filters can populate
+ content at configure time via any method supported by the ExternalProject
+ module. Whereas ExternalProject_Add() downloads at build time, the
+ FetchContent module makes content available immediately, allowing the
+ configure step to use the content in commands like add_subdirectory(),
+ include() or file() operations.
+
+ Removed HDF options for using FETCH_CONTENT explicitly:
+ BUILD_SZIP_WITH_FETCHCONTENT:BOOL
+ BUILD_ZLIB_WITH_FETCHCONTENT:BOOL
+
+ - Thread-safety + static library disabled on Windows w/ CMake
+
+ The thread-safety feature requires hooks in DllMain(), which is only
+ present in the shared library.
+
+ We previously just warned about this, but now any CMake configuration
+ that tries to build thread-safety and the static library will fail.
+ This cannot be overridden with ALLOW_UNSUPPORTED.
+
+ Fixes GitHub issue #3613
+
+ - Autotools builds now build the szip filter by default when an appropriate
+ library is found
+
+ Since libaec is prevalent and BSD-licensed for both encoding and
+ decoding, we build the szip filter by default now.
+
+ Both autotools and CMake build systems will process the szip filter the same as
+ the zlib filter is processed.
+
- Removed CMake cross-compiling variables
* HDF5_USE_PREGEN
@@ -65,17 +98,6 @@ New Features
The functionality of H5detect is now exercised at library startup,
so H5detect has been removed.
- - Thread-safety + static library disabled on Windows w/ CMake
-
- The thread-safety feature requires hooks in DllMain(), which is only
- present in the shared library.
-
- We previously just warned about this, but now any CMake configuration
- that tries to build thread-safety and the static library will fail.
- This cannot be overridden with ALLOW_UNSUPPORTED.
-
- Fixes GitHub issue #3613
-
Library:
--------
@@ -84,11 +106,40 @@ New Features
Parallel Library:
-----------------
- -
+ - Added optimized support for the parallel compression feature when
+ using the multi-dataset I/O API routines collectively
+
+ Previously, calling H5Dwrite_multi/H5Dread_multi collectively in parallel
+ with a list containing one or more filtered datasets would cause HDF5 to
+ break out of the optimized multi-dataset I/O mode and instead perform I/O
+ by looping over each dataset in the I/O request. The library has now been
+ updated to perform I/O in a more optimized manner in this case by first
+ performing I/O on all the filtered datasets at once and then performing
+ I/O on all the unfiltered datasets at once.
Fortran Library:
----------------
+ - Fixed an uninitialized error return value for hdferr
+ to return the error state of the h5aopen_by_idx_f API.
+
+ - Added h5pget_vol_cap_flags_f and related Fortran VOL
+ capability definitions.
+
+ - Fortran async APIs H5A, H5D, H5ES, H5G, H5F, H5L and H5O were added.
+
+ - Added Fortran APIs:
+ h5pset_selection_io_f, h5pget_selection_io_f
+ h5pset_modify_write_buf_f, h5pget_modify_write_buf_f
+
+ - Added Fortran APIs:
+ h5get_free_list_sizes_f, h5dwrite_chunk_f, h5dread_chunk_f,
+ h5fget_info_f, h5lvisit_f, h5lvisit_by_name_f,
+ h5pget_no_selection_io_cause_f, h5pget_mpio_no_collective_cause_f,
+ h5sselect_shape_same_f, h5sselect_intersect_block_f,
+ h5pget_file_space_page_size_f, h5pset_file_space_page_size_f,
+ h5pget_file_space_strategy_f, h5pset_file_space_strategy_f
+
- Removed "-commons" linking option on Darwin, as COMMON and EQUIVALENCE
are no longer used in the Fortran source.
@@ -111,7 +162,7 @@ New Features
High-Level APIs:
----------------
- -
+ - Added Fortran HL API: h5doappend_f
C Packet Table API:
@@ -195,6 +246,17 @@ Bug Fixes since HDF5-1.14.2 release
this optimized conversion and there is no benefit in terms of the I/O
size.
+ - Reading a H5std_string (std::string) via a C++ DataSet previously
+ truncated the string at the first null byte as if reading a C string.
+ Fixed length datasets are now read into H5std_string as a fixed length
+ string of the appropriate size. Variable length datasets will still be
+ truncated at the first null byte.
+
+ Fixes Github issue #3034
+
+ - Fixed write buffer overflow in H5O__alloc_chunk
+
+ The overflow was found by OSS-Fuzz https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=58658
Java Library
------------
@@ -203,7 +265,36 @@ Bug Fixes since HDF5-1.14.2 release
Configuration
-------------
- -
+ - Fixes the ordering of INCLUDES when building with CMake
+
+ Include directories in the source or build tree should come before other
+ directories to prioritize headers in the sources over installed ones.
+
+ Fixes GitHub #1027
+
+ - The accum test now passes on macOS 12+ (Monterey) w/ CMake
+
+ Due to changes in the way macOS handles LD_LIBRARY_PATH, the accum test
+ started failing on macOS 12+ when building with CMake. CMake has been
+ updated to set DYLD_LIBRARY_PATH on macOS and the test now passes.
+
+ Fixes GitHub #2994, #2261, and #1289
+
+ - Changed the default settings used by CMake for the GZIP filter
+
+ The default for the option HDF5_ENABLE_Z_LIB_SUPPORT was OFF. Now the default is ON.
+ This was done to match the defaults used by the autotools configure.ac.
+ In addition, the CMake message level for not finding a suitable filter library was
+ changed from FATAL_ERROR (which would halt the build process) to WARNING (which
+ will print a message to stderr). Associated files and documentation were changed to match.
+
+ In addition, the default settings in the config/cmake/cacheinit.cmake file were changed to
+ allow CMake to disable building the filters if the tgz file could not be found. The option
+ to allow CMake to download the file from the original Github location requires setting
+ the ZLIB_USE_LOCALCONTENT option to OFF for gzip. And setting the LIBAEC_USE_LOCALCONTENT
+ option to OFF for libaec (szip).
+
+ Fixes GitHub issue #2926
Tools
@@ -366,7 +457,6 @@ Platforms Tested
64-bit gfortran GNU Fortran (GCC) 5.2.0
(osx1011test) Intel icc/icpc/ifort version 16.0.2
-
Linux 2.6.32-573.22.1.el6 GNU C (gcc), Fortran (gfortran), C++ (g++)
#1 SMP x86_64 GNU/Linux compilers:
Centos6 Version 4.4.7 20120313
diff --git a/src/H5.c b/src/H5.c
index 91212d1fa73..54b0b18a28c 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -78,13 +78,13 @@ static const unsigned VERS_RELEASE_EXCEPTIONS_SIZE = 0;
#ifdef H5_HAVE_THREADSAFE
H5_api_t H5_g;
#else
-hbool_t H5_libinit_g = FALSE; /* Library hasn't been initialized */
-hbool_t H5_libterm_g = FALSE; /* Library isn't being shutdown */
+bool H5_libinit_g = false; /* Library hasn't been initialized */
+bool H5_libterm_g = false; /* Library isn't being shutdown */
#endif
-char H5_lib_vers_info_g[] = H5_VERS_INFO;
-static hbool_t H5_dont_atexit_g = FALSE;
-H5_debug_t H5_debug_g; /* debugging info */
+char H5_lib_vers_info_g[] = H5_VERS_INFO;
+static bool H5_dont_atexit_g = false;
+H5_debug_t H5_debug_g; /* debugging info */
/*******************/
/* Local Variables */
@@ -150,7 +150,7 @@ H5_init_library(void)
/* Set the 'library initialized' flag as early as possible, to avoid
* possible re-entrancy.
*/
- H5_INIT_GLOBAL = TRUE;
+ H5_INIT_GLOBAL = true;
#ifdef H5_HAVE_PARALLEL
{
@@ -224,7 +224,7 @@ H5_init_library(void)
/* Normal library termination code */
(void)atexit(H5_term_library);
- H5_dont_atexit_g = TRUE;
+ H5_dont_atexit_g = true;
} /* end if */
/*
@@ -275,7 +275,7 @@ H5_init_library(void)
/* Debugging? */
H5__debug_mask("-all");
- H5__debug_mask(HDgetenv("HDF5_DEBUG"));
+ H5__debug_mask(getenv("HDF5_DEBUG"));
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -313,7 +313,7 @@ H5_term_library(void)
goto done;
/* Indicate that the library is being shut down */
- H5_TERM_GLOBAL = TRUE;
+ H5_TERM_GLOBAL = true;
/* Push the API context without checking for errors */
H5CX_push_special();
@@ -371,10 +371,10 @@ H5_term_library(void)
* some dependent modules, first.
*/
const char *name; /* name of the module */
- hbool_t completed; /* true iff this terminator was already
+ bool completed; /* true iff this terminator was already
* completed
*/
- const hbool_t await_prior; /* true iff all prior terminators in the
+ const bool await_prior; /* true iff all prior terminators in the
* list must complete before this
* terminator is attempted
*/
@@ -460,12 +460,12 @@ H5_term_library(void)
/* log a package when its terminator needs to be retried */
pending++;
- nprinted = HDsnprintf(next, nleft, "%s%s",
+ nprinted = snprintf(next, nleft, "%s%s",
(next != loop) ? "," : "", terminator[i].name);
if (nprinted < 0)
continue;
if ((size_t)nprinted >= nleft)
- nprinted = HDsnprintf(next, nleft, "...");
+ nprinted = snprintf(next, nleft, "...");
if (nprinted < 0 || (size_t)nprinted >= nleft)
continue;
nleft -= (size_t)nprinted;
@@ -498,10 +498,10 @@ H5_term_library(void)
} /* end while */
/* Reset flag indicating that the library is being shut down */
- H5_TERM_GLOBAL = FALSE;
+ H5_TERM_GLOBAL = false;
/* Mark library as closed */
- H5_INIT_GLOBAL = FALSE;
+ H5_INIT_GLOBAL = false;
/* Don't pop the API context (i.e. H5CX_pop), since it's been shut down already */
@@ -544,7 +544,7 @@ H5dont_atexit(void)
if (H5_dont_atexit_g)
ret_value = FAIL;
else
- H5_dont_atexit_g = TRUE;
+ H5_dont_atexit_g = true;
FUNC_LEAVE_API_NOFS(ret_value)
} /* end H5dont_atexit() */
@@ -690,10 +690,10 @@ H5get_free_list_sizes(size_t *reg_size /*out*/, size_t *arr_size /*out*/, size_t
static void
H5__debug_mask(const char *s)
{
- FILE *stream = stderr;
- char pkg_name[32], *rest;
- size_t i;
- hbool_t clear;
+ FILE *stream = stderr;
+ char pkg_name[32], *rest;
+ size_t i;
+ bool clear;
while (s && *s) {
@@ -701,15 +701,15 @@ H5__debug_mask(const char *s)
/* Enable or Disable debugging? */
if ('-' == *s) {
- clear = TRUE;
+ clear = true;
s++;
}
else if ('+' == *s) {
- clear = FALSE;
+ clear = false;
s++;
}
else {
- clear = FALSE;
+ clear = false;
} /* end if */
/* Get the name */
@@ -719,24 +719,24 @@ H5__debug_mask(const char *s)
pkg_name[MIN(sizeof(pkg_name) - 1, i)] = '\0';
/* Trace, all, or one? */
- if (!HDstrcmp(pkg_name, "trace")) {
+ if (!strcmp(pkg_name, "trace")) {
H5_debug_g.trace = clear ? NULL : stream;
}
- else if (!HDstrcmp(pkg_name, "ttop")) {
+ else if (!strcmp(pkg_name, "ttop")) {
H5_debug_g.trace = stream;
- H5_debug_g.ttop = (hbool_t)!clear;
+ H5_debug_g.ttop = (bool)!clear;
}
- else if (!HDstrcmp(pkg_name, "ttimes")) {
+ else if (!strcmp(pkg_name, "ttimes")) {
H5_debug_g.trace = stream;
- H5_debug_g.ttimes = (hbool_t)!clear;
+ H5_debug_g.ttimes = (bool)!clear;
}
- else if (!HDstrcmp(pkg_name, "all")) {
+ else if (!strcmp(pkg_name, "all")) {
for (i = 0; i < (size_t)H5_NPKGS; i++)
H5_debug_g.pkg[i].stream = clear ? NULL : stream;
}
else {
for (i = 0; i < (size_t)H5_NPKGS; i++) {
- if (!HDstrcmp(H5_debug_g.pkg[i].name, pkg_name)) {
+ if (!strcmp(H5_debug_g.pkg[i].name, pkg_name)) {
H5_debug_g.pkg[i].stream = clear ? NULL : stream;
break;
} /* end if */
@@ -887,7 +887,7 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum)
const char *s; /* Environment string for disabling version check */
/* Allow different versions of the header files and library? */
- s = HDgetenv("HDF5_DISABLE_VERSION_CHECK");
+ s = getenv("HDF5_DISABLE_VERSION_CHECK");
if (s && isdigit(*s))
disable_version_check = (unsigned int)strtol(s, NULL, 0);
@@ -908,7 +908,7 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum)
fprintf(stderr, "%s", H5build_settings);
/* Bail out now. */
- HDfputs("Bye...\n", stderr);
+ fputs("Bye...\n", stderr);
HDabort();
case 1:
/* continue with a warning */
@@ -923,7 +923,6 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum)
(unsigned)H5_VERS_MAJOR, (unsigned)H5_VERS_MINOR, (unsigned)H5_VERS_RELEASE);
/* Show library build settings if available */
fprintf(stderr, "%s", H5build_settings);
-
break;
default:
/* 2 or higher: continue silently */
@@ -949,7 +948,7 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum)
(unsigned)H5_VERS_MAJOR, (unsigned)H5_VERS_MINOR, (unsigned)H5_VERS_RELEASE);
/* Bail out now. */
- HDfputs("Bye...\n", stderr);
+ fputs("Bye...\n", stderr);
HDabort();
case 1:
/* continue with a warning */
@@ -983,17 +982,17 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum)
* Check only the first sizeof(lib_str) char. Assume the information
* will fit within this size or enough significance.
*/
- HDsnprintf(lib_str, sizeof(lib_str), "HDF5 library version: %d.%d.%d%s%s", H5_VERS_MAJOR,
- H5_VERS_MINOR, H5_VERS_RELEASE, (*substr ? "-" : ""), substr);
-
- if (HDstrcmp(lib_str, H5_lib_vers_info_g) != 0) {
- HDfputs("Warning! Library version information error.\n"
- "The HDF5 library version information are not "
- "consistent in its source code.\nThis is NOT a fatal error "
- "but should be corrected. Setting the environment\n"
- "variable 'HDF5_DISABLE_VERSION_CHECK' to a value of 1 "
- "will suppress\nthis warning.\n",
- stderr);
+ snprintf(lib_str, sizeof(lib_str), "HDF5 library version: %d.%d.%d%s%s", H5_VERS_MAJOR, H5_VERS_MINOR,
+ H5_VERS_RELEASE, (*substr ? "-" : ""), substr);
+
+ if (strcmp(lib_str, H5_lib_vers_info_g) != 0) {
+ fputs("Warning! Library version information error.\n"
+ "The HDF5 library version information are not "
+ "consistent in its source code.\nThis is NOT a fatal error "
+ "but should be corrected. Setting the environment\n"
+ "variable 'HDF5_DISABLE_VERSION_CHECK' to a value of 1 "
+ "will suppress\nthis warning.\n",
+ stderr);
fprintf(stderr,
"Library version information are:\n"
"H5_VERS_MAJOR=%d, H5_VERS_MINOR=%d, H5_VERS_RELEASE=%d, "
@@ -1122,7 +1121,7 @@ H5close(void)
*-------------------------------------------------------------------------
*/
void *H5_ATTR_MALLOC
-H5allocate_memory(size_t size, hbool_t clear)
+H5allocate_memory(size_t size, bool clear)
{
void *ret_value = NULL;
@@ -1212,7 +1211,7 @@ H5free_memory(void *mem)
*-------------------------------------------------------------------------
*/
herr_t
-H5is_library_threadsafe(hbool_t *is_ts /*out*/)
+H5is_library_threadsafe(bool *is_ts /*out*/)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -1221,9 +1220,9 @@ H5is_library_threadsafe(hbool_t *is_ts /*out*/)
if (is_ts) {
#ifdef H5_HAVE_THREADSAFE
- *is_ts = TRUE;
+ *is_ts = true;
#else /* H5_HAVE_THREADSAFE */
- *is_ts = FALSE;
+ *is_ts = false;
#endif /* H5_HAVE_THREADSAFE */
}
else
@@ -1247,7 +1246,7 @@ H5is_library_threadsafe(hbool_t *is_ts /*out*/)
*-------------------------------------------------------------------------
*/
herr_t
-H5is_library_terminating(hbool_t *is_terminating /*out*/)
+H5is_library_terminating(bool *is_terminating /*out*/)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -1277,7 +1276,7 @@ H5is_library_terminating(hbool_t *is_terminating /*out*/)
* Only enabled when the shared Windows library is built with
* thread safety enabled.
*
- * Return: TRUE on success, FALSE on failure
+ * Return: true on success, false on failure
*
*-------------------------------------------------------------------------
*/
@@ -1291,7 +1290,7 @@ DllMain(_In_ HINSTANCE hinstDLL, _In_ DWORD fdwReason, _In_ LPVOID lpvReserved)
* This includes any functions that are called by from here!
*/
- BOOL fOkay = TRUE;
+ BOOL fOkay = true;
switch (fdwReason) {
case DLL_PROCESS_ATTACH:
@@ -1303,20 +1302,20 @@ DllMain(_In_ HINSTANCE hinstDLL, _In_ DWORD fdwReason, _In_ LPVOID lpvReserved)
case DLL_THREAD_ATTACH:
#ifdef H5_HAVE_WIN_THREADS
if (H5TS_win32_thread_enter() < 0)
- fOkay = FALSE;
+ fOkay = false;
#endif /* H5_HAVE_WIN_THREADS */
break;
case DLL_THREAD_DETACH:
#ifdef H5_HAVE_WIN_THREADS
if (H5TS_win32_thread_exit() < 0)
- fOkay = FALSE;
+ fOkay = false;
#endif /* H5_HAVE_WIN_THREADS */
break;
default:
/* Shouldn't get here */
- fOkay = FALSE;
+ fOkay = false;
break;
}
diff --git a/src/H5A.c b/src/H5A.c
index cbb577d601f..c183c85eec3 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -80,11 +80,11 @@ static herr_t H5A__rename_by_name_api_common(hid_t loc_id, const char *obj_name,
const char *new_attr_name, hid_t lapl_id, void **token_ptr,
H5VL_object_t **_vol_obj_ptr);
static herr_t H5A__exists_common(H5VL_object_t *vol_obj, H5VL_loc_params_t *loc_params, const char *attr_name,
- hbool_t *attr_exists, void **token_ptr);
-static herr_t H5A__exists_api_common(hid_t obj_id, const char *attr_name, hbool_t *attr_exists,
- void **token_ptr, H5VL_object_t **_vol_obj_ptr);
+ bool *attr_exists, void **token_ptr);
+static herr_t H5A__exists_api_common(hid_t obj_id, const char *attr_name, bool *attr_exists, void **token_ptr,
+ H5VL_object_t **_vol_obj_ptr);
static herr_t H5A__exists_by_name_api_common(hid_t obj_id, const char *obj_name, const char *attr_name,
- hbool_t *attr_exists, hid_t lapl_id, void **token_ptr,
+ bool *attr_exists, hid_t lapl_id, void **token_ptr,
H5VL_object_t **_vol_obj_ptr);
/*********************/
@@ -104,7 +104,7 @@ static herr_t H5A__exists_by_name_api_common(hid_t obj_id, const char *obj_name,
*
* Purpose: This is the common function for creating HDF5 datasets.
*
- * Return: Success: A attribute ID
+ * Return: Success: An attribute ID
* Failure: H5I_INVALID_HID
*
*-------------------------------------------------------------------------
@@ -129,7 +129,7 @@ H5A__create_common(H5VL_object_t *vol_obj, H5VL_loc_params_t *loc_params, const
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, H5I_INVALID_HID, "unable to create attribute");
/* Register the new attribute and get an ID for it */
- if ((ret_value = H5VL_register(H5I_ATTR, attr, vol_obj->connector, TRUE)) < 0)
+ if ((ret_value = H5VL_register(H5I_ATTR, attr, vol_obj->connector, true)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register attribute for ID");
done:
@@ -146,7 +146,7 @@ H5A__create_common(H5VL_object_t *vol_obj, H5VL_loc_params_t *loc_params, const
*
* Purpose: This is the common function for creating HDF5 attributes
*
- * Return: Success: A attribute ID
+ * Return: Success: An attribute ID
* Failure: H5I_INVALID_HID
*
*-------------------------------------------------------------------------
@@ -172,7 +172,7 @@ H5A__create_api_common(hid_t loc_id, const char *attr_name, hid_t type_id, hid_t
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "attr_name parameter cannot be an empty string");
/* Set up object access arguments */
- if (H5VL_setup_acc_args(loc_id, H5P_CLS_AACC, TRUE, &aapl_id, vol_obj_ptr, &loc_params) < 0)
+ if (H5VL_setup_acc_args(loc_id, H5P_CLS_AACC, true, &aapl_id, vol_obj_ptr, &loc_params) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments");
/* Get correct property list */
@@ -197,11 +197,11 @@ H5A__create_api_common(hid_t loc_id, const char *attr_name, hid_t type_id, hid_t
* hid_t H5Acreate2(loc_id, attr_name, type_id, space_id, acpl_id,
* aapl_id)
*
- * Description: This function creates an attribute which is attached to the
+ * Description: This function creates an attribute that is attached to the
* object specified with 'loc_id'. The name specified with
* 'attr_name' for each attribute for an object must be unique
* for that object. The 'type_id' and 'space_id' are created
- * with the H5T and H5S interfaces respectively. The 'aapl_id'
+ * with the H5T and H5S interfaces, respectively. The 'aapl_id'
* property list is currently unused, but will be used in the
* future for optional attribute access properties. The
* attribute ID returned from this function must be released
@@ -212,8 +212,8 @@ H5A__create_api_common(hid_t loc_id, const char *attr_name, hid_t type_id, hid_t
* const char *attr_name; IN: Name of attribute to locate and open
* hid_t type_id; IN: ID of datatype for attribute
* hid_t space_id; IN: ID of dataspace for attribute
- * hid_t acpl_id; IN: ID of creation property list (currently not used)
- * hid_t aapl_id; IN: Attribute access property list
+ * hid_t acpl_id; IN: ID of creation property list
+ * hid_t aapl_id; IN: ID of Attribute access property list (currently not used)
*
* Return: Success: An ID for the created attribute
*
@@ -243,7 +243,7 @@ H5Acreate2(hid_t loc_id, const char *attr_name, hid_t type_id, hid_t space_id, h
*
* Purpose: Asynchronous version of H5Acreate
*
- * Return: Success: A attribute ID
+ * Return: Success: An attribute ID
* Failure: H5I_INVALID_HID
*
*-------------------------------------------------------------------------
@@ -291,7 +291,7 @@ H5Acreate_async(const char *app_file, const char *app_func, unsigned app_line, h
*
* Purpose: This is the common function for creating HDF5 attributes by name
*
- * Return: Success: A attribute ID
+ * Return: Success: An attribute ID
* Failure: H5I_INVALID_HID
*
*-------------------------------------------------------------------------
@@ -319,11 +319,11 @@ H5A__create_by_name_api_common(hid_t loc_id, const char *obj_name, const char *a
/* obj_name is verified in H5VL_setup_name_args() */
/* Set up object access arguments */
- if (H5VL_setup_name_args(loc_id, obj_name, TRUE, lapl_id, vol_obj_ptr, &loc_params) < 0)
+ if (H5VL_setup_name_args(loc_id, obj_name, true, lapl_id, vol_obj_ptr, &loc_params) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&aapl_id, H5P_CLS_AACC, loc_id, TRUE) < 0)
+ if (H5CX_set_apl(&aapl_id, H5P_CLS_AACC, loc_id, true) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set attribute access property list info");
/* Get correct property list */
@@ -352,14 +352,14 @@ H5A__create_by_name_api_common(hid_t loc_id, const char *obj_name, const char *a
const char *attr_name; IN: Name of attribute to locate and open
hid_t type_id; IN: ID of datatype for attribute
hid_t space_id; IN: ID of dataspace for attribute
- hid_t acpl_id; IN: ID of creation property list (currently not used)
- hid_t aapl_id; IN: Attribute access property list
+ hid_t acpl_id; IN: ID of creation property list
+ hid_t aapl_id; IN: ID of Attribute access property list (currently not used)
hid_t lapl_id; IN: Link access property list
RETURNS
Non-negative on success/H5I_INVALID_HID on failure
DESCRIPTION
- This function creates an attribute which is attached to the object
+ This function creates an attribute that is attached to the object
specified with 'loc_id/obj_name'. The name specified with 'attr_name' for
each attribute for an object must be unique for that object. The 'type_id'
and 'space_id' are created with the H5T and H5S interfaces respectively.
@@ -392,7 +392,7 @@ H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, hid
*
* Purpose: Asynchronous version of H5Acreate_by_name
*
- * Return: Success: A attribute ID
+ * Return: Success: An attribute ID
* Failure: H5I_INVALID_HID
*
*-------------------------------------------------------------------------
@@ -464,7 +464,7 @@ H5A__open_common(H5VL_object_t *vol_obj, H5VL_loc_params_t *loc_params, const ch
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open attribute: '%s'", attr_name);
/* Register the attribute and get an ID for it */
- if ((ret_value = H5VL_register(H5I_ATTR, attr, vol_obj->connector, TRUE)) < 0)
+ if ((ret_value = H5VL_register(H5I_ATTR, attr, vol_obj->connector, true)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register attribute for ID");
done:
@@ -507,7 +507,7 @@ H5A__open_api_common(hid_t loc_id, const char *attr_name, hid_t aapl_id, void **
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be an empty string");
/* Set up object access arguments */
- if (H5VL_setup_acc_args(loc_id, H5P_CLS_AACC, FALSE, &aapl_id, vol_obj_ptr, &loc_params) < 0)
+ if (H5VL_setup_acc_args(loc_id, H5P_CLS_AACC, false, &aapl_id, vol_obj_ptr, &loc_params) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments");
/* Open the attribute */
@@ -629,11 +629,11 @@ H5A__open_by_name_api_common(hid_t loc_id, const char *obj_name, const char *att
/* obj_name is verified in H5VL_setup_name_args() */
/* Set up object access arguments */
- if (H5VL_setup_name_args(loc_id, obj_name, FALSE, lapl_id, vol_obj_ptr, &loc_params) < 0)
+ if (H5VL_setup_name_args(loc_id, obj_name, false, lapl_id, vol_obj_ptr, &loc_params) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&aapl_id, H5P_CLS_AACC, loc_id, FALSE) < 0)
+ if (H5CX_set_apl(&aapl_id, H5P_CLS_AACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set attribute access property list info");
/* Open the attribute */
@@ -652,7 +652,7 @@ H5A__open_by_name_api_common(hid_t loc_id, const char *obj_name, const char *att
USAGE
hid_t H5Aopen_by_name(loc_id, obj_name, attr_name, aapl_id, lapl_id)
hid_t loc_id; IN: Object that attribute is attached to
- const char *obj_name; IN: Name of object relative to location
+ const char *obj_name; IN: Name of the object relative to location
const char *attr_name; IN: Name of attribute to locate and open
hid_t aapl_id; IN: Attribute access property list
hid_t lapl_id; IN: Link access property list
@@ -763,12 +763,12 @@ H5A__open_by_idx_api_common(hid_t loc_id, const char *obj_name, H5_index_t idx_t
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid iteration order specified");
/* Set up object access arguments */
- if (H5VL_setup_idx_args(loc_id, obj_name, idx_type, order, n, FALSE, lapl_id, vol_obj_ptr, &loc_params) <
+ if (H5VL_setup_idx_args(loc_id, obj_name, idx_type, order, n, false, lapl_id, vol_obj_ptr, &loc_params) <
0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&aapl_id, H5P_CLS_AACC, loc_id, FALSE) < 0)
+ if (H5CX_set_apl(&aapl_id, H5P_CLS_AACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set attribute access property list info");
/* Open the attribute */
@@ -788,7 +788,7 @@ H5A__open_by_idx_api_common(hid_t loc_id, const char *obj_name, H5_index_t idx_t
USAGE
hid_t H5Aopen_by_idx(loc_id, obj_ame, idx_type, order, n, aapl_id, lapl_id)
hid_t loc_id; IN: Object that attribute is attached to
- const char *obj_name; IN: Name of object relative to location
+ const char *obj_name; IN: Name of the object relative to location
H5_index_t idx_type; IN: Type of index to use
H5_iter_order_t order; IN: Order to iterate over index
hsize_t n; IN: Index (0-based) attribute to open
@@ -1183,7 +1183,7 @@ H5Aget_type(hid_t attr_id)
Gets a copy of the creation property list for an attribute
USAGE
hssize_t H5Aget_create_plist (attr_id, buf_size, buf)
- hid_t attr_id; IN: Attribute to get name of
+ hid_t attr_id; IN: Attribute to get the name of
RETURNS
This function returns the ID of a copy of the attribute's creation
property list, or H5I_INVALID_HID on failure.
@@ -1234,7 +1234,7 @@ H5Aget_create_plist(hid_t attr_id)
Gets a copy of the name for an attribute
USAGE
hssize_t H5Aget_name (attr_id, buf_size, buf)
- hid_t attr_id; IN: Attribute to get name of
+ hid_t attr_id; IN: Attribute to get the name of
size_t buf_size; IN: The size of the buffer to store the string in.
char *buf; IN: Buffer to store name in
RETURNS
@@ -1287,7 +1287,7 @@ H5Aget_name(hid_t attr_id, size_t buf_size, char *buf /*out*/)
/*-------------------------------------------------------------------------
* Function: H5Aget_name_by_idx
*
- * Purpose: Retrieve name of an attribute, according to the
+ * Purpose: Retrieve the name of an attribute, according to the
* order within an index.
*
* Same pattern of behavior as H5Iget_name.
@@ -1323,7 +1323,7 @@ H5Aget_name_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_i
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access property list info");
/* Get the object */
@@ -1471,7 +1471,7 @@ H5Aget_info_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, H
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid info pointer");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access property list info");
/* Get the object */
@@ -1530,7 +1530,7 @@ H5Aget_info_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_i
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid info pointer");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access property list info");
/* Get the object */
@@ -1580,7 +1580,7 @@ H5A__rename_common(H5VL_object_t *vol_obj, H5VL_loc_params_t *loc_params, const
assert(new_name);
/* Avoid thrashing things if the names are the same */
- if (HDstrcmp(old_name, new_name) != 0) {
+ if (strcmp(old_name, new_name) != 0) {
H5VL_attr_specific_args_t vol_cb_args; /* Arguments to VOL callback */
/* Set up VOL callback arguments */
@@ -1743,7 +1743,7 @@ H5A__rename_by_name_api_common(hid_t loc_id, const char *obj_name, const char *o
/* obj_name is verified in H5VL_setup_name_args() */
/* Set up object access arguments */
- if (H5VL_setup_name_args(loc_id, obj_name, TRUE, lapl_id, vol_obj_ptr, &loc_params) < 0)
+ if (H5VL_setup_name_args(loc_id, obj_name, true, lapl_id, vol_obj_ptr, &loc_params) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set object access arguments");
/* Rename the attribute */
@@ -1855,7 +1855,7 @@ H5Arename_by_name_async(const char *app_file, const char *app_func, unsigned app
The operation receives the ID for the group or dataset being iterated
over ('loc_id'), the name of the current attribute about the object
('attr_name'), the attribute's "info" struct ('ainfo') and the pointer to
- the operator data passed in to H5Aiterate2 ('op_data'). The return values
+ the operator data passed into H5Aiterate2 ('op_data'). The return values
from an operator are:
A. Zero causes the iterator to continue, returning zero when all
attributes have been processed.
@@ -1943,7 +1943,7 @@ H5Aiterate2(hid_t loc_id, H5_index_t idx_type, H5_iter_order_t order, hsize_t *i
The operation receives the ID for the group or dataset being iterated
over ('loc_id'), the name of the current attribute about the object
('attr_name'), the attribute's "info" struct ('ainfo') and the pointer to
- the operator data passed in to H5Aiterate_by_name ('op_data'). The return values
+ the operator data passed into H5Aiterate_by_name ('op_data'). The return values
from an operator are:
A. Zero causes the iterator to continue, returning zero when all
attributes have been processed.
@@ -1977,7 +1977,7 @@ H5Aiterate_by_name(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_i
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access property list info");
/* get the loc object */
@@ -2100,7 +2100,7 @@ H5Adelete_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, hid
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, TRUE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, true) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access property list info");
/* Get the object */
@@ -2172,7 +2172,7 @@ H5Adelete_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_ite
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, TRUE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, true) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access property list info");
/* get the object */
@@ -2303,7 +2303,7 @@ H5Aclose_async(const char *app_file, const char *app_func, unsigned app_line, hi
*--------------------------------------------------------------------------*/
static herr_t
H5A__exists_common(H5VL_object_t *vol_obj, H5VL_loc_params_t *loc_params, const char *attr_name,
- hbool_t *attr_exists, void **token_ptr)
+ bool *attr_exists, void **token_ptr)
{
H5VL_attr_specific_args_t vol_cb_args; /* Arguments to VOL callback */
herr_t ret_value = SUCCEED; /* Return value */
@@ -2340,7 +2340,7 @@ H5A__exists_common(H5VL_object_t *vol_obj, H5VL_loc_params_t *loc_params, const
* Non-negative on success/Negative on failure
*--------------------------------------------------------------------------*/
static herr_t
-H5A__exists_api_common(hid_t obj_id, const char *attr_name, hbool_t *attr_exists, void **token_ptr,
+H5A__exists_api_common(hid_t obj_id, const char *attr_name, bool *attr_exists, void **token_ptr,
H5VL_object_t **_vol_obj_ptr)
{
H5VL_object_t *tmp_vol_obj = NULL; /* Object for loc_id */
@@ -2377,7 +2377,7 @@ H5A__exists_api_common(hid_t obj_id, const char *attr_name, hbool_t *attr_exists
* Purpose: Checks if an attribute with a given name exists on an opened
* object.
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: Negative
*
*-------------------------------------------------------------------------
@@ -2385,14 +2385,14 @@ H5A__exists_api_common(hid_t obj_id, const char *attr_name, hbool_t *attr_exists
htri_t
H5Aexists(hid_t obj_id, const char *attr_name)
{
- hbool_t exists; /* Flag for attribute existence */
- htri_t ret_value = FAIL; /* Return value */
+ bool exists; /* Flag for attribute existence */
+ htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("t", "i*s", obj_id, attr_name);
/* Synchronously check if an attribute exists */
- exists = FALSE;
+ exists = false;
if (H5A__exists_api_common(obj_id, attr_name, &exists, NULL, NULL) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't synchronously check if attribute exists");
@@ -2452,9 +2452,8 @@ H5Aexists_async(const char *app_file, const char *app_func, unsigned app_line, h
* Non-negative on success/Negative on failure
*--------------------------------------------------------------------------*/
static herr_t
-H5A__exists_by_name_api_common(hid_t loc_id, const char *obj_name, const char *attr_name,
- hbool_t *attr_exists, hid_t lapl_id, void **token_ptr,
- H5VL_object_t **_vol_obj_ptr)
+H5A__exists_by_name_api_common(hid_t loc_id, const char *obj_name, const char *attr_name, bool *attr_exists,
+ hid_t lapl_id, void **token_ptr, H5VL_object_t **_vol_obj_ptr)
{
H5VL_object_t *tmp_vol_obj = NULL; /* Object for loc_id */
H5VL_object_t **vol_obj_ptr =
@@ -2474,7 +2473,7 @@ H5A__exists_by_name_api_common(hid_t loc_id, const char *obj_name, const char *a
/* obj_name is verified in H5VL_setup_name_args() */
/* Set up object access arguments */
- if (H5VL_setup_name_args(loc_id, obj_name, FALSE, lapl_id, vol_obj_ptr, &loc_params) < 0)
+ if (H5VL_setup_name_args(loc_id, obj_name, false, lapl_id, vol_obj_ptr, &loc_params) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set object access arguments");
/* Check if the attribute exists */
@@ -2490,7 +2489,7 @@ H5A__exists_by_name_api_common(hid_t loc_id, const char *obj_name, const char *a
*
* Purpose: Checks if an attribute with a given name exists on an object.
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: Negative
*
*-------------------------------------------------------------------------
@@ -2498,14 +2497,14 @@ H5A__exists_by_name_api_common(hid_t loc_id, const char *obj_name, const char *a
htri_t
H5Aexists_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, hid_t lapl_id)
{
- hbool_t exists; /* Flag for attribute existence */
- htri_t ret_value = FAIL; /* Return value */
+ bool exists; /* Flag for attribute existence */
+ htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE4("t", "i*s*si", loc_id, obj_name, attr_name, lapl_id);
/* Synchronously check if an attribute exists */
- exists = FALSE;
+ exists = false;
if (H5A__exists_by_name_api_common(loc_id, obj_name, attr_name, &exists, lapl_id, NULL, NULL) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't synchronously determine if attribute exists by name");
diff --git a/src/H5AC.c b/src/H5AC.c
index f698bfe23fe..802ccddecd8 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -56,7 +56,7 @@
/* Local Prototypes */
/********************/
-static herr_t H5AC__check_if_write_permitted(const H5F_t *f, hbool_t *write_permitted_ptr);
+static herr_t H5AC__check_if_write_permitted(const H5F_t *f, bool *write_permitted_ptr);
static herr_t H5AC__ext_config_2_int_config(const H5AC_cache_config_t *ext_conf_ptr,
H5C_auto_size_ctl_t *int_conf_ptr);
#if H5AC_DO_TAGGING_SANITY_CHECKS
@@ -73,7 +73,7 @@ static herr_t H5AC__verify_tag(const H5AC_class_t *type);
#ifdef H5_HAVE_PARALLEL
/* Environment variable for collective API sanity checks */
-hbool_t H5_coll_api_sanity_check_g = false;
+bool H5_coll_api_sanity_check_g = false;
#endif /* H5_HAVE_PARALLEL */
/*******************/
@@ -143,10 +143,10 @@ H5AC_init(void)
{
const char *s; /* String for environment variables */
- s = HDgetenv("H5_COLL_API_SANITY_CHECK");
+ s = getenv("H5_COLL_API_SANITY_CHECK");
if (s && isdigit(*s)) {
long env_val = strtol(s, NULL, 0);
- H5_coll_api_sanity_check_g = (0 == env_val) ? FALSE : TRUE;
+ H5_coll_api_sanity_check_g = (0 == env_val) ? false : true;
}
}
#endif /* H5_HAVE_PARALLEL */
@@ -181,18 +181,18 @@ H5AC_term_package(void)
* metadata cache image load is pending (i.e. will be executed
* on the next protect or insert)
*
- * Returns TRUE if a cache image load is pending, and FALSE
+ * Returns true if a cache image load is pending, and false
* if not. Throws an assertion failure on error.
*
- * Return: TRUE if a cache image load is pending, and FALSE otherwise.
+ * Return: true if a cache image load is pending, and false otherwise.
*
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
H5AC_cache_image_pending(const H5F_t *f)
{
- H5C_t *cache_ptr;
- hbool_t ret_value = FALSE; /* Return value */
+ H5C_t *cache_ptr;
+ bool ret_value = false; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -268,7 +268,7 @@ H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr, H5AC_cache_image_co
aux_ptr->mpi_comm = mpi_comm;
aux_ptr->mpi_rank = mpi_rank;
aux_ptr->mpi_size = mpi_size;
- aux_ptr->write_permitted = FALSE;
+ aux_ptr->write_permitted = false;
aux_ptr->dirty_bytes_threshold = H5AC__DEFAULT_DIRTY_BYTES_THRESHOLD;
aux_ptr->dirty_bytes = 0;
aux_ptr->metadata_write_strategy = H5AC__DEFAULT_METADATA_WRITE_STRATEGY;
@@ -288,7 +288,7 @@ H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr, H5AC_cache_image_co
aux_ptr->sync_point_done = NULL;
aux_ptr->p0_image_len = 0;
- HDsnprintf(prefix, sizeof(prefix), "%d:", mpi_rank);
+ snprintf(prefix, sizeof(prefix), "%d:", mpi_rank);
if (mpi_rank == 0) {
if (NULL == (aux_ptr->d_slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL)))
@@ -308,11 +308,11 @@ H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr, H5AC_cache_image_co
if (aux_ptr->mpi_rank == 0)
f->shared->cache = H5C_create(H5AC__DEFAULT_MAX_CACHE_SIZE, H5AC__DEFAULT_MIN_CLEAN_SIZE,
(H5AC_NTYPES - 1), H5AC_class_s, H5AC__check_if_write_permitted,
- TRUE, H5AC__log_flushed_entry, (void *)aux_ptr);
+ true, H5AC__log_flushed_entry, (void *)aux_ptr);
else
f->shared->cache =
H5C_create(H5AC__DEFAULT_MAX_CACHE_SIZE, H5AC__DEFAULT_MIN_CLEAN_SIZE, (H5AC_NTYPES - 1),
- H5AC_class_s, H5AC__check_if_write_permitted, TRUE, NULL, (void *)aux_ptr);
+ H5AC_class_s, H5AC__check_if_write_permitted, true, NULL, (void *)aux_ptr);
} /* end if */
else {
#endif /* H5_HAVE_PARALLEL */
@@ -322,7 +322,7 @@ H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr, H5AC_cache_image_co
*/
f->shared->cache =
H5C_create(H5AC__DEFAULT_MAX_CACHE_SIZE, H5AC__DEFAULT_MIN_CLEAN_SIZE, (H5AC_NTYPES - 1),
- H5AC_class_s, H5AC__check_if_write_permitted, TRUE, NULL, NULL);
+ H5AC_class_s, H5AC__check_if_write_permitted, true, NULL, NULL);
#ifdef H5_HAVE_PARALLEL
} /* end else */
#endif /* H5_HAVE_PARALLEL */
@@ -400,8 +400,8 @@ H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr, H5AC_cache_image_co
herr_t
H5AC_dest(H5F_t *f)
{
- hbool_t log_enabled; /* TRUE if logging was set up */
- hbool_t curr_logging; /* TRUE if currently logging */
+ bool log_enabled; /* true if logging was set up */
+ bool curr_logging; /* true if currently logging */
#ifdef H5_HAVE_PARALLEL
H5AC_aux_t *aux_ptr = NULL;
#endif /* H5_HAVE_PARALLEL */
@@ -435,7 +435,7 @@ H5AC_dest(H5F_t *f)
#ifdef H5_HAVE_PARALLEL
/* destroying the cache, so clear all collective entries */
- if (H5C_clear_coll_entries(f->shared->cache, FALSE) < 0)
+ if (H5C_clear_coll_entries(f->shared->cache, false) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTSET, FAIL, "can't clear collective entries");
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(f->shared->cache);
@@ -459,14 +459,14 @@ H5AC_dest(H5F_t *f)
*/
if (H5F_ACC_RDWR & H5F_INTENT(f)) {
/* enable and load the skip list */
- if (H5C_set_slist_enabled(f->shared->cache, TRUE, FALSE) < 0)
+ if (H5C_set_slist_enabled(f->shared->cache, true, false) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "can't enable skip list");
if (H5AC__flush_entries(f) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush");
/* disable the skip list -- should be empty */
- if (H5C_set_slist_enabled(f->shared->cache, FALSE, FALSE) < 0)
+ if (H5C_set_slist_enabled(f->shared->cache, false, false) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "can't disable skip list");
} /* end if */
} /* end if */
@@ -606,7 +606,7 @@ H5AC_flush(H5F_t *f)
#ifdef H5_HAVE_PARALLEL
/* flushing the cache, so clear all collective entries */
- if (H5C_clear_coll_entries(f->shared->cache, FALSE) < 0)
+ if (H5C_clear_coll_entries(f->shared->cache, false) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "H5C_clear_coll_entries() failed");
/* Attempt to flush all entries from rank 0 & Bcast clean list to other ranks */
@@ -649,15 +649,15 @@ H5AC_flush(H5F_t *f)
herr_t
H5AC_get_entry_status(const H5F_t *f, haddr_t addr, unsigned *status)
{
- hbool_t in_cache; /* Entry @ addr is in the cache */
- hbool_t is_dirty; /* Entry @ addr is in the cache and dirty */
- hbool_t is_protected; /* Entry @ addr is in the cache and protected */
- hbool_t is_pinned; /* Entry @ addr is in the cache and pinned */
- hbool_t is_corked;
- hbool_t is_flush_dep_child; /* Entry @ addr is in the cache and is a flush dependency child */
- hbool_t is_flush_dep_parent; /* Entry @ addr is in the cache and is a flush dependency parent */
- hbool_t image_is_up_to_date; /* Entry @ addr is in the cache and has an up to date image */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool in_cache; /* Entry @ addr is in the cache */
+ bool is_dirty; /* Entry @ addr is in the cache and dirty */
+ bool is_protected; /* Entry @ addr is in the cache and protected */
+ bool is_pinned; /* Entry @ addr is in the cache and pinned */
+ bool is_corked;
+ bool is_flush_dep_child; /* Entry @ addr is in the cache and is a flush dependency child */
+ bool is_flush_dep_parent; /* Entry @ addr is in the cache and is a flush dependency parent */
+ bool image_is_up_to_date; /* Entry @ addr is in the cache and has an up to date image */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -771,7 +771,7 @@ H5AC_insert_entry(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *thing,
*-------------------------------------------------------------------------
*/
herr_t
-H5AC_load_cache_image_on_next_protect(H5F_t *f, haddr_t addr, hsize_t len, hbool_t rw)
+H5AC_load_cache_image_on_next_protect(H5F_t *f, haddr_t addr, hsize_t len, bool rw)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -1127,7 +1127,7 @@ H5AC_prep_for_file_flush(H5F_t *f)
assert(f->shared);
assert(f->shared->cache);
- if (H5C_set_slist_enabled(f->shared->cache, TRUE, FALSE) < 0)
+ if (H5C_set_slist_enabled(f->shared->cache, true, false) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "can't enable skip list");
done:
@@ -1168,7 +1168,7 @@ H5AC_secure_from_file_flush(H5F_t *f)
assert(f->shared);
assert(f->shared->cache);
- if (H5C_set_slist_enabled(f->shared->cache, FALSE, FALSE) < 0)
+ if (H5C_set_slist_enabled(f->shared->cache, false, false) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "can't disable skip list");
done:
@@ -1479,7 +1479,7 @@ H5AC_destroy_flush_dependency(void *parent_thing, void *child_thing)
* argument must be the value returned by that call to
* H5AC_protect().
*
- * If the deleted flag is TRUE, simply remove the target entry
+ * If the deleted flag is true, simply remove the target entry
* from the cache, clear it, and free it without writing it to
* disk.
*
@@ -1504,8 +1504,8 @@ H5AC_destroy_flush_dependency(void *parent_thing, void *child_thing)
herr_t
H5AC_unprotect(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *thing, unsigned flags)
{
- hbool_t dirtied;
- hbool_t deleted;
+ bool dirtied;
+ bool deleted;
#ifdef H5_HAVE_PARALLEL
H5AC_aux_t *aux_ptr = NULL;
#endif /* H5_HAVE_PARALLEL */
@@ -1526,8 +1526,8 @@ H5AC_unprotect(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *thing, un
assert(((H5AC_info_t *)thing)->type == type);
dirtied =
- (hbool_t)(((flags & H5AC__DIRTIED_FLAG) == H5AC__DIRTIED_FLAG) || (((H5AC_info_t *)thing)->dirtied));
- deleted = (hbool_t)((flags & H5C__DELETED_FLAG) == H5C__DELETED_FLAG);
+ (bool)(((flags & H5AC__DIRTIED_FLAG) == H5AC__DIRTIED_FLAG) || (((H5AC_info_t *)thing)->dirtied));
+ deleted = (bool)((flags & H5C__DELETED_FLAG) == H5C__DELETED_FLAG);
/* Check if the size changed out from underneath us, if we're not deleting
* the entry.
@@ -1544,7 +1544,7 @@ H5AC_unprotect(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *thing, un
#ifdef H5_HAVE_PARALLEL
if (NULL != (aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(f->shared->cache))) {
- if (dirtied && ((H5AC_info_t *)thing)->is_dirty == FALSE)
+ if (dirtied && ((H5AC_info_t *)thing)->is_dirty == false)
if (H5AC__log_dirtied_entry((H5AC_info_t *)thing) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "can't log dirtied entry");
@@ -1591,7 +1591,7 @@ herr_t
H5AC_get_cache_auto_resize_config(const H5AC_t *cache_ptr, H5AC_cache_config_t *config_ptr)
{
H5C_auto_size_ctl_t internal_config;
- hbool_t evictions_enabled;
+ bool evictions_enabled;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1609,11 +1609,11 @@ H5AC_get_cache_auto_resize_config(const H5AC_t *cache_ptr, H5AC_cache_config_t *
/* Set the information to return */
if (internal_config.rpt_fcn == NULL)
- config_ptr->rpt_fcn_enabled = FALSE;
+ config_ptr->rpt_fcn_enabled = false;
else
- config_ptr->rpt_fcn_enabled = TRUE;
- config_ptr->open_trace_file = FALSE;
- config_ptr->close_trace_file = FALSE;
+ config_ptr->rpt_fcn_enabled = true;
+ config_ptr->open_trace_file = false;
+ config_ptr->close_trace_file = false;
config_ptr->trace_file_name[0] = '\0';
config_ptr->evictions_enabled = evictions_enabled;
config_ptr->set_initial_size = internal_config.set_initial_size;
@@ -1694,7 +1694,7 @@ H5AC_get_cache_size(const H5AC_t *cache_ptr, size_t *max_size_ptr, size_t *min_c
*-------------------------------------------------------------------------
*/
herr_t
-H5AC_get_cache_flush_in_progress(H5AC_t *cache_ptr, hbool_t *flush_in_progress_ptr)
+H5AC_get_cache_flush_in_progress(H5AC_t *cache_ptr, bool *flush_in_progress_ptr)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -1797,7 +1797,7 @@ H5AC_set_cache_auto_resize_config(H5AC_t *cache_ptr, const H5AC_cache_config_t *
* This will be trace output until we create a special API call. JSON
* output is generated when logging is controlled by the H5P calls.
*/
- if (H5C_log_set_up((H5C_t *)cache_ptr, config_ptr->trace_file_name, H5C_LOG_STYLE_TRACE, TRUE) < 0)
+ if (H5C_log_set_up((H5C_t *)cache_ptr, config_ptr->trace_file_name, H5C_LOG_STYLE_TRACE, true) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "mdc logging setup failed");
}
@@ -1866,7 +1866,7 @@ H5AC_validate_config(const H5AC_cache_config_t *config_ptr)
if (config_ptr->version != H5AC__CURR_CACHE_CONFIG_VERSION)
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Unknown config version");
- /* don't bother to test trace_file_name unless open_trace_file is TRUE */
+ /* don't bother to test trace_file_name unless open_trace_file is true */
if (config_ptr->open_trace_file) {
size_t name_len;
@@ -1874,14 +1874,14 @@ H5AC_validate_config(const H5AC_cache_config_t *config_ptr)
* open the file, so we will content ourselves with a couple of
* sanity checks on the length of the file name.
*/
- name_len = HDstrlen(config_ptr->trace_file_name);
+ name_len = strlen(config_ptr->trace_file_name);
if (name_len == 0)
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "config_ptr->trace_file_name is empty");
else if (name_len > H5AC__MAX_TRACE_FILE_NAME_LEN)
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "config_ptr->trace_file_name too long");
} /* end if */
- if ((config_ptr->evictions_enabled == FALSE) &&
+ if ((config_ptr->evictions_enabled == false) &&
((config_ptr->incr_mode != H5C_incr__off) || (config_ptr->flash_incr_mode != H5C_flash_incr__off) ||
(config_ptr->decr_mode != H5C_decr__off)))
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Can't disable evictions while auto-resize is enabled");
@@ -1979,12 +1979,12 @@ H5AC__check_if_write_permitted(const H5F_t
H5_ATTR_UNUSED
#endif /* H5_HAVE_PARALLEL */
*f,
- hbool_t *write_permitted_ptr)
+ bool *write_permitted_ptr)
{
#ifdef H5_HAVE_PARALLEL
H5AC_aux_t *aux_ptr = NULL;
#endif /* H5_HAVE_PARALLEL */
- hbool_t write_permitted = TRUE;
+ bool write_permitted = true;
FUNC_ENTER_PACKAGE_NOERR
@@ -1999,7 +1999,7 @@ H5AC__check_if_write_permitted(const H5F_t
(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED))
write_permitted = aux_ptr->write_permitted;
else
- write_permitted = FALSE;
+ write_permitted = false;
} /* end if */
#endif /* H5_HAVE_PARALLEL */
@@ -2201,7 +2201,7 @@ H5AC_flush_tagged_metadata(H5F_t *f, haddr_t metadata_tag)
*------------------------------------------------------------------------------
*/
herr_t
-H5AC_evict_tagged_metadata(H5F_t *f, haddr_t metadata_tag, hbool_t match_global)
+H5AC_evict_tagged_metadata(H5F_t *f, haddr_t metadata_tag, bool match_global)
{
/* Variable Declarations */
herr_t ret_value = SUCCEED;
@@ -2292,7 +2292,7 @@ H5AC_get_tag(const void *thing, haddr_t *tag)
*-------------------------------------------------------------------------
*/
herr_t
-H5AC_cork(H5F_t *f, haddr_t obj_addr, unsigned action, hbool_t *corked)
+H5AC_cork(H5F_t *f, haddr_t obj_addr, unsigned action, bool *corked)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -2313,7 +2313,7 @@ H5AC_cork(H5F_t *f, haddr_t obj_addr, unsigned action, hbool_t *corked)
if (action == H5AC__GET_CORKED) {
assert(corked);
if (H5C_get_num_objs_corked(f->shared->cache) == 0) {
- *corked = FALSE;
+ *corked = false;
HGOTO_DONE(SUCCEED);
}
}
diff --git a/src/H5ACdbg.c b/src/H5ACdbg.c
index 914040f9b63..37d9ca8dcdc 100644
--- a/src/H5ACdbg.c
+++ b/src/H5ACdbg.c
@@ -81,7 +81,7 @@ H5AC_stats(const H5F_t *f)
assert(f->shared->cache);
/* at present, this can't fail */
- (void)H5C_stats(f->shared->cache, H5F_OPEN_NAME(f), FALSE);
+ (void)H5C_stats(f->shared->cache, H5F_OPEN_NAME(f), false);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5AC_stats() */
@@ -186,13 +186,13 @@ H5AC_get_entry_ptr_from_addr(const H5F_t *f, haddr_t addr, void **entry_ptr_ptr)
* of protect / unprotect calls prior to this call.
*
* If either the parent or the child is not in the metadata
- * cache, the function sets *fd_exists_ptr to FALSE.
+ * cache, the function sets *fd_exists_ptr to false.
*
* If both are in the cache, the child's list of parents is
* searched for the proposed parent. If the proposed parent
* is found in the child's parent list, the function sets
- * *fd_exists_ptr to TRUE. In all other non-error cases,
- * the function sets *fd_exists_ptr FALSE.
+ * *fd_exists_ptr to true. In all other non-error cases,
+ * the function sets *fd_exists_ptr false.
*
* Return: SUCCEED on success/FAIL on failure. Note that
* *fd_exists_ptr is undefined on failure.
@@ -201,7 +201,7 @@ H5AC_get_entry_ptr_from_addr(const H5F_t *f, haddr_t addr, void **entry_ptr_ptr)
*/
#ifndef NDEBUG
herr_t
-H5AC_flush_dependency_exists(H5F_t *f, haddr_t parent_addr, haddr_t child_addr, hbool_t *fd_exists_ptr)
+H5AC_flush_dependency_exists(H5F_t *f, haddr_t parent_addr, haddr_t child_addr, bool *fd_exists_ptr)
{
H5C_t *cache_ptr; /* Ptr to cache */
herr_t ret_value = FAIL; /* Return value */
@@ -228,12 +228,12 @@ H5AC_flush_dependency_exists(H5F_t *f, haddr_t parent_addr, haddr_t child_addr,
* type field contains the expected value.
*
* If the specified entry is in cache, *in_cache_ptr is set
- * to TRUE, and *type_ok_ptr is set to TRUE or FALSE depending
+ * to true, and *type_ok_ptr is set to true or false depending
* on whether the entries type field matches the
* expected_type parameter
*
* If the target entry is not in cache, *in_cache_ptr is
- * set to FALSE, and *type_ok_ptr is undefined.
+ * set to false, and *type_ok_ptr is undefined.
*
* Note that this function is only defined if NDEBUG
* is not defined.
@@ -247,8 +247,8 @@ H5AC_flush_dependency_exists(H5F_t *f, haddr_t parent_addr, haddr_t child_addr,
*/
#ifndef NDEBUG
herr_t
-H5AC_verify_entry_type(const H5F_t *f, haddr_t addr, const H5AC_class_t *expected_type, hbool_t *in_cache_ptr,
- hbool_t *type_ok_ptr)
+H5AC_verify_entry_type(const H5F_t *f, haddr_t addr, const H5AC_class_t *expected_type, bool *in_cache_ptr,
+ bool *type_ok_ptr)
{
H5C_t *cache_ptr;
herr_t ret_value = SUCCEED; /* Return value */
@@ -279,11 +279,11 @@ H5AC_verify_entry_type(const H5F_t *f, haddr_t addr, const H5AC_class_t *expecte
*-------------------------------------------------------------------------
*/
#ifndef NDEBUG
-hbool_t
+bool
H5AC_get_serialization_in_progress(H5F_t *f)
{
- H5C_t *cache_ptr;
- hbool_t ret_value = FALSE; /* Return value */
+ H5C_t *cache_ptr;
+ bool ret_value = false; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -307,19 +307,19 @@ H5AC_get_serialization_in_progress(H5F_t *f)
* metadata cache are clean from the outermost ring, inwards
* to the inner ring specified.
*
- * Returns TRUE if all specified rings are clean, and FALSE
+ * Returns true if all specified rings are clean, and false
* if not. Throws an assertion failure on error.
*
- * Return: TRUE if the indicated ring(s) are clean, and FALSE otherwise.
+ * Return: true if the indicated ring(s) are clean, and false otherwise.
*
*-------------------------------------------------------------------------
*/
#ifndef NDEBUG
-hbool_t
+bool
H5AC_cache_is_clean(const H5F_t *f, H5AC_ring_t inner_ring)
{
- H5C_t *cache_ptr;
- hbool_t ret_value = FALSE; /* Return value */
+ H5C_t *cache_ptr;
+ bool ret_value = false; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
diff --git a/src/H5ACmpio.c b/src/H5ACmpio.c
index d3d5f9f65ef..cdebe80a3b6 100644
--- a/src/H5ACmpio.c
+++ b/src/H5ACmpio.c
@@ -699,7 +699,7 @@ H5AC__log_dirtied_entry(const H5AC_info_t *entry_ptr)
/* Sanity checks */
assert(entry_ptr);
- assert(entry_ptr->is_dirty == FALSE);
+ assert(entry_ptr->is_dirty == false);
cache_ptr = entry_ptr->cache_ptr;
assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
@@ -772,7 +772,7 @@ H5AC__log_cleaned_entry(const H5AC_info_t *entry_ptr)
/* Sanity check */
assert(entry_ptr);
- assert(entry_ptr->is_dirty == FALSE);
+ assert(entry_ptr->is_dirty == false);
cache_ptr = entry_ptr->cache_ptr;
assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
@@ -822,9 +822,9 @@ H5AC__log_cleaned_entry(const H5AC_info_t *entry_ptr)
*-------------------------------------------------------------------------
*/
herr_t
-H5AC__log_flushed_entry(H5C_t *cache_ptr, haddr_t addr, hbool_t was_dirty, unsigned flags)
+H5AC__log_flushed_entry(H5C_t *cache_ptr, haddr_t addr, bool was_dirty, unsigned flags)
{
- hbool_t cleared;
+ bool cleared;
H5AC_aux_t *aux_ptr;
H5AC_slist_entry_t *slist_entry_ptr = NULL;
herr_t ret_value = SUCCEED; /* Return value */
@@ -986,8 +986,8 @@ H5AC__log_moved_entry(const H5F_t *f, haddr_t old_addr, haddr_t new_addr)
{
H5AC_t *cache_ptr;
H5AC_aux_t *aux_ptr;
- hbool_t entry_in_cache;
- hbool_t entry_dirty;
+ bool entry_in_cache;
+ bool entry_dirty;
size_t entry_size;
herr_t ret_value = SUCCEED; /* Return value */
@@ -1203,14 +1203,14 @@ H5AC__propagate_and_apply_candidate_list(H5F_t *f)
*/
/* Enable writes during this operation */
- aux_ptr->write_permitted = TRUE;
+ aux_ptr->write_permitted = true;
/* Apply the candidate list */
result = H5C_apply_candidate_list(f, cache_ptr, num_candidates, candidates_list_ptr,
aux_ptr->mpi_rank, aux_ptr->mpi_size);
/* Disable writes again */
- aux_ptr->write_permitted = FALSE;
+ aux_ptr->write_permitted = false;
/* Check for error on the write operation */
if (result < 0)
@@ -1613,14 +1613,14 @@ H5AC__rsp__dist_md_write__flush(H5F_t *f)
HMPI_GOTO_ERROR(FAIL, "MPI_Barrier failed", mpi_result)
/* Enable writes during this operation */
- aux_ptr->write_permitted = TRUE;
+ aux_ptr->write_permitted = true;
/* Apply the candidate list */
result = H5C_apply_candidate_list(f, cache_ptr, num_entries, haddr_buf_ptr, aux_ptr->mpi_rank,
aux_ptr->mpi_size);
/* Disable writes again */
- aux_ptr->write_permitted = FALSE;
+ aux_ptr->write_permitted = false;
/* Check for error on the write operation */
if (result < 0)
@@ -1715,7 +1715,7 @@ H5AC__rsp__dist_md_write__flush_to_min_clean(H5F_t *f)
{
H5AC_t *cache_ptr;
H5AC_aux_t *aux_ptr;
- hbool_t evictions_enabled;
+ bool evictions_enabled;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1819,13 +1819,13 @@ H5AC__rsp__p0_only__flush(H5F_t *f)
herr_t result;
/* Enable writes during this operation */
- aux_ptr->write_permitted = TRUE;
+ aux_ptr->write_permitted = true;
/* Flush the cache */
result = H5C_flush_cache(f, H5AC__NO_FLAGS_SET);
/* Disable writes again */
- aux_ptr->write_permitted = FALSE;
+ aux_ptr->write_permitted = false;
/* Check for error on the write operation */
if (result < 0) {
@@ -1897,7 +1897,7 @@ H5AC__rsp__p0_only__flush_to_min_clean(H5F_t *f)
{
H5AC_t *cache_ptr;
H5AC_aux_t *aux_ptr;
- hbool_t evictions_enabled;
+ bool evictions_enabled;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1941,13 +1941,13 @@ H5AC__rsp__p0_only__flush_to_min_clean(H5F_t *f)
*/
/* Enable writes during this operation */
- aux_ptr->write_permitted = TRUE;
+ aux_ptr->write_permitted = true;
/* Flush the cache */
result = H5C_flush_to_min_clean(f);
/* Disable writes again */
- aux_ptr->write_permitted = FALSE;
+ aux_ptr->write_permitted = false;
/* Check for error on the write operation */
if (result < 0) {
@@ -2035,7 +2035,7 @@ H5AC__run_sync_point(H5F_t *f, int sync_point_op)
* order of the collectively accessed entries except through collective
* access.
*/
- if (H5C_clear_coll_entries(cache_ptr, TRUE) < 0)
+ if (H5C_clear_coll_entries(cache_ptr, true) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "H5C_clear_coll_entries() failed.");
switch (aux_ptr->metadata_write_strategy) {
diff --git a/src/H5ACpkg.h b/src/H5ACpkg.h
index 535eabd5ff7..e0867f4ebe6 100644
--- a/src/H5ACpkg.h
+++ b/src/H5ACpkg.h
@@ -204,49 +204,49 @@ H5FL_EXTERN(H5AC_aux_t);
* H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED.
*
* dirty_bytes_propagations: This field only exists when the
- * H5AC_DEBUG_DIRTY_BYTES_CREATION #define is TRUE.
+ * H5AC_DEBUG_DIRTY_BYTES_CREATION #define is true.
*
* It is used to track the number of times the cleaned list
* has been propagated from process 0 to the other
* processes.
*
* unprotect_dirty_bytes: This field only exists when the
- * H5AC_DEBUG_DIRTY_BYTES_CREATION #define is TRUE.
+ * H5AC_DEBUG_DIRTY_BYTES_CREATION #define is true.
*
* It is used to track the number of dirty bytes created
* via unprotect operations since the last time the cleaned
* list was propagated.
*
* unprotect_dirty_bytes_updates: This field only exists when the
- * H5AC_DEBUG_DIRTY_BYTES_CREATION #define is TRUE.
+ * H5AC_DEBUG_DIRTY_BYTES_CREATION #define is true.
*
* It is used to track the number of times dirty bytes have
* been created via unprotect operations since the last time
* the cleaned list was propagated.
*
* insert_dirty_bytes: This field only exists when the
- * H5AC_DEBUG_DIRTY_BYTES_CREATION #define is TRUE.
+ * H5AC_DEBUG_DIRTY_BYTES_CREATION #define is true.
*
* It is used to track the number of dirty bytes created
* via insert operations since the last time the cleaned
* list was propagated.
*
* insert_dirty_bytes_updates: This field only exists when the
- * H5AC_DEBUG_DIRTY_BYTES_CREATION #define is TRUE.
+ * H5AC_DEBUG_DIRTY_BYTES_CREATION #define is true.
*
* It is used to track the number of times dirty bytes have
* been created via insert operations since the last time
* the cleaned list was propagated.
*
* move_dirty_bytes: This field only exists when the
- * H5AC_DEBUG_DIRTY_BYTES_CREATION #define is TRUE.
+ * H5AC_DEBUG_DIRTY_BYTES_CREATION #define is true.
*
* It is used to track the number of dirty bytes created
* via move operations since the last time the cleaned
* list was propagated.
*
* move_dirty_bytes_updates: This field only exists when the
- * H5AC_DEBUG_DIRTY_BYTES_CREATION #define is TRUE.
+ * H5AC_DEBUG_DIRTY_BYTES_CREATION #define is true.
*
* It is used to track the number of times dirty bytes have
* been created via move operations since the last time
@@ -351,7 +351,7 @@ typedef struct H5AC_aux_t {
int mpi_rank;
int mpi_size;
- hbool_t write_permitted;
+ bool write_permitted;
size_t dirty_bytes_threshold;
size_t dirty_bytes;
int32_t metadata_write_strategy;
@@ -391,7 +391,7 @@ typedef void (*H5AC_write_done_cb_t)(void);
H5_DLL herr_t H5AC__log_deleted_entry(const H5AC_info_t *entry_ptr);
H5_DLL herr_t H5AC__log_dirtied_entry(const H5AC_info_t *entry_ptr);
H5_DLL herr_t H5AC__log_cleaned_entry(const H5AC_info_t *entry_ptr);
-H5_DLL herr_t H5AC__log_flushed_entry(H5C_t *cache_ptr, haddr_t addr, hbool_t was_dirty, unsigned flags);
+H5_DLL herr_t H5AC__log_flushed_entry(H5C_t *cache_ptr, haddr_t addr, bool was_dirty, unsigned flags);
H5_DLL herr_t H5AC__log_inserted_entry(const H5AC_info_t *entry_ptr);
H5_DLL herr_t H5AC__log_moved_entry(const H5F_t *f, haddr_t old_addr, haddr_t new_addr);
H5_DLL herr_t H5AC__flush_entries(H5F_t *f);
diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h
index 5291e770f35..5e23036784b 100644
--- a/src/H5ACprivate.h
+++ b/src/H5ACprivate.h
@@ -76,11 +76,11 @@ typedef enum {
H5AC_NTYPES /* Number of types, must be last */
} H5AC_type_t;
-/* H5AC_DUMP_STATS_ON_CLOSE should always be FALSE when
- * H5C_COLLECT_CACHE_STATS is FALSE.
+/* H5AC_DUMP_STATS_ON_CLOSE should always be false when
+ * H5C_COLLECT_CACHE_STATS is false.
*
- * When H5C_COLLECT_CACHE_STATS is TRUE, H5AC_DUMP_STATS_ON_CLOSE must
- * be FALSE for "make check" to succeed, but may be set to TRUE at other
+ * When H5C_COLLECT_CACHE_STATS is true, H5AC_DUMP_STATS_ON_CLOSE must
+ * be false for "make check" to succeed, but may be set to true at other
* times for debugging purposes.
*
* Hence the following, somewhat odd set of #defines.
@@ -224,12 +224,12 @@ typedef struct H5AC_proxy_entry_t {
#define H5AC__DEFAULT_CACHE_CONFIG \
{ \
/* int version = */ H5AC__CURR_CACHE_CONFIG_VERSION, \
- /* hbool_t rpt_fcn_enabled = */ FALSE, \
- /* hbool_t open_trace_file = */ FALSE, \
- /* hbool_t close_trace_file = */ FALSE, \
+ /* bool rpt_fcn_enabled = */ false, \
+ /* bool open_trace_file = */ false, \
+ /* bool close_trace_file = */ false, \
/* char trace_file_name[] = */ "", \
- /* hbool_t evictions_enabled = */ TRUE, \
- /* hbool_t set_initial_size = */ TRUE, \
+ /* bool evictions_enabled = */ true, \
+ /* bool set_initial_size = */ true, \
/* size_t initial_size = */ ( 2 * 1024 * 1024), \
/* double min_clean_fraction = */ 0.3, \
/* size_t max_size = */ (32 * 1024 * 1024), \
@@ -238,7 +238,7 @@ typedef struct H5AC_proxy_entry_t {
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, \
/* double lower_hr_threshold = */ 0.9, \
/* double increment = */ 2.0, \
- /* hbool_t apply_max_increment = */ TRUE, \
+ /* bool apply_max_increment = */ true, \
/* size_t max_increment = */ (4 * 1024 * 1024), \
/* enum H5C_cache_flash_incr_mode */ \
/* flash_incr_mode = */ H5C_flash_incr__add_space, \
@@ -247,10 +247,10 @@ typedef struct H5AC_proxy_entry_t {
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, \
/* double upper_hr_threshold = */ 0.999, \
/* double decrement = */ 0.9, \
- /* hbool_t apply_max_decrement = */ TRUE, \
+ /* bool apply_max_decrement = */ true, \
/* size_t max_decrement = */ (1 * 1024 * 1024), \
/* int epochs_before_eviction = */ 3, \
- /* hbool_t apply_empty_reserve = */ TRUE, \
+ /* bool apply_empty_reserve = */ true, \
/* double empty_reserve = */ 0.1, \
/* size_t dirty_bytes_threshold = */ (256 * 1024), \
/* int metadata_write_strategy = */ \
@@ -260,12 +260,12 @@ typedef struct H5AC_proxy_entry_t {
#define H5AC__DEFAULT_CACHE_CONFIG \
{ \
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, \
- /* hbool_t rpt_fcn_enabled = */ FALSE, \
- /* hbool_t open_trace_file = */ FALSE, \
- /* hbool_t close_trace_file = */ FALSE, \
+ /* bool rpt_fcn_enabled = */ false, \
+ /* bool open_trace_file = */ false, \
+ /* bool close_trace_file = */ false, \
/* char trace_file_name[] = */ "", \
- /* hbool_t evictions_enabled = */ TRUE, \
- /* hbool_t set_initial_size = */ TRUE, \
+ /* bool evictions_enabled = */ true, \
+ /* bool set_initial_size = */ true, \
/* size_t initial_size = */ ( 2 * 1024 * 1024), \
/* double min_clean_fraction = */ 0.01, \
/* size_t max_size = */ (32 * 1024 * 1024), \
@@ -274,7 +274,7 @@ typedef struct H5AC_proxy_entry_t {
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, \
/* double lower_hr_threshold = */ 0.9, \
/* double increment = */ 2.0, \
- /* hbool_t apply_max_increment = */ TRUE, \
+ /* bool apply_max_increment = */ true, \
/* size_t max_increment = */ (4 * 1024 * 1024), \
/* enum H5C_cache_flash_incr_mode */ \
/* flash_incr_mode = */ H5C_flash_incr__add_space, \
@@ -283,10 +283,10 @@ typedef struct H5AC_proxy_entry_t {
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,\
/* double upper_hr_threshold = */ 0.999, \
/* double decrement = */ 0.9, \
- /* hbool_t apply_max_decrement = */ TRUE, \
+ /* bool apply_max_decrement = */ true, \
/* size_t max_decrement = */ (1 * 1024 * 1024), \
/* int epochs_before_eviction = */ 3, \
- /* hbool_t apply_empty_reserve = */ TRUE, \
+ /* bool apply_empty_reserve = */ true, \
/* double empty_reserve = */ 0.1, \
/* size_t dirty_bytes_threshold = */ (256 * 1024), \
/* int metadata_write_strategy = */ \
@@ -297,8 +297,8 @@ typedef struct H5AC_proxy_entry_t {
#define H5AC__DEFAULT_CACHE_IMAGE_CONFIG \
{ \
/* int32_t version = */ H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION, \
- /* hbool_t generate_image = */ FALSE, \
- /* hbool_t save_resize_status = */ FALSE, \
+ /* bool generate_image = */ false, \
+ /* bool save_resize_status = */ false, \
/* int32_t entry_ageout = */ H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE \
}
/* clang-format on */
@@ -403,26 +403,26 @@ H5_DLL herr_t H5AC_remove_entry(void *entry);
H5_DLL herr_t H5AC_get_cache_auto_resize_config(const H5AC_t *cache_ptr, H5AC_cache_config_t *config_ptr);
H5_DLL herr_t H5AC_get_cache_size(const H5AC_t *cache_ptr, size_t *max_size_ptr, size_t *min_clean_size_ptr,
size_t *cur_size_ptr, uint32_t *cur_num_entries_ptr);
-H5_DLL herr_t H5AC_get_cache_flush_in_progress(H5AC_t *cache_ptr, hbool_t *flush_in_progress_ptr);
+H5_DLL herr_t H5AC_get_cache_flush_in_progress(H5AC_t *cache_ptr, bool *flush_in_progress_ptr);
H5_DLL herr_t H5AC_get_cache_hit_rate(const H5AC_t *cache_ptr, double *hit_rate_ptr);
H5_DLL herr_t H5AC_reset_cache_hit_rate_stats(H5AC_t *cache_ptr);
H5_DLL herr_t H5AC_set_cache_auto_resize_config(H5AC_t *cache_ptr, const H5AC_cache_config_t *config_ptr);
H5_DLL herr_t H5AC_validate_config(const H5AC_cache_config_t *config_ptr);
/* Cache image routines */
-H5_DLL herr_t H5AC_load_cache_image_on_next_protect(H5F_t *f, haddr_t addr, hsize_t len, hbool_t rw);
-H5_DLL herr_t H5AC_validate_cache_image_config(H5AC_cache_image_config_t *config_ptr);
-H5_DLL hbool_t H5AC_cache_image_pending(const H5F_t *f);
-H5_DLL herr_t H5AC_force_cache_image_load(H5F_t *f);
-H5_DLL herr_t H5AC_get_mdc_image_info(const H5AC_t *cache_ptr, haddr_t *image_addr, hsize_t *image_len);
+H5_DLL herr_t H5AC_load_cache_image_on_next_protect(H5F_t *f, haddr_t addr, hsize_t len, bool rw);
+H5_DLL herr_t H5AC_validate_cache_image_config(H5AC_cache_image_config_t *config_ptr);
+H5_DLL bool H5AC_cache_image_pending(const H5F_t *f);
+H5_DLL herr_t H5AC_force_cache_image_load(H5F_t *f);
+H5_DLL herr_t H5AC_get_mdc_image_info(const H5AC_t *cache_ptr, haddr_t *image_addr, hsize_t *image_len);
/* Tag & Ring routines */
H5_DLL void H5AC_tag(haddr_t metadata_tag, haddr_t *prev_tag);
H5_DLL herr_t H5AC_flush_tagged_metadata(H5F_t *f, haddr_t metadata_tag);
-H5_DLL herr_t H5AC_evict_tagged_metadata(H5F_t *f, haddr_t metadata_tag, hbool_t match_global);
+H5_DLL herr_t H5AC_evict_tagged_metadata(H5F_t *f, haddr_t metadata_tag, bool match_global);
H5_DLL herr_t H5AC_retag_copied_metadata(const H5F_t *f, haddr_t metadata_tag);
H5_DLL herr_t H5AC_ignore_tags(const H5F_t *f);
-H5_DLL herr_t H5AC_cork(H5F_t *f, haddr_t obj_addr, unsigned action, hbool_t *corked);
+H5_DLL herr_t H5AC_cork(H5F_t *f, haddr_t obj_addr, unsigned action, bool *corked);
H5_DLL herr_t H5AC_get_entry_ring(const H5F_t *f, haddr_t addr, H5AC_ring_t *ring);
H5_DLL void H5AC_set_ring(H5AC_ring_t ring, H5AC_ring_t *orig_ring);
H5_DLL herr_t H5AC_unsettle_entry_ring(void *entry);
@@ -445,14 +445,14 @@ H5_DLL herr_t H5AC_add_candidate(H5AC_t *cache_ptr, haddr_t addr);
/* Debugging functions */
H5_DLL herr_t H5AC_stats(const H5F_t *f);
#ifndef NDEBUG
-H5_DLL herr_t H5AC_dump_cache(const H5F_t *f);
-H5_DLL herr_t H5AC_get_entry_ptr_from_addr(const H5F_t *f, haddr_t addr, void **entry_ptr_ptr);
-H5_DLL herr_t H5AC_flush_dependency_exists(H5F_t *f, haddr_t parent_addr, haddr_t child_addr,
- hbool_t *fd_exists_ptr);
-H5_DLL herr_t H5AC_verify_entry_type(const H5F_t *f, haddr_t addr, const H5AC_class_t *expected_type,
- hbool_t *in_cache_ptr, hbool_t *type_ok_ptr);
-H5_DLL hbool_t H5AC_get_serialization_in_progress(H5F_t *f);
-H5_DLL hbool_t H5AC_cache_is_clean(const H5F_t *f, H5AC_ring_t inner_ring);
+H5_DLL herr_t H5AC_dump_cache(const H5F_t *f);
+H5_DLL herr_t H5AC_get_entry_ptr_from_addr(const H5F_t *f, haddr_t addr, void **entry_ptr_ptr);
+H5_DLL herr_t H5AC_flush_dependency_exists(H5F_t *f, haddr_t parent_addr, haddr_t child_addr,
+ bool *fd_exists_ptr);
+H5_DLL herr_t H5AC_verify_entry_type(const H5F_t *f, haddr_t addr, const H5AC_class_t *expected_type,
+ bool *in_cache_ptr, bool *type_ok_ptr);
+H5_DLL bool H5AC_get_serialization_in_progress(H5F_t *f);
+H5_DLL bool H5AC_cache_is_clean(const H5F_t *f, H5AC_ring_t inner_ring);
#endif /* NDEBUG */ /* end debugging functions */
#endif /* H5ACprivate_H */
diff --git a/src/H5ACpublic.h b/src/H5ACpublic.h
index 532cc80ed15..71292b679ae 100644
--- a/src/H5ACpublic.h
+++ b/src/H5ACpublic.h
@@ -70,13 +70,13 @@
*
* The trace file is a debugging feature that allow the capture of
* top level metadata cache requests for purposes of debugging and/or
- * optimization. This field should normally be set to FALSE, as
+ * optimization. This field should normally be set to false, as
* trace file collection imposes considerable overhead.
*
- * This field should only be set to TRUE when the trace_file_name
+ * This field should only be set to true when the trace_file_name
* contains the full path of the desired trace file, and either
* there is no open trace file on the cache, or the close_trace_file
- * field is also TRUE.
+ * field is also true.
*
* close_trace_file: Boolean field indicating whether the current trace
* file (if any) should be closed.
@@ -84,11 +84,11 @@
* *** DEPRECATED *** Use H5Fstart/stop logging functions instead
*
* See the above comments on the open_trace_file field. This field
- * should be set to FALSE unless there is an open trace file on the
+ * should be set to false unless there is an open trace file on the
* cache that you wish to close.
*
* trace_file_name: Full path of the trace file to be opened if the
- * open_trace_file field is TRUE.
+ * open_trace_file field is true.
*
* *** DEPRECATED *** Use H5Fstart/stop logging functions instead
*
@@ -120,7 +120,7 @@
*
* set_initial_size: Boolean flag indicating whether the size of the
* initial size of the cache is to be set to the value given in
- * the initial_size field. If set_initial_size is FALSE, the
+ * the initial_size field. If set_initial_size is false, the
* initial_size field is ignored.
*
* initial_size: If enabled, this field contain the size the cache is
diff --git a/src/H5Abtree2.c b/src/H5Abtree2.c
index a25cd34ff75..9ea4b75a29a 100644
--- a/src/H5Abtree2.c
+++ b/src/H5Abtree2.c
@@ -143,8 +143,8 @@ H5A__dense_fh_name_cmp(const void *obj, size_t obj_len, void *_udata)
{
H5A_fh_ud_cmp_t *udata = (H5A_fh_ud_cmp_t *)_udata; /* User data for 'op' callback */
H5A_t *attr = NULL; /* Pointer to attribute created from heap object */
- hbool_t took_ownership = FALSE; /* Whether the "found" operator took ownership of the attribute */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool took_ownership = false; /* Whether the "found" operator took ownership of the attribute */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -154,7 +154,7 @@ H5A__dense_fh_name_cmp(const void *obj, size_t obj_len, void *_udata)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, FAIL, "can't decode attribute");
/* Compare the string values */
- udata->cmp = HDstrcmp(udata->name, attr->shared->name);
+ udata->cmp = strcmp(udata->name, attr->shared->name);
/* Check for correct attribute & callback to make */
if (udata->cmp == 0 && udata->found_op) {
diff --git a/src/H5Adense.c b/src/H5Adense.c
index d96fd75061e..27ccf918634 100644
--- a/src/H5Adense.c
+++ b/src/H5Adense.c
@@ -263,7 +263,7 @@ H5A__dense_create(H5F_t *f, H5O_ainfo_t *ainfo)
*-------------------------------------------------------------------------
*/
static herr_t
-H5A__dense_fnd_cb(const H5A_t *attr, hbool_t *took_ownership, void *_user_attr)
+H5A__dense_fnd_cb(const H5A_t *attr, bool *took_ownership, void *_user_attr)
{
const H5A_t **user_attr = (const H5A_t **)_user_attr; /* User data from v2 B-tree attribute lookup */
herr_t ret_value = SUCCEED; /* Return value */
@@ -303,7 +303,7 @@ H5A__dense_fnd_cb(const H5A_t *attr, hbool_t *took_ownership, void *_user_attr)
/* Take over attribute ownership */
*user_attr = attr;
- *took_ownership = TRUE;
+ *took_ownership = true;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -326,7 +326,7 @@ H5A__dense_open(H5F_t *f, const H5O_ainfo_t *ainfo, const char *name)
H5HF_t *shared_fheap = NULL; /* Fractal heap handle for shared header messages */
H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
htri_t attr_sharable; /* Flag indicating attributes are shareable */
- hbool_t attr_exists; /* Attribute exists in v2 B-tree */
+ bool attr_exists; /* Attribute exists in v2 B-tree */
H5A_t *ret_value = NULL; /* Return value */
FUNC_ENTER_PACKAGE
@@ -369,17 +369,17 @@ H5A__dense_open(H5F_t *f, const H5O_ainfo_t *ainfo, const char *name)
udata.fheap = fheap;
udata.shared_fheap = shared_fheap;
udata.name = name;
- udata.name_hash = H5_checksum_lookup3(name, HDstrlen(name), 0);
+ udata.name_hash = H5_checksum_lookup3(name, strlen(name), 0);
udata.flags = 0;
udata.corder = 0;
udata.found_op = H5A__dense_fnd_cb; /* v2 B-tree comparison callback */
udata.found_op_data = &ret_value;
/* Find & copy the attribute in the 'name' index */
- attr_exists = FALSE;
+ attr_exists = false;
if (H5B2_find(bt2_name, &udata, &attr_exists, NULL, NULL) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, NULL, "can't search for attribute in name index");
- if (attr_exists == FALSE)
+ if (attr_exists == false)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, NULL, "can't locate attribute in name index");
done:
@@ -477,7 +477,7 @@ H5A__dense_insert(H5F_t *f, const H5O_ainfo_t *ainfo, H5A_t *attr)
size_t attr_size; /* Size of serialized attribute in the heap */
/* Find out the size of buffer needed for serialized message */
- if ((attr_size = H5O_msg_raw_size(f, H5O_ATTR_ID, FALSE, attr)) == 0)
+ if ((attr_size = H5O_msg_raw_size(f, H5O_ATTR_ID, false, attr)) == 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGETSIZE, FAIL, "can't get message size");
/* Wrap the local buffer for serialized attributes */
@@ -489,7 +489,7 @@ H5A__dense_insert(H5F_t *f, const H5O_ainfo_t *ainfo, H5A_t *attr)
HGOTO_ERROR(H5E_ATTR, H5E_NOSPACE, FAIL, "can't get actual buffer");
/* Create serialized form of attribute or shared message */
- if (H5O_msg_encode(f, H5O_ATTR_ID, FALSE, (unsigned char *)attr_ptr, attr) < 0)
+ if (H5O_msg_encode(f, H5O_ATTR_ID, false, (unsigned char *)attr_ptr, attr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "can't encode attribute");
/* Insert the serialized attribute into the fractal heap */
@@ -507,7 +507,7 @@ H5A__dense_insert(H5F_t *f, const H5O_ainfo_t *ainfo, H5A_t *attr)
udata.common.fheap = fheap;
udata.common.shared_fheap = shared_fheap;
udata.common.name = attr->shared->name;
- udata.common.name_hash = H5_checksum_lookup3(attr->shared->name, HDstrlen(attr->shared->name), 0);
+ udata.common.name_hash = H5_checksum_lookup3(attr->shared->name, strlen(attr->shared->name), 0);
H5_CHECKED_ASSIGN(udata.common.flags, uint8_t, mesg_flags, unsigned);
udata.common.corder = attr->shared->crt_idx;
udata.common.found_op = NULL;
@@ -557,7 +557,7 @@ H5A__dense_insert(H5F_t *f, const H5O_ainfo_t *ainfo, H5A_t *attr)
*-------------------------------------------------------------------------
*/
static herr_t
-H5A__dense_write_bt2_cb2(void *_record, void *_op_data, hbool_t *changed)
+H5A__dense_write_bt2_cb2(void *_record, void *_op_data, bool *changed)
{
H5A_dense_bt2_corder_rec_t *record = (H5A_dense_bt2_corder_rec_t *)_record; /* Record from B-tree */
H5O_fheap_id_t *new_heap_id = (H5O_fheap_id_t *)_op_data; /* "op data" from v2 B-tree modify */
@@ -572,7 +572,7 @@ H5A__dense_write_bt2_cb2(void *_record, void *_op_data, hbool_t *changed)
record->id = *new_heap_id;
/* Note that the record changed */
- *changed = TRUE;
+ *changed = true;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5A__dense_write_bt2_cb2() */
@@ -587,7 +587,7 @@ H5A__dense_write_bt2_cb2(void *_record, void *_op_data, hbool_t *changed)
*-------------------------------------------------------------------------
*/
static herr_t
-H5A__dense_write_bt2_cb(void *_record, void *_op_data, hbool_t *changed)
+H5A__dense_write_bt2_cb(void *_record, void *_op_data, bool *changed)
{
H5A_dense_bt2_name_rec_t *record = (H5A_dense_bt2_name_rec_t *)_record; /* Record from B-tree */
H5A_bt2_od_wrt_t *op_data = (H5A_bt2_od_wrt_t *)_op_data; /* "op data" from v2 B-tree modify */
@@ -638,14 +638,14 @@ H5A__dense_write_bt2_cb(void *_record, void *_op_data, hbool_t *changed)
} /* end if */
/* Note that the record changed */
- *changed = TRUE;
+ *changed = true;
} /* end if */
else {
void *attr_ptr; /* Pointer to serialized message */
size_t attr_size; /* Size of serialized attribute in the heap */
/* Find out the size of buffer needed for serialized attribute */
- if ((attr_size = H5O_msg_raw_size(op_data->f, H5O_ATTR_ID, FALSE, op_data->attr)) == 0)
+ if ((attr_size = H5O_msg_raw_size(op_data->f, H5O_ATTR_ID, false, op_data->attr)) == 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGETSIZE, FAIL, "can't get attribute size");
/* Wrap the local buffer for serialized attributes */
@@ -657,7 +657,7 @@ H5A__dense_write_bt2_cb(void *_record, void *_op_data, hbool_t *changed)
HGOTO_ERROR(H5E_ATTR, H5E_NOSPACE, FAIL, "can't get actual buffer");
/* Create serialized form of attribute */
- if (H5O_msg_encode(op_data->f, H5O_ATTR_ID, FALSE, (unsigned char *)attr_ptr, op_data->attr) < 0)
+ if (H5O_msg_encode(op_data->f, H5O_ATTR_ID, false, (unsigned char *)attr_ptr, op_data->attr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "can't encode attribute");
/* Sanity check */
@@ -748,7 +748,7 @@ H5A__dense_write(H5F_t *f, const H5O_ainfo_t *ainfo, H5A_t *attr)
udata.fheap = fheap;
udata.shared_fheap = shared_fheap;
udata.name = attr->shared->name;
- udata.name_hash = H5_checksum_lookup3(attr->shared->name, HDstrlen(attr->shared->name), 0);
+ udata.name_hash = H5_checksum_lookup3(attr->shared->name, strlen(attr->shared->name), 0);
udata.flags = 0;
udata.corder = 0;
udata.found_op = NULL;
@@ -837,7 +837,7 @@ H5A__dense_rename(H5F_t *f, const H5O_ainfo_t *ainfo, const char *old_name, cons
H5A_t *attr_copy = NULL; /* Copy of attribute to rename */
htri_t attr_sharable; /* Flag indicating attributes are shareable */
htri_t shared_mesg; /* Should this message be stored in the Shared Message table? */
- hbool_t attr_exists; /* Attribute exists in v2 B-tree */
+ bool attr_exists; /* Attribute exists in v2 B-tree */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -881,17 +881,17 @@ H5A__dense_rename(H5F_t *f, const H5O_ainfo_t *ainfo, const char *old_name, cons
udata.fheap = fheap;
udata.shared_fheap = shared_fheap;
udata.name = old_name;
- udata.name_hash = H5_checksum_lookup3(old_name, HDstrlen(old_name), 0);
+ udata.name_hash = H5_checksum_lookup3(old_name, strlen(old_name), 0);
udata.flags = 0;
udata.corder = 0;
udata.found_op = H5A__dense_fnd_cb; /* v2 B-tree comparison callback */
udata.found_op_data = &attr_copy;
/* Get copy of attribute through 'name' tracking v2 B-tree */
- attr_exists = FALSE;
+ attr_exists = false;
if (H5B2_find(bt2_name, &udata, &attr_exists, NULL, NULL) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "can't search for attribute in name index");
- if (attr_exists == FALSE)
+ if (attr_exists == false)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "can't locate attribute in name index");
assert(attr_copy);
@@ -914,7 +914,7 @@ H5A__dense_rename(H5F_t *f, const H5O_ainfo_t *ainfo, const char *old_name, cons
/* Need to remove the attribute from the creation order index v2 B-tree */
if (ainfo->index_corder) {
- hbool_t corder_attr_exists; /* Attribute exists in v2 B-tree */
+ bool corder_attr_exists; /* Attribute exists in v2 B-tree */
/* Open the creation order index v2 B-tree */
assert(H5_addr_defined(ainfo->corder_bt2_addr));
@@ -924,7 +924,7 @@ H5A__dense_rename(H5F_t *f, const H5O_ainfo_t *ainfo, const char *old_name, cons
/* Set up the creation order to search for */
udata.corder = attr_copy->shared->crt_idx;
- corder_attr_exists = FALSE;
+ corder_attr_exists = false;
if (H5B2_find(bt2_corder, &udata, &corder_attr_exists, NULL, NULL) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "can't search for attribute in name index");
@@ -1339,7 +1339,7 @@ H5A__dense_remove(H5F_t *f, const H5O_ainfo_t *ainfo, const char *name)
udata.common.fheap = fheap;
udata.common.shared_fheap = shared_fheap;
udata.common.name = name;
- udata.common.name_hash = H5_checksum_lookup3(name, HDstrlen(name), 0);
+ udata.common.name_hash = H5_checksum_lookup3(name, strlen(name), 0);
udata.common.found_op = H5A__dense_fnd_cb; /* v2 B-tree comparison callback */
udata.common.found_op_data = &attr_copy;
udata.corder_bt2_addr = ainfo->corder_bt2_addr;
@@ -1380,8 +1380,8 @@ H5A__dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
H5A_bt2_ud_rmbi_t *bt2_udata = (H5A_bt2_ud_rmbi_t *)_bt2_udata; /* User data for callback */
H5A_fh_ud_cp_t fh_udata; /* User data for fractal heap 'op' callback */
H5O_shared_t sh_loc; /* Shared message info for attribute */
- hbool_t use_sh_loc; /* Whether to use the attribute's shared location or the separate one */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool use_sh_loc; /* Whether to use the attribute's shared location or the separate one */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1404,14 +1404,14 @@ H5A__dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
assert(fh_udata.attr);
/* Use the attribute's shared location */
- use_sh_loc = FALSE;
+ use_sh_loc = false;
} /* end if */
else {
/* Create a shared message location from the heap ID for this record */
H5SM_reconstitute(&sh_loc, bt2_udata->f, H5O_ATTR_ID, record->id);
/* Use the separate shared location */
- use_sh_loc = TRUE;
+ use_sh_loc = true;
} /* end else */
/* Check for removing the link from the "other" index (creation order, when name used and vice versa) */
@@ -1432,7 +1432,7 @@ H5A__dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
other_bt2_udata.shared_fheap = bt2_udata->shared_fheap;
other_bt2_udata.name = fh_udata.attr->shared->name;
other_bt2_udata.name_hash =
- H5_checksum_lookup3(fh_udata.attr->shared->name, HDstrlen(fh_udata.attr->shared->name), 0);
+ H5_checksum_lookup3(fh_udata.attr->shared->name, strlen(fh_udata.attr->shared->name), 0);
other_bt2_udata.found_op = NULL;
other_bt2_udata.found_op_data = NULL;
} /* end else */
@@ -1618,7 +1618,7 @@ H5A__dense_remove_by_idx(H5F_t *f, const H5O_ainfo_t *ainfo, H5_index_t idx_type
*-------------------------------------------------------------------------
*/
herr_t
-H5A__dense_exists(H5F_t *f, const H5O_ainfo_t *ainfo, const char *name, hbool_t *attr_exists)
+H5A__dense_exists(H5F_t *f, const H5O_ainfo_t *ainfo, const char *name, bool *attr_exists)
{
H5A_bt2_ud_common_t udata; /* User data for v2 B-tree modify */
H5HF_t *fheap = NULL; /* Fractal heap handle */
@@ -1668,7 +1668,7 @@ H5A__dense_exists(H5F_t *f, const H5O_ainfo_t *ainfo, const char *name, hbool_t
udata.fheap = fheap;
udata.shared_fheap = shared_fheap;
udata.name = name;
- udata.name_hash = H5_checksum_lookup3(name, HDstrlen(name), 0);
+ udata.name_hash = H5_checksum_lookup3(name, strlen(name), 0);
udata.flags = 0;
udata.corder = 0;
udata.found_op = NULL; /* v2 B-tree comparison callback */
diff --git a/src/H5Adeprec.c b/src/H5Adeprec.c
index e8fd3eaeee1..7ff2b06d69b 100644
--- a/src/H5Adeprec.c
+++ b/src/H5Adeprec.c
@@ -140,7 +140,7 @@ H5Acreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, hid_t
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, H5I_INVALID_HID, "unable to create attribute");
/* Register the new attribute and get an ID for it */
- if ((ret_value = H5VL_register(H5I_ATTR, attr, vol_obj->connector, TRUE)) < 0)
+ if ((ret_value = H5VL_register(H5I_ATTR, attr, vol_obj->connector, true)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register attribute for ID");
done:
@@ -205,7 +205,7 @@ H5Aopen_name(hid_t loc_id, const char *name)
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open attribute");
/* Register the attribute and get an ID for it */
- if ((ret_value = H5VL_register(H5I_ATTR, attr, vol_obj->connector, TRUE)) < 0)
+ if ((ret_value = H5VL_register(H5I_ATTR, attr, vol_obj->connector, true)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register attribute handle");
done:
@@ -273,7 +273,7 @@ H5Aopen_idx(hid_t loc_id, unsigned idx)
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open attribute");
/* Register the attribute and get an ID for it */
- if ((ret_value = H5VL_register(H5I_ATTR, attr, vol_obj->connector, TRUE)) < 0)
+ if ((ret_value = H5VL_register(H5I_ATTR, attr, vol_obj->connector, true)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register attribute handle");
done:
diff --git a/src/H5Aint.c b/src/H5Aint.c
index f62449b4e36..c272402a700 100644
--- a/src/H5Aint.c
+++ b/src/H5Aint.c
@@ -53,7 +53,7 @@ typedef struct {
H5F_t *f; /* Pointer to file that fractal heap is in */
H5A_attr_table_t *atable; /* Pointer to attribute table to build */
size_t curr_attr; /* Current attribute to operate on */
- hbool_t bogus_crt_idx; /* Whether bogus creation index values need to be set */
+ bool bogus_crt_idx; /* Whether bogus creation index values need to be set */
} H5A_compact_bt_ud_t;
/* Data exchange structure to use when building table of dense attributes for an object */
@@ -66,7 +66,7 @@ typedef struct {
typedef struct {
const H5O_ainfo_t *ainfo; /* dense information */
H5F_t *file; /* file */
- hbool_t *recompute_size; /* Flag to indicate if size changed */
+ bool *recompute_size; /* Flag to indicate if size changed */
H5O_copy_t *cpy_info; /* Information on copying options */
const H5O_loc_t *oloc_src;
H5O_loc_t *oloc_dst;
@@ -185,7 +185,7 @@ H5A_top_term_package(void)
FUNC_ENTER_NOAPI_NOINIT_NOERR
if (H5I_nmembers(H5I_ATTR) > 0) {
- (void)H5I_clear_type(H5I_ATTR, FALSE, FALSE);
+ (void)H5I_clear_type(H5I_ATTR, false, false);
n++; /*H5I*/
} /* end if */
@@ -242,7 +242,7 @@ H5A__create(const H5G_loc_t *loc, const char *attr_name, const H5T_t *type, cons
H5A_t *attr = NULL; /* Attribute created */
hssize_t snelmts; /* elements in attribute */
size_t nelmts; /* elements in attribute */
- hbool_t exists; /* Whether attribute exists */
+ bool exists; /* Whether attribute exists */
H5A_t *ret_value = NULL; /* Return value */
FUNC_ENTER_PACKAGE_TAG(loc->oloc->addr)
@@ -258,7 +258,7 @@ H5A__create(const H5G_loc_t *loc, const char *attr_name, const H5T_t *type, cons
* name, but it's going to be hard to unwind all the special cases on
* failure, so just check first, for now - QAK)
*/
- exists = FALSE;
+ exists = false;
if (H5O__attr_exists(loc->oloc, attr_name, &exists) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, NULL, "error checking attributes");
if (exists)
@@ -269,7 +269,7 @@ H5A__create(const H5G_loc_t *loc, const char *attr_name, const H5T_t *type, cons
HGOTO_ERROR(H5E_ATTR, H5E_BADVALUE, NULL, "dataspace extent has not been set");
/* Check if the datatype is "sensible" for use in a dataset */
- if (H5T_is_sensible(type) != TRUE)
+ if (H5T_is_sensible(type) != true)
HGOTO_ERROR(H5E_ATTR, H5E_BADTYPE, NULL, "datatype is not sensible");
/* Build the attribute information */
@@ -315,7 +315,7 @@ H5A__create(const H5G_loc_t *loc, const char *attr_name, const H5T_t *type, cons
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, NULL, "can't set version of datatype");
/* Copy the dataspace for the attribute */
- attr->shared->ds = H5S_copy(space, FALSE, TRUE);
+ attr->shared->ds = H5S_copy(space, false, true);
/* Set the version for dataspace */
if (H5S_set_version(loc->oloc->file, attr->shared->ds) < 0)
@@ -350,8 +350,8 @@ H5A__create(const H5G_loc_t *loc, const char *attr_name, const H5T_t *type, cons
* datatype and dataspace messages themselves, or the size of the "shared"
* messages if either or both of them are shared.
*/
- attr->shared->dt_size = H5O_msg_raw_size(attr->oloc.file, H5O_DTYPE_ID, FALSE, attr->shared->dt);
- attr->shared->ds_size = H5O_msg_raw_size(attr->oloc.file, H5O_SDSPACE_ID, FALSE, attr->shared->ds);
+ attr->shared->dt_size = H5O_msg_raw_size(attr->oloc.file, H5O_DTYPE_ID, false, attr->shared->dt);
+ attr->shared->ds_size = H5O_msg_raw_size(attr->oloc.file, H5O_SDSPACE_ID, false, attr->shared->ds);
/* Get # of elements for attribute's dataspace */
if ((snelmts = H5S_GET_EXTENT_NPOINTS(attr->shared->ds)) < 0)
@@ -365,7 +365,7 @@ H5A__create(const H5G_loc_t *loc, const char *attr_name, const H5T_t *type, cons
/* Hold the symbol table entry (and file) open */
if (H5O_open(&(attr->oloc)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, NULL, "unable to open");
- attr->obj_opened = TRUE;
+ attr->obj_opened = true;
/* Set the version to encode the attribute with */
if (H5A__set_version(attr->oloc.file, attr) < 0)
@@ -402,7 +402,7 @@ H5A__create_by_name(const H5G_loc_t *loc, const char *obj_name, const char *attr
H5G_loc_t obj_loc; /* Location used to open group */
H5G_name_t obj_path; /* Opened object group hier. path */
H5O_loc_t obj_oloc; /* Opened object object location */
- hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */
+ bool loc_found = false; /* Entry at 'obj_name' found */
H5A_t *attr = NULL; /* Attribute from object header */
H5A_t *ret_value = NULL; /* Return value */
@@ -421,7 +421,7 @@ H5A__create_by_name(const H5G_loc_t *loc, const char *obj_name, const char *attr
/* Find the object's location */
if (H5G_loc_find(loc, obj_name, &obj_loc /*out*/) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, NULL, "object not found");
- loc_found = TRUE;
+ loc_found = true;
/* Go do the real work for attaching the attribute to the object */
if (NULL == (attr = H5A__create(&obj_loc, attr_name, type, space, acpl_id)))
@@ -489,7 +489,7 @@ H5A__open_common(const H5G_loc_t *loc, H5A_t *attr)
/* Hold the symbol table entry (and file) open */
if (H5O_open(&(attr->oloc)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open");
- attr->obj_opened = TRUE;
+ attr->obj_opened = true;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -553,7 +553,7 @@ H5A__open_by_idx(const H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type
H5G_loc_t obj_loc; /* Location used to open group */
H5G_name_t obj_path; /* Opened object group hier. path */
H5O_loc_t obj_oloc; /* Opened object object location */
- hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */
+ bool loc_found = false; /* Entry at 'obj_name' found */
H5A_t *attr = NULL; /* Attribute from object header */
H5A_t *ret_value = NULL; /* Return value */
@@ -571,7 +571,7 @@ H5A__open_by_idx(const H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type
/* Find the object's location */
if (H5G_loc_find(loc, obj_name, &obj_loc /*out*/) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, NULL, "object not found");
- loc_found = TRUE;
+ loc_found = true;
/* Read in attribute from object header */
if (NULL == (attr = H5O__attr_open_by_idx(obj_loc.oloc, idx_type, order, n)))
@@ -612,7 +612,7 @@ H5A__open_by_name(const H5G_loc_t *loc, const char *obj_name, const char *attr_n
H5G_loc_t obj_loc; /* Location used to open group */
H5G_name_t obj_path; /* Opened object group hier. path */
H5O_loc_t obj_oloc; /* Opened object object location */
- hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */
+ bool loc_found = false; /* Entry at 'obj_name' found */
H5A_t *attr = NULL; /* Attribute from object header */
H5A_t *ret_value = NULL; /* Return value */
@@ -631,7 +631,7 @@ H5A__open_by_name(const H5G_loc_t *loc, const char *obj_name, const char *attr_n
/* Find the object's location */
if (H5G_loc_find(loc, obj_name, &obj_loc /*out*/) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, NULL, "object not found");
- loc_found = TRUE;
+ loc_found = true;
/* Read in attribute from object header */
if (NULL == (attr = H5O__attr_open_by_name(obj_loc.oloc, attr_name)))
@@ -721,9 +721,9 @@ H5A__read(const H5A_t *attr, const H5T_t *mem_type, void *buf)
if (!H5T_path_noop(tpath)) {
H5T_bkg_t need_bkg; /* Background buffer type */
- if ((src_id = H5I_register(H5I_DATATYPE, H5T_copy(attr->shared->dt, H5T_COPY_ALL), FALSE)) <
+ if ((src_id = H5I_register(H5I_DATATYPE, H5T_copy(attr->shared->dt, H5T_COPY_ALL), false)) <
0 ||
- (dst_id = H5I_register(H5I_DATATYPE, H5T_copy(mem_type, H5T_COPY_ALL), FALSE)) < 0)
+ (dst_id = H5I_register(H5I_DATATYPE, H5T_copy(mem_type, H5T_COPY_ALL), false)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTREGISTER, FAIL, "unable to register types for conversion");
/* Get the maximum buffer size needed and allocate it */
@@ -839,8 +839,8 @@ H5A__write(H5A_t *attr, const H5T_t *mem_type, const void *buf)
if (!H5T_path_noop(tpath)) {
H5T_bkg_t need_bkg; /* Background buffer type */
- if ((src_id = H5I_register(H5I_DATATYPE, H5T_copy(mem_type, H5T_COPY_ALL), FALSE)) < 0 ||
- (dst_id = H5I_register(H5I_DATATYPE, H5T_copy(attr->shared->dt, H5T_COPY_ALL), FALSE)) < 0)
+ if ((src_id = H5I_register(H5I_DATATYPE, H5T_copy(mem_type, H5T_COPY_ALL), false)) < 0 ||
+ (dst_id = H5I_register(H5I_DATATYPE, H5T_copy(attr->shared->dt, H5T_COPY_ALL), false)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTREGISTER, FAIL, "unable to register types for conversion");
/* Get the maximum buffer size needed and allocate it */
@@ -852,7 +852,7 @@ H5A__write(H5A_t *attr, const H5T_t *mem_type, const void *buf)
H5MM_memcpy(tconv_buf, buf, (src_type_size * nelmts));
/* Check if we need a background buffer */
- if (H5T_detect_class(attr->shared->dt, H5T_VLEN, FALSE))
+ if (H5T_detect_class(attr->shared->dt, H5T_VLEN, false))
need_bkg = H5T_BKG_YES;
else
need_bkg = H5T_path_bkg(tpath);
@@ -946,7 +946,7 @@ H5A__get_name(H5A_t *attr, size_t buf_size, char *buf, size_t *attr_name_len)
assert(attr_name_len);
/* Get the real attribute length */
- nbytes = HDstrlen(attr->shared->name);
+ nbytes = strlen(attr->shared->name);
/* Compute the string length which will fit into the user's buffer */
copy_len = MIN(buf_size - 1, nbytes);
@@ -987,11 +987,11 @@ H5A_get_space(H5A_t *attr)
assert(attr);
/* Copy the attribute's dataspace */
- if (NULL == (ds = H5S_copy(attr->shared->ds, FALSE, TRUE)))
+ if (NULL == (ds = H5S_copy(attr->shared->ds, false, true)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, H5I_INVALID_HID, "unable to copy dataspace");
/* Register */
- if ((ret_value = H5I_register(H5I_DATASPACE, ds, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_DATASPACE, ds, true)) < 0)
HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataspace ID");
done:
@@ -1037,7 +1037,7 @@ H5A__get_type(H5A_t *attr)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5I_INVALID_HID, "invalid datatype location");
/* Lock copied type */
- if (H5T_lock(dt, FALSE) < 0)
+ if (H5T_lock(dt, false) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5I_INVALID_HID, "unable to lock transient datatype");
/* Register */
@@ -1046,11 +1046,11 @@ H5A__get_type(H5A_t *attr)
* two level IDs, where the VOL object is a copy of the
* returned datatype
*/
- if ((ret_value = H5VL_wrap_register(H5I_DATATYPE, dt, TRUE)) < 0)
+ if ((ret_value = H5VL_wrap_register(H5I_DATATYPE, dt, true)) < 0)
HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register file handle");
}
else {
- if ((ret_value = H5I_register(H5I_DATATYPE, dt, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_DATATYPE, dt, true)) < 0)
HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register datatype");
}
@@ -1089,7 +1089,7 @@ H5A__get_create_plist(H5A_t *attr)
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "can't get default ACPL");
/* Create the property list object to return */
- if ((new_plist_id = H5P_copy_plist(plist, TRUE)) < 0)
+ if ((new_plist_id = H5P_copy_plist(plist, true)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "unable to copy attribute creation properties");
if (NULL == (new_plist = (H5P_genplist_t *)H5I_object(new_plist_id)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "can't get property list");
@@ -1129,11 +1129,11 @@ H5A__get_info(const H5A_t *attr, H5A_info_t *ainfo)
ainfo->cset = attr->shared->encoding;
ainfo->data_size = attr->shared->data_size;
if (attr->shared->crt_idx == H5O_MAX_CRT_ORDER_IDX) {
- ainfo->corder_valid = FALSE;
+ ainfo->corder_valid = false;
ainfo->corder = 0;
} /* end if */
else {
- ainfo->corder_valid = TRUE;
+ ainfo->corder_valid = true;
ainfo->corder = attr->shared->crt_idx;
} /* end else */
@@ -1153,9 +1153,9 @@ H5A__get_info(const H5A_t *attr, H5A_info_t *ainfo)
H5A_t *
H5A__copy(H5A_t *_new_attr, const H5A_t *old_attr)
{
- H5A_t *new_attr = NULL;
- hbool_t allocated_attr = FALSE; /* Whether the attribute was allocated */
- H5A_t *ret_value = NULL; /* Return value */
+ H5A_t *new_attr = NULL;
+ bool allocated_attr = false; /* Whether the attribute was allocated */
+ H5A_t *ret_value = NULL; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1166,7 +1166,7 @@ H5A__copy(H5A_t *_new_attr, const H5A_t *old_attr)
if (_new_attr == NULL) {
if (NULL == (new_attr = H5FL_CALLOC(H5A_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
- allocated_attr = TRUE;
+ allocated_attr = true;
} /* end if */
else
new_attr = _new_attr;
@@ -1185,7 +1185,7 @@ H5A__copy(H5A_t *_new_attr, const H5A_t *old_attr)
new_attr->shared->nrefs++;
/* Don't open the object header for a copy */
- new_attr->obj_opened = FALSE;
+ new_attr->obj_opened = false;
/* Set the return value */
ret_value = new_attr;
@@ -1408,17 +1408,17 @@ H5A_type(const H5A_t *attr)
*
* Purpose: Private version of H5Aexists_by_name
*
- * Return: TRUE/FALSE/FAIL
+ * Return: true/false/FAIL
*
*-------------------------------------------------------------------------
*/
herr_t
-H5A__exists_by_name(H5G_loc_t loc, const char *obj_name, const char *attr_name, hbool_t *attr_exists)
+H5A__exists_by_name(H5G_loc_t loc, const char *obj_name, const char *attr_name, bool *attr_exists)
{
H5G_loc_t obj_loc; /* Location used to open group */
H5G_name_t obj_path; /* Opened object group hier. path */
H5O_loc_t obj_oloc; /* Opened object object location */
- hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */
+ bool loc_found = false; /* Entry at 'obj_name' found */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1436,7 +1436,7 @@ H5A__exists_by_name(H5G_loc_t loc, const char *obj_name, const char *attr_name,
/* Find the object's location */
if (H5G_loc_find(&loc, obj_name, &obj_loc /*out*/) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "object not found");
- loc_found = TRUE;
+ loc_found = true;
/* Check if the attribute exists */
if (H5O__attr_exists(obj_loc.oloc, attr_name, attr_exists) < 0)
@@ -1538,8 +1538,8 @@ H5A__compact_build_table(H5F_t *f, H5O_t *oh, H5_index_t idx_type, H5_iter_order
udata.atable = atable;
udata.curr_attr = 0;
udata.bogus_crt_idx =
- (hbool_t)((oh->version == H5O_VERSION_1 || !(oh->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED)) ? TRUE
- : FALSE);
+ (bool)((oh->version == H5O_VERSION_1 || !(oh->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED)) ? true
+ : false);
/* Iterate over existing attributes, checking for attribute with same name */
op.op_type = H5O_MESG_OP_LIB;
@@ -1700,7 +1700,7 @@ H5A__attr_cmp_name_inc(const void *attr1, const void *attr2)
FUNC_ENTER_PACKAGE_NOERR
FUNC_LEAVE_NOAPI(
- HDstrcmp((*(const H5A_t *const *)attr1)->shared->name, (*(const H5A_t *const *)attr2)->shared->name))
+ strcmp((*(const H5A_t *const *)attr1)->shared->name, (*(const H5A_t *const *)attr2)->shared->name))
} /* end H5A__attr_cmp_name_inc() */
/*-------------------------------------------------------------------------
@@ -1723,7 +1723,7 @@ H5A__attr_cmp_name_dec(const void *attr1, const void *attr2)
FUNC_ENTER_PACKAGE_NOERR
FUNC_LEAVE_NOAPI(
- HDstrcmp((*(const H5A_t *const *)attr2)->shared->name, (*(const H5A_t *const *)attr1)->shared->name))
+ strcmp((*(const H5A_t *const *)attr2)->shared->name, (*(const H5A_t *const *)attr1)->shared->name))
} /* end H5A__attr_cmp_name_dec() */
/*-------------------------------------------------------------------------
@@ -1946,7 +1946,7 @@ H5A__attr_release_table(H5A_attr_table_t *atable)
* Purpose: Retrieves the "attribute info" message for an object. Also
* sets the number of attributes correctly, if it isn't set up yet.
*
- * Return: TRUE/FALSE/FAIL
+ * Return: true/false/FAIL
*
*-------------------------------------------------------------------------
*/
@@ -2012,10 +2012,9 @@ H5A__get_ainfo(H5F_t *f, H5O_t *oh, H5O_ainfo_t *ainfo)
herr_t
H5A__set_version(const H5F_t *f, H5A_t *attr)
{
- hbool_t type_shared,
- space_shared; /* Flags to indicate that shared messages are used for this attribute */
- uint8_t version; /* Message version */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool type_shared, space_shared; /* Flags to indicate that shared messages are used for this attribute */
+ uint8_t version; /* Message version */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -2025,14 +2024,14 @@ H5A__set_version(const H5F_t *f, H5A_t *attr)
/* Check whether datatype and dataspace are shared */
if (H5O_msg_is_shared(H5O_DTYPE_ID, attr->shared->dt) > 0)
- type_shared = TRUE;
+ type_shared = true;
else
- type_shared = FALSE;
+ type_shared = false;
if (H5O_msg_is_shared(H5O_SDSPACE_ID, attr->shared->ds) > 0)
- space_shared = TRUE;
+ space_shared = true;
else
- space_shared = FALSE;
+ space_shared = false;
/* Check which version to encode attribute with */
if (attr->shared->encoding != H5T_CSET_ASCII)
@@ -2075,7 +2074,7 @@ H5A__set_version(const H5F_t *f, H5A_t *attr)
*-------------------------------------------------------------------------
*/
H5A_t *
-H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_size,
+H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, bool *recompute_size,
H5O_copy_t H5_ATTR_NDEBUG_UNUSED *cpy_info)
{
H5A_t *attr_dst = NULL; /* Destination attribute */
@@ -2112,7 +2111,7 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s
/* Don't have an opened group location for copy */
H5O_loc_reset(&(attr_dst->oloc));
H5G_name_reset(&(attr_dst->path));
- attr_dst->obj_opened = FALSE;
+ attr_dst->obj_opened = false;
/* Reference count for the header message in the cache */
attr_dst->shared->nrefs = 1;
@@ -2143,7 +2142,7 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s
/* Copy the dataspace for the attribute. Make sure the maximal dimension is also copied.
* Otherwise the comparison in the test may complain about it. SLU 2011/4/12 */
- attr_dst->shared->ds = H5S_copy(attr_src->shared->ds, FALSE, TRUE);
+ attr_dst->shared->ds = H5S_copy(attr_src->shared->ds, false, true);
assert(attr_dst->shared->ds);
/* Reset the dataspace's sharing in the source file before trying to share
@@ -2164,16 +2163,16 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s
/* Compute the sizes of the datatype and dataspace. This is their raw
* size unless they're shared.
*/
- attr_dst->shared->dt_size = H5O_msg_raw_size(file_dst, H5O_DTYPE_ID, FALSE, attr_dst->shared->dt);
+ attr_dst->shared->dt_size = H5O_msg_raw_size(file_dst, H5O_DTYPE_ID, false, attr_dst->shared->dt);
assert(attr_dst->shared->dt_size > 0);
- attr_dst->shared->ds_size = H5O_msg_raw_size(file_dst, H5O_SDSPACE_ID, FALSE, attr_dst->shared->ds);
+ attr_dst->shared->ds_size = H5O_msg_raw_size(file_dst, H5O_SDSPACE_ID, false, attr_dst->shared->ds);
assert(attr_dst->shared->ds_size > 0);
/* Check whether to recompute the size of the attribute */
/* (happens when the datatype or dataspace changes sharing status) */
if (attr_dst->shared->dt_size != attr_src->shared->dt_size ||
attr_dst->shared->ds_size != attr_src->shared->ds_size)
- *recompute_size = TRUE;
+ *recompute_size = true;
/* Get # of elements for destination attribute's dataspace */
if ((sdst_nelmts = H5S_GET_EXTENT_NPOINTS(attr_dst->shared->ds)) < 0)
@@ -2193,7 +2192,7 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
/* Check if we need to convert data */
- if (H5T_detect_class(attr_src->shared->dt, H5T_VLEN, FALSE) > 0) {
+ if (H5T_detect_class(attr_src->shared->dt, H5T_VLEN, false) > 0) {
H5T_path_t *tpath_src_mem, *tpath_mem_dst; /* Datatype conversion paths */
H5T_t *dt_mem; /* Memory datatype */
size_t src_dt_size; /* Source datatype size */
@@ -2205,17 +2204,17 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s
size_t buf_size; /* Size of copy buffer */
/* Create datatype ID for src datatype */
- if ((tid_src = H5I_register(H5I_DATATYPE, attr_src->shared->dt, FALSE)) < 0)
+ if ((tid_src = H5I_register(H5I_DATATYPE, attr_src->shared->dt, false)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL, "unable to register source file datatype");
/* create a memory copy of the variable-length datatype */
if (NULL == (dt_mem = H5T_copy(attr_src->shared->dt, H5T_COPY_TRANSIENT)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to copy");
- if ((tid_mem = H5I_register(H5I_DATATYPE, dt_mem, FALSE)) < 0)
+ if ((tid_mem = H5I_register(H5I_DATATYPE, dt_mem, false)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL, "unable to register memory datatype");
/* create variable-length datatype at the destination file */
- if ((tid_dst = H5I_register(H5I_DATATYPE, attr_dst->shared->dt, FALSE)) < 0)
+ if ((tid_dst = H5I_register(H5I_DATATYPE, attr_dst->shared->dt, false)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL,
"unable to register destination file datatype");
@@ -2252,7 +2251,7 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, NULL, "can't create simple dataspace");
/* Register */
- if ((buf_sid = H5I_register(H5I_DATASPACE, buf_space, FALSE)) < 0) {
+ if ((buf_sid = H5I_register(H5I_DATASPACE, buf_space, false)) < 0) {
H5S_close(buf_space);
HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, NULL, "unable to register dataspace ID");
} /* end if */
@@ -2306,7 +2305,7 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s
/* Recompute the destination attribute's size, if it's a different version */
if (attr_src->shared->version != attr_dst->shared->version)
- *recompute_size = TRUE;
+ *recompute_size = true;
/* Set return value */
ret_value = attr_dst;
@@ -2389,7 +2388,7 @@ H5A__attr_post_copy_file(const H5O_loc_t *src_oloc, const H5A_t *attr_src, H5O_l
dst_oloc_dt->file = file_dst;
/* Copy the shared object from source to destination */
- if (H5O_copy_header_map(src_oloc_dt, dst_oloc_dt, cpy_info, FALSE, NULL, NULL) < 0)
+ if (H5O_copy_header_map(src_oloc_dt, dst_oloc_dt, cpy_info, false, NULL, NULL) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object");
/* Update shared message info from named datatype info */
@@ -2407,7 +2406,7 @@ H5A__attr_post_copy_file(const H5O_loc_t *src_oloc, const H5A_t *attr_src, H5O_l
/* Only need to fix reference attribute with real data being copied to
* another file.
*/
- if ((NULL != attr_dst->shared->data) && (H5T_get_class(attr_dst->shared->dt, FALSE) == H5T_REFERENCE)) {
+ if ((NULL != attr_dst->shared->data) && (H5T_get_class(attr_dst->shared->dt, false) == H5T_REFERENCE)) {
/* copy object pointed by reference. The current implementation does not
* deal with nested reference such as reference in a compound structure
@@ -2499,7 +2498,7 @@ H5A__dense_post_copy_file_all(const H5O_loc_t *src_oloc, const H5O_ainfo_t *ainf
{
H5A_dense_file_cp_ud_t udata; /* User data for iteration callback */
H5A_attr_iter_op_t attr_op; /* Attribute operator */
- hbool_t recompute_size = FALSE; /* recompute the size */
+ bool recompute_size = false; /* recompute the size */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -2541,13 +2540,13 @@ H5A__rename_by_name(H5G_loc_t loc, const char *obj_name, const char *old_attr_na
H5G_loc_t obj_loc; /* Location used to open group */
H5G_name_t obj_path; /* Opened object group hier. path */
H5O_loc_t obj_oloc; /* Opened object object location */
- hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */
+ bool loc_found = false; /* Entry at 'obj_name' found */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
/* Avoid thrashing things if the names are the same */
- if (HDstrcmp(old_attr_name, new_attr_name) != 0) {
+ if (strcmp(old_attr_name, new_attr_name) != 0) {
/* Set up opened group location to fill in */
obj_loc.oloc = &obj_oloc;
obj_loc.path = &obj_path;
@@ -2556,7 +2555,7 @@ H5A__rename_by_name(H5G_loc_t loc, const char *obj_name, const char *old_attr_na
/* Find the object's location */
if (H5G_loc_find(&loc, obj_name, &obj_loc /*out*/) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "object not found");
- loc_found = TRUE;
+ loc_found = true;
/* Call attribute rename routine */
if (H5O__attr_rename(obj_loc.oloc, old_attr_name, new_attr_name) < 0)
@@ -2618,7 +2617,7 @@ H5A__iterate(const H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type, H5
H5G_loc_t obj_loc; /* Location used to open group */
H5G_name_t obj_path; /* Opened object group hier. path */
H5O_loc_t obj_oloc; /* Opened object object location */
- hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */
+ bool loc_found = false; /* Entry at 'obj_name' found */
hid_t obj_loc_id = H5I_INVALID_HID; /* ID for object located */
H5A_attr_iter_op_t attr_op; /* Attribute operator */
void *temp_obj = NULL;
@@ -2639,14 +2638,14 @@ H5A__iterate(const H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type, H5
/* Find the object's location */
if (H5G_loc_find(loc, obj_name, &obj_loc) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "object not found");
- loc_found = TRUE;
+ loc_found = true;
/* Open the object */
if (NULL == (temp_obj = H5O_open_by_loc(&obj_loc, &obj_type)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open object");
/* Get an ID for the object */
- if ((obj_loc_id = H5VL_wrap_register(obj_type, temp_obj, TRUE)) < 0)
+ if ((obj_loc_id = H5VL_wrap_register(obj_type, temp_obj, true)) < 0)
HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register datatype");
/* Call internal attribute iteration routine */
@@ -2720,7 +2719,7 @@ H5A__delete_by_name(const H5G_loc_t *loc, const char *obj_name, const char *attr
H5G_loc_t obj_loc; /* Location used to open group */
H5G_name_t obj_path; /* Opened object group hier. path */
H5O_loc_t obj_oloc; /* Opened object object location */
- hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */
+ bool loc_found = false; /* Entry at 'obj_name' found */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -2733,7 +2732,7 @@ H5A__delete_by_name(const H5G_loc_t *loc, const char *obj_name, const char *attr
/* Find the object's location */
if (H5G_loc_find(loc, obj_name, &obj_loc /*out*/) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "object not found");
- loc_found = TRUE;
+ loc_found = true;
/* Delete the attribute from the location */
if (H5O__attr_remove(obj_loc.oloc, attr_name) < 0)
@@ -2763,7 +2762,7 @@ H5A__delete_by_idx(const H5G_loc_t *loc, const char *obj_name, H5_index_t idx_ty
H5G_loc_t obj_loc; /* Location used to open group */
H5G_name_t obj_path; /* Opened object group hier. path */
H5O_loc_t obj_oloc; /* Opened object object location */
- hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */
+ bool loc_found = false; /* Entry at 'obj_name' found */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -2776,7 +2775,7 @@ H5A__delete_by_idx(const H5G_loc_t *loc, const char *obj_name, H5_index_t idx_ty
/* Find the object's location */
if (H5G_loc_find(loc, obj_name, &obj_loc /*out*/) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "object not found");
- loc_found = TRUE;
+ loc_found = true;
/* Delete the attribute from the location */
if (H5O__attr_remove_by_idx(obj_loc.oloc, idx_type, order, n) < 0)
diff --git a/src/H5Apkg.h b/src/H5Apkg.h
index 3a5c411c5ff..64549c818c0 100644
--- a/src/H5Apkg.h
+++ b/src/H5Apkg.h
@@ -87,7 +87,7 @@ typedef struct H5A_shared_t {
struct H5A_t {
H5O_shared_t sh_loc; /* Shared message info (must be first) */
H5O_loc_t oloc; /* Object location for object attribute is on */
- hbool_t obj_opened; /* Object header entry opened? */
+ bool obj_opened; /* Object header entry opened? */
H5G_name_t path; /* Group hierarchy path */
H5A_shared_t *shared; /* Shared attribute information */
};
@@ -113,7 +113,7 @@ typedef struct H5A_dense_bt2_corder_rec_t {
} H5A_dense_bt2_corder_rec_t;
/* Define the 'found' callback function pointer for matching an attribute record in a v2 B-tree */
-typedef herr_t (*H5A_bt2_found_t)(const H5A_t *attr, hbool_t *took_ownership, void *op_data);
+typedef herr_t (*H5A_bt2_found_t)(const H5A_t *attr, bool *took_ownership, void *op_data);
/*
* Common data exchange structure for dense attribute storage. This structure
@@ -200,7 +200,7 @@ H5_DLL herr_t H5A__delete_by_name(const H5G_loc_t *loc, const char *obj_name, co
H5_DLL herr_t H5A__delete_by_idx(const H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type,
H5_iter_order_t order, hsize_t n);
H5_DLL herr_t H5A__exists_by_name(H5G_loc_t loc, const char *obj_name, const char *attr_name,
- hbool_t *attr_exists);
+ bool *attr_exists);
H5_DLL herr_t H5A__write(H5A_t *attr, const H5T_t *mem_type, const void *buf);
H5_DLL herr_t H5A__read(const H5A_t *attr, const H5T_t *mem_type, void *buf);
H5_DLL herr_t H5A__get_name(H5A_t *attr, size_t buf_size, char *buf, size_t *attr_name_len);
@@ -218,7 +218,7 @@ H5_DLL herr_t H5A__dense_iterate(H5F_t *f, hid_t loc_id, const H5O_ainfo_t *ainf
H5_DLL herr_t H5A__dense_remove(H5F_t *f, const H5O_ainfo_t *ainfo, const char *name);
H5_DLL herr_t H5A__dense_remove_by_idx(H5F_t *f, const H5O_ainfo_t *ainfo, H5_index_t idx_type,
H5_iter_order_t order, hsize_t n);
-H5_DLL herr_t H5A__dense_exists(H5F_t *f, const H5O_ainfo_t *ainfo, const char *name, hbool_t *attr_exists);
+H5_DLL herr_t H5A__dense_exists(H5F_t *f, const H5O_ainfo_t *ainfo, const char *name, bool *attr_exists);
H5_DLL herr_t H5A__dense_delete(H5F_t *f, H5O_ainfo_t *ainfo);
/* Attribute table operations */
@@ -243,8 +243,8 @@ H5_DLL herr_t H5O__attr_iterate(hid_t loc_id, H5_index_t idx_type, H5_iter_order
H5_DLL herr_t H5O__attr_remove(const H5O_loc_t *loc, const char *name);
H5_DLL herr_t H5O__attr_remove_by_idx(const H5O_loc_t *loc, H5_index_t idx_type, H5_iter_order_t order,
hsize_t n);
-H5_DLL herr_t H5O__attr_exists(const H5O_loc_t *loc, const char *name, hbool_t *attr_exists);
-H5_DLL H5A_t *H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_size,
+H5_DLL herr_t H5O__attr_exists(const H5O_loc_t *loc, const char *name, bool *attr_exists);
+H5_DLL H5A_t *H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, bool *recompute_size,
H5O_copy_t *cpy_info);
H5_DLL herr_t H5A__attr_post_copy_file(const H5O_loc_t *src_oloc, const H5A_t *mesg_src, H5O_loc_t *dst_oloc,
const H5A_t *mesg_dst, H5O_copy_t *cpy_info);
diff --git a/src/H5Apublic.h b/src/H5Apublic.h
index 3bef700dd4d..232ae0af64d 100644
--- a/src/H5Apublic.h
+++ b/src/H5Apublic.h
@@ -40,7 +40,7 @@ typedef struct {
* or named datatype being iterated over
* \param[in] attr_name The name of the current object attribute
* \param[in] ainfo The attribute's info struct
- * \param[in,out] op_data A pointer to the operator data passed in to
+ * \param[in,out] op_data A pointer to the operator data passed into
* H5Aiterate2() or H5Aiterate_by_name()
* \returns The return values from an operator are:
* \li Zero causes the iterator to continue, returning zero when
@@ -122,10 +122,10 @@ H5_DLL herr_t H5Aclose_async(hid_t attr_id, hid_t es_id);
* The attribute is created with the specified datatype and dataspace,
* \p type_id and \p space_id.
*
- * \plist_unused{acpl}
+ * \plist_unused{aapl_id}
*
* The attribute identifier returned by this function must be released
- * with H5Aclose() resource leaks will develop.
+ * with H5Aclose() or resource leaks will develop.
*
* \note If \p loc_id is a file identifier, the attribute will be attached to
* that file's root group.
@@ -183,7 +183,7 @@ H5_DLL hid_t H5Acreate_async(hid_t loc_id, const char *attr_name, hid_t type_id
* The attribute is created with the specified datatype and
* dataspace, \p type_id and \p space_id.
*
- * \plist_unused{aapl}
+ * \plist_unused{aapl_id}
*
* The link access property list, \p lapl_id, may provide
* information regarding the properties of links required to access
@@ -252,7 +252,7 @@ H5_DLL herr_t H5Adelete(hid_t loc_id, const char *attr_name);
*
* \return \herr_t
*
- * \details H5Adelete_by_idx() removes an attribute, specified by its
+ * \details H5Adelete_by_idx() removes an attribute specified by its
* location in an index, from an object.
*
* The object from which the attribute is to be removed is
@@ -638,7 +638,7 @@ H5_DLL hid_t H5Aget_type(hid_t attr_id);
* \details H5Aiterate2() iterates over the attributes attached to a
* dataset, named datatype, or group, as specified by \p loc_id.
* For each attribute, user-provided data, \p op_data, with
- * additional information as defined below, is passed to a
+ * additional information, as defined below, is passed to a
* user-defined function, \p op, which operates on that
* attribute.
*
@@ -697,7 +697,7 @@ H5_DLL herr_t H5Aiterate2(hid_t loc_id, H5_index_t idx_type, H5_iter_order_t ord
* \details H5Aiterate_by_name() iterates over the attributes attached
* to the dataset or group specified with \p loc_id and \p obj_name.
* For each attribute, user-provided data, \p op_data, with
- * additional information as defined below, is passed to a
+ * additional information, as defined below, is passed to a
* user-defined function, \p op, which operates on that attribute.
*
* The order of the iteration and the attributes iterated over
@@ -747,7 +747,7 @@ H5_DLL herr_t H5Aiterate_by_name(hid_t loc_id, const char *obj_name, H5_index_t
* \return \hid_tv{attribute}
*
* \details H5Aopen() opens an existing attribute, \p attr_name, that is
- * attached to object specified by an object identifier, \p obj_id.
+ * attached to the object specified by an object identifier, \p obj_id.
*
* \plist_unused{aapl_id}
*
@@ -1096,7 +1096,7 @@ H5_DLL herr_t H5Arename_by_name(hid_t loc_id, const char *obj_name, const char *
* \param[in] location_id The identifier for the group, dataset
* or named datatype being iterated over
* \param[in] attr_name The name of the current object attribute
- * \param[in,out] operator_data A pointer to the operator data passed in to
+ * \param[in,out] operator_data A pointer to the operator data passed into
* H5Aiterate1()
* \returns The return values from an operator are:
* \li Zero causes the iterator to continue, returning zero when
@@ -1177,7 +1177,7 @@ H5_DLL int H5Aget_num_attrs(hid_t loc_id);
* \loc_id
* \param[in,out] idx Starting (in) and ending (out) attribute index
* \param[in] op User's function to pass each attribute to
- * \param[in,out] op_data User's data to pass through to iterator operator
+ * \param[in,out] op_data User's data to pass through to the iterator operator
* function
*
* \return \herr_t
@@ -1220,7 +1220,7 @@ H5_DLL herr_t H5Aiterate1(hid_t loc_id, unsigned *idx, H5A_operator1_t op, void
* object specified with \p loc_id. The location object may be
* either a group, dataset, or named datatype, all of which may
* have any sort of attribute. The attribute specified by the index,
- * \p idx , indicates the attribute to access. The value of \p idx
+ * \p idx, indicates the attribute to access. The value of \p idx
* is a 0-based, non-negative integer. The attribute identifier
* returned from this function must be released with H5Aclose()
* or resource leaks will develop.
diff --git a/src/H5Atest.c b/src/H5Atest.c
index f66377dec93..1d18b444cbc 100644
--- a/src/H5Atest.c
+++ b/src/H5Atest.c
@@ -71,7 +71,7 @@
*
* Purpose: Check if an attribute is shared
*
- * Return: TRUE/FALSE/FAIL
+ * Return: true/false/FAIL
*
*-------------------------------------------------------------------------
*/
@@ -106,9 +106,9 @@ H5A__is_shared_test(hid_t attr_id)
herr_t
H5A__get_shared_rc_test(hid_t attr_id, hsize_t *ref_count)
{
- H5A_t *attr; /* Attribute object for ID */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5A_t *attr; /* Attribute object for ID */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -119,7 +119,7 @@ H5A__get_shared_rc_test(hid_t attr_id, hsize_t *ref_count)
/* Push API context */
if (H5CX_push() < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set API context");
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Sanity check */
assert(H5O_msg_is_shared(H5O_ATTR_ID, attr));
@@ -129,7 +129,7 @@ H5A__get_shared_rc_test(hid_t attr_id, hsize_t *ref_count)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't retrieve shared message ref count");
done:
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTRESET, FAIL, "can't reset API context");
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5B.c b/src/H5B.c
index ad530431130..9d89218d62f 100644
--- a/src/H5B.c
+++ b/src/H5B.c
@@ -142,8 +142,8 @@ typedef struct H5B_ins_ud_t {
/* Local Prototypes */
/********************/
static H5B_ins_t H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8_t *lt_key,
- hbool_t *lt_key_changed, uint8_t *md_key, void *udata, uint8_t *rt_key,
- hbool_t *rt_key_changed, H5B_ins_ud_t *split_bt_ud /*out*/);
+ bool *lt_key_changed, uint8_t *md_key, void *udata, uint8_t *rt_key,
+ bool *rt_key_changed, H5B_ins_ud_t *split_bt_ud /*out*/);
static herr_t H5B__insert_child(H5B_t *bt, unsigned *bt_flags, unsigned idx, haddr_t child, H5B_ins_t anchor,
const void *md_key);
static herr_t H5B__split(H5F_t *f, H5B_ins_ud_t *bt_ud, unsigned idx, void *udata,
@@ -268,14 +268,14 @@ H5B_create(H5F_t *f, const H5B_class_t *type, void *udata, haddr_t *addr_p /*out
* pointers since it assumes that all nodes can be reached
* from the parent node.
*
- * Return: Non-negative (TRUE/FALSE) on success (if found, values returned
+ * Return: Non-negative (true/false) on success (if found, values returned
* through the UDATA argument). Negative on failure (if not found,
* UDATA is undefined).
*
*-------------------------------------------------------------------------
*/
herr_t
-H5B_find(H5F_t *f, const H5B_class_t *type, haddr_t addr, hbool_t *found, void *udata)
+H5B_find(H5F_t *f, const H5B_class_t *type, haddr_t addr, bool *found, void *udata)
{
H5B_t *bt = NULL;
H5UC_t *rc_shared; /* Ref-counted shared info */
@@ -325,7 +325,7 @@ H5B_find(H5F_t *f, const H5B_class_t *type, haddr_t addr, hbool_t *found, void *
/* Check if not found */
if (cmp)
- *found = FALSE;
+ *found = false;
else {
/*
* Follow the link to the subtree or to the data node.
@@ -527,7 +527,7 @@ H5B_insert(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
uint8_t *md_key = (uint8_t *)_md_key;
uint8_t *rt_key = (uint8_t *)_rt_key;
- hbool_t lt_key_changed = FALSE, rt_key_changed = FALSE;
+ bool lt_key_changed = false, rt_key_changed = false;
haddr_t old_root_addr = HADDR_UNDEF;
unsigned level;
H5B_ins_ud_t bt_ud = H5B_INS_UD_T_NULL; /* (Old) root node */
@@ -752,8 +752,8 @@ H5B__insert_child(H5B_t *bt, unsigned *bt_flags, unsigned idx, haddr_t child, H5
*/
static H5B_ins_t
H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8_t *lt_key,
- hbool_t *lt_key_changed, uint8_t *md_key, void *udata, uint8_t *rt_key,
- hbool_t *rt_key_changed, H5B_ins_ud_t *split_bt_ud /*out*/)
+ bool *lt_key_changed, uint8_t *md_key, void *udata, uint8_t *rt_key, bool *rt_key_changed,
+ H5B_ins_ud_t *split_bt_ud /*out*/)
{
H5B_t *bt; /* Convenience pointer to B-tree */
H5UC_t *rc_shared; /* Ref-counted shared info */
@@ -790,8 +790,8 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8
bt = bt_ud->bt;
- *lt_key_changed = FALSE;
- *rt_key_changed = FALSE;
+ *lt_key_changed = false;
+ *rt_key_changed = false;
/* Get shared info for B-tree */
if (NULL == (rc_shared = (type->get_shared)(f, udata)))
@@ -880,7 +880,7 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8
if ((type->new_node)(f, H5B_INS_LEFT, H5B_NKEY(bt, shared, idx), udata, md_key,
&new_child_bt_ud.addr /*out*/) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert minimum leaf node");
- *lt_key_changed = TRUE;
+ *lt_key_changed = true;
} /* end else */
#ifdef H5_STRICT_FORMAT_CHECKS
@@ -932,7 +932,7 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8
if ((type->new_node)(f, H5B_INS_RIGHT, md_key, udata, H5B_NKEY(bt, shared, idx + 1),
&new_child_bt_ud.addr /*out*/) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert maximum leaf node");
- *rt_key_changed = TRUE;
+ *rt_key_changed = true;
} /* end else */
#ifdef H5_STRICT_FORMAT_CHECKS
@@ -988,7 +988,7 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8
if (idx > 0) {
assert(type->critical_key == H5B_LEFT);
assert(!(H5B_INS_LEFT == my_ins || H5B_INS_RIGHT == my_ins));
- *lt_key_changed = FALSE;
+ *lt_key_changed = false;
} /* end if */
else
H5MM_memcpy(lt_key, H5B_NKEY(bt, shared, idx), type->sizeof_nkey);
@@ -998,7 +998,7 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8
if (idx + 1 < bt->nchildren) {
assert(type->critical_key == H5B_RIGHT);
assert(!(H5B_INS_LEFT == my_ins || H5B_INS_RIGHT == my_ins));
- *rt_key_changed = FALSE;
+ *rt_key_changed = false;
} /* end if */
else
H5MM_memcpy(rt_key, H5B_NKEY(bt, shared, idx + 1), type->sizeof_nkey);
@@ -1196,8 +1196,8 @@ H5B_iterate(H5F_t *f, const H5B_class_t *type, haddr_t addr, H5B_operator_t op,
*/
static H5B_ins_t
H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, uint8_t *lt_key /*out*/,
- hbool_t *lt_key_changed /*out*/, void *udata, uint8_t *rt_key /*out*/,
- hbool_t *rt_key_changed /*out*/)
+ bool *lt_key_changed /*out*/, void *udata, uint8_t *rt_key /*out*/,
+ bool *rt_key_changed /*out*/)
{
H5B_t *bt = NULL, *sibling = NULL;
unsigned bt_flags = H5AC__NO_FLAGS_SET;
@@ -1276,8 +1276,8 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u
* method. The best we can do is to leave the object alone but
* remove the B-tree reference to the object.
*/
- *lt_key_changed = FALSE;
- *rt_key_changed = FALSE;
+ *lt_key_changed = false;
+ *rt_key_changed = false;
ret_value = H5B_INS_REMOVE;
}
@@ -1295,7 +1295,7 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u
if (idx > 0)
/* Don't propagate change out of this B-tree node */
- *lt_key_changed = FALSE;
+ *lt_key_changed = false;
else
H5MM_memcpy(lt_key, H5B_NKEY(bt, shared, idx), type->sizeof_nkey);
} /* end if */
@@ -1304,7 +1304,7 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u
bt_flags |= H5AC__DIRTIED_FLAG;
if (idx + 1 < bt->nchildren)
/* Don't propagate change out of this B-tree node */
- *rt_key_changed = FALSE;
+ *rt_key_changed = false;
else
H5MM_memcpy(rt_key, H5B_NKEY(bt, shared, idx + 1), type->sizeof_nkey);
} /* end if */
@@ -1407,7 +1407,7 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u
/* Slide all keys down 1, update lt_key */
memmove(H5B_NKEY(bt, shared, 0), H5B_NKEY(bt, shared, 1), bt->nchildren * type->sizeof_nkey);
H5MM_memcpy(lt_key, H5B_NKEY(bt, shared, 0), type->sizeof_nkey);
- *lt_key_changed = TRUE;
+ *lt_key_changed = true;
}
else
/* Slide all but the leftmost 2 keys down, leaving the leftmost
@@ -1436,7 +1436,7 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u
else {
/* Just update rt_key */
H5MM_memcpy(rt_key, H5B_NKEY(bt, shared, bt->nchildren - 1), type->sizeof_nkey);
- *rt_key_changed = TRUE;
+ *rt_key_changed = true;
} /* end else */
bt->nchildren -= 1;
@@ -1527,8 +1527,8 @@ H5B_remove(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
uint64_t _lt_key[128], _rt_key[128];
uint8_t *lt_key = (uint8_t *)_lt_key; /*left key*/
uint8_t *rt_key = (uint8_t *)_rt_key; /*right key*/
- hbool_t lt_key_changed = FALSE; /*left key changed?*/
- hbool_t rt_key_changed = FALSE; /*right key changed?*/
+ bool lt_key_changed = false; /*left key changed?*/
+ bool rt_key_changed = false; /*right key changed?*/
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1600,7 +1600,7 @@ H5B_delete(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
} /* end if */
else {
- hbool_t lt_key_changed, rt_key_changed; /* Whether key changed (unused here, just for callback) */
+ bool lt_key_changed, rt_key_changed; /* Whether key changed (unused here, just for callback) */
/* Check for removal callback */
if (type->remove) {
diff --git a/src/H5B2.c b/src/H5B2.c
index 152a2d50a45..7f59ac8fae7 100644
--- a/src/H5B2.c
+++ b/src/H5B2.c
@@ -418,7 +418,7 @@ H5B2_iterate(H5B2_t *bt2, H5B2_operator_t op, void *op_data)
* OP_DATA pointer, to allow caller to return information about
* the record.
*
- * If 'OP' is NULL, then this routine just returns "TRUE" when
+ * If 'OP' is NULL, then this routine just returns true when
* a record is present in the B-tree.
*
* Return: SUCCEED/FAIL
@@ -426,7 +426,7 @@ H5B2_iterate(H5B2_t *bt2, H5B2_operator_t op, void *op_data)
*-------------------------------------------------------------------------
*/
herr_t
-H5B2_find(H5B2_t *bt2, void *udata, hbool_t *found, H5B2_found_t op, void *op_data)
+H5B2_find(H5B2_t *bt2, void *udata, bool *found, H5B2_found_t op, void *op_data)
{
H5B2_hdr_t *hdr; /* Pointer to the B-tree header */
H5B2_node_ptr_t curr_node_ptr; /* Node pointer info for current node */
@@ -454,7 +454,7 @@ H5B2_find(H5B2_t *bt2, void *udata, hbool_t *found, H5B2_found_t op, void *op_da
/* Check for empty tree */
if (curr_node_ptr.node_nrec == 0) {
- *found = FALSE;
+ *found = false;
HGOTO_DONE(SUCCEED);
}
@@ -465,14 +465,14 @@ H5B2_find(H5B2_t *bt2, void *udata, hbool_t *found, H5B2_found_t op, void *op_da
if ((hdr->cls->compare)(udata, hdr->min_native_rec, &cmp) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records");
if (cmp < 0) {
- *found = FALSE; /* Less than the least record--not found */
+ *found = false; /* Less than the least record--not found */
HGOTO_DONE(SUCCEED);
}
else if (cmp == 0) { /* Record is found */
if (op && (op)(hdr->min_native_rec, op_data) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL,
"'found' callback failed for B-tree find operation");
- *found = TRUE;
+ *found = true;
HGOTO_DONE(SUCCEED);
} /* end if */
} /* end if */
@@ -480,14 +480,14 @@ H5B2_find(H5B2_t *bt2, void *udata, hbool_t *found, H5B2_found_t op, void *op_da
if ((hdr->cls->compare)(udata, hdr->max_native_rec, &cmp) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records");
if (cmp > 0) {
- *found = FALSE; /* Greater than the largest record--not found */
+ *found = false; /* Greater than the largest record--not found */
HGOTO_DONE(SUCCEED);
}
else if (cmp == 0) { /* Record is found */
if (op && (op)(hdr->max_native_rec, op_data) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL,
"'found' callback failed for B-tree find operation");
- *found = TRUE;
+ *found = true;
HGOTO_DONE(SUCCEED);
} /* end if */
} /* end if */
@@ -507,7 +507,7 @@ H5B2_find(H5B2_t *bt2, void *udata, hbool_t *found, H5B2_found_t op, void *op_da
H5B2_node_ptr_t next_node_ptr; /* Node pointer info for next node */
/* Lock B-tree current node */
- if (NULL == (internal = H5B2__protect_internal(hdr, parent, &curr_node_ptr, depth, FALSE,
+ if (NULL == (internal = H5B2__protect_internal(hdr, parent, &curr_node_ptr, depth, false,
H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree internal node");
@@ -579,7 +579,7 @@ H5B2_find(H5B2_t *bt2, void *udata, hbool_t *found, H5B2_found_t op, void *op_da
HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node");
/* Indicate record found */
- *found = TRUE;
+ *found = true;
HGOTO_DONE(SUCCEED);
} /* end else */
@@ -591,7 +591,7 @@ H5B2_find(H5B2_t *bt2, void *udata, hbool_t *found, H5B2_found_t op, void *op_da
H5B2_leaf_t *leaf; /* Pointer to leaf node in B-tree */
/* Lock B-tree leaf node */
- if (NULL == (leaf = H5B2__protect_leaf(hdr, parent, &curr_node_ptr, FALSE, H5AC__READ_ONLY_FLAG)))
+ if (NULL == (leaf = H5B2__protect_leaf(hdr, parent, &curr_node_ptr, false, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node");
/* Unpin parent if necessary */
@@ -615,7 +615,7 @@ H5B2_find(H5B2_t *bt2, void *udata, hbool_t *found, H5B2_found_t op, void *op_da
HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node");
/* Record not found */
- *found = FALSE;
+ *found = false;
HGOTO_DONE(SUCCEED);
} /* end if */
else {
@@ -658,7 +658,7 @@ H5B2_find(H5B2_t *bt2, void *udata, hbool_t *found, H5B2_found_t op, void *op_da
HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node");
/* Indicate record found */
- *found = TRUE;
+ *found = true;
} /* end block */
done:
@@ -735,7 +735,7 @@ H5B2_index(H5B2_t *bt2, H5_iter_order_t order, hsize_t idx, H5B2_found_t op, voi
unsigned u; /* Local index variable */
/* Lock B-tree current node */
- if (NULL == (internal = H5B2__protect_internal(hdr, parent, &curr_node_ptr, depth, FALSE,
+ if (NULL == (internal = H5B2__protect_internal(hdr, parent, &curr_node_ptr, depth, false,
H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree internal node");
@@ -830,7 +830,7 @@ H5B2_index(H5B2_t *bt2, H5_iter_order_t order, hsize_t idx, H5B2_found_t op, voi
H5B2_leaf_t *leaf; /* Pointer to leaf node in B-tree */
/* Lock B-tree leaf node */
- if (NULL == (leaf = H5B2__protect_leaf(hdr, parent, &curr_node_ptr, FALSE, H5AC__READ_ONLY_FLAG)))
+ if (NULL == (leaf = H5B2__protect_leaf(hdr, parent, &curr_node_ptr, false, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node");
/* Unpin parent if necessary */
@@ -899,7 +899,7 @@ H5B2_remove(H5B2_t *bt2, void *udata, H5B2_remove_t op, void *op_data)
/* Attempt to remove record from B-tree */
if (hdr->depth > 0) {
- hbool_t depth_decreased = FALSE; /* Flag to indicate whether the depth of the B-tree decreased */
+ bool depth_decreased = false; /* Flag to indicate whether the depth of the B-tree decreased */
if (H5B2__remove_internal(hdr, &depth_decreased, NULL, NULL, hdr->depth, &(hdr->cache_info), NULL,
H5B2_POS_ROOT, &hdr->root, udata, op, op_data) < 0)
@@ -977,7 +977,7 @@ H5B2_remove_by_idx(H5B2_t *bt2, H5_iter_order_t order, hsize_t idx, H5B2_remove_
/* Attempt to remove record from B-tree */
if (hdr->depth > 0) {
- hbool_t depth_decreased = FALSE; /* Flag to indicate whether the depth of the B-tree decreased */
+ bool depth_decreased = false; /* Flag to indicate whether the depth of the B-tree decreased */
if (H5B2__remove_internal_by_idx(hdr, &depth_decreased, NULL, NULL, hdr->depth, &(hdr->cache_info),
NULL, &hdr->root, H5B2_POS_ROOT, idx, op, op_data) < 0)
@@ -1160,7 +1160,7 @@ H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data)
H5B2_node_ptr_t next_node_ptr; /* Node pointer info for next node */
/* Lock B-tree current node */
- if (NULL == (internal = H5B2__protect_internal(hdr, parent, &curr_node_ptr, depth, FALSE,
+ if (NULL == (internal = H5B2__protect_internal(hdr, parent, &curr_node_ptr, depth, false,
H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree internal node");
@@ -1217,12 +1217,12 @@ H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data)
curr_node_ptr = next_node_ptr;
} /* end if */
else {
- hbool_t changed; /* Whether the 'modify' callback changed the record */
+ bool changed; /* Whether the 'modify' callback changed the record */
/* Make callback for current record */
if ((op)(H5B2_INT_NREC(internal, hdr, idx), op_data, &changed) < 0) {
/* Make certain that the callback didn't modify the value if it failed */
- assert(changed == FALSE);
+ assert(changed == false);
/* Unlock current node */
if (H5AC_unprotect(hdr->f, H5AC_BT2_INT, curr_node_ptr.addr, internal, H5AC__NO_FLAGS_SET) <
@@ -1250,10 +1250,10 @@ H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data)
{
H5B2_leaf_t *leaf; /* Pointer to leaf node in B-tree */
unsigned leaf_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting the leaf node */
- hbool_t changed = FALSE; /* Whether the 'modify' callback changed the record */
+ bool changed = false; /* Whether the 'modify' callback changed the record */
/* Lock B-tree leaf node */
- if (NULL == (leaf = H5B2__protect_leaf(hdr, parent, &curr_node_ptr, FALSE, H5AC__NO_FLAGS_SET)))
+ if (NULL == (leaf = H5B2__protect_leaf(hdr, parent, &curr_node_ptr, false, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node");
/* Unpin parent if necessary */
@@ -1286,7 +1286,7 @@ H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data)
/* Make callback for current record */
if ((op)(H5B2_LEAF_NREC(leaf, hdr, idx), op_data, &changed) < 0) {
/* Make certain that the callback didn't modify the value if it failed */
- assert(changed == FALSE);
+ assert(changed == false);
/* Unlock current node */
if (H5AC_unprotect(hdr->f, H5AC_BT2_LEAF, curr_node_ptr.addr, leaf, H5AC__NO_FLAGS_SET) < 0)
@@ -1351,7 +1351,7 @@ herr_t
H5B2_close(H5B2_t *bt2)
{
haddr_t bt2_addr = HADDR_UNDEF; /* Address of v2 B-tree (for deletion) */
- hbool_t pending_delete = FALSE; /* Whether the v2 B-tree is pending deletion */
+ bool pending_delete = false; /* Whether the v2 B-tree is pending deletion */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1370,7 +1370,7 @@ H5B2_close(H5B2_t *bt2)
/* Set local info, so B-tree deletion can occur after decrementing the
* header's ref count
*/
- pending_delete = TRUE;
+ pending_delete = true;
bt2_addr = bt2->hdr->addr;
} /* end if */
} /* end if */
@@ -1477,7 +1477,7 @@ H5B2_delete(H5F_t *f, haddr_t addr, void *ctx_udata, H5B2_remove_t op, void *op_
/* Check for files using shared v2 B-tree header */
if (hdr->file_rc)
- hdr->pending_delete = TRUE;
+ hdr->pending_delete = true;
else {
/* Set the shared v2 B-tree header's file context for this operation */
hdr->f = f;
diff --git a/src/H5B2cache.c b/src/H5B2cache.c
index 76aa73f372f..8ff0a45d370 100644
--- a/src/H5B2cache.c
+++ b/src/H5B2cache.c
@@ -60,7 +60,7 @@
/* Metadata cache callbacks */
static herr_t H5B2__cache_hdr_get_initial_load_size(void *udata, size_t *image_len);
static htri_t H5B2__cache_hdr_verify_chksum(const void *image_ptr, size_t len, void *udata);
-static void *H5B2__cache_hdr_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty);
+static void *H5B2__cache_hdr_deserialize(const void *image, size_t len, void *udata, bool *dirty);
static herr_t H5B2__cache_hdr_image_len(const void *thing, size_t *image_len);
static herr_t H5B2__cache_hdr_serialize(const H5F_t *f, void *image, size_t len, void *thing);
static herr_t H5B2__cache_hdr_notify(H5AC_notify_action_t action, void *thing);
@@ -68,7 +68,7 @@ static herr_t H5B2__cache_hdr_free_icr(void *thing);
static herr_t H5B2__cache_int_get_initial_load_size(void *udata, size_t *image_len);
static htri_t H5B2__cache_int_verify_chksum(const void *image_ptr, size_t len, void *udata);
-static void *H5B2__cache_int_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty);
+static void *H5B2__cache_int_deserialize(const void *image, size_t len, void *udata, bool *dirty);
static herr_t H5B2__cache_int_image_len(const void *thing, size_t *image_len);
static herr_t H5B2__cache_int_serialize(const H5F_t *f, void *image, size_t len, void *thing);
static herr_t H5B2__cache_int_notify(H5AC_notify_action_t action, void *thing);
@@ -76,7 +76,7 @@ static herr_t H5B2__cache_int_free_icr(void *thing);
static herr_t H5B2__cache_leaf_get_initial_load_size(void *udata, size_t *image_len);
static htri_t H5B2__cache_leaf_verify_chksum(const void *image_ptr, size_t len, void *udata);
-static void *H5B2__cache_leaf_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty);
+static void *H5B2__cache_leaf_deserialize(const void *image, size_t len, void *udata, bool *dirty);
static herr_t H5B2__cache_leaf_image_len(const void *thing, size_t *image_len);
static herr_t H5B2__cache_leaf_serialize(const H5F_t *f, void *image, size_t len, void *thing);
static herr_t H5B2__cache_leaf_notify(H5AC_notify_action_t action, void *thing);
@@ -181,7 +181,7 @@ H5B2__cache_hdr_get_initial_load_size(void *_udata, size_t *image_len)
* Purpose: Verify the computed checksum of the data structure is the
* same as the stored chksum.
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: Negative
*
*-------------------------------------------------------------------------
@@ -192,7 +192,7 @@ H5B2__cache_hdr_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNUSE
const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
uint32_t stored_chksum; /* Stored metadata checksum value */
uint32_t computed_chksum; /* Computed metadata checksum value */
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -203,7 +203,7 @@ H5B2__cache_hdr_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNUSE
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
if (stored_chksum != computed_chksum)
- ret_value = FALSE;
+ ret_value = false;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B2__cache_hdr_verify_chksum() */
@@ -220,7 +220,7 @@ H5B2__cache_hdr_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNUSE
*/
static void *
H5B2__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void *_udata,
- hbool_t H5_ATTR_UNUSED *dirty)
+ bool H5_ATTR_UNUSED *dirty)
{
H5B2_hdr_t *hdr = NULL; /* B-tree header */
H5B2_hdr_cache_ud_t *udata = (H5B2_hdr_cache_ud_t *)_udata;
@@ -542,7 +542,7 @@ H5B2__cache_int_get_initial_load_size(void *_udata, size_t *image_len)
* Purpose: Verify the computed checksum of the data structure is the
* same as the stored chksum.
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: Negative
*
*-------------------------------------------------------------------------
@@ -555,7 +555,7 @@ H5B2__cache_int_verify_chksum(const void *_image, size_t H5_ATTR_UNUSED len, voi
size_t chk_size; /* Exact size of the node with checksum at the end */
uint32_t stored_chksum; /* Stored metadata checksum value */
uint32_t computed_chksum; /* Computed metadata checksum value */
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -571,7 +571,7 @@ H5B2__cache_int_verify_chksum(const void *_image, size_t H5_ATTR_UNUSED len, voi
H5F_get_checksums(image, chk_size, &stored_chksum, &computed_chksum);
if (stored_chksum != computed_chksum)
- ret_value = FALSE;
+ ret_value = false;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B2__cache_int_verify_chksum() */
@@ -588,7 +588,7 @@ H5B2__cache_int_verify_chksum(const void *_image, size_t H5_ATTR_UNUSED len, voi
*/
static void *
H5B2__cache_int_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void *_udata,
- hbool_t H5_ATTR_UNUSED *dirty)
+ bool H5_ATTR_UNUSED *dirty)
{
H5B2_internal_cache_ud_t *udata = (H5B2_internal_cache_ud_t *)_udata; /* Pointer to user data */
H5B2_internal_t *internal = NULL; /* Internal node read */
@@ -941,7 +941,7 @@ H5B2__cache_leaf_get_initial_load_size(void *_udata, size_t *image_len)
* Purpose: Verify the computed checksum of the data structure is the
* same as the stored chksum.
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: Negative
*
*-------------------------------------------------------------------------
@@ -954,7 +954,7 @@ H5B2__cache_leaf_verify_chksum(const void *_image, size_t H5_ATTR_UNUSED len, vo
size_t chk_size; /* Exact size of the node with checksum at the end */
uint32_t stored_chksum; /* Stored metadata checksum value */
uint32_t computed_chksum; /* Computed metadata checksum value */
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -969,7 +969,7 @@ H5B2__cache_leaf_verify_chksum(const void *_image, size_t H5_ATTR_UNUSED len, vo
H5F_get_checksums(image, chk_size, &stored_chksum, &computed_chksum);
if (stored_chksum != computed_chksum)
- ret_value = FALSE;
+ ret_value = false;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B2__cache_leaf_verify_chksum() */
@@ -986,7 +986,7 @@ H5B2__cache_leaf_verify_chksum(const void *_image, size_t H5_ATTR_UNUSED len, vo
*/
static void *
H5B2__cache_leaf_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void *_udata,
- hbool_t H5_ATTR_UNUSED *dirty)
+ bool H5_ATTR_UNUSED *dirty)
{
H5B2_leaf_cache_ud_t *udata = (H5B2_leaf_cache_ud_t *)_udata;
H5B2_leaf_t *leaf = NULL; /* Pointer to lead node loaded */
diff --git a/src/H5B2dbg.c b/src/H5B2dbg.c
index af558f2a458..83a70eb5311 100644
--- a/src/H5B2dbg.c
+++ b/src/H5B2dbg.c
@@ -124,7 +124,7 @@ H5B2__hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
/* Print relevant node info */
fprintf(stream, "%*sNode Info: (max_nrec/split_nrec/merge_nrec)\n", indent, "");
for (u = 0; u < (unsigned)(hdr->depth + 1); u++) {
- HDsnprintf(temp_str, sizeof(temp_str), "Depth %u:", u);
+ snprintf(temp_str, sizeof(temp_str), "Depth %u:", u);
fprintf(stream, "%*s%-*s (%u/%u/%u)\n", indent + 3, "", MAX(0, fwidth - 3), temp_str,
hdr->node_info[u].max_nrec, hdr->node_info[u].split_nrec, hdr->node_info[u].merge_nrec);
} /* end for */
@@ -184,7 +184,7 @@ H5B2__int_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, co
H5_CHECK_OVERFLOW(depth, unsigned, uint16_t);
node_ptr.addr = addr;
H5_CHECKED_ASSIGN(node_ptr.node_nrec, uint16_t, nrec, unsigned);
- if (NULL == (internal = H5B2__protect_internal(hdr, NULL, &node_ptr, (uint16_t)depth, FALSE,
+ if (NULL == (internal = H5B2__protect_internal(hdr, NULL, &node_ptr, (uint16_t)depth, false,
H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree internal node");
@@ -206,13 +206,13 @@ H5B2__int_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, co
/* Print all node pointers and records */
for (u = 0; u < internal->nrec; u++) {
/* Print node pointer */
- HDsnprintf(temp_str, sizeof(temp_str), "Node pointer #%u: (all/node/addr)", u);
+ snprintf(temp_str, sizeof(temp_str), "Node pointer #%u: (all/node/addr)", u);
fprintf(stream, "%*s%-*s (%" PRIuHSIZE "/%u/%" PRIuHADDR ")\n", indent + 3, "", MAX(0, fwidth - 3),
temp_str, internal->node_ptrs[u].all_nrec, internal->node_ptrs[u].node_nrec,
internal->node_ptrs[u].addr);
/* Print record */
- HDsnprintf(temp_str, sizeof(temp_str), "Record #%u:", u);
+ snprintf(temp_str, sizeof(temp_str), "Record #%u:", u);
fprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), temp_str);
assert(H5B2_INT_NREC(internal, hdr, u));
(void)(type->debug)(stream, indent + 6, MAX(0, fwidth - 6), H5B2_INT_NREC(internal, hdr, u),
@@ -220,7 +220,7 @@ H5B2__int_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, co
} /* end for */
/* Print final node pointer */
- HDsnprintf(temp_str, sizeof(temp_str), "Node pointer #%u: (all/node/addr)", u);
+ snprintf(temp_str, sizeof(temp_str), "Node pointer #%u: (all/node/addr)", u);
fprintf(stream, "%*s%-*s (%" PRIuHSIZE "/%u/%" PRIuHADDR ")\n", indent + 3, "", MAX(0, fwidth - 3),
temp_str, internal->node_ptrs[u].all_nrec, internal->node_ptrs[u].node_nrec,
internal->node_ptrs[u].addr);
@@ -282,7 +282,7 @@ H5B2__leaf_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, c
H5_CHECK_OVERFLOW(nrec, unsigned, uint16_t);
node_ptr.addr = addr;
H5_CHECKED_ASSIGN(node_ptr.node_nrec, uint16_t, nrec, unsigned);
- if (NULL == (leaf = H5B2__protect_leaf(hdr, NULL, &node_ptr, FALSE, H5AC__READ_ONLY_FLAG)))
+ if (NULL == (leaf = H5B2__protect_leaf(hdr, NULL, &node_ptr, false, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node");
/* Print opening message */
@@ -303,7 +303,7 @@ H5B2__leaf_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, c
/* Print all node pointers and records */
for (u = 0; u < leaf->nrec; u++) {
/* Print record */
- HDsnprintf(temp_str, sizeof(temp_str), "Record #%u:", u);
+ snprintf(temp_str, sizeof(temp_str), "Record #%u:", u);
fprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), temp_str);
assert(H5B2_LEAF_NREC(leaf, hdr, u));
(void)(type->debug)(stream, indent + 6, MAX(0, fwidth - 6), H5B2_LEAF_NREC(leaf, hdr, u),
diff --git a/src/H5B2hdr.c b/src/H5B2hdr.c
index c4ffea23ffc..8196ee22a30 100644
--- a/src/H5B2hdr.c
+++ b/src/H5B2hdr.c
@@ -264,7 +264,7 @@ haddr_t
H5B2__hdr_create(H5F_t *f, const H5B2_create_t *cparam, void *ctx_udata)
{
H5B2_hdr_t *hdr = NULL; /* The new v2 B-tree header information */
- hbool_t inserted = FALSE; /* Whether the header was inserted into cache */
+ bool inserted = false; /* Whether the header was inserted into cache */
haddr_t ret_value = HADDR_UNDEF; /* Return value */
FUNC_ENTER_PACKAGE
@@ -295,7 +295,7 @@ H5B2__hdr_create(H5F_t *f, const H5B2_create_t *cparam, void *ctx_udata)
/* Cache the new B-tree node */
if (H5AC_insert_entry(f, H5AC_BT2_HDR, hdr->addr, hdr, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, HADDR_UNDEF, "can't add B-tree header to cache");
- inserted = TRUE;
+ inserted = true;
/* Add header as child of 'top' proxy */
if (hdr->top_proxy)
diff --git a/src/H5B2int.c b/src/H5B2int.c
index 269d7f7c2b3..1b3ecae7232 100644
--- a/src/H5B2int.c
+++ b/src/H5B2int.c
@@ -177,7 +177,7 @@ H5B2__split1(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr,
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node");
left_addr = internal->node_ptrs[idx].addr;
if (NULL == (right_int = H5B2__protect_internal(hdr, internal, &internal->node_ptrs[idx + 1],
- (uint16_t)(depth - 1), FALSE, H5AC__NO_FLAGS_SET)))
+ (uint16_t)(depth - 1), false, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node");
right_addr = internal->node_ptrs[idx + 1].addr;
@@ -208,7 +208,7 @@ H5B2__split1(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr,
H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node");
left_addr = internal->node_ptrs[idx].addr;
- if (NULL == (right_leaf = H5B2__protect_leaf(hdr, internal, &internal->node_ptrs[idx + 1], FALSE,
+ if (NULL == (right_leaf = H5B2__protect_leaf(hdr, internal, &internal->node_ptrs[idx + 1], false,
H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node");
right_addr = internal->node_ptrs[idx + 1].addr;
@@ -377,7 +377,7 @@ H5B2__split_root(H5B2_hdr_t *hdr)
/* Protect new root node */
if (NULL ==
- (new_root = H5B2__protect_internal(hdr, hdr, &hdr->root, hdr->depth, FALSE, H5AC__NO_FLAGS_SET)))
+ (new_root = H5B2__protect_internal(hdr, hdr, &hdr->root, hdr->depth, false, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node");
/* Set first node pointer in root node to old root node pointer info */
@@ -1141,7 +1141,7 @@ H5B2__merge2(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr,
left_addr = internal->node_ptrs[idx].addr;
if (NULL ==
(right_internal = H5B2__protect_internal(hdr, internal, &internal->node_ptrs[idx + 1],
- (uint16_t)(depth - 1), FALSE, H5AC__NO_FLAGS_SET)))
+ (uint16_t)(depth - 1), false, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node");
right_addr = internal->node_ptrs[idx + 1].addr;
@@ -1168,7 +1168,7 @@ H5B2__merge2(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr,
H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node");
left_addr = internal->node_ptrs[idx].addr;
- if (NULL == (right_leaf = H5B2__protect_leaf(hdr, internal, &internal->node_ptrs[idx + 1], FALSE,
+ if (NULL == (right_leaf = H5B2__protect_leaf(hdr, internal, &internal->node_ptrs[idx + 1], false,
H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node");
right_addr = internal->node_ptrs[idx + 1].addr;
@@ -1326,7 +1326,7 @@ H5B2__merge3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr,
middle_addr = internal->node_ptrs[idx].addr;
if (NULL ==
(right_internal = H5B2__protect_internal(hdr, internal, &internal->node_ptrs[idx + 1],
- (uint16_t)(depth - 1), FALSE, H5AC__NO_FLAGS_SET)))
+ (uint16_t)(depth - 1), false, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node");
right_addr = internal->node_ptrs[idx + 1].addr;
@@ -1362,7 +1362,7 @@ H5B2__merge3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr,
hdr->swmr_write, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node");
middle_addr = internal->node_ptrs[idx].addr;
- if (NULL == (right_leaf = H5B2__protect_leaf(hdr, internal, &internal->node_ptrs[idx + 1], FALSE,
+ if (NULL == (right_leaf = H5B2__protect_leaf(hdr, internal, &internal->node_ptrs[idx + 1], false,
H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node");
right_addr = internal->node_ptrs[idx + 1].addr;
@@ -1599,7 +1599,7 @@ H5B2__iterate_node(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node,
uint8_t *node_native; /* Pointers to node's native records */
uint8_t *native = NULL; /* Pointers to copy of node's native records */
H5B2_node_ptr_t *node_ptrs = NULL; /* Pointers to node's node pointers */
- hbool_t node_pinned = FALSE; /* Whether node is pinned */
+ bool node_pinned = false; /* Whether node is pinned */
unsigned u; /* Local index */
herr_t ret_value = H5_ITER_CONT; /* Iterator return value */
@@ -1616,7 +1616,7 @@ H5B2__iterate_node(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node,
/* Lock the current B-tree node */
if (NULL ==
- (internal = H5B2__protect_internal(hdr, parent, curr_node, depth, FALSE, H5AC__READ_ONLY_FLAG)))
+ (internal = H5B2__protect_internal(hdr, parent, curr_node, depth, false, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node");
/* Set up information about current node */
@@ -1637,7 +1637,7 @@ H5B2__iterate_node(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node,
H5B2_leaf_t *leaf; /* Pointer to leaf node */
/* Lock the current B-tree node */
- if (NULL == (leaf = H5B2__protect_leaf(hdr, parent, (H5B2_node_ptr_t *)curr_node, FALSE,
+ if (NULL == (leaf = H5B2__protect_leaf(hdr, parent, (H5B2_node_ptr_t *)curr_node, false,
H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node");
@@ -1660,7 +1660,7 @@ H5B2__iterate_node(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node,
(unsigned)(hdr->swmr_write ? H5AC__PIN_ENTRY_FLAG : H5AC__NO_FLAGS_SET)) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node");
if (hdr->swmr_write)
- node_pinned = TRUE;
+ node_pinned = true;
else
node = NULL;
@@ -1729,7 +1729,7 @@ H5B2__delete_node(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node, v
/* Lock the current B-tree node */
if (NULL ==
- (internal = H5B2__protect_internal(hdr, parent, curr_node, depth, FALSE, H5AC__NO_FLAGS_SET)))
+ (internal = H5B2__protect_internal(hdr, parent, curr_node, depth, false, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node");
/* Set up information about current node */
@@ -1748,7 +1748,7 @@ H5B2__delete_node(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node, v
/* Lock the current B-tree node */
if (NULL ==
- (leaf = H5B2__protect_leaf(hdr, parent, (H5B2_node_ptr_t *)curr_node, FALSE, H5AC__NO_FLAGS_SET)))
+ (leaf = H5B2__protect_leaf(hdr, parent, (H5B2_node_ptr_t *)curr_node, false, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node");
/* Set up information about current node */
@@ -1806,7 +1806,7 @@ H5B2__node_size(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node, voi
/* Lock the current B-tree node */
if (NULL ==
- (internal = H5B2__protect_internal(hdr, parent, curr_node, depth, FALSE, H5AC__READ_ONLY_FLAG)))
+ (internal = H5B2__protect_internal(hdr, parent, curr_node, depth, false, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node");
/* Recursively descend into child nodes, if we are above the "twig" level in the B-tree */
@@ -1893,8 +1893,8 @@ H5B2__update_flush_depend(H5B2_hdr_t *hdr, unsigned depth, H5B2_node_ptr_t *node
/* If the node is in the cache, check for retargeting its parent */
if (node_status & H5AC_ES__IN_CACHE) {
- void **parent_ptr = NULL; /* Pointer to child node's parent */
- hbool_t update_deps = FALSE; /* Whether to update flush dependencies */
+ void **parent_ptr = NULL; /* Pointer to child node's parent */
+ bool update_deps = false; /* Whether to update flush dependencies */
/* Get child node pointer */
if (depth > 1) {
@@ -1902,14 +1902,14 @@ H5B2__update_flush_depend(H5B2_hdr_t *hdr, unsigned depth, H5B2_node_ptr_t *node
/* Protect child */
if (NULL == (child_int = H5B2__protect_internal(hdr, new_parent, node_ptr, (uint16_t)(depth - 1),
- FALSE, H5AC__NO_FLAGS_SET)))
+ false, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node");
child_class = H5AC_BT2_INT;
child = child_int;
if (child_int->parent == old_parent) {
parent_ptr = &child_int->parent;
- update_deps = TRUE;
+ update_deps = true;
} /* end if */
else
assert(child_int->parent == new_parent);
@@ -1918,7 +1918,7 @@ H5B2__update_flush_depend(H5B2_hdr_t *hdr, unsigned depth, H5B2_node_ptr_t *node
H5B2_leaf_t *child_leaf;
/* Protect child */
- if (NULL == (child_leaf = H5B2__protect_leaf(hdr, new_parent, (H5B2_node_ptr_t *)node_ptr, FALSE,
+ if (NULL == (child_leaf = H5B2__protect_leaf(hdr, new_parent, (H5B2_node_ptr_t *)node_ptr, false,
H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node");
child_class = H5AC_BT2_LEAF;
@@ -1926,7 +1926,7 @@ H5B2__update_flush_depend(H5B2_hdr_t *hdr, unsigned depth, H5B2_node_ptr_t *node
if (child_leaf->parent == old_parent) {
parent_ptr = &child_leaf->parent;
- update_deps = TRUE;
+ update_deps = true;
} /* end if */
else
assert(child_leaf->parent == new_parent);
diff --git a/src/H5B2internal.c b/src/H5B2internal.c
index 399bcd2039f..e97e921487d 100644
--- a/src/H5B2internal.c
+++ b/src/H5B2internal.c
@@ -79,7 +79,7 @@ herr_t
H5B2__create_internal(H5B2_hdr_t *hdr, void *parent, H5B2_node_ptr_t *node_ptr, uint16_t depth)
{
H5B2_internal_t *internal = NULL; /* Pointer to new internal node created */
- hbool_t inserted = FALSE; /* Whether the internal node was inserted into cache */
+ bool inserted = false; /* Whether the internal node was inserted into cache */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -129,7 +129,7 @@ H5B2__create_internal(H5B2_hdr_t *hdr, void *parent, H5B2_node_ptr_t *node_ptr,
/* Cache the new B-tree node */
if (H5AC_insert_entry(hdr->f, H5AC_BT2_INT, node_ptr->addr, internal, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "can't add B-tree internal node to cache");
- inserted = TRUE;
+ inserted = true;
/* Add internal node as child of 'top' proxy */
if (hdr->top_proxy) {
@@ -172,8 +172,8 @@ H5B2__create_internal(H5B2_hdr_t *hdr, void *parent, H5B2_node_ptr_t *node_ptr,
*-------------------------------------------------------------------------
*/
H5B2_internal_t *
-H5B2__protect_internal(H5B2_hdr_t *hdr, void *parent, H5B2_node_ptr_t *node_ptr, uint16_t depth,
- hbool_t shadow, unsigned flags)
+H5B2__protect_internal(H5B2_hdr_t *hdr, void *parent, H5B2_node_ptr_t *node_ptr, uint16_t depth, bool shadow,
+ unsigned flags)
{
H5B2_internal_cache_ud_t udata; /* User data to pass through to cache 'deserialize' callback */
H5B2_internal_t *internal = NULL; /* v2 B-tree internal node */
@@ -286,7 +286,7 @@ H5B2__neighbor_internal(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_n
/* Lock current B-tree node */
if (NULL ==
- (internal = H5B2__protect_internal(hdr, parent, curr_node_ptr, depth, FALSE, H5AC__READ_ONLY_FLAG)))
+ (internal = H5B2__protect_internal(hdr, parent, curr_node_ptr, depth, false, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node");
/* Locate node pointer for child */
@@ -359,7 +359,7 @@ H5B2__insert_internal(H5B2_hdr_t *hdr, uint16_t depth, unsigned *parent_cache_in
/* Lock current B-tree node */
if (NULL ==
- (internal = H5B2__protect_internal(hdr, parent, curr_node_ptr, depth, FALSE, H5AC__NO_FLAGS_SET)))
+ (internal = H5B2__protect_internal(hdr, parent, curr_node_ptr, depth, false, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node");
/* Sanity check number of records */
@@ -527,7 +527,7 @@ H5B2__update_internal(H5B2_hdr_t *hdr, uint16_t depth, unsigned *parent_cache_in
/* Lock current B-tree node */
if (NULL ==
- (internal = H5B2__protect_internal(hdr, parent, curr_node_ptr, depth, FALSE, H5AC__NO_FLAGS_SET)))
+ (internal = H5B2__protect_internal(hdr, parent, curr_node_ptr, depth, false, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node");
/* Sanity check number of records */
@@ -540,12 +540,12 @@ H5B2__update_internal(H5B2_hdr_t *hdr, uint16_t depth, unsigned *parent_cache_in
/* Check for modifying existing record */
if (0 == cmp) {
- hbool_t changed = FALSE; /* Whether the 'modify' callback changed the record */
+ bool changed = false; /* Whether the 'modify' callback changed the record */
/* Make callback for current record */
if ((op)(H5B2_INT_NREC(internal, hdr, idx), op_data, &changed) < 0) {
/* Make certain that the callback didn't modify the value if it failed */
- assert(changed == FALSE);
+ assert(changed == false);
HGOTO_ERROR(H5E_BTREE, H5E_CANTMODIFY, FAIL,
"'modify' callback failed for B-tree update operation");
@@ -614,30 +614,30 @@ H5B2__update_internal(H5B2_hdr_t *hdr, uint16_t depth, unsigned *parent_cache_in
case H5B2_UPDATE_INSERT_CHILD_FULL:
/* Split/redistribute this node */
if (internal->nrec == hdr->node_info[depth].split_nrec) {
- hbool_t could_split = FALSE; /* Whether the child node could split */
+ bool could_split = false; /* Whether the child node could split */
if (idx == 0) { /* Left-most child */
/* Check for left-most child and its neighbor being close to full */
if ((internal->node_ptrs[idx].node_nrec + internal->node_ptrs[idx + 1].node_nrec) >=
(unsigned)((hdr->node_info[depth - 1].split_nrec * 2) - 1))
- could_split = TRUE;
+ could_split = true;
}
else if (idx == internal->nrec) { /* Right-most child */
/* Check for right-most child and its neighbor being close to full */
if ((internal->node_ptrs[idx - 1].node_nrec + internal->node_ptrs[idx].node_nrec) >=
(unsigned)((hdr->node_info[depth - 1].split_nrec * 2) - 1))
- could_split = TRUE;
+ could_split = true;
}
else { /* Middle child */
/* Check for middle child and its left neighbor being close to full */
if ((internal->node_ptrs[idx - 1].node_nrec + internal->node_ptrs[idx].node_nrec) >=
(unsigned)((hdr->node_info[depth - 1].split_nrec * 2) - 1))
- could_split = TRUE;
+ could_split = true;
/* Check for middle child and its right neighbor being close to full */
else if ((internal->node_ptrs[idx].node_nrec +
internal->node_ptrs[idx + 1].node_nrec) >=
(unsigned)((hdr->node_info[depth - 1].split_nrec * 2) - 1))
- could_split = TRUE;
+ could_split = true;
}
/* If this node is full and the child node insertion could
@@ -777,7 +777,7 @@ H5B2__shadow_internal(H5B2_internal_t *internal, H5B2_node_ptr_t *curr_node_ptr)
*-------------------------------------------------------------------------
*/
herr_t
-H5B2__remove_internal(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *swap_loc, void *swap_parent,
+H5B2__remove_internal(H5B2_hdr_t *hdr, bool *depth_decreased, void *swap_loc, void *swap_parent,
uint16_t depth, H5AC_info_t *parent_cache_info, unsigned *parent_cache_info_flags_ptr,
H5B2_nodepos_t curr_pos, H5B2_node_ptr_t *curr_node_ptr, void *udata, H5B2_remove_t op,
void *op_data)
@@ -790,7 +790,7 @@ H5B2__remove_internal(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *swap_loc,
unsigned internal_flags = H5AC__NO_FLAGS_SET;
haddr_t internal_addr = HADDR_UNDEF; /* Address of internal node */
size_t merge_nrec; /* Number of records to merge node at */
- hbool_t collapsed_root = FALSE; /* Whether the root was collapsed */
+ bool collapsed_root = false; /* Whether the root was collapsed */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -803,7 +803,7 @@ H5B2__remove_internal(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *swap_loc,
assert(H5_addr_defined(curr_node_ptr->addr));
/* Lock current B-tree node */
- if (NULL == (internal = H5B2__protect_internal(hdr, parent_cache_info, curr_node_ptr, depth, FALSE,
+ if (NULL == (internal = H5B2__protect_internal(hdr, parent_cache_info, curr_node_ptr, depth, false,
H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node");
internal_addr = curr_node_ptr->addr;
@@ -836,7 +836,7 @@ H5B2__remove_internal(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *swap_loc,
HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "unable to update child node to new parent");
/* Indicate that the level of the B-tree decreased */
- *depth_decreased = TRUE;
+ *depth_decreased = true;
/* Set pointers for advancing to child node */
new_cache_info = parent_cache_info;
@@ -844,7 +844,7 @@ H5B2__remove_internal(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *swap_loc,
new_node_ptr = curr_node_ptr;
/* Set flag to indicate root was collapsed */
- collapsed_root = TRUE;
+ collapsed_root = true;
/* Indicate position of next node */
next_pos = H5B2_POS_ROOT;
@@ -1018,7 +1018,7 @@ H5B2__remove_internal(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *swap_loc,
*-------------------------------------------------------------------------
*/
herr_t
-H5B2__remove_internal_by_idx(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *swap_loc, void *swap_parent,
+H5B2__remove_internal_by_idx(H5B2_hdr_t *hdr, bool *depth_decreased, void *swap_loc, void *swap_parent,
uint16_t depth, H5AC_info_t *parent_cache_info,
unsigned *parent_cache_info_flags_ptr, H5B2_node_ptr_t *curr_node_ptr,
H5B2_nodepos_t curr_pos, hsize_t n, H5B2_remove_t op, void *op_data)
@@ -1031,7 +1031,7 @@ H5B2__remove_internal_by_idx(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *sw
unsigned internal_flags = H5AC__NO_FLAGS_SET;
haddr_t internal_addr = HADDR_UNDEF; /* Address of internal node */
size_t merge_nrec; /* Number of records to merge node at */
- hbool_t collapsed_root = FALSE; /* Whether the root was collapsed */
+ bool collapsed_root = false; /* Whether the root was collapsed */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1044,7 +1044,7 @@ H5B2__remove_internal_by_idx(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *sw
assert(H5_addr_defined(curr_node_ptr->addr));
/* Lock current B-tree node */
- if (NULL == (internal = H5B2__protect_internal(hdr, parent_cache_info, curr_node_ptr, depth, FALSE,
+ if (NULL == (internal = H5B2__protect_internal(hdr, parent_cache_info, curr_node_ptr, depth, false,
H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node");
internal_addr = curr_node_ptr->addr;
@@ -1080,7 +1080,7 @@ H5B2__remove_internal_by_idx(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *sw
HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "unable to update child node to new parent");
/* Indicate that the level of the B-tree decreased */
- *depth_decreased = TRUE;
+ *depth_decreased = true;
/* Set pointers for advancing to child node */
new_cache_info = parent_cache_info;
@@ -1088,7 +1088,7 @@ H5B2__remove_internal_by_idx(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *sw
new_node_ptr = curr_node_ptr;
/* Set flag to indicate root was collapsed */
- collapsed_root = TRUE;
+ collapsed_root = true;
/* Indicate position of next node */
next_pos = H5B2_POS_ROOT;
@@ -1097,7 +1097,7 @@ H5B2__remove_internal_by_idx(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *sw
else {
hsize_t orig_n = n; /* Original index looked for */
unsigned idx; /* Location of record which matches key */
- hbool_t found = FALSE; /* Comparison value of records */
+ bool found = false; /* Comparison value of records */
unsigned retries; /* Number of times to attempt redistribution */
/* Shadow the node if doing SWMR writes */
@@ -1120,7 +1120,7 @@ H5B2__remove_internal_by_idx(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *sw
/* Indicate the record was found and that the index
* in child nodes is zero from now on
*/
- found = TRUE;
+ found = true;
n = 0;
/* Increment to next record */
@@ -1203,7 +1203,7 @@ H5B2__remove_internal_by_idx(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *sw
/* Reset "found" flag - the record may have shifted during the
* redistribute/merge
*/
- found = FALSE;
+ found = false;
/* Search for record with correct index */
for (idx = 0; idx < internal->nrec; idx++) {
@@ -1214,7 +1214,7 @@ H5B2__remove_internal_by_idx(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *sw
/* Indicate the record was found and that the index
* in child nodes is zero from now on
*/
- found = TRUE;
+ found = true;
n = 0;
/* Increment to next record */
diff --git a/src/H5B2leaf.c b/src/H5B2leaf.c
index 23a7c4d385b..48e5f62fe29 100644
--- a/src/H5B2leaf.c
+++ b/src/H5B2leaf.c
@@ -80,7 +80,7 @@ herr_t
H5B2__create_leaf(H5B2_hdr_t *hdr, void *parent, H5B2_node_ptr_t *node_ptr)
{
H5B2_leaf_t *leaf = NULL; /* Pointer to new leaf node created */
- hbool_t inserted = FALSE; /* Whether the leaf node was inserted into cache */
+ bool inserted = false; /* Whether the leaf node was inserted into cache */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -118,7 +118,7 @@ H5B2__create_leaf(H5B2_hdr_t *hdr, void *parent, H5B2_node_ptr_t *node_ptr)
/* Cache the new B-tree node */
if (H5AC_insert_entry(hdr->f, H5AC_BT2_LEAF, node_ptr->addr, leaf, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "can't add B-tree leaf to cache");
- inserted = TRUE;
+ inserted = true;
/* Add leaf node as child of 'top' proxy */
if (hdr->top_proxy) {
@@ -161,7 +161,7 @@ H5B2__create_leaf(H5B2_hdr_t *hdr, void *parent, H5B2_node_ptr_t *node_ptr)
*-------------------------------------------------------------------------
*/
H5B2_leaf_t *
-H5B2__protect_leaf(H5B2_hdr_t *hdr, void *parent, H5B2_node_ptr_t *node_ptr, hbool_t shadow, unsigned flags)
+H5B2__protect_leaf(H5B2_hdr_t *hdr, void *parent, H5B2_node_ptr_t *node_ptr, bool shadow, unsigned flags)
{
H5B2_leaf_cache_ud_t udata; /* User-data for callback */
H5B2_leaf_t *leaf; /* v2 B-tree leaf node */
@@ -268,7 +268,7 @@ H5B2__neighbor_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, void *neigh
assert(op);
/* Lock current B-tree node */
- if (NULL == (leaf = H5B2__protect_leaf(hdr, parent, curr_node_ptr, FALSE, H5AC__READ_ONLY_FLAG)))
+ if (NULL == (leaf = H5B2__protect_leaf(hdr, parent, curr_node_ptr, false, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node");
/* Locate node pointer for child */
@@ -336,7 +336,7 @@ H5B2__insert_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_
assert(H5_addr_defined(curr_node_ptr->addr));
/* Lock current B-tree node */
- if (NULL == (leaf = H5B2__protect_leaf(hdr, parent, curr_node_ptr, FALSE, H5AC__NO_FLAGS_SET)))
+ if (NULL == (leaf = H5B2__protect_leaf(hdr, parent, curr_node_ptr, false, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node");
/* Must have a leaf node with enough space to insert a record now */
@@ -447,7 +447,7 @@ H5B2__update_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_update_s
assert(H5_addr_defined(curr_node_ptr->addr));
/* Lock current B-tree node */
- if (NULL == (leaf = H5B2__protect_leaf(hdr, parent, curr_node_ptr, FALSE, H5AC__NO_FLAGS_SET)))
+ if (NULL == (leaf = H5B2__protect_leaf(hdr, parent, curr_node_ptr, false, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node");
/* Sanity check number of records */
@@ -486,12 +486,12 @@ H5B2__update_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_update_s
/* Check for modifying existing record */
if (0 == cmp) {
- hbool_t changed = FALSE; /* Whether the 'modify' callback changed the record */
+ bool changed = false; /* Whether the 'modify' callback changed the record */
/* Make callback for current record */
if ((op)(H5B2_LEAF_NREC(leaf, hdr, idx), op_data, &changed) < 0) {
/* Make certain that the callback didn't modify the value if it failed */
- assert(changed == FALSE);
+ assert(changed == false);
HGOTO_ERROR(H5E_BTREE, H5E_CANTMODIFY, FAIL,
"'modify' callback failed for B-tree update operation");
@@ -610,7 +610,7 @@ H5B2__swap_leaf(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal, unsi
/* Lock B-tree child nodes */
if (NULL ==
(child_internal = H5B2__protect_internal(hdr, internal, &internal->node_ptrs[idx],
- (uint16_t)(depth - 1), FALSE, H5AC__NO_FLAGS_SET)))
+ (uint16_t)(depth - 1), false, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node");
child_addr = internal->node_ptrs[idx].addr;
@@ -625,7 +625,7 @@ H5B2__swap_leaf(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal, unsi
child_class = H5AC_BT2_LEAF;
/* Lock B-tree child node */
- if (NULL == (child_leaf = H5B2__protect_leaf(hdr, internal, &internal->node_ptrs[idx], FALSE,
+ if (NULL == (child_leaf = H5B2__protect_leaf(hdr, internal, &internal->node_ptrs[idx], false,
H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node");
child_addr = internal->node_ptrs[idx].addr;
@@ -752,7 +752,7 @@ H5B2__remove_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_
assert(H5_addr_defined(curr_node_ptr->addr));
/* Lock current B-tree node */
- if (NULL == (leaf = H5B2__protect_leaf(hdr, parent, curr_node_ptr, FALSE, H5AC__NO_FLAGS_SET)))
+ if (NULL == (leaf = H5B2__protect_leaf(hdr, parent, curr_node_ptr, false, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node");
leaf_addr = curr_node_ptr->addr;
@@ -855,7 +855,7 @@ H5B2__remove_leaf_by_idx(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_n
assert(H5_addr_defined(curr_node_ptr->addr));
/* Lock B-tree leaf node */
- if (NULL == (leaf = H5B2__protect_leaf(hdr, parent, curr_node_ptr, FALSE, H5AC__NO_FLAGS_SET)))
+ if (NULL == (leaf = H5B2__protect_leaf(hdr, parent, curr_node_ptr, false, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node");
leaf_addr = curr_node_ptr->addr;
diff --git a/src/H5B2pkg.h b/src/H5B2pkg.h
index 668ea5d4834..d60e1ac0c85 100644
--- a/src/H5B2pkg.h
+++ b/src/H5B2pkg.h
@@ -161,7 +161,7 @@ typedef struct H5B2_hdr_t {
size_t hdr_size; /* Size of the B-tree header on disk */
size_t rc; /* Reference count of nodes using this header */
size_t file_rc; /* Reference count of files using this header */
- hbool_t pending_delete; /* B-tree is pending deletion */
+ bool pending_delete; /* B-tree is pending deletion */
uint8_t sizeof_size; /* Size of file sizes */
uint8_t sizeof_addr; /* Size of file addresses */
H5B2_remove_t remove_op; /* Callback operator for deleting B-tree */
@@ -173,7 +173,7 @@ typedef struct H5B2_hdr_t {
void *max_native_rec; /* Pointer to maximum native record */
/* SWMR / Flush dependency information (not stored) */
- hbool_t swmr_write; /* Whether we are doing SWMR writes */
+ bool swmr_write; /* Whether we are doing SWMR writes */
H5AC_proxy_entry_t *top_proxy; /* 'Top' proxy cache entry for all B-tree entries */
void *parent; /* Pointer to 'top' proxy flush dependency
* parent, if it exists, otherwise NULL.
@@ -349,14 +349,14 @@ H5_DLL herr_t H5B2__hdr_unprotect(H5B2_hdr_t *hdr, unsigned cache_flags);
H5_DLL herr_t H5B2__hdr_delete(H5B2_hdr_t *hdr);
/* Routines for operating on leaf nodes */
-H5_DLL H5B2_leaf_t *H5B2__protect_leaf(H5B2_hdr_t *hdr, void *parent, H5B2_node_ptr_t *node_ptr,
- hbool_t shadow, unsigned flags);
+H5_DLL H5B2_leaf_t *H5B2__protect_leaf(H5B2_hdr_t *hdr, void *parent, H5B2_node_ptr_t *node_ptr, bool shadow,
+ unsigned flags);
H5_DLL herr_t H5B2__swap_leaf(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
unsigned *internal_flags_ptr, unsigned idx, void *swap_loc);
/* Routines for operating on internal nodes */
H5_DLL H5B2_internal_t *H5B2__protect_internal(H5B2_hdr_t *hdr, void *parent, H5B2_node_ptr_t *node_ptr,
- uint16_t depth, hbool_t shadow, unsigned flags);
+ uint16_t depth, bool shadow, unsigned flags);
/* Routines for allocating nodes */
H5_DLL herr_t H5B2__split_root(H5B2_hdr_t *hdr);
@@ -402,14 +402,14 @@ H5_DLL herr_t H5B2__neighbor_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_pt
void *op_data);
/* Routines for removing records */
-H5_DLL herr_t H5B2__remove_internal(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *swap_loc,
- void *swap_parent, uint16_t depth, H5AC_info_t *parent_cache_info,
+H5_DLL herr_t H5B2__remove_internal(H5B2_hdr_t *hdr, bool *depth_decreased, void *swap_loc, void *swap_parent,
+ uint16_t depth, H5AC_info_t *parent_cache_info,
unsigned *parent_cache_info_flags_ptr, H5B2_nodepos_t curr_pos,
H5B2_node_ptr_t *curr_node_ptr, void *udata, H5B2_remove_t op,
void *op_data);
H5_DLL herr_t H5B2__remove_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_t curr_pos,
void *parent, void *udata, H5B2_remove_t op, void *op_data);
-H5_DLL herr_t H5B2__remove_internal_by_idx(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *swap_loc,
+H5_DLL herr_t H5B2__remove_internal_by_idx(H5B2_hdr_t *hdr, bool *depth_decreased, void *swap_loc,
void *swap_parent, uint16_t depth, H5AC_info_t *parent_cache_info,
unsigned *parent_cache_info_flags_ptr,
H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_t curr_pos, hsize_t n,
diff --git a/src/H5B2private.h b/src/H5B2private.h
index 354bea53528..f3f1eaf8a65 100644
--- a/src/H5B2private.h
+++ b/src/H5B2private.h
@@ -64,7 +64,7 @@ typedef int (*H5B2_operator_t)(const void *record, void *op_data);
typedef herr_t (*H5B2_found_t)(const void *record, void *op_data);
/* Define the 'modify' callback function pointer for H5B2_modify() */
-typedef herr_t (*H5B2_modify_t)(void *record, void *op_data, hbool_t *changed);
+typedef herr_t (*H5B2_modify_t)(void *record, void *op_data, bool *changed);
/* Define the 'remove' callback function pointer for H5B2_remove() & H5B2_delete() */
typedef herr_t (*H5B2_remove_t)(const void *record, void *op_data);
@@ -128,7 +128,7 @@ H5_DLL H5B2_t *H5B2_open(H5F_t *f, haddr_t addr, void *ctx_udata);
H5_DLL herr_t H5B2_get_addr(const H5B2_t *bt2, haddr_t *addr /*out*/);
H5_DLL herr_t H5B2_insert(H5B2_t *bt2, void *udata);
H5_DLL herr_t H5B2_iterate(H5B2_t *bt2, H5B2_operator_t op, void *op_data);
-H5_DLL herr_t H5B2_find(H5B2_t *bt2, void *udata, hbool_t *found, H5B2_found_t op, void *op_data);
+H5_DLL herr_t H5B2_find(H5B2_t *bt2, void *udata, bool *found, H5B2_found_t op, void *op_data);
H5_DLL herr_t H5B2_index(H5B2_t *bt2, H5_iter_order_t order, hsize_t idx, H5B2_found_t op, void *op_data);
H5_DLL herr_t H5B2_neighbor(H5B2_t *bt2, H5B2_compare_t range, void *udata, H5B2_found_t op, void *op_data);
H5_DLL herr_t H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data);
diff --git a/src/H5B2test.c b/src/H5B2test.c
index 3285d306c85..4a5a325b031 100644
--- a/src/H5B2test.c
+++ b/src/H5B2test.c
@@ -481,7 +481,7 @@ H5B2__get_node_info_test(H5B2_t *bt2, void *udata, H5B2_node_info_test_t *ninfo)
H5B2_node_ptr_t next_node_ptr; /* Node pointer info for next node */
/* Lock B-tree current node */
- if (NULL == (internal = H5B2__protect_internal(hdr, parent, &curr_node_ptr, depth, FALSE,
+ if (NULL == (internal = H5B2__protect_internal(hdr, parent, &curr_node_ptr, depth, false,
H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree internal node");
@@ -537,7 +537,7 @@ H5B2__get_node_info_test(H5B2_t *bt2, void *udata, H5B2_node_info_test_t *ninfo)
H5B2_leaf_t *leaf; /* Pointer to leaf node in B-tree */
/* Lock B-tree leaf node */
- if (NULL == (leaf = H5B2__protect_leaf(hdr, parent, &curr_node_ptr, FALSE, H5AC__READ_ONLY_FLAG)))
+ if (NULL == (leaf = H5B2__protect_leaf(hdr, parent, &curr_node_ptr, false, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node");
/* Unpin parent if necessary */
diff --git a/src/H5Bcache.c b/src/H5Bcache.c
index 3426426ad58..d9c94f498ce 100644
--- a/src/H5Bcache.c
+++ b/src/H5Bcache.c
@@ -47,7 +47,7 @@
/* Metadata cache callbacks */
static herr_t H5B__cache_get_initial_load_size(void *udata, size_t *image_len);
-static void *H5B__cache_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty);
+static void *H5B__cache_deserialize(const void *image, size_t len, void *udata, bool *dirty);
static herr_t H5B__cache_image_len(const void *thing, size_t *image_len);
static herr_t H5B__cache_serialize(const H5F_t *f, void *image, size_t len, void *thing);
static herr_t H5B__cache_free_icr(void *thing);
@@ -118,7 +118,7 @@ H5B__cache_get_initial_load_size(void *_udata, size_t *image_len)
*-------------------------------------------------------------------------
*/
static void *
-H5B__cache_deserialize(const void *_image, size_t len, void *_udata, hbool_t H5_ATTR_UNUSED *dirty)
+H5B__cache_deserialize(const void *_image, size_t len, void *_udata, bool H5_ATTR_UNUSED *dirty)
{
H5B_t *bt = NULL; /* Pointer to the deserialized B-tree node */
H5B_cache_ud_t *udata = (H5B_cache_ud_t *)_udata; /* User data for callback */
@@ -289,7 +289,7 @@ H5B__cache_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED len, vo
*image++ = (uint8_t)shared->type->id;
/* 2^8 limit: only 1 byte is used to store node level */
- if (bt->level >= HDpow(2, LEVEL_BITS))
+ if (bt->level >= pow(2, LEVEL_BITS))
HGOTO_ERROR(H5E_BTREE, H5E_CANTENCODE, FAIL, "unable to encode node level");
H5_CHECK_OVERFLOW(bt->level, unsigned, uint8_t);
diff --git a/src/H5Bprivate.h b/src/H5Bprivate.h
index fd06efeeec6..a1d84efd1e7 100644
--- a/src/H5Bprivate.h
+++ b/src/H5Bprivate.h
@@ -106,20 +106,20 @@ typedef struct H5B_class_t {
herr_t (*new_node)(H5F_t *, H5B_ins_t, void *, void *, void *, haddr_t *);
int (*cmp2)(void *, void *, void *); /*compare 2 keys */
int (*cmp3)(void *, void *, void *); /*compare 3 keys */
- htri_t (*found)(H5F_t *, haddr_t, const void *, hbool_t *, void *);
+ htri_t (*found)(H5F_t *, haddr_t, const void *, bool *, void *);
/* insert new data */
- H5B_ins_t (*insert)(H5F_t *, haddr_t, void *, hbool_t *, void *, void *, void *, hbool_t *, haddr_t *);
+ H5B_ins_t (*insert)(H5F_t *, haddr_t, void *, bool *, void *, void *, void *, bool *, haddr_t *);
/* min insert uses min leaf, not new(), similarly for max insert */
- hbool_t follow_min;
- hbool_t follow_max;
+ bool follow_min;
+ bool follow_max;
/* The direction of the key that is intrinsically associated with each node */
H5B_dir_t critical_key;
/* remove existing data */
- H5B_ins_t (*remove)(H5F_t *, haddr_t, void *, hbool_t *, void *, void *, hbool_t *);
+ H5B_ins_t (*remove)(H5F_t *, haddr_t, void *, bool *, void *, void *, bool *);
/* encode, decode, debug key values */
herr_t (*decode)(const H5B_shared_t *, const uint8_t *, void *);
@@ -141,7 +141,7 @@ typedef struct H5B_info_t {
/* Library-private Function Prototypes */
/***************************************/
H5_DLL herr_t H5B_create(H5F_t *f, const H5B_class_t *type, void *udata, haddr_t *addr_p /*out*/);
-H5_DLL herr_t H5B_find(H5F_t *f, const H5B_class_t *type, haddr_t addr, hbool_t *found, void *udata);
+H5_DLL herr_t H5B_find(H5F_t *f, const H5B_class_t *type, haddr_t addr, bool *found, void *udata);
H5_DLL herr_t H5B_insert(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata);
H5_DLL herr_t H5B_iterate(H5F_t *f, const H5B_class_t *type, haddr_t addr, H5B_operator_t op, void *udata);
H5_DLL herr_t H5B_get_info(H5F_t *f, const H5B_class_t *type, haddr_t addr, H5B_info_t *bt_info,
diff --git a/src/H5C.c b/src/H5C.c
index 545154c8531..eb6e49ec502 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -120,7 +120,7 @@ H5FL_DEFINE_STATIC(H5C_t);
H5C_t *
H5C_create(size_t max_cache_size, size_t min_clean_size, int max_type_id,
const H5C_class_t *const *class_table_ptr, H5C_write_permitted_func_t check_write_permitted,
- hbool_t write_permitted, H5C_log_flush_func_t log_flush, void *aux_ptr)
+ bool write_permitted, H5C_log_flush_func_t log_flush, void *aux_ptr)
{
int i;
H5C_t *cache_ptr = NULL;
@@ -138,7 +138,7 @@ H5C_create(size_t max_cache_size, size_t min_clean_size, int max_type_id,
for (i = 0; i <= max_type_id; i++) {
assert((class_table_ptr)[i]);
- assert(HDstrlen((class_table_ptr)[i]->name) > 0);
+ assert(strlen((class_table_ptr)[i]->name) > 0);
} /* end for */
if (NULL == (cache_ptr = H5FL_CALLOC(H5C_t)))
@@ -153,7 +153,7 @@ H5C_create(size_t max_cache_size, size_t min_clean_size, int max_type_id,
* the fields.
*/
- cache_ptr->flush_in_progress = FALSE;
+ cache_ptr->flush_in_progress = false;
if (NULL == (cache_ptr->log_info = (H5C_log_info_t *)H5MM_calloc(sizeof(H5C_log_info_t))))
HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, NULL, "memory allocation failed");
@@ -172,8 +172,8 @@ H5C_create(size_t max_cache_size, size_t min_clean_size, int max_type_id,
cache_ptr->log_flush = log_flush;
- cache_ptr->evictions_enabled = TRUE;
- cache_ptr->close_warning_received = FALSE;
+ cache_ptr->evictions_enabled = true;
+ cache_ptr->close_warning_received = false;
cache_ptr->index_len = 0;
cache_ptr->index_size = (size_t)0;
@@ -199,12 +199,12 @@ H5C_create(size_t max_cache_size, size_t min_clean_size, int max_type_id,
cache_ptr->il_tail = NULL;
/* Tagging Field Initializations */
- cache_ptr->ignore_tags = FALSE;
+ cache_ptr->ignore_tags = false;
cache_ptr->num_objs_corked = 0;
/* slist field initializations */
- cache_ptr->slist_enabled = FALSE;
- cache_ptr->slist_changed = FALSE;
+ cache_ptr->slist_enabled = false;
+ cache_ptr->slist_changed = false;
cache_ptr->slist_len = 0;
cache_ptr->slist_size = (size_t)0;
@@ -256,19 +256,19 @@ H5C_create(size_t max_cache_size, size_t min_clean_size, int max_type_id,
cache_ptr->dLRU_tail_ptr = NULL;
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
- cache_ptr->size_increase_possible = FALSE;
- cache_ptr->flash_size_increase_possible = FALSE;
+ cache_ptr->size_increase_possible = false;
+ cache_ptr->flash_size_increase_possible = false;
cache_ptr->flash_size_increase_threshold = 0;
- cache_ptr->size_decrease_possible = FALSE;
- cache_ptr->resize_enabled = FALSE;
- cache_ptr->cache_full = FALSE;
- cache_ptr->size_decreased = FALSE;
- cache_ptr->resize_in_progress = FALSE;
- cache_ptr->msic_in_progress = FALSE;
+ cache_ptr->size_decrease_possible = false;
+ cache_ptr->resize_enabled = false;
+ cache_ptr->cache_full = false;
+ cache_ptr->size_decreased = false;
+ cache_ptr->resize_in_progress = false;
+ cache_ptr->msic_in_progress = false;
cache_ptr->resize_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
cache_ptr->resize_ctl.rpt_fcn = NULL;
- cache_ptr->resize_ctl.set_initial_size = FALSE;
+ cache_ptr->resize_ctl.set_initial_size = false;
cache_ptr->resize_ctl.initial_size = H5C__DEF_AR_INIT_SIZE;
cache_ptr->resize_ctl.min_clean_fraction = H5C__DEF_AR_MIN_CLEAN_FRAC;
cache_ptr->resize_ctl.max_size = H5C__DEF_AR_MAX_SIZE;
@@ -278,7 +278,7 @@ H5C_create(size_t max_cache_size, size_t min_clean_size, int max_type_id,
cache_ptr->resize_ctl.incr_mode = H5C_incr__off;
cache_ptr->resize_ctl.lower_hr_threshold = H5C__DEF_AR_LOWER_THRESHHOLD;
cache_ptr->resize_ctl.increment = H5C__DEF_AR_INCREMENT;
- cache_ptr->resize_ctl.apply_max_increment = TRUE;
+ cache_ptr->resize_ctl.apply_max_increment = true;
cache_ptr->resize_ctl.max_increment = H5C__DEF_AR_MAX_INCREMENT;
cache_ptr->resize_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -288,10 +288,10 @@ H5C_create(size_t max_cache_size, size_t min_clean_size, int max_type_id,
cache_ptr->resize_ctl.decr_mode = H5C_decr__off;
cache_ptr->resize_ctl.upper_hr_threshold = H5C__DEF_AR_UPPER_THRESHHOLD;
cache_ptr->resize_ctl.decrement = H5C__DEF_AR_DECREMENT;
- cache_ptr->resize_ctl.apply_max_decrement = TRUE;
+ cache_ptr->resize_ctl.apply_max_decrement = true;
cache_ptr->resize_ctl.max_decrement = H5C__DEF_AR_MAX_DECREMENT;
cache_ptr->resize_ctl.epochs_before_eviction = H5C__DEF_AR_EPCHS_B4_EVICT;
- cache_ptr->resize_ctl.apply_empty_reserve = TRUE;
+ cache_ptr->resize_ctl.apply_empty_reserve = true;
cache_ptr->resize_ctl.empty_reserve = H5C__DEF_AR_EMPTY_RESERVE;
cache_ptr->epoch_markers_active = 0;
@@ -301,10 +301,10 @@ H5C_create(size_t max_cache_size, size_t min_clean_size, int max_type_id,
cache_ptr->epoch_marker_ringbuf_last = 0;
cache_ptr->epoch_marker_ringbuf_size = 0;
- /* Initialize all epoch marker entries' fields to zero/FALSE/NULL */
+ /* Initialize all epoch marker entries' fields to zero/false/NULL */
memset(cache_ptr->epoch_markers, 0, sizeof(cache_ptr->epoch_markers));
- /* Set non-zero/FALSE/NULL fields for epoch markers */
+ /* Set non-zero/false/NULL fields for epoch markers */
for (i = 0; i < H5C__MAX_EPOCH_MARKERS; i++) {
((cache_ptr->epoch_markers)[i]).addr = (haddr_t)i;
((cache_ptr->epoch_markers)[i]).type = H5AC_EPOCH_MARKER;
@@ -315,15 +315,15 @@ H5C_create(size_t max_cache_size, size_t min_clean_size, int max_type_id,
* in H5Cprivate.h.
*/
cache_ptr->image_ctl.version = H5C__CURR_CACHE_IMAGE_CTL_VER;
- cache_ptr->image_ctl.generate_image = FALSE;
- cache_ptr->image_ctl.save_resize_status = FALSE;
+ cache_ptr->image_ctl.generate_image = false;
+ cache_ptr->image_ctl.save_resize_status = false;
cache_ptr->image_ctl.entry_ageout = -1;
cache_ptr->image_ctl.flags = H5C_CI__ALL_FLAGS;
- cache_ptr->serialization_in_progress = FALSE;
- cache_ptr->load_image = FALSE;
- cache_ptr->image_loaded = FALSE;
- cache_ptr->delete_image = FALSE;
+ cache_ptr->serialization_in_progress = false;
+ cache_ptr->load_image = false;
+ cache_ptr->image_loaded = false;
+ cache_ptr->delete_image = false;
cache_ptr->image_addr = HADDR_UNDEF;
cache_ptr->image_len = 0;
cache_ptr->image_data_len = 0;
@@ -338,8 +338,8 @@ H5C_create(size_t max_cache_size, size_t min_clean_size, int max_type_id,
cache_ptr->image_buffer = NULL;
/* initialize free space manager related fields: */
- cache_ptr->rdfsm_settled = FALSE;
- cache_ptr->mdfsm_settled = FALSE;
+ cache_ptr->rdfsm_settled = false;
+ cache_ptr->mdfsm_settled = false;
if (H5C_reset_cache_hit_rate_stats(cache_ptr) < 0)
/* this should be impossible... */
@@ -389,9 +389,9 @@ H5C_create(size_t max_cache_size, size_t min_clean_size, int max_type_id,
herr_t
H5C_prep_for_file_close(H5F_t *f)
{
- H5C_t *cache_ptr;
- hbool_t image_generated = FALSE; /* Whether a cache image was generated */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5C_t *cache_ptr;
+ bool image_generated = false; /* Whether a cache image was generated */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -405,7 +405,7 @@ H5C_prep_for_file_close(H5F_t *f)
/* It is possible to receive the close warning more than once */
if (cache_ptr->close_warning_received)
HGOTO_DONE(SUCCEED);
- cache_ptr->close_warning_received = TRUE;
+ cache_ptr->close_warning_received = true;
/* Make certain there aren't any protected entries */
assert(cache_ptr->pl_len == 0);
@@ -488,12 +488,12 @@ H5C_dest(H5F_t *f)
assert(cache_ptr->close_warning_received);
#if H5AC_DUMP_IMAGE_STATS_ON_CLOSE
- if (H5C__image_stats(cache_ptr, TRUE) < 0)
+ if (H5C__image_stats(cache_ptr, true) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't display cache image stats");
#endif /* H5AC_DUMP_IMAGE_STATS_ON_CLOSE */
/* Enable the slist, as it is needed in the flush */
- if (H5C_set_slist_enabled(f->shared->cache, TRUE, FALSE) < 0)
+ if (H5C_set_slist_enabled(f->shared->cache, true, false) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "set slist enabled failed");
/* Flush and invalidate all cache entries */
@@ -541,7 +541,7 @@ H5C_dest(H5F_t *f)
* calls to H5C_dest(). Thus we re-enable the slist on failure if it
* and the cache still exist. JRM -- 5/15/20
*/
- if (H5C_set_slist_enabled(f->shared->cache, FALSE, FALSE) < 0)
+ if (H5C_set_slist_enabled(f->shared->cache, false, false) < 0)
HDONE_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "disable slist on flush dest failure failed");
FUNC_LEAVE_NOAPI(ret_value)
@@ -567,7 +567,7 @@ H5C_evict(H5F_t *f)
assert(f);
/* Enable the slist, as it is needed in the flush */
- if (H5C_set_slist_enabled(f->shared->cache, TRUE, FALSE) < 0)
+ if (H5C_set_slist_enabled(f->shared->cache, true, false) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "set slist enabled failed");
/* Flush and invalidate all cache entries except the pinned entries */
@@ -575,7 +575,7 @@ H5C_evict(H5F_t *f)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to evict entries in the cache");
/* Disable the slist */
- if (H5C_set_slist_enabled(f->shared->cache, FALSE, TRUE) < 0)
+ if (H5C_set_slist_enabled(f->shared->cache, false, true) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "set slist disabled failed");
done:
@@ -612,7 +612,7 @@ H5C_flush_cache(H5F_t *f, unsigned flags)
#endif /* H5C_DO_SANITY_CHECKS */
H5C_ring_t ring;
H5C_t *cache_ptr;
- hbool_t destroy;
+ bool destroy;
herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(FAIL)
@@ -659,7 +659,7 @@ H5C_flush_cache(H5F_t *f, unsigned flags)
assert(!(destroy && ((flags & H5C__FLUSH_IGNORE_PROTECTED_FLAG) != 0)));
assert(!(cache_ptr->flush_in_progress));
- cache_ptr->flush_in_progress = TRUE;
+ cache_ptr->flush_in_progress = true;
if (destroy) {
if (H5C__flush_invalidate_cache(f, flags) < 0)
@@ -710,7 +710,7 @@ H5C_flush_cache(H5F_t *f, unsigned flags)
} /* end else */
done:
- cache_ptr->flush_in_progress = FALSE;
+ cache_ptr->flush_in_progress = false;
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_flush_cache() */
@@ -739,9 +739,9 @@ H5C_flush_cache(H5F_t *f, unsigned flags)
herr_t
H5C_flush_to_min_clean(H5F_t *f)
{
- H5C_t *cache_ptr;
- hbool_t write_permitted;
- herr_t ret_value = SUCCEED;
+ H5C_t *cache_ptr;
+ bool write_permitted;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(FAIL)
@@ -841,20 +841,20 @@ H5C_set_cache_auto_resize_config(H5C_t *cache_ptr, H5C_auto_size_ctl_t *config_p
if (H5C_validate_resize_config(config_ptr, H5C_RESIZE_CFG__VALIDATE_INTERACTIONS) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "conflicting threshold fields in new config");
- /* will set the increase possible fields to FALSE later if needed */
- cache_ptr->size_increase_possible = TRUE;
- cache_ptr->flash_size_increase_possible = TRUE;
- cache_ptr->size_decrease_possible = TRUE;
+ /* will set the increase possible fields to false later if needed */
+ cache_ptr->size_increase_possible = true;
+ cache_ptr->flash_size_increase_possible = true;
+ cache_ptr->size_decrease_possible = true;
switch (config_ptr->incr_mode) {
case H5C_incr__off:
- cache_ptr->size_increase_possible = FALSE;
+ cache_ptr->size_increase_possible = false;
break;
case H5C_incr__threshold:
if ((config_ptr->lower_hr_threshold <= 0.0) || (config_ptr->increment <= 1.0) ||
((config_ptr->apply_max_increment) && (config_ptr->max_increment <= 0)))
- cache_ptr->size_increase_possible = FALSE;
+ cache_ptr->size_increase_possible = false;
break;
default: /* should be unreachable */
@@ -868,26 +868,26 @@ H5C_set_cache_auto_resize_config(H5C_t *cache_ptr, H5C_auto_size_ctl_t *config_p
switch (config_ptr->decr_mode) {
case H5C_decr__off:
- cache_ptr->size_decrease_possible = FALSE;
+ cache_ptr->size_decrease_possible = false;
break;
case H5C_decr__threshold:
if (config_ptr->upper_hr_threshold >= 1.0 || config_ptr->decrement >= 1.0 ||
(config_ptr->apply_max_decrement && config_ptr->max_decrement <= 0))
- cache_ptr->size_decrease_possible = FALSE;
+ cache_ptr->size_decrease_possible = false;
break;
case H5C_decr__age_out:
if ((config_ptr->apply_empty_reserve && config_ptr->empty_reserve >= 1.0) ||
(config_ptr->apply_max_decrement && config_ptr->max_decrement <= 0))
- cache_ptr->size_decrease_possible = FALSE;
+ cache_ptr->size_decrease_possible = false;
break;
case H5C_decr__age_out_with_threshold:
if ((config_ptr->apply_empty_reserve && config_ptr->empty_reserve >= 1.0) ||
(config_ptr->apply_max_decrement && config_ptr->max_decrement <= 0) ||
config_ptr->upper_hr_threshold >= 1.0)
- cache_ptr->size_decrease_possible = FALSE;
+ cache_ptr->size_decrease_possible = false;
break;
default: /* should be unreachable */
@@ -895,9 +895,9 @@ H5C_set_cache_auto_resize_config(H5C_t *cache_ptr, H5C_auto_size_ctl_t *config_p
} /* end switch */
if (config_ptr->max_size == config_ptr->min_size) {
- cache_ptr->size_increase_possible = FALSE;
- cache_ptr->flash_size_increase_possible = FALSE;
- cache_ptr->size_decrease_possible = FALSE;
+ cache_ptr->size_increase_possible = false;
+ cache_ptr->flash_size_increase_possible = false;
+ cache_ptr->size_decrease_possible = false;
} /* end if */
/* flash_size_increase_possible is intentionally omitted from the
@@ -936,7 +936,7 @@ H5C_set_cache_auto_resize_config(H5C_t *cache_ptr, H5C_auto_size_ctl_t *config_p
assert(new_max_cache_size <= cache_ptr->resize_ctl.max_size);
if (new_max_cache_size < cache_ptr->max_cache_size)
- cache_ptr->size_decreased = TRUE;
+ cache_ptr->size_decreased = true;
cache_ptr->max_cache_size = new_max_cache_size;
cache_ptr->min_clean_size = new_min_clean_size;
@@ -967,11 +967,11 @@ H5C_set_cache_auto_resize_config(H5C_t *cache_ptr, H5C_auto_size_ctl_t *config_p
if (cache_ptr->flash_size_increase_possible) {
switch (config_ptr->flash_incr_mode) {
case H5C_flash_incr__off:
- cache_ptr->flash_size_increase_possible = FALSE;
+ cache_ptr->flash_size_increase_possible = false;
break;
case H5C_flash_incr__add_space:
- cache_ptr->flash_size_increase_possible = TRUE;
+ cache_ptr->flash_size_increase_possible = true;
cache_ptr->flash_size_increase_threshold =
(size_t)(((double)(cache_ptr->max_cache_size)) * (cache_ptr->resize_ctl.flash_threshold));
break;
@@ -997,7 +997,7 @@ H5C_set_cache_auto_resize_config(H5C_t *cache_ptr, H5C_auto_size_ctl_t *config_p
*-------------------------------------------------------------------------
*/
herr_t
-H5C_set_evictions_enabled(H5C_t *cache_ptr, hbool_t evictions_enabled)
+H5C_set_evictions_enabled(H5C_t *cache_ptr, bool evictions_enabled)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -1011,7 +1011,7 @@ H5C_set_evictions_enabled(H5C_t *cache_ptr, hbool_t evictions_enabled)
* However, allowing it would greatly complicate testing
* the feature. Hence the following:
*/
- if ((evictions_enabled != TRUE) && ((cache_ptr->resize_ctl.incr_mode != H5C_incr__off) ||
+ if ((evictions_enabled != true) && ((cache_ptr->resize_ctl.incr_mode != H5C_incr__off) ||
(cache_ptr->resize_ctl.decr_mode != H5C_decr__off)))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't disable evictions when auto resize enabled");
@@ -1038,20 +1038,20 @@ H5C_set_evictions_enabled(H5C_t *cache_ptr, hbool_t evictions_enabled)
* slist when it is not needed.
*
*
- * If the slist_enabled parameter is TRUE, the function
+ * If the slist_enabled parameter is true, the function
*
* 1) Verifies that the slist is empty.
*
* 2) Scans the index list, and inserts all dirty entries
* into the slist.
*
- * 3) Sets cache_ptr->slist_enabled = TRUE.
+ * 3) Sets cache_ptr->slist_enabled = true.
*
* Note that the clear_slist parameter is ignored if
- * the slist_enabed parameter is TRUE.
+ * the slist_enabed parameter is true.
*
*
- * If the slist_enabled_parameter is FALSE, the function
+ * If the slist_enabled_parameter is false, the function
* shuts down the slist.
*
* Normally the slist will be empty at this point, however
@@ -1063,20 +1063,20 @@ H5C_set_evictions_enabled(H5C_t *cache_ptr, hbool_t evictions_enabled)
* 1) Test to see if the slist is empty. If it is, proceed
* to step 3.
*
- * 2) Test to see if the clear_slist parameter is TRUE.
+ * 2) Test to see if the clear_slist parameter is true.
*
* If it is, remove all entries from the slist.
*
* If it isn't, throw an error.
*
- * 3) set cache_ptr->slist_enabled = FALSE.
+ * 3) set cache_ptr->slist_enabled = false.
*
* Return: SUCCEED on success, and FAIL on failure.
*
*-------------------------------------------------------------------------
*/
herr_t
-H5C_set_slist_enabled(H5C_t *cache_ptr, hbool_t slist_enabled, hbool_t clear_slist)
+H5C_set_slist_enabled(H5C_t *cache_ptr, bool slist_enabled, bool clear_slist)
{
H5C_cache_entry_t *entry_ptr;
herr_t ret_value = SUCCEED; /* Return value */
@@ -1092,10 +1092,10 @@ H5C_set_slist_enabled(H5C_t *cache_ptr, hbool_t slist_enabled, hbool_t clear_sli
if ((cache_ptr->slist_len != 0) || (cache_ptr->slist_size != 0))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "slist not empty?");
- /* set cache_ptr->slist_enabled to TRUE so that the slist
+ /* set cache_ptr->slist_enabled to true so that the slist
* maintenance macros will be enabled.
*/
- cache_ptr->slist_enabled = TRUE;
+ cache_ptr->slist_enabled = true;
/* scan the index list and insert all dirty entries in the slist */
entry_ptr = cache_ptr->il_head;
@@ -1124,7 +1124,7 @@ H5C_set_slist_enabled(H5C_t *cache_ptr, hbool_t slist_enabled, hbool_t clear_sli
node_ptr = H5SL_first(cache_ptr->slist_ptr);
while (node_ptr != NULL) {
entry_ptr = (H5C_cache_entry_t *)H5SL_item(node_ptr);
- H5C__REMOVE_ENTRY_FROM_SLIST(cache_ptr, entry_ptr, FALSE, FAIL);
+ H5C__REMOVE_ENTRY_FROM_SLIST(cache_ptr, entry_ptr, false, FAIL);
node_ptr = H5SL_first(cache_ptr->slist_ptr);
}
}
@@ -1132,7 +1132,7 @@ H5C_set_slist_enabled(H5C_t *cache_ptr, hbool_t slist_enabled, hbool_t clear_sli
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "slist not empty?");
}
- cache_ptr->slist_enabled = FALSE;
+ cache_ptr->slist_enabled = false;
assert(0 == cache_ptr->slist_len);
assert(0 == cache_ptr->slist_size);
@@ -1183,7 +1183,7 @@ H5C_unsettle_ring(H5F_t *f, H5C_ring_t ring)
if (cache_ptr->rdfsm_settled) {
if (cache_ptr->close_warning_received)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected rdfsm ring unsettle");
- cache_ptr->rdfsm_settled = FALSE;
+ cache_ptr->rdfsm_settled = false;
} /* end if */
break;
@@ -1191,12 +1191,12 @@ H5C_unsettle_ring(H5F_t *f, H5C_ring_t ring)
if (cache_ptr->mdfsm_settled) {
if (cache_ptr->close_warning_received)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected mdfsm ring unsettle");
- cache_ptr->mdfsm_settled = FALSE;
+ cache_ptr->mdfsm_settled = false;
} /* end if */
break;
default:
- assert(FALSE); /* this should be un-reachable */
+ assert(false); /* this should be un-reachable */
break;
} /* end switch */
@@ -1356,7 +1356,7 @@ H5C_validate_resize_config(H5C_auto_size_ctl_t *config_ptr, unsigned int tests)
*-------------------------------------------------------------------------
*/
herr_t
-H5C_cork(H5C_t *cache_ptr, haddr_t obj_addr, unsigned action, hbool_t *corked)
+H5C_cork(H5C_t *cache_ptr, haddr_t obj_addr, unsigned action, bool *corked)
{
H5C_tag_info_t *tag_info = NULL;
herr_t ret_value = SUCCEED;
@@ -1374,9 +1374,9 @@ H5C_cork(H5C_t *cache_ptr, haddr_t obj_addr, unsigned action, hbool_t *corked)
if (H5C__GET_CORKED == action) {
assert(corked);
if (tag_info != NULL && tag_info->corked)
- *corked = TRUE;
+ *corked = true;
else
- *corked = FALSE;
+ *corked = false;
}
else {
/* Sanity check */
@@ -1404,7 +1404,7 @@ H5C_cork(H5C_t *cache_ptr, haddr_t obj_addr, unsigned action, hbool_t *corked)
}
/* Set the corked status for the entire object */
- tag_info->corked = TRUE;
+ tag_info->corked = true;
cache_ptr->num_objs_corked++;
}
else {
@@ -1417,7 +1417,7 @@ H5C_cork(H5C_t *cache_ptr, haddr_t obj_addr, unsigned action, hbool_t *corked)
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNCORK, FAIL, "object already uncorked");
/* Set the corked status for the entire object */
- tag_info->corked = FALSE;
+ tag_info->corked = false;
cache_ptr->num_objs_corked--;
/* Remove the tag info from the tag list, if there's no more entries with this tag */
diff --git a/src/H5CS.c b/src/H5CS.c
index d8ee8d7f5b7..3728273ea2a 100644
--- a/src/H5CS.c
+++ b/src/H5CS.c
@@ -138,7 +138,7 @@ H5CS_print_stack(const H5CS_t *fstack, FILE *stream)
fprintf(stream, "thread %" PRIu64 ".", H5TS_thread_id());
if (fstack && fstack->nused > 0)
fprintf(stream, " Back trace follows.");
- HDfputc('\n', stream);
+ fputc('\n', stream);
for (i = fstack->nused - 1; i >= 0; --i)
fprintf(stream, "%*s#%03d: Routine: %s\n", indent, "", i, fstack->rec[i]);
@@ -228,10 +228,9 @@ H5CS_pop(void)
H5CS_t *
H5CS_copy_stack(void)
{
- H5CS_t *old_stack = H5CS_get_my_stack(); /* Existing function stack for library */
- H5CS_t *new_stack; /* New function stack, for copy */
- unsigned u; /* Local index variable */
- H5CS_t *ret_value = NULL; /* Return value */
+ H5CS_t *old_stack = H5CS_get_my_stack(); /* Existing function stack for library */
+ H5CS_t *new_stack; /* New function stack, for copy */
+ H5CS_t *ret_value = NULL; /* Return value */
/* Don't push this function on the function stack... :-) */
FUNC_ENTER_NOAPI_NOFS
@@ -248,7 +247,7 @@ H5CS_copy_stack(void)
/* Copy pointers on old stack to new one */
/* (Strings don't need to be duplicated, they are statically allocated) */
- memcpy(new_stack->rec, old_stack->rec, sizeof(char *) * old_stack->nused);
+ H5MM_memcpy(new_stack->rec, old_stack->rec, sizeof(char *) * old_stack->nused);
new_stack->nused = new_stack->nalloc = old_stack->nused;
/* Set the return value */
@@ -270,8 +269,6 @@ H5CS_copy_stack(void)
herr_t
H5CS_close_stack(H5CS_t *stack)
{
- unsigned u; /* Local index variable */
-
/* Don't push this function on the function stack... :-) */
FUNC_ENTER_NOAPI_NOERR_NOFS
diff --git a/src/H5CX.c b/src/H5CX.c
index 49f22745911..aa9d0b5aece 100644
--- a/src/H5CX.c
+++ b/src/H5CX.c
@@ -82,7 +82,7 @@
} /* end else */ \
\
/* Mark the field as valid */ \
- (*head)->ctx.H5_GLUE(PROP_FIELD, _valid) = TRUE;
+ (*head)->ctx.H5_GLUE(PROP_FIELD, _valid) = true;
/* Macro for the duplicated code to retrieve properties from a property list */
#define H5CX_RETRIEVE_PROP_VALID(PL, DEF_PL, PROP_NAME, PROP_FIELD) \
@@ -117,7 +117,7 @@
if ((*head)->ctx.H5_GLUE(PROP_FIELD, _set) || check_prop > 0) { \
/* Cache the value for later, marking it to set in DXPL when context popped */ \
(*head)->ctx.PROP_FIELD = PROP_FIELD; \
- (*head)->ctx.H5_GLUE(PROP_FIELD, _set) = TRUE; \
+ (*head)->ctx.H5_GLUE(PROP_FIELD, _set) = true; \
} /* end if */ \
}
#endif /* defined(H5_HAVE_PARALLEL) && defined(H5_HAVE_INSTRUMENTED_LIBRARY) */
@@ -201,140 +201,137 @@ typedef struct H5CX_t {
#ifdef H5_HAVE_PARALLEL
/* Internal: Parallel I/O settings */
- hbool_t coll_metadata_read; /* Whether to use collective I/O for metadata read */
+ bool coll_metadata_read; /* Whether to use collective I/O for metadata read */
MPI_Datatype btype; /* MPI datatype for buffer, when using collective I/O */
MPI_Datatype ftype; /* MPI datatype for file, when using collective I/O */
- hbool_t mpi_file_flushing; /* Whether an MPI-opened file is being flushed */
- hbool_t rank0_bcast; /* Whether a dataset meets read-with-rank0-and-bcast requirements */
+ bool mpi_file_flushing; /* Whether an MPI-opened file is being flushed */
+ bool rank0_bcast; /* Whether a dataset meets read-with-rank0-and-bcast requirements */
#endif /* H5_HAVE_PARALLEL */
/* Cached DXPL properties */
size_t max_temp_buf; /* Maximum temporary buffer size */
- hbool_t max_temp_buf_valid; /* Whether maximum temporary buffer size is valid */
+ bool max_temp_buf_valid; /* Whether maximum temporary buffer size is valid */
void *tconv_buf; /* Temporary conversion buffer (H5D_XFER_TCONV_BUF_NAME) */
- hbool_t tconv_buf_valid; /* Whether temporary conversion buffer is valid */
+ bool tconv_buf_valid; /* Whether temporary conversion buffer is valid */
void *bkgr_buf; /* Background conversion buffer (H5D_XFER_BKGR_BUF_NAME) */
- hbool_t bkgr_buf_valid; /* Whether background conversion buffer is valid */
+ bool bkgr_buf_valid; /* Whether background conversion buffer is valid */
H5T_bkg_t bkgr_buf_type; /* Background buffer type (H5D_XFER_BKGR_BUF_NAME) */
- hbool_t bkgr_buf_type_valid; /* Whether background buffer type is valid */
+ bool bkgr_buf_type_valid; /* Whether background buffer type is valid */
double btree_split_ratio[3]; /* B-tree split ratios */
- hbool_t btree_split_ratio_valid; /* Whether B-tree split ratios are valid */
+ bool btree_split_ratio_valid; /* Whether B-tree split ratios are valid */
size_t vec_size; /* Size of hyperslab vector (H5D_XFER_HYPER_VECTOR_SIZE_NAME) */
- hbool_t vec_size_valid; /* Whether hyperslab vector is valid */
+ bool vec_size_valid; /* Whether hyperslab vector is valid */
#ifdef H5_HAVE_PARALLEL
H5FD_mpio_xfer_t io_xfer_mode; /* Parallel transfer mode for this request (H5D_XFER_IO_XFER_MODE_NAME) */
- hbool_t io_xfer_mode_valid; /* Whether parallel transfer mode is valid */
+ bool io_xfer_mode_valid; /* Whether parallel transfer mode is valid */
H5FD_mpio_collective_opt_t mpio_coll_opt; /* Parallel transfer with independent IO or collective IO with
this mode (H5D_XFER_MPIO_COLLECTIVE_OPT_NAME) */
- hbool_t mpio_coll_opt_valid; /* Whether parallel transfer option is valid */
+ bool mpio_coll_opt_valid; /* Whether parallel transfer option is valid */
H5FD_mpio_chunk_opt_t
mpio_chunk_opt_mode; /* Collective chunk option (H5D_XFER_MPIO_CHUNK_OPT_HARD_NAME) */
- hbool_t mpio_chunk_opt_mode_valid; /* Whether collective chunk option is valid */
+ bool mpio_chunk_opt_mode_valid; /* Whether collective chunk option is valid */
unsigned mpio_chunk_opt_num; /* Collective chunk threshold (H5D_XFER_MPIO_CHUNK_OPT_NUM_NAME) */
- hbool_t mpio_chunk_opt_num_valid; /* Whether collective chunk threshold is valid */
+ bool mpio_chunk_opt_num_valid; /* Whether collective chunk threshold is valid */
unsigned mpio_chunk_opt_ratio; /* Collective chunk ratio (H5D_XFER_MPIO_CHUNK_OPT_RATIO_NAME) */
- hbool_t mpio_chunk_opt_ratio_valid; /* Whether collective chunk ratio is valid */
+ bool mpio_chunk_opt_ratio_valid; /* Whether collective chunk ratio is valid */
#endif /* H5_HAVE_PARALLEL */
H5Z_EDC_t err_detect; /* Error detection info (H5D_XFER_EDC_NAME) */
- hbool_t err_detect_valid; /* Whether error detection info is valid */
+ bool err_detect_valid; /* Whether error detection info is valid */
H5Z_cb_t filter_cb; /* Filter callback function (H5D_XFER_FILTER_CB_NAME) */
- hbool_t filter_cb_valid; /* Whether filter callback function is valid */
+ bool filter_cb_valid; /* Whether filter callback function is valid */
H5Z_data_xform_t *data_transform; /* Data transform info (H5D_XFER_XFORM_NAME) */
- hbool_t data_transform_valid; /* Whether data transform info is valid */
+ bool data_transform_valid; /* Whether data transform info is valid */
H5T_vlen_alloc_info_t vl_alloc_info; /* VL datatype alloc info (H5D_XFER_VLEN_*_NAME) */
- hbool_t vl_alloc_info_valid; /* Whether VL datatype alloc info is valid */
+ bool vl_alloc_info_valid; /* Whether VL datatype alloc info is valid */
H5T_conv_cb_t dt_conv_cb; /* Datatype conversion struct (H5D_XFER_CONV_CB_NAME) */
- hbool_t dt_conv_cb_valid; /* Whether datatype conversion struct is valid */
+ bool dt_conv_cb_valid; /* Whether datatype conversion struct is valid */
H5D_selection_io_mode_t selection_io_mode; /* Selection I/O mode (H5D_XFER_SELECTION_IO_MODE_NAME) */
- hbool_t selection_io_mode_valid; /* Whether selection I/O mode is valid */
- hbool_t modify_write_buf; /* Whether the library can modify write buffers */
- hbool_t modify_write_buf_valid; /* Whether the modify_write_buf field is valid */
+ bool selection_io_mode_valid; /* Whether selection I/O mode is valid */
+ bool modify_write_buf; /* Whether the library can modify write buffers */
+ bool modify_write_buf_valid; /* Whether the modify_write_buf field is valid */
/* Return-only DXPL properties to return to application */
#ifdef H5_HAVE_PARALLEL
H5D_mpio_actual_chunk_opt_mode_t mpio_actual_chunk_opt; /* Chunk optimization mode used for parallel I/O
(H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_NAME) */
- hbool_t mpio_actual_chunk_opt_set; /* Whether chunk optimization mode used for parallel I/O is set */
+ bool mpio_actual_chunk_opt_set; /* Whether chunk optimization mode used for parallel I/O is set */
H5D_mpio_actual_io_mode_t
mpio_actual_io_mode; /* Actual I/O mode used for parallel I/O (H5D_MPIO_ACTUAL_IO_MODE_NAME) */
- hbool_t mpio_actual_io_mode_set; /* Whether actual I/O mode used for parallel I/O is set */
+ bool mpio_actual_io_mode_set; /* Whether actual I/O mode used for parallel I/O is set */
uint32_t mpio_local_no_coll_cause; /* Local reason for breaking collective I/O
(H5D_MPIO_LOCAL_NO_COLLECTIVE_CAUSE_NAME) */
- hbool_t mpio_local_no_coll_cause_set; /* Whether local reason for breaking collective I/O is set */
- hbool_t mpio_local_no_coll_cause_valid; /* Whether local reason for breaking collective I/O is valid */
+ bool mpio_local_no_coll_cause_set; /* Whether local reason for breaking collective I/O is set */
+ bool mpio_local_no_coll_cause_valid; /* Whether local reason for breaking collective I/O is valid */
uint32_t mpio_global_no_coll_cause; /* Global reason for breaking collective I/O
(H5D_MPIO_GLOBAL_NO_COLLECTIVE_CAUSE_NAME) */
- hbool_t mpio_global_no_coll_cause_set; /* Whether global reason for breaking collective I/O is set */
- hbool_t mpio_global_no_coll_cause_valid; /* Whether global reason for breaking collective I/O is valid */
+ bool mpio_global_no_coll_cause_set; /* Whether global reason for breaking collective I/O is set */
+ bool mpio_global_no_coll_cause_valid; /* Whether global reason for breaking collective I/O is valid */
#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
- int mpio_coll_chunk_link_hard; /* Instrumented "collective chunk link hard" value
- (H5D_XFER_COLL_CHUNK_LINK_HARD_NAME) */
- hbool_t
- mpio_coll_chunk_link_hard_set; /* Whether instrumented "collective chunk link hard" value is set */
- int mpio_coll_chunk_multi_hard; /* Instrumented "collective chunk multi hard" value
- (H5D_XFER_COLL_CHUNK_MULTI_HARD_NAME) */
- hbool_t
- mpio_coll_chunk_multi_hard_set; /* Whether instrumented "collective chunk multi hard" value is set */
- int mpio_coll_chunk_link_num_true; /* Instrumented "collective chunk link num true" value
- (H5D_XFER_COLL_CHUNK_LINK_NUM_TRUE_NAME) */
- hbool_t mpio_coll_chunk_link_num_true_set; /* Whether instrumented "collective chunk link num true" value
- is set */
- int mpio_coll_chunk_link_num_false; /* Instrumented "collective chunk link num false" value
- (H5D_XFER_COLL_CHUNK_LINK_NUM_FALSE_NAME) */
- hbool_t mpio_coll_chunk_link_num_false_set; /* Whether instrumented "collective chunk link num false"
- value is set */
- int mpio_coll_chunk_multi_ratio_coll; /* Instrumented "collective chunk multi ratio coll" value
- (H5D_XFER_COLL_CHUNK_MULTI_RATIO_COLL_NAME) */
- hbool_t mpio_coll_chunk_multi_ratio_coll_set; /* Whether instrumented "collective chunk multi ratio coll"
+ int mpio_coll_chunk_link_hard; /* Instrumented "collective chunk link hard" value
+ (H5D_XFER_COLL_CHUNK_LINK_HARD_NAME) */
+ bool mpio_coll_chunk_link_hard_set; /* Whether instrumented "collective chunk link hard" value is set */
+ int mpio_coll_chunk_multi_hard; /* Instrumented "collective chunk multi hard" value
+ (H5D_XFER_COLL_CHUNK_MULTI_HARD_NAME) */
+ bool mpio_coll_chunk_multi_hard_set; /* Whether instrumented "collective chunk multi hard" value is set */
+ int mpio_coll_chunk_link_num_true; /* Instrumented "collective chunk link num true" value
+ (H5D_XFER_COLL_CHUNK_LINK_NUM_TRUE_NAME) */
+ bool mpio_coll_chunk_link_num_true_set; /* Whether instrumented "collective chunk link num true" value
+ is set */
+ int mpio_coll_chunk_link_num_false; /* Instrumented "collective chunk link num false" value
+ (H5D_XFER_COLL_CHUNK_LINK_NUM_FALSE_NAME) */
+ bool mpio_coll_chunk_link_num_false_set; /* Whether instrumented "collective chunk link num false"
value is set */
- int mpio_coll_chunk_multi_ratio_ind; /* Instrumented "collective chunk multi ratio ind" value
- (H5D_XFER_COLL_CHUNK_MULTI_RATIO_IND_NAME) */
- hbool_t mpio_coll_chunk_multi_ratio_ind_set; /* Whether instrumented "collective chunk multi ratio ind"
+ int mpio_coll_chunk_multi_ratio_coll; /* Instrumented "collective chunk multi ratio coll" value
+ (H5D_XFER_COLL_CHUNK_MULTI_RATIO_COLL_NAME) */
+ bool mpio_coll_chunk_multi_ratio_coll_set; /* Whether instrumented "collective chunk multi ratio coll"
+ value is set */
+ int mpio_coll_chunk_multi_ratio_ind; /* Instrumented "collective chunk multi ratio ind" value
+ (H5D_XFER_COLL_CHUNK_MULTI_RATIO_IND_NAME) */
+ bool mpio_coll_chunk_multi_ratio_ind_set; /* Whether instrumented "collective chunk multi ratio ind"
value is set */
- hbool_t mpio_coll_rank0_bcast; /* Instrumented "collective chunk multi ratio ind" value
+ bool mpio_coll_rank0_bcast; /* Instrumented "collective chunk multi ratio ind" value
(H5D_XFER_COLL_CHUNK_MULTI_RATIO_IND_NAME) */
- hbool_t
- mpio_coll_rank0_bcast_set; /* Whether instrumented "collective chunk multi ratio ind" value is set */
+ bool mpio_coll_rank0_bcast_set; /* Whether instrumented "collective chunk multi ratio ind" value is set */
#endif /* H5_HAVE_INSTRUMENTED_LIBRARY */
#endif /* H5_HAVE_PARALLEL */
uint32_t no_selection_io_cause; /* Reason for not performing selection I/O
(H5D_XFER_NO_SELECTION_IO_CAUSE_NAME) */
- hbool_t no_selection_io_cause_set; /* Whether reason for not performing selection I/O is set */
- hbool_t no_selection_io_cause_valid; /* Whether reason for not performing selection I/O is valid */
+ bool no_selection_io_cause_set; /* Whether reason for not performing selection I/O is set */
+ bool no_selection_io_cause_valid; /* Whether reason for not performing selection I/O is valid */
/* Cached LCPL properties */
H5T_cset_t encoding; /* Link name character encoding */
- hbool_t encoding_valid; /* Whether link name character encoding is valid */
+ bool encoding_valid; /* Whether link name character encoding is valid */
unsigned intermediate_group; /* Whether to create intermediate groups */
- hbool_t intermediate_group_valid; /* Whether create intermediate group flag is valid */
+ bool intermediate_group_valid; /* Whether create intermediate group flag is valid */
/* Cached LAPL properties */
- size_t nlinks; /* Number of soft / UD links to traverse (H5L_ACS_NLINKS_NAME) */
- hbool_t nlinks_valid; /* Whether number of soft / UD links to traverse is valid */
+ size_t nlinks; /* Number of soft / UD links to traverse (H5L_ACS_NLINKS_NAME) */
+ bool nlinks_valid; /* Whether number of soft / UD links to traverse is valid */
/* Cached DCPL properties */
- hbool_t do_min_dset_ohdr; /* Whether to minimize dataset object header */
- hbool_t do_min_dset_ohdr_valid; /* Whether minimize dataset object header flag is valid */
+ bool do_min_dset_ohdr; /* Whether to minimize dataset object header */
+ bool do_min_dset_ohdr_valid; /* Whether minimize dataset object header flag is valid */
uint8_t ohdr_flags; /* Object header flags */
- hbool_t ohdr_flags_valid; /* Whether the object headers flags are valid */
+ bool ohdr_flags_valid; /* Whether the object headers flags are valid */
/* Cached DAPL properties */
const char *extfile_prefix; /* Prefix for external file */
- hbool_t extfile_prefix_valid; /* Whether the prefix for external file is valid */
+ bool extfile_prefix_valid; /* Whether the prefix for external file is valid */
const char *vds_prefix; /* Prefix for VDS */
- hbool_t vds_prefix_valid; /* Whether the prefix for VDS is valid */
+ bool vds_prefix_valid; /* Whether the prefix for VDS is valid */
/* Cached FAPL properties */
H5F_libver_t low_bound; /* low_bound property for H5Pset_libver_bounds() */
- hbool_t low_bound_valid; /* Whether low_bound property is valid */
+ bool low_bound_valid; /* Whether low_bound property is valid */
H5F_libver_t high_bound; /* high_bound property for H5Pset_libver_bounds */
- hbool_t high_bound_valid; /* Whether high_bound property is valid */
+ bool high_bound_valid; /* Whether high_bound property is valid */
/* Cached VOL settings */
H5VL_connector_prop_t vol_connector_prop; /* Property for VOL connector ID & info */
- hbool_t vol_connector_prop_valid; /* Whether property for VOL connector ID & info is valid */
- void *vol_wrap_ctx; /* VOL connector's "wrap context" for creating IDs */
- hbool_t vol_wrap_ctx_valid; /* Whether VOL connector's "wrap context" for creating IDs is valid */
+ bool vol_connector_prop_valid; /* Whether property for VOL connector ID & info is valid */
+ void *vol_wrap_ctx; /* VOL connector's "wrap context" for creating IDs */
+ bool vol_wrap_ctx_valid; /* Whether VOL connector's "wrap context" for creating IDs is valid */
} H5CX_t;
/* Typedef for nodes on the API context stack */
@@ -383,7 +380,7 @@ typedef struct H5CX_dxpl_cache_t {
H5D_selection_io_mode_t selection_io_mode; /* Selection I/O mode (H5D_XFER_SELECTION_IO_MODE_NAME) */
uint32_t no_selection_io_cause; /* Reasons for not performing selection I/O
(H5D_XFER_NO_SELECTION_IO_CAUSE_NAME) */
- hbool_t modify_write_buf; /* Whether the library can modify write buffers */
+ bool modify_write_buf; /* Whether the library can modify write buffers */
} H5CX_dxpl_cache_t;
/* Typedef for cached default link creation property list information */
@@ -402,7 +399,7 @@ typedef struct H5CX_lapl_cache_t {
/* Typedef for cached default dataset creation property list information */
/* (Same as the cached DXPL struct, above, except for the default DCPL) */
typedef struct H5CX_dcpl_cache_t {
- hbool_t do_min_dset_ohdr; /* Whether to minimize dataset object header */
+ bool do_min_dset_ohdr; /* Whether to minimize dataset object header */
uint8_t ohdr_flags; /* Object header flags */
} H5CX_dcpl_cache_t;
@@ -427,7 +424,7 @@ typedef struct H5CX_fapl_cache_t {
static H5CX_node_t **H5CX__get_context(void);
#endif /* H5_HAVE_THREADSAFE */
static void H5CX__push_common(H5CX_node_t *cnode);
-static H5CX_node_t *H5CX__pop_common(hbool_t update_dxpl_props);
+static H5CX_node_t *H5CX__pop_common(bool update_dxpl_props);
/*********************/
/* Package Variables */
@@ -688,7 +685,7 @@ H5CX_term_package(void)
/* Pop the top context node from the stack */
/* (Can't check for errors, as rest of library is shut down) */
- cnode = H5CX__pop_common(FALSE);
+ cnode = H5CX__pop_common(false);
/* Free the context node */
/* (Allocated with malloc() in H5CX_push_special() ) */
@@ -881,7 +878,7 @@ H5CX_retrieve_state(H5CX_state_t **api_state)
H5CX_RETRIEVE_PLIST(dcpl, FAIL)
/* Copy the DCPL ID */
- if (((*api_state)->dcpl_id = H5P_copy_plist((H5P_genplist_t *)(*head)->ctx.dcpl, FALSE)) < 0)
+ if (((*api_state)->dcpl_id = H5P_copy_plist((H5P_genplist_t *)(*head)->ctx.dcpl, false)) < 0)
HGOTO_ERROR(H5E_CONTEXT, H5E_CANTCOPY, FAIL, "can't copy property list");
} /* end if */
else
@@ -893,7 +890,7 @@ H5CX_retrieve_state(H5CX_state_t **api_state)
H5CX_RETRIEVE_PLIST(dxpl, FAIL)
/* Copy the DXPL ID */
- if (((*api_state)->dxpl_id = H5P_copy_plist((H5P_genplist_t *)(*head)->ctx.dxpl, FALSE)) < 0)
+ if (((*api_state)->dxpl_id = H5P_copy_plist((H5P_genplist_t *)(*head)->ctx.dxpl, false)) < 0)
HGOTO_ERROR(H5E_CONTEXT, H5E_CANTCOPY, FAIL, "can't copy property list");
} /* end if */
else
@@ -905,7 +902,7 @@ H5CX_retrieve_state(H5CX_state_t **api_state)
H5CX_RETRIEVE_PLIST(lapl, FAIL)
/* Copy the LAPL ID */
- if (((*api_state)->lapl_id = H5P_copy_plist((H5P_genplist_t *)(*head)->ctx.lapl, FALSE)) < 0)
+ if (((*api_state)->lapl_id = H5P_copy_plist((H5P_genplist_t *)(*head)->ctx.lapl, false)) < 0)
HGOTO_ERROR(H5E_CONTEXT, H5E_CANTCOPY, FAIL, "can't copy property list");
} /* end if */
else
@@ -917,7 +914,7 @@ H5CX_retrieve_state(H5CX_state_t **api_state)
H5CX_RETRIEVE_PLIST(lcpl, FAIL)
/* Copy the LCPL ID */
- if (((*api_state)->lcpl_id = H5P_copy_plist((H5P_genplist_t *)(*head)->ctx.lcpl, FALSE)) < 0)
+ if (((*api_state)->lcpl_id = H5P_copy_plist((H5P_genplist_t *)(*head)->ctx.lcpl, false)) < 0)
HGOTO_ERROR(H5E_CONTEXT, H5E_CANTCOPY, FAIL, "can't copy property list");
} /* end if */
else
@@ -957,7 +954,7 @@ H5CX_retrieve_state(H5CX_state_t **api_state)
} /* end if */
/* Increment the refcount on the connector ID */
- if (H5I_inc_ref((*api_state)->vol_connector_prop.connector_id, FALSE) < 0)
+ if (H5I_inc_ref((*api_state)->vol_connector_prop.connector_id, false) < 0)
HGOTO_ERROR(H5E_CONTEXT, H5E_CANTINC, FAIL, "incrementing VOL connector ID failed");
} /* end if */
} /* end if */
@@ -1026,13 +1023,13 @@ H5CX_restore_state(const H5CX_state_t *api_state)
/* Restore the VOL wrapper context */
(*head)->ctx.vol_wrap_ctx = api_state->vol_wrap_ctx;
if (NULL != (*head)->ctx.vol_wrap_ctx)
- (*head)->ctx.vol_wrap_ctx_valid = TRUE;
+ (*head)->ctx.vol_wrap_ctx_valid = true;
/* Restore the VOL connector info */
if (api_state->vol_connector_prop.connector_id) {
H5MM_memcpy(&(*head)->ctx.vol_connector_prop, &api_state->vol_connector_prop,
sizeof(H5VL_connector_prop_t));
- (*head)->ctx.vol_connector_prop_valid = TRUE;
+ (*head)->ctx.vol_connector_prop_valid = true;
} /* end if */
#ifdef H5_HAVE_PARALLEL
@@ -1112,15 +1109,15 @@ H5CX_free_state(H5CX_state_t *api_state)
*
* Purpose: Checks if the API context is using the library's default DXPL
*
- * Return: TRUE / FALSE (can't fail)
+ * Return: true / false (can't fail)
*
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
H5CX_is_def_dxpl(void)
{
H5CX_node_t **head = NULL; /* Pointer to head of API context list */
- hbool_t is_def_dxpl = FALSE; /* Flag to indicate DXPL is default */
+ bool is_def_dxpl = false; /* Flag to indicate DXPL is default */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -1213,8 +1210,8 @@ H5CX_set_libver_bounds(H5F_t *f)
(*head)->ctx.high_bound = (f == NULL) ? H5F_LIBVER_LATEST : H5F_HIGH_BOUND(f);
/* Mark the values as valid */
- (*head)->ctx.low_bound_valid = TRUE;
- (*head)->ctx.high_bound_valid = TRUE;
+ (*head)->ctx.low_bound_valid = true;
+ (*head)->ctx.high_bound_valid = true;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5CX_set_libver_bounds() */
@@ -1288,7 +1285,7 @@ H5CX_set_apl(hid_t *acspl_id, const H5P_libclass_t *libclass,
H5_ATTR_UNUSED
#endif /* H5_HAVE_PARALLEL */
loc_id,
- hbool_t
+ bool
#ifndef H5_HAVE_PARALLEL
H5_ATTR_UNUSED
#endif /* H5_HAVE_PARALLEL */
@@ -1318,7 +1315,7 @@ H5CX_set_apl(hid_t *acspl_id, const H5P_libclass_t *libclass,
#ifdef H5CX_DEBUG
/* Sanity check the access property list class */
- if (TRUE != H5P_isa_class(*acspl_id, *libclass->class_id))
+ if (true != H5P_isa_class(*acspl_id, *libclass->class_id))
HGOTO_ERROR(H5E_CONTEXT, H5E_BADTYPE, FAIL, "not the required access property list");
#endif /* H5CX_DEBUG*/
@@ -1359,7 +1356,7 @@ H5CX_set_apl(hid_t *acspl_id, const H5P_libclass_t *libclass,
/* If collective metadata read requested, set collective metadata read flag */
if (H5P_USER_TRUE == md_coll_read)
- is_collective = TRUE;
+ is_collective = true;
} /* end if */
#endif /* H5_HAVE_PARALLEL */
} /* end else */
@@ -1368,7 +1365,7 @@ H5CX_set_apl(hid_t *acspl_id, const H5P_libclass_t *libclass,
/* Check for collective operation */
if (is_collective) {
/* Set collective metadata read flag */
- (*head)->ctx.coll_metadata_read = TRUE;
+ (*head)->ctx.coll_metadata_read = true;
/* If parallel is enabled and the file driver used is the MPI-IO
* VFD, issue an MPI barrier for easier debugging if the API function
@@ -1422,7 +1419,7 @@ H5CX_set_loc(hid_t
assert(head && *head);
/* Set collective metadata read flag */
- (*head)->ctx.coll_metadata_read = TRUE;
+ (*head)->ctx.coll_metadata_read = true;
/* If parallel is enabled and the file driver used is the MPI-IO
* VFD, issue an MPI barrier for easier debugging if the API function
@@ -1474,7 +1471,7 @@ H5CX_set_vol_wrap_ctx(void *vol_wrap_ctx)
(*head)->ctx.vol_wrap_ctx = vol_wrap_ctx;
/* Mark the value as valid */
- (*head)->ctx.vol_wrap_ctx_valid = TRUE;
+ (*head)->ctx.vol_wrap_ctx_valid = true;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5CX_set_vol_wrap_ctx() */
@@ -1504,7 +1501,7 @@ H5CX_set_vol_connector_prop(const H5VL_connector_prop_t *vol_connector_prop)
H5MM_memcpy(&(*head)->ctx.vol_connector_prop, vol_connector_prop, sizeof(H5VL_connector_prop_t));
/* Mark the value as valid */
- (*head)->ctx.vol_connector_prop_valid = TRUE;
+ (*head)->ctx.vol_connector_prop_valid = true;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5CX_set_vol_connector_prop() */
@@ -1697,15 +1694,15 @@ H5CX_get_ring(void)
*
* Purpose: Retrieves the "do collective metadata reads" flag for the current API call context.
*
- * Return: TRUE / FALSE on success /
+ * Return: true / false on success /
*
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
H5CX_get_coll_metadata_read(void)
{
H5CX_node_t **head = NULL; /* Pointer to head of API context list */
- hbool_t coll_md_read = FALSE;
+ bool coll_md_read = false;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -1756,15 +1753,15 @@ H5CX_get_mpi_coll_datatypes(MPI_Datatype *btype, MPI_Datatype *ftype)
*
* Purpose: Retrieves the "flushing an MPI-opened file" flag for the current API call context.
*
- * Return: TRUE / FALSE on success /
+ * Return: true / false on success /
*
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
H5CX_get_mpi_file_flushing(void)
{
H5CX_node_t **head = NULL; /* Pointer to head of API context list */
- hbool_t flushing = FALSE;
+ bool flushing = false;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -1788,11 +1785,11 @@ H5CX_get_mpi_file_flushing(void)
*
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
H5CX_get_mpio_rank0_bcast(void)
{
H5CX_node_t **head = NULL; /* Pointer to head of API context list */
- hbool_t do_rank0_bcast = FALSE;
+ bool do_rank0_bcast = false;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -2341,7 +2338,7 @@ H5CX_get_data_transform(H5Z_data_xform_t **data_transform)
} /* end else */
/* Mark the value as valid */
- (*head)->ctx.data_transform_valid = TRUE;
+ (*head)->ctx.data_transform_valid = true;
} /* end if */
/* Get the value */
@@ -2403,7 +2400,7 @@ H5CX_get_vlen_alloc_info(H5T_vlen_alloc_info_t *vl_alloc_info)
} /* end else */
/* Mark the value as valid */
- (*head)->ctx.vl_alloc_info_valid = TRUE;
+ (*head)->ctx.vl_alloc_info_valid = true;
} /* end if */
/* Get the value */
@@ -2522,7 +2519,7 @@ H5CX_get_no_selection_io_cause(uint32_t *no_selection_io_cause)
*-------------------------------------------------------------------------
*/
herr_t
-H5CX_get_modify_write_buf(hbool_t *modify_write_buf)
+H5CX_get_modify_write_buf(bool *modify_write_buf)
{
H5CX_node_t **head = NULL; /* Pointer to head of API context list */
herr_t ret_value = SUCCEED; /* Return value */
@@ -2687,7 +2684,7 @@ H5CX_get_libver_bounds(H5F_libver_t *low_bound, H5F_libver_t *high_bound)
*-------------------------------------------------------------------------
*/
herr_t
-H5CX_get_dset_min_ohdr_flag(hbool_t *dset_min_ohdr_flag)
+H5CX_get_dset_min_ohdr_flag(bool *dset_min_ohdr_flag)
{
H5CX_node_t **head = NULL; /* Pointer to head of API context list */
herr_t ret_value = SUCCEED; /* Return value */
@@ -2755,7 +2752,7 @@ H5CX_get_ext_file_prefix(const char **extfile_prefix)
} /* end else */
/* Mark the value as valid */
- (*head)->ctx.extfile_prefix_valid = TRUE;
+ (*head)->ctx.extfile_prefix_valid = true;
} /* end if */
/* Get the value */
@@ -2810,7 +2807,7 @@ H5CX_get_vds_prefix(const char **vds_prefix)
} /* end else */
/* Mark the value as valid */
- (*head)->ctx.vds_prefix_valid = TRUE;
+ (*head)->ctx.vds_prefix_valid = true;
} /* end if */
/* Get the value */
@@ -2882,7 +2879,7 @@ H5CX_set_ring(H5AC_ring_t ring)
*-------------------------------------------------------------------------
*/
void
-H5CX_set_coll_metadata_read(hbool_t cmdr)
+H5CX_set_coll_metadata_read(bool cmdr)
{
H5CX_node_t **head = NULL; /* Pointer to head of API context list */
@@ -2953,7 +2950,7 @@ H5CX_set_io_xfer_mode(H5FD_mpio_xfer_t io_xfer_mode)
(*head)->ctx.io_xfer_mode = io_xfer_mode;
/* Mark the value as valid */
- (*head)->ctx.io_xfer_mode_valid = TRUE;
+ (*head)->ctx.io_xfer_mode_valid = true;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5CX_set_io_xfer_mode() */
@@ -2983,7 +2980,7 @@ H5CX_set_mpio_coll_opt(H5FD_mpio_collective_opt_t mpio_coll_opt)
(*head)->ctx.mpio_coll_opt = mpio_coll_opt;
/* Mark the value as valid */
- (*head)->ctx.mpio_coll_opt_valid = TRUE;
+ (*head)->ctx.mpio_coll_opt_valid = true;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5CX_set_mpio_coll_opt() */
@@ -2998,7 +2995,7 @@ H5CX_set_mpio_coll_opt(H5FD_mpio_collective_opt_t mpio_coll_opt)
*-------------------------------------------------------------------------
*/
void
-H5CX_set_mpi_file_flushing(hbool_t flushing)
+H5CX_set_mpi_file_flushing(bool flushing)
{
H5CX_node_t **head = NULL; /* Pointer to head of API context list */
@@ -3024,7 +3021,7 @@ H5CX_set_mpi_file_flushing(hbool_t flushing)
*-------------------------------------------------------------------------
*/
void
-H5CX_set_mpio_rank0_bcast(hbool_t rank0_bcast)
+H5CX_set_mpio_rank0_bcast(bool rank0_bcast)
{
H5CX_node_t **head = NULL; /* Pointer to head of API context list */
@@ -3068,7 +3065,7 @@ H5CX_set_vlen_alloc_info(H5MM_allocate_t alloc_func, void *alloc_info, H5MM_free
(*head)->ctx.vl_alloc_info.free_info = free_info;
/* Mark the value as valid */
- (*head)->ctx.vl_alloc_info_valid = TRUE;
+ (*head)->ctx.vl_alloc_info_valid = true;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5CX_set_vlen_alloc_info() */
@@ -3098,7 +3095,7 @@ H5CX_set_nlinks(size_t nlinks)
(*head)->ctx.nlinks = nlinks;
/* Mark the value as valid */
- (*head)->ctx.nlinks_valid = TRUE;
+ (*head)->ctx.nlinks_valid = true;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5CX_set_nlinks() */
@@ -3128,7 +3125,7 @@ H5CX_set_mpio_actual_chunk_opt(H5D_mpio_actual_chunk_opt_mode_t mpio_actual_chun
/* Cache the value for later, marking it to set in DXPL when context popped */
(*head)->ctx.mpio_actual_chunk_opt = mpio_actual_chunk_opt;
- (*head)->ctx.mpio_actual_chunk_opt_set = TRUE;
+ (*head)->ctx.mpio_actual_chunk_opt_set = true;
FUNC_LEAVE_NOAPI_VOID
} /* end H5CX_set_mpio_actual_chunk_opt() */
@@ -3156,7 +3153,7 @@ H5CX_set_mpio_actual_io_mode(H5D_mpio_actual_io_mode_t mpio_actual_io_mode)
/* Cache the value for later, marking it to set in DXPL when context popped */
(*head)->ctx.mpio_actual_io_mode = mpio_actual_io_mode;
- (*head)->ctx.mpio_actual_io_mode_set = TRUE;
+ (*head)->ctx.mpio_actual_io_mode_set = true;
FUNC_LEAVE_NOAPI_VOID
} /* end H5CX_set_mpio_actual_chunk_opt() */
@@ -3186,7 +3183,7 @@ H5CX_set_mpio_local_no_coll_cause(uint32_t mpio_local_no_coll_cause)
if ((*head)->ctx.dxpl_id != H5P_DATASET_XFER_DEFAULT) {
/* Cache the value for later, marking it to set in DXPL when context popped */
(*head)->ctx.mpio_local_no_coll_cause = mpio_local_no_coll_cause;
- (*head)->ctx.mpio_local_no_coll_cause_set = TRUE;
+ (*head)->ctx.mpio_local_no_coll_cause_set = true;
} /* end if */
FUNC_LEAVE_NOAPI_VOID
@@ -3217,7 +3214,7 @@ H5CX_set_mpio_global_no_coll_cause(uint32_t mpio_global_no_coll_cause)
if ((*head)->ctx.dxpl_id != H5P_DATASET_XFER_DEFAULT) {
/* Cache the value for later, marking it to set in DXPL when context popped */
(*head)->ctx.mpio_global_no_coll_cause = mpio_global_no_coll_cause;
- (*head)->ctx.mpio_global_no_coll_cause_set = TRUE;
+ (*head)->ctx.mpio_global_no_coll_cause_set = true;
} /* end if */
FUNC_LEAVE_NOAPI_VOID
@@ -3420,7 +3417,7 @@ H5CX_test_set_mpio_coll_chunk_multi_ratio_ind(int mpio_coll_chunk_multi_ratio_in
*-------------------------------------------------------------------------
*/
herr_t
-H5CX_test_set_mpio_coll_rank0_bcast(hbool_t mpio_coll_rank0_bcast)
+H5CX_test_set_mpio_coll_rank0_bcast(bool mpio_coll_rank0_bcast)
{
H5CX_node_t **head = NULL; /* Pointer to head of API context list */
herr_t ret_value = SUCCEED; /* Return value */
@@ -3466,7 +3463,7 @@ H5CX_set_no_selection_io_cause(uint32_t no_selection_io_cause)
if ((*head)->ctx.dxpl_id != H5P_DATASET_XFER_DEFAULT) {
/* Cache the value for later, marking it to set in DXPL when context popped */
(*head)->ctx.no_selection_io_cause = no_selection_io_cause;
- (*head)->ctx.no_selection_io_cause_set = TRUE;
+ (*head)->ctx.no_selection_io_cause_set = true;
} /* end if */
FUNC_LEAVE_NOAPI_VOID
@@ -3514,7 +3511,7 @@ H5CX_get_ohdr_flags(uint8_t *ohdr_flags)
*-------------------------------------------------------------------------
*/
static H5CX_node_t *
-H5CX__pop_common(hbool_t update_dxpl_props)
+H5CX__pop_common(bool update_dxpl_props)
{
H5CX_node_t **head = NULL; /* Pointer to head of API context list */
H5CX_node_t *ret_value = NULL; /* Return value */
@@ -3563,7 +3560,7 @@ H5CX__pop_common(hbool_t update_dxpl_props)
*-------------------------------------------------------------------------
*/
herr_t
-H5CX_pop(hbool_t update_dxpl_props)
+H5CX_pop(bool update_dxpl_props)
{
H5CX_node_t *cnode; /* Context node */
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5CXprivate.h b/src/H5CXprivate.h
index f0bec205da7..aa6883b62ef 100644
--- a/src/H5CXprivate.h
+++ b/src/H5CXprivate.h
@@ -43,8 +43,8 @@ typedef struct H5CX_state_t {
#ifdef H5_HAVE_PARALLEL
/* Internal: Parallel I/O settings */
- hbool_t coll_metadata_read; /* Whether to use collective I/O for metadata read */
-#endif /* H5_HAVE_PARALLEL */
+ bool coll_metadata_read; /* Whether to use collective I/O for metadata read */
+#endif /* H5_HAVE_PARALLEL */
} H5CX_state_t;
/*****************************/
@@ -58,10 +58,10 @@ typedef struct H5CX_state_t {
/* Library private routines */
#ifndef H5private_H
H5_DLL herr_t H5CX_push(void);
-H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props);
+H5_DLL herr_t H5CX_pop(bool update_dxpl_props);
#endif /* H5private_H */
-H5_DLL void H5CX_push_special(void);
-H5_DLL hbool_t H5CX_is_def_dxpl(void);
+H5_DLL void H5CX_push_special(void);
+H5_DLL bool H5CX_is_def_dxpl(void);
/* API context state routines */
H5_DLL herr_t H5CX_retrieve_state(H5CX_state_t **api_state);
@@ -74,8 +74,7 @@ H5_DLL void H5CX_set_lcpl(hid_t lcpl_id);
H5_DLL void H5CX_set_lapl(hid_t lapl_id);
H5_DLL void H5CX_set_dcpl(hid_t dcpl_id);
H5_DLL herr_t H5CX_set_libver_bounds(H5F_t *f);
-H5_DLL herr_t H5CX_set_apl(hid_t *acspl_id, const H5P_libclass_t *libclass, hid_t loc_id,
- hbool_t is_collective);
+H5_DLL herr_t H5CX_set_apl(hid_t *acspl_id, const H5P_libclass_t *libclass, hid_t loc_id, bool is_collective);
H5_DLL herr_t H5CX_set_loc(hid_t loc_id);
H5_DLL herr_t H5CX_set_vol_wrap_ctx(void *wrap_ctx);
H5_DLL herr_t H5CX_set_vol_connector_prop(const H5VL_connector_prop_t *vol_connector_prop);
@@ -88,10 +87,10 @@ H5_DLL herr_t H5CX_get_vol_connector_prop(H5VL_connector_prop_t *vol_connec
H5_DLL haddr_t H5CX_get_tag(void);
H5_DLL H5AC_ring_t H5CX_get_ring(void);
#ifdef H5_HAVE_PARALLEL
-H5_DLL hbool_t H5CX_get_coll_metadata_read(void);
-H5_DLL herr_t H5CX_get_mpi_coll_datatypes(MPI_Datatype *btype, MPI_Datatype *ftype);
-H5_DLL hbool_t H5CX_get_mpi_file_flushing(void);
-H5_DLL hbool_t H5CX_get_mpio_rank0_bcast(void);
+H5_DLL bool H5CX_get_coll_metadata_read(void);
+H5_DLL herr_t H5CX_get_mpi_coll_datatypes(MPI_Datatype *btype, MPI_Datatype *ftype);
+H5_DLL bool H5CX_get_mpi_file_flushing(void);
+H5_DLL bool H5CX_get_mpio_rank0_bcast(void);
#endif /* H5_HAVE_PARALLEL */
/* "Getter" routines for DXPL properties cached in API context */
@@ -117,7 +116,7 @@ H5_DLL herr_t H5CX_get_vlen_alloc_info(H5T_vlen_alloc_info_t *vl_alloc_info);
H5_DLL herr_t H5CX_get_dt_conv_cb(H5T_conv_cb_t *cb_struct);
H5_DLL herr_t H5CX_get_selection_io_mode(H5D_selection_io_mode_t *selection_io_mode);
H5_DLL herr_t H5CX_get_no_selection_io_cause(uint32_t *no_selection_io_cause);
-H5_DLL herr_t H5CX_get_modify_write_buf(hbool_t *modify_write_buf);
+H5_DLL herr_t H5CX_get_modify_write_buf(bool *modify_write_buf);
/* "Getter" routines for LCPL properties cached in API context */
H5_DLL herr_t H5CX_get_encoding(H5T_cset_t *encoding);
@@ -127,7 +126,7 @@ H5_DLL herr_t H5CX_get_intermediate_group(unsigned *crt_intermed_group);
H5_DLL herr_t H5CX_get_nlinks(size_t *nlinks);
/* "Getter" routines for DCPL properties cached in API context */
-H5_DLL herr_t H5CX_get_dset_min_ohdr_flag(hbool_t *dset_min_ohdr_flag);
+H5_DLL herr_t H5CX_get_dset_min_ohdr_flag(bool *dset_min_ohdr_flag);
H5_DLL herr_t H5CX_get_ohdr_flags(uint8_t *ohdr_flags);
/* "Getter" routines for DAPL properties cached in API context */
@@ -141,11 +140,11 @@ H5_DLL herr_t H5CX_get_libver_bounds(H5F_libver_t *low_bound, H5F_libver_t *high
H5_DLL void H5CX_set_tag(haddr_t tag);
H5_DLL void H5CX_set_ring(H5AC_ring_t ring);
#ifdef H5_HAVE_PARALLEL
-H5_DLL void H5CX_set_coll_metadata_read(hbool_t cmdr);
+H5_DLL void H5CX_set_coll_metadata_read(bool cmdr);
H5_DLL herr_t H5CX_set_mpi_coll_datatypes(MPI_Datatype btype, MPI_Datatype ftype);
H5_DLL herr_t H5CX_set_mpio_coll_opt(H5FD_mpio_collective_opt_t mpio_coll_opt);
-H5_DLL void H5CX_set_mpi_file_flushing(hbool_t flushing);
-H5_DLL void H5CX_set_mpio_rank0_bcast(hbool_t rank0_bcast);
+H5_DLL void H5CX_set_mpi_file_flushing(bool flushing);
+H5_DLL void H5CX_set_mpio_rank0_bcast(bool rank0_bcast);
#endif /* H5_HAVE_PARALLEL */
/* "Setter" routines for DXPL properties cached in API context */
@@ -176,7 +175,7 @@ H5_DLL herr_t H5CX_test_set_mpio_coll_chunk_link_num_true(int mpio_coll_chunk_li
H5_DLL herr_t H5CX_test_set_mpio_coll_chunk_link_num_false(int mpio_coll_chunk_link_num_false);
H5_DLL herr_t H5CX_test_set_mpio_coll_chunk_multi_ratio_coll(int mpio_coll_chunk_multi_ratio_coll);
H5_DLL herr_t H5CX_test_set_mpio_coll_chunk_multi_ratio_ind(int mpio_coll_chunk_multi_ratio_ind);
-H5_DLL herr_t H5CX_test_set_mpio_coll_rank0_bcast(hbool_t rank0_bcast);
+H5_DLL herr_t H5CX_test_set_mpio_coll_rank0_bcast(bool rank0_bcast);
#endif /* H5_HAVE_INSTRUMENTED_LIBRARY */
#endif /* H5_HAVE_PARALLEL */
diff --git a/src/H5Cdbg.c b/src/H5Cdbg.c
index c65d942a1b3..457b29cbc78 100644
--- a/src/H5Cdbg.c
+++ b/src/H5Cdbg.c
@@ -317,10 +317,10 @@ H5C_set_prefix(H5C_t *cache_ptr, char *prefix)
FUNC_ENTER_NOAPI(FAIL)
- if (cache_ptr == NULL || prefix == NULL || HDstrlen(prefix) >= H5C__PREFIX_LEN)
+ if (cache_ptr == NULL || prefix == NULL || strlen(prefix) >= H5C__PREFIX_LEN)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad param(s) on entry");
- HDstrncpy(&(cache_ptr->prefix[0]), prefix, (size_t)(H5C__PREFIX_LEN));
+ strncpy(&(cache_ptr->prefix[0]), prefix, (size_t)(H5C__PREFIX_LEN));
cache_ptr->prefix[H5C__PREFIX_LEN - 1] = '\0';
@@ -339,7 +339,7 @@ H5C_set_prefix(H5C_t *cache_ptr, char *prefix)
*/
herr_t
H5C_stats(H5C_t *cache_ptr, const char *cache_name,
- hbool_t
+ bool
#if !H5C_COLLECT_CACHE_STATS
H5_ATTR_UNUSED
#endif /* H5C_COLLECT_CACHE_STATS */
@@ -779,13 +779,13 @@ H5C_stats__reset(H5C_t H5_ATTR_UNUSED *cache_ptr)
* of protect / unprotect calls prior to this call.
*
* If either the parent or the child is not in the metadata
- * cache, the function sets *fd_exists_ptr to FALSE.
+ * cache, the function sets *fd_exists_ptr to false.
*
* If both are in the cache, the child's list of parents is
* searched for the proposed parent. If the proposed parent
* is found in the child's parent list, the function sets
- * *fd_exists_ptr to TRUE. In all other non-error cases,
- * the function sets *fd_exists_ptr FALSE.
+ * *fd_exists_ptr to true. In all other non-error cases,
+ * the function sets *fd_exists_ptr false.
*
* Return: SUCCEED on success/FAIL on failure. Note that
* *fd_exists_ptr is undefined on failure.
@@ -794,12 +794,12 @@ H5C_stats__reset(H5C_t H5_ATTR_UNUSED *cache_ptr)
*/
#ifndef NDEBUG
herr_t
-H5C_flush_dependency_exists(H5C_t *cache_ptr, haddr_t parent_addr, haddr_t child_addr, hbool_t *fd_exists_ptr)
+H5C_flush_dependency_exists(H5C_t *cache_ptr, haddr_t parent_addr, haddr_t child_addr, bool *fd_exists_ptr)
{
- hbool_t fd_exists = FALSE; /* whether flush dependency exists */
+ bool fd_exists = false; /* whether flush dependency exists */
H5C_cache_entry_t *parent_ptr; /* Ptr to parent entry */
H5C_cache_entry_t *child_ptr; /* Ptr to child entry */
- hbool_t ret_value = FALSE; /* Return value */
+ bool ret_value = false; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -821,7 +821,7 @@ H5C_flush_dependency_exists(H5C_t *cache_ptr, haddr_t parent_addr, haddr_t child
for (u = 0; u < child_ptr->flush_dep_nparents; u++) {
if (child_ptr->flush_dep_parent[u] == parent_ptr) {
- fd_exists = TRUE;
+ fd_exists = true;
assert(parent_ptr->flush_dep_nchildren > 0);
break;
} /* end if */
@@ -1025,7 +1025,7 @@ H5C_get_entry_ptr_from_addr(H5C_t *cache_ptr, haddr_t addr, void **entry_ptr_ptr
*-------------------------------------------------------------------------
*/
#ifndef NDEBUG
-hbool_t
+bool
H5C_get_serialization_in_progress(const H5C_t *cache_ptr)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -1044,19 +1044,19 @@ H5C_get_serialization_in_progress(const H5C_t *cache_ptr)
* metadata cache are clean from the outermost ring, inwards
* to the inner ring specified.
*
- * Returns TRUE if all specified rings are clean, and FALSE
+ * Returns true if all specified rings are clean, and false
* if not. Throws an assertion failure on error.
*
- * Return: TRUE if the indicated ring(s) are clean, and FALSE otherwise.
+ * Return: true if the indicated ring(s) are clean, and false otherwise.
*
*-------------------------------------------------------------------------
*/
#ifndef NDEBUG
-hbool_t
+bool
H5C_cache_is_clean(const H5C_t *cache_ptr, H5C_ring_t inner_ring)
{
H5C_ring_t ring = H5C_RING_USER;
- hbool_t ret_value = TRUE; /* Return value */
+ bool ret_value = true; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -1067,7 +1067,7 @@ H5C_cache_is_clean(const H5C_t *cache_ptr, H5C_ring_t inner_ring)
while (ring <= inner_ring) {
if (cache_ptr->dirty_index_ring_size[ring] > 0)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
ring++;
} /* end while */
@@ -1085,12 +1085,12 @@ H5C_cache_is_clean(const H5C_t *cache_ptr, H5C_ring_t inner_ring)
* type field contains the expted value.
*
* If the specified entry is in cache, *in_cache_ptr is set
- * to TRUE, and *type_ok_ptr is set to TRUE or FALSE depending
+ * to true, and *type_ok_ptr is set to true or false depending
* on whether the entries type field matches the expected_type
* parameter.
*
* If the target entry is not in cache, *in_cache_ptr is
- * set to FALSE, and *type_ok_ptr is undefined.
+ * set to false, and *type_ok_ptr is undefined.
*
* Note that this function is only defined if NDEBUG
* is not defined.
@@ -1101,8 +1101,8 @@ H5C_cache_is_clean(const H5C_t *cache_ptr, H5C_ring_t inner_ring)
*/
#ifndef NDEBUG
herr_t
-H5C_verify_entry_type(H5C_t *cache_ptr, haddr_t addr, const H5C_class_t *expected_type, hbool_t *in_cache_ptr,
- hbool_t *type_ok_ptr)
+H5C_verify_entry_type(H5C_t *cache_ptr, haddr_t addr, const H5C_class_t *expected_type, bool *in_cache_ptr,
+ bool *type_ok_ptr)
{
H5C_cache_entry_t *entry_ptr = NULL;
herr_t ret_value = SUCCEED; /* Return value */
@@ -1122,9 +1122,9 @@ H5C_verify_entry_type(H5C_t *cache_ptr, haddr_t addr, const H5C_class_t *expecte
/* the entry doesn't exist in the cache -- report this
* and quit.
*/
- *in_cache_ptr = FALSE;
+ *in_cache_ptr = false;
else {
- *in_cache_ptr = TRUE;
+ *in_cache_ptr = true;
if (entry_ptr->prefetched)
*type_ok_ptr = (expected_type->id == entry_ptr->prefetch_type_id);
@@ -1485,18 +1485,18 @@ H5C__validate_protected_entry_list(H5C_t *cache_ptr)
* is in present. We need this, as it is possible for
* an entry to be in the skip list twice.
*
- * Return: FALSE if the entry is not in the skip list, and TRUE
+ * Return: false if the entry is not in the skip list, and true
* if it is.
*
*-------------------------------------------------------------------------
*/
#ifdef H5C_DO_SLIST_SANITY_CHECKS
-hbool_t
+bool
H5C__entry_in_skip_list(H5C_t *cache_ptr, H5C_cache_entry_t *target_ptr)
{
H5SL_node_t *node_ptr;
- hbool_t in_slist;
- hbool_t ret_value;
+ bool in_slist;
+ bool ret_value;
FUNC_ENTER_PACKAGE
@@ -1505,7 +1505,7 @@ H5C__entry_in_skip_list(H5C_t *cache_ptr, H5C_cache_entry_t *target_ptr)
assert(cache_ptr->slist_ptr);
node_ptr = H5SL_first(cache_ptr->slist_ptr);
- in_slist = FALSE;
+ in_slist = false;
while ((node_ptr != NULL) && (!in_slist)) {
H5C_cache_entry_t *entry_ptr;
@@ -1516,7 +1516,7 @@ H5C__entry_in_skip_list(H5C_t *cache_ptr, H5C_cache_entry_t *target_ptr)
assert(entry_ptr->in_slist);
if (entry_ptr == target_ptr)
- in_slist = TRUE;
+ in_slist = true;
else
node_ptr = H5SL_next(node_ptr);
}
@@ -1540,9 +1540,9 @@ H5C__entry_in_skip_list(H5C_t *cache_ptr, H5C_cache_entry_t *target_ptr)
*/
herr_t
#if H5C_COLLECT_CACHE_STATS
-H5C__image_stats(H5C_t *cache_ptr, hbool_t print_header)
+H5C__image_stats(H5C_t *cache_ptr, bool print_header)
#else /* H5C_COLLECT_CACHE_STATS */
-H5C__image_stats(H5C_t *cache_ptr, hbool_t H5_ATTR_UNUSED print_header)
+H5C__image_stats(H5C_t *cache_ptr, bool H5_ATTR_UNUSED print_header)
#endif /* H5C_COLLECT_CACHE_STATS */
{
#if H5C_COLLECT_CACHE_STATS
diff --git a/src/H5Centry.c b/src/H5Centry.c
index 5a2015522c8..2bbf9acdbb5 100644
--- a/src/H5Centry.c
+++ b/src/H5Centry.c
@@ -58,14 +58,13 @@ typedef H5C_cache_entry_t *H5C_cache_entry_ptr_t;
/* Local Prototypes */
/********************/
static herr_t H5C__pin_entry_from_client(H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr);
-static herr_t H5C__unpin_entry_real(H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr, hbool_t update_rp);
-static herr_t H5C__unpin_entry_from_client(H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr, hbool_t update_rp);
+static herr_t H5C__unpin_entry_real(H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr, bool update_rp);
+static herr_t H5C__unpin_entry_from_client(H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr, bool update_rp);
static herr_t H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr);
-static herr_t H5C__verify_len_eoa(H5F_t *f, const H5C_class_t *type, haddr_t addr, size_t *len,
- hbool_t actual);
+static herr_t H5C__verify_len_eoa(H5F_t *f, const H5C_class_t *type, haddr_t addr, size_t *len, bool actual);
static void *H5C__load_entry(H5F_t *f,
#ifdef H5_HAVE_PARALLEL
- hbool_t coll_access,
+ bool coll_access,
#endif /* H5_HAVE_PARALLEL */
const H5C_class_t *type, haddr_t addr, void *udata);
static herr_t H5C__mark_flush_dep_dirty(H5C_cache_entry_t *entry);
@@ -129,13 +128,13 @@ H5C__pin_entry_from_client(H5C_t
HGOTO_ERROR(H5E_CACHE, H5E_CANTPIN, FAIL, "entry is already pinned");
} /* end if */
else {
- entry_ptr->is_pinned = TRUE;
+ entry_ptr->is_pinned = true;
H5C__UPDATE_STATS_FOR_PIN(cache_ptr, entry_ptr);
} /* end else */
/* Mark that the entry was pinned through an explicit pin from a client */
- entry_ptr->pinned_from_client = TRUE;
+ entry_ptr->pinned_from_client = true;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -151,7 +150,7 @@ H5C__pin_entry_from_client(H5C_t
*-------------------------------------------------------------------------
*/
static herr_t
-H5C__unpin_entry_real(H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr, hbool_t update_rp)
+H5C__unpin_entry_real(H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr, bool update_rp)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -171,7 +170,7 @@ H5C__unpin_entry_real(H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr, hbool_t up
H5C__UPDATE_RP_FOR_UNPIN(cache_ptr, entry_ptr, FAIL);
/* Unpin the entry now */
- entry_ptr->is_pinned = FALSE;
+ entry_ptr->is_pinned = false;
/* Update the stats for an unpin operation */
H5C__UPDATE_STATS_FOR_UNPIN(cache_ptr, entry_ptr);
@@ -192,7 +191,7 @@ H5C__unpin_entry_real(H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr, hbool_t up
*-------------------------------------------------------------------------
*/
static herr_t
-H5C__unpin_entry_from_client(H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr, hbool_t update_rp)
+H5C__unpin_entry_from_client(H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr, bool update_rp)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -214,7 +213,7 @@ H5C__unpin_entry_from_client(H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr, hbo
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "can't unpin entry");
/* Mark the entry as explicitly unpinned by the client */
- entry_ptr->pinned_from_client = FALSE;
+ entry_ptr->pinned_from_client = false;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -355,7 +354,7 @@ H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr)
if (entry_ptr->addr == old_addr) {
/* Delete the entry from the hash table and the slist */
H5C__DELETE_FROM_INDEX(cache_ptr, entry_ptr, FAIL);
- H5C__REMOVE_ENTRY_FROM_SLIST(cache_ptr, entry_ptr, FALSE, FAIL);
+ H5C__REMOVE_ENTRY_FROM_SLIST(cache_ptr, entry_ptr, false, FAIL);
/* Update the entry for its new address */
entry_ptr->addr = new_addr;
@@ -378,7 +377,7 @@ H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr)
H5C_IMAGE_EXTRA_SPACE));
#endif /* H5C_DO_MEMORY_SANITY_CHECKS */
- entry_ptr->image_up_to_date = TRUE;
+ entry_ptr->image_up_to_date = true;
/* Propagate the fact that the entry is serialized up the
* flush dependency chain if appropriate. Since the image must
@@ -425,19 +424,19 @@ herr_t
H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
{
H5C_t *cache_ptr; /* Cache for file */
- hbool_t destroy; /* external flag */
- hbool_t clear_only; /* external flag */
- hbool_t free_file_space; /* external flag */
- hbool_t take_ownership; /* external flag */
- hbool_t del_from_slist_on_destroy; /* external flag */
- hbool_t during_flush; /* external flag */
- hbool_t write_entry; /* internal flag */
- hbool_t destroy_entry; /* internal flag */
- hbool_t generate_image; /* internal flag */
- hbool_t update_page_buffer; /* internal flag */
- hbool_t was_dirty;
- hbool_t suppress_image_entry_writes = FALSE;
- hbool_t suppress_image_entry_frees = FALSE;
+ bool destroy; /* external flag */
+ bool clear_only; /* external flag */
+ bool free_file_space; /* external flag */
+ bool take_ownership; /* external flag */
+ bool del_from_slist_on_destroy; /* external flag */
+ bool during_flush; /* external flag */
+ bool write_entry; /* internal flag */
+ bool destroy_entry; /* internal flag */
+ bool generate_image; /* internal flag */
+ bool update_page_buffer; /* internal flag */
+ bool was_dirty;
+ bool suppress_image_entry_writes = false;
+ bool suppress_image_entry_frees = false;
haddr_t entry_addr = HADDR_UNDEF;
herr_t ret_value = SUCCEED; /* Return value */
@@ -464,7 +463,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
* and 'destroy' flags
*/
if (take_ownership)
- destroy_entry = FALSE;
+ destroy_entry = false;
else
destroy_entry = destroy;
@@ -472,15 +471,15 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
* clear only flag is not set.
*/
if (entry_ptr->is_dirty && !clear_only)
- write_entry = TRUE;
+ write_entry = true;
else
- write_entry = FALSE;
+ write_entry = false;
/* if we have received close warning, and we have been instructed to
* generate a metadata cache image, and we have actually constructed
- * the entry images, set suppress_image_entry_frees to TRUE.
+ * the entry images, set suppress_image_entry_frees to true.
*
- * Set suppress_image_entry_writes to TRUE if indicated by the
+ * Set suppress_image_entry_writes to true if indicated by the
* image_ctl flags.
*/
if (cache_ptr->close_warning_received && cache_ptr->image_ctl.generate_image &&
@@ -493,10 +492,10 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
assert((!take_ownership) || !(entry_ptr->include_in_image));
assert((!free_file_space) || !(entry_ptr->include_in_image));
- suppress_image_entry_frees = TRUE;
+ suppress_image_entry_frees = true;
if (cache_ptr->image_ctl.flags & H5C_CI__SUPRESS_ENTRY_WRITES)
- suppress_image_entry_writes = TRUE;
+ suppress_image_entry_writes = true;
} /* end if */
/* run initial sanity checks */
@@ -526,14 +525,14 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
/* Attempt to flush a protected entry -- scream and die. */
HGOTO_ERROR(H5E_CACHE, H5E_PROTECT, FAIL, "Attempt to flush a protected entry");
- /* Set entry_ptr->flush_in_progress = TRUE and set
- * entry_ptr->flush_marker = FALSE
+ /* Set entry_ptr->flush_in_progress = true and set
+ * entry_ptr->flush_marker = false
*
- * We will set flush_in_progress back to FALSE at the end if the
+ * We will set flush_in_progress back to false at the end if the
* entry still exists at that point.
*/
- entry_ptr->flush_in_progress = TRUE;
- entry_ptr->flush_marker = FALSE;
+ entry_ptr->flush_in_progress = true;
+ entry_ptr->flush_marker = false;
/* Preserve current dirty state for later */
was_dirty = entry_ptr->is_dirty;
@@ -583,7 +582,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
/* Write the image to disk unless the write is suppressed.
*
* This happens if both suppress_image_entry_writes and
- * entry_ptr->include_in_image are TRUE, or if the
+ * entry_ptr->include_in_image are true, or if the
* H5AC__CLASS_SKIP_WRITES is set in the entry's type. This
* flag should only be used in test code
*/
@@ -691,7 +690,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
#ifdef H5_HAVE_PARALLEL
/* Check for collective read access flag */
if (entry_ptr->coll_access) {
- entry_ptr->coll_access = FALSE;
+ entry_ptr->coll_access = false;
H5C__REMOVE_FROM_COLL_LIST(cache_ptr, entry_ptr, FAIL);
} /* end if */
#endif /* H5_HAVE_PARALLEL */
@@ -724,7 +723,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
* entry clean. Also, call the clear callback
* if defined.
*/
- entry_ptr->is_dirty = FALSE;
+ entry_ptr->is_dirty = false;
H5C__UPDATE_INDEX_FOR_ENTRY_CLEAN(cache_ptr, entry_ptr, FAIL);
@@ -751,7 +750,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
} /* end else */
/* reset the flush_in progress flag */
- entry_ptr->flush_in_progress = FALSE;
+ entry_ptr->flush_in_progress = false;
/* capture the cache entry address for the log_flush call at the
* end before the entry_ptr gets freed
@@ -854,7 +853,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
if (destroy_entry) {
if (entry_ptr->is_dirty) {
/* Reset dirty flag */
- entry_ptr->is_dirty = FALSE;
+ entry_ptr->is_dirty = false;
/* If the entry's type has a 'notify' callback send a
* 'entry cleaned' notice now that the entry is fully
@@ -920,7 +919,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
*-------------------------------------------------------------------------
*/
static herr_t
-H5C__verify_len_eoa(H5F_t *f, const H5C_class_t *type, haddr_t addr, size_t *len, hbool_t actual)
+H5C__verify_len_eoa(H5F_t *f, const H5C_class_t *type, haddr_t addr, size_t *len, bool actual)
{
H5FD_mem_t cooked_type; /* Modified type, accounting for switching global heaps */
haddr_t eoa; /* End-of-allocation in the file */
@@ -978,11 +977,11 @@ H5C__verify_len_eoa(H5F_t *f, const H5C_class_t *type, haddr_t addr, size_t *len
void *
H5C__load_entry(H5F_t *f,
#ifdef H5_HAVE_PARALLEL
- hbool_t coll_access,
+ bool coll_access,
#endif /* H5_HAVE_PARALLEL */
const H5C_class_t *type, haddr_t addr, void *udata)
{
- hbool_t dirty = FALSE; /* Flag indicating whether thing was dirtied during deserialize */
+ bool dirty = false; /* Flag indicating whether thing was dirtied during deserialize */
uint8_t *image = NULL; /* Buffer for disk image */
void *thing = NULL; /* Pointer to thing loaded */
H5C_cache_entry_t *entry = NULL; /* Alias for thing loaded, as cache entry */
@@ -1021,7 +1020,7 @@ H5C__load_entry(H5F_t *f,
/* Check for possible speculative read off the end of the file */
if (type->flags & H5C__CLASS_SPECULATIVE_LOAD_FLAG)
- if (H5C__verify_len_eoa(f, type, addr, &len, FALSE) < 0)
+ if (H5C__verify_len_eoa(f, type, addr, &len, false) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, "invalid len with respect to EOA");
/* Allocate the buffer for reading the on-disk entry image */
@@ -1048,7 +1047,7 @@ H5C__load_entry(H5F_t *f,
size_t actual_len = len; /* The actual length, after speculative reads have been resolved */
uint64_t nanosec = 1; /* # of nanoseconds to sleep between retries */
void *new_image; /* Pointer to image */
- hbool_t len_changed = TRUE; /* Whether to re-check speculative entries */
+ bool len_changed = true; /* Whether to re-check speculative entries */
/* Get the # of read attempts */
max_tries = tries = H5F_GET_READ_ATTEMPTS(f);
@@ -1112,7 +1111,7 @@ H5C__load_entry(H5F_t *f,
/* Check for the length changing */
if (actual_len != len) {
/* Verify that the length isn't past the EOA for the file */
- if (H5C__verify_len_eoa(f, type, addr, &actual_len, TRUE) < 0)
+ if (H5C__verify_len_eoa(f, type, addr, &actual_len, true) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, "actual_len exceeds EOA");
/* Expand buffer to new size */
@@ -1161,7 +1160,7 @@ H5C__load_entry(H5F_t *f,
} /* end if (actual_len != len) */
else {
/* The length has stabilized */
- len_changed = FALSE;
+ len_changed = false;
/* Set the final length */
len = actual_len;
@@ -1177,7 +1176,7 @@ H5C__load_entry(H5F_t *f,
/* Verify the checksum for the metadata image */
if ((chk_ret = type->verify_chksum(image, actual_len, udata)) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, NULL, "failure from verify_chksum callback");
- if (chk_ret == TRUE)
+ if (chk_ret == true)
break;
/* Sleep for some time */
@@ -1215,7 +1214,7 @@ H5C__load_entry(H5F_t *f,
*
* In the following assert:
*
- * assert( ( dirty == FALSE ) || ( type->id == 5 || type->id == 6 ) );
+ * assert( ( dirty == false ) || ( type->id == 5 || type->id == 6 ) );
*
* note that type ids 5 & 6 are associated with object headers in the
* metadata cache.
@@ -1225,7 +1224,7 @@ H5C__load_entry(H5F_t *f,
* metadata cache.
*/
- assert((dirty == FALSE) || (type->id == 5 || type->id == 6));
+ assert((dirty == false) || (type->id == 5 || type->id == 6));
entry->cache_ptr = f->shared->cache;
entry->addr = addr;
@@ -1235,20 +1234,20 @@ H5C__load_entry(H5F_t *f,
entry->image_up_to_date = !dirty;
entry->type = type;
entry->is_dirty = dirty;
- entry->dirtied = FALSE;
- entry->is_protected = FALSE;
- entry->is_read_only = FALSE;
+ entry->dirtied = false;
+ entry->is_protected = false;
+ entry->is_read_only = false;
entry->ro_ref_count = 0;
- entry->is_pinned = FALSE;
- entry->in_slist = FALSE;
- entry->flush_marker = FALSE;
+ entry->is_pinned = false;
+ entry->in_slist = false;
+ entry->flush_marker = false;
#ifdef H5_HAVE_PARALLEL
- entry->clear_on_unprotect = FALSE;
- entry->flush_immediately = FALSE;
+ entry->clear_on_unprotect = false;
+ entry->flush_immediately = false;
entry->coll_access = coll_access;
#endif /* H5_HAVE_PARALLEL */
- entry->flush_in_progress = FALSE;
- entry->destroy_in_progress = FALSE;
+ entry->flush_in_progress = false;
+ entry->destroy_in_progress = false;
entry->ring = H5C_RING_UNDEFINED;
@@ -1278,18 +1277,18 @@ H5C__load_entry(H5F_t *f,
#endif /* H5_HAVE_PARALLEL */
/* initialize cache image related fields */
- entry->include_in_image = FALSE;
+ entry->include_in_image = false;
entry->lru_rank = 0;
- entry->image_dirty = FALSE;
+ entry->image_dirty = false;
entry->fd_parent_count = 0;
entry->fd_parent_addrs = NULL;
entry->fd_child_count = 0;
entry->fd_dirty_child_count = 0;
entry->image_fd_height = 0;
- entry->prefetched = FALSE;
+ entry->prefetched = false;
entry->prefetch_type_id = 0;
entry->age = 0;
- entry->prefetched_dirty = FALSE;
+ entry->prefetched_dirty = false;
#ifndef NDEBUG /* debugging field */
entry->serialization_count = 0;
#endif
@@ -1559,11 +1558,11 @@ H5C__serialize_single_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry
assert(!entry_ptr->flush_in_progress);
assert(entry_ptr->type);
- /* Set entry_ptr->flush_in_progress to TRUE so the target entry
- * will not be evicted out from under us. Must set it back to FALSE
+ /* Set entry_ptr->flush_in_progress to true so the target entry
+ * will not be evicted out from under us. Must set it back to false
* when we are done.
*/
- entry_ptr->flush_in_progress = TRUE;
+ entry_ptr->flush_in_progress = true;
/* Allocate buffer for the entry image if required. */
if (NULL == entry_ptr->image_ptr) {
@@ -1581,7 +1580,7 @@ H5C__serialize_single_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry
HGOTO_ERROR(H5E_CACHE, H5E_CANTSERIALIZE, FAIL, "Can't generate image for cache entry");
/* Reset the flush_in progress flag */
- entry_ptr->flush_in_progress = FALSE;
+ entry_ptr->flush_in_progress = false;
done:
assert((ret_value != SUCCEED) || (!entry_ptr->flush_in_progress));
@@ -1619,9 +1618,9 @@ H5C__destroy_pf_entry_child_flush_deps(H5C_t *cache_ptr, H5C_cache_entry_t *pf_e
#ifndef NDEBUG
unsigned entries_visited = 0;
#endif
- int fd_children_found = 0;
- hbool_t found;
- herr_t ret_value = SUCCEED; /* Return value */
+ int fd_children_found = 0;
+ bool found;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1647,7 +1646,7 @@ H5C__destroy_pf_entry_child_flush_deps(H5C_t *cache_ptr, H5C_cache_entry_t *pf_e
/* Re-init */
u = 0;
- found = FALSE;
+ found = false;
/* Sanity checks */
assert(entry_ptr->type);
@@ -1663,7 +1662,7 @@ H5C__destroy_pf_entry_child_flush_deps(H5C_t *cache_ptr, H5C_cache_entry_t *pf_e
/* Correct entry? */
if (pf_entry_ptr == entry_ptr->flush_dep_parent[u])
- found = TRUE;
+ found = true;
u++;
} /* end while */
@@ -1685,11 +1684,11 @@ H5C__destroy_pf_entry_child_flush_deps(H5C_t *cache_ptr, H5C_cache_entry_t *pf_e
* entry_ptr->fd_parent_addrs and entry_ptr->flush_dep_parent
* can list parents in different order.
*/
- found = FALSE;
+ found = false;
u = 0;
while (!found && u < entry_ptr->fd_parent_count) {
if (pf_entry_ptr->addr == entry_ptr->fd_parent_addrs[u])
- found = TRUE;
+ found = true;
u++;
} /* end while */
assert(found);
@@ -1724,7 +1723,7 @@ H5C__destroy_pf_entry_child_flush_deps(H5C_t *cache_ptr, H5C_cache_entry_t *pf_e
* Note that the on disk image of the entry is not freed --
* a pointer to it is stored in the deserialized entries'
* image_ptr field, and its image_up_to_date field is set to
- * TRUE unless the entry is dirtied by the deserialize call.
+ * true unless the entry is dirtied by the deserialize call.
*
* If the prefetched entry is a flush dependency child,
* destroy that flush dependency prior to calling the
@@ -1751,7 +1750,7 @@ static herr_t
H5C__deserialize_prefetched_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t **entry_ptr_ptr,
const H5C_class_t *type, haddr_t addr, void *udata)
{
- hbool_t dirty = FALSE; /* Flag indicating whether thing was
+ bool dirty = false; /* Flag indicating whether thing was
* dirtied during deserialize
*/
size_t len; /* Size of image in file */
@@ -1865,7 +1864,7 @@ H5C__deserialize_prefetched_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t
*
* In the following assert:
*
- * assert( ( dirty == FALSE ) || ( type->id == 5 || type->id == 6 ) );
+ * assert( ( dirty == false ) || ( type->id == 5 || type->id == 6 ) );
*
* note that type ids 5 & 6 are associated with object headers in the
* metadata cache.
@@ -1882,7 +1881,7 @@ H5C__deserialize_prefetched_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t
* hence the value assigned to ds_entry_ptr->is_dirty below.
*/
- assert((dirty == FALSE) || (type->id == 5 || type->id == 6));
+ assert((dirty == false) || (type->id == 5 || type->id == 6));
ds_entry_ptr->cache_ptr = f->shared->cache;
ds_entry_ptr->addr = addr;
@@ -1892,20 +1891,20 @@ H5C__deserialize_prefetched_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t
ds_entry_ptr->image_up_to_date = !dirty;
ds_entry_ptr->type = type;
ds_entry_ptr->is_dirty = dirty | pf_entry_ptr->is_dirty;
- ds_entry_ptr->dirtied = FALSE;
- ds_entry_ptr->is_protected = FALSE;
- ds_entry_ptr->is_read_only = FALSE;
+ ds_entry_ptr->dirtied = false;
+ ds_entry_ptr->is_protected = false;
+ ds_entry_ptr->is_read_only = false;
ds_entry_ptr->ro_ref_count = 0;
- ds_entry_ptr->is_pinned = FALSE;
- ds_entry_ptr->in_slist = FALSE;
- ds_entry_ptr->flush_marker = FALSE;
+ ds_entry_ptr->is_pinned = false;
+ ds_entry_ptr->in_slist = false;
+ ds_entry_ptr->flush_marker = false;
#ifdef H5_HAVE_PARALLEL
- ds_entry_ptr->clear_on_unprotect = FALSE;
- ds_entry_ptr->flush_immediately = FALSE;
- ds_entry_ptr->coll_access = FALSE;
+ ds_entry_ptr->clear_on_unprotect = false;
+ ds_entry_ptr->flush_immediately = false;
+ ds_entry_ptr->coll_access = false;
#endif /* H5_HAVE_PARALLEL */
- ds_entry_ptr->flush_in_progress = FALSE;
- ds_entry_ptr->destroy_in_progress = FALSE;
+ ds_entry_ptr->flush_in_progress = false;
+ ds_entry_ptr->destroy_in_progress = false;
ds_entry_ptr->ring = pf_entry_ptr->ring;
@@ -1936,15 +1935,15 @@ H5C__deserialize_prefetched_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t
#endif /* H5_HAVE_PARALLEL */
/* Initialize cache image related fields */
- ds_entry_ptr->include_in_image = FALSE;
+ ds_entry_ptr->include_in_image = false;
ds_entry_ptr->lru_rank = 0;
- ds_entry_ptr->image_dirty = FALSE;
+ ds_entry_ptr->image_dirty = false;
ds_entry_ptr->fd_parent_count = 0;
ds_entry_ptr->fd_parent_addrs = NULL;
ds_entry_ptr->fd_child_count = pf_entry_ptr->fd_child_count;
ds_entry_ptr->fd_dirty_child_count = 0;
ds_entry_ptr->image_fd_height = 0;
- ds_entry_ptr->prefetched = FALSE;
+ ds_entry_ptr->prefetched = false;
ds_entry_ptr->prefetch_type_id = 0;
ds_entry_ptr->age = 0;
ds_entry_ptr->prefetched_dirty = pf_entry_ptr->prefetched_dirty;
@@ -2022,7 +2021,7 @@ H5C__deserialize_prefetched_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t
i = 0;
if (fd_children != NULL) {
H5C__UPDATE_RP_FOR_PROTECT(cache_ptr, ds_entry_ptr, FAIL);
- ds_entry_ptr->is_protected = TRUE;
+ ds_entry_ptr->is_protected = true;
while (fd_children[i] != NULL) {
/* Sanity checks */
assert((fd_children[i])->prefetched);
@@ -2031,14 +2030,14 @@ H5C__deserialize_prefetched_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t
#ifndef NDEBUG
{
- int j;
- hbool_t found;
+ int j;
+ bool found;
j = 0;
- found = FALSE;
+ found = false;
while ((j < (int)((fd_children[i])->fd_parent_count)) && (!found)) {
if ((fd_children[i])->fd_parent_addrs[j] == ds_entry_ptr->addr)
- found = TRUE;
+ found = true;
j++;
} /* end while */
@@ -2053,7 +2052,7 @@ H5C__deserialize_prefetched_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t
} /* end while */
H5C__UPDATE_RP_FOR_UNPROTECT(cache_ptr, ds_entry_ptr, FAIL);
- ds_entry_ptr->is_protected = FALSE;
+ ds_entry_ptr->is_protected = false;
} /* end if ( fd_children != NULL ) */
assert((unsigned)i == ds_entry_ptr->fd_child_count);
@@ -2091,17 +2090,17 @@ H5C_insert_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *thing, u
{
H5C_t *cache_ptr;
H5AC_ring_t ring = H5C_RING_UNDEFINED;
- hbool_t insert_pinned;
- hbool_t flush_last;
+ bool insert_pinned;
+ bool flush_last;
#ifdef H5_HAVE_PARALLEL
- hbool_t coll_access = FALSE; /* whether access to the cache entry is done collectively */
-#endif /* H5_HAVE_PARALLEL */
- hbool_t set_flush_marker;
- hbool_t write_permitted = TRUE;
+ bool coll_access = false; /* whether access to the cache entry is done collectively */
+#endif /* H5_HAVE_PARALLEL */
+ bool set_flush_marker;
+ bool write_permitted = true;
size_t empty_space;
H5C_cache_entry_t *entry_ptr = NULL;
H5C_cache_entry_t *test_entry_ptr;
- hbool_t entry_tagged = FALSE;
+ bool entry_tagged = false;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -2153,37 +2152,37 @@ H5C_insert_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *thing, u
entry_ptr->type = type;
entry_ptr->image_ptr = NULL;
- entry_ptr->image_up_to_date = FALSE;
+ entry_ptr->image_up_to_date = false;
- entry_ptr->is_protected = FALSE;
- entry_ptr->is_read_only = FALSE;
+ entry_ptr->is_protected = false;
+ entry_ptr->is_read_only = false;
entry_ptr->ro_ref_count = 0;
entry_ptr->is_pinned = insert_pinned;
entry_ptr->pinned_from_client = insert_pinned;
- entry_ptr->pinned_from_cache = FALSE;
+ entry_ptr->pinned_from_cache = false;
entry_ptr->flush_me_last = flush_last;
/* newly inserted entries are assumed to be dirty */
- entry_ptr->is_dirty = TRUE;
+ entry_ptr->is_dirty = true;
/* not protected, so can't be dirtied */
- entry_ptr->dirtied = FALSE;
+ entry_ptr->dirtied = false;
/* Retrieve the size of the thing */
if ((type->image_len)(thing, &(entry_ptr->size)) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTGETSIZE, FAIL, "can't get size of thing");
assert(entry_ptr->size > 0 && entry_ptr->size < H5C_MAX_ENTRY_SIZE);
- entry_ptr->in_slist = FALSE;
+ entry_ptr->in_slist = false;
#ifdef H5_HAVE_PARALLEL
- entry_ptr->clear_on_unprotect = FALSE;
- entry_ptr->flush_immediately = FALSE;
+ entry_ptr->clear_on_unprotect = false;
+ entry_ptr->flush_immediately = false;
#endif /* H5_HAVE_PARALLEL */
- entry_ptr->flush_in_progress = FALSE;
- entry_ptr->destroy_in_progress = FALSE;
+ entry_ptr->flush_in_progress = false;
+ entry_ptr->destroy_in_progress = false;
entry_ptr->ring = ring;
@@ -2214,18 +2213,18 @@ H5C_insert_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *thing, u
#endif /* H5_HAVE_PARALLEL */
/* initialize cache image related fields */
- entry_ptr->include_in_image = FALSE;
+ entry_ptr->include_in_image = false;
entry_ptr->lru_rank = 0;
- entry_ptr->image_dirty = FALSE;
+ entry_ptr->image_dirty = false;
entry_ptr->fd_parent_count = 0;
entry_ptr->fd_parent_addrs = NULL;
entry_ptr->fd_child_count = 0;
entry_ptr->fd_dirty_child_count = 0;
entry_ptr->image_fd_height = 0;
- entry_ptr->prefetched = FALSE;
+ entry_ptr->prefetched = false;
entry_ptr->prefetch_type_id = 0;
entry_ptr->age = 0;
- entry_ptr->prefetched_dirty = FALSE;
+ entry_ptr->prefetched_dirty = false;
#ifndef NDEBUG /* debugging field */
entry_ptr->serialization_count = 0;
#endif
@@ -2238,7 +2237,7 @@ H5C_insert_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *thing, u
/* Apply tag to newly inserted entry */
if (H5C__tag_entry(cache_ptr, entry_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "Cannot tag metadata entry");
- entry_tagged = TRUE;
+ entry_tagged = true;
H5C__RESET_CACHE_ENTRY_STATS(entry_ptr);
@@ -2258,7 +2257,7 @@ H5C_insert_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *thing, u
size_t space_needed;
if (empty_space <= entry_ptr->size)
- cache_ptr->cache_full = TRUE;
+ cache_ptr->cache_full = true;
if (cache_ptr->check_write_permitted != NULL) {
if ((cache_ptr->check_write_permitted)(f, &write_permitted) < 0)
@@ -2331,13 +2330,13 @@ H5C_insert_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *thing, u
/* Make sure the size of the collective entries in the cache remain in check */
if (H5P_USER_TRUE == H5F_COLL_MD_READ(f)) {
if (cache_ptr->max_cache_size * 80 < cache_ptr->coll_list_size * 100) {
- if (H5C_clear_coll_entries(cache_ptr, TRUE) < 0)
+ if (H5C_clear_coll_entries(cache_ptr, true) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "can't clear collective metadata entries");
} /* end if */
} /* end if */
else {
if (cache_ptr->max_cache_size * 40 < cache_ptr->coll_list_size * 100) {
- if (H5C_clear_coll_entries(cache_ptr, TRUE) < 0)
+ if (H5C_clear_coll_entries(cache_ptr, true) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "can't clear collective metadata entries");
} /* end if */
} /* end else */
@@ -2395,11 +2394,11 @@ H5C_mark_entry_dirty(void *thing)
assert(!((entry_ptr)->is_read_only));
/* set the dirtied flag */
- entry_ptr->dirtied = TRUE;
+ entry_ptr->dirtied = true;
/* reset image_up_to_date */
if (entry_ptr->image_up_to_date) {
- entry_ptr->image_up_to_date = FALSE;
+ entry_ptr->image_up_to_date = false;
if (entry_ptr->flush_dep_nparents > 0)
if (H5C__mark_flush_dep_unserialized(entry_ptr) < 0)
@@ -2408,8 +2407,8 @@ H5C_mark_entry_dirty(void *thing)
} /* end if */
} /* end if */
else if (entry_ptr->is_pinned) {
- hbool_t was_clean; /* Whether the entry was previously clean */
- hbool_t image_was_up_to_date;
+ bool was_clean; /* Whether the entry was previously clean */
+ bool image_was_up_to_date;
/* Remember previous dirty status */
was_clean = !entry_ptr->is_dirty;
@@ -2418,8 +2417,8 @@ H5C_mark_entry_dirty(void *thing)
image_was_up_to_date = entry_ptr->image_up_to_date;
/* Mark the entry as dirty if it isn't already */
- entry_ptr->is_dirty = TRUE;
- entry_ptr->image_up_to_date = FALSE;
+ entry_ptr->is_dirty = true;
+ entry_ptr->image_up_to_date = false;
/* Modify cache data structures */
if (was_clean)
@@ -2490,22 +2489,22 @@ H5C_mark_entry_clean(void *_thing)
if (entry_ptr->is_protected)
HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKCLEAN, FAIL, "entry is protected");
else if (entry_ptr->is_pinned) {
- hbool_t was_dirty; /* Whether the entry was previously dirty */
+ bool was_dirty; /* Whether the entry was previously dirty */
/* Remember previous dirty status */
was_dirty = entry_ptr->is_dirty;
/* Mark the entry as clean if it isn't already */
- entry_ptr->is_dirty = FALSE;
+ entry_ptr->is_dirty = false;
/* Also reset the 'flush_marker' flag, since the entry shouldn't be flushed now */
- entry_ptr->flush_marker = FALSE;
+ entry_ptr->flush_marker = false;
/* Modify cache data structures */
if (was_dirty)
H5C__UPDATE_INDEX_FOR_ENTRY_CLEAN(cache_ptr, entry_ptr, FAIL);
if (entry_ptr->in_slist)
- H5C__REMOVE_ENTRY_FROM_SLIST(cache_ptr, entry_ptr, FALSE, FAIL);
+ H5C__REMOVE_ENTRY_FROM_SLIST(cache_ptr, entry_ptr, false, FAIL);
/* Update stats for entry being marked clean */
H5C__UPDATE_STATS_FOR_CLEAR(cache_ptr, entry_ptr);
@@ -2560,7 +2559,7 @@ H5C_mark_entry_unserialized(void *thing)
/* Reset image_up_to_date */
if (entry->image_up_to_date) {
- entry->image_up_to_date = FALSE;
+ entry->image_up_to_date = false;
if (entry->flush_dep_nparents > 0)
if (H5C__mark_flush_dep_unserialized(entry) < 0)
@@ -2605,7 +2604,7 @@ H5C_mark_entry_serialized(void *_thing)
/* Check for entry changing status and do notifications, etc. */
if (!entry->image_up_to_date) {
/* Set the image_up_to_date flag */
- entry->image_up_to_date = TRUE;
+ entry->image_up_to_date = true;
/* Propagate the serialize up the flush dependency chain, if appropriate */
if (entry->flush_dep_nparents > 0)
@@ -2697,24 +2696,24 @@ H5C_move_entry(H5C_t *cache_ptr, const H5C_class_t *type, haddr_t old_addr, hadd
if (entry_ptr->in_slist) {
assert(cache_ptr->slist_ptr);
- H5C__REMOVE_ENTRY_FROM_SLIST(cache_ptr, entry_ptr, FALSE, FAIL);
+ H5C__REMOVE_ENTRY_FROM_SLIST(cache_ptr, entry_ptr, false, FAIL);
} /* end if */
} /* end if */
entry_ptr->addr = new_addr;
if (!entry_ptr->destroy_in_progress) {
- hbool_t was_dirty; /* Whether the entry was previously dirty */
+ bool was_dirty; /* Whether the entry was previously dirty */
/* Remember previous dirty status */
was_dirty = entry_ptr->is_dirty;
/* Mark the entry as dirty if it isn't already */
- entry_ptr->is_dirty = TRUE;
+ entry_ptr->is_dirty = true;
/* This shouldn't be needed, but it keeps the test code happy */
if (entry_ptr->image_up_to_date) {
- entry_ptr->image_up_to_date = FALSE;
+ entry_ptr->image_up_to_date = false;
if (entry_ptr->flush_dep_nparents > 0)
if (H5C__mark_flush_dep_unserialized(entry_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL,
@@ -2802,17 +2801,17 @@ H5C_resize_entry(void *thing, size_t new_size)
/* update for change in entry size if necessary */
if (entry_ptr->size != new_size) {
- hbool_t was_clean;
+ bool was_clean;
/* make note of whether the entry was clean to begin with */
was_clean = !entry_ptr->is_dirty;
/* mark the entry as dirty if it isn't already */
- entry_ptr->is_dirty = TRUE;
+ entry_ptr->is_dirty = true;
/* Reset the image up-to-date status */
if (entry_ptr->image_up_to_date) {
- entry_ptr->image_up_to_date = FALSE;
+ entry_ptr->image_up_to_date = false;
if (entry_ptr->flush_dep_nparents > 0)
if (H5C__mark_flush_dep_unserialized(entry_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL,
@@ -2968,15 +2967,15 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign
{
H5C_t *cache_ptr;
H5AC_ring_t ring = H5C_RING_UNDEFINED;
- hbool_t hit;
- hbool_t have_write_permitted = FALSE;
- hbool_t read_only = FALSE;
- hbool_t flush_last;
+ bool hit;
+ bool have_write_permitted = false;
+ bool read_only = false;
+ bool flush_last;
#ifdef H5_HAVE_PARALLEL
- hbool_t coll_access = FALSE; /* whether access to the cache entry is done collectively */
-#endif /* H5_HAVE_PARALLEL */
- hbool_t write_permitted = FALSE;
- hbool_t was_loaded = FALSE; /* Whether the entry was loaded as a result of the protect */
+ bool coll_access = false; /* whether access to the cache entry is done collectively */
+#endif /* H5_HAVE_PARALLEL */
+ bool write_permitted = false;
+ bool was_loaded = false; /* Whether the entry was loaded as a result of the protect */
size_t empty_space;
void *thing;
H5C_cache_entry_t *entry_ptr;
@@ -3001,7 +3000,7 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign
/* Load the cache image, if requested */
if (cache_ptr->load_image) {
- cache_ptr->load_image = FALSE;
+ cache_ptr->load_image = false;
if (H5C__load_cache_image(f) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTLOAD, NULL, "Can't load cache image");
} /* end if */
@@ -3083,7 +3082,7 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign
HMPI_GOTO_ERROR(NULL, "MPI_Bcast failed", mpi_code)
/* Mark the entry as collective and insert into the collective list */
- entry_ptr->coll_access = TRUE;
+ entry_ptr->coll_access = true;
H5C__INSERT_IN_COLL_LIST(cache_ptr, entry_ptr, NULL);
} /* end if */
else if (entry_ptr->coll_access)
@@ -3094,7 +3093,7 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign
#ifdef H5C_DO_TAGGING_SANITY_CHECKS
{
/* Verify tag value */
- if (cache_ptr->ignore_tags != TRUE) {
+ if (cache_ptr->ignore_tags != true) {
haddr_t tag; /* Tag value */
/* The entry is already in the cache, but make sure that the tag value
@@ -3112,12 +3111,12 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign
}
#endif
- hit = TRUE;
+ hit = true;
thing = (void *)entry_ptr;
}
else {
/* must try to load the entry from disk. */
- hit = FALSE;
+ hit = false;
if (NULL == (thing = H5C__load_entry(f,
#ifdef H5_HAVE_PARALLEL
coll_access,
@@ -3162,17 +3161,17 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign
size_t space_needed;
if (empty_space <= entry_ptr->size)
- cache_ptr->cache_full = TRUE;
+ cache_ptr->cache_full = true;
if (cache_ptr->check_write_permitted != NULL) {
if ((cache_ptr->check_write_permitted)(f, &write_permitted) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, "Can't get write_permitted 1");
else
- have_write_permitted = TRUE;
+ have_write_permitted = true;
} /* end if */
else {
write_permitted = cache_ptr->write_permitted;
- have_write_permitted = TRUE;
+ have_write_permitted = true;
} /* end else */
assert(entry_ptr->size <= H5C_MAX_ENTRY_SIZE);
@@ -3237,7 +3236,7 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign
/* Record that the entry was loaded, to trigger a notify callback later */
/* (After the entry is fully added to the cache) */
- was_loaded = TRUE;
+ was_loaded = true;
} /* end else */
assert(entry_ptr->addr == addr);
@@ -3254,12 +3253,12 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign
else {
H5C__UPDATE_RP_FOR_PROTECT(cache_ptr, entry_ptr, NULL);
- entry_ptr->is_protected = TRUE;
+ entry_ptr->is_protected = true;
if (read_only) {
- entry_ptr->is_read_only = TRUE;
+ entry_ptr->is_read_only = true;
entry_ptr->ro_ref_count = 1;
} /* end if */
- entry_ptr->dirtied = FALSE;
+ entry_ptr->dirtied = false;
} /* end else */
H5C__UPDATE_CACHE_HIT_RATE_STATS(cache_ptr, hit);
@@ -3276,11 +3275,11 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign
if ((cache_ptr->check_write_permitted)(f, &write_permitted) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, "Can't get write_permitted");
else
- have_write_permitted = TRUE;
+ have_write_permitted = true;
}
else {
write_permitted = cache_ptr->write_permitted;
- have_write_permitted = TRUE;
+ have_write_permitted = true;
}
}
@@ -3289,7 +3288,7 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign
HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, "Cache auto-resize failed");
if (cache_ptr->size_decreased) {
- cache_ptr->size_decreased = FALSE;
+ cache_ptr->size_decreased = false;
/* check to see if the cache is now oversized due to the cache
* size reduction. If it is, try to evict enough entries to
@@ -3308,7 +3307,7 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign
((empty_space + cache_ptr->clean_index_size) < cache_ptr->min_clean_size)) {
if (cache_ptr->index_size > cache_ptr->max_cache_size)
- cache_ptr->cache_full = TRUE;
+ cache_ptr->cache_full = true;
if (H5C__make_space_in_cache(f, (size_t)0, write_permitted) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, "H5C__make_space_in_cache failed");
@@ -3334,12 +3333,12 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign
if (coll_access) {
if (H5P_USER_TRUE == H5F_COLL_MD_READ(f)) {
if (cache_ptr->max_cache_size * 80 < cache_ptr->coll_list_size * 100)
- if (H5C_clear_coll_entries(cache_ptr, TRUE) < 0)
+ if (H5C_clear_coll_entries(cache_ptr, true) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, NULL, "can't clear collective metadata entries");
} /* end if */
else {
if (cache_ptr->max_cache_size * 40 < cache_ptr->coll_list_size * 100)
- if (H5C_clear_coll_entries(cache_ptr, TRUE) < 0)
+ if (H5C_clear_coll_entries(cache_ptr, true) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, NULL, "can't clear collective metadata entries");
} /* end else */
} /* end if */
@@ -3386,7 +3385,7 @@ H5C_unpin_entry(void *_entry_ptr)
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
/* Unpin the entry */
- if (H5C__unpin_entry_from_client(cache_ptr, entry_ptr, TRUE) < 0)
+ if (H5C__unpin_entry_from_client(cache_ptr, entry_ptr, true) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "Can't unpin entry from client");
done:
@@ -3413,7 +3412,7 @@ H5C_unpin_entry(void *_entry_ptr)
*
* Return: Non-negative on success/Negative on failure
*
- * If the deleted flag is TRUE, simply remove the target entry
+ * If the deleted flag is true, simply remove the target entry
* from the cache, clear it, and free it without writing it to
* disk.
*
@@ -3424,17 +3423,17 @@ H5C_unpin_entry(void *_entry_ptr)
herr_t
H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags)
{
- H5C_t *cache_ptr;
- hbool_t deleted;
- hbool_t dirtied;
- hbool_t set_flush_marker;
- hbool_t pin_entry;
- hbool_t unpin_entry;
- hbool_t free_file_space;
- hbool_t take_ownership;
- hbool_t was_clean;
+ H5C_t *cache_ptr;
+ bool deleted;
+ bool dirtied;
+ bool set_flush_marker;
+ bool pin_entry;
+ bool unpin_entry;
+ bool free_file_space;
+ bool take_ownership;
+ bool was_clean;
#ifdef H5_HAVE_PARALLEL
- hbool_t clear_entry = FALSE;
+ bool clear_entry = false;
#endif /* H5_HAVE_PARALLEL */
H5C_cache_entry_t *entry_ptr;
H5C_cache_entry_t *test_entry_ptr;
@@ -3507,7 +3506,7 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags)
}
else if (unpin_entry) {
/* Unpin the entry from a client */
- if (H5C__unpin_entry_from_client(cache_ptr, entry_ptr, FALSE) < 0)
+ if (H5C__unpin_entry_from_client(cache_ptr, entry_ptr, false) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "Can't unpin entry by client");
} /* end if */
}
@@ -3519,7 +3518,7 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags)
if (dirtied)
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "Read only entry modified??");
- entry_ptr->is_read_only = FALSE;
+ entry_ptr->is_read_only = false;
entry_ptr->ro_ref_count = 0;
} /* end if */
@@ -3543,9 +3542,9 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags)
/* Sanity check */
assert(entry_ptr->is_dirty);
- entry_ptr->clear_on_unprotect = FALSE;
+ entry_ptr->clear_on_unprotect = false;
if (!dirtied)
- clear_entry = TRUE;
+ clear_entry = true;
} /* end if */
#endif /* H5_HAVE_PARALLEL */
@@ -3555,7 +3554,7 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags)
/* Mark the entry as dirty if appropriate */
entry_ptr->is_dirty = (entry_ptr->is_dirty || dirtied);
if (dirtied && entry_ptr->image_up_to_date) {
- entry_ptr->image_up_to_date = FALSE;
+ entry_ptr->image_up_to_date = false;
if (entry_ptr->flush_dep_nparents > 0)
if (H5C__mark_flush_dep_unserialized(entry_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL,
@@ -3611,16 +3610,16 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags)
}
else if (unpin_entry) {
/* Unpin the entry from a client */
- if (H5C__unpin_entry_from_client(cache_ptr, entry_ptr, FALSE) < 0)
+ if (H5C__unpin_entry_from_client(cache_ptr, entry_ptr, false) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "Can't unpin entry by client");
} /* end if */
/* H5C__UPDATE_RP_FOR_UNPROTECT will place the unprotected entry on
- * the pinned entry list if entry_ptr->is_pinned is TRUE.
+ * the pinned entry list if entry_ptr->is_pinned is true.
*/
H5C__UPDATE_RP_FOR_UNPROTECT(cache_ptr, entry_ptr, FAIL);
- entry_ptr->is_protected = FALSE;
+ entry_ptr->is_protected = false;
/* if the entry is dirty, 'or' its flush_marker with the set flush flag,
* and then add it to the skip list if it isn't there already.
@@ -3628,7 +3627,7 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags)
if (entry_ptr->is_dirty) {
entry_ptr->flush_marker |= set_flush_marker;
if (!entry_ptr->in_slist)
- /* this is a no-op if cache_ptr->slist_enabled is FALSE */
+ /* this is a no-op if cache_ptr->slist_enabled is false */
H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL);
} /* end if */
@@ -3742,7 +3741,7 @@ H5C_unsettle_entry_ring(void *_entry)
if (cache->rdfsm_settled) {
if (cache->flush_in_progress || cache->close_warning_received)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected rdfsm ring unsettle");
- cache->rdfsm_settled = FALSE;
+ cache->rdfsm_settled = false;
} /* end if */
break;
@@ -3750,12 +3749,12 @@ H5C_unsettle_entry_ring(void *_entry)
if (cache->mdfsm_settled) {
if (cache->flush_in_progress || cache->close_warning_received)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected mdfsm ring unsettle");
- cache->mdfsm_settled = FALSE;
+ cache->mdfsm_settled = false;
} /* end if */
break;
default:
- assert(FALSE); /* this should be un-reachable */
+ assert(false); /* this should be un-reachable */
break;
} /* end switch */
@@ -3824,12 +3823,12 @@ H5C_create_flush_dependency(void *parent_thing, void *child_thing)
assert(!parent_entry->pinned_from_cache);
/* Pin the parent entry */
- parent_entry->is_pinned = TRUE;
+ parent_entry->is_pinned = true;
H5C__UPDATE_STATS_FOR_PIN(cache_ptr, parent_entry);
} /* end else */
/* Mark the entry as pinned from the cache's action (possibly redundantly) */
- parent_entry->pinned_from_cache = TRUE;
+ parent_entry->pinned_from_cache = true;
/* Check if we need to resize the child's parent array */
if (child_entry->flush_dep_nparents >= child_entry->flush_dep_parent_nalloc) {
@@ -3971,11 +3970,11 @@ H5C_destroy_flush_dependency(void *parent_thing, void *child_thing)
/* Check if we should unpin parent entry now */
if (!parent_entry->pinned_from_client)
- if (H5C__unpin_entry_real(cache_ptr, parent_entry, TRUE) < 0)
+ if (H5C__unpin_entry_real(cache_ptr, parent_entry, true) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "Can't unpin entry");
/* Mark the entry as unpinned from the cache's action */
- parent_entry->pinned_from_cache = FALSE;
+ parent_entry->pinned_from_cache = false;
} /* end if */
/* Adjust parent entry's ndirty_children */
@@ -4151,7 +4150,7 @@ H5C_remove_entry(void *_entry)
*/
/* Update stats, as if we are "destroying" and taking ownership of the entry */
- H5C__UPDATE_STATS_FOR_EVICTION(cache, entry, TRUE);
+ H5C__UPDATE_STATS_FOR_EVICTION(cache, entry, true);
/* If the entry's type has a 'notify' callback, send a 'before eviction'
* notice while the entry is still fully integrated in the cache.
@@ -4172,7 +4171,7 @@ H5C_remove_entry(void *_entry)
#ifdef H5_HAVE_PARALLEL
/* Check for collective read access flag */
if (entry->coll_access) {
- entry->coll_access = FALSE;
+ entry->coll_access = false;
H5C__REMOVE_FROM_COLL_LIST(cache, entry, FAIL);
} /* end if */
#endif /* H5_HAVE_PARALLEL */
diff --git a/src/H5Cepoch.c b/src/H5Cepoch.c
index ed161e8de62..ef105f839a4 100644
--- a/src/H5Cepoch.c
+++ b/src/H5Cepoch.c
@@ -60,8 +60,7 @@ static herr_t H5C__epoch_marker_get_initial_load_size(void *udata_ptr, size_t *i
static herr_t H5C__epoch_marker_get_final_load_size(const void *image_ptr, size_t image_len_ptr,
void *udata_ptr, size_t *actual_len);
static htri_t H5C__epoch_marker_verify_chksum(const void *image_ptr, size_t len, void *udata_ptr);
-static void *H5C__epoch_marker_deserialize(const void *image_ptr, size_t len, void *udata,
- hbool_t *dirty_ptr);
+static void *H5C__epoch_marker_deserialize(const void *image_ptr, size_t len, void *udata, bool *dirty_ptr);
static herr_t H5C__epoch_marker_image_len(const void *thing, size_t *image_len_ptr);
static herr_t H5C__epoch_marker_pre_serialize(H5F_t *f, void *thing, haddr_t addr, size_t len,
haddr_t *new_addr_ptr, size_t *new_len_ptr,
@@ -137,12 +136,12 @@ H5C__epoch_marker_verify_chksum(const void H5_ATTR_UNUSED *image_ptr, size_t H5_
HERROR(H5E_CACHE, H5E_SYSTEM, "called unreachable fcn.");
- FUNC_LEAVE_NOAPI(FALSE)
+ FUNC_LEAVE_NOAPI(false)
} /* end H5C__epoch_marker_verify_chksum() */
static void *
H5C__epoch_marker_deserialize(const void H5_ATTR_UNUSED *image_ptr, size_t H5_ATTR_UNUSED len,
- void H5_ATTR_UNUSED *udata, hbool_t H5_ATTR_UNUSED *dirty_ptr)
+ void H5_ATTR_UNUSED *udata, bool H5_ATTR_UNUSED *dirty_ptr)
{
FUNC_ENTER_PACKAGE_NOERR /* Yes, even though this pushes an error on the stack */
diff --git a/src/H5Cimage.c b/src/H5Cimage.c
index 4fa3a1c5133..b9690540afd 100644
--- a/src/H5Cimage.c
+++ b/src/H5Cimage.c
@@ -133,7 +133,7 @@ static herr_t H5C__prep_for_file_close__setup_image_entries_array(H5C_t *cache_p
static herr_t H5C__prep_for_file_close__scan_entries(const H5F_t *f, H5C_t *cache_ptr);
static herr_t H5C__reconstruct_cache_contents(H5F_t *f, H5C_t *cache_ptr);
static H5C_cache_entry_t *H5C__reconstruct_cache_entry(const H5F_t *f, H5C_t *cache_ptr, const uint8_t **buf);
-static herr_t H5C__write_cache_image_superblock_msg(H5F_t *f, hbool_t create);
+static herr_t H5C__write_cache_image_superblock_msg(H5F_t *f, bool create);
static herr_t H5C__read_cache_image(H5F_t *f, H5C_t *cache_ptr);
static herr_t H5C__write_cache_image(H5F_t *f, const H5C_t *cache_ptr);
static herr_t H5C__construct_cache_image_buffer(H5F_t *f, H5C_t *cache_ptr);
@@ -161,17 +161,17 @@ H5FL_DEFINE(H5C_cache_entry_t);
* load is pending (i.e. will be executed on the next
* protect or insert)
*
- * Returns TRUE if a cache image load is pending, and FALSE
+ * Returns true if a cache image load is pending, and false
* if not. Throws an assertion failure on error.
*
- * Return: TRUE if a cache image load is pending, and FALSE otherwise.
+ * Return: true if a cache image load is pending, and false otherwise.
*
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
H5C_cache_image_pending(const H5C_t *cache_ptr)
{
- hbool_t ret_value = TRUE; /* Return value */
+ bool ret_value = true; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -191,19 +191,19 @@ H5C_cache_image_pending(const H5C_t *cache_ptr)
* cache image has either been queued or executed, and if
* construction of a cache image has been requested.
*
- * This done, it set *load_ci_ptr to TRUE if a cache image
+ * This done, it set *load_ci_ptr to true if a cache image
* has either been loaded or a load has been requested, and
- * to FALSE otherwise.
+ * to false otherwise.
*
- * Similarly, set *write_ci_ptr to TRUE if construction of
- * a cache image has been requested, and to FALSE otherwise.
+ * Similarly, set *write_ci_ptr to true if construction of
+ * a cache image has been requested, and to false otherwise.
*
* Return: SUCCEED on success, and FAIL on failure.
*
*-------------------------------------------------------------------------
*/
herr_t
-H5C_cache_image_status(H5F_t *f, hbool_t *load_ci_ptr, hbool_t *write_ci_ptr)
+H5C_cache_image_status(H5F_t *f, bool *load_ci_ptr, bool *write_ci_ptr)
{
H5C_t *cache_ptr;
@@ -638,7 +638,7 @@ H5C__load_cache_image(H5F_t *f)
*/
H5C__UPDATE_STATS_FOR_CACHE_IMAGE_LOAD(cache_ptr);
- cache_ptr->image_loaded = TRUE;
+ cache_ptr->image_loaded = true;
} /* end if */
/* If directed, free the on disk metadata cache image */
@@ -688,7 +688,7 @@ H5C__load_cache_image(H5F_t *f)
*-------------------------------------------------------------------------
*/
herr_t
-H5C_load_cache_image_on_next_protect(H5F_t *f, haddr_t addr, hsize_t len, hbool_t rw)
+H5C_load_cache_image_on_next_protect(H5F_t *f, haddr_t addr, hsize_t len, bool rw)
{
H5C_t *cache_ptr;
@@ -703,7 +703,7 @@ H5C_load_cache_image_on_next_protect(H5F_t *f, haddr_t addr, hsize_t len, hbool_
/* Set information needed to load cache image */
cache_ptr->image_addr = addr;
cache_ptr->image_len = len;
- cache_ptr->load_image = TRUE;
+ cache_ptr->load_image = true;
cache_ptr->delete_image = rw;
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -806,7 +806,7 @@ H5C__image_entry_cmp(const void *_entry1, const void *_entry2)
*-------------------------------------------------------------------------
*/
herr_t
-H5C__prep_image_for_file_close(H5F_t *f, hbool_t *image_generated)
+H5C__prep_image_for_file_close(H5F_t *f, bool *image_generated)
{
H5C_t *cache_ptr = NULL;
haddr_t eoa_frag_addr = HADDR_UNDEF;
@@ -828,7 +828,7 @@ H5C__prep_image_for_file_close(H5F_t *f, hbool_t *image_generated)
* it exists) has not been read yet. Do this now if required.
*/
if (cache_ptr->load_image) {
- cache_ptr->load_image = FALSE;
+ cache_ptr->load_image = false;
if (H5C__load_cache_image(f) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTLOAD, FAIL, "can't load cache image");
} /* end if */
@@ -872,7 +872,7 @@ H5C__prep_image_for_file_close(H5F_t *f, hbool_t *image_generated)
* cache_ptr->image_ctl.flags.
*/
if (cache_ptr->image_ctl.flags & H5C_CI__GEN_MDCI_SBE_MESG)
- if (H5C__write_cache_image_superblock_msg(f, TRUE) < 0)
+ if (H5C__write_cache_image_superblock_msg(f, true) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "creation of cache image SB mesg failed.");
/* Serialize the cache */
@@ -993,7 +993,7 @@ H5C__prep_image_for_file_close(H5F_t *f, hbool_t *image_generated)
* cache_ptr->image_ctl.flags.
*/
if (cache_ptr->image_ctl.flags & H5C_CI__GEN_MDC_IMAGE_BLK)
- if (H5C__write_cache_image_superblock_msg(f, FALSE) < 0)
+ if (H5C__write_cache_image_superblock_msg(f, false) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "update of cache image SB mesg failed");
/* At this point:
@@ -1026,7 +1026,7 @@ H5C__prep_image_for_file_close(H5F_t *f, hbool_t *image_generated)
*
* If the metadata cache image will be empty, delete the
* metadata cache image superblock extension message, set
- * cache_ptr->image_ctl.generate_image to FALSE. This will
+ * cache_ptr->image_ctl.generate_image to false. This will
* allow the file close to continue normally without the
* unnecessary generation of the metadata cache image.
*/
@@ -1051,11 +1051,11 @@ H5C__prep_image_for_file_close(H5F_t *f, hbool_t *image_generated)
HGOTO_ERROR(H5E_CACHE, H5E_CANTREMOVE, FAIL,
"can't remove MDC image msg from superblock ext");
- cache_ptr->image_ctl.generate_image = FALSE;
+ cache_ptr->image_ctl.generate_image = false;
} /* end else */
/* Indicate that a cache image was generated */
- *image_generated = TRUE;
+ *image_generated = true;
} /* end if */
done:
@@ -1096,8 +1096,6 @@ H5C_set_cache_image_config(const H5F_t *f, H5C_t *cache_ptr, H5C_cache_image_ctl
/* Sanity checks */
assert(f);
- assert(f->shared);
- assert(f->shared->cache == f->shared->cache);
/* Check arguments */
if (cache_ptr == NULL)
@@ -1117,7 +1115,7 @@ H5C_set_cache_image_config(const H5F_t *f, H5C_t *cache_ptr, H5C_cache_image_ctl
cache_ptr->image_ctl = default_image_ctl;
assert(!(cache_ptr->image_ctl.generate_image));
- } /* end if */
+ }
else {
#endif /* H5_HAVE_PARALLEL */
/* A cache image can only be generated if the file is opened read / write
@@ -1139,9 +1137,9 @@ H5C_set_cache_image_config(const H5F_t *f, H5C_t *cache_ptr, H5C_cache_image_ctl
cache_ptr->image_ctl = default_image_ctl;
assert(!(cache_ptr->image_ctl.generate_image));
- } /* end else */
+ }
#ifdef H5_HAVE_PARALLEL
- } /* end else */
+ }
#endif /* H5_HAVE_PARALLEL */
done:
@@ -1175,9 +1173,9 @@ H5C_validate_cache_image_config(H5C_cache_image_ctl_t *ctl_ptr)
/* At present, we do not support inclusion of the adaptive resize
* configuration in the cache image. Thus the save_resize_status
- * field must be FALSE.
+ * field must be false.
*/
- if (ctl_ptr->save_resize_status != FALSE)
+ if (ctl_ptr->save_resize_status != false)
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "unexpected value in save_resize_status field");
/* At present, we do not support prefetched entry ageouts. Thus
@@ -1276,7 +1274,7 @@ H5C__decode_cache_image_header(const H5F_t *f, H5C_t *cache_ptr, const uint8_t *
{
uint8_t version;
uint8_t flags;
- hbool_t have_resize_status = FALSE;
+ bool have_resize_status = false;
size_t actual_header_len;
size_t expected_header_len;
const uint8_t *p;
@@ -1305,7 +1303,7 @@ H5C__decode_cache_image_header(const H5F_t *f, H5C_t *cache_ptr, const uint8_t *
/* Decode flags */
flags = *p++;
if (flags & H5C__MDCI_HEADER_HAVE_RESIZE_STATUS)
- have_resize_status = TRUE;
+ have_resize_status = true;
if (have_resize_status)
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "MDC resize status not yet supported");
@@ -1355,10 +1353,10 @@ H5C__decode_cache_image_header(const H5F_t *f, H5C_t *cache_ptr, const uint8_t *
static herr_t
H5C__decode_cache_image_entry(const H5F_t *f, const H5C_t *cache_ptr, const uint8_t **buf, unsigned entry_num)
{
- hbool_t is_dirty = FALSE;
- hbool_t in_lru = FALSE; /* Only used in assertions */
- hbool_t is_fd_parent = FALSE; /* Only used in assertions */
- hbool_t is_fd_child = FALSE; /* Only used in assertions */
+ bool is_dirty = false;
+ bool in_lru = false; /* Only used in assertions */
+ bool is_fd_parent = false; /* Only used in assertions */
+ bool is_fd_child = false; /* Only used in assertions */
haddr_t addr;
hsize_t size = 0;
void *image_ptr;
@@ -1397,13 +1395,13 @@ H5C__decode_cache_image_entry(const H5F_t *f, const H5C_t *cache_ptr, const uint
/* Decode flags */
flags = *p++;
if (flags & H5C__MDCI_ENTRY_DIRTY_FLAG)
- is_dirty = TRUE;
+ is_dirty = true;
if (flags & H5C__MDCI_ENTRY_IN_LRU_FLAG)
- in_lru = TRUE;
+ in_lru = true;
if (flags & H5C__MDCI_ENTRY_IS_FD_PARENT_FLAG)
- is_fd_parent = TRUE;
+ is_fd_parent = true;
if (flags & H5C__MDCI_ENTRY_IS_FD_CHILD_FLAG)
- is_fd_child = TRUE;
+ is_fd_child = true;
/* Decode ring */
ring = *p++;
@@ -1725,7 +1723,7 @@ H5C__prep_for_file_close__compute_fd_heights(const H5C_t *cache_ptr)
unsigned external_parent_fd_refs_removed = 0;
unsigned external_child_fd_refs_removed = 0;
#endif
- hbool_t done = FALSE;
+ bool done = false;
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED;
@@ -1741,9 +1739,9 @@ H5C__prep_for_file_close__compute_fd_heights(const H5C_t *cache_ptr)
* that the child will have dirty children of its own, this may take
* multiple passes through the index list.
*/
- done = FALSE;
+ done = false;
while (!done) {
- done = TRUE;
+ done = true;
entry_ptr = cache_ptr->il_head;
while (entry_ptr != NULL) {
/* Should this entry be in the image */
@@ -1762,7 +1760,7 @@ H5C__prep_for_file_close__compute_fd_heights(const H5C_t *cache_ptr)
#ifndef NDEBUG
entries_removed_from_image++;
#endif
- entry_ptr->include_in_image = FALSE;
+ entry_ptr->include_in_image = false;
} /* end if */
} /* for */
} /* end if */
@@ -2010,7 +2008,7 @@ H5C__prep_for_file_close__setup_image_entries_array(H5C_t *cache_ptr)
sizeof(H5C_image_entry_t) * (size_t)(cache_ptr->num_entries_in_image + 1))))
HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed for image_entries");
- /* Initialize (non-zero/NULL/FALSE) fields */
+ /* Initialize (non-zero/NULL/false) fields */
for (u = 0; u <= cache_ptr->num_entries_in_image; u++) {
image_entries[u].addr = HADDR_UNDEF;
image_entries[u].ring = H5C_RING_UNDEFINED;
@@ -2124,7 +2122,7 @@ static herr_t
H5C__prep_for_file_close__scan_entries(const H5F_t *f, H5C_t *cache_ptr)
{
H5C_cache_entry_t *entry_ptr;
- hbool_t include_in_image;
+ bool include_in_image;
int lru_rank = 1;
#ifndef NDEBUG
unsigned entries_visited = 0;
@@ -2167,9 +2165,9 @@ H5C__prep_for_file_close__scan_entries(const H5F_t *f, H5C_t *cache_ptr)
* of these entries later.
*/
if (entry_ptr->ring > H5C_MAX_RING_IN_IMAGE)
- include_in_image = FALSE;
+ include_in_image = false;
else
- include_in_image = TRUE;
+ include_in_image = true;
entry_ptr->include_in_image = include_in_image;
if (include_in_image) {
@@ -2450,7 +2448,7 @@ H5C__reconstruct_cache_contents(H5F_t *f, H5C_t *cache_ptr)
* Do this now, and then uprotect when done.
*/
H5C__UPDATE_RP_FOR_PROTECT(cache_ptr, parent_ptr, FAIL);
- parent_ptr->is_protected = TRUE;
+ parent_ptr->is_protected = true;
/* Setup the flush dependency */
if (H5C_create_flush_dependency(parent_ptr, pf_entry_ptr) < 0)
@@ -2458,7 +2456,7 @@ H5C__reconstruct_cache_contents(H5F_t *f, H5C_t *cache_ptr)
/* And now unprotect */
H5C__UPDATE_RP_FOR_UNPROTECT(cache_ptr, parent_ptr, FAIL);
- parent_ptr->is_protected = FALSE;
+ parent_ptr->is_protected = false;
} /* end for */
} /* end for */
@@ -2531,7 +2529,7 @@ H5C__reconstruct_cache_contents(H5F_t *f, H5C_t *cache_ptr)
/* cache is oversized -- call H5C__make_space_in_cache() with zero
* space needed to repair the situation if possible.
*/
- hbool_t write_permitted = FALSE;
+ bool write_permitted = false;
if (cache_ptr->check_write_permitted && (cache_ptr->check_write_permitted)(f, &write_permitted) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, FAIL, "Can't get write_permitted");
@@ -2565,14 +2563,14 @@ H5C__reconstruct_cache_entry(const H5F_t *f, H5C_t *cache_ptr, const uint8_t **b
{
H5C_cache_entry_t *pf_entry_ptr = NULL; /* Reconstructed cache entry */
uint8_t flags = 0;
- hbool_t is_dirty = FALSE;
+ bool is_dirty = false;
#ifndef NDEBUG /* only used in assertions */
- hbool_t in_lru = FALSE;
- hbool_t is_fd_parent = FALSE;
- hbool_t is_fd_child = FALSE;
+ bool in_lru = false;
+ bool is_fd_parent = false;
+ bool is_fd_child = false;
#endif
const uint8_t *p;
- hbool_t file_is_rw;
+ bool file_is_rw;
H5C_cache_entry_t *ret_value = NULL; /* Return value */
FUNC_ENTER_PACKAGE
@@ -2598,14 +2596,14 @@ H5C__reconstruct_cache_entry(const H5F_t *f, H5C_t *cache_ptr, const uint8_t **b
/* Decode flags */
flags = *p++;
if (flags & H5C__MDCI_ENTRY_DIRTY_FLAG)
- is_dirty = TRUE;
+ is_dirty = true;
#ifndef NDEBUG /* only used in assertions */
if (flags & H5C__MDCI_ENTRY_IN_LRU_FLAG)
- in_lru = TRUE;
+ in_lru = true;
if (flags & H5C__MDCI_ENTRY_IS_FD_PARENT_FLAG)
- is_fd_parent = TRUE;
+ is_fd_parent = true;
if (flags & H5C__MDCI_ENTRY_IS_FD_CHILD_FLAG)
- is_fd_child = TRUE;
+ is_fd_child = true;
#endif
/* Force dirty entries to clean if the file read only -- must do
@@ -2696,11 +2694,11 @@ H5C__reconstruct_cache_entry(const H5F_t *f, H5C_t *cache_ptr, const uint8_t **b
p += pf_entry_ptr->size;
/* Initialize the rest of the fields in the prefetched entry */
- /* (Only need to set non-zero/NULL/FALSE fields, due to calloc() above) */
+ /* (Only need to set non-zero/NULL/false fields, due to calloc() above) */
pf_entry_ptr->cache_ptr = cache_ptr;
- pf_entry_ptr->image_up_to_date = TRUE;
+ pf_entry_ptr->image_up_to_date = true;
pf_entry_ptr->type = H5AC_PREFETCHED_ENTRY;
- pf_entry_ptr->prefetched = TRUE;
+ pf_entry_ptr->prefetched = true;
pf_entry_ptr->prefetched_dirty = is_dirty && (!file_is_rw);
/* Sanity checks */
@@ -2734,7 +2732,7 @@ H5C__reconstruct_cache_entry(const H5F_t *f, H5C_t *cache_ptr, const uint8_t **b
*-------------------------------------------------------------------------
*/
static herr_t
-H5C__write_cache_image_superblock_msg(H5F_t *f, hbool_t create)
+H5C__write_cache_image_superblock_msg(H5F_t *f, bool create)
{
H5C_t *cache_ptr;
H5O_mdci_t mdci_msg; /* metadata cache image message */
diff --git a/src/H5Cint.c b/src/H5Cint.c
index eb9b64cd74e..31a947a8858 100644
--- a/src/H5Cint.c
+++ b/src/H5Cint.c
@@ -47,9 +47,9 @@
/* Local Prototypes */
/********************/
static herr_t H5C__autoadjust__ageout(H5F_t *f, double hit_rate, enum H5C_resize_status *status_ptr,
- size_t *new_max_cache_size_ptr, hbool_t write_permitted);
+ size_t *new_max_cache_size_ptr, bool write_permitted);
static herr_t H5C__autoadjust__ageout__cycle_epoch_marker(H5C_t *cache_ptr);
-static herr_t H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *f, hbool_t write_permitted);
+static herr_t H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *f, bool write_permitted);
static herr_t H5C__autoadjust__ageout__insert_new_marker(H5C_t *cache_ptr);
static herr_t H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags);
static herr_t H5C__serialize_ring(H5F_t *f, H5C_ring_t ring);
@@ -83,11 +83,11 @@ static herr_t H5C__serialize_ring(H5F_t *f, H5C_ring_t ring);
*-------------------------------------------------------------------------
*/
herr_t
-H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted)
+H5C__auto_adjust_cache_size(H5F_t *f, bool write_permitted)
{
H5C_t *cache_ptr = f->shared->cache;
- hbool_t reentrant_call = FALSE;
- hbool_t inserted_epoch_marker = FALSE;
+ bool reentrant_call = false;
+ bool inserted_epoch_marker = false;
size_t new_max_cache_size = 0;
size_t old_max_cache_size = 0;
size_t new_min_clean_size = 0;
@@ -104,17 +104,17 @@ H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted)
assert(0.0 <= cache_ptr->resize_ctl.min_clean_fraction);
assert(cache_ptr->resize_ctl.min_clean_fraction <= 100.0);
- /* check to see if cache_ptr->resize_in_progress is TRUE. If it, this
+ /* check to see if cache_ptr->resize_in_progress is true. If it, this
* is a re-entrant call via a client callback called in the resize
* process. To avoid an infinite recursion, set reentrant_call to
- * TRUE, and goto done.
+ * true, and goto done.
*/
if (cache_ptr->resize_in_progress) {
- reentrant_call = TRUE;
+ reentrant_call = true;
HGOTO_DONE(SUCCEED);
} /* end if */
- cache_ptr->resize_in_progress = TRUE;
+ cache_ptr->resize_in_progress = true;
if (!cache_ptr->resize_enabled)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Auto cache resize disabled");
@@ -185,7 +185,7 @@ H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted)
if (H5C__autoadjust__ageout__insert_new_marker(cache_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "can't insert new epoch marker");
- inserted_epoch_marker = TRUE;
+ inserted_epoch_marker = true;
}
/* don't run the cache size decrease code unless the cache size
@@ -274,9 +274,9 @@ H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted)
cache_ptr->min_clean_size = new_min_clean_size;
if (status == increase)
- cache_ptr->cache_full = FALSE;
+ cache_ptr->cache_full = false;
else if (status == decrease)
- cache_ptr->size_decreased = TRUE;
+ cache_ptr->size_decreased = true;
/* update flash cache size increase fields as appropriate */
if (cache_ptr->flash_size_increase_possible) {
@@ -312,7 +312,7 @@ H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted)
/* Sanity checks */
assert(cache_ptr->resize_in_progress);
if (!reentrant_call)
- cache_ptr->resize_in_progress = FALSE;
+ cache_ptr->resize_in_progress = false;
assert((!reentrant_call) || (cache_ptr->resize_in_progress));
FUNC_LEAVE_NOAPI(ret_value)
@@ -335,7 +335,7 @@ H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted)
*/
static herr_t
H5C__autoadjust__ageout(H5F_t *f, double hit_rate, enum H5C_resize_status *status_ptr,
- size_t *new_max_cache_size_ptr, hbool_t write_permitted)
+ size_t *new_max_cache_size_ptr, bool write_permitted)
{
H5C_t *cache_ptr = f->shared->cache;
size_t test_size;
@@ -433,7 +433,7 @@ H5C__autoadjust__ageout__cycle_epoch_marker(H5C_t *cache_ptr)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "ring buffer underflow");
cache_ptr->epoch_marker_ringbuf_size -= 1;
- if (cache_ptr->epoch_marker_active[i] != TRUE)
+ if (cache_ptr->epoch_marker_active[i] != true)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unused marker in LRU?!?");
H5C__DLL_REMOVE((&((cache_ptr->epoch_markers)[i])), (cache_ptr)->LRU_head_ptr, (cache_ptr)->LRU_tail_ptr,
@@ -497,13 +497,13 @@ H5C__autoadjust__ageout__cycle_epoch_marker(H5C_t *cache_ptr)
*-------------------------------------------------------------------------
*/
static herr_t
-H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *f, hbool_t write_permitted)
+H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *f, bool write_permitted)
{
H5C_t *cache_ptr = f->shared->cache;
size_t eviction_size_limit;
size_t bytes_evicted = 0;
- hbool_t prev_is_dirty = FALSE;
- hbool_t restart_scan;
+ bool prev_is_dirty = false;
+ bool restart_scan;
H5C_cache_entry_t *entry_ptr;
H5C_cache_entry_t *next_ptr;
H5C_cache_entry_t *prev_ptr;
@@ -526,11 +526,11 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *f, hbool_t write_permitte
eviction_size_limit = cache_ptr->index_size; /* i.e. infinity */
if (write_permitted) {
- restart_scan = FALSE;
+ restart_scan = false;
entry_ptr = cache_ptr->LRU_tail_ptr;
while (entry_ptr != NULL && entry_ptr->type->id != H5AC_EPOCH_MARKER_ID &&
bytes_evicted < eviction_size_limit) {
- hbool_t skipping_entry = FALSE;
+ bool skipping_entry = false;
assert(!(entry_ptr->is_protected));
assert(!(entry_ptr->is_read_only));
@@ -547,7 +547,7 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *f, hbool_t write_permitte
/* dirty corked entry is skipped */
if (entry_ptr->tag_info && entry_ptr->tag_info->corked)
- skipping_entry = TRUE;
+ skipping_entry = true;
else {
/* reset entries_removed_counter and
* last_entry_removed_ptr prior to the call to
@@ -565,7 +565,7 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *f, hbool_t write_permitte
if (cache_ptr->entries_removed_counter > 1 ||
cache_ptr->last_entry_removed_ptr == prev_ptr)
- restart_scan = TRUE;
+ restart_scan = true;
} /* end else */
} /* end if */
else if (!entry_ptr->prefetched_dirty) {
@@ -579,7 +579,7 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *f, hbool_t write_permitte
assert(!entry_ptr->is_dirty);
assert(entry_ptr->prefetched_dirty);
- skipping_entry = TRUE;
+ skipping_entry = true;
} /* end else */
if (prev_ptr != NULL) {
@@ -590,7 +590,7 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *f, hbool_t write_permitte
/* Something has happened to the LRU -- start over
* from the tail.
*/
- restart_scan = FALSE;
+ restart_scan = false;
entry_ptr = cache_ptr->LRU_tail_ptr;
H5C__UPDATE_STATS_FOR_LRU_SCAN_RESTART(cache_ptr);
@@ -656,7 +656,7 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *f, hbool_t write_permitte
} /* end else */
if (cache_ptr->index_size < cache_ptr->max_cache_size)
- cache_ptr->cache_full = FALSE;
+ cache_ptr->cache_full = false;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -697,7 +697,7 @@ H5C__autoadjust__ageout__insert_new_marker(H5C_t *cache_ptr)
assert(((cache_ptr->epoch_markers)[i]).next == NULL);
assert(((cache_ptr->epoch_markers)[i]).prev == NULL);
- (cache_ptr->epoch_marker_active)[i] = TRUE;
+ (cache_ptr->epoch_marker_active)[i] = true;
cache_ptr->epoch_marker_ringbuf_last =
(cache_ptr->epoch_marker_ringbuf_last + 1) % (H5C__MAX_EPOCH_MARKERS + 1);
@@ -752,7 +752,7 @@ H5C__autoadjust__ageout__remove_all_markers(H5C_t *cache_ptr)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "ring buffer underflow");
cache_ptr->epoch_marker_ringbuf_size -= 1;
- if (cache_ptr->epoch_marker_active[i] != TRUE)
+ if (cache_ptr->epoch_marker_active[i] != true)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unused marker in LRU?!?");
/* remove the epoch marker from the LRU list */
@@ -760,7 +760,7 @@ H5C__autoadjust__ageout__remove_all_markers(H5C_t *cache_ptr)
cache_ptr->LRU_list_len, cache_ptr->LRU_list_size, FAIL)
/* mark the epoch marker as unused. */
- cache_ptr->epoch_marker_active[i] = FALSE;
+ cache_ptr->epoch_marker_active[i] = false;
assert(cache_ptr->epoch_markers[i].addr == (haddr_t)i);
assert(cache_ptr->epoch_markers[i].next == NULL);
@@ -816,7 +816,7 @@ H5C__autoadjust__ageout__remove_excess_markers(H5C_t *cache_ptr)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "ring buffer underflow");
cache_ptr->epoch_marker_ringbuf_size -= 1;
- if (cache_ptr->epoch_marker_active[i] != TRUE)
+ if (cache_ptr->epoch_marker_active[i] != true)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unused marker in LRU?!?");
/* remove the epoch marker from the LRU list */
@@ -824,7 +824,7 @@ H5C__autoadjust__ageout__remove_excess_markers(H5C_t *cache_ptr)
cache_ptr->LRU_list_len, cache_ptr->LRU_list_size, FAIL)
/* mark the epoch marker as unused. */
- cache_ptr->epoch_marker_active[i] = FALSE;
+ cache_ptr->epoch_marker_active[i] = false;
assert(cache_ptr->epoch_markers[i].addr == (haddr_t)i);
assert(cache_ptr->epoch_markers[i].next == NULL);
@@ -1133,7 +1133,7 @@ static herr_t
H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
{
H5C_t *cache_ptr;
- hbool_t restart_slist_scan;
+ bool restart_slist_scan;
uint32_t protected_entries = 0;
int32_t i;
uint32_t cur_ring_pel_len;
@@ -1238,20 +1238,20 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
/* Set the cache_ptr->slist_changed to false.
*
- * This flag is set to TRUE by H5C__flush_single_entry if the slist
+ * This flag is set to true by H5C__flush_single_entry if the slist
* is modified by a pre_serialize, serialize, or notify callback.
*
* H5C__flush_invalidate_ring() uses this flag to detect any
* modifications to the slist that might corrupt the scan of
* the slist -- and restart the scan in this event.
*/
- cache_ptr->slist_changed = FALSE;
+ cache_ptr->slist_changed = false;
/* this done, start the scan of the slist */
- restart_slist_scan = TRUE;
+ restart_slist_scan = true;
while (restart_slist_scan || (node_ptr != NULL)) {
if (restart_slist_scan) {
- restart_slist_scan = FALSE;
+ restart_slist_scan = false;
/* Start at beginning of skip list */
node_ptr = H5SL_first(cache_ptr->slist_ptr);
@@ -1335,8 +1335,8 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
* This has the potential to corrupt the
* scan through the slist, so restart it.
*/
- restart_slist_scan = TRUE;
- cache_ptr->slist_changed = FALSE;
+ restart_slist_scan = true;
+ cache_ptr->slist_changed = false;
H5C__UPDATE_STATS_FOR_SLIST_SCAN_RESTART(cache_ptr);
} /* end if */
} /* end else-if */
@@ -1355,8 +1355,8 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
* This has the potential to corrupt the
* scan through the slist, so restart it.
*/
- restart_slist_scan = TRUE;
- cache_ptr->slist_changed = FALSE;
+ restart_slist_scan = true;
+ cache_ptr->slist_changed = false;
H5C__UPDATE_STATS_FOR_SLIST_SCAN_RESTART(cache_ptr);
} /* end if */
} /* end else */
@@ -1509,7 +1509,7 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
if ((cur_ring_pel_len > 0) && (cur_ring_pel_len >= old_ring_pel_len)) {
/* Don't error if allowed to have pinned entries remaining */
if (evict_flags)
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
HGOTO_ERROR(
H5E_CACHE, H5E_CANTFLUSH, FAIL,
@@ -1572,11 +1572,11 @@ herr_t
H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
{
H5C_t *cache_ptr = f->shared->cache;
- hbool_t flushed_entries_last_pass;
- hbool_t flush_marked_entries;
- hbool_t ignore_protected;
- hbool_t tried_to_flush_protected_entry = FALSE;
- hbool_t restart_slist_scan;
+ bool flushed_entries_last_pass;
+ bool flush_marked_entries;
+ bool ignore_protected;
+ bool tried_to_flush_protected_entry = false;
+ bool restart_slist_scan;
uint32_t protected_entries = 0;
H5SL_node_t *node_ptr = NULL;
H5C_cache_entry_t *entry_ptr = NULL;
@@ -1617,20 +1617,20 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
* Thus we track whether we have flushed any entries in the last
* pass, and terminate if we haven't.
*/
- flushed_entries_last_pass = TRUE;
+ flushed_entries_last_pass = true;
/* Set the cache_ptr->slist_changed to false.
*
- * This flag is set to TRUE by H5C__flush_single_entry if the
+ * This flag is set to true by H5C__flush_single_entry if the
* slist is modified by a pre_serialize, serialize, or notify callback.
* H5C_flush_cache uses this flag to detect any modifications
* to the slist that might corrupt the scan of the slist -- and
* restart the scan in this event.
*/
- cache_ptr->slist_changed = FALSE;
+ cache_ptr->slist_changed = false;
while ((cache_ptr->slist_ring_len[ring] > 0) && (protected_entries == 0) && (flushed_entries_last_pass)) {
- flushed_entries_last_pass = FALSE;
+ flushed_entries_last_pass = false;
#ifdef H5C_DO_SANITY_CHECKS
/* For sanity checking, try to verify that the skip list has
@@ -1671,10 +1671,10 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
*/
#endif /* H5C_DO_SANITY_CHECKS */
- restart_slist_scan = TRUE;
+ restart_slist_scan = true;
while ((restart_slist_scan) || (node_ptr != NULL)) {
if (restart_slist_scan) {
- restart_slist_scan = FALSE;
+ restart_slist_scan = false;
/* Start at beginning of skip list */
node_ptr = H5SL_first(cache_ptr->slist_ptr);
@@ -1750,7 +1750,7 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
* flush everything we can before we decide
* whether to flag an error.
*/
- tried_to_flush_protected_entry = TRUE;
+ tried_to_flush_protected_entry = true;
protected_entries++;
} /* end if */
else {
@@ -1765,12 +1765,12 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
* This has the potential to corrupt the
* scan through the slist, so restart it.
*/
- restart_slist_scan = TRUE;
- cache_ptr->slist_changed = FALSE;
+ restart_slist_scan = true;
+ cache_ptr->slist_changed = false;
H5C__UPDATE_STATS_FOR_SLIST_SCAN_RESTART(cache_ptr);
} /* end if */
- flushed_entries_last_pass = TRUE;
+ flushed_entries_last_pass = true;
} /* end else */
} /* end if */
} /* while ( ( restart_slist_scan ) || ( node_ptr != NULL ) ) */
@@ -1826,7 +1826,7 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
*-------------------------------------------------------------------------
*/
herr_t
-H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted)
+H5C__make_space_in_cache(H5F_t *f, size_t space_needed, bool write_permitted)
{
H5C_t *cache_ptr = f->shared->cache;
#if H5C_COLLECT_CACHE_STATS
@@ -1837,10 +1837,10 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted)
uint32_t entries_examined = 0;
uint32_t initial_list_len;
size_t empty_space;
- hbool_t reentrant_call = FALSE;
- hbool_t prev_is_dirty = FALSE;
- hbool_t didnt_flush_entry = FALSE;
- hbool_t restart_scan;
+ bool reentrant_call = false;
+ bool prev_is_dirty = false;
+ bool didnt_flush_entry = false;
+ bool restart_scan;
H5C_cache_entry_t *entry_ptr;
H5C_cache_entry_t *prev_ptr;
H5C_cache_entry_t *next_ptr;
@@ -1856,20 +1856,20 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted)
assert(cache_ptr);
assert(cache_ptr->index_size == (cache_ptr->clean_index_size + cache_ptr->dirty_index_size));
- /* check to see if cache_ptr->msic_in_progress is TRUE. If it, this
+ /* check to see if cache_ptr->msic_in_progress is true. If it, this
* is a re-entrant call via a client callback called in the make
* space in cache process. To avoid an infinite recursion, set
- * reentrant_call to TRUE, and goto done.
+ * reentrant_call to true, and goto done.
*/
if (cache_ptr->msic_in_progress) {
- reentrant_call = TRUE;
+ reentrant_call = true;
HGOTO_DONE(SUCCEED);
} /* end if */
- cache_ptr->msic_in_progress = TRUE;
+ cache_ptr->msic_in_progress = true;
if (write_permitted) {
- restart_scan = FALSE;
+ restart_scan = false;
initial_list_len = cache_ptr->LRU_list_len;
entry_ptr = cache_ptr->LRU_tail_ptr;
@@ -1896,11 +1896,11 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted)
#ifndef NDEBUG
++num_corked_entries;
#endif
- didnt_flush_entry = TRUE;
+ didnt_flush_entry = true;
}
else if ((entry_ptr->type->id != H5AC_EPOCH_MARKER_ID) && !entry_ptr->flush_in_progress &&
!entry_ptr->prefetched_dirty) {
- didnt_flush_entry = FALSE;
+ didnt_flush_entry = false;
if (entry_ptr->is_dirty) {
#if H5C_COLLECT_CACHE_STATS
if ((cache_ptr->index_size + space_needed) > cache_ptr->max_cache_size)
@@ -1924,7 +1924,7 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted)
if ((cache_ptr->entries_removed_counter > 1) ||
(cache_ptr->last_entry_removed_ptr == prev_ptr))
- restart_scan = TRUE;
+ restart_scan = true;
}
else if ((cache_ptr->index_size + space_needed) > cache_ptr->max_cache_size
#ifdef H5_HAVE_PARALLEL
@@ -1945,7 +1945,7 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted)
#if H5C_COLLECT_CACHE_STATS
clean_entries_skipped++;
#endif /* H5C_COLLECT_CACHE_STATS */
- didnt_flush_entry = TRUE;
+ didnt_flush_entry = true;
}
#if H5C_COLLECT_CACHE_STATS
@@ -1958,7 +1958,7 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted)
* of being flushed, and entries marked as prefetched_dirty
* (occurs in the R/O case only).
*/
- didnt_flush_entry = TRUE;
+ didnt_flush_entry = true;
#if H5C_COLLECT_CACHE_STATS
if (entry_ptr->prefetched_dirty)
@@ -1980,7 +1980,7 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted)
/* something has happened to the LRU -- start over
* from the tail.
*/
- restart_scan = FALSE;
+ restart_scan = false;
entry_ptr = cache_ptr->LRU_tail_ptr;
H5C__UPDATE_STATS_FOR_LRU_SCAN_RESTART(cache_ptr);
}
@@ -2074,7 +2074,7 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted)
/* Sanity checks */
assert(cache_ptr->msic_in_progress);
if (!reentrant_call)
- cache_ptr->msic_in_progress = FALSE;
+ cache_ptr->msic_in_progress = false;
assert((!reentrant_call) || (cache_ptr->msic_in_progress));
FUNC_LEAVE_NOAPI(ret_value)
@@ -2187,14 +2187,14 @@ H5C__serialize_cache(H5F_t *f)
} /* end block */
#endif
- /* set cache_ptr->serialization_in_progress to TRUE, and back
- * to FALSE at the end of the function. Must maintain this flag
+ /* set cache_ptr->serialization_in_progress to true, and back
+ * to false at the end of the function. Must maintain this flag
* to support H5C_get_serialization_in_progress(), which is in
* turn required to support sanity checking in some cache
* clients.
*/
assert(!cache_ptr->serialization_in_progress);
- cache_ptr->serialization_in_progress = TRUE;
+ cache_ptr->serialization_in_progress = true;
/* Serialize each ring, starting from the outermost ring and
* working inward.
@@ -2253,7 +2253,7 @@ H5C__serialize_cache(H5F_t *f)
#endif
done:
- cache_ptr->serialization_in_progress = FALSE;
+ cache_ptr->serialization_in_progress = false;
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__serialize_cache() */
@@ -2286,7 +2286,7 @@ H5C__serialize_cache(H5F_t *f)
static herr_t
H5C__serialize_ring(H5F_t *f, H5C_ring_t ring)
{
- hbool_t done = FALSE;
+ bool done = false;
H5C_t *cache_ptr;
H5C_cache_entry_t *entry_ptr;
herr_t ret_value = SUCCEED;
@@ -2387,7 +2387,7 @@ H5C__serialize_ring(H5F_t *f, H5C_ring_t ring)
cache_ptr->entries_inserted_counter = 0;
cache_ptr->entries_relocated_counter = 0;
- done = TRUE; /* set to FALSE if any activity in inner loop */
+ done = true; /* set to false if any activity in inner loop */
entry_ptr = cache_ptr->il_head;
while (entry_ptr != NULL) {
/* Verify that either the entry is already serialized, or
@@ -2403,7 +2403,7 @@ H5C__serialize_ring(H5F_t *f, H5C_ring_t ring)
* ring that is not marked flush me last, we are not done.
*/
if (!entry_ptr->image_up_to_date)
- done = FALSE;
+ done = false;
/* Serialize the entry if its image is not up to date
* and it has no unserialized flush dependency children.
diff --git a/src/H5Clog.c b/src/H5Clog.c
index dfbc6998aab..255b28f25e7 100644
--- a/src/H5Clog.c
+++ b/src/H5Clog.c
@@ -72,7 +72,7 @@
*-------------------------------------------------------------------------
*/
herr_t
-H5C_log_set_up(H5C_t *cache, const char log_location[], H5C_log_style_t style, hbool_t start_immediately)
+H5C_log_set_up(H5C_t *cache, const char log_location[], H5C_log_style_t style, bool start_immediately)
{
int mpi_rank = -1; /* -1 indicates serial (no MPI rank) */
herr_t ret_value = SUCCEED; /* Return value */
@@ -108,7 +108,7 @@ H5C_log_set_up(H5C_t *cache, const char log_location[], H5C_log_style_t style, h
HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unknown logging style");
/* Set logging flags */
- cache->log_info->enabled = TRUE;
+ cache->log_info->enabled = true;
/* Start logging if requested */
if (start_immediately)
@@ -140,7 +140,7 @@ H5C_log_tear_down(H5C_t *cache)
assert(cache);
/* Check logging flags */
- if (FALSE == cache->log_info->enabled)
+ if (false == cache->log_info->enabled)
HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "logging not enabled");
/* Stop logging if that's going on */
@@ -154,7 +154,7 @@ H5C_log_tear_down(H5C_t *cache)
HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific tear down call failed");
/* Unset logging flags */
- cache->log_info->enabled = FALSE;
+ cache->log_info->enabled = false;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -180,7 +180,7 @@ H5C_start_logging(H5C_t *cache)
assert(cache);
/* Check logging flags */
- if (FALSE == cache->log_info->enabled)
+ if (false == cache->log_info->enabled)
HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "logging not enabled");
/* Start logging */
@@ -189,7 +189,7 @@ H5C_start_logging(H5C_t *cache)
HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific start call failed");
/* Set logging flags */
- cache->log_info->logging = TRUE;
+ cache->log_info->logging = true;
/* Write a log message */
if (cache->log_info->cls->write_start_log_msg)
@@ -220,9 +220,9 @@ H5C_stop_logging(H5C_t *cache)
assert(cache);
/* Check logging flags */
- if (FALSE == cache->log_info->enabled)
+ if (false == cache->log_info->enabled)
HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "logging not enabled");
- if (FALSE == cache->log_info->logging)
+ if (false == cache->log_info->logging)
HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "logging not in progress");
/* Write a log message */
@@ -236,7 +236,7 @@ H5C_stop_logging(H5C_t *cache)
HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific stop call failed");
/* Set logging flags */
- cache->log_info->logging = FALSE;
+ cache->log_info->logging = false;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -253,7 +253,7 @@ H5C_stop_logging(H5C_t *cache)
*-------------------------------------------------------------------------
*/
herr_t
-H5C_get_logging_status(const H5C_t *cache, hbool_t *is_enabled, hbool_t *is_currently_logging)
+H5C_get_logging_status(const H5C_t *cache, bool *is_enabled, bool *is_currently_logging)
{
FUNC_ENTER_NOAPI_NOERR
diff --git a/src/H5Clog.h b/src/H5Clog.h
index b8ea5eda3db..eb74a339900 100644
--- a/src/H5Clog.h
+++ b/src/H5Clog.h
@@ -78,8 +78,8 @@ typedef struct H5C_log_class_t {
/* Logging information */
struct H5C_log_info_t {
- hbool_t enabled; /* Was the logging set up? */
- hbool_t logging; /* Are we currently logging? */
+ bool enabled; /* Was the logging set up? */
+ bool logging; /* Are we currently logging? */
const H5C_log_class_t *cls; /* Callbacks for writing log messages */
void *udata; /* Log-specific data */
};
@@ -92,7 +92,7 @@ struct H5C_log_info_t {
/* Package Private Prototypes */
/******************************/
H5_DLL herr_t H5C_log_set_up(H5C_t *cache, const char log_location[], H5C_log_style_t style,
- hbool_t start_immediately);
+ bool start_immediately);
H5_DLL herr_t H5C_log_tear_down(H5C_t *cache);
H5_DLL herr_t H5C_log_write_create_cache_msg(H5C_t *cache, herr_t fxn_ret_value);
diff --git a/src/H5Clog_json.c b/src/H5Clog_json.c
index 52154d30dec..548e7b83d2e 100644
--- a/src/H5Clog_json.c
+++ b/src/H5Clog_json.c
@@ -168,7 +168,7 @@ H5C__json_write_log_message(H5C_log_json_udata_t *json_udata)
assert(json_udata->message);
/* Write the log message and flush */
- n_chars = HDstrlen(json_udata->message);
+ n_chars = strlen(json_udata->message);
if ((int)n_chars != fprintf(json_udata->outfile, "%s", json_udata->message))
HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "error writing log message");
memset((void *)(json_udata->message), 0, (size_t)(n_chars * sizeof(char)));
@@ -231,16 +231,16 @@ H5C__log_json_set_up(H5C_log_info_t *log_info, const char log_location[], int mp
*
* allocation size = "RANK_" + + dot + + \0
*/
- n_chars = 5 + 39 + 1 + HDstrlen(log_location) + 1;
+ n_chars = 5 + 39 + 1 + strlen(log_location) + 1;
if (NULL == (file_name = (char *)H5MM_calloc(n_chars * sizeof(char))))
HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL,
"can't allocate memory for mdc log file name manipulation");
/* Add the rank to the log file name when MPI is in use */
if (-1 == mpi_rank)
- HDsnprintf(file_name, n_chars, "%s", log_location);
+ snprintf(file_name, n_chars, "%s", log_location);
else
- HDsnprintf(file_name, n_chars, "RANK_%d.%s", mpi_rank, log_location);
+ snprintf(file_name, n_chars, "RANK_%d.%s", mpi_rank, log_location);
/* Open log file and set it to be unbuffered */
if (NULL == (json_udata->outfile = fopen(file_name, "w")))
@@ -331,7 +331,7 @@ H5C__json_write_start_log_msg(void *udata)
assert(json_udata->message);
/* Create the log message string (opens the JSON array) */
- HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
+ snprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
{\n\
\"HDF5 metadata cache log messages\" : [\n\
{\
@@ -339,7 +339,7 @@ H5C__json_write_start_log_msg(void *udata)
\"action\":\"logging start\"\
},\n\
",
- (long long)HDtime(NULL));
+ (long long)HDtime(NULL));
/* Write the log message to the file */
if (H5C__json_write_log_message(json_udata) < 0)
@@ -371,14 +371,14 @@ H5C__json_write_stop_log_msg(void *udata)
assert(json_udata->message);
/* Create the log message string (closes the JSON array) */
- HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
+ snprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
{\
\"timestamp\":%lld,\
\"action\":\"logging stop\"\
}\n\
]}\n\
",
- (long long)HDtime(NULL));
+ (long long)HDtime(NULL));
/* Write the log message to the file */
if (H5C__json_write_log_message(json_udata) < 0)
@@ -410,14 +410,14 @@ H5C__json_write_create_cache_log_msg(void *udata, herr_t fxn_ret_value)
assert(json_udata->message);
/* Create the log message string */
- HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
+ snprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
{\
\"timestamp\":%lld,\
\"action\":\"create\",\
\"returned\":%d\
},\n\
",
- (long long)HDtime(NULL), (int)fxn_ret_value);
+ (long long)HDtime(NULL), (int)fxn_ret_value);
/* Write the log message to the file */
if (H5C__json_write_log_message(json_udata) < 0)
@@ -449,13 +449,13 @@ H5C__json_write_destroy_cache_log_msg(void *udata)
assert(json_udata->message);
/* Create the log message string */
- HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
+ snprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
{\
\"timestamp\":%lld,\
\"action\":\"destroy\"\
},\n\
",
- (long long)HDtime(NULL));
+ (long long)HDtime(NULL));
/* Write the log message to the file */
if (H5C__json_write_log_message(json_udata) < 0)
@@ -487,14 +487,14 @@ H5C__json_write_evict_cache_log_msg(void *udata, herr_t fxn_ret_value)
assert(json_udata->message);
/* Create the log message string */
- HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
+ snprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
{\
\"timestamp\":%lld,\
\"action\":\"evict\",\
\"returned\":%d\
},\n\
",
- (long long)HDtime(NULL), (int)fxn_ret_value);
+ (long long)HDtime(NULL), (int)fxn_ret_value);
/* Write the log message to the file */
if (H5C__json_write_log_message(json_udata) < 0)
@@ -526,7 +526,7 @@ H5C__json_write_expunge_entry_log_msg(void *udata, haddr_t address, int type_id,
assert(json_udata->message);
/* Create the log message string */
- HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
+ snprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
{\
\"timestamp\":%lld,\
\"action\":\"expunge\",\
@@ -535,7 +535,7 @@ H5C__json_write_expunge_entry_log_msg(void *udata, haddr_t address, int type_id,
\"returned\":%d\
},\n\
",
- (long long)HDtime(NULL), (unsigned long)address, (int)type_id, (int)fxn_ret_value);
+ (long long)HDtime(NULL), (unsigned long)address, (int)type_id, (int)fxn_ret_value);
/* Write the log message to the file */
if (H5C__json_write_log_message(json_udata) < 0)
@@ -567,14 +567,14 @@ H5C__json_write_flush_cache_log_msg(void *udata, herr_t fxn_ret_value)
assert(json_udata->message);
/* Create the log message string */
- HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
+ snprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
{\
\"timestamp\":%lld,\
\"action\":\"flush\",\
\"returned\":%d\
},\n\
",
- (long long)HDtime(NULL), (int)fxn_ret_value);
+ (long long)HDtime(NULL), (int)fxn_ret_value);
/* Write the log message to the file */
if (H5C__json_write_log_message(json_udata) < 0)
@@ -607,7 +607,7 @@ H5C__json_write_insert_entry_log_msg(void *udata, haddr_t address, int type_id,
assert(json_udata->message);
/* Create the log message string */
- HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
+ snprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
{\
\"timestamp\":%lld,\
\"action\":\"insert\",\
@@ -618,8 +618,7 @@ H5C__json_write_insert_entry_log_msg(void *udata, haddr_t address, int type_id,
\"returned\":%d\
},\n\
",
- (long long)HDtime(NULL), (unsigned long)address, type_id, flags, (int)size,
- (int)fxn_ret_value);
+ (long long)HDtime(NULL), (unsigned long)address, type_id, flags, (int)size, (int)fxn_ret_value);
/* Write the log message to the file */
if (H5C__json_write_log_message(json_udata) < 0)
@@ -652,7 +651,7 @@ H5C__json_write_mark_entry_dirty_log_msg(void *udata, const H5C_cache_entry_t *e
assert(entry);
/* Create the log message string */
- HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
+ snprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
{\
\"timestamp\":%lld,\
\"action\":\"dirty\",\
@@ -660,7 +659,7 @@ H5C__json_write_mark_entry_dirty_log_msg(void *udata, const H5C_cache_entry_t *e
\"returned\":%d\
},\n\
",
- (long long)HDtime(NULL), (unsigned long)entry->addr, (int)fxn_ret_value);
+ (long long)HDtime(NULL), (unsigned long)entry->addr, (int)fxn_ret_value);
/* Write the log message to the file */
if (H5C__json_write_log_message(json_udata) < 0)
@@ -693,7 +692,7 @@ H5C__json_write_mark_entry_clean_log_msg(void *udata, const H5C_cache_entry_t *e
assert(entry);
/* Create the log message string */
- HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
+ snprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
{\
\"timestamp\":%lld,\
\"action\":\"clean\",\
@@ -701,7 +700,7 @@ H5C__json_write_mark_entry_clean_log_msg(void *udata, const H5C_cache_entry_t *e
\"returned\":%d\
},\n\
",
- (long long)HDtime(NULL), (unsigned long)entry->addr, (int)fxn_ret_value);
+ (long long)HDtime(NULL), (unsigned long)entry->addr, (int)fxn_ret_value);
/* Write the log message to the file */
if (H5C__json_write_log_message(json_udata) < 0)
@@ -735,7 +734,7 @@ H5C__json_write_mark_unserialized_entry_log_msg(void *udata, const H5C_cache_ent
assert(entry);
/* Create the log message string */
- HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
+ snprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
{\
\"timestamp\":%lld,\
\"action\":\"unserialized\",\
@@ -743,7 +742,7 @@ H5C__json_write_mark_unserialized_entry_log_msg(void *udata, const H5C_cache_ent
\"returned\":%d\
},\n\
",
- (long long)HDtime(NULL), (unsigned long)entry->addr, (int)fxn_ret_value);
+ (long long)HDtime(NULL), (unsigned long)entry->addr, (int)fxn_ret_value);
/* Write the log message to the file */
if (H5C__json_write_log_message(json_udata) < 0)
@@ -777,7 +776,7 @@ H5C__json_write_mark_serialized_entry_log_msg(void *udata, const H5C_cache_entry
assert(entry);
/* Create the log message string */
- HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
+ snprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
{\
\"timestamp\":%lld,\
\"action\":\"serialized\",\
@@ -785,7 +784,7 @@ H5C__json_write_mark_serialized_entry_log_msg(void *udata, const H5C_cache_entry
\"returned\":%d\
},\n\
",
- (long long)HDtime(NULL), (unsigned long)entry->addr, (int)fxn_ret_value);
+ (long long)HDtime(NULL), (unsigned long)entry->addr, (int)fxn_ret_value);
/* Write the log message to the file */
if (H5C__json_write_log_message(json_udata) < 0)
@@ -818,7 +817,7 @@ H5C__json_write_move_entry_log_msg(void *udata, haddr_t old_addr, haddr_t new_ad
assert(json_udata->message);
/* Create the log message string */
- HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
+ snprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
{\
\"timestamp\":%lld,\
\"action\":\"move\",\
@@ -828,8 +827,8 @@ H5C__json_write_move_entry_log_msg(void *udata, haddr_t old_addr, haddr_t new_ad
\"returned\":%d\
},\n\
",
- (long long)HDtime(NULL), (unsigned long)old_addr, (unsigned long)new_addr, type_id,
- (int)fxn_ret_value);
+ (long long)HDtime(NULL), (unsigned long)old_addr, (unsigned long)new_addr, type_id,
+ (int)fxn_ret_value);
/* Write the log message to the file */
if (H5C__json_write_log_message(json_udata) < 0)
@@ -862,7 +861,7 @@ H5C__json_write_pin_entry_log_msg(void *udata, const H5C_cache_entry_t *entry, h
assert(entry);
/* Create the log message string */
- HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
+ snprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
{\
\"timestamp\":%lld,\
\"action\":\"pin\",\
@@ -870,7 +869,7 @@ H5C__json_write_pin_entry_log_msg(void *udata, const H5C_cache_entry_t *entry, h
\"returned\":%d\
},\n\
",
- (long long)HDtime(NULL), (unsigned long)entry->addr, (int)fxn_ret_value);
+ (long long)HDtime(NULL), (unsigned long)entry->addr, (int)fxn_ret_value);
/* Write the log message to the file */
if (H5C__json_write_log_message(json_udata) < 0)
@@ -906,7 +905,7 @@ H5C__json_write_create_fd_log_msg(void *udata, const H5C_cache_entry_t *parent,
assert(child);
/* Create the log message string */
- HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
+ snprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
{\
\"timestamp\":%lld,\
\"action\":\"create_fd\",\
@@ -915,8 +914,8 @@ H5C__json_write_create_fd_log_msg(void *udata, const H5C_cache_entry_t *parent,
\"returned\":%d\
},\n\
",
- (long long)HDtime(NULL), (unsigned long)parent->addr, (unsigned long)child->addr,
- (int)fxn_ret_value);
+ (long long)HDtime(NULL), (unsigned long)parent->addr, (unsigned long)child->addr,
+ (int)fxn_ret_value);
/* Write the log message to the file */
if (H5C__json_write_log_message(json_udata) < 0)
@@ -951,12 +950,12 @@ H5C__json_write_protect_entry_log_msg(void *udata, const H5C_cache_entry_t *entr
assert(entry);
if (H5C__READ_ONLY_FLAG == flags)
- HDstrcpy(rw_s, "READ");
+ strcpy(rw_s, "READ");
else
- HDstrcpy(rw_s, "WRITE");
+ strcpy(rw_s, "WRITE");
/* Create the log message string */
- HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
+ snprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
{\
\"timestamp\":%lld,\
\"action\":\"protect\",\
@@ -967,8 +966,8 @@ H5C__json_write_protect_entry_log_msg(void *udata, const H5C_cache_entry_t *entr
\"returned\":%d\
},\n\
",
- (long long)HDtime(NULL), (unsigned long)entry->addr, type_id, rw_s, (int)entry->size,
- (int)fxn_ret_value);
+ (long long)HDtime(NULL), (unsigned long)entry->addr, type_id, rw_s, (int)entry->size,
+ (int)fxn_ret_value);
/* Write the log message to the file */
if (H5C__json_write_log_message(json_udata) < 0)
@@ -1002,7 +1001,7 @@ H5C__json_write_resize_entry_log_msg(void *udata, const H5C_cache_entry_t *entry
assert(entry);
/* Create the log message string */
- HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
+ snprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
{\
\"timestamp\":%lld,\
\"action\":\"resize\",\
@@ -1011,7 +1010,7 @@ H5C__json_write_resize_entry_log_msg(void *udata, const H5C_cache_entry_t *entry
\"returned\":%d\
},\n\
",
- (long long)HDtime(NULL), (unsigned long)entry->addr, (int)new_size, (int)fxn_ret_value);
+ (long long)HDtime(NULL), (unsigned long)entry->addr, (int)new_size, (int)fxn_ret_value);
/* Write the log message to the file */
if (H5C__json_write_log_message(json_udata) < 0)
@@ -1044,7 +1043,7 @@ H5C__json_write_unpin_entry_log_msg(void *udata, const H5C_cache_entry_t *entry,
assert(entry);
/* Create the log message string */
- HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
+ snprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
{\
\"timestamp\":%lld,\
\"action\":\"unpin\",\
@@ -1052,7 +1051,7 @@ H5C__json_write_unpin_entry_log_msg(void *udata, const H5C_cache_entry_t *entry,
\"returned\":%d\
},\n\
",
- (long long)HDtime(NULL), (unsigned long)entry->addr, (int)fxn_ret_value);
+ (long long)HDtime(NULL), (unsigned long)entry->addr, (int)fxn_ret_value);
/* Write the log message to the file */
if (H5C__json_write_log_message(json_udata) < 0)
@@ -1088,7 +1087,7 @@ H5C__json_write_destroy_fd_log_msg(void *udata, const H5C_cache_entry_t *parent,
assert(child);
/* Create the log message string */
- HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
+ snprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
{\
\"timestamp\":%lld,\
\"action\":\"destroy_fd\",\
@@ -1097,8 +1096,8 @@ H5C__json_write_destroy_fd_log_msg(void *udata, const H5C_cache_entry_t *parent,
\"returned\":%d\
},\n\
",
- (long long)HDtime(NULL), (unsigned long)parent->addr, (unsigned long)child->addr,
- (int)fxn_ret_value);
+ (long long)HDtime(NULL), (unsigned long)parent->addr, (unsigned long)child->addr,
+ (int)fxn_ret_value);
/* Write the log message to the file */
if (H5C__json_write_log_message(json_udata) < 0)
@@ -1131,7 +1130,7 @@ H5C__json_write_unprotect_entry_log_msg(void *udata, haddr_t address, int type_i
assert(json_udata->message);
/* Create the log message string */
- HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
+ snprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
{\
\"timestamp\":%lld,\
\"action\":\"unprotect\",\
@@ -1141,7 +1140,7 @@ H5C__json_write_unprotect_entry_log_msg(void *udata, haddr_t address, int type_i
\"returned\":%d\
},\n\
",
- (long long)HDtime(NULL), (unsigned long)address, type_id, flags, (int)fxn_ret_value);
+ (long long)HDtime(NULL), (unsigned long)address, type_id, flags, (int)fxn_ret_value);
/* Write the log message to the file */
if (H5C__json_write_log_message(json_udata) < 0)
@@ -1175,14 +1174,14 @@ H5C__json_write_set_cache_config_log_msg(void *udata, const H5AC_cache_config_t
assert(config);
/* Create the log message string */
- HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
+ snprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
{\
\"timestamp\":%lld,\
\"action\":\"set_config\",\
\"returned\":%d\
},\n\
",
- (long long)HDtime(NULL), (int)fxn_ret_value);
+ (long long)HDtime(NULL), (int)fxn_ret_value);
/* Write the log message to the file */
if (H5C__json_write_log_message(json_udata) < 0)
@@ -1215,7 +1214,7 @@ H5C__json_write_remove_entry_log_msg(void *udata, const H5C_cache_entry_t *entry
assert(entry);
/* Create the log message string */
- HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
+ snprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
{\
\"timestamp\":%lld,\
\"action\":\"remove\",\
@@ -1223,7 +1222,7 @@ H5C__json_write_remove_entry_log_msg(void *udata, const H5C_cache_entry_t *entry
\"returned\":%d\
},\n\
",
- (long long)HDtime(NULL), (unsigned long)entry->addr, (int)fxn_ret_value);
+ (long long)HDtime(NULL), (unsigned long)entry->addr, (int)fxn_ret_value);
/* Write the log message to the file */
if (H5C__json_write_log_message(json_udata) < 0)
diff --git a/src/H5Clog_trace.c b/src/H5Clog_trace.c
index ffa415fdb71..6b31d988f8e 100644
--- a/src/H5Clog_trace.c
+++ b/src/H5Clog_trace.c
@@ -163,7 +163,7 @@ H5C__trace_write_log_message(H5C_log_trace_udata_t *trace_udata)
assert(trace_udata->message);
/* Write the log message and flush */
- n_chars = HDstrlen(trace_udata->message);
+ n_chars = strlen(trace_udata->message);
if ((int)n_chars != fprintf(trace_udata->outfile, "%s", trace_udata->message))
HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "error writing log message");
memset((void *)(trace_udata->message), 0, (size_t)(n_chars * sizeof(char)));
@@ -226,16 +226,16 @@ H5C__log_trace_set_up(H5C_log_info_t *log_info, const char log_location[], int m
*
* allocation size = + dot + + \0
*/
- n_chars = HDstrlen(log_location) + 1 + 39 + 1;
+ n_chars = strlen(log_location) + 1 + 39 + 1;
if (NULL == (file_name = (char *)H5MM_calloc(n_chars * sizeof(char))))
HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL,
"can't allocate memory for mdc log file name manipulation");
/* Add the rank to the log file name when MPI is in use */
if (-1 == mpi_rank)
- HDsnprintf(file_name, n_chars, "%s", log_location);
+ snprintf(file_name, n_chars, "%s", log_location);
else
- HDsnprintf(file_name, n_chars, "%s.%d", log_location, mpi_rank);
+ snprintf(file_name, n_chars, "%s.%d", log_location, mpi_rank);
/* Open log file and set it to be unbuffered */
if (NULL == (trace_udata->outfile = fopen(file_name, "w")))
@@ -329,8 +329,8 @@ H5C__trace_write_expunge_entry_log_msg(void *udata, haddr_t address, int type_id
assert(trace_udata->message);
/* Create the log message string */
- HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_expunge_entry 0x%lx %d %d\n",
- (unsigned long)address, type_id, (int)fxn_ret_value);
+ snprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_expunge_entry 0x%lx %d %d\n",
+ (unsigned long)address, type_id, (int)fxn_ret_value);
/* Write the log message to the file */
if (H5C__trace_write_log_message(trace_udata) < 0)
@@ -362,7 +362,7 @@ H5C__trace_write_flush_cache_log_msg(void *udata, herr_t fxn_ret_value)
assert(trace_udata->message);
/* Create the log message string */
- HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_flush %d\n", (int)fxn_ret_value);
+ snprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_flush %d\n", (int)fxn_ret_value);
/* Write the log message to the file */
if (H5C__trace_write_log_message(trace_udata) < 0)
@@ -395,8 +395,8 @@ H5C__trace_write_insert_entry_log_msg(void *udata, haddr_t address, int type_id,
assert(trace_udata->message);
/* Create the log message string */
- HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_insert_entry 0x%lx %d 0x%x %d %d\n",
- (unsigned long)address, type_id, flags, (int)size, (int)fxn_ret_value);
+ snprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_insert_entry 0x%lx %d 0x%x %d %d\n",
+ (unsigned long)address, type_id, flags, (int)size, (int)fxn_ret_value);
/* Write the log message to the file */
if (H5C__trace_write_log_message(trace_udata) < 0)
@@ -429,8 +429,8 @@ H5C__trace_write_mark_entry_dirty_log_msg(void *udata, const H5C_cache_entry_t *
assert(entry);
/* Create the log message string */
- HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_mark_entry_dirty 0x%lx %d\n",
- (unsigned long)(entry->addr), (int)fxn_ret_value);
+ snprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_mark_entry_dirty 0x%lx %d\n",
+ (unsigned long)(entry->addr), (int)fxn_ret_value);
/* Write the log message to the file */
if (H5C__trace_write_log_message(trace_udata) < 0)
@@ -463,8 +463,8 @@ H5C__trace_write_mark_entry_clean_log_msg(void *udata, const H5C_cache_entry_t *
assert(entry);
/* Create the log message string */
- HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_mark_entry_clean 0x%lx %d\n",
- (unsigned long)(entry->addr), (int)fxn_ret_value);
+ snprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_mark_entry_clean 0x%lx %d\n",
+ (unsigned long)(entry->addr), (int)fxn_ret_value);
/* Write the log message to the file */
if (H5C__trace_write_log_message(trace_udata) < 0)
@@ -498,8 +498,8 @@ H5C__trace_write_mark_unserialized_entry_log_msg(void *udata, const H5C_cache_en
assert(entry);
/* Create the log message string */
- HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_mark_entry_unserialized 0x%lx %d\n",
- (unsigned long)(entry->addr), (int)fxn_ret_value);
+ snprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_mark_entry_unserialized 0x%lx %d\n",
+ (unsigned long)(entry->addr), (int)fxn_ret_value);
/* Write the log message to the file */
if (H5C__trace_write_log_message(trace_udata) < 0)
@@ -533,8 +533,8 @@ H5C__trace_write_mark_serialized_entry_log_msg(void *udata, const H5C_cache_entr
assert(entry);
/* Create the log message string */
- HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_mark_entry_serialized 0x%lx %d\n",
- (unsigned long)(entry->addr), (int)fxn_ret_value);
+ snprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_mark_entry_serialized 0x%lx %d\n",
+ (unsigned long)(entry->addr), (int)fxn_ret_value);
/* Write the log message to the file */
if (H5C__trace_write_log_message(trace_udata) < 0)
@@ -567,8 +567,8 @@ H5C__trace_write_move_entry_log_msg(void *udata, haddr_t old_addr, haddr_t new_a
assert(trace_udata->message);
/* Create the log message string */
- HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_move_entry 0x%lx 0x%lx %d %d\n",
- (unsigned long)old_addr, (unsigned long)new_addr, type_id, (int)fxn_ret_value);
+ snprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_move_entry 0x%lx 0x%lx %d %d\n",
+ (unsigned long)old_addr, (unsigned long)new_addr, type_id, (int)fxn_ret_value);
/* Write the log message to the file */
if (H5C__trace_write_log_message(trace_udata) < 0)
@@ -601,8 +601,8 @@ H5C__trace_write_pin_entry_log_msg(void *udata, const H5C_cache_entry_t *entry,
assert(entry);
/* Create the log message string */
- HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_pin_protected_entry 0x%lx %d\n",
- (unsigned long)(entry->addr), (int)fxn_ret_value);
+ snprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_pin_protected_entry 0x%lx %d\n",
+ (unsigned long)(entry->addr), (int)fxn_ret_value);
/* Write the log message to the file */
if (H5C__trace_write_log_message(trace_udata) < 0)
@@ -638,9 +638,9 @@ H5C__trace_write_create_fd_log_msg(void *udata, const H5C_cache_entry_t *parent,
assert(child);
/* Create the log message string */
- HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE,
- "H5AC_create_flush_dependency 0x%lx 0x%lx %d\n", (unsigned long)(parent->addr),
- (unsigned long)(child->addr), (int)fxn_ret_value);
+ snprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE,
+ "H5AC_create_flush_dependency 0x%lx 0x%lx %d\n", (unsigned long)(parent->addr),
+ (unsigned long)(child->addr), (int)fxn_ret_value);
/* Write the log message to the file */
if (H5C__trace_write_log_message(trace_udata) < 0)
@@ -674,8 +674,8 @@ H5C__trace_write_protect_entry_log_msg(void *udata, const H5C_cache_entry_t *ent
assert(entry);
/* Create the log message string */
- HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_protect 0x%lx %d 0x%x %d %d\n",
- (unsigned long)(entry->addr), type_id, flags, (int)(entry->size), (int)fxn_ret_value);
+ snprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_protect 0x%lx %d 0x%x %d %d\n",
+ (unsigned long)(entry->addr), type_id, flags, (int)(entry->size), (int)fxn_ret_value);
/* Write the log message to the file */
if (H5C__trace_write_log_message(trace_udata) < 0)
@@ -709,8 +709,8 @@ H5C__trace_write_resize_entry_log_msg(void *udata, const H5C_cache_entry_t *entr
assert(entry);
/* Create the log message string */
- HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_resize_entry 0x%lx %d %d\n",
- (unsigned long)(entry->addr), (int)new_size, (int)fxn_ret_value);
+ snprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_resize_entry 0x%lx %d %d\n",
+ (unsigned long)(entry->addr), (int)new_size, (int)fxn_ret_value);
/* Write the log message to the file */
if (H5C__trace_write_log_message(trace_udata) < 0)
@@ -743,8 +743,8 @@ H5C__trace_write_unpin_entry_log_msg(void *udata, const H5C_cache_entry_t *entry
assert(entry);
/* Create the log message string */
- HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_unpin_entry 0x%lx %d\n",
- (unsigned long)(entry->addr), (int)fxn_ret_value);
+ snprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_unpin_entry 0x%lx %d\n",
+ (unsigned long)(entry->addr), (int)fxn_ret_value);
/* Write the log message to the file */
if (H5C__trace_write_log_message(trace_udata) < 0)
@@ -780,9 +780,9 @@ H5C__trace_write_destroy_fd_log_msg(void *udata, const H5C_cache_entry_t *parent
assert(child);
/* Create the log message string */
- HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE,
- "H5AC_destroy_flush_dependency 0x%lx 0x%lx %d\n", (unsigned long)(parent->addr),
- (unsigned long)(child->addr), (int)fxn_ret_value);
+ snprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE,
+ "H5AC_destroy_flush_dependency 0x%lx 0x%lx %d\n", (unsigned long)(parent->addr),
+ (unsigned long)(child->addr), (int)fxn_ret_value);
/* Write the log message to the file */
if (H5C__trace_write_log_message(trace_udata) < 0)
@@ -815,8 +815,8 @@ H5C__trace_write_unprotect_entry_log_msg(void *udata, haddr_t address, int type_
assert(trace_udata->message);
/* Create the log message string */
- HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_unprotect 0x%lx %d 0x%x %d\n",
- (unsigned long)(address), type_id, flags, (int)fxn_ret_value);
+ snprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_unprotect 0x%lx %d 0x%x %d\n",
+ (unsigned long)(address), type_id, flags, (int)fxn_ret_value);
/* Write the log message to the file */
if (H5C__trace_write_log_message(trace_udata) < 0)
@@ -850,20 +850,19 @@ H5C__trace_write_set_cache_config_log_msg(void *udata, const H5AC_cache_config_t
assert(config);
/* Create the log message string */
- HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE,
- "H5AC_set_cache_auto_resize_config %d %d %d %d \"%s\" %d %d %d %f %d %d %ld %d %f %f %d %f %f "
- "%d %d %d %f %f %d %d %d %d %f %zu %d %d\n",
- config->version, (int)(config->rpt_fcn_enabled), (int)(config->open_trace_file),
- (int)(config->close_trace_file), config->trace_file_name, (int)(config->evictions_enabled),
- (int)(config->set_initial_size), (int)(config->initial_size), config->min_clean_fraction,
- (int)(config->max_size), (int)(config->min_size), config->epoch_length,
- (int)(config->incr_mode), config->lower_hr_threshold, config->increment,
- (int)(config->flash_incr_mode), config->flash_multiple, config->flash_threshold,
- (int)(config->apply_max_increment), (int)(config->max_increment), (int)(config->decr_mode),
- config->upper_hr_threshold, config->decrement, (int)(config->apply_max_decrement),
- (int)(config->max_decrement), config->epochs_before_eviction,
- (int)(config->apply_empty_reserve), config->empty_reserve, config->dirty_bytes_threshold,
- config->metadata_write_strategy, (int)fxn_ret_value);
+ snprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE,
+ "H5AC_set_cache_auto_resize_config %d %d %d %d \"%s\" %d %d %d %f %d %d %ld %d %f %f %d %f %f "
+ "%d %d %d %f %f %d %d %d %d %f %zu %d %d\n",
+ config->version, (int)(config->rpt_fcn_enabled), (int)(config->open_trace_file),
+ (int)(config->close_trace_file), config->trace_file_name, (int)(config->evictions_enabled),
+ (int)(config->set_initial_size), (int)(config->initial_size), config->min_clean_fraction,
+ (int)(config->max_size), (int)(config->min_size), config->epoch_length, (int)(config->incr_mode),
+ config->lower_hr_threshold, config->increment, (int)(config->flash_incr_mode),
+ config->flash_multiple, config->flash_threshold, (int)(config->apply_max_increment),
+ (int)(config->max_increment), (int)(config->decr_mode), config->upper_hr_threshold,
+ config->decrement, (int)(config->apply_max_decrement), (int)(config->max_decrement),
+ config->epochs_before_eviction, (int)(config->apply_empty_reserve), config->empty_reserve,
+ config->dirty_bytes_threshold, config->metadata_write_strategy, (int)fxn_ret_value);
/* Write the log message to the file */
if (H5C__trace_write_log_message(trace_udata) < 0)
@@ -896,8 +895,8 @@ H5C__trace_write_remove_entry_log_msg(void *udata, const H5C_cache_entry_t *entr
assert(entry);
/* Create the log message string */
- HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_remove_entry 0x%lx %d\n",
- (unsigned long)(entry->addr), (int)fxn_ret_value);
+ snprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_remove_entry 0x%lx %d\n",
+ (unsigned long)(entry->addr), (int)fxn_ret_value);
/* Write the log message to the file */
if (H5C__trace_write_log_message(trace_udata) < 0)
diff --git a/src/H5Cmpio.c b/src/H5Cmpio.c
index a7de3c83153..d7bf5b1dbda 100644
--- a/src/H5Cmpio.c
+++ b/src/H5Cmpio.c
@@ -83,7 +83,7 @@ static herr_t H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned
* system by increasing the number of processes writing to
* adjacent locations in the HDF5 file.
*
- * To attempt to minimize this, we now arange matters such
+ * To attempt to minimize this, we now arrange matters such
* that each process writes n adjacent entries in the
* candidate list, and marks all others clean. We must do
* this in such a fashion as to guarantee that each entry
@@ -194,10 +194,10 @@ H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates, ha
memset(tbl_buf, 0, sizeof(tbl_buf));
- HDsnprintf(tbl_buf, sizeof(tbl_buf), "candidate list = ");
+ snprintf(tbl_buf, sizeof(tbl_buf), "candidate list = ");
for (u = 0; u < num_candidates; u++)
- HDsprintf(&(tbl_buf[HDstrlen(tbl_buf)]), " 0x%llx", (long long)(*(candidates_list_ptr + u)));
- HDsprintf(&(tbl_buf[HDstrlen(tbl_buf)]), "\n");
+ sprintf(&(tbl_buf[strlen(tbl_buf)]), " 0x%llx", (long long)(*(candidates_list_ptr + u)));
+ sprintf(&(tbl_buf[strlen(tbl_buf)]), "\n");
fprintf(stdout, "%s", tbl_buf);
#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */
@@ -260,10 +260,10 @@ H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates, ha
#if H5C_APPLY_CANDIDATE_LIST__DEBUG
for (u = 0; u < 1024; u++)
tbl_buf[u] = '\0';
- HDsnprintf(tbl_buf, sizeof(tbl_buf), "candidate assignment table = ");
+ snprintf(tbl_buf, sizeof(tbl_buf), "candidate assignment table = ");
for (u = 0; u <= (unsigned)mpi_size; u++)
- HDsprintf(&(tbl_buf[HDstrlen(tbl_buf)]), " %u", candidate_assignment_table[u]);
- HDsprintf(&(tbl_buf[HDstrlen(tbl_buf)]), "\n");
+ sprintf(&(tbl_buf[strlen(tbl_buf)]), " %u", candidate_assignment_table[u]);
+ sprintf(&(tbl_buf[strlen(tbl_buf)]), "\n");
fprintf(stdout, "%s", tbl_buf);
fprintf(stdout, "%s:%d: flush entries [%u, %u].\n", __func__, mpi_rank, first_entry_to_flush,
@@ -315,14 +315,14 @@ H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates, ha
total_entries_to_flush++;
#endif
entries_to_flush[entry_ptr->ring]++;
- entry_ptr->flush_immediately = TRUE;
+ entry_ptr->flush_immediately = true;
} /* end if */
else {
#ifndef NDEBUG
total_entries_to_clear++;
#endif
entries_to_clear[entry_ptr->ring]++;
- entry_ptr->clear_on_unprotect = TRUE;
+ entry_ptr->clear_on_unprotect = true;
} /* end else */
/* Entries marked as collectively accessed and are in the
@@ -332,7 +332,7 @@ H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates, ha
* ranks.
*/
if (entry_ptr->coll_access) {
- entry_ptr->coll_access = FALSE;
+ entry_ptr->coll_access = false;
H5C__REMOVE_FROM_COLL_LIST(cache_ptr, entry_ptr, FAIL);
} /* end if */
} /* end for */
@@ -613,7 +613,7 @@ H5C_mark_entries_as_clean(H5F_t *f, unsigned ce_array_len, haddr_t *ce_array_ptr
H5C_t *cache_ptr;
unsigned entries_cleared;
unsigned pinned_entries_cleared;
- hbool_t progress;
+ bool progress;
unsigned entries_examined;
unsigned initial_list_len;
haddr_t addr;
@@ -688,12 +688,12 @@ H5C_mark_entries_as_clean(H5F_t *f, unsigned ce_array_len, haddr_t *ce_array_ptr
/* Make sure first that we clear the collective flag from
it so it can be cleared */
- if (TRUE == entry_ptr->coll_access) {
- entry_ptr->coll_access = FALSE;
+ if (true == entry_ptr->coll_access) {
+ entry_ptr->coll_access = false;
H5C__REMOVE_FROM_COLL_LIST(cache_ptr, entry_ptr, FAIL);
} /* end if */
- entry_ptr->clear_on_unprotect = TRUE;
+ entry_ptr->clear_on_unprotect = true;
if (entry_ptr->is_pinned)
pinned_entries_marked++;
#ifdef H5C_DO_SANITY_CHECKS
@@ -730,7 +730,7 @@ H5C_mark_entries_as_clean(H5F_t *f, unsigned ce_array_len, haddr_t *ce_array_ptr
entry_ptr = cache_ptr->LRU_tail_ptr;
while (entry_ptr != NULL && entries_examined <= initial_list_len && entries_cleared < ce_array_len) {
if (entry_ptr->clear_on_unprotect) {
- entry_ptr->clear_on_unprotect = FALSE;
+ entry_ptr->clear_on_unprotect = false;
clear_ptr = entry_ptr;
entry_ptr = entry_ptr->prev;
entries_cleared++;
@@ -753,18 +753,18 @@ H5C_mark_entries_as_clean(H5F_t *f, unsigned ce_array_len, haddr_t *ce_array_ptr
* pinned list. Must scan that also.
*/
pinned_entries_cleared = 0;
- progress = TRUE;
+ progress = true;
while ((pinned_entries_cleared < pinned_entries_marked) && progress) {
- progress = FALSE;
+ progress = false;
entry_ptr = cache_ptr->pel_head_ptr;
while (entry_ptr != NULL) {
if (entry_ptr->clear_on_unprotect && entry_ptr->flush_dep_ndirty_children == 0) {
- entry_ptr->clear_on_unprotect = FALSE;
+ entry_ptr->clear_on_unprotect = false;
clear_ptr = entry_ptr;
entry_ptr = entry_ptr->next;
entries_cleared++;
pinned_entries_cleared++;
- progress = TRUE;
+ progress = true;
if (H5C__flush_single_entry(f, clear_ptr,
(H5C__FLUSH_CLEAR_ONLY_FLAG | H5C__GENERATE_IMAGE_FLAG |
@@ -815,7 +815,7 @@ H5C_mark_entries_as_clean(H5F_t *f, unsigned ce_array_len, haddr_t *ce_array_ptr
*-------------------------------------------------------------------------
*/
herr_t
-H5C_clear_coll_entries(H5C_t *cache_ptr, hbool_t partial)
+H5C_clear_coll_entries(H5C_t *cache_ptr, bool partial)
{
uint32_t clear_cnt;
H5C_cache_entry_t *entry_ptr = NULL;
@@ -836,7 +836,7 @@ H5C_clear_coll_entries(H5C_t *cache_ptr, hbool_t partial)
assert(entry_ptr->coll_access);
/* Mark entry as independent */
- entry_ptr->coll_access = FALSE;
+ entry_ptr->coll_access = false;
H5C__REMOVE_FROM_COLL_LIST(cache_ptr, entry_ptr, FAIL);
/* Decrement entry count */
@@ -1065,7 +1065,7 @@ H5C__flush_candidate_entries(H5F_t *f, unsigned entries_to_flush[H5C_RING_NTYPES
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry");
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
- cache_ptr->flush_in_progress = TRUE;
+ cache_ptr->flush_in_progress = true;
/* flush each ring, starting from the outermost ring and
* working inward.
@@ -1079,7 +1079,7 @@ H5C__flush_candidate_entries(H5F_t *f, unsigned entries_to_flush[H5C_RING_NTYPES
} /* end while */
done:
- cache_ptr->flush_in_progress = FALSE;
+ cache_ptr->flush_in_progress = false;
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__flush_candidate_entries() */
@@ -1121,8 +1121,8 @@ static herr_t
H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flush, unsigned entries_to_clear)
{
H5C_t *cache_ptr;
- hbool_t progress;
- hbool_t restart_scan = FALSE;
+ bool progress;
+ bool restart_scan = false;
unsigned entries_flushed = 0;
unsigned entries_cleared = 0;
#ifdef H5C_DO_SANITY_CHECKS
@@ -1167,11 +1167,11 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu
*
* It is possible that this will change -- hence the assertion.
*/
- restart_scan = FALSE;
+ restart_scan = false;
entry_ptr = cache_ptr->LRU_tail_ptr;
while (((entries_flushed < entries_to_flush) || (entries_cleared < entries_to_clear)) &&
(entry_ptr != NULL)) {
- hbool_t prev_is_dirty = FALSE;
+ bool prev_is_dirty = false;
H5C_cache_entry_t *next_ptr;
/* Entries in the LRU must not have flush dependency children */
@@ -1195,7 +1195,7 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu
next_ptr = entry_ptr->next;
/* Reset entry flag */
- entry_ptr->clear_on_unprotect = FALSE;
+ entry_ptr->clear_on_unprotect = false;
entries_cleared++;
} /* end if */
else if (entry_ptr->flush_immediately) {
@@ -1209,7 +1209,7 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu
next_ptr = entry_ptr->next;
/* Reset entry flag */
- entry_ptr->flush_immediately = FALSE;
+ entry_ptr->flush_immediately = false;
entries_flushed++;
} /* end else-if */
else {
@@ -1247,7 +1247,7 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "can't flush entry");
if (cache_ptr->entries_removed_counter != 0 || cache_ptr->last_entry_removed_ptr != NULL)
- restart_scan = TRUE;
+ restart_scan = true;
} /* end if */
} /* end if */
else {
@@ -1278,9 +1278,9 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu
assert(!entry_ptr->is_protected);
assert(!entry_ptr->is_pinned);
- assert(FALSE); /* see comment above */
+ assert(false); /* see comment above */
- restart_scan = FALSE;
+ restart_scan = false;
entry_ptr = cache_ptr->LRU_tail_ptr;
H5C__UPDATE_STATS_FOR_LRU_SCAN_RESTART(cache_ptr);
@@ -1308,14 +1308,14 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu
* this may change, and to that end, I have included code to detect
* such changes and cause this function to fail if they are detected.
*/
- progress = TRUE;
+ progress = true;
while (progress && ((entries_flushed < entries_to_flush) || (entries_cleared < entries_to_clear))) {
- progress = FALSE;
+ progress = false;
entry_ptr = cache_ptr->pel_head_ptr;
while ((entry_ptr != NULL) &&
((entries_flushed < entries_to_flush) || (entries_cleared < entries_to_clear))) {
H5C_cache_entry_t *prev_ptr;
- hbool_t next_is_dirty = FALSE;
+ bool next_is_dirty = false;
assert(entry_ptr->is_pinned);
@@ -1332,9 +1332,9 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu
op_flags = clear_flags;
/* Reset entry flag */
- entry_ptr->clear_on_unprotect = FALSE;
+ entry_ptr->clear_on_unprotect = false;
entries_cleared++;
- progress = TRUE;
+ progress = true;
} /* end if */
else if (entry_ptr->flush_immediately) {
assert(entry_ptr->is_dirty);
@@ -1344,9 +1344,9 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu
op_flags = flush_flags;
/* Reset entry flag */
- entry_ptr->flush_immediately = FALSE;
+ entry_ptr->flush_immediately = false;
entries_flushed++;
- progress = TRUE;
+ progress = true;
} /* end else-if */
else
/* No operation for this entry */
@@ -1379,7 +1379,7 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "can't flush entry");
if (cache_ptr->entries_removed_counter != 0 || cache_ptr->last_entry_removed_ptr != NULL)
- restart_scan = TRUE;
+ restart_scan = true;
} /* end if */
} /* end if */
@@ -1409,9 +1409,9 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu
* present. Hence the following assertion which should be
* removed if the above changes.
*/
- assert(FALSE);
+ assert(false);
- restart_scan = FALSE;
+ restart_scan = false;
entry_ptr = cache_ptr->pel_head_ptr;
diff --git a/src/H5Cpkg.h b/src/H5Cpkg.h
index cccb47fcd97..5417684a53a 100644
--- a/src/H5Cpkg.h
+++ b/src/H5Cpkg.h
@@ -61,7 +61,7 @@
* NULL on entry in the insertion macros.
*
* Finally, observe that the sanity checking macros evaluate to the empty
- * string when H5C_DO_SANITY_CHECKS is FALSE. They also contain calls
+ * string when H5C_DO_SANITY_CHECKS is false. They also contain calls
* to the HGOTO_ERROR macro, which may not be appropriate in all cases.
* If so, we will need versions of the insertion and deletion macros which
* do not reference the sanity checking macros.
@@ -758,7 +758,7 @@ if ((cache_ptr) == NULL || \
#define H5C__PRE_HT_UPDATE_FOR_ENTRY_CLEAN_SC(cache_ptr, entry_ptr, fail_val) \
if ((cache_ptr) == NULL || (cache_ptr)->index_len <= 0 || \
- (entry_ptr) == NULL || (entry_ptr)->is_dirty != FALSE || \
+ (entry_ptr) == NULL || (entry_ptr)->is_dirty != false || \
(cache_ptr)->index_size < (entry_ptr)->size || \
(cache_ptr)->dirty_index_size < (entry_ptr)->size || \
(cache_ptr)->index_size != ((cache_ptr)->clean_index_size + (cache_ptr)->dirty_index_size) || \
@@ -778,7 +778,7 @@ if ((cache_ptr) == NULL || (cache_ptr)->index_len <= 0 || \
#define H5C__PRE_HT_UPDATE_FOR_ENTRY_DIRTY_SC(cache_ptr, entry_ptr, fail_val) \
if ((cache_ptr) == NULL || (cache_ptr)->index_len <= 0 || \
- (entry_ptr) == NULL || (entry_ptr)->is_dirty != TRUE || \
+ (entry_ptr) == NULL || (entry_ptr)->is_dirty != true || \
(cache_ptr)->index_size < (entry_ptr)->size || \
(cache_ptr)->clean_index_size < (entry_ptr)->size || \
(cache_ptr)->index_size != ((cache_ptr)->clean_index_size + (cache_ptr)->dirty_index_size) || \
@@ -1001,7 +1001,7 @@ do { \
#else /* H5C_DO_SLIST_SANITY_CHECKS */
-#define H5C__ENTRY_IN_SLIST(cache_ptr, entry_ptr) FALSE
+#define H5C__ENTRY_IN_SLIST(cache_ptr, entry_ptr) false
#endif /* H5C_DO_SLIST_SANITY_CHECKS */
@@ -1067,8 +1067,8 @@ do { \
if(H5SL_insert((cache_ptr)->slist_ptr, entry_ptr, &((entry_ptr)->addr)) < 0) \
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, (fail_val), "can't insert entry in skip list"); \
\
- (entry_ptr)->in_slist = TRUE; \
- (cache_ptr)->slist_changed = TRUE; \
+ (entry_ptr)->in_slist = true; \
+ (cache_ptr)->slist_changed = true; \
(cache_ptr)->slist_len++; \
(cache_ptr)->slist_size += (entry_ptr)->size; \
((cache_ptr)->slist_ring_len[(entry_ptr)->ring])++; \
@@ -1118,7 +1118,7 @@ do {
\
assert((cache_ptr)->slist_len > 0); \
if(!(during_flush)) \
- (cache_ptr)->slist_changed = TRUE; \
+ (cache_ptr)->slist_changed = true; \
(cache_ptr)->slist_len--; \
assert((cache_ptr)->slist_size >= (entry_ptr)->size); \
(cache_ptr)->slist_size -= (entry_ptr)->size; \
@@ -1126,7 +1126,7 @@ do {
assert((cache_ptr)->slist_ring_size[(entry_ptr)->ring] >= (entry_ptr)->size); \
((cache_ptr)->slist_ring_size[(entry_ptr)->ring]) -= (entry_ptr)->size;\
H5C__SLIST_REMOVE_ENTRY_SC(cache_ptr, entry_ptr); \
- (entry_ptr)->in_slist = FALSE; \
+ (entry_ptr)->in_slist = false; \
} else { /* slist disabled */ \
assert((cache_ptr)->slist_len == 0); \
assert((cache_ptr)->slist_size == 0); \
@@ -1911,7 +1911,7 @@ typedef struct H5C_tag_info_t {
haddr_t tag; /* Tag (address) of the entries (must be first, for skiplist) */
H5C_cache_entry_t *head; /* Head of the list of entries for this tag */
size_t entry_cnt; /* Number of entries on list */
- hbool_t corked; /* Whether this object is corked */
+ bool corked; /* Whether this object is corked */
/* Hash table fields */
UT_hash_handle hh; /* Hash table handle (must be LAST) */
@@ -2004,8 +2004,8 @@ typedef struct H5C_tag_info_t {
* be useful to disable all cache evictions, and thereby postpone metadata
* writes. The following field is used to implement this.
*
- * evictions_enabled: Boolean flag that is initialized to TRUE. When
- * this flag is set to FALSE, the metadata cache will not
+ * evictions_enabled: Boolean flag that is initialized to true. When
+ * this flag is set to false, the metadata cache will not
* attempt to evict entries to make space for newly protected
* entries, and instead the will grow without limit.
*
@@ -2161,7 +2161,7 @@ typedef struct H5C_tag_info_t {
* on flush and close, it is maintained only when needed.
*
* To do this, we add a flag to control maintenanace of the skip list.
- * This flag is initially set to FALSE, which disables all operations
+ * This flag is initially set to false, which disables all operations
* on the skip list.
*
* At the beginning of either flush or close, we scan the index list,
@@ -2178,8 +2178,8 @@ typedef struct H5C_tag_info_t {
* the next flush or close.
*
* slist_enabled: Boolean flag used to control operation of the skip
- * list. If this filed is FALSE, operations on the slist are
- * no-ops, and the slist must be empty. If it is TRUE,
+ * list. If this filed is false, operations on the slist are
+ * no-ops, and the slist must be empty. If it is true,
* operations on the skip list proceed as usual, and all dirty
* entries in the metadata cache must be listed in the skip list.
*
@@ -2228,7 +2228,7 @@ typedef struct H5C_tag_info_t {
* The cache must deal with the case in which entries may be dirtied, moved,
* or have their sizes changed during a flush. To allow sanity checks in this
* situation, the following two fields have been added. They are only
- * compiled in when H5C_DO_SANITY_CHECKS is TRUE.
+ * compiled in when H5C_DO_SANITY_CHECKS is true.
*
* slist_len_increase: Number of entries that have been added to the
* skip list since the last time this field was set to zero.
@@ -2473,10 +2473,10 @@ typedef struct H5C_tag_info_t {
* full, so we can refrain from increasing the size of a
* cache which hasn't used up the space allotted to it.
*
- * The field is initialized to FALSE, and then set to TRUE
+ * The field is initialized to false, and then set to true
* whenever we attempt to make space in the cache.
*
- * size_decreased: Boolean flag set to TRUE whenever the maximum cache
+ * size_decreased: Boolean flag set to true whenever the maximum cache
* size is decreased. The flag triggers a call to
* H5C__make_space_in_cache() on the next call to H5C_protect().
*
@@ -2576,7 +2576,7 @@ typedef struct H5C_tag_info_t {
* image_ctl: Instance of H5C_cache_image_ctl_t containing configuration
* data for generation of a cache image on file close.
*
- * serialization_in_progress: Boolean field that is set to TRUE iff
+ * serialization_in_progress: Boolean field that is set to true iff
* the cache is in the process of being serialized. This field is
* needed to support the H5C_serialization_in_progress() call, which
* is in turn required for sanity checks in some cache clients.
@@ -2593,7 +2593,7 @@ typedef struct H5C_tag_info_t {
* superblock message should be deleted and the cache image
* file space freed after they have been read and decoded.
*
- * This flag should be set to TRUE iff the file is opened
+ * This flag should be set to true iff the file is opened
* R/W and there is a cache image to be read.
*
* image_addr: The base address of the on-disk metadata cache image, or
@@ -2998,7 +2998,7 @@ typedef struct H5C_tag_info_t {
*
****************************************************************************/
struct H5C_t {
- hbool_t flush_in_progress;
+ bool flush_in_progress;
H5C_log_info_t * log_info;
void * aux_ptr;
int32_t max_type_id;
@@ -3006,10 +3006,10 @@ struct H5C_t {
size_t max_cache_size;
size_t min_clean_size;
H5C_write_permitted_func_t check_write_permitted;
- hbool_t write_permitted;
+ bool write_permitted;
H5C_log_flush_func_t log_flush;
- hbool_t evictions_enabled;
- hbool_t close_warning_received;
+ bool evictions_enabled;
+ bool close_warning_received;
/* Fields for maintaining the [hash table] index of entries */
uint32_t index_len;
@@ -3032,8 +3032,8 @@ struct H5C_t {
H5C_cache_entry_t * entry_watched_for_removal;
/* Fields for maintaining list of in-order entries, for flushing */
- hbool_t slist_enabled;
- hbool_t slist_changed;
+ bool slist_enabled;
+ bool slist_changed;
uint32_t slist_len;
size_t slist_size;
uint32_t slist_ring_len[H5C_RING_NTYPES];
@@ -3047,7 +3047,7 @@ struct H5C_t {
/* Fields for maintaining list of tagged entries */
H5C_tag_info_t * tag_list;
- hbool_t ignore_tags;
+ bool ignore_tags;
uint32_t num_objs_corked;
/* Fields for tracking protected entries */
@@ -3094,20 +3094,20 @@ struct H5C_t {
#endif /* H5_HAVE_PARALLEL */
/* Fields for automatic cache size adjustment */
- hbool_t size_increase_possible;
- hbool_t flash_size_increase_possible;
+ bool size_increase_possible;
+ bool flash_size_increase_possible;
size_t flash_size_increase_threshold;
- hbool_t size_decrease_possible;
- hbool_t resize_enabled;
- hbool_t cache_full;
- hbool_t size_decreased;
- hbool_t resize_in_progress;
- hbool_t msic_in_progress;
+ bool size_decrease_possible;
+ bool resize_enabled;
+ bool cache_full;
+ bool size_decreased;
+ bool resize_in_progress;
+ bool msic_in_progress;
H5C_auto_size_ctl_t resize_ctl;
/* Fields for epoch markers used in automatic cache size adjustment */
int32_t epoch_markers_active;
- hbool_t epoch_marker_active[H5C__MAX_EPOCH_MARKERS];
+ bool epoch_marker_active[H5C__MAX_EPOCH_MARKERS];
int32_t epoch_marker_ringbuf[H5C__MAX_EPOCH_MARKERS+1];
int32_t epoch_marker_ringbuf_first;
int32_t epoch_marker_ringbuf_last;
@@ -3120,10 +3120,10 @@ struct H5C_t {
/* fields supporting generation of a cache image on file close */
H5C_cache_image_ctl_t image_ctl;
- hbool_t serialization_in_progress;
- hbool_t load_image;
- hbool_t image_loaded;
- hbool_t delete_image;
+ bool serialization_in_progress;
+ bool load_image;
+ bool image_loaded;
+ bool delete_image;
haddr_t image_addr;
hsize_t image_len;
hsize_t image_data_len;
@@ -3136,8 +3136,8 @@ struct H5C_t {
void * image_buffer;
/* Free Space Manager Related fields */
- hbool_t rdfsm_settled;
- hbool_t mdfsm_settled;
+ bool rdfsm_settled;
+ bool mdfsm_settled;
#if H5C_COLLECT_CACHE_STATS
/* stats fields */
@@ -3245,10 +3245,10 @@ typedef int (*H5C_tag_iter_cb_t)(H5C_cache_entry_t *entry, void *ctx);
/******************************/
/* Package Private Prototypes */
/******************************/
-H5_DLL herr_t H5C__prep_image_for_file_close(H5F_t *f, hbool_t *image_generated);
+H5_DLL herr_t H5C__prep_image_for_file_close(H5F_t *f, bool *image_generated);
/* General routines */
-H5_DLL herr_t H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted);
+H5_DLL herr_t H5C__auto_adjust_cache_size(H5F_t *f, bool write_permitted);
H5_DLL herr_t H5C__autoadjust__ageout__remove_all_markers(H5C_t *cache_ptr);
H5_DLL herr_t H5C__autoadjust__ageout__remove_excess_markers(H5C_t *cache_ptr);
H5_DLL herr_t H5C__flash_increase_cache_size(H5C_t *cache_ptr, size_t old_entry_size, size_t new_entry_size);
@@ -3259,10 +3259,10 @@ H5_DLL herr_t H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr,
H5_DLL herr_t H5C__generate_cache_image(H5F_t *f, H5C_t *cache_ptr);
H5_DLL herr_t H5C__load_cache_image(H5F_t *f);
H5_DLL herr_t H5C__make_space_in_cache(H5F_t * f, size_t space_needed,
- hbool_t write_permitted);
+ bool write_permitted);
H5_DLL herr_t H5C__serialize_cache(H5F_t *f);
H5_DLL herr_t H5C__serialize_single_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr);
-H5_DLL herr_t H5C__iter_tagged_entries(H5C_t *cache, haddr_t tag, hbool_t match_global,
+H5_DLL herr_t H5C__iter_tagged_entries(H5C_t *cache, haddr_t tag, bool match_global,
H5C_tag_iter_cb_t cb, void *cb_ctx);
/* Routines for operating on entry tags */
@@ -3271,11 +3271,11 @@ H5_DLL herr_t H5C__untag_entry(H5C_t *cache, H5C_cache_entry_t *entry);
/* Routines for operating on cache images */
H5_DLL herr_t H5C__get_cache_image_config(const H5C_t *cache_ptr, H5C_cache_image_ctl_t *config_ptr);
-H5_DLL herr_t H5C__image_stats(H5C_t *cache_ptr, hbool_t print_header);
+H5_DLL herr_t H5C__image_stats(H5C_t *cache_ptr, bool print_header);
/* Debugging routines */
#ifdef H5C_DO_SLIST_SANITY_CHECKS
-H5_DLL hbool_t H5C__entry_in_skip_list(H5C_t *cache_ptr, H5C_cache_entry_t *target_ptr);
+H5_DLL bool H5C__entry_in_skip_list(H5C_t *cache_ptr, H5C_cache_entry_t *target_ptr);
#endif
#ifdef H5C_DO_EXTREME_SANITY_CHECKS
H5_DLL herr_t H5C__validate_lru_list(H5C_t *cache_ptr);
@@ -3285,7 +3285,7 @@ H5_DLL herr_t H5C__validate_protected_entry_list(H5C_t *cache_ptr);
/* Testing functions */
#ifdef H5C_TESTING
-H5_DLL herr_t H5C__verify_cork_tag_test(hid_t fid, H5O_token_t tag_token, hbool_t status);
+H5_DLL herr_t H5C__verify_cork_tag_test(hid_t fid, H5O_token_t tag_token, bool status);
#endif /* H5C_TESTING */
#endif /* H5Cpkg_H */
diff --git a/src/H5Cprefetched.c b/src/H5Cprefetched.c
index 1e90b7ca63c..1a890678a58 100644
--- a/src/H5Cprefetched.c
+++ b/src/H5Cprefetched.c
@@ -58,7 +58,7 @@ static herr_t H5C__prefetched_entry_get_final_load_size(const void *image_ptr, s
void *udata_ptr, size_t *actual_len_ptr);
static htri_t H5C__prefetched_entry_verify_chksum(const void *image_ptr, size_t len, void *udata_ptr);
static void *H5C__prefetched_entry_deserialize(const void *image_ptr, size_t len, void *udata,
- hbool_t *dirty_ptr);
+ bool *dirty_ptr);
static herr_t H5C__prefetched_entry_image_len(const void *thing, size_t *image_len_ptr);
static herr_t H5C__prefetched_entry_pre_serialize(H5F_t *f, void *thing, haddr_t addr, size_t len,
haddr_t *new_addr_ptr, size_t *new_len_ptr,
@@ -147,7 +147,7 @@ H5C__prefetched_entry_verify_chksum(const void H5_ATTR_UNUSED *image_ptr, size_t
static void *
H5C__prefetched_entry_deserialize(const void H5_ATTR_UNUSED *image_ptr, size_t H5_ATTR_UNUSED len,
- void H5_ATTR_UNUSED *udata, hbool_t H5_ATTR_UNUSED *dirty_ptr)
+ void H5_ATTR_UNUSED *udata, bool H5_ATTR_UNUSED *dirty_ptr)
{
FUNC_ENTER_PACKAGE_NOERR /* Yes, even though this pushes an error on the stack */
diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h
index 3bdffeb6628..3477e75d7e5 100644
--- a/src/H5Cprivate.h
+++ b/src/H5Cprivate.h
@@ -485,8 +485,8 @@ typedef struct H5C_t H5C_t;
*
* If the deserialize function has to clean up file corruption
* left over from an old bug in the HDF5 library, it must set
- * *dirty_ptr to TRUE. If it doesn't, no action is needed as
- * *dirty_ptr will be set to FALSE before the deserialize call.
+ * *dirty_ptr to true. If it doesn't, no action is needed as
+ * *dirty_ptr will be set to false before the deserialize call.
*
* If the operation fails for any reason (i.e. bad data in buffer, bad
* buffer length, malloc failure, etc.) the function must return NULL and
@@ -866,8 +866,7 @@ typedef herr_t (*H5C_get_initial_load_size_func_t)(void *udata_ptr, size_t *imag
typedef herr_t (*H5C_get_final_load_size_func_t)(const void *image_ptr, size_t image_len, void *udata_ptr,
size_t *actual_len_ptr);
typedef htri_t (*H5C_verify_chksum_func_t)(const void *image_ptr, size_t len, void *udata_ptr);
-typedef void *(*H5C_deserialize_func_t)(const void *image_ptr, size_t len, void *udata_ptr,
- hbool_t *dirty_ptr);
+typedef void *(*H5C_deserialize_func_t)(const void *image_ptr, size_t len, void *udata_ptr, bool *dirty_ptr);
typedef herr_t (*H5C_image_len_func_t)(const void *thing, size_t *image_len_ptr);
typedef herr_t (*H5C_pre_serialize_func_t)(H5F_t *f, void *thing, haddr_t addr, size_t len,
haddr_t *new_addr_ptr, size_t *new_len_ptr, unsigned *flags_ptr);
@@ -895,8 +894,8 @@ typedef struct H5C_class_t {
} H5C_class_t;
/* Type definitions of callback functions used by the cache as a whole */
-typedef herr_t (*H5C_write_permitted_func_t)(const H5F_t *f, hbool_t *write_permitted_ptr);
-typedef herr_t (*H5C_log_flush_func_t)(H5C_t *cache_ptr, haddr_t addr, hbool_t was_dirty, unsigned flags);
+typedef herr_t (*H5C_write_permitted_func_t)(const H5F_t *f, bool *write_permitted_ptr);
+typedef herr_t (*H5C_log_flush_func_t)(H5C_t *cache_ptr, haddr_t addr, bool was_dirty, unsigned flags);
/****************************************************************************
*
@@ -988,7 +987,7 @@ typedef int H5C_ring_t;
* callbacks must be used to update this image before it is
* written to disk
*
- * image_up_to_date: Boolean flag that is set to TRUE when *image_ptr
+ * image_up_to_date: Boolean flag that is set to true when *image_ptr
* is up to date, and set to false when the entry is dirtied.
*
* type: Pointer to the instance of H5C_class_t containing pointers
@@ -1006,8 +1005,8 @@ typedef int H5C_ring_t;
* dirtied: Boolean flag used to indicate that the entry has been
* dirtied while protected.
*
- * This field is set to FALSE in the protect call, and may
- * be set to TRUE by the H5C_mark_entry_dirty() call at any
+ * This field is set to false in the protect call, and may
+ * be set to true by the H5C_mark_entry_dirty() call at any
* time prior to the unprotect call.
*
* The H5C_mark_entry_dirty() call exists as a convenience
@@ -1027,11 +1026,11 @@ typedef int H5C_ring_t;
* and inserted on the protected list.
*
* is_read_only: Boolean flag that is only meaningful if is_protected is
- * TRUE. In this circumstance, it indicates whether the
+ * true. In this circumstance, it indicates whether the
* entry has been protected read-only, or read/write.
*
* If the entry has been protected read-only (i.e. is_protected
- * and is_read_only are both TRUE), we allow the entry to be
+ * and is_read_only are both true), we allow the entry to be
* protected more than once.
*
* In this case, the number of readers is maintained in the
@@ -1042,7 +1041,7 @@ typedef int H5C_ring_t;
* ro_ref_count: Integer field used to maintain a count of the number of
* outstanding read-only protects on this entry. This field
* must be zero whenever either is_protected or is_read_only
- * are TRUE.
+ * are true.
*
* is_pinned: Boolean flag indicating whether the entry has been pinned
* in the cache.
@@ -1107,7 +1106,7 @@ typedef int H5C_ring_t;
* When a distributed metadata write is triggered at a
* sync point, this field is used to mark entries that
* must be flushed before leaving the sync point. At all
- * other times, this field should be set to FALSE.
+ * other times, this field should be set to false.
*
* flush_in_progress: Boolean flag that is set to true iff the entry
* is in the process of being flushed. This allows the cache
@@ -1298,7 +1297,7 @@ typedef int H5C_ring_t;
* include_in_image: Boolean flag indicating whether this entry should
* be included in the metadata cache image. This field should
* always be false prior to the H5C_prep_for_file_close() call.
- * During that call, it should be set to TRUE for all entries
+ * During that call, it should be set to true for all entries
* that are to be included in the metadata cache image. At
* present, only the superblock, the superblock extension
* object header and its chunks (if any) are omitted from
@@ -1313,7 +1312,7 @@ typedef int H5C_ring_t;
*
* image_dirty: Boolean flag indicating whether the entry should be marked
* as dirty in the metadata cache image. The flag is set to
- * TRUE iff the entry is dirty when H5C_prep_for_file_close()
+ * true iff the entry is dirty when H5C_prep_for_file_close()
* is called.
*
* fd_parent_count: If the entry is a child in one or more flush dependency
@@ -1324,7 +1323,7 @@ typedef int H5C_ring_t;
*
* Note that while this count is initially taken from the
* flush dependency fields above, if the entry is in the
- * cache image (i.e. include_in_image is TRUE), any parents
+ * cache image (i.e. include_in_image is true), any parents
* that are not in the image are removed from this count and
* from the fd_parent_addrs array below.
*
@@ -1343,7 +1342,7 @@ typedef int H5C_ring_t;
*
* Note that while this list of addresses is initially taken
* from the flush dependency fields above, if the entry is in the
- * cache image (i.e. include_in_image is TRUE), any parents
+ * cache image (i.e. include_in_image is true), any parents
* that are not in the image are removed from this list, and
* and from the fd_parent_count above.
*
@@ -1360,7 +1359,7 @@ typedef int H5C_ring_t;
*
* Note that while this count is initially taken from the
* flush dependency fields above, if the entry is in the
- * cache image (i.e. include_in_image is TRUE), any children
+ * cache image (i.e. include_in_image is true), any children
* that are not in the image are removed from this count.
*
* fd_dirty_child_count: If the entry is a parent in a flush dependency
@@ -1371,7 +1370,7 @@ typedef int H5C_ring_t;
*
* Note that while this count is initially taken from the
* flush dependency fields above, if the entry is in the
- * cache image (i.e. include_in_image is TRUE), any dirty
+ * cache image (i.e. include_in_image is true), any dirty
* children that are not in the image are removed from this
* count.
*
@@ -1444,7 +1443,7 @@ typedef int H5C_ring_t;
* entry. This ID must match the ID of the type provided in any
* protect call on the prefetched entry.
*
- * The value of this field is undefined in prefetched is FALSE.
+ * The value of this field is undefined in prefetched is false.
*
* age: Number of times a prefetched entry has appeared in
* subsequent cache images. The field exists to allow
@@ -1452,9 +1451,9 @@ typedef int H5C_ring_t;
* entry can appear in subsequent cache images without being
* converted to a regular entry.
*
- * This field must be zero if prefetched is FALSE.
+ * This field must be zero if prefetched is false.
*
- * prefetched_dirty: Boolean field that must be set to FALSE unless the
+ * prefetched_dirty: Boolean field that must be set to false unless the
* following conditions hold:
*
* 1) The file has been opened R/O.
@@ -1549,24 +1548,24 @@ typedef struct H5C_cache_entry_t {
haddr_t addr;
size_t size;
void *image_ptr;
- hbool_t image_up_to_date;
+ bool image_up_to_date;
const H5C_class_t *type;
- hbool_t is_dirty;
- hbool_t dirtied;
- hbool_t is_protected;
- hbool_t is_read_only;
+ bool is_dirty;
+ bool dirtied;
+ bool is_protected;
+ bool is_read_only;
int ro_ref_count;
- hbool_t is_pinned;
- hbool_t in_slist;
- hbool_t flush_marker;
- hbool_t flush_me_last;
+ bool is_pinned;
+ bool in_slist;
+ bool flush_marker;
+ bool flush_me_last;
#ifdef H5_HAVE_PARALLEL
- hbool_t clear_on_unprotect;
- hbool_t flush_immediately;
- hbool_t coll_access;
+ bool clear_on_unprotect;
+ bool flush_immediately;
+ bool coll_access;
#endif /* H5_HAVE_PARALLEL */
- hbool_t flush_in_progress;
- hbool_t destroy_in_progress;
+ bool flush_in_progress;
+ bool destroy_in_progress;
/* fields supporting rings for purposes of flush ordering */
H5C_ring_t ring;
@@ -1578,8 +1577,8 @@ typedef struct H5C_cache_entry_t {
unsigned flush_dep_nchildren;
unsigned flush_dep_ndirty_children;
unsigned flush_dep_nunser_children;
- hbool_t pinned_from_client;
- hbool_t pinned_from_cache;
+ bool pinned_from_client;
+ bool pinned_from_cache;
/* fields supporting the hash table: */
struct H5C_cache_entry_t *ht_next;
@@ -1600,18 +1599,18 @@ typedef struct H5C_cache_entry_t {
#endif /* H5_HAVE_PARALLEL */
/* fields supporting cache image */
- hbool_t include_in_image;
+ bool include_in_image;
int32_t lru_rank;
- hbool_t image_dirty;
+ bool image_dirty;
uint64_t fd_parent_count;
haddr_t *fd_parent_addrs;
uint64_t fd_child_count;
uint64_t fd_dirty_child_count;
uint32_t image_fd_height;
- hbool_t prefetched;
+ bool prefetched;
int prefetch_type_id;
int32_t age;
- hbool_t prefetched_dirty;
+ bool prefetched_dirty;
#ifndef NDEBUG /* debugging field */
int serialization_count;
@@ -1700,7 +1699,7 @@ typedef struct H5C_cache_entry_t {
* Note that while this count is initially taken from the
* flush dependency fields in the associated instance of
* H5C_cache_entry_t, if the entry is in the cache image
- * (i.e. include_in_image is TRUE), any parents that are
+ * (i.e. include_in_image is true), any parents that are
* not in the image are removed from this count and
* from the fd_parent_addrs array below.
*
@@ -1722,7 +1721,7 @@ typedef struct H5C_cache_entry_t {
* Note that while this list of addresses is initially taken
* from the flush dependency fields in the associated instance of
* H5C_cache_entry_t, if the entry is in the cache image
- * (i.e. include_in_image is TRUE), any parents that are not
+ * (i.e. include_in_image is true), any parents that are not
* in the image are removed from this list, and from the
* fd_parent_count above.
*
@@ -1742,7 +1741,7 @@ typedef struct H5C_cache_entry_t {
* Note that while this count is initially taken from the
* flush dependency fields in the associated instance of
* H5C_cache_entry_t, if the entry is in the cache image
- * (i.e. include_in_image is TRUE), any children
+ * (i.e. include_in_image is true), any children
* that are not in the image are removed from this count.
*
* fd_dirty_child_count: If the entry is a parent in a flush dependency
@@ -1754,7 +1753,7 @@ typedef struct H5C_cache_entry_t {
* Note that while this count is initially taken from the
* flush dependency fields in the associated instance of
* H5C_cache_entry_t, if the entry is in the cache image
- * (i.e. include_in_image is TRUE), any dirty children
+ * (i.e. include_in_image is true), any dirty children
* that are not in the image are removed from this count.
*
* image_ptr: Pointer to void. When not NULL, this field points to a
@@ -1773,7 +1772,7 @@ typedef struct H5C_image_entry_t {
int32_t age;
int32_t type_id;
int32_t lru_rank;
- hbool_t is_dirty;
+ bool is_dirty;
unsigned image_fd_height;
uint64_t fd_parent_count;
haddr_t *fd_parent_addrs;
@@ -1805,7 +1804,7 @@ typedef struct H5C_image_entry_t {
*
* set_initial_size: Boolean flag indicating whether the size of the
* initial size of the cache is to be set to the value given in
- * the initial_size field. If set_initial_size is FALSE, the
+ * the initial_size field. If set_initial_size is false, the
* initial_size field is ignored.
*
* initial_size: If enabled, this field contain the size the cache is
@@ -2039,7 +2038,7 @@ typedef struct H5C_auto_size_ctl_t {
/* general configuration fields: */
int32_t version;
H5C_auto_resize_rpt_fcn rpt_fcn;
- hbool_t set_initial_size;
+ bool set_initial_size;
size_t initial_size;
double min_clean_fraction;
size_t max_size;
@@ -2050,7 +2049,7 @@ typedef struct H5C_auto_size_ctl_t {
enum H5C_cache_incr_mode incr_mode;
double lower_hr_threshold;
double increment;
- hbool_t apply_max_increment;
+ bool apply_max_increment;
size_t max_increment;
enum H5C_cache_flash_incr_mode flash_incr_mode;
double flash_multiple;
@@ -2060,10 +2059,10 @@ typedef struct H5C_auto_size_ctl_t {
enum H5C_cache_decr_mode decr_mode;
double upper_hr_threshold;
double decrement;
- hbool_t apply_max_decrement;
+ bool apply_max_decrement;
size_t max_decrement;
int32_t epochs_before_eviction;
- hbool_t apply_empty_reserve;
+ bool apply_empty_reserve;
double empty_reserve;
} H5C_auto_size_ctl_t;
@@ -2139,16 +2138,16 @@ typedef struct H5C_auto_size_ctl_t {
#define H5C__DEFAULT_CACHE_IMAGE_CTL \
{ \
H5C__CURR_CACHE_IMAGE_CTL_VER, /* = version */ \
- FALSE, /* = generate_image */ \
- FALSE, /* = save_resize_status */ \
+ false, /* = generate_image */ \
+ false, /* = save_resize_status */ \
H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE, /* = entry_ageout */ \
H5C_CI__ALL_FLAGS /* = flags */ \
}
typedef struct H5C_cache_image_ctl_t {
int32_t version;
- hbool_t generate_image;
- hbool_t save_resize_status;
+ bool generate_image;
+ bool save_resize_status;
int32_t entry_ageout;
unsigned flags;
} H5C_cache_image_ctl_t;
@@ -2162,7 +2161,7 @@ typedef enum H5C_log_style_t { H5C_LOG_STYLE_JSON, H5C_LOG_STYLE_TRACE } H5C_log
H5_DLL H5C_t *H5C_create(size_t max_cache_size, size_t min_clean_size, int max_type_id,
const H5C_class_t *const *class_table_ptr,
- H5C_write_permitted_func_t check_write_permitted, hbool_t write_permitted,
+ H5C_write_permitted_func_t check_write_permitted, bool write_permitted,
H5C_log_flush_func_t log_flush, void *aux_ptr);
H5_DLL void H5C_def_auto_resize_rpt_fcn(H5C_t *cache_ptr, int32_t version, double hit_rate,
enum H5C_resize_status status, size_t old_max_cache_size,
@@ -2173,7 +2172,7 @@ H5_DLL herr_t H5C_evict(H5F_t *f);
H5_DLL herr_t H5C_expunge_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, unsigned flags);
H5_DLL herr_t H5C_flush_cache(H5F_t *f, unsigned flags);
H5_DLL herr_t H5C_flush_tagged_entries(H5F_t *f, haddr_t tag);
-H5_DLL herr_t H5C_evict_tagged_entries(H5F_t *f, haddr_t tag, hbool_t match_global);
+H5_DLL herr_t H5C_evict_tagged_entries(H5F_t *f, haddr_t tag, bool match_global);
H5_DLL herr_t H5C_expunge_tag_type_metadata(H5F_t *f, haddr_t tag, int type_id, unsigned flags);
H5_DLL herr_t H5C_get_tag(const void *thing, /*OUT*/ haddr_t *tag);
#ifdef H5C_DO_TAGGING_SANITY_CHECKS
@@ -2183,17 +2182,17 @@ H5_DLL herr_t H5C_flush_to_min_clean(H5F_t *f);
H5_DLL herr_t H5C_get_cache_auto_resize_config(const H5C_t *cache_ptr, H5C_auto_size_ctl_t *config_ptr);
H5_DLL herr_t H5C_get_cache_size(const H5C_t *cache_ptr, size_t *max_size_ptr, size_t *min_clean_size_ptr,
size_t *cur_size_ptr, uint32_t *cur_num_entries_ptr);
-H5_DLL herr_t H5C_get_cache_flush_in_progress(const H5C_t *cache_ptr, hbool_t *flush_in_progress_ptr);
+H5_DLL herr_t H5C_get_cache_flush_in_progress(const H5C_t *cache_ptr, bool *flush_in_progress_ptr);
H5_DLL herr_t H5C_get_cache_hit_rate(const H5C_t *cache_ptr, double *hit_rate_ptr);
-H5_DLL herr_t H5C_get_entry_status(const H5F_t *f, haddr_t addr, size_t *size_ptr, hbool_t *in_cache_ptr,
- hbool_t *is_dirty_ptr, hbool_t *is_protected_ptr, hbool_t *is_pinned_ptr,
- hbool_t *is_corked_ptr, hbool_t *is_flush_dep_parent_ptr,
- hbool_t *is_flush_dep_child_ptr, hbool_t *image_up_to_date_ptr);
-H5_DLL herr_t H5C_get_evictions_enabled(const H5C_t *cache_ptr, hbool_t *evictions_enabled_ptr);
+H5_DLL herr_t H5C_get_entry_status(const H5F_t *f, haddr_t addr, size_t *size_ptr, bool *in_cache_ptr,
+ bool *is_dirty_ptr, bool *is_protected_ptr, bool *is_pinned_ptr,
+ bool *is_corked_ptr, bool *is_flush_dep_parent_ptr,
+ bool *is_flush_dep_child_ptr, bool *image_up_to_date_ptr);
+H5_DLL herr_t H5C_get_evictions_enabled(const H5C_t *cache_ptr, bool *evictions_enabled_ptr);
H5_DLL void *H5C_get_aux_ptr(const H5C_t *cache_ptr);
H5_DLL herr_t H5C_insert_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *thing,
unsigned int flags);
-H5_DLL herr_t H5C_load_cache_image_on_next_protect(H5F_t *f, haddr_t addr, hsize_t len, hbool_t rw);
+H5_DLL herr_t H5C_load_cache_image_on_next_protect(H5F_t *f, haddr_t addr, hsize_t len, bool rw);
H5_DLL herr_t H5C_mark_entry_dirty(void *thing);
H5_DLL herr_t H5C_mark_entry_clean(void *thing);
H5_DLL herr_t H5C_mark_entry_unserialized(void *thing);
@@ -2207,10 +2206,10 @@ H5_DLL herr_t H5C_reset_cache_hit_rate_stats(H5C_t *cache_ptr);
H5_DLL herr_t H5C_resize_entry(void *thing, size_t new_size);
H5_DLL herr_t H5C_set_cache_auto_resize_config(H5C_t *cache_ptr, H5C_auto_size_ctl_t *config_ptr);
H5_DLL herr_t H5C_set_cache_image_config(const H5F_t *f, H5C_t *cache_ptr, H5C_cache_image_ctl_t *config_ptr);
-H5_DLL herr_t H5C_set_evictions_enabled(H5C_t *cache_ptr, hbool_t evictions_enabled);
-H5_DLL herr_t H5C_set_slist_enabled(H5C_t *cache_ptr, hbool_t slist_enabled, hbool_t clear_slist);
+H5_DLL herr_t H5C_set_evictions_enabled(H5C_t *cache_ptr, bool evictions_enabled);
+H5_DLL herr_t H5C_set_slist_enabled(H5C_t *cache_ptr, bool slist_enabled, bool clear_slist);
H5_DLL herr_t H5C_set_prefix(H5C_t *cache_ptr, char *prefix);
-H5_DLL herr_t H5C_stats(H5C_t *cache_ptr, const char *cache_name, hbool_t display_detailed_stats);
+H5_DLL herr_t H5C_stats(H5C_t *cache_ptr, const char *cache_name, bool display_detailed_stats);
H5_DLL void H5C_stats__reset(H5C_t *cache_ptr);
H5_DLL herr_t H5C_unpin_entry(void *thing);
H5_DLL herr_t H5C_destroy_flush_dependency(void *parent_thing, void *child_thing);
@@ -2218,45 +2217,45 @@ H5_DLL herr_t H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned int fl
H5_DLL herr_t H5C_validate_cache_image_config(H5C_cache_image_ctl_t *ctl_ptr);
H5_DLL herr_t H5C_validate_resize_config(H5C_auto_size_ctl_t *config_ptr, unsigned int tests);
H5_DLL herr_t H5C_ignore_tags(H5C_t *cache_ptr);
-H5_DLL hbool_t H5C_get_ignore_tags(const H5C_t *cache_ptr);
+H5_DLL bool H5C_get_ignore_tags(const H5C_t *cache_ptr);
H5_DLL uint32_t H5C_get_num_objs_corked(const H5C_t *cache_ptr);
H5_DLL herr_t H5C_retag_entries(H5C_t *cache_ptr, haddr_t src_tag, haddr_t dest_tag);
-H5_DLL herr_t H5C_cork(H5C_t *cache_ptr, haddr_t obj_addr, unsigned action, hbool_t *corked);
+H5_DLL herr_t H5C_cork(H5C_t *cache_ptr, haddr_t obj_addr, unsigned action, bool *corked);
H5_DLL herr_t H5C_get_entry_ring(const H5F_t *f, haddr_t addr, H5C_ring_t *ring);
H5_DLL herr_t H5C_unsettle_entry_ring(void *thing);
H5_DLL herr_t H5C_unsettle_ring(H5F_t *f, H5C_ring_t ring);
H5_DLL herr_t H5C_remove_entry(void *thing);
-H5_DLL herr_t H5C_cache_image_status(H5F_t *f, hbool_t *load_ci_ptr, hbool_t *write_ci_ptr);
-H5_DLL hbool_t H5C_cache_image_pending(const H5C_t *cache_ptr);
+H5_DLL herr_t H5C_cache_image_status(H5F_t *f, bool *load_ci_ptr, bool *write_ci_ptr);
+H5_DLL bool H5C_cache_image_pending(const H5C_t *cache_ptr);
H5_DLL herr_t H5C_get_mdc_image_info(const H5C_t *cache_ptr, haddr_t *image_addr, hsize_t *image_len);
/* Logging functions */
H5_DLL herr_t H5C_start_logging(H5C_t *cache);
H5_DLL herr_t H5C_stop_logging(H5C_t *cache);
-H5_DLL herr_t H5C_get_logging_status(const H5C_t *cache, /*OUT*/ hbool_t *is_enabled,
- /*OUT*/ hbool_t *is_currently_logging);
+H5_DLL herr_t H5C_get_logging_status(const H5C_t *cache, /*OUT*/ bool *is_enabled,
+ /*OUT*/ bool *is_currently_logging);
#ifdef H5_HAVE_PARALLEL
H5_DLL herr_t H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates,
haddr_t *candidates_list_ptr, int mpi_rank, int mpi_size);
H5_DLL herr_t H5C_construct_candidate_list__clean_cache(H5C_t *cache_ptr);
H5_DLL herr_t H5C_construct_candidate_list__min_clean(H5C_t *cache_ptr);
-H5_DLL herr_t H5C_clear_coll_entries(H5C_t *cache_ptr, hbool_t partial);
+H5_DLL herr_t H5C_clear_coll_entries(H5C_t *cache_ptr, bool partial);
H5_DLL herr_t H5C_mark_entries_as_clean(H5F_t *f, unsigned ce_array_len, haddr_t *ce_array_ptr);
#endif /* H5_HAVE_PARALLEL */
#ifndef NDEBUG /* debugging functions */
-H5_DLL herr_t H5C_dump_cache(H5C_t *cache_ptr, const char *cache_name);
-H5_DLL herr_t H5C_dump_cache_LRU(H5C_t *cache_ptr, const char *cache_name);
-H5_DLL hbool_t H5C_get_serialization_in_progress(const H5C_t *cache_ptr);
-H5_DLL hbool_t H5C_cache_is_clean(const H5C_t *cache_ptr, H5C_ring_t inner_ring);
-H5_DLL herr_t H5C_dump_cache_skip_list(H5C_t *cache_ptr, char *calling_fcn);
-H5_DLL herr_t H5C_get_entry_ptr_from_addr(H5C_t *cache_ptr, haddr_t addr, void **entry_ptr_ptr);
-H5_DLL herr_t H5C_flush_dependency_exists(H5C_t *cache_ptr, haddr_t parent_addr, haddr_t child_addr,
- hbool_t *fd_exists_ptr);
-H5_DLL herr_t H5C_verify_entry_type(H5C_t *cache_ptr, haddr_t addr, const H5C_class_t *expected_type,
- hbool_t *in_cache_ptr, hbool_t *type_ok_ptr);
-H5_DLL herr_t H5C_validate_index_list(H5C_t *cache_ptr);
+H5_DLL herr_t H5C_dump_cache(H5C_t *cache_ptr, const char *cache_name);
+H5_DLL herr_t H5C_dump_cache_LRU(H5C_t *cache_ptr, const char *cache_name);
+H5_DLL bool H5C_get_serialization_in_progress(const H5C_t *cache_ptr);
+H5_DLL bool H5C_cache_is_clean(const H5C_t *cache_ptr, H5C_ring_t inner_ring);
+H5_DLL herr_t H5C_dump_cache_skip_list(H5C_t *cache_ptr, char *calling_fcn);
+H5_DLL herr_t H5C_get_entry_ptr_from_addr(H5C_t *cache_ptr, haddr_t addr, void **entry_ptr_ptr);
+H5_DLL herr_t H5C_flush_dependency_exists(H5C_t *cache_ptr, haddr_t parent_addr, haddr_t child_addr,
+ bool *fd_exists_ptr);
+H5_DLL herr_t H5C_verify_entry_type(H5C_t *cache_ptr, haddr_t addr, const H5C_class_t *expected_type,
+ bool *in_cache_ptr, bool *type_ok_ptr);
+H5_DLL herr_t H5C_validate_index_list(H5C_t *cache_ptr);
#endif /* NDEBUG */
#endif /* H5Cprivate_H */
diff --git a/src/H5Cquery.c b/src/H5Cquery.c
index 73e46d17565..2df9bb1a90d 100644
--- a/src/H5Cquery.c
+++ b/src/H5Cquery.c
@@ -84,7 +84,7 @@ H5C_get_cache_auto_resize_config(const H5C_t *cache_ptr, H5C_auto_size_ctl_t *co
*config_ptr = cache_ptr->resize_ctl;
- config_ptr->set_initial_size = FALSE;
+ config_ptr->set_initial_size = false;
config_ptr->initial_size = cache_ptr->max_cache_size;
done:
@@ -142,7 +142,7 @@ H5C_get_cache_size(const H5C_t *cache_ptr, size_t *max_size_ptr, size_t *min_cle
*-------------------------------------------------------------------------
*/
herr_t
-H5C_get_cache_flush_in_progress(const H5C_t *cache_ptr, hbool_t *flush_in_progress_ptr)
+H5C_get_cache_flush_in_progress(const H5C_t *cache_ptr, bool *flush_in_progress_ptr)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -214,10 +214,9 @@ H5C_get_cache_hit_rate(const H5C_t *cache_ptr, double *hit_rate_ptr)
*-------------------------------------------------------------------------
*/
herr_t
-H5C_get_entry_status(const H5F_t *f, haddr_t addr, size_t *size_ptr, hbool_t *in_cache_ptr,
- hbool_t *is_dirty_ptr, hbool_t *is_protected_ptr, hbool_t *is_pinned_ptr,
- hbool_t *is_corked_ptr, hbool_t *is_flush_dep_parent_ptr,
- hbool_t *is_flush_dep_child_ptr, hbool_t *image_up_to_date_ptr)
+H5C_get_entry_status(const H5F_t *f, haddr_t addr, size_t *size_ptr, bool *in_cache_ptr, bool *is_dirty_ptr,
+ bool *is_protected_ptr, bool *is_pinned_ptr, bool *is_corked_ptr,
+ bool *is_flush_dep_parent_ptr, bool *is_flush_dep_child_ptr, bool *image_up_to_date_ptr)
{
H5C_t *cache_ptr;
H5C_cache_entry_t *entry_ptr = NULL;
@@ -242,10 +241,10 @@ H5C_get_entry_status(const H5F_t *f, haddr_t addr, size_t *size_ptr, hbool_t *in
/* the entry doesn't exist in the cache -- report this
* and quit.
*/
- *in_cache_ptr = FALSE;
+ *in_cache_ptr = false;
} /* end if */
else {
- *in_cache_ptr = TRUE;
+ *in_cache_ptr = true;
if (size_ptr != NULL)
*size_ptr = entry_ptr->size;
if (is_dirty_ptr != NULL)
@@ -255,7 +254,7 @@ H5C_get_entry_status(const H5F_t *f, haddr_t addr, size_t *size_ptr, hbool_t *in
if (is_pinned_ptr != NULL)
*is_pinned_ptr = entry_ptr->is_pinned;
if (is_corked_ptr != NULL)
- *is_corked_ptr = entry_ptr->tag_info ? entry_ptr->tag_info->corked : FALSE;
+ *is_corked_ptr = entry_ptr->tag_info ? entry_ptr->tag_info->corked : false;
if (is_flush_dep_parent_ptr != NULL)
*is_flush_dep_parent_ptr = (entry_ptr->flush_dep_nchildren > 0);
if (is_flush_dep_child_ptr != NULL)
@@ -279,7 +278,7 @@ H5C_get_entry_status(const H5F_t *f, haddr_t addr, size_t *size_ptr, hbool_t *in
*-------------------------------------------------------------------------
*/
herr_t
-H5C_get_evictions_enabled(const H5C_t *cache_ptr, hbool_t *evictions_enabled_ptr)
+H5C_get_evictions_enabled(const H5C_t *cache_ptr, bool *evictions_enabled_ptr)
{
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5Ctag.c b/src/H5Ctag.c
index 082b57e54e0..a1a9f428583 100644
--- a/src/H5Ctag.c
+++ b/src/H5Ctag.c
@@ -49,19 +49,19 @@
/* Typedef for tagged entry iterator callback context - evict tagged entries */
typedef struct {
- H5F_t *f; /* File pointer for evicting entry */
- hbool_t evicted_entries_last_pass; /* Flag to indicate that an entry
- * was evicted when iterating over
- * cache
- */
- hbool_t pinned_entries_need_evicted; /* Flag to indicate that a pinned
- * entry was attempted to be evicted
- */
- hbool_t skipped_pf_dirty_entries; /* Flag indicating that one or more
- * entries marked prefetched_dirty
- * were encountered and not
- * evicted.
- */
+ H5F_t *f; /* File pointer for evicting entry */
+ bool evicted_entries_last_pass; /* Flag to indicate that an entry
+ * was evicted when iterating over
+ * cache
+ */
+ bool pinned_entries_need_evicted; /* Flag to indicate that a pinned
+ * entry was attempted to be evicted
+ */
+ bool skipped_pf_dirty_entries; /* Flag indicating that one or more
+ * entries marked prefetched_dirty
+ * were encountered and not
+ * evicted.
+ */
} H5C_tag_iter_evict_ctx_t;
/* Typedef for tagged entry iterator callback context - expunge tag type metadata */
@@ -73,7 +73,7 @@ typedef struct {
/* Typedef for tagged entry iterator callback context - mark corked */
typedef struct {
- hbool_t cork_val; /* Corked value */
+ bool cork_val; /* Corked value */
} H5C_tag_iter_cork_ctx_t;
/********************/
@@ -125,7 +125,7 @@ H5C_ignore_tags(H5C_t *cache)
assert(cache != NULL);
/* Set variable to ignore tag values upon assignment */
- cache->ignore_tags = TRUE;
+ cache->ignore_tags = true;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5C_ignore_tags */
@@ -139,7 +139,7 @@ H5C_ignore_tags(H5C_t *cache)
*
*-------------------------------------------------------------------------
*/
-H5_ATTR_PURE hbool_t
+H5_ATTR_PURE bool
H5C_get_ignore_tags(const H5C_t *cache)
{
FUNC_ENTER_NOAPI_NOERR
@@ -370,7 +370,7 @@ H5C__iter_tagged_entries_real(H5C_t *cache, haddr_t tag, H5C_tag_iter_cb_t cb, v
*-------------------------------------------------------------------------
*/
herr_t
-H5C__iter_tagged_entries(H5C_t *cache, haddr_t tag, hbool_t match_global, H5C_tag_iter_cb_t cb, void *cb_ctx)
+H5C__iter_tagged_entries(H5C_t *cache, haddr_t tag, bool match_global, H5C_tag_iter_cb_t cb, void *cb_ctx)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -430,17 +430,17 @@ H5C__evict_tagged_entries_cb(H5C_cache_entry_t *entry, void *_ctx)
/* Can't evict at this time, but let's note that we hit a pinned
entry and we'll loop back around again (as evicting other
entries will hopefully unpin this entry) */
- ctx->pinned_entries_need_evicted = TRUE;
+ ctx->pinned_entries_need_evicted = true;
else if (!entry->prefetched_dirty) {
/* Evict the Entry */
if (H5C__flush_single_entry(ctx->f, entry,
H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG |
H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, H5_ITER_ERROR, "Entry eviction failed.");
- ctx->evicted_entries_last_pass = TRUE;
+ ctx->evicted_entries_last_pass = true;
}
else
- ctx->skipped_pf_dirty_entries = TRUE;
+ ctx->skipped_pf_dirty_entries = true;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -456,7 +456,7 @@ H5C__evict_tagged_entries_cb(H5C_cache_entry_t *entry, void *_ctx)
*-------------------------------------------------------------------------
*/
herr_t
-H5C_evict_tagged_entries(H5F_t *f, haddr_t tag, hbool_t match_global)
+H5C_evict_tagged_entries(H5F_t *f, haddr_t tag, bool match_global)
{
H5C_t *cache; /* Pointer to cache structure */
H5C_tag_iter_evict_ctx_t ctx; /* Context for iterator callback */
@@ -477,16 +477,16 @@ H5C_evict_tagged_entries(H5F_t *f, haddr_t tag, hbool_t match_global)
/* Start evicting entries */
do {
/* Reset pinned/evicted tracking flags */
- ctx.pinned_entries_need_evicted = FALSE;
- ctx.evicted_entries_last_pass = FALSE;
- ctx.skipped_pf_dirty_entries = FALSE;
+ ctx.pinned_entries_need_evicted = false;
+ ctx.evicted_entries_last_pass = false;
+ ctx.skipped_pf_dirty_entries = false;
/* Iterate through entries in the cache */
if (H5C__iter_tagged_entries(cache, tag, match_global, H5C__evict_tagged_entries_cb, &ctx) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_BADITER, FAIL, "Iteration of tagged entries failed");
/* Keep doing this until we have stopped evicted entries */
- } while (TRUE == ctx.evicted_entries_last_pass);
+ } while (true == ctx.evicted_entries_last_pass);
/* In most cases, fail if we have finished evicting entries and pinned
* entries still need evicted
@@ -511,7 +511,7 @@ H5C_evict_tagged_entries(H5F_t *f, haddr_t tag, hbool_t match_global)
* entries from becoming unpinned.
*
* Thus we must ignore ctx.pinned_entries_need_evicted if
- * ctx.skipped_pf_dirty_entries is TRUE.
+ * ctx.skipped_pf_dirty_entries is true.
*/
if ((!ctx.skipped_pf_dirty_entries) && (ctx.pinned_entries_need_evicted))
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Pinned entries still need evicted?!");
@@ -541,7 +541,7 @@ H5C__mark_tagged_entries_cb(H5C_cache_entry_t *entry, void H5_ATTR_UNUSED *_ctx)
/* We only want to set the flush marker on entries that
* actually need flushed (i.e., dirty ones) */
if (entry->is_dirty)
- entry->flush_marker = TRUE;
+ entry->flush_marker = true;
FUNC_LEAVE_NOAPI(H5_ITER_CONT)
} /* H5C__mark_tagged_entries_cb() */
@@ -570,7 +570,7 @@ H5C__mark_tagged_entries(H5C_t *cache, haddr_t tag)
/* Iterate through hash table entries, marking those with specified tag, as
* well as any major global entries which should always be flushed
* when flushing based on tag value */
- if (H5C__iter_tagged_entries(cache, tag, TRUE, H5C__mark_tagged_entries_cb, NULL) < 0)
+ if (H5C__iter_tagged_entries(cache, tag, true, H5C__mark_tagged_entries_cb, NULL) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_BADITER, FAIL, "Iteration of tagged entries failed");
done:
@@ -597,18 +597,18 @@ H5C__flush_marked_entries(H5F_t *f)
assert(f != NULL);
/* Enable the slist, as it is needed in the flush */
- if (H5C_set_slist_enabled(f->shared->cache, TRUE, FALSE) < 0)
+ if (H5C_set_slist_enabled(f->shared->cache, true, false) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "set slist enabled failed");
/* Flush all marked entries */
if (H5C_flush_cache(f, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_IGNORE_PROTECTED_FLAG) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush cache");
- /* Disable the slist. Set the clear_slist parameter to TRUE
+ /* Disable the slist. Set the clear_slist parameter to true
* since we called H5C_flush_cache() with the
* H5C__FLUSH_MARKED_ENTRIES_FLAG.
*/
- if (H5C_set_slist_enabled(f->shared->cache, FALSE, TRUE) < 0)
+ if (H5C_set_slist_enabled(f->shared->cache, false, true) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "disable slist failed");
done:
@@ -823,7 +823,7 @@ H5C_expunge_tag_type_metadata(H5F_t *f, haddr_t tag, int type_id, unsigned flags
ctx.flags = flags;
/* Iterate through hash table entries, expunge those with specified tag and type id */
- if (H5C__iter_tagged_entries(cache, tag, FALSE, H5C__expunge_tag_type_metadata_cb, &ctx) < 0)
+ if (H5C__iter_tagged_entries(cache, tag, false, H5C__expunge_tag_type_metadata_cb, &ctx) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_BADITER, FAIL, "Iteration of tagged entries failed");
done:
diff --git a/src/H5Ctest.c b/src/H5Ctest.c
index d0e4917a9d9..c2af1dc2b65 100644
--- a/src/H5Ctest.c
+++ b/src/H5Ctest.c
@@ -49,7 +49,7 @@
/* Typedef for tagged entry iterator callback context - verify cork tag */
typedef struct {
- hbool_t status; /* Corked status */
+ bool status; /* Corked status */
} H5C_tag_iter_vct_ctx_t;
/********************/
@@ -81,7 +81,7 @@ static int
H5C__verify_cork_tag_test_cb(H5C_cache_entry_t *entry, void *_ctx)
{
H5C_tag_iter_vct_ctx_t *ctx = (H5C_tag_iter_vct_ctx_t *)_ctx; /* Get pointer to iterator context */
- hbool_t is_corked; /* Corked status for entry */
+ bool is_corked; /* Corked status for entry */
int ret_value = H5_ITER_CONT; /* Return value */
/* Function enter macro */
@@ -92,7 +92,7 @@ H5C__verify_cork_tag_test_cb(H5C_cache_entry_t *entry, void *_ctx)
assert(ctx);
/* Retrieve corked status for entry */
- is_corked = entry->tag_info ? entry->tag_info->corked : FALSE;
+ is_corked = entry->tag_info ? entry->tag_info->corked : false;
/* Verify corked status for entry */
if (is_corked != ctx->status)
@@ -113,7 +113,7 @@ H5C__verify_cork_tag_test_cb(H5C_cache_entry_t *entry, void *_ctx)
*-------------------------------------------------------------------------
*/
herr_t
-H5C__verify_cork_tag_test(hid_t fid, H5O_token_t tag_token, hbool_t status)
+H5C__verify_cork_tag_test(hid_t fid, H5O_token_t tag_token, bool status)
{
H5F_t *f; /* File Pointer */
H5C_t *cache; /* Cache Pointer */
@@ -140,7 +140,7 @@ H5C__verify_cork_tag_test(hid_t fid, H5O_token_t tag_token, hbool_t status)
ctx.status = status;
/* Iterate through tagged entries in the cache */
- if (H5C__iter_tagged_entries(cache, tag, FALSE, H5C__verify_cork_tag_test_cb, &ctx) < 0)
+ if (H5C__iter_tagged_entries(cache, tag, false, H5C__verify_cork_tag_test_cb, &ctx) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_BADITER, FAIL, "iteration of tagged entries failed");
done:
diff --git a/src/H5D.c b/src/H5D.c
index 2b20a91d3ae..c1f662b4bbf 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -107,19 +107,19 @@ H5D__create_api_common(hid_t loc_id, const char *name, hid_t type_id, hid_t spac
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be an empty string");
/* Set up object access arguments */
- if (H5VL_setup_acc_args(loc_id, H5P_CLS_DACC, TRUE, &dapl_id, vol_obj_ptr, &loc_params) < 0)
+ if (H5VL_setup_acc_args(loc_id, H5P_CLS_DACC, true, &dapl_id, vol_obj_ptr, &loc_params) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments");
/* Get link creation property list */
if (H5P_DEFAULT == lcpl_id)
lcpl_id = H5P_LINK_CREATE_DEFAULT;
- else if (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE))
+ else if (true != H5P_isa_class(lcpl_id, H5P_LINK_CREATE))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "lcpl_id is not a link creation property list");
/* Get dataset creation property list */
if (H5P_DEFAULT == dcpl_id)
dcpl_id = H5P_DATASET_CREATE_DEFAULT;
- else if (TRUE != H5P_isa_class(dcpl_id, H5P_DATASET_CREATE))
+ else if (true != H5P_isa_class(dcpl_id, H5P_DATASET_CREATE))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID,
"dcpl_id is not a dataset create property list ID");
@@ -135,7 +135,7 @@ H5D__create_api_common(hid_t loc_id, const char *name, hid_t type_id, hid_t spac
HGOTO_ERROR(H5E_DATASET, H5E_CANTCREATE, H5I_INVALID_HID, "unable to create dataset");
/* Get an ID for the dataset */
- if ((ret_value = H5VL_register(H5I_DATASET, dset, (*vol_obj_ptr)->connector, TRUE)) < 0)
+ if ((ret_value = H5VL_register(H5I_DATASET, dset, (*vol_obj_ptr)->connector, true)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataset");
done:
@@ -283,19 +283,19 @@ H5Dcreate_anon(hid_t loc_id, hid_t type_id, hid_t space_id, hid_t dcpl_id, hid_t
/* Check arguments */
if (H5P_DEFAULT == dcpl_id)
dcpl_id = H5P_DATASET_CREATE_DEFAULT;
- else if (TRUE != H5P_isa_class(dcpl_id, H5P_DATASET_CREATE))
+ else if (true != H5P_isa_class(dcpl_id, H5P_DATASET_CREATE))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not dataset create property list ID");
if (H5P_DEFAULT == dapl_id)
dapl_id = H5P_DATASET_ACCESS_DEFAULT;
- else if (TRUE != H5P_isa_class(dapl_id, H5P_DATASET_ACCESS))
+ else if (true != H5P_isa_class(dapl_id, H5P_DATASET_ACCESS))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not dataset access property list ID");
/* Set the DCPL for the API context */
H5CX_set_dcpl(dcpl_id);
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&dapl_id, H5P_CLS_DACC, loc_id, TRUE) < 0)
+ if (H5CX_set_apl(&dapl_id, H5P_CLS_DACC, loc_id, true) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info");
/* get the location object */
@@ -313,7 +313,7 @@ H5Dcreate_anon(hid_t loc_id, hid_t type_id, hid_t space_id, hid_t dcpl_id, hid_t
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, H5I_INVALID_HID, "unable to create dataset");
/* Get an ID for the dataset */
- if ((ret_value = H5VL_register(H5I_DATASET, dset, vol_obj->connector, TRUE)) < 0)
+ if ((ret_value = H5VL_register(H5I_DATASET, dset, vol_obj->connector, true)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataset");
done:
@@ -355,7 +355,7 @@ H5D__open_api_common(hid_t loc_id, const char *name, hid_t dapl_id, void **token
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be an empty string");
/* Set up object access arguments */
- if (H5VL_setup_acc_args(loc_id, H5P_CLS_DACC, FALSE, &dapl_id, vol_obj_ptr, &loc_params) < 0)
+ if (H5VL_setup_acc_args(loc_id, H5P_CLS_DACC, false, &dapl_id, vol_obj_ptr, &loc_params) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments");
/* Open the dataset */
@@ -364,7 +364,7 @@ H5D__open_api_common(hid_t loc_id, const char *name, hid_t dapl_id, void **token
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open dataset");
/* Register an atom for the dataset */
- if ((ret_value = H5VL_register(H5I_DATASET, dset, (*vol_obj_ptr)->connector, TRUE)) < 0)
+ if ((ret_value = H5VL_register(H5I_DATASET, dset, (*vol_obj_ptr)->connector, true)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, H5I_INVALID_HID, "can't register dataset ID");
done:
@@ -999,7 +999,7 @@ H5D__read_api_common(size_t count, hid_t dset_id[], hid_t mem_type_id[], hid_t m
/* Get the default dataset transfer property list if the user didn't provide one */
if (H5P_DEFAULT == dxpl_id)
dxpl_id = H5P_DATASET_XFER_DEFAULT;
- else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ else if (true != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms");
/* Read the data */
@@ -1216,7 +1216,7 @@ H5Dread_chunk(hid_t dset_id, hid_t dxpl_id, const hsize_t *offset, uint32_t *fil
/* Get the default dataset transfer property list if the user didn't provide one */
if (H5P_DEFAULT == dxpl_id)
dxpl_id = H5P_DATASET_XFER_DEFAULT;
- else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ else if (true != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dxpl_id is not a dataset transfer property list ID");
/* Set up VOL callback arguments */
@@ -1308,7 +1308,7 @@ H5D__write_api_common(size_t count, hid_t dset_id[], hid_t mem_type_id[], hid_t
/* Get the default dataset transfer property list if the user didn't provide one */
if (H5P_DEFAULT == dxpl_id)
dxpl_id = H5P_DATASET_XFER_DEFAULT;
- else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ else if (true != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms");
/* Write the data */
@@ -1534,7 +1534,7 @@ H5Dwrite_chunk(hid_t dset_id, hid_t dxpl_id, uint32_t filters, const hsize_t *of
/* Get the default dataset transfer property list if the user didn't provide one */
if (H5P_DEFAULT == dxpl_id)
dxpl_id = H5P_DATASET_XFER_DEFAULT;
- else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ else if (true != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dxpl_id is not a dataset transfer property list ID");
/* Set up VOL callback arguments */
@@ -1572,7 +1572,7 @@ H5Dscatter(H5D_scatter_func_t op, void *op_data, hid_t type_id, hid_t dst_space_
H5T_t *type; /* Datatype */
H5S_t *dst_space; /* Dataspace */
H5S_sel_iter_t *iter = NULL; /* Selection iteration info*/
- hbool_t iter_init = FALSE; /* Selection iteration info has been initialized */
+ bool iter_init = false; /* Selection iteration info has been initialized */
const void *src_buf = NULL; /* Source (contiguous) data buffer */
size_t src_buf_nbytes = 0; /* Size of src_buf */
size_t type_size; /* Datatype element size */
@@ -1608,7 +1608,7 @@ H5Dscatter(H5D_scatter_func_t op, void *op_data, hid_t type_id, hid_t dst_space_
/* Initialize selection iterator */
if (H5S_select_iter_init(iter, dst_space, type_size, 0) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize selection iterator information");
- iter_init = TRUE;
+ iter_init = true;
/* Loop until all data has been scattered */
while (nelmts > 0) {
@@ -1666,7 +1666,7 @@ H5Dgather(hid_t src_space_id, const void *src_buf, hid_t type_id, size_t dst_buf
H5T_t *type; /* Datatype */
H5S_t *src_space; /* Dataspace */
H5S_sel_iter_t *iter = NULL; /* Selection iteration info*/
- hbool_t iter_init = FALSE; /* Selection iteration info has been initialized */
+ bool iter_init = false; /* Selection iteration info has been initialized */
size_t type_size; /* Datatype element size */
hssize_t nelmts; /* Number of remaining elements in selection */
size_t dst_buf_nelmts; /* Number of elements that can fit in dst_buf */
@@ -1714,7 +1714,7 @@ H5Dgather(hid_t src_space_id, const void *src_buf, hid_t type_id, size_t dst_buf
/* Initialize selection iterator */
if (H5S_select_iter_init(iter, src_space, type_size, 0) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize selection iterator information");
- iter_init = TRUE;
+ iter_init = true;
/* Loop until all data has been scattered */
while (nelmts > 0) {
@@ -2477,7 +2477,7 @@ H5Dchunk_iter(hid_t dset_id, hid_t dxpl_id, H5D_chunk_iter_op_t op, void *op_dat
/* Get the default dataset transfer property list if the user didn't provide one */
if (H5P_DEFAULT == dxpl_id)
dxpl_id = H5P_DATASET_XFER_DEFAULT;
- else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ else if (true != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dxpl_id is not a dataset transfer property list ID");
/* Set up VOL callback arguments */
diff --git a/src/H5Dbtree.c b/src/H5Dbtree.c
index cb7aa1dec1c..d79f7d0b031 100644
--- a/src/H5Dbtree.c
+++ b/src/H5Dbtree.c
@@ -97,36 +97,36 @@ static herr_t H5D__btree_new_node(H5F_t *f, H5B_ins_t, void *_lt_key, void *_
haddr_t *addr_p /*out*/);
static int H5D__btree_cmp2(void *_lt_key, void *_udata, void *_rt_key);
static int H5D__btree_cmp3(void *_lt_key, void *_udata, void *_rt_key);
-static htri_t H5D__btree_found(H5F_t *f, haddr_t addr, const void *_lt_key, hbool_t *found, void *_udata);
-static H5B_ins_t H5D__btree_insert(H5F_t *f, haddr_t addr, void *_lt_key, hbool_t *lt_key_changed,
- void *_md_key, void *_udata, void *_rt_key, hbool_t *rt_key_changed,
+static htri_t H5D__btree_found(H5F_t *f, haddr_t addr, const void *_lt_key, bool *found, void *_udata);
+static H5B_ins_t H5D__btree_insert(H5F_t *f, haddr_t addr, void *_lt_key, bool *lt_key_changed, void *_md_key,
+ void *_udata, void *_rt_key, bool *rt_key_changed,
haddr_t *new_node /*out*/);
-static H5B_ins_t H5D__btree_remove(H5F_t *f, haddr_t addr, void *_lt_key, hbool_t *lt_key_changed,
- void *_udata, void *_rt_key, hbool_t *rt_key_changed);
+static H5B_ins_t H5D__btree_remove(H5F_t *f, haddr_t addr, void *_lt_key, bool *lt_key_changed, void *_udata,
+ void *_rt_key, bool *rt_key_changed);
static herr_t H5D__btree_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key);
static herr_t H5D__btree_encode_key(const H5B_shared_t *shared, uint8_t *raw, const void *_key);
static herr_t H5D__btree_debug_key(FILE *stream, int indent, int fwidth, const void *key, const void *udata);
/* Chunked layout indexing callbacks */
-static herr_t H5D__btree_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t *space,
- haddr_t dset_ohdr_addr);
-static herr_t H5D__btree_idx_create(const H5D_chk_idx_info_t *idx_info);
-static hbool_t H5D__btree_idx_is_space_alloc(const H5O_storage_chunk_t *storage);
-static herr_t H5D__btree_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata,
- const H5D_t *dset);
-static herr_t H5D__btree_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata);
-static int H5D__btree_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t chunk_cb,
- void *chunk_udata);
-static herr_t H5D__btree_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t *udata);
-static herr_t H5D__btree_idx_delete(const H5D_chk_idx_info_t *idx_info);
-static herr_t H5D__btree_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src,
- const H5D_chk_idx_info_t *idx_info_dst);
-static herr_t H5D__btree_idx_copy_shutdown(H5O_storage_chunk_t *storage_src,
- H5O_storage_chunk_t *storage_dst);
-static herr_t H5D__btree_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *size);
-static herr_t H5D__btree_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr);
-static herr_t H5D__btree_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream);
-static herr_t H5D__btree_idx_dest(const H5D_chk_idx_info_t *idx_info);
+static herr_t H5D__btree_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t *space,
+ haddr_t dset_ohdr_addr);
+static herr_t H5D__btree_idx_create(const H5D_chk_idx_info_t *idx_info);
+static bool H5D__btree_idx_is_space_alloc(const H5O_storage_chunk_t *storage);
+static herr_t H5D__btree_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata,
+ const H5D_t *dset);
+static herr_t H5D__btree_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata);
+static int H5D__btree_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t chunk_cb,
+ void *chunk_udata);
+static herr_t H5D__btree_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t *udata);
+static herr_t H5D__btree_idx_delete(const H5D_chk_idx_info_t *idx_info);
+static herr_t H5D__btree_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src,
+ const H5D_chk_idx_info_t *idx_info_dst);
+static herr_t H5D__btree_idx_copy_shutdown(H5O_storage_chunk_t *storage_src,
+ H5O_storage_chunk_t *storage_dst);
+static herr_t H5D__btree_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *size);
+static herr_t H5D__btree_idx_reset(H5O_storage_chunk_t *storage, bool reset_addr);
+static herr_t H5D__btree_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream);
+static herr_t H5D__btree_idx_dest(const H5D_chk_idx_info_t *idx_info);
/*********************/
/* Package Variables */
@@ -134,7 +134,7 @@ static herr_t H5D__btree_idx_dest(const H5D_chk_idx_info_t *idx_info);
/* v1 B-tree indexed chunk I/O ops */
const H5D_chunk_ops_t H5D_COPS_BTREE[1] = {{
- FALSE, /* v1 B-tree indices does not support SWMR access */
+ false, /* v1 B-tree indices does not support SWMR access */
H5D__btree_idx_init, /* insert */
H5D__btree_idx_create, /* create */
H5D__btree_idx_is_space_alloc, /* is_space_alloc */
@@ -166,8 +166,8 @@ static H5B_class_t H5B_BTREE[1] = {{
H5D__btree_cmp3, /*cmp3 */
H5D__btree_found, /*found */
H5D__btree_insert, /*insert */
- FALSE, /*follow min branch? */
- FALSE, /*follow max branch? */
+ false, /*follow min branch? */
+ false, /*follow max branch? */
H5B_LEFT, /*critical key */
H5D__btree_remove, /*remove */
H5D__btree_decode_key, /*decode */
@@ -397,7 +397,7 @@ H5D__btree_cmp3(void *_lt_key, void *_udata, void *_rt_key)
*-------------------------------------------------------------------------
*/
static htri_t
-H5D__btree_found(H5F_t H5_ATTR_UNUSED *f, haddr_t addr, const void *_lt_key, hbool_t *found, void *_udata)
+H5D__btree_found(H5F_t H5_ATTR_UNUSED *f, haddr_t addr, const void *_lt_key, bool *found, void *_udata)
{
H5D_chunk_ud_t *udata = (H5D_chunk_ud_t *)_udata;
const H5D_btree_key_t *lt_key = (const H5D_btree_key_t *)_lt_key;
@@ -416,7 +416,7 @@ H5D__btree_found(H5F_t H5_ATTR_UNUSED *f, haddr_t addr, const void *_lt_key, hbo
/* Is this *really* the requested chunk? */
for (u = 0; u < udata->common.layout->ndims; u++)
if (udata->common.scaled[u] >= (lt_key->scaled[u] + 1)) {
- *found = FALSE;
+ *found = false;
HGOTO_DONE(SUCCEED);
}
@@ -425,7 +425,7 @@ H5D__btree_found(H5F_t H5_ATTR_UNUSED *f, haddr_t addr, const void *_lt_key, hbo
udata->chunk_block.offset = addr;
udata->chunk_block.length = lt_key->nbytes;
udata->filter_mask = lt_key->filter_mask;
- *found = TRUE;
+ *found = true;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -436,18 +436,18 @@ H5D__btree_found(H5F_t H5_ATTR_UNUSED *f, haddr_t addr, const void *_lt_key, hbo
*
* Purpose: Determines if two chunks are disjoint.
*
- * Return: Success: FALSE if they are not disjoint.
- * TRUE if they are disjoint.
+ * Return: Success: false if they are not disjoint.
+ * true if they are disjoint.
*
* Note: Assumes that the chunk offsets are scaled coordinates
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
H5D__chunk_disjoint(unsigned n, const hsize_t *scaled1, const hsize_t *scaled2)
{
unsigned u; /* Local index variable */
- hbool_t ret_value = FALSE; /* Return value */
+ bool ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -459,7 +459,7 @@ H5D__chunk_disjoint(unsigned n, const hsize_t *scaled1, const hsize_t *scaled2)
/* Loop over two chunks, detecting disjointness and getting out quickly */
for (u = 0; u < n; u++)
if ((scaled1[u] + 1) <= scaled2[u] || (scaled2[u] + 1) <= scaled1[u])
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -492,8 +492,8 @@ H5D__chunk_disjoint(unsigned n, const hsize_t *scaled1, const hsize_t *scaled2)
*/
static H5B_ins_t
H5D__btree_insert(H5F_t H5_ATTR_NDEBUG_UNUSED *f, haddr_t H5_ATTR_NDEBUG_UNUSED addr, void *_lt_key,
- hbool_t *lt_key_changed, void *_md_key, void *_udata, void *_rt_key,
- hbool_t H5_ATTR_UNUSED *rt_key_changed, haddr_t *new_node_p /*out*/)
+ bool *lt_key_changed, void *_md_key, void *_udata, void *_rt_key,
+ bool H5_ATTR_UNUSED *rt_key_changed, haddr_t *new_node_p /*out*/)
{
H5D_btree_key_t *lt_key = (H5D_btree_key_t *)_lt_key;
H5D_btree_key_t *md_key = (H5D_btree_key_t *)_md_key;
@@ -534,7 +534,7 @@ H5D__btree_insert(H5F_t H5_ATTR_NDEBUG_UNUSED *f, haddr_t H5_ATTR_NDEBUG_UNUSED
*new_node_p = udata->chunk_block.offset;
H5_CHECKED_ASSIGN(lt_key->nbytes, uint32_t, udata->chunk_block.length, hsize_t);
lt_key->filter_mask = udata->filter_mask;
- *lt_key_changed = TRUE;
+ *lt_key_changed = true;
ret_value = H5B_INS_CHANGE;
}
else {
@@ -576,9 +576,9 @@ H5D__btree_insert(H5F_t H5_ATTR_NDEBUG_UNUSED *f, haddr_t H5_ATTR_NDEBUG_UNUSED
*-------------------------------------------------------------------------
*/
static H5B_ins_t
-H5D__btree_remove(H5F_t *f, haddr_t addr, void *_lt_key /*in,out */, hbool_t *lt_key_changed /*out */,
+H5D__btree_remove(H5F_t *f, haddr_t addr, void *_lt_key /*in,out */, bool *lt_key_changed /*out */,
void H5_ATTR_UNUSED *_udata /*in,out */, void H5_ATTR_UNUSED *_rt_key /*in,out */,
- hbool_t *rt_key_changed /*out */)
+ bool *rt_key_changed /*out */)
{
H5D_btree_key_t *lt_key = (H5D_btree_key_t *)_lt_key;
H5B_ins_t ret_value = H5B_INS_REMOVE; /* Return value */
@@ -591,8 +591,8 @@ H5D__btree_remove(H5F_t *f, haddr_t addr, void *_lt_key /*in,out */, hbool_t *lt
HGOTO_ERROR(H5E_STORAGE, H5E_CANTFREE, H5B_INS_ERROR, "unable to free chunk");
/* Mark keys as unchanged */
- *lt_key_changed = FALSE;
- *rt_key_changed = FALSE;
+ *lt_key_changed = false;
+ *rt_key_changed = false;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -708,7 +708,7 @@ H5D__btree_debug_key(FILE *stream, int indent, int fwidth, const void *_key, con
fprintf(stream, "%*s%-*s {", indent, "", fwidth, "Logical offset:");
for (u = 0; u < udata->ndims; u++)
fprintf(stream, "%s%" PRIuHSIZE, u ? ", " : "", (key->scaled[u] * udata->common.layout->dim[u]));
- HDfputs("}\n", stream);
+ fputs("}\n", stream);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__btree_debug_key() */
@@ -874,7 +874,7 @@ H5D__btree_idx_create(const H5D_chk_idx_info_t *idx_info)
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
H5D__btree_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
{
FUNC_ENTER_PACKAGE_NOERR
@@ -882,7 +882,7 @@ H5D__btree_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
/* Check args */
assert(storage);
- FUNC_LEAVE_NOAPI((hbool_t)H5_addr_defined(storage->idx_addr))
+ FUNC_LEAVE_NOAPI((bool)H5_addr_defined(storage->idx_addr))
} /* end H5D__btree_idx_is_space_alloc() */
/*-------------------------------------------------------------------------
@@ -935,8 +935,8 @@ H5D__btree_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata,
static herr_t
H5D__btree_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata)
{
- hbool_t found; /* Whether chunk was found */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool found; /* Whether chunk was found */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -950,7 +950,7 @@ H5D__btree_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udat
assert(udata);
/* Go get the chunk information from the B-tree */
- found = FALSE;
+ found = false;
if (H5B_find(idx_info->f, H5B_BTREE, idx_info->storage->idx_addr, &found, udata) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTFIND, FAIL, "can't check for chunk in B-tree");
@@ -1259,7 +1259,7 @@ H5D__btree_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size)
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__btree_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
+H5D__btree_idx_reset(H5O_storage_chunk_t *storage, bool reset_addr)
{
FUNC_ENTER_PACKAGE_NOERR
@@ -1343,7 +1343,7 @@ H5D_btree_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, un
H5D_btree_dbg_t udata; /* User data for B-tree callback */
H5O_storage_chunk_t storage; /* Storage information for B-tree callback */
H5O_layout_chunk_t layout; /* Layout information for B-tree callback */
- hbool_t shared_init = FALSE; /* Whether B-tree shared info is initialized */
+ bool shared_init = false; /* Whether B-tree shared info is initialized */
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
@@ -1362,7 +1362,7 @@ H5D_btree_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, un
/* Allocate the shared structure */
if (H5D__btree_shared_create(f, &storage, &layout) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't create wrapper for shared B-tree info");
- shared_init = TRUE;
+ shared_init = true;
/* Set up user data for callback */
udata.common.layout = &layout;
diff --git a/src/H5Dbtree2.c b/src/H5Dbtree2.c
index 7fe83976bbd..4da9555d0c0 100644
--- a/src/H5Dbtree2.c
+++ b/src/H5Dbtree2.c
@@ -108,27 +108,27 @@ static herr_t H5D__bt2_found_cb(const void *nrecord, void *op_data);
static herr_t H5D__bt2_remove_cb(const void *nrecord, void *_udata);
/* Callback for H5B2_update() which is called in H5D__bt2_idx_insert() */
-static herr_t H5D__bt2_mod_cb(void *_record, void *_op_data, hbool_t *changed);
+static herr_t H5D__bt2_mod_cb(void *_record, void *_op_data, bool *changed);
/* Chunked layout indexing callbacks for v2 B-tree indexing */
-static herr_t H5D__bt2_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t *space,
- haddr_t dset_ohdr_addr);
-static herr_t H5D__bt2_idx_create(const H5D_chk_idx_info_t *idx_info);
-static hbool_t H5D__bt2_idx_is_space_alloc(const H5O_storage_chunk_t *storage);
-static herr_t H5D__bt2_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata,
- const H5D_t *dset);
-static herr_t H5D__bt2_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata);
-static int H5D__bt2_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t chunk_cb,
- void *chunk_udata);
-static herr_t H5D__bt2_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t *udata);
-static herr_t H5D__bt2_idx_delete(const H5D_chk_idx_info_t *idx_info);
-static herr_t H5D__bt2_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src,
- const H5D_chk_idx_info_t *idx_info_dst);
-static herr_t H5D__bt2_idx_copy_shutdown(H5O_storage_chunk_t *storage_src, H5O_storage_chunk_t *storage_dst);
-static herr_t H5D__bt2_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *size);
-static herr_t H5D__bt2_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr);
-static herr_t H5D__bt2_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream);
-static herr_t H5D__bt2_idx_dest(const H5D_chk_idx_info_t *idx_info);
+static herr_t H5D__bt2_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t *space,
+ haddr_t dset_ohdr_addr);
+static herr_t H5D__bt2_idx_create(const H5D_chk_idx_info_t *idx_info);
+static bool H5D__bt2_idx_is_space_alloc(const H5O_storage_chunk_t *storage);
+static herr_t H5D__bt2_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata,
+ const H5D_t *dset);
+static herr_t H5D__bt2_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata);
+static int H5D__bt2_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t chunk_cb,
+ void *chunk_udata);
+static herr_t H5D__bt2_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t *udata);
+static herr_t H5D__bt2_idx_delete(const H5D_chk_idx_info_t *idx_info);
+static herr_t H5D__bt2_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src,
+ const H5D_chk_idx_info_t *idx_info_dst);
+static herr_t H5D__bt2_idx_copy_shutdown(H5O_storage_chunk_t *storage_src, H5O_storage_chunk_t *storage_dst);
+static herr_t H5D__bt2_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *size);
+static herr_t H5D__bt2_idx_reset(H5O_storage_chunk_t *storage, bool reset_addr);
+static herr_t H5D__bt2_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream);
+static herr_t H5D__bt2_idx_dest(const H5D_chk_idx_info_t *idx_info);
/*********************/
/* Package Variables */
@@ -136,7 +136,7 @@ static herr_t H5D__bt2_idx_dest(const H5D_chk_idx_info_t *idx_info);
/* Chunked dataset I/O ops for v2 B-tree indexing */
const H5D_chunk_ops_t H5D_COPS_BT2[1] = {{
- TRUE, /* Fixed array indices support SWMR access */
+ true, /* Fixed array indices support SWMR access */
H5D__bt2_idx_init, /* init */
H5D__bt2_idx_create, /* create */
H5D__bt2_idx_is_space_alloc, /* is_space_alloc */
@@ -431,7 +431,7 @@ H5D__bt2_unfilt_debug(FILE *stream, int indent, int fwidth, const void *_record,
fprintf(stream, "%*s%-*s {", indent, "", fwidth, "Logical offset:");
for (u = 0; u < ctx->ndims; u++)
fprintf(stream, "%s%" PRIuHSIZE, u ? ", " : "", record->scaled[u] * ctx->dim[u]);
- HDfputs("}\n", stream);
+ fputs("}\n", stream);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5D__bt2_unfilt_debug() */
@@ -541,7 +541,7 @@ H5D__bt2_filt_debug(FILE *stream, int indent, int fwidth, const void *_record, c
fprintf(stream, "%*s%-*s {", indent, "", fwidth, "Logical offset:");
for (u = 0; u < ctx->ndims; u++)
fprintf(stream, "%s%" PRIuHSIZE, u ? ", " : "", record->scaled[u] * ctx->dim[u]);
- HDfputs("}\n", stream);
+ fputs("}\n", stream);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5D__bt2_filt_debug() */
@@ -608,7 +608,7 @@ H5D__btree2_idx_depend(const H5D_chk_idx_info_t *idx_info)
oloc.addr = idx_info->storage->u.btree.dset_ohdr_addr;
/* Get header */
- if (NULL == (oh = H5O_protect(&oloc, H5AC__READ_ONLY_FLAG, TRUE)))
+ if (NULL == (oh = H5O_protect(&oloc, H5AC__READ_ONLY_FLAG, true)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTPROTECT, FAIL, "unable to protect object header");
/* Retrieve the dataset's object header proxy */
@@ -766,7 +766,7 @@ H5D__bt2_idx_create(const H5D_chk_idx_info_t *idx_info)
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
H5D__bt2_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
{
FUNC_ENTER_PACKAGE_NOERR
@@ -774,7 +774,7 @@ H5D__bt2_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
/* Check args */
assert(storage);
- FUNC_LEAVE_NOAPI((hbool_t)H5_addr_defined(storage->idx_addr))
+ FUNC_LEAVE_NOAPI((bool)H5_addr_defined(storage->idx_addr))
} /* end H5D__bt2_idx_is_space_alloc() */
/*-------------------------------------------------------------------------
@@ -790,7 +790,7 @@ H5D__bt2_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__bt2_mod_cb(void *_record, void *_op_data, hbool_t *changed)
+H5D__bt2_mod_cb(void *_record, void *_op_data, bool *changed)
{
H5D_bt2_ud_t *op_data = (H5D_bt2_ud_t *)_op_data; /* User data for v2 B-tree calls */
H5D_chunk_rec_t *record = (H5D_chunk_rec_t *)_record; /* Chunk record */
@@ -811,7 +811,7 @@ H5D__bt2_mod_cb(void *_record, void *_op_data, hbool_t *changed)
*record = op_data->rec;
/* Note that the record changed */
- *changed = TRUE;
+ *changed = true;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__bt2_mod_cb() */
@@ -928,7 +928,7 @@ H5D__bt2_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata)
H5D_bt2_ud_t bt2_udata; /* User data for v2 B-tree calls */
H5D_chunk_rec_t found_rec; /* Record found from searching for object */
unsigned u; /* Local index variable */
- hbool_t found; /* Whether chunk was found */
+ bool found; /* Whether chunk was found */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -970,7 +970,7 @@ H5D__bt2_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata)
bt2_udata.rec.scaled[u] = udata->common.scaled[u];
/* Go get chunk information from v2 B-tree */
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &bt2_udata, &found, H5D__bt2_found_cb, &found_rec) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTFIND, FAIL, "can't check for chunk in v2 B-tree");
@@ -1376,7 +1376,7 @@ H5D__bt2_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size)
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__bt2_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
+H5D__bt2_idx_reset(H5O_storage_chunk_t *storage, bool reset_addr)
{
FUNC_ENTER_PACKAGE_NOERR
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index 8f34c2f4295..9f4bd90b68a 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -125,9 +125,9 @@
/* Raw data chunks are cached. Each entry in the cache is: */
typedef struct H5D_rdcc_ent_t {
- hbool_t locked; /*entry is locked in cache */
- hbool_t dirty; /*needs to be written to disk? */
- hbool_t deleted; /*chunk about to be deleted */
+ bool locked; /*entry is locked in cache */
+ bool dirty; /*needs to be written to disk? */
+ bool deleted; /*chunk about to be deleted */
unsigned edge_chunk_state; /*states related to edge chunks (see above) */
hsize_t scaled[H5O_LAYOUT_NDIMS]; /*scaled chunk 'name' (coordinates) */
uint32_t rd_count; /*bytes remaining to be read */
@@ -150,12 +150,12 @@ typedef struct H5D_chunk_it_ud1_t {
const H5D_io_info_t *io_info; /* I/O info for dataset operation */
const H5D_dset_io_info_t *dset_info; /* Dataset specific I/O info */
const hsize_t *space_dim; /* New dataset dimensions */
- const hbool_t *shrunk_dim; /* Dimensions which have been shrunk */
+ const bool *shrunk_dim; /* Dimensions which have been shrunk */
H5S_t *chunk_space; /* Dataspace for a chunk */
uint32_t elmts_per_chunk; /* Elements in chunk */
hsize_t *hyper_start; /* Starting location of hyperslab */
H5D_fill_buf_info_t fb_info; /* Dataset's fill buffer info */
- hbool_t fb_info_init; /* Whether the fill value buffer has been initialized */
+ bool fb_info_init; /* Whether the fill value buffer has been initialized */
} H5D_chunk_it_ud1_t;
/* Callback info for iteration to obtain chunk address and the index of the chunk for all chunks in the
@@ -176,7 +176,7 @@ typedef struct H5D_chunk_it_ud3_t {
void *buf; /* Buffer to hold chunk data for read/write */
void *bkg; /* Buffer for background information during type conversion */
size_t buf_size; /* Buffer size */
- hbool_t do_convert; /* Whether to perform type conversions */
+ bool do_convert; /* Whether to perform type conversions */
/* needed for converting variable-length data */
hid_t tid_src; /* Datatype ID for source datatype */
@@ -199,14 +199,14 @@ typedef struct H5D_chunk_it_ud3_t {
H5O_copy_t *cpy_info; /* Copy options */
/* needed for getting raw data from chunk cache */
- hbool_t chunk_in_cache;
+ bool chunk_in_cache;
uint8_t *chunk; /* the unfiltered chunk data */
} H5D_chunk_it_ud3_t;
/* Callback info for iteration to dump index */
typedef struct H5D_chunk_it_ud4_t {
FILE *stream; /* Output stream */
- hbool_t header_displayed; /* Node's header is displayed? */
+ bool header_displayed; /* Node's header is displayed? */
unsigned ndims; /* Number of dimensions for chunk/dataset */
uint32_t *chunk_dim; /* Chunk dimensions */
} H5D_chunk_it_ud4_t;
@@ -234,7 +234,7 @@ typedef struct H5D_chunk_info_iter_ud_t {
hsize_t chunk_idx; /* Chunk index, where the iteration needs to stop */
hsize_t curr_idx; /* Current index, where the iteration is */
unsigned idx_hint; /* Index of chunk in cache, if present */
- hbool_t found; /* Whether the chunk was found */
+ bool found; /* Whether the chunk was found */
} H5D_chunk_info_iter_ud_t;
#ifdef H5_HAVE_PARALLEL
@@ -244,7 +244,7 @@ typedef struct H5D_chunk_coll_fill_info_t {
struct chunk_coll_fill_info {
haddr_t addr; /* File address of the chunk */
size_t chunk_size; /* Size of the chunk in the file */
- hbool_t unfiltered_partial_chunk;
+ bool unfiltered_partial_chunk;
} * chunk_info;
} H5D_chunk_coll_fill_info_t;
#endif /* H5_HAVE_PARALLEL */
@@ -291,7 +291,7 @@ static herr_t H5D__chunk_set_info_real(H5O_layout_chunk_t *layout, unsigned nd
const hsize_t *max_dims);
static herr_t H5D__chunk_cinfo_cache_reset(H5D_chunk_cached_t *last);
static herr_t H5D__chunk_cinfo_cache_update(H5D_chunk_cached_t *last, const H5D_chunk_ud_t *udata);
-static hbool_t H5D__chunk_cinfo_cache_found(const H5D_chunk_cached_t *last, H5D_chunk_ud_t *udata);
+static bool H5D__chunk_cinfo_cache_found(const H5D_chunk_cached_t *last, H5D_chunk_ud_t *udata);
static herr_t H5D__create_piece_map_single(H5D_dset_io_info_t *di, H5D_io_info_t *io_info);
static herr_t H5D__create_piece_file_map_all(H5D_dset_io_info_t *di, H5D_io_info_t *io_info);
static herr_t H5D__create_piece_file_map_hyper(H5D_dset_io_info_t *di, H5D_io_info_t *io_info);
@@ -303,14 +303,14 @@ static herr_t H5D__piece_mem_cb(void *elem, const H5T_t *type, unsigned ndims,
void *_opdata);
static herr_t H5D__chunk_may_use_select_io(H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_info);
static unsigned H5D__chunk_hash_val(const H5D_shared_t *shared, const hsize_t *scaled);
-static herr_t H5D__chunk_flush_entry(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t reset);
-static herr_t H5D__chunk_cache_evict(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t flush);
+static herr_t H5D__chunk_flush_entry(const H5D_t *dset, H5D_rdcc_ent_t *ent, bool reset);
+static herr_t H5D__chunk_cache_evict(const H5D_t *dset, H5D_rdcc_ent_t *ent, bool flush);
static void *H5D__chunk_lock(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_info,
- H5D_chunk_ud_t *udata, hbool_t relax, hbool_t prev_unfilt_chunk);
+ H5D_chunk_ud_t *udata, bool relax, bool prev_unfilt_chunk);
static herr_t H5D__chunk_unlock(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_info,
- const H5D_chunk_ud_t *udata, hbool_t dirty, void *chunk, uint32_t naccessed);
+ const H5D_chunk_ud_t *udata, bool dirty, void *chunk, uint32_t naccessed);
static herr_t H5D__chunk_cache_prune(const H5D_t *dset, size_t size);
-static herr_t H5D__chunk_prune_fill(H5D_chunk_it_ud1_t *udata, hbool_t new_unfilt_chunk);
+static herr_t H5D__chunk_prune_fill(H5D_chunk_it_ud1_t *udata, bool new_unfilt_chunk);
#ifdef H5_HAVE_PARALLEL
static herr_t H5D__chunk_collective_fill(const H5D_t *dset, H5D_chunk_coll_fill_info_t *chunk_fill_info,
const void *fill_buf, const void *partial_chunk_fill_buf);
@@ -384,7 +384,7 @@ H5D__chunk_direct_write(H5D_t *dset, uint32_t filters, hsize_t *offset, uint32_t
H5F_block_t old_chunk; /* Offset/length of old chunk */
H5D_chk_idx_info_t idx_info; /* Chunked index info */
hsize_t scaled[H5S_MAX_RANK]; /* Scaled coordinates for this chunk */
- hbool_t need_insert = FALSE; /* Whether the chunk needs to be inserted into the index */
+ bool need_insert = false; /* Whether the chunk needs to be inserted into the index */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE_TAG(dset->oloc.addr)
@@ -394,7 +394,7 @@ H5D__chunk_direct_write(H5D_t *dset, uint32_t filters, hsize_t *offset, uint32_t
/* Allocate dataspace and initialize it if it hasn't been. */
if (!H5D__chunk_is_space_alloc(&layout->storage))
- if (H5D__alloc_storage(dset, H5D_ALLOC_WRITE, FALSE, NULL) < 0)
+ if (H5D__alloc_storage(dset, H5D_ALLOC_WRITE, false, NULL) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize storage");
/* Calculate the index of this chunk */
@@ -429,7 +429,7 @@ H5D__chunk_direct_write(H5D_t *dset, uint32_t filters, hsize_t *offset, uint32_t
if (0 == idx_info.pline->nused && H5_addr_defined(old_chunk.offset))
/* If there are no filters and we are overwriting the chunk we can just set values */
- need_insert = FALSE;
+ need_insert = false;
else {
/* Otherwise, create the chunk it if it doesn't exist, or reallocate the chunk
* if its size has changed.
@@ -450,7 +450,7 @@ H5D__chunk_direct_write(H5D_t *dset, uint32_t filters, hsize_t *offset, uint32_t
if (UINT_MAX != udata.idx_hint) {
const H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /*raw data chunk cache */
- if (H5D__chunk_cache_evict(dset, rdcc->slot[udata.idx_hint], FALSE) < 0)
+ if (H5D__chunk_cache_evict(dset, rdcc->slot[udata.idx_hint], false) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "unable to evict chunk");
} /* end if */
@@ -525,13 +525,13 @@ H5D__chunk_direct_read(const H5D_t *dset, hsize_t *offset, uint32_t *filters, vo
/* Check if the requested chunk exists in the chunk cache */
if (UINT_MAX != udata.idx_hint) {
H5D_rdcc_ent_t *ent = rdcc->slot[udata.idx_hint];
- hbool_t flush;
+ bool flush;
/* Sanity checks */
assert(udata.idx_hint < rdcc->nslots);
assert(rdcc->slot[udata.idx_hint]);
- flush = (ent->dirty == TRUE) ? TRUE : FALSE;
+ flush = (ent->dirty == true) ? true : false;
/* Flush the chunk to disk and clear the cache entry */
if (H5D__chunk_cache_evict(dset, rdcc->slot[udata.idx_hint], flush) < 0)
@@ -625,9 +625,9 @@ H5D__get_chunk_storage_size(H5D_t *dset, const hsize_t *offset, hsize_t *storage
assert(rdcc->slot[udata.idx_hint]);
/* If the cached chunk is dirty, it must be flushed to get accurate size */
- if (ent->dirty == TRUE) {
+ if (ent->dirty == true) {
/* Flush the chunk to disk and clear the cache entry */
- if (H5D__chunk_cache_evict(dset, rdcc->slot[udata.idx_hint], TRUE) < 0)
+ if (H5D__chunk_cache_evict(dset, rdcc->slot[udata.idx_hint], true) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "unable to evict chunk");
/* Reset fields about the chunk we are looking for */
@@ -856,7 +856,7 @@ H5D__chunk_construct(H5F_t H5_ATTR_UNUSED *f, H5D_t *dset)
} /* end for */
/* Reset address and pointer of the array struct for the chunked storage index */
- if (H5D_chunk_idx_reset(&dset->shared->layout.storage.u.chunk, TRUE) < 0)
+ if (H5D_chunk_idx_reset(&dset->shared->layout.storage.u.chunk, true) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to reset chunked storage index");
done:
@@ -982,11 +982,11 @@ H5D__chunk_init(H5F_t *f, const H5D_t *const dset, hid_t dapl_id)
*
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
H5D__chunk_is_space_alloc(const H5O_storage_t *storage)
{
const H5O_storage_chunk_t *sc = &(storage->u.chunk);
- hbool_t ret_value = FALSE; /* Return value */
+ bool ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -1009,7 +1009,7 @@ H5D__chunk_is_space_alloc(const H5O_storage_t *storage)
*
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
H5D__chunk_is_data_cached(const H5D_shared_t *shared_dset)
{
FUNC_ENTER_PACKAGE_NOERR
@@ -1035,7 +1035,7 @@ H5D__chunk_io_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
const H5D_t *dataset = dinfo->dset; /* Local pointer to dataset info */
H5D_chunk_map_t *fm; /* Convenience pointer to chunk map */
hssize_t old_offset[H5O_LAYOUT_NDIMS]; /* Old selection offset */
- htri_t file_space_normalized = FALSE; /* File dataspace was normalized */
+ htri_t file_space_normalized = false; /* File dataspace was normalized */
unsigned f_ndims; /* The number of dimensions of the file's dataspace */
int sm_ndims; /* The number of dimensions of the memory buffer's dataspace (signed) */
unsigned u; /* Local index variable */
@@ -1114,8 +1114,33 @@ H5D__chunk_io_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
}
}
+#ifdef H5_HAVE_PARALLEL
+ /*
+ * If collective metadata reads are enabled, ensure all ranks
+ * have the dataset's chunk index open (if it was created) to
+ * prevent possible metadata inconsistency issues or unintentional
+ * independent metadata reads later on.
+ */
+ if (H5F_SHARED_HAS_FEATURE(io_info->f_sh, H5FD_FEAT_HAS_MPI) &&
+ H5F_shared_get_coll_metadata_reads(io_info->f_sh) &&
+ H5D__chunk_is_space_alloc(&dataset->shared->layout.storage)) {
+ H5D_chunk_ud_t udata;
+ hsize_t scaled[H5O_LAYOUT_NDIMS] = {0};
+
+ /*
+ * TODO: Until the dataset chunk index callback structure has
+ * callbacks for checking if an index is opened and also for
+ * directly opening the index, the following fake chunk lookup
+ * serves the purpose of forcing a chunk index open operation
+ * on all ranks
+ */
+ if (H5D__chunk_lookup(dataset, scaled, &udata) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to collectively open dataset chunk index");
+ }
+#endif
+
done:
- if (file_space_normalized == TRUE)
+ if (file_space_normalized == true)
if (H5S_hyper_denormalize_offset(dinfo->file_space, old_offset) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't denormalize selection");
@@ -1139,7 +1164,7 @@ H5D__chunk_io_init_selections(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
const H5T_t *mem_type; /* Local pointer to memory datatype */
H5S_t *tmp_mspace = NULL; /* Temporary memory dataspace */
H5T_t *file_type = NULL; /* Temporary copy of file datatype for iteration */
- hbool_t iter_init = FALSE; /* Selection iteration info has been initialized */
+ bool iter_init = false; /* Selection iteration info has been initialized */
char bogus; /* "bogus" buffer to pass to selection iterator */
H5D_io_info_wrap_t io_info_wrap;
herr_t ret_value = SUCCEED; /* Return value */
@@ -1163,12 +1188,12 @@ H5D__chunk_io_init_selections(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
#endif /* H5_HAVE_PARALLEL */
&& H5S_SEL_ALL != H5S_GET_SELECT_TYPE(dinfo->file_space)) {
/* Initialize skip list for chunk selections */
- fm->use_single = TRUE;
+ fm->use_single = true;
/* Initialize single chunk dataspace */
if (NULL == dataset->shared->cache.chunk.single_space) {
/* Make a copy of the dataspace for the dataset */
- if ((dataset->shared->cache.chunk.single_space = H5S_copy(dinfo->file_space, TRUE, FALSE)) ==
+ if ((dataset->shared->cache.chunk.single_space = H5S_copy(dinfo->file_space, true, false)) ==
NULL)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy file space");
@@ -1177,7 +1202,7 @@ H5D__chunk_io_init_selections(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't adjust chunk dimensions");
/* Set the single chunk dataspace to 'all' selection */
- if (H5S_select_all(dataset->shared->cache.chunk.single_space, TRUE) < 0)
+ if (H5S_select_all(dataset->shared->cache.chunk.single_space, true) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSELECT, FAIL, "unable to set all selection");
} /* end if */
fm->single_space = dataset->shared->cache.chunk.single_space;
@@ -1199,7 +1224,7 @@ H5D__chunk_io_init_selections(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
"unable to create chunk selections for single element");
} /* end if */
else {
- hbool_t sel_hyper_flag; /* Whether file selection is a hyperslab */
+ bool sel_hyper_flag; /* Whether file selection is a hyperslab */
/* Initialize skip list for chunk selections */
if (NULL == dataset->shared->cache.chunk.sel_chunks)
@@ -1209,7 +1234,7 @@ H5D__chunk_io_init_selections(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
assert(fm->dset_sel_pieces);
/* We are not using single element mode */
- fm->use_single = FALSE;
+ fm->use_single = false;
/* Get type of selection on disk & in memory */
if ((fm->fsel_type = H5S_GET_SELECT_TYPE(dinfo->file_space)) < H5S_SEL_NONE)
@@ -1217,11 +1242,11 @@ H5D__chunk_io_init_selections(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
if ((fm->msel_type = H5S_GET_SELECT_TYPE(dinfo->mem_space)) < H5S_SEL_NONE)
HGOTO_ERROR(H5E_DATASET, H5E_BADSELECT, FAIL, "unable to get type of selection");
- /* If the selection is NONE or POINTS, set the flag to FALSE */
+ /* If the selection is NONE or POINTS, set the flag to false */
if (fm->fsel_type == H5S_SEL_POINTS || fm->fsel_type == H5S_SEL_NONE)
- sel_hyper_flag = FALSE;
+ sel_hyper_flag = false;
else
- sel_hyper_flag = TRUE;
+ sel_hyper_flag = true;
/* Check if file selection is a not a hyperslab selection */
if (sel_hyper_flag) {
@@ -1261,7 +1286,7 @@ H5D__chunk_io_init_selections(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
} /* end else */
/* Build the memory selection for each chunk */
- if (sel_hyper_flag && H5S_SELECT_SHAPE_SAME(dinfo->file_space, dinfo->mem_space) == TRUE) {
+ if (sel_hyper_flag && H5S_SELECT_SHAPE_SAME(dinfo->file_space, dinfo->mem_space) == true) {
/* Reset chunk template information */
fm->mchunk_tmpl = NULL;
@@ -1281,7 +1306,7 @@ H5D__chunk_io_init_selections(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
size_t elmt_size; /* Memory datatype size */
/* Make a copy of equivalent memory space */
- if ((tmp_mspace = H5S_copy(dinfo->mem_space, TRUE, FALSE)) == NULL)
+ if ((tmp_mspace = H5S_copy(dinfo->mem_space, true, false)) == NULL)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy memory space");
/* De-select the mem space copy */
@@ -1301,7 +1326,7 @@ H5D__chunk_io_init_selections(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
HGOTO_ERROR(H5E_DATATYPE, H5E_BADSIZE, FAIL, "datatype size invalid");
if (H5S_select_iter_init(&(fm->mem_iter), dinfo->mem_space, elmt_size, 0) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator");
- iter_init = TRUE; /* Selection iteration info has been initialized */
+ iter_init = true; /* Selection iteration info has been initialized */
/* set opdata for H5D__piece_mem_cb */
io_info_wrap.io_info = io_info;
@@ -1466,7 +1491,7 @@ H5D__free_piece_info(void *item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSED *
if (!piece_info->fspace_shared)
(void)H5S_close(piece_info->fspace);
else
- H5S_select_all(piece_info->fspace, TRUE);
+ H5S_select_all(piece_info->fspace, true);
/* Close the piece's memory dataspace, if it's not shared */
if (!piece_info->mspace_shared && piece_info->mspace)
@@ -1533,7 +1558,7 @@ H5D__create_piece_map_single(H5D_dset_io_info_t *di, H5D_io_info_t *io_info)
H5VM_array_offset_pre(fm->f_ndims, di->layout->u.chunk.down_chunks, piece_info->scaled);
/* Copy selection for file's dataspace into chunk dataspace */
- if (H5S_select_copy(fm->single_space, di->file_space, FALSE) < 0)
+ if (H5S_select_copy(fm->single_space, di->file_space, false) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy file selection");
/* Move selection back to have correct offset in chunk */
@@ -1544,18 +1569,21 @@ H5D__create_piece_map_single(H5D_dset_io_info_t *di, H5D_io_info_t *io_info)
piece_info->fspace = fm->single_space;
/* Indicate that the chunk's file dataspace is shared */
- piece_info->fspace_shared = TRUE;
+ piece_info->fspace_shared = true;
/* Just point at the memory dataspace & selection */
piece_info->mspace = di->mem_space;
/* Indicate that the chunk's memory dataspace is shared */
- piece_info->mspace_shared = TRUE;
+ piece_info->mspace_shared = true;
/* Initialize in-place type conversion info. Start with it disabled. */
- piece_info->in_place_tconv = FALSE;
+ piece_info->in_place_tconv = false;
piece_info->buf_off = 0;
+ /* Check if chunk is in a dataset with filters applied */
+ piece_info->filtered_dset = di->dset->shared->dcpl_cache.pline.nused > 0;
+
/* make connection to related dset info from this piece_info */
piece_info->dset_info = di;
@@ -1590,7 +1618,8 @@ H5D__create_piece_file_map_all(H5D_dset_io_info_t *di, H5D_io_info_t *io_info)
hsize_t chunk_index; /* "Index" of chunk */
hsize_t curr_partial_clip[H5S_MAX_RANK]; /* Current partial dimension sizes to clip against */
hsize_t partial_dim_size[H5S_MAX_RANK]; /* Size of a partial dimension */
- hbool_t is_partial_dim[H5S_MAX_RANK]; /* Whether a dimension is currently a partial chunk */
+ bool is_partial_dim[H5S_MAX_RANK]; /* Whether a dimension is currently a partial chunk */
+ bool filtered_dataset; /* Whether the dataset in question has filters applied */
unsigned num_partial_dims; /* Current number of partial dimensions */
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
@@ -1628,18 +1657,21 @@ H5D__create_piece_file_map_all(H5D_dset_io_info_t *di, H5D_io_info_t *io_info)
partial_dim_size[u] = file_dims[u] % fm->chunk_dim[u];
if (file_dims[u] < fm->chunk_dim[u]) {
curr_partial_clip[u] = partial_dim_size[u];
- is_partial_dim[u] = TRUE;
+ is_partial_dim[u] = true;
num_partial_dims++;
} /* end if */
else {
curr_partial_clip[u] = fm->chunk_dim[u];
- is_partial_dim[u] = FALSE;
+ is_partial_dim[u] = false;
} /* end else */
} /* end for */
/* Set the index of this chunk */
chunk_index = 0;
+ /* Check whether dataset has filters applied */
+ filtered_dataset = di->dset->shared->dcpl_cache.pline.nused > 0;
+
/* Create "temporary" chunk for selection operations (copy file space) */
if (NULL == (tmp_fchunk = H5S_create_simple(fm->f_ndims, fm->chunk_dim, NULL)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTCREATE, FAIL, "unable to create dataspace for chunk");
@@ -1661,9 +1693,9 @@ H5D__create_piece_file_map_all(H5D_dset_io_info_t *di, H5D_io_info_t *io_info)
new_piece_info->index = chunk_index;
/* Set the file chunk dataspace */
- if (NULL == (new_piece_info->fspace = H5S_copy(tmp_fchunk, TRUE, FALSE)))
+ if (NULL == (new_piece_info->fspace = H5S_copy(tmp_fchunk, true, false)))
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy chunk dataspace");
- new_piece_info->fspace_shared = FALSE;
+ new_piece_info->fspace_shared = false;
/* If there are partial dimensions for this chunk, set the hyperslab for them */
if (num_partial_dims > 0)
@@ -1673,7 +1705,7 @@ H5D__create_piece_file_map_all(H5D_dset_io_info_t *di, H5D_io_info_t *io_info)
/* Set the memory chunk dataspace */
new_piece_info->mspace = NULL;
- new_piece_info->mspace_shared = FALSE;
+ new_piece_info->mspace_shared = false;
/* Copy the chunk's scaled coordinates */
H5MM_memcpy(new_piece_info->scaled, scaled, sizeof(hsize_t) * fm->f_ndims);
@@ -1683,9 +1715,11 @@ H5D__create_piece_file_map_all(H5D_dset_io_info_t *di, H5D_io_info_t *io_info)
new_piece_info->dset_info = di;
/* Initialize in-place type conversion info. Start with it disabled. */
- new_piece_info->in_place_tconv = FALSE;
+ new_piece_info->in_place_tconv = false;
new_piece_info->buf_off = 0;
+ new_piece_info->filtered_dset = filtered_dataset;
+
/* Insert the new chunk into the skip list */
if (H5SL_insert(fm->dset_sel_pieces, new_piece_info, &new_piece_info->index) < 0) {
H5D__free_piece_info(new_piece_info, NULL, NULL);
@@ -1732,7 +1766,7 @@ H5D__create_piece_file_map_all(H5D_dset_io_info_t *di, H5D_io_info_t *io_info)
/* Reset partial chunk information for this dimension */
curr_partial_clip[curr_dim] = fm->chunk_dim[curr_dim];
- is_partial_dim[curr_dim] = FALSE;
+ is_partial_dim[curr_dim] = false;
num_partial_dims--;
} /* end if */
@@ -1755,7 +1789,7 @@ H5D__create_piece_file_map_all(H5D_dset_io_info_t *di, H5D_io_info_t *io_info)
if (!is_partial_dim[curr_dim] && file_dims[curr_dim] <= end[curr_dim]) {
/* Set partial chunk information for this dimension */
curr_partial_clip[curr_dim] = partial_dim_size[curr_dim];
- is_partial_dim[curr_dim] = TRUE;
+ is_partial_dim[curr_dim] = true;
num_partial_dims++;
/* Sanity check */
@@ -1798,6 +1832,7 @@ H5D__create_piece_file_map_hyper(H5D_dset_io_info_t *dinfo, H5D_io_info_t *io_in
hsize_t chunk_index; /* Index of chunk */
hsize_t start_scaled[H5S_MAX_RANK]; /* Starting scaled coordinates of selection */
hsize_t scaled[H5S_MAX_RANK]; /* Scaled coordinates for this chunk */
+ bool filtered_dataset; /* Whether the dataset in question has filters applied */
int curr_dim; /* Current dimension to increment */
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
@@ -1831,10 +1866,13 @@ H5D__create_piece_file_map_hyper(H5D_dset_io_info_t *dinfo, H5D_io_info_t *io_in
/* Calculate the index of this chunk */
chunk_index = H5VM_array_offset_pre(fm->f_ndims, dinfo->layout->u.chunk.down_chunks, scaled);
+ /* Check whether dataset has filters applied */
+ filtered_dataset = dinfo->dset->shared->dcpl_cache.pline.nused > 0;
+
/* Iterate through each chunk in the dataset */
while (sel_points) {
/* Check for intersection of current chunk and file selection */
- if (TRUE == H5S_SELECT_INTERSECT_BLOCK(dinfo->file_space, coords, end)) {
+ if (true == H5S_SELECT_INTERSECT_BLOCK(dinfo->file_space, coords, end)) {
H5D_piece_info_t *new_piece_info; /* chunk information to insert into skip list */
hsize_t chunk_points; /* Number of elements in chunk selection */
@@ -1867,12 +1905,12 @@ H5D__create_piece_file_map_hyper(H5D_dset_io_info_t *dinfo, H5D_io_info_t *io_in
/* Set the file chunk dataspace */
new_piece_info->fspace = tmp_fchunk;
- new_piece_info->fspace_shared = FALSE;
+ new_piece_info->fspace_shared = false;
tmp_fchunk = NULL;
/* Set the memory chunk dataspace */
new_piece_info->mspace = NULL;
- new_piece_info->mspace_shared = FALSE;
+ new_piece_info->mspace_shared = false;
/* Copy the chunk's scaled coordinates */
H5MM_memcpy(new_piece_info->scaled, scaled, sizeof(hsize_t) * fm->f_ndims);
@@ -1882,9 +1920,11 @@ H5D__create_piece_file_map_hyper(H5D_dset_io_info_t *dinfo, H5D_io_info_t *io_in
new_piece_info->dset_info = dinfo;
/* Initialize in-place type conversion info. Start with it disabled. */
- new_piece_info->in_place_tconv = FALSE;
+ new_piece_info->in_place_tconv = false;
new_piece_info->buf_off = 0;
+ new_piece_info->filtered_dset = filtered_dataset;
+
/* Add piece to global piece_count */
io_info->piece_count++;
@@ -2001,7 +2041,7 @@ H5D__create_piece_mem_map_hyper(const H5D_dset_io_info_t *dinfo)
piece_info->mspace = dinfo->mem_space;
/* Indicate that the piece's memory space is shared */
- piece_info->mspace_shared = TRUE;
+ piece_info->mspace_shared = true;
} /* end if */
else {
/* Get bounding box for file selection */
@@ -2039,7 +2079,7 @@ H5D__create_piece_mem_map_hyper(const H5D_dset_io_info_t *dinfo)
/* Copy the information */
/* Copy the memory dataspace */
- if ((piece_info->mspace = H5S_copy(dinfo->mem_space, TRUE, FALSE)) == NULL)
+ if ((piece_info->mspace = H5S_copy(dinfo->mem_space, true, false)) == NULL)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy memory space");
/* Get the chunk's selection type */
@@ -2062,7 +2102,7 @@ H5D__create_piece_mem_map_hyper(const H5D_dset_io_info_t *dinfo)
assert(H5S_SEL_HYPERSLABS == chunk_sel_type);
/* Copy the file chunk's selection */
- if (H5S_SELECT_COPY(piece_info->mspace, piece_info->fspace, FALSE) < 0)
+ if (H5S_SELECT_COPY(piece_info->mspace, piece_info->fspace, false) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy selection");
/* Compute the adjustment for this chunk */
@@ -2126,7 +2166,7 @@ H5D__create_piece_mem_map_1d(const H5D_dset_io_info_t *dinfo)
piece_info->mspace = dinfo->mem_space;
/* Indicate that the chunk's memory space is shared */
- piece_info->mspace_shared = TRUE;
+ piece_info->mspace_shared = true;
} /* end if */
else {
hsize_t mem_sel_start[H5S_MAX_RANK]; /* Offset of low bound of file selection */
@@ -2148,7 +2188,7 @@ H5D__create_piece_mem_map_1d(const H5D_dset_io_info_t *dinfo)
assert(piece_info);
/* Copy the memory dataspace */
- if ((piece_info->mspace = H5S_copy(dinfo->mem_space, TRUE, FALSE)) == NULL)
+ if ((piece_info->mspace = H5S_copy(dinfo->mem_space, true, false)) == NULL)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy memory space");
chunk_points = H5S_GET_SELECT_NPOINTS(piece_info->fspace);
@@ -2240,11 +2280,11 @@ H5D__piece_file_cb(void H5_ATTR_UNUSED *elem, const H5T_t H5_ATTR_UNUSED *type,
/* Set the file chunk dataspace */
piece_info->fspace = fspace;
- piece_info->fspace_shared = FALSE;
+ piece_info->fspace_shared = false;
/* Set the memory chunk dataspace */
piece_info->mspace = NULL;
- piece_info->mspace_shared = FALSE;
+ piece_info->mspace_shared = false;
/* Set the number of selected elements in chunk to zero */
piece_info->piece_points = 0;
@@ -2254,9 +2294,11 @@ H5D__piece_file_cb(void H5_ATTR_UNUSED *elem, const H5T_t H5_ATTR_UNUSED *type,
piece_info->scaled[fm->f_ndims] = 0;
/* Initialize in-place type conversion info. Start with it disabled. */
- piece_info->in_place_tconv = FALSE;
+ piece_info->in_place_tconv = false;
piece_info->buf_off = 0;
+ piece_info->filtered_dset = dinfo->dset->shared->dcpl_cache.pline.nused > 0;
+
/* Make connection to related dset info from this piece_info */
piece_info->dset_info = dinfo;
@@ -2342,7 +2384,7 @@ H5D__piece_mem_cb(void H5_ATTR_UNUSED *elem, const H5T_t H5_ATTR_UNUSED *type, u
/* Check if the chunk already has a memory space */
if (NULL == piece_info->mspace)
/* Copy the template memory chunk dataspace */
- if (NULL == (piece_info->mspace = H5S_copy(fm->mchunk_tmpl, FALSE, FALSE)))
+ if (NULL == (piece_info->mspace = H5S_copy(fm->mchunk_tmpl, false, false)))
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, H5_ITER_ERROR, "unable to copy file space");
/* Update the "last chunk seen" information */
@@ -2417,6 +2459,9 @@ H5D__chunk_mdio_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
/* Add to sel_pieces and update pieces_added */
io_info->sel_pieces[io_info->pieces_added++] = piece_info;
+
+ if (piece_info->filtered_dset)
+ io_info->filtered_pieces_added++;
}
/* Advance to next skip list node */
@@ -2433,16 +2478,16 @@ H5D__chunk_mdio_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
* Purpose: A small internal function to if it's possible to load the
* chunk into cache.
*
- * Return: TRUE or FALSE
+ * Return: true or false
*
*-------------------------------------------------------------------------
*/
htri_t
H5D__chunk_cacheable(const H5D_io_info_t H5_ATTR_PARALLEL_USED *io_info, H5D_dset_io_info_t *dset_info,
- haddr_t caddr, hbool_t write_op)
+ haddr_t caddr, bool write_op)
{
const H5D_t *dataset = NULL; /* Local pointer to dataset info */
- hbool_t has_filters = FALSE; /* Whether there are filters on the chunk or not */
+ bool has_filters = false; /* Whether there are filters on the chunk or not */
htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_PACKAGE
@@ -2462,11 +2507,11 @@ H5D__chunk_cacheable(const H5D_io_info_t H5_ATTR_PARALLEL_USED *io_info, H5D_dse
dset_info->store->chunk.scaled, dataset->shared->curr_dims);
} /* end if */
else
- has_filters = TRUE;
+ has_filters = true;
} /* end if */
if (has_filters)
- ret_value = TRUE;
+ ret_value = true;
else {
#ifdef H5_HAVE_PARALLEL
/* If MPI based VFD is used and the file is opened for write access, must
@@ -2475,7 +2520,7 @@ H5D__chunk_cacheable(const H5D_io_info_t H5_ATTR_PARALLEL_USED *io_info, H5D_dse
* write-through of only the elements requested.
*/
if (io_info->using_mpi_vfd && (H5F_ACC_RDWR & H5F_INTENT(dataset->oloc.file)))
- ret_value = FALSE;
+ ret_value = false;
else {
#endif /* H5_HAVE_PARALLEL */
/* If the chunk is too large to keep in the cache and if we don't
@@ -2498,15 +2543,15 @@ H5D__chunk_cacheable(const H5D_io_info_t H5_ATTR_PARALLEL_USED *io_info, H5D_dse
(fill->fill_time == H5D_FILL_TIME_IFSET &&
(fill_status == H5D_FILL_VALUE_USER_DEFINED ||
fill_status == H5D_FILL_VALUE_DEFAULT)))
- ret_value = TRUE;
+ ret_value = true;
else
- ret_value = FALSE;
+ ret_value = false;
}
else
- ret_value = FALSE;
+ ret_value = false;
}
else
- ret_value = TRUE;
+ ret_value = true;
#ifdef H5_HAVE_PARALLEL
} /* end else */
#endif /* H5_HAVE_PARALLEL */
@@ -2522,7 +2567,7 @@ H5D__chunk_cacheable(const H5D_io_info_t H5_ATTR_PARALLEL_USED *io_info, H5D_dse
* Purpose: A small internal function to if it may be possible to use
* selection I/O.
*
- * Return: TRUE or FALSE
+ * Return: true or false
*
*-------------------------------------------------------------------------
*/
@@ -2547,7 +2592,7 @@ H5D__chunk_may_use_select_io(H5D_io_info_t *io_info, const H5D_dset_io_info_t *d
io_info->no_selection_io_cause |= H5D_SEL_IO_DATASET_FILTER;
}
else {
- hbool_t page_buf_enabled;
+ bool page_buf_enabled;
/* Check if the page buffer is enabled */
if (H5PB_enabled(io_info->f_sh, H5FD_MEM_DRAW, &page_buf_enabled) < 0)
@@ -2603,7 +2648,7 @@ H5D__chunk_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
H5D_dset_io_info_t ctg_dset_info; /* Contiguous I/O dset info object */
H5D_dset_io_info_t cpt_dset_info; /* Compact I/O dset info object */
uint32_t src_accessed_bytes = 0; /* Total accessed size in a chunk */
- hbool_t skip_missing_chunks = FALSE; /* Whether to skip missing chunks */
+ bool skip_missing_chunks = false; /* Whether to skip missing chunks */
H5S_t **chunk_mem_spaces = NULL; /* Array of chunk memory spaces */
H5S_t *chunk_mem_spaces_local[8]; /* Local buffer for chunk_mem_spaces */
H5S_t **chunk_file_spaces = NULL; /* Array of chunk file spaces */
@@ -2640,7 +2685,7 @@ H5D__chunk_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
if (fill->fill_time == H5D_FILL_TIME_NEVER ||
(fill->fill_time == H5D_FILL_TIME_IFSET && fill_status != H5D_FILL_VALUE_USER_DEFINED &&
fill_status != H5D_FILL_VALUE_DEFAULT))
- skip_missing_chunks = TRUE;
+ skip_missing_chunks = true;
}
/* Different blocks depending on whether we're using selection I/O */
@@ -2728,6 +2773,9 @@ H5D__chunk_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
if (io_info->sel_pieces)
io_info->sel_pieces[io_info->pieces_added] = chunk_info;
io_info->pieces_added++;
+
+ if (io_info->sel_pieces && chunk_info->filtered_dset)
+ io_info->filtered_pieces_added++;
}
} /* end if */
else if (!skip_missing_chunks) {
@@ -2786,11 +2834,11 @@ H5D__chunk_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
H5D_storage_t ctg_store; /* Chunk storage information as contiguous dataset */
H5D_io_info_t cpt_io_info; /* Compact I/O info object */
H5D_storage_t cpt_store; /* Chunk storage information as compact dataset */
- hbool_t cpt_dirty; /* Temporary placeholder for compact storage "dirty" flag */
+ bool cpt_dirty; /* Temporary placeholder for compact storage "dirty" flag */
/* Set up contiguous I/O info object */
H5MM_memcpy(&ctg_io_info, io_info, sizeof(ctg_io_info));
- memcpy(&ctg_dset_info, dset_info, sizeof(ctg_dset_info));
+ H5MM_memcpy(&ctg_dset_info, dset_info, sizeof(ctg_dset_info));
ctg_dset_info.store = &ctg_store;
ctg_dset_info.layout_ops = *H5D_LOPS_CONTIG;
ctg_io_info.dsets_info = &ctg_dset_info;
@@ -2802,7 +2850,7 @@ H5D__chunk_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
/* Set up compact I/O info object */
H5MM_memcpy(&cpt_io_info, io_info, sizeof(cpt_io_info));
- memcpy(&cpt_dset_info, dset_info, sizeof(cpt_dset_info));
+ H5MM_memcpy(&cpt_dset_info, dset_info, sizeof(cpt_dset_info));
cpt_dset_info.store = &cpt_store;
cpt_dset_info.layout_ops = *H5D_LOPS_COMPACT;
cpt_io_info.dsets_info = &cpt_dset_info;
@@ -2839,7 +2887,7 @@ H5D__chunk_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
dset_info->store->chunk.scaled = chunk_info->scaled;
/* Determine if we should use the chunk cache */
- if ((cacheable = H5D__chunk_cacheable(io_info, dset_info, udata.chunk_block.offset, FALSE)) <
+ if ((cacheable = H5D__chunk_cacheable(io_info, dset_info, udata.chunk_block.offset, false)) <
0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't tell if chunk is cacheable");
if (cacheable) {
@@ -2852,7 +2900,7 @@ H5D__chunk_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
(uint32_t)chunk_info->piece_points * (uint32_t)dset_info->type_info.src_type_size;
/* Lock the chunk into the cache */
- if (NULL == (chunk = H5D__chunk_lock(io_info, dset_info, &udata, FALSE, FALSE)))
+ if (NULL == (chunk = H5D__chunk_lock(io_info, dset_info, &udata, false, false)))
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to read raw data chunk");
/* Set up the storage buffer information for this chunk */
@@ -2884,7 +2932,7 @@ H5D__chunk_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
/* Release the cache lock on the chunk. */
if (chunk &&
- H5D__chunk_unlock(io_info, dset_info, &udata, FALSE, chunk, src_accessed_bytes) < 0)
+ H5D__chunk_unlock(io_info, dset_info, &udata, false, chunk, src_accessed_bytes) < 0)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to unlock raw data chunk");
} /* end if */
@@ -2931,7 +2979,7 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
H5D_io_info_t cpt_io_info; /* Compact I/O info object */
H5D_dset_io_info_t cpt_dset_info; /* Compact I/O dset info object */
H5D_storage_t cpt_store; /* Chunk storage information as compact dataset */
- hbool_t cpt_dirty; /* Temporary placeholder for compact storage "dirty" flag */
+ bool cpt_dirty; /* Temporary placeholder for compact storage "dirty" flag */
uint32_t dst_accessed_bytes = 0; /* Total accessed size in a chunk */
H5S_t **chunk_mem_spaces = NULL; /* Array of chunk memory spaces */
H5S_t *chunk_mem_spaces_local[8]; /* Local buffer for chunk_mem_spaces */
@@ -2950,7 +2998,7 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
/* Set up contiguous I/O info object */
H5MM_memcpy(&ctg_io_info, io_info, sizeof(ctg_io_info));
- memcpy(&ctg_dset_info, dset_info, sizeof(ctg_dset_info));
+ H5MM_memcpy(&ctg_dset_info, dset_info, sizeof(ctg_dset_info));
ctg_dset_info.store = &ctg_store;
ctg_dset_info.layout_ops = *H5D_LOPS_CONTIG;
ctg_io_info.dsets_info = &ctg_dset_info;
@@ -2962,7 +3010,7 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
/* Set up compact I/O info object */
H5MM_memcpy(&cpt_io_info, io_info, sizeof(cpt_io_info));
- memcpy(&cpt_dset_info, dset_info, sizeof(cpt_dset_info));
+ H5MM_memcpy(&cpt_dset_info, dset_info, sizeof(cpt_dset_info));
cpt_dset_info.store = &cpt_store;
cpt_dset_info.layout_ops = *H5D_LOPS_COMPACT;
cpt_io_info.dsets_info = &cpt_dset_info;
@@ -3017,7 +3065,7 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
H5D_chk_idx_info_t idx_info; /* Chunked index info */
H5D_chunk_ud_t udata; /* Index pass-through */
htri_t cacheable; /* Whether the chunk is cacheable */
- hbool_t need_insert = FALSE; /* Whether the chunk needs to be inserted into the index */
+ bool need_insert = false; /* Whether the chunk needs to be inserted into the index */
/* Get the actual chunk information from the skip list node */
chunk_info = H5D_CHUNK_GET_NODE_INFO(dset_info, chunk_node);
@@ -3037,13 +3085,13 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
dset_info->store->chunk.scaled = chunk_info->scaled;
/* Determine if we should use the chunk cache */
- if ((cacheable = H5D__chunk_cacheable(io_info, dset_info, udata.chunk_block.offset, TRUE)) < 0)
+ if ((cacheable = H5D__chunk_cacheable(io_info, dset_info, udata.chunk_block.offset, true)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't tell if chunk is cacheable");
if (cacheable) {
/* Load the chunk into cache. But if the whole chunk is written,
* simply allocate space instead of load the chunk. */
- void *chunk; /* Pointer to locked chunk buffer */
- hbool_t entire_chunk = TRUE; /* Whether whole chunk is selected */
+ void *chunk; /* Pointer to locked chunk buffer */
+ bool entire_chunk = true; /* Whether whole chunk is selected */
/* Compute # of bytes accessed in chunk */
H5_CHECK_OVERFLOW(dset_info->type_info.dst_type_size, /*From:*/ size_t, /*To:*/ uint32_t);
@@ -3056,10 +3104,10 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
(chunk_info->piece_points * dset_info->type_info.src_type_size) !=
ctg_store.contig.dset_size ||
dset_info->layout_io_info.chunk_map->fsel_type == H5S_SEL_POINTS)
- entire_chunk = FALSE;
+ entire_chunk = false;
/* Lock the chunk into the cache */
- if (NULL == (chunk = H5D__chunk_lock(io_info, dset_info, &udata, entire_chunk, FALSE)))
+ if (NULL == (chunk = H5D__chunk_lock(io_info, dset_info, &udata, entire_chunk, false)))
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to read raw data chunk");
/* Set up the storage buffer information for this chunk */
@@ -3082,7 +3130,7 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "chunked write failed");
/* Release the cache lock on the chunk */
- if (H5D__chunk_unlock(io_info, dset_info, &udata, TRUE, chunk, dst_accessed_bytes) < 0)
+ if (H5D__chunk_unlock(io_info, dset_info, &udata, true, chunk, dst_accessed_bytes) < 0)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to unlock raw data chunk");
} /* end if */
else {
@@ -3142,6 +3190,9 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
if (io_info->sel_pieces)
io_info->sel_pieces[io_info->pieces_added] = chunk_info;
io_info->pieces_added++;
+
+ if (io_info->sel_pieces && chunk_info->filtered_dset)
+ io_info->filtered_pieces_added++;
}
} /* end else */
@@ -3187,7 +3238,7 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
void *chunk; /* Pointer to locked chunk buffer */
H5D_chunk_ud_t udata; /* Index pass-through */
htri_t cacheable; /* Whether the chunk is cacheable */
- hbool_t need_insert = FALSE; /* Whether the chunk needs to be inserted into the index */
+ bool need_insert = false; /* Whether the chunk needs to be inserted into the index */
/* Get the actual chunk information from the skip list node */
chunk_info = H5D_CHUNK_GET_NODE_INFO(dset_info, chunk_node);
@@ -3204,12 +3255,12 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
dset_info->store->chunk.scaled = chunk_info->scaled;
/* Determine if we should use the chunk cache */
- if ((cacheable = H5D__chunk_cacheable(io_info, dset_info, udata.chunk_block.offset, TRUE)) < 0)
+ if ((cacheable = H5D__chunk_cacheable(io_info, dset_info, udata.chunk_block.offset, true)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't tell if chunk is cacheable");
if (cacheable) {
/* Load the chunk into cache. But if the whole chunk is written,
* simply allocate space instead of load the chunk. */
- hbool_t entire_chunk = TRUE; /* Whether whole chunk is selected */
+ bool entire_chunk = true; /* Whether whole chunk is selected */
/* Compute # of bytes accessed in chunk */
H5_CHECK_OVERFLOW(dset_info->type_info.dst_type_size, /*From:*/ size_t, /*To:*/ uint32_t);
@@ -3222,10 +3273,10 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
(chunk_info->piece_points * dset_info->type_info.src_type_size) !=
ctg_store.contig.dset_size ||
dset_info->layout_io_info.chunk_map->fsel_type == H5S_SEL_POINTS)
- entire_chunk = FALSE;
+ entire_chunk = false;
/* Lock the chunk into the cache */
- if (NULL == (chunk = H5D__chunk_lock(io_info, dset_info, &udata, entire_chunk, FALSE)))
+ if (NULL == (chunk = H5D__chunk_lock(io_info, dset_info, &udata, entire_chunk, false)))
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to read raw data chunk");
/* Set up the storage buffer information for this chunk */
@@ -3281,7 +3332,7 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
/* Release the cache lock on the chunk, or insert chunk into index. */
if (chunk) {
- if (H5D__chunk_unlock(io_info, dset_info, &udata, TRUE, chunk, dst_accessed_bytes) < 0)
+ if (H5D__chunk_unlock(io_info, dset_info, &udata, true, chunk, dst_accessed_bytes) < 0)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to unlock raw data chunk");
} /* end if */
else {
@@ -3342,7 +3393,7 @@ H5D__chunk_flush(H5D_t *dset)
/* Loop over all entries in the chunk cache */
for (ent = rdcc->head; ent; ent = next) {
next = ent->next;
- if (H5D__chunk_flush_entry(dset, ent, FALSE) < 0)
+ if (H5D__chunk_flush_entry(dset, ent, false) < 0)
nerrors++;
} /* end for */
if (nerrors)
@@ -3384,7 +3435,7 @@ H5D__chunk_io_term(H5D_io_info_t H5_ATTR_UNUSED *io_info, H5D_dset_io_info_t *di
assert(fm->single_piece_info->mspace_shared);
/* Reset the selection for the single element I/O */
- H5S_select_all(fm->single_space, TRUE);
+ H5S_select_all(fm->single_space, true);
} /* end if */
else {
/* Release the nodes on the list of selected pieces, or the last (only)
@@ -3442,7 +3493,7 @@ H5D__chunk_dest(H5D_t *dset)
/* Flush all the cached chunks */
for (ent = rdcc->head; ent; ent = next) {
next = ent->next;
- if (H5D__chunk_cache_evict(dset, ent, TRUE) < 0)
+ if (H5D__chunk_cache_evict(dset, ent, true) < 0)
nerrors++;
} /* end for */
@@ -3479,7 +3530,7 @@ H5D__chunk_dest(H5D_t *dset)
*-------------------------------------------------------------------------
*/
herr_t
-H5D_chunk_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
+H5D_chunk_idx_reset(H5O_storage_chunk_t *storage, bool reset_addr)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -3516,7 +3567,7 @@ H5D__chunk_cinfo_cache_reset(H5D_chunk_cached_t *last)
assert(last);
/* Indicate that the cached info is not valid */
- last->valid = FALSE;
+ last->valid = false;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5D__chunk_cinfo_cache_reset() */
@@ -3549,7 +3600,7 @@ H5D__chunk_cinfo_cache_update(H5D_chunk_cached_t *last, const H5D_chunk_ud_t *ud
last->filter_mask = udata->filter_mask;
/* Indicate that the cached info is valid */
- last->valid = TRUE;
+ last->valid = true;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5D__chunk_cinfo_cache_update() */
@@ -3559,14 +3610,14 @@ H5D__chunk_cinfo_cache_update(H5D_chunk_cached_t *last, const H5D_chunk_ud_t *ud
*
* Purpose: Look for chunk info in cache
*
- * Return: TRUE/FALSE/FAIL
+ * Return: true/false/FAIL
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
H5D__chunk_cinfo_cache_found(const H5D_chunk_cached_t *last, H5D_chunk_ud_t *udata)
{
- hbool_t ret_value = FALSE; /* Return value */
+ bool ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -3583,7 +3634,7 @@ H5D__chunk_cinfo_cache_found(const H5D_chunk_cached_t *last, H5D_chunk_ud_t *uda
/* Check that the scaled offset is the same */
for (u = 0; u < udata->common.layout->ndims; u++)
if (last->scaled[u] != udata->common.scaled[u])
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* Retrieve the information from the cache */
udata->chunk_block.offset = last->addr;
@@ -3592,7 +3643,7 @@ H5D__chunk_cinfo_cache_found(const H5D_chunk_cached_t *last, H5D_chunk_ud_t *uda
udata->filter_mask = last->filter_mask;
/* Indicate that the data was found */
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
} /* end if */
done:
@@ -3704,11 +3755,11 @@ H5D__chunk_lookup(const H5D_t *dset, const hsize_t *scaled, H5D_chunk_ud_t *udat
H5D_rdcc_ent_t *ent = NULL; /* Cache entry */
H5O_storage_chunk_t *sc = &(dset->shared->layout.storage.u.chunk);
unsigned idx = 0; /* Index of chunk in cache, if present */
- hbool_t found = FALSE; /* In cache? */
+ bool found = false; /* In cache? */
#ifdef H5_HAVE_PARALLEL
H5P_coll_md_read_flag_t md_reads_file_flag;
- hbool_t md_reads_context_flag;
- hbool_t restore_md_reads_state = FALSE;
+ bool md_reads_context_flag;
+ bool restore_md_reads_state = false;
#endif
herr_t ret_value = SUCCEED; /* Return value */
@@ -3730,7 +3781,7 @@ H5D__chunk_lookup(const H5D_t *dset, const hsize_t *scaled, H5D_chunk_ud_t *udat
udata->chunk_block.offset = HADDR_UNDEF;
udata->chunk_block.length = 0;
udata->filter_mask = 0;
- udata->new_unfilt_chunk = FALSE;
+ udata->new_unfilt_chunk = false;
/* Check for chunk in cache */
if (dset->shared->cache.chunk.nslots > 0) {
@@ -3743,12 +3794,12 @@ H5D__chunk_lookup(const H5D_t *dset, const hsize_t *scaled, H5D_chunk_ud_t *udat
unsigned u; /* Counter */
/* Speculatively set the 'found' flag */
- found = TRUE;
+ found = true;
/* Verify that the cache entry is the correct chunk */
for (u = 0; u < dset->shared->ndims; u++)
if (scaled[u] != ent->scaled[u]) {
- found = FALSE;
+ found = false;
break;
} /* end if */
} /* end if */
@@ -3782,9 +3833,9 @@ H5D__chunk_lookup(const H5D_t *dset, const hsize_t *scaled, H5D_chunk_ud_t *udat
*/
if (H5F_HAS_FEATURE(idx_info.f, H5FD_FEAT_HAS_MPI)) {
md_reads_file_flag = H5P_FORCE_FALSE;
- md_reads_context_flag = FALSE;
+ md_reads_context_flag = false;
H5F_set_coll_metadata_reads(idx_info.f, &md_reads_file_flag, &md_reads_context_flag);
- restore_md_reads_state = TRUE;
+ restore_md_reads_state = true;
}
#endif /* H5_HAVE_PARALLEL */
@@ -3850,10 +3901,10 @@ H5D__chunk_lookup(const H5D_t *dset, const hsize_t *scaled, H5D_chunk_ud_t *udat
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__chunk_flush_entry(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t reset)
+H5D__chunk_flush_entry(const H5D_t *dset, H5D_rdcc_ent_t *ent, bool reset)
{
void *buf = NULL; /* Temporary buffer */
- hbool_t point_of_no_return = FALSE;
+ bool point_of_no_return = false;
H5O_storage_chunk_t *sc = &(dset->shared->layout.storage.u.chunk);
herr_t ret_value = SUCCEED; /* Return value */
@@ -3869,8 +3920,8 @@ H5D__chunk_flush_entry(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t reset)
if (ent->dirty) {
H5D_chk_idx_info_t idx_info; /* Chunked index info */
H5D_chunk_ud_t udata; /* pass through B-tree */
- hbool_t must_alloc = FALSE; /* Whether the chunk must be allocated */
- hbool_t need_insert = FALSE; /* Whether the chunk needs to be inserted into the index */
+ bool must_alloc = false; /* Whether the chunk must be allocated */
+ bool need_insert = false; /* Whether the chunk needs to be inserted into the index */
/* Set up user data for index callbacks */
udata.common.layout = &dset->shared->layout.u.chunk;
@@ -3912,7 +3963,7 @@ H5D__chunk_flush_entry(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t reset)
* The only safe option is to continue with the reset
* even if we can't write the data to disk.
*/
- point_of_no_return = TRUE;
+ point_of_no_return = true;
ent->chunk = NULL;
} /* end else */
H5_CHECKED_ASSIGN(nbytes, size_t, udata.chunk_block.length, hsize_t);
@@ -3927,11 +3978,11 @@ H5D__chunk_flush_entry(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t reset)
H5_CHECKED_ASSIGN(udata.chunk_block.length, hsize_t, nbytes, size_t);
/* Indicate that the chunk must be allocated */
- must_alloc = TRUE;
+ must_alloc = true;
} /* end if */
else if (!H5_addr_defined(udata.chunk_block.offset)) {
/* Indicate that the chunk must be allocated */
- must_alloc = TRUE;
+ must_alloc = true;
/* This flag could be set for this chunk, just remove and ignore it
*/
@@ -3940,7 +3991,7 @@ H5D__chunk_flush_entry(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t reset)
else if (ent->edge_chunk_state & H5D_RDCC_NEWLY_DISABLED_FILTERS) {
/* Chunk on disk is still filtered, must insert to allocate correct
* size */
- must_alloc = TRUE;
+ must_alloc = true;
/* Set the disable filters field back to the standard disable
* filters setting, as it no longer needs to be inserted with every
@@ -3989,7 +4040,7 @@ H5D__chunk_flush_entry(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t reset)
H5D__chunk_cinfo_cache_update(&dset->shared->cache.chunk.last, &udata);
/* Mark cache entry as clean */
- ent->dirty = FALSE;
+ ent->dirty = false;
/* Increment # of flushed entries */
dset->shared->cache.chunk.stats.nflushes++;
@@ -3997,7 +4048,7 @@ H5D__chunk_flush_entry(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t reset)
/* Reset, but do not free or removed from list */
if (reset) {
- point_of_no_return = FALSE;
+ point_of_no_return = false;
if (buf == ent->chunk)
buf = NULL;
if (ent->chunk != NULL)
@@ -4039,7 +4090,7 @@ H5D__chunk_flush_entry(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t reset)
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__chunk_cache_evict(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t flush)
+H5D__chunk_cache_evict(const H5D_t *dset, H5D_rdcc_ent_t *ent, bool flush)
{
H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk);
herr_t ret_value = SUCCEED; /* Return value */
@@ -4054,7 +4105,7 @@ H5D__chunk_cache_evict(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t flush)
if (flush) {
/* Flush */
- if (H5D__chunk_flush_entry(dset, ent, TRUE) < 0)
+ if (H5D__chunk_flush_entry(dset, ent, true) < 0)
HDONE_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "cannot flush indexed storage buffer");
} /* end if */
else {
@@ -4190,7 +4241,7 @@ H5D__chunk_cache_prune(const H5D_t *dset, size_t size)
if (n[j] == cur)
n[j] = cur->next;
} /* end for */
- if (H5D__chunk_cache_evict(dset, cur, TRUE) < 0)
+ if (H5D__chunk_cache_evict(dset, cur, true) < 0)
nerrors++;
} /* end if */
} /* end for */
@@ -4235,7 +4286,7 @@ H5D__chunk_cache_prune(const H5D_t *dset, size_t size)
*/
static void *
H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_dset_io_info_t *dset_info,
- H5D_chunk_ud_t *udata, hbool_t relax, hbool_t prev_unfilt_chunk)
+ H5D_chunk_ud_t *udata, bool relax, bool prev_unfilt_chunk)
{
const H5D_t *dset; /* Convenience pointer to the dataset */
H5O_pline_t *pline; /* I/O pipeline info - always equal to the pline passed to H5D__chunk_mem_alloc */
@@ -4243,11 +4294,11 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds
const H5O_layout_t *layout; /* Dataset layout */
const H5O_fill_t *fill; /* Fill value info */
H5D_fill_buf_info_t fb_info; /* Dataset's fill buffer info */
- hbool_t fb_info_init = FALSE; /* Whether the fill value buffer has been initialized */
+ bool fb_info_init = false; /* Whether the fill value buffer has been initialized */
H5D_rdcc_t *rdcc; /*raw data chunk cache*/
H5D_rdcc_ent_t *ent; /*cache entry */
size_t chunk_size; /*size of a chunk */
- hbool_t disable_filters = FALSE; /* Whether to disable filters (when adding to cache) */
+ bool disable_filters = false; /* Whether to disable filters (when adding to cache) */
void *chunk = NULL; /*the file chunk */
void *ret_value = NULL; /* Return value */
@@ -4392,7 +4443,7 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds
assert(layout->u.chunk.flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS);
/* Disable the filters for writing */
- disable_filters = TRUE;
+ disable_filters = true;
pline = NULL;
} /* end if */
else if (prev_unfilt_chunk) {
@@ -4409,7 +4460,7 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds
dset_info->store->chunk.scaled,
dset->shared->curr_dims)) {
/* Disable the filters for both writing and reading */
- disable_filters = TRUE;
+ disable_filters = true;
old_pline = NULL;
pline = NULL;
} /* end if */
@@ -4513,7 +4564,7 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds
&dset->shared->dcpl_cache.fill, dset->shared->type,
dset->shared->type_id, (size_t)0, chunk_size) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "can't initialize fill buffer info");
- fb_info_init = TRUE;
+ fb_info_init = true;
/* Check for VL datatype & non-default fill value */
if (fb_info.has_vlen_fill_type)
@@ -4539,7 +4590,7 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds
if (!ent || !ent->locked) {
/* Preempt enough things from the cache to make room */
if (ent) {
- if (H5D__chunk_cache_evict(dset, ent, TRUE) < 0)
+ if (H5D__chunk_cache_evict(dset, ent, true) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, NULL, "unable to preempt chunk from cache");
} /* end if */
if (H5D__chunk_cache_prune(dset, chunk_size) < 0)
@@ -4592,7 +4643,7 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds
/* Lock the chunk into the cache */
if (ent) {
assert(!ent->locked);
- ent->locked = TRUE;
+ ent->locked = true;
chunk = ent->chunk;
} /* end if */
else
@@ -4640,7 +4691,7 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds
*/
static herr_t
H5D__chunk_unlock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_dset_io_info_t *dset_info,
- const H5D_chunk_ud_t *udata, hbool_t dirty, void *chunk, uint32_t naccessed)
+ const H5D_chunk_ud_t *udata, bool dirty, void *chunk, uint32_t naccessed)
{
const H5O_layout_t *layout; /* Dataset layout */
const H5D_rdcc_t *rdcc;
@@ -4664,13 +4715,13 @@ H5D__chunk_unlock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_
* It's not in the cache, probably because it's too big. If it's
* dirty then flush it to disk. In any case, free the chunk.
*/
- hbool_t is_unfiltered_edge_chunk = FALSE; /* Whether the chunk is an unfiltered edge chunk */
+ bool is_unfiltered_edge_chunk = false; /* Whether the chunk is an unfiltered edge chunk */
/* Check if we should disable filters on this chunk */
if (udata->new_unfilt_chunk) {
assert(layout->u.chunk.flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS);
- is_unfiltered_edge_chunk = TRUE;
+ is_unfiltered_edge_chunk = true;
} /* end if */
else if (layout->u.chunk.flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS) {
/* Check if the chunk is an edge chunk, and disable filters if so */
@@ -4683,7 +4734,7 @@ H5D__chunk_unlock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_
H5D_rdcc_ent_t fake_ent; /* "fake" chunk cache entry */
memset(&fake_ent, 0, sizeof(fake_ent));
- fake_ent.dirty = TRUE;
+ fake_ent.dirty = true;
if (is_unfiltered_edge_chunk)
fake_ent.edge_chunk_state = H5D_RDCC_DISABLE_FILTERS;
if (udata->new_unfilt_chunk)
@@ -4695,7 +4746,7 @@ H5D__chunk_unlock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_
fake_ent.chunk_block.length = udata->chunk_block.length;
fake_ent.chunk = (uint8_t *)chunk;
- if (H5D__chunk_flush_entry(dset, &fake_ent, TRUE) < 0)
+ if (H5D__chunk_flush_entry(dset, &fake_ent, true) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "cannot flush indexed storage buffer");
} /* end if */
else {
@@ -4718,12 +4769,12 @@ H5D__chunk_unlock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_
ent = rdcc->slot[udata->idx_hint];
assert(ent->locked);
if (dirty) {
- ent->dirty = TRUE;
+ ent->dirty = true;
ent->wr_count -= MIN(ent->wr_count, naccessed);
} /* end if */
else
ent->rd_count -= MIN(ent->rd_count, naccessed);
- ent->locked = FALSE;
+ ent->locked = false;
} /* end else */
done:
@@ -4782,7 +4833,7 @@ H5D__chunk_allocated(const H5D_t *dset, hsize_t *nbytes)
/* Search for cached chunks that haven't been written out */
for (ent = rdcc->head; ent; ent = ent->next)
/* Flush the chunk out to disk, to make certain the size is correct later */
- if (H5D__chunk_flush_entry(dset, ent, FALSE) < 0)
+ if (H5D__chunk_flush_entry(dset, ent, false) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "cannot flush indexed storage buffer");
/* Compose chunked index info struct */
@@ -4815,7 +4866,7 @@ H5D__chunk_allocated(const H5D_t *dset, hsize_t *nbytes)
*-------------------------------------------------------------------------
*/
herr_t
-H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old_dim[])
+H5D__chunk_allocate(const H5D_t *dset, bool full_overwrite, const hsize_t old_dim[])
{
H5D_chk_idx_info_t idx_info; /* Chunked index info */
const H5D_chunk_ops_t *ops = dset->shared->layout.storage.u.chunk.ops; /* Chunk operations */
@@ -4832,27 +4883,27 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old
H5O_pline_t def_pline = H5O_CRT_PIPELINE_DEF; /* Default pipeline */
const H5O_fill_t *fill = &(dset->shared->dcpl_cache.fill); /* Fill value info */
H5D_fill_value_t fill_status; /* The fill value status */
- hbool_t should_fill = FALSE; /* Whether fill values should be written */
+ bool should_fill = false; /* Whether fill values should be written */
void *unfilt_fill_buf = NULL; /* Unfiltered fill value buffer */
void **fill_buf = NULL; /* Pointer to the fill buffer to use for a chunk */
#ifdef H5_HAVE_PARALLEL
- hbool_t blocks_written = FALSE; /* Flag to indicate that chunk was actually written */
- hbool_t using_mpi =
- FALSE; /* Flag to indicate that the file is being accessed with an MPI-capable file driver */
+ bool blocks_written = false; /* Flag to indicate that chunk was actually written */
+ bool using_mpi =
+ false; /* Flag to indicate that the file is being accessed with an MPI-capable file driver */
H5D_chunk_coll_fill_info_t chunk_fill_info; /* chunk address information for doing I/O */
#endif /* H5_HAVE_PARALLEL */
- hbool_t carry; /* Flag to indicate that chunk increment carrys to higher dimension (sorta) */
+ bool carry; /* Flag to indicate that chunk increment carrys to higher dimension (sorta) */
unsigned space_ndims; /* Dataset's space rank */
const hsize_t *space_dim; /* Dataset's dataspace dimensions */
const uint32_t *chunk_dim = layout->u.chunk.dim; /* Convenience pointer to chunk dimensions */
unsigned op_dim; /* Current operating dimension */
H5D_fill_buf_info_t fb_info; /* Dataset's fill buffer info */
- hbool_t fb_info_init = FALSE; /* Whether the fill value buffer has been initialized */
- hbool_t has_unfilt_edge_chunks = FALSE; /* Whether there are partial edge chunks with disabled filters */
- hbool_t unfilt_edge_chunk_dim[H5O_LAYOUT_NDIMS]; /* Whether there are unfiltered edge chunks at the edge
+ bool fb_info_init = false; /* Whether the fill value buffer has been initialized */
+ bool has_unfilt_edge_chunks = false; /* Whether there are partial edge chunks with disabled filters */
+ bool unfilt_edge_chunk_dim[H5O_LAYOUT_NDIMS]; /* Whether there are unfiltered edge chunks at the edge
of each dimension */
- hsize_t edge_chunk_scaled[H5O_LAYOUT_NDIMS]; /* Offset of the unfiltered edge chunks at the edge of each
- dimension */
+ hsize_t edge_chunk_scaled[H5O_LAYOUT_NDIMS]; /* Offset of the unfiltered edge chunks at the edge of each
+ dimension */
unsigned nunfilt_edge_chunk_dims = 0; /* Number of dimensions on an edge */
H5O_storage_chunk_t *sc = &(layout->storage.u.chunk); /* Convenience variable */
herr_t ret_value = SUCCEED; /* Return value */
@@ -4884,7 +4935,7 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old
/* Retrieve MPI parameters */
if (H5F_HAS_FEATURE(dset->oloc.file, H5FD_FEAT_HAS_MPI)) {
/* Set the MPI-capable file driver flag */
- using_mpi = TRUE;
+ using_mpi = true;
/* init chunk info stuff for collective I/O */
chunk_fill_info.num_chunks = 0;
@@ -4905,15 +4956,15 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old
/* Calculate if there are unfiltered edge chunks at the edge of this
* dimension. Note the edge_chunk_scaled is uninitialized for
- * dimensions where unfilt_edge_chunk_dim is FALSE. Also */
+ * dimensions where unfilt_edge_chunk_dim is false. Also */
if ((layout->u.chunk.flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS) && pline->nused > 0 &&
space_dim[op_dim] % chunk_dim[op_dim] != 0) {
- has_unfilt_edge_chunks = TRUE;
- unfilt_edge_chunk_dim[op_dim] = TRUE;
+ has_unfilt_edge_chunks = true;
+ unfilt_edge_chunk_dim[op_dim] = true;
edge_chunk_scaled[op_dim] = max_unalloc[op_dim];
} /* end if */
else
- unfilt_edge_chunk_dim[op_dim] = FALSE;
+ unfilt_edge_chunk_dim[op_dim] = false;
} /* end for */
/* Get original chunk size */
@@ -4933,7 +4984,7 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old
(fill->fill_time == H5D_FILL_TIME_IFSET &&
(fill_status == H5D_FILL_VALUE_USER_DEFINED || fill_status == H5D_FILL_VALUE_DEFAULT)))) ||
pline->nused > 0)
- should_fill = TRUE;
+ should_fill = true;
/* Check if fill values should be written to chunks */
if (should_fill) {
@@ -4943,7 +4994,7 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old
&dset->shared->dcpl_cache.fill, dset->shared->type, dset->shared->type_id,
(size_t)0, orig_chunk_size) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize fill buffer info");
- fb_info_init = TRUE;
+ fb_info_init = true;
/* Initialize the fill_buf pointer to the buffer in fb_info. If edge
* chunk filters are disabled, we will switch the buffer as appropriate
@@ -5049,11 +5100,11 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old
} /* end if */
} /* end if */
- carry = FALSE;
+ carry = false;
} /* end else */
while (!carry) {
- hbool_t need_insert = FALSE; /* Whether the chunk needs to be inserted into the index */
+ bool need_insert = false; /* Whether the chunk needs to be inserted into the index */
/* Look up this chunk */
if (H5D__chunk_lookup(dset, scaled, &udata) < 0)
@@ -5067,12 +5118,12 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old
* original dimensions */
{
unsigned v; /* Local index variable */
- hbool_t outside_orig = FALSE;
+ bool outside_orig = false;
for (v = 0; v < space_ndims; v++) {
assert((scaled[v] * chunk_dim[v]) < space_dim[v]);
if ((scaled[v] * chunk_dim[v]) >= old_dim[v])
- outside_orig = TRUE;
+ outside_orig = true;
} /* end for */
assert(outside_orig);
} /* end block */
@@ -5182,7 +5233,7 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old
chunk_fill_info.num_chunks++;
/* Indicate that blocks will be written */
- blocks_written = TRUE;
+ blocks_written = true;
} /* end if */
else {
#endif /* H5_HAVE_PARALLEL */
@@ -5200,7 +5251,7 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert chunk addr into index");
/* Increment indices and adjust the edge chunk state */
- carry = TRUE;
+ carry = true;
for (i = ((int)space_ndims - 1); i >= 0; --i) {
scaled[i]++;
if (scaled[i] > max_unalloc[i]) {
@@ -5234,7 +5285,7 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old
} /* end if */
} /* end if */
- carry = FALSE;
+ carry = false;
break;
} /* end else */
} /* end for */
@@ -5295,8 +5346,8 @@ H5D__chunk_update_old_edge_chunks(H5D_t *dset, hsize_t old_dim[])
dimension */
hsize_t max_edge_chunk_sc[H5O_LAYOUT_NDIMS]; /* largest offset of chunks that might need to be modified in
each dimension */
- hbool_t new_full_dim[H5O_LAYOUT_NDIMS]; /* Whether the plane of chunks in this dimension needs to be
- modified */
+ bool new_full_dim[H5O_LAYOUT_NDIMS]; /* Whether the plane of chunks in this dimension needs to be
+ modified */
const H5O_layout_t *layout = &(dset->shared->layout); /* Dataset layout */
hsize_t chunk_sc[H5O_LAYOUT_NDIMS]; /* Offset of current chunk */
const uint32_t *chunk_dim = layout->u.chunk.dim; /* Convenience pointer to chunk dimensions */
@@ -5308,7 +5359,7 @@ H5D__chunk_update_old_edge_chunks(H5D_t *dset, hsize_t old_dim[])
H5D_storage_t chk_store; /* Chunk storage information */
H5D_dset_io_info_t chk_dset_info; /* Chunked I/O dset info object */
void *chunk; /* The file chunk */
- hbool_t carry; /* Flag to indicate that chunk increment carrys to higher dimension (sorta) */
+ bool carry; /* Flag to indicate that chunk increment carrys to higher dimension (sorta) */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -5353,7 +5404,7 @@ H5D__chunk_update_old_edge_chunks(H5D_t *dset, hsize_t old_dim[])
*/
for (op_dim = 0; op_dim < space_ndims; op_dim++) {
/* Start off with this dimension marked as not needing to be modified */
- new_full_dim[op_dim] = FALSE;
+ new_full_dim[op_dim] = false;
/* Validate this chunk dimension */
if (chunk_dim[op_dim] == 0)
@@ -5377,7 +5428,7 @@ H5D__chunk_update_old_edge_chunks(H5D_t *dset, hsize_t old_dim[])
/* Check if the dataspace expanded enough to cause the old edge chunks
* in this dimension to become full */
if ((space_dim[op_dim] / chunk_dim[op_dim]) >= (old_edge_chunk_sc[op_dim] + 1))
- new_full_dim[op_dim] = TRUE;
+ new_full_dim[op_dim] = true;
} /* end for */
/* Main loop: fix old edge chunks */
@@ -5392,7 +5443,7 @@ H5D__chunk_update_old_edge_chunks(H5D_t *dset, hsize_t old_dim[])
memset(chunk_sc, 0, (space_ndims * sizeof(chunk_sc[0])));
chunk_sc[op_dim] = old_edge_chunk_sc[op_dim];
- carry = FALSE;
+ carry = false;
} /* end if */
while (!carry) {
@@ -5412,23 +5463,23 @@ H5D__chunk_update_old_edge_chunks(H5D_t *dset, hsize_t old_dim[])
/* Lock the chunk into cache. H5D__chunk_lock will take care of
* updating the chunk to no longer be an edge chunk. */
if (NULL ==
- (chunk = (void *)H5D__chunk_lock(&chk_io_info, &chk_dset_info, &chk_udata, FALSE, TRUE)))
+ (chunk = (void *)H5D__chunk_lock(&chk_io_info, &chk_dset_info, &chk_udata, false, true)))
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to lock raw data chunk");
/* Unlock the chunk */
- if (H5D__chunk_unlock(&chk_io_info, &chk_dset_info, &chk_udata, TRUE, chunk, (uint32_t)0) < 0)
+ if (H5D__chunk_unlock(&chk_io_info, &chk_dset_info, &chk_udata, true, chunk, (uint32_t)0) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "unable to unlock raw data chunk");
} /* end if */
/* Increment indices */
- carry = TRUE;
+ carry = true;
for (i = ((int)space_ndims - 1); i >= 0; --i) {
if ((unsigned)i != op_dim) {
++chunk_sc[i];
if (chunk_sc[i] > (hsize_t)max_edge_chunk_sc[i])
chunk_sc[i] = 0;
else {
- carry = FALSE;
+ carry = false;
break;
} /* end else */
} /* end if */
@@ -5480,8 +5531,8 @@ H5D__chunk_collective_fill(const H5D_t *dset, H5D_chunk_coll_fill_info_t *chunk_
int *block_lens = NULL;
MPI_Datatype mem_type = MPI_BYTE, file_type = MPI_BYTE;
H5FD_mpio_xfer_t prev_xfer_mode; /* Previous data xfer mode */
- hbool_t have_xfer_mode = FALSE; /* Whether the previous xffer mode has been retrieved */
- hbool_t need_sort = FALSE;
+ bool have_xfer_mode = false; /* Whether the previous xffer mode has been retrieved */
+ bool need_sort = false;
size_t i; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
@@ -5524,7 +5575,7 @@ H5D__chunk_collective_fill(const H5D_t *dset, H5D_chunk_coll_fill_info_t *chunk_
/* Check if we have any chunks to write on this rank */
if (num_blocks > 0 || (leftover && leftover > mpi_rank)) {
MPI_Aint partial_fill_buf_disp = 0;
- hbool_t all_same_block_len = TRUE;
+ bool all_same_block_len = true;
/* Allocate buffers */
if (NULL == (chunk_disp_array = (MPI_Aint *)H5MM_malloc((size_t)(blocks + 1) * sizeof(MPI_Aint))))
@@ -5564,10 +5615,10 @@ H5D__chunk_collective_fill(const H5D_t *dset, H5D_chunk_coll_fill_info_t *chunk_
*/
for (i = 1; i < chunk_fill_info->num_chunks; i++) {
if (chunk_fill_info->chunk_info[i].addr < chunk_fill_info->chunk_info[i - 1].addr)
- need_sort = TRUE;
+ need_sort = true;
if (chunk_fill_info->chunk_info[i].chunk_size != chunk_fill_info->chunk_info[i - 1].chunk_size)
- all_same_block_len = FALSE;
+ all_same_block_len = false;
}
if (need_sort)
@@ -5677,7 +5728,7 @@ H5D__chunk_collective_fill(const H5D_t *dset, H5D_chunk_coll_fill_info_t *chunk_
/* Get current transfer mode */
if (H5CX_get_io_xfer_mode(&prev_xfer_mode) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set transfer mode");
- have_xfer_mode = TRUE;
+ have_xfer_mode = true;
/* Set transfer mode */
if (H5CX_set_io_xfer_mode(H5FD_MPIO_COLLECTIVE) < 0)
@@ -5738,7 +5789,7 @@ H5D__chunk_cmp_coll_fill_info(const void *_entry1, const void *_entry2)
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__chunk_prune_fill(H5D_chunk_it_ud1_t *udata, hbool_t new_unfilt_chunk)
+H5D__chunk_prune_fill(H5D_chunk_it_ud1_t *udata, bool new_unfilt_chunk)
{
const H5D_io_info_t *io_info = udata->io_info; /* Local pointer to I/O info */
const H5D_t *dset = udata->dset_info->dset; /* Local pointer to the dataset info */
@@ -5746,7 +5797,7 @@ H5D__chunk_prune_fill(H5D_chunk_it_ud1_t *udata, hbool_t new_unfilt_chunk)
unsigned rank = udata->common.layout->ndims - 1; /* Dataset rank */
const hsize_t *scaled = udata->common.scaled; /* Scaled chunk offset */
H5S_sel_iter_t *chunk_iter = NULL; /* Memory selection iteration info */
- hbool_t chunk_iter_init = FALSE; /* Whether the chunk iterator has been initialized */
+ bool chunk_iter_init = false; /* Whether the chunk iterator has been initialized */
hsize_t sel_nelmts; /* Number of elements in selection */
hsize_t count[H5O_LAYOUT_NDIMS]; /* Element count of hyperslab */
size_t chunk_size; /*size of a chunk */
@@ -5778,7 +5829,7 @@ H5D__chunk_prune_fill(H5D_chunk_it_ud1_t *udata, hbool_t new_unfilt_chunk)
dset->shared->type, dset->shared->type_id, (size_t)udata->elmts_per_chunk,
chunk_size) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize fill buffer info");
- udata->fb_info_init = TRUE;
+ udata->fb_info_init = true;
} /* end if */
/* Compute the # of elements to leave with existing value, in each dimension */
@@ -5788,7 +5839,7 @@ H5D__chunk_prune_fill(H5D_chunk_it_ud1_t *udata, hbool_t new_unfilt_chunk)
} /* end for */
/* Select all elements in chunk, to begin with */
- if (H5S_select_all(udata->chunk_space, TRUE) < 0)
+ if (H5S_select_all(udata->chunk_space, true) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSELECT, FAIL, "unable to select space");
/* "Subtract out" the elements to keep */
@@ -5796,7 +5847,7 @@ H5D__chunk_prune_fill(H5D_chunk_it_ud1_t *udata, hbool_t new_unfilt_chunk)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSELECT, FAIL, "unable to select hyperslab");
/* Lock the chunk into the cache, to get a pointer to the chunk buffer */
- if (NULL == (chunk = (void *)H5D__chunk_lock(io_info, udata->dset_info, &chk_udata, FALSE, FALSE)))
+ if (NULL == (chunk = (void *)H5D__chunk_lock(io_info, udata->dset_info, &chk_udata, false, false)))
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to lock raw data chunk");
/* Fill the selection in the memory buffer */
@@ -5821,7 +5872,7 @@ H5D__chunk_prune_fill(H5D_chunk_it_ud1_t *udata, hbool_t new_unfilt_chunk)
/* Create a selection iterator for scattering the elements to memory buffer */
if (H5S_select_iter_init(chunk_iter, udata->chunk_space, layout->u.chunk.dim[rank], 0) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize chunk selection information");
- chunk_iter_init = TRUE;
+ chunk_iter_init = true;
/* Scatter the data into memory */
if (H5D__scatter_mem(udata->fb_info.fill_buf, chunk_iter, (size_t)sel_nelmts, chunk /*out*/) < 0)
@@ -5833,7 +5884,7 @@ H5D__chunk_prune_fill(H5D_chunk_it_ud1_t *udata, hbool_t new_unfilt_chunk)
bytes_accessed = (uint32_t)sel_nelmts * layout->u.chunk.dim[rank];
/* Release lock on chunk */
- if (H5D__chunk_unlock(io_info, udata->dset_info, &chk_udata, TRUE, chunk, bytes_accessed) < 0)
+ if (H5D__chunk_unlock(io_info, udata->dset_info, &chk_udata, true, chunk, bytes_accessed) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "unable to unlock raw data chunk");
done:
@@ -5948,32 +5999,32 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
hsize_t max_mod_chunk_sc[H5O_LAYOUT_NDIMS]; /* Scaled offset of last chunk to modify in each dimension */
hssize_t max_fill_chunk_sc[H5O_LAYOUT_NDIMS]; /* Scaled offset of last chunk that might be filled in each
dimension */
- hbool_t fill_dim[H5O_LAYOUT_NDIMS]; /* Whether the plane of edge chunks in this dimension needs to be
+ bool fill_dim[H5O_LAYOUT_NDIMS]; /* Whether the plane of edge chunks in this dimension needs to be
filled */
hsize_t min_partial_chunk_sc[H5O_LAYOUT_NDIMS]; /* Offset of first partial (or empty) chunk in each
dimension */
- hbool_t new_unfilt_dim[H5O_LAYOUT_NDIMS]; /* Whether the plane of edge chunks in this dimension are newly
+ bool new_unfilt_dim[H5O_LAYOUT_NDIMS]; /* Whether the plane of edge chunks in this dimension are newly
unfiltered */
- H5D_chk_idx_info_t idx_info; /* Chunked index info */
- H5D_io_info_t chk_io_info; /* Chunked I/O info object */
- H5D_dset_io_info_t chk_dset_info; /* Chunked I/O dset info object */
- H5D_storage_t chk_store; /* Chunk storage information */
+ H5D_chk_idx_info_t idx_info; /* Chunked index info */
+ H5D_io_info_t chk_io_info; /* Chunked I/O info object */
+ H5D_dset_io_info_t chk_dset_info; /* Chunked I/O dset info object */
+ H5D_storage_t chk_store; /* Chunk storage information */
const H5O_layout_t *layout = &(dset->shared->layout); /* Dataset's layout */
const H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /*raw data chunk cache */
unsigned space_ndims; /* Dataset's space rank */
const hsize_t *space_dim; /* Current dataspace dimensions */
unsigned op_dim; /* Current operating dimension */
- hbool_t shrunk_dim[H5O_LAYOUT_NDIMS]; /* Dimensions which have shrunk */
+ bool shrunk_dim[H5O_LAYOUT_NDIMS]; /* Dimensions which have shrunk */
H5D_chunk_it_ud1_t udata; /* Chunk index iterator user data */
- hbool_t udata_init = FALSE; /* Whether the chunk index iterator user data has been initialized */
+ bool udata_init = false; /* Whether the chunk index iterator user data has been initialized */
H5D_chunk_common_ud_t idx_udata; /* User data for index removal routine */
H5S_t *chunk_space = NULL; /* Dataspace for a chunk */
hsize_t chunk_dim[H5O_LAYOUT_NDIMS]; /* Chunk dimensions */
hsize_t scaled[H5O_LAYOUT_NDIMS]; /* Scaled offset of current chunk */
hsize_t hyper_start[H5O_LAYOUT_NDIMS]; /* Starting location of hyperslab */
uint32_t elmts_per_chunk; /* Elements in chunk */
- hbool_t disable_edge_filters = FALSE; /* Whether to disable filters on partial edge chunks */
- hbool_t new_unfilt_chunk = FALSE; /* Whether the chunk is newly unfiltered */
+ bool disable_edge_filters = false; /* Whether to disable filters on partial edge chunks */
+ bool new_unfilt_chunk = false; /* Whether the chunk is newly unfiltered */
unsigned u; /* Local index variable */
const H5O_storage_chunk_t *sc = &(layout->storage.u.chunk);
herr_t ret_value = SUCCEED; /* Return value */
@@ -6052,7 +6103,7 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
udata.elmts_per_chunk = elmts_per_chunk;
udata.chunk_space = chunk_space;
udata.hyper_start = hyper_start;
- udata_init = TRUE;
+ udata_init = true;
/* Initialize user data for removal */
idx_udata.layout = &layout->u.chunk;
@@ -6093,23 +6144,23 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
/* Determine if we need to fill chunks in this dimension */
if ((hssize_t)min_mod_chunk_sc[op_dim] == max_fill_chunk_sc[op_dim]) {
- fill_dim[op_dim] = TRUE;
+ fill_dim[op_dim] = true;
/* If necessary, check if chunks in this dimension that need to
* be filled are new partial edge chunks */
if (disable_edge_filters && old_dim[op_dim] >= (min_mod_chunk_sc[op_dim] + 1))
- new_unfilt_dim[op_dim] = TRUE;
+ new_unfilt_dim[op_dim] = true;
else
- new_unfilt_dim[op_dim] = FALSE;
+ new_unfilt_dim[op_dim] = false;
} /* end if */
else {
- fill_dim[op_dim] = FALSE;
- new_unfilt_dim[op_dim] = FALSE;
+ fill_dim[op_dim] = false;
+ new_unfilt_dim[op_dim] = false;
} /* end else */
} /* end if */
else {
- fill_dim[op_dim] = FALSE;
- new_unfilt_dim[op_dim] = FALSE;
+ fill_dim[op_dim] = false;
+ new_unfilt_dim[op_dim] = false;
} /* end else */
/* If necessary, calculate the smallest offset of non-previously full
@@ -6121,9 +6172,9 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
/* Main loop: fill or remove chunks */
for (op_dim = 0; op_dim < (unsigned)space_ndims; op_dim++) {
- hbool_t dims_outside_fill[H5O_LAYOUT_NDIMS]; /* Dimensions in chunk offset outside fill dimensions */
- int ndims_outside_fill; /* Number of dimensions in chunk offset outside fill dimensions */
- hbool_t carry; /* Flag to indicate that chunk increment carrys to higher dimension (sorta) */
+ bool dims_outside_fill[H5O_LAYOUT_NDIMS]; /* Dimensions in chunk offset outside fill dimensions */
+ int ndims_outside_fill; /* Number of dimensions in chunk offset outside fill dimensions */
+ bool carry; /* Flag to indicate that chunk increment carrys to higher dimension (sorta) */
/* Check if modification along this dimension is really necessary */
if (!shrunk_dim[op_dim])
@@ -6139,14 +6190,14 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
ndims_outside_fill = 0;
for (u = 0; u < space_ndims; u++)
if ((hssize_t)scaled[u] > max_fill_chunk_sc[u]) {
- dims_outside_fill[u] = TRUE;
+ dims_outside_fill[u] = true;
ndims_outside_fill++;
} /* end if */
else
- dims_outside_fill[u] = FALSE;
+ dims_outside_fill[u] = false;
} /* end else */
- carry = FALSE;
+ carry = false;
while (!carry) {
int i; /* Local index variable */
@@ -6161,10 +6212,10 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
/* Determine if the chunk just became an unfiltered chunk */
if (new_unfilt_dim[op_dim]) {
- new_unfilt_chunk = TRUE;
+ new_unfilt_chunk = true;
for (u = 0; u < space_ndims; u++)
if (scaled[u] == min_partial_chunk_sc[u]) {
- new_unfilt_chunk = FALSE;
+ new_unfilt_chunk = false;
break;
} /* end if */
} /* end if */
@@ -6186,11 +6237,11 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
#ifndef NDEBUG
/* Make sure this chunk is really outside the new dimensions */
{
- hbool_t outside_dim = FALSE;
+ bool outside_dim = false;
for (u = 0; u < space_ndims; u++)
if ((scaled[u] * chunk_dim[u]) >= space_dim[u]) {
- outside_dim = TRUE;
+ outside_dim = true;
break;
} /* end if */
assert(outside_dim);
@@ -6204,7 +6255,7 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
/* Evict the entry from the cache if present, but do not flush
* it to disk */
if (UINT_MAX != chk_udata.idx_hint)
- if (H5D__chunk_cache_evict(dset, rdcc->slot[chk_udata.idx_hint], FALSE) < 0)
+ if (H5D__chunk_cache_evict(dset, rdcc->slot[chk_udata.idx_hint], false) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "unable to evict chunk");
/* Remove the chunk from disk, if present */
@@ -6220,7 +6271,7 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
} /* end else */
/* Increment indices */
- carry = TRUE;
+ carry = true;
for (i = (int)(space_ndims - 1); i >= 0; --i) {
scaled[i]++;
if (scaled[i] > max_mod_chunk_sc[i]) {
@@ -6229,14 +6280,14 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
if ((unsigned)i == op_dim) {
scaled[i] = min_mod_chunk_sc[i];
if (dims_outside_fill[i] && fill_dim[i]) {
- dims_outside_fill[i] = FALSE;
+ dims_outside_fill[i] = false;
ndims_outside_fill--;
} /* end if */
} /* end if */
else {
scaled[i] = 0;
if (dims_outside_fill[i] && max_fill_chunk_sc[i] >= 0) {
- dims_outside_fill[i] = FALSE;
+ dims_outside_fill[i] = false;
ndims_outside_fill--;
} /* end if */
} /* end else */
@@ -6244,12 +6295,12 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
else {
/* Check if we just went outside the fill dimension */
if (!dims_outside_fill[i] && (hssize_t)scaled[i] > max_fill_chunk_sc[i]) {
- dims_outside_fill[i] = TRUE;
+ dims_outside_fill[i] = true;
ndims_outside_fill++;
} /* end if */
/* We found the next chunk, so leave the loop */
- carry = FALSE;
+ carry = false;
break;
} /* end else */
} /* end for */
@@ -6371,9 +6422,9 @@ H5D__chunk_delete(H5F_t *f, H5O_t *oh, H5O_storage_t *storage)
{
H5D_chk_idx_info_t idx_info; /* Chunked index info */
H5O_layout_t layout; /* Dataset layout message */
- hbool_t layout_read = FALSE; /* Whether the layout message was read from the file */
+ bool layout_read = false; /* Whether the layout message was read from the file */
H5O_pline_t pline; /* I/O pipeline message */
- hbool_t pline_read = FALSE; /* Whether the I/O pipeline message was read from the file */
+ bool pline_read = false; /* Whether the I/O pipeline message was read from the file */
htri_t exists; /* Flag if header message of interest exists */
herr_t ret_value = SUCCEED; /* Return value */
@@ -6391,7 +6442,7 @@ H5D__chunk_delete(H5F_t *f, H5O_t *oh, H5O_storage_t *storage)
else if (exists) {
if (NULL == H5O_msg_read_oh(f, oh, H5O_PLINE_ID, &pline))
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get I/O pipeline message");
- pline_read = TRUE;
+ pline_read = true;
} /* end else if */
else
memset(&pline, 0, sizeof(pline));
@@ -6402,7 +6453,7 @@ H5D__chunk_delete(H5F_t *f, H5O_t *oh, H5O_storage_t *storage)
else if (exists) {
if (NULL == H5O_msg_read_oh(f, oh, H5O_LAYOUT_ID, &layout))
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get layout message");
- layout_read = TRUE;
+ layout_read = true;
} /* end else if */
else
HGOTO_ERROR(H5E_DATASET, H5E_NOTFOUND, FAIL, "can't find layout message");
@@ -6480,8 +6531,8 @@ H5D__chunk_update_cache(H5D_t *dset)
/* Check if there is already a chunk at this chunk's new location */
old_ent = rdcc->slot[ent->idx];
if (old_ent != NULL) {
- assert(old_ent->locked == FALSE);
- assert(old_ent->deleted == FALSE);
+ assert(old_ent->locked == false);
+ assert(old_ent->deleted == false);
/* Insert the old entry into the temporary list, but do not
* evict (yet). Make sure we do not make any calls to the index
@@ -6527,7 +6578,7 @@ H5D__chunk_update_cache(H5D_t *dset)
ent = tmp_head.tmp_next;
/* Remove the old entry from the cache */
- if (H5D__chunk_cache_evict(dset, ent, TRUE) < 0)
+ if (H5D__chunk_cache_evict(dset, ent, true) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTFLUSH, FAIL, "unable to flush one or more raw data chunks");
} /* end while */
@@ -6553,9 +6604,9 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
{
H5D_chunk_it_ud3_t *udata = (H5D_chunk_it_ud3_t *)_udata; /* User data for callback */
H5D_chunk_ud_t udata_dst; /* User data about new destination chunk */
- hbool_t is_vlen = FALSE; /* Whether datatype is variable-length */
- hbool_t fix_ref = FALSE; /* Whether to fix up references in the dest. file */
- hbool_t need_insert = FALSE; /* Whether the chunk needs to be inserted into the index */
+ bool is_vlen = false; /* Whether datatype is variable-length */
+ bool fix_ref = false; /* Whether to fix up references in the dest. file */
+ bool need_insert = false; /* Whether the chunk needs to be inserted into the index */
/* General information about chunk copy */
void *bkg = udata->bkg; /* Background buffer for datatype conversion */
@@ -6564,7 +6615,7 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
const H5O_pline_t *pline = udata->pline; /* I/O pipeline for applying filters */
/* needed for compressed variable length data */
- hbool_t must_filter = FALSE; /* Whether chunk must be filtered during copy */
+ bool must_filter = false; /* Whether chunk must be filtered during copy */
size_t nbytes; /* Size of chunk in file (in bytes) */
H5Z_cb_t filter_cb; /* Filter failure callback struct */
int ret_value = H5_ITER_CONT; /* Return value */
@@ -6581,20 +6632,20 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
/* Check for filtered chunks */
/* Check for an edge chunk that is not filtered */
if (pline && pline->nused) {
- must_filter = TRUE;
+ must_filter = true;
if ((udata->common.layout->flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS) &&
H5D__chunk_is_partial_edge_chunk(udata->dset_ndims, udata->common.layout->dim, chunk_rec->scaled,
udata->dset_dims))
- must_filter = FALSE;
+ must_filter = false;
}
/* Check parameter for type conversion */
if (udata->do_convert) {
- if (H5T_detect_class(udata->dt_src, H5T_VLEN, FALSE) > 0)
- is_vlen = TRUE;
- else if ((H5T_get_class(udata->dt_src, FALSE) == H5T_REFERENCE) &&
+ if (H5T_detect_class(udata->dt_src, H5T_VLEN, false) > 0)
+ is_vlen = true;
+ else if ((H5T_get_class(udata->dt_src, false) == H5T_REFERENCE) &&
(udata->file_src != udata->idx_info_dst->f))
- fix_ref = TRUE;
+ fix_ref = true;
else
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, H5_ITER_ERROR, "unable to copy dataset elements");
} /* end if */
@@ -6643,12 +6694,12 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
ent = shared_fo->cache.chunk.slot[idx];
if (ent) {
/* Speculatively set the 'found' flag */
- udata->chunk_in_cache = TRUE;
+ udata->chunk_in_cache = true;
/* Verify that the cache entry is the correct chunk */
for (u = 0; u < shared_fo->ndims; u++)
if (chunk_rec->scaled[u] != ent->scaled[u]) {
- udata->chunk_in_cache = FALSE;
+ udata->chunk_in_cache = false;
break;
} /* end if */
} /* end if */
@@ -6751,7 +6802,7 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
udata->buf_size = buf_size;
} /* end if */
- udata->chunk_in_cache = FALSE;
+ udata->chunk_in_cache = false;
udata_dst.chunk_idx =
H5VM_array_offset_pre(udata_dst.common.layout->ndims - 1, udata_dst.common.layout->max_down_chunks,
@@ -6818,8 +6869,8 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src, H5O_layout_chunk
H5S_t *buf_space = NULL; /* Dataspace describing buffer */
hid_t sid_buf = -1; /* ID for buffer dataspace */
uint32_t nelmts = 0; /* Number of elements in buffer */
- hbool_t do_convert = FALSE; /* Indicate that type conversions should be performed */
- hbool_t copy_setup_done = FALSE; /* Indicate that 'copy setup' is done */
+ bool do_convert = false; /* Indicate that type conversions should be performed */
+ bool copy_setup_done = false; /* Indicate that 'copy setup' is done */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -6844,7 +6895,7 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src, H5O_layout_chunk
pline = pline_src;
/* Layout is not created in the destination file, reset index address */
- if (H5D_chunk_idx_reset(storage_dst, TRUE) < 0)
+ if (H5D_chunk_idx_reset(storage_dst, true) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to reset chunked storage index in dest");
/* Initialize layout information */
@@ -6876,14 +6927,14 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src, H5O_layout_chunk
if ((storage_src->ops->copy_setup)(&idx_info_src, &idx_info_dst) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
"unable to set up index-specific chunk copying information");
- copy_setup_done = TRUE;
+ copy_setup_done = true;
/* Create datatype ID for src datatype */
- if ((tid_src = H5I_register(H5I_DATATYPE, dt_src, FALSE)) < 0)
+ if ((tid_src = H5I_register(H5I_DATATYPE, dt_src, false)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register source file datatype");
/* If there's a VLEN source datatype, set up type conversion information */
- if (H5T_detect_class(dt_src, H5T_VLEN, FALSE) > 0) {
+ if (H5T_detect_class(dt_src, H5T_VLEN, false) > 0) {
H5T_t *dt_dst; /* Destination datatype */
H5T_t *dt_mem; /* Memory datatype */
size_t mem_dt_size; /* Memory datatype size */
@@ -6895,7 +6946,7 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src, H5O_layout_chunk
/* create a memory copy of the variable-length datatype */
if (NULL == (dt_mem = H5T_copy(dt_src, H5T_COPY_TRANSIENT)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy");
- if ((tid_mem = H5I_register(H5I_DATATYPE, dt_mem, FALSE)) < 0) {
+ if ((tid_mem = H5I_register(H5I_DATATYPE, dt_mem, false)) < 0) {
(void)H5T_close_real(dt_mem);
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register memory datatype");
} /* end if */
@@ -6907,7 +6958,7 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src, H5O_layout_chunk
(void)H5T_close_real(dt_dst);
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "cannot mark datatype on disk");
} /* end if */
- if ((tid_dst = H5I_register(H5I_DATATYPE, dt_dst, FALSE)) < 0) {
+ if ((tid_dst = H5I_register(H5I_DATATYPE, dt_dst, false)) < 0) {
(void)H5T_close_real(dt_dst);
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register destination file datatype");
} /* end if */
@@ -6939,7 +6990,7 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src, H5O_layout_chunk
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace");
/* Register */
- if ((sid_buf = H5I_register(H5I_DATASPACE, buf_space, FALSE)) < 0) {
+ if ((sid_buf = H5I_register(H5I_DATASPACE, buf_space, false)) < 0) {
(void)H5S_close(buf_space);
HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID");
} /* end if */
@@ -6953,12 +7004,12 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src, H5O_layout_chunk
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for raw data chunk");
/* Indicate that type conversion should be performed */
- do_convert = TRUE;
+ do_convert = true;
} /* end if */
else {
- if (H5T_get_class(dt_src, FALSE) == H5T_REFERENCE) {
+ if (H5T_get_class(dt_src, false) == H5T_REFERENCE) {
/* Indicate that type conversion should be performed */
- do_convert = TRUE;
+ do_convert = true;
} /* end if */
H5_CHECKED_ASSIGN(buf_size, size_t, layout_src->size, uint32_t);
@@ -6972,7 +7023,7 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src, H5O_layout_chunk
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for raw data chunk");
/* Check for reference datatype and no expanding references & clear background buffer */
- if (!cpy_info->expand_ref && ((H5T_get_class(dt_src, FALSE) == H5T_REFERENCE) && (f_src != f_dst)))
+ if (!cpy_info->expand_ref && ((H5T_get_class(dt_src, false) == H5T_REFERENCE) && (f_src != f_dst)))
/* Reset value to zero */
memset(bkg, 0, buf_size);
} /* end if */
@@ -7005,7 +7056,7 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src, H5O_layout_chunk
udata.dset_ndims = (unsigned)sndims;
udata.dset_dims = curr_dims;
udata.cpy_info = cpy_info;
- udata.chunk_in_cache = FALSE;
+ udata.chunk_in_cache = false;
udata.chunk = NULL;
/* Iterate over chunks to copy data */
@@ -7026,7 +7077,7 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src, H5O_layout_chunk
if (!H5_addr_defined(ent->chunk_block.offset)) {
H5MM_memcpy(chunk_rec.scaled, ent->scaled, sizeof(chunk_rec.scaled));
udata.chunk = ent->chunk;
- udata.chunk_in_cache = TRUE;
+ udata.chunk_in_cache = true;
if (H5D__chunk_copy_cb(&chunk_rec, &udata) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy chunk data in cache");
}
@@ -7081,8 +7132,8 @@ H5D__chunk_bh_info(const H5O_loc_t *loc, H5O_t *oh, H5O_layout_t *layout, hsize_
H5O_pline_t pline; /* I/O pipeline message */
H5O_storage_chunk_t *sc = &(layout->storage.u.chunk);
htri_t exists; /* Flag if header message of interest exists */
- hbool_t idx_info_init = FALSE; /* Whether the chunk index info has been initialized */
- hbool_t pline_read = FALSE; /* Whether the I/O pipeline message was read */
+ bool idx_info_init = false; /* Whether the chunk index info has been initialized */
+ bool pline_read = false; /* Whether the I/O pipeline message was read */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -7101,7 +7152,7 @@ H5D__chunk_bh_info(const H5O_loc_t *loc, H5O_t *oh, H5O_layout_t *layout, hsize_
else if (exists) {
if (NULL == H5O_msg_read_oh(loc->file, oh, H5O_PLINE_ID, &pline))
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't find I/O pipeline message");
- pline_read = TRUE;
+ pline_read = true;
} /* end else if */
else
memset(&pline, 0, sizeof(pline));
@@ -7119,7 +7170,7 @@ H5D__chunk_bh_info(const H5O_loc_t *loc, H5O_t *oh, H5O_layout_t *layout, hsize_
/* Allocate any indexing structures */
if (sc->ops->init && (sc->ops->init)(&idx_info, space, loc->addr) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize indexing information");
- idx_info_init = TRUE;
+ idx_info_init = true;
/* Get size of index structure */
if (sc->ops->size && (sc->ops->size)(&idx_info, index_size) < 0)
@@ -7165,7 +7216,7 @@ H5D__chunk_dump_index_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
fprintf(udata->stream, " ========== ======== ========== ==============================\n");
/* Set flag that the headers has been printed */
- udata->header_displayed = TRUE;
+ udata->header_displayed = true;
} /* end if */
/* Print information about this chunk */
@@ -7174,7 +7225,7 @@ H5D__chunk_dump_index_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
for (u = 0; u < udata->ndims; u++)
fprintf(udata->stream, "%s%" PRIuHSIZE, (u ? ", " : ""),
(chunk_rec->scaled[u] * udata->chunk_dim[u]));
- HDfputs("]\n", udata->stream);
+ fputs("]\n", udata->stream);
} /* end if */
FUNC_LEAVE_NOAPI(H5_ITER_CONT)
@@ -7220,7 +7271,7 @@ H5D__chunk_dump_index(H5D_t *dset, FILE *stream)
/* Set up user data for callback */
udata.stream = stream;
- udata.header_displayed = FALSE;
+ udata.header_displayed = false;
udata.ndims = dset->shared->layout.u.chunk.ndims;
udata.chunk_dim = dset->shared->layout.u.chunk.dim;
@@ -7248,7 +7299,7 @@ H5D__chunk_dump_index(H5D_t *dset, FILE *stream)
*-------------------------------------------------------------------------
*/
herr_t
-H5D__chunk_stats(const H5D_t *dset, hbool_t headers)
+H5D__chunk_stats(const H5D_t *dset, bool headers)
{
H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk);
double miss_rate;
@@ -7270,7 +7321,7 @@ H5D__chunk_stats(const H5D_t *dset, hbool_t headers)
#ifdef H5AC_DEBUG
if (H5DEBUG(AC))
- headers = TRUE;
+ headers = true;
#endif
if (headers) {
@@ -7281,10 +7332,10 @@ H5D__chunk_stats(const H5D_t *dset, hbool_t headers)
miss_rate = 0.0;
}
if (miss_rate > 100) {
- HDsnprintf(ascii, sizeof(ascii), "%7d%%", (int)(miss_rate + 0.5));
+ snprintf(ascii, sizeof(ascii), "%7d%%", (int)(miss_rate + 0.5));
}
else {
- HDsnprintf(ascii, sizeof(ascii), "%7.2f%%", miss_rate);
+ snprintf(ascii, sizeof(ascii), "%7.2f%%", miss_rate);
}
fprintf(H5DEBUG(AC), " %-18s %8u %8u %7s %8d+%-9ld\n", "raw data chunks", rdcc->stats.nhits,
@@ -7317,7 +7368,7 @@ H5D__nonexistent_readvv_cb(hsize_t H5_ATTR_UNUSED dst_off, hsize_t src_off, size
{
H5D_chunk_readvv_ud_t *udata = (H5D_chunk_readvv_ud_t *)_udata; /* User data for H5VM_opvv() operator */
H5D_fill_buf_info_t fb_info; /* Dataset's fill buffer info */
- hbool_t fb_info_init = FALSE; /* Whether the fill value buffer has been initialized */
+ bool fb_info_init = false; /* Whether the fill value buffer has been initialized */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -7327,7 +7378,7 @@ H5D__nonexistent_readvv_cb(hsize_t H5_ATTR_UNUSED dst_off, hsize_t src_off, size
&udata->dset->shared->dcpl_cache.fill, udata->dset->shared->type,
udata->dset->shared->type_id, (size_t)0, len) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize fill buffer info");
- fb_info_init = TRUE;
+ fb_info_init = true;
/* Check for VL datatype & fill the buffer with VL datatype fill values */
if (fb_info.has_vlen_fill_type && H5D__fill_refill_vl(&fb_info, fb_info.elmts_per_buf) < 0)
@@ -7403,12 +7454,12 @@ H5D__nonexistent_readvv(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info,
*
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
H5D__chunk_is_partial_edge_chunk(unsigned dset_ndims, const uint32_t *chunk_dims, const hsize_t scaled[],
const hsize_t *dset_dims)
{
unsigned u; /* Local index variable */
- hbool_t ret_value = FALSE; /* Return value */
+ bool ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -7421,7 +7472,7 @@ H5D__chunk_is_partial_edge_chunk(unsigned dset_ndims, const uint32_t *chunk_dims
/* check if this is a partial edge chunk */
for (u = 0; u < dset_ndims; u++)
if (((scaled[u] + 1) * chunk_dims[u]) > dset_dims[u])
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -7441,10 +7492,10 @@ H5D__chunk_is_partial_edge_chunk(unsigned dset_ndims, const uint32_t *chunk_dims
*/
herr_t
H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old_chunk,
- H5F_block_t *new_chunk, hbool_t *need_insert, const hsize_t *scaled)
+ H5F_block_t *new_chunk, bool *need_insert, const hsize_t *scaled)
{
- hbool_t alloc_chunk = FALSE; /* Whether to allocate chunk */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool alloc_chunk = false; /* Whether to allocate chunk */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -7457,7 +7508,7 @@ H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old
assert(new_chunk);
assert(need_insert);
- *need_insert = FALSE;
+ *need_insert = false;
/* Check for filters on chunks */
if (idx_info->pline->nused > 0) {
@@ -7498,7 +7549,7 @@ H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old
if (!(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE))
if (H5MF_xfree(idx_info->f, H5FD_MEM_DRAW, old_chunk->offset, old_chunk->length) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to free chunk");
- alloc_chunk = TRUE;
+ alloc_chunk = true;
} /* end if */
else {
/* Don't need to reallocate chunk, but send its address back up */
@@ -7508,13 +7559,13 @@ H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old
} /* end if */
else {
assert(!H5_addr_defined(new_chunk->offset));
- alloc_chunk = TRUE;
+ alloc_chunk = true;
} /* end else */
} /* end if */
else {
assert(!H5_addr_defined(new_chunk->offset));
assert(new_chunk->length == idx_info->layout->size);
- alloc_chunk = TRUE;
+ alloc_chunk = true;
} /* end else */
/* Actually allocate space for the chunk in the file */
@@ -7541,7 +7592,7 @@ H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old
new_chunk->offset = H5MF_alloc(idx_info->f, H5FD_MEM_DRAW, (hsize_t)new_chunk->length);
if (!H5_addr_defined(new_chunk->offset))
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "file allocation failed");
- *need_insert = TRUE;
+ *need_insert = true;
break;
case H5D_CHUNK_IDX_NTYPES:
@@ -7692,7 +7743,7 @@ H5D__chunk_format_convert(H5D_t *dset, H5D_chk_idx_info_t *idx_info, H5D_chk_idx
* Function: H5D__chunk_index_empty_cb
*
* Purpose: Callback function that simply stops iteration and sets the
- * `empty` parameter to FALSE if called. If this callback is
+ * `empty` parameter to false if called. If this callback is
* entered, it means that the chunk index contains at least
* one chunk, so is not empty.
*
@@ -7703,12 +7754,12 @@ H5D__chunk_format_convert(H5D_t *dset, H5D_chk_idx_info_t *idx_info, H5D_chk_idx
static int
H5D__chunk_index_empty_cb(const H5D_chunk_rec_t H5_ATTR_UNUSED *chunk_rec, void *_udata)
{
- hbool_t *empty = (hbool_t *)_udata;
- int ret_value = H5_ITER_STOP;
+ bool *empty = (bool *)_udata;
+ int ret_value = H5_ITER_STOP;
FUNC_ENTER_PACKAGE_NOERR
- *empty = FALSE;
+ *empty = false;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_index_empty_cb() */
@@ -7729,7 +7780,7 @@ H5D__chunk_index_empty_cb(const H5D_chunk_rec_t H5_ATTR_UNUSED *chunk_rec, void
*-------------------------------------------------------------------------
*/
herr_t
-H5D__chunk_index_empty(const H5D_t *dset, hbool_t *empty)
+H5D__chunk_index_empty(const H5D_t *dset, bool *empty)
{
H5D_chk_idx_info_t idx_info; /* Chunked index info */
H5D_rdcc_ent_t *ent; /* Cache entry */
@@ -7748,7 +7799,7 @@ H5D__chunk_index_empty(const H5D_t *dset, hbool_t *empty)
/* Search for cached chunks that haven't been written out */
for (ent = rdcc->head; ent; ent = ent->next)
/* Flush the chunk out to disk, to make certain the size is correct later */
- if (H5D__chunk_flush_entry(dset, ent, FALSE) < 0)
+ if (H5D__chunk_flush_entry(dset, ent, false) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "cannot flush indexed storage buffer");
/* Compose chunked index info struct */
@@ -7757,7 +7808,7 @@ H5D__chunk_index_empty(const H5D_t *dset, hbool_t *empty)
idx_info.layout = &dset->shared->layout.u.chunk;
idx_info.storage = &dset->shared->layout.storage.u.chunk;
- *empty = TRUE;
+ *empty = true;
if (H5_addr_defined(idx_info.storage->idx_addr)) {
/* Iterate over the allocated chunks */
@@ -7834,7 +7885,7 @@ H5D__get_num_chunks(const H5D_t *dset, const H5S_t H5_ATTR_UNUSED *space, hsize_
/* Search for cached chunks that haven't been written out */
for (ent = rdcc->head; ent; ent = ent->next)
/* Flush the chunk out to disk, to make certain the size is correct later */
- if (H5D__chunk_flush_entry(dset, ent, FALSE) < 0)
+ if (H5D__chunk_flush_entry(dset, ent, false) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "cannot flush indexed storage buffer");
/* Compose chunked index info struct */
@@ -7892,7 +7943,7 @@ H5D__get_chunk_info_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
chunk_info->nbytes = chunk_rec->nbytes;
for (ii = 0; ii < chunk_info->ndims; ii++)
chunk_info->scaled[ii] = chunk_rec->scaled[ii];
- chunk_info->found = TRUE;
+ chunk_info->found = true;
/* Stop iterating */
ret_value = H5_ITER_STOP;
@@ -7942,7 +7993,7 @@ H5D__get_chunk_info(const H5D_t *dset, const H5S_t H5_ATTR_UNUSED *space, hsize_
/* Search for cached chunks that haven't been written out */
for (ent = rdcc->head; ent; ent = ent->next)
/* Flush the chunk out to disk, to make certain the size is correct later */
- if (H5D__chunk_flush_entry(dset, ent, FALSE) < 0)
+ if (H5D__chunk_flush_entry(dset, ent, false) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "cannot flush indexed storage buffer");
/* Compose chunked index info struct */
@@ -7966,7 +8017,7 @@ H5D__get_chunk_info(const H5D_t *dset, const H5S_t H5_ATTR_UNUSED *space, hsize_
udata.nbytes = 0;
udata.filter_mask = 0;
udata.chunk_addr = HADDR_UNDEF;
- udata.found = FALSE;
+ udata.found = false;
/* Iterate over the allocated chunks */
if ((dset->shared->layout.storage.u.chunk.ops->iterate)(&idx_info, H5D__get_chunk_info_cb, &udata) <
@@ -8007,7 +8058,7 @@ static int
H5D__get_chunk_info_by_coord_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
{
H5D_chunk_info_iter_ud_t *chunk_info = (H5D_chunk_info_iter_ud_t *)_udata;
- hbool_t different = FALSE; /* TRUE when a scaled value pair mismatch */
+ bool different = false; /* true when a scaled value pair mismatch */
hsize_t ii; /* Local index value */
int ret_value = H5_ITER_CONT; /* Callback return value */
@@ -8020,14 +8071,14 @@ H5D__get_chunk_info_by_coord_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
/* Going through the scaled, stop when a mismatch is found */
for (ii = 0; ii < chunk_info->ndims && !different; ii++)
if (chunk_info->scaled[ii] != chunk_rec->scaled[ii])
- different = TRUE;
+ different = true;
/* Same scaled coords means the chunk is found, copy the chunk info */
if (!different) {
chunk_info->nbytes = chunk_rec->nbytes;
chunk_info->filter_mask = chunk_rec->filter_mask;
chunk_info->chunk_addr = chunk_rec->chunk_addr;
- chunk_info->found = TRUE;
+ chunk_info->found = true;
/* Stop iterating */
ret_value = H5_ITER_STOP;
@@ -8075,7 +8126,7 @@ H5D__get_chunk_info_by_coord(const H5D_t *dset, const hsize_t *offset, unsigned
/* Search for cached chunks that haven't been written out */
for (ent = rdcc->head; ent; ent = ent->next)
/* Flush the chunk out to disk, to make certain the size is correct later */
- if (H5D__chunk_flush_entry(dset, ent, FALSE) < 0)
+ if (H5D__chunk_flush_entry(dset, ent, false) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "cannot flush indexed storage buffer");
/* Set addr & size for when dset is not written or queried chunk is not found */
@@ -8101,7 +8152,7 @@ H5D__get_chunk_info_by_coord(const H5D_t *dset, const hsize_t *offset, unsigned
udata.nbytes = 0;
udata.filter_mask = 0;
udata.chunk_addr = HADDR_UNDEF;
- udata.found = FALSE;
+ udata.found = false;
/* Iterate over the allocated chunks to find the requested chunk */
if ((dset->shared->layout.storage.u.chunk.ops->iterate)(&idx_info, H5D__get_chunk_info_by_coord_cb,
@@ -8194,7 +8245,7 @@ H5D__chunk_iter(H5D_t *dset, H5D_chunk_iter_op_t op, void *op_data)
/* Search for cached chunks that haven't been written out */
for (ent = rdcc->head; ent; ent = ent->next)
/* Flush the chunk out to disk, to make certain the size is correct later */
- if (H5D__chunk_flush_entry(dset, ent, FALSE) < 0)
+ if (H5D__chunk_flush_entry(dset, ent, false) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "cannot flush indexed storage buffer");
/* Compose chunked index info struct */
diff --git a/src/H5Dcompact.c b/src/H5Dcompact.c
index c16b24ba90e..4a8fa0d61c6 100644
--- a/src/H5Dcompact.c
+++ b/src/H5Dcompact.c
@@ -58,7 +58,7 @@ typedef struct H5D_compact_iovv_memmanage_ud_t {
/* Layout operation callbacks */
static herr_t H5D__compact_construct(H5F_t *f, H5D_t *dset);
-static hbool_t H5D__compact_is_space_alloc(const H5O_storage_t *storage);
+static bool H5D__compact_is_space_alloc(const H5O_storage_t *storage);
static herr_t H5D__compact_io_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo);
static herr_t H5D__compact_iovv_memmanage_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *_udata);
static ssize_t H5D__compact_readvv(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_info,
@@ -113,7 +113,7 @@ herr_t
H5D__compact_fill(const H5D_t *dset)
{
H5D_fill_buf_info_t fb_info; /* Dataset's fill buffer info */
- hbool_t fb_info_init = FALSE; /* Whether the fill value buffer has been initialized */
+ bool fb_info_init = false; /* Whether the fill value buffer has been initialized */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -130,7 +130,7 @@ H5D__compact_fill(const H5D_t *dset)
&dset->shared->dcpl_cache.fill, dset->shared->type, dset->shared->type_id, (size_t)0,
dset->shared->layout.storage.u.compact.size) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize fill buffer info");
- fb_info_init = TRUE;
+ fb_info_init = true;
/* Check for VL datatype & non-default fill value */
if (fb_info.has_vlen_fill_type)
@@ -189,7 +189,7 @@ H5D__compact_construct(H5F_t *f, H5D_t *dset)
/* Verify data size is smaller than maximum header message size
* (64KB) minus other layout message fields.
*/
- max_comp_data_size = H5O_MESG_MAX_SIZE - H5D__layout_meta_size(f, &(dset->shared->layout), FALSE);
+ max_comp_data_size = H5O_MESG_MAX_SIZE - H5D__layout_meta_size(f, &(dset->shared->layout), false);
if (dset->shared->layout.storage.u.compact.size > max_comp_data_size)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
"compact dataset size is bigger than header message maximum size");
@@ -207,7 +207,7 @@ H5D__compact_construct(H5F_t *f, H5D_t *dset)
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
H5D__compact_is_space_alloc(const H5O_storage_t H5_ATTR_UNUSED *storage)
{
FUNC_ENTER_PACKAGE_NOERR
@@ -216,7 +216,7 @@ H5D__compact_is_space_alloc(const H5O_storage_t H5_ATTR_UNUSED *storage)
assert(storage);
/* Compact storage is currently always allocated */
- FUNC_LEAVE_NOAPI(TRUE)
+ FUNC_LEAVE_NOAPI(true)
} /* end H5D__compact_is_space_alloc() */
/*-------------------------------------------------------------------------
@@ -396,7 +396,7 @@ H5D__compact_writevv(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dse
}
/* Mark the compact dataset's buffer as dirty */
- *dset_info->store->compact.dirty = TRUE;
+ *dset_info->store->compact.dirty = true;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -423,9 +423,9 @@ H5D__compact_flush(H5D_t *dset)
/* Check if the buffered compact information is dirty */
if (dset->shared->layout.storage.u.compact.dirty) {
- dset->shared->layout.storage.u.compact.dirty = FALSE;
+ dset->shared->layout.storage.u.compact.dirty = false;
if (H5O_msg_write(&(dset->oloc), H5O_LAYOUT_ID, 0, H5O_UPDATE_TIME, &(dset->shared->layout)) < 0) {
- dset->shared->layout.storage.u.compact.dirty = TRUE;
+ dset->shared->layout.storage.u.compact.dirty = true;
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to update layout message");
}
} /* end if */
@@ -497,11 +497,11 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds
storage_src = &(shared_fo->layout.storage.u.compact);
/* Create datatype ID for src datatype, so it gets freed */
- if ((tid_src = H5I_register(H5I_DATATYPE, dt_src, FALSE)) < 0)
+ if ((tid_src = H5I_register(H5I_DATATYPE, dt_src, false)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register source file datatype");
/* If there's a VLEN source datatype, do type conversion information */
- if (H5T_detect_class(dt_src, H5T_VLEN, FALSE) > 0) {
+ if (H5T_detect_class(dt_src, H5T_VLEN, false) > 0) {
H5T_path_t *tpath_src_mem, *tpath_mem_dst; /* Datatype conversion paths */
H5T_t *dt_dst; /* Destination datatype */
H5T_t *dt_mem; /* Memory datatype */
@@ -516,7 +516,7 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds
/* create a memory copy of the variable-length datatype */
if (NULL == (dt_mem = H5T_copy(dt_src, H5T_COPY_TRANSIENT)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy");
- if ((tid_mem = H5I_register(H5I_DATATYPE, dt_mem, FALSE)) < 0) {
+ if ((tid_mem = H5I_register(H5I_DATATYPE, dt_mem, false)) < 0) {
(void)H5T_close_real(dt_mem);
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register memory datatype");
} /* end if */
@@ -528,7 +528,7 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds
(void)H5T_close_real(dt_dst);
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "cannot mark datatype on disk");
} /* end if */
- if ((tid_dst = H5I_register(H5I_DATATYPE, dt_dst, FALSE)) < 0) {
+ if ((tid_dst = H5I_register(H5I_DATATYPE, dt_dst, false)) < 0) {
(void)H5T_close_real(dt_dst);
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register destination file datatype");
} /* end if */
@@ -564,7 +564,7 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace");
/* Register */
- if ((buf_sid = H5I_register(H5I_DATASPACE, buf_space, FALSE)) < 0) {
+ if ((buf_sid = H5I_register(H5I_DATASPACE, buf_space, false)) < 0) {
H5S_close(buf_space);
HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID");
} /* end if */
@@ -602,7 +602,7 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds
if (H5T_reclaim(tid_mem, buf_space, reclaim_buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to reclaim variable-length data");
} /* end if */
- else if (H5T_get_class(dt_src, FALSE) == H5T_REFERENCE) {
+ else if (H5T_get_class(dt_src, false) == H5T_REFERENCE) {
if (f_src != f_dst) {
/* Check for expanding references */
if (cpy_info->expand_ref) {
@@ -625,7 +625,7 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds
H5MM_memcpy(storage_dst->buf, storage_src->buf, storage_src->size);
/* Mark destination buffer as dirty */
- storage_dst->dirty = TRUE;
+ storage_dst->dirty = true;
done:
if (buf_sid > 0 && H5I_dec_ref(buf_sid) < 0)
diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c
index 4624d8365e4..2a9f178ce8c 100644
--- a/src/H5Dcontig.c
+++ b/src/H5Dcontig.c
@@ -191,12 +191,12 @@ H5D__contig_fill(H5D_t *dset)
MPI_Comm mpi_comm = MPI_COMM_NULL; /* MPI communicator for file */
int mpi_rank = (-1); /* This process's rank */
int mpi_code; /* MPI return code */
- hbool_t blocks_written = FALSE; /* Flag to indicate that chunk was actually written */
- hbool_t using_mpi =
- FALSE; /* Flag to indicate that the file is being accessed with an MPI-capable file driver */
+ bool blocks_written = false; /* Flag to indicate that chunk was actually written */
+ bool using_mpi =
+ false; /* Flag to indicate that the file is being accessed with an MPI-capable file driver */
#endif /* H5_HAVE_PARALLEL */
H5D_fill_buf_info_t fb_info; /* Dataset's fill buffer info */
- hbool_t fb_info_init = FALSE; /* Whether the fill value buffer has been initialized */
+ bool fb_info_init = false; /* Whether the fill value buffer has been initialized */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -220,7 +220,7 @@ H5D__contig_fill(H5D_t *dset)
HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "Can't retrieve MPI rank");
/* Set the MPI-capable file driver flag */
- using_mpi = TRUE;
+ using_mpi = true;
} /* end if */
#endif /* H5_HAVE_PARALLEL */
@@ -241,7 +241,7 @@ H5D__contig_fill(H5D_t *dset)
if (H5D__fill_init(&fb_info, NULL, NULL, NULL, NULL, NULL, &dset->shared->dcpl_cache.fill,
dset->shared->type, dset->shared->type_id, npoints, max_temp_buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize fill buffer info");
- fb_info_init = TRUE;
+ fb_info_init = true;
/* Start at the beginning of the dataset */
offset = 0;
@@ -287,14 +287,14 @@ H5D__contig_fill(H5D_t *dset)
/* If writing fails, push an error and stop writing, but
* still participate in following MPI_Barrier.
*/
- blocks_written = TRUE;
+ blocks_written = true;
HDONE_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to write fill value to dataset");
break;
}
}
/* Indicate that blocks are being written */
- blocks_written = TRUE;
+ blocks_written = true;
} /* end if */
else {
#endif /* H5_HAVE_PARALLEL */
@@ -506,10 +506,10 @@ H5D__contig_init(H5F_t H5_ATTR_UNUSED *f, const H5D_t *dset, hid_t H5_ATTR_UNUSE
*
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
H5D__contig_is_space_alloc(const H5O_storage_t *storage)
{
- hbool_t ret_value = FALSE; /* Return value */
+ bool ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -517,7 +517,7 @@ H5D__contig_is_space_alloc(const H5O_storage_t *storage)
assert(storage);
/* Set return value */
- ret_value = (hbool_t)H5_addr_defined(storage->u.contig.addr);
+ ret_value = (bool)H5_addr_defined(storage->u.contig.addr);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__contig_is_space_alloc() */
@@ -531,7 +531,7 @@ H5D__contig_is_space_alloc(const H5O_storage_t *storage)
*
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
H5D__contig_is_data_cached(const H5D_shared_t *shared_dset)
{
FUNC_ENTER_PACKAGE_NOERR
@@ -557,7 +557,7 @@ H5D__contig_io_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
H5D_t *dataset = dinfo->dset; /* Local pointer to dataset info */
hssize_t old_offset[H5O_LAYOUT_NDIMS]; /* Old selection offset */
- htri_t file_space_normalized = FALSE; /* File dataspace was normalized */
+ htri_t file_space_normalized = false; /* File dataspace was normalized */
int sf_ndims; /* The number of dimensions of the file dataspace (signed) */
@@ -598,7 +598,7 @@ H5D__contig_io_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
H5S_t *tmp_fspace; /* Temporary file dataspace */
/* Create "temporary" chunk for selection operations (copy file space) */
- if (NULL == (tmp_fspace = H5S_copy(dinfo->file_space, TRUE, FALSE)))
+ if (NULL == (tmp_fspace = H5S_copy(dinfo->file_space, true, false)))
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy memory space");
/* Add temporary chunk to the list of pieces */
@@ -614,7 +614,7 @@ H5D__contig_io_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
/* Set the file chunk dataspace */
new_piece_info->fspace = tmp_fspace;
- new_piece_info->fspace_shared = FALSE;
+ new_piece_info->fspace_shared = false;
/* Set the memory chunk dataspace */
/* same as one chunk, just use dset mem space */
@@ -624,7 +624,7 @@ H5D__contig_io_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
* fspace gets free by application H5Sclose(), and
* doesn't require providing layout_ops.io_term() for H5D_LOPS_CONTIG.
*/
- new_piece_info->mspace_shared = TRUE;
+ new_piece_info->mspace_shared = true;
/* Set the number of points */
new_piece_info->piece_points = dinfo->nelmts;
@@ -641,9 +641,11 @@ H5D__contig_io_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
new_piece_info->faddr = dinfo->dset->shared->layout.storage.u.contig.addr;
/* Initialize in-place type conversion info. Start with it disabled. */
- new_piece_info->in_place_tconv = FALSE;
+ new_piece_info->in_place_tconv = false;
new_piece_info->buf_off = 0;
+ new_piece_info->filtered_dset = dinfo->dset->shared->dcpl_cache.pline.nused > 0;
+
/* Calculate type conversion buffer size and check for in-place conversion if necessary. Currently
* only implemented for selection I/O. */
if (io_info->use_select_io != H5D_SELECTION_IO_MODE_OFF &&
@@ -715,7 +717,7 @@ H5D__contig_mdio_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
* Purpose: A small internal function to if it may be possible to use
* selection I/O.
*
- * Return: TRUE/FALSE/FAIL
+ * Return: true/false/FAIL
*
*-------------------------------------------------------------------------
*/
@@ -752,7 +754,7 @@ H5D__contig_may_use_select_io(H5D_io_info_t *io_info, const H5D_dset_io_info_t *
io_info->no_selection_io_cause |= H5D_SEL_IO_CONTIGUOUS_SIEVE_BUFFER;
}
else {
- hbool_t page_buf_enabled;
+ bool page_buf_enabled;
assert(dset_info->layout_ops.writevv == H5D__contig_writevv);
@@ -1029,7 +1031,7 @@ H5D__contig_readvv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *
H5MM_memcpy(buf, dset_contig->sieve_buf, len);
/* Reset sieve buffer dirty flag */
- dset_contig->sieve_dirty = FALSE;
+ dset_contig->sieve_dirty = false;
} /* end else */
} /* end if */
else {
@@ -1058,7 +1060,7 @@ H5D__contig_readvv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "block write failed");
/* Reset sieve buffer dirty flag */
- dset_contig->sieve_dirty = FALSE;
+ dset_contig->sieve_dirty = false;
} /* end if */
} /* end if */
@@ -1076,7 +1078,7 @@ H5D__contig_readvv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "block write failed");
/* Reset sieve buffer dirty flag */
- dset_contig->sieve_dirty = FALSE;
+ dset_contig->sieve_dirty = false;
} /* end if */
/* Determine the new sieve buffer size & location */
@@ -1106,7 +1108,7 @@ H5D__contig_readvv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *
H5MM_memcpy(buf, dset_contig->sieve_buf, len);
/* Reset sieve buffer dirty flag */
- dset_contig->sieve_dirty = FALSE;
+ dset_contig->sieve_dirty = false;
} /* end else */
} /* end else */
} /* end else */
@@ -1295,7 +1297,7 @@ H5D__contig_writevv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len, void
H5MM_memcpy(dset_contig->sieve_buf, buf, len);
/* Set sieve buffer dirty flag */
- dset_contig->sieve_dirty = TRUE;
+ dset_contig->sieve_dirty = true;
/* Stash local copies of these values */
sieve_start = dset_contig->sieve_loc;
@@ -1315,7 +1317,7 @@ H5D__contig_writevv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len, void
H5MM_memcpy(base_sieve_buf, buf, len);
/* Set sieve buffer dirty flag */
- dset_contig->sieve_dirty = TRUE;
+ dset_contig->sieve_dirty = true;
} /* end if */
/* Entire request is not within this data sieve buffer */
else {
@@ -1332,7 +1334,7 @@ H5D__contig_writevv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len, void
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "block write failed");
/* Reset sieve buffer dirty flag */
- dset_contig->sieve_dirty = FALSE;
+ dset_contig->sieve_dirty = false;
} /* end if */
/* Force the sieve buffer to be re-read the next time */
@@ -1381,7 +1383,7 @@ H5D__contig_writevv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len, void
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "block write failed");
/* Reset sieve buffer dirty flag */
- dset_contig->sieve_dirty = FALSE;
+ dset_contig->sieve_dirty = false;
} /* end if */
/* Determine the new sieve buffer size & location */
@@ -1414,7 +1416,7 @@ H5D__contig_writevv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len, void
H5MM_memcpy(dset_contig->sieve_buf, buf, len);
/* Set sieve buffer dirty flag */
- dset_contig->sieve_dirty = TRUE;
+ dset_contig->sieve_dirty = true;
} /* end else */
} /* end else */
} /* end else */
@@ -1613,11 +1615,11 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, H5F_t *f
H5S_t *buf_space = NULL; /* Dataspace describing buffer */
hid_t buf_sid = -1; /* ID for buffer dataspace */
hsize_t buf_dim[1] = {0}; /* Dimension for buffer */
- hbool_t is_vlen = FALSE; /* Flag to indicate that VL type conversion should occur */
- hbool_t fix_ref = FALSE; /* Flag to indicate that ref values should be fixed */
+ bool is_vlen = false; /* Flag to indicate that VL type conversion should occur */
+ bool fix_ref = false; /* Flag to indicate that ref values should be fixed */
H5D_shared_t *shared_fo =
(H5D_shared_t *)cpy_info->shared_fo; /* Pointer to the shared struct for dataset object */
- hbool_t try_sieve = FALSE; /* Try to get data from the sieve buffer */
+ bool try_sieve = false; /* Try to get data from the sieve buffer */
haddr_t sieve_start = HADDR_UNDEF; /* Start location of sieve buffer */
haddr_t sieve_end = HADDR_UNDEF; /* End locations of sieve buffer */
herr_t ret_value = SUCCEED; /* Return value */
@@ -1644,15 +1646,15 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, H5F_t *f
/* Create datatype ID for src datatype. We may or may not use this ID,
* but this ensures that the src datatype will be freed.
*/
- if ((tid_src = H5I_register(H5I_DATATYPE, dt_src, FALSE)) < 0)
+ if ((tid_src = H5I_register(H5I_DATATYPE, dt_src, false)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register source file datatype");
/* If there's a VLEN source datatype, set up type conversion information */
- if (H5T_detect_class(dt_src, H5T_VLEN, FALSE) > 0) {
+ if (H5T_detect_class(dt_src, H5T_VLEN, false) > 0) {
/* create a memory copy of the variable-length datatype */
if (NULL == (dt_mem = H5T_copy(dt_src, H5T_COPY_TRANSIENT)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy");
- if ((tid_mem = H5I_register(H5I_DATATYPE, dt_mem, FALSE)) < 0) {
+ if ((tid_mem = H5I_register(H5I_DATATYPE, dt_mem, false)) < 0) {
(void)H5T_close_real(dt_mem);
HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register memory datatype");
} /* end if */
@@ -1664,7 +1666,7 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, H5F_t *f
(void)H5T_close_real(dt_dst);
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "cannot mark datatype on disk");
} /* end if */
- if ((tid_dst = H5I_register(H5I_DATATYPE, dt_dst, FALSE)) < 0) {
+ if ((tid_dst = H5I_register(H5I_DATATYPE, dt_dst, false)) < 0) {
(void)H5T_close_real(dt_dst);
HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register destination file datatype");
} /* end if */
@@ -1705,20 +1707,20 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, H5F_t *f
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace");
/* Register */
- if ((buf_sid = H5I_register(H5I_DATASPACE, buf_space, FALSE)) < 0) {
+ if ((buf_sid = H5I_register(H5I_DATASPACE, buf_space, false)) < 0) {
H5S_close(buf_space);
HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID");
} /* end if */
/* Set flag to do type conversion */
- is_vlen = TRUE;
+ is_vlen = true;
} /* end if */
else {
/* Check for reference datatype */
- if (H5T_get_class(dt_src, FALSE) == H5T_REFERENCE) {
+ if (H5T_get_class(dt_src, false) == H5T_REFERENCE) {
/* Need to fix values of references when copying across files */
if (f_src != f_dst)
- fix_ref = TRUE;
+ fix_ref = true;
} /* end if */
/* Set the number of bytes to read & write to the buffer size */
@@ -1747,7 +1749,7 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, H5F_t *f
/* If data sieving is enabled and the dataset is open in the file,
set up to copy data out of the sieve buffer if deemed possible later */
if (H5F_HAS_FEATURE(f_src, H5FD_FEAT_DATA_SIEVE) && shared_fo && shared_fo->cache.contig.sieve_buf) {
- try_sieve = TRUE;
+ try_sieve = true;
sieve_start = shared_fo->cache.contig.sieve_loc;
sieve_end = sieve_start + shared_fo->cache.contig.sieve_size;
}
diff --git a/src/H5Ddeprec.c b/src/H5Ddeprec.c
index d8c19c0e30b..04ab2cc09e2 100644
--- a/src/H5Ddeprec.c
+++ b/src/H5Ddeprec.c
@@ -117,7 +117,7 @@ H5Dcreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, hid_t
if (H5P_DEFAULT == dcpl_id)
dcpl_id = H5P_DATASET_CREATE_DEFAULT;
- else if (TRUE != H5P_isa_class(dcpl_id, H5P_DATASET_CREATE))
+ else if (true != H5P_isa_class(dcpl_id, H5P_DATASET_CREATE))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not dataset create property list ID");
/* Set the DCPL for the API context */
@@ -138,7 +138,7 @@ H5Dcreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, hid_t
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, H5I_INVALID_HID, "unable to create dataset");
/* Register the new dataset to get an ID for it */
- if ((ret_value = H5VL_register(H5I_DATASET, dset, vol_obj->connector, TRUE)) < 0)
+ if ((ret_value = H5VL_register(H5I_DATASET, dset, vol_obj->connector, true)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataset");
done:
@@ -194,7 +194,7 @@ H5Dopen1(hid_t loc_id, const char *name)
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open dataset");
/* Get an ID for the dataset */
- if ((ret_value = H5VL_register(H5I_DATASET, dset, vol_obj->connector, TRUE)) < 0)
+ if ((ret_value = H5VL_register(H5I_DATASET, dset, vol_obj->connector, true)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, H5I_INVALID_HID, "can't register dataset ID");
done:
@@ -323,7 +323,7 @@ H5Dvlen_reclaim(hid_t type_id, hid_t space_id, hid_t dxpl_id, void *buf)
/* Get the default dataset transfer property list if the user didn't provide one */
if (H5P_DEFAULT == dxpl_id)
dxpl_id = H5P_DATASET_XFER_DEFAULT;
- else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ else if (true != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms");
/* Set DXPL for operation */
diff --git a/src/H5Dearray.c b/src/H5Dearray.c
index 93535acb9ce..c713b6f18bb 100644
--- a/src/H5Dearray.c
+++ b/src/H5Dearray.c
@@ -66,7 +66,7 @@ typedef struct H5D_earray_ctx_t {
typedef struct H5D_earray_it_ud_t {
H5D_chunk_common_ud_t common; /* Common info for Fixed Array user data (must be first) */
H5D_chunk_rec_t chunk_rec; /* Generic chunk record for callback */
- hbool_t filtered; /* Whether the chunks are filtered */
+ bool filtered; /* Whether the chunks are filtered */
H5D_chunk_cb_func_t cb; /* Chunk callback routine */
void *udata; /* User data for chunk callback routine */
} H5D_earray_it_ud_t;
@@ -103,26 +103,26 @@ static herr_t H5D__earray_filt_decode(const void *raw, void *elmt, size_t nelmts
static herr_t H5D__earray_filt_debug(FILE *stream, int indent, int fwidth, hsize_t idx, const void *elmt);
/* Chunked layout indexing callbacks */
-static herr_t H5D__earray_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t *space,
- haddr_t dset_ohdr_addr);
-static herr_t H5D__earray_idx_create(const H5D_chk_idx_info_t *idx_info);
-static hbool_t H5D__earray_idx_is_space_alloc(const H5O_storage_chunk_t *storage);
-static herr_t H5D__earray_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata,
- const H5D_t *dset);
-static herr_t H5D__earray_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata);
-static herr_t H5D__earray_idx_resize(H5O_layout_chunk_t *layout);
-static int H5D__earray_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t chunk_cb,
- void *chunk_udata);
-static herr_t H5D__earray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t *udata);
-static herr_t H5D__earray_idx_delete(const H5D_chk_idx_info_t *idx_info);
-static herr_t H5D__earray_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src,
- const H5D_chk_idx_info_t *idx_info_dst);
-static herr_t H5D__earray_idx_copy_shutdown(H5O_storage_chunk_t *storage_src,
- H5O_storage_chunk_t *storage_dst);
-static herr_t H5D__earray_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *size);
-static herr_t H5D__earray_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr);
-static herr_t H5D__earray_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream);
-static herr_t H5D__earray_idx_dest(const H5D_chk_idx_info_t *idx_info);
+static herr_t H5D__earray_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t *space,
+ haddr_t dset_ohdr_addr);
+static herr_t H5D__earray_idx_create(const H5D_chk_idx_info_t *idx_info);
+static bool H5D__earray_idx_is_space_alloc(const H5O_storage_chunk_t *storage);
+static herr_t H5D__earray_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata,
+ const H5D_t *dset);
+static herr_t H5D__earray_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata);
+static herr_t H5D__earray_idx_resize(H5O_layout_chunk_t *layout);
+static int H5D__earray_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t chunk_cb,
+ void *chunk_udata);
+static herr_t H5D__earray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t *udata);
+static herr_t H5D__earray_idx_delete(const H5D_chk_idx_info_t *idx_info);
+static herr_t H5D__earray_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src,
+ const H5D_chk_idx_info_t *idx_info_dst);
+static herr_t H5D__earray_idx_copy_shutdown(H5O_storage_chunk_t *storage_src,
+ H5O_storage_chunk_t *storage_dst);
+static herr_t H5D__earray_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *size);
+static herr_t H5D__earray_idx_reset(H5O_storage_chunk_t *storage, bool reset_addr);
+static herr_t H5D__earray_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream);
+static herr_t H5D__earray_idx_dest(const H5D_chk_idx_info_t *idx_info);
/* Generic extensible array routines */
static herr_t H5D__earray_idx_open(const H5D_chk_idx_info_t *idx_info);
@@ -134,7 +134,7 @@ static herr_t H5D__earray_idx_depend(const H5D_chk_idx_info_t *idx_info);
/* Extensible array indexed chunk I/O ops */
const H5D_chunk_ops_t H5D_COPS_EARRAY[1] = {{
- TRUE, /* Extensible array indices support SWMR access */
+ true, /* Extensible array indices support SWMR access */
H5D__earray_idx_init, /* init */
H5D__earray_idx_create, /* create */
H5D__earray_idx_is_space_alloc, /* is_space_alloc */
@@ -395,7 +395,7 @@ H5D__earray_debug(FILE *stream, int indent, int fwidth, hsize_t idx, const void
assert(elmt);
/* Print element */
- HDsnprintf(temp_str, sizeof(temp_str), "Element #%" PRIuHSIZE ":", idx);
+ snprintf(temp_str, sizeof(temp_str), "Element #%" PRIuHSIZE ":", idx);
fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, temp_str, *(const haddr_t *)elmt);
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -539,7 +539,7 @@ H5D__earray_filt_debug(FILE *stream, int indent, int fwidth, hsize_t idx, const
assert(elmt);
/* Print element */
- HDsnprintf(temp_str, sizeof(temp_str), "Element #%" PRIuHSIZE ":", idx);
+ snprintf(temp_str, sizeof(temp_str), "Element #%" PRIuHSIZE ":", idx);
fprintf(stream, "%*s%-*s {%" PRIuHADDR ", %u, %0x}\n", indent, "", fwidth, temp_str, elmt->addr,
elmt->nbytes, elmt->filter_mask);
@@ -562,7 +562,7 @@ H5D__earray_crt_dbg_context(H5F_t *f, haddr_t obj_addr)
{
H5D_earray_ctx_ud_t *dbg_ctx = NULL; /* Context for fixed array callback */
H5O_loc_t obj_loc; /* Pointer to an object's location */
- hbool_t obj_opened = FALSE; /* Flag to indicate that the object header was opened */
+ bool obj_opened = false; /* Flag to indicate that the object header was opened */
H5O_layout_t layout; /* Layout message */
void *ret_value = NULL; /* Return value */
@@ -585,7 +585,7 @@ H5D__earray_crt_dbg_context(H5F_t *f, haddr_t obj_addr)
/* Open the object header where the layout message resides */
if (H5O_open(&obj_loc) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, NULL, "can't open object header");
- obj_opened = TRUE;
+ obj_opened = true;
/* Read the layout message */
if (NULL == H5O_msg_read(&obj_loc, H5O_LAYOUT_ID, &layout))
@@ -685,7 +685,7 @@ H5D__earray_idx_depend(const H5D_chk_idx_info_t *idx_info)
oloc.addr = idx_info->storage->u.earray.dset_ohdr_addr;
/* Get header */
- if (NULL == (oh = H5O_protect(&oloc, H5AC__READ_ONLY_FLAG, TRUE)))
+ if (NULL == (oh = H5O_protect(&oloc, H5AC__READ_ONLY_FLAG, true)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTPROTECT, FAIL, "unable to protect object header");
/* Retrieve the dataset's object header proxy */
@@ -914,7 +914,7 @@ H5D__earray_idx_create(const H5D_chk_idx_info_t *idx_info)
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
H5D__earray_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
{
FUNC_ENTER_PACKAGE_NOERR
@@ -922,7 +922,7 @@ H5D__earray_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
/* Check args */
assert(storage);
- FUNC_LEAVE_NOAPI((hbool_t)H5_addr_defined(storage->idx_addr))
+ FUNC_LEAVE_NOAPI((bool)H5_addr_defined(storage->idx_addr))
} /* end H5D__earray_idx_is_space_alloc() */
/*-------------------------------------------------------------------------
@@ -1611,7 +1611,7 @@ H5D__earray_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size)
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__earray_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
+H5D__earray_idx_reset(H5O_storage_chunk_t *storage, bool reset_addr)
{
FUNC_ENTER_PACKAGE_NOERR
diff --git a/src/H5Defl.c b/src/H5Defl.c
index 84f00ede313..05ca107faec 100644
--- a/src/H5Defl.c
+++ b/src/H5Defl.c
@@ -170,7 +170,7 @@ H5D__efl_construct(H5F_t *f, H5D_t *dset)
*
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
H5D__efl_is_space_alloc(const H5O_storage_t H5_ATTR_UNUSED *storage)
{
FUNC_ENTER_PACKAGE_NOERR
@@ -179,7 +179,7 @@ H5D__efl_is_space_alloc(const H5O_storage_t H5_ATTR_UNUSED *storage)
assert(storage);
/* EFL storage is currently always treated as allocated */
- FUNC_LEAVE_NOAPI(TRUE)
+ FUNC_LEAVE_NOAPI(true)
} /* end H5D__efl_is_space_alloc() */
/*-------------------------------------------------------------------------
diff --git a/src/H5Dfarray.c b/src/H5Dfarray.c
index 9235ecd95d7..450d466755c 100644
--- a/src/H5Dfarray.c
+++ b/src/H5Dfarray.c
@@ -64,7 +64,7 @@ typedef struct H5D_farray_ctx_t {
typedef struct H5D_farray_it_ud_t {
H5D_chunk_common_ud_t common; /* Common info for Fixed Array user data (must be first) */
H5D_chunk_rec_t chunk_rec; /* Generic chunk record for callback */
- hbool_t filtered; /* Whether the chunks are filtered */
+ bool filtered; /* Whether the chunks are filtered */
H5D_chunk_cb_func_t cb; /* Chunk callback routine */
void *udata; /* User data for chunk callback routine */
} H5D_farray_it_ud_t;
@@ -102,25 +102,25 @@ static herr_t H5D__farray_filt_decode(const void *raw, void *elmt, size_t nelmts
static herr_t H5D__farray_filt_debug(FILE *stream, int indent, int fwidth, hsize_t idx, const void *elmt);
/* Chunked layout indexing callbacks */
-static herr_t H5D__farray_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t *space,
- haddr_t dset_ohdr_addr);
-static herr_t H5D__farray_idx_create(const H5D_chk_idx_info_t *idx_info);
-static hbool_t H5D__farray_idx_is_space_alloc(const H5O_storage_chunk_t *storage);
-static herr_t H5D__farray_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata,
- const H5D_t *dset);
-static herr_t H5D__farray_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata);
-static int H5D__farray_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t chunk_cb,
- void *chunk_udata);
-static herr_t H5D__farray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t *udata);
-static herr_t H5D__farray_idx_delete(const H5D_chk_idx_info_t *idx_info);
-static herr_t H5D__farray_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src,
- const H5D_chk_idx_info_t *idx_info_dst);
-static herr_t H5D__farray_idx_copy_shutdown(H5O_storage_chunk_t *storage_src,
- H5O_storage_chunk_t *storage_dst);
-static herr_t H5D__farray_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *size);
-static herr_t H5D__farray_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr);
-static herr_t H5D__farray_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream);
-static herr_t H5D__farray_idx_dest(const H5D_chk_idx_info_t *idx_info);
+static herr_t H5D__farray_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t *space,
+ haddr_t dset_ohdr_addr);
+static herr_t H5D__farray_idx_create(const H5D_chk_idx_info_t *idx_info);
+static bool H5D__farray_idx_is_space_alloc(const H5O_storage_chunk_t *storage);
+static herr_t H5D__farray_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata,
+ const H5D_t *dset);
+static herr_t H5D__farray_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata);
+static int H5D__farray_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t chunk_cb,
+ void *chunk_udata);
+static herr_t H5D__farray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t *udata);
+static herr_t H5D__farray_idx_delete(const H5D_chk_idx_info_t *idx_info);
+static herr_t H5D__farray_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src,
+ const H5D_chk_idx_info_t *idx_info_dst);
+static herr_t H5D__farray_idx_copy_shutdown(H5O_storage_chunk_t *storage_src,
+ H5O_storage_chunk_t *storage_dst);
+static herr_t H5D__farray_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *size);
+static herr_t H5D__farray_idx_reset(H5O_storage_chunk_t *storage, bool reset_addr);
+static herr_t H5D__farray_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream);
+static herr_t H5D__farray_idx_dest(const H5D_chk_idx_info_t *idx_info);
/* Generic fixed array routines */
static herr_t H5D__farray_idx_open(const H5D_chk_idx_info_t *idx_info);
@@ -132,7 +132,7 @@ static herr_t H5D__farray_idx_depend(const H5D_chk_idx_info_t *idx_info);
/* Fixed array indexed chunk I/O ops */
const H5D_chunk_ops_t H5D_COPS_FARRAY[1] = {{
- TRUE, /* Fixed array indices support SWMR access */
+ true, /* Fixed array indices support SWMR access */
H5D__farray_idx_init, /* init */
H5D__farray_idx_create, /* create */
H5D__farray_idx_is_space_alloc, /* is_space_alloc */
@@ -393,7 +393,7 @@ H5D__farray_debug(FILE *stream, int indent, int fwidth, hsize_t idx, const void
assert(elmt);
/* Print element */
- HDsnprintf(temp_str, sizeof(temp_str), "Element #%" PRIuHSIZE ":", idx);
+ snprintf(temp_str, sizeof(temp_str), "Element #%" PRIuHSIZE ":", idx);
fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, temp_str, *(const haddr_t *)elmt);
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -415,7 +415,7 @@ H5D__farray_crt_dbg_context(H5F_t *f, haddr_t obj_addr)
{
H5D_farray_ctx_ud_t *dbg_ctx = NULL; /* Context for fixed array callback */
H5O_loc_t obj_loc; /* Pointer to an object's location */
- hbool_t obj_opened = FALSE; /* Flag to indicate that the object header was opened */
+ bool obj_opened = false; /* Flag to indicate that the object header was opened */
H5O_layout_t layout; /* Layout message */
void *ret_value = NULL; /* Return value */
@@ -437,7 +437,7 @@ H5D__farray_crt_dbg_context(H5F_t *f, haddr_t obj_addr)
/* Open the object header where the layout message resides */
if (H5O_open(&obj_loc) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, NULL, "can't open object header");
- obj_opened = TRUE;
+ obj_opened = true;
/* Read the layout message */
if (NULL == H5O_msg_read(&obj_loc, H5O_LAYOUT_ID, &layout))
@@ -635,7 +635,7 @@ H5D__farray_filt_debug(FILE *stream, int indent, int fwidth, hsize_t idx, const
assert(elmt);
/* Print element */
- HDsnprintf(temp_str, sizeof(temp_str), "Element #%" PRIuHSIZE ":", idx);
+ snprintf(temp_str, sizeof(temp_str), "Element #%" PRIuHSIZE ":", idx);
fprintf(stream, "%*s%-*s {%" PRIuHADDR ", %u, %0x}\n", indent, "", fwidth, temp_str, elmt->addr,
elmt->nbytes, elmt->filter_mask);
@@ -681,7 +681,7 @@ H5D__farray_idx_depend(const H5D_chk_idx_info_t *idx_info)
oloc.addr = idx_info->storage->u.farray.dset_ohdr_addr;
/* Get header */
- if (NULL == (oh = H5O_protect(&oloc, H5AC__READ_ONLY_FLAG, TRUE)))
+ if (NULL == (oh = H5O_protect(&oloc, H5AC__READ_ONLY_FLAG, true)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTPROTECT, FAIL, "unable to protect object header");
/* Retrieve the dataset's object header proxy */
@@ -862,7 +862,7 @@ H5D__farray_idx_create(const H5D_chk_idx_info_t *idx_info)
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
H5D__farray_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
{
FUNC_ENTER_PACKAGE_NOERR
@@ -870,7 +870,7 @@ H5D__farray_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
/* Check args */
assert(storage);
- FUNC_LEAVE_NOAPI((hbool_t)H5_addr_defined(storage->idx_addr))
+ FUNC_LEAVE_NOAPI((bool)H5_addr_defined(storage->idx_addr))
} /* end H5D__farray_idx_is_space_alloc() */
/*-------------------------------------------------------------------------
@@ -1468,7 +1468,7 @@ H5D__farray_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size)
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__farray_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
+H5D__farray_idx_reset(H5O_storage_chunk_t *storage, bool reset_addr)
{
FUNC_ENTER_PACKAGE_NOERR
diff --git a/src/H5Dfill.c b/src/H5Dfill.c
index ed1ac3e90ba..8f23acd3405 100644
--- a/src/H5Dfill.c
+++ b/src/H5Dfill.c
@@ -111,7 +111,7 @@ herr_t
H5D__fill(const void *fill, const H5T_t *fill_type, void *buf, const H5T_t *buf_type, H5S_t *space)
{
H5S_sel_iter_t *mem_iter = NULL; /* Memory selection iteration info */
- hbool_t mem_iter_init = FALSE; /* Whether the memory selection iterator has been initialized */
+ bool mem_iter_init = false; /* Whether the memory selection iterator has been initialized */
H5WB_t *elem_wb = NULL; /* Wrapped buffer for element data */
uint8_t elem_buf[H5T_ELEM_BUF_SIZE]; /* Buffer for element data */
H5WB_t *bkg_elem_wb = NULL; /* Wrapped buffer for background data */
@@ -171,10 +171,10 @@ H5D__fill(const void *fill, const H5T_t *fill_type, void *buf, const H5T_t *buf_
/* Construct source & destination datatype IDs, if we will need them */
if (!H5T_path_noop(tpath)) {
- if ((src_id = H5I_register(H5I_DATATYPE, H5T_copy(fill_type, H5T_COPY_ALL), FALSE)) < 0)
+ if ((src_id = H5I_register(H5I_DATATYPE, H5T_copy(fill_type, H5T_COPY_ALL), false)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register types for conversion");
- if ((dst_id = H5I_register(H5I_DATATYPE, H5T_copy(buf_type, H5T_COPY_ALL), FALSE)) < 0)
+ if ((dst_id = H5I_register(H5I_DATATYPE, H5T_copy(buf_type, H5T_COPY_ALL), false)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register types for conversion");
} /* end if */
@@ -182,7 +182,7 @@ H5D__fill(const void *fill, const H5T_t *fill_type, void *buf, const H5T_t *buf_
* then do conversion on each element so that each of them has a copy
* of the VL data.
*/
- if (TRUE == H5T_detect_class(fill_type, H5T_VLEN, FALSE)) {
+ if (true == H5T_detect_class(fill_type, H5T_VLEN, false)) {
hsize_t nelmts; /* Number of data elements */
/* Get the number of elements in the selection */
@@ -214,7 +214,7 @@ H5D__fill(const void *fill, const H5T_t *fill_type, void *buf, const H5T_t *buf_
if (H5S_select_iter_init(mem_iter, space, dst_type_size, 0) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
"unable to initialize memory selection information");
- mem_iter_init = TRUE;
+ mem_iter_init = true;
/* Scatter the data into memory */
if (H5D__scatter_mem(tmp_buf, mem_iter, (size_t)nelmts, buf /*out*/) < 0)
@@ -330,16 +330,16 @@ H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf, H5MM_allocat
htri_t has_vlen_type; /* Whether the datatype has a VL component */
/* Detect whether the datatype has a VL component */
- if ((has_vlen_type = H5T_detect_class(dset_type, H5T_VLEN, FALSE)) < 0)
+ if ((has_vlen_type = H5T_detect_class(dset_type, H5T_VLEN, false)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "unable to detect vlen datatypes?");
- fb_info->has_vlen_fill_type = (hbool_t)has_vlen_type;
+ fb_info->has_vlen_fill_type = (bool)has_vlen_type;
/* If necessary, convert fill value datatypes (which copies VL components, etc.) */
if (fb_info->has_vlen_fill_type) {
/* Create temporary datatype for conversion operation */
if (NULL == (fb_info->mem_type = H5T_copy(dset_type, H5T_COPY_TRANSIENT)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy file datatype");
- if ((fb_info->mem_tid = H5I_register(H5I_DATATYPE, fb_info->mem_type, FALSE)) < 0)
+ if ((fb_info->mem_tid = H5I_register(H5I_DATATYPE, fb_info->mem_type, false)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register memory datatype");
/* Retrieve sizes of memory & file datatypes */
@@ -364,7 +364,7 @@ H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf, H5MM_allocat
/* Allocate fill buffer */
if (caller_fill_buf) {
fb_info->fill_buf = caller_fill_buf;
- fb_info->use_caller_fill_buf = TRUE;
+ fb_info->use_caller_fill_buf = true;
} /* end if */
else {
if (alloc_func)
@@ -417,7 +417,7 @@ H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf, H5MM_allocat
/* Allocate temporary buffer */
if (caller_fill_buf) {
fb_info->fill_buf = caller_fill_buf;
- fb_info->use_caller_fill_buf = TRUE;
+ fb_info->use_caller_fill_buf = true;
} /* end if */
else {
if (alloc_func)
@@ -450,7 +450,7 @@ H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf, H5MM_allocat
/* Use (and zero) caller's buffer, if provided */
if (caller_fill_buf) {
fb_info->fill_buf = caller_fill_buf;
- fb_info->use_caller_fill_buf = TRUE;
+ fb_info->use_caller_fill_buf = true;
memset(fb_info->fill_buf, 0, fb_info->fill_buf_size);
} /* end if */
diff --git a/src/H5Dint.c b/src/H5Dint.c
index a547a724277..b37d35cfdc5 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -74,17 +74,17 @@ typedef struct {
/********************/
/* General stuff */
-static H5D_shared_t *H5D__new(hid_t dcpl_id, hid_t dapl_id, hbool_t creating, hbool_t vl_type);
+static H5D_shared_t *H5D__new(hid_t dcpl_id, hid_t dapl_id, bool creating, bool vl_type);
static herr_t H5D__init_type(H5F_t *file, const H5D_t *dset, hid_t type_id, H5T_t *type);
static herr_t H5D__cache_dataspace_info(const H5D_t *dset);
static herr_t H5D__init_space(H5F_t *file, const H5D_t *dset, const H5S_t *space);
static herr_t H5D__update_oh_info(H5F_t *file, H5D_t *dset, hid_t dapl_id);
static herr_t H5D__build_file_prefix(const H5D_t *dset, H5F_prefix_open_t prefix_type, char **file_prefix);
static herr_t H5D__open_oid(H5D_t *dataset, hid_t dapl_id);
-static herr_t H5D__init_storage(H5D_t *dset, hbool_t full_overwrite, hsize_t old_dim[]);
+static herr_t H5D__init_storage(H5D_t *dset, bool full_overwrite, hsize_t old_dim[]);
static herr_t H5D__append_flush_setup(H5D_t *dset, hid_t dapl_id);
static herr_t H5D__close_cb(H5VL_object_t *dset_vol_obj, void **request);
-static herr_t H5D__use_minimized_dset_headers(H5F_t *file, hbool_t *minimize);
+static herr_t H5D__use_minimized_dset_headers(H5F_t *file, bool *minimize);
static herr_t H5D__prepare_minimized_oh(H5F_t *file, H5D_t *dset, H5O_loc_t *oloc);
static size_t H5D__calculate_minimum_header_size(H5F_t *file, H5D_t *dset, H5O_t *ohdr);
static void *H5D__vlen_get_buf_size_alloc(size_t size, void *info);
@@ -191,8 +191,8 @@ H5D_init(void)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't retrieve pipeline filter");
/* Retrieve the prefixes of VDS and external file from the environment variable */
- H5D_prefix_vds_env = HDgetenv("HDF5_VDS_PREFIX");
- H5D_prefix_ext_env = HDgetenv("HDF5_EXTFILE_PREFIX");
+ H5D_prefix_vds_env = getenv("HDF5_VDS_PREFIX");
+ H5D_prefix_ext_env = getenv("HDF5_EXTFILE_PREFIX");
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -238,7 +238,7 @@ H5D_top_term_package(void)
*
* QAK - 5/13/03
*/
- (void)H5I_clear_type(H5I_DATASET, TRUE, FALSE);
+ (void)H5I_clear_type(H5I_DATASET, true, false);
n++; /*H5I*/
}
@@ -417,7 +417,7 @@ H5D__get_space_status(const H5D_t *dset, H5D_space_status_t *allocation)
*-------------------------------------------------------------------------
*/
static H5D_shared_t *
-H5D__new(hid_t dcpl_id, hid_t dapl_id, hbool_t creating, hbool_t vl_type)
+H5D__new(hid_t dcpl_id, hid_t dapl_id, bool creating, bool vl_type)
{
H5D_shared_t *new_dset = NULL; /* New dataset object */
H5P_genplist_t *plist; /* Property list created */
@@ -436,7 +436,7 @@ H5D__new(hid_t dcpl_id, hid_t dapl_id, hbool_t creating, hbool_t vl_type)
* don't bother to copy it, just increment the reference count
*/
if (!vl_type && creating && dcpl_id == H5P_DATASET_CREATE_DEFAULT) {
- if (H5I_inc_ref(dcpl_id, FALSE) < 0)
+ if (H5I_inc_ref(dcpl_id, false) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINC, NULL, "can't increment default DCPL ID");
new_dset->dcpl_id = dcpl_id;
} /* end if */
@@ -445,11 +445,11 @@ H5D__new(hid_t dcpl_id, hid_t dapl_id, hbool_t creating, hbool_t vl_type)
if (NULL == (plist = (H5P_genplist_t *)H5I_object(dcpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a property list");
- new_dset->dcpl_id = H5P_copy_plist(plist, FALSE);
+ new_dset->dcpl_id = H5P_copy_plist(plist, false);
} /* end else */
if (!vl_type && creating && dapl_id == H5P_DATASET_ACCESS_DEFAULT) {
- if (H5I_inc_ref(dapl_id, FALSE) < 0)
+ if (H5I_inc_ref(dapl_id, false) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINC, NULL, "can't increment default DAPL ID");
new_dset->dapl_id = dapl_id;
} /* end if */
@@ -458,7 +458,7 @@ H5D__new(hid_t dcpl_id, hid_t dapl_id, hbool_t creating, hbool_t vl_type)
if (NULL == (plist = (H5P_genplist_t *)H5I_object(dapl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a property list");
- new_dset->dapl_id = H5P_copy_plist(plist, FALSE);
+ new_dset->dapl_id = H5P_copy_plist(plist, false);
} /* end else */
/* Set return value */
@@ -490,10 +490,10 @@ H5D__new(hid_t dcpl_id, hid_t dapl_id, hbool_t creating, hbool_t vl_type)
static herr_t
H5D__init_type(H5F_t *file, const H5D_t *dset, hid_t type_id, H5T_t *type)
{
- htri_t relocatable; /* Flag whether the type is relocatable */
- htri_t immutable; /* Flag whether the type is immutable */
- hbool_t use_at_least_v18; /* Flag indicating to use at least v18 format versions */
- herr_t ret_value = SUCCEED; /* Return value */
+ htri_t relocatable; /* Flag whether the type is relocatable */
+ htri_t immutable; /* Flag whether the type is immutable */
+ bool use_at_least_v18; /* Flag indicating to use at least v18 format versions */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -534,12 +534,12 @@ H5D__init_type(H5F_t *file, const H5D_t *dset, hid_t type_id, H5T_t *type)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set version of datatype");
/* Get a datatype ID for the dataset's datatype */
- if ((dset->shared->type_id = H5I_register(H5I_DATATYPE, dset->shared->type, FALSE)) < 0)
+ if ((dset->shared->type_id = H5I_register(H5I_DATATYPE, dset->shared->type, false)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register type");
} /* end if */
/* Not a custom datatype, just use it directly */
else {
- if (H5I_inc_ref(type_id, FALSE) < 0)
+ if (H5I_inc_ref(type_id, false) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINC, FAIL, "Can't increment datatype ID");
/* Use existing datatype */
@@ -614,7 +614,7 @@ H5D__init_space(H5F_t *file, const H5D_t *dset, const H5S_t *space)
assert(space);
/* Copy dataspace for dataset */
- if (NULL == (dset->shared->space = H5S_copy(space, FALSE, TRUE)))
+ if (NULL == (dset->shared->space = H5S_copy(space, false, true)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy dataspace");
/* Cache the dataset's dataspace info */
@@ -626,7 +626,7 @@ H5D__init_space(H5F_t *file, const H5D_t *dset, const H5S_t *space)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set latest version of datatype");
/* Set the dataset's dataspace to 'all' selection */
- if (H5S_select_all(dset->shared->space, TRUE) < 0)
+ if (H5S_select_all(dset->shared->space, true) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to set all selection");
done:
@@ -646,7 +646,7 @@ H5D__init_space(H5F_t *file, const H5D_t *dset, const H5S_t *space)
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__use_minimized_dset_headers(H5F_t *file, hbool_t *minimize)
+H5D__use_minimized_dset_headers(H5F_t *file, bool *minimize)
{
herr_t ret_value = SUCCEED;
@@ -660,12 +660,12 @@ H5D__use_minimized_dset_headers(H5F_t *file, hbool_t *minimize)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL,
"can't get dataset object header minimize flag from API context");
- if (FALSE == *minimize)
+ if (false == *minimize)
*minimize = H5F_get_min_dset_ohdr(file);
done:
if (FAIL == ret_value)
- *minimize = FALSE;
+ *minimize = false;
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__use_minimized_dset_headers */
@@ -684,7 +684,7 @@ H5D__calculate_minimum_header_size(H5F_t *file, H5D_t *dset, H5O_t *ohdr)
{
H5T_t *type = NULL;
H5O_fill_t *fill_prop = NULL;
- hbool_t use_at_least_v18 = FALSE;
+ bool use_at_least_v18 = false;
const char continuation[1] = ""; /* required for work-around */
size_t get_value = 0;
size_t ret_value = 0;
@@ -846,10 +846,10 @@ H5D__update_oh_info(H5F_t *file, H5D_t *dset, hid_t dapl_id)
H5T_t *type; /* Dataset's datatype */
H5O_fill_t *fill_prop; /* Pointer to dataset's fill value information */
H5D_fill_value_t fill_status; /* Fill value status */
- hbool_t fill_changed = FALSE; /* Flag indicating the fill value was changed */
- hbool_t layout_init = FALSE; /* Flag to indicate that chunk information was initialized */
- hbool_t use_at_least_v18; /* Flag indicating to use at least v18 format versions */
- hbool_t use_minimized_header = FALSE; /* Flag to use minimized dataset object headers */
+ bool fill_changed = false; /* Flag indicating the fill value was changed */
+ bool layout_init = false; /* Flag to indicate that chunk information was initialized */
+ bool use_at_least_v18; /* Flag indicating to use at least v18 format versions */
+ bool use_minimized_header = false; /* Flag to use minimized dataset object headers */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -872,14 +872,14 @@ H5D__update_oh_info(H5F_t *file, H5D_t *dset, hid_t dapl_id)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't tell if fill value defined");
/* Special case handling for variable-length types */
- if (H5T_detect_class(type, H5T_VLEN, FALSE)) {
+ if (H5T_detect_class(type, H5T_VLEN, false)) {
/* If the default fill value is chosen for variable-length types, always write it */
if (fill_prop->fill_time == H5D_FILL_TIME_IFSET && fill_status == H5D_FILL_VALUE_DEFAULT) {
/* Update dataset creation property */
fill_prop->fill_time = H5D_FILL_TIME_ALLOC;
/* Note that the fill value changed */
- fill_changed = TRUE;
+ fill_changed = true;
} /* end if */
/* Don't allow never writing fill values with variable-length types */
@@ -894,15 +894,15 @@ H5D__update_oh_info(H5F_t *file, H5D_t *dset, hid_t dapl_id)
if (fill_prop->buf && fill_prop->size > 0 && H5O_fill_convert(fill_prop, type, &fill_changed) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to convert fill value to dataset type");
- fill_prop->fill_defined = TRUE;
+ fill_prop->fill_defined = true;
}
else if (fill_status == H5D_FILL_VALUE_UNDEFINED)
- fill_prop->fill_defined = FALSE;
+ fill_prop->fill_defined = false;
else
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to determine if fill value is defined");
/* Check for invalid fill & allocation time setting */
- if (fill_prop->fill_defined == FALSE && fill_prop->fill_time == H5D_FILL_TIME_ALLOC)
+ if (fill_prop->fill_defined == false && fill_prop->fill_time == H5D_FILL_TIME_ALLOC)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
"fill value writing on allocation set, but no fill value defined");
@@ -923,7 +923,7 @@ H5D__update_oh_info(H5F_t *file, H5D_t *dset, hid_t dapl_id)
if (H5D__use_minimized_dset_headers(file, &use_minimized_header) == FAIL)
HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, FAIL, "can't get minimize settings");
- if (TRUE == use_minimized_header) {
+ if (true == use_minimized_header) {
if (H5D__prepare_minimized_oh(file, dset, oloc) == FAIL)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create minimized dataset object header");
} /* end if */
@@ -979,7 +979,7 @@ H5D__update_oh_info(H5F_t *file, H5D_t *dset, hid_t dapl_id)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update layout/pline/efl header message");
/* Indicate that the layout information was initialized */
- layout_init = TRUE;
+ layout_init = true;
#ifdef H5O_ENABLE_BOGUS
{
@@ -1015,7 +1015,7 @@ H5D__update_oh_info(H5F_t *file, H5D_t *dset, hid_t dapl_id)
* header and doesn't use a separate message -QAK)
*/
if (!use_at_least_v18)
- if (H5O_touch_oh(file, oh, TRUE) < 0)
+ if (H5O_touch_oh(file, oh, true) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update modification time message");
done:
@@ -1087,22 +1087,22 @@ H5D__build_file_prefix(const H5D_t *dset, H5F_prefix_open_t prefix_type, char **
/* Prefix has to be checked for NULL / empty string again because the
* code above might have updated it.
*/
- if (prefix == NULL || *prefix == '\0' || HDstrcmp(prefix, ".") == 0) {
+ if (prefix == NULL || *prefix == '\0' || strcmp(prefix, ".") == 0) {
/* filename is interpreted as relative to the current directory,
* does not need to be expanded
*/
*file_prefix = NULL;
} /* end if */
else {
- if (HDstrncmp(prefix, "${ORIGIN}", HDstrlen("${ORIGIN}")) == 0) {
+ if (strncmp(prefix, "${ORIGIN}", strlen("${ORIGIN}")) == 0) {
/* Replace ${ORIGIN} at beginning of prefix by directory of HDF5 file */
- filepath_len = HDstrlen(filepath);
- prefix_len = HDstrlen(prefix);
- file_prefix_len = filepath_len + prefix_len - HDstrlen("${ORIGIN}") + 1;
+ filepath_len = strlen(filepath);
+ prefix_len = strlen(prefix);
+ file_prefix_len = filepath_len + prefix_len - strlen("${ORIGIN}") + 1;
if (NULL == (*file_prefix = (char *)H5MM_malloc(file_prefix_len)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate buffer");
- HDsnprintf(*file_prefix, file_prefix_len, "%s%s", filepath, prefix + HDstrlen("${ORIGIN}"));
+ snprintf(*file_prefix, file_prefix_len, "%s%s", filepath, prefix + strlen("${ORIGIN}"));
} /* end if */
else {
if (NULL == (*file_prefix = (char *)H5MM_strdup(prefix)))
@@ -1136,12 +1136,12 @@ H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id, hid_t
H5T_t *dt = NULL; /* Datatype for dataset (non-VOL pointer) */
H5D_t *new_dset = NULL;
H5P_genplist_t *dc_plist = NULL; /* New Property list */
- hbool_t has_vl_type = FALSE; /* Flag to indicate a VL-type for dataset */
- hbool_t layout_init = FALSE; /* Flag to indicate that chunk information was initialized */
- hbool_t layout_copied = FALSE; /* Flag to indicate that layout message was copied */
- hbool_t fill_copied = FALSE; /* Flag to indicate that fill-value message was copied */
- hbool_t pline_copied = FALSE; /* Flag to indicate that pipeline message was copied */
- hbool_t efl_copied = FALSE; /* Flag to indicate that external file list message was copied */
+ bool has_vl_type = false; /* Flag to indicate a VL-type for dataset */
+ bool layout_init = false; /* Flag to indicate that chunk information was initialized */
+ bool layout_copied = false; /* Flag to indicate that layout message was copied */
+ bool fill_copied = false; /* Flag to indicate that fill-value message was copied */
+ bool pline_copied = false; /* Flag to indicate that pipeline message was copied */
+ bool efl_copied = false; /* Flag to indicate that external file list message was copied */
H5G_loc_t dset_loc; /* Dataset location */
H5D_t *ret_value = NULL; /* Return value */
@@ -1161,12 +1161,12 @@ H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id, hid_t
type = H5T_get_actual_type(dt);
/* Check if the datatype is "sensible" for use in a dataset */
- if (H5T_is_sensible(type) != TRUE)
+ if (H5T_is_sensible(type) != true)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "datatype is not sensible");
/* Check if the datatype is/contains a VL-type */
- if (H5T_detect_class(type, H5T_VLEN, FALSE))
- has_vl_type = TRUE;
+ if (H5T_detect_class(type, H5T_VLEN, false))
+ has_vl_type = true;
/* Check if the dataspace has an extent set (or is NULL) */
if (!H5S_has_extent(space))
@@ -1182,7 +1182,7 @@ H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id, hid_t
H5G_loc_reset(&dset_loc);
/* Initialize the shared dataset space */
- if (NULL == (new_dset->shared = H5D__new(dcpl_id, dapl_id, TRUE, has_vl_type)))
+ if (NULL == (new_dset->shared = H5D__new(dcpl_id, dapl_id, true, has_vl_type)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
/* Copy & initialize datatype for dataset */
@@ -1194,7 +1194,7 @@ H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id, hid_t
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "can't copy dataspace");
/* Set the dataset's checked_filters flag to enable writing */
- new_dset->shared->checked_filters = TRUE;
+ new_dset->shared->checked_filters = true;
/* Check if the dataset has a non-default DCPL & get important values, if so */
if (new_dset->shared->dcpl_id != H5P_DATASET_CREATE_DEFAULT) {
@@ -1202,12 +1202,12 @@ H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id, hid_t
H5O_pline_t *pline; /* Dataset's I/O pipeline information */
H5O_fill_t *fill; /* Dataset's fill value info */
H5O_efl_t *efl; /* Dataset's external file list info */
- htri_t ignore_filters = FALSE; /* Ignore optional filters or not */
+ htri_t ignore_filters = false; /* Ignore optional filters or not */
if ((ignore_filters = H5Z_ignore_filters(new_dset->shared->dcpl_id, dt, space)) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, NULL, "H5Z_has_optional_filter() failed");
- if (FALSE == ignore_filters) {
+ if (false == ignore_filters) {
/* Check if the filters in the DCPL can be applied to this dataset */
if (H5Z_can_apply(new_dset->shared->dcpl_id, new_dset->shared->type_id) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, NULL, "I/O filters can't operate on this dataset");
@@ -1225,21 +1225,21 @@ H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id, hid_t
pline = &new_dset->shared->dcpl_cache.pline;
if (H5P_get(dc_plist, H5O_CRT_PIPELINE_NAME, pline) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, NULL, "can't retrieve pipeline filter");
- pline_copied = TRUE;
+ pline_copied = true;
layout = &new_dset->shared->layout;
if (H5P_get(dc_plist, H5D_CRT_LAYOUT_NAME, layout) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, NULL, "can't retrieve layout");
- layout_copied = TRUE;
+ layout_copied = true;
fill = &new_dset->shared->dcpl_cache.fill;
if (H5P_get(dc_plist, H5D_CRT_FILL_VALUE_NAME, fill) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, NULL, "can't retrieve fill value info");
- fill_copied = TRUE;
+ fill_copied = true;
efl = &new_dset->shared->dcpl_cache.efl;
if (H5P_get(dc_plist, H5D_CRT_EXT_FILE_LIST_NAME, efl) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, NULL, "can't retrieve external file list");
- efl_copied = TRUE;
+ efl_copied = true;
- if (FALSE == ignore_filters) {
+ if (false == ignore_filters) {
/* Check that chunked layout is used if filters are enabled */
if (pline->nused > 0 && H5D_CHUNKED != layout->type)
HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, NULL, "filters can only be used with chunked layout");
@@ -1300,7 +1300,7 @@ H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id, hid_t
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "can't update the metadata cache");
/* Indicate that the layout information was initialized */
- layout_init = TRUE;
+ layout_init = true;
/* Set up append flush parameters for the dataset */
if (H5D__append_flush_setup(new_dset, new_dset->shared->dapl_id) < 0)
@@ -1317,7 +1317,7 @@ H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id, hid_t
/* Add the dataset to the list of opened objects in the file */
if (H5FO_top_incr(new_dset->oloc.file, new_dset->oloc.addr) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINC, NULL, "can't incr object ref. count");
- if (H5FO_insert(new_dset->oloc.file, new_dset->oloc.addr, new_dset->shared, TRUE) < 0)
+ if (H5FO_insert(new_dset->oloc.file, new_dset->oloc.addr, new_dset->shared, true) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, NULL, "can't insert dataset into list of open objects");
new_dset->shared->fo_count = 1;
@@ -1399,7 +1399,7 @@ H5D__open_name(const H5G_loc_t *loc, const char *name, hid_t dapl_id)
H5G_name_t path; /* Dataset group hier. path */
H5O_loc_t oloc; /* Dataset object location */
H5O_type_t obj_type; /* Type of object at location */
- hbool_t loc_found = FALSE; /* Location at 'name' found */
+ bool loc_found = false; /* Location at 'name' found */
H5D_t *ret_value = NULL; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1416,7 +1416,7 @@ H5D__open_name(const H5G_loc_t *loc, const char *name, hid_t dapl_id)
/* Find the dataset object */
if (H5G_loc_find(loc, name, &dset_loc) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_NOTFOUND, NULL, "not found");
- loc_found = TRUE;
+ loc_found = true;
/* Check that the object found is the correct type */
if (H5O_obj_type(&oloc, &obj_type) < 0)
@@ -1494,7 +1494,7 @@ H5D_open(const H5G_loc_t *loc, hid_t dapl_id)
HGOTO_ERROR(H5E_DATASET, H5E_NOTFOUND, NULL, "not found");
/* Add the dataset to the list of opened objects in the file */
- if (H5FO_insert(dataset->oloc.file, dataset->oloc.addr, dataset->shared, FALSE) < 0)
+ if (H5FO_insert(dataset->oloc.file, dataset->oloc.addr, dataset->shared, false) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, NULL, "can't insert dataset into list of open objects");
/* Increment object count for the object in the top file */
@@ -1526,7 +1526,7 @@ H5D_open(const H5G_loc_t *loc, hid_t dapl_id)
* matches the new external file prefix
*/
if (extfile_prefix && dataset->shared->extfile_prefix) {
- if (HDstrcmp(extfile_prefix, dataset->shared->extfile_prefix) != 0)
+ if (strcmp(extfile_prefix, dataset->shared->extfile_prefix) != 0)
HGOTO_ERROR(
H5E_DATASET, H5E_CANTOPENOBJ, NULL,
"new external file prefix does not match external file prefix of already open dataset");
@@ -1668,8 +1668,8 @@ H5D__open_oid(H5D_t *dataset, hid_t dapl_id)
H5O_fill_t *fill_prop; /* Pointer to dataset's fill value info */
unsigned alloc_time_state; /* Allocation time state */
htri_t msg_exists; /* Whether a particular type of message exists */
- hbool_t layout_init = FALSE; /* Flag to indicate that chunk information was initialized */
- hbool_t must_init_storage = FALSE;
+ bool layout_init = false; /* Flag to indicate that chunk information was initialized */
+ bool must_init_storage = false;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE_TAG(dataset->oloc.addr)
@@ -1677,8 +1677,8 @@ H5D__open_oid(H5D_t *dataset, hid_t dapl_id)
/* check args */
assert(dataset);
- /* (Set the 'vl_type' parameter to FALSE since it doesn't matter from here) */
- if (NULL == (dataset->shared = H5D__new(H5P_DATASET_CREATE_DEFAULT, dapl_id, FALSE, FALSE)))
+ /* (Set the 'vl_type' parameter to false since it doesn't matter from here) */
+ if (NULL == (dataset->shared = H5D__new(H5P_DATASET_CREATE_DEFAULT, dapl_id, false, false)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed");
/* Open the dataset object */
@@ -1700,7 +1700,7 @@ H5D__open_oid(H5D_t *dataset, hid_t dapl_id)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't cache dataspace info");
/* Get a datatype ID for the dataset's datatype */
- if ((dataset->shared->type_id = H5I_register(H5I_DATATYPE, dataset->shared->type, FALSE)) < 0)
+ if ((dataset->shared->type_id = H5I_register(H5I_DATATYPE, dataset->shared->type, false)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register type");
/* Get dataset creation property list object */
@@ -1712,7 +1712,7 @@ H5D__open_oid(H5D_t *dataset, hid_t dapl_id)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get layout/pline/efl info");
/* Indicate that the layout information was initialized */
- layout_init = TRUE;
+ layout_init = true;
/*
* Now that we've read the dataset's datatype, dataspace and
@@ -1829,7 +1829,7 @@ H5D__open_oid(H5D_t *dataset, hid_t dapl_id)
(H5F_HAS_FEATURE(dataset->oloc.file, H5FD_FEAT_HAS_MPI) &&
dataset->shared->dcpl_cache.pline.nused == 0));
- if (must_init_storage && (H5D__alloc_storage(dataset, H5D_ALLOC_OPEN, FALSE, NULL) < 0))
+ if (must_init_storage && (H5D__alloc_storage(dataset, H5D_ALLOC_OPEN, false, NULL) < 0))
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize file storage");
done:
@@ -1871,10 +1871,10 @@ H5D__open_oid(H5D_t *dataset, hid_t dapl_id)
herr_t
H5D_close(H5D_t *dataset)
{
- hbool_t free_failed = FALSE; /* Set if freeing sub-components failed */
- hbool_t corked; /* Whether the dataset is corked or not */
- hbool_t file_closed = TRUE; /* H5O_close also closed the file? */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool free_failed = false; /* Set if freeing sub-components failed */
+ bool corked; /* Whether the dataset is corked or not */
+ bool file_closed = true; /* H5O_close also closed the file? */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1884,7 +1884,7 @@ H5D_close(H5D_t *dataset)
/* Dump debugging info */
#ifdef H5D_CHUNK_DEBUG
- H5D__chunk_stats(dataset, FALSE);
+ H5D__chunk_stats(dataset, false);
#endif /* H5D_CHUNK_DEBUG */
dataset->shared->fo_count--;
@@ -1898,7 +1898,7 @@ H5D_close(H5D_t *dataset)
/* (Avoids problems with flushing datasets twice, when one is holding
* the file open and it iterates through dataset to flush them -QAK)
*/
- dataset->shared->closing = TRUE;
+ dataset->shared->closing = true;
/* Free cached information for each kind of dataset */
switch (dataset->shared->layout.type) {
@@ -2021,7 +2021,7 @@ H5D_close(H5D_t *dataset)
if (!file_closed && H5F_SHARED(dataset->oloc.file) && H5F_EVICT_ON_CLOSE(dataset->oloc.file)) {
if (H5AC_flush_tagged_metadata(dataset->oloc.file, dataset->oloc.addr) < 0)
HDONE_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush tagged metadata");
- if (H5AC_evict_tagged_metadata(dataset->oloc.file, dataset->oloc.addr, FALSE) < 0)
+ if (H5AC_evict_tagged_metadata(dataset->oloc.file, dataset->oloc.addr, false) < 0)
HDONE_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to evict tagged metadata");
} /* end if */
@@ -2053,7 +2053,7 @@ H5D_close(H5D_t *dataset)
/* Release the dataset's path info */
if (H5G_name_free(&(dataset->path)) < 0)
- free_failed = TRUE;
+ free_failed = true;
/* Free the dataset's memory structure */
dataset = H5FL_FREE(H5D_t, dataset);
@@ -2239,12 +2239,12 @@ H5D_nameof(H5D_t *dataset)
*-------------------------------------------------------------------------
*/
herr_t
-H5D__alloc_storage(H5D_t *dset, H5D_time_alloc_t time_alloc, hbool_t full_overwrite, hsize_t old_dim[])
+H5D__alloc_storage(H5D_t *dset, H5D_time_alloc_t time_alloc, bool full_overwrite, hsize_t old_dim[])
{
H5F_t *f; /* The dataset's file pointer */
H5O_layout_t *layout; /* The dataset's layout information */
- hbool_t must_init_space = FALSE; /* Flag to indicate that space should be initialized */
- hbool_t addr_set = FALSE; /* Flag to indicate that the dataset's storage address was set */
+ bool must_init_space = false; /* Flag to indicate that space should be initialized */
+ bool addr_set = false; /* Flag to indicate that the dataset's storage address was set */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -2273,13 +2273,13 @@ H5D__alloc_storage(H5D_t *dset, H5D_time_alloc_t time_alloc, hbool_t full_overwr
"unable to initialize contiguous storage");
/* Indicate that we should initialize storage space */
- must_init_space = TRUE;
+ must_init_space = true;
} /* end if */
else
layout->storage.u.contig.addr = HADDR_UNDEF;
/* Indicate that we set the storage addr */
- addr_set = TRUE;
+ addr_set = true;
} /* end if */
break;
@@ -2290,10 +2290,10 @@ H5D__alloc_storage(H5D_t *dset, H5D_time_alloc_t time_alloc, hbool_t full_overwr
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to initialize chunked storage");
/* Indicate that we set the storage addr */
- addr_set = TRUE;
+ addr_set = true;
/* Indicate that we should initialize storage space */
- must_init_space = TRUE;
+ must_init_space = true;
} /* end if */
/* If space allocation is set to 'early' and we are extending
@@ -2302,7 +2302,7 @@ H5D__alloc_storage(H5D_t *dset, H5D_time_alloc_t time_alloc, hbool_t full_overwr
*/
if (dset->shared->dcpl_cache.fill.alloc_time == H5D_ALLOC_TIME_EARLY &&
time_alloc == H5D_ALLOC_EXTEND)
- must_init_space = TRUE;
+ must_init_space = true;
break;
case H5D_COMPACT:
@@ -2319,14 +2319,14 @@ H5D__alloc_storage(H5D_t *dset, H5D_time_alloc_t time_alloc, hbool_t full_overwr
"unable to allocate memory for compact dataset");
if (!full_overwrite)
memset(layout->storage.u.compact.buf, 0, layout->storage.u.compact.size);
- layout->storage.u.compact.dirty = TRUE;
+ layout->storage.u.compact.dirty = true;
/* Indicate that we should initialize storage space */
- must_init_space = TRUE;
+ must_init_space = true;
}
else {
- layout->storage.u.compact.dirty = FALSE;
- must_init_space = FALSE;
+ layout->storage.u.compact.dirty = false;
+ must_init_space = false;
}
} /* end if */
break;
@@ -2413,7 +2413,7 @@ H5D__alloc_storage(H5D_t *dset, H5D_time_alloc_t time_alloc, hbool_t full_overwr
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__init_storage(H5D_t *dset, hbool_t full_overwrite, hsize_t old_dim[])
+H5D__init_storage(H5D_t *dset, bool full_overwrite, hsize_t old_dim[])
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -2705,7 +2705,7 @@ H5D__vlen_get_buf_size(H5D_t *dset, hid_t type_id, hid_t space_id, hsize_t *size
vlen_bufsize.dset = dset;
/* Get a copy of the dataset's dataspace */
- if (NULL == (fspace = H5S_copy(dset->shared->space, FALSE, TRUE)))
+ if (NULL == (fspace = H5S_copy(dset->shared->space, false, true)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to get dataspace");
vlen_bufsize.fspace = fspace;
@@ -2861,7 +2861,7 @@ H5D__vlen_get_buf_size_gen(H5VL_object_t *vol_obj, hid_t type_id, hid_t space_id
/* Create a scalar for the memory dataspace */
if (NULL == (mspace = H5S_create(H5S_SCALAR)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTCREATE, FAIL, "can't create dataspace");
- if ((vlen_bufsize.mspace_id = H5I_register(H5I_DATASPACE, mspace, TRUE)) < 0)
+ if ((vlen_bufsize.mspace_id = H5I_register(H5I_DATASPACE, mspace, true)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID");
/* Grab the temporary buffers required */
@@ -2874,7 +2874,7 @@ H5D__vlen_get_buf_size_gen(H5VL_object_t *vol_obj, hid_t type_id, hid_t space_id
/* Set the VL allocation callbacks on a DXPL */
if (NULL == (dxpl = (H5P_genplist_t *)H5I_object(H5P_DATASET_XFER_DEFAULT)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get default DXPL");
- if ((vlen_bufsize.dxpl_id = H5P_copy_plist(dxpl, TRUE)) < 0)
+ if ((vlen_bufsize.dxpl_id = H5P_copy_plist(dxpl, true)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy property list");
if (NULL == (dxpl = (H5P_genplist_t *)H5I_object(vlen_bufsize.dxpl_id)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get copied DXPL");
@@ -2965,7 +2965,7 @@ H5D__check_filters(H5D_t *dataset)
if (H5Z_can_apply(dataset->shared->dcpl_id, dataset->shared->type_id) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_CANAPPLY, FAIL, "can't apply filters");
- dataset->shared->checked_filters = TRUE;
+ dataset->shared->checked_filters = true;
} /* end if */
} /* end if */
} /* end if */
@@ -3023,17 +3023,17 @@ H5D__set_extent(H5D_t *dset, const hsize_t *size)
/* Don't bother updating things, unless they've changed */
if (changed) {
- hbool_t shrink = FALSE; /* Flag to indicate a dimension has shrank */
- hbool_t expand = FALSE; /* Flag to indicate a dimension has grown */
- hbool_t update_chunks = FALSE; /* Flag to indicate chunk cache update is needed */
+ bool shrink = false; /* Flag to indicate a dimension has shrank */
+ bool expand = false; /* Flag to indicate a dimension has grown */
+ bool update_chunks = false; /* Flag to indicate chunk cache update is needed */
/* Determine if we are shrinking and/or expanding any dimensions */
for (dim_idx = 0; dim_idx < dset->shared->ndims; dim_idx++) {
/* Check for various status changes */
if (size[dim_idx] < curr_dims[dim_idx])
- shrink = TRUE;
+ shrink = true;
if (size[dim_idx] > curr_dims[dim_idx])
- expand = TRUE;
+ expand = true;
/* Chunked storage specific checks */
if (H5D_CHUNKED == dset->shared->layout.type && dset->shared->ndims > 1) {
@@ -3059,7 +3059,7 @@ H5D__set_extent(H5D_t *dset, const hsize_t *size)
dset->shared->cache.chunk.nslots) ||
(scaled <= dset->shared->cache.chunk.nslots &&
dset->shared->cache.chunk.scaled_dims[dim_idx] > dset->shared->cache.chunk.nslots))
- update_chunks = TRUE;
+ update_chunks = true;
if (!(scaled_power2up = H5VM_power2up(scaled)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get the next power of 2");
@@ -3072,7 +3072,7 @@ H5D__set_extent(H5D_t *dset, const hsize_t *size)
H5VM_log2_gen(scaled_power2up);
/* Indicate that the cached chunk indices need to be updated */
- update_chunks = TRUE;
+ update_chunks = true;
} /* end if */
} /* end if */
} /* end if */
@@ -3123,12 +3123,12 @@ H5D__set_extent(H5D_t *dset, const hsize_t *size)
/* Mark virtual datasets as not fully initialized so internal
* selections are recalculated (at next I/O operation) */
- dset->shared->layout.storage.u.virt.init = FALSE;
+ dset->shared->layout.storage.u.virt.init = false;
} /* end if */
/* Allocate space for the new parts of the dataset, if appropriate */
if (expand && dset->shared->dcpl_cache.fill.alloc_time == H5D_ALLOC_TIME_EARLY)
- if (H5D__alloc_storage(dset, H5D_ALLOC_EXTEND, FALSE, curr_dims) < 0)
+ if (H5D__alloc_storage(dset, H5D_ALLOC_EXTEND, false, curr_dims) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to extend dataset storage");
/*-------------------------------------------------------------------------
@@ -3194,7 +3194,7 @@ H5D__flush_sieve_buf(H5D_t *dataset)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "block write failed");
/* Reset sieve buffer dirty flag */
- dataset->shared->cache.contig.sieve_dirty = FALSE;
+ dataset->shared->cache.contig.sieve_dirty = false;
} /* end if */
done:
@@ -3284,9 +3284,9 @@ H5D__format_convert(H5D_t *dataset)
H5D_chk_idx_info_t new_idx_info; /* Index info for the new layout */
H5D_chk_idx_info_t idx_info; /* Index info for the current layout */
H5O_layout_t *newlayout = NULL; /* The new layout */
- hbool_t init_new_index = FALSE; /* Indicate that the new chunk index is initialized */
- hbool_t delete_old_layout = FALSE; /* Indicate that the old layout message is deleted */
- hbool_t add_new_layout = FALSE; /* Indicate that the new layout message is added */
+ bool init_new_index = false; /* Indicate that the new chunk index is initialized */
+ bool delete_old_layout = false; /* Indicate that the old layout message is deleted */
+ bool add_new_layout = false; /* Indicate that the new layout message is added */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE_TAG(dataset->oloc.addr)
@@ -3328,7 +3328,7 @@ H5D__format_convert(H5D_t *dataset)
(new_idx_info.storage->ops->init)(&new_idx_info, dataset->shared->space, dataset->oloc.addr) <
0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize indexing information");
- init_new_index = TRUE;
+ init_new_index = true;
/* If the current chunk index exists */
if (H5_addr_defined(idx_info.storage->idx_addr)) {
@@ -3345,16 +3345,16 @@ H5D__format_convert(H5D_t *dataset)
} /* end if */
/* Delete the old "current" layout message */
- if (H5O_msg_remove(&dataset->oloc, H5O_LAYOUT_ID, H5O_ALL, FALSE) < 0)
+ if (H5O_msg_remove(&dataset->oloc, H5O_LAYOUT_ID, H5O_ALL, false) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete layout message");
- delete_old_layout = TRUE;
+ delete_old_layout = true;
/* Append the new layout message to the object header */
if (H5O_msg_create(&dataset->oloc, H5O_LAYOUT_ID, 0, H5O_UPDATE_TIME, newlayout) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update layout header message");
- add_new_layout = TRUE;
+ add_new_layout = true;
/* Release the old (current) chunk index */
if (idx_info.storage->ops->dest && (idx_info.storage->ops->dest)(&idx_info) < 0)
@@ -3389,7 +3389,7 @@ H5D__format_convert(H5D_t *dataset)
if (ret_value < 0 && dataset->shared->layout.type == H5D_CHUNKED) {
/* Remove new layout message */
if (add_new_layout)
- if (H5O_msg_remove(&dataset->oloc, H5O_LAYOUT_ID, H5O_ALL, FALSE) < 0)
+ if (H5O_msg_remove(&dataset->oloc, H5O_LAYOUT_ID, H5O_ALL, false) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete layout message");
/* Add back old layout message */
@@ -3535,7 +3535,7 @@ H5D_flush_all(H5F_t *f)
assert(f);
/* Iterate over all the open datasets */
- if (H5I_iterate(H5I_DATASET, H5D__flush_all_cb, f, FALSE) < 0)
+ if (H5I_iterate(H5I_DATASET, H5D__flush_all_cb, f, false) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to flush cached dataset info");
done:
@@ -3571,7 +3571,7 @@ H5D_get_create_plist(const H5D_t *dset)
HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "can't get property list");
/* Copy the creation property list */
- if ((new_dcpl_id = H5P_copy_plist(dcpl_plist, TRUE)) < 0)
+ if ((new_dcpl_id = H5P_copy_plist(dcpl_plist, true)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to copy the creation property list");
if (NULL == (new_plist = (H5P_genplist_t *)H5I_object(new_dcpl_id)))
HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "can't get property list");
@@ -3604,7 +3604,7 @@ H5D_get_create_plist(const H5D_t *dset)
/* Reset index info, if the chunk ops are set */
if (copied_layout.storage.u.chunk.ops)
/* Reset address and pointer of the array struct for the chunked storage index */
- if (H5D_chunk_idx_reset(&copied_layout.storage.u.chunk, TRUE) < 0)
+ if (H5D_chunk_idx_reset(&copied_layout.storage.u.chunk, true) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
"unable to reset chunked storage index in dest");
@@ -3651,10 +3651,10 @@ H5D_get_create_plist(const H5D_t *dset)
size_t bkg_size; /* Size of background buffer */
/* Wrap copies of types to convert */
- dst_id = H5I_register(H5I_DATATYPE, H5T_copy(copied_fill.type, H5T_COPY_TRANSIENT), FALSE);
+ dst_id = H5I_register(H5I_DATATYPE, H5T_copy(copied_fill.type, H5T_COPY_TRANSIENT), false);
if (dst_id < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy/register datatype");
- src_id = H5I_register(H5I_DATATYPE, H5T_copy(dset->shared->type, H5T_COPY_ALL), FALSE);
+ src_id = H5I_register(H5I_DATATYPE, H5T_copy(dset->shared->type, H5T_COPY_ALL), false);
if (src_id < 0) {
H5I_dec_ref(dst_id);
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to copy/register datatype");
@@ -3753,7 +3753,7 @@ H5D_get_access_plist(const H5D_t *dset)
/* Make a copy of the dataset's dataset access property list */
if (NULL == (old_plist = (H5P_genplist_t *)H5I_object(dset->shared->dapl_id)))
HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "can't get property list");
- if ((new_dapl_id = H5P_copy_plist(old_plist, TRUE)) < 0)
+ if ((new_dapl_id = H5P_copy_plist(old_plist, true)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't copy dataset access property list");
if (NULL == (new_plist = (H5P_genplist_t *)H5I_object(new_dapl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list");
@@ -3869,11 +3869,11 @@ H5D__get_space(const H5D_t *dset)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update virtual dataset extent");
/* Read the dataspace message and return a dataspace object */
- if (NULL == (space = H5S_copy(dset->shared->space, FALSE, TRUE)))
+ if (NULL == (space = H5S_copy(dset->shared->space, false, true)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to get dataspace");
/* Create an ID */
- if ((ret_value = H5I_register(H5I_DATASPACE, space, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_DATASPACE, space, true)) < 0)
HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register dataspace");
done:
@@ -3916,7 +3916,7 @@ H5D__get_type(const H5D_t *dset)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "invalid datatype location");
/* Lock copied type */
- if (H5T_lock(dt, FALSE) < 0)
+ if (H5T_lock(dt, false) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to lock transient datatype");
/* Create an ID */
@@ -3925,10 +3925,10 @@ H5D__get_type(const H5D_t *dset)
* two-level IDs, where the VOL object is a copy of the
* returned datatype.
*/
- if ((ret_value = H5VL_wrap_register(H5I_DATATYPE, dt, TRUE)) < 0)
+ if ((ret_value = H5VL_wrap_register(H5I_DATATYPE, dt, true)) < 0)
HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register datatype");
} /* end if */
- else if ((ret_value = H5I_register(H5I_DATATYPE, dt, TRUE)) < 0)
+ else if ((ret_value = H5I_register(H5I_DATATYPE, dt, true)) < 0)
HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register datatype");
done:
@@ -3951,7 +3951,7 @@ herr_t
H5D__refresh(H5D_t *dset, hid_t dset_id)
{
H5D_virtual_held_file_t *head = NULL; /* Pointer to list of files held open */
- hbool_t virt_dsets_held = FALSE; /* Whether virtual datasets' files are held open */
+ bool virt_dsets_held = false; /* Whether virtual datasets' files are held open */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -3965,7 +3965,7 @@ H5D__refresh(H5D_t *dset, hid_t dset_id)
/* Hold open the source datasets' files */
if (H5D__virtual_hold_source_dset_files(dset, &head) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINC, FAIL, "unable to hold VDS source files open");
- virt_dsets_held = TRUE;
+ virt_dsets_held = true;
/* Refresh source datasets for virtual dataset */
if (H5D__virtual_refresh_source_dsets(dset) < 0)
diff --git a/src/H5Dio.c b/src/H5Dio.c
index b978139a8a7..2134ce1c79a 100644
--- a/src/H5Dio.c
+++ b/src/H5Dio.c
@@ -88,7 +88,7 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info)
/* projected to a rank equal to that of file_space. */
/* */
/* This field is only used if */
- /* H5S_select_shape_same() returns TRUE when */
+ /* H5S_select_shape_same() returns true when */
/* comparing at least one mem_space and data_space, */
/* and the mem_space has a different rank. */
/* */
@@ -107,6 +107,17 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info)
FUNC_ENTER_NOAPI(FAIL)
+#ifdef H5_HAVE_PARALLEL
+ /* Reset the actual io mode properties to the default values in case
+ * the DXPL (if it's non-default) was previously used in a collective
+ * I/O operation.
+ */
+ if (!H5CX_is_def_dxpl()) {
+ H5CX_set_mpio_actual_chunk_opt(H5D_MPIO_NO_CHUNK_OPTIMIZATION);
+ H5CX_set_mpio_actual_io_mode(H5D_MPIO_NO_COLLECTIVE);
+ } /* end if */
+#endif
+
/* Init io_info */
if (H5D__ioinfo_init(count, H5D_IO_OP_READ, dset_info, &io_info) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize I/O info");
@@ -189,7 +200,7 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info)
* well.
*/
if (dset_info[i].nelmts > 0 &&
- TRUE == H5S_SELECT_SHAPE_SAME(dset_info[i].mem_space, dset_info[i].file_space) &&
+ true == H5S_SELECT_SHAPE_SAME(dset_info[i].mem_space, dset_info[i].file_space) &&
H5S_GET_EXTENT_NDIMS(dset_info[i].mem_space) != H5S_GET_EXTENT_NDIMS(dset_info[i].file_space)) {
ptrdiff_t buf_adj = 0;
@@ -222,6 +233,14 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info)
dset_info[i].buf.vp = (void *)(((uint8_t *)dset_info[i].buf.vp) + buf_adj);
} /* end if */
+ /* Set up I/O operation */
+ if (H5D__dset_ioinfo_init(dset_info[i].dset, &(dset_info[i]), &(store[i])) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set up I/O operation");
+
+ /* Check if any filters are applied to the dataset */
+ if (dset_info[i].dset->shared->dcpl_cache.pline.nused > 0)
+ io_info.filtered_count++;
+
/* If space hasn't been allocated and not using external storage,
* return fill value to buffer if fill time is upon allocation, or
* do nothing if fill time is never. If the dataset is compact and
@@ -255,14 +274,10 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info)
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "filling buf failed");
/* No need to perform any more I/O for this dataset */
- dset_info[i].skip_io = TRUE;
- io_skipped++;
+ dset_info[i].skip_io = true;
+ io_skipped = io_skipped + 1;
} /* end if */
else {
- /* Set up I/O operation */
- if (H5D__dset_ioinfo_init(dset_info[i].dset, &(dset_info[i]), &(store[i])) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to set up I/O operation");
-
/* Sanity check that space is allocated, if there are elements */
if (dset_info[i].nelmts > 0)
assert(
@@ -273,22 +288,23 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info)
dset_info[i].dset->shared->dcpl_cache.efl.nused > 0 ||
dset_info[i].dset->shared->layout.type == H5D_COMPACT);
- /* Call storage method's I/O initialization routine */
- if (dset_info[i].layout_ops.io_init &&
- (dset_info[i].layout_ops.io_init)(&io_info, &(dset_info[i])) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize I/O info");
- dset_info[i].skip_io = FALSE;
- io_op_init++;
-
- /* Reset metadata tagging */
- H5AC_tag(prev_tag, NULL);
+ dset_info[i].skip_io = false;
}
+
+ /* Call storage method's I/O initialization routine */
+ if (dset_info[i].layout_ops.io_init &&
+ (dset_info[i].layout_ops.io_init)(&io_info, &(dset_info[i])) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize I/O info");
+ io_op_init++;
+
+ /* Reset metadata tagging */
+ H5AC_tag(prev_tag, NULL);
} /* end of for loop */
- assert(io_op_init + io_skipped == count);
+ assert(io_op_init == count);
/* If no datasets have I/O, we're done */
- if (io_op_init == 0)
+ if (io_skipped == count)
HGOTO_DONE(SUCCEED);
/* Perform second phase of type info initialization */
@@ -323,7 +339,11 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info)
}
/* MDIO-specific second phase initialization */
- for (i = 0; i < count; i++)
+ for (i = 0; i < count; i++) {
+ /* Check for skipped I/O */
+ if (dset_info[i].skip_io)
+ continue;
+
if (dset_info[i].layout_ops.mdio_init) {
haddr_t prev_tag = HADDR_UNDEF;
@@ -337,6 +357,7 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info)
/* Reset metadata tagging */
H5AC_tag(prev_tag, NULL);
}
+ }
/* Invoke correct "high level" I/O routine */
if ((*io_info.md_io_ops.multi_read_md)(&io_info) < 0)
@@ -430,7 +451,7 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info)
done:
/* Shut down the I/O op information */
for (i = 0; i < io_op_init; i++)
- if (!dset_info[i].skip_io && dset_info[i].layout_ops.io_term &&
+ if (dset_info[i].layout_ops.io_term &&
(*dset_info[i].layout_ops.io_term)(&io_info, &(dset_info[i])) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to shut down I/O op info");
@@ -495,7 +516,7 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info)
/* projected to a rank equal to that of file_space. */
/* */
/* This field is only used if */
- /* H5S_select_shape_same() returns TRUE when */
+ /* H5S_select_shape_same() returns true when */
/* comparing at least one mem_space and data_space, */
/* and the mem_space has a different rank. */
/* */
@@ -512,6 +533,17 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info)
FUNC_ENTER_NOAPI(FAIL)
+#ifdef H5_HAVE_PARALLEL
+ /* Reset the actual io mode properties to the default values in case
+ * the DXPL (if it's non-default) was previously used in a collective
+ * I/O operation.
+ */
+ if (!H5CX_is_def_dxpl()) {
+ H5CX_set_mpio_actual_chunk_opt(H5D_MPIO_NO_CHUNK_OPTIMIZATION);
+ H5CX_set_mpio_actual_io_mode(H5D_MPIO_NO_COLLECTIVE);
+ } /* end if */
+#endif
+
/* Init io_info */
if (H5D__ioinfo_init(count, H5D_IO_OP_WRITE, dset_info, &io_info) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize I/O info");
@@ -523,7 +555,7 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info)
/* iterate over all dsets and construct I/O information */
for (i = 0; i < count; i++) {
- hbool_t should_alloc_space = FALSE; /* Whether or not to initialize dataset's storage */
+ bool should_alloc_space = false; /* Whether or not to initialize dataset's storage */
haddr_t prev_tag = HADDR_UNDEF;
/* check args */
@@ -540,7 +572,7 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info)
if (H5Z_can_apply(dset_info[i].dset->shared->dcpl_id, dset_info[i].dset->shared->type_id) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_CANAPPLY, FAIL, "can't apply filters");
- dset_info[i].dset->shared->checked_filters = TRUE;
+ dset_info[i].dset->shared->checked_filters = true;
} /* end if */
/* Check if we are allowed to write to this file */
@@ -586,7 +618,7 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info)
if (NULL == dset_info[i].buf.cvp) {
/* Check for any elements selected (which is invalid) */
if (dset_info[i].nelmts > 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no output buffer");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no input buffer");
/* If the buffer is nil, and 0 element is selected, make a fake buffer.
* This is for some MPI package like ChaMPIon on NCSA's tungsten which
@@ -615,7 +647,7 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info)
* as well.
*/
if (dset_info[i].nelmts > 0 &&
- TRUE == H5S_SELECT_SHAPE_SAME(dset_info[i].mem_space, dset_info[i].file_space) &&
+ true == H5S_SELECT_SHAPE_SAME(dset_info[i].mem_space, dset_info[i].file_space) &&
H5S_GET_EXTENT_NDIMS(dset_info[i].mem_space) != H5S_GET_EXTENT_NDIMS(dset_info[i].file_space)) {
ptrdiff_t buf_adj = 0;
@@ -655,6 +687,10 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info)
if (H5D__dset_ioinfo_init(dset_info[i].dset, &(dset_info[i]), &(store[i])) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set up I/O operation");
+ /* Check if any filters are applied to the dataset */
+ if (dset_info[i].dset->shared->dcpl_cache.pline.nused > 0)
+ io_info.filtered_count++;
+
/* Allocate dataspace and initialize it if it hasn't been. */
should_alloc_space = dset_info[i].dset->shared->dcpl_cache.efl.nused == 0 &&
!(*dset_info[i].dset->shared->layout.ops->is_space_alloc)(
@@ -672,7 +708,7 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info)
if (should_alloc_space) {
hssize_t file_nelmts; /* Number of elements in file dataset's dataspace */
- hbool_t full_overwrite; /* Whether we are over-writing all the elements */
+ bool full_overwrite; /* Whether we are over-writing all the elements */
/* Get the number of elements in file dataset's dataspace */
if ((file_nelmts = H5S_GET_EXTENT_NPOINTS(dset_info[i].file_space)) < 0)
@@ -680,10 +716,10 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info)
"can't retrieve number of elements in file dataset");
/* Always allow fill values to be written if the dataset has a VL datatype */
- if (H5T_detect_class(dset_info[i].dset->shared->type, H5T_VLEN, FALSE))
- full_overwrite = FALSE;
+ if (H5T_detect_class(dset_info[i].dset->shared->type, H5T_VLEN, false))
+ full_overwrite = false;
else
- full_overwrite = (hbool_t)((hsize_t)file_nelmts == dset_info[i].nelmts ? TRUE : FALSE);
+ full_overwrite = (bool)((hsize_t)file_nelmts == dset_info[i].nelmts ? true : false);
/* Allocate storage */
if (H5D__alloc_storage(dset_info[i].dset, H5D_ALLOC_WRITE, full_overwrite, NULL) < 0)
@@ -695,7 +731,7 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info)
if (dset_info[i].layout_ops.io_init &&
(*dset_info[i].layout_ops.io_init)(&io_info, &(dset_info[i])) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize I/O info");
- dset_info[i].skip_io = FALSE;
+ dset_info[i].skip_io = false;
io_op_init++;
/* Reset metadata tagging */
@@ -940,7 +976,7 @@ H5D__ioinfo_init(size_t count, H5D_io_op_type_t op_type, H5D_dset_io_info_t *dse
/* Check if we could potentially use in-place type conversion */
if (op_type == H5D_IO_OP_READ)
/* Always on for read (modulo other restrictions that are handled in layout callbacks) */
- io_info->may_use_in_place_tconv = TRUE;
+ io_info->may_use_in_place_tconv = true;
else
/* Only enable in-place type conversion if we're allowed to modify the write buffer */
H5CX_get_modify_write_buf(&io_info->may_use_in_place_tconv);
@@ -1093,7 +1129,7 @@ H5D__typeinfo_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info, hid_t
MAX3(io_info->max_tconv_type_size, type_info->src_type_size, type_info->dst_type_size);
/* Check if we need a background buffer */
- if ((io_info->op_type == H5D_IO_OP_WRITE) && H5T_detect_class(dset->shared->type, H5T_VLEN, FALSE))
+ if ((io_info->op_type == H5D_IO_OP_WRITE) && H5T_detect_class(dset->shared->type, H5T_VLEN, false))
type_info->need_bkg = H5T_BKG_YES;
else {
H5T_bkg_t path_bkg; /* Type conversion's background info */
@@ -1169,7 +1205,7 @@ H5D__typeinfo_init_phase2(H5D_io_info_t *io_info)
/* Check if we need to fill the background buffer with the destination contents */
if (type_info->need_bkg == H5T_BKG_YES)
- io_info->must_fill_bkg = TRUE;
+ io_info->must_fill_bkg = true;
}
}
@@ -1183,14 +1219,14 @@ H5D__typeinfo_init_phase2(H5D_io_info_t *io_info)
io_info->no_selection_io_cause |= H5D_SEL_IO_TCONV_BUF_TOO_SMALL;
io_info->tconv_buf_size = 0;
io_info->bkg_buf_size = 0;
- io_info->must_fill_bkg = FALSE;
+ io_info->must_fill_bkg = false;
}
if (io_info->bkg_buf_size > max_temp_buf) {
io_info->use_select_io = H5D_SELECTION_IO_MODE_OFF;
io_info->no_selection_io_cause |= H5D_SEL_IO_BKG_BUF_TOO_SMALL;
io_info->tconv_buf_size = 0;
io_info->bkg_buf_size = 0;
- io_info->must_fill_bkg = FALSE;
+ io_info->must_fill_bkg = false;
}
}
@@ -1225,15 +1261,6 @@ H5D__ioinfo_adjust(H5D_io_info_t *io_info)
dset0 = io_info->dsets_info[0].dset;
assert(dset0->oloc.file);
- /* Reset the actual io mode properties to the default values in case
- * the DXPL (if it's non-default) was previously used in a collective
- * I/O operation.
- */
- if (!H5CX_is_def_dxpl()) {
- H5CX_set_mpio_actual_chunk_opt(H5D_MPIO_NO_CHUNK_OPTIMIZATION);
- H5CX_set_mpio_actual_io_mode(H5D_MPIO_NO_COLLECTIVE);
- } /* end if */
-
/* Make any parallel I/O adjustments */
if (io_info->using_mpi_vfd) {
H5FD_mpio_xfer_t xfer_mode; /* Parallel transfer for this request */
@@ -1252,7 +1279,7 @@ H5D__ioinfo_adjust(H5D_io_info_t *io_info)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "invalid check for direct IO dataspace ");
/* Check if we can use the optimized parallel I/O routines */
- if (opt == TRUE) {
+ if (opt == true) {
/* Override the I/O op pointers to the MPI-specific routines, unless
* selection I/O is to be used - in this case the file driver will
* handle collective I/O */
@@ -1267,7 +1294,7 @@ H5D__ioinfo_adjust(H5D_io_info_t *io_info)
else {
/* Fail when file sync is required, since it requires collective write */
if (io_info->op_type == H5D_IO_OP_WRITE) {
- hbool_t mpi_file_sync_required = FALSE;
+ bool mpi_file_sync_required = false;
if (H5F_shared_get_mpi_file_sync_required(io_info->f_sh, &mpi_file_sync_required) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get MPI file_sync_required flag");
@@ -1380,7 +1407,7 @@ H5D__typeinfo_init_phase3(H5D_io_info_t *io_info)
if (NULL == (io_info->tconv_buf = H5FL_BLK_MALLOC(type_conv, io_info->tconv_buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed for type conversion");
- io_info->tconv_buf_allocated = TRUE;
+ io_info->tconv_buf_allocated = true;
}
/* Allocate global background buffer (if any) */
@@ -1388,7 +1415,7 @@ H5D__typeinfo_init_phase3(H5D_io_info_t *io_info)
if (NULL == (io_info->bkg_buf = H5FL_BLK_MALLOC(type_conv, io_info->bkg_buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed for type conversion");
- io_info->bkg_buf_allocated = TRUE;
+ io_info->bkg_buf_allocated = true;
}
}
else {
@@ -1410,11 +1437,11 @@ H5D__typeinfo_init_phase3(H5D_io_info_t *io_info)
/* If the buffer is too small to hold even one element (in the dataset with the largest , try to
* make it bigger */
if (target_size < io_info->max_tconv_type_size) {
- hbool_t default_buffer_info; /* Whether the buffer information are the defaults */
+ bool default_buffer_info; /* Whether the buffer information are the defaults */
/* Detect if we have all default settings for buffers */
- default_buffer_info = (hbool_t)((H5D_TEMP_BUF_SIZE == max_temp_buf) && (NULL == tconv_buf) &&
- (NULL == bkgr_buf));
+ default_buffer_info =
+ (bool)((H5D_TEMP_BUF_SIZE == max_temp_buf) && (NULL == tconv_buf) && (NULL == bkgr_buf));
/* Check if we are using the default buffer info */
if (default_buffer_info)
@@ -1434,7 +1461,7 @@ H5D__typeinfo_init_phase3(H5D_io_info_t *io_info)
if (NULL == (io_info->tconv_buf = H5FL_BLK_MALLOC(type_conv, target_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed for type conversion");
- io_info->tconv_buf_allocated = TRUE;
+ io_info->tconv_buf_allocated = true;
} /* end if */
/* Iterate over datasets */
@@ -1455,7 +1482,7 @@ H5D__typeinfo_init_phase3(H5D_io_info_t *io_info)
if (NULL == (io_info->bkg_buf = H5FL_BLK_MALLOC(type_conv, target_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed for background conversion");
- io_info->bkg_buf_allocated = TRUE;
+ io_info->bkg_buf_allocated = true;
}
}
}
diff --git a/src/H5Dlayout.c b/src/H5Dlayout.c
index 225c48ad2b2..25effdf5f1a 100644
--- a/src/H5Dlayout.c
+++ b/src/H5Dlayout.c
@@ -154,7 +154,7 @@ H5D__layout_set_io_ops(const H5D_t *dataset)
*-------------------------------------------------------------------------
*/
size_t
-H5D__layout_meta_size(const H5F_t *f, const H5O_layout_t *layout, hbool_t include_compact_data)
+H5D__layout_meta_size(const H5F_t *f, const H5O_layout_t *layout, bool include_compact_data)
{
size_t ret_value = 0; /* Return value */
@@ -339,7 +339,7 @@ H5D__layout_set_latest_indexing(H5O_layout_t *layout, const H5S_t *space, const
hsize_t max_dims[H5O_LAYOUT_NDIMS]; /* Maximum dimension sizes */
hsize_t cur_dims[H5O_LAYOUT_NDIMS]; /* Current dimension sizes */
unsigned unlim_count = 0; /* Count of unlimited max. dimensions */
- hbool_t single = TRUE; /* Fulfill single chunk indexing */
+ bool single = true; /* Fulfill single chunk indexing */
unsigned u; /* Local index variable */
/* Query the dataspace's dimensions */
@@ -351,7 +351,7 @@ H5D__layout_set_latest_indexing(H5O_layout_t *layout, const H5S_t *space, const
if (max_dims[u] == H5S_UNLIMITED)
unlim_count++;
if (cur_dims[u] != max_dims[u] || cur_dims[u] != layout->u.chunk.dim[u])
- single = FALSE;
+ single = false;
} /* end for */
/* Chunked datasets with unlimited dimension(s) */
@@ -439,7 +439,7 @@ H5D__layout_oh_create(H5F_t *file, H5O_t *oh, H5D_t *dset, hid_t dapl_id)
H5O_layout_t *layout; /* Dataset's layout information */
const H5O_fill_t *fill_prop; /* Pointer to dataset's fill value information */
unsigned layout_mesg_flags; /* Flags for inserting layout message */
- hbool_t layout_init = FALSE; /* Flag to indicate that chunk information was initialized */
+ bool layout_init = false; /* Flag to indicate that chunk information was initialized */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE_TAG(dset->oloc.addr)
@@ -468,14 +468,14 @@ H5D__layout_oh_create(H5F_t *file, H5O_t *oh, H5D_t *dset, hid_t dapl_id)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize layout information");
/* Indicate that the layout information was initialized */
- layout_init = TRUE;
+ layout_init = true;
/*
* Allocate storage if space allocate time is early; otherwise delay
* allocation until later.
*/
if (fill_prop->alloc_time == H5D_ALLOC_TIME_EARLY)
- if (H5D__alloc_storage(dset, H5D_ALLOC_CREATE, FALSE, NULL) < 0)
+ if (H5D__alloc_storage(dset, H5D_ALLOC_CREATE, false, NULL) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize storage");
/* Update external storage message, if it's used */
@@ -488,7 +488,7 @@ H5D__layout_oh_create(H5F_t *file, H5O_t *oh, H5D_t *dset, hid_t dapl_id)
/* Determine size of heap needed to stored the file names */
for (u = 0; u < efl->nused; ++u)
- heap_size += H5HL_ALIGN(HDstrlen(efl->slot[u].name) + 1);
+ heap_size += H5HL_ALIGN(strlen(efl->slot[u].name) + 1);
/* Create the heap for the EFL file names */
if (H5HL_create(file, heap_size, &efl->heap_addr /*out*/) < 0)
@@ -506,8 +506,7 @@ H5D__layout_oh_create(H5F_t *file, H5O_t *oh, H5D_t *dset, hid_t dapl_id)
for (u = 0; u < efl->nused; ++u) {
/* Insert file name into heap */
- if (H5HL_insert(file, heap, HDstrlen(efl->slot[u].name) + 1, efl->slot[u].name, &name_offset) <
- 0) {
+ if (H5HL_insert(file, heap, strlen(efl->slot[u].name) + 1, efl->slot[u].name, &name_offset) < 0) {
H5HL_unprotect(heap);
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert file name into heap");
}
@@ -569,11 +568,11 @@ H5D__layout_oh_create(H5F_t *file, H5O_t *oh, H5D_t *dset, hid_t dapl_id)
herr_t
H5D__layout_oh_read(H5D_t *dataset, hid_t dapl_id, H5P_genplist_t *plist)
{
- htri_t msg_exists; /* Whether a particular type of message exists */
- hbool_t pline_copied = FALSE; /* Flag to indicate that dcpl_cache.pline's message was copied */
- hbool_t layout_copied = FALSE; /* Flag to indicate that layout message was copied */
- hbool_t efl_copied = FALSE; /* Flag to indicate that the EFL message was copied */
- herr_t ret_value = SUCCEED; /* Return value */
+ htri_t msg_exists; /* Whether a particular type of message exists */
+ bool pline_copied = false; /* Flag to indicate that dcpl_cache.pline's message was copied */
+ bool layout_copied = false; /* Flag to indicate that layout message was copied */
+ bool efl_copied = false; /* Flag to indicate that the EFL message was copied */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -588,7 +587,7 @@ H5D__layout_oh_read(H5D_t *dataset, hid_t dapl_id, H5P_genplist_t *plist)
/* Retrieve the I/O pipeline message */
if (NULL == H5O_msg_read(&(dataset->oloc), H5O_PLINE_ID, &dataset->shared->dcpl_cache.pline))
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve message");
- pline_copied = TRUE;
+ pline_copied = true;
/* Set the I/O pipeline info in the property list */
if (H5P_set(plist, H5O_CRT_PIPELINE_NAME, &dataset->shared->dcpl_cache.pline) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set pipeline");
@@ -602,7 +601,7 @@ H5D__layout_oh_read(H5D_t *dataset, hid_t dapl_id, H5P_genplist_t *plist)
*/
if (NULL == H5O_msg_read(&(dataset->oloc), H5O_LAYOUT_ID, &(dataset->shared->layout)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to read data layout message");
- layout_copied = TRUE;
+ layout_copied = true;
/* Check for external file list message (which might not exist) */
if ((msg_exists = H5O_msg_exists(&(dataset->oloc), H5O_EFL_ID)) < 0)
@@ -611,7 +610,7 @@ H5D__layout_oh_read(H5D_t *dataset, hid_t dapl_id, H5P_genplist_t *plist)
/* Retrieve the EFL message */
if (NULL == H5O_msg_read(&(dataset->oloc), H5O_EFL_ID, &dataset->shared->dcpl_cache.efl))
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve message");
- efl_copied = TRUE;
+ efl_copied = true;
/* Set the EFL info in the property list */
if (H5P_set(plist, H5D_CRT_EXT_FILE_LIST_NAME, &dataset->shared->dcpl_cache.efl) < 0)
diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c
index 82bcf024374..8ba9a14fc11 100644
--- a/src/H5Dmpio.c
+++ b/src/H5Dmpio.c
@@ -82,21 +82,10 @@
*/
#define H5D_MPIO_INIT_CHUNK_IDX_INFO(index_info, dset) \
do { \
- index_info.f = (dset)->oloc.file; \
- index_info.pline = &((dset)->shared->dcpl_cache.pline); \
- index_info.layout = &((dset)->shared->layout.u.chunk); \
- index_info.storage = &((dset)->shared->layout.storage.u.chunk); \
- } while (0)
-
-/*
- * Macro to initialize a H5D_chunk_ud_t structure
- * given a pointer to a H5D_chk_idx_info_t structure
- */
-#define H5D_MPIO_INIT_CHUNK_UD_INFO(chunk_ud, index_info_ptr) \
- do { \
- memset(&chunk_ud, 0, sizeof(H5D_chunk_ud_t)); \
- chunk_ud.common.layout = (index_info_ptr)->layout; \
- chunk_ud.common.storage = (index_info_ptr)->storage; \
+ (index_info).f = (dset)->oloc.file; \
+ (index_info).pline = &((dset)->shared->dcpl_cache.pline); \
+ (index_info).layout = &((dset)->shared->layout.u.chunk); \
+ (index_info).storage = &((dset)->shared->layout.storage.u.chunk); \
} while (0)
/******************/
@@ -129,16 +118,45 @@ typedef struct H5D_chunk_alloc_info_t {
H5F_block_t chunk_current;
H5F_block_t chunk_new;
hsize_t chunk_idx;
+ haddr_t dset_oloc_addr;
} H5D_chunk_alloc_info_t;
/*
* Information for a chunk pertaining to the dataset's chunk
- * index entry for the chunk
+ * index entry for the chunk.
+ *
+ * NOTE: To support efficient lookups of H5D_filtered_collective_chunk_info_t
+ * structures during parallel writes to filtered chunks, the
+ * chunk_idx and dset_oloc_addr fields of this structure are used
+ * together as a key for a hash table by following the approach
+ * outlined at https://troydhanson.github.io/uthash/userguide.html#_compound_keys.
+ * This means the following:
+ *
+ * - Instances of this structure should be memset to 0 when
+ * used for hashing to ensure that any padding between the
+ * chunk_idx and dset_oloc_addr fields does not affect the
+ * generated key.
+ *
+ * - The chunk_idx and dset_oloc_addr fields should be arranged
+ * in that specific order, as the code currently relies on
+ * this ordering when calculating the key length and it
+ * performs memory operations on the structure starting from
+ * the chunk_idx field and using the calculated key length.
+ *
+ * - The chunk_idx and dset_oloc_addr fields should ideally
+ * be arranged next to each other in the structure to minimize
+ * the calculated key length.
*/
typedef struct H5D_chunk_index_info_t {
- hsize_t chunk_idx;
+ /*
+ * These two fields must come in this order and next to
+ * each other for proper and efficient hashing
+ */
+ hsize_t chunk_idx;
+ haddr_t dset_oloc_addr;
+
unsigned filter_mask;
- hbool_t need_insert;
+ bool need_insert;
} H5D_chunk_index_info_t;
/*
@@ -219,8 +237,8 @@ typedef struct H5D_filtered_collective_chunk_info_t {
H5D_piece_info_t *chunk_info;
H5F_block_t chunk_current;
H5F_block_t chunk_new;
- hbool_t need_read;
- hbool_t skip_filter_pline;
+ bool need_read;
+ bool skip_filter_pline;
size_t io_size;
size_t chunk_buf_size;
int orig_owner;
@@ -231,6 +249,24 @@ typedef struct H5D_filtered_collective_chunk_info_t {
UT_hash_handle hh;
} H5D_filtered_collective_chunk_info_t;
+/*
+ * Information cached about each dataset involved when performing
+ * collective I/O on filtered chunks.
+ */
+typedef struct H5D_mpio_filtered_dset_info_t {
+ const H5D_dset_io_info_t *dset_io_info;
+ H5D_fill_buf_info_t fb_info;
+ H5D_chk_idx_info_t chunk_idx_info;
+ hsize_t file_chunk_size;
+ haddr_t dset_oloc_addr;
+ H5S_t *fill_space;
+ bool should_fill;
+ bool fb_info_init;
+ bool index_empty;
+
+ UT_hash_handle hh;
+} H5D_mpio_filtered_dset_info_t;
+
/*
* Top-level structure that contains an array of H5D_filtered_collective_chunk_info_t
* chunk info structures for collective filtered I/O, as well as other useful information.
@@ -249,6 +285,10 @@ typedef struct H5D_filtered_collective_chunk_info_t {
* will contain the chunk's "chunk index" value that can be used for chunk
* lookup operations.
*
+ * chunk_hash_table_keylen - The calculated length of the key used for the chunk info hash
+ * table, depending on whether collective I/O is being performed
+ * on a single or multiple filtered datasets.
+ *
* num_chunks_infos - The number of entries in the `chunk_infos` array.
*
* num_chunks_to_read - The number of entries (or chunks) in the `chunk_infos` array that
@@ -263,12 +303,39 @@ typedef struct H5D_filtered_collective_chunk_info_t {
* of chunk info structures to determine how big of I/O vectors to
* allocate during read operations, as an example.
*
+ * all_dset_indices_empty - A boolean determining whether all the datasets involved in the
+ * I/O operation have empty chunk indices. If this is the case,
+ * collective read operations can be skipped during processing
+ * of chunks.
+ *
+ * no_dset_index_insert_methods - A boolean determining whether all the datasets involved
+ * in the I/O operation have no chunk index insertion
+ * methods. If this is the case, collective chunk reinsertion
+ * operations can be skipped during processing of chunks.
+ *
+ * single_dset_info - A pointer to a H5D_mpio_filtered_dset_info_t structure containing
+ * information that is used when performing collective I/O on a single
+ * filtered dataset.
+ *
+ * dset_info_hash_table - A hash table storing H5D_mpio_filtered_dset_info_t structures
+ * that is populated when performing collective I/O on multiple
+ * filtered datasets at a time using the multi-dataset I/O API
+ * routines.
+ *
*/
typedef struct H5D_filtered_collective_io_info_t {
H5D_filtered_collective_chunk_info_t *chunk_infos;
H5D_filtered_collective_chunk_info_t *chunk_hash_table;
+ size_t chunk_hash_table_keylen;
size_t num_chunk_infos;
size_t num_chunks_to_read;
+ bool all_dset_indices_empty;
+ bool no_dset_index_insert_methods;
+
+ union {
+ H5D_mpio_filtered_dset_info_t *single_dset_info;
+ H5D_mpio_filtered_dset_info_t *dset_info_hash_table;
+ } dset_info;
} H5D_filtered_collective_io_info_t;
/*
@@ -278,6 +345,7 @@ typedef struct H5D_filtered_collective_io_info_t {
typedef struct H5D_chunk_redistribute_info_t {
H5F_block_t chunk_block;
hsize_t chunk_idx;
+ haddr_t dset_oloc_addr;
int orig_owner;
int new_owner;
int num_writers;
@@ -299,11 +367,11 @@ typedef struct H5D_chunk_insert_info_t {
static herr_t H5D__piece_io(H5D_io_info_t *io_info);
static herr_t H5D__multi_chunk_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info,
int mpi_rank, int mpi_size);
-static herr_t H5D__multi_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info,
- int mpi_rank, int mpi_size);
+static herr_t H5D__multi_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_infos,
+ size_t num_dset_infos, int mpi_rank, int mpi_size);
static herr_t H5D__link_piece_collective_io(H5D_io_info_t *io_info, int mpi_rank);
-static herr_t H5D__link_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info,
- int mpi_rank, int mpi_size);
+static herr_t H5D__link_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_infos,
+ size_t num_dset_infos, int mpi_rank, int mpi_size);
static herr_t H5D__inter_collective_io(H5D_io_info_t *io_info, const H5D_dset_io_info_t *di,
H5S_t *file_space, H5S_t *mem_space);
static herr_t H5D__final_collective_io(H5D_io_info_t *io_info, hsize_t mpi_buf_count,
@@ -314,48 +382,44 @@ static herr_t H5D__mpio_get_sum_chunk(const H5D_io_info_t *io_info, int *sum_chu
static herr_t H5D__mpio_get_sum_chunk_dset(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_info,
int *sum_chunkf);
static herr_t H5D__mpio_collective_filtered_chunk_io_setup(const H5D_io_info_t *io_info,
- const H5D_dset_io_info_t *di, int mpi_rank,
+ const H5D_dset_io_info_t *di,
+ size_t num_dset_infos, int mpi_rank,
H5D_filtered_collective_io_info_t *chunk_list);
static herr_t H5D__mpio_redistribute_shared_chunks(H5D_filtered_collective_io_info_t *chunk_list,
const H5D_io_info_t *io_info, int mpi_rank, int mpi_size,
size_t **rank_chunks_assigned_map);
static herr_t H5D__mpio_redistribute_shared_chunks_int(H5D_filtered_collective_io_info_t *chunk_list,
- size_t *num_chunks_assigned_map,
- hbool_t all_ranks_involved,
- const H5D_io_info_t *io_info, int mpi_rank,
- int mpi_size);
+ size_t *num_chunks_assigned_map,
+ bool all_ranks_involved, const H5D_io_info_t *io_info,
+ int mpi_rank, int mpi_size);
static herr_t H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk_list,
- H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info,
- int mpi_rank, int H5_ATTR_NDEBUG_UNUSED mpi_size,
- unsigned char ***chunk_msg_bufs,
- int *chunk_msg_bufs_len);
+ H5D_io_info_t *io_info, int mpi_rank,
+ int H5_ATTR_NDEBUG_UNUSED mpi_size,
+ unsigned char ***chunk_msg_bufs,
+ int *chunk_msg_bufs_len);
static herr_t H5D__mpio_collective_filtered_chunk_read(H5D_filtered_collective_io_info_t *chunk_list,
- const H5D_io_info_t *io_info,
- const H5D_dset_io_info_t *di, int mpi_rank);
+ const H5D_io_info_t *io_info, size_t num_dset_infos,
+ int mpi_rank);
static herr_t H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *chunk_list,
unsigned char **chunk_msg_bufs,
int chunk_msg_bufs_len, const H5D_io_info_t *io_info,
- const H5D_dset_io_info_t *di,
- int H5_ATTR_NDEBUG_UNUSED mpi_rank);
+ size_t num_dset_infos, int mpi_rank);
static herr_t H5D__mpio_collective_filtered_chunk_reallocate(H5D_filtered_collective_io_info_t *chunk_list,
- size_t *num_chunks_assigned_map,
- H5D_io_info_t *io_info,
- H5D_chk_idx_info_t *idx_info, int mpi_rank,
- int mpi_size);
+ size_t *num_chunks_assigned_map,
+ H5D_io_info_t *io_info, size_t num_dset_infos,
+ int mpi_rank, int mpi_size);
static herr_t H5D__mpio_collective_filtered_chunk_reinsert(H5D_filtered_collective_io_info_t *chunk_list,
size_t *num_chunks_assigned_map,
- H5D_io_info_t *io_info, H5D_dset_io_info_t *di,
- H5D_chk_idx_info_t *idx_info, int mpi_rank,
- int mpi_size);
+ H5D_io_info_t *io_info, size_t num_dset_infos,
+ int mpi_rank, int mpi_size);
static herr_t H5D__mpio_get_chunk_redistribute_info_types(MPI_Datatype *contig_type,
- hbool_t *contig_type_derived,
+ bool *contig_type_derived,
MPI_Datatype *resized_type,
- hbool_t *resized_type_derived);
-static herr_t H5D__mpio_get_chunk_alloc_info_types(MPI_Datatype *contig_type, hbool_t *contig_type_derived,
- MPI_Datatype *resized_type, hbool_t *resized_type_derived);
-static herr_t H5D__mpio_get_chunk_insert_info_types(MPI_Datatype *contig_type, hbool_t *contig_type_derived,
- MPI_Datatype *resized_type,
- hbool_t *resized_type_derived);
+ bool *resized_type_derived);
+static herr_t H5D__mpio_get_chunk_alloc_info_types(MPI_Datatype *contig_type, bool *contig_type_derived,
+ MPI_Datatype *resized_type, bool *resized_type_derived);
+static herr_t H5D__mpio_get_chunk_insert_info_types(MPI_Datatype *contig_type, bool *contig_type_derived,
+ MPI_Datatype *resized_type, bool *resized_type_derived);
static herr_t H5D__mpio_collective_filtered_vec_io(const H5D_filtered_collective_io_info_t *chunk_list,
H5F_shared_t *f_sh, H5D_io_op_type_t op_type);
static int H5D__cmp_piece_addr(const void *chunk_addr_info1, const void *chunk_addr_info2);
@@ -411,7 +475,7 @@ H5FL_EXTERN(H5S_sel_iter_t);
*/
static int H5D_mpio_debug_flags_s[256];
static int H5D_mpio_debug_rank_s[8] = {-1, -1, -1, -1, -1, -1, -1, -1};
-static hbool_t H5D_mpio_debug_inited = FALSE;
+static bool H5D_mpio_debug_inited = false;
static const char *const trace_in_pre = "-> ";
static const char *const trace_out_pre = "<- ";
static int debug_indent = 0;
@@ -444,27 +508,27 @@ static FILE *debug_stream = NULL;
#define H5D_MPIO_TRACE_ENTER(rank) \
do { \
- hbool_t trace_flag = H5D_mpio_debug_flags_s[(int)'t']; \
+ bool trace_flag = H5D_mpio_debug_flags_s[(int)'t']; \
\
if (trace_flag) { \
H5D_MPIO_DEBUG_VA(rank, "%s%s", trace_in_pre, __func__); \
- debug_indent += (int)HDstrlen(trace_in_pre); \
+ debug_indent += (int)strlen(trace_in_pre); \
} \
} while (0)
#define H5D_MPIO_TRACE_EXIT(rank) \
do { \
- hbool_t trace_flag = H5D_mpio_debug_flags_s[(int)'t']; \
+ bool trace_flag = H5D_mpio_debug_flags_s[(int)'t']; \
\
if (trace_flag) { \
- debug_indent -= (int)HDstrlen(trace_out_pre); \
+ debug_indent -= (int)strlen(trace_out_pre); \
H5D_MPIO_DEBUG_VA(rank, "%s%s", trace_out_pre, __func__); \
} \
} while (0)
#define H5D_MPIO_TIME_START(rank, op_name) \
{ \
- hbool_t time_flag = H5D_mpio_debug_flags_s[(int)'c']; \
+ bool time_flag = H5D_mpio_debug_flags_s[(int)'c']; \
double start_time = 0.0, end_time = 0.0; \
const char *const op = op_name; \
\
@@ -499,7 +563,7 @@ H5D__mpio_parse_debug_str(const char *s)
int c = (int)(*s);
if (c >= (int)'0' && c <= (int)'9') {
- hbool_t range = FALSE;
+ bool range = false;
if (*(s + 1) && *(s + 2))
range = (int)*(s + 1) == '-' && (int)*(s + 2) >= (int)'0' && (int)*(s + 2) <= (int)'9';
@@ -546,14 +610,14 @@ H5D__mpio_debug_init(void)
memset(H5D_mpio_debug_flags_s, 0, sizeof(H5D_mpio_debug_flags_s));
/* Retrieve and parse the H5Dmpio debug string */
- debug_str = HDgetenv("H5D_mpio_Debug");
+ debug_str = getenv("H5D_mpio_Debug");
if (debug_str)
H5D__mpio_parse_debug_str(debug_str);
if (H5DEBUG(D))
debug_stream = H5DEBUG(D);
- H5D_mpio_debug_inited = TRUE;
+ H5D_mpio_debug_inited = true;
FUNC_LEAVE_NOAPI(ret_value)
}
@@ -569,7 +633,7 @@ H5D__mpio_debug_init(void)
* This was derived from H5D__mpio_opt_possible for
* multi-dset work.
*
- * Return: Success: Non-negative: TRUE or FALSE
+ * Return: Success: Non-negative: true or false
* Failure: Negative
*
*-------------------------------------------------------------------------
@@ -587,7 +651,7 @@ H5D__mpio_opt_possible(H5D_io_info_t *io_info)
/* [1] Flag if dataset is both: H5S_ALL and small */
unsigned global_cause[2] = {0, 0}; /* Global reason(s) for breaking collective mode */
htri_t is_vl_storage; /* Whether the dataset's datatype is stored in a variable-length form */
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE
@@ -638,8 +702,8 @@ H5D__mpio_opt_possible(H5D_io_info_t *io_info)
}
/* Check whether these are both simple or scalar dataspaces */
- if (!((H5S_SIMPLE == H5S_GET_EXTENT_TYPE(mem_space) ||
- H5S_SCALAR == H5S_GET_EXTENT_TYPE(mem_space)) &&
+ if (!((H5S_SIMPLE == H5S_GET_EXTENT_TYPE(mem_space) || H5S_SCALAR == H5S_GET_EXTENT_TYPE(mem_space) ||
+ H5S_NULL == H5S_GET_EXTENT_TYPE(mem_space)) &&
(H5S_SIMPLE == H5S_GET_EXTENT_TYPE(file_space) ||
H5S_SCALAR == H5S_GET_EXTENT_TYPE(file_space))))
local_cause[0] |= H5D_MPIO_NOT_SIMPLE_OR_SCALAR_DATASPACES;
@@ -740,14 +804,14 @@ H5D__mpio_opt_possible(H5D_io_info_t *io_info)
/* Set read-with-rank0-and-bcast flag if possible */
if (global_cause[0] == 0 && global_cause[1] == 0) {
- H5CX_set_mpio_rank0_bcast(TRUE);
+ H5CX_set_mpio_rank0_bcast(true);
#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
- H5CX_test_set_mpio_coll_rank0_bcast(TRUE);
+ H5CX_test_set_mpio_coll_rank0_bcast(true);
#endif /* H5_HAVE_INSTRUMENTED_LIBRARY */
} /* end if */
/* Set the return value, based on the global cause */
- ret_value = global_cause[0] > 0 ? FALSE : TRUE;
+ ret_value = global_cause[0] > 0 ? false : true;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -863,14 +927,14 @@ H5D__mpio_get_no_coll_cause_strings(char *local_cause, size_t local_cause_len, c
* so, prepend a semicolon to separate the messages.
*/
if (buf_space_left && local_cause_bytes_written) {
- HDstrncat(local_cause, "; ", buf_space_left);
+ strncat(local_cause, "; ", buf_space_left);
local_cause_bytes_written += MIN(buf_space_left, 2);
buf_space_left -= MIN(buf_space_left, 2);
}
if (buf_space_left) {
- HDstrncat(local_cause, cause_str, buf_space_left);
- local_cause_bytes_written += MIN(buf_space_left, HDstrlen(cause_str));
+ strncat(local_cause, cause_str, buf_space_left);
+ local_cause_bytes_written += MIN(buf_space_left, strlen(cause_str));
}
}
@@ -886,14 +950,14 @@ H5D__mpio_get_no_coll_cause_strings(char *local_cause, size_t local_cause_len, c
* so, prepend a semicolon to separate the messages.
*/
if (buf_space_left && global_cause_bytes_written) {
- HDstrncat(global_cause, "; ", buf_space_left);
+ strncat(global_cause, "; ", buf_space_left);
global_cause_bytes_written += MIN(buf_space_left, 2);
buf_space_left -= MIN(buf_space_left, 2);
}
if (buf_space_left) {
- HDstrncat(global_cause, cause_str, buf_space_left);
- global_cause_bytes_written += MIN(buf_space_left, HDstrlen(cause_str));
+ strncat(global_cause, cause_str, buf_space_left);
+ global_cause_bytes_written += MIN(buf_space_left, strlen(cause_str));
}
}
}
@@ -1076,12 +1140,12 @@ H5D__piece_io(H5D_io_info_t *io_info)
{
H5FD_mpio_chunk_opt_t chunk_opt_mode;
#ifdef H5Dmpio_DEBUG
- hbool_t log_file_flag = FALSE;
- FILE *debug_log_file = NULL;
+ bool log_file_flag = false;
+ FILE *debug_log_file = NULL;
#endif
int io_option = H5D_MULTI_CHUNK_IO_MORE_OPT;
- hbool_t recalc_io_option = FALSE;
- hbool_t use_multi_dset = FALSE;
+ bool recalc_io_option = false;
+ bool use_multi_dset = false;
unsigned one_link_chunk_io_threshold; /* Threshold to use single collective I/O for all chunks */
int sum_chunk = -1;
int mpi_rank;
@@ -1113,7 +1177,7 @@ H5D__piece_io(H5D_io_info_t *io_info)
char debug_log_filename[1024];
time_t time_now;
- HDsnprintf(debug_log_filename, 1024, "H5Dmpio_debug.rank%d", mpi_rank);
+ snprintf(debug_log_filename, 1024, "H5Dmpio_debug.rank%d", mpi_rank);
if (NULL == (debug_log_file = fopen(debug_log_filename, "a")))
HGOTO_ERROR(H5E_IO, H5E_OPENERROR, FAIL, "couldn't open debugging log file");
@@ -1138,19 +1202,12 @@ H5D__piece_io(H5D_io_info_t *io_info)
else if (H5FD_MPIO_CHUNK_MULTI_IO == chunk_opt_mode)
io_option = H5D_MULTI_CHUNK_IO;
else
- recalc_io_option = TRUE;
+ recalc_io_option = true;
/* Check if we can and should use multi dataset path */
if (io_info->count > 1 && (io_option == H5D_ONE_LINK_CHUNK_IO || recalc_io_option)) {
/* Use multi dataset path for now */
- use_multi_dset = TRUE;
-
- /* Check for filtered datasets */
- for (i = 0; i < io_info->count; i++)
- if (io_info->dsets_info[i].dset->shared->dcpl_cache.pline.nused > 0) {
- use_multi_dset = FALSE;
- break;
- }
+ use_multi_dset = true;
/* Check if this I/O exceeds one linked chunk threshold */
if (recalc_io_option && use_multi_dset) {
@@ -1170,31 +1227,45 @@ H5D__piece_io(H5D_io_info_t *io_info)
* chunk IO. If this threshold is not exceeded for all datasets, no need to check it again
* for each individual dataset. */
if ((unsigned)sum_chunk / (unsigned)mpi_size < one_link_chunk_io_threshold) {
- recalc_io_option = FALSE;
- use_multi_dset = FALSE;
+ recalc_io_option = false;
+ use_multi_dset = false;
}
}
}
+ }
- /* Perform multi dataset I/O if appropriate */
- if (use_multi_dset) {
+ /* Perform multi dataset I/O if appropriate */
+ if (use_multi_dset) {
#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
- /*** Set collective chunk user-input optimization API. ***/
- if (H5D_ONE_LINK_CHUNK_IO == io_option) {
- if (H5CX_test_set_mpio_coll_chunk_link_hard(0) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to set property value");
- } /* end if */
-#endif /* H5_HAVE_INSTRUMENTED_LIBRARY */
+ /*** Set collective chunk user-input optimization API. ***/
+ if (H5D_ONE_LINK_CHUNK_IO == io_option) {
+ if (H5CX_test_set_mpio_coll_chunk_link_hard(0) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to set property value");
+ } /* end if */
+#endif /* H5_HAVE_INSTRUMENTED_LIBRARY */
+
+ /* Process all the filtered datasets first */
+ if (io_info->filtered_count > 0) {
+ if (H5D__link_chunk_filtered_collective_io(io_info, io_info->dsets_info, io_info->count, mpi_rank,
+ mpi_size) < 0)
+ HGOTO_ERROR(H5E_IO, (H5D_IO_OP_READ == io_info->op_type ? H5E_READERROR : H5E_WRITEERROR),
+ FAIL, "couldn't finish filtered linked chunk MPI-IO");
+ }
+ /* Process all the unfiltered datasets */
+ if ((io_info->filtered_count == 0) || (io_info->filtered_count < io_info->count)) {
/* Perform unfiltered link chunk collective IO */
if (H5D__link_piece_collective_io(io_info, mpi_rank) < 0)
- HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish linked chunk MPI-IO");
+ HGOTO_ERROR(H5E_IO, (H5D_IO_OP_READ == io_info->op_type ? H5E_READERROR : H5E_WRITEERROR),
+ FAIL, "couldn't finish linked chunk MPI-IO");
}
}
-
- if (!use_multi_dset) {
+ else {
/* Loop over datasets */
for (i = 0; i < io_info->count; i++) {
+ if (io_info->dsets_info[i].skip_io)
+ continue;
+
if (io_info->dsets_info[i].layout->type == H5D_CONTIGUOUS) {
/* Contiguous: call H5D__inter_collective_io() directly */
H5D_mpio_actual_io_mode_t actual_io_mode = H5D_MPIO_CONTIGUOUS_COLLECTIVE;
@@ -1205,7 +1276,8 @@ H5D__piece_io(H5D_io_info_t *io_info)
if (H5D__inter_collective_io(io_info, &io_info->dsets_info[i],
io_info->dsets_info[i].file_space,
io_info->dsets_info[i].mem_space) < 0)
- HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish shared collective MPI-IO");
+ HGOTO_ERROR(H5E_IO, (H5D_IO_OP_READ == io_info->op_type ? H5E_READERROR : H5E_WRITEERROR),
+ FAIL, "couldn't finish shared collective MPI-IO");
/* Set the actual I/O mode property. internal_collective_io will not break to
* independent I/O, so we set it here.
@@ -1226,7 +1298,7 @@ H5D__piece_io(H5D_io_info_t *io_info)
/* If the threshold is 0, no need to check number of chunks */
if (one_link_chunk_io_threshold == 0) {
io_option = H5D_ONE_LINK_CHUNK_IO_MORE_OPT;
- recalc_io_option = FALSE;
+ recalc_io_option = false;
}
else {
/* Get number of chunks for all processes */
@@ -1250,28 +1322,34 @@ H5D__piece_io(H5D_io_info_t *io_info)
case H5D_ONE_LINK_CHUNK_IO_MORE_OPT:
/* Check if there are any filters in the pipeline */
if (io_info->dsets_info[i].dset->shared->dcpl_cache.pline.nused > 0) {
- if (H5D__link_chunk_filtered_collective_io(io_info, &io_info->dsets_info[i],
+ if (H5D__link_chunk_filtered_collective_io(io_info, &io_info->dsets_info[i], 1,
mpi_rank, mpi_size) < 0)
- HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL,
- "couldn't finish filtered linked chunk MPI-IO");
+ HGOTO_ERROR(
+ H5E_IO,
+ (H5D_IO_OP_READ == io_info->op_type ? H5E_READERROR : H5E_WRITEERROR),
+ FAIL, "couldn't finish filtered linked chunk MPI-IO");
} /* end if */
else {
/* If there is more than one dataset we cannot make the multi dataset call here,
* fall back to multi chunk */
if (io_info->count > 1) {
io_option = H5D_MULTI_CHUNK_IO_MORE_OPT;
- recalc_io_option = TRUE;
+ recalc_io_option = true;
if (H5D__multi_chunk_collective_io(io_info, &io_info->dsets_info[i], mpi_rank,
mpi_size) < 0)
- HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL,
- "couldn't finish optimized multiple chunk MPI-IO");
+ HGOTO_ERROR(
+ H5E_IO,
+ (H5D_IO_OP_READ == io_info->op_type ? H5E_READERROR : H5E_WRITEERROR),
+ FAIL, "couldn't finish optimized multiple chunk MPI-IO");
}
else {
/* Perform unfiltered link chunk collective IO */
if (H5D__link_piece_collective_io(io_info, mpi_rank) < 0)
- HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL,
- "couldn't finish linked chunk MPI-IO");
+ HGOTO_ERROR(
+ H5E_IO,
+ (H5D_IO_OP_READ == io_info->op_type ? H5E_READERROR : H5E_WRITEERROR),
+ FAIL, "couldn't finish linked chunk MPI-IO");
}
}
@@ -1281,17 +1359,21 @@ H5D__piece_io(H5D_io_info_t *io_info)
default: /* multiple chunk IO via threshold */
/* Check if there are any filters in the pipeline */
if (io_info->dsets_info[i].dset->shared->dcpl_cache.pline.nused > 0) {
- if (H5D__multi_chunk_filtered_collective_io(io_info, &io_info->dsets_info[i],
+ if (H5D__multi_chunk_filtered_collective_io(io_info, &io_info->dsets_info[i], 1,
mpi_rank, mpi_size) < 0)
- HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL,
- "couldn't finish optimized multiple filtered chunk MPI-IO");
+ HGOTO_ERROR(
+ H5E_IO,
+ (H5D_IO_OP_READ == io_info->op_type ? H5E_READERROR : H5E_WRITEERROR),
+ FAIL, "couldn't finish optimized multiple filtered chunk MPI-IO");
} /* end if */
else {
/* Perform unfiltered multi chunk collective IO */
if (H5D__multi_chunk_collective_io(io_info, &io_info->dsets_info[i], mpi_rank,
mpi_size) < 0)
- HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL,
- "couldn't finish optimized multiple chunk MPI-IO");
+ HGOTO_ERROR(
+ H5E_IO,
+ (H5D_IO_OP_READ == io_info->op_type ? H5E_READERROR : H5E_WRITEERROR),
+ FAIL, "couldn't finish optimized multiple chunk MPI-IO");
}
break;
@@ -1409,31 +1491,40 @@ H5D__link_piece_collective_io(H5D_io_info_t *io_info, int H5_ATTR_UNUSED mpi_ran
#endif
{
MPI_Datatype chunk_final_mtype; /* Final memory MPI datatype for all chunks with selection */
- hbool_t chunk_final_mtype_is_derived = FALSE;
+ bool chunk_final_mtype_is_derived = false;
MPI_Datatype chunk_final_ftype; /* Final file MPI datatype for all chunks with selection */
- hbool_t chunk_final_ftype_is_derived = FALSE;
+ bool chunk_final_ftype_is_derived = false;
H5D_storage_t ctg_store; /* Storage info for "fake" contiguous dataset */
MPI_Datatype *chunk_mtype = NULL;
MPI_Datatype *chunk_ftype = NULL;
MPI_Aint *chunk_file_disp_array = NULL;
MPI_Aint *chunk_mem_disp_array = NULL;
- hbool_t *chunk_mft_is_derived_array =
- NULL; /* Flags to indicate each chunk's MPI file datatype is derived */
- hbool_t *chunk_mbt_is_derived_array =
+ bool *chunk_mft_is_derived_array = NULL; /* Flags to indicate each chunk's MPI file datatype is derived */
+ bool *chunk_mbt_is_derived_array =
NULL; /* Flags to indicate each chunk's MPI memory datatype is derived */
int *chunk_mpi_file_counts = NULL; /* Count of MPI file datatype for each chunk */
int *chunk_mpi_mem_counts = NULL; /* Count of MPI memory datatype for each chunk */
int mpi_code; /* MPI return code */
H5D_mpio_actual_chunk_opt_mode_t actual_chunk_opt_mode = H5D_MPIO_LINK_CHUNK;
H5D_mpio_actual_io_mode_t actual_io_mode = 0;
- size_t i; /* Local index variable */
- herr_t ret_value = SUCCEED;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_PACKAGE
/* set actual_io_mode */
- for (i = 0; i < io_info->count; i++) {
- assert(io_info->dsets_info[i].dset->shared->dcpl_cache.pline.nused == 0);
+ for (size_t i = 0; i < io_info->count; i++) {
+ /* Skip this dataset if no I/O is being performed */
+ if (io_info->dsets_info[i].skip_io)
+ continue;
+
+ /* Filtered datasets are processed elsewhere. A contiguous dataset
+ * could possibly have filters in the DCPL pipeline, but the library
+ * will currently ignore optional filters in that case.
+ */
+ if ((io_info->dsets_info[i].dset->shared->dcpl_cache.pline.nused > 0) &&
+ (io_info->dsets_info[i].layout->type != H5D_CONTIGUOUS))
+ continue;
+
if (io_info->dsets_info[i].layout->type == H5D_CHUNKED)
actual_io_mode |= H5D_MPIO_CHUNK_COLLECTIVE;
else if (io_info->dsets_info[i].layout->type == H5D_CONTIGUOUS)
@@ -1460,8 +1551,9 @@ H5D__link_piece_collective_io(H5D_io_info_t *io_info, int H5_ATTR_UNUSED mpi_ran
H5_flexible_const_ptr_t base_buf_addr;
base_buf_addr.cvp = NULL;
- /* Get the number of chunks with a selection */
- num_chunk = io_info->pieces_added;
+ /* Get the number of unfiltered chunks with a selection */
+ assert(io_info->filtered_pieces_added <= io_info->pieces_added);
+ num_chunk = io_info->pieces_added - io_info->filtered_pieces_added;
H5_CHECK_OVERFLOW(num_chunk, size_t, int);
#ifdef H5Dmpio_DEBUG
@@ -1470,15 +1562,15 @@ H5D__link_piece_collective_io(H5D_io_info_t *io_info, int H5_ATTR_UNUSED mpi_ran
/* Set up MPI datatype for chunks selected */
if (num_chunk) {
- hbool_t need_sort = FALSE;
+ bool need_sort = false;
/* Check if sel_pieces array is sorted */
assert(io_info->sel_pieces[0]->faddr != HADDR_UNDEF);
- for (i = 1; i < num_chunk; i++) {
+ for (size_t i = 1; i < io_info->pieces_added; i++) {
assert(io_info->sel_pieces[i]->faddr != HADDR_UNDEF);
if (io_info->sel_pieces[i]->faddr < io_info->sel_pieces[i - 1]->faddr) {
- need_sort = TRUE;
+ need_sort = true;
break;
}
}
@@ -1504,18 +1596,27 @@ H5D__link_piece_collective_io(H5D_io_info_t *io_info, int H5_ATTR_UNUSED mpi_ran
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate chunk memory counts buffer");
if (NULL == (chunk_mpi_file_counts = (int *)H5MM_calloc(num_chunk * sizeof(int))))
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate chunk file counts buffer");
- if (NULL == (chunk_mbt_is_derived_array = (hbool_t *)H5MM_calloc(num_chunk * sizeof(hbool_t))))
+ if (NULL == (chunk_mbt_is_derived_array = (bool *)H5MM_calloc(num_chunk * sizeof(bool))))
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL,
"couldn't allocate chunk memory is derived datatype flags buffer");
- if (NULL == (chunk_mft_is_derived_array = (hbool_t *)H5MM_calloc(num_chunk * sizeof(hbool_t))))
+ if (NULL == (chunk_mft_is_derived_array = (bool *)H5MM_calloc(num_chunk * sizeof(bool))))
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL,
"couldn't allocate chunk file is derived datatype flags buffer");
- /* save lowest file address */
- ctg_store.contig.dset_addr = io_info->sel_pieces[0]->faddr;
-
- /* save base mem addr of piece for read/write */
- base_buf_addr = io_info->sel_pieces[0]->dset_info->buf;
+ /*
+ * After sorting sel_pieces according to file address, locate
+ * the first unfiltered chunk and save its file address and
+ * base memory address for read/write
+ */
+ ctg_store.contig.dset_addr = HADDR_UNDEF;
+ for (size_t i = 0; i < io_info->pieces_added; i++) {
+ if (!io_info->sel_pieces[i]->filtered_dset) {
+ ctg_store.contig.dset_addr = io_info->sel_pieces[i]->faddr;
+ base_buf_addr = io_info->sel_pieces[i]->dset_info->buf;
+ break;
+ }
+ }
+ assert(ctg_store.contig.dset_addr != HADDR_UNDEF);
#ifdef H5Dmpio_DEBUG
H5D_MPIO_DEBUG(mpi_rank, "before iterate over selected pieces\n");
@@ -1523,34 +1624,38 @@ H5D__link_piece_collective_io(H5D_io_info_t *io_info, int H5_ATTR_UNUSED mpi_ran
/* Obtain MPI derived datatype from all individual pieces */
/* Iterate over selected pieces for this process */
- for (i = 0; i < num_chunk; i++) {
+ for (size_t i = 0, curr_idx = 0; i < io_info->pieces_added; i++) {
hsize_t *permute_map = NULL; /* array that holds the mapping from the old,
out-of-order displacements to the in-order
displacements of the MPI datatypes of the
point selection of the file space */
- hbool_t is_permuted = FALSE;
+ bool is_permuted = false;
/* Assign convenience pointer to piece info */
piece_info = io_info->sel_pieces[i];
+ /* Skip over filtered pieces as they are processed elsewhere */
+ if (piece_info->filtered_dset)
+ continue;
+
/* Obtain disk and memory MPI derived datatype */
/* NOTE: The permute_map array can be allocated within H5S_mpio_space_type
* and will be fed into the next call to H5S_mpio_space_type
* where it will be freed.
*/
if (H5S_mpio_space_type(piece_info->fspace, piece_info->dset_info->type_info.src_type_size,
- &chunk_ftype[i], /* OUT: datatype created */
- &chunk_mpi_file_counts[i], /* OUT */
- &(chunk_mft_is_derived_array[i]), /* OUT */
- TRUE, /* this is a file space,
- so permute the
- datatype if the point
- selections are out of
- order */
- &permute_map, /* OUT: a map to indicate the
- permutation of points
- selected in case they
- are out of order */
+ &chunk_ftype[curr_idx], /* OUT: datatype created */
+ &chunk_mpi_file_counts[curr_idx], /* OUT */
+ &(chunk_mft_is_derived_array[curr_idx]), /* OUT */
+ true, /* this is a file space,
+ so permute the
+ datatype if the point
+ selections are out of
+ order */
+ &permute_map, /* OUT: a map to indicate the
+ permutation of points
+ selected in case they
+ are out of order */
&is_permuted /* OUT */) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "couldn't create MPI file type");
@@ -1558,20 +1663,20 @@ H5D__link_piece_collective_io(H5D_io_info_t *io_info, int H5_ATTR_UNUSED mpi_ran
if (is_permuted)
assert(permute_map);
if (H5S_mpio_space_type(piece_info->mspace, piece_info->dset_info->type_info.dst_type_size,
- &chunk_mtype[i], &chunk_mpi_mem_counts[i],
- &(chunk_mbt_is_derived_array[i]), FALSE, /* this is a memory
- space, so if the file
- space is not
- permuted, there is no
- need to permute the
- datatype if the point
- selections are out of
- order*/
- &permute_map, /* IN: the permutation map
- generated by the
- file_space selection
- and applied to the
- memory selection */
+ &chunk_mtype[curr_idx], &chunk_mpi_mem_counts[curr_idx],
+ &(chunk_mbt_is_derived_array[curr_idx]), false, /* this is a memory
+ space, so if the
+ file space is not
+ permuted, there is
+ no need to permute
+ the datatype if the
+ point selections
+ are out of order */
+ &permute_map, /* IN: the permutation map
+ generated by the
+ file_space selection
+ and applied to the
+ memory selection */
&is_permuted /* IN */) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "couldn't create MPI buf type");
/* Sanity check */
@@ -1581,16 +1686,19 @@ H5D__link_piece_collective_io(H5D_io_info_t *io_info, int H5_ATTR_UNUSED mpi_ran
/* Piece address relative to the first piece addr
* Assign piece address to MPI displacement
* (assume MPI_Aint big enough to hold it) */
- chunk_file_disp_array[i] = (MPI_Aint)piece_info->faddr - (MPI_Aint)ctg_store.contig.dset_addr;
+ chunk_file_disp_array[curr_idx] =
+ (MPI_Aint)piece_info->faddr - (MPI_Aint)ctg_store.contig.dset_addr;
if (io_info->op_type == H5D_IO_OP_WRITE) {
- chunk_mem_disp_array[i] =
+ chunk_mem_disp_array[curr_idx] =
(MPI_Aint)piece_info->dset_info->buf.cvp - (MPI_Aint)base_buf_addr.cvp;
}
else if (io_info->op_type == H5D_IO_OP_READ) {
- chunk_mem_disp_array[i] =
+ chunk_mem_disp_array[curr_idx] =
(MPI_Aint)piece_info->dset_info->buf.vp - (MPI_Aint)base_buf_addr.vp;
}
+
+ curr_idx++;
} /* end for */
/* Create final MPI derived datatype for the file */
@@ -1601,7 +1709,7 @@ H5D__link_piece_collective_io(H5D_io_info_t *io_info, int H5_ATTR_UNUSED mpi_ran
if (MPI_SUCCESS != (mpi_code = MPI_Type_commit(&chunk_final_ftype)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_commit failed", mpi_code)
- chunk_final_ftype_is_derived = TRUE;
+ chunk_final_ftype_is_derived = true;
/* Create final MPI derived datatype for memory */
if (MPI_SUCCESS !=
@@ -1610,10 +1718,10 @@ H5D__link_piece_collective_io(H5D_io_info_t *io_info, int H5_ATTR_UNUSED mpi_ran
HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_struct failed", mpi_code)
if (MPI_SUCCESS != (mpi_code = MPI_Type_commit(&chunk_final_mtype)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_commit failed", mpi_code)
- chunk_final_mtype_is_derived = TRUE;
+ chunk_final_mtype_is_derived = true;
/* Free the file & memory MPI datatypes for each chunk */
- for (i = 0; i < num_chunk; i++) {
+ for (size_t i = 0; i < num_chunk; i++) {
if (chunk_mbt_is_derived_array[i])
if (MPI_SUCCESS != (mpi_code = MPI_Type_free(chunk_mtype + i)))
HMPI_DONE_ERROR(FAIL, "MPI_Type_free failed", mpi_code)
@@ -1658,6 +1766,9 @@ H5D__link_piece_collective_io(H5D_io_info_t *io_info, int H5_ATTR_UNUSED mpi_ran
ret_value);
#endif
+ if (ret_value < 0)
+ H5CX_set_mpio_actual_chunk_opt(H5D_MPIO_NO_CHUNK_OPTIMIZATION);
+
/* Release resources */
if (chunk_mtype)
H5MM_xfree(chunk_mtype);
@@ -1754,8 +1865,8 @@ H5D__link_piece_collective_io(H5D_io_info_t *io_info, int H5_ATTR_UNUSED mpi_ran
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__link_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info, int mpi_rank,
- int mpi_size)
+H5D__link_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_infos,
+ size_t num_dset_infos, int mpi_rank, int mpi_size)
{
H5D_filtered_collective_io_info_t chunk_list = {0};
unsigned char **chunk_msg_bufs = NULL;
@@ -1763,7 +1874,7 @@ H5D__link_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_
int chunk_msg_bufs_len = 0;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_PACKAGE_TAG(dset_info->dset->oloc.addr)
+ FUNC_ENTER_PACKAGE
assert(io_info);
@@ -1784,18 +1895,15 @@ H5D__link_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_
/* Build a list of selected chunks in the collective io operation */
- if (H5D__mpio_collective_filtered_chunk_io_setup(io_info, dset_info, mpi_rank, &chunk_list) < 0)
+ if (H5D__mpio_collective_filtered_chunk_io_setup(io_info, dset_infos, num_dset_infos, mpi_rank,
+ &chunk_list) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "couldn't construct filtered I/O info list");
if (io_info->op_type == H5D_IO_OP_READ) { /* Filtered collective read */
- if (H5D__mpio_collective_filtered_chunk_read(&chunk_list, io_info, dset_info, mpi_rank) < 0)
+ if (H5D__mpio_collective_filtered_chunk_read(&chunk_list, io_info, num_dset_infos, mpi_rank) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "couldn't read filtered chunks");
}
else { /* Filtered collective write */
- H5D_chk_idx_info_t index_info;
-
- H5D_MPIO_INIT_CHUNK_IDX_INFO(index_info, dset_info->dset);
-
if (mpi_size > 1) {
/* Redistribute shared chunks being written to */
if (H5D__mpio_redistribute_shared_chunks(&chunk_list, io_info, mpi_rank, mpi_size,
@@ -1803,7 +1911,7 @@ H5D__link_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to redistribute shared chunks");
/* Send any chunk modification messages for chunks this rank no longer owns */
- if (H5D__mpio_share_chunk_modification_data(&chunk_list, io_info, dset_info, mpi_rank, mpi_size,
+ if (H5D__mpio_share_chunk_modification_data(&chunk_list, io_info, mpi_rank, mpi_size,
&chunk_msg_bufs, &chunk_msg_bufs_len) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL,
"unable to send chunk modification data between MPI ranks");
@@ -1818,7 +1926,7 @@ H5D__link_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_
* must participate.
*/
if (H5D__mpio_collective_filtered_chunk_update(&chunk_list, chunk_msg_bufs, chunk_msg_bufs_len,
- io_info, dset_info, mpi_rank) < 0)
+ io_info, num_dset_infos, mpi_rank) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "couldn't update modified chunks");
/* Free up resources used by chunk hash table now that we're done updating chunks */
@@ -1826,7 +1934,7 @@ H5D__link_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_
/* All ranks now collectively re-allocate file space for all chunks */
if (H5D__mpio_collective_filtered_chunk_reallocate(&chunk_list, rank_chunks_assigned_map, io_info,
- &index_info, mpi_rank, mpi_size) < 0)
+ num_dset_infos, mpi_rank, mpi_size) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL,
"couldn't collectively re-allocate file space for chunks");
@@ -1846,12 +1954,15 @@ H5D__link_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_
* into the chunk index
*/
if (H5D__mpio_collective_filtered_chunk_reinsert(&chunk_list, rank_chunks_assigned_map, io_info,
- dset_info, &index_info, mpi_rank, mpi_size) < 0)
+ num_dset_infos, mpi_rank, mpi_size) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL,
"couldn't collectively re-insert modified chunks into chunk index");
}
done:
+ if (ret_value < 0)
+ H5CX_set_mpio_actual_chunk_opt(H5D_MPIO_NO_CHUNK_OPTIMIZATION);
+
if (chunk_msg_bufs) {
for (size_t i = 0; i < (size_t)chunk_msg_bufs_len; i++)
H5MM_free(chunk_msg_bufs[i]);
@@ -1861,6 +1972,9 @@ H5D__link_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_
HASH_CLEAR(hh, chunk_list.chunk_hash_table);
+ if (rank_chunks_assigned_map)
+ H5MM_free(rank_chunks_assigned_map);
+
/* Free resources used by a rank which had some selection */
if (chunk_list.chunk_infos) {
for (size_t i = 0; i < chunk_list.num_chunk_infos; i++)
@@ -1870,15 +1984,42 @@ H5D__link_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_
H5MM_free(chunk_list.chunk_infos);
} /* end if */
- if (rank_chunks_assigned_map)
- H5MM_free(rank_chunks_assigned_map);
+ /* Free resources used by cached dataset info */
+ if ((num_dset_infos == 1) && (chunk_list.dset_info.single_dset_info)) {
+ H5D_mpio_filtered_dset_info_t *curr_dset_info = chunk_list.dset_info.single_dset_info;
+
+ if (curr_dset_info->fb_info_init && H5D__fill_term(&curr_dset_info->fb_info) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "can't release fill buffer info");
+ if (curr_dset_info->fill_space && H5S_close(curr_dset_info->fill_space) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close fill space");
+
+ H5MM_free(chunk_list.dset_info.single_dset_info);
+ chunk_list.dset_info.single_dset_info = NULL;
+ }
+ else if ((num_dset_infos > 1) && (chunk_list.dset_info.dset_info_hash_table)) {
+ H5D_mpio_filtered_dset_info_t *curr_dset_info;
+ H5D_mpio_filtered_dset_info_t *tmp;
+
+ HASH_ITER(hh, chunk_list.dset_info.dset_info_hash_table, curr_dset_info, tmp)
+ {
+ HASH_DELETE(hh, chunk_list.dset_info.dset_info_hash_table, curr_dset_info);
+
+ if (curr_dset_info->fb_info_init && H5D__fill_term(&curr_dset_info->fb_info) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "can't release fill buffer info");
+ if (curr_dset_info->fill_space && H5S_close(curr_dset_info->fill_space) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close fill space");
+
+ H5MM_free(curr_dset_info);
+ curr_dset_info = NULL;
+ }
+ }
#ifdef H5Dmpio_DEBUG
H5D_MPIO_TIME_STOP(mpi_rank);
H5D_MPIO_TRACE_EXIT(mpi_rank);
#endif
- FUNC_LEAVE_NOAPI_TAG(ret_value)
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__link_chunk_filtered_collective_io() */
/*-------------------------------------------------------------------------
@@ -2082,6 +2223,9 @@ H5D__multi_chunk_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_
H5CX_set_mpio_actual_io_mode(actual_io_mode);
done:
+ if (ret_value < 0)
+ H5CX_set_mpio_actual_chunk_opt(H5D_MPIO_NO_CHUNK_OPTIMIZATION);
+
/* Reset collective opt mode */
if (H5CX_set_mpio_coll_opt(orig_coll_opt_mode) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't reset MPI-I/O collective_op property");
@@ -2174,20 +2318,21 @@ H5D__multi_chunk_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__multi_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info, int mpi_rank,
- int mpi_size)
+H5D__multi_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_infos,
+ size_t num_dset_infos, int mpi_rank, int mpi_size)
{
H5D_filtered_collective_io_info_t chunk_list = {0};
unsigned char **chunk_msg_bufs = NULL;
- hbool_t have_chunk_to_process;
+ bool have_chunk_to_process;
size_t max_num_chunks;
int chunk_msg_bufs_len = 0;
int mpi_code;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_PACKAGE_TAG(dset_info->dset->oloc.addr)
+ FUNC_ENTER_PACKAGE_TAG(dset_infos->dset->oloc.addr)
assert(io_info);
+ assert(num_dset_infos == 1); /* Currently only supported with 1 dataset at a time */
#ifdef H5Dmpio_DEBUG
H5D_MPIO_TRACE_ENTER(mpi_rank);
@@ -2205,7 +2350,7 @@ H5D__multi_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info
H5CX_set_mpio_actual_io_mode(H5D_MPIO_CHUNK_COLLECTIVE);
/* Build a list of selected chunks in the collective IO operation */
- if (H5D__mpio_collective_filtered_chunk_io_setup(io_info, dset_info, mpi_rank, &chunk_list) < 0)
+ if (H5D__mpio_collective_filtered_chunk_io_setup(io_info, dset_infos, 1, mpi_rank, &chunk_list) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "couldn't construct filtered I/O info list");
/* Retrieve the maximum number of chunks selected for any rank */
@@ -2219,7 +2364,7 @@ H5D__multi_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info
if (io_info->op_type == H5D_IO_OP_READ) { /* Filtered collective read */
for (size_t i = 0; i < max_num_chunks; i++) {
- H5D_filtered_collective_io_info_t single_chunk_list = {0};
+ H5D_filtered_collective_io_info_t single_chunk_list = chunk_list;
/* Check if this rank has a chunk to work on for this iteration */
have_chunk_to_process = (i < chunk_list.num_chunk_infos);
@@ -2239,8 +2384,7 @@ H5D__multi_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info
single_chunk_list.num_chunks_to_read = 0;
}
- if (H5D__mpio_collective_filtered_chunk_read(&single_chunk_list, io_info, dset_info, mpi_rank) <
- 0)
+ if (H5D__mpio_collective_filtered_chunk_read(&single_chunk_list, io_info, 1, mpi_rank) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "couldn't read filtered chunks");
if (have_chunk_to_process && chunk_list.chunk_infos[i].buf) {
@@ -2250,18 +2394,13 @@ H5D__multi_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info
}
}
else { /* Filtered collective write */
- H5D_chk_idx_info_t index_info;
-
- /* Construct chunked index info */
- H5D_MPIO_INIT_CHUNK_IDX_INFO(index_info, dset_info->dset);
-
if (mpi_size > 1) {
/* Redistribute shared chunks being written to */
if (H5D__mpio_redistribute_shared_chunks(&chunk_list, io_info, mpi_rank, mpi_size, NULL) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to redistribute shared chunks");
/* Send any chunk modification messages for chunks this rank no longer owns */
- if (H5D__mpio_share_chunk_modification_data(&chunk_list, io_info, dset_info, mpi_rank, mpi_size,
+ if (H5D__mpio_share_chunk_modification_data(&chunk_list, io_info, mpi_rank, mpi_size,
&chunk_msg_bufs, &chunk_msg_bufs_len) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL,
"unable to send chunk modification data between MPI ranks");
@@ -2272,7 +2411,7 @@ H5D__multi_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info
* collective re-allocation and re-insertion of chunks modified by other ranks.
*/
for (size_t i = 0; i < max_num_chunks; i++) {
- H5D_filtered_collective_io_info_t single_chunk_list = {0};
+ H5D_filtered_collective_io_info_t single_chunk_list = chunk_list;
/* Check if this rank has a chunk to work on for this iteration */
have_chunk_to_process =
@@ -2284,13 +2423,11 @@ H5D__multi_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info
*/
if (have_chunk_to_process) {
single_chunk_list.chunk_infos = &chunk_list.chunk_infos[i];
- single_chunk_list.chunk_hash_table = chunk_list.chunk_hash_table;
single_chunk_list.num_chunk_infos = 1;
single_chunk_list.num_chunks_to_read = chunk_list.chunk_infos[i].need_read ? 1 : 0;
}
else {
single_chunk_list.chunk_infos = NULL;
- single_chunk_list.chunk_hash_table = chunk_list.chunk_hash_table;
single_chunk_list.num_chunk_infos = 0;
single_chunk_list.num_chunks_to_read = 0;
}
@@ -2300,13 +2437,13 @@ H5D__multi_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info
* the chunks. As chunk reads are done collectively here, all ranks
* must participate.
*/
- if (H5D__mpio_collective_filtered_chunk_update(
- &single_chunk_list, chunk_msg_bufs, chunk_msg_bufs_len, io_info, dset_info, mpi_rank) < 0)
+ if (H5D__mpio_collective_filtered_chunk_update(&single_chunk_list, chunk_msg_bufs,
+ chunk_msg_bufs_len, io_info, 1, mpi_rank) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "couldn't update modified chunks");
/* All ranks now collectively re-allocate file space for all chunks */
- if (H5D__mpio_collective_filtered_chunk_reallocate(&single_chunk_list, NULL, io_info, &index_info,
- mpi_rank, mpi_size) < 0)
+ if (H5D__mpio_collective_filtered_chunk_reallocate(&single_chunk_list, NULL, io_info, 1, mpi_rank,
+ mpi_size) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL,
"couldn't collectively re-allocate file space for chunks");
@@ -2324,14 +2461,17 @@ H5D__multi_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info
/* Participate in the collective re-insertion of all chunks modified
* in this iteration into the chunk index
*/
- if (H5D__mpio_collective_filtered_chunk_reinsert(&single_chunk_list, NULL, io_info, dset_info,
- &index_info, mpi_rank, mpi_size) < 0)
+ if (H5D__mpio_collective_filtered_chunk_reinsert(&single_chunk_list, NULL, io_info, 1, mpi_rank,
+ mpi_size) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL,
"couldn't collectively re-insert modified chunks into chunk index");
} /* end for */
}
done:
+ if (ret_value < 0)
+ H5CX_set_mpio_actual_chunk_opt(H5D_MPIO_NO_CHUNK_OPTIMIZATION);
+
if (chunk_msg_bufs) {
for (size_t i = 0; i < (size_t)chunk_msg_bufs_len; i++)
H5MM_free(chunk_msg_bufs[i]);
@@ -2350,6 +2490,36 @@ H5D__multi_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info
H5MM_free(chunk_list.chunk_infos);
} /* end if */
+ /* Free resources used by cached dataset info */
+ if ((num_dset_infos == 1) && (chunk_list.dset_info.single_dset_info)) {
+ H5D_mpio_filtered_dset_info_t *curr_dset_info = chunk_list.dset_info.single_dset_info;
+
+ if (curr_dset_info->fb_info_init && H5D__fill_term(&curr_dset_info->fb_info) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "can't release fill buffer info");
+ if (curr_dset_info->fill_space && H5S_close(curr_dset_info->fill_space) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close fill space");
+
+ H5MM_free(chunk_list.dset_info.single_dset_info);
+ chunk_list.dset_info.single_dset_info = NULL;
+ }
+ else if ((num_dset_infos > 1) && (chunk_list.dset_info.dset_info_hash_table)) {
+ H5D_mpio_filtered_dset_info_t *curr_dset_info;
+ H5D_mpio_filtered_dset_info_t *tmp;
+
+ HASH_ITER(hh, chunk_list.dset_info.dset_info_hash_table, curr_dset_info, tmp)
+ {
+ HASH_DELETE(hh, chunk_list.dset_info.dset_info_hash_table, curr_dset_info);
+
+ if (curr_dset_info->fb_info_init && H5D__fill_term(&curr_dset_info->fb_info) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "can't release fill buffer info");
+ if (curr_dset_info->fill_space && H5S_close(curr_dset_info->fill_space) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close fill space");
+
+ H5MM_free(curr_dset_info);
+ curr_dset_info = NULL;
+ }
+ }
+
#ifdef H5Dmpio_DEBUG
H5D_MPIO_TIME_STOP(mpi_rank);
H5D_MPIO_TRACE_EXIT(mpi_rank);
@@ -2373,8 +2543,8 @@ H5D__inter_collective_io(H5D_io_info_t *io_info, const H5D_dset_io_info_t *di, H
H5S_t *mem_space)
{
int mpi_buf_count; /* # of MPI types */
- hbool_t mbt_is_derived = FALSE;
- hbool_t mft_is_derived = FALSE;
+ bool mbt_is_derived = false;
+ bool mft_is_derived = false;
MPI_Datatype mpi_file_type, mpi_buf_type;
int mpi_code; /* MPI return code */
#ifdef H5Dmpio_DEBUG
@@ -2400,7 +2570,7 @@ H5D__inter_collective_io(H5D_io_info_t *io_info, const H5D_dset_io_info_t *di, H
out-of-order displacements to the in-order
displacements of the MPI datatypes of the
point selection of the file space */
- hbool_t is_permuted = FALSE;
+ bool is_permuted = false;
assert(di);
@@ -2411,7 +2581,7 @@ H5D__inter_collective_io(H5D_io_info_t *io_info, const H5D_dset_io_info_t *di, H
*/
if (H5S_mpio_space_type(file_space, di->type_info.src_type_size, &mpi_file_type, &mpi_file_count,
&mft_is_derived, /* OUT: datatype created */
- TRUE, /* this is a file space, so
+ true, /* this is a file space, so
permute the datatype if the
point selection is out of
order */
@@ -2427,7 +2597,7 @@ H5D__inter_collective_io(H5D_io_info_t *io_info, const H5D_dset_io_info_t *di, H
assert(permute_map);
if (H5S_mpio_space_type(mem_space, di->type_info.src_type_size, &mpi_buf_type, &mpi_buf_count,
&mbt_is_derived, /* OUT: datatype created */
- FALSE, /* this is a memory space, so if
+ false, /* this is a memory space, so if
the file space is not
permuted, there is no need to
permute the datatype if the
@@ -2450,8 +2620,8 @@ H5D__inter_collective_io(H5D_io_info_t *io_info, const H5D_dset_io_info_t *di, H
mpi_buf_type = MPI_BYTE;
mpi_file_type = MPI_BYTE;
mpi_buf_count = 0;
- mbt_is_derived = FALSE;
- mft_is_derived = FALSE;
+ mbt_is_derived = false;
+ mft_is_derived = false;
} /* end else */
#ifdef H5Dmpio_DEBUG
@@ -2586,20 +2756,25 @@ H5D__cmp_filtered_collective_io_info_entry(const void *filtered_collective_io_in
addr2 = entry2->chunk_new.offset;
/*
- * If both chunk addresses are defined, H5_addr_cmp is safe to use.
- * Otherwise, if both addresses aren't defined, compared chunk
- * entries based on their chunk index. Finally, if only one chunk
- * address is defined, return the appropriate value based on which
- * is defined.
+ * If both chunk's file addresses are defined, H5_addr_cmp is safe to use.
+ * If only one chunk's file address is defined, return the appropriate
+ * value based on which is defined. If neither chunk's file address is
+ * defined, compare chunk entries based on their dataset object header
+ * address, then by their chunk index value.
*/
if (H5_addr_defined(addr1) && H5_addr_defined(addr2)) {
ret_value = H5_addr_cmp(addr1, addr2);
}
else if (!H5_addr_defined(addr1) && !H5_addr_defined(addr2)) {
- hsize_t chunk_idx1 = entry1->index_info.chunk_idx;
- hsize_t chunk_idx2 = entry2->index_info.chunk_idx;
+ haddr_t oloc_addr1 = entry1->index_info.dset_oloc_addr;
+ haddr_t oloc_addr2 = entry2->index_info.dset_oloc_addr;
+
+ if (0 == (ret_value = H5_addr_cmp(oloc_addr1, oloc_addr2))) {
+ hsize_t chunk_idx1 = entry1->index_info.chunk_idx;
+ hsize_t chunk_idx2 = entry2->index_info.chunk_idx;
- ret_value = (chunk_idx1 > chunk_idx2) - (chunk_idx1 < chunk_idx2);
+ ret_value = (chunk_idx1 > chunk_idx2) - (chunk_idx1 < chunk_idx2);
+ }
}
else
ret_value = H5_addr_defined(addr1) ? 1 : -1;
@@ -2625,8 +2800,8 @@ H5D__cmp_chunk_redistribute_info(const void *_entry1, const void *_entry2)
{
const H5D_chunk_redistribute_info_t *entry1;
const H5D_chunk_redistribute_info_t *entry2;
- hsize_t chunk_index1;
- hsize_t chunk_index2;
+ haddr_t oloc_addr1;
+ haddr_t oloc_addr2;
int ret_value;
FUNC_ENTER_PACKAGE_NOERR
@@ -2634,17 +2809,26 @@ H5D__cmp_chunk_redistribute_info(const void *_entry1, const void *_entry2)
entry1 = (const H5D_chunk_redistribute_info_t *)_entry1;
entry2 = (const H5D_chunk_redistribute_info_t *)_entry2;
- chunk_index1 = entry1->chunk_idx;
- chunk_index2 = entry2->chunk_idx;
+ oloc_addr1 = entry1->dset_oloc_addr;
+ oloc_addr2 = entry2->dset_oloc_addr;
+
+ /* Sort first by dataset object header address */
+ if (0 == (ret_value = H5_addr_cmp(oloc_addr1, oloc_addr2))) {
+ hsize_t chunk_index1 = entry1->chunk_idx;
+ hsize_t chunk_index2 = entry2->chunk_idx;
+
+ /* Then by chunk index value */
+ if (chunk_index1 == chunk_index2) {
+ int orig_owner1 = entry1->orig_owner;
+ int orig_owner2 = entry2->orig_owner;
- if (chunk_index1 == chunk_index2) {
- int orig_owner1 = entry1->orig_owner;
- int orig_owner2 = entry2->orig_owner;
+ /* And finally by original owning MPI rank for the chunk */
- ret_value = (orig_owner1 > orig_owner2) - (orig_owner1 < orig_owner2);
+ ret_value = (orig_owner1 > orig_owner2) - (orig_owner1 < orig_owner2);
+ }
+ else
+ ret_value = (chunk_index1 > chunk_index2) - (chunk_index1 < chunk_index2);
}
- else
- ret_value = (chunk_index1 > chunk_index2) - (chunk_index1 < chunk_index2);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__cmp_chunk_redistribute_info() */
@@ -2659,6 +2843,16 @@ H5D__cmp_chunk_redistribute_info(const void *_entry1, const void *_entry2)
* rank for two H5D_chunk_redistribute_info_t
* structures
*
+ * NOTE: The inner logic used in this sorting callback (inside the
+ * block where the original owners are equal) is intended to
+ * cause the given array of H5D_chunk_redistribute_info_t
+ * structures to be sorted back exactly as it was sorted
+ * before a shared chunks redistribution operation, according
+ * to the logic in H5D__cmp_filtered_collective_io_info_entry.
+ * Since the two sorting callbacks are currently tied directly
+ * to each other, both should be updated in the same way when
+ * changes are made.
+ *
* Return: -1, 0, 1
*
*-------------------------------------------------------------------------
@@ -2685,20 +2879,25 @@ H5D__cmp_chunk_redistribute_info_orig_owner(const void *_entry1, const void *_en
haddr_t addr2 = entry2->chunk_block.offset;
/*
- * If both chunk addresses are defined, H5_addr_cmp is safe to use.
- * Otherwise, if both addresses aren't defined, compared chunk
- * entries based on their chunk index. Finally, if only one chunk
- * address is defined, return the appropriate value based on which
- * is defined.
+ * If both chunk's file addresses are defined, H5_addr_cmp is safe to use.
+ * If only one chunk's file address is defined, return the appropriate
+ * value based on which is defined. If neither chunk's file address is
+ * defined, compare chunk entries based on their dataset object header
+ * address, then by their chunk index value.
*/
if (H5_addr_defined(addr1) && H5_addr_defined(addr2)) {
ret_value = H5_addr_cmp(addr1, addr2);
}
else if (!H5_addr_defined(addr1) && !H5_addr_defined(addr2)) {
- hsize_t chunk_idx1 = entry1->chunk_idx;
- hsize_t chunk_idx2 = entry2->chunk_idx;
+ haddr_t oloc_addr1 = entry1->dset_oloc_addr;
+ haddr_t oloc_addr2 = entry2->dset_oloc_addr;
- ret_value = (chunk_idx1 > chunk_idx2) - (chunk_idx1 < chunk_idx2);
+ if (0 == (ret_value = H5_addr_cmp(oloc_addr1, oloc_addr2))) {
+ hsize_t chunk_idx1 = entry1->chunk_idx;
+ hsize_t chunk_idx2 = entry2->chunk_idx;
+
+ ret_value = (chunk_idx1 > chunk_idx2) - (chunk_idx1 < chunk_idx2);
+ }
}
else
ret_value = H5_addr_defined(addr1) ? 1 : -1;
@@ -2756,8 +2955,8 @@ H5D__obtain_mpio_mode(H5D_io_info_t *io_info, H5D_dset_io_info_t *di, uint8_t as
H5SL_node_t *chunk_node;
H5D_piece_info_t *chunk_info;
H5P_coll_md_read_flag_t md_reads_file_flag;
- hbool_t md_reads_context_flag;
- hbool_t restore_md_reads_state = FALSE;
+ bool md_reads_context_flag;
+ bool restore_md_reads_state = false;
MPI_Comm comm;
int root;
size_t ic;
@@ -2826,9 +3025,9 @@ H5D__obtain_mpio_mode(H5D_io_info_t *io_info, H5D_dset_io_info_t *di, uint8_t as
*/
if (H5F_get_coll_metadata_reads(di->dset->oloc.file)) {
md_reads_file_flag = H5P_FORCE_FALSE;
- md_reads_context_flag = FALSE;
+ md_reads_context_flag = false;
H5F_set_coll_metadata_reads(di->dset->oloc.file, &md_reads_file_flag, &md_reads_context_flag);
- restore_md_reads_state = TRUE;
+ restore_md_reads_state = true;
}
/* pre-computing: calculate number of processes and
@@ -2880,13 +3079,13 @@ H5D__obtain_mpio_mode(H5D_io_info_t *io_info, H5D_dset_io_info_t *di, uint8_t as
#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
{
- hbool_t coll_op = FALSE;
+ bool coll_op = false;
for (ic = 0; ic < total_chunks; ic++)
if (assign_io_mode[ic] == H5D_CHUNK_IO_MODE_COL) {
if (H5CX_test_set_mpio_coll_chunk_multi_ratio_coll(0) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to set property value");
- coll_op = TRUE;
+ coll_op = true;
break;
} /* end if */
@@ -2930,20 +3129,21 @@ H5D__obtain_mpio_mode(H5D_io_info_t *io_info, H5D_dset_io_info_t *di, uint8_t as
*/
static herr_t
H5D__mpio_collective_filtered_chunk_io_setup(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *di,
- int mpi_rank, H5D_filtered_collective_io_info_t *chunk_list)
+ size_t num_dset_infos, int mpi_rank,
+ H5D_filtered_collective_io_info_t *chunk_list)
{
- H5D_filtered_collective_chunk_info_t *local_info_array = NULL;
- H5D_chunk_ud_t udata;
- hbool_t filter_partial_edge_chunks;
- size_t num_chunks_selected;
- size_t num_chunks_to_read = 0;
- herr_t ret_value = SUCCEED;
+ H5D_filtered_collective_chunk_info_t *local_info_array = NULL;
+ H5D_mpio_filtered_dset_info_t *curr_dset_info = NULL;
+ size_t num_chunks_selected = 0;
+ size_t num_chunks_to_read = 0;
+ size_t buf_idx = 0;
+ bool need_sort = false;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_PACKAGE
assert(io_info);
assert(di);
- assert(di->layout->type == H5D_CHUNKED);
assert(chunk_list);
#ifdef H5Dmpio_DEBUG
@@ -2951,166 +3151,330 @@ H5D__mpio_collective_filtered_chunk_io_setup(const H5D_io_info_t *io_info, const
H5D_MPIO_TIME_START(mpi_rank, "Filtered Collective I/O Setup");
#endif
- /* Each rank builds a local list of the chunks they have selected */
- if ((num_chunks_selected = H5SL_count(di->layout_io_info.chunk_map->dset_sel_pieces))) {
- H5D_piece_info_t *chunk_info;
- H5SL_node_t *chunk_node;
- hsize_t select_npoints;
- hbool_t need_sort = FALSE;
+ /* Calculate hash key length for chunk hash table */
+ if (num_dset_infos > 1) {
+ /* Just in case the structure changes... */
+ HDcompile_assert(offsetof(H5D_chunk_index_info_t, dset_oloc_addr) >
+ offsetof(H5D_chunk_index_info_t, chunk_idx));
+
+ /* Calculate key length using uthash compound key example */
+ chunk_list->chunk_hash_table_keylen = offsetof(H5D_chunk_index_info_t, dset_oloc_addr) +
+ sizeof(haddr_t) - offsetof(H5D_chunk_index_info_t, chunk_idx);
+ }
+ else
+ chunk_list->chunk_hash_table_keylen = sizeof(hsize_t);
+
+ chunk_list->all_dset_indices_empty = true;
+ chunk_list->no_dset_index_insert_methods = true;
+
+ /* Calculate size needed for total chunk list */
+ for (size_t dset_idx = 0; dset_idx < num_dset_infos; dset_idx++) {
+ /* Skip this dataset if no I/O is being performed */
+ if (di[dset_idx].skip_io)
+ continue;
+
+ /* Only process filtered, chunked datasets. A contiguous dataset
+ * could possibly have filters in the DCPL pipeline, but the library
+ * will currently ignore optional filters in that case.
+ */
+ if ((di[dset_idx].dset->shared->dcpl_cache.pline.nused == 0) ||
+ (di[dset_idx].layout->type == H5D_CONTIGUOUS))
+ continue;
+
+ assert(di[dset_idx].layout->type == H5D_CHUNKED);
+ assert(di[dset_idx].layout->storage.type == H5D_CHUNKED);
- /* Determine whether partial edge chunks should be filtered */
- filter_partial_edge_chunks =
- !(di->dset->shared->layout.u.chunk.flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS);
+ num_chunks_selected += H5SL_count(di[dset_idx].layout_io_info.chunk_map->dset_sel_pieces);
+ }
+ if (num_chunks_selected)
if (NULL == (local_info_array = H5MM_malloc(num_chunks_selected * sizeof(*local_info_array))))
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate local io info array buffer");
- chunk_node = H5SL_first(di->layout_io_info.chunk_map->dset_sel_pieces);
- for (size_t i = 0; chunk_node; i++) {
- chunk_info = (H5D_piece_info_t *)H5SL_item(chunk_node);
+ for (size_t dset_idx = 0; dset_idx < num_dset_infos; dset_idx++) {
+ H5D_chunk_ud_t udata;
+ H5O_fill_t *fill_msg;
+ haddr_t prev_tag = HADDR_UNDEF;
- /* Obtain this chunk's address */
- if (H5D__chunk_lookup(di->dset, chunk_info->scaled, &udata) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address");
+ /* Skip this dataset if no I/O is being performed */
+ if (di[dset_idx].skip_io)
+ continue;
- /* Initialize rank-local chunk info */
- local_info_array[i].chunk_info = chunk_info;
- local_info_array[i].chunk_buf_size = 0;
- local_info_array[i].num_writers = 0;
- local_info_array[i].orig_owner = mpi_rank;
- local_info_array[i].new_owner = mpi_rank;
- local_info_array[i].buf = NULL;
+ /* Only process filtered, chunked datasets. A contiguous dataset
+ * could possibly have filters in the DCPL pipeline, but the library
+ * will currently ignore optional filters in that case.
+ */
+ if ((di[dset_idx].dset->shared->dcpl_cache.pline.nused == 0) ||
+ (di[dset_idx].layout->type == H5D_CONTIGUOUS))
+ continue;
- select_npoints = H5S_GET_SELECT_NPOINTS(chunk_info->fspace);
- local_info_array[i].io_size = (size_t)select_npoints * di->type_info.dst_type_size;
+ assert(di[dset_idx].layout->storage.type == H5D_CHUNKED);
+ assert(di[dset_idx].layout->storage.u.chunk.idx_type != H5D_CHUNK_IDX_NONE);
- /*
- * Determine whether this chunk will need to be read from the file. If this is
- * a read operation, the chunk will be read. If this is a write operation, we
- * generally need to read a filtered chunk from the file before modifying it,
- * unless the chunk is being fully overwritten.
- *
- * TODO: Currently the full overwrite status of a chunk is only obtained on a
- * per-rank basis. This means that if the total selection in the chunk, as
- * determined by the combination of selections of all of the ranks interested in
- * the chunk, covers the entire chunk, the performance optimization of not reading
- * the chunk from the file is still valid, but is not applied in the current
- * implementation.
- *
- * To implement this case, a few approaches were considered:
- *
- * - Keep a running total (distributed to each rank) of the number of chunk
- * elements selected during chunk redistribution and compare that to the total
- * number of elements in the chunk once redistribution is finished
- *
- * - Process all incoming chunk messages before doing I/O (these are currently
- * processed AFTER doing I/O), combine the owning rank's selection in a chunk
- * with the selections received from other ranks and check to see whether that
- * combined selection covers the entire chunk
- *
- * The first approach will be dangerous if the application performs an overlapping
- * write to a chunk, as the number of selected elements can equal or exceed the
- * number of elements in the chunk without the whole chunk selection being covered.
- * While it might be considered erroneous for an application to do an overlapping
- * write, we don't explicitly disallow it.
- *
- * The second approach contains a bit of complexity in that part of the chunk
- * messages will be needed before doing I/O and part will be needed after doing I/O.
- * Since modification data from chunk messages can't be applied until after any I/O
- * is performed (otherwise, we'll overwrite any applied modification data), chunk
- * messages are currently entirely processed after I/O. However, in order to determine
- * if a chunk is being fully overwritten, we need the dataspace portion of the chunk
- * messages before doing I/O. The naive way to do this is to process chunk messages
- * twice, using just the relevant information from the message before and after I/O.
- * The better way would be to avoid processing chunk messages twice by extracting (and
- * keeping around) the dataspace portion of the message before I/O and processing the
- * rest of the chunk message after I/O. Note that the dataspace portion of each chunk
- * message is used to correctly apply chunk modification data from the message, so
- * must be kept around both before and after I/O in this case.
- */
- if (io_info->op_type == H5D_IO_OP_READ)
- local_info_array[i].need_read = TRUE;
- else {
- local_info_array[i].need_read =
- local_info_array[i].io_size < (size_t)di->dset->shared->layout.u.chunk.size;
- }
+ /*
+ * To support the multi-dataset I/O case, cache some info (chunk size,
+ * fill buffer and fill dataspace, etc.) about each dataset involved
+ * in the I/O operation for use when processing chunks. If only one
+ * dataset is involved, this information is the same for every chunk
+ * processed. Otherwise, if multiple datasets are involved, a hash
+ * table is used to quickly match a particular chunk with the cached
+ * information pertaining to the dataset it resides in.
+ */
+ if (NULL == (curr_dset_info = H5MM_malloc(sizeof(H5D_mpio_filtered_dset_info_t))))
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate space for dataset info");
+
+ memset(&curr_dset_info->fb_info, 0, sizeof(H5D_fill_buf_info_t));
+
+ H5D_MPIO_INIT_CHUNK_IDX_INFO(curr_dset_info->chunk_idx_info, di[dset_idx].dset);
+
+ curr_dset_info->dset_io_info = &di[dset_idx];
+ curr_dset_info->file_chunk_size = di[dset_idx].dset->shared->layout.u.chunk.size;
+ curr_dset_info->dset_oloc_addr = di[dset_idx].dset->oloc.addr;
+ curr_dset_info->fill_space = NULL;
+ curr_dset_info->fb_info_init = false;
+ curr_dset_info->index_empty = false;
+
+ /* Determine if fill values should be written to chunks */
+ fill_msg = &di[dset_idx].dset->shared->dcpl_cache.fill;
+ curr_dset_info->should_fill =
+ (fill_msg->fill_time == H5D_FILL_TIME_ALLOC) ||
+ ((fill_msg->fill_time == H5D_FILL_TIME_IFSET) && fill_msg->fill_defined);
+
+ if (curr_dset_info->should_fill) {
+ hsize_t chunk_dims[H5S_MAX_RANK];
+
+ assert(di[dset_idx].dset->shared->ndims == di[dset_idx].dset->shared->layout.u.chunk.ndims - 1);
+ for (size_t dim_idx = 0; dim_idx < di[dset_idx].dset->shared->layout.u.chunk.ndims - 1; dim_idx++)
+ chunk_dims[dim_idx] = (hsize_t)di[dset_idx].dset->shared->layout.u.chunk.dim[dim_idx];
+
+ /* Get a dataspace for filling chunk memory buffers */
+ if (NULL == (curr_dset_info->fill_space = H5S_create_simple(
+ di[dset_idx].dset->shared->layout.u.chunk.ndims - 1, chunk_dims, NULL)))
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create chunk fill dataspace");
+
+ /* Initialize fill value buffer */
+ if (H5D__fill_init(&curr_dset_info->fb_info, NULL, (H5MM_allocate_t)H5D__chunk_mem_alloc,
+ (void *)&di[dset_idx].dset->shared->dcpl_cache.pline,
+ (H5MM_free_t)H5D__chunk_mem_free,
+ (void *)&di[dset_idx].dset->shared->dcpl_cache.pline,
+ &di[dset_idx].dset->shared->dcpl_cache.fill, di[dset_idx].dset->shared->type,
+ di[dset_idx].dset->shared->type_id, 0, curr_dset_info->file_chunk_size) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize fill value buffer");
+
+ curr_dset_info->fb_info_init = true;
+ }
+
+ /*
+ * If the dataset is incrementally allocated and hasn't been written
+ * to yet, the chunk index should be empty. In this case, a collective
+ * read of its chunks is essentially a no-op, so we can avoid that read
+ * later. If all datasets have empty chunk indices, we can skip the
+ * collective read entirely.
+ */
+ if (fill_msg->alloc_time == H5D_ALLOC_TIME_INCR)
+ if (H5D__chunk_index_empty(di[dset_idx].dset, &curr_dset_info->index_empty) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "couldn't determine if chunk index is empty");
+
+ if ((fill_msg->alloc_time != H5D_ALLOC_TIME_INCR) || !curr_dset_info->index_empty)
+ chunk_list->all_dset_indices_empty = false;
+
+ if (curr_dset_info->chunk_idx_info.storage->ops->insert)
+ chunk_list->no_dset_index_insert_methods = false;
+
+ /*
+ * For multi-dataset I/O, use a hash table to keep a mapping between
+ * chunks and the cached info for the dataset that they're in. Otherwise,
+ * we can just use the info object directly if only one dataset is being
+ * worked on.
+ */
+ if (num_dset_infos > 1) {
+ HASH_ADD(hh, chunk_list->dset_info.dset_info_hash_table, dset_oloc_addr, sizeof(haddr_t),
+ curr_dset_info);
+ }
+ else
+ chunk_list->dset_info.single_dset_info = curr_dset_info;
+ curr_dset_info = NULL;
+
+ /*
+ * Now, each rank builds a local list of info about the chunks
+ * they have selected among the chunks in the current dataset
+ */
+
+ /* Set metadata tagging with dataset oheader addr */
+ H5AC_tag(di[dset_idx].dset->oloc.addr, &prev_tag);
+
+ if (H5SL_count(di[dset_idx].layout_io_info.chunk_map->dset_sel_pieces)) {
+ H5SL_node_t *chunk_node;
+ bool filter_partial_edge_chunks;
+
+ /* Determine whether partial edge chunks should be filtered */
+ filter_partial_edge_chunks = !(di[dset_idx].dset->shared->layout.u.chunk.flags &
+ H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS);
+
+ chunk_node = H5SL_first(di[dset_idx].layout_io_info.chunk_map->dset_sel_pieces);
+ while (chunk_node) {
+ H5D_piece_info_t *chunk_info;
+ hsize_t select_npoints;
+
+ chunk_info = (H5D_piece_info_t *)H5SL_item(chunk_node);
+ assert(chunk_info->filtered_dset);
+
+ /* Obtain this chunk's address */
+ if (H5D__chunk_lookup(di[dset_idx].dset, chunk_info->scaled, &udata) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address");
+
+ /* Initialize rank-local chunk info */
+ local_info_array[buf_idx].chunk_info = chunk_info;
+ local_info_array[buf_idx].chunk_buf_size = 0;
+ local_info_array[buf_idx].num_writers = 0;
+ local_info_array[buf_idx].orig_owner = mpi_rank;
+ local_info_array[buf_idx].new_owner = mpi_rank;
+ local_info_array[buf_idx].buf = NULL;
- if (local_info_array[i].need_read)
- num_chunks_to_read++;
+ select_npoints = H5S_GET_SELECT_NPOINTS(chunk_info->fspace);
+ local_info_array[buf_idx].io_size =
+ (size_t)select_npoints * di[dset_idx].type_info.dst_type_size;
- local_info_array[i].skip_filter_pline = FALSE;
- if (!filter_partial_edge_chunks) {
/*
- * If this is a partial edge chunk and the "don't filter partial edge
- * chunks" flag is set, make sure not to apply filters to the chunk.
+ * Determine whether this chunk will need to be read from the file. If this is
+ * a read operation, the chunk will be read. If this is a write operation, we
+ * generally need to read a filtered chunk from the file before modifying it,
+ * unless the chunk is being fully overwritten.
+ *
+ * TODO: Currently the full overwrite status of a chunk is only obtained on a
+ * per-rank basis. This means that if the total selection in the chunk, as
+ * determined by the combination of selections of all of the ranks interested in
+ * the chunk, covers the entire chunk, the performance optimization of not reading
+ * the chunk from the file is still valid, but is not applied in the current
+ * implementation.
+ *
+ * To implement this case, a few approaches were considered:
+ *
+ * - Keep a running total (distributed to each rank) of the number of chunk
+ * elements selected during chunk redistribution and compare that to the total
+ * number of elements in the chunk once redistribution is finished
+ *
+ * - Process all incoming chunk messages before doing I/O (these are currently
+ * processed AFTER doing I/O), combine the owning rank's selection in a chunk
+ * with the selections received from other ranks and check to see whether that
+ * combined selection covers the entire chunk
+ *
+ * The first approach will be dangerous if the application performs an overlapping
+ * write to a chunk, as the number of selected elements can equal or exceed the
+ * number of elements in the chunk without the whole chunk selection being covered.
+ * While it might be considered erroneous for an application to do an overlapping
+ * write, we don't explicitly disallow it.
+ *
+ * The second approach contains a bit of complexity in that part of the chunk
+ * messages will be needed before doing I/O and part will be needed after doing I/O.
+ * Since modification data from chunk messages can't be applied until after any I/O
+ * is performed (otherwise, we'll overwrite any applied modification data), chunk
+ * messages are currently entirely processed after I/O. However, in order to determine
+ * if a chunk is being fully overwritten, we need the dataspace portion of the chunk
+ * messages before doing I/O. The naive way to do this is to process chunk messages
+ * twice, using just the relevant information from the message before and after I/O.
+ * The better way would be to avoid processing chunk messages twice by extracting (and
+ * keeping around) the dataspace portion of the message before I/O and processing the
+ * rest of the chunk message after I/O. Note that the dataspace portion of each chunk
+ * message is used to correctly apply chunk modification data from the message, so
+ * must be kept around both before and after I/O in this case.
*/
- if (H5D__chunk_is_partial_edge_chunk(di->dset->shared->ndims,
- di->dset->shared->layout.u.chunk.dim, chunk_info->scaled,
- di->dset->shared->curr_dims))
- local_info_array[i].skip_filter_pline = TRUE;
- }
+ if (io_info->op_type == H5D_IO_OP_READ)
+ local_info_array[buf_idx].need_read = true;
+ else {
+ local_info_array[buf_idx].need_read =
+ local_info_array[buf_idx].io_size <
+ (size_t)di[dset_idx].dset->shared->layout.u.chunk.size;
+ }
- /* Initialize the chunk's shared info */
- local_info_array[i].chunk_current = udata.chunk_block;
- local_info_array[i].chunk_new = udata.chunk_block;
+ if (local_info_array[buf_idx].need_read)
+ num_chunks_to_read++;
- /*
- * Check if the list is not in ascending order of offset in the file
- * or has unallocated chunks. In either case, the list should get
- * sorted.
- */
- if (i) {
- haddr_t curr_chunk_offset = local_info_array[i].chunk_current.offset;
- haddr_t prev_chunk_offset = local_info_array[i - 1].chunk_current.offset;
+ local_info_array[buf_idx].skip_filter_pline = false;
+ if (!filter_partial_edge_chunks) {
+ /*
+ * If this is a partial edge chunk and the "don't filter partial edge
+ * chunks" flag is set, make sure not to apply filters to the chunk.
+ */
+ if (H5D__chunk_is_partial_edge_chunk(
+ di[dset_idx].dset->shared->ndims, di[dset_idx].dset->shared->layout.u.chunk.dim,
+ chunk_info->scaled, di[dset_idx].dset->shared->curr_dims))
+ local_info_array[buf_idx].skip_filter_pline = true;
+ }
+
+ /* Initialize the chunk's shared info */
+ local_info_array[buf_idx].chunk_current = udata.chunk_block;
+ local_info_array[buf_idx].chunk_new = udata.chunk_block;
+
+ /*
+ * Check if the list is not in ascending order of offset in the file
+ * or has unallocated chunks. In either case, the list should get
+ * sorted.
+ */
+ if (!need_sort && buf_idx) {
+ haddr_t curr_chunk_offset = local_info_array[buf_idx].chunk_current.offset;
+ haddr_t prev_chunk_offset = local_info_array[buf_idx - 1].chunk_current.offset;
+
+ if (!H5_addr_defined(prev_chunk_offset) || !H5_addr_defined(curr_chunk_offset) ||
+ (curr_chunk_offset < prev_chunk_offset))
+ need_sort = true;
+ }
+
+ /* Needed for proper hashing later on */
+ memset(&local_info_array[buf_idx].index_info, 0, sizeof(H5D_chunk_index_info_t));
+
+ /*
+ * Extensible arrays may calculate a chunk's index a little differently
+ * than normal when the dataset's unlimited dimension is not the
+ * slowest-changing dimension, so set the index here based on what the
+ * extensible array code calculated instead of what was calculated
+ * in the chunk file mapping.
+ */
+ if (di[dset_idx].dset->shared->layout.u.chunk.idx_type == H5D_CHUNK_IDX_EARRAY)
+ local_info_array[buf_idx].index_info.chunk_idx = udata.chunk_idx;
+ else
+ local_info_array[buf_idx].index_info.chunk_idx = chunk_info->index;
- if (!H5_addr_defined(prev_chunk_offset) || !H5_addr_defined(curr_chunk_offset) ||
- (curr_chunk_offset < prev_chunk_offset))
- need_sort = TRUE;
+ assert(H5_addr_defined(di[dset_idx].dset->oloc.addr));
+ local_info_array[buf_idx].index_info.dset_oloc_addr = di[dset_idx].dset->oloc.addr;
+
+ local_info_array[buf_idx].index_info.filter_mask = udata.filter_mask;
+ local_info_array[buf_idx].index_info.need_insert = false;
+
+ buf_idx++;
+
+ chunk_node = H5SL_next(chunk_node);
}
+ }
+ else if (H5F_get_coll_metadata_reads(di[dset_idx].dset->oloc.file)) {
+ hsize_t scaled[H5O_LAYOUT_NDIMS] = {0};
/*
- * Extensible arrays may calculate a chunk's index a little differently
- * than normal when the dataset's unlimited dimension is not the
- * slowest-changing dimension, so set the index here based on what the
- * extensible array code calculated instead of what was calculated
- * in the chunk file mapping.
+ * If this rank has no selection in the dataset and collective
+ * metadata reads are enabled, do a fake lookup of a chunk to
+ * ensure that this rank has the chunk index opened. Otherwise,
+ * only the ranks that had a selection will have opened the
+ * chunk index and they will have done so independently. Therefore,
+ * when ranks with no selection participate in later collective
+ * metadata reads, they will try to open the chunk index collectively
+ * and issues will occur since other ranks won't participate.
+ *
+ * In the future, we should consider having a chunk index "open"
+ * callback that can be used to ensure collectivity between ranks
+ * in a more natural way, but this hack should suffice for now.
*/
- if (di->dset->shared->layout.u.chunk.idx_type == H5D_CHUNK_IDX_EARRAY)
- local_info_array[i].index_info.chunk_idx = udata.chunk_idx;
- else
- local_info_array[i].index_info.chunk_idx = chunk_info->index;
-
- local_info_array[i].index_info.filter_mask = udata.filter_mask;
- local_info_array[i].index_info.need_insert = FALSE;
-
- chunk_node = H5SL_next(chunk_node);
+ if (H5D__chunk_lookup(di[dset_idx].dset, scaled, &udata) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address");
}
- /* Ensure the chunk list is sorted in ascending order of offset in the file */
- if (need_sort)
- qsort(local_info_array, num_chunks_selected, sizeof(H5D_filtered_collective_chunk_info_t),
- H5D__cmp_filtered_collective_io_info_entry);
+ /* Reset metadata tagging */
+ H5AC_tag(prev_tag, NULL);
}
- else if (H5F_get_coll_metadata_reads(di->dset->oloc.file)) {
- hsize_t scaled[H5O_LAYOUT_NDIMS] = {0};
- /*
- * If this rank has no selection in the dataset and collective
- * metadata reads are enabled, do a fake lookup of a chunk to
- * ensure that this rank has the chunk index opened. Otherwise,
- * only the ranks that had a selection will have opened the
- * chunk index and they will have done so independently. Therefore,
- * when ranks with no selection participate in later collective
- * metadata reads, they will try to open the chunk index collectively
- * and issues will occur since other ranks won't participate.
- *
- * In the future, we should consider having a chunk index "open"
- * callback that can be used to ensure collectivity between ranks
- * in a more natural way, but this hack should suffice for now.
- */
- if (H5D__chunk_lookup(di->dset, scaled, &udata) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address");
- }
+ /* Ensure the chunk list is sorted in ascending order of offset in the file */
+ if (local_info_array && need_sort)
+ qsort(local_info_array, num_chunks_selected, sizeof(H5D_filtered_collective_chunk_info_t),
+ H5D__cmp_filtered_collective_io_info_entry);
chunk_list->chunk_infos = local_info_array;
chunk_list->num_chunk_infos = num_chunks_selected;
@@ -3122,6 +3486,37 @@ H5D__mpio_collective_filtered_chunk_io_setup(const H5D_io_info_t *io_info, const
done:
if (ret_value < 0) {
+ /* Free temporary cached dataset info object */
+ if (curr_dset_info) {
+ if (curr_dset_info->fb_info_init && H5D__fill_term(&curr_dset_info->fb_info) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "can't release fill buffer info");
+ if (curr_dset_info->fill_space && H5S_close(curr_dset_info->fill_space) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close fill space");
+
+ H5MM_free(curr_dset_info);
+ curr_dset_info = NULL;
+
+ if (num_dset_infos == 1)
+ chunk_list->dset_info.single_dset_info = NULL;
+ }
+
+ /* Free resources used by cached dataset info hash table */
+ if (num_dset_infos > 1) {
+ H5D_mpio_filtered_dset_info_t *tmp;
+
+ HASH_ITER(hh, chunk_list->dset_info.dset_info_hash_table, curr_dset_info, tmp)
+ {
+ HASH_DELETE(hh, chunk_list->dset_info.dset_info_hash_table, curr_dset_info);
+ H5MM_free(curr_dset_info);
+ curr_dset_info = NULL;
+ }
+ }
+
+ if (num_dset_infos == 1)
+ chunk_list->dset_info.single_dset_info = NULL;
+ else
+ chunk_list->dset_info.dset_info_hash_table = NULL;
+
H5MM_free(local_info_array);
}
@@ -3158,10 +3553,9 @@ H5D__mpio_redistribute_shared_chunks(H5D_filtered_collective_io_info_t *chunk_li
const H5D_io_info_t *io_info, int mpi_rank, int mpi_size,
size_t **rank_chunks_assigned_map)
{
- hbool_t redistribute_on_all_ranks;
+ bool redistribute_on_all_ranks;
size_t *num_chunks_map = NULL;
size_t coll_chunk_list_size = 0;
- size_t i;
int mpi_code;
herr_t ret_value = SUCCEED;
@@ -3189,8 +3583,8 @@ H5D__mpio_redistribute_shared_chunks(H5D_filtered_collective_io_info_t *chunk_li
num_chunks_map, 1, H5_SIZE_T_AS_MPI_TYPE, io_info->comm)))
HMPI_GOTO_ERROR(FAIL, "MPI_Allgather failed", mpi_code)
- for (i = 0; i < (size_t)mpi_size; i++)
- coll_chunk_list_size += num_chunks_map[i];
+ for (int curr_rank = 0; curr_rank < mpi_size; curr_rank++)
+ coll_chunk_list_size += num_chunks_map[curr_rank];
/*
* Determine whether we should perform chunk redistribution on all
@@ -3244,13 +3638,13 @@ H5D__mpio_redistribute_shared_chunks(H5D_filtered_collective_io_info_t *chunk_li
* Purpose: Routine to perform redistribution of shared chunks during
* parallel writes to datasets with filters applied.
*
- * If `all_ranks_involved` is TRUE, chunk redistribution
+ * If `all_ranks_involved` is true, chunk redistribution
* occurs on all MPI ranks. This is usually done when there
* is a relatively small number of chunks involved in order to
* cut down on MPI communication overhead while increasing
* total memory usage a bit.
*
- * If `all_ranks_involved` is FALSE, only rank 0 will perform
+ * If `all_ranks_involved` is false, only rank 0 will perform
* chunk redistribution. This is usually done when there is
* a relatively large number of chunks involved in order to
* cut down on total memory usage at the cost of increased
@@ -3260,21 +3654,23 @@ H5D__mpio_redistribute_shared_chunks(H5D_filtered_collective_io_info_t *chunk_li
*
* - All MPI ranks send their list of selected chunks to the
* ranks involved in chunk redistribution. Then, the
- * involved ranks sort this new list in order of chunk
- * index.
+ * involved ranks sort this new list in order of:
+ *
+ * dataset object header address -> chunk index value ->
+ * original owning MPI rank for chunk
*
* - The involved ranks scan the list looking for matching
- * runs of chunk index values (corresponding to a shared
- * chunk which has been selected by more than one rank in
- * the I/O operation) and for each shared chunk,
- * redistribute the chunk to the MPI rank writing to the
- * chunk which currently has the least amount of chunks
- * assigned to it. This is done by modifying the "new_owner"
- * field in each of the list entries corresponding to that
- * chunk. The involved ranks then re-sort the list in order
- * of original chunk owner so that each rank's section of
- * contributed chunks is contiguous in the collective chunk
- * list.
+ * runs of (dataset object header address, chunk index value)
+ * pairs (corresponding to a shared chunk which has been
+ * selected by more than one rank in the I/O operation) and
+ * for each shared chunk, redistribute the chunk to the MPI
+ * rank writing to the chunk which currently has the least
+ * amount of chunks assigned to it. This is done by modifying
+ * the "new_owner" field in each of the list entries
+ * corresponding to that chunk. The involved ranks then
+ * re-sort the list in order of original chunk owner so that
+ * each rank's section of contributed chunks is contiguous
+ * in the collective chunk list.
*
* - If chunk redistribution occurred on all ranks, each rank
* scans through the collective chunk list to find their
@@ -3291,14 +3687,13 @@ H5D__mpio_redistribute_shared_chunks(H5D_filtered_collective_io_info_t *chunk_li
*/
static herr_t
H5D__mpio_redistribute_shared_chunks_int(H5D_filtered_collective_io_info_t *chunk_list,
- size_t *num_chunks_assigned_map, hbool_t all_ranks_involved,
+ size_t *num_chunks_assigned_map, bool all_ranks_involved,
const H5D_io_info_t *io_info, int mpi_rank, int mpi_size)
{
MPI_Datatype struct_type;
MPI_Datatype packed_type;
- hbool_t struct_type_derived = FALSE;
- hbool_t packed_type_derived = FALSE;
- size_t i;
+ bool struct_type_derived = false;
+ bool packed_type_derived = false;
size_t coll_chunk_list_num_entries = 0;
void *coll_chunk_list = NULL;
int *counts_disps_array = NULL;
@@ -3349,15 +3744,15 @@ H5D__mpio_redistribute_shared_chunks_int(H5D_filtered_collective_io_info_t *chun
/* Set the receive counts from the assigned chunks map */
counts_ptr = counts_disps_array;
- for (i = 0; i < (size_t)mpi_size; i++)
- H5_CHECKED_ASSIGN(counts_ptr[i], int, num_chunks_assigned_map[i], size_t);
+ for (int curr_rank = 0; curr_rank < mpi_size; curr_rank++)
+ H5_CHECKED_ASSIGN(counts_ptr[curr_rank], int, num_chunks_assigned_map[curr_rank], size_t);
/* Set the displacements into the receive buffer for the gather operation */
displacements_ptr = &counts_disps_array[mpi_size];
*displacements_ptr = 0;
- for (i = 1; i < (size_t)mpi_size; i++)
- displacements_ptr[i] = displacements_ptr[i - 1] + counts_ptr[i - 1];
+ for (int curr_rank = 1; curr_rank < mpi_size; curr_rank++)
+ displacements_ptr[curr_rank] = displacements_ptr[curr_rank - 1] + counts_ptr[curr_rank - 1];
}
}
@@ -3366,9 +3761,11 @@ H5D__mpio_redistribute_shared_chunks_int(H5D_filtered_collective_io_info_t *chun
* necessary for MPI communication
*/
if (H5D__mpio_get_chunk_redistribute_info_types(&packed_type, &packed_type_derived, &struct_type,
- &struct_type_derived) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL,
+ &struct_type_derived) < 0) {
+ /* Push an error, but still participate in collective gather operation */
+ HDONE_ERROR(H5E_DATASET, H5E_CANTGET, FAIL,
"can't create derived datatypes for chunk redistribution info");
+ }
/* Perform gather operation */
if (H5_mpio_gatherv_alloc(chunk_list->chunk_infos, num_chunks_int, struct_type, counts_ptr,
@@ -3392,15 +3789,14 @@ H5D__mpio_redistribute_shared_chunks_int(H5D_filtered_collective_io_info_t *chun
if (all_ranks_involved || (mpi_rank == 0)) {
H5D_chunk_redistribute_info_t *chunk_entry;
- hsize_t curr_chunk_idx;
- size_t set_begin_index;
- int num_writers;
- int new_chunk_owner;
/* Clear the mapping from rank value -> number of assigned chunks */
memset(num_chunks_assigned_map, 0, (size_t)mpi_size * sizeof(*num_chunks_assigned_map));
- /* Sort collective chunk list according to chunk index */
+ /*
+ * Sort collective chunk list according to:
+ * dataset object header address -> chunk index value -> original owning MPI rank for chunk
+ */
qsort(coll_chunk_list, coll_chunk_list_num_entries, sizeof(H5D_chunk_redistribute_info_t),
H5D__cmp_chunk_redistribute_info);
@@ -3413,21 +3809,30 @@ H5D__mpio_redistribute_shared_chunks_int(H5D_filtered_collective_io_info_t *chun
* chunks).
*/
chunk_entry = &((H5D_chunk_redistribute_info_t *)coll_chunk_list)[0];
- for (i = 0; i < coll_chunk_list_num_entries;) {
+ for (size_t entry_idx = 0; entry_idx < coll_chunk_list_num_entries;) {
+ haddr_t curr_oloc_addr;
+ hsize_t curr_chunk_idx;
+ size_t set_begin_index;
+ bool keep_processing;
+ int num_writers;
+ int new_chunk_owner;
+
/* Set chunk's initial new owner to its original owner */
new_chunk_owner = chunk_entry->orig_owner;
/*
- * Set the current chunk index so we know when we've processed
- * all duplicate entries for a particular shared chunk
+ * Set the current dataset object header address and chunk
+ * index value so we know when we've processed all duplicate
+ * entries for a particular shared chunk
*/
+ curr_oloc_addr = chunk_entry->dset_oloc_addr;
curr_chunk_idx = chunk_entry->chunk_idx;
/* Reset the initial number of writers to this chunk */
num_writers = 0;
/* Set index for the beginning of this section of duplicate chunk entries */
- set_begin_index = i;
+ set_begin_index = entry_idx;
/*
* Process each chunk entry in the set for the current
@@ -3448,13 +3853,21 @@ H5D__mpio_redistribute_shared_chunks_int(H5D_filtered_collective_io_info_t *chun
num_writers++;
chunk_entry++;
- } while (++i < coll_chunk_list_num_entries && chunk_entry->chunk_idx == curr_chunk_idx);
+
+ keep_processing =
+ /* Make sure we haven't run out of chunks in the chunk list */
+ (++entry_idx < coll_chunk_list_num_entries) &&
+ /* Make sure the chunk we're looking at is in the same dataset */
+ (H5_addr_eq(chunk_entry->dset_oloc_addr, curr_oloc_addr)) &&
+ /* Make sure the chunk we're looking at is the same chunk */
+ (chunk_entry->chunk_idx == curr_chunk_idx);
+ } while (keep_processing);
/* We should never have more writers to a chunk than the number of MPI ranks */
assert(num_writers <= mpi_size);
/* Set all processed chunk entries' "new_owner" and "num_writers" fields */
- for (; set_begin_index < i; set_begin_index++) {
+ for (; set_begin_index < entry_idx; set_begin_index++) {
H5D_chunk_redistribute_info_t *entry;
entry = &((H5D_chunk_redistribute_info_t *)coll_chunk_list)[set_begin_index];
@@ -3488,29 +3901,32 @@ H5D__mpio_redistribute_shared_chunks_int(H5D_filtered_collective_io_info_t *chun
}
if (all_ranks_involved) {
+ size_t entry_idx;
+
/*
* If redistribution occurred on all ranks, search for the section
* in the collective chunk list corresponding to this rank's locally
* selected chunks and update the local list after redistribution.
*/
- for (i = 0; i < coll_chunk_list_num_entries; i++)
- if (mpi_rank == ((H5D_chunk_redistribute_info_t *)coll_chunk_list)[i].orig_owner)
+ for (entry_idx = 0; entry_idx < coll_chunk_list_num_entries; entry_idx++)
+ if (mpi_rank == ((H5D_chunk_redistribute_info_t *)coll_chunk_list)[entry_idx].orig_owner)
break;
- for (size_t j = 0; j < (size_t)num_chunks_int; j++) {
+ for (size_t info_idx = 0; info_idx < (size_t)num_chunks_int; info_idx++) {
H5D_chunk_redistribute_info_t *coll_entry;
- coll_entry = &((H5D_chunk_redistribute_info_t *)coll_chunk_list)[i++];
+ coll_entry = &((H5D_chunk_redistribute_info_t *)coll_chunk_list)[entry_idx++];
- chunk_list->chunk_infos[j].new_owner = coll_entry->new_owner;
- chunk_list->chunk_infos[j].num_writers = coll_entry->num_writers;
+ chunk_list->chunk_infos[info_idx].new_owner = coll_entry->new_owner;
+ chunk_list->chunk_infos[info_idx].num_writers = coll_entry->num_writers;
/*
* Check if the chunk list struct's `num_chunks_to_read` field
* needs to be updated
*/
- if (chunk_list->chunk_infos[j].need_read && (chunk_list->chunk_infos[j].new_owner != mpi_rank)) {
- chunk_list->chunk_infos[j].need_read = FALSE;
+ if (chunk_list->chunk_infos[info_idx].need_read &&
+ (chunk_list->chunk_infos[info_idx].new_owner != mpi_rank)) {
+ chunk_list->chunk_infos[info_idx].need_read = false;
assert(chunk_list->num_chunks_to_read > 0);
chunk_list->num_chunks_to_read--;
@@ -3533,9 +3949,10 @@ H5D__mpio_redistribute_shared_chunks_int(H5D_filtered_collective_io_info_t *chun
* their chunk list struct's `num_chunks_to_read` field since it
* may now be out of date.
*/
- for (i = 0; i < chunk_list->num_chunk_infos; i++) {
- if ((chunk_list->chunk_infos[i].new_owner != mpi_rank) && chunk_list->chunk_infos[i].need_read) {
- chunk_list->chunk_infos[i].need_read = FALSE;
+ for (size_t info_idx = 0; info_idx < chunk_list->num_chunk_infos; info_idx++) {
+ if ((chunk_list->chunk_infos[info_idx].new_owner != mpi_rank) &&
+ chunk_list->chunk_infos[info_idx].need_read) {
+ chunk_list->chunk_infos[info_idx].need_read = false;
assert(chunk_list->num_chunks_to_read > 0);
chunk_list->num_chunks_to_read--;
@@ -3600,9 +4017,10 @@ H5D__mpio_redistribute_shared_chunks_int(H5D_filtered_collective_io_info_t *chun
* owned by that rank, the rank sends the data it wishes to
* update the chunk with to the MPI rank that now has
* ownership of that chunk. To do this, it encodes the
- * chunk's index, its selection in the chunk and its
- * modification data into a buffer and then posts a
- * non-blocking MPI_Issend to the owning rank.
+ * chunk's index value, the dataset's object header address
+ * (only for the multi-dataset I/O case), its selection in
+ * the chunk and its modification data into a buffer and
+ * then posts a non-blocking MPI_Issend to the owning rank.
*
* Once this step is complete, all MPI ranks allocate arrays
* to hold chunk message receive buffers and MPI request
@@ -3644,9 +4062,8 @@ H5D__mpio_redistribute_shared_chunks_int(H5D_filtered_collective_io_info_t *chun
*/
static herr_t
H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk_list, H5D_io_info_t *io_info,
- H5D_dset_io_info_t *dset_info, int mpi_rank,
- int H5_ATTR_NDEBUG_UNUSED mpi_size, unsigned char ***chunk_msg_bufs,
- int *chunk_msg_bufs_len)
+ int mpi_rank, int H5_ATTR_NDEBUG_UNUSED mpi_size,
+ unsigned char ***chunk_msg_bufs, int *chunk_msg_bufs_len)
{
#if H5_CHECK_MPI_VERSION(3, 0)
H5D_filtered_collective_chunk_info_t *chunk_table = NULL;
@@ -3656,14 +4073,14 @@ H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk
MPI_Request *send_requests = NULL;
MPI_Request *recv_requests = NULL;
MPI_Request ibarrier = MPI_REQUEST_NULL;
- hbool_t mem_iter_init = FALSE;
- hbool_t ibarrier_posted = FALSE;
+ bool mem_iter_init = false;
+ bool ibarrier_posted = false;
size_t send_bufs_nalloc = 0;
size_t num_send_requests = 0;
size_t num_recv_requests = 0;
size_t num_msgs_incoming = 0;
+ size_t hash_keylen = 0;
size_t last_assigned_idx;
- size_t i;
int mpi_code;
herr_t ret_value = SUCCEED;
@@ -3671,7 +4088,6 @@ H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk
assert(chunk_list);
assert(io_info);
- assert(dset_info);
assert(mpi_size > 1);
assert(chunk_msg_bufs);
assert(chunk_msg_bufs_len);
@@ -3685,6 +4101,9 @@ H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk
H5CX_set_libver_bounds(NULL);
if (chunk_list->num_chunk_infos > 0) {
+ hash_keylen = chunk_list->chunk_hash_table_keylen;
+ assert(hash_keylen > 0);
+
/* Allocate a selection iterator for iterating over chunk dataspaces */
if (NULL == (mem_iter = H5FL_MALLOC(H5S_sel_iter_t)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate dataspace selection iterator");
@@ -3716,8 +4135,9 @@ H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk
* synchronous sends to send the data this rank is writing to
* the rank that does own the chunk.
*/
- for (i = 0, last_assigned_idx = 0; i < chunk_list->num_chunk_infos; i++) {
- H5D_filtered_collective_chunk_info_t *chunk_entry = &chunk_list->chunk_infos[i];
+ last_assigned_idx = 0;
+ for (size_t info_idx = 0; info_idx < chunk_list->num_chunk_infos; info_idx++) {
+ H5D_filtered_collective_chunk_info_t *chunk_entry = &chunk_list->chunk_infos[info_idx];
if (mpi_rank == chunk_entry->new_owner) {
num_msgs_incoming += (size_t)(chunk_entry->num_writers - 1);
@@ -3727,19 +4147,24 @@ H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk
* does own, since it has sent the necessary data and is no longer
* interested in the chunks it doesn't own.
*/
- chunk_list->chunk_infos[last_assigned_idx] = chunk_list->chunk_infos[i];
+ chunk_list->chunk_infos[last_assigned_idx] = chunk_list->chunk_infos[info_idx];
/*
* Since, at large scale, a chunk's index value may be larger than
* the maximum value that can be stored in an int, we cannot rely
* on using a chunk's index value as the tag for the MPI messages
- * sent/received for a chunk. Therefore, add this chunk to a hash
- * table with the chunk's index as a key so that we can quickly find
- * the chunk when processing chunk messages that were received. The
- * message itself will contain the chunk's index so we can update
- * the correct chunk with the received data.
+ * sent/received for a chunk. Further, to support the multi-dataset
+ * I/O case, we can't rely on being able to distinguish between
+ * chunks by their chunk index value alone since two chunks from
+ * different datasets could have the same chunk index value.
+ * Therefore, add this chunk to a hash table with the dataset's
+ * object header address + the chunk's index value as a key so that
+ * we can quickly find the chunk when processing chunk messages that
+ * were received. The message itself will contain the dataset's
+ * object header address and the chunk's index value so we can
+ * update the correct chunk with the received data.
*/
- HASH_ADD(hh, chunk_table, index_info.chunk_idx, sizeof(hsize_t),
+ HASH_ADD(hh, chunk_table, index_info.chunk_idx, hash_keylen,
&chunk_list->chunk_infos[last_assigned_idx]);
last_assigned_idx++;
@@ -3751,8 +4176,8 @@ H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk
size_t mod_data_size = 0;
size_t space_size = 0;
- /* Add the size of the chunk index to the encoded size */
- mod_data_size += sizeof(hsize_t);
+ /* Add the size of the chunk hash table key to the encoded size */
+ mod_data_size += hash_keylen;
/* Determine size of serialized chunk file dataspace */
if (H5S_encode(chunk_info->fspace, &mod_data_p, &space_size) < 0)
@@ -3763,7 +4188,7 @@ H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk
iter_nelmts = H5S_GET_SELECT_NPOINTS(chunk_info->mspace);
H5_CHECK_OVERFLOW(iter_nelmts, hsize_t, size_t);
- mod_data_size += (size_t)iter_nelmts * dset_info->type_info.src_type_size;
+ mod_data_size += (size_t)iter_nelmts * chunk_info->dset_info->type_info.src_type_size;
if (NULL == (msg_send_bufs[num_send_requests] = H5MM_malloc(mod_data_size)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL,
@@ -3771,23 +4196,28 @@ H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk
mod_data_p = msg_send_bufs[num_send_requests];
- /* Store the chunk's index into the buffer */
- memcpy(mod_data_p, &chunk_entry->index_info.chunk_idx, sizeof(hsize_t));
- mod_data_p += sizeof(hsize_t);
+ /*
+ * Add the chunk hash table key (chunk index value + possibly
+ * dataset object header address) into the buffer
+ */
+ H5MM_memcpy(mod_data_p, &chunk_entry->index_info.chunk_idx, hash_keylen);
+ mod_data_p += hash_keylen;
/* Serialize the chunk's file dataspace into the buffer */
if (H5S_encode(chunk_info->fspace, &mod_data_p, &mod_data_size) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTENCODE, FAIL, "unable to encode dataspace");
/* Initialize iterator for memory selection */
- if (H5S_select_iter_init(mem_iter, chunk_info->mspace, dset_info->type_info.src_type_size,
+ if (H5S_select_iter_init(mem_iter, chunk_info->mspace,
+ chunk_info->dset_info->type_info.src_type_size,
H5S_SEL_ITER_SHARE_WITH_DATASPACE) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
"unable to initialize memory selection information");
- mem_iter_init = TRUE;
+ mem_iter_init = true;
/* Collect the modification data into the buffer */
- if (0 == H5D__gather_mem(dset_info->buf.cvp, mem_iter, (size_t)iter_nelmts, mod_data_p))
+ if (0 ==
+ H5D__gather_mem(chunk_info->dset_info->buf.cvp, mem_iter, (size_t)iter_nelmts, mod_data_p))
HGOTO_ERROR(H5E_IO, H5E_CANTGATHER, FAIL, "couldn't gather from write buffer");
/*
@@ -3830,7 +4260,7 @@ H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk
if (H5S_SELECT_ITER_RELEASE(mem_iter) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "couldn't release memory selection iterator");
- mem_iter_init = FALSE;
+ mem_iter_init = false;
}
}
@@ -3930,14 +4360,14 @@ H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk
/* Post non-blocking barrier */
if (MPI_SUCCESS != (mpi_code = MPI_Ibarrier(io_info->comm, &ibarrier)))
HMPI_GOTO_ERROR(FAIL, "MPI_Ibarrier failed", mpi_code)
- ibarrier_posted = TRUE;
+ ibarrier_posted = true;
/*
* Now that all send requests have completed, free up the
* send buffers used in the non-blocking operations
*/
if (msg_send_bufs) {
- for (i = 0; i < num_send_requests; i++) {
+ for (size_t i = 0; i < num_send_requests; i++) {
if (msg_send_bufs[i])
H5MM_free(msg_send_bufs[i]);
}
@@ -3972,7 +4402,7 @@ H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk
/* Set the new number of locally-selected chunks */
chunk_list->num_chunk_infos = last_assigned_idx;
- /* Set chunk hash table pointer for future use */
+ /* Set chunk hash table information for future use */
chunk_list->chunk_hash_table = chunk_table;
/* Return chunk message buffers if any were received */
@@ -3988,19 +4418,19 @@ H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk
}
if (num_send_requests) {
- for (i = 0; i < num_send_requests; i++) {
+ for (size_t i = 0; i < num_send_requests; i++) {
MPI_Cancel(&send_requests[i]);
}
}
if (recv_requests) {
- for (i = 0; i < num_recv_requests; i++) {
+ for (size_t i = 0; i < num_recv_requests; i++) {
MPI_Cancel(&recv_requests[i]);
}
}
if (msg_recv_bufs) {
- for (i = 0; i < num_recv_requests; i++) {
+ for (size_t i = 0; i < num_recv_requests; i++) {
H5MM_free(msg_recv_bufs[i]);
}
@@ -4016,7 +4446,7 @@ H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk
H5MM_free(send_requests);
if (msg_send_bufs) {
- for (i = 0; i < num_send_requests; i++) {
+ for (size_t i = 0; i < num_send_requests; i++) {
if (msg_send_bufs[i])
H5MM_free(msg_send_bufs[i]);
}
@@ -4059,26 +4489,16 @@ H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk
*/
static herr_t
H5D__mpio_collective_filtered_chunk_read(H5D_filtered_collective_io_info_t *chunk_list,
- const H5D_io_info_t *io_info, const H5D_dset_io_info_t *di,
- int mpi_rank)
+ const H5D_io_info_t *io_info, size_t num_dset_infos, int mpi_rank)
{
- H5D_fill_buf_info_t fb_info;
- H5Z_EDC_t err_detect; /* Error detection info */
- H5Z_cb_t filter_cb; /* I/O filter callback function */
- hsize_t file_chunk_size = 0;
- hsize_t iter_nelmts; /* Number of points to iterate over for the chunk IO operation */
- hbool_t should_fill = FALSE;
- hbool_t fb_info_init = FALSE;
- hbool_t index_empty = FALSE;
- H5S_t *fill_space = NULL;
- void *base_read_buf = NULL;
- herr_t ret_value = SUCCEED;
+ H5Z_EDC_t err_detect; /* Error detection info */
+ H5Z_cb_t filter_cb; /* I/O filter callback function */
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_PACKAGE
assert(chunk_list);
assert(io_info);
- assert(di);
#ifdef H5Dmpio_DEBUG
H5D_MPIO_TRACE_ENTER(mpi_rank);
@@ -4087,22 +4507,6 @@ H5D__mpio_collective_filtered_chunk_read(H5D_filtered_collective_io_info_t *chun
(void)mpi_rank;
#endif
- if (chunk_list->num_chunk_infos) {
- /* Retrieve filter settings from API context */
- if (H5CX_get_err_detect(&err_detect) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get error detection info");
- if (H5CX_get_filter_cb(&filter_cb) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get I/O filter callback function");
-
- /* Set size of full chunks in dataset */
- file_chunk_size = di->dset->shared->layout.u.chunk.size;
-
- /* Determine if fill values should be "read" for unallocated chunks */
- should_fill = (di->dset->shared->dcpl_cache.fill.fill_time == H5D_FILL_TIME_ALLOC) ||
- ((di->dset->shared->dcpl_cache.fill.fill_time == H5D_FILL_TIME_IFSET) &&
- di->dset->shared->dcpl_cache.fill.fill_defined);
- }
-
/*
* Allocate memory buffers for all chunks being read. Chunk data buffers are of
* the largest size between the chunk's current filtered size and the chunk's true
@@ -4116,29 +4520,61 @@ H5D__mpio_collective_filtered_chunk_read(H5D_filtered_collective_io_info_t *chun
* size; reading into a (smaller) buffer of size equal to the unfiltered
* chunk size would of course be bad.
*/
- for (size_t i = 0; i < chunk_list->num_chunk_infos; i++) {
- H5D_filtered_collective_chunk_info_t *chunk_entry = &chunk_list->chunk_infos[i];
+ for (size_t info_idx = 0; info_idx < chunk_list->num_chunk_infos; info_idx++) {
+ H5D_filtered_collective_chunk_info_t *chunk_entry = &chunk_list->chunk_infos[info_idx];
+ H5D_mpio_filtered_dset_info_t *cached_dset_info;
+ hsize_t file_chunk_size;
assert(chunk_entry->need_read);
+ /* Find the cached dataset info for the dataset this chunk is in */
+ if (num_dset_infos > 1) {
+ HASH_FIND(hh, chunk_list->dset_info.dset_info_hash_table, &chunk_entry->index_info.dset_oloc_addr,
+ sizeof(haddr_t), cached_dset_info);
+ if (cached_dset_info == NULL) {
+ if (chunk_list->all_dset_indices_empty)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTFIND, FAIL, "unable to find cached dataset info entry");
+ else {
+ /* Push an error, but participate in collective read */
+ HDONE_ERROR(H5E_DATASET, H5E_CANTFIND, FAIL, "unable to find cached dataset info entry");
+ break;
+ }
+ }
+ }
+ else
+ cached_dset_info = chunk_list->dset_info.single_dset_info;
+ assert(cached_dset_info);
+
+ file_chunk_size = cached_dset_info->file_chunk_size;
+
chunk_entry->chunk_buf_size = MAX(chunk_entry->chunk_current.length, file_chunk_size);
if (NULL == (chunk_entry->buf = H5MM_malloc(chunk_entry->chunk_buf_size))) {
- /* Push an error, but participate in collective read */
- HDONE_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate chunk data buffer");
- break;
+ if (chunk_list->all_dset_indices_empty)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate chunk data buffer");
+ else {
+ /* Push an error, but participate in collective read */
+ HDONE_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate chunk data buffer");
+ break;
+ }
}
/*
- * Check if chunk is currently allocated. If not, don't try to
- * read it from the file. Instead, just fill the chunk buffer
- * with the fill value if necessary.
+ * Check whether the chunk needs to be read from the file, based
+ * on whether the dataset's chunk index is empty or the chunk has
+ * a defined address in the file. If the chunk doesn't need to be
+ * read from the file, just fill the chunk buffer with the fill
+ * value if necessary.
*/
- if (H5_addr_defined(chunk_entry->chunk_current.offset)) {
- /* Set first read buffer */
- if (!base_read_buf)
- base_read_buf = chunk_entry->buf;
+ if (cached_dset_info->index_empty || !H5_addr_defined(chunk_entry->chunk_current.offset)) {
+ chunk_entry->need_read = false;
+
+ /* Update field keeping track of number of chunks to read */
+ assert(chunk_list->num_chunks_to_read > 0);
+ chunk_list->num_chunks_to_read--;
+ }
+ if (chunk_entry->need_read) {
/* Set chunk's new length for eventual filter pipeline calls */
if (chunk_entry->skip_filter_pline)
chunk_entry->chunk_new.length = file_chunk_size;
@@ -4146,77 +4582,58 @@ H5D__mpio_collective_filtered_chunk_read(H5D_filtered_collective_io_info_t *chun
chunk_entry->chunk_new.length = chunk_entry->chunk_current.length;
}
else {
- chunk_entry->need_read = FALSE;
-
- /* Update field keeping track of number of chunks to read */
- assert(chunk_list->num_chunks_to_read > 0);
- chunk_list->num_chunks_to_read--;
-
/* Set chunk's new length for eventual filter pipeline calls */
chunk_entry->chunk_new.length = file_chunk_size;
- if (should_fill) {
- /* Initialize fill value buffer if not already initialized */
- if (!fb_info_init) {
- hsize_t chunk_dims[H5S_MAX_RANK];
-
- assert(di->dset->shared->ndims == di->dset->shared->layout.u.chunk.ndims - 1);
- for (size_t j = 0; j < di->dset->shared->layout.u.chunk.ndims - 1; j++)
- chunk_dims[j] = (hsize_t)di->dset->shared->layout.u.chunk.dim[j];
-
- /* Get a dataspace for filling chunk memory buffers */
- if (NULL == (fill_space = H5S_create_simple(di->dset->shared->layout.u.chunk.ndims - 1,
- chunk_dims, NULL)))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create chunk fill dataspace");
-
- /* Initialize fill value buffer */
- if (H5D__fill_init(
- &fb_info, NULL, (H5MM_allocate_t)H5D__chunk_mem_alloc,
- (void *)&di->dset->shared->dcpl_cache.pline, (H5MM_free_t)H5D__chunk_mem_free,
- (void *)&di->dset->shared->dcpl_cache.pline, &di->dset->shared->dcpl_cache.fill,
- di->dset->shared->type, di->dset->shared->type_id, 0, file_chunk_size) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize fill value buffer");
-
- fb_info_init = TRUE;
- }
+ /* Determine if fill values should be "read" for this unallocated chunk */
+ if (cached_dset_info->should_fill) {
+ assert(cached_dset_info->fb_info_init);
+ assert(cached_dset_info->fb_info.fill_buf);
/* Write fill value to memory buffer */
- assert(fb_info.fill_buf);
- if (H5D__fill(fb_info.fill_buf, di->dset->shared->type, chunk_entry->buf,
- di->type_info.mem_type, fill_space) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
- "couldn't fill chunk buffer with fill value");
+ if (H5D__fill(cached_dset_info->fb_info.fill_buf,
+ cached_dset_info->dset_io_info->type_info.dset_type, chunk_entry->buf,
+ cached_dset_info->dset_io_info->type_info.mem_type,
+ cached_dset_info->fill_space) < 0) {
+ if (chunk_list->all_dset_indices_empty)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
+ "couldn't fill chunk buffer with fill value");
+ else {
+ /* Push an error, but participate in collective read */
+ HDONE_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
+ "couldn't fill chunk buffer with fill value");
+ break;
+ }
+ }
}
}
}
- /*
- * If dataset is incrementally allocated and hasn't been written to
- * yet, the chunk index should be empty. In this case, a collective
- * read of chunks is essentially a no-op, so avoid it here.
- */
- index_empty = FALSE;
- if (di->dset->shared->dcpl_cache.fill.alloc_time == H5D_ALLOC_TIME_INCR)
- if (H5D__chunk_index_empty(di->dset, &index_empty) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "couldn't determine if chunk index is empty");
-
- if (!index_empty) {
- /* Perform collective vector read */
+ /* Perform collective vector read if necessary */
+ if (!chunk_list->all_dset_indices_empty)
if (H5D__mpio_collective_filtered_vec_io(chunk_list, io_info->f_sh, H5D_IO_OP_READ) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "couldn't perform vector I/O on filtered chunks");
+
+ if (chunk_list->num_chunk_infos) {
+ /* Retrieve filter settings from API context */
+ if (H5CX_get_err_detect(&err_detect) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get error detection info");
+ if (H5CX_get_filter_cb(&filter_cb) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get I/O filter callback function");
}
/*
* Iterate through all the read chunks, unfiltering them and scattering their
* data out to the application's read buffer.
*/
- for (size_t i = 0; i < chunk_list->num_chunk_infos; i++) {
- H5D_filtered_collective_chunk_info_t *chunk_entry = &chunk_list->chunk_infos[i];
+ for (size_t info_idx = 0; info_idx < chunk_list->num_chunk_infos; info_idx++) {
+ H5D_filtered_collective_chunk_info_t *chunk_entry = &chunk_list->chunk_infos[info_idx];
H5D_piece_info_t *chunk_info = chunk_entry->chunk_info;
+ hsize_t iter_nelmts;
/* Unfilter the chunk, unless we didn't read it from the file */
if (chunk_entry->need_read && !chunk_entry->skip_filter_pline) {
- if (H5Z_pipeline(&di->dset->shared->dcpl_cache.pline, H5Z_FLAG_REVERSE,
+ if (H5Z_pipeline(&chunk_info->dset_info->dset->shared->dcpl_cache.pline, H5Z_FLAG_REVERSE,
&(chunk_entry->index_info.filter_mask), err_detect, filter_cb,
(size_t *)&chunk_entry->chunk_new.length, &chunk_entry->chunk_buf_size,
&chunk_entry->buf) < 0)
@@ -4226,26 +4643,21 @@ H5D__mpio_collective_filtered_chunk_read(H5D_filtered_collective_io_info_t *chun
/* Scatter the chunk data to the read buffer */
iter_nelmts = H5S_GET_SELECT_NPOINTS(chunk_info->fspace);
- if (H5D_select_io_mem(di->buf.vp, chunk_info->mspace, chunk_entry->buf, chunk_info->fspace,
- di->type_info.src_type_size, (size_t)iter_nelmts) < 0)
+ if (H5D_select_io_mem(chunk_info->dset_info->buf.vp, chunk_info->mspace, chunk_entry->buf,
+ chunk_info->fspace, chunk_info->dset_info->type_info.src_type_size,
+ (size_t)iter_nelmts) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "couldn't copy chunk data to read buffer");
}
done:
/* Free all resources used by entries in the chunk list */
- for (size_t i = 0; i < chunk_list->num_chunk_infos; i++) {
- if (chunk_list->chunk_infos[i].buf) {
- H5MM_free(chunk_list->chunk_infos[i].buf);
- chunk_list->chunk_infos[i].buf = NULL;
+ for (size_t info_idx = 0; info_idx < chunk_list->num_chunk_infos; info_idx++) {
+ if (chunk_list->chunk_infos[info_idx].buf) {
+ H5MM_free(chunk_list->chunk_infos[info_idx].buf);
+ chunk_list->chunk_infos[info_idx].buf = NULL;
}
}
- /* Release the fill buffer info, if it's been initialized */
- if (fb_info_init && H5D__fill_term(&fb_info) < 0)
- HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release fill buffer info");
- if (fill_space && (H5S_close(fill_space) < 0))
- HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close fill space");
-
#ifdef H5Dmpio_DEBUG
H5D_MPIO_TIME_STOP(mpi_rank);
H5D_MPIO_TRACE_EXIT(mpi_rank);
@@ -4269,58 +4681,27 @@ H5D__mpio_collective_filtered_chunk_read(H5D_filtered_collective_io_info_t *chun
static herr_t
H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *chunk_list,
unsigned char **chunk_msg_bufs, int chunk_msg_bufs_len,
- const H5D_io_info_t *io_info, const H5D_dset_io_info_t *di,
- int H5_ATTR_NDEBUG_UNUSED mpi_rank)
+ const H5D_io_info_t *io_info, size_t num_dset_infos, int mpi_rank)
{
- const H5D_type_info_t *type_info = NULL;
- H5D_fill_buf_info_t fb_info;
- H5S_sel_iter_t *sel_iter = NULL; /* Dataspace selection iterator for H5D__scatter_mem */
- H5Z_EDC_t err_detect; /* Error detection info */
- H5Z_cb_t filter_cb; /* I/O filter callback function */
- hsize_t file_chunk_size = 0;
- hsize_t iter_nelmts; /* Number of points to iterate over for the chunk IO operation */
- hbool_t should_fill = FALSE;
- hbool_t fb_info_init = FALSE;
- hbool_t sel_iter_init = FALSE;
- hbool_t index_empty = FALSE;
- size_t i;
- H5S_t *dataspace = NULL;
- H5S_t *fill_space = NULL;
- void *base_read_buf = NULL;
- herr_t ret_value = SUCCEED;
+ H5S_sel_iter_t *sel_iter = NULL; /* Dataspace selection iterator for H5D__scatter_mem */
+ H5Z_EDC_t err_detect; /* Error detection info */
+ H5Z_cb_t filter_cb; /* I/O filter callback function */
+ uint8_t *key_buf = NULL;
+ H5S_t *dataspace = NULL;
+ bool sel_iter_init = false;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_PACKAGE
assert(chunk_list);
assert((chunk_msg_bufs && chunk_list->chunk_hash_table) || 0 == chunk_msg_bufs_len);
assert(io_info);
- assert(di);
#ifdef H5Dmpio_DEBUG
H5D_MPIO_TRACE_ENTER(mpi_rank);
H5D_MPIO_TIME_START(mpi_rank, "Filtered collective chunk update");
#endif
- /* Set convenience pointers */
- type_info = &(di->type_info);
- assert(type_info);
-
- if (chunk_list->num_chunk_infos > 0) {
- /* Retrieve filter settings from API context */
- if (H5CX_get_err_detect(&err_detect) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get error detection info");
- if (H5CX_get_filter_cb(&filter_cb) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get I/O filter callback function");
-
- /* Set size of full chunks in dataset */
- file_chunk_size = di->dset->shared->layout.u.chunk.size;
-
- /* Determine if fill values should be written to chunks */
- should_fill = (di->dset->shared->dcpl_cache.fill.fill_time == H5D_FILL_TIME_ALLOC) ||
- ((di->dset->shared->dcpl_cache.fill.fill_time == H5D_FILL_TIME_IFSET) &&
- di->dset->shared->dcpl_cache.fill.fill_defined);
- }
-
/*
* Allocate memory buffers for all owned chunks. Chunk data buffers are of the
* largest size between the chunk's current filtered size and the chunk's true
@@ -4340,11 +4721,33 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch
* size; reading into a (smaller) buffer of size equal to the unfiltered
* chunk size would of course be bad.
*/
- for (i = 0; i < chunk_list->num_chunk_infos; i++) {
- H5D_filtered_collective_chunk_info_t *chunk_entry = &chunk_list->chunk_infos[i];
+ for (size_t info_idx = 0; info_idx < chunk_list->num_chunk_infos; info_idx++) {
+ H5D_filtered_collective_chunk_info_t *chunk_entry = &chunk_list->chunk_infos[info_idx];
+ H5D_mpio_filtered_dset_info_t *cached_dset_info;
+ hsize_t file_chunk_size;
assert(mpi_rank == chunk_entry->new_owner);
+ /* Find the cached dataset info for the dataset this chunk is in */
+ if (num_dset_infos > 1) {
+ HASH_FIND(hh, chunk_list->dset_info.dset_info_hash_table, &chunk_entry->index_info.dset_oloc_addr,
+ sizeof(haddr_t), cached_dset_info);
+ if (cached_dset_info == NULL) {
+ if (chunk_list->all_dset_indices_empty)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTFIND, FAIL, "unable to find cached dataset info entry");
+ else {
+ /* Push an error, but participate in collective read */
+ HDONE_ERROR(H5E_DATASET, H5E_CANTFIND, FAIL, "unable to find cached dataset info entry");
+ break;
+ }
+ }
+ }
+ else
+ cached_dset_info = chunk_list->dset_info.single_dset_info;
+ assert(cached_dset_info);
+
+ file_chunk_size = cached_dset_info->file_chunk_size;
+
chunk_entry->chunk_buf_size = MAX(chunk_entry->chunk_current.length, file_chunk_size);
/*
@@ -4352,29 +4755,41 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch
* out fill values to it, make sure to 0-fill its memory buffer
* so we don't use uninitialized memory.
*/
- if (!H5_addr_defined(chunk_entry->chunk_current.offset) && !should_fill)
+ if (!H5_addr_defined(chunk_entry->chunk_current.offset) && !cached_dset_info->should_fill)
chunk_entry->buf = H5MM_calloc(chunk_entry->chunk_buf_size);
else
chunk_entry->buf = H5MM_malloc(chunk_entry->chunk_buf_size);
if (NULL == chunk_entry->buf) {
- /* Push an error, but participate in collective read */
- HDONE_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate chunk data buffer");
- break;
+ if (chunk_list->all_dset_indices_empty)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate chunk data buffer");
+ else {
+ /* Push an error, but participate in collective read */
+ HDONE_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate chunk data buffer");
+ break;
+ }
}
- /* Set chunk's new length for eventual filter pipeline calls */
- if (chunk_entry->need_read) {
+ if (!chunk_entry->need_read)
+ /* Set chunk's new length for eventual filter pipeline calls */
+ chunk_entry->chunk_new.length = file_chunk_size;
+ else {
/*
- * Check if chunk is currently allocated. If not, don't try to
- * read it from the file. Instead, just fill the chunk buffer
- * with the fill value if fill values are to be written.
+ * Check whether the chunk needs to be read from the file, based
+ * on whether the dataset's chunk index is empty or the chunk has
+ * a defined address in the file. If the chunk doesn't need to be
+ * read from the file, just fill the chunk buffer with the fill
+ * value if necessary.
*/
- if (H5_addr_defined(chunk_entry->chunk_current.offset)) {
- /* Set first read buffer */
- if (!base_read_buf)
- base_read_buf = chunk_entry->buf;
+ if (cached_dset_info->index_empty || !H5_addr_defined(chunk_entry->chunk_current.offset)) {
+ chunk_entry->need_read = false;
+ /* Update field keeping track of number of chunks to read */
+ assert(chunk_list->num_chunks_to_read > 0);
+ chunk_list->num_chunks_to_read--;
+ }
+
+ if (chunk_entry->need_read) {
/* Set chunk's new length for eventual filter pipeline calls */
if (chunk_entry->skip_filter_pline)
chunk_entry->chunk_new.length = file_chunk_size;
@@ -4382,81 +4797,57 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch
chunk_entry->chunk_new.length = chunk_entry->chunk_current.length;
}
else {
- chunk_entry->need_read = FALSE;
-
- /* Update field keeping track of number of chunks to read */
- assert(chunk_list->num_chunks_to_read > 0);
- chunk_list->num_chunks_to_read--;
-
/* Set chunk's new length for eventual filter pipeline calls */
chunk_entry->chunk_new.length = file_chunk_size;
- if (should_fill) {
- /* Initialize fill value buffer if not already initialized */
- if (!fb_info_init) {
- hsize_t chunk_dims[H5S_MAX_RANK];
-
- assert(di->dset->shared->ndims == di->dset->shared->layout.u.chunk.ndims - 1);
- for (size_t j = 0; j < di->dset->shared->layout.u.chunk.ndims - 1; j++)
- chunk_dims[j] = (hsize_t)di->dset->shared->layout.u.chunk.dim[j];
+ /* Determine if fill values should be "read" for this unallocated chunk */
+ if (cached_dset_info->should_fill) {
+ assert(cached_dset_info->fb_info_init);
+ assert(cached_dset_info->fb_info.fill_buf);
- /* Get a dataspace for filling chunk memory buffers */
- if (NULL == (fill_space = H5S_create_simple(
- di->dset->shared->layout.u.chunk.ndims - 1, chunk_dims, NULL)))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
- "unable to create chunk fill dataspace");
-
- /* Initialize fill value buffer */
- if (H5D__fill_init(&fb_info, NULL, (H5MM_allocate_t)H5D__chunk_mem_alloc,
- (void *)&di->dset->shared->dcpl_cache.pline,
- (H5MM_free_t)H5D__chunk_mem_free,
- (void *)&di->dset->shared->dcpl_cache.pline,
- &di->dset->shared->dcpl_cache.fill, di->dset->shared->type,
- di->dset->shared->type_id, 0, file_chunk_size) < 0)
+ /* Write fill value to memory buffer */
+ if (H5D__fill(cached_dset_info->fb_info.fill_buf,
+ cached_dset_info->dset_io_info->type_info.dset_type, chunk_entry->buf,
+ cached_dset_info->dset_io_info->type_info.mem_type,
+ cached_dset_info->fill_space) < 0) {
+ if (chunk_list->all_dset_indices_empty)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
- "can't initialize fill value buffer");
-
- fb_info_init = TRUE;
+ "couldn't fill chunk buffer with fill value");
+ else {
+ /* Push an error, but participate in collective read */
+ HDONE_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
+ "couldn't fill chunk buffer with fill value");
+ break;
+ }
}
-
- /* Write fill value to memory buffer */
- assert(fb_info.fill_buf);
- if (H5D__fill(fb_info.fill_buf, di->dset->shared->type, chunk_entry->buf,
- type_info->mem_type, fill_space) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
- "couldn't fill chunk buffer with fill value");
}
}
}
- else
- chunk_entry->chunk_new.length = file_chunk_size;
}
- /*
- * If dataset is incrementally allocated and hasn't been written to
- * yet, the chunk index should be empty. In this case, a collective
- * read of chunks is essentially a no-op, so avoid it here.
- */
- index_empty = FALSE;
- if (di->dset->shared->dcpl_cache.fill.alloc_time == H5D_ALLOC_TIME_INCR)
- if (H5D__chunk_index_empty(di->dset, &index_empty) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "couldn't determine if chunk index is empty");
-
- if (!index_empty) {
- /* Perform collective vector read */
+ /* Perform collective vector read if necessary */
+ if (!chunk_list->all_dset_indices_empty)
if (H5D__mpio_collective_filtered_vec_io(chunk_list, io_info->f_sh, H5D_IO_OP_READ) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "couldn't perform vector I/O on filtered chunks");
- }
/*
* Now that all owned chunks have been read, update the chunks
* with modification data from the owning rank and other ranks.
*/
+ if (chunk_list->num_chunk_infos > 0) {
+ /* Retrieve filter settings from API context */
+ if (H5CX_get_err_detect(&err_detect) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get error detection info");
+ if (H5CX_get_filter_cb(&filter_cb) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get I/O filter callback function");
+ }
+
/* Process all chunks with data from the owning rank first */
- for (i = 0; i < chunk_list->num_chunk_infos; i++) {
- H5D_filtered_collective_chunk_info_t *chunk_entry = &chunk_list->chunk_infos[i];
+ for (size_t info_idx = 0; info_idx < chunk_list->num_chunk_infos; info_idx++) {
+ H5D_filtered_collective_chunk_info_t *chunk_entry = &chunk_list->chunk_infos[info_idx];
H5D_piece_info_t *chunk_info = chunk_entry->chunk_info;
+ hsize_t iter_nelmts;
assert(mpi_rank == chunk_entry->new_owner);
@@ -4465,7 +4856,7 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch
* the file, so we need to unfilter it
*/
if (chunk_entry->need_read && !chunk_entry->skip_filter_pline) {
- if (H5Z_pipeline(&di->dset->shared->dcpl_cache.pline, H5Z_FLAG_REVERSE,
+ if (H5Z_pipeline(&chunk_info->dset_info->dset->shared->dcpl_cache.pline, H5Z_FLAG_REVERSE,
&(chunk_entry->index_info.filter_mask), err_detect, filter_cb,
(size_t *)&chunk_entry->chunk_new.length, &chunk_entry->chunk_buf_size,
&chunk_entry->buf) < 0)
@@ -4474,28 +4865,35 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch
iter_nelmts = H5S_GET_SELECT_NPOINTS(chunk_info->mspace);
- if (H5D_select_io_mem(chunk_entry->buf, chunk_info->fspace, di->buf.cvp, chunk_info->mspace,
- type_info->dst_type_size, (size_t)iter_nelmts) < 0)
+ if (H5D_select_io_mem(chunk_entry->buf, chunk_info->fspace, chunk_info->dset_info->buf.cvp,
+ chunk_info->mspace, chunk_info->dset_info->type_info.dst_type_size,
+ (size_t)iter_nelmts) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "couldn't copy chunk data to write buffer");
}
/* Allocate iterator for memory selection */
- if (NULL == (sel_iter = H5FL_MALLOC(H5S_sel_iter_t)))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate memory iterator");
+ if (chunk_msg_bufs_len > 0) {
+ assert(chunk_list->chunk_hash_table_keylen > 0);
+ if (NULL == (key_buf = H5MM_malloc(chunk_list->chunk_hash_table_keylen)))
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate hash table key buffer");
+
+ if (NULL == (sel_iter = H5FL_MALLOC(H5S_sel_iter_t)))
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate memory iterator");
+ }
/* Now process all received chunk message buffers */
- for (i = 0; i < (size_t)chunk_msg_bufs_len; i++) {
+ for (size_t buf_idx = 0; buf_idx < (size_t)chunk_msg_bufs_len; buf_idx++) {
H5D_filtered_collective_chunk_info_t *chunk_entry = NULL;
- const unsigned char *msg_ptr = chunk_msg_bufs[i];
- hsize_t chunk_idx;
+ const unsigned char *msg_ptr = chunk_msg_bufs[buf_idx];
if (msg_ptr) {
- /* Retrieve the chunk's index value */
- memcpy(&chunk_idx, msg_ptr, sizeof(hsize_t));
- msg_ptr += sizeof(hsize_t);
+ /* Retrieve the chunk hash table key from the chunk message buffer */
+ H5MM_memcpy(key_buf, msg_ptr, chunk_list->chunk_hash_table_keylen);
+ msg_ptr += chunk_list->chunk_hash_table_keylen;
- /* Find the chunk entry according to its chunk index */
- HASH_FIND(hh, chunk_list->chunk_hash_table, &chunk_idx, sizeof(hsize_t), chunk_entry);
+ /* Find the chunk entry according to its chunk hash table key */
+ HASH_FIND(hh, chunk_list->chunk_hash_table, key_buf, chunk_list->chunk_hash_table_keylen,
+ chunk_entry);
if (chunk_entry == NULL)
HGOTO_ERROR(H5E_DATASET, H5E_CANTFIND, FAIL, "unable to find chunk entry");
if (mpi_rank != chunk_entry->new_owner)
@@ -4510,15 +4908,18 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch
if (!chunk_entry->buf)
continue;
else {
+ hsize_t iter_nelmts;
+
/* Decode the chunk file dataspace from the message */
if (NULL == (dataspace = H5S_decode(&msg_ptr)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTDECODE, FAIL, "unable to decode dataspace");
- if (H5S_select_iter_init(sel_iter, dataspace, type_info->dst_type_size,
+ if (H5S_select_iter_init(sel_iter, dataspace,
+ chunk_entry->chunk_info->dset_info->type_info.dst_type_size,
H5S_SEL_ITER_SHARE_WITH_DATASPACE) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
"unable to initialize memory selection information");
- sel_iter_init = TRUE;
+ sel_iter_init = true;
iter_nelmts = H5S_GET_SELECT_NPOINTS(dataspace);
@@ -4528,7 +4929,7 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch
if (H5S_SELECT_ITER_RELEASE(sel_iter) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "couldn't release selection iterator");
- sel_iter_init = FALSE;
+ sel_iter_init = false;
if (dataspace) {
if (H5S_close(dataspace) < 0)
@@ -4536,50 +4937,49 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch
dataspace = NULL;
}
- H5MM_free(chunk_msg_bufs[i]);
- chunk_msg_bufs[i] = NULL;
+ H5MM_free(chunk_msg_bufs[buf_idx]);
+ chunk_msg_bufs[buf_idx] = NULL;
}
}
}
/* Finally, filter all the chunks */
- for (i = 0; i < chunk_list->num_chunk_infos; i++) {
- if (!chunk_list->chunk_infos[i].skip_filter_pline) {
- if (H5Z_pipeline(&di->dset->shared->dcpl_cache.pline, 0,
- &(chunk_list->chunk_infos[i].index_info.filter_mask), err_detect, filter_cb,
- (size_t *)&chunk_list->chunk_infos[i].chunk_new.length,
- &chunk_list->chunk_infos[i].chunk_buf_size, &chunk_list->chunk_infos[i].buf) < 0)
+ for (size_t info_idx = 0; info_idx < chunk_list->num_chunk_infos; info_idx++) {
+ if (!chunk_list->chunk_infos[info_idx].skip_filter_pline) {
+ if (H5Z_pipeline(
+ &chunk_list->chunk_infos[info_idx].chunk_info->dset_info->dset->shared->dcpl_cache.pline,
+ 0, &(chunk_list->chunk_infos[info_idx].index_info.filter_mask), err_detect, filter_cb,
+ (size_t *)&chunk_list->chunk_infos[info_idx].chunk_new.length,
+ &chunk_list->chunk_infos[info_idx].chunk_buf_size,
+ &chunk_list->chunk_infos[info_idx].buf) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_CANTFILTER, FAIL, "output pipeline failed");
}
#if H5_SIZEOF_SIZE_T > 4
/* Check for the chunk expanding too much to encode in a 32-bit value */
- if (chunk_list->chunk_infos[i].chunk_new.length > ((size_t)0xffffffff))
+ if (chunk_list->chunk_infos[info_idx].chunk_new.length > ((size_t)0xffffffff))
HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, FAIL, "chunk too large for 32-bit length");
#endif
}
done:
+ if (dataspace && (H5S_close(dataspace) < 0))
+ HDONE_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "can't close dataspace");
+
if (sel_iter) {
if (sel_iter_init && H5S_SELECT_ITER_RELEASE(sel_iter) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "couldn't release selection iterator");
sel_iter = H5FL_FREE(H5S_sel_iter_t, sel_iter);
}
- if (dataspace && (H5S_close(dataspace) < 0))
- HDONE_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "can't close dataspace");
- if (fill_space && (H5S_close(fill_space) < 0))
- HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close fill space");
- /* Release the fill buffer info, if it's been initialized */
- if (fb_info_init && H5D__fill_term(&fb_info) < 0)
- HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release fill buffer info");
+ H5MM_free(key_buf);
/* On failure, try to free all resources used by entries in the chunk list */
if (ret_value < 0) {
- for (i = 0; i < chunk_list->num_chunk_infos; i++) {
- if (chunk_list->chunk_infos[i].buf) {
- H5MM_free(chunk_list->chunk_infos[i].buf);
- chunk_list->chunk_infos[i].buf = NULL;
+ for (size_t info_idx = 0; info_idx < chunk_list->num_chunk_infos; info_idx++) {
+ if (chunk_list->chunk_infos[info_idx].buf) {
+ H5MM_free(chunk_list->chunk_infos[info_idx].buf);
+ chunk_list->chunk_infos[info_idx].buf = NULL;
}
}
}
@@ -4608,21 +5008,20 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch
static herr_t
H5D__mpio_collective_filtered_chunk_reallocate(H5D_filtered_collective_io_info_t *chunk_list,
size_t *num_chunks_assigned_map, H5D_io_info_t *io_info,
- H5D_chk_idx_info_t *idx_info, int mpi_rank, int mpi_size)
+ size_t num_dset_infos, int mpi_rank, int mpi_size)
{
H5D_chunk_alloc_info_t *collective_list = NULL;
MPI_Datatype send_type;
MPI_Datatype recv_type;
- hbool_t send_type_derived = FALSE;
- hbool_t recv_type_derived = FALSE;
- hbool_t need_sort = FALSE;
+ bool send_type_derived = false;
+ bool recv_type_derived = false;
+ bool need_sort = false;
size_t collective_num_entries = 0;
size_t num_local_chunks_processed = 0;
- size_t i;
- void *gathered_array = NULL;
- int *counts_disps_array = NULL;
- int *counts_ptr = NULL;
- int *displacements_ptr = NULL;
+ void *gathered_array = NULL;
+ int *counts_disps_array = NULL;
+ int *counts_ptr = NULL;
+ int *displacements_ptr = NULL;
int mpi_code;
herr_t ret_value = SUCCEED;
@@ -4630,8 +5029,6 @@ H5D__mpio_collective_filtered_chunk_reallocate(H5D_filtered_collective_io_info_t
assert(chunk_list);
assert(io_info);
- assert(idx_info);
- assert(idx_info->storage->idx_type != H5D_CHUNK_IDX_NONE);
#ifdef H5Dmpio_DEBUG
H5D_MPIO_TRACE_ENTER(mpi_rank);
@@ -4670,20 +5067,20 @@ H5D__mpio_collective_filtered_chunk_reallocate(H5D_filtered_collective_io_info_t
/* Set the receive counts from the assigned chunks map */
counts_ptr = counts_disps_array;
- for (i = 0; i < (size_t)mpi_size; i++)
- H5_CHECKED_ASSIGN(counts_ptr[i], int, num_chunks_assigned_map[i], size_t);
+ for (int curr_rank = 0; curr_rank < mpi_size; curr_rank++)
+ H5_CHECKED_ASSIGN(counts_ptr[curr_rank], int, num_chunks_assigned_map[curr_rank], size_t);
/* Set the displacements into the receive buffer for the gather operation */
displacements_ptr = &counts_disps_array[mpi_size];
*displacements_ptr = 0;
- for (i = 1; i < (size_t)mpi_size; i++)
- displacements_ptr[i] = displacements_ptr[i - 1] + counts_ptr[i - 1];
+ for (int curr_rank = 1; curr_rank < mpi_size; curr_rank++)
+ displacements_ptr[curr_rank] = displacements_ptr[curr_rank - 1] + counts_ptr[curr_rank - 1];
}
/* Perform gather operation */
if (H5_mpio_gatherv_alloc(chunk_list->chunk_infos, (int)chunk_list->num_chunk_infos, send_type,
- counts_ptr, displacements_ptr, recv_type, TRUE, 0, io_info->comm, mpi_rank,
+ counts_ptr, displacements_ptr, recv_type, true, 0, io_info->comm, mpi_rank,
mpi_size, &gathered_array, &collective_num_entries) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGATHER, FAIL,
"can't gather chunk file space info to/from ranks");
@@ -4697,21 +5094,34 @@ H5D__mpio_collective_filtered_chunk_reallocate(H5D_filtered_collective_io_info_t
* the 'simple' MPI_Allgatherv wrapper for this.
*/
if (H5_mpio_gatherv_alloc_simple(chunk_list->chunk_infos, (int)chunk_list->num_chunk_infos, send_type,
- recv_type, TRUE, 0, io_info->comm, mpi_rank, mpi_size,
+ recv_type, true, 0, io_info->comm, mpi_rank, mpi_size,
&gathered_array, &collective_num_entries) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGATHER, FAIL,
"can't gather chunk file space info to/from ranks");
}
/* Collectively re-allocate the modified chunks (from each rank) in the file */
- collective_list = (H5D_chunk_alloc_info_t *)gathered_array;
- for (i = 0, num_local_chunks_processed = 0; i < collective_num_entries; i++) {
- H5D_chunk_alloc_info_t *coll_entry = &collective_list[i];
- hbool_t need_insert;
- hbool_t update_local_chunk;
-
- if (H5D__chunk_file_alloc(idx_info, &coll_entry->chunk_current, &coll_entry->chunk_new, &need_insert,
- NULL) < 0)
+ collective_list = (H5D_chunk_alloc_info_t *)gathered_array;
+ num_local_chunks_processed = 0;
+ for (size_t entry_idx = 0; entry_idx < collective_num_entries; entry_idx++) {
+ H5D_mpio_filtered_dset_info_t *cached_dset_info;
+ H5D_chunk_alloc_info_t *coll_entry = &collective_list[entry_idx];
+ bool need_insert;
+ bool update_local_chunk;
+
+ /* Find the cached dataset info for the dataset this chunk is in */
+ if (num_dset_infos > 1) {
+ HASH_FIND(hh, chunk_list->dset_info.dset_info_hash_table, &coll_entry->dset_oloc_addr,
+ sizeof(haddr_t), cached_dset_info);
+ if (cached_dset_info == NULL)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTFIND, FAIL, "unable to find cached dataset info entry");
+ }
+ else
+ cached_dset_info = chunk_list->dset_info.single_dset_info;
+ assert(cached_dset_info);
+
+ if (H5D__chunk_file_alloc(&cached_dset_info->chunk_idx_info, &coll_entry->chunk_current,
+ &coll_entry->chunk_new, &need_insert, NULL) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "unable to allocate chunk");
/*
@@ -4719,9 +5129,12 @@ H5D__mpio_collective_filtered_chunk_reallocate(H5D_filtered_collective_io_info_t
* rank, make sure to update the chunk entry in the local
* chunk list
*/
- update_local_chunk = (num_local_chunks_processed < chunk_list->num_chunk_infos) &&
- (coll_entry->chunk_idx ==
- chunk_list->chunk_infos[num_local_chunks_processed].index_info.chunk_idx);
+ update_local_chunk =
+ (num_local_chunks_processed < chunk_list->num_chunk_infos) &&
+ (coll_entry->dset_oloc_addr ==
+ chunk_list->chunk_infos[num_local_chunks_processed].index_info.dset_oloc_addr) &&
+ (coll_entry->chunk_idx ==
+ chunk_list->chunk_infos[num_local_chunks_processed].index_info.chunk_idx);
if (update_local_chunk) {
H5D_filtered_collective_chunk_info_t *local_chunk;
@@ -4747,7 +5160,7 @@ H5D__mpio_collective_filtered_chunk_reallocate(H5D_filtered_collective_io_info_t
assert(H5_addr_defined(prev_chunk_offset) && H5_addr_defined(curr_chunk_offset));
if (curr_chunk_offset < prev_chunk_offset)
- need_sort = TRUE;
+ need_sort = true;
}
num_local_chunks_processed++;
@@ -4801,38 +5214,35 @@ H5D__mpio_collective_filtered_chunk_reallocate(H5D_filtered_collective_io_info_t
static herr_t
H5D__mpio_collective_filtered_chunk_reinsert(H5D_filtered_collective_io_info_t *chunk_list,
size_t *num_chunks_assigned_map, H5D_io_info_t *io_info,
- H5D_dset_io_info_t *di, H5D_chk_idx_info_t *idx_info,
- int mpi_rank, int mpi_size)
+ size_t num_dset_infos, int mpi_rank, int mpi_size)
{
- H5D_chunk_ud_t chunk_ud;
- MPI_Datatype send_type;
- MPI_Datatype recv_type;
- hbool_t send_type_derived = FALSE;
- hbool_t recv_type_derived = FALSE;
- hsize_t scaled_coords[H5O_LAYOUT_NDIMS];
- size_t collective_num_entries = 0;
- size_t i;
- void *gathered_array = NULL;
- int *counts_disps_array = NULL;
- int *counts_ptr = NULL;
- int *displacements_ptr = NULL;
- int mpi_code;
- herr_t ret_value = SUCCEED;
+ MPI_Datatype send_type;
+ MPI_Datatype recv_type;
+ size_t collective_num_entries = 0;
+ bool send_type_derived = false;
+ bool recv_type_derived = false;
+ void *gathered_array = NULL;
+ int *counts_disps_array = NULL;
+ int *counts_ptr = NULL;
+ int *displacements_ptr = NULL;
+ int mpi_code;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_PACKAGE
assert(chunk_list);
assert(io_info);
- assert(di);
- assert(idx_info);
#ifdef H5Dmpio_DEBUG
H5D_MPIO_TRACE_ENTER(mpi_rank);
H5D_MPIO_TIME_START(mpi_rank, "Reinsertion of modified chunks into chunk index");
#endif
- /* Only re-insert chunks if index has an insert method */
- if (!idx_info->storage->ops->insert)
+ /*
+ * If no datasets involved have a chunk index 'insert'
+ * operation, this function is a no-op
+ */
+ if (chunk_list->no_dset_index_insert_methods)
HGOTO_DONE(SUCCEED);
/*
@@ -4867,20 +5277,20 @@ H5D__mpio_collective_filtered_chunk_reinsert(H5D_filtered_collective_io_info_t *
/* Set the receive counts from the assigned chunks map */
counts_ptr = counts_disps_array;
- for (i = 0; i < (size_t)mpi_size; i++)
- H5_CHECKED_ASSIGN(counts_ptr[i], int, num_chunks_assigned_map[i], size_t);
+ for (int curr_rank = 0; curr_rank < mpi_size; curr_rank++)
+ H5_CHECKED_ASSIGN(counts_ptr[curr_rank], int, num_chunks_assigned_map[curr_rank], size_t);
/* Set the displacements into the receive buffer for the gather operation */
displacements_ptr = &counts_disps_array[mpi_size];
*displacements_ptr = 0;
- for (i = 1; i < (size_t)mpi_size; i++)
- displacements_ptr[i] = displacements_ptr[i - 1] + counts_ptr[i - 1];
+ for (int curr_rank = 1; curr_rank < mpi_size; curr_rank++)
+ displacements_ptr[curr_rank] = displacements_ptr[curr_rank - 1] + counts_ptr[curr_rank - 1];
}
/* Perform gather operation */
if (H5_mpio_gatherv_alloc(chunk_list->chunk_infos, (int)chunk_list->num_chunk_infos, send_type,
- counts_ptr, displacements_ptr, recv_type, TRUE, 0, io_info->comm, mpi_rank,
+ counts_ptr, displacements_ptr, recv_type, true, 0, io_info->comm, mpi_rank,
mpi_size, &gathered_array, &collective_num_entries) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGATHER, FAIL,
"can't gather chunk index re-insertion info to/from ranks");
@@ -4894,17 +5304,18 @@ H5D__mpio_collective_filtered_chunk_reinsert(H5D_filtered_collective_io_info_t *
* the 'simple' MPI_Allgatherv wrapper for this.
*/
if (H5_mpio_gatherv_alloc_simple(chunk_list->chunk_infos, (int)chunk_list->num_chunk_infos, send_type,
- recv_type, TRUE, 0, io_info->comm, mpi_rank, mpi_size,
+ recv_type, true, 0, io_info->comm, mpi_rank, mpi_size,
&gathered_array, &collective_num_entries) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGATHER, FAIL,
"can't gather chunk index re-insertion info to/from ranks");
}
- /* Initialize static chunk udata fields from chunk index info */
- H5D_MPIO_INIT_CHUNK_UD_INFO(chunk_ud, idx_info);
-
- for (i = 0; i < collective_num_entries; i++) {
- H5D_chunk_insert_info_t *coll_entry = &((H5D_chunk_insert_info_t *)gathered_array)[i];
+ for (size_t entry_idx = 0; entry_idx < collective_num_entries; entry_idx++) {
+ H5D_mpio_filtered_dset_info_t *cached_dset_info;
+ H5D_chunk_insert_info_t *coll_entry = &((H5D_chunk_insert_info_t *)gathered_array)[entry_idx];
+ H5D_chunk_ud_t chunk_ud;
+ haddr_t prev_tag = HADDR_UNDEF;
+ hsize_t scaled_coords[H5O_LAYOUT_NDIMS];
/*
* We only need to reinsert this chunk if we had to actually
@@ -4913,13 +5324,28 @@ H5D__mpio_collective_filtered_chunk_reinsert(H5D_filtered_collective_io_info_t *
if (!coll_entry->index_info.need_insert)
continue;
- chunk_ud.chunk_block = coll_entry->chunk_block;
- chunk_ud.chunk_idx = coll_entry->index_info.chunk_idx;
- chunk_ud.filter_mask = coll_entry->index_info.filter_mask;
- chunk_ud.common.scaled = scaled_coords;
+ /* Find the cached dataset info for the dataset this chunk is in */
+ if (num_dset_infos > 1) {
+ HASH_FIND(hh, chunk_list->dset_info.dset_info_hash_table, &coll_entry->index_info.dset_oloc_addr,
+ sizeof(haddr_t), cached_dset_info);
+ if (cached_dset_info == NULL)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTFIND, FAIL, "unable to find cached dataset info entry");
+ }
+ else
+ cached_dset_info = chunk_list->dset_info.single_dset_info;
+ assert(cached_dset_info);
+
+ chunk_ud.common.layout = cached_dset_info->chunk_idx_info.layout;
+ chunk_ud.common.storage = cached_dset_info->chunk_idx_info.storage;
+ chunk_ud.common.scaled = scaled_coords;
+
+ chunk_ud.chunk_block = coll_entry->chunk_block;
+ chunk_ud.chunk_idx = coll_entry->index_info.chunk_idx;
+ chunk_ud.filter_mask = coll_entry->index_info.filter_mask;
/* Calculate scaled coordinates for the chunk */
- if (idx_info->layout->idx_type == H5D_CHUNK_IDX_EARRAY && idx_info->layout->u.earray.unlim_dim > 0) {
+ if (cached_dset_info->chunk_idx_info.layout->idx_type == H5D_CHUNK_IDX_EARRAY &&
+ cached_dset_info->chunk_idx_info.layout->u.earray.unlim_dim > 0) {
/*
* Extensible arrays where the unlimited dimension is not
* the slowest-changing dimension "swizzle" the coordinates
@@ -4933,17 +5359,20 @@ H5D__mpio_collective_filtered_chunk_reinsert(H5D_filtered_collective_io_info_t *
* callback that accepts a chunk index and provides the
* caller with the scaled coordinates for that chunk.
*/
- H5VM_array_calc_pre(chunk_ud.chunk_idx, di->dset->shared->ndims,
- idx_info->layout->u.earray.swizzled_down_chunks, scaled_coords);
+ H5VM_array_calc_pre(chunk_ud.chunk_idx, cached_dset_info->dset_io_info->dset->shared->ndims,
+ cached_dset_info->chunk_idx_info.layout->u.earray.swizzled_down_chunks,
+ scaled_coords);
- H5VM_unswizzle_coords(hsize_t, scaled_coords, idx_info->layout->u.earray.unlim_dim);
+ H5VM_unswizzle_coords(hsize_t, scaled_coords,
+ cached_dset_info->chunk_idx_info.layout->u.earray.unlim_dim);
}
else {
- H5VM_array_calc_pre(chunk_ud.chunk_idx, di->dset->shared->ndims,
- di->dset->shared->layout.u.chunk.down_chunks, scaled_coords);
+ H5VM_array_calc_pre(chunk_ud.chunk_idx, cached_dset_info->dset_io_info->dset->shared->ndims,
+ cached_dset_info->dset_io_info->dset->shared->layout.u.chunk.down_chunks,
+ scaled_coords);
}
- scaled_coords[di->dset->shared->ndims] = 0;
+ scaled_coords[cached_dset_info->dset_io_info->dset->shared->ndims] = 0;
#ifndef NDEBUG
/*
@@ -4955,10 +5384,18 @@ H5D__mpio_collective_filtered_chunk_reinsert(H5D_filtered_collective_io_info_t *
* they match.
*/
for (size_t dbg_idx = 0; dbg_idx < chunk_list->num_chunk_infos; dbg_idx++) {
- if (coll_entry->index_info.chunk_idx == chunk_list->chunk_infos[dbg_idx].index_info.chunk_idx) {
- hbool_t coords_match =
+ bool same_chunk;
+
+ /* Chunks must have the same index and reside in the same dataset */
+ same_chunk = (0 == H5_addr_cmp(coll_entry->index_info.dset_oloc_addr,
+ chunk_list->chunk_infos[dbg_idx].index_info.dset_oloc_addr));
+ same_chunk = same_chunk && (coll_entry->index_info.chunk_idx ==
+ chunk_list->chunk_infos[dbg_idx].index_info.chunk_idx);
+
+ if (same_chunk) {
+ bool coords_match =
!memcmp(scaled_coords, chunk_list->chunk_infos[dbg_idx].chunk_info->scaled,
- di->dset->shared->ndims * sizeof(hsize_t));
+ cached_dset_info->dset_io_info->dset->shared->ndims * sizeof(hsize_t));
assert(coords_match && "Calculated scaled coordinates for chunk didn't match "
"chunk's actual scaled coordinates!");
@@ -4967,8 +5404,15 @@ H5D__mpio_collective_filtered_chunk_reinsert(H5D_filtered_collective_io_info_t *
}
#endif
- if ((idx_info->storage->ops->insert)(idx_info, &chunk_ud, di->dset) < 0)
+ /* Set metadata tagging with dataset oheader addr */
+ H5AC_tag(cached_dset_info->dset_io_info->dset->oloc.addr, &prev_tag);
+
+ if ((cached_dset_info->chunk_idx_info.storage->ops->insert)(
+ &cached_dset_info->chunk_idx_info, &chunk_ud, cached_dset_info->dset_io_info->dset) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert chunk address into index");
+
+ /* Reset metadata tagging */
+ H5AC_tag(prev_tag, NULL);
}
done:
@@ -5017,16 +5461,16 @@ H5D__mpio_collective_filtered_chunk_reinsert(H5D_filtered_collective_io_info_t *
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__mpio_get_chunk_redistribute_info_types(MPI_Datatype *contig_type, hbool_t *contig_type_derived,
- MPI_Datatype *resized_type, hbool_t *resized_type_derived)
+H5D__mpio_get_chunk_redistribute_info_types(MPI_Datatype *contig_type, bool *contig_type_derived,
+ MPI_Datatype *resized_type, bool *resized_type_derived)
{
MPI_Datatype struct_type = MPI_DATATYPE_NULL;
- hbool_t struct_type_derived = FALSE;
+ bool struct_type_derived = false;
MPI_Datatype chunk_block_type = MPI_DATATYPE_NULL;
- hbool_t chunk_block_type_derived = FALSE;
- MPI_Datatype types[5];
- MPI_Aint displacements[5];
- int block_lengths[5];
+ bool chunk_block_type_derived = false;
+ MPI_Datatype types[6];
+ MPI_Aint displacements[6];
+ int block_lengths[6];
int field_count;
int mpi_code;
herr_t ret_value = SUCCEED;
@@ -5038,72 +5482,78 @@ H5D__mpio_get_chunk_redistribute_info_types(MPI_Datatype *contig_type, hbool_t *
assert(resized_type);
assert(resized_type_derived);
- *contig_type_derived = FALSE;
- *resized_type_derived = FALSE;
+ *contig_type_derived = false;
+ *resized_type_derived = false;
/* Create struct type for the inner H5F_block_t structure */
- if (H5F_mpi_get_file_block_type(FALSE, &chunk_block_type, &chunk_block_type_derived) < 0)
+ if (H5F_mpi_get_file_block_type(false, &chunk_block_type, &chunk_block_type_derived) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't create derived type for chunk file description");
- field_count = 5;
+ field_count = 6;
assert(field_count == (sizeof(types) / sizeof(MPI_Datatype)));
/*
* Create structure type to pack chunk H5F_block_t structure
- * next to chunk_idx, orig_owner, new_owner and num_writers
- * fields
+ * next to chunk_idx, dset_oloc_addr, orig_owner, new_owner
+ * and num_writers fields
*/
block_lengths[0] = 1;
block_lengths[1] = 1;
block_lengths[2] = 1;
block_lengths[3] = 1;
block_lengths[4] = 1;
+ block_lengths[5] = 1;
displacements[0] = offsetof(H5D_chunk_redistribute_info_t, chunk_block);
displacements[1] = offsetof(H5D_chunk_redistribute_info_t, chunk_idx);
- displacements[2] = offsetof(H5D_chunk_redistribute_info_t, orig_owner);
- displacements[3] = offsetof(H5D_chunk_redistribute_info_t, new_owner);
- displacements[4] = offsetof(H5D_chunk_redistribute_info_t, num_writers);
+ displacements[2] = offsetof(H5D_chunk_redistribute_info_t, dset_oloc_addr);
+ displacements[3] = offsetof(H5D_chunk_redistribute_info_t, orig_owner);
+ displacements[4] = offsetof(H5D_chunk_redistribute_info_t, new_owner);
+ displacements[5] = offsetof(H5D_chunk_redistribute_info_t, num_writers);
types[0] = chunk_block_type;
types[1] = HSIZE_AS_MPI_TYPE;
- types[2] = MPI_INT;
+ types[2] = HADDR_AS_MPI_TYPE;
types[3] = MPI_INT;
types[4] = MPI_INT;
+ types[5] = MPI_INT;
if (MPI_SUCCESS !=
(mpi_code = MPI_Type_create_struct(field_count, block_lengths, displacements, types, contig_type)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_struct failed", mpi_code)
- *contig_type_derived = TRUE;
+ *contig_type_derived = true;
if (MPI_SUCCESS != (mpi_code = MPI_Type_commit(contig_type)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_commit failed", mpi_code)
- /* Create struct type to extract the chunk_current, chunk_idx, orig_owner,
- * new_owner and num_writers fields from a H5D_filtered_collective_chunk_info_t
- * structure
+ /* Create struct type to extract the chunk_current, chunk_idx,
+ * dset_oloc_addr, orig_owner, new_owner and num_writers fields
+ * from a H5D_filtered_collective_chunk_info_t structure
*/
block_lengths[0] = 1;
block_lengths[1] = 1;
block_lengths[2] = 1;
block_lengths[3] = 1;
block_lengths[4] = 1;
+ block_lengths[5] = 1;
displacements[0] = offsetof(H5D_filtered_collective_chunk_info_t, chunk_current);
displacements[1] = offsetof(H5D_filtered_collective_chunk_info_t, index_info.chunk_idx);
- displacements[2] = offsetof(H5D_filtered_collective_chunk_info_t, orig_owner);
- displacements[3] = offsetof(H5D_filtered_collective_chunk_info_t, new_owner);
- displacements[4] = offsetof(H5D_filtered_collective_chunk_info_t, num_writers);
+ displacements[2] = offsetof(H5D_filtered_collective_chunk_info_t, index_info.dset_oloc_addr);
+ displacements[3] = offsetof(H5D_filtered_collective_chunk_info_t, orig_owner);
+ displacements[4] = offsetof(H5D_filtered_collective_chunk_info_t, new_owner);
+ displacements[5] = offsetof(H5D_filtered_collective_chunk_info_t, num_writers);
types[0] = chunk_block_type;
types[1] = HSIZE_AS_MPI_TYPE;
- types[2] = MPI_INT;
+ types[2] = HADDR_AS_MPI_TYPE;
types[3] = MPI_INT;
types[4] = MPI_INT;
+ types[5] = MPI_INT;
if (MPI_SUCCESS !=
(mpi_code = MPI_Type_create_struct(field_count, block_lengths, displacements, types, &struct_type)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_struct failed", mpi_code)
- struct_type_derived = TRUE;
+ struct_type_derived = true;
if (MPI_SUCCESS != (mpi_code = MPI_Type_create_resized(
struct_type, 0, sizeof(H5D_filtered_collective_chunk_info_t), resized_type)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_resized failed", mpi_code)
- *resized_type_derived = TRUE;
+ *resized_type_derived = true;
if (MPI_SUCCESS != (mpi_code = MPI_Type_commit(resized_type)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_commit failed", mpi_code)
@@ -5122,12 +5572,12 @@ H5D__mpio_get_chunk_redistribute_info_types(MPI_Datatype *contig_type, hbool_t *
if (*resized_type_derived) {
if (MPI_SUCCESS != (mpi_code = MPI_Type_free(resized_type)))
HMPI_DONE_ERROR(FAIL, "MPI_Type_free failed", mpi_code)
- *resized_type_derived = FALSE;
+ *resized_type_derived = false;
}
if (*contig_type_derived) {
if (MPI_SUCCESS != (mpi_code = MPI_Type_free(contig_type)))
HMPI_DONE_ERROR(FAIL, "MPI_Type_free failed", mpi_code)
- *contig_type_derived = FALSE;
+ *contig_type_derived = false;
}
}
@@ -5158,16 +5608,16 @@ H5D__mpio_get_chunk_redistribute_info_types(MPI_Datatype *contig_type, hbool_t *
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__mpio_get_chunk_alloc_info_types(MPI_Datatype *contig_type, hbool_t *contig_type_derived,
- MPI_Datatype *resized_type, hbool_t *resized_type_derived)
+H5D__mpio_get_chunk_alloc_info_types(MPI_Datatype *contig_type, bool *contig_type_derived,
+ MPI_Datatype *resized_type, bool *resized_type_derived)
{
MPI_Datatype struct_type = MPI_DATATYPE_NULL;
- hbool_t struct_type_derived = FALSE;
+ bool struct_type_derived = false;
MPI_Datatype chunk_block_type = MPI_DATATYPE_NULL;
- hbool_t chunk_block_type_derived = FALSE;
- MPI_Datatype types[3];
- MPI_Aint displacements[3];
- int block_lengths[3];
+ bool chunk_block_type_derived = false;
+ MPI_Datatype types[4];
+ MPI_Aint displacements[4];
+ int block_lengths[4];
int field_count;
int mpi_code;
herr_t ret_value = SUCCEED;
@@ -5179,59 +5629,66 @@ H5D__mpio_get_chunk_alloc_info_types(MPI_Datatype *contig_type, hbool_t *contig_
assert(resized_type);
assert(resized_type_derived);
- *contig_type_derived = FALSE;
- *resized_type_derived = FALSE;
+ *contig_type_derived = false;
+ *resized_type_derived = false;
/* Create struct type for the inner H5F_block_t structure */
- if (H5F_mpi_get_file_block_type(FALSE, &chunk_block_type, &chunk_block_type_derived) < 0)
+ if (H5F_mpi_get_file_block_type(false, &chunk_block_type, &chunk_block_type_derived) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't create derived type for chunk file description");
- field_count = 3;
+ field_count = 4;
assert(field_count == (sizeof(types) / sizeof(MPI_Datatype)));
/*
* Create structure type to pack both chunk H5F_block_t structures
- * next to chunk_idx field
+ * next to chunk_idx and dset_oloc_addr fields
*/
block_lengths[0] = 1;
block_lengths[1] = 1;
block_lengths[2] = 1;
+ block_lengths[3] = 1;
displacements[0] = offsetof(H5D_chunk_alloc_info_t, chunk_current);
displacements[1] = offsetof(H5D_chunk_alloc_info_t, chunk_new);
displacements[2] = offsetof(H5D_chunk_alloc_info_t, chunk_idx);
+ displacements[3] = offsetof(H5D_chunk_alloc_info_t, dset_oloc_addr);
types[0] = chunk_block_type;
types[1] = chunk_block_type;
types[2] = HSIZE_AS_MPI_TYPE;
+ types[3] = HADDR_AS_MPI_TYPE;
if (MPI_SUCCESS !=
(mpi_code = MPI_Type_create_struct(field_count, block_lengths, displacements, types, contig_type)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_struct failed", mpi_code)
- *contig_type_derived = TRUE;
+ *contig_type_derived = true;
if (MPI_SUCCESS != (mpi_code = MPI_Type_commit(contig_type)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_commit failed", mpi_code)
/*
- * Create struct type to extract the chunk_current, chunk_new and chunk_idx
- * fields from a H5D_filtered_collective_chunk_info_t structure
+ * Create struct type to extract the chunk_current, chunk_new, chunk_idx
+ * and dset_oloc_addr fields from a H5D_filtered_collective_chunk_info_t
+ * structure
*/
block_lengths[0] = 1;
block_lengths[1] = 1;
block_lengths[2] = 1;
+ block_lengths[3] = 1;
displacements[0] = offsetof(H5D_filtered_collective_chunk_info_t, chunk_current);
displacements[1] = offsetof(H5D_filtered_collective_chunk_info_t, chunk_new);
displacements[2] = offsetof(H5D_filtered_collective_chunk_info_t, index_info.chunk_idx);
+ displacements[3] = offsetof(H5D_filtered_collective_chunk_info_t, index_info.dset_oloc_addr);
types[0] = chunk_block_type;
types[1] = chunk_block_type;
types[2] = HSIZE_AS_MPI_TYPE;
+ types[3] = HADDR_AS_MPI_TYPE;
if (MPI_SUCCESS !=
(mpi_code = MPI_Type_create_struct(field_count, block_lengths, displacements, types, &struct_type)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_struct failed", mpi_code)
- struct_type_derived = TRUE;
+ struct_type_derived = true;
if (MPI_SUCCESS != (mpi_code = MPI_Type_create_resized(
struct_type, 0, sizeof(H5D_filtered_collective_chunk_info_t), resized_type)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_resized failed", mpi_code)
- *resized_type_derived = TRUE;
+ *resized_type_derived = true;
if (MPI_SUCCESS != (mpi_code = MPI_Type_commit(resized_type)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_commit failed", mpi_code)
@@ -5250,12 +5707,12 @@ H5D__mpio_get_chunk_alloc_info_types(MPI_Datatype *contig_type, hbool_t *contig_
if (*resized_type_derived) {
if (MPI_SUCCESS != (mpi_code = MPI_Type_free(resized_type)))
HMPI_DONE_ERROR(FAIL, "MPI_Type_free failed", mpi_code)
- *resized_type_derived = FALSE;
+ *resized_type_derived = false;
}
if (*contig_type_derived) {
if (MPI_SUCCESS != (mpi_code = MPI_Type_free(contig_type)))
HMPI_DONE_ERROR(FAIL, "MPI_Type_free failed", mpi_code)
- *contig_type_derived = FALSE;
+ *contig_type_derived = false;
}
}
@@ -5288,17 +5745,17 @@ H5D__mpio_get_chunk_alloc_info_types(MPI_Datatype *contig_type, hbool_t *contig_
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__mpio_get_chunk_insert_info_types(MPI_Datatype *contig_type, hbool_t *contig_type_derived,
- MPI_Datatype *resized_type, hbool_t *resized_type_derived)
+H5D__mpio_get_chunk_insert_info_types(MPI_Datatype *contig_type, bool *contig_type_derived,
+ MPI_Datatype *resized_type, bool *resized_type_derived)
{
MPI_Datatype struct_type = MPI_DATATYPE_NULL;
- hbool_t struct_type_derived = FALSE;
+ bool struct_type_derived = false;
MPI_Datatype chunk_block_type = MPI_DATATYPE_NULL;
- hbool_t chunk_block_type_derived = FALSE;
+ bool chunk_block_type_derived = false;
MPI_Aint contig_type_extent;
- MPI_Datatype types[4];
- MPI_Aint displacements[4];
- int block_lengths[4];
+ MPI_Datatype types[5];
+ MPI_Aint displacements[5];
+ int block_lengths[5];
int field_count;
int mpi_code;
herr_t ret_value = SUCCEED;
@@ -5310,14 +5767,14 @@ H5D__mpio_get_chunk_insert_info_types(MPI_Datatype *contig_type, hbool_t *contig
assert(resized_type);
assert(resized_type_derived);
- *contig_type_derived = FALSE;
- *resized_type_derived = FALSE;
+ *contig_type_derived = false;
+ *resized_type_derived = false;
/* Create struct type for an H5F_block_t structure */
- if (H5F_mpi_get_file_block_type(FALSE, &chunk_block_type, &chunk_block_type_derived) < 0)
+ if (H5F_mpi_get_file_block_type(false, &chunk_block_type, &chunk_block_type_derived) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't create derived type for chunk file description");
- field_count = 4;
+ field_count = 5;
assert(field_count == (sizeof(types) / sizeof(MPI_Datatype)));
/*
@@ -5330,29 +5787,32 @@ H5D__mpio_get_chunk_insert_info_types(MPI_Datatype *contig_type, hbool_t *contig
block_lengths[1] = 1;
block_lengths[2] = 1;
block_lengths[3] = 1;
+ block_lengths[4] = 1;
displacements[0] = offsetof(H5D_chunk_insert_info_t, chunk_block);
displacements[1] = offsetof(H5D_chunk_insert_info_t, index_info.chunk_idx);
- displacements[2] = offsetof(H5D_chunk_insert_info_t, index_info.filter_mask);
- displacements[3] = offsetof(H5D_chunk_insert_info_t, index_info.need_insert);
+ displacements[2] = offsetof(H5D_chunk_insert_info_t, index_info.dset_oloc_addr);
+ displacements[3] = offsetof(H5D_chunk_insert_info_t, index_info.filter_mask);
+ displacements[4] = offsetof(H5D_chunk_insert_info_t, index_info.need_insert);
types[0] = chunk_block_type;
types[1] = HSIZE_AS_MPI_TYPE;
- types[2] = MPI_UNSIGNED;
- types[3] = MPI_C_BOOL;
+ types[2] = HADDR_AS_MPI_TYPE;
+ types[3] = MPI_UNSIGNED;
+ types[4] = MPI_C_BOOL;
if (MPI_SUCCESS !=
(mpi_code = MPI_Type_create_struct(field_count, block_lengths, displacements, types, &struct_type)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_struct failed", mpi_code)
- struct_type_derived = TRUE;
+ struct_type_derived = true;
contig_type_extent = (MPI_Aint)(sizeof(H5F_block_t) + sizeof(H5D_chunk_index_info_t));
if (MPI_SUCCESS != (mpi_code = MPI_Type_create_resized(struct_type, 0, contig_type_extent, contig_type)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_resized failed", mpi_code)
- *contig_type_derived = TRUE;
+ *contig_type_derived = true;
if (MPI_SUCCESS != (mpi_code = MPI_Type_commit(contig_type)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_commit failed", mpi_code)
- struct_type_derived = FALSE;
+ struct_type_derived = false;
if (MPI_SUCCESS != (mpi_code = MPI_Type_free(&struct_type)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_free failed", mpi_code)
@@ -5363,17 +5823,18 @@ H5D__mpio_get_chunk_insert_info_types(MPI_Datatype *contig_type, hbool_t *contig
*/
displacements[0] = offsetof(H5D_filtered_collective_chunk_info_t, chunk_new);
displacements[1] = offsetof(H5D_filtered_collective_chunk_info_t, index_info.chunk_idx);
- displacements[2] = offsetof(H5D_filtered_collective_chunk_info_t, index_info.filter_mask);
- displacements[3] = offsetof(H5D_filtered_collective_chunk_info_t, index_info.need_insert);
+ displacements[2] = offsetof(H5D_filtered_collective_chunk_info_t, index_info.dset_oloc_addr);
+ displacements[3] = offsetof(H5D_filtered_collective_chunk_info_t, index_info.filter_mask);
+ displacements[4] = offsetof(H5D_filtered_collective_chunk_info_t, index_info.need_insert);
if (MPI_SUCCESS !=
(mpi_code = MPI_Type_create_struct(field_count, block_lengths, displacements, types, &struct_type)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_struct failed", mpi_code)
- struct_type_derived = TRUE;
+ struct_type_derived = true;
if (MPI_SUCCESS != (mpi_code = MPI_Type_create_resized(
struct_type, 0, sizeof(H5D_filtered_collective_chunk_info_t), resized_type)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_resized failed", mpi_code)
- *resized_type_derived = TRUE;
+ *resized_type_derived = true;
if (MPI_SUCCESS != (mpi_code = MPI_Type_commit(resized_type)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_commit failed", mpi_code)
@@ -5392,12 +5853,12 @@ H5D__mpio_get_chunk_insert_info_types(MPI_Datatype *contig_type, hbool_t *contig
if (*resized_type_derived) {
if (MPI_SUCCESS != (mpi_code = MPI_Type_free(resized_type)))
HMPI_DONE_ERROR(FAIL, "MPI_Type_free failed", mpi_code)
- *resized_type_derived = FALSE;
+ *resized_type_derived = false;
}
if (*contig_type_derived) {
if (MPI_SUCCESS != (mpi_code = MPI_Type_free(contig_type)))
HMPI_DONE_ERROR(FAIL, "MPI_Type_free failed", mpi_code)
- *contig_type_derived = FALSE;
+ *contig_type_derived = false;
}
}
@@ -5571,6 +6032,8 @@ H5D__mpio_dump_collective_filtered_chunk_list(H5D_filtered_collective_io_info_t
chunk_rank < 3 ? 0 : chunk_entry->chunk_info->scaled[2],
chunk_rank < 4 ? 0 : chunk_entry->chunk_info->scaled[3]);
H5D_MPIO_DEBUG_VA(mpi_rank, " Chunk Index: %" PRIuHSIZE, chunk_entry->index_info.chunk_idx);
+ H5D_MPIO_DEBUG_VA(mpi_rank, " Dataset Object Header Address: %" PRIuHADDR,
+ chunk_entry->index_info.dset_oloc_addr);
H5D_MPIO_DEBUG_VA(mpi_rank, " Filter Mask: %u", chunk_entry->index_info.filter_mask);
H5D_MPIO_DEBUG_VA(mpi_rank, " Need Insert: %s",
chunk_entry->index_info.need_insert ? "YES" : "NO");
diff --git a/src/H5Dnone.c b/src/H5Dnone.c
index 181016d98a2..472a2214dc7 100644
--- a/src/H5Dnone.c
+++ b/src/H5Dnone.c
@@ -51,18 +51,18 @@
/********************/
/* Non Index chunking I/O ops */
-static herr_t H5D__none_idx_create(const H5D_chk_idx_info_t *idx_info);
-static hbool_t H5D__none_idx_is_space_alloc(const H5O_storage_chunk_t *storage);
-static herr_t H5D__none_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata);
-static int H5D__none_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t chunk_cb,
- void *chunk_udata);
-static herr_t H5D__none_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t *udata);
-static herr_t H5D__none_idx_delete(const H5D_chk_idx_info_t *idx_info);
-static herr_t H5D__none_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src,
- const H5D_chk_idx_info_t *idx_info_dst);
-static herr_t H5D__none_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *size);
-static herr_t H5D__none_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr);
-static herr_t H5D__none_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream);
+static herr_t H5D__none_idx_create(const H5D_chk_idx_info_t *idx_info);
+static bool H5D__none_idx_is_space_alloc(const H5O_storage_chunk_t *storage);
+static herr_t H5D__none_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata);
+static int H5D__none_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t chunk_cb,
+ void *chunk_udata);
+static herr_t H5D__none_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t *udata);
+static herr_t H5D__none_idx_delete(const H5D_chk_idx_info_t *idx_info);
+static herr_t H5D__none_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src,
+ const H5D_chk_idx_info_t *idx_info_dst);
+static herr_t H5D__none_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *size);
+static herr_t H5D__none_idx_reset(H5O_storage_chunk_t *storage, bool reset_addr);
+static herr_t H5D__none_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream);
/*********************/
/* Package Variables */
@@ -70,7 +70,7 @@ static herr_t H5D__none_idx_dump(const H5O_storage_chunk_t *storage, FILE *stre
/* Non Index chunk I/O ops */
const H5D_chunk_ops_t H5D_COPS_NONE[1] = {{
- FALSE, /* Non-indexed chunking don't current support SWMR access */
+ false, /* Non-indexed chunking don't current support SWMR access */
NULL, /* init */
H5D__none_idx_create, /* create */
H5D__none_idx_is_space_alloc, /* is_space_alloc */
@@ -149,7 +149,7 @@ H5D__none_idx_create(const H5D_chk_idx_info_t *idx_info)
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
H5D__none_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
{
FUNC_ENTER_PACKAGE_NOERR
@@ -157,7 +157,7 @@ H5D__none_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
/* Check args */
assert(storage);
- FUNC_LEAVE_NOAPI((hbool_t)H5_addr_defined(storage->idx_addr))
+ FUNC_LEAVE_NOAPI((bool)H5_addr_defined(storage->idx_addr))
} /* end H5D__none_idx_is_space_alloc() */
/*-------------------------------------------------------------------------
@@ -416,7 +416,7 @@ H5D__none_idx_size(const H5D_chk_idx_info_t H5_ATTR_UNUSED *idx_info, hsize_t *i
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__none_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
+H5D__none_idx_reset(H5O_storage_chunk_t *storage, bool reset_addr)
{
FUNC_ENTER_PACKAGE_NOERR
diff --git a/src/H5Doh.c b/src/H5Doh.c
index f4a993491e6..1008948972e 100644
--- a/src/H5Doh.c
+++ b/src/H5Doh.c
@@ -149,8 +149,8 @@ H5O__dset_free_copy_file_udata(void *_udata)
* Purpose: Determines if an object has the requisite messages for being
* a dataset.
*
- * Return: Success: TRUE if the required dataset messages are
- * present; FALSE otherwise.
+ * Return: Success: true if the required dataset messages are
+ * present; false otherwise.
*
* Failure: FAIL if the existence of certain messages
* cannot be determined.
@@ -161,7 +161,7 @@ static htri_t
H5O__dset_isa(const H5O_t *oh)
{
htri_t exists; /* Flag if header message of interest exists */
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE
@@ -171,13 +171,13 @@ H5O__dset_isa(const H5O_t *oh)
if ((exists = H5O_msg_exists_oh(oh, H5O_DTYPE_ID)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to read object header");
else if (!exists)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* Layout */
if ((exists = H5O_msg_exists_oh(oh, H5O_SDSPACE_ID)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to read object header");
else if (!exists)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -335,8 +335,8 @@ H5O__dset_bh_info(const H5O_loc_t *loc, H5O_t *oh, H5_ih_info_t *bh_info)
{
H5O_layout_t layout; /* Data storage layout message */
H5O_efl_t efl; /* External File List message */
- hbool_t layout_read = FALSE; /* Whether the layout message was read */
- hbool_t efl_read = FALSE; /* Whether the external file list message was read */
+ bool layout_read = false; /* Whether the layout message was read */
+ bool efl_read = false; /* Whether the external file list message was read */
htri_t exists; /* Flag if header message of interest exists */
herr_t ret_value = SUCCEED; /* Return value */
@@ -352,7 +352,7 @@ H5O__dset_bh_info(const H5O_loc_t *loc, H5O_t *oh, H5_ih_info_t *bh_info)
/* Get the layout message from the object header */
if (NULL == H5O_msg_read_oh(loc->file, oh, H5O_LAYOUT_ID, &layout))
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't find layout message");
- layout_read = TRUE;
+ layout_read = true;
/* Check for chunked dataset storage */
if (layout.type == H5D_CHUNKED && H5D__chunk_is_space_alloc(&layout.storage)) {
@@ -383,7 +383,7 @@ H5O__dset_bh_info(const H5O_loc_t *loc, H5O_t *oh, H5_ih_info_t *bh_info)
/* Get External File List message from the object header */
if (NULL == H5O_msg_read_oh(loc->file, oh, H5O_EFL_ID, &efl))
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't find EFL message");
- efl_read = TRUE;
+ efl_read = true;
/* Get size of local heap for EFL message's file list */
if (H5D__efl_bh_info(loc->file, &efl, &(bh_info->heap_size)) < 0)
diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h
index 67dfb83a340..82fec0ea1ff 100644
--- a/src/H5Dpkg.h
+++ b/src/H5Dpkg.h
@@ -87,7 +87,7 @@
/* Make sure the memory type is not smaller than the file type, otherwise the memory buffer \
* won't be big enough to serve as the type conversion buffer */ \
if (mem_type_size >= file_type_size) { \
- hbool_t is_contig; \
+ bool is_contig; \
hsize_t sel_off; \
\
/* Check if the space is contiguous */ \
@@ -98,7 +98,7 @@
*/ \
if (is_contig) { \
H5_CHECK_OVERFLOW(sel_off, hsize_t, size_t); \
- (PIECE_INFO)->in_place_tconv = TRUE; \
+ (PIECE_INFO)->in_place_tconv = true; \
(PIECE_INFO)->buf_off = (size_t)sel_off * mem_type_size; \
} \
} \
@@ -127,8 +127,8 @@ typedef struct H5D_type_info_t {
/* Computed/derived values */
size_t src_type_size; /* Size of source type */
size_t dst_type_size; /* Size of destination type */
- hbool_t is_conv_noop; /* Whether the type conversion is a NOOP */
- hbool_t is_xform_noop; /* Whether the data transform is a NOOP */
+ bool is_conv_noop; /* Whether the type conversion is a NOOP */
+ bool is_xform_noop; /* Whether the data transform is a NOOP */
const H5T_subset_info_t *cmpd_subset; /* Info related to the compound subset conversion functions */
H5T_bkg_t need_bkg; /* Type of background buf needed */
size_t request_nelmts; /* Requested strip mine */
@@ -142,8 +142,8 @@ typedef struct H5D_shared_t H5D_shared_t;
/* Function pointers for I/O on particular types of dataset layouts */
typedef herr_t (*H5D_layout_construct_func_t)(H5F_t *f, H5D_t *dset);
typedef herr_t (*H5D_layout_init_func_t)(H5F_t *f, const H5D_t *dset, hid_t dapl_id);
-typedef hbool_t (*H5D_layout_is_space_alloc_func_t)(const H5O_storage_t *storage);
-typedef hbool_t (*H5D_layout_is_data_cached_func_t)(const H5D_shared_t *shared_dset);
+typedef bool (*H5D_layout_is_space_alloc_func_t)(const H5O_storage_t *storage);
+typedef bool (*H5D_layout_is_data_cached_func_t)(const H5D_shared_t *shared_dset);
typedef herr_t (*H5D_layout_io_init_func_t)(struct H5D_io_info_t *io_info, struct H5D_dset_io_info_t *dinfo);
typedef herr_t (*H5D_layout_mdio_init_func_t)(struct H5D_io_info_t *io_info,
struct H5D_dset_io_info_t *dinfo);
@@ -225,8 +225,8 @@ typedef struct {
} H5D_chunk_storage_t;
typedef struct {
- void *buf; /* Buffer for compact dataset */
- hbool_t *dirty; /* Pointer to dirty flag to mark */
+ void *buf; /* Buffer for compact dataset */
+ bool *dirty; /* Pointer to dirty flag to mark */
} H5D_compact_storage_t;
typedef union H5D_storage_t {
@@ -252,8 +252,9 @@ typedef struct H5D_piece_info_t {
unsigned fspace_shared; /* Indicate that the file space for a chunk is shared and shouldn't be freed */
H5S_t *mspace; /* Dataspace describing selection in memory corresponding to this chunk */
unsigned mspace_shared; /* Indicate that the memory space for a chunk is shared and shouldn't be freed */
- hbool_t in_place_tconv; /* Whether to perform type conversion in-place */
+ bool in_place_tconv; /* Whether to perform type conversion in-place */
size_t buf_off; /* Buffer offset for in-place type conversion */
+ bool filtered_dset; /* Whether the dataset this chunk is in has filters applied */
struct H5D_dset_io_info_t *dset_info; /* Pointer to dset_info */
} H5D_piece_info_t;
@@ -279,7 +280,7 @@ typedef struct H5D_dset_io_info_t {
hid_t mem_type_id; /* memory datatype ID */
H5D_type_info_t type_info;
- hbool_t skip_io; /* Whether to skip I/O for this dataset */
+ bool skip_io; /* Whether to skip I/O for this dataset */
} H5D_dset_io_info_t;
/* I/O info for entire I/O operation */
@@ -288,35 +289,36 @@ typedef struct H5D_io_info_t {
H5F_shared_t *f_sh; /* Pointer to shared file struct that dataset is within */
#ifdef H5_HAVE_PARALLEL
MPI_Comm comm; /* MPI communicator for file */
- hbool_t using_mpi_vfd; /* Whether the file is using an MPI-based VFD */
+ bool using_mpi_vfd; /* Whether the file is using an MPI-based VFD */
#endif /* H5_HAVE_PARALLEL */
H5D_md_io_ops_t md_io_ops; /* Multi dataset I/O operation function pointers */
H5D_io_op_type_t op_type;
- size_t count; /* Number of datasets in I/O request */
- H5D_dset_io_info_t *dsets_info; /* dsets info where I/O is done to/from */
- size_t piece_count; /* Number of pieces in I/O request */
- size_t pieces_added; /* Number of pieces added so far to arrays */
- H5D_piece_info_t **sel_pieces; /* Array of info struct for all pieces in I/O */
- H5S_t **mem_spaces; /* Array of chunk memory spaces */
- H5S_t **file_spaces; /* Array of chunk file spaces */
- haddr_t *addrs; /* Array of chunk addresses */
- size_t *element_sizes; /* Array of element sizes */
- void **rbufs; /* Array of read buffers */
- const void **wbufs; /* Array of write buffers */
- haddr_t store_faddr; /* lowest file addr for read/write */
- H5_flexible_const_ptr_t base_maddr; /* starting mem address */
- H5D_selection_io_mode_t use_select_io; /* Whether to use selection I/O */
- uint8_t *tconv_buf; /* Datatype conv buffer */
- hbool_t tconv_buf_allocated; /* Whether the type conversion buffer was allocated */
- size_t tconv_buf_size; /* Size of type conversion buffer */
- uint8_t *bkg_buf; /* Background buffer */
- hbool_t bkg_buf_allocated; /* Whether the background buffer was allocated */
- size_t bkg_buf_size; /* Size of background buffer */
+ size_t count; /* Number of datasets in I/O request */
+ size_t filtered_count; /* Number of datasets with filters applied in I/O request */
+ H5D_dset_io_info_t *dsets_info; /* dsets info where I/O is done to/from */
+ size_t piece_count; /* Number of pieces in I/O request */
+ size_t pieces_added; /* Number of pieces added so far to arrays */
+ size_t filtered_pieces_added; /* Number of filtered pieces in I/O request */
+ H5D_piece_info_t **sel_pieces; /* Array of info struct for all pieces in I/O */
+ H5S_t **mem_spaces; /* Array of chunk memory spaces */
+ H5S_t **file_spaces; /* Array of chunk file spaces */
+ haddr_t *addrs; /* Array of chunk addresses */
+ size_t *element_sizes; /* Array of element sizes */
+ void **rbufs; /* Array of read buffers */
+ const void **wbufs; /* Array of write buffers */
+ haddr_t store_faddr; /* lowest file addr for read/write */
+ H5_flexible_const_ptr_t base_maddr; /* starting mem address */
+ H5D_selection_io_mode_t use_select_io; /* Whether to use selection I/O */
+ uint8_t *tconv_buf; /* Datatype conv buffer */
+ bool tconv_buf_allocated; /* Whether the type conversion buffer was allocated */
+ size_t tconv_buf_size; /* Size of type conversion buffer */
+ uint8_t *bkg_buf; /* Background buffer */
+ bool bkg_buf_allocated; /* Whether the background buffer was allocated */
+ size_t bkg_buf_size; /* Size of background buffer */
size_t max_tconv_type_size; /* Largest of all source and destination type sizes involved in type
conversion */
- hbool_t
- must_fill_bkg; /* Whether any datasets need a background buffer filled with destination contents */
- hbool_t may_use_in_place_tconv; /* Whether datasets in this I/O could potentially use in-place type
+ bool must_fill_bkg; /* Whether any datasets need a background buffer filled with destination contents */
+ bool may_use_in_place_tconv; /* Whether datasets in this I/O could potentially use in-place type
conversion if the type sizes are compatible with it */
#ifdef H5_HAVE_PARALLEL
H5D_mpio_actual_io_mode_t actual_io_mode; /* Actual type of collective or independent I/O */
@@ -380,7 +382,7 @@ typedef struct H5D_chunk_ud_t {
unsigned idx_hint; /* Index of chunk in cache, if present */
H5F_block_t chunk_block; /* Offset/length of chunk in file */
unsigned filter_mask; /* Excluded filters */
- hbool_t new_unfilt_chunk; /* Whether the chunk just became unfiltered */
+ bool new_unfilt_chunk; /* Whether the chunk just became unfiltered */
hsize_t chunk_idx; /* Chunk index for EA, FA indexing */
} H5D_chunk_ud_t;
@@ -391,7 +393,7 @@ typedef int (*H5D_chunk_cb_func_t)(const H5D_chunk_rec_t *chunk_rec, void *udata
typedef herr_t (*H5D_chunk_init_func_t)(const H5D_chk_idx_info_t *idx_info, const H5S_t *space,
haddr_t dset_ohdr_addr);
typedef herr_t (*H5D_chunk_create_func_t)(const H5D_chk_idx_info_t *idx_info);
-typedef hbool_t (*H5D_chunk_is_space_alloc_func_t)(const H5O_storage_chunk_t *storage);
+typedef bool (*H5D_chunk_is_space_alloc_func_t)(const H5O_storage_chunk_t *storage);
typedef herr_t (*H5D_chunk_insert_func_t)(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata,
const H5D_t *dset);
typedef herr_t (*H5D_chunk_get_addr_func_t)(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata);
@@ -405,13 +407,13 @@ typedef herr_t (*H5D_chunk_copy_setup_func_t)(const H5D_chk_idx_info_t *idx_info
typedef herr_t (*H5D_chunk_copy_shutdown_func_t)(H5O_storage_chunk_t *storage_src,
H5O_storage_chunk_t *storage_dst);
typedef herr_t (*H5D_chunk_size_func_t)(const H5D_chk_idx_info_t *idx_info, hsize_t *idx_size);
-typedef herr_t (*H5D_chunk_reset_func_t)(H5O_storage_chunk_t *storage, hbool_t reset_addr);
+typedef herr_t (*H5D_chunk_reset_func_t)(H5O_storage_chunk_t *storage, bool reset_addr);
typedef herr_t (*H5D_chunk_dump_func_t)(const H5O_storage_chunk_t *storage, FILE *stream);
typedef herr_t (*H5D_chunk_dest_func_t)(const H5D_chk_idx_info_t *idx_info);
/* Typedef for grouping chunk I/O routines */
typedef struct H5D_chunk_ops_t {
- hbool_t can_swim; /* Flag to indicate that the index supports SWMR access */
+ bool can_swim; /* Flag to indicate that the index supports SWMR access */
H5D_chunk_init_func_t init; /* Routine to initialize indexing information in memory */
H5D_chunk_create_func_t create; /* Routine to create chunk index */
H5D_chunk_is_space_alloc_func_t
@@ -445,7 +447,7 @@ typedef struct H5D_chunk_map_t {
H5S_t *single_space; /* Dataspace for single chunk */
H5D_piece_info_t *single_piece_info; /* Pointer to single chunk's info */
- hbool_t use_single; /* Whether I/O is on a single element */
+ bool use_single; /* Whether I/O is on a single element */
hsize_t last_index; /* Index of last chunk operated on */
H5D_piece_info_t *last_piece_info; /* Pointer to last chunk's info */
@@ -455,7 +457,7 @@ typedef struct H5D_chunk_map_t {
/* Cached information about a particular chunk */
typedef struct H5D_chunk_cached_t {
- hbool_t valid; /*whether cache info is valid*/
+ bool valid; /*whether cache info is valid*/
hsize_t scaled[H5O_LAYOUT_NDIMS]; /*scaled offset of chunk*/
haddr_t addr; /*file address of chunk */
uint32_t nbytes; /*size of stored data */
@@ -510,7 +512,7 @@ typedef struct H5D_rdcdc_t {
haddr_t sieve_loc; /* File location (offset) of the data sieve buffer */
size_t sieve_size; /* Size of the data sieve buffer used (in bytes) */
size_t sieve_buf_size; /* Size of the data sieve buffer allocated (in bytes) */
- hbool_t sieve_dirty; /* Flag to indicate that the data sieve buffer is dirty */
+ bool sieve_dirty; /* Flag to indicate that the data sieve buffer is dirty */
} H5D_rdcdc_t;
/*
@@ -521,7 +523,7 @@ typedef struct H5D_rdcdc_t {
*/
struct H5D_shared_t {
size_t fo_count; /* Reference count */
- hbool_t closing; /* Flag to indicate dataset is closing */
+ bool closing; /* Flag to indicate dataset is closing */
hid_t type_id; /* ID for dataset's datatype */
H5T_t *type; /* Datatype for this dataset */
H5S_t *space; /* Dataspace of this dataset */
@@ -529,7 +531,7 @@ struct H5D_shared_t {
hid_t dapl_id; /* Dataset access property id */
H5D_dcpl_cache_t dcpl_cache; /* Cached DCPL values */
H5O_layout_t layout; /* Data layout */
- hbool_t checked_filters; /* TRUE if dataset passes can_apply check */
+ bool checked_filters; /* true if dataset passes can_apply check */
/* Cached dataspace info */
unsigned ndims; /* The dataset's dataspace rank */
@@ -539,13 +541,12 @@ struct H5D_shared_t {
/* Buffered/cached information for types of raw data storage*/
struct {
- H5D_rdcdc_t contig; /* Information about contiguous data */
- /* (Note that the "contig" cache
- * information can be used by a chunked
- * dataset in certain circumstances)
- */
- H5D_rdcc_t chunk; /* Information about chunked data */
- H5SL_t *sel_pieces; /* Skip list containing information for each piece selected */
+ H5D_rdcdc_t contig; /* Information about contiguous data */
+ /* (Note that the "contig" cache
+ * information can be used by a chunked
+ * dataset in certain circumstances)
+ */
+ H5D_rdcc_t chunk; /* Information about chunked data */
} cache;
H5D_append_flush_t append_flush; /* Append flush property information */
@@ -588,7 +589,7 @@ typedef struct H5D_fill_buf_info_t {
const H5O_fill_t *fill; /* Pointer to fill value */
void *fill_buf; /* Fill buffer */
size_t fill_buf_size; /* Size of fill buffer */
- hbool_t use_caller_fill_buf; /* Whether the caller provided the fill buffer */
+ bool use_caller_fill_buf; /* Whether the caller provided the fill buffer */
void *bkg_buf; /* Background conversion buffer */
size_t bkg_buf_size; /* Size of background buffer */
H5T_t *mem_type; /* Pointer to memory datatype */
@@ -598,7 +599,7 @@ typedef struct H5D_fill_buf_info_t {
size_t mem_elmt_size, file_elmt_size; /* Size of element in memory and on disk */
size_t max_elmt_size; /* Max. size of memory or file datatype */
size_t elmts_per_buf; /* # of elements that fit into a buffer */
- hbool_t has_vlen_fill_type; /* Whether the datatype for the fill value has a variable-length component */
+ bool has_vlen_fill_type; /* Whether the datatype for the fill value has a variable-length component */
} H5D_fill_buf_info_t;
/*****************************/
@@ -638,11 +639,11 @@ H5_DLL H5D_t *H5D__open_name(const H5G_loc_t *loc, const char *name, hid_t dapl
H5_DLL hid_t H5D__get_space(const H5D_t *dset);
H5_DLL hid_t H5D__get_type(const H5D_t *dset);
H5_DLL herr_t H5D__get_space_status(const H5D_t *dset, H5D_space_status_t *allocation);
-H5_DLL herr_t H5D__alloc_storage(H5D_t *dset, H5D_time_alloc_t time_alloc, hbool_t full_overwrite,
+H5_DLL herr_t H5D__alloc_storage(H5D_t *dset, H5D_time_alloc_t time_alloc, bool full_overwrite,
hsize_t old_dim[]);
H5_DLL herr_t H5D__get_storage_size(const H5D_t *dset, hsize_t *storage_size);
H5_DLL herr_t H5D__get_chunk_storage_size(H5D_t *dset, const hsize_t *offset, hsize_t *storage_size);
-H5_DLL herr_t H5D__chunk_index_empty(const H5D_t *dset, hbool_t *empty);
+H5_DLL herr_t H5D__chunk_index_empty(const H5D_t *dset, bool *empty);
H5_DLL herr_t H5D__get_num_chunks(const H5D_t *dset, const H5S_t *space, hsize_t *nchunks);
H5_DLL herr_t H5D__get_chunk_info(const H5D_t *dset, const H5S_t *space, hsize_t chk_idx, hsize_t *coord,
unsigned *filter_mask, haddr_t *offset, hsize_t *size);
@@ -686,7 +687,7 @@ H5_DLL herr_t H5D__scatgath_write_select(H5D_io_info_t *io_info);
/* Functions that operate on dataset's layout information */
H5_DLL herr_t H5D__layout_set_io_ops(const H5D_t *dataset);
-H5_DLL size_t H5D__layout_meta_size(const H5F_t *f, const H5O_layout_t *layout, hbool_t include_compact_data);
+H5_DLL size_t H5D__layout_meta_size(const H5F_t *f, const H5O_layout_t *layout, bool include_compact_data);
H5_DLL herr_t H5D__layout_set_version(H5F_t *f, H5O_layout_t *layout);
H5_DLL herr_t H5D__layout_set_latest_indexing(H5O_layout_t *layout, const H5S_t *space,
const H5D_dcpl_cache_t *dcpl_cache);
@@ -695,37 +696,37 @@ H5_DLL herr_t H5D__layout_oh_read(H5D_t *dset, hid_t dapl_id, H5P_genplist_t *pl
H5_DLL herr_t H5D__layout_oh_write(const H5D_t *dataset, H5O_t *oh, unsigned update_flags);
/* Functions that operate on contiguous storage */
-H5_DLL herr_t H5D__contig_alloc(H5F_t *f, H5O_storage_contig_t *storage);
-H5_DLL hbool_t H5D__contig_is_space_alloc(const H5O_storage_t *storage);
-H5_DLL hbool_t H5D__contig_is_data_cached(const H5D_shared_t *shared_dset);
-H5_DLL herr_t H5D__contig_fill(H5D_t *dset);
-H5_DLL herr_t H5D__contig_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo);
-H5_DLL herr_t H5D__contig_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo);
-H5_DLL herr_t H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, H5F_t *f_dst,
- H5O_storage_contig_t *storage_dst, H5T_t *src_dtype, H5O_copy_t *cpy_info);
-H5_DLL herr_t H5D__contig_delete(H5F_t *f, const H5O_storage_t *store);
+H5_DLL herr_t H5D__contig_alloc(H5F_t *f, H5O_storage_contig_t *storage);
+H5_DLL bool H5D__contig_is_space_alloc(const H5O_storage_t *storage);
+H5_DLL bool H5D__contig_is_data_cached(const H5D_shared_t *shared_dset);
+H5_DLL herr_t H5D__contig_fill(H5D_t *dset);
+H5_DLL herr_t H5D__contig_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo);
+H5_DLL herr_t H5D__contig_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo);
+H5_DLL herr_t H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, H5F_t *f_dst,
+ H5O_storage_contig_t *storage_dst, H5T_t *src_dtype, H5O_copy_t *cpy_info);
+H5_DLL herr_t H5D__contig_delete(H5F_t *f, const H5O_storage_t *store);
/* Functions that operate on chunked dataset storage */
H5_DLL htri_t H5D__chunk_cacheable(const H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info, haddr_t caddr,
- hbool_t write_op);
+ bool write_op);
H5_DLL herr_t H5D__chunk_create(const H5D_t *dset /*in,out*/);
H5_DLL herr_t H5D__chunk_set_info(const H5D_t *dset);
-H5_DLL hbool_t H5D__chunk_is_space_alloc(const H5O_storage_t *storage);
-H5_DLL hbool_t H5D__chunk_is_data_cached(const H5D_shared_t *shared_dset);
-H5_DLL herr_t H5D__chunk_lookup(const H5D_t *dset, const hsize_t *scaled, H5D_chunk_ud_t *udata);
-H5_DLL herr_t H5D__chunk_allocated(const H5D_t *dset, hsize_t *nbytes);
-H5_DLL herr_t H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old_dim[]);
-H5_DLL herr_t H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old_chunk,
- H5F_block_t *new_chunk, hbool_t *need_insert, const hsize_t *scaled);
-H5_DLL void *H5D__chunk_mem_alloc(size_t size, void *pline);
-H5_DLL void H5D__chunk_mem_free(void *chk, void *pline);
-H5_DLL void *H5D__chunk_mem_xfree(void *chk, const void *pline);
-H5_DLL void *H5D__chunk_mem_realloc(void *chk, size_t size, const H5O_pline_t *pline);
-H5_DLL herr_t H5D__chunk_update_old_edge_chunks(H5D_t *dset, hsize_t old_dim[]);
-H5_DLL hbool_t H5D__chunk_is_partial_edge_chunk(unsigned dset_ndims, const uint32_t *chunk_dims,
- const hsize_t *chunk_scaled, const hsize_t *dset_dims);
-H5_DLL herr_t H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim);
-H5_DLL herr_t H5D__chunk_set_sizes(H5D_t *dset);
+H5_DLL bool H5D__chunk_is_space_alloc(const H5O_storage_t *storage);
+H5_DLL bool H5D__chunk_is_data_cached(const H5D_shared_t *shared_dset);
+H5_DLL herr_t H5D__chunk_lookup(const H5D_t *dset, const hsize_t *scaled, H5D_chunk_ud_t *udata);
+H5_DLL herr_t H5D__chunk_allocated(const H5D_t *dset, hsize_t *nbytes);
+H5_DLL herr_t H5D__chunk_allocate(const H5D_t *dset, bool full_overwrite, const hsize_t old_dim[]);
+H5_DLL herr_t H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old_chunk,
+ H5F_block_t *new_chunk, bool *need_insert, const hsize_t *scaled);
+H5_DLL void *H5D__chunk_mem_alloc(size_t size, void *pline);
+H5_DLL void H5D__chunk_mem_free(void *chk, void *pline);
+H5_DLL void *H5D__chunk_mem_xfree(void *chk, const void *pline);
+H5_DLL void *H5D__chunk_mem_realloc(void *chk, size_t size, const H5O_pline_t *pline);
+H5_DLL herr_t H5D__chunk_update_old_edge_chunks(H5D_t *dset, hsize_t old_dim[]);
+H5_DLL bool H5D__chunk_is_partial_edge_chunk(unsigned dset_ndims, const uint32_t *chunk_dims,
+ const hsize_t *chunk_scaled, const hsize_t *dset_dims);
+H5_DLL herr_t H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim);
+H5_DLL herr_t H5D__chunk_set_sizes(H5D_t *dset);
#ifdef H5_HAVE_PARALLEL
H5_DLL herr_t H5D__chunk_addrmap(const H5D_t *dset, haddr_t chunk_addr[]);
#endif /* H5_HAVE_PARALLEL */
@@ -742,7 +743,7 @@ H5_DLL herr_t H5D__chunk_direct_write(H5D_t *dset, uint32_t filters, hsize_t *of
const void *buf);
H5_DLL herr_t H5D__chunk_direct_read(const H5D_t *dset, hsize_t *offset, uint32_t *filters, void *buf);
#ifdef H5D_CHUNK_DEBUG
-H5_DLL herr_t H5D__chunk_stats(const H5D_t *dset, hbool_t headers);
+H5_DLL herr_t H5D__chunk_stats(const H5D_t *dset, bool headers);
#endif /* H5D_CHUNK_DEBUG */
/* format convert */
@@ -755,21 +756,21 @@ H5_DLL herr_t H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *storage_src
H5O_storage_compact_t *storage_dst, H5T_t *src_dtype, H5O_copy_t *cpy_info);
/* Functions that operate on virtual dataset storage */
-H5_DLL herr_t H5D__virtual_store_layout(H5F_t *f, H5O_layout_t *layout);
-H5_DLL herr_t H5D__virtual_copy_layout(H5O_layout_t *layout);
-H5_DLL herr_t H5D__virtual_set_extent_unlim(const H5D_t *dset);
-H5_DLL herr_t H5D__virtual_reset_layout(H5O_layout_t *layout);
-H5_DLL herr_t H5D__virtual_delete(H5F_t *f, H5O_storage_t *storage);
-H5_DLL herr_t H5D__virtual_copy(H5F_t *f_src, H5O_layout_t *layout_dst);
-H5_DLL herr_t H5D__virtual_init(H5F_t *f, const H5D_t *dset, hid_t dapl_id);
-H5_DLL hbool_t H5D__virtual_is_space_alloc(const H5O_storage_t *storage);
-H5_DLL herr_t H5D__virtual_hold_source_dset_files(const H5D_t *dset, H5D_virtual_held_file_t **head);
-H5_DLL herr_t H5D__virtual_refresh_source_dsets(H5D_t *dset);
-H5_DLL herr_t H5D__virtual_release_source_dset_files(H5D_virtual_held_file_t *head);
+H5_DLL herr_t H5D__virtual_store_layout(H5F_t *f, H5O_layout_t *layout);
+H5_DLL herr_t H5D__virtual_copy_layout(H5O_layout_t *layout);
+H5_DLL herr_t H5D__virtual_set_extent_unlim(const H5D_t *dset);
+H5_DLL herr_t H5D__virtual_reset_layout(H5O_layout_t *layout);
+H5_DLL herr_t H5D__virtual_delete(H5F_t *f, H5O_storage_t *storage);
+H5_DLL herr_t H5D__virtual_copy(H5F_t *f_src, H5O_layout_t *layout_dst);
+H5_DLL herr_t H5D__virtual_init(H5F_t *f, const H5D_t *dset, hid_t dapl_id);
+H5_DLL bool H5D__virtual_is_space_alloc(const H5O_storage_t *storage);
+H5_DLL herr_t H5D__virtual_hold_source_dset_files(const H5D_t *dset, H5D_virtual_held_file_t **head);
+H5_DLL herr_t H5D__virtual_refresh_source_dsets(H5D_t *dset);
+H5_DLL herr_t H5D__virtual_release_source_dset_files(H5D_virtual_held_file_t *head);
/* Functions that operate on EFL (External File List)*/
-H5_DLL hbool_t H5D__efl_is_space_alloc(const H5O_storage_t *storage);
-H5_DLL herr_t H5D__efl_bh_info(H5F_t *f, H5O_efl_t *efl, hsize_t *heap_size);
+H5_DLL bool H5D__efl_is_space_alloc(const H5O_storage_t *storage);
+H5_DLL herr_t H5D__efl_bh_info(H5F_t *f, H5O_efl_t *efl, hsize_t *heap_size);
/* Functions that perform fill value operations on datasets */
H5_DLL herr_t H5D__fill(const void *fill, const H5T_t *fill_type, void *buf, const H5T_t *buf_type,
@@ -816,7 +817,7 @@ H5_DLL herr_t H5D__free_piece_info(void *item, void *key, void *opdata);
#ifdef H5D_TESTING
H5_DLL herr_t H5D__layout_version_test(hid_t did, unsigned *version);
H5_DLL herr_t H5D__layout_contig_size_test(hid_t did, hsize_t *size);
-H5_DLL herr_t H5D__layout_compact_dirty_test(hid_t did, hbool_t *dirty);
+H5_DLL herr_t H5D__layout_compact_dirty_test(hid_t did, bool *dirty);
H5_DLL herr_t H5D__layout_idx_type_test(hid_t did, H5D_chunk_index_t *idx_type);
H5_DLL herr_t H5D__layout_type_test(hid_t did, H5D_layout_t *layout_type);
H5_DLL herr_t H5D__current_cache_size_test(hid_t did, size_t *nbytes_used, int *nused);
diff --git a/src/H5Dprivate.h b/src/H5Dprivate.h
index 8265ac25219..118c6cd4224 100644
--- a/src/H5Dprivate.h
+++ b/src/H5Dprivate.h
@@ -104,8 +104,8 @@
#define H5D_XFER_COLL_RANK0_BCAST_NAME "coll_rank0_bcast"
/* Definitions for general collective I/O instrumentation properties */
-#define H5D_XFER_COLL_RANK0_BCAST_SIZE sizeof(hbool_t)
-#define H5D_XFER_COLL_RANK0_BCAST_DEF FALSE
+#define H5D_XFER_COLL_RANK0_BCAST_SIZE sizeof(bool)
+#define H5D_XFER_COLL_RANK0_BCAST_DEF false
#endif /* H5_HAVE_INSTRUMENTED_LIBRARY */
/* Default temporary buffer size */
@@ -172,7 +172,7 @@ H5_DLL hid_t H5D_get_create_plist(const H5D_t *dset);
H5_DLL hid_t H5D_get_access_plist(const H5D_t *dset);
/* Functions that operate on chunked storage */
-H5_DLL herr_t H5D_chunk_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr);
+H5_DLL herr_t H5D_chunk_idx_reset(H5O_storage_chunk_t *storage, bool reset_addr);
/* Functions that operate on virtual storage */
H5_DLL herr_t H5D_virtual_check_mapping_pre(const H5S_t *vspace, const H5S_t *src_space,
diff --git a/src/H5Dscatgath.c b/src/H5Dscatgath.c
index 4bcdaafb7e9..9b60d81b2b0 100644
--- a/src/H5Dscatgath.c
+++ b/src/H5Dscatgath.c
@@ -118,7 +118,7 @@ H5D__scatter_file(const H5D_io_info_t *_io_info, const H5D_dset_io_info_t *_dset
/* Set up temporary I/O info object */
H5MM_memcpy(&tmp_io_info, _io_info, sizeof(*_io_info));
- memcpy(&tmp_dset_info, _dset_info, sizeof(*_dset_info));
+ H5MM_memcpy(&tmp_dset_info, _dset_info, sizeof(*_dset_info));
tmp_io_info.op_type = H5D_IO_OP_WRITE;
tmp_dset_info.buf.cvp = _buf;
tmp_io_info.dsets_info = &tmp_dset_info;
@@ -219,7 +219,7 @@ H5D__gather_file(const H5D_io_info_t *_io_info, const H5D_dset_io_info_t *_dset_
/* Set up temporary I/O info object */
H5MM_memcpy(&tmp_io_info, _io_info, sizeof(*_io_info));
- memcpy(&tmp_dset_info, _dset_info, sizeof(*_dset_info));
+ H5MM_memcpy(&tmp_dset_info, _dset_info, sizeof(*_dset_info));
tmp_io_info.op_type = H5D_IO_OP_READ;
tmp_dset_info.buf.vp = _buf;
tmp_io_info.dsets_info = &tmp_dset_info;
@@ -448,14 +448,14 @@ H5D__scatgath_read(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_
void *buf; /* Local pointer to application buffer */
void *tmp_buf; /* Buffer to use for type conversion */
H5S_sel_iter_t *mem_iter = NULL; /* Memory selection iteration info*/
- hbool_t mem_iter_init = FALSE; /* Memory selection iteration info has been initialized */
+ bool mem_iter_init = false; /* Memory selection iteration info has been initialized */
H5S_sel_iter_t *bkg_iter = NULL; /* Background iteration info*/
- hbool_t bkg_iter_init = FALSE; /* Background iteration info has been initialized */
+ bool bkg_iter_init = false; /* Background iteration info has been initialized */
H5S_sel_iter_t *file_iter = NULL; /* File selection iteration info*/
- hbool_t file_iter_init = FALSE; /* File selection iteration info has been initialized */
+ bool file_iter_init = false; /* File selection iteration info has been initialized */
hsize_t smine_start; /* Strip mine start loc */
size_t smine_nelmts; /* Elements per strip */
- hbool_t in_place_tconv; /* Whether to perform in-place type_conversion */
+ bool in_place_tconv; /* Whether to perform in-place type_conversion */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -483,10 +483,10 @@ H5D__scatgath_read(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_
* buffers), and the either entire I/O operation can fit in the type conversion buffer or we need to use a
* background buffer (and therefore could not do the I/O in one operation with in-place conversion
* anyways). */
- if (in_place_tconv && H5D__SCATGATH_USE_CMPD_OPT_READ(dset_info, FALSE) &&
+ if (in_place_tconv && H5D__SCATGATH_USE_CMPD_OPT_READ(dset_info, false) &&
(io_info->use_select_io != H5D_SELECTION_IO_MODE_ON) &&
(dset_info->type_info.need_bkg || (dset_info->nelmts <= dset_info->type_info.request_nelmts)))
- in_place_tconv = FALSE;
+ in_place_tconv = false;
/* Allocate the iterators */
if (NULL == (mem_iter = H5FL_MALLOC(H5S_sel_iter_t)))
@@ -500,13 +500,13 @@ H5D__scatgath_read(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_
if (H5S_select_iter_init(file_iter, dset_info->file_space, dset_info->type_info.src_type_size,
H5S_SEL_ITER_GET_SEQ_LIST_SORTED) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize file selection information");
- file_iter_init = TRUE; /*file selection iteration info has been initialized */
+ file_iter_init = true; /*file selection iteration info has been initialized */
if (H5S_select_iter_init(mem_iter, dset_info->mem_space, dset_info->type_info.dst_type_size, 0) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize memory selection information");
- mem_iter_init = TRUE; /*file selection iteration info has been initialized */
+ mem_iter_init = true; /*file selection iteration info has been initialized */
if (H5S_select_iter_init(bkg_iter, dset_info->mem_space, dset_info->type_info.dst_type_size, 0) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize background selection information");
- bkg_iter_init = TRUE; /*file selection iteration info has been initialized */
+ bkg_iter_init = true; /*file selection iteration info has been initialized */
/* Start strip mining... */
for (smine_start = 0; smine_start < dset_info->nelmts; smine_start += smine_nelmts) {
@@ -633,14 +633,14 @@ H5D__scatgath_write(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset
const void *buf; /* Local pointer to application buffer */
void *tmp_buf; /* Buffer to use for type conversion */
H5S_sel_iter_t *mem_iter = NULL; /* Memory selection iteration info*/
- hbool_t mem_iter_init = FALSE; /* Memory selection iteration info has been initialized */
+ bool mem_iter_init = false; /* Memory selection iteration info has been initialized */
H5S_sel_iter_t *bkg_iter = NULL; /* Background iteration info*/
- hbool_t bkg_iter_init = FALSE; /* Background iteration info has been initialized */
+ bool bkg_iter_init = false; /* Background iteration info has been initialized */
H5S_sel_iter_t *file_iter = NULL; /* File selection iteration info*/
- hbool_t file_iter_init = FALSE; /* File selection iteration info has been initialized */
+ bool file_iter_init = false; /* File selection iteration info has been initialized */
hsize_t smine_start; /* Strip mine start loc */
size_t smine_nelmts; /* Elements per strip */
- hbool_t in_place_tconv; /* Whether to perform in-place type_conversion */
+ bool in_place_tconv; /* Whether to perform in-place type_conversion */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -668,10 +668,10 @@ H5D__scatgath_write(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset
* buffers), and the either entire I/O operation can fit in the type conversion buffer or we need to use a
* background buffer (and therefore could not do the I/O in one operation with in-place conversion
* anyways). */
- if (in_place_tconv && H5D__SCATGATH_USE_CMPD_OPT_WRITE(dset_info, FALSE) &&
+ if (in_place_tconv && H5D__SCATGATH_USE_CMPD_OPT_WRITE(dset_info, false) &&
(io_info->use_select_io != H5D_SELECTION_IO_MODE_ON) &&
(dset_info->type_info.need_bkg || (dset_info->nelmts <= dset_info->type_info.request_nelmts)))
- in_place_tconv = FALSE;
+ in_place_tconv = false;
/* Allocate the iterators */
if (NULL == (mem_iter = H5FL_MALLOC(H5S_sel_iter_t)))
@@ -685,14 +685,14 @@ H5D__scatgath_write(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset
if (H5S_select_iter_init(file_iter, dset_info->file_space, dset_info->type_info.dst_type_size,
H5S_SEL_ITER_GET_SEQ_LIST_SORTED) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize file selection information");
- file_iter_init = TRUE; /*file selection iteration info has been initialized */
+ file_iter_init = true; /*file selection iteration info has been initialized */
if (H5S_select_iter_init(mem_iter, dset_info->mem_space, dset_info->type_info.src_type_size, 0) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize memory selection information");
- mem_iter_init = TRUE; /*file selection iteration info has been initialized */
+ mem_iter_init = true; /*file selection iteration info has been initialized */
if (H5S_select_iter_init(bkg_iter, dset_info->file_space, dset_info->type_info.dst_type_size,
H5S_SEL_ITER_GET_SEQ_LIST_SORTED) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize background selection information");
- bkg_iter_init = TRUE; /*file selection iteration info has been initialized */
+ bkg_iter_init = true; /*file selection iteration info has been initialized */
/* Start strip mining... */
for (smine_start = 0; smine_start < dset_info->nelmts; smine_start += smine_nelmts) {
@@ -718,7 +718,7 @@ H5D__scatgath_write(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset
/* Use "vp" field of union to twiddle away const. OK because if we're doing this it means the
* user explicitly allowed us to modify this buffer via H5Pset_modify_write_buf(). */
tmp_buf = (uint8_t *)dset_info->buf.vp + dset_info->layout_io_info.contig_piece_info->buf_off +
- (smine_start * dset_info->type_info.dst_type_size);
+ (smine_start * dset_info->type_info.src_type_size);
}
else {
/* Do type conversion using intermediate buffer */
@@ -817,7 +817,7 @@ H5D__scatgath_read_select(H5D_io_info_t *io_info)
{
H5S_t **tmp_mem_spaces = NULL; /* Memory spaces to use for read from disk */
H5S_sel_iter_t *mem_iter = NULL; /* Memory selection iteration info */
- hbool_t mem_iter_init = FALSE; /* Memory selection iteration info has been initialized */
+ bool mem_iter_init = false; /* Memory selection iteration info has been initialized */
void **tmp_bufs = NULL; /* Buffers to use for read from disk */
void *tmp_bkg_buf = NULL; /* Temporary background buffer pointer */
size_t tconv_bytes_used = 0; /* Number of bytes used so far in conversion buffer */
@@ -905,7 +905,7 @@ H5D__scatgath_read_select(H5D_io_info_t *io_info)
dset_info->type_info.dst_type_size, 0) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
"unable to initialize memory selection information");
- mem_iter_init = TRUE; /* Memory selection iteration info has been initialized */
+ mem_iter_init = true; /* Memory selection iteration info has been initialized */
if ((size_t)io_info->sel_pieces[i]->piece_points !=
H5D__gather_mem(io_info->rbufs[i], mem_iter,
@@ -917,7 +917,7 @@ H5D__scatgath_read_select(H5D_io_info_t *io_info)
assert(mem_iter_init);
if (H5S_SELECT_ITER_RELEASE(mem_iter) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release selection iterator");
- mem_iter_init = FALSE;
+ mem_iter_init = false;
}
}
}
@@ -949,7 +949,7 @@ H5D__scatgath_read_select(H5D_io_info_t *io_info)
0) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
"unable to initialize memory selection information");
- mem_iter_init = TRUE; /* Memory selection iteration info has been initialized */
+ mem_iter_init = true; /* Memory selection iteration info has been initialized */
/* If the source and destination are compound types and subset of each other
* and no conversion is needed, copy the data directly into user's buffer and
@@ -1006,7 +1006,7 @@ H5D__scatgath_read_select(H5D_io_info_t *io_info)
assert(mem_iter_init);
if (H5S_SELECT_ITER_RELEASE(mem_iter) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release selection iterator");
- mem_iter_init = FALSE;
+ mem_iter_init = false;
}
}
@@ -1049,7 +1049,7 @@ H5D__scatgath_write_select(H5D_io_info_t *io_info)
H5S_t **write_mem_spaces = NULL; /* Memory spaces to use for write to disk */
size_t spaces_added = 0; /* Number of spaces added to write_mem_spaces */
H5S_sel_iter_t *mem_iter = NULL; /* Memory selection iteration info */
- hbool_t mem_iter_init = FALSE; /* Memory selection iteration info has been initialized */
+ bool mem_iter_init = false; /* Memory selection iteration info has been initialized */
const void **write_bufs = NULL; /* Buffers to use for write to disk */
size_t tconv_bytes_used = 0; /* Number of bytes used so far in conversion buffer */
size_t bkg_bytes_used = 0; /* Number of bytes used so far in background buffer */
@@ -1113,7 +1113,7 @@ H5D__scatgath_write_select(H5D_io_info_t *io_info)
0) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
"unable to initialize memory selection information");
- mem_iter_init = TRUE; /* Memory selection iteration info has been initialized */
+ mem_iter_init = true; /* Memory selection iteration info has been initialized */
/* Create block memory space */
if (NULL ==
@@ -1244,7 +1244,7 @@ H5D__scatgath_write_select(H5D_io_info_t *io_info)
assert(mem_iter_init);
if (H5S_SELECT_ITER_RELEASE(mem_iter) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release selection iterator");
- mem_iter_init = FALSE;
+ mem_iter_init = false;
}
}
diff --git a/src/H5Dselect.c b/src/H5Dselect.c
index 06bb6968fda..e018da5b4a5 100644
--- a/src/H5Dselect.c
+++ b/src/H5Dselect.c
@@ -75,9 +75,9 @@ static herr_t
H5D__select_io(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_info, size_t elmt_size)
{
H5S_sel_iter_t *mem_iter = NULL; /* Memory selection iteration info */
- hbool_t mem_iter_init = FALSE; /* Memory selection iteration info has been initialized */
+ bool mem_iter_init = false; /* Memory selection iteration info has been initialized */
H5S_sel_iter_t *file_iter = NULL; /* File selection iteration info */
- hbool_t file_iter_init = FALSE; /* File selection iteration info has been initialized */
+ bool file_iter_init = false; /* File selection iteration info has been initialized */
hsize_t *mem_off = NULL; /* Pointer to sequence offsets in memory */
hsize_t *file_off = NULL; /* Pointer to sequence offsets in the file */
size_t *mem_len = NULL; /* Pointer to sequence lengths in memory */
@@ -278,8 +278,8 @@ H5D_select_io_mem(void *dst_buf, H5S_t *dst_space, const void *src_buf, H5S_t *s
{
H5S_sel_iter_t *dst_sel_iter = NULL; /* Destination dataspace iteration info */
H5S_sel_iter_t *src_sel_iter = NULL; /* Source dataspace iteration info */
- hbool_t dst_sel_iter_init = FALSE; /* Destination dataspace selection iterator initialized? */
- hbool_t src_sel_iter_init = FALSE; /* Source dataspace selection iterator initialized? */
+ bool dst_sel_iter_init = false; /* Destination dataspace selection iterator initialized? */
+ bool src_sel_iter_init = false; /* Source dataspace selection iterator initialized? */
hsize_t *dst_off = NULL; /* Pointer to sequence offsets in destination buffer */
hsize_t *src_off = NULL; /* Pointer to sequence offsets in source buffer */
size_t *dst_len = NULL; /* Pointer to sequence lengths in destination buffer */
@@ -364,12 +364,12 @@ H5D_select_io_mem(void *dst_buf, H5S_t *dst_space, const void *src_buf, H5S_t *s
/* Initialize destination selection iterator */
if (H5S_select_iter_init(dst_sel_iter, dst_space, elmt_size, sel_iter_flags) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator");
- dst_sel_iter_init = TRUE; /* Destination selection iteration info has been initialized */
+ dst_sel_iter_init = true; /* Destination selection iteration info has been initialized */
/* Initialize source selection iterator */
if (H5S_select_iter_init(src_sel_iter, src_space, elmt_size, H5S_SEL_ITER_SHARE_WITH_DATASPACE) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator");
- src_sel_iter_init = TRUE; /* Source selection iteration info has been initialized */
+ src_sel_iter_init = true; /* Source selection iteration info has been initialized */
/* Initialize sequence counts */
curr_dst_seq = curr_src_seq = 0;
diff --git a/src/H5Dsingle.c b/src/H5Dsingle.c
index 926c78afcfb..9cb18d35278 100644
--- a/src/H5Dsingle.c
+++ b/src/H5Dsingle.c
@@ -47,22 +47,22 @@
/********************/
/* Single Chunk Index chunking I/O ops */
-static herr_t H5D__single_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t *space,
- haddr_t dset_ohdr_addr);
-static herr_t H5D__single_idx_create(const H5D_chk_idx_info_t *idx_info);
-static hbool_t H5D__single_idx_is_space_alloc(const H5O_storage_chunk_t *storage);
-static herr_t H5D__single_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata,
- const H5D_t *dset);
-static herr_t H5D__single_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata);
-static int H5D__single_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t chunk_cb,
- void *chunk_udata);
-static herr_t H5D__single_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t *udata);
-static herr_t H5D__single_idx_delete(const H5D_chk_idx_info_t *idx_info);
-static herr_t H5D__single_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src,
- const H5D_chk_idx_info_t *idx_info_dst);
-static herr_t H5D__single_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *size);
-static herr_t H5D__single_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr);
-static herr_t H5D__single_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream);
+static herr_t H5D__single_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t *space,
+ haddr_t dset_ohdr_addr);
+static herr_t H5D__single_idx_create(const H5D_chk_idx_info_t *idx_info);
+static bool H5D__single_idx_is_space_alloc(const H5O_storage_chunk_t *storage);
+static herr_t H5D__single_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata,
+ const H5D_t *dset);
+static herr_t H5D__single_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata);
+static int H5D__single_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t chunk_cb,
+ void *chunk_udata);
+static herr_t H5D__single_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t *udata);
+static herr_t H5D__single_idx_delete(const H5D_chk_idx_info_t *idx_info);
+static herr_t H5D__single_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src,
+ const H5D_chk_idx_info_t *idx_info_dst);
+static herr_t H5D__single_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *size);
+static herr_t H5D__single_idx_reset(H5O_storage_chunk_t *storage, bool reset_addr);
+static herr_t H5D__single_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream);
/*********************/
/* Package Variables */
@@ -70,7 +70,7 @@ static herr_t H5D__single_idx_dump(const H5O_storage_chunk_t *storage, FILE *st
/* Non Index chunk I/O ops */
const H5D_chunk_ops_t H5D_COPS_SINGLE[1] = {{
- FALSE, /* Single Chunk indexing doesn't current support SWMR access */
+ false, /* Single Chunk indexing doesn't current support SWMR access */
H5D__single_idx_init, /* init */
H5D__single_idx_create, /* create */
H5D__single_idx_is_space_alloc, /* is_space_alloc */
@@ -174,7 +174,7 @@ H5D__single_idx_create(const H5D_chk_idx_info_t *idx_info)
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
H5D__single_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
{
FUNC_ENTER_PACKAGE_NOERR
@@ -182,7 +182,7 @@ H5D__single_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
/* Check args */
assert(storage);
- FUNC_LEAVE_NOAPI((hbool_t)H5_addr_defined(storage->idx_addr))
+ FUNC_LEAVE_NOAPI((bool)H5_addr_defined(storage->idx_addr))
} /* end H5D__single_idx_is_space_alloc() */
/*-------------------------------------------------------------------------
@@ -466,7 +466,7 @@ H5D__single_idx_size(const H5D_chk_idx_info_t H5_ATTR_UNUSED *idx_info, hsize_t
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__single_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
+H5D__single_idx_reset(H5O_storage_chunk_t *storage, bool reset_addr)
{
FUNC_ENTER_PACKAGE_NOERR
diff --git a/src/H5Dtest.c b/src/H5Dtest.c
index 0038d983936..5f700b38237 100644
--- a/src/H5Dtest.c
+++ b/src/H5Dtest.c
@@ -136,7 +136,7 @@ H5D__layout_contig_size_test(hid_t did, hsize_t *size)
USAGE
herr_t H5D__layout_compact_dirty_test(did, dirty)
hid_t did; IN: Dataset to query
- hbool_t *dirty; OUT: Pointer to location to place "dirty" info
+ bool *dirty; OUT: Pointer to location to place "dirty" info
RETURNS
Non-negative on success, negative on failure
DESCRIPTION
@@ -148,7 +148,7 @@ H5D__layout_contig_size_test(hid_t did, hsize_t *size)
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5D__layout_compact_dirty_test(hid_t did, hbool_t *dirty)
+H5D__layout_compact_dirty_test(hid_t did, bool *dirty)
{
H5D_t *dset; /* Pointer to dataset to query */
herr_t ret_value = SUCCEED; /* return value */
diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c
index 64f1bfe45d5..3ed78208bca 100644
--- a/src/H5Dvirtual.c
+++ b/src/H5Dvirtual.c
@@ -79,11 +79,11 @@
/********************/
/* Layout operation callbacks */
-static hbool_t H5D__virtual_is_data_cached(const H5D_shared_t *shared_dset);
-static herr_t H5D__virtual_io_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo);
-static herr_t H5D__virtual_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo);
-static herr_t H5D__virtual_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo);
-static herr_t H5D__virtual_flush(H5D_t *dset);
+static bool H5D__virtual_is_data_cached(const H5D_shared_t *shared_dset);
+static herr_t H5D__virtual_io_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo);
+static herr_t H5D__virtual_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo);
+static herr_t H5D__virtual_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo);
+static herr_t H5D__virtual_flush(H5D_t *dset);
/* Other functions */
static herr_t H5D__virtual_open_source_dset(const H5D_t *vdset, H5O_storage_virtual_ent_t *virtual_ent,
@@ -443,11 +443,11 @@ H5D__virtual_store_layout(H5F_t *f, H5O_layout_t *layout)
assert(ent->source_dset.virtual_select);
/* Source file name */
- str_size[2 * i] = HDstrlen(ent->source_file_name) + (size_t)1;
+ str_size[2 * i] = strlen(ent->source_file_name) + (size_t)1;
block_size += str_size[2 * i];
/* Source dset name */
- str_size[(2 * i) + 1] = HDstrlen(ent->source_dset_name) + (size_t)1;
+ str_size[(2 * i) + 1] = strlen(ent->source_dset_name) + (size_t)1;
block_size += str_size[(2 * i) + 1];
/* Source selection */
@@ -570,7 +570,7 @@ H5D__virtual_copy_layout(H5O_layout_t *layout)
/* Copy virtual selection */
if (NULL == (ent->source_dset.virtual_select =
- H5S_copy(orig_list[i].source_dset.virtual_select, FALSE, TRUE)))
+ H5S_copy(orig_list[i].source_dset.virtual_select, false, true)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy virtual selection");
/* Copy original source names */
@@ -580,7 +580,7 @@ H5D__virtual_copy_layout(H5O_layout_t *layout)
HGOTO_ERROR(H5E_DATASET, H5E_RESOURCE, FAIL, "unable to duplicate source dataset name");
/* Copy source selection */
- if (NULL == (ent->source_select = H5S_copy(orig_list[i].source_select, FALSE, TRUE)))
+ if (NULL == (ent->source_select = H5S_copy(orig_list[i].source_select, false, true)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy source selection");
/* Initialize clipped selections */
@@ -653,18 +653,18 @@ H5D__virtual_copy_layout(H5O_layout_t *layout)
if (orig_source_fapl >= 0) {
if (NULL == (plist = (H5P_genplist_t *)H5I_object_verify(orig_source_fapl, H5I_GENPROP_LST)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list");
- if ((virt->source_fapl = H5P_copy_plist(plist, FALSE)) < 0)
+ if ((virt->source_fapl = H5P_copy_plist(plist, false)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy fapl");
} /* end if */
if (orig_source_dapl >= 0) {
if (NULL == (plist = (H5P_genplist_t *)H5I_object_verify(orig_source_dapl, H5I_GENPROP_LST)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list");
- if ((virt->source_dapl = H5P_copy_plist(plist, FALSE)) < 0)
+ if ((virt->source_dapl = H5P_copy_plist(plist, false)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy dapl");
} /* end if */
/* New layout is not fully initialized */
- virt->init = FALSE;
+ virt->init = false;
done:
/* Release allocated resources on failure */
@@ -750,7 +750,7 @@ H5D__virtual_reset_layout(H5O_layout_t *layout)
}
/* The list is no longer initialized */
- virt->init = FALSE;
+ virt->init = false;
/* Note the lack of a done: label. This is because there are no HGOTO_ERROR
* calls. If one is added, a done: label must also be added */
@@ -854,9 +854,9 @@ static herr_t
H5D__virtual_open_source_dset(const H5D_t *vdset, H5O_storage_virtual_ent_t *virtual_ent,
H5O_storage_virtual_srcdset_t *source_dset)
{
- H5F_t *src_file = NULL; /* Source file */
- hbool_t src_file_open = FALSE; /* Whether we have opened and need to close src_file */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_t *src_file = NULL; /* Source file */
+ bool src_file_open = false; /* Whether we have opened and need to close src_file */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -868,7 +868,7 @@ H5D__virtual_open_source_dset(const H5D_t *vdset, H5O_storage_virtual_ent_t *vir
assert(source_dset->dset_name);
/* Check if we need to open the source file */
- if (HDstrcmp(source_dset->file_name, ".") != 0) {
+ if (strcmp(source_dset->file_name, ".") != 0) {
unsigned intent; /* File access permissions */
/* Get the virtual dataset's file open flags ("intent") */
@@ -881,7 +881,7 @@ H5D__virtual_open_source_dset(const H5D_t *vdset, H5O_storage_virtual_ent_t *vir
/* If we opened the source file here, we should close it when leaving */
if (src_file)
- src_file_open = TRUE;
+ src_file_open = true;
else
/* Reset the error stack */
H5E_clear_stack(NULL);
@@ -908,11 +908,11 @@ H5D__virtual_open_source_dset(const H5D_t *vdset, H5O_storage_virtual_ent_t *vir
/* Reset the error stack */
H5E_clear_stack(NULL);
- source_dset->dset_exists = FALSE;
+ source_dset->dset_exists = false;
} /* end if */
else {
/* Dataset exists */
- source_dset->dset_exists = TRUE;
+ source_dset->dset_exists = true;
/* Patch the source selection if necessary */
if (virtual_ent->source_space_status != H5O_VIRTUAL_STATUS_CORRECT) {
@@ -1115,12 +1115,12 @@ H5D_virtual_parse_source_name(const char *source_name, H5O_storage_virtual_name_
/* Initialize p and tmp_static_strlen */
p = source_name;
- tmp_static_strlen = tmp_strlen = HDstrlen(source_name);
+ tmp_static_strlen = tmp_strlen = strlen(source_name);
/* Iterate over name */
/* Note this will not work with UTF-8! We should support this eventually
* -NAF 5/18/2015 */
- while ((pct = HDstrchr(p, '%'))) {
+ while ((pct = strchr(p, '%'))) {
assert(pct >= p);
/* Allocate name segment struct if necessary */
@@ -1336,10 +1336,10 @@ H5D__virtual_build_source_name(char *source_name, const H5O_storage_virtual_name
do {
/* Add name segment */
if (name_seg->name_segment) {
- seg_len = HDstrlen(name_seg->name_segment);
+ seg_len = strlen(name_seg->name_segment);
assert(seg_len > 0);
assert(seg_len < name_len_rem);
- HDstrncpy(p, name_seg->name_segment, name_len_rem);
+ strncpy(p, name_seg->name_segment, name_len_rem);
name_len_rem -= seg_len;
p += seg_len;
} /* end if */
@@ -1347,7 +1347,7 @@ H5D__virtual_build_source_name(char *source_name, const H5O_storage_virtual_name
/* Add block number */
if (nsubs_rem > 0) {
assert(blockno_len < name_len_rem);
- if (HDsnprintf(p, name_len_rem, "%llu", (long long unsigned)blockno) < 0)
+ if (snprintf(p, name_len_rem, "%llu", (long long unsigned)blockno) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write block number to string");
name_len_rem -= blockno_len;
p += blockno_len;
@@ -1392,7 +1392,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset)
hsize_t curr_dims[H5S_MAX_RANK];
hsize_t clip_size;
int rank;
- hbool_t changed = FALSE; /* Whether the VDS extent changed */
+ bool changed = false; /* Whether the VDS extent changed */
size_t i, j;
herr_t ret_value = SUCCEED; /* Return value */
@@ -1473,7 +1473,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset)
/* Copy virtual selection */
if (NULL == (storage->list[i].source_dset.clipped_virtual_select = H5S_copy(
- storage->list[i].source_dset.virtual_select, FALSE, TRUE)))
+ storage->list[i].source_dset.virtual_select, false, true)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL,
"unable to copy virtual selection");
@@ -1496,7 +1496,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset)
/* Copy source selection */
if (NULL == (storage->list[i].source_dset.clipped_source_select =
- H5S_copy(storage->list[i].source_select, FALSE, TRUE)))
+ H5S_copy(storage->list[i].source_select, false, true)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL,
"unable to copy source selection");
@@ -1680,7 +1680,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset)
else if (new_dims[i] < storage->min_dims[i])
new_dims[i] = storage->min_dims[i];
if (new_dims[i] != curr_dims[i])
- changed = TRUE;
+ changed = true;
} /* end for */
/* Update extent if it changed */
@@ -1721,7 +1721,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset)
/* Copy virtual selection */
if (NULL == (storage->list[i].source_dset.clipped_virtual_select =
- H5S_copy(storage->list[i].source_dset.virtual_select, FALSE, TRUE)))
+ H5S_copy(storage->list[i].source_dset.virtual_select, false, true)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy virtual selection");
/* Clip space to virtual extent */
@@ -1733,7 +1733,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset)
* match size of virtual selection */
clip_size =
H5S_hyper_get_clip_extent(storage->list[i].source_select,
- storage->list[i].source_dset.clipped_virtual_select, FALSE);
+ storage->list[i].source_dset.clipped_virtual_select, false);
/* Check if the clip size changed */
if (clip_size != storage->list[i].clip_size_source) {
@@ -1748,7 +1748,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset)
/* Copy source selection */
if (NULL == (storage->list[i].source_dset.clipped_source_select =
- H5S_copy(storage->list[i].source_select, FALSE, TRUE)))
+ H5S_copy(storage->list[i].source_select, false, true)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy source selection");
/* Clip source selection */
@@ -1764,7 +1764,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset)
else {
/* printf mapping */
hsize_t first_inc_block;
- hbool_t partial_block;
+ bool partial_block;
/* Get index of first incomplete block in virtual
* selection */
@@ -1849,7 +1849,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset)
} /* end if */
/* Mark layout as fully initialized */
- storage->init = TRUE;
+ storage->init = true;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1918,7 +1918,7 @@ H5D__virtual_init_all(const H5D_t *dset)
* match size of virtual selection */
clip_size = H5S_hyper_get_clip_extent_match(
storage->list[i].source_select, storage->list[i].source_dset.virtual_select,
- virtual_dims[storage->list[i].unlim_dim_virtual], FALSE);
+ virtual_dims[storage->list[i].unlim_dim_virtual], false);
/* Close previous clipped virtual selection, if any */
if (storage->list[i].source_dset.clipped_virtual_select) {
@@ -1931,7 +1931,7 @@ H5D__virtual_init_all(const H5D_t *dset)
/* Copy virtual selection */
if (NULL == (storage->list[i].source_dset.clipped_virtual_select =
- H5S_copy(storage->list[i].source_dset.virtual_select, FALSE, TRUE)))
+ H5S_copy(storage->list[i].source_dset.virtual_select, false, true)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy virtual selection");
/* Close previous clipped source selection, if any */
@@ -1945,7 +1945,7 @@ H5D__virtual_init_all(const H5D_t *dset)
/* Copy source selection */
if (NULL == (storage->list[i].source_dset.clipped_source_select =
- H5S_copy(storage->list[i].source_select, FALSE, TRUE)))
+ H5S_copy(storage->list[i].source_select, false, true)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy source selection");
/* Check if the clip size is within the current extent of
@@ -1969,7 +1969,7 @@ H5D__virtual_init_all(const H5D_t *dset)
*/
clip_size = H5S_hyper_get_clip_extent_match(
storage->list[i].source_dset.virtual_select, storage->list[i].source_select,
- source_dims[storage->list[i].unlim_dim_source], FALSE);
+ source_dims[storage->list[i].unlim_dim_source], false);
/* Clip virtual selection to clip_size */
if (H5S_hyper_clip_unlim(storage->list[i].source_dset.clipped_virtual_select,
@@ -1991,8 +1991,8 @@ H5D__virtual_init_all(const H5D_t *dset)
} /* end if */
else {
/* printf mapping */
- size_t sub_dset_max;
- hbool_t partial_block;
+ size_t sub_dset_max;
+ bool partial_block;
/* Get number of sub-source datasets in current extent */
sub_dset_max = (size_t)H5S_hyper_get_first_inc_block(
@@ -2109,7 +2109,7 @@ H5D__virtual_init_all(const H5D_t *dset)
} /* end else */
/* Mark layout as fully initialized */
- storage->init = TRUE;
+ storage->init = true;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -2151,7 +2151,7 @@ H5D__virtual_init(H5F_t *f, const H5D_t *dset, hid_t dapl_id)
* status because this layout could be from an old version held in the
* object header message code. We cannot update that held message because
* the layout message is constant, so just overwrite the values here (and
- * invalidate other fields by setting storage->init to FALSE below). Also
+ * invalidate other fields by setting storage->init to false below). Also
* remove offset from selections. We only have to update
* source_space_status and virtual_space_status because others will be based
* on these and should therefore already have been normalized. */
@@ -2194,7 +2194,7 @@ H5D__virtual_init(H5F_t *f, const H5D_t *dset, hid_t dapl_id)
H5P_genplist_t *source_fapl = NULL; /* Source file FAPL */
H5F_close_degree_t close_degree = H5F_CLOSE_WEAK; /* Close degree for source files */
- if ((storage->source_fapl = H5F_get_access_plist(f, FALSE)) < 0)
+ if ((storage->source_fapl = H5F_get_access_plist(f, false)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get fapl");
/* Get property list pointer */
@@ -2224,12 +2224,12 @@ H5D__virtual_init(H5F_t *f, const H5D_t *dset, hid_t dapl_id)
/* Copy DAPL to layout */
if (storage->source_dapl <= 0)
- if ((storage->source_dapl = H5P_copy_plist(dapl, FALSE)) < 0)
+ if ((storage->source_dapl = H5P_copy_plist(dapl, false)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy dapl");
/* Mark layout as not fully initialized (must be done prior to I/O for
* unlimited/printf selections) */
- storage->init = FALSE;
+ storage->init = false;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -2240,25 +2240,25 @@ H5D__virtual_init(H5F_t *f, const H5D_t *dset, hid_t dapl_id)
*
* Purpose: Query if space is allocated for layout
*
- * Return: TRUE if space is allocated
- * FALSE if it is not
+ * Return: true if space is allocated
+ * false if it is not
* Negative on failure
*
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
H5D__virtual_is_space_alloc(const H5O_storage_t H5_ATTR_UNUSED *storage)
{
- hbool_t ret_value = FALSE; /* Return value */
+ bool ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
- /* Just return TRUE, since the global heap object containing the mappings is
+ /* Just return true, since the global heap object containing the mappings is
* created when the layout message is encoded, and nothing else needs to be
* allocated for virtual datasets. This also ensures that the library never
* assumes (falsely) that no data is present in the dataset, causing errors.
*/
- ret_value = TRUE;
+ ret_value = true;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__virtual_is_space_alloc() */
@@ -2272,12 +2272,12 @@ H5D__virtual_is_space_alloc(const H5O_storage_t H5_ATTR_UNUSED *storage)
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
H5D__virtual_is_data_cached(const H5D_shared_t *shared_dset)
{
const H5O_storage_virtual_t *storage; /* Convenience pointer */
size_t i, j; /* Local index variables */
- hbool_t ret_value = FALSE; /* Return value */
+ bool ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -2296,13 +2296,13 @@ H5D__virtual_is_data_cached(const H5D_shared_t *shared_dset)
storage->list[i].sub_dset[j].dset->shared->layout.ops->is_data_cached &&
storage->list[i].sub_dset[j].dset->shared->layout.ops->is_data_cached(
storage->list[i].sub_dset[j].dset->shared))
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
} /* end if */
else if (storage->list[i].source_dset.dset &&
storage->list[i].source_dset.dset->shared->layout.ops->is_data_cached &&
storage->list[i].source_dset.dset->shared->layout.ops->is_data_cached(
storage->list[i].source_dset.dset->shared))
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -2350,7 +2350,7 @@ H5D__virtual_pre_io(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_t *storag
hsize_t bounds_start[H5S_MAX_RANK]; /* Selection bounds start */
hsize_t bounds_end[H5S_MAX_RANK]; /* Selection bounds end */
int rank = 0;
- hbool_t bounds_init = FALSE; /* Whether bounds_start, bounds_end, and rank are valid */
+ bool bounds_init = false; /* Whether bounds_start, bounds_end, and rank are valid */
size_t i, j, k; /* Local index variables */
herr_t ret_value = SUCCEED; /* Return value */
@@ -2377,7 +2377,7 @@ H5D__virtual_pre_io(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_t *storag
/* Check for "printf" source dataset resolution */
if (storage->list[i].psfn_nsubs || storage->list[i].psdn_nsubs) {
- hbool_t partial_block;
+ bool partial_block;
assert(storage->list[i].unlim_dim_virtual >= 0);
@@ -2397,7 +2397,7 @@ H5D__virtual_pre_io(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_t *storag
bounds_end[j]++;
/* Bounds are now initialized */
- bounds_init = TRUE;
+ bounds_init = true;
} /* end if */
/* Get index of first block in virtual selection */
@@ -2462,7 +2462,7 @@ H5D__virtual_pre_io(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_t *storag
/* Copy virtual selection */
if (NULL == (storage->list[i].sub_dset[j].clipped_virtual_select =
- H5S_copy(storage->list[i].sub_dset[j].virtual_select, FALSE, TRUE)))
+ H5S_copy(storage->list[i].sub_dset[j].virtual_select, false, true)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy virtual selection");
/* Clip virtual selection to real virtual extent */
@@ -2477,7 +2477,7 @@ H5D__virtual_pre_io(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_t *storag
if (H5S_select_project_intersection(
storage->list[i].sub_dset[j].virtual_select, storage->list[i].source_select,
storage->list[i].sub_dset[j].clipped_virtual_select,
- &storage->list[i].sub_dset[j].clipped_source_select, TRUE) < 0)
+ &storage->list[i].sub_dset[j].clipped_source_select, true) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL,
"can't project virtual intersection onto memory space");
@@ -2499,7 +2499,7 @@ H5D__virtual_pre_io(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_t *storag
* onto memory space */
if (H5S_select_project_intersection(
file_space, mem_space, storage->list[i].sub_dset[j].clipped_virtual_select,
- &storage->list[i].sub_dset[j].projected_mem_space, TRUE) < 0)
+ &storage->list[i].sub_dset[j].projected_mem_space, true) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL,
"can't project virtual intersection onto memory space");
@@ -2544,7 +2544,7 @@ H5D__virtual_pre_io(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_t *storag
* memory space */
if (H5S_select_project_intersection(
file_space, mem_space, storage->list[i].source_dset.clipped_virtual_select,
- &storage->list[i].source_dset.projected_mem_space, TRUE) < 0)
+ &storage->list[i].source_dset.projected_mem_space, true) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL,
"can't project virtual intersection onto memory space");
@@ -2672,7 +2672,7 @@ H5D__virtual_read_one(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_srcdset
* mapping source space */
if (H5S_select_project_intersection(source_dset->clipped_virtual_select,
source_dset->clipped_source_select, dset_info->file_space,
- &projected_src_space, TRUE) < 0)
+ &projected_src_space, true) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL,
"can't project virtual intersection onto source space");
@@ -2779,7 +2779,7 @@ H5D__virtual_read(H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, H5D_dset_io_info
/* Always write fill value to memory buffer unless it is undefined */
if (fill_status != H5D_FILL_VALUE_UNDEFINED) {
/* Start with fill space equal to memory space */
- if (NULL == (fill_space = H5S_copy(dset_info->mem_space, FALSE, TRUE)))
+ if (NULL == (fill_space = H5S_copy(dset_info->mem_space, false, true)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy memory selection");
/* Iterate over mappings */
@@ -2869,7 +2869,7 @@ H5D__virtual_write_one(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_srcdse
* mapping source space */
if (H5S_select_project_intersection(source_dset->clipped_virtual_select,
source_dset->clipped_source_select, dset_info->file_space,
- &projected_src_space, TRUE) < 0)
+ &projected_src_space, true) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL,
"can't project virtual intersection onto source space");
@@ -3114,7 +3114,7 @@ H5D__virtual_refresh_source_dset(H5D_t **dset)
assert(dset && *dset);
/* Get a temporary identifier for this source dataset */
- if ((temp_id = H5VL_wrap_register(H5I_DATASET, *dset, FALSE)) < 0)
+ if ((temp_id = H5VL_wrap_register(H5I_DATASET, *dset, false)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "can't register (temporary) source dataset ID");
/* Refresh source dataset */
diff --git a/src/H5E.c b/src/H5E.c
index ea6f2012143..30fb376e575 100644
--- a/src/H5E.c
+++ b/src/H5E.c
@@ -170,11 +170,11 @@ H5E_init(void)
/* Allocate the HDF5 error class */
assert(H5E_ERR_CLS_g == (-1));
- HDsnprintf(lib_vers, sizeof(lib_vers), "%u.%u.%u%s", H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE,
- (HDstrlen(H5_VERS_SUBRELEASE) > 0 ? "-" H5_VERS_SUBRELEASE : ""));
+ snprintf(lib_vers, sizeof(lib_vers), "%u.%u.%u%s", H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE,
+ (strlen(H5_VERS_SUBRELEASE) > 0 ? "-" H5_VERS_SUBRELEASE : ""));
if (NULL == (cls = H5E__register_class(H5E_CLS_NAME, H5E_CLS_LIB_NAME, lib_vers)))
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "class initialization failed");
- if ((H5E_ERR_CLS_g = H5I_register(H5I_ERROR_CLASS, cls, FALSE)) < 0)
+ if ((H5E_ERR_CLS_g = H5I_register(H5I_ERROR_CLASS, cls, false)) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error class");
/* Include the automatically generated error code initialization */
@@ -227,11 +227,11 @@ H5E_term_package(void)
/* Clear any outstanding error stacks */
if (nstk > 0)
- (void)H5I_clear_type(H5I_ERROR_STACK, FALSE, FALSE);
+ (void)H5I_clear_type(H5I_ERROR_STACK, false, false);
/* Clear all the error classes */
if (ncls > 0) {
- (void)H5I_clear_type(H5I_ERROR_CLASS, FALSE, FALSE);
+ (void)H5I_clear_type(H5I_ERROR_CLASS, false, false);
/* Reset the HDF5 error class, if its been closed */
if (H5I_nmembers(H5I_ERROR_CLASS) == 0)
@@ -240,7 +240,7 @@ H5E_term_package(void)
/* Clear all the error messages */
if (nmsg > 0) {
- (void)H5I_clear_type(H5I_ERROR_MSG, FALSE, FALSE);
+ (void)H5I_clear_type(H5I_ERROR_MSG, false, false);
/* Reset the HDF5 error messages, if they've been closed */
if (H5I_nmembers(H5I_ERROR_MSG) == 0) {
@@ -286,7 +286,7 @@ H5E__set_default_auto(H5E_t *stk)
stk->auto_op.func1 = stk->auto_op.func1_default = (H5E_auto1_t)H5Eprint1;
stk->auto_op.func2 = stk->auto_op.func2_default = (H5E_auto2_t)H5E__print2;
- stk->auto_op.is_default = TRUE;
+ stk->auto_op.is_default = true;
#else /* H5_NO_DEPRECATED_SYMBOLS */
stk->auto_op.func2 = (H5E_auto2_t)H5E__print2;
#endif /* H5_NO_DEPRECATED_SYMBOLS */
@@ -401,7 +401,7 @@ H5Eregister_class(const char *cls_name, const char *lib_name, const char *versio
HGOTO_ERROR(H5E_ERROR, H5E_CANTCREATE, H5I_INVALID_HID, "can't create error class");
/* Register the new error class to get an ID for it */
- if ((ret_value = H5I_register(H5I_ERROR_CLASS, cls, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_ERROR_CLASS, cls, true)) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, H5I_INVALID_HID, "can't register error class");
done:
@@ -506,7 +506,7 @@ H5E__unregister_class(H5E_cls_t *cls, void H5_ATTR_UNUSED **request)
assert(cls);
/* Iterate over all the messages and delete those in this error class */
- if (H5I_iterate(H5I_ERROR_MSG, H5E__close_msg_cb, cls, FALSE) < 0)
+ if (H5I_iterate(H5I_ERROR_MSG, H5E__close_msg_cb, cls, false) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_BADITER, FAIL, "unable to free all messages in this error class");
/* Free error class structure */
@@ -569,11 +569,11 @@ H5E__get_class_name(const H5E_cls_t *cls, char *name, size_t size)
assert(cls);
/* Get the class's name */
- len = (ssize_t)HDstrlen(cls->cls_name);
+ len = (ssize_t)strlen(cls->cls_name);
/* Set the user's buffer, if provided */
if (name) {
- HDstrncpy(name, cls->cls_name, size);
+ strncpy(name, cls->cls_name, size);
if ((size_t)len >= size)
name[size - 1] = '\0';
} /* end if */
@@ -706,7 +706,7 @@ H5Ecreate_msg(hid_t class_id, H5E_type_t msg_type, const char *msg_str)
HGOTO_ERROR(H5E_ERROR, H5E_CANTCREATE, H5I_INVALID_HID, "can't create error message");
/* Register the new error class to get an ID for it */
- if ((ret_value = H5I_register(H5I_ERROR_MSG, msg, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_ERROR_MSG, msg, true)) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, H5I_INVALID_HID, "can't register error message");
done:
@@ -815,7 +815,7 @@ H5Ecreate_stack(void)
H5E__set_default_auto(stk);
/* Register the stack */
- if ((ret_value = H5I_register(H5I_ERROR_STACK, stk, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_ERROR_STACK, stk, true)) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, H5I_INVALID_HID, "can't create error stack");
done:
@@ -848,7 +848,7 @@ H5Eget_current_stack(void)
HGOTO_ERROR(H5E_ERROR, H5E_CANTCREATE, H5I_INVALID_HID, "can't create error stack");
/* Register the stack */
- if ((ret_value = H5I_register(H5I_ERROR_STACK, stk, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_ERROR_STACK, stk, true)) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, H5I_INVALID_HID, "can't create error stack");
done:
@@ -894,13 +894,13 @@ H5E__get_current_stack(void)
new_error = &(estack_copy->slot[u]);
/* Increment the IDs to indicate that they are used in this stack */
- if (H5I_inc_ref(current_error->cls_id, FALSE) < 0)
+ if (H5I_inc_ref(current_error->cls_id, false) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINC, NULL, "unable to increment ref count on error class");
new_error->cls_id = current_error->cls_id;
- if (H5I_inc_ref(current_error->maj_num, FALSE) < 0)
+ if (H5I_inc_ref(current_error->maj_num, false) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINC, NULL, "unable to increment ref count on error message");
new_error->maj_num = current_error->maj_num;
- if (H5I_inc_ref(current_error->min_num, FALSE) < 0)
+ if (H5I_inc_ref(current_error->min_num, false) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINC, NULL, "unable to increment ref count on error message");
new_error->min_num = current_error->min_num;
/* The 'func' & 'file' strings are statically allocated (by the compiler)
@@ -1009,13 +1009,13 @@ H5E__set_current_stack(H5E_t *estack)
new_error = &(estack->slot[u]);
/* Increment the IDs to indicate that they are used in this stack */
- if (H5I_inc_ref(new_error->cls_id, FALSE) < 0)
+ if (H5I_inc_ref(new_error->cls_id, false) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINC, FAIL, "unable to increment ref count on error class");
current_error->cls_id = new_error->cls_id;
- if (H5I_inc_ref(new_error->maj_num, FALSE) < 0)
+ if (H5I_inc_ref(new_error->maj_num, false) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINC, FAIL, "unable to increment ref count on error class");
current_error->maj_num = new_error->maj_num;
- if (H5I_inc_ref(new_error->min_num, FALSE) < 0)
+ if (H5I_inc_ref(new_error->min_num, false) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINC, FAIL, "unable to increment ref count on error class");
current_error->min_num = new_error->min_num;
/* The 'func' & 'file' strings are statically allocated (by the compiler)
@@ -1227,7 +1227,7 @@ H5Epush2(hid_t err_stack, const char *file, const char *func, unsigned line, hid
va_list ap; /* Varargs info */
H5E_t *estack; /* Pointer to error stack to modify */
char *tmp = NULL; /* Buffer to place formatted description in */
- hbool_t va_started = FALSE; /* Whether the variable argument list is open */
+ bool va_started = false; /* Whether the variable argument list is open */
herr_t ret_value = SUCCEED; /* Return value */
/* Don't clear the error stack! :-) */
@@ -1252,7 +1252,7 @@ H5Epush2(hid_t err_stack, const char *file, const char *func, unsigned line, hid
/* Format the description */
va_start(ap, fmt);
- va_started = TRUE;
+ va_started = true;
/* Use the vasprintf() routine, since it does what we're trying to do below */
if (HDvasprintf(&tmp, fmt, ap) < 0)
@@ -1373,7 +1373,7 @@ H5E__print2(hid_t err_stack, FILE *stream)
} /* end else */
/* Print error stack */
- if (H5E__print(estack, stream, FALSE) < 0)
+ if (H5E__print(estack, stream, false) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTLIST, FAIL, "can't display error stack");
done:
@@ -1528,9 +1528,9 @@ H5Eset_auto2(hid_t estack_id, H5E_auto2_t func, void *client_data)
/* Set the automatic error reporting information */
if (func != op.func2_default)
- op.is_default = FALSE;
+ op.is_default = false;
else
- op.is_default = TRUE;
+ op.is_default = true;
op.vers = 2;
#endif /* H5_NO_DEPRECATED_SYMBOLS */
@@ -1665,13 +1665,13 @@ H5E__append_stack(H5E_t *dst_stack, const H5E_t *src_stack)
dst_error = &(dst_stack->slot[dst_stack->nused]);
/* Increment the IDs to indicate that they are used in this stack */
- if (H5I_inc_ref(src_error->cls_id, FALSE) < 0)
+ if (H5I_inc_ref(src_error->cls_id, false) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINC, FAIL, "unable to increment ref count on error class");
dst_error->cls_id = src_error->cls_id;
- if (H5I_inc_ref(src_error->maj_num, FALSE) < 0)
+ if (H5I_inc_ref(src_error->maj_num, false) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINC, FAIL, "unable to increment ref count on error message");
dst_error->maj_num = src_error->maj_num;
- if (H5I_inc_ref(src_error->min_num, FALSE) < 0)
+ if (H5I_inc_ref(src_error->min_num, false) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINC, FAIL, "unable to increment ref count on error message");
dst_error->min_num = src_error->min_num;
/* The 'func' & 'file' strings are statically allocated (by the compiler)
diff --git a/src/H5EA.c b/src/H5EA.c
index 4b0446ba584..82b7da6cefa 100644
--- a/src/H5EA.c
+++ b/src/H5EA.c
@@ -63,10 +63,10 @@ typedef herr_t (*H5EA__unprotect_func_t)(void *thing, unsigned cache_flags);
/* Local Prototypes */
/********************/
-static herr_t H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, hbool_t will_extend, unsigned thing_acc,
+static herr_t H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, bool will_extend, unsigned thing_acc,
void **thing, uint8_t **thing_elmt_buf, hsize_t *thing_elmt_idx,
H5EA__unprotect_func_t *thing_unprot_func);
-static H5EA_t *H5EA__new(H5F_t *f, haddr_t ea_addr, hbool_t from_open, void *ctx_udata);
+static H5EA_t *H5EA__new(H5F_t *f, haddr_t ea_addr, bool from_open, void *ctx_udata);
/*********************/
/* Package Variables */
@@ -108,7 +108,7 @@ H5FL_BLK_DEFINE_STATIC(ea_native_elmt);
*-------------------------------------------------------------------------
*/
static H5EA_t *
-H5EA__new(H5F_t *f, haddr_t ea_addr, hbool_t from_open, void *ctx_udata)
+H5EA__new(H5F_t *f, haddr_t ea_addr, bool from_open, void *ctx_udata)
{
H5EA_t *ea = NULL; /* Pointer to new extensible array */
H5EA_hdr_t *hdr = NULL; /* The extensible array header information */
@@ -190,7 +190,7 @@ H5EA_create(H5F_t *f, const H5EA_create_t *cparam, void *ctx_udata)
HGOTO_ERROR(H5E_EARRAY, H5E_CANTINIT, NULL, "can't create extensible array header");
/* Allocate and initialize new extensible array wrapper */
- if (NULL == (ea = H5EA__new(f, ea_addr, FALSE, ctx_udata)))
+ if (NULL == (ea = H5EA__new(f, ea_addr, false, ctx_udata)))
HGOTO_ERROR(H5E_EARRAY, H5E_CANTINIT, NULL,
"allocation and/or initialization failed for extensible array wrapper");
@@ -228,7 +228,7 @@ H5EA_open(H5F_t *f, haddr_t ea_addr, void *ctx_udata)
assert(H5_addr_defined(ea_addr));
/* Allocate and initialize new extensible array wrapper */
- if (NULL == (ea = H5EA__new(f, ea_addr, TRUE, ctx_udata)))
+ if (NULL == (ea = H5EA__new(f, ea_addr, true, ctx_udata)))
HGOTO_ERROR(H5E_EARRAY, H5E_CANTINIT, NULL,
"allocation and/or initialization failed for extensible array wrapper");
@@ -303,7 +303,7 @@ H5EA_get_addr(const H5EA_t *ea, haddr_t *addr)
*-------------------------------------------------------------------------
*/
static herr_t
-H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, hbool_t will_extend, unsigned thing_acc, void **thing,
+H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, bool will_extend, unsigned thing_acc, void **thing,
uint8_t **thing_elmt_buf, hsize_t *thing_elmt_idx,
H5EA__unprotect_func_t *thing_unprot_func)
{
@@ -314,8 +314,8 @@ H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, hbool_t will_extend, unsigned t
H5EA_dblk_page_t *dblk_page = NULL; /* Pointer to data block page for EA */
unsigned iblock_cache_flags = H5AC__NO_FLAGS_SET; /* Flags to unprotecting index block */
unsigned sblock_cache_flags = H5AC__NO_FLAGS_SET; /* Flags to unprotecting super block */
- hbool_t stats_changed = FALSE; /* Whether array statistics changed */
- hbool_t hdr_dirty = FALSE; /* Whether the array header changed */
+ bool stats_changed = false; /* Whether array statistics changed */
+ bool hdr_dirty = false; /* Whether the array header changed */
herr_t ret_value = SUCCEED;
FUNC_ENTER_PACKAGE
@@ -347,7 +347,7 @@ H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, hbool_t will_extend, unsigned t
hdr->idx_blk_addr = H5EA__iblock_create(hdr, &stats_changed);
if (!H5_addr_defined(hdr->idx_blk_addr))
HGOTO_ERROR(H5E_EARRAY, H5E_CANTCREATE, FAIL, "unable to create index block");
- hdr_dirty = TRUE;
+ hdr_dirty = true;
} /* end if */
else
HGOTO_DONE(SUCCEED);
@@ -426,7 +426,7 @@ H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, hbool_t will_extend, unsigned t
H5E_EARRAY, H5E_CANTDEPEND, FAIL,
"unable to create flush dependency between data block and header, index = %llu",
(unsigned long long)idx);
- dblock->has_hdr_depend = TRUE;
+ dblock->has_hdr_depend = true;
} /* end if */
/* Set 'thing' info to refer to the data block */
@@ -501,7 +501,7 @@ H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, hbool_t will_extend, unsigned t
"unable to create flush dependency between super block and header, address "
"= %llu",
(unsigned long long)sblock->addr);
- sblock->has_hdr_depend = TRUE;
+ sblock->has_hdr_depend = true;
} /* end if */
} /* end if */
else
@@ -539,7 +539,7 @@ H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, hbool_t will_extend, unsigned t
HGOTO_ERROR(H5E_EARRAY, H5E_CANTCREATE, FAIL, "unable to create data block page");
/* Mark data block page as initialized in super block */
- H5VM_bit_set(sblock->page_init, page_init_idx, TRUE);
+ H5VM_bit_set(sblock->page_init, page_init_idx, true);
sblock_cache_flags |= H5AC__DIRTIED_FLAG;
} /* end if */
else
@@ -559,7 +559,7 @@ H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, hbool_t will_extend, unsigned t
"unable to create flush dependency between data block page and header, "
"index = %llu",
(unsigned long long)idx);
- dblk_page->has_hdr_depend = TRUE;
+ dblk_page->has_hdr_depend = true;
} /* end if */
/* Set 'thing' info to refer to the data block page */
@@ -583,7 +583,7 @@ H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, hbool_t will_extend, unsigned t
H5E_EARRAY, H5E_CANTDEPEND, FAIL,
"unable to create flush dependency between data block and header, index = %llu",
(unsigned long long)idx);
- dblock->has_hdr_depend = TRUE;
+ dblock->has_hdr_depend = true;
} /* end if */
/* Set 'thing' info to refer to the data block */
@@ -610,7 +610,7 @@ H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, hbool_t will_extend, unsigned t
/* Check for updating array statistics */
if (stats_changed)
- hdr_dirty = TRUE;
+ hdr_dirty = true;
/* Check for header modified */
if (hdr_dirty)
@@ -650,7 +650,7 @@ H5EA_set(const H5EA_t *ea, hsize_t idx, const void *elmt)
uint8_t *thing_elmt_buf; /* Pointer to the element buffer for the array metadata */
hsize_t thing_elmt_idx; /* Index of the element in the element buffer for the array metadata */
H5EA__unprotect_func_t thing_unprot_func; /* Function pointer for unprotecting the array metadata */
- hbool_t will_extend; /* Flag indicating if setting the element will extend the array */
+ bool will_extend; /* Flag indicating if setting the element will extend the array */
unsigned thing_cache_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting array metadata */
herr_t ret_value = SUCCEED;
@@ -734,7 +734,7 @@ H5EA_get(const H5EA_t *ea, hsize_t idx, void *elmt)
hdr->f = ea->f;
/* Look up the array metadata containing the element we want to set */
- if (H5EA__lookup_elmt(ea, idx, FALSE, H5AC__READ_ONLY_FLAG, &thing, &thing_elmt_buf, &thing_elmt_idx,
+ if (H5EA__lookup_elmt(ea, idx, false, H5AC__READ_ONLY_FLAG, &thing, &thing_elmt_buf, &thing_elmt_idx,
&thing_unprot_func) < 0)
HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, FAIL, "unable to protect array metadata");
@@ -815,7 +815,7 @@ H5EA_depend(H5EA_t *ea, H5AC_proxy_entry_t *parent)
herr_t
H5EA_close(H5EA_t *ea)
{
- hbool_t pending_delete = FALSE; /* Whether the array is pending deletion */
+ bool pending_delete = false; /* Whether the array is pending deletion */
haddr_t ea_addr = HADDR_UNDEF; /* Address of array (for deletion) */
herr_t ret_value = SUCCEED;
@@ -839,7 +839,7 @@ H5EA_close(H5EA_t *ea)
/* Set local info, so array deletion can occur after decrementing the
* header's ref count
*/
- pending_delete = TRUE;
+ pending_delete = true;
ea_addr = ea->hdr->addr;
} /* end if */
} /* end if */
@@ -930,7 +930,7 @@ H5EA_delete(H5F_t *f, haddr_t ea_addr, void *ctx_udata)
/* Check for files using shared array header */
if (hdr->file_rc)
- hdr->pending_delete = TRUE;
+ hdr->pending_delete = true;
else {
/* Set the shared array header's file context for this operation */
hdr->f = f;
diff --git a/src/H5EAcache.c b/src/H5EAcache.c
index d482141e40c..36494d3dec5 100644
--- a/src/H5EAcache.c
+++ b/src/H5EAcache.c
@@ -65,7 +65,7 @@
/* Metadata cache (H5AC) callbacks */
static herr_t H5EA__cache_hdr_get_initial_load_size(void *udata, size_t *image_len);
static htri_t H5EA__cache_hdr_verify_chksum(const void *image_ptr, size_t len, void *udata_ptr);
-static void *H5EA__cache_hdr_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty);
+static void *H5EA__cache_hdr_deserialize(const void *image, size_t len, void *udata, bool *dirty);
static herr_t H5EA__cache_hdr_image_len(const void *thing, size_t *image_len);
static herr_t H5EA__cache_hdr_serialize(const H5F_t *f, void *image, size_t len, void *thing);
static herr_t H5EA__cache_hdr_notify(H5AC_notify_action_t action, void *thing);
@@ -73,7 +73,7 @@ static herr_t H5EA__cache_hdr_free_icr(void *thing);
static herr_t H5EA__cache_iblock_get_initial_load_size(void *udata, size_t *image_len);
static htri_t H5EA__cache_iblock_verify_chksum(const void *image_ptr, size_t len, void *udata_ptr);
-static void *H5EA__cache_iblock_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty);
+static void *H5EA__cache_iblock_deserialize(const void *image, size_t len, void *udata, bool *dirty);
static herr_t H5EA__cache_iblock_image_len(const void *thing, size_t *image_len);
static herr_t H5EA__cache_iblock_serialize(const H5F_t *f, void *image, size_t len, void *thing);
static herr_t H5EA__cache_iblock_notify(H5AC_notify_action_t action, void *thing);
@@ -81,7 +81,7 @@ static herr_t H5EA__cache_iblock_free_icr(void *thing);
static herr_t H5EA__cache_sblock_get_initial_load_size(void *udata, size_t *image_len);
static htri_t H5EA__cache_sblock_verify_chksum(const void *image_ptr, size_t len, void *udata_ptr);
-static void *H5EA__cache_sblock_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty);
+static void *H5EA__cache_sblock_deserialize(const void *image, size_t len, void *udata, bool *dirty);
static herr_t H5EA__cache_sblock_image_len(const void *thing, size_t *image_len);
static herr_t H5EA__cache_sblock_serialize(const H5F_t *f, void *image, size_t len, void *thing);
static herr_t H5EA__cache_sblock_notify(H5AC_notify_action_t action, void *thing);
@@ -89,7 +89,7 @@ static herr_t H5EA__cache_sblock_free_icr(void *thing);
static herr_t H5EA__cache_dblock_get_initial_load_size(void *udata, size_t *image_len);
static htri_t H5EA__cache_dblock_verify_chksum(const void *image_ptr, size_t len, void *udata_ptr);
-static void *H5EA__cache_dblock_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty);
+static void *H5EA__cache_dblock_deserialize(const void *image, size_t len, void *udata, bool *dirty);
static herr_t H5EA__cache_dblock_image_len(const void *thing, size_t *image_len);
static herr_t H5EA__cache_dblock_serialize(const H5F_t *f, void *image, size_t len, void *thing);
static herr_t H5EA__cache_dblock_notify(H5AC_notify_action_t action, void *thing);
@@ -98,7 +98,7 @@ static herr_t H5EA__cache_dblock_fsf_size(const void *thing, hsize_t *fsf_size);
static herr_t H5EA__cache_dblk_page_get_initial_load_size(void *udata, size_t *image_len);
static htri_t H5EA__cache_dblk_page_verify_chksum(const void *image_ptr, size_t len, void *udata_ptr);
-static void *H5EA__cache_dblk_page_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty);
+static void *H5EA__cache_dblk_page_deserialize(const void *image, size_t len, void *udata, bool *dirty);
static herr_t H5EA__cache_dblk_page_image_len(const void *thing, size_t *image_len);
static herr_t H5EA__cache_dblk_page_serialize(const H5F_t *f, void *image, size_t len, void *thing);
static herr_t H5EA__cache_dblk_page_notify(H5AC_notify_action_t action, void *thing);
@@ -239,7 +239,7 @@ H5EA__cache_hdr_get_initial_load_size(void *_udata, size_t *image_len)
* Purpose: Verify the computed checksum of the data structure is the
* same as the stored chksum.
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: Negative
*
*-------------------------------------------------------------------------
@@ -250,7 +250,7 @@ H5EA__cache_hdr_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNUSE
const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
uint32_t stored_chksum; /* Stored metadata checksum value */
uint32_t computed_chksum; /* Computed metadata checksum value */
- htri_t ret_value = TRUE;
+ htri_t ret_value = true;
FUNC_ENTER_PACKAGE_NOERR
@@ -261,7 +261,7 @@ H5EA__cache_hdr_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNUSE
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
if (stored_chksum != computed_chksum)
- ret_value = FALSE;
+ ret_value = false;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5EA__cache_hdr_verify_chksum() */
@@ -277,7 +277,7 @@ H5EA__cache_hdr_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNUSE
*-------------------------------------------------------------------------
*/
static void *
-H5EA__cache_hdr_deserialize(const void *_image, size_t len, void *_udata, hbool_t H5_ATTR_UNUSED *dirty)
+H5EA__cache_hdr_deserialize(const void *_image, size_t len, void *_udata, bool H5_ATTR_UNUSED *dirty)
{
H5EA_cls_id_t id; /* ID of extensible array class, as found in file */
H5EA_hdr_t *hdr = NULL; /* Extensible array info */
@@ -629,7 +629,7 @@ H5EA__cache_iblock_get_initial_load_size(void *_udata, size_t *image_len)
* Purpose: Verify the computed checksum of the data structure is the
* same as the stored chksum.
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: Negative
*
*-------------------------------------------------------------------------
@@ -640,7 +640,7 @@ H5EA__cache_iblock_verify_chksum(const void *_image, size_t len, void H5_ATTR_UN
const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
uint32_t stored_chksum; /* Stored metadata checksum value */
uint32_t computed_chksum; /* Computed metadata checksum value */
- htri_t ret_value = TRUE;
+ htri_t ret_value = true;
FUNC_ENTER_PACKAGE_NOERR
@@ -651,7 +651,7 @@ H5EA__cache_iblock_verify_chksum(const void *_image, size_t len, void H5_ATTR_UN
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
if (stored_chksum != computed_chksum)
- ret_value = FALSE;
+ ret_value = false;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5EA__cache_iblock_verify_chksum() */
@@ -667,7 +667,7 @@ H5EA__cache_iblock_verify_chksum(const void *_image, size_t len, void H5_ATTR_UN
*-------------------------------------------------------------------------
*/
static void *
-H5EA__cache_iblock_deserialize(const void *_image, size_t len, void *_udata, hbool_t H5_ATTR_UNUSED *dirty)
+H5EA__cache_iblock_deserialize(const void *_image, size_t len, void *_udata, bool H5_ATTR_UNUSED *dirty)
{
H5EA_iblock_t *iblock = NULL; /* Index block info */
H5EA_hdr_t *hdr = (H5EA_hdr_t *)_udata; /* User data for callback */
@@ -1029,7 +1029,7 @@ H5EA__cache_sblock_get_initial_load_size(void *_udata, size_t *image_len)
* Purpose: Verify the computed checksum of the data structure is the
* same as the stored chksum.
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: Negative
*
*-------------------------------------------------------------------------
@@ -1040,7 +1040,7 @@ H5EA__cache_sblock_verify_chksum(const void *_image, size_t len, void H5_ATTR_UN
const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
uint32_t stored_chksum; /* Stored metadata checksum value */
uint32_t computed_chksum; /* Computed metadata checksum value */
- htri_t ret_value = TRUE;
+ htri_t ret_value = true;
FUNC_ENTER_PACKAGE_NOERR
@@ -1051,7 +1051,7 @@ H5EA__cache_sblock_verify_chksum(const void *_image, size_t len, void H5_ATTR_UN
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
if (stored_chksum != computed_chksum)
- ret_value = FALSE;
+ ret_value = false;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5EA__cache_sblock_verify_chksum() */
@@ -1067,7 +1067,7 @@ H5EA__cache_sblock_verify_chksum(const void *_image, size_t len, void H5_ATTR_UN
*-------------------------------------------------------------------------
*/
static void *
-H5EA__cache_sblock_deserialize(const void *_image, size_t len, void *_udata, hbool_t H5_ATTR_UNUSED *dirty)
+H5EA__cache_sblock_deserialize(const void *_image, size_t len, void *_udata, bool H5_ATTR_UNUSED *dirty)
{
H5EA_sblock_t *sblock = NULL; /* Super block info */
H5EA_sblock_cache_ud_t *udata = (H5EA_sblock_cache_ud_t *)_udata; /* User data */
@@ -1294,7 +1294,7 @@ H5EA__cache_sblock_notify(H5AC_notify_action_t action, void *_thing)
H5E_EARRAY, H5E_CANTUNDEPEND, FAIL,
"unable to destroy flush dependency between super block and header, address = %llu",
(unsigned long long)sblock->addr);
- sblock->has_hdr_depend = FALSE;
+ sblock->has_hdr_depend = false;
} /* end if */
break;
@@ -1313,7 +1313,7 @@ H5EA__cache_sblock_notify(H5AC_notify_action_t action, void *_thing)
H5E_EARRAY, H5E_CANTUNDEPEND, FAIL,
"unable to destroy flush dependency between super block and header, address = %llu",
(unsigned long long)sblock->addr);
- sblock->has_hdr_depend = FALSE;
+ sblock->has_hdr_depend = false;
} /* end if */
/* Detach from 'top' proxy for extensible array */
@@ -1435,7 +1435,7 @@ H5EA__cache_dblock_get_initial_load_size(void *_udata, size_t *image_len)
* Purpose: Verify the computed checksum of the data structure is the
* same as the stored chksum.
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: Negative
*
*-------------------------------------------------------------------------
@@ -1446,7 +1446,7 @@ H5EA__cache_dblock_verify_chksum(const void *_image, size_t len, void H5_ATTR_UN
const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
uint32_t stored_chksum; /* Stored metadata checksum value */
uint32_t computed_chksum; /* Computed metadata checksum value */
- htri_t ret_value = TRUE;
+ htri_t ret_value = true;
FUNC_ENTER_PACKAGE_NOERR
@@ -1457,7 +1457,7 @@ H5EA__cache_dblock_verify_chksum(const void *_image, size_t len, void H5_ATTR_UN
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
if (stored_chksum != computed_chksum)
- ret_value = FALSE;
+ ret_value = false;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5EA__cache_sblock_verify_chksum() */
@@ -1474,7 +1474,7 @@ H5EA__cache_dblock_verify_chksum(const void *_image, size_t len, void H5_ATTR_UN
*/
static void *
H5EA__cache_dblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len, void *_udata,
- hbool_t H5_ATTR_UNUSED *dirty)
+ bool H5_ATTR_UNUSED *dirty)
{
H5EA_dblock_t *dblock = NULL; /* Data block info */
H5EA_dblock_cache_ud_t *udata = (H5EA_dblock_cache_ud_t *)_udata; /* User data */
@@ -1699,7 +1699,7 @@ H5EA__cache_dblock_notify(H5AC_notify_action_t action, void *_thing)
H5E_EARRAY, H5E_CANTUNDEPEND, FAIL,
"unable to destroy flush dependency between direct block and header, address = %llu",
(unsigned long long)dblock->addr);
- dblock->has_hdr_depend = FALSE;
+ dblock->has_hdr_depend = false;
} /* end if */
break;
@@ -1718,7 +1718,7 @@ H5EA__cache_dblock_notify(H5AC_notify_action_t action, void *_thing)
H5E_EARRAY, H5E_CANTUNDEPEND, FAIL,
"unable to destroy flush dependency between data block and header, address = %llu",
(unsigned long long)dblock->addr);
- dblock->has_hdr_depend = FALSE;
+ dblock->has_hdr_depend = false;
} /* end if */
/* Detach from 'top' proxy for extensible array */
@@ -1856,7 +1856,7 @@ H5EA__cache_dblk_page_get_initial_load_size(void *_udata, size_t *image_len)
* Purpose: Verify the computed checksum of the data structure is the
* same as the stored chksum.
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: Negative
*
*-------------------------------------------------------------------------
@@ -1867,7 +1867,7 @@ H5EA__cache_dblk_page_verify_chksum(const void *_image, size_t len, void H5_ATTR
const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
uint32_t stored_chksum; /* Stored metadata checksum value */
uint32_t computed_chksum; /* Computed metadata checksum value */
- htri_t ret_value = TRUE;
+ htri_t ret_value = true;
FUNC_ENTER_PACKAGE_NOERR
@@ -1878,7 +1878,7 @@ H5EA__cache_dblk_page_verify_chksum(const void *_image, size_t len, void H5_ATTR
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
if (stored_chksum != computed_chksum)
- ret_value = FALSE;
+ ret_value = false;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5EA__cache_dblk_page_verify_chksum() */
@@ -1894,7 +1894,7 @@ H5EA__cache_dblk_page_verify_chksum(const void *_image, size_t len, void H5_ATTR
*-------------------------------------------------------------------------
*/
static void *
-H5EA__cache_dblk_page_deserialize(const void *_image, size_t len, void *_udata, hbool_t H5_ATTR_UNUSED *dirty)
+H5EA__cache_dblk_page_deserialize(const void *_image, size_t len, void *_udata, bool H5_ATTR_UNUSED *dirty)
{
H5EA_dblk_page_t *dblk_page = NULL; /* Data block page info */
H5EA_dblk_page_cache_ud_t *udata =
@@ -2069,7 +2069,7 @@ H5EA__cache_dblk_page_notify(H5AC_notify_action_t action, void *_thing)
"unable to destroy flush dependency between data block page and header, "
"address = %llu",
(unsigned long long)dblk_page->addr);
- dblk_page->has_hdr_depend = FALSE;
+ dblk_page->has_hdr_depend = false;
} /* end if */
break;
@@ -2088,7 +2088,7 @@ H5EA__cache_dblk_page_notify(H5AC_notify_action_t action, void *_thing)
"unable to destroy flush dependency between data block page and header, "
"address = %llu",
(unsigned long long)dblk_page->addr);
- dblk_page->has_hdr_depend = FALSE;
+ dblk_page->has_hdr_depend = false;
} /* end if */
/* Detach from 'top' proxy for extensible array */
diff --git a/src/H5EAdbg.c b/src/H5EAdbg.c
index 318448aa7b4..d744ac53d1c 100644
--- a/src/H5EAdbg.c
+++ b/src/H5EAdbg.c
@@ -229,7 +229,7 @@ H5EA__iblock_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int inde
fprintf(stream, "%*sData Block Addresses in Index Block:\n", indent, "");
for (u = 0; u < iblock->ndblk_addrs; u++) {
/* Print address */
- HDsnprintf(temp_str, sizeof(temp_str), "Address #%u:", u);
+ snprintf(temp_str, sizeof(temp_str), "Address #%u:", u);
fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", (indent + 3), "", MAX(0, (fwidth - 3)), temp_str,
iblock->dblk_addrs[u]);
} /* end for */
@@ -244,7 +244,7 @@ H5EA__iblock_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int inde
fprintf(stream, "%*sSuper Block Addresses in Index Block:\n", indent, "");
for (u = 0; u < iblock->nsblk_addrs; u++) {
/* Print address */
- HDsnprintf(temp_str, sizeof(temp_str), "Address #%u:", u);
+ snprintf(temp_str, sizeof(temp_str), "Address #%u:", u);
fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", (indent + 3), "", MAX(0, (fwidth - 3)), temp_str,
iblock->sblk_addrs[u]);
} /* end for */
@@ -331,7 +331,7 @@ H5EA__sblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
fprintf(stream, "%*sData Block Addresses in Super Block:\n", indent, "");
for (u = 0; u < sblock->ndblks; u++) {
/* Print address */
- HDsnprintf(temp_str, sizeof(temp_str), "Address #%u:", u);
+ snprintf(temp_str, sizeof(temp_str), "Address #%u:", u);
fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", (indent + 3), "", MAX(0, (fwidth - 3)), temp_str,
sblock->dblk_addrs[u]);
} /* end for */
diff --git a/src/H5EAdblkpage.c b/src/H5EAdblkpage.c
index 3ebbcd753e1..c13b5196828 100644
--- a/src/H5EAdblkpage.c
+++ b/src/H5EAdblkpage.c
@@ -131,7 +131,7 @@ herr_t
H5EA__dblk_page_create(H5EA_hdr_t *hdr, H5EA_sblock_t *parent, haddr_t addr)
{
H5EA_dblk_page_t *dblk_page = NULL; /* Extensible array data block page */
- hbool_t inserted = FALSE; /* Whether the header was inserted into cache */
+ bool inserted = false; /* Whether the header was inserted into cache */
herr_t ret_value = SUCCEED;
FUNC_ENTER_PACKAGE
@@ -156,7 +156,7 @@ H5EA__dblk_page_create(H5EA_hdr_t *hdr, H5EA_sblock_t *parent, haddr_t addr)
/* Cache the new extensible array data block page */
if (H5AC_insert_entry(hdr->f, H5AC_EARRAY_DBLK_PAGE, dblk_page->addr, dblk_page, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_EARRAY, H5E_CANTINSERT, FAIL, "can't add extensible array data block page to cache");
- inserted = TRUE;
+ inserted = true;
/* Add data block page as child of 'top' proxy */
if (hdr->top_proxy) {
diff --git a/src/H5EAdblock.c b/src/H5EAdblock.c
index 64b01ed9e31..848985f0641 100644
--- a/src/H5EAdblock.c
+++ b/src/H5EAdblock.c
@@ -140,11 +140,11 @@ H5EA__dblock_alloc(H5EA_hdr_t *hdr, void *parent, size_t nelmts)
*-------------------------------------------------------------------------
*/
haddr_t
-H5EA__dblock_create(H5EA_hdr_t *hdr, void *parent, hbool_t *stats_changed, hsize_t dblk_off, size_t nelmts)
+H5EA__dblock_create(H5EA_hdr_t *hdr, void *parent, bool *stats_changed, hsize_t dblk_off, size_t nelmts)
{
H5EA_dblock_t *dblock = NULL; /* Extensible array data block */
haddr_t dblock_addr; /* Extensible array data block address */
- hbool_t inserted = FALSE; /* Whether the header was inserted into cache */
+ bool inserted = false; /* Whether the header was inserted into cache */
haddr_t ret_value = HADDR_UNDEF;
FUNC_ENTER_PACKAGE
@@ -182,7 +182,7 @@ H5EA__dblock_create(H5EA_hdr_t *hdr, void *parent, hbool_t *stats_changed, hsize
if (H5AC_insert_entry(hdr->f, H5AC_EARRAY_DBLOCK, dblock_addr, dblock, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_EARRAY, H5E_CANTINSERT, HADDR_UNDEF,
"can't add extensible array data block to cache");
- inserted = TRUE;
+ inserted = true;
/* Add data block as child of 'top' proxy */
if (hdr->top_proxy) {
@@ -200,7 +200,7 @@ H5EA__dblock_create(H5EA_hdr_t *hdr, void *parent, hbool_t *stats_changed, hsize
hdr->stats.stored.nelmts += nelmts;
/* Mark the statistics as changed */
- *stats_changed = TRUE;
+ *stats_changed = true;
/* Set address of data block to return */
ret_value = dblock_addr;
diff --git a/src/H5EAhdr.c b/src/H5EAhdr.c
index 1364d7b3351..348e5083b60 100644
--- a/src/H5EAhdr.c
+++ b/src/H5EAhdr.c
@@ -333,7 +333,7 @@ haddr_t
H5EA__hdr_create(H5F_t *f, const H5EA_create_t *cparam, void *ctx_udata)
{
H5EA_hdr_t *hdr = NULL; /* Extensible array header */
- hbool_t inserted = FALSE; /* Whether the header was inserted into cache */
+ bool inserted = false; /* Whether the header was inserted into cache */
haddr_t ret_value = HADDR_UNDEF;
FUNC_ENTER_PACKAGE
@@ -415,7 +415,7 @@ H5EA__hdr_create(H5F_t *f, const H5EA_create_t *cparam, void *ctx_udata)
/* Cache the new extensible array header */
if (H5AC_insert_entry(f, H5AC_EARRAY_HDR, hdr->addr, hdr, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_EARRAY, H5E_CANTINSERT, HADDR_UNDEF, "can't add extensible array header to cache");
- inserted = TRUE;
+ inserted = true;
/* Add header as child of 'top' proxy */
if (hdr->top_proxy)
diff --git a/src/H5EAiblock.c b/src/H5EAiblock.c
index 28ffcc3b055..086d0ad75fa 100644
--- a/src/H5EAiblock.c
+++ b/src/H5EAiblock.c
@@ -154,11 +154,11 @@ H5EA__iblock_alloc(H5EA_hdr_t *hdr)
*-------------------------------------------------------------------------
*/
haddr_t
-H5EA__iblock_create(H5EA_hdr_t *hdr, hbool_t *stats_changed)
+H5EA__iblock_create(H5EA_hdr_t *hdr, bool *stats_changed)
{
H5EA_iblock_t *iblock = NULL; /* Extensible array index block */
haddr_t iblock_addr; /* Extensible array index block address */
- hbool_t inserted = FALSE; /* Whether the header was inserted into cache */
+ bool inserted = false; /* Whether the header was inserted into cache */
haddr_t ret_value = HADDR_UNDEF;
FUNC_ENTER_PACKAGE
@@ -209,7 +209,7 @@ H5EA__iblock_create(H5EA_hdr_t *hdr, hbool_t *stats_changed)
if (H5AC_insert_entry(hdr->f, H5AC_EARRAY_IBLOCK, iblock_addr, iblock, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_EARRAY, H5E_CANTINSERT, HADDR_UNDEF,
"can't add extensible array index block to cache");
- inserted = TRUE;
+ inserted = true;
/* Add index block as child of 'top' proxy */
if (hdr->top_proxy) {
@@ -229,7 +229,7 @@ H5EA__iblock_create(H5EA_hdr_t *hdr, hbool_t *stats_changed)
hdr->stats.stored.nelmts += hdr->cparam.idx_blk_elmts;
/* Mark the statistics as changed */
- *stats_changed = TRUE;
+ *stats_changed = true;
/* Set address of index block to return */
ret_value = iblock_addr;
diff --git a/src/H5EApkg.h b/src/H5EApkg.h
index 5014cc50f70..90ba02a02d8 100644
--- a/src/H5EApkg.h
+++ b/src/H5EApkg.h
@@ -51,7 +51,7 @@
/* Size of the extensible array header on disk */
#define H5EA_HEADER_SIZE(sizeof_addr, sizeof_size) \
(/* General metadata fields */ \
- H5EA_METADATA_PREFIX_SIZE(TRUE) \
+ H5EA_METADATA_PREFIX_SIZE(true) \
\
/* General array information */ \
+ 1 /* Element Size */ \
@@ -83,7 +83,7 @@
/* Size of the extensible array index block on disk */
#define H5EA_IBLOCK_SIZE(i) \
(/* General metadata fields */ \
- H5EA_METADATA_PREFIX_SIZE(TRUE) \
+ H5EA_METADATA_PREFIX_SIZE(true) \
\
/* Sanity-checking fields */ \
+ (i)->hdr->sizeof_addr /* File address of array owning the block */ \
@@ -98,7 +98,7 @@
/* Size of the extensible array super block on disk */
#define H5EA_SBLOCK_SIZE(s) \
(/* General metadata fields */ \
- H5EA_METADATA_PREFIX_SIZE(TRUE) \
+ H5EA_METADATA_PREFIX_SIZE(true) \
\
/* Sanity-checking fields */ \
+ (s)->hdr->sizeof_addr /* File address of array owning the block */ \
@@ -114,7 +114,7 @@
/* Size of the extensible array data block prefix on disk */
#define H5EA_DBLOCK_PREFIX_SIZE(d) \
(/* General metadata fields */ \
- H5EA_METADATA_PREFIX_SIZE(TRUE) \
+ H5EA_METADATA_PREFIX_SIZE(true) \
\
/* Sanity-checking fields */ \
+ (d)->hdr->sizeof_addr /* File address of array owning the block */ \
@@ -185,7 +185,7 @@ typedef struct H5EA_hdr_t {
size_t size; /* Size of header in file */
H5F_t *f; /* Pointer to file for extensible array */
size_t file_rc; /* Reference count of files using array header */
- hbool_t pending_delete; /* Array is pending deletion */
+ bool pending_delete; /* Array is pending deletion */
size_t sizeof_addr; /* Size of file addresses */
size_t sizeof_size; /* Size of file sizes */
unsigned char arr_off_size; /* Size of array offsets (in bytes) */
@@ -201,7 +201,7 @@ typedef struct H5EA_hdr_t {
void *cb_ctx; /* Callback context */
/* SWMR / Flush dependency information (not stored) */
- hbool_t swmr_write; /* Flag indicating the file is opened with SWMR-write access */
+ bool swmr_write; /* Flag indicating the file is opened with SWMR-write access */
H5AC_proxy_entry_t *top_proxy; /* 'Top' proxy cache entry for all array entries */
void *parent; /* Pointer to 'top' proxy flush dependency
* parent, if it exists, otherwise NULL.
@@ -263,7 +263,7 @@ typedef struct H5EA_sblock_t {
size_t size; /* Size of index block on disk */
/* SWMR / Flush dependency information (not stored) */
- hbool_t has_hdr_depend; /* Whether this object has a flush dependency on the header */
+ bool has_hdr_depend; /* Whether this object has a flush dependency on the header */
H5AC_proxy_entry_t *top_proxy; /* "Top" proxy cache entry for all array entries */
H5EA_iblock_t *parent; /* Parent object for super block (index block) */
@@ -291,7 +291,7 @@ typedef struct H5EA_dblock_t {
size_t size; /* Size of data block on disk */
/* SWMR / Flush dependency information (not stored) */
- hbool_t has_hdr_depend; /* Whether this object has a flush dependency on the header */
+ bool has_hdr_depend; /* Whether this object has a flush dependency on the header */
H5AC_proxy_entry_t *top_proxy; /* 'Top' proxy cache entry for all array entries */
void *parent; /* Parent object for data block (index or super block) */
@@ -314,7 +314,7 @@ typedef struct H5EA_dbk_page_t {
size_t size; /* Size of data block page on disk */
/* SWMR / Flush dependency information (not stored) */
- hbool_t has_hdr_depend; /* Whether this object has a flush dependency on the header */
+ bool has_hdr_depend; /* Whether this object has a flush dependency on the header */
H5AC_proxy_entry_t *top_proxy; /* "Top" proxy cache entry for all array entries */
H5EA_sblock_t *parent; /* Parent object for data block page (super block) */
@@ -403,7 +403,7 @@ H5_DLL herr_t H5EA__hdr_dest(H5EA_hdr_t *hdr);
/* Index block routines */
H5_DLL H5EA_iblock_t *H5EA__iblock_alloc(H5EA_hdr_t *hdr);
-H5_DLL haddr_t H5EA__iblock_create(H5EA_hdr_t *hdr, hbool_t *stats_changed);
+H5_DLL haddr_t H5EA__iblock_create(H5EA_hdr_t *hdr, bool *stats_changed);
H5_DLL H5EA_iblock_t *H5EA__iblock_protect(H5EA_hdr_t *hdr, unsigned flags);
H5_DLL herr_t H5EA__iblock_unprotect(H5EA_iblock_t *iblock, unsigned cache_flags);
H5_DLL herr_t H5EA__iblock_delete(H5EA_hdr_t *hdr);
@@ -411,7 +411,7 @@ H5_DLL herr_t H5EA__iblock_dest(H5EA_iblock_t *iblock);
/* Super block routines */
H5_DLL H5EA_sblock_t *H5EA__sblock_alloc(H5EA_hdr_t *hdr, H5EA_iblock_t *parent, unsigned sblk_idx);
-H5_DLL haddr_t H5EA__sblock_create(H5EA_hdr_t *hdr, H5EA_iblock_t *parent, hbool_t *stats_changed,
+H5_DLL haddr_t H5EA__sblock_create(H5EA_hdr_t *hdr, H5EA_iblock_t *parent, bool *stats_changed,
unsigned sblk_idx);
H5_DLL H5EA_sblock_t *H5EA__sblock_protect(H5EA_hdr_t *hdr, H5EA_iblock_t *parent, haddr_t sblk_addr,
unsigned sblk_idx, unsigned flags);
@@ -422,7 +422,7 @@ H5_DLL herr_t H5EA__sblock_dest(H5EA_sblock_t *sblock);
/* Data block routines */
H5_DLL H5EA_dblock_t *H5EA__dblock_alloc(H5EA_hdr_t *hdr, void *parent, size_t nelmts);
-H5_DLL haddr_t H5EA__dblock_create(H5EA_hdr_t *hdr, void *parent, hbool_t *stats_changed, hsize_t dblk_off,
+H5_DLL haddr_t H5EA__dblock_create(H5EA_hdr_t *hdr, void *parent, bool *stats_changed, hsize_t dblk_off,
size_t nelmts);
H5_DLL unsigned H5EA__dblock_sblk_idx(const H5EA_hdr_t *hdr, hsize_t idx);
H5_DLL H5EA_dblock_t *H5EA__dblock_protect(H5EA_hdr_t *hdr, void *parent, haddr_t dblk_addr,
diff --git a/src/H5EAsblock.c b/src/H5EAsblock.c
index aeab902e8ee..75dd26acf96 100644
--- a/src/H5EAsblock.c
+++ b/src/H5EAsblock.c
@@ -167,12 +167,12 @@ H5EA__sblock_alloc(H5EA_hdr_t *hdr, H5EA_iblock_t *parent, unsigned sblk_idx)
*-------------------------------------------------------------------------
*/
haddr_t
-H5EA__sblock_create(H5EA_hdr_t *hdr, H5EA_iblock_t *parent, hbool_t *stats_changed, unsigned sblk_idx)
+H5EA__sblock_create(H5EA_hdr_t *hdr, H5EA_iblock_t *parent, bool *stats_changed, unsigned sblk_idx)
{
H5EA_sblock_t *sblock = NULL; /* Extensible array super block */
haddr_t sblock_addr; /* Extensible array super block address */
haddr_t tmp_addr = HADDR_UNDEF; /* Address value to fill data block addresses with */
- hbool_t inserted = FALSE; /* Whether the header was inserted into cache */
+ bool inserted = false; /* Whether the header was inserted into cache */
haddr_t ret_value = HADDR_UNDEF;
FUNC_ENTER_PACKAGE
@@ -205,7 +205,7 @@ H5EA__sblock_create(H5EA_hdr_t *hdr, H5EA_iblock_t *parent, hbool_t *stats_chang
if (H5AC_insert_entry(hdr->f, H5AC_EARRAY_SBLOCK, sblock_addr, sblock, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_EARRAY, H5E_CANTINSERT, HADDR_UNDEF,
"can't add extensible array super block to cache");
- inserted = TRUE;
+ inserted = true;
/* Add super block as child of 'top' proxy */
if (hdr->top_proxy) {
@@ -220,7 +220,7 @@ H5EA__sblock_create(H5EA_hdr_t *hdr, H5EA_iblock_t *parent, hbool_t *stats_chang
hdr->stats.stored.super_blk_size += sblock->size;
/* Mark the statistics as changed */
- *stats_changed = TRUE;
+ *stats_changed = true;
/* Set address of super block to return */
ret_value = sblock_addr;
diff --git a/src/H5EAtest.c b/src/H5EAtest.c
index 3f44e71ad64..13e7c98140a 100644
--- a/src/H5EAtest.c
+++ b/src/H5EAtest.c
@@ -301,7 +301,7 @@ H5EA__test_debug(FILE *stream, int indent, int fwidth, hsize_t idx, const void *
assert(elmt);
/* Print element */
- HDsnprintf(temp_str, sizeof(temp_str), "Element #%llu:", (unsigned long long)idx);
+ snprintf(temp_str, sizeof(temp_str), "Element #%llu:", (unsigned long long)idx);
fprintf(stream, "%*s%-*s %llu\n", indent, "", fwidth, temp_str,
(unsigned long long)*(const uint64_t *)elmt);
diff --git a/src/H5ES.c b/src/H5ES.c
index 0faedf2b05e..038b7199ccd 100644
--- a/src/H5ES.c
+++ b/src/H5ES.c
@@ -91,7 +91,7 @@ H5EScreate(void)
HGOTO_ERROR(H5E_EVENTSET, H5E_CANTCREATE, H5I_INVALID_HID, "can't create event set");
/* Register the new event set to get an ID for it */
- if ((ret_value = H5I_register(H5I_EVENTSET, es, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_EVENTSET, es, true)) < 0)
HGOTO_ERROR(H5E_EVENTSET, H5E_CANTREGISTER, H5I_INVALID_HID, "can't register event set");
done:
diff --git a/src/H5ESint.c b/src/H5ESint.c
index e1481329b87..dab683913d6 100644
--- a/src/H5ESint.c
+++ b/src/H5ESint.c
@@ -61,14 +61,14 @@ typedef struct H5ES_wait_ctx_t {
H5ES_t *es; /* Event set being operated on */
uint64_t timeout; /* Timeout for wait operation (in ns) */
size_t *num_in_progress; /* Count of # of operations that have not completed */
- hbool_t *op_failed; /* Flag to indicate an operation failed */
+ bool *op_failed; /* Flag to indicate an operation failed */
} H5ES_wait_ctx_t;
/* Callback context for cancel operations */
typedef struct H5ES_cancel_ctx_t {
- H5ES_t *es; /* Event set being operated on */
- size_t *num_not_canceled; /* Count of # of operations were not canceled */
- hbool_t *op_failed; /* Flag to indicate an operation failed */
+ H5ES_t *es; /* Event set being operated on */
+ size_t *num_not_canceled; /* Count of # of operations were not canceled */
+ bool *op_failed; /* Flag to indicate an operation failed */
} H5ES_cancel_ctx_t;
/* Callback context for get error info (gei) operations */
@@ -244,7 +244,7 @@ H5ES__insert(H5ES_t *es, H5VL_t *connector, void *request_token, const char *app
unsigned app_line, const char *caller, const char *api_args)
{
H5ES_event_t *ev = NULL; /* Event for request */
- hbool_t ev_inserted = FALSE; /* Flag to indicate that event is in active list */
+ bool ev_inserted = false; /* Flag to indicate that event is in active list */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -283,7 +283,7 @@ H5ES__insert(H5ES_t *es, H5VL_t *connector, void *request_token, const char *app
/* Append fully initialized event onto the event set's 'active' list */
H5ES__list_append(&es->active, ev);
- ev_inserted = TRUE;
+ ev_inserted = true;
/* Invoke the event set's 'insert' callback, if present */
if (es->ins_func)
@@ -322,7 +322,7 @@ H5ES_insert(hid_t es_id, H5VL_t *connector, void *token, const char *caller, con
H5RS_str_t *rs = NULL; /* Ref-counted string to compose formatted argument string in */
const char *api_args; /* Pointer to api_args string from ref-counted string */
va_list ap; /* Varargs for caller */
- hbool_t arg_started = FALSE; /* Whether the va_list has been started */
+ bool arg_started = false; /* Whether the va_list has been started */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -343,7 +343,7 @@ H5ES_insert(hid_t es_id, H5VL_t *connector, void *token, const char *caller, con
/* Start working on the API routines arguments */
va_start(ap, caller_args);
- arg_started = TRUE;
+ arg_started = true;
/* Copy the app source information */
(void)va_arg(ap, char *); /* Toss the 'app_file' parameter name */
@@ -359,7 +359,7 @@ H5ES_insert(hid_t es_id, H5VL_t *connector, void *token, const char *caller, con
/* Copy the string for the API routine's arguments */
/* (skip the six characters from the app's file, function and line # arguments) */
- assert(0 == HDstrncmp(caller_args, "*s*sIu", 6));
+ assert(0 == strncmp(caller_args, "*s*sIu", 6));
if (H5_trace_args(rs, caller_args + 6, ap) < 0)
HGOTO_ERROR(H5E_EVENTSET, H5E_CANTSET, FAIL, "can't create formatted API arguments");
if (NULL == (api_args = H5RS_get_str(rs)))
@@ -502,7 +502,7 @@ H5ES__handle_fail(H5ES_t *es, H5ES_event_t *ev)
assert(ev);
/* Set error flag for event set */
- es->err_occurred = TRUE;
+ es->err_occurred = true;
/* Remove event from normal list */
H5ES__list_remove(&es->active, ev);
@@ -643,7 +643,7 @@ H5ES__wait_cb(H5ES_event_t *ev, void *_ctx)
HGOTO_ERROR(H5E_EVENTSET, H5E_CANTRELEASE, H5_ITER_ERROR, "unable to release completed event");
/* Record the error */
- *ctx->op_failed = TRUE;
+ *ctx->op_failed = true;
/* Exit from the iteration */
ret_value = H5_ITER_STOP;
@@ -690,7 +690,7 @@ H5ES__wait_cb(H5ES_event_t *ev, void *_ctx)
*-------------------------------------------------------------------------
*/
herr_t
-H5ES__wait(H5ES_t *es, uint64_t timeout, size_t *num_in_progress, hbool_t *op_failed)
+H5ES__wait(H5ES_t *es, uint64_t timeout, size_t *num_in_progress, bool *op_failed)
{
H5ES_wait_ctx_t ctx; /* Iterator callback context info */
herr_t ret_value = SUCCEED; /* Return value */
@@ -704,7 +704,7 @@ H5ES__wait(H5ES_t *es, uint64_t timeout, size_t *num_in_progress, hbool_t *op_fa
/* Set user's parameters to known values */
*num_in_progress = 0;
- *op_failed = FALSE;
+ *op_failed = false;
/* Set up context for iterator callbacks */
ctx.es = es;
@@ -753,7 +753,7 @@ H5ES__cancel_cb(H5ES_event_t *ev, void *_ctx)
HGOTO_ERROR(H5E_EVENTSET, H5E_CANTSET, H5_ITER_ERROR, "unable to handle failed event");
/* Record the error */
- *ctx->op_failed = TRUE;
+ *ctx->op_failed = true;
/* Exit from the iteration */
ret_value = H5_ITER_STOP;
@@ -793,7 +793,7 @@ H5ES__cancel_cb(H5ES_event_t *ev, void *_ctx)
*-------------------------------------------------------------------------
*/
herr_t
-H5ES__cancel(H5ES_t *es, size_t *num_not_canceled, hbool_t *op_failed)
+H5ES__cancel(H5ES_t *es, size_t *num_not_canceled, bool *op_failed)
{
H5ES_cancel_ctx_t ctx; /* Iterator callback context info */
herr_t ret_value = SUCCEED; /* Return value */
@@ -807,7 +807,7 @@ H5ES__cancel(H5ES_t *es, size_t *num_not_canceled, hbool_t *op_failed)
/* Set user's parameters to known values */
*num_not_canceled = 0;
- *op_failed = FALSE;
+ *op_failed = false;
/* Set up context for iterator callbacks */
ctx.es = es;
diff --git a/src/H5ESpkg.h b/src/H5ESpkg.h
index 655efbbe8e3..f7c70e8f0c7 100644
--- a/src/H5ESpkg.h
+++ b/src/H5ESpkg.h
@@ -61,7 +61,7 @@ struct H5ES_t {
H5ES_event_list_t active; /* List of active events in set */
/* Failed events */
- hbool_t err_occurred; /* Flag for error from an operation */
+ bool err_occurred; /* Flag for error from an operation */
H5ES_event_list_t failed; /* List of failed events in set */
};
@@ -77,10 +77,10 @@ typedef int (*H5ES_list_iter_func_t)(H5ES_event_t *ev, void *ctx);
/******************************/
H5_DLL H5ES_t *H5ES__create(void);
H5_DLL herr_t H5ES__insert_request(H5ES_t *es, H5VL_t *connector, void *token);
-H5_DLL herr_t H5ES__wait(H5ES_t *es, uint64_t timeout, size_t *num_in_progress, hbool_t *op_failed);
+H5_DLL herr_t H5ES__wait(H5ES_t *es, uint64_t timeout, size_t *num_in_progress, bool *op_failed);
H5_DLL herr_t H5ES__get_requests(H5ES_t *es, H5_iter_order_t order, hid_t *connector_ids, void **requests,
size_t array_len);
-H5_DLL herr_t H5ES__cancel(H5ES_t *es, size_t *num_not_canceled, hbool_t *op_failed);
+H5_DLL herr_t H5ES__cancel(H5ES_t *es, size_t *num_not_canceled, bool *op_failed);
H5_DLL herr_t H5ES__get_err_info(H5ES_t *es, size_t num_err_info, H5ES_err_info_t err_info[],
size_t *num_cleared);
diff --git a/src/H5Edeprec.c b/src/H5Edeprec.c
index bb2954e394e..d4a2ee98a42 100644
--- a/src/H5Edeprec.c
+++ b/src/H5Edeprec.c
@@ -253,7 +253,7 @@ H5Eprint1(FILE *stream)
HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack");
/* Print error stack */
- if (H5E__print(estack, stream, TRUE) < 0)
+ if (H5E__print(estack, stream, true) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTLIST, FAIL, "can't display error stack");
done:
@@ -381,9 +381,9 @@ H5Eset_auto1(H5E_auto1_t func, void *client_data)
/* Set the automatic error reporting information */
auto_op.vers = 1;
if (func != auto_op.func1_default)
- auto_op.is_default = FALSE;
+ auto_op.is_default = false;
else
- auto_op.is_default = TRUE;
+ auto_op.is_default = true;
auto_op.func1 = func;
if (H5E__set_auto(estack, &auto_op, client_data) < 0)
diff --git a/src/H5Eint.c b/src/H5Eint.c
index 9db4e39d3d9..17d8fdd92cd 100644
--- a/src/H5Eint.c
+++ b/src/H5Eint.c
@@ -119,11 +119,11 @@ H5E__get_msg(const H5E_msg_t *msg, H5E_type_t *type, char *msg_str, size_t size)
assert(msg);
/* Get the length of the message string */
- len = (ssize_t)HDstrlen(msg->msg);
+ len = (ssize_t)strlen(msg->msg);
/* Copy the message into the user's buffer, if given */
if (msg_str) {
- HDstrncpy(msg_str, msg->msg, size);
+ strncpy(msg_str, msg->msg, size);
if ((size_t)len >= size)
msg_str[size - 1] = '\0';
} /* end if */
@@ -209,7 +209,7 @@ H5E__walk1_cb(int n, H5E_error1_t *err_desc, void *client_data)
cls_ptr = maj_ptr->cls;
/* Print error class header if new class */
- if (eprint->cls.lib_name == NULL || HDstrcmp(cls_ptr->lib_name, eprint->cls.lib_name) != 0) {
+ if (eprint->cls.lib_name == NULL || strcmp(cls_ptr->lib_name, eprint->cls.lib_name) != 0) {
/* update to the new class information */
if (cls_ptr->cls_name)
eprint->cls.cls_name = cls_ptr->cls_name;
@@ -245,7 +245,7 @@ H5E__walk1_cb(int n, H5E_error1_t *err_desc, void *client_data)
} /* end if */
/* Check for "real" error description - used to format output more nicely */
- if (err_desc->desc == NULL || HDstrlen(err_desc->desc) == 0)
+ if (err_desc->desc == NULL || strlen(err_desc->desc) == 0)
have_desc = 0;
/* Print error message */
@@ -333,7 +333,7 @@ H5E__walk2_cb(unsigned n, const H5E_error2_t *err_desc, void *client_data)
HGOTO_DONE(FAIL);
/* Print error class header if new class */
- if (eprint->cls.lib_name == NULL || HDstrcmp(cls_ptr->lib_name, eprint->cls.lib_name) != 0) {
+ if (eprint->cls.lib_name == NULL || strcmp(cls_ptr->lib_name, eprint->cls.lib_name) != 0) {
/* update to the new class information */
if (cls_ptr->cls_name)
eprint->cls.cls_name = cls_ptr->cls_name;
@@ -369,7 +369,7 @@ H5E__walk2_cb(unsigned n, const H5E_error2_t *err_desc, void *client_data)
} /* end if */
/* Check for "real" error description - used to format output more nicely */
- if (err_desc->desc == NULL || HDstrlen(err_desc->desc) == 0)
+ if (err_desc->desc == NULL || strlen(err_desc->desc) == 0)
have_desc = 0;
/* Print error message */
@@ -396,7 +396,7 @@ H5E__walk2_cb(unsigned n, const H5E_error2_t *err_desc, void *client_data)
*-------------------------------------------------------------------------
*/
herr_t
-H5E__print(const H5E_t *estack, FILE *stream, hbool_t bk_compatible)
+H5E__print(const H5E_t *estack, FILE *stream, bool bk_compatible)
{
H5E_print_t eprint; /* Callback information to pass to H5E_walk() */
H5E_walk_op_t walk_op; /* Error stack walking callback */
@@ -457,8 +457,8 @@ H5E__print(const H5E_t *estack, FILE *stream, hbool_t bk_compatible)
* CLIENT_DATA pointer passed to H5E_print.
*
* The function FUNC is also provided for backward compatibility.
- * When BK_COMPATIBLE is set to be TRUE, FUNC is used to be
- * compatible with older library. If BK_COMPATIBLE is FALSE,
+ * When BK_COMPATIBLE is set to be true, FUNC is used to be
+ * compatible with older library. If BK_COMPATIBLE is false,
* STACK_FUNC is used.
*
* Return: SUCCEED/FAIL
@@ -623,7 +623,7 @@ H5E_printf_stack(H5E_t *estack, const char *file, const char *func, unsigned lin
{
va_list ap; /* Varargs info */
char *tmp = NULL; /* Buffer to place formatted description in */
- hbool_t va_started = FALSE; /* Whether the variable argument list is open */
+ bool va_started = false; /* Whether the variable argument list is open */
herr_t ret_value = SUCCEED; /* Return value */
/*
@@ -648,7 +648,7 @@ H5E_printf_stack(H5E_t *estack, const char *file, const char *func, unsigned lin
/* Start the variable-argument parsing */
va_start(ap, fmt);
- va_started = TRUE;
+ va_started = true;
/* Use the vasprintf() routine, since it does what we're trying to do below */
if (HDvasprintf(&tmp, fmt, ap) < 0)
@@ -731,13 +731,13 @@ H5E__push_stack(H5E_t *estack, const char *file, const char *func, unsigned line
if (estack->nused < H5E_NSLOTS) {
/* Increment the IDs to indicate that they are used in this stack */
- if (H5I_inc_ref(cls_id, FALSE) < 0)
+ if (H5I_inc_ref(cls_id, false) < 0)
HGOTO_DONE(FAIL);
estack->slot[estack->nused].cls_id = cls_id;
- if (H5I_inc_ref(maj_id, FALSE) < 0)
+ if (H5I_inc_ref(maj_id, false) < 0)
HGOTO_DONE(FAIL);
estack->slot[estack->nused].maj_num = maj_id;
- if (H5I_inc_ref(min_id, FALSE) < 0)
+ if (H5I_inc_ref(min_id, false) < 0)
HGOTO_DONE(FAIL);
estack->slot[estack->nused].min_num = min_id;
/* The 'func' & 'file' strings are statically allocated (by the compiler)
@@ -882,7 +882,7 @@ H5E__pop(H5E_t *estack, size_t count)
*-------------------------------------------------------------------------
*/
herr_t
-H5E_dump_api_stack(hbool_t is_api)
+H5E_dump_api_stack(bool is_api)
{
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5Epkg.h b/src/H5Epkg.h
index c761179defa..546e389c971 100644
--- a/src/H5Epkg.h
+++ b/src/H5Epkg.h
@@ -63,7 +63,7 @@
#ifndef H5_NO_DEPRECATED_SYMBOLS
typedef struct {
unsigned vers; /* Which version callback to use */
- hbool_t is_default; /* If the printing function is the library's own. */
+ bool is_default; /* If the printing function is the library's own. */
H5E_auto1_t func1; /* Old-style callback, NO error stack param. */
H5E_auto2_t func2; /* New-style callback, with error stack param. */
H5E_auto1_t func1_default; /* The saved library's default function - old style. */
@@ -129,7 +129,7 @@ H5_DLL H5E_t *H5E__get_stack(void);
H5_DLL herr_t H5E__push_stack(H5E_t *estack, const char *file, const char *func, unsigned line, hid_t cls_id,
hid_t maj_id, hid_t min_id, const char *desc);
H5_DLL ssize_t H5E__get_msg(const H5E_msg_t *msg_ptr, H5E_type_t *type, char *msg, size_t size);
-H5_DLL herr_t H5E__print(const H5E_t *estack, FILE *stream, hbool_t bk_compat);
+H5_DLL herr_t H5E__print(const H5E_t *estack, FILE *stream, bool bk_compat);
H5_DLL herr_t H5E__walk(const H5E_t *estack, H5E_direction_t direction, const H5E_walk_op_t *op,
void *client_data);
H5_DLL herr_t H5E__get_auto(const H5E_t *estack, H5E_auto_op_t *op, void **client_data);
diff --git a/src/H5Eprivate.h b/src/H5Eprivate.h
index 995800256be..de812f33a71 100644
--- a/src/H5Eprivate.h
+++ b/src/H5Eprivate.h
@@ -41,7 +41,7 @@ typedef struct H5E_t H5E_t;
#define HCOMMON_ERROR(maj, min, ...) \
do { \
HERROR(maj, min, __VA_ARGS__); \
- err_occurred = TRUE; \
+ err_occurred = true; \
err_occurred = err_occurred; /* Shut GCC warnings up! */ \
} while (0)
@@ -122,7 +122,7 @@ typedef struct H5E_t H5E_t;
* considered as an API change \
*/ \
HDONE_ERROR(majorcode, minorcode, retcode, "%s, errno = %d, error message = '%s'", str, myerrno, \
- HDstrerror(myerrno)); \
+ strerror(myerrno)); \
}
#define HSYS_GOTO_ERROR(majorcode, minorcode, retcode, str) \
{ \
@@ -131,7 +131,7 @@ typedef struct H5E_t H5E_t;
* considered as an API change \
*/ \
HGOTO_ERROR(majorcode, minorcode, retcode, "%s, errno = %d, error message = '%s'", str, myerrno, \
- HDstrerror(myerrno)); \
+ strerror(myerrno)); \
}
#else /* H5_HAVE_WIN32_API */
/* On Windows we also emit the result of GetLastError(). This call returns a DWORD, which is always a
@@ -148,7 +148,7 @@ typedef struct H5E_t H5E_t;
*/ \
HDONE_ERROR(majorcode, minorcode, retcode, \
"%s, errno = %d, error message = '%s', Win32 GetLastError() = %" PRIu32 "", str, \
- myerrno, HDstrerror(myerrno), win_error); \
+ myerrno, strerror(myerrno), win_error); \
}
#define HSYS_GOTO_ERROR(majorcode, minorcode, retcode, str) \
{ \
@@ -159,7 +159,7 @@ typedef struct H5E_t H5E_t;
*/ \
HGOTO_ERROR(majorcode, minorcode, retcode, \
"%s, errno = %d, error message = '%s', Win32 GetLastError() = %" PRIu32 "", str, \
- myerrno, HDstrerror(myerrno), win_error); \
+ myerrno, strerror(myerrno), win_error); \
}
#endif /* H5_HAVE_WIN32_API */
@@ -188,6 +188,6 @@ H5_DLL herr_t H5E_init(void);
H5_DLL herr_t H5E_printf_stack(H5E_t *estack, const char *file, const char *func, unsigned line, hid_t cls_id,
hid_t maj_id, hid_t min_id, const char *fmt, ...) H5_ATTR_FORMAT(printf, 8, 9);
H5_DLL herr_t H5E_clear_stack(H5E_t *estack);
-H5_DLL herr_t H5E_dump_api_stack(hbool_t is_api);
+H5_DLL herr_t H5E_dump_api_stack(bool is_api);
#endif /* H5Eprivate_H */
diff --git a/src/H5Epublic.h b/src/H5Epublic.h
index 8db118b001c..b6cc1cb5303 100644
--- a/src/H5Epublic.h
+++ b/src/H5Epublic.h
@@ -310,7 +310,7 @@ H5_DLL hid_t H5Eget_current_stack(void);
*
* \details H5Eappend_stack() appends the messages from error stack
* \p src_stack_id to the error stack \p dst_stack_id.
- * If \p close_source_stack is \c TRUE, the source error stack
+ * If \p close_source_stack is \c true, the source error stack
* will be closed.
*
* \since 1.14.0
diff --git a/src/H5F.c b/src/H5F.c
index 692331eee40..e64782f36f0 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -268,19 +268,19 @@ H5Fget_obj_count(hid_t file_id, unsigned types)
udata.obj_count = 0;
if (types & H5F_OBJ_FILE)
- if (H5I_iterate(H5I_FILE, H5F__get_all_count_cb, &udata, TRUE) < 0)
+ if (H5I_iterate(H5I_FILE, H5F__get_all_count_cb, &udata, true) < 0)
HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over file IDs failed");
if (types & H5F_OBJ_DATASET)
- if (H5I_iterate(H5I_DATASET, H5F__get_all_count_cb, &udata, TRUE) < 0)
+ if (H5I_iterate(H5I_DATASET, H5F__get_all_count_cb, &udata, true) < 0)
HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over dataset IDs failed");
if (types & H5F_OBJ_GROUP)
- if (H5I_iterate(H5I_GROUP, H5F__get_all_count_cb, &udata, TRUE) < 0)
+ if (H5I_iterate(H5I_GROUP, H5F__get_all_count_cb, &udata, true) < 0)
HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over group IDs failed");
if (types & H5F_OBJ_DATATYPE)
- if (H5I_iterate(H5I_DATATYPE, H5F__get_all_count_cb, &udata, TRUE) < 0)
+ if (H5I_iterate(H5I_DATATYPE, H5F__get_all_count_cb, &udata, true) < 0)
HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over datatype IDs failed");
if (types & H5F_OBJ_ATTR)
- if (H5I_iterate(H5I_ATTR, H5F__get_all_count_cb, &udata, TRUE) < 0)
+ if (H5I_iterate(H5I_ATTR, H5F__get_all_count_cb, &udata, true) < 0)
HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over attribute IDs failed");
/* Set return value */
@@ -395,19 +395,19 @@ H5Fget_obj_ids(hid_t file_id, unsigned types, size_t max_objs, hid_t *oid_list /
udata.obj_count = 0;
if (types & H5F_OBJ_FILE)
- if (H5I_iterate(H5I_FILE, H5F__get_all_ids_cb, &udata, TRUE) < 0)
+ if (H5I_iterate(H5I_FILE, H5F__get_all_ids_cb, &udata, true) < 0)
HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over file IDs failed");
if (types & H5F_OBJ_DATASET)
- if (H5I_iterate(H5I_DATASET, H5F__get_all_ids_cb, &udata, TRUE) < 0)
+ if (H5I_iterate(H5I_DATASET, H5F__get_all_ids_cb, &udata, true) < 0)
HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over dataset IDs failed");
if (types & H5F_OBJ_GROUP)
- if (H5I_iterate(H5I_GROUP, H5F__get_all_ids_cb, &udata, TRUE) < 0)
+ if (H5I_iterate(H5I_GROUP, H5F__get_all_ids_cb, &udata, true) < 0)
HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over group IDs failed");
if (types & H5F_OBJ_DATATYPE)
- if (H5I_iterate(H5I_DATATYPE, H5F__get_all_ids_cb, &udata, TRUE) < 0)
+ if (H5I_iterate(H5I_DATATYPE, H5F__get_all_ids_cb, &udata, true) < 0)
HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over datatype IDs failed");
if (types & H5F_OBJ_ATTR)
- if (H5I_iterate(H5I_ATTR, H5F__get_all_ids_cb, &udata, TRUE) < 0)
+ if (H5I_iterate(H5I_ATTR, H5F__get_all_ids_cb, &udata, true) < 0)
HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over attribute IDs failed");
/* Set return value */
@@ -466,7 +466,7 @@ H5Fget_vfd_handle(hid_t file_id, hid_t fapl_id, void **file_handle /*out*/)
*
* Purpose: Check if the file can be opened with the given fapl.
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: -1 (includes file does not exist)
*
*-------------------------------------------------------------------------
@@ -475,7 +475,7 @@ htri_t
H5Fis_accessible(const char *filename, hid_t fapl_id)
{
H5VL_file_specific_args_t vol_cb_args; /* Arguments to VOL callback */
- hbool_t is_accessible = FALSE; /* Whether file is accessible */
+ bool is_accessible = false; /* Whether file is accessible */
htri_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -488,7 +488,7 @@ H5Fis_accessible(const char *filename, hid_t fapl_id)
/* Check the file access property list */
if (H5P_DEFAULT == fapl_id)
fapl_id = H5P_FILE_ACCESS_DEFAULT;
- else if (TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
+ else if (true != H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not file access property list");
/* Set up VOL callback arguments */
@@ -581,11 +581,11 @@ H5F__create_api_common(const char *filename, unsigned flags, hid_t fcpl_id, hid_
/* Check file creation property list */
if (H5P_DEFAULT == fcpl_id)
fcpl_id = H5P_FILE_CREATE_DEFAULT;
- else if (TRUE != H5P_isa_class(fcpl_id, H5P_FILE_CREATE))
+ else if (true != H5P_isa_class(fcpl_id, H5P_FILE_CREATE))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not file create property list");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&fapl_id, H5P_CLS_FACC, H5I_INVALID_HID, TRUE) < 0)
+ if (H5CX_set_apl(&fapl_id, H5P_CLS_FACC, H5I_INVALID_HID, true) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info");
/* Get the VOL info from the fapl */
@@ -614,7 +614,7 @@ H5F__create_api_common(const char *filename, unsigned flags, hid_t fcpl_id, hid_
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, H5I_INVALID_HID, "unable to create file");
/* Get an ID for the file */
- if ((ret_value = H5VL_register_using_vol_id(H5I_FILE, new_file, connector_prop.connector_id, TRUE)) < 0)
+ if ((ret_value = H5VL_register_using_vol_id(H5I_FILE, new_file, connector_prop.connector_id, true)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register file handle");
done:
@@ -775,7 +775,7 @@ H5F__open_api_common(const char *filename, unsigned flags, hid_t fapl_id, void *
"SWMR read access on a file open for read-write access is not allowed");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&fapl_id, H5P_CLS_FACC, H5I_INVALID_HID, TRUE) < 0)
+ if (H5CX_set_apl(&fapl_id, H5P_CLS_FACC, H5I_INVALID_HID, true) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info");
/* Get the VOL info from the fapl */
@@ -796,7 +796,7 @@ H5F__open_api_common(const char *filename, unsigned flags, hid_t fapl_id, void *
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, H5I_INVALID_HID, "unable to open file");
/* Get an ID for the file */
- if ((ret_value = H5VL_register_using_vol_id(H5I_FILE, new_file, connector_prop.connector_id, TRUE)) < 0)
+ if ((ret_value = H5VL_register_using_vol_id(H5I_FILE, new_file, connector_prop.connector_id, true)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register file handle");
done:
@@ -1139,7 +1139,7 @@ H5Fdelete(const char *filename, hid_t fapl_id)
H5P_genplist_t *plist; /* Property list pointer */
H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */
H5VL_file_specific_args_t vol_cb_args; /* Arguments to VOL callback */
- hbool_t is_accessible = FALSE; /* Whether file is accessible */
+ bool is_accessible = false; /* Whether file is accessible */
herr_t ret_value = SUCCEED;
FUNC_ENTER_API(FAIL)
@@ -1150,7 +1150,7 @@ H5Fdelete(const char *filename, hid_t fapl_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "no file name specified");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&fapl_id, H5P_CLS_FACC, H5I_INVALID_HID, TRUE) < 0)
+ if (H5CX_set_apl(&fapl_id, H5P_CLS_FACC, H5I_INVALID_HID, true) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set access property list info");
/* Get the VOL info from the fapl */
@@ -1226,7 +1226,7 @@ H5Fmount(hid_t loc_id, const char *name, hid_t child_id, hid_t plist_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "child_id parameter not a file ID");
if (H5P_DEFAULT == plist_id)
plist_id = H5P_FILE_MOUNT_DEFAULT;
- else if (TRUE != H5P_isa_class(plist_id, H5P_FILE_MOUNT))
+ else if (true != H5P_isa_class(plist_id, H5P_FILE_MOUNT))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "plist_id is not a file mount property list ID");
/* Set up collective metadata if appropriate */
@@ -1437,7 +1437,7 @@ H5F__reopen_api_common(hid_t file_id, void **token_ptr)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, H5I_INVALID_HID, "unable to reopen file");
/* Get an ID for the file */
- if ((ret_value = H5VL_register(H5I_FILE, reopen_file, vol_obj->connector, TRUE)) < 0)
+ if ((ret_value = H5VL_register(H5I_FILE, reopen_file, vol_obj->connector, true)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register file handle");
done:
diff --git a/src/H5FA.c b/src/H5FA.c
index cf4a1d98302..d30ea60cce3 100644
--- a/src/H5FA.c
+++ b/src/H5FA.c
@@ -55,7 +55,7 @@
/********************/
/* Local Prototypes */
/********************/
-static H5FA_t *H5FA__new(H5F_t *f, haddr_t fa_addr, hbool_t from_open, void *ctx_udata);
+static H5FA_t *H5FA__new(H5F_t *f, haddr_t fa_addr, bool from_open, void *ctx_udata);
/*********************/
/* Package Variables */
@@ -97,7 +97,7 @@ H5FL_BLK_DEFINE(fa_native_elmt);
*-------------------------------------------------------------------------
*/
static H5FA_t *
-H5FA__new(H5F_t *f, haddr_t fa_addr, hbool_t from_open, void *ctx_udata)
+H5FA__new(H5F_t *f, haddr_t fa_addr, bool from_open, void *ctx_udata)
{
H5FA_t *fa = NULL; /* Pointer to new fixed array */
H5FA_hdr_t *hdr = NULL; /* The fixed array header information */
@@ -178,7 +178,7 @@ H5FA_create(H5F_t *f, const H5FA_create_t *cparam, void *ctx_udata)
HGOTO_ERROR(H5E_FARRAY, H5E_CANTINIT, NULL, "can't create fixed array header");
/* Allocate and initialize new fixed array wrapper */
- if (NULL == (fa = H5FA__new(f, fa_addr, FALSE, ctx_udata)))
+ if (NULL == (fa = H5FA__new(f, fa_addr, false, ctx_udata)))
HGOTO_ERROR(H5E_FARRAY, H5E_CANTINIT, NULL,
"allocation and/or initialization failed for fixed array wrapper");
@@ -216,7 +216,7 @@ H5FA_open(H5F_t *f, haddr_t fa_addr, void *ctx_udata)
assert(H5_addr_defined(fa_addr));
/* Allocate and initialize new fixed array wrapper */
- if (NULL == (fa = H5FA__new(f, fa_addr, TRUE, ctx_udata)))
+ if (NULL == (fa = H5FA__new(f, fa_addr, true, ctx_udata)))
HGOTO_ERROR(H5E_FARRAY, H5E_CANTINIT, NULL,
"allocation and/or initialization failed for fixed array wrapper");
@@ -297,9 +297,9 @@ H5FA_set(const H5FA_t *fa, hsize_t idx, const void *elmt)
H5FA_dblk_page_t *dblk_page = NULL; /* Pointer to fixed array Data block page */
unsigned dblock_cache_flags = H5AC__NO_FLAGS_SET; /* Flags to unprotecting fixed array Data block */
unsigned dblk_page_cache_flags =
- H5AC__NO_FLAGS_SET; /* Flags to unprotecting FIxed Array Data block page */
- hbool_t hdr_dirty = FALSE; /* Whether header information changed */
- herr_t ret_value = SUCCEED;
+ H5AC__NO_FLAGS_SET; /* Flags to unprotecting FIxed Array Data block page */
+ bool hdr_dirty = false; /* Whether header information changed */
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(FAIL)
@@ -360,7 +360,7 @@ H5FA_set(const H5FA_t *fa, hsize_t idx, const void *elmt)
HGOTO_ERROR(H5E_FARRAY, H5E_CANTCREATE, FAIL, "unable to create data block page");
/* Mark data block page as initialized in data block */
- H5VM_bit_set(dblock->dblk_page_init, page_idx, TRUE);
+ H5VM_bit_set(dblock->dblk_page_init, page_idx, true);
dblock_cache_flags |= H5AC__DIRTIED_FLAG;
} /* end if */
@@ -505,7 +505,7 @@ H5FA_get(const H5FA_t *fa, hsize_t idx, void *elmt)
herr_t
H5FA_close(H5FA_t *fa)
{
- hbool_t pending_delete = FALSE; /* Whether the array is pending deletion */
+ bool pending_delete = false; /* Whether the array is pending deletion */
haddr_t fa_addr = HADDR_UNDEF; /* Address of array (for deletion) */
herr_t ret_value = SUCCEED;
@@ -529,7 +529,7 @@ H5FA_close(H5FA_t *fa)
/* Set local info, so array deletion can occur after decrementing the
* header's ref count
*/
- pending_delete = TRUE;
+ pending_delete = true;
fa_addr = fa->hdr->addr;
} /* end if */
} /* end if */
@@ -620,7 +620,7 @@ H5FA_delete(H5F_t *f, haddr_t fa_addr, void *ctx_udata)
/* Check for files using shared array header */
if (hdr->file_rc)
- hdr->pending_delete = TRUE;
+ hdr->pending_delete = true;
else {
/* Set the shared array header's file context for this operation */
hdr->f = f;
diff --git a/src/H5FAcache.c b/src/H5FAcache.c
index d61436068ab..6d9e22e6af7 100644
--- a/src/H5FAcache.c
+++ b/src/H5FAcache.c
@@ -63,7 +63,7 @@
/* Metadata cache (H5AC) callbacks */
static herr_t H5FA__cache_hdr_get_initial_load_size(void *udata, size_t *image_len);
static htri_t H5FA__cache_hdr_verify_chksum(const void *image_ptr, size_t len, void *udata_ptr);
-static void *H5FA__cache_hdr_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty);
+static void *H5FA__cache_hdr_deserialize(const void *image, size_t len, void *udata, bool *dirty);
static herr_t H5FA__cache_hdr_image_len(const void *thing, size_t *image_len);
static herr_t H5FA__cache_hdr_serialize(const H5F_t *f, void *image, size_t len, void *thing);
static herr_t H5FA__cache_hdr_notify(H5AC_notify_action_t action, void *thing);
@@ -71,7 +71,7 @@ static herr_t H5FA__cache_hdr_free_icr(void *thing);
static herr_t H5FA__cache_dblock_get_initial_load_size(void *udata, size_t *image_len);
static htri_t H5FA__cache_dblock_verify_chksum(const void *image_ptr, size_t len, void *udata_ptr);
-static void *H5FA__cache_dblock_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty);
+static void *H5FA__cache_dblock_deserialize(const void *image, size_t len, void *udata, bool *dirty);
static herr_t H5FA__cache_dblock_image_len(const void *thing, size_t *image_len);
static herr_t H5FA__cache_dblock_serialize(const H5F_t *f, void *image, size_t len, void *thing);
static herr_t H5FA__cache_dblock_notify(H5AC_notify_action_t action, void *thing);
@@ -80,7 +80,7 @@ static herr_t H5FA__cache_dblock_fsf_size(const void *thing, hsize_t *fsf_size);
static herr_t H5FA__cache_dblk_page_get_initial_load_size(void *udata, size_t *image_len);
static htri_t H5FA__cache_dblk_page_verify_chksum(const void *image_ptr, size_t len, void *udata_ptr);
-static void *H5FA__cache_dblk_page_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty);
+static void *H5FA__cache_dblk_page_deserialize(const void *image, size_t len, void *udata, bool *dirty);
static herr_t H5FA__cache_dblk_page_image_len(const void *thing, size_t *image_len);
static herr_t H5FA__cache_dblk_page_serialize(const H5F_t *f, void *image, size_t len, void *thing);
static herr_t H5FA__cache_dblk_page_notify(H5AC_notify_action_t action, void *thing);
@@ -185,7 +185,7 @@ H5FA__cache_hdr_get_initial_load_size(void *_udata, size_t *image_len)
* Purpose: Verify the computed checksum of the data structure is the
* same as the stored chksum.
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: Negative
*
*-------------------------------------------------------------------------
@@ -196,7 +196,7 @@ H5FA__cache_hdr_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNUSE
const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
uint32_t stored_chksum; /* Stored metadata checksum value */
uint32_t computed_chksum; /* Computed metadata checksum value */
- htri_t ret_value = TRUE;
+ htri_t ret_value = true;
FUNC_ENTER_PACKAGE_NOERR
@@ -207,7 +207,7 @@ H5FA__cache_hdr_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNUSE
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
if (stored_chksum != computed_chksum)
- ret_value = FALSE;
+ ret_value = false;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FA__cache_hdr_verify_chksum() */
@@ -224,7 +224,7 @@ H5FA__cache_hdr_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNUSE
*/
static void *
H5FA__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len, void *_udata,
- hbool_t H5_ATTR_UNUSED *dirty)
+ bool H5_ATTR_UNUSED *dirty)
{
H5FA_cls_id_t id; /* ID of fixed array class, as found in file */
H5FA_hdr_t *hdr = NULL; /* Fixed array info */
@@ -568,7 +568,7 @@ H5FA__cache_dblock_get_initial_load_size(void *_udata, size_t *image_len)
* Purpose: Verify the computed checksum of the data structure is the
* same as the stored chksum.
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: Negative
*
*-------------------------------------------------------------------------
@@ -579,7 +579,7 @@ H5FA__cache_dblock_verify_chksum(const void *_image, size_t len, void H5_ATTR_UN
const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
uint32_t stored_chksum; /* Stored metadata checksum value */
uint32_t computed_chksum; /* Computed metadata checksum value */
- htri_t ret_value = TRUE;
+ htri_t ret_value = true;
FUNC_ENTER_PACKAGE_NOERR
@@ -590,7 +590,7 @@ H5FA__cache_dblock_verify_chksum(const void *_image, size_t len, void H5_ATTR_UN
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
if (stored_chksum != computed_chksum)
- ret_value = FALSE;
+ ret_value = false;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FA__cache_dblock_verify_chksum() */
@@ -607,7 +607,7 @@ H5FA__cache_dblock_verify_chksum(const void *_image, size_t len, void H5_ATTR_UN
*/
static void *
H5FA__cache_dblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len, void *_udata,
- hbool_t H5_ATTR_UNUSED *dirty)
+ bool H5_ATTR_UNUSED *dirty)
{
H5FA_dblock_t *dblock = NULL; /* Data block info */
H5FA_dblock_cache_ud_t *udata = (H5FA_dblock_cache_ud_t *)_udata; /* User data for loading data block */
@@ -970,7 +970,7 @@ H5FA__cache_dblk_page_get_initial_load_size(void *_udata, size_t *image_len)
* Purpose: Verify the computed checksum of the data structure is the
* same as the stored chksum.
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: Negative
*
*-------------------------------------------------------------------------
@@ -981,7 +981,7 @@ H5FA__cache_dblk_page_verify_chksum(const void *_image, size_t len, void H5_ATTR
const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
uint32_t stored_chksum; /* Stored metadata checksum value */
uint32_t computed_chksum; /* Computed metadata checksum value */
- htri_t ret_value = TRUE;
+ htri_t ret_value = true;
FUNC_ENTER_PACKAGE_NOERR
@@ -992,7 +992,7 @@ H5FA__cache_dblk_page_verify_chksum(const void *_image, size_t len, void H5_ATTR
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
if (stored_chksum != computed_chksum)
- ret_value = FALSE;
+ ret_value = false;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FA__cache_dblk_page_verify_chksum() */
@@ -1008,7 +1008,7 @@ H5FA__cache_dblk_page_verify_chksum(const void *_image, size_t len, void H5_ATTR
*-------------------------------------------------------------------------
*/
static void *
-H5FA__cache_dblk_page_deserialize(const void *_image, size_t len, void *_udata, hbool_t H5_ATTR_UNUSED *dirty)
+H5FA__cache_dblk_page_deserialize(const void *_image, size_t len, void *_udata, bool H5_ATTR_UNUSED *dirty)
{
H5FA_dblk_page_t *dblk_page = NULL; /* Data block page info */
H5FA_dblk_page_cache_ud_t *udata =
diff --git a/src/H5FAdblkpage.c b/src/H5FAdblkpage.c
index d51f31a8695..89f346db403 100644
--- a/src/H5FAdblkpage.c
+++ b/src/H5FAdblkpage.c
@@ -134,7 +134,7 @@ herr_t
H5FA__dblk_page_create(H5FA_hdr_t *hdr, haddr_t addr, size_t nelmts)
{
H5FA_dblk_page_t *dblk_page = NULL; /* Fixed array data block page */
- hbool_t inserted = FALSE; /* Whether the header was inserted into cache */
+ bool inserted = false; /* Whether the header was inserted into cache */
herr_t ret_value = SUCCEED;
FUNC_ENTER_PACKAGE
@@ -166,7 +166,7 @@ H5FA__dblk_page_create(H5FA_hdr_t *hdr, haddr_t addr, size_t nelmts)
/* Cache the new fixed array data block page */
if (H5AC_insert_entry(hdr->f, H5AC_FARRAY_DBLK_PAGE, dblk_page->addr, dblk_page, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_FARRAY, H5E_CANTINSERT, FAIL, "can't add fixed array data block page to cache");
- inserted = TRUE;
+ inserted = true;
/* Add data block page as child of 'top' proxy */
if (hdr->top_proxy) {
diff --git a/src/H5FAdblock.c b/src/H5FAdblock.c
index e8cff4fdfc2..558d9bf732d 100644
--- a/src/H5FAdblock.c
+++ b/src/H5FAdblock.c
@@ -167,11 +167,11 @@ H5FA__dblock_alloc(H5FA_hdr_t *hdr)
*-------------------------------------------------------------------------
*/
haddr_t
-H5FA__dblock_create(H5FA_hdr_t *hdr, hbool_t *hdr_dirty)
+H5FA__dblock_create(H5FA_hdr_t *hdr, bool *hdr_dirty)
{
H5FA_dblock_t *dblock = NULL; /* Fixed array data block */
haddr_t dblock_addr; /* Fixed array data block address */
- hbool_t inserted = FALSE; /* Whether the header was inserted into cache */
+ bool inserted = false; /* Whether the header was inserted into cache */
haddr_t ret_value = HADDR_UNDEF;
FUNC_ENTER_PACKAGE
@@ -204,7 +204,7 @@ H5FA__dblock_create(H5FA_hdr_t *hdr, hbool_t *hdr_dirty)
/* Cache the new fixed array data block */
if (H5AC_insert_entry(hdr->f, H5AC_FARRAY_DBLOCK, dblock_addr, dblock, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_FARRAY, H5E_CANTINSERT, HADDR_UNDEF, "can't add fixed array data block to cache");
- inserted = TRUE;
+ inserted = true;
/* Add data block as child of 'top' proxy */
if (hdr->top_proxy) {
@@ -215,7 +215,7 @@ H5FA__dblock_create(H5FA_hdr_t *hdr, hbool_t *hdr_dirty)
} /* end if */
/* Mark the header dirty (for updating statistics) */
- *hdr_dirty = TRUE;
+ *hdr_dirty = true;
/* Set address of data block to return */
ret_value = dblock_addr;
diff --git a/src/H5FAhdr.c b/src/H5FAhdr.c
index 37d3e39de8b..cfe5001d03f 100644
--- a/src/H5FAhdr.c
+++ b/src/H5FAhdr.c
@@ -162,7 +162,7 @@ haddr_t
H5FA__hdr_create(H5F_t *f, const H5FA_create_t *cparam, void *ctx_udata)
{
H5FA_hdr_t *hdr = NULL; /* Fixed array header */
- hbool_t inserted = FALSE; /* Whether the header was inserted into cache */
+ bool inserted = false; /* Whether the header was inserted into cache */
haddr_t ret_value = HADDR_UNDEF;
FUNC_ENTER_PACKAGE
@@ -210,7 +210,7 @@ H5FA__hdr_create(H5F_t *f, const H5FA_create_t *cparam, void *ctx_udata)
/* Cache the new Fixed Array header */
if (H5AC_insert_entry(f, H5AC_FARRAY_HDR, hdr->addr, hdr, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_FARRAY, H5E_CANTINSERT, HADDR_UNDEF, "can't add fixed array header to cache");
- inserted = TRUE;
+ inserted = true;
/* Add header as child of 'top' proxy */
if (hdr->top_proxy)
diff --git a/src/H5FApkg.h b/src/H5FApkg.h
index c08e575370d..9c00171c81e 100644
--- a/src/H5FApkg.h
+++ b/src/H5FApkg.h
@@ -55,7 +55,7 @@
/* Size of the Fixed Array header on disk */
#define H5FA_HEADER_SIZE(sizeof_addr, sizeof_size) \
(/* General metadata fields */ \
- H5FA_METADATA_PREFIX_SIZE(TRUE) \
+ H5FA_METADATA_PREFIX_SIZE(true) \
\
/* General array information */ \
+ 1 /* Element Size */ \
@@ -78,7 +78,7 @@
/* Size of the Fixed Array data block prefix on disk */
#define H5FA_DBLOCK_PREFIX_SIZE(d) \
(/* General metadata fields */ \
- H5FA_METADATA_PREFIX_SIZE(TRUE) \
+ H5FA_METADATA_PREFIX_SIZE(true) \
\
/* Sanity-checking fields */ \
+ (d)->hdr->sizeof_addr /* File address of Fixed Array header owning the data block */ \
@@ -128,7 +128,7 @@ typedef struct H5FA_hdr_t {
size_t size; /* Size of header in file */
H5F_t *f; /* Pointer to file for fixed array */
size_t file_rc; /* Reference count of files using array header */
- hbool_t pending_delete; /* Array is pending deletion */
+ bool pending_delete; /* Array is pending deletion */
size_t sizeof_addr; /* Size of file addresses */
size_t sizeof_size; /* Size of file sizes */
@@ -136,7 +136,7 @@ typedef struct H5FA_hdr_t {
void *cb_ctx; /* Callback context */
/* SWMR / Flush dependency information (not stored) */
- hbool_t swmr_write; /* Flag indicating the file is opened with SWMR-write access */
+ bool swmr_write; /* Flag indicating the file is opened with SWMR-write access */
H5AC_proxy_entry_t *top_proxy; /* 'Top' proxy cache entry for all array entries */
void *parent; /* Pointer to 'top' proxy flush dependency
* parent, if it exists, otherwise NULL.
@@ -269,7 +269,7 @@ H5_DLL herr_t H5FA__hdr_dest(H5FA_hdr_t *hdr);
/* Data block routines */
H5_DLL H5FA_dblock_t *H5FA__dblock_alloc(H5FA_hdr_t *hdr);
-H5_DLL haddr_t H5FA__dblock_create(H5FA_hdr_t *hdr, hbool_t *hdr_dirty);
+H5_DLL haddr_t H5FA__dblock_create(H5FA_hdr_t *hdr, bool *hdr_dirty);
H5_DLL unsigned H5FA__dblock_sblk_idx(const H5FA_hdr_t *hdr, hsize_t idx);
H5_DLL H5FA_dblock_t *H5FA__dblock_protect(H5FA_hdr_t *hdr, haddr_t dblk_addr, unsigned flags);
H5_DLL herr_t H5FA__dblock_unprotect(H5FA_dblock_t *dblock, unsigned cache_flags);
diff --git a/src/H5FAtest.c b/src/H5FAtest.c
index abd9388c1ab..666b922fa27 100644
--- a/src/H5FAtest.c
+++ b/src/H5FAtest.c
@@ -284,7 +284,7 @@ H5FA__test_debug(FILE *stream, int indent, int fwidth, hsize_t idx, const void *
assert(elmt);
/* Print element */
- HDsnprintf(temp_str, sizeof(temp_str), "Element #%llu:", (unsigned long long)idx);
+ snprintf(temp_str, sizeof(temp_str), "Element #%llu:", (unsigned long long)idx);
fprintf(stream, "%*s%-*s %llu\n", indent, "", fwidth, temp_str,
(unsigned long long)*(const uint64_t *)elmt);
diff --git a/src/H5FD.c b/src/H5FD.c
index e2c32c6df1a..ae4b43946d8 100644
--- a/src/H5FD.c
+++ b/src/H5FD.c
@@ -139,7 +139,7 @@ H5FD_term_package(void)
FUNC_ENTER_NOAPI_NOINIT_NOERR
if (H5I_nmembers(H5I_VFL) > 0) {
- (void)H5I_clear_type(H5I_VFL, FALSE, FALSE);
+ (void)H5I_clear_type(H5I_VFL, false, false);
n++; /*H5I*/
} /* end if */
else {
@@ -231,7 +231,7 @@ H5FDregister(const H5FD_class_t *cls)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid free-list mapping");
/* Create the new class ID */
- if ((ret_value = H5FD_register(cls, sizeof(H5FD_class_t), TRUE)) < 0)
+ if ((ret_value = H5FD_register(cls, sizeof(H5FD_class_t), true)) < 0)
HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register file driver ID");
done:
@@ -255,7 +255,7 @@ H5FDregister(const H5FD_class_t *cls)
*-------------------------------------------------------------------------
*/
hid_t
-H5FD_register(const void *_cls, size_t size, hbool_t app_ref)
+H5FD_register(const void *_cls, size_t size, bool app_ref)
{
const H5FD_class_t *cls = (const H5FD_class_t *)_cls;
H5FD_class_t *saved = NULL;
@@ -307,7 +307,7 @@ H5FD_register(const void *_cls, size_t size, hbool_t app_ref)
htri_t
H5FDis_driver_registered_by_name(const char *driver_name)
{
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE1("t", "*s", driver_name);
@@ -335,7 +335,7 @@ H5FDis_driver_registered_by_name(const char *driver_name)
htri_t
H5FDis_driver_registered_by_value(H5FD_class_value_t driver_value)
{
- htri_t ret_value = FALSE;
+ htri_t ret_value = false;
FUNC_ENTER_API(FAIL)
H5TRACE1("t", "DV", driver_value);
@@ -413,7 +413,7 @@ H5FD_get_class(hid_t id)
if (NULL == (plist = (H5P_genplist_t *)H5I_object(id)))
HGOTO_ERROR(H5E_ID, H5E_BADID, NULL, "can't find object for ID");
- if (TRUE == H5P_isa_class(id, H5P_FILE_ACCESS)) {
+ if (true == H5P_isa_class(id, H5P_FILE_ACCESS)) {
H5FD_driver_prop_t driver_prop; /* Property for driver ID & info */
if (H5P_peek(plist, H5F_ACS_FILE_DRV_NAME, &driver_prop) < 0)
@@ -543,9 +543,9 @@ H5FD_sb_load(H5FD_t *file, const char *name, const uint8_t *buf)
/* Check if driver matches driver information saved. Unfortunately, we can't push this
* function to each specific driver because we're checking if the driver is correct.
*/
- if (!HDstrncmp(name, "NCSAfami", (size_t)8) && HDstrcmp(file->cls->name, "family") != 0)
+ if (!strncmp(name, "NCSAfami", (size_t)8) && strcmp(file->cls->name, "family") != 0)
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "family driver should be used");
- if (!HDstrncmp(name, "NCSAmult", (size_t)8) && HDstrcmp(file->cls->name, "multi") != 0)
+ if (!strncmp(name, "NCSAmult", (size_t)8) && strcmp(file->cls->name, "multi") != 0)
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "multi driver should be used");
/* Decode driver information */
@@ -695,7 +695,7 @@ H5FDopen(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
/* Check arguments */
if (H5P_DEFAULT == fapl_id)
fapl_id = H5P_FILE_ACCESS_DEFAULT;
- else if (TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
+ else if (true != H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list");
/* Call private function */
@@ -775,7 +775,7 @@ H5FD_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
* driver ID to prevent it from being freed while this file is open.
*/
file->driver_id = driver_prop.driver_id;
- if (H5I_inc_ref(file->driver_id, FALSE) < 0)
+ if (H5I_inc_ref(file->driver_id, false) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTINC, NULL, "unable to increment ref count on VFL driver");
file->cls = driver;
file->maxaddr = maxaddr;
@@ -1080,7 +1080,7 @@ H5FDalloc(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "zero-size request");
if (H5P_DEFAULT == dxpl_id)
dxpl_id = H5P_DATASET_XFER_DEFAULT;
- else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ else if (true != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, HADDR_UNDEF, "not a data transfer property list");
/* Set DXPL for operation */
@@ -1128,7 +1128,7 @@ H5FDfree(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t siz
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid request type");
if (H5P_DEFAULT == dxpl_id)
dxpl_id = H5P_DATASET_XFER_DEFAULT;
- else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ else if (true != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list");
/* Set DXPL for operation */
@@ -1419,7 +1419,7 @@ H5FDread(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size
/* Get the default dataset transfer property list if the user didn't provide one */
if (H5P_DEFAULT == dxpl_id)
dxpl_id = H5P_DATASET_XFER_DEFAULT;
- else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ else if (true != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list");
/* Set DXPL for operation */
@@ -1465,7 +1465,7 @@ H5FDwrite(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t siz
/* Get the default dataset transfer property list if the user didn't provide one */
if (H5P_DEFAULT == dxpl_id)
dxpl_id = H5P_DATASET_XFER_DEFAULT;
- else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ else if (true != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list");
/* Set DXPL for operation */
@@ -1542,7 +1542,7 @@ H5FDread_vector(H5FD_t *file, hid_t dxpl_id, uint32_t count, H5FD_mem_t types[],
dxpl_id = H5P_DATASET_XFER_DEFAULT;
}
else {
- if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ if (true != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list");
}
@@ -1616,7 +1616,7 @@ H5FDwrite_vector(H5FD_t *file, hid_t dxpl_id, uint32_t count, H5FD_mem_t types[]
dxpl_id = H5P_DATASET_XFER_DEFAULT;
}
else {
- if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ if (true != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list");
}
@@ -1714,7 +1714,7 @@ H5FDread_selection(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, uint32_t count,
dxpl_id = H5P_DATASET_XFER_DEFAULT;
}
else {
- if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ if (true != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list");
}
@@ -1811,7 +1811,7 @@ H5FDwrite_selection(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, uint32_t count
dxpl_id = H5P_DATASET_XFER_DEFAULT;
}
else {
- if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ if (true != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list");
}
@@ -1915,7 +1915,7 @@ H5FDread_vector_from_selection(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, uin
dxpl_id = H5P_DATASET_XFER_DEFAULT;
}
else {
- if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ if (true != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list");
}
@@ -2013,7 +2013,7 @@ H5FDwrite_vector_from_selection(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, ui
dxpl_id = H5P_DATASET_XFER_DEFAULT;
}
else {
- if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ if (true != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list");
}
@@ -2111,7 +2111,7 @@ H5FDread_from_selection(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, uint32_t c
dxpl_id = H5P_DATASET_XFER_DEFAULT;
}
else {
- if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ if (true != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list");
}
@@ -2208,7 +2208,7 @@ H5FDwrite_from_selection(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, uint32_t
dxpl_id = H5P_DATASET_XFER_DEFAULT;
}
else {
- if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ if (true != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list");
}
@@ -2248,7 +2248,7 @@ H5FDflush(H5FD_t *file, hid_t dxpl_id, hbool_t closing)
if (H5P_DEFAULT == dxpl_id)
dxpl_id = H5P_DATASET_XFER_DEFAULT;
- else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ else if (true != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list");
/* Set DXPL for operation */
@@ -2272,7 +2272,7 @@ H5FDflush(H5FD_t *file, hid_t dxpl_id, hbool_t closing)
*-------------------------------------------------------------------------
*/
herr_t
-H5FD_flush(H5FD_t *file, hbool_t closing)
+H5FD_flush(H5FD_t *file, bool closing)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -2314,7 +2314,7 @@ H5FDtruncate(H5FD_t *file, hid_t dxpl_id, hbool_t closing)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL");
if (H5P_DEFAULT == dxpl_id)
dxpl_id = H5P_DATASET_XFER_DEFAULT;
- else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ else if (true != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list");
/* Set DXPL for operation */
@@ -2338,7 +2338,7 @@ H5FDtruncate(H5FD_t *file, hid_t dxpl_id, hbool_t closing)
*-------------------------------------------------------------------------
*/
herr_t
-H5FD_truncate(H5FD_t *file, hbool_t closing)
+H5FD_truncate(H5FD_t *file, bool closing)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -2397,7 +2397,7 @@ H5FDlock(H5FD_t *file, hbool_t rw)
*-------------------------------------------------------------------------
*/
herr_t
-H5FD_lock(H5FD_t *file, hbool_t rw)
+H5FD_lock(H5FD_t *file, bool rw)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -2624,7 +2624,7 @@ H5FDget_vfd_handle(H5FD_t *file, hid_t fapl_id, void **file_handle /*out*/)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL");
if (!file->cls)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL");
- if (FALSE == H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
+ if (false == H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "fapl_id parameter is not a file access property list");
if (!file_handle)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle parameter cannot be NULL");
@@ -2729,7 +2729,7 @@ H5FD_get_base_addr(const H5FD_t *file)
*--------------------------------------------------------------------------
*/
herr_t
-H5FD_set_paged_aggr(H5FD_t *file, hbool_t paged)
+H5FD_set_paged_aggr(H5FD_t *file, bool paged)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -2800,7 +2800,7 @@ H5FDdelete(const char *filename, hid_t fapl_id)
if (H5P_DEFAULT == fapl_id)
fapl_id = H5P_FILE_ACCESS_DEFAULT;
- else if (TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
+ else if (true != H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
/* Call private function */
diff --git a/src/H5FDcore.c b/src/H5FDcore.c
index a48a31416f2..08b714dfa34 100644
--- a/src/H5FDcore.c
+++ b/src/H5FDcore.c
@@ -52,10 +52,10 @@ typedef struct H5FD_core_t {
haddr_t eoa; /* end of allocated region */
haddr_t eof; /* current allocated size */
size_t increment; /* multiples for mem allocation */
- hbool_t backing_store; /* write to file name on flush */
- hbool_t write_tracking; /* Whether to track writes */
+ bool backing_store; /* write to file name on flush */
+ bool write_tracking; /* Whether to track writes */
size_t bstore_page_size; /* backing store page size */
- hbool_t ignore_disabled_file_locks;
+ bool ignore_disabled_file_locks;
int fd; /* backing store file descriptor */
/* Information for determining uniqueness of a file with a backing store */
#ifndef H5_HAVE_WIN32_API
@@ -85,22 +85,22 @@ typedef struct H5FD_core_t {
HANDLE hFile; /* Native windows file handle */
#endif /* H5_HAVE_WIN32_API */
- hbool_t dirty; /* changes not saved? */
+ bool dirty; /* changes not saved? */
H5FD_file_image_callbacks_t fi_callbacks; /* file image callbacks */
H5SL_t *dirty_list; /* dirty parts of the file */
} H5FD_core_t;
/* Driver-specific file access properties */
typedef struct H5FD_core_fapl_t {
- size_t increment; /* how much to grow memory */
- hbool_t backing_store; /* write to file name on flush */
- hbool_t write_tracking; /* Whether to track writes */
- size_t page_size; /* Page size for tracked writes */
+ size_t increment; /* how much to grow memory */
+ bool backing_store; /* write to file name on flush */
+ bool write_tracking; /* Whether to track writes */
+ size_t page_size; /* Page size for tracked writes */
} H5FD_core_fapl_t;
/* Allocate memory in multiples of this size by default */
#define H5FD_CORE_INCREMENT 8192
-#define H5FD_CORE_WRITE_TRACKING_FLAG FALSE
+#define H5FD_CORE_WRITE_TRACKING_FLAG false
#define H5FD_CORE_WRITE_TRACKING_PAGE_SIZE 524288
/* These macros check for overflow of various quantities. These macros
@@ -140,9 +140,9 @@ static herr_t H5FD__core_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, ha
void *buf);
static herr_t H5FD__core_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, size_t size,
const void *buf);
-static herr_t H5FD__core_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
-static herr_t H5FD__core_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
-static herr_t H5FD__core_lock(H5FD_t *_file, hbool_t rw);
+static herr_t H5FD__core_flush(H5FD_t *_file, hid_t dxpl_id, bool closing);
+static herr_t H5FD__core_truncate(H5FD_t *_file, hid_t dxpl_id, bool closing);
+static herr_t H5FD__core_lock(H5FD_t *_file, bool rw);
static herr_t H5FD__core_unlock(H5FD_t *_file);
static herr_t H5FD__core_delete(const char *filename, hid_t fapl_id);
static inline const H5FD_core_fapl_t *H5FD__core_get_default_config(void);
@@ -192,8 +192,8 @@ static const H5FD_class_t H5FD_core_g = {
/* Default configurations, if none provided */
static const H5FD_core_fapl_t H5FD_core_default_config_g = {
- (size_t)H5_MB, TRUE, H5FD_CORE_WRITE_TRACKING_FLAG, H5FD_CORE_WRITE_TRACKING_PAGE_SIZE};
-static const H5FD_core_fapl_t H5FD_core_default_paged_config_g = {(size_t)H5_MB, TRUE, TRUE, (size_t)4096};
+ (size_t)H5_MB, true, H5FD_CORE_WRITE_TRACKING_FLAG, H5FD_CORE_WRITE_TRACKING_PAGE_SIZE};
+static const H5FD_core_fapl_t H5FD_core_default_paged_config_g = {(size_t)H5_MB, true, true, (size_t)4096};
/* Define a free list to manage the region type */
H5FL_DEFINE(H5FD_core_region_t);
@@ -216,7 +216,7 @@ H5FD__core_add_dirty_region(H5FD_core_t *file, haddr_t start, haddr_t end)
H5FD_core_region_t *item = NULL;
haddr_t b_addr = 0;
haddr_t a_addr = 0;
- hbool_t create_new_node = TRUE;
+ bool create_new_node = true;
herr_t ret_value = SUCCEED;
FUNC_ENTER_PACKAGE
@@ -257,7 +257,7 @@ H5FD__core_add_dirty_region(H5FD_core_t *file, haddr_t start, haddr_t end)
/* We won't need to insert a new node since we can
* just update an existing one instead.
*/
- create_new_node = FALSE;
+ create_new_node = false;
} /* end if */
/* Remove any old nodes that are no longer needed */
@@ -362,7 +362,7 @@ H5FD__core_write_to_bstore(H5FD_core_t *file, haddr_t addr, size_t size)
#ifndef H5_HAVE_PREADWRITE
/* Seek to the correct location (if we don't have pwrite) */
- if ((HDoff_t)addr != HDlseek(file->fd, (off_t)addr, SEEK_SET))
+ if ((HDoff_t)addr != HDlseek(file->fd, (HDoff_t)addr, SEEK_SET))
HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "error seeking in backing store");
#endif /* H5_HAVE_PREADWRITE */
@@ -399,7 +399,7 @@ H5FD__core_write_to_bstore(H5FD_core_t *file, haddr_t addr, size_t size)
"write to backing store failed: time = %s, filename = '%s', file descriptor = %d, "
"errno = %d, error message = '%s', ptr = %p, total write size = %llu, bytes this "
"sub-write = %llu, bytes actually written = %llu, offset = %llu",
- HDctime(&mytime), file->name, file->fd, myerrno, HDstrerror(myerrno), (void *)ptr,
+ HDctime(&mytime), file->name, file->fd, myerrno, strerror(myerrno), (void *)ptr,
(unsigned long long)size, (unsigned long long)bytes_in,
(unsigned long long)bytes_wrote, (unsigned long long)offset);
} /* end if */
@@ -430,12 +430,12 @@ H5FD__core_write_to_bstore(H5FD_core_t *file, haddr_t addr, size_t size)
static inline const H5FD_core_fapl_t *
H5FD__core_get_default_config(void)
{
- char *driver = HDgetenv(HDF5_DRIVER);
+ char *driver = getenv(HDF5_DRIVER);
if (driver) {
- if (!HDstrcmp(driver, "core"))
+ if (!strcmp(driver, "core"))
return &H5FD_core_default_config_g;
- else if (!HDstrcmp(driver, "core_paged"))
+ else if (!strcmp(driver, "core_paged"))
return &H5FD_core_default_paged_config_g;
}
@@ -462,16 +462,16 @@ H5FD_core_init(void)
FUNC_ENTER_NOAPI_NOERR
/* Check the use disabled file locks environment variable */
- lock_env_var = HDgetenv(HDF5_USE_FILE_LOCKING);
- if (lock_env_var && !HDstrcmp(lock_env_var, "BEST_EFFORT"))
- ignore_disabled_file_locks_s = TRUE; /* Override: Ignore disabled locks */
- else if (lock_env_var && (!HDstrcmp(lock_env_var, "TRUE") || !HDstrcmp(lock_env_var, "1")))
- ignore_disabled_file_locks_s = FALSE; /* Override: Don't ignore disabled locks */
+ lock_env_var = getenv(HDF5_USE_FILE_LOCKING);
+ if (lock_env_var && !strcmp(lock_env_var, "BEST_EFFORT"))
+ ignore_disabled_file_locks_s = true; /* Override: Ignore disabled locks */
+ else if (lock_env_var && (!strcmp(lock_env_var, "TRUE") || !strcmp(lock_env_var, "1")))
+ ignore_disabled_file_locks_s = false; /* Override: Don't ignore disabled locks */
else
ignore_disabled_file_locks_s = FAIL; /* Environment variable not set, or not set correctly */
if (H5I_VFL != H5I_get_type(H5FD_CORE_g))
- H5FD_CORE_g = H5FD_register(&H5FD_core_g, sizeof(H5FD_class_t), FALSE);
+ H5FD_CORE_g = H5FD_register(&H5FD_core_g, sizeof(H5FD_class_t), false);
/* Set return value */
ret_value = H5FD_CORE_g;
@@ -683,7 +683,7 @@ H5FD__core_fapl_get(H5FD_t *_file)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
fa->increment = file->increment;
- fa->backing_store = (hbool_t)(file->fd >= 0);
+ fa->backing_store = (bool)(file->fd >= 0);
fa->write_tracking = file->write_tracking;
fa->page_size = file->bstore_page_size;
@@ -905,7 +905,7 @@ H5FD__core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr
"file read failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, "
"error message = '%s', file->mem = %p, total read size = %llu, bytes this "
"sub-read = %llu, bytes actually read = %llu, offset = %llu",
- HDctime(&mytime), file->name, file->fd, myerrno, HDstrerror(myerrno),
+ HDctime(&mytime), file->name, file->fd, myerrno, strerror(myerrno),
(void *)file->mem, (unsigned long long)size, (unsigned long long)bytes_in,
(unsigned long long)bytes_read, (unsigned long long)offset);
} /* end if */
@@ -927,14 +927,14 @@ H5FD__core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr
/* Set up write tracking if the backing store is on */
file->dirty_list = NULL;
if (fa->backing_store) {
- hbool_t use_write_tracking = FALSE; /* what we're actually doing */
+ bool use_write_tracking = false; /* what we're actually doing */
/* default is to have write tracking OFF for create (hence the check to see
* if the user explicitly set a page size) and ON with the default page size
* on open (when not read-only).
*/
/* Only use write tracking if the file is open for writing */
- use_write_tracking = (TRUE == fa->write_tracking) /* user asked for write tracking */
+ use_write_tracking = (true == fa->write_tracking) /* user asked for write tracking */
&& !(o_flags & O_RDONLY) /* file is open for writing (i.e. not read-only) */
&& (file->bstore_page_size != 0); /* page size is not zero */
@@ -977,7 +977,7 @@ H5FD__core_close(H5FD_t *_file)
FUNC_ENTER_PACKAGE
/* Flush any changed buffers */
- if (H5FD__core_flush(_file, (hid_t)-1, TRUE) < 0)
+ if (H5FD__core_flush(_file, (hid_t)-1, true) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush core vfd backing store");
/* Destroy the dirty region list */
@@ -1086,7 +1086,7 @@ H5FD__core_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
if (NULL == f2->name)
HGOTO_DONE(1);
- ret_value = HDstrcmp(f1->name, f2->name);
+ ret_value = strcmp(f1->name, f2->name);
} /* end else */
done:
@@ -1238,7 +1238,7 @@ H5FD__core_get_handle(H5FD_t *_file, hid_t fapl, void **file_handle)
* library) QAK - 2009/12/04
*/
if (H5P_exist_plist(plist, H5F_ACS_WANT_POSIX_FD_NAME) > 0) {
- hbool_t want_posix_fd; /* Setting for retrieving file descriptor from core VFD */
+ bool want_posix_fd; /* Setting for retrieving file descriptor from core VFD */
/* Get property */
if (H5P_get(plist, H5F_ACS_WANT_POSIX_FD_NAME, &want_posix_fd) < 0)
@@ -1396,7 +1396,7 @@ H5FD__core_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UN
H5MM_memcpy(file->mem + addr, buf, size);
/* Mark memory buffer as modified */
- file->dirty = TRUE;
+ file->dirty = true;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1413,7 +1413,7 @@ H5FD__core_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UN
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD__core_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_UNUSED closing)
+H5FD__core_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, bool H5_ATTR_UNUSED closing)
{
H5FD_core_t *file = (H5FD_core_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
@@ -1453,7 +1453,7 @@ H5FD__core_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_UN
HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "unable to write to backing store");
} /* end else */
- file->dirty = FALSE;
+ file->dirty = false;
}
done:
@@ -1493,7 +1493,7 @@ H5FD__core_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_UN
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD__core_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
+H5FD__core_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, bool closing)
{
H5FD_core_t *file = (H5FD_core_t *)_file;
size_t new_eof; /* New size of memory buffer */
@@ -1584,15 +1584,15 @@ H5FD__core_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing
*
* Purpose: To place an advisory lock on a file.
* The lock type to apply depends on the parameter "rw":
- * TRUE--opens for write: an exclusive lock
- * FALSE--opens for read: a shared lock
+ * true--opens for write: an exclusive lock
+ * false--opens for read: a shared lock
*
* Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD__core_lock(H5FD_t *_file, hbool_t rw)
+H5FD__core_lock(H5FD_t *_file, bool rw)
{
H5FD_core_t *file = (H5FD_core_t *)_file; /* VFD file struct */
int lock_flags; /* file locking flags */
diff --git a/src/H5FDcore.h b/src/H5FDcore.h
index e4d792b5f98..235d6fcaaf7 100644
--- a/src/H5FDcore.h
+++ b/src/H5FDcore.h
@@ -48,15 +48,15 @@ H5_DLL hid_t H5FD_core_init(void);
* be increased each time more memory is required.
*
* While using H5Fcreate() to create a core file, if the \p
- * backing_store is set to 1 (TRUE), the file contents are flushed to a
+ * backing_store is set to 1 (true), the file contents are flushed to a
* file with the same name as this core file when the file is closed or
* access to the file is terminated in memory.
*
* The application is allowed to open an existing file with #H5FD_CORE
* driver. While using H5Fopen() to open an existing file, if the \p
- * backing_store is set to 1 (TRUE) and the \c flags for H5Fopen() is set to
+ * backing_store is set to 1 (true) and the \c flags for H5Fopen() is set to
* #H5F_ACC_RDWR, any change to the file contents are saved to the file
- * when the file is closed. If \p backing_store is set to 0 (FALSE) and the \c
+ * when the file is closed. If \p backing_store is set to 0 (false) and the \c
* flags for H5Fopen() is set to #H5F_ACC_RDWR, any change to the file
* contents will be lost when the file is closed. If the flags for
* H5Fopen() is set to #H5F_ACC_RDONLY, no change to the file is
diff --git a/src/H5FDdirect.c b/src/H5FDdirect.c
index 30a3c90ab79..d370cd0b552 100644
--- a/src/H5FDdirect.c
+++ b/src/H5FDdirect.c
@@ -43,10 +43,10 @@ static htri_t ignore_disabled_file_locks_s = FAIL;
/* Driver-specific file access properties */
typedef struct H5FD_direct_fapl_t {
- size_t mboundary; /* Memory boundary for alignment */
- size_t fbsize; /* File system block size */
- size_t cbsize; /* Maximal buffer size for copying user data */
- hbool_t must_align; /* Decides if data alignment is required */
+ size_t mboundary; /* Memory boundary for alignment */
+ size_t fbsize; /* File system block size */
+ size_t cbsize; /* Maximal buffer size for copying user data */
+ bool must_align; /* Decides if data alignment is required */
} H5FD_direct_fapl_t;
/*
@@ -69,7 +69,7 @@ typedef struct H5FD_direct_t {
haddr_t pos; /*current file I/O position */
int op; /*last operation */
H5FD_direct_fapl_t fa; /*file access properties */
- hbool_t ignore_disabled_file_locks;
+ bool ignore_disabled_file_locks;
#ifndef H5_HAVE_WIN32_API
/*
* On most systems the combination of device and i-node number uniquely
@@ -132,8 +132,8 @@ static herr_t H5FD__direct_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id,
void *buf);
static herr_t H5FD__direct_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, size_t size,
const void *buf);
-static herr_t H5FD__direct_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
-static herr_t H5FD__direct_lock(H5FD_t *_file, hbool_t rw);
+static herr_t H5FD__direct_truncate(H5FD_t *_file, hid_t dxpl_id, bool closing);
+static herr_t H5FD__direct_lock(H5FD_t *_file, bool rw);
static herr_t H5FD__direct_unlock(H5FD_t *_file);
static herr_t H5FD__direct_delete(const char *filename, hid_t fapl_id);
@@ -203,16 +203,16 @@ H5FD_direct_init(void)
FUNC_ENTER_NOAPI(H5I_INVALID_HID)
/* Check the use disabled file locks environment variable */
- lock_env_var = HDgetenv(HDF5_USE_FILE_LOCKING);
- if (lock_env_var && !HDstrcmp(lock_env_var, "BEST_EFFORT"))
- ignore_disabled_file_locks_s = TRUE; /* Override: Ignore disabled locks */
- else if (lock_env_var && (!HDstrcmp(lock_env_var, "TRUE") || !HDstrcmp(lock_env_var, "1")))
- ignore_disabled_file_locks_s = FALSE; /* Override: Don't ignore disabled locks */
+ lock_env_var = getenv(HDF5_USE_FILE_LOCKING);
+ if (lock_env_var && !strcmp(lock_env_var, "BEST_EFFORT"))
+ ignore_disabled_file_locks_s = true; /* Override: Ignore disabled locks */
+ else if (lock_env_var && (!strcmp(lock_env_var, "TRUE") || !strcmp(lock_env_var, "1")))
+ ignore_disabled_file_locks_s = false; /* Override: Don't ignore disabled locks */
else
ignore_disabled_file_locks_s = FAIL; /* Environment variable not set, or not set correctly */
if (H5I_VFL != H5I_get_type(H5FD_DIRECT_g)) {
- H5FD_DIRECT_g = H5FD_register(&H5FD_direct_g, sizeof(H5FD_class_t), FALSE);
+ H5FD_DIRECT_g = H5FD_register(&H5FD_direct_g, sizeof(H5FD_class_t), false);
if (H5I_INVALID_HID == H5FD_DIRECT_g)
HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register direct");
}
@@ -354,7 +354,7 @@ H5FD__direct_populate_config(size_t boundary, size_t block_size, size_t cbuf_siz
fa_out->cbsize = CBSIZE_DEF;
/* Set the default to be true for data alignment */
- fa_out->must_align = TRUE;
+ fa_out->must_align = true;
/* Copy buffer size must be a multiple of file block size */
if (fa_out->cbsize % fa_out->fbsize != 0)
@@ -537,10 +537,10 @@ H5FD__direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad
if (HDwrite(file->fd, buf2, file->fa.fbsize) < 0)
HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, NULL, "file system may not support Direct I/O");
else
- file->fa.must_align = TRUE;
+ file->fa.must_align = true;
}
else {
- file->fa.must_align = FALSE;
+ file->fa.must_align = false;
if (-1 == HDftruncate(file->fd, (HDoff_t)0))
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, NULL, "unable to truncate file")
}
@@ -550,19 +550,19 @@ H5FD__direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad
if (HDread(file->fd, buf2, file->fa.fbsize) < 0)
HGOTO_ERROR(H5E_FILE, H5E_READERROR, NULL, "file system may not support Direct I/O");
else
- file->fa.must_align = TRUE;
+ file->fa.must_align = true;
}
else {
if (o_flags & O_RDWR) {
if (HDlseek(file->fd, (HDoff_t)0, SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, NULL, "unable to seek to proper position")
if (HDwrite(file->fd, buf1, sizeof(int)) < 0)
- file->fa.must_align = TRUE;
+ file->fa.must_align = true;
else
- file->fa.must_align = FALSE;
+ file->fa.must_align = false;
}
else
- file->fa.must_align = FALSE;
+ file->fa.must_align = false;
}
}
@@ -821,7 +821,7 @@ H5FD__direct_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_U
{
H5FD_direct_t *file = (H5FD_direct_t *)_file;
ssize_t nbytes;
- hbool_t _must_align = TRUE;
+ bool _must_align = true;
herr_t ret_value = SUCCEED; /* Return value */
size_t alloc_size;
void *copy_buf = NULL, *p2;
@@ -998,7 +998,7 @@ H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_
{
H5FD_direct_t *file = (H5FD_direct_t *)_file;
ssize_t nbytes;
- hbool_t _must_align = TRUE;
+ bool _must_align = true;
herr_t ret_value = SUCCEED; /* Return value */
size_t alloc_size;
void *copy_buf = NULL, *p1;
@@ -1218,7 +1218,7 @@ H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD__direct_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_UNUSED closing)
+H5FD__direct_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, bool H5_ATTR_UNUSED closing)
{
H5FD_direct_t *file = (H5FD_direct_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
@@ -1271,15 +1271,15 @@ H5FD__direct_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_AT
*
* Purpose: To place an advisory lock on a file.
* The lock type to apply depends on the parameter "rw":
- * TRUE--opens for write: an exclusive lock
- * FALSE--opens for read: a shared lock
+ * true--opens for write: an exclusive lock
+ * false--opens for read: a shared lock
*
* Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD__direct_lock(H5FD_t *_file, hbool_t rw)
+H5FD__direct_lock(H5FD_t *_file, bool rw)
{
H5FD_direct_t *file = (H5FD_direct_t *)_file; /* VFD file struct */
int lock_flags; /* file locking flags */
diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c
index 8d1ed4888a4..94805a23a8b 100644
--- a/src/H5FDfamily.c
+++ b/src/H5FDfamily.c
@@ -63,11 +63,11 @@ typedef struct H5FD_family_t {
unsigned flags; /*flags for opening additional members */
/* Information from properties set by 'h5repart' tool */
- hsize_t mem_newsize; /*new member size passed in as private
- * property. It's used only by h5repart */
- hbool_t repart_members; /* Whether to mark the superblock dirty
- * when it is loaded, so that the family
- * member sizes can be re-encoded */
+ hsize_t mem_newsize; /*new member size passed in as private
+ * property. It's used only by h5repart */
+ bool repart_members; /* Whether to mark the superblock dirty
+ * when it is loaded, so that the family
+ * member sizes can be re-encoded */
} H5FD_family_t;
/* Driver-specific file access properties */
@@ -100,9 +100,9 @@ static herr_t H5FD__family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id,
void *_buf /*out*/);
static herr_t H5FD__family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
const void *_buf);
-static herr_t H5FD__family_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
-static herr_t H5FD__family_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
-static herr_t H5FD__family_lock(H5FD_t *_file, hbool_t rw);
+static herr_t H5FD__family_flush(H5FD_t *_file, hid_t dxpl_id, bool closing);
+static herr_t H5FD__family_truncate(H5FD_t *_file, hid_t dxpl_id, bool closing);
+static herr_t H5FD__family_lock(H5FD_t *_file, bool rw);
static herr_t H5FD__family_unlock(H5FD_t *_file);
static herr_t H5FD__family_delete(const char *filename, hid_t fapl_id);
@@ -180,11 +180,11 @@ H5FD__family_get_default_config(H5FD_family_fapl_t *fa_out)
*/
if (NULL == (def_plist = (H5P_genplist_t *)H5I_object(H5P_FILE_ACCESS_DEFAULT)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
- if ((fa_out->memb_fapl_id = H5P_copy_plist(def_plist, FALSE)) < 0)
+ if ((fa_out->memb_fapl_id = H5P_copy_plist(def_plist, false)) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTCOPY, FAIL, "can't copy property list");
if (NULL == (plist = (H5P_genplist_t *)H5I_object(fa_out->memb_fapl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
- if (H5P_set_driver_by_value(plist, H5_VFD_SEC2, NULL, TRUE) < 0)
+ if (H5P_set_driver_by_value(plist, H5_VFD_SEC2, NULL, true) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "can't set default driver on member FAPL");
done:
@@ -225,36 +225,36 @@ H5FD__family_get_default_printf_filename(const char *old_filename)
assert(old_filename);
- old_filename_len = HDstrlen(old_filename);
+ old_filename_len = strlen(old_filename);
if (0 == old_filename_len)
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, NULL, "invalid filename");
- new_filename_len = old_filename_len + HDstrlen(suffix) + 1;
+ new_filename_len = old_filename_len + strlen(suffix) + 1;
if (NULL == (tmp_buffer = H5MM_malloc(new_filename_len)))
HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "can't allocate new filename buffer");
/* Determine if filename contains a ".h5" extension. */
- if ((file_extension = HDstrstr(old_filename, ".h5"))) {
+ if ((file_extension = strstr(old_filename, ".h5"))) {
/* Insert the printf format between the filename and ".h5" extension. */
- HDstrcpy(tmp_buffer, old_filename);
- file_extension = HDstrstr(tmp_buffer, ".h5");
- HDsprintf(file_extension, "%s%s", suffix, ".h5");
+ strcpy(tmp_buffer, old_filename);
+ file_extension = strstr(tmp_buffer, ".h5");
+ sprintf(file_extension, "%s%s", suffix, ".h5");
}
- else if ((file_extension = HDstrrchr(old_filename, '.'))) {
+ else if ((file_extension = strrchr(old_filename, '.'))) {
char *new_extension_loc = NULL;
/* If the filename doesn't contain a ".h5" extension, but contains
* AN extension, just insert the printf format before that extension.
*/
- HDstrcpy(tmp_buffer, old_filename);
- new_extension_loc = HDstrrchr(tmp_buffer, '.');
- HDsprintf(new_extension_loc, "%s%s", suffix, file_extension);
+ strcpy(tmp_buffer, old_filename);
+ new_extension_loc = strrchr(tmp_buffer, '.');
+ sprintf(new_extension_loc, "%s%s", suffix, file_extension);
}
else {
/* If the filename doesn't contain an extension at all, just insert
* the printf format at the end of the filename.
*/
- HDsnprintf(tmp_buffer, new_filename_len, "%s%s", old_filename, suffix);
+ snprintf(tmp_buffer, new_filename_len, "%s%s", old_filename, suffix);
}
ret_value = tmp_buffer;
@@ -285,7 +285,7 @@ H5FD_family_init(void)
FUNC_ENTER_NOAPI_NOERR
if (H5I_VFL != H5I_get_type(H5FD_FAMILY_g))
- H5FD_FAMILY_g = H5FD_register(&H5FD_family_g, sizeof(H5FD_class_t), FALSE);
+ H5FD_FAMILY_g = H5FD_register(&H5FD_family_g, sizeof(H5FD_class_t), false);
/* Set return value */
ret_value = H5FD_FAMILY_g;
@@ -339,14 +339,14 @@ H5Pset_fapl_family(hid_t fapl_id, hsize_t msize, hid_t memb_fapl_id)
H5TRACE3("e", "ihi", fapl_id, msize, memb_fapl_id);
/* Check arguments */
- if (TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
+ if (true != H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
if (H5P_DEFAULT == memb_fapl_id) {
/* Get default configuration for member FAPL */
if (H5FD__family_get_default_config(&fa) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get default driver configuration info");
}
- else if (TRUE != H5P_isa_class(memb_fapl_id, H5P_FILE_ACCESS))
+ else if (true != H5P_isa_class(memb_fapl_id, H5P_FILE_ACCESS))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list");
/* Initialize driver specific information. */
@@ -395,7 +395,7 @@ H5Pget_fapl_family(hid_t fapl_id, hsize_t *msize /*out*/, hid_t *memb_fapl_id /*
if (memb_fapl_id) {
if (NULL == (plist = (H5P_genplist_t *)H5I_object(fa->memb_fapl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list");
- *memb_fapl_id = H5P_copy_plist(plist, TRUE);
+ *memb_fapl_id = H5P_copy_plist(plist, true);
} /* end if */
done:
@@ -430,7 +430,7 @@ H5FD__family_fapl_get(H5FD_t *_file)
fa->memb_size = file->memb_size;
if (NULL == (plist = (H5P_genplist_t *)H5I_object(file->memb_fapl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list");
- fa->memb_fapl_id = H5P_copy_plist(plist, FALSE);
+ fa->memb_fapl_id = H5P_copy_plist(plist, false);
/* Set return value */
ret_value = fa;
@@ -472,13 +472,13 @@ H5FD__family_fapl_copy(const void *_old_fa)
/* Deep copy the property list objects in the structure */
if (old_fa->memb_fapl_id == H5P_FILE_ACCESS_DEFAULT) {
- if (H5I_inc_ref(new_fa->memb_fapl_id, FALSE) < 0)
+ if (H5I_inc_ref(new_fa->memb_fapl_id, false) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTINC, NULL, "unable to increment ref count on VFL driver");
} /* end if */
else {
if (NULL == (plist = (H5P_genplist_t *)H5I_object(old_fa->memb_fapl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list");
- new_fa->memb_fapl_id = H5P_copy_plist(plist, FALSE);
+ new_fa->memb_fapl_id = H5P_copy_plist(plist, false);
} /* end else */
/* Set return value */
@@ -564,7 +564,7 @@ H5FD__family_sb_encode(H5FD_t *_file, char *name /*out*/, unsigned char *buf /*o
FUNC_ENTER_PACKAGE_NOERR
/* Name and version number */
- HDstrncpy(name, "NCSAfami", (size_t)9);
+ strncpy(name, "NCSAfami", (size_t)9);
name[8] = '\0';
/* Store member file size. Use the member file size from the property here.
@@ -659,7 +659,7 @@ H5FD__family_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad
H5FD_family_t *file = NULL;
char *memb_name = NULL, *temp = NULL;
hsize_t eof = HADDR_UNDEF;
- hbool_t default_config = FALSE;
+ bool default_config = false;
unsigned t_flags = flags & ~H5F_ACC_CREAT;
H5FD_t *ret_value = NULL;
@@ -686,7 +686,7 @@ H5FD__family_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad
file->pmem_size = H5FD_FAM_DEF_MEM_SIZE; /* Member size passed in through property */
file->mem_newsize = 0; /*New member size used by h5repart only */
- default_config = TRUE;
+ default_config = true;
} /* end if */
else {
H5P_genplist_t *plist; /* Property list pointer */
@@ -699,7 +699,7 @@ H5FD__family_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad
if (H5FD__family_get_default_config(&default_fa) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, NULL, "can't get default family VFD configuration");
fa = &default_fa;
- default_config = TRUE;
+ default_config = true;
}
/* Check for new family file size. It's used by h5repart only. */
@@ -709,18 +709,18 @@ H5FD__family_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get new family member size");
/* Set flag for later */
- file->repart_members = TRUE;
+ file->repart_members = true;
} /* end if */
if (fa->memb_fapl_id == H5P_FILE_ACCESS_DEFAULT) {
- if (H5I_inc_ref(fa->memb_fapl_id, FALSE) < 0)
+ if (H5I_inc_ref(fa->memb_fapl_id, false) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTINC, NULL, "unable to increment ref count on VFL driver");
file->memb_fapl_id = fa->memb_fapl_id;
} /* end if */
else {
if (NULL == (plist = (H5P_genplist_t *)H5I_object(fa->memb_fapl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list");
- file->memb_fapl_id = H5P_copy_plist(plist, FALSE);
+ file->memb_fapl_id = H5P_copy_plist(plist, false);
} /* end else */
file->memb_size = fa->memb_size; /* Actual member size to be updated later */
file->pmem_size = fa->memb_size; /* Member size passed in through property */
@@ -738,9 +738,9 @@ H5FD__family_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad
HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, NULL, "unable to allocate temporary member name");
/* Check that names are unique */
- HDsnprintf(memb_name, H5FD_FAM_MEMB_NAME_BUF_SIZE, name, 0);
- HDsnprintf(temp, H5FD_FAM_MEMB_NAME_BUF_SIZE, name, 1);
- if (!HDstrcmp(memb_name, temp)) {
+ snprintf(memb_name, H5FD_FAM_MEMB_NAME_BUF_SIZE, name, 0);
+ snprintf(temp, H5FD_FAM_MEMB_NAME_BUF_SIZE, name, 1);
+ if (!strcmp(memb_name, temp)) {
if (default_config) {
temp = H5MM_xfree(temp);
if (NULL == (temp = H5FD__family_get_default_printf_filename(name)))
@@ -753,7 +753,7 @@ H5FD__family_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad
/* Open all the family members */
while (1) {
- HDsnprintf(memb_name, H5FD_FAM_MEMB_NAME_BUF_SIZE, name, file->nmembs);
+ snprintf(memb_name, H5FD_FAM_MEMB_NAME_BUF_SIZE, name, file->nmembs);
/* Enlarge member array */
if (file->nmembs >= file->amembs) {
@@ -1016,7 +1016,7 @@ H5FD__family_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t abs_eoa)
/* Create another file if necessary */
if (u >= file->nmembs || !file->memb[u]) {
file->nmembs = MAX(file->nmembs, u + 1);
- HDsnprintf(memb_name, H5FD_FAM_MEMB_NAME_BUF_SIZE, file->name, u);
+ snprintf(memb_name, H5FD_FAM_MEMB_NAME_BUF_SIZE, file->name, u);
H5E_BEGIN_TRY
{
H5_CHECK_OVERFLOW(file->memb_size, hsize_t, haddr_t);
@@ -1279,7 +1279,7 @@ H5FD__family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD__family_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
+H5FD__family_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, bool closing)
{
H5FD_family_t *file = (H5FD_family_t *)_file;
unsigned u, nerrors = 0;
@@ -1310,7 +1310,7 @@ H5FD__family_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD__family_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
+H5FD__family_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, bool closing)
{
H5FD_family_t *file = (H5FD_family_t *)_file;
unsigned u, nerrors = 0;
@@ -1334,15 +1334,15 @@ H5FD__family_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closi
*
* Purpose: To place an advisory lock on a file.
* The lock type to apply depends on the parameter "rw":
- * TRUE--opens for write: an exclusive lock
- * FALSE--opens for read: a shared lock
+ * true--opens for write: an exclusive lock
+ * false--opens for read: a shared lock
*
* Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD__family_lock(H5FD_t *_file, hbool_t rw)
+H5FD__family_lock(H5FD_t *_file, bool rw)
{
H5FD_family_t *file = (H5FD_family_t *)_file; /* VFD file struct */
unsigned u; /* Local index variable */
@@ -1417,7 +1417,7 @@ H5FD__family_delete(const char *filename, hid_t fapl_id)
H5P_genplist_t *plist;
const H5FD_family_fapl_t *fa;
H5FD_family_fapl_t default_fa = {0, H5I_INVALID_HID};
- hbool_t default_config = FALSE;
+ bool default_config = false;
hid_t memb_fapl_id = H5I_INVALID_HID;
unsigned current_member;
char *member_name = NULL;
@@ -1436,7 +1436,7 @@ H5FD__family_delete(const char *filename, hid_t fapl_id)
if (H5FD__family_get_default_config(&default_fa) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get default family VFD configuration");
memb_fapl_id = default_fa.memb_fapl_id;
- default_config = TRUE;
+ default_config = true;
}
else {
if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id)))
@@ -1445,7 +1445,7 @@ H5FD__family_delete(const char *filename, hid_t fapl_id)
if (H5FD__family_get_default_config(&default_fa) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get default family VFD configuration");
fa = &default_fa;
- default_config = TRUE;
+ default_config = true;
}
memb_fapl_id = fa->memb_fapl_id;
}
@@ -1458,11 +1458,11 @@ H5FD__family_delete(const char *filename, hid_t fapl_id)
/* Sanity check to make sure that generated names are unique */
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
- HDsnprintf(member_name, H5FD_FAM_MEMB_NAME_BUF_SIZE, filename, 0);
- HDsnprintf(temp, H5FD_FAM_MEMB_NAME_BUF_SIZE, filename, 1);
+ snprintf(member_name, H5FD_FAM_MEMB_NAME_BUF_SIZE, filename, 0);
+ snprintf(temp, H5FD_FAM_MEMB_NAME_BUF_SIZE, filename, 1);
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
- if (!HDstrcmp(member_name, temp)) {
+ if (!strcmp(member_name, temp)) {
if (default_config) {
temp = H5MM_xfree(temp);
if (NULL == (temp = H5FD__family_get_default_printf_filename(filename)))
@@ -1479,7 +1479,7 @@ H5FD__family_delete(const char *filename, hid_t fapl_id)
while (1) {
/* Fix up the filename with the current member's number */
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
- HDsnprintf(member_name, H5FD_FAM_MEMB_NAME_BUF_SIZE, filename, current_member);
+ snprintf(member_name, H5FD_FAM_MEMB_NAME_BUF_SIZE, filename, current_member);
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
/* Attempt to delete the member files. If the first file throws an error
diff --git a/src/H5FDhdfs.c b/src/H5FDhdfs.c
index 8282ad934bd..3bd2502e232 100644
--- a/src/H5FDhdfs.c
+++ b/src/H5FDhdfs.c
@@ -257,7 +257,7 @@ static herr_t H5FD__hdfs_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, ha
void *buf);
static herr_t H5FD__hdfs_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, size_t size,
const void *buf);
-static herr_t H5FD__hdfs_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
+static herr_t H5FD__hdfs_truncate(H5FD_t *_file, hid_t dxpl_id, bool closing);
static herr_t H5FD__hdfs_validate_config(const H5FD_hdfs_fapl_t *fa);
@@ -333,7 +333,7 @@ H5FD_hdfs_init(void)
#endif
if (H5I_VFL != H5I_get_type(H5FD_HDFS_g))
- H5FD_HDFS_g = H5FD_register(&H5FD_hdfs_g, sizeof(H5FD_class_t), FALSE);
+ H5FD_HDFS_g = H5FD_register(&H5FD_hdfs_g, sizeof(H5FD_class_t), false);
#if HDFS_STATS
/* pre-compute statsbin boundaries
@@ -1220,10 +1220,10 @@ H5FD__hdfs_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
if (finfo1->mBlockSize != finfo2->mBlockSize) {
HGOTO_DONE(-1);
}
- if (HDstrcmp(finfo1->mOwner, finfo2->mOwner)) {
+ if (strcmp(finfo1->mOwner, finfo2->mOwner)) {
HGOTO_DONE(-1);
}
- if (HDstrcmp(finfo1->mGroup, finfo2->mGroup)) {
+ if (strcmp(finfo1->mGroup, finfo2->mGroup)) {
HGOTO_DONE(-1);
}
if (finfo1->mPermissions != finfo2->mPermissions) {
@@ -1528,8 +1528,7 @@ H5FD__hdfs_write(H5FD_t H5_ATTR_UNUSED *_file, H5FD_mem_t H5_ATTR_UNUSED type, h
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD__hdfs_truncate(H5FD_t H5_ATTR_UNUSED *_file, hid_t H5_ATTR_UNUSED dxpl_id,
- hbool_t H5_ATTR_UNUSED closing)
+H5FD__hdfs_truncate(H5FD_t H5_ATTR_UNUSED *_file, hid_t H5_ATTR_UNUSED dxpl_id, bool H5_ATTR_UNUSED closing)
{
herr_t ret_value = SUCCEED;
diff --git a/src/H5FDint.c b/src/H5FDint.c
index fcc1b6c6fcd..082b6021332 100644
--- a/src/H5FDint.c
+++ b/src/H5FDint.c
@@ -353,9 +353,9 @@ herr_t
H5FD_read_vector(H5FD_t *file, uint32_t count, H5FD_mem_t types[], haddr_t addrs[], size_t sizes[],
void *bufs[] /* out */)
{
- hbool_t addrs_cooked = FALSE;
- hbool_t extend_sizes = FALSE;
- hbool_t extend_types = FALSE;
+ bool addrs_cooked = false;
+ bool extend_sizes = false;
+ bool extend_types = false;
uint32_t i;
size_t size = 0;
H5FD_mem_t type = H5FD_MEM_DEFAULT;
@@ -401,7 +401,7 @@ H5FD_read_vector(H5FD_t *file, uint32_t count, H5FD_mem_t types[], haddr_t addrs
addrs[i] += file->base_addr;
}
- addrs_cooked = TRUE;
+ addrs_cooked = true;
}
/* If the file is open for SWMR read access, allow access to data past
@@ -413,8 +413,8 @@ H5FD_read_vector(H5FD_t *file, uint32_t count, H5FD_mem_t types[], haddr_t addrs
if ((!(file->access_flags & H5F_ACC_SWMR_READ)) && (count > 0)) {
haddr_t eoa;
- extend_sizes = FALSE;
- extend_types = FALSE;
+ extend_sizes = false;
+ extend_types = false;
for (i = 0; i < count; i++) {
@@ -422,7 +422,7 @@ H5FD_read_vector(H5FD_t *file, uint32_t count, H5FD_mem_t types[], haddr_t addrs
if (sizes[i] == 0) {
- extend_sizes = TRUE;
+ extend_sizes = true;
size = sizes[i - 1];
}
else {
@@ -435,7 +435,7 @@ H5FD_read_vector(H5FD_t *file, uint32_t count, H5FD_mem_t types[], haddr_t addrs
if (types[i] == H5FD_MEM_NOLIST) {
- extend_types = TRUE;
+ extend_types = true;
type = types[i - 1];
}
else {
@@ -468,8 +468,8 @@ H5FD_read_vector(H5FD_t *file, uint32_t count, H5FD_mem_t types[], haddr_t addrs
/* otherwise, implement the vector read as a sequence of regular
* read calls.
*/
- extend_sizes = FALSE;
- extend_types = FALSE;
+ extend_sizes = false;
+ extend_types = false;
uint32_t no_selection_io_cause;
for (i = 0; i < count; i++) {
@@ -482,7 +482,7 @@ H5FD_read_vector(H5FD_t *file, uint32_t count, H5FD_mem_t types[], haddr_t addrs
if (sizes[i] == 0) {
- extend_sizes = TRUE;
+ extend_sizes = true;
size = sizes[i - 1];
}
else {
@@ -495,7 +495,7 @@ H5FD_read_vector(H5FD_t *file, uint32_t count, H5FD_mem_t types[], haddr_t addrs
if (types[i] == H5FD_MEM_NOLIST) {
- extend_types = TRUE;
+ extend_types = true;
type = types[i - 1];
}
else {
@@ -567,9 +567,9 @@ herr_t
H5FD_write_vector(H5FD_t *file, uint32_t count, H5FD_mem_t types[], haddr_t addrs[], size_t sizes[],
const void *bufs[])
{
- hbool_t addrs_cooked = FALSE;
- hbool_t extend_sizes = FALSE;
- hbool_t extend_types = FALSE;
+ bool addrs_cooked = false;
+ bool extend_sizes = false;
+ bool extend_types = false;
uint32_t i;
size_t size = 0;
H5FD_mem_t type = H5FD_MEM_DEFAULT;
@@ -615,11 +615,11 @@ H5FD_write_vector(H5FD_t *file, uint32_t count, H5FD_mem_t types[], haddr_t addr
addrs[i] += file->base_addr;
}
- addrs_cooked = TRUE;
+ addrs_cooked = true;
}
- extend_sizes = FALSE;
- extend_types = FALSE;
+ extend_sizes = false;
+ extend_types = false;
for (i = 0; i < count; i++) {
@@ -627,7 +627,7 @@ H5FD_write_vector(H5FD_t *file, uint32_t count, H5FD_mem_t types[], haddr_t addr
if (sizes[i] == 0) {
- extend_sizes = TRUE;
+ extend_sizes = true;
size = sizes[i - 1];
}
else {
@@ -640,7 +640,7 @@ H5FD_write_vector(H5FD_t *file, uint32_t count, H5FD_mem_t types[], haddr_t addr
if (types[i] == H5FD_MEM_NOLIST) {
- extend_types = TRUE;
+ extend_types = true;
type = types[i - 1];
}
else {
@@ -672,8 +672,8 @@ H5FD_write_vector(H5FD_t *file, uint32_t count, H5FD_mem_t types[], haddr_t addr
/* otherwise, implement the vector write as a sequence of regular
* write calls.
*/
- extend_sizes = FALSE;
- extend_types = FALSE;
+ extend_sizes = false;
+ extend_types = false;
uint32_t no_selection_io_cause;
for (i = 0; i < count; i++) {
@@ -686,7 +686,7 @@ H5FD_write_vector(H5FD_t *file, uint32_t count, H5FD_mem_t types[], haddr_t addr
if (sizes[i] == 0) {
- extend_sizes = TRUE;
+ extend_sizes = true;
size = sizes[i - 1];
}
else {
@@ -699,7 +699,7 @@ H5FD_write_vector(H5FD_t *file, uint32_t count, H5FD_mem_t types[], haddr_t addr
if (types[i] == H5FD_MEM_NOLIST) {
- extend_types = TRUE;
+ extend_types = true;
type = types[i - 1];
}
else {
@@ -754,12 +754,12 @@ H5FD__read_selection_translate(uint32_t skip_vector_cb, H5FD_t *file, H5FD_mem_t
uint32_t count, H5S_t **mem_spaces, H5S_t **file_spaces, haddr_t offsets[],
size_t element_sizes[], void *bufs[] /* out */)
{
- hbool_t extend_sizes = FALSE;
- hbool_t extend_bufs = FALSE;
+ bool extend_sizes = false;
+ bool extend_bufs = false;
uint32_t i;
size_t element_size = 0;
void *buf = NULL;
- hbool_t use_vector = FALSE;
+ bool use_vector = false;
haddr_t addrs_local[H5FD_LOCAL_VECTOR_LEN];
haddr_t *addrs = addrs_local;
size_t sizes_local[H5FD_LOCAL_VECTOR_LEN];
@@ -780,8 +780,8 @@ H5FD__read_selection_translate(uint32_t skip_vector_cb, H5FD_t *file, H5FD_mem_t
size_t seq_nelem;
H5S_sel_iter_t *file_iter = NULL;
H5S_sel_iter_t *mem_iter = NULL;
- hbool_t file_iter_init = FALSE;
- hbool_t mem_iter_init = FALSE;
+ bool file_iter_init = false;
+ bool mem_iter_init = false;
H5FD_mem_t types[2] = {type, H5FD_MEM_NOLIST};
size_t vec_arr_nalloc = H5FD_LOCAL_VECTOR_LEN;
size_t vec_arr_nused = 0;
@@ -824,7 +824,7 @@ H5FD__read_selection_translate(uint32_t skip_vector_cb, H5FD_t *file, H5FD_mem_t
if (element_sizes[i] == 0) {
- extend_sizes = TRUE;
+ extend_sizes = true;
element_size = element_sizes[i - 1];
}
else {
@@ -837,7 +837,7 @@ H5FD__read_selection_translate(uint32_t skip_vector_cb, H5FD_t *file, H5FD_mem_t
if (bufs[i] == NULL) {
- extend_bufs = TRUE;
+ extend_bufs = true;
buf = bufs[i - 1];
}
else {
@@ -849,10 +849,10 @@ H5FD__read_selection_translate(uint32_t skip_vector_cb, H5FD_t *file, H5FD_mem_t
/* Initialize sequence lists for memory and file spaces */
if (H5S_select_iter_init(file_iter, file_spaces[i], element_size, 0) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "can't initialize sequence list for file space");
- file_iter_init = TRUE;
+ file_iter_init = true;
if (H5S_select_iter_init(mem_iter, mem_spaces[i], element_size, 0) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "can't initialize sequence list for memory space");
- mem_iter_init = TRUE;
+ mem_iter_init = true;
/* Get the number of elements in selection */
if ((hss_nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(file_spaces[i])) < 0)
@@ -988,10 +988,10 @@ H5FD__read_selection_translate(uint32_t skip_vector_cb, H5FD_t *file, H5FD_mem_t
/* Terminate iterators */
if (H5S_SELECT_ITER_RELEASE(file_iter) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "can't release file selection iterator");
- file_iter_init = FALSE;
+ file_iter_init = false;
if (H5S_SELECT_ITER_RELEASE(mem_iter) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "can't release memory selection iterator");
- mem_iter_init = FALSE;
+ mem_iter_init = false;
}
/* Issue vector read call if appropriate */
@@ -1082,7 +1082,7 @@ herr_t
H5FD_read_selection(H5FD_t *file, H5FD_mem_t type, uint32_t count, H5S_t **mem_spaces, H5S_t **file_spaces,
haddr_t offsets[], size_t element_sizes[], void *bufs[] /* out */)
{
- hbool_t offsets_cooked = FALSE;
+ bool offsets_cooked = false;
hid_t mem_space_ids_local[H5FD_LOCAL_SEL_ARR_LEN];
hid_t *mem_space_ids = mem_space_ids_local;
hid_t file_space_ids_local[H5FD_LOCAL_SEL_ARR_LEN];
@@ -1131,7 +1131,7 @@ H5FD_read_selection(H5FD_t *file, H5FD_mem_t type, uint32_t count, H5S_t **mem_s
offsets[i] += file->base_addr;
}
- offsets_cooked = TRUE;
+ offsets_cooked = true;
}
/* If the file is open for SWMR read access, allow access to data past
@@ -1172,10 +1172,10 @@ H5FD_read_selection(H5FD_t *file, H5FD_mem_t type, uint32_t count, H5S_t **mem_s
/* Create IDs for all dataspaces */
for (; num_spaces < count; num_spaces++) {
- if ((mem_space_ids[num_spaces] = H5I_register(H5I_DATASPACE, mem_spaces[num_spaces], TRUE)) < 0)
+ if ((mem_space_ids[num_spaces] = H5I_register(H5I_DATASPACE, mem_spaces[num_spaces], true)) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID");
- if ((file_space_ids[num_spaces] = H5I_register(H5I_DATASPACE, file_spaces[num_spaces], TRUE)) <
+ if ((file_space_ids[num_spaces] = H5I_register(H5I_DATASPACE, file_spaces[num_spaces], true)) <
0) {
if (NULL == H5I_remove(mem_space_ids[num_spaces]))
HDONE_ERROR(H5E_VFL, H5E_CANTREMOVE, FAIL, "problem removing id");
@@ -1254,7 +1254,7 @@ H5FD_read_selection_id(uint32_t skip_cb, H5FD_t *file, H5FD_mem_t type, uint32_t
hid_t file_space_ids[], haddr_t offsets[], size_t element_sizes[],
void *bufs[] /* out */)
{
- hbool_t offsets_cooked = FALSE;
+ bool offsets_cooked = false;
H5S_t *mem_spaces_local[H5FD_LOCAL_SEL_ARR_LEN];
H5S_t **mem_spaces = mem_spaces_local;
H5S_t *file_spaces_local[H5FD_LOCAL_SEL_ARR_LEN];
@@ -1307,7 +1307,7 @@ H5FD_read_selection_id(uint32_t skip_cb, H5FD_t *file, H5FD_mem_t type, uint32_t
offsets[i] += file->base_addr;
}
- offsets_cooked = TRUE;
+ offsets_cooked = true;
}
/* If the file is open for SWMR read access, allow access to data past
@@ -1411,12 +1411,12 @@ H5FD__write_selection_translate(uint32_t skip_vector_cb, H5FD_t *file, H5FD_mem_
uint32_t count, H5S_t **mem_spaces, H5S_t **file_spaces, haddr_t offsets[],
size_t element_sizes[], const void *bufs[])
{
- hbool_t extend_sizes = FALSE;
- hbool_t extend_bufs = FALSE;
+ bool extend_sizes = false;
+ bool extend_bufs = false;
uint32_t i;
size_t element_size = 0;
const void *buf = NULL;
- hbool_t use_vector = FALSE;
+ bool use_vector = false;
haddr_t addrs_local[H5FD_LOCAL_VECTOR_LEN];
haddr_t *addrs = addrs_local;
size_t sizes_local[H5FD_LOCAL_VECTOR_LEN];
@@ -1437,8 +1437,8 @@ H5FD__write_selection_translate(uint32_t skip_vector_cb, H5FD_t *file, H5FD_mem_
size_t seq_nelem;
H5S_sel_iter_t *file_iter = NULL;
H5S_sel_iter_t *mem_iter = NULL;
- hbool_t file_iter_init = FALSE;
- hbool_t mem_iter_init = FALSE;
+ bool file_iter_init = false;
+ bool mem_iter_init = false;
H5FD_mem_t types[2] = {type, H5FD_MEM_NOLIST};
size_t vec_arr_nalloc = H5FD_LOCAL_VECTOR_LEN;
size_t vec_arr_nused = 0;
@@ -1481,7 +1481,7 @@ H5FD__write_selection_translate(uint32_t skip_vector_cb, H5FD_t *file, H5FD_mem_
if (element_sizes[i] == 0) {
- extend_sizes = TRUE;
+ extend_sizes = true;
element_size = element_sizes[i - 1];
}
else {
@@ -1494,7 +1494,7 @@ H5FD__write_selection_translate(uint32_t skip_vector_cb, H5FD_t *file, H5FD_mem_
if (bufs[i] == NULL) {
- extend_bufs = TRUE;
+ extend_bufs = true;
buf = bufs[i - 1];
}
else {
@@ -1506,10 +1506,10 @@ H5FD__write_selection_translate(uint32_t skip_vector_cb, H5FD_t *file, H5FD_mem_
/* Initialize sequence lists for memory and file spaces */
if (H5S_select_iter_init(file_iter, file_spaces[i], element_size, 0) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "can't initialize sequence list for file space");
- file_iter_init = TRUE;
+ file_iter_init = true;
if (H5S_select_iter_init(mem_iter, mem_spaces[i], element_size, 0) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "can't initialize sequence list for memory space");
- mem_iter_init = TRUE;
+ mem_iter_init = true;
/* Get the number of elements in selection */
if ((hss_nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(file_spaces[i])) < 0)
@@ -1645,10 +1645,10 @@ H5FD__write_selection_translate(uint32_t skip_vector_cb, H5FD_t *file, H5FD_mem_
/* Terminate iterators */
if (H5S_SELECT_ITER_RELEASE(file_iter) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "can't release file selection iterator");
- file_iter_init = FALSE;
+ file_iter_init = false;
if (H5S_SELECT_ITER_RELEASE(mem_iter) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "can't release memory selection iterator");
- mem_iter_init = FALSE;
+ mem_iter_init = false;
}
/* Issue vector write call if appropriate */
@@ -1737,7 +1737,7 @@ herr_t
H5FD_write_selection(H5FD_t *file, H5FD_mem_t type, uint32_t count, H5S_t **mem_spaces, H5S_t **file_spaces,
haddr_t offsets[], size_t element_sizes[], const void *bufs[])
{
- hbool_t offsets_cooked = FALSE;
+ bool offsets_cooked = false;
hid_t mem_space_ids_local[H5FD_LOCAL_SEL_ARR_LEN];
hid_t *mem_space_ids = mem_space_ids_local;
hid_t file_space_ids_local[H5FD_LOCAL_SEL_ARR_LEN];
@@ -1786,7 +1786,7 @@ H5FD_write_selection(H5FD_t *file, H5FD_mem_t type, uint32_t count, H5S_t **mem_
offsets[i] += file->base_addr;
}
- offsets_cooked = TRUE;
+ offsets_cooked = true;
}
/* For now at least, only check that the offset is not past the eoa, since
@@ -1821,10 +1821,10 @@ H5FD_write_selection(H5FD_t *file, H5FD_mem_t type, uint32_t count, H5S_t **mem_
/* Create IDs for all dataspaces */
for (; num_spaces < count; num_spaces++) {
- if ((mem_space_ids[num_spaces] = H5I_register(H5I_DATASPACE, mem_spaces[num_spaces], TRUE)) < 0)
+ if ((mem_space_ids[num_spaces] = H5I_register(H5I_DATASPACE, mem_spaces[num_spaces], true)) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID");
- if ((file_space_ids[num_spaces] = H5I_register(H5I_DATASPACE, file_spaces[num_spaces], TRUE)) <
+ if ((file_space_ids[num_spaces] = H5I_register(H5I_DATASPACE, file_spaces[num_spaces], true)) <
0) {
if (NULL == H5I_remove(mem_space_ids[num_spaces]))
HDONE_ERROR(H5E_VFL, H5E_CANTREMOVE, FAIL, "problem removing id");
@@ -1902,7 +1902,7 @@ H5FD_write_selection_id(uint32_t skip_cb, H5FD_t *file, H5FD_mem_t type, uint32_
hid_t mem_space_ids[], hid_t file_space_ids[], haddr_t offsets[],
size_t element_sizes[], const void *bufs[])
{
- hbool_t offsets_cooked = FALSE;
+ bool offsets_cooked = false;
H5S_t *mem_spaces_local[H5FD_LOCAL_SEL_ARR_LEN];
H5S_t **mem_spaces = mem_spaces_local;
H5S_t *file_spaces_local[H5FD_LOCAL_SEL_ARR_LEN];
@@ -1955,7 +1955,7 @@ H5FD_write_selection_id(uint32_t skip_cb, H5FD_t *file, H5FD_mem_t type, uint32_
offsets[i] += file->base_addr;
}
- offsets_cooked = TRUE;
+ offsets_cooked = true;
}
/* For now at least, only check that the offset is not past the eoa, since
@@ -2410,7 +2410,7 @@ H5FD__srt_tmp_cmp(const void *element_1, const void *element_2)
*
* Purpose: Scan the addrs array to see if it is sorted.
*
- * If sorted, return TRUE in *was_sorted.
+ * If sorted, return true in *was_sorted.
*
* If not sorted, use qsort() to sort the array.
* Do this by allocating an array of struct H5FD_srt_tmp_t,
@@ -2418,10 +2418,10 @@ H5FD__srt_tmp_cmp(const void *element_1, const void *element_2)
* addr and index. Load the array with the contents of the
* addrs array and the index of the associated entry.
* Then sort the array using qsort().
- * Return *FALSE in was_sorted.
+ * Return *false in was_sorted.
*
* This is a common routine used by:
- * --H5FD_sort_vector_io_req ()
+ * --H5FD_sort_vector_io_req()
* --H5FD_sort_selection_io_req()
*
* Return: SUCCEED/FAIL
@@ -2429,7 +2429,7 @@ H5FD__srt_tmp_cmp(const void *element_1, const void *element_2)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD__sort_io_req_real(size_t count, haddr_t *addrs, hbool_t *was_sorted, struct H5FD_srt_tmp_t **srt_tmp)
+H5FD__sort_io_req_real(size_t count, haddr_t *addrs, bool *was_sorted, struct H5FD_srt_tmp_t **srt_tmp)
{
size_t i;
herr_t ret_value = SUCCEED; /* Return value */
@@ -2451,9 +2451,9 @@ H5FD__sort_io_req_real(size_t count, haddr_t *addrs, hbool_t *was_sorted, struct
/* if we traversed the entire array without breaking out, then
* the array was already sorted */
if (i >= count)
- *was_sorted = TRUE;
+ *was_sorted = true;
else
- *was_sorted = FALSE;
+ *was_sorted = false;
if (!(*was_sorted)) {
size_t srt_tmp_size;
@@ -2494,7 +2494,7 @@ H5FD__sort_io_req_real(size_t count, haddr_t *addrs, hbool_t *was_sorted, struct
* Purpose: Determine whether the supplied vector I/O request is
* sorted.
*
- * if is is, set *vector_was_sorted to TRUE, set:
+ * if is is, set *vector_was_sorted to true, set:
*
* *s_types_ptr = types
* *s_addrs_ptr = addrs
@@ -2520,7 +2520,7 @@ H5FD__sort_io_req_real(size_t count, haddr_t *addrs, hbool_t *was_sorted, struct
*-------------------------------------------------------------------------
*/
herr_t
-H5FD_sort_vector_io_req(hbool_t *vector_was_sorted, uint32_t _count, H5FD_mem_t types[], haddr_t addrs[],
+H5FD_sort_vector_io_req(bool *vector_was_sorted, uint32_t _count, H5FD_mem_t types[], haddr_t addrs[],
size_t sizes[], H5_flexible_const_ptr_t bufs[], H5FD_mem_t **s_types_ptr,
haddr_t **s_addrs_ptr, size_t **s_sizes_ptr, H5_flexible_const_ptr_t **s_bufs_ptr)
{
@@ -2667,7 +2667,7 @@ H5FD_sort_vector_io_req(hbool_t *vector_was_sorted, uint32_t _count, H5FD_mem_t
* Purpose: Determine whether the supplied selection I/O request is
* sorted.
*
- * if is is, set *selection_was_sorted to TRUE, set:
+ * if is is, set *selection_was_sorted to true, set:
*
* *s_mem_space_ids_ptr = mem_space_ids;
* *s_file_space_ids_ptr = file_space_ids;
@@ -2693,7 +2693,7 @@ H5FD_sort_vector_io_req(hbool_t *vector_was_sorted, uint32_t _count, H5FD_mem_t
*-------------------------------------------------------------------------
*/
herr_t
-H5FD_sort_selection_io_req(hbool_t *selection_was_sorted, size_t count, hid_t mem_space_ids[],
+H5FD_sort_selection_io_req(bool *selection_was_sorted, size_t count, hid_t mem_space_ids[],
hid_t file_space_ids[], haddr_t offsets[], size_t element_sizes[],
H5_flexible_const_ptr_t bufs[], hid_t **s_mem_space_ids_ptr,
hid_t **s_file_space_ids_ptr, haddr_t **s_offsets_ptr,
@@ -2897,7 +2897,7 @@ H5FD_delete(const char *filename, hid_t fapl_id)
*
* Note: Matching the driver's name / value, but the driver having
* an incompatible version is not an error, but means that the
- * driver isn't a "match". Setting the SUCCEED value to FALSE
+ * driver isn't a "match". Setting the SUCCEED value to false
* and not failing for that case allows the plugin framework
* to keep looking for other DLLs that match and have a
* compatible version.
@@ -2907,7 +2907,7 @@ H5FD_delete(const char *filename, hid_t fapl_id)
*-------------------------------------------------------------------------
*/
herr_t
-H5FD_check_plugin_load(const H5FD_class_t *cls, const H5PL_key_t *key, hbool_t *success)
+H5FD_check_plugin_load(const H5FD_class_t *cls, const H5PL_key_t *key, bool *success)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -2921,8 +2921,8 @@ H5FD_check_plugin_load(const H5FD_class_t *cls, const H5PL_key_t *key, hbool_t *
/* Which kind of key are we looking for? */
if (key->vfd.kind == H5FD_GET_DRIVER_BY_NAME) {
/* Check if plugin name matches VFD class name */
- if (cls->name && !HDstrcmp(cls->name, key->vfd.u.name))
- *success = TRUE;
+ if (cls->name && !strcmp(cls->name, key->vfd.u.name))
+ *success = true;
}
else {
/* Sanity check */
@@ -2930,7 +2930,7 @@ H5FD_check_plugin_load(const H5FD_class_t *cls, const H5PL_key_t *key, hbool_t *
/* Check if plugin value matches VFD class value */
if (cls->value == key->vfd.u.value)
- *success = TRUE;
+ *success = true;
}
FUNC_LEAVE_NOAPI(ret_value)
@@ -2957,7 +2957,7 @@ H5FD__get_driver_cb(void *obj, hid_t id, void *_op_data)
FUNC_ENTER_PACKAGE_NOERR
if (H5FD_GET_DRIVER_BY_NAME == op_data->key.kind) {
- if (0 == HDstrcmp(cls->name, op_data->key.u.name)) {
+ if (0 == strcmp(cls->name, op_data->key.u.name)) {
op_data->found_id = id;
ret_value = H5_ITER_STOP;
} /* end if */
@@ -2987,9 +2987,9 @@ H5FD__get_driver_cb(void *obj, hid_t id, void *_op_data)
*-------------------------------------------------------------------------
*/
hid_t
-H5FD_register_driver_by_name(const char *name, hbool_t app_ref)
+H5FD_register_driver_by_name(const char *name, bool app_ref)
{
- htri_t driver_is_registered = FALSE;
+ htri_t driver_is_registered = false;
hid_t driver_id = H5I_INVALID_HID;
hid_t ret_value = H5I_INVALID_HID; /* Return value */
@@ -3041,9 +3041,9 @@ H5FD_register_driver_by_name(const char *name, hbool_t app_ref)
*-------------------------------------------------------------------------
*/
hid_t
-H5FD_register_driver_by_value(H5FD_class_value_t value, hbool_t app_ref)
+H5FD_register_driver_by_value(H5FD_class_value_t value, bool app_ref)
{
- htri_t driver_is_registered = FALSE;
+ htri_t driver_is_registered = false;
hid_t driver_id = H5I_INVALID_HID;
hid_t ret_value = H5I_INVALID_HID; /* Return value */
@@ -3099,7 +3099,7 @@ htri_t
H5FD_is_driver_registered_by_name(const char *driver_name, hid_t *registered_id)
{
H5FD_get_driver_ud_t op_data; /* Callback info for driver search */
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -3109,14 +3109,14 @@ H5FD_is_driver_registered_by_name(const char *driver_name, hid_t *registered_id)
op_data.found_id = H5I_INVALID_HID;
/* Find driver with name */
- if (H5I_iterate(H5I_VFL, H5FD__get_driver_cb, &op_data, FALSE) < 0)
+ if (H5I_iterate(H5I_VFL, H5FD__get_driver_cb, &op_data, false) < 0)
HGOTO_ERROR(H5E_VFL, H5E_BADITER, FAIL, "can't iterate over VFDs");
/* Found a driver with that name */
if (op_data.found_id != H5I_INVALID_HID) {
if (registered_id)
*registered_id = op_data.found_id;
- ret_value = TRUE;
+ ret_value = true;
}
done:
@@ -3141,7 +3141,7 @@ htri_t
H5FD_is_driver_registered_by_value(H5FD_class_value_t driver_value, hid_t *registered_id)
{
H5FD_get_driver_ud_t op_data; /* Callback info for driver search */
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -3151,14 +3151,14 @@ H5FD_is_driver_registered_by_value(H5FD_class_value_t driver_value, hid_t *regis
op_data.found_id = H5I_INVALID_HID;
/* Find driver with value */
- if (H5I_iterate(H5I_VFL, H5FD__get_driver_cb, &op_data, FALSE) < 0)
+ if (H5I_iterate(H5I_VFL, H5FD__get_driver_cb, &op_data, false) < 0)
HGOTO_ERROR(H5E_VFL, H5E_BADITER, FAIL, "can't iterate over VFDs");
/* Found a driver with that value */
if (op_data.found_id != H5I_INVALID_HID) {
if (registered_id)
*registered_id = op_data.found_id;
- ret_value = TRUE;
+ ret_value = true;
}
done:
@@ -3177,7 +3177,7 @@ H5FD_is_driver_registered_by_value(H5FD_class_value_t driver_value, hid_t *regis
*-------------------------------------------------------------------------
*/
hid_t
-H5FD_get_driver_id_by_name(const char *name, hbool_t is_api)
+H5FD_get_driver_id_by_name(const char *name, bool is_api)
{
H5FD_get_driver_ud_t op_data;
hid_t ret_value = H5I_INVALID_HID; /* Return value */
@@ -3190,7 +3190,7 @@ H5FD_get_driver_id_by_name(const char *name, hbool_t is_api)
op_data.found_id = H5I_INVALID_HID;
/* Find driver with specified name */
- if (H5I_iterate(H5I_VFL, H5FD__get_driver_cb, &op_data, FALSE) < 0)
+ if (H5I_iterate(H5I_VFL, H5FD__get_driver_cb, &op_data, false) < 0)
HGOTO_ERROR(H5E_VFL, H5E_BADITER, H5I_INVALID_HID, "can't iterate over VFL drivers");
/* Found a driver with that name */
@@ -3216,7 +3216,7 @@ H5FD_get_driver_id_by_name(const char *name, hbool_t is_api)
*-------------------------------------------------------------------------
*/
hid_t
-H5FD_get_driver_id_by_value(H5FD_class_value_t value, hbool_t is_api)
+H5FD_get_driver_id_by_value(H5FD_class_value_t value, bool is_api)
{
H5FD_get_driver_ud_t op_data;
hid_t ret_value = H5I_INVALID_HID; /* Return value */
@@ -3229,7 +3229,7 @@ H5FD_get_driver_id_by_value(H5FD_class_value_t value, hbool_t is_api)
op_data.found_id = H5I_INVALID_HID;
/* Find driver with specified value */
- if (H5I_iterate(H5I_VFL, H5FD__get_driver_cb, &op_data, FALSE) < 0)
+ if (H5I_iterate(H5I_VFL, H5FD__get_driver_cb, &op_data, false) < 0)
HGOTO_ERROR(H5E_VFL, H5E_BADITER, H5I_INVALID_HID, "can't iterate over VFL drivers");
/* Found a driver with that value */
diff --git a/src/H5FDlog.c b/src/H5FDlog.c
index 660f266d2b6..8d43dc836a6 100644
--- a/src/H5FDlog.c
+++ b/src/H5FDlog.c
@@ -73,7 +73,7 @@ typedef struct H5FD_log_t {
haddr_t eof; /* end of file; current file size */
haddr_t pos; /* current file I/O position */
H5FD_file_op_t op; /* last operation */
- hbool_t ignore_disabled_file_locks;
+ bool ignore_disabled_file_locks;
char filename[H5FD_MAX_FILENAME_LEN]; /* Copy of file name from open operation */
#ifndef H5_HAVE_WIN32_API
/* On most systems the combination of device and i-node number uniquely
@@ -111,7 +111,7 @@ typedef struct H5FD_log_t {
* Whether to eliminate the family driver info and convert this file to
* a single file
*/
- hbool_t fam_to_single;
+ bool fam_to_single;
/* Fields for tracking I/O operations */
unsigned char *nread; /* Number of reads from a file location */
@@ -170,8 +170,8 @@ static herr_t H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, had
void *buf);
static herr_t H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, size_t size,
const void *buf);
-static herr_t H5FD__log_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
-static herr_t H5FD__log_lock(H5FD_t *_file, hbool_t rw);
+static herr_t H5FD__log_truncate(H5FD_t *_file, hid_t dxpl_id, bool closing);
+static herr_t H5FD__log_lock(H5FD_t *_file, bool rw);
static herr_t H5FD__log_unlock(H5FD_t *_file);
static herr_t H5FD__log_delete(const char *filename, hid_t fapl_id);
@@ -244,16 +244,16 @@ H5FD_log_init(void)
FUNC_ENTER_NOAPI_NOERR
/* Check the use disabled file locks environment variable */
- lock_env_var = HDgetenv(HDF5_USE_FILE_LOCKING);
- if (lock_env_var && !HDstrcmp(lock_env_var, "BEST_EFFORT"))
- ignore_disabled_file_locks_s = TRUE; /* Override: Ignore disabled locks */
- else if (lock_env_var && (!HDstrcmp(lock_env_var, "TRUE") || !HDstrcmp(lock_env_var, "1")))
- ignore_disabled_file_locks_s = FALSE; /* Override: Don't ignore disabled locks */
+ lock_env_var = getenv(HDF5_USE_FILE_LOCKING);
+ if (lock_env_var && !strcmp(lock_env_var, "BEST_EFFORT"))
+ ignore_disabled_file_locks_s = true; /* Override: Ignore disabled locks */
+ else if (lock_env_var && (!strcmp(lock_env_var, "TRUE") || !strcmp(lock_env_var, "1")))
+ ignore_disabled_file_locks_s = false; /* Override: Don't ignore disabled locks */
else
ignore_disabled_file_locks_s = FAIL; /* Environment variable not set, or not set correctly */
if (H5I_VFL != H5I_get_type(H5FD_LOG_g))
- H5FD_LOG_g = H5FD_register(&H5FD_log_g, sizeof(H5FD_class_t), FALSE);
+ H5FD_LOG_g = H5FD_register(&H5FD_log_g, sizeof(H5FD_class_t), false);
/* Set return value */
ret_value = H5FD_LOG_g;
@@ -501,7 +501,7 @@ H5FD__log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
HGOTO_ERROR(
H5E_FILE, H5E_CANTOPENFILE, NULL,
"unable to open file: name = '%s', errno = %d, error message = '%s', flags = %x, o_flags = %x",
- name, myerrno, HDstrerror(myerrno), flags, (unsigned)o_flags);
+ name, myerrno, strerror(myerrno), flags, (unsigned)o_flags);
}
/* Stop timer for open() call */
@@ -545,7 +545,7 @@ H5FD__log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
#endif /* H5_HAVE_WIN32_API */
/* Retain a copy of the name used to open the file, for possible error reporting */
- HDstrncpy(file->filename, name, sizeof(file->filename));
+ strncpy(file->filename, name, sizeof(file->filename));
file->filename[sizeof(file->filename) - 1] = '\0';
/* Get the flags for logging */
@@ -1239,7 +1239,7 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had
"file read failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, "
"error message = '%s', buf = %p, total read size = %llu, bytes this sub-read = %llu, "
"bytes actually read = %llu, offset = %llu",
- HDctime(&mytime), file->filename, file->fd, myerrno, HDstrerror(myerrno), buf,
+ HDctime(&mytime), file->filename, file->fd, myerrno, strerror(myerrno), buf,
(unsigned long long)size, (unsigned long long)bytes_in,
(unsigned long long)bytes_read, (unsigned long long)offset);
}
@@ -1458,7 +1458,7 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha
"file write failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, "
"error message = '%s', buf = %p, total write size = %llu, bytes this sub-write = "
"%llu, bytes actually written = %llu, offset = %llu",
- HDctime(&mytime), file->filename, file->fd, myerrno, HDstrerror(myerrno), buf,
+ HDctime(&mytime), file->filename, file->fd, myerrno, strerror(myerrno), buf,
(unsigned long long)size, (unsigned long long)bytes_in,
(unsigned long long)bytes_wrote, (unsigned long long)offset);
} /* end if */
@@ -1536,7 +1536,7 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD__log_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_UNUSED closing)
+H5FD__log_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, bool H5_ATTR_UNUSED closing)
{
H5FD_log_t *file = (H5FD_log_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
@@ -1641,7 +1641,7 @@ H5FD__log_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD__log_lock(H5FD_t *_file, hbool_t rw)
+H5FD__log_lock(H5FD_t *_file, bool rw)
{
H5FD_log_t *file = (H5FD_log_t *)_file; /* VFD file struct */
int lock_flags; /* file locking flags */
diff --git a/src/H5FDmirror.c b/src/H5FDmirror.c
index 1130fac8c2d..8ddffb09cc1 100644
--- a/src/H5FDmirror.c
+++ b/src/H5FDmirror.c
@@ -153,8 +153,8 @@ static herr_t H5FD__mirror_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id,
const void *buf);
static herr_t H5FD__mirror_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, size_t size,
void *buf);
-static herr_t H5FD__mirror_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
-static herr_t H5FD__mirror_lock(H5FD_t *_file, hbool_t rw);
+static herr_t H5FD__mirror_truncate(H5FD_t *_file, hid_t dxpl_id, bool closing);
+static herr_t H5FD__mirror_lock(H5FD_t *_file, bool rw);
static herr_t H5FD__mirror_unlock(H5FD_t *_file);
static herr_t H5FD__mirror_verify_reply(H5FD_mirror_t *file);
@@ -231,7 +231,7 @@ H5FD_mirror_init(void)
LOG_OP_CALL(__func__);
if (H5I_VFL != H5I_get_type(H5FD_MIRROR_g)) {
- H5FD_MIRROR_g = H5FD_register(&H5FD_mirror_g, sizeof(H5FD_class_t), FALSE);
+ H5FD_MIRROR_g = H5FD_register(&H5FD_mirror_g, sizeof(H5FD_class_t), false);
if (H5I_INVALID_HID == H5FD_MIRROR_g)
HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register mirror");
}
@@ -330,7 +330,7 @@ H5FD__mirror_xmit_decode_uint32(uint32_t *out, const unsigned char *_buf)
*
* ---------------------------------------------------------------------------
*/
-static hbool_t
+static bool
is_host_little_endian(void)
{
union {
@@ -340,9 +340,9 @@ is_host_little_endian(void)
echeck.u32 = 0xA1B2C3D4;
if (echeck.u8[0] == 0xD4)
- return TRUE;
+ return true;
else
- return FALSE;
+ return false;
} /* end is_host_little_endian() */
/* ---------------------------------------------------------------------------
@@ -370,7 +370,7 @@ H5FD__mirror_xmit_decode_uint64(uint64_t *out, const unsigned char *_buf)
assert(_buf && out);
H5MM_memcpy(&n, _buf, sizeof(n));
- if (TRUE == is_host_little_endian())
+ if (true == is_host_little_endian())
*out = BSWAP_64(n);
else
*out = n;
@@ -476,7 +476,7 @@ H5FD__mirror_xmit_encode_uint64(unsigned char *_dest, uint64_t v)
assert(_dest);
- if (TRUE == is_host_little_endian())
+ if (true == is_host_little_endian())
n = BSWAP_64(v);
H5MM_memcpy(_dest, &n, sizeof(n));
@@ -615,7 +615,7 @@ H5FD_mirror_xmit_decode_open(H5FD_mirror_xmit_open_t *out, const unsigned char *
n_eaten += H5FD__mirror_xmit_decode_uint64(&(out->maxaddr), &buf[n_eaten]);
n_eaten += H5FD__mirror_xmit_decode_uint64(&(out->size_t_blob), &buf[n_eaten]);
assert((H5FD_MIRROR_XMIT_OPEN_SIZE - H5FD_MIRROR_XMIT_FILEPATH_MAX) == n_eaten);
- HDstrncpy(out->filename, (const char *)&buf[n_eaten], H5FD_MIRROR_XMIT_FILEPATH_MAX - 1);
+ strncpy(out->filename, (const char *)&buf[n_eaten], H5FD_MIRROR_XMIT_FILEPATH_MAX - 1);
out->filename[H5FD_MIRROR_XMIT_FILEPATH_MAX - 1] = 0; /* force final NULL */
return H5FD_MIRROR_XMIT_OPEN_SIZE;
@@ -653,7 +653,7 @@ H5FD_mirror_xmit_decode_reply(H5FD_mirror_xmit_reply_t *out, const unsigned char
n_eaten += H5FD_mirror_xmit_decode_header(&(out->pub), buf);
n_eaten += H5FD__mirror_xmit_decode_uint32(&(out->status), &buf[n_eaten]);
assert((H5FD_MIRROR_XMIT_REPLY_SIZE - H5FD_MIRROR_STATUS_MESSAGE_MAX) == n_eaten);
- HDstrncpy(out->message, (const char *)&buf[n_eaten], H5FD_MIRROR_STATUS_MESSAGE_MAX - 1);
+ strncpy(out->message, (const char *)&buf[n_eaten], H5FD_MIRROR_STATUS_MESSAGE_MAX - 1);
out->message[H5FD_MIRROR_STATUS_MESSAGE_MAX - 1] = 0; /* force NULL term */
return H5FD_MIRROR_XMIT_REPLY_SIZE;
@@ -825,7 +825,7 @@ H5FD_mirror_xmit_encode_open(unsigned char *dest, const H5FD_mirror_xmit_open_t
n_writ += H5FD__mirror_xmit_encode_uint64(&dest[n_writ], x->maxaddr);
n_writ += H5FD__mirror_xmit_encode_uint64(&dest[n_writ], x->size_t_blob);
assert((H5FD_MIRROR_XMIT_OPEN_SIZE - H5FD_MIRROR_XMIT_FILEPATH_MAX) == n_writ);
- HDstrncpy((char *)&dest[n_writ], x->filename, H5FD_MIRROR_XMIT_FILEPATH_MAX);
+ strncpy((char *)&dest[n_writ], x->filename, H5FD_MIRROR_XMIT_FILEPATH_MAX);
return H5FD_MIRROR_XMIT_OPEN_SIZE;
} /* end H5FD_mirror_xmit_encode_open() */
@@ -860,7 +860,7 @@ H5FD_mirror_xmit_encode_reply(unsigned char *dest, const H5FD_mirror_xmit_reply_
n_writ += H5FD_mirror_xmit_encode_header(dest, (const H5FD_mirror_xmit_t *)&(x->pub));
n_writ += H5FD__mirror_xmit_encode_uint32(&dest[n_writ], x->status);
assert((H5FD_MIRROR_XMIT_REPLY_SIZE - H5FD_MIRROR_STATUS_MESSAGE_MAX) == n_writ);
- HDstrncpy((char *)&dest[n_writ], x->message, H5FD_MIRROR_STATUS_MESSAGE_MAX);
+ strncpy((char *)&dest[n_writ], x->message, H5FD_MIRROR_STATUS_MESSAGE_MAX);
return H5FD_MIRROR_XMIT_REPLY_SIZE;
} /* end H5FD_mirror_xmit_encode_reply() */
@@ -935,20 +935,20 @@ H5FD_mirror_xmit_encode_write(unsigned char *dest, const H5FD_mirror_xmit_write_
*
* Checks header validity and op code.
*
- * Return: TRUE if valid; else FALSE.
+ * Return: true if valid; else false.
* ---------------------------------------------------------------------------
*/
-H5_ATTR_PURE hbool_t
+H5_ATTR_PURE bool
H5FD_mirror_xmit_is_close(const H5FD_mirror_xmit_t *xmit)
{
LOG_OP_CALL(__func__);
assert(xmit);
- if ((TRUE == H5FD_mirror_xmit_is_xmit(xmit)) && (H5FD_MIRROR_OP_CLOSE == xmit->op))
- return TRUE;
+ if ((true == H5FD_mirror_xmit_is_xmit(xmit)) && (H5FD_MIRROR_OP_CLOSE == xmit->op))
+ return true;
- return FALSE;
+ return false;
} /* end H5FD_mirror_xmit_is_close() */
/* ---------------------------------------------------------------------------
@@ -958,20 +958,20 @@ H5FD_mirror_xmit_is_close(const H5FD_mirror_xmit_t *xmit)
*
* Checks header validity and op code.
*
- * Return: TRUE if valid; else FALSE.
+ * Return: true if valid; else false.
* ---------------------------------------------------------------------------
*/
-H5_ATTR_PURE hbool_t
+H5_ATTR_PURE bool
H5FD_mirror_xmit_is_lock(const H5FD_mirror_xmit_lock_t *xmit)
{
LOG_OP_CALL(__func__);
assert(xmit);
- if ((TRUE == H5FD_mirror_xmit_is_xmit(&(xmit->pub))) && (H5FD_MIRROR_OP_LOCK == xmit->pub.op))
- return TRUE;
+ if ((true == H5FD_mirror_xmit_is_xmit(&(xmit->pub))) && (H5FD_MIRROR_OP_LOCK == xmit->pub.op))
+ return true;
- return FALSE;
+ return false;
} /* end H5FD_mirror_xmit_is_lock() */
/* ---------------------------------------------------------------------------
@@ -981,21 +981,21 @@ H5FD_mirror_xmit_is_lock(const H5FD_mirror_xmit_lock_t *xmit)
*
* Checks header validity and op code.
*
- * Return: TRUE if valid; else FALSE.
+ * Return: true if valid; else false.
* ---------------------------------------------------------------------------
*/
-H5_ATTR_PURE hbool_t
+H5_ATTR_PURE bool
H5FD_mirror_xmit_is_open(const H5FD_mirror_xmit_open_t *xmit)
{
LOG_OP_CALL(__func__);
assert(xmit);
- if ((TRUE == H5FD_mirror_xmit_is_xmit(&(xmit->pub))) && (H5FD_MIRROR_OP_OPEN == xmit->pub.op))
+ if ((true == H5FD_mirror_xmit_is_xmit(&(xmit->pub))) && (H5FD_MIRROR_OP_OPEN == xmit->pub.op))
- return TRUE;
+ return true;
- return FALSE;
+ return false;
} /* end H5FD_mirror_xmit_is_open() */
/* ---------------------------------------------------------------------------
@@ -1005,20 +1005,20 @@ H5FD_mirror_xmit_is_open(const H5FD_mirror_xmit_open_t *xmit)
*
* Checks header validity and op code.
*
- * Return: TRUE if valid; else FALSE.
+ * Return: true if valid; else false.
* ---------------------------------------------------------------------------
*/
-H5_ATTR_PURE hbool_t
+H5_ATTR_PURE bool
H5FD_mirror_xmit_is_set_eoa(const H5FD_mirror_xmit_eoa_t *xmit)
{
LOG_OP_CALL(__func__);
assert(xmit);
- if ((TRUE == H5FD_mirror_xmit_is_xmit(&(xmit->pub))) && (H5FD_MIRROR_OP_SET_EOA == xmit->pub.op))
- return TRUE;
+ if ((true == H5FD_mirror_xmit_is_xmit(&(xmit->pub))) && (H5FD_MIRROR_OP_SET_EOA == xmit->pub.op))
+ return true;
- return FALSE;
+ return false;
} /* end H5FD_mirror_xmit_is_eoa() */
/* ---------------------------------------------------------------------------
@@ -1028,20 +1028,20 @@ H5FD_mirror_xmit_is_set_eoa(const H5FD_mirror_xmit_eoa_t *xmit)
*
* Checks header validity and op code.
*
- * Return: TRUE if valid; else FALSE.
+ * Return: true if valid; else false.
* ---------------------------------------------------------------------------
*/
-H5_ATTR_PURE hbool_t
+H5_ATTR_PURE bool
H5FD_mirror_xmit_is_reply(const H5FD_mirror_xmit_reply_t *xmit)
{
LOG_OP_CALL(__func__);
assert(xmit);
- if ((TRUE == H5FD_mirror_xmit_is_xmit(&(xmit->pub))) && (H5FD_MIRROR_OP_REPLY == xmit->pub.op))
- return TRUE;
+ if ((true == H5FD_mirror_xmit_is_xmit(&(xmit->pub))) && (H5FD_MIRROR_OP_REPLY == xmit->pub.op))
+ return true;
- return FALSE;
+ return false;
} /* end H5FD_mirror_xmit_is_reply() */
/* ---------------------------------------------------------------------------
@@ -1051,20 +1051,20 @@ H5FD_mirror_xmit_is_reply(const H5FD_mirror_xmit_reply_t *xmit)
*
* Checks header validity and op code.
*
- * Return: TRUE if valid; else FALSE.
+ * Return: true if valid; else false.
* ---------------------------------------------------------------------------
*/
-H5_ATTR_PURE hbool_t
+H5_ATTR_PURE bool
H5FD_mirror_xmit_is_write(const H5FD_mirror_xmit_write_t *xmit)
{
LOG_OP_CALL(__func__);
assert(xmit);
- if ((TRUE == H5FD_mirror_xmit_is_xmit(&(xmit->pub))) && (H5FD_MIRROR_OP_WRITE == xmit->pub.op))
- return TRUE;
+ if ((true == H5FD_mirror_xmit_is_xmit(&(xmit->pub))) && (H5FD_MIRROR_OP_WRITE == xmit->pub.op))
+ return true;
- return FALSE;
+ return false;
} /* end H5FD_mirror_xmit_is_write() */
/* ---------------------------------------------------------------------------
@@ -1074,10 +1074,10 @@ H5FD_mirror_xmit_is_write(const H5FD_mirror_xmit_write_t *xmit)
*
* Checks magic number and structure version.
*
- * Return: TRUE if valid; else FALSE.
+ * Return: true if valid; else false.
* ---------------------------------------------------------------------------
*/
-H5_ATTR_PURE hbool_t
+H5_ATTR_PURE bool
H5FD_mirror_xmit_is_xmit(const H5FD_mirror_xmit_t *xmit)
{
LOG_OP_CALL(__func__);
@@ -1085,9 +1085,9 @@ H5FD_mirror_xmit_is_xmit(const H5FD_mirror_xmit_t *xmit)
assert(xmit);
if ((H5FD_MIRROR_XMIT_MAGIC != xmit->magic) || (H5FD_MIRROR_XMIT_CURR_VERSION != xmit->version))
- return FALSE;
+ return false;
- return TRUE;
+ return true;
} /* end H5FD_mirror_xmit_is_xmit() */
/* ----------------------------------------------------------------------------
@@ -1130,7 +1130,7 @@ H5FD__mirror_verify_reply(H5FD_mirror_t *file)
if (H5FD_mirror_xmit_decode_reply(&reply, xmit_buf) != H5FD_MIRROR_XMIT_REPLY_SIZE)
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "unable to decode reply xmit");
- if (H5FD_mirror_xmit_is_reply(&reply) != TRUE)
+ if (H5FD_mirror_xmit_is_reply(&reply) != true)
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "xmit op code was not REPLY");
if (reply.pub.session_token != file->xmit.session_token)
@@ -1360,7 +1360,7 @@ H5FD__mirror_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad
if (!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid file name");
- if (HDstrlen(name) >= H5FD_MIRROR_XMIT_FILEPATH_MAX)
+ if (strlen(name) >= H5FD_MIRROR_XMIT_FILEPATH_MAX)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "filename is too long");
if (0 == maxaddr || HADDR_UNDEF == maxaddr)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "bogus maxaddr");
@@ -1417,7 +1417,7 @@ H5FD__mirror_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad
open_xmit->flags = (uint32_t)flags;
open_xmit->maxaddr = (uint64_t)maxaddr;
open_xmit->size_t_blob = (uint64_t)((size_t)(-1));
- HDsnprintf(open_xmit->filename, H5FD_MIRROR_XMIT_FILEPATH_MAX - 1, "%s", name);
+ snprintf(open_xmit->filename, H5FD_MIRROR_XMIT_FILEPATH_MAX - 1, "%s", name);
xmit_buf = H5FL_BLK_MALLOC(xmit, H5FD_MIRROR_XMIT_BUFFER_MAX);
if (NULL == xmit_buf)
@@ -1512,15 +1512,14 @@ H5FD__mirror_close(H5FD_t *_file)
* We can ignore any response from the writer, if we receive
* any reply at all.
*/
- if (HDwrite(file->sock_fd, "GOODBYE", HDstrlen("GOODBYE")) < 0) {
+ if (HDwrite(file->sock_fd, "GOODBYE", strlen("GOODBYE")) < 0) {
HDONE_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to transmit close");
if (HDclose(file->sock_fd) < 0)
HDONE_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL, "can't close socket");
file->sock_fd = -1; /* invalidate for later */
} /* end if problem writing goodbye; go down hard */
else if (HDshutdown(file->sock_fd, SHUT_WR) < 0)
- HDONE_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "can't shutdown socket write: %s",
- HDstrerror(errno));
+ HDONE_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "can't shutdown socket write: %s", strerror(errno));
} /* end if xmit encode failed */
if (file->sock_fd >= 0)
@@ -1777,7 +1776,7 @@ H5FD__mirror_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD__mirror_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_UNUSED closing)
+H5FD__mirror_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, bool H5_ATTR_UNUSED closing)
{
unsigned char *xmit_buf = NULL;
H5FD_mirror_t *file = (H5FD_mirror_t *)_file;
@@ -1817,14 +1816,14 @@ H5FD__mirror_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_AT
*
* Purpose: To place an advisory lock on a file.
* The lock type to apply depends on the parameter "rw":
- * TRUE--opens for write: an exclusive lock
- * FALSE--opens for read: a shared lock
+ * true--opens for write: an exclusive lock
+ * false--opens for read: a shared lock
*
* Return: SUCCEED/FAIL
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD__mirror_lock(H5FD_t *_file, hbool_t rw)
+H5FD__mirror_lock(H5FD_t *_file, bool rw)
{
H5FD_mirror_xmit_lock_t xmit_lock;
unsigned char *xmit_buf = NULL;
diff --git a/src/H5FDmirror_priv.h b/src/H5FDmirror_priv.h
index f647c21c497..693d4ebb21e 100644
--- a/src/H5FDmirror_priv.h
+++ b/src/H5FDmirror_priv.h
@@ -148,7 +148,7 @@ typedef struct H5FD_mirror_xmit_eoa_t {
*
* `rw` (uint64_t)
* The Read/Write mode flag passed into H5FDlock().
- * (Natively `hbool_t`, an 'int') TODO: native int may be 64-bit?
+ * (Natively `bool`, an 'int') TODO: native int may be 64-bit?
*
* ---------------------------------------------------------------------------
*/
@@ -300,13 +300,13 @@ H5_DLL size_t H5FD_mirror_xmit_encode_reply(unsigned char *dest, const H5FD_mirr
H5_DLL size_t H5FD_mirror_xmit_encode_set_eoa(unsigned char *dest, const H5FD_mirror_xmit_eoa_t *x);
H5_DLL size_t H5FD_mirror_xmit_encode_write(unsigned char *dest, const H5FD_mirror_xmit_write_t *x);
-H5_DLL hbool_t H5FD_mirror_xmit_is_close(const H5FD_mirror_xmit_t *xmit);
-H5_DLL hbool_t H5FD_mirror_xmit_is_lock(const H5FD_mirror_xmit_lock_t *xmit);
-H5_DLL hbool_t H5FD_mirror_xmit_is_open(const H5FD_mirror_xmit_open_t *xmit);
-H5_DLL hbool_t H5FD_mirror_xmit_is_reply(const H5FD_mirror_xmit_reply_t *xmit);
-H5_DLL hbool_t H5FD_mirror_xmit_is_set_eoa(const H5FD_mirror_xmit_eoa_t *xmit);
-H5_DLL hbool_t H5FD_mirror_xmit_is_write(const H5FD_mirror_xmit_write_t *xmit);
-H5_DLL hbool_t H5FD_mirror_xmit_is_xmit(const H5FD_mirror_xmit_t *xmit);
+H5_DLL bool H5FD_mirror_xmit_is_close(const H5FD_mirror_xmit_t *xmit);
+H5_DLL bool H5FD_mirror_xmit_is_lock(const H5FD_mirror_xmit_lock_t *xmit);
+H5_DLL bool H5FD_mirror_xmit_is_open(const H5FD_mirror_xmit_open_t *xmit);
+H5_DLL bool H5FD_mirror_xmit_is_reply(const H5FD_mirror_xmit_reply_t *xmit);
+H5_DLL bool H5FD_mirror_xmit_is_set_eoa(const H5FD_mirror_xmit_eoa_t *xmit);
+H5_DLL bool H5FD_mirror_xmit_is_write(const H5FD_mirror_xmit_write_t *xmit);
+H5_DLL bool H5FD_mirror_xmit_is_xmit(const H5FD_mirror_xmit_t *xmit);
#ifdef __cplusplus
}
diff --git a/src/H5FDmpi.c b/src/H5FDmpi.c
index 9b5f4e89f37..127740efe3b 100644
--- a/src/H5FDmpi.c
+++ b/src/H5FDmpi.c
@@ -214,7 +214,7 @@ H5FD_mpi_haddr_to_MPIOff(haddr_t addr, MPI_Offset *mpi_off /*out*/)
*-------------------------------------------------------------------------
*/
herr_t
-H5FD_mpi_get_file_sync_required(H5FD_t *file, hbool_t *file_sync_required)
+H5FD_mpi_get_file_sync_required(H5FD_t *file, bool *file_sync_required)
{
const H5FD_class_t *cls;
uint64_t flags = H5FD_CTL_ROUTE_TO_TERMINAL_VFD_FLAG;
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c
index 74137e44dbc..ed704c2a61c 100644
--- a/src/H5FDmpio.c
+++ b/src/H5FDmpio.c
@@ -38,10 +38,10 @@ static hid_t H5FD_MPIO_g = 0;
/* Whether to allow collective I/O operations */
/* (Can be changed by setting "HDF5_MPI_OPT_TYPES" environment variable to '0' or '1') */
-hbool_t H5FD_mpi_opt_types_g = TRUE;
+hbool_t H5FD_mpi_opt_types_g = true;
/* Whether the driver initialized MPI on its own */
-static hbool_t H5FD_mpi_self_initialized = FALSE;
+static bool H5FD_mpi_self_initialized = false;
/*
* The view is set to this value
@@ -65,7 +65,7 @@ typedef struct H5FD_mpio_t {
haddr_t eoa; /* End-of-address marker */
haddr_t last_eoa; /* Last known end-of-address marker */
haddr_t local_eof; /* Local end-of-file address for each process */
- hbool_t mpi_file_sync_required; /* Whether the ROMIO driver requires MPI_File_sync after write */
+ bool mpi_file_sync_required; /* Whether the ROMIO driver requires MPI_File_sync after write */
} H5FD_mpio_t;
/* Private Prototypes */
@@ -97,25 +97,27 @@ static herr_t H5FD__mpio_write_selection(H5FD_t *_file, H5FD_mem_t type, hid_t H
size_t count, hid_t mem_space_ids[], hid_t file_space_ids[],
haddr_t offsets[], size_t element_sizes[], const void *bufs[]);
-static herr_t H5FD__mpio_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
-static herr_t H5FD__mpio_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
+static herr_t H5FD__mpio_flush(H5FD_t *_file, hid_t dxpl_id, bool closing);
+static herr_t H5FD__mpio_truncate(H5FD_t *_file, hid_t dxpl_id, bool closing);
static herr_t H5FD__mpio_delete(const char *filename, hid_t fapl_id);
static herr_t H5FD__mpio_ctl(H5FD_t *_file, uint64_t op_code, uint64_t flags, const void *input,
void **output);
/* Other functions */
-static herr_t H5FD__mpio_vector_build_types(
- uint32_t count, H5FD_mem_t types[], haddr_t addrs[], size_t sizes[], H5_flexible_const_ptr_t bufs[],
- haddr_t *s_addrs[], size_t *s_sizes[], H5_flexible_const_ptr_t *s_bufs[], hbool_t *vector_was_sorted,
- MPI_Offset *mpi_off, H5_flexible_const_ptr_t *mpi_bufs_base, int *size_i, MPI_Datatype *buf_type,
- hbool_t *buf_type_created, MPI_Datatype *file_type, hbool_t *file_type_created, char *unused);
-
-static herr_t H5FD__selection_build_types(hbool_t io_op_write, size_t num_pieces, H5_flexible_const_ptr_t mbb,
+static herr_t H5FD__mpio_vector_build_types(uint32_t count, H5FD_mem_t types[], haddr_t addrs[],
+ size_t sizes[], H5_flexible_const_ptr_t bufs[],
+ haddr_t *s_addrs[], size_t *s_sizes[],
+ H5_flexible_const_ptr_t *s_bufs[], bool *vector_was_sorted,
+ MPI_Offset *mpi_off, H5_flexible_const_ptr_t *mpi_bufs_base,
+ int *size_i, MPI_Datatype *buf_type, bool *buf_type_created,
+ MPI_Datatype *file_type, bool *file_type_created, char *unused);
+
+static herr_t H5FD__selection_build_types(bool io_op_write, size_t num_pieces, H5_flexible_const_ptr_t mbb,
H5S_t **file_spaces, H5S_t **mem_spaces, haddr_t offsets[],
H5_flexible_const_ptr_t bufs[], size_t src_element_sizes[],
size_t dst_element_sizes[], MPI_Datatype *final_ftype,
- hbool_t *final_ftype_is_derived, MPI_Datatype *final_mtype,
- hbool_t *final_mtype_is_derived);
+ bool *final_ftype_is_derived, MPI_Datatype *final_mtype,
+ bool *final_mtype_is_derived);
/* The MPIO file driver information */
static const H5FD_class_t H5FD_mpio_g = {
@@ -275,11 +277,11 @@ H5FD_mpio_init(void)
/* Register the MPI-IO VFD, if it isn't already */
if (H5I_VFL != H5I_get_type(H5FD_MPIO_g)) {
- H5FD_MPIO_g = H5FD_register((const H5FD_class_t *)&H5FD_mpio_g, sizeof(H5FD_class_t), FALSE);
+ H5FD_MPIO_g = H5FD_register((const H5FD_class_t *)&H5FD_mpio_g, sizeof(H5FD_class_t), false);
/* Check if MPI driver has been loaded dynamically */
- env = HDgetenv(HDF5_DRIVER);
- if (env && !HDstrcmp(env, "mpio")) {
+ env = getenv(HDF5_DRIVER);
+ if (env && !strcmp(env, "mpio")) {
int mpi_initialized = 0;
/* Initialize MPI if not already initialized */
@@ -288,7 +290,7 @@ H5FD_mpio_init(void)
if (!mpi_initialized) {
if (MPI_SUCCESS != MPI_Init(NULL, NULL))
HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, H5I_INVALID_HID, "can't initialize MPI");
- H5FD_mpi_self_initialized = TRUE;
+ H5FD_mpi_self_initialized = true;
}
}
}
@@ -297,16 +299,16 @@ H5FD_mpio_init(void)
const char *s; /* String for environment variables */
/* Allow MPI buf-and-file-type optimizations? */
- s = HDgetenv("HDF5_MPI_OPT_TYPES");
+ s = getenv("HDF5_MPI_OPT_TYPES");
if (s && isdigit(*s))
- H5FD_mpi_opt_types_g = (0 == strtol(s, NULL, 0)) ? FALSE : TRUE;
+ H5FD_mpi_opt_types_g = (0 == strtol(s, NULL, 0)) ? false : true;
#ifdef H5FDmpio_DEBUG
/* Clear the flag buffer */
memset(H5FD_mpio_debug_flags_s, 0, sizeof(H5FD_mpio_debug_flags_s));
/* Retrieve MPI-IO debugging environment variable */
- s = HDgetenv("H5FD_mpio_Debug");
+ s = getenv("H5FD_mpio_Debug");
if (s)
H5FD__mpio_parse_debug_str(s);
#endif /* H5FDmpio_DEBUG */
@@ -343,7 +345,7 @@ H5FD__mpio_term(void)
if (!mpi_finalized)
MPI_Finalize();
- H5FD_mpi_self_initialized = FALSE;
+ H5FD_mpi_self_initialized = false;
}
/* Reset VFL ID */
@@ -557,13 +559,13 @@ H5Pget_dxpl_mpio(hid_t dxpl_id, H5FD_mpio_xfer_t *xfer_mode /*out*/)
/*-------------------------------------------------------------------------
* Function: H5Pset_dxpl_mpio_collective_opt
*
- * Purpose: To set a flag to choose linked chunk I/O or multi-chunk I/O
- * without involving decision-making inside HDF5
- *
- * Note: The library will do linked chunk I/O or multi-chunk I/O without
- * involving communications for decision-making process.
- * The library won't behave as it asks for only when we find
- * that the low-level MPI-IO package doesn't support this.
+ * Purpose: Set the data transfer property list DXPL_ID to use transfer
+ * mode OPT_MODE during I/O. This allows the application to
+ * specify collective I/O at the HDF5 interface level (with
+ * the H5Pset_dxpl_mpio routine), while controlling whether
+ * the actual I/O is performed collectively (e.g., via
+ * MPI_File_write_at_all) or independently (e.g., via
+ * MPI_File_write_at).
*
* Return: Success: Non-negative
* Failure: Negative
@@ -719,11 +721,11 @@ H5Pset_dxpl_mpio_chunk_opt_ratio(hid_t dxpl_id, unsigned percent_num_proc_per_ch
*-------------------------------------------------------------------------
*/
herr_t
-H5FD_set_mpio_atomicity(H5FD_t *_file, hbool_t flag)
+H5FD_set_mpio_atomicity(H5FD_t *_file, bool flag)
{
H5FD_mpio_t *file = (H5FD_mpio_t *)_file;
#ifdef H5FDmpio_DEBUG
- hbool_t H5FD_mpio_debug_t_flag = (H5FD_mpio_debug_flags_s[(int)'t'] && H5FD_MPIO_TRACE_THIS_RANK(file));
+ bool H5FD_mpio_debug_t_flag = (H5FD_mpio_debug_flags_s[(int)'t'] && H5FD_MPIO_TRACE_THIS_RANK(file));
#endif
int mpi_code; /* MPI return code */
herr_t ret_value = SUCCEED;
@@ -736,7 +738,7 @@ H5FD_set_mpio_atomicity(H5FD_t *_file, hbool_t flag)
#endif
/* set atomicity value */
- if (MPI_SUCCESS != (mpi_code = MPI_File_set_atomicity(file->f, (int)(flag != FALSE))))
+ if (MPI_SUCCESS != (mpi_code = MPI_File_set_atomicity(file->f, (int)(flag != false))))
HMPI_GOTO_ERROR(FAIL, "MPI_File_set_atomicity", mpi_code)
done:
@@ -758,12 +760,12 @@ H5FD_set_mpio_atomicity(H5FD_t *_file, hbool_t flag)
*-------------------------------------------------------------------------
*/
herr_t
-H5FD_get_mpio_atomicity(H5FD_t *_file, hbool_t *flag)
+H5FD_get_mpio_atomicity(H5FD_t *_file, bool *flag)
{
H5FD_mpio_t *file = (H5FD_mpio_t *)_file;
int temp_flag;
#ifdef H5FDmpio_DEBUG
- hbool_t H5FD_mpio_debug_t_flag = (H5FD_mpio_debug_flags_s[(int)'t'] && H5FD_MPIO_TRACE_THIS_RANK(file));
+ bool H5FD_mpio_debug_t_flag = (H5FD_mpio_debug_flags_s[(int)'t'] && H5FD_MPIO_TRACE_THIS_RANK(file));
#endif
int mpi_code; /* MPI return code */
herr_t ret_value = SUCCEED;
@@ -780,9 +782,9 @@ H5FD_get_mpio_atomicity(H5FD_t *_file, hbool_t *flag)
HMPI_GOTO_ERROR(FAIL, "MPI_File_get_atomicity", mpi_code)
if (0 != temp_flag)
- *flag = TRUE;
+ *flag = true;
else
- *flag = FALSE;
+ *flag = false;
done:
#ifdef H5FDmpio_DEBUG
@@ -817,13 +819,13 @@ H5FD__mpio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t H5_ATTR
MPI_Info info = MPI_INFO_NULL; /* MPI Info, from plist */
MPI_Info info_used; /* MPI Info returned from MPI_File_open */
MPI_File fh; /* MPI file handle */
- hbool_t file_opened = FALSE; /* Flag to indicate that the file was successfully opened */
+ bool file_opened = false; /* Flag to indicate that the file was successfully opened */
int mpi_amode; /* MPI file access flags */
int mpi_rank = INT_MAX; /* MPI rank of this process */
int mpi_size; /* Total number of MPI processes */
MPI_Offset file_size; /* File size (of existing files) */
#ifdef H5FDmpio_DEBUG
- hbool_t H5FD_mpio_debug_t_flag = FALSE;
+ bool H5FD_mpio_debug_t_flag = false;
#endif
int mpi_code; /* MPI return code */
H5FD_t *ret_value = NULL; /* Return value */
@@ -881,7 +883,7 @@ H5FD__mpio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t H5_ATTR
if (MPI_SUCCESS != (mpi_code = MPI_File_open(comm, name, mpi_amode, info, &fh)))
HMPI_GOTO_ERROR(NULL, "MPI_File_open failed", mpi_code)
- file_opened = TRUE;
+ file_opened = true;
/* Get the MPI-IO hints that actually used by MPI-IO underneath. */
if (MPI_SUCCESS != (mpi_code = MPI_File_get_info(fh, &info_used)))
@@ -944,7 +946,7 @@ H5FD__mpio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t H5_ATTR
if (H5_mpio_get_file_sync_required(fh, &file->mpi_file_sync_required) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, NULL, "unable to get mpi_file_sync_required hint");
- /* Only processor p0 will get the filesize and broadcast it. */
+ /* Only processor p0 will get the file size and broadcast it. */
if (mpi_rank == 0) {
/* If MPI_File_get_size fails, broadcast file size as -1 to signal error */
if (MPI_SUCCESS != (mpi_code = MPI_File_get_size(fh, &file_size)))
@@ -1013,8 +1015,8 @@ H5FD__mpio_close(H5FD_t *_file)
{
H5FD_mpio_t *file = (H5FD_mpio_t *)_file;
#ifdef H5FDmpio_DEBUG
- hbool_t H5FD_mpio_debug_t_flag = (H5FD_mpio_debug_flags_s[(int)'t'] && H5FD_MPIO_TRACE_THIS_RANK(file));
- int mpi_rank = file->mpi_rank;
+ bool H5FD_mpio_debug_t_flag = (H5FD_mpio_debug_flags_s[(int)'t'] && H5FD_MPIO_TRACE_THIS_RANK(file));
+ int mpi_rank = file->mpi_rank;
#endif
int mpi_code; /* MPI return code */
herr_t ret_value = SUCCEED; /* Return value */
@@ -1231,12 +1233,12 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
int io_size; /* Actual number of bytes requested */
int n;
#endif
- hbool_t use_view_this_time = FALSE;
- hbool_t derived_type = FALSE;
- hbool_t rank0_bcast = FALSE; /* If read-with-rank0-and-bcast flag was used */
+ bool use_view_this_time = false;
+ bool derived_type = false;
+ bool rank0_bcast = false; /* If read-with-rank0-and-bcast flag was used */
#ifdef H5FDmpio_DEBUG
- hbool_t H5FD_mpio_debug_t_flag = (H5FD_mpio_debug_flags_s[(int)'t'] && H5FD_MPIO_TRACE_THIS_RANK(file));
- hbool_t H5FD_mpio_debug_r_flag = (H5FD_mpio_debug_flags_s[(int)'r'] && H5FD_MPIO_TRACE_THIS_RANK(file));
+ bool H5FD_mpio_debug_t_flag = (H5FD_mpio_debug_flags_s[(int)'t'] && H5FD_MPIO_TRACE_THIS_RANK(file));
+ bool H5FD_mpio_debug_r_flag = (H5FD_mpio_debug_flags_s[(int)'r'] && H5FD_MPIO_TRACE_THIS_RANK(file));
#endif
int mpi_code; /* MPI return code */
herr_t ret_value = SUCCEED;
@@ -1279,9 +1281,9 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
MPI_Datatype file_type;
/* Remember that views are used */
- use_view_this_time = TRUE;
+ use_view_this_time = true;
- /* Prepare for a full-blown xfer using btype, ftype, and disp */
+ /* Prepare for a full-blown xfer using btype, ftype, and displacement */
if (H5CX_get_mpi_coll_datatypes(&buf_type, &file_type) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get MPI-I/O datatypes");
@@ -1323,7 +1325,7 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
fprintf(stderr, "%s: (%d) doing read-rank0-and-MPI_Bcast\n", __func__, file->mpi_rank);
#endif
/* Indicate path we've taken */
- rank0_bcast = TRUE;
+ rank0_bcast = true;
/* Read on rank 0 Bcast to other ranks */
if (file->mpi_rank == 0) {
@@ -1374,7 +1376,7 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
if (H5_mpio_create_large_type(size, 0, MPI_BYTE, &buf_type) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "can't create MPI-I/O datatype");
- derived_type = TRUE;
+ derived_type = true;
size_i = 1;
}
@@ -1402,7 +1404,7 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
* MPI_Bcast.
*/
bytes_read = -1;
- HMPI_DONE_ERROR(FAIL, "MPI_Get_elements failed", mpi_code)
+ HMPI_DONE_ERROR(FAIL, "MPI_Get_elements failed for rank 0", mpi_code)
}
else
HMPI_GOTO_ERROR(FAIL, "MPI_Get_elements failed", mpi_code)
@@ -1498,12 +1500,12 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h
int io_size; /* Actual number of bytes requested */
#endif
int size_i;
- hbool_t use_view_this_time = FALSE;
- hbool_t derived_type = FALSE;
+ bool use_view_this_time = false;
+ bool derived_type = false;
H5FD_mpio_xfer_t xfer_mode; /* I/O transfer mode */
#ifdef H5FDmpio_DEBUG
- hbool_t H5FD_mpio_debug_t_flag = (H5FD_mpio_debug_flags_s[(int)'t'] && H5FD_MPIO_TRACE_THIS_RANK(file));
- hbool_t H5FD_mpio_debug_w_flag = (H5FD_mpio_debug_flags_s[(int)'w'] && H5FD_MPIO_TRACE_THIS_RANK(file));
+ bool H5FD_mpio_debug_t_flag = (H5FD_mpio_debug_flags_s[(int)'t'] && H5FD_MPIO_TRACE_THIS_RANK(file));
+ bool H5FD_mpio_debug_w_flag = (H5FD_mpio_debug_flags_s[(int)'w'] && H5FD_MPIO_TRACE_THIS_RANK(file));
#endif
int mpi_code; /* MPI return code */
herr_t ret_value = SUCCEED;
@@ -1545,7 +1547,7 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h
MPI_Datatype file_type;
/* Remember that views are used */
- use_view_this_time = TRUE;
+ use_view_this_time = true;
/* Prepare for a full-blown xfer using btype, ftype, and disp */
if (H5CX_get_mpi_coll_datatypes(&buf_type, &file_type) < 0)
@@ -1625,7 +1627,7 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h
if (H5_mpio_create_large_type(size, 0, MPI_BYTE, &buf_type) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "can't create MPI-I/O datatype");
- derived_type = TRUE;
+ derived_type = true;
size_i = 1;
}
@@ -1706,13 +1708,13 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h
static herr_t
H5FD__mpio_vector_build_types(uint32_t count, H5FD_mem_t types[], haddr_t addrs[], size_t sizes[],
H5_flexible_const_ptr_t bufs[], haddr_t *s_addrs[], size_t *s_sizes[],
- H5_flexible_const_ptr_t *s_bufs[], hbool_t *vector_was_sorted,
- MPI_Offset *mpi_off, H5_flexible_const_ptr_t *mpi_bufs_base, int *size_i,
- MPI_Datatype *buf_type, hbool_t *buf_type_created, MPI_Datatype *file_type,
- hbool_t *file_type_created, char *unused)
+ H5_flexible_const_ptr_t *s_bufs[], bool *vector_was_sorted, MPI_Offset *mpi_off,
+ H5_flexible_const_ptr_t *mpi_bufs_base, int *size_i, MPI_Datatype *buf_type,
+ bool *buf_type_created, MPI_Datatype *file_type, bool *file_type_created,
+ char *unused)
{
hsize_t bigio_count; /* Transition point to create derived type */
- hbool_t fixed_size = FALSE;
+ bool fixed_size = false;
size_t size;
H5FD_mem_t *s_types = NULL;
int *mpi_block_lengths = NULL;
@@ -1774,11 +1776,11 @@ H5FD__mpio_vector_build_types(uint32_t count, H5FD_mem_t types[], haddr_t addrs[
if (H5_mpio_create_large_type(sizes[0], 0, MPI_BYTE, buf_type) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "can't create MPI-I/O datatype");
- *buf_type_created = TRUE;
+ *buf_type_created = true;
if (H5_mpio_create_large_type(sizes[0], 0, MPI_BYTE, file_type) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "can't create MPI-I/O datatype");
- *file_type_created = TRUE;
+ *file_type_created = true;
*size_i = 1;
}
@@ -1831,7 +1833,7 @@ H5FD__mpio_vector_build_types(uint32_t count, H5FD_mem_t types[], haddr_t addrs[
*size_i = 1;
- fixed_size = FALSE;
+ fixed_size = false;
/* load the mpi_block_lengths and mpi_displacements arrays */
for (i = 0; i < (int)count; i++) {
@@ -1839,7 +1841,7 @@ H5FD__mpio_vector_build_types(uint32_t count, H5FD_mem_t types[], haddr_t addrs[
if (!fixed_size) {
if ((*s_sizes)[i] == 0) {
assert(vector_was_sorted);
- fixed_size = TRUE;
+ fixed_size = true;
size = sizes[i - 1];
}
else {
@@ -1891,7 +1893,7 @@ H5FD__mpio_vector_build_types(uint32_t count, H5FD_mem_t types[], haddr_t addrs[
/* Create type for large block */
if (H5_mpio_create_large_type(size, 0, MPI_BYTE, &sub_types[i]) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "can't create MPI-I/O datatype");
- sub_types_created[i] = TRUE;
+ sub_types_created[i] = true;
/* Only one of these large types for this vector element */
mpi_block_lengths[i] = 1;
@@ -1910,7 +1912,7 @@ H5FD__mpio_vector_build_types(uint32_t count, H5FD_mem_t types[], haddr_t addrs[
MPI_BYTE, buf_type)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_hindexed for buf_type failed", mpi_code)
- *buf_type_created = TRUE;
+ *buf_type_created = true;
if (MPI_SUCCESS != (mpi_code = MPI_Type_commit(buf_type)))
@@ -1926,7 +1928,7 @@ H5FD__mpio_vector_build_types(uint32_t count, H5FD_mem_t types[], haddr_t addrs[
mpi_displacements, MPI_BYTE, file_type)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_hindexed for file_type failed", mpi_code)
- *file_type_created = TRUE;
+ *file_type_created = true;
if (MPI_SUCCESS != (mpi_code = MPI_Type_commit(file_type)))
@@ -2030,7 +2032,7 @@ H5FD__mpio_vector_build_types(uint32_t count, H5FD_mem_t types[], haddr_t addrs[
/*-------------------------------------------------------------------------
* Function: H5FD__mpio_read_vector()
*
- * Purpose: The behaviour of this function dependes on the value of
+ * Purpose: The behavior of this function depends on the value of
* the io_xfer_mode obtained from the context.
*
* If it is H5FD_MPIO_COLLECTIVE, this is a collective
@@ -2066,16 +2068,16 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou
haddr_t addrs[], size_t sizes[], void *bufs[])
{
H5FD_mpio_t *file = (H5FD_mpio_t *)_file;
- hbool_t vector_was_sorted = TRUE;
+ bool vector_was_sorted = true;
haddr_t *s_addrs = NULL;
size_t *s_sizes = NULL;
void **s_bufs = NULL;
char unused = 0; /* Unused, except for non-NULL pointer value */
void *mpi_bufs_base = NULL;
MPI_Datatype buf_type = MPI_BYTE; /* MPI description of the selection in memory */
- hbool_t buf_type_created = FALSE;
+ bool buf_type_created = false;
MPI_Datatype file_type = MPI_BYTE; /* MPI description of the selection in file */
- hbool_t file_type_created = FALSE;
+ bool file_type_created = false;
int i;
int mpi_code; /* MPI return code */
MPI_Offset mpi_off = 0;
@@ -2094,10 +2096,10 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou
int io_size; /* Actual number of bytes requested */
int n;
#endif
- hbool_t rank0_bcast = FALSE; /* If read-with-rank0-and-bcast flag was used */
+ bool rank0_bcast = false; /* If read-with-rank0-and-bcast flag was used */
#ifdef H5FDmpio_DEBUG
- hbool_t H5FD_mpio_debug_t_flag = (H5FD_mpio_debug_flags_s[(int)'t'] && H5FD_MPIO_TRACE_THIS_RANK(file));
- hbool_t H5FD_mpio_debug_r_flag = (H5FD_mpio_debug_flags_s[(int)'r'] && H5FD_MPIO_TRACE_THIS_RANK(file));
+ bool H5FD_mpio_debug_t_flag = (H5FD_mpio_debug_flags_s[(int)'t'] && H5FD_MPIO_TRACE_THIS_RANK(file));
+ bool H5FD_mpio_debug_r_flag = (H5FD_mpio_debug_flags_s[(int)'r'] && H5FD_MPIO_TRACE_THIS_RANK(file));
#endif
herr_t ret_value = SUCCEED;
@@ -2189,7 +2191,7 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou
fprintf(stdout, "%s: doing read-rank0-and-MPI_Bcast\n", __func__);
#endif
/* Indicate path we've taken */
- rank0_bcast = TRUE;
+ rank0_bcast = true;
/* Read on rank 0 Bcast to other ranks */
if (file->mpi_rank == 0)
@@ -2291,7 +2293,7 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou
}
else if (count > 0) {
haddr_t max_addr = HADDR_MAX;
- hbool_t fixed_size = FALSE;
+ bool fixed_size = false;
size_t size;
/* The read is part of an independent operation. As a result,
@@ -2322,7 +2324,7 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou
/* Calculate I/O size */
if (!fixed_size) {
if (sizes[i] == 0) {
- fixed_size = TRUE;
+ fixed_size = true;
size = sizes[i - 1];
}
else {
@@ -2342,7 +2344,7 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou
if (H5_mpio_create_large_type(size, 0, MPI_BYTE, &buf_type) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "can't create MPI-I/O datatype");
- buf_type_created = TRUE;
+ buf_type_created = true;
size_i = 1;
}
@@ -2430,7 +2432,7 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou
/*-------------------------------------------------------------------------
* Function: H5FD__mpio_write_vector
*
- * Purpose: The behaviour of this function dependes on the value of
+ * Purpose: The behavior of this function depends on the value of
* the io_xfer_mode obtained from the context.
*
* If it is H5FD_MPIO_COLLECTIVE, this is a collective
@@ -2466,16 +2468,16 @@ H5FD__mpio_write_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t co
haddr_t addrs[], size_t sizes[], const void *bufs[])
{
H5FD_mpio_t *file = (H5FD_mpio_t *)_file;
- hbool_t vector_was_sorted = TRUE;
+ bool vector_was_sorted = true;
haddr_t *s_addrs = NULL;
size_t *s_sizes = NULL;
const void **s_bufs = NULL;
char unused = 0; /* Unused, except for non-NULL pointer value */
const void *mpi_bufs_base = NULL;
MPI_Datatype buf_type = MPI_BYTE; /* MPI description of the selection in memory */
- hbool_t buf_type_created = FALSE;
+ bool buf_type_created = false;
MPI_Datatype file_type = MPI_BYTE; /* MPI description of the selection in file */
- hbool_t file_type_created = FALSE;
+ bool file_type_created = false;
int i;
int mpi_code; /* MPI return code */
MPI_Offset mpi_off = 0;
@@ -2484,8 +2486,8 @@ H5FD__mpio_write_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t co
H5FD_mpio_collective_opt_t coll_opt_mode; /* whether we are doing collective or independent I/O */
int size_i;
#ifdef H5FDmpio_DEBUG
- hbool_t H5FD_mpio_debug_t_flag = (H5FD_mpio_debug_flags_s[(int)'t'] && H5FD_MPIO_TRACE_THIS_RANK(file));
- hbool_t H5FD_mpio_debug_w_flag = (H5FD_mpio_debug_flags_s[(int)'w'] && H5FD_MPIO_TRACE_THIS_RANK(file));
+ bool H5FD_mpio_debug_t_flag = (H5FD_mpio_debug_flags_s[(int)'t'] && H5FD_MPIO_TRACE_THIS_RANK(file));
+ bool H5FD_mpio_debug_w_flag = (H5FD_mpio_debug_flags_s[(int)'w'] && H5FD_MPIO_TRACE_THIS_RANK(file));
#endif
haddr_t max_addr = 0;
herr_t ret_value = SUCCEED;
@@ -2535,7 +2537,7 @@ H5FD__mpio_write_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t co
&buf_type_created, &file_type, &file_type_created, &unused) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't build MPI datatypes for I/O");
- /* Compute max addr writted to */
+ /* Compute max address written to */
if (count > 0)
max_addr = s_addrs[count - 1] + (haddr_t)(s_sizes[count - 1]);
@@ -2616,8 +2618,8 @@ H5FD__mpio_write_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t co
HMPI_GOTO_ERROR(FAIL, "MPI_File_set_view failed", mpi_code)
}
else if (count > 0) {
- hbool_t fixed_size = FALSE;
- size_t size;
+ bool fixed_size = false;
+ size_t size;
/* The read is part of an independent operation. As a result,
* we can't use MPI_File_set_view() (since it it a collective operation),
@@ -2647,7 +2649,7 @@ H5FD__mpio_write_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t co
/* Calculate I/O size */
if (!fixed_size) {
if (sizes[i] == 0) {
- fixed_size = TRUE;
+ fixed_size = true;
size = sizes[i - 1];
}
else {
@@ -2667,7 +2669,7 @@ H5FD__mpio_write_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t co
if (H5_mpio_create_large_type(size, 0, MPI_BYTE, &buf_type) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "can't create MPI-I/O datatype");
- buf_type_created = TRUE;
+ buf_type_created = true;
size_i = 1;
}
@@ -2692,7 +2694,7 @@ H5FD__mpio_write_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t co
*/
file->eof = HADDR_UNDEF;
- /* check to see if the local eof has changed been extended, and update if so */
+ /* check to see if the local eof has been extended, and update if so */
if (max_addr > file->local_eof)
file->local_eof = max_addr;
@@ -2746,22 +2748,21 @@ H5FD__mpio_write_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t co
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD__selection_build_types(hbool_t io_op_write, size_t num_pieces, H5_flexible_const_ptr_t mbb,
+H5FD__selection_build_types(bool io_op_write, size_t num_pieces, H5_flexible_const_ptr_t mbb,
H5S_t **file_spaces, H5S_t **mem_spaces, haddr_t offsets[],
H5_flexible_const_ptr_t bufs[], size_t src_element_sizes[],
size_t dst_element_sizes[], MPI_Datatype *final_ftype,
- hbool_t *final_ftype_is_derived, MPI_Datatype *final_mtype,
- hbool_t *final_mtype_is_derived)
+ bool *final_ftype_is_derived, MPI_Datatype *final_mtype,
+ bool *final_mtype_is_derived)
{
MPI_Datatype *piece_mtype = NULL;
MPI_Datatype *piece_ftype = NULL;
MPI_Aint *piece_file_disp_array = NULL;
MPI_Aint *piece_mem_disp_array = NULL;
- hbool_t *piece_mft_is_derived_array =
- NULL; /* Flags to indicate each piece's MPI file datatype is derived */
+ bool *piece_mft_is_derived_array = NULL; /* Flags to indicate each piece's MPI file datatype is derived */
;
- hbool_t *piece_mmt_is_derived_array =
+ bool *piece_mmt_is_derived_array =
NULL; /* Flags to indicate each piece's MPI memory datatype is derived */
int *piece_mpi_file_counts = NULL; /* Count of MPI file datatype for each piece */
int *piece_mpi_mem_counts = NULL; /* Count of MPI memory datatype for each piece */
@@ -2770,9 +2771,9 @@ H5FD__selection_build_types(hbool_t io_op_write, size_t num_pieces, H5_flexible_
size_t i; /* Local index variable */
int mpi_code; /* MPI return code */
- hbool_t extend_src_sizes = FALSE;
- hbool_t extend_dst_sizes = FALSE;
- hbool_t extend_bufs = FALSE;
+ bool extend_src_sizes = false;
+ bool extend_dst_sizes = false;
+ bool extend_bufs = false;
H5_flexible_const_ptr_t buf;
size_t src_element_size, dst_element_size;
@@ -2793,10 +2794,10 @@ H5FD__selection_build_types(hbool_t io_op_write, size_t num_pieces, H5_flexible_
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate piece memory counts buffer");
if (NULL == (piece_mpi_file_counts = (int *)H5MM_calloc(num_pieces * sizeof(int))))
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate piece file counts buffer");
- if (NULL == (piece_mmt_is_derived_array = (hbool_t *)H5MM_calloc(num_pieces * sizeof(hbool_t))))
+ if (NULL == (piece_mmt_is_derived_array = (bool *)H5MM_calloc(num_pieces * sizeof(bool))))
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL,
"couldn't allocate piece memory is derived datatype flags buffer");
- if (NULL == (piece_mft_is_derived_array = (hbool_t *)H5MM_calloc(num_pieces * sizeof(hbool_t))))
+ if (NULL == (piece_mft_is_derived_array = (bool *)H5MM_calloc(num_pieces * sizeof(bool))))
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL,
"couldn't allocate piece file is derived datatype flags buffer");
@@ -2810,11 +2811,11 @@ H5FD__selection_build_types(hbool_t io_op_write, size_t num_pieces, H5_flexible_
out-of-order displacements to the in-order
displacements of the MPI datatypes of the
point selection of the file space */
- hbool_t is_permuted = FALSE;
+ bool is_permuted = false;
if (!extend_src_sizes) {
if (src_element_sizes[i] == 0) {
- extend_src_sizes = TRUE;
+ extend_src_sizes = true;
src_element_size = src_element_sizes[i - 1];
}
else
@@ -2823,7 +2824,7 @@ H5FD__selection_build_types(hbool_t io_op_write, size_t num_pieces, H5_flexible_
if (!extend_dst_sizes) {
if (dst_element_sizes[i] == 0) {
- extend_dst_sizes = TRUE;
+ extend_dst_sizes = true;
dst_element_size = dst_element_sizes[i - 1];
}
else
@@ -2832,7 +2833,7 @@ H5FD__selection_build_types(hbool_t io_op_write, size_t num_pieces, H5_flexible_
if (!extend_bufs) {
if (bufs[i].cvp == NULL) {
- extend_bufs = TRUE;
+ extend_bufs = true;
buf = bufs[i - 1];
}
else
@@ -2847,7 +2848,7 @@ H5FD__selection_build_types(hbool_t io_op_write, size_t num_pieces, H5_flexible_
if (H5S_mpio_space_type(file_spaces[i], src_element_size, &piece_ftype[i], /* OUT: datatype created */
&piece_mpi_file_counts[i], /* OUT */
&(piece_mft_is_derived_array[i]), /* OUT */
- TRUE, /* this is a file space,
+ true, /* this is a file space,
so permute the
datatype if the point
selections are out of
@@ -2864,7 +2865,7 @@ H5FD__selection_build_types(hbool_t io_op_write, size_t num_pieces, H5_flexible_
assert(permute_map);
if (H5S_mpio_space_type(mem_spaces[i], dst_element_size, &piece_mtype[i], &piece_mpi_mem_counts[i],
- &(piece_mmt_is_derived_array[i]), FALSE, /* this is a memory
+ &(piece_mmt_is_derived_array[i]), false, /* this is a memory
space, so if the file
space is not
permuted, there is no
@@ -2904,7 +2905,7 @@ H5FD__selection_build_types(hbool_t io_op_write, size_t num_pieces, H5_flexible_
if (MPI_SUCCESS != (mpi_code = MPI_Type_commit(final_ftype)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_commit failed", mpi_code);
- *final_ftype_is_derived = TRUE;
+ *final_ftype_is_derived = true;
/* Create final MPI derived datatype for memory */
if (MPI_SUCCESS != (mpi_code = MPI_Type_create_struct((int)num_pieces, piece_mpi_mem_counts,
@@ -2913,7 +2914,7 @@ H5FD__selection_build_types(hbool_t io_op_write, size_t num_pieces, H5_flexible_
if (MPI_SUCCESS != (mpi_code = MPI_Type_commit(final_mtype)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_commit failed", mpi_code);
- *final_mtype_is_derived = TRUE;
+ *final_mtype_is_derived = true;
/* Free the file & memory MPI datatypes for each piece */
for (i = 0; i < num_pieces; i++) {
@@ -2953,7 +2954,7 @@ H5FD__selection_build_types(hbool_t io_op_write, size_t num_pieces, H5_flexible_
/*-------------------------------------------------------------------------
* Function: H5FD__mpio_read_selection
*
- * Purpose: The behaviour of this function dependes on the value of
+ * Purpose: The behavior of this function depends on the value of
* the transfer mode obtained from the context.
*
* If the transfer mode is H5FD_MPIO_COLLECTIVE:
@@ -2988,17 +2989,17 @@ H5FD__mpio_read_selection(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED d
H5FD_mpio_collective_opt_t coll_opt_mode;
MPI_Datatype final_mtype; /* Final memory MPI datatype for all pieces with selection */
- hbool_t final_mtype_is_derived = FALSE;
+ bool final_mtype_is_derived = false;
MPI_Datatype final_ftype; /* Final file MPI datatype for all pieces with selection */
- hbool_t final_ftype_is_derived = FALSE;
+ bool final_ftype_is_derived = false;
hid_t *s_mem_space_ids = NULL;
hid_t *s_file_space_ids = NULL;
haddr_t *s_offsets = NULL;
size_t *s_element_sizes = NULL;
H5_flexible_const_ptr_t *s_bufs = NULL;
- hbool_t selection_was_sorted = TRUE;
+ bool selection_was_sorted = true;
uint32_t i, j;
H5S_t **s_mem_spaces = NULL;
@@ -3018,10 +3019,10 @@ H5FD__mpio_read_selection(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED d
int io_size; /* Actual number of bytes requested */
int n;
#endif
- hbool_t rank0_bcast = FALSE; /* If read-with-rank0-and-bcast flag was used */
+ bool rank0_bcast = false; /* If read-with-rank0-and-bcast flag was used */
#ifdef H5FDmpio_DEBUG
- hbool_t H5FD_mpio_debug_t_flag = (H5FD_mpio_debug_flags_s[(int)'t'] && H5FD_MPIO_TRACE_THIS_RANK(file));
- hbool_t H5FD_mpio_debug_r_flag = (H5FD_mpio_debug_flags_s[(int)'r'] && H5FD_MPIO_TRACE_THIS_RANK(file));
+ bool H5FD_mpio_debug_t_flag = (H5FD_mpio_debug_flags_s[(int)'t'] && H5FD_MPIO_TRACE_THIS_RANK(file));
+ bool H5FD_mpio_debug_r_flag = (H5FD_mpio_debug_flags_s[(int)'r'] && H5FD_MPIO_TRACE_THIS_RANK(file));
#endif
int mpi_code; /* MPI return code */
H5_flexible_const_ptr_t mbb;
@@ -3096,9 +3097,9 @@ H5FD__mpio_read_selection(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED d
* s_bufs[] to find the smallest value, and choose that for
* mpi_bufs_base.
*/
- j = 0; /* guess at the index of the smallest value of s_bufs[] */
- if (s_bufs[j + 1].vp != NULL) {
+ j = 0; /* guess at the index of the smallest value of s_bufs[] */
+ if ((count > 1) && (s_bufs[1].vp != NULL)) {
for (i = 1; i < count; i++)
if (s_bufs[i].vp < s_bufs[j].vp)
j = i;
@@ -3107,7 +3108,7 @@ H5FD__mpio_read_selection(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED d
mpi_bufs_base = s_bufs[j].vp;
mbb.vp = mpi_bufs_base;
- if (H5FD__selection_build_types(FALSE, count, mbb, s_file_spaces, s_mem_spaces, s_offsets, s_bufs,
+ if (H5FD__selection_build_types(false, count, mbb, s_file_spaces, s_mem_spaces, s_offsets, s_bufs,
s_element_sizes, s_element_sizes, &final_ftype,
&final_ftype_is_derived, &final_mtype,
&final_mtype_is_derived) < 0)
@@ -3166,7 +3167,7 @@ H5FD__mpio_read_selection(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED d
fprintf(stderr, "%s: (%d) doing read-rank0-and-MPI_Bcast\n", __func__, file->mpi_rank);
#endif
/* Indicate path we've taken */
- rank0_bcast = TRUE;
+ rank0_bcast = true;
/* Read on rank 0 Bcast to other ranks */
if (file->mpi_rank == 0) {
@@ -3324,7 +3325,7 @@ H5FD__mpio_read_selection(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED d
/*-------------------------------------------------------------------------
* Function: H5FD__mpio_write_selection
*
- * Purpose: The behaviour of this function dependes on the value of
+ * Purpose: The behavior of this function depends on the value of
* the transfer mode obtained from the context.
*
* If the transfer mode is H5FD_MPIO_COLLECTIVE:
@@ -3361,17 +3362,17 @@ H5FD__mpio_write_selection(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED
H5FD_mpio_collective_opt_t coll_opt_mode;
MPI_Datatype final_mtype; /* Final memory MPI datatype for all pieces with selection */
- hbool_t final_mtype_is_derived = FALSE;
+ bool final_mtype_is_derived = false;
MPI_Datatype final_ftype; /* Final file MPI datatype for all pieces with selection */
- hbool_t final_ftype_is_derived = FALSE;
+ bool final_ftype_is_derived = false;
hid_t *s_mem_space_ids = NULL;
hid_t *s_file_space_ids = NULL;
haddr_t *s_offsets = NULL;
size_t *s_element_sizes = NULL;
H5_flexible_const_ptr_t *s_bufs = NULL;
- hbool_t selection_was_sorted = TRUE;
+ bool selection_was_sorted = true;
const void *mpi_bufs_base = NULL;
uint32_t i, j;
@@ -3392,8 +3393,8 @@ H5FD__mpio_write_selection(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED
#endif
#ifdef H5FDmpio_DEBUG
- hbool_t H5FD_mpio_debug_t_flag = (H5FD_mpio_debug_flags_s[(int)'t'] && H5FD_MPIO_TRACE_THIS_RANK(file));
- hbool_t H5FD_mpio_debug_w_flag = (H5FD_mpio_debug_flags_s[(int)'w'] && H5FD_MPIO_TRACE_THIS_RANK(file));
+ bool H5FD_mpio_debug_t_flag = (H5FD_mpio_debug_flags_s[(int)'t'] && H5FD_MPIO_TRACE_THIS_RANK(file));
+ bool H5FD_mpio_debug_w_flag = (H5FD_mpio_debug_flags_s[(int)'w'] && H5FD_MPIO_TRACE_THIS_RANK(file));
#endif
int mpi_code; /* MPI return code */
herr_t ret_value = SUCCEED;
@@ -3464,9 +3465,9 @@ H5FD__mpio_write_selection(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED
* s_bufs[] to find the smallest value, and choose that for
* mpi_bufs_base.
*/
- j = 0; /* guess at the index of the smallest value of s_bufs[] */
- if (s_bufs[j + 1].cvp != NULL) {
+ j = 0; /* guess at the index of the smallest value of s_bufs[] */
+ if ((count > 1) && (s_bufs[1].cvp != NULL)) {
for (i = 1; i < count; i++)
if (s_bufs[i].cvp < s_bufs[j].cvp)
j = i;
@@ -3475,7 +3476,7 @@ H5FD__mpio_write_selection(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED
mpi_bufs_base = s_bufs[j].cvp;
mbb.cvp = mpi_bufs_base;
- if (H5FD__selection_build_types(TRUE, count, mbb, s_file_spaces, s_mem_spaces, s_offsets, s_bufs,
+ if (H5FD__selection_build_types(true, count, mbb, s_file_spaces, s_mem_spaces, s_offsets, s_bufs,
s_element_sizes, s_element_sizes, &final_ftype,
&final_ftype_is_derived, &final_mtype,
&final_mtype_is_derived) < 0)
@@ -3662,11 +3663,11 @@ H5FD__mpio_write_selection(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD__mpio_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
+H5FD__mpio_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, bool closing)
{
H5FD_mpio_t *file = (H5FD_mpio_t *)_file;
#ifdef H5FDmpio_DEBUG
- hbool_t H5FD_mpio_debug_t_flag = (H5FD_mpio_debug_flags_s[(int)'t'] && H5FD_MPIO_TRACE_THIS_RANK(file));
+ bool H5FD_mpio_debug_t_flag = (H5FD_mpio_debug_flags_s[(int)'t'] && H5FD_MPIO_TRACE_THIS_RANK(file));
#endif
int mpi_code; /* mpi return code */
herr_t ret_value = SUCCEED;
@@ -3717,11 +3718,11 @@ H5FD__mpio_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD__mpio_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_UNUSED closing)
+H5FD__mpio_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, bool H5_ATTR_UNUSED closing)
{
H5FD_mpio_t *file = (H5FD_mpio_t *)_file;
#ifdef H5FDmpio_DEBUG
- hbool_t H5FD_mpio_debug_t_flag = (H5FD_mpio_debug_flags_s[(int)'t'] && H5FD_MPIO_TRACE_THIS_RANK(file));
+ bool H5FD_mpio_debug_t_flag = (H5FD_mpio_debug_flags_s[(int)'t'] && H5FD_MPIO_TRACE_THIS_RANK(file));
#endif
herr_t ret_value = SUCCEED;
@@ -3939,7 +3940,7 @@ H5FD__mpio_ctl(H5FD_t *_file, uint64_t op_code, uint64_t flags, const void H5_AT
case H5FD_CTL_GET_MPI_FILE_SYNC_OPCODE:
assert(output);
assert(*output);
- **((hbool_t **)output) = file->mpi_file_sync_required;
+ **((bool **)output) = file->mpi_file_sync_required;
break;
default: /* unknown op code */
diff --git a/src/H5FDmpio.h b/src/H5FDmpio.h
index 36786016dfe..96a93668ea7 100644
--- a/src/H5FDmpio.h
+++ b/src/H5FDmpio.h
@@ -164,18 +164,24 @@ H5_DLL herr_t H5Pget_dxpl_mpio(hid_t dxpl_id, H5FD_mpio_xfer_t *xfer_mode /*out*
/**
* \ingroup DXPL
*
- * \brief Sets data transfer mode
+ * \brief Sets low-level data transfer mode
*
* \dxpl_id
* \param[in] opt_mode Transfer mode
* \returns \herr_t
*
- * \details H5Pset_dxpl_mpio() sets the data transfer property list \p dxpl_id
- * to use transfer mode xfer_mode. The property list can then be used
- * to control the I/O transfer mode during data I/O operations.
- *
- * Valid transfer modes are #H5FD_MPIO_INDEPENDENT (default) and
- * #H5FD_MPIO_COLLECTIVE.
+ * \details H5Pset_dxpl_mpio_collective_opt() sets the data transfer property
+ * list \p dxpl_id to use transfer mode \p opt_mode when performing
+ * I/O. This allows the application to specify collective I/O at the
+ * HDF5 interface level (with the H5Pset_dxpl_mpio() API routine),
+ * while controlling whether the actual I/O is performed collectively
+ * (e.g., via MPI_File_write_at_all) or independently (e.g., via
+ * MPI_File_write_at). If the collectivity setting at the HDF5
+ * interface level (set via H5Pset_dxpl_mpio()) is not set to
+ * H5FD_MPIO_COLLECTIVE, this setting will be ignored.
+ *
+ * Valid transfer modes are #H5FD_MPIO_COLLECTIVE_IO (default) and
+ * #H5FD_MPIO_INDIVIDUAL_IO.
*
* \since 1.4.0
*
diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c
index 9f8a77c9404..51e483f8a39 100644
--- a/src/H5FDmulti.c
+++ b/src/H5FDmulti.c
@@ -24,11 +24,11 @@
#include "hdf5.h"
-#ifndef FALSE
-#define FALSE 0
+#ifndef false
+#define false 0
#endif
-#ifndef TRUE
-#define TRUE 1
+#ifndef true
+#define true 1
#endif
/* Windows doesn't like some POSIX names and redefines them with an
@@ -107,7 +107,7 @@ typedef struct H5FD_multi_fapl_t {
hid_t memb_fapl[H5FD_MEM_NTYPES]; /*member access properties */
char *memb_name[H5FD_MEM_NTYPES]; /*name generators */
haddr_t memb_addr[H5FD_MEM_NTYPES]; /*starting addr per member */
- hbool_t relax; /*less stringent error checking */
+ bool relax; /*less stringent error checking */
} H5FD_multi_fapl_t;
/*
@@ -137,10 +137,10 @@ typedef struct H5FD_multi_dxpl_t {
/* Private functions */
static herr_t H5FD_split_populate_config(const char *meta_ext, hid_t meta_plist_id, const char *raw_ext,
- hid_t raw_plist_id, hbool_t relax, H5FD_multi_fapl_t *fa_out);
+ hid_t raw_plist_id, bool relax, H5FD_multi_fapl_t *fa_out);
static herr_t H5FD_multi_populate_config(const H5FD_mem_t *memb_map, const hid_t *memb_fapl,
- const char *const *memb_name, const haddr_t *memb_addr,
- hbool_t relax, H5FD_multi_fapl_t *fa_out);
+ const char *const *memb_name, const haddr_t *memb_addr, bool relax,
+ H5FD_multi_fapl_t *fa_out);
static int compute_next(H5FD_multi_t *file);
static int open_members(H5FD_multi_t *file);
@@ -167,9 +167,9 @@ static herr_t H5FD_multi_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, ha
void *_buf /*out*/);
static herr_t H5FD_multi_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
const void *_buf);
-static herr_t H5FD_multi_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
-static herr_t H5FD_multi_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
-static herr_t H5FD_multi_lock(H5FD_t *_file, hbool_t rw);
+static herr_t H5FD_multi_flush(H5FD_t *_file, hid_t dxpl_id, bool closing);
+static herr_t H5FD_multi_truncate(H5FD_t *_file, hid_t dxpl_id, bool closing);
+static herr_t H5FD_multi_lock(H5FD_t *_file, bool rw);
static herr_t H5FD_multi_unlock(H5FD_t *_file);
static herr_t H5FD_multi_delete(const char *filename, hid_t fapl_id);
static herr_t H5FD_multi_ctl(H5FD_t *_file, uint64_t op_code, uint64_t flags, const void *input,
@@ -285,7 +285,7 @@ H5Pset_fapl_split(hid_t fapl, const char *meta_ext, hid_t meta_plist_id, const c
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
- if (H5FD_split_populate_config(meta_ext, meta_plist_id, raw_ext, raw_plist_id, TRUE, &fa) < 0)
+ if (H5FD_split_populate_config(meta_ext, meta_plist_id, raw_ext, raw_plist_id, true, &fa) < 0)
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_CANTSET, "can't setup split driver configuration",
-1);
@@ -356,7 +356,7 @@ H5Pset_fapl_split(hid_t fapl, const char *meta_ext, hid_t meta_plist_id, const c
*
* hid_t fapl = H5Pcreate(H5P_FILE_ACCESS);
* H5Pset_fapl_multi(fapl, memb_map, memb_fapl,
- * memb_name, memb_addr, TRUE);
+ * memb_name, memb_addr, true);
*
*
* Return: Success: Non-negative
@@ -378,7 +378,7 @@ H5Pset_fapl_multi(hid_t fapl_id, const H5FD_mem_t *memb_map, const hid_t *memb_f
H5Eclear2(H5E_DEFAULT);
/* Check arguments and supply default values */
- if (H5I_GENPROP_LST != H5Iget_type(fapl_id) || TRUE != H5Pisa_class(fapl_id, H5P_FILE_ACCESS))
+ if (H5I_GENPROP_LST != H5Iget_type(fapl_id) || true != H5Pisa_class(fapl_id, H5P_FILE_ACCESS))
H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADVALUE, "not an access list", -1);
if (H5FD_multi_populate_config(memb_map, memb_fapl, memb_name, memb_addr, relax, &fa) < 0)
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_CANTSET, "can't setup driver configuration", -1);
@@ -413,7 +413,7 @@ H5Pget_fapl_multi(hid_t fapl_id, H5FD_mem_t *memb_map /*out*/, hid_t *memb_fapl
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
- if (H5I_GENPROP_LST != H5Iget_type(fapl_id) || TRUE != H5Pisa_class(fapl_id, H5P_FILE_ACCESS))
+ if (H5I_GENPROP_LST != H5Iget_type(fapl_id) || true != H5Pisa_class(fapl_id, H5P_FILE_ACCESS))
H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADTYPE, "not an access list", -1);
if (H5FD_MULTI != H5Pget_driver(fapl_id))
H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADVALUE, "incorrect VFL driver", -1);
@@ -423,7 +423,7 @@ H5Pget_fapl_multi(hid_t fapl_id, H5FD_mem_t *memb_map /*out*/, hid_t *memb_fapl
}
H5E_END_TRY
if (!fa || (H5P_FILE_ACCESS_DEFAULT == fapl_id)) {
- if (H5FD_multi_populate_config(NULL, NULL, NULL, NULL, TRUE, &default_fa) < 0)
+ if (H5FD_multi_populate_config(NULL, NULL, NULL, NULL, true, &default_fa) < 0)
H5Epush_ret(func, H5E_ERR_CLS, H5E_VFL, H5E_CANTSET, "can't setup default driver configuration",
-1);
fa = &default_fa;
@@ -468,7 +468,7 @@ H5Pget_fapl_multi(hid_t fapl_id, H5FD_mem_t *memb_map /*out*/, hid_t *memb_fapl
*/
static herr_t
H5FD_split_populate_config(const char *meta_ext, hid_t meta_plist_id, const char *raw_ext, hid_t raw_plist_id,
- hbool_t relax, H5FD_multi_fapl_t *fa_out)
+ bool relax, H5FD_multi_fapl_t *fa_out)
{
static const char *func = "H5FD_split_populate_config"; /* Function Name for error reporting */
static char
@@ -548,7 +548,7 @@ H5FD_split_populate_config(const char *meta_ext, hid_t meta_plist_id, const char
* All members of MEMB_FAPL must be either defaults or actual file
* access property lists.
*/
- if (H5P_DEFAULT != _memb_fapl[mmt] && TRUE != H5Pisa_class(_memb_fapl[mmt], H5P_FILE_ACCESS))
+ if (H5P_DEFAULT != _memb_fapl[mmt] && true != H5Pisa_class(_memb_fapl[mmt], H5P_FILE_ACCESS))
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "file resource type incorrect", -1);
/* All names must be defined */
@@ -594,7 +594,7 @@ H5FD_split_populate_config(const char *meta_ext, hid_t meta_plist_id, const char
*/
static herr_t
H5FD_multi_populate_config(const H5FD_mem_t *memb_map, const hid_t *memb_fapl, const char *const *memb_name,
- const haddr_t *memb_addr, hbool_t relax, H5FD_multi_fapl_t *fa_out)
+ const haddr_t *memb_addr, bool relax, H5FD_multi_fapl_t *fa_out)
{
static const char *func = "H5FD_multi_populate_config"; /* Function Name for error reporting */
static const char *letters = "Xsbrglo";
@@ -648,7 +648,7 @@ H5FD_multi_populate_config(const H5FD_mem_t *memb_map, const hid_t *memb_fapl, c
* All members of MEMB_FAPL must be either defaults or actual file
* access property lists.
*/
- if (H5P_DEFAULT != memb_fapl[mmt] && TRUE != H5Pisa_class(memb_fapl[mmt], H5P_FILE_ACCESS))
+ if (H5P_DEFAULT != memb_fapl[mmt] && true != H5Pisa_class(memb_fapl[mmt], H5P_FILE_ACCESS))
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "file resource type incorrect", -1);
/* All names must be defined */
@@ -827,8 +827,8 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf)
H5FD_mem_t map[H5FD_MEM_NTYPES];
int i;
size_t nseen = 0;
- hbool_t map_changed = FALSE;
- hbool_t in_use[H5FD_MEM_NTYPES];
+ bool map_changed = false;
+ bool in_use[H5FD_MEM_NTYPES];
const char *memb_name[H5FD_MEM_NTYPES];
haddr_t memb_addr[H5FD_MEM_NTYPES];
haddr_t memb_eoa[H5FD_MEM_NTYPES];
@@ -858,7 +858,7 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf)
for (i = 0; i < 6; i++) {
map[i + 1] = (H5FD_mem_t)buf[i];
if (file->fa.memb_map[i + 1] != map[i + 1])
- map_changed = TRUE;
+ map_changed = true;
}
UNIQUE_MEMBERS (map, mt) {
@@ -905,7 +905,7 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf)
/* Close files which are unused now */
memset(in_use, 0, sizeof in_use);
UNIQUE_MEMBERS (map, mt) {
- in_use[mt] = TRUE;
+ in_use[mt] = true;
}
END_MEMBERS
ALL_MEMBERS (mt) {
@@ -1118,7 +1118,7 @@ H5FD_multi_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr
H5Epush_goto(func, H5E_ERR_CLS, H5E_FILE, H5E_CANTSET, "can't set property value", error);
}
else {
- if (H5Pset_fapl_multi(fapl_id, NULL, NULL, NULL, NULL, TRUE) < 0)
+ if (H5Pset_fapl_multi(fapl_id, NULL, NULL, NULL, NULL, true) < 0)
H5Epush_goto(func, H5E_ERR_CLS, H5E_FILE, H5E_CANTSET, "can't set property value", error);
}
@@ -1788,7 +1788,7 @@ H5FD_multi_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, si
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_multi_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
+H5FD_multi_flush(H5FD_t *_file, hid_t dxpl_id, bool closing)
{
H5FD_multi_t *file = (H5FD_multi_t *)_file;
H5FD_mem_t mt;
@@ -1858,7 +1858,7 @@ H5FD_multi_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_multi_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
+H5FD_multi_truncate(H5FD_t *_file, hid_t dxpl_id, bool closing)
{
H5FD_multi_t *file = (H5FD_multi_t *)_file;
H5FD_mem_t mt;
@@ -1899,7 +1899,7 @@ H5FD_multi_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_multi_lock(H5FD_t *_file, hbool_t rw)
+H5FD_multi_lock(H5FD_t *_file, bool rw)
{
H5FD_multi_t *file = (H5FD_multi_t *)_file;
int nerrors = 0;
@@ -2112,11 +2112,11 @@ H5FD_multi_delete(const char *filename, hid_t fapl_id)
char *env = getenv(HDF5_DRIVER);
if (env && !strcmp(env, "split")) {
- if (H5FD_split_populate_config(NULL, H5P_DEFAULT, NULL, H5P_DEFAULT, TRUE, &default_fa) < 0)
+ if (H5FD_split_populate_config(NULL, H5P_DEFAULT, NULL, H5P_DEFAULT, true, &default_fa) < 0)
H5Epush_ret(func, H5E_ERR_CLS, H5E_VFL, H5E_CANTSET, "can't setup driver configuration", -1);
}
else {
- if (H5FD_multi_populate_config(NULL, NULL, NULL, NULL, TRUE, &default_fa) < 0)
+ if (H5FD_multi_populate_config(NULL, NULL, NULL, NULL, true, &default_fa) < 0)
H5Epush_ret(func, H5E_ERR_CLS, H5E_VFL, H5E_CANTSET, "can't setup driver configuration", -1);
}
diff --git a/src/H5FDmulti.h b/src/H5FDmulti.h
index 23c37039c3e..a85f2dfed25 100644
--- a/src/H5FDmulti.h
+++ b/src/H5FDmulti.h
@@ -34,7 +34,7 @@ H5_DLL hid_t H5FD_multi_init(void);
* \param[in] memb_name Name generator for names of member files
* \param[in] memb_addr The offsets within the virtual address space, from 0
* (zero) to #HADDR_MAX, at which each type of data storage begins
- * \param[in] relax Allows read-only access to incomplete file sets when \c TRUE
+ * \param[in] relax Allows read-only access to incomplete file sets when \c true
* \returns \herr_t
*
* \details H5Pset_fapl_multi() sets the file access property list \p fapl_id to
@@ -69,7 +69,7 @@ H5_DLL hid_t H5FD_multi_init(void);
* address space, from 0 (zero) to #HADDR_MAX, at which each type of
* data storage begins.
*
- * If \p relax is set to 1 (TRUE), then opening an existing file for
+ * If \p relax is set to 1 (true), then opening an existing file for
* read-only access will not fail if some file members are
* missing. This allows a file to be accessed in a limited sense if
* just the meta data is available.
@@ -145,7 +145,7 @@ H5_DLL hid_t H5FD_multi_init(void);
*
* hid_t fapl = H5Pcreate(H5P_FILE_ACCESS);
* H5Pset_fapl_multi(fapl, memb_map, memb_fapl,
- * memb_name, memb_addr, TRUE);
+ * memb_name, memb_addr, true);
* \endcode
*
* \version 1.6.3 \p memb_name parameter type changed to \Code{const char* const*}.
@@ -165,7 +165,7 @@ H5_DLL herr_t H5Pset_fapl_multi(hid_t fapl_id, const H5FD_mem_t *memb_map, const
* \param[out] memb_name Name generator for names of member files
* \param[out] memb_addr The offsets within the virtual address space, from 0
* (zero) to #HADDR_MAX, at which each type of data storage begins
- * \param[out] relax Allows read-only access to incomplete file sets when \c TRUE
+ * \param[out] relax Allows read-only access to incomplete file sets when \c true
* \returns \herr_t
*
* \details H5Pget_fapl_multi() returns information about the multi-file access
diff --git a/src/H5FDonion.c b/src/H5FDonion.c
index 5728c7ddcd8..a16338b1dc4 100644
--- a/src/H5FDonion.c
+++ b/src/H5FDonion.c
@@ -125,8 +125,8 @@ static hid_t H5FD_ONION_g = 0;
typedef struct H5FD_onion_t {
H5FD_t pub;
H5FD_onion_fapl_info_t fa;
- hbool_t is_open_rw;
- hbool_t align_history_on_pages;
+ bool is_open_rw;
+ bool align_history_on_pages;
/* Onion-related files */
H5FD_t *original_file;
@@ -235,7 +235,7 @@ H5FD_onion_init(void)
FUNC_ENTER_NOAPI_NOERR
if (H5I_VFL != H5I_get_type(H5FD_ONION_g))
- H5FD_ONION_g = H5FD_register(&H5FD_onion_g, sizeof(H5FD_class_t), FALSE);
+ H5FD_ONION_g = H5FD_register(&H5FD_onion_g, sizeof(H5FD_class_t), false);
/* Set return value */
ret_value = H5FD_ONION_g;
@@ -295,7 +295,7 @@ H5Pget_fapl_onion(hid_t fapl_id, H5FD_onion_fapl_info_t *fa_out)
if (NULL == (info_ptr = (const H5FD_onion_fapl_info_t *)H5P_peek_driver_info(plist)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad VFL driver info");
- memcpy(fa_out, info_ptr, sizeof(H5FD_onion_fapl_info_t));
+ H5MM_memcpy(fa_out, info_ptr, sizeof(H5FD_onion_fapl_info_t));
done:
FUNC_LEAVE_API(ret_value)
@@ -464,11 +464,11 @@ H5FD__onion_commit_new_revision_record(H5FD_onion_t *file)
HDtime(&rawtime);
info = HDgmtime(&rawtime);
- HDstrftime(rec->time_of_creation, sizeof(rec->time_of_creation), "%Y%m%dT%H%M%SZ", info);
+ strftime(rec->time_of_creation, sizeof(rec->time_of_creation), "%Y%m%dT%H%M%SZ", info);
rec->logical_eof = file->logical_eof;
- if ((TRUE == file->is_open_rw) && (H5FD__onion_merge_revision_index_into_archival_index(
+ if ((true == file->is_open_rw) && (H5FD__onion_merge_revision_index_into_archival_index(
file->rev_index, &file->curr_rev_record.archival_index) < 0))
HGOTO_ERROR(H5E_VFL, H5E_INTERNAL, FAIL, "unable to update index to write");
@@ -486,7 +486,7 @@ H5FD__onion_commit_new_revision_record(H5FD_onion_t *file)
HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "can't write new revision record");
file->onion_eof = phys_addr + size;
- if (TRUE == file->align_history_on_pages)
+ if (true == file->align_history_on_pages)
file->onion_eof = (file->onion_eof + (file->header.page_size - 1)) & (~(file->header.page_size - 1));
/* Update history info to accommodate new revision */
@@ -514,7 +514,7 @@ H5FD__onion_commit_new_revision_record(H5FD_onion_t *file)
if (NULL == (new_list = H5MM_calloc((history->n_revisions + 1) * sizeof(H5FD_onion_record_loc_t))))
HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to resize record pointer list");
- memcpy(new_list, history->record_locs, sizeof(H5FD_onion_record_loc_t) * history->n_revisions);
+ H5MM_memcpy(new_list, history->record_locs, sizeof(H5FD_onion_record_loc_t) * history->n_revisions);
H5MM_xfree(history->record_locs);
history->record_locs = new_list;
new_list = NULL;
@@ -656,7 +656,7 @@ H5FD__onion_get_legit_fapl_id(hid_t fapl_id)
{
if (H5P_DEFAULT == fapl_id)
return H5P_FILE_ACCESS_DEFAULT;
- else if (TRUE == H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
+ else if (true == H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
return fapl_id;
else
return H5I_INVALID_HID;
@@ -758,7 +758,7 @@ H5FD__onion_create_truncate_onion(H5FD_onion_t *file, const char *filename, cons
if (H5FD_write(file->onion_file, H5FD_MEM_DRAW, 0, size, buf) < 0)
HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "cannot write header to the backing onion file");
file->onion_eof = (haddr_t)size;
- if (TRUE == file->align_history_on_pages)
+ if (true == file->align_history_on_pages)
file->onion_eof = (file->onion_eof + (hdr->page_size - 1)) & (~(hdr->page_size - 1));
rec->archival_index.list = NULL;
@@ -799,7 +799,7 @@ H5FD__onion_parse_config_str(const char *config_str, H5FD_onion_fapl_info_t *fa)
FUNC_ENTER_PACKAGE
- if (!HDstrcmp(config_str, ""))
+ if (!strcmp(config_str, ""))
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "configure string can't be empty");
/* Initialize to the default values */
@@ -810,7 +810,7 @@ H5FD__onion_parse_config_str(const char *config_str, H5FD_onion_fapl_info_t *fa)
fa->revision_num = H5FD_ONION_FAPL_INFO_REVISION_ID_LATEST;
fa->force_write_open = 0;
fa->creation_flags = 0;
- HDstrcpy(fa->comment, "initial comment");
+ strcpy(fa->comment, "initial comment");
/* If a single integer is passed in as a string, it's a shortcut for the tools
* (h5repack, h5diff, h5dump). Otherwise, the string should have curly brackets,
@@ -829,51 +829,51 @@ H5FD__onion_parse_config_str(const char *config_str, H5FD_onion_fapl_info_t *fa)
H5FD__onion_remove_unused_symbols(config_str_copy);
/* The configure string can't be empty after removing the curly brackets */
- if (!HDstrcmp(config_str_copy, ""))
+ if (!strcmp(config_str_copy, ""))
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "configure string can't be empty");
- token1 = HDstrtok(config_str_copy, ":");
- token2 = HDstrtok(NULL, ";");
+ token1 = strtok(config_str_copy, ":");
+ token2 = strtok(NULL, ";");
do {
if (token1 && token2) {
- if (!HDstrcmp(token1, "version")) {
- if (!HDstrcmp(token2, "H5FD_ONION_FAPL_INFO_VERSION_CURR"))
+ if (!strcmp(token1, "version")) {
+ if (!strcmp(token2, "H5FD_ONION_FAPL_INFO_VERSION_CURR"))
fa->version = H5FD_ONION_FAPL_INFO_VERSION_CURR;
}
- else if (!HDstrcmp(token1, "backing_fapl_id")) {
- if (!HDstrcmp(token2, "H5P_DEFAULT"))
+ else if (!strcmp(token1, "backing_fapl_id")) {
+ if (!strcmp(token2, "H5P_DEFAULT"))
fa->backing_fapl_id = H5P_DEFAULT;
else if (!strcmp(token2, "H5I_INVALID_HID"))
fa->backing_fapl_id = H5I_INVALID_HID;
else
fa->backing_fapl_id = strtoll(token2, NULL, 10);
}
- else if (!HDstrcmp(token1, "page_size")) {
+ else if (!strcmp(token1, "page_size")) {
fa->page_size = (uint32_t)strtoul(token2, NULL, 10);
}
- else if (!HDstrcmp(token1, "revision_num")) {
- if (!HDstrcmp(token2, "H5FD_ONION_FAPL_INFO_REVISION_ID_LATEST"))
+ else if (!strcmp(token1, "revision_num")) {
+ if (!strcmp(token2, "H5FD_ONION_FAPL_INFO_REVISION_ID_LATEST"))
fa->revision_num = H5FD_ONION_FAPL_INFO_REVISION_ID_LATEST;
else
fa->revision_num = (uint64_t)strtoull(token2, NULL, 10);
}
- else if (!HDstrcmp(token1, "force_write_open")) {
+ else if (!strcmp(token1, "force_write_open")) {
fa->force_write_open = (uint8_t)strtoul(token2, NULL, 10);
}
- else if (!HDstrcmp(token1, "creation_flags")) {
+ else if (!strcmp(token1, "creation_flags")) {
fa->creation_flags = (uint8_t)strtoul(token2, NULL, 10);
}
- else if (!HDstrcmp(token1, "comment")) {
- HDstrcpy(fa->comment, token2);
+ else if (!strcmp(token1, "comment")) {
+ strcpy(fa->comment, token2);
}
else
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "unknown token in the configure string: %s",
token1);
}
- token1 = HDstrtok(NULL, ":");
- token2 = HDstrtok(NULL, ";");
+ token1 = strtok(NULL, ":");
+ token2 = strtok(NULL, ";");
} while (token1);
}
@@ -884,7 +884,7 @@ H5FD__onion_parse_config_str(const char *config_str, H5FD_onion_fapl_info_t *fa)
HGOTO_ERROR(H5E_VFL, H5E_BADTYPE, FAIL, "not a property list class");
/* Create the new property list */
- if ((fa->backing_fapl_id = H5P_create_id(pclass, TRUE)) < 0)
+ if ((fa->backing_fapl_id = H5P_create_id(pclass, true)) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTCREATE, FAIL, "unable to create property list");
}
@@ -960,18 +960,18 @@ H5FD__onion_open(const char *filename, unsigned flags, hid_t fapl_id, haddr_t ma
HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "unable to allocate file struct");
/* Allocate space for onion VFD file names */
- if (NULL == (name_onion = H5MM_malloc(sizeof(char) * (HDstrlen(filename) + 7))))
+ if (NULL == (name_onion = H5MM_malloc(sizeof(char) * (strlen(filename) + 7))))
HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "unable to allocate onion name string");
- HDsnprintf(name_onion, HDstrlen(filename) + 7, "%s.onion", filename);
+ snprintf(name_onion, strlen(filename) + 7, "%s.onion", filename);
- if (NULL == (recovery_file_nameery = H5MM_malloc(sizeof(char) * (HDstrlen(name_onion) + 10))))
+ if (NULL == (recovery_file_nameery = H5MM_malloc(sizeof(char) * (strlen(name_onion) + 10))))
HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "unable to allocate recovery name string");
- HDsnprintf(recovery_file_nameery, HDstrlen(name_onion) + 10, "%s.recovery", name_onion);
+ snprintf(recovery_file_nameery, strlen(name_onion) + 10, "%s.recovery", name_onion);
file->recovery_file_name = recovery_file_nameery;
- if (NULL == (file->recovery_file_name = H5MM_malloc(sizeof(char) * (HDstrlen(name_onion) + 10))))
+ if (NULL == (file->recovery_file_name = H5MM_malloc(sizeof(char) * (strlen(name_onion) + 10))))
HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "unable to allocate recovery name string");
- HDsnprintf(file->recovery_file_name, HDstrlen(name_onion) + 10, "%s.recovery", name_onion);
+ snprintf(file->recovery_file_name, strlen(name_onion) + 10, "%s.recovery", name_onion);
/* Translate H5P_DEFAULT to a real fapl ID, if necessary */
backing_fapl_id = H5FD__onion_get_legit_fapl_id(file->fa.backing_fapl_id);
@@ -980,7 +980,7 @@ H5FD__onion_open(const char *filename, unsigned flags, hid_t fapl_id, haddr_t ma
/* Initialize file structure fields */
- memcpy(&(file->fa), fa, sizeof(H5FD_onion_fapl_info_t));
+ H5MM_memcpy(&(file->fa), fa, sizeof(H5FD_onion_fapl_info_t));
file->header.version = H5FD_ONION_HEADER_VERSION_CURR;
file->header.page_size = file->fa.page_size; /* guarded on FAPL-set */
@@ -995,7 +995,7 @@ H5FD__onion_open(const char *filename, unsigned flags, hid_t fapl_id, haddr_t ma
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "page size is not a power of two");
/* Assign the page size */
- log2_page_size = HDlog2((double)(fa->page_size));
+ log2_page_size = log2((double)(fa->page_size));
file->curr_rev_record.archival_index.page_size_log2 = (uint32_t)log2_page_size;
/* Proceed with open. */
@@ -1007,14 +1007,14 @@ H5FD__onion_open(const char *filename, unsigned flags, hid_t fapl_id, haddr_t ma
/* Set flags */
if (fa->creation_flags & H5FD_ONION_FAPL_INFO_CREATE_FLAG_ENABLE_PAGE_ALIGNMENT) {
file->header.flags |= H5FD_ONION_HEADER_FLAG_PAGE_ALIGNMENT;
- file->align_history_on_pages = TRUE;
+ file->align_history_on_pages = true;
}
/* Truncate and create everything as necessary */
if (H5FD__onion_create_truncate_onion(file, filename, name_onion, file->recovery_file_name, flags,
maxaddr) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTCREATE, NULL, "unable to create/truncate onionized files");
- file->is_open_rw = TRUE;
+ file->is_open_rw = true;
}
else {
@@ -1053,7 +1053,7 @@ H5FD__onion_open(const char *filename, unsigned flags, hid_t fapl_id, haddr_t ma
if (H5FD_ONION_FAPL_INFO_CREATE_FLAG_ENABLE_PAGE_ALIGNMENT & file->fa.creation_flags) {
hdr->flags |= H5FD_ONION_HEADER_FLAG_PAGE_ALIGNMENT;
- file->align_history_on_pages = TRUE;
+ file->align_history_on_pages = true;
}
if (HADDR_UNDEF == (canon_eof = H5FD_get_eof(file->original_file, H5FD_MEM_DEFAULT))) {
@@ -1106,7 +1106,7 @@ H5FD__onion_open(const char *filename, unsigned flags, hid_t fapl_id, haddr_t ma
}
file->onion_eof = (haddr_t)saved_size;
- if (TRUE == file->align_history_on_pages)
+ if (true == file->align_history_on_pages)
file->onion_eof = (file->onion_eof + (hdr->page_size - 1)) & (~(hdr->page_size - 1));
rec->archival_index.list = NULL;
@@ -1139,7 +1139,7 @@ H5FD__onion_open(const char *filename, unsigned flags, hid_t fapl_id, haddr_t ma
if (H5FD__onion_ingest_header(&file->header, file->onion_file, 0) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTDECODE, NULL, "can't get history header from backing store");
file->align_history_on_pages =
- (file->header.flags & H5FD_ONION_HEADER_FLAG_PAGE_ALIGNMENT) ? TRUE : FALSE;
+ (file->header.flags & H5FD_ONION_HEADER_FLAG_PAGE_ALIGNMENT) ? true : false;
if (H5FD_ONION_HEADER_FLAG_WRITE_LOCK & file->header.flags) {
/* Opening a file twice in write mode is an error */
@@ -1191,14 +1191,14 @@ H5FD__onion_open(const char *filename, unsigned flags, hid_t fapl_id, haddr_t ma
HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "unable to duplicate comment string");
/* TODO: Lengths of strings should be size_t */
- file->curr_rev_record.comment_size = (uint32_t)HDstrlen(fa->comment) + 1;
+ file->curr_rev_record.comment_size = (uint32_t)strlen(fa->comment) + 1;
}
file->origin_eof = file->header.origin_eof;
file->logical_eof = MAX(file->curr_rev_record.logical_eof, file->logical_eof);
file->logical_eoa = 0;
file->onion_eof = H5FD_get_eoa(file->onion_file, H5FD_MEM_DRAW);
- if (TRUE == file->align_history_on_pages)
+ if (true == file->align_history_on_pages)
file->onion_eof = (file->onion_eof + (file->header.page_size - 1)) & (~(file->header.page_size - 1));
ret_value = (H5FD_t *)file;
@@ -1303,7 +1303,7 @@ H5FD__onion_open_rw(H5FD_onion_t *file, unsigned int flags, haddr_t maxaddr, boo
file->curr_rev_record.parent_revision_num = file->curr_rev_record.revision_num;
if (!new_open)
file->curr_rev_record.revision_num += 1;
- file->is_open_rw = TRUE;
+ file->is_open_rw = true;
done:
if (FAIL == ret_value) {
@@ -1384,7 +1384,7 @@ H5FD__onion_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h
page_readsize = (size_t)page_size - page_gap_head - page_gap_tail;
- if (TRUE == file->is_open_rw && file->fa.revision_num != 0 &&
+ if (true == file->is_open_rw && file->fa.revision_num != 0 &&
H5FD__onion_revision_index_find(file->rev_index, page_i, &entry_out)) {
/* Page exists in 'live' revision index */
if (H5FD_read(file->onion_file, H5FD_MEM_DRAW, entry_out->phys_addr + page_gap_head,
@@ -1477,7 +1477,7 @@ H5FD__onion_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
assert(file->rev_index != NULL);
assert((uint64_t)(offset + len) <= file->logical_eoa);
- if (FALSE == file->is_open_rw)
+ if (false == file->is_open_rw)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Write not allowed if file not opened in write mode");
if (0 == len)
@@ -1523,7 +1523,7 @@ H5FD__onion_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
if (H5FD_read(file->onion_file, H5FD_MEM_DRAW, entry_out->phys_addr, page_size, page_buf) < 0)
HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "can't get working file data");
/* Overlay delta from input buffer onto page buffer. */
- memcpy(page_buf + page_gap_head, buf, page_n_used);
+ H5MM_memcpy(page_buf + page_gap_head, buf, page_n_used);
write_buf = page_buf;
} /* end if partial page */
@@ -1571,7 +1571,7 @@ H5FD__onion_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
/* Copy input buffer to temporary page buffer */
assert((page_size - page_gap_head) >= page_n_used);
- memcpy(page_buf + page_gap_head, buf, page_n_used);
+ H5MM_memcpy(page_buf + page_gap_head, buf, page_n_used);
write_buf = page_buf;
} /* end if data range does not span entire page */
@@ -1670,7 +1670,7 @@ H5FDonion_get_revision_count(const char *filename, hid_t fapl_id, uint64_t *revi
H5TRACE3("e", "*six", filename, fapl_id, revision_count);
/* Check args */
- if (!filename || !HDstrcmp(filename, ""))
+ if (!filename || !strcmp(filename, ""))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid file name");
if (!revision_count)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "revision count can't be null");
diff --git a/src/H5FDonion_header.c b/src/H5FDonion_header.c
index a346ecfa862..e6790b3290e 100644
--- a/src/H5FDonion_header.c
+++ b/src/H5FDonion_header.c
@@ -134,7 +134,7 @@ H5FD__onion_header_decode(unsigned char *buf, H5FD_onion_header_t *header)
assert(header != NULL);
assert(H5FD_ONION_HEADER_VERSION_CURR == header->version);
- if (HDstrncmp((const char *)buf, H5FD_ONION_HEADER_SIGNATURE, 4))
+ if (strncmp((const char *)buf, H5FD_ONION_HEADER_SIGNATURE, 4))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid header signature");
if (buf[4] != H5FD_ONION_HEADER_VERSION_CURR)
@@ -142,34 +142,34 @@ H5FD__onion_header_decode(unsigned char *buf, H5FD_onion_header_t *header)
ptr = buf + 5;
ui32 = 0;
- memcpy(&ui32, ptr, 3);
+ H5MM_memcpy(&ui32, ptr, 3);
ui8p = (uint8_t *)&ui32;
UINT32DECODE(ui8p, header->flags);
ptr += 3;
- memcpy(&ui32, ptr, 4);
+ H5MM_memcpy(&ui32, ptr, 4);
ui8p = (uint8_t *)&ui32;
UINT32DECODE(ui8p, header->page_size);
ptr += 4;
- memcpy(&ui64, ptr, 8);
+ H5MM_memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT32DECODE(ui8p, header->origin_eof);
ptr += 8;
- memcpy(&ui64, ptr, 8);
+ H5MM_memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT32DECODE(ui8p, header->history_addr);
ptr += 8;
- memcpy(&ui64, ptr, 8);
+ H5MM_memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT32DECODE(ui8p, header->history_size);
ptr += 8;
sum = H5_checksum_fletcher32(buf, (size_t)(ptr - buf));
- memcpy(&ui32, ptr, 4);
+ H5MM_memcpy(&ui32, ptr, 4);
ui8p = (uint8_t *)&ui32;
UINT32DECODE(ui8p, header->checksum);
ptr += 4;
@@ -214,9 +214,9 @@ H5FD__onion_header_encode(H5FD_onion_header_t *header, unsigned char *buf, uint3
assert(H5FD_ONION_HEADER_VERSION_CURR == header->version);
assert(0 == (header->flags & 0xFF000000)); /* max three bits long */
- memcpy(ptr, H5FD_ONION_HEADER_SIGNATURE, 4);
+ H5MM_memcpy(ptr, H5FD_ONION_HEADER_SIGNATURE, 4);
ptr += 4;
- memcpy(ptr, (unsigned char *)&header->version, 1);
+ H5MM_memcpy(ptr, (unsigned char *)&header->version, 1);
ptr += 1;
UINT32ENCODE(ptr, header->flags);
ptr -= 1; /* truncate to three bytes */
diff --git a/src/H5FDonion_history.c b/src/H5FDonion_history.c
index e559e80e1b6..32bf483ccda 100644
--- a/src/H5FDonion_history.c
+++ b/src/H5FDonion_history.c
@@ -172,7 +172,7 @@ H5FD__onion_history_decode(unsigned char *buf, H5FD_onion_history_t *history)
assert(history != NULL);
assert(H5FD_ONION_HISTORY_VERSION_CURR == history->version);
- if (HDstrncmp((const char *)buf, H5FD_ONION_HISTORY_SIGNATURE, 4))
+ if (strncmp((const char *)buf, H5FD_ONION_HISTORY_SIGNATURE, 4))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid signature");
if (H5FD_ONION_HISTORY_VERSION_CURR != buf[4])
@@ -180,7 +180,7 @@ H5FD__onion_history_decode(unsigned char *buf, H5FD_onion_history_t *history)
ptr = buf + 8;
- memcpy(&ui64, ptr, 8);
+ H5MM_memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT64DECODE(ui8p, n_revisions);
ptr += 8;
@@ -207,19 +207,19 @@ H5FD__onion_history_decode(unsigned char *buf, H5FD_onion_history_t *history)
uint64_t record_size;
uint64_t phys_addr;
- memcpy(&ui64, ptr, 8);
+ H5MM_memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT64DECODE(ui8p, phys_addr);
H5_CHECKED_ASSIGN(rloc->phys_addr, haddr_t, phys_addr, uint64_t);
ptr += 8;
- memcpy(&ui64, ptr, 8);
+ H5MM_memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT64DECODE(ui8p, record_size);
H5_CHECKED_ASSIGN(rloc->record_size, hsize_t, record_size, uint64_t);
ptr += 8;
- memcpy(&ui32, ptr, 4);
+ H5MM_memcpy(&ui32, ptr, 4);
ui8p = (uint8_t *)&ui32;
UINT32DECODE(ui8p, rloc->checksum);
ptr += 4;
@@ -228,7 +228,7 @@ H5FD__onion_history_decode(unsigned char *buf, H5FD_onion_history_t *history)
sum = H5_checksum_fletcher32(buf, (size_t)(ptr - buf));
- memcpy(&ui32, ptr, 4);
+ H5MM_memcpy(&ui32, ptr, 4);
ui8p = (uint8_t *)&ui32;
UINT32DECODE(ui8p, history->checksum);
ptr += 4;
@@ -275,7 +275,7 @@ H5FD__onion_history_encode(H5FD_onion_history_t *history, unsigned char *buf, ui
assert(buf != NULL);
assert(checksum != NULL);
- memcpy(ptr, H5FD_ONION_HISTORY_SIGNATURE, 4);
+ H5MM_memcpy(ptr, H5FD_ONION_HISTORY_SIGNATURE, 4);
ptr += 4;
UINT32ENCODE(ptr, vers_u32);
UINT64ENCODE(ptr, history->n_revisions);
diff --git a/src/H5FDonion_index.c b/src/H5FDonion_index.c
index a6215ab8d0a..4d1320ed809 100644
--- a/src/H5FDonion_index.c
+++ b/src/H5FDonion_index.c
@@ -176,28 +176,28 @@ H5FD__onion_ingest_revision_record(H5FD_onion_revision_record_t *r_out, H5FD_t *
* + Sorted by increasing logical address (no duplicates)
* + Logical addresses are multiples of page size.
*
- * Return: TRUE/FALSE
+ * Return: true/false
*-----------------------------------------------------------------------------
*/
-hbool_t
+bool
H5FD__onion_archival_index_is_valid(const H5FD_onion_archival_index_t *aix)
{
- hbool_t ret_value = TRUE;
+ bool ret_value = true;
FUNC_ENTER_PACKAGE_NOERR
assert(aix);
if (H5FD_ONION_ARCHIVAL_INDEX_VERSION_CURR != aix->version)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
if (NULL == aix->list)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* Ensure list is sorted on logical_page field */
if (aix->n_entries > 1)
for (uint64_t i = 1; i < aix->n_entries - 1; i++)
if (aix->list[i + 1].logical_page <= aix->list[i].logical_page)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -483,7 +483,7 @@ H5FD__onion_revision_index_insert(H5FD_onion_revision_index_t *rix, const H5FD_o
if (entry->phys_addr != node->entry_data.phys_addr) {
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "physical address mismatch");
}
- memcpy(&node->entry_data, entry, sizeof(H5FD_onion_index_entry_t));
+ H5MM_memcpy(&node->entry_data, entry, sizeof(H5FD_onion_index_entry_t));
append_dest = NULL; /* Node updated, do not append */
break;
}
@@ -496,7 +496,7 @@ H5FD__onion_revision_index_insert(H5FD_onion_revision_index_t *rix, const H5FD_o
HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "cannot allocate new ash chain node");
node->version = H5FD_ONION_REVISION_INDEX_HASH_CHAIN_NODE_VERSION_CURR;
node->next = NULL;
- memcpy(&node->entry_data, entry, sizeof(H5FD_onion_index_entry_t));
+ H5MM_memcpy(&node->entry_data, entry, sizeof(H5FD_onion_index_entry_t));
*append_dest = node;
rix->n_entries++;
}
@@ -604,7 +604,7 @@ H5FD__onion_revision_record_decode(unsigned char *buf, H5FD_onion_revision_recor
assert(H5FD_ONION_REVISION_RECORD_VERSION_CURR == record->version);
assert(H5FD_ONION_ARCHIVAL_INDEX_VERSION_CURR == record->archival_index.version);
- if (HDstrncmp((const char *)buf, H5FD_ONION_REVISION_RECORD_SIGNATURE, 4))
+ if (strncmp((const char *)buf, H5FD_ONION_REVISION_RECORD_SIGNATURE, 4))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid signature");
if (H5FD_ONION_REVISION_RECORD_VERSION_CURR != buf[4])
@@ -612,25 +612,25 @@ H5FD__onion_revision_record_decode(unsigned char *buf, H5FD_onion_revision_recor
ptr = buf + 8;
- memcpy(&ui64, ptr, 8);
+ H5MM_memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT64DECODE(ui8p, record->revision_num);
ptr += 8;
- memcpy(&ui64, ptr, 8);
+ H5MM_memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT64DECODE(ui8p, record->parent_revision_num);
ptr += 8;
- memcpy(record->time_of_creation, ptr, 16);
+ H5MM_memcpy(record->time_of_creation, ptr, 16);
ptr += 16;
- memcpy(&ui64, ptr, 8);
+ H5MM_memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT64DECODE(ui8p, record->logical_eof);
ptr += 8;
- memcpy(&ui32, ptr, 4);
+ H5MM_memcpy(&ui32, ptr, 4);
ui8p = (uint8_t *)&ui32;
UINT32DECODE(ui8p, page_size);
ptr += 4;
@@ -645,12 +645,12 @@ H5FD__onion_revision_record_decode(unsigned char *buf, H5FD_onion_revision_recor
record->archival_index.page_size_log2++)
;
- memcpy(&ui64, ptr, 8);
+ H5MM_memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT64DECODE(ui8p, n_entries);
ptr += 8;
- memcpy(&ui32, ptr, 4);
+ H5MM_memcpy(&ui32, ptr, 4);
ui8p = (uint8_t *)&ui32;
UINT32DECODE(ui8p, comment_size);
ptr += 4;
@@ -671,7 +671,7 @@ H5FD__onion_revision_record_decode(unsigned char *buf, H5FD_onion_revision_recor
for (size_t i = 0; i < n_entries; i++) {
entry = &record->archival_index.list[i];
- memcpy(&ui64, ptr, 8);
+ H5MM_memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT64DECODE(ui8p, entry->logical_page);
ptr += 8;
@@ -682,12 +682,12 @@ H5FD__onion_revision_record_decode(unsigned char *buf, H5FD_onion_revision_recor
entry->logical_page = entry->logical_page >> record->archival_index.page_size_log2;
- memcpy(&ui64, ptr, 8);
+ H5MM_memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT64DECODE(ui8p, entry->phys_addr);
ptr += 8;
- memcpy(&ui32, ptr, 4);
+ H5MM_memcpy(&ui32, ptr, 4);
ui8p = (uint8_t *)&ui32;
UINT32DECODE(ui8p, sum);
ptr += 4;
@@ -706,13 +706,13 @@ H5FD__onion_revision_record_decode(unsigned char *buf, H5FD_onion_revision_recor
else {
if (record->comment == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "no comment pointer");
- memcpy(record->comment, ptr, comment_size);
+ H5MM_memcpy(record->comment, ptr, comment_size);
}
ptr += comment_size;
sum = H5_checksum_fletcher32(buf, (size_t)(ptr - buf));
- memcpy(&ui32, ptr, 4);
+ H5MM_memcpy(&ui32, ptr, 4);
ui8p = (uint8_t *)&ui32;
UINT32DECODE(ui8p, record->checksum);
ptr += 4;
@@ -765,12 +765,12 @@ H5FD__onion_revision_record_encode(H5FD_onion_revision_record_t *record, unsigne
page_size = (uint32_t)(1 << record->archival_index.page_size_log2);
- memcpy(ptr, H5FD_ONION_REVISION_RECORD_SIGNATURE, 4);
+ H5MM_memcpy(ptr, H5FD_ONION_REVISION_RECORD_SIGNATURE, 4);
ptr += 4;
UINT32ENCODE(ptr, vers_u32);
UINT64ENCODE(ptr, record->revision_num);
UINT64ENCODE(ptr, record->parent_revision_num);
- memcpy(ptr, record->time_of_creation, 16);
+ H5MM_memcpy(ptr, record->time_of_creation, 16);
ptr += 16;
UINT64ENCODE(ptr, record->logical_eof);
UINT32ENCODE(ptr, page_size);
@@ -798,7 +798,7 @@ H5FD__onion_revision_record_encode(H5FD_onion_revision_record_t *record, unsigne
if (record->comment_size > 0) {
assert(record->comment != NULL && *record->comment != '\0');
- memcpy(ptr, record->comment, record->comment_size);
+ H5MM_memcpy(ptr, record->comment, record->comment_size);
ptr += record->comment_size;
}
@@ -876,7 +876,8 @@ H5FD__onion_merge_revision_index_into_archival_index(const H5FD_onion_revision_i
const H5FD_onion_revision_index_hash_chain_node_t *node = NULL;
for (node = rix->_hash_table[i]; node != NULL; node = node->next) {
- memcpy(&new_aix.list[new_aix.n_entries], &node->entry_data, sizeof(H5FD_onion_index_entry_t));
+ H5MM_memcpy(&new_aix.list[new_aix.n_entries], &node->entry_data,
+ sizeof(H5FD_onion_index_entry_t));
new_aix.n_entries++;
}
}
@@ -901,7 +902,7 @@ H5FD__onion_merge_revision_index_into_archival_index(const H5FD_onion_revision_i
/* Add only if page not already added from revision index */
if (H5FD__onion_archival_index_find(&new_aix, aix->list[i].logical_page, &entry) == 0) {
- memcpy(&kept_list[n_kept], &aix->list[i], sizeof(H5FD_onion_index_entry_t));
+ H5MM_memcpy(&kept_list[n_kept], &aix->list[i], sizeof(H5FD_onion_index_entry_t));
n_kept++;
}
}
@@ -914,12 +915,12 @@ H5FD__onion_merge_revision_index_into_archival_index(const H5FD_onion_revision_i
HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to allocate exact-size archival index list");
/* Copy (new) revision list entries to replacement list */
- memcpy(aix->list, new_aix.list, sizeof(H5FD_onion_index_entry_t) * new_aix.n_entries);
+ H5MM_memcpy(aix->list, new_aix.list, sizeof(H5FD_onion_index_entry_t) * new_aix.n_entries);
aix->n_entries = new_aix.n_entries;
/* Copy (old) kept archival list entries to replacement list */
if (n_kept > 0) {
- memcpy(&aix->list[aix->n_entries], kept_list, sizeof(H5FD_onion_index_entry_t) * n_kept);
+ H5MM_memcpy(&aix->list[aix->n_entries], kept_list, sizeof(H5FD_onion_index_entry_t) * n_kept);
aix->n_entries += n_kept;
}
diff --git a/src/H5FDonion_index.h b/src/H5FDonion_index.h
index 0a9dd880163..7dbd30a922d 100644
--- a/src/H5FDonion_index.h
+++ b/src/H5FDonion_index.h
@@ -125,9 +125,9 @@ extern "C" {
H5_DLL herr_t H5FD__onion_ingest_revision_record(H5FD_onion_revision_record_t *r_out, H5FD_t *raw_file,
const H5FD_onion_history_t *history, uint64_t revision_num);
-H5_DLL hbool_t H5FD__onion_archival_index_is_valid(const H5FD_onion_archival_index_t *);
-H5_DLL int H5FD__onion_archival_index_find(const H5FD_onion_archival_index_t *, uint64_t,
- const H5FD_onion_index_entry_t **);
+H5_DLL bool H5FD__onion_archival_index_is_valid(const H5FD_onion_archival_index_t *);
+H5_DLL int H5FD__onion_archival_index_find(const H5FD_onion_archival_index_t *, uint64_t,
+ const H5FD_onion_index_entry_t **);
H5_DLL H5FD_onion_revision_index_t *H5FD__onion_revision_index_init(uint32_t page_size);
H5_DLL herr_t H5FD__onion_revision_index_destroy(H5FD_onion_revision_index_t *);
diff --git a/src/H5FDpkg.h b/src/H5FDpkg.h
index b1d929c3e64..0d0a7b706c9 100644
--- a/src/H5FDpkg.h
+++ b/src/H5FDpkg.h
@@ -48,7 +48,7 @@ H5_DLL herr_t H5FD__free_real(H5FD_t *file, H5FD_mem_t type, haddr_t addr, hsiz
/* Testing functions */
#ifdef H5FD_TESTING
-H5_DLL hbool_t H5FD__supports_swmr_test(const char *vfd_name);
+H5_DLL bool H5FD__supports_swmr_test(const char *vfd_name);
#endif /* H5FD_TESTING */
#endif /* H5FDpkg_H */
diff --git a/src/H5FDprivate.h b/src/H5FDprivate.h
index 6b8e2dac7fa..5330077565b 100644
--- a/src/H5FDprivate.h
+++ b/src/H5FDprivate.h
@@ -117,18 +117,18 @@ H5_DLL herr_t H5FD_sb_encode(H5FD_t *file, char *name /*out*/, uint8_t *b
H5_DLL herr_t H5FD_sb_load(H5FD_t *file, const char *name, const uint8_t *buf);
H5_DLL void *H5FD_fapl_get(H5FD_t *file);
H5_DLL herr_t H5FD_free_driver_info(hid_t driver_id, const void *driver_info);
-H5_DLL hid_t H5FD_register(const void *cls, size_t size, hbool_t app_ref);
-H5_DLL hid_t H5FD_register_driver_by_name(const char *name, hbool_t app_ref);
-H5_DLL hid_t H5FD_register_driver_by_value(H5FD_class_value_t value, hbool_t app_ref);
+H5_DLL hid_t H5FD_register(const void *cls, size_t size, bool app_ref);
+H5_DLL hid_t H5FD_register_driver_by_name(const char *name, bool app_ref);
+H5_DLL hid_t H5FD_register_driver_by_value(H5FD_class_value_t value, bool app_ref);
H5_DLL htri_t H5FD_is_driver_registered_by_name(const char *driver_name, hid_t *registered_id);
H5_DLL htri_t H5FD_is_driver_registered_by_value(H5FD_class_value_t driver_value, hid_t *registered_id);
-H5_DLL hid_t H5FD_get_driver_id_by_name(const char *name, hbool_t is_api);
-H5_DLL hid_t H5FD_get_driver_id_by_value(H5FD_class_value_t value, hbool_t is_api);
+H5_DLL hid_t H5FD_get_driver_id_by_name(const char *name, bool is_api);
+H5_DLL hid_t H5FD_get_driver_id_by_value(H5FD_class_value_t value, bool is_api);
H5_DLL H5FD_t *H5FD_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr);
H5_DLL herr_t H5FD_close(H5FD_t *file);
H5_DLL int H5FD_cmp(const H5FD_t *f1, const H5FD_t *f2);
H5_DLL herr_t H5FD_driver_query(const H5FD_class_t *driver, unsigned long *flags /*out*/);
-H5_DLL herr_t H5FD_check_plugin_load(const H5FD_class_t *cls, const union H5PL_key_t *key, hbool_t *success);
+H5_DLL herr_t H5FD_check_plugin_load(const H5FD_class_t *cls, const union H5PL_key_t *key, bool *success);
H5_DLL haddr_t H5FD_alloc(H5FD_t *file, H5FD_mem_t type, struct H5F_t *f, hsize_t size, haddr_t *frag_addr,
hsize_t *frag_size);
H5_DLL herr_t H5FD_free(H5FD_t *file, H5FD_mem_t type, struct H5F_t *f, haddr_t addr, hsize_t size);
@@ -174,9 +174,9 @@ H5_DLL herr_t H5FD_read_from_selection(H5FD_t *file, H5FD_mem_t type, uint32_t c
H5_DLL herr_t H5FD_write_from_selection(H5FD_t *file, H5FD_mem_t type, uint32_t count, hid_t mem_space_ids[],
hid_t file_space_ids[], haddr_t offsets[], size_t element_sizes[],
const void *bufs[]);
-H5_DLL herr_t H5FD_flush(H5FD_t *file, hbool_t closing);
-H5_DLL herr_t H5FD_truncate(H5FD_t *file, hbool_t closing);
-H5_DLL herr_t H5FD_lock(H5FD_t *file, hbool_t rw);
+H5_DLL herr_t H5FD_flush(H5FD_t *file, bool closing);
+H5_DLL herr_t H5FD_truncate(H5FD_t *file, bool closing);
+H5_DLL herr_t H5FD_lock(H5FD_t *file, bool rw);
H5_DLL herr_t H5FD_unlock(H5FD_t *file);
H5_DLL herr_t H5FD_delete(const char *name, hid_t fapl_id);
H5_DLL herr_t H5FD_ctl(H5FD_t *file, uint64_t op_code, uint64_t flags, const void *input, void **output);
@@ -184,14 +184,14 @@ H5_DLL herr_t H5FD_get_fileno(const H5FD_t *file, unsigned long *filenum);
H5_DLL herr_t H5FD_get_vfd_handle(H5FD_t *file, hid_t fapl, void **file_handle);
H5_DLL herr_t H5FD_set_base_addr(H5FD_t *file, haddr_t base_addr);
H5_DLL haddr_t H5FD_get_base_addr(const H5FD_t *file);
-H5_DLL herr_t H5FD_set_paged_aggr(H5FD_t *file, hbool_t paged);
+H5_DLL herr_t H5FD_set_paged_aggr(H5FD_t *file, bool paged);
-H5_DLL herr_t H5FD_sort_vector_io_req(hbool_t *vector_was_sorted, uint32_t count, H5FD_mem_t types[],
+H5_DLL herr_t H5FD_sort_vector_io_req(bool *vector_was_sorted, uint32_t count, H5FD_mem_t types[],
haddr_t addrs[], size_t sizes[], H5_flexible_const_ptr_t bufs[],
H5FD_mem_t **s_types_ptr, haddr_t **s_addrs_ptr, size_t **s_sizes_ptr,
H5_flexible_const_ptr_t **s_bufs_ptr);
-H5_DLL herr_t H5FD_sort_selection_io_req(hbool_t *selection_was_sorted, size_t count, hid_t mem_space_ids[],
+H5_DLL herr_t H5FD_sort_selection_io_req(bool *selection_was_sorted, size_t count, hid_t mem_space_ids[],
hid_t file_space_ids[], haddr_t offsets[], size_t element_sizes[],
H5_flexible_const_ptr_t bufs[], hid_t **s_mem_space_ids,
hid_t **s_file_space_ids, haddr_t **s_offsets_ptr,
@@ -207,14 +207,14 @@ H5_DLL herr_t H5FD_mpi_haddr_to_MPIOff(haddr_t addr, MPI_Offset *mpi_off /*out*
H5_DLL herr_t H5FD_mpio_wait_for_left_neighbor(H5FD_t *file);
H5_DLL herr_t H5FD_mpio_signal_right_neighbor(H5FD_t *file);
#endif /* NOT_YET */
-H5_DLL herr_t H5FD_set_mpio_atomicity(H5FD_t *file, hbool_t flag);
-H5_DLL herr_t H5FD_get_mpio_atomicity(H5FD_t *file, hbool_t *flag);
+H5_DLL herr_t H5FD_set_mpio_atomicity(H5FD_t *file, bool flag);
+H5_DLL herr_t H5FD_get_mpio_atomicity(H5FD_t *file, bool *flag);
/* Driver specific methods */
H5_DLL int H5FD_mpi_get_rank(H5FD_t *file);
H5_DLL int H5FD_mpi_get_size(H5FD_t *file);
H5_DLL MPI_Comm H5FD_mpi_get_comm(H5FD_t *file);
-H5_DLL herr_t H5FD_mpi_get_file_sync_required(H5FD_t *file, hbool_t *file_sync_required);
+H5_DLL herr_t H5FD_mpi_get_file_sync_required(H5FD_t *file, bool *file_sync_required);
#endif /* H5_HAVE_PARALLEL */
#endif /* H5FDprivate_H */
diff --git a/src/H5FDros3.c b/src/H5FDros3.c
index 6c953fcb6de..3f3413c6d0e 100644
--- a/src/H5FDros3.c
+++ b/src/H5FDros3.c
@@ -225,7 +225,7 @@ static herr_t H5FD__ros3_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, ha
void *buf);
static herr_t H5FD__ros3_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, size_t size,
const void *buf);
-static herr_t H5FD__ros3_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
+static herr_t H5FD__ros3_truncate(H5FD_t *_file, hid_t dxpl_id, bool closing);
static herr_t H5FD__ros3_validate_config(const H5FD_ros3_fapl_t *fa);
@@ -306,7 +306,7 @@ H5FD_ros3_init(void)
#endif
if (H5I_VFL != H5I_get_type(H5FD_ROS3_g)) {
- H5FD_ROS3_g = H5FD_register(&H5FD_ros3_g, sizeof(H5FD_class_t), FALSE);
+ H5FD_ROS3_g = H5FD_register(&H5FD_ros3_g, sizeof(H5FD_class_t), false);
if (H5I_INVALID_HID == H5FD_ROS3_g) {
HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register ros3");
}
@@ -423,7 +423,7 @@ H5FD__ros3_validate_config(const H5FD_ros3_fapl_t *fa)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Unknown H5FD_ros3_fapl_t version");
/* if set to authenticate, region and id cannot be empty strings */
- if (fa->authenticate == TRUE)
+ if (fa->authenticate == true)
if ((fa->aws_region[0] == '\0') || (fa->secret_id[0] == '\0'))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Inconsistent authentication information");
@@ -623,7 +623,7 @@ H5Pget_fapl_ros3_token(hid_t fapl_id, size_t size, char *token_dst /*out*/)
}
/* Copy the token data out */
- tokenlen = HDstrlen(token_src);
+ tokenlen = strlen(token_src);
if (size <= tokenlen) {
tokenlen = size - 1;
}
@@ -659,7 +659,7 @@ H5FD__ros3_str_token_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED
#endif
if (*value)
- if (NULL == (*value = HDstrdup(*value)))
+ if (NULL == (*value = strdup(*value)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't copy string property token");
done:
@@ -691,7 +691,7 @@ H5FD__ros3_str_token_cmp(const void *_value1, const void *_value2, size_t H5_ATT
if (*value1) {
if (*value2)
- ret_value = HDstrcmp(*value1, *value2);
+ ret_value = strcmp(*value1, *value2);
else
ret_value = 1;
}
@@ -798,7 +798,7 @@ H5Pset_fapl_ros3_token(hid_t fapl_id, const char *token)
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a file access property list");
if (H5FD_ROS3 != H5P_peek_driver(plist))
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver");
- if (HDstrlen(token) > H5FD_ROS3_MAX_SECRET_TOK_LEN)
+ if (strlen(token) > H5FD_ROS3_MAX_SECRET_TOK_LEN)
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL,
"specified token exceeds the internally specified maximum string length");
@@ -809,13 +809,13 @@ H5Pset_fapl_ros3_token(hid_t fapl_id, const char *token)
if (H5P_get(plist, ROS3_TOKEN_PROP_NAME, &token_src) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get token value");
- memcpy(token_src, token, HDstrlen(token) + 1);
+ H5MM_memcpy(token_src, token, strlen(token) + 1);
}
else {
token_src = (char *)malloc(sizeof(char) * (H5FD_ROS3_MAX_SECRET_TOK_LEN + 1));
if (token_src == NULL)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "cannot make space for token_src variable.");
- memcpy(token_src, token, HDstrlen(token) + 1);
+ H5MM_memcpy(token_src, token, strlen(token) + 1);
if (H5P_insert(plist, ROS3_TOKEN_PROP_NAME, sizeof(char *), &token_src, NULL, NULL, NULL, NULL,
H5FD__ros3_str_token_delete, H5FD__ros3_str_token_copy, H5FD__ros3_str_token_cmp,
H5FD__ros3_str_token_close) < 0)
@@ -957,7 +957,7 @@ H5FD__ros3_open(const char *url, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
/* open file; procedure depends on whether or not the fapl instructs to
* authenticate requests or not.
*/
- if (fa.authenticate == TRUE) {
+ if (fa.authenticate == true) {
/* compute signing key (part of AWS/S3 REST API)
* can be re-used by user/key for 7 days after creation.
* find way to reuse/share
@@ -1398,16 +1398,16 @@ H5FD__ros3_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
assert(purl2->host != NULL);
/* URL: SCHEME */
- if (HDstrcmp(purl1->scheme, purl2->scheme))
+ if (strcmp(purl1->scheme, purl2->scheme))
HGOTO_DONE(-1);
/* URL: HOST */
- if (HDstrcmp(purl1->host, purl2->host))
+ if (strcmp(purl1->host, purl2->host))
HGOTO_DONE(-1);
/* URL: PORT */
if (purl1->port && purl2->port) {
- if (HDstrcmp(purl1->port, purl2->port))
+ if (strcmp(purl1->port, purl2->port))
HGOTO_DONE(-1);
}
else if (purl1->port)
@@ -1417,7 +1417,7 @@ H5FD__ros3_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
/* URL: PATH */
if (purl1->path && purl2->path) {
- if (HDstrcmp(purl1->path, purl2->path))
+ if (strcmp(purl1->path, purl2->path))
HGOTO_DONE(-1);
}
else if (purl1->path && !purl2->path)
@@ -1427,7 +1427,7 @@ H5FD__ros3_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
/* URL: QUERY */
if (purl1->query && purl2->query) {
- if (HDstrcmp(purl1->query, purl2->query))
+ if (strcmp(purl1->query, purl2->query))
HGOTO_DONE(-1);
}
else if (purl1->query && !purl2->query)
@@ -1437,7 +1437,7 @@ H5FD__ros3_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
/* FAPL: AWS_REGION */
if (f1->fa.aws_region[0] != '\0' && f2->fa.aws_region[0] != '\0') {
- if (HDstrcmp(f1->fa.aws_region, f2->fa.aws_region))
+ if (strcmp(f1->fa.aws_region, f2->fa.aws_region))
HGOTO_DONE(-1);
}
else if (f1->fa.aws_region[0] != '\0')
@@ -1447,7 +1447,7 @@ H5FD__ros3_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
/* FAPL: SECRET_ID */
if (f1->fa.secret_id[0] != '\0' && f2->fa.secret_id[0] != '\0') {
- if (HDstrcmp(f1->fa.secret_id, f2->fa.secret_id))
+ if (strcmp(f1->fa.secret_id, f2->fa.secret_id))
HGOTO_DONE(-1);
}
else if (f1->fa.secret_id[0] != '\0')
@@ -1457,7 +1457,7 @@ H5FD__ros3_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
/* FAPL: SECRET_KEY */
if (f1->fa.secret_key[0] != '\0' && f2->fa.secret_key[0] != '\0') {
- if (HDstrcmp(f1->fa.secret_key, f2->fa.secret_key))
+ if (strcmp(f1->fa.secret_key, f2->fa.secret_key))
HGOTO_DONE(-1);
}
else if (f1->fa.secret_key[0] != '\0')
@@ -1757,8 +1757,7 @@ H5FD__ros3_write(H5FD_t H5_ATTR_UNUSED *_file, H5FD_mem_t H5_ATTR_UNUSED type, h
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD__ros3_truncate(H5FD_t H5_ATTR_UNUSED *_file, hid_t H5_ATTR_UNUSED dxpl_id,
- hbool_t H5_ATTR_UNUSED closing)
+H5FD__ros3_truncate(H5FD_t H5_ATTR_UNUSED *_file, hid_t H5_ATTR_UNUSED dxpl_id, bool H5_ATTR_UNUSED closing)
{
herr_t ret_value = SUCCEED;
diff --git a/src/H5FDros3.h b/src/H5FDros3.h
index 0f2f31538a0..ecd26789cc8 100644
--- a/src/H5FDros3.h
+++ b/src/H5FDros3.h
@@ -51,10 +51,10 @@
*
* `authenticate` (hbool_t)
*
- * Flag TRUE or FALSE whether or not requests are to be authenticated
+ * Flag true or false whether or not requests are to be authenticated
* with the AWS4 algorithm.
- * If TRUE, `aws_region`, `secret_id`, and `secret_key` must be populated.
- * If FALSE, those three components are unused.
+ * If true, `aws_region`, `secret_id`, and `secret_key` must be populated.
+ * If false, those three components are unused.
*
* `aws_region` (char[])
*
@@ -114,7 +114,7 @@
* to #H5FD_CURR_ROS3_FAPL_T_VERSION.
*
* \var hbool_t H5FD_ros3_fapl_t::authenticate
- * A boolean which specifies if security credentials should be used for
+ * A Boolean which specifies if security credentials should be used for
* accessing a S3 bucket.
*
* \var char H5FD_ros3_fapl_t::aws_region[H5FD_ROS3_MAX_REGION_LEN + 1]
diff --git a/src/H5FDs3comms.c b/src/H5FDs3comms.c
index c3bf726b499..58fc4355e63 100644
--- a/src/H5FDs3comms.c
+++ b/src/H5FDs3comms.c
@@ -208,7 +208,7 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value)
char *nvcat = NULL;
hrb_node_t *node_ptr = NULL;
hrb_node_t *new_node = NULL;
- hbool_t is_looking = TRUE;
+ bool is_looking = true;
herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
@@ -227,7 +227,7 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value)
if (name == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to operate on null name");
- namelen = HDstrlen(name);
+ namelen = strlen(name);
/***********************
* PREPARE ALL STRINGS *
@@ -248,7 +248,7 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value)
*/
if (value != NULL) {
int ret = 0;
- size_t valuelen = HDstrlen(value);
+ size_t valuelen = strlen(value);
size_t catlen = namelen + valuelen + 2; /* +2 from ": " */
size_t catwrite = catlen + 3; /* 3 not 1 to quiet compiler warning */
@@ -265,10 +265,10 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value)
nvcat = (char *)H5MM_malloc(sizeof(char) * catwrite);
if (nvcat == NULL)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "cannot make space for concatenated string.");
- ret = HDsnprintf(nvcat, catwrite, "%s: %s", name, value);
+ ret = snprintf(nvcat, catwrite, "%s: %s", name, value);
if (ret < 0 || (size_t)ret > catlen)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cannot concatenate `%s: %s", name, value);
- assert(catlen == HDstrlen(nvcat));
+ assert(catlen == strlen(nvcat));
/* create new_node, should we need it
*/
@@ -318,9 +318,9 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value)
/* Check whether to modify/remove first node in list
*/
- if (HDstrcmp(lowername, node_ptr->lowername) == 0) {
+ if (strcmp(lowername, node_ptr->lowername) == 0) {
- is_looking = FALSE;
+ is_looking = false;
if (value == NULL) {
#if S3COMMS_DEBUG
@@ -396,9 +396,9 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value)
new_node = NULL;
}
}
- else if (HDstrcmp(lowername, node_ptr->lowername) < 0) {
+ else if (strcmp(lowername, node_ptr->lowername) < 0) {
- is_looking = FALSE;
+ is_looking = false;
if (value == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove a node 'before' head");
@@ -427,7 +427,7 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value)
while (is_looking) {
if (node_ptr->next == NULL) {
- is_looking = FALSE;
+ is_looking = false;
if (value == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove absent node");
@@ -440,7 +440,7 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value)
* APPEND NEW NODE *
*******************/
- assert(HDstrcmp(lowername, node_ptr->lowername) > 0);
+ assert(strcmp(lowername, node_ptr->lowername) > 0);
new_node->name = namecpy;
new_node->value = valuecpy;
new_node->lowername = lowername;
@@ -448,9 +448,9 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value)
node_ptr->next = new_node;
}
}
- else if (HDstrcmp(lowername, node_ptr->next->lowername) < 0) {
+ else if (strcmp(lowername, node_ptr->next->lowername) < 0) {
- is_looking = FALSE;
+ is_looking = false;
if (value == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove absent node");
@@ -463,7 +463,7 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value)
* INSERT NEW NODE *
*******************/
- assert(HDstrcmp(lowername, node_ptr->lowername) > 0);
+ assert(strcmp(lowername, node_ptr->lowername) > 0);
new_node->name = namecpy;
new_node->value = valuecpy;
new_node->lowername = lowername;
@@ -472,9 +472,9 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value)
node_ptr->next = new_node;
}
}
- else if (HDstrcmp(lowername, node_ptr->next->lowername) == 0) {
+ else if (strcmp(lowername, node_ptr->next->lowername) == 0) {
- is_looking = FALSE;
+ is_looking = false;
if (value == NULL) {
/*****************
@@ -681,7 +681,7 @@ H5FD_s3comms_hrb_init_request(const char *_verb, const char *_resource, const ch
request->first_header = NULL;
/* malloc and copy strings for the structure */
- reslen = HDstrlen(_resource);
+ reslen = strlen(_resource);
if (_resource[0] == '/') {
res = (char *)H5MM_malloc(sizeof(char) * (reslen + 1));
@@ -695,20 +695,20 @@ H5FD_s3comms_hrb_init_request(const char *_verb, const char *_resource, const ch
HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, NULL, "no space for resource string");
*res = '/';
H5MM_memcpy((&res[1]), _resource, (reslen + 1));
- assert((reslen + 1) == HDstrlen(res));
+ assert((reslen + 1) == strlen(res));
} /* end if (else resource string not starting with '/') */
- verblen = HDstrlen(_verb) + 1;
+ verblen = strlen(_verb) + 1;
verb = (char *)H5MM_malloc(sizeof(char) * verblen);
if (verb == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "no space for verb string");
- HDstrncpy(verb, _verb, verblen);
+ strncpy(verb, _verb, verblen);
- vrsnlen = HDstrlen(_http_version) + 1;
+ vrsnlen = strlen(_http_version) + 1;
vrsn = (char *)H5MM_malloc(sizeof(char) * vrsnlen);
if (vrsn == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "no space for http-version string");
- HDstrncpy(vrsn, _http_version, vrsnlen);
+ strncpy(vrsn, _http_version, vrsnlen);
/* place new copies into structure */
request->resource = res;
@@ -925,8 +925,8 @@ H5FD_s3comms_s3r_getsize(s3r_t *handle)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "could not find \"Content-Length\" in response.");
/* move "start" to beginning of value in line; find end of line */
- start = start + HDstrlen("\r\nContent-Length: ");
- end = HDstrstr(start, "\r\n");
+ start = start + strlen("\r\nContent-Length: ");
+ end = strstr(start, "\r\n");
if (end == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "could not find end of content length line");
@@ -1059,13 +1059,13 @@ H5FD_s3comms_s3r_open(const char *url, const char *region, const char *id, const
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "token cannot be null.");
/* copy strings */
- tmplen = HDstrlen(region) + 1;
+ tmplen = strlen(region) + 1;
handle->region = (char *)H5MM_malloc(sizeof(char) * tmplen);
if (handle->region == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "could not malloc space for handle region copy.");
H5MM_memcpy(handle->region, region, tmplen);
- tmplen = HDstrlen(id) + 1;
+ tmplen = strlen(id) + 1;
handle->secret_id = (char *)H5MM_malloc(sizeof(char) * tmplen);
if (handle->secret_id == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "could not malloc space for handle ID copy.");
@@ -1077,7 +1077,7 @@ H5FD_s3comms_s3r_open(const char *url, const char *region, const char *id, const
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "could not malloc space for handle key copy.");
H5MM_memcpy(handle->signing_key, signing_key, tmplen);
- tmplen = HDstrlen(token) + 1;
+ tmplen = strlen(token) + 1;
handle->token = (char *)H5MM_malloc(sizeof(char) * tmplen);
if (handle->token == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "could not malloc space for handle token copy.");
@@ -1203,7 +1203,7 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest)
char *rangebytesstr = NULL;
hrb_t *request = NULL;
int ret = 0; /* working variable to check */
- /* return value of HDsnprintf */
+ /* return value of snprintf */
char *authorization = NULL;
char *buffer1 = NULL;
char *signed_headers = NULL;
@@ -1259,8 +1259,8 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest)
rangebytesstr = (char *)H5MM_malloc(sizeof(char) * (S3COMMS_MAX_RANGE_STRING_SIZE + 1));
if (rangebytesstr == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "could not malloc range format string.");
- ret = HDsnprintf(rangebytesstr, (S3COMMS_MAX_RANGE_STRING_SIZE), "bytes=%" PRIuHADDR "-%" PRIuHADDR,
- offset, offset + len - 1);
+ ret = snprintf(rangebytesstr, (S3COMMS_MAX_RANGE_STRING_SIZE), "bytes=%" PRIuHADDR "-%" PRIuHADDR,
+ offset, offset + len - 1);
if (ret <= 0 || ret >= S3COMMS_MAX_RANGE_STRING_SIZE)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to format HTTP Range value");
}
@@ -1268,7 +1268,7 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest)
rangebytesstr = (char *)H5MM_malloc(sizeof(char) * (S3COMMS_MAX_RANGE_STRING_SIZE + 1));
if (rangebytesstr == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "could not malloc range format string.");
- ret = HDsnprintf(rangebytesstr, (S3COMMS_MAX_RANGE_STRING_SIZE), "bytes=%" PRIuHADDR "-", offset);
+ ret = snprintf(rangebytesstr, (S3COMMS_MAX_RANGE_STRING_SIZE), "bytes=%" PRIuHADDR "-", offset);
if (ret <= 0 || ret >= S3COMMS_MAX_RANGE_STRING_SIZE)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to format HTTP Range value");
}
@@ -1288,7 +1288,7 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest)
/* Pass in range directly */
char *bytesrange_ptr = NULL; /* pointer past "bytes=" portion */
- bytesrange_ptr = HDstrchr(rangebytesstr, '=');
+ bytesrange_ptr = strchr(rangebytesstr, '=');
assert(bytesrange_ptr != NULL);
bytesrange_ptr++; /* move to first char past '=' */
assert(*bytesrange_ptr != '\0');
@@ -1376,7 +1376,7 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem building headers list.");
assert(headers->magic == S3COMMS_HRB_NODE_MAGIC);
- if (HDstrlen((const char *)handle->token) > 0) {
+ if (strlen((const char *)handle->token) > 0) {
if (FAIL ==
H5FD_s3comms_hrb_node_set(&headers, "x-amz-security-token", (const char *)handle->token))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to set x-amz-security-token header");
@@ -1414,7 +1414,7 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad string-to-sign");
/* buffer1 -> signature */
if (FAIL == H5FD_s3comms_HMAC_SHA256(handle->signing_key, SHA256_DIGEST_LENGTH, buffer2,
- HDstrlen(buffer2), buffer1))
+ strlen(buffer2), buffer1))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad signature");
iso8601now[8] = 0; /* trim to yyyyMMDD */
@@ -1422,9 +1422,9 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest)
if (ret == 0 || ret >= S3COMMS_MAX_CREDENTIAL_SIZE)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to format aws4 credential string");
- ret = HDsnprintf(authorization, 512 + H5FD_ROS3_MAX_SECRET_TOK_LEN,
- "AWS4-HMAC-SHA256 Credential=%s,SignedHeaders=%s,Signature=%s", buffer2,
- signed_headers, buffer1);
+ ret = snprintf(authorization, 512 + H5FD_ROS3_MAX_SECRET_TOK_LEN,
+ "AWS4-HMAC-SHA256 Credential=%s,SignedHeaders=%s,Signature=%s", buffer2,
+ signed_headers, buffer1);
if (ret <= 0 || ret >= 512 + H5FD_ROS3_MAX_SECRET_TOK_LEN)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to format aws4 authorization string");
@@ -1674,14 +1674,14 @@ H5FD_s3comms_aws_canonical_request(char *canonical_request_dest, int _cr_size, c
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "signed headers destination cannot be null.");
/* HTTP verb, resource path, and query string lines */
- cr_len = (HDstrlen(http_request->verb) + HDstrlen(http_request->resource) + HDstrlen(query_params) +
+ cr_len = (strlen(http_request->verb) + strlen(http_request->resource) + strlen(query_params) +
(size_t)3); /* three newline chars */
if (cr_len >= cr_size)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not enough space in canonical request");
/* TODO: compiler warning */
- ret = HDsnprintf(canonical_request_dest, (cr_size - 1), "%s\n%s\n%s\n", http_request->verb,
- http_request->resource, query_params);
+ ret = snprintf(canonical_request_dest, (cr_size - 1), "%s\n%s\n%s\n", http_request->verb,
+ http_request->resource, query_params);
if (ret < 0 || (size_t)ret >= cr_size)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to compose canonical request first line");
@@ -1691,38 +1691,38 @@ H5FD_s3comms_aws_canonical_request(char *canonical_request_dest, int _cr_size, c
assert(node->magic == S3COMMS_HRB_NODE_MAGIC);
- ret = HDsnprintf(tmpstr, 1024, "%s:%s\n", node->lowername, node->value);
+ ret = snprintf(tmpstr, 1024, "%s:%s\n", node->lowername, node->value);
if (ret < 0 || ret >= 1024)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to concatenate HTTP header %s:%s",
node->lowername, node->value);
- cr_len += HDstrlen(tmpstr);
+ cr_len += strlen(tmpstr);
if (cr_len + 1 > cr_size)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not enough space in canonical request");
- HDstrcat(canonical_request_dest, tmpstr);
+ strcat(canonical_request_dest, tmpstr);
- ret = HDsnprintf(tmpstr, 1024, "%s;", node->lowername);
+ ret = snprintf(tmpstr, 1024, "%s;", node->lowername);
if (ret < 0 || ret >= 1024)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to append semicolon to lowername %s",
node->lowername);
- sh_len += HDstrlen(tmpstr);
+ sh_len += strlen(tmpstr);
if (sh_len + 1 > sh_size)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not enough space in signed headers");
- HDstrcat(signed_headers_dest, tmpstr);
+ strcat(signed_headers_dest, tmpstr);
node = node->next;
} /* end while node is not NULL */
/* remove trailing ';' from signed headers sequence */
- signed_headers_dest[HDstrlen(signed_headers_dest) - 1] = '\0';
+ signed_headers_dest[strlen(signed_headers_dest) - 1] = '\0';
/* append signed headers and payload hash
* NOTE: at present, no HTTP body is handled, per the nature of
* requests/range-gets
*/
- HDstrcat(canonical_request_dest, "\n");
- HDstrcat(canonical_request_dest, signed_headers_dest);
- HDstrcat(canonical_request_dest, "\n");
- HDstrcat(canonical_request_dest, EMPTY_SHA256);
+ strcat(canonical_request_dest, "\n");
+ strcat(canonical_request_dest, signed_headers_dest);
+ strcat(canonical_request_dest, "\n");
+ strcat(canonical_request_dest, EMPTY_SHA256);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1757,7 +1757,7 @@ H5FD_s3comms_aws_canonical_request(char *canonical_request_dest, int _cr_size, c
*----------------------------------------------------------------------------
*/
herr_t
-H5FD_s3comms_bytes_to_hex(char *dest, const unsigned char *msg, size_t msg_len, hbool_t lowercase)
+H5FD_s3comms_bytes_to_hex(char *dest, const unsigned char *msg, size_t msg_len, bool lowercase)
{
size_t i = 0;
herr_t ret_value = SUCCEED;
@@ -1774,8 +1774,8 @@ H5FD_s3comms_bytes_to_hex(char *dest, const unsigned char *msg, size_t msg_len,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bytes sequence cannot be null.");
for (i = 0; i < msg_len; i++) {
- int chars_written = HDsnprintf(&(dest[i * 2]), 3, /* 'X', 'X', '\n' */
- (lowercase == TRUE) ? "%02x" : "%02X", msg[i]);
+ int chars_written = snprintf(&(dest[i * 2]), 3, /* 'X', 'X', '\n' */
+ (lowercase == true) ? "%02x" : "%02X", msg[i]);
if (chars_written != 2)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem while writing hex chars for %c", msg[i]);
}
@@ -1957,7 +1957,7 @@ H5FD__s3comms_load_aws_creds_from_file(FILE *file, const char *profile_name, cha
#endif
/* format target line for start of profile */
- if (32 < HDsnprintf(profile_line, 32, "[%s]", profile_name))
+ if (32 < snprintf(profile_line, 32, "[%s]", profile_name))
HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, "unable to format profile label");
/* look for start of profile */
@@ -1966,10 +1966,10 @@ H5FD__s3comms_load_aws_creds_from_file(FILE *file, const char *profile_name, cha
for (buffer_i = 0; buffer_i < 128; buffer_i++)
buffer[buffer_i] = 0;
- line_buffer = HDfgets(line_buffer, 128, file);
+ line_buffer = fgets(line_buffer, 128, file);
if (line_buffer == NULL) /* reached end of file */
goto done;
- } while (HDstrncmp(line_buffer, profile_line, HDstrlen(profile_line)));
+ } while (strncmp(line_buffer, profile_line, strlen(profile_line)));
/* extract credentials from lines */
do {
@@ -1978,7 +1978,7 @@ H5FD__s3comms_load_aws_creds_from_file(FILE *file, const char *profile_name, cha
buffer[buffer_i] = 0;
/* collect a line from file */
- line_buffer = HDfgets(line_buffer, 128, file);
+ line_buffer = fgets(line_buffer, 128, file);
if (line_buffer == NULL)
goto done; /* end of file */
@@ -1989,12 +1989,12 @@ H5FD__s3comms_load_aws_creds_from_file(FILE *file, const char *profile_name, cha
char line_prefix[128];
setting_name = setting_names[setting_i];
- setting_name_len = HDstrlen(setting_name);
- if (HDsnprintf(line_prefix, 128, "%s=", setting_name) < 0)
+ setting_name_len = strlen(setting_name);
+ if (snprintf(line_prefix, 128, "%s=", setting_name) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, "unable to format line prefix");
/* found a matching name? */
- if (!HDstrncmp(line_buffer, line_prefix, setting_name_len + 1)) {
+ if (!strncmp(line_buffer, line_prefix, setting_name_len + 1)) {
found_setting = 1;
/* skip NULL destination buffer */
@@ -2011,7 +2011,7 @@ H5FD__s3comms_load_aws_creds_from_file(FILE *file, const char *profile_name, cha
line_buffer++; /* was pointing at '='; advance */
/* copy line buffer into out pointer */
- HDstrncpy(setting_pointers[setting_i], (const char *)line_buffer, HDstrlen(line_buffer));
+ strncpy(setting_pointers[setting_i], (const char *)line_buffer, strlen(line_buffer));
/* "trim" tailing whitespace by replacing with null terminator*/
buffer_i = 0;
@@ -2074,13 +2074,13 @@ H5FD_s3comms_load_aws_profile(const char *profile_name, char *key_id_out, char *
#endif
#ifdef H5_HAVE_WIN32_API
- ret = HDsnprintf(awspath, 117, "%s/.aws/", HDgetenv("USERPROFILE"));
+ ret = snprintf(awspath, 117, "%s/.aws/", getenv("USERPROFILE"));
#else
- ret = HDsnprintf(awspath, 117, "%s/.aws/", HDgetenv("HOME"));
+ ret = snprintf(awspath, 117, "%s/.aws/", getenv("HOME"));
#endif
if (ret < 0 || (size_t)ret >= 117)
HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, "unable to format home-aws path");
- ret = HDsnprintf(filepath, 128, "%s%s", awspath, "credentials");
+ ret = snprintf(filepath, 128, "%s%s", awspath, "credentials");
if (ret < 0 || (size_t)ret >= 128)
HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, "unable to format credentials path");
@@ -2094,7 +2094,7 @@ H5FD_s3comms_load_aws_profile(const char *profile_name, char *key_id_out, char *
credfile = NULL;
} /* end if credential file opened */
- ret = HDsnprintf(filepath, 128, "%s%s", awspath, "config");
+ ret = snprintf(filepath, 128, "%s%s", awspath, "config");
if (ret < 0 || (size_t)ret >= 128)
HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, "unable to format config path");
credfile = fopen(filepath, "r");
@@ -2218,7 +2218,7 @@ H5FD_s3comms_parse_url(const char *str, parsed_url_t **_purl)
if (str == NULL || *str == '\0')
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid url string");
- urllen = (long int)HDstrlen(str);
+ urllen = (long int)strlen(str);
purl = (parsed_url_t *)H5MM_malloc(sizeof(parsed_url_t));
if (purl == NULL)
@@ -2234,7 +2234,7 @@ H5FD_s3comms_parse_url(const char *str, parsed_url_t **_purl)
* READ SCHEME *
***************/
- tmpstr = HDstrchr(curstr, ':');
+ tmpstr = strchr(curstr, ':');
if (tmpstr == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid SCHEME construction: probably not URL");
len = tmpstr - curstr;
@@ -2251,7 +2251,7 @@ H5FD_s3comms_parse_url(const char *str, parsed_url_t **_purl)
purl->scheme = (char *)H5MM_malloc(sizeof(char) * (size_t)(len + 1));
if (purl->scheme == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "can't allocate space for SCHEME");
- HDstrncpy(purl->scheme, curstr, (size_t)len);
+ strncpy(purl->scheme, curstr, (size_t)len);
purl->scheme[len] = '\0';
for (i = 0; i < len; i++)
purl->scheme[i] = (char)HDtolower(purl->scheme[i]);
@@ -2291,7 +2291,7 @@ H5FD_s3comms_parse_url(const char *str, parsed_url_t **_purl)
purl->host = (char *)H5MM_malloc(sizeof(char) * (size_t)(len + 1));
if (purl->host == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "can't allocate space for HOST");
- HDstrncpy(purl->host, curstr, (size_t)len);
+ strncpy(purl->host, curstr, (size_t)len);
purl->host[len] = 0;
/*************
@@ -2316,7 +2316,7 @@ H5FD_s3comms_parse_url(const char *str, parsed_url_t **_purl)
purl->port = (char *)H5MM_malloc(sizeof(char) * (size_t)(len + 1));
if (purl->port == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "can't allocate space for PORT");
- HDstrncpy(purl->port, curstr, (size_t)len);
+ strncpy(purl->port, curstr, (size_t)len);
purl->port[len] = 0;
} /* end if PORT element */
@@ -2339,7 +2339,7 @@ H5FD_s3comms_parse_url(const char *str, parsed_url_t **_purl)
purl->path = (char *)H5MM_malloc(sizeof(char) * (size_t)(len + 1));
if (purl->path == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "can't allocate space for PATH");
- HDstrncpy(purl->path, curstr, (size_t)len);
+ strncpy(purl->path, curstr, (size_t)len);
purl->path[len] = 0;
}
} /* end if PATH element */
@@ -2361,7 +2361,7 @@ H5FD_s3comms_parse_url(const char *str, parsed_url_t **_purl)
purl->query = (char *)H5MM_malloc(sizeof(char) * (size_t)(len + 1));
if (purl->query == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "can't allocate space for QUERY");
- HDstrncpy(purl->query, curstr, (size_t)len);
+ strncpy(purl->query, curstr, (size_t)len);
purl->query[len] = 0;
} /* end if QUERY exists */
@@ -2433,7 +2433,7 @@ H5FD_s3comms_percent_encode_char(char *repr, const unsigned char c, size_t *repr
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no destination `repr`.");
#if S3COMMS_DEBUG
- H5FD_s3comms_bytes_to_hex((char *)hex, s, 1, FALSE);
+ H5FD_s3comms_bytes_to_hex((char *)hex, s, 1, false);
fprintf(stdout, " CHAR: \'%s\'\n", s);
fprintf(stdout, " CHAR-HEX: \"%s\"\n", hex);
#endif
@@ -2446,7 +2446,7 @@ H5FD_s3comms_percent_encode_char(char *repr, const unsigned char c, size_t *repr
fprintf(stdout, " SINGLE-BYTE\n");
#endif
*repr_len = 3;
- chars_written = HDsnprintf(repr, 4, "%%%02X", c);
+ chars_written = snprintf(repr, 4, "%%%02X", c);
if (chars_written < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cannot write char %c", c);
} /* end if single-byte unicode char */
@@ -2480,7 +2480,7 @@ H5FD_s3comms_percent_encode_char(char *repr, const unsigned char c, size_t *repr
#if S3COMMS_DEBUG
fprintf(stdout, " STACK:\n {\n");
for (i = 0; i < stack_size; i++) {
- H5FD_s3comms_bytes_to_hex((char *)hex, (&stack[i]), 1, FALSE);
+ H5FD_s3comms_bytes_to_hex((char *)hex, (&stack[i]), 1, false);
hex[2] = 0;
fprintf(stdout, " %s,\n", hex);
}
@@ -2497,7 +2497,7 @@ H5FD_s3comms_percent_encode_char(char *repr, const unsigned char c, size_t *repr
acc += (stack_size > 2) ? 0x20 : 0; /* 0x00100000 */
acc += (stack_size > 3) ? 0x10 : 0; /* 0x00010000 */
stack_size--;
- chars_written = HDsnprintf(repr, 4, "%%%02X", (unsigned char)(acc + stack[stack_size]));
+ chars_written = snprintf(repr, 4, "%%%02X", (unsigned char)(acc + stack[stack_size]));
if (chars_written < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cannot write char %c", c);
*repr_len += 3;
@@ -2509,7 +2509,7 @@ H5FD_s3comms_percent_encode_char(char *repr, const unsigned char c, size_t *repr
/* 10xxxxxx */
for (i = 0; i < stack_size; i++) {
chars_written =
- HDsnprintf(&repr[i * 3 + 3], 4, "%%%02X", (unsigned char)(0x80 + stack[stack_size - 1 - i]));
+ snprintf(&repr[i * 3 + 3], 4, "%%%02X", (unsigned char)(0x80 + stack[stack_size - 1 - i]));
if (chars_written < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cannot write char %c", c);
*repr_len += 3;
@@ -2565,7 +2565,7 @@ H5FD_s3comms_signing_key(unsigned char *md, const char *secret, const char *regi
unsigned char datekey[SHA256_DIGEST_LENGTH];
unsigned char dateregionkey[SHA256_DIGEST_LENGTH];
unsigned char dateregionservicekey[SHA256_DIGEST_LENGTH];
- int ret = 0; /* return value of HDsnprintf */
+ int ret = 0; /* return value of snprintf */
herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
@@ -2583,24 +2583,24 @@ H5FD_s3comms_signing_key(unsigned char *md, const char *secret, const char *regi
if (iso8601now == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "`iso8601now` cannot be NULL.");
- AWS4_secret_len = 4 + HDstrlen(secret) + 1;
+ AWS4_secret_len = 4 + strlen(secret) + 1;
AWS4_secret = (char *)H5MM_malloc(sizeof(char *) * AWS4_secret_len);
if (AWS4_secret == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Could not allocate space.");
/* prepend "AWS4" to start of the secret key */
- ret = HDsnprintf(AWS4_secret, AWS4_secret_len, "%s%s", "AWS4", secret);
+ ret = snprintf(AWS4_secret, AWS4_secret_len, "%s%s", "AWS4", secret);
if ((size_t)ret != (AWS4_secret_len - 1))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem writing AWS4+secret `%s`", secret);
/* hash_func, key, len(key), msg, len(msg), digest_dest, digest_len_dest
* we know digest length, so ignore via NULL
*/
- HMAC(EVP_sha256(), (const unsigned char *)AWS4_secret, (int)HDstrlen(AWS4_secret),
+ HMAC(EVP_sha256(), (const unsigned char *)AWS4_secret, (int)strlen(AWS4_secret),
(const unsigned char *)iso8601now, 8, /* 8 --> length of 8 --> "yyyyMMDD" */
datekey, NULL);
HMAC(EVP_sha256(), (const unsigned char *)datekey, SHA256_DIGEST_LENGTH, (const unsigned char *)region,
- HDstrlen(region), dateregionkey, NULL);
+ strlen(region), dateregionkey, NULL);
HMAC(EVP_sha256(), (const unsigned char *)dateregionkey, SHA256_DIGEST_LENGTH,
(const unsigned char *)"s3", 2, dateregionservicekey, NULL);
HMAC(EVP_sha256(), (const unsigned char *)dateregionservicekey, SHA256_DIGEST_LENGTH,
@@ -2653,7 +2653,7 @@ H5FD_s3comms_tostringtosign(char *dest, const char *req, const char *now, const
char day[9];
char hexsum[SHA256_DIGEST_LENGTH * 2 + 1];
size_t i = 0;
- int ret = 0; /* HDsnprintf return value */
+ int ret = 0; /* snprintf return value */
herr_t ret_value = SUCCEED;
char tmp[128];
@@ -2678,24 +2678,24 @@ H5FD_s3comms_tostringtosign(char *dest, const char *req, const char *now, const
checksum[i] = '\0';
hexsum[i] = '\0';
}
- HDstrncpy(day, now, 8);
+ strncpy(day, now, 8);
day[8] = '\0';
- ret = HDsnprintf(tmp, 127, "%s/%s/s3/aws4_request", day, region);
+ ret = snprintf(tmp, 127, "%s/%s/s3/aws4_request", day, region);
if (ret <= 0 || ret >= 127)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem adding day and region to string");
H5MM_memcpy((dest + d), "AWS4-HMAC-SHA256\n", 17);
d = 17;
- H5MM_memcpy((dest + d), now, HDstrlen(now));
- d += HDstrlen(now);
+ H5MM_memcpy((dest + d), now, strlen(now));
+ d += strlen(now);
dest[d++] = '\n';
- H5MM_memcpy((dest + d), tmp, HDstrlen(tmp));
- d += HDstrlen(tmp);
+ H5MM_memcpy((dest + d), tmp, strlen(tmp));
+ d += strlen(tmp);
dest[d++] = '\n';
- SHA256((const unsigned char *)req, HDstrlen(req), checksum);
+ SHA256((const unsigned char *)req, strlen(req), checksum);
if (H5FD_s3comms_bytes_to_hex(hexsum, (const unsigned char *)checksum, SHA256_DIGEST_LENGTH, true) ==
FAIL)
@@ -2756,7 +2756,7 @@ H5FD_s3comms_trim(char *dest, char *s, size_t s_len, size_t *n_written)
/* Find first non-whitespace character from start;
* reduce total length per character.
*/
- while ((s_len > 0) && isspace((unsigned char)s[0]) && s_len > 0) {
+ while (s_len > 0 && isspace((unsigned char)s[0])) {
s++;
s_len--;
}
@@ -2818,7 +2818,7 @@ H5FD_s3comms_trim(char *dest, char *s, size_t s_len, size_t *n_written)
*----------------------------------------------------------------------------
*/
herr_t
-H5FD_s3comms_uriencode(char *dest, const char *s, size_t s_len, hbool_t encode_slash, size_t *n_written)
+H5FD_s3comms_uriencode(char *dest, const char *s, size_t s_len, bool encode_slash, size_t *n_written)
{
char c = 0;
size_t dest_off = 0;
@@ -2845,7 +2845,7 @@ H5FD_s3comms_uriencode(char *dest, const char *s, size_t s_len, hbool_t encode_s
*/
for (s_off = 0; s_off < s_len; s_off++) {
c = s[s_off];
- if (isalnum(c) || c == '.' || c == '-' || c == '_' || c == '~' || (c == '/' && encode_slash == FALSE))
+ if (isalnum(c) || c == '.' || c == '-' || c == '_' || c == '~' || (c == '/' && encode_slash == false))
dest[dest_off++] = c;
else {
hex_off = 0;
diff --git a/src/H5FDs3comms.h b/src/H5FDs3comms.h
index 49adad9f2b3..120a71a9c85 100644
--- a/src/H5FDs3comms.h
+++ b/src/H5FDs3comms.h
@@ -130,7 +130,7 @@
*
* Format "S3 Credential" string from inputs, for AWS4.
*
- * Wrapper for HDsnprintf().
+ * Wrapper for snprintf().
*
* _HAS NO ERROR-CHECKING FACILITIES_
* It is left to programmer to ensure that return value confers success.
@@ -153,8 +153,8 @@
*---------------------------------------------------------------------------
*/
#define S3COMMS_FORMAT_CREDENTIAL(dest, access, iso8601_date, region, service) \
- HDsnprintf((dest), S3COMMS_MAX_CREDENTIAL_SIZE, "%s/%s/%s/%s/aws4_request", (access), (iso8601_date), \
- (region), (service))
+ snprintf((dest), S3COMMS_MAX_CREDENTIAL_SIZE, "%s/%s/%s/%s/aws4_request", (access), (iso8601_date), \
+ (region), (service))
/*********************
* PUBLIC STRUCTURES *
@@ -523,8 +523,7 @@ H5_DLL struct tm *gmnow(void);
H5_DLL herr_t H5FD_s3comms_aws_canonical_request(char *canonical_request_dest, int cr_size,
char *signed_headers_dest, int sh_size, hrb_t *http_request);
-H5_DLL herr_t H5FD_s3comms_bytes_to_hex(char *dest, const unsigned char *msg, size_t msg_len,
- hbool_t lowercase);
+H5_DLL herr_t H5FD_s3comms_bytes_to_hex(char *dest, const unsigned char *msg, size_t msg_len, bool lowercase);
H5_DLL herr_t H5FD_s3comms_free_purl(parsed_url_t *purl);
@@ -548,7 +547,7 @@ H5_DLL herr_t H5FD_s3comms_tostringtosign(char *dest, const char *req_str, const
H5_DLL herr_t H5FD_s3comms_trim(char *dest, char *s, size_t s_len, size_t *n_written);
-H5_DLL herr_t H5FD_s3comms_uriencode(char *dest, const char *s, size_t s_len, hbool_t encode_slash,
+H5_DLL herr_t H5FD_s3comms_uriencode(char *dest, const char *s, size_t s_len, bool encode_slash,
size_t *n_written);
#ifdef __cplusplus
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c
index a964a6970c6..29616842c15 100644
--- a/src/H5FDsec2.c
+++ b/src/H5FDsec2.c
@@ -55,7 +55,7 @@ typedef struct H5FD_sec2_t {
haddr_t eof; /* end of file; current file size */
haddr_t pos; /* current file I/O position */
H5FD_file_op_t op; /* last operation */
- hbool_t ignore_disabled_file_locks;
+ bool ignore_disabled_file_locks;
char filename[H5FD_MAX_FILENAME_LEN]; /* Copy of file name from open operation */
#ifndef H5_HAVE_WIN32_API
/* On most systems the combination of device and i-node number uniquely
@@ -93,7 +93,7 @@ typedef struct H5FD_sec2_t {
* Whether to eliminate the family driver info and convert this file to
* a single file.
*/
- hbool_t fam_to_single;
+ bool fam_to_single;
} H5FD_sec2_t;
/*
@@ -131,8 +131,8 @@ static herr_t H5FD__sec2_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, ha
void *buf);
static herr_t H5FD__sec2_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, size_t size,
const void *buf);
-static herr_t H5FD__sec2_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
-static herr_t H5FD__sec2_lock(H5FD_t *_file, hbool_t rw);
+static herr_t H5FD__sec2_truncate(H5FD_t *_file, hid_t dxpl_id, bool closing);
+static herr_t H5FD__sec2_lock(H5FD_t *_file, bool rw);
static herr_t H5FD__sec2_unlock(H5FD_t *_file);
static herr_t H5FD__sec2_delete(const char *filename, hid_t fapl_id);
static herr_t H5FD__sec2_ctl(H5FD_t *_file, uint64_t op_code, uint64_t flags, const void *input,
@@ -204,16 +204,16 @@ H5FD_sec2_init(void)
FUNC_ENTER_NOAPI_NOERR
/* Check the use disabled file locks environment variable */
- lock_env_var = HDgetenv(HDF5_USE_FILE_LOCKING);
- if (lock_env_var && !HDstrcmp(lock_env_var, "BEST_EFFORT"))
- ignore_disabled_file_locks_s = TRUE; /* Override: Ignore disabled locks */
- else if (lock_env_var && (!HDstrcmp(lock_env_var, "TRUE") || !HDstrcmp(lock_env_var, "1")))
- ignore_disabled_file_locks_s = FALSE; /* Override: Don't ignore disabled locks */
+ lock_env_var = getenv(HDF5_USE_FILE_LOCKING);
+ if (lock_env_var && !strcmp(lock_env_var, "BEST_EFFORT"))
+ ignore_disabled_file_locks_s = true; /* Override: Ignore disabled locks */
+ else if (lock_env_var && (!strcmp(lock_env_var, "TRUE") || !strcmp(lock_env_var, "1")))
+ ignore_disabled_file_locks_s = false; /* Override: Don't ignore disabled locks */
else
ignore_disabled_file_locks_s = FAIL; /* Environment variable not set, or not set correctly */
if (H5I_VFL != H5I_get_type(H5FD_SEC2_g))
- H5FD_SEC2_g = H5FD_register(&H5FD_sec2_g, sizeof(H5FD_class_t), FALSE);
+ H5FD_SEC2_g = H5FD_register(&H5FD_sec2_g, sizeof(H5FD_class_t), false);
/* Set return value */
ret_value = H5FD_SEC2_g;
@@ -323,7 +323,7 @@ H5FD__sec2_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr
HGOTO_ERROR(
H5E_FILE, H5E_CANTOPENFILE, NULL,
"unable to open file: name = '%s', errno = %d, error message = '%s', flags = %x, o_flags = %x",
- name, myerrno, HDstrerror(myerrno), flags, (unsigned)o_flags);
+ name, myerrno, strerror(myerrno), flags, (unsigned)o_flags);
} /* end if */
if (HDfstat(fd, &sb) < 0)
@@ -368,7 +368,7 @@ H5FD__sec2_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr
}
/* Retain a copy of the name used to open the file, for possible error reporting */
- HDstrncpy(file->filename, name, sizeof(file->filename));
+ strncpy(file->filename, name, sizeof(file->filename));
file->filename[sizeof(file->filename) - 1] = '\0';
/* Check for non-default FAPL */
@@ -703,7 +703,7 @@ H5FD__sec2_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
"file read failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, "
"error message = '%s', buf = %p, total read size = %llu, bytes this sub-read = %llu, "
"bytes actually read = %llu, offset = %llu",
- HDctime(&mytime), file->filename, file->fd, myerrno, HDstrerror(myerrno), buf,
+ HDctime(&mytime), file->filename, file->fd, myerrno, strerror(myerrno), buf,
(unsigned long long)size, (unsigned long long)bytes_in,
(unsigned long long)bytes_read, (unsigned long long)offset);
} /* end if */
@@ -809,7 +809,7 @@ H5FD__sec2_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UN
"file write failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, "
"error message = '%s', buf = %p, total write size = %llu, bytes this sub-write = "
"%llu, bytes actually written = %llu, offset = %llu",
- HDctime(&mytime), file->filename, file->fd, myerrno, HDstrerror(myerrno), buf,
+ HDctime(&mytime), file->filename, file->fd, myerrno, strerror(myerrno), buf,
(unsigned long long)size, (unsigned long long)bytes_in,
(unsigned long long)bytes_wrote, (unsigned long long)offset);
} /* end if */
@@ -849,7 +849,7 @@ H5FD__sec2_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UN
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD__sec2_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_UNUSED closing)
+H5FD__sec2_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, bool H5_ATTR_UNUSED closing)
{
H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
@@ -908,15 +908,15 @@ H5FD__sec2_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR
*
* Purpose: To place an advisory lock on a file.
* The lock type to apply depends on the parameter "rw":
- * TRUE--opens for write: an exclusive lock
- * FALSE--opens for read: a shared lock
+ * true--opens for write: an exclusive lock
+ * false--opens for read: a shared lock
*
* Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD__sec2_lock(H5FD_t *_file, hbool_t rw)
+H5FD__sec2_lock(H5FD_t *_file, bool rw)
{
H5FD_sec2_t *file = (H5FD_sec2_t *)_file; /* VFD file struct */
int lock_flags; /* file locking flags */
diff --git a/src/H5FDspace.c b/src/H5FDspace.c
index 364a449c1e0..6e658bca794 100644
--- a/src/H5FDspace.c
+++ b/src/H5FDspace.c
@@ -134,7 +134,7 @@ H5FD__alloc_real(H5FD_t *file, H5FD_mem_t type, hsize_t size, haddr_t *frag_addr
haddr_t eoa; /* Address of end-of-allocated space */
hsize_t extra; /* Extra space to allocate, to align request */
unsigned long flags = 0; /* Driver feature flags */
- hbool_t use_alloc_size; /* Just pass alloc size to the driver */
+ bool use_alloc_size; /* Just pass alloc size to the driver */
haddr_t ret_value = HADDR_UNDEF; /* Return value */
FUNC_ENTER_PACKAGE
@@ -374,8 +374,8 @@ H5FD_free(H5FD_t *file, H5FD_mem_t type, H5F_t *f, haddr_t addr, hsize_t size)
* marking an entry dirty without a H5F_t*, this routine should
* be changed to take a H5F_super_t* directly.
*
- * Return: Success: TRUE(1) - Block was extended
- * FALSE(0) - Block could not be extended
+ * Return: Success: true(1) - Block was extended
+ * false(0) - Block could not be extended
* Failure: FAIL
*
*-------------------------------------------------------------------------
@@ -384,7 +384,7 @@ htri_t
H5FD_try_extend(H5FD_t *file, H5FD_mem_t type, H5F_t *f, haddr_t blk_end, hsize_t extra_requested)
{
haddr_t eoa; /* End of allocated space in file */
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -413,7 +413,7 @@ H5FD_try_extend(H5FD_t *file, H5FD_mem_t type, H5F_t *f, haddr_t blk_end, hsize_
HGOTO_ERROR(H5E_VFL, H5E_CANTMARKDIRTY, FAIL, "unable to mark EOA info as dirty");
/* Indicate success */
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
} /* end if */
done:
diff --git a/src/H5FDsplitter.c b/src/H5FDsplitter.c
index cf893f31e90..723b1915289 100644
--- a/src/H5FDsplitter.c
+++ b/src/H5FDsplitter.c
@@ -34,11 +34,11 @@ static hid_t H5FD_SPLITTER_g = 0;
/* Driver-specific file access properties */
typedef struct H5FD_splitter_fapl_t {
- hid_t rw_fapl_id; /* fapl for the R/W channel */
- hid_t wo_fapl_id; /* fapl for the W/O channel */
- char wo_path[H5FD_SPLITTER_PATH_MAX + 1]; /* file name for the W/O channel */
- char log_file_path[H5FD_SPLITTER_PATH_MAX + 1]; /* file to record errors reported by the W/O channel */
- hbool_t ignore_wo_errs; /* TRUE to ignore errors on the W/O channel */
+ hid_t rw_fapl_id; /* fapl for the R/W channel */
+ hid_t wo_fapl_id; /* fapl for the W/O channel */
+ char wo_path[H5FD_SPLITTER_PATH_MAX + 1]; /* file name for the W/O channel */
+ char log_file_path[H5FD_SPLITTER_PATH_MAX + 1]; /* file to record errors reported by the W/O channel */
+ bool ignore_wo_errs; /* true to ignore errors on the W/O channel */
} H5FD_splitter_fapl_t;
/* The information of this splitter */
@@ -80,7 +80,7 @@ typedef struct H5FD_splitter_t {
#define H5FD_SPLITTER_WO_ERROR(file, funcname, errmajor, errminor, ret, mesg) \
{ \
H5FD__splitter_log_error((file), (funcname), (mesg)); \
- if (FALSE == (file)->fa.ignore_wo_errs) \
+ if (false == (file)->fa.ignore_wo_errs) \
HGOTO_ERROR((errmajor), (errminor), (ret), (mesg)); \
}
@@ -129,9 +129,9 @@ static herr_t H5FD__splitter_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id
void *buf);
static herr_t H5FD__splitter_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
const void *buf);
-static herr_t H5FD__splitter_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
-static herr_t H5FD__splitter_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
-static herr_t H5FD__splitter_lock(H5FD_t *_file, hbool_t rw);
+static herr_t H5FD__splitter_flush(H5FD_t *_file, hid_t dxpl_id, bool closing);
+static herr_t H5FD__splitter_truncate(H5FD_t *_file, hid_t dxpl_id, bool closing);
+static herr_t H5FD__splitter_lock(H5FD_t *_file, bool rw);
static herr_t H5FD__splitter_unlock(H5FD_t *_file);
static herr_t H5FD__splitter_delete(const char *filename, hid_t fapl_id);
static herr_t H5FD__splitter_ctl(H5FD_t *_file, uint64_t op_code, uint64_t flags, const void *input,
@@ -255,14 +255,14 @@ H5FD__copy_plist(hid_t fapl_id, hid_t *id_out_ptr)
assert(id_out_ptr != NULL);
- if (FALSE == H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
+ if (false == H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, -1, "not a file access property list");
plist_ptr = (H5P_genplist_t *)H5I_object(fapl_id);
if (NULL == plist_ptr)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, -1, "unable to get property list");
- *id_out_ptr = H5P_copy_plist(plist_ptr, FALSE);
+ *id_out_ptr = H5P_copy_plist(plist_ptr, false);
if (H5I_INVALID_HID == *id_out_ptr)
HGOTO_ERROR(H5E_VFL, H5E_BADTYPE, -1, "unable to copy file access property list");
@@ -340,7 +340,7 @@ H5Pget_fapl_splitter(hid_t fapl_id, H5FD_splitter_vfd_config_t *config /*out*/)
H5FD_SPLITTER_LOG_CALL(__func__);
/* Check arguments */
- if (TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
+ if (true != H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
if (config == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "config pointer is null");
@@ -367,8 +367,8 @@ H5Pget_fapl_splitter(hid_t fapl_id, H5FD_splitter_vfd_config_t *config /*out*/)
fapl_ptr = default_fapl;
}
- HDstrncpy(config->wo_path, fapl_ptr->wo_path, H5FD_SPLITTER_PATH_MAX + 1);
- HDstrncpy(config->log_file_path, fapl_ptr->log_file_path, H5FD_SPLITTER_PATH_MAX + 1);
+ strncpy(config->wo_path, fapl_ptr->wo_path, H5FD_SPLITTER_PATH_MAX + 1);
+ strncpy(config->log_file_path, fapl_ptr->log_file_path, H5FD_SPLITTER_PATH_MAX + 1);
config->ignore_wo_errs = fapl_ptr->ignore_wo_errs;
/* Copy R/W and W/O FAPLs */
@@ -399,7 +399,7 @@ H5FD__splitter_populate_config(H5FD_splitter_vfd_config_t *vfd_config, H5FD_spli
{
H5P_genplist_t *def_plist;
H5P_genplist_t *plist;
- hbool_t free_config = FALSE;
+ bool free_config = false;
herr_t ret_value = SUCCEED;
FUNC_ENTER_PACKAGE
@@ -418,7 +418,7 @@ H5FD__splitter_populate_config(H5FD_splitter_vfd_config_t *vfd_config, H5FD_spli
vfd_config->rw_fapl_id = H5P_DEFAULT;
vfd_config->wo_fapl_id = H5P_DEFAULT;
- free_config = TRUE;
+ free_config = true;
}
/* Make sure that the W/O channel supports write-only capability.
@@ -448,9 +448,9 @@ H5FD__splitter_populate_config(H5FD_splitter_vfd_config_t *vfd_config, H5FD_spli
} /* end if W/O VFD is non-default */
fapl_out->ignore_wo_errs = vfd_config->ignore_wo_errs;
- HDstrncpy(fapl_out->wo_path, vfd_config->wo_path, H5FD_SPLITTER_PATH_MAX + 1);
+ strncpy(fapl_out->wo_path, vfd_config->wo_path, H5FD_SPLITTER_PATH_MAX + 1);
fapl_out->wo_path[H5FD_SPLITTER_PATH_MAX] = '\0';
- HDstrncpy(fapl_out->log_file_path, vfd_config->log_file_path, H5FD_SPLITTER_PATH_MAX + 1);
+ strncpy(fapl_out->log_file_path, vfd_config->log_file_path, H5FD_SPLITTER_PATH_MAX + 1);
fapl_out->log_file_path[H5FD_SPLITTER_PATH_MAX] = '\0';
fapl_out->rw_fapl_id = H5P_FILE_ACCESS_DEFAULT; /* pre-set value */
fapl_out->wo_fapl_id = H5P_FILE_ACCESS_DEFAULT; /* pre-set value */
@@ -460,7 +460,7 @@ H5FD__splitter_populate_config(H5FD_splitter_vfd_config_t *vfd_config, H5FD_spli
/* Set non-default channel FAPL IDs in splitter configuration info */
if (H5P_DEFAULT != vfd_config->rw_fapl_id) {
- if (FALSE == H5P_isa_class(vfd_config->rw_fapl_id, H5P_FILE_ACCESS))
+ if (false == H5P_isa_class(vfd_config->rw_fapl_id, H5P_FILE_ACCESS))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list");
fapl_out->rw_fapl_id = vfd_config->rw_fapl_id;
}
@@ -470,15 +470,15 @@ H5FD__splitter_populate_config(H5FD_splitter_vfd_config_t *vfd_config, H5FD_spli
* driver might have been replaced with the Splitter VFD, which
* would cause recursion badness.
*/
- if ((fapl_out->rw_fapl_id = H5P_copy_plist(def_plist, FALSE)) < 0)
+ if ((fapl_out->rw_fapl_id = H5P_copy_plist(def_plist, false)) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTCOPY, FAIL, "can't copy property list");
if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_out->rw_fapl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
- if (H5P_set_driver_by_value(plist, H5_VFD_SEC2, NULL, TRUE) < 0)
+ if (H5P_set_driver_by_value(plist, H5_VFD_SEC2, NULL, true) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "can't set default driver on R/W channel FAPL");
}
if (H5P_DEFAULT != vfd_config->wo_fapl_id) {
- if (FALSE == H5P_isa_class(vfd_config->wo_fapl_id, H5P_FILE_ACCESS))
+ if (false == H5P_isa_class(vfd_config->wo_fapl_id, H5P_FILE_ACCESS))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list");
fapl_out->wo_fapl_id = vfd_config->wo_fapl_id;
}
@@ -488,11 +488,11 @@ H5FD__splitter_populate_config(H5FD_splitter_vfd_config_t *vfd_config, H5FD_spli
* driver might have been replaced with the Splitter VFD, which
* would cause recursion badness.
*/
- if ((fapl_out->wo_fapl_id = H5P_copy_plist(def_plist, FALSE)) < 0)
+ if ((fapl_out->wo_fapl_id = H5P_copy_plist(def_plist, false)) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTCOPY, FAIL, "can't copy property list");
if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_out->wo_fapl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
- if (H5P_set_driver_by_value(plist, H5_VFD_SEC2, NULL, TRUE) < 0)
+ if (H5P_set_driver_by_value(plist, H5_VFD_SEC2, NULL, true) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "can't set default driver on R/W channel FAPL");
}
@@ -527,32 +527,32 @@ H5FD__splitter_get_default_wo_path(char *new_path, size_t new_path_len, const ch
assert(base_filename);
/* Check that output buffer can hold base filename + `_wo` suffix */
- old_filename_len = HDstrlen(base_filename);
- if (old_filename_len > H5FD_SPLITTER_PATH_MAX - HDstrlen(suffix) - 1)
+ old_filename_len = strlen(base_filename);
+ if (old_filename_len > H5FD_SPLITTER_PATH_MAX - strlen(suffix) - 1)
HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "filename exceeds max length");
/* Determine if filename contains a ".h5" extension. */
- if ((file_extension = HDstrstr(base_filename, ".h5"))) {
+ if ((file_extension = strstr(base_filename, ".h5"))) {
/* Insert the suffix between the filename and ".h5" extension. */
- HDstrcpy(new_path, base_filename);
- file_extension = HDstrstr(new_path, ".h5");
- HDsprintf(file_extension, "%s%s", suffix, ".h5");
+ strcpy(new_path, base_filename);
+ file_extension = strstr(new_path, ".h5");
+ sprintf(file_extension, "%s%s", suffix, ".h5");
}
- else if ((file_extension = HDstrrchr(base_filename, '.'))) {
+ else if ((file_extension = strrchr(base_filename, '.'))) {
char *new_extension_loc = NULL;
/* If the filename doesn't contain a ".h5" extension, but contains
* AN extension, just insert the suffix before that extension.
*/
- HDstrcpy(new_path, base_filename);
- new_extension_loc = HDstrrchr(new_path, '.');
- HDsprintf(new_extension_loc, "%s%s", suffix, file_extension);
+ strcpy(new_path, base_filename);
+ new_extension_loc = strrchr(new_path, '.');
+ sprintf(new_extension_loc, "%s%s", suffix, file_extension);
}
else {
/* If the filename doesn't contain an extension at all, just insert
* the suffix at the end of the filename.
*/
- HDsnprintf(new_path, new_path_len, "%s%s", base_filename, suffix);
+ snprintf(new_path, new_path_len, "%s%s", base_filename, suffix);
}
done:
@@ -568,7 +568,7 @@ H5FD__splitter_get_default_wo_path(char *new_path, size_t new_path_len, const ch
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD__splitter_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
+H5FD__splitter_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, bool closing)
{
H5FD_splitter_t *file = (H5FD_splitter_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
@@ -720,8 +720,8 @@ H5FD__splitter_fapl_copy(const void *_old_fa)
HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "unable to allocate log file FAPL");
H5MM_memcpy(new_fa_ptr, old_fa_ptr, sizeof(H5FD_splitter_fapl_t));
- HDstrncpy(new_fa_ptr->wo_path, old_fa_ptr->wo_path, H5FD_SPLITTER_PATH_MAX + 1);
- HDstrncpy(new_fa_ptr->log_file_path, old_fa_ptr->log_file_path, H5FD_SPLITTER_PATH_MAX + 1);
+ strncpy(new_fa_ptr->wo_path, old_fa_ptr->wo_path, H5FD_SPLITTER_PATH_MAX + 1);
+ strncpy(new_fa_ptr->log_file_path, old_fa_ptr->log_file_path, H5FD_SPLITTER_PATH_MAX + 1);
/* Copy R/W and W/O FAPLs */
if (H5FD__copy_plist(old_fa_ptr->rw_fapl_id, &(new_fa_ptr->rw_fapl_id)) < 0)
@@ -833,8 +833,8 @@ H5FD__splitter_open(const char *name, unsigned flags, hid_t splitter_fapl_id, ha
}
/* Copy simpler info */
- HDstrncpy(file_ptr->fa.wo_path, fapl_ptr->wo_path, H5FD_SPLITTER_PATH_MAX + 1);
- HDstrncpy(file_ptr->fa.log_file_path, fapl_ptr->log_file_path, H5FD_SPLITTER_PATH_MAX + 1);
+ strncpy(file_ptr->fa.wo_path, fapl_ptr->wo_path, H5FD_SPLITTER_PATH_MAX + 1);
+ strncpy(file_ptr->fa.log_file_path, fapl_ptr->log_file_path, H5FD_SPLITTER_PATH_MAX + 1);
file_ptr->fa.ignore_wo_errs = fapl_ptr->ignore_wo_errs;
/* Copy R/W and W/O channel FAPLs. */
@@ -1046,7 +1046,7 @@ H5FD__splitter_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD__splitter_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
+H5FD__splitter_truncate(H5FD_t *_file, hid_t dxpl_id, bool closing)
{
H5FD_splitter_t *file = (H5FD_splitter_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
@@ -1232,7 +1232,7 @@ H5FD__splitter_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_
*--------------------------------------------------------------------------
*/
static herr_t
-H5FD__splitter_lock(H5FD_t *_file, hbool_t rw)
+H5FD__splitter_lock(H5FD_t *_file, bool rw)
{
H5FD_splitter_t *file = (H5FD_splitter_t *)_file; /* VFD file struct */
herr_t ret_value = SUCCEED; /* Return value */
@@ -1575,11 +1575,11 @@ H5FD__splitter_log_error(const H5FD_splitter_t *file, const char *atfunc, const
size_t size;
char *s;
- size = HDstrlen(atfunc) + HDstrlen(msg) + 3; /* ':', ' ', '\n' */
+ size = strlen(atfunc) + strlen(msg) + 3; /* ':', ' ', '\n' */
s = (char *)H5MM_malloc(sizeof(char) * (size + 1));
if (NULL == s)
ret_value = FAIL;
- else if (size < (size_t)HDsnprintf(s, size + 1, "%s: %s\n", atfunc, msg))
+ else if (size < (size_t)snprintf(s, size + 1, "%s: %s\n", atfunc, msg))
ret_value = FAIL;
else if (size != fwrite(s, 1, size, file->logfp))
ret_value = FAIL;
diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c
index e58315732b0..11975bf709c 100644
--- a/src/H5FDstdio.c
+++ b/src/H5FDstdio.c
@@ -83,7 +83,7 @@ typedef struct H5FD_stdio_t {
haddr_t eof; /* end of file; current file size */
haddr_t pos; /* current file I/O position */
unsigned write_access; /* Flag to indicate the file was opened with write access */
- hbool_t ignore_disabled_file_locks;
+ bool ignore_disabled_file_locks;
H5FD_stdio_file_op op; /* last operation */
#ifndef H5_HAVE_WIN32_API
/* On most systems the combination of device and i-node number uniquely
@@ -174,9 +174,9 @@ static herr_t H5FD_stdio_read(H5FD_t *lf, H5FD_mem_t type, hid_t fapl_id, haddr
void *buf);
static herr_t H5FD_stdio_write(H5FD_t *lf, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, size_t size,
const void *buf);
-static herr_t H5FD_stdio_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
-static herr_t H5FD_stdio_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
-static herr_t H5FD_stdio_lock(H5FD_t *_file, hbool_t rw);
+static herr_t H5FD_stdio_flush(H5FD_t *_file, hid_t dxpl_id, bool closing);
+static herr_t H5FD_stdio_truncate(H5FD_t *_file, hid_t dxpl_id, bool closing);
+static herr_t H5FD_stdio_lock(H5FD_t *_file, bool rw);
static herr_t H5FD_stdio_unlock(H5FD_t *_file);
static herr_t H5FD_stdio_delete(const char *filename, hid_t fapl_id);
@@ -412,7 +412,7 @@ H5FD_stdio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr
/* The environment variable was set, so use that preferentially */
file->ignore_disabled_file_locks = ignore_disabled_file_locks_s;
else {
- hbool_t unused;
+ bool unused;
/* Use the value in the property list */
if (H5Pget_file_locking(fapl_id, &unused, &file->ignore_disabled_file_locks) < 0) {
@@ -946,7 +946,7 @@ H5FD_stdio_write(H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type, hid_t /*UNUSED*/ dxp
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_stdio_flush(H5FD_t *_file, hid_t /*UNUSED*/ dxpl_id, hbool_t closing)
+H5FD_stdio_flush(H5FD_t *_file, hid_t /*UNUSED*/ dxpl_id, bool closing)
{
H5FD_stdio_t *file = (H5FD_stdio_t *)_file;
static const char *func = "H5FD_stdio_flush"; /* Function Name for error reporting */
@@ -987,7 +987,7 @@ H5FD_stdio_flush(H5FD_t *_file, hid_t /*UNUSED*/ dxpl_id, hbool_t closing)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_stdio_truncate(H5FD_t *_file, hid_t /*UNUSED*/ dxpl_id, hbool_t /*UNUSED*/ closing)
+H5FD_stdio_truncate(H5FD_t *_file, hid_t /*UNUSED*/ dxpl_id, bool /*UNUSED*/ closing)
{
H5FD_stdio_t *file = (H5FD_stdio_t *)_file;
static const char *func = "H5FD_stdio_truncate"; /* Function Name for error reporting */
@@ -1075,7 +1075,7 @@ H5FD_stdio_truncate(H5FD_t *_file, hid_t /*UNUSED*/ dxpl_id, hbool_t /*UNUSED*/
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_stdio_lock(H5FD_t *_file, hbool_t rw)
+H5FD_stdio_lock(H5FD_t *_file, bool rw)
{
#ifdef H5_HAVE_FLOCK
H5FD_stdio_t *file = (H5FD_stdio_t *)_file; /* VFD file struct */
diff --git a/src/H5FDsubfiling/H5FDioc.c b/src/H5FDsubfiling/H5FDioc.c
index 81ad0e70f82..39766de6594 100644
--- a/src/H5FDsubfiling/H5FDioc.c
+++ b/src/H5FDsubfiling/H5FDioc.c
@@ -32,11 +32,13 @@
#include "H5MMprivate.h" /* Memory management */
#include "H5Pprivate.h" /* Property lists */
+#define CANBE_UNUSED(X) (void)(X)
+
/* The driver identification number, initialized at runtime */
static hid_t H5FD_IOC_g = H5I_INVALID_HID;
/* Whether the driver initialized MPI on its own */
-static hbool_t H5FD_mpi_self_initialized = FALSE;
+static bool H5FD_mpi_self_initialized = false;
/* Pointer to value for MPI_TAG_UB */
int *H5FD_IOC_tag_ub_val_ptr = NULL;
@@ -126,9 +128,9 @@ static herr_t H5FD__ioc_read_vector(H5FD_t *file, hid_t dxpl_id, uint32_t count
haddr_t addrs[], size_t sizes[], void *bufs[] /* out */);
static herr_t H5FD__ioc_write_vector(H5FD_t *file, hid_t dxpl_id, uint32_t count, H5FD_mem_t types[],
haddr_t addrs[], size_t sizes[], const void *bufs[] /* in */);
-static herr_t H5FD__ioc_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
-static herr_t H5FD__ioc_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
-static herr_t H5FD__ioc_lock(H5FD_t *_file, hbool_t rw);
+static herr_t H5FD__ioc_flush(H5FD_t *_file, hid_t dxpl_id, bool closing);
+static herr_t H5FD__ioc_truncate(H5FD_t *_file, hid_t dxpl_id, bool closing);
+static herr_t H5FD__ioc_lock(H5FD_t *_file, bool rw);
static herr_t H5FD__ioc_unlock(H5FD_t *_file);
static herr_t H5FD__ioc_del(const char *name, hid_t fapl);
/*
@@ -219,12 +221,12 @@ H5FD_ioc_init(void)
int key_val_retrieved = 0;
int mpi_code;
- if ((H5FD_IOC_g = H5FD_register(&H5FD_ioc_g, sizeof(H5FD_class_t), FALSE)) < 0)
+ if ((H5FD_IOC_g = H5FD_register(&H5FD_ioc_g, sizeof(H5FD_class_t), false)) < 0)
H5_SUBFILING_GOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "can't register IOC VFD");
/* Check if IOC VFD has been loaded dynamically */
- env_var = HDgetenv(HDF5_DRIVER);
- if (env_var && !HDstrcmp(env_var, H5FD_IOC_NAME)) {
+ env_var = getenv(HDF5_DRIVER);
+ if (env_var && !strcmp(env_var, H5FD_IOC_NAME)) {
int mpi_initialized = 0;
int provided = 0;
@@ -247,7 +249,7 @@ H5FD_ioc_init(void)
if (MPI_SUCCESS != (mpi_code = MPI_Init_thread(NULL, NULL, required, &provided)))
H5_SUBFILING_MPI_GOTO_ERROR(H5I_INVALID_HID, "MPI_Init_thread failed", mpi_code);
- H5FD_mpi_self_initialized = TRUE;
+ H5FD_mpi_self_initialized = true;
if (provided != required)
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTINIT, H5I_INVALID_HID,
@@ -299,7 +301,7 @@ H5FD__ioc_term(void)
H5_SUBFILING_MPI_GOTO_ERROR(FAIL, "MPI_Finalize failed", mpi_code);
}
- H5FD_mpi_self_initialized = FALSE;
+ H5FD_mpi_self_initialized = false;
}
}
@@ -373,7 +375,7 @@ H5Pget_fapl_ioc(hid_t fapl_id, H5FD_ioc_config_t *config_out)
{
const H5FD_ioc_config_t *config_ptr = NULL;
H5P_genplist_t *plist_ptr = NULL;
- hbool_t use_default_config = FALSE;
+ bool use_default_config = false;
herr_t ret_value = SUCCEED;
H5FD_IOC_LOG_CALL(__func__);
@@ -386,11 +388,11 @@ H5Pget_fapl_ioc(hid_t fapl_id, H5FD_ioc_config_t *config_out)
H5_SUBFILING_GOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
if (H5FD_IOC != H5P_peek_driver(plist_ptr))
- use_default_config = TRUE;
+ use_default_config = true;
else {
config_ptr = H5P_peek_driver_info(plist_ptr);
if (NULL == config_ptr)
- use_default_config = TRUE;
+ use_default_config = true;
}
if (use_default_config) {
@@ -399,7 +401,7 @@ H5Pget_fapl_ioc(hid_t fapl_id, H5FD_ioc_config_t *config_out)
}
else {
/* Copy the IOC fapl data out */
- memcpy(config_out, config_ptr, sizeof(H5FD_ioc_config_t));
+ H5MM_memcpy(config_out, config_ptr, sizeof(H5FD_ioc_config_t));
}
done:
@@ -528,7 +530,7 @@ H5FD__ioc_sb_encode(H5FD_t *_file, char *name, unsigned char *buf)
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get subfiling context object");
/* Encode driver name */
- HDstrncpy(name, "IOC", 9);
+ strncpy(name, "IOC", 9);
name[8] = '\0';
/* Encode configuration structure magic number */
@@ -573,7 +575,7 @@ H5FD__ioc_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf)
if (NULL == (sf_context = H5_get_subfiling_object(file->context_id)))
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get subfiling context object");
- if (HDstrncmp(name, "IOC", 9))
+ if (strncmp(name, "IOC", 9))
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "invalid driver name in superblock");
/* Decode configuration structure magic number */
@@ -666,7 +668,7 @@ H5FD__ioc_fapl_copy(const void *_old_fa)
if (NULL == new_fa_ptr)
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "unable to allocate log file FAPL");
- memcpy(new_fa_ptr, old_fa_ptr, sizeof(H5FD_ioc_config_t));
+ H5MM_memcpy(new_fa_ptr, old_fa_ptr, sizeof(H5FD_ioc_config_t));
ret_value = (void *)new_fa_ptr;
@@ -790,7 +792,7 @@ H5FD__ioc_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
}
/* Fill in the file config values */
- memcpy(&file_ptr->fa, config_ptr, sizeof(H5FD_ioc_config_t));
+ H5MM_memcpy(&file_ptr->fa, config_ptr, sizeof(H5FD_ioc_config_t));
/* Fully resolve the given filepath and get its dirname */
if (H5_resolve_pathname(name, file_ptr->comm, &file_ptr->file_path) < 0)
@@ -1223,6 +1225,7 @@ H5FD__ioc_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUS
H5FD_IOC_LOG_CALL(__func__);
assert(file && file->pub.cls);
+ CANBE_UNUSED(file);
assert(buf);
/* Check for overflow conditions */
@@ -1293,7 +1296,7 @@ H5FD__ioc_read_vector(H5FD_t *_file, hid_t dxpl_id, uint32_t count, H5FD_mem_t t
dxpl_id = H5P_DATASET_XFER_DEFAULT;
}
else {
- if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ if (true != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
H5_SUBFILING_GOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list");
}
@@ -1336,7 +1339,7 @@ H5FD__ioc_write_vector(H5FD_t *_file, hid_t dxpl_id, uint32_t count, H5FD_mem_t
dxpl_id = H5P_DATASET_XFER_DEFAULT;
}
else {
- if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ if (true != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
H5_SUBFILING_GOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list");
}
@@ -1355,7 +1358,7 @@ H5FD__ioc_write_vector(H5FD_t *_file, hid_t dxpl_id, uint32_t count, H5FD_mem_t
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD__ioc_flush(H5FD_t H5_ATTR_UNUSED *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_UNUSED closing)
+H5FD__ioc_flush(H5FD_t H5_ATTR_UNUSED *_file, hid_t H5_ATTR_UNUSED dxpl_id, bool H5_ATTR_UNUSED closing)
{
herr_t ret_value = SUCCEED;
@@ -1375,7 +1378,7 @@ H5FD__ioc_flush(H5FD_t H5_ATTR_UNUSED *_file, hid_t H5_ATTR_UNUSED dxpl_id, hboo
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD__ioc_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_UNUSED closing)
+H5FD__ioc_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, bool H5_ATTR_UNUSED closing)
{
H5FD_ioc_t *file = (H5FD_ioc_t *)_file;
herr_t ret_value = SUCCEED;
@@ -1401,7 +1404,7 @@ H5FD__ioc_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_
*--------------------------------------------------------------------------
*/
static herr_t
-H5FD__ioc_lock(H5FD_t H5_ATTR_UNUSED *_file, hbool_t H5_ATTR_UNUSED rw)
+H5FD__ioc_lock(H5FD_t H5_ATTR_UNUSED *_file, bool H5_ATTR_UNUSED rw)
{
herr_t ret_value = SUCCEED;
@@ -1491,12 +1494,12 @@ H5FD__ioc_del(const char *name, hid_t fapl)
"can't allocate config file name buffer");
/* Check if a prefix has been set for the configuration file name */
- prefix_env = HDgetenv(H5FD_SUBFILING_CONFIG_FILE_PREFIX);
+ prefix_env = getenv(H5FD_SUBFILING_CONFIG_FILE_PREFIX);
/* TODO: No support for subfile directory prefix currently */
/* TODO: Possibly try loading config file prefix from file before deleting */
- HDsnprintf(tmp_filename, PATH_MAX, "%s/" H5FD_SUBFILING_CONFIG_FILENAME_TEMPLATE,
- prefix_env ? prefix_env : file_dirname, base_filename, (uint64_t)st.st_ino);
+ snprintf(tmp_filename, PATH_MAX, "%s/" H5FD_SUBFILING_CONFIG_FILENAME_TEMPLATE,
+ prefix_env ? prefix_env : file_dirname, base_filename, (uint64_t)st.st_ino);
if (NULL == (config_file = fopen(tmp_filename, "r"))) {
if (ENOENT == errno) {
@@ -1531,12 +1534,12 @@ H5FD__ioc_del(const char *name, hid_t fapl)
"can't delete subfiling config file");
/* Try to delete each of the subfiles */
- num_digits = (int)(HDlog10(n_subfiles) + 1);
+ num_digits = (int)(log10(n_subfiles) + 1);
for (int i = 0; i < n_subfiles; i++) {
/* TODO: No support for subfile directory prefix currently */
- HDsnprintf(tmp_filename, PATH_MAX, "%s/" H5FD_SUBFILING_FILENAME_TEMPLATE, file_dirname,
- base_filename, (uint64_t)st.st_ino, num_digits, i + 1, n_subfiles);
+ snprintf(tmp_filename, PATH_MAX, "%s/" H5FD_SUBFILING_FILENAME_TEMPLATE, file_dirname,
+ base_filename, (uint64_t)st.st_ino, num_digits, i + 1, n_subfiles);
if (HDremove(tmp_filename) < 0) {
#ifdef H5FD_IOC_DEBUG
diff --git a/src/H5FDsubfiling/H5FDioc_int.c b/src/H5FDsubfiling/H5FDioc_int.c
index d7a62d19d9b..674b08ddf94 100644
--- a/src/H5FDsubfiling/H5FDioc_int.c
+++ b/src/H5FDsubfiling/H5FDioc_int.c
@@ -265,7 +265,7 @@ ioc__read_independent_async(int64_t context_id, int64_t offset, int64_t elements
subfiling_context_t *sf_context = NULL;
MPI_Request ack_request = MPI_REQUEST_NULL;
io_req_t *sf_io_request = NULL;
- hbool_t need_data_tag = FALSE;
+ bool need_data_tag = false;
int64_t ioc_start;
int64_t ioc_offset;
int64_t ioc_subfile_idx;
diff --git a/src/H5FDsubfiling/H5FDioc_priv.h b/src/H5FDsubfiling/H5FDioc_priv.h
index cac2806a6e4..fbce1a0d0f6 100644
--- a/src/H5FDsubfiling/H5FDioc_priv.h
+++ b/src/H5FDsubfiling/H5FDioc_priv.h
@@ -87,7 +87,7 @@ do {
assert((entry_ptr)->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC); \
assert((entry_ptr)->next == NULL); \
assert((entry_ptr)->prev == NULL); \
- assert((entry_ptr)->in_progress == FALSE); \
+ assert((entry_ptr)->in_progress == false); \
\
if ( ((q_ptr)->q_head) == NULL ) \
{ \
@@ -101,7 +101,7 @@ do {
((q_ptr)->q_tail) = (entry_ptr); \
} \
((q_ptr)->q_len)++; \
-} while ( FALSE ) /* H5FD_IOC__Q_APPEND() */
+} while ( false ) /* H5FD_IOC__Q_APPEND() */
#define H5FD_IOC__Q_REMOVE(q_ptr, entry_ptr) \
do { \
@@ -113,7 +113,7 @@ do {
assert((entry_ptr)->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC); \
assert((((q_ptr)->q_len == 1) && ((entry_ptr)->next == NULL) && ((entry_ptr)->prev == NULL)) || \
(((q_ptr)->q_len > 1) && (((entry_ptr)->next != NULL) || ((entry_ptr)->prev != NULL)))); \
- assert((entry_ptr)->in_progress == TRUE); \
+ assert((entry_ptr)->in_progress == true); \
\
{ \
if ( (((q_ptr)->q_head)) == (entry_ptr) ) \
@@ -140,7 +140,7 @@ do {
(entry_ptr)->prev = NULL; \
((q_ptr)->q_len)--; \
} \
-} while ( FALSE ) /* H5FD_IOC__Q_REMOVE() */
+} while ( false ) /* H5FD_IOC__Q_REMOVE() */
/* clang-format on */
@@ -160,8 +160,8 @@ do {
* the IOC I/O Queue. This field points to the previous entry
* in the queue, or NULL if there is no previous entry.
*
- * in_progress: Boolean flag that must be FALSE when the entry is inserted
- * into the IOC I/O Queue, and set to TRUE when the entry is dispatched
+ * in_progress: Boolean flag that must be false when the entry is inserted
+ * into the IOC I/O Queue, and set to true when the entry is dispatched
* to the worker thread pool for execution.
*
* When in_progress is FALS, the entry is said to be pending.
@@ -184,7 +184,7 @@ do {
*
* Statistics:
*
- * The following fields are only defined if H5FD_IOC_COLLECT_STATS is TRUE.
+ * The following fields are only defined if H5FD_IOC_COLLECT_STATS is true.
* They are intended to allow collection of basic statistics on the
* behaviour of the IOC I/O Queue for purposes of debugging and performance
* optimization.
@@ -209,7 +209,7 @@ typedef struct ioc_io_queue_entry {
uint32_t magic;
struct ioc_io_queue_entry *next;
struct ioc_io_queue_entry *prev;
- hbool_t in_progress;
+ bool in_progress;
uint32_t counter;
sf_work_request_t wk_req;
@@ -321,7 +321,7 @@ typedef struct ioc_io_queue_entry {
*
* Statistics:
*
- * The following fields are only defined if H5FD_IOC_COLLECT_STATS is TRUE.
+ * The following fields are only defined if H5FD_IOC_COLLECT_STATS is true.
* They are intended to allow collection of basic statistics on the
* behaviour of the IOC I/O Queue for purposes of debugging and performance
* optimization.
diff --git a/src/H5FDsubfiling/H5FDioc_threads.c b/src/H5FDsubfiling/H5FDioc_threads.c
index f4da503ba2c..c86157bb6f2 100644
--- a/src/H5FDsubfiling/H5FDioc_threads.c
+++ b/src/H5FDsubfiling/H5FDioc_threads.c
@@ -33,15 +33,15 @@ typedef struct ioc_data_t {
hg_thread_pool_t *io_thread_pool;
int64_t sf_context_id;
- /* sf_io_ops_pending is use to track the number of I/O operations pending so that we can wait
+ atomic_int sf_ioc_ready;
+ atomic_int sf_shutdown_flag;
+ /* sf_io_ops_pending tracks the number of I/O operations pending so that we can wait
* until all I/O operations have been serviced before shutting down the worker thread pool.
* The value of this variable must always be non-negative.
*
* Note that this is a convenience variable -- we could use io_queue.q_len instead.
* However, accessing this field requires locking io_queue.q_mutex.
*/
- atomic_int sf_ioc_ready;
- atomic_int sf_shutdown_flag;
atomic_int sf_io_ops_pending;
atomic_int sf_work_pending;
} ioc_data_t;
@@ -85,7 +85,7 @@ static int ioc_file_report_eof(sf_work_request_t *msg, MPI_Comm comm);
static ioc_io_queue_entry_t *ioc_io_queue_alloc_entry(void);
static void ioc_io_queue_complete_entry(ioc_data_t *ioc_data, ioc_io_queue_entry_t *entry_ptr);
-static void ioc_io_queue_dispatch_eligible_entries(ioc_data_t *ioc_data, hbool_t try_lock);
+static void ioc_io_queue_dispatch_eligible_entries(ioc_data_t *ioc_data, bool try_lock);
static void ioc_io_queue_free_entry(ioc_io_queue_entry_t *q_entry_ptr);
static void ioc_io_queue_add_entry(ioc_data_t *ioc_data, sf_work_request_t *wk_req_ptr);
@@ -167,7 +167,7 @@ initialize_ioc_threads(void *_sf_context)
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, (-1), "can't initialize IOC thread queue mutex");
/* Allow experimentation with the number of helper threads */
- if ((env_value = HDgetenv(H5FD_IOC_THREAD_POOL_SIZE)) != NULL) {
+ if ((env_value = getenv(H5FD_IOC_THREAD_POOL_SIZE)) != NULL) {
int value_check = atoi(env_value);
if (value_check > 0) {
thread_pool_size = (unsigned int)value_check;
@@ -654,7 +654,7 @@ ioc_file_queue_write_indep(sf_work_request_t *msg, int ioc_idx, int source, MPI_
{
subfiling_context_t *sf_context = NULL;
MPI_Status msg_status;
- hbool_t send_nack = FALSE;
+ bool send_nack = false;
int64_t file_context_id;
int64_t data_size;
int64_t file_offset;
@@ -686,7 +686,7 @@ ioc_file_queue_write_indep(sf_work_request_t *msg, int ioc_idx, int source, MPI_
subfile_idx = msg->header[2];
if (data_size < 0) {
- send_nack = TRUE;
+ send_nack = true;
H5_SUBFILING_GOTO_ERROR(H5E_IO, H5E_BADVALUE, -1, "invalid data size for write");
}
@@ -719,7 +719,7 @@ ioc_file_queue_write_indep(sf_work_request_t *msg, int ioc_idx, int source, MPI_
/* Allocate space to receive data sent from the client */
if (NULL == (recv_buf = malloc((size_t)data_size))) {
- send_nack = TRUE;
+ send_nack = true;
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, -1, "couldn't allocate receive buffer for data");
}
@@ -839,9 +839,9 @@ static int
ioc_file_queue_read_indep(sf_work_request_t *msg, int ioc_idx, int source, MPI_Comm comm, uint32_t counter)
{
subfiling_context_t *sf_context = NULL;
- hbool_t send_empty_buf = TRUE;
- hbool_t send_nack = FALSE;
- hbool_t need_data_tag = FALSE;
+ bool send_empty_buf = true;
+ bool send_nack = false;
+ bool need_data_tag = false;
int64_t file_context_id;
int64_t data_size;
int64_t file_offset;
@@ -886,8 +886,8 @@ ioc_file_queue_read_indep(sf_work_request_t *msg, int ioc_idx, int source, MPI_C
if (data_size < 0) {
if (need_data_tag) {
- send_nack = TRUE;
- send_empty_buf = FALSE;
+ send_nack = true;
+ send_empty_buf = false;
}
H5_SUBFILING_GOTO_ERROR(H5E_IO, H5E_BADVALUE, -1, "invalid data size for read");
}
@@ -913,8 +913,8 @@ ioc_file_queue_read_indep(sf_work_request_t *msg, int ioc_idx, int source, MPI_C
/* Allocate space to send data read from file to client */
if (NULL == (send_buf = malloc((size_t)data_size))) {
if (need_data_tag) {
- send_nack = TRUE;
- send_empty_buf = FALSE;
+ send_nack = true;
+ send_empty_buf = false;
}
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, -1, "couldn't allocate send buffer for data");
}
@@ -934,7 +934,7 @@ ioc_file_queue_read_indep(sf_work_request_t *msg, int ioc_idx, int source, MPI_C
send_tag += IO_TAG_BASE;
if (send_ack_to_client(send_tag, source, ioc_idx, READ_INDEP_ACK, comm) < 0) {
- send_empty_buf = FALSE;
+ send_empty_buf = false;
H5_SUBFILING_GOTO_ERROR(H5E_IO, H5E_READERROR, -1, "couldn't send ACK to client");
}
}
@@ -951,7 +951,7 @@ ioc_file_queue_read_indep(sf_work_request_t *msg, int ioc_idx, int source, MPI_C
read_ret);
}
- send_empty_buf = FALSE;
+ send_empty_buf = false;
/* Send read data to the client */
H5_CHECK_OVERFLOW(data_size, int64_t, int);
@@ -1251,7 +1251,7 @@ ioc_io_queue_alloc_entry(void)
q_entry_ptr->magic = H5FD_IOC__IO_Q_ENTRY_MAGIC;
q_entry_ptr->next = NULL;
q_entry_ptr->prev = NULL;
- q_entry_ptr->in_progress = FALSE;
+ q_entry_ptr->in_progress = false;
q_entry_ptr->counter = 0;
/* will memcpy the wk_req field, so don't bother to initialize */
@@ -1304,7 +1304,7 @@ ioc_io_queue_add_entry(ioc_data_t *ioc_data, sf_work_request_t *wk_req_ptr)
assert(entry_ptr);
assert(entry_ptr->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC);
- memcpy((void *)(&(entry_ptr->wk_req)), (const void *)wk_req_ptr, sizeof(sf_work_request_t));
+ H5MM_memcpy((void *)(&(entry_ptr->wk_req)), (const void *)wk_req_ptr, sizeof(sf_work_request_t));
/* must obtain io_queue mutex before appending */
hg_thread_mutex_lock(&ioc_data->io_queue.q_mutex);
@@ -1414,9 +1414,9 @@ ioc_io_queue_add_entry(ioc_data_t *ioc_data, sf_work_request_t *wk_req_ptr)
* can become O(N**2) in the worst case.
*/
static void
-ioc_io_queue_dispatch_eligible_entries(ioc_data_t *ioc_data, hbool_t try_lock)
+ioc_io_queue_dispatch_eligible_entries(ioc_data_t *ioc_data, bool try_lock)
{
- hbool_t conflict_detected;
+ bool conflict_detected;
int64_t entry_offset;
int64_t entry_len;
int64_t scan_offset;
@@ -1462,7 +1462,7 @@ ioc_io_queue_dispatch_eligible_entries(ioc_data_t *ioc_data, hbool_t try_lock)
entry_offset = entry_ptr->wk_req.header[1];
entry_len = entry_ptr->wk_req.header[0];
- conflict_detected = FALSE;
+ conflict_detected = false;
scan_ptr = entry_ptr->prev;
@@ -1497,7 +1497,7 @@ ioc_io_queue_dispatch_eligible_entries(ioc_data_t *ioc_data, hbool_t try_lock)
/* TODO: update this if statement when we add collective I/O */
if ((entry_ptr->wk_req.tag != READ_INDEP) || (scan_ptr->wk_req.tag != READ_INDEP)) {
- conflict_detected = TRUE;
+ conflict_detected = true;
}
}
@@ -1509,7 +1509,7 @@ ioc_io_queue_dispatch_eligible_entries(ioc_data_t *ioc_data, hbool_t try_lock)
assert(scan_ptr == NULL);
assert(!entry_ptr->in_progress);
- entry_ptr->in_progress = TRUE;
+ entry_ptr->in_progress = true;
assert(ioc_data->io_queue.num_pending > 0);
diff --git a/src/H5FDsubfiling/H5FDsubfile_int.c b/src/H5FDsubfiling/H5FDsubfile_int.c
index 68deb832adf..cb210b6e4a6 100644
--- a/src/H5FDsubfiling/H5FDsubfile_int.c
+++ b/src/H5FDsubfiling/H5FDsubfile_int.c
@@ -347,6 +347,7 @@ H5FD__subfiling__get_real_eof(hid_t context_id, int64_t *logical_eof_ptr)
assert(ioc_rank >= 0);
assert(ioc_rank < n_io_concentrators);
+ CANBE_UNUSED(ioc_rank);
assert(sf_eofs[i] == -1);
sf_eofs[i] = recv_msg[(3 * i) + 1];
diff --git a/src/H5FDsubfiling/H5FDsubfiling.c b/src/H5FDsubfiling/H5FDsubfiling.c
index 46f280b61d7..d8616c8c1b4 100644
--- a/src/H5FDsubfiling/H5FDsubfiling.c
+++ b/src/H5FDsubfiling/H5FDsubfiling.c
@@ -36,7 +36,7 @@
static hid_t H5FD_SUBFILING_g = H5I_INVALID_HID;
/* Whether the driver initialized MPI on its own */
-static hbool_t H5FD_mpi_self_initialized = FALSE;
+static bool H5FD_mpi_self_initialized = false;
/* The description of a file belonging to this driver. The 'eoa' and 'eof'
* determine the amount of hdf5 address space in use and the high-water mark
@@ -101,7 +101,7 @@ typedef struct H5FD_subfiling_t {
uint64_t file_id;
int64_t context_id; /* The value used to lookup a subfiling context for the file */
- hbool_t fail_to_encode; /* Used to check for failures from sb_get_size routine */
+ bool fail_to_encode; /* Used to check for failures from sb_get_size routine */
char *file_dir; /* Directory where we find files */
char *file_path; /* The user defined filename */
@@ -172,9 +172,9 @@ static herr_t H5FD__subfiling_read_vector(H5FD_t *file, hid_t dxpl_id, uint32_t
haddr_t addrs[], size_t sizes[], void *bufs[] /* out */);
static herr_t H5FD__subfiling_write_vector(H5FD_t *file, hid_t dxpl_id, uint32_t count, H5FD_mem_t types[],
haddr_t addrs[], size_t sizes[], const void *bufs[] /* in */);
-static herr_t H5FD__subfiling_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
+static herr_t H5FD__subfiling_truncate(H5FD_t *_file, hid_t dxpl_id, bool closing);
#if 0
-static herr_t H5FD__subfiling_lock(H5FD_t *_file, hbool_t rw);
+static herr_t H5FD__subfiling_lock(H5FD_t *_file, bool rw);
static herr_t H5FD__subfiling_unlock(H5FD_t *_file);
#endif
static herr_t H5FD__subfiling_del(const char *name, hid_t fapl);
@@ -291,7 +291,7 @@ H5FD_subfiling_init(void)
int provided = 0;
int mpi_code;
- if ((H5FD_SUBFILING_g = H5FD_register(&H5FD_subfiling_g, sizeof(H5FD_class_t), FALSE)) < 0)
+ if ((H5FD_SUBFILING_g = H5FD_register(&H5FD_subfiling_g, sizeof(H5FD_class_t), false)) < 0)
H5_SUBFILING_GOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID,
"can't register subfiling VFD");
@@ -321,7 +321,7 @@ H5FD_subfiling_init(void)
if (MPI_SUCCESS != (mpi_code = MPI_Init_thread(NULL, NULL, required, &provided)))
H5_SUBFILING_MPI_GOTO_ERROR(H5I_INVALID_HID, "MPI_Init_thread failed", mpi_code);
- H5FD_mpi_self_initialized = TRUE;
+ H5FD_mpi_self_initialized = true;
if (provided != required)
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTINIT, H5I_INVALID_HID,
@@ -527,7 +527,7 @@ H5Pget_fapl_subfiling(hid_t fapl_id, H5FD_subfiling_config_t *config_out)
{
const H5FD_subfiling_config_t *config_ptr = NULL;
H5P_genplist_t *plist = NULL;
- hbool_t use_default_config = FALSE;
+ bool use_default_config = false;
herr_t ret_value = SUCCEED;
/*NO TRACE*/
@@ -539,11 +539,11 @@ H5Pget_fapl_subfiling(hid_t fapl_id, H5FD_subfiling_config_t *config_out)
H5_SUBFILING_GOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
if (H5FD_SUBFILING != H5P_peek_driver(plist))
- use_default_config = TRUE;
+ use_default_config = true;
else {
config_ptr = H5P_peek_driver_info(plist);
if (NULL == config_ptr)
- use_default_config = TRUE;
+ use_default_config = true;
}
if (use_default_config) {
@@ -553,7 +553,7 @@ H5Pget_fapl_subfiling(hid_t fapl_id, H5FD_subfiling_config_t *config_out)
}
else {
/* Copy the subfiling fapl data out */
- memcpy(config_out, config_ptr, sizeof(H5FD_subfiling_config_t));
+ H5MM_memcpy(config_out, config_ptr, sizeof(H5FD_subfiling_config_t));
/* Copy the driver info value */
if (H5FD__copy_plist(config_ptr->ioc_fapl_id, &(config_out->ioc_fapl_id)) < 0)
@@ -579,16 +579,16 @@ H5FD__subfiling_get_default_config(hid_t fapl_id, H5FD_subfiling_config_t *confi
config_out->magic = H5FD_SUBFILING_FAPL_MAGIC;
config_out->version = H5FD_SUBFILING_CURR_FAPL_VERSION;
config_out->ioc_fapl_id = H5I_INVALID_HID;
- config_out->require_ioc = TRUE;
+ config_out->require_ioc = true;
config_out->shared_cfg.ioc_selection = SELECT_IOC_ONE_PER_NODE;
config_out->shared_cfg.stripe_size = H5FD_SUBFILING_DEFAULT_STRIPE_SIZE;
config_out->shared_cfg.stripe_count = H5FD_SUBFILING_DEFAULT_STRIPE_COUNT;
- if ((h5_require_ioc = HDgetenv("H5_REQUIRE_IOC")) != NULL) {
+ if ((h5_require_ioc = getenv("H5_REQUIRE_IOC")) != NULL) {
int value_check = atoi(h5_require_ioc);
if (value_check == 0)
- config_out->require_ioc = FALSE;
+ config_out->require_ioc = false;
}
/* Check if any MPI parameters were set on the FAPL */
@@ -720,11 +720,11 @@ H5FD__subfiling_sb_size(H5FD_t *_file)
* errors later.
*/
if (NULL == (sf_context = H5_get_subfiling_object(file->context_id))) {
- file->fail_to_encode = TRUE;
+ file->fail_to_encode = true;
}
else {
if (sf_context->config_file_prefix) {
- ret_value += HDstrlen(sf_context->config_file_prefix) + 1;
+ ret_value += strlen(sf_context->config_file_prefix) + 1;
}
}
@@ -744,7 +744,7 @@ H5FD__subfiling_sb_size(H5FD_t *_file)
* a buffer.
*/
if (ret_value > H5FD_SUBFILING_MAX_DRV_INFO_SIZE)
- file->fail_to_encode = TRUE;
+ file->fail_to_encode = true;
H5_SUBFILING_FUNC_LEAVE;
} /* end H5FD__subfiling_sb_size() */
@@ -780,7 +780,7 @@ H5FD__subfiling_sb_encode(H5FD_t *_file, char *name, unsigned char *buf)
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get subfiling context object");
/* Encode driver name */
- HDstrncpy(name, "Subfilin", 9);
+ strncpy(name, "Subfilin", 9);
name[8] = '\0';
/* Encode configuration structure magic number */
@@ -802,7 +802,7 @@ H5FD__subfiling_sb_encode(H5FD_t *_file, char *name, unsigned char *buf)
/* Encode config file prefix string length */
if (sf_context->config_file_prefix) {
- prefix_len = HDstrlen(sf_context->config_file_prefix) + 1;
+ prefix_len = strlen(sf_context->config_file_prefix) + 1;
H5_CHECKED_ASSIGN(tmpu64, uint64_t, prefix_len, size_t);
}
else
@@ -811,7 +811,7 @@ H5FD__subfiling_sb_encode(H5FD_t *_file, char *name, unsigned char *buf)
/* Encode config file prefix string */
if (sf_context->config_file_prefix) {
- memcpy(p, sf_context->config_file_prefix, prefix_len);
+ H5MM_memcpy(p, sf_context->config_file_prefix, prefix_len);
p += prefix_len;
}
@@ -826,7 +826,7 @@ H5FD__subfiling_sb_encode(H5FD_t *_file, char *name, unsigned char *buf)
"unable to encode IOC VFD's superblock information");
/* Copy the IOC VFD's name into our buffer */
- memcpy(p, ioc_name, 9);
+ H5MM_memcpy(p, ioc_name, 9);
}
done:
@@ -862,7 +862,7 @@ H5FD__subfiling_sb_decode(H5FD_t *_file, const char *name, const unsigned char *
if (NULL == (sf_context = H5_get_subfiling_object(file->context_id)))
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get subfiling context object");
- if (HDstrncmp(name, "Subfilin", 9))
+ if (strncmp(name, "Subfilin", 9))
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "invalid driver name in superblock");
/* Decode configuration structure magic number */
@@ -873,7 +873,7 @@ H5FD__subfiling_sb_decode(H5FD_t *_file, const char *name, const unsigned char *
/* Decode "require IOC" field */
INT32DECODE(p, tmp32);
- file->fa.require_ioc = (hbool_t)tmp32;
+ file->fa.require_ioc = (bool)tmp32;
/* Decode subfiling stripe size */
INT64DECODE(p, file->fa.shared_cfg.stripe_size);
@@ -893,9 +893,9 @@ H5FD__subfiling_sb_decode(H5FD_t *_file, const char *name, const unsigned char *
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate space for config file prefix string");
- memcpy(sf_context->config_file_prefix, p, tmpu64);
+ H5MM_memcpy(sf_context->config_file_prefix, p, tmpu64);
- /* Just in case.. */
+ /* Just in case... */
sf_context->config_file_prefix[tmpu64 - 1] = '\0';
}
@@ -905,7 +905,7 @@ H5FD__subfiling_sb_decode(H5FD_t *_file, const char *name, const unsigned char *
if (file->sf_file) {
char ioc_name[9];
- memcpy(ioc_name, p, 9);
+ H5MM_memcpy(ioc_name, p, 9);
p += 9;
if (H5FD_sb_load(file->sf_file, ioc_name, p) < 0)
@@ -960,7 +960,7 @@ H5FD__subfiling_fapl_get(H5FD_t *_file)
}
/* Copy the fields of the structure */
- memcpy(fa, &(file->fa), sizeof(H5FD_subfiling_config_t));
+ H5MM_memcpy(fa, &(file->fa), sizeof(H5FD_subfiling_config_t));
/* Copy the driver info value */
if (H5FD__copy_plist(file->fa.ioc_fapl_id, &(fa->ioc_fapl_id)) < 0)
@@ -998,14 +998,14 @@ H5FD__copy_plist(hid_t fapl_id, hid_t *id_out_ptr)
assert(id_out_ptr != NULL);
- if (FALSE == H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
+ if (false == H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
H5_SUBFILING_GOTO_ERROR(H5E_ARGS, H5E_BADTYPE, -1, "not a file access property list");
plist_ptr = (H5P_genplist_t *)H5I_object(fapl_id);
if (NULL == plist_ptr)
H5_SUBFILING_GOTO_ERROR(H5E_ARGS, H5E_BADTYPE, -1, "unable to get property list");
- *id_out_ptr = H5P_copy_plist(plist_ptr, FALSE);
+ *id_out_ptr = H5P_copy_plist(plist_ptr, false);
if (H5I_INVALID_HID == *id_out_ptr)
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_BADTYPE, -1, "unable to copy file access property list");
@@ -1036,7 +1036,7 @@ H5FD__subfiling_fapl_copy(const void *_old_fa)
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
}
- memcpy(new_fa, old_fa, sizeof(H5FD_subfiling_config_t));
+ H5MM_memcpy(new_fa, old_fa, sizeof(H5FD_subfiling_config_t));
if (H5FD__copy_plist(old_fa->ioc_fapl_id, &(new_fa->ioc_fapl_id)) < 0)
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_BADVALUE, NULL, "can't copy the IOC FAPL");
@@ -1101,7 +1101,7 @@ H5FD__subfiling_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t ma
H5FD_class_t *driver = NULL; /* VFD for file */
H5P_genplist_t *plist_ptr = NULL;
H5FD_driver_prop_t driver_prop; /* Property for driver ID & info */
- hbool_t bcasted_eof = FALSE;
+ bool bcasted_eof = false;
int64_t sf_eof = -1;
int mpi_code; /* MPI return code */
H5FD_t *ret_value = NULL;
@@ -1122,7 +1122,7 @@ H5FD__subfiling_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t ma
file_ptr->context_id = -1;
file_ptr->fa.ioc_fapl_id = H5I_INVALID_HID;
file_ptr->ext_comm = MPI_COMM_NULL;
- file_ptr->fail_to_encode = FALSE;
+ file_ptr->fail_to_encode = false;
/* Get the driver-specific file access properties */
if (NULL == (plist_ptr = (H5P_genplist_t *)H5I_object(fapl_id)))
@@ -1169,7 +1169,7 @@ H5FD__subfiling_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t ma
config_ptr = &default_config;
}
- memcpy(&file_ptr->fa, config_ptr, sizeof(H5FD_subfiling_config_t));
+ H5MM_memcpy(&file_ptr->fa, config_ptr, sizeof(H5FD_subfiling_config_t));
if (H5FD__copy_plist(config_ptr->ioc_fapl_id, &(file_ptr->fa.ioc_fapl_id)) < 0) {
file_ptr->fa.ioc_fapl_id = H5I_INVALID_HID;
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_BADVALUE, NULL, "can't copy FAPL");
@@ -1250,7 +1250,7 @@ H5FD__subfiling_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t ma
H5_SUBFILING_MPI_GOTO_ERROR(NULL, "MPI_Bcast", mpi_code);
}
- bcasted_eof = TRUE;
+ bcasted_eof = true;
if (sf_eof < 0)
H5_SUBFILING_GOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "lead MPI process failed to get file EOF");
@@ -1319,7 +1319,7 @@ H5FD__subfiling_close_int(H5FD_subfiling_t *file_ptr)
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "can't free MPI communicator");
}
- file_ptr->fail_to_encode = FALSE;
+ file_ptr->fail_to_encode = false;
done:
free(file_ptr->file_path);
@@ -1544,7 +1544,7 @@ H5FD__subfiling_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_i
int64_t *source_data_offset = NULL;
int64_t *sf_data_size = NULL;
int64_t *sf_offset = NULL;
- hbool_t rank0_bcast = FALSE;
+ bool rank0_bcast = false;
int num_subfiles;
herr_t ret_value = SUCCEED;
@@ -2079,7 +2079,7 @@ H5FD__subfiling_read_vector(H5FD_t *_file, hid_t dxpl_id, uint32_t count, H5FD_m
dxpl_id = H5P_DATASET_XFER_DEFAULT;
}
else {
- if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ if (true != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
H5_SUBFILING_GOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list");
}
@@ -2089,8 +2089,8 @@ H5FD__subfiling_read_vector(H5FD_t *_file, hid_t dxpl_id, uint32_t count, H5FD_m
/* TODO: setup real support for vector I/O */
if (file_ptr->fa.require_ioc) {
- hbool_t extend_sizes = FALSE;
- hbool_t extend_types = FALSE;
+ bool extend_sizes = false;
+ bool extend_types = false;
int k;
size_t size;
H5FD_mem_t type;
@@ -2119,7 +2119,7 @@ H5FD__subfiling_read_vector(H5FD_t *_file, hid_t dxpl_id, uint32_t count, H5FD_m
if (sizes[k] == 0) {
- extend_sizes = TRUE;
+ extend_sizes = true;
size = sizes[k - 1];
}
else {
@@ -2132,7 +2132,7 @@ H5FD__subfiling_read_vector(H5FD_t *_file, hid_t dxpl_id, uint32_t count, H5FD_m
if (types[k] == H5FD_MEM_NOLIST) {
- extend_types = TRUE;
+ extend_types = true;
type = types[k - 1];
}
else {
@@ -2241,14 +2241,14 @@ H5FD__subfiling_write_vector(H5FD_t *_file, hid_t dxpl_id, uint32_t count, H5FD_
dxpl_id = H5P_DATASET_XFER_DEFAULT;
}
else {
- if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ if (true != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
H5_SUBFILING_GOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list");
}
/* Call the subfiling IOC write*/
if (file_ptr->fa.require_ioc) {
- hbool_t extend_sizes = FALSE;
- hbool_t extend_types = FALSE;
+ bool extend_sizes = false;
+ bool extend_types = false;
int k;
size_t size;
H5FD_mem_t type;
@@ -2277,7 +2277,7 @@ H5FD__subfiling_write_vector(H5FD_t *_file, hid_t dxpl_id, uint32_t count, H5FD_
if (sizes[k] == 0) {
- extend_sizes = TRUE;
+ extend_sizes = true;
size = sizes[k - 1];
}
else {
@@ -2290,7 +2290,7 @@ H5FD__subfiling_write_vector(H5FD_t *_file, hid_t dxpl_id, uint32_t count, H5FD_
if (types[k] == H5FD_MEM_NOLIST) {
- extend_types = TRUE;
+ extend_types = true;
type = types[k - 1];
}
else {
@@ -2340,7 +2340,7 @@ H5FD__subfiling_write_vector(H5FD_t *_file, hid_t dxpl_id, uint32_t count, H5FD_
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD__subfiling_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_UNUSED closing)
+H5FD__subfiling_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, bool H5_ATTR_UNUSED closing)
{
H5FD_subfiling_t *file = (H5FD_subfiling_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
@@ -2408,8 +2408,8 @@ H5FD__subfiling_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5
*
* Purpose: To place an advisory lock on a file.
* The lock type to apply depends on the parameter "rw":
- * TRUE--opens for write: an exclusive lock
- * FALSE--opens for read: a shared lock
+ * true--opens for write: an exclusive lock
+ * false--opens for read: a shared lock
*
* Return: SUCCEED/FAIL
*
@@ -2417,7 +2417,7 @@ H5FD__subfiling_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5
*/
#if 0
static herr_t
-H5FD__subfiling_lock(H5FD_t *_file, hbool_t rw)
+H5FD__subfiling_lock(H5FD_t *_file, bool rw)
{
H5FD_subfiling_t *file = (H5FD_subfiling_t *)_file; /* VFD file struct */
herr_t ret_value = SUCCEED; /* Return value */
@@ -2426,7 +2426,7 @@ H5FD__subfiling_lock(H5FD_t *_file, hbool_t rw)
if (file->fa.require_ioc) {
#ifdef VERBOSE
- HDputs("Subfiling driver doesn't support file locking");
+ puts("Subfiling driver doesn't support file locking");
#endif
}
else {
@@ -2829,8 +2829,8 @@ init_indep_io(subfiling_context_t *sf_context, int64_t file_offset, size_t io_ne
int64_t *_io_block_len;
int64_t subfile_bytes = 0;
int64_t iovec_depth;
- hbool_t is_first = FALSE;
- hbool_t is_last = FALSE;
+ bool is_first = false;
+ bool is_last = false;
size_t output_offset;
iovec_depth = curr_max_iovec_depth;
@@ -2857,7 +2857,7 @@ init_indep_io(subfiling_context_t *sf_context, int64_t file_offset, size_t io_ne
int64_t num_full_stripes = iovec_depth;
if (k == first_subfile) {
- is_first = TRUE;
+ is_first = true;
/*
* Add partial segment length if not
@@ -2870,7 +2870,7 @@ init_indep_io(subfiling_context_t *sf_context, int64_t file_offset, size_t io_ne
}
if (k == last_subfile) {
- is_last = TRUE;
+ is_last = true;
/*
* Add partial segment length if not
@@ -2885,7 +2885,7 @@ init_indep_io(subfiling_context_t *sf_context, int64_t file_offset, size_t io_ne
/* Account for subfiles with uniform segments */
if (!is_first && !is_last) {
- hbool_t thin_uniform_section = FALSE;
+ bool thin_uniform_section = false;
if (last_subfile >= first_subfile) {
/*
diff --git a/src/H5FDsubfiling/H5FDsubfiling.h b/src/H5FDsubfiling/H5FDsubfiling.h
index b1cf53a645f..d6d2ffd16da 100644
--- a/src/H5FDsubfiling/H5FDsubfiling.h
+++ b/src/H5FDsubfiling/H5FDsubfiling.h
@@ -61,32 +61,42 @@
/**
* \def H5FD_SUBFILING_FILENAME_TEMPLATE
- * The basic template for a subfile filename. The format specifiers
- * correspond to:
+ * The basic printf-style template for a #H5FD_SUBFILING driver
+ * subfile filename. The format specifiers correspond to:
*
- * %s -> base filename, e.g. "file.h5"
- * %PRIu64 -> file inode, e.g. 11273556
- * %0*d -> number (starting at 1) signifying the Nth (out of total
- * number of subfiles) subfile. Zero-padded according
- * to the number of digits in the number of subfiles
- * (calculated by log10(num_subfiles) + 1)
- * %d -> number of subfiles
+ * \par \%s
+ * base filename, e.g. "file.h5"
+ *
+ * \par \%PRIu64
+ * file inode, e.g. 11273556
+ *
+ * \par \%0*d
+ * number (starting at 1) signifying the Nth (out of
+ * total number of subfiles) subfile. Zero-padded
+ * according to the number of digits in the number of
+ * subfiles (calculated by log10(num_subfiles) + 1)
+ *
+ * \par \%d
+ * number of subfiles
*
* yielding filenames such as:
*
- * file.h5.subfile_11273556_01_of_10
- * file.h5.subfile_11273556_02_of_10
- * file.h5.subfile_11273556_10_of_10
+ * file.h5.subfile_11273556_01_of_10 \n
+ * file.h5.subfile_11273556_02_of_10 \n
+ * file.h5.subfile_11273556_10_of_10 \n
*/
#define H5FD_SUBFILING_FILENAME_TEMPLATE "%s.subfile_%" PRIu64 "_%0*d_of_%d"
/**
* \def H5FD_SUBFILING_CONFIG_FILENAME_TEMPLATE
- * The basic template for a #H5FD_SUBFILING driver configuration filename.
- * The format specifiers correspond to:
+ * The basic printf-style template for a #H5FD_SUBFILING driver
+ * configuration filename. The format specifiers correspond to:
+ *
+ * \par \%s
+ * base filename, e.g. "file.h5"
*
- * %s -> base filename, e.g. "file.h5"
- * %PRIu64 -> file inode, e.g. 11273556
+ * \par \%PRIu64
+ * file inode, e.g. 11273556
*
* yielding a filename such as:
*
@@ -285,10 +295,10 @@ typedef struct H5FD_subfiling_params_t {
* the #H5FD_IOC driver by calling H5Pset_fapl_ioc(), but future development
* may allow other file drivers to be used.
*
- * \var hbool_t H5FD_subfiling_config_t::require_ioc
+ * \var bool H5FD_subfiling_config_t::require_ioc
* A boolean flag which indicates whether the #H5FD_SUBFILING driver should
* use the #H5FD_IOC driver for its I/O operations. This field should currently
- * always be set to TRUE.
+ * always be set to true.
*
* \var H5FD_subfiling_params_t H5FD_subfiling_config_t::shared_cfg
* A structure which contains the subfiling parameters that are shared between
@@ -300,7 +310,7 @@ typedef struct H5FD_subfiling_config_t {
uint32_t magic; /* Must be set to H5FD_SUBFILING_FAPL_MAGIC */
uint32_t version; /* Must be set to H5FD_SUBFILING_CURR_FAPL_VERSION */
hid_t ioc_fapl_id; /* The FAPL setup with the stacked VFD to use for I/O concentrators */
- hbool_t require_ioc; /* Whether to use the IOC VFD (currently must always be TRUE) */
+ bool require_ioc; /* Whether to use the IOC VFD (currently must always be true) */
H5FD_subfiling_params_t shared_cfg; /* Subfiling/IOC parameters (stripe size, stripe count, etc.) */
} H5FD_subfiling_config_t;
//!
diff --git a/src/H5FDsubfiling/H5FDsubfiling_priv.h b/src/H5FDsubfiling/H5FDsubfiling_priv.h
index 08fef7d1a01..9cc32f14abf 100644
--- a/src/H5FDsubfiling/H5FDsubfiling_priv.h
+++ b/src/H5FDsubfiling/H5FDsubfiling_priv.h
@@ -63,4 +63,6 @@ H5_DLL herr_t H5FD__subfiling__get_real_eof(hid_t context_id, int64_t *logical_e
}
#endif
+#define CANBE_UNUSED(X) (void)(X)
+
#endif /* H5FDsubfiling_priv_H */
diff --git a/src/H5FDsubfiling/H5subfiling_common.c b/src/H5FDsubfiling/H5subfiling_common.c
index 63a63c5ce3f..f9cc0dccf88 100644
--- a/src/H5FDsubfiling/H5subfiling_common.c
+++ b/src/H5FDsubfiling/H5subfiling_common.c
@@ -73,7 +73,7 @@ static herr_t record_fid_to_subfile(uint64_t file_id, int64_t subfile_context_id
static void clear_fid_map_entry(uint64_t file_id, int64_t sf_context_id);
static herr_t ioc_open_files(int64_t file_context_id, int file_acc_flags);
static herr_t create_config_file(subfiling_context_t *sf_context, const char *base_filename,
- const char *config_dir, const char *subfile_dir, hbool_t truncate_if_exists);
+ const char *config_dir, const char *subfile_dir, bool truncate_if_exists);
static herr_t open_config_file(const char *base_filename, const char *config_dir, uint64_t file_id,
const char *mode, FILE **config_file_out);
@@ -441,12 +441,12 @@ H5_free_subfiling_topology(sf_topology_t *topology)
#ifndef NDEBUG
{
- hbool_t topology_cached = FALSE;
+ bool topology_cached = false;
/* Make sure this application topology object is in the cache */
for (size_t i = 0; i < sf_topology_cache_num_entries; i++)
if (topology == sf_topology_cache[i])
- topology_cached = TRUE;
+ topology_cached = true;
assert(topology_cached);
}
#endif
@@ -510,7 +510,7 @@ H5_open_subfiling_stub_file(const char *name, unsigned flags, MPI_Comm file_comm
{
H5P_genplist_t *plist = NULL;
uint64_t stub_file_id = UINT64_MAX;
- hbool_t bcasted_inode = FALSE;
+ bool bcasted_inode = false;
H5FD_t *stub_file = NULL;
hid_t fapl_id = H5I_INVALID_HID;
int mpi_rank = 0;
@@ -539,7 +539,7 @@ H5_open_subfiling_stub_file(const char *name, unsigned flags, MPI_Comm file_comm
MPI_Comm stub_comm = MPI_COMM_SELF;
MPI_Info stub_info = MPI_INFO_NULL;
- if ((fapl_id = H5P_create_id(H5P_CLS_FILE_ACCESS_g, FALSE)) < 0)
+ if ((fapl_id = H5P_create_id(H5P_CLS_FILE_ACCESS_g, false)) < 0)
H5_SUBFILING_GOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "can't create FAPL for stub file");
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
H5_SUBFILING_GOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a file access property list");
@@ -562,13 +562,13 @@ H5_open_subfiling_stub_file(const char *name, unsigned flags, MPI_Comm file_comm
stub_file_id = UINT64_MAX;
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL,
"couldn't stat HDF5 stub file, errno = %d, error message = '%s'", errno,
- HDstrerror(errno));
+ strerror(errno));
}
else
stub_file_id = (uint64_t)st.st_ino;
}
- bcasted_inode = TRUE;
+ bcasted_inode = true;
if (mpi_size > 1) {
if (MPI_SUCCESS != (mpi_code = MPI_Bcast(&stub_file_id, 1, MPI_UINT64_T, 0, file_comm)))
@@ -668,7 +668,7 @@ H5_open_subfiles(const char *base_filename, uint64_t file_id, H5FD_subfiling_par
if (MPI_SUCCESS != (mpi_code = MPI_Comm_rank(file_comm, &mpi_rank)))
H5_SUBFILING_MPI_GOTO_ERROR(FAIL, "MPI_Comm_rank failed", mpi_code);
- HDsnprintf(sf_context->sf_logfile_name, PATH_MAX, "%s.log.%d", sf_context->h5_filename, mpi_rank);
+ snprintf(sf_context->sf_logfile_name, PATH_MAX, "%s.log.%d", sf_context->h5_filename, mpi_rank);
if (NULL == (sf_context->sf_logfile = fopen(sf_context->sf_logfile_name, "a")))
H5_SUBFILING_SYS_GOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL,
@@ -776,9 +776,9 @@ init_subfiling(const char *base_filename, uint64_t file_id, H5FD_subfiling_param
new_context->sf_group_comm = MPI_COMM_NULL;
/* Check if a prefix has been set for the configuration file name */
- prefix_env = HDgetenv(H5FD_SUBFILING_CONFIG_FILE_PREFIX);
+ prefix_env = getenv(H5FD_SUBFILING_CONFIG_FILE_PREFIX);
if (prefix_env) {
- if (NULL == (new_context->config_file_prefix = HDstrdup(prefix_env)))
+ if (NULL == (new_context->config_file_prefix = strdup(prefix_env)))
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTCOPY, FAIL, "couldn't copy config file prefix string");
}
@@ -851,7 +851,7 @@ init_subfiling(const char *base_filename, uint64_t file_id, H5FD_subfiling_param
char *env_value = NULL;
/* Check for a subfiling stripe size setting from the environment */
- if ((env_value = HDgetenv(H5FD_SUBFILING_STRIPE_SIZE))) {
+ if ((env_value = getenv(H5FD_SUBFILING_STRIPE_SIZE))) {
long long stripe_size = -1;
errno = 0;
@@ -981,7 +981,7 @@ init_app_topology(int64_t sf_context_id, H5FD_subfiling_params_t *subfiling_conf
case SELECT_IOC_ONE_PER_NODE: {
if (comm_size > 1) {
/* Check for an IOC-per-node value set in the environment */
- if ((env_value = HDgetenv(H5FD_SUBFILING_IOC_PER_NODE))) {
+ if ((env_value = getenv(H5FD_SUBFILING_IOC_PER_NODE))) {
errno = 0;
ioc_select_val = strtol(env_value, NULL, 0);
if ((ERANGE == errno)) {
@@ -1106,7 +1106,7 @@ init_app_topology(int64_t sf_context_id, H5FD_subfiling_params_t *subfiling_conf
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get subfiling topology object");
app_topology->app_layout = NULL;
app_topology->app_comm = MPI_COMM_NULL;
- app_topology->rank_is_ioc = FALSE;
+ app_topology->rank_is_ioc = false;
app_topology->ioc_idx = -1;
app_topology->n_io_concentrators = ioc_count;
app_topology->io_concentrators = NULL;
@@ -1178,7 +1178,7 @@ static herr_t
get_ioc_selection_criteria_from_env(H5FD_subfiling_ioc_select_t *ioc_selection_type, char **ioc_sel_info_str)
{
char *opt_value = NULL;
- char *env_value = HDgetenv(H5FD_SUBFILING_IOC_SELECTION_CRITERIA);
+ char *env_value = getenv(H5FD_SUBFILING_IOC_SELECTION_CRITERIA);
herr_t ret_value = SUCCEED;
assert(ioc_selection_type);
@@ -1202,7 +1202,7 @@ get_ioc_selection_criteria_from_env(H5FD_subfiling_ioc_select_t *ioc_selection_t
* '1:64' to specify the "every Nth rank" strategy with a
* criteria of '64'.
*/
- opt_value = HDstrchr(env_value, ':');
+ opt_value = strchr(env_value, ':');
if (opt_value) {
long check_value;
@@ -1365,7 +1365,8 @@ init_app_layout(sf_topology_t *app_topology, MPI_Comm comm, MPI_Comm node_comm)
if (app_layout->layout[i].node_local_rank == 0)
app_layout->node_count++;
- assert(app_layout->node_count > 0);
+ if (app_layout->node_count <= 0)
+ H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "node count less than or equal to zero");
if (NULL ==
(app_layout->node_ranks = malloc((size_t)app_layout->node_count * sizeof(*app_layout->node_ranks))))
@@ -1594,7 +1595,7 @@ compare_layout_nodelocal(const void *layout1, const void *layout2)
* can also select one or more additional IOCs.
*
* As a side effect, we fill the 'io_concentrators' vector
- * and set the 'rank_is_ioc' flag to TRUE if our rank is
+ * and set the 'rank_is_ioc' flag to true if our rank is
* identified as owning an I/O Concentrator (IOC).
*
*-------------------------------------------------------------------------
@@ -1658,7 +1659,7 @@ identify_ioc_ranks(int64_t sf_context_id, sf_topology_t *app_topology, int rank_
assert(!app_topology->rank_is_ioc);
app_topology->ioc_idx = total_ioc_count;
- app_topology->rank_is_ioc = TRUE;
+ app_topology->rank_is_ioc = true;
}
total_ioc_count++;
@@ -1681,7 +1682,7 @@ identify_ioc_ranks(int64_t sf_context_id, sf_topology_t *app_topology, int rank_
assert(!app_topology->rank_is_ioc);
app_topology->ioc_idx = total_ioc_count;
- app_topology->rank_is_ioc = TRUE;
+ app_topology->rank_is_ioc = true;
}
total_ioc_count++;
@@ -1733,7 +1734,7 @@ identify_ioc_ranks(int64_t sf_context_id, sf_topology_t *app_topology, int rank_
if (app_layout->world_rank == io_concentrators[num_iocs_assigned]) {
app_topology->ioc_idx = num_iocs_assigned;
- app_topology->rank_is_ioc = TRUE;
+ app_topology->rank_is_ioc = true;
}
}
@@ -1815,13 +1816,13 @@ init_subfiling_context(subfiling_context_t *sf_context, const char *base_filenam
sf_context->sf_logfile = NULL;
#endif
- if (NULL == (sf_context->h5_filename = HDstrdup(base_filename)))
+ if (NULL == (sf_context->h5_filename = strdup(base_filename)))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"couldn't allocate space for subfiling filename");
/* Check for a subfile name prefix setting in the environment */
- if ((env_value = HDgetenv(H5FD_SUBFILING_SUBFILE_PREFIX))) {
- if (NULL == (sf_context->subfile_prefix = HDstrdup(env_value)))
+ if ((env_value = getenv(H5FD_SUBFILING_SUBFILE_PREFIX))) {
+ if (NULL == (sf_context->subfile_prefix = strdup(env_value)))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "couldn't copy subfile prefix value");
}
@@ -2181,7 +2182,7 @@ ioc_open_files(int64_t file_context_id, int file_acc_flags)
"couldn't allocate space for subfile filename");
num_subfiles = sf_context->sf_num_subfiles;
- num_digits = (int)(HDlog10(num_subfiles) + 1);
+ num_digits = (int)(log10(num_subfiles) + 1);
/*
* For each subfile this IOC rank owns, generate the name
@@ -2204,8 +2205,8 @@ ioc_open_files(int64_t file_context_id, int file_acc_flags)
* and the configuration file will be named:
* ABC.h5.subfile_.config
*/
- HDsnprintf(filepath, PATH_MAX, "%s/" H5FD_SUBFILING_FILENAME_TEMPLATE, subfile_dir, base,
- sf_context->h5_file_id, num_digits, subfile_idx, num_subfiles);
+ snprintf(filepath, PATH_MAX, "%s/" H5FD_SUBFILING_FILENAME_TEMPLATE, subfile_dir, base,
+ sf_context->h5_file_id, num_digits, subfile_idx, num_subfiles);
if ((sf_context->sf_fids[i] = HDopen(filepath, file_acc_flags, mode)) < 0)
H5_SUBFILING_SYS_GOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "failed to open subfile");
@@ -2273,14 +2274,14 @@ ioc_open_files(int64_t file_context_id, int file_acc_flags)
*/
static herr_t
create_config_file(subfiling_context_t *sf_context, const char *base_filename, const char *config_dir,
- const char *subfile_dir, hbool_t truncate_if_exists)
+ const char *subfile_dir, bool truncate_if_exists)
{
- hbool_t config_file_exists = FALSE;
- FILE *config_file = NULL;
- char *config_filename = NULL;
- char *line_buf = NULL;
- int ret = 0;
- herr_t ret_value = SUCCEED;
+ bool config_file_exists = false;
+ FILE *config_file = NULL;
+ char *config_filename = NULL;
+ char *line_buf = NULL;
+ int ret = 0;
+ herr_t ret_value = SUCCEED;
assert(sf_context);
assert(base_filename);
@@ -2302,8 +2303,8 @@ create_config_file(subfiling_context_t *sf_context, const char *base_filename, c
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"couldn't allocate space for subfiling configuration filename");
- HDsnprintf(config_filename, PATH_MAX, "%s/" H5FD_SUBFILING_CONFIG_FILENAME_TEMPLATE, config_dir,
- base_filename, sf_context->h5_file_id);
+ snprintf(config_filename, PATH_MAX, "%s/" H5FD_SUBFILING_CONFIG_FILENAME_TEMPLATE, config_dir,
+ base_filename, sf_context->h5_file_id);
/* Determine whether a subfiling configuration file exists */
errno = 0;
@@ -2334,42 +2335,42 @@ create_config_file(subfiling_context_t *sf_context, const char *base_filename, c
"couldn't allocate buffer for writing to subfiling configuration file");
/* Write the subfiling stripe size to the configuration file */
- HDsnprintf(line_buf, PATH_MAX, "stripe_size=%" PRId64 "\n", sf_context->sf_stripe_size);
- if (fwrite(line_buf, HDstrlen(line_buf), 1, config_file) != 1)
+ snprintf(line_buf, PATH_MAX, "stripe_size=%" PRId64 "\n", sf_context->sf_stripe_size);
+ if (fwrite(line_buf, strlen(line_buf), 1, config_file) != 1)
H5_SUBFILING_SYS_GOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL,
"failed to write to subfiling configuration file");
/* Write the number of I/O concentrators to the configuration file */
- HDsnprintf(line_buf, PATH_MAX, "aggregator_count=%d\n", sf_context->topology->n_io_concentrators);
- if (fwrite(line_buf, HDstrlen(line_buf), 1, config_file) != 1)
+ snprintf(line_buf, PATH_MAX, "aggregator_count=%d\n", sf_context->topology->n_io_concentrators);
+ if (fwrite(line_buf, strlen(line_buf), 1, config_file) != 1)
H5_SUBFILING_SYS_GOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL,
"failed to write to subfiling configuration file");
/* Write the number of subfiles to the configuration file */
- HDsnprintf(line_buf, PATH_MAX, "subfile_count=%d\n", n_subfiles);
- if (fwrite(line_buf, HDstrlen(line_buf), 1, config_file) != 1)
+ snprintf(line_buf, PATH_MAX, "subfile_count=%d\n", n_subfiles);
+ if (fwrite(line_buf, strlen(line_buf), 1, config_file) != 1)
H5_SUBFILING_SYS_GOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL,
"failed to write to subfiling configuration file");
/* Write the base HDF5 filename to the configuration file */
- HDsnprintf(line_buf, PATH_MAX, "hdf5_file=%s\n", sf_context->h5_filename);
- if (fwrite(line_buf, HDstrlen(line_buf), 1, config_file) != 1)
+ snprintf(line_buf, PATH_MAX, "hdf5_file=%s\n", sf_context->h5_filename);
+ if (fwrite(line_buf, strlen(line_buf), 1, config_file) != 1)
H5_SUBFILING_SYS_GOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL,
"failed to write to subfiling configuration file");
/* Write the optional subfile directory prefix to the configuration file */
- HDsnprintf(line_buf, PATH_MAX, "subfile_dir=%s\n", subfile_dir);
- if (fwrite(line_buf, HDstrlen(line_buf), 1, config_file) != 1)
+ snprintf(line_buf, PATH_MAX, "subfile_dir=%s\n", subfile_dir);
+ if (fwrite(line_buf, strlen(line_buf), 1, config_file) != 1)
H5_SUBFILING_SYS_GOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL,
"failed to write to subfiling configuration file");
/* Write out each subfile name to the configuration file */
- num_digits = (int)(HDlog10(n_subfiles) + 1);
+ num_digits = (int)(log10(n_subfiles) + 1);
for (int k = 0; k < n_subfiles; k++) {
- HDsnprintf(line_buf, PATH_MAX, H5FD_SUBFILING_FILENAME_TEMPLATE "\n", base_filename,
- sf_context->h5_file_id, num_digits, k + 1, n_subfiles);
+ snprintf(line_buf, PATH_MAX, H5FD_SUBFILING_FILENAME_TEMPLATE "\n", base_filename,
+ sf_context->h5_file_id, num_digits, k + 1, n_subfiles);
- if (fwrite(line_buf, HDstrlen(line_buf), 1, config_file) != 1)
+ if (fwrite(line_buf, strlen(line_buf), 1, config_file) != 1)
H5_SUBFILING_SYS_GOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL,
"failed to write to subfiling configuration file");
}
@@ -2406,11 +2407,11 @@ static herr_t
open_config_file(const char *base_filename, const char *config_dir, uint64_t file_id, const char *mode,
FILE **config_file_out)
{
- hbool_t config_file_exists = FALSE;
- FILE *config_file = NULL;
- char *config_filename = NULL;
- int ret = 0;
- herr_t ret_value = SUCCEED;
+ bool config_file_exists = false;
+ FILE *config_file = NULL;
+ char *config_filename = NULL;
+ int ret = 0;
+ herr_t ret_value = SUCCEED;
assert(base_filename);
assert(config_dir);
@@ -2430,8 +2431,8 @@ open_config_file(const char *base_filename, const char *config_dir, uint64_t fil
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"couldn't allocate space for subfiling configuration filename");
- HDsnprintf(config_filename, PATH_MAX, "%s/" H5FD_SUBFILING_CONFIG_FILENAME_TEMPLATE, config_dir,
- base_filename, file_id);
+ snprintf(config_filename, PATH_MAX, "%s/" H5FD_SUBFILING_CONFIG_FILENAME_TEMPLATE, config_dir,
+ base_filename, file_id);
/* Determine whether a subfiling configuration file exists */
errno = 0;
@@ -2509,11 +2510,11 @@ H5_get_subfiling_config_from_file(FILE *config_file, int64_t *stripe_size, int64
config_buf[config_file_len] = '\0';
if (stripe_size) {
- if (NULL == (substr = HDstrstr(config_buf, "stripe_size")))
+ if (NULL == (substr = strstr(config_buf, "stripe_size")))
H5_SUBFILING_GOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL,
"malformed subfiling configuration file - no stripe size entry");
- if (EOF == HDsscanf(substr, "stripe_size=%" PRId64, &read_stripe_size))
+ if (EOF == sscanf(substr, "stripe_size=%" PRId64, &read_stripe_size))
H5_SUBFILING_SYS_GOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL,
"couldn't get stripe size from subfiling configuration file");
@@ -2526,11 +2527,11 @@ H5_get_subfiling_config_from_file(FILE *config_file, int64_t *stripe_size, int64
}
if (num_subfiles) {
- if (NULL == (substr = HDstrstr(config_buf, "subfile_count")))
+ if (NULL == (substr = strstr(config_buf, "subfile_count")))
H5_SUBFILING_GOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL,
"malformed subfiling configuration file - no subfile count entry");
- if (EOF == HDsscanf(substr, "subfile_count=%" PRId64, &read_num_subfiles))
+ if (EOF == sscanf(substr, "subfile_count=%" PRId64, &read_num_subfiles))
H5_SUBFILING_SYS_GOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL,
"couldn't get number of subfiles from subfiling configuration file");
@@ -2568,8 +2569,8 @@ herr_t
H5_resolve_pathname(const char *filepath, MPI_Comm comm, char **resolved_filepath)
{
hsize_t path_len = HSIZE_UNDEF;
- hbool_t bcasted_path_len = FALSE;
- hbool_t bcasted_path = FALSE;
+ bool bcasted_path_len = false;
+ bool bcasted_path = false;
char *resolved_path = NULL;
char *file_basename = NULL;
char *file_dirname = NULL;
@@ -2594,7 +2595,7 @@ H5_resolve_pathname(const char *filepath, MPI_Comm comm, char **resolved_filepat
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't get file dirname");
/* If filepath is just the filename, set up path using CWD */
- if (!HDstrcmp(file_dirname, ".")) {
+ if (!strcmp(file_dirname, ".")) {
if (NULL == (resolved_path = malloc(PATH_MAX)))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate buffer for filepath");
@@ -2608,31 +2609,31 @@ H5_resolve_pathname(const char *filepath, MPI_Comm comm, char **resolved_filepat
H5_SUBFILING_GOTO_ERROR(
H5E_VFL, H5E_CANTGET, FAIL,
"can't get current working directory, errno = %d, error message = '%s'", errno,
- HDstrerror(errno));
+ strerror(errno));
- HDsnprintf(resolved_path, PATH_MAX, "%s/%s", cwd, file_basename);
+ snprintf(resolved_path, PATH_MAX, "%s/%s", cwd, file_basename);
}
else {
/* Otherwise, just use what was given as the pathname */
- if (NULL == (resolved_path = HDstrdup(filepath)))
+ if (NULL == (resolved_path = strdup(filepath)))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't copy filename");
}
}
else
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL,
"can't resolve subfile path, errno = %d, error message = '%s'", errno,
- HDstrerror(errno));
+ strerror(errno));
}
if (resolved_path) {
- H5_CHECKED_ASSIGN(path_len, hsize_t, (HDstrlen(resolved_path) + 1), size_t);
+ H5_CHECKED_ASSIGN(path_len, hsize_t, (strlen(resolved_path) + 1), size_t);
}
else
path_len = HSIZE_UNDEF;
}
/* Broadcast the size of the resolved filepath string to other ranks */
- bcasted_path_len = TRUE;
+ bcasted_path_len = true;
if (mpi_size > 1) {
if (MPI_SUCCESS != (mpi_code = MPI_Bcast(&path_len, 1, HSIZE_AS_MPI_TYPE, 0, comm)))
H5_SUBFILING_MPI_GOTO_ERROR(FAIL, "MPI_Bcast failed", mpi_code);
@@ -2647,7 +2648,7 @@ H5_resolve_pathname(const char *filepath, MPI_Comm comm, char **resolved_filepat
}
/* Broadcast the resolved filepath to other ranks */
- bcasted_path = TRUE;
+ bcasted_path = true;
if (mpi_size > 1) {
H5_CHECK_OVERFLOW(path_len, hsize_t, int);
if (MPI_SUCCESS != (mpi_code = MPI_Bcast(resolved_path, (int)path_len, MPI_CHAR, 0, comm)))
@@ -3138,13 +3139,13 @@ H5_subfiling_log(int64_t sf_context_id, const char *fmt, ...)
H5FD_ioc_begin_thread_exclusive();
if (sf_context->sf_logfile) {
- HDvfprintf(sf_context->sf_logfile, fmt, log_args);
- HDfputs("\n", sf_context->sf_logfile);
+ vfprintf(sf_context->sf_logfile, fmt, log_args);
+ fputs("\n", sf_context->sf_logfile);
fflush(sf_context->sf_logfile);
}
else {
- HDvprintf(fmt, log_args);
- HDputs("");
+ vprintf(fmt, log_args);
+ puts("");
fflush(stdout);
}
diff --git a/src/H5FDtest.c b/src/H5FDtest.c
index 87d24b64f75..694bae482e5 100644
--- a/src/H5FDtest.c
+++ b/src/H5FDtest.c
@@ -73,26 +73,26 @@
*
* This function is only intended for use in the test code.
*
- * Return: TRUE (1) if the VFD supports SWMR I/O or vfd_name is
+ * Return: true (1) if the VFD supports SWMR I/O or vfd_name is
* NULL or the empty string (which implies the default VFD).
*
- * FALSE (0) if it does not
+ * false (0) if it does not
*
* This function cannot fail at this time so there is no
* error return value.
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
H5FD__supports_swmr_test(const char *vfd_name)
{
- hbool_t ret_value = FALSE;
+ bool ret_value = false;
FUNC_ENTER_NOAPI_NOINIT_NOERR
- if (!vfd_name || !HDstrcmp(vfd_name, "") || !HDstrcmp(vfd_name, "nomatch"))
- ret_value = TRUE;
+ if (!vfd_name || !strcmp(vfd_name, "") || !strcmp(vfd_name, "nomatch"))
+ ret_value = true;
else
- ret_value = !HDstrcmp(vfd_name, "log") || !HDstrcmp(vfd_name, "sec2");
+ ret_value = !strcmp(vfd_name, "log") || !strcmp(vfd_name, "sec2");
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__supports_swmr_test() */
diff --git a/src/H5FL.c b/src/H5FL.c
index ec952b7ca52..5dd4ed38efe 100644
--- a/src/H5FL.c
+++ b/src/H5FL.c
@@ -273,7 +273,7 @@ H5FL__reg_init(H5FL_reg_head_t *head)
H5FL_reg_gc_head.first = new_node;
/* Indicate that the free list is initialized */
- head->init = TRUE;
+ head->init = true;
/* Make certain that the space allocated is large enough to store a free list pointer (eventually) */
if (head->size < sizeof(H5FL_reg_node_t))
@@ -609,7 +609,7 @@ H5FL__reg_term(void)
/* No allocations left open for list, get rid of it */
else {
/* Reset the "initialized" flag, in case we restart this list somehow (I don't know how..) */
- H5FL_reg_gc_head.first->list->init = FALSE;
+ H5FL_reg_gc_head.first->list->init = false;
/* Free the node from the garbage collection list */
H5MM_xfree(H5FL_reg_gc_head.first);
@@ -751,7 +751,7 @@ H5FL__blk_init(H5FL_blk_head_t *head)
H5FL_blk_gc_head.first = new_node;
/* Indicate that the PQ is initialized */
- head->init = TRUE;
+ head->init = true;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -782,9 +782,9 @@ H5FL_blk_free_block_avail(H5FL_blk_head_t *head, size_t size)
/* check if there is a free list for blocks of this size */
/* and if there are any blocks available on the list */
if ((free_list = H5FL__blk_find_list(&(head->head), size)) != NULL && free_list->list != NULL)
- ret_value = TRUE;
+ ret_value = true;
else
- ret_value = FALSE;
+ ret_value = false;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FL_blk_free_block_avail() */
@@ -957,7 +957,7 @@ H5FL_blk_free(H5FL_blk_head_t *head, void *block)
unsigned char *block_ptr = ((unsigned char *)block) - sizeof(H5FL_track_t);
H5FL_track_t trk;
- memcpy(&trk, block_ptr, sizeof(H5FL_track_t));
+ H5MM_memcpy(&trk, block_ptr, sizeof(H5FL_track_t));
/* Free tracking information about the allocation location */
H5CS_close_stack(trk.stack);
@@ -979,7 +979,7 @@ H5FL_blk_free(H5FL_blk_head_t *head, void *block)
trk.next->prev = trk.prev;
} /* end else */
- memcpy(block_ptr, &trk, sizeof(H5FL_track_t));
+ H5MM_memcpy(block_ptr, &trk, sizeof(H5FL_track_t));
}
#endif /* H5FL_TRACK */
@@ -1079,7 +1079,7 @@ H5FL_blk_realloc(H5FL_blk_head_t *head, void *block, size_t new_size H5FL_TRACK_
unsigned char *block_ptr = ((unsigned char *)block) - sizeof(H5FL_track_t);
H5FL_track_t trk;
- memcpy(&trk, block_ptr, sizeof(H5FL_track_t));
+ H5MM_memcpy(&trk, block_ptr, sizeof(H5FL_track_t));
/* Release previous tracking information */
H5CS_close_stack(trk.stack);
@@ -1099,7 +1099,7 @@ H5FL_blk_realloc(H5FL_blk_head_t *head, void *block, size_t new_size H5FL_TRACK_
trk.func = call_func;
trk.line = call_line;
- memcpy(block_ptr, &trk, sizeof(H5FL_track_t));
+ H5MM_memcpy(block_ptr, &trk, sizeof(H5FL_track_t));
}
#endif /* H5FL_TRACK */
ret_value = block;
@@ -1281,7 +1281,7 @@ H5FL__blk_term(void)
/* No allocations left open for list, get rid of it */
else {
/* Reset the "initialized" flag, in case we restart this list somehow (I don't know how..) */
- H5FL_blk_gc_head.first->pq->init = FALSE;
+ H5FL_blk_gc_head.first->pq->init = false;
/* Free the node from the garbage collection list */
H5MM_free(H5FL_blk_gc_head.first);
@@ -1337,7 +1337,7 @@ H5FL__arr_init(H5FL_arr_head_t *head)
head->list_arr[u].size = head->base_size + (head->elem_size * u);
/* Indicate that the free list is initialized */
- head->init = TRUE;
+ head->init = true;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1380,7 +1380,7 @@ H5FL_arr_free(H5FL_arr_head_t *head, void *obj)
unsigned char *block_ptr = ((unsigned char *)obj) - sizeof(H5FL_track_t);
H5FL_track_t trk;
- memcpy(&trk, block_ptr, sizeof(H5FL_track_t));
+ H5MM_memcpy(&trk, block_ptr, sizeof(H5FL_track_t));
/* Free tracking information about the allocation location */
H5CS_close_stack(trk.stack);
@@ -1402,7 +1402,7 @@ H5FL_arr_free(H5FL_arr_head_t *head, void *obj)
trk.next->prev = trk.prev;
} /* end else */
- memcpy(block_ptr, &trk, sizeof(H5FL_track_t));
+ H5MM_memcpy(block_ptr, &trk, sizeof(H5FL_track_t));
}
#endif
@@ -1631,7 +1631,7 @@ H5FL_arr_realloc(H5FL_arr_head_t *head, void *obj, size_t new_elem H5FL_TRACK_PA
unsigned char *block_ptr = ((unsigned char *)obj) - sizeof(H5FL_track_t);
H5FL_track_t trk;
- memcpy(&trk, block_ptr, sizeof(H5FL_track_t));
+ H5MM_memcpy(&trk, block_ptr, sizeof(H5FL_track_t));
/* Release previous tracking information */
H5CS_close_stack(trk.stack);
@@ -1651,7 +1651,7 @@ H5FL_arr_realloc(H5FL_arr_head_t *head, void *obj, size_t new_elem H5FL_TRACK_PA
trk.func = call_func;
trk.line = call_line;
- memcpy(block_ptr, &trk, sizeof(H5FL_track_t));
+ H5MM_memcpy(block_ptr, &trk, sizeof(H5FL_track_t));
#endif
ret_value = obj;
}
@@ -1804,7 +1804,7 @@ H5FL__arr_term(void)
H5MM_xfree(H5FL_arr_gc_head.first->list->list_arr);
/* Reset the "initialized" flag, in case we restart this list somehow (I don't know how..) */
- H5FL_arr_gc_head.first->list->init = FALSE;
+ H5FL_arr_gc_head.first->list->init = false;
/* Free the node from the garbage collection list */
H5MM_free(H5FL_arr_gc_head.first);
@@ -1983,7 +1983,7 @@ H5FL_fac_init(size_t size)
#endif /* H5FL_TRACK */
/* Indicate that the free list is initialized */
- factory->init = TRUE;
+ factory->init = true;
/* Set return value */
ret_value = factory;
@@ -2353,7 +2353,7 @@ H5FL__fac_term_all(void)
assert(H5FL_fac_gc_head.first->list->allocated == 0);
/* Reset the "initialized" flag, in case we restart this list somehow (I don't know how..) */
- H5FL_fac_gc_head.first->list->init = FALSE;
+ H5FL_fac_gc_head.first->list->init = false;
/* Free the node from the garbage collection list */
H5FL_fac_gc_head.first = H5FL_FREE(H5FL_fac_gc_node_t, H5FL_fac_gc_head.first);
diff --git a/src/H5FLprivate.h b/src/H5FLprivate.h
index 07ced7441fc..348cfda542d 100644
--- a/src/H5FLprivate.h
+++ b/src/H5FLprivate.h
@@ -92,7 +92,7 @@ typedef struct H5FL_reg_node_t {
/* Data structure for free list of blocks */
typedef struct H5FL_reg_head_t {
- hbool_t init; /* Whether the free list has been initialized */
+ bool init; /* Whether the free list has been initialized */
unsigned allocated; /* Number of blocks allocated */
unsigned onlist; /* Number of blocks on free list */
const char *name; /* Name of the type */
@@ -163,7 +163,7 @@ typedef struct H5FL_blk_node_t {
/* Data structure for priority queue of native block free lists */
typedef struct H5FL_blk_head_t {
- hbool_t init; /* Whether the free list has been initialized */
+ bool init; /* Whether the free list has been initialized */
unsigned allocated; /* Total number of blocks allocated */
unsigned onlist; /* Total number of blocks on free list */
size_t list_mem; /* Total amount of memory in blocks on free list */
@@ -215,7 +215,7 @@ typedef struct H5FL_blk_head_t {
#define H5FL_BLK_CALLOC(t, size) (uint8_t *)H5MM_calloc(size)
#define H5FL_BLK_FREE(t, blk) (uint8_t *)H5MM_xfree(blk)
#define H5FL_BLK_REALLOC(t, blk, new_size) (uint8_t *)H5MM_realloc(blk, new_size)
-#define H5FL_BLK_AVAIL(t, size) (FALSE)
+#define H5FL_BLK_AVAIL(t, size) (false)
#endif /* H5_NO_BLK_FREE_LISTS */
/* Data structure to store each array in free list */
@@ -237,7 +237,7 @@ typedef struct H5FL_arr_node_t {
/* Data structure for free list of array blocks */
typedef struct H5FL_arr_head_t {
- hbool_t init; /* Whether the free list has been initialized */
+ bool init; /* Whether the free list has been initialized */
unsigned allocated; /* Total number of blocks allocated */
size_t list_mem; /* Amount of memory in block on free list */
const char *name; /* Name of the type */
@@ -358,7 +358,7 @@ typedef struct H5FL_fac_node_t H5FL_fac_node_t;
/* Data structure for free list block factory */
typedef struct H5FL_fac_head_t {
- hbool_t init; /* Whether the free list has been initialized */
+ bool init; /* Whether the free list has been initialized */
unsigned allocated; /* Number of blocks allocated */
unsigned onlist; /* Number of blocks on free list */
size_t size; /* Size of the blocks in the list */
diff --git a/src/H5FO.c b/src/H5FO.c
index 8a8f4d58e63..66e5ba46fbd 100644
--- a/src/H5FO.c
+++ b/src/H5FO.c
@@ -32,7 +32,7 @@
typedef struct H5FO_open_obj_t {
haddr_t addr; /* Address of object header for object */
void *obj; /* Pointer to the object */
- hbool_t deleted; /* Flag to indicate that the object was deleted from the file */
+ bool deleted; /* Flag to indicate that the object was deleted from the file */
} H5FO_open_obj_t;
/* Information about counted objects in a file */
@@ -139,7 +139,7 @@ H5FO_opened(const H5F_t *f, haddr_t addr)
H5F_t *f; IN/OUT: File's opened object info set
haddr_t addr; IN: Address of object to insert
void *obj; IN: Pointer to object to insert
- hbool_t delete_flag; IN: Whether to 'mark' this object for deletion
+ bool delete_flag; IN: Whether to 'mark' this object for deletion
RETURNS
Returns a non-negative on success, negative on failure
@@ -151,7 +151,7 @@ H5FO_opened(const H5F_t *f, haddr_t addr)
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5FO_insert(const H5F_t *f, haddr_t addr, void *obj, hbool_t delete_flag)
+H5FO_insert(const H5F_t *f, haddr_t addr, void *obj, bool delete_flag)
{
H5FO_open_obj_t *open_obj; /* Information about open object */
herr_t ret_value = SUCCEED; /* Return value */
@@ -252,7 +252,7 @@ H5FO_delete(H5F_t *f, haddr_t addr)
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5FO_mark(const H5F_t *f, haddr_t addr, hbool_t deleted)
+H5FO_mark(const H5F_t *f, haddr_t addr, bool deleted)
{
H5FO_open_obj_t *open_obj; /* Information about open object */
herr_t ret_value = SUCCEED; /* Return value */
@@ -280,12 +280,12 @@ H5FO_mark(const H5F_t *f, haddr_t addr, hbool_t deleted)
PURPOSE
Check if an object is marked to be deleted when it is closed
USAGE
- hbool_t H5FO_marked(f,addr)
+ bool H5FO_marked(f,addr)
const H5F_t *f; IN: File opened object is in
haddr_t addr; IN: Address of object to delete
RETURNS
- Returns a TRUE/FALSE on success
+ Returns a true/false on success
DESCRIPTION
Checks if the object is currently in the "opened objects" tree and
whether its marks for deletion from the file when it is closed.
@@ -294,11 +294,11 @@ H5FO_mark(const H5F_t *f, haddr_t addr, hbool_t deleted)
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-hbool_t
+bool
H5FO_marked(const H5F_t *f, haddr_t addr)
{
H5FO_open_obj_t *open_obj; /* Information about open object */
- hbool_t ret_value = FALSE; /* Return value */
+ bool ret_value = false; /* Return value */
FUNC_ENTER_NOAPI_NOERR
diff --git a/src/H5FOprivate.h b/src/H5FOprivate.h
index 1f44ec839bf..5f5fe9c7d11 100644
--- a/src/H5FOprivate.h
+++ b/src/H5FOprivate.h
@@ -31,10 +31,10 @@ typedef H5SL_t H5FO_t; /* Currently, all open objects are stored in skip list */
/* Private routines */
H5_DLL herr_t H5FO_create(const H5F_t *f);
H5_DLL void *H5FO_opened(const H5F_t *f, haddr_t addr);
-H5_DLL herr_t H5FO_insert(const H5F_t *f, haddr_t addr, void *obj, hbool_t delete_flag);
+H5_DLL herr_t H5FO_insert(const H5F_t *f, haddr_t addr, void *obj, bool delete_flag);
H5_DLL herr_t H5FO_delete(H5F_t *f, haddr_t addr);
-H5_DLL herr_t H5FO_mark(const H5F_t *f, haddr_t addr, hbool_t deleted);
-H5_DLL hbool_t H5FO_marked(const H5F_t *f, haddr_t addr);
+H5_DLL herr_t H5FO_mark(const H5F_t *f, haddr_t addr, bool deleted);
+H5_DLL bool H5FO_marked(const H5F_t *f, haddr_t addr);
H5_DLL herr_t H5FO_dest(const H5F_t *f);
H5_DLL herr_t H5FO_top_create(H5F_t *f);
H5_DLL herr_t H5FO_top_incr(const H5F_t *f, haddr_t addr);
diff --git a/src/H5FS.c b/src/H5FS.c
index 40bee44e94c..c21ecf298ef 100644
--- a/src/H5FS.c
+++ b/src/H5FS.c
@@ -264,31 +264,31 @@ H5FS_delete(H5F_t *f, haddr_t fs_addr)
fprintf(stderr, "%s: fspace_status = %0x: ", __func__, fspace_status);
if (fspace_status) {
- hbool_t printed = FALSE;
+ bool printed = false;
if (fspace_status & H5AC_ES__IN_CACHE) {
fprintf(stderr, "H5AC_ES__IN_CACHE");
- printed = TRUE;
+ printed = true;
} /* end if */
if (fspace_status & H5AC_ES__IS_DIRTY) {
fprintf(stderr, "%sH5AC_ES__IS_DIRTY", (printed ? " | " : ""));
- printed = TRUE;
+ printed = true;
} /* end if */
if (fspace_status & H5AC_ES__IS_PROTECTED) {
fprintf(stderr, "%sH5AC_ES__IS_PROTECTED", (printed ? " | " : ""));
- printed = TRUE;
+ printed = true;
} /* end if */
if (fspace_status & H5AC_ES__IS_PINNED) {
fprintf(stderr, "%sH5AC_ES__IS_PINNED", (printed ? " | " : ""));
- printed = TRUE;
+ printed = true;
} /* end if */
if (fspace_status & H5AC_ES__IS_FLUSH_DEP_PARENT) {
fprintf(stderr, "%sH5AC_ES__IS_FLUSH_DEP_PARENT", (printed ? " | " : ""));
- printed = TRUE;
+ printed = true;
} /* end if */
if (fspace_status & H5AC_ES__IS_FLUSH_DEP_CHILD) {
fprintf(stderr, "%sH5AC_ES__IS_FLUSH_DEP_CHILD", (printed ? " | " : ""));
- printed = TRUE;
+ printed = true;
} /* end if */
} /* end if */
fprintf(stderr, "\n");
@@ -488,7 +488,7 @@ H5FS_close(H5F_t *f, H5FS_t *fspace)
fspace->alloc_sect_size)) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTMERGE, FAIL,
"can't check for absorbing section info");
- else if (status == FALSE) {
+ else if (status == false) {
/* Section info can't "go away", but it's free. Allow
* header to record it
*/
@@ -867,7 +867,7 @@ H5FS_alloc_sect(H5F_t *f, H5FS_t *fspace)
*-------------------------------------------------------------------------
*/
herr_t
-H5FS_free(H5F_t *f, H5FS_t *fspace, hbool_t free_file_space)
+H5FS_free(H5F_t *f, H5FS_t *fspace, bool free_file_space)
{
haddr_t saved_addr; /* Previous address of item */
unsigned cache_flags; /* Flags for unprotecting cache entries */
diff --git a/src/H5FScache.c b/src/H5FScache.c
index 420582e2a47..f5e9361c1eb 100644
--- a/src/H5FScache.c
+++ b/src/H5FScache.c
@@ -72,7 +72,7 @@ static herr_t H5FS__sinfo_serialize_node_cb(void *_item, void H5_ATTR_UNUSED *ke
/* Metadata cache callbacks */
static herr_t H5FS__cache_hdr_get_initial_load_size(void *udata, size_t *image_len);
static htri_t H5FS__cache_hdr_verify_chksum(const void *image_ptr, size_t len, void *udata_ptr);
-static void *H5FS__cache_hdr_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty);
+static void *H5FS__cache_hdr_deserialize(const void *image, size_t len, void *udata, bool *dirty);
static herr_t H5FS__cache_hdr_image_len(const void *thing, size_t *image_len);
static herr_t H5FS__cache_hdr_pre_serialize(H5F_t *f, void *thing, haddr_t addr, size_t len,
haddr_t *new_addr, size_t *new_len, unsigned *flags);
@@ -82,7 +82,7 @@ static herr_t H5FS__cache_hdr_free_icr(void *thing);
static herr_t H5FS__cache_sinfo_get_initial_load_size(void *udata, size_t *image_len);
static htri_t H5FS__cache_sinfo_verify_chksum(const void *image_ptr, size_t len, void *udata_ptr);
-static void *H5FS__cache_sinfo_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty);
+static void *H5FS__cache_sinfo_deserialize(const void *image, size_t len, void *udata, bool *dirty);
static herr_t H5FS__cache_sinfo_image_len(const void *thing, size_t *image_len);
static herr_t H5FS__cache_sinfo_pre_serialize(H5F_t *f, void *thing, haddr_t addr, size_t len,
haddr_t *new_addr, size_t *new_len, unsigned *flags);
@@ -171,7 +171,7 @@ H5FS__cache_hdr_get_initial_load_size(void *_udata, size_t *image_len)
* Purpose: Verify the computed checksum of the data structure is the
* same as the stored chksum.
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: Negative
*
*-------------------------------------------------------------------------
@@ -182,7 +182,7 @@ H5FS__cache_hdr_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNUSE
const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
uint32_t stored_chksum; /* Stored metadata checksum value */
uint32_t computed_chksum; /* Computed metadata checksum value */
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -193,7 +193,7 @@ H5FS__cache_hdr_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNUSE
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
if (stored_chksum != computed_chksum)
- ret_value = FALSE;
+ ret_value = false;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FS__cache_hdr_verify_chksum() */
@@ -213,7 +213,7 @@ H5FS__cache_hdr_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNUSE
*/
static void *
H5FS__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len, void *_udata,
- hbool_t H5_ATTR_UNUSED *dirty)
+ bool H5_ATTR_UNUSED *dirty)
{
H5FS_t *fspace = NULL; /* Free space header info */
H5FS_hdr_cache_ud_t *udata = (H5FS_hdr_cache_ud_t *)_udata; /* User data for callback */
@@ -404,8 +404,8 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT
*
* 1) The instance of H5FS_sinfo_t is not in the metadata cache.
*
- * This will be TRUE iff H5_addr_defined(fspace->sect_addr)
- * is FALSE, and fspace->sinfo is not NULL. This is sometimes
+ * This will be true iff H5_addr_defined(fspace->sect_addr)
+ * is false, and fspace->sinfo is not NULL. This is sometimes
* referred to as "floating" section info in the comments.
*
* If the section info structure contains free space data
@@ -417,7 +417,7 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT
*
* H5_addr_defined(fspace->addr)
*
- * will both be TRUE. If this condition does not hold, then
+ * will both be true. If this condition does not hold, then
* either the free space info is not persistent
* (!H5_addr_defined(fspace->addr)???) or the section info
* contains no free space data that must be written to file
@@ -435,7 +435,7 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT
* may be protected either RW or RO (as indicated by
* fspace->sinfo_protected and fspace->sinfo_accmod).
*
- * Observe that fspace->serial_sect_count > 0 must be TRUE in
+ * Observe that fspace->serial_sect_count > 0 must be true in
* cases 2) and 3), as the section info should not be stored on
* disk if it doesn't exist. Similarly, since the section info
* will not be stored to disk unless the header is,
@@ -874,7 +874,7 @@ H5FS__cache_sinfo_get_initial_load_size(void *_udata, size_t *image_len)
* Purpose: Verify the computed checksum of the data structure is the
* same as the stored chksum.
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: Negative
*
*-------------------------------------------------------------------------
@@ -885,7 +885,7 @@ H5FS__cache_sinfo_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNU
const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
uint32_t stored_chksum; /* Stored metadata checksum value */
uint32_t computed_chksum; /* Computed metadata checksum value */
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -896,7 +896,7 @@ H5FS__cache_sinfo_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNU
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
if (stored_chksum != computed_chksum)
- ret_value = FALSE;
+ ret_value = false;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FS__cache_sinfo_verify_chksum() */
@@ -916,7 +916,7 @@ H5FS__cache_sinfo_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNU
*/
static void *
H5FS__cache_sinfo_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len, void *_udata,
- hbool_t H5_ATTR_NDEBUG_UNUSED *dirty)
+ bool H5_ATTR_NDEBUG_UNUSED *dirty)
{
H5FS_sinfo_cache_ud_t *udata = (H5FS_sinfo_cache_ud_t *)_udata; /* User data for callback */
H5FS_t *fspace; /* free space manager */
diff --git a/src/H5FSpkg.h b/src/H5FSpkg.h
index 4ec7aafe6bc..6e14deb4ecb 100644
--- a/src/H5FSpkg.h
+++ b/src/H5FSpkg.h
@@ -126,7 +126,7 @@ typedef struct H5FS_sinfo_t {
H5FS_bin_t *bins; /* Array of lists of lists of free sections */
/* Computed/cached values */
- hbool_t dirty; /* Whether this info in memory is out of sync w/info in file */
+ bool dirty; /* Whether this info in memory is out of sync w/info in file */
unsigned nbins; /* Number of bins */
size_t serial_size; /* Total size of all serializable sections */
size_t tot_size_count; /* Total number of differently sized sections */
@@ -171,10 +171,10 @@ struct H5FS_t {
haddr_t addr; /* Address of free space header on disk */
size_t hdr_size; /* Size of free space header on disk */
H5FS_sinfo_t *sinfo; /* Section information */
- hbool_t swmr_write; /* Flag indicating the file is opened with SWMR-write access */
+ bool swmr_write; /* Flag indicating the file is opened with SWMR-write access */
unsigned sinfo_lock_count; /* # of times the section info has been locked */
- hbool_t sinfo_protected; /* Whether the section info was protected when locked */
- hbool_t sinfo_modified; /* Whether the section info has been modified while locked */
+ bool sinfo_protected; /* Whether the section info was protected when locked */
+ bool sinfo_modified; /* Whether the section info has been modified while locked */
unsigned sinfo_accmode; /* Access mode for protecting the section info */
/* must be either H5C__NO_FLAGS_SET (i.e r/w) */
/* or H5AC__READ_ONLY_FLAG (i.e. r/o). */
diff --git a/src/H5FSprivate.h b/src/H5FSprivate.h
index abd4b20d1ae..f917a253944 100644
--- a/src/H5FSprivate.h
+++ b/src/H5FSprivate.h
@@ -194,7 +194,7 @@ H5_DLL herr_t H5FS_delete(H5F_t *f, haddr_t fs_addr);
H5_DLL herr_t H5FS_close(H5F_t *f, H5FS_t *fspace);
H5_DLL herr_t H5FS_alloc_hdr(H5F_t *f, H5FS_t *fspace, haddr_t *fs_addr);
H5_DLL herr_t H5FS_alloc_sect(H5F_t *f, H5FS_t *fspace);
-H5_DLL herr_t H5FS_free(H5F_t *f, H5FS_t *fspace, hbool_t free_file_space);
+H5_DLL herr_t H5FS_free(H5F_t *f, H5FS_t *fspace, bool free_file_space);
/* Free space section routines */
H5_DLL herr_t H5FS_sect_add(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *node, unsigned flags,
diff --git a/src/H5FSsection.c b/src/H5FSsection.c
index 7889f76ae1d..9bf2af0cff5 100644
--- a/src/H5FSsection.c
+++ b/src/H5FSsection.c
@@ -239,7 +239,7 @@ H5FS__sinfo_lock(H5F_t *f, H5FS_t *fspace, unsigned accmode)
/* If the section address is defined, load it from the file */
if (H5_addr_defined(fspace->sect_addr)) {
/* Sanity check */
- assert(fspace->sinfo_protected == FALSE);
+ assert(fspace->sinfo_protected == false);
assert(H5_addr_defined(fspace->addr));
#ifdef H5FS_SINFO_DEBUG
@@ -254,7 +254,7 @@ H5FS__sinfo_lock(H5F_t *f, H5FS_t *fspace, unsigned accmode)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTPROTECT, FAIL, "unable to load free space sections");
/* Remember that we protected the section info & the access mode */
- fspace->sinfo_protected = TRUE;
+ fspace->sinfo_protected = true;
fspace->sinfo_accmode = accmode;
} /* end if */
else {
@@ -316,7 +316,7 @@ H5FS__sinfo_lock(H5F_t *f, H5FS_t *fspace, unsigned accmode)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified)
+H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, bool modified)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -345,10 +345,10 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTDIRTY, FAIL, "attempt to modify read-only section info");
/* If we modified the section info, mark it dirty */
- fspace->sinfo->dirty = TRUE;
+ fspace->sinfo->dirty = true;
/* Remember that the section info was modified while locked */
- fspace->sinfo_modified = TRUE;
+ fspace->sinfo_modified = true;
/* Assume that the modification will affect the statistics in the header
* and mark that dirty also
@@ -362,9 +362,8 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified)
/* Check if section info lock count dropped to zero */
if (fspace->sinfo_lock_count == 0) {
- hbool_t release_sinfo_space =
- FALSE; /* Flag to indicate section info space in file should be released */
- hbool_t closing_or_flushing = f->shared->closing; /* Is closing or flushing in progress */
+ bool release_sinfo_space = false; /* Flag to indicate section info space in file should be released */
+ bool closing_or_flushing = f->shared->closing; /* Is closing or flushing in progress */
/* Check whether cache-flush is in progress if closing is not. */
if (!closing_or_flushing &&
@@ -410,7 +409,7 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTUNPROTECT, FAIL, "unable to release free space section info");
/* Reset the protected flag on the section info */
- fspace->sinfo_protected = FALSE;
+ fspace->sinfo_protected = false;
/* Check if header is taking ownership of section info */
if ((cache_flags & H5AC__TAKE_OWNERSHIP_FLAG)) {
@@ -418,7 +417,7 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified)
fprintf(stderr, "%s: Taking ownership of section info\n", __func__);
#endif /* H5FS_SINFO_DEBUG */
/* Set flag to release section info space in file */
- release_sinfo_space = TRUE;
+ release_sinfo_space = true;
} /* end if */
else {
#ifdef H5FS_SINFO_DEBUG
@@ -438,12 +437,12 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified)
bigger than previous section */
if (closing_or_flushing) {
if (fspace->sect_size > fspace->alloc_sect_size)
- release_sinfo_space = TRUE;
+ release_sinfo_space = true;
else
fspace->sect_size = fspace->alloc_sect_size;
}
else
- release_sinfo_space = TRUE;
+ release_sinfo_space = true;
}
else
assert(fspace->alloc_sect_size == 0);
@@ -459,7 +458,7 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified)
} /* end else */
/* Reset the "section info modified" flag */
- fspace->sinfo_modified = FALSE;
+ fspace->sinfo_modified = false;
/* Check if header needs to release section info in the file */
if (release_sinfo_space) {
@@ -876,8 +875,8 @@ H5FS__sect_remove_real(H5FS_t *fspace, H5FS_section_info_t *sect)
herr_t
H5FS_sect_remove(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect)
{
- hbool_t sinfo_valid = FALSE; /* Whether the section info is valid */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool sinfo_valid = false; /* Whether the section info is valid */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -889,7 +888,7 @@ H5FS_sect_remove(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect)
/* Get a pointer to the section info */
if (H5FS__sinfo_lock(f, fspace, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info");
- sinfo_valid = TRUE;
+ sinfo_valid = true;
/* Perform actual section removal */
if (H5FS__sect_remove_real(fspace, sect) < 0)
@@ -897,7 +896,7 @@ H5FS_sect_remove(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect)
done:
/* Release the section info */
- if (sinfo_valid && H5FS__sinfo_unlock(f, fspace, TRUE) < 0)
+ if (sinfo_valid && H5FS__sinfo_unlock(f, fspace, true) < 0)
HDONE_ERROR(H5E_FSPACE, H5E_CANTRELEASE, FAIL, "can't release section info");
FUNC_LEAVE_NOAPI(ret_value)
@@ -916,7 +915,7 @@ static herr_t
H5FS__sect_link_size(H5FS_sinfo_t *sinfo, const H5FS_section_class_t *cls, H5FS_section_info_t *sect)
{
H5FS_node_t *fspace_node = NULL; /* Pointer to free space node of the correct size */
- hbool_t fspace_node_alloc = FALSE; /* Whether the free space node was allocated */
+ bool fspace_node_alloc = false; /* Whether the free space node was allocated */
unsigned bin; /* Bin to put the free space section in */
herr_t ret_value = SUCCEED; /* Return value */
@@ -944,7 +943,7 @@ H5FS__sect_link_size(H5FS_sinfo_t *sinfo, const H5FS_section_class_t *cls, H5FS_
/* Allocate new free list size node */
if (NULL == (fspace_node = H5FL_MALLOC(H5FS_node_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for free space node");
- fspace_node_alloc = TRUE;
+ fspace_node_alloc = true;
/* Initialize the free list size node */
fspace_node->sect_size = sect->size;
@@ -955,7 +954,7 @@ H5FS__sect_link_size(H5FS_sinfo_t *sinfo, const H5FS_section_class_t *cls, H5FS_
/* Insert new free space size node into bin's list */
if (H5SL_insert(sinfo->bins[bin].bin_list, fspace_node, &fspace_node->sect_size) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't insert free space node into skip list");
- fspace_node_alloc = FALSE; /* (owned by the bin skip list now, don't need to free on error) */
+ fspace_node_alloc = false; /* (owned by the bin skip list now, don't need to free on error) */
/* Increment number of section sizes */
sinfo->tot_size_count++;
@@ -1096,8 +1095,8 @@ static herr_t
H5FS__sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data)
{
H5FS_section_class_t *sect_cls; /* Section's class */
- hbool_t modified; /* Flag to indicate merge or shrink occurred */
- hbool_t remove_sect = FALSE; /* Whether a section should be removed before shrinking */
+ bool modified; /* Flag to indicate merge or shrink occurred */
+ bool remove_sect = false; /* Whether a section should be removed before shrinking */
htri_t status; /* Status value */
herr_t ret_value = SUCCEED; /* Return value */
@@ -1112,14 +1111,14 @@ H5FS__sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data)
/* Loop until no more merging */
if (fspace->sinfo->merge_list) {
do {
- H5SL_node_t *less_sect_node; /* Skip list node for section less than new section */
- H5SL_node_t *greater_sect_node = NULL; /* Skip list node for section greater than new section */
- H5FS_section_info_t *tmp_sect; /* Temporary free space section */
- H5FS_section_class_t *tmp_sect_cls; /* Temporary section's class */
- hbool_t greater_sect_node_valid = FALSE; /* Indicate if 'greater than' section node is valid */
+ H5SL_node_t *less_sect_node; /* Skip list node for section less than new section */
+ H5SL_node_t *greater_sect_node = NULL; /* Skip list node for section greater than new section */
+ H5FS_section_info_t *tmp_sect; /* Temporary free space section */
+ H5FS_section_class_t *tmp_sect_cls; /* Temporary section's class */
+ bool greater_sect_node_valid = false; /* Indicate if 'greater than' section node is valid */
/* Reset 'modification occurred' flag */
- modified = FALSE;
+ modified = false;
/* Look for neighboring section before new section */
less_sect_node = H5SL_below(fspace->sinfo->merge_list, &(*sect)->addr);
@@ -1128,7 +1127,7 @@ H5FS__sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data)
if (less_sect_node) {
/* Check for node greater than section */
greater_sect_node = H5SL_next(less_sect_node);
- greater_sect_node_valid = TRUE;
+ greater_sect_node_valid = true;
/* Get section for 'less than' skip list node */
tmp_sect = (H5FS_section_info_t *)H5SL_item(less_sect_node);
@@ -1165,7 +1164,7 @@ H5FS__sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data)
HGOTO_DONE(ret_value);
/* Indicate successful merge occurred */
- modified = TRUE;
+ modified = true;
} /* end if */
} /* end if */
} /* end if */
@@ -1212,7 +1211,7 @@ H5FS__sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data)
HGOTO_DONE(ret_value);
/* Indicate successful merge occurred */
- modified = TRUE;
+ modified = true;
} /* end if */
} /* end if */
} /* end if */
@@ -1223,7 +1222,7 @@ H5FS__sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data)
/* Loop until no more shrinking */
do {
/* Reset 'modification occurred' flag */
- modified = FALSE;
+ modified = false;
/* Check for (possibly merged) section able to shrink the size of the container */
sect_cls = &fspace->sect_cls[(*sect)->type];
@@ -1237,7 +1236,7 @@ H5FS__sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data)
if (H5FS__sect_remove_real(fspace, *sect) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTRELEASE, FAIL,
"can't remove section from internal data structures");
- remove_sect = FALSE;
+ remove_sect = false;
} /* end if */
/* Shrink the container */
@@ -1259,13 +1258,13 @@ H5FS__sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data)
assert(*sect);
/* Indicate that this section needs to be removed if it causes a shrink */
- remove_sect = TRUE;
+ remove_sect = true;
} /* end if */
} /* end if */
} /* end if */
/* Indicate successful merge occurred */
- modified = TRUE;
+ modified = true;
} /* end if */
} /* end if */
} while (modified && *sect);
@@ -1291,8 +1290,8 @@ herr_t
H5FS_sect_add(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, unsigned flags, void *op_data)
{
H5FS_section_class_t *cls; /* Section's class */
- hbool_t sinfo_valid = FALSE; /* Whether the section info is valid */
- hbool_t sinfo_modified = FALSE; /* Whether the section info was modified */
+ bool sinfo_valid = false; /* Whether the section info is valid */
+ bool sinfo_modified = false; /* Whether the section info was modified */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1312,7 +1311,7 @@ H5FS_sect_add(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, unsigned flag
/* Get a pointer to the section info */
if (H5FS__sinfo_lock(f, fspace, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info");
- sinfo_valid = TRUE;
+ sinfo_valid = true;
/* Call "add" section class callback, if there is one */
cls = &fspace->sect_cls[sect->type];
@@ -1345,7 +1344,7 @@ H5FS_sect_add(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, unsigned flag
/* Mark free space sections as changed */
/* (if adding sections while deserializing sections, don't set the flag) */
if (!(flags & (H5FS_ADD_DESERIALIZING | H5FS_PAGE_END_NO_ADD)))
- sinfo_modified = TRUE;
+ sinfo_modified = true;
done:
/* Release the section info */
@@ -1375,9 +1374,9 @@ htri_t
H5FS_sect_try_extend(H5F_t *f, H5FS_t *fspace, haddr_t addr, hsize_t size, hsize_t extra_requested,
unsigned flags, void *op_data)
{
- hbool_t sinfo_valid = FALSE; /* Whether the section info is valid */
- hbool_t sinfo_modified = FALSE; /* Whether the section info was modified */
- htri_t ret_value = FALSE; /* Return value */
+ bool sinfo_valid = false; /* Whether the section info is valid */
+ bool sinfo_modified = false; /* Whether the section info was modified */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1405,7 +1404,7 @@ H5FS_sect_try_extend(H5F_t *f, H5FS_t *fspace, haddr_t addr, hsize_t size, hsize
/* Get a pointer to the section info */
if (H5FS__sinfo_lock(f, fspace, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info");
- sinfo_valid = TRUE;
+ sinfo_valid = true;
/*
@@ -1481,10 +1480,10 @@ H5FS_sect_try_extend(H5F_t *f, H5FS_t *fspace, haddr_t addr, hsize_t size, hsize
} /* end else */
/* Note that we modified the section info */
- sinfo_modified = TRUE;
+ sinfo_modified = true;
/* Indicate success */
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
} /* end if */
} /* end if */
} /* end if */
@@ -1502,8 +1501,8 @@ H5FS_sect_try_extend(H5F_t *f, H5FS_t *fspace, haddr_t addr, hsize_t size, hsize
*
* Purpose: Try to merge/shrink a block
*
- * Return: TRUE: merged/shrunk
- * FALSE: not merged/not shrunk
+ * Return: true: merged/shrunk
+ * false: not merged/not shrunk
* Failure: negative
*
*-------------------------------------------------------------------------
@@ -1511,10 +1510,10 @@ H5FS_sect_try_extend(H5F_t *f, H5FS_t *fspace, haddr_t addr, hsize_t size, hsize
htri_t
H5FS_sect_try_merge(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, unsigned flags, void *op_data)
{
- hbool_t sinfo_valid = FALSE; /* Whether the section info is valid */
- hbool_t sinfo_modified = FALSE; /* Whether the section info was modified */
+ bool sinfo_valid = false; /* Whether the section info is valid */
+ bool sinfo_modified = false; /* Whether the section info was modified */
hsize_t saved_fs_size; /* Copy of the free-space section size */
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1528,7 +1527,7 @@ H5FS_sect_try_merge(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, unsigne
/* Get a pointer to the section info */
if (H5FS__sinfo_lock(f, fspace, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info");
- sinfo_valid = TRUE;
+ sinfo_valid = true;
saved_fs_size = sect->size;
/* Attempt to merge/shrink section with existing sections */
@@ -1537,8 +1536,8 @@ H5FS_sect_try_merge(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, unsigne
/* Check if section is shrunk and/or merged away completely */
if (!sect) {
- sinfo_modified = TRUE;
- HGOTO_DONE(TRUE);
+ sinfo_modified = true;
+ HGOTO_DONE(true);
} /* end if */
else {
/* Check if section is merged */
@@ -1546,8 +1545,8 @@ H5FS_sect_try_merge(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, unsigne
if (H5FS__sect_link(fspace, sect, flags) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL,
"can't insert free space section into skip list");
- sinfo_modified = TRUE;
- HGOTO_DONE(TRUE);
+ sinfo_modified = true;
+ HGOTO_DONE(true);
} /* end if */
} /* end else */
@@ -1574,7 +1573,7 @@ H5FS__sect_find_node(H5FS_t *fspace, hsize_t request, H5FS_section_info_t **node
{
H5FS_node_t *fspace_node; /* Free list size node */
unsigned bin; /* Bin to put the free space section in */
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = false; /* Return value */
H5SL_node_t *curr_size_node = NULL;
const H5FS_section_class_t *cls; /* Class of section */
@@ -1623,7 +1622,7 @@ H5FS__sect_find_node(H5FS_t *fspace, hsize_t request, H5FS_section_info_t **node
HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL,
"can't remove section from non-size tracking data structures");
/* Indicate that we found a node for the request */
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
} /* end if */
} /* end if */
else { /* alignment is set */
@@ -1689,7 +1688,7 @@ H5FS__sect_find_node(H5FS_t *fspace, hsize_t request, H5FS_section_info_t **node
assert(request <= (*node)->size);
} /* end if */
/* Indicate that we found a node for the request */
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
} /* end if */
/* Get the next section node in the list */
@@ -1722,9 +1721,9 @@ H5FS__sect_find_node(H5FS_t *fspace, hsize_t request, H5FS_section_info_t **node
htri_t
H5FS_sect_find(H5F_t *f, H5FS_t *fspace, hsize_t request, H5FS_section_info_t **node)
{
- hbool_t sinfo_valid = FALSE; /* Whether the section info is valid */
- hbool_t sinfo_modified = FALSE; /* Whether the section info was modified */
- htri_t ret_value = FALSE; /* Return value */
+ bool sinfo_valid = false; /* Whether the section info is valid */
+ bool sinfo_modified = false; /* Whether the section info was modified */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1739,7 +1738,7 @@ H5FS_sect_find(H5F_t *f, H5FS_t *fspace, hsize_t request, H5FS_section_info_t **
/* Get a pointer to the section info */
if (H5FS__sinfo_lock(f, fspace, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info");
- sinfo_valid = TRUE;
+ sinfo_valid = true;
/* Look for node in bins */
if ((ret_value = H5FS__sect_find_node(fspace, request, node)) < 0)
@@ -1748,7 +1747,7 @@ H5FS_sect_find(H5F_t *f, H5FS_t *fspace, hsize_t request, H5FS_section_info_t **
/* Decrement # of sections on free list, if we found an object */
if (ret_value > 0) {
/* Note that we've modified the section info */
- sinfo_modified = TRUE;
+ sinfo_modified = true;
} /* end if */
} /* end if */
@@ -1841,7 +1840,7 @@ herr_t
H5FS_sect_iterate(H5F_t *f, H5FS_t *fspace, H5FS_operator_t op, void *op_data)
{
H5FS_iter_ud_t udata; /* User data for callbacks */
- hbool_t sinfo_valid = FALSE; /* Whether the section info is valid */
+ bool sinfo_valid = false; /* Whether the section info is valid */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1862,7 +1861,7 @@ H5FS_sect_iterate(H5F_t *f, H5FS_t *fspace, H5FS_operator_t op, void *op_data)
/* Get a pointer to the section info */
if (H5FS__sinfo_lock(f, fspace, H5AC__READ_ONLY_FLAG) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info");
- sinfo_valid = TRUE;
+ sinfo_valid = true;
/* Iterate over all the bins */
for (bin = 0; bin < fspace->sinfo->nbins; bin++) {
@@ -1877,7 +1876,7 @@ H5FS_sect_iterate(H5F_t *f, H5FS_t *fspace, H5FS_operator_t op, void *op_data)
done:
/* Release the section info */
- if (sinfo_valid && H5FS__sinfo_unlock(f, fspace, FALSE) < 0)
+ if (sinfo_valid && H5FS__sinfo_unlock(f, fspace, false) < 0)
HDONE_ERROR(H5E_FSPACE, H5E_CANTRELEASE, FAIL, "can't release section info");
FUNC_LEAVE_NOAPI(ret_value)
@@ -1925,7 +1924,7 @@ H5FS_sect_change_class(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, uint
const H5FS_section_class_t *old_cls; /* Old class of section */
const H5FS_section_class_t *new_cls; /* New class of section */
unsigned old_class; /* Old class ID of section */
- hbool_t sinfo_valid = FALSE; /* Whether the section info is valid */
+ bool sinfo_valid = false; /* Whether the section info is valid */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1939,7 +1938,7 @@ H5FS_sect_change_class(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, uint
/* Get a pointer to the section info */
if (H5FS__sinfo_lock(f, fspace, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info");
- sinfo_valid = TRUE;
+ sinfo_valid = true;
/* Get class info */
old_class = sect->type;
@@ -1950,13 +1949,13 @@ H5FS_sect_change_class(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, uint
if ((old_cls->flags & H5FS_CLS_GHOST_OBJ) != (new_cls->flags & H5FS_CLS_GHOST_OBJ)) {
H5FS_node_t *fspace_node; /* Free list size node */
unsigned bin; /* Bin to put the free space section in */
- hbool_t to_ghost; /* Flag if the section is changing to a ghost section */
+ bool to_ghost; /* Flag if the section is changing to a ghost section */
/* Determine if this section is becoming a ghost or is becoming serializable */
if (old_cls->flags & H5FS_CLS_GHOST_OBJ)
- to_ghost = FALSE;
+ to_ghost = false;
else
- to_ghost = TRUE;
+ to_ghost = true;
/* Sanity check */
assert(fspace->sinfo->bins);
@@ -2013,13 +2012,13 @@ H5FS_sect_change_class(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, uint
/* Check if the section's class change will affect the mergeable list */
if ((old_cls->flags & H5FS_CLS_SEPAR_OBJ) != (new_cls->flags & H5FS_CLS_SEPAR_OBJ)) {
- hbool_t to_mergable; /* Flag if the section is changing to a mergeable section */
+ bool to_mergable; /* Flag if the section is changing to a mergeable section */
/* Determine if this section is becoming mergeable or is becoming separate */
if (old_cls->flags & H5FS_CLS_SEPAR_OBJ)
- to_mergable = TRUE;
+ to_mergable = true;
else
- to_mergable = FALSE;
+ to_mergable = false;
/* Add or remove section from merge list, as appropriate */
if (to_mergable) {
@@ -2053,7 +2052,7 @@ H5FS_sect_change_class(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, uint
done:
/* Release the section info */
- if (sinfo_valid && H5FS__sinfo_unlock(f, fspace, TRUE) < 0)
+ if (sinfo_valid && H5FS__sinfo_unlock(f, fspace, true) < 0)
HDONE_ERROR(H5E_FSPACE, H5E_CANTRELEASE, FAIL, "can't release section info");
FUNC_LEAVE_NOAPI(ret_value)
@@ -2207,16 +2206,16 @@ H5FS__sect_assert(const H5FS_t *fspace)
* Purpose: To shrink the last section on the merge list if the section
* is at EOF.
*
- * Return: TRUE/FALSE/FAIL
+ * Return: true/false/FAIL
*
*-------------------------------------------------------------------------
*/
htri_t
H5FS_sect_try_shrink_eoa(H5F_t *f, H5FS_t *fspace, void *op_data)
{
- hbool_t sinfo_valid = FALSE; /* Whether the section info is valid */
- hbool_t section_removed = FALSE; /* Whether a section was removed */
- htri_t ret_value = FALSE; /* Return value */
+ bool sinfo_valid = false; /* Whether the section info is valid */
+ bool section_removed = false; /* Whether a section was removed */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -2225,7 +2224,7 @@ H5FS_sect_try_shrink_eoa(H5F_t *f, H5FS_t *fspace, void *op_data)
if (H5FS__sinfo_lock(f, fspace, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info");
- sinfo_valid = TRUE;
+ sinfo_valid = true;
if (fspace->sinfo && fspace->sinfo->merge_list) {
H5SL_node_t *last_node; /* Last node in merge list */
@@ -2250,7 +2249,7 @@ H5FS_sect_try_shrink_eoa(H5F_t *f, H5FS_t *fspace, void *op_data)
if (H5FS__sect_remove_real(fspace, tmp_sect) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTRELEASE, FAIL,
"can't remove section from internal data structures");
- section_removed = TRUE;
+ section_removed = true;
/* Shrink away section */
if ((*tmp_sect_cls->shrink)(&tmp_sect, op_data) < 0)
diff --git a/src/H5Faccum.c b/src/H5Faccum.c
index e621e98283d..758b0150801 100644
--- a/src/H5Faccum.c
+++ b/src/H5Faccum.c
@@ -333,7 +333,7 @@ H5F__accum_adjust(H5F_meta_accum_t *accum, H5FD_t *file, H5F_accum_adjust_t adju
HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL, "file write failed");
/* Reset accumulator dirty flag */
- accum->dirty = FALSE;
+ accum->dirty = false;
} /* end if */
} /* end if */
else {
@@ -346,7 +346,7 @@ H5F__accum_adjust(H5F_meta_accum_t *accum, H5FD_t *file, H5F_accum_adjust_t adju
HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL, "file write failed");
/* Reset accumulator dirty flag */
- accum->dirty = FALSE;
+ accum->dirty = false;
} /* end if */
/* Adjust dirty region tracking info */
@@ -448,7 +448,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s
accum->dirty_len = size + accum->dirty_off + accum->dirty_len;
else {
accum->dirty_len = size;
- accum->dirty = TRUE;
+ accum->dirty = true;
} /* end else */
accum->dirty_off = 0;
} /* end if */
@@ -467,7 +467,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s
else {
accum->dirty_off = accum->size;
accum->dirty_len = size;
- accum->dirty = TRUE;
+ accum->dirty = true;
} /* end else */
/* Set the new size of the metadata accumulator */
@@ -505,7 +505,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s
else {
accum->dirty_off = dirty_off;
accum->dirty_len = size;
- accum->dirty = TRUE;
+ accum->dirty = true;
} /* end else */
} /* end if */
/* Check if the new metadata overlaps the beginning of the current accumulator */
@@ -546,7 +546,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s
else {
accum->dirty_off = 0;
accum->dirty_len = size;
- accum->dirty = TRUE;
+ accum->dirty = true;
} /* end else */
} /* end if */
/* Check if the new metadata overlaps the end of the current accumulator */
@@ -585,7 +585,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s
else {
accum->dirty_off = dirty_off;
accum->dirty_len = size;
- accum->dirty = TRUE;
+ accum->dirty = true;
} /* end else */
} /* end if */
/* New metadata overlaps both ends of the current accumulator */
@@ -620,7 +620,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s
/* Adjust the dirty region and mark accumulator dirty */
accum->dirty_off = 0;
accum->dirty_len = size;
- accum->dirty = TRUE;
+ accum->dirty = true;
} /* end else */
} /* end if */
/* New piece of metadata doesn't adjoin or overlap the existing accumulator */
@@ -632,7 +632,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed");
/* Reset accumulator dirty flag */
- accum->dirty = FALSE;
+ accum->dirty = false;
} /* end if */
/* Cache the new piece of metadata */
@@ -683,7 +683,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s
/* Adjust the dirty region and mark accumulator dirty */
accum->dirty_off = 0;
accum->dirty_len = size;
- accum->dirty = TRUE;
+ accum->dirty = true;
} /* end else */
} /* end if */
/* No metadata in the accumulator, grab this piece and keep it */
@@ -717,14 +717,14 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s
/* Adjust the dirty region and mark accumulator dirty */
accum->dirty_off = 0;
accum->dirty_len = size;
- accum->dirty = TRUE;
+ accum->dirty = true;
} /* end else */
} /* end if */
else {
/* Make certain that data in accumulator is visible before new write */
if ((H5F_SHARED_INTENT(f_sh) & H5F_ACC_SWMR_WRITE) > 0)
/* Flush if dirty and reset accumulator */
- if (H5F__accum_reset(f_sh, TRUE) < 0)
+ if (H5F__accum_reset(f_sh, true) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTRESET, FAIL, "can't reset accumulator");
/* Write the data */
@@ -754,7 +754,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s
/* Check if entire dirty region is overwritten */
if (H5_addr_le(dirty_end, addr + size)) {
- accum->dirty = FALSE;
+ accum->dirty = false;
accum->dirty_len = 0;
} /* end if */
else {
@@ -775,7 +775,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s
} /* end if */
else { /* Access covers whole accumulator */
/* Reset accumulator, but don't flush */
- if (H5F__accum_reset(f_sh, FALSE) < 0)
+ if (H5F__accum_reset(f_sh, false) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTRESET, FAIL, "can't reset accumulator");
} /* end else */
} /* end if */
@@ -797,7 +797,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s
/* Check if entire dirty region is overwritten */
if (H5_addr_ge(dirty_start, addr)) {
- accum->dirty = FALSE;
+ accum->dirty = false;
accum->dirty_len = 0;
} /* end if */
else {
@@ -870,7 +870,7 @@ H5F__accum_free(H5F_shared_t *f_sh, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr
/* Reset the accumulator, but don't free buffer */
accum->loc = HADDR_UNDEF;
accum->size = 0;
- accum->dirty = FALSE;
+ accum->dirty = false;
} /* end if */
/* Block to free must end within the accumulator */
else {
@@ -900,7 +900,7 @@ H5F__accum_free(H5F_shared_t *f_sh, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr
} /* end if */
/* Block freed encompasses dirty region */
else
- accum->dirty = FALSE;
+ accum->dirty = false;
} /* end else */
} /* end if */
} /* end else */
@@ -947,7 +947,7 @@ H5F__accum_free(H5F_shared_t *f_sh, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr
} /* end if */
/* Reset dirty flag */
- accum->dirty = FALSE;
+ accum->dirty = false;
} /* end if */
/* Block to free begins at beginning of or in middle of dirty region */
else {
@@ -970,7 +970,7 @@ H5F__accum_free(H5F_shared_t *f_sh, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr
/* Check for block to free beginning at same location as dirty region */
if (H5_addr_eq(addr, dirty_start)) {
/* Reset dirty flag */
- accum->dirty = FALSE;
+ accum->dirty = false;
} /* end if */
/* Block to free eliminates end of dirty region */
else {
@@ -1021,7 +1021,7 @@ H5F__accum_flush(H5F_shared_t *f_sh)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed");
/* Reset the dirty flag */
- f_sh->accum.dirty = FALSE;
+ f_sh->accum.dirty = false;
} /* end if */
done:
@@ -1038,7 +1038,7 @@ H5F__accum_flush(H5F_shared_t *f_sh)
*-------------------------------------------------------------------------
*/
herr_t
-H5F__accum_reset(H5F_shared_t *f_sh, hbool_t flush)
+H5F__accum_reset(H5F_shared_t *f_sh, bool flush)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -1061,7 +1061,7 @@ H5F__accum_reset(H5F_shared_t *f_sh, hbool_t flush)
/* Reset the buffer sizes & location */
f_sh->accum.alloc_size = f_sh->accum.size = 0;
f_sh->accum.loc = HADDR_UNDEF;
- f_sh->accum.dirty = FALSE;
+ f_sh->accum.dirty = false;
f_sh->accum.dirty_len = 0;
} /* end if */
diff --git a/src/H5Fcwfs.c b/src/H5Fcwfs.c
index e05de9f539f..c946fa453e1 100644
--- a/src/H5Fcwfs.c
+++ b/src/H5Fcwfs.c
@@ -143,7 +143,7 @@ herr_t
H5F_cwfs_find_free_heap(H5F_t *f, size_t need, haddr_t *addr)
{
unsigned cwfsno; /* Local index for iterating over collections */
- hbool_t found = FALSE; /* Flag to indicate a heap with enough space was found */
+ bool found = false; /* Flag to indicate a heap with enough space was found */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -172,7 +172,7 @@ H5F_cwfs_find_free_heap(H5F_t *f, size_t need, haddr_t *addr)
for (cwfsno = 0; cwfsno < f->shared->ncwfs; cwfsno++)
if (H5HG_FREE_SIZE(f->shared->cwfs[cwfsno]) >= need) {
*addr = H5HG_ADDR(f->shared->cwfs[cwfsno]);
- found = TRUE;
+ found = true;
break;
} /* end if */
@@ -196,12 +196,12 @@ H5F_cwfs_find_free_heap(H5F_t *f, size_t need, haddr_t *addr)
(hsize_t)H5HG_SIZE(f->shared->cwfs[cwfsno]), (hsize_t)new_need);
if (was_extended < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, FAIL, "error trying to extend heap");
- else if (was_extended == TRUE) {
+ else if (was_extended == true) {
if (H5HG_extend(f, H5HG_ADDR(f->shared->cwfs[cwfsno]), new_need) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, FAIL,
"unable to extend global heap collection");
*addr = H5HG_ADDR(f->shared->cwfs[cwfsno]);
- found = TRUE;
+ found = true;
break;
} /* end if */
} /* end if */
@@ -235,7 +235,7 @@ H5F_cwfs_find_free_heap(H5F_t *f, size_t need, haddr_t *addr)
*-------------------------------------------------------------------------
*/
herr_t
-H5F_cwfs_advance_heap(H5F_t *f, H5HG_heap_t *heap, hbool_t add_heap)
+H5F_cwfs_advance_heap(H5F_t *f, H5HG_heap_t *heap, bool add_heap)
{
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5Fdeprec.c b/src/H5Fdeprec.c
index 257b7b21deb..a3ae1d8958e 100644
--- a/src/H5Fdeprec.c
+++ b/src/H5Fdeprec.c
@@ -138,7 +138,7 @@ H5Fget_info1(hid_t obj_id, H5F_info1_t *finfo /*out*/)
* driver when attempting to open the file when in fact it
* should use all known file drivers.
*
- * Return: TRUE/FALSE/FAIL
+ * Return: true/false/FAIL
*
*-------------------------------------------------------------------------
*/
@@ -146,7 +146,7 @@ htri_t
H5Fis_hdf5(const char *name)
{
H5VL_file_specific_args_t vol_cb_args; /* Arguments to VOL callback */
- hbool_t is_accessible = FALSE; /* Whether file is accessible */
+ bool is_accessible = false; /* Whether file is accessible */
htri_t ret_value; /* Return value */
FUNC_ENTER_API((-1))
diff --git a/src/H5Fefc.c b/src/H5Fefc.c
index 194ecbe6da9..82de9e6dae0 100644
--- a/src/H5Fefc.c
+++ b/src/H5Fefc.c
@@ -132,7 +132,7 @@ H5F_t *
H5F__efc_open(H5F_efc_t *efc, const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id)
{
H5F_efc_ent_t *ent = NULL; /* Entry for target file in efc */
- hbool_t open_file = FALSE; /* Whether ent->file needs to be closed in case of error */
+ bool open_file = false; /* Whether ent->file needs to be closed in case of error */
H5P_genplist_t *plist; /* Property list pointer for FAPL */
H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */
H5F_t *ret_value = NULL; /* Return value */
@@ -263,7 +263,7 @@ H5F__efc_open(H5F_efc_t *efc, const char *name, unsigned flags, hid_t fcpl_id, h
/* Open the file */
if (NULL == (ent->file = H5F_open(name, flags, fcpl_id, fapl_id)))
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "can't open file");
- open_file = TRUE;
+ open_file = true;
/* Make file post open call */
if (H5F__post_open(ent->file) < 0)
diff --git a/src/H5Fint.c b/src/H5Fint.c
index 8f80e978d84..014f619d8a9 100644
--- a/src/H5Fint.c
+++ b/src/H5Fint.c
@@ -53,7 +53,7 @@ typedef struct H5F_olist_t {
hid_t *obj_id_list; /* Pointer to the list of open IDs to return */
size_t *obj_id_count; /* Number of open IDs */
struct {
- hbool_t local; /* Set flag for "local" file searches */
+ bool local; /* Set flag for "local" file searches */
union {
H5F_shared_t *shared; /* Pointer to shared file to look inside */
const H5F_t *file; /* Pointer to file to look inside */
@@ -74,24 +74,24 @@ typedef struct H5F_olist_t {
static herr_t H5F__close_cb(H5VL_object_t *file_vol_obj, void **request);
static herr_t H5F__set_vol_conn(H5F_t *file);
static herr_t H5F__get_objects(const H5F_t *f, unsigned types, size_t max_index, hid_t *obj_id_list,
- hbool_t app_ref, size_t *obj_id_count_ptr);
+ bool app_ref, size_t *obj_id_count_ptr);
static int H5F__get_objects_cb(void *obj_ptr, hid_t obj_id, void *key);
static herr_t H5F__build_name(const char *prefix, const char *file_name, char **full_name /*out*/);
static char *H5F__getenv_prefix_name(char **env_prefix /*in,out*/);
static H5F_t *H5F__new(H5F_shared_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5FD_t *lf);
-static herr_t H5F__check_if_using_file_locks(H5P_genplist_t *fapl, hbool_t *use_file_locking);
-static herr_t H5F__dest(H5F_t *f, hbool_t flush, hbool_t free_on_failure);
+static herr_t H5F__check_if_using_file_locks(H5P_genplist_t *fapl, bool *use_file_locking);
+static herr_t H5F__dest(H5F_t *f, bool flush, bool free_on_failure);
static herr_t H5F__build_actual_name(const H5F_t *f, const H5P_genplist_t *fapl, const char *name,
char ** /*out*/ actual_name);
static herr_t H5F__flush_phase1(H5F_t *f);
-static herr_t H5F__flush_phase2(H5F_t *f, hbool_t closing);
+static herr_t H5F__flush_phase2(H5F_t *f, bool closing);
/*********************/
/* Package Variables */
/*********************/
/* Based on the value of the HDF5_USE_FILE_LOCKING environment variable.
- * TRUE/FALSE have obvious meanings. FAIL means the environment variable was
+ * true/false have obvious meanings. FAIL means the environment variable was
* not set, so the code should ignore it and use the fapl value instead.
*/
htri_t use_locks_env_g = FAIL;
@@ -170,7 +170,7 @@ H5F_term_package(void)
FUNC_ENTER_NOAPI_NOINIT_NOERR
if (H5I_nmembers(H5I_FILE) > 0) {
- (void)H5I_clear_type(H5I_FILE, FALSE, FALSE);
+ (void)H5I_clear_type(H5I_FILE, false, false);
n++; /*H5I*/
} /* end if */
else {
@@ -244,12 +244,12 @@ H5F__parse_file_lock_env_var(htri_t *use_locks)
FUNC_ENTER_PACKAGE_NOERR
/* Check the file locking environment variable */
- lock_env_var = HDgetenv(HDF5_USE_FILE_LOCKING);
- if (lock_env_var && (!HDstrcmp(lock_env_var, "FALSE") || !HDstrcmp(lock_env_var, "0")))
- *use_locks = FALSE; /* Override: Never use locks */
- else if (lock_env_var && (!HDstrcmp(lock_env_var, "TRUE") || !HDstrcmp(lock_env_var, "BEST_EFFORT") ||
- !HDstrcmp(lock_env_var, "1")))
- *use_locks = TRUE; /* Override: Always use locks */
+ lock_env_var = getenv(HDF5_USE_FILE_LOCKING);
+ if (lock_env_var && (!strcmp(lock_env_var, "FALSE") || !strcmp(lock_env_var, "0")))
+ *use_locks = false; /* Override: Never use locks */
+ else if (lock_env_var && (!strcmp(lock_env_var, "TRUE") || !strcmp(lock_env_var, "BEST_EFFORT") ||
+ !strcmp(lock_env_var, "1")))
+ *use_locks = true; /* Override: Always use locks */
else
*use_locks = FAIL; /* Environment variable not set, or not set correctly */
@@ -299,7 +299,7 @@ H5F__set_vol_conn(H5F_t *file)
/* Cache the connector ID & info for the container */
file->shared->vol_id = connector_prop.connector_id;
file->shared->vol_info = new_connector_info;
- if (H5I_inc_ref(file->shared->vol_id, FALSE) < 0)
+ if (H5I_inc_ref(file->shared->vol_id, false) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINC, FAIL, "incrementing VOL connector ID failed");
done:
@@ -323,12 +323,12 @@ H5F__set_vol_conn(H5F_t *file)
*-------------------------------------------------------------------------
*/
hid_t
-H5F_get_access_plist(H5F_t *f, hbool_t app_ref)
+H5F_get_access_plist(H5F_t *f, bool app_ref)
{
H5P_genplist_t *new_plist; /* New property list */
H5P_genplist_t *old_plist; /* Old property list */
H5FD_driver_prop_t driver_prop; /* Property for driver ID & info */
- hbool_t driver_prop_copied = FALSE; /* Whether the driver property has been set up */
+ bool driver_prop_copied = false; /* Whether the driver property has been set up */
H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */
unsigned efc_size = 0;
hid_t ret_value = H5I_INVALID_HID; /* Return value */
@@ -426,7 +426,7 @@ H5F_get_access_plist(H5F_t *f, hbool_t app_ref)
driver_prop.driver_id = f->shared->lf->driver_id;
driver_prop.driver_info = H5FD_fapl_get(f->shared->lf);
driver_prop.driver_config_str = H5P_peek_driver_config_str(old_plist);
- driver_prop_copied = TRUE;
+ driver_prop_copied = true;
/* Set the driver property */
if (H5P_set(new_plist, H5F_ACS_FILE_DRV_NAME, &driver_prop) < 0)
@@ -464,7 +464,7 @@ H5F_get_access_plist(H5F_t *f, hbool_t app_ref)
*-------------------------------------------------------------------------
*/
herr_t
-H5F_get_obj_count(const H5F_t *f, unsigned types, hbool_t app_ref, size_t *obj_id_count_ptr)
+H5F_get_obj_count(const H5F_t *f, unsigned types, bool app_ref, size_t *obj_id_count_ptr)
{
herr_t ret_value = SUCCEED;
@@ -490,7 +490,7 @@ H5F_get_obj_count(const H5F_t *f, unsigned types, hbool_t app_ref, size_t *obj_i
*-------------------------------------------------------------------------
*/
herr_t
-H5F_get_obj_ids(const H5F_t *f, unsigned types, size_t max_objs, hid_t *oid_list, hbool_t app_ref,
+H5F_get_obj_ids(const H5F_t *f, unsigned types, size_t max_objs, hid_t *oid_list, bool app_ref,
size_t *obj_id_count_ptr)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -519,7 +519,7 @@ H5F_get_obj_ids(const H5F_t *f, unsigned types, size_t max_objs, hid_t *oid_list
*---------------------------------------------------------------------------
*/
static herr_t
-H5F__get_objects(const H5F_t *f, unsigned types, size_t max_nobjs, hid_t *obj_id_list, hbool_t app_ref,
+H5F__get_objects(const H5F_t *f, unsigned types, size_t max_nobjs, hid_t *obj_id_list, bool app_ref,
size_t *obj_id_count_ptr)
{
size_t obj_id_count = 0; /* Number of open IDs */
@@ -539,11 +539,11 @@ H5F__get_objects(const H5F_t *f, unsigned types, size_t max_nobjs, hid_t *obj_id
/* Determine if we are searching for local or global objects */
if (types & H5F_OBJ_LOCAL) {
- olist.file_info.local = TRUE;
+ olist.file_info.local = true;
olist.file_info.ptr.file = f;
} /* end if */
else {
- olist.file_info.local = FALSE;
+ olist.file_info.local = false;
olist.file_info.ptr.shared = f ? f->shared : NULL;
} /* end else */
@@ -625,7 +625,7 @@ static int
H5F__get_objects_cb(void *obj_ptr, hid_t obj_id, void *key)
{
H5F_olist_t *olist = (H5F_olist_t *)key; /* Alias for search info */
- hbool_t add_obj = FALSE;
+ bool add_obj = false;
int ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_PACKAGE
@@ -641,7 +641,7 @@ H5F__get_objects_cb(void *obj_ptr, hid_t obj_id, void *key)
(!olist->file_info.local &&
(!olist->file_info.ptr.shared ||
(olist->file_info.ptr.shared && ((H5F_t *)obj_ptr)->shared == olist->file_info.ptr.shared)))) {
- add_obj = TRUE;
+ add_obj = true;
} /* end if */
} /* end if */
else { /* Either count opened object IDs or put the IDs on the list */
@@ -661,7 +661,7 @@ H5F__get_objects_cb(void *obj_ptr, hid_t obj_id, void *key)
break;
case H5I_DATATYPE:
- if (H5T_is_named((H5T_t *)obj_ptr) == TRUE)
+ if (H5T_is_named((H5T_t *)obj_ptr) == true)
oloc = H5T_oloc((H5T_t *)obj_ptr);
else
oloc = NULL;
@@ -690,15 +690,15 @@ H5F__get_objects_cb(void *obj_ptr, hid_t obj_id, void *key)
} /* end switch */
if ((olist->file_info.local && ((!olist->file_info.ptr.file && olist->obj_type == H5I_DATATYPE &&
- H5T_is_immutable((H5T_t *)obj_ptr) == FALSE) ||
+ H5T_is_immutable((H5T_t *)obj_ptr) == false) ||
(!olist->file_info.ptr.file && olist->obj_type != H5I_DATATYPE) ||
(oloc && oloc->file == olist->file_info.ptr.file))) ||
(!olist->file_info.local &&
((!olist->file_info.ptr.shared && olist->obj_type == H5I_DATATYPE &&
- H5T_is_immutable((H5T_t *)obj_ptr) == FALSE) ||
+ H5T_is_immutable((H5T_t *)obj_ptr) == false) ||
(!olist->file_info.ptr.shared && olist->obj_type != H5I_DATATYPE) ||
(oloc && oloc->file && oloc->file->shared == olist->file_info.ptr.shared)))) {
- add_obj = TRUE;
+ add_obj = true;
} /* end if */
} /* end else */
@@ -742,8 +742,8 @@ H5F__build_name(const char *prefix, const char *file_name, char **full_name /*ou
FUNC_ENTER_PACKAGE
- prefix_len = HDstrlen(prefix);
- fname_len = HDstrlen(file_name);
+ prefix_len = strlen(prefix);
+ fname_len = strlen(file_name);
/* Allocate a buffer to hold the filename + prefix + possibly the delimiter + terminating null byte */
if (NULL == (*full_name = (char *)H5MM_malloc(prefix_len + fname_len + 2 +
@@ -751,10 +751,9 @@ H5F__build_name(const char *prefix, const char *file_name, char **full_name /*ou
HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "unable to allocate filename buffer");
/* Compose the full file name */
- HDsnprintf(*full_name, (prefix_len + fname_len + 2 + 2), "%s%s%s",
- prefix, /* Extra "+2" to quiet GCC warning - 2019/07/05, QAK */
- ((prefix_len == 0 || H5_CHECK_DELIMITER(prefix[prefix_len - 1])) ? "" : H5_DIR_SEPS),
- file_name);
+ snprintf(*full_name, (prefix_len + fname_len + 2 + 2), "%s%s%s",
+ prefix, /* Extra "+2" to quiet GCC warning - 2019/07/05, QAK */
+ ((prefix_len == 0 || H5_CHECK_DELIMITER(prefix[prefix_len - 1])) ? "" : H5_DIR_SEPS), file_name);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -782,7 +781,7 @@ H5F__getenv_prefix_name(char **env_prefix /*in,out*/)
ret_value = *env_prefix;
/* Advance to next component, if possible */
- strret = HDstrchr(*env_prefix, H5_COLON_SEPC);
+ strret = strchr(*env_prefix, H5_COLON_SEPC);
if (strret == NULL)
*env_prefix = NULL;
else {
@@ -829,7 +828,7 @@ H5F_prefix_open_file(H5F_t *primary_file, H5F_prefix_open_t prefix_type, const c
/* Copy the file name to use */
if (NULL == (temp_file_name = H5MM_strdup(file_name)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
- temp_file_name_len = HDstrlen(temp_file_name);
+ temp_file_name_len = strlen(temp_file_name);
/* Target file_name is an absolute pathname: see RM for detailed description */
if (H5_CHECK_ABSOLUTE(file_name) || H5_CHECK_ABS_PATH(file_name)) {
@@ -851,7 +850,7 @@ H5F_prefix_open_file(H5F_t *primary_file, H5F_prefix_open_t prefix_type, const c
ptr++;
/* Copy into the temp. file name */
- HDstrncpy(temp_file_name, ptr, temp_file_name_len);
+ strncpy(temp_file_name, ptr, temp_file_name_len);
temp_file_name[temp_file_name_len - 1] = '\0';
} /* end if */
} /* end if */
@@ -865,7 +864,7 @@ H5F_prefix_open_file(H5F_t *primary_file, H5F_prefix_open_t prefix_type, const c
H5E_clear_stack(NULL);
/* Strip ":" */
- HDstrncpy(temp_file_name, &file_name[2], temp_file_name_len);
+ strncpy(temp_file_name, &file_name[2], temp_file_name_len);
temp_file_name[temp_file_name_len - 1] = '\0';
} /* end if */
} /* end if */
@@ -876,9 +875,9 @@ H5F_prefix_open_file(H5F_t *primary_file, H5F_prefix_open_t prefix_type, const c
/* Get the appropriate environment variable */
if (H5F_PREFIX_VDS == prefix_type)
- env_prefix = HDgetenv("HDF5_VDS_PREFIX");
+ env_prefix = getenv("HDF5_VDS_PREFIX");
else if (H5F_PREFIX_ELINK == prefix_type)
- env_prefix = HDgetenv("HDF5_EXT_PREFIX");
+ env_prefix = getenv("HDF5_EXT_PREFIX");
else
HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, NULL, "prefix type is not sensible");
@@ -1026,7 +1025,7 @@ H5F_prefix_open_file(H5F_t *primary_file, H5F_prefix_open_t prefix_type, const c
*
* Purpose: Check the file signature to detect an HDF5 file.
*
- * Return: TRUE/FALSE/FAIL
+ * Return: true/false/FAIL
*-------------------------------------------------------------------------
*/
htri_t
@@ -1053,7 +1052,7 @@ H5F__is_hdf5(const char *name, hid_t fapl_id)
* to read through it will fail so we have to try this first.
*/
if ((shared = H5F__sfile_search(file)) != NULL)
- ret_value = TRUE;
+ ret_value = true;
else {
/* The file is an HDF5 file if the HDF5 file signature can be found */
if (H5FD_locate_signature(file, &sig_addr) < 0)
@@ -1064,7 +1063,7 @@ H5F__is_hdf5(const char *name, hid_t fapl_id)
done:
/* Close the file */
if (file)
- if (H5FD_close(file) < 0 && TRUE == ret_value)
+ if (H5FD_close(file) < 0 && true == ret_value)
HDONE_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "unable to close file");
FUNC_LEAVE_NOAPI(ret_value)
@@ -1096,7 +1095,7 @@ H5F__new(H5F_shared_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5F
if (NULL == (f = H5FL_CALLOC(H5F_t)))
HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate top file structure");
- f->id_exists = FALSE;
+ f->id_exists = false;
if (shared) {
assert(lf == NULL);
@@ -1132,7 +1131,7 @@ H5F__new(H5F_shared_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5F
f->shared->pgend_meta_thres = H5F_FILE_SPACE_PGEND_META_THRES;
/* initialize point of no return */
- f->shared->point_of_no_return = FALSE;
+ f->shared->point_of_no_return = false;
/* Copy the file creation and file access property lists into the
* new file handle. We do this early because some values might need
@@ -1140,7 +1139,7 @@ H5F__new(H5F_shared_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5F
*/
if (NULL == (plist = (H5P_genplist_t *)H5I_object(fcpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not property list");
- f->shared->fcpl_id = H5P_copy_plist(plist, FALSE);
+ f->shared->fcpl_id = H5P_copy_plist(plist, false);
/* Get the FCPL values to cache */
if (H5P_get(plist, H5F_CRT_ADDR_BYTE_NUM_NAME, &f->shared->sizeof_addr) < 0)
@@ -1280,11 +1279,11 @@ H5F__new(H5F_shared_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5F
if (H5P_get(plist, H5F_ACS_MDC_LOG_LOCATION_NAME, &mdc_log_location) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get mdc log location");
if (mdc_log_location != NULL) {
- size_t len = HDstrlen(mdc_log_location);
+ size_t len = strlen(mdc_log_location);
if (NULL == (f->shared->mdc_log_location = (char *)H5MM_calloc((len + 1) * sizeof(char))))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL,
"can't allocate memory for mdc log file name");
- HDstrncpy(f->shared->mdc_log_location, mdc_log_location, len);
+ strncpy(f->shared->mdc_log_location, mdc_log_location, len);
}
else
f->shared->mdc_log_location = NULL;
@@ -1357,7 +1356,7 @@ H5F__new(H5F_shared_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5F
*-------------------------------------------------------------------------
*/
static herr_t
-H5F__dest(H5F_t *f, hbool_t flush, hbool_t free_on_failure)
+H5F__dest(H5F_t *f, bool flush, bool free_on_failure)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -1371,7 +1370,7 @@ H5F__dest(H5F_t *f, hbool_t flush, hbool_t free_on_failure)
int actype; /* metadata cache type (enum value) */
/* Mark this file as closing */
- f->shared->closing = TRUE;
+ f->shared->closing = true;
/* Flush at this point since the file will be closed (phase 1).
* Only try to flush the file if it was opened with write access, and if
@@ -1395,7 +1394,7 @@ H5F__dest(H5F_t *f, hbool_t flush, hbool_t free_on_failure)
* the caller requested a flush.
*/
if ((H5F_ACC_RDWR & H5F_INTENT(f)) && flush)
- if (H5F__flush_phase2(f, TRUE) < 0)
+ if (H5F__flush_phase2(f, true) < 0)
/* Push error, but keep going */
HDONE_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush cached data (phase 2)");
@@ -1476,7 +1475,7 @@ H5F__dest(H5F_t *f, hbool_t flush, hbool_t free_on_failure)
HDONE_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "can't release file space");
/* Truncate the file to the current allocated size */
- if (H5FD_truncate(f->shared->lf, TRUE) < 0)
+ if (H5FD_truncate(f->shared->lf, true) < 0)
/* Push error, but keep going*/
HDONE_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL, "low level truncate failed");
@@ -1544,7 +1543,7 @@ H5F__dest(H5F_t *f, hbool_t flush, hbool_t free_on_failure)
} /* end if */
/* Destroy other components of the file */
- if (H5F__accum_reset(f->shared, TRUE) < 0)
+ if (H5F__accum_reset(f->shared, true) < 0)
/* Push error, but keep going*/
HDONE_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "problems closing file");
if (H5FO_dest(f) < 0)
@@ -1654,14 +1653,14 @@ H5F__dest(H5F_t *f, hbool_t flush, hbool_t free_on_failure)
*-------------------------------------------------------------------------
*/
static herr_t
-H5F__check_if_using_file_locks(H5P_genplist_t *fapl, hbool_t *use_file_locking)
+H5F__check_if_using_file_locks(H5P_genplist_t *fapl, bool *use_file_locking)
{
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
/* Make sure the out parameter has a value */
- *use_file_locking = TRUE;
+ *use_file_locking = true;
/* Check the fapl property */
if (H5P_get(fapl, H5F_ACS_USE_FILE_LOCKING_NAME, use_file_locking) < 0)
@@ -1669,7 +1668,7 @@ H5F__check_if_using_file_locks(H5P_genplist_t *fapl, hbool_t *use_file_locking)
/* Check the environment variable */
if (use_locks_env_g != FAIL)
- *use_file_locking = (use_locks_env_g == TRUE) ? TRUE : FALSE;
+ *use_file_locking = (use_locks_env_g == true) ? true : false;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1761,12 +1760,12 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id)
size_t page_buf_size;
unsigned page_buf_min_meta_perc = 0;
unsigned page_buf_min_raw_perc = 0;
- hbool_t set_flag = FALSE; /*set the status_flags in the superblock */
- hbool_t clear = FALSE; /*clear the status_flags */
- hbool_t evict_on_close; /* evict on close value from plist */
- hbool_t use_file_locking = TRUE; /* Using file locks? */
- hbool_t ci_load = FALSE; /* whether MDC ci load requested */
- hbool_t ci_write = FALSE; /* whether MDC CI write requested */
+ bool set_flag = false; /*set the status_flags in the superblock */
+ bool clear = false; /*clear the status_flags */
+ bool evict_on_close; /* evict on close value from plist */
+ bool use_file_locking = true; /* Using file locks? */
+ bool ci_load = false; /* whether MDC ci load requested */
+ bool ci_write = false; /* whether MDC CI write requested */
H5F_t *ret_value = NULL; /*actual return value */
FUNC_ENTER_NOAPI(NULL)
@@ -1904,7 +1903,7 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id)
/* Place an advisory lock on the file */
if (use_file_locking)
- if (H5FD_lock(lf, (hbool_t)((flags & H5F_ACC_RDWR) ? TRUE : FALSE)) < 0) {
+ if (H5FD_lock(lf, (bool)((flags & H5F_ACC_RDWR) ? true : false)) < 0) {
/* Locking failed - Closing will remove the lock */
if (H5FD_close(lf) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, NULL, "unable to close low-level file info");
@@ -1924,7 +1923,7 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id)
/* Need to set status_flags in the superblock if the driver has a 'lock' method */
if (drvr->lock)
- set_flag = TRUE;
+ set_flag = true;
} /* end else */
/* Check to see if both SWMR and cache image are requested. Fail if so */
@@ -1994,12 +1993,12 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id)
/* (This must be after the space for the superblock is allocated in
* the file, since the superblock must be at offset 0)
*/
- if (H5G_mkroot(file, TRUE) < 0)
+ if (H5G_mkroot(file, true) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to create/open root group");
} /* end if */
else if (1 == shared->nrefs) {
/* Read the superblock if it hasn't been read before. */
- if (H5F__super_read(file, a_plist, TRUE) < 0)
+ if (H5F__super_read(file, a_plist, true) < 0)
HGOTO_ERROR(H5E_FILE, H5E_READERROR, NULL, "unable to read superblock");
/* Create the page buffer before initializing the superblock */
@@ -2008,7 +2007,7 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to create page buffer");
/* Open the root group */
- if (H5G_mkroot(file, FALSE) < 0)
+ if (H5G_mkroot(file, false) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to read root group");
} /* end if */
@@ -2121,7 +2120,7 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id)
done:
if ((NULL == ret_value) && file)
- if (H5F__dest(file, FALSE, TRUE) < 0)
+ if (H5F__dest(file, false, true) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, NULL, "problems closing file");
FUNC_LEAVE_NOAPI(ret_value)
@@ -2202,7 +2201,7 @@ H5F__flush_phase1(H5F_t *f)
*-------------------------------------------------------------------------
*/
static herr_t
-H5F__flush_phase2(H5F_t *f, hbool_t closing)
+H5F__flush_phase2(H5F_t *f, bool closing)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -2228,7 +2227,7 @@ H5F__flush_phase2(H5F_t *f, hbool_t closing)
* entry to the mpio file driver truncate call below, and the first
* barrier in the following call to flush the cache again.
*/
- H5CX_set_mpi_file_flushing(TRUE);
+ H5CX_set_mpi_file_flushing(true);
}
#endif /* H5_HAVE_PARALLEL */
@@ -2245,7 +2244,7 @@ H5F__flush_phase2(H5F_t *f, hbool_t closing)
#ifdef H5_HAVE_PARALLEL
if (H5F_HAS_FEATURE(f, H5FD_FEAT_HAS_MPI))
/* Reset the "flushing the file" flag */
- H5CX_set_mpi_file_flushing(FALSE);
+ H5CX_set_mpi_file_flushing(false);
#endif /* H5_HAVE_PARALLEL */
/* Inform the metadata cache that we are done with the flush */
@@ -2296,7 +2295,7 @@ H5F__flush(H5F_t *f)
HDONE_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush file data");
/* Second phase of flushing data */
- if (H5F__flush_phase2(f, FALSE) < 0)
+ if (H5F__flush_phase2(f, false) < 0)
/* Push error, but keep going*/
HDONE_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush file data");
@@ -2355,7 +2354,7 @@ H5F__close(H5F_t *f)
}
/* Reset the file ID for this file */
- f->id_exists = FALSE;
+ f->id_exists = false;
/* Attempt to close the file/mount hierarchy */
if (H5F_try_close(f, NULL) < 0)
@@ -2403,7 +2402,7 @@ H5F__delete(const char *filename, hid_t fapl_id)
*-------------------------------------------------------------------------
*/
herr_t
-H5F_try_close(H5F_t *f, hbool_t *was_closed /*out*/)
+H5F_try_close(H5F_t *f, bool *was_closed /*out*/)
{
unsigned nopen_files = 0; /* Number of open files in file/mount hierarchy */
unsigned nopen_objs = 0; /* Number of open objects in file/mount hierarchy */
@@ -2422,12 +2421,12 @@ H5F_try_close(H5F_t *f, hbool_t *was_closed /*out*/)
* this value by passing in NULL.
*/
if (was_closed)
- *was_closed = FALSE;
+ *was_closed = false;
/* Check if this file is already in the process of closing */
if (f->closing) {
if (was_closed)
- *was_closed = TRUE;
+ *was_closed = true;
HGOTO_DONE(SUCCEED);
}
@@ -2486,7 +2485,7 @@ H5F_try_close(H5F_t *f, hbool_t *was_closed /*out*/)
} /* end switch */
/* Mark this file as closing (prevents re-entering file shutdown code below) */
- f->closing = TRUE;
+ f->closing = true;
/* If the file close degree is "strong", close all the open objects in this file */
if (f->shared->fc_degree == H5F_CLOSE_STRONG) {
@@ -2502,7 +2501,7 @@ H5F_try_close(H5F_t *f, hbool_t *was_closed /*out*/)
/* Get the list of IDs of open dataset, group, & attribute objects */
while ((result = H5F_get_obj_ids(
f, H5F_OBJ_LOCAL | H5F_OBJ_DATASET | H5F_OBJ_GROUP | H5F_OBJ_ATTR,
- (int)(sizeof(objs) / sizeof(objs[0])), objs, FALSE, &obj_count)) <= 0 &&
+ (int)(sizeof(objs) / sizeof(objs[0])), objs, false, &obj_count)) <= 0 &&
obj_count != 0) {
/* Try to close all the open objects in this file */
@@ -2519,7 +2518,7 @@ H5F_try_close(H5F_t *f, hbool_t *was_closed /*out*/)
* open named datatype ID will get closed twice)
*/
while ((result = H5F_get_obj_ids(f, H5F_OBJ_LOCAL | H5F_OBJ_DATATYPE,
- (int)(sizeof(objs) / sizeof(objs[0])), objs, FALSE,
+ (int)(sizeof(objs) / sizeof(objs[0])), objs, false,
&obj_count)) <= 0 &&
obj_count != 0) {
@@ -2556,12 +2555,12 @@ H5F_try_close(H5F_t *f, hbool_t *was_closed /*out*/)
* shared H5F_shared_t struct. If the reference count for the H5F_shared_t
* struct reaches zero then destroy it also.
*/
- if (H5F__dest(f, TRUE, FALSE) < 0)
+ if (H5F__dest(f, true, false) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "problems closing file");
- /* Since we closed the file, this should be set to TRUE */
+ /* Since we closed the file, this should be set to true */
if (was_closed)
- *was_closed = TRUE;
+ *was_closed = true;
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_try_close() */
@@ -2623,13 +2622,13 @@ H5F_get_id(H5F_t *file)
if (H5I_find_id(file, H5I_FILE, &ret_value) < 0 || H5I_INVALID_HID == ret_value) {
/* resurrect the ID - Register an ID with the native connector */
- if ((ret_value = H5VL_wrap_register(H5I_FILE, file, FALSE)) < 0)
+ if ((ret_value = H5VL_wrap_register(H5I_FILE, file, false)) < 0)
HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register group");
- file->id_exists = TRUE;
+ file->id_exists = true;
}
else {
/* Increment reference count on existing ID */
- if (H5I_inc_ref(ret_value, FALSE) < 0)
+ if (H5I_inc_ref(ret_value, false) < 0)
HGOTO_ERROR(H5E_ID, H5E_CANTINC, H5I_INVALID_HID, "incrementing file ID failed");
} /* end else */
@@ -2727,7 +2726,7 @@ H5F__build_actual_name(const H5F_t *f, const H5P_genplist_t *fapl, const char *n
int *fd; /* POSIX I/O file descriptor */
h5_stat_t st; /* Stat info from stat() call */
h5_stat_t fst; /* Stat info from fstat() call */
- hbool_t want_posix_fd; /* Flag for retrieving file descriptor from VFD */
+ bool want_posix_fd; /* Flag for retrieving file descriptor from VFD */
/* Allocate realname buffer */
if (NULL == (realname = (char *)H5MM_calloc((size_t)PATH_MAX * sizeof(char))))
@@ -2741,7 +2740,7 @@ H5F__build_actual_name(const H5F_t *f, const H5P_genplist_t *fapl, const char *n
*/
/* Copy the FAPL object to modify */
- if ((new_fapl_id = H5P_copy_plist(fapl, FALSE)) < 0)
+ if ((new_fapl_id = H5P_copy_plist(fapl, false)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTCOPY, FAIL, "unable to copy file access property list");
if (NULL == (new_fapl = (H5P_genplist_t *)H5I_object(new_fapl_id)))
HGOTO_ERROR(H5E_FILE, H5E_CANTCREATE, FAIL, "can't get property list");
@@ -2750,7 +2749,7 @@ H5F__build_actual_name(const H5F_t *f, const H5P_genplist_t *fapl, const char *n
* Set the private property for retrieving the backing store
* POSIX file descriptor from the Core VFD
*/
- want_posix_fd = TRUE;
+ want_posix_fd = true;
if (H5P_set(new_fapl, H5F_ACS_WANT_POSIX_FD_NAME, &want_posix_fd) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL,
"can't set property for retrieving file descriptor");
@@ -2877,7 +2876,7 @@ H5F_addr_encode(const H5F_t *f, uint8_t **pp /*in,out*/, haddr_t addr)
void
H5F_addr_decode_len(size_t addr_len, const uint8_t **pp /*in,out*/, haddr_t *addr_p /*out*/)
{
- hbool_t all_zero = TRUE; /* True if address was all zeroes */
+ bool all_zero = true; /* True if address was all zeroes */
unsigned u; /* Local index variable */
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
@@ -2899,7 +2898,7 @@ H5F_addr_decode_len(size_t addr_len, const uint8_t **pp /*in,out*/, haddr_t *add
/* Check for non-undefined address byte value */
if (c != 0xff)
- all_zero = FALSE;
+ all_zero = false;
if (u < sizeof(*addr_p)) {
haddr_t tmp = c; /* Local copy of address, for casting */
@@ -2914,7 +2913,7 @@ H5F_addr_decode_len(size_t addr_len, const uint8_t **pp /*in,out*/, haddr_t *add
assert(0 == **pp); /*overflow */
} /* end for */
- /* If 'all_zero' is still TRUE, the address was entirely composed of '0xff'
+ /* If 'all_zero' is still true, the address was entirely composed of '0xff'
* bytes, which is the encoded form of 'HADDR_UNDEF', so set the destination
* to that value */
if (all_zero)
@@ -3051,7 +3050,7 @@ H5F_set_sohm_nindexes(H5F_t *f, unsigned nindexes)
*-------------------------------------------------------------------------
*/
herr_t
-H5F_set_store_msg_crt_idx(H5F_t *f, hbool_t flag)
+H5F_set_store_msg_crt_idx(H5F_t *f, bool flag)
{
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -3166,7 +3165,7 @@ H5F__get_file_image(H5F_t *file, void *buf_ptr, size_t buf_len, size_t *image_le
*
* JRM -- 11/11/22
*/
- if (HDstrcmp(fd_ptr->cls->name, "multi") == 0)
+ if (strcmp(fd_ptr->cls->name, "multi") == 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Not supported for multi file driver.");
/* While the family file driver is conceptually fully compatible
@@ -3188,7 +3187,7 @@ H5F__get_file_image(H5F_t *file, void *buf_ptr, size_t buf_len, size_t *image_le
* in the future.
* JRM -- 12/21/11
*/
- if (HDstrcmp(fd_ptr->cls->name, "family") == 0)
+ if (strcmp(fd_ptr->cls->name, "family") == 0)
HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "Not supported for family file driver.");
/* Go get the actual file size */
@@ -3307,7 +3306,7 @@ H5F_track_metadata_read_retries(H5F_t *f, unsigned actype, unsigned retries)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed");
/* Index to retries based on log10 */
- tmp = HDlog10((double)retries);
+ tmp = log10((double)retries);
log_ind = (unsigned)tmp;
assert(log_ind < f->shared->retries_nbins);
@@ -3345,9 +3344,9 @@ H5F_set_retries(H5F_t *f)
/* Initialize the # of bins for retries */
f->shared->retries_nbins = 0;
if (f->shared->read_attempts > 1) {
- /* Use HDceil to ensure that the log10 value is rounded up to the
+ /* Use ceil to ensure that the log10 value is rounded up to the
nearest integer before casting to unsigned */
- tmp = HDceil(HDlog10((double)f->shared->read_attempts));
+ tmp = ceil(log10((double)f->shared->read_attempts));
f->shared->retries_nbins = (unsigned)tmp;
}
@@ -3446,7 +3445,7 @@ H5F__set_eoa(const H5F_t *f, H5F_mem_t type, haddr_t addr)
*-------------------------------------------------------------------------
*/
herr_t
-H5F__set_paged_aggr(const H5F_t *f, hbool_t paged)
+H5F__set_paged_aggr(const H5F_t *f, bool paged)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -3626,8 +3625,8 @@ H5F_get_metadata_read_retry_info(H5F_t *file, H5F_retry_info_t *info)
herr_t
H5F__start_swmr_write(H5F_t *f)
{
- hbool_t ci_load = FALSE; /* whether MDC ci load requested */
- hbool_t ci_write = FALSE; /* whether MDC CI write requested */
+ bool ci_load = false; /* whether MDC ci load requested */
+ bool ci_write = false; /* whether MDC CI write requested */
size_t grp_dset_count = 0; /* # of open objects: groups & datasets */
size_t nt_attr_count = 0; /* # of opened named datatypes + opened attributes */
hid_t *obj_ids = NULL; /* List of ids */
@@ -3636,7 +3635,7 @@ H5F__start_swmr_write(H5F_t *f)
H5O_loc_t *obj_olocs = NULL; /* Object location */
H5G_name_t *obj_paths = NULL; /* Group hierarchy path */
size_t u; /* Local index variable */
- hbool_t setup = FALSE; /* Boolean flag to indicate whether SWMR setting is enabled */
+ bool setup = false; /* Boolean flag to indicate whether SWMR setting is enabled */
H5VL_t *vol_connector = NULL; /* VOL connector for the file */
herr_t ret_value = SUCCEED; /* Return value */
@@ -3678,13 +3677,13 @@ H5F__start_swmr_write(H5F_t *f)
HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush file's cached information");
/* Get the # of opened named datatypes and attributes */
- if (H5F_get_obj_count(f, H5F_OBJ_DATATYPE | H5F_OBJ_ATTR, FALSE, &nt_attr_count) < 0)
+ if (H5F_get_obj_count(f, H5F_OBJ_DATATYPE | H5F_OBJ_ATTR, false, &nt_attr_count) < 0)
HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "H5F_get_obj_count failed");
if (nt_attr_count > 0)
HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "named datatypes and/or attributes opened in the file");
/* Get the # of opened datasets and groups */
- if (H5F_get_obj_count(f, H5F_OBJ_GROUP | H5F_OBJ_DATASET, FALSE, &grp_dset_count) < 0)
+ if (H5F_get_obj_count(f, H5F_OBJ_GROUP | H5F_OBJ_DATASET, false, &grp_dset_count) < 0)
HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "H5F_get_obj_count failed");
if (grp_dset_count > 0) {
@@ -3706,7 +3705,7 @@ H5F__start_swmr_write(H5F_t *f)
assert(obj_apl_ids[0] == H5P_DEFAULT);
/* Get the list of opened object ids (groups & datasets) */
- if (H5F_get_obj_ids(f, H5F_OBJ_GROUP | H5F_OBJ_DATASET, grp_dset_count, obj_ids, FALSE,
+ if (H5F_get_obj_ids(f, H5F_OBJ_GROUP | H5F_OBJ_DATASET, grp_dset_count, obj_ids, false,
&grp_dset_count) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "H5F_get_obj_ids failed");
@@ -3796,7 +3795,7 @@ H5F__start_swmr_write(H5F_t *f)
} /* end if */
/* Flush and reset the accumulator */
- if (H5F__accum_reset(f->shared, TRUE) < 0)
+ if (H5F__accum_reset(f->shared, true) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTRESET, FAIL, "can't reset accumulator");
/* Turn on SWMR write in shared file open flags */
@@ -3817,7 +3816,7 @@ H5F__start_swmr_write(H5F_t *f)
if (H5FD_set_feature_flags(f->shared->lf, f->shared->feature_flags) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set feature_flags in VFD");
- setup = TRUE;
+ setup = true;
/* Place an advisory lock on the file */
if (H5F_USE_FILE_LOCKING(f)) {
@@ -3827,7 +3826,7 @@ H5F__start_swmr_write(H5F_t *f)
if (H5FD_unlock(f->shared->lf) < 0) {
HGOTO_ERROR(H5E_FILE, H5E_CANTUNLOCKFILE, FAIL, "unable to unlock the file");
}
- if (H5FD_lock(f->shared->lf, TRUE) < 0) {
+ if (H5FD_lock(f->shared->lf, true) < 0) {
HGOTO_ERROR(H5E_FILE, H5E_CANTLOCKFILE, FAIL, "unable to lock the file");
}
}
@@ -3846,7 +3845,7 @@ H5F__start_swmr_write(H5F_t *f)
/* Refresh (reopen) the objects (groups & datasets) in the file */
for (u = 0; u < grp_dset_count; u++)
- if (H5O_refresh_metadata_reopen(obj_ids[u], obj_apl_ids[u], &obj_glocs[u], vol_connector, TRUE) < 0)
+ if (H5O_refresh_metadata_reopen(obj_ids[u], obj_apl_ids[u], &obj_glocs[u], vol_connector, true) < 0)
HGOTO_ERROR(H5E_ID, H5E_CLOSEERROR, FAIL, "can't refresh-close object");
done:
@@ -3914,8 +3913,8 @@ H5F__start_swmr_write(H5F_t *f)
herr_t
H5F__format_convert(H5F_t *f)
{
- hbool_t mark_dirty = FALSE; /* Whether to mark the file's superblock dirty */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool mark_dirty = false; /* Whether to mark the file's superblock dirty */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -3926,7 +3925,7 @@ H5F__format_convert(H5F_t *f)
/* Check if the superblock should be downgraded */
if (f->shared->sblock->super_vers > HDF5_SUPERBLOCK_VERSION_V18_LATEST) {
f->shared->sblock->super_vers = HDF5_SUPERBLOCK_VERSION_V18_LATEST;
- mark_dirty = TRUE;
+ mark_dirty = true;
}
/* Check for persistent freespace manager, which needs to be downgraded */
@@ -3952,7 +3951,7 @@ H5F__format_convert(H5F_t *f)
f->shared->fs_page_size = H5F_FILE_SPACE_PAGE_SIZE_DEF;
/* Indicate that the superblock should be marked dirty */
- mark_dirty = TRUE;
+ mark_dirty = true;
} /* end if */
/* Check if we should mark the superblock dirty */
@@ -3977,13 +3976,13 @@ H5F__format_convert(H5F_t *f)
*-------------------------------------------------------------------------
*/
hid_t
-H5F_get_file_id(H5VL_object_t *vol_obj, H5I_type_t obj_type, hbool_t app_ref)
+H5F_get_file_id(H5VL_object_t *vol_obj, H5I_type_t obj_type, bool app_ref)
{
void *vol_obj_file = NULL; /* File object pointer */
H5VL_object_get_args_t vol_cb_args; /* Arguments to VOL callback */
H5VL_loc_params_t loc_params; /* Location parameters */
hid_t file_id = H5I_INVALID_HID; /* File ID for object */
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
hid_t ret_value = H5I_INVALID_HID; /* Return value */
FUNC_ENTER_NOAPI(H5I_INVALID_HID)
@@ -4009,7 +4008,7 @@ H5F_get_file_id(H5VL_object_t *vol_obj, H5I_type_t obj_type, hbool_t app_ref)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
if ((file_id = H5VL_wrap_register(H5I_FILE, vol_obj_file, app_ref)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register file handle");
@@ -4040,7 +4039,7 @@ H5F_get_file_id(H5VL_object_t *vol_obj, H5I_type_t obj_type, hbool_t app_ref)
*-------------------------------------------------------------------------
*/
herr_t
-H5F_set_min_dset_ohdr(H5F_t *f, hbool_t minimize)
+H5F_set_min_dset_ohdr(H5F_t *f, bool minimize)
{
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
diff --git a/src/H5Fio.c b/src/H5Fio.c
index 1b329b647e3..b2c58353732 100644
--- a/src/H5Fio.c
+++ b/src/H5Fio.c
@@ -423,11 +423,11 @@ H5F_flush_tagged_metadata(H5F_t *f, haddr_t tag)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush tagged metadata");
/* Flush and reset the accumulator */
- if (H5F__accum_reset(f->shared, TRUE) < 0)
+ if (H5F__accum_reset(f->shared, true) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTRESET, FAIL, "can't reset accumulator");
/* Flush file buffers to disk. */
- if (H5FD_flush(f->shared->lf, FALSE) < 0)
+ if (H5FD_flush(f->shared->lf, false) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "low level flush failed");
done:
diff --git a/src/H5Fmodule.h b/src/H5Fmodule.h
index 0fcf4b8c0f3..8a3f8df9520 100644
--- a/src/H5Fmodule.h
+++ b/src/H5Fmodule.h
@@ -845,8 +845,8 @@
*
* Managing file access for in-memory files
* \code
- * herr_t H5Pset_fapl_core (hid_t access_properties, size_t block_size, hbool_t backing_store)
- * herr_t H5Pget_fapl_core (hid_t access_properties, size_t *block_size), hbool_t *backing_store)
+ * herr_t H5Pset_fapl_core (hid_t access_properties, size_t block_size, bool backing_store)
+ * herr_t H5Pget_fapl_core (hid_t access_properties, size_t *block_size), bool *backing_store)
* \endcode
*
* #H5Pset_fapl_core sets the file access property list to use the Memory driver; any previously
@@ -856,9 +856,9 @@
*
* The backing_store Boolean flag is set when the in-memory file is created.
* backing_store indicates whether to write the file contents to disk when the file is closed. If
- * backing_store is set to 1 (TRUE), the file contents are flushed to a file with the same name as the
+ * backing_store is set to 1 (true), the file contents are flushed to a file with the same name as the
* in-memory file when the file is closed or access to the file is terminated in memory. If
- * backing_store is set to 0 (FALSE), the file is not saved.
+ * backing_store is set to 0 (false), the file is not saved.
*
* The application is allowed to open an existing file with the #H5FD_CORE driver. While using
* #H5Fopen to open an existing file, if backing_store is set to 1 and the flag for #H5Fopen is set to
@@ -981,9 +981,9 @@
* \code
* herr_t H5Pset_fapl_multi (hid_t fapl_id, const H5FD_mem_t *memb_map, const hid_t *memb_fapl,
* const char * const *memb_name, const haddr_t *memb_addr,
- * hbool_t relax)
+ * bool relax)
* herr_t H5Pget_fapl_multi (hid_t fapl_id, const H5FD_mem_t *memb_map, const hid_t *memb_fapl,
- * const char **memb_name, const haddr_t *memb_addr, hbool_t *relax)
+ * const char **memb_name, const haddr_t *memb_addr, bool *relax)
* \endcode
*
* #H5Pset_fapl_multi sets the file access properties to use the Multi driver; any previously defined
@@ -998,7 +998,7 @@
* Additional parameters may be added to these functions in the future.
*
* \subsubsection subsubsec_file_alternate_drivers_split The Split Driver
- * The Split driver, H5FD_SPLIT, is a limited case of the Multi driver where only two files are
+ * The Split driver is a limited case of the Multi driver where only two files are
* created. One file holds metadata, and the other file holds raw data.
* The function #H5Pset_fapl_split is used to manage Split file access properties. See the example
* below.
diff --git a/src/H5Fmount.c b/src/H5Fmount.c
index ef0aa7b1a4e..47345f2d036 100644
--- a/src/H5Fmount.c
+++ b/src/H5Fmount.c
@@ -108,7 +108,7 @@ H5F_mount(const H5G_loc_t *loc, const char *name, H5F_t *child, hid_t H5_ATTR_UN
assert(loc);
assert(name && *name);
assert(child);
- assert(TRUE == H5P_isa_class(plist_id, H5P_FILE_MOUNT));
+ assert(true == H5P_isa_class(plist_id, H5P_FILE_MOUNT));
/* Set up group location to fill in */
mp_loc.oloc = &mp_oloc;
@@ -129,7 +129,7 @@ H5F_mount(const H5G_loc_t *loc, const char *name, H5F_t *child, hid_t H5_ATTR_UN
* and remove the mount as soon as we exit this function. Prevent the
* user from doing this.
*/
- if (mp_loc.oloc->holding_file != FALSE)
+ if (mp_loc.oloc->holding_file != false)
HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "mount path cannot contain links to external files");
/* Open the mount point group */
@@ -259,7 +259,7 @@ H5F_unmount(const H5G_loc_t *loc, const char *name)
H5G_name_t mp_path; /* Mount point group hier. path */
H5O_loc_t mp_oloc; /* Mount point object location */
H5G_loc_t mp_loc; /* entry used to open mount point*/
- hbool_t mp_loc_setup = FALSE; /* Whether mount point location is set up */
+ bool mp_loc_setup = false; /* Whether mount point location is set up */
H5G_loc_t root_loc; /* Group location of root of file to unmount */
int child_idx; /* Index of child in parent's mtab */
herr_t ret_value = SUCCEED; /*return value */
@@ -281,7 +281,7 @@ H5F_unmount(const H5G_loc_t *loc, const char *name)
*/
if (H5G_loc_find(loc, name, &mp_loc /*out*/) < 0)
HGOTO_ERROR(H5E_FILE, H5E_NOTFOUND, FAIL, "group not found");
- mp_loc_setup = TRUE;
+ mp_loc_setup = true;
child = mp_loc.oloc->file;
mnt_oloc = H5G_oloc(child->shared->root_grp);
child_idx = -1;
@@ -330,7 +330,7 @@ H5F_unmount(const H5G_loc_t *loc, const char *name)
/* Found the correct index, set the info about the child */
child_idx = (int)md;
H5G_loc_free(&mp_loc);
- mp_loc_setup = FALSE;
+ mp_loc_setup = false;
mp_loc.oloc = mnt_oloc;
mp_loc.path = H5G_nameof(parent->shared->mtab.child[md].group);
child = parent->shared->mtab.child[child_idx].file;
@@ -387,24 +387,24 @@ H5F_unmount(const H5G_loc_t *loc, const char *name)
*
* Purpose: Check if a file is mounted within another file.
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: (can't happen)
*
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
H5F_is_mount(const H5F_t *file)
{
- hbool_t ret_value = FALSE; /* Return value */
+ bool ret_value = false; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
assert(file);
if (file->parent != NULL)
- ret_value = TRUE;
+ ret_value = true;
else
- ret_value = FALSE;
+ ret_value = false;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_is_mount() */
diff --git a/src/H5Fmpi.c b/src/H5Fmpi.c
index 6786e07c064..8a8fdc135c8 100644
--- a/src/H5Fmpi.c
+++ b/src/H5Fmpi.c
@@ -188,7 +188,7 @@ H5F_mpi_get_size(const H5F_t *f)
*-------------------------------------------------------------------------
*/
herr_t
-H5F__set_mpi_atomicity(H5F_t *file, hbool_t flag)
+H5F__set_mpi_atomicity(H5F_t *file, bool flag)
{
herr_t ret_value = SUCCEED;
@@ -292,7 +292,7 @@ H5F__get_mpi_atomicity(const H5F_t *file, hbool_t *flag)
*-------------------------------------------------------------------------
*/
herr_t
-H5Fget_mpi_atomicity(hid_t file_id, hbool_t *flag /*out*/)
+H5Fget_mpi_atomicity(hid_t file_id, bool *flag /*out*/)
{
H5VL_object_t *vol_obj; /* File info */
H5VL_optional_args_t vol_cb_args; /* Arguments to VOL callback */
@@ -401,29 +401,52 @@ H5F_mpi_retrieve_comm(hid_t loc_id, hid_t acspl_id, MPI_Comm *mpi_comm)
* coordinates between the file-global flag and the flag set
* for the current operation in the current API context.
*
- * Return: TRUE/FALSE (can't fail)
+ * Return: true/false (can't fail)
*
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
H5F_get_coll_metadata_reads(const H5F_t *file)
+{
+ FUNC_ENTER_NOAPI_NOERR
+
+ assert(file && file->shared);
+
+ FUNC_LEAVE_NOAPI(H5F_shared_get_coll_metadata_reads(file->shared));
+} /* end H5F_get_coll_metadata_reads() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5F_shared_get_coll_metadata_reads
+ *
+ * Purpose: Determines whether collective metadata reads should be
+ * performed. This routine is meant to be the single source of
+ * truth for the collective metadata reads status, as it
+ * coordinates between the file-global flag and the flag set
+ * for the current operation in the current API context.
+ *
+ * Return: true/false (can't fail)
+ *
+ *-------------------------------------------------------------------------
+ */
+bool
+H5F_shared_get_coll_metadata_reads(const H5F_shared_t *f_sh)
{
H5P_coll_md_read_flag_t file_flag = H5P_USER_FALSE;
- hbool_t ret_value = FALSE;
+ bool ret_value = false;
FUNC_ENTER_NOAPI_NOERR
- assert(file && file->shared);
+ assert(f_sh);
/* Retrieve the file-global flag */
- file_flag = H5F_COLL_MD_READ(file);
+ file_flag = H5F_SHARED_COLL_MD_READ(f_sh);
/* If file flag is set to H5P_FORCE_FALSE, exit early
- * with FALSE, since collective metadata reads have
+ * with false, since collective metadata reads have
* been explicitly disabled somewhere in the library.
*/
if (H5P_FORCE_FALSE == file_flag)
- ret_value = FALSE;
+ ret_value = false;
else {
/* If file flag is set to H5P_USER_TRUE, ignore
* any settings in the API context. A file-global
@@ -432,7 +455,7 @@ H5F_get_coll_metadata_reads(const H5F_t *file)
* Property List for an individual operation.
*/
if (H5P_USER_TRUE == file_flag)
- ret_value = TRUE;
+ ret_value = true;
else {
/* Get the collective metadata reads flag from
* the current API context.
@@ -442,7 +465,7 @@ H5F_get_coll_metadata_reads(const H5F_t *file)
}
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5F_get_coll_metadata_reads() */
+} /* end H5F_shared_get_coll_metadata_reads() */
/*-------------------------------------------------------------------------
* Function: H5F_set_coll_metadata_reads
@@ -484,10 +507,10 @@ H5F_get_coll_metadata_reads(const H5F_t *file)
*-------------------------------------------------------------------------
*/
void
-H5F_set_coll_metadata_reads(H5F_t *file, H5P_coll_md_read_flag_t *file_flag, hbool_t *context_flag)
+H5F_set_coll_metadata_reads(H5F_t *file, H5P_coll_md_read_flag_t *file_flag, bool *context_flag)
{
H5P_coll_md_read_flag_t prev_file_flag = H5P_USER_FALSE;
- hbool_t prev_context_flag = FALSE;
+ bool prev_context_flag = false;
FUNC_ENTER_NOAPI_NOERR
@@ -516,12 +539,12 @@ H5F_set_coll_metadata_reads(H5F_t *file, H5P_coll_md_read_flag_t *file_flag, hbo
* Function: H5F_mpi_get_file_block_type
*
* Purpose: Creates an MPI derived datatype for communicating an
- * H5F_block_t structure. If `commit` is specified as TRUE,
+ * H5F_block_t structure. If `commit` is specified as true,
* the resulting datatype will be committed and ready for
* use in communication. Otherwise, the type is only suitable
* for building other derived types.
*
- * If TRUE is returned through `new_type_derived`, this lets
+ * If true is returned through `new_type_derived`, this lets
* the caller know that the datatype has been derived and
* should be freed with MPI_Type_free once it is no longer
* needed.
@@ -531,7 +554,7 @@ H5F_set_coll_metadata_reads(H5F_t *file, H5P_coll_md_read_flag_t *file_flag, hbo
*-------------------------------------------------------------------------
*/
herr_t
-H5F_mpi_get_file_block_type(hbool_t commit, MPI_Datatype *new_type, hbool_t *new_type_derived)
+H5F_mpi_get_file_block_type(bool commit, MPI_Datatype *new_type, bool *new_type_derived)
{
MPI_Datatype types[2];
MPI_Aint displacements[2];
@@ -545,7 +568,7 @@ H5F_mpi_get_file_block_type(hbool_t commit, MPI_Datatype *new_type, hbool_t *new
assert(new_type);
assert(new_type_derived);
- *new_type_derived = FALSE;
+ *new_type_derived = false;
field_count = 2;
assert(field_count == sizeof(types) / sizeof(MPI_Datatype));
@@ -559,7 +582,7 @@ H5F_mpi_get_file_block_type(hbool_t commit, MPI_Datatype *new_type, hbool_t *new
if (MPI_SUCCESS !=
(mpi_code = MPI_Type_create_struct(field_count, block_lengths, displacements, types, new_type)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_struct failed", mpi_code)
- *new_type_derived = TRUE;
+ *new_type_derived = true;
if (commit && MPI_SUCCESS != (mpi_code = MPI_Type_commit(new_type)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_commit failed", mpi_code)
@@ -569,7 +592,7 @@ H5F_mpi_get_file_block_type(hbool_t commit, MPI_Datatype *new_type, hbool_t *new
if (*new_type_derived) {
if (MPI_SUCCESS != (mpi_code = MPI_Type_free(new_type)))
HMPI_DONE_ERROR(FAIL, "MPI_Type_free failed", mpi_code)
- *new_type_derived = FALSE;
+ *new_type_derived = false;
}
}
diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h
index ead38721fdf..bc5c90bd5da 100644
--- a/src/H5Fpkg.h
+++ b/src/H5Fpkg.h
@@ -156,13 +156,13 @@ typedef struct H5F_efc_t H5F_efc_t;
/* Structure for passing 'user data' to superblock cache callbacks */
typedef struct H5F_superblock_cache_ud_t {
/* IN: */
- H5F_t *f; /* Pointer to file */
- hbool_t ignore_drvrinfo; /* Indicate if the driver info should be ignored */
+ H5F_t *f; /* Pointer to file */
+ bool ignore_drvrinfo; /* Indicate if the driver info should be ignored */
/* OUT: */
unsigned sym_leaf_k; /* Symbol table leaf node's 'K' value */
unsigned btree_k[H5B_NUM_BTREE_ID]; /* B-tree key values for each type */
haddr_t stored_eof; /* End-of-file in file */
- hbool_t drvrinfo_removed; /* Indicate if the driver info was removed */
+ bool drvrinfo_removed; /* Indicate if the driver info was removed */
unsigned super_vers; /* Superblock version obtained in get_load_size callback.
* It will be used later in verify_chksum callback
*/
@@ -191,7 +191,7 @@ typedef struct H5F_meta_accum_t {
size_t alloc_size; /* Size of the accumulated metadata buffer allocated (in bytes) */
size_t dirty_off; /* Offset of the dirty region in the accumulator buffer */
size_t dirty_len; /* Length of the dirty region in the accumulator buffer */
- hbool_t dirty; /* Flag to indicate that the accumulated metadata is dirty */
+ bool dirty; /* Flag to indicate that the accumulated metadata is dirty */
} H5F_meta_accum_t;
/* A record of the mount table */
@@ -237,27 +237,27 @@ typedef struct H5F_super_t {
* pointing to this struct.
*/
struct H5F_shared_t {
- H5FD_t *lf; /* Lower level file handle for I/O */
- H5F_super_t *sblock; /* Pointer to (pinned) superblock for file */
- H5O_drvinfo_t *drvinfo; /* Pointer to the (pinned) driver info
- * cache entry. This field is only defined
- * for older versions of the super block,
- * and then only when a driver information
- * block is present. At all other times
- * it should be NULL.
- */
- hbool_t drvinfo_sb_msg_exists; /* Convenience field used to track
- * whether the driver info superblock
- * extension message has been created
- * yet. This field should be TRUE iff the
- * superblock extension exists and contains
- * a driver info message. Under all other
- * circumstances, it must be set to FALSE.
- */
- unsigned nrefs; /* Ref count for times file is opened */
- unsigned flags; /* Access Permissions for file */
- H5F_mtab_t mtab; /* File mount table */
- H5F_efc_t *efc; /* External file cache */
+ H5FD_t *lf; /* Lower level file handle for I/O */
+ H5F_super_t *sblock; /* Pointer to (pinned) superblock for file */
+ H5O_drvinfo_t *drvinfo; /* Pointer to the (pinned) driver info
+ * cache entry. This field is only defined
+ * for older versions of the super block,
+ * and then only when a driver information
+ * block is present. At all other times
+ * it should be NULL.
+ */
+ bool drvinfo_sb_msg_exists; /* Convenience field used to track
+ * whether the driver info superblock
+ * extension message has been created
+ * yet. This field should be true iff the
+ * superblock extension exists and contains
+ * a driver info message. Under all other
+ * circumstances, it must be set to false.
+ */
+ unsigned nrefs; /* Ref count for times file is opened */
+ unsigned flags; /* Access Permissions for file */
+ H5F_mtab_t mtab; /* File mount table */
+ H5F_efc_t *efc; /* External file cache */
/* Cached values from FCPL/superblock */
uint8_t sizeof_addr; /* Size of addresses in file */
@@ -279,13 +279,13 @@ struct H5F_shared_t {
/* close option. This structure is */
/* fixed at creation time and should */
/* not change thereafter. */
- hbool_t use_mdc_logging; /* Set when metadata logging is desired */
- hbool_t start_mdc_log_on_access; /* set when mdc logging should */
+ bool use_mdc_logging; /* Set when metadata logging is desired */
+ bool start_mdc_log_on_access; /* set when mdc logging should */
/* begin on file access/create */
char *mdc_log_location; /* location of mdc log */
hid_t fcpl_id; /* File creation property list ID */
H5F_close_degree_t fc_degree; /* File close behavior degree */
- hbool_t evict_on_close; /* If the file's objects should be evicted from the metadata cache on close */
+ bool evict_on_close; /* If the file's objects should be evicted from the metadata cache on close */
size_t rdcc_nslots; /* Size of raw data chunk cache (slots) */
size_t rdcc_nbytes; /* Size of raw data chunk cache (bytes) */
double rdcc_w0; /* Preempt read chunks first? [0.0..1.0]*/
@@ -295,14 +295,14 @@ struct H5F_shared_t {
unsigned gc_ref; /* Garbage-collect references? */
H5F_libver_t low_bound; /* The 'low' bound of library format versions */
H5F_libver_t high_bound; /* The 'high' bound of library format versions */
- hbool_t store_msg_crt_idx; /* Store creation index for object header messages? */
+ bool store_msg_crt_idx; /* Store creation index for object header messages? */
unsigned ncwfs; /* Num entries on cwfs list */
struct H5HG_heap_t **cwfs; /* Global heap cache */
struct H5G_t *root_grp; /* Open root group */
H5FO_t *open_objs; /* Open objects in file */
H5UC_t *grp_btree_shared; /* Ref-counted group B-tree node info */
- hbool_t use_file_locking; /* Whether or not to use file locking */
- hbool_t closing; /* File is in the process of being closed */
+ bool use_file_locking; /* Whether or not to use file locking */
+ bool closing; /* File is in the process of being closed */
/* Cached VOL connector ID & info */
hid_t vol_id; /* ID of VOL connector for the container */
@@ -312,19 +312,19 @@ struct H5F_shared_t {
/* File space allocation information */
H5F_fspace_strategy_t fs_strategy; /* File space handling strategy */
hsize_t fs_threshold; /* Free space section threshold */
- hbool_t fs_persist; /* Free-space persist or not */
+ bool fs_persist; /* Free-space persist or not */
unsigned fs_version; /* Free-space version: */
/* It is used to update fsinfo message in the superblock
extension when closing down the free-space managers */
- hbool_t use_tmp_space; /* Whether temp. file space allocation is allowed */
+ bool use_tmp_space; /* Whether temp. file space allocation is allowed */
haddr_t tmp_addr; /* Next address to use for temp. space in the file */
- hbool_t point_of_no_return; /* Flag to indicate that we can't go back and delete a freespace header when
- it's used up */
+ bool point_of_no_return; /* Flag to indicate that we can't go back and delete a freespace header when
+ it's used up */
H5F_fs_state_t fs_state[H5F_MEM_PAGE_NTYPES]; /* State of free space manager for each type */
haddr_t fs_addr[H5F_MEM_PAGE_NTYPES]; /* Address of free space manager info for each type */
H5FS_t *fs_man[H5F_MEM_PAGE_NTYPES]; /* Free space manager for each file space type */
- hbool_t null_fsm_addr; /* Used by h5clear tool to tell the library */
+ bool null_fsm_addr; /* Used by h5clear tool to tell the library */
/* to drop free-space to the floor */
haddr_t eoa_fsm_fsalloc; /* eoa after file space allocation */
/* for self referential FSMs */
@@ -352,13 +352,13 @@ struct H5F_shared_t {
/* Object flush info */
H5F_object_flush_t object_flush; /* Information for object flush callback */
- hbool_t crt_dset_min_ohdr_flag; /* flag to minimize created dataset object header */
+ bool crt_dset_min_ohdr_flag; /* flag to minimize created dataset object header */
char *extpath; /* Path for searching target external link file */
#ifdef H5_HAVE_PARALLEL
H5P_coll_md_read_flag_t coll_md_read; /* Do all metadata reads collectively */
- hbool_t coll_md_write; /* Do all metadata writes collectively */
+ bool coll_md_write; /* Do all metadata writes collectively */
#endif /* H5_HAVE_PARALLEL */
};
@@ -374,8 +374,8 @@ struct H5F_t {
H5VL_object_t *vol_obj; /* VOL object */
unsigned nopen_objs; /* Number of open object headers */
H5FO_t *obj_count; /* # of time each object is opened through top file structure */
- hbool_t id_exists; /* Whether an ID for this struct exists */
- hbool_t closing; /* File is in the process of being closed */
+ bool id_exists; /* Whether an ID for this struct exists */
+ bool closing; /* File is in the process of being closed */
struct H5F_t *parent; /* Parent file that this file is mounted to */
unsigned nmounts; /* Number of children mounted to this file */
};
@@ -420,16 +420,16 @@ H5_DLL herr_t H5F__mount_count_ids(H5F_t *f, unsigned *nopen_files, unsigned *no
/* Superblock related routines */
H5_DLL herr_t H5F__super_init(H5F_t *f);
-H5_DLL herr_t H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read);
+H5_DLL herr_t H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, bool initial_read);
H5_DLL herr_t H5F__super_size(H5F_t *f, hsize_t *super_size, hsize_t *super_ext_size);
H5_DLL herr_t H5F__super_free(H5F_super_t *sblock);
/* Superblock extension related routines */
H5_DLL herr_t H5F__super_ext_open(H5F_t *f, haddr_t ext_addr, H5O_loc_t *ext_ptr);
-H5_DLL herr_t H5F__super_ext_write_msg(H5F_t *f, unsigned id, void *mesg, hbool_t may_create,
+H5_DLL herr_t H5F__super_ext_write_msg(H5F_t *f, unsigned id, void *mesg, bool may_create,
unsigned mesg_flags);
H5_DLL herr_t H5F__super_ext_remove_msg(H5F_t *f, unsigned id);
-H5_DLL herr_t H5F__super_ext_close(H5F_t *f, H5O_loc_t *ext_ptr, hbool_t was_created);
+H5_DLL herr_t H5F__super_ext_close(H5F_t *f, H5O_loc_t *ext_ptr, bool was_created);
/* Metadata accumulator routines */
H5_DLL herr_t H5F__accum_read(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, void *buf);
@@ -437,7 +437,7 @@ H5_DLL herr_t H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr
const void *buf);
H5_DLL herr_t H5F__accum_free(H5F_shared_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size);
H5_DLL herr_t H5F__accum_flush(H5F_shared_t *f_sh);
-H5_DLL herr_t H5F__accum_reset(H5F_shared_t *f_sh, hbool_t flush);
+H5_DLL herr_t H5F__accum_reset(H5F_shared_t *f_sh, bool flush);
/* Shared file list related routines */
H5_DLL herr_t H5F__sfile_add(H5F_shared_t *shared);
@@ -446,8 +446,8 @@ H5_DLL herr_t H5F__sfile_remove(H5F_shared_t *shared);
/* Parallel I/O (i.e. MPI) related routines */
#ifdef H5_HAVE_PARALLEL
-H5_DLL herr_t H5F__get_mpi_atomicity(const H5F_t *file, hbool_t *flag);
-H5_DLL herr_t H5F__set_mpi_atomicity(H5F_t *file, hbool_t flag);
+H5_DLL herr_t H5F__get_mpi_atomicity(const H5F_t *file, bool *flag);
+H5_DLL herr_t H5F__set_mpi_atomicity(H5F_t *file, bool flag);
#endif /* H5_HAVE_PARALLEL */
/* External file cache routines */
@@ -466,7 +466,7 @@ H5_DLL htri_t H5F__try_extend(H5F_t *f, H5FD_mem_t type, haddr_t blk_end, hsize
/* Functions that get/retrieve values from VFD layer */
H5_DLL herr_t H5F__set_eoa(const H5F_t *f, H5F_mem_t type, haddr_t addr);
H5_DLL herr_t H5F__set_base_addr(const H5F_t *f, haddr_t addr);
-H5_DLL herr_t H5F__set_paged_aggr(const H5F_t *f, hbool_t paged);
+H5_DLL herr_t H5F__set_paged_aggr(const H5F_t *f, bool paged);
H5_DLL herr_t H5F__get_max_eof_eoa(const H5F_t *f, haddr_t *max_eof_eoa);
/* Functions that flush or evict */
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index aa62800fa41..9adbf3a0258 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -85,7 +85,8 @@ typedef struct H5F_t H5F_t;
#define H5F_USE_TMP_SPACE(F) ((F)->shared->fs.use_tmp_space)
#define H5F_IS_TMP_ADDR(F, ADDR) (H5_addr_le((F)->shared->fs.tmp_addr, (ADDR)))
#ifdef H5_HAVE_PARALLEL
-#define H5F_COLL_MD_READ(F) ((F)->shared->coll_md_read)
+#define H5F_COLL_MD_READ(F) ((F)->shared->coll_md_read)
+#define H5F_SHARED_COLL_MD_READ(F_SH) ((F_SH)->coll_md_read)
#endif /* H5_HAVE_PARALLEL */
#define H5F_USE_MDC_LOGGING(F) ((F)->shared->use_mdc_logging)
#define H5F_START_MDC_LOG_ON_ACCESS(F) ((F)->shared->start_mdc_log_on_access)
@@ -148,7 +149,8 @@ typedef struct H5F_t H5F_t;
#define H5F_USE_TMP_SPACE(F) (H5F_use_tmp_space(F))
#define H5F_IS_TMP_ADDR(F, ADDR) (H5F_is_tmp_addr((F), (ADDR)))
#ifdef H5_HAVE_PARALLEL
-#define H5F_COLL_MD_READ(F) (H5F_coll_md_read(F))
+#define H5F_COLL_MD_READ(F) (H5F_coll_md_read(F))
+#define H5F_SHARED_COLL_MD_READ(F_SH) (H5F_shared_coll_md_read(F))
#endif /* H5_HAVE_PARALLEL */
#define H5F_USE_MDC_LOGGING(F) (H5F_use_mdc_logging(F))
#define H5F_START_MDC_LOG_ON_ACCESS(F) (H5F_start_mdc_log_on_access(F))
@@ -323,7 +325,7 @@ typedef struct H5F_t H5F_t;
#define H5F_FILE_SPACE_STRATEGY_DEF H5F_FSPACE_STRATEGY_FSM_AGGR
/* Default free space section threshold used by free-space managers */
-#define H5F_FREE_SPACE_PERSIST_DEF FALSE
+#define H5F_FREE_SPACE_PERSIST_DEF false
/* Default free space section threshold used by free-space managers */
#define H5F_FREE_SPACE_THRESHOLD_DEF 1
@@ -491,8 +493,8 @@ typedef enum H5F_prefix_open_t {
/* Private functions */
H5_DLL herr_t H5F_init(void);
H5_DLL H5F_t *H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id);
-H5_DLL herr_t H5F_try_close(H5F_t *f, hbool_t *was_closed /*out*/);
-H5_DLL hid_t H5F_get_file_id(H5VL_object_t *vol_obj, H5I_type_t obj_type, hbool_t app_ref);
+H5_DLL herr_t H5F_try_close(H5F_t *f, bool *was_closed /*out*/);
+H5_DLL hid_t H5F_get_file_id(H5VL_object_t *vol_obj, H5I_type_t obj_type, bool app_ref);
/* Functions that retrieve values from the file struct */
H5_DLL H5F_libver_t H5F_get_low_bound(const H5F_t *f);
@@ -503,27 +505,27 @@ H5_DLL char *H5F_get_open_name(const H5F_t *f);
H5_DLL char *H5F_get_actual_name(const H5F_t *f);
H5_DLL char *H5F_get_extpath(const H5F_t *f);
H5_DLL H5F_shared_t *H5F_get_shared(const H5F_t *f);
-H5_DLL hbool_t H5F_same_shared(const H5F_t *f1, const H5F_t *f2);
+H5_DLL bool H5F_same_shared(const H5F_t *f1, const H5F_t *f2);
H5_DLL unsigned H5F_get_nopen_objs(const H5F_t *f);
H5_DLL unsigned H5F_incr_nopen_objs(H5F_t *f);
H5_DLL unsigned H5F_decr_nopen_objs(H5F_t *f);
-H5_DLL hbool_t H5F_file_id_exists(const H5F_t *f);
+H5_DLL bool H5F_file_id_exists(const H5F_t *f);
H5_DLL H5F_t *H5F_get_parent(const H5F_t *f);
H5_DLL unsigned H5F_get_nmounts(const H5F_t *f);
H5_DLL unsigned H5F_get_read_attempts(const H5F_t *f);
-H5_DLL hid_t H5F_get_access_plist(H5F_t *f, hbool_t app_ref);
+H5_DLL hid_t H5F_get_access_plist(H5F_t *f, bool app_ref);
H5_DLL hid_t H5F_get_id(H5F_t *file);
-H5_DLL herr_t H5F_get_obj_count(const H5F_t *f, unsigned types, hbool_t app_ref, size_t *obj_id_count_ptr);
-H5_DLL herr_t H5F_get_obj_ids(const H5F_t *f, unsigned types, size_t max_objs, hid_t *oid_list,
- hbool_t app_ref, size_t *obj_id_count_ptr);
+H5_DLL herr_t H5F_get_obj_count(const H5F_t *f, unsigned types, bool app_ref, size_t *obj_id_count_ptr);
+H5_DLL herr_t H5F_get_obj_ids(const H5F_t *f, unsigned types, size_t max_objs, hid_t *oid_list, bool app_ref,
+ size_t *obj_id_count_ptr);
H5_DLL hsize_t H5F_get_pgend_meta_thres(const H5F_t *f);
-H5_DLL hbool_t H5F_get_point_of_no_return(const H5F_t *f);
-H5_DLL hbool_t H5F_get_null_fsm_addr(const H5F_t *f);
-H5_DLL hbool_t H5F_get_min_dset_ohdr(const H5F_t *f);
-H5_DLL herr_t H5F_set_min_dset_ohdr(H5F_t *f, hbool_t minimize);
+H5_DLL bool H5F_get_point_of_no_return(const H5F_t *f);
+H5_DLL bool H5F_get_null_fsm_addr(const H5F_t *f);
+H5_DLL bool H5F_get_min_dset_ohdr(const H5F_t *f);
+H5_DLL herr_t H5F_set_min_dset_ohdr(H5F_t *f, bool minimize);
H5_DLL const H5VL_class_t *H5F_get_vol_cls(const H5F_t *f);
H5_DLL H5VL_object_t *H5F_get_vol_obj(const H5F_t *f);
-H5_DLL hbool_t H5F_get_file_locking(const H5F_t *f);
+H5_DLL bool H5F_get_file_locking(const H5F_t *f);
/* Functions than retrieve values set/cached from the superblock/FCPL */
H5_DLL haddr_t H5F_get_base_addr(const H5F_t *f);
@@ -540,45 +542,46 @@ H5_DLL unsigned H5F_get_sohm_nindexes(const H5F_t *f);
H5_DLL herr_t H5F_set_sohm_nindexes(H5F_t *f, unsigned nindexes);
H5_DLL hid_t H5F_get_fcpl(const H5F_t *f);
H5_DLL H5F_close_degree_t H5F_get_fc_degree(const H5F_t *f);
-H5_DLL hbool_t H5F_get_evict_on_close(const H5F_t *f);
+H5_DLL bool H5F_get_evict_on_close(const H5F_t *f);
H5_DLL size_t H5F_rdcc_nbytes(const H5F_t *f);
H5_DLL size_t H5F_rdcc_nslots(const H5F_t *f);
H5_DLL double H5F_rdcc_w0(const H5F_t *f);
H5_DLL size_t H5F_sieve_buf_size(const H5F_t *f);
H5_DLL unsigned H5F_gc_ref(const H5F_t *f);
-H5_DLL hbool_t H5F_store_msg_crt_idx(const H5F_t *f);
-H5_DLL herr_t H5F_set_store_msg_crt_idx(H5F_t *f, hbool_t flag);
+H5_DLL bool H5F_store_msg_crt_idx(const H5F_t *f);
+H5_DLL herr_t H5F_set_store_msg_crt_idx(H5F_t *f, bool flag);
H5_DLL struct H5UC_t *H5F_grp_btree_shared(const H5F_t *f);
H5_DLL herr_t H5F_set_grp_btree_shared(H5F_t *f, struct H5UC_t *rc);
-H5_DLL hbool_t H5F_use_tmp_space(const H5F_t *f);
-H5_DLL hbool_t H5F_is_tmp_addr(const H5F_t *f, haddr_t addr);
+H5_DLL bool H5F_use_tmp_space(const H5F_t *f);
+H5_DLL bool H5F_is_tmp_addr(const H5F_t *f, haddr_t addr);
H5_DLL hsize_t H5F_get_alignment(const H5F_t *f);
H5_DLL hsize_t H5F_get_threshold(const H5F_t *f);
#ifdef H5_HAVE_PARALLEL
H5_DLL H5P_coll_md_read_flag_t H5F_coll_md_read(const H5F_t *f);
+H5_DLL H5P_coll_md_read_flag_t H5F_shared_coll_md_read(const H5F_shared_t *f_sh);
#endif /* H5_HAVE_PARALLEL */
-H5_DLL hbool_t H5F_use_mdc_logging(const H5F_t *f);
-H5_DLL hbool_t H5F_start_mdc_log_on_access(const H5F_t *f);
-H5_DLL char *H5F_mdc_log_location(const H5F_t *f);
+H5_DLL bool H5F_use_mdc_logging(const H5F_t *f);
+H5_DLL bool H5F_start_mdc_log_on_access(const H5F_t *f);
+H5_DLL char *H5F_mdc_log_location(const H5F_t *f);
/* Functions that retrieve values from VFD layer */
H5_DLL hid_t H5F_get_driver_id(const H5F_t *f);
H5_DLL herr_t H5F_get_fileno(const H5F_t *f, unsigned long *filenum);
-H5_DLL hbool_t H5F_shared_has_feature(const H5F_shared_t *f, unsigned feature);
-H5_DLL hbool_t H5F_has_feature(const H5F_t *f, unsigned feature);
+H5_DLL bool H5F_shared_has_feature(const H5F_shared_t *f, unsigned feature);
+H5_DLL bool H5F_has_feature(const H5F_t *f, unsigned feature);
H5_DLL haddr_t H5F_shared_get_eoa(const H5F_shared_t *f_sh, H5FD_mem_t type);
H5_DLL haddr_t H5F_get_eoa(const H5F_t *f, H5FD_mem_t type);
H5_DLL herr_t H5F_shared_get_file_driver(const H5F_shared_t *f_sh, H5FD_t **file_handle);
H5_DLL herr_t H5F_get_vfd_handle(const H5F_t *file, hid_t fapl, void **file_handle);
-H5_DLL hbool_t H5F_has_vector_select_io(const H5F_t *f, hbool_t is_write);
+H5_DLL bool H5F_has_vector_select_io(const H5F_t *f, bool is_write);
/* File mounting routines */
-H5_DLL herr_t H5F_mount(const struct H5G_loc_t *loc, const char *name, H5F_t *child, hid_t plist_id);
-H5_DLL herr_t H5F_unmount(const struct H5G_loc_t *loc, const char *name);
-H5_DLL hbool_t H5F_is_mount(const H5F_t *file);
-H5_DLL hbool_t H5F_has_mount(const H5F_t *file);
-H5_DLL herr_t H5F_traverse_mount(struct H5O_loc_t *oloc /*in,out*/);
-H5_DLL herr_t H5F_flush_mounts(H5F_t *f);
+H5_DLL herr_t H5F_mount(const struct H5G_loc_t *loc, const char *name, H5F_t *child, hid_t plist_id);
+H5_DLL herr_t H5F_unmount(const struct H5G_loc_t *loc, const char *name);
+H5_DLL bool H5F_is_mount(const H5F_t *file);
+H5_DLL bool H5F_has_mount(const H5F_t *file);
+H5_DLL herr_t H5F_traverse_mount(struct H5O_loc_t *oloc /*in,out*/);
+H5_DLL herr_t H5F_flush_mounts(H5F_t *f);
/* Functions that operate on blocks of bytes wrt super block */
H5_DLL herr_t H5F_shared_block_read(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size,
@@ -640,10 +643,11 @@ H5_DLL MPI_Comm H5F_mpi_get_comm(const H5F_t *f);
H5_DLL int H5F_shared_mpi_get_size(const H5F_shared_t *f_sh);
H5_DLL int H5F_mpi_get_size(const H5F_t *f);
H5_DLL herr_t H5F_mpi_retrieve_comm(hid_t loc_id, hid_t acspl_id, MPI_Comm *mpi_comm);
-H5_DLL herr_t H5F_mpi_get_file_block_type(hbool_t commit, MPI_Datatype *new_type, hbool_t *new_type_derived);
-H5_DLL hbool_t H5F_get_coll_metadata_reads(const H5F_t *f);
-H5_DLL void H5F_set_coll_metadata_reads(H5F_t *f, H5P_coll_md_read_flag_t *file_flag, hbool_t *context_flag);
-H5_DLL herr_t H5F_shared_get_mpi_file_sync_required(const H5F_shared_t *f_sh, hbool_t *flag);
+H5_DLL herr_t H5F_mpi_get_file_block_type(bool commit, MPI_Datatype *new_type, bool *new_type_derived);
+H5_DLL bool H5F_get_coll_metadata_reads(const H5F_t *f);
+H5_DLL bool H5F_shared_get_coll_metadata_reads(const H5F_shared_t *f_sh);
+H5_DLL void H5F_set_coll_metadata_reads(H5F_t *f, H5P_coll_md_read_flag_t *file_flag, bool *context_flag);
+H5_DLL herr_t H5F_shared_get_mpi_file_sync_required(const H5F_shared_t *f_sh, bool *flag);
#endif /* H5_HAVE_PARALLEL */
/* External file cache routines */
@@ -657,7 +661,7 @@ H5_DLL H5F_t *H5F_prefix_open_file(H5F_t *primary_file, H5F_prefix_open_t prefix
/* Global heap CWFS routines */
H5_DLL herr_t H5F_cwfs_add(H5F_t *f, struct H5HG_heap_t *heap);
H5_DLL herr_t H5F_cwfs_find_free_heap(H5F_t *f, size_t need, haddr_t *addr);
-H5_DLL herr_t H5F_cwfs_advance_heap(H5F_t *f, struct H5HG_heap_t *heap, hbool_t add_heap);
+H5_DLL herr_t H5F_cwfs_advance_heap(H5F_t *f, struct H5HG_heap_t *heap, bool add_heap);
H5_DLL herr_t H5F_cwfs_remove_heap(H5F_shared_t *shared, struct H5HG_heap_t *heap);
/* Debugging functions */
diff --git a/src/H5Fpublic.h b/src/H5Fpublic.h
index d326998677c..cc0bf2f6bf3 100644
--- a/src/H5Fpublic.h
+++ b/src/H5Fpublic.h
@@ -1658,7 +1658,7 @@ H5_DLL herr_t H5Fget_mdc_image_info(hid_t file_id, haddr_t *image_addr, hsize_t
* \details H5Fget_dset_no_attrs_hint() retrieves the no dataset attributes
* hint setting for the file specified by the file identifier \p
* file_id. This setting is used to inform the library to create
- * minimized dataset object headers when \c TRUE.
+ * minimized dataset object headers when \c true.
*
* The setting's value is returned in the boolean pointer minimized.
*
@@ -1679,18 +1679,18 @@ H5_DLL herr_t H5Fget_dset_no_attrs_hint(hid_t file_id, hbool_t *minimize);
*
* \details H5Fset_dset_no_attrs_hint() sets the no dataset attributes hint
* setting for the file specified by the file identifier \p file_id.
- * If the boolean flag \p minimize is set to \c TRUE, then the library
+ * If the boolean flag \p minimize is set to \c true, then the library
* will create minimized dataset object headers in the file.
* \Bold{All} files that refer to the same file-on-disk will be
* affected by the most recent setting, regardless of the file
* identifier/handle (e.g., as returned by H5Fopen()). By setting the
- * \p minimize flag to \c TRUE, the library expects that no attributes
+ * \p minimize flag to \c true, the library expects that no attributes
* will be added to the dataset - attributes can be added, but they
* are appended with a continuation message, which can reduce
* performance.
*
* \attention This setting interacts with H5Pset_dset_no_attrs_hint(): if
- * either is set to \c TRUE, then the created dataset's object header
+ * either is set to \c true, then the created dataset's object header
* will be minimized.
*
* \since 1.10.5
@@ -1729,7 +1729,7 @@ H5_DLL herr_t H5Fset_dset_no_attrs_hint(hid_t file_id, hbool_t minimize);
* pass the same values for \p file_id and \p flag.
*
* This function is available only when the HDF5 library is configured with parallel support
- * (\Code{--enable-parallel}). It is useful only when used with the #H5FD_MPIO driver
+ * (\Code{--enable-parallel | HDF5_ENABLE_PARALLEL}). It is useful only when used with the #H5FD_MPIO driver
* (see H5Pset_fapl_mpio()).
* \endparblock
*
diff --git a/src/H5Fquery.c b/src/H5Fquery.c
index b74884ea895..44a52c8dbfc 100644
--- a/src/H5Fquery.c
+++ b/src/H5Fquery.c
@@ -236,10 +236,10 @@ H5F_get_shared(const H5F_t *f)
*
* Purpose: Determine if two files have the same shared file pointer
*
- * Return: TRUE/FALSE on success/abort on failure (shouldn't fail)
+ * Return: true/false on success/abort on failure (shouldn't fail)
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
H5F_same_shared(const H5F_t *f1, const H5F_t *f2)
{
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
@@ -277,10 +277,10 @@ H5F_get_nopen_objs(const H5F_t *f)
*
* Purpose: Determines if a file ID exists for this file struct
*
- * Return: TRUE/FALSE
+ * Return: true/false
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
H5F_file_id_exists(const H5F_t *f)
{
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
@@ -503,10 +503,10 @@ H5F_sym_leaf_k(const H5F_t *f)
*
* Purpose: Get the setting flag for minimized dataset object headers
*
- * Return: TRUE/FALSE as set in file
+ * Return: true/false as set in file
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
H5F_get_min_dset_ohdr(const H5F_t *f)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -761,7 +761,7 @@ H5F_get_fc_degree(const H5F_t *f)
* Failure: (can't happen)
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
H5F_get_evict_on_close(const H5F_t *f)
{
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
@@ -782,7 +782,7 @@ H5F_get_evict_on_close(const H5F_t *f)
* Failure: (can't happen)
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
H5F_store_msg_crt_idx(const H5F_t *f)
{
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
@@ -799,11 +799,11 @@ H5F_store_msg_crt_idx(const H5F_t *f)
*
* Purpose: Check if a file has a particular feature enabled
*
- * Return: Success: Non-negative - TRUE or FALSE
+ * Return: Success: Non-negative - true or false
* Failure: Negative (should not happen)
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
H5F_shared_has_feature(const H5F_shared_t *f_sh, unsigned feature)
{
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
@@ -811,7 +811,7 @@ H5F_shared_has_feature(const H5F_shared_t *f_sh, unsigned feature)
assert(f_sh);
- FUNC_LEAVE_NOAPI((hbool_t)(f_sh->lf->feature_flags & feature))
+ FUNC_LEAVE_NOAPI((bool)(f_sh->lf->feature_flags & feature))
} /* end H5F_shared_has_feature() */
/*-------------------------------------------------------------------------
@@ -819,11 +819,11 @@ H5F_shared_has_feature(const H5F_shared_t *f_sh, unsigned feature)
*
* Purpose: Check if a file has a particular feature enabled
*
- * Return: Success: Non-negative - TRUE or FALSE
+ * Return: Success: Non-negative - true or false
* Failure: Negative (should not happen)
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
H5F_has_feature(const H5F_t *f, unsigned feature)
{
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
@@ -832,7 +832,7 @@ H5F_has_feature(const H5F_t *f, unsigned feature)
assert(f);
assert(f->shared);
- FUNC_LEAVE_NOAPI((hbool_t)(f->shared->lf->feature_flags & feature))
+ FUNC_LEAVE_NOAPI((bool)(f->shared->lf->feature_flags & feature))
} /* end H5F_has_feature() */
/*-------------------------------------------------------------------------
@@ -999,10 +999,10 @@ H5F_get_vfd_handle(const H5F_t *file, hid_t fapl, void **file_handle)
* (Mainly added to stop non-file routines from poking about in the
* H5F_t data structure)
*
- * Return: TRUE/FALSE on success/abort on failure (shouldn't fail)
+ * Return: true/false on success/abort on failure (shouldn't fail)
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
H5F_is_tmp_addr(const H5F_t *f, haddr_t addr)
{
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
@@ -1022,10 +1022,10 @@ H5F_is_tmp_addr(const H5F_t *f, haddr_t addr)
* (Mainly added to stop non-file routines from poking about in the
* H5F_t data structure)
*
- * Return: TRUE/FALSE on success/abort on failure (shouldn't fail)
+ * Return: true/false on success/abort on failure (shouldn't fail)
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
H5F_use_tmp_space(const H5F_t *f)
{
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
@@ -1054,11 +1054,31 @@ H5F_coll_md_read(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- assert(f);
+ assert(f && f->shared);
FUNC_LEAVE_NOAPI(f->shared->coll_md_read)
} /* end H5F_coll_md_read() */
+/*-------------------------------------------------------------------------
+ * Function: H5F_shared_coll_md_read
+ *
+ * Purpose: Retrieve the 'collective metadata reads' flag for the file.
+ *
+ * Return: Success: Non-negative, the 'collective metadata reads' flag
+ * Failure: (can't happen)
+ *-------------------------------------------------------------------------
+ */
+H5P_coll_md_read_flag_t
+H5F_shared_coll_md_read(const H5F_shared_t *f_sh)
+{
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ assert(f_sh);
+
+ FUNC_LEAVE_NOAPI(f_sh->coll_md_read)
+} /* end H5F_shared_coll_md_read() */
+
/*-------------------------------------------------------------------------
* Function: H5F_shared_get_mpi_file_sync_required
*
@@ -1070,7 +1090,7 @@ H5F_coll_md_read(const H5F_t *f)
*-------------------------------------------------------------------------
*/
herr_t
-H5F_shared_get_mpi_file_sync_required(const H5F_shared_t *f_sh, hbool_t *flag /*out*/)
+H5F_shared_get_mpi_file_sync_required(const H5F_shared_t *f_sh, bool *flag /*out*/)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -1096,10 +1116,10 @@ H5F_shared_get_mpi_file_sync_required(const H5F_shared_t *f_sh, hbool_t *flag /*
* (Mainly added to stop non-file routines from poking about in the
* H5F_t data structure)
*
- * Return: TRUE/FALSE on success/abort on failure (shouldn't fail)
+ * Return: true/false on success/abort on failure (shouldn't fail)
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
H5F_use_mdc_logging(const H5F_t *f)
{
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
@@ -1119,10 +1139,10 @@ H5F_use_mdc_logging(const H5F_t *f)
* (Mainly added to stop non-file routines from poking about in the
* H5F_t data structure)
*
- * Return: TRUE/FALSE on success/abort on failure (shouldn't fail)
+ * Return: true/false on success/abort on failure (shouldn't fail)
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
H5F_start_mdc_log_on_access(const H5F_t *f)
{
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
@@ -1142,7 +1162,7 @@ H5F_start_mdc_log_on_access(const H5F_t *f)
* (Mainly added to stop non-file routines from poking about in the
* H5F_t data structure)
*
- * Return: TRUE/FALSE on success/abort on failure (shouldn't fail)
+ * Return: true/false on success/abort on failure (shouldn't fail)
*-------------------------------------------------------------------------
*/
char *
@@ -1229,7 +1249,7 @@ H5F_get_pgend_meta_thres(const H5F_t *f)
* Failure: (can't happen)
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
H5F_get_point_of_no_return(const H5F_t *f)
{
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
@@ -1250,7 +1270,7 @@ H5F_get_point_of_no_return(const H5F_t *f)
* Failure: (can't happen)
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
H5F_get_null_fsm_addr(const H5F_t *f)
{
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
@@ -1340,11 +1360,11 @@ H5F__get_cont_info(const H5F_t *f, H5VL_file_cont_info_t *info)
*
* Purpose: Get the file locking flag for the file
*
- * Return: TRUE/FALSE
+ * Return: true/false
*
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
H5F_get_file_locking(const H5F_t *f)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -1360,14 +1380,14 @@ H5F_get_file_locking(const H5F_t *f)
*
* Purpose: Determine if vector or selection I/O is supported by this file
*
- * Return: TRUE/FALSE
+ * Return: true/false
*
*-------------------------------------------------------------------------
*/
-hbool_t
-H5F_has_vector_select_io(const H5F_t *f, hbool_t is_write)
+bool
+H5F_has_vector_select_io(const H5F_t *f, bool is_write)
{
- hbool_t ret_value; /* Return value */
+ bool ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
diff --git a/src/H5Fspace.c b/src/H5Fspace.c
index 163d8d8c481..9c6afd3f226 100644
--- a/src/H5Fspace.c
+++ b/src/H5Fspace.c
@@ -167,8 +167,8 @@ H5F__free(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size)
* marking an entry dirty without a H5F_t*, this routine should
* be changed to take a H5F_super_t* directly.
*
- * Return: Success: TRUE(1) - Block was extended
- * FALSE(0) - Block could not be extended
+ * Return: Success: true(1) - Block was extended
+ * false(0) - Block could not be extended
* Failure: FAIL
*
*-------------------------------------------------------------------------
@@ -176,7 +176,7 @@ H5F__free(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size)
htri_t
H5F__try_extend(H5F_t *f, H5FD_mem_t type, haddr_t blk_end, hsize_t extra_requested)
{
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE
diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c
index 504a555a208..9dc35ea137b 100644
--- a/src/H5Fsuper.c
+++ b/src/H5Fsuper.c
@@ -171,7 +171,7 @@ H5F__super_ext_open(H5F_t *f, haddr_t ext_addr, H5O_loc_t *ext_ptr)
*-------------------------------------------------------------------------
*/
herr_t
-H5F__super_ext_close(H5F_t *f, H5O_loc_t *ext_ptr, hbool_t was_created)
+H5F__super_ext_close(H5F_t *f, H5O_loc_t *ext_ptr, bool was_created)
{
H5AC_ring_t orig_ring = H5AC_RING_INV; /* Original ring value */
herr_t ret_value = SUCCEED; /* Return value */
@@ -274,7 +274,7 @@ H5F__update_super_ext_driver_msg(H5F_t *f)
*/
drvinfo.len = driver_size;
drvinfo.buf = dbuf;
- if (H5F__super_ext_write_msg(f, H5O_DRVINFO_ID, &drvinfo, FALSE, H5O_MSG_NO_FLAGS_SET) <
+ if (H5F__super_ext_write_msg(f, H5O_DRVINFO_ID, &drvinfo, false, H5O_MSG_NO_FLAGS_SET) <
0)
HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL,
"unable to update driver info header message");
@@ -301,7 +301,7 @@ H5F__update_super_ext_driver_msg(H5F_t *f)
*-------------------------------------------------------------------------
*/
herr_t
-H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
+H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, bool initial_read)
{
H5AC_ring_t orig_ring = H5AC_RING_INV;
H5F_super_t *sblock = NULL; /* Superblock structure */
@@ -312,7 +312,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
haddr_t super_addr; /* Absolute address of superblock */
haddr_t eof; /* End of file address */
unsigned rw_flags; /* Read/write permissions for file */
- hbool_t skip_eof_check = FALSE; /* Whether to skip checking the EOF value */
+ bool skip_eof_check = false; /* Whether to skip checking the EOF value */
#ifdef H5_HAVE_PARALLEL
int mpi_size = 1;
#endif /* H5_HAVE_PARALLEL */
@@ -426,7 +426,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
if (H5P_get(c_plist, H5F_CRT_BTREE_RANK_NAME, udata.btree_k) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get rank for btree internal nodes");
udata.stored_eof = HADDR_UNDEF;
- udata.drvrinfo_removed = FALSE;
+ udata.drvrinfo_removed = false;
/* Set the ring type in the API context */
H5AC_set_ring(H5AC_RING_SB, &orig_ring);
@@ -589,7 +589,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
if ((sblock->status_flags & H5F_SUPER_SWMR_WRITE_ACCESS) &&
(sblock->status_flags & H5F_SUPER_WRITE_ACCESS) &&
sblock->super_vers >= HDF5_SUPERBLOCK_VERSION_3)
- skip_eof_check = TRUE;
+ skip_eof_check = true;
}
if (!skip_eof_check && initial_read) {
if (HADDR_UNDEF == (eof = H5FD_get_eof(f->shared->lf, H5FD_MEM_DEFAULT)))
@@ -712,8 +712,8 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
/* Reset driver info message */
H5O_msg_reset(H5O_DRVINFO_ID, &drvinfo);
- assert(FALSE == f->shared->drvinfo_sb_msg_exists);
- f->shared->drvinfo_sb_msg_exists = TRUE;
+ assert(false == f->shared->drvinfo_sb_msg_exists);
+ f->shared->drvinfo_sb_msg_exists = true;
} /* end else */
} /* end if */
@@ -840,7 +840,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
* We remove the following check:
* if((f->shared->eoa_pre_fsm_fsalloc != HADDR_UNDEF || null_fsm_addr) &&
* (H5F_INTENT(f) & H5F_ACC_RDWR))
- * f->shared->first_alloc_dealloc = TRUE;
+ * f->shared->first_alloc_dealloc = true;
*
* Because:
* --there is no more f->shared->eoa_pre_fsm_fsalloc and
@@ -880,7 +880,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
#endif /* JRM */
if (f->shared->null_fsm_addr) {
- if (H5F__super_ext_write_msg(f, H5O_FSINFO_ID, &fsinfo, FALSE,
+ if (H5F__super_ext_write_msg(f, H5O_FSINFO_ID, &fsinfo, false,
H5O_MSG_FLAG_MARK_IF_UNKNOWN) < 0)
HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL,
"error in writing fsinfo message to superblock extension");
@@ -895,7 +895,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
"error in removing message from superblock extension");
}
- if (H5F__super_ext_write_msg(f, H5O_FSINFO_ID, &fsinfo, TRUE,
+ if (H5F__super_ext_write_msg(f, H5O_FSINFO_ID, &fsinfo, true,
H5O_MSG_FLAG_MARK_IF_UNKNOWN) < 0)
HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL,
"error in writing fsinfo message to superblock extension");
@@ -912,7 +912,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
if ((status = H5O_msg_exists(&ext_loc, H5O_MDCI_MSG_ID)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_EXISTS, FAIL, "unable to read object header");
if (status) {
- hbool_t rw = ((rw_flags & H5AC__READ_ONLY_FLAG) == 0);
+ bool rw = ((rw_flags & H5AC__READ_ONLY_FLAG) == 0);
H5O_mdci_t mdci_msg;
/* if the metadata cache image superblock extension message exists,
@@ -938,7 +938,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
} /* end if */
/* Close superblock extension */
- if (H5F__super_ext_close(f, &ext_loc, FALSE) < 0)
+ if (H5F__super_ext_close(f, &ext_loc, false) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEOBJ, FAIL, "unable to close file's superblock extension");
} /* end if */
@@ -981,7 +981,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
assert(f->shared->sblock == NULL);
f->shared->sblock = sblock;
#endif /* JRM */
- if (H5F__super_ext_write_msg(f, H5O_DRVINFO_ID, &drvinfo, FALSE, H5O_MSG_NO_FLAGS_SET) < 0)
+ if (H5F__super_ext_write_msg(f, H5O_DRVINFO_ID, &drvinfo, false, H5O_MSG_NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL,
"error in writing message to superblock extension");
@@ -1008,7 +1008,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
f->shared->sblock = sblock;
/* Set the page aggregation mode */
- if (H5F__set_paged_aggr(f, (hbool_t)H5F_PAGED_AGGR(f)) < 0)
+ if (H5F__set_paged_aggr(f, (bool)H5F_PAGED_AGGR(f)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "failed to set paged_aggr status for file driver");
done:
@@ -1068,11 +1068,11 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
herr_t
H5F__super_init(H5F_t *f)
{
- H5F_super_t *sblock = NULL; /* Superblock cache structure */
- hbool_t sblock_in_cache = FALSE; /* Whether the superblock has been inserted into the metadata cache */
- H5O_drvinfo_t *drvinfo = NULL; /* Driver info */
- hbool_t drvinfo_in_cache =
- FALSE; /* Whether the driver info block has been inserted into the metadata cache */
+ H5F_super_t *sblock = NULL; /* Superblock cache structure */
+ bool sblock_in_cache = false; /* Whether the superblock has been inserted into the metadata cache */
+ H5O_drvinfo_t *drvinfo = NULL; /* Driver info */
+ bool drvinfo_in_cache =
+ false; /* Whether the driver info block has been inserted into the metadata cache */
H5P_genplist_t *plist; /* File creation property list */
H5AC_ring_t orig_ring = H5AC_RING_INV;
hsize_t userblock_size; /* Size of userblock, in bytes */
@@ -1081,10 +1081,10 @@ H5F__super_init(H5F_t *f)
size_t driver_size; /* Size of driver info block (bytes) */
unsigned super_vers = HDF5_SUPERBLOCK_VERSION_DEF; /* Superblock version for file */
H5O_loc_t ext_loc; /* Superblock extension object location */
- hbool_t need_ext; /* Whether the superblock extension is needed */
- hbool_t ext_created = FALSE; /* Whether the extension has been created */
- hbool_t non_default_fs_settings = FALSE; /* Whether the file has non-default free-space settings */
- herr_t ret_value = SUCCEED; /* Return Value */
+ bool need_ext; /* Whether the superblock extension is needed */
+ bool ext_created = false; /* Whether the extension has been created */
+ bool non_default_fs_settings = false; /* Whether the file has non-default free-space settings */
+ herr_t ret_value = SUCCEED; /* Return Value */
FUNC_ENTER_PACKAGE_TAG(H5AC__SUPERBLOCK_TAG)
@@ -1115,7 +1115,7 @@ H5F__super_init(H5F_t *f)
f->shared->fs_persist == H5F_FREE_SPACE_PERSIST_DEF &&
f->shared->fs_threshold == H5F_FREE_SPACE_THRESHOLD_DEF &&
f->shared->fs_page_size == H5F_FILE_SPACE_PAGE_SIZE_DEF))
- non_default_fs_settings = TRUE;
+ non_default_fs_settings = true;
/*
* When creating a file with write access, the library will:
@@ -1188,7 +1188,7 @@ H5F__super_init(H5F_t *f)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set superblock version");
} /* end if */
- if (H5FD_set_paged_aggr(f->shared->lf, (hbool_t)H5F_PAGED_AGGR(f)) < 0)
+ if (H5FD_set_paged_aggr(f->shared->lf, (bool)H5F_PAGED_AGGR(f)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "failed to set paged_aggr status for file driver");
/*
@@ -1271,7 +1271,7 @@ H5F__super_init(H5F_t *f)
if (H5AC_insert_entry(f, H5AC_SUPERBLOCK, (haddr_t)0, sblock,
H5AC__PIN_ENTRY_FLAG | H5AC__FLUSH_LAST_FLAG | H5AC__FLUSH_COLLECTIVELY_FLAG) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, "can't add superblock to cache");
- sblock_in_cache = TRUE;
+ sblock_in_cache = true;
/* Keep a copy of the superblock info */
f->shared->sblock = sblock;
@@ -1290,12 +1290,12 @@ H5F__super_init(H5F_t *f)
/* Files with SOHM indices always need the superblock extension */
if (f->shared->sohm_nindexes > 0) {
assert(super_vers >= HDF5_SUPERBLOCK_VERSION_2);
- need_ext = TRUE;
+ need_ext = true;
} /* end if */
/* Files with non-default free space settings always need the superblock extension */
else if (non_default_fs_settings) {
assert(super_vers >= HDF5_SUPERBLOCK_VERSION_2);
- need_ext = TRUE;
+ need_ext = true;
} /* end if */
/* If we're going to use a version of the superblock format which allows
* for the superblock extension, check for non-default values to store
@@ -1306,15 +1306,15 @@ H5F__super_init(H5F_t *f)
if (sblock->btree_k[H5B_SNODE_ID] != HDF5_BTREE_SNODE_IK_DEF ||
sblock->btree_k[H5B_CHUNK_ID] != HDF5_BTREE_CHUNK_IK_DEF ||
sblock->sym_leaf_k != H5F_CRT_SYM_LEAF_DEF)
- need_ext = TRUE;
+ need_ext = true;
/* Check for driver info to store */
else if (driver_size > 0)
- need_ext = TRUE;
+ need_ext = true;
else
- need_ext = FALSE;
+ need_ext = false;
} /* end if */
else
- need_ext = FALSE;
+ need_ext = false;
/* Set the ring type in the API context */
H5AC_set_ring(H5AC_RING_SBE, NULL);
@@ -1331,7 +1331,7 @@ H5F__super_init(H5F_t *f)
*/
if (H5F__super_ext_create(f, &ext_loc) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTCREATE, FAIL, "unable to create superblock extension");
- ext_created = TRUE;
+ ext_created = true;
/* Create the Shared Object Header Message table and register it with
* the metadata cache, if this file supports shared messages.
@@ -1377,8 +1377,8 @@ H5F__super_init(H5F_t *f)
if (H5O_msg_create(&ext_loc, H5O_DRVINFO_ID, H5O_MSG_FLAG_DONTSHARE, H5O_UPDATE_TIME, &info) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to update driver info header message");
- assert(FALSE == f->shared->drvinfo_sb_msg_exists);
- f->shared->drvinfo_sb_msg_exists = TRUE;
+ assert(false == f->shared->drvinfo_sb_msg_exists);
+ f->shared->drvinfo_sb_msg_exists = true;
} /* end if */
/* Check for non-default free-space info settings */
@@ -1393,7 +1393,7 @@ H5F__super_init(H5F_t *f)
fsinfo.page_size = f->shared->fs_page_size;
fsinfo.pgend_meta_thres = f->shared->pgend_meta_thres;
fsinfo.eoa_pre_fsm_fsalloc = HADDR_UNDEF;
- fsinfo.mapped = FALSE;
+ fsinfo.mapped = false;
/* Set the version for the fsinfo message */
if (H5O_fsinfo_set_version(H5F_LOW_BOUND(f), H5F_HIGH_BOUND(f), &fsinfo) < 0)
@@ -1432,7 +1432,7 @@ H5F__super_init(H5F_t *f)
H5AC__PIN_ENTRY_FLAG | H5AC__FLUSH_LAST_FLAG |
H5AC__FLUSH_COLLECTIVELY_FLAG) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINS, FAIL, "can't add driver info block to cache");
- drvinfo_in_cache = TRUE;
+ drvinfo_in_cache = true;
f->shared->drvinfo = drvinfo;
} /* end if */
else
@@ -1677,11 +1677,11 @@ H5F__super_size(H5F_t *f, hsize_t *super_size, hsize_t *super_ext_size)
*-------------------------------------------------------------------------
*/
herr_t
-H5F__super_ext_write_msg(H5F_t *f, unsigned id, void *mesg, hbool_t may_create, unsigned mesg_flags)
+H5F__super_ext_write_msg(H5F_t *f, unsigned id, void *mesg, bool may_create, unsigned mesg_flags)
{
H5AC_ring_t orig_ring = H5AC_RING_INV; /* Original ring value */
- hbool_t ext_created = FALSE; /* Whether superblock extension was created */
- hbool_t ext_opened = FALSE; /* Whether superblock extension was opened */
+ bool ext_created = false; /* Whether superblock extension was created */
+ bool ext_opened = false; /* Whether superblock extension was opened */
H5O_loc_t ext_loc; /* "Object location" for superblock extension */
htri_t status; /* Indicate whether the message exists or not */
herr_t ret_value = SUCCEED; /* Return value */
@@ -1705,10 +1705,10 @@ H5F__super_ext_write_msg(H5F_t *f, unsigned id, void *mesg, hbool_t may_create,
assert(may_create);
if (H5F__super_ext_create(f, &ext_loc) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTCREATE, FAIL, "unable to create file's superblock extension");
- ext_created = TRUE;
+ ext_created = true;
} /* end else */
assert(H5_addr_defined(ext_loc.addr));
- ext_opened = TRUE;
+ ext_opened = true;
/* Check if message with ID does not exist in the object header */
if ((status = H5O_msg_exists(&ext_loc, id)) < 0)
@@ -1763,7 +1763,7 @@ H5F__super_ext_remove_msg(H5F_t *f, unsigned id)
{
H5AC_ring_t orig_ring = H5AC_RING_INV; /* Original ring value */
H5O_loc_t ext_loc; /* "Object location" for superblock extension */
- hbool_t ext_opened = FALSE; /* Whether the superblock extension was opened */
+ bool ext_opened = false; /* Whether the superblock extension was opened */
int null_count = 0; /* # of null messages */
htri_t status; /* Indicate whether the message exists or not */
herr_t ret_value = SUCCEED; /* Return value */
@@ -1779,7 +1779,7 @@ H5F__super_ext_remove_msg(H5F_t *f, unsigned id)
/* Open superblock extension object header */
if (H5F__super_ext_open(f, f->shared->sblock->ext_addr, &ext_loc) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "error in starting file's superblock extension");
- ext_opened = TRUE;
+ ext_opened = true;
/* Check if message with ID exists in the object header */
if ((status = H5O_msg_exists(&ext_loc, id)) < 0)
@@ -1789,7 +1789,7 @@ H5F__super_ext_remove_msg(H5F_t *f, unsigned id)
H5O_hdr_info_t hdr_info; /* Object header info for superblock extension */
/* Remove the message */
- if (H5O_msg_remove(&ext_loc, id, H5O_ALL, TRUE) < 0)
+ if (H5O_msg_remove(&ext_loc, id, H5O_ALL, true) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to delete free-space manager info message");
/* Get info for the superblock extension's object header */
@@ -1815,7 +1815,7 @@ H5F__super_ext_remove_msg(H5F_t *f, unsigned id)
H5AC_set_ring(orig_ring, NULL);
/* Close superblock extension object header, if opened */
- if (ext_opened && H5F__super_ext_close(f, &ext_loc, FALSE) < 0)
+ if (ext_opened && H5F__super_ext_close(f, &ext_loc, false) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "unable to close file's superblock extension");
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c
index 0e4b02ad415..e62cc474dfe 100644
--- a/src/H5Fsuper_cache.c
+++ b/src/H5Fsuper_cache.c
@@ -60,7 +60,7 @@ static herr_t H5F__cache_superblock_get_initial_load_size(void *udata, size_t *i
static herr_t H5F__cache_superblock_get_final_load_size(const void *image_ptr, size_t image_len, void *udata,
size_t *actual_len);
static htri_t H5F__cache_superblock_verify_chksum(const void *image_ptr, size_t len, void *udata_ptr);
-static void *H5F__cache_superblock_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty);
+static void *H5F__cache_superblock_deserialize(const void *image, size_t len, void *udata, bool *dirty);
static herr_t H5F__cache_superblock_image_len(const void *thing, size_t *image_len);
static herr_t H5F__cache_superblock_serialize(const H5F_t *f, void *image, size_t len, void *thing);
static herr_t H5F__cache_superblock_free_icr(void *thing);
@@ -68,16 +68,16 @@ static herr_t H5F__cache_superblock_free_icr(void *thing);
static herr_t H5F__cache_drvrinfo_get_initial_load_size(void *udata, size_t *image_len);
static herr_t H5F__cache_drvrinfo_get_final_load_size(const void *image_ptr, size_t image_len, void *udata,
size_t *actual_len);
-static void *H5F__cache_drvrinfo_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty);
+static void *H5F__cache_drvrinfo_deserialize(const void *image, size_t len, void *udata, bool *dirty);
static herr_t H5F__cache_drvrinfo_image_len(const void *thing, size_t *image_len);
static herr_t H5F__cache_drvrinfo_serialize(const H5F_t *f, void *image, size_t len, void *thing);
static herr_t H5F__cache_drvrinfo_free_icr(void *thing);
/* Local encode/decode routines */
static herr_t H5F__superblock_prefix_decode(H5F_super_t *sblock, const uint8_t **image_ref, size_t len,
- const H5F_superblock_cache_ud_t *udata, hbool_t extend_eoa);
+ const H5F_superblock_cache_ud_t *udata, bool extend_eoa);
static herr_t H5F__drvrinfo_prefix_decode(H5O_drvinfo_t *drvinfo, char *drv_name, const uint8_t **image_ref,
- size_t len, H5F_drvrinfo_cache_ud_t *udata, hbool_t extend_eoa);
+ size_t len, H5F_drvrinfo_cache_ud_t *udata, bool extend_eoa);
/*********************/
/* Package Variables */
@@ -140,7 +140,7 @@ H5FL_EXTERN(H5F_super_t);
*/
static herr_t
H5F__superblock_prefix_decode(H5F_super_t *sblock, const uint8_t **image_ref, size_t len,
- const H5F_superblock_cache_ud_t *udata, hbool_t extend_eoa)
+ const H5F_superblock_cache_ud_t *udata, bool extend_eoa)
{
const uint8_t *image = (const uint8_t *)*image_ref; /* Pointer into raw data buffer */
const uint8_t *end = image + len - 1; /* Pointer to end of buffer */
@@ -225,7 +225,7 @@ H5F__superblock_prefix_decode(H5F_super_t *sblock, const uint8_t **image_ref, si
*/
static herr_t
H5F__drvrinfo_prefix_decode(H5O_drvinfo_t *drvrinfo, char *drv_name, const uint8_t **image_ref, size_t len,
- H5F_drvrinfo_cache_ud_t *udata, hbool_t extend_eoa)
+ H5F_drvrinfo_cache_ud_t *udata, bool extend_eoa)
{
const uint8_t *image = (const uint8_t *)*image_ref; /* Pointer into raw data buffer */
const uint8_t *end = image + len - 1; /* Pointer to end of buffer */
@@ -340,7 +340,7 @@ H5F__cache_superblock_get_final_load_size(const void *_image, size_t image_len,
assert(image_len >= H5F_SUPERBLOCK_FIXED_SIZE + 6);
/* Deserialize the file superblock's prefix */
- if (H5F__superblock_prefix_decode(&sblock, &image, image_len, udata, TRUE) < 0)
+ if (H5F__superblock_prefix_decode(&sblock, &image, image_len, udata, true) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, FAIL, "can't decode file superblock prefix");
/* Save the version to be used in verify_chksum callback */
@@ -360,7 +360,7 @@ H5F__cache_superblock_get_final_load_size(const void *_image, size_t image_len,
* Purpose: Verify the computed checksum of the data structure is the
* same as the stored chksum.
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: Negative
*-------------------------------------------------------------------------
*/
@@ -371,7 +371,7 @@ H5F__cache_superblock_verify_chksum(const void *_image, size_t len, void *_udata
H5F_superblock_cache_ud_t *udata = (H5F_superblock_cache_ud_t *)_udata; /* User data */
uint32_t stored_chksum; /* Stored metadata checksum value */
uint32_t computed_chksum; /* Computed metadata checksum value */
- htri_t ret_value = TRUE;
+ htri_t ret_value = true;
FUNC_ENTER_PACKAGE_NOERR
@@ -385,7 +385,7 @@ H5F__cache_superblock_verify_chksum(const void *_image, size_t len, void *_udata
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
if (stored_chksum != computed_chksum)
- ret_value = FALSE;
+ ret_value = false;
}
FUNC_LEAVE_NOAPI(ret_value)
@@ -401,7 +401,7 @@ H5F__cache_superblock_verify_chksum(const void *_image, size_t len, void *_udata
*-------------------------------------------------------------------------
*/
static void *
-H5F__cache_superblock_deserialize(const void *_image, size_t len, void *_udata, hbool_t H5_ATTR_UNUSED *dirty)
+H5F__cache_superblock_deserialize(const void *_image, size_t len, void *_udata, bool H5_ATTR_UNUSED *dirty)
{
H5F_super_t *sblock = NULL; /* File's superblock */
H5F_superblock_cache_ud_t *udata = (H5F_superblock_cache_ud_t *)_udata; /* User data */
@@ -421,7 +421,7 @@ H5F__cache_superblock_deserialize(const void *_image, size_t len, void *_udata,
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
/* Deserialize the file superblock's prefix */
- if (H5F__superblock_prefix_decode(sblock, &image, len, udata, FALSE) < 0)
+ if (H5F__superblock_prefix_decode(sblock, &image, len, udata, false) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, NULL, "can't decode file superblock prefix");
/* Check for older version of superblock format */
@@ -551,7 +551,7 @@ H5F__cache_superblock_deserialize(const void *_image, size_t len, void *_udata,
if (udata->ignore_drvrinfo && H5_addr_defined(sblock->driver_addr)) {
/* Eliminate the driver info */
sblock->driver_addr = HADDR_UNDEF;
- udata->drvrinfo_removed = TRUE;
+ udata->drvrinfo_removed = true;
}
/* NOTE: Driver info block is decoded separately, later */
@@ -848,7 +848,7 @@ H5F__cache_drvrinfo_get_final_load_size(const void *_image, size_t image_len, vo
assert(image_len == H5F_DRVINFOBLOCK_HDR_SIZE);
/* Deserialize the file driver info's prefix */
- if (H5F__drvrinfo_prefix_decode(&drvrinfo, NULL, &image, image_len, udata, TRUE) < 0)
+ if (H5F__drvrinfo_prefix_decode(&drvrinfo, NULL, &image, image_len, udata, true) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, FAIL, "can't decode file driver info prefix");
/* Set the final size for the cache image */
@@ -868,7 +868,7 @@ H5F__cache_drvrinfo_get_final_load_size(const void *_image, size_t image_len, vo
*-------------------------------------------------------------------------
*/
static void *
-H5F__cache_drvrinfo_deserialize(const void *_image, size_t len, void *_udata, hbool_t H5_ATTR_UNUSED *dirty)
+H5F__cache_drvrinfo_deserialize(const void *_image, size_t len, void *_udata, bool H5_ATTR_UNUSED *dirty)
{
H5O_drvinfo_t *drvinfo = NULL; /* Driver info */
H5F_drvrinfo_cache_ud_t *udata = (H5F_drvrinfo_cache_ud_t *)_udata; /* User data */
@@ -888,7 +888,7 @@ H5F__cache_drvrinfo_deserialize(const void *_image, size_t len, void *_udata, hb
HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, NULL, "memory allocation failed for driver info message");
/* Deserialize the file driver info's prefix */
- if (H5F__drvrinfo_prefix_decode(drvinfo, drv_name, &image, len, udata, FALSE) < 0)
+ if (H5F__drvrinfo_prefix_decode(drvinfo, drv_name, &image, len, udata, false) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, NULL, "can't decode file driver info prefix");
/* Sanity check */
diff --git a/src/H5Ftest.c b/src/H5Ftest.c
index 593c5255278..081fbda5f8a 100644
--- a/src/H5Ftest.c
+++ b/src/H5Ftest.c
@@ -82,9 +82,9 @@
herr_t
H5F__get_sohm_mesg_count_test(hid_t file_id, unsigned type_id, size_t *mesg_count)
{
- H5F_t *file; /* File info */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_t *file; /* File info */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -95,14 +95,14 @@ H5F__get_sohm_mesg_count_test(hid_t file_id, unsigned type_id, size_t *mesg_coun
/* Push API context */
if (H5CX_push() < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set API context");
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Retrieve count for message type */
if (H5SM__get_mesg_count_test(file, type_id, mesg_count) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve shared message count");
done:
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTRESET, FAIL, "can't reset API context");
FUNC_LEAVE_NOAPI(ret_value)
@@ -123,9 +123,9 @@ H5F__get_sohm_mesg_count_test(hid_t file_id, unsigned type_id, size_t *mesg_coun
herr_t
H5F__check_cached_stab_test(hid_t file_id)
{
- H5F_t *file; /* File info */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_t *file; /* File info */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -136,14 +136,14 @@ H5F__check_cached_stab_test(hid_t file_id)
/* Push API context */
if (H5CX_push() < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set API context");
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Verify the cached stab info */
if (H5G__verify_cached_stab_test(H5G_oloc(file->shared->root_grp), file->shared->sblock->root_ent) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to verify cached symbol table info");
done:
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTRESET, FAIL, "can't reset API context");
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5G.c b/src/H5G.c
index 95fc4bff5be..384eeb2b034 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -160,19 +160,19 @@ H5G__create_api_common(hid_t loc_id, const char *name, hid_t lcpl_id, hid_t gcpl
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be an empty string");
/* Set up object access arguments */
- if (H5VL_setup_acc_args(loc_id, H5P_CLS_GACC, TRUE, &gapl_id, vol_obj_ptr, &loc_params) < 0)
+ if (H5VL_setup_acc_args(loc_id, H5P_CLS_GACC, true, &gapl_id, vol_obj_ptr, &loc_params) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments");
/* Check link creation property list */
if (H5P_DEFAULT == lcpl_id)
lcpl_id = H5P_LINK_CREATE_DEFAULT;
- else if (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE))
+ else if (true != H5P_isa_class(lcpl_id, H5P_LINK_CREATE))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a link creation property list");
/* Check group creation property list */
if (H5P_DEFAULT == gcpl_id)
gcpl_id = H5P_GROUP_CREATE_DEFAULT;
- else if (TRUE != H5P_isa_class(gcpl_id, H5P_GROUP_CREATE))
+ else if (true != H5P_isa_class(gcpl_id, H5P_GROUP_CREATE))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a group creation property list");
/* Set the LCPL for the API context */
@@ -184,7 +184,7 @@ H5G__create_api_common(hid_t loc_id, const char *name, hid_t lcpl_id, hid_t gcpl
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, H5I_INVALID_HID, "unable to create group");
/* Get an ID for the group */
- if ((ret_value = H5VL_register(H5I_GROUP, grp, (*vol_obj_ptr)->connector, TRUE)) < 0)
+ if ((ret_value = H5VL_register(H5I_GROUP, grp, (*vol_obj_ptr)->connector, true)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to get ID for group handle");
done:
@@ -302,7 +302,7 @@ H5Gcreate_async(const char *app_file, const char *app_func, unsigned app_line, h
*
* Example: To create missing groups "A" and "B01" along the given path "/A/B01/grp"
* hid_t create_id = H5Pcreate(H5P_GROUP_CREATE);
- * int status = H5Pset_create_intermediate_group(create_id, TRUE);
+ * int status = H5Pset_create_intermediate_group(create_id, true);
* hid_t gid = H5Gcreate_anon(file_id, "/A/B01/grp", create_id, H5P_DEFAULT);
*
* Return: Success: The object ID of a new, empty group open for
@@ -327,16 +327,16 @@ H5Gcreate_anon(hid_t loc_id, hid_t gcpl_id, hid_t gapl_id)
/* Check group property list */
if (H5P_DEFAULT == gcpl_id)
gcpl_id = H5P_GROUP_CREATE_DEFAULT;
- else if (TRUE != H5P_isa_class(gcpl_id, H5P_GROUP_CREATE))
+ else if (true != H5P_isa_class(gcpl_id, H5P_GROUP_CREATE))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not group create property list");
if (H5P_DEFAULT == gapl_id)
gapl_id = H5P_GROUP_ACCESS_DEFAULT;
- else if (TRUE != H5P_isa_class(gapl_id, H5P_GROUP_ACCESS))
+ else if (true != H5P_isa_class(gapl_id, H5P_GROUP_ACCESS))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not group access property list");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&gapl_id, H5P_CLS_GACC, loc_id, TRUE) < 0)
+ if (H5CX_set_apl(&gapl_id, H5P_CLS_GACC, loc_id, true) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info");
/* Set location struct fields */
@@ -353,7 +353,7 @@ H5Gcreate_anon(hid_t loc_id, hid_t gcpl_id, hid_t gapl_id)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, H5I_INVALID_HID, "unable to create group");
/* Get an ID for the group */
- if ((ret_value = H5VL_register(H5I_GROUP, grp, vol_obj->connector, TRUE)) < 0)
+ if ((ret_value = H5VL_register(H5I_GROUP, grp, vol_obj->connector, true)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to get ID for group handle");
done:
@@ -395,7 +395,7 @@ H5G__open_api_common(hid_t loc_id, const char *name, hid_t gapl_id, void **token
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be an empty string");
/* Set up object access arguments */
- if (H5VL_setup_acc_args(loc_id, H5P_CLS_GACC, FALSE, &gapl_id, vol_obj_ptr, &loc_params) < 0)
+ if (H5VL_setup_acc_args(loc_id, H5P_CLS_GACC, false, &gapl_id, vol_obj_ptr, &loc_params) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments");
if (NULL == (grp = H5VL_group_open(*vol_obj_ptr, &loc_params, name, gapl_id, H5P_DATASET_XFER_DEFAULT,
@@ -403,7 +403,7 @@ H5G__open_api_common(hid_t loc_id, const char *name, hid_t gapl_id, void **token
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open group");
/* Register an ID for the group */
- if ((ret_value = H5VL_register(H5I_GROUP, grp, (*vol_obj_ptr)->connector, TRUE)) < 0)
+ if ((ret_value = H5VL_register(H5I_GROUP, grp, (*vol_obj_ptr)->connector, true)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register group");
done:
@@ -670,7 +670,7 @@ H5G__get_info_by_name_api_common(hid_t loc_id, const char *name, H5G_info_t *gro
/* Set up VOL callback & object access arguments */
vol_cb_args.op_type = H5VL_GROUP_GET_INFO;
- if (H5VL_setup_name_args(loc_id, name, FALSE, lapl_id, vol_obj_ptr,
+ if (H5VL_setup_name_args(loc_id, name, false, lapl_id, vol_obj_ptr,
&vol_cb_args.args.get_info.loc_params) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set object access arguments");
vol_cb_args.args.get_info.ginfo = group_info;
@@ -779,7 +779,7 @@ H5G__get_info_by_idx_api_common(hid_t loc_id, const char *group_name, H5_index_t
/* Set up VOL callback & object access arguments */
vol_cb_args.op_type = H5VL_GROUP_GET_INFO;
- if (H5VL_setup_idx_args(loc_id, group_name, idx_type, order, n, FALSE, lapl_id, vol_obj_ptr,
+ if (H5VL_setup_idx_args(loc_id, group_name, idx_type, order, n, false, lapl_id, vol_obj_ptr,
&vol_cb_args.args.get_info.loc_params) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set object access arguments");
vol_cb_args.args.get_info.ginfo = group_info;
diff --git a/src/H5Gbtree2.c b/src/H5Gbtree2.c
index d44f6745c5f..fcefd1d0214 100644
--- a/src/H5Gbtree2.c
+++ b/src/H5Gbtree2.c
@@ -151,7 +151,7 @@ H5G__dense_fh_name_cmp(const void *obj, size_t obj_len, void *_udata)
HGOTO_ERROR(H5E_SYM, H5E_CANTDECODE, FAIL, "can't decode link");
/* Compare the string values */
- udata->cmp = HDstrcmp(udata->name, lnk->name);
+ udata->cmp = strcmp(udata->name, lnk->name);
/* Check for correct link & callback to make */
if (udata->cmp == 0 && udata->found_op) {
diff --git a/src/H5Gcache.c b/src/H5Gcache.c
index febd37a7767..f7ba49ad933 100644
--- a/src/H5Gcache.c
+++ b/src/H5Gcache.c
@@ -55,7 +55,7 @@
/* Metadata cache (H5AC) callbacks */
static herr_t H5G__cache_node_get_initial_load_size(void *udata, size_t *image_len);
-static void *H5G__cache_node_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty);
+static void *H5G__cache_node_deserialize(const void *image, size_t len, void *udata, bool *dirty);
static herr_t H5G__cache_node_image_len(const void *thing, size_t *image_len);
static herr_t H5G__cache_node_serialize(const H5F_t *f, void *image, size_t len, void *thing);
static herr_t H5G__cache_node_free_icr(void *thing);
@@ -139,7 +139,7 @@ H5G__cache_node_get_initial_load_size(void *_udata, size_t *image_len)
*-------------------------------------------------------------------------
*/
static void *
-H5G__cache_node_deserialize(const void *_image, size_t len, void *_udata, hbool_t H5_ATTR_UNUSED *dirty)
+H5G__cache_node_deserialize(const void *_image, size_t len, void *_udata, bool H5_ATTR_UNUSED *dirty)
{
H5F_t *f = (H5F_t *)_udata; /* User data for callback */
H5G_node_t *sym = NULL; /* Symbol table node created */
diff --git a/src/H5Gcompact.c b/src/H5Gcompact.c
index 08a8fa2b921..4ed675118ba 100644
--- a/src/H5Gcompact.c
+++ b/src/H5Gcompact.c
@@ -49,7 +49,7 @@ typedef struct {
/* upward */
H5O_link_t *lnk; /* Link struct to fill in */
- hbool_t *found; /* Pointer to flag to indicate that the object was found */
+ bool *found; /* Pointer to flag to indicate that the object was found */
} H5G_iter_lkp_t;
/* Private macros */
@@ -214,11 +214,11 @@ H5G__compact_get_name_by_idx(const H5O_loc_t *oloc, const H5O_linfo_t *linfo, H5
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "index out of bound");
/* Get the length of the name */
- *name_len = HDstrlen(ltable.lnks[idx].name);
+ *name_len = strlen(ltable.lnks[idx].name);
/* Copy the name into the user's buffer, if given */
if (name) {
- HDstrncpy(name, ltable.lnks[idx].name, MIN((*name_len + 1), name_size));
+ strncpy(name, ltable.lnks[idx].name, MIN((*name_len + 1), name_size));
if (*name_len >= name_size)
name[name_size - 1] = '\0';
} /* end if */
@@ -255,7 +255,7 @@ H5G__compact_remove_common_cb(const void *_mesg, unsigned H5_ATTR_UNUSED idx, vo
assert(udata);
/* If we've found the right link, get the object type */
- if (HDstrcmp(lnk->name, udata->name) == 0) {
+ if (strcmp(lnk->name, udata->name) == 0) {
/* Replace path names for link being removed */
if (H5G__link_name_replace(udata->file, udata->grp_full_path_r, lnk) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to get object type");
@@ -294,7 +294,7 @@ H5G__compact_remove(const H5O_loc_t *oloc, H5RS_str_t *grp_full_path_r, const ch
udata.name = name;
/* Iterate over the link messages to delete the right one */
- if (H5O_msg_remove_op(oloc, H5O_LINK_ID, H5O_FIRST, H5G__compact_remove_common_cb, &udata, TRUE) < 0)
+ if (H5O_msg_remove_op(oloc, H5O_LINK_ID, H5O_FIRST, H5G__compact_remove_common_cb, &udata, true) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete link message");
done:
@@ -337,7 +337,7 @@ H5G__compact_remove_by_idx(const H5O_loc_t *oloc, const H5O_linfo_t *linfo, H5RS
udata.name = ltable.lnks[n].name;
/* Iterate over the link messages to delete the right one */
- if (H5O_msg_remove_op(oloc, H5O_LINK_ID, H5O_FIRST, H5G__compact_remove_common_cb, &udata, TRUE) < 0)
+ if (H5O_msg_remove_op(oloc, H5O_LINK_ID, H5O_FIRST, H5G__compact_remove_common_cb, &udata, true) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete link message");
done:
@@ -412,7 +412,7 @@ H5G__compact_lookup_cb(const void *_mesg, unsigned H5_ATTR_UNUSED idx, void *_ud
assert(udata);
/* Check for name to get information */
- if (HDstrcmp(lnk->name, udata->name) == 0) {
+ if (strcmp(lnk->name, udata->name) == 0) {
if (udata->lnk) {
/* Copy link information */
if (NULL == H5O_msg_copy(H5O_LINK_ID, lnk, udata->lnk))
@@ -420,7 +420,7 @@ H5G__compact_lookup_cb(const void *_mesg, unsigned H5_ATTR_UNUSED idx, void *_ud
} /* end if */
/* Indicate that the correct link was found */
- *udata->found = TRUE;
+ *udata->found = true;
/* Stop iteration now */
HGOTO_DONE(H5_ITER_STOP);
@@ -435,12 +435,12 @@ H5G__compact_lookup_cb(const void *_mesg, unsigned H5_ATTR_UNUSED idx, void *_ud
*
* Purpose: Look up an object relative to a group, using link messages.
*
- * Return: Non-negative (TRUE/FALSE) on success/Negative on failure
+ * Return: Non-negative (true/false) on success/Negative on failure
*
*-------------------------------------------------------------------------
*/
herr_t
-H5G__compact_lookup(const H5O_loc_t *oloc, const char *name, hbool_t *found, H5O_link_t *lnk)
+H5G__compact_lookup(const H5O_loc_t *oloc, const char *name, bool *found, H5O_link_t *lnk)
{
H5G_iter_lkp_t udata; /* User data for iteration callback */
H5O_mesg_operator_t op; /* Message operator */
diff --git a/src/H5Gdense.c b/src/H5Gdense.c
index 961560ad4ad..531549e6423 100644
--- a/src/H5Gdense.c
+++ b/src/H5Gdense.c
@@ -45,7 +45,7 @@
#define H5G_FHEAP_MAN_MAX_DIRECT_SIZE (64 * 1024)
#define H5G_FHEAP_MAN_MAX_INDEX 32
#define H5G_FHEAP_MAN_START_ROOT_ROWS 1
-#define H5G_FHEAP_CHECKSUM_DBLOCKS TRUE
+#define H5G_FHEAP_CHECKSUM_DBLOCKS true
#define H5G_FHEAP_MAX_MAN_SIZE (4 * 1024)
/* v2 B-tree creation macros for 'name' field index */
@@ -109,10 +109,10 @@ typedef struct {
typedef struct {
/* downward */
H5G_bt2_ud_common_t common; /* Common info for B-tree user data (must be first) */
- hbool_t rem_from_fheap; /* Whether to remove the link from the fractal heap */
+ bool rem_from_fheap; /* Whether to remove the link from the fractal heap */
haddr_t corder_bt2_addr; /* Address of v2 B-tree indexing creation order */
H5RS_str_t *grp_full_path_r; /* Full path of group where link is removed */
- hbool_t replace_names; /* Whether to replace the names of open objects */
+ bool replace_names; /* Whether to replace the names of open objects */
} H5G_bt2_ud_rm_t;
/*
@@ -124,7 +124,7 @@ typedef struct {
H5F_t *f; /* Pointer to file that fractal heap is in */
haddr_t corder_bt2_addr; /* Address of v2 B-tree indexing creation order */
H5RS_str_t *grp_full_path_r; /* Full path of group where link is removed */
- hbool_t replace_names; /* Whether to replace the names of open objects */
+ bool replace_names; /* Whether to replace the names of open objects */
} H5G_fh_ud_rm_t;
/*
@@ -363,7 +363,7 @@ H5G__dense_insert(H5F_t *f, const H5O_linfo_t *linfo, const H5O_link_t *lnk)
assert(lnk);
/* Find out the size of buffer needed for serialized link */
- if ((link_size = H5O_msg_raw_size(f, H5O_LINK_ID, FALSE, lnk)) == 0)
+ if ((link_size = H5O_msg_raw_size(f, H5O_LINK_ID, false, lnk)) == 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGETSIZE, FAIL, "can't get link size");
/* Wrap the local buffer for serialized link */
@@ -375,7 +375,7 @@ H5G__dense_insert(H5F_t *f, const H5O_linfo_t *linfo, const H5O_link_t *lnk)
HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't get actual buffer");
/* Create serialized form of link */
- if (H5O_msg_encode(f, H5O_LINK_ID, FALSE, (unsigned char *)link_ptr, lnk) < 0)
+ if (H5O_msg_encode(f, H5O_LINK_ID, false, (unsigned char *)link_ptr, lnk) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "can't encode link");
/* Open the fractal heap */
@@ -394,7 +394,7 @@ H5G__dense_insert(H5F_t *f, const H5O_linfo_t *linfo, const H5O_link_t *lnk)
udata.common.f = f;
udata.common.fheap = fheap;
udata.common.name = lnk->name;
- udata.common.name_hash = H5_checksum_lookup3(lnk->name, HDstrlen(lnk->name), 0);
+ udata.common.name_hash = H5_checksum_lookup3(lnk->name, strlen(lnk->name), 0);
udata.common.corder = lnk->corder;
udata.common.found_op = NULL;
udata.common.found_op_data = NULL;
@@ -472,7 +472,7 @@ H5G__dense_lookup_cb(const void *_lnk, void *_user_lnk)
*-------------------------------------------------------------------------
*/
herr_t
-H5G__dense_lookup(H5F_t *f, const H5O_linfo_t *linfo, const char *name, hbool_t *found, H5O_link_t *lnk)
+H5G__dense_lookup(H5F_t *f, const H5O_linfo_t *linfo, const char *name, bool *found, H5O_link_t *lnk)
{
H5G_bt2_ud_common_t udata; /* User data for v2 B-tree link lookup */
H5HF_t *fheap = NULL; /* Fractal heap handle */
@@ -502,7 +502,7 @@ H5G__dense_lookup(H5F_t *f, const H5O_linfo_t *linfo, const char *name, hbool_t
udata.f = f;
udata.fheap = fheap;
udata.name = name;
- udata.name_hash = H5_checksum_lookup3(name, HDstrlen(name), 0);
+ udata.name_hash = H5_checksum_lookup3(name, strlen(name), 0);
udata.found_op = H5G__dense_lookup_cb; /* v2 B-tree comparison callback */
udata.found_op_data = lnk;
@@ -1004,11 +1004,11 @@ H5G__dense_get_name_by_idx_fh_cb(const void *obj, size_t obj_len, void *_udata)
HGOTO_ERROR(H5E_SYM, H5E_CANTDECODE, FAIL, "can't decode link");
/* Get the length of the name */
- udata->name_len = HDstrlen(lnk->name);
+ udata->name_len = strlen(lnk->name);
/* Copy the name into the user's buffer, if given */
if (udata->name) {
- HDstrncpy(udata->name, lnk->name, MIN((udata->name_len + 1), udata->name_size));
+ strncpy(udata->name, lnk->name, MIN((udata->name_len + 1), udata->name_size));
if (udata->name_len >= udata->name_size)
udata->name[udata->name_size - 1] = '\0';
} /* end if */
@@ -1146,11 +1146,11 @@ H5G__dense_get_name_by_idx(H5F_t *f, H5O_linfo_t *linfo, H5_index_t idx_type, H5
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "index out of bound");
/* Get the length of the name */
- *name_len = HDstrlen(ltable.lnks[n].name);
+ *name_len = strlen(ltable.lnks[n].name);
/* Copy the name into the user's buffer, if given */
if (name) {
- HDstrncpy(name, ltable.lnks[n].name, MIN((*name_len + 1), name_size));
+ strncpy(name, ltable.lnks[n].name, MIN((*name_len + 1), name_size));
if (*name_len >= name_size)
name[name_size - 1] = '\0';
} /* end if */
@@ -1306,13 +1306,13 @@ H5G__dense_remove(H5F_t *f, const H5O_linfo_t *linfo, H5RS_str_t *grp_full_path_
udata.common.f = f;
udata.common.fheap = fheap;
udata.common.name = name;
- udata.common.name_hash = H5_checksum_lookup3(name, HDstrlen(name), 0);
+ udata.common.name_hash = H5_checksum_lookup3(name, strlen(name), 0);
udata.common.found_op = NULL;
udata.common.found_op_data = NULL;
- udata.rem_from_fheap = TRUE;
+ udata.rem_from_fheap = true;
udata.corder_bt2_addr = linfo->corder_bt2_addr;
udata.grp_full_path_r = grp_full_path_r;
- udata.replace_names = TRUE;
+ udata.replace_names = true;
/* Remove the record from the name index v2 B-tree */
if (H5B2_remove(bt2, &udata, H5G__dense_remove_bt2_cb, &udata) < 0)
@@ -1418,7 +1418,7 @@ H5G__dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
other_bt2_udata.fheap = bt2_udata->fheap;
other_bt2_udata.name = fh_udata.lnk->name;
other_bt2_udata.name_hash =
- H5_checksum_lookup3(fh_udata.lnk->name, HDstrlen(fh_udata.lnk->name), 0);
+ H5_checksum_lookup3(fh_udata.lnk->name, strlen(fh_udata.lnk->name), 0);
other_bt2_udata.found_op = NULL;
other_bt2_udata.found_op_data = NULL;
} /* end else */
@@ -1574,7 +1574,7 @@ H5G__dense_remove_by_idx(H5F_t *f, const H5O_linfo_t *linfo, H5RS_str_t *grp_ful
*-------------------------------------------------------------------------
*/
herr_t
-H5G__dense_delete(H5F_t *f, H5O_linfo_t *linfo, hbool_t adj_link)
+H5G__dense_delete(H5F_t *f, H5O_linfo_t *linfo, bool adj_link)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -1605,10 +1605,10 @@ H5G__dense_delete(H5F_t *f, H5O_linfo_t *linfo, hbool_t adj_link)
udata.common.name_hash = 0;
udata.common.found_op = NULL;
udata.common.found_op_data = NULL;
- udata.rem_from_fheap = FALSE; /* handled in "bulk" below by deleting entire heap */
+ udata.rem_from_fheap = false; /* handled in "bulk" below by deleting entire heap */
udata.corder_bt2_addr = linfo->corder_bt2_addr;
udata.grp_full_path_r = NULL;
- udata.replace_names = FALSE;
+ udata.replace_names = false;
/* Delete the name index, adjusting the ref. count on links removed */
if (H5B2_delete(f, linfo->name_bt2_addr, NULL, H5G__dense_remove_bt2_cb, &udata) < 0)
diff --git a/src/H5Gdeprec.c b/src/H5Gdeprec.c
index 79a5fce8a9f..8b9b5c8dc68 100644
--- a/src/H5Gdeprec.c
+++ b/src/H5Gdeprec.c
@@ -55,7 +55,7 @@
/* User data for path traversal routine for getting object info */
typedef struct {
H5G_stat_t *statbuf; /* Stat buffer about object */
- hbool_t follow_link; /* Whether we are following a link or not */
+ bool follow_link; /* Whether we are following a link or not */
H5F_t *loc_file; /* Pointer to the file the location is in */
} H5G_trav_goi_t;
@@ -178,7 +178,7 @@ H5Gcreate1(hid_t loc_id, const char *name, size_t size_hint)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a property list");
/* Make a copy of the default property list */
- if ((tmp_gcpl = H5P_copy_plist(gc_plist, FALSE)) < 0)
+ if ((tmp_gcpl = H5P_copy_plist(gc_plist, false)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5I_INVALID_HID, "unable to copy the creation property list");
/* Get pointer to the copied property list */
@@ -216,7 +216,7 @@ H5Gcreate1(hid_t loc_id, const char *name, size_t size_hint)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, H5I_INVALID_HID, "unable to create group");
/* Get an ID for the group */
- if ((ret_value = H5VL_register(H5I_GROUP, grp, vol_obj->connector, TRUE)) < 0)
+ if ((ret_value = H5VL_register(H5I_GROUP, grp, vol_obj->connector, true)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register group");
done:
@@ -274,7 +274,7 @@ H5Gopen1(hid_t loc_id, const char *name)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open group");
/* Get an ID for the group */
- if ((ret_value = H5VL_register(H5I_GROUP, grp, vol_obj->connector, TRUE)) < 0)
+ if ((ret_value = H5VL_register(H5I_GROUP, grp, vol_obj->connector, true)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register group");
done:
@@ -1062,7 +1062,7 @@ H5G__get_objinfo_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char *name,
*-------------------------------------------------------------------------
*/
herr_t
-H5G__get_objinfo(const H5G_loc_t *loc, const char *name, hbool_t follow_link, H5G_stat_t *statbuf /*out*/)
+H5G__get_objinfo(const H5G_loc_t *loc, const char *name, bool follow_link, H5G_stat_t *statbuf /*out*/)
{
H5G_trav_goi_t udata; /* User data for callback */
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5Gent.c b/src/H5Gent.c
index 02b4c8a3809..0563ae15d4d 100644
--- a/src/H5Gent.c
+++ b/src/H5Gent.c
@@ -371,7 +371,7 @@ H5G__ent_convert(H5F_t *f, H5HL_t *heap, const char *name, const H5O_link_t *lnk
H5G__ent_reset(ent);
/* Add the new name to the heap */
- if (H5HL_insert(f, heap, HDstrlen(name) + 1, name, &name_offset) < 0)
+ if (H5HL_insert(f, heap, strlen(name) + 1, name, &name_offset) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert symbol name into heap");
ent->name_off = name_offset;
@@ -419,7 +419,7 @@ H5G__ent_convert(H5F_t *f, H5HL_t *heap, const char *name, const H5O_link_t *lnk
targ_oloc.addr = lnk->u.hard.addr;
/* Get the object header */
- if (NULL == (oh = H5O_protect(&targ_oloc, H5AC__READ_ONLY_FLAG, FALSE)))
+ if (NULL == (oh = H5O_protect(&targ_oloc, H5AC__READ_ONLY_FLAG, false)))
HGOTO_ERROR(H5E_SYM, H5E_CANTPROTECT, FAIL, "unable to protect target object header");
/* Check if a symbol table message exists */
@@ -459,7 +459,7 @@ H5G__ent_convert(H5F_t *f, H5HL_t *heap, const char *name, const H5O_link_t *lnk
size_t lnk_offset; /* Offset to sym-link value */
/* Insert link value into local heap */
- if (H5HL_insert(f, heap, HDstrlen(lnk->u.soft.name) + 1, lnk->u.soft.name, &lnk_offset) < 0)
+ if (H5HL_insert(f, heap, strlen(lnk->u.soft.name) + 1, lnk->u.soft.name, &lnk_offset) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to write link value to local heap");
ent->type = H5G_CACHED_SLINK;
diff --git a/src/H5Gint.c b/src/H5Gint.c
index 8607c3b1212..1be54ed3ac8 100644
--- a/src/H5Gint.c
+++ b/src/H5Gint.c
@@ -154,7 +154,7 @@ H5G_top_term_package(void)
FUNC_ENTER_NOAPI_NOINIT_NOERR
if (H5I_nmembers(H5I_GROUP) > 0) {
- (void)H5I_clear_type(H5I_GROUP, FALSE, FALSE);
+ (void)H5I_clear_type(H5I_GROUP, false, false);
n++;
}
@@ -311,7 +311,7 @@ H5G__create(H5F_t *file, H5G_obj_create_t *gcrt_info)
/* Add group to list of open objects in file */
if (H5FO_top_incr(grp->oloc.file, grp->oloc.addr) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINC, NULL, "can't incr object ref. count");
- if (H5FO_insert(grp->oloc.file, grp->oloc.addr, grp->shared, TRUE) < 0)
+ if (H5FO_insert(grp->oloc.file, grp->oloc.addr, grp->shared, true) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, NULL, "can't insert group into list of open objects");
/* Set the count of times the object is opened */
@@ -359,7 +359,7 @@ H5G__open_name(const H5G_loc_t *loc, const char *name)
H5G_loc_t grp_loc; /* Location used to open group */
H5G_name_t grp_path; /* Opened object group hier. path */
H5O_loc_t grp_oloc; /* Opened object object location */
- hbool_t loc_found = FALSE; /* Location at 'name' found */
+ bool loc_found = false; /* Location at 'name' found */
H5O_type_t obj_type; /* Type of object at location */
H5G_t *ret_value = NULL; /* Return value */
@@ -377,7 +377,7 @@ H5G__open_name(const H5G_loc_t *loc, const char *name)
/* Find the group object */
if (H5G_loc_find(loc, name, &grp_loc /*out*/) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, NULL, "group not found");
- loc_found = TRUE;
+ loc_found = true;
/* Check that the object found is the correct type */
if (H5O_obj_type(&grp_oloc, &obj_type) < 0)
@@ -445,7 +445,7 @@ H5G_open(const H5G_loc_t *loc)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, NULL, "not found");
/* Add group to list of open objects in file */
- if (H5FO_insert(grp->oloc.file, grp->oloc.addr, grp->shared, FALSE) < 0) {
+ if (H5FO_insert(grp->oloc.file, grp->oloc.addr, grp->shared, false) < 0) {
grp->shared = H5FL_FREE(H5G_shared_t, grp->shared);
HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, NULL, "can't insert group into list of open objects");
} /* end if */
@@ -504,8 +504,8 @@ H5G_open(const H5G_loc_t *loc)
static herr_t
H5G__open_oid(H5G_t *grp)
{
- hbool_t obj_opened = FALSE;
- herr_t ret_value = SUCCEED;
+ bool obj_opened = false;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_PACKAGE
@@ -519,7 +519,7 @@ H5G__open_oid(H5G_t *grp)
/* Grab the object header */
if (H5O_open(&(grp->oloc)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group");
- obj_opened = TRUE;
+ obj_opened = true;
/* Check if this object has the right message(s) to be treated as a group */
if ((H5O_msg_exists(&(grp->oloc), H5O_STAB_ID) <= 0) && (H5O_msg_exists(&(grp->oloc), H5O_LINFO_ID) <= 0))
@@ -548,9 +548,9 @@ H5G__open_oid(H5G_t *grp)
herr_t
H5G_close(H5G_t *grp)
{
- hbool_t corked; /* Whether the group is corked or not */
- hbool_t file_closed = TRUE; /* H5O_close also closed the file? */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool corked; /* Whether the group is corked or not */
+ bool file_closed = true; /* H5O_close also closed the file? */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -582,7 +582,7 @@ H5G_close(H5G_t *grp)
if (!file_closed && H5F_SHARED(grp->oloc.file) && H5F_EVICT_ON_CLOSE(grp->oloc.file)) {
if (H5AC_flush_tagged_metadata(grp->oloc.file, grp->oloc.addr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush tagged metadata");
- if (H5AC_evict_tagged_metadata(grp->oloc.file, grp->oloc.addr, FALSE) < 0)
+ if (H5AC_evict_tagged_metadata(grp->oloc.file, grp->oloc.addr, false) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to evict tagged metadata");
} /* end if */
@@ -722,10 +722,10 @@ H5G_mount(H5G_t *grp)
/* Check args */
assert(grp && grp->shared);
- assert(grp->shared->mounted == FALSE);
+ assert(grp->shared->mounted == false);
/* Set the 'mounted' flag */
- grp->shared->mounted = TRUE;
+ grp->shared->mounted = true;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5G_mount() */
@@ -739,7 +739,7 @@ H5G_mount(H5G_t *grp)
*
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
H5G_mounted(H5G_t *grp)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -766,10 +766,10 @@ H5G_unmount(H5G_t *grp)
/* Check args */
assert(grp && grp->shared);
- assert(grp->shared->mounted == TRUE);
+ assert(grp->shared->mounted == true);
/* Reset the 'mounted' flag */
- grp->shared->mounted = FALSE;
+ grp->shared->mounted = false;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5G_unmount() */
@@ -854,7 +854,7 @@ H5G_iterate(H5G_loc_t *loc, const char *group_name, H5_index_t idx_type, H5_iter
*/
if (NULL == (grp = H5G__open_name(loc, group_name)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group");
- if ((gid = H5VL_wrap_register(H5I_GROUP, grp, TRUE)) < 0)
+ if ((gid = H5VL_wrap_register(H5I_GROUP, grp, true)) < 0)
HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register group");
/* Set up user data for callback */
@@ -917,7 +917,7 @@ H5G__visit_cb(const H5O_link_t *lnk, void *_udata)
H5G_loc_t obj_loc; /* Location of object */
H5G_name_t obj_path; /* Object's group hier. path */
H5O_loc_t obj_oloc; /* Object's object location */
- hbool_t obj_found = FALSE; /* Object at 'name' found */
+ bool obj_found = false; /* Object at 'name' found */
size_t old_path_len = udata->curr_path_len; /* Length of path before appending this link's name */
size_t link_name_len; /* Length of link's name */
size_t len_needed; /* Length of path string needed */
@@ -931,7 +931,7 @@ H5G__visit_cb(const H5O_link_t *lnk, void *_udata)
/* Check if we will need more space to store this link's relative path */
/* ("+2" is for string terminator and possible '/' for group separator later) */
- link_name_len = HDstrlen(lnk->name);
+ link_name_len = strlen(lnk->name);
len_needed = udata->curr_path_len + link_name_len + 2;
if (len_needed > udata->path_buf_size) {
void *new_path; /* Pointer to new path buffer */
@@ -945,7 +945,7 @@ H5G__visit_cb(const H5O_link_t *lnk, void *_udata)
/* Build the link's relative path name */
assert(udata->path[old_path_len] == '\0');
- HDstrncpy(&(udata->path[old_path_len]), lnk->name, link_name_len + 1);
+ strncpy(&(udata->path[old_path_len]), lnk->name, link_name_len + 1);
udata->curr_path_len += link_name_len;
/* Construct the link info from the link message */
@@ -968,7 +968,7 @@ H5G__visit_cb(const H5O_link_t *lnk, void *_udata)
/* (Correctly handles mounted files) */
if (H5G_loc_find(udata->curr_loc, lnk->name, &obj_loc /*out*/) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, H5_ITER_ERROR, "object not found");
- obj_found = TRUE;
+ obj_found = true;
/* Construct unique "position" for this object */
H5F_GET_FILENO(obj_oloc.file, obj_pos.fileno);
@@ -1008,7 +1008,7 @@ H5G__visit_cb(const H5O_link_t *lnk, void *_udata)
/* Add the path separator to the current path */
assert(udata->path[udata->curr_path_len] == '\0');
- HDstrncpy(&(udata->path[udata->curr_path_len]), "/", (size_t)2);
+ strncpy(&(udata->path[udata->curr_path_len]), "/", (size_t)2);
udata->curr_path_len++;
/* Attempt to get the link info for this group */
@@ -1108,7 +1108,7 @@ H5G_visit(H5G_loc_t *loc, const char *group_name, H5_index_t idx_type, H5_iter_o
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group");
/* Register an ID for the starting group */
- if ((gid = H5VL_wrap_register(H5I_GROUP, grp, TRUE)) < 0)
+ if ((gid = H5VL_wrap_register(H5I_GROUP, grp, true)) < 0)
HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register group");
/* Get the location of the starting group */
@@ -1223,7 +1223,7 @@ H5G_get_create_plist(const H5G_t *grp)
/* Copy the default group creation property list */
if (NULL == (gcpl_plist = (H5P_genplist_t *)H5I_object(H5P_LST_GROUP_CREATE_ID_g)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "can't get default group creation property list");
- if ((new_gcpl_id = H5P_copy_plist(gcpl_plist, TRUE)) < 0)
+ if ((new_gcpl_id = H5P_copy_plist(gcpl_plist, true)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5I_INVALID_HID, "unable to copy the creation property list");
if (NULL == (new_plist = (H5P_genplist_t *)H5I_object(new_gcpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "can't get property list");
@@ -1299,7 +1299,7 @@ H5G__get_info_by_name(const H5G_loc_t *loc, const char *name, H5G_info_t *grp_in
H5G_loc_t grp_loc; /* Location used to open group */
H5G_name_t grp_path; /* Opened object group hier. path */
H5O_loc_t grp_oloc; /* Opened object object location */
- hbool_t loc_found = FALSE; /* Location at 'name' found */
+ bool loc_found = false; /* Location at 'name' found */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1316,7 +1316,7 @@ H5G__get_info_by_name(const H5G_loc_t *loc, const char *name, H5G_info_t *grp_in
/* Find the group object */
if (H5G_loc_find(loc, name, &grp_loc /*out*/) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "group not found");
- loc_found = TRUE;
+ loc_found = true;
/* Retrieve the group's information */
if (H5G__obj_info(grp_loc.oloc, grp_info /*out*/) < 0)
@@ -1346,7 +1346,7 @@ H5G__get_info_by_idx(const H5G_loc_t *loc, const char *group_name, H5_index_t id
H5G_loc_t grp_loc; /* Location used to open group */
H5G_name_t grp_path; /* Opened object group hier. path */
H5O_loc_t grp_oloc; /* Opened object object location */
- hbool_t loc_found = FALSE; /* Location at 'name' found */
+ bool loc_found = false; /* Location at 'name' found */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1363,7 +1363,7 @@ H5G__get_info_by_idx(const H5G_loc_t *loc, const char *group_name, H5_index_t id
/* Find the object's location, according to the order in the index */
if (H5G_loc_find_by_idx(loc, group_name, idx_type, order, n, &grp_loc /*out*/) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "group not found");
- loc_found = TRUE;
+ loc_found = true;
/* Retrieve the group's information */
if (H5G__obj_info(grp_loc.oloc, grp_info /*out*/) < 0)
diff --git a/src/H5Glink.c b/src/H5Glink.c
index be34877f701..fd4d5602798 100644
--- a/src/H5Glink.c
+++ b/src/H5Glink.c
@@ -91,7 +91,7 @@ H5G__link_cmp_name_inc(const void *lnk1, const void *lnk2)
{
FUNC_ENTER_PACKAGE_NOERR
- FUNC_LEAVE_NOAPI(HDstrcmp(((const H5O_link_t *)lnk1)->name, ((const H5O_link_t *)lnk2)->name))
+ FUNC_LEAVE_NOAPI(strcmp(((const H5O_link_t *)lnk1)->name, ((const H5O_link_t *)lnk2)->name))
} /* end H5G__link_cmp_name_inc() */
/*-------------------------------------------------------------------------
@@ -113,7 +113,7 @@ H5G__link_cmp_name_dec(const void *lnk1, const void *lnk2)
{
FUNC_ENTER_PACKAGE_NOERR
- FUNC_LEAVE_NOAPI(HDstrcmp(((const H5O_link_t *)lnk2)->name, ((const H5O_link_t *)lnk1)->name))
+ FUNC_LEAVE_NOAPI(strcmp(((const H5O_link_t *)lnk2)->name, ((const H5O_link_t *)lnk1)->name))
} /* end H5G__link_cmp_name_dec() */
/*-------------------------------------------------------------------------
@@ -188,8 +188,8 @@ H5G__link_cmp_corder_dec(const void *lnk1, const void *lnk2)
herr_t
H5G__ent_to_link(H5O_link_t *lnk, const H5HL_t *heap, const H5G_entry_t *ent, const char *name)
{
- hbool_t dup_soft = FALSE; /* xstrdup the symbolic link name or not */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool dup_soft = false; /* xstrdup the symbolic link name or not */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -202,7 +202,7 @@ H5G__ent_to_link(H5O_link_t *lnk, const H5HL_t *heap, const H5G_entry_t *ent, co
/* Set (default) common info for link */
lnk->cset = H5F_DEFAULT_CSET;
lnk->corder = 0;
- lnk->corder_valid = FALSE; /* Creation order not valid for this link */
+ lnk->corder_valid = false; /* Creation order not valid for this link */
if ((lnk->name = H5MM_xstrdup(name)) == NULL)
HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to duplicate link name");
@@ -217,7 +217,7 @@ H5G__ent_to_link(H5O_link_t *lnk, const H5HL_t *heap, const H5G_entry_t *ent, co
if ((lnk->u.soft.name = H5MM_xstrdup(s)) == NULL)
HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to duplicate symbolic link name");
- dup_soft = TRUE;
+ dup_soft = true;
/* Set link type */
lnk->type = H5L_TYPE_SOFT;
@@ -276,7 +276,7 @@ H5G_link_to_info(const H5O_loc_t *link_loc, const H5O_link_t *lnk, H5L_info2_t *
break;
case H5L_TYPE_SOFT:
- info->u.val_size = HDstrlen(lnk->u.soft.name) + 1; /*count the null terminator*/
+ info->u.val_size = strlen(lnk->u.soft.name) + 1; /*count the null terminator*/
break;
case H5L_TYPE_ERROR:
@@ -353,7 +353,7 @@ H5G__link_to_loc(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, H5G_loc_t *obj
/* Set the object location, if it's a hard link set the address also */
obj_loc->oloc->file = grp_loc->oloc->file;
- obj_loc->oloc->holding_file = FALSE;
+ obj_loc->oloc->holding_file = false;
if (lnk->type == H5L_TYPE_HARD)
obj_loc->oloc->addr = lnk->u.hard.addr;
diff --git a/src/H5Gloc.c b/src/H5Gloc.c
index 24590d00d95..1ba45dee223 100644
--- a/src/H5Gloc.c
+++ b/src/H5Gloc.c
@@ -441,9 +441,9 @@ H5G__loc_find_by_idx_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_
{
H5G_loc_fbi_t *udata = (H5G_loc_fbi_t *)_udata; /* User data passed in */
H5O_link_t fnd_lnk; /* Link within group */
- hbool_t lnk_copied = FALSE; /* Whether the link was copied */
- hbool_t obj_loc_valid = FALSE; /* Flag to indicate that the object location is valid */
- hbool_t obj_exists = FALSE; /* Whether the object exists (unused) */
+ bool lnk_copied = false; /* Whether the link was copied */
+ bool obj_loc_valid = false; /* Flag to indicate that the object location is valid */
+ bool obj_exists = false; /* Whether the object exists (unused) */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -455,17 +455,17 @@ H5G__loc_find_by_idx_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_
/* Query link */
if (H5G_obj_lookup_by_idx(obj_loc->oloc, udata->idx_type, udata->order, udata->n, &fnd_lnk) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "link not found");
- lnk_copied = TRUE;
+ lnk_copied = true;
/* Build the initial object location for the link */
if (H5G__link_to_loc(obj_loc, &fnd_lnk, udata->loc) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "cannot initialize object location");
- obj_loc_valid = TRUE;
+ obj_loc_valid = true;
/* Perform any special traversals that the link needs */
/* (soft links, user-defined links, file mounting, etc.) */
/* (may modify the object location) */
- if (H5G__traverse_special(obj_loc, &fnd_lnk, H5G_TARGET_NORMAL, TRUE, udata->loc, &obj_exists) < 0)
+ if (H5G__traverse_special(obj_loc, &fnd_lnk, H5G_TARGET_NORMAL, true, udata->loc, &obj_exists) < 0)
HGOTO_ERROR(H5E_LINK, H5E_TRAVERSE, FAIL, "special link traversal failed");
done:
@@ -548,12 +548,12 @@ H5G__loc_insert(H5G_loc_t *grp_loc, char *name, H5G_loc_t *obj_loc, H5O_type_t o
lnk.type = H5L_TYPE_HARD;
lnk.cset = H5F_DEFAULT_CSET;
lnk.corder = 0; /* Will be reset if the group is tracking creation order */
- lnk.corder_valid = FALSE; /* Indicate that the creation order isn't valid (yet) */
+ lnk.corder_valid = false; /* Indicate that the creation order isn't valid (yet) */
lnk.name = name;
lnk.u.hard.addr = obj_loc->oloc->addr;
/* Insert new group into current group's symbol table */
- if (H5G_obj_insert(grp_loc->oloc, name, &lnk, TRUE, obj_type, crt_info) < 0)
+ if (H5G_obj_insert(grp_loc->oloc, name, &lnk, true, obj_type, crt_info) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert object");
/* Set the name of the object location */
@@ -578,19 +578,19 @@ H5G__loc_exists_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ATTR_
const H5O_link_t H5_ATTR_UNUSED *lnk, H5G_loc_t *obj_loc, void *_udata /*in,out*/,
H5G_own_loc_t *own_loc /*out*/)
{
- hbool_t *exists = (hbool_t *)_udata; /* User data passed in */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool *exists = (bool *)_udata; /* User data passed in */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
/* Check if the name in this group resolved to a valid object */
if (obj_loc == NULL)
if (lnk)
- *exists = FALSE;
+ *exists = false;
else
HGOTO_ERROR(H5E_SYM, H5E_INTERNAL, FAIL, "no object or link info?");
else
- *exists = TRUE;
+ *exists = true;
/* Indicate that this callback didn't take ownership of the group *
* location for the object */
@@ -605,13 +605,13 @@ H5G__loc_exists_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ATTR_
*
* Purpose: Check if an object actually exists at a location
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: Negative
*
*-------------------------------------------------------------------------
*/
herr_t
-H5G_loc_exists(const H5G_loc_t *loc, const char *name, hbool_t *exists)
+H5G_loc_exists(const H5G_loc_t *loc, const char *name, bool *exists)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -865,13 +865,13 @@ H5G__loc_set_comment_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_
/* Remove the previous comment message if any */
if (exists)
- if (H5O_msg_remove(obj_loc->oloc, H5O_NAME_ID, 0, TRUE) < 0)
+ if (H5O_msg_remove(obj_loc->oloc, H5O_NAME_ID, 0, true) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL,
"unable to delete existing comment object header message");
/* Add the new message */
if (udata->comment && *udata->comment) {
- if (NULL == (comment.s = HDstrdup(udata->comment)))
+ if (NULL == (comment.s = strdup(udata->comment)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't copy group comment");
if (H5O_msg_create(obj_loc->oloc, H5O_NAME_ID, 0, H5O_UPDATE_TIME, &comment) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to set comment object header message");
@@ -953,8 +953,8 @@ H5G__loc_get_comment_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_
}
else {
if (udata->comment && udata->bufsize)
- HDstrncpy(udata->comment, comment.s, udata->bufsize);
- udata->comment_size = HDstrlen(comment.s);
+ strncpy(udata->comment, comment.s, udata->bufsize);
+ udata->comment_size = strlen(comment.s);
H5O_msg_reset(H5O_NAME_ID, &comment);
}
diff --git a/src/H5Gname.c b/src/H5Gname.c
index 2d7d855136f..1341a2cb8c2 100644
--- a/src/H5Gname.c
+++ b/src/H5Gname.c
@@ -116,7 +116,7 @@ H5G__component(const char *name, size_t *size_p)
while ('/' == *name)
name++;
if (size_p)
- *size_p = HDstrcspn(name, "/");
+ *size_p = strcspn(name, "/");
FUNC_LEAVE_NOAPI(name)
} /* end H5G__component() */
@@ -186,7 +186,7 @@ H5G_normalize(const char *name)
*
* Purpose: Determine if one path is a valid prefix of another path
*
- * Return: TRUE for valid prefix, FALSE for not a valid prefix, FAIL
+ * Return: true for valid prefix, false for not a valid prefix, FAIL
* on error
*
*
@@ -198,7 +198,7 @@ H5G__common_path(const H5RS_str_t *fullpath_r, const H5RS_str_t *prefix_r)
const char *fullpath; /* Pointer to actual fullpath string */
const char *prefix; /* Pointer to actual prefix string */
size_t nchars1, nchars2; /* Number of characters in components */
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -217,7 +217,7 @@ H5G__common_path(const H5RS_str_t *fullpath_r, const H5RS_str_t *prefix_r)
/* Check that the components we found are the same length */
if (nchars1 == nchars2) {
/* Check that the two components are equal */
- if (HDstrncmp(fullpath, prefix, nchars1) == 0) {
+ if (strncmp(fullpath, prefix, nchars1) == 0) {
/* Advance the pointers in the names */
fullpath += nchars1;
prefix += nchars2;
@@ -229,15 +229,15 @@ H5G__common_path(const H5RS_str_t *fullpath_r, const H5RS_str_t *prefix_r)
assert(prefix);
} /* end if */
else
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
} /* end if */
else
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
} /* end while */
/* If we reached the end of the prefix path to check, it must be a valid prefix */
if (*prefix == '\0')
- ret_value = TRUE;
+ ret_value = true;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -266,7 +266,7 @@ H5G__build_fullpath(const char *prefix, const char *name)
/* Create full path */
if (NULL == (ret_value = H5RS_create(prefix)))
HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, NULL, "can't create ref-counted string");
- if (prefix[HDstrlen(prefix) - 1] != '/')
+ if (prefix[strlen(prefix) - 1] != '/')
H5RS_aputc(ret_value, '/'); /* Add separator, if the prefix doesn't end in one */
H5RS_acat(ret_value, name);
@@ -439,7 +439,7 @@ H5G_name_copy(H5G_name_t *dst, const H5G_name_t *src, H5_copy_depth_t depth)
*-------------------------------------------------------------------------
*/
herr_t
-H5G_get_name(const H5G_loc_t *loc, char *name /*out*/, size_t size, size_t *name_len, hbool_t *cached)
+H5G_get_name(const H5G_loc_t *loc, char *name /*out*/, size_t size, size_t *name_len, bool *cached)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -455,7 +455,7 @@ H5G_get_name(const H5G_loc_t *loc, char *name /*out*/, size_t size, size_t *name
len = H5RS_len(loc->path->user_path_r);
if (name) {
- HDstrncpy(name, H5RS_get_str(loc->path->user_path_r), MIN((len + 1), size));
+ strncpy(name, H5RS_get_str(loc->path->user_path_r), MIN((len + 1), size));
if (len >= size)
name[size - 1] = '\0';
} /* end if */
@@ -467,7 +467,7 @@ H5G_get_name(const H5G_loc_t *loc, char *name /*out*/, size_t size, size_t *name
/* Indicate that the name is cached, if requested */
/* (Currently only used for testing - QAK, 2010/07/26) */
if (cached)
- *cached = TRUE;
+ *cached = true;
} /* end if */
else if (!loc->path->obj_hidden) {
/* Search for name of object */
@@ -477,7 +477,7 @@ H5G_get_name(const H5G_loc_t *loc, char *name /*out*/, size_t size, size_t *name
/* Indicate that the name is _not_ cached, if requested */
/* (Currently only used for testing - QAK, 2010/07/26) */
if (cached)
- *cached = FALSE;
+ *cached = false;
} /* end else */
done:
@@ -570,8 +570,8 @@ H5G__name_move_path(H5RS_str_t **path_r_ptr, const char *full_suffix, const char
assert(path);
/* Check if path needs to be updated */
- full_suffix_len = HDstrlen(full_suffix);
- path_len = HDstrlen(path);
+ full_suffix_len = strlen(full_suffix);
+ path_len = strlen(path);
if (full_suffix_len < path_len) {
const char *dst_suffix; /* Destination suffix that changes */
const char *src_suffix; /* Source suffix that changes */
@@ -603,7 +603,7 @@ H5G__name_move_path(H5RS_str_t **path_r_ptr, const char *full_suffix, const char
/* Compute path prefix before src suffix */
path_prefix2 = path;
- path_prefix2_len = path_prefix_len - HDstrlen(src_suffix);
+ path_prefix2_len = path_prefix_len - strlen(src_suffix);
/* Allocate new ref-counted string */
if (NULL == (rs = H5RS_create(NULL)))
@@ -643,8 +643,8 @@ H5G__name_replace_cb(void *obj_ptr, hid_t obj_id, void *key)
H5O_loc_t *oloc; /* Object location for object that the ID refers to */
H5G_name_t *obj_path; /* Pointer to group hier. path for obj */
H5F_t *top_obj_file; /* Top file in object's mounted file hier. */
- hbool_t obj_in_child = FALSE; /* Flag to indicate that the object is in the child mount hier. */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool obj_in_child = false; /* Flag to indicate that the object is in the child mount hier. */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -703,14 +703,14 @@ H5G__name_replace_cb(void *obj_ptr, hid_t obj_id, void *key)
if (H5F_PARENT(oloc->file)) {
/* Check if object is in child file (for mount & unmount operations) */
if (names->dst_file && H5F_SAME_SHARED(oloc->file, names->dst_file))
- obj_in_child = TRUE;
+ obj_in_child = true;
/* Find the "top" file in the chain of mounted files */
top_obj_file = H5F_PARENT(oloc->file);
while (H5F_PARENT(top_obj_file) != NULL) {
/* Check if object is in child mount hier. (for mount & unmount operations) */
if (names->dst_file && H5F_SAME_SHARED(top_obj_file, names->dst_file))
- obj_in_child = TRUE;
+ obj_in_child = true;
top_obj_file = H5F_PARENT(top_obj_file);
} /* end while */
@@ -720,7 +720,7 @@ H5G__name_replace_cb(void *obj_ptr, hid_t obj_id, void *key)
/* Check if object is in top of child mount hier. (for mount & unmount operations) */
if (names->dst_file && H5F_SAME_SHARED(top_obj_file, names->dst_file))
- obj_in_child = TRUE;
+ obj_in_child = true;
/* Check if the object is in same file mount hier. */
if (!H5F_SAME_SHARED(top_obj_file, names->src_file))
@@ -781,7 +781,7 @@ H5G__name_replace_cb(void *obj_ptr, hid_t obj_id, void *key)
src_path = H5RS_get_str(names->src_full_path_r);
/* Construct full path suffix */
- full_suffix = full_path + HDstrlen(src_path);
+ full_suffix = full_path + strlen(src_path);
/* Create new full path suffix */
if (NULL == (rs = H5RS_create(full_suffix)))
@@ -848,7 +848,7 @@ H5G__name_replace_cb(void *obj_ptr, hid_t obj_id, void *key)
assert(*dst_path == '/');
/* Get pointer to "full suffix" */
- full_suffix = full_path + HDstrlen(src_path);
+ full_suffix = full_path + strlen(src_path);
/* Update the user path, if one exists */
if (obj_path->user_path_r)
@@ -903,9 +903,9 @@ H5G_name_replace(const H5O_link_t *lnk, H5G_names_op_t op, H5F_t *src_file, H5RS
/* Check if the object we are manipulating has a path */
if (src_full_path_r) {
- hbool_t search_group = FALSE; /* Flag to indicate that groups are to be searched */
- hbool_t search_dataset = FALSE; /* Flag to indicate that datasets are to be searched */
- hbool_t search_datatype = FALSE; /* Flag to indicate that datatypes are to be searched */
+ bool search_group = false; /* Flag to indicate that groups are to be searched */
+ bool search_dataset = false; /* Flag to indicate that datasets are to be searched */
+ bool search_datatype = false; /* Flag to indicate that datatypes are to be searched */
/* Check for particular link to operate on */
if (lnk) {
@@ -927,17 +927,17 @@ H5G_name_replace(const H5O_link_t *lnk, H5G_names_op_t op, H5F_t *src_file, H5RS
switch (obj_type) {
case H5O_TYPE_GROUP:
/* Search and replace names through group IDs */
- search_group = TRUE;
+ search_group = true;
break;
case H5O_TYPE_DATASET:
/* Search and replace names through dataset IDs */
- search_dataset = TRUE;
+ search_dataset = true;
break;
case H5O_TYPE_NAMED_DATATYPE:
/* Search and replace names through datatype IDs */
- search_datatype = TRUE;
+ search_datatype = true;
break;
case H5O_TYPE_MAP:
@@ -955,7 +955,7 @@ H5G_name_replace(const H5O_link_t *lnk, H5G_names_op_t op, H5F_t *src_file, H5RS
case H5L_TYPE_SOFT:
/* Symbolic links might resolve to any object, so we need to search all IDs */
- search_group = search_dataset = search_datatype = TRUE;
+ search_group = search_dataset = search_datatype = true;
break;
case H5L_TYPE_ERROR:
@@ -975,7 +975,7 @@ H5G_name_replace(const H5O_link_t *lnk, H5G_names_op_t op, H5F_t *src_file, H5RS
} /* end if */
else {
/* We pass NULL as link pointer when we need to search all IDs */
- search_group = search_dataset = search_datatype = TRUE;
+ search_group = search_dataset = search_datatype = true;
}
/* Check if we need to operate on the objects affected */
@@ -995,17 +995,17 @@ H5G_name_replace(const H5O_link_t *lnk, H5G_names_op_t op, H5F_t *src_file, H5RS
/* Search through group IDs */
if (search_group)
- if (H5I_iterate(H5I_GROUP, H5G__name_replace_cb, &names, FALSE) < 0)
+ if (H5I_iterate(H5I_GROUP, H5G__name_replace_cb, &names, false) < 0)
HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over groups");
/* Search through dataset IDs */
if (search_dataset)
- if (H5I_iterate(H5I_DATASET, H5G__name_replace_cb, &names, FALSE) < 0)
+ if (H5I_iterate(H5I_DATASET, H5G__name_replace_cb, &names, false) < 0)
HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over datasets");
/* Search through datatype IDs */
if (search_datatype)
- if (H5I_iterate(H5I_DATATYPE, H5G__name_replace_cb, &names, FALSE) < 0)
+ if (H5I_iterate(H5I_DATATYPE, H5G__name_replace_cb, &names, false) < 0)
HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over datatypes");
} /* end if */
} /* end if */
@@ -1032,7 +1032,7 @@ H5G__get_name_by_addr_cb(hid_t gid, const char *path, const H5L_info2_t *linfo,
H5G_loc_t obj_loc; /* Location of object */
H5G_name_t obj_path; /* Object's group hier. path */
H5O_loc_t obj_oloc; /* Object's object location */
- hbool_t obj_found = FALSE; /* Object at 'path' found */
+ bool obj_found = false; /* Object at 'path' found */
herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1066,7 +1066,7 @@ H5G__get_name_by_addr_cb(hid_t gid, const char *path, const H5L_info2_t *linfo,
/* Find the object */
if (H5G_loc_find(&grp_loc, path, &obj_loc /*out*/) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, H5_ITER_ERROR, "object not found");
- obj_found = TRUE;
+ obj_found = true;
/* Check for object in same file (handles mounted files) */
/* (re-verify address, in case we traversed a file mount) */
@@ -1106,7 +1106,7 @@ H5G_get_name_by_addr(H5F_t *f, const H5O_loc_t *loc, char *name, size_t size, si
H5G_gnba_iter_t udata; /* User data for iteration */
size_t len; /* Length of path name */
H5G_loc_t root_loc; /* Root group's location */
- hbool_t found_obj = FALSE; /* If we found the object */
+ bool found_obj = false; /* If we found the object */
herr_t status; /* Status from iteration */
herr_t ret_value = SUCCEED; /* Return value */
@@ -1123,7 +1123,7 @@ H5G_get_name_by_addr(H5F_t *f, const H5O_loc_t *loc, char *name, size_t size, si
if (root_loc.oloc->addr == loc->addr && root_loc.oloc->file == loc->file) {
if (NULL == (udata.path = H5MM_strdup("")))
HGOTO_ERROR(H5E_SYM, H5E_CANTALLOC, FAIL, "can't duplicate path string");
- found_obj = TRUE;
+ found_obj = true;
} /* end if */
else {
/* Set up user data for iterator */
@@ -1135,22 +1135,22 @@ H5G_get_name_by_addr(H5F_t *f, const H5O_loc_t *loc, char *name, size_t size, si
&udata)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "group traversal failed while looking for object name");
else if (status > 0)
- found_obj = TRUE;
+ found_obj = true;
} /* end else */
/* Check for finding the object */
if (found_obj) {
/* Set the length of the full path */
- len = HDstrlen(udata.path) + 1; /* Length of path + 1 (for "/") */
+ len = strlen(udata.path) + 1; /* Length of path + 1 (for "/") */
/* If there's a buffer provided, copy into it, up to the limit of its size */
if (name) {
/* Copy the initial path separator */
- HDstrncpy(name, "/", (size_t)2);
+ strncpy(name, "/", (size_t)2);
/* Append the rest of the path */
/* (less one character, for the initial path separator) */
- HDstrncat(name, udata.path, (size - 2));
+ strncat(name, udata.path, (size - 2));
if (len >= size)
name[size - 1] = '\0';
} /* end if */
diff --git a/src/H5Gnode.c b/src/H5Gnode.c
index bff0ae6dfb8..b4bd1214bf8 100644
--- a/src/H5Gnode.c
+++ b/src/H5Gnode.c
@@ -72,12 +72,12 @@ static herr_t H5G__node_create(H5F_t *f, H5B_ins_t op, void *_lt_key, void *_
haddr_t *addr_p /*out*/);
static int H5G__node_cmp2(void *_lt_key, void *_udata, void *_rt_key);
static int H5G__node_cmp3(void *_lt_key, void *_udata, void *_rt_key);
-static herr_t H5G__node_found(H5F_t *f, haddr_t addr, const void *_lt_key, hbool_t *found, void *_udata);
-static H5B_ins_t H5G__node_insert(H5F_t *f, haddr_t addr, void *_lt_key, hbool_t *lt_key_changed,
- void *_md_key, void *_udata, void *_rt_key, hbool_t *rt_key_changed,
+static herr_t H5G__node_found(H5F_t *f, haddr_t addr, const void *_lt_key, bool *found, void *_udata);
+static H5B_ins_t H5G__node_insert(H5F_t *f, haddr_t addr, void *_lt_key, bool *lt_key_changed, void *_md_key,
+ void *_udata, void *_rt_key, bool *rt_key_changed,
haddr_t *new_node_p /*out*/);
-static H5B_ins_t H5G__node_remove(H5F_t *f, haddr_t addr, void *lt_key, hbool_t *lt_key_changed, void *udata,
- void *rt_key, hbool_t *rt_key_changed);
+static H5B_ins_t H5G__node_remove(H5F_t *f, haddr_t addr, void *lt_key, bool *lt_key_changed, void *udata,
+ void *rt_key, bool *rt_key_changed);
static herr_t H5G__node_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key);
static herr_t H5G__node_encode_key(const H5B_shared_t *shared, uint8_t *raw, const void *_key);
static herr_t H5G__node_debug_key(FILE *stream, int indent, int fwidth, const void *key, const void *udata);
@@ -96,8 +96,8 @@ H5B_class_t H5B_SNODE[1] = {{
H5G__node_cmp3, /*cmp3 */
H5G__node_found, /*found */
H5G__node_insert, /*insert */
- TRUE, /*follow min branch? */
- TRUE, /*follow max branch? */
+ true, /*follow min branch? */
+ true, /*follow max branch? */
H5B_RIGHT, /*critical key */
H5G__node_remove, /*remove */
H5G__node_decode_key, /*decode */
@@ -246,7 +246,7 @@ H5G__node_free(H5G_node_t *sym)
assert(sym);
/* Verify that node is clean */
- assert(sym->cache_info.is_dirty == FALSE);
+ assert(sym->cache_info.is_dirty == false);
if (sym->entry)
sym->entry = H5FL_SEQ_FREE(H5G_entry_t, sym->entry);
@@ -360,7 +360,7 @@ H5G__node_cmp2(void *_lt_key, void *_udata, void *_rt_key)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get key name");
/* Set return value */
- ret_value = HDstrcmp(s1, s2);
+ ret_value = strcmp(s1, s2);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -406,13 +406,13 @@ H5G__node_cmp3(void *_lt_key, void *_udata, void *_rt_key)
/* left side */
if ((s = (const char *)H5HL_offset_into(udata->heap, lt_key->offset)) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get key name");
- if (HDstrcmp(udata->name, s) <= 0)
+ if (strcmp(udata->name, s) <= 0)
ret_value = (-1);
else {
/* right side */
if ((s = (const char *)H5HL_offset_into(udata->heap, rt_key->offset)) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get key name");
- if (HDstrcmp(udata->name, s) > 0)
+ if (strcmp(udata->name, s) > 0)
ret_value = 1;
} /* end else */
@@ -435,14 +435,14 @@ H5G__node_cmp3(void *_lt_key, void *_udata, void *_rt_key)
* entry field. Otherwise the entry is copied from the
* UDATA entry field to the symbol table.
*
- * Return: Success: Non-negative (TRUE/FALSE) if found and data
+ * Return: Success: Non-negative (true/false) if found and data
* returned through the UDATA pointer, if *FOUND is true.
* Failure: Negative if not found.
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5G__node_found(H5F_t *f, haddr_t addr, const void H5_ATTR_UNUSED *_lt_key, hbool_t *found, void *_udata)
+H5G__node_found(H5F_t *f, haddr_t addr, const void H5_ATTR_UNUSED *_lt_key, bool *found, void *_udata)
{
H5G_bt_lkp_t *udata = (H5G_bt_lkp_t *)_udata;
H5G_node_t *sn = NULL;
@@ -476,7 +476,7 @@ H5G__node_found(H5F_t *f, haddr_t addr, const void H5_ATTR_UNUSED *_lt_key, hboo
if ((s = (const char *)H5HL_offset_into(udata->common.heap, sn->entry[idx].name_off)) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get symbol table name");
- cmp = HDstrcmp(udata->common.name, s);
+ cmp = strcmp(udata->common.name, s);
if (cmp < 0)
rt = idx;
@@ -485,10 +485,10 @@ H5G__node_found(H5F_t *f, haddr_t addr, const void H5_ATTR_UNUSED *_lt_key, hboo
} /* end while */
if (cmp)
- *found = FALSE;
+ *found = false;
else {
/* Set the 'found it' flag */
- *found = TRUE;
+ *found = true;
/* Call user's callback operator */
if ((udata->op)(&sn->entry[idx], udata->op_data) < 0)
@@ -531,8 +531,8 @@ H5G__node_found(H5F_t *f, haddr_t addr, const void H5_ATTR_UNUSED *_lt_key, hboo
*-------------------------------------------------------------------------
*/
static H5B_ins_t
-H5G__node_insert(H5F_t *f, haddr_t addr, void H5_ATTR_UNUSED *_lt_key, hbool_t H5_ATTR_UNUSED *lt_key_changed,
- void *_md_key, void *_udata, void *_rt_key, hbool_t *rt_key_changed, haddr_t *new_node_p)
+H5G__node_insert(H5F_t *f, haddr_t addr, void H5_ATTR_UNUSED *_lt_key, bool H5_ATTR_UNUSED *lt_key_changed,
+ void *_md_key, void *_udata, void *_rt_key, bool *rt_key_changed, haddr_t *new_node_p)
{
H5G_node_key_t *md_key = (H5G_node_key_t *)_md_key;
H5G_node_key_t *rt_key = (H5G_node_key_t *)_rt_key;
@@ -574,7 +574,7 @@ H5G__node_insert(H5F_t *f, haddr_t addr, void H5_ATTR_UNUSED *_lt_key, hbool_t H
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5B_INS_ERROR, "unable to get symbol table name");
/* Check if symbol is already present */
- if (0 == (cmp = HDstrcmp(udata->common.name, s)))
+ if (0 == (cmp = strcmp(udata->common.name, s)))
HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, H5B_INS_ERROR, "symbol is already present in symbol table");
if (cmp < 0)
@@ -628,7 +628,7 @@ H5G__node_insert(H5F_t *f, haddr_t addr, void H5_ATTR_UNUSED *_lt_key, hbool_t H
insert_into = snrt;
if (idx == (int)H5F_SYM_LEAF_K(f)) {
rt_key->offset = ent.name_off;
- *rt_key_changed = TRUE;
+ *rt_key_changed = true;
} /* end if */
} /* end else */
} /* end if */
@@ -639,7 +639,7 @@ H5G__node_insert(H5F_t *f, haddr_t addr, void H5_ATTR_UNUSED *_lt_key, hbool_t H
insert_into = sn;
if (idx == (int)sn->nsyms) {
rt_key->offset = ent.name_off;
- *rt_key_changed = TRUE;
+ *rt_key_changed = true;
} /* end if */
} /* end else */
@@ -690,8 +690,8 @@ H5G__node_insert(H5F_t *f, haddr_t addr, void H5_ATTR_UNUSED *_lt_key, hbool_t H
*/
static H5B_ins_t
H5G__node_remove(H5F_t *f, haddr_t addr, void H5_ATTR_NDEBUG_UNUSED *_lt_key /*in,out*/,
- hbool_t H5_ATTR_UNUSED *lt_key_changed /*out*/, void *_udata /*in,out*/,
- void *_rt_key /*in,out*/, hbool_t *rt_key_changed /*out*/)
+ bool H5_ATTR_UNUSED *lt_key_changed /*out*/, void *_udata /*in,out*/,
+ void *_rt_key /*in,out*/, bool *rt_key_changed /*out*/)
{
H5G_node_key_t *rt_key = (H5G_node_key_t *)_rt_key;
H5G_bt_rm_t *udata = (H5G_bt_rm_t *)_udata;
@@ -727,7 +727,7 @@ H5G__node_remove(H5F_t *f, haddr_t addr, void H5_ATTR_NDEBUG_UNUSED *_lt_key /*i
idx = (lt + rt) / 2;
if ((s = (const char *)H5HL_offset_into(udata->common.heap, sn->entry[idx].name_off)) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5B_INS_ERROR, "unable to get symbol table name");
- cmp = HDstrcmp(udata->common.name, s);
+ cmp = strcmp(udata->common.name, s);
if (cmp < 0)
rt = idx;
else
@@ -740,10 +740,10 @@ H5G__node_remove(H5F_t *f, haddr_t addr, void H5_ATTR_NDEBUG_UNUSED *_lt_key /*i
/* Get a pointer to the name of the link */
if (NULL == (lnk.name = (char *)H5HL_offset_into(udata->common.heap, sn->entry[idx].name_off)))
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5B_INS_ERROR, "unable to get link name");
- link_name_len = HDstrlen(lnk.name) + 1;
+ link_name_len = strlen(lnk.name) + 1;
/* Set up rest of link structure */
- lnk.corder_valid = FALSE;
+ lnk.corder_valid = false;
lnk.corder = 0;
lnk.cset = H5T_CSET_ASCII;
if (sn->entry[idx].type == H5G_CACHED_SLINK) {
@@ -778,7 +778,7 @@ H5G__node_remove(H5F_t *f, haddr_t addr, void H5_ATTR_NDEBUG_UNUSED *_lt_key /*i
if (lnk.u.soft.name) {
size_t soft_link_len; /* Length of string in local heap */
- soft_link_len = HDstrlen(lnk.u.soft.name) + 1;
+ soft_link_len = strlen(lnk.u.soft.name) + 1;
if (H5HL_remove(f, udata->common.heap, sn->entry[idx].cache.slink.lval_offset,
soft_link_len) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, H5B_INS_ERROR,
@@ -822,7 +822,7 @@ H5G__node_remove(H5F_t *f, haddr_t addr, void H5_ATTR_NDEBUG_UNUSED *_lt_key /*i
sn->nsyms -= 1;
sn_flags |= H5AC__DIRTIED_FLAG;
rt_key->offset = sn->entry[sn->nsyms - 1].name_off;
- *rt_key_changed = TRUE;
+ *rt_key_changed = true;
ret_value = H5B_INS_NOOP;
}
else {
@@ -1206,7 +1206,7 @@ H5G__node_copy(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr, const
tmp_src_oloc.addr = src_ent->header;
/* Copy the shared object from source to destination */
- if (H5O_copy_header_map(&tmp_src_oloc, &new_dst_oloc, cpy_info, TRUE, &obj_type,
+ if (H5O_copy_header_map(&tmp_src_oloc, &new_dst_oloc, cpy_info, true, &obj_type,
(void **)&cpy_udata) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, H5_ITER_ERROR, "unable to copy object");
@@ -1239,7 +1239,7 @@ H5G__node_copy(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr, const
/* Set up common link data */
lnk.cset = H5F_DEFAULT_CSET; /* XXX: Allow user to set this */
lnk.corder = 0; /* Creation order is not tracked for old-style links */
- lnk.corder_valid = FALSE; /* Creation order is not valid */
+ lnk.corder_valid = false; /* Creation order is not valid */
/* lnk.name = name; */ /* This will be set in callback */
/* Determine name of source object */
diff --git a/src/H5Gobj.c b/src/H5Gobj.c
index 6878e51d47b..e701922ab4e 100644
--- a/src/H5Gobj.c
+++ b/src/H5Gobj.c
@@ -155,10 +155,10 @@ herr_t
H5G__obj_create_real(H5F_t *f, const H5O_ginfo_t *ginfo, const H5O_linfo_t *linfo, const H5O_pline_t *pline,
H5G_obj_create_t *gcrt_info, H5O_loc_t *oloc /*out*/)
{
- size_t hdr_size; /* Size of object header to request */
- hbool_t use_at_least_v18; /* Flag indicating the new group format should be used */
- hid_t gcpl_id = gcrt_info->gcpl_id; /* Group creation property list ID */
- herr_t ret_value = SUCCEED; /* Return value */
+ size_t hdr_size; /* Size of object header to request */
+ bool use_at_least_v18; /* Flag indicating the new group format should be used */
+ hid_t gcpl_id = gcrt_info->gcpl_id; /* Group creation property list ID */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -178,9 +178,9 @@ H5G__obj_create_real(H5F_t *f, const H5O_ginfo_t *ginfo, const H5O_linfo_t *linf
/* Check for using the latest version of the group format which is introduced in v18 */
/* (add more checks for creating "new format" groups when needed) */
if ((H5F_LOW_BOUND(f) >= H5F_LIBVER_V18) || linfo->track_corder || (pline && pline->nused))
- use_at_least_v18 = TRUE;
+ use_at_least_v18 = true;
else
- use_at_least_v18 = FALSE;
+ use_at_least_v18 = false;
/* Make certain that the creation order is being tracked if an index is
* going to be built on it.
@@ -271,7 +271,7 @@ H5G__obj_create_real(H5F_t *f, const H5O_ginfo_t *ginfo, const H5O_linfo_t *linf
* Purpose: Retrieves the "link info" message for an object. Also
* sets the number of links correctly, if it isn't set up yet.
*
- * Return: Success: TRUE/FALSE whether message was found & retrieved
+ * Return: Success: true/false whether message was found & retrieved
* Failure: FAIL if error occurred
*
*-------------------------------------------------------------------------
@@ -380,7 +380,7 @@ H5G__obj_stab_to_new_cb(const H5O_link_t *lnk, void *_udata)
/* Insert link into group */
H5_GCC_CLANG_DIAG_OFF("cast-qual")
- if (H5G_obj_insert(udata->grp_oloc, lnk->name, (H5O_link_t *)lnk, FALSE, H5O_TYPE_UNKNOWN, NULL) < 0)
+ if (H5G_obj_insert(udata->grp_oloc, lnk->name, (H5O_link_t *)lnk, false, H5O_TYPE_UNKNOWN, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, H5_ITER_ERROR, "can't insert link into group");
H5_GCC_CLANG_DIAG_ON("cast-qual")
@@ -402,15 +402,15 @@ H5G__obj_stab_to_new_cb(const H5O_link_t *lnk, void *_udata)
*-------------------------------------------------------------------------
*/
herr_t
-H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk, hbool_t adj_link,
+H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk, bool adj_link,
H5O_type_t obj_type, const void *crt_info)
{
H5O_pline_t tmp_pline; /* Pipeline message */
H5O_pline_t *pline = NULL; /* Pointer to pipeline message */
H5O_linfo_t linfo; /* Link info message */
htri_t linfo_exists; /* Whether the link info message exists */
- hbool_t use_old_format; /* Whether to use 'old format' (symbol table) for insertions or not */
- hbool_t use_new_dense = FALSE; /* Whether to use "dense" form of 'new format' group */
+ bool use_old_format; /* Whether to use 'old format' (symbol table) for insertions or not */
+ bool use_new_dense = false; /* Whether to use "dense" form of 'new format' group */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_TAG(grp_oloc->addr, FAIL)
@@ -429,20 +429,20 @@ H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk,
size_t link_msg_size; /* Size of new link message in the file */
/* Using the new format for groups */
- use_old_format = FALSE;
+ use_old_format = false;
/* Check for tracking creation order on this group's links */
if (linfo.track_corder) {
/* Set the creation order for the new link & indicate that it's valid */
obj_lnk->corder = linfo.max_corder;
- obj_lnk->corder_valid = TRUE;
+ obj_lnk->corder_valid = true;
/* Increment the max. creation order used in the group */
linfo.max_corder++;
} /* end if */
/* Get the link's message size */
- if ((link_msg_size = H5O_msg_raw_size(grp_oloc->file, H5O_LINK_ID, FALSE, obj_lnk)) == 0)
+ if ((link_msg_size = H5O_msg_raw_size(grp_oloc->file, H5O_LINK_ID, false, obj_lnk)) == 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGETSIZE, FAIL, "can't get link size");
/* Get the group info */
@@ -454,9 +454,9 @@ H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk,
* header message, convert to using dense link storage instead of link messages)
*/
if (H5_addr_defined(linfo.fheap_addr))
- use_new_dense = TRUE;
+ use_new_dense = true;
else if (linfo.nlinks < ginfo.max_compact && link_msg_size < H5O_MESG_MAX_SIZE)
- use_new_dense = FALSE;
+ use_new_dense = false;
else {
htri_t pline_exists; /* Whether the pipeline message exists */
H5G_obj_oh_it_ud1_t udata; /* User data for iteration */
@@ -487,10 +487,10 @@ H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk,
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "error iterating over links");
/* Remove all the 'link' messages */
- if (H5O_msg_remove(grp_oloc, H5O_LINK_ID, H5O_ALL, FALSE) < 0)
+ if (H5O_msg_remove(grp_oloc, H5O_LINK_ID, H5O_ALL, false) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete link messages");
- use_new_dense = TRUE;
+ use_new_dense = true;
} /* end else */
} /* end if */
else {
@@ -520,7 +520,7 @@ H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk,
HGOTO_ERROR(H5E_SYM, H5E_CANTNEXT, FAIL, "error iterating over old format links");
/* Remove the symbol table message from the group */
- if (H5O_msg_remove(grp_oloc, H5O_STAB_ID, 0, FALSE) < 0)
+ if (H5O_msg_remove(grp_oloc, H5O_STAB_ID, 0, false) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete old format link storage");
/* Recursively call this routine to insert the new link, since the
@@ -534,7 +534,7 @@ H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk,
HGOTO_DONE(SUCCEED);
} /* end if */
else
- use_old_format = TRUE;
+ use_old_format = true;
} /* end if */
/* Insert into symbol table or "dense" storage */
@@ -820,7 +820,7 @@ H5G__obj_remove_update_linfo(const H5O_loc_t *oloc, H5O_linfo_t *linfo)
/* Check if there's no more links */
if (linfo->nlinks == 0) {
/* Delete the dense storage */
- if (H5G__dense_delete(oloc->file, linfo, FALSE) < 0)
+ if (H5G__dense_delete(oloc->file, linfo, false) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete dense link storage");
} /* end if */
/* Check for switching back to compact storage */
@@ -835,7 +835,7 @@ H5G__obj_remove_update_linfo(const H5O_loc_t *oloc, H5O_linfo_t *linfo)
if (linfo->nlinks < ginfo.min_dense) {
struct H5O_t *oh = NULL; /* Pointer to group's object header */
H5G_link_table_t ltable; /* Table of links */
- hbool_t can_convert = TRUE; /* Whether converting to link messages is possible */
+ bool can_convert = true; /* Whether converting to link messages is possible */
size_t u; /* Local index */
/* Build the table of links for this group */
@@ -853,7 +853,7 @@ H5G__obj_remove_update_linfo(const H5O_loc_t *oloc, H5O_linfo_t *linfo)
for (u = 0; u < linfo->nlinks; u++)
if (H5O_msg_size_oh(oloc->file, oh, H5O_LINK_ID, &(ltable.lnks[u]), (size_t)0) >=
H5O_MESG_MAX_SIZE) {
- can_convert = FALSE;
+ can_convert = false;
break;
} /* end if */
@@ -872,7 +872,7 @@ H5G__obj_remove_update_linfo(const H5O_loc_t *oloc, H5O_linfo_t *linfo)
} /* end if */
/* Remove the dense storage */
- if (H5G__dense_delete(oloc->file, linfo, FALSE) < 0)
+ if (H5G__dense_delete(oloc->file, linfo, false) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete dense link storage");
} /* end if */
@@ -910,7 +910,7 @@ H5G_obj_remove(const H5O_loc_t *oloc, H5RS_str_t *grp_full_path_r, const char *n
{
H5O_linfo_t linfo; /* Link info message */
htri_t linfo_exists; /* Whether the link info message exists */
- hbool_t use_old_format; /* Whether to use 'old format' (symbol table) for deletion or not */
+ bool use_old_format; /* Whether to use 'old format' (symbol table) for deletion or not */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_TAG(oloc->addr, FAIL)
@@ -924,7 +924,7 @@ H5G_obj_remove(const H5O_loc_t *oloc, H5RS_str_t *grp_full_path_r, const char *n
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message");
if (linfo_exists) {
/* Using the new format for groups */
- use_old_format = FALSE;
+ use_old_format = false;
/* Check for dense or compact storage */
if (H5_addr_defined(linfo.fheap_addr)) {
@@ -939,7 +939,7 @@ H5G_obj_remove(const H5O_loc_t *oloc, H5RS_str_t *grp_full_path_r, const char *n
} /* end if */
else {
/* Using the old format for groups */
- use_old_format = TRUE;
+ use_old_format = true;
/* Remove object from the symbol table */
if (H5G__stab_remove(oloc, grp_full_path_r, name) < 0)
@@ -971,7 +971,7 @@ H5G_obj_remove_by_idx(const H5O_loc_t *grp_oloc, H5RS_str_t *grp_full_path_r, H5
{
H5O_linfo_t linfo; /* Link info message */
htri_t linfo_exists; /* Whether the link info message exists */
- hbool_t use_old_format; /* Whether to use 'old format' (symbol table) for deletion or not */
+ bool use_old_format; /* Whether to use 'old format' (symbol table) for deletion or not */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -991,7 +991,7 @@ H5G_obj_remove_by_idx(const H5O_loc_t *grp_oloc, H5RS_str_t *grp_full_path_r, H5
} /* end if */
/* Using the new format for groups */
- use_old_format = FALSE;
+ use_old_format = false;
/* Check for dense or compact storage */
if (H5_addr_defined(linfo.fheap_addr)) {
@@ -1011,7 +1011,7 @@ H5G_obj_remove_by_idx(const H5O_loc_t *grp_oloc, H5RS_str_t *grp_full_path_r, H5
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "no creation order index to query");
/* Using the old format for groups */
- use_old_format = TRUE;
+ use_old_format = true;
/* Remove object from the symbol table */
if (H5G__stab_remove_by_idx(grp_oloc, grp_full_path_r, order, n) < 0)
@@ -1037,7 +1037,7 @@ H5G_obj_remove_by_idx(const H5O_loc_t *grp_oloc, H5RS_str_t *grp_full_path_r, H5
*-------------------------------------------------------------------------
*/
herr_t
-H5G__obj_lookup(const H5O_loc_t *grp_oloc, const char *name, hbool_t *found, H5O_link_t *lnk)
+H5G__obj_lookup(const H5O_loc_t *grp_oloc, const char *name, bool *found, H5O_link_t *lnk)
{
H5O_linfo_t linfo; /* Link info message */
htri_t linfo_exists; /* Whether the link info message exists */
diff --git a/src/H5Goh.c b/src/H5Goh.c
index 60836175e3d..b72406f61b2 100644
--- a/src/H5Goh.c
+++ b/src/H5Goh.c
@@ -140,8 +140,8 @@ H5O__group_free_copy_file_udata(void *_udata)
* Purpose: Determines if an object has the requisite messages for being
* a group.
*
- * Return: Success: TRUE if the required group messages are
- * present; FALSE otherwise.
+ * Return: Success: true if the required group messages are
+ * present; false otherwise.
*
* Failure: FAIL if the existence of certain messages
* cannot be determined.
diff --git a/src/H5Gpkg.h b/src/H5Gpkg.h
index fdc05ec6ccb..77a8e4c4fff 100644
--- a/src/H5Gpkg.h
+++ b/src/H5Gpkg.h
@@ -118,8 +118,8 @@ typedef struct H5G_node_t {
* Shared information for all open group objects
*/
struct H5G_shared_t {
- int fo_count; /* open file object count */
- hbool_t mounted; /* Group is mount point */
+ int fo_count; /* open file object count */
+ bool mounted; /* Group is mount point */
};
/*
@@ -331,7 +331,7 @@ H5_DLL herr_t H5G__get_info_by_idx(const H5G_loc_t *loc, const char *group_name,
* Group hierarchy traversal routines
*/
H5_DLL herr_t H5G__traverse_special(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, unsigned target,
- hbool_t last_comp, H5G_loc_t *obj_loc, hbool_t *obj_exists);
+ bool last_comp, H5G_loc_t *obj_loc, bool *obj_exists);
/*
* Utility functions
@@ -359,7 +359,7 @@ H5_DLL herr_t H5G__stab_get_name_by_idx(const H5O_loc_t *oloc, H5_iter_order_t o
H5_DLL herr_t H5G__stab_remove(const H5O_loc_t *oloc, H5RS_str_t *grp_full_path_r, const char *name);
H5_DLL herr_t H5G__stab_remove_by_idx(const H5O_loc_t *oloc, H5RS_str_t *grp_full_path_r,
H5_iter_order_t order, hsize_t n);
-H5_DLL herr_t H5G__stab_lookup(const H5O_loc_t *grp_oloc, const char *name, hbool_t *found, H5O_link_t *lnk);
+H5_DLL herr_t H5G__stab_lookup(const H5O_loc_t *grp_oloc, const char *name, bool *found, H5O_link_t *lnk);
H5_DLL herr_t H5G__stab_lookup_by_idx(const H5O_loc_t *grp_oloc, H5_iter_order_t order, hsize_t n,
H5O_link_t *lnk);
#ifndef H5_STRICT_FORMAT_CHECKS
@@ -412,8 +412,7 @@ H5_DLL herr_t H5G__compact_remove_by_idx(const H5O_loc_t *oloc, const H5O_linfo_
H5_DLL herr_t H5G__compact_iterate(const H5O_loc_t *oloc, const H5O_linfo_t *linfo, H5_index_t idx_type,
H5_iter_order_t order, hsize_t skip, hsize_t *last_lnk,
H5G_lib_iterate_t op, void *op_data);
-H5_DLL herr_t H5G__compact_lookup(const H5O_loc_t *grp_oloc, const char *name, hbool_t *found,
- H5O_link_t *lnk);
+H5_DLL herr_t H5G__compact_lookup(const H5O_loc_t *grp_oloc, const char *name, bool *found, H5O_link_t *lnk);
H5_DLL herr_t H5G__compact_lookup_by_idx(const H5O_loc_t *oloc, const H5O_linfo_t *linfo, H5_index_t idx_type,
H5_iter_order_t order, hsize_t n, H5O_link_t *lnk);
@@ -422,7 +421,7 @@ H5_DLL herr_t H5G__dense_build_table(H5F_t *f, const H5O_linfo_t *linfo, H5_inde
H5_iter_order_t order, H5G_link_table_t *ltable);
H5_DLL herr_t H5G__dense_create(H5F_t *f, H5O_linfo_t *linfo, const H5O_pline_t *pline);
H5_DLL herr_t H5G__dense_insert(H5F_t *f, const H5O_linfo_t *linfo, const H5O_link_t *lnk);
-H5_DLL herr_t H5G__dense_lookup(H5F_t *f, const H5O_linfo_t *linfo, const char *name, hbool_t *found,
+H5_DLL herr_t H5G__dense_lookup(H5F_t *f, const H5O_linfo_t *linfo, const char *name, bool *found,
H5O_link_t *lnk);
H5_DLL herr_t H5G__dense_lookup_by_idx(H5F_t *f, const H5O_linfo_t *linfo, H5_index_t idx_type,
H5_iter_order_t order, hsize_t n, H5O_link_t *lnk);
@@ -436,7 +435,7 @@ H5_DLL herr_t H5G__dense_remove(H5F_t *f, const H5O_linfo_t *linfo, H5RS_str_t *
const char *name);
H5_DLL herr_t H5G__dense_remove_by_idx(H5F_t *f, const H5O_linfo_t *linfo, H5RS_str_t *grp_full_path_r,
H5_index_t idx_type, H5_iter_order_t order, hsize_t n);
-H5_DLL herr_t H5G__dense_delete(H5F_t *f, H5O_linfo_t *linfo, hbool_t adj_link);
+H5_DLL herr_t H5G__dense_delete(H5F_t *f, H5O_linfo_t *linfo, bool adj_link);
/* Functions that understand group objects */
H5_DLL herr_t H5G__obj_create(H5F_t *f, H5G_obj_create_t *gcrt_info, H5O_loc_t *oloc /*out*/);
@@ -447,9 +446,9 @@ H5_DLL htri_t H5G__obj_get_linfo(const H5O_loc_t *grp_oloc, H5O_linfo_t *linfo);
H5_DLL herr_t H5G__obj_iterate(const H5O_loc_t *grp_oloc, H5_index_t idx_type, H5_iter_order_t order,
hsize_t skip, hsize_t *last_lnk, H5G_lib_iterate_t op, void *op_data);
H5_DLL herr_t H5G__obj_info(const H5O_loc_t *oloc, H5G_info_t *grp_info);
-H5_DLL herr_t H5G__obj_lookup(const H5O_loc_t *grp_oloc, const char *name, hbool_t *found, H5O_link_t *lnk);
+H5_DLL herr_t H5G__obj_lookup(const H5O_loc_t *grp_oloc, const char *name, bool *found, H5O_link_t *lnk);
#ifndef H5_NO_DEPRECATED_SYMBOLS
-H5_DLL herr_t H5G__get_objinfo(const H5G_loc_t *loc, const char *name, hbool_t follow_link,
+H5_DLL herr_t H5G__get_objinfo(const H5G_loc_t *loc, const char *name, bool follow_link,
H5G_stat_t *statbuf /*out*/);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
diff --git a/src/H5Gprivate.h b/src/H5Gprivate.h
index d6b93352a8b..8f8da1a23bb 100644
--- a/src/H5Gprivate.h
+++ b/src/H5Gprivate.h
@@ -46,8 +46,8 @@
/* ========= Group Creation properties ============ */
/* Defaults for link info values */
-#define H5G_CRT_LINFO_TRACK_CORDER FALSE
-#define H5G_CRT_LINFO_INDEX_CORDER FALSE
+#define H5G_CRT_LINFO_TRACK_CORDER false
+#define H5G_CRT_LINFO_INDEX_CORDER false
#define H5G_CRT_LINFO_NLINKS 0
#define H5G_CRT_LINFO_MAX_CORDER 0
#define H5G_CRT_LINFO_LINK_FHEAP_ADDR HADDR_UNDEF
@@ -70,10 +70,10 @@
/* Defaults for group info values */
#define H5G_CRT_GINFO_LHEAP_SIZE_HINT 0
-#define H5G_CRT_GINFO_STORE_LINK_PHASE_CHANGE FALSE
+#define H5G_CRT_GINFO_STORE_LINK_PHASE_CHANGE false
#define H5G_CRT_GINFO_MAX_COMPACT 8
#define H5G_CRT_GINFO_MIN_DENSE 6
-#define H5G_CRT_GINFO_STORE_EST_ENTRY_INFO FALSE
+#define H5G_CRT_GINFO_STORE_EST_ENTRY_INFO false
#define H5G_CRT_GINFO_EST_NUM_ENTRIES 4
#define H5G_CRT_GINFO_EST_NAME_LEN 8
@@ -194,7 +194,7 @@ H5_DLL H5G_t *H5G_open(const H5G_loc_t *loc);
H5_DLL herr_t H5G_close(H5G_t *grp);
H5_DLL herr_t H5G_get_shared_count(H5G_t *grp);
H5_DLL herr_t H5G_mount(H5G_t *grp);
-H5_DLL hbool_t H5G_mounted(H5G_t *grp);
+H5_DLL bool H5G_mounted(H5G_t *grp);
H5_DLL herr_t H5G_unmount(H5G_t *grp);
#ifndef H5_NO_DEPRECATED_SYMBOLS
H5_DLL H5G_obj_t H5G_map_obj_type(H5O_type_t obj_type);
@@ -225,7 +225,7 @@ H5_DLL herr_t H5G_link_to_info(const struct H5O_loc_t *link_loc, const struct H5
* Functions that understand group objects
*/
H5_DLL herr_t H5G_obj_insert(const struct H5O_loc_t *grp_oloc, const char *name, struct H5O_link_t *obj_lnk,
- hbool_t adj_link, H5O_type_t obj_type, const void *crt_info);
+ bool adj_link, H5O_type_t obj_type, const void *crt_info);
H5_DLL herr_t H5G_obj_get_name_by_idx(const struct H5O_loc_t *oloc, H5_index_t idx_type,
H5_iter_order_t order, hsize_t n, char *name, size_t name_size,
size_t *name_len);
@@ -258,7 +258,7 @@ H5_DLL herr_t H5G_name_reset(H5G_name_t *name);
H5_DLL herr_t H5G_name_copy(H5G_name_t *dst, const H5G_name_t *src, H5_copy_depth_t depth);
H5_DLL herr_t H5G_name_free(H5G_name_t *name);
H5_DLL herr_t H5G_get_name(const H5G_loc_t *loc, char *name /*out*/, size_t size, size_t *name_len,
- hbool_t *cached);
+ bool *cached);
H5_DLL herr_t H5G_get_name_by_addr(H5F_t *f, const struct H5O_loc_t *loc, char *name, size_t size,
size_t *name_len);
H5_DLL H5RS_str_t *H5G_build_fullpath_refstr_str(H5RS_str_t *path_r, const char *name);
@@ -272,7 +272,7 @@ H5_DLL herr_t H5G_loc_copy(H5G_loc_t *dst, const H5G_loc_t *src, H5_copy_depth_t
H5_DLL herr_t H5G_loc_find(const H5G_loc_t *loc, const char *name, H5G_loc_t *obj_loc /*out*/);
H5_DLL herr_t H5G_loc_find_by_idx(const H5G_loc_t *loc, const char *group_name, H5_index_t idx_type,
H5_iter_order_t order, hsize_t n, H5G_loc_t *obj_loc /*out*/);
-H5_DLL herr_t H5G_loc_exists(const H5G_loc_t *loc, const char *name, hbool_t *exists);
+H5_DLL herr_t H5G_loc_exists(const H5G_loc_t *loc, const char *name, bool *exists);
H5_DLL herr_t H5G_loc_info(const H5G_loc_t *loc, const char *name, H5O_info2_t *oinfo /*out*/,
unsigned fields);
H5_DLL herr_t H5G_loc_native_info(const H5G_loc_t *loc, const char *name, H5O_native_info_t *oinfo /*out*/,
@@ -286,7 +286,7 @@ H5_DLL herr_t H5G_loc_free(H5G_loc_t *loc);
/*
* These functions operate on the root group
*/
-H5_DLL herr_t H5G_mkroot(H5F_t *f, hbool_t create_root);
+H5_DLL herr_t H5G_mkroot(H5F_t *f, bool create_root);
H5_DLL herr_t H5G_root_loc(H5F_t *f, H5G_loc_t *loc);
H5_DLL herr_t H5G_root_free(H5G_t *grp);
H5_DLL H5G_t *H5G_rootof(H5F_t *f);
diff --git a/src/H5Groot.c b/src/H5Groot.c
index 7f5b9564a2c..0686fa97ab7 100644
--- a/src/H5Groot.c
+++ b/src/H5Groot.c
@@ -122,13 +122,13 @@ H5G_rootof(H5F_t *f)
*-------------------------------------------------------------------------
*/
herr_t
-H5G_mkroot(H5F_t *f, hbool_t create_root)
+H5G_mkroot(H5F_t *f, bool create_root)
{
H5G_loc_t root_loc; /* Root location information */
H5G_obj_create_t gcrt_info; /* Root group object creation info */
htri_t stab_exists = -1; /* Whether the symbol table exists */
- hbool_t sblock_dirty = FALSE; /* Whether superblock was dirtied */
- hbool_t path_init = FALSE; /* Whether path was initialized */
+ bool sblock_dirty = false; /* Whether superblock was dirtied */
+ bool path_init = false; /* Whether path was initialized */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -182,7 +182,7 @@ H5G_mkroot(H5F_t *f, hbool_t create_root)
"unable to decrement refcount on root group's object header");
/* Mark superblock dirty, so root group info is flushed */
- sblock_dirty = TRUE;
+ sblock_dirty = true;
/* Create the root group symbol table entry */
assert(!f->shared->sblock->root_ent);
@@ -245,7 +245,7 @@ H5G_mkroot(H5F_t *f, hbool_t create_root)
* present, so we don't need to check the superblock version. We do this if
* we have write access, the root entry has been allocated (i.e.
* super_vers < 2) and the stab info is not already cached. */
- if ((H5F_INTENT(f) & H5F_ACC_RDWR) && stab_exists != FALSE && f->shared->sblock->root_ent &&
+ if ((H5F_INTENT(f) & H5F_ACC_RDWR) && stab_exists != false && f->shared->sblock->root_ent &&
f->shared->sblock->root_ent->type != H5G_CACHED_STAB) {
H5O_stab_t stab; /* Symbol table */
@@ -266,13 +266,13 @@ H5G_mkroot(H5F_t *f, hbool_t create_root)
f->shared->sblock->root_ent->cache.stab.heap_addr = stab.heap_addr;
/* Mark superblock dirty, so root group info is flushed */
- sblock_dirty = TRUE;
+ sblock_dirty = true;
} /* end if */
} /* end if */
/* Create the path names for the root group's entry */
H5G__name_init(root_loc.path, "/");
- path_init = TRUE;
+ path_init = true;
f->shared->root_grp->shared->fo_count = 1;
/* The only other open object should be the superblock extension, if it
@@ -373,7 +373,7 @@ H5G_root_loc(H5F_t *f, H5G_loc_t *loc)
/* (but only for non-mounted files) */
if (!H5F_is_mount(f)) {
loc->oloc->file = f;
- loc->oloc->holding_file = FALSE;
+ loc->oloc->holding_file = false;
} /* end if */
done:
diff --git a/src/H5Gstab.c b/src/H5Gstab.c
index e7f6c02ba7f..ef9773d7451 100644
--- a/src/H5Gstab.c
+++ b/src/H5Gstab.c
@@ -74,7 +74,7 @@ typedef struct H5G_bt_it_lbi_t {
/* upward */
H5O_link_t *lnk; /*link to be returned */
- hbool_t found; /*whether we found the link */
+ bool found; /*whether we found the link */
} H5G_bt_it_lbi_t;
/********************/
@@ -365,7 +365,7 @@ H5G__stab_remove_by_idx(const H5O_loc_t *grp_oloc, H5RS_str_t *grp_full_path_r,
H5O_stab_t stab; /* Symbol table message */
H5G_bt_rm_t udata; /* Data to pass through B-tree */
H5O_link_t obj_lnk; /* Object's link within group */
- hbool_t lnk_copied = FALSE; /* Whether the link was copied */
+ bool lnk_copied = false; /* Whether the link was copied */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -375,7 +375,7 @@ H5G__stab_remove_by_idx(const H5O_loc_t *grp_oloc, H5RS_str_t *grp_full_path_r,
/* Look up name of link to remove, by index */
if (H5G__stab_lookup_by_idx(grp_oloc, order, n, &obj_lnk) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get link information");
- lnk_copied = TRUE;
+ lnk_copied = true;
/* Read in symbol table message */
if (NULL == H5O_msg_read(grp_oloc, H5O_STAB_ID, &stab))
@@ -677,7 +677,7 @@ H5G__stab_get_name_by_idx(const H5O_loc_t *oloc, H5_iter_order_t order, hsize_t
H5HL_t *heap = NULL; /* Pointer to local heap */
H5O_stab_t stab; /* Info about local heap & B-tree */
H5G_bt_it_gnbi_t udata; /* Iteration information */
- hbool_t udata_valid = FALSE; /* Whether iteration information is valid */
+ bool udata_valid = false; /* Whether iteration information is valid */
herr_t ret_value = SUCCEED; /* Return value */
/* Portably clear udata struct (before FUNC_ENTER) */
@@ -714,7 +714,7 @@ H5G__stab_get_name_by_idx(const H5O_loc_t *oloc, H5_iter_order_t order, hsize_t
udata.common.op = H5G__stab_get_name_by_idx_cb;
udata.heap = heap;
udata.name = NULL;
- udata_valid = TRUE;
+ udata_valid = true;
/* Iterate over the group members */
if (H5B_iterate(oloc->file, H5B_SNODE, stab.btree_addr, H5G__node_by_idx, &udata) < 0)
@@ -725,11 +725,11 @@ H5G__stab_get_name_by_idx(const H5O_loc_t *oloc, H5_iter_order_t order, hsize_t
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "index out of bound");
/* Get the length of the name */
- *name_len = HDstrlen(udata.name);
+ *name_len = strlen(udata.name);
/* Copy the name into the user's buffer, if given */
if (name) {
- HDstrncpy(name, udata.name, MIN((*name_len + 1), name_size));
+ strncpy(name, udata.name, MIN((*name_len + 1), name_size));
if (*name_len >= name_size)
name[name_size - 1] = '\0';
} /* end if */
@@ -780,12 +780,12 @@ H5G__stab_lookup_cb(const H5G_entry_t *ent, void *_udata)
*
* Purpose: Look up an object relative to a group, using symbol table
*
- * Return: Non-negative (TRUE/FALSE) on success/Negative on failure
+ * Return: Non-negative (true/false) on success/Negative on failure
*
*-------------------------------------------------------------------------
*/
herr_t
-H5G__stab_lookup(const H5O_loc_t *grp_oloc, const char *name, hbool_t *found, H5O_link_t *lnk)
+H5G__stab_lookup(const H5O_loc_t *grp_oloc, const char *name, bool *found, H5O_link_t *lnk)
{
H5HL_t *heap = NULL; /* Pointer to local heap */
H5G_bt_lkp_t bt_udata; /* Data to pass through B-tree */
@@ -863,7 +863,7 @@ H5G__stab_lookup_by_idx_cb(const H5G_entry_t *ent, void *_udata)
/* Convert the entry to a link */
if (H5G__ent_to_link(udata->lnk, udata->heap, ent, name) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTCONVERT, FAIL, "unable to convert symbol table entry to link");
- udata->found = TRUE;
+ udata->found = true;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -918,7 +918,7 @@ H5G__stab_lookup_by_idx(const H5O_loc_t *grp_oloc, H5_iter_order_t order, hsize_
udata.common.op = H5G__stab_lookup_by_idx_cb;
udata.heap = heap;
udata.lnk = lnk;
- udata.found = FALSE;
+ udata.found = false;
/* Iterate over the group members */
if (H5B_iterate(grp_oloc->file, H5B_SNODE, stab.btree_addr, H5G__node_by_idx, &udata) < 0)
@@ -961,7 +961,7 @@ H5G__stab_valid(H5O_loc_t *grp_oloc, H5O_stab_t *alt_stab)
{
H5O_stab_t stab; /* Current symbol table */
H5HL_t *heap = NULL; /* Pointer to local heap */
- hbool_t changed = FALSE; /* Whether stab has been modified */
+ bool changed = false; /* Whether stab has been modified */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE_TAG(grp_oloc->addr)
@@ -980,7 +980,7 @@ H5G__stab_valid(H5O_loc_t *grp_oloc, H5O_stab_t *alt_stab)
/* The alternate symbol table's b-tree address is valid. Adjust the
* symbol table message in the group. */
stab.btree_addr = alt_stab->btree_addr;
- changed = TRUE;
+ changed = true;
} /* end else */
} /* end if */
@@ -995,7 +995,7 @@ H5G__stab_valid(H5O_loc_t *grp_oloc, H5O_stab_t *alt_stab)
/* The alternate symbol table's heap address is valid. Adjust the
* symbol table message in the group. */
stab.heap_addr = alt_stab->heap_addr;
- changed = TRUE;
+ changed = true;
} /* end else */
} /* end if */
diff --git a/src/H5Gtest.c b/src/H5Gtest.c
index a68ffaee9f2..a6a64067979 100644
--- a/src/H5Gtest.c
+++ b/src/H5Gtest.c
@@ -70,7 +70,7 @@
htri_t H5G__is_empty_test(gid)
hid_t gid; IN: group to check
RETURNS
- TRUE/FALSE on success, FAIL on failure
+ true/false on success, FAIL on failure
DESCRIPTION
Checks to see if the group has no link messages and no symbol table message
and no "dense" link storage
@@ -83,11 +83,11 @@
htri_t
H5G__is_empty_test(hid_t gid)
{
- H5G_t *grp = NULL; /* Pointer to group */
- htri_t msg_exists = FALSE; /* Indicate that a header message is present */
- htri_t linfo_exists = FALSE; /* Indicate that the 'link info' message is present */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
- htri_t ret_value = TRUE; /* Return value */
+ H5G_t *grp = NULL; /* Pointer to group */
+ htri_t msg_exists = false; /* Indicate that a header message is present */
+ htri_t linfo_exists = false; /* Indicate that the 'link info' message is present */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE
@@ -98,7 +98,7 @@ H5G__is_empty_test(hid_t gid)
/* Set API context */
if (H5CX_push() < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set API context");
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* "New format" checks */
@@ -112,7 +112,7 @@ H5G__is_empty_test(hid_t gid)
if (msg_exists > 0)
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "both symbol table and link messages found");
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
} /* end if */
/* Check for a link info message */
@@ -133,15 +133,15 @@ H5G__is_empty_test(hid_t gid)
/* Check for 'dense' link storage file addresses being defined */
if (H5_addr_defined(linfo.fheap_addr))
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
if (H5_addr_defined(linfo.name_bt2_addr))
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
if (H5_addr_defined(linfo.corder_bt2_addr))
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* Check for link count */
if (linfo.nlinks > 0)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
} /* end if */
/* "Old format" checks */
@@ -171,11 +171,11 @@ H5G__is_empty_test(hid_t gid)
/* Check for link count */
if (nlinks > 0)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
} /* end if */
done:
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "can't reset API context");
FUNC_LEAVE_NOAPI(ret_value)
@@ -191,7 +191,7 @@ H5G__is_empty_test(hid_t gid)
hid_t gid; IN: group to check
unsigned *nmsgs; OUT: # of link messages in header
RETURNS
- TRUE/FALSE on success, FAIL on failure
+ true/false on success, FAIL on failure
DESCRIPTION
Checks to see if the group has link messages and how many.
GLOBAL VARIABLES
@@ -203,10 +203,10 @@ H5G__is_empty_test(hid_t gid)
htri_t
H5G__has_links_test(hid_t gid, unsigned *nmsgs)
{
- H5G_t *grp = NULL; /* Pointer to group */
- htri_t msg_exists = 0; /* Indicate that a header message is present */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
- htri_t ret_value = TRUE; /* Return value */
+ H5G_t *grp = NULL; /* Pointer to group */
+ htri_t msg_exists = 0; /* Indicate that a header message is present */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE
@@ -217,13 +217,13 @@ H5G__has_links_test(hid_t gid, unsigned *nmsgs)
/* Set API context */
if (H5CX_push() < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set API context");
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Check if the group has any link messages */
if ((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_LINK_ID)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header");
if (msg_exists == 0)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* Check if the group has a symbol table message */
if ((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_STAB_ID)) < 0)
@@ -242,7 +242,7 @@ H5G__has_links_test(hid_t gid, unsigned *nmsgs)
} /* end if */
done:
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "can't reset API context");
FUNC_LEAVE_NOAPI(ret_value)
@@ -257,7 +257,7 @@ H5G__has_links_test(hid_t gid, unsigned *nmsgs)
htri_t H5G__has_stab_test(gid)
hid_t gid; IN: group to check
RETURNS
- TRUE/FALSE on success, FAIL on failure
+ true/false on success, FAIL on failure
DESCRIPTION
Checks to see if the group has a symbol table message.
GLOBAL VARIABLES
@@ -269,10 +269,10 @@ H5G__has_links_test(hid_t gid, unsigned *nmsgs)
htri_t
H5G__has_stab_test(hid_t gid)
{
- H5G_t *grp = NULL; /* Pointer to group */
- htri_t msg_exists = 0; /* Indicate that a header message is present */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
- htri_t ret_value = TRUE; /* Return value */
+ H5G_t *grp = NULL; /* Pointer to group */
+ htri_t msg_exists = 0; /* Indicate that a header message is present */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE
@@ -283,13 +283,13 @@ H5G__has_stab_test(hid_t gid)
/* Set API context */
if (H5CX_push() < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set API context");
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Check if the group has a symbol table message */
if ((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_STAB_ID)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header");
if (msg_exists == 0)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* Check if the group has any link messages */
if ((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_LINK_ID)) < 0)
@@ -298,7 +298,7 @@ H5G__has_stab_test(hid_t gid)
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "both symbol table and link messages found");
done:
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "can't reset API context");
FUNC_LEAVE_NOAPI(ret_value)
@@ -313,7 +313,7 @@ H5G__has_stab_test(hid_t gid)
htri_t H5G__is_new_dense_test(gid)
hid_t gid; IN: group to check
RETURNS
- TRUE/FALSE on success, FAIL on failure
+ true/false on success, FAIL on failure
DESCRIPTION
Checks to see if the group is in the "new" format for groups (link messages/
fractal heap+v2 B-tree) and if it is in "dense" storage form (ie. it has
@@ -327,10 +327,10 @@ H5G__has_stab_test(hid_t gid)
htri_t
H5G__is_new_dense_test(hid_t gid)
{
- H5G_t *grp = NULL; /* Pointer to group */
- htri_t msg_exists = 0; /* Indicate that a header message is present */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
- htri_t ret_value = TRUE; /* Return value */
+ H5G_t *grp = NULL; /* Pointer to group */
+ htri_t msg_exists = 0; /* Indicate that a header message is present */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE
@@ -341,19 +341,19 @@ H5G__is_new_dense_test(hid_t gid)
/* Set API context */
if (H5CX_push() < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set API context");
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Check if the group has a symbol table message */
if ((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_STAB_ID)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header");
if (msg_exists > 0)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* Check if the group has any link messages */
if ((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_LINK_ID)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header");
if (msg_exists > 0)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* Check if the group has link info message */
if ((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_LINFO_ID)) < 0)
@@ -367,13 +367,13 @@ H5G__is_new_dense_test(hid_t gid)
/* Check for 'dense' link storage file addresses being defined */
if (!H5_addr_defined(linfo.fheap_addr))
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
if (!H5_addr_defined(linfo.name_bt2_addr))
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
} /* end if */
done:
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "can't reset API context");
FUNC_LEAVE_NOAPI(ret_value)
@@ -407,7 +407,7 @@ H5G__new_dense_info_test(hid_t gid, hsize_t *name_count, hsize_t *corder_count)
H5B2_t *bt2_corder = NULL; /* v2 B-tree handle for creation order index */
H5O_linfo_t linfo; /* Link info message */
H5G_t *grp = NULL; /* Pointer to group */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -419,7 +419,7 @@ H5G__new_dense_info_test(hid_t gid, hsize_t *name_count, hsize_t *corder_count)
/* Set API context */
if (H5CX_push() < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set API context");
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Set metadata tag in API context */
H5_BEGIN_TAG(grp->oloc.addr)
@@ -466,7 +466,7 @@ H5G__new_dense_info_test(hid_t gid, hsize_t *name_count, hsize_t *corder_count)
HDONE_ERROR(H5E_SYM, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for name index");
if (bt2_corder && H5B2_close(bt2_corder) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for creation order index");
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "can't reset API context");
FUNC_LEAVE_NOAPI(ret_value)
@@ -496,7 +496,7 @@ H5G__lheap_size_test(hid_t gid, size_t *lheap_size)
{
H5G_t *grp = NULL; /* Pointer to group */
H5O_stab_t stab; /* Symbol table message */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -508,7 +508,7 @@ H5G__lheap_size_test(hid_t gid, size_t *lheap_size)
/* Set API context */
if (H5CX_push() < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set API context");
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Make certain the group has a symbol table message */
if (NULL == H5O_msg_read(&(grp->oloc), H5O_STAB_ID, &stab))
@@ -519,7 +519,7 @@ H5G__lheap_size_test(hid_t gid, size_t *lheap_size)
HGOTO_ERROR(H5E_SYM, H5E_CANTGETSIZE, FAIL, "can't query local heap size");
done:
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "can't reset API context");
FUNC_LEAVE_NOAPI(ret_value)
@@ -552,7 +552,7 @@ H5G__user_path_test(hid_t obj_id, char *user_path, size_t *user_path_len, unsign
{
void *obj_ptr; /* Pointer to object for ID */
const H5G_name_t *obj_path; /* Pointer to group hier. path for obj */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -568,7 +568,7 @@ H5G__user_path_test(hid_t obj_id, char *user_path, size_t *user_path_len, unsign
/* Set API context */
if (H5CX_push() < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set API context");
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Get the symbol table entry */
switch (H5I_get_type(obj_id)) {
@@ -617,7 +617,7 @@ H5G__user_path_test(hid_t obj_id, char *user_path, size_t *user_path_len, unsign
/* Set the user path, if given */
if (user_path)
- HDstrncpy(user_path, H5RS_get_str(obj_path->user_path_r), (len + 1));
+ strncpy(user_path, H5RS_get_str(obj_path->user_path_r), (len + 1));
/* Set the length of the path */
*user_path_len = len;
@@ -631,7 +631,7 @@ H5G__user_path_test(hid_t obj_id, char *user_path, size_t *user_path_len, unsign
} /* end else */
done:
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "can't reset API context");
FUNC_LEAVE_NOAPI(ret_value)
@@ -726,7 +726,7 @@ H5G__verify_cached_stabs_test_cb(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, h
* the cached stab (if present). If one exists, both must exist. */
/* Initialize constant fields in target oloc */
targ_oloc.file = f;
- targ_oloc.holding_file = FALSE;
+ targ_oloc.holding_file = false;
/* Iterate over entries */
for (i = 0; i < sn->nsyms; i++) {
@@ -734,7 +734,7 @@ H5G__verify_cached_stabs_test_cb(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, h
targ_oloc.addr = sn->entry[i].header;
/* Load target object header */
- if (NULL == (targ_oh = H5O_protect(&targ_oloc, H5AC__READ_ONLY_FLAG, FALSE)))
+ if (NULL == (targ_oh = H5O_protect(&targ_oloc, H5AC__READ_ONLY_FLAG, false)))
HGOTO_ERROR(H5E_SYM, H5E_CANTPROTECT, H5_ITER_ERROR, "unable to protect target object header");
/* Check if a symbol table message exists */
diff --git a/src/H5Gtraverse.c b/src/H5Gtraverse.c
index 41e990c1e5b..dbb46c1de6f 100644
--- a/src/H5Gtraverse.c
+++ b/src/H5Gtraverse.c
@@ -51,11 +51,11 @@
/* User data for path traversal routine */
typedef struct {
/* down */
- hbool_t chk_exists; /* Flag to indicate we are checking if object exists */
+ bool chk_exists; /* Flag to indicate we are checking if object exists */
/* up */
H5G_loc_t *obj_loc; /* Object location */
- hbool_t exists; /* Indicate if object exists */
+ bool exists; /* Indicate if object exists */
} H5G_trav_slink_t;
/********************/
@@ -69,9 +69,9 @@ static herr_t H5G__traverse_slink_cb(H5G_loc_t *grp_loc, const char *name, const
H5G_loc_t *obj_loc, void *_udata /*in,out*/,
H5G_own_loc_t *own_loc /*out*/);
static herr_t H5G__traverse_ud(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, H5G_loc_t *obj_loc /*in,out*/,
- unsigned target, hbool_t *obj_exists);
+ unsigned target, bool *obj_exists);
static herr_t H5G__traverse_slink(const H5G_loc_t *grp_loc, const H5O_link_t *lnk,
- H5G_loc_t *obj_loc /*in,out*/, unsigned target, hbool_t *obj_exists);
+ H5G_loc_t *obj_loc /*in,out*/, unsigned target, bool *obj_exists);
static herr_t H5G__traverse_real(const H5G_loc_t *loc, const char *name, unsigned target, H5G_traverse_t op,
void *op_data);
@@ -110,7 +110,7 @@ H5G__traverse_slink_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc, const char H5_ATTR_UNU
/* Check for dangling soft link */
if (obj_loc == NULL) {
if (udata->chk_exists)
- udata->exists = FALSE;
+ udata->exists = false;
else
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "component not found");
} /* end if */
@@ -119,7 +119,7 @@ H5G__traverse_slink_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc, const char H5_ATTR_UNU
H5O_loc_copy_deep(udata->obj_loc->oloc, obj_loc->oloc);
/* Indicate that the object exists */
- udata->exists = TRUE;
+ udata->exists = true;
} /* end else */
done:
@@ -142,7 +142,7 @@ H5G__traverse_slink_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc, const char H5_ATTR_UNU
*/
static herr_t
H5G__traverse_ud(const H5G_loc_t *grp_loc /*in,out*/, const H5O_link_t *lnk, H5G_loc_t *obj_loc /*in,out*/,
- unsigned target, hbool_t *obj_exists)
+ unsigned target, bool *obj_exists)
{
const H5L_class_t *link_class; /* User-defined link class */
hid_t cb_return = -1; /* The ID the user-defined callback returned */
@@ -177,7 +177,7 @@ H5G__traverse_ud(const H5G_loc_t *grp_loc /*in,out*/, const H5O_link_t *lnk, H5G
/* Create a group ID to pass to the user-defined callback */
if (NULL == (grp = H5G_open(&grp_loc_copy)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group");
- if ((cur_grp = H5VL_wrap_register(H5I_GROUP, grp, FALSE)) < 0)
+ if ((cur_grp = H5VL_wrap_register(H5I_GROUP, grp, false)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTREGISTER, FAIL, "unable to register group");
/* User-defined callback function */
@@ -202,7 +202,7 @@ H5G__traverse_ud(const H5G_loc_t *grp_loc /*in,out*/, const H5O_link_t *lnk, H5G
H5E_clear_stack(NULL);
/* Indicate that the object doesn't exist */
- *obj_exists = FALSE;
+ *obj_exists = false;
/* Get out now */
HGOTO_DONE(SUCCEED);
@@ -261,15 +261,15 @@ H5G__traverse_ud(const H5G_loc_t *grp_loc /*in,out*/, const H5O_link_t *lnk, H5G
*/
static herr_t
H5G__traverse_slink(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, H5G_loc_t *obj_loc /*in,out*/,
- unsigned target, hbool_t *obj_exists)
+ unsigned target, bool *obj_exists)
{
H5G_trav_slink_t udata; /* User data to pass to link traversal callback */
H5G_name_t tmp_obj_path; /* Temporary copy of object's path */
- hbool_t tmp_obj_path_set = FALSE; /* Flag to indicate that tmp object path is initialized */
+ bool tmp_obj_path_set = false; /* Flag to indicate that tmp object path is initialized */
H5O_loc_t tmp_grp_oloc; /* Temporary copy of group entry */
H5G_name_t tmp_grp_path; /* Temporary copy of group's path */
H5G_loc_t tmp_grp_loc; /* Temporary copy of group's location */
- hbool_t tmp_grp_loc_set = FALSE; /* Flag to indicate that tmp group location is initialized */
+ bool tmp_grp_loc_set = false; /* Flag to indicate that tmp group location is initialized */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -292,16 +292,16 @@ H5G__traverse_slink(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, H5G_loc_t *
* link traversal on the object's & group's paths - QAK)
*/
H5G_loc_copy(&tmp_grp_loc, grp_loc, H5_COPY_DEEP);
- tmp_grp_loc_set = TRUE;
+ tmp_grp_loc_set = true;
/* Hold the object's group hier. path to restore later */
/* (Part of "tracking the names properly") */
H5G_name_copy(&tmp_obj_path, obj_loc->path, H5_COPY_SHALLOW);
- tmp_obj_path_set = TRUE;
+ tmp_obj_path_set = true;
/* Set up user data for traversal callback */
- udata.chk_exists = (target & H5G_TARGET_EXISTS) ? TRUE : FALSE;
- udata.exists = FALSE;
+ udata.chk_exists = (target & H5G_TARGET_EXISTS) ? true : false;
+ udata.exists = false;
udata.obj_loc = obj_loc;
/* Traverse the link */
@@ -335,8 +335,8 @@ H5G__traverse_slink(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, H5G_loc_t *
*-------------------------------------------------------------------------
*/
herr_t
-H5G__traverse_special(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, unsigned target, hbool_t last_comp,
- H5G_loc_t *obj_loc, hbool_t *obj_exists)
+H5G__traverse_special(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, unsigned target, bool last_comp,
+ H5G_loc_t *obj_loc, bool *obj_exists)
{
size_t nlinks; /* # of soft / UD links left to traverse */
herr_t ret_value = SUCCEED; /* Return value */
@@ -447,14 +447,14 @@ H5G__traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, H5G
H5G_loc_t obj_loc; /* Location of object */
size_t nchars; /* component name length */
H5O_link_t lnk; /* Link information for object */
- hbool_t link_valid = FALSE; /* Flag to indicate that the link information is valid */
- hbool_t obj_loc_valid = FALSE; /* Flag to indicate that the object location is valid */
+ bool link_valid = false; /* Flag to indicate that the link information is valid */
+ bool obj_loc_valid = false; /* Flag to indicate that the object location is valid */
H5G_own_loc_t own_loc = H5G_OWN_NONE; /* Enum to indicate whether callback took ownership of locations*/
- hbool_t group_copy = FALSE; /* Flag to indicate that the group entry is copied */
+ bool group_copy = false; /* Flag to indicate that the group entry is copied */
char comp_buf[1024]; /* Temporary buffer for path components */
char *comp; /* Pointer to buffer for path components */
H5WB_t *wb = NULL; /* Wrapped buffer for temporary buffer */
- hbool_t last_comp = FALSE; /* Flag to indicate that a component is the last component in the name */
+ bool last_comp = false; /* Flag to indicate that a component is the last component in the name */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -500,7 +500,7 @@ H5G__traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, H5G
/* Deep copy of the starting location to group location */
if (H5G_loc_copy(&grp_loc, &loc, H5_COPY_DEEP) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to copy location");
- group_copy = TRUE;
+ group_copy = true;
/* Clear object location */
if (H5G_loc_reset(&obj_loc) < 0)
@@ -511,14 +511,14 @@ H5G__traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, H5G
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't wrap buffer");
/* Get a pointer to a buffer that's large enough */
- if (NULL == (comp = (char *)H5WB_actual(wb, (HDstrlen(name) + 1))))
+ if (NULL == (comp = (char *)H5WB_actual(wb, (strlen(name) + 1))))
HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't get actual buffer");
/* Traverse the path */
while ((name = H5G__component(name, &nchars)) && *name) {
const char *s; /* Temporary string pointer */
- hbool_t lookup_status; /* Status from object lookup */
- hbool_t obj_exists; /* Whether the object exists */
+ bool lookup_status; /* Status from object lookup */
+ bool obj_exists; /* Whether the object exists */
/*
* Copy the component name into a null-terminated buffer so
@@ -537,34 +537,34 @@ H5G__traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, H5G
/* Check if this is the last component of the name */
if (!((s = H5G__component(name + nchars, NULL)) && *s))
- last_comp = TRUE;
+ last_comp = true;
/* If there's valid information in the link, reset it */
if (link_valid) {
H5O_msg_reset(H5O_LINK_ID, &lnk);
- link_valid = FALSE;
+ link_valid = false;
} /* end if */
/* Get information for object in current group */
- lookup_status = FALSE;
+ lookup_status = false;
if (H5G__obj_lookup(grp_loc.oloc, comp, &lookup_status, &lnk /*out*/) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't look up component");
- obj_exists = FALSE;
+ obj_exists = false;
/* If the lookup was OK, build object location and traverse special links, etc. */
if (lookup_status) {
/* Sanity check link and indicate it's valid */
assert(lnk.type >= H5L_TYPE_HARD);
- assert(!HDstrcmp(comp, lnk.name));
- link_valid = TRUE;
+ assert(!strcmp(comp, lnk.name));
+ link_valid = true;
/* Build object location from the link */
if (H5G__link_to_loc(&grp_loc, &lnk, &obj_loc) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "cannot initialize object location");
- obj_loc_valid = TRUE;
+ obj_loc_valid = true;
/* Assume object exists */
- obj_exists = TRUE;
+ obj_exists = true;
/* Perform any special traversals that the link needs */
/* (soft links, user-defined links, file mounting, etc.) */
@@ -719,7 +719,7 @@ H5G__traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, H5G
H5G_loc_free(&grp_loc);
H5G_loc_copy(&grp_loc, &obj_loc, H5_COPY_SHALLOW);
H5G_loc_reset(&obj_loc);
- obj_loc_valid = FALSE;
+ obj_loc_valid = false;
/* Advance to next component in string */
name += nchars;
diff --git a/src/H5HF.c b/src/H5HF.c
index 9faa6ad9e57..3484d45aa06 100644
--- a/src/H5HF.c
+++ b/src/H5HF.c
@@ -559,7 +559,7 @@ H5HF_read(H5HF_t *fh, const void *_id, void *obj /*out*/)
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_write(H5HF_t *fh, void *_id, hbool_t H5_ATTR_UNUSED *id_changed, const void *obj)
+H5HF_write(H5HF_t *fh, void *_id, bool H5_ATTR_UNUSED *id_changed, const void *obj)
{
uint8_t *id = (uint8_t *)_id; /* Object ID */
uint8_t id_flags; /* Heap ID flag bits */
@@ -747,7 +747,7 @@ H5HF_remove(H5HF_t *fh, const void *_id)
herr_t
H5HF_close(H5HF_t *fh)
{
- hbool_t pending_delete = FALSE; /* Whether the heap is pending deletion */
+ bool pending_delete = false; /* Whether the heap is pending deletion */
haddr_t heap_addr = HADDR_UNDEF; /* Address of heap (for deletion) */
herr_t ret_value = SUCCEED; /* Return value */
@@ -795,7 +795,7 @@ H5HF_close(H5HF_t *fh)
/* Set local info, so heap deletion can occur after decrementing the
* header's ref count
*/
- pending_delete = TRUE;
+ pending_delete = true;
heap_addr = fh->hdr->heap_addr;
} /* end if */
} /* end if */
@@ -856,7 +856,7 @@ H5HF_delete(H5F_t *f, haddr_t fh_addr)
/* Check for files using shared heap header */
if (hdr->file_rc)
- hdr->pending_delete = TRUE;
+ hdr->pending_delete = true;
else {
/* Delete heap now, starting with header (unprotects header) */
if (H5HF__hdr_delete(hdr) < 0)
diff --git a/src/H5HFcache.c b/src/H5HFcache.c
index 71054f86454..ad8e4d24227 100644
--- a/src/H5HFcache.c
+++ b/src/H5HFcache.c
@@ -68,7 +68,7 @@ static herr_t H5HF__cache_hdr_get_initial_load_size(void *udata, size_t *image_l
static herr_t H5HF__cache_hdr_get_final_load_size(const void *image_ptr, size_t image_len, void *udata,
size_t *actual_len);
static htri_t H5HF__cache_hdr_verify_chksum(const void *image_ptr, size_t len, void *udata_ptr);
-static void *H5HF__cache_hdr_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty);
+static void *H5HF__cache_hdr_deserialize(const void *image, size_t len, void *udata, bool *dirty);
static herr_t H5HF__cache_hdr_image_len(const void *thing, size_t *image_len);
static herr_t H5HF__cache_hdr_pre_serialize(H5F_t *f, void *thing, haddr_t addr, size_t len,
haddr_t *new_addr, size_t *new_len, unsigned *flags);
@@ -77,7 +77,7 @@ static herr_t H5HF__cache_hdr_free_icr(void *thing);
static herr_t H5HF__cache_iblock_get_initial_load_size(void *udata, size_t *image_len);
static htri_t H5HF__cache_iblock_verify_chksum(const void *image_ptr, size_t len, void *udata_ptr);
-static void *H5HF__cache_iblock_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty);
+static void *H5HF__cache_iblock_deserialize(const void *image, size_t len, void *udata, bool *dirty);
static herr_t H5HF__cache_iblock_image_len(const void *thing, size_t *image_len);
static herr_t H5HF__cache_iblock_pre_serialize(H5F_t *f, void *thing, haddr_t addr, size_t len,
haddr_t *new_addr, size_t *new_len, unsigned *flags);
@@ -87,7 +87,7 @@ static herr_t H5HF__cache_iblock_free_icr(void *thing);
static herr_t H5HF__cache_dblock_get_initial_load_size(void *udata, size_t *image_len);
static htri_t H5HF__cache_dblock_verify_chksum(const void *image_ptr, size_t len, void *udata_ptr);
-static void *H5HF__cache_dblock_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty);
+static void *H5HF__cache_dblock_deserialize(const void *image, size_t len, void *udata, bool *dirty);
static herr_t H5HF__cache_dblock_image_len(const void *thing, size_t *image_len);
static herr_t H5HF__cache_dblock_pre_serialize(H5F_t *f, void *thing, haddr_t addr, size_t len,
haddr_t *new_addr, size_t *new_len, unsigned *flags);
@@ -98,17 +98,17 @@ static herr_t H5HF__cache_dblock_fsf_size(const void *_thing, hsize_t *fsf_size)
/* Debugging Function Prototypes */
#ifndef NDEBUG
-static herr_t H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_clean,
- hbool_t *clean);
+static herr_t H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, bool *fd_clean,
+ bool *clean);
static herr_t H5HF__cache_verify_iblock_descendants_clean(H5F_t *f, haddr_t fd_parent_addr,
H5HF_indirect_t *iblock, unsigned *iblock_status,
- hbool_t *fd_clean, hbool_t *clean);
+ bool *fd_clean, bool *clean);
static herr_t H5HF__cache_verify_iblocks_dblocks_clean(H5F_t *f, haddr_t fd_parent_addr,
- H5HF_indirect_t *iblock, hbool_t *fd_clean,
- hbool_t *clean, hbool_t *has_dblocks);
+ H5HF_indirect_t *iblock, bool *fd_clean, bool *clean,
+ bool *has_dblocks);
static herr_t H5HF__cache_verify_descendant_iblocks_clean(H5F_t *f, haddr_t fd_parent_addr,
- H5HF_indirect_t *iblock, hbool_t *fd_clean,
- hbool_t *clean, hbool_t *has_iblocks);
+ H5HF_indirect_t *iblock, bool *fd_clean,
+ bool *clean, bool *has_iblocks);
#endif /* NDEBUG */
/*********************/
@@ -400,7 +400,7 @@ H5HF__cache_hdr_get_final_load_size(const void *_image, size_t H5_ATTR_NDEBUG_UN
* Purpose: Verify the computed checksum of the data structure is the
* same as the stored chksum.
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: Negative
*
*-------------------------------------------------------------------------
@@ -411,7 +411,7 @@ H5HF__cache_hdr_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNUSE
const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
uint32_t stored_chksum; /* Stored metadata checksum value */
uint32_t computed_chksum; /* Computed metadata checksum value */
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -422,7 +422,7 @@ H5HF__cache_hdr_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNUSE
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
if (stored_chksum != computed_chksum)
- ret_value = FALSE;
+ ret_value = false;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF__cache_hdr_verify_chksum() */
@@ -441,7 +441,7 @@ H5HF__cache_hdr_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNUSE
*-------------------------------------------------------------------------
*/
static void *
-H5HF__cache_hdr_deserialize(const void *_image, size_t len, void *_udata, hbool_t H5_ATTR_UNUSED *dirty)
+H5HF__cache_hdr_deserialize(const void *_image, size_t len, void *_udata, bool H5_ATTR_UNUSED *dirty)
{
H5HF_hdr_t *hdr = NULL; /* Fractal heap info */
H5HF_hdr_cache_ud_t *udata = (H5HF_hdr_cache_ud_t *)_udata; /* User data for callback */
@@ -628,8 +628,8 @@ H5HF__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t len,
#ifndef NDEBUG
{
- hbool_t descendants_clean = TRUE;
- hbool_t fd_children_clean = TRUE;
+ bool descendants_clean = true;
+ bool fd_children_clean = true;
/* Verify that flush dependencies are working correctly. Do this
* by verifying that either:
@@ -764,7 +764,7 @@ H5HF__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_UN
UINT32ENCODE(image, hdr->pline_root_direct_filter_mask);
/* Encode I/O filter information */
- if (H5O_msg_encode(hdr->f, H5O_PLINE_ID, FALSE, image, &(hdr->pline)) < 0)
+ if (H5O_msg_encode(hdr->f, H5O_PLINE_ID, false, image, &(hdr->pline)) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTENCODE, FAIL, "can't encode I/O pipeline filters");
image += hdr->filter_len;
} /* end if */
@@ -855,7 +855,7 @@ H5HF__cache_iblock_get_initial_load_size(void *_udata, size_t *image_len)
* Purpose: Verify the computed checksum of the data structure is the
* same as the stored checksum.
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: Negative
*
*-------------------------------------------------------------------------
@@ -866,7 +866,7 @@ H5HF__cache_iblock_verify_chksum(const void *_image, size_t len, void H5_ATTR_UN
const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
uint32_t stored_chksum; /* Stored metadata checksum value */
uint32_t computed_chksum; /* Computed metadata checksum value */
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -877,7 +877,7 @@ H5HF__cache_iblock_verify_chksum(const void *_image, size_t len, void H5_ATTR_UN
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
if (stored_chksum != computed_chksum)
- ret_value = FALSE;
+ ret_value = false;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF__cache_iblock_verify_chksum() */
@@ -901,7 +901,7 @@ H5HF__cache_iblock_verify_chksum(const void *_image, size_t len, void H5_ATTR_UN
*/
static void *
H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len, void *_udata,
- hbool_t H5_ATTR_UNUSED *dirty)
+ bool H5_ATTR_UNUSED *dirty)
{
H5HF_hdr_t *hdr; /* Shared fractal heap information */
H5HF_iblock_cache_ud_t *udata = (H5HF_iblock_cache_ud_t *)_udata; /* User data for callback */
@@ -1145,8 +1145,8 @@ H5HF__cache_iblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5
#ifndef NDEBUG
{
- hbool_t descendants_clean = TRUE;
- hbool_t fd_children_clean = TRUE;
+ bool descendants_clean = true;
+ bool fd_children_clean = true;
unsigned iblock_status = 0;
/* verify that flush dependencies are working correctly. Do this
@@ -1521,7 +1521,7 @@ H5HF__cache_dblock_get_initial_load_size(void *_udata, size_t *image_len)
* Purpose: Verify the computed checksum of the data structure is the
* same as the stored chksum.
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: Negative
*
*-------------------------------------------------------------------------
@@ -1538,7 +1538,7 @@ H5HF__cache_dblock_verify_chksum(const void *_image, size_t len, void *_udata)
uint32_t computed_chksum; /* Computed metadata checksum value */
size_t chk_size; /* The size for validating checksum */
uint8_t *chk_p; /* Pointer to the area for validating checksum */
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1552,7 +1552,7 @@ H5HF__cache_dblock_verify_chksum(const void *_image, size_t len, void *_udata)
/* Get out if data block is not checksummed */
if (!(hdr->checksum_dblocks))
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
if (hdr->filter_len > 0) {
size_t nbytes; /* Number of bytes used in buffer, after applying reverse filters */
@@ -1581,7 +1581,7 @@ H5HF__cache_dblock_verify_chksum(const void *_image, size_t len, void *_udata)
HGOTO_ERROR(H5E_HEAP, H5E_CANTFILTER, FAIL, "output pipeline failed");
/* Update info about direct block */
- udata->decompressed = TRUE;
+ udata->decompressed = true;
len = nbytes;
}
else {
@@ -1613,7 +1613,7 @@ H5HF__cache_dblock_verify_chksum(const void *_image, size_t len, void *_udata)
/* Verify checksum */
if (stored_chksum != computed_chksum)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* Save the decompressed data to be used later in deserialize callback */
if (hdr->filter_len > 0) {
@@ -1655,7 +1655,7 @@ H5HF__cache_dblock_verify_chksum(const void *_image, size_t len, void *_udata)
*-------------------------------------------------------------------------
*/
static void *
-H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata, hbool_t H5_ATTR_UNUSED *dirty)
+H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata, bool H5_ATTR_UNUSED *dirty)
{
H5HF_hdr_t *hdr; /* Shared fractal heap information */
H5HF_dblock_cache_ud_t *udata = (H5HF_dblock_cache_ud_t *)_udata; /* User data for callback */
@@ -1963,8 +1963,8 @@ static herr_t
H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t len, haddr_t *new_addr,
size_t *new_len, unsigned *flags)
{
- hbool_t at_tmp_addr; /* Flag to indicate direct block is */
- /* at temporary address */
+ bool at_tmp_addr; /* Flag to indicate direct block is */
+ /* at temporary address */
haddr_t dblock_addr;
H5HF_hdr_t *hdr; /* Shared fractal heap information */
H5HF_direct_t *dblock = (H5HF_direct_t *)_thing; /* Direct block info */
@@ -2108,7 +2108,7 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
/* Check for root direct block */
if (dblock->parent == NULL) {
- hbool_t hdr_changed = FALSE; /* Whether the header info changed */
+ bool hdr_changed = false; /* Whether the header info changed */
/* Sanity check */
assert(H5_addr_eq(hdr->man_dtable.table_addr, addr));
@@ -2117,7 +2117,7 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
/* Check if the filter mask changed */
if (hdr->pline_root_direct_filter_mask != filter_mask) {
hdr->pline_root_direct_filter_mask = filter_mask;
- hdr_changed = TRUE;
+ hdr_changed = true;
} /* end if */
/* verify that the cache's last record of the compressed
@@ -2153,16 +2153,16 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
hdr->pline_root_direct_size = write_size;
/* Note that heap header was modified */
- hdr_changed = TRUE;
+ hdr_changed = true;
} /* end if */
/* Check if heap header was modified */
if (hdr_changed)
if (H5HF__hdr_dirty(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty");
- } /* end if */
- else { /* the direct block's parent is an indirect block */
- hbool_t par_changed = FALSE; /* Whether the parent's infochanged */
+ } /* end if */
+ else { /* the direct block's parent is an indirect block */
+ bool par_changed = false; /* Whether the parent's infochanged */
/* Sanity check */
assert(par_iblock);
@@ -2171,7 +2171,7 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
/* Check if the filter mask changed */
if (par_iblock->filt_ents[par_entry].filter_mask != filter_mask) {
par_iblock->filt_ents[par_entry].filter_mask = filter_mask;
- par_changed = TRUE;
+ par_changed = true;
} /* end if */
/* verify that the cache's last record of the compressed
@@ -2208,7 +2208,7 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
par_iblock->filt_ents[par_entry].size = write_size;
/* Note that parent was modified */
- par_changed = TRUE;
+ par_changed = true;
} /* end if */
/* Check if parent was modified */
@@ -2493,7 +2493,7 @@ H5HF__cache_dblock_fsf_size(const void *_thing, hsize_t *fsf_size)
* Purpose: Sanity checking routine that verifies that all indirect
* and direct blocks that are descendants of the supplied
* instance of H5HF_hdr_t are clean. Set *clean to
- * TRUE if this is the case, and to FALSE otherwise.
+ * true if this is the case, and to false otherwise.
*
* Update -- 8/24/15
*
@@ -2549,9 +2549,9 @@ H5HF__cache_dblock_fsf_size(const void *_thing, hsize_t *fsf_size)
*/
#ifndef NDEBUG
static herr_t
-H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_clean, hbool_t *clean)
+H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, bool *fd_clean, bool *clean)
{
- hbool_t fd_exists = FALSE; /* whether flush dependency exists. */
+ bool fd_exists = false; /* whether flush dependency exists. */
haddr_t hdr_addr; /* Address of header */
unsigned hdr_status = 0; /* Header cache entry status */
herr_t ret_value = SUCCEED; /* Return value */
@@ -2606,7 +2606,7 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_
H5HF_indirect_t *root_iblock = hdr->root_iblock;
haddr_t root_iblock_addr;
unsigned root_iblock_status = 0;
- hbool_t root_iblock_in_cache;
+ bool root_iblock_in_cache;
/* make note of the on disk address of the root iblock */
if (root_iblock == NULL)
@@ -2627,13 +2627,13 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_
assert(root_iblock_in_cache || (root_iblock == NULL));
if (!root_iblock_in_cache) { /* we are done */
- *clean = TRUE;
- *fd_clean = TRUE;
+ *clean = true;
+ *fd_clean = true;
} /* end if */
else if ((root_iblock_status & H5AC_ES__IS_DIRTY) &&
(((root_iblock_status & H5AC_ES__IMAGE_IS_UP_TO_DATE) == 0) ||
(!H5AC_get_serialization_in_progress(f)))) {
- *clean = FALSE;
+ *clean = false;
/* verify that a flush dependency exists between the header and
* the root inode.
@@ -2642,10 +2642,10 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't check flush dependency");
assert(fd_exists);
- *fd_clean = FALSE;
+ *fd_clean = false;
} /* end else-if */
else { /* must examine children */
- hbool_t unprotect_root_iblock = FALSE;
+ bool unprotect_root_iblock = false;
/* At this point, the root iblock may be pinned, protected,
* both, or neither, and we may or may not have a pointer
@@ -2683,7 +2683,7 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_
H5_END_TAG
- unprotect_root_iblock = TRUE;
+ unprotect_root_iblock = true;
} /* end if */
else {
/* the root iblock is protected, and we have no
@@ -2758,7 +2758,7 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_
H5_END_TAG
- unprotect_root_iblock = TRUE;
+ unprotect_root_iblock = true;
assert(iblock == root_iblock);
} /* end if */
} /* end else */
@@ -2785,8 +2785,8 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_
else if ((hdr->man_dtable.curr_root_rows == 0) && (HADDR_UNDEF != hdr->man_dtable.table_addr)) {
haddr_t root_dblock_addr;
unsigned root_dblock_status = 0;
- hbool_t in_cache;
- hbool_t type_ok;
+ bool in_cache;
+ bool type_ok;
/* this is scenario 2 -- we have a root dblock */
root_dblock_addr = hdr->man_dtable.table_addr;
@@ -2824,16 +2824,16 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_
*fd_clean = *clean;
} /* end if */
else { /* root dblock not in cache */
- *fd_clean = TRUE;
- *clean = TRUE;
+ *fd_clean = true;
+ *clean = true;
} /* end else */
} /* end else-if */
else {
/* this is scenario 3 -- the fractal heap is empty, and we
* have nothing to do.
*/
- *fd_clean = TRUE;
- *clean = TRUE;
+ *fd_clean = true;
+ *clean = true;
} /* end else */
done:
@@ -2847,7 +2847,7 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_
* Purpose: Sanity checking routine that verifies that all indirect
* and direct blocks that are descendants of the supplied
* instance of H5HF_indirect_t are clean. Set *clean
- * to TRUE if this is the case, and to FALSE otherwise.
+ * to true if this is the case, and to false otherwise.
*
* In passing, the function also does a cursory check to
* spot any obvious errors in the flush dependency setup.
@@ -2909,11 +2909,11 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_
#ifndef NDEBUG
static herr_t
H5HF__cache_verify_iblock_descendants_clean(H5F_t *f, haddr_t fd_parent_addr, H5HF_indirect_t *iblock,
- unsigned *iblock_status, hbool_t *fd_clean, hbool_t *clean)
+ unsigned *iblock_status, bool *fd_clean, bool *clean)
{
- hbool_t has_dblocks = FALSE;
- hbool_t has_iblocks = FALSE;
- herr_t ret_value = SUCCEED; /* Return value */
+ bool has_dblocks = false;
+ bool has_iblocks = false;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -2925,7 +2925,7 @@ H5HF__cache_verify_iblock_descendants_clean(H5F_t *f, haddr_t fd_parent_addr, H5
assert(iblock_status);
assert(fd_clean);
assert(*fd_clean);
- assert(clean); /* note that *clean need not be TRUE */
+ assert(clean); /* note that *clean need not be true */
if ((*fd_clean) && H5HF__cache_verify_iblocks_dblocks_clean(f, fd_parent_addr, iblock, fd_clean, clean,
&has_dblocks) < 0)
@@ -3022,7 +3022,7 @@ H5HF__cache_verify_iblock_descendants_clean(H5F_t *f, haddr_t fd_parent_addr, H5
#ifndef NDEBUG
static herr_t
H5HF__cache_verify_iblocks_dblocks_clean(H5F_t *f, haddr_t fd_parent_addr, H5HF_indirect_t *iblock,
- hbool_t *fd_clean, hbool_t *clean, hbool_t *has_dblocks)
+ bool *fd_clean, bool *clean, bool *has_dblocks)
{
unsigned num_direct_rows;
unsigned max_dblock_index;
@@ -3054,14 +3054,14 @@ H5HF__cache_verify_iblocks_dblocks_clean(H5F_t *f, haddr_t fd_parent_addr, H5HF_
dblock_addr = iblock->ents[i].addr;
if (H5_addr_defined(dblock_addr)) {
- hbool_t in_cache;
- hbool_t type_ok;
+ bool in_cache;
+ bool type_ok;
if (H5AC_verify_entry_type(f, dblock_addr, &H5AC_FHEAP_DBLOCK[0], &in_cache, &type_ok) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't check dblock type");
if (in_cache) { /* dblock is in cache */
- hbool_t fd_exists;
+ bool fd_exists;
unsigned dblock_status = 0;
if (!type_ok)
@@ -3072,18 +3072,18 @@ H5HF__cache_verify_iblocks_dblocks_clean(H5F_t *f, haddr_t fd_parent_addr, H5HF_
assert(dblock_status & H5AC_ES__IN_CACHE);
- *has_dblocks = TRUE;
+ *has_dblocks = true;
if ((dblock_status & H5AC_ES__IS_DIRTY) &&
(((dblock_status & H5AC_ES__IMAGE_IS_UP_TO_DATE) == 0) ||
(!H5AC_get_serialization_in_progress(f)))) {
- *clean = FALSE;
+ *clean = false;
if (H5AC_flush_dependency_exists(f, fd_parent_addr, dblock_addr, &fd_exists) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't check flush dependency");
if (fd_exists)
- *fd_clean = FALSE;
+ *fd_clean = false;
} /* end if */
/* If a child dblock is in cache, it must have a flush
@@ -3182,7 +3182,7 @@ H5HF__cache_verify_iblocks_dblocks_clean(H5F_t *f, haddr_t fd_parent_addr, H5HF_
#ifndef NDEBUG
static herr_t
H5HF__cache_verify_descendant_iblocks_clean(H5F_t *f, haddr_t fd_parent_addr, H5HF_indirect_t *iblock,
- hbool_t *fd_clean, hbool_t *clean, hbool_t *has_iblocks)
+ bool *fd_clean, bool *clean, bool *has_iblocks)
{
unsigned first_iblock_index;
unsigned last_iblock_index;
@@ -3220,24 +3220,24 @@ H5HF__cache_verify_descendant_iblocks_clean(H5F_t *f, haddr_t fd_parent_addr, H5
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get iblock status");
if (child_iblock_status & H5AC_ES__IN_CACHE) {
- hbool_t fd_exists;
+ bool fd_exists;
- *has_iblocks = TRUE;
+ *has_iblocks = true;
if ((child_iblock_status & H5AC_ES__IS_DIRTY) &&
(((child_iblock_status & H5AC_ES__IMAGE_IS_UP_TO_DATE) == 0) ||
(!H5AC_get_serialization_in_progress(f)))) {
- *clean = FALSE;
+ *clean = false;
if (H5AC_flush_dependency_exists(f, fd_parent_addr, child_iblock_addr, &fd_exists) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't check flush dependency");
if (fd_exists)
- *fd_clean = FALSE;
+ *fd_clean = false;
} /* end if */
- /* if the child iblock is in cache and *fd_clean is TRUE,
+ /* if the child iblock is in cache and *fd_clean is true,
* we must continue to explore down the fractal heap tree
* structure to verify that all descendant blocks that are
* flush dependency children of the entry at parent_addr are
@@ -3291,7 +3291,7 @@ H5HF__cache_verify_descendant_iblocks_clean(H5F_t *f, haddr_t fd_parent_addr, H5
*/
if (*fd_clean) {
H5HF_indirect_t *child_iblock = NULL;
- hbool_t unprotect_child_iblock = FALSE;
+ bool unprotect_child_iblock = false;
if (0 == (child_iblock_status & H5AC_ES__IS_PINNED)) {
/* child iblock is not pinned */
@@ -3323,7 +3323,7 @@ H5HF__cache_verify_descendant_iblocks_clean(H5F_t *f, haddr_t fd_parent_addr, H5
H5_END_TAG
- unprotect_child_iblock = TRUE;
+ unprotect_child_iblock = true;
} /* end if */
else {
/* child iblock is protected -- use */
diff --git a/src/H5HFdbg.c b/src/H5HFdbg.c
index 0a86fc009e6..14fab84a04b 100644
--- a/src/H5HFdbg.c
+++ b/src/H5HFdbg.c
@@ -218,7 +218,7 @@ H5HF__dtable_debug(const H5HF_dtable_t *dtable, FILE *stream, int indent, int fw
*-------------------------------------------------------------------------
*/
void
-H5HF_hdr_print(const H5HF_hdr_t *hdr, hbool_t dump_internal, FILE *stream, int indent, int fwidth)
+H5HF_hdr_print(const H5HF_hdr_t *hdr, bool dump_internal, FILE *stream, int indent, int fwidth)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -333,7 +333,7 @@ H5HF_hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth)
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header");
/* Print the information about the heap's header */
- H5HF_hdr_print(hdr, FALSE, stream, indent, fwidth);
+ H5HF_hdr_print(hdr, false, stream, indent, fwidth);
done:
if (hdr && H5AC_unprotect(f, H5AC_FHEAP_HDR, addr, hdr, H5AC__NO_FLAGS_SET) < 0)
@@ -398,7 +398,7 @@ H5HF_dblock_debug_cb(H5FS_section_info_t *_sect, void *_udata)
/* Calculate the length */
len = end - start;
- HDsnprintf(temp_str, sizeof(temp_str), "Section #%u:", (unsigned)udata->sect_count);
+ snprintf(temp_str, sizeof(temp_str), "Section #%u:", (unsigned)udata->sect_count);
fprintf(udata->stream, "%*s%-*s %8zu, %8zu\n", udata->indent + 3, "", MAX(0, udata->fwidth - 9),
temp_str, start, len);
udata->sect_count++;
@@ -482,7 +482,7 @@ H5HF_dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed");
/* Initialize the free space information for the heap */
- if (H5HF__space_start(hdr, FALSE) < 0)
+ if (H5HF__space_start(hdr, false) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize heap free space");
/* If there is a free space manager for the heap, check for sections that overlap this block */
@@ -549,7 +549,7 @@ H5HF_dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
*-------------------------------------------------------------------------
*/
void
-H5HF_iblock_print(const H5HF_indirect_t *iblock, hbool_t dump_internal, FILE *stream, int indent, int fwidth)
+H5HF_iblock_print(const H5HF_indirect_t *iblock, bool dump_internal, FILE *stream, int indent, int fwidth)
{
const H5HF_hdr_t *hdr; /* Pointer to heap's header */
char temp_str[64]; /* Temporary string, for formatting */
@@ -591,13 +591,13 @@ H5HF_iblock_print(const H5HF_indirect_t *iblock, hbool_t dump_internal, FILE *st
else
fprintf(stream, "%*sDirect Block Entries: (address)\n", indent, "");
for (u = 0; u < hdr->man_dtable.max_direct_rows && u < iblock->nrows; u++) {
- HDsnprintf(temp_str, sizeof(temp_str), "Row #%u: (block size: %lu)", (unsigned)u,
- (unsigned long)hdr->man_dtable.row_block_size[u]);
+ snprintf(temp_str, sizeof(temp_str), "Row #%u: (block size: %lu)", (unsigned)u,
+ (unsigned long)hdr->man_dtable.row_block_size[u]);
fprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), temp_str);
for (v = 0; v < hdr->man_dtable.cparam.width; v++) {
size_t off = (u * hdr->man_dtable.cparam.width) + v;
- HDsnprintf(temp_str, sizeof(temp_str), "Col #%u:", (unsigned)v);
+ snprintf(temp_str, sizeof(temp_str), "Col #%u:", (unsigned)v);
if (hdr->filter_len > 0)
fprintf(stream, "%*s%-*s %9" PRIuHADDR "/%6zu/%x\n", indent + 6, "", MAX(0, fwidth - 6),
temp_str, iblock->ents[off].addr, iblock->filt_ents[off].size,
@@ -616,13 +616,12 @@ H5HF_iblock_print(const H5HF_indirect_t *iblock, hbool_t dump_internal, FILE *st
H5VM_log2_of2(hdr->man_dtable.cparam.width);
for (u = hdr->man_dtable.max_direct_rows; u < iblock->nrows; u++) {
num_indirect_rows = (H5VM_log2_gen(hdr->man_dtable.row_block_size[u]) - first_row_bits) + 1;
- HDsnprintf(temp_str, sizeof(temp_str), "Row #%u: (# of rows: %u)", (unsigned)u,
- num_indirect_rows);
+ snprintf(temp_str, sizeof(temp_str), "Row #%u: (# of rows: %u)", (unsigned)u, num_indirect_rows);
fprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), temp_str);
for (v = 0; v < hdr->man_dtable.cparam.width; v++) {
size_t off = (u * hdr->man_dtable.cparam.width) + v;
- HDsnprintf(temp_str, sizeof(temp_str), "Col #%u:", (unsigned)v);
+ snprintf(temp_str, sizeof(temp_str), "Col #%u:", (unsigned)v);
fprintf(stream, "%*s%-*s %9" PRIuHADDR "\n", indent + 6, "", MAX(0, fwidth - 6), temp_str,
iblock->ents[off].addr);
} /* end for */
@@ -642,7 +641,7 @@ H5HF_iblock_print(const H5HF_indirect_t *iblock, hbool_t dump_internal, FILE *st
fprintf(stream, "%*s%-*s %p\n", indent + 3, "", MAX(0, fwidth - 3),
"Parent indirect block address:", (void *)iblock->parent);
if (iblock->parent)
- H5HF_iblock_print(iblock->parent, TRUE, stream, indent + 6, fwidth);
+ H5HF_iblock_print(iblock->parent, true, stream, indent + 6, fwidth);
} /* end if */
FUNC_LEAVE_NOAPI_VOID
@@ -663,7 +662,7 @@ H5HF_iblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
{
H5HF_hdr_t *hdr = NULL; /* Fractal heap header info */
H5HF_indirect_t *iblock = NULL; /* Fractal heap direct block info */
- hbool_t did_protect = FALSE; /* Whether we protected the indirect block or not */
+ bool did_protect = false; /* Whether we protected the indirect block or not */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -686,12 +685,12 @@ H5HF_iblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
/*
* Load the heap indirect block
*/
- if (NULL == (iblock = H5HF__man_iblock_protect(hdr, addr, nrows, NULL, 0, FALSE, H5AC__READ_ONLY_FLAG,
+ if (NULL == (iblock = H5HF__man_iblock_protect(hdr, addr, nrows, NULL, 0, false, H5AC__READ_ONLY_FLAG,
&did_protect)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load fractal heap indirect block");
/* Print the information about the heap's indirect block */
- H5HF_iblock_print(iblock, FALSE, stream, indent, fwidth);
+ H5HF_iblock_print(iblock, false, stream, indent, fwidth);
done:
if (iblock && H5HF__man_iblock_unprotect(iblock, H5AC__NO_FLAGS_SET, did_protect) < 0)
@@ -778,7 +777,7 @@ H5HF_sects_debug(H5F_t *f, haddr_t fh_addr, FILE *stream, int indent, int fwidth
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header");
/* Initialize the free space information for the heap */
- if (H5HF__space_start(hdr, FALSE) < 0)
+ if (H5HF__space_start(hdr, false) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize heap free space");
/* If there is a free space manager for the heap, iterate over them */
diff --git a/src/H5HFdblock.c b/src/H5HFdblock.c
index 6b37f9868a9..62f6d8a07ac 100644
--- a/src/H5HFdblock.c
+++ b/src/H5HFdblock.c
@@ -208,7 +208,7 @@ H5HF__man_dblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock, unsigned p
*-------------------------------------------------------------------------
*/
herr_t
-H5HF__man_dblock_destroy(H5HF_hdr_t *hdr, H5HF_direct_t *dblock, haddr_t dblock_addr, hbool_t *parent_removed)
+H5HF__man_dblock_destroy(H5HF_hdr_t *hdr, H5HF_direct_t *dblock, haddr_t dblock_addr, bool *parent_removed)
{
hsize_t dblock_size; /* Size of direct block on disk */
unsigned cache_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting indirect block */
@@ -245,7 +245,7 @@ H5HF__man_dblock_destroy(H5HF_hdr_t *hdr, H5HF_direct_t *dblock, haddr_t dblock_
/* Reset the parent_removed flag */
if (parent_removed)
- *parent_removed = FALSE;
+ *parent_removed = false;
/* Check for root direct block */
if (hdr->man_dtable.curr_root_rows == 0) {
@@ -281,7 +281,7 @@ H5HF__man_dblock_destroy(H5HF_hdr_t *hdr, H5HF_direct_t *dblock, haddr_t dblock_
* indirect block will be removed when this direct block is detached
*/
if (parent_removed && 1 == dblock->parent->nchildren)
- *parent_removed = TRUE;
+ *parent_removed = true;
if (H5HF__man_iblock_detach(dblock->parent, dblock->par_entry) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTATTACH, FAIL, "can't detach from parent indirect block");
@@ -466,7 +466,7 @@ H5HF__man_dblock_protect(H5HF_hdr_t *hdr, haddr_t dblock_addr, size_t dblock_siz
} /* end else */
/* Reset compression context info */
- udata.decompressed = FALSE;
+ udata.decompressed = false;
udata.dblk = NULL;
/* Protect the direct block */
@@ -492,11 +492,11 @@ H5HF__man_dblock_protect(H5HF_hdr_t *hdr, haddr_t dblock_addr, size_t dblock_siz
*/
herr_t
H5HF__man_dblock_locate(H5HF_hdr_t *hdr, hsize_t obj_off, H5HF_indirect_t **ret_iblock, unsigned *ret_entry,
- hbool_t *ret_did_protect, unsigned flags)
+ bool *ret_did_protect, unsigned flags)
{
haddr_t iblock_addr; /* Indirect block's address */
H5HF_indirect_t *iblock; /* Pointer to indirect block */
- hbool_t did_protect; /* Whether we protected the indirect block or not */
+ bool did_protect; /* Whether we protected the indirect block or not */
unsigned row, col; /* Row & column for object's block */
unsigned entry; /* Entry of block */
herr_t ret_value = SUCCEED; /* Return value */
@@ -523,13 +523,13 @@ H5HF__man_dblock_locate(H5HF_hdr_t *hdr, hsize_t obj_off, H5HF_indirect_t **ret_
/* Lock root indirect block */
if (NULL == (iblock = H5HF__man_iblock_protect(hdr, iblock_addr, hdr->man_dtable.curr_root_rows, NULL, 0,
- FALSE, flags, &did_protect)))
+ false, flags, &did_protect)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block");
/* Check for indirect block row */
while (row >= hdr->man_dtable.max_direct_rows) {
H5HF_indirect_t *new_iblock; /* Pointer to new indirect block */
- hbool_t new_did_protect; /* Whether we protected the indirect block or not */
+ bool new_did_protect; /* Whether we protected the indirect block or not */
unsigned nrows; /* Number of rows in new indirect block */
unsigned cache_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting parent indirect block */
@@ -553,7 +553,7 @@ H5HF__man_dblock_locate(H5HF_hdr_t *hdr, hsize_t obj_off, H5HF_indirect_t **ret_
} /* end if */
/* Lock child indirect block */
- if (NULL == (new_iblock = H5HF__man_iblock_protect(hdr, iblock_addr, nrows, iblock, entry, FALSE,
+ if (NULL == (new_iblock = H5HF__man_iblock_protect(hdr, iblock_addr, nrows, iblock, entry, false,
flags, &new_did_protect)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block");
diff --git a/src/H5HFhdr.c b/src/H5HFhdr.c
index d74d3a3a16f..da9d014b4bc 100644
--- a/src/H5HFhdr.c
+++ b/src/H5HFhdr.c
@@ -375,7 +375,7 @@ H5HF__hdr_create(H5F_t *f, const H5HF_create_t *cparam)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF, "I/O filters can't operate on this heap");
/* Mark the filters as checked */
- hdr->checked_filters = TRUE;
+ hdr->checked_filters = true;
/* Make the "set local" filter callbacks for this dataset */
if (H5Z_set_local_direct(&(cparam->pline)) < 0)
@@ -390,7 +390,7 @@ H5HF__hdr_create(H5F_t *f, const H5HF_create_t *cparam)
HGOTO_ERROR(H5E_HEAP, H5E_CANTSET, HADDR_UNDEF, "can't set version of I/O filter pipeline");
/* Compute the I/O filters' encoded size */
- if (0 == (hdr->filter_len = (unsigned)H5O_msg_raw_size(hdr->f, H5O_PLINE_ID, FALSE, &(hdr->pline))))
+ if (0 == (hdr->filter_len = (unsigned)H5O_msg_raw_size(hdr->f, H5O_PLINE_ID, false, &(hdr->pline))))
HGOTO_ERROR(H5E_HEAP, H5E_CANTGETSIZE, HADDR_UNDEF, "can't get I/O filter pipeline size");
/* Compute size of header on disk */
@@ -404,7 +404,7 @@ H5HF__hdr_create(H5F_t *f, const H5HF_create_t *cparam)
hdr->heap_size = H5HF_HEADER_SIZE(hdr);
/* Mark filters as checked, for performance reasons */
- hdr->checked_filters = TRUE;
+ hdr->checked_filters = true;
} /* end else */
/* Set the length of IDs in the heap */
@@ -903,7 +903,7 @@ H5HF__hdr_update_iter(H5HF_hdr_t *hdr, size_t min_dblock_size)
} /* end if */
else {
H5HF_indirect_t *iblock; /* Pointer to indirect block */
- hbool_t walked_up, walked_down; /* Condition variables for finding direct block location */
+ bool walked_up, walked_down; /* Condition variables for finding direct block location */
unsigned next_row; /* Iterator's next block row */
unsigned next_entry; /* Iterator's next block entry */
unsigned min_dblock_row; /* Minimum row for direct block size request */
@@ -946,7 +946,7 @@ H5HF__hdr_update_iter(H5HF_hdr_t *hdr, size_t min_dblock_size)
do {
/* Reset conditions for leaving loop */
- walked_up = walked_down = FALSE;
+ walked_up = walked_down = false;
/* Check for walking off end of indirect block */
/* (walk up iterator) */
@@ -973,7 +973,7 @@ H5HF__hdr_update_iter(H5HF_hdr_t *hdr, size_t min_dblock_size)
"unable to retrieve current block iterator location");
/* Indicate that we walked up */
- walked_up = TRUE;
+ walked_up = true;
} /* end while */
/* Check for walking into child indirect block */
@@ -1010,7 +1010,7 @@ H5HF__hdr_update_iter(H5HF_hdr_t *hdr, size_t min_dblock_size)
} /* end if */
else {
H5HF_indirect_t *new_iblock; /* Pointer to new indirect block */
- hbool_t did_protect; /* Whether we protected the indirect block or not */
+ bool did_protect; /* Whether we protected the indirect block or not */
haddr_t new_iblock_addr; /* New indirect block's address */
/* Allocate new indirect block */
@@ -1021,7 +1021,7 @@ H5HF__hdr_update_iter(H5HF_hdr_t *hdr, size_t min_dblock_size)
/* Lock new indirect block */
if (NULL == (new_iblock = H5HF__man_iblock_protect(hdr, new_iblock_addr, child_nrows,
- iblock, next_entry, FALSE,
+ iblock, next_entry, false,
H5AC__NO_FLAGS_SET, &did_protect)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL,
"unable to protect fractal heap indirect block");
@@ -1056,7 +1056,7 @@ H5HF__hdr_update_iter(H5HF_hdr_t *hdr, size_t min_dblock_size)
"unable to retrieve current block iterator location");
/* Indicate that we walked down */
- walked_down = TRUE;
+ walked_down = true;
} /* end if */
} while (walked_down || walked_up);
} /* end else */
@@ -1114,8 +1114,8 @@ H5HF__hdr_reverse_iter(H5HF_hdr_t *hdr, haddr_t dblock_addr)
{
H5HF_indirect_t *iblock; /* Indirect block where iterator is located */
unsigned curr_entry; /* Current entry for iterator */
- hbool_t walked_down; /* Loop flag */
- hbool_t walked_up; /* Loop flag */
+ bool walked_down; /* Loop flag */
+ bool walked_up; /* Loop flag */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1145,8 +1145,8 @@ H5HF__hdr_reverse_iter(H5HF_hdr_t *hdr, haddr_t dblock_addr)
int tmp_entry; /* Temp. entry for iterator (use signed value to detect errors) */
/* Reset loop flags */
- walked_down = FALSE;
- walked_up = FALSE;
+ walked_down = false;
+ walked_up = false;
/* Walk backwards through entries, until we find one that has a child */
/* (Skip direct block that will be deleted, if we find it) */
@@ -1172,7 +1172,7 @@ H5HF__hdr_reverse_iter(H5HF_hdr_t *hdr, haddr_t dblock_addr)
curr_entry--;
/* Note that we walked up */
- walked_up = TRUE;
+ walked_up = true;
} /* end if */
else {
/* Reset iterator offset */
@@ -1207,7 +1207,7 @@ H5HF__hdr_reverse_iter(H5HF_hdr_t *hdr, haddr_t dblock_addr)
} /* end if */
else {
H5HF_indirect_t *child_iblock; /* Pointer to child indirect block */
- hbool_t did_protect; /* Whether we protected the indirect block or not */
+ bool did_protect; /* Whether we protected the indirect block or not */
unsigned child_nrows; /* # of rows in child block */
/* Compute # of rows in next child indirect block to use */
@@ -1216,7 +1216,7 @@ H5HF__hdr_reverse_iter(H5HF_hdr_t *hdr, haddr_t dblock_addr)
/* Lock child indirect block */
if (NULL == (child_iblock = H5HF__man_iblock_protect(hdr, iblock->ents[curr_entry].addr,
- child_nrows, iblock, curr_entry, FALSE,
+ child_nrows, iblock, curr_entry, false,
H5AC__NO_FLAGS_SET, &did_protect)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL,
"unable to protect fractal heap indirect block");
@@ -1240,7 +1240,7 @@ H5HF__hdr_reverse_iter(H5HF_hdr_t *hdr, haddr_t dblock_addr)
"unable to release fractal heap indirect block");
/* Note that we walked down */
- walked_down = TRUE;
+ walked_down = true;
} /* end else */
} /* end else */
} while (walked_down || walked_up);
diff --git a/src/H5HFhuge.c b/src/H5HFhuge.c
index ddf56840b60..b1778587e9d 100644
--- a/src/H5HFhuge.c
+++ b/src/H5HFhuge.c
@@ -60,7 +60,7 @@ static herr_t H5HF__huge_bt2_create(H5HF_hdr_t *hdr);
/* Local 'huge' object support routines */
static hsize_t H5HF__huge_new_id(H5HF_hdr_t *hdr);
-static herr_t H5HF__huge_op_real(H5HF_hdr_t *hdr, const uint8_t *id, hbool_t is_read, H5HF_operator_t op,
+static herr_t H5HF__huge_op_real(H5HF_hdr_t *hdr, const uint8_t *id, bool is_read, H5HF_operator_t op,
void *op_data);
/*********************/
@@ -182,26 +182,26 @@ H5HF__huge_init(H5HF_hdr_t *hdr)
if (hdr->filter_len > 0) {
if ((hdr->id_len - 1) >= (unsigned)(hdr->sizeof_addr + hdr->sizeof_size + 4 + hdr->sizeof_size)) {
/* Indicate that v2 B-tree doesn't have to be used to locate object */
- hdr->huge_ids_direct = TRUE;
+ hdr->huge_ids_direct = true;
/* Set the size of 'huge' object IDs */
hdr->huge_id_size = (uint8_t)(hdr->sizeof_addr + hdr->sizeof_size + hdr->sizeof_size);
} /* end if */
else
/* Indicate that v2 B-tree must be used to access object */
- hdr->huge_ids_direct = FALSE;
+ hdr->huge_ids_direct = false;
} /* end if */
else {
if ((hdr->sizeof_addr + hdr->sizeof_size) <= (hdr->id_len - 1)) {
/* Indicate that v2 B-tree doesn't have to be used to locate object */
- hdr->huge_ids_direct = TRUE;
+ hdr->huge_ids_direct = true;
/* Set the size of 'huge' object IDs */
hdr->huge_id_size = (uint8_t)(hdr->sizeof_addr + hdr->sizeof_size);
} /* end if */
else
/* Indicate that v2 B-tree must be used to locate object */
- hdr->huge_ids_direct = FALSE;
+ hdr->huge_ids_direct = false;
} /* end else */
if (!hdr->huge_ids_direct) {
/* Set the size and maximum value of 'huge' object ID */
@@ -253,7 +253,7 @@ H5HF__huge_new_id(H5HF_hdr_t *hdr)
/* Check for wrapping 'huge' object IDs around */
if (hdr->huge_next_id == hdr->huge_max_id)
- hdr->huge_ids_wrapped = TRUE;
+ hdr->huge_ids_wrapped = true;
} /* end else */
/* Set return value */
@@ -492,7 +492,7 @@ H5HF__huge_get_obj_len(H5HF_hdr_t *hdr, const uint8_t *id, size_t *obj_len_p)
} /* end else */
} /* end if */
else {
- hbool_t found = FALSE; /* Whether entry was found */
+ bool found = false; /* Whether entry was found */
/* Check if v2 B-tree is open yet */
if (NULL == hdr->huge_bt2) {
@@ -575,7 +575,7 @@ H5HF__huge_get_obj_off(H5HF_hdr_t *hdr, const uint8_t *id, hsize_t *obj_off_p)
H5F_addr_decode(hdr->f, &id, &obj_addr);
} /* end if */
else {
- hbool_t found = FALSE; /* Whether entry was found */
+ bool found = false; /* Whether entry was found */
/* Sanity check */
assert(H5_addr_defined(hdr->huge_bt2_addr));
@@ -640,7 +640,7 @@ H5HF__huge_get_obj_off(H5HF_hdr_t *hdr, const uint8_t *id, hsize_t *obj_off_p)
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF__huge_op_real(H5HF_hdr_t *hdr, const uint8_t *id, hbool_t is_read, H5HF_operator_t op, void *op_data)
+H5HF__huge_op_real(H5HF_hdr_t *hdr, const uint8_t *id, bool is_read, H5HF_operator_t op, void *op_data)
{
void *read_buf = NULL; /* Pointer to buffer for reading */
haddr_t obj_addr; /* Object's address in the file */
@@ -671,7 +671,7 @@ H5HF__huge_op_real(H5HF_hdr_t *hdr, const uint8_t *id, hbool_t is_read, H5HF_ope
UINT32DECODE(id, filter_mask);
} /* end if */
else {
- hbool_t found = FALSE; /* Whether entry was found */
+ bool found = false; /* Whether entry was found */
/* Sanity check */
assert(H5_addr_defined(hdr->huge_bt2_addr));
@@ -823,7 +823,7 @@ H5HF__huge_write(H5HF_hdr_t *hdr, const uint8_t *id, const void *obj)
else {
H5HF_huge_bt2_indir_rec_t found_rec; /* Record found from tracking object */
H5HF_huge_bt2_indir_rec_t search_rec; /* Record for searching for object */
- hbool_t found = FALSE; /* Whether entry was found */
+ bool found = false; /* Whether entry was found */
/* Sanity check */
assert(H5_addr_defined(hdr->huge_bt2_addr));
@@ -883,7 +883,7 @@ H5HF__huge_read(H5HF_hdr_t *hdr, const uint8_t *id, void *obj)
assert(obj);
/* Call the internal 'op' routine */
- if (H5HF__huge_op_real(hdr, id, TRUE, NULL, obj) < 0)
+ if (H5HF__huge_op_real(hdr, id, true, NULL, obj) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "unable to operate on heap object");
done:
@@ -914,7 +914,7 @@ H5HF__huge_op(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op, void *op_d
assert(op);
/* Call the internal 'op' routine routine */
- if (H5HF__huge_op_real(hdr, id, FALSE, op, op_data) < 0)
+ if (H5HF__huge_op_real(hdr, id, false, op, op_data) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "unable to operate on heap object");
done:
@@ -1072,7 +1072,7 @@ H5HF__huge_term(H5HF_hdr_t *hdr)
/* Reset the information about 'huge' objects in the file */
hdr->huge_bt2_addr = HADDR_UNDEF;
hdr->huge_next_id = 0;
- hdr->huge_ids_wrapped = FALSE;
+ hdr->huge_ids_wrapped = false;
/* Mark heap header as modified */
if (H5HF__hdr_dirty(hdr) < 0)
diff --git a/src/H5HFiblock.c b/src/H5HFiblock.c
index db9901f6db3..6c273a838e0 100644
--- a/src/H5HFiblock.c
+++ b/src/H5HFiblock.c
@@ -319,8 +319,8 @@ H5HF__man_iblock_root_create(H5HF_hdr_t *hdr, size_t min_dblock_size)
H5HF_indirect_t *iblock; /* Pointer to indirect block */
haddr_t iblock_addr; /* Indirect block's address */
hsize_t acc_dblock_free; /* Accumulated free space in direct blocks */
- hbool_t have_direct_block; /* Flag to indicate a direct block already exists */
- hbool_t did_protect; /* Whether we protected the indirect block or not */
+ bool have_direct_block; /* Flag to indicate a direct block already exists */
+ bool did_protect; /* Whether we protected the indirect block or not */
unsigned nrows; /* Number of rows for root indirect block */
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
@@ -352,7 +352,7 @@ H5HF__man_iblock_root_create(H5HF_hdr_t *hdr, size_t min_dblock_size)
/* Move current direct block (used as root) into new indirect block */
/* Lock new indirect block */
- if (NULL == (iblock = H5HF__man_iblock_protect(hdr, iblock_addr, nrows, NULL, 0, FALSE,
+ if (NULL == (iblock = H5HF__man_iblock_protect(hdr, iblock_addr, nrows, NULL, 0, false,
H5AC__NO_FLAGS_SET, &did_protect)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block");
@@ -474,7 +474,7 @@ H5HF__man_iblock_root_double(H5HF_hdr_t *hdr, size_t min_dblock_size)
unsigned min_nrows = 0; /* Min. # of direct rows */
unsigned old_nrows; /* Old # of rows */
unsigned new_nrows; /* New # of rows */
- hbool_t skip_direct_rows = FALSE; /* Whether we are skipping direct rows */
+ bool skip_direct_rows = false; /* Whether we are skipping direct rows */
size_t u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
@@ -498,7 +498,7 @@ H5HF__man_iblock_root_double(H5HF_hdr_t *hdr, size_t min_dblock_size)
assert(min_dblock_size > hdr->man_dtable.cparam.start_block_size);
/* Set flag */
- skip_direct_rows = TRUE;
+ skip_direct_rows = true;
/* Make certain we allocate at least the required row for the block requested */
min_nrows = 1 + H5HF__dtable_size_to_row(&hdr->man_dtable, min_dblock_size);
@@ -869,7 +869,7 @@ H5HF__man_iblock_alloc_row(H5HF_hdr_t *hdr, H5HF_free_section_t **sec_node)
H5HF_indirect_t *iblock = NULL; /* Pointer to indirect block */
H5HF_free_section_t *old_sec_node = *sec_node; /* Pointer to old indirect section node */
unsigned dblock_entry; /* Entry for direct block */
- hbool_t iblock_held = FALSE; /* Flag to indicate that indirect block is held */
+ bool iblock_held = false; /* Flag to indicate that indirect block is held */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -885,7 +885,7 @@ H5HF__man_iblock_alloc_row(H5HF_hdr_t *hdr, H5HF_free_section_t **sec_node)
* section under it. */
if (old_sec_node->sect_info.state == H5FS_SECT_SERIALIZED ||
(H5FS_SECT_SERIALIZED == old_sec_node->u.row.under->sect_info.state) ||
- (TRUE == old_sec_node->u.row.under->u.indirect.u.iblock->removed_from_cache))
+ (true == old_sec_node->u.row.under->u.indirect.u.iblock->removed_from_cache))
/* Revive row and / or indirect section */
if (H5HF__sect_row_revive(hdr, old_sec_node) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTREVIVE, FAIL, "can't revive indirect section");
@@ -897,7 +897,7 @@ H5HF__man_iblock_alloc_row(H5HF_hdr_t *hdr, H5HF_free_section_t **sec_node)
/* Hold indirect block in memory, until direct block can point to it */
if (H5HF__iblock_incr(iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on shared indirect block");
- iblock_held = TRUE;
+ iblock_held = true;
/* Reduce (& possibly re-add) 'row' section */
if (H5HF__sect_row_reduce(hdr, old_sec_node, &dblock_entry) < 0)
@@ -962,7 +962,7 @@ H5HF__man_iblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock, unsigned p
iblock->rc = 0;
iblock->nrows = nrows;
iblock->max_rows = max_rows;
- iblock->removed_from_cache = FALSE;
+ iblock->removed_from_cache = false;
/* Compute size of buffer needed for indirect block */
iblock->size = H5HF_MAN_INDIRECT_SIZE(hdr, iblock->nrows);
@@ -1073,12 +1073,12 @@ H5HF__man_iblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock, unsigned p
*/
H5HF_indirect_t *
H5HF__man_iblock_protect(H5HF_hdr_t *hdr, haddr_t iblock_addr, unsigned iblock_nrows,
- H5HF_indirect_t *par_iblock, unsigned par_entry, hbool_t must_protect,
- unsigned flags, hbool_t *did_protect)
+ H5HF_indirect_t *par_iblock, unsigned par_entry, bool must_protect, unsigned flags,
+ bool *did_protect)
{
H5HF_parent_t par_info; /* Parent info for loading block */
H5HF_indirect_t *iblock = NULL; /* Indirect block from cache */
- hbool_t should_protect = FALSE; /* Whether we should protect the indirect block or not */
+ bool should_protect = false; /* Whether we should protect the indirect block or not */
H5HF_indirect_t *ret_value = NULL; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1111,7 +1111,7 @@ H5HF__man_iblock_protect(H5HF_hdr_t *hdr, haddr_t iblock_addr, unsigned iblock_n
if (par_iblock->child_iblocks[indir_idx])
iblock = par_iblock->child_iblocks[indir_idx];
else
- should_protect = TRUE;
+ should_protect = true;
} /* end if */
else {
/* Check for root indirect block */
@@ -1128,11 +1128,11 @@ H5HF__man_iblock_protect(H5HF_hdr_t *hdr, haddr_t iblock_addr, unsigned iblock_n
/* Sanity check */
assert(NULL == hdr->root_iblock);
- should_protect = TRUE;
+ should_protect = true;
} /* end else */
} /* end if */
else
- should_protect = TRUE;
+ should_protect = true;
} /* end else */
} /* end if */
@@ -1174,11 +1174,11 @@ H5HF__man_iblock_protect(H5HF_hdr_t *hdr, haddr_t iblock_addr, unsigned iblock_n
} /* end if */
/* Indicate that the indirect block was protected */
- *did_protect = TRUE;
+ *did_protect = true;
} /* end if */
else
/* Indicate that the indirect block was _not_ protected */
- *did_protect = FALSE;
+ *did_protect = false;
/* Set the return value */
ret_value = iblock;
@@ -1197,7 +1197,7 @@ H5HF__man_iblock_protect(H5HF_hdr_t *hdr, haddr_t iblock_addr, unsigned iblock_n
*-------------------------------------------------------------------------
*/
herr_t
-H5HF__man_iblock_unprotect(H5HF_indirect_t *iblock, unsigned cache_flags, hbool_t did_protect)
+H5HF__man_iblock_unprotect(H5HF_indirect_t *iblock, unsigned cache_flags, bool did_protect)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -1412,7 +1412,7 @@ H5HF__man_iblock_detach(H5HF_indirect_t *iblock, unsigned entry)
/* Check for last child being removed from indirect block */
if (iblock->nchildren == 0) {
- hbool_t did_protect = FALSE; /* Whether the indirect block was protected */
+ bool did_protect = false; /* Whether the indirect block was protected */
/* If this indirect block's refcount is >1, then it's being deleted
* from the fractal heap (since its nchildren == 0), but is still
@@ -1426,10 +1426,10 @@ H5HF__man_iblock_detach(H5HF_indirect_t *iblock, unsigned entry)
*/
/* Lock indirect block for deletion */
if (NULL == (del_iblock = H5HF__man_iblock_protect(hdr, iblock->addr, iblock->nrows,
- iblock->parent, iblock->par_entry, TRUE,
+ iblock->parent, iblock->par_entry, true,
H5AC__NO_FLAGS_SET, &did_protect)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block");
- assert(did_protect == TRUE);
+ assert(did_protect == true);
/* Check for deleting root indirect block (and no root direct block) */
if (iblock->block_off == 0 && hdr->man_dtable.curr_root_rows > 0)
@@ -1465,7 +1465,7 @@ H5HF__man_iblock_detach(H5HF_indirect_t *iblock, unsigned entry)
/* Delete indirect block from cache, if appropriate */
if (del_iblock) {
unsigned cache_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotect */
- hbool_t took_ownership = FALSE; /* Flag to indicate that block ownership has transitioned */
+ bool took_ownership = false; /* Flag to indicate that block ownership has transitioned */
/* If the refcount is still >0, unpin the block and take ownership
* from the cache, otherwise let the cache destroy it.
@@ -1473,7 +1473,7 @@ H5HF__man_iblock_detach(H5HF_indirect_t *iblock, unsigned entry)
if (del_iblock->rc > 0) {
cache_flags |= (H5AC__DELETED_FLAG | H5AC__TAKE_OWNERSHIP_FLAG);
cache_flags |= H5AC__UNPIN_ENTRY_FLAG;
- took_ownership = TRUE;
+ took_ownership = true;
} /* end if */
else {
/* Entry should be removed from the cache */
@@ -1487,7 +1487,7 @@ H5HF__man_iblock_detach(H5HF_indirect_t *iblock, unsigned entry)
} /* end else */
/* Unprotect the indirect block, with appropriate flags */
- if (H5HF__man_iblock_unprotect(del_iblock, cache_flags, TRUE) < 0)
+ if (H5HF__man_iblock_unprotect(del_iblock, cache_flags, true) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block");
/* if took ownership, free file space & mark block as removed from cache */
@@ -1501,7 +1501,7 @@ H5HF__man_iblock_detach(H5HF_indirect_t *iblock, unsigned entry)
del_iblock->addr = HADDR_UNDEF;
/* Mark block as removed from the cache */
- del_iblock->removed_from_cache = TRUE;
+ del_iblock->removed_from_cache = true;
} /* end if */
} /* end if */
@@ -1556,7 +1556,7 @@ H5HF__man_iblock_delete(H5HF_hdr_t *hdr, haddr_t iblock_addr, unsigned iblock_nr
unsigned row, col; /* Current row & column in indirect block */
unsigned entry; /* Current entry in row */
unsigned cache_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting indirect block */
- hbool_t did_protect; /* Whether we protected the indirect block or not */
+ bool did_protect; /* Whether we protected the indirect block or not */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1570,10 +1570,10 @@ H5HF__man_iblock_delete(H5HF_hdr_t *hdr, haddr_t iblock_addr, unsigned iblock_nr
/* Lock indirect block */
if (NULL == (iblock = H5HF__man_iblock_protect(hdr, iblock_addr, iblock_nrows, par_iblock, par_entry,
- TRUE, H5AC__NO_FLAGS_SET, &did_protect)))
+ true, H5AC__NO_FLAGS_SET, &did_protect)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block");
assert(iblock->nchildren > 0);
- assert(did_protect == TRUE);
+ assert(did_protect == true);
/* Iterate over rows in this indirect block */
entry = 0;
@@ -1663,7 +1663,7 @@ H5HF__man_iblock_size(H5F_t *f, H5HF_hdr_t *hdr, haddr_t iblock_addr, unsigned n
H5HF_indirect_t *par_iblock, unsigned par_entry, hsize_t *heap_size)
{
H5HF_indirect_t *iblock = NULL; /* Pointer to indirect block */
- hbool_t did_protect; /* Whether we protected the indirect block or not */
+ bool did_protect; /* Whether we protected the indirect block or not */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1677,7 +1677,7 @@ H5HF__man_iblock_size(H5F_t *f, H5HF_hdr_t *hdr, haddr_t iblock_addr, unsigned n
assert(heap_size);
/* Protect the indirect block */
- if (NULL == (iblock = H5HF__man_iblock_protect(hdr, iblock_addr, nrows, par_iblock, par_entry, FALSE,
+ if (NULL == (iblock = H5HF__man_iblock_protect(hdr, iblock_addr, nrows, par_iblock, par_entry, false,
H5AC__READ_ONLY_FLAG, &did_protect)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load fractal heap indirect block");
diff --git a/src/H5HFiter.c b/src/H5HFiter.c
index 9d87cc6f187..8a347e71787 100644
--- a/src/H5HFiter.c
+++ b/src/H5HFiter.c
@@ -112,7 +112,7 @@ H5HF__man_iter_start_offset(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, hsize_t o
hsize_t curr_offset; /* Current offset, as adjusted */
unsigned row; /* Current row we are on */
unsigned col; /* Column in row */
- hbool_t root_block = TRUE; /* Flag to indicate the current block is the root indirect block */
+ bool root_block = true; /* Flag to indicate the current block is the root indirect block */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -145,7 +145,7 @@ H5HF__man_iter_start_offset(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, hsize_t o
*/
do {
- hbool_t did_protect; /* Whether we protected the indirect block or not */
+ bool did_protect; /* Whether we protected the indirect block or not */
/* Walk down the rows in the doubling table until we've found the correct row for the next block */
for (row = 0; row < hdr->man_dtable.max_root_rows; row++)
@@ -177,7 +177,7 @@ H5HF__man_iter_start_offset(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, hsize_t o
biter->curr->up = NULL;
/* Next time through the loop will not be with the root indirect block */
- root_block = FALSE;
+ root_block = false;
} /* end if */
else {
hsize_t child_size; /* Size of new indirect block to create */
@@ -197,7 +197,7 @@ H5HF__man_iter_start_offset(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, hsize_t o
/* Load indirect block for this context location */
if (NULL ==
(iblock = H5HF__man_iblock_protect(hdr, iblock_addr, iblock_nrows, iblock_parent,
- iblock_par_entry, FALSE, H5AC__NO_FLAGS_SET, &did_protect)))
+ iblock_par_entry, false, H5AC__NO_FLAGS_SET, &did_protect)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block");
/* Make indirect block the context for the current location */
@@ -241,7 +241,7 @@ H5HF__man_iter_start_offset(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, hsize_t o
} while (1); /* Breaks out in middle */
/* Set flag to indicate block iterator finished initializing */
- biter->ready = TRUE;
+ biter->ready = true;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -321,7 +321,7 @@ H5HF__man_iter_start_entry(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, H5HF_indir
biter->curr = new_loc;
/* Set flag to indicate block iterator finished initializing */
- biter->ready = TRUE;
+ biter->ready = true;
done:
if (ret_value < 0 && new_loc)
@@ -381,7 +381,7 @@ H5HF__man_iter_reset(H5HF_block_iter_t *biter)
} /* end if */
/* Reset block iterator flags */
- biter->ready = FALSE;
+ biter->ready = false;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -555,7 +555,7 @@ H5HF__man_iter_curr(H5HF_block_iter_t *biter, unsigned *row, unsigned *col, unsi
*
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
H5HF__man_iter_ready(H5HF_block_iter_t *biter)
{
FUNC_ENTER_PACKAGE_NOERR
diff --git a/src/H5HFman.c b/src/H5HFman.c
index d5075c0317f..b15960aff62 100644
--- a/src/H5HFman.c
+++ b/src/H5HFman.c
@@ -48,7 +48,7 @@
if (H5Z_can_apply_direct(&((HDR)->pline)) < 0) \
HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "I/O filters can't operate on this heap"); \
\
- (HDR)->checked_filters = TRUE; \
+ (HDR)->checked_filters = true; \
} /* end if */ \
}
@@ -345,7 +345,7 @@ H5HF__man_op_real(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op, void *
} /* end if */
else {
H5HF_indirect_t *iblock; /* Pointer to indirect block */
- hbool_t did_protect; /* Whether we protected the indirect block or not */
+ bool did_protect; /* Whether we protected the indirect block or not */
unsigned entry; /* Entry of block */
/* Look up indirect block containing direct block */
@@ -526,7 +526,7 @@ H5HF__man_remove(H5HF_hdr_t *hdr, const uint8_t *id)
{
H5HF_free_section_t *sec_node = NULL; /* Pointer to free space section for block */
H5HF_indirect_t *iblock = NULL; /* Pointer to indirect block */
- hbool_t did_protect = FALSE; /* Whether we protected the indirect block or not */
+ bool did_protect = false; /* Whether we protected the indirect block or not */
hsize_t obj_off; /* Object's offset in heap */
size_t obj_len; /* Object's length in heap */
size_t dblock_size; /* Direct block size */
diff --git a/src/H5HFpkg.h b/src/H5HFpkg.h
index e036cf0f4aa..ceef78f0c84 100644
--- a/src/H5HFpkg.h
+++ b/src/H5HFpkg.h
@@ -66,7 +66,7 @@
*/
#define H5HF_HEADER_SIZE(h) \
(/* General metadata fields */ \
- H5HF_METADATA_PREFIX_SIZE(TRUE) \
+ H5HF_METADATA_PREFIX_SIZE(true) \
\
/* Fractal Heap Header specific fields */ \
\
@@ -118,7 +118,7 @@
/* Size of managed indirect block */
#define H5HF_MAN_INDIRECT_SIZE(h, r) \
(/* General metadata fields */ \
- H5HF_METADATA_PREFIX_SIZE(TRUE) \
+ H5HF_METADATA_PREFIX_SIZE(true) \
\
/* Fractal heap managed, absolutely mapped indirect block specific fields */ \
+ (unsigned)(h)->sizeof_addr /* File address of heap owning the block */ \
@@ -234,7 +234,7 @@ typedef struct H5HF_block_loc_t {
/* Fractal heap block iterator info */
typedef struct H5HF_block_iter_t {
- hbool_t ready; /* Set if iterator is finished initializing */
+ bool ready; /* Set if iterator is finished initializing */
H5HF_block_loc_t *curr; /* Pointer to the current level information for iterator */
} H5HF_block_iter_t;
@@ -253,7 +253,7 @@ typedef struct H5HF_free_section_t {
unsigned num_entries; /* Number of entries covered */
/* Fields that aren't stored */
- hbool_t checked_out; /* Flag to indicate that a row section is temporarily out of the free space
+ bool checked_out; /* Flag to indicate that a row section is temporarily out of the free space
manager */
} row;
struct {
@@ -299,10 +299,10 @@ struct H5HF_hdr_t {
unsigned filter_len; /* Size of I/O filter information (in bytes) */
/* Flags for heap settings (stored in status byte in header) */
- hbool_t debug_objs; /* Is the heap storing objects in 'debug' format */
- hbool_t write_once; /* Is heap being written in "write once" mode? */
- hbool_t huge_ids_wrapped; /* Have "huge" object IDs wrapped around? */
- hbool_t checksum_dblocks; /* Should the direct blocks in the heap be checksummed? */
+ bool debug_objs; /* Is the heap storing objects in 'debug' format */
+ bool write_once; /* Is heap being written in "write once" mode? */
+ bool huge_ids_wrapped; /* Have "huge" object IDs wrapped around? */
+ bool checksum_dblocks; /* Should the direct blocks in the heap be checksummed? */
/* Doubling table information (partially stored in header) */
/* (Partially set by user, partially derived/updated internally) */
@@ -339,7 +339,7 @@ struct H5HF_hdr_t {
unsigned mode; /* Access mode for heap */
H5F_t *f; /* Pointer to file for heap */
size_t file_rc; /* Reference count of files using heap header */
- hbool_t pending_delete; /* Heap is pending deletion */
+ bool pending_delete; /* Heap is pending deletion */
uint8_t sizeof_size; /* Size of file sizes */
uint8_t sizeof_addr; /* Size of file addresses */
struct H5HF_indirect_t *root_iblock; /* Pointer to root indirect block */
@@ -349,14 +349,14 @@ struct H5HF_hdr_t {
H5B2_t *huge_bt2; /* v2 B-tree handle for huge objects */
hsize_t huge_max_id; /* Max. 'huge' heap ID before rolling 'huge' heap IDs over */
uint8_t huge_id_size; /* Size of 'huge' heap IDs (in bytes) */
- hbool_t huge_ids_direct; /* Flag to indicate that 'huge' object's offset & length are stored directly in
- heap ID */
- size_t tiny_max_len; /* Max. size of tiny objects for this heap */
- hbool_t tiny_len_extended; /* Flag to indicate that 'tiny' object's length is stored in extended form
- (i.e. w/extra byte) */
- uint8_t heap_off_size; /* Size of heap offsets (in bytes) */
- uint8_t heap_len_size; /* Size of heap ID lengths (in bytes) */
- hbool_t checked_filters; /* TRUE if pipeline passes can_apply checks */
+ bool huge_ids_direct; /* Flag to indicate that 'huge' object's offset & length are stored directly in
+ heap ID */
+ size_t tiny_max_len; /* Max. size of tiny objects for this heap */
+ bool tiny_len_extended; /* Flag to indicate that 'tiny' object's length is stored in extended form
+ (i.e. w/extra byte) */
+ uint8_t heap_off_size; /* Size of heap offsets (in bytes) */
+ uint8_t heap_len_size; /* Size of heap ID lengths (in bytes) */
+ bool checked_filters; /* true if pipeline passes can_apply checks */
};
/* Common indirect block doubling table entry */
@@ -395,7 +395,7 @@ struct H5HF_indirect_t {
unsigned nchildren; /* Number of child blocks */
unsigned max_child; /* Max. offset used in child entries */
struct H5HF_indirect_t **child_iblocks; /* Array of pointers to pinned child indirect blocks */
- hbool_t removed_from_cache; /* Flag that indicates the block has */
+ bool removed_from_cache; /* Flag that indicates the block has */
/* been removed from the metadata cache, but */
/* is still 'live' due to a refcount (rc) > 0 */
/* (usually from free space sections) */
@@ -649,8 +649,8 @@ H5_DLL herr_t H5HF__man_iblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblo
unsigned nrows, unsigned max_rows, haddr_t *addr_p);
H5_DLL H5HF_indirect_t *H5HF__man_iblock_protect(H5HF_hdr_t *hdr, haddr_t iblock_addr, unsigned iblock_nrows,
H5HF_indirect_t *par_iblock, unsigned par_entry,
- hbool_t must_protect, unsigned flags, hbool_t *did_protect);
-H5_DLL herr_t H5HF__man_iblock_unprotect(H5HF_indirect_t *iblock, unsigned cache_flags, hbool_t did_protect);
+ bool must_protect, unsigned flags, bool *did_protect);
+H5_DLL herr_t H5HF__man_iblock_unprotect(H5HF_indirect_t *iblock, unsigned cache_flags, bool did_protect);
H5_DLL herr_t H5HF__man_iblock_attach(H5HF_indirect_t *iblock, unsigned entry, haddr_t dblock_addr);
H5_DLL herr_t H5HF__man_iblock_detach(H5HF_indirect_t *iblock, unsigned entry);
H5_DLL herr_t H5HF__man_iblock_entry_addr(H5HF_indirect_t *iblock, unsigned entry, haddr_t *child_addr);
@@ -668,12 +668,12 @@ H5_DLL herr_t H5HF__man_dblock_new(H5HF_hdr_t *fh, size_t request, H5HF_free_sec
H5_DLL herr_t H5HF__man_dblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock, unsigned par_entry,
haddr_t *addr_p, H5HF_free_section_t **ret_sec_node);
H5_DLL herr_t H5HF__man_dblock_destroy(H5HF_hdr_t *hdr, H5HF_direct_t *dblock, haddr_t dblock_addr,
- hbool_t *parent_removed);
+ bool *parent_removed);
H5_DLL H5HF_direct_t *H5HF__man_dblock_protect(H5HF_hdr_t *hdr, haddr_t dblock_addr, size_t dblock_size,
H5HF_indirect_t *par_iblock, unsigned par_entry,
unsigned flags);
H5_DLL herr_t H5HF__man_dblock_locate(H5HF_hdr_t *hdr, hsize_t obj_off, H5HF_indirect_t **par_iblock,
- unsigned *par_entry, hbool_t *par_did_protect, unsigned flags);
+ unsigned *par_entry, bool *par_did_protect, unsigned flags);
H5_DLL herr_t H5HF__man_dblock_delete(H5F_t *f, haddr_t dblock_addr, hsize_t dblock_size);
H5_DLL herr_t H5HF__man_dblock_dest(H5HF_direct_t *dblock);
@@ -716,21 +716,21 @@ H5_DLL herr_t H5HF__tiny_op(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t
H5_DLL herr_t H5HF__tiny_remove(H5HF_hdr_t *fh, const uint8_t *id);
/* Block iteration routines */
-H5_DLL herr_t H5HF__man_iter_init(H5HF_block_iter_t *biter);
-H5_DLL herr_t H5HF__man_iter_start_offset(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, hsize_t offset);
-H5_DLL herr_t H5HF__man_iter_start_entry(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, H5HF_indirect_t *iblock,
- unsigned start_entry);
-H5_DLL herr_t H5HF__man_iter_set_entry(const H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, unsigned entry);
-H5_DLL herr_t H5HF__man_iter_next(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, unsigned nentries);
-H5_DLL herr_t H5HF__man_iter_up(H5HF_block_iter_t *biter);
-H5_DLL herr_t H5HF__man_iter_down(H5HF_block_iter_t *biter, H5HF_indirect_t *iblock);
-H5_DLL herr_t H5HF__man_iter_reset(H5HF_block_iter_t *biter);
-H5_DLL herr_t H5HF__man_iter_curr(H5HF_block_iter_t *biter, unsigned *row, unsigned *col, unsigned *entry,
- H5HF_indirect_t **block);
-H5_DLL hbool_t H5HF__man_iter_ready(H5HF_block_iter_t *biter);
+H5_DLL herr_t H5HF__man_iter_init(H5HF_block_iter_t *biter);
+H5_DLL herr_t H5HF__man_iter_start_offset(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, hsize_t offset);
+H5_DLL herr_t H5HF__man_iter_start_entry(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, H5HF_indirect_t *iblock,
+ unsigned start_entry);
+H5_DLL herr_t H5HF__man_iter_set_entry(const H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, unsigned entry);
+H5_DLL herr_t H5HF__man_iter_next(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, unsigned nentries);
+H5_DLL herr_t H5HF__man_iter_up(H5HF_block_iter_t *biter);
+H5_DLL herr_t H5HF__man_iter_down(H5HF_block_iter_t *biter, H5HF_indirect_t *iblock);
+H5_DLL herr_t H5HF__man_iter_reset(H5HF_block_iter_t *biter);
+H5_DLL herr_t H5HF__man_iter_curr(H5HF_block_iter_t *biter, unsigned *row, unsigned *col, unsigned *entry,
+ H5HF_indirect_t **block);
+H5_DLL bool H5HF__man_iter_ready(H5HF_block_iter_t *biter);
/* Free space manipulation routines */
-H5_DLL herr_t H5HF__space_start(H5HF_hdr_t *hdr, hbool_t may_create);
+H5_DLL herr_t H5HF__space_start(H5HF_hdr_t *hdr, bool may_create);
H5_DLL herr_t H5HF__space_add(H5HF_hdr_t *hdr, H5HF_free_section_t *node, unsigned flags);
H5_DLL htri_t H5HF__space_find(H5HF_hdr_t *hdr, hsize_t request, H5HF_free_section_t **node);
H5_DLL herr_t H5HF__space_revert_root(const H5HF_hdr_t *hdr);
@@ -771,8 +771,8 @@ H5_DLL hsize_t H5HF_get_dblock_size_test(const H5HF_t *fh, unsigned row);
H5_DLL hsize_t H5HF_get_dblock_free_test(const H5HF_t *fh, unsigned row);
H5_DLL herr_t H5HF_get_id_off_test(const H5HF_t *fh, const void *id, hsize_t *obj_off);
H5_DLL herr_t H5HF_get_id_type_test(const void *id, unsigned char *obj_type);
-H5_DLL herr_t H5HF_get_tiny_info_test(const H5HF_t *fh, size_t *max_len, hbool_t *len_extended);
-H5_DLL herr_t H5HF_get_huge_info_test(const H5HF_t *fh, hsize_t *next_id, hbool_t *ids_direct);
+H5_DLL herr_t H5HF_get_tiny_info_test(const H5HF_t *fh, size_t *max_len, bool *len_extended);
+H5_DLL herr_t H5HF_get_huge_info_test(const H5HF_t *fh, hsize_t *next_id, bool *ids_direct);
#endif /* H5HF_TESTING */
#endif /* H5HFpkg_H */
diff --git a/src/H5HFprivate.h b/src/H5HFprivate.h
index f047b45dc0c..ca7948aa2e6 100644
--- a/src/H5HFprivate.h
+++ b/src/H5HFprivate.h
@@ -55,7 +55,7 @@ typedef struct H5HF_dtable_cparam_t {
/* Fractal heap creation parameters */
typedef struct H5HF_create_t {
H5HF_dtable_cparam_t managed; /* Mapped object doubling-table creation parameters */
- hbool_t checksum_dblocks; /* Whether the direct blocks should be checksummed */
+ bool checksum_dblocks; /* Whether the direct blocks should be checksummed */
uint32_t max_man_size; /* Max. size of object to manage in doubling table */
/* (i.e. min. size of object to store standalone) */
uint16_t id_len; /* Length of IDs to use for heap objects */
@@ -108,7 +108,7 @@ H5_DLL herr_t H5HF_insert(H5HF_t *fh, size_t size, const void *obj, void *id /*
H5_DLL herr_t H5HF_get_obj_len(H5HF_t *fh, const void *id, size_t *obj_len_p /*out*/);
H5_DLL herr_t H5HF_get_obj_off(H5HF_t *fh, const void *_id, hsize_t *obj_off_p /*out*/);
H5_DLL herr_t H5HF_read(H5HF_t *fh, const void *id, void *obj /*out*/);
-H5_DLL herr_t H5HF_write(H5HF_t *fh, void *id, hbool_t *id_changed, const void *obj);
+H5_DLL herr_t H5HF_write(H5HF_t *fh, void *id, bool *id_changed, const void *obj);
H5_DLL herr_t H5HF_op(H5HF_t *fh, const void *id, H5HF_operator_t op, void *op_data);
H5_DLL herr_t H5HF_remove(H5HF_t *fh, const void *id);
H5_DLL herr_t H5HF_close(H5HF_t *fh);
@@ -125,13 +125,12 @@ H5_DLL herr_t H5HF_sects_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent,
#endif /* H5HF_DEBUGGING */
/* Debugging routines for dumping file structures */
-H5_DLL void H5HF_hdr_print(const H5HF_hdr_t *hdr, hbool_t dump_internal, FILE *stream, int indent,
- int fwidth);
+H5_DLL void H5HF_hdr_print(const H5HF_hdr_t *hdr, bool dump_internal, FILE *stream, int indent, int fwidth);
H5_DLL herr_t H5HF_hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth);
H5_DLL herr_t H5HF_dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
haddr_t hdr_addr, size_t nrec);
-H5_DLL void H5HF_iblock_print(const H5HF_indirect_t *iblock, hbool_t dump_internal, FILE *stream, int indent,
- int fwidth);
+H5_DLL void H5HF_iblock_print(const H5HF_indirect_t *iblock, bool dump_internal, FILE *stream, int indent,
+ int fwidth);
H5_DLL herr_t H5HF_iblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
haddr_t hdr_addr, unsigned nrows);
diff --git a/src/H5HFsection.c b/src/H5HFsection.c
index 0dd9f3faf49..8b279994ca8 100644
--- a/src/H5HFsection.c
+++ b/src/H5HFsection.c
@@ -66,7 +66,7 @@ static H5HF_free_section_t *H5FS__sect_node_new(unsigned sect_type, haddr_t sect
static herr_t H5HF__sect_node_free(H5HF_free_section_t *sect, H5HF_indirect_t *parent);
/* 'single' section routines */
-static herr_t H5HF__sect_single_locate_parent(H5HF_hdr_t *hdr, hbool_t refresh, H5HF_free_section_t *sect);
+static herr_t H5HF__sect_single_locate_parent(H5HF_hdr_t *hdr, bool refresh, H5HF_free_section_t *sect);
static herr_t H5HF__sect_single_full_dblock(H5HF_hdr_t *hdr, H5HF_free_section_t *sect);
/* 'single' section callbacks */
@@ -82,7 +82,7 @@ static herr_t H5HF__sect_single_shrink(H5FS_section_info_t **_sect, void *udata)
static herr_t H5HF__sect_single_valid(const H5FS_section_class_t *cls, const H5FS_section_info_t *sect);
/* 'row' section routines */
-static H5HF_free_section_t *H5HF__sect_row_create(haddr_t sect_off, hsize_t sect_size, hbool_t is_first,
+static H5HF_free_section_t *H5HF__sect_row_create(haddr_t sect_off, hsize_t sect_size, bool is_first,
unsigned row, unsigned col, unsigned nentries,
H5HF_free_section_t *under_sect);
static herr_t H5HF__sect_row_first(H5HF_hdr_t *hdr, H5HF_free_section_t *sect);
@@ -111,7 +111,7 @@ static herr_t H5HF__sect_row_debug(const H5FS_section_info_t *sect, FILE *stream
static H5HF_free_section_t *H5HF__sect_indirect_new(H5HF_hdr_t *hdr, haddr_t sect_off, hsize_t sect_size,
H5HF_indirect_t *iblock, hsize_t iblock_off, unsigned row,
unsigned col, unsigned nentries);
-static herr_t H5HF__sect_indirect_init_rows(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, hbool_t first_child,
+static herr_t H5HF__sect_indirect_init_rows(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, bool first_child,
H5HF_free_section_t **first_row_sect, unsigned space_flags,
unsigned start_row, unsigned start_col, unsigned end_row,
unsigned end_col);
@@ -122,10 +122,10 @@ static herr_t H5HF__sect_indirect_revive_row(H5HF_hdr_t *hdr, H5HF
static herr_t H5HF__sect_indirect_revive(H5HF_hdr_t *hdr, H5HF_free_section_t *sect,
H5HF_indirect_t *sect_iblock);
static herr_t H5HF__sect_indirect_reduce_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect,
- hbool_t *alloc_from_start);
-static herr_t H5HF__sect_indirect_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned child_entry);
-static herr_t H5HF__sect_indirect_first(H5HF_hdr_t *hdr, H5HF_free_section_t *sect);
-static hbool_t H5HF__sect_indirect_is_first(H5HF_free_section_t *sect);
+ bool *alloc_from_start);
+static herr_t H5HF__sect_indirect_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned child_entry);
+static herr_t H5HF__sect_indirect_first(H5HF_hdr_t *hdr, H5HF_free_section_t *sect);
+static bool H5HF__sect_indirect_is_first(H5HF_free_section_t *sect);
static H5HF_indirect_t *H5HF__sect_indirect_get_iblock(H5HF_free_section_t *sect);
static hsize_t H5HF__sect_indirect_iblock_off(const H5HF_free_section_t *sect);
static H5HF_free_section_t *H5HF__sect_indirect_top(H5HF_free_section_t *sect);
@@ -477,11 +477,11 @@ H5HF__sect_single_new(hsize_t sect_off, size_t sect_size, H5HF_indirect_t *paren
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF__sect_single_locate_parent(H5HF_hdr_t *hdr, hbool_t refresh, H5HF_free_section_t *sect)
+H5HF__sect_single_locate_parent(H5HF_hdr_t *hdr, bool refresh, H5HF_free_section_t *sect)
{
H5HF_indirect_t *sec_iblock; /* Pointer to section indirect block */
unsigned sec_entry; /* Entry within section indirect block */
- hbool_t did_protect; /* Whether we protected the indirect block or not */
+ bool did_protect; /* Whether we protected the indirect block or not */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -557,7 +557,7 @@ H5HF__sect_single_revive(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
} /* end if */
else {
/* Look up indirect block information for section */
- if (H5HF__sect_single_locate_parent(hdr, FALSE, sect) < 0)
+ if (H5HF__sect_single_locate_parent(hdr, false, sect) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get section's parent info");
} /* end else */
@@ -694,7 +694,7 @@ H5HF__sect_single_full_dblock(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
dblock_overhead = H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr);
if ((dblock_size - dblock_overhead) == sect->sect_info.size && hdr->man_dtable.curr_root_rows > 0) {
H5HF_direct_t *dblock; /* Pointer to direct block for section */
- hbool_t parent_removed; /* Whether the direct block parent was removed from the file */
+ bool parent_removed; /* Whether the direct block parent was removed from the file */
if (NULL == (dblock = H5HF__man_dblock_protect(hdr, dblock_addr, dblock_size, sect->u.single.parent,
sect->u.single.par_entry, H5AC__NO_FLAGS_SET)))
@@ -812,7 +812,7 @@ H5HF__sect_single_deserialize(const H5FS_section_class_t H5_ATTR_UNUSED *cls,
*
* Note: Second section must be "after" first section
*
- * Return: Success: non-negative (TRUE/FALSE)
+ * Return: Success: non-negative (true/false)
*
* Failure: negative
*
@@ -824,7 +824,7 @@ H5HF__sect_single_can_merge(const H5FS_section_info_t *_sect1, const H5FS_sectio
{
const H5HF_free_section_t *sect1 = (const H5HF_free_section_t *)_sect1; /* Fractal heap free section */
const H5HF_free_section_t *sect2 = (const H5HF_free_section_t *)_sect2; /* Fractal heap free section */
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -840,7 +840,7 @@ H5HF__sect_single_can_merge(const H5FS_section_info_t *_sect1, const H5FS_sectio
* are actually within the same direct block)
*/
if (H5_addr_eq(sect1->sect_info.addr + sect1->sect_info.size, sect2->sect_info.addr))
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -907,7 +907,7 @@ H5HF__sect_single_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect
* been done) as much as it's cleaning up _after_ the heap
* shrink.
*
- * Return: Success: non-negative (TRUE/FALSE)
+ * Return: Success: non-negative (true/false)
*
* Failure: negative
*
@@ -919,7 +919,7 @@ H5HF__sect_single_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
const H5HF_free_section_t *sect = (const H5HF_free_section_t *)_sect; /* Fractal heap free section */
H5HF_sect_add_ud_t *udata = (H5HF_sect_add_ud_t *)_udata; /* User callback data */
H5HF_hdr_t *hdr = udata->hdr; /* Fractal heap header */
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -939,14 +939,14 @@ H5HF__sect_single_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
dblock_size = hdr->man_dtable.cparam.start_block_size;
dblock_overhead = H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr);
if ((dblock_size - dblock_overhead) == sect->sect_info.size)
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
} /* end if */
else {
/* We shouldn't have a situation where the 'next block' iterator
* is moved before a direct block that still has objects within it.
*/
assert(hdr->man_iter_off > sect->sect_info.addr);
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
} /* end else */
done:
@@ -1147,7 +1147,7 @@ H5HF__sect_single_valid(const H5FS_section_class_t H5_ATTR_UNUSED *cls, const H5
*-------------------------------------------------------------------------
*/
static H5HF_free_section_t *
-H5HF__sect_row_create(haddr_t sect_off, hsize_t sect_size, hbool_t is_first, unsigned row, unsigned col,
+H5HF__sect_row_create(haddr_t sect_off, hsize_t sect_size, bool is_first, unsigned row, unsigned col,
unsigned nentries, H5HF_free_section_t *under_sect)
{
H5HF_free_section_t *sect = NULL; /* 'Row' section created */
@@ -1172,7 +1172,7 @@ H5HF__sect_row_create(haddr_t sect_off, hsize_t sect_size, hbool_t is_first, uns
sect->u.row.row = row;
sect->u.row.col = col;
sect->u.row.num_entries = nentries;
- sect->u.row.checked_out = FALSE;
+ sect->u.row.checked_out = false;
/* Set return value */
ret_value = sect;
@@ -1210,7 +1210,7 @@ H5HF__sect_row_from_single(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, H5HF_dire
sect->u.row.row = dblock->par_entry / hdr->man_dtable.cparam.width;
sect->u.row.col = dblock->par_entry % hdr->man_dtable.cparam.width;
sect->u.row.num_entries = 1;
- sect->u.row.checked_out = FALSE;
+ sect->u.row.checked_out = false;
/* Create indirect section that underlies the row section */
if (NULL == (sect->u.row.under = H5HF__sect_indirect_for_row(hdr, dblock->parent, sect)))
@@ -1251,7 +1251,7 @@ H5HF__sect_row_revive(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
* section is still marked as "live", switch it to the "serialized" state.
*/
if ((H5FS_SECT_LIVE == sect->u.row.under->sect_info.state) &&
- (TRUE == sect->u.row.under->u.indirect.u.iblock->removed_from_cache))
+ (true == sect->u.row.under->u.indirect.u.iblock->removed_from_cache))
if (H5HF__sect_row_parent_removed(sect) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTUPDATE, FAIL, "can't update section info");
@@ -1279,8 +1279,8 @@ H5HF__sect_row_revive(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
herr_t
H5HF__sect_row_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned *entry_p)
{
- hbool_t alloc_from_start; /* Whether to allocate from the end of the row */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool alloc_from_start; /* Whether to allocate from the end of the row */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1295,11 +1295,11 @@ H5HF__sect_row_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned *entr
assert(entry_p);
/* Mark the row as checked out from the free space manager */
- assert(sect->u.row.checked_out == FALSE);
- sect->u.row.checked_out = TRUE;
+ assert(sect->u.row.checked_out == false);
+ sect->u.row.checked_out = true;
/* Forward row section to indirect routines, to handle reducing underlying indirect section */
- alloc_from_start = FALSE;
+ alloc_from_start = false;
if (H5HF__sect_indirect_reduce_row(hdr, sect, &alloc_from_start) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTSHRINK, FAIL, "can't reduce underlying section");
@@ -1326,7 +1326,7 @@ H5HF__sect_row_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned *entr
sect->u.row.num_entries--;
/* Check the row back in */
- sect->u.row.checked_out = FALSE;
+ sect->u.row.checked_out = false;
/* Add 'row' section back to free space list */
if (H5HF__space_add(hdr, sect, 0) < 0)
@@ -1605,7 +1605,7 @@ H5HF__sect_row_deserialize(const H5FS_section_class_t *cls, const uint8_t *buf,
*
* Note: Second section must be "after" first section
*
- * Return: Success: non-negative (TRUE/FALSE)
+ * Return: Success: non-negative (true/false)
*
* Failure: negative
*
@@ -1618,7 +1618,7 @@ H5HF__sect_row_can_merge(const H5FS_section_info_t *_sect1, const H5FS_section_i
const H5HF_free_section_t *sect1 = (const H5HF_free_section_t *)_sect1; /* Fractal heap free section */
const H5HF_free_section_t *sect2 = (const H5HF_free_section_t *)_sect2; /* Fractal heap free section */
H5HF_free_section_t *top_indir_sect1, *top_indir_sect2; /* Top indirect section for each row */
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -1645,7 +1645,7 @@ H5HF__sect_row_can_merge(const H5FS_section_info_t *_sect1, const H5FS_section_i
/* Check if second section adjoins first section */
if (H5_addr_eq((top_indir_sect1->sect_info.addr + top_indir_sect1->u.indirect.span_size),
top_indir_sect2->sect_info.addr))
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1710,7 +1710,7 @@ H5HF__sect_row_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect2,
* been done) as much as it's cleaning up _after_ the heap
* shrink.
*
- * Return: Success: non-negative (TRUE/FALSE)
+ * Return: Success: non-negative (true/false)
*
* Failure: negative
*
@@ -1722,7 +1722,7 @@ H5HF__sect_row_can_shrink(const H5FS_section_info_t *_sect, void H5_ATTR_UNUSED
const H5HF_free_section_t *sect = (const H5HF_free_section_t *)_sect; /* Fractal heap free section */
H5HF_sect_add_ud_t *udata = (H5HF_sect_add_ud_t *)_udata; /* User callback data */
H5HF_hdr_t *hdr = udata->hdr; /* Fractal heap header */
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -1732,7 +1732,7 @@ H5HF__sect_row_can_shrink(const H5FS_section_info_t *_sect, void H5_ATTR_UNUSED
/* Check if section is past end of "next block" iterator */
if (sect->sect_info.addr >= hdr->man_iter_off)
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1873,7 +1873,7 @@ H5HF__sect_row_valid(const H5FS_section_class_t *cls, const H5FS_section_info_t
/* Sanity checking on the row */
assert(sect->u.row.under);
assert(sect->u.row.num_entries);
- assert(sect->u.row.checked_out == FALSE);
+ assert(sect->u.row.checked_out == false);
indir_sect = sect->u.row.under;
indir_idx = sect->u.row.row - indir_sect->u.indirect.row;
assert(indir_sect->u.indirect.dir_rows[indir_idx] == sect);
@@ -2188,7 +2188,7 @@ H5HF__sect_indirect_for_row(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock, H5HF_free_
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF__sect_indirect_init_rows(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, hbool_t first_child,
+H5HF__sect_indirect_init_rows(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, bool first_child,
H5HF_free_section_t **first_row_sect, unsigned space_flags, unsigned start_row,
unsigned start_col, unsigned end_row, unsigned end_col)
{
@@ -2322,7 +2322,7 @@ H5HF__sect_indirect_init_rows(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, hbool_
curr_entry += row_entries;
/* Reset the 'first child' parameters */
- first_child = FALSE;
+ first_child = false;
first_row_sect = NULL;
} /* end if */
else {
@@ -2338,7 +2338,7 @@ H5HF__sect_indirect_init_rows(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, hbool_
/* Add an indirect section for each indirect block in the row */
for (v = 0; v < row_entries; v++) {
- hbool_t did_protect = FALSE; /* Whether we protected the indirect block or not */
+ bool did_protect = false; /* Whether we protected the indirect block or not */
/* Try to get the child section's indirect block, if it's available */
if (sect->sect_info.state == H5FS_SECT_LIVE) {
@@ -2354,7 +2354,7 @@ H5HF__sect_indirect_init_rows(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, hbool_
if (H5_addr_defined(child_iblock_addr)) {
if (NULL == (child_iblock = H5HF__man_iblock_protect(
hdr, child_iblock_addr, child_nrows, sect->u.indirect.u.iblock,
- curr_entry, FALSE, H5AC__NO_FLAGS_SET, &did_protect)))
+ curr_entry, false, H5AC__NO_FLAGS_SET, &did_protect)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL,
"unable to protect fractal heap indirect block");
} /* end if */
@@ -2396,7 +2396,7 @@ H5HF__sect_indirect_init_rows(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, hbool_
curr_indir_entry++;
/* Reset the 'first child' parameters */
- first_child = FALSE;
+ first_child = false;
first_row_sect = NULL;
} /* end for */
} /* end else */
@@ -2482,7 +2482,7 @@ H5HF__sect_indirect_add(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock, unsigned start
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't create indirect section");
/* Initialize rows for new indirect section */
- if (H5HF__sect_indirect_init_rows(hdr, sect, TRUE, &first_row_sect, H5FS_ADD_SKIP_VALID, start_row,
+ if (H5HF__sect_indirect_init_rows(hdr, sect, true, &first_row_sect, H5FS_ADD_SKIP_VALID, start_row,
start_col, end_row, end_col) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize indirect section");
assert(first_row_sect);
@@ -2561,7 +2561,7 @@ static herr_t
H5HF__sect_indirect_revive_row(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
{
H5HF_indirect_t *sec_iblock; /* Pointer to section indirect block */
- hbool_t did_protect; /* Whether we protected the indirect block or not */
+ bool did_protect; /* Whether we protected the indirect block or not */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -2653,7 +2653,7 @@ H5HF__sect_indirect_revive(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, H5HF_indi
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF__sect_indirect_reduce_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect, hbool_t *alloc_from_start)
+H5HF__sect_indirect_reduce_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect, bool *alloc_from_start)
{
H5HF_free_section_t *sect; /* Indirect section underlying row section */
unsigned row_start_entry; /* Entry for first block covered in row section */
@@ -2696,17 +2696,17 @@ H5HF__sect_indirect_reduce_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect, h
/* Check if we should allocate from end of indirect section */
if (row_end_entry == end_entry && start_row != end_row) {
- *alloc_from_start = FALSE;
+ *alloc_from_start = false;
row_entry = row_end_entry;
} /* end if */
else {
- *alloc_from_start = TRUE;
+ *alloc_from_start = true;
row_entry = row_start_entry;
} /* end else */
/* Check if we have a parent section to be detached from */
if (sect->u.indirect.parent) {
- hbool_t is_first; /* Flag to indicate that this section is the first section in hierarchy */
+ bool is_first; /* Flag to indicate that this section is the first section in hierarchy */
/* Check if this section is the first section */
is_first = H5HF__sect_indirect_is_first(sect);
@@ -2951,7 +2951,7 @@ H5HF__sect_indirect_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned
if (sect->u.indirect.num_entries > 1) {
/* Check if we have a parent section to be detached from */
if (sect->u.indirect.parent) {
- hbool_t is_first; /* Flag to indicate that this section is the first section in hierarchy */
+ bool is_first; /* Flag to indicate that this section is the first section in hierarchy */
/* Check if this section is the first section */
is_first = H5HF__sect_indirect_is_first(sect);
@@ -3147,14 +3147,14 @@ H5HF__sect_indirect_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned
*
* Purpose: Check if indirect section is first in all parents
*
- * Return: Non-negative (TRUE/FALSE) on success/
+ * Return: Non-negative (true/false) on success/
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
H5HF__sect_indirect_is_first(H5HF_free_section_t *sect)
{
- hbool_t ret_value = FALSE; /* Return value */
+ bool ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -3167,7 +3167,7 @@ H5HF__sect_indirect_is_first(H5HF_free_section_t *sect)
ret_value = H5HF__sect_indirect_is_first(sect->u.indirect.parent);
} /* end if */
else
- ret_value = TRUE;
+ ret_value = true;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF__sect_indirect_is_first() */
@@ -3265,7 +3265,7 @@ H5HF__sect_indirect_merge_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect1, H
unsigned end_entry1; /* End entry for section #1 */
unsigned end_row1; /* Ending row for section #1 */
unsigned start_row2; /* Starting row for section #2 */
- hbool_t merged_rows; /* Flag to indicate that rows was merged together */
+ bool merged_rows; /* Flag to indicate that rows was merged together */
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
@@ -3348,7 +3348,7 @@ H5HF__sect_indirect_merge_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect1, H
new_dir_nrows1 = (sect1->u.indirect.dir_nrows + sect2->u.indirect.dir_nrows) - 1;
/* Indicate that the rows were merged */
- merged_rows = TRUE;
+ merged_rows = true;
} /* end if */
else {
@@ -3358,7 +3358,7 @@ H5HF__sect_indirect_merge_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect1, H
new_dir_nrows1 = sect1->u.indirect.dir_nrows + sect2->u.indirect.dir_nrows;
/* Indicate that the rows were _not_ merged */
- merged_rows = FALSE;
+ merged_rows = false;
} /* end else */
/* Check if we need to move additional rows */
@@ -3390,7 +3390,7 @@ H5HF__sect_indirect_merge_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect1, H
} /* end if */
else
/* Indicate that the rows were _not_ merged */
- merged_rows = FALSE;
+ merged_rows = false;
/* Check for indirect sections in second section */
if (sect2->u.indirect.indir_nents > 0) {
@@ -3731,7 +3731,7 @@ H5HF__sect_indirect_deserialize(H5HF_hdr_t *hdr, const uint8_t *buf, haddr_t sec
end_col = end_entry % hdr->man_dtable.cparam.width;
/* Initialize rows for new indirect section */
- if (H5HF__sect_indirect_init_rows(hdr, new_sect, TRUE, NULL, H5FS_ADD_DESERIALIZING,
+ if (H5HF__sect_indirect_init_rows(hdr, new_sect, true, NULL, H5FS_ADD_DESERIALIZING,
new_sect->u.indirect.row, new_sect->u.indirect.col, end_row,
end_col) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, NULL, "can't initialize indirect section");
diff --git a/src/H5HFspace.c b/src/H5HFspace.c
index 2913062fe50..8c9f0c041ff 100644
--- a/src/H5HFspace.c
+++ b/src/H5HFspace.c
@@ -79,7 +79,7 @@
*-------------------------------------------------------------------------
*/
herr_t
-H5HF__space_start(H5HF_hdr_t *hdr, hbool_t may_create)
+H5HF__space_start(H5HF_hdr_t *hdr, bool may_create)
{
const H5FS_section_class_t *classes[] = {/* Free space section classes implemented for fractal heap */
H5HF_FSPACE_SECT_CLS_SINGLE, H5HF_FSPACE_SECT_CLS_FIRST_ROW,
@@ -152,7 +152,7 @@ H5HF__space_add(H5HF_hdr_t *hdr, H5HF_free_section_t *node, unsigned flags)
/* Check if the free space for the heap has been initialized */
if (!hdr->fspace)
- if (H5HF__space_start(hdr, TRUE) < 0)
+ if (H5HF__space_start(hdr, true) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize heap free space");
/* Construct user data */
@@ -179,7 +179,7 @@ H5HF__space_add(H5HF_hdr_t *hdr, H5HF_free_section_t *node, unsigned flags)
htri_t
H5HF__space_find(H5HF_hdr_t *hdr, hsize_t request, H5HF_free_section_t **node)
{
- htri_t node_found = FALSE; /* Whether an existing free list node was found */
+ htri_t node_found = false; /* Whether an existing free list node was found */
htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_PACKAGE
@@ -193,7 +193,7 @@ H5HF__space_find(H5HF_hdr_t *hdr, hsize_t request, H5HF_free_section_t **node)
/* Check if the free space for the heap has been initialized */
if (!hdr->fspace)
- if (H5HF__space_start(hdr, FALSE) < 0)
+ if (H5HF__space_start(hdr, false) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize heap free space");
/* Search for free space in the heap */
@@ -394,7 +394,7 @@ H5HF__space_size(H5HF_hdr_t *hdr, hsize_t *fs_size)
/* Check if the free space for the heap has been initialized */
if (!hdr->fspace)
- if (H5HF__space_start(hdr, FALSE) < 0)
+ if (H5HF__space_start(hdr, false) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize heap free space");
/* Get free space metadata size */
diff --git a/src/H5HFtest.c b/src/H5HFtest.c
index 8605163f1ed..16ea5292b9c 100644
--- a/src/H5HFtest.c
+++ b/src/H5HFtest.c
@@ -178,7 +178,7 @@ H5HF_cmp_cparam_test(const H5HF_create_t *cparam1, const H5HF_create_t *cparam2)
else if(cparam1->pline.filter[u].name && !cparam2->pline.filter[u].name)
HGOTO_DONE(1);
else if(cparam1->pline.filter[u].name && cparam2->pline.filter[u].name) {
- if((ret_value = HDstrcmp(cparam1->pline.filter[u].name, cparam2->pline.filter[u].name)))
+ if((ret_value = strcmp(cparam1->pline.filter[u].name, cparam2->pline.filter[u].name)))
HGOTO_DONE(ret_value);
} /* end if */
#endif
@@ -441,7 +441,7 @@ H5HF_get_id_type_test(const void *_id, unsigned char *obj_type)
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_get_tiny_info_test(const H5HF_t *fh, size_t *max_len, hbool_t *len_extended)
+H5HF_get_tiny_info_test(const H5HF_t *fh, size_t *max_len, bool *len_extended)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -469,7 +469,7 @@ H5HF_get_tiny_info_test(const H5HF_t *fh, size_t *max_len, hbool_t *len_extended
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_get_huge_info_test(const H5HF_t *fh, hsize_t *next_id, hbool_t *ids_direct)
+H5HF_get_huge_info_test(const H5HF_t *fh, hsize_t *next_id, bool *ids_direct)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
diff --git a/src/H5HFtiny.c b/src/H5HFtiny.c
index e303b332780..0f5f1a56b4a 100644
--- a/src/H5HFtiny.c
+++ b/src/H5HFtiny.c
@@ -97,15 +97,15 @@ H5HF__tiny_init(H5HF_hdr_t *hdr)
*/
if ((hdr->id_len - 1) <= H5HF_TINY_LEN_SHORT) {
hdr->tiny_max_len = hdr->id_len - 1;
- hdr->tiny_len_extended = FALSE;
+ hdr->tiny_len_extended = false;
} /* end if */
else if ((hdr->id_len - 1) == (H5HF_TINY_LEN_SHORT + 1)) {
hdr->tiny_max_len = H5HF_TINY_LEN_SHORT;
- hdr->tiny_len_extended = FALSE;
+ hdr->tiny_len_extended = false;
} /* end if */
else {
hdr->tiny_max_len = hdr->id_len - 2;
- hdr->tiny_len_extended = TRUE;
+ hdr->tiny_len_extended = true;
} /* end else */
FUNC_LEAVE_NOAPI(SUCCEED)
diff --git a/src/H5HG.c b/src/H5HG.c
index 5e573fa7506..26bc59757bb 100644
--- a/src/H5HG.c
+++ b/src/H5HG.c
@@ -574,7 +574,7 @@ H5HG_read(H5F_t *f, H5HG_t *hobj, void *object /*out*/, size_t *buf_size)
* with the H5AC_protect(), but it won't hurt to do it twice.
*/
if (heap->obj[0].begin) {
- if (H5F_cwfs_advance_heap(f, heap, FALSE) < 0)
+ if (H5F_cwfs_advance_heap(f, heap, false) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTMODIFY, NULL, "can't adjust file's CWFS");
} /* end if */
@@ -771,7 +771,7 @@ H5HG_remove(H5F_t *f, H5HG_t *hobj)
* H5AC_protect() might have done that too, but that's okay. If the
* heap isn't on the CWFS list then add it to the end.
*/
- if (H5F_cwfs_advance_heap(f, heap, TRUE) < 0)
+ if (H5F_cwfs_advance_heap(f, heap, true) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTMODIFY, FAIL, "can't adjust file's CWFS");
} /* end else */
diff --git a/src/H5HGcache.c b/src/H5HGcache.c
index ecce815f875..125d45141a4 100644
--- a/src/H5HGcache.c
+++ b/src/H5HGcache.c
@@ -55,7 +55,7 @@
static herr_t H5HG__cache_heap_get_initial_load_size(void *udata, size_t *image_len);
static herr_t H5HG__cache_heap_get_final_load_size(const void *_image, size_t image_len, void *udata,
size_t *actual_len);
-static void *H5HG__cache_heap_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty);
+static void *H5HG__cache_heap_deserialize(const void *image, size_t len, void *udata, bool *dirty);
static herr_t H5HG__cache_heap_image_len(const void *thing, size_t *image_len);
static herr_t H5HG__cache_heap_serialize(const H5F_t *f, void *image, size_t len, void *thing);
static herr_t H5HG__cache_heap_free_icr(void *thing);
@@ -214,7 +214,7 @@ H5HG__cache_heap_get_final_load_size(const void *image, size_t image_len, void *
*-------------------------------------------------------------------------
*/
static void *
-H5HG__cache_heap_deserialize(const void *_image, size_t len, void *_udata, hbool_t H5_ATTR_UNUSED *dirty)
+H5HG__cache_heap_deserialize(const void *_image, size_t len, void *_udata, bool H5_ATTR_UNUSED *dirty)
{
H5F_t *f = (H5F_t *)_udata; /* File pointer */
H5HG_heap_t *heap = NULL; /* New global heap */
@@ -369,7 +369,7 @@ H5HG__cache_heap_deserialize(const void *_image, size_t len, void *_udata, hbool
/* Post-parse checks */
if (p != heap->chunk + heap->size)
HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "partially decoded global heap");
- if (FALSE == H5HG_ISALIGNED(heap->obj[0].size))
+ if (false == H5HG_ISALIGNED(heap->obj[0].size))
HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "decoded global heap is not aligned");
/* Set the next index value to use when creating a new object */
diff --git a/src/H5HGdbg.c b/src/H5HGdbg.c
index 60cf3f785e7..0f100e49a09 100644
--- a/src/H5HGdbg.c
+++ b/src/H5HGdbg.c
@@ -111,7 +111,7 @@ H5HG_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth)
if (h->obj[u].begin) {
char buf[64];
- HDsnprintf(buf, sizeof(buf), "Object %u", u);
+ snprintf(buf, sizeof(buf), "Object %u", u);
fprintf(stream, "%*s%s\n", indent, "", buf);
fprintf(stream, "%*s%-*s %lu\n", indent + 3, "", MIN(fwidth - 3, 0),
"Obffset in block:", (unsigned long)(h->obj[u].begin - h->chunk));
@@ -129,12 +129,12 @@ H5HG_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth)
if (j + k < h->obj[u].size)
fprintf(stream, "%02x ", p[j + k]);
else
- HDfputs(" ", stream);
+ fputs(" ", stream);
}
for (k = 0; k < 16 && j + k < h->obj[u].size; k++) {
if (8 == k)
fprintf(stream, " ");
- HDfputc(p[j + k] > ' ' && p[j + k] <= '~' ? p[j + k] : '.', stream);
+ fputc(p[j + k] > ' ' && p[j + k] <= '~' ? p[j + k] : '.', stream);
}
fprintf(stream, "\n");
}
diff --git a/src/H5HL.c b/src/H5HL.c
index ffec3ad3ffa..bdf46d6ce37 100644
--- a/src/H5HL.c
+++ b/src/H5HL.c
@@ -121,7 +121,7 @@ H5HL_create(H5F_t *f, size_t size_hint, haddr_t *addr_p /*out*/)
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "unable to allocate file memory");
/* Initialize info */
- heap->single_cache_obj = TRUE;
+ heap->single_cache_obj = true;
heap->dblk_addr = heap->prfx_addr + (hsize_t)heap->prfx_size;
heap->dblk_size = size_hint;
if (size_hint)
@@ -522,7 +522,7 @@ H5HL_insert(H5F_t *f, H5HL_t *heap, size_t buf_size, const void *buf, size_t *of
H5HL_free_t *fl = NULL, *last_fl = NULL;
size_t need_size;
size_t offset = 0;
- hbool_t found;
+ bool found;
herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(FAIL)
@@ -552,7 +552,7 @@ H5HL_insert(H5F_t *f, H5HL_t *heap, size_t buf_size, const void *buf, size_t *of
/* Look for a free slot large enough for this object and which would
* leave zero or at least H5G_SIZEOF_FREE bytes left over.
*/
- for (fl = heap->freelist, found = FALSE; fl; fl = fl->next) {
+ for (fl = heap->freelist, found = false; fl; fl = fl->next) {
if (fl->size > need_size && fl->size - need_size >= H5HL_SIZEOF_FREE(f)) {
/* A big enough free block was found */
offset = fl->offset;
@@ -560,14 +560,14 @@ H5HL_insert(H5F_t *f, H5HL_t *heap, size_t buf_size, const void *buf, size_t *of
fl->size -= need_size;
assert(fl->offset == H5HL_ALIGN(fl->offset));
assert(fl->size == H5HL_ALIGN(fl->size));
- found = TRUE;
+ found = true;
break;
}
else if (fl->size == need_size) {
/* Free block of exact size found */
offset = fl->offset;
fl = H5HL__remove_free(heap, fl);
- found = TRUE;
+ found = true;
break;
}
else if (!last_fl || last_fl->offset < fl->offset) {
@@ -581,7 +581,7 @@ H5HL_insert(H5F_t *f, H5HL_t *heap, size_t buf_size, const void *buf, size_t *of
* can extend that free chunk. Otherwise we'll have to make another
* free chunk. If the heap must expand, we double its size.
*/
- if (found == FALSE) {
+ if (found == false) {
size_t need_more; /* How much more space we need */
size_t new_dblk_size; /* Final size of space allocated for heap data block */
size_t old_dblk_size; /* Previous size of space allocated for heap data block */
@@ -615,7 +615,7 @@ H5HL_insert(H5F_t *f, H5HL_t *heap, size_t buf_size, const void *buf, size_t *of
HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, FAIL, "error trying to extend heap");
/* Check if we extended the heap data block in file */
- if (was_extended == TRUE) {
+ if (was_extended == true) {
/* Check for prefix & data block contiguous */
if (heap->single_cache_obj) {
/* Resize prefix+data block */
diff --git a/src/H5HLcache.c b/src/H5HLcache.c
index 377bc0fa3d5..b38ff7c2848 100644
--- a/src/H5HLcache.c
+++ b/src/H5HLcache.c
@@ -67,14 +67,14 @@
static herr_t H5HL__cache_prefix_get_initial_load_size(void *udata, size_t *image_len);
static herr_t H5HL__cache_prefix_get_final_load_size(const void *_image, size_t image_len, void *udata,
size_t *actual_len);
-static void *H5HL__cache_prefix_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty);
+static void *H5HL__cache_prefix_deserialize(const void *image, size_t len, void *udata, bool *dirty);
static herr_t H5HL__cache_prefix_image_len(const void *thing, size_t *image_len);
static herr_t H5HL__cache_prefix_serialize(const H5F_t *f, void *image, size_t len, void *thing);
static herr_t H5HL__cache_prefix_free_icr(void *thing);
/* Local heap data block */
static herr_t H5HL__cache_datablock_get_initial_load_size(void *udata, size_t *image_len);
-static void *H5HL__cache_datablock_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty);
+static void *H5HL__cache_datablock_deserialize(const void *image, size_t len, void *udata, bool *dirty);
static herr_t H5HL__cache_datablock_image_len(const void *thing, size_t *image_len);
static herr_t H5HL__cache_datablock_serialize(const H5F_t *f, void *image, size_t len, void *thing);
static herr_t H5HL__cache_datablock_notify(H5C_notify_action_t action, void *_thing);
@@ -394,7 +394,7 @@ H5HL__cache_prefix_get_final_load_size(const void *_image, size_t image_len, voi
*-------------------------------------------------------------------------
*/
static void *
-H5HL__cache_prefix_deserialize(const void *_image, size_t len, void *_udata, hbool_t H5_ATTR_UNUSED *dirty)
+H5HL__cache_prefix_deserialize(const void *_image, size_t len, void *_udata, bool H5_ATTR_UNUSED *dirty)
{
H5HL_t *heap = NULL; /* Local heap */
H5HL_prfx_t *prfx = NULL; /* Heap prefix deserialized */
@@ -432,7 +432,7 @@ H5HL__cache_prefix_deserialize(const void *_image, size_t len, void *_udata, hbo
/* Check if heap data block is contiguous with header */
if (H5_addr_eq((heap->prfx_addr + heap->prfx_size), heap->dblk_addr)) {
/* Note that the heap should be a single object in the cache */
- heap->single_cache_obj = TRUE;
+ heap->single_cache_obj = true;
/* Allocate space for the heap data image */
if (NULL == (heap->dblk_image = H5FL_BLK_MALLOC(lheap_chunk, heap->dblk_size)))
@@ -456,7 +456,7 @@ H5HL__cache_prefix_deserialize(const void *_image, size_t len, void *_udata, hbo
/* Note that the heap should _NOT_ be a single
* object in the cache
*/
- heap->single_cache_obj = FALSE;
+ heap->single_cache_obj = false;
}
/* Set return value */
@@ -683,7 +683,7 @@ H5HL__cache_datablock_get_initial_load_size(void *_udata, size_t *image_len)
*-------------------------------------------------------------------------
*/
static void *
-H5HL__cache_datablock_deserialize(const void *image, size_t len, void *_udata, hbool_t H5_ATTR_UNUSED *dirty)
+H5HL__cache_datablock_deserialize(const void *image, size_t len, void *_udata, bool H5_ATTR_UNUSED *dirty)
{
H5HL_dblk_t *dblk = NULL; /* Local heap data block deserialized */
H5HL_t *heap = (H5HL_t *)_udata; /* User data for callback */
diff --git a/src/H5HLdbg.c b/src/H5HLdbg.c
index 852884a42eb..1308f8d7437 100644
--- a/src/H5HLdbg.c
+++ b/src/H5HLdbg.c
@@ -76,7 +76,7 @@ H5HL_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth)
for (free_block = 0, freelist = h->freelist; freelist; freelist = freelist->next, free_block++) {
char temp_str[32];
- HDsnprintf(temp_str, sizeof(temp_str), "Block #%d:", free_block);
+ snprintf(temp_str, sizeof(temp_str), "Block #%d:", free_block);
fprintf(stream, "%*s%-*s %8zu, %8zu\n", indent + 3, "", MAX(0, fwidth - 9), temp_str,
freelist->offset, freelist->size);
if ((freelist->offset + freelist->size) > h->dblk_size)
diff --git a/src/H5HLdblk.c b/src/H5HLdblk.c
index 570136584d2..dfcca97ff6f 100644
--- a/src/H5HLdblk.c
+++ b/src/H5HLdblk.c
@@ -231,7 +231,7 @@ H5HL__dblk_realloc(H5F_t *f, H5HL_t *heap, size_t new_heap_size)
dblk = NULL;
/* Reset 'single cache object' flag */
- heap->single_cache_obj = FALSE;
+ heap->single_cache_obj = false;
}
else {
/* Resize the heap data block in the cache */
diff --git a/src/H5HLpkg.h b/src/H5HLpkg.h
index 47c20603f59..9d23049dd35 100644
--- a/src/H5HLpkg.h
+++ b/src/H5HLpkg.h
@@ -83,7 +83,7 @@ struct H5HL_t {
size_t prots; /* # of times the heap has been protected */
size_t sizeof_size; /* Size of file sizes */
size_t sizeof_addr; /* Size of file addresses */
- hbool_t single_cache_obj; /* Indicate if the heap is a single object in the cache */
+ bool single_cache_obj; /* Indicate if the heap is a single object in the cache */
H5HL_free_t *freelist; /* the free list */
/* Prefix-specific fields */
diff --git a/src/H5I.c b/src/H5I.c
index f0d1be6471f..97e679ce660 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -107,21 +107,21 @@ H5Iregister_type(size_t H5_ATTR_DEBUG_API_USED hash_size, unsigned reserved, H5I
H5I_next_type_g++;
}
else {
- hbool_t done; /* Indicate that search was successful */
- int i;
+ bool done; /* Indicate that search was successful */
+ int i;
/* Look for a free type to give out */
- done = FALSE;
- for (i = H5I_NTYPES; i < H5I_MAX_NUM_TYPES && done == FALSE; i++) {
+ done = false;
+ for (i = H5I_NTYPES; i < H5I_MAX_NUM_TYPES && done == false; i++) {
if (NULL == H5I_type_info_array_g[i]) {
/* Found a free type ID */
new_type = (H5I_type_t)i;
- done = TRUE;
+ done = true;
}
}
/* Verify that we found a type to give out */
- if (done == FALSE)
+ if (done == false)
HGOTO_ERROR(H5E_ID, H5E_NOSPACE, H5I_BADID, "Maximum number of ID types exceeded");
}
@@ -157,14 +157,14 @@ H5Iregister_type(size_t H5_ATTR_DEBUG_API_USED hash_size, unsigned reserved, H5I
* Purpose: Query function to inform the user if a given type is
* currently registered with the library.
*
- * Return: TRUE/FALSE/FAIL
+ * Return: true/false/FAIL
*
*-------------------------------------------------------------------------
*/
htri_t
H5Itype_exists(H5I_type_t type)
{
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE1("t", "It", type);
@@ -176,7 +176,7 @@ H5Itype_exists(H5I_type_t type)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number");
if (NULL == H5I_type_info_array_g[type])
- ret_value = FALSE;
+ ret_value = false;
done:
FUNC_LEAVE_API(ret_value)
@@ -249,7 +249,7 @@ H5Iclear_type(H5I_type_t type, hbool_t force)
if (H5I_IS_LIB_TYPE(type))
HGOTO_ERROR(H5E_ID, H5E_BADGROUP, FAIL, "cannot call public function on library type");
- ret_value = H5I_clear_type(type, force, TRUE);
+ ret_value = H5I_clear_type(type, force, true);
done:
FUNC_LEAVE_API(ret_value)
@@ -307,7 +307,7 @@ H5Iregister(H5I_type_t type, const void *object)
HGOTO_ERROR(H5E_ID, H5E_BADGROUP, H5I_INVALID_HID, "cannot call public function on library type");
/* Register the object */
- if ((ret_value = H5I__register(type, object, TRUE, NULL, NULL)) < 0)
+ if ((ret_value = H5I__register(type, object, true, NULL, NULL)) < 0)
HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object");
done:
@@ -340,7 +340,7 @@ H5Iregister_future(H5I_type_t type, const void *object, H5I_future_realize_func_
HGOTO_ERROR(H5E_ID, H5E_BADVALUE, H5I_INVALID_HID, "NULL pointer for realize_cb not allowed");
/* Register the future object */
- if ((ret_value = H5I__register(type, object, TRUE, realize_cb, discard_cb)) < 0)
+ if ((ret_value = H5I__register(type, object, true, realize_cb, discard_cb)) < 0)
HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object");
done:
@@ -499,7 +499,7 @@ H5Iinc_ref(hid_t id)
HGOTO_ERROR(H5E_ID, H5E_BADID, (-1), "invalid ID");
/* Do actual increment operation */
- if ((ret_value = H5I_inc_ref(id, TRUE)) < 0)
+ if ((ret_value = H5I_inc_ref(id, true)) < 0)
HGOTO_ERROR(H5E_ID, H5E_CANTINC, (-1), "can't increment ID ref count");
done:
@@ -529,7 +529,7 @@ H5Iget_ref(hid_t id)
HGOTO_ERROR(H5E_ID, H5E_BADID, (-1), "invalid ID");
/* Do actual retrieve operation */
- if ((ret_value = H5I_get_ref(id, TRUE)) < 0)
+ if ((ret_value = H5I_get_ref(id, true)) < 0)
HGOTO_ERROR(H5E_ID, H5E_CANTGET, (-1), "can't get ID ref count");
done:
@@ -647,7 +647,7 @@ H5Iget_type_ref(H5I_type_t type)
* Purpose: Check if the given id is valid. An id is valid if it is in
* use and has an application reference count of at least 1.
*
- * Return: TRUE/FALSE/FAIL
+ * Return: true/false/FAIL
*
*-------------------------------------------------------------------------
*/
@@ -655,16 +655,16 @@ htri_t
H5Iis_valid(hid_t id)
{
H5I_id_info_t *info = NULL; /* Pointer to the ID info */
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE1("t", "i", id);
/* Find the ID */
if (NULL == (info = H5I__find_id(id)))
- ret_value = FALSE;
+ ret_value = false;
else if (!info->app_count) /* Check if the found id is an internal id */
- ret_value = FALSE;
+ ret_value = false;
done:
FUNC_LEAVE_API(ret_value)
@@ -745,7 +745,7 @@ H5Isearch(H5I_type_t type, H5I_search_func_t func, void *key)
/* Note that H5I_iterate returns an error code. We ignore it
* here, as we can't do anything with it without revising the API.
*/
- (void)H5I_iterate(type, H5I__search_cb, &udata, TRUE);
+ (void)H5I_iterate(type, H5I__search_cb, &udata, true);
/* Set return value */
ret_value = udata.ret_obj;
@@ -826,7 +826,7 @@ H5Iiterate(H5I_type_t type, H5I_iterate_func_t op, void *op_data)
/* Note that H5I_iterate returns an error code. We ignore it
* here, as we can't do anything with it without revising the API.
*/
- if ((ret_value = H5I_iterate(type, H5I__iterate_pub_cb, &int_udata, TRUE)) < 0)
+ if ((ret_value = H5I_iterate(type, H5I__iterate_pub_cb, &int_udata, true)) < 0)
HGOTO_ERROR(H5E_ID, H5E_BADITER, FAIL, "can't iterate over ids");
done:
@@ -867,7 +867,7 @@ H5Iget_file_id(hid_t obj_id)
HGOTO_ERROR(H5E_ID, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier");
/* Get the file ID */
- if ((ret_value = H5F_get_file_id(vol_obj, type, TRUE)) < 0)
+ if ((ret_value = H5F_get_file_id(vol_obj, type, true)) < 0)
HGOTO_ERROR(H5E_ID, H5E_CANTGET, H5I_INVALID_HID, "can't retrieve file ID");
}
else
diff --git a/src/H5Iint.c b/src/H5Iint.c
index b7b1da20f8e..7d8b4acd0cc 100644
--- a/src/H5Iint.c
+++ b/src/H5Iint.c
@@ -53,15 +53,15 @@ typedef struct {
typedef struct {
H5I_search_func_t user_func; /* 'User' function to invoke */
void *user_udata; /* User data to pass to 'user' function */
- hbool_t app_ref; /* Whether this is an appl. ref. call */
+ bool app_ref; /* Whether this is an appl. ref. call */
H5I_type_t obj_type; /* Type of object we are iterating over */
} H5I_iterate_ud_t;
/* User data for H5I__clear_type_cb */
typedef struct {
H5I_type_info_t *type_info; /* Pointer to the type's info to be cleared */
- hbool_t force; /* Whether to always remove the ID */
- hbool_t app_ref; /* Whether this is an appl. ref. call */
+ bool force; /* Whether to always remove the ID */
+ bool app_ref; /* Whether this is an appl. ref. call */
} H5I_clear_type_ud_t;
/********************/
@@ -92,7 +92,7 @@ int H5I_next_type_g = (int)H5I_NTYPES;
H5FL_DEFINE_STATIC(H5I_id_info_t);
/* Whether deletes are actually marks (for mark-and-sweep) */
-static hbool_t H5I_marking_s = FALSE;
+static bool H5I_marking_s = false;
/*****************************/
/* Library Private Variables */
@@ -287,7 +287,7 @@ H5I__unwrap(void *object, H5I_type_t type)
*-------------------------------------------------------------------------
*/
herr_t
-H5I_clear_type(H5I_type_t type, hbool_t force, hbool_t app_ref)
+H5I_clear_type(H5I_type_t type, bool force, bool app_ref)
{
H5I_clear_type_ud_t udata; /* udata struct for callback */
H5I_id_info_t *item = NULL;
@@ -314,7 +314,7 @@ H5I_clear_type(H5I_type_t type, hbool_t force, hbool_t app_ref)
*/
/* Set marking flag */
- H5I_marking_s = TRUE;
+ H5I_marking_s = true;
/* Mark nodes for deletion */
HASH_ITER(hh, udata.type_info->hash_table, item, tmp)
@@ -325,7 +325,7 @@ H5I_clear_type(H5I_type_t type, hbool_t force, hbool_t app_ref)
}
/* Unset marking flag */
- H5I_marking_s = FALSE;
+ H5I_marking_s = false;
/* Perform sweep */
HASH_ITER(hh, udata.type_info->hash_table, item, tmp)
@@ -355,7 +355,7 @@ H5I__mark_node(void *_info, void H5_ATTR_UNUSED *key, void *_udata)
{
H5I_id_info_t *info = (H5I_id_info_t *)_info; /* Current ID info being worked with */
H5I_clear_type_ud_t *udata = (H5I_clear_type_ud_t *)_udata; /* udata struct */
- hbool_t mark = FALSE;
+ bool mark = false;
FUNC_ENTER_PACKAGE_NOERR
@@ -384,12 +384,12 @@ H5I__mark_node(void *_info, void H5_ATTR_UNUSED *key, void *_udata)
#endif /* H5I_DEBUG */
/* Indicate node should be removed from list */
- mark = TRUE;
+ mark = true;
}
}
else {
/* Indicate node should be removed from list */
- mark = TRUE;
+ mark = true;
}
}
else {
@@ -407,12 +407,12 @@ H5I__mark_node(void *_info, void H5_ATTR_UNUSED *key, void *_udata)
#endif /* H5I_DEBUG */
/* Indicate node should be removed from list */
- mark = TRUE;
+ mark = true;
}
}
else {
/* Indicate node should be removed from list */
- mark = TRUE;
+ mark = true;
}
}
H5_GCC_CLANG_DIAG_ON("cast-qual")
@@ -420,7 +420,7 @@ H5I__mark_node(void *_info, void H5_ATTR_UNUSED *key, void *_udata)
/* Remove ID if requested */
if (mark) {
/* Mark ID for deletion */
- info->marked = TRUE;
+ info->marked = true;
/* Decrement the number of IDs in the type */
udata->type_info->id_count--;
@@ -461,7 +461,7 @@ H5I__destroy_type(H5I_type_t type)
/* Close/clear/destroy all IDs for this type */
H5E_BEGIN_TRY
{
- H5I_clear_type(type, TRUE, FALSE);
+ H5I_clear_type(type, true, false);
}
H5E_END_TRY /* don't care about errors */
@@ -500,7 +500,7 @@ H5I__destroy_type(H5I_type_t type)
*-------------------------------------------------------------------------
*/
hid_t
-H5I__register(H5I_type_t type, const void *object, hbool_t app_ref, H5I_future_realize_func_t realize_cb,
+H5I__register(H5I_type_t type, const void *object, bool app_ref, H5I_future_realize_func_t realize_cb,
H5I_future_discard_func_t discard_cb)
{
H5I_type_info_t *type_info = NULL; /* Pointer to the type */
@@ -528,7 +528,7 @@ H5I__register(H5I_type_t type, const void *object, hbool_t app_ref, H5I_future_r
info->is_future = (NULL != realize_cb);
info->realize_cb = realize_cb;
info->discard_cb = discard_cb;
- info->marked = FALSE;
+ info->marked = false;
/* Insert into the type */
HASH_ADD(hh, type_info->hash_table, id, sizeof(hid_t), info);
@@ -559,7 +559,7 @@ H5I__register(H5I_type_t type, const void *object, hbool_t app_ref, H5I_future_r
*-------------------------------------------------------------------------
*/
hid_t
-H5I_register(H5I_type_t type, const void *object, hbool_t app_ref)
+H5I_register(H5I_type_t type, const void *object, bool app_ref)
{
hid_t ret_value = H5I_INVALID_HID; /* Return value */
@@ -596,7 +596,7 @@ H5I_register(H5I_type_t type, const void *object, hbool_t app_ref)
*-------------------------------------------------------------------------
*/
herr_t
-H5I_register_using_existing_id(H5I_type_t type, void *object, hbool_t app_ref, hid_t existing_id)
+H5I_register_using_existing_id(H5I_type_t type, void *object, bool app_ref, hid_t existing_id)
{
H5I_type_info_t *type_info = NULL; /* Pointer to the type */
H5I_id_info_t *info = NULL; /* Pointer to the new ID information */
@@ -637,10 +637,10 @@ H5I_register_using_existing_id(H5I_type_t type, void *object, hbool_t app_ref, h
/* This API call is only used by the native VOL connector, which is
* not asynchronous.
*/
- info->is_future = FALSE;
+ info->is_future = false;
info->realize_cb = NULL;
info->discard_cb = NULL;
- info->marked = FALSE;
+ info->marked = false;
/* Insert into the type */
HASH_ADD(hh, type_info->hash_table, id, sizeof(hid_t), info);
@@ -792,7 +792,7 @@ H5I_get_type(hid_t id)
* the ID was of the correct class since there's no
* H5I_OBJECT ID class.
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: FAIL
*
*-------------------------------------------------------------------------
@@ -809,11 +809,11 @@ H5I_is_file_object(hid_t id)
if (type < 1 || type >= H5I_NTYPES)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID type out of range");
- /* Return TRUE if the ID is a file object (dataset, group, map, or committed
- * datatype), FALSE otherwise.
+ /* Return true if the ID is a file object (dataset, group, map, or committed
+ * datatype), false otherwise.
*/
if (H5I_DATASET == type || H5I_GROUP == type || H5I_MAP == type)
- ret_value = TRUE;
+ ret_value = true;
else if (H5I_DATATYPE == type) {
H5T_t *dt = NULL;
@@ -824,7 +824,7 @@ H5I_is_file_object(hid_t id)
ret_value = H5T_is_named(dt);
}
else
- ret_value = FALSE;
+ ret_value = false;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -889,7 +889,7 @@ H5I__remove_common(H5I_type_info_t *type_info, hid_t id)
if (!H5I_marking_s)
HASH_DELETE(hh, type_info->hash_table, info);
else
- info->marked = TRUE;
+ info->marked = true;
}
else
HGOTO_ERROR(H5E_ID, H5E_CANTDELETE, NULL, "can't remove ID node from hash table");
@@ -1273,7 +1273,7 @@ H5I_dec_app_ref_always_close_async(hid_t id, void **token)
*-------------------------------------------------------------------------
*/
int
-H5I_inc_ref(hid_t id, hbool_t app_ref)
+H5I_inc_ref(hid_t id, bool app_ref)
{
H5I_id_info_t *info = NULL; /* Pointer to the ID info */
int ret_value = 0; /* Return value */
@@ -1310,7 +1310,7 @@ H5I_inc_ref(hid_t id, hbool_t app_ref)
*-------------------------------------------------------------------------
*/
int
-H5I_get_ref(hid_t id, hbool_t app_ref)
+H5I_get_ref(hid_t id, bool app_ref)
{
H5I_id_info_t *info = NULL; /* Pointer to the ID */
int ret_value = 0; /* Return value */
@@ -1503,7 +1503,7 @@ H5I__iterate_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
* Function: H5I_iterate
*
* Purpose: Apply function FUNC to each member of type TYPE (with
- * non-zero application reference count if app_ref is TRUE).
+ * non-zero application reference count if app_ref is true).
* Stop if FUNC returns a non zero value (i.e. anything
* other than H5_ITER_CONT).
*
@@ -1525,7 +1525,7 @@ H5I__iterate_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
*-------------------------------------------------------------------------
*/
herr_t
-H5I_iterate(H5I_type_t type, H5I_search_func_t func, void *udata, hbool_t app_ref)
+H5I_iterate(H5I_type_t type, H5I_search_func_t func, void *udata, bool app_ref)
{
H5I_type_info_t *type_info = NULL; /* Pointer to the type */
herr_t ret_value = SUCCEED; /* Return value */
@@ -1635,7 +1635,7 @@ H5I__find_id(hid_t id)
future_object = NULL;
/* Change the ID from 'future' to 'actual' */
- id_info->is_future = FALSE;
+ id_info->is_future = false;
id_info->realize_cb = NULL;
id_info->discard_cb = NULL;
}
diff --git a/src/H5Ipkg.h b/src/H5Ipkg.h
index 1009ecb6254..620796278f4 100644
--- a/src/H5Ipkg.h
+++ b/src/H5Ipkg.h
@@ -62,12 +62,12 @@ typedef struct H5I_id_info_t {
const void *object; /* Pointer associated with the ID */
/* Future ID info */
- hbool_t is_future; /* Whether this ID represents a future object */
+ bool is_future; /* Whether this ID represents a future object */
H5I_future_realize_func_t realize_cb; /* 'realize' callback for future object */
H5I_future_discard_func_t discard_cb; /* 'discard' callback for future object */
/* Hash table ID fields */
- hbool_t marked; /* Marked for deletion */
+ bool marked; /* Marked for deletion */
UT_hash_handle hh; /* Hash table handle (must be LAST) */
} H5I_id_info_t;
@@ -101,7 +101,7 @@ H5_DLLVAR int H5I_next_type_g;
/* Package Private Prototypes */
/******************************/
-H5_DLL hid_t H5I__register(H5I_type_t type, const void *object, hbool_t app_ref,
+H5_DLL hid_t H5I__register(H5I_type_t type, const void *object, bool app_ref,
H5I_future_realize_func_t realize_cb, H5I_future_discard_func_t discard_cb);
H5_DLL int H5I__destroy_type(H5I_type_t type);
H5_DLL void *H5I__remove_verify(hid_t id, H5I_type_t type);
@@ -111,7 +111,7 @@ H5_DLL H5I_id_info_t *H5I__find_id(hid_t id);
/* Testing functions */
#ifdef H5I_TESTING
-H5_DLL ssize_t H5I__get_name_test(hid_t id, char *name /*out*/, size_t size, hbool_t *cached);
+H5_DLL ssize_t H5I__get_name_test(hid_t id, char *name /*out*/, size_t size, bool *cached);
#endif /* H5I_TESTING */
#endif /*H5Ipkg_H*/
diff --git a/src/H5Iprivate.h b/src/H5Iprivate.h
index e59f9284269..75a5787b616 100644
--- a/src/H5Iprivate.h
+++ b/src/H5Iprivate.h
@@ -63,11 +63,11 @@ typedef struct H5I_class_t {
/***************************************/
H5_DLL herr_t H5I_register_type(const H5I_class_t *cls);
H5_DLL int64_t H5I_nmembers(H5I_type_t type);
-H5_DLL herr_t H5I_clear_type(H5I_type_t type, hbool_t force, hbool_t app_ref);
+H5_DLL herr_t H5I_clear_type(H5I_type_t type, bool force, bool app_ref);
H5_DLL H5I_type_t H5I_get_type(hid_t id);
-H5_DLL herr_t H5I_iterate(H5I_type_t type, H5I_search_func_t func, void *udata, hbool_t app_ref);
-H5_DLL int H5I_get_ref(hid_t id, hbool_t app_ref);
-H5_DLL int H5I_inc_ref(hid_t id, hbool_t app_ref);
+H5_DLL herr_t H5I_iterate(H5I_type_t type, H5I_search_func_t func, void *udata, bool app_ref);
+H5_DLL int H5I_get_ref(hid_t id, bool app_ref);
+H5_DLL int H5I_inc_ref(hid_t id, bool app_ref);
H5_DLL int H5I_dec_ref(hid_t id);
H5_DLL int H5I_dec_app_ref(hid_t id);
H5_DLL int H5I_dec_app_ref_async(hid_t id, void **token);
@@ -94,9 +94,8 @@ H5_DLL void *H5I_subst(hid_t id, const void *new_object);
H5_DLL htri_t H5I_is_file_object(hid_t id);
/* ID registration functions */
-H5_DLL hid_t H5I_register(H5I_type_t type, const void *object, hbool_t app_ref);
-H5_DLL herr_t H5I_register_using_existing_id(H5I_type_t type, void *object, hbool_t app_ref,
- hid_t existing_id);
+H5_DLL hid_t H5I_register(H5I_type_t type, const void *object, bool app_ref);
+H5_DLL herr_t H5I_register_using_existing_id(H5I_type_t type, void *object, bool app_ref, hid_t existing_id);
/* Debugging functions */
H5_DLL herr_t H5I_dump_ids_for_type(H5I_type_t type);
diff --git a/src/H5Itest.c b/src/H5Itest.c
index 68204a86d9c..a6d2c1ee3bb 100644
--- a/src/H5Itest.c
+++ b/src/H5Itest.c
@@ -61,12 +61,12 @@
*-------------------------------------------------------------------------
*/
ssize_t
-H5I__get_name_test(hid_t id, char *name /*out*/, size_t size, hbool_t *cached)
+H5I__get_name_test(hid_t id, char *name /*out*/, size_t size, bool *cached)
{
H5VL_object_t *vol_obj; /* Object of id */
H5G_loc_t loc; /* Object location */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
size_t name_len = 0; /* Length of name */
ssize_t ret_value = -1; /* Return value */
@@ -75,7 +75,7 @@ H5I__get_name_test(hid_t id, char *name /*out*/, size_t size, hbool_t *cached)
/* Set API context */
if (H5CX_push() < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTSET, (-1), "can't set API context");
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Get the object pointer */
if (NULL == (vol_obj = H5VL_vol_object(id)))
@@ -84,7 +84,7 @@ H5I__get_name_test(hid_t id, char *name /*out*/, size_t size, hbool_t *cached)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_ID, H5E_CANTSET, (-1), "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Get object location */
if (H5G_loc(id, &loc) < 0)
@@ -102,7 +102,7 @@ H5I__get_name_test(hid_t id, char *name /*out*/, size_t size, hbool_t *cached)
if (vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
HDONE_ERROR(H5E_ID, H5E_CANTRESET, (-1), "can't reset VOL wrapper info");
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTRESET, (-1), "can't reset API context");
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5L.c b/src/H5L.c
index c746ec6b60e..78cf20d4784 100644
--- a/src/H5L.c
+++ b/src/H5L.c
@@ -54,7 +54,7 @@ static herr_t H5L__delete_api_common(hid_t loc_id, const char *name, hid_t lapl_
static herr_t H5L__delete_by_idx_api_common(hid_t loc_id, const char *group_name, H5_index_t idx_type,
H5_iter_order_t order, hsize_t n, hid_t lapl_id, void **token_ptr,
H5VL_object_t **_vol_obj_ptr);
-static herr_t H5L__exists_api_common(hid_t loc_id, const char *name, hbool_t *exists, hid_t lapl_id,
+static herr_t H5L__exists_api_common(hid_t loc_id, const char *name, bool *exists, hid_t lapl_id,
void **token_ptr, H5VL_object_t **_vol_obj_ptr);
static herr_t H5L__iterate_api_common(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order,
hsize_t *idx_p, H5L_iterate2_t op, void *op_data, void **token_ptr,
@@ -107,7 +107,7 @@ H5Lmove(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *ds
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no current name specified");
if (!dst_name || !*dst_name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no destination name specified");
- if (lcpl_id != H5P_DEFAULT && (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE)))
+ if (lcpl_id != H5P_DEFAULT && (true != H5P_isa_class(lcpl_id, H5P_LINK_CREATE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a link creation property list");
/* Check the link create property list */
@@ -118,7 +118,7 @@ H5Lmove(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *ds
H5CX_set_lcpl(lcpl_id);
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, ((src_loc_id != H5L_SAME_LOC) ? src_loc_id : dst_loc_id), TRUE) <
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, ((src_loc_id != H5L_SAME_LOC) ? src_loc_id : dst_loc_id), true) <
0)
HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info");
@@ -209,7 +209,7 @@ H5Lcopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *ds
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no current name specified");
if (!dst_name || !*dst_name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no destination name specified");
- if (lcpl_id != H5P_DEFAULT && (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE)))
+ if (lcpl_id != H5P_DEFAULT && (true != H5P_isa_class(lcpl_id, H5P_LINK_CREATE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a link creation property list");
/* Check the link create property list */
@@ -220,7 +220,7 @@ H5Lcopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *ds
H5CX_set_lcpl(lcpl_id);
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, ((src_loc_id != H5L_SAME_LOC) ? src_loc_id : dst_loc_id), TRUE) <
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, ((src_loc_id != H5L_SAME_LOC) ? src_loc_id : dst_loc_id), true) <
0)
HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info");
@@ -308,7 +308,7 @@ H5L__create_soft_api_common(const char *link_target, hid_t link_loc_id, const ch
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "link_target parameter cannot be NULL");
if (!*link_target)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "link_target parameter cannot be an empty string");
- if (lcpl_id != H5P_DEFAULT && (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE)))
+ if (lcpl_id != H5P_DEFAULT && (true != H5P_isa_class(lcpl_id, H5P_LINK_CREATE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a link creation property list");
/* link_name is verified in H5VL_setup_name_args() */
@@ -320,11 +320,11 @@ H5L__create_soft_api_common(const char *link_target, hid_t link_loc_id, const ch
H5CX_set_lcpl(lcpl_id);
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, link_loc_id, TRUE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, link_loc_id, true) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info");
/* Set up object access arguments */
- if (H5VL_setup_name_args(link_loc_id, link_name, TRUE, lapl_id, vol_obj_ptr, &loc_params) < 0)
+ if (H5VL_setup_name_args(link_loc_id, link_name, true, lapl_id, vol_obj_ptr, &loc_params) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set object access arguments");
/* Set up VOL callback arguments */
@@ -451,7 +451,7 @@ H5L__create_hard_api_common(hid_t cur_loc_id, const char *cur_name, hid_t link_l
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "new_name parameter cannot be NULL");
if (!*link_name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "new_name parameter cannot be an empty string");
- if (lcpl_id != H5P_DEFAULT && (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE)))
+ if (lcpl_id != H5P_DEFAULT && (true != H5P_isa_class(lcpl_id, H5P_LINK_CREATE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a link creation property list");
/* Check the link create property list */
@@ -462,7 +462,7 @@ H5L__create_hard_api_common(hid_t cur_loc_id, const char *cur_name, hid_t link_l
H5CX_set_lcpl(lcpl_id);
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, cur_loc_id, TRUE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, cur_loc_id, true) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info");
/* Set up new location struct */
@@ -657,7 +657,7 @@ H5Lcreate_external(const char *file_name, const char *obj_name, hid_t link_loc_i
H5CX_set_lcpl(lcpl_id);
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, link_loc_id, TRUE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, link_loc_id, true) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info");
/* Get normalized copy of the link target */
@@ -665,8 +665,8 @@ H5Lcreate_external(const char *file_name, const char *obj_name, hid_t link_loc_i
HGOTO_ERROR(H5E_LINK, H5E_BADVALUE, FAIL, "can't normalize object name");
/* Combine the filename and link name into a single buffer to give to the UD link */
- file_name_len = HDstrlen(file_name) + 1;
- norm_obj_name_len = HDstrlen(norm_obj_name) + 1;
+ file_name_len = strlen(file_name) + 1;
+ norm_obj_name_len = strlen(norm_obj_name) + 1;
buf_size = 1 + file_name_len + norm_obj_name_len;
if (NULL == (ext_link_buf = H5MM_malloc(buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate udata buffer");
@@ -674,9 +674,9 @@ H5Lcreate_external(const char *file_name, const char *obj_name, hid_t link_loc_i
/* Encode the external link information */
p = (uint8_t *)ext_link_buf;
*p++ = (H5L_EXT_VERSION << 4) | H5L_EXT_FLAGS_ALL; /* External link version & flags */
- HDstrncpy((char *)p, file_name, buf_size - 1); /* Name of file containing external link's object */
+ strncpy((char *)p, file_name, buf_size - 1); /* Name of file containing external link's object */
p += file_name_len;
- HDstrncpy((char *)p, norm_obj_name, buf_size - (file_name_len + 1)); /* External link's object */
+ strncpy((char *)p, norm_obj_name, buf_size - (file_name_len + 1)); /* External link's object */
loc_params.type = H5VL_OBJECT_BY_NAME;
loc_params.loc_data.loc_by_name.name = link_name;
@@ -754,7 +754,7 @@ H5Lcreate_ud(hid_t link_loc_id, const char *link_name, H5L_type_t link_type, con
H5CX_set_lcpl(lcpl_id);
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, link_loc_id, TRUE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, link_loc_id, true) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info");
loc_params.type = H5VL_OBJECT_BY_NAME;
@@ -807,7 +807,7 @@ H5L__delete_api_common(hid_t loc_id, const char *name, hid_t lapl_id, void **tok
/* name is verified in H5VL_setup_name_args() */
/* Set up object access arguments */
- if (H5VL_setup_name_args(loc_id, name, TRUE, lapl_id, vol_obj_ptr, &loc_params) < 0)
+ if (H5VL_setup_name_args(loc_id, name, true, lapl_id, vol_obj_ptr, &loc_params) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set object access arguments");
/* Set up VOL callback arguments */
@@ -925,7 +925,7 @@ H5L__delete_by_idx_api_common(hid_t loc_id, const char *group_name, H5_index_t i
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified");
/* Set up object access arguments */
- if (H5VL_setup_idx_args(loc_id, group_name, idx_type, order, n, TRUE, lapl_id, vol_obj_ptr, &loc_params) <
+ if (H5VL_setup_idx_args(loc_id, group_name, idx_type, order, n, true, lapl_id, vol_obj_ptr, &loc_params) <
0)
HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set object access arguments");
@@ -1049,7 +1049,7 @@ H5Lget_val(hid_t loc_id, const char *name, void *buf /*out*/, size_t size, hid_t
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info");
/* Set up location struct */
@@ -1111,7 +1111,7 @@ H5Lget_val_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info");
/* Set up location struct */
@@ -1150,7 +1150,7 @@ H5Lget_val_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_
*
*--------------------------------------------------------------------------*/
static herr_t
-H5L__exists_api_common(hid_t loc_id, const char *name, hbool_t *exists, hid_t lapl_id, void **token_ptr,
+H5L__exists_api_common(hid_t loc_id, const char *name, bool *exists, hid_t lapl_id, void **token_ptr,
H5VL_object_t **_vol_obj_ptr)
{
H5VL_object_t *tmp_vol_obj = NULL; /* Object for loc_id */
@@ -1168,7 +1168,7 @@ H5L__exists_api_common(hid_t loc_id, const char *name, hbool_t *exists, hid_t la
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid pointer for link existence");
/* Set up object access arguments */
- if (H5VL_setup_name_args(loc_id, name, FALSE, lapl_id, vol_obj_ptr, &loc_params) < 0)
+ if (H5VL_setup_name_args(loc_id, name, false, lapl_id, vol_obj_ptr, &loc_params) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set object access arguments");
/* Set up VOL callback arguments */
@@ -1188,21 +1188,21 @@ H5L__exists_api_common(hid_t loc_id, const char *name, hbool_t *exists, hid_t la
*
* Purpose: Checks if a link of a given name exists in a group
*
- * Return: Success: TRUE/FALSE/FAIL
+ * Return: Success: true/false/FAIL
*
*-------------------------------------------------------------------------
*/
htri_t
H5Lexists(hid_t loc_id, const char *name, hid_t lapl_id)
{
- hbool_t exists; /* Flag to indicate if link exists */
- htri_t ret_value = FAIL; /* Return value */
+ bool exists; /* Flag to indicate if link exists */
+ htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE3("t", "i*si", loc_id, name, lapl_id);
/* Synchronously check if a link exists */
- exists = FALSE;
+ exists = false;
if (H5L__exists_api_common(loc_id, name, &exists, lapl_id, NULL, NULL) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to synchronously check link existence");
@@ -1218,7 +1218,7 @@ H5Lexists(hid_t loc_id, const char *name, hid_t lapl_id)
*
* Purpose: Asynchronous version of H5Lexists
*
- * Return: Success: TRUE/FALSE/FAIL
+ * Return: Success: true/false/FAIL
*
*--------------------------------------------------------------------------*/
herr_t
@@ -1279,7 +1279,7 @@ H5Lget_info2(hid_t loc_id, const char *name, H5L_info2_t *linfo /*out*/, hid_t l
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, TRUE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, true) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info");
/* Set up location struct */
@@ -1336,7 +1336,7 @@ H5Lget_info_by_idx2(hid_t loc_id, const char *group_name, H5_index_t idx_type, H
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info");
/* Set up location struct */
@@ -1460,8 +1460,8 @@ H5Lunregister(H5L_type_t id)
* Purpose: Tests whether a user-defined link class has been registered
* or not.
*
- * Return: TRUE if the link class has been registered
- * FALSE if it is unregistered
+ * Return: true if the link class has been registered
+ * false if it is unregistered
* FAIL on error (if the class is not a valid UD class ID)
*
*-------------------------------------------------------------------------
@@ -1469,8 +1469,8 @@ H5Lunregister(H5L_type_t id)
htri_t
H5Lis_registered(H5L_type_t id)
{
- hbool_t is_registered = FALSE;
- htri_t ret_value = FALSE; /* Return value */
+ bool is_registered = false;
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE1("t", "Ll", id);
@@ -1483,7 +1483,7 @@ H5Lis_registered(H5L_type_t id)
if (H5L_is_registered(id, &is_registered) < 0)
HGOTO_ERROR(H5E_LINK, H5E_BADTYPE, FAIL, "could not determine registration status of UD link type");
- ret_value = is_registered ? TRUE : FALSE;
+ ret_value = is_registered ? true : false;
done:
FUNC_LEAVE_API(ret_value)
@@ -1526,7 +1526,7 @@ H5Lget_name_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "invalid iteration order specified");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, TRUE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, true) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTSET, (-1), "can't set access property list info");
/* Set up location struct */
@@ -1599,7 +1599,7 @@ H5L__iterate_api_common(hid_t group_id, H5_index_t idx_type, H5_iter_order_t ord
/* Set up VOL callback arguments */
vol_cb_args.op_type = H5VL_LINK_ITER;
- vol_cb_args.args.iterate.recursive = FALSE;
+ vol_cb_args.args.iterate.recursive = false;
vol_cb_args.args.iterate.idx_type = idx_type;
vol_cb_args.args.iterate.order = order;
vol_cb_args.args.iterate.idx_p = idx_p;
@@ -1745,7 +1745,7 @@ H5Literate_by_name2(hid_t loc_id, const char *group_name, H5_index_t idx_type, H
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no operator specified");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info");
/* Get the location object */
@@ -1760,7 +1760,7 @@ H5Literate_by_name2(hid_t loc_id, const char *group_name, H5_index_t idx_type, H
/* Set up VOL callback arguments */
vol_cb_args.op_type = H5VL_LINK_ITER;
- vol_cb_args.args.iterate.recursive = FALSE;
+ vol_cb_args.args.iterate.recursive = false;
vol_cb_args.args.iterate.idx_type = idx_type;
vol_cb_args.args.iterate.order = order;
vol_cb_args.args.iterate.idx_p = idx_p;
@@ -1834,7 +1834,7 @@ H5Lvisit2(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, H5L_iterat
/* Set up VOL callback arguments */
vol_cb_args.op_type = H5VL_LINK_ITER;
- vol_cb_args.args.iterate.recursive = TRUE;
+ vol_cb_args.args.iterate.recursive = true;
vol_cb_args.args.iterate.idx_type = idx_type;
vol_cb_args.args.iterate.order = order;
vol_cb_args.args.iterate.idx_p = NULL;
@@ -1900,7 +1900,7 @@ H5Lvisit_by_name2(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback operator specified");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info");
/* get the location object */
@@ -1915,7 +1915,7 @@ H5Lvisit_by_name2(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_
/* Set up VOL callback arguments */
vol_cb_args.op_type = H5VL_LINK_ITER;
- vol_cb_args.args.iterate.recursive = TRUE;
+ vol_cb_args.args.iterate.recursive = true;
vol_cb_args.args.iterate.idx_type = idx_type;
vol_cb_args.args.iterate.order = order;
vol_cb_args.args.iterate.idx_p = NULL;
@@ -1982,10 +1982,10 @@ H5Lunpack_elink_val(const void *_ext_linkval, size_t link_size, unsigned *flags,
if (ext_linkval[link_size - 1] != '\0')
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "linkval buffer is not NULL-terminated");
- /* We're now guaranteed that HDstrlen won't segfault, since the buffer has
+ /* We're now guaranteed that strlen won't segfault, since the buffer has
* at least one NULL in it.
*/
- len = HDstrlen((const char *)ext_linkval + 1);
+ len = strlen((const char *)ext_linkval + 1);
/* If the first NULL we found was at the very end of the buffer, then
* this external link value has no object name and is invalid.
diff --git a/src/H5Ldeprec.c b/src/H5Ldeprec.c
index 1399eecff99..40734e1979c 100644
--- a/src/H5Ldeprec.c
+++ b/src/H5Ldeprec.c
@@ -145,7 +145,7 @@ H5Literate1(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, hsize_t
H5VL_loc_params_t loc_params;
H5I_type_t id_type; /* Type of ID */
H5L_shim_data_t shim_data;
- hbool_t is_native_vol_obj;
+ bool is_native_vol_obj;
herr_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -183,7 +183,7 @@ H5Literate1(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, hsize_t
/* Set up VOL callback arguments */
vol_cb_args.op_type = H5VL_LINK_ITER;
- vol_cb_args.args.iterate.recursive = FALSE;
+ vol_cb_args.args.iterate.recursive = false;
vol_cb_args.args.iterate.idx_type = idx_type;
vol_cb_args.args.iterate.order = order;
vol_cb_args.args.iterate.idx_p = idx_p;
@@ -227,7 +227,7 @@ H5Literate_by_name1(hid_t loc_id, const char *group_name, H5_index_t idx_type, H
H5VL_link_specific_args_t vol_cb_args; /* Arguments to VOL callback */
H5VL_loc_params_t loc_params;
H5L_shim_data_t shim_data;
- hbool_t is_native_vol_obj;
+ bool is_native_vol_obj;
herr_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -246,7 +246,7 @@ H5Literate_by_name1(hid_t loc_id, const char *group_name, H5_index_t idx_type, H
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no operator specified");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info");
/* Get the location object */
@@ -272,7 +272,7 @@ H5Literate_by_name1(hid_t loc_id, const char *group_name, H5_index_t idx_type, H
/* Set up VOL callback arguments */
vol_cb_args.op_type = H5VL_LINK_ITER;
- vol_cb_args.args.iterate.recursive = FALSE;
+ vol_cb_args.args.iterate.recursive = false;
vol_cb_args.args.iterate.idx_type = idx_type;
vol_cb_args.args.iterate.order = order;
vol_cb_args.args.iterate.idx_p = idx_p;
@@ -307,7 +307,7 @@ H5Lget_info1(hid_t loc_id, const char *name, H5L_info1_t *linfo /*out*/, hid_t l
H5VL_link_get_args_t vol_cb_args; /* Arguments to VOL callback */
H5VL_loc_params_t loc_params;
H5L_info2_t linfo2; /* New-style link info */
- hbool_t is_native_vol_obj;
+ bool is_native_vol_obj;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -318,7 +318,7 @@ H5Lget_info1(hid_t loc_id, const char *name, H5L_info1_t *linfo /*out*/, hid_t l
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, TRUE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, true) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info");
/* Set up location struct */
@@ -392,7 +392,7 @@ H5Lget_info_by_idx1(hid_t loc_id, const char *group_name, H5_index_t idx_type, H
H5VL_link_get_args_t vol_cb_args; /* Arguments to VOL callback */
H5VL_loc_params_t loc_params;
H5L_info2_t linfo2; /* New-style link info */
- hbool_t is_native_vol_obj;
+ bool is_native_vol_obj;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -407,7 +407,7 @@ H5Lget_info_by_idx1(hid_t loc_id, const char *group_name, H5_index_t idx_type, H
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info");
/* Set up location struct */
@@ -498,7 +498,7 @@ H5Lvisit1(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, H5L_iterat
H5VL_loc_params_t loc_params;
H5I_type_t id_type; /* Type of ID */
H5L_shim_data_t shim_data;
- hbool_t is_native_vol_obj;
+ bool is_native_vol_obj;
herr_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -536,7 +536,7 @@ H5Lvisit1(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, H5L_iterat
/* Set up VOL callback arguments */
vol_cb_args.op_type = H5VL_LINK_ITER;
- vol_cb_args.args.iterate.recursive = TRUE;
+ vol_cb_args.args.iterate.recursive = true;
vol_cb_args.args.iterate.idx_type = idx_type;
vol_cb_args.args.iterate.order = order;
vol_cb_args.args.iterate.idx_p = NULL;
@@ -587,7 +587,7 @@ H5Lvisit_by_name1(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_
H5VL_link_specific_args_t vol_cb_args; /* Arguments to VOL callback */
H5VL_loc_params_t loc_params;
H5L_shim_data_t shim_data;
- hbool_t is_native_vol_obj;
+ bool is_native_vol_obj;
herr_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -606,7 +606,7 @@ H5Lvisit_by_name1(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback operator specified");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info");
/* get the location object */
@@ -632,7 +632,7 @@ H5Lvisit_by_name1(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_
/* Set up VOL callback arguments */
vol_cb_args.op_type = H5VL_LINK_ITER;
- vol_cb_args.args.iterate.recursive = TRUE;
+ vol_cb_args.args.iterate.recursive = true;
vol_cb_args.args.iterate.idx_type = idx_type;
vol_cb_args.args.iterate.order = order;
vol_cb_args.args.iterate.idx_p = NULL;
diff --git a/src/H5Lexternal.c b/src/H5Lexternal.c
index d7edbad0e17..56c3117f081 100644
--- a/src/H5Lexternal.c
+++ b/src/H5Lexternal.c
@@ -132,7 +132,7 @@ H5L__extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group, cons
/* Gather some information from the external link's user data */
file_name = (const char *)p;
- fname_len = HDstrlen(file_name);
+ fname_len = strlen(file_name);
obj_name = (const char *)p + fname_len + 1;
/* Get the plist structure */
@@ -156,7 +156,7 @@ H5L__extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group, cons
if (intent == H5F_ACC_DEFAULT)
intent = H5F_INTENT(loc.oloc->file);
- if ((fapl_id == H5P_DEFAULT) && ((fapl_id = H5F_get_access_plist(loc.oloc->file, FALSE)) < 0))
+ if ((fapl_id == H5P_DEFAULT) && ((fapl_id = H5F_get_access_plist(loc.oloc->file, false)) < 0))
HGOTO_ERROR(H5E_LINK, H5E_CANTGET, H5I_INVALID_HID, "can't get parent's file access property list");
/* Get callback_info */
@@ -228,7 +228,7 @@ H5L__extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group, cons
HGOTO_ERROR(H5E_LINK, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object");
/* Get an ID for the external link's object */
- if ((ext_obj_id = H5VL_wrap_register(opened_type, ext_obj, TRUE)) < 0)
+ if ((ext_obj_id = H5VL_wrap_register(opened_type, ext_obj, true)) < 0)
HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register external link object");
/* Set return value */
diff --git a/src/H5Lint.c b/src/H5Lint.c
index 554dd14844f..e33ad939ef8 100644
--- a/src/H5Lint.c
+++ b/src/H5Lint.c
@@ -105,7 +105,7 @@ typedef struct {
H5T_cset_t cset; /* Char set for new name */
const H5G_loc_t *dst_loc; /* Destination location for moving object */
unsigned dst_target_flags; /* Target flags for destination object */
- hbool_t copy; /* TRUE if this is a copy operation */
+ bool copy; /* true if this is a copy operation */
size_t orig_nlinks; /* The original value for the # of soft / UD links that can be traversed */
} H5L_trav_mv_t;
@@ -113,7 +113,7 @@ typedef struct {
typedef struct {
H5F_t *file; /* Pointer to the file */
H5O_link_t *lnk; /* Pointer to link information to insert */
- hbool_t copy; /* TRUE if this is a copy operation */
+ bool copy; /* true if this is a copy operation */
} H5L_trav_mv2_t;
/* User data for path traversal routine for checking if a link exists */
@@ -122,7 +122,7 @@ typedef struct {
char *sep; /* Pointer to next separator in the string */
/* Up */
- hbool_t *exists; /* Whether the link exists or not */
+ bool *exists; /* Whether the link exists or not */
} H5L_trav_le_t;
/* User data for path traversal routine for getting link value */
@@ -397,7 +397,7 @@ H5L_unregister(H5L_type_t id)
*-------------------------------------------------------------------------
*/
herr_t
-H5L_is_registered(H5L_type_t id, hbool_t *is_registered)
+H5L_is_registered(H5L_type_t id, bool *is_registered)
{
size_t i; /* Local index variable */
@@ -407,10 +407,10 @@ H5L_is_registered(H5L_type_t id, hbool_t *is_registered)
assert(is_registered);
/* Is the link class already registered? */
- *is_registered = FALSE;
+ *is_registered = false;
for (i = 0; i < H5L_table_used_g; i++)
if (H5L_table_g[i].id == id) {
- *is_registered = TRUE;
+ *is_registered = true;
break;
}
@@ -509,12 +509,12 @@ H5L__link_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t H5_AT
H5G_loc_t *obj_loc, void *_udata /*in,out*/, H5G_own_loc_t *own_loc /*out*/)
{
H5L_trav_cr_t *udata = (H5L_trav_cr_t *)_udata; /* User data passed in */
- H5G_t *grp = NULL; /* H5G_t for this group, opened to pass to user callback */
- hid_t grp_id = FAIL; /* Id for this group (passed to user callback */
- H5G_loc_t temp_loc; /* For UD callback */
- hbool_t temp_loc_init = FALSE; /* Temporary location for UD callback (temp_loc) has been initialized */
- hbool_t obj_created = FALSE; /* Whether an object was created (through a hard link) */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_t *grp = NULL; /* H5G_t for this group, opened to pass to user callback */
+ hid_t grp_id = FAIL; /* Id for this group (passed to user callback */
+ H5G_loc_t temp_loc; /* For UD callback */
+ bool temp_loc_init = false; /* Temporary location for UD callback (temp_loc) has been initialized */
+ bool obj_created = false; /* Whether an object was created (through a hard link) */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -543,7 +543,7 @@ H5L__link_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t H5_AT
udata->path = new_loc.path;
/* Indicate that an object was created */
- obj_created = TRUE;
+ obj_created = true;
} /* end if */
else {
/* Check that both objects are in same file */
@@ -555,7 +555,7 @@ H5L__link_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t H5_AT
/* Set 'standard' aspects of link */
udata->lnk->corder =
0; /* Will be re-written during group insertion, if the group is tracking creation order */
- udata->lnk->corder_valid = FALSE; /* Creation order not valid (yet) */
+ udata->lnk->corder_valid = false; /* Creation order not valid (yet) */
/* Check for non-default link creation properties */
if (udata->lc_plist) {
@@ -572,7 +572,7 @@ H5L__link_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t H5_AT
H5_GCC_CLANG_DIAG_ON("cast-qual")
/* Insert link into group */
- if (H5G_obj_insert(grp_loc->oloc, name, udata->lnk, TRUE,
+ if (H5G_obj_insert(grp_loc->oloc, name, udata->lnk, true,
udata->ocrt_info ? udata->ocrt_info->obj_type : H5O_TYPE_UNKNOWN,
udata->ocrt_info ? udata->ocrt_info->crt_info : NULL) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create new link for object");
@@ -603,12 +603,12 @@ H5L__link_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t H5_AT
temp_loc.oloc = &temp_oloc;
temp_loc.path = &temp_path;
- temp_loc_init = TRUE;
+ temp_loc_init = true;
/* Set up location for user-defined callback */
if (NULL == (grp = H5G_open(&temp_loc)))
HGOTO_ERROR(H5E_LINK, H5E_CANTOPENOBJ, FAIL, "unable to open group");
- if ((grp_id = H5VL_wrap_register(H5I_GROUP, grp, TRUE)) < 0)
+ if ((grp_id = H5VL_wrap_register(H5I_GROUP, grp, true)) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTREGISTER, FAIL, "unable to register ID for group");
/* Make callback */
@@ -755,7 +755,7 @@ H5L__create_hard(H5G_loc_t *cur_loc, const char *cur_name, const H5G_loc_t *link
H5G_loc_t obj_loc; /* Location of object to link to */
H5G_name_t path; /* obj_loc's path*/
H5O_loc_t oloc; /* obj_loc's oloc */
- hbool_t loc_valid = FALSE;
+ bool loc_valid = false;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -779,7 +779,7 @@ H5L__create_hard(H5G_loc_t *cur_loc, const char *cur_name, const H5G_loc_t *link
H5G_loc_reset(&obj_loc);
if (H5G_loc_find(cur_loc, norm_cur_name, &obj_loc) < 0)
HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "source object not found");
- loc_valid = TRUE;
+ loc_valid = true;
/* Construct link information for eventual insertion */
lnk.u.hard.addr = obj_loc.oloc->addr;
@@ -925,8 +925,8 @@ H5L__get_val_real(const H5O_link_t *lnk, void *buf, size_t size)
if (H5L_TYPE_SOFT == lnk->type) {
/* Copy to output buffer */
if (size > 0 && buf) {
- HDstrncpy((char *)buf, lnk->u.soft.name, size);
- if (HDstrlen(lnk->u.soft.name) >= size)
+ strncpy((char *)buf, lnk->u.soft.name, size);
+ if (strlen(lnk->u.soft.name) >= size)
((char *)buf)[size - 1] = '\0';
} /* end if */
} /* end if */
@@ -1045,7 +1045,7 @@ H5L__get_val_by_idx_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_A
{
H5L_trav_gvbi_t *udata = (H5L_trav_gvbi_t *)_udata; /* User data passed in */
H5O_link_t fnd_lnk; /* Link within group */
- hbool_t lnk_copied = FALSE; /* Whether the link was copied */
+ bool lnk_copied = false; /* Whether the link was copied */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1057,7 +1057,7 @@ H5L__get_val_by_idx_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_A
/* Query link */
if (H5G_obj_lookup_by_idx(obj_loc->oloc, udata->idx_type, udata->order, udata->n, &fnd_lnk) < 0)
HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "link not found");
- lnk_copied = TRUE;
+ lnk_copied = true;
/* Retrieve the value for the link */
if (H5L__get_val_real(&fnd_lnk, udata->buf, udata->size) < 0)
@@ -1290,7 +1290,7 @@ H5L__move_dest_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t
H5G_t *grp = NULL; /* H5G_t for this group, opened to pass to user callback */
hid_t grp_id = FAIL; /* ID for this group (passed to user callback */
H5G_loc_t temp_loc; /* For UD callback */
- hbool_t temp_loc_init = FALSE;
+ bool temp_loc_init = false;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1312,7 +1312,7 @@ H5L__move_dest_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t
H5_GCC_CLANG_DIAG_ON("cast-qual")
/* Insert the link into the group */
- if (H5G_obj_insert(grp_loc->oloc, name, udata->lnk, TRUE, H5O_TYPE_UNKNOWN, NULL) < 0)
+ if (H5G_obj_insert(grp_loc->oloc, name, udata->lnk, true, H5O_TYPE_UNKNOWN, NULL) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create new link to object");
/* If the link was a user-defined link, call its move callback if it has one */
@@ -1336,12 +1336,12 @@ H5L__move_dest_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t
temp_loc.oloc = &temp_oloc;
temp_loc.path = &temp_path;
- temp_loc_init = TRUE;
+ temp_loc_init = true;
/* Set up location for user-defined callback */
if (NULL == (grp = H5G_open(&temp_loc)))
HGOTO_ERROR(H5E_LINK, H5E_CANTOPENOBJ, FAIL, "unable to open group");
- if ((grp_id = H5VL_wrap_register(H5I_GROUP, grp, TRUE)) < 0)
+ if ((grp_id = H5VL_wrap_register(H5I_GROUP, grp, true)) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTREGISTER, FAIL, "unable to register group ID");
if (udata->copy) {
@@ -1399,7 +1399,7 @@ H5L__move_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t *lnk,
H5L_trav_mv_t *udata = (H5L_trav_mv_t *)_udata; /* User data passed in */
H5L_trav_mv2_t udata_out; /* User data for H5L__move_dest_cb traversal */
char *orig_name = NULL; /* The name of the link in this group */
- hbool_t link_copied = FALSE; /* Has udata_out.lnk been allocated? */
+ bool link_copied = false; /* Has udata_out.lnk been allocated? */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1420,7 +1420,7 @@ H5L__move_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t *lnk,
* destination, so we should free it here.
*/
udata_out.lnk->name = (char *)H5MM_xfree(udata_out.lnk->name);
- link_copied = TRUE;
+ link_copied = true;
udata_out.lnk->cset = udata->cset;
udata_out.file = grp_loc->oloc->file;
@@ -1502,7 +1502,7 @@ H5L__move_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t *lnk,
* location, while DST_LOC and DST_NAME together define its
* final location.
*
- * If copy_flag is FALSE, the original link is removed
+ * If copy_flag is false, the original link is removed
* (effectively moving the link).
*
* Return: Non-negative on success/Negative on failure
@@ -1511,7 +1511,7 @@ H5L__move_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t *lnk,
*/
herr_t
H5L__move(const H5G_loc_t *src_loc, const char *src_name, const H5G_loc_t *dst_loc, const char *dst_name,
- hbool_t copy_flag, hid_t lcpl_id)
+ bool copy_flag, hid_t lcpl_id)
{
unsigned dst_target_flags = H5G_TARGET_NORMAL;
H5T_cset_t char_encoding = H5F_DEFAULT_CSET; /* Character encoding for link */
@@ -1589,7 +1589,7 @@ H5L__exists_final_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ATT
FUNC_ENTER_PACKAGE_NOERR
/* Check if the name in this group resolved to a valid link */
- *udata->exists = (hbool_t)(lnk != NULL);
+ *udata->exists = (bool)(lnk != NULL);
/* Indicate that this callback didn't take ownership of the group *
* location for the object */
@@ -1627,7 +1627,7 @@ H5L__exists_inter_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ATT
/* Look for another separator */
next = udata->sep;
- if (NULL == (udata->sep = HDstrchr(udata->sep, '/')))
+ if (NULL == (udata->sep = strchr(udata->sep, '/')))
cb_func = H5L__exists_final_cb;
else {
/* Chew through adjacent separators, if present */
@@ -1641,10 +1641,10 @@ H5L__exists_inter_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ATT
HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't determine if link exists");
} /* end if */
else
- *udata->exists = TRUE;
+ *udata->exists = true;
} /* end if */
else
- *udata->exists = FALSE;
+ *udata->exists = false;
/* Indicate that this callback didn't take ownership of the group *
* location for the object */
@@ -1660,14 +1660,14 @@ H5L__exists_inter_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ATT
* Purpose: Returns whether a link exists in a group
*
* Note: Same as H5L__exists, except that missing links are reported
- * as 'FALSE' instead of causing failures
+ * as 'false' instead of causing failures
*
- * Return: Non-negative (TRUE/FALSE) on success/Negative on failure
+ * Return: Non-negative (true/false) on success/Negative on failure
*
*-------------------------------------------------------------------------
*/
herr_t
-H5L_exists_tolerant(const H5G_loc_t *loc, const char *name, hbool_t *exists)
+H5L_exists_tolerant(const H5G_loc_t *loc, const char *name, bool *exists)
{
H5L_trav_le_t udata; /* User data for traversal */
H5G_traverse_t cb_func; /* Callback function for traversal */
@@ -1689,11 +1689,11 @@ H5L_exists_tolerant(const H5G_loc_t *loc, const char *name, hbool_t *exists)
/* A path of "/" will always exist in a file */
if ('\0' == *name_trav)
- *exists = TRUE;
+ *exists = true;
else {
/* Set up user data & correct callback */
udata.exists = exists;
- if (NULL == (udata.sep = HDstrchr(name_trav, '/')))
+ if (NULL == (udata.sep = strchr(name_trav, '/')))
cb_func = H5L__exists_final_cb;
else {
/* Chew through adjacent separators, if present */
@@ -1729,7 +1729,7 @@ H5L_exists_tolerant(const H5G_loc_t *loc, const char *name, hbool_t *exists)
*-------------------------------------------------------------------------
*/
herr_t
-H5L__exists(const H5G_loc_t *loc, const char *name, hbool_t *exists)
+H5L__exists(const H5G_loc_t *loc, const char *name, bool *exists)
{
H5L_trav_le_t udata; /* User data for traversal */
herr_t ret_value = SUCCEED; /* Return value */
@@ -1742,8 +1742,8 @@ H5L__exists(const H5G_loc_t *loc, const char *name, hbool_t *exists)
assert(exists);
/* A path of "/" will always exist in a file */
- if (0 == HDstrcmp(name, "/"))
- *exists = TRUE;
+ if (0 == strcmp(name, "/"))
+ *exists = true;
else {
/* Traverse the group hierarchy to locate the object to get info about */
udata.exists = exists;
@@ -1833,7 +1833,7 @@ H5L__get_info_by_idx_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_
{
H5L_trav_gibi_t *udata = (H5L_trav_gibi_t *)_udata; /* User data passed in */
H5O_link_t fnd_lnk; /* Link within group */
- hbool_t lnk_copied = FALSE; /* Whether the link was copied */
+ bool lnk_copied = false; /* Whether the link was copied */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1845,7 +1845,7 @@ H5L__get_info_by_idx_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_
/* Query link */
if (H5G_obj_lookup_by_idx(obj_loc->oloc, udata->idx_type, udata->order, udata->n, &fnd_lnk) < 0)
HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "link not found");
- lnk_copied = TRUE;
+ lnk_copied = true;
/* Get information from the link */
if (H5G_link_to_info(obj_loc->oloc, &fnd_lnk, udata->linfo) < 0)
@@ -1998,8 +1998,8 @@ H5L__link_copy_file(H5F_t *dst_file, const H5O_link_t *_src_lnk, const H5O_loc_t
{
H5O_link_t tmp_src_lnk; /* Temporary copy of src link, when needed */
const H5O_link_t *src_lnk = _src_lnk; /* Source link */
- hbool_t dst_lnk_init = FALSE; /* Whether the destination link is initialized */
- hbool_t expanded_link_open = FALSE; /* Whether the target location has been opened */
+ bool dst_lnk_init = false; /* Whether the destination link is initialized */
+ bool expanded_link_open = false; /* Whether the target location has been opened */
H5G_loc_t tmp_src_loc; /* Group location holding target object */
H5G_name_t tmp_src_path; /* Path for target object */
H5O_loc_t tmp_src_oloc; /* Object location for target object */
@@ -2018,7 +2018,7 @@ H5L__link_copy_file(H5F_t *dst_file, const H5O_link_t *_src_lnk, const H5O_loc_t
(H5L_TYPE_EXTERNAL == src_lnk->type && cpy_info->expand_ext_link)) {
H5G_loc_t lnk_grp_loc; /* Group location holding link */
H5G_name_t lnk_grp_path; /* Path for link */
- hbool_t tar_exists = FALSE; /* Whether the target object exists */
+ bool tar_exists = false; /* Whether the target object exists */
/* Set up group location for link */
H5G_name_reset(&lnk_grp_path);
@@ -2047,7 +2047,7 @@ H5L__link_copy_file(H5F_t *dst_file, const H5O_link_t *_src_lnk, const H5O_loc_t
/* Find the target object */
if (H5G_loc_find(&lnk_grp_loc, src_lnk->name, &tmp_src_loc) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to find target object");
- expanded_link_open = TRUE;
+ expanded_link_open = true;
/* Convert symbolic link to hard link */
if (tmp_src_lnk.type == H5L_TYPE_SOFT)
@@ -2063,7 +2063,7 @@ H5L__link_copy_file(H5F_t *dst_file, const H5O_link_t *_src_lnk, const H5O_loc_t
/* Copy src link information to dst link information */
if (NULL == H5O_msg_copy(H5O_LINK_ID, src_lnk, dst_lnk))
HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to copy message");
- dst_lnk_init = TRUE;
+ dst_lnk_init = true;
/* Check if object in source group is a hard link & copy it */
if (H5L_TYPE_HARD == src_lnk->type) {
@@ -2084,7 +2084,7 @@ H5L__link_copy_file(H5F_t *dst_file, const H5O_link_t *_src_lnk, const H5O_loc_t
/* Copy the shared object from source to destination */
/* Don't care about obj_type or udata because those are only important
* for old style groups */
- if (H5O_copy_header_map(&tmp_src_oloc, &new_dst_oloc, cpy_info, TRUE, NULL, NULL) < 0)
+ if (H5O_copy_header_map(&tmp_src_oloc, &new_dst_oloc, cpy_info, true, NULL, NULL) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to copy object");
/* Copy new destination object's information for eventual insertion */
diff --git a/src/H5Lmodule.h b/src/H5Lmodule.h
index 26f9045334e..7ab67da8138 100644
--- a/src/H5Lmodule.h
+++ b/src/H5Lmodule.h
@@ -33,32 +33,16 @@
* \defgroup H5L Links (H5L)
*
* Use the functions in this module to manage HDF5 links and link types.
- *
- *
- * Create | Read |
- *
- *
- * \snippet{lineno} H5L_examples.c create
- * |
- *
- * \snippet{lineno} H5L_examples.c iter_cb
- * \snippet{lineno} H5L_examples.c read
- * |
- *
Update | Delete |
- *
- *
- * \snippet{lineno} H5L_examples.c update
- * |
- *
- * \snippet{lineno} H5L_examples.c delete
- * |
- *
- *
+ * @see \ref TRAV for #H5Literate, #H5Literate_by_name and #H5Lvisit, #H5Lvisit_by_name
+ * @see \ref H5LA for #H5Lregister, #H5Lunregister and #H5Lis_registered
*
* \defgroup TRAV Link Traversal
* \ingroup H5L
+ * Traverse through links
+ *
* \defgroup H5LA Advanced Link Functions
* \ingroup H5L
+ * Registration of User-defined links
*/
#endif /* H5Lmodule_H */
diff --git a/src/H5Lpkg.h b/src/H5Lpkg.h
index 53737d1a3aa..0b04fdcb769 100644
--- a/src/H5Lpkg.h
+++ b/src/H5Lpkg.h
@@ -49,7 +49,7 @@ H5_DLL herr_t H5L__create_soft(const char *target_path, const H5G_loc_t *cur_loc
hid_t lcpl_id);
H5_DLL herr_t H5L__create_ud(const H5G_loc_t *link_loc, const char *link_name, const void *ud_data,
size_t ud_data_size, H5L_type_t type, hid_t lcpl_id);
-H5_DLL herr_t H5L__exists(const H5G_loc_t *loc, const char *name, hbool_t *exists);
+H5_DLL herr_t H5L__exists(const H5G_loc_t *loc, const char *name, bool *exists);
H5_DLL herr_t H5L__get_info_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type,
H5_iter_order_t order, hsize_t n, H5L_info2_t *linfo /*out*/);
H5_DLL herr_t H5L__get_name_by_idx(const H5G_loc_t *loc, const char *group_name, H5_index_t idx_type,
@@ -59,7 +59,7 @@ H5_DLL herr_t H5L__get_val(const H5G_loc_t *loc, const char *name, void *buf /*o
H5_DLL herr_t H5L__get_val_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type,
H5_iter_order_t order, hsize_t n, void *buf /*out*/, size_t size);
H5_DLL herr_t H5L__move(const H5G_loc_t *src_loc, const char *src_name, const H5G_loc_t *dst_loc,
- const char *dst_name, hbool_t copy_flag, hid_t lcpl_id);
+ const char *dst_name, bool copy_flag, hid_t lcpl_id);
H5_DLL herr_t H5L__delete(const H5G_loc_t *loc, const char *name);
H5_DLL herr_t H5L__delete_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type,
H5_iter_order_t order, hsize_t n);
diff --git a/src/H5Lprivate.h b/src/H5Lprivate.h
index cfdfb227b2c..150a07986e1 100644
--- a/src/H5Lprivate.h
+++ b/src/H5Lprivate.h
@@ -70,7 +70,7 @@ H5_DLL herr_t H5L_init(void);
H5_DLL herr_t H5L_link(const H5G_loc_t *new_loc, const char *new_name, H5G_loc_t *obj_loc, hid_t lcpl_id);
H5_DLL herr_t H5L_link_object(const H5G_loc_t *new_loc, const char *new_name, H5O_obj_create_t *ocrt_info,
hid_t lcpl_id);
-H5_DLL herr_t H5L_exists_tolerant(const H5G_loc_t *loc, const char *name, hbool_t *exists);
+H5_DLL herr_t H5L_exists_tolerant(const H5G_loc_t *loc, const char *name, bool *exists);
H5_DLL herr_t H5L_get_info(const H5G_loc_t *loc, const char *name, H5L_info2_t *linkbuf /*out*/);
H5_DLL herr_t H5L_register_external(void);
H5_DLL herr_t H5L_iterate(H5G_loc_t *loc, const char *group_name, H5_index_t idx_type, H5_iter_order_t order,
@@ -79,7 +79,7 @@ H5_DLL herr_t H5L_iterate(H5G_loc_t *loc, const char *group_name, H5_index_t idx
/* User-defined link functions */
H5_DLL herr_t H5L_register(const H5L_class_t *cls);
H5_DLL herr_t H5L_unregister(H5L_type_t id);
-H5_DLL herr_t H5L_is_registered(H5L_type_t id, hbool_t *is_registered);
+H5_DLL herr_t H5L_is_registered(H5L_type_t id, bool *is_registered);
H5_DLL const H5L_class_t *H5L_find_class(H5L_type_t id);
#endif /* H5Lprivate_H */
diff --git a/src/H5Lpublic.h b/src/H5Lpublic.h
index bb5850c442f..03b47c540fa 100644
--- a/src/H5Lpublic.h
+++ b/src/H5Lpublic.h
@@ -713,8 +713,8 @@ H5_DLL herr_t H5Lexists_async(hid_t loc_id, const char *name, hbool_t *exists, h
* \p corder specifies the link's creation order position, while
* \p corder_valid indicates whether the value in corder is valid.
*
- * If \p corder_valid is \c TRUE, the value in \p corder is known to
- * be valid; if \p corder_valid is \c FALSE, the value in \p corder is
+ * If \p corder_valid is \c true, the value in \p corder is known to
+ * be valid; if \p corder_valid is \c false, the value in \p corder is
* presumed to be invalid; \p corder starts at zero (0) and is
* incremented by one (1) as new links are created. But
* higher-numbered entries are not adjusted when a lower-numbered link
@@ -1510,8 +1510,8 @@ typedef herr_t (*H5L_iterate1_t)(hid_t group, const char *name, const H5L_info1_
* \c corder specifies the link's creation order position while
* \c corder_valid indicates whether the value in \c corder is valid.
*
- * If \c corder_valid is \c TRUE, the value in \c corder is known to
- * be valid; if \c corder_valid is \c FALSE, the value in \c corder is
+ * If \c corder_valid is \c true, the value in \c corder is known to
+ * be valid; if \c corder_valid is \c false, the value in \c corder is
* presumed to be invalid;
*
* \c corder starts at zero (0) and is incremented by one (1) as new
diff --git a/src/H5M.c b/src/H5M.c
index cb8f7717f4b..e2fd2025a9b 100644
--- a/src/H5M.c
+++ b/src/H5M.c
@@ -116,7 +116,7 @@ H5M_top_term_package(void)
FUNC_ENTER_NOAPI_NOINIT_NOERR
if (H5I_nmembers(H5I_MAP) > 0) {
- (void)H5I_clear_type(H5I_MAP, FALSE, FALSE);
+ (void)H5I_clear_type(H5I_MAP, false, false);
n++;
}
@@ -224,17 +224,17 @@ H5M__create_api_common(hid_t loc_id, const char *name, hid_t key_type_id, hid_t
/* Get link creation property list */
if (H5P_DEFAULT == lcpl_id)
lcpl_id = H5P_LINK_CREATE_DEFAULT;
- else if (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE))
+ else if (true != H5P_isa_class(lcpl_id, H5P_LINK_CREATE))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "lcpl_id is not a link creation property list");
/* Get map creation property list */
if (H5P_DEFAULT == mcpl_id)
mcpl_id = H5P_MAP_CREATE_DEFAULT;
- else if (TRUE != H5P_isa_class(mcpl_id, H5P_MAP_CREATE))
+ else if (true != H5P_isa_class(mcpl_id, H5P_MAP_CREATE))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "mcpl_id is not a map create property list ID");
/* Set up VOL callback arguments */
- if (H5VL_setup_acc_args(loc_id, H5P_CLS_MACC, TRUE, &mapl_id, vol_obj_ptr, &map_args.create.loc_params) <
+ if (H5VL_setup_acc_args(loc_id, H5P_CLS_MACC, true, &mapl_id, vol_obj_ptr, &map_args.create.loc_params) <
0)
HGOTO_ERROR(H5E_MAP, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments");
map_args.create.name = name;
@@ -253,7 +253,7 @@ H5M__create_api_common(hid_t loc_id, const char *name, hid_t key_type_id, hid_t
map = map_args.create.map;
/* Get an ID for the map */
- if ((ret_value = H5VL_register(H5I_MAP, map, (*vol_obj_ptr)->connector, TRUE)) < 0)
+ if ((ret_value = H5VL_register(H5I_MAP, map, (*vol_obj_ptr)->connector, true)) < 0)
HGOTO_ERROR(H5E_MAP, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register map handle");
done:
@@ -393,11 +393,11 @@ H5Mcreate_anon(hid_t loc_id, hid_t key_type_id, hid_t val_type_id, hid_t mcpl_id
/* Check arguments */
if (H5P_DEFAULT == mcpl_id)
mcpl_id = H5P_MAP_CREATE_DEFAULT;
- else if (TRUE != H5P_isa_class(mcpl_id, H5P_MAP_CREATE))
+ else if (true != H5P_isa_class(mcpl_id, H5P_MAP_CREATE))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not map create property list ID");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&mapl_id, H5P_CLS_MACC, loc_id, TRUE) < 0)
+ if (H5CX_set_apl(&mapl_id, H5P_CLS_MACC, loc_id, true) < 0)
HGOTO_ERROR(H5E_MAP, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info");
/* get the location object */
@@ -425,7 +425,7 @@ H5Mcreate_anon(hid_t loc_id, hid_t key_type_id, hid_t val_type_id, hid_t mcpl_id
map = map_args.create.map;
/* Get an ID for the map */
- if ((ret_value = H5VL_register(H5I_MAP, map, vol_obj->connector, TRUE)) < 0)
+ if ((ret_value = H5VL_register(H5I_MAP, map, vol_obj->connector, true)) < 0)
HGOTO_ERROR(H5E_MAP, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register map");
done:
@@ -474,7 +474,7 @@ H5M__open_api_common(hid_t loc_id, const char *name, hid_t mapl_id, void **token
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be an empty string");
/* Set up VOL callback arguments */
- if (H5VL_setup_acc_args(loc_id, H5P_CLS_MACC, FALSE, &mapl_id, vol_obj_ptr, &map_args.open.loc_params) <
+ if (H5VL_setup_acc_args(loc_id, H5P_CLS_MACC, false, &mapl_id, vol_obj_ptr, &map_args.open.loc_params) <
0)
HGOTO_ERROR(H5E_MAP, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments");
map_args.open.name = name;
@@ -489,7 +489,7 @@ H5M__open_api_common(hid_t loc_id, const char *name, hid_t mapl_id, void **token
map = map_args.open.map;
/* Register an ID for the map */
- if ((ret_value = H5VL_register(H5I_MAP, map, (*vol_obj_ptr)->connector, TRUE)) < 0)
+ if ((ret_value = H5VL_register(H5I_MAP, map, (*vol_obj_ptr)->connector, true)) < 0)
HGOTO_ERROR(H5E_MAP, H5E_CANTREGISTER, H5I_INVALID_HID, "can't register map ID");
done:
@@ -890,7 +890,7 @@ H5Mget_count(hid_t map_id, hsize_t *count /*out*/, hid_t dxpl_id)
/* Get the default dataset transfer property list if the user didn't provide one */
if (H5P_DEFAULT == dxpl_id)
dxpl_id = H5P_DATASET_XFER_DEFAULT;
- else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ else if (true != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms");
/* Set DXPL for operation */
@@ -949,7 +949,7 @@ H5M__put_api_common(hid_t map_id, hid_t key_mem_type_id, const void *key, hid_t
/* Get the default dataset transfer property list if the user didn't provide one */
if (H5P_DEFAULT == dxpl_id)
dxpl_id = H5P_DATASET_XFER_DEFAULT;
- else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ else if (true != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms");
/* Set DXPL for operation */
@@ -1084,7 +1084,7 @@ H5M__get_api_common(hid_t map_id, hid_t key_mem_type_id, const void *key, hid_t
/* Get the default dataset transfer property list if the user didn't provide one */
if (H5P_DEFAULT == dxpl_id)
dxpl_id = H5P_DATASET_XFER_DEFAULT;
- else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ else if (true != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms");
/* Set DXPL for operation */
@@ -1222,7 +1222,7 @@ H5Mexists(hid_t map_id, hid_t key_mem_type_id, const void *key, hbool_t *exists,
/* Get the default dataset transfer property list if the user didn't provide one */
if (H5P_DEFAULT == dxpl_id)
dxpl_id = H5P_DATASET_XFER_DEFAULT;
- else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ else if (true != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms");
/* Set DXPL for operation */
@@ -1231,7 +1231,7 @@ H5Mexists(hid_t map_id, hid_t key_mem_type_id, const void *key, hbool_t *exists,
/* Set up VOL callback arguments */
map_args.exists.key_mem_type_id = key_mem_type_id;
map_args.exists.key = key;
- map_args.exists.exists = FALSE;
+ map_args.exists.exists = false;
vol_cb_args.op_type = H5VL_MAP_EXISTS;
vol_cb_args.args = &map_args;
@@ -1302,7 +1302,7 @@ H5Miterate(hid_t map_id, hsize_t *idx, hid_t key_mem_type_id, H5M_iterate_t op,
/* Get the default dataset transfer property list if the user didn't provide one */
if (H5P_DEFAULT == dxpl_id)
dxpl_id = H5P_DATASET_XFER_DEFAULT;
- else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ else if (true != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms");
/* Set DXPL for operation */
@@ -1391,7 +1391,7 @@ H5Miterate_by_name(hid_t loc_id, const char *map_name, hsize_t *idx, hid_t key_m
/* Get the default dataset transfer property list if the user didn't provide one */
if (H5P_DEFAULT == dxpl_id)
dxpl_id = H5P_DATASET_XFER_DEFAULT;
- else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ else if (true != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms");
/* Set DXPL for operation */
@@ -1459,7 +1459,7 @@ H5Mdelete(hid_t map_id, hid_t key_mem_type_id, const void *key, hid_t dxpl_id)
/* Get the default dataset transfer property list if the user didn't provide one */
if (H5P_DEFAULT == dxpl_id)
dxpl_id = H5P_DATASET_XFER_DEFAULT;
- else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ else if (true != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms");
/* Set DXPL for operation */
diff --git a/src/H5MF.c b/src/H5MF.c
index b527d6b5ec3..c8df9e475b0 100644
--- a/src/H5MF.c
+++ b/src/H5MF.c
@@ -47,9 +47,9 @@
#define H5MF_CHECK_FSM(FSM, CF) \
do { \
- assert(*CF == FALSE); \
+ assert(*CF == false); \
if (!H5_addr_defined(FSM->addr) || !H5_addr_defined(FSM->sect_addr)) \
- *CF = TRUE; \
+ *CF = true; \
} while (0)
/* For non-paged aggregation: map allocation request type to tracked free-space type */
@@ -92,12 +92,12 @@ static herr_t H5MF__close_pagefs(H5F_t *f);
static herr_t H5MF__close_shrink_eoa(H5F_t *f);
/* General routines */
-static herr_t H5MF__get_free_sects(H5F_t *f, H5FS_t *fspace, H5MF_sect_iter_ud_t *sect_udata, size_t *nums);
-static hbool_t H5MF__fsm_type_is_self_referential(H5F_shared_t *f_sh, H5F_mem_page_t fsm_type);
-static hbool_t H5MF__fsm_is_self_referential(H5F_shared_t *f_sh, H5FS_t *fspace);
-static herr_t H5MF__continue_alloc_fsm(H5F_shared_t *f_sh, H5FS_t *sm_hdr_fspace, H5FS_t *sm_sinfo_fspace,
- H5FS_t *lg_hdr_fspace, H5FS_t *lg_sinfo_fspace,
- hbool_t *continue_alloc_fsm);
+static herr_t H5MF__get_free_sects(H5F_t *f, H5FS_t *fspace, H5MF_sect_iter_ud_t *sect_udata, size_t *nums);
+static bool H5MF__fsm_type_is_self_referential(H5F_shared_t *f_sh, H5F_mem_page_t fsm_type);
+static bool H5MF__fsm_is_self_referential(H5F_shared_t *f_sh, H5FS_t *fspace);
+static herr_t H5MF__continue_alloc_fsm(H5F_shared_t *f_sh, H5FS_t *sm_hdr_fspace, H5FS_t *sm_sinfo_fspace,
+ H5FS_t *lg_hdr_fspace, H5FS_t *lg_sinfo_fspace,
+ bool *continue_alloc_fsm);
/* Free-space type manager routines */
static herr_t H5MF__create_fstype(H5F_t *f, H5F_mem_page_t type);
@@ -135,7 +135,7 @@ H5MF_init_merge_flags(H5F_shared_t *f_sh)
{
H5MF_aggr_merge_t mapping_type; /* Type of free list mapping */
H5FD_mem_t type; /* Memory type for iteration */
- hbool_t all_same; /* Whether all the types map to the same value */
+ bool all_same; /* Whether all the types map to the same value */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -147,11 +147,11 @@ H5MF_init_merge_flags(H5F_shared_t *f_sh)
/* Iterate over all the free space types to determine if sections of that type
* can merge with the metadata or small 'raw' data aggregator
*/
- all_same = TRUE;
+ all_same = true;
for (type = H5FD_MEM_DEFAULT; type < H5FD_MEM_NTYPES; type++)
/* Check for any different type mappings */
if (f_sh->fs_type_map[type] != f_sh->fs_type_map[H5FD_MEM_DEFAULT]) {
- all_same = FALSE;
+ all_same = false;
break;
} /* end if */
@@ -167,18 +167,18 @@ H5MF_init_merge_flags(H5F_shared_t *f_sh)
if (f_sh->fs_type_map[H5FD_MEM_DRAW] == f_sh->fs_type_map[H5FD_MEM_SUPER])
mapping_type = H5MF_AGGR_MERGE_SEPARATE;
else {
- hbool_t all_metadata_same; /* Whether all metadata go in same free list */
+ bool all_metadata_same; /* Whether all metadata go in same free list */
/* One or more allocation type don't map to the same free list type */
/* Check if all the metadata allocation types map to the same type */
- all_metadata_same = TRUE;
+ all_metadata_same = true;
for (type = H5FD_MEM_SUPER; type < H5FD_MEM_NTYPES; type++)
/* Skip checking raw data free list mapping */
/* (global heap is treated as raw data) */
if (type != H5FD_MEM_DRAW && type != H5FD_MEM_GHEAP) {
/* Check for any different type mappings */
if (f_sh->fs_type_map[type] != f_sh->fs_type_map[H5FD_MEM_SUPER]) {
- all_metadata_same = FALSE;
+ all_metadata_same = false;
break;
} /* end if */
} /* end if */
@@ -616,8 +616,8 @@ H5MF__add_sect(H5F_t *f, H5FD_mem_t alloc_type, H5FS_t *fspace, H5MF_free_sectio
/* Construct user data for callbacks */
udata.f = f;
udata.alloc_type = alloc_type;
- udata.allow_sect_absorb = TRUE;
- udata.allow_eoa_shrink_only = FALSE;
+ udata.allow_sect_absorb = true;
+ udata.allow_eoa_shrink_only = false;
/* Set the ring type in the API context */
if (H5MF__fsm_is_self_referential(f->shared, fspace))
@@ -649,8 +649,8 @@ H5MF__add_sect(H5F_t *f, H5FD_mem_t alloc_type, H5FS_t *fspace, H5MF_free_sectio
* Purpose: To find a section from the specified free-space manager to fulfill the request.
* If found, re-add the left-over space back to the manager.
*
- * Return: TRUE if a section is found to fulfill the request
- * FALSE if not
+ * Return: true if a section is found to fulfill the request
+ * false if not
*
*-------------------------------------------------------------------------
*/
@@ -1177,14 +1177,14 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size)
/* Construct user data for callbacks */
udata.f = f;
udata.alloc_type = alloc_type;
- udata.allow_sect_absorb = TRUE;
- udata.allow_eoa_shrink_only = FALSE;
+ udata.allow_sect_absorb = true;
+ udata.allow_eoa_shrink_only = false;
/* Try to merge the section that is smaller than threshold */
if ((merged = H5FS_sect_try_merge(f, f->shared->fs_man[fs_type], (H5FS_section_info_t *)node,
H5FS_ADD_RETURNED_SPACE, &udata)) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINSERT, FAIL, "can't merge section to file free space");
- else if (merged == TRUE) /* successfully merged */
+ else if (merged == true) /* successfully merged */
/* Indicate that the node was used */
node = NULL;
} /* end else */
@@ -1221,8 +1221,8 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size)
* --try to extend into a free-space section if adjoined
* --try to extend into the page end threshold if a metadata block
*
- * Return: Success: TRUE(1) - Block was extended
- * FALSE(0) - Block could not be extended
+ * Return: Success: true(1) - Block was extended
+ * false(0) - Block could not be extended
* Failure: FAIL
*
*-------------------------------------------------------------------------
@@ -1235,9 +1235,9 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi
haddr_t end; /* End of block to extend */
H5FD_mem_t map_type; /* Mapped type */
H5F_mem_page_t fs_type; /* free space type */
- htri_t allow_extend = TRUE; /* Possible to extend the block */
+ htri_t allow_extend = true; /* Possible to extend the block */
hsize_t frag_size = 0; /* Size of mis-aligned fragment */
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL)
#ifdef H5MF_ALLOC_DEBUG
@@ -1266,7 +1266,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi
if (size < f->shared->fs_page_size) {
/* To extend a small block: cannot cross page boundary */
if ((addr / f->shared->fs_page_size) != (((end + extra_requested) - 1) / f->shared->fs_page_size))
- allow_extend = FALSE;
+ allow_extend = false;
} /* end if */
else {
haddr_t eoa; /* EOA for the file */
@@ -1301,7 +1301,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi
/* If extending at EOA succeeds: */
/* for paged aggregation, put the fragment into the large-sized free-space manager */
- if (ret_value == TRUE && H5F_PAGED_AGGR(f) && frag_size) {
+ if (ret_value == true && H5F_PAGED_AGGR(f) && frag_size) {
H5MF_free_section_t *node = NULL; /* Free space section pointer */
/* Should be large-sized block */
@@ -1324,7 +1324,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi
} /* end if */
/* For non-paged aggregation: try to extend into the aggregators */
- if (ret_value == FALSE && (f->shared->fs_strategy == H5F_FSPACE_STRATEGY_FSM_AGGR ||
+ if (ret_value == false && (f->shared->fs_strategy == H5F_FSPACE_STRATEGY_FSM_AGGR ||
f->shared->fs_strategy == H5F_FSPACE_STRATEGY_AGGR)) {
H5F_blk_aggr_t *aggr; /* Aggregator to use */
@@ -1339,7 +1339,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi
} /* end if */
/* If no extension so far, try to extend into a free-space section */
- if (ret_value == FALSE &&
+ if (ret_value == false &&
((f->shared->fs_strategy == H5F_FSPACE_STRATEGY_FSM_AGGR) || (H5F_PAGED_AGGR(f)))) {
H5MF_sect_ud_t udata; /* User data */
@@ -1365,11 +1365,11 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi
} /* end if */
/* For paged aggregation and a metadata block: try to extend into page end threshold */
- if (ret_value == FALSE && H5F_PAGED_AGGR(f) && map_type != H5FD_MEM_DRAW) {
+ if (ret_value == false && H5F_PAGED_AGGR(f) && map_type != H5FD_MEM_DRAW) {
H5MF_EOA_MISALIGN(f, end, f->shared->fs_page_size, frag_size);
if (frag_size <= H5F_PGEND_META_THRES(f) && extra_requested <= frag_size)
- ret_value = TRUE;
+ ret_value = true;
#ifdef H5MF_ALLOC_DEBUG_MORE
fprintf(stderr, "%s: Try to extend into the page end threshold = %d\n", __func__, ret_value);
#endif /* H5MF_ALLOC_DEBUG_MORE */
@@ -1411,7 +1411,7 @@ H5MF_try_shrink(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size)
H5AC_ring_t orig_ring = H5AC_RING_INV; /* Original ring value */
H5AC_ring_t fsm_ring = H5AC_RING_INV; /* Ring of FSM */
H5F_mem_page_t fs_type; /* Free space type */
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL)
#ifdef H5MF_ALLOC_DEBUG
@@ -1447,8 +1447,8 @@ H5MF_try_shrink(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size)
/* Construct user data for callbacks */
udata.f = f;
udata.alloc_type = alloc_type;
- udata.allow_sect_absorb = FALSE; /* Force section to be absorbed into aggregator */
- udata.allow_eoa_shrink_only = FALSE;
+ udata.allow_sect_absorb = false; /* Force section to be absorbed into aggregator */
+ udata.allow_eoa_shrink_only = false;
/* Check if the block can shrink the container */
if (sect_cls->can_shrink) {
@@ -1761,7 +1761,7 @@ H5MF__close_aggrfs(H5F_t *f)
fsinfo.version = f->shared->fs_version;
/* Write the free space manager message -- message must already exist */
- if (H5F__super_ext_write_msg(f, H5O_FSINFO_ID, &fsinfo, FALSE, H5O_MSG_FLAG_MARK_IF_UNKNOWN) < 0)
+ if (H5F__super_ext_write_msg(f, H5O_FSINFO_ID, &fsinfo, false, H5O_MSG_FLAG_MARK_IF_UNKNOWN) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_WRITEERROR, FAIL,
"error in writing message to superblock extension");
@@ -1924,7 +1924,7 @@ H5MF__close_pagefs(H5F_t *f)
fsinfo.eoa_pre_fsm_fsalloc = f->shared->eoa_fsm_fsalloc;
/* Write the free space manager message -- message must already exist */
- if (H5F__super_ext_write_msg(f, H5O_FSINFO_ID, &fsinfo, FALSE, H5O_MSG_FLAG_MARK_IF_UNKNOWN) < 0)
+ if (H5F__super_ext_write_msg(f, H5O_FSINFO_ID, &fsinfo, false, H5O_MSG_FLAG_MARK_IF_UNKNOWN) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_WRITEERROR, FAIL,
"error in writing message to superblock extension");
@@ -1972,14 +1972,14 @@ H5MF__close_pagefs(H5F_t *f)
* open.
*
* If there is a cache image in the file at file open,
- * f->shared->first_alloc_dealloc will always be FALSE unless
+ * f->shared->first_alloc_dealloc will always be false unless
* the file is opened R/O, as otherwise, the image will have been
* read and discarded by this point.
*
* If a cache image was created on file close, the actual EOA
* should be in f->shared->eoa_post_mdci_fsalloc. Note that in
* this case, it is conceivable that f->shared->first_alloc_dealloc
- * will still be TRUE, as the cache image is allocated directly from
+ * will still be true, as the cache image is allocated directly from
* the file driver layer. However, as this possibility seems remote,
* it is ignored in the following assert.
*/
@@ -1997,7 +1997,7 @@ H5MF__close_pagefs(H5F_t *f)
/* Write file space info message to superblock extension object header */
/* Create the superblock extension object header in advance if needed */
- if (H5F__super_ext_write_msg(f, H5O_FSINFO_ID, &fsinfo, FALSE, H5O_MSG_FLAG_MARK_IF_UNKNOWN) < 0)
+ if (H5F__super_ext_write_msg(f, H5O_FSINFO_ID, &fsinfo, false, H5O_MSG_FLAG_MARK_IF_UNKNOWN) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_WRITEERROR, FAIL,
"error in writing message to superblock extension");
} /* end else */
@@ -2035,7 +2035,7 @@ H5MF__close_shrink_eoa(H5F_t *f)
H5AC_ring_t needed_ring = H5AC_RING_INV; /* Ring value needed for this iteration. */
H5F_mem_t type;
H5F_mem_page_t ptype; /* Memory type for iteration */
- hbool_t eoa_shrank; /* Whether an EOA shrink occurs */
+ bool eoa_shrank; /* Whether an EOA shrink occurs */
htri_t status; /* Status value */
H5MF_sect_ud_t udata; /* User data for callback */
herr_t ret_value = SUCCEED; /* Return value */
@@ -2048,8 +2048,8 @@ H5MF__close_shrink_eoa(H5F_t *f)
/* Construct user data for callbacks */
udata.f = f;
- udata.allow_sect_absorb = FALSE;
- udata.allow_eoa_shrink_only = TRUE;
+ udata.allow_sect_absorb = false;
+ udata.allow_eoa_shrink_only = true;
/* Set the ring type in the API context */
H5AC_set_ring(H5AC_RING_RDFSM, &orig_ring);
@@ -2057,7 +2057,7 @@ H5MF__close_shrink_eoa(H5F_t *f)
/* Iterate until no more EOA shrinking occurs */
do {
- eoa_shrank = FALSE;
+ eoa_shrank = false;
if (H5F_PAGED_AGGR(f)) {
/* Check the last section of each free-space manager */
@@ -2081,7 +2081,7 @@ H5MF__close_shrink_eoa(H5F_t *f)
if ((status = H5FS_sect_try_shrink_eoa(f, f->shared->fs_man[ptype], &udata)) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't check for shrinking eoa");
else if (status > 0)
- eoa_shrank = TRUE;
+ eoa_shrank = true;
} /* end if */
} /* end for */
} /* end if */
@@ -2105,7 +2105,7 @@ H5MF__close_shrink_eoa(H5F_t *f)
if ((status = H5FS_sect_try_shrink_eoa(f, f->shared->fs_man[type], &udata)) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't check for shrinking eoa");
else if (status > 0)
- eoa_shrank = TRUE;
+ eoa_shrank = true;
} /* end if */
} /* end for */
@@ -2113,7 +2113,7 @@ H5MF__close_shrink_eoa(H5F_t *f)
if ((status = H5MF__aggrs_try_shrink_eoa(f)) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't check for shrinking eoa");
else if (status > 0)
- eoa_shrank = TRUE;
+ eoa_shrank = true;
} /* end else */
} while (eoa_shrank);
@@ -2195,14 +2195,14 @@ H5MF_get_freespace(H5F_t *f, hsize_t *tot_space, hsize_t *meta_size)
/* Iterate over all the free space types that have managers and get each free list's space */
for (type = start_type; type < end_type; type++) {
- fs_started[type] = FALSE;
+ fs_started[type] = false;
/* Check if the free space for the file has been initialized */
if (!f->shared->fs_man[type] && H5_addr_defined(f->shared->fs_addr[type])) {
if (H5MF__open_fstype(f, type) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize file free space");
assert(f->shared->fs_man[type]);
- fs_started[type] = TRUE;
+ fs_started[type] = true;
} /* end if */
/* Test to see if we need to switch rings -- do so if required */
@@ -2335,8 +2335,8 @@ H5MF_get_free_sections(H5F_t *f, H5FD_mem_t type, size_t nsects, H5F_sect_info_t
/* Iterate over memory types, retrieving the number of sections of each type */
for (ty = start_type; ty < end_type; ty++) {
- hbool_t fs_started = FALSE; /* The free-space manager is opened or not */
- size_t nums = 0; /* The number of free-space sections */
+ bool fs_started = false; /* The free-space manager is opened or not */
+ size_t nums = 0; /* The number of free-space sections */
/* Test to see if we need to switch rings -- do so if required */
if (H5MF__fsm_type_is_self_referential(f->shared, ty))
@@ -2353,7 +2353,7 @@ H5MF_get_free_sections(H5F_t *f, H5FD_mem_t type, size_t nsects, H5F_sect_info_t
if (H5MF__open_fstype(f, ty) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't open the free space manager");
assert(f->shared->fs_man[ty]);
- fs_started = TRUE;
+ fs_started = true;
} /* end if */
/* Check if there's free space sections of this type */
@@ -2549,7 +2549,7 @@ H5MF__get_free_sects(H5F_t *f, H5FS_t *fspace, H5MF_sect_iter_ud_t *sect_udata,
*-------------------------------------------------------------------------
*/
herr_t
-H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled)
+H5MF_settle_raw_data_fsm(H5F_t *f, bool *fsm_settled)
{
int pass_count;
hsize_t alloc_size;
@@ -2578,8 +2578,8 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled)
* the private property in f->shared->null_fsm_addr is not enabled.
*/
if (f->shared->fs_persist && !H5F_NULL_FSM_ADDR(f)) {
- hbool_t fsm_opened[H5F_MEM_PAGE_NTYPES]; /* State of FSM */
- hbool_t fsm_visited[H5F_MEM_PAGE_NTYPES]; /* State of FSM */
+ bool fsm_opened[H5F_MEM_PAGE_NTYPES]; /* State of FSM */
+ bool fsm_visited[H5F_MEM_PAGE_NTYPES]; /* State of FSM */
/* should only be called if file is opened R/W */
assert(H5F_INTENT(f) & H5F_ACC_RDWR);
@@ -2668,10 +2668,10 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled)
assert(fsm_type < H5F_MEM_PAGE_NTYPES);
} /* end else-if */
else /* paged allocation disabled -- should be unreachable */
- assert(FALSE);
+ assert(false);
if (!fsm_visited[fsm_type]) {
- fsm_visited[fsm_type] = TRUE;
+ fsm_visited[fsm_type] = true;
/* If there is no active FSM for this type, but such a FSM has
* space allocated in file, open it so that we can free its file
@@ -2680,12 +2680,12 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled)
if (NULL == f->shared->fs_man[fsm_type]) {
if (H5_addr_defined(f->shared->fs_addr[fsm_type])) {
/* Sanity check */
- assert(fsm_opened[fsm_type] == FALSE);
+ assert(fsm_opened[fsm_type] == false);
if (H5MF__open_fstype(f, fsm_type) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL,
"can't initialize file free space manager");
- fsm_opened[fsm_type] = TRUE;
+ fsm_opened[fsm_type] = true;
} /* end if */
} /* end if */
@@ -2711,7 +2711,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled)
* reallocate later if the free space manager contains
* any free space.
*/
- if (H5FS_free(f, f->shared->fs_man[fsm_type], TRUE) < 0)
+ if (H5FS_free(f, f->shared->fs_man[fsm_type], true) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL,
"can't release free-space headers");
f->shared->fs_addr[fsm_type] = HADDR_UNDEF;
@@ -2770,7 +2770,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled)
fsinfo.pgend_meta_thres = f->shared->pgend_meta_thres;
fsinfo.eoa_pre_fsm_fsalloc = HADDR_UNDEF;
- if (H5F__super_ext_write_msg(f, H5O_FSINFO_ID, &fsinfo, TRUE, H5O_MSG_FLAG_MARK_IF_UNKNOWN) < 0)
+ if (H5F__super_ext_write_msg(f, H5O_FSINFO_ID, &fsinfo, true, H5O_MSG_FLAG_MARK_IF_UNKNOWN) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_WRITEERROR, FAIL,
"error in writing fsinfo message to superblock extension");
}
@@ -2796,7 +2796,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled)
/* Reinitialize fsm_visited */
for (fsm_type = H5F_MEM_PAGE_SUPER; fsm_type < H5F_MEM_PAGE_NTYPES; fsm_type++)
- fsm_visited[fsm_type] = FALSE;
+ fsm_visited[fsm_type] = false;
for (pass_count = 0; pass_count <= 1; pass_count++) {
if (pass_count == 0)
@@ -2818,7 +2818,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled)
assert(fsm_type < H5F_MEM_PAGE_NTYPES);
} /* end else-if */
else /* paged allocation disabled -- should be unreachable */
- assert(FALSE);
+ assert(false);
/* Test to see if we need to switch rings -- do so if required */
if (H5MF__fsm_type_is_self_referential(f->shared, fsm_type))
@@ -2836,7 +2836,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled)
* more than once.
*/
if (!fsm_visited[fsm_type]) {
- fsm_visited[fsm_type] = TRUE;
+ fsm_visited[fsm_type] = true;
if (f->shared->fs_man[fsm_type]) {
/* Only allocate file space if the target free space manager
@@ -2901,7 +2901,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled)
if (H5MF__close_fstype(f, fsm_type) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL,
"can't close file free space manager");
- fsm_opened[fsm_type] = FALSE;
+ fsm_opened[fsm_type] = false;
} /* end if */
} /* end if */
} /* end for */
@@ -2912,7 +2912,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled)
assert(!fsm_opened[fsm_type]);
/* Indicate that the FSM was settled successfully */
- *fsm_settled = TRUE;
+ *fsm_settled = true;
} /* end if */
done:
@@ -3017,7 +3017,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled)
*-------------------------------------------------------------------------
*/
herr_t
-H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled)
+H5MF_settle_meta_data_fsm(H5F_t *f, bool *fsm_settled)
{
H5F_mem_page_t sm_fshdr_fs_type; /* small fs hdr fsm */
H5F_mem_page_t sm_fssinfo_fs_type; /* small fs sinfo fsm */
@@ -3029,7 +3029,7 @@ H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled)
H5FS_t *lg_sinfo_fspace = NULL; /* ptr to lg FSM sinfo alloc FSM */
haddr_t eoa_fsm_fsalloc; /* eoa after file space allocation */
/* for self referential FSMs */
- hbool_t continue_alloc_fsm = FALSE; /* Continue allocating addr and sect_addr for FSMs */
+ bool continue_alloc_fsm = false; /* Continue allocating addr and sect_addr for FSMs */
H5AC_ring_t orig_ring = H5AC_RING_INV; /* Original ring value */
herr_t ret_value = SUCCEED; /* Return value */
@@ -3185,7 +3185,7 @@ H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled)
* they are all settled,
*/
do {
- continue_alloc_fsm = FALSE;
+ continue_alloc_fsm = false;
if (sm_hdr_fspace)
if (H5FS_vfd_alloc_hdr_and_section_info_if_needed(
f, sm_hdr_fspace, &(f->shared->fs_addr[sm_fshdr_fs_type])) < 0)
@@ -3241,7 +3241,7 @@ H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled)
f->shared->eoa_fsm_fsalloc = eoa_fsm_fsalloc;
/* Indicate that the FSM was settled successfully */
- *fsm_settled = TRUE;
+ *fsm_settled = true;
} /* end if */
done:
@@ -3257,7 +3257,7 @@ H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled)
*
* Purpose: To determine whether any of the input FSMs has allocated
* its "addr" and "sect_addr".
- * Return TRUE or FALSE in *continue_alloc_fsm.
+ * Return true or false in *continue_alloc_fsm.
*
* Return: SUCCEED/FAIL
*
@@ -3265,7 +3265,7 @@ H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled)
*/
static herr_t
H5MF__continue_alloc_fsm(H5F_shared_t *f_sh, H5FS_t *sm_hdr_fspace, H5FS_t *sm_sinfo_fspace,
- H5FS_t *lg_hdr_fspace, H5FS_t *lg_sinfo_fspace, hbool_t *continue_alloc_fsm)
+ H5FS_t *lg_hdr_fspace, H5FS_t *lg_sinfo_fspace, bool *continue_alloc_fsm)
{
FUNC_ENTER_PACKAGE_NOERR
@@ -3300,21 +3300,21 @@ H5MF__continue_alloc_fsm(H5F_shared_t *f_sh, H5FS_t *sm_hdr_fspace, H5FS_t *sm_s
/*-------------------------------------------------------------------------
* Function: H5MF__fsm_type_is_self_referential()
*
- * Purpose: Return TRUE if the indicated free space manager allocates
- * file space for free space managers. Return FALSE otherwise.
+ * Purpose: Return true if the indicated free space manager allocates
+ * file space for free space managers. Return false otherwise.
*
- * Return: TRUE/FALSE
+ * Return: true/false
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
H5MF__fsm_type_is_self_referential(H5F_shared_t *f_sh, H5F_mem_page_t fsm_type)
{
H5F_mem_page_t sm_fshdr_fsm;
H5F_mem_page_t sm_fssinfo_fsm;
H5F_mem_page_t lg_fshdr_fsm;
H5F_mem_page_t lg_fssinfo_fsm;
- hbool_t result = FALSE;
+ bool result = false;
FUNC_ENTER_PACKAGE_NOERR
@@ -3337,11 +3337,11 @@ H5MF__fsm_type_is_self_referential(H5F_shared_t *f_sh, H5F_mem_page_t fsm_type)
/* In principle, fsm_type should always be less than
* H5F_MEM_PAGE_LARGE_SUPER whenever paged aggregation
* is not enabled. However, since there is code that does
- * not observe this principle, force the result to FALSE if
+ * not observe this principle, force the result to false if
* fsm_type is greater than or equal to H5F_MEM_PAGE_LARGE_SUPER.
*/
if (fsm_type >= H5F_MEM_PAGE_LARGE_SUPER)
- result = FALSE;
+ result = false;
else
result = (fsm_type == sm_fshdr_fsm) || (fsm_type == sm_fssinfo_fsm);
} /* end else */
@@ -3352,19 +3352,19 @@ H5MF__fsm_type_is_self_referential(H5F_shared_t *f_sh, H5F_mem_page_t fsm_type)
/*-------------------------------------------------------------------------
* Function: H5MF__fsm_is_self_referential()
*
- * Purpose: Return TRUE if the indicated free space manager allocates
- * file space for free space managers. Return FALSE otherwise.
+ * Purpose: Return true if the indicated free space manager allocates
+ * file space for free space managers. Return false otherwise.
*
- * Return: TRUE/FALSE
+ * Return: true/false
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
H5MF__fsm_is_self_referential(H5F_shared_t *f_sh, H5FS_t *fspace)
{
H5F_mem_page_t sm_fshdr_fsm;
H5F_mem_page_t sm_fssinfo_fsm;
- hbool_t result = FALSE;
+ bool result = false;
FUNC_ENTER_PACKAGE_NOERR
diff --git a/src/H5MFaggr.c b/src/H5MFaggr.c
index 24b1c5fe858..fa39c7256ef 100644
--- a/src/H5MFaggr.c
+++ b/src/H5MFaggr.c
@@ -212,7 +212,7 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F
/* Check if the space requested is larger than the space left in the block */
if ((size + aggr_frag_size) > aggr->size) {
- htri_t extended = FALSE; /* Whether the file was extended */
+ htri_t extended = false; /* Whether the file was extended */
/* Check if the block asked for is too large for 'normal' aggregator block */
if (size >= aggr->alloc_size) {
@@ -401,8 +401,8 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F
* 2) When the aggregator is not at end of file:
* Extended the block into the aggregator if it has enough space to satisfy the request
*
- * Return: Success: TRUE(1) - Block was extended
- * FALSE(0) - Block could not be extended
+ * Return: Success: true(1) - Block was extended
+ * false(0) - Block could not be extended
* Failure: FAIL
*
*-------------------------------------------------------------------------
@@ -410,7 +410,7 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F
htri_t H5MF__aggr_try_extend(H5F_t * f, H5F_blk_aggr_t * aggr, H5FD_mem_t type, haddr_t blk_end,
hsize_t extra_requested)
{
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE
@@ -441,7 +441,7 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F
aggr->addr += extra_requested;
/* Indicate success */
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
} /* end if */
/*
* If extra_requested is above percentage threshold:
@@ -454,7 +454,7 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F
if ((ret_value = H5F__try_extend(f, type, (aggr->addr + aggr->size), extra)) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTEXTEND, FAIL, "error extending file");
- else if (ret_value == TRUE) {
+ else if (ret_value == true) {
/* Shift the aggregator block by the extra requested */
/* (allocates the space for the extra_requested) */
aggr->addr += extra_requested;
@@ -480,7 +480,7 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F
aggr->addr += extra_requested;
/* Indicate success */
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
} /* end if */
} /* end else */
} /* end if */
@@ -496,8 +496,8 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F
* Purpose: Check if a section adjoins an aggregator block and one can
* absorb the other.
*
- * Return: Success: TRUE(1) - Section or aggregator can be absorbed
- * FALSE(0) - Section and aggregator can not be absorbed
+ * Return: Success: true(1) - Section or aggregator can be absorbed
+ * false(0) - Section and aggregator can not be absorbed
* Failure: FAIL
*
*-------------------------------------------------------------------------
@@ -505,7 +505,7 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F
htri_t H5MF__aggr_can_absorb(const H5F_t *f, const H5F_blk_aggr_t *aggr, const H5MF_free_section_t *sect,
H5MF_shrink_type_t *shrink)
{
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -536,7 +536,7 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F
*shrink = H5MF_SHRINK_AGGR_ABSORB_SECT;
/* Indicate success */
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
} /* end if */
} /* end if */
@@ -556,7 +556,7 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F
*-------------------------------------------------------------------------
*/
herr_t H5MF__aggr_absorb(const H5F_t H5_ATTR_UNUSED *f, H5F_blk_aggr_t *aggr, H5MF_free_section_t *sect,
- hbool_t allow_sect_absorb)
+ bool allow_sect_absorb)
{
FUNC_ENTER_PACKAGE_NOERR
@@ -799,7 +799,7 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F
*
* Purpose: Check if the remaining space in the aggregator is at EOA
*
- * Return: Success: non-negative (TRUE/FALSE)
+ * Return: Success: non-negative (true/false)
* Failure: negative
*
*-------------------------------------------------------------------------
@@ -807,7 +807,7 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F
static htri_t H5MF__aggr_can_shrink_eoa(H5F_t * f, H5FD_mem_t type, H5F_blk_aggr_t * aggr)
{
haddr_t eoa = HADDR_UNDEF; /* EOA for the file */
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE
diff --git a/src/H5MFpkg.h b/src/H5MFpkg.h
index a9be085f7ed..32d04d35a0e 100644
--- a/src/H5MFpkg.h
+++ b/src/H5MFpkg.h
@@ -96,7 +96,7 @@ typedef struct H5MF_free_section_t {
unsigned num_entries; /* Number of entries covered */
/* Fields that aren't stored */
- hbool_t checked_out; /* Flag to indicate that a row section is temporarily out of the free space
+ bool checked_out; /* Flag to indicate that a row section is temporarily out of the free space
manager */
} row;
struct {
@@ -142,8 +142,8 @@ typedef struct H5MF_sect_ud_t {
/* Down */
H5F_t *f; /* Pointer to file to operate on */
H5FD_mem_t alloc_type; /* Type of memory being allocated */
- hbool_t allow_sect_absorb; /* Whether sections are allowed to absorb a block aggregator */
- hbool_t allow_eoa_shrink_only; /* Whether shrinking eoa is allowed only for the section */
+ bool allow_sect_absorb; /* Whether sections are allowed to absorb a block aggregator */
+ bool allow_eoa_shrink_only; /* Whether shrinking eoa is allowed only for the section */
/* Up */
H5MF_shrink_type_t shrink; /* Type of shrink operation to perform */
@@ -191,7 +191,7 @@ H5_DLL htri_t H5MF__aggrs_try_shrink_eoa(H5F_t *f);
H5_DLL htri_t H5MF__aggr_can_absorb(const H5F_t *f, const H5F_blk_aggr_t *aggr,
const H5MF_free_section_t *sect, H5MF_shrink_type_t *shrink);
H5_DLL herr_t H5MF__aggr_absorb(const H5F_t *f, H5F_blk_aggr_t *aggr, H5MF_free_section_t *sect,
- hbool_t allow_sect_absorb);
+ bool allow_sect_absorb);
H5_DLL herr_t H5MF__aggr_query(const H5F_t *f, const H5F_blk_aggr_t *aggr, haddr_t *addr, hsize_t *size);
/* Debugging routines */
diff --git a/src/H5MFprivate.h b/src/H5MFprivate.h
index da6ef6d4c07..5342cc7d94e 100644
--- a/src/H5MFprivate.h
+++ b/src/H5MFprivate.h
@@ -63,8 +63,8 @@ H5_DLL haddr_t H5MF_alloc_tmp(H5F_t *f, hsize_t size);
H5_DLL herr_t H5MF_free_aggrs(H5F_t *f);
/* Free space manager settling routines */
-H5_DLL herr_t H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled);
-H5_DLL herr_t H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled);
+H5_DLL herr_t H5MF_settle_raw_data_fsm(H5F_t *f, bool *fsm_settled);
+H5_DLL herr_t H5MF_settle_meta_data_fsm(H5F_t *f, bool *fsm_settled);
/* This function has to be declared in H5MFprivate.h as it is needed
* in our test code to allow us to manually start a self referential
diff --git a/src/H5MFsection.c b/src/H5MFsection.c
index ede79128603..3b81960c975 100644
--- a/src/H5MFsection.c
+++ b/src/H5MFsection.c
@@ -340,7 +340,7 @@ H5MF__sect_split(H5FS_section_info_t *sect, hsize_t frag_size)
*
* Note: Second section must be "after" first section
*
- * Return: Success: non-negative (TRUE/FALSE)
+ * Return: Success: non-negative (true/false)
* Failure: negative
*
*-------------------------------------------------------------------------
@@ -412,7 +412,7 @@ H5MF__sect_simple_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect
*
* Purpose: Can this section shrink the container?
*
- * Return: Success: non-negative (TRUE/FALSE)
+ * Return: Success: non-negative (true/false)
* Failure: negative
*
*-------------------------------------------------------------------------
@@ -450,12 +450,12 @@ H5MF__sect_simple_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Indicate shrinking can occur */
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
} /* end if */
else {
/* Shrinking can't occur if the 'eoa_shrink_only' flag is set and we're not shrinking the EOA */
if (udata->allow_eoa_shrink_only)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* Check if this section is allowed to merge with metadata aggregation block */
if (udata->f->shared->fs_aggr_merge[udata->alloc_type] & H5F_FS_MERGE_METADATA) {
@@ -475,7 +475,7 @@ H5MF__sect_simple_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Indicate shrinking can occur */
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
} /* end if */
} /* end if */
@@ -498,13 +498,13 @@ H5MF__sect_simple_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Indicate shrinking can occur */
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
} /* end if */
} /* end if */
} /* end else */
/* Set return value */
- ret_value = FALSE;
+ ret_value = false;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -641,7 +641,7 @@ H5MF__sect_small_add(H5FS_section_info_t **_sect, unsigned *flags, void *_udata)
* Note: Second section must be "after" first section
* The "merged" section cannot cross page boundary.
*
- * Return: Success: non-negative (TRUE/FALSE)
+ * Return: Success: non-negative (true/false)
* Failure: negative
*
*-------------------------------------------------------------------------
@@ -652,7 +652,7 @@ H5MF__sect_small_can_merge(const H5FS_section_info_t *_sect1, const H5FS_section
const H5MF_free_section_t *sect1 = (const H5MF_free_section_t *)_sect1; /* File free section */
const H5MF_free_section_t *sect2 = (const H5MF_free_section_t *)_sect2; /* File free section */
H5MF_sect_ud_t *udata = (H5MF_sect_ud_t *)_udata; /* User data for callback */
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -668,7 +668,7 @@ H5MF__sect_small_can_merge(const H5FS_section_info_t *_sect1, const H5FS_section
/* If they are on different pages, couldn't merge */
if ((sect1->sect_info.addr / udata->f->shared->fs_page_size) !=
(((sect2->sect_info.addr + sect2->sect_info.size - 1) / udata->f->shared->fs_page_size)))
- ret_value = FALSE;
+ ret_value = false;
#ifdef H5MF_ALLOC_DEBUG_MORE
fprintf(stderr, "%s: Leaving: ret_value = %d\n", __func__, ret_value);
@@ -747,7 +747,7 @@ H5MF__sect_small_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect2
*
* Note: Second section must be "after" first section
*
- * Return: Success: non-negative (TRUE/FALSE)
+ * Return: Success: non-negative (true/false)
* Failure: negative
*
*-------------------------------------------------------------------------
@@ -758,7 +758,7 @@ H5MF__sect_large_can_merge(const H5FS_section_info_t *_sect1, const H5FS_section
{
const H5MF_free_section_t *sect1 = (const H5MF_free_section_t *)_sect1; /* File free section */
const H5MF_free_section_t *sect2 = (const H5MF_free_section_t *)_sect2; /* File free section */
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -821,7 +821,7 @@ H5MF__sect_large_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect2
*
* Purpose: Can this section shrink the container?
*
- * Return: Success: non-negative (TRUE/FALSE)
+ * Return: Success: non-negative (true/false)
* Failure: negative
*
*-------------------------------------------------------------------------
@@ -833,7 +833,7 @@ H5MF__sect_large_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
H5MF_sect_ud_t *udata = (H5MF_sect_ud_t *)_udata; /* User data for callback */
haddr_t eoa; /* End of address space in the file */
haddr_t end; /* End of section to extend */
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE
@@ -860,7 +860,7 @@ H5MF__sect_large_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Indicate shrinking can occur */
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
} /* end if */
done:
diff --git a/src/H5MM.c b/src/H5MM.c
index 609f94610a6..100ea297388 100644
--- a/src/H5MM.c
+++ b/src/H5MM.c
@@ -54,63 +54,6 @@
/* Local Variables */
/*******************/
-/*-------------------------------------------------------------------------
- * Function: H5MM_malloc
- *
- * Purpose: Similar to the C89 version of malloc().
- *
- * On size of 0, we return a NULL pointer instead of the
- * standard-allowed 'special' pointer since that's more
- * difficult to check as a return value. This is still
- * considered an error condition since allocations of zero
- * bytes usually indicate problems.
- *
- * Return: Success: Pointer to new memory
- * Failure: NULL
- *-------------------------------------------------------------------------
- */
-void *
-H5MM_malloc(size_t size)
-{
- void *ret_value = NULL;
-
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
-
- ret_value = malloc(size);
-
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5MM_malloc() */
-
-/*-------------------------------------------------------------------------
- * Function: H5MM_calloc
- *
- * Purpose: Similar to the C89 version of calloc(), except this
- * routine just takes a 'size' parameter.
- *
- * On size of 0, we return a NULL pointer instead of the
- * standard-allowed 'special' pointer since that's more
- * difficult to check as a return value. This is still
- * considered an error condition since allocations of zero
- * bytes usually indicate problems.
- *
- * Return: Success: Pointer to new memory
- * Failure: NULL
- *-------------------------------------------------------------------------
- */
-void *
-H5MM_calloc(size_t size)
-{
- void *ret_value = NULL;
-
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
-
- ret_value = calloc(1, size);
-
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5MM_calloc() */
-
/*-------------------------------------------------------------------------
* Function: H5MM_realloc
*
@@ -169,7 +112,7 @@ H5MM_xstrdup(const char *s)
FUNC_ENTER_NOAPI(NULL)
if (s)
- if (NULL == (ret_value = HDstrdup(s)))
+ if (NULL == (ret_value = strdup(s)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "string duplication failed");
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -197,7 +140,7 @@ H5MM_strdup(const char *s)
if (!s)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "NULL string not allowed");
- if (NULL == (ret_value = HDstrdup(s)))
+ if (NULL == (ret_value = strdup(s)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "string duplication failed");
done:
@@ -283,6 +226,8 @@ H5MM_xfree_const(const void *mem)
FUNC_LEAVE_NOAPI(NULL)
} /* end H5MM_xfree_const() */
+#ifdef H5MM_DEBUG
+
/*-------------------------------------------------------------------------
* Function: H5MM_memcpy
*
@@ -313,3 +258,5 @@ H5MM_memcpy(void *dest, const void *src, size_t n)
FUNC_LEAVE_NOAPI(ret)
} /* end H5MM_memcpy() */
+
+#endif /* H5MM_DEBUG */
diff --git a/src/H5MMprivate.h b/src/H5MMprivate.h
index f94a433c14b..39bba2c6e00 100644
--- a/src/H5MMprivate.h
+++ b/src/H5MMprivate.h
@@ -14,7 +14,7 @@
*
* Created: H5MMprivate.h
*
- * Purpose: Private header for memory management.
+ * Purpose: Private header for memory management
*
*-------------------------------------------------------------------------
*/
@@ -26,19 +26,33 @@
/* Private headers needed by this file */
#include "H5private.h"
-#define H5MM_free(Z) free(Z)
+/* Uncomment this macro to enable some extra memory checks
+ *
+ * This can also be defined at configure time, which we do in debug builds
+ * by default.
+ */
+/* #define H5MM_DEBUG */
+
+#define H5MM_calloc(Z) calloc(1, Z)
+#define H5MM_free(Z) free(Z)
+#define H5MM_malloc(Z) malloc(Z)
+
+#ifndef H5MM_DEBUG
+#define H5MM_memcpy(D, S, N) memcpy(D, S, N)
+#endif /* !H5MM_DEBUG */
/*
* Library prototypes...
*/
-H5_DLL void *H5MM_malloc(size_t size) H5_ATTR_MALLOC;
-H5_DLL void *H5MM_calloc(size_t size) H5_ATTR_MALLOC;
H5_DLL void *H5MM_realloc(void *mem, size_t size);
H5_DLL char *H5MM_xstrdup(const char *s) H5_ATTR_MALLOC;
H5_DLL char *H5MM_strdup(const char *s) H5_ATTR_MALLOC;
H5_DLL char *H5MM_strndup(const char *s, size_t n) H5_ATTR_MALLOC;
H5_DLL void *H5MM_xfree(void *mem);
H5_DLL void *H5MM_xfree_const(const void *mem);
+
+#ifdef H5MM_DEBUG
H5_DLL void *H5MM_memcpy(void *dest, const void *src, size_t n);
+#endif
#endif /* H5MMprivate_H */
diff --git a/src/H5O.c b/src/H5O.c
index fc92a6107d4..9087cbecd41 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -111,7 +111,7 @@ H5O__open_api_common(hid_t loc_id, const char *name, hid_t lapl_id, void **token
/* name is checked in this H5VL_setup_name_args() */
/* Set up object access arguments */
- if (H5VL_setup_name_args(loc_id, name, FALSE, lapl_id, vol_obj_ptr, &loc_params) < 0)
+ if (H5VL_setup_name_args(loc_id, name, false, lapl_id, vol_obj_ptr, &loc_params) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments");
/* Open the object */
@@ -120,7 +120,7 @@ H5O__open_api_common(hid_t loc_id, const char *name, hid_t lapl_id, void **token
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object");
/* Get an atom for the object */
- if ((ret_value = H5VL_register(opened_type, opened_obj, (*vol_obj_ptr)->connector, TRUE)) < 0)
+ if ((ret_value = H5VL_register(opened_type, opened_obj, (*vol_obj_ptr)->connector, true)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to atomize object handle");
done:
@@ -235,7 +235,7 @@ H5O__open_by_idx_api_common(hid_t loc_id, const char *group_name, H5_index_t idx
/* Check args */
/* group_name, idx_type, order are checked in H5VL_setup_idx-args() */
/* Set up object access arguments */
- if (H5VL_setup_idx_args(loc_id, group_name, idx_type, order, n, FALSE, lapl_id, vol_obj_ptr,
+ if (H5VL_setup_idx_args(loc_id, group_name, idx_type, order, n, false, lapl_id, vol_obj_ptr,
&loc_params) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments");
@@ -245,7 +245,7 @@ H5O__open_by_idx_api_common(hid_t loc_id, const char *group_name, H5_index_t idx
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object");
/* Get an ID for the object */
- if ((ret_value = H5VL_register(opened_type, opened_obj, (*vol_obj_ptr)->connector, TRUE)) < 0)
+ if ((ret_value = H5VL_register(opened_type, opened_obj, (*vol_obj_ptr)->connector, true)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object handle");
done:
@@ -383,7 +383,7 @@ H5Oopen_by_token(hid_t loc_id, H5O_token_t token)
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object");
/* Register the object's ID */
- if ((ret_value = H5VL_register(opened_type, opened_obj, vol_obj->connector, TRUE)) < 0)
+ if ((ret_value = H5VL_register(opened_type, opened_obj, vol_obj->connector, true)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object handle");
done:
@@ -426,13 +426,13 @@ H5O__copy_api_common(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, c
/* Get correct property lists */
if (H5P_DEFAULT == lcpl_id)
lcpl_id = H5P_LINK_CREATE_DEFAULT;
- else if (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE))
+ else if (true != H5P_isa_class(lcpl_id, H5P_LINK_CREATE))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link creation property list");
/* Get object copy property list */
if (H5P_DEFAULT == ocpypl_id)
ocpypl_id = H5P_OBJECT_COPY_DEFAULT;
- else if (TRUE != H5P_isa_class(ocpypl_id, H5P_OBJECT_COPY))
+ else if (true != H5P_isa_class(ocpypl_id, H5P_OBJECT_COPY))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not object copy property list");
/* Set the LCPL for the API context */
@@ -837,10 +837,10 @@ H5Olink(hid_t obj_id, hid_t new_loc_id, const char *new_name, hid_t lcpl_id, hid
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified");
/* Avoid compiler warning on 32-bit machines */
#if H5_SIZEOF_SIZE_T > H5_SIZEOF_INT32_T
- if (HDstrlen(new_name) > H5L_MAX_LINK_NAME_LEN)
+ if (strlen(new_name) > H5L_MAX_LINK_NAME_LEN)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "name too long");
#endif /* H5_SIZEOF_SIZE_T > H5_SIZEOF_INT32_T */
- if (lcpl_id != H5P_DEFAULT && (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE)))
+ if (lcpl_id != H5P_DEFAULT && (true != H5P_isa_class(lcpl_id, H5P_LINK_CREATE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a link creation property list");
/* Get the link creation property list */
@@ -851,7 +851,7 @@ H5Olink(hid_t obj_id, hid_t new_loc_id, const char *new_name, hid_t lcpl_id, hid
H5CX_set_lcpl(lcpl_id);
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, obj_id, TRUE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, obj_id, true) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info");
/* Set up new location struct */
@@ -1008,7 +1008,7 @@ H5Odecr_refcount(hid_t object_id)
*
* Purpose: Determine if a linked-to object exists
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: FAIL
*
*-------------------------------------------------------------------------
@@ -1019,7 +1019,7 @@ H5Oexists_by_name(hid_t loc_id, const char *name, hid_t lapl_id)
H5VL_object_t *vol_obj; /* Object of loc_id */
H5VL_object_specific_args_t vol_cb_args; /* Arguments to VOL callback */
H5VL_loc_params_t loc_params; /* Location parameters for object access */
- hbool_t obj_exists = FALSE; /* Whether object exists */
+ bool obj_exists = false; /* Whether object exists */
htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -1032,7 +1032,7 @@ H5Oexists_by_name(hid_t loc_id, const char *name, hid_t lapl_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be an empty string");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info");
/* Get the location object */
@@ -1139,7 +1139,7 @@ H5O__get_info_by_name_api_common(hid_t loc_id, const char *name, H5O_info2_t *oi
/* "name" is checked in H5VL_setup_name_args() */
/* Set up object access arguments */
- if (H5VL_setup_name_args(loc_id, name, FALSE, lapl_id, vol_obj_ptr, &loc_params) < 0)
+ if (H5VL_setup_name_args(loc_id, name, false, lapl_id, vol_obj_ptr, &loc_params) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set object access arguments");
/* Set up VOL callback arguments */
@@ -1260,7 +1260,7 @@ H5Oget_info_by_idx3(hid_t loc_id, const char *group_name, H5_index_t idx_type, H
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info");
/* Set location struct fields */
@@ -1372,7 +1372,7 @@ H5Oget_native_info_by_name(hid_t loc_id, const char *name, H5O_native_info_t *oi
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info");
/* Fill out location struct */
@@ -1437,7 +1437,7 @@ H5Oget_native_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_t
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info");
/* Set location struct fields */
@@ -1551,7 +1551,7 @@ H5Oset_comment_by_name(hid_t loc_id, const char *name, const char *comment, hid_
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, TRUE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, true) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info");
/* Fill in location struct fields */
@@ -1662,7 +1662,7 @@ H5Oget_comment_by_name(hid_t loc_id, const char *name, char *comment /*out*/, si
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "no name");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, (-1), "can't set access property list info");
/* Fill in location struct fields */
@@ -1832,7 +1832,7 @@ H5Ovisit_by_name3(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_it
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info");
/* Get the location object */
@@ -1868,14 +1868,14 @@ H5Ovisit_by_name3(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_it
* Purpose: This is the common function to validate an object
* before closing it.
*
- * Return: TRUE/FALSE/FAIL
+ * Return: true/false/FAIL
*
*-------------------------------------------------------------------------
*/
static htri_t
H5O__close_check_type(hid_t object_id)
{
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1905,7 +1905,7 @@ H5O__close_check_type(hid_t object_id)
case H5I_EVENTSET:
case H5I_NTYPES:
default:
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
break;
} /* end switch */
@@ -2053,7 +2053,7 @@ H5Odisable_mdc_flushes(hid_t object_id)
H5TRACE1("e", "i", object_id);
/* Make sure the ID is a file object */
- if (H5I_is_file_object(object_id) != TRUE)
+ if (H5I_is_file_object(object_id) != true)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID is not a file object");
/* Get the VOL object */
@@ -2123,7 +2123,7 @@ H5Oenable_mdc_flushes(hid_t object_id)
H5TRACE1("e", "i", object_id);
/* Make sure the ID is a file object */
- if (H5I_is_file_object(object_id) != TRUE)
+ if (H5I_is_file_object(object_id) != true)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID is not a file object");
/* Get the VOL object */
@@ -2176,8 +2176,8 @@ H5O__are_mdc_flushes_disabled(const H5O_loc_t *oloc, hbool_t *are_disabled)
* Function: H5Oare_mdc_flushes_disabled
*
* Purpose: Retrieve the object's "cork" status in the parameter "are_disabled":
- * TRUE if mdc flushes for the object is disabled
- * FALSE if mdc flushes for the object is not disabled
+ * true if mdc flushes for the object is disabled
+ * false if mdc flushes for the object is not disabled
*
* Return error if the parameter "are_disabled" is not supplied
*
@@ -2187,7 +2187,7 @@ H5O__are_mdc_flushes_disabled(const H5O_loc_t *oloc, hbool_t *are_disabled)
*-------------------------------------------------------------------------
*/
herr_t
-H5Oare_mdc_flushes_disabled(hid_t object_id, hbool_t *are_disabled)
+H5Oare_mdc_flushes_disabled(hid_t object_id, bool *are_disabled)
{
H5VL_object_t *vol_obj; /* Object of loc_id */
H5VL_optional_args_t vol_cb_args; /* Arguments to VOL callback */
@@ -2196,14 +2196,14 @@ H5Oare_mdc_flushes_disabled(hid_t object_id, hbool_t *are_disabled)
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE2("e", "i*b", object_id, are_disabled);
+ H5TRACE2("e", "i*!", object_id, are_disabled);
/* Sanity check */
if (!are_disabled)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location from ID");
/* Make sure the ID is a file object */
- if (H5I_is_file_object(object_id) != TRUE)
+ if (H5I_is_file_object(object_id) != true)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID is not a file object");
/* Get the VOL object */
diff --git a/src/H5Oainfo.c b/src/H5Oainfo.c
index 23841a6ff90..10502123cd0 100644
--- a/src/H5Oainfo.c
+++ b/src/H5Oainfo.c
@@ -31,14 +31,14 @@
/* PRIVATE PROTOTYPES */
static void *H5O__ainfo_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags,
size_t p_size, const uint8_t *p);
-static herr_t H5O__ainfo_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
+static herr_t H5O__ainfo_encode(H5F_t *f, bool disable_shared, uint8_t *p, const void *_mesg);
static void *H5O__ainfo_copy(const void *_mesg, void *_dest);
-static size_t H5O__ainfo_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
+static size_t H5O__ainfo_size(const H5F_t *f, bool disable_shared, const void *_mesg);
static herr_t H5O__ainfo_free(void *_mesg);
static herr_t H5O__ainfo_delete(H5F_t *f, H5O_t *open_oh, void *_mesg);
-static herr_t H5O__ainfo_pre_copy_file(H5F_t *file_src, const void *mesg_src, hbool_t *deleted,
+static herr_t H5O__ainfo_pre_copy_file(H5F_t *file_src, const void *mesg_src, bool *deleted,
const H5O_copy_t *cpy_info, void *udata);
-static void *H5O__ainfo_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst, hbool_t *recompute_size,
+static void *H5O__ainfo_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst, bool *recompute_size,
unsigned *mesg_flags, H5O_copy_t *cpy_info, void *udata);
static herr_t H5O__ainfo_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src, H5O_loc_t *dst_oloc,
void *mesg_dst, unsigned *mesg_flags, H5O_copy_t *cpy_info);
@@ -121,8 +121,8 @@ H5O__ainfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUS
flags = *p++;
if (flags & ~H5O_AINFO_ALL_FLAGS)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad flag value for message");
- ainfo->track_corder = (flags & H5O_AINFO_TRACK_CORDER) ? TRUE : FALSE;
- ainfo->index_corder = (flags & H5O_AINFO_INDEX_CORDER) ? TRUE : FALSE;
+ ainfo->track_corder = (flags & H5O_AINFO_TRACK_CORDER) ? true : false;
+ ainfo->index_corder = (flags & H5O_AINFO_INDEX_CORDER) ? true : false;
/* Set the number of attributes on the object to an invalid value, so we query it later */
ainfo->nattrs = HSIZET_MAX;
@@ -175,7 +175,7 @@ H5O__ainfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUS
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__ainfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
+H5O__ainfo_encode(H5F_t *f, bool H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
const H5O_ainfo_t *ainfo = (const H5O_ainfo_t *)_mesg;
unsigned char flags; /* Flags for encoding attribute info */
@@ -262,7 +262,7 @@ H5O__ainfo_copy(const void *_mesg, void *_dest)
*-------------------------------------------------------------------------
*/
static size_t
-H5O__ainfo_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void *_mesg)
+H5O__ainfo_size(const H5F_t *f, bool H5_ATTR_UNUSED disable_shared, const void *_mesg)
{
const H5O_ainfo_t *ainfo = (const H5O_ainfo_t *)_mesg;
size_t ret_value = 0; /* Return value */
@@ -350,8 +350,8 @@ H5O__ainfo_delete(H5F_t *f, H5O_t H5_ATTR_NDEBUG_UNUSED *open_oh, void *_mesg)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__ainfo_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUSED *native_src,
- hbool_t *deleted, const H5O_copy_t *cpy_info, void H5_ATTR_UNUSED *udata)
+H5O__ainfo_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUSED *native_src, bool *deleted,
+ const H5O_copy_t *cpy_info, void H5_ATTR_UNUSED *udata)
{
FUNC_ENTER_PACKAGE_NOERR
@@ -363,7 +363,7 @@ H5O__ainfo_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUS
* that this message should be deleted.
*/
if (cpy_info->copy_without_attr)
- *deleted = TRUE;
+ *deleted = true;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__ainfo_pre_copy_file() */
@@ -380,7 +380,7 @@ H5O__ainfo_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUS
*/
static void *
H5O__ainfo_copy_file(H5F_t H5_ATTR_NDEBUG_UNUSED *file_src, void *mesg_src, H5F_t *file_dst,
- hbool_t H5_ATTR_UNUSED *recompute_size, unsigned H5_ATTR_UNUSED *mesg_flags,
+ bool H5_ATTR_UNUSED *recompute_size, unsigned H5_ATTR_UNUSED *mesg_flags,
H5O_copy_t H5_ATTR_NDEBUG_UNUSED *cpy_info, void H5_ATTR_UNUSED *udata)
{
H5O_ainfo_t *ainfo_src = (H5O_ainfo_t *)mesg_src;
diff --git a/src/H5Oalloc.c b/src/H5Oalloc.c
index 37e88187ef5..4eadc315e05 100644
--- a/src/H5Oalloc.c
+++ b/src/H5Oalloc.c
@@ -51,9 +51,9 @@
/* Local Prototypes */
/********************/
-static herr_t H5O__add_gap(H5F_t *f, H5O_t *oh, unsigned chunkno, hbool_t *chk_dirtied, size_t idx,
+static herr_t H5O__add_gap(H5F_t *f, H5O_t *oh, unsigned chunkno, bool *chk_dirtied, size_t idx,
uint8_t *new_gap_loc, size_t new_gap_size);
-static herr_t H5O__eliminate_gap(H5O_t *oh, hbool_t *chk_dirtied, H5O_mesg_t *mesg, uint8_t *new_gap_loc,
+static herr_t H5O__eliminate_gap(H5O_t *oh, bool *chk_dirtied, H5O_mesg_t *mesg, uint8_t *new_gap_loc,
size_t new_gap_size);
static herr_t H5O__alloc_null(H5F_t *f, H5O_t *oh, size_t null_idx, const H5O_msg_class_t *new_type,
void *new_native, size_t new_size);
@@ -93,12 +93,12 @@ H5FL_EXTERN(H5O_cont_t);
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__add_gap(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t *oh, unsigned chunkno, hbool_t *chk_dirtied, size_t idx,
+H5O__add_gap(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t *oh, unsigned chunkno, bool *chk_dirtied, size_t idx,
uint8_t *new_gap_loc, size_t new_gap_size)
{
- hbool_t merged_with_null; /* Whether the gap was merged with a null message */
- size_t u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool merged_with_null; /* Whether the gap was merged with a null message */
+ size_t u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -124,7 +124,7 @@ H5O__add_gap(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t *oh, unsigned chunkno, hbool_
#endif /* NDEBUG */
/* Check for existing null message in chunk */
- merged_with_null = FALSE;
+ merged_with_null = false;
for (u = 0; u < oh->nmesgs && !merged_with_null; u++) {
/* Find a null message in the chunk with the new gap */
/* (a null message that's not the one we are eliminating) */
@@ -137,7 +137,7 @@ H5O__add_gap(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t *oh, unsigned chunkno, hbool_
HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't eliminate gap in chunk");
/* Set flag to indicate that the gap was handled */
- merged_with_null = TRUE;
+ merged_with_null = true;
} /* end if */
} /* end for */
@@ -182,7 +182,7 @@ H5O__add_gap(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t *oh, unsigned chunkno, hbool_
memset(null_msg->raw, 0, null_msg->raw_size);
/* Mark message as dirty */
- null_msg->dirty = TRUE;
+ null_msg->dirty = true;
/* Reset size of gap in chunk */
oh->chunk[chunkno].gap = 0;
@@ -191,7 +191,7 @@ H5O__add_gap(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t *oh, unsigned chunkno, hbool_
oh->chunk[chunkno].gap = new_gap_size;
/* Mark the chunk as modified */
- *chk_dirtied = TRUE;
+ *chk_dirtied = true;
} /* end if */
done:
@@ -215,10 +215,10 @@ H5O__add_gap(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t *oh, unsigned chunkno, hbool_
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__eliminate_gap(H5O_t *oh, hbool_t *chk_dirtied, H5O_mesg_t *mesg, uint8_t *gap_loc, size_t gap_size)
+H5O__eliminate_gap(H5O_t *oh, bool *chk_dirtied, H5O_mesg_t *mesg, uint8_t *gap_loc, size_t gap_size)
{
uint8_t *move_start, *move_end; /* Pointers to area of messages to move */
- hbool_t null_before_gap; /* Flag whether the null message is before the gap or not */
+ bool null_before_gap; /* Flag whether the null message is before the gap or not */
FUNC_ENTER_PACKAGE_NOERR
@@ -231,7 +231,7 @@ H5O__eliminate_gap(H5O_t *oh, hbool_t *chk_dirtied, H5O_mesg_t *mesg, uint8_t *g
assert(gap_size);
/* Check if the null message is before or after the gap produced */
- null_before_gap = (hbool_t)(mesg->raw < gap_loc);
+ null_before_gap = (bool)(mesg->raw < gap_loc);
/* Set up information about region of messages to move */
if (null_before_gap) {
@@ -292,8 +292,8 @@ H5O__eliminate_gap(H5O_t *oh, hbool_t *chk_dirtied, H5O_mesg_t *mesg, uint8_t *g
oh->chunk[mesg->chunkno].gap = 0;
/* Mark null message as dirty */
- mesg->dirty = TRUE;
- *chk_dirtied = TRUE;
+ mesg->dirty = true;
+ *chk_dirtied = true;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5O__eliminate_gap() */
@@ -313,7 +313,7 @@ H5O__alloc_null(H5F_t *f, H5O_t *oh, size_t null_idx, const H5O_msg_class_t *new
size_t new_size)
{
H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk that message is in */
- hbool_t chk_dirtied = FALSE; /* Flags for unprotecting chunk */
+ bool chk_dirtied = false; /* Flags for unprotecting chunk */
H5O_mesg_t *alloc_msg; /* Pointer to null message to allocate out of */
herr_t ret_value = SUCCEED; /* Return value */
@@ -368,8 +368,8 @@ H5O__alloc_null(H5F_t *f, H5O_t *oh, size_t null_idx, const H5O_msg_class_t *new
null_msg->chunkno = alloc_msg->chunkno;
/* Mark the message as dirty */
- null_msg->dirty = TRUE;
- chk_dirtied = TRUE;
+ null_msg->dirty = true;
+ chk_dirtied = true;
/* Check for gap in new null message's chunk */
if (oh->chunk[null_msg->chunkno].gap > 0) {
@@ -393,8 +393,8 @@ H5O__alloc_null(H5F_t *f, H5O_t *oh, size_t null_idx, const H5O_msg_class_t *new
alloc_msg->native = new_native;
/* Mark the new message as dirty */
- alloc_msg->dirty = TRUE;
- chk_dirtied = TRUE;
+ alloc_msg->dirty = true;
+ chk_dirtied = true;
done:
/* Release chunk */
@@ -461,11 +461,11 @@ H5O__alloc_msgs(H5O_t *oh, size_t min_alloc)
* included to ensure that there is enough space to extend
* this chunk.
*
- * Return: TRUE: The chunk has been extended, and *msg_idx
+ * Return: true: The chunk has been extended, and *msg_idx
* contains the message index for null message
* which is large enough to hold size bytes.
*
- * FALSE: The chunk cannot be extended, and *msg_idx
+ * false: The chunk cannot be extended, and *msg_idx
* is undefined.
*
* FAIL: Some internal error has been detected.
@@ -476,19 +476,19 @@ static htri_t
H5O__alloc_extend_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno, size_t size, size_t *msg_idx)
{
H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk that message is in */
- hbool_t chk_dirtied = FALSE; /* Flag for unprotecting chunk */
+ bool chk_dirtied = false; /* Flag for unprotecting chunk */
size_t delta; /* Change in chunk's size */
size_t aligned_size = H5O_ALIGN_OH(oh, size);
uint8_t *old_image; /* Old address of chunk's image in memory */
size_t old_size; /* Old size of chunk */
htri_t was_extended; /* If chunk can be extended */
size_t extend_msg = 0; /* Index of null message to extend */
- hbool_t extended_msg = FALSE; /* Whether an existing message was extended */
+ bool extended_msg = false; /* Whether an existing message was extended */
uint8_t new_size_flags = 0; /* New chunk #0 size flags */
- hbool_t adjust_size_flags = FALSE; /* Whether to adjust the chunk #0 size flags */
+ bool adjust_size_flags = false; /* Whether to adjust the chunk #0 size flags */
size_t extra_prfx_size = 0; /* Extra bytes added to object header prefix */
size_t u; /* Local index variable */
- htri_t ret_value = TRUE; /* return value */
+ htri_t ret_value = true; /* return value */
FUNC_ENTER_PACKAGE
@@ -512,7 +512,7 @@ H5O__alloc_extend_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno, size_t size, size
(oh->chunk[chunkno].gap + H5O_SIZEOF_CHKSUM_OH(oh))))) {
extend_msg = u;
- extended_msg = TRUE;
+ extended_msg = true;
break;
} /* end if */
} /* end for */
@@ -538,19 +538,19 @@ H5O__alloc_extend_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno, size_t size, size
if (orig_prfx_size < 8 && (chunk0_size + delta) > 4294967295) {
extra_prfx_size = 8 - orig_prfx_size;
new_size_flags = H5O_HDR_CHUNK0_8;
- adjust_size_flags = TRUE;
+ adjust_size_flags = true;
} /* end if */
/* Check for moving to a 4-byte size encoding */
else if (orig_prfx_size < 4 && (chunk0_size + delta) > 65535) {
extra_prfx_size = 4 - orig_prfx_size;
new_size_flags = H5O_HDR_CHUNK0_4;
- adjust_size_flags = TRUE;
+ adjust_size_flags = true;
} /* end if */
/* Check for moving to a 2-byte size encoding */
else if (orig_prfx_size < 2 && (chunk0_size + delta) > 255) {
extra_prfx_size = 2 - orig_prfx_size;
new_size_flags = H5O_HDR_CHUNK0_2;
- adjust_size_flags = TRUE;
+ adjust_size_flags = true;
} /* end if */
} /* end if */
@@ -563,8 +563,8 @@ H5O__alloc_extend_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno, size_t size, size
(hsize_t)(oh->chunk[chunkno].size), (hsize_t)(delta + extra_prfx_size));
if (was_extended < 0) /* error */
HGOTO_ERROR(H5E_OHDR, H5E_CANTEXTEND, FAIL, "can't tell if we can extend chunk");
- else if (was_extended == FALSE) /* can't extend -- we are done */
- HGOTO_DONE(FALSE);
+ else if (was_extended == false) /* can't extend -- we are done */
+ HGOTO_DONE(false);
/* Adjust object header prefix flags */
if (adjust_size_flags) {
@@ -602,8 +602,8 @@ H5O__alloc_extend_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno, size_t size, size
} /* end else */
/* Mark the extended message as dirty */
- oh->mesg[extend_msg].dirty = TRUE;
- chk_dirtied = TRUE;
+ oh->mesg[extend_msg].dirty = true;
+ chk_dirtied = true;
/* Allocate more memory space for chunk's image */
old_image = oh->chunk[chunkno].image;
@@ -635,7 +635,7 @@ H5O__alloc_extend_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno, size_t size, size
if (chunkno > 0 && (H5O_CONT_ID == oh->mesg[u].type->id) &&
(((H5O_cont_t *)(oh->mesg[u].native))->chunkno == chunkno)) {
H5O_chunk_proxy_t *chk_proxy2 = NULL; /* Chunk that continuation message is in */
- hbool_t chk_dirtied2 = FALSE; /* Flag for unprotecting chunk */
+ bool chk_dirtied2 = false; /* Flag for unprotecting chunk */
unsigned cont_chunkno = oh->mesg[u].chunkno; /* Chunk # for continuation message */
/* Protect chunk containing continuation message */
@@ -647,8 +647,8 @@ H5O__alloc_extend_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno, size_t size, size
((H5O_cont_t *)(oh->mesg[u].native))->size = oh->chunk[chunkno].size;
/* Flag continuation message as dirty */
- oh->mesg[u].dirty = TRUE;
- chk_dirtied2 = TRUE;
+ oh->mesg[u].dirty = true;
+ chk_dirtied2 = true;
/* Release chunk containing continuation message */
if (H5O__chunk_unprotect(f, chk_proxy2, chk_dirtied2) < 0)
@@ -763,21 +763,21 @@ H5O__alloc_find_best_nonnull(const H5F_t *f, const H5O_t *oh, size_t *size, H5O_
/* Check if message is large enough to hold continuation info */
if (total_size >= cont_size) {
- hbool_t better = FALSE; /* Whether the current message is better than a previous one */
+ bool better = false; /* Whether the current message is better than a previous one */
/* Check for first message that can be moved */
if (found_msg->msgno < 0)
- better = TRUE;
+ better = true;
else {
/* Prioritize moving non-attributes above attributes */
/* (Even attributes with an otherwise better fit */
if (found_msg->id == H5O_ATTR_ID && curr_msg->type->id != H5O_ATTR_ID)
- better = TRUE;
+ better = true;
/* Either two attributes, or two non-attributes */
else {
/* Take a smaller one */
if (total_size < found_msg->total_size)
- better = TRUE;
+ better = true;
/* If they are the same size, choose the earliest one
* in the chunk array */
/* (Could also bias toward message earlier / later
@@ -785,7 +785,7 @@ H5O__alloc_find_best_nonnull(const H5F_t *f, const H5O_t *oh, size_t *size, H5O_
*/
else if (total_size == found_msg->total_size) {
if (msg_chunkno < found_msg->chunkno)
- better = TRUE;
+ better = true;
} /* end else-if */
} /* end else */
} /* end else */
@@ -946,6 +946,9 @@ H5O__alloc_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t found_null, const H5O_
else {
assert(curr_msg->type->id != H5O_CONT_ID);
+ if (size < curr_msg->raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh))
+ HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "invalid size");
+
/* Copy the raw data */
H5MM_memcpy(p, curr_msg->raw - (size_t)H5O_SIZEOF_MSGHDR_OH(oh),
curr_msg->raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh));
@@ -964,7 +967,7 @@ H5O__alloc_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t found_null, const H5O_
found_null = oh->nmesgs++;
null_msg = &(oh->mesg[found_null]);
null_msg->type = H5O_MSG_NULL;
- null_msg->dirty = TRUE;
+ null_msg->dirty = true;
null_msg->native = NULL;
null_msg->raw = oh->chunk[chunkno - 1].image +
((chunkno == 1) ? H5O_SIZEOF_HDR(oh) : H5O_SIZEOF_CHKHDR_OH(oh)) -
@@ -981,7 +984,7 @@ H5O__alloc_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t found_null, const H5O_
oh->chunk[chunkno - 1].gap = 0;
/* Release chunk, marking it dirty */
- if (H5O__chunk_unprotect(f, chk_proxy, TRUE) < 0)
+ if (H5O__chunk_unprotect(f, chk_proxy, true) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header chunk");
} /* end if */
else {
@@ -1048,10 +1051,10 @@ H5O__alloc_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t found_null, const H5O_
} /* end if */
/* Mark the new null message as dirty */
- null_msg->dirty = TRUE;
+ null_msg->dirty = true;
/* Release chunk, marking it dirty */
- if (H5O__chunk_unprotect(f, chk_proxy, TRUE) < 0)
+ if (H5O__chunk_unprotect(f, chk_proxy, true) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header chunk");
} /* end if */
} /* end if */
@@ -1060,7 +1063,7 @@ H5O__alloc_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t found_null, const H5O_
/* (account for chunk's magic # & checksum) */
idx = oh->nmesgs++;
oh->mesg[idx].type = H5O_MSG_NULL;
- oh->mesg[idx].dirty = TRUE;
+ oh->mesg[idx].dirty = true;
oh->mesg[idx].native = NULL;
oh->mesg[idx].raw = p + H5O_SIZEOF_MSGHDR_OH(oh);
oh->mesg[idx].raw_size = size - (size_t)(H5O_SIZEOF_CHKHDR_OH(oh) + H5O_SIZEOF_MSGHDR_OH(oh));
@@ -1252,7 +1255,7 @@ H5O__alloc(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, const void *mesg, s
assert(mesg_idx);
/* Compute the size needed to store the message in the object header */
- raw_size = (type->raw_size)(f, FALSE, mesg);
+ raw_size = (type->raw_size)(f, false, mesg);
if (0 == raw_size)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "can't compute object header message size");
if (raw_size >= H5O_MESG_MAX_SIZE)
@@ -1279,7 +1282,7 @@ H5O__alloc(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, const void *mesg, s
if ((tri_result = H5O__alloc_extend_chunk(f, oh, chunkno, raw_size, &idx)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTEXTEND, FAIL, "can't extend existing chunk");
- if (tri_result == TRUE)
+ if (tri_result == true)
break;
} /* end for */
@@ -1316,10 +1319,10 @@ H5O__alloc(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, const void *mesg, s
*-------------------------------------------------------------------------
*/
herr_t
-H5O__release_mesg(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg, hbool_t adj_link)
+H5O__release_mesg(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg, bool adj_link)
{
H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk that message is in */
- hbool_t chk_dirtied = FALSE; /* Flag for unprotecting chunk */
+ bool chk_dirtied = false; /* Flag for unprotecting chunk */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1353,8 +1356,8 @@ H5O__release_mesg(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg, hbool_t adj_link)
mesg->flags = 0;
/* Mark the message as modified */
- mesg->dirty = TRUE;
- chk_dirtied = TRUE;
+ mesg->dirty = true;
+ chk_dirtied = true;
/* Check if chunk has a gap currently */
if (oh->chunk[mesg->chunkno].gap) {
@@ -1379,7 +1382,7 @@ H5O__release_mesg(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg, hbool_t adj_link)
*
* Purpose: Check and move message(s) forward into a continuation message
*
- * Return: Success: non-negative (TRUE/FALSE)
+ * Return: Success: non-negative (true/false)
* Failure: negative
*
*-------------------------------------------------------------------------
@@ -1390,8 +1393,8 @@ H5O__move_cont(H5F_t *f, H5O_t *oh, unsigned cont_u)
H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk that continuation message is in */
H5O_mesg_t *cont_msg; /* Pointer to the continuation message */
unsigned deleted_chunkno; /* Chunk # to delete */
- hbool_t chk_dirtied = FALSE; /* Flags for unprotecting chunk */
- htri_t ret_value = TRUE; /* Return value */
+ bool chk_dirtied = false; /* Flags for unprotecting chunk */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1442,7 +1445,7 @@ H5O__move_cont(H5F_t *f, H5O_t *oh, unsigned cont_u)
/* Convert continuation message into a null message. Do not delete
* the target chunk yet, so we can still copy messages from it. */
- if (H5O__release_mesg(f, oh, cont_msg, FALSE) < 0)
+ if (H5O__release_mesg(f, oh, cont_msg, false) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to convert into null message");
/* Protect chunk */
@@ -1464,7 +1467,7 @@ H5O__move_cont(H5F_t *f, H5O_t *oh, unsigned cont_u)
H5MM_memcpy(move_start, curr_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh), move_size);
curr_msg->raw = move_start + H5O_SIZEOF_MSGHDR_OH(oh);
curr_msg->chunkno = cont_chunkno;
- chk_dirtied = TRUE;
+ chk_dirtied = true;
/* Adjust location to move messages to */
move_start += move_size;
@@ -1484,8 +1487,8 @@ H5O__move_cont(H5F_t *f, H5O_t *oh, unsigned cont_u)
/* Adjust size of null (was continuation) message */
cont_msg->raw_size = gap_size - (size_t)H5O_SIZEOF_MSGHDR_OH(oh);
cont_msg->raw = move_start + H5O_SIZEOF_MSGHDR_OH(oh);
- cont_msg->dirty = TRUE;
- chk_dirtied = TRUE;
+ cont_msg->dirty = true;
+ chk_dirtied = true;
} /* end if */
else {
/* Check if there is space that should be a gap */
@@ -1512,7 +1515,7 @@ H5O__move_cont(H5F_t *f, H5O_t *oh, unsigned cont_u)
if (curr_msg->type->id == H5O_NULL_ID) {
/* Release any information/memory for message */
H5O__msg_free_mesg(curr_msg);
- chk_dirtied = TRUE;
+ chk_dirtied = true;
/* Remove from message list */
if (v < (oh->nmesgs - 1))
@@ -1527,10 +1530,10 @@ H5O__move_cont(H5F_t *f, H5O_t *oh, unsigned cont_u)
oh->nchunks--;
} /* end if */
else
- ret_value = FALSE;
+ ret_value = false;
} /* end if */
else
- ret_value = FALSE;
+ ret_value = false;
done:
/* Release chunk, if not already done */
@@ -1556,10 +1559,10 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh)
H5O_chunk_proxy_t *null_chk_proxy = NULL; /* Chunk that null message is in */
H5O_chunk_proxy_t *curr_chk_proxy = NULL; /* Chunk that message is in */
H5O_chunk_proxy_t *cont_targ_chk_proxy = NULL; /* Chunk that continuation message points to */
- hbool_t null_chk_dirtied = FALSE; /* Flags for unprotecting null chunk */
- hbool_t curr_chk_dirtied = FALSE; /* Flags for unprotecting curr chunk */
- hbool_t packed_msg; /* Flag to indicate that messages were packed */
- hbool_t did_packing = FALSE; /* Whether any messages were packed */
+ bool null_chk_dirtied = false; /* Flags for unprotecting null chunk */
+ bool curr_chk_dirtied = false; /* Flags for unprotecting curr chunk */
+ bool packed_msg; /* Flag to indicate that messages were packed */
+ bool did_packing = false; /* Whether any messages were packed */
htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1576,7 +1579,7 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh)
unsigned u; /* Local index variable */
/* Reset packed messages flag */
- packed_msg = FALSE;
+ packed_msg = false;
/* Scan through messages for messages that can be moved earlier in chunks */
for (u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++) {
@@ -1619,10 +1622,10 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh)
/* Mark null message dirty */
/* (since we need to re-encode its message header) */
- curr_msg->dirty = TRUE;
+ curr_msg->dirty = true;
/* Release chunk, marking it dirty */
- if (H5O__chunk_unprotect(f, null_chk_proxy, TRUE) < 0)
+ if (H5O__chunk_unprotect(f, null_chk_proxy, true) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL,
"unable to unprotect object header chunk");
null_chk_proxy = NULL;
@@ -1631,7 +1634,7 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh)
* was packed - if its not at the end its chunk,
* we'll move it again on the next pass.
*/
- packed_msg = TRUE;
+ packed_msg = true;
} /* end if */
/* Break out of loop */
@@ -1654,7 +1657,7 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL,
"Error in moving messages into cont message");
else if (status > 0) { /* Message(s) got moved into "continuation" message */
- packed_msg = TRUE;
+ packed_msg = true;
break;
} /* end else-if */
} /* end if */
@@ -1733,7 +1736,7 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh)
} /* end if */
/* Unprotect continuation message target chunk */
- if (H5O__chunk_unprotect(f, cont_targ_chk_proxy, FALSE) < 0)
+ if (H5O__chunk_unprotect(f, cont_targ_chk_proxy, false) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL,
"unable to unprotect object header chunk");
cont_targ_chk_proxy = NULL;
@@ -1747,7 +1750,7 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh)
/* Point non-null message at null message's space */
curr_msg->chunkno = null_msg->chunkno;
curr_msg->raw = null_msg->raw;
- curr_chk_dirtied = TRUE;
+ curr_chk_dirtied = true;
/* Change information for null message */
if (curr_msg->raw_size == null_msg->raw_size) {
@@ -1757,15 +1760,15 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh)
null_msg->raw = old_raw;
/* Mark null message dirty */
- null_msg->dirty = TRUE;
- null_chk_dirtied = TRUE;
+ null_msg->dirty = true;
+ null_chk_dirtied = true;
/* Release current chunk, marking it dirty */
if (H5O__chunk_unprotect(f, curr_chk_proxy, curr_chk_dirtied) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL,
"unable to unprotect object header chunk");
curr_chk_proxy = NULL;
- curr_chk_dirtied = FALSE;
+ curr_chk_dirtied = false;
/* Check for gap in null message's chunk */
if (oh->chunk[old_chunkno].gap > 0) {
@@ -1784,7 +1787,7 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh)
HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL,
"unable to unprotect object header chunk");
null_chk_proxy = NULL;
- null_chk_dirtied = FALSE;
+ null_chk_dirtied = false;
} /* end if */
else {
size_t new_null_msg; /* Message index for new null message */
@@ -1799,8 +1802,8 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh)
null_msg->raw_size = curr_msg->raw_size;
/* Mark null message dirty */
- null_msg->dirty = TRUE;
- null_chk_dirtied = TRUE;
+ null_msg->dirty = true;
+ null_chk_dirtied = true;
/* Add the gap to the chunk */
if (H5O__add_gap(f, oh, null_msg->chunkno, &null_chk_dirtied, v,
@@ -1816,8 +1819,8 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh)
null_msg->raw_size -= curr_msg->raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh);
/* Mark null message dirty */
- null_msg->dirty = TRUE;
- null_chk_dirtied = TRUE;
+ null_msg->dirty = true;
+ null_chk_dirtied = true;
/* Create new null message for previous location of non-null message */
if (oh->nmesgs >= oh->alloc_nmesgs) {
@@ -1839,7 +1842,7 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh)
HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL,
"unable to unprotect object header chunk");
null_chk_proxy = NULL;
- null_chk_dirtied = FALSE;
+ null_chk_dirtied = false;
/* Initialize new null message to take over non-null message's location */
oh->mesg[new_null_msg].type = H5O_MSG_NULL;
@@ -1849,8 +1852,8 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh)
oh->mesg[new_null_msg].chunkno = old_chunkno;
/* Mark new null message dirty */
- oh->mesg[new_null_msg].dirty = TRUE;
- curr_chk_dirtied = TRUE;
+ oh->mesg[new_null_msg].dirty = true;
+ curr_chk_dirtied = true;
/* Check for gap in new null message's chunk */
if (oh->chunk[old_chunkno].gap > 0) {
@@ -1869,11 +1872,11 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh)
HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL,
"unable to unprotect object header chunk");
curr_chk_proxy = NULL;
- curr_chk_dirtied = FALSE;
+ curr_chk_dirtied = false;
} /* end else */
/* Indicate that we packed messages */
- packed_msg = TRUE;
+ packed_msg = true;
/* Break out of loop */
/* (If it's possible to move message to even earlier chunk
@@ -1892,7 +1895,7 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh)
/* If we did any packing, remember that */
if (packed_msg)
- did_packing = TRUE;
+ did_packing = true;
} while (packed_msg);
/* Set return value */
@@ -1904,7 +1907,7 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect null object header chunk");
if (curr_chk_proxy && H5O__chunk_unprotect(f, curr_chk_proxy, curr_chk_dirtied) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect current object header chunk");
- if (cont_targ_chk_proxy && H5O__chunk_unprotect(f, cont_targ_chk_proxy, FALSE) < 0)
+ if (cont_targ_chk_proxy && H5O__chunk_unprotect(f, cont_targ_chk_proxy, false) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL,
"unable to unprotect continuation message target object header chunk");
} /* end if */
@@ -1927,9 +1930,9 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh)
static htri_t
H5O__merge_null(H5F_t *f, H5O_t *oh)
{
- hbool_t merged_msg; /* Flag to indicate that messages were merged */
- hbool_t did_merging = FALSE; /* Whether any messages were merged */
- htri_t ret_value = FAIL; /* Return value */
+ bool merged_msg; /* Flag to indicate that messages were merged */
+ bool did_merging = false; /* Whether any messages were merged */
+ htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1945,7 +1948,7 @@ H5O__merge_null(H5F_t *f, H5O_t *oh)
unsigned u; /* Local index variable */
/* Reset merged messages flag */
- merged_msg = FALSE;
+ merged_msg = false;
/* Scan messages for adjacent null messages & merge them */
for (u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++) {
@@ -1971,7 +1974,7 @@ H5O__merge_null(H5F_t *f, H5O_t *oh)
adj_raw_size = (size_t)H5O_SIZEOF_MSGHDR_OH(oh) + curr_msg2->raw_size;
/* Message has been merged */
- merged_msg = TRUE;
+ merged_msg = true;
} /* end if */
/* Check for second message before first message */
else if ((curr_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh)) ==
@@ -1981,7 +1984,7 @@ H5O__merge_null(H5F_t *f, H5O_t *oh)
adj_raw_size = (size_t)H5O_SIZEOF_MSGHDR_OH(oh) + curr_msg2->raw_size;
/* Message has been merged */
- merged_msg = TRUE;
+ merged_msg = true;
} /* end if */
/* Second message has been merged, delete it */
@@ -2002,10 +2005,10 @@ H5O__merge_null(H5F_t *f, H5O_t *oh)
curr_msg->raw_size += adj_raw_size;
/* Mark first message as dirty */
- curr_msg->dirty = TRUE;
+ curr_msg->dirty = true;
/* Release new null message's chunk, marking it dirty */
- if (H5O__chunk_unprotect(f, curr_chk_proxy, TRUE) < 0)
+ if (H5O__chunk_unprotect(f, curr_chk_proxy, true) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL,
"unable to unprotect object header chunk");
@@ -2045,7 +2048,7 @@ H5O__merge_null(H5F_t *f, H5O_t *oh)
/* If we did any merging, remember that */
if (merged_msg)
- did_merging = TRUE;
+ did_merging = true;
} while (merged_msg);
/* Set return value */
@@ -2072,9 +2075,9 @@ H5O__merge_null(H5F_t *f, H5O_t *oh)
static htri_t
H5O__remove_empty_chunks(H5F_t *f, H5O_t *oh)
{
- hbool_t deleted_chunk; /* Whether to a chunk was deleted */
- hbool_t did_deleting = FALSE; /* Whether any chunks were deleted */
- htri_t ret_value = FAIL; /* Return value */
+ bool deleted_chunk; /* Whether to a chunk was deleted */
+ bool did_deleting = false; /* Whether any chunks were deleted */
+ htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_PACKAGE
@@ -2088,7 +2091,7 @@ H5O__remove_empty_chunks(H5F_t *f, H5O_t *oh)
unsigned u, v; /* Local index variables */
/* Reset 'chunk deleted' flag */
- deleted_chunk = FALSE;
+ deleted_chunk = false;
/* Scan messages for null messages that fill an entire chunk */
for (u = 0, null_msg = &oh->mesg[0]; u < oh->nmesgs; u++, null_msg++) {
@@ -2137,7 +2140,7 @@ H5O__remove_empty_chunks(H5F_t *f, H5O_t *oh)
deleted_chunkno = null_msg->chunkno;
/* Convert continuation message into a null message */
- if (H5O__release_mesg(f, oh, cont_msg, TRUE) < 0)
+ if (H5O__release_mesg(f, oh, cont_msg, true) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to convert into null message");
/*
@@ -2227,14 +2230,14 @@ H5O__remove_empty_chunks(H5F_t *f, H5O_t *oh)
} /* end for */
/* Found chunk to delete */
- deleted_chunk = TRUE;
+ deleted_chunk = true;
break;
} /* end if */
} /* end for */
/* If we deleted any chunks, remember that */
if (deleted_chunk)
- did_deleting = TRUE;
+ did_deleting = true;
} while (deleted_chunk);
/* Set return value */
@@ -2257,9 +2260,9 @@ H5O__remove_empty_chunks(H5F_t *f, H5O_t *oh)
herr_t
H5O__condense_header(H5F_t *f, H5O_t *oh)
{
- hbool_t rescan_header; /* Whether to rescan header */
- htri_t result; /* Result from packing/merging/etc */
- herr_t ret_value = SUCCEED; /* return value */
+ bool rescan_header; /* Whether to rescan header */
+ htri_t result; /* Result from packing/merging/etc */
+ herr_t ret_value = SUCCEED; /* return value */
FUNC_ENTER_PACKAGE
@@ -2269,28 +2272,28 @@ H5O__condense_header(H5F_t *f, H5O_t *oh)
/* Loop until no changed to the object header messages & chunks */
do {
/* Reset 'rescan chunks' flag */
- rescan_header = FALSE;
+ rescan_header = false;
/* Scan for messages that can be moved earlier in chunks */
result = H5O__move_msgs_forward(f, oh);
if (result < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTPACK, FAIL, "can't move header messages forward");
if (result > 0)
- rescan_header = TRUE;
+ rescan_header = true;
/* Scan for adjacent null messages & merge them */
result = H5O__merge_null(f, oh);
if (result < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTPACK, FAIL, "can't pack null header messages");
if (result > 0)
- rescan_header = TRUE;
+ rescan_header = true;
/* Scan for empty chunks to remove */
result = H5O__remove_empty_chunks(f, oh);
if (result < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTPACK, FAIL, "can't remove empty chunk");
if (result > 0)
- rescan_header = TRUE;
+ rescan_header = true;
} while (rescan_header);
#ifdef H5O_DEBUG
H5O__assert(oh);
@@ -2324,7 +2327,7 @@ H5O__alloc_shrink_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno)
size_t sizeof_chksum = H5O_SIZEOF_CHKSUM_OH(oh); /* Size of chunk checksum */
size_t sizeof_msghdr = H5O_SIZEOF_MSGHDR_OH(oh); /* Size of message header */
uint8_t new_size_flags = 0; /* New chunk #0 size flags */
- hbool_t adjust_size_flags = FALSE; /* Whether to adjust the chunk #0 size flags */
+ bool adjust_size_flags = false; /* Whether to adjust the chunk #0 size flags */
size_t less_prfx_size = 0; /* Bytes removed from object header prefix */
size_t u; /* Index */
herr_t ret_value = SUCCEED; /* Return value */
@@ -2390,7 +2393,7 @@ H5O__alloc_shrink_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno)
/* Initialize new null message to make the chunk large enough */
curr_msg = &oh->mesg[oh->nmesgs - 1];
curr_msg->type = H5O_MSG_NULL;
- curr_msg->dirty = TRUE;
+ curr_msg->dirty = true;
curr_msg->native = NULL;
curr_msg->raw = old_image + new_size + sizeof_msghdr - sizeof_chksum;
curr_msg->raw_size =
@@ -2410,19 +2413,19 @@ H5O__alloc_shrink_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno)
if (orig_prfx_size > 1 && chunk0_newsize <= 255) {
less_prfx_size = orig_prfx_size - 1;
new_size_flags = H5O_HDR_CHUNK0_1;
- adjust_size_flags = TRUE;
+ adjust_size_flags = true;
} /* end if */
/* Check for moving to a 2-byte size encoding */
else if (orig_prfx_size > 2 && chunk0_newsize <= 65535) {
less_prfx_size = orig_prfx_size - 2;
new_size_flags = H5O_HDR_CHUNK0_2;
- adjust_size_flags = TRUE;
+ adjust_size_flags = true;
} /* end if */
/* Check for moving to a 4-byte size encoding */
else if (orig_prfx_size > 4 && chunk0_newsize <= 4294967295) {
less_prfx_size = orig_prfx_size - 4;
new_size_flags = H5O_HDR_CHUNK0_4;
- adjust_size_flags = TRUE;
+ adjust_size_flags = true;
} /* end if */
} /* end if */
@@ -2470,10 +2473,10 @@ H5O__alloc_shrink_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno)
((H5O_cont_t *)(curr_msg->native))->size = chunk->size;
/* Flag continuation message as dirty */
- curr_msg->dirty = TRUE;
+ curr_msg->dirty = true;
/* Release chunk, marking it dirty */
- if (H5O__chunk_unprotect(f, cont_chk_proxy, TRUE) < 0)
+ if (H5O__chunk_unprotect(f, cont_chk_proxy, true) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header chunk");
} /* end if */
} /* end for */
@@ -2490,7 +2493,7 @@ H5O__alloc_shrink_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno)
done:
/* Release chunk, marking it dirty */
- if (chk_proxy && H5O__chunk_unprotect(f, chk_proxy, TRUE) < 0)
+ if (chk_proxy && H5O__chunk_unprotect(f, chk_proxy, true) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header chunk");
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Oattr.c b/src/H5Oattr.c
index 901227ee26c..e86ec39432a 100644
--- a/src/H5Oattr.c
+++ b/src/H5Oattr.c
@@ -28,10 +28,10 @@ static void *H5O__attr_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags, uns
static void *H5O__attr_copy(const void *_mesg, void *_dest);
static size_t H5O__attr_size(const H5F_t *f, const void *_mesg);
static herr_t H5O__attr_free(void *mesg);
-static herr_t H5O__attr_pre_copy_file(H5F_t *file_src, const void *mesg_src, hbool_t *deleted,
+static herr_t H5O__attr_pre_copy_file(H5F_t *file_src, const void *mesg_src, bool *deleted,
const H5O_copy_t *cpy_info, void *udata);
static void *H5O__attr_copy_file(H5F_t *file_src, const H5O_msg_class_t *mesg_type, void *native_src,
- H5F_t *file_dst, hbool_t *recompute_size, H5O_copy_t *cpy_info, void *udata);
+ H5F_t *file_dst, bool *recompute_size, H5O_copy_t *cpy_info, void *udata);
static herr_t H5O__attr_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src, H5O_loc_t *dst_oloc,
void *mesg_dst, H5O_copy_t *cpy_info);
static herr_t H5O__attr_get_crt_index(const void *_mesg, H5O_msg_crt_idx_t *crt_idx);
@@ -193,7 +193,7 @@ H5O__attr_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flags, u
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
/* Make an attempt to detect corrupted name or name length - HDFFV-10588 */
- if (name_len != (HDstrnlen(attr->shared->name, name_len) + 1))
+ if (name_len != (strnlen(attr->shared->name, name_len) + 1))
HGOTO_ERROR(H5E_ATTR, H5E_CANTDECODE, NULL, "attribute name has different length than stored length");
/* Determine pointer movement and check if it's valid */
@@ -243,7 +243,7 @@ H5O__attr_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flags, u
extent = H5FL_FREE(H5S_extent_t, extent);
/* Default to entire dataspace being selected */
- if (H5S_select_all(attr->shared->ds, FALSE) < 0)
+ if (H5S_select_all(attr->shared->ds, false) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, NULL, "unable to set all selection");
/* Determine pointer movement and check if it's valid */
@@ -360,7 +360,7 @@ H5O__attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
* encoded lengths are exact but we pad each part except the data to be a
* multiple of eight bytes (in the first version).
*/
- name_len = HDstrlen(attr->shared->name) + 1;
+ name_len = strlen(attr->shared->name) + 1;
UINT16ENCODE(p, name_len);
UINT16ENCODE(p, attr->shared->dt_size);
UINT16ENCODE(p, attr->shared->ds_size);
@@ -380,7 +380,7 @@ H5O__attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
p += name_len;
/* encode the attribute datatype */
- if ((H5O_MSG_DTYPE->encode)(f, FALSE, p, attr->shared->dt) < 0)
+ if ((H5O_MSG_DTYPE->encode)(f, false, p, attr->shared->dt) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "can't encode attribute datatype");
if (attr->shared->version < H5O_ATTR_VERSION_2) {
@@ -391,7 +391,7 @@ H5O__attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
p += attr->shared->dt_size;
/* encode the attribute dataspace */
- if ((H5O_MSG_SDSPACE->encode)(f, FALSE, p, &(attr->shared->ds->extent)) < 0)
+ if ((H5O_MSG_SDSPACE->encode)(f, false, p, &(attr->shared->ds->extent)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "can't encode attribute dataspace");
if (attr->shared->version < H5O_ATTR_VERSION_2) {
@@ -479,7 +479,7 @@ H5O__attr_size(const H5F_t H5_ATTR_UNUSED *f, const void *_mesg)
2; /*space size */
/* Length of attribute name */
- name_len = HDstrlen(attr->shared->name) + 1;
+ name_len = strlen(attr->shared->name) + 1;
/* Version-specific size information */
if (attr->shared->version == H5O_ATTR_VERSION_1)
@@ -629,7 +629,7 @@ H5O__attr_link(H5F_t *f, H5O_t *oh, void *_mesg)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__attr_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *native_src, hbool_t *deleted,
+H5O__attr_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *native_src, bool *deleted,
const H5O_copy_t *cpy_info, void H5_ATTR_UNUSED *udata)
{
const H5A_t *attr_src = (const H5A_t *)native_src; /* Source attribute */
@@ -652,7 +652,7 @@ H5O__attr_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *native_src,
* that this message should be deleted.
*/
if (cpy_info->copy_without_attr)
- *deleted = TRUE;
+ *deleted = true;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -670,8 +670,7 @@ H5O__attr_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *native_src,
*/
static void *
H5O__attr_copy_file(H5F_t *file_src, const H5O_msg_class_t H5_ATTR_UNUSED *mesg_type, void *native_src,
- H5F_t *file_dst, hbool_t *recompute_size, H5O_copy_t *cpy_info,
- void H5_ATTR_UNUSED *udata)
+ H5F_t *file_dst, bool *recompute_size, H5O_copy_t *cpy_info, void H5_ATTR_UNUSED *udata)
{
void *ret_value = NULL; /* Return value */
@@ -832,13 +831,13 @@ H5O__attr_debug(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwidt
case H5T_CSET_RESERVED_13:
case H5T_CSET_RESERVED_14:
case H5T_CSET_RESERVED_15:
- HDsnprintf(buf, sizeof(buf), "H5T_CSET_RESERVED_%d", (int)(mesg->shared->encoding));
+ snprintf(buf, sizeof(buf), "H5T_CSET_RESERVED_%d", (int)(mesg->shared->encoding));
s = buf;
break;
case H5T_CSET_ERROR:
default:
- HDsnprintf(buf, sizeof(buf), "Unknown character set: %d", (int)(mesg->shared->encoding));
+ snprintf(buf, sizeof(buf), "Unknown character set: %d", (int)(mesg->shared->encoding));
s = buf;
break;
} /* end switch */
diff --git a/src/H5Oattribute.c b/src/H5Oattribute.c
index 9e38488502f..88c595ea213 100644
--- a/src/H5Oattribute.c
+++ b/src/H5Oattribute.c
@@ -68,7 +68,7 @@ typedef struct {
H5A_t *attr; /* Attribute data to update object header with */
/* up */
- hbool_t found; /* Whether the attribute was found */
+ bool found; /* Whether the attribute was found */
} H5O_iter_wrt_t;
/* User data for iteration when renaming an attribute */
@@ -79,7 +79,7 @@ typedef struct {
const char *new_name; /* New name of attribute */
/* up */
- hbool_t found; /* Whether the attribute was found */
+ bool found; /* Whether the attribute was found */
} H5O_iter_ren_t;
/* User data for iteration when removing an attribute */
@@ -89,7 +89,7 @@ typedef struct {
const char *name; /* Name of attribute to open */
/* up */
- hbool_t found; /* Found attribute to delete */
+ bool found; /* Found attribute to delete */
} H5O_iter_rm_t;
/* User data for iteration when checking if an attribute exists */
@@ -98,7 +98,7 @@ typedef struct {
const char *name; /* Name of attribute to open */
/* up */
- hbool_t *exists; /* Pointer to flag to indicate attribute exists */
+ bool *exists; /* Pointer to flag to indicate attribute exists */
} H5O_iter_xst_t;
/********************/
@@ -174,7 +174,7 @@ H5O__attr_to_dense_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR_U
/* Convert message into a null message in the header */
/* (don't delete attribute's space in the file though) */
- if (H5O__release_mesg(udata->f, oh, mesg, FALSE) < 0)
+ if (H5O__release_mesg(udata->f, oh, mesg, false) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, H5_ITER_ERROR, "unable to convert into null message");
/* Indicate that the object header was modified */
@@ -213,16 +213,16 @@ H5O__attr_create(const H5O_loc_t *loc, H5A_t *attr)
/* Check if this object already has attribute information */
if (oh->version > H5O_VERSION_1) {
- hbool_t new_ainfo = FALSE; /* Flag to indicate that the attribute information is new */
- htri_t ainfo_exists; /* Whether the attribute info was retrieved */
+ bool new_ainfo = false; /* Flag to indicate that the attribute information is new */
+ htri_t ainfo_exists; /* Whether the attribute info was retrieved */
/* Check for (& retrieve if available) attribute info */
if ((ainfo_exists = H5A__get_ainfo(loc->file, oh, &ainfo)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message");
if (!ainfo_exists) {
/* Initialize attribute information */
- ainfo.track_corder = (hbool_t)((oh->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED) ? TRUE : FALSE);
- ainfo.index_corder = (hbool_t)((oh->flags & H5O_HDR_ATTR_CRT_ORDER_INDEXED) ? TRUE : FALSE);
+ ainfo.track_corder = (bool)((oh->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED) ? true : false);
+ ainfo.index_corder = (bool)((oh->flags & H5O_HDR_ATTR_CRT_ORDER_INDEXED) ? true : false);
ainfo.max_crt_idx = 0;
ainfo.corder_bt2_addr = HADDR_UNDEF;
ainfo.nattrs = 0;
@@ -230,7 +230,7 @@ H5O__attr_create(const H5O_loc_t *loc, H5A_t *attr)
ainfo.name_bt2_addr = HADDR_UNDEF;
/* Set flag to add attribute information to object header */
- new_ainfo = TRUE;
+ new_ainfo = true;
} /* end if */
else {
/* Sanity check attribute info read in */
@@ -247,9 +247,9 @@ H5O__attr_create(const H5O_loc_t *loc, H5A_t *attr)
/* Check for attribute being shareable */
if ((shareable = H5SM_can_share(loc->file, NULL, NULL, H5O_ATTR_ID, attr)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_BADMESG, FAIL, "can't determine attribute sharing status");
- else if (shareable == FALSE) {
+ else if (shareable == false) {
/* Compute the size needed to encode the attribute */
- raw_size = (H5O_MSG_ATTR->raw_size)(loc->file, FALSE, attr);
+ raw_size = (H5O_MSG_ATTR->raw_size)(loc->file, false, attr);
} /* end if */
/* Check for condititions for switching to "dense" attribute storage are met */
@@ -366,7 +366,7 @@ H5O__attr_create(const H5O_loc_t *loc, H5A_t *attr)
HGOTO_ERROR(H5E_ATTR, H5E_WRITEERROR, FAIL, "error determining if message should be shared");
/* Update the modification time, if any */
- if (H5O_touch_oh(loc->file, oh, FALSE) < 0)
+ if (H5O_touch_oh(loc->file, oh, false) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update time on object");
done:
@@ -401,7 +401,7 @@ H5O__attr_open_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned sequence,
assert(!udata->attr);
/* Check for correct attribute message to modify */
- if (HDstrcmp(((H5A_t *)mesg->native)->shared->name, udata->name) == 0) {
+ if (strcmp(((H5A_t *)mesg->native)->shared->name, udata->name) == 0) {
/* Make a copy of the attribute to return */
if (NULL == (udata->attr = H5A__copy(NULL, (H5A_t *)mesg->native)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, H5_ITER_ERROR, "unable to copy attribute");
@@ -435,7 +435,7 @@ H5O__attr_open_by_name(const H5O_loc_t *loc, const char *name)
H5O_ainfo_t ainfo; /* Attribute information for object */
H5A_t *exist_attr = NULL; /* Existing opened attribute object */
H5A_t *opened_attr = NULL; /* Newly opened attribute object */
- htri_t found_open_attr = FALSE; /* Whether opened object is found */
+ htri_t found_open_attr = false; /* Whether opened object is found */
H5A_t *ret_value = NULL; /* Return value */
FUNC_ENTER_PACKAGE_TAG(loc->addr)
@@ -445,7 +445,7 @@ H5O__attr_open_by_name(const H5O_loc_t *loc, const char *name)
assert(name);
/* Protect the object header to iterate over */
- if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
+ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, false)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTPROTECT, NULL, "unable to load object header");
/* Check for attribute info stored */
@@ -461,7 +461,7 @@ H5O__attr_open_by_name(const H5O_loc_t *loc, const char *name)
*/
if ((found_open_attr = H5O__attr_find_opened_attr(loc, &exist_attr, name)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, NULL, "failed in finding opened attribute");
- else if (found_open_attr == TRUE) {
+ else if (found_open_attr == true) {
if (NULL == (opened_attr = H5A__copy(NULL, exist_attr)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, NULL, "can't copy existing attribute");
} /* end else if */
@@ -560,7 +560,7 @@ H5O__attr_open_by_idx(const H5O_loc_t *loc, H5_index_t idx_type, H5_iter_order_t
H5A_attr_iter_op_t attr_op; /* Attribute operator */
H5A_t *exist_attr = NULL; /* Existing opened attribute object */
H5A_t *opened_attr = NULL; /* Newly opened attribute object */
- htri_t found_open_attr = FALSE; /* Whether opened object is found */
+ htri_t found_open_attr = false; /* Whether opened object is found */
H5A_t *ret_value = NULL; /* Return value */
FUNC_ENTER_PACKAGE
@@ -617,8 +617,8 @@ H5O__attr_open_by_idx(const H5O_loc_t *loc, H5_index_t idx_type, H5_iter_order_t
* Purpose: Find out whether an attribute has been opened by giving
* the name. Return the pointer to the object if found.
*
- * Return: TRUE: found the already opened object
- * FALSE: didn't find the opened object
+ * Return: true: found the already opened object
+ * false: didn't find the opened object
* FAIL: function failed.
*
*-------------------------------------------------------------------------
@@ -629,7 +629,7 @@ H5O__attr_find_opened_attr(const H5O_loc_t *loc, H5A_t **attr, const char *name_
hid_t *attr_id_list = NULL; /* List of IDs for opened attributes */
unsigned long loc_fnum; /* File serial # for object */
size_t num_open_attr; /* Number of opened attributes */
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE
@@ -638,7 +638,7 @@ H5O__attr_find_opened_attr(const H5O_loc_t *loc, H5A_t **attr, const char *name_
HGOTO_ERROR(H5E_ATTR, H5E_BADVALUE, FAIL, "can't get file serial number");
/* Count all opened attributes */
- if (H5F_get_obj_count(loc->file, H5F_OBJ_ATTR | H5F_OBJ_LOCAL, FALSE, &num_open_attr) < 0)
+ if (H5F_get_obj_count(loc->file, H5F_OBJ_ATTR | H5F_OBJ_LOCAL, false, &num_open_attr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't count opened attributes");
/* Find out whether the attribute has been opened */
@@ -651,7 +651,7 @@ H5O__attr_find_opened_attr(const H5O_loc_t *loc, H5A_t **attr, const char *name_
HGOTO_ERROR(H5E_ATTR, H5E_CANTALLOC, FAIL, "unable to allocate memory for attribute ID list");
/* Retrieve the IDs of all opened attributes */
- if (H5F_get_obj_ids(loc->file, H5F_OBJ_ATTR | H5F_OBJ_LOCAL, num_open_attr, attr_id_list, FALSE,
+ if (H5F_get_obj_ids(loc->file, H5F_OBJ_ATTR | H5F_OBJ_LOCAL, num_open_attr, attr_id_list, false,
&check_num_attr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get IDs of opened attributes");
if (check_num_attr != num_open_attr)
@@ -673,9 +673,9 @@ H5O__attr_find_opened_attr(const H5O_loc_t *loc, H5A_t **attr, const char *name_
* address to which the attribute is attached, and file serial
* number should all match.
*/
- if (!HDstrcmp(name_to_open, (*attr)->shared->name) && loc->addr == (*attr)->oloc.addr &&
+ if (!strcmp(name_to_open, (*attr)->shared->name) && loc->addr == (*attr)->oloc.addr &&
loc_fnum == attr_fnum) {
- ret_value = TRUE;
+ ret_value = true;
break;
} /* end if */
} /* end for */
@@ -773,7 +773,7 @@ H5O__attr_write_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR_UNUS
{
H5O_iter_wrt_t *udata = (H5O_iter_wrt_t *)_udata; /* Operator user data */
H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk that message is in */
- hbool_t chk_dirtied = FALSE; /* Flag for unprotecting chunk */
+ bool chk_dirtied = false; /* Flag for unprotecting chunk */
herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_PACKAGE
@@ -784,7 +784,7 @@ H5O__attr_write_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR_UNUS
assert(!udata->found);
/* Check for correct attribute message to modify */
- if (0 == HDstrcmp(((H5A_t *)mesg->native)->shared->name, udata->attr->shared->name)) {
+ if (0 == strcmp(((H5A_t *)mesg->native)->shared->name, udata->attr->shared->name)) {
/* Protect chunk */
if (NULL == (chk_proxy = H5O__chunk_protect(udata->f, oh, mesg->chunkno)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTPROTECT, H5_ITER_ERROR, "unable to load object header chunk");
@@ -805,8 +805,8 @@ H5O__attr_write_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR_UNUS
} /* end if */
/* Mark the message as modified */
- mesg->dirty = TRUE;
- chk_dirtied = TRUE;
+ mesg->dirty = true;
+ chk_dirtied = true;
/* Release chunk */
if (H5O__chunk_unprotect(udata->f, chk_proxy, chk_dirtied) < 0)
@@ -824,7 +824,7 @@ H5O__attr_write_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR_UNUS
*oh_modified = H5O_MODIFY;
/* Indicate that the attribute was found */
- udata->found = TRUE;
+ udata->found = true;
/* Stop iterating */
ret_value = H5_ITER_STOP;
@@ -885,7 +885,7 @@ H5O__attr_write(const H5O_loc_t *loc, H5A_t *attr)
/* Set up user data for callback */
udata.f = loc->file;
udata.attr = attr;
- udata.found = FALSE;
+ udata.found = false;
/* Iterate over attributes, to locate correct one to update */
op.op_type = H5O_MESG_OP_LIB;
@@ -899,7 +899,7 @@ H5O__attr_write(const H5O_loc_t *loc, H5A_t *attr)
} /* end else */
/* Update the modification time, if any */
- if (H5O_touch_oh(loc->file, oh, FALSE) < 0)
+ if (H5O_touch_oh(loc->file, oh, false) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update time on object");
done:
@@ -935,9 +935,9 @@ H5O__attr_rename_chk_cb(H5O_t H5_ATTR_UNUSED *oh, H5O_mesg_t *mesg /*in,out*/,
assert(!udata->found);
/* Check for existing attribute with new name */
- if (HDstrcmp(((H5A_t *)mesg->native)->shared->name, udata->new_name) == 0) {
+ if (strcmp(((H5A_t *)mesg->native)->shared->name, udata->new_name) == 0) {
/* Indicate that we found an existing attribute with the new name*/
- udata->found = TRUE;
+ udata->found = true;
/* Stop iterating */
ret_value = H5_ITER_STOP;
@@ -967,7 +967,7 @@ H5O__attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR
{
H5O_iter_ren_t *udata = (H5O_iter_ren_t *)_udata; /* Operator user data */
H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk that message is in */
- hbool_t chk_dirtied = FALSE; /* Flag for unprotecting chunk */
+ bool chk_dirtied = false; /* Flag for unprotecting chunk */
herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_PACKAGE
@@ -978,7 +978,7 @@ H5O__attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR
assert(!udata->found);
/* Find correct attribute message to rename */
- if (HDstrcmp(((H5A_t *)mesg->native)->shared->name, udata->old_name) == 0) {
+ if (strcmp(((H5A_t *)mesg->native)->shared->name, udata->old_name) == 0) {
unsigned old_version = ((H5A_t *)mesg->native)->shared->version; /* Old version of the attribute */
/* Protect chunk */
@@ -994,8 +994,8 @@ H5O__attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5_ITER_ERROR, "unable to update attribute version");
/* Mark the message as modified */
- mesg->dirty = TRUE;
- chk_dirtied = TRUE;
+ mesg->dirty = true;
+ chk_dirtied = true;
/* Release chunk */
if (H5O__chunk_unprotect(udata->f, chk_proxy, chk_dirtied) < 0)
@@ -1012,10 +1012,10 @@ H5O__attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR
} /* end if */
else {
/* Sanity check */
- assert(H5O_msg_is_shared(H5O_ATTR_ID, (H5A_t *)mesg->native) == FALSE);
+ assert(H5O_msg_is_shared(H5O_ATTR_ID, (H5A_t *)mesg->native) == false);
/* Check for attribute message changing size */
- if (HDstrlen(udata->new_name) != HDstrlen(udata->old_name) ||
+ if (strlen(udata->new_name) != strlen(udata->old_name) ||
old_version != ((H5A_t *)mesg->native)->shared->version) {
H5A_t *attr; /* Attribute to re-add */
@@ -1036,7 +1036,7 @@ H5O__attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR
/* (doesn't decrement the link count on shared components because
* the "native" pointer has been reset)
*/
- if (H5O__release_mesg(udata->f, oh, mesg, FALSE) < 0)
+ if (H5O__release_mesg(udata->f, oh, mesg, false) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, H5_ITER_ERROR,
"unable to release previous attribute");
@@ -1050,7 +1050,7 @@ H5O__attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR
"unable to relocate renamed attribute in header");
/* Sanity check */
- assert(H5O_msg_is_shared(H5O_ATTR_ID, attr) == FALSE);
+ assert(H5O_msg_is_shared(H5O_ATTR_ID, attr) == false);
/* Close the local copy of the attribute */
H5A__close(attr);
@@ -1061,7 +1061,7 @@ H5O__attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR
*oh_modified |= H5O_MODIFY;
/* Indicate that we found an existing attribute with the old name */
- udata->found = TRUE;
+ udata->found = true;
/* Stop iterating */
ret_value = H5_ITER_STOP;
@@ -1124,7 +1124,7 @@ H5O__attr_rename(const H5O_loc_t *loc, const char *old_name, const char *new_nam
udata.f = loc->file;
udata.old_name = old_name;
udata.new_name = new_name;
- udata.found = FALSE;
+ udata.found = false;
/* Iterate over attributes, to check if "new name" exists already */
op.op_type = H5O_MESG_OP_LIB;
@@ -1148,7 +1148,7 @@ H5O__attr_rename(const H5O_loc_t *loc, const char *old_name, const char *new_nam
} /* end else */
/* Update the modification time, if any */
- if (H5O_touch_oh(loc->file, oh, FALSE) < 0)
+ if (H5O_touch_oh(loc->file, oh, false) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update time on object");
done:
@@ -1185,7 +1185,7 @@ H5O_attr_iterate_real(hid_t loc_id, const H5O_loc_t *loc, H5_index_t idx_type, H
assert(attr_op);
/* Protect the object header to iterate over */
- if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
+ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, false)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTPROTECT, FAIL, "unable to load object header");
/* Check for attribute info stored */
@@ -1308,8 +1308,8 @@ H5O__attr_remove_update(const H5O_loc_t *loc, H5O_t *oh, H5O_ainfo_t *ainfo)
/* Check for shifting from dense storage back to compact storage */
if (H5_addr_defined(ainfo->fheap_addr) && ainfo->nattrs < oh->min_dense) {
- hbool_t can_convert = TRUE; /* Whether converting to attribute messages is possible */
- size_t u; /* Local index */
+ bool can_convert = true; /* Whether converting to attribute messages is possible */
+ size_t u; /* Local index */
/* Build the table of attributes for this object */
if (H5A__dense_build_table(loc->file, ainfo, H5_INDEX_NAME, H5_ITER_NATIVE, &atable) < 0)
@@ -1322,14 +1322,14 @@ H5O__attr_remove_update(const H5O_loc_t *loc, H5O_t *oh, H5O_ainfo_t *ainfo)
for (u = 0; u < ainfo->nattrs; u++)
if (H5O_msg_size_oh(loc->file, oh, H5O_ATTR_ID, (atable.attrs[u]), (size_t)0) >=
H5O_MESG_MAX_SIZE) {
- can_convert = FALSE;
+ can_convert = false;
break;
} /* end if */
/* If ok, insert attributes as object header messages */
if (can_convert) {
H5A_t *exist_attr = NULL;
- htri_t found_open_attr = FALSE;
+ htri_t found_open_attr = false;
/* Iterate over attributes, to put them into header */
for (u = 0; u < ainfo->nattrs; u++) {
@@ -1384,7 +1384,7 @@ H5O__attr_remove_update(const H5O_loc_t *loc, H5O_t *oh, H5O_ainfo_t *ainfo)
* message should be deleted itself.
*/
if (ainfo->nattrs == 0) {
- if (H5O__msg_remove_real(loc->file, oh, H5O_MSG_AINFO, H5O_ALL, NULL, NULL, TRUE) < 0)
+ if (H5O__msg_remove_real(loc->file, oh, H5O_MSG_AINFO, H5O_ALL, NULL, NULL, true) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute info");
} /* end if */
@@ -1421,16 +1421,16 @@ H5O__attr_remove_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR_UNU
assert(!udata->found);
/* Check for correct attribute message to modify */
- if (HDstrcmp(((H5A_t *)mesg->native)->shared->name, udata->name) == 0) {
+ if (strcmp(((H5A_t *)mesg->native)->shared->name, udata->name) == 0) {
/* Convert message into a null message (i.e. delete it) */
- if (H5O__release_mesg(udata->f, oh, mesg, TRUE) < 0)
+ if (H5O__release_mesg(udata->f, oh, mesg, true) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, H5_ITER_ERROR, "unable to convert into null message");
/* Indicate that the object header was modified */
*oh_modified = H5O_MODIFY_CONDENSE;
/* Indicate that this message is the attribute to be deleted */
- udata->found = TRUE;
+ udata->found = true;
/* Stop iterating */
ret_value = H5_ITER_STOP;
@@ -1454,7 +1454,7 @@ H5O__attr_remove(const H5O_loc_t *loc, const char *name)
{
H5O_t *oh = NULL; /* Pointer to actual object header */
H5O_ainfo_t ainfo; /* Attribute information for object */
- htri_t ainfo_exists = FALSE; /* Whether the attribute info exists in the file */
+ htri_t ainfo_exists = false; /* Whether the attribute info exists in the file */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE_TAG(loc->addr)
@@ -1488,7 +1488,7 @@ H5O__attr_remove(const H5O_loc_t *loc, const char *name)
/* Set up user data for callback */
udata.f = loc->file;
udata.name = name;
- udata.found = FALSE;
+ udata.found = false;
/* Iterate over attributes, to locate correct one to delete */
op.op_type = H5O_MESG_OP_LIB;
@@ -1507,7 +1507,7 @@ H5O__attr_remove(const H5O_loc_t *loc, const char *name)
HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update attribute info");
/* Update the modification time, if any */
- if (H5O_touch_oh(loc->file, oh, FALSE) < 0)
+ if (H5O_touch_oh(loc->file, oh, false) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update time on object");
done:
@@ -1532,7 +1532,7 @@ H5O__attr_remove_by_idx(const H5O_loc_t *loc, H5_index_t idx_type, H5_iter_order
{
H5O_t *oh = NULL; /* Pointer to actual object header */
H5O_ainfo_t ainfo; /* Attribute information for object */
- htri_t ainfo_exists = FALSE; /* Whether the attribute info exists in the file */
+ htri_t ainfo_exists = false; /* Whether the attribute info exists in the file */
H5A_attr_table_t atable = {0, NULL}; /* Table of attributes */
herr_t ret_value = SUCCEED; /* Return value */
@@ -1574,7 +1574,7 @@ H5O__attr_remove_by_idx(const H5O_loc_t *loc, H5_index_t idx_type, H5_iter_order
/* Set up user data for callback, to remove the attribute by name */
udata.f = loc->file;
udata.name = ((atable.attrs[n])->shared)->name;
- udata.found = FALSE;
+ udata.found = false;
/* Iterate over attributes, to locate correct one to delete */
op.op_type = H5O_MESG_OP_LIB;
@@ -1593,7 +1593,7 @@ H5O__attr_remove_by_idx(const H5O_loc_t *loc, H5_index_t idx_type, H5_iter_order
HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update attribute info");
/* Update the modification time, if any */
- if (H5O_touch_oh(loc->file, oh, FALSE) < 0)
+ if (H5O_touch_oh(loc->file, oh, false) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update time on object");
done:
@@ -1628,7 +1628,7 @@ H5O__attr_count_real(H5F_t *f, H5O_t *oh, hsize_t *nattrs)
/* Check for attributes stored densely */
if (oh->version > H5O_VERSION_1) {
- htri_t ainfo_exists = FALSE; /* Whether the attribute info exists in the file */
+ htri_t ainfo_exists = false; /* Whether the attribute info exists in the file */
H5O_ainfo_t ainfo; /* Attribute information for object */
/* Attempt to get the attribute information from the object header */
@@ -1679,9 +1679,9 @@ H5O__attr_exists_cb(H5O_t H5_ATTR_UNUSED *oh, H5O_mesg_t *mesg /*in,out*/, unsig
assert(udata->exists && !*udata->exists);
/* Check for correct attribute message */
- if (HDstrcmp(((H5A_t *)mesg->native)->shared->name, udata->name) == 0) {
+ if (strcmp(((H5A_t *)mesg->native)->shared->name, udata->name) == 0) {
/* Indicate that this message is the attribute sought */
- *udata->exists = TRUE;
+ *udata->exists = true;
/* Stop iterating */
ret_value = H5_ITER_STOP;
@@ -1700,7 +1700,7 @@ H5O__attr_exists_cb(H5O_t H5_ATTR_UNUSED *oh, H5O_mesg_t *mesg /*in,out*/, unsig
*-------------------------------------------------------------------------
*/
herr_t
-H5O__attr_exists(const H5O_loc_t *loc, const char *name, hbool_t *attr_exists)
+H5O__attr_exists(const H5O_loc_t *loc, const char *name, bool *attr_exists)
{
H5O_t *oh = NULL; /* Pointer to actual object header */
H5O_ainfo_t ainfo; /* Attribute information for object */
@@ -1714,7 +1714,7 @@ H5O__attr_exists(const H5O_loc_t *loc, const char *name, hbool_t *attr_exists)
assert(attr_exists);
/* Protect the object header to iterate over */
- if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
+ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, false)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTPROTECT, FAIL, "unable to load object header");
/* Check for attribute info stored */
@@ -1779,7 +1779,7 @@ H5O__attr_bh_info(H5F_t *f, H5O_t *oh, H5_ih_info_t *bh_info)
/* Attributes are only stored in fractal heap & indexed w/v2 B-tree in later versions */
if (oh->version > H5O_VERSION_1) {
H5O_ainfo_t ainfo; /* Attribute information for object */
- htri_t ainfo_exists = FALSE; /* Whether the attribute info exists in the file */
+ htri_t ainfo_exists = false; /* Whether the attribute info exists in the file */
/* Check for (& retrieve if available) attribute info */
if ((ainfo_exists = H5A__get_ainfo(f, oh, &ainfo)) < 0)
diff --git a/src/H5Obogus.c b/src/H5Obogus.c
index 364629b43c4..c9c2196b0f3 100644
--- a/src/H5Obogus.c
+++ b/src/H5Obogus.c
@@ -35,8 +35,8 @@
/* PRIVATE PROTOTYPES */
static void *H5O__bogus_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags,
size_t p_size, const uint8_t *p);
-static herr_t H5O__bogus_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
-static size_t H5O__bogus_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
+static herr_t H5O__bogus_encode(H5F_t *f, bool disable_shared, uint8_t *p, const void *_mesg);
+static size_t H5O__bogus_size(const H5F_t *f, bool disable_shared, const void *_mesg);
static herr_t H5O__bogus_debug(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwidth);
/* This message derives from H5O message class */
@@ -142,7 +142,7 @@ H5O__bogus_decode(H5F_t *f, H5O_t H5_ATTR_NDEBUG_UNUSED *open_oh, unsigned H5_AT
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__bogus_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
+H5O__bogus_encode(H5F_t H5_ATTR_UNUSED *f, bool H5_ATTR_UNUSED disable_shared, uint8_t *p,
const void H5_ATTR_UNUSED *mesg)
{
FUNC_ENTER_PACKAGE_NOERR
@@ -173,7 +173,7 @@ H5O__bogus_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared
*-------------------------------------------------------------------------
*/
static size_t
-H5O__bogus_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
+H5O__bogus_size(const H5F_t H5_ATTR_UNUSED *f, bool H5_ATTR_UNUSED disable_shared,
const void H5_ATTR_UNUSED *mesg)
{
FUNC_ENTER_PACKAGE_NOERR
diff --git a/src/H5Obtreek.c b/src/H5Obtreek.c
index 0bac54e5084..7f56b43245e 100644
--- a/src/H5Obtreek.c
+++ b/src/H5Obtreek.c
@@ -24,9 +24,9 @@
static void *H5O__btreek_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags,
size_t p_size, const uint8_t *p);
-static herr_t H5O__btreek_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
+static herr_t H5O__btreek_encode(H5F_t *f, bool disable_shared, uint8_t *p, const void *_mesg);
static void *H5O__btreek_copy(const void *_mesg, void *_dest);
-static size_t H5O__btreek_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
+static size_t H5O__btreek_size(const H5F_t *f, bool disable_shared, const void *_mesg);
static herr_t H5O__btreek_debug(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwidth);
/* This message derives from H5O message class */
@@ -120,8 +120,7 @@ H5O__btreek_decode(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__btreek_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
- const void *_mesg)
+H5O__btreek_encode(H5F_t H5_ATTR_UNUSED *f, bool H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
const H5O_btreek_t *mesg = (const H5O_btreek_t *)_mesg;
@@ -190,7 +189,7 @@ H5O__btreek_copy(const void *_mesg, void *_dest)
*-------------------------------------------------------------------------
*/
static size_t
-H5O__btreek_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
+H5O__btreek_size(const H5F_t H5_ATTR_UNUSED *f, bool H5_ATTR_UNUSED disable_shared,
const void H5_ATTR_UNUSED *_mesg)
{
size_t ret_value = 0;
diff --git a/src/H5Ocache.c b/src/H5Ocache.c
index 4a56cb2216a..31763f91f04 100644
--- a/src/H5Ocache.c
+++ b/src/H5Ocache.c
@@ -57,7 +57,7 @@ static herr_t H5O__cache_get_initial_load_size(void *udata, size_t *image_len);
static herr_t H5O__cache_get_final_load_size(const void *image_ptr, size_t image_len, void *udata,
size_t *actual_len);
static htri_t H5O__cache_verify_chksum(const void *image_ptr, size_t len, void *udata_ptr);
-static void *H5O__cache_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty);
+static void *H5O__cache_deserialize(const void *image, size_t len, void *udata, bool *dirty);
static herr_t H5O__cache_image_len(const void *thing, size_t *image_len);
static herr_t H5O__cache_serialize(const H5F_t *f, void *image, size_t len, void *thing);
static herr_t H5O__cache_notify(H5AC_notify_action_t action, void *_thing);
@@ -65,7 +65,7 @@ static herr_t H5O__cache_free_icr(void *thing);
static herr_t H5O__cache_chk_get_initial_load_size(void *udata, size_t *image_len);
static htri_t H5O__cache_chk_verify_chksum(const void *image_ptr, size_t len, void *udata_ptr);
-static void *H5O__cache_chk_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty);
+static void *H5O__cache_chk_deserialize(const void *image, size_t len, void *udata, bool *dirty);
static herr_t H5O__cache_chk_image_len(const void *thing, size_t *image_len);
static herr_t H5O__cache_chk_serialize(const H5F_t *f, void *image, size_t len, void *thing);
static herr_t H5O__cache_chk_notify(H5AC_notify_action_t action, void *_thing);
@@ -76,7 +76,7 @@ static herr_t H5O__prefix_deserialize(const uint8_t *image, size_t len, H5O_cach
/* Chunk routines */
static herr_t H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t *image,
- size_t len, H5O_common_cache_ud_t *udata, hbool_t *dirty);
+ size_t len, H5O_common_cache_ud_t *udata, bool *dirty);
static herr_t H5O__chunk_serialize(const H5F_t *f, H5O_t *oh, unsigned chunkno);
/* Misc. routines */
@@ -202,7 +202,7 @@ H5O__cache_get_final_load_size(const void *image, size_t image_len, void *_udata
* Purpose: Verify the computed checksum of the data structure is the
* same as the stored chksum.
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: Negative
*-------------------------------------------------------------------------
*/
@@ -211,7 +211,7 @@ H5O__cache_verify_chksum(const void *_image, size_t len, void *_udata)
{
const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
H5O_cache_ud_t *udata = (H5O_cache_ud_t *)_udata; /* User data for callback */
- htri_t ret_value = TRUE;
+ htri_t ret_value = true;
FUNC_ENTER_PACKAGE_NOERR
@@ -235,8 +235,8 @@ H5O__cache_verify_chksum(const void *_image, size_t len, void *_udata)
/* Indicate that udata->oh is to be freed later
in H5O__prefix_deserialize() */
- udata->free_oh = TRUE;
- ret_value = FALSE;
+ udata->free_oh = true;
+ ret_value = false;
}
}
else
@@ -263,7 +263,7 @@ H5O__cache_verify_chksum(const void *_image, size_t len, void *_udata)
*-------------------------------------------------------------------------
*/
static void *
-H5O__cache_deserialize(const void *image, size_t len, void *_udata, hbool_t *dirty)
+H5O__cache_deserialize(const void *image, size_t len, void *_udata, bool *dirty)
{
H5O_t *oh = NULL; /* Object header read in */
H5O_cache_ud_t *udata = (H5O_cache_ud_t *)_udata; /* User data for callback */
@@ -312,7 +312,7 @@ H5O__cache_deserialize(const void *image, size_t len, void *_udata, hbool_t *dir
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "can't deserialize first object header chunk");
/* Note that we've loaded the object header from the file */
- udata->made_attempt = TRUE;
+ udata->made_attempt = true;
/* Set return value */
ret_value = oh;
@@ -320,7 +320,7 @@ H5O__cache_deserialize(const void *image, size_t len, void *_udata, hbool_t *dir
done:
/* Release the [possibly partially initialized] object header on errors */
if (!ret_value && oh)
- if (H5O__free(oh, FALSE) < 0)
+ if (H5O__free(oh, false) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTRELEASE, NULL, "unable to destroy object header data");
FUNC_LEAVE_NOAPI(ret_value)
@@ -531,7 +531,7 @@ H5O__cache_notify(H5AC_notify_action_t action, void *_thing)
/* Mark messages stored with the object header (i.e. messages in chunk 0) as clean */
for (u = 0; u < oh->nmesgs; u++)
if (oh->mesg[u].chunkno == 0)
- oh->mesg[u].dirty = FALSE;
+ oh->mesg[u].dirty = false;
#ifndef NDEBUG
/* Reset the number of messages dirtied by decoding */
oh->ndecode_dirtied = 0;
@@ -581,7 +581,7 @@ H5O__cache_free_icr(void *_thing)
assert(oh->cache_info.type == H5AC_OHDR);
/* Destroy object header */
- if (H5O__free(oh, FALSE) < 0)
+ if (H5O__free(oh, false) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "can't destroy object header");
done:
@@ -621,7 +621,7 @@ H5O__cache_chk_get_initial_load_size(void *_udata, size_t *image_len)
* Purpose: Verify the computed checksum of the data structure is the
* same as the stored chksum.
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: Negative
*-------------------------------------------------------------------------
*/
@@ -630,7 +630,7 @@ H5O__cache_chk_verify_chksum(const void *_image, size_t len, void *_udata)
{
const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
H5O_chk_cache_ud_t *udata = (H5O_chk_cache_ud_t *)_udata; /* User data for callback */
- htri_t ret_value = TRUE;
+ htri_t ret_value = true;
FUNC_ENTER_PACKAGE_NOERR
@@ -645,7 +645,7 @@ H5O__cache_chk_verify_chksum(const void *_image, size_t len, void *_udata)
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
if (stored_chksum != computed_chksum)
- ret_value = FALSE;
+ ret_value = false;
}
FUNC_LEAVE_NOAPI(ret_value)
@@ -663,7 +663,7 @@ H5O__cache_chk_verify_chksum(const void *_image, size_t len, void *_udata)
*-------------------------------------------------------------------------
*/
static void *
-H5O__cache_chk_deserialize(const void *image, size_t len, void *_udata, hbool_t *dirty)
+H5O__cache_chk_deserialize(const void *image, size_t len, void *_udata, bool *dirty)
{
H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk proxy object */
H5O_chk_cache_ud_t *udata = (H5O_chk_cache_ud_t *)_udata; /* User data for callback */
@@ -858,7 +858,7 @@ H5O__cache_chk_notify(H5AC_notify_action_t action, void *_thing)
/* Mark messages in chunk as clean */
for (u = 0; u < chk_proxy->oh->nmesgs; u++)
if (chk_proxy->oh->mesg[u].chunkno == chk_proxy->chunkno)
- chk_proxy->oh->mesg[u].dirty = FALSE;
+ chk_proxy->oh->mesg[u].dirty = false;
} break;
case H5AC_NOTIFY_ACTION_CHILD_DIRTIED:
@@ -1152,9 +1152,9 @@ H5O__prefix_deserialize(const uint8_t *_image, size_t len, H5O_cache_ud_t *udata
/* Save the object header for later use in 'deserialize' callback */
udata->oh = oh;
- if (H5O__free(saved_oh, FALSE) < 0)
+ if (H5O__free(saved_oh, false) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "can't destroy object header");
- udata->free_oh = FALSE;
+ udata->free_oh = false;
}
else
/* Save the object header for later use in 'deserialize' callback */
@@ -1165,7 +1165,7 @@ H5O__prefix_deserialize(const uint8_t *_image, size_t len, H5O_cache_ud_t *udata
done:
/* Release the [possibly partially initialized] object header on errors */
if (ret_value < 0 && oh)
- if (H5O__free(oh, FALSE) < 0)
+ if (H5O__free(oh, false) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "unable to destroy object header data");
FUNC_LEAVE_NOAPI(ret_value)
@@ -1181,7 +1181,7 @@ H5O__prefix_deserialize(const uint8_t *_image, size_t len, H5O_cache_ud_t *udata
*/
static herr_t
H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t *image, size_t len,
- H5O_common_cache_ud_t *udata, hbool_t *dirty)
+ H5O_common_cache_ud_t *udata, bool *dirty)
{
const uint8_t *chunk_image = NULL; /* Pointer into buffer to decode */
const uint8_t *p_end = NULL; /* End of image buffer */
@@ -1189,8 +1189,8 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t
unsigned merged_null_msgs = 0; /* Number of null messages merged together */
unsigned chunkno; /* Current chunk's index */
unsigned nullcnt; /* Count of null messages (for sanity checking gaps in chunks) */
- hbool_t mesgs_modified =
- FALSE; /* Whether any messages were modified when the object header was deserialized */
+ bool mesgs_modified =
+ false; /* Whether any messages were modified when the object header was deserialized */
herr_t ret_value = SUCCEED;
FUNC_ENTER_PACKAGE
@@ -1336,7 +1336,7 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t
/* Combine adjacent null messages */
mesgno = oh->nmesgs - 1;
oh->mesg[mesgno].raw_size += (size_t)H5O_SIZEOF_MSGHDR_OH(oh) + mesg_size;
- oh->mesg[mesgno].dirty = TRUE;
+ oh->mesg[mesgno].dirty = true;
merged_null_msgs++;
}
else {
@@ -1355,7 +1355,7 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t
oh->nmesgs++;
/* Initialize information about message */
- mesg->dirty = FALSE;
+ mesg->dirty = false;
mesg->flags = flags;
mesg->crt_idx = crt_idx;
mesg->native = NULL;
@@ -1412,8 +1412,8 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t
mesg->flags |= H5O_MSG_FLAG_WAS_UNKNOWN;
/* Mark the message and chunk as dirty */
- mesg->dirty = TRUE;
- mesgs_modified = TRUE;
+ mesg->dirty = true;
+ mesgs_modified = true;
}
}
else {
@@ -1464,7 +1464,7 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t
mesg->native = refcount;
/* Set object header values */
- oh->has_refcount_msg = TRUE;
+ oh->has_refcount_msg = true;
if (!refcount)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't decode refcount");
oh->nlink = *refcount;
@@ -1482,8 +1482,8 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t
/* Mark the message & chunk as dirty if the message was changed by decoding */
if ((ioflags & H5O_DECODEIO_DIRTY) && (udata->file_intent & H5F_ACC_RDWR)) {
- mesg->dirty = TRUE;
- mesgs_modified = TRUE;
+ mesg->dirty = true;
+ mesgs_modified = true;
}
}
@@ -1526,12 +1526,12 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t
/* Mark the chunk dirty if we've modified messages */
if (mesgs_modified)
- *dirty = TRUE;
+ *dirty = true;
/* Mark the chunk dirty if we've merged null messages */
if (merged_null_msgs > 0) {
udata->merged_null_msgs += merged_null_msgs;
- *dirty = TRUE;
+ *dirty = true;
}
done:
diff --git a/src/H5Ocache_image.c b/src/H5Ocache_image.c
index c3793844ed9..7c71178cc1e 100644
--- a/src/H5Ocache_image.c
+++ b/src/H5Ocache_image.c
@@ -36,9 +36,9 @@
/* Callbacks for message class */
static void *H5O__mdci_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags, size_t p_size,
const uint8_t *p);
-static herr_t H5O__mdci_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
+static herr_t H5O__mdci_encode(H5F_t *f, bool disable_shared, uint8_t *p, const void *_mesg);
static void *H5O__mdci_copy(const void *_mesg, void *_dest);
-static size_t H5O__mdci_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
+static size_t H5O__mdci_size(const H5F_t *f, bool disable_shared, const void *_mesg);
static herr_t H5O__mdci_free(void *mesg);
static herr_t H5O__mdci_delete(H5F_t *f, H5O_t *open_oh, void *_mesg);
static herr_t H5O__mdci_debug(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwidth);
@@ -135,7 +135,7 @@ H5O__mdci_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSE
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__mdci_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
+H5O__mdci_encode(H5F_t *f, bool H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
const H5O_mdci_t *mesg = (const H5O_mdci_t *)_mesg;
@@ -203,7 +203,7 @@ H5O__mdci_copy(const void *_mesg, void *_dest)
*-------------------------------------------------------------------------
*/
static size_t
-H5O__mdci_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void H5_ATTR_UNUSED *_mesg)
+H5O__mdci_size(const H5F_t *f, bool H5_ATTR_UNUSED disable_shared, const void H5_ATTR_UNUSED *_mesg)
{
size_t ret_value = 0; /* Return value */
diff --git a/src/H5Ochunk.c b/src/H5Ochunk.c
index f09e6eb0e66..e131d679421 100644
--- a/src/H5Ochunk.c
+++ b/src/H5Ochunk.c
@@ -122,7 +122,7 @@ H5O__chunk_add(H5F_t *f, H5O_t *oh, unsigned idx, unsigned cont_chunkno)
/* Release resources */
if (cont_chk_proxy)
- if (H5O__chunk_unprotect(f, cont_chk_proxy, FALSE) < 0)
+ if (H5O__chunk_unprotect(f, cont_chk_proxy, false) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header chunk");
FUNC_LEAVE_NOAPI_TAG(ret_value)
@@ -208,7 +208,7 @@ H5O__chunk_protect(H5F_t *f, H5O_t *oh, unsigned idx)
*-------------------------------------------------------------------------
*/
herr_t
-H5O__chunk_unprotect(H5F_t *f, H5O_chunk_proxy_t *chk_proxy, hbool_t dirtied)
+H5O__chunk_unprotect(H5F_t *f, H5O_chunk_proxy_t *chk_proxy, bool dirtied)
{
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5Ocont.c b/src/H5Ocont.c
index 3af61a28c4d..ff082181d4e 100644
--- a/src/H5Ocont.c
+++ b/src/H5Ocont.c
@@ -33,8 +33,8 @@
/* PRIVATE PROTOTYPES */
static void *H5O__cont_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags, size_t p_size,
const uint8_t *p);
-static herr_t H5O__cont_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
-static size_t H5O__cont_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
+static herr_t H5O__cont_encode(H5F_t *f, bool disable_shared, uint8_t *p, const void *_mesg);
+static size_t H5O__cont_size(const H5F_t *f, bool disable_shared, const void *_mesg);
static herr_t H5O__cont_free(void *mesg);
static herr_t H5O__cont_delete(H5F_t *f, H5O_t *open_oh, void *_mesg);
static herr_t H5O__cont_debug(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwidth);
@@ -122,7 +122,7 @@ H5O__cont_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSE
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__cont_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
+H5O__cont_encode(H5F_t *f, bool H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
const H5O_cont_t *cont = (const H5O_cont_t *)_mesg;
@@ -156,7 +156,7 @@ H5O__cont_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
*-------------------------------------------------------------------------
*/
static size_t
-H5O__cont_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void H5_ATTR_UNUSED *_mesg)
+H5O__cont_size(const H5F_t *f, bool H5_ATTR_UNUSED disable_shared, const void H5_ATTR_UNUSED *_mesg)
{
size_t ret_value = 0; /* Return value */
diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c
index ae60afb6c2b..e4b6dd5461d 100644
--- a/src/H5Ocopy.c
+++ b/src/H5Ocopy.c
@@ -125,9 +125,9 @@ H5O__copy(const H5G_loc_t *loc, const char *src_name, H5G_loc_t *dst_loc, const
H5G_loc_t src_loc; /* Source object group location */
H5G_name_t src_path; /* Opened source object hier. path */
H5O_loc_t src_oloc; /* Opened source object object location */
- hbool_t dst_exists; /* Does destination name exist already? */
- hbool_t loc_found = FALSE; /* Location at 'name' found */
- hbool_t obj_open = FALSE; /* Entry at 'name' found */
+ bool dst_exists; /* Does destination name exist already? */
+ bool loc_found = false; /* Location at 'name' found */
+ bool obj_open = false; /* Entry at 'name' found */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -139,7 +139,7 @@ H5O__copy(const H5G_loc_t *loc, const char *src_name, H5G_loc_t *dst_loc, const
assert(dst_name && *dst_name);
/* Check if destination name already exists */
- dst_exists = FALSE;
+ dst_exists = false;
if (H5L_exists_tolerant(dst_loc, dst_name, &dst_exists) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to check if destination name exists");
if (dst_exists)
@@ -153,12 +153,12 @@ H5O__copy(const H5G_loc_t *loc, const char *src_name, H5G_loc_t *dst_loc, const
/* Find the source object to copy */
if (H5G_loc_find(loc, src_name, &src_loc /*out*/) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "source object not found");
- loc_found = TRUE;
+ loc_found = true;
/* Open source object's object header */
if (H5O_open(&src_oloc) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open object");
- obj_open = TRUE;
+ obj_open = true;
/* Do the actual copying of the object */
if (H5O__copy_obj(&src_loc, dst_loc, dst_name, ocpypl_id, lcpl_id) < 0)
@@ -199,8 +199,8 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
H5O_t *oh_dst = NULL; /* Object header for destination object */
unsigned mesgno = 0;
haddr_t addr_new = HADDR_UNDEF;
- hbool_t *deleted = NULL; /* Array of flags indicating whether messages should be copied */
- hbool_t inserted = FALSE; /* Whether the destination object header has been inserted into the cache */
+ bool *deleted = NULL; /* Array of flags indicating whether messages should be copied */
+ bool inserted = false; /* Whether the destination object header has been inserted into the cache */
size_t null_msgs; /* Number of NULL messages found in each loop */
size_t orig_dst_msgs; /* Original # of messages in dest. object */
H5O_mesg_t *mesg_src; /* Message in source object header */
@@ -231,7 +231,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
cpy_info->shared_fo = H5FO_opened(oloc_src->file, oloc_src->addr);
/* Get source object header */
- if (NULL == (oh_src = H5O_protect(oloc_src, H5AC__READ_ONLY_FLAG, FALSE)))
+ if (NULL == (oh_src = H5O_protect(oloc_src, H5AC__READ_ONLY_FLAG, false)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header");
/* Retrieve user data for particular type of object to copy */
@@ -250,7 +250,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
H5F_GET_FILENO(oloc_src->file, fileno_src);
H5F_GET_FILENO(oloc_dst->file, fileno_dst);
if (fileno_src == fileno_dst) {
- merge = TRUE;
+ merge = true;
oloc_dst->addr = oloc_src->addr;
} /* end if */
else
@@ -270,7 +270,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
addr_map->src_obj_pos.fileno = fileno_src;
addr_map->src_obj_pos.addr = oloc_src->addr;
addr_map->dst_addr = oloc_dst->addr;
- addr_map->is_locked = TRUE; /* We've locked the object currently */
+ addr_map->is_locked = true; /* We've locked the object currently */
addr_map->inc_ref_count = 0; /* Start with no additional ref counts to add */
addr_map->obj_class = obj_class;
addr_map->udata = cpy_udata;
@@ -342,9 +342,9 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
/* Allocate memory for "deleted" array. This array marks the message in
* the source that shouldn't be copied to the destination.
*/
- if (NULL == (deleted = (hbool_t *)H5MM_malloc(sizeof(hbool_t) * oh_src->nmesgs)))
+ if (NULL == (deleted = (bool *)H5MM_malloc(sizeof(bool) * oh_src->nmesgs)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed");
- memset(deleted, FALSE, sizeof(hbool_t) * oh_src->nmesgs);
+ memset(deleted, false, sizeof(bool) * oh_src->nmesgs);
/* "pre copy" pass over messages, to gather information for actual message copy operation
* (for messages which depend on information from other messages)
@@ -365,7 +365,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
* messages because the destination OH will have only one chunk
*/
if (H5O_CONT_ID == mesg_src->type->id || H5O_NULL_ID == mesg_src->type->id) {
- deleted[mesgno] = TRUE;
+ deleted[mesgno] = true;
++null_msgs;
copy_type = H5O_MSG_NULL;
} /* end if */
@@ -413,7 +413,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
/* Skip any deleted or NULL messages in the source unless the
* preserve_null flag is set
*/
- if (FALSE == cpy_info->preserve_null) {
+ if (false == cpy_info->preserve_null) {
while (deleted[mesgno + null_msgs]) {
++null_msgs;
assert(mesgno + null_msgs < oh_src->nmesgs);
@@ -436,7 +436,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
if (cpy_info->preserve_null && deleted[mesgno]) {
mesg_dst->type = H5O_MSG_NULL;
mesg_dst->flags = 0;
- mesg_dst->dirty = TRUE;
+ mesg_dst->dirty = true;
} /* end if */
/* Check for message class to operate on */
@@ -448,7 +448,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
/* copy this message into destination file */
if (copy_type->copy_file) {
- hbool_t recompute_size; /* Whether copy_file callback created a shared message */
+ bool recompute_size; /* Whether copy_file callback created a shared message */
unsigned mesg_flags; /* Message flags */
/* Decode the message if necessary. */
@@ -460,7 +460,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
mesg_flags = (unsigned)mesg_dst->flags & ~H5O_MSG_FLAG_SHARED & ~H5O_MSG_FLAG_SHAREABLE;
/* Copy the source message */
- recompute_size = FALSE;
+ recompute_size = false;
if (NULL == (mesg_dst->native =
H5O__msg_copy_file(copy_type, oloc_src->file, mesg_src->native, oloc_dst->file,
&recompute_size, &mesg_flags, cpy_info, cpy_udata)))
@@ -469,7 +469,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
/* Check if the sharing state changed, and recompute the size if so
*/
if (!(mesg_flags & H5O_MSG_FLAG_SHARED) != !(mesg_dst->flags & H5O_MSG_FLAG_SHARED))
- recompute_size = TRUE;
+ recompute_size = true;
/* Set destination message flags */
mesg_dst->flags = (uint8_t)mesg_flags;
@@ -480,11 +480,11 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
*/
if (recompute_size)
mesg_dst->raw_size = H5O_ALIGN_OH(
- oh_dst, H5O_msg_raw_size(oloc_dst->file, mesg_dst->type->id, FALSE, mesg_dst->native));
+ oh_dst, H5O_msg_raw_size(oloc_dst->file, mesg_dst->type->id, false, mesg_dst->native));
/* Mark the message in the destination as dirty, so it'll get encoded when the object header is
* flushed */
- mesg_dst->dirty = TRUE;
+ mesg_dst->dirty = true;
} /* end if (mesg_src->type->copy_file) */
} /* end of mesgno loop */
@@ -594,7 +594,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
/* Skip any deleted or NULL messages in the source unless the
* preserve_null flag is set.
*/
- if (FALSE == cpy_info->preserve_null) {
+ if (false == cpy_info->preserve_null) {
while (deleted[mesgno + null_msgs]) {
++null_msgs;
assert(mesgno + null_msgs < oh_src->nmesgs);
@@ -633,7 +633,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
/* (account for chunk's magic # & checksum) */
null_idx = oh_dst->nmesgs++;
oh_dst->mesg[null_idx].type = H5O_MSG_NULL;
- oh_dst->mesg[null_idx].dirty = TRUE;
+ oh_dst->mesg[null_idx].dirty = true;
oh_dst->mesg[null_idx].native = NULL;
oh_dst->mesg[null_idx].raw = current_pos + msghdr_size;
oh_dst->mesg[null_idx].raw_size = dst_oh_null - msghdr_size;
@@ -664,7 +664,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
H5F_GET_FILENO(oloc_src->file, addr_map->src_obj_pos.fileno);
addr_map->src_obj_pos.addr = oloc_src->addr;
addr_map->dst_addr = oloc_dst->addr;
- addr_map->is_locked = TRUE; /* We've locked the object currently */
+ addr_map->is_locked = true; /* We've locked the object currently */
addr_map->inc_ref_count = 0; /* Start with no additional ref counts to add */
addr_map->obj_class = obj_class;
addr_map->udata = cpy_udata;
@@ -683,7 +683,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
/* Skip any deleted or NULL messages in the source unless the
* preserve_null flag is set
*/
- if (FALSE == cpy_info->preserve_null) {
+ if (false == cpy_info->preserve_null) {
while (deleted[mesgno + null_msgs]) {
++null_msgs;
assert(mesgno + null_msgs < oh_src->nmesgs);
@@ -727,7 +727,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
} /* end for */
/* Indicate that the destination address will no longer be locked */
- addr_map->is_locked = FALSE;
+ addr_map->is_locked = false;
/* Increment object header's reference count, if any descendents have created links to this object */
if (addr_map->inc_ref_count) {
@@ -746,7 +746,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
if (H5AC_insert_entry(oloc_dst->file, H5AC_OHDR, oloc_dst->addr, oh_dst, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR_TAG(H5E_OHDR, H5E_CANTINSERT, FAIL, "unable to cache object header");
oh_dst = NULL;
- inserted = TRUE;
+ inserted = true;
/* Reset metadata tag */
H5_END_TAG
@@ -770,7 +770,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
/* Free destination object header on failure */
if (ret_value < 0) {
if (oh_dst && !inserted) {
- if (H5O__free(oh_dst, TRUE) < 0)
+ if (H5O__free(oh_dst, true) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to destroy object header data");
if (H5O_loc_reset(oloc_dst) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to destroy object header data");
@@ -797,11 +797,11 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
*/
herr_t
H5O_copy_header_map(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5O_copy_t *cpy_info,
- hbool_t inc_depth, H5O_type_t *obj_type, void **udata /*out*/)
+ bool inc_depth, H5O_type_t *obj_type, void **udata /*out*/)
{
H5O_addr_map_t *addr_map = NULL; /* Address mapping of object copied */
H5_obj_t src_obj_pos; /* Position of source object */
- hbool_t inc_link; /* Whether to increment the link count for the object */
+ bool inc_link; /* Whether to increment the link count for the object */
herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(FAIL)
@@ -838,7 +838,7 @@ H5O_copy_header_map(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5O_
cpy_info->curr_depth--;
/* When an object is copied for the first time, increment it's link */
- inc_link = TRUE;
+ inc_link = true;
/* indicate that a new object is created */
ret_value++;
@@ -861,10 +861,10 @@ H5O_copy_header_map(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5O_
*/
if (addr_map->is_locked) {
addr_map->inc_ref_count++;
- inc_link = FALSE;
+ inc_link = false;
} /* end if */
else
- inc_link = TRUE;
+ inc_link = true;
} /* end else */
/* Increment destination object's link count, if allowed */
@@ -965,24 +965,24 @@ H5O__copy_header(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */, hid_t
/* Convert copy flags into copy struct */
if ((cpy_option & H5O_COPY_SHALLOW_HIERARCHY_FLAG) > 0) {
- cpy_info.copy_shallow = TRUE;
+ cpy_info.copy_shallow = true;
cpy_info.max_depth = 1;
} /* end if */
else
cpy_info.max_depth = -1; /* Current default is for full, recursive hier. copy */
cpy_info.curr_depth = 0;
if ((cpy_option & H5O_COPY_EXPAND_SOFT_LINK_FLAG) > 0)
- cpy_info.expand_soft_link = TRUE;
+ cpy_info.expand_soft_link = true;
if ((cpy_option & H5O_COPY_EXPAND_EXT_LINK_FLAG) > 0)
- cpy_info.expand_ext_link = TRUE;
+ cpy_info.expand_ext_link = true;
if ((cpy_option & H5O_COPY_EXPAND_REFERENCE_FLAG) > 0)
- cpy_info.expand_ref = TRUE;
+ cpy_info.expand_ref = true;
if ((cpy_option & H5O_COPY_WITHOUT_ATTR_FLAG) > 0)
- cpy_info.copy_without_attr = TRUE;
+ cpy_info.copy_without_attr = true;
if ((cpy_option & H5O_COPY_PRESERVE_NULL_FLAG) > 0)
- cpy_info.preserve_null = TRUE;
+ cpy_info.preserve_null = true;
if ((cpy_option & H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG) > 0)
- cpy_info.merge_comm_dt = TRUE;
+ cpy_info.merge_comm_dt = true;
/* Add dt_list to copy struct */
cpy_info.dst_dt_suggestion_list = dt_list;
@@ -1027,7 +1027,7 @@ H5O__copy_obj(H5G_loc_t *src_loc, H5G_loc_t *dst_loc, const char *dst_name, hid_
H5O_loc_t new_oloc; /* Copied object object location */
H5G_loc_t new_loc; /* Group location of object copied */
H5F_t *cached_dst_file; /* Cached destination file */
- hbool_t entry_inserted = FALSE; /* Flag to indicate that the new entry was inserted into a group */
+ bool entry_inserted = false; /* Flag to indicate that the new entry was inserted into a group */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1060,7 +1060,7 @@ H5O__copy_obj(H5G_loc_t *src_loc, H5G_loc_t *dst_loc, const char *dst_name, hid_
/* Insert the new object in the destination file's group */
if (H5L_link(dst_loc, dst_name, &new_loc, lcpl_id) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to insert link");
- entry_inserted = TRUE;
+ entry_inserted = true;
done:
/* Free the ID to name buffers */
@@ -1128,7 +1128,7 @@ H5O__copy_comm_dt_cmp(const void *_key1, const void *_key2)
HGOTO_DONE(1);
} /* end if */
- ret_value = H5T_cmp(key1->dt, key2->dt, FALSE);
+ ret_value = H5T_cmp(key1->dt, key2->dt, false);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1154,7 +1154,7 @@ H5O__copy_search_comm_dt_attr_cb(const H5A_t *attr, void *_udata)
H5T_t *dt = NULL; /* Datatype */
H5O_copy_search_comm_dt_key_t *key = NULL; /* Skiplist key */
haddr_t *addr = NULL; /* Destination address */
- hbool_t obj_inserted = FALSE; /* Object inserted into skip list */
+ bool obj_inserted = false; /* Object inserted into skip list */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1191,7 +1191,7 @@ H5O__copy_search_comm_dt_attr_cb(const H5A_t *attr, void *_udata)
*addr = ((H5O_shared_t *)(key->dt))->u.loc.oh_addr;
if (H5SL_insert(udata->dst_dt_list, addr, key) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert object into skip list");
- obj_inserted = TRUE;
+ obj_inserted = true;
} /* end if */
} /* end if */
@@ -1229,7 +1229,7 @@ H5O__copy_search_comm_dt_check(H5O_loc_t *obj_oloc, H5O_copy_search_comm_dt_ud_t
{
H5O_copy_search_comm_dt_key_t *key = NULL; /* Skiplist key */
haddr_t *addr = NULL; /* Destination address */
- hbool_t obj_inserted = FALSE; /* Object inserted into skip list */
+ bool obj_inserted = false; /* Object inserted into skip list */
H5A_attr_iter_op_t attr_op; /* Attribute iteration operator */
const H5O_obj_class_t *obj_class = NULL; /* Type of object */
herr_t ret_value = SUCCEED; /* Return value */
@@ -1270,7 +1270,7 @@ H5O__copy_search_comm_dt_check(H5O_loc_t *obj_oloc, H5O_copy_search_comm_dt_ud_t
*addr = obj_oloc->addr;
if (H5SL_insert(udata->dst_dt_list, addr, key) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert object into skip list");
- obj_inserted = TRUE;
+ obj_inserted = true;
} /* end if */
} /* end if */
else if (obj_class->type == H5O_TYPE_DATASET) {
@@ -1296,7 +1296,7 @@ H5O__copy_search_comm_dt_check(H5O_loc_t *obj_oloc, H5O_copy_search_comm_dt_ud_t
*addr = ((H5O_shared_t *)(key->dt))->u.loc.oh_addr;
if (H5SL_insert(udata->dst_dt_list, addr, key) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert object into skip list");
- obj_inserted = TRUE;
+ obj_inserted = true;
} /* end if */
} /* end if */
} /* end else */
@@ -1347,7 +1347,7 @@ H5O__copy_search_comm_dt_cb(hid_t H5_ATTR_UNUSED group, const char *name, const
H5G_loc_t obj_loc; /* Location of object */
H5O_loc_t obj_oloc; /* Object's object location */
H5G_name_t obj_path; /* Object's group hier. path */
- hbool_t obj_found = FALSE; /* Object at 'name' found */
+ bool obj_found = false; /* Object at 'name' found */
herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1369,7 +1369,7 @@ H5O__copy_search_comm_dt_cb(hid_t H5_ATTR_UNUSED group, const char *name, const
/* Find the object */
if (H5G_loc_find(udata->dst_root_loc, name, &obj_loc /*out*/) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, H5_ITER_ERROR, "object not found");
- obj_found = TRUE;
+ obj_found = true;
/* Check object and add to skip list if appropriate */
if (H5O__copy_search_comm_dt_check(&obj_oloc, udata) < 0)
@@ -1391,9 +1391,9 @@ H5O__copy_search_comm_dt_cb(hid_t H5_ATTR_UNUSED group, const char *name, const
* in the destination file, building the destination file
* skiplist as necessary.
*
- * Return: TRUE if a match is found in the destination file
+ * Return: true if a match is found in the destination file
* - oloc_dst will contain the address
- * FALSE if a match is not found
+ * false if a match is not found
* Negative on failure
*
*-------------------------------------------------------------------------
@@ -1406,7 +1406,7 @@ H5O__copy_search_comm_dt(H5F_t *file_src, H5O_t *oh_src, H5O_loc_t *oloc_dst /*i
haddr_t *dst_addr; /* Destination datatype address */
H5G_loc_t dst_root_loc = {NULL, NULL}; /* Destination root group location */
H5O_copy_search_comm_dt_ud_t udata; /* Group iteration user data */
- herr_t ret_value = FALSE; /* Return value */
+ herr_t ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1490,7 +1490,7 @@ H5O__copy_search_comm_dt(H5F_t *file_src, H5O_t *oh_src, H5O_loc_t *oloc_dst /*i
if (cpy_info->dst_dt_suggestion_list &&
NULL != (dst_addr = (haddr_t *)H5SL_search(cpy_info->dst_dt_list, key))) {
oloc_dst->addr = *dst_addr;
- ret_value = TRUE;
+ ret_value = true;
} /* end if */
else {
H5O_mcdt_search_ret_t search_cb_ret = H5O_MCDT_SEARCH_CONT;
@@ -1527,7 +1527,7 @@ H5O__copy_search_comm_dt(H5F_t *file_src, H5O_t *oh_src, H5O_loc_t *oloc_dst /*i
if (H5G_visit(&dst_root_loc, "/", H5_INDEX_NAME, H5_ITER_NATIVE, H5O__copy_search_comm_dt_cb,
&udata) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object visitation failed");
- cpy_info->dst_dt_list_complete = TRUE;
+ cpy_info->dst_dt_list_complete = true;
} /* end if */
else if (search_cb_ret != H5O_MCDT_SEARCH_STOP)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown return value for callback");
@@ -1539,7 +1539,7 @@ H5O__copy_search_comm_dt(H5F_t *file_src, H5O_t *oh_src, H5O_loc_t *oloc_dst /*i
if (cpy_info->dst_dt_list_complete) {
if (NULL != (dst_addr = (haddr_t *)H5SL_search(cpy_info->dst_dt_list, key))) {
oloc_dst->addr = *dst_addr;
- ret_value = TRUE;
+ ret_value = true;
} /* end if */
} /* end if */
diff --git a/src/H5Ocopy_ref.c b/src/H5Ocopy_ref.c
index 2479d71162d..667c0254a5d 100644
--- a/src/H5Ocopy_ref.c
+++ b/src/H5Ocopy_ref.c
@@ -104,7 +104,7 @@ H5O__copy_obj_by_ref(H5O_loc_t *src_oloc, H5O_loc_t *dst_oloc, H5G_loc_t *dst_ro
assert(dst_oloc);
/* Perform the copy, or look up existing copy */
- if ((ret_value = H5O_copy_header_map(src_oloc, dst_oloc, cpy_info, FALSE, NULL, NULL)) < 0)
+ if ((ret_value = H5O_copy_header_map(src_oloc, dst_oloc, cpy_info, false, NULL, NULL)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object");
/* Check if a new valid object is copied to the destination */
@@ -122,8 +122,8 @@ H5O__copy_obj_by_ref(H5O_loc_t *src_oloc, H5O_loc_t *dst_oloc, H5G_loc_t *dst_ro
new_oloc.addr = dst_oloc->addr;
/* Pick a default name for the new object */
- HDsnprintf(tmp_obj_name, sizeof(tmp_obj_name), "~obj_pointed_by_%llu",
- (unsigned long long)dst_oloc->addr);
+ snprintf(tmp_obj_name, sizeof(tmp_obj_name), "~obj_pointed_by_%llu",
+ (unsigned long long)dst_oloc->addr);
/* Create a link to the newly copied object */
/* Note: since H5O_copy_header_map actually copied the target object, it
@@ -295,7 +295,7 @@ H5O__copy_expand_ref_object2(H5O_loc_t *src_oloc, hid_t tid_src, const H5T_t *dt
hid_t tid_dst = H5I_INVALID_HID; /* Datatype ID for memory datatype */
H5T_path_t *tpath_src_mem = NULL, *tpath_mem_dst = NULL; /* Datatype conversion paths */
size_t i; /* Local index variable */
- hbool_t reg_tid_src = (tid_src == H5I_INVALID_HID);
+ bool reg_tid_src = (tid_src == H5I_INVALID_HID);
hid_t dst_loc_id = H5I_INVALID_HID;
void *conv_buf = NULL; /* Buffer for converting data */
size_t conv_buf_size = 0; /* Buffer size */
@@ -309,13 +309,13 @@ H5O__copy_expand_ref_object2(H5O_loc_t *src_oloc, hid_t tid_src, const H5T_t *dt
FUNC_ENTER_PACKAGE
/* Create datatype ID for src datatype. */
- if ((tid_src == H5I_INVALID_HID) && (tid_src = H5I_register(H5I_DATATYPE, dt_src, FALSE)) < 0)
+ if ((tid_src == H5I_INVALID_HID) && (tid_src = H5I_register(H5I_DATATYPE, dt_src, false)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, FAIL, "unable to register source file datatype");
/* create a memory copy of the reference datatype */
if (NULL == (dt_mem = H5T_copy(dt_src, H5T_COPY_TRANSIENT)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to copy");
- if ((tid_mem = H5I_register(H5I_DATATYPE, dt_mem, FALSE)) < 0) {
+ if ((tid_mem = H5I_register(H5I_DATATYPE, dt_mem, false)) < 0) {
(void)H5T_close_real(dt_mem);
HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, FAIL, "unable to register memory datatype");
} /* end if */
@@ -327,7 +327,7 @@ H5O__copy_expand_ref_object2(H5O_loc_t *src_oloc, hid_t tid_src, const H5T_t *dt
(void)H5T_close_real(dt_dst);
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "cannot mark datatype on disk");
} /* end if */
- if ((tid_dst = H5I_register(H5I_DATATYPE, dt_dst, FALSE)) < 0) {
+ if ((tid_dst = H5I_register(H5I_DATATYPE, dt_dst, false)) < 0) {
(void)H5T_close_real(dt_dst);
HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, FAIL, "unable to register destination file datatype");
} /* end if */
@@ -379,7 +379,7 @@ H5O__copy_expand_ref_object2(H5O_loc_t *src_oloc, hid_t tid_src, const H5T_t *dt
if (H5R__set_obj_token(ref, (const H5O_token_t *)&tmp_token, token_size) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "unable to set object token");
/* Do not set app_ref since references are released once the copy is done */
- if (H5R__set_loc_id(ref, dst_loc_id, TRUE, FALSE) < 0)
+ if (H5R__set_loc_id(ref, dst_loc_id, true, false) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "unable to set destination loc id");
} /* end if */
} /* end for */
diff --git a/src/H5Odbg.c b/src/H5Odbg.c
index d6c7097a4c7..bc880bbe62f 100644
--- a/src/H5Odbg.c
+++ b/src/H5Odbg.c
@@ -148,8 +148,8 @@ H5O__assert(const H5O_t *oh)
if (H5O_NULL_ID == curr_msg->type->id)
free_space += curr_tot_size;
else if (H5O_CONT_ID == curr_msg->type->id) {
- H5O_cont_t *cont = (H5O_cont_t *)curr_msg->native;
- hbool_t H5_ATTR_NDEBUG_UNUSED found_chunk = FALSE; /* Found a chunk that matches */
+ H5O_cont_t *cont = (H5O_cont_t *)curr_msg->native;
+ bool H5_ATTR_NDEBUG_UNUSED found_chunk = false; /* Found a chunk that matches */
assert(cont);
@@ -162,7 +162,7 @@ H5O__assert(const H5O_t *oh)
if (H5_addr_eq(cont->addr, oh->chunk[v].addr) && cont->size == oh->chunk[v].size) {
assert(cont->chunkno == v);
assert(!found_chunk);
- found_chunk = TRUE;
+ found_chunk = true;
} /* end if */
} /* end for */
assert(found_chunk);
@@ -309,16 +309,16 @@ H5O__debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int
/* Time fields */
tm = HDlocaltime(&oh->atime);
- HDstrftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm);
+ strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm);
fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Access Time:", buf);
tm = HDlocaltime(&oh->mtime);
- HDstrftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm);
+ strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm);
fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Modification Time:", buf);
tm = HDlocaltime(&oh->ctime);
- HDstrftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm);
+ strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm);
fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Change Time:", buf);
tm = HDlocaltime(&oh->btime);
- HDstrftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm);
+ strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm);
fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Birth Time:", buf);
} /* end if */
@@ -393,7 +393,7 @@ H5O__debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int
"Dirty:", oh->mesg[i].dirty ? "TRUE" : "FALSE");
fprintf(stream, "%*s%-*s ", indent + 3, "", MAX(0, fwidth - 3), "Message flags:");
if (oh->mesg[i].flags) {
- hbool_t flag_printed = FALSE;
+ bool flag_printed = false;
/* Sanity check that all flags in format are covered below */
HDcompile_assert(H5O_MSG_FLAG_BITS ==
@@ -404,36 +404,36 @@ H5O__debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int
if (oh->mesg[i].flags & H5O_MSG_FLAG_CONSTANT) {
fprintf(stream, "%sC", (flag_printed ? ", " : "<"));
- flag_printed = TRUE;
+ flag_printed = true;
} /* end if */
if (oh->mesg[i].flags & H5O_MSG_FLAG_SHARED) {
fprintf(stream, "%sS", (flag_printed ? ", " : "<"));
- flag_printed = TRUE;
+ flag_printed = true;
} /* end if */
if (oh->mesg[i].flags & H5O_MSG_FLAG_DONTSHARE) {
fprintf(stream, "%sDS", (flag_printed ? ", " : "<"));
- flag_printed = TRUE;
+ flag_printed = true;
} /* end if */
if (oh->mesg[i].flags & H5O_MSG_FLAG_FAIL_IF_UNKNOWN_AND_OPEN_FOR_WRITE) {
fprintf(stream, "%sFIUW", (flag_printed ? ", " : "<"));
- flag_printed = TRUE;
+ flag_printed = true;
} /* end if */
if (oh->mesg[i].flags & H5O_MSG_FLAG_MARK_IF_UNKNOWN) {
fprintf(stream, "%sMIU", (flag_printed ? ", " : "<"));
- flag_printed = TRUE;
+ flag_printed = true;
} /* end if */
if (oh->mesg[i].flags & H5O_MSG_FLAG_WAS_UNKNOWN) {
assert(oh->mesg[i].flags & H5O_MSG_FLAG_MARK_IF_UNKNOWN);
fprintf(stream, "%sWU", (flag_printed ? ", " : "<"));
- flag_printed = TRUE;
+ flag_printed = true;
} /* end if */
if (oh->mesg[i].flags & H5O_MSG_FLAG_SHAREABLE) {
fprintf(stream, "%sSA", (flag_printed ? ", " : "<"));
- flag_printed = TRUE;
+ flag_printed = true;
} /* end if */
if (oh->mesg[i].flags & H5O_MSG_FLAG_FAIL_IF_UNKNOWN_ALWAYS) {
fprintf(stream, "%sFIUA", (flag_printed ? ", " : "<"));
- flag_printed = TRUE;
+ flag_printed = true;
} /* end if */
if (!flag_printed)
fprintf(stream, "-");
@@ -511,9 +511,9 @@ H5O_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth)
/* Set up the object location */
loc.file = f;
loc.addr = addr;
- loc.holding_file = FALSE;
+ loc.holding_file = false;
- if (NULL == (oh = H5O_protect(&loc, H5AC__READ_ONLY_FLAG, FALSE)))
+ if (NULL == (oh = H5O_protect(&loc, H5AC__READ_ONLY_FLAG, false)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header");
/* debug */
diff --git a/src/H5Odeprec.c b/src/H5Odeprec.c
index 71edd82b02a..6e8b34e789b 100644
--- a/src/H5Odeprec.c
+++ b/src/H5Odeprec.c
@@ -341,7 +341,7 @@ H5Oopen_by_addr(hid_t loc_id, haddr_t addr)
void *opened_obj = NULL; /* Opened object */
H5VL_loc_params_t loc_params; /* Location parameters */
H5O_token_t obj_token = {0}; /* Object token */
- hbool_t is_native_vol_obj;
+ bool is_native_vol_obj;
hid_t ret_value = H5I_INVALID_HID; /* Return value */
FUNC_ENTER_API(H5I_INVALID_HID)
@@ -379,7 +379,7 @@ H5Oopen_by_addr(hid_t loc_id, haddr_t addr)
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object");
/* Register the object's ID */
- if ((ret_value = H5VL_register(opened_type, opened_obj, vol_obj->connector, TRUE)) < 0)
+ if ((ret_value = H5VL_register(opened_type, opened_obj, vol_obj->connector, true)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object handle");
done:
@@ -455,7 +455,7 @@ H5Oget_info_by_name1(hid_t loc_id, const char *name, H5O_info1_t *oinfo /*out*/,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "oinfo parameter cannot be NULL");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info");
/* Fill out location struct */
@@ -509,7 +509,7 @@ H5Oget_info_by_idx1(hid_t loc_id, const char *group_name, H5_index_t idx_type, H
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no info struct");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info");
loc_params.type = H5VL_OBJECT_BY_IDX;
@@ -548,7 +548,7 @@ H5Oget_info2(hid_t loc_id, H5O_info1_t *oinfo /*out*/, unsigned fields)
{
H5VL_object_t *vol_obj; /* Object of loc_id */
H5VL_loc_params_t loc_params;
- hbool_t is_native_vol_obj;
+ bool is_native_vol_obj;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -601,7 +601,7 @@ H5Oget_info_by_name2(hid_t loc_id, const char *name, H5O_info1_t *oinfo /*out*/,
{
H5VL_object_t *vol_obj; /* Object of loc_id */
H5VL_loc_params_t loc_params;
- hbool_t is_native_vol_obj;
+ bool is_native_vol_obj;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -618,7 +618,7 @@ H5Oget_info_by_name2(hid_t loc_id, const char *name, H5O_info1_t *oinfo /*out*/,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info");
/* Fill out location struct */
@@ -666,7 +666,7 @@ H5Oget_info_by_idx2(hid_t loc_id, const char *group_name, H5_index_t idx_type, H
{
H5VL_object_t *vol_obj; /* Object of loc_id */
H5VL_loc_params_t loc_params;
- hbool_t is_native_vol_obj;
+ bool is_native_vol_obj;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -685,7 +685,7 @@ H5Oget_info_by_idx2(hid_t loc_id, const char *group_name, H5_index_t idx_type, H
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info");
loc_params.type = H5VL_OBJECT_BY_IDX;
@@ -850,7 +850,7 @@ H5Ovisit_by_name1(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_it
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback operator specified");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info");
/* Get the location object */
@@ -925,7 +925,7 @@ H5Ovisit2(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order, H5O_iterate1
H5VL_object_specific_args_t vol_cb_args; /* Arguments to VOL callback */
H5VL_loc_params_t loc_params; /* Location parameters for object access */
H5O_visit1_adapter_t shim_data; /* Adapter for passing app callback & user data */
- hbool_t is_native_vol_obj;
+ bool is_native_vol_obj;
herr_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -1019,7 +1019,7 @@ H5Ovisit_by_name2(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_it
H5VL_object_specific_args_t vol_cb_args; /* Arguments to VOL callback */
H5VL_loc_params_t loc_params; /* Location parameters for object access */
H5O_visit1_adapter_t shim_data; /* Adapter for passing app callback & user data */
- hbool_t is_native_vol_obj;
+ bool is_native_vol_obj;
herr_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -1040,7 +1040,7 @@ H5Ovisit_by_name2(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_it
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info");
/* Get the location object */
diff --git a/src/H5Odrvinfo.c b/src/H5Odrvinfo.c
index 36a1ba50932..4ff98738864 100644
--- a/src/H5Odrvinfo.c
+++ b/src/H5Odrvinfo.c
@@ -23,9 +23,9 @@
static void *H5O__drvinfo_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags,
size_t p_size, const uint8_t *p);
-static herr_t H5O__drvinfo_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
+static herr_t H5O__drvinfo_encode(H5F_t *f, bool disable_shared, uint8_t *p, const void *_mesg);
static void *H5O__drvinfo_copy(const void *_mesg, void *_dest);
-static size_t H5O__drvinfo_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
+static size_t H5O__drvinfo_size(const H5F_t *f, bool disable_shared, const void *_mesg);
static herr_t H5O__drvinfo_reset(void *_mesg);
static herr_t H5O__drvinfo_debug(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwidth);
@@ -135,7 +135,7 @@ H5O__drvinfo_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__drvinfo_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
+H5O__drvinfo_encode(H5F_t H5_ATTR_UNUSED *f, bool H5_ATTR_UNUSED disable_shared, uint8_t *p,
const void *_mesg)
{
const H5O_drvinfo_t *mesg = (const H5O_drvinfo_t *)_mesg;
@@ -215,7 +215,7 @@ H5O__drvinfo_copy(const void *_mesg, void *_dest)
*-------------------------------------------------------------------------
*/
static size_t
-H5O__drvinfo_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, const void *_mesg)
+H5O__drvinfo_size(const H5F_t H5_ATTR_UNUSED *f, bool H5_ATTR_UNUSED disable_shared, const void *_mesg)
{
const H5O_drvinfo_t *mesg = (const H5O_drvinfo_t *)_mesg;
size_t ret_value = 0; /* Return value */
diff --git a/src/H5Odtype.c b/src/H5Odtype.c
index 48622e28022..620d6864b9d 100644
--- a/src/H5Odtype.c
+++ b/src/H5Odtype.c
@@ -34,11 +34,10 @@ static herr_t H5O__dtype_reset(void *_mesg);
static herr_t H5O__dtype_free(void *_mesg);
static herr_t H5O__dtype_set_share(void *_mesg, const H5O_shared_t *sh);
static htri_t H5O__dtype_can_share(const void *_mesg);
-static herr_t H5O__dtype_pre_copy_file(H5F_t *file_src, const void *mesg_src, hbool_t *deleted,
+static herr_t H5O__dtype_pre_copy_file(H5F_t *file_src, const void *mesg_src, bool *deleted,
const H5O_copy_t *cpy_info, void *_udata);
static void *H5O__dtype_copy_file(H5F_t *file_src, const H5O_msg_class_t *mesg_type, void *native_src,
- H5F_t *file_dst, hbool_t *recompute_size, H5O_copy_t *cpy_info,
- void *udata);
+ H5F_t *file_dst, bool *recompute_size, H5O_copy_t *cpy_info, void *udata);
static herr_t H5O__dtype_shared_post_copy_upd(const H5O_loc_t *src_oloc, const void *mesg_src,
H5O_loc_t *dst_oloc, void *mesg_dst, H5O_copy_t *cpy_info);
static herr_t H5O__dtype_debug(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwidth);
@@ -112,19 +111,19 @@ const H5O_msg_class_t H5O_MSG_DTYPE[1] = {{
*
* Purpose: Decodes a datatype
*
- * Return: TRUE if we can upgrade the parent type's version even
+ * Return: true if we can upgrade the parent type's version even
* with strict format checks
- * FALSE if we cannot
+ * false if we cannot
* NEGATIVE on failure
*-------------------------------------------------------------------------
*/
static htri_t
-H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t *dt, hbool_t skip,
+H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t *dt, bool skip,
const uint8_t *p_end)
{
unsigned flags;
unsigned version;
- htri_t ret_value = FALSE;
+ htri_t ret_value = false;
FUNC_ENTER_PACKAGE
@@ -340,7 +339,7 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t
size_t max = (size_t)(p_end - *pp + 1); /* Max possible name length */
- actual_name_length = HDstrnlen((const char *)*pp, max);
+ actual_name_length = strnlen((const char *)*pp, max);
if (actual_name_length == max)
HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, FAIL, "field name not null terminated");
}
@@ -349,7 +348,7 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t
* passed via H5Tdecode(), so don't bounds check and hope for
* the best.
*/
- actual_name_length = HDstrlen((const char *)*pp);
+ actual_name_length = strlen((const char *)*pp);
}
if (H5_IS_KNOWN_BUFFER_OVERFLOW(skip, *pp, actual_name_length, p_end))
@@ -460,7 +459,7 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t
upgrade_to = temp_type->shared->version;
/* Pass "can_upgrade" flag down to parent type */
- ret_value = TRUE;
+ ret_value = true;
}
/* Go create the array datatype now, for older versions of the datatype message */
@@ -498,7 +497,7 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t
/* Set the return value to indicate that we should freely
* upgrade parent types */
- ret_value = TRUE;
+ ret_value = true;
}
}
}
@@ -510,8 +509,8 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t
/* Set the "force conversion" flag if VL datatype fields exist in this
* type or any component types
*/
- if (temp_type->shared->force_conv == TRUE)
- dt->shared->force_conv = TRUE;
+ if (temp_type->shared->force_conv == true)
+ dt->shared->force_conv = true;
/* Member size */
dt->shared->u.compnd.memb[dt->shared->u.compnd.nmembs].size = temp_type->shared->size;
@@ -583,16 +582,16 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t
if (dt->shared->u.atomic.u.r.rtype == H5R_OBJECT2 ||
dt->shared->u.atomic.u.r.rtype == H5R_DATASET_REGION2 ||
dt->shared->u.atomic.u.r.rtype == H5R_ATTR) {
- dt->shared->u.atomic.u.r.opaque = TRUE;
+ dt->shared->u.atomic.u.r.opaque = true;
dt->shared->u.atomic.u.r.version = (unsigned)((flags >> 4) & 0x0f);
if (dt->shared->u.atomic.u.r.version != H5R_ENCODE_VERSION)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "reference version does not match");
}
else
- dt->shared->u.atomic.u.r.opaque = FALSE;
+ dt->shared->u.atomic.u.r.opaque = false;
/* This type needs conversion */
- dt->shared->force_conv = TRUE;
+ dt->shared->force_conv = true;
/* Mark location of this type as undefined for now. The caller
* function should decide the location. */
@@ -637,7 +636,7 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t
size_t max = (size_t)(p_end - *pp + 1); /* Max possible name length */
- actual_name_length = HDstrnlen((const char *)*pp, max);
+ actual_name_length = strnlen((const char *)*pp, max);
if (actual_name_length == max)
HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, FAIL, "enum name not null terminated");
}
@@ -646,7 +645,7 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t
* passed via H5Tdecode(), so don't bounds check and hope for
* the best.
*/
- actual_name_length = HDstrlen((const char *)*pp);
+ actual_name_length = strlen((const char *)*pp);
}
if (H5_IS_KNOWN_BUFFER_OVERFLOW(skip, *pp, actual_name_length, p_end))
@@ -702,7 +701,7 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t
* vlen itself. */
H5O_DTYPE_CHECK_VERSION(dt, version, dt->shared->parent->shared->version, ioflags, "vlen", FAIL)
- dt->shared->force_conv = TRUE;
+ dt->shared->force_conv = true;
/* Mark location this type as undefined for now. The caller function should
* decide the location. */
@@ -762,8 +761,8 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t
/* Set the "force conversion" flag if a VL base datatype is used or
* or if any components of the base datatype are VL types.
*/
- if (dt->shared->parent->shared->force_conv == TRUE)
- dt->shared->force_conv = TRUE;
+ if (dt->shared->parent->shared->force_conv == true)
+ dt->shared->force_conv = true;
break;
case H5T_NO_CLASS:
@@ -1093,7 +1092,7 @@ H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt)
{
size_t aligned;
- z = HDstrlen(dt->shared->u.opaque.tag);
+ z = strlen(dt->shared->u.opaque.tag);
aligned = (z + 7) & (H5T_OPAQUE_TAG_MAX - 8);
flags = (unsigned)(flags | aligned);
H5MM_memcpy(*pp, dt->shared->u.opaque.tag, MIN(z, aligned));
@@ -1123,10 +1122,10 @@ H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt)
assert(dt->shared->version >= dt->shared->u.compnd.memb[i].type->shared->version);
/* Name */
- HDstrcpy((char *)(*pp), dt->shared->u.compnd.memb[i].name);
+ strcpy((char *)(*pp), dt->shared->u.compnd.memb[i].name);
/* Version 3 of the datatype message removed the padding to multiple of 8 bytes */
- n = HDstrlen(dt->shared->u.compnd.memb[i].name);
+ n = strlen(dt->shared->u.compnd.memb[i].name);
if (dt->shared->version >= H5O_DTYPE_VERSION_3)
*pp += n + 1;
else {
@@ -1197,10 +1196,10 @@ H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt)
/* Names, each a multiple of eight bytes */
for (i = 0; i < dt->shared->u.enumer.nmembs; i++) {
/* Name */
- HDstrcpy((char *)(*pp), dt->shared->u.enumer.name[i]);
+ strcpy((char *)(*pp), dt->shared->u.enumer.name[i]);
/* Version 3 of the datatype message removed the padding to multiple of 8 bytes */
- n = HDstrlen(dt->shared->u.enumer.name[i]);
+ n = strlen(dt->shared->u.enumer.name[i]);
if (dt->shared->version >= H5O_DTYPE_VERSION_3)
*pp += n + 1;
else {
@@ -1312,7 +1311,7 @@ static void *
H5O__dtype_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSED mesg_flags,
unsigned *ioflags /*in,out*/, size_t p_size, const uint8_t *p)
{
- hbool_t skip;
+ bool skip;
H5T_t *dt = NULL;
const uint8_t *p_end = p + p_size - 1;
void *ret_value = NULL;
@@ -1331,7 +1330,7 @@ H5O__dtype_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsign
* the library will have set p_size to SIZE_MAX and we can use that
* as a signal to skip bounds checking.
*/
- skip = (p_size == SIZE_MAX ? TRUE : FALSE);
+ skip = (p_size == SIZE_MAX ? true : false);
/* Perform actual decode of message */
if (H5O__dtype_decode_helper(ioflags, &p, dt, skip, p_end) < 0)
@@ -1486,7 +1485,7 @@ H5O__dtype_size(const H5F_t *f, const void *_mesg)
break;
case H5T_OPAQUE:
- ret_value += (HDstrlen(dt->shared->u.opaque.tag) + 7) & (H5T_OPAQUE_TAG_MAX - 8);
+ ret_value += (strlen(dt->shared->u.opaque.tag) + 7) & (H5T_OPAQUE_TAG_MAX - 8);
break;
case H5T_COMPOUND: {
@@ -1500,7 +1499,7 @@ H5O__dtype_size(const H5F_t *f, const void *_mesg)
size_t name_len; /* Length of field's name */
/* Get length of field's name */
- name_len = HDstrlen(dt->shared->u.compnd.memb[u].name);
+ name_len = strlen(dt->shared->u.compnd.memb[u].name);
/* Versions of the format >= 3 don't pad out the name */
if (dt->shared->version >= H5O_DTYPE_VERSION_3)
@@ -1531,7 +1530,7 @@ H5O__dtype_size(const H5F_t *f, const void *_mesg)
size_t name_len; /* Length of field's name */
/* Get length of field's name */
- name_len = HDstrlen(dt->shared->u.enumer.name[u]);
+ name_len = strlen(dt->shared->u.enumer.name[u]);
/* Versions of the format >= 3 don't pad out the name */
if (dt->shared->version >= H5O_DTYPE_VERSION_3)
@@ -1673,8 +1672,8 @@ H5O__dtype_set_share(void *_mesg /*in,out*/, const H5O_shared_t *sh)
* not. Immutable datatypes or datatypes that are already
* shared cannot be shared (again).
*
- * Return: TRUE if datatype can be shared
- * FALSE if datatype may not shared
+ * Return: true if datatype can be shared
+ * false if datatype may not shared
* Negative on failure
*
*-------------------------------------------------------------------------
@@ -1684,7 +1683,7 @@ H5O__dtype_can_share(const void *_mesg)
{
const H5T_t *mesg = (const H5T_t *)_mesg;
htri_t tri_ret;
- htri_t ret_value = TRUE;
+ htri_t ret_value = true;
FUNC_ENTER_PACKAGE
@@ -1692,13 +1691,13 @@ H5O__dtype_can_share(const void *_mesg)
/* Don't share immutable datatypes */
if ((tri_ret = H5T_is_immutable(mesg)) > 0)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
else if (tri_ret < 0)
HGOTO_ERROR(H5E_OHDR, H5E_BADTYPE, FAIL, "can't tell if datatype is immutable");
/* Don't share committed datatypes */
if ((tri_ret = H5T_is_named(mesg)) > 0)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
else if (tri_ret < 0)
HGOTO_ERROR(H5E_OHDR, H5E_BADTYPE, FAIL, "can't tell if datatype is shared");
@@ -1719,7 +1718,7 @@ H5O__dtype_can_share(const void *_mesg)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__dtype_pre_copy_file(H5F_t *file_src, const void *mesg_src, hbool_t H5_ATTR_UNUSED *deleted,
+H5O__dtype_pre_copy_file(H5F_t *file_src, const void *mesg_src, bool H5_ATTR_UNUSED *deleted,
const H5O_copy_t *cpy_info, void *_udata)
{
const H5T_t *dt_src = (const H5T_t *)mesg_src; /* Source datatype */
@@ -1772,7 +1771,7 @@ H5O__dtype_pre_copy_file(H5F_t *file_src, const void *mesg_src, hbool_t H5_ATTR_
*/
static void *
H5O__dtype_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const H5O_msg_class_t *mesg_type, void *native_src,
- H5F_t *file_dst, hbool_t H5_ATTR_UNUSED *recompute_size,
+ H5F_t *file_dst, bool H5_ATTR_UNUSED *recompute_size,
H5O_copy_t H5_ATTR_UNUSED *cpy_info, void H5_ATTR_UNUSED *udata)
{
H5T_t *dst_mesg; /* Destination datatype */
@@ -1916,7 +1915,7 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
case H5T_NO_CLASS:
case H5T_NCLASSES:
default:
- HDsnprintf(buf, sizeof(buf), "H5T_CLASS_%d", (int)(dt->shared->type));
+ snprintf(buf, sizeof(buf), "H5T_CLASS_%d", (int)(dt->shared->type));
s = buf;
break;
} /* end switch */
@@ -1931,7 +1930,7 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
"Number of members:", dt->shared->u.compnd.nmembs);
for (i = 0; i < dt->shared->u.compnd.nmembs; i++) {
- HDsnprintf(buf, sizeof(buf), "Member %u:", i);
+ snprintf(buf, sizeof(buf), "Member %u:", i);
fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, buf, dt->shared->u.compnd.memb[i].name);
fprintf(stream, "%*s%-*s %lu\n", indent + 3, "", MAX(0, fwidth - 3),
"Byte offset:", (unsigned long)(dt->shared->u.compnd.memb[i].offset));
@@ -1944,7 +1943,7 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
"Number of members:", dt->shared->u.enumer.nmembs);
for (i = 0; i < dt->shared->u.enumer.nmembs; i++) {
- HDsnprintf(buf, sizeof(buf), "Member %u:", i);
+ snprintf(buf, sizeof(buf), "Member %u:", i);
fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, buf, dt->shared->u.enumer.name[i]);
fprintf(stream, "%*s%-*s 0x", indent, "", fwidth, "Raw bytes of value:");
for (k = 0; k < dt->shared->parent->shared->size; k++)
@@ -1984,14 +1983,13 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
case H5T_CSET_RESERVED_13:
case H5T_CSET_RESERVED_14:
case H5T_CSET_RESERVED_15:
- HDsnprintf(buf, sizeof(buf), "H5T_CSET_RESERVED_%d", (int)(dt->shared->u.atomic.u.s.cset));
+ snprintf(buf, sizeof(buf), "H5T_CSET_RESERVED_%d", (int)(dt->shared->u.atomic.u.s.cset));
s = buf;
break;
case H5T_CSET_ERROR:
default:
- HDsnprintf(buf, sizeof(buf), "Unknown character set: %d",
- (int)(dt->shared->u.atomic.u.s.cset));
+ snprintf(buf, sizeof(buf), "Unknown character set: %d", (int)(dt->shared->u.atomic.u.s.cset));
s = buf;
break;
} /* end switch */
@@ -2023,14 +2021,13 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
case H5T_STR_RESERVED_13:
case H5T_STR_RESERVED_14:
case H5T_STR_RESERVED_15:
- HDsnprintf(buf, sizeof(buf), "H5T_STR_RESERVED_%d", (int)(dt->shared->u.atomic.u.s.pad));
+ snprintf(buf, sizeof(buf), "H5T_STR_RESERVED_%d", (int)(dt->shared->u.atomic.u.s.pad));
s = buf;
break;
case H5T_STR_ERROR:
default:
- HDsnprintf(buf, sizeof(buf), "Unknown string padding: %d",
- (int)(dt->shared->u.atomic.u.s.pad));
+ snprintf(buf, sizeof(buf), "Unknown string padding: %d", (int)(dt->shared->u.atomic.u.s.pad));
s = buf;
break;
} /* end switch */
@@ -2049,7 +2046,7 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
case H5T_VLEN_BADTYPE:
case H5T_VLEN_MAXTYPE:
default:
- HDsnprintf(buf, sizeof(buf), "H5T_VLEN_%d", dt->shared->u.vlen.type);
+ snprintf(buf, sizeof(buf), "H5T_VLEN_%d", dt->shared->u.vlen.type);
s = buf;
break;
} /* end switch */
@@ -2067,7 +2064,7 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
case H5T_LOC_BADLOC:
case H5T_LOC_MAXLOC:
default:
- HDsnprintf(buf, sizeof(buf), "H5T_LOC_%d", (int)dt->shared->u.vlen.loc);
+ snprintf(buf, sizeof(buf), "H5T_LOC_%d", (int)dt->shared->u.vlen.loc);
s = buf;
break;
} /* end switch */
@@ -2098,13 +2095,13 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
case H5T_CSET_RESERVED_13:
case H5T_CSET_RESERVED_14:
case H5T_CSET_RESERVED_15:
- HDsnprintf(buf, sizeof(buf), "H5T_CSET_RESERVED_%d", (int)(dt->shared->u.vlen.cset));
+ snprintf(buf, sizeof(buf), "H5T_CSET_RESERVED_%d", (int)(dt->shared->u.vlen.cset));
s = buf;
break;
case H5T_CSET_ERROR:
default:
- HDsnprintf(buf, sizeof(buf), "Unknown character set: %d", (int)(dt->shared->u.vlen.cset));
+ snprintf(buf, sizeof(buf), "Unknown character set: %d", (int)(dt->shared->u.vlen.cset));
s = buf;
break;
} /* end switch */
@@ -2136,13 +2133,13 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
case H5T_STR_RESERVED_13:
case H5T_STR_RESERVED_14:
case H5T_STR_RESERVED_15:
- HDsnprintf(buf, sizeof(buf), "H5T_STR_RESERVED_%d", (int)(dt->shared->u.vlen.pad));
+ snprintf(buf, sizeof(buf), "H5T_STR_RESERVED_%d", (int)(dt->shared->u.vlen.pad));
s = buf;
break;
case H5T_STR_ERROR:
default:
- HDsnprintf(buf, sizeof(buf), "Unknown string padding: %d", (int)(dt->shared->u.vlen.pad));
+ snprintf(buf, sizeof(buf), "Unknown string padding: %d", (int)(dt->shared->u.vlen.pad));
s = buf;
break;
} /* end switch */
@@ -2182,7 +2179,7 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
case H5T_ORDER_ERROR:
default:
- HDsnprintf(buf, sizeof(buf), "H5T_ORDER_%d", dt->shared->u.atomic.order);
+ snprintf(buf, sizeof(buf), "H5T_ORDER_%d", dt->shared->u.atomic.order);
s = buf;
break;
} /* end switch */
@@ -2256,9 +2253,9 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
case H5T_NPAD:
default:
if (dt->shared->u.atomic.u.f.pad < 0)
- HDsnprintf(buf, sizeof(buf), "H5T_PAD_%d", -(dt->shared->u.atomic.u.f.pad));
+ snprintf(buf, sizeof(buf), "H5T_PAD_%d", -(dt->shared->u.atomic.u.f.pad));
else
- HDsnprintf(buf, sizeof(buf), "bit-%d", dt->shared->u.atomic.u.f.pad);
+ snprintf(buf, sizeof(buf), "bit-%d", dt->shared->u.atomic.u.f.pad);
s = buf;
break;
} /* end switch */
@@ -2279,7 +2276,7 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
case H5T_NORM_ERROR:
default:
- HDsnprintf(buf, sizeof(buf), "H5T_NORM_%d", (int)(dt->shared->u.atomic.u.f.norm));
+ snprintf(buf, sizeof(buf), "H5T_NORM_%d", (int)(dt->shared->u.atomic.u.f.norm));
s = buf;
} /* end switch */
fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Normalization:", s);
@@ -2316,7 +2313,7 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
case H5T_SGN_ERROR:
case H5T_NSGN:
default:
- HDsnprintf(buf, sizeof(buf), "H5T_SGN_%d", (int)(dt->shared->u.atomic.u.i.sign));
+ snprintf(buf, sizeof(buf), "H5T_SGN_%d", (int)(dt->shared->u.atomic.u.i.sign));
s = buf;
break;
} /* end switch */
diff --git a/src/H5Oefl.c b/src/H5Oefl.c
index 17cdf00c067..c06ecf68694 100644
--- a/src/H5Oefl.c
+++ b/src/H5Oefl.c
@@ -22,11 +22,11 @@
/* PRIVATE PROTOTYPES */
static void *H5O__efl_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags, size_t p_size,
const uint8_t *p);
-static herr_t H5O__efl_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
+static herr_t H5O__efl_encode(H5F_t *f, bool disable_shared, uint8_t *p, const void *_mesg);
static void *H5O__efl_copy(const void *_mesg, void *_dest);
-static size_t H5O__efl_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
+static size_t H5O__efl_size(const H5F_t *f, bool disable_shared, const void *_mesg);
static herr_t H5O__efl_reset(void *_mesg);
-static void *H5O__efl_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst, hbool_t *recompute_size,
+static void *H5O__efl_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst, bool *recompute_size,
unsigned *mesg_flags, H5O_copy_t *cpy_info, void *udata);
static herr_t H5O__efl_debug(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwidth);
@@ -118,7 +118,7 @@ H5O__efl_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSED
if (H5_IS_BUFFER_OVERFLOW(p, H5F_sizeof_addr(f), p_end))
HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding");
H5F_addr_decode(f, &p, &(mesg->heap_addr));
- if (H5_addr_defined(mesg->heap_addr) == FALSE)
+ if (H5_addr_defined(mesg->heap_addr) == false)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad local heap address when parsing efl msg");
/* Decode the file list */
@@ -197,7 +197,7 @@ H5O__efl_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSED
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__efl_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
+H5O__efl_encode(H5F_t *f, bool H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
const H5O_efl_t *mesg = (const H5O_efl_t *)_mesg;
size_t u; /* Local index variable */
@@ -260,7 +260,7 @@ H5O__efl_copy(const void *_mesg, void *_dest)
const H5O_efl_t *mesg = (const H5O_efl_t *)_mesg;
H5O_efl_t *dest = (H5O_efl_t *)_dest;
size_t u; /* Local index variable */
- hbool_t slot_allocated = FALSE; /* Flag to indicate that dynamic allocation has begun */
+ bool slot_allocated = false; /* Flag to indicate that dynamic allocation has begun */
void *ret_value = NULL; /* Return value */
FUNC_ENTER_PACKAGE
@@ -279,7 +279,7 @@ H5O__efl_copy(const void *_mesg, void *_dest)
if (dest->nalloc > 0) {
if (NULL == (dest->slot = (H5O_efl_entry_t *)H5MM_calloc(dest->nalloc * sizeof(H5O_efl_entry_t))))
HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, NULL, "can't allocate efl message slots");
- slot_allocated = TRUE;
+ slot_allocated = true;
for (u = 0; u < mesg->nused; u++) {
dest->slot[u] = mesg->slot[u];
if (NULL == (dest->slot[u].name = H5MM_xstrdup(mesg->slot[u].name)))
@@ -320,7 +320,7 @@ H5O__efl_copy(const void *_mesg, void *_dest)
*-------------------------------------------------------------------------
*/
static size_t
-H5O__efl_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void *_mesg)
+H5O__efl_size(const H5F_t *f, bool H5_ATTR_UNUSED disable_shared, const void *_mesg)
{
const H5O_efl_t *mesg = (const H5O_efl_t *)_mesg;
size_t ret_value = 0;
@@ -425,7 +425,7 @@ H5O_efl_total_size(H5O_efl_t *efl)
*/
static void *
H5O__efl_copy_file(H5F_t H5_ATTR_UNUSED *file_src, void *mesg_src, H5F_t *file_dst,
- hbool_t H5_ATTR_UNUSED *recompute_size, unsigned H5_ATTR_UNUSED *mesg_flags,
+ bool H5_ATTR_UNUSED *recompute_size, unsigned H5_ATTR_UNUSED *mesg_flags,
H5O_copy_t H5_ATTR_UNUSED *cpy_info, void H5_ATTR_UNUSED *_udata)
{
H5O_efl_t *efl_src = (H5O_efl_t *)mesg_src;
@@ -450,7 +450,7 @@ H5O__efl_copy_file(H5F_t H5_ATTR_UNUSED *file_src, void *mesg_src, H5F_t *file_d
/* Determine size needed for destination heap */
heap_size = H5HL_ALIGN(1); /* "empty" name */
for (idx = 0; idx < efl_src->nused; idx++)
- heap_size += H5HL_ALIGN(HDstrlen(efl_src->slot[idx].name) + 1);
+ heap_size += H5HL_ALIGN(strlen(efl_src->slot[idx].name) + 1);
/* Create name heap */
if (H5HL_create(file_dst, heap_size, &efl_dst->heap_addr /*out*/) < 0)
@@ -478,7 +478,7 @@ H5O__efl_copy_file(H5F_t H5_ATTR_UNUSED *file_src, void *mesg_src, H5F_t *file_d
/* copy the name from the source */
for (idx = 0; idx < efl_src->nused; idx++) {
efl_dst->slot[idx].name = H5MM_xstrdup(efl_src->slot[idx].name);
- if (H5HL_insert(file_dst, heap, HDstrlen(efl_dst->slot[idx].name) + 1, efl_dst->slot[idx].name,
+ if (H5HL_insert(file_dst, heap, strlen(efl_dst->slot[idx].name) + 1, efl_dst->slot[idx].name,
&(efl_dst->slot[idx].name_offset)) < 0)
HGOTO_ERROR(H5E_EFL, H5E_CANTINSERT, NULL, "can't insert file name into heap");
}
@@ -529,7 +529,7 @@ H5O__efl_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int ind
for (u = 0; u < mesg->nused; u++) {
char buf[64];
- HDsnprintf(buf, sizeof(buf), "File %zu", u);
+ snprintf(buf, sizeof(buf), "File %zu", u);
fprintf(stream, "%*s%s:\n", indent, "", buf);
fprintf(stream, "%*s%-*s \"%s\"\n", indent + 3, "", MAX(fwidth - 3, 0), "Name:", mesg->slot[u].name);
diff --git a/src/H5Ofill.c b/src/H5Ofill.c
index d43136424ca..b29c30a79bd 100644
--- a/src/H5Ofill.c
+++ b/src/H5Ofill.c
@@ -38,7 +38,7 @@ static size_t H5O__fill_new_size(const H5F_t *f, const void *_mesg);
static void *H5O__fill_copy(const void *_mesg, void *_dest);
static herr_t H5O__fill_reset(void *_mesg);
static herr_t H5O__fill_free(void *_mesg);
-static herr_t H5O__fill_pre_copy_file(H5F_t *file_src, const void *mesg_src, hbool_t *deleted,
+static herr_t H5O__fill_pre_copy_file(H5F_t *file_src, const void *mesg_src, bool *deleted,
const H5O_copy_t *cpy_info, void *udata);
static herr_t H5O__fill_debug(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwidth);
@@ -295,11 +295,11 @@ H5O__fill_new_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
H5MM_memcpy(fill->buf, p, (size_t)fill->size);
/* Set the "defined" flag */
- fill->fill_defined = TRUE;
+ fill->fill_defined = true;
}
else
/* Set the "defined" flag */
- fill->fill_defined = TRUE;
+ fill->fill_defined = true;
}
/* Set return value */
@@ -328,7 +328,7 @@ H5O__fill_old_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flag
unsigned H5_ATTR_UNUSED *ioflags, size_t p_size, const uint8_t *p)
{
H5O_fill_t *fill = NULL; /* Decoded fill value message */
- htri_t exists = FALSE;
+ htri_t exists = false;
H5T_t *dt = NULL;
const uint8_t *p_end = p + p_size - 1; /* End of the p buffer */
void *ret_value = NULL; /* Return value */
@@ -373,7 +373,7 @@ H5O__fill_old_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flag
if (NULL == (fill->buf = H5MM_malloc((size_t)fill->size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill value");
H5MM_memcpy(fill->buf, p, (size_t)fill->size);
- fill->fill_defined = TRUE;
+ fill->fill_defined = true;
}
else
fill->size = -1;
@@ -576,10 +576,10 @@ H5O__fill_copy(const void *_src, void *_dst)
size_t bkg_size; /* Size of background buffer */
/* Wrap copies of types to convert */
- dst_id = H5I_register(H5I_DATATYPE, H5T_copy(dst->type, H5T_COPY_TRANSIENT), FALSE);
+ dst_id = H5I_register(H5I_DATATYPE, H5T_copy(dst->type, H5T_COPY_TRANSIENT), false);
if (dst_id < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to copy/register datatype");
- src_id = H5I_register(H5I_DATATYPE, H5T_copy(src->type, H5T_COPY_ALL), FALSE);
+ src_id = H5I_register(H5I_DATATYPE, H5T_copy(src->type, H5T_COPY_ALL), false);
if (src_id < 0) {
H5I_dec_ref(dst_id);
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to copy/register datatype");
@@ -720,14 +720,14 @@ H5O_fill_reset_dyn(H5O_fill_t *fill)
assert(fill);
if (fill->buf) {
- if (fill->type && H5T_detect_class(fill->type, H5T_VLEN, FALSE) > 0) {
+ if (fill->type && H5T_detect_class(fill->type, H5T_VLEN, false) > 0) {
H5T_t *fill_type; /* Copy of fill value datatype */
H5S_t *fill_space; /* Scalar dataspace for fill value element */
/* Copy the fill value datatype and get an ID for it */
if (NULL == (fill_type = H5T_copy(fill->type, H5T_COPY_TRANSIENT)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to copy fill value datatype");
- if ((fill_type_id = H5I_register(H5I_DATATYPE, fill_type, FALSE)) < 0) {
+ if ((fill_type_id = H5I_register(H5I_DATATYPE, fill_type, false)) < 0) {
(void)H5T_close_real(fill_type);
HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, FAIL, "unable to register fill value datatype");
} /* end if */
@@ -786,7 +786,7 @@ H5O__fill_reset(void *_fill)
/* Reset value fields */
fill->alloc_time = H5D_ALLOC_TIME_LATE;
fill->fill_time = H5D_FILL_TIME_IFSET;
- fill->fill_defined = FALSE;
+ fill->fill_defined = false;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__fill_reset() */
@@ -824,7 +824,7 @@ H5O__fill_free(void *fill)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__fill_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src, hbool_t H5_ATTR_UNUSED *deleted,
+H5O__fill_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src, bool H5_ATTR_UNUSED *deleted,
const H5O_copy_t *cpy_info, void H5_ATTR_UNUSED *udata)
{
const H5O_fill_t *fill_src = (const H5O_fill_t *)mesg_src; /* Source fill value */
@@ -954,7 +954,7 @@ H5O__fill_debug(H5F_t H5_ATTR_UNUSED *f, const void *_fill, FILE *stream, int in
*-------------------------------------------------------------------------
*/
herr_t
-H5O_fill_convert(H5O_fill_t *fill, H5T_t *dset_type, hbool_t *fill_changed)
+H5O_fill_convert(H5O_fill_t *fill, H5T_t *dset_type, bool *fill_changed)
{
H5T_path_t *tpath; /* Type conversion info */
void *buf = NULL, *bkg = NULL; /* Conversion buffers */
@@ -968,14 +968,14 @@ H5O_fill_convert(H5O_fill_t *fill, H5T_t *dset_type, hbool_t *fill_changed)
assert(fill_changed);
/* No-op cases */
- if (!fill->buf || !fill->type || 0 == H5T_cmp(fill->type, dset_type, FALSE)) {
+ if (!fill->buf || !fill->type || 0 == H5T_cmp(fill->type, dset_type, false)) {
/* Don't need datatype for fill value */
if (fill->type)
(void)H5T_close_real(fill->type);
fill->type = NULL;
/* Note that the fill value info has changed */
- *fill_changed = TRUE;
+ *fill_changed = true;
HGOTO_DONE(SUCCEED);
} /* end if */
@@ -990,8 +990,8 @@ H5O_fill_convert(H5O_fill_t *fill, H5T_t *dset_type, hbool_t *fill_changed)
if (!H5T_path_noop(tpath)) {
size_t fill_type_size;
- if ((src_id = H5I_register(H5I_DATATYPE, H5T_copy(fill->type, H5T_COPY_ALL), FALSE)) < 0 ||
- (dst_id = H5I_register(H5I_DATATYPE, H5T_copy(dset_type, H5T_COPY_ALL), FALSE)) < 0)
+ if ((src_id = H5I_register(H5I_DATATYPE, H5T_copy(fill->type, H5T_COPY_ALL), false)) < 0 ||
+ (dst_id = H5I_register(H5I_DATATYPE, H5T_copy(dset_type, H5T_COPY_ALL), false)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to copy/register data type");
/*
@@ -1023,7 +1023,7 @@ H5O_fill_convert(H5O_fill_t *fill, H5T_t *dset_type, hbool_t *fill_changed)
H5_CHECKED_ASSIGN(fill->size, ssize_t, H5T_get_size(dset_type), size_t);
/* Note that the fill value info has changed */
- *fill_changed = TRUE;
+ *fill_changed = true;
} /* end if */
done:
diff --git a/src/H5Oflush.c b/src/H5Oflush.c
index 6ff751f1cf3..1c561d00b8b 100644
--- a/src/H5Oflush.c
+++ b/src/H5Oflush.c
@@ -150,7 +150,7 @@ H5O__oh_tag(const H5O_loc_t *oloc, haddr_t *tag)
assert(oloc);
/* Get object header for object */
- if (NULL == (oh = H5O_protect(oloc, H5AC__READ_ONLY_FLAG, FALSE)))
+ if (NULL == (oh = H5O_protect(oloc, H5AC__READ_ONLY_FLAG, false)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object's object header");
/* Get object header's address (i.e. the tag value for this object) */
@@ -186,7 +186,7 @@ herr_t
H5O_refresh_metadata(H5O_loc_t *oloc, hid_t oid)
{
H5VL_object_t *vol_obj = NULL; /* VOL object associated with the ID */
- hbool_t objs_incr = FALSE; /* Whether the object count in the file was incremented */
+ bool objs_incr = false; /* Whether the object count in the file was incremented */
H5F_t *file = NULL;
herr_t ret_value = SUCCEED; /* Return value */
@@ -214,7 +214,7 @@ H5O_refresh_metadata(H5O_loc_t *oloc, hid_t oid)
* if this object is the only thing holding the file open.
*/
H5F_incr_nopen_objs(oloc->file);
- objs_incr = TRUE;
+ objs_incr = true;
/* Save important datatype state */
if (H5I_get_type(oid) == H5I_DATATYPE)
@@ -239,7 +239,7 @@ H5O_refresh_metadata(H5O_loc_t *oloc, hid_t oid)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to refresh object");
/* Re-open the object, re-fetching its metadata */
- if (H5O_refresh_metadata_reopen(oid, H5P_DEFAULT, &obj_loc, connector, FALSE) < 0)
+ if (H5O_refresh_metadata_reopen(oid, H5P_DEFAULT, &obj_loc, connector, false) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to refresh object");
/* Restore the number of references on the VOL connector */
@@ -280,7 +280,7 @@ H5O__refresh_metadata_close(H5O_loc_t *oloc, H5G_loc_t *obj_loc, hid_t oid)
{
H5F_t *file; /* Local copy of the object's file pointer */
haddr_t tag = 0; /* Tag for object */
- hbool_t corked = FALSE; /* Whether object's metadata is corked */
+ bool corked = false; /* Whether object's metadata is corked */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -319,7 +319,7 @@ H5O__refresh_metadata_close(H5O_loc_t *oloc, H5G_loc_t *obj_loc, hid_t oid)
HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to flush tagged metadata");
/* Evict the object's tagged metadata */
- if (H5AC_evict_tagged_metadata(file, tag, TRUE) < 0)
+ if (H5AC_evict_tagged_metadata(file, tag, true) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to evict metadata");
/* Re-cork object with tag */
@@ -344,7 +344,7 @@ H5O__refresh_metadata_close(H5O_loc_t *oloc, H5G_loc_t *obj_loc, hid_t oid)
*/
herr_t
H5O_refresh_metadata_reopen(hid_t oid, hid_t apl_id, H5G_loc_t *obj_loc, H5VL_t *vol_connector,
- hbool_t start_swmr)
+ bool start_swmr)
{
void *object = NULL; /* Object for this operation */
H5I_type_t type; /* Type of object for the ID */
@@ -374,7 +374,7 @@ H5O_refresh_metadata_reopen(hid_t oid, hid_t apl_id, H5G_loc_t *obj_loc, H5VL_t
case H5I_DATASET:
/* Set dataset access property list in API context if appropriate */
- if (H5CX_set_apl(&apl_id, H5P_CLS_DACC, oid, TRUE) < 0)
+ if (H5CX_set_apl(&apl_id, H5P_CLS_DACC, oid, true) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info");
/* Re-open the dataset */
@@ -411,7 +411,7 @@ H5O_refresh_metadata_reopen(hid_t oid, hid_t apl_id, H5G_loc_t *obj_loc, H5VL_t
} /* end switch */
/* Re-register ID for the object */
- if ((H5VL_register_using_existing_id(type, object, vol_connector, TRUE, oid)) < 0)
+ if ((H5VL_register_using_existing_id(type, object, vol_connector, true, oid)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, FAIL, "unable to re-register object ID after refresh");
done:
diff --git a/src/H5Ofsinfo.c b/src/H5Ofsinfo.c
index 6829eb8634e..ca3a3de4c08 100644
--- a/src/H5Ofsinfo.c
+++ b/src/H5Ofsinfo.c
@@ -30,9 +30,9 @@
/* PRIVATE PROTOTYPES */
static void *H5O__fsinfo_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags,
size_t p_size, const uint8_t *p);
-static herr_t H5O__fsinfo_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
+static herr_t H5O__fsinfo_encode(H5F_t *f, bool disable_shared, uint8_t *p, const void *_mesg);
static void *H5O__fsinfo_copy(const void *_mesg, void *_dest);
-static size_t H5O__fsinfo_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
+static size_t H5O__fsinfo_size(const H5F_t *f, bool disable_shared, const void *_mesg);
static herr_t H5O__fsinfo_free(void *mesg);
static herr_t H5O__fsinfo_debug(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwidth);
@@ -130,7 +130,7 @@ H5O__fsinfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU
switch (strategy) {
case H5F_FILE_SPACE_ALL_PERSIST:
fsinfo->strategy = H5F_FSPACE_STRATEGY_FSM_AGGR;
- fsinfo->persist = TRUE;
+ fsinfo->persist = true;
fsinfo->threshold = threshold;
if (HADDR_UNDEF == (fsinfo->eoa_pre_fsm_fsalloc = H5F_get_eoa(f, H5FD_MEM_DEFAULT)))
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "unable to get file size");
@@ -162,7 +162,7 @@ H5O__fsinfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU
}
fsinfo->version = H5O_FSINFO_VERSION_1;
- fsinfo->mapped = TRUE;
+ fsinfo->mapped = true;
}
else {
if (vers < H5O_FSINFO_VERSION_1)
@@ -198,7 +198,7 @@ H5O__fsinfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU
HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding");
H5F_addr_decode(f, &p, &(fsinfo->fs_addr[ptype - 1]));
}
- fsinfo->mapped = FALSE;
+ fsinfo->mapped = false;
}
/* Set return value */
@@ -221,7 +221,7 @@ H5O__fsinfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__fsinfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
+H5O__fsinfo_encode(H5F_t *f, bool H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
const H5O_fsinfo_t *fsinfo = (const H5O_fsinfo_t *)_mesg;
H5F_mem_page_t ptype; /* Memory type for iteration */
@@ -299,7 +299,7 @@ H5O__fsinfo_copy(const void *_mesg, void *_dest)
*-------------------------------------------------------------------------
*/
static size_t
-H5O__fsinfo_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void *_mesg)
+H5O__fsinfo_size(const H5F_t *f, bool H5_ATTR_UNUSED disable_shared, const void *_mesg)
{
const H5O_fsinfo_t *fsinfo = (const H5O_fsinfo_t *)_mesg;
size_t ret_value = 0; /* Return value */
diff --git a/src/H5Oginfo.c b/src/H5Oginfo.c
index f8b12632efb..72d15afd64f 100644
--- a/src/H5Oginfo.c
+++ b/src/H5Oginfo.c
@@ -29,9 +29,9 @@
/* PRIVATE PROTOTYPES */
static void *H5O__ginfo_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags,
size_t p_size, const uint8_t *p);
-static herr_t H5O__ginfo_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
+static herr_t H5O__ginfo_encode(H5F_t *f, bool disable_shared, uint8_t *p, const void *_mesg);
static void *H5O__ginfo_copy(const void *_mesg, void *_dest);
-static size_t H5O__ginfo_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
+static size_t H5O__ginfo_size(const H5F_t *f, bool disable_shared, const void *_mesg);
static herr_t H5O__ginfo_free(void *_mesg);
static herr_t H5O__ginfo_debug(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwidth);
@@ -111,8 +111,8 @@ H5O__ginfo_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsign
flags = *p++;
if (flags & ~H5O_GINFO_ALL_FLAGS)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad flag value for message");
- ginfo->store_link_phase_change = (flags & H5O_GINFO_STORE_PHASE_CHANGE) ? TRUE : FALSE;
- ginfo->store_est_entry_info = (flags & H5O_GINFO_STORE_EST_ENTRY_INFO) ? TRUE : FALSE;
+ ginfo->store_link_phase_change = (flags & H5O_GINFO_STORE_PHASE_CHANGE) ? true : false;
+ ginfo->store_est_entry_info = (flags & H5O_GINFO_STORE_EST_ENTRY_INFO) ? true : false;
/* Get the max. # of links to store compactly & the min. # of links to store densely */
if (ginfo->store_link_phase_change) {
@@ -158,8 +158,7 @@ H5O__ginfo_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsign
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__ginfo_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
- const void *_mesg)
+H5O__ginfo_encode(H5F_t H5_ATTR_UNUSED *f, bool H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
const H5O_ginfo_t *ginfo = (const H5O_ginfo_t *)_mesg;
unsigned char flags = 0; /* Flags for encoding group info */
@@ -243,7 +242,7 @@ H5O__ginfo_copy(const void *_mesg, void *_dest)
*-------------------------------------------------------------------------
*/
static size_t
-H5O__ginfo_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, const void *_mesg)
+H5O__ginfo_size(const H5F_t H5_ATTR_UNUSED *f, bool H5_ATTR_UNUSED disable_shared, const void *_mesg)
{
const H5O_ginfo_t *ginfo = (const H5O_ginfo_t *)_mesg;
size_t ret_value = 0; /* Return value */
diff --git a/src/H5Oint.c b/src/H5Oint.c
index a367ffc4b64..052987728bc 100644
--- a/src/H5Oint.c
+++ b/src/H5Oint.c
@@ -211,7 +211,7 @@ H5O_init(void)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__set_version(H5F_t *f, H5O_t *oh, uint8_t oh_flags, hbool_t store_msg_crt_idx)
+H5O__set_version(H5F_t *f, H5O_t *oh, uint8_t oh_flags, bool store_msg_crt_idx)
{
uint8_t version; /* Message version */
herr_t ret_value = SUCCEED; /* Return value */
@@ -268,7 +268,7 @@ H5O_create(H5F_t *f, size_t size_hint, size_t initial_rc, hid_t ocpl_id, H5O_loc
assert(f);
assert(loc);
- assert(TRUE == H5P_isa_class(ocpl_id, H5P_OBJECT_CREATE));
+ assert(true == H5P_isa_class(ocpl_id, H5P_OBJECT_CREATE));
/* create object header in freelist
* header version is set internally
@@ -283,7 +283,7 @@ H5O_create(H5F_t *f, size_t size_hint, size_t initial_rc, hid_t ocpl_id, H5O_loc
HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "Can't apply object header to file");
done:
- if ((FAIL == ret_value) && (NULL != oh) && (H5O__free(oh, TRUE) < 0))
+ if ((FAIL == ret_value) && (NULL != oh) && (H5O__free(oh, true) < 0))
HDONE_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "can't delete object header");
FUNC_LEAVE_NOAPI(ret_value)
@@ -310,7 +310,7 @@ H5O_create_ohdr(H5F_t *f, hid_t ocpl_id)
FUNC_ENTER_NOAPI(NULL)
assert(f);
- assert(TRUE == H5P_isa_class(ocpl_id, H5P_OBJECT_CREATE));
+ assert(true == H5P_isa_class(ocpl_id, H5P_OBJECT_CREATE));
/* Check for invalid access request */
if (0 == (H5F_INTENT(f) & H5F_ACC_RDWR))
@@ -344,7 +344,7 @@ H5O_create_ohdr(H5F_t *f, hid_t ocpl_id)
ret_value = oh;
done:
- if ((NULL == ret_value) && (NULL != oh) && (H5O__free(oh, TRUE) < 0))
+ if ((NULL == ret_value) && (NULL != oh) && (H5O__free(oh, true) < 0))
HDONE_ERROR(H5E_OHDR, H5E_CANTFREE, NULL, "can't delete object header");
FUNC_LEAVE_NOAPI(ret_value)
@@ -375,7 +375,7 @@ H5O_apply_ohdr(H5F_t *f, H5O_t *oh, hid_t ocpl_id, size_t size_hint, size_t init
assert(f);
assert(loc_out);
assert(oh);
- assert(TRUE == H5P_isa_class(ocpl_id, H5P_OBJECT_CREATE));
+ assert(true == H5P_isa_class(ocpl_id, H5P_OBJECT_CREATE));
/* Allocate at least a reasonable size for the object header */
size_hint = H5O_ALIGN_F(f, MAX(H5O_MIN_SIZE, size_hint));
@@ -490,7 +490,7 @@ H5O_apply_ohdr(H5F_t *f, H5O_t *oh, hid_t ocpl_id, size_t size_hint, size_t init
/* Initialize the initial "null" message; covers the entire first chunk */
oh->mesg[0].type = H5O_MSG_NULL;
- oh->mesg[0].dirty = TRUE;
+ oh->mesg[0].dirty = true;
oh->mesg[0].native = NULL;
oh->mesg[0].raw =
oh->chunk[0].image + H5O_SIZEOF_HDR(oh) - H5O_SIZEOF_CHKSUM_OH(oh) + H5O_SIZEOF_MSGHDR_OH(oh);
@@ -555,7 +555,7 @@ H5O_open(H5O_loc_t *loc)
/* Turn off the variable for holding file or increment open-lock counters */
if (loc->holding_file)
- loc->holding_file = FALSE;
+ loc->holding_file = false;
else
H5F_INCR_NOPEN_OBJS(loc->file);
@@ -578,7 +578,7 @@ H5O_open_name(const H5G_loc_t *loc, const char *name, H5I_type_t *opened_type)
H5G_loc_t obj_loc; /* Location used to open group */
H5G_name_t obj_path; /* Opened object group hier. path */
H5O_loc_t obj_oloc; /* Opened object object location */
- hbool_t loc_found = FALSE; /* Entry at 'name' found */
+ bool loc_found = false; /* Entry at 'name' found */
void *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -595,7 +595,7 @@ H5O_open_name(const H5G_loc_t *loc, const char *name, H5I_type_t *opened_type)
/* Find the object's location */
if (H5G_loc_find(loc, name, &obj_loc /*out*/) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, NULL, "object not found");
- loc_found = TRUE;
+ loc_found = true;
/* Open the object */
if (NULL == (ret_value = H5O_open_by_loc(&obj_loc, opened_type)))
@@ -626,7 +626,7 @@ H5O__open_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type, H5
H5G_loc_t obj_loc; /* Location used to open group */
H5G_name_t obj_path; /* Opened object group hier. path */
H5O_loc_t obj_oloc; /* Opened object object location */
- hbool_t loc_found = FALSE; /* Entry at 'name' found */
+ bool loc_found = false; /* Entry at 'name' found */
void *ret_value = NULL; /* Return value */
FUNC_ENTER_PACKAGE
@@ -642,7 +642,7 @@ H5O__open_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type, H5
/* Find the object's location, according to the order in the index */
if (H5G_loc_find_by_idx(loc, name, idx_type, order, n, &obj_loc /*out*/) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, NULL, "group not found");
- loc_found = TRUE;
+ loc_found = true;
/* Open the object */
if (NULL == (ret_value = H5O_open_by_loc(&obj_loc, opened_type)))
@@ -739,7 +739,7 @@ H5O_open_by_loc(const H5G_loc_t *obj_loc, H5I_type_t *opened_type)
*-------------------------------------------------------------------------
*/
herr_t
-H5O_close(H5O_loc_t *loc, hbool_t *file_closed /*out*/)
+H5O_close(H5O_loc_t *loc, bool *file_closed /*out*/)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -757,14 +757,14 @@ H5O_close(H5O_loc_t *loc, hbool_t *file_closed /*out*/)
* this value by passing in NULL.
*/
if (file_closed)
- *file_closed = FALSE;
+ *file_closed = false;
/* Decrement open-lock counters */
H5F_DECR_NOPEN_OBJS(loc->file);
#ifdef H5O_DEBUG
if (H5DEBUG(O)) {
- if (FALSE == H5F_ID_EXISTS(loc->file) && 1 == H5F_NREFS(loc->file))
+ if (false == H5F_ID_EXISTS(loc->file) && 1 == H5F_NREFS(loc->file))
fprintf(H5DEBUG(O), "< %" PRIuHADDR " auto %lu remaining\n", loc->addr,
(unsigned long)H5F_NOPEN_OBJS(loc->file));
else
@@ -802,7 +802,7 @@ H5O_close(H5O_loc_t *loc, hbool_t *file_closed /*out*/)
*-------------------------------------------------------------------------
*/
int
-H5O__link_oh(H5F_t *f, int adjust, H5O_t *oh, hbool_t *deleted)
+H5O__link_oh(H5F_t *f, int adjust, H5O_t *oh, bool *deleted)
{
haddr_t addr = H5O_OH_GET_ADDR(oh); /* Object header address */
int ret_value = -1; /* Return value */
@@ -833,12 +833,12 @@ H5O__link_oh(H5F_t *f, int adjust, H5O_t *oh, hbool_t *deleted)
/* Check if the object is still open by the user */
if (H5FO_opened(f, addr) != NULL) {
/* Flag the object to be deleted when it's closed */
- if (H5FO_mark(f, addr, TRUE) < 0)
+ if (H5FO_mark(f, addr, true) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, (-1), "can't mark object for deletion");
} /* end if */
else {
/* Mark the object header for deletion */
- *deleted = TRUE;
+ *deleted = true;
} /* end else */
} /* end if */
} /* end if */
@@ -848,7 +848,7 @@ H5O__link_oh(H5F_t *f, int adjust, H5O_t *oh, hbool_t *deleted)
/* Check if the object is currently open, but marked for deletion */
if (H5FO_marked(f, addr)) {
/* Remove "delete me" flag on the object */
- if (H5FO_mark(f, addr, FALSE) < 0)
+ if (H5FO_mark(f, addr, false) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, (-1), "can't mark object for deletion");
} /* end if */
} /* end if */
@@ -867,9 +867,9 @@ H5O__link_oh(H5F_t *f, int adjust, H5O_t *oh, hbool_t *deleted)
if (oh->has_refcount_msg) {
/* Check for removing refcount message */
if (oh->nlink <= 1) {
- if (H5O__msg_remove_real(f, oh, H5O_MSG_REFCOUNT, H5O_ALL, NULL, NULL, TRUE) < 0)
+ if (H5O__msg_remove_real(f, oh, H5O_MSG_REFCOUNT, H5O_ALL, NULL, NULL, true) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, (-1), "unable to delete refcount message");
- oh->has_refcount_msg = FALSE;
+ oh->has_refcount_msg = false;
} /* end if */
/* Update refcount message with new link count */
else {
@@ -888,7 +888,7 @@ H5O__link_oh(H5F_t *f, int adjust, H5O_t *oh, hbool_t *deleted)
if (H5O__msg_append_real(f, oh, H5O_MSG_REFCOUNT, H5O_MSG_FLAG_DONTSHARE, 0, &refcount) <
0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, (-1), "unable to create new refcount message");
- oh->has_refcount_msg = TRUE;
+ oh->has_refcount_msg = true;
} /* end if */
} /* end else */
} /* end if */
@@ -916,9 +916,9 @@ H5O__link_oh(H5F_t *f, int adjust, H5O_t *oh, hbool_t *deleted)
int
H5O_link(const H5O_loc_t *loc, int adjust)
{
- H5O_t *oh = NULL;
- hbool_t deleted = FALSE; /* Whether the object was deleted */
- int ret_value = -1; /* Return value */
+ H5O_t *oh = NULL;
+ bool deleted = false; /* Whether the object was deleted */
+ int ret_value = -1; /* Return value */
FUNC_ENTER_NOAPI_TAG(loc->addr, FAIL)
@@ -958,7 +958,7 @@ H5O_link(const H5O_loc_t *loc, int adjust)
*-------------------------------------------------------------------------
*/
H5O_t *
-H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, hbool_t pin_all_chunks)
+H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, bool pin_all_chunks)
{
H5O_t *oh = NULL; /* Object header protected */
H5O_cache_ud_t udata; /* User data for protecting object header */
@@ -985,11 +985,11 @@ H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, hbool_t pin_all_chunks)
HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "no write intent on file");
/* Construct the user data for protect callback */
- udata.made_attempt = FALSE;
+ udata.made_attempt = false;
udata.v1_pfx_nmesgs = 0;
udata.chunk0_size = 0;
udata.oh = NULL;
- udata.free_oh = FALSE;
+ udata.free_oh = false;
udata.common.f = loc->file;
udata.common.file_intent = file_intent;
udata.common.merged_null_msgs = 0;
@@ -1009,11 +1009,11 @@ H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, hbool_t pin_all_chunks)
/* Sanity check - we should only have continuation messages to process
* when the object header is actually loaded from the file.
*/
- assert(udata.made_attempt == TRUE);
+ assert(udata.made_attempt == true);
assert(cont_msg_info.msgs);
/* Construct the user data for protecting chunks */
- chk_udata.decoding = TRUE;
+ chk_udata.decoding = true;
chk_udata.oh = oh;
chk_udata.chunkno = UINT_MAX; /* Set to invalid value, for better error detection */
chk_udata.common.f = loc->file;
@@ -1106,7 +1106,7 @@ H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, hbool_t pin_all_chunks)
HGOTO_ERROR(H5E_OHDR, H5E_CANTPIN, NULL, "unable to pin object header chunk");
/* Unprotect chunk */
- if (H5O__chunk_unprotect(loc->file, chk_proxy, FALSE) < 0)
+ if (H5O__chunk_unprotect(loc->file, chk_proxy, false) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, NULL, "unable to unprotect object header chunk");
/* Preserve chunk proxy pointer for later */
@@ -1114,7 +1114,7 @@ H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, hbool_t pin_all_chunks)
} /* end for */
/* Set the flag for the unprotect */
- oh->chunks_pinned = TRUE;
+ oh->chunks_pinned = true;
} /* end if */
/* Set return value */
@@ -1158,7 +1158,7 @@ H5O_pin(const H5O_loc_t *loc)
assert(loc);
/* Get header */
- if (NULL == (oh = H5O_protect(loc, H5AC__NO_FLAGS_SET, FALSE)))
+ if (NULL == (oh = H5O_protect(loc, H5AC__NO_FLAGS_SET, false)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to protect object header");
/* Increment the reference count on the object header */
@@ -1248,7 +1248,7 @@ H5O_unprotect(const H5O_loc_t *loc, H5O_t *oh, unsigned oh_flags)
} /* end for */
/* Reet the flag from the unprotect */
- oh->chunks_pinned = FALSE;
+ oh->chunks_pinned = false;
} /* end if */
/* Unprotect the object header */
@@ -1271,10 +1271,10 @@ H5O_unprotect(const H5O_loc_t *loc, H5O_t *oh, unsigned oh_flags)
*-------------------------------------------------------------------------
*/
herr_t
-H5O_touch_oh(H5F_t *f, H5O_t *oh, hbool_t force)
+H5O_touch_oh(H5F_t *f, H5O_t *oh, bool force)
{
H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk that message is in */
- hbool_t chk_dirtied = FALSE; /* Flag for unprotecting chunk */
+ bool chk_dirtied = false; /* Flag for unprotecting chunk */
time_t now; /* Current time */
herr_t ret_value = SUCCEED; /* Return value */
@@ -1329,8 +1329,8 @@ H5O_touch_oh(H5F_t *f, H5O_t *oh, hbool_t force)
*((time_t *)(oh->mesg[idx].native)) = now;
/* Mark the message as dirty */
- oh->mesg[idx].dirty = TRUE;
- chk_dirtied = TRUE;
+ oh->mesg[idx].dirty = true;
+ chk_dirtied = true;
} /* end if */
else {
/* XXX: For now, update access time & change fields in the object header
@@ -1365,7 +1365,7 @@ H5O_touch_oh(H5F_t *f, H5O_t *oh, hbool_t force)
*-------------------------------------------------------------------------
*/
herr_t
-H5O_touch(const H5O_loc_t *loc, hbool_t force)
+H5O_touch(const H5O_loc_t *loc, bool force)
{
H5O_t *oh = NULL; /* Object header to modify */
unsigned oh_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting object header */
@@ -1377,7 +1377,7 @@ H5O_touch(const H5O_loc_t *loc, hbool_t force)
assert(loc);
/* Get the object header */
- if (NULL == (oh = H5O_protect(loc, H5AC__NO_FLAGS_SET, FALSE)))
+ if (NULL == (oh = H5O_protect(loc, H5AC__NO_FLAGS_SET, false)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header");
/* Create/Update the modification time message */
@@ -1451,8 +1451,8 @@ H5O_bogus_oh(H5F_t *f, H5O_t *oh, unsigned bogus_id, unsigned mesg_flags)
oh->mesg[idx].flags = mesg_flags;
/* Mark the message and object header as dirty */
- oh->mesg[idx].dirty = TRUE;
- oh->cache_info.is_dirty = TRUE;
+ oh->mesg[idx].dirty = true;
+ oh->cache_info.is_dirty = true;
} /* end if */
done:
@@ -1478,7 +1478,7 @@ H5O_delete(H5F_t *f, haddr_t addr)
H5O_t *oh = NULL; /* Object header information */
H5O_loc_t loc; /* Object location for object to delete */
unsigned oh_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting object header */
- hbool_t corked;
+ bool corked;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_TAG(addr, FAIL)
@@ -1490,10 +1490,10 @@ H5O_delete(H5F_t *f, haddr_t addr)
/* Set up the object location */
loc.file = f;
loc.addr = addr;
- loc.holding_file = FALSE;
+ loc.holding_file = false;
/* Get the object header information */
- if (NULL == (oh = H5O_protect(&loc, H5AC__NO_FLAGS_SET, FALSE)))
+ if (NULL == (oh = H5O_protect(&loc, H5AC__NO_FLAGS_SET, false)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header");
/* Delete object */
@@ -1576,7 +1576,7 @@ H5O_obj_type(const H5O_loc_t *loc, H5O_type_t *obj_type)
FUNC_ENTER_NOAPI_TAG(loc->addr, FAIL)
/* Load the object header */
- if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
+ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, false)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header");
/* Retrieve the type of the object */
@@ -1645,7 +1645,7 @@ H5O__obj_class(const H5O_loc_t *loc)
FUNC_ENTER_PACKAGE_TAG(loc->addr)
/* Load the object header */
- if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
+ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, false)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to load object header");
/* Test whether entry qualifies as a particular type of object */
@@ -1898,7 +1898,7 @@ H5O_loc_hold_file(H5O_loc_t *loc)
/* If this location is not already holding its file open, do so. */
if (!loc->holding_file) {
H5F_INCR_NOPEN_OBJS(loc->file);
- loc->holding_file = TRUE;
+ loc->holding_file = true;
}
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -1929,7 +1929,7 @@ H5O_loc_free(H5O_loc_t *loc)
/* If this location is holding its file open try to close the file. */
if (loc->holding_file) {
H5F_DECR_NOPEN_OBJS(loc->file);
- loc->holding_file = FALSE;
+ loc->holding_file = false;
if (H5F_NOPEN_OBJS(loc->file) <= 0) {
if (H5F_try_close(loc->file, NULL) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close file");
@@ -1966,7 +1966,7 @@ H5O_get_hdr_info(const H5O_loc_t *loc, H5O_hdr_info_t *hdr)
memset(hdr, 0, sizeof(*hdr));
/* Get the object header */
- if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
+ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, false)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to load object header");
/* Get the information for the object header */
@@ -2081,7 +2081,7 @@ H5O_get_info(const H5O_loc_t *loc, H5O_info2_t *oinfo, unsigned fields)
assert(oinfo);
/* Get the object header */
- if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
+ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, false)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header");
/* Get class for object */
@@ -2187,7 +2187,7 @@ H5O_get_native_info(const H5O_loc_t *loc, H5O_native_info_t *oinfo, unsigned fie
assert(oinfo);
/* Get the object header */
- if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
+ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, false)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header");
/* Get class for object */
@@ -2245,7 +2245,7 @@ H5O_get_create_plist(const H5O_loc_t *loc, H5P_genplist_t *oc_plist)
assert(oc_plist);
/* Get the object header */
- if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
+ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, false)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header");
/* Set property values, if they were used for the object */
@@ -2300,7 +2300,7 @@ H5O_get_nlinks(const H5O_loc_t *loc, hsize_t *nlinks)
assert(nlinks);
/* Get the object header */
- if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
+ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, false)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header");
/* Retrieve the # of link messages seen when the object header was loaded */
@@ -2449,7 +2449,7 @@ H5O_get_rc_and_type(const H5O_loc_t *loc, unsigned *rc, H5O_type_t *otype)
assert(loc);
/* Get the object header */
- if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
+ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, false)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header");
/* Set the object's reference count */
@@ -2504,7 +2504,7 @@ H5O__visit_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2_t *l
H5G_loc_t obj_loc; /* Location of object */
H5G_name_t obj_path; /* Object's group hier. path */
H5O_loc_t obj_oloc; /* Object's object location */
- hbool_t obj_found = FALSE; /* Object at 'name' found */
+ bool obj_found = false; /* Object at 'name' found */
herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_PACKAGE
@@ -2527,7 +2527,7 @@ H5O__visit_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2_t *l
/* (Correctly handles mounted files) */
if (H5G_loc_find(udata->start_loc, name, &obj_loc /*out*/) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, H5_ITER_ERROR, "object not found");
- obj_found = TRUE;
+ obj_found = true;
/* Construct unique "position" for this object */
H5F_GET_FILENO(obj_oloc.file, obj_pos.fileno);
@@ -2614,7 +2614,7 @@ H5O__visit(H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type, H5_iter_or
H5G_loc_t obj_loc; /* Location used to open object */
H5G_name_t obj_path; /* Opened object group hier. path */
H5O_loc_t obj_oloc; /* Opened object object location */
- hbool_t loc_found = FALSE; /* Entry at 'name' found */
+ bool loc_found = false; /* Entry at 'name' found */
H5O_info2_t oinfo; /* Object info struct */
void *obj = NULL; /* Object */
H5I_type_t opened_type; /* ID type of object */
@@ -2637,7 +2637,7 @@ H5O__visit(H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type, H5_iter_or
/* Find the object's location */
if (H5G_loc_find(loc, obj_name, &obj_loc /*out*/) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "object not found");
- loc_found = TRUE;
+ loc_found = true;
/* Get the object's info */
if (H5O_get_info(&obj_oloc, &oinfo, fields) < 0)
@@ -2649,7 +2649,7 @@ H5O__visit(H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type, H5_iter_or
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open object");
/* Get an ID for the visited object */
- if ((obj_id = H5VL_wrap_register(opened_type, obj, TRUE)) < 0)
+ if ((obj_id = H5VL_wrap_register(opened_type, obj, true)) < 0)
HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register visited object");
/* Make callback for starting object */
@@ -2811,7 +2811,7 @@ H5O_dec_rc_by_loc(const H5O_loc_t *loc)
assert(loc);
/* Get header */
- if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
+ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, false)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header");
/* Decrement the reference count on the object header */
@@ -2857,7 +2857,7 @@ H5O_get_proxy(const H5O_t *oh)
*-------------------------------------------------------------------------
*/
herr_t
-H5O__free(H5O_t *oh, hbool_t H5_ATTR_NDEBUG_UNUSED force)
+H5O__free(H5O_t *oh, bool H5_ATTR_NDEBUG_UNUSED force)
{
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5Olayout.c b/src/H5Olayout.c
index 4ee2f822909..1f2b6862b6e 100644
--- a/src/H5Olayout.c
+++ b/src/H5Olayout.c
@@ -31,15 +31,15 @@
/* PRIVATE PROTOTYPES */
static void *H5O__layout_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags,
size_t p_size, const uint8_t *p);
-static herr_t H5O__layout_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
+static herr_t H5O__layout_encode(H5F_t *f, bool disable_shared, uint8_t *p, const void *_mesg);
static void *H5O__layout_copy(const void *_mesg, void *_dest);
-static size_t H5O__layout_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
+static size_t H5O__layout_size(const H5F_t *f, bool disable_shared, const void *_mesg);
static herr_t H5O__layout_reset(void *_mesg);
static herr_t H5O__layout_free(void *_mesg);
static herr_t H5O__layout_delete(H5F_t *f, H5O_t *open_oh, void *_mesg);
-static herr_t H5O__layout_pre_copy_file(H5F_t *file_src, const void *mesg_src, hbool_t *deleted,
+static herr_t H5O__layout_pre_copy_file(H5F_t *file_src, const void *mesg_src, bool *deleted,
const H5O_copy_t *cpy_info, void *udata);
-static void *H5O__layout_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst, hbool_t *recompute_size,
+static void *H5O__layout_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst, bool *recompute_size,
unsigned *mesg_flags, H5O_copy_t *cpy_info, void *udata);
static herr_t H5O__layout_debug(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwidth);
@@ -543,7 +543,7 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU
mesg->storage.u.virt.printf_gap = HSIZE_UNDEF;
mesg->storage.u.virt.source_fapl = -1;
mesg->storage.u.virt.source_dapl = -1;
- mesg->storage.u.virt.init = FALSE;
+ mesg->storage.u.virt.init = false;
/* Decode heap block if it exists */
if (mesg->storage.u.virt.serial_list_hobjid.addr != HADDR_UNDEF) {
@@ -582,9 +582,16 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU
H5F_DECODE_LENGTH(f, heap_block_p, tmp_hsize);
/* Allocate entry list */
- if (NULL == (mesg->storage.u.virt.list = (H5O_storage_virtual_ent_t *)H5MM_calloc(
- (size_t)tmp_hsize * sizeof(H5O_storage_virtual_ent_t))))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, NULL, "unable to allocate heap block");
+ if (tmp_hsize > 0) {
+ if (NULL == (mesg->storage.u.virt.list = (H5O_storage_virtual_ent_t *)H5MM_calloc(
+ (size_t)tmp_hsize * sizeof(H5O_storage_virtual_ent_t))))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, NULL, "unable to allocate heap block");
+ }
+ else {
+ /* Avoid zero-size allocation */
+ mesg->storage.u.virt.list = NULL;
+ }
+
mesg->storage.u.virt.list_nalloc = (size_t)tmp_hsize;
mesg->storage.u.virt.list_nused = (size_t)tmp_hsize;
@@ -598,7 +605,7 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU
"ran off end of input buffer while decoding");
/* Source file name */
- tmp_size = HDstrnlen((const char *)heap_block_p, (size_t)avail_buffer_space);
+ tmp_size = strnlen((const char *)heap_block_p, (size_t)avail_buffer_space);
if (tmp_size == (size_t)avail_buffer_space)
HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL,
"ran off end of input buffer while decoding - unterminated source "
@@ -619,7 +626,7 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU
"ran off end of input buffer while decoding");
/* Source dataset name */
- tmp_size = HDstrnlen((const char *)heap_block_p, (size_t)avail_buffer_space);
+ tmp_size = strnlen((const char *)heap_block_p, (size_t)avail_buffer_space);
if (tmp_size == (size_t)avail_buffer_space)
HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL,
"ran off end of input buffer while decoding - unterminated source "
@@ -787,7 +794,7 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
+H5O__layout_encode(H5F_t *f, bool H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
const H5O_layout_t *mesg = (const H5O_layout_t *)_mesg;
unsigned u;
@@ -987,7 +994,7 @@ H5O__layout_copy(const void *_mesg, void *_dest)
case H5D_CHUNKED:
/* Reset the pointer of the chunked storage index but not the address */
if (dest->storage.u.chunk.ops)
- H5D_chunk_idx_reset(&dest->storage.u.chunk, FALSE);
+ H5D_chunk_idx_reset(&dest->storage.u.chunk, false);
break;
case H5D_VIRTUAL:
@@ -1026,7 +1033,7 @@ H5O__layout_copy(const void *_mesg, void *_dest)
*-------------------------------------------------------------------------
*/
static size_t
-H5O__layout_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void *_mesg)
+H5O__layout_size(const H5F_t *f, bool H5_ATTR_UNUSED disable_shared, const void *_mesg)
{
const H5O_layout_t *mesg = (const H5O_layout_t *)_mesg;
size_t ret_value = 0; /* Return value */
@@ -1039,7 +1046,7 @@ H5O__layout_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const vo
/* Compute serialized size */
/* (including possibly compact data) */
- ret_value = H5D__layout_meta_size(f, mesg, TRUE);
+ ret_value = H5D__layout_meta_size(f, mesg, true);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__layout_size() */
@@ -1174,9 +1181,8 @@ H5O__layout_delete(H5F_t *f, H5O_t *open_oh, void *_mesg)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__layout_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src,
- hbool_t H5_ATTR_UNUSED *deleted, const H5O_copy_t *cpy_info,
- void H5_ATTR_UNUSED *udata)
+H5O__layout_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src, bool H5_ATTR_UNUSED *deleted,
+ const H5O_copy_t *cpy_info, void H5_ATTR_UNUSED *udata)
{
const H5O_layout_t *layout_src = (const H5O_layout_t *)mesg_src; /* Source layout */
herr_t ret_value = SUCCEED; /* Return value */
@@ -1208,14 +1214,13 @@ H5O__layout_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src,
*-------------------------------------------------------------------------
*/
static void *
-H5O__layout_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst,
- hbool_t H5_ATTR_UNUSED *recompute_size, unsigned H5_ATTR_UNUSED *mesg_flags,
- H5O_copy_t *cpy_info, void *_udata)
+H5O__layout_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst, bool H5_ATTR_UNUSED *recompute_size,
+ unsigned H5_ATTR_UNUSED *mesg_flags, H5O_copy_t *cpy_info, void *_udata)
{
H5D_copy_file_ud_t *udata = (H5D_copy_file_ud_t *)_udata; /* Dataset copying user data */
H5O_layout_t *layout_src = (H5O_layout_t *)mesg_src;
H5O_layout_t *layout_dst = NULL;
- hbool_t copied = FALSE; /* Whether the data was copied */
+ bool copied = false; /* Whether the data was copied */
void *ret_value = NULL; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1237,7 +1242,7 @@ H5O__layout_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst,
if (H5D__compact_copy(file_src, &layout_src->storage.u.compact, file_dst,
&layout_dst->storage.u.compact, udata->src_dtype, cpy_info) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy chunked storage");
- copied = TRUE;
+ copied = true;
} /* end if */
break;
@@ -1257,7 +1262,7 @@ H5O__layout_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst,
if (H5D__contig_copy(file_src, &layout_src->storage.u.contig, file_dst,
&layout_dst->storage.u.contig, udata->src_dtype, cpy_info) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy contiguous storage");
- copied = TRUE;
+ copied = true;
} /* end if */
break;
@@ -1270,7 +1275,7 @@ H5O__layout_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst,
&layout_dst->storage.u.chunk, udata->src_space_extent, udata->src_dtype,
udata->common.src_pline, cpy_info) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy chunked storage");
- copied = TRUE;
+ copied = true;
} /* end if */
break;
diff --git a/src/H5Olinfo.c b/src/H5Olinfo.c
index 507f39c79fc..9d26483b17e 100644
--- a/src/H5Olinfo.c
+++ b/src/H5Olinfo.c
@@ -33,13 +33,13 @@
/* PRIVATE PROTOTYPES */
static void *H5O__linfo_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags,
size_t p_size, const uint8_t *p);
-static herr_t H5O__linfo_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
+static herr_t H5O__linfo_encode(H5F_t *f, bool disable_shared, uint8_t *p, const void *_mesg);
static void *H5O__linfo_copy(const void *_mesg, void *_dest);
-static size_t H5O__linfo_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
+static size_t H5O__linfo_size(const H5F_t *f, bool disable_shared, const void *_mesg);
static herr_t H5O__linfo_free(void *_mesg);
static herr_t H5O__linfo_delete(H5F_t *f, H5O_t *open_oh, void *_mesg);
-static void *H5O__linfo_copy_file(H5F_t *file_src, void *native_src, H5F_t *file_dst, hbool_t *recompute_size,
- unsigned *mesg_flags, H5O_copy_t *cpy_info, void *udata);
+static void *H5O__linfo_copy_file(H5F_t *file_src, void *native_src, H5F_t *file_dst, bool *recompute_size,
+ unsigned *mesg_flags, H5O_copy_t *cpy_info, void *udata);
static herr_t H5O__linfo_post_copy_file(const H5O_loc_t *parent_src_oloc, const void *mesg_src,
H5O_loc_t *dst_oloc, void *mesg_dst, unsigned *mesg_flags,
H5O_copy_t *cpy_info);
@@ -128,8 +128,8 @@ H5O__linfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUS
index_flags = *p++;
if (index_flags & ~H5O_LINFO_ALL_FLAGS)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad flag value for message");
- linfo->track_corder = (index_flags & H5O_LINFO_TRACK_CORDER) ? TRUE : FALSE;
- linfo->index_corder = (index_flags & H5O_LINFO_INDEX_CORDER) ? TRUE : FALSE;
+ linfo->track_corder = (index_flags & H5O_LINFO_TRACK_CORDER) ? true : false;
+ linfo->index_corder = (index_flags & H5O_LINFO_INDEX_CORDER) ? true : false;
/* Set the number of links in the group to an invalid value, so we query it later */
linfo->nlinks = HSIZET_MAX;
@@ -183,7 +183,7 @@ H5O__linfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUS
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__linfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
+H5O__linfo_encode(H5F_t *f, bool H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
const H5O_linfo_t *linfo = (const H5O_linfo_t *)_mesg;
unsigned char index_flags; /* Flags for encoding link index info */
@@ -270,7 +270,7 @@ H5O__linfo_copy(const void *_mesg, void *_dest)
*-------------------------------------------------------------------------
*/
static size_t
-H5O__linfo_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void *_mesg)
+H5O__linfo_size(const H5F_t *f, bool H5_ATTR_UNUSED disable_shared, const void *_mesg)
{
const H5O_linfo_t *linfo = (const H5O_linfo_t *)_mesg;
size_t ret_value = 0; /* Return value */
@@ -334,7 +334,7 @@ H5O__linfo_delete(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, void *_mesg)
/* If the group is using "dense" link storage, delete it */
if (H5_addr_defined(linfo->fheap_addr))
- if (H5G__dense_delete(f, linfo, TRUE) < 0)
+ if (H5G__dense_delete(f, linfo, true) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free dense link storage");
done:
@@ -354,7 +354,7 @@ H5O__linfo_delete(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, void *_mesg)
*/
static void *
H5O__linfo_copy_file(H5F_t H5_ATTR_UNUSED *file_src, void *native_src, H5F_t *file_dst,
- hbool_t H5_ATTR_UNUSED *recompute_size, unsigned H5_ATTR_UNUSED *mesg_flags,
+ bool H5_ATTR_UNUSED *recompute_size, unsigned H5_ATTR_UNUSED *mesg_flags,
H5O_copy_t *cpy_info, void *_udata)
{
H5O_linfo_t *linfo_src = (H5O_linfo_t *)native_src;
@@ -422,7 +422,7 @@ H5O__linfo_post_copy_file_cb(const H5O_link_t *src_lnk, void *_udata)
{
H5O_linfo_postcopy_ud_t *udata = (H5O_linfo_postcopy_ud_t *)_udata; /* 'User data' passed in */
H5O_link_t dst_lnk; /* Destination link to insert */
- hbool_t dst_lnk_init = FALSE; /* Whether the destination link is initialized */
+ bool dst_lnk_init = false; /* Whether the destination link is initialized */
herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_PACKAGE
@@ -434,7 +434,7 @@ H5O__linfo_post_copy_file_cb(const H5O_link_t *src_lnk, void *_udata)
/* Copy the link (and the object it points to) */
if (H5L__link_copy_file(udata->dst_oloc->file, src_lnk, udata->src_oloc, &dst_lnk, udata->cpy_info) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, H5_ITER_ERROR, "unable to copy link");
- dst_lnk_init = TRUE;
+ dst_lnk_init = true;
/* Set metadata tag in API context */
H5_BEGIN_TAG(H5AC__COPIED_TAG)
diff --git a/src/H5Olink.c b/src/H5Olink.c
index 88611ec08fc..9d4d6853b0e 100644
--- a/src/H5Olink.c
+++ b/src/H5Olink.c
@@ -35,14 +35,14 @@
/* PRIVATE PROTOTYPES */
static void *H5O__link_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags, size_t p_size,
const uint8_t *p);
-static herr_t H5O__link_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
+static herr_t H5O__link_encode(H5F_t *f, bool disable_shared, uint8_t *p, const void *_mesg);
static void *H5O__link_copy(const void *_mesg, void *_dest);
-static size_t H5O__link_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
+static size_t H5O__link_size(const H5F_t *f, bool disable_shared, const void *_mesg);
static herr_t H5O__link_reset(void *_mesg);
static herr_t H5O__link_free(void *_mesg);
-static herr_t H5O__link_pre_copy_file(H5F_t *file_src, const void *mesg_src, hbool_t *deleted,
+static herr_t H5O__link_pre_copy_file(H5F_t *file_src, const void *mesg_src, bool *deleted,
const H5O_copy_t *cpy_info, void *udata);
-static void *H5O__link_copy_file(H5F_t *file_src, void *native_src, H5F_t *file_dst, hbool_t *recompute_size,
+static void *H5O__link_copy_file(H5F_t *file_src, void *native_src, H5F_t *file_dst, bool *recompute_size,
unsigned *mesg_flags, H5O_copy_t *cpy_info, void *udata);
static herr_t H5O__link_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src, H5O_loc_t *dst_oloc,
void *mesg_dst, unsigned *mesg_flags, H5O_copy_t *cpy_info);
@@ -150,11 +150,11 @@ H5O__link_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSE
if (H5_IS_BUFFER_OVERFLOW(p, 8, p_end))
HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding");
INT64DECODE(p, lnk->corder);
- lnk->corder_valid = TRUE;
+ lnk->corder_valid = true;
}
else {
lnk->corder = 0;
- lnk->corder_valid = FALSE;
+ lnk->corder_valid = false;
}
/* Check for non-default name character set */
@@ -289,7 +289,7 @@ H5O__link_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSE
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__link_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
+H5O__link_encode(H5F_t *f, bool H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
const H5O_link_t *lnk = (const H5O_link_t *)_mesg;
uint64_t len; /* Length of a string in the message */
@@ -303,7 +303,7 @@ H5O__link_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
assert(lnk);
/* Get length of link's name */
- len = (uint64_t)HDstrlen(lnk->name);
+ len = (uint64_t)strlen(lnk->name);
assert(len > 0);
/* encode */
@@ -370,7 +370,7 @@ H5O__link_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
case H5L_TYPE_SOFT:
/* Store the link value */
- len = (uint16_t)HDstrlen(lnk->u.soft.name);
+ len = (uint16_t)strlen(lnk->u.soft.name);
assert(len > 0);
UINT16ENCODE(p, len);
H5MM_memcpy(p, lnk->u.soft.name, (size_t)len);
@@ -473,7 +473,7 @@ H5O__link_copy(const void *_mesg, void *_dest)
*-------------------------------------------------------------------------
*/
static size_t
-H5O__link_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void *_mesg)
+H5O__link_size(const H5F_t *f, bool H5_ATTR_UNUSED disable_shared, const void *_mesg)
{
const H5O_link_t *lnk = (const H5O_link_t *)_mesg;
uint64_t name_len; /* Length of name */
@@ -486,7 +486,7 @@ H5O__link_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void
HDcompile_assert(sizeof(uint64_t) >= sizeof(size_t));
/* Get name's length */
- name_len = (uint64_t)HDstrlen(lnk->name);
+ name_len = (uint64_t)strlen(lnk->name);
/* Determine correct value for name size bits */
if (name_len > 4294967295)
@@ -514,8 +514,8 @@ H5O__link_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void
break;
case H5L_TYPE_SOFT:
- ret_value += 2 + /* Link value length */
- HDstrlen(lnk->u.soft.name); /* Link value */
+ ret_value += 2 + /* Link value length */
+ strlen(lnk->u.soft.name); /* Link value */
break;
case H5L_TYPE_ERROR:
@@ -663,8 +663,8 @@ H5O_link_delete(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, void *_mesg)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__link_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUSED *native_src,
- hbool_t *deleted, const H5O_copy_t *cpy_info, void H5_ATTR_UNUSED *udata)
+H5O__link_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUSED *native_src, bool *deleted,
+ const H5O_copy_t *cpy_info, void H5_ATTR_UNUSED *udata)
{
FUNC_ENTER_PACKAGE_NOERR
@@ -678,7 +678,7 @@ H5O__link_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUSE
* on it.
*/
if (cpy_info->max_depth >= 0 && cpy_info->curr_depth >= cpy_info->max_depth)
- *deleted = TRUE;
+ *deleted = true;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__link_pre_copy_file() */
@@ -696,7 +696,7 @@ H5O__link_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUSE
*/
static void *
H5O__link_copy_file(H5F_t H5_ATTR_UNUSED *file_src, void *native_src, H5F_t H5_ATTR_UNUSED *file_dst,
- hbool_t H5_ATTR_UNUSED *recompute_size, unsigned H5_ATTR_UNUSED *mesg_flags,
+ bool H5_ATTR_UNUSED *recompute_size, unsigned H5_ATTR_UNUSED *mesg_flags,
H5O_copy_t H5_ATTR_UNUSED *cpy_info, void H5_ATTR_UNUSED *udata)
{
H5O_link_t *link_src = (H5O_link_t *)native_src;
@@ -816,7 +816,7 @@ H5O__link_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int in
if (lnk->type >= H5L_TYPE_UD_MIN) {
if (lnk->type == H5L_TYPE_EXTERNAL) {
const char *objname =
- (const char *)lnk->u.ud.udata + (HDstrlen((const char *)lnk->u.ud.udata) + 1);
+ (const char *)lnk->u.ud.udata + (strlen((const char *)lnk->u.ud.udata) + 1);
fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
"External File Name:", (const char *)lnk->u.ud.udata);
diff --git a/src/H5Omessage.c b/src/H5Omessage.c
index e492ceb3467..f6cafdc89ab 100644
--- a/src/H5Omessage.c
+++ b/src/H5Omessage.c
@@ -52,7 +52,7 @@ typedef struct {
unsigned nfailed; /* # of failed message removals */
H5O_operator_t op; /* Callback routine for removal operations */
void *op_data; /* Callback data for removal operations */
- hbool_t adj_link; /* Whether to adjust links when removing messages */
+ bool adj_link; /* Whether to adjust links when removing messages */
} H5O_iter_rm_t;
/********************/
@@ -375,7 +375,7 @@ H5O__msg_write_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, unsigned m
if ((status = H5SM_try_share(f, ((mesg_flags & H5O_MSG_FLAG_SHARED) ? NULL : oh), 0,
idx_msg->type->id, mesg, &mesg_flags)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL, "error while trying to share message");
- if (status == FALSE && (mesg_flags & H5O_MSG_FLAG_SHARED))
+ if (status == false && (mesg_flags & H5O_MSG_FLAG_SHARED))
HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL, "message changed sharing status");
} /* end if */
@@ -424,7 +424,7 @@ H5O_msg_read(const H5O_loc_t *loc, unsigned type_id, void *mesg)
assert(type_id < NELMTS(H5O_msg_class_g));
/* Get the object header */
- if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
+ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, false)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to protect object header");
/* Call the "real" read routine */
@@ -711,7 +711,7 @@ H5O_msg_count(const H5O_loc_t *loc, unsigned type_id)
assert(type);
/* Load the object header */
- if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
+ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, false)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header");
/* Count the messages of the correct type */
@@ -763,7 +763,7 @@ H5O__msg_count_real(const H5O_t *oh, const H5O_msg_class_t *type)
* Purpose: Determines if a particular message exists in an object
* header without trying to decode the message.
*
- * Return: Success: FALSE if the message does not exist; TRUE if
+ * Return: Success: false if the message does not exist; true if
* th message exists.
*
* Failure: FAIL if the existence of the message could
@@ -785,7 +785,7 @@ H5O_msg_exists(const H5O_loc_t *loc, unsigned type_id)
assert(type_id < NELMTS(H5O_msg_class_g));
/* Load the object header */
- if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
+ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, false)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header");
/* Call the "real" exists routine */
@@ -805,7 +805,7 @@ H5O_msg_exists(const H5O_loc_t *loc, unsigned type_id)
* Purpose: Determines if a particular message exists in an object
* header without trying to decode the message.
*
- * Return: Success: FALSE if the message does not exist; TRUE if
+ * Return: Success: false if the message does not exist; true if
* th message exists.
*
* Failure: FAIL if the existence of the message could
@@ -819,7 +819,7 @@ H5O_msg_exists_oh(const H5O_t *oh, unsigned type_id)
{
const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
unsigned u; /* Local index variable */
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -831,7 +831,7 @@ H5O_msg_exists_oh(const H5O_t *oh, unsigned type_id)
/* Scan through the messages looking for the right one */
for (u = 0; u < oh->nmesgs; u++)
if (type == oh->mesg[u].type)
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -854,7 +854,7 @@ H5O_msg_exists_oh(const H5O_t *oh, unsigned type_id)
*-------------------------------------------------------------------------
*/
herr_t
-H5O_msg_remove(const H5O_loc_t *loc, unsigned type_id, int sequence, hbool_t adj_link)
+H5O_msg_remove(const H5O_loc_t *loc, unsigned type_id, int sequence, bool adj_link)
{
H5O_t *oh = NULL; /* Pointer to actual object header */
const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
@@ -901,7 +901,7 @@ H5O_msg_remove(const H5O_loc_t *loc, unsigned type_id, int sequence, hbool_t adj
*/
herr_t
H5O_msg_remove_op(const H5O_loc_t *loc, unsigned type_id, int sequence, H5O_operator_t op, void *op_data,
- hbool_t adj_link)
+ bool adj_link)
{
H5O_t *oh = NULL; /* Pointer to actual object header */
const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
@@ -949,7 +949,7 @@ H5O__msg_remove_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned sequence, un
void *_udata /*in,out*/)
{
H5O_iter_rm_t *udata = (H5O_iter_rm_t *)_udata; /* Operator user data */
- htri_t try_remove = FALSE; /* Whether to try removing a message */
+ htri_t try_remove = false; /* Whether to try removing a message */
herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_PACKAGE
@@ -967,7 +967,7 @@ H5O__msg_remove_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned sequence, un
else {
/* If there's no callback routine, does the sequence # match? */
if ((int)sequence == udata->sequence || H5O_ALL == udata->sequence)
- try_remove = TRUE;
+ try_remove = true;
} /* end else */
/* Try removing the message, if indicated */
@@ -1008,7 +1008,7 @@ H5O__msg_remove_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned sequence, un
*/
herr_t
H5O__msg_remove_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, int sequence, H5O_operator_t app_op,
- void *op_data, hbool_t adj_link)
+ void *op_data, bool adj_link)
{
H5O_iter_rm_t udata; /* User data for iterator */
H5O_mesg_operator_t op; /* Wrapper for operator */
@@ -1093,7 +1093,7 @@ H5O_msg_iterate(const H5O_loc_t *loc, unsigned type_id, const H5O_mesg_operator_
assert(op);
/* Protect the object header to iterate over */
- if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
+ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, false)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header");
/* Call the "real" iterate routine */
@@ -1191,7 +1191,7 @@ H5O__msg_iterate_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, const H5
HDONE_ERROR(H5E_OHDR, H5E_CANTPACK, FAIL, "can't pack object header");
/* Mark object header as changed */
- if (H5O_touch_oh(f, oh, FALSE) < 0)
+ if (H5O_touch_oh(f, oh, false) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUPDATE, FAIL, "unable to update time on object");
/* Mark object header as dirty in cache */
@@ -1213,7 +1213,7 @@ H5O__msg_iterate_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, const H5
*-------------------------------------------------------------------------
*/
size_t
-H5O_msg_raw_size(const H5F_t *f, unsigned type_id, hbool_t disable_shared, const void *mesg)
+H5O_msg_raw_size(const H5F_t *f, unsigned type_id, bool disable_shared, const void *mesg)
{
const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
size_t ret_value = 0; /* Return value */
@@ -1276,7 +1276,7 @@ H5O_msg_size_f(const H5F_t *f, hid_t ocpl_id, unsigned type_id, const void *mesg
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, 0, "can't get object header flags");
/* Compute the raw data size for the mesg */
- if ((ret_value = (type->raw_size)(f, FALSE, mesg)) == 0)
+ if ((ret_value = (type->raw_size)(f, false, mesg)) == 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOUNT, 0, "unable to determine size of message");
/* Add in "extra" raw space */
@@ -1323,7 +1323,7 @@ H5O_msg_size_oh(const H5F_t *f, const H5O_t *oh, unsigned type_id, const void *m
assert(mesg);
/* Compute the raw data size for the mesg */
- if ((ret_value = (type->raw_size)(f, FALSE, mesg)) == 0)
+ if ((ret_value = (type->raw_size)(f, false, mesg)) == 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOUNT, 0, "unable to determine size of message");
/* Add in "extra" raw space */
@@ -1343,13 +1343,13 @@ H5O_msg_size_oh(const H5F_t *f, const H5O_t *oh, unsigned type_id, const void *m
* Function: H5O_msg_can_share
*
* Purpose: Call the 'can share' method for a
- * particular class of object header. This returns TRUE
+ * particular class of object header. This returns true
* if the message is allowed to be put in the shared message
* heap and false otherwise (e.g., for committed or immutable
* datatypes).
*
- * Return: Object can be shared: TRUE
- * Object cannot be shared: FALSE
+ * Return: Object can be shared: true
+ * Object cannot be shared: false
*
*-------------------------------------------------------------------------
*/
@@ -1375,12 +1375,12 @@ H5O_msg_can_share(unsigned type_id, const void *mesg)
* shareable in general; i.e., if they have the "is_sharable" flag
* in the "share_flags" class member set.
*/
- ret_value = (type->share_flags & H5O_SHARE_IS_SHARABLE) ? TRUE : FALSE;
+ ret_value = (type->share_flags & H5O_SHARE_IS_SHARABLE) ? true : false;
} /* end else */
/* If the message is shareable, both copy_file and post_copy_file must be
* defined */
- assert((type->post_copy_file && type->copy_file) || ret_value == FALSE);
+ assert((type->post_copy_file && type->copy_file) || ret_value == false);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_can_share() */
@@ -1391,8 +1391,8 @@ H5O_msg_can_share(unsigned type_id, const void *mesg)
* Purpose: Check if the message class allows its messages to be shared
* in the object's header.
*
- * Return: Object can be shared: TRUE
- * Object cannot be shared: FALSE
+ * Return: Object can be shared: true
+ * Object cannot be shared: false
*
*-------------------------------------------------------------------------
*/
@@ -1413,7 +1413,7 @@ H5O_msg_can_share_in_ohdr(unsigned type_id)
* shareable in general; i.e., if they have the "is_sharable" flag
* in the "share_flags" class member set.
*/
- ret_value = (type->share_flags & H5O_SHARE_IN_OHDR) ? TRUE : FALSE;
+ ret_value = (type->share_flags & H5O_SHARE_IN_OHDR) ? true : false;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_can_share_in_ohdr() */
@@ -1424,8 +1424,8 @@ H5O_msg_can_share_in_ohdr(unsigned type_id)
* Purpose: Call the 'is_shared' method for a
* particular class of object header.
*
- * Return: Object is shared: TRUE
- * Object is not shared: FALSE
+ * Return: Object is shared: true
+ * Object is not shared: false
*
*-------------------------------------------------------------------------
*/
@@ -1440,7 +1440,7 @@ H5O_msg_is_shared(unsigned type_id, const void *mesg)
/* Check args */
#ifdef H5O_ENABLE_BOGUS
if (type_id >= NELMTS(H5O_msg_class_g))
- ret_value = FALSE;
+ ret_value = false;
else
#endif /* H5O_ENABLE_BOGUS */
{
@@ -1453,7 +1453,7 @@ H5O_msg_is_shared(unsigned type_id, const void *mesg)
if (type->share_flags & H5O_SHARE_IS_SHARABLE)
ret_value = H5O_IS_STORED_SHARED(((const H5O_shared_t *)mesg)->type);
else
- ret_value = FALSE;
+ ret_value = false;
} /* end block/else */
FUNC_LEAVE_NOAPI(ret_value)
@@ -1583,7 +1583,7 @@ H5O_msg_get_crt_index(unsigned type_id, const void *mesg, H5O_msg_crt_idx_t *crt
*-------------------------------------------------------------------------
*/
herr_t
-H5O_msg_encode(H5F_t *f, unsigned type_id, hbool_t disable_shared, unsigned char *buf, const void *mesg)
+H5O_msg_encode(H5F_t *f, unsigned type_id, bool disable_shared, unsigned char *buf, const void *mesg)
{
const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
herr_t ret_value = SUCCEED; /* Return value */
@@ -1646,7 +1646,7 @@ H5O_msg_decode(H5F_t *f, H5O_t *open_oh, unsigned type_id, size_t buf_size, cons
* pointer is returned with no error.
*
* Attempts to share the message in the destination and sets
- * SHARED to TRUE or FALSE depending on whether this succeeds.
+ * SHARED to true or false depending on whether this succeeds.
*
* Return: Success: Ptr to the new message
*
@@ -1656,7 +1656,7 @@ H5O_msg_decode(H5F_t *f, H5O_t *open_oh, unsigned type_id, size_t buf_size, cons
*/
void *
H5O__msg_copy_file(const H5O_msg_class_t *type, H5F_t *file_src, void *native_src, H5F_t *file_dst,
- hbool_t *recompute_size, unsigned *mesg_flags, H5O_copy_t *cpy_info, void *udata)
+ bool *recompute_size, unsigned *mesg_flags, H5O_copy_t *cpy_info, void *udata)
{
void *ret_value = NULL; /* Return value */
@@ -1760,7 +1760,7 @@ H5O__copy_mesg(H5F_t *f, H5O_t *oh, size_t idx, const H5O_msg_class_t *type, con
{
H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk that message is in */
H5O_mesg_t *idx_msg = &oh->mesg[idx]; /* Pointer to message to modify */
- hbool_t chk_dirtied = FALSE; /* Flag for unprotecting chunk */
+ bool chk_dirtied = false; /* Flag for unprotecting chunk */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1787,8 +1787,8 @@ H5O__copy_mesg(H5F_t *f, H5O_t *oh, size_t idx, const H5O_msg_class_t *type, con
idx_msg->flags = (uint8_t)mesg_flags;
/* Mark the message as modified */
- idx_msg->dirty = TRUE;
- chk_dirtied = TRUE;
+ idx_msg->dirty = true;
+ chk_dirtied = true;
/* Release chunk */
if (H5O__chunk_unprotect(f, chk_proxy, chk_dirtied) < 0)
@@ -1797,7 +1797,7 @@ H5O__copy_mesg(H5F_t *f, H5O_t *oh, size_t idx, const H5O_msg_class_t *type, con
/* Update the modification time, if requested */
if (update_flags & H5O_UPDATE_TIME)
- if (H5O_touch_oh(f, oh, FALSE) < 0)
+ if (H5O_touch_oh(f, oh, false) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTUPDATE, FAIL, "unable to update time on object");
done:
@@ -1966,18 +1966,18 @@ H5O_msg_flush(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg)
{
size_t msg_size;
- msg_size = mesg->type->raw_size(f, FALSE, mesg->native);
+ msg_size = mesg->type->raw_size(f, false, mesg->native);
msg_size = H5O_ALIGN_OH(oh, msg_size);
assert(msg_size <= mesg->raw_size);
}
#endif /* NDEBUG */
assert(mesg->type->encode);
- if ((mesg->type->encode)(f, FALSE, mesg->raw, mesg->native) < 0)
+ if ((mesg->type->encode)(f, false, mesg->raw, mesg->native) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to encode object header message");
} /* end if */
/* Mark the message as clean now */
- mesg->dirty = FALSE;
+ mesg->dirty = false;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -2054,7 +2054,7 @@ H5O_msg_get_flags(const H5O_loc_t *loc, unsigned type_id, uint8_t *flags)
assert(type);
/* Get the object header */
- if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
+ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, false)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header");
/* Locate message of correct type */
diff --git a/src/H5Omtime.c b/src/H5Omtime.c
index 1474c669683..9cf9400f903 100644
--- a/src/H5Omtime.c
+++ b/src/H5Omtime.c
@@ -24,14 +24,14 @@
static void *H5O__mtime_new_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags,
size_t p_size, const uint8_t *p);
-static herr_t H5O__mtime_new_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
-static size_t H5O__mtime_new_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
+static herr_t H5O__mtime_new_encode(H5F_t *f, bool disable_shared, uint8_t *p, const void *_mesg);
+static size_t H5O__mtime_new_size(const H5F_t *f, bool disable_shared, const void *_mesg);
static void *H5O__mtime_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags,
size_t p_size, const uint8_t *p);
-static herr_t H5O__mtime_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
+static herr_t H5O__mtime_encode(H5F_t *f, bool disable_shared, uint8_t *p, const void *_mesg);
static void *H5O__mtime_copy(const void *_mesg, void *_dest);
-static size_t H5O__mtime_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
+static size_t H5O__mtime_size(const H5F_t *f, bool disable_shared, const void *_mesg);
static herr_t H5O__mtime_free(void *_mesg);
static herr_t H5O__mtime_debug(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwidth);
@@ -221,7 +221,7 @@ H5O__mtime_decode(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__mtime_new_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
+H5O__mtime_new_encode(H5F_t H5_ATTR_UNUSED *f, bool H5_ATTR_UNUSED disable_shared, uint8_t *p,
const void *_mesg)
{
const time_t *mesg = (const time_t *)_mesg;
@@ -257,8 +257,7 @@ H5O__mtime_new_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_sh
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__mtime_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
- const void *_mesg)
+H5O__mtime_encode(H5F_t H5_ATTR_UNUSED *f, bool H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
const time_t *mesg = (const time_t *)_mesg;
struct tm *tm;
@@ -272,8 +271,8 @@ H5O__mtime_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared
/* encode */
tm = HDgmtime(mesg);
- HDsprintf((char *)p, "%04d%02d%02d%02d%02d%02d", 1900 + tm->tm_year, 1 + tm->tm_mon, tm->tm_mday,
- tm->tm_hour, tm->tm_min, tm->tm_sec);
+ 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);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__mtime_encode() */
@@ -329,7 +328,7 @@ H5O__mtime_copy(const void *_mesg, void *_dest)
*-------------------------------------------------------------------------
*/
static size_t
-H5O__mtime_new_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
+H5O__mtime_new_size(const H5F_t H5_ATTR_UNUSED *f, bool H5_ATTR_UNUSED disable_shared,
const void H5_ATTR_UNUSED *mesg)
{
FUNC_ENTER_PACKAGE_NOERR
@@ -356,7 +355,7 @@ H5O__mtime_new_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disabl
*-------------------------------------------------------------------------
*/
static size_t
-H5O__mtime_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
+H5O__mtime_size(const H5F_t H5_ATTR_UNUSED *f, bool H5_ATTR_UNUSED disable_shared,
const void H5_ATTR_UNUSED *mesg)
{
FUNC_ENTER_PACKAGE_NOERR
@@ -417,7 +416,7 @@ H5O__mtime_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int i
/* debug */
tm = HDlocaltime(mesg);
- HDstrftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm);
+ strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm);
fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Time:", buf);
FUNC_LEAVE_NOAPI(SUCCEED)
diff --git a/src/H5Oname.c b/src/H5Oname.c
index 727b603fc77..d60013717b7 100644
--- a/src/H5Oname.c
+++ b/src/H5Oname.c
@@ -29,9 +29,9 @@
/* PRIVATE PROTOTYPES */
static void *H5O__name_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags, size_t p_size,
const uint8_t *p);
-static herr_t H5O__name_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
+static herr_t H5O__name_encode(H5F_t *f, bool disable_shared, uint8_t *p, const void *_mesg);
static void *H5O__name_copy(const void *_mesg, void *_dest);
-static size_t H5O__name_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
+static size_t H5O__name_size(const H5F_t *f, bool disable_shared, const void *_mesg);
static herr_t H5O__name_reset(void *_mesg);
static herr_t H5O__name_debug(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwidth);
@@ -110,8 +110,7 @@ H5O__name_decode(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__name_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
- const void *_mesg)
+H5O__name_encode(H5F_t H5_ATTR_UNUSED *f, bool H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
const H5O_name_t *mesg = (const H5O_name_t *)_mesg;
@@ -123,7 +122,7 @@ H5O__name_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
assert(mesg && mesg->s);
/* encode */
- HDstrcpy((char *)p, mesg->s);
+ strcpy((char *)p, mesg->s);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__name_encode() */
@@ -186,7 +185,7 @@ H5O__name_copy(const void *_mesg, void *_dest)
*-------------------------------------------------------------------------
*/
static size_t
-H5O__name_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, const void *_mesg)
+H5O__name_size(const H5F_t H5_ATTR_UNUSED *f, bool H5_ATTR_UNUSED disable_shared, const void *_mesg)
{
const H5O_name_t *mesg = (const H5O_name_t *)_mesg;
size_t ret_value = 0; /* Return value */
@@ -197,7 +196,7 @@ H5O__name_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_sha
assert(f);
assert(mesg);
- ret_value = mesg->s ? HDstrlen(mesg->s) + 1 : 0;
+ ret_value = mesg->s ? strlen(mesg->s) + 1 : 0;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__name_size() */
diff --git a/src/H5Opkg.h b/src/H5Opkg.h
index ee7104e30ea..feca86f7d0e 100644
--- a/src/H5Opkg.h
+++ b/src/H5Opkg.h
@@ -173,7 +173,7 @@
\
/* Mark the message dirty if it was changed by decoding */ \
if ((ioflags & H5O_DECODEIO_DIRTY) && (H5F_get_intent((F)) & H5F_ACC_RDWR)) { \
- (MSG)->dirty = TRUE; \
+ (MSG)->dirty = true; \
/* Increment the count of messages dirtied by decoding, but */ \
/* only ifndef NDEBUG */ \
INCR_NDECODE_DIRTIED(OH) \
@@ -211,18 +211,18 @@ struct H5O_msg_class_t {
size_t native_size; /*size of native message */
unsigned share_flags; /* Message sharing settings */
void *(*decode)(H5F_t *, H5O_t *, unsigned, unsigned *, size_t, const uint8_t *);
- herr_t (*encode)(H5F_t *, hbool_t, uint8_t *, const void *);
- void *(*copy)(const void *, void *); /*copy native value */
- size_t (*raw_size)(const H5F_t *, hbool_t, const void *); /*sizeof encoded message */
- herr_t (*reset)(void *); /*free nested data structs */
- herr_t (*free)(void *); /*free main data struct */
+ herr_t (*encode)(H5F_t *, bool, uint8_t *, const void *);
+ void *(*copy)(const void *, void *); /*copy native value */
+ size_t (*raw_size)(const H5F_t *, bool, const void *); /*sizeof encoded message */
+ herr_t (*reset)(void *); /*free nested data structs */
+ herr_t (*free)(void *); /*free main data struct */
herr_t (*del)(H5F_t *, H5O_t *, void *); /* Delete space in file referenced by this message */
herr_t (*link)(H5F_t *, H5O_t *, void *); /* Increment any links in file reference by this message */
herr_t (*set_share)(void *, const H5O_shared_t *); /* Set shared information */
htri_t (*can_share)(const void *); /* Is message allowed to be shared? */
- herr_t (*pre_copy_file)(H5F_t *, const void *, hbool_t *, const H5O_copy_t *,
+ herr_t (*pre_copy_file)(H5F_t *, const void *, bool *, const H5O_copy_t *,
void *); /*"pre copy" action when copying native value to file */
- void *(*copy_file)(H5F_t *, void *, H5F_t *, hbool_t *, unsigned *, H5O_copy_t *,
+ void *(*copy_file)(H5F_t *, void *, H5F_t *, bool *, unsigned *, H5O_copy_t *,
void *); /*copy native value to file */
herr_t (*post_copy_file)(const H5O_loc_t *, const void *, H5O_loc_t *, void *, unsigned *,
H5O_copy_t *); /*"post copy" action when copying native value to file */
@@ -233,7 +233,7 @@ struct H5O_msg_class_t {
struct H5O_mesg_t {
const H5O_msg_class_t *type; /* type of message */
- hbool_t dirty; /* raw out of date wrt native */
+ bool dirty; /* raw out of date wrt native */
uint8_t flags; /* message flags */
H5O_msg_crt_idx_t crt_idx; /* message creation index */
unsigned chunkno; /* chunk number for this mesg */
@@ -266,17 +266,17 @@ struct H5O_t {
/* first field in structure */
/* File-specific information (not stored) */
- size_t sizeof_size; /* Size of file sizes */
- size_t sizeof_addr; /* Size of file addresses */
- hbool_t swmr_write; /* Whether we are doing SWMR writes */
+ size_t sizeof_size; /* Size of file sizes */
+ size_t sizeof_addr; /* Size of file addresses */
+ bool swmr_write; /* Whether we are doing SWMR writes */
/* Debugging information (not stored) */
#ifdef H5O_ENABLE_BAD_MESG_COUNT
- hbool_t store_bad_mesg_count; /* Flag to indicate that a bad message count should be stored */
- /* (This is to simulate a bug in earlier
- * versions of the library)
- */
-#endif /* H5O_ENABLE_BAD_MESG_COUNT */
+ bool store_bad_mesg_count; /* Flag to indicate that a bad message count should be stored */
+ /* (This is to simulate a bug in earlier
+ * versions of the library)
+ */
+#endif /* H5O_ENABLE_BAD_MESG_COUNT */
#ifndef NDEBUG
size_t ndecode_dirtied; /* Number of messages dirtied by decoding */
#endif /* NDEBUG */
@@ -285,7 +285,7 @@ struct H5O_t {
size_t rc; /* Reference count of [continuation] chunks using this structure */
/* Object information (stored) */
- hbool_t has_refcount_msg; /* Whether the object has a ref. count message */
+ bool has_refcount_msg; /* Whether the object has a ref. count message */
unsigned nlink; /*link count */
uint8_t version; /*version number */
uint8_t flags; /*flags */
@@ -311,7 +311,7 @@ struct H5O_t {
size_t nchunks; /*number of chunks */
size_t alloc_nchunks; /*chunks allocated */
H5O_chunk_t *chunk; /*array of chunks */
- hbool_t chunks_pinned; /* Whether chunks are pinned from ohdr protect */
+ bool chunks_pinned; /* Whether chunks are pinned from ohdr protect */
/* Object header proxy information (not stored) */
H5AC_proxy_entry_t *proxy; /* Proxy cache entry for all ohdr entries */
@@ -336,7 +336,7 @@ typedef struct H5O_obj_class_t {
typedef struct H5O_addr_map_t {
H5_obj_t src_obj_pos; /* Location of source object */
haddr_t dst_addr; /* Address of object in destination file */
- hbool_t is_locked; /* Indicate that the destination object is locked currently */
+ bool is_locked; /* Indicate that the destination object is locked currently */
hsize_t inc_ref_count; /* Number of deferred increments to reference count */
const H5O_obj_class_t *obj_class; /* Object class */
void *udata; /* Object class copy file udata */
@@ -360,11 +360,11 @@ typedef struct H5O_common_cache_ud_t {
/* Callback information for loading object header prefix from disk */
typedef struct H5O_cache_ud_t {
- hbool_t made_attempt; /* Whether the deserialize routine was already attempted */
+ bool made_attempt; /* Whether the deserialize routine was already attempted */
unsigned v1_pfx_nmesgs; /* Number of messages from v1 prefix header */
size_t chunk0_size; /* Size of serialized first chunk */
H5O_t *oh; /* Partially deserialized object header, for later use */
- hbool_t free_oh; /* Whether to free the object header or not */
+ bool free_oh; /* Whether to free the object header or not */
H5O_common_cache_ud_t common; /* Common object header cache callback info */
} H5O_cache_ud_t;
@@ -393,7 +393,7 @@ typedef struct H5O_chunk_proxy_t {
/* Callback information for loading object header chunk from disk */
typedef struct H5O_chk_cache_ud_t {
- hbool_t decoding; /* Whether the object header is being decoded */
+ bool decoding; /* Whether the object header is being decoded */
H5O_t *oh; /* Object header for this chunk */
unsigned chunkno; /* Index of chunk being brought in (for re-loads) */
size_t size; /* Size of chunk in the file */
@@ -545,12 +545,12 @@ H5_DLL void *H5O__open_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t
H5_DLL const H5O_obj_class_t *H5O__obj_class(const H5O_loc_t *loc);
H5_DLL herr_t H5O__copy(const H5G_loc_t *src_loc, const char *src_name, H5G_loc_t *dst_loc,
const char *dst_name, hid_t ocpypl_id, hid_t lcpl_id);
-H5_DLL int H5O__link_oh(H5F_t *f, int adjust, H5O_t *oh, hbool_t *deleted);
+H5_DLL int H5O__link_oh(H5F_t *f, int adjust, H5O_t *oh, bool *deleted);
H5_DLL herr_t H5O__visit(H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order,
H5O_iterate2_t op, void *op_data, unsigned fields);
H5_DLL herr_t H5O__inc_rc(H5O_t *oh);
H5_DLL herr_t H5O__dec_rc(H5O_t *oh);
-H5_DLL herr_t H5O__free(H5O_t *oh, hbool_t force);
+H5_DLL herr_t H5O__free(H5O_t *oh, bool force);
/* Object header message routines */
H5_DLL herr_t H5O__msg_alloc(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, unsigned *mesg_flags,
@@ -562,9 +562,9 @@ H5_DLL herr_t H5O__msg_write_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *
H5_DLL herr_t H5O__msg_free_mesg(H5O_mesg_t *mesg);
H5_DLL unsigned H5O__msg_count_real(const H5O_t *oh, const H5O_msg_class_t *type);
H5_DLL herr_t H5O__msg_remove_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, int sequence,
- H5O_operator_t op, void *op_data, hbool_t adj_link);
+ H5O_operator_t op, void *op_data, bool adj_link);
H5_DLL void *H5O__msg_copy_file(const H5O_msg_class_t *type, H5F_t *file_src, void *mesg_src, H5F_t *file_dst,
- hbool_t *recompute_size, unsigned *mesg_flags, H5O_copy_t *cpy_info,
+ bool *recompute_size, unsigned *mesg_flags, H5O_copy_t *cpy_info,
void *udata);
H5_DLL herr_t H5O__msg_iterate_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type,
const H5O_mesg_operator_t *op, void *op_data);
@@ -574,7 +574,7 @@ H5_DLL herr_t H5O__delete_mesg(H5F_t *f, H5O_t *open_oh, H5O_mesg_t *mesg);
/* Object header chunk routines */
H5_DLL herr_t H5O__chunk_add(H5F_t *f, H5O_t *oh, unsigned idx, unsigned cont_chunkno);
H5_DLL H5O_chunk_proxy_t *H5O__chunk_protect(H5F_t *f, H5O_t *oh, unsigned idx);
-H5_DLL herr_t H5O__chunk_unprotect(H5F_t *f, H5O_chunk_proxy_t *chk_proxy, hbool_t chk_dirtied);
+H5_DLL herr_t H5O__chunk_unprotect(H5F_t *f, H5O_chunk_proxy_t *chk_proxy, bool chk_dirtied);
H5_DLL herr_t H5O__chunk_update_idx(H5F_t *f, H5O_t *oh, unsigned idx);
H5_DLL herr_t H5O__chunk_resize(H5O_t *oh, H5O_chunk_proxy_t *chk_proxy);
H5_DLL herr_t H5O__chunk_delete(H5F_t *f, H5O_t *oh, unsigned idx);
@@ -583,7 +583,7 @@ H5_DLL herr_t H5O__chunk_dest(H5O_chunk_proxy_t *chunk_proxy);
/* Cache corking functions */
H5_DLL herr_t H5O__disable_mdc_flushes(H5O_loc_t *oloc);
H5_DLL herr_t H5O__enable_mdc_flushes(H5O_loc_t *oloc);
-H5_DLL herr_t H5O__are_mdc_flushes_disabled(const H5O_loc_t *oloc, hbool_t *are_disabled);
+H5_DLL herr_t H5O__are_mdc_flushes_disabled(const H5O_loc_t *oloc, bool *are_disabled);
/* Collect storage info for btree and heap */
H5_DLL herr_t H5O__attr_bh_info(H5F_t *f, H5O_t *oh, H5_ih_info_t *bh_info);
@@ -595,7 +595,7 @@ H5_DLL herr_t H5O__alloc_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t found_nu
H5_DLL herr_t H5O__alloc(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, const void *mesg,
size_t *mesg_idx);
H5_DLL herr_t H5O__condense_header(H5F_t *f, H5O_t *oh);
-H5_DLL herr_t H5O__release_mesg(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg, hbool_t adj_link);
+H5_DLL herr_t H5O__release_mesg(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg, bool adj_link);
/* Shared object operators */
H5_DLL void *H5O__shared_decode(H5F_t *f, H5O_t *open_oh, unsigned *ioflags, const uint8_t *buf,
@@ -607,7 +607,7 @@ H5_DLL herr_t H5O__shared_delete(H5F_t *f, H5O_t *open_oh, const H5O_msg_class_t
H5_DLL herr_t H5O__shared_link(H5F_t *f, H5O_t *open_oh, const H5O_msg_class_t *mesg_type,
H5O_shared_t *sh_mesg);
H5_DLL herr_t H5O__shared_copy_file(H5F_t *file_src, H5F_t *file_dst, const H5O_msg_class_t *mesg_type,
- const void *_native_src, void *_native_dst, hbool_t *recompute_size,
+ const void *_native_src, void *_native_dst, bool *recompute_size,
unsigned *mesg_flags, H5O_copy_t *cpy_info, void *udata);
H5_DLL herr_t H5O__shared_post_copy_file(H5F_t *f, const H5O_msg_class_t *mesg_type,
const H5O_shared_t *shared_src, H5O_shared_t *shared_dst,
@@ -635,7 +635,7 @@ H5_DLL htri_t H5O__is_attr_empty_test(hid_t oid);
H5_DLL htri_t H5O__is_attr_dense_test(hid_t oid);
H5_DLL herr_t H5O__num_attrs_test(hid_t oid, hsize_t *nattrs);
H5_DLL herr_t H5O__attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count);
-H5_DLL herr_t H5O__check_msg_marked_test(hid_t oid, hbool_t flag_val);
+H5_DLL herr_t H5O__check_msg_marked_test(hid_t oid, bool flag_val);
H5_DLL herr_t H5O__expunge_chunks_test(const H5O_loc_t *oloc);
H5_DLL herr_t H5O__get_rc_test(const H5O_loc_t *oloc, unsigned *rc);
H5_DLL herr_t H5O__msg_get_chunkno_test(hid_t oid, unsigned msg_type, unsigned *chunk_num);
diff --git a/src/H5Opline.c b/src/H5Opline.c
index 01c271ffb93..fd347356e9d 100644
--- a/src/H5Opline.c
+++ b/src/H5Opline.c
@@ -33,7 +33,7 @@ static void *H5O__pline_copy(const void *_mesg, void *_dest);
static size_t H5O__pline_size(const H5F_t *f, const void *_mesg);
static herr_t H5O__pline_reset(void *_mesg);
static herr_t H5O__pline_free(void *_mesg);
-static herr_t H5O__pline_pre_copy_file(H5F_t *file_src, const void *mesg_src, hbool_t *deleted,
+static herr_t H5O__pline_pre_copy_file(H5F_t *file_src, const void *mesg_src, bool *deleted,
const H5O_copy_t *cpy_info, void *_udata);
static herr_t H5O__pline_debug(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwidth);
@@ -191,7 +191,7 @@ H5O__pline_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsign
size_t max = (size_t)(p_end - p + 1); /* Max possible name length */
/* Determine actual name length (without padding, but with null terminator) */
- actual_name_length = HDstrnlen((const char *)p, max);
+ actual_name_length = strnlen((const char *)p, max);
if (actual_name_length == max)
HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, NULL, "filter name not null terminated");
actual_name_length += 1; /* include \0 byte */
@@ -205,7 +205,7 @@ H5O__pline_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsign
else
filter->name = filter->_name;
- HDstrncpy(filter->name, (const char *)p, actual_name_length);
+ strncpy(filter->name, (const char *)p, actual_name_length);
if (H5_IS_BUFFER_OVERFLOW(p, name_length, p_end))
HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding");
@@ -310,7 +310,7 @@ H5O__pline_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p /*out*/, const void *mesg)
*/
if (NULL == (name = filter->name) && (cls = H5Z_find(filter->id)))
name = cls->name;
- name_length = name ? HDstrlen(name) + 1 : 0;
+ name_length = name ? strlen(name) + 1 : 0;
/* Filter name length */
UINT16ENCODE(p, pline->version == H5O_PLINE_VERSION_1 ? H5O_ALIGN_OLD(name_length) : name_length);
@@ -393,7 +393,7 @@ H5O__pline_copy(const void *_src, void *_dst /*out*/)
if (src->filter[i].name) {
size_t namelen; /* Length of source filter name, including null terminator */
- namelen = HDstrlen(src->filter[i].name) + 1;
+ namelen = strlen(src->filter[i].name) + 1;
/* Allocate space for the filter name, or use the internal buffer */
if (namelen > H5Z_COMMON_NAME_LEN) {
@@ -477,7 +477,7 @@ H5O__pline_size(const H5F_t H5_ATTR_UNUSED *f, const void *mesg)
/* Get the name of the filter, same as done with H5O__pline_encode() */
if (NULL == (name = pline->filter[i].name) && (cls = H5Z_find(pline->filter[i].id)))
name = cls->name;
- name_len = name ? HDstrlen(name) + 1 : 0;
+ name_len = name ? strlen(name) + 1 : 0;
} /* end else */
ret_value +=
@@ -528,7 +528,7 @@ H5O__pline_reset(void *mesg)
/* Free information for each filter */
for (i = 0; i < pline->nused; i++) {
if (pline->filter[i].name && pline->filter[i].name != pline->filter[i]._name)
- assert((HDstrlen(pline->filter[i].name) + 1) > H5Z_COMMON_NAME_LEN);
+ assert((strlen(pline->filter[i].name) + 1) > H5Z_COMMON_NAME_LEN);
if (pline->filter[i].name != pline->filter[i]._name)
pline->filter[i].name = (char *)H5MM_xfree(pline->filter[i].name);
if (pline->filter[i].cd_values && pline->filter[i].cd_values != pline->filter[i]._cd_values)
@@ -584,8 +584,8 @@ H5O__pline_free(void *mesg)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__pline_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src,
- hbool_t H5_ATTR_UNUSED *deleted, const H5O_copy_t *cpy_info, void *_udata)
+H5O__pline_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src, bool H5_ATTR_UNUSED *deleted,
+ const H5O_copy_t *cpy_info, void *_udata)
{
const H5O_pline_t *pline_src = (const H5O_pline_t *)mesg_src; /* Source pline */
H5O_copy_file_ud_common_t *udata = (H5O_copy_file_ud_common_t *)_udata; /* Object copying user data */
@@ -651,7 +651,7 @@ H5O__pline_debug(H5F_t H5_ATTR_UNUSED *f, const void *mesg, FILE *stream, int in
char name[64];
memset(name, 0, 64);
- HDsnprintf(name, sizeof(name), "Filter at position %zu", i);
+ snprintf(name, sizeof(name), "Filter at position %zu", i);
fprintf(stream, "%*s%-*s\n", indent, "", fwidth, name);
fprintf(stream, "%*s%-*s 0x%04x\n", indent + 3, "", MAX(0, fwidth - 3),
@@ -670,7 +670,7 @@ H5O__pline_debug(H5F_t H5_ATTR_UNUSED *f, const void *mesg, FILE *stream, int in
for (size_t j = 0; j < pline->filter[i].cd_nelmts; j++) {
char field_name[32];
- HDsnprintf(field_name, sizeof(field_name), "CD value %lu", (unsigned long)j);
+ snprintf(field_name, sizeof(field_name), "CD value %lu", (unsigned long)j);
fprintf(stream, "%*s%-*s %u\n", indent + 6, "", MAX(0, fwidth - 6), field_name,
pline->filter[i].cd_values[j]);
}
diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h
index 2d05e54a8f3..cdf4d6c19c9 100644
--- a/src/H5Oprivate.h
+++ b/src/H5Oprivate.h
@@ -58,7 +58,7 @@ typedef struct H5O_mesg_t H5O_mesg_t;
#define H5O_FHEAP_MAN_MAX_DIRECT_SIZE (64 * 1024)
#define H5O_FHEAP_MAN_MAX_INDEX 40
#define H5O_FHEAP_MAN_START_ROOT_ROWS 1
-#define H5O_FHEAP_CHECKSUM_DBLOCKS TRUE
+#define H5O_FHEAP_CHECKSUM_DBLOCKS true
#define H5O_FHEAP_MAX_MAN_SIZE (4 * 1024)
#define H5O_FHEAP_ID_LEN 8
@@ -113,7 +113,7 @@ typedef struct H5O_mesg_t H5O_mesg_t;
#ifdef H5O_ENABLE_BAD_MESG_COUNT
#define H5O_BAD_MESG_COUNT_NAME "bad message count" /* Flag setting bad message count */
-#define H5O_BAD_MESG_COUNT_SIZE sizeof(hbool_t)
+#define H5O_BAD_MESG_COUNT_SIZE sizeof(bool)
#endif /* H5O_ENABLE_BAD_MESG_COUNT */
/* ========= Object Copy properties ============ */
@@ -157,7 +157,7 @@ typedef union {
typedef struct H5O_loc_t {
H5F_t *file; /* File that object header is located within */
haddr_t addr; /* File address of object header */
- hbool_t holding_file; /* True if this object header has incremented
+ bool holding_file; /* True if this object header has incremented
* its file's count of open objects. */
} H5O_loc_t;
@@ -175,20 +175,20 @@ typedef struct H5O_mcdt_cb_info_t {
/* Settings/flags for copying an object */
typedef struct H5O_copy_t {
- hbool_t copy_shallow; /* Flag to perform shallow hierarchy copy */
- hbool_t expand_soft_link; /* Flag to expand soft links */
- hbool_t expand_ext_link; /* Flag to expand external links */
- hbool_t expand_ref; /* Flag to expand object references */
- hbool_t copy_without_attr; /* Flag to not copy attributes */
- hbool_t preserve_null; /* Flag to not delete NULL messages */
- hbool_t merge_comm_dt; /* Flag to merge committed datatypes in dest file */
+ bool copy_shallow; /* Flag to perform shallow hierarchy copy */
+ bool expand_soft_link; /* Flag to expand soft links */
+ bool expand_ext_link; /* Flag to expand external links */
+ bool expand_ref; /* Flag to expand object references */
+ bool copy_without_attr; /* Flag to not copy attributes */
+ bool preserve_null; /* Flag to not delete NULL messages */
+ bool merge_comm_dt; /* Flag to merge committed datatypes in dest file */
H5O_copy_dtype_merge_list_t *dst_dt_suggestion_list; /* Suggestions for merging committed datatypes */
int curr_depth; /* Current depth in hierarchy copied */
int max_depth; /* Maximum depth in hierarchy to copy */
H5SL_t *map_list; /* Skip list to hold address mappings */
H5SL_t *dst_dt_list; /* Skip list to hold committed datatypes in dest file */
- hbool_t dst_dt_list_complete; /* Whether the destination datatype list is complete (i.e. not only
- populated with "suggestions" from H5Padd_merge_committed_dtype_path) */
+ bool dst_dt_list_complete; /* Whether the destination datatype list is complete (i.e. not only
+ populated with "suggestions" from H5Padd_merge_committed_dtype_path) */
H5O_t *oh_dst; /* The destination object header */
H5F_t *file_dst; /* The destination file pointer */
/* This is used in the pre_copy_file callback to obtain
@@ -252,7 +252,7 @@ typedef struct H5O_copy_t {
/* Detect messages that aren't stored in message's object header */
#define H5O_IS_STORED_SHARED(T) \
- ((((T) == H5O_SHARE_TYPE_SOHM) || ((T) == H5O_SHARE_TYPE_COMMITTED)) ? TRUE : FALSE)
+ ((((T) == H5O_SHARE_TYPE_SOHM) || ((T) == H5O_SHARE_TYPE_COMMITTED)) ? true : false)
/* Detect shared messages that are "tracked" in some other location */
#define H5O_IS_TRACKED_SHARED(T) ((T) > 0)
@@ -295,8 +295,8 @@ typedef struct H5O_shared_t {
*/
typedef struct H5O_linfo_t {
/* Creation order info */
- hbool_t track_corder; /* Are creation order values tracked on links? */
- hbool_t index_corder; /* Are creation order values indexed on links? */
+ bool track_corder; /* Are creation order values tracked on links? */
+ bool index_corder; /* Are creation order values indexed on links? */
int64_t max_corder; /* Current max. creation order value for group */
haddr_t corder_bt2_addr; /* Address of v2 B-tree for indexing creation order values of links */
@@ -336,7 +336,7 @@ struct H5O_fill_t {
void *buf; /*the fill value */
H5D_alloc_time_t alloc_time; /* time to allocate space */
H5D_fill_time_t fill_time; /* time to write fill value */
- hbool_t fill_defined; /* whether fill value is defined */
+ bool fill_defined; /* whether fill value is defined */
};
/*
@@ -358,7 +358,7 @@ typedef struct H5O_link_ud_t {
typedef struct H5O_link_t {
H5L_type_t type; /* Type of link */
- hbool_t corder_valid; /* Creation order for link is valid (not stored) */
+ bool corder_valid; /* Creation order for link is valid (not stored) */
int64_t corder; /* Creation order for link (stored if it's valid) */
H5T_cset_t cset; /* Character set of link name */
char *name; /* Link name */
@@ -492,9 +492,9 @@ typedef struct H5O_storage_chunk_t {
} H5O_storage_chunk_t;
typedef struct H5O_storage_compact_t {
- hbool_t dirty; /* Dirty flag for compact dataset */
- size_t size; /* Size of buffer in bytes */
- void *buf; /* Buffer for compact dataset */
+ bool dirty; /* Dirty flag for compact dataset */
+ size_t size; /* Size of buffer in bytes */
+ void *buf; /* Buffer for compact dataset */
} H5O_storage_compact_t;
typedef struct H5O_storage_virtual_srcdset_t {
@@ -507,7 +507,7 @@ typedef struct H5O_storage_virtual_srcdset_t {
struct H5S_t *clipped_source_select; /* Clipped version of source_select */
struct H5S_t *clipped_virtual_select; /* Clipped version of virtual_select */
struct H5D_t *dset; /* Source dataset */
- hbool_t dset_exists; /* Whether the dataset exists (was opened successfully) */
+ bool dset_exists; /* Whether the dataset exists (was opened successfully) */
/* Temporary - only used during I/O operation, NULL at all other times */
struct H5S_t *projected_mem_space; /* Selection within mem_space for this mapping */
@@ -575,11 +575,11 @@ typedef struct H5O_storage_virtual_t {
min_dims[H5S_MAX_RANK]; /* Minimum extent of VDS (maximum of all non-unlimited selection bounds) */
H5D_vds_view_t
view; /* Method for calculating the extent of the virtual dataset with unlimited selections */
- hsize_t printf_gap; /* Maximum number of sequential missing source datasets before terminating the search
- for more */
- hid_t source_fapl; /* FAPL to use to open source files */
- hid_t source_dapl; /* DAPL to use to open source datasets */
- hbool_t init; /* Whether all information has been completely initialized */
+ hsize_t printf_gap; /* Maximum number of sequential missing source datasets before terminating the search
+ for more */
+ hid_t source_fapl; /* FAPL to use to open source files */
+ hid_t source_dapl; /* DAPL to use to open source datasets */
+ bool init; /* Whether all information has been completely initialized */
} H5O_storage_virtual_t;
typedef struct H5O_storage_t {
@@ -686,12 +686,12 @@ typedef struct H5O_ginfo_t {
/* "New" format group info (stored) */
/* (storage management info) */
- hbool_t store_link_phase_change; /* Whether to store the link phase change values */
+ bool store_link_phase_change; /* Whether to store the link phase change values */
uint16_t max_compact; /* Maximum # of compact links */
uint16_t min_dense; /* Minimum # of "dense" links */
/* (initial object header size info) */
- hbool_t store_est_entry_info; /* Whether to store the est. entry values */
+ bool store_est_entry_info; /* Whether to store the est. entry values */
uint16_t est_num_entries; /* Estimated # of entries in group */
uint16_t est_name_len; /* Estimated length of entry name */
} H5O_ginfo_t;
@@ -797,8 +797,8 @@ typedef struct H5O_drvinfo_t {
*/
typedef struct H5O_ainfo_t {
/* Creation order info */
- hbool_t track_corder; /* Are creation order values tracked on attributes? */
- hbool_t index_corder; /* Are creation order values indexed on attributes? */
+ bool track_corder; /* Are creation order values tracked on attributes? */
+ bool index_corder; /* Are creation order values indexed on attributes? */
H5O_msg_crt_idx_t max_crt_idx; /* Maximum attribute creation index used */
haddr_t
corder_bt2_addr; /* Address of v2 B-tree for indexing creation order values of "dense" attributes */
@@ -841,14 +841,14 @@ typedef unsigned H5O_unknown_t; /* Original message type ID */
typedef struct H5O_fsinfo_t {
unsigned version; /* Version number */
H5F_fspace_strategy_t strategy; /* File space strategy */
- hbool_t persist; /* Persisting free-space or not */
+ bool persist; /* Persisting free-space or not */
hsize_t threshold; /* Free-space section threshold */
hsize_t page_size; /* For paged aggregation: file space page size */
size_t pgend_meta_thres; /* For paged aggregation: page end metadata threshold */
haddr_t eoa_pre_fsm_fsalloc; /* For paged aggregation: the eoa before free-space headers & sinfo */
haddr_t fs_addr[H5F_MEM_PAGE_NTYPES - 1]; /* 13 addresses of free-space managers */
/* For non-paged aggregation: only 6 addresses are used */
- hbool_t mapped; /* Not stored */
+ bool mapped; /* Not stored */
/* Indicate the message is mapped from version 0 to version 1 */
} H5O_fsinfo_t;
@@ -905,15 +905,15 @@ H5_DLL herr_t H5O_apply_ohdr(H5F_t *f, H5O_t *oh, hid_t ocpl_id, size_t size_hin
H5O_loc_t *loc_out);
H5_DLL herr_t H5O_open(H5O_loc_t *loc);
H5_DLL void *H5O_open_by_loc(const H5G_loc_t *obj_loc, H5I_type_t *opened_type /*out*/);
-H5_DLL herr_t H5O_close(H5O_loc_t *loc, hbool_t *file_closed /*out*/);
+H5_DLL herr_t H5O_close(H5O_loc_t *loc, bool *file_closed /*out*/);
H5_DLL int H5O_link(const H5O_loc_t *loc, int adjust);
-H5_DLL H5O_t *H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, hbool_t pin_all_chunks);
+H5_DLL H5O_t *H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, bool pin_all_chunks);
H5_DLL H5O_t *H5O_pin(const H5O_loc_t *loc);
H5_DLL herr_t H5O_unpin(H5O_t *oh);
H5_DLL herr_t H5O_dec_rc_by_loc(const H5O_loc_t *loc);
H5_DLL herr_t H5O_unprotect(const H5O_loc_t *loc, H5O_t *oh, unsigned oh_flags);
-H5_DLL herr_t H5O_touch(const H5O_loc_t *loc, hbool_t force);
-H5_DLL herr_t H5O_touch_oh(H5F_t *f, H5O_t *oh, hbool_t force);
+H5_DLL herr_t H5O_touch(const H5O_loc_t *loc, bool force);
+H5_DLL herr_t H5O_touch_oh(H5F_t *f, H5O_t *oh, bool force);
#ifdef H5O_ENABLE_BOGUS
H5_DLL herr_t H5O_bogus_oh(H5F_t *f, H5O_t *oh, unsigned mesg_id, unsigned mesg_flags);
#endif /* H5O_ENABLE_BOGUS */
@@ -952,12 +952,12 @@ H5_DLL void *H5O_msg_copy(unsigned type_id, const void *mesg, void *dst);
H5_DLL int H5O_msg_count(const H5O_loc_t *loc, unsigned type_id);
H5_DLL htri_t H5O_msg_exists(const H5O_loc_t *loc, unsigned type_id);
H5_DLL htri_t H5O_msg_exists_oh(const H5O_t *oh, unsigned type_id);
-H5_DLL herr_t H5O_msg_remove(const H5O_loc_t *loc, unsigned type_id, int sequence, hbool_t adj_link);
+H5_DLL herr_t H5O_msg_remove(const H5O_loc_t *loc, unsigned type_id, int sequence, bool adj_link);
H5_DLL herr_t H5O_msg_remove_op(const H5O_loc_t *loc, unsigned type_id, int sequence, H5O_operator_t op,
- void *op_data, hbool_t adj_link);
+ void *op_data, bool adj_link);
H5_DLL herr_t H5O_msg_iterate(const H5O_loc_t *loc, unsigned type_id, const H5O_mesg_operator_t *op,
void *op_data);
-H5_DLL size_t H5O_msg_raw_size(const H5F_t *f, unsigned type_id, hbool_t disable_shared, const void *mesg);
+H5_DLL size_t H5O_msg_raw_size(const H5F_t *f, unsigned type_id, bool disable_shared, const void *mesg);
H5_DLL size_t H5O_msg_size_f(const H5F_t *f, hid_t ocpl_id, unsigned type_id, const void *mesg,
size_t extra_raw);
H5_DLL size_t H5O_msg_size_oh(const H5F_t *f, const H5O_t *oh, unsigned type_id, const void *mesg,
@@ -968,7 +968,7 @@ H5_DLL htri_t H5O_msg_can_share_in_ohdr(unsigned type_id);
H5_DLL herr_t H5O_msg_set_share(unsigned type_id, const H5O_shared_t *share, void *mesg);
H5_DLL herr_t H5O_msg_reset_share(unsigned type_id, void *mesg);
H5_DLL herr_t H5O_msg_get_crt_index(unsigned type_id, const void *mesg, H5O_msg_crt_idx_t *crt_idx);
-H5_DLL herr_t H5O_msg_encode(H5F_t *f, unsigned type_id, hbool_t disable_shared, unsigned char *buf,
+H5_DLL herr_t H5O_msg_encode(H5F_t *f, unsigned type_id, bool disable_shared, unsigned char *buf,
const void *obj);
H5_DLL void *H5O_msg_decode(H5F_t *f, H5O_t *open_oh, unsigned type_id, size_t buf_size,
const unsigned char *buf);
@@ -980,12 +980,11 @@ H5_DLL herr_t H5O_flush(H5O_loc_t *oloc, hid_t obj_id);
H5_DLL herr_t H5O_flush_common(H5O_loc_t *oloc, hid_t obj_id);
H5_DLL herr_t H5O_refresh_metadata(H5O_loc_t *oloc, hid_t oid);
H5_DLL herr_t H5O_refresh_metadata_reopen(hid_t oid, hid_t apl_id, H5G_loc_t *obj_loc, H5VL_t *vol_driver,
- hbool_t start_swmr);
+ bool start_swmr);
/* Object copying routines */
H5_DLL herr_t H5O_copy_header_map(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */,
- H5O_copy_t *cpy_info, hbool_t inc_depth, H5O_type_t *obj_type,
- void **udata);
+ H5O_copy_t *cpy_info, bool inc_depth, H5O_type_t *obj_type, void **udata);
H5_DLL herr_t H5O_copy_expand_ref(H5F_t *file_src, hid_t tid_src, const H5T_t *dt_src, void *buf_src,
size_t nbytes_src, H5F_t *file_dst, void *buf_dst, H5O_copy_t *cpy_info);
@@ -1012,7 +1011,7 @@ H5_DLL herr_t H5O_fsinfo_check_version(H5F_libver_t high, H5O_fsinfo_t *fsinfo);
/* Fill value operators */
H5_DLL herr_t H5O_fill_reset_dyn(H5O_fill_t *fill);
-H5_DLL herr_t H5O_fill_convert(H5O_fill_t *fill, H5T_t *type, hbool_t *fill_changed);
+H5_DLL herr_t H5O_fill_convert(H5O_fill_t *fill, H5T_t *type, bool *fill_changed);
H5_DLL herr_t H5O_fill_set_version(H5F_t *f, H5O_fill_t *fill);
/* Link operators */
diff --git a/src/H5Opublic.h b/src/H5Opublic.h
index 4fdfcc60d0b..f35bdd0e7f5 100644
--- a/src/H5Opublic.h
+++ b/src/H5Opublic.h
@@ -745,7 +745,7 @@ H5_DLL herr_t H5Oget_native_info_by_idx(hid_t loc_id, const char *group_name, H5
* hid_t lcpl_id = H5Pcreate(H5P_LINK_CREATE);
*
* // Sets "create missing intermediate groups" property in that LCPL.
- * int status = H5Pset_create_intermediate_group(lcpl_id, TRUE);
+ * int status = H5Pset_create_intermediate_group(lcpl_id, true);
*
* // Creates a group without linking it into the file structure.
* hid_t gid = H5Gcreate_anon(file_id, H5P_DEFAULT, H5P_DEFAULT);
diff --git a/src/H5Orefcount.c b/src/H5Orefcount.c
index 7c0c71f4768..426d2be4750 100644
--- a/src/H5Orefcount.c
+++ b/src/H5Orefcount.c
@@ -29,11 +29,11 @@
/* PRIVATE PROTOTYPES */
static void *H5O__refcount_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags,
size_t p_size, const uint8_t *p);
-static herr_t H5O__refcount_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
+static herr_t H5O__refcount_encode(H5F_t *f, bool disable_shared, uint8_t *p, const void *_mesg);
static void *H5O__refcount_copy(const void *_mesg, void *_dest);
-static size_t H5O__refcount_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
+static size_t H5O__refcount_size(const H5F_t *f, bool disable_shared, const void *_mesg);
static herr_t H5O__refcount_free(void *_mesg);
-static herr_t H5O__refcount_pre_copy_file(H5F_t *file_src, const void *mesg_src, hbool_t *deleted,
+static herr_t H5O__refcount_pre_copy_file(H5F_t *file_src, const void *mesg_src, bool *deleted,
const H5O_copy_t *cpy_info, void *udata);
static herr_t H5O__refcount_debug(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwidth);
@@ -126,7 +126,7 @@ H5O__refcount_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__refcount_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
+H5O__refcount_encode(H5F_t H5_ATTR_UNUSED *f, bool H5_ATTR_UNUSED disable_shared, uint8_t *p,
const void *_mesg)
{
const H5O_refcount_t *refcount = (const H5O_refcount_t *)_mesg;
@@ -195,7 +195,7 @@ H5O__refcount_copy(const void *_mesg, void *_dest)
*-------------------------------------------------------------------------
*/
static size_t
-H5O__refcount_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
+H5O__refcount_size(const H5F_t H5_ATTR_UNUSED *f, bool H5_ATTR_UNUSED disable_shared,
const void H5_ATTR_UNUSED *_mesg)
{
size_t ret_value = 0; /* Return value */
@@ -243,7 +243,7 @@ H5O__refcount_free(void *mesg)
*/
static herr_t
H5O__refcount_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUSED *native_src,
- hbool_t *deleted, const H5O_copy_t H5_ATTR_UNUSED *cpy_info,
+ bool *deleted, const H5O_copy_t H5_ATTR_UNUSED *cpy_info,
void H5_ATTR_UNUSED *udata)
{
FUNC_ENTER_PACKAGE_NOERR
@@ -255,7 +255,7 @@ H5O__refcount_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_U
/* Always delete this message when copying objects between files. Let
* the copy routine set the correct ref. count.
*/
- *deleted = TRUE;
+ *deleted = true;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__refcount_pre_copy_file() */
diff --git a/src/H5Osdspace.c b/src/H5Osdspace.c
index cd0d3eda667..cf68a761bed 100644
--- a/src/H5Osdspace.c
+++ b/src/H5Osdspace.c
@@ -30,7 +30,7 @@ static void *H5O__sdspace_copy(const void *_mesg, void *_dest);
static size_t H5O__sdspace_size(const H5F_t *f, const void *_mesg);
static herr_t H5O__sdspace_reset(void *_mesg);
static herr_t H5O__sdspace_free(void *_mesg);
-static herr_t H5O__sdspace_pre_copy_file(H5F_t *file_src, const void *mesg_src, hbool_t *deleted,
+static herr_t H5O__sdspace_pre_copy_file(H5F_t *file_src, const void *mesg_src, bool *deleted,
const H5O_copy_t *cpy_info, void *_udata);
static herr_t H5O__sdspace_debug(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwidth);
@@ -328,7 +328,7 @@ H5O__sdspace_copy(const void *_mesg, void *_dest)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
/* Copy extent information */
- if (H5S__extent_copy_real(dest, mesg, TRUE) < 0)
+ if (H5S__extent_copy_real(dest, mesg, true) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, NULL, "can't copy extent");
/* Set return value */
@@ -439,8 +439,8 @@ H5O__sdspace_free(void *mesg)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__sdspace_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src,
- hbool_t H5_ATTR_UNUSED *deleted, const H5O_copy_t *cpy_info, void *_udata)
+H5O__sdspace_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src, bool H5_ATTR_UNUSED *deleted,
+ const H5O_copy_t *cpy_info, void *_udata)
{
const H5S_extent_t *src_space_extent = (const H5S_extent_t *)mesg_src; /* Source dataspace extent */
H5D_copy_file_ud_t *udata = (H5D_copy_file_ud_t *)_udata; /* Dataset copying user data */
@@ -471,7 +471,7 @@ H5O__sdspace_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src,
HGOTO_ERROR(H5E_DATASPACE, H5E_NOSPACE, FAIL, "dataspace extent allocation failed");
/* Create a copy of the dataspace extent */
- if (H5S__extent_copy_real(udata->src_space_extent, src_space_extent, TRUE) < 0)
+ if (H5S__extent_copy_real(udata->src_space_extent, src_space_extent, true) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy extent");
} /* end if */
diff --git a/src/H5Oshared.c b/src/H5Oshared.c
index eb4eb26ca39..f53fae5119f 100644
--- a/src/H5Oshared.c
+++ b/src/H5Oshared.c
@@ -156,7 +156,7 @@ H5O__shared_read(H5F_t *f, H5O_t *open_oh, unsigned *ioflags, const H5O_shared_t
/* Build the object location for the shared message's object header */
oloc.file = f;
oloc.addr = shared->u.loc.oh_addr;
- oloc.holding_file = FALSE;
+ oloc.holding_file = false;
if (open_oh && oloc.addr == H5O_OH_GET_ADDR(open_oh)) {
/* The shared message is in the already opened object header. This
@@ -238,14 +238,14 @@ H5O__shared_link_adj(H5F_t *f, H5O_t *open_oh, const H5O_msg_class_t *type, H5O_
/* Build the object location for the shared message's object header */
oloc.file = f;
oloc.addr = shared->u.loc.oh_addr;
- oloc.holding_file = FALSE;
+ oloc.holding_file = false;
if (open_oh && oloc.addr == H5O_OH_GET_ADDR(open_oh)) {
/* The shared message is in the already opened object header. This
* is possible, for example, if an attribute's datatype is shared in
* the same object header the attribute is in. Adjust the link
* count directly. */
- hbool_t deleted = FALSE; /* This is used only to satisfy H5O__link_oh */
+ bool deleted = false; /* This is used only to satisfy H5O__link_oh */
if (H5O__link_oh(f, adjust, open_oh, &deleted) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "unable to adjust shared object link count");
@@ -540,7 +540,7 @@ H5O__shared_link(H5F_t *f, H5O_t *open_oh, const H5O_msg_class_t *type, H5O_shar
herr_t
H5O__shared_copy_file(H5F_t H5_ATTR_NDEBUG_UNUSED *file_src, H5F_t *file_dst,
const H5O_msg_class_t *mesg_type, const void *_native_src, void *_native_dst,
- hbool_t H5_ATTR_UNUSED *recompute_size, unsigned *mesg_flags,
+ bool H5_ATTR_UNUSED *recompute_size, unsigned *mesg_flags,
H5O_copy_t H5_ATTR_NDEBUG_UNUSED *cpy_info, void H5_ATTR_UNUSED *udata)
{
const H5O_shared_t *shared_src =
@@ -629,7 +629,7 @@ H5O__shared_post_copy_file(H5F_t *f, const H5O_msg_class_t *mesg_type, const H5O
dst_oloc.file = f;
src_oloc.file = shared_src->file;
src_oloc.addr = shared_src->u.loc.oh_addr;
- if (H5O_copy_header_map(&src_oloc, &dst_oloc, cpy_info, FALSE, NULL, NULL) < 0)
+ if (H5O_copy_header_map(&src_oloc, &dst_oloc, cpy_info, false, NULL, NULL) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object");
/* Set up destination message's shared info */
diff --git a/src/H5Oshared.h b/src/H5Oshared.h
index a9c8c853845..97539baae1a 100644
--- a/src/H5Oshared.h
+++ b/src/H5Oshared.h
@@ -91,7 +91,7 @@ H5O_SHARED_DECODE(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags, unsigned *iofla
*-------------------------------------------------------------------------
*/
static inline herr_t
-H5O_SHARED_ENCODE(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg)
+H5O_SHARED_ENCODE(H5F_t *f, bool disable_shared, uint8_t *p, const void *_mesg)
{
const H5O_shared_t *sh_mesg =
(const H5O_shared_t *)_mesg; /* Pointer to shared message portion of actual message */
@@ -142,7 +142,7 @@ H5O_SHARED_ENCODE(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mes
*-------------------------------------------------------------------------
*/
static inline size_t
-H5O_SHARED_SIZE(const H5F_t *f, hbool_t disable_shared, const void *_mesg)
+H5O_SHARED_SIZE(const H5F_t *f, bool disable_shared, const void *_mesg)
{
const H5O_shared_t *sh_mesg =
(const H5O_shared_t *)_mesg; /* Pointer to shared message portion of actual message */
@@ -281,7 +281,7 @@ H5O_SHARED_LINK(H5F_t *f, H5O_t *open_oh, void *_mesg)
*-------------------------------------------------------------------------
*/
static inline void *
-H5O_SHARED_COPY_FILE(H5F_t *file_src, void *_native_src, H5F_t *file_dst, hbool_t *recompute_size,
+H5O_SHARED_COPY_FILE(H5F_t *file_src, void *_native_src, H5F_t *file_dst, bool *recompute_size,
unsigned *mesg_flags, H5O_copy_t *cpy_info, void *udata)
{
void *dst_mesg = NULL; /* Destination message */
diff --git a/src/H5Oshmesg.c b/src/H5Oshmesg.c
index 6588097d343..50d6652f42a 100644
--- a/src/H5Oshmesg.c
+++ b/src/H5Oshmesg.c
@@ -24,9 +24,9 @@
static void *H5O__shmesg_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags,
size_t p_size, const uint8_t *p);
-static herr_t H5O__shmesg_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
+static herr_t H5O__shmesg_encode(H5F_t *f, bool disable_shared, uint8_t *p, const void *_mesg);
static void *H5O__shmesg_copy(const void *_mesg, void *_dest);
-static size_t H5O__shmesg_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
+static size_t H5O__shmesg_size(const H5F_t *f, bool disable_shared, const void *_mesg);
static herr_t H5O__shmesg_debug(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwidth);
/* This message derives from H5O message class */
@@ -113,7 +113,7 @@ H5O__shmesg_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__shmesg_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
+H5O__shmesg_encode(H5F_t *f, bool H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
const H5O_shmesg_table_t *mesg = (const H5O_shmesg_table_t *)_mesg;
@@ -181,7 +181,7 @@ H5O__shmesg_copy(const void *_mesg, void *_dest)
*-------------------------------------------------------------------------
*/
static size_t
-H5O__shmesg_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void H5_ATTR_UNUSED *_mesg)
+H5O__shmesg_size(const H5F_t *f, bool H5_ATTR_UNUSED disable_shared, const void H5_ATTR_UNUSED *_mesg)
{
size_t ret_value = 0; /* Return value */
diff --git a/src/H5Ostab.c b/src/H5Ostab.c
index 24504f969e5..a9c3dd118c9 100644
--- a/src/H5Ostab.c
+++ b/src/H5Ostab.c
@@ -32,12 +32,12 @@
/* PRIVATE PROTOTYPES */
static void *H5O__stab_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags, size_t p_size,
const uint8_t *p);
-static herr_t H5O__stab_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
+static herr_t H5O__stab_encode(H5F_t *f, bool disable_shared, uint8_t *p, const void *_mesg);
static void *H5O__stab_copy(const void *_mesg, void *_dest);
-static size_t H5O__stab_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
+static size_t H5O__stab_size(const H5F_t *f, bool disable_shared, const void *_mesg);
static herr_t H5O__stab_free(void *_mesg);
static herr_t H5O__stab_delete(H5F_t *f, H5O_t *open_oh, void *_mesg);
-static void *H5O__stab_copy_file(H5F_t *file_src, void *native_src, H5F_t *file_dst, hbool_t *recompute_size,
+static void *H5O__stab_copy_file(H5F_t *file_src, void *native_src, H5F_t *file_dst, bool *recompute_size,
unsigned *mesg_flags, H5O_copy_t *cpy_info, void *_udata);
static herr_t H5O__stab_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src, H5O_loc_t *dst_oloc,
void *mesg_dst, unsigned *mesg_flags, H5O_copy_t *cpy_info);
@@ -123,7 +123,7 @@ H5O__stab_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSE
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__stab_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
+H5O__stab_encode(H5F_t *f, bool H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
const H5O_stab_t *stab = (const H5O_stab_t *)_mesg;
@@ -191,7 +191,7 @@ H5O__stab_copy(const void *_mesg, void *_dest)
*-------------------------------------------------------------------------
*/
static size_t
-H5O__stab_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void H5_ATTR_UNUSED *_mesg)
+H5O__stab_size(const H5F_t *f, bool H5_ATTR_UNUSED disable_shared, const void H5_ATTR_UNUSED *_mesg)
{
size_t ret_value = 0; /* Return value */
@@ -264,9 +264,8 @@ H5O__stab_delete(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, void *mesg)
*-------------------------------------------------------------------------
*/
static void *
-H5O__stab_copy_file(H5F_t *file_src, void *native_src, H5F_t *file_dst,
- hbool_t H5_ATTR_UNUSED *recompute_size, unsigned H5_ATTR_UNUSED *mesg_flags,
- H5O_copy_t H5_ATTR_UNUSED *cpy_info, void *_udata)
+H5O__stab_copy_file(H5F_t *file_src, void *native_src, H5F_t *file_dst, bool H5_ATTR_UNUSED *recompute_size,
+ unsigned H5_ATTR_UNUSED *mesg_flags, H5O_copy_t H5_ATTR_UNUSED *cpy_info, void *_udata)
{
H5O_stab_t *stab_src = (H5O_stab_t *)native_src;
H5O_stab_t *stab_dst = NULL;
diff --git a/src/H5Otest.c b/src/H5Otest.c
index c646f424b26..2c23f0cbf18 100644
--- a/src/H5Otest.c
+++ b/src/H5Otest.c
@@ -70,7 +70,7 @@
htri_t H5O__is_attr_dense_test(oid)
hid_t oid; IN: object to check
RETURNS
- Non-negative TRUE/FALSE on success, negative on failure
+ Non-negative true/false on success, negative on failure
DESCRIPTION
Checks to see if the object is storing attributes in the "dense" or
"compact" form.
@@ -86,7 +86,7 @@ H5O__is_attr_dense_test(hid_t oid)
H5O_t *oh = NULL; /* Object header */
H5O_ainfo_t ainfo; /* Attribute information for object */
H5O_loc_t *loc; /* Pointer to object's location */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_PACKAGE
@@ -98,10 +98,10 @@ H5O__is_attr_dense_test(hid_t oid)
/* Set API context */
if (H5CX_push() < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set API context");
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Get the object header */
- if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
+ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, false)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header");
/* Check for attribute info stored */
@@ -117,15 +117,15 @@ H5O__is_attr_dense_test(hid_t oid)
/* Check for any messages in object header */
assert(H5O__msg_count_real(oh, H5O_MSG_ATTR) == 0);
- ret_value = TRUE;
+ ret_value = true;
} /* end if */
else
- ret_value = FALSE;
+ ret_value = false;
done:
if (oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header");
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTRESET, FAIL, "can't reset API context");
FUNC_LEAVE_NOAPI(ret_value)
@@ -140,7 +140,7 @@ H5O__is_attr_dense_test(hid_t oid)
htri_t H5O__is_attr_empty_test(oid)
hid_t oid; IN: object to check
RETURNS
- Non-negative TRUE/FALSE on success, negative on failure
+ Non-negative true/false on success, negative on failure
DESCRIPTION
Checks to see if the object is storing any attributes.
GLOBAL VARIABLES
@@ -155,10 +155,10 @@ H5O__is_attr_empty_test(hid_t oid)
H5O_t *oh = NULL; /* Object header */
H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
H5O_ainfo_t ainfo; /* Attribute information for object */
- htri_t ainfo_exists = FALSE; /* Whether the attribute info exists in the file */
+ htri_t ainfo_exists = false; /* Whether the attribute info exists in the file */
H5O_loc_t *loc; /* Pointer to object's location */
hsize_t nattrs; /* Number of attributes */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_PACKAGE
@@ -170,10 +170,10 @@ H5O__is_attr_empty_test(hid_t oid)
/* Set API context */
if (H5CX_push() < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set API context");
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Get the object header */
- if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
+ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, false)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header");
/* Check for attribute info stored */
@@ -219,7 +219,7 @@ H5O__is_attr_empty_test(hid_t oid)
} /* end if */
/* Set the return value */
- ret_value = (nattrs == 0) ? TRUE : FALSE;
+ ret_value = (nattrs == 0) ? true : false;
done:
/* Release resources */
@@ -227,7 +227,7 @@ H5O__is_attr_empty_test(hid_t oid)
HDONE_ERROR(H5E_OHDR, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for name index");
if (oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header");
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTRESET, FAIL, "can't reset API context");
FUNC_LEAVE_NOAPI(ret_value)
@@ -260,7 +260,7 @@ H5O__num_attrs_test(hid_t oid, hsize_t *nattrs)
H5O_ainfo_t ainfo; /* Attribute information for object */
H5O_loc_t *loc; /* Pointer to object's location */
hsize_t obj_nattrs; /* Number of attributes */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -272,10 +272,10 @@ H5O__num_attrs_test(hid_t oid, hsize_t *nattrs)
/* Set API context */
if (H5CX_push() < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set API context");
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Get the object header */
- if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
+ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, false)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header");
/* Check for attribute info stored */
@@ -324,7 +324,7 @@ H5O__num_attrs_test(hid_t oid, hsize_t *nattrs)
HDONE_ERROR(H5E_OHDR, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for name index");
if (oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header");
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTRESET, FAIL, "can't reset API context");
FUNC_LEAVE_NOAPI(ret_value)
@@ -359,7 +359,7 @@ H5O__attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count)
H5B2_t *bt2_corder = NULL; /* v2 B-tree handle for creation order index */
H5O_ainfo_t ainfo; /* Attribute information for object */
H5O_loc_t *loc; /* Pointer to object's location */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -371,13 +371,13 @@ H5O__attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count)
/* Set API context */
if (H5CX_push() < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set API context");
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Set metadata tag in API context */
H5_BEGIN_TAG(loc->addr)
/* Get the object header */
- if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
+ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, false)))
HGOTO_ERROR_TAG(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header");
/* Check for attribute info stored */
@@ -428,7 +428,7 @@ H5O__attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count)
HDONE_ERROR(H5E_OHDR, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for creation order index");
if (oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header");
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTRESET, FAIL, "can't reset API context");
FUNC_LEAVE_NOAPI(ret_value)
@@ -443,7 +443,7 @@ H5O__attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count)
USAGE
herr_t H5O__check_msg_marked_test(oid, flag_val)
hid_t oid; IN: Object to check
- hbool_t flag_val; IN: Desired flag value
+ bool flag_val; IN: Desired flag value
RETURNS
Non-negative on success, negative on failure
DESCRIPTION
@@ -456,7 +456,7 @@ H5O__attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count)
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5O__check_msg_marked_test(hid_t oid, hbool_t flag_val)
+H5O__check_msg_marked_test(hid_t oid, bool flag_val)
{
H5O_t *oh = NULL; /* Object header */
H5O_loc_t *loc; /* Pointer to object's location */
@@ -471,7 +471,7 @@ H5O__check_msg_marked_test(hid_t oid, hbool_t flag_val)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found");
/* Get the object header */
- if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
+ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, false)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header");
/* Locate "unknown" message */
@@ -528,7 +528,7 @@ H5O__expunge_chunks_test(const H5O_loc_t *loc)
FUNC_ENTER_PACKAGE
/* Get the object header */
- if (NULL == (oh = H5O_protect(loc, H5AC__NO_FLAGS_SET, FALSE)))
+ if (NULL == (oh = H5O_protect(loc, H5AC__NO_FLAGS_SET, false)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header");
/* Safety check */
@@ -587,7 +587,7 @@ H5O__get_rc_test(const H5O_loc_t *loc, unsigned *rc)
assert(rc);
/* Get the object header */
- if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
+ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, false)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header");
/* Save the refcount for the object header */
@@ -629,7 +629,7 @@ H5O__msg_get_chunkno_test(hid_t oid, unsigned msg_type, unsigned *chunk_num)
H5O_loc_t *loc; /* Pointer to object's location */
H5O_mesg_t *idx_msg; /* Pointer to message */
unsigned idx; /* Index of message */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -641,10 +641,10 @@ H5O__msg_get_chunkno_test(hid_t oid, unsigned msg_type, unsigned *chunk_num)
/* Set API context */
if (H5CX_push() < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set API context");
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Get the object header */
- if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
+ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, false)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header");
/* Locate first message of given type */
@@ -664,7 +664,7 @@ H5O__msg_get_chunkno_test(hid_t oid, unsigned msg_type, unsigned *chunk_num)
done:
if (oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header");
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTRESET, FAIL, "can't reset API context");
FUNC_LEAVE_NOAPI(ret_value)
@@ -696,7 +696,7 @@ H5O__msg_move_to_new_chunk_test(hid_t oid, unsigned msg_type)
H5O_loc_t *loc; /* Pointer to object's location */
H5O_mesg_t *curr_msg; /* Pointer to current message */
unsigned idx; /* Index of message */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -708,10 +708,10 @@ H5O__msg_move_to_new_chunk_test(hid_t oid, unsigned msg_type)
/* Set API context */
if (H5CX_push() < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set API context");
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Get the object header */
- if (NULL == (oh = H5O_protect(loc, H5AC__NO_FLAGS_SET, FALSE)))
+ if (NULL == (oh = H5O_protect(loc, H5AC__NO_FLAGS_SET, false)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header");
/* Locate first message of given type */
@@ -775,7 +775,7 @@ H5O__msg_move_to_new_chunk_test(hid_t oid, unsigned msg_type)
done:
if (oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header");
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTRESET, FAIL, "can't reset API context");
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5P.c b/src/H5P.c
index 8d64bfd85ba..b9be5a250d0 100644
--- a/src/H5P.c
+++ b/src/H5P.c
@@ -101,7 +101,7 @@ H5Pcopy(hid_t id)
/* Compare property lists */
if (H5I_GENPROP_LST == H5I_get_type(id)) {
- if ((ret_value = H5P_copy_plist((H5P_genplist_t *)obj, TRUE)) < 0)
+ if ((ret_value = H5P_copy_plist((H5P_genplist_t *)obj, true)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, H5I_INVALID_HID, "can't copy property list");
} /* end if */
/* Must be property classes */
@@ -113,7 +113,7 @@ H5Pcopy(hid_t id)
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, H5I_INVALID_HID, "can't copy property class");
/* Get an ID for the copied class */
- if ((ret_value = H5I_register(H5I_GENPROP_CLS, copy_class, TRUE)) < 0) {
+ if ((ret_value = H5I_register(H5I_GENPROP_CLS, copy_class, true)) < 0) {
H5P__close_class(copy_class);
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, H5I_INVALID_HID,
"unable to register property list class");
@@ -192,7 +192,7 @@ H5Pcreate_class(hid_t parent, const char *name, H5P_cls_create_func_t cls_create
HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, H5I_INVALID_HID, "unable to create property list class");
/* Get an ID for the class */
- if ((ret_value = H5I_register(H5I_GENPROP_CLS, pclass, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_GENPROP_CLS, pclass, true)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register property list class");
done:
@@ -238,7 +238,7 @@ H5Pcreate(hid_t cls_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a property list class");
/* Create the new property list */
- if ((ret_value = H5P_create_id(pclass, TRUE)) < 0)
+ if ((ret_value = H5P_create_id(pclass, true)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, H5I_INVALID_HID, "unable to create property list");
done:
@@ -829,11 +829,11 @@ H5Pencode2(hid_t plist_id, void *buf, size_t *nalloc, hid_t fapl_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&fapl_id, H5P_CLS_FACC, H5I_INVALID_HID, TRUE) < 0)
+ if (H5CX_set_apl(&fapl_id, H5P_CLS_FACC, H5I_INVALID_HID, true) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info");
/* Call the internal encode routine */
- if ((ret_value = H5P__encode(plist, TRUE, buf, nalloc)) < 0)
+ if ((ret_value = H5P__encode(plist, true, buf, nalloc)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to encode property list");
done:
@@ -922,7 +922,7 @@ H5Pget_class(hid_t plist_id)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, H5I_INVALID_HID, "Can't increment class ID ref count");
/* Get an ID for the class */
- if ((ret_value = H5I_register(H5I_GENPROP_CLS, pclass, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_GENPROP_CLS, pclass, true)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register property list class");
done:
@@ -980,7 +980,7 @@ H5Pget_nprops(hid_t id, size_t *nprops /*out*/)
else if (H5I_GENPROP_CLS == H5I_get_type(id)) {
if (NULL == (pclass = (H5P_genclass_t *)H5I_object(id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property class");
- if (H5P_get_nprops_pclass(pclass, nprops, FALSE) < 0)
+ if (H5P_get_nprops_pclass(pclass, nprops, false) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to query # of properties in pclass");
} /* end if */
else
@@ -1000,7 +1000,7 @@ H5Pget_nprops(hid_t id, size_t *nprops /*out*/)
hid_t id1; IN: Property list or class ID to compare
hid_t id2; IN: Property list or class ID to compare
RETURNS
- Success: TRUE if equal, FALSE if unequal
+ Success: true if equal, false if unequal
Failure: negative
DESCRIPTION
Determines whether two property lists or two property classes are equal.
@@ -1014,7 +1014,7 @@ htri_t
H5Pequal(hid_t id1, hid_t id2)
{
void *obj1, *obj2; /* Property objects to compare */
- htri_t ret_value = FALSE; /* return value */
+ htri_t ret_value = false; /* return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("t", "ii", id1, id2);
@@ -1036,12 +1036,12 @@ H5Pequal(hid_t id1, hid_t id2)
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOMPARE, FAIL, "can't compare property lists");
/* Set return value */
- ret_value = cmp_ret == 0 ? TRUE : FALSE;
+ ret_value = cmp_ret == 0 ? true : false;
} /* end if */
/* Must be property classes */
else {
if (H5P__cmp_class((const H5P_genclass_t *)obj1, (const H5P_genclass_t *)obj2) == 0)
- ret_value = TRUE;
+ ret_value = true;
} /* end else */
done:
@@ -1058,7 +1058,7 @@ H5Pequal(hid_t id1, hid_t id2)
hid_t plist_id; IN: Property list to query
hid_t pclass_id; IN: Property class to query
RETURNS
- Success: TRUE (1) or FALSE (0)
+ Success: true (1) or false (0)
Failure: negative
DESCRIPTION
This routine queries whether a property list is a member of the property
@@ -1211,7 +1211,7 @@ H5Piterate(hid_t id, int *idx, H5P_iterate_t iter_func, void *iter_data)
if (H5I_GENPROP_LST == H5I_get_type(id)) {
/* Iterate over a property list */
- if ((ret_value = H5P__iterate_plist((H5P_genplist_t *)obj, TRUE, (idx ? idx : &fake_idx),
+ if ((ret_value = H5P__iterate_plist((H5P_genplist_t *)obj, true, (idx ? idx : &fake_idx),
H5P__iterate_cb, &udata)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to iterate over list");
} /* end if */
@@ -1576,7 +1576,7 @@ H5Pget_class_parent(hid_t pclass_id)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, H5I_INVALID_HID, "Can't increment class ID ref count");
/* Get an ID for the class */
- if ((ret_value = H5I_register(H5I_GENPROP_CLS, parent, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_GENPROP_CLS, parent, true)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register property list class");
done:
diff --git a/src/H5PB.c b/src/H5PB.c
index 6f9f7323e16..c671489c74a 100644
--- a/src/H5PB.c
+++ b/src/H5PB.c
@@ -112,7 +112,7 @@
/* Iteration context for destroying page buffer */
typedef struct {
H5PB_t *page_buf;
- hbool_t actual_slist;
+ bool actual_slist;
} H5PB_ud1_t;
/********************/
@@ -464,12 +464,12 @@ H5PB_dest(H5F_shared_t *f_sh)
op_data.page_buf = page_buf;
/* Destroy the skip list containing all the entries in the PB */
- op_data.actual_slist = TRUE;
+ op_data.actual_slist = true;
if (H5SL_destroy(page_buf->slist_ptr, H5PB__dest_cb, &op_data))
HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTCLOSEOBJ, FAIL, "can't destroy page buffer skip list");
/* Destroy the skip list containing the new entries */
- op_data.actual_slist = FALSE;
+ op_data.actual_slist = false;
if (H5SL_destroy(page_buf->mf_slist_ptr, H5PB__dest_cb, &op_data))
HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTCLOSEOBJ, FAIL, "can't destroy page buffer skip list");
@@ -526,7 +526,7 @@ H5PB_add_new_page(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t page_addr)
/* Initialize page fields */
page_entry->addr = page_addr;
page_entry->type = (H5F_mem_page_t)type;
- page_entry->is_dirty = FALSE;
+ page_entry->is_dirty = false;
/* Insert entry in skip list */
if (H5SL_insert(page_buf->mf_slist_ptr, page_entry, &(page_entry->addr)) < 0)
@@ -656,7 +656,7 @@ H5PB_read(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, void *
haddr_t search_addr; /* Address of current page */
hsize_t num_touched_pages; /* Number of pages accessed */
size_t access_size = 0;
- hbool_t bypass_pb = FALSE; /* Whether to bypass page buffering */
+ bool bypass_pb = false; /* Whether to bypass page buffering */
hsize_t i; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
@@ -672,7 +672,7 @@ H5PB_read(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, void *
#ifdef H5_HAVE_PARALLEL
if (H5F_SHARED_HAS_FEATURE(f_sh, H5FD_FEAT_HAS_MPI)) {
#if 1
- bypass_pb = TRUE;
+ bypass_pb = true;
#else
/* MSC - why this stopped working ? */
int mpi_size;
@@ -680,7 +680,7 @@ H5PB_read(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, void *
if ((mpi_size = H5F_shared_mpi_get_size(f_sh)) < 0)
HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTGET, FAIL, "can't retrieve MPI communicator size");
if (1 != mpi_size)
- bypass_pb = TRUE;
+ bypass_pb = true;
#endif
} /* end if */
#endif
@@ -865,7 +865,7 @@ H5PB_read(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, void *
/* if make_space returns 0, then we can't use the page
buffer for this I/O and we need to bypass */
if (0 == can_make_space) {
- /* make space can't return FALSE on second touched page since the first is of the same
+ /* make space can't return false on second touched page since the first is of the same
* type */
assert(0 == i);
@@ -914,7 +914,7 @@ H5PB_read(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, void *
page_entry->page_buf_ptr = new_page_buf;
page_entry->addr = search_addr;
page_entry->type = (H5F_mem_page_t)type;
- page_entry->is_dirty = FALSE;
+ page_entry->is_dirty = false;
/* Insert page into PB */
if (H5PB__insert_entry(page_buf, page_entry) < 0)
@@ -955,7 +955,7 @@ H5PB_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const
haddr_t search_addr; /* Address of current page */
hsize_t num_touched_pages; /* Number of pages accessed */
size_t access_size = 0;
- hbool_t bypass_pb = FALSE; /* Whether to bypass page buffering */
+ bool bypass_pb = false; /* Whether to bypass page buffering */
hsize_t i; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
@@ -970,7 +970,7 @@ H5PB_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const
#ifdef H5_HAVE_PARALLEL
if (H5F_SHARED_HAS_FEATURE(f_sh, H5FD_FEAT_HAS_MPI)) {
#if 1
- bypass_pb = TRUE;
+ bypass_pb = true;
#else
/* MSC - why this stopped working ? */
int mpi_size;
@@ -978,7 +978,7 @@ H5PB_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const
if ((mpi_size = H5F_shared_mpi_get_size(f_sh)) < 0)
HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTGET, FAIL, "can't retrieve MPI communicator size");
if (1 != mpi_size)
- bypass_pb = TRUE;
+ bypass_pb = true;
#endif
} /* end if */
#endif
@@ -1070,7 +1070,7 @@ H5PB_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const
page_buf->page_size - (size_t)offset);
/* Mark page dirty and push to top of LRU */
- page_entry->is_dirty = TRUE;
+ page_entry->is_dirty = true;
H5PB__MOVE_TO_TOP_LRU(page_buf, page_entry)
} /* end if */
} /* end if */
@@ -1090,7 +1090,7 @@ H5PB_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const
(size_t)((addr + size) - last_page_addr));
/* Mark page dirty and push to top of LRU */
- page_entry->is_dirty = TRUE;
+ page_entry->is_dirty = true;
H5PB__MOVE_TO_TOP_LRU(page_buf, page_entry)
} /* end if */
} /* end else-if */
@@ -1143,7 +1143,7 @@ H5PB_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const
access_size);
/* Mark page dirty and push to top of LRU */
- page_entry->is_dirty = TRUE;
+ page_entry->is_dirty = true;
H5PB__MOVE_TO_TOP_LRU(page_buf, page_entry)
/* Update statistics */
@@ -1263,7 +1263,7 @@ H5PB_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const
H5MM_memcpy((uint8_t *)new_page_buf + offset, (const uint8_t *)buf + buf_offset, access_size);
/* Page is dirty now */
- page_entry->is_dirty = TRUE;
+ page_entry->is_dirty = true;
/* Insert page into PB, evicting other pages as necessary */
if (H5PB__insert_entry(page_buf, page_entry) < 0)
@@ -1287,10 +1287,10 @@ H5PB_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const
*-------------------------------------------------------------------------
*/
herr_t
-H5PB_enabled(H5F_shared_t *f_sh, H5FD_mem_t type, hbool_t *enabled)
+H5PB_enabled(H5F_shared_t *f_sh, H5FD_mem_t type, bool *enabled)
{
H5PB_t *page_buf; /* Page buffering info for this file */
- hbool_t bypass_pb = FALSE; /* Whether to bypass page buffering */
+ bool bypass_pb = false; /* Whether to bypass page buffering */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOERR
@@ -1304,7 +1304,7 @@ H5PB_enabled(H5F_shared_t *f_sh, H5FD_mem_t type, hbool_t *enabled)
#ifdef H5_HAVE_PARALLEL
if (H5F_SHARED_HAS_FEATURE(f_sh, H5FD_FEAT_HAS_MPI)) {
#if 1
- bypass_pb = TRUE;
+ bypass_pb = true;
#else
/* MSC - why this stopped working ? */
int mpi_size;
@@ -1312,7 +1312,7 @@ H5PB_enabled(H5F_shared_t *f_sh, H5FD_mem_t type, hbool_t *enabled)
if ((mpi_size = H5F_shared_mpi_get_size(f_sh)) < 0)
HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTGET, FAIL, "can't retrieve MPI communicator size");
if (1 != mpi_size)
- bypass_pb = TRUE;
+ bypass_pb = true;
#endif
} /* end if */
#endif
@@ -1320,13 +1320,13 @@ H5PB_enabled(H5F_shared_t *f_sh, H5FD_mem_t type, hbool_t *enabled)
/* If page buffering is disabled, or if this is a parallel raw data access,
* bypass page buffering. Note that page buffering may still be disabled for
* large metadata access or large non-parallel raw data access, but this
- * function doesn't take I/O size into account so if it returns TRUE the
- * page buffer may still be disabled for some I/O. If it returns FALSE it is
+ * function doesn't take I/O size into account so if it returns true the
+ * page buffer may still be disabled for some I/O. If it returns false it is
* always disabled for this access type.
*/
if (NULL == page_buf || (bypass_pb && H5FD_MEM_DRAW == type)) {
/* Update statistics, since wherever this function is called, if it
- * returns FALSE, the calling function performs I/O avoiding the page
+ * returns false, the calling function performs I/O avoiding the page
* buffer layer */
if (page_buf) {
assert(type == H5FD_MEM_DRAW);
@@ -1334,11 +1334,11 @@ H5PB_enabled(H5F_shared_t *f_sh, H5FD_mem_t type, hbool_t *enabled)
} /* end if */
/* Page buffer is disabled, at least for this data access type */
- *enabled = FALSE;
+ *enabled = false;
} /* end if */
else
/* Page buffer may be enabled */
- *enabled = TRUE;
+ *enabled = true;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PB_enabled() */
@@ -1409,7 +1409,7 @@ static htri_t
H5PB__make_space(H5F_shared_t *f_sh, H5PB_t *page_buf, H5FD_mem_t inserted_type)
{
H5PB_entry_t *page_entry; /* Pointer to page eviction candidate */
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1425,7 +1425,7 @@ H5PB__make_space(H5F_shared_t *f_sh, H5PB_t *page_buf, H5FD_mem_t inserted_type)
metadata, then we can't make space for raw data */
if (0 == page_buf->raw_count && page_buf->min_meta_count == page_buf->meta_count) {
assert(page_buf->meta_count * page_buf->page_size == page_buf->max_size);
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
} /* end if */
/* check the metadata threshold before evicting metadata items */
@@ -1442,7 +1442,7 @@ H5PB__make_space(H5F_shared_t *f_sh, H5PB_t *page_buf, H5FD_mem_t inserted_type)
raw data, then we can't make space for meta data */
if (0 == page_buf->meta_count && page_buf->min_raw_count == page_buf->raw_count) {
assert(page_buf->raw_count * page_buf->page_size == page_buf->max_size);
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
} /* end if */
/* check the raw data threshold before evicting raw data items */
@@ -1536,7 +1536,7 @@ H5PB__write_entry(H5F_shared_t *f_sh, H5PB_entry_t *page_entry)
HGOTO_ERROR(H5E_PAGEBUF, H5E_WRITEERROR, FAIL, "file write failed");
} /* end if */
- page_entry->is_dirty = FALSE;
+ page_entry->is_dirty = false;
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5PBpkg.h b/src/H5PBpkg.h
index 603f5652d1a..527c109df74 100644
--- a/src/H5PBpkg.h
+++ b/src/H5PBpkg.h
@@ -34,7 +34,7 @@ typedef struct H5PB_entry_t {
void *page_buf_ptr; /* Pointer to the buffer containing the data */
haddr_t addr; /* Address of the page in the file */
H5F_mem_page_t type; /* Type of the page entry (H5F_MEM_PAGE_RAW/META) */
- hbool_t is_dirty; /* Flag indicating whether the page has dirty data or not */
+ bool is_dirty; /* Flag indicating whether the page has dirty data or not */
/* Fields supporting replacement policies */
struct H5PB_entry_t *next; /* next pointer in the LRU list */
diff --git a/src/H5PBprivate.h b/src/H5PBprivate.h
index aa7048b6d65..d4abf8ef081 100644
--- a/src/H5PBprivate.h
+++ b/src/H5PBprivate.h
@@ -83,7 +83,7 @@ H5_DLL herr_t H5PB_update_entry(H5PB_t *page_buf, haddr_t addr, size_t size, con
H5_DLL herr_t H5PB_remove_entry(const H5F_shared_t *f_sh, haddr_t addr);
H5_DLL herr_t H5PB_read(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, void *buf /*out*/);
H5_DLL herr_t H5PB_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const void *buf);
-H5_DLL herr_t H5PB_enabled(H5F_shared_t *f_sh, H5FD_mem_t type, hbool_t *enabled);
+H5_DLL herr_t H5PB_enabled(H5F_shared_t *f_sh, H5FD_mem_t type, bool *enabled);
/* Statistics routines */
H5_DLL herr_t H5PB_reset_stats(H5PB_t *page_buf);
diff --git a/src/H5PL.c b/src/H5PL.c
index c7c3df31b04..d01b0f5abc3 100644
--- a/src/H5PL.c
+++ b/src/H5PL.c
@@ -143,7 +143,7 @@ H5PLappend(const char *search_path)
/* Check args */
if (NULL == search_path)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plugin_path parameter cannot be NULL");
- if (0 == HDstrlen(search_path))
+ if (0 == strlen(search_path))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plugin_path parameter cannot have length zero");
/* Append the search path to the path table */
@@ -175,7 +175,7 @@ H5PLprepend(const char *search_path)
/* Check args */
if (NULL == search_path)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plugin_path parameter cannot be NULL");
- if (0 == HDstrlen(search_path))
+ if (0 == strlen(search_path))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plugin_path parameter cannot have length zero");
/* Prepend the search path to the path table */
@@ -208,7 +208,7 @@ H5PLreplace(const char *search_path, unsigned int idx)
/* Check args */
if (NULL == search_path)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plugin_path parameter cannot be NULL");
- if (0 == HDstrlen(search_path))
+ if (0 == strlen(search_path))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plugin_path parameter cannot have length zero");
/* Check index */
@@ -250,7 +250,7 @@ H5PLinsert(const char *search_path, unsigned int idx)
/* Check args */
if (NULL == search_path)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plugin_path parameter cannot be NULL");
- if (0 == HDstrlen(search_path))
+ if (0 == strlen(search_path))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plugin_path parameter cannot have length zero");
/* Check index */
@@ -355,11 +355,11 @@ H5PLget(unsigned int idx, char *path_buf, size_t buf_size)
/* Get the path at the specified index and its length */
if (NULL == (path = H5PL__get_path(idx)))
HGOTO_ERROR(H5E_PLUGIN, H5E_BADVALUE, (-1), "no path stored at that index");
- path_len = HDstrlen(path);
+ path_len = strlen(path);
/* If the path buffer is not NULL, copy the path to the buffer */
if (path_buf) {
- HDstrncpy(path_buf, path, buf_size);
+ strncpy(path_buf, path, buf_size);
if ((size_t)path_len >= buf_size)
path_buf[buf_size - 1] = '\0';
} /* end if */
diff --git a/src/H5PLint.c b/src/H5PLint.c
index 73be42af933..23d07506d3e 100644
--- a/src/H5PLint.c
+++ b/src/H5PLint.c
@@ -59,11 +59,11 @@
*/
static unsigned int H5PL_plugin_control_mask_g = H5PL_ALL_PLUGIN;
-/* This flag will be set to FALSE if the HDF5_PLUGIN_PRELOAD
+/* This flag will be set to false if the HDF5_PLUGIN_PRELOAD
* environment variable was set to H5PL_NO_PLUGIN at
* package initialization.
*/
-static hbool_t H5PL_allow_plugins_g = TRUE;
+static bool H5PL_allow_plugins_g = true;
/*-------------------------------------------------------------------------
* Function: H5PL__get_plugin_control_mask
@@ -140,10 +140,10 @@ H5PL_init(void)
* to ignore plugins. The special symbol H5PL_NO_PLUGIN (defined in
* H5PLpublic.h) means we don't want to load plugins.
*/
- if (NULL != (env_var = HDgetenv(HDF5_PLUGIN_PRELOAD)))
- if (!HDstrcmp(env_var, H5PL_NO_PLUGIN)) {
+ if (NULL != (env_var = getenv(HDF5_PLUGIN_PRELOAD)))
+ if (!strcmp(env_var, H5PL_NO_PLUGIN)) {
H5PL_plugin_control_mask_g = 0;
- H5PL_allow_plugins_g = FALSE;
+ H5PL_allow_plugins_g = false;
}
/* Create the table of previously-loaded plugins */
@@ -174,8 +174,8 @@ H5PL_init(void)
int
H5PL_term_package(void)
{
- hbool_t already_closed = FALSE;
- int ret_value = 0;
+ bool already_closed = false;
+ int ret_value = 0;
FUNC_ENTER_NOAPI_NOINIT
@@ -213,7 +213,7 @@ const void *
H5PL_load(H5PL_type_t type, const H5PL_key_t *key)
{
H5PL_search_params_t search_params; /* Plugin search parameters */
- hbool_t found = FALSE; /* Whether the plugin was found */
+ bool found = false; /* Whether the plugin was found */
const void *plugin_info = NULL; /* Information from the plugin */
const void *ret_value = NULL;
@@ -295,9 +295,9 @@ H5PL_load(H5PL_type_t type, const H5PL_key_t *key)
* NULL.
*
* On successful open of a plugin, the `success` parameter
- * will be set to TRUE and the `plugin_type` and `plugin_info`
+ * will be set to true and the `plugin_type` and `plugin_info`
* parameters will be filled appropriately. On failure, the
- * `success` parameter will be set to FALSE, the `plugin_type`
+ * `success` parameter will be set to false, the `plugin_type`
* parameter will be set to H5PL_TYPE_ERROR and the
* `plugin_info` parameter will be set to NULL.
*
@@ -316,8 +316,8 @@ H5PL_load(H5PL_type_t type, const H5PL_key_t *key)
*/
H5_GCC_CLANG_DIAG_OFF("pedantic")
herr_t
-H5PL__open(const char *path, H5PL_type_t type, const H5PL_key_t *key, hbool_t *success,
- H5PL_type_t *plugin_type, const void **plugin_info)
+H5PL__open(const char *path, H5PL_type_t type, const H5PL_key_t *key, bool *success, H5PL_type_t *plugin_type,
+ const void **plugin_info)
{
H5PL_HANDLE handle = NULL;
H5PL_get_plugin_type_t get_plugin_type = NULL;
@@ -336,7 +336,7 @@ H5PL__open(const char *path, H5PL_type_t type, const H5PL_key_t *key, hbool_t *s
assert(plugin_info);
/* Initialize out parameters */
- *success = FALSE;
+ *success = false;
*plugin_info = NULL;
if (plugin_type)
*plugin_type = H5PL_TYPE_ERROR;
@@ -386,7 +386,7 @@ H5PL__open(const char *path, H5PL_type_t type, const H5PL_key_t *key, hbool_t *s
if (plugin_type)
*plugin_type = H5PL_TYPE_FILTER;
*plugin_info = (const void *)filter_info;
- *success = TRUE;
+ *success = true;
}
break;
diff --git a/src/H5PLpath.c b/src/H5PLpath.c
index 82d54228b5e..4dd4b17afe7 100644
--- a/src/H5PLpath.c
+++ b/src/H5PLpath.c
@@ -64,7 +64,7 @@ static herr_t H5PL__replace_at(const char *path, unsigned int idx);
static herr_t H5PL__expand_path_table(void);
static herr_t H5PL__path_table_iterate_process_path(const char *plugin_path, H5PL_iterate_type_t iter_type,
H5PL_iterate_t iter_op, void *op_data);
-static herr_t H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *found,
+static herr_t H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, bool *found,
const char *dir, const void **plugin_info);
/*********************/
@@ -109,7 +109,7 @@ H5PL__insert_at(const char *path, unsigned int idx)
/* Check args - Just assert on package functions */
assert(path);
- assert(HDstrlen(path));
+ assert(strlen(path));
/* Expand the table if it is full */
if (H5PL_num_paths_g == H5PL_path_capacity_g)
@@ -190,7 +190,7 @@ H5PL__replace_at(const char *path, unsigned int idx)
/* Check args - Just assert on package functions */
assert(path);
- assert(HDstrlen(path));
+ assert(strlen(path));
/* Check that the table entry is in use */
if (!H5PL_paths_g[idx])
@@ -248,7 +248,7 @@ H5PL__create_path_table(void)
/* Retrieve paths from HDF5_PLUGIN_PATH if the user sets it
* or from the default paths if it isn't set.
*/
- env_var = HDgetenv(HDF5_PLUGIN_PATH);
+ env_var = getenv(HDF5_PLUGIN_PATH);
if (NULL == env_var)
paths = H5MM_strdup(H5PL_DEFAULT_PATH);
else
@@ -387,7 +387,7 @@ H5PL__append_path(const char *path)
/* Check args - Just assert on package functions */
assert(path);
- assert(HDstrlen(path));
+ assert(strlen(path));
/* Insert the path at the end of the table */
if (H5PL__insert_at(path, H5PL_num_paths_g) < 0)
@@ -415,7 +415,7 @@ H5PL__prepend_path(const char *path)
/* Check args - Just assert on package functions */
assert(path);
- assert(HDstrlen(path));
+ assert(strlen(path));
/* Insert the path at the beginning of the table */
if (H5PL__insert_at(path, 0) < 0)
@@ -443,7 +443,7 @@ H5PL__replace_path(const char *path, unsigned int idx)
/* Check args - Just assert on package functions */
assert(path);
- assert(HDstrlen(path));
+ assert(strlen(path));
assert(idx < H5PL_path_capacity_g);
/* Insert the path at the requested index */
@@ -473,7 +473,7 @@ H5PL__insert_path(const char *path, unsigned int idx)
/* Check args - Just assert on package functions */
assert(path);
- assert(HDstrlen(path));
+ assert(strlen(path));
assert(idx < H5PL_path_capacity_g);
/* Insert the path at the requested index */
@@ -604,7 +604,7 @@ H5PL__path_table_iterate_process_path(const char *plugin_path, H5PL_iterate_type
{
H5PL_type_t plugin_type;
const void *plugin_info = NULL;
- hbool_t plugin_loaded;
+ bool plugin_loaded;
char *path = NULL;
DIR *dirp = NULL; /* Directory stream */
struct dirent *dp = NULL; /* Directory entry */
@@ -625,29 +625,29 @@ H5PL__path_table_iterate_process_path(const char *plugin_path, H5PL_iterate_type
* or libxxx.xxx.dylib on Mac.
*/
#ifndef __CYGWIN__
- if (!HDstrncmp(dp->d_name, "lib", (size_t)3) &&
- (HDstrstr(dp->d_name, ".so") || HDstrstr(dp->d_name, ".dylib"))) {
+ if (!strncmp(dp->d_name, "lib", (size_t)3) &&
+ (strstr(dp->d_name, ".so") || strstr(dp->d_name, ".dylib"))) {
#else
- if (!HDstrncmp(dp->d_name, "cyg", (size_t)3) && HDstrstr(dp->d_name, ".dll")) {
+ if (!strncmp(dp->d_name, "cyg", (size_t)3) && strstr(dp->d_name, ".dll")) {
#endif
- hbool_t plugin_matches;
+ bool plugin_matches;
h5_stat_t my_stat;
size_t len;
/* Allocate & initialize the path name */
- len = HDstrlen(plugin_path) + HDstrlen(H5PL_PATH_SEPARATOR) + HDstrlen(dp->d_name) + 1 /*\0*/ +
+ len = strlen(plugin_path) + strlen(H5PL_PATH_SEPARATOR) + strlen(dp->d_name) + 1 /*\0*/ +
4; /* Extra "+4" to quiet GCC warning - 2019/07/05, QAK */
if (NULL == (path = (char *)H5MM_calloc(len)))
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, H5_ITER_ERROR, "can't allocate memory for path");
- HDsnprintf(path, len, "%s/%s", plugin_path, dp->d_name);
+ snprintf(path, len, "%s/%s", plugin_path, dp->d_name);
/* Get info for directory entry */
if (HDstat(path, &my_stat) == -1)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, H5_ITER_ERROR, "can't stat file %s -- error was: %s", path,
- HDstrerror(errno));
+ strerror(errno));
/* If it is a directory, skip it */
if (S_ISDIR(my_stat.st_mode))
@@ -656,7 +656,7 @@ H5PL__path_table_iterate_process_path(const char *plugin_path, H5PL_iterate_type
/* Attempt to open the dynamic library */
plugin_type = H5PL_TYPE_ERROR;
plugin_info = NULL;
- plugin_loaded = FALSE;
+ plugin_loaded = false;
if (H5PL__open(path, H5PL_TYPE_NONE, NULL, &plugin_loaded, &plugin_type, &plugin_info) < 0)
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, H5_ITER_ERROR, "failed to open plugin '%s'", path);
@@ -681,7 +681,7 @@ H5PL__path_table_iterate_process_path(const char *plugin_path, H5PL_iterate_type
if (dirp)
if (HDclosedir(dirp) < 0)
HDONE_ERROR(H5E_FILE, H5E_CLOSEERROR, H5_ITER_ERROR, "can't close directory: %s",
- HDstrerror(errno));
+ strerror(errno));
path = (char *)H5MM_xfree(path);
@@ -696,7 +696,7 @@ H5PL__path_table_iterate_process_path(const char *plugin_path, H5PL_iterate_type
HANDLE hFind = INVALID_HANDLE_VALUE;
H5PL_type_t plugin_type;
const void *plugin_info = NULL;
- hbool_t plugin_loaded;
+ bool plugin_loaded;
char *path = NULL;
char service[2048];
herr_t ret_value = H5_ITER_CONT;
@@ -709,24 +709,24 @@ H5PL__path_table_iterate_process_path(const char *plugin_path, H5PL_iterate_type
/* Specify a file mask. *.* = We want everything! -
* skip the path if the directory can't be opened */
- HDsnprintf(service, sizeof(service), "%s\\*.dll", plugin_path);
+ snprintf(service, sizeof(service), "%s\\*.dll", plugin_path);
if ((hFind = FindFirstFileA(service, &fdFile)) == INVALID_HANDLE_VALUE)
HGOTO_DONE(H5_ITER_CONT);
/* Loop over all the files */
do {
/* Ignore '.' and '..' */
- if (HDstrcmp(fdFile.cFileName, ".") != 0 && HDstrcmp(fdFile.cFileName, "..") != 0) {
- hbool_t plugin_matches;
- size_t len;
+ if (strcmp(fdFile.cFileName, ".") != 0 && strcmp(fdFile.cFileName, "..") != 0) {
+ bool plugin_matches;
+ size_t len;
/* Allocate & initialize the path name */
- len = HDstrlen(plugin_path) + HDstrlen(H5PL_PATH_SEPARATOR) + HDstrlen(fdFile.cFileName) + 1;
+ len = strlen(plugin_path) + strlen(H5PL_PATH_SEPARATOR) + strlen(fdFile.cFileName) + 1;
if (NULL == (path = (char *)H5MM_calloc(len)))
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, H5_ITER_ERROR, "can't allocate memory for path");
- HDsnprintf(path, len, "%s\\%s", plugin_path, fdFile.cFileName);
+ snprintf(path, len, "%s\\%s", plugin_path, fdFile.cFileName);
/* Ignore directories */
if (fdFile.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
@@ -735,7 +735,7 @@ H5PL__path_table_iterate_process_path(const char *plugin_path, H5PL_iterate_type
/* Attempt to open the dynamic library */
plugin_type = H5PL_TYPE_ERROR;
plugin_info = NULL;
- plugin_loaded = FALSE;
+ plugin_loaded = false;
if (H5PL__open(path, H5PL_TYPE_NONE, NULL, &plugin_loaded, &plugin_type, &plugin_info) < 0)
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, H5_ITER_ERROR, "failed to open plugin '%s'", path);
@@ -779,7 +779,7 @@ H5PL__path_table_iterate_process_path(const char *plugin_path, H5PL_iterate_type
*-------------------------------------------------------------------------
*/
herr_t
-H5PL__find_plugin_in_path_table(const H5PL_search_params_t *search_params, hbool_t *found,
+H5PL__find_plugin_in_path_table(const H5PL_search_params_t *search_params, bool *found,
const void **plugin_info)
{
unsigned int u; /* iterator */
@@ -793,7 +793,7 @@ H5PL__find_plugin_in_path_table(const H5PL_search_params_t *search_params, hbool
assert(plugin_info);
/* Initialize output parameters */
- *found = FALSE;
+ *found = false;
*plugin_info = NULL;
/* Loop over the paths in the table, checking for an appropriate plugin */
@@ -823,7 +823,7 @@ H5PL__find_plugin_in_path_table(const H5PL_search_params_t *search_params, hbool
* plugin library. Two function definitions are for Unix and
* Windows.
*
- * The found parameter will be set to TRUE and the info
+ * The found parameter will be set to true and the info
* parameter will be filled in on success.
*
* Return: SUCCEED/FAIL
@@ -832,7 +832,7 @@ H5PL__find_plugin_in_path_table(const H5PL_search_params_t *search_params, hbool
*/
#ifndef H5_HAVE_WIN32_API
static herr_t
-H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *found, const char *dir,
+H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, bool *found, const char *dir,
const void **plugin_info)
{
char *path = NULL;
@@ -849,7 +849,7 @@ H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *fo
assert(plugin_info);
/* Initialize the found parameter */
- *found = FALSE;
+ *found = false;
/* Open the directory */
if (!(dirp = HDopendir(dir)))
@@ -863,28 +863,28 @@ H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *fo
* or libxxx.xxx.dylib on Mac.
*/
#ifndef __CYGWIN__
- if (!HDstrncmp(dp->d_name, "lib", (size_t)3) &&
- (HDstrstr(dp->d_name, ".so") || HDstrstr(dp->d_name, ".dylib"))) {
+ if (!strncmp(dp->d_name, "lib", (size_t)3) &&
+ (strstr(dp->d_name, ".so") || strstr(dp->d_name, ".dylib"))) {
#else
- if (!HDstrncmp(dp->d_name, "cyg", (size_t)3) && HDstrstr(dp->d_name, ".dll")) {
+ if (!strncmp(dp->d_name, "cyg", (size_t)3) && strstr(dp->d_name, ".dll")) {
#endif
h5_stat_t my_stat;
size_t len;
/* Allocate & initialize the path name */
- len = HDstrlen(dir) + HDstrlen(H5PL_PATH_SEPARATOR) + HDstrlen(dp->d_name) + 1 /*\0*/ +
+ len = strlen(dir) + strlen(H5PL_PATH_SEPARATOR) + strlen(dp->d_name) + 1 /*\0*/ +
4; /* Extra "+4" to quiet GCC warning - 2019/07/05, QAK */
if (NULL == (path = (char *)H5MM_calloc(len)))
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path");
- HDsnprintf(path, len, "%s/%s", dir, dp->d_name);
+ snprintf(path, len, "%s/%s", dir, dp->d_name);
/* Get info for directory entry */
if (HDstat(path, &my_stat) == -1)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't stat file %s -- error was: %s", path,
- HDstrerror(errno));
+ strerror(errno));
/* If it is a directory, skip it */
if (S_ISDIR(my_stat.st_mode)) {
@@ -905,7 +905,7 @@ H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *fo
done:
if (dirp)
if (HDclosedir(dirp) < 0)
- HDONE_ERROR(H5E_FILE, H5E_CLOSEERROR, FAIL, "can't close directory: %s", HDstrerror(errno));
+ HDONE_ERROR(H5E_FILE, H5E_CLOSEERROR, FAIL, "can't close directory: %s", strerror(errno));
path = (char *)H5MM_xfree(path);
@@ -913,7 +913,7 @@ H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *fo
} /* end H5PL__find_plugin_in_path() */
#else /* H5_HAVE_WIN32_API */
static herr_t
-H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *found, const char *dir,
+H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, bool *found, const char *dir,
const void **plugin_info)
{
WIN32_FIND_DATAA fdFile;
@@ -931,29 +931,29 @@ H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *fo
assert(plugin_info);
/* Initialize the found parameter */
- *found = FALSE;
+ *found = false;
/* Specify a file mask. *.* = We want everything! */
- HDsnprintf(service, sizeof(service), "%s\\*.dll", dir);
+ snprintf(service, sizeof(service), "%s\\*.dll", dir);
if ((hFind = FindFirstFileA(service, &fdFile)) == INVALID_HANDLE_VALUE)
HGOTO_ERROR(H5E_PLUGIN, H5E_OPENERROR, FAIL, "can't open directory");
/* Loop over all the files */
do {
/* Ignore '.' and '..' */
- if (HDstrcmp(fdFile.cFileName, ".") != 0 && HDstrcmp(fdFile.cFileName, "..") != 0) {
+ if (strcmp(fdFile.cFileName, ".") != 0 && strcmp(fdFile.cFileName, "..") != 0) {
/* XXX: Probably just continue here and move the code below over one tab */
size_t len;
/* Allocate & initialize the path name */
- len = HDstrlen(dir) + HDstrlen(H5PL_PATH_SEPARATOR) + HDstrlen(fdFile.cFileName) + 1;
+ len = strlen(dir) + strlen(H5PL_PATH_SEPARATOR) + strlen(fdFile.cFileName) + 1;
if (NULL == (path = (char *)H5MM_calloc(len)))
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path");
- HDsnprintf(path, len, "%s\\%s", dir, fdFile.cFileName);
+ snprintf(path, len, "%s\\%s", dir, fdFile.cFileName);
/* Ignore directories */
if (fdFile.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
diff --git a/src/H5PLpkg.h b/src/H5PLpkg.h
index 9adbefa6e90..24a7f34d3f4 100644
--- a/src/H5PLpkg.h
+++ b/src/H5PLpkg.h
@@ -131,16 +131,15 @@ H5_DLL herr_t H5PL__get_plugin_control_mask(unsigned int *mask /*out*/);
H5_DLL herr_t H5PL__set_plugin_control_mask(unsigned int mask);
/* Plugin search and manipulation */
-H5_DLL herr_t H5PL__open(const char *libname, H5PL_type_t type, const H5PL_key_t *key,
- hbool_t *success /*out*/, H5PL_type_t *plugin_type /*out*/,
- const void **plugin_info /*out*/);
+H5_DLL herr_t H5PL__open(const char *libname, H5PL_type_t type, const H5PL_key_t *key, bool *success /*out*/,
+ H5PL_type_t *plugin_type /*out*/, const void **plugin_info /*out*/);
H5_DLL herr_t H5PL__close(H5PL_HANDLE handle);
/* Plugin cache calls */
H5_DLL herr_t H5PL__create_plugin_cache(void);
-H5_DLL herr_t H5PL__close_plugin_cache(hbool_t *already_closed /*out*/);
+H5_DLL herr_t H5PL__close_plugin_cache(bool *already_closed /*out*/);
H5_DLL herr_t H5PL__add_plugin(H5PL_type_t type, const H5PL_key_t *key, H5PL_HANDLE handle);
-H5_DLL herr_t H5PL__find_plugin_in_cache(const H5PL_search_params_t *search_params, hbool_t *found /*out*/,
+H5_DLL herr_t H5PL__find_plugin_in_cache(const H5PL_search_params_t *search_params, bool *found /*out*/,
const void **plugin_info /*out*/);
/* Plugin search path calls */
@@ -154,7 +153,7 @@ H5_DLL herr_t H5PL__insert_path(const char *path, unsigned int index);
H5_DLL herr_t H5PL__remove_path(unsigned int index);
H5_DLL const char *H5PL__get_path(unsigned int index);
H5_DLL herr_t H5PL__path_table_iterate(H5PL_iterate_type_t iter_type, H5PL_iterate_t iter_op, void *op_data);
-H5_DLL herr_t H5PL__find_plugin_in_path_table(const H5PL_search_params_t *search_params,
- hbool_t *found /*out*/, const void **plugin_info /*out*/);
+H5_DLL herr_t H5PL__find_plugin_in_path_table(const H5PL_search_params_t *search_params, bool *found /*out*/,
+ const void **plugin_info /*out*/);
#endif /* H5PLpkg_H */
diff --git a/src/H5PLplugin_cache.c b/src/H5PLplugin_cache.c
index e294dc7d2af..3538d7f5580 100644
--- a/src/H5PLplugin_cache.c
+++ b/src/H5PLplugin_cache.c
@@ -133,7 +133,7 @@ H5PL__create_plugin_cache(void)
*-------------------------------------------------------------------------
*/
herr_t
-H5PL__close_plugin_cache(hbool_t *already_closed /*out*/)
+H5PL__close_plugin_cache(bool *already_closed /*out*/)
{
unsigned int u; /* iterator */
herr_t ret_value = SUCCEED;
@@ -153,10 +153,10 @@ H5PL__close_plugin_cache(hbool_t *already_closed /*out*/)
H5PL_cache_capacity_g = 0;
/* Note that actually closed the table (needed by package close call) */
- *already_closed = FALSE;
+ *already_closed = false;
}
else
- *already_closed = TRUE;
+ *already_closed = true;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PL__close_plugin_cache() */
@@ -244,8 +244,7 @@ H5PL__add_plugin(H5PL_type_t type, const H5PL_key_t *key, H5PL_HANDLE handle)
*/
H5_GCC_CLANG_DIAG_OFF("pedantic")
herr_t
-H5PL__find_plugin_in_cache(const H5PL_search_params_t *search_params, hbool_t *found,
- const void **plugin_info)
+H5PL__find_plugin_in_cache(const H5PL_search_params_t *search_params, bool *found, const void **plugin_info)
{
unsigned int u; /* iterator */
herr_t ret_value = SUCCEED;
@@ -258,12 +257,12 @@ H5PL__find_plugin_in_cache(const H5PL_search_params_t *search_params, hbool_t *f
assert(plugin_info);
/* Initialize output parameters */
- *found = FALSE;
+ *found = false;
*plugin_info = NULL;
/* Loop over all the plugins, looking for one that matches */
for (u = 0; u < H5PL_num_plugins_g; u++) {
- hbool_t matched = FALSE; /* Whether cached plugin info matches */
+ bool matched = false; /* Whether cached plugin info matches */
/* Determine if the plugin types match */
if (search_params->type != H5PL_cache_g[u].type)
@@ -274,7 +273,7 @@ H5PL__find_plugin_in_cache(const H5PL_search_params_t *search_params, hbool_t *f
case H5PL_TYPE_FILTER:
/* Check if specified filter plugin ID matches cache entry's ID */
if (search_params->key->id == H5PL_cache_g[u].key.id)
- matched = TRUE;
+ matched = true;
break;
@@ -285,8 +284,8 @@ H5PL__find_plugin_in_cache(const H5PL_search_params_t *search_params, hbool_t *f
continue;
/* Check if specified VOL connector name matches cache entry's name */
- if (!HDstrcmp(search_params->key->vol.u.name, H5PL_cache_g[u].key.vol.u.name))
- matched = TRUE;
+ if (!strcmp(search_params->key->vol.u.name, H5PL_cache_g[u].key.vol.u.name))
+ matched = true;
}
else {
assert(search_params->key->vol.kind == H5VL_GET_CONNECTOR_BY_VALUE);
@@ -297,7 +296,7 @@ H5PL__find_plugin_in_cache(const H5PL_search_params_t *search_params, hbool_t *f
/* Check if specified VOL connector ID matches cache entry's ID */
if (search_params->key->vol.u.value == H5PL_cache_g[u].key.vol.u.value)
- matched = TRUE;
+ matched = true;
}
break;
@@ -309,8 +308,8 @@ H5PL__find_plugin_in_cache(const H5PL_search_params_t *search_params, hbool_t *f
continue;
/* Check if specified VFD name matches cache entry's name */
- if (!HDstrcmp(search_params->key->vfd.u.name, H5PL_cache_g[u].key.vfd.u.name))
- matched = TRUE;
+ if (!strcmp(search_params->key->vfd.u.name, H5PL_cache_g[u].key.vfd.u.name))
+ matched = true;
}
else {
assert(search_params->key->vfd.kind == H5FD_GET_DRIVER_BY_VALUE);
@@ -321,7 +320,7 @@ H5PL__find_plugin_in_cache(const H5PL_search_params_t *search_params, hbool_t *f
/* Check if specified VFD ID matches cache entry's ID */
if (search_params->key->vfd.u.value == H5PL_cache_g[u].key.vfd.u.value)
- matched = TRUE;
+ matched = true;
}
break;
@@ -349,7 +348,7 @@ H5PL__find_plugin_in_cache(const H5PL_search_params_t *search_params, hbool_t *f
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "can't get plugin info");
/* Set output parameters */
- *found = TRUE;
+ *found = true;
*plugin_info = info;
/* No need to continue processing */
diff --git a/src/H5Pdapl.c b/src/H5Pdapl.c
index 1167fabddfa..71c79635038 100644
--- a/src/H5Pdapl.c
+++ b/src/H5Pdapl.c
@@ -324,7 +324,7 @@ H5P__dapl_vds_file_pref_enc(const void *value, void **_pp, size_t *size)
/* calculate prefix length */
if (NULL != vds_file_pref)
- len = HDstrlen(vds_file_pref);
+ len = strlen(vds_file_pref);
enc_value = (uint64_t)len;
enc_size = H5VM_limit_enc_size(enc_value);
@@ -388,7 +388,7 @@ H5P__dapl_vds_file_pref_dec(const void **_pp, void *_value)
/* Make a copy of the user's prefix string */
if (NULL == (*vds_file_pref = (char *)H5MM_malloc(len + 1)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "memory allocation failed for prefix");
- HDstrncpy(*vds_file_pref, *(const char **)pp, len);
+ strncpy(*vds_file_pref, *(const char **)pp, len);
(*vds_file_pref)[len] = '\0';
*pp += len;
@@ -465,7 +465,7 @@ H5P__dapl_vds_file_pref_cmp(const void *value1, const void *value2, size_t H5_AT
if (NULL != pref1 && NULL == pref2)
HGOTO_DONE(-1);
if (NULL != pref1 && NULL != pref2)
- ret_value = HDstrcmp(pref1, pref2);
+ ret_value = strcmp(pref1, pref2);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -564,7 +564,7 @@ H5P__dapl_efile_pref_enc(const void *value, void **_pp, size_t *size)
/* calculate prefix length */
if (NULL != efile_pref)
- len = HDstrlen(efile_pref);
+ len = strlen(efile_pref);
enc_value = (uint64_t)len;
enc_size = H5VM_limit_enc_size(enc_value);
@@ -628,7 +628,7 @@ H5P__dapl_efile_pref_dec(const void **_pp, void *_value)
/* Make a copy of the user's prefix string */
if (NULL == (*efile_pref = (char *)H5MM_malloc(len + 1)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "memory allocation failed for prefix");
- HDstrncpy(*efile_pref, *(const char **)pp, len);
+ strncpy(*efile_pref, *(const char **)pp, len);
(*efile_pref)[len] = '\0';
*pp += len;
@@ -705,7 +705,7 @@ H5P__dapl_efile_pref_cmp(const void *value1, const void *value2, size_t H5_ATTR_
if (NULL != pref1 && NULL == pref2)
HGOTO_DONE(-1);
if (NULL != pref1 && NULL != pref2)
- ret_value = HDstrcmp(pref1, pref2);
+ ret_value = strcmp(pref1, pref2);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1449,9 +1449,9 @@ H5Pget_efile_prefix(hid_t plist_id, char *prefix /*out*/, size_t size)
/* Check for prefix being set */
if (my_prefix) {
/* Copy to user's buffer, if given */
- len = HDstrlen(my_prefix);
+ len = strlen(my_prefix);
if (prefix) {
- HDstrncpy(prefix, my_prefix, size);
+ strncpy(prefix, my_prefix, size);
if (len >= size)
prefix[size - 1] = '\0';
} /* end if */
@@ -1539,9 +1539,9 @@ H5Pget_virtual_prefix(hid_t plist_id, char *prefix /*out*/, size_t size)
/* Check for prefix being set */
if (my_prefix) {
/* Copy to user's buffer, if given */
- len = HDstrlen(my_prefix);
+ len = strlen(my_prefix);
if (prefix) {
- HDstrncpy(prefix, my_prefix, size);
+ strncpy(prefix, my_prefix, size);
if (len >= size)
prefix[size - 1] = '\0';
} /* end if */
diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c
index 5254f6db0d2..cdee9426ff1 100644
--- a/src/H5Pdcpl.c
+++ b/src/H5Pdcpl.c
@@ -50,7 +50,7 @@
/* Define default layout information */
#define H5D_DEF_STORAGE_COMPACT_INIT \
{ \
- (hbool_t) FALSE, (size_t)0, NULL \
+ false, (size_t)0, NULL \
}
#define H5D_DEF_STORAGE_CONTIG_INIT \
{ \
@@ -90,7 +90,7 @@
{ \
{HADDR_UNDEF, 0}, 0, NULL, 0, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, \
- H5D_VDS_ERROR, HSIZE_UNDEF, -1, -1, FALSE \
+ H5D_VDS_ERROR, HSIZE_UNDEF, -1, -1, false \
}
#define H5D_DEF_STORAGE_COMPACT \
{ \
@@ -159,7 +159,7 @@
#define H5D_CRT_FILL_VALUE_DEF \
{ \
{0, NULL, H5O_NULL_ID, {{0, HADDR_UNDEF}}}, H5O_FILL_VERSION_2, NULL, 0, NULL, H5D_ALLOC_TIME_LATE, \
- H5D_FILL_TIME_IFSET, FALSE \
+ H5D_FILL_TIME_IFSET, false \
}
#define H5D_CRT_FILL_VALUE_SET H5P__dcrt_fill_value_set
#define H5D_CRT_FILL_VALUE_GET H5P__dcrt_fill_value_get
@@ -189,10 +189,10 @@
#define H5D_CRT_EXT_FILE_LIST_CMP H5P__dcrt_ext_file_list_cmp
#define H5D_CRT_EXT_FILE_LIST_CLOSE H5P__dcrt_ext_file_list_close
/* Definitions for dataset object header minimization */
-#define H5D_CRT_MIN_DSET_HDR_SIZE_SIZE sizeof(hbool_t)
-#define H5D_CRT_MIN_DSET_HDR_SIZE_DEF FALSE
-#define H5D_CRT_MIN_DSET_HDR_SIZE_ENC H5P__encode_hbool_t
-#define H5D_CRT_MIN_DSET_HDR_SIZE_DEC H5P__decode_hbool_t
+#define H5D_CRT_MIN_DSET_HDR_SIZE_SIZE sizeof(bool)
+#define H5D_CRT_MIN_DSET_HDR_SIZE_DEF false
+#define H5D_CRT_MIN_DSET_HDR_SIZE_ENC H5P__encode_bool
+#define H5D_CRT_MIN_DSET_HDR_SIZE_DEC H5P__decode_bool
/******************/
/* Local Typedefs */
@@ -463,13 +463,13 @@ H5P__dcrt_layout_enc(const void *value, void **_pp, size_t *size)
/* Iterate over entries */
for (u = 0; u < layout->storage.u.virt.list_nused; u++) {
/* Source file name */
- tmp_size = HDstrlen(layout->storage.u.virt.list[u].source_file_name) + (size_t)1;
+ tmp_size = strlen(layout->storage.u.virt.list[u].source_file_name) + (size_t)1;
H5MM_memcpy(*pp, layout->storage.u.virt.list[u].source_file_name, tmp_size);
*pp += tmp_size;
*size += tmp_size;
/* Source dataset name */
- tmp_size = HDstrlen(layout->storage.u.virt.list[u].source_dset_name) + (size_t)1;
+ tmp_size = strlen(layout->storage.u.virt.list[u].source_dset_name) + (size_t)1;
H5MM_memcpy(*pp, layout->storage.u.virt.list[u].source_dset_name, tmp_size);
*pp += tmp_size;
*size += tmp_size;
@@ -510,11 +510,11 @@ H5P__dcrt_layout_enc(const void *value, void **_pp, size_t *size)
/* Iterate over entries */
for (u = 0; u < layout->storage.u.virt.list_nused; u++) {
/* Source file name */
- tmp_size = HDstrlen(layout->storage.u.virt.list[u].source_file_name) + (size_t)1;
+ tmp_size = strlen(layout->storage.u.virt.list[u].source_file_name) + (size_t)1;
*size += tmp_size;
/* Source dataset name */
- tmp_size = HDstrlen(layout->storage.u.virt.list[u].source_dset_name) + (size_t)1;
+ tmp_size = strlen(layout->storage.u.virt.list[u].source_dset_name) + (size_t)1;
*size += tmp_size;
/* Source selection */
@@ -632,7 +632,7 @@ H5P__dcrt_layout_dec(const void **_pp, void *value)
/* Decode each entry */
for (u = 0; u < (size_t)nentries; u++) {
/* Source file name */
- tmp_size = HDstrlen((const char *)*pp) + 1;
+ tmp_size = strlen((const char *)*pp) + 1;
if (NULL ==
(tmp_layout.storage.u.virt.list[u].source_file_name = (char *)H5MM_malloc(tmp_size)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL,
@@ -641,7 +641,7 @@ H5P__dcrt_layout_dec(const void **_pp, void *value)
*pp += tmp_size;
/* Source dataset name */
- tmp_size = HDstrlen((const char *)*pp) + 1;
+ tmp_size = strlen((const char *)*pp) + 1;
if (NULL ==
(tmp_layout.storage.u.virt.list[u].source_dset_name = (char *)H5MM_malloc(tmp_size)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL,
@@ -884,16 +884,16 @@ H5P__dcrt_layout_cmp(const void *_layout1, const void *_layout2, size_t H5_ATTR_
HGOTO_DONE(1);
/* Compare source file names */
- strcmp_ret = HDstrcmp(layout1->storage.u.virt.list[u].source_file_name,
- layout2->storage.u.virt.list[u].source_file_name);
+ strcmp_ret = strcmp(layout1->storage.u.virt.list[u].source_file_name,
+ layout2->storage.u.virt.list[u].source_file_name);
if (strcmp_ret < 0)
HGOTO_DONE(-1);
if (strcmp_ret > 0)
HGOTO_DONE(1);
/* Compare source dataset names */
- strcmp_ret = HDstrcmp(layout1->storage.u.virt.list[u].source_dset_name,
- layout2->storage.u.virt.list[u].source_dset_name);
+ strcmp_ret = strcmp(layout1->storage.u.virt.list[u].source_dset_name,
+ layout2->storage.u.virt.list[u].source_dset_name);
if (strcmp_ret < 0)
HGOTO_DONE(-1);
if (strcmp_ret > 0)
@@ -1276,7 +1276,7 @@ H5P_fill_value_cmp(const void *_fill1, const void *_fill2, size_t H5_ATTR_UNUSED
if (fill1->type != NULL && fill2->type == NULL)
HGOTO_DONE(1);
if (fill1->type != NULL)
- if ((cmp_value = H5T_cmp(fill1->type, fill2->type, FALSE)) != 0)
+ if ((cmp_value = H5T_cmp(fill1->type, fill2->type, false)) != 0)
HGOTO_DONE(cmp_value);
/* Check the fill values in the buffers */
@@ -1442,7 +1442,7 @@ H5P__dcrt_ext_file_list_enc(const void *value, void **_pp, size_t *size)
/* Encode file list */
for (u = 0; u < efl->nused; u++) {
/* Calculate length of slot name and encode it */
- len = HDstrlen(efl->slot[u].name) + 1;
+ len = strlen(efl->slot[u].name) + 1;
enc_value = (uint64_t)len;
enc_size = H5VM_limit_enc_size(enc_value);
assert(enc_size < 256);
@@ -1472,7 +1472,7 @@ H5P__dcrt_ext_file_list_enc(const void *value, void **_pp, size_t *size)
/* Calculate size needed for encoding */
*size += (1 + H5VM_limit_enc_size((uint64_t)efl->nused));
for (u = 0; u < efl->nused; u++) {
- len = HDstrlen(efl->slot[u].name) + 1;
+ len = strlen(efl->slot[u].name) + 1;
*size += (1 + H5VM_limit_enc_size((uint64_t)len));
*size += len;
*size += (1 + H5VM_limit_enc_size((uint64_t)efl->slot[u].offset));
@@ -1689,7 +1689,7 @@ H5P__dcrt_ext_file_list_cmp(const void *_efl1, const void *_efl2, size_t H5_ATTR
if (efl1->slot[u].name != NULL && efl2->slot[u].name == NULL)
HGOTO_DONE(1);
if (efl1->slot[u].name != NULL)
- if ((cmp_value = HDstrcmp(efl1->slot[u].name, efl2->slot[u].name)) != 0)
+ if ((cmp_value = strcmp(efl1->slot[u].name, efl2->slot[u].name)) != 0)
HGOTO_DONE(cmp_value);
/* Check the file offset of the efl entry */
@@ -2034,8 +2034,8 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, const
H5S_t *src_space; /* Source dataset space selection */
H5O_storage_virtual_ent_t *old_list = NULL; /* List pointer previously on property list */
H5O_storage_virtual_ent_t *ent = NULL; /* Convenience pointer to new VDS entry */
- hbool_t retrieved_layout = FALSE; /* Whether the layout has been retrieved */
- hbool_t free_list = FALSE; /* Whether to free the list of virtual entries */
+ bool retrieved_layout = false; /* Whether the layout has been retrieved */
+ bool free_list = false; /* Whether to free the list of virtual entries */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -2062,7 +2062,7 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, const
/* Get the current layout */
if (H5P_peek(plist, H5D_CRT_LAYOUT_NAME, &virtual_layout) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get layout");
- retrieved_layout = TRUE;
+ retrieved_layout = true;
/* If the layout was not already virtual, Start with default virtual layout.
* Otherwise, add the mapping to the current list. */
@@ -2097,13 +2097,13 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, const
/* Add virtual dataset mapping entry */
ent = &virtual_layout.storage.u.virt.list[virtual_layout.storage.u.virt.list_nused];
memset(ent, 0, sizeof(H5O_storage_virtual_ent_t)); /* Clear before starting to set up */
- if (NULL == (ent->source_dset.virtual_select = H5S_copy(vspace, FALSE, TRUE)))
+ if (NULL == (ent->source_dset.virtual_select = H5S_copy(vspace, false, true)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy virtual selection");
if (NULL == (ent->source_file_name = H5MM_xstrdup(src_file_name)))
HGOTO_ERROR(H5E_PLIST, H5E_RESOURCE, FAIL, "can't duplicate source file name");
if (NULL == (ent->source_dset_name = H5MM_xstrdup(src_dset_name)))
HGOTO_ERROR(H5E_PLIST, H5E_RESOURCE, FAIL, "can't duplicate source file name");
- if (NULL == (ent->source_select = H5S_copy(src_space, FALSE, TRUE)))
+ if (NULL == (ent->source_select = H5S_copy(src_space, false, true)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy source selection");
if (H5D_virtual_parse_source_name(ent->source_file_name, &ent->parsed_source_file_name,
&ent->psfn_static_strlen, &ent->psfn_nsubs) < 0)
@@ -2152,7 +2152,7 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, const
if (H5P_poke(plist, H5D_CRT_LAYOUT_NAME, &virtual_layout) < 0) {
HDONE_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set layout");
if (old_list != virtual_layout.storage.u.virt.list)
- free_list = TRUE;
+ free_list = true;
} /* end if */
} /* end if */
@@ -2262,11 +2262,11 @@ H5Pget_virtual_vspace(hid_t dcpl_id, size_t idx)
if (idx >= layout.storage.u.virt.list_nused)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)");
assert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc);
- if (NULL == (space = H5S_copy(layout.storage.u.virt.list[idx].source_dset.virtual_select, FALSE, TRUE)))
+ if (NULL == (space = H5S_copy(layout.storage.u.virt.list[idx].source_dset.virtual_select, false, true)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy virtual selection");
/* Register ID */
- if ((ret_value = H5I_register(H5I_DATASPACE, space, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_DATASPACE, space, true)) < 0)
HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register dataspace");
done:
@@ -2350,11 +2350,11 @@ H5Pget_virtual_srcspace(hid_t dcpl_id, size_t idx)
} /* end if */
/* Get the source space */
- if (NULL == (space = H5S_copy(layout.storage.u.virt.list[idx].source_select, FALSE, TRUE)))
+ if (NULL == (space = H5S_copy(layout.storage.u.virt.list[idx].source_select, false, true)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy source selection");
/* Register ID */
- if ((ret_value = H5I_register(H5I_DATASPACE, space, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_DATASPACE, space, true)) < 0)
HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register dataspace");
done:
@@ -2418,8 +2418,8 @@ H5Pget_virtual_filename(hid_t dcpl_id, size_t idx, char *name /*out*/, size_t si
assert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc);
assert(layout.storage.u.virt.list[idx].source_file_name);
if (name && (size > 0))
- (void)HDstrncpy(name, layout.storage.u.virt.list[idx].source_file_name, size);
- ret_value = (ssize_t)HDstrlen(layout.storage.u.virt.list[idx].source_file_name);
+ (void)strncpy(name, layout.storage.u.virt.list[idx].source_file_name, size);
+ ret_value = (ssize_t)strlen(layout.storage.u.virt.list[idx].source_file_name);
done:
FUNC_LEAVE_API(ret_value)
@@ -2476,8 +2476,8 @@ H5Pget_virtual_dsetname(hid_t dcpl_id, size_t idx, char *name /*out*/, size_t si
assert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc);
assert(layout.storage.u.virt.list[idx].source_dset_name);
if (name && (size > 0))
- (void)HDstrncpy(name, layout.storage.u.virt.list[idx].source_dset_name, size);
- ret_value = (ssize_t)HDstrlen(layout.storage.u.virt.list[idx].source_dset_name);
+ (void)strncpy(name, layout.storage.u.virt.list[idx].source_dset_name, size);
+ ret_value = (ssize_t)strlen(layout.storage.u.virt.list[idx].source_dset_name);
done:
FUNC_LEAVE_API(ret_value)
@@ -2738,7 +2738,7 @@ H5Pget_external(hid_t plist_id, unsigned idx, size_t name_size, char *name /*out
/* Return values */
if (name_size > 0 && name)
- HDstrncpy(name, efl.slot[idx].name, name_size);
+ strncpy(name, efl.slot[idx].name, name_size);
/* XXX: Badness!
*
* The offset parameter is of type off_t and the offset field of H5O_efl_entry_t
@@ -2847,7 +2847,7 @@ H5Pset_shuffle(hid_t plist_id)
H5TRACE1("e", "i", plist_id);
/* Check arguments */
- if (TRUE != H5P_isa_class(plist_id, H5P_DATASET_CREATE))
+ if (true != H5P_isa_class(plist_id, H5P_DATASET_CREATE))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset creation property list");
/* Get the plist structure */
@@ -2886,7 +2886,7 @@ H5Pset_nbit(hid_t plist_id)
H5TRACE1("e", "i", plist_id);
/* Check arguments */
- if (TRUE != H5P_isa_class(plist_id, H5P_DATASET_CREATE))
+ if (true != H5P_isa_class(plist_id, H5P_DATASET_CREATE))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset creation property list");
/* Get the plist structure */
@@ -2942,7 +2942,7 @@ H5Pset_scaleoffset(hid_t plist_id, H5Z_SO_scale_type_t scale_type, int scale_fac
H5TRACE3("e", "iZaIs", plist_id, scale_type, scale_factor);
/* Check arguments */
- if (TRUE != H5P_isa_class(plist_id, H5P_DATASET_CREATE))
+ if (true != H5P_isa_class(plist_id, H5P_DATASET_CREATE))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset creation property list");
if (scale_factor < 0)
@@ -3113,7 +3113,7 @@ H5P_get_fill_value(H5P_genplist_t *plist, const H5T_t *type, void *value /*out*/
*/
if (NULL == (tpath = H5T_path_find(fill.type, type)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "unable to convert between src and dst datatypes");
- if ((src_id = H5I_register(H5I_DATATYPE, H5T_copy(fill.type, H5T_COPY_TRANSIENT), FALSE)) < 0)
+ if ((src_id = H5I_register(H5I_DATATYPE, H5T_copy(fill.type, H5T_COPY_TRANSIENT), false)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "unable to copy/register datatype");
/*
@@ -3135,7 +3135,7 @@ H5P_get_fill_value(H5P_genplist_t *plist, const H5T_t *type, void *value /*out*/
H5MM_memcpy(buf, fill.buf, H5T_get_size(fill.type));
/* Do the conversion */
- if ((dst_id = H5I_register(H5I_DATATYPE, H5T_copy(type, H5T_COPY_ALL), FALSE)) < 0)
+ if ((dst_id = H5I_register(H5I_DATATYPE, H5T_copy(type, H5T_COPY_ALL), false)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "unable to copy/register datatype");
if (H5T_convert(tpath, src_id, dst_id, (size_t)1, (size_t)0, (size_t)0, buf, bkg) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "datatype conversion failed");
@@ -3522,7 +3522,7 @@ H5Pget_fill_time(hid_t plist_id, H5D_fill_time_t *fill_time /*out*/)
herr_t
H5Pget_dset_no_attrs_hint(hid_t dcpl_id, hbool_t *minimize /*out*/)
{
- hbool_t setting = FALSE;
+ bool setting = false;
H5P_genplist_t *plist = NULL;
herr_t ret_value = SUCCEED;
@@ -3564,7 +3564,7 @@ herr_t
H5Pset_dset_no_attrs_hint(hid_t dcpl_id, hbool_t minimize)
{
H5P_genplist_t *plist = NULL;
- hbool_t prev_set = FALSE;
+ bool prev_set = false;
herr_t ret_value = SUCCEED;
FUNC_ENTER_API(FAIL)
diff --git a/src/H5Pdeprec.c b/src/H5Pdeprec.c
index 5c4e9629b5a..4374730d48e 100644
--- a/src/H5Pdeprec.c
+++ b/src/H5Pdeprec.c
@@ -506,11 +506,11 @@ H5Pencode1(hid_t plist_id, void *buf, size_t *nalloc)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&temp_fapl_id, H5P_CLS_FACC, H5I_INVALID_HID, TRUE) < 0)
+ if (H5CX_set_apl(&temp_fapl_id, H5P_CLS_FACC, H5I_INVALID_HID, true) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info");
/* Call the internal encode routine */
- if ((ret_value = H5P__encode(plist, TRUE, buf, nalloc)) < 0)
+ if ((ret_value = H5P__encode(plist, true, buf, nalloc)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to encode property list");
done:
@@ -531,7 +531,7 @@ H5Pset_file_space(hid_t plist_id, H5F_file_space_type_t strategy, hsize_t thresh
{
H5F_fspace_strategy_t new_strategy; /* File space strategy type */
- hbool_t new_persist = H5F_FREE_SPACE_PERSIST_DEF; /* Persisting free-space or not */
+ bool new_persist = H5F_FREE_SPACE_PERSIST_DEF; /* Persisting free-space or not */
hsize_t new_threshold = H5F_FREE_SPACE_THRESHOLD_DEF; /* Free-space section threshold */
H5F_file_space_type_t in_strategy = strategy; /* Input strategy */
hsize_t in_threshold = threshold; /* Input threshold */
@@ -557,7 +557,7 @@ H5Pset_file_space(hid_t plist_id, H5F_file_space_type_t strategy, hsize_t thresh
switch (in_strategy) {
case H5F_FILE_SPACE_ALL_PERSIST:
new_strategy = H5F_FSPACE_STRATEGY_FSM_AGGR;
- new_persist = TRUE;
+ new_persist = true;
new_threshold = in_threshold;
break;
@@ -600,7 +600,7 @@ herr_t
H5Pget_file_space(hid_t plist_id, H5F_file_space_type_t *strategy /*out*/, hsize_t *threshold /*out*/)
{
H5F_fspace_strategy_t new_strategy; /* File space strategy type */
- hbool_t new_persist; /* Persisting free-space or not */
+ bool new_persist; /* Persisting free-space or not */
hsize_t new_threshold; /* Free-space section threshold */
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5Pdxpl.c b/src/H5Pdxpl.c
index 6babaf92da0..b6130f5117d 100644
--- a/src/H5Pdxpl.c
+++ b/src/H5Pdxpl.c
@@ -176,8 +176,8 @@
#define H5D_XFER_NO_SELECTION_IO_CAUSE_SIZE sizeof(uint32_t)
#define H5D_XFER_NO_SELECTION_IO_CAUSE_DEF 0
/* Definitions for modify write buffer property */
-#define H5D_XFER_MODIFY_WRITE_BUF_SIZE sizeof(hbool_t)
-#define H5D_XFER_MODIFY_WRITE_BUF_DEF FALSE
+#define H5D_XFER_MODIFY_WRITE_BUF_SIZE sizeof(bool)
+#define H5D_XFER_MODIFY_WRITE_BUF_DEF false
#define H5D_XFER_MODIFY_WRITE_BUF_ENC H5P__dxfr_modify_write_buf_enc
#define H5D_XFER_MODIFY_WRITE_BUF_DEC H5P__dxfr_modify_write_buf_dec
@@ -295,7 +295,7 @@ static const H5S_t *H5D_def_dset_io_sel_g =
H5D_XFER_DSET_IO_SEL_DEF; /* Default value for dataset I/O selection */
static const H5D_selection_io_mode_t H5D_def_selection_io_mode_g = H5D_XFER_SELECTION_IO_MODE_DEF;
static const uint32_t H5D_def_no_selection_io_cause_g = H5D_XFER_NO_SELECTION_IO_CAUSE_DEF;
-static const hbool_t H5D_def_modify_write_buf_g = H5D_XFER_MODIFY_WRITE_BUF_DEF;
+static const bool H5D_def_modify_write_buf_g = H5D_XFER_MODIFY_WRITE_BUF_DEF;
/*-------------------------------------------------------------------------
* Function: H5P__dxfr_reg_prop
@@ -725,7 +725,7 @@ H5P__dxfr_xform_enc(const void *value, void **_pp, size_t *size)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "failed to retrieve transform expression");
/* Get the transform string expression size */
- len = HDstrlen(pexp) + 1;
+ len = strlen(pexp) + 1;
} /* end if */
if (NULL != *pp) {
@@ -909,7 +909,7 @@ H5P__dxfr_xform_cmp(const void *_xform1, const void *_xform2, size_t H5_ATTR_UNU
if (pexp1) {
assert(pexp2);
- ret_value = HDstrcmp(pexp1, pexp2);
+ ret_value = strcmp(pexp1, pexp2);
} /* end if */
} /* end if */
@@ -1039,9 +1039,9 @@ H5Pget_data_transform(hid_t plist_id, char *expression /*out*/, size_t size)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "failed to retrieve transform expression");
/* Copy into application buffer */
- len = HDstrlen(pexp);
+ len = strlen(pexp);
if (expression) {
- HDstrncpy(expression, pexp, size);
+ strncpy(expression, pexp, size);
if (len >= size)
expression[size - 1] = '\0';
} /* end if */
@@ -1149,7 +1149,7 @@ H5Pget_buffer(hid_t plist_id, void **tconv /*out*/, void **bkg /*out*/)
* Purpose: When reading or writing compound data types and the
* destination is partially initialized and the read/write is
* intended to initialize the other members, one must set this
- * property to TRUE. Otherwise the I/O pipeline treats the
+ * property to true. Otherwise the I/O pipeline treats the
* destination datapoints as completely uninitialized.
*
* Return: Non-negative on success/Negative on failure
@@ -1184,7 +1184,7 @@ H5Pset_preserve(hid_t plist_id, hbool_t status)
*
* Purpose: The inverse of H5Pset_preserve()
*
- * Return: Success: TRUE or FALSE
+ * Return: Success: true or false
*
* Failure: Negative
*
@@ -1209,7 +1209,7 @@ H5Pget_preserve(hid_t plist_id)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value");
/* Set return value */
- ret_value = need_bkg ? TRUE : FALSE;
+ ret_value = need_bkg ? true : false;
done:
FUNC_LEAVE_API(ret_value)
@@ -2062,7 +2062,7 @@ H5P__dxfr_dset_io_hyp_sel_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_U
/* If there's a dataspace I/O selection set, copy it */
if (orig_space) {
/* Make copy of dataspace */
- if (NULL == (new_space = H5S_copy(orig_space, FALSE, TRUE)))
+ if (NULL == (new_space = H5S_copy(orig_space, false, true)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "error copying the dataset I/O selection");
/* Set new value for property */
@@ -2113,7 +2113,7 @@ H5P__dxfr_dset_io_hyp_sel_cmp(const void *_space1, const void *_space2, size_t H
/* Compare the extents of the dataspaces */
/* (Error & not-equal count the same) */
- if (TRUE != H5S_extent_equal(*space1, *space2))
+ if (true != H5S_extent_equal(*space1, *space2))
HGOTO_DONE(-1);
/* Compare the selection "shape" of the dataspaces
@@ -2125,7 +2125,7 @@ H5P__dxfr_dset_io_hyp_sel_cmp(const void *_space1, const void *_space2, size_t H
* we quiet the const warning.
*/
H5_GCC_CLANG_DIAG_OFF("cast-qual")
- if (TRUE != H5S_select_shape_same((H5S_t *)*space1, (H5S_t *)*space2))
+ if (true != H5S_select_shape_same((H5S_t *)*space1, (H5S_t *)*space2))
HGOTO_DONE(-1);
H5_GCC_CLANG_DIAG_ON("cast-qual")
} /* end if */
@@ -2254,8 +2254,8 @@ H5Pset_dataset_io_hyperslab_selection(hid_t plist_id, unsigned rank, H5S_seloper
{
H5P_genplist_t *plist = NULL; /* Property list pointer */
H5S_t *space = NULL; /* Dataspace to hold selection */
- hbool_t space_created = FALSE; /* Whether a new dataspace has been created */
- hbool_t reset_prop_on_error = FALSE; /* Whether to reset the property on failure */
+ bool space_created = false; /* Whether a new dataspace has been created */
+ bool reset_prop_on_error = false; /* Whether to reset the property on failure */
herr_t ret_value = SUCCEED; /* return value */
FUNC_ENTER_API(FAIL)
@@ -2308,7 +2308,7 @@ H5Pset_dataset_io_hyperslab_selection(hid_t plist_id, unsigned rank, H5S_seloper
space = NULL;
/* Set flag to reset property list on error */
- reset_prop_on_error = TRUE;
+ reset_prop_on_error = true;
} /* end if */
else
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "different rank for previous and new selections");
@@ -2327,7 +2327,7 @@ H5Pset_dataset_io_hyperslab_selection(hid_t plist_id, unsigned rank, H5S_seloper
/* Create dataspace of the correct dimensionality, with maximum dimensions */
if (NULL == (space = H5S_create_simple(rank, dims, NULL)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "unable to create dataspace for selection");
- space_created = TRUE;
+ space_created = true;
} /* end if */
/* Set selection for dataspace */
@@ -2337,7 +2337,7 @@ H5Pset_dataset_io_hyperslab_selection(hid_t plist_id, unsigned rank, H5S_seloper
/* Update property list (takes ownership of dataspace, if new) */
if (H5P_poke(plist, H5D_XFER_DSET_IO_SEL_NAME, &space) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "error setting dataset I/O selection");
- space_created = FALSE; /* Reset now that property owns the dataspace */
+ space_created = false; /* Reset now that property owns the dataspace */
done:
/* Cleanup on failure */
@@ -2471,8 +2471,8 @@ H5Pget_no_selection_io_cause(hid_t plist_id, uint32_t *no_selection_io_cause /*o
static herr_t
H5P__dxfr_modify_write_buf_enc(const void *value, void **_pp /*out*/, size_t *size /*out*/)
{
- const hbool_t *modify_write_buf = (const hbool_t *)value; /* Create local alias for values */
- uint8_t **pp = (uint8_t **)_pp;
+ const bool *modify_write_buf = (const bool *)value; /* Create local alias for values */
+ uint8_t **pp = (uint8_t **)_pp;
FUNC_ENTER_PACKAGE_NOERR
@@ -2505,7 +2505,7 @@ H5P__dxfr_modify_write_buf_enc(const void *value, void **_pp /*out*/, size_t *si
static herr_t
H5P__dxfr_modify_write_buf_dec(const void **_pp, void *_value /*out*/)
{
- hbool_t *modify_write_buf = (hbool_t *)_value; /* Modify write buffer */
+ bool *modify_write_buf = (bool *)_value; /* Modify write buffer */
const uint8_t **pp = (const uint8_t **)_pp;
FUNC_ENTER_PACKAGE_NOERR
@@ -2516,7 +2516,7 @@ H5P__dxfr_modify_write_buf_dec(const void **_pp, void *_value /*out*/)
assert(modify_write_buf);
/* Decode selection I/O mode property */
- *modify_write_buf = (hbool_t) * (*pp)++;
+ *modify_write_buf = (bool)*(*pp)++;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5P__dxfr_modify_write_buf_dec() */
diff --git a/src/H5Pencdec.c b/src/H5Pencdec.c
index 69396f489b4..77568c5deca 100644
--- a/src/H5Pencdec.c
+++ b/src/H5Pencdec.c
@@ -44,7 +44,7 @@
/* Typedef for iterator when encoding a property list */
typedef struct {
- hbool_t encode; /* Whether the property list should be encoded */
+ bool encode; /* Whether the property list should be encoded */
size_t *enc_size_ptr; /* Pointer to size of encoded buffer */
void **pp; /* Pointer to encoding buffer pointer */
} H5P_enc_iter_ud_t;
@@ -208,9 +208,9 @@ H5P__encode_uint8_t(const void *value, void **_pp, size_t *size)
} /* end H5P__encode_uint8_t() */
/*-------------------------------------------------------------------------
- * Function: H5P__encode_hbool_t
+ * Function: H5P__encode_bool
*
- * Purpose: Generic encoding callback routine for 'hbool_t' properties.
+ * Purpose: Generic encoding callback routine for 'bool' properties.
*
* Return: Success: Non-negative
* Failure: Negative
@@ -218,7 +218,7 @@ H5P__encode_uint8_t(const void *value, void **_pp, size_t *size)
*-------------------------------------------------------------------------
*/
herr_t
-H5P__encode_hbool_t(const void *value, void **_pp, size_t *size)
+H5P__encode_bool(const void *value, void **_pp, size_t *size)
{
uint8_t **pp = (uint8_t **)_pp;
@@ -230,13 +230,13 @@ H5P__encode_hbool_t(const void *value, void **_pp, size_t *size)
if (NULL != *pp)
/* Encode the value */
- *(*pp)++ = (uint8_t) * (const hbool_t *)value;
+ *(*pp)++ = (uint8_t) * (const bool *)value;
/* Set size needed for encoding */
*size += 1;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5P__encode_hbool_t() */
+} /* end H5P__encode_bool() */
/*-------------------------------------------------------------------------
* Function: H5P__encode_double
@@ -311,9 +311,9 @@ H5P__encode_cb(H5P_genprop_t *prop, void *_udata)
size_t prop_value_len; /* Encoded size of property's value */
/* Encode (or not, if the 'encode' flag is off) the property's name */
- prop_name_len = HDstrlen(prop->name) + 1;
+ prop_name_len = strlen(prop->name) + 1;
if (udata->encode) {
- HDstrcpy((char *)*(udata->pp), prop->name);
+ strcpy((char *)*(udata->pp), prop->name);
*(uint8_t **)(udata->pp) += prop_name_len;
} /* end if */
*(udata->enc_size_ptr) += prop_name_len;
@@ -337,8 +337,8 @@ H5P__encode_cb(H5P_genprop_t *prop, void *_udata)
USAGE
herr_t H5P__encode(plist, enc_all_prop, buf, nalloc)
const H5P_genplist_t *plist; IN: Property list to encode
- hbool_t enc_all_prop; IN: Whether to encode all properties (TRUE),
- or just non-default (i.e. changed) properties (FALSE).
+ bool enc_all_prop; IN: Whether to encode all properties (true),
+ or just non-default (i.e. changed) properties (false).
uint8_t *buf; OUT: buffer to hold the encoded plist
size_t *nalloc; IN/OUT: size of buffer needed to encode plist
RETURNS
@@ -353,13 +353,13 @@ H5P__encode_cb(H5P_genprop_t *prop, void *_udata)
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5P__encode(const H5P_genplist_t *plist, hbool_t enc_all_prop, void *buf, size_t *nalloc)
+H5P__encode(const H5P_genplist_t *plist, bool enc_all_prop, void *buf, size_t *nalloc)
{
H5P_enc_iter_ud_t udata; /* User data for property iteration callback */
uint8_t *p = (uint8_t *)buf; /* Temporary pointer to encoding buffer */
int idx; /* Index of property to start at */
size_t encode_size = 0; /* Size of buffer needed to encode properties */
- hbool_t encode = TRUE; /* Whether the property list should be encoded */
+ bool encode = true; /* Whether the property list should be encoded */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -372,7 +372,7 @@ H5P__encode(const H5P_genplist_t *plist, hbool_t enc_all_prop, void *buf, size_t
* space is needed to encode a property.
*/
if (NULL == p)
- encode = FALSE;
+ encode = false;
/* Encode property list description info */
if (encode) {
@@ -547,9 +547,9 @@ H5P__decode_uint8_t(const void **_pp, void *_value)
} /* end H5P__decode_uint8_t() */
/*-------------------------------------------------------------------------
- * Function: H5P__decode_hbool_t
+ * Function: H5P__decode_bool
*
- * Purpose: Generic decoding callback routine for 'hbool_t' properties.
+ * Purpose: Generic decoding callback routine for 'bool' properties.
*
* Return: Success: Non-negative
* Failure: Negative
@@ -557,9 +557,9 @@ H5P__decode_uint8_t(const void **_pp, void *_value)
*-------------------------------------------------------------------------
*/
herr_t
-H5P__decode_hbool_t(const void **_pp, void *_value)
+H5P__decode_bool(const void **_pp, void *_value)
{
- hbool_t *value = (hbool_t *)_value; /* Property value to return */
+ bool *value = (bool *)_value; /* Property value to return */
const uint8_t **pp = (const uint8_t **)_pp;
herr_t ret_value = SUCCEED; /* Return value */
@@ -571,10 +571,10 @@ H5P__decode_hbool_t(const void **_pp, void *_value)
assert(value);
/* Decode the value */
- *value = (hbool_t) * (*pp)++;
+ *value = (bool)*(*pp)++;
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5P__decode_hbool_t() */
+} /* end H5P__decode_bool() */
/*-------------------------------------------------------------------------
* Function: H5P__decode_double
@@ -683,7 +683,7 @@ H5P__decode(const void *buf)
/* Get property list name */
name = (const char *)p;
- p += HDstrlen(name) + 1;
+ p += strlen(name) + 1;
/* Find property with name */
if (NULL == (prop = H5P__find_prop_plist(plist, name)))
diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c
index 4ec73e3fb1b..5f5782cae3b 100644
--- a/src/H5Pfapl.c
+++ b/src/H5Pfapl.c
@@ -161,8 +161,8 @@
/* Definition for whether to convert family to a single-file driver.
* It's a private property only used by h5repart.
*/
-#define H5F_ACS_FAMILY_TO_SINGLE_SIZE sizeof(hbool_t)
-#define H5F_ACS_FAMILY_TO_SINGLE_DEF FALSE
+#define H5F_ACS_FAMILY_TO_SINGLE_SIZE sizeof(bool)
+#define H5F_ACS_FAMILY_TO_SINGLE_DEF false
/* Definition for data type in multi file driver */
#define H5F_ACS_MULTI_TYPE_SIZE sizeof(H5FD_mem_t)
#define H5F_ACS_MULTI_TYPE_DEF H5FD_MEM_DEFAULT
@@ -184,8 +184,8 @@
/* Definition for whether to query the file descriptor from the core VFD
* instead of the memory address. (Private to library)
*/
-#define H5F_ACS_WANT_POSIX_FD_SIZE sizeof(hbool_t)
-#define H5F_ACS_WANT_POSIX_FD_DEF FALSE
+#define H5F_ACS_WANT_POSIX_FD_SIZE sizeof(bool)
+#define H5F_ACS_WANT_POSIX_FD_DEF false
/* Definition for external file cache size */
#define H5F_ACS_EFC_SIZE_SIZE sizeof(unsigned)
#define H5F_ACS_EFC_SIZE_DEF 0
@@ -212,21 +212,21 @@
NULL, NULL \
}
/* Definition for status_flags in the superblock */
-#define H5F_ACS_CLEAR_STATUS_FLAGS_SIZE sizeof(hbool_t)
-#define H5F_ACS_CLEAR_STATUS_FLAGS_DEF FALSE
+#define H5F_ACS_CLEAR_STATUS_FLAGS_SIZE sizeof(bool)
+#define H5F_ACS_CLEAR_STATUS_FLAGS_DEF false
/* Definition for dropping free-space to the floor when reading in the superblock */
-#define H5F_ACS_NULL_FSM_ADDR_SIZE sizeof(hbool_t)
-#define H5F_ACS_NULL_FSM_ADDR_DEF FALSE
+#define H5F_ACS_NULL_FSM_ADDR_SIZE sizeof(bool)
+#define H5F_ACS_NULL_FSM_ADDR_DEF false
/* Definition for skipping EOF check when reading in the superblock */
-#define H5F_ACS_SKIP_EOF_CHECK_SIZE sizeof(hbool_t)
-#define H5F_ACS_SKIP_EOF_CHECK_DEF FALSE
+#define H5F_ACS_SKIP_EOF_CHECK_SIZE sizeof(bool)
+#define H5F_ACS_SKIP_EOF_CHECK_DEF false
/* Definition for 'use metadata cache logging' flag */
-#define H5F_ACS_USE_MDC_LOGGING_SIZE sizeof(hbool_t)
-#define H5F_ACS_USE_MDC_LOGGING_DEF FALSE
-#define H5F_ACS_USE_MDC_LOGGING_ENC H5P__encode_hbool_t
-#define H5F_ACS_USE_MDC_LOGGING_DEC H5P__decode_hbool_t
+#define H5F_ACS_USE_MDC_LOGGING_SIZE sizeof(bool)
+#define H5F_ACS_USE_MDC_LOGGING_DEF false
+#define H5F_ACS_USE_MDC_LOGGING_ENC H5P__encode_bool
+#define H5F_ACS_USE_MDC_LOGGING_DEC H5P__decode_bool
/* Definition for 'mdc log location' flag */
#define H5F_ACS_MDC_LOG_LOCATION_SIZE sizeof(char *)
#define H5F_ACS_MDC_LOG_LOCATION_DEF NULL /* default is no log location */
@@ -237,15 +237,15 @@
#define H5F_ACS_MDC_LOG_LOCATION_CMP H5P__facc_mdc_log_location_cmp
#define H5F_ACS_MDC_LOG_LOCATION_CLOSE H5P__facc_mdc_log_location_close
/* Definition for 'start metadata cache logging on access' flag */
-#define H5F_ACS_START_MDC_LOG_ON_ACCESS_SIZE sizeof(hbool_t)
-#define H5F_ACS_START_MDC_LOG_ON_ACCESS_DEF FALSE
-#define H5F_ACS_START_MDC_LOG_ON_ACCESS_ENC H5P__encode_hbool_t
-#define H5F_ACS_START_MDC_LOG_ON_ACCESS_DEC H5P__decode_hbool_t
+#define H5F_ACS_START_MDC_LOG_ON_ACCESS_SIZE sizeof(bool)
+#define H5F_ACS_START_MDC_LOG_ON_ACCESS_DEF false
+#define H5F_ACS_START_MDC_LOG_ON_ACCESS_ENC H5P__encode_bool
+#define H5F_ACS_START_MDC_LOG_ON_ACCESS_DEC H5P__decode_bool
/* Definition for evict on close property */
-#define H5F_ACS_EVICT_ON_CLOSE_FLAG_SIZE sizeof(hbool_t)
-#define H5F_ACS_EVICT_ON_CLOSE_FLAG_DEF FALSE
-#define H5F_ACS_EVICT_ON_CLOSE_FLAG_ENC H5P__encode_hbool_t
-#define H5F_ACS_EVICT_ON_CLOSE_FLAG_DEC H5P__decode_hbool_t
+#define H5F_ACS_EVICT_ON_CLOSE_FLAG_SIZE sizeof(bool)
+#define H5F_ACS_EVICT_ON_CLOSE_FLAG_DEF false
+#define H5F_ACS_EVICT_ON_CLOSE_FLAG_ENC H5P__encode_bool
+#define H5F_ACS_EVICT_ON_CLOSE_FLAG_DEC H5P__decode_bool
#ifdef H5_HAVE_PARALLEL
/* Definition of collective metadata read mode flag */
#define H5F_ACS_COLL_MD_READ_FLAG_SIZE sizeof(H5P_coll_md_read_flag_t)
@@ -253,10 +253,10 @@
#define H5F_ACS_COLL_MD_READ_FLAG_ENC H5P__encode_coll_md_read_flag_t
#define H5F_ACS_COLL_MD_READ_FLAG_DEC H5P__decode_coll_md_read_flag_t
/* Definition of collective metadata write mode flag */
-#define H5F_ACS_COLL_MD_WRITE_FLAG_SIZE sizeof(hbool_t)
-#define H5F_ACS_COLL_MD_WRITE_FLAG_DEF FALSE
-#define H5F_ACS_COLL_MD_WRITE_FLAG_ENC H5P__encode_hbool_t
-#define H5F_ACS_COLL_MD_WRITE_FLAG_DEC H5P__decode_hbool_t
+#define H5F_ACS_COLL_MD_WRITE_FLAG_SIZE sizeof(bool)
+#define H5F_ACS_COLL_MD_WRITE_FLAG_DEF false
+#define H5F_ACS_COLL_MD_WRITE_FLAG_ENC H5P__encode_bool
+#define H5F_ACS_COLL_MD_WRITE_FLAG_DEC H5P__decode_bool
/* Definition for the file's MPI communicator */
#define H5F_ACS_MPI_PARAMS_COMM_SIZE sizeof(MPI_Comm)
#define H5F_ACS_MPI_PARAMS_COMM_DEF MPI_COMM_NULL
@@ -313,26 +313,26 @@
/* Definition for using file locking or not. The default is set
* via the configure step.
*/
-#define H5F_ACS_USE_FILE_LOCKING_SIZE sizeof(hbool_t)
+#define H5F_ACS_USE_FILE_LOCKING_SIZE sizeof(bool)
#if defined H5_USE_FILE_LOCKING && H5_USE_FILE_LOCKING
-#define H5F_ACS_USE_FILE_LOCKING_DEF TRUE
+#define H5F_ACS_USE_FILE_LOCKING_DEF true
#else
-#define H5F_ACS_USE_FILE_LOCKING_DEF FALSE
+#define H5F_ACS_USE_FILE_LOCKING_DEF false
#endif
-#define H5F_ACS_USE_FILE_LOCKING_ENC H5P__encode_hbool_t
-#define H5F_ACS_USE_FILE_LOCKING_DEC H5P__decode_hbool_t
+#define H5F_ACS_USE_FILE_LOCKING_ENC H5P__encode_bool
+#define H5F_ACS_USE_FILE_LOCKING_DEC H5P__decode_bool
/* Definition for whether we ignore file locking errors when we can
* tell that file locking has been disabled on the file system.
* The default is set via the configure step.
*/
-#define H5F_ACS_IGNORE_DISABLED_FILE_LOCKS_SIZE sizeof(hbool_t)
+#define H5F_ACS_IGNORE_DISABLED_FILE_LOCKS_SIZE sizeof(bool)
#if defined H5_IGNORE_DISABLED_FILE_LOCKS && H5_IGNORE_DISABLED_FILE_LOCKS
-#define H5F_ACS_IGNORE_DISABLED_FILE_LOCKS_DEF TRUE
+#define H5F_ACS_IGNORE_DISABLED_FILE_LOCKS_DEF true
#else
-#define H5F_ACS_IGNORE_DISABLED_FILE_LOCKS_DEF FALSE
+#define H5F_ACS_IGNORE_DISABLED_FILE_LOCKS_DEF false
#endif
-#define H5F_ACS_IGNORE_DISABLED_FILE_LOCKS_ENC H5P__encode_hbool_t
-#define H5F_ACS_IGNORE_DISABLED_FILE_LOCKS_DEC H5P__decode_hbool_t
+#define H5F_ACS_IGNORE_DISABLED_FILE_LOCKS_ENC H5P__encode_bool
+#define H5F_ACS_IGNORE_DISABLED_FILE_LOCKS_DEC H5P__decode_bool
/******************/
/* Local Typedefs */
@@ -478,8 +478,7 @@ static const H5F_close_degree_t H5F_def_close_degree_g = H5F_CLOSE_DEGREE_DEF; /
static const hsize_t H5F_def_family_offset_g = H5F_ACS_FAMILY_OFFSET_DEF; /* Default offset for family VFD */
static const hsize_t H5F_def_family_newsize_g =
H5F_ACS_FAMILY_NEWSIZE_DEF; /* Default size of new files for family VFD */
-static const hbool_t H5F_def_family_to_single_g =
- H5F_ACS_FAMILY_TO_SINGLE_DEF; /* Default ?? for family VFD */
+static const bool H5F_def_family_to_single_g = H5F_ACS_FAMILY_TO_SINGLE_DEF; /* Default ?? for family VFD */
static const H5FD_mem_t H5F_def_mem_type_g =
H5F_ACS_MULTI_TYPE_DEF; /* Default file space type for multi VFD */
@@ -488,7 +487,7 @@ static const H5F_libver_t H5F_def_libver_low_bound_g =
static const H5F_libver_t H5F_def_libver_high_bound_g =
H5F_ACS_LIBVER_HIGH_BOUND_DEF; /* Default setting for "high" bound of format version */
-static const hbool_t H5F_def_want_posix_fd_g =
+static const bool H5F_def_want_posix_fd_g =
H5F_ACS_WANT_POSIX_FD_DEF; /* Default setting for retrieving 'handle' from core VFD */
static const unsigned H5F_def_efc_size_g = H5F_ACS_EFC_SIZE_DEF; /* Default external file cache size */
static const H5FD_file_image_info_t H5F_def_file_image_info_g =
@@ -497,24 +496,24 @@ static const unsigned H5F_def_metadata_read_attempts_g =
H5F_ACS_METADATA_READ_ATTEMPTS_DEF; /* Default setting for the # of metadata read attempts */
static const H5F_object_flush_t H5F_def_object_flush_cb_g =
H5F_ACS_OBJECT_FLUSH_CB_DEF; /* Default setting for object flush callback */
-static const hbool_t H5F_def_clear_status_flags_g =
+static const bool H5F_def_clear_status_flags_g =
H5F_ACS_CLEAR_STATUS_FLAGS_DEF; /* Default to clear the superblock status_flags */
-static const hbool_t H5F_def_skip_eof_check_g =
+static const bool H5F_def_skip_eof_check_g =
H5F_ACS_SKIP_EOF_CHECK_DEF; /* Default setting for skipping EOF check */
-static const hbool_t H5F_def_null_fsm_addr_g =
+static const bool H5F_def_null_fsm_addr_g =
H5F_ACS_NULL_FSM_ADDR_DEF; /* Default setting for dropping free-space to the floor */
-static const hbool_t H5F_def_use_mdc_logging_g =
+static const bool H5F_def_use_mdc_logging_g =
H5F_ACS_USE_MDC_LOGGING_DEF; /* Default metadata cache logging flag */
-static const char *H5F_def_mdc_log_location_g = H5F_ACS_MDC_LOG_LOCATION_DEF; /* Default mdc log location */
-static const hbool_t H5F_def_start_mdc_log_on_access_g =
+static const char *H5F_def_mdc_log_location_g = H5F_ACS_MDC_LOG_LOCATION_DEF; /* Default mdc log location */
+static const bool H5F_def_start_mdc_log_on_access_g =
H5F_ACS_START_MDC_LOG_ON_ACCESS_DEF; /* Default mdc log start on access flag */
-static const hbool_t H5F_def_evict_on_close_flag_g =
+static const bool H5F_def_evict_on_close_flag_g =
H5F_ACS_EVICT_ON_CLOSE_FLAG_DEF; /* Default setting for evict on close property */
#ifdef H5_HAVE_PARALLEL
static const H5P_coll_md_read_flag_t H5F_def_coll_md_read_flag_g =
H5F_ACS_COLL_MD_READ_FLAG_DEF; /* Default setting for the collective metedata read flag */
-static const hbool_t H5F_def_coll_md_write_flag_g =
+static const bool H5F_def_coll_md_write_flag_g =
H5F_ACS_COLL_MD_WRITE_FLAG_DEF; /* Default setting for the collective metedata write flag */
static const MPI_Comm H5F_def_mpi_params_comm_g = H5F_ACS_MPI_PARAMS_COMM_DEF; /* Default MPI communicator */
static const MPI_Info H5F_def_mpi_params_info_g = H5F_ACS_MPI_PARAMS_INFO_DEF; /* Default MPI info struct */
@@ -526,9 +525,9 @@ static const unsigned H5F_def_page_buf_min_meta_perc_g =
H5F_ACS_PAGE_BUFFER_MIN_META_PERC_DEF; /* Default page buffer minimum metadata size */
static const unsigned H5F_def_page_buf_min_raw_perc_g =
H5F_ACS_PAGE_BUFFER_MIN_RAW_PERC_DEF; /* Default page buffer minimum raw data size */
-static const hbool_t H5F_def_use_file_locking_g =
+static const bool H5F_def_use_file_locking_g =
H5F_ACS_USE_FILE_LOCKING_DEF; /* Default use file locking flag */
-static const hbool_t H5F_def_ignore_disabled_file_locks_g =
+static const bool H5F_def_ignore_disabled_file_locks_g =
H5F_ACS_IGNORE_DISABLED_FILE_LOCKS_DEF; /* Default ignore disabled file locks flag */
/*-------------------------------------------------------------------------
@@ -845,14 +844,14 @@ herr_t
H5P__facc_set_def_driver(void)
{
const char *driver_env_var;
- hbool_t driver_ref_inc = FALSE;
+ bool driver_ref_inc = false;
hid_t driver_id = H5I_INVALID_HID; /* VFL driver ID */
herr_t ret_value = SUCCEED;
FUNC_ENTER_PACKAGE
/* Check if VFL driver environment variable is set */
- driver_env_var = HDgetenv(HDF5_DRIVER);
+ driver_env_var = getenv(HDF5_DRIVER);
/* Only parse VFL driver string if it's set */
if (driver_env_var && *driver_env_var) {
@@ -868,29 +867,29 @@ H5P__facc_set_def_driver(void)
if (driver_is_registered) {
assert(driver_id >= 0);
- if (H5I_inc_ref(driver_id, TRUE) < 0)
+ if (H5I_inc_ref(driver_id, true) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTINC, FAIL, "unable to increment ref count on VFD");
- driver_ref_inc = TRUE;
+ driver_ref_inc = true;
} /* end else-if */
else {
/* Check for VFL drivers that ship with the library */
if (H5P__facc_set_def_driver_check_predefined(driver_env_var, &driver_id) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't check for predefined VFL driver name");
else if (driver_id > 0) {
- if (H5I_inc_ref(driver_id, TRUE) < 0)
+ if (H5I_inc_ref(driver_id, true) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTINC, FAIL, "can't increment VFL driver refcount");
- driver_ref_inc = TRUE;
+ driver_ref_inc = true;
}
else {
/* Register the VFL driver */
- if ((driver_id = H5FD_register_driver_by_name(driver_env_var, TRUE)) < 0)
+ if ((driver_id = H5FD_register_driver_by_name(driver_env_var, true)) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTREGISTER, FAIL, "can't register VFL driver");
- driver_ref_inc = TRUE;
+ driver_ref_inc = true;
} /* end else */
} /* end else */
/* Retrieve driver configuration string from environment variable, if set. */
- driver_config_env_var = HDgetenv(HDF5_DRIVER_CONFIG);
+ driver_config_env_var = getenv(HDF5_DRIVER_CONFIG);
driver_prop.driver_id = driver_id;
driver_prop.driver_info = NULL;
@@ -949,35 +948,35 @@ H5P__facc_set_def_driver_check_predefined(const char *driver_name, hid_t *driver
assert(driver_name);
assert(driver_id);
- if (!HDstrcmp(driver_name, "sec2")) {
+ if (!strcmp(driver_name, "sec2")) {
if ((*driver_id = H5FD_SEC2) < 0)
HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize sec2 VFD");
}
- else if (!HDstrcmp(driver_name, "core") || !HDstrcmp(driver_name, "core_paged")) {
+ else if (!strcmp(driver_name, "core") || !strcmp(driver_name, "core_paged")) {
if ((*driver_id = H5FD_CORE) < 0)
HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize core VFD");
}
- else if (!HDstrcmp(driver_name, "log")) {
+ else if (!strcmp(driver_name, "log")) {
if ((*driver_id = H5FD_LOG) < 0)
HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize log VFD");
}
- else if (!HDstrcmp(driver_name, "family")) {
+ else if (!strcmp(driver_name, "family")) {
if ((*driver_id = H5FD_FAMILY) < 0)
HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize family VFD");
}
- else if (!HDstrcmp(driver_name, "multi") || !HDstrcmp(driver_name, "split")) {
+ else if (!strcmp(driver_name, "multi") || !strcmp(driver_name, "split")) {
if ((*driver_id = H5FD_MULTI) < 0)
HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize multi VFD");
}
- else if (!HDstrcmp(driver_name, "stdio")) {
+ else if (!strcmp(driver_name, "stdio")) {
if ((*driver_id = H5FD_STDIO) < 0)
HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize stdio VFD");
}
- else if (!HDstrcmp(driver_name, "splitter")) {
+ else if (!strcmp(driver_name, "splitter")) {
if ((*driver_id = H5FD_SPLITTER) < 0)
HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize splitter VFD");
}
- else if (!HDstrcmp(driver_name, "mpio")) {
+ else if (!strcmp(driver_name, "mpio")) {
#ifdef H5_HAVE_PARALLEL
if ((*driver_id = H5FD_MPIO) < 0)
HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize MPI I/O VFD");
@@ -985,7 +984,7 @@ H5P__facc_set_def_driver_check_predefined(const char *driver_name, hid_t *driver
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "MPI-I/O VFD is not enabled");
#endif
}
- else if (!HDstrcmp(driver_name, "direct")) {
+ else if (!strcmp(driver_name, "direct")) {
#ifdef H5_HAVE_DIRECT
if ((*driver_id = H5FD_DIRECT) < 0)
HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize Direct I/O VFD");
@@ -993,7 +992,7 @@ H5P__facc_set_def_driver_check_predefined(const char *driver_name, hid_t *driver
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "Direct I/O VFD is not enabled");
#endif
}
- else if (!HDstrcmp(driver_name, "mirror")) {
+ else if (!strcmp(driver_name, "mirror")) {
#ifdef H5_HAVE_MIRROR_VFD
if ((*driver_id = H5FD_MIRROR) < 0)
HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize mirror VFD");
@@ -1001,7 +1000,7 @@ H5P__facc_set_def_driver_check_predefined(const char *driver_name, hid_t *driver
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "Mirror VFD is not enabled");
#endif
}
- else if (!HDstrcmp(driver_name, "hdfs")) {
+ else if (!strcmp(driver_name, "hdfs")) {
#ifdef H5_HAVE_LIBHDFS
if ((*driver_id = H5FD_HDFS) < 0)
HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize HDFS VFD");
@@ -1009,7 +1008,7 @@ H5P__facc_set_def_driver_check_predefined(const char *driver_name, hid_t *driver
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "HDFS VFD is not enabled");
#endif
}
- else if (!HDstrcmp(driver_name, "ros3")) {
+ else if (!strcmp(driver_name, "ros3")) {
#ifdef H5_HAVE_ROS3_VFD
if ((*driver_id = H5FD_ROS3) < 0)
HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize ROS3 VFD");
@@ -1017,7 +1016,7 @@ H5P__facc_set_def_driver_check_predefined(const char *driver_name, hid_t *driver
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "ROS3 VFD is not enabled");
#endif
}
- else if (!HDstrcmp(driver_name, "subfiling")) {
+ else if (!strcmp(driver_name, "subfiling")) {
#ifdef H5_HAVE_SUBFILING_VFD
if ((*driver_id = H5FD_SUBFILING) < 0)
HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize Subfiling VFD");
@@ -1025,7 +1024,7 @@ H5P__facc_set_def_driver_check_predefined(const char *driver_name, hid_t *driver
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "Subfiling VFD is not enabled");
#endif
}
- else if (!HDstrcmp(driver_name, "windows")) {
+ else if (!strcmp(driver_name, "windows")) {
#ifdef H5_HAVE_WINDOWS
if ((*driver_id = H5FD_WINDOWS) < 0)
HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize Windows VFD");
@@ -1160,7 +1159,7 @@ H5P_set_driver(H5P_genplist_t *plist, hid_t new_driver_id, const void *new_drive
if (NULL == H5I_object_verify(new_driver_id, H5I_VFL))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file driver ID");
- if (TRUE == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS)) {
+ if (true == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS)) {
H5FD_driver_prop_t driver_prop; /* Property for driver ID, info & config. string */
/* Prepare the driver property */
@@ -1237,7 +1236,7 @@ H5Pset_driver(hid_t plist_id, hid_t new_driver_id, const void *new_driver_info)
*/
herr_t
H5P_set_driver_by_name(H5P_genplist_t *plist, const char *driver_name, const char *driver_config,
- hbool_t app_ref)
+ bool app_ref)
{
hid_t new_driver_id = H5I_INVALID_HID;
herr_t ret_value = SUCCEED;
@@ -1299,7 +1298,7 @@ H5Pset_driver_by_name(hid_t plist_id, const char *driver_name, const char *drive
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "driver_name parameter cannot be an empty string");
/* Set the driver */
- if (H5P_set_driver_by_name(plist, driver_name, driver_config, TRUE) < 0)
+ if (H5P_set_driver_by_name(plist, driver_name, driver_config, true) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set driver info");
done:
@@ -1325,7 +1324,7 @@ H5Pset_driver_by_name(hid_t plist_id, const char *driver_name, const char *drive
*/
herr_t
H5P_set_driver_by_value(H5P_genplist_t *plist, H5FD_class_value_t driver_value, const char *driver_config,
- hbool_t app_ref)
+ bool app_ref)
{
hid_t new_driver_id = H5I_INVALID_HID;
herr_t ret_value = SUCCEED;
@@ -1385,7 +1384,7 @@ H5Pset_driver_by_value(hid_t plist_id, H5FD_class_value_t driver_value, const ch
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "negative VFD value is disallowed");
/* Set the driver */
- if (H5P_set_driver_by_value(plist, driver_value, driver_config, TRUE) < 0)
+ if (H5P_set_driver_by_value(plist, driver_value, driver_config, true) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set driver info");
done:
@@ -1415,7 +1414,7 @@ H5P_peek_driver(H5P_genplist_t *plist)
FUNC_ENTER_NOAPI(FAIL)
/* Get the current driver ID */
- if (TRUE == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS)) {
+ if (true == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS)) {
H5FD_driver_prop_t driver_prop; /* Property for driver ID, info & configuration string */
if (H5P_peek(plist, H5F_ACS_FILE_DRV_NAME, &driver_prop) < 0)
@@ -1493,7 +1492,7 @@ H5P_peek_driver_info(H5P_genplist_t *plist)
FUNC_ENTER_NOAPI(NULL)
/* Get the current driver info */
- if (TRUE == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS)) {
+ if (true == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS)) {
H5FD_driver_prop_t driver_prop; /* Property for driver ID, info & configuration string */
if (H5P_peek(plist, H5F_ACS_FILE_DRV_NAME, &driver_prop) < 0)
@@ -1565,7 +1564,7 @@ H5P_peek_driver_config_str(H5P_genplist_t *plist)
FUNC_ENTER_NOAPI(NULL)
/* Get the current driver configuration string */
- if (TRUE == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS)) {
+ if (true == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS)) {
H5FD_driver_prop_t driver_prop; /* Property for driver ID, info & configuration string */
if (H5P_peek(plist, H5F_ACS_FILE_DRV_NAME, &driver_prop) < 0)
@@ -1617,10 +1616,10 @@ H5Pget_driver_config_str(hid_t fapl_id, char *config_buf, size_t buf_size)
/* Retrieve configuration string property */
if ((config_str = H5P_peek_driver_config_str(plist))) {
- size_t config_str_len = HDstrlen(config_str);
+ size_t config_str_len = strlen(config_str);
if (config_buf) {
- HDstrncpy(config_buf, config_str, buf_size);
+ strncpy(config_buf, config_str, buf_size);
if (config_str_len >= buf_size)
config_buf[buf_size - 1] = '\0';
}
@@ -1661,7 +1660,7 @@ H5P__file_driver_copy(void *value)
/* Copy the driver & info, if there is one */
if (info->driver_id > 0) {
/* Increment the reference count on driver and copy driver info */
- if (H5I_inc_ref(info->driver_id, FALSE) < 0)
+ if (H5I_inc_ref(info->driver_id, false) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINC, FAIL, "unable to increment ref count on VFL driver");
/* Copy driver info, if it exists */
@@ -1917,7 +1916,7 @@ H5P__facc_file_driver_cmp(const void *_info1, const void *_info2, size_t H5_ATTR
HGOTO_DONE(-1);
if (cls1->name != NULL && cls2->name == NULL)
HGOTO_DONE(1);
- if (0 != (cmp_value = HDstrcmp(cls1->name, cls2->name)))
+ if (0 != (cmp_value = strcmp(cls1->name, cls2->name)))
HGOTO_DONE(cmp_value);
/* Compare driver infos */
@@ -1942,7 +1941,7 @@ H5P__facc_file_driver_cmp(const void *_info1, const void *_info2, size_t H5_ATTR
if (info1->driver_config_str != NULL && info2->driver_config_str == NULL)
HGOTO_DONE(1);
if (info1->driver_config_str) {
- if (0 != (cmp_value = HDstrcmp(info1->driver_config_str, info2->driver_config_str)))
+ if (0 != (cmp_value = strcmp(info1->driver_config_str, info2->driver_config_str)))
HGOTO_DONE(cmp_value);
}
@@ -4098,7 +4097,7 @@ H5P__facc_cache_config_dec(const void **_pp, void *_value)
H5_DECODE_UNSIGNED(*pp, config->close_trace_file);
- HDstrcpy(config->trace_file_name, (const char *)(*pp));
+ strcpy(config->trace_file_name, (const char *)(*pp));
*pp += H5AC__MAX_TRACE_FILE_NAME_LEN + 1;
H5_DECODE_UNSIGNED(*pp, config->evictions_enabled);
@@ -4623,7 +4622,7 @@ H5Pget_mdc_log_options(hid_t plist_id, hbool_t *is_enabled /*out*/, char *locati
/* Get location size, including terminating NULL */
if (location_size) {
if (location_ptr)
- *location_size = HDstrlen(location_ptr) + 1;
+ *location_size = strlen(location_ptr) + 1;
else
*location_size = 0;
} /* end if */
@@ -4659,7 +4658,7 @@ H5P__facc_mdc_log_location_enc(const void *value, void **_pp, size_t *size)
/* calculate prefix length */
if (NULL != log_location)
- len = HDstrlen(log_location);
+ len = strlen(log_location);
enc_value = (uint64_t)len;
enc_size = H5VM_limit_enc_size(enc_value);
@@ -4725,7 +4724,7 @@ H5P__facc_mdc_log_location_dec(const void **_pp, void *_value)
/* Make a copy of the user's prefix string */
if (NULL == (*log_location = (char *)H5MM_malloc(len + 1)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "memory allocation failed for prefix");
- HDstrncpy(*log_location, *(const char **)pp, len);
+ strncpy(*log_location, *(const char **)pp, len);
(*log_location)[len] = '\0';
*pp += len;
@@ -4805,7 +4804,7 @@ H5P__facc_mdc_log_location_cmp(const void *value1, const void *value2, size_t H5
if (NULL != pref1 && NULL == pref2)
HGOTO_DONE(-1);
if (NULL != pref1 && NULL != pref2)
- ret_value = HDstrcmp(pref1, pref2);
+ ret_value = strcmp(pref1, pref2);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -4858,7 +4857,7 @@ H5Pset_evict_on_close(hid_t fapl_id, hbool_t H5_ATTR_PARALLEL_UNUSED evict_on_cl
H5TRACE2("e", "ib", fapl_id, evict_on_close);
/* Compare the property list's class against the other class */
- if (TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
+ if (true != H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not a file access plist");
/* Get the plist structure */
@@ -4903,7 +4902,7 @@ H5Pget_evict_on_close(hid_t fapl_id, hbool_t *evict_on_close /*out*/)
H5TRACE2("e", "ix", fapl_id, evict_on_close);
/* Compare the property list's class against the other class */
- if (TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
+ if (true != H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not an access plist");
/* Get the plist structure */
@@ -4945,7 +4944,7 @@ H5Pset_file_locking(hid_t fapl_id, hbool_t use_file_locking, hbool_t ignore_when
H5TRACE3("e", "ibb", fapl_id, use_file_locking, ignore_when_disabled);
/* Make sure this is a fapl */
- if (TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
+ if (true != H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not a file access plist");
/* Get the plist structure */
@@ -4984,7 +4983,7 @@ H5Pget_file_locking(hid_t fapl_id, hbool_t *use_file_locking /*out*/, hbool_t *i
H5TRACE3("e", "ixx", fapl_id, use_file_locking, ignore_when_disabled);
/* Make sure this is a fapl */
- if (TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
+ if (true != H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not an access plist");
/* Get the plist structure */
@@ -5098,10 +5097,10 @@ H5Pset_all_coll_metadata_ops(hid_t plist_id, hbool_t is_collective)
/* (Dataset, group, attribute, and named datatype access property lists
* are sub-classes of link access property lists -QAK)
*/
- if (TRUE != H5P_isa_class(plist_id, H5P_LINK_ACCESS) && TRUE != H5P_isa_class(plist_id, H5P_FILE_ACCESS))
+ if (true != H5P_isa_class(plist_id, H5P_LINK_ACCESS) && true != H5P_isa_class(plist_id, H5P_FILE_ACCESS))
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not an access plist");
- /* set property to either TRUE if > 0, or FALSE otherwise */
+ /* set property to either true if > 0, or false otherwise */
if (is_collective)
coll_meta_read = H5P_USER_TRUE;
else
@@ -5145,13 +5144,13 @@ H5Pget_all_coll_metadata_ops(hid_t plist_id, hbool_t *is_collective /*out*/)
/* (Dataset, group, attribute, and named datatype access property lists
* are sub-classes of link access property lists -QAK)
*/
- if (TRUE != H5P_isa_class(plist_id, H5P_LINK_ACCESS) && TRUE != H5P_isa_class(plist_id, H5P_FILE_ACCESS))
+ if (true != H5P_isa_class(plist_id, H5P_LINK_ACCESS) && true != H5P_isa_class(plist_id, H5P_FILE_ACCESS))
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not an access plist");
/* Get value */
if (is_collective) {
H5P_coll_md_read_flag_t
- internal_flag; /* property setting. we need to convert to either TRUE or FALSE */
+ internal_flag; /* property setting. we need to convert to either true or false */
H5P_genplist_t *plist; /* Property list pointer */
/* Get the plist structure */
@@ -5162,9 +5161,9 @@ H5Pget_all_coll_metadata_ops(hid_t plist_id, hbool_t *is_collective /*out*/)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get core collective metadata read flag");
if (internal_flag < 0)
- *is_collective = FALSE;
+ *is_collective = false;
else
- *is_collective = (hbool_t)internal_flag;
+ *is_collective = (bool)internal_flag;
} /* end if */
done:
@@ -5191,7 +5190,7 @@ H5Pset_coll_metadata_write(hid_t plist_id, hbool_t is_collective)
H5TRACE2("e", "ib", plist_id, is_collective);
/* Compare the property list's class against the other class */
- if (TRUE != H5P_isa_class(plist_id, H5P_FILE_ACCESS))
+ if (true != H5P_isa_class(plist_id, H5P_FILE_ACCESS))
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not a file access plist");
/* Get the plist structure */
@@ -5225,7 +5224,7 @@ H5Pget_mpi_params(hid_t plist_id, MPI_Comm *comm /*out*/, MPI_Info *info /*out*/
H5TRACE3("e", "ixx", plist_id, comm, info);
/* Make sure that the property list is a fapl */
- if (TRUE != H5P_isa_class(plist_id, H5P_FILE_ACCESS))
+ if (true != H5P_isa_class(plist_id, H5P_FILE_ACCESS))
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not a file access plist");
/* Get the plist structure */
@@ -5265,7 +5264,7 @@ H5Pset_mpi_params(hid_t plist_id, MPI_Comm comm, MPI_Info info)
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "not a valid argument");
/* Make sure that the property list is a fapl */
- if (TRUE != H5P_isa_class(plist_id, H5P_FILE_ACCESS))
+ if (true != H5P_isa_class(plist_id, H5P_FILE_ACCESS))
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not a file access plist");
/* Get the plist structure */
@@ -5669,7 +5668,7 @@ H5Pget_coll_metadata_write(hid_t plist_id, hbool_t *is_collective /*out*/)
H5TRACE2("e", "ix", plist_id, is_collective);
/* Compare the property list's class against the other class */
- if (TRUE != H5P_isa_class(plist_id, H5P_FILE_ACCESS))
+ if (true != H5P_isa_class(plist_id, H5P_FILE_ACCESS))
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not an access plist");
/* Get the plist structure */
@@ -5792,7 +5791,7 @@ H5P_set_vol(H5P_genplist_t *plist, hid_t vol_id, const void *vol_info)
if (NULL == H5I_object_verify(vol_id, H5I_VOL))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID");
- if (TRUE == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS)) {
+ if (true == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS)) {
H5VL_connector_prop_t vol_prop; /* Property for VOL ID & info */
/* Prepare the VOL connector property */
@@ -5905,7 +5904,7 @@ H5Pget_vol_id(hid_t plist_id, hid_t *vol_id /*out*/)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list");
/* Get the current VOL ID */
- if (TRUE == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS)) {
+ if (true == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS)) {
H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */
/* Get the connector property */
@@ -5913,7 +5912,7 @@ H5Pget_vol_id(hid_t plist_id, hid_t *vol_id /*out*/)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get VOL connector info");
/* Increment the VOL ID's ref count */
- if (H5I_inc_ref(connector_prop.connector_id, TRUE) < 0)
+ if (H5I_inc_ref(connector_prop.connector_id, true) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINC, FAIL, "unable to increment ref count on VOL connector ID");
/* Set the connector ID to return */
@@ -5951,7 +5950,7 @@ H5Pget_vol_info(hid_t plist_id, void **vol_info /*out*/)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list");
/* Get the current VOL info */
- if (TRUE == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS)) {
+ if (true == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS)) {
void *new_connector_info = NULL; /* Copy of connector info */
H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */
@@ -6019,7 +6018,7 @@ H5Pget_vol_cap_flags(hid_t plist_id, uint64_t *cap_flags)
if (H5P_DEFAULT == plist_id)
plist_id = H5P_FILE_ACCESS_DEFAULT;
- if (TRUE == H5P_isa_class(plist_id, H5P_FILE_ACCESS)) {
+ if (true == H5P_isa_class(plist_id, H5P_FILE_ACCESS)) {
H5P_genplist_t *plist; /* Property list pointer */
H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */
diff --git a/src/H5Pfcpl.c b/src/H5Pfcpl.c
index 9c14add1b9a..b15e2c9a699 100644
--- a/src/H5Pfcpl.c
+++ b/src/H5Pfcpl.c
@@ -102,10 +102,10 @@
#define H5F_CRT_FILE_SPACE_STRATEGY_DEF H5F_FILE_SPACE_STRATEGY_DEF
#define H5F_CRT_FILE_SPACE_STRATEGY_ENC H5P__fcrt_fspace_strategy_enc
#define H5F_CRT_FILE_SPACE_STRATEGY_DEC H5P__fcrt_fspace_strategy_dec
-#define H5F_CRT_FREE_SPACE_PERSIST_SIZE sizeof(hbool_t)
+#define H5F_CRT_FREE_SPACE_PERSIST_SIZE sizeof(bool)
#define H5F_CRT_FREE_SPACE_PERSIST_DEF H5F_FREE_SPACE_PERSIST_DEF
-#define H5F_CRT_FREE_SPACE_PERSIST_ENC H5P__encode_hbool_t
-#define H5F_CRT_FREE_SPACE_PERSIST_DEC H5P__decode_hbool_t
+#define H5F_CRT_FREE_SPACE_PERSIST_ENC H5P__encode_bool
+#define H5F_CRT_FREE_SPACE_PERSIST_DEC H5P__decode_bool
#define H5F_CRT_FREE_SPACE_THRESHOLD_SIZE sizeof(hsize_t)
#define H5F_CRT_FREE_SPACE_THRESHOLD_DEF H5F_FREE_SPACE_THRESHOLD_DEF
#define H5F_CRT_FREE_SPACE_THRESHOLD_ENC H5P__encode_hsize_t
@@ -189,7 +189,7 @@ static const unsigned H5F_def_sohm_index_minsizes_g[H5O_SHMESG_MAX_NINDEXES] =
static const unsigned H5F_def_sohm_list_max_g = H5F_CRT_SHMSG_LIST_MAX_DEF;
static const unsigned H5F_def_sohm_btree_min_g = H5F_CRT_SHMSG_BTREE_MIN_DEF;
static const H5F_fspace_strategy_t H5F_def_file_space_strategy_g = H5F_CRT_FILE_SPACE_STRATEGY_DEF;
-static const hbool_t H5F_def_free_space_persist_g = H5F_CRT_FREE_SPACE_PERSIST_DEF;
+static const bool H5F_def_free_space_persist_g = H5F_CRT_FREE_SPACE_PERSIST_DEF;
static const hsize_t H5F_def_free_space_threshold_g = H5F_CRT_FREE_SPACE_THRESHOLD_DEF;
static const hsize_t H5F_def_file_space_page_size_g = H5F_CRT_FILE_SPACE_PAGE_SIZE_DEF;
diff --git a/src/H5Pfmpl.c b/src/H5Pfmpl.c
index 9dac659558b..ff6a3a3a1b2 100644
--- a/src/H5Pfmpl.c
+++ b/src/H5Pfmpl.c
@@ -40,8 +40,8 @@
/* ======================== File Mount properties ====================*/
/* Definition for whether absolute symlinks local to file. */
-#define H5F_MNT_SYM_LOCAL_SIZE sizeof(hbool_t)
-#define H5F_MNT_SYM_LOCAL_DEF FALSE
+#define H5F_MNT_SYM_LOCAL_SIZE sizeof(bool)
+#define H5F_MNT_SYM_LOCAL_DEF false
/******************/
/* Local Typedefs */
@@ -90,7 +90,7 @@ const H5P_libclass_t H5P_CLS_FMNT[1] = {{
/*******************/
/* Property value defaults */
-static const hbool_t H5F_def_local_g = H5F_MNT_SYM_LOCAL_DEF; /* Whether symlinks are local to file */
+static const bool H5F_def_local_g = H5F_MNT_SYM_LOCAL_DEF; /* Whether symlinks are local to file */
/*-------------------------------------------------------------------------
* Function: H5P__fmnt_reg_prop
diff --git a/src/H5Pgcpl.c b/src/H5Pgcpl.c
index cf60f43db6d..364955be901 100644
--- a/src/H5Pgcpl.c
+++ b/src/H5Pgcpl.c
@@ -252,9 +252,9 @@ H5Pset_link_phase_change(hid_t plist_id, unsigned max_compact, unsigned min_dens
/* Update fields */
if (max_compact != H5G_CRT_GINFO_MAX_COMPACT || min_dense != H5G_CRT_GINFO_MIN_DENSE)
- ginfo.store_link_phase_change = TRUE;
+ ginfo.store_link_phase_change = true;
else
- ginfo.store_link_phase_change = FALSE;
+ ginfo.store_link_phase_change = false;
ginfo.max_compact = (uint16_t)max_compact;
ginfo.min_dense = (uint16_t)min_dense;
@@ -350,9 +350,9 @@ H5Pset_est_link_info(hid_t plist_id, unsigned est_num_entries, unsigned est_name
/* Update fields */
if (est_num_entries != H5G_CRT_GINFO_EST_NUM_ENTRIES || est_name_len != H5G_CRT_GINFO_EST_NAME_LEN)
- ginfo.store_est_entry_info = TRUE;
+ ginfo.store_est_entry_info = true;
else
- ginfo.store_est_entry_info = FALSE;
+ ginfo.store_est_entry_info = false;
ginfo.est_num_entries = (uint16_t)est_num_entries;
ginfo.est_name_len = (uint16_t)est_name_len;
@@ -437,8 +437,8 @@ H5Pset_link_creation_order(hid_t plist_id, unsigned crt_order_flags)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get link info");
/* Update fields */
- linfo.track_corder = (hbool_t)((crt_order_flags & H5P_CRT_ORDER_TRACKED) ? TRUE : FALSE);
- linfo.index_corder = (hbool_t)((crt_order_flags & H5P_CRT_ORDER_INDEXED) ? TRUE : FALSE);
+ linfo.track_corder = (bool)((crt_order_flags & H5P_CRT_ORDER_TRACKED) ? true : false);
+ linfo.index_corder = (bool)((crt_order_flags & H5P_CRT_ORDER_INDEXED) ? true : false);
/* Set link info */
if (H5P_set(plist, H5G_CRT_LINK_INFO_NAME, &linfo) < 0)
@@ -556,15 +556,15 @@ H5P__gcrt_group_info_dec(const void **_pp, void *_value)
/* Update fields */
if (ginfo->max_compact != H5G_CRT_GINFO_MAX_COMPACT || ginfo->min_dense != H5G_CRT_GINFO_MIN_DENSE)
- ginfo->store_link_phase_change = TRUE;
+ ginfo->store_link_phase_change = true;
else
- ginfo->store_link_phase_change = FALSE;
+ ginfo->store_link_phase_change = false;
if (ginfo->est_num_entries != H5G_CRT_GINFO_EST_NUM_ENTRIES ||
ginfo->est_name_len != H5G_CRT_GINFO_EST_NAME_LEN)
- ginfo->store_est_entry_info = TRUE;
+ ginfo->store_est_entry_info = true;
else
- ginfo->store_est_entry_info = FALSE;
+ ginfo->store_est_entry_info = false;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5P__gcrt_group_info_dec() */
@@ -641,8 +641,8 @@ H5P__gcrt_link_info_dec(const void **_pp, void *_value)
H5_DECODE_UNSIGNED(*pp, crt_order_flags);
/* Update fields */
- linfo->track_corder = (hbool_t)((crt_order_flags & H5P_CRT_ORDER_TRACKED) ? TRUE : FALSE);
- linfo->index_corder = (hbool_t)((crt_order_flags & H5P_CRT_ORDER_INDEXED) ? TRUE : FALSE);
+ linfo->track_corder = (bool)((crt_order_flags & H5P_CRT_ORDER_TRACKED) ? true : false);
+ linfo->index_corder = (bool)((crt_order_flags & H5P_CRT_ORDER_INDEXED) ? true : false);
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Pint.c b/src/H5Pint.c
index b9db9150747..f6dbb2706c1 100644
--- a/src/H5Pint.c
+++ b/src/H5Pint.c
@@ -476,13 +476,13 @@ H5P_init_phase1(void)
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "can't register properties");
/* Register the new class */
- if ((*lib_class->class_id = H5I_register(H5I_GENPROP_CLS, *lib_class->pclass, FALSE)) < 0)
+ if ((*lib_class->class_id = H5I_register(H5I_GENPROP_CLS, *lib_class->pclass, false)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "can't register property list class");
/* Only register the default property list if it hasn't been created yet */
if (lib_class->def_plist_id && *lib_class->def_plist_id == (-1)) {
/* Register the default property list for the new class*/
- if ((*lib_class->def_plist_id = H5P_create_id(*lib_class->pclass, FALSE)) < 0)
+ if ((*lib_class->def_plist_id = H5P_create_id(*lib_class->pclass, false)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL,
"can't register default property list for class");
} /* end if */
@@ -500,7 +500,7 @@ H5P_init_phase1(void)
done:
if (ret_value < 0 && tot_init > 0) {
/* First uninitialize all default property lists */
- H5I_clear_type(H5I_GENPROP_LST, FALSE, FALSE);
+ H5I_clear_type(H5I_GENPROP_LST, false, false);
/* Then uninitialize any initialized libclass */
for (u = 0; u < NELMTS(init_class); u++) {
@@ -588,7 +588,7 @@ H5P_term_package(void)
if ((nclass + nlist) > 0) {
/* Clear the lists */
if (nlist > 0) {
- (void)H5I_clear_type(H5I_GENPROP_LST, FALSE, FALSE);
+ (void)H5I_clear_type(H5I_GENPROP_LST, false, false);
/* Reset the default property lists, if they've been closed */
if (H5I_nmembers(H5I_GENPROP_LST) == 0) {
@@ -616,7 +616,7 @@ H5P_term_package(void)
/* Only attempt to close the classes after all the lists are closed */
if (nlist == 0 && nclass > 0) {
- (void)H5I_clear_type(H5I_GENPROP_CLS, FALSE, FALSE);
+ (void)H5I_clear_type(H5I_GENPROP_CLS, false, false);
/* Reset the default property classes and IDs if they've been closed */
if (H5I_nmembers(H5I_GENPROP_CLS) == 0) {
@@ -903,7 +903,7 @@ H5P__copy_pclass(H5P_genclass_t *pclass)
REVISION LOG
--------------------------------------------------------------------------*/
hid_t
-H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref)
+H5P_copy_plist(const H5P_genplist_t *old_plist, bool app_ref)
{
H5P_genclass_t *tclass; /* Temporary class pointer */
H5P_genplist_t *new_plist = NULL; /* New property list generated from copy */
@@ -913,7 +913,7 @@ H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref)
H5SL_node_t *curr_node; /* Current node in skip list */
H5SL_t *seen = NULL; /* Skip list containing properties already seen */
size_t nseen; /* Number of items 'seen' */
- hbool_t has_parent_class; /* Flag to indicate that this property list's class has a parent */
+ bool has_parent_class; /* Flag to indicate that this property list's class has a parent */
hid_t ret_value = H5I_INVALID_HID; /* return value */
FUNC_ENTER_NOAPI(H5I_INVALID_HID)
@@ -931,7 +931,7 @@ H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref)
/* Set class state */
new_plist->pclass = old_plist->pclass;
new_plist->nprops = 0; /* Initially the plist has the same number of properties as the class */
- new_plist->class_init = FALSE; /* Initially, wait until the class callback finishes to set */
+ new_plist->class_init = false; /* Initially, wait until the class callback finishes to set */
/* Initialize the skip list to hold the changed properties */
if ((new_plist->props = H5SL_create(H5SL_TYPE_STR, NULL)) == NULL)
@@ -1022,7 +1022,7 @@ H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref)
* initialize each with default value & make property 'copy' callback.
*/
tclass = old_plist->pclass;
- has_parent_class = (hbool_t)(tclass != NULL && tclass->parent != NULL && tclass->parent->nprops > 0);
+ has_parent_class = (bool)(tclass != NULL && tclass->parent != NULL && tclass->parent->nprops > 0);
while (tclass != NULL) {
if (tclass->nprops > 0) {
/* Walk through the properties in the old class */
@@ -1091,7 +1091,7 @@ H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref)
} /* end while */
/* Set the class initialization flag */
- new_plist->class_init = TRUE;
+ new_plist->class_init = true;
/* Set the return value */
ret_value = new_plist_id;
@@ -1149,7 +1149,7 @@ H5P__dup_prop(H5P_genprop_t *oprop, H5P_prop_within_t type)
/* Duplicating property for a class */
if (type == H5P_PROP_WITHIN_CLASS) {
assert(oprop->type == H5P_PROP_WITHIN_CLASS);
- assert(oprop->shared_name == FALSE);
+ assert(oprop->shared_name == false);
/* Duplicate name */
prop->name = H5MM_xstrdup(oprop->name);
@@ -1167,10 +1167,10 @@ H5P__dup_prop(H5P_genprop_t *oprop, H5P_prop_within_t type)
/* Duplicating a property from a class */
else {
assert(oprop->type == H5P_PROP_WITHIN_CLASS);
- assert(oprop->shared_name == FALSE);
+ assert(oprop->shared_name == false);
/* Share the name */
- prop->shared_name = TRUE;
+ prop->shared_name = true;
/* Set the type */
prop->type = type;
@@ -1258,7 +1258,7 @@ H5P__create_prop(const char *name, size_t size, H5P_prop_within_t type, const vo
/* Set the property initial values */
prop->name = H5MM_xstrdup(name); /* Duplicate name */
- prop->shared_name = FALSE;
+ prop->shared_name = false;
prop->size = size;
prop->type = type;
@@ -1498,7 +1498,7 @@ static herr_t
H5P__free_prop_cb(void *item, void H5_ATTR_UNUSED *key, void *op_data)
{
H5P_genprop_t *tprop = (H5P_genprop_t *)item; /* Temporary pointer to property */
- hbool_t make_cb = *(hbool_t *)op_data; /* Whether to make property 'close' callback */
+ bool make_cb = *(bool *)op_data; /* Whether to make property 'close' callback */
FUNC_ENTER_PACKAGE_NOERR
@@ -1598,7 +1598,7 @@ H5P__access_class(H5P_genclass_t *pclass, H5P_class_mod_t mod)
case H5P_MOD_INC_REF: /* Increment the ID reference count*/
/* Reset the deleted flag if incrementing the reference count */
if (pclass->deleted)
- pclass->deleted = FALSE;
+ pclass->deleted = false;
pclass->ref_count++;
break;
@@ -1607,7 +1607,7 @@ H5P__access_class(H5P_genclass_t *pclass, H5P_class_mod_t mod)
/* Mark the class object as deleted if reference count drops to zero */
if (pclass->ref_count == 0)
- pclass->deleted = TRUE;
+ pclass->deleted = true;
break;
case H5P_MOD_ERR:
@@ -1625,7 +1625,7 @@ H5P__access_class(H5P_genclass_t *pclass, H5P_class_mod_t mod)
/* Free the class properties without making callbacks */
if (pclass->props) {
- hbool_t make_cb = FALSE;
+ bool make_cb = false;
H5SL_destroy(pclass->props, H5P__free_prop_cb, &make_cb);
} /* end if */
@@ -1677,7 +1677,7 @@ H5P__open_class_path_cb(void *_obj, hid_t H5_ATTR_UNUSED id, void *_key)
/* Check if the class object has the same parent as the new class */
if (obj->parent == key->parent) {
/* Check if they have the same name */
- if (HDstrcmp(obj->name, key->name) == 0) {
+ if (strcmp(obj->name, key->name) == 0) {
key->new_class = obj;
ret_value = 1; /* Indicate a match */
} /* end if */
@@ -1748,7 +1748,7 @@ H5P__create_class(H5P_genclass_t *par_class, const char *name, H5P_plist_type_t
pclass->plists = 0; /* No properties lists of this class yet */
pclass->classes = 0; /* No classes derived from this class yet */
pclass->ref_count = 1; /* This is the first reference to the new class */
- pclass->deleted = FALSE; /* Not deleted yet... :-) */
+ pclass->deleted = false; /* Not deleted yet... :-) */
pclass->revision = H5P_GET_NEXT_REV; /* Get a revision number for the class */
/* Create the skip list for properties */
@@ -1779,7 +1779,7 @@ H5P__create_class(H5P_genclass_t *par_class, const char *name, H5P_plist_type_t
if (pclass->name)
H5MM_xfree(pclass->name);
if (pclass->props) {
- hbool_t make_cb = FALSE;
+ bool make_cb = false;
H5SL_destroy(pclass->props, H5P__free_prop_cb, &make_cb);
} /* end if */
@@ -1838,7 +1838,7 @@ H5P__create(H5P_genclass_t *pclass)
/* Set class state */
plist->pclass = pclass;
plist->nprops = 0; /* Initially the plist has the same number of properties as the class */
- plist->class_init = FALSE; /* Initially, wait until the class callback finishes to set */
+ plist->class_init = false; /* Initially, wait until the class callback finishes to set */
/* Create the skip list for changed properties */
if ((plist->props = H5SL_create(H5SL_TYPE_STR, NULL)) == NULL)
@@ -1955,7 +1955,7 @@ H5P__create(H5P_genclass_t *pclass)
REVISION LOG
--------------------------------------------------------------------------*/
hid_t
-H5P_create_id(H5P_genclass_t *pclass, hbool_t app_ref)
+H5P_create_id(H5P_genclass_t *pclass, bool app_ref)
{
H5P_genclass_t *tclass; /* Temporary class pointer */
H5P_genplist_t *plist = NULL; /* Property list created */
@@ -1996,7 +1996,7 @@ H5P_create_id(H5P_genclass_t *pclass, hbool_t app_ref)
} /* end while */
/* Set the class initialization flag */
- plist->class_init = TRUE;
+ plist->class_init = true;
/* Set the return value */
ret_value = plist_id;
@@ -3321,25 +3321,25 @@ H5P_exist_plist(const H5P_genplist_t *plist, const char *name)
/* Check for property in deleted property list */
if (H5SL_search(plist->del, name) != NULL)
- ret_value = FALSE;
+ ret_value = false;
else {
/* Check for property in changed property list */
if (H5SL_search(plist->props, name) != NULL)
- ret_value = TRUE;
+ ret_value = true;
else {
H5P_genclass_t *tclass; /* Temporary class pointer */
tclass = plist->pclass;
while (tclass != NULL) {
if (H5SL_search(tclass->props, name) != NULL)
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
/* Go up to parent class */
tclass = tclass->parent;
} /* end while */
/* If we've reached here, we couldn't find the property */
- ret_value = FALSE;
+ ret_value = false;
} /* end else */
} /* end else */
@@ -3380,21 +3380,21 @@ H5P__exist_pclass(H5P_genclass_t *pclass, const char *name)
/* Check for property in property list */
if (H5SL_search(pclass->props, name) != NULL)
- ret_value = TRUE;
+ ret_value = true;
else {
H5P_genclass_t *tclass; /* Temporary class pointer */
tclass = pclass->parent;
while (tclass != NULL) {
if (H5SL_search(tclass->props, name) != NULL)
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
/* Go up to parent class */
tclass = tclass->parent;
} /* end while */
/* If we've reached here, we couldn't find the property */
- ret_value = FALSE;
+ ret_value = false;
} /* end else */
done:
@@ -3534,7 +3534,7 @@ H5P__get_nprops_plist(const H5P_genplist_t *plist, size_t *nprops)
herr_t H5P_get_nprops_pclass(pclass, nprops)
H5P_genclass_t *pclass; IN: Property class to check
size_t *nprops; OUT: Number of properties in the property list
- hbool_t recurse; IN: Include properties in parent class(es) also
+ bool recurse; IN: Include properties in parent class(es) also
RETURNS
Success: non-negative value (can't fail)
Failure: negative value
@@ -3547,7 +3547,7 @@ H5P__get_nprops_plist(const H5P_genplist_t *plist, size_t *nprops)
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5P_get_nprops_pclass(const H5P_genclass_t *pclass, size_t *nprops, hbool_t recurse)
+H5P_get_nprops_pclass(const H5P_genclass_t *pclass, size_t *nprops, bool recurse)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -3603,7 +3603,7 @@ H5P__cmp_prop(const H5P_genprop_t *prop1, const H5P_genprop_t *prop2)
assert(prop2);
/* Check the name */
- if ((cmp_value = HDstrcmp(prop1->name, prop2->name)) != 0)
+ if ((cmp_value = strcmp(prop1->name, prop2->name)) != 0)
HGOTO_DONE(cmp_value);
/* Check the size of properties */
@@ -3738,7 +3738,7 @@ H5P__cmp_class(const H5P_genclass_t *pclass1, const H5P_genclass_t *pclass2)
HGOTO_DONE(0);
/* Check the name */
- if ((cmp_value = HDstrcmp(pclass1->name, pclass2->name)) != 0)
+ if ((cmp_value = strcmp(pclass1->name, pclass2->name)) != 0)
HGOTO_DONE(cmp_value);
/* Check the number of properties */
@@ -3950,7 +3950,7 @@ H5P__cmp_plist(const H5P_genplist_t *plist1, const H5P_genplist_t *plist2, int *
udata.plist2 = plist2;
/* Iterate over properties in first property list */
- if ((ret_value = H5P__iterate_plist(plist1, TRUE, &idx, H5P__cmp_plist_cb, &udata)) < 0)
+ if ((ret_value = H5P__iterate_plist(plist1, true, &idx, H5P__cmp_plist_cb, &udata)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to iterate over list");
if (ret_value != 0) {
*cmp_ret = udata.cmp_value;
@@ -3979,7 +3979,7 @@ H5P__cmp_plist(const H5P_genplist_t *plist1, const H5P_genplist_t *plist2, int *
H5P_genclass_t *pclass1; IN: Property class to check
H5P_genclass_t *pclass2; IN: Property class to compare with
RETURNS
- Success: TRUE (1) or FALSE (0)
+ Success: true (1) or false (0)
Failure: negative value
DESCRIPTION
This routine queries whether a property class is the same as another class,
@@ -4003,14 +4003,14 @@ H5P_class_isa(const H5P_genclass_t *pclass1, const H5P_genclass_t *pclass2)
/* Compare property classes */
if (H5P__cmp_class(pclass1, pclass2) == 0) {
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
}
else {
/* Check if the class is derived, and walk up the chain, if so */
if (pclass1->parent != NULL)
ret_value = H5P_class_isa(pclass1->parent, pclass2);
else
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
} /* end else */
done:
@@ -4027,7 +4027,7 @@ H5P_class_isa(const H5P_genclass_t *pclass1, const H5P_genclass_t *pclass2)
hid_t plist_id; IN: Property list to query
hid_t pclass_id; IN: Property class to query
RETURNS
- Success: TRUE (1) or FALSE (0)
+ Success: true (1) or false (0)
Failure: negative
DESCRIPTION
This routine queries whether a property list is a member of the property
@@ -4101,8 +4101,8 @@ H5P_object_verify(hid_t plist_id, hid_t pclass_id)
FUNC_ENTER_NOAPI(NULL)
/* Compare the property list's class against the other class */
- if (H5P_isa_class(plist_id, pclass_id) != TRUE)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, NULL, "property list is not a member of the class");
+ if (H5P_isa_class(plist_id, pclass_id) != true)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTCOMPARE, NULL, "property list is not a member of the class");
/* Get the plist structure */
if (NULL == (ret_value = (H5P_genplist_t *)H5I_object(plist_id)))
@@ -4216,9 +4216,9 @@ H5P__iterate_plist_pclass_cb(void *_item, void *_key, void *_udata)
USAGE
int H5P__iterate_plist(plist, iter_all_prop, idx, cb_func, iter_data)
const H5P_genplist_t *plist; IN: Property list to iterate over
- hbool_t iter_all_prop; IN: Whether to iterate over all properties
- (TRUE), or just non-default (i.e. changed)
- properties (FALSE).
+ bool iter_all_prop; IN: Whether to iterate over all properties
+ (true), or just non-default (i.e. changed)
+ properties (false).
int *idx; IN/OUT: Index of the property to begin with
H5P_iterate_t cb_func; IN: Function pointer to function to be
called with each property iterated over.
@@ -4263,7 +4263,7 @@ iteration, the function's behavior is undefined.
REVISION LOG
--------------------------------------------------------------------------*/
int
-H5P__iterate_plist(const H5P_genplist_t *plist, hbool_t iter_all_prop, int *idx, H5P_iterate_int_t cb_func,
+H5P__iterate_plist(const H5P_genplist_t *plist, bool iter_all_prop, int *idx, H5P_iterate_int_t cb_func,
void *udata)
{
H5P_genclass_t *tclass; /* Temporary class pointer */
@@ -5131,7 +5131,7 @@ H5P_close(H5P_genplist_t *plist)
H5P_genclass_t *tclass; /* Temporary class pointer */
H5SL_t *seen = NULL; /* Skip list to hold names of properties already seen */
size_t nseen; /* Number of items 'seen' */
- hbool_t has_parent_class; /* Flag to indicate that this property list's class has a parent */
+ bool has_parent_class; /* Flag to indicate that this property list's class has a parent */
size_t ndel; /* Number of items deleted */
H5SL_node_t *curr_node; /* Current node in skip list */
H5P_genprop_t *tmp; /* Temporary pointer to properties */
@@ -5198,7 +5198,7 @@ H5P_close(H5P_genplist_t *plist)
* initialize each with default value & make property 'remove' callback.
*/
tclass = plist->pclass;
- has_parent_class = (hbool_t)(tclass != NULL && tclass->parent != NULL && tclass->parent->nprops > 0);
+ has_parent_class = (bool)(tclass != NULL && tclass->parent != NULL && tclass->parent->nprops > 0);
while (tclass != NULL) {
if (tclass->nprops > 0) {
/* Walk through the properties in the class */
@@ -5350,13 +5350,13 @@ H5P__get_class_path(H5P_genclass_t *pclass)
/* Allocate enough space for the parent class's path, plus the '/'
* separator, this class's name and the string terminator
*/
- ret_str_len = HDstrlen(par_path) + HDstrlen(pclass->name) + 1 +
+ ret_str_len = strlen(par_path) + strlen(pclass->name) + 1 +
3; /* Extra "+3" to quiet GCC warning - 2019/07/05, QAK */
if (NULL == (ret_value = (char *)H5MM_malloc(ret_str_len)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for class name");
/* Build the full path for this class */
- HDsnprintf(ret_value, ret_str_len, "%s/%s", par_path, pclass->name);
+ snprintf(ret_value, ret_str_len, "%s/%s", par_path, pclass->name);
/* Free the parent class's path */
H5MM_xfree(par_path);
@@ -5411,7 +5411,7 @@ H5P__open_class_path(const char *path)
/* Find the generic property class with this full path */
curr_name = tmp_path;
curr_class = NULL;
- while (NULL != (delimit = HDstrchr(curr_name, '/'))) {
+ while (NULL != (delimit = strchr(curr_name, '/'))) {
/* Change the delimiter to terminate the string */
*delimit = '\0';
@@ -5421,7 +5421,7 @@ H5P__open_class_path(const char *path)
check_info.new_class = NULL;
/* Find the class with this name & parent by iterating over the open classes */
- if (H5I_iterate(H5I_GENPROP_CLS, H5P__open_class_path_cb, &check_info, FALSE) < 0)
+ if (H5I_iterate(H5I_GENPROP_CLS, H5P__open_class_path_cb, &check_info, false) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_BADITER, NULL, "can't iterate over classes");
else if (NULL == check_info.new_class)
HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, NULL, "can't locate class");
@@ -5439,7 +5439,7 @@ H5P__open_class_path(const char *path)
check_info.new_class = NULL;
/* Find the class with this name & parent by iterating over the open classes */
- if (H5I_iterate(H5I_GENPROP_CLS, H5P__open_class_path_cb, &check_info, FALSE) < 0)
+ if (H5I_iterate(H5I_GENPROP_CLS, H5P__open_class_path_cb, &check_info, false) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_BADITER, NULL, "can't iterate over classes");
else if (NULL == check_info.new_class)
HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, NULL, "can't locate class");
@@ -5651,7 +5651,7 @@ H5P__new_plist_of_type(H5P_plist_type_t type)
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, H5I_INVALID_HID, "not a property class");
/* Create the new property list */
- if ((ret_value = H5P_create_id(pclass, TRUE)) < 0)
+ if ((ret_value = H5P_create_id(pclass, true)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, H5I_INVALID_HID, "unable to create property list");
done:
diff --git a/src/H5Plapl.c b/src/H5Plapl.c
index 19a63bc8c9e..1057fffa616 100644
--- a/src/H5Plapl.c
+++ b/src/H5Plapl.c
@@ -261,7 +261,7 @@ H5P__lacc_elink_fapl_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
if (NULL == (l_fapl_plist = (H5P_genplist_t *)H5P_object_verify(l_fapl_id, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "can't get property list");
- if (((*(hid_t *)value) = H5P_copy_plist(l_fapl_plist, FALSE)) < 0)
+ if (((*(hid_t *)value) = H5P_copy_plist(l_fapl_plist, false)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy file access property list");
} /* end if */
@@ -300,7 +300,7 @@ H5P__lacc_elink_fapl_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
if (NULL == (l_fapl_plist = (H5P_genplist_t *)H5P_object_verify(l_fapl_id, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "can't get property list");
- if (((*(hid_t *)value) = H5P_copy_plist(l_fapl_plist, FALSE)) < 0)
+ if (((*(hid_t *)value) = H5P_copy_plist(l_fapl_plist, false)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy file access property list");
} /* end if */
@@ -326,7 +326,7 @@ H5P__lacc_elink_fapl_enc(const void *value, void **_pp, size_t *size)
const hid_t *elink_fapl = (const hid_t *)value; /* Property to encode */
uint8_t **pp = (uint8_t **)_pp;
H5P_genplist_t *fapl_plist; /* Pointer to property list */
- hbool_t non_default_fapl = FALSE; /* Whether the FAPL is non-default */
+ bool non_default_fapl = false; /* Whether the FAPL is non-default */
size_t fapl_size = 0; /* FAPL's encoded size */
herr_t ret_value = SUCCEED; /* Return value */
@@ -336,7 +336,7 @@ H5P__lacc_elink_fapl_enc(const void *value, void **_pp, size_t *size)
if (*elink_fapl != H5P_DEFAULT) {
if (NULL == (fapl_plist = (H5P_genplist_t *)H5P_object_verify(*elink_fapl, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property list");
- non_default_fapl = TRUE;
+ non_default_fapl = true;
} /* end if */
if (NULL != *pp) {
@@ -347,7 +347,7 @@ H5P__lacc_elink_fapl_enc(const void *value, void **_pp, size_t *size)
/* Encode the property list, if non-default */
/* (if *pp == NULL, will only compute the size) */
if (non_default_fapl) {
- if (H5P__encode(fapl_plist, TRUE, NULL, &fapl_size) < 0)
+ if (H5P__encode(fapl_plist, true, NULL, &fapl_size) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "can't encode property list");
if (*pp) {
@@ -362,7 +362,7 @@ H5P__lacc_elink_fapl_enc(const void *value, void **_pp, size_t *size)
UINT64ENCODE_VAR(*pp, enc_value, enc_size);
/* encode the plist */
- if (H5P__encode(fapl_plist, TRUE, *pp, &fapl_size) < 0)
+ if (H5P__encode(fapl_plist, true, *pp, &fapl_size) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "can't encode property list");
*pp += fapl_size;
@@ -393,7 +393,7 @@ H5P__lacc_elink_fapl_dec(const void **_pp, void *_value)
{
hid_t *elink_fapl = (hid_t *)_value; /* The elink FAPL value */
const uint8_t **pp = (const uint8_t **)_pp;
- hbool_t non_default_fapl; /* Whether the FAPL is non-default */
+ bool non_default_fapl; /* Whether the FAPL is non-default */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -405,7 +405,7 @@ H5P__lacc_elink_fapl_dec(const void **_pp, void *_value)
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
/* Determine if the FAPL is non-default */
- non_default_fapl = (hbool_t) * (*pp)++;
+ non_default_fapl = (bool)*(*pp)++;
if (non_default_fapl) {
size_t fapl_size = 0; /* Encoded size of property list */
@@ -494,7 +494,7 @@ H5P__lacc_elink_fapl_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED
if (NULL == (l_fapl_plist = (H5P_genplist_t *)H5P_object_verify(l_fapl_id, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "can't get property list");
- if (((*(hid_t *)value) = H5P_copy_plist(l_fapl_plist, FALSE)) < 0)
+ if (((*(hid_t *)value) = H5P_copy_plist(l_fapl_plist, false)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy file access property list");
} /* end if */
@@ -658,7 +658,7 @@ H5P__lacc_elink_pref_enc(const void *value, void **_pp, size_t *size)
/* calculate prefix length */
if (NULL != elink_pref)
- len = HDstrlen(elink_pref);
+ len = strlen(elink_pref);
enc_value = (uint64_t)len;
enc_size = H5VM_limit_enc_size(enc_value);
@@ -724,7 +724,7 @@ H5P__lacc_elink_pref_dec(const void **_pp, void *_value)
/* Make a copy of the user's prefix string */
if (NULL == (*elink_pref = (char *)H5MM_malloc(len + 1)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "memory allocation failed for prefix");
- HDstrncpy(*elink_pref, *(const char **)pp, len);
+ strncpy(*elink_pref, *(const char **)pp, len);
(*elink_pref)[len] = '\0';
*pp += len;
@@ -804,7 +804,7 @@ H5P__lacc_elink_pref_cmp(const void *value1, const void *value2, size_t H5_ATTR_
if (NULL != pref1 && NULL == pref2)
HGOTO_DONE(-1);
if (NULL != pref1 && NULL != pref2)
- ret_value = HDstrcmp(pref1, pref2);
+ ret_value = strcmp(pref1, pref2);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -977,9 +977,9 @@ H5Pget_elink_prefix(hid_t plist_id, char *prefix /*out*/, size_t size)
/* Check for prefix being set */
if (my_prefix) {
/* Copy to user's buffer, if given */
- len = HDstrlen(my_prefix);
+ len = strlen(my_prefix);
if (prefix) {
- HDstrncpy(prefix, my_prefix, size);
+ strncpy(prefix, my_prefix, size);
if (len >= size)
prefix[size - 1] = '\0';
} /* end if */
diff --git a/src/H5Pocpl.c b/src/H5Pocpl.c
index b1647116b92..ca70e1a6204 100644
--- a/src/H5Pocpl.c
+++ b/src/H5Pocpl.c
@@ -443,7 +443,7 @@ H5Pget_obj_track_times(hid_t plist_id, hbool_t *track_times /*out*/)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get object header flags");
/* Set track times flag to return */
- *track_times = (hbool_t)((ohdr_flags & H5O_HDR_STORE_TIMES) ? TRUE : FALSE);
+ *track_times = (bool)((ohdr_flags & H5O_HDR_STORE_TIMES) ? true : false);
} /* end if */
done:
@@ -933,7 +933,7 @@ H5Pget_filter_by_id2(hid_t plist_id, H5Z_filter_t id, unsigned int *flags /*out*
* Purpose: This is a query routine to verify that all the filters set
* in the dataset creation property list are available currently.
*
- * Return: Success: TRUE if all filters available, FALSE if one or
+ * Return: Success: true if all filters available, false if one or
* more filters not currently available.
* Failure: FAIL on error
*
@@ -971,8 +971,8 @@ H5Pall_filters_avail(hid_t plist_id)
* Purpose: Check whether the filter is in the pipeline of the object
* creation property list.
*
- * Return: TRUE: found
- * FALSE: not found
+ * Return: true: found
+ * false: not found
* FAIL: error
*
*-------------------------------------------------------------------------
@@ -1001,7 +1001,7 @@ H5P_filter_in_pline(H5P_genplist_t *plist, H5Z_filter_t id)
* Function: H5Premove_filter
*
* Purpose: Deletes a filter from the dataset creation property list;
- * deletes all filters if FILTER is H5Z_FILTER_NONE
+ * deletes all filters if FILTER is H5Z_FILTER_ALL
*
* Return: Non-negative on success/Negative on failure
*
@@ -1178,14 +1178,14 @@ H5P__get_filter(const H5Z_filter_info_t *filter, unsigned int *flags /*out*/, si
/* Check for actual name */
if (s) {
- HDstrncpy(name, s, namelen);
+ strncpy(name, s, namelen);
name[namelen - 1] = '\0';
} /* end if */
else {
/* Check for unknown library filter */
/* (probably from a future version of the library) */
if (filter->id < 256) {
- HDstrncpy(name, "Unknown library filter", namelen);
+ strncpy(name, "Unknown library filter", namelen);
name[namelen - 1] = '\0';
} /* end if */
else
@@ -1319,16 +1319,16 @@ H5P__ocrt_pipeline_enc(const void *value, void **_pp, size_t *size)
/* encode filter name if it exists */
if (NULL != pline->filter[u].name) {
- /* encode TRUE indicating that it exits */
- *(*pp)++ = (uint8_t)TRUE;
+ /* encode true indicating that it exits */
+ *(*pp)++ = (uint8_t) true;
/* encode filter name */
H5MM_memcpy(*pp, (uint8_t *)(pline->filter[u].name), H5Z_COMMON_NAME_LEN);
*pp += H5Z_COMMON_NAME_LEN;
} /* end if */
else
- /* encode FALSE indicating that it does not exist */
- *(*pp)++ = (uint8_t)FALSE;
+ /* encode false indicating that it does not exist */
+ *(*pp)++ = (uint8_t) false;
/* encode cd_nelmts */
enc_value = (uint64_t)pline->filter[u].cd_nelmts;
@@ -1572,7 +1572,7 @@ H5P__ocrt_pipeline_cmp(const void *_pline1, const void *_pline2, size_t H5_ATTR_
if (pline1->filter[u].name != NULL && pline2->filter[u].name == NULL)
HGOTO_DONE(1);
if (pline1->filter[u].name != NULL)
- if ((cmp_value = HDstrcmp(pline1->filter[u].name, pline2->filter[u].name)) != 0)
+ if ((cmp_value = strcmp(pline1->filter[u].name, pline2->filter[u].name)) != 0)
HGOTO_DONE(cmp_value);
/* Check the number of parameters for the filter */
diff --git a/src/H5Pocpypl.c b/src/H5Pocpypl.c
index 67337d5aff7..869e36304d2 100644
--- a/src/H5Pocpypl.c
+++ b/src/H5Pocpypl.c
@@ -356,7 +356,7 @@ H5P__ocpy_merge_comm_dt_list_enc(const void *value, void **_pp, size_t *size)
dt_list = *dt_list_ptr;
while (dt_list) {
/* Get length of encoded path */
- len = HDstrlen(dt_list->path) + 1;
+ len = strlen(dt_list->path) + 1;
/* Encode merge committed dtype list */
if (*pp) {
@@ -415,7 +415,7 @@ H5P__ocpy_merge_comm_dt_list_dec(const void **_pp, void *_value)
*dt_list = NULL;
/* Decode the string sequence */
- len = HDstrlen(*(const char **)pp);
+ len = strlen(*(const char **)pp);
while (len > 0) {
/* Create new node & duplicate string */
if (NULL == (tmp_dt_list = H5FL_CALLOC(H5O_copy_dtype_merge_list_t)))
@@ -423,7 +423,7 @@ H5P__ocpy_merge_comm_dt_list_dec(const void **_pp, void *_value)
if (NULL == (tmp_dt_list->path = H5MM_strdup(*(const char **)pp)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed");
*pp += len + 1;
- assert(len == HDstrlen(tmp_dt_list->path));
+ assert(len == strlen(tmp_dt_list->path));
/* Add copied node to dtype list */
if (dt_list_tail) {
@@ -437,7 +437,7 @@ H5P__ocpy_merge_comm_dt_list_dec(const void **_pp, void *_value)
tmp_dt_list = NULL;
/* Compute length of next string */
- len = HDstrlen(*(const char **)pp);
+ len = strlen(*(const char **)pp);
} /* end while */
/* Advance past terminator for string sequence */
@@ -543,7 +543,7 @@ H5P__ocpy_merge_comm_dt_list_cmp(const void *_dt_list1, const void *_dt_list2, s
assert(dt_list2->path);
/* Compare paths */
- ret_value = HDstrcmp(dt_list1->path, dt_list2->path);
+ ret_value = strcmp(dt_list1->path, dt_list2->path);
if (ret_value != 0)
HGOTO_DONE(ret_value);
diff --git a/src/H5Ppkg.h b/src/H5Ppkg.h
index 9a58d0065ff..e249c7f9b2a 100644
--- a/src/H5Ppkg.h
+++ b/src/H5Ppkg.h
@@ -62,7 +62,7 @@ typedef struct H5P_genprop_t {
size_t size; /* Size of property value */
void *value; /* Pointer to property value */
H5P_prop_within_t type; /* Type of object the property is within */
- hbool_t shared_name; /* Whether the name is shared or not */
+ bool shared_name; /* Whether the name is shared or not */
/* Callback function pointers & info */
H5P_prp_create_func_t create; /* Function to call when a property is created */
@@ -86,8 +86,8 @@ struct H5P_genclass_t {
plists; /* Number of property lists that have been created since the last modification to the class */
unsigned classes; /* Number of classes that have been derived since the last modification to the class */
unsigned ref_count; /* Number of outstanding ID's open on this class object */
- hbool_t deleted; /* Whether this class has been deleted and is waiting for dependent classes & proplists
- to close */
+ bool deleted; /* Whether this class has been deleted and is waiting for dependent classes & proplists
+ to close */
unsigned revision; /* Revision number of a particular class (global) */
H5SL_t *props; /* Skip list containing properties */
@@ -105,7 +105,7 @@ struct H5P_genplist_t {
H5P_genclass_t *pclass; /* Pointer to class info */
hid_t plist_id; /* Copy of the property list ID (for use in close callback) */
size_t nprops; /* Number of properties in class */
- hbool_t class_init; /* Whether the class initialization callback finished successfully */
+ bool class_init; /* Whether the class initialization callback finished successfully */
H5SL_t *del; /* Skip list containing names of deleted properties */
H5SL_t *props; /* Skip list containing properties */
};
@@ -152,7 +152,7 @@ H5_DLL herr_t H5P__get_size_pclass(H5P_genclass_t *pclass, const char *name, siz
H5_DLL herr_t H5P__get_nprops_plist(const H5P_genplist_t *plist, size_t *nprops);
H5_DLL int H5P__cmp_class(const H5P_genclass_t *pclass1, const H5P_genclass_t *pclass2);
H5_DLL herr_t H5P__cmp_plist(const H5P_genplist_t *plist1, const H5P_genplist_t *plist2, int *cmp_ret);
-H5_DLL int H5P__iterate_plist(const H5P_genplist_t *plist, hbool_t iter_all_prop, int *idx,
+H5_DLL int H5P__iterate_plist(const H5P_genplist_t *plist, bool iter_all_prop, int *idx,
H5P_iterate_int_t iter_func, void *iter_data);
H5_DLL int H5P__iterate_pclass(const H5P_genclass_t *pclass, int *idx, H5P_iterate_int_t iter_func,
void *iter_data);
@@ -167,19 +167,19 @@ H5_DLL H5P_genprop_t *H5P__find_prop_plist(const H5P_genplist_t *plist, const c
H5_DLL hid_t H5P__new_plist_of_type(H5P_plist_type_t type);
/* Encode/decode routines */
-H5_DLL herr_t H5P__encode(const H5P_genplist_t *plist, hbool_t enc_all_prop, void *buf, size_t *nalloc);
+H5_DLL herr_t H5P__encode(const H5P_genplist_t *plist, bool enc_all_prop, void *buf, size_t *nalloc);
H5_DLL hid_t H5P__decode(const void *buf);
H5_DLL herr_t H5P__encode_hsize_t(const void *value, void **_pp, size_t *size);
H5_DLL herr_t H5P__encode_size_t(const void *value, void **_pp, size_t *size);
H5_DLL herr_t H5P__encode_unsigned(const void *value, void **_pp, size_t *size);
H5_DLL herr_t H5P__encode_uint8_t(const void *value, void **_pp, size_t *size);
-H5_DLL herr_t H5P__encode_hbool_t(const void *value, void **_pp, size_t *size);
+H5_DLL herr_t H5P__encode_bool(const void *value, void **_pp, size_t *size);
H5_DLL herr_t H5P__encode_double(const void *value, void **_pp, size_t *size);
H5_DLL herr_t H5P__decode_hsize_t(const void **_pp, void *value);
H5_DLL herr_t H5P__decode_size_t(const void **_pp, void *value);
H5_DLL herr_t H5P__decode_unsigned(const void **_pp, void *value);
H5_DLL herr_t H5P__decode_uint8_t(const void **_pp, void *value);
-H5_DLL herr_t H5P__decode_hbool_t(const void **_pp, void *value);
+H5_DLL herr_t H5P__decode_bool(const void **_pp, void *value);
H5_DLL herr_t H5P__decode_double(const void **_pp, void *value);
H5_DLL herr_t H5P__encode_coll_md_read_flag_t(const void *value, void **_pp, size_t *size);
H5_DLL herr_t H5P__decode_coll_md_read_flag_t(const void **_pp, void *value);
diff --git a/src/H5Pprivate.h b/src/H5Pprivate.h
index e26c81e97a7..fa70e386dc3 100644
--- a/src/H5Pprivate.h
+++ b/src/H5Pprivate.h
@@ -161,8 +161,8 @@ H5_DLL herr_t H5P_init_phase2(void);
/* Internal versions of API routines */
H5_DLL herr_t H5P_close(H5P_genplist_t *plist);
-H5_DLL hid_t H5P_create_id(H5P_genclass_t *pclass, hbool_t app_ref);
-H5_DLL hid_t H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref);
+H5_DLL hid_t H5P_create_id(H5P_genclass_t *pclass, bool app_ref);
+H5_DLL hid_t H5P_copy_plist(const H5P_genplist_t *old_plist, bool app_ref);
H5_DLL herr_t H5P_get(H5P_genplist_t *plist, const char *name, void *value);
H5_DLL herr_t H5P_set(H5P_genplist_t *plist, const char *name, const void *value);
H5_DLL herr_t H5P_peek(H5P_genplist_t *plist, const char *name, void *value);
@@ -178,16 +178,16 @@ H5_DLL htri_t H5P_class_isa(const H5P_genclass_t *pclass1, const H5P_genclass_t
H5_DLL char *H5P_get_class_name(H5P_genclass_t *pclass);
/* Internal helper routines */
-H5_DLL herr_t H5P_get_nprops_pclass(const H5P_genclass_t *pclass, size_t *nprops, hbool_t recurse);
+H5_DLL herr_t H5P_get_nprops_pclass(const H5P_genclass_t *pclass, size_t *nprops, bool recurse);
H5_DLL hid_t H5P_peek_driver(H5P_genplist_t *plist);
H5_DLL const void *H5P_peek_driver_info(H5P_genplist_t *plist);
H5_DLL const char *H5P_peek_driver_config_str(H5P_genplist_t *plist);
H5_DLL herr_t H5P_set_driver(H5P_genplist_t *plist, hid_t new_driver_id, const void *new_driver_info,
const char *new_driver_config_str);
H5_DLL herr_t H5P_set_driver_by_name(H5P_genplist_t *plist, const char *driver_name,
- const char *driver_config, hbool_t app_ref);
+ const char *driver_config, bool app_ref);
H5_DLL herr_t H5P_set_driver_by_value(H5P_genplist_t *plist, H5FD_class_value_t driver_value,
- const char *driver_config, hbool_t app_ref);
+ const char *driver_config, bool app_ref);
H5_DLL herr_t H5P_set_vol(H5P_genplist_t *plist, hid_t vol_id, const void *vol_info);
H5_DLL herr_t H5P_reset_vol_class(const H5P_genclass_t *pclass, const struct H5VL_connector_prop_t *vol_prop);
H5_DLL herr_t H5P_set_vlen_mem_manager(H5P_genplist_t *plist, H5MM_allocate_t alloc_func, void *alloc_info,
diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h
index 124f6614c74..a58d97ffd22 100644
--- a/src/H5Ppublic.h
+++ b/src/H5Ppublic.h
@@ -916,14 +916,14 @@ H5_DLL herr_t H5Pget(hid_t plist_id, const char *name, void *value);
* \code
* plist_class_id = H5Pget_class (dsetA_plist);
*
- * if H5Pequal (plist_class_id, H5P_OBJECT_CREATE) = TRUE;
+ * if H5Pequal (plist_class_id, H5P_OBJECT_CREATE) = true;
* [ H5P_OBJECT_CREATE is the property list class ]
* [ returned by H5Pget_class. ]
*
- * else if H5Pequal (plist_class_id, H5P_DATASET_CREATE) = TRUE;
+ * else if H5Pequal (plist_class_id, H5P_DATASET_CREATE) = true;
* [ H5P_DATASET_CREATE is the property list class. ]
*
- * else if H5Pequal (plist_class_id, H5P_DATASET_XFER) = TRUE;
+ * else if H5Pequal (plist_class_id, H5P_DATASET_XFER) = true;
* [ H5P_DATASET_XFER is the property list class. ]
*
* .
@@ -2081,7 +2081,7 @@ H5_DLL int H5Pget_nfilters(hid_t plist_id);
* are being recorded
*
* \plist_id
- * \param[out] track_times Boolean value, 1 (TRUE) or 0 (FALSE),
+ * \param[out] track_times Boolean value, 1 (true) or 0 (false),
* specifying whether object times are being recorded
*
* \return \herr_t
@@ -3354,102 +3354,7 @@ H5_DLL herr_t H5Pget_core_write_tracking(hid_t fapl_id, hbool_t *is_enabled, siz
* Valid driver identifiers distributed with HDF5 are listed and
* described in the following table.
*
- *
- *
- * Driver Name |
- * Driver Identifier |
- * Description |
- * Related Function |
- *
- *
- * POSIX |
- * #H5FD_SEC2 |
- * This driver uses POSIX file-system functions like read and
- * write to perform I/O to a single, permanent file on local disk
- * with no system buffering. This driver is POSIX-compliant and
- * is the default file driver for all systems. |
- * H5Pset_fapl_sec2() |
- *
- *
- * Direct |
- * #H5FD_DIRECT |
- * This is the #H5FD_SEC2 driver, except data is written to or
- * read from the file synchronously without being cached by the
- * system. |
- * H5Pset_fapl_direct() |
- *
- *
- * Log |
- * #H5FD_LOG |
- * This is the #H5FD_SEC2 driver with logging capabilities. |
- * H5Pset_fapl_log() |
- *
- *
- * Windows |
- * #H5FD_WINDOWS |
- * This driver was modified in HDF5-1.8.8 to be a wrapper of the
- * POSIX driver, #H5FD_SEC2. This change should not affect user
- * applications. |
- * H5Pset_fapl_windows() |
- *
- *
- * STDIO |
- * #H5FD_STDIO |
- * This driver uses functions from the standard C stdio.h to
- * perform I/O to a single, permanent file on local disk with
- * additional system buffering. |
- * H5Pset_fapl_stdio() |
- *
- *
- * Memory |
- * #H5FD_CORE |
- * With this driver, an application can work with a file in
- * memory for faster reads and writes. File contents are kept in
- * memory until the file is closed. At closing, the memory
- * version of the file can be written back to disk or abandoned.
- * |
- * H5Pset_fapl_core() |
- *
- *
- * Family |
- * #H5FD_FAMILY |
- * With this driver, the HDF5 file's address space is partitioned
- * into pieces and sent to separate storage files using an
- * underlying driver of the user's choice. This driver is for
- * systems that do not support files larger than 2 gigabytes.
- * |
- * H5Pset_fapl_family() |
- *
- *
- * Multi |
- * #H5FD_MULTI |
- * With this driver, data can be stored in multiple files
- * according to the type of data. I/O might work better if
- * data is stored in separate files based on the type of data.
- * The Split driver is a special case of this driver. |
- * H5Pset_fapl_multi() |
- *
- *
- * Parallel |
- * #H5FD_MPIO |
- * This is the standard HDF5 file driver for parallel file
- * systems. This driver uses the MPI standard for both
- * communication and file I/O. |
- * H5Pset_fapl_mpio() |
- *
- *
- * Parallel POSIX |
- * H5FD_MPIPOSIX |
- * This driver is no longer available. |
- * |
- *
- *
- * Stream |
- * H5FD_STREAM |
- * This driver is no longer available. |
- * |
- *
- *
+ * \snippet{doc} tables/fileDriverLists.dox supported_file_driver_table
*
* This list does not include custom drivers that might be
* defined and registered by a user.
@@ -5807,7 +5712,7 @@ H5_DLL herr_t H5Pget_chunk_opts(hid_t plist_id, unsigned *opts);
* no dataset attributes hint setting for the dataset
* creation property list \p dcpl_id. This setting is used to
* inform the library to create minimized dataset object headers
- * when TRUE. The setting value is returned in the boolean pointer
+ * when true. The setting value is returned in the boolean pointer
* \p minimize.
*
* \since 1.10.5
@@ -6296,13 +6201,13 @@ H5_DLL herr_t H5Pset_chunk_opts(hid_t plist_id, unsigned opts);
* hint setting for the dataset creation property list \p dcpl_id.
* Datasets created with the dataset creation property list
* \p dcpl_id will have their object headers minimized if the
- * boolean flag \p minimize is set to TRUE. By setting \p minimize
- * to TRUE, the library expects that no attributes will be added
+ * boolean flag \p minimize is set to true. By setting \p minimize
+ * to true, the library expects that no attributes will be added
* to the dataset. Attributes can be added, but they are appended
* with a continuation message, which can reduce performance.
*
* This setting interacts with H5Fset_dset_no_attrs_hint(): if
- * either is set to TRUE, then the created dataset's object header
+ * either is set to true, then the created dataset's object header
* will be minimized.
*
* \since 1.10.5
@@ -8408,14 +8313,14 @@ H5_DLL herr_t H5Pget_no_selection_io_cause(hid_t plist_id, uint32_t *no_selectio
* \details H5Pset_modify_write_buf() sets whether the library is allowed to
* modify the contents of write buffers passed to HDF5 API routines
* that are passed the dataset transfer property list \p plist_id. The
- * default value for modify_write_buf is FALSE.
+ * default value for modify_write_buf is false.
*
* This function can be used to allow the library to perform in-place
* type conversion on write operations to save memory space. After making an
- * API call with this parameter set to TRUE, the contents of the write buffer
+ * API call with this parameter set to true, the contents of the write buffer
* are undefined.
*
- * \note When modify_write_buf is set to TRUE the library may violate the
+ * \note When modify_write_buf is set to true the library may violate the
* const qualifier on the API parameter for the write buffer.
*
* \since 1.14.1
@@ -8438,7 +8343,7 @@ H5_DLL herr_t H5Pset_modify_write_buf(hid_t plist_id, hbool_t modify_write_buf);
* from the dataset transfer property list \p plist_id. This property
* determines whether the library is allowed to modify the contents of
* write buffers passed to HDF5 API routines that are passed
- * \p plist_id. The default value for modify_write_buf is FALSE.
+ * \p plist_id. The default value for modify_write_buf is false.
*
* \since 1.14.1
*
diff --git a/src/H5Ptest.c b/src/H5Ptest.c
index 0bb1c31e611..5d2446c5d39 100644
--- a/src/H5Ptest.c
+++ b/src/H5Ptest.c
@@ -107,7 +107,7 @@ H5P__open_class_path_test(const char *path)
HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, H5I_INVALID_HID, "unable to find class with full path");
/* Get an ID for the class */
- if ((ret_value = H5I_register(H5I_GENPROP_CLS, pclass, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_GENPROP_CLS, pclass, true)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register property list class");
done:
diff --git a/src/H5R.c b/src/H5R.c
index a43b638cc00..8f0717460e2 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -103,7 +103,7 @@ H5Rcreate_object(hid_t loc_id, const char *name, hid_t oapl_id, H5R_ref_t *ref_p
/* Get object access property list */
if (H5P_DEFAULT == oapl_id)
oapl_id = H5P_LINK_ACCESS_DEFAULT;
- else if (TRUE != H5P_isa_class(oapl_id, H5P_LINK_ACCESS))
+ else if (true != H5P_isa_class(oapl_id, H5P_LINK_ACCESS))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "oapl_id is not a link access property list ID");
/* Get the VOL object */
@@ -115,7 +115,7 @@ H5Rcreate_object(hid_t loc_id, const char *name, hid_t oapl_id, H5R_ref_t *ref_p
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier");
/* Get the file for the object */
- if ((file_id = H5F_get_file_id(vol_obj, obj_type, FALSE)) < 0)
+ if ((file_id = H5F_get_file_id(vol_obj, obj_type, false)) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object");
/* Retrieve VOL file object */
@@ -151,7 +151,7 @@ H5Rcreate_object(hid_t loc_id, const char *name, hid_t oapl_id, H5R_ref_t *ref_p
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCREATE, FAIL, "unable to create object reference");
/* Attach loc_id to reference and hold reference to it */
- if (H5R__set_loc_id((H5R_ref_priv_t *)ref_ptr, file_id, TRUE, TRUE) < 0)
+ if (H5R__set_loc_id((H5R_ref_priv_t *)ref_ptr, file_id, true, true) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "unable to attach location id to reference");
done:
@@ -204,7 +204,7 @@ H5Rcreate_region(hid_t loc_id, const char *name, hid_t space_id, hid_t oapl_id,
/* Get object access property list */
if (H5P_DEFAULT == oapl_id)
oapl_id = H5P_LINK_ACCESS_DEFAULT;
- else if (TRUE != H5P_isa_class(oapl_id, H5P_LINK_ACCESS))
+ else if (true != H5P_isa_class(oapl_id, H5P_LINK_ACCESS))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "oapl_id is not a link access property list ID");
/* Get the VOL object */
@@ -216,7 +216,7 @@ H5Rcreate_region(hid_t loc_id, const char *name, hid_t space_id, hid_t oapl_id,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier");
/* Get the file for the object */
- if ((file_id = H5F_get_file_id(vol_obj, obj_type, FALSE)) < 0)
+ if ((file_id = H5F_get_file_id(vol_obj, obj_type, false)) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object");
/* Retrieve VOL file object */
@@ -253,7 +253,7 @@ H5Rcreate_region(hid_t loc_id, const char *name, hid_t space_id, hid_t oapl_id,
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCREATE, FAIL, "unable to create region reference");
/* Attach loc_id to reference and hold reference to it */
- if (H5R__set_loc_id((H5R_ref_priv_t *)ref_ptr, file_id, TRUE, TRUE) < 0)
+ if (H5R__set_loc_id((H5R_ref_priv_t *)ref_ptr, file_id, true, true) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "unable to attach location id to reference");
done:
@@ -302,7 +302,7 @@ H5Rcreate_attr(hid_t loc_id, const char *name, const char *attr_name, hid_t oapl
/* Get object access property list */
if (H5P_DEFAULT == oapl_id)
oapl_id = H5P_LINK_ACCESS_DEFAULT;
- else if (TRUE != H5P_isa_class(oapl_id, H5P_LINK_ACCESS))
+ else if (true != H5P_isa_class(oapl_id, H5P_LINK_ACCESS))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "oapl_id is not a link access property list ID");
/* Get the VOL object */
@@ -314,7 +314,7 @@ H5Rcreate_attr(hid_t loc_id, const char *name, const char *attr_name, hid_t oapl
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier");
/* Get the file for the object */
- if ((file_id = H5F_get_file_id(vol_obj, obj_type, FALSE)) < 0)
+ if ((file_id = H5F_get_file_id(vol_obj, obj_type, false)) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object");
/* Retrieve VOL file object */
@@ -351,7 +351,7 @@ H5Rcreate_attr(hid_t loc_id, const char *name, const char *attr_name, hid_t oapl
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCREATE, FAIL, "unable to create attribute reference");
/* Attach loc_id to reference and hold reference to it */
- if (H5R__set_loc_id((H5R_ref_priv_t *)ref_ptr, file_id, TRUE, TRUE) < 0)
+ if (H5R__set_loc_id((H5R_ref_priv_t *)ref_ptr, file_id, true, true) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "unable to attach location id to reference");
done:
@@ -429,7 +429,7 @@ H5Rget_type(const H5R_ref_t *ref_ptr)
*
* Purpose: Compare two references
*
- * Return: TRUE if equal, FALSE if unequal, FAIL if error
+ * Return: true if equal, false if unequal, FAIL if error
*
*-------------------------------------------------------------------------
*/
@@ -526,7 +526,7 @@ H5R__open_object_api_common(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t oapl_id, vo
}
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&oapl_id, H5P_CLS_DACC, loc_id, FALSE) < 0)
+ if (H5CX_set_apl(&oapl_id, H5P_CLS_DACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info");
/* Get object token */
@@ -543,7 +543,7 @@ H5R__open_object_api_common(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t oapl_id, vo
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object by token");
/* Register object */
- if ((ret_value = H5VL_register(opened_type, opened_obj, (*vol_obj_ptr)->connector, TRUE)) < 0)
+ if ((ret_value = H5VL_register(opened_type, opened_obj, (*vol_obj_ptr)->connector, true)) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object handle");
done:
@@ -682,7 +682,7 @@ H5R__open_region_api_common(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t oapl_id, vo
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object by token");
/* Register object */
- if ((opened_obj_id = H5VL_register(opened_type, opened_obj, (*vol_obj_ptr)->connector, FALSE)) < 0)
+ if ((opened_obj_id = H5VL_register(opened_type, opened_obj, (*vol_obj_ptr)->connector, false)) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object handle");
/* Get VOL object object */
@@ -852,11 +852,11 @@ H5R__open_attr_api_common(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t aapl_id, void
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object by token");
/* Register object */
- if ((opened_obj_id = H5VL_register(opened_type, opened_obj, (*vol_obj_ptr)->connector, FALSE)) < 0)
+ if ((opened_obj_id = H5VL_register(opened_type, opened_obj, (*vol_obj_ptr)->connector, false)) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object handle");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&aapl_id, H5P_CLS_AACC, loc_id, FALSE) < 0)
+ if (H5CX_set_apl(&aapl_id, H5P_CLS_AACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info");
/* Set location parameters */
@@ -875,7 +875,7 @@ H5R__open_attr_api_common(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t aapl_id, void
H5R_REF_ATTRNAME((const H5R_ref_priv_t *)ref_ptr));
/* Register the attribute and get an ID for it */
- if ((ret_value = H5VL_register(H5I_ATTR, opened_attr, (*vol_obj_ptr)->connector, TRUE)) < 0)
+ if ((ret_value = H5VL_register(H5I_ATTR, opened_attr, (*vol_obj_ptr)->connector, true)) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register attribute handle");
done:
diff --git a/src/H5RS.c b/src/H5RS.c
index 0bf40b1d94c..b0322be46bc 100644
--- a/src/H5RS.c
+++ b/src/H5RS.c
@@ -49,7 +49,7 @@ struct H5RS_str_t {
char *end; /* Pointer to terminating NUL character at the end of the string */
size_t len; /* Current length of the string */
size_t max; /* Size of allocated buffer */
- hbool_t wrapped; /* Indicates that the string to be ref-counted is not copied */
+ bool wrapped; /* Indicates that the string to be ref-counted is not copied */
unsigned n; /* Reference count of number of pointers sharing string */
};
@@ -113,7 +113,7 @@ H5RS__xstrdup(H5RS_str_t *rs, const char *s)
assert(rs);
if (s) {
- size_t len = HDstrlen(s);
+ size_t len = strlen(s);
/* Determine size of buffer to allocate */
rs->max = H5RS_ALLOC_SIZE;
@@ -124,7 +124,7 @@ H5RS__xstrdup(H5RS_str_t *rs, const char *s)
if (NULL == (rs->s = (char *)H5FL_BLK_MALLOC(str_buf, rs->max)))
HGOTO_ERROR(H5E_RS, H5E_CANTALLOC, FAIL, "memory allocation failed");
if (len)
- memcpy(rs->s, s, len);
+ H5MM_memcpy(rs->s, s, len);
rs->end = rs->s + len;
*rs->end = '\0';
rs->len = len;
@@ -191,7 +191,7 @@ H5RS__prepare_for_append(H5RS_str_t *rs)
if (rs->wrapped) {
if (H5RS__xstrdup(rs, rs->s) < 0)
HGOTO_ERROR(H5E_RS, H5E_CANTCOPY, FAIL, "can't copy string");
- rs->wrapped = FALSE;
+ rs->wrapped = false;
} /* end if */
} /* end else */
@@ -316,16 +316,16 @@ H5RS_wrap(const char *s)
*
* We ignore warnings about storing a const char pointer in the struct
* since we never modify or free the string when the wrapped struct
- * field is set to TRUE.
+ * field is set to true.
*/
H5_GCC_CLANG_DIAG_OFF("cast-qual")
ret_value->s = (char *)s;
H5_GCC_CLANG_DIAG_ON("cast-qual")
- ret_value->len = HDstrlen(s);
+ ret_value->len = strlen(s);
ret_value->end = ret_value->s + ret_value->len;
- ret_value->wrapped = TRUE;
+ ret_value->wrapped = true;
ret_value->max = 0; /* Wrapped, not allocated */
ret_value->n = 1;
@@ -372,7 +372,7 @@ H5RS_asprintf_cat(H5RS_str_t *rs, const char *fmt, ...)
/* Attempt to write formatted output into the managed string */
va_start(args1, fmt);
va_copy(args2, args1);
- while ((out_len = (size_t)HDvsnprintf(rs->end, (rs->max - rs->len), fmt, args1)) >= (rs->max - rs->len)) {
+ while ((out_len = (size_t)vsnprintf(rs->end, (rs->max - rs->len), fmt, args1)) >= (rs->max - rs->len)) {
/* Allocate a large enough buffer */
if (H5RS__resize_for_append(rs, out_len) < 0)
HGOTO_ERROR(H5E_RS, H5E_CANTRESIZE, FAIL, "can't resize ref-counted string buffer");
@@ -418,7 +418,7 @@ H5RS_acat(H5RS_str_t *rs, const char *s)
/* Concatenate the provided string on to the managed string */
if (*s) {
- size_t len = HDstrlen(s);
+ size_t len = strlen(s);
/* Allocate the underlying string, if necessary */
if (H5RS__prepare_for_append(rs) < 0)
@@ -430,7 +430,7 @@ H5RS_acat(H5RS_str_t *rs, const char *s)
HGOTO_ERROR(H5E_RS, H5E_CANTRESIZE, FAIL, "can't resize ref-counted string buffer");
/* Append the string */
- memcpy(rs->end, s, len);
+ H5MM_memcpy(rs->end, s, len);
rs->end += len;
*rs->end = '\0';
rs->len += len;
@@ -464,7 +464,7 @@ H5RS_ancat(H5RS_str_t *rs, const char *s, size_t n)
/* Concatenate the provided string on to the managed string */
if (n && *s) {
- size_t len = HDstrlen(s);
+ size_t len = strlen(s);
/* Limit characters to copy to the minimum of 'n' and 'len' */
n = MIN(len, n);
@@ -479,7 +479,7 @@ H5RS_ancat(H5RS_str_t *rs, const char *s, size_t n)
HGOTO_ERROR(H5E_RS, H5E_CANTRESIZE, FAIL, "can't resize ref-counted string buffer");
/* Append the string */
- memcpy(rs->end, s, n);
+ H5MM_memcpy(rs->end, s, n);
rs->end += n;
*rs->end = '\0';
rs->len += n;
@@ -602,7 +602,7 @@ H5RS_incr(H5RS_str_t *rs)
if (rs->wrapped) {
if (H5RS__xstrdup(rs, rs->s) < 0)
HGOTO_ERROR(H5E_RS, H5E_CANTCOPY, FAIL, "can't copy string");
- rs->wrapped = FALSE;
+ rs->wrapped = false;
} /* end if */
/* Increment reference count for string */
@@ -677,7 +677,7 @@ H5RS_cmp(const H5RS_str_t *rs1, const H5RS_str_t *rs2)
assert(rs2);
assert(rs2->s);
- FUNC_LEAVE_NOAPI(HDstrcmp(rs1->s, rs2->s))
+ FUNC_LEAVE_NOAPI(strcmp(rs1->s, rs2->s))
} /* end H5RS_cmp() */
/*--------------------------------------------------------------------------
@@ -707,7 +707,7 @@ H5RS_len(const H5RS_str_t *rs)
assert(rs);
assert(rs->s);
- FUNC_LEAVE_NOAPI(HDstrlen(rs->s))
+ FUNC_LEAVE_NOAPI(strlen(rs->s))
} /* end H5RS_len() */
/*--------------------------------------------------------------------------
diff --git a/src/H5Rdeprec.c b/src/H5Rdeprec.c
index e3ea6063eff..773d8b0c706 100644
--- a/src/H5Rdeprec.c
+++ b/src/H5Rdeprec.c
@@ -101,7 +101,7 @@ H5R__decode_token_compat(H5VL_object_t *vol_obj, H5I_type_t type, H5R_type_t ref
#ifndef NDEBUG
{
- hbool_t is_native = FALSE; /* Whether the src file is using the native VOL connector */
+ bool is_native = false; /* Whether the src file is using the native VOL connector */
/* Check if using native VOL connector */
if (H5VL_object_is_native(vol_obj, &is_native) < 0)
@@ -113,7 +113,7 @@ H5R__decode_token_compat(H5VL_object_t *vol_obj, H5I_type_t type, H5R_type_t ref
#endif /* NDEBUG */
/* Get the file for the object */
- if ((file_id = H5F_get_file_id(vol_obj, type, FALSE)) < 0)
+ if ((file_id = H5F_get_file_id(vol_obj, type, false)) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object");
/* Retrieve VOL object */
@@ -349,7 +349,7 @@ H5Rdereference1(hid_t obj_id, H5R_type_t ref_type, const void *ref)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object by token");
/* Register object */
- if ((ret_value = H5VL_register(opened_type, opened_obj, vol_obj->connector, TRUE)) < 0)
+ if ((ret_value = H5VL_register(opened_type, opened_obj, vol_obj->connector, true)) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object handle");
done:
@@ -406,7 +406,7 @@ H5Rcreate(void *ref, hid_t loc_id, const char *name, H5R_type_t ref_type, hid_t
#ifndef NDEBUG
{
- hbool_t is_native = FALSE; /* Whether the src file is using the native VOL connector */
+ bool is_native = false; /* Whether the src file is using the native VOL connector */
/* Check if using native VOL connector */
if (H5VL_object_is_native(vol_obj, &is_native) < 0)
@@ -437,7 +437,7 @@ H5Rcreate(void *ref, hid_t loc_id, const char *name, H5R_type_t ref_type, hid_t
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "unable to retrieve object token");
/* Get the file for the object */
- if ((file_id = H5F_get_file_id(vol_obj, vol_obj_type, FALSE)) < 0)
+ if ((file_id = H5F_get_file_id(vol_obj, vol_obj_type, false)) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object");
/* Retrieve VOL object */
@@ -581,7 +581,7 @@ H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *re
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid reference type");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&oapl_id, H5P_CLS_DACC, obj_id, FALSE) < 0)
+ if (H5CX_set_apl(&oapl_id, H5P_CLS_DACC, obj_id, false) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info");
/* Get the VOL object */
@@ -607,7 +607,7 @@ H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *re
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object by token");
/* Register object */
- if ((ret_value = H5VL_register(opened_type, opened_obj, vol_obj->connector, TRUE)) < 0)
+ if ((ret_value = H5VL_register(opened_type, opened_obj, vol_obj->connector, true)) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object handle");
done:
@@ -656,7 +656,7 @@ H5Rget_region(hid_t id, H5R_type_t ref_type, const void *ref)
#ifndef NDEBUG
{
- hbool_t is_native = FALSE; /* Whether the src file is using the native VOL connector */
+ bool is_native = false; /* Whether the src file is using the native VOL connector */
/* Check if using native VOL connector */
if (H5VL_object_is_native(vol_obj, &is_native) < 0)
@@ -673,7 +673,7 @@ H5Rget_region(hid_t id, H5R_type_t ref_type, const void *ref)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier");
/* Get the file for the object */
- if ((file_id = H5F_get_file_id(vol_obj, vol_obj_type, FALSE)) < 0)
+ if ((file_id = H5F_get_file_id(vol_obj, vol_obj_type, false)) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a file or file object");
/* Retrieve VOL object */
@@ -697,7 +697,7 @@ H5Rget_region(hid_t id, H5R_type_t ref_type, const void *ref)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, H5I_INVALID_HID, "unable to get dataspace");
/* Register */
- if ((ret_value = H5I_register(H5I_DATASPACE, space, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_DATASPACE, space, true)) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataspace ID");
done:
diff --git a/src/H5Rint.c b/src/H5Rint.c
index 1e4b57e482d..6a84f1cb726 100644
--- a/src/H5Rint.c
+++ b/src/H5Rint.c
@@ -102,14 +102,13 @@ H5R__print_token(const H5O_token_t token)
static char string[64];
/* Print the raw token. */
- HDsnprintf(string, 64, "%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X",
- (unsigned char)token.__data[15], (unsigned char)token.__data[14],
- (unsigned char)token.__data[13], (unsigned char)token.__data[12],
- (unsigned char)token.__data[11], (unsigned char)token.__data[10],
- (unsigned char)token.__data[9], (unsigned char)token.__data[8], (unsigned char)token.__data[7],
- (unsigned char)token.__data[6], (unsigned char)token.__data[5], (unsigned char)token.__data[4],
- (unsigned char)token.__data[3], (unsigned char)token.__data[2], (unsigned char)token.__data[1],
- (unsigned char)token.__data[0]);
+ snprintf(string, 64, "%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X",
+ (unsigned char)token.__data[15], (unsigned char)token.__data[14],
+ (unsigned char)token.__data[13], (unsigned char)token.__data[12],
+ (unsigned char)token.__data[11], (unsigned char)token.__data[10], (unsigned char)token.__data[9],
+ (unsigned char)token.__data[8], (unsigned char)token.__data[7], (unsigned char)token.__data[6],
+ (unsigned char)token.__data[5], (unsigned char)token.__data[4], (unsigned char)token.__data[3],
+ (unsigned char)token.__data[2], (unsigned char)token.__data[1], (unsigned char)token.__data[0]);
return string;
}
@@ -231,7 +230,7 @@ H5R__create_region(const H5O_token_t *obj_token, size_t token_size, H5S_t *space
/* Create new reference */
ref->info.obj.filename = NULL;
- if (NULL == (ref->info.reg.space = H5S_copy(space, FALSE, TRUE)))
+ if (NULL == (ref->info.reg.space = H5S_copy(space, false, true)))
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "unable to copy dataspace");
ref->loc_id = H5I_INVALID_HID;
@@ -279,13 +278,13 @@ H5R__create_attr(const H5O_token_t *obj_token, size_t token_size, const char *at
assert(ref);
/* Make sure that attribute name is not longer than supported encode size */
- if (HDstrlen(attr_name) > H5R_MAX_STRING_LEN)
+ if (strlen(attr_name) > H5R_MAX_STRING_LEN)
HGOTO_ERROR(H5E_REFERENCE, H5E_ARGS, FAIL, "attribute name too long (%d > %d)",
- (int)HDstrlen(attr_name), H5R_MAX_STRING_LEN);
+ (int)strlen(attr_name), H5R_MAX_STRING_LEN);
/* Create new reference */
ref->info.obj.filename = NULL;
- if (NULL == (ref->info.attr.name = HDstrdup(attr_name)))
+ if (NULL == (ref->info.attr.name = strdup(attr_name)))
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "Cannot copy attribute name");
ref->loc_id = H5I_INVALID_HID;
@@ -389,7 +388,7 @@ H5R__destroy(H5R_ref_priv_t *ref)
*-------------------------------------------------------------------------
*/
herr_t
-H5R__set_loc_id(H5R_ref_priv_t *ref, hid_t id, hbool_t inc_ref, hbool_t app_ref)
+H5R__set_loc_id(H5R_ref_priv_t *ref, hid_t id, bool inc_ref, bool app_ref)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -471,7 +470,7 @@ H5R__reopen_file(H5R_ref_priv_t *ref, hid_t fapl_id)
/* TODO add search path */
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&fapl_id, H5P_CLS_FACC, H5I_INVALID_HID, TRUE) < 0)
+ if (H5CX_set_apl(&fapl_id, H5P_CLS_FACC, H5I_INVALID_HID, true) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info");
/* Get the VOL info from the fapl */
@@ -494,7 +493,7 @@ H5R__reopen_file(H5R_ref_priv_t *ref, hid_t fapl_id)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENFILE, H5I_INVALID_HID, "unable to open file");
/* Get an ID for the file */
- if ((ret_value = H5VL_register_using_vol_id(H5I_FILE, new_file, connector_prop.connector_id, TRUE)) < 0)
+ if ((ret_value = H5VL_register_using_vol_id(H5I_FILE, new_file, connector_prop.connector_id, true)) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register file handle");
/* Get the file object */
@@ -519,7 +518,7 @@ H5R__reopen_file(H5R_ref_priv_t *ref, hid_t fapl_id)
} /* end if */
/* Attach loc_id to reference */
- if (H5R__set_loc_id((H5R_ref_priv_t *)ref, ret_value, FALSE, TRUE) < 0)
+ if (H5R__set_loc_id((H5R_ref_priv_t *)ref, ret_value, false, true) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, H5I_INVALID_HID, "unable to attach location id to reference");
done:
@@ -554,14 +553,14 @@ H5R__get_type(const H5R_ref_priv_t *ref)
*
* Purpose: Compare two references
*
- * Return: TRUE if equal, FALSE if unequal, FAIL if error
+ * Return: true if equal, false if unequal, FAIL if error
*
*-------------------------------------------------------------------------
*/
htri_t
H5R__equal(const H5R_ref_priv_t *ref1, const H5R_ref_priv_t *ref2)
{
- htri_t ret_value = TRUE;
+ htri_t ret_value = true;
FUNC_ENTER_PACKAGE
@@ -570,21 +569,21 @@ H5R__equal(const H5R_ref_priv_t *ref1, const H5R_ref_priv_t *ref2)
/* Compare reference types */
if (ref1->type != ref2->type)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* Compare object addresses */
if (ref1->token_size != ref2->token_size)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
if (0 != memcmp(&ref1->info.obj.token, &ref2->info.obj.token, ref1->token_size))
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* Compare filenames */
if ((ref1->info.obj.filename && (NULL == ref2->info.obj.filename)) ||
((NULL == ref1->info.obj.filename) && ref2->info.obj.filename))
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
if (ref1->info.obj.filename && ref1->info.obj.filename &&
- (0 != HDstrcmp(ref1->info.obj.filename, ref2->info.obj.filename)))
- HGOTO_DONE(FALSE);
+ (0 != strcmp(ref1->info.obj.filename, ref2->info.obj.filename)))
+ HGOTO_DONE(false);
switch (ref1->type) {
case H5R_OBJECT2:
@@ -595,8 +594,8 @@ H5R__equal(const H5R_ref_priv_t *ref1, const H5R_ref_priv_t *ref2)
break;
case H5R_ATTR:
assert(ref1->info.attr.name && ref2->info.attr.name);
- if (0 != HDstrcmp(ref1->info.attr.name, ref2->info.attr.name))
- HGOTO_DONE(FALSE);
+ if (0 != strcmp(ref1->info.attr.name, ref2->info.attr.name))
+ HGOTO_DONE(false);
break;
case H5R_OBJECT1:
case H5R_DATASET_REGION1:
@@ -640,11 +639,11 @@ H5R__copy(const H5R_ref_priv_t *src_ref, H5R_ref_priv_t *dst_ref)
case H5R_OBJECT2:
break;
case H5R_DATASET_REGION2:
- if (NULL == (dst_ref->info.reg.space = H5S_copy(src_ref->info.reg.space, FALSE, TRUE)))
+ if (NULL == (dst_ref->info.reg.space = H5S_copy(src_ref->info.reg.space, false, true)))
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "unable to copy dataspace");
break;
case H5R_ATTR:
- if (NULL == (dst_ref->info.attr.name = HDstrdup(src_ref->info.attr.name)))
+ if (NULL == (dst_ref->info.attr.name = strdup(src_ref->info.attr.name)))
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "Cannot copy attribute name");
break;
case H5R_OBJECT1:
@@ -662,7 +661,7 @@ H5R__copy(const H5R_ref_priv_t *src_ref, H5R_ref_priv_t *dst_ref)
if (src_ref->loc_id == H5I_INVALID_HID) {
assert(src_ref->info.obj.filename);
- if (NULL == (dst_ref->info.obj.filename = HDstrdup(src_ref->info.obj.filename)))
+ if (NULL == (dst_ref->info.obj.filename = strdup(src_ref->info.obj.filename)))
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "Cannot copy filename");
dst_ref->loc_id = H5I_INVALID_HID;
}
@@ -671,9 +670,9 @@ H5R__copy(const H5R_ref_priv_t *src_ref, H5R_ref_priv_t *dst_ref)
/* Set location ID and hold reference to it */
dst_ref->loc_id = src_ref->loc_id;
- if (H5I_inc_ref(dst_ref->loc_id, TRUE) < 0)
+ if (H5I_inc_ref(dst_ref->loc_id, true) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINC, FAIL, "incrementing location ID failed");
- dst_ref->app_ref = TRUE;
+ dst_ref->app_ref = true;
}
done:
@@ -762,7 +761,7 @@ H5R__get_region(const H5R_ref_priv_t *ref, H5S_t *space)
assert(space);
/* Copy reference selection to destination */
- if (H5S_select_copy(space, ref->info.reg.space, FALSE) < 0)
+ if (H5S_select_copy(space, ref->info.reg.space, false) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "unable to copy selection");
done:
@@ -795,7 +794,7 @@ H5R__get_file_name(const H5R_ref_priv_t *ref, char *buf, size_t size)
HGOTO_ERROR(H5E_REFERENCE, H5E_ARGS, (-1), "no filename available for that reference");
/* Get the file name length */
- copy_len = HDstrlen(ref->info.obj.filename);
+ copy_len = strlen(ref->info.obj.filename);
assert(copy_len <= H5R_MAX_STRING_LEN);
/* Copy the file name */
@@ -832,7 +831,7 @@ H5R__get_attr_name(const H5R_ref_priv_t *ref, char *buf, size_t size)
assert(ref->type == H5R_ATTR);
/* Get the attribute name length */
- attr_name_len = HDstrlen(ref->info.attr.name);
+ attr_name_len = strlen(ref->info.attr.name);
assert(attr_name_len <= H5R_MAX_STRING_LEN);
/* Get the attribute name */
@@ -1245,7 +1244,7 @@ H5R__encode_string(const char *string, unsigned char *buf, size_t *nalloc)
assert(nalloc);
/* Get the amount of space required to serialize the string */
- string_len = HDstrlen(string);
+ string_len = strlen(string);
if (string_len > H5R_MAX_STRING_LEN)
HGOTO_ERROR(H5E_REFERENCE, H5E_ARGS, FAIL, "string too long");
diff --git a/src/H5Rpkg.h b/src/H5Rpkg.h
index b4f1bbf144b..8ce6041769a 100644
--- a/src/H5Rpkg.h
+++ b/src/H5Rpkg.h
@@ -77,7 +77,7 @@ typedef struct H5R_ref_priv_t {
uint32_t encode_size; /* Cached encoding size */
int8_t type; /* Reference type */
uint8_t token_size; /* Cached token size */
- hbool_t app_ref; /* App ref on loc_id */
+ bool app_ref; /* App ref on loc_id */
} H5R_ref_priv_t;
/*****************************/
@@ -94,7 +94,7 @@ H5_DLL herr_t H5R__create_attr(const H5O_token_t *obj_token, size_t token_size,
H5R_ref_priv_t *ref);
H5_DLL herr_t H5R__destroy(H5R_ref_priv_t *ref);
-H5_DLL herr_t H5R__set_loc_id(H5R_ref_priv_t *ref, hid_t id, hbool_t inc_ref, hbool_t app_ref);
+H5_DLL herr_t H5R__set_loc_id(H5R_ref_priv_t *ref, hid_t id, bool inc_ref, bool app_ref);
H5_DLL hid_t H5R__get_loc_id(const H5R_ref_priv_t *ref);
H5_DLL hid_t H5R__reopen_file(H5R_ref_priv_t *ref, hid_t fapl_id);
diff --git a/src/H5S.c b/src/H5S.c
index d1002adcb7b..9bfe6f59dbf 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -147,11 +147,11 @@ H5S_top_term_package(void)
FUNC_ENTER_NOAPI_NOINIT_NOERR
if (H5I_nmembers(H5I_DATASPACE) > 0) {
- (void)H5I_clear_type(H5I_DATASPACE, FALSE, FALSE);
+ (void)H5I_clear_type(H5I_DATASPACE, false, false);
n++;
}
if (H5I_nmembers(H5I_SPACE_SEL_ITER) > 0) {
- (void)H5I_clear_type(H5I_SPACE_SEL_ITER, FALSE, FALSE);
+ (void)H5I_clear_type(H5I_SPACE_SEL_ITER, false, false);
n++;
}
@@ -282,7 +282,7 @@ H5S_create(H5S_class_t type)
} /* end switch */
/* Start with "all" selection */
- if (H5S_select_all(new_ds, FALSE) < 0)
+ if (H5S_select_all(new_ds, false) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, NULL, "unable to set all selection");
/* Reset common selection info pointer */
@@ -338,7 +338,7 @@ H5Screate(H5S_class_t type)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "unable to create dataspace");
/* Register */
- if ((ret_value = H5I_register(H5I_DATASPACE, new_ds, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_DATASPACE, new_ds, true)) < 0)
HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID");
done:
@@ -471,11 +471,11 @@ H5Scopy(hid_t space_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a dataspace");
/* Copy */
- if (NULL == (dst = H5S_copy(src, FALSE, TRUE)))
+ if (NULL == (dst = H5S_copy(src, false, true)))
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, H5I_INVALID_HID, "unable to copy dataspace");
/* Register */
- if ((ret_value = H5I_register(H5I_DATASPACE, dst, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_DATASPACE, dst, true)) < 0)
HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataspace ID");
done:
@@ -539,13 +539,13 @@ H5S_extent_copy(H5S_t *dst, const H5S_t *src)
assert(src);
/* Copy extent */
- if (H5S__extent_copy_real(&(dst->extent), &(src->extent), TRUE) < 0)
+ if (H5S__extent_copy_real(&(dst->extent), &(src->extent), true) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy extent");
/* If the selection is 'all', update the number of elements selected in the
* destination space */
if (H5S_SEL_ALL == H5S_GET_SELECT_TYPE(dst))
- if (H5S_select_all(dst, FALSE) < 0)
+ if (H5S_select_all(dst, false) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection");
done:
@@ -562,7 +562,7 @@ H5S_extent_copy(H5S_t *dst, const H5S_t *src)
*-------------------------------------------------------------------------
*/
herr_t
-H5S__extent_copy_real(H5S_extent_t *dst, const H5S_extent_t *src, hbool_t copy_max)
+H5S__extent_copy_real(H5S_extent_t *dst, const H5S_extent_t *src, bool copy_max)
{
unsigned u;
herr_t ret_value = SUCCEED; /* Return value */
@@ -634,7 +634,7 @@ H5S__extent_copy_real(H5S_extent_t *dst, const H5S_extent_t *src, hbool_t copy_m
*-------------------------------------------------------------------------
*/
H5S_t *
-H5S_copy(const H5S_t *src, hbool_t share_selection, hbool_t copy_max)
+H5S_copy(const H5S_t *src, bool share_selection, bool copy_max)
{
H5S_t *dst = NULL;
H5S_t *ret_value = NULL; /* Return value */
@@ -1057,7 +1057,7 @@ H5S_read(const H5O_loc_t *loc)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, NULL, "unable to load dataspace info from dataset header");
/* Default to entire dataspace being selected */
- if (H5S_select_all(ds, FALSE) < 0)
+ if (H5S_select_all(ds, false) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, NULL, "unable to set all selection");
/* Set the value for successful return */
@@ -1080,7 +1080,7 @@ H5S_read(const H5O_loc_t *loc)
htri_t H5S__is_simple(sdim)
H5S_t *sdim; IN: Pointer to dataspace object to query
RETURNS
- TRUE/FALSE/FAIL
+ true/false/FAIL
DESCRIPTION
This function determines the if a dataspace is "simple". ie. if it
has orthogonal, evenly spaced dimensions.
@@ -1097,7 +1097,7 @@ H5S__is_simple(const H5S_t *sdim)
/* H5S_NULL shouldn't be simple dataspace */
ret_value =
- (H5S_GET_EXTENT_TYPE(sdim) == H5S_SIMPLE || H5S_GET_EXTENT_TYPE(sdim) == H5S_SCALAR) ? TRUE : FALSE;
+ (H5S_GET_EXTENT_TYPE(sdim) == H5S_SIMPLE || H5S_GET_EXTENT_TYPE(sdim) == H5S_SCALAR) ? true : false;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__is_simple() */
@@ -1111,7 +1111,7 @@ H5S__is_simple(const H5S_t *sdim)
htri_t H5Sis_simple(space_id)
hid_t space_id; IN: ID of dataspace object to query
RETURNS
- TRUE/FALSE/FAIL
+ true/false/FAIL
DESCRIPTION
This function determines the if a dataspace is "simple". ie. if it
has orthogonal, evenly spaced dimensions.
@@ -1259,11 +1259,11 @@ H5S_set_extent_simple(H5S_t *space, unsigned rank, const hsize_t *dims, const hs
/* Set offset to zeros */
memset(space->select.offset, 0, sizeof(hsize_t) * space->extent.rank);
- space->select.offset_changed = FALSE;
+ space->select.offset_changed = false;
/* If the selection is 'all', update the number of elements selected */
if (H5S_GET_SELECT_TYPE(space) == H5S_SEL_ALL)
- if (H5S_select_all(space, FALSE) < 0)
+ if (H5S_select_all(space, false) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection");
done:
@@ -1324,7 +1324,7 @@ H5Screate_simple(int rank, const hsize_t dims[/*rank*/], const hsize_t maxdims[/
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, H5I_INVALID_HID, "can't create simple dataspace");
/* Register */
- if ((ret_value = H5I_register(H5I_DATASPACE, space, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_DATASPACE, space, true)) < 0)
HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataspace ID");
done:
@@ -1392,7 +1392,7 @@ H5Sencode2(hid_t obj_id, void *buf, size_t *nalloc, hid_t fapl_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&fapl_id, H5P_CLS_FACC, H5I_INVALID_HID, TRUE) < 0)
+ if (H5CX_set_apl(&fapl_id, H5P_CLS_FACC, H5I_INVALID_HID, true) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info");
if (H5S_encode(dspace, (unsigned char **)&buf, nalloc) < 0)
@@ -1429,7 +1429,7 @@ H5S_encode(H5S_t *obj, unsigned char **p, size_t *nalloc)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate fake file struct");
/* Find out the size of buffer needed for extent */
- if ((extent_size = H5O_msg_raw_size(f, H5O_SDSPACE_ID, TRUE, obj)) == 0)
+ if ((extent_size = H5O_msg_raw_size(f, H5O_SDSPACE_ID, true, obj)) == 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADSIZE, FAIL, "can't find dataspace size");
/* Find out the size of buffer needed for selection */
@@ -1457,7 +1457,7 @@ H5S_encode(H5S_t *obj, unsigned char **p, size_t *nalloc)
UINT32ENCODE(pp, extent_size);
/* Encode the extent part of dataspace */
- if (H5O_msg_encode(f, H5O_SDSPACE_ID, TRUE, pp, obj) < 0)
+ if (H5O_msg_encode(f, H5O_SDSPACE_ID, true, pp, obj) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTENCODE, FAIL, "can't encode extent space");
pp += extent_size;
@@ -1503,7 +1503,7 @@ H5Sdecode(const void *buf)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDECODE, H5I_INVALID_HID, "can't decode object");
/* Register the type and return the ID */
- if ((ret_value = H5I_register(H5I_DATASPACE, ds, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_DATASPACE, ds, true)) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataspace");
done:
@@ -1570,7 +1570,7 @@ H5S_decode(const unsigned char **p)
extent = H5FL_FREE(H5S_extent_t, extent);
/* Initialize to "all" selection. Deserialization relies on valid existing selection. */
- if (H5S_select_all(ds, FALSE) < 0)
+ if (H5S_select_all(ds, false) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, NULL, "unable to set all selection");
/* Decode the select part of dataspace.
@@ -1691,7 +1691,7 @@ H5Sset_extent_none(hid_t space_id)
*
* Purpose: Modify the dimensions of a dataspace.
*
- * Return: TRUE/FALSE/FAIL
+ * Return: true/false/FAIL
*
*-------------------------------------------------------------------------
*/
@@ -1699,7 +1699,7 @@ htri_t
H5S_set_extent(H5S_t *space, const hsize_t *size)
{
unsigned u; /* Local index variable */
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1717,7 +1717,7 @@ H5S_set_extent(H5S_t *space, const hsize_t *size)
(unsigned long long)size[u], (unsigned long long)space->extent.max[u]);
/* Indicate that dimension size can be modified */
- ret_value = TRUE;
+ ret_value = true;
} /* end if */
/* Update dimension size(s) */
@@ -1735,24 +1735,24 @@ H5S_set_extent(H5S_t *space, const hsize_t *size)
* Purpose: Determines if a simple dataspace's extent has been set (e.g.,
* by H5Sset_extent_simple() ). Helps avoid write errors.
*
- * Return: TRUE if dataspace has extent set
- * FALSE if dataspace's extent is uninitialized
+ * Return: true if dataspace has extent set
+ * false if dataspace's extent is uninitialized
*
*-------------------------------------------------------------------------
*/
-H5_ATTR_PURE hbool_t
+H5_ATTR_PURE bool
H5S_has_extent(const H5S_t *ds)
{
- hbool_t ret_value = FALSE; /* Return value */
+ bool ret_value = false; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
assert(ds);
if (0 == ds->extent.rank && 0 == ds->extent.nelem && H5S_NULL != ds->extent.type)
- ret_value = FALSE;
+ ret_value = false;
else
- ret_value = TRUE;
+ ret_value = true;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_has_extent() */
@@ -1789,7 +1789,7 @@ H5S_set_extent_real(H5S_t *space, const hsize_t *size)
/* If the selection is 'all', update the number of elements selected */
if (H5S_SEL_ALL == H5S_GET_SELECT_TYPE(space))
- if (H5S_select_all(space, FALSE) < 0)
+ if (H5S_select_all(space, false) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection");
/* Mark the dataspace as no longer shared if it was before */
@@ -1805,7 +1805,7 @@ H5S_set_extent_real(H5S_t *space, const hsize_t *size)
*
* Purpose: Determines if two dataspace extents are equal.
*
- * Return: Success: TRUE if equal, FALSE if unequal
+ * Return: Success: true if equal, false if unequal
*
* Failure: FAIL
*
@@ -1843,7 +1843,7 @@ H5Sextent_equal(hid_t space1_id, hid_t space2_id)
htri_t H5S_extent_equal(ds1, ds2)
H5S_t *ds1, *ds2; IN: Dataspace objects to compare
RETURNS
- TRUE if equal, FALSE if unequal on success/Negative on failure
+ true if equal, false if unequal on success/Negative on failure
DESCRIPTION
Compare two dataspaces if their extents are identical.
--------------------------------------------------------------------------*/
@@ -1851,7 +1851,7 @@ H5_ATTR_PURE htri_t
H5S_extent_equal(const H5S_t *ds1, const H5S_t *ds2)
{
unsigned u; /* Local index variable */
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -1861,11 +1861,11 @@ H5S_extent_equal(const H5S_t *ds1, const H5S_t *ds2)
/* Make certain the dataspaces are the same type */
if (ds1->extent.type != ds2->extent.type)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* Make certain the dataspaces are the same rank */
if (ds1->extent.rank != ds2->extent.rank)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* Make certain the dataspaces' current dimensions are the same size */
if (ds1->extent.rank > 0) {
@@ -1873,7 +1873,7 @@ H5S_extent_equal(const H5S_t *ds1, const H5S_t *ds2)
assert(ds2->extent.size);
for (u = 0; u < ds1->extent.rank; u++)
if (ds1->extent.size[u] != ds2->extent.size[u])
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
} /* end if */
/* Make certain the dataspaces' maximum dimensions are the same size */
@@ -1882,11 +1882,11 @@ H5S_extent_equal(const H5S_t *ds1, const H5S_t *ds2)
if (ds1->extent.max != NULL && ds2->extent.max != NULL) {
for (u = 0; u < ds1->extent.rank; u++)
if (ds1->extent.max[u] != ds2->extent.max[u])
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
} /* end if */
else if ((ds1->extent.max == NULL && ds2->extent.max != NULL) ||
(ds1->extent.max != NULL && ds2->extent.max == NULL))
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
} /* end if */
done:
diff --git a/src/H5SL.c b/src/H5SL.c
index 29d0f5ffec3..54e064962f5 100644
--- a/src/H5SL.c
+++ b/src/H5SL.c
@@ -77,7 +77,7 @@
/* Define a code template for comparing string keys for the "CMP" in the H5SL_LOCATE macro */
#define H5SL_LOCATE_STRING_CMP(SLIST, TYPE, PNODE, PKEY, HASHVAL) \
- (((PNODE)->hashval == HASHVAL) ? (HDstrcmp((const char *)(PNODE)->key, (const char *)PKEY) < 0) \
+ (((PNODE)->hashval == HASHVAL) ? (strcmp((const char *)(PNODE)->key, (const char *)PKEY) < 0) \
: ((PNODE)->hashval < HASHVAL))
/* Define a code template for comparing H5_obj_t keys for the "CMP" in the H5SL_LOCATE macro */
@@ -95,7 +95,7 @@
/* Define a code template for comparing string keys for the "EQ" in the H5SL_LOCATE macro */
#define H5SL_LOCATE_STRING_EQ(SLIST, TYPE, PNODE, PKEY, HASHVAL) \
- (((PNODE)->hashval == HASHVAL) && (HDstrcmp((const char *)(PNODE)->key, (const char *)PKEY) == 0))
+ (((PNODE)->hashval == HASHVAL) && (strcmp((const char *)(PNODE)->key, (const char *)PKEY) == 0))
/* Define a code template for comparing H5_obj_t keys for the "EQ" in the H5SL_LOCATE macro */
#define H5SL_LOCATE_OBJ_EQ(SLIST, TYPE, PNODE, PKEY, HASHVAL) \
diff --git a/src/H5SM.c b/src/H5SM.c
index 4c57e3f3740..5179a285ee9 100644
--- a/src/H5SM.c
+++ b/src/H5SM.c
@@ -49,7 +49,7 @@ typedef struct H5SM_read_udata_t {
/* Local Prototypes */
/********************/
static herr_t H5SM__create_index(H5F_t *f, H5SM_index_header_t *header);
-static herr_t H5SM__delete_index(H5F_t *f, H5SM_index_header_t *header, hbool_t delete_heap);
+static herr_t H5SM__delete_index(H5F_t *f, H5SM_index_header_t *header, bool delete_heap);
static haddr_t H5SM__create_list(H5F_t *f, H5SM_index_header_t *header);
static herr_t H5SM__find_in_list(const H5SM_list_t *list, const H5SM_mesg_key_t *key, size_t *empty_pos,
size_t *list_pos);
@@ -57,10 +57,10 @@ static herr_t H5SM__convert_list_to_btree(H5F_t *f, H5SM_index_header_t *header
H5HF_t *fheap, H5O_t *open_oh);
static herr_t H5SM__bt2_convert_to_list_op(const void *record, void *op_data);
static herr_t H5SM__convert_btree_to_list(H5F_t *f, H5SM_index_header_t *header);
-static herr_t H5SM__incr_ref(void *record, void *_op_data, hbool_t *changed);
-static herr_t H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t defer,
+static herr_t H5SM__incr_ref(void *record, void *_op_data, bool *changed);
+static herr_t H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, bool defer,
unsigned type_id, void *mesg, unsigned *cache_flags_ptr);
-static herr_t H5SM__decr_ref(void *record, void *op_data, hbool_t *changed);
+static herr_t H5SM__decr_ref(void *record, void *op_data, bool *changed);
static herr_t H5SM__delete_from_index(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header,
const H5O_shared_t *mesg, unsigned *cache_flags,
size_t */*out*/ mesg_size, void **/*out*/ encoded_mesg);
@@ -208,7 +208,7 @@ H5SM_init(H5F_t *f, H5P_genplist_t *fc_plist, const H5O_loc_t *ext_loc)
* indices must be tracked on object header message in the file.
*/
if (type_flags_used & H5O_SHMESG_ATTR_FLAG)
- H5F_SET_STORE_MSG_CRT_IDX(f, TRUE);
+ H5F_SET_STORE_MSG_CRT_IDX(f, true);
/* Set the ring type to superblock extension */
H5AC_set_ring(H5AC_RING_SBE, NULL);
@@ -330,7 +330,7 @@ H5SM_type_shared(H5F_t *f, unsigned type_id)
H5SM_master_table_t *table = NULL; /* Shared object master table */
unsigned type_flag; /* Flag corresponding to message type */
size_t u; /* Local index variable */
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_TAG(H5AC__SOHM_TAG)
@@ -351,14 +351,14 @@ H5SM_type_shared(H5F_t *f, unsigned type_id)
} /* end if */
else
/* No shared messages of any type */
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* Search the indexes until we find one that matches this flag or we've
* searched them all.
*/
for (u = 0; u < table->num_indexes; u++)
if (table->indexes[u].mesg_types & type_flag)
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
done:
/* Release the master SOHM table */
@@ -516,10 +516,10 @@ H5SM__create_index(H5F_t *f, H5SM_index_header_t *header)
*
* Purpose: De-allocates storage for an index whose header is HEADER.
*
- * If DELETE_HEAP is TRUE, deletes the index's heap, eliminating
+ * If DELETE_HEAP is true, deletes the index's heap, eliminating
* it completely.
*
- * If DELETE_HEAP is FALSE, the heap is not deleted. This is
+ * If DELETE_HEAP is false, the heap is not deleted. This is
* useful when deleting only the index header as the index is
* converted from a list to a B-tree and back again.
*
@@ -528,7 +528,7 @@ H5SM__create_index(H5F_t *f, H5SM_index_header_t *header)
*-------------------------------------------------------------------------
*/
static herr_t
-H5SM__delete_index(H5F_t *f, H5SM_index_header_t *header, hbool_t delete_heap)
+H5SM__delete_index(H5F_t *f, H5SM_index_header_t *header, bool delete_heap)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -567,7 +567,7 @@ H5SM__delete_index(H5F_t *f, H5SM_index_header_t *header, hbool_t delete_heap)
} /* end else */
/* Free the index's heap if requested. */
- if (delete_heap == TRUE) {
+ if (delete_heap == true) {
if (H5HF_delete(f, header->heap_addr) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTDELETE, FAIL, "unable to delete fractal heap");
header->heap_addr = HADDR_UNDEF;
@@ -740,7 +740,7 @@ H5SM__convert_list_to_btree(H5F_t *f, H5SM_index_header_t *header, H5SM_list_t *
* still using!)
*/
num_messages = header->num_messages; /* preserve this across the index deletion */
- if (H5SM__delete_index(f, header, FALSE) < 0)
+ if (H5SM__delete_index(f, header, false) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTDELETE, FAIL, "can't free list index");
/* Set/restore header info */
@@ -861,8 +861,8 @@ H5SM__convert_btree_to_list(H5F_t *f, H5SM_index_header_t *header)
* routines and are the "fast" checks before we need to protect
* the SOHM master table.
*
- * Return: TRUE if message could be a SOHM
- * FALSE if this message couldn't be a SOHM
+ * Return: true if message could be a SOHM
+ * false if this message couldn't be a SOHM
* Negative on failure
*
*-------------------------------------------------------------------------
@@ -877,13 +877,13 @@ H5SM__can_share_common(const H5F_t *f, unsigned type_id, const void *mesg)
/* Check whether this message ought to be shared or not */
/* If sharing is disabled in this file, don't share the message */
if (!H5_addr_defined(H5F_SOHM_ADDR(f)))
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* Type-specific check */
if ((ret_value = H5O_msg_can_share(type_id, mesg)) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_BADTYPE, FAIL, "can_share callback returned error");
- if (ret_value == FALSE)
- HGOTO_DONE(FALSE);
+ if (ret_value == false)
+ HGOTO_DONE(false);
/* At this point, the message passes the "trivial" checks and is worth
* further checks.
@@ -899,10 +899,10 @@ H5SM__can_share_common(const H5F_t *f, unsigned type_id, const void *mesg)
* Purpose: Checks if an object header message would be shared or is
* already shared.
*
- * If not, returns FALSE and does nothing.
+ * If not, returns false and does nothing.
*
- * Return: TRUE if message will be a SOHM
- * FALSE if this message won't be a SOHM
+ * Return: true if message will be a SOHM
+ * false if this message won't be a SOHM
* Negative on failure
*
*-------------------------------------------------------------------------
@@ -915,15 +915,15 @@ H5SM_can_share(H5F_t *f, H5SM_master_table_t *table, ssize_t *sohm_index_num, un
H5SM_master_table_t *my_table = NULL;
ssize_t index_num;
htri_t tri_ret;
- htri_t ret_value = TRUE;
+ htri_t ret_value = true;
FUNC_ENTER_NOAPI_TAG(H5AC__SOHM_TAG, FAIL)
/* "trivial" sharing checks */
if ((tri_ret = H5SM__can_share_common(f, type_id, mesg)) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_BADTYPE, FAIL, "'trivial' sharing checks returned error");
- if (tri_ret == FALSE)
- HGOTO_DONE(FALSE);
+ if (tri_ret == false)
+ HGOTO_DONE(false);
/* Look up the master SOHM table */
/* (use incoming master SOHM table if possible) */
@@ -945,14 +945,14 @@ H5SM_can_share(H5F_t *f, H5SM_master_table_t *table, ssize_t *sohm_index_num, un
*/
if ((index_num = H5SM__get_index(my_table, type_id)) < 0) {
H5E_clear_stack(NULL); /*ignore error*/
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
} /* end if */
/* If the message isn't big enough, don't bother sharing it */
- if (0 == (mesg_size = H5O_msg_raw_size(f, type_id, TRUE, mesg)))
+ if (0 == (mesg_size = H5O_msg_raw_size(f, type_id, true, mesg)))
HGOTO_ERROR(H5E_SOHM, H5E_BADMESG, FAIL, "unable to get OH message size");
if (mesg_size < my_table->indexes[index_num].min_mesg_size)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* At this point, the message will be shared, set the index number if requested. */
if (sohm_index_num)
@@ -1003,23 +1003,23 @@ H5SM_can_share(H5F_t *f, H5SM_master_table_t *table, ssize_t *sohm_index_num, un
* If the message should be shared (if sharing has been
* enabled and this message qualifies), this function turns the
* message into a shared message, sets the H5O_MSG_FLAG_SHARED
- * flag in mesg_flags, and returns TRUE.
+ * flag in mesg_flags, and returns true.
*
- * If the message isn't shared, returns FALSE. If the message
+ * If the message isn't shared, returns false. If the message
* isn't shared but was entered in the shared message index,
* the H5O_MSG_FLAG_SHAREABLE flag will be set in mesg_flags
- * and returns TRUE.
+ * and returns true.
*
* If this message was already shared, increments its reference
- * count, and leaves it otherwise unchanged, returning TRUE and
+ * count, and leaves it otherwise unchanged, returning true and
* setting the H5O_MSG_FLAG_SHARED flag in mesg_flags.
*
* If mesg_flags is NULL, the calling function should just look
* at the return value to determine if the message was shared
* or not. Such messages should never be "unique but shareable."
*
- * Return: TRUE if message is now a SOHM
- * FALSE if this message is not a SOHM
+ * Return: true if message is now a SOHM
+ * false if this message is not a SOHM
* Negative on failure
*
*-------------------------------------------------------------------------
@@ -1036,7 +1036,7 @@ H5SM_try_share(H5F_t *f, H5O_t *open_oh, unsigned defer_flags, unsigned type_id,
#ifndef NDEBUG
unsigned deferred_type = UINT_MAX;
#endif
- htri_t ret_value = TRUE;
+ htri_t ret_value = true;
FUNC_ENTER_NOAPI_TAG(H5AC__SOHM_TAG, FAIL)
@@ -1050,16 +1050,16 @@ H5SM_try_share(H5F_t *f, H5O_t *open_oh, unsigned defer_flags, unsigned type_id,
#else /* NDEBUG */
if ((((H5O_shared_t *)mesg)->type != H5O_SHARE_TYPE_HERE) &&
(((H5O_shared_t *)mesg)->type != H5O_SHARE_TYPE_SOHM))
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
#endif /* NDEBUG */
/* "trivial" sharing checks */
if (mesg_flags && (*mesg_flags & H5O_MSG_FLAG_DONTSHARE))
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
if ((tri_ret = H5SM__can_share_common(f, type_id, mesg)) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_BADTYPE, FAIL, "'trivial' sharing checks returned error");
- if (tri_ret == FALSE)
- HGOTO_DONE(FALSE);
+ if (tri_ret == false)
+ HGOTO_DONE(false);
/* Set up user data for callback */
cache_udata.f = f;
@@ -1072,8 +1072,8 @@ H5SM_try_share(H5F_t *f, H5O_t *open_oh, unsigned defer_flags, unsigned type_id,
/* "complex" sharing checks */
if ((tri_ret = H5SM_can_share(f, table, &index_num, type_id, mesg)) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_BADTYPE, FAIL, "'complex' sharing checks returned error");
- if (tri_ret == FALSE)
- HGOTO_DONE(FALSE);
+ if (tri_ret == false)
+ HGOTO_DONE(false);
/* At this point, the message will be shared. */
@@ -1104,7 +1104,7 @@ H5SM_try_share(H5F_t *f, H5O_t *open_oh, unsigned defer_flags, unsigned type_id,
} /* end if */
done:
- assert((ret_value != TRUE) || ((H5O_shared_t *)mesg)->type == H5O_SHARE_TYPE_HERE ||
+ assert((ret_value != true) || ((H5O_shared_t *)mesg)->type == H5O_SHARE_TYPE_HERE ||
((H5O_shared_t *)mesg)->type == H5O_SHARE_TYPE_SOHM);
#ifndef NDEBUG
/* If we previously deferred this operation, make sure the saved message
@@ -1135,7 +1135,7 @@ H5SM_try_share(H5F_t *f, H5O_t *open_oh, unsigned defer_flags, unsigned type_id,
*-------------------------------------------------------------------------
*/
static herr_t
-H5SM__incr_ref(void *record, void *_op_data, hbool_t *changed)
+H5SM__incr_ref(void *record, void *_op_data, bool *changed)
{
H5SM_sohm_t *message = (H5SM_sohm_t *)record;
H5SM_incr_ref_opdata *op_data = (H5SM_incr_ref_opdata *)_op_data;
@@ -1168,7 +1168,7 @@ H5SM__incr_ref(void *record, void *_op_data, hbool_t *changed)
} /* end else */
/* If we got here, the message has changed */
- *changed = TRUE;
+ *changed = true;
/* Check for retrieving the heap ID */
if (op_data)
@@ -1184,15 +1184,15 @@ H5SM__incr_ref(void *record, void *_op_data, hbool_t *changed)
* Purpose: This routine adds a shareable message to an index.
* The behavior is controlled by the DEFER parameter:
*
- * If DEFER is TRUE, this routine Simulates adding a shareable
+ * If DEFER is true, this routine Simulates adding a shareable
* message to an index. It determines what the outcome would
- * be with DEFER set the FALSE and updates the shared message
+ * be with DEFER set the false and updates the shared message
* info, but does not actually add the message to a heap, list,
* or b-tree. Assumes that an open object header will be
* available when H5SM__write_mesg is called with DEFER set to
- * FALSE.
+ * false.
*
- * If DEFER is FALSE, this routine adds a shareable message to
+ * If DEFER is false, this routine adds a shareable message to
* an index. If this is the first such message and we have an
* object header location for this message, we record it in the
* index but don't modify the message passed in. If the message
@@ -1208,14 +1208,14 @@ H5SM__incr_ref(void *record, void *_op_data, hbool_t *changed)
*-------------------------------------------------------------------------
*/
static herr_t
-H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t defer, unsigned type_id,
+H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, bool defer, unsigned type_id,
void *mesg, unsigned *cache_flags_ptr)
{
H5SM_list_t *list = NULL; /* List index */
H5SM_mesg_key_t key; /* Key used to search the index */
H5SM_list_cache_ud_t cache_udata; /* User-data for metadata cache callback */
H5O_shared_t shared; /* Shared H5O message */
- hbool_t found = FALSE; /* Was the message in the index? */
+ bool found = false; /* Was the message in the index? */
H5HF_t *fheap = NULL; /* Fractal heap handle */
H5B2_t *bt2 = NULL; /* v2 B-tree handle for index */
size_t buf_size; /* Size of the encoded message */
@@ -1231,11 +1231,11 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t
assert(cache_flags_ptr);
/* Encode the message to be written */
- if ((buf_size = H5O_msg_raw_size(f, type_id, TRUE, mesg)) == 0)
+ if ((buf_size = H5O_msg_raw_size(f, type_id, true, mesg)) == 0)
HGOTO_ERROR(H5E_SOHM, H5E_BADSIZE, FAIL, "can't find message size");
if (NULL == (encoding_buf = H5MM_malloc(buf_size)))
HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, FAIL, "can't allocate buffer for encoding");
- if (H5O_msg_encode(f, type_id, TRUE, (unsigned char *)encoding_buf, mesg) < 0)
+ if (H5O_msg_encode(f, type_id, true, (unsigned char *)encoding_buf, mesg) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTENCODE, FAIL, "can't encode message to be shared");
/* Open the fractal heap for this index */
@@ -1275,7 +1275,7 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t
if (defer) {
if (list_pos != SIZE_MAX)
- found = TRUE;
+ found = true;
} /* end if */
else {
if (list_pos != SIZE_MAX) {
@@ -1300,7 +1300,7 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t
/* Set up the shared location to point to the shared location */
shared.u.heap_id = list->messages[list_pos].u.heap_loc.fheap_id;
- found = TRUE;
+ found = true;
} /* end if */
} /* end else */
} /* end if */
@@ -1334,7 +1334,7 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t
*/
if (H5B2_modify(bt2, &key, H5SM__incr_ref, &op_data) >= 0) {
shared.u.heap_id = op_data.fheap_id;
- found = TRUE;
+ found = true;
} /* end if */
else
H5E_clear_stack(NULL); /*ignore error*/
@@ -1668,7 +1668,7 @@ H5SM__find_in_list(const H5SM_list_t *list, const H5SM_mesg_key_t *key, size_t *
*-------------------------------------------------------------------------
*/
static herr_t
-H5SM__decr_ref(void *record, void *op_data, hbool_t *changed)
+H5SM__decr_ref(void *record, void *op_data, bool *changed)
{
H5SM_sohm_t *message = (H5SM_sohm_t *)record;
@@ -1684,7 +1684,7 @@ H5SM__decr_ref(void *record, void *op_data, hbool_t *changed)
*/
if (message->location == H5SM_IN_HEAP) {
--message->u.heap_loc.ref_count;
- *changed = TRUE;
+ *changed = true;
} /* end if */
if (op_data)
@@ -1857,7 +1857,7 @@ H5SM__delete_from_index(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, c
fheap = NULL;
/* Delete the index and its heap */
- if (H5SM__delete_index(f, header, TRUE) < 0)
+ if (H5SM__delete_index(f, header, true) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTDELETE, FAIL, "can't delete empty index");
} /* end if */
else if (header->index_type == H5SM_BTREE && header->num_messages < header->btree_min) {
@@ -1973,7 +1973,7 @@ H5SM_get_info(const H5O_loc_t *ext_loc, H5P_genplist_t *fc_plist)
* indices must be tracked on object header message in the file.
*/
if (index_flags[u] & H5O_SHMESG_ATTR_FLAG)
- H5F_SET_STORE_MSG_CRT_IDX(f, TRUE);
+ H5F_SET_STORE_MSG_CRT_IDX(f, true);
} /* end for */
/* Set values in the property list */
@@ -2158,7 +2158,7 @@ H5SM_get_refcount(H5F_t *f, unsigned type_id, const H5O_shared_t *sh_mesg, hsize
message = list->messages[list_pos];
} /* end if */
else {
- hbool_t msg_exists; /* Whether the message exists in the v2 B-tree */
+ bool msg_exists; /* Whether the message exists in the v2 B-tree */
/* Index is a B-tree */
assert(header->index_type == H5SM_BTREE);
@@ -2168,7 +2168,7 @@ H5SM_get_refcount(H5F_t *f, unsigned type_id, const H5O_shared_t *sh_mesg, hsize
HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for SOHM index");
/* Look up the message in the v2 B-tree */
- msg_exists = FALSE;
+ msg_exists = false;
if (H5B2_find(bt2, &key, &msg_exists, H5SM__get_refcount_bt2_cb, &message) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "error finding message in index");
if (!msg_exists)
@@ -2339,7 +2339,7 @@ H5SM__read_mesg(H5F_t *f, const H5SM_sohm_t *mesg, H5HF_t *fheap, H5O_t *open_oh
HGOTO_ERROR(H5E_SOHM, H5E_CANTLOAD, FAIL, "unable to open object header");
/* Load the object header from the cache */
- if (NULL == (oh = H5O_protect(&oloc, H5AC__READ_ONLY_FLAG, FALSE)))
+ if (NULL == (oh = H5O_protect(&oloc, H5AC__READ_ONLY_FLAG, false)))
HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load object header");
} /* end if */
else
diff --git a/src/H5SMcache.c b/src/H5SMcache.c
index f12f5be7b48..029e402bad3 100644
--- a/src/H5SMcache.c
+++ b/src/H5SMcache.c
@@ -51,14 +51,14 @@
/* Metadata cache (H5AC) callbacks */
static herr_t H5SM__cache_table_get_initial_load_size(void *udata, size_t *image_len);
static htri_t H5SM__cache_table_verify_chksum(const void *image_ptr, size_t len, void *udata_ptr);
-static void *H5SM__cache_table_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty);
+static void *H5SM__cache_table_deserialize(const void *image, size_t len, void *udata, bool *dirty);
static herr_t H5SM__cache_table_image_len(const void *thing, size_t *image_len);
static herr_t H5SM__cache_table_serialize(const H5F_t *f, void *image, size_t len, void *thing);
static herr_t H5SM__cache_table_free_icr(void *thing);
static herr_t H5SM__cache_list_get_initial_load_size(void *udata, size_t *image_len);
static htri_t H5SM__cache_list_verify_chksum(const void *image_ptr, size_t len, void *udata_ptr);
-static void *H5SM__cache_list_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty);
+static void *H5SM__cache_list_deserialize(const void *image, size_t len, void *udata, bool *dirty);
static herr_t H5SM__cache_list_image_len(const void *thing, size_t *image_len);
static herr_t H5SM__cache_list_serialize(const H5F_t *f, void *image, size_t len, void *thing);
static herr_t H5SM__cache_list_free_icr(void *thing);
@@ -145,7 +145,7 @@ H5SM__cache_table_get_initial_load_size(void *_udata, size_t *image_len)
* Purpose: Verify the computed checksum of the data structure is the
* same as the stored chksum.
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: Negative
*
*-------------------------------------------------------------------------
@@ -156,7 +156,7 @@ H5SM__cache_table_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNU
const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
uint32_t stored_chksum; /* Stored metadata checksum value */
uint32_t computed_chksum; /* Computed metadata checksum value */
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -167,7 +167,7 @@ H5SM__cache_table_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNU
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
if (stored_chksum != computed_chksum)
- ret_value = FALSE;
+ ret_value = false;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5SM__cache_table_verify_chksum() */
@@ -187,7 +187,7 @@ H5SM__cache_table_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNU
*/
static void *
H5SM__cache_table_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len, void *_udata,
- hbool_t H5_ATTR_UNUSED *dirty)
+ bool H5_ATTR_UNUSED *dirty)
{
H5F_t *f; /* File pointer -- from user data */
H5SM_master_table_t *table = NULL; /* Shared message table that we deserializing */
@@ -467,7 +467,7 @@ H5SM__cache_list_get_initial_load_size(void *_udata, size_t *image_len)
* Purpose: Verify the computed checksum of the data structure is the
* same as the stored chksum.
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: Negative
*
*-------------------------------------------------------------------------
@@ -480,7 +480,7 @@ H5SM__cache_list_verify_chksum(const void *_image, size_t H5_ATTR_UNUSED len, vo
size_t chk_size; /* Exact size of the node with checksum at the end */
uint32_t stored_chksum; /* Stored metadata checksum value */
uint32_t computed_chksum; /* Computed metadata checksum value */
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -495,7 +495,7 @@ H5SM__cache_list_verify_chksum(const void *_image, size_t H5_ATTR_UNUSED len, vo
H5F_get_checksums(image, chk_size, &stored_chksum, &computed_chksum);
if (stored_chksum != computed_chksum)
- ret_value = FALSE;
+ ret_value = false;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5SM__cache_list_verify_chksum() */
@@ -514,7 +514,7 @@ H5SM__cache_list_verify_chksum(const void *_image, size_t H5_ATTR_UNUSED len, vo
*/
static void *
H5SM__cache_list_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len, void *_udata,
- hbool_t H5_ATTR_UNUSED *dirty)
+ bool H5_ATTR_UNUSED *dirty)
{
H5SM_list_t *list = NULL; /* The SOHM list being read in */
H5SM_list_cache_ud_t *udata = (H5SM_list_cache_ud_t *)_udata; /* User data for callback */
diff --git a/src/H5Sall.c b/src/H5Sall.c
index 62f55de5235..0450ee75141 100644
--- a/src/H5Sall.c
+++ b/src/H5Sall.c
@@ -42,12 +42,12 @@
/********************/
/* Selection callbacks */
-static herr_t H5S__all_copy(H5S_t *dst, const H5S_t *src, hbool_t share_selection);
+static herr_t H5S__all_copy(H5S_t *dst, const H5S_t *src, bool share_selection);
static herr_t H5S__all_release(H5S_t *space);
static htri_t H5S__all_is_valid(const H5S_t *space);
static hssize_t H5S__all_serial_size(H5S_t *space);
static herr_t H5S__all_serialize(H5S_t *space, uint8_t **p);
-static herr_t H5S__all_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hbool_t skip);
+static herr_t H5S__all_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, bool skip);
static herr_t H5S__all_bounds(const H5S_t *space, hsize_t *start, hsize_t *end);
static herr_t H5S__all_offset(const H5S_t *space, hsize_t *off);
static int H5S__all_unlim_dim(const H5S_t *space);
@@ -248,7 +248,7 @@ H5S__all_iter_nelmts(const H5S_sel_iter_t *iter)
htri_t H5S__all_iter_has_next_block(iter)
const H5S_sel_iter_t *iter; IN: Pointer to selection iterator
RETURNS
- Non-negative (TRUE/FALSE) on success/Negative on failure
+ Non-negative (true/false) on success/Negative on failure
DESCRIPTION
Check if there is another block available in the selection iterator.
GLOBAL VARIABLES
@@ -264,7 +264,7 @@ H5S__all_iter_has_next_block(const H5S_sel_iter_t H5_ATTR_UNUSED *iter)
/* Check args */
assert(iter);
- FUNC_LEAVE_NOAPI(FALSE)
+ FUNC_LEAVE_NOAPI(false)
} /* end H5S__all_iter_has_next_block() */
/*--------------------------------------------------------------------------
@@ -466,7 +466,7 @@ H5S__all_release(H5S_t *space)
herr_t H5S__all_copy(dst, src, share_selection)
H5S_t *dst; OUT: Pointer to the destination dataspace
H5S_t *src; IN: Pointer to the source dataspace
- hbool_t; IN: Whether to share the selection between the dataspaces
+ bool; IN: Whether to share the selection between the dataspaces
RETURNS
Non-negative on success/Negative on failure
DESCRIPTION
@@ -478,7 +478,7 @@ H5S__all_release(H5S_t *space)
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5S__all_copy(H5S_t *dst, const H5S_t H5_ATTR_UNUSED *src, hbool_t H5_ATTR_UNUSED share_selection)
+H5S__all_copy(H5S_t *dst, const H5S_t H5_ATTR_UNUSED *src, bool H5_ATTR_UNUSED share_selection)
{
FUNC_ENTER_PACKAGE_NOERR
@@ -501,7 +501,7 @@ H5S__all_copy(H5S_t *dst, const H5S_t H5_ATTR_UNUSED *src, hbool_t H5_ATTR_UNUSE
htri_t H5S__all_is_valid(space);
H5S_t *space; IN: Dataspace pointer to query
RETURNS
- TRUE if the selection fits within the extent, FALSE if it does not and
+ true if the selection fits within the extent, false if it does not and
Negative on an error.
DESCRIPTION
Determines if the current selection at the current offset fits within the
@@ -518,7 +518,7 @@ H5S__all_is_valid(const H5S_t H5_ATTR_UNUSED *space)
assert(space);
- FUNC_LEAVE_NOAPI(TRUE)
+ FUNC_LEAVE_NOAPI(true)
} /* end H5S__all_is_valid() */
/*--------------------------------------------------------------------------
@@ -622,7 +622,7 @@ H5S__all_serialize(H5S_t *space, uint8_t **p)
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5S__all_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hbool_t skip)
+H5S__all_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, bool skip)
{
uint32_t version; /* Version number */
H5S_t *tmp_space = NULL; /* Pointer to actual dataspace to use,
@@ -661,7 +661,7 @@ H5S__all_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hboo
*p += 8;
/* Change to "all" selection */
- if (H5S_select_all(tmp_space, TRUE) < 0)
+ if (H5S_select_all(tmp_space, true) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection");
/* Return space to the caller if allocated */
@@ -798,7 +798,7 @@ H5S__all_unlim_dim(const H5S_t H5_ATTR_UNUSED *space)
htri_t H5S__all_is_contiguous(space)
H5S_t *space; IN: Dataspace pointer to check
RETURNS
- TRUE/FALSE/FAIL
+ true/false/FAIL
DESCRIPTION
Checks to see if the current selection in the dataspace is contiguous.
This is primarily used for reading the entire selection in one swoop.
@@ -814,7 +814,7 @@ H5S__all_is_contiguous(const H5S_t H5_ATTR_UNUSED *space)
assert(space);
- FUNC_LEAVE_NOAPI(TRUE)
+ FUNC_LEAVE_NOAPI(true)
} /* end H5S__all_is_contiguous() */
/*--------------------------------------------------------------------------
@@ -826,7 +826,7 @@ H5S__all_is_contiguous(const H5S_t H5_ATTR_UNUSED *space)
htri_t H5S__all_is_single(space)
H5S_t *space; IN: Dataspace pointer to check
RETURNS
- TRUE/FALSE/FAIL
+ true/false/FAIL
DESCRIPTION
Checks to see if the current selection in the dataspace is a single block.
This is primarily used for reading the entire selection in one swoop.
@@ -842,7 +842,7 @@ H5S__all_is_single(const H5S_t H5_ATTR_UNUSED *space)
assert(space);
- FUNC_LEAVE_NOAPI(TRUE)
+ FUNC_LEAVE_NOAPI(true)
} /* end H5S__all_is_single() */
/*--------------------------------------------------------------------------
@@ -854,7 +854,7 @@ H5S__all_is_single(const H5S_t H5_ATTR_UNUSED *space)
htri_t H5S__all_is_regular(space)
H5S_t *space; IN: Dataspace pointer to check
RETURNS
- TRUE/FALSE/FAIL
+ true/false/FAIL
DESCRIPTION
Checks to see if the current selection in a dataspace is the a regular
pattern.
@@ -872,7 +872,7 @@ H5S__all_is_regular(H5S_t H5_ATTR_UNUSED *space)
/* Check args */
assert(space);
- FUNC_LEAVE_NOAPI(TRUE)
+ FUNC_LEAVE_NOAPI(true)
} /* end H5S__all_is_regular() */
/*--------------------------------------------------------------------------
@@ -885,7 +885,7 @@ H5S__all_is_regular(H5S_t H5_ATTR_UNUSED *space)
H5S_t *space1; IN: First dataspace to check
H5S_t *space2; IN: Second dataspace to check
RETURNS
- TRUE / FALSE / FAIL
+ true / false / FAIL
DESCRIPTION
Checks to see if the current selection in each dataspace are the same
shape.
@@ -899,7 +899,7 @@ H5S__all_shape_same(H5S_t *space1, H5S_t *space2)
{
int space1_dim; /* Current dimension in first dataspace */
int space2_dim; /* Current dimension in second dataspace */
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -918,7 +918,7 @@ H5S__all_shape_same(H5S_t *space1, H5S_t *space2)
*/
while (space2_dim >= 0) {
if (space1->extent.size[space1_dim] != space2->extent.size[space2_dim])
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
space1_dim--;
space2_dim--;
@@ -929,7 +929,7 @@ H5S__all_shape_same(H5S_t *space1, H5S_t *space2)
*/
while (space1_dim >= 0) {
if (space1->extent.size[space1_dim] != 1)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
space1_dim--;
} /* end while */
@@ -949,7 +949,7 @@ H5S__all_shape_same(H5S_t *space1, H5S_t *space2)
const hsize_t *start; IN: Starting coordinate for block
const hsize_t *end; IN: Ending coordinate for block
RETURNS
- Non-negative TRUE / FALSE on success, negative on failure
+ Non-negative true / false on success, negative on failure
DESCRIPTION
Quickly detect intersections with a block
GLOBAL VARIABLES
@@ -969,7 +969,7 @@ H5S__all_intersect_block(H5S_t H5_ATTR_UNUSED *space, const hsize_t H5_ATTR_UNUS
assert(start);
assert(end);
- FUNC_LEAVE_NOAPI(TRUE)
+ FUNC_LEAVE_NOAPI(true)
} /* end H5S__all_intersect_block() */
/*--------------------------------------------------------------------------
@@ -1081,7 +1081,7 @@ H5S__all_project_simple(const H5S_t H5_ATTR_UNUSED *base_space, H5S_t *new_space
assert(offset);
/* Select the entire new space */
- if (H5S_select_all(new_space, TRUE) < 0)
+ if (H5S_select_all(new_space, true) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "unable to set all selection");
done:
@@ -1096,7 +1096,7 @@ H5S__all_project_simple(const H5S_t H5_ATTR_UNUSED *base_space, H5S_t *new_space
USAGE
herr_t H5S_select_all(dsid)
hid_t dsid; IN: Dataspace ID of selection to modify
- hbool_t rel_prev; IN: Flag whether to release previous selection or not
+ bool rel_prev; IN: Flag whether to release previous selection or not
RETURNS
Non-negative on success/Negative on failure
DESCRIPTION
@@ -1107,7 +1107,7 @@ H5S__all_project_simple(const H5S_t H5_ATTR_UNUSED *base_space, H5S_t *new_space
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5S_select_all(H5S_t *space, hbool_t rel_prev)
+H5S_select_all(H5S_t *space, bool rel_prev)
{
herr_t ret_value = SUCCEED; /* return value */
@@ -1162,7 +1162,7 @@ H5Sselect_all(hid_t spaceid)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace");
/* Call internal routine to do the work */
- if (H5S_select_all(space, TRUE) < 0)
+ if (H5S_select_all(space, true) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection");
done:
diff --git a/src/H5Sdeprec.c b/src/H5Sdeprec.c
index 78f42814df4..fc850874a79 100644
--- a/src/H5Sdeprec.c
+++ b/src/H5Sdeprec.c
@@ -93,7 +93,7 @@ H5Sencode1(hid_t obj_id, void *buf, size_t *nalloc)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&temp_fapl_id, H5P_CLS_FACC, H5I_INVALID_HID, TRUE) < 0)
+ if (H5CX_set_apl(&temp_fapl_id, H5P_CLS_FACC, H5I_INVALID_HID, true) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info");
/* Use (earliest, latest) i.e. not latest format */
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index 9b69926fb3c..ebfb4ef647c 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -50,7 +50,7 @@
if (recover) { \
if (H5S__hyper_free_span(curr_span) < 0) \
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, ERR, "unable to free span"); \
- (recover) = FALSE; \
+ (recover) = false; \
} \
\
/* Set the current span to saved next span */ \
@@ -94,7 +94,7 @@ typedef struct {
hsize_t skip; /* Number of elements to skip in projected space */
hsize_t nelem; /* Number of elements to add to projected space (after skip) */
uint64_t op_gen; /* Operation generation for counting elements */
- hbool_t share_selection; /* Whether span trees in dst_space can be shared with proj_space */
+ bool share_selection; /* Whether span trees in dst_space can be shared with proj_space */
} H5S_hyper_project_intersect_ud_t;
/* Assert that H5S_MAX_RANK is <= 32 so our trick with using a 32 bit bitmap
@@ -113,7 +113,7 @@ static H5S_hyper_span_info_t *H5S__hyper_new_span_info(unsigned rank);
static H5S_hyper_span_info_t *H5S__hyper_copy_span_helper(H5S_hyper_span_info_t *spans, unsigned rank,
unsigned op_info_i, uint64_t op_gen);
static H5S_hyper_span_info_t *H5S__hyper_copy_span(H5S_hyper_span_info_t *spans, unsigned rank);
-static hbool_t H5S__hyper_cmp_spans(const H5S_hyper_span_info_t *span_info1,
+static bool H5S__hyper_cmp_spans(const H5S_hyper_span_info_t *span_info1,
const H5S_hyper_span_info_t *span_info2);
static herr_t H5S__hyper_free_span_info(H5S_hyper_span_info_t *span_info);
static herr_t H5S__hyper_free_span(H5S_hyper_span_t *span);
@@ -138,10 +138,10 @@ static H5S_hyper_span_info_t *H5S__hyper_make_spans(unsigned rank, const hsize_t
static herr_t H5S__hyper_update_diminfo(H5S_t *space, H5S_seloper_t op,
const H5S_hyper_dim_t *new_hyper_diminfo);
static herr_t H5S__hyper_generate_spans(H5S_t *space);
-static hbool_t H5S__check_spans_overlap(const H5S_hyper_span_info_t *spans1,
+static bool H5S__check_spans_overlap(const H5S_hyper_span_info_t *spans1,
const H5S_hyper_span_info_t *spans2);
static herr_t H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *space2_span_lst,
- hbool_t can_own_span2, hbool_t *span2_owned, hbool_t *updated_spans,
+ bool can_own_span2, bool *span2_owned, bool *updated_spans,
H5S_t **result);
static herr_t H5S__generate_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[],
const hsize_t stride[], const hsize_t count[], const hsize_t block[]);
@@ -163,17 +163,16 @@ static herr_t H5S__hyper_proj_int_iterate(H5S_hyper_span_info_t *ss_span_
unsigned depth, H5S_hyper_project_intersect_ud_t *udata);
static void H5S__hyper_get_clip_diminfo(hsize_t start, hsize_t stride, hsize_t *count, hsize_t *block,
hsize_t clip_size);
-static hsize_t H5S__hyper_get_clip_extent_real(const H5S_t *clip_space, hsize_t num_slices,
- hbool_t incl_trail);
+static hsize_t H5S__hyper_get_clip_extent_real(const H5S_t *clip_space, hsize_t num_slices, bool incl_trail);
/* Selection callbacks */
-static herr_t H5S__hyper_copy(H5S_t *dst, const H5S_t *src, hbool_t share_selection);
+static herr_t H5S__hyper_copy(H5S_t *dst, const H5S_t *src, bool share_selection);
static herr_t H5S__hyper_release(H5S_t *space);
static htri_t H5S__hyper_is_valid(const H5S_t *space);
static hsize_t H5S__hyper_span_nblocks(H5S_hyper_span_info_t *spans);
static hssize_t H5S__hyper_serial_size(H5S_t *space);
static herr_t H5S__hyper_serialize(H5S_t *space, uint8_t **p);
-static herr_t H5S__hyper_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hbool_t skip);
+static herr_t H5S__hyper_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, bool skip);
static herr_t H5S__hyper_bounds(const H5S_t *space, hsize_t *start, hsize_t *end);
static herr_t H5S__hyper_offset(const H5S_t *space, hsize_t *offset);
static int H5S__hyper_unlim_dim(const H5S_t *space);
@@ -609,17 +608,17 @@ H5S__hyper_iter_init(H5S_t *space, H5S_sel_iter_t *iter)
for (u = (rank - 1); u > 0; u--) {
if (tdiminfo[u].count == 1 && tdiminfo[u].block == mem_size[u]) {
cont_dim++;
- iter->u.hyp.flattened[u] = TRUE;
+ iter->u.hyp.flattened[u] = true;
} /* end if */
else
- iter->u.hyp.flattened[u] = FALSE;
+ iter->u.hyp.flattened[u] = false;
} /* end for */
- iter->u.hyp.flattened[0] = FALSE;
+ iter->u.hyp.flattened[0] = false;
} /* end if */
/* Check if the regular selection can be "flattened" */
if (cont_dim > 0) {
- hbool_t last_dim_flattened = TRUE; /* Flag to indicate that the last dimension was flattened */
+ bool last_dim_flattened = true; /* Flag to indicate that the last dimension was flattened */
unsigned flat_rank = rank - cont_dim; /* Number of dimensions after flattening */
unsigned curr_dim; /* Current dimension */
@@ -635,7 +634,7 @@ H5S__hyper_iter_init(H5S_t *space, H5S_sel_iter_t *iter)
acc *= mem_size[i];
/* Indicate that the dimension was flattened */
- last_dim_flattened = TRUE;
+ last_dim_flattened = true;
} /* end if */
else {
if (last_dim_flattened) {
@@ -653,7 +652,7 @@ H5S__hyper_iter_init(H5S_t *space, H5S_sel_iter_t *iter)
iter->u.hyp.sel_off[curr_dim] = iter->sel_off[i] * (hssize_t)acc;
/* Reset the "last dim flattened" flag to avoid flattened any further dimensions */
- last_dim_flattened = FALSE;
+ last_dim_flattened = false;
/* Reset the "accumulator" for possible further dimension flattening */
acc = 1;
@@ -698,7 +697,7 @@ H5S__hyper_iter_init(H5S_t *space, H5S_sel_iter_t *iter)
} /* end else */
/* Flag the diminfo information as valid in the iterator */
- iter->u.hyp.diminfo_valid = TRUE;
+ iter->u.hyp.diminfo_valid = true;
/* Initialize irregular region information also (for release) */
iter->u.hyp.spans = NULL;
@@ -750,7 +749,7 @@ H5S__hyper_iter_init(H5S_t *space, H5S_sel_iter_t *iter)
slab_size = iter->dims;
/* Flag the diminfo information as not valid in the iterator */
- iter->u.hyp.diminfo_valid = FALSE;
+ iter->u.hyp.diminfo_valid = false;
} /* end else */
/* Compute the cumulative size of dataspace dimensions */
@@ -932,7 +931,7 @@ H5S__hyper_iter_nelmts(const H5S_sel_iter_t *iter)
htri_t H5S__hyper_iter_has_next_block(iter)
const H5S_sel_iter_t *iter; IN: Pointer to selection iterator
RETURNS
- Non-negative (TRUE/FALSE) on success/Negative on failure
+ Non-negative (true/false) on success/Negative on failure
DESCRIPTION
Check if there is another block available in the selection iterator.
GLOBAL VARIABLES
@@ -944,7 +943,7 @@ static H5_ATTR_PURE htri_t
H5S__hyper_iter_has_next_block(const H5S_sel_iter_t *iter)
{
unsigned u; /* Local index variable */
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -964,14 +963,14 @@ H5S__hyper_iter_has_next_block(const H5S_sel_iter_t *iter)
if (tdiminfo[u].count == 1)
continue;
if (toff[u] != (tdiminfo[u].start + ((tdiminfo[u].count - 1) * tdiminfo[u].stride)))
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
} /* end for */
} /* end if */
else {
/* Check for any levels of the tree with more sequences in them */
for (u = 0; u < iter->rank; u++)
if (iter->u.hyp.span[u]->next != NULL)
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
} /* end else */
done:
@@ -2604,7 +2603,7 @@ H5S__hyper_iter_get_seq_list(H5S_sel_iter_t *iter, size_t maxseq, size_t maxelem
const hssize_t *sel_off; /* Selection offset in dataspace */
unsigned ndims; /* Number of dimensions of dataset */
unsigned fast_dim; /* Rank of the fastest changing dimension for the dataspace */
- hbool_t single_block; /* Whether the selection is a single block */
+ bool single_block; /* Whether the selection is a single block */
unsigned u; /* Local index variable */
/* Set a local copy of the diminfo pointer */
@@ -2695,10 +2694,10 @@ H5S__hyper_iter_get_seq_list(H5S_sel_iter_t *iter, size_t maxseq, size_t maxelem
} /* end else */
/* Check for a single block selected */
- single_block = TRUE;
+ single_block = true;
for (u = 0; u < ndims; u++)
if (1 != tdiminfo[u].count) {
- single_block = FALSE;
+ single_block = false;
break;
} /* end if */
@@ -2985,11 +2984,11 @@ H5S__hyper_copy_span(H5S_hyper_span_info_t *spans, unsigned rank)
PURPOSE
Check if two hyperslab span trees are the same
USAGE
- hbool_t H5S__hyper_cmp_spans(span1, span2)
+ bool H5S__hyper_cmp_spans(span1, span2)
H5S_hyper_span_info_t *span_info1; IN: First span tree to compare
H5S_hyper_span_info_t *span_info2; IN: Second span tree to compare
RETURNS
- TRUE (1) or FALSE (0) on success, can't fail
+ true (1) or false (0) on success, can't fail
DESCRIPTION
Compare two hyperslab span trees to determine if they refer to the same
selection. If span1 & span2 are both NULL, that counts as equal.
@@ -2998,10 +2997,10 @@ H5S__hyper_copy_span(H5S_hyper_span_info_t *spans, unsigned rank)
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-static H5_ATTR_PURE hbool_t
+static H5_ATTR_PURE bool
H5S__hyper_cmp_spans(const H5S_hyper_span_info_t *span_info1, const H5S_hyper_span_info_t *span_info2)
{
- hbool_t ret_value = TRUE; /* Return value */
+ bool ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -3009,16 +3008,16 @@ H5S__hyper_cmp_spans(const H5S_hyper_span_info_t *span_info1, const H5S_hyper_sp
if (span_info1 != span_info2) {
/* Check for one span being NULL */
if (span_info1 == NULL || span_info2 == NULL)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
else {
/* Compare low & high bounds for this span list */
/* (Could compare lower dimensions also, but not certain if
* that's worth it. - QAK, 2019/01/23)
*/
if (span_info1->low_bounds[0] != span_info2->low_bounds[0])
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
else if (span_info1->high_bounds[0] != span_info2->high_bounds[0])
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
else {
const H5S_hyper_span_t *span1;
const H5S_hyper_span_t *span2;
@@ -3035,19 +3034,19 @@ H5S__hyper_cmp_spans(const H5S_hyper_span_info_t *span_info1, const H5S_hyper_sp
while (1) {
/* Check for both spans being NULL */
if (span1 == NULL && span2 == NULL)
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
else {
/* Check for one span being NULL */
if (span1 == NULL || span2 == NULL)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
else {
/* Check if the actual low & high span information is the same */
if (span1->low != span2->low || span1->high != span2->high)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
else {
if (span1->down != NULL || span2->down != NULL) {
if (!H5S__hyper_cmp_spans(span1->down, span2->down))
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
else {
/* Keep going... */
} /* end else */
@@ -3067,7 +3066,7 @@ H5S__hyper_cmp_spans(const H5S_hyper_span_info_t *span_info1, const H5S_hyper_sp
} /* end else */
} /* end if */
- /* Fall through, with default return value of 'TRUE' if spans were already visited */
+ /* Fall through, with default return value of 'true' if spans were already visited */
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -3184,7 +3183,7 @@ H5S__hyper_free_span(H5S_hyper_span_t *span)
herr_t H5S__hyper_copy(dst, src, share_selection)
H5S_t *dst; OUT: Pointer to the destination dataspace
H5S_t *src; IN: Pointer to the source dataspace
- hbool_t; IN: Whether to share the selection between the dataspaces
+ bool; IN: Whether to share the selection between the dataspaces
RETURNS
Non-negative on success, negative on failure
DESCRIPTION
@@ -3201,7 +3200,7 @@ H5S__hyper_free_span(H5S_hyper_span_t *span)
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5S__hyper_copy(H5S_t *dst, const H5S_t *src, hbool_t share_selection)
+H5S__hyper_copy(H5S_t *dst, const H5S_t *src, bool share_selection)
{
H5S_hyper_sel_t *dst_hslab; /* Pointer to destination hyperslab info */
const H5S_hyper_sel_t *src_hslab; /* Pointer to source hyperslab info */
@@ -3260,7 +3259,7 @@ H5S__hyper_copy(H5S_t *dst, const H5S_t *src, hbool_t share_selection)
htri_t H5S__hyper_is_valid(space);
H5S_t *space; IN: Dataspace pointer to query
RETURNS
- TRUE if the selection fits within the extent, FALSE if it does not and
+ true if the selection fits within the extent, false if it does not and
Negative on an error.
DESCRIPTION
Determines if the current selection at the current offset fits within the
@@ -3275,7 +3274,7 @@ H5S__hyper_is_valid(const H5S_t *space)
{
const hsize_t *low_bounds, *high_bounds; /* Pointers to the correct pair of low & high bounds */
unsigned u; /* Counter */
- htri_t ret_value = TRUE; /* return value */
+ htri_t ret_value = true; /* return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -3283,7 +3282,7 @@ H5S__hyper_is_valid(const H5S_t *space)
/* Check for unlimited selection */
if (space->select.sel_info.hslab->unlim_dim >= 0)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* Check which set of low & high bounds we should be using */
if (space->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_YES) {
@@ -3299,9 +3298,9 @@ H5S__hyper_is_valid(const H5S_t *space)
for (u = 0; u < space->extent.rank; u++) {
/* Bounds check the selected point + offset against the extent */
if (((hssize_t)low_bounds[u] + space->select.offset[u]) < 0)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
if ((high_bounds[u] + (hsize_t)space->select.offset[u]) >= space->extent.size[u])
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
} /* end for */
done:
@@ -3422,7 +3421,7 @@ H5S__hyper_span_nblocks(H5S_hyper_span_info_t *spans)
USAGE
hsize_t H5S__get_select_hyper_nblocks(space, app_ref)
H5S_t *space; IN: Dataspace ptr of selection to query
- hbool_t app_ref; IN: Whether this is an appl. ref. call
+ bool app_ref; IN: Whether this is an appl. ref. call
RETURNS
The number of hyperslab blocks in selection on success, negative on failure
DESCRIPTION
@@ -3433,7 +3432,7 @@ H5S__hyper_span_nblocks(H5S_hyper_span_info_t *spans)
REVISION LOG
--------------------------------------------------------------------------*/
static hsize_t
-H5S__get_select_hyper_nblocks(const H5S_t *space, hbool_t app_ref)
+H5S__get_select_hyper_nblocks(const H5S_t *space, bool app_ref)
{
hsize_t ret_value = 0; /* Return value */
@@ -3493,7 +3492,7 @@ H5Sget_select_hyper_nblocks(hid_t spaceid)
HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL,
"cannot get number of blocks for unlimited selection");
- ret_value = (hssize_t)H5S__get_select_hyper_nblocks(space, TRUE);
+ ret_value = (hssize_t)H5S__get_select_hyper_nblocks(space, true);
done:
FUNC_LEAVE_API(ret_value)
@@ -3573,8 +3572,8 @@ H5S__hyper_get_version_enc_size(H5S_t *space, hsize_t block_count, uint32_t *ver
{
hsize_t bounds_start[H5S_MAX_RANK]; /* Starting coordinate of bounding box */
hsize_t bounds_end[H5S_MAX_RANK]; /* Opposite coordinate of bounding box */
- hbool_t count_up_version = FALSE; /* Whether number of blocks exceed H5S_UINT32_MAX */
- hbool_t bound_up_version = FALSE; /* Whether high bounds exceed H5S_UINT32_MAX */
+ bool count_up_version = false; /* Whether number of blocks exceed H5S_UINT32_MAX */
+ bool bound_up_version = false; /* Whether high bounds exceed H5S_UINT32_MAX */
H5F_libver_t low_bound; /* The 'low' bound of library format versions */
H5F_libver_t high_bound; /* The 'high' bound of library format versions */
htri_t is_regular; /* A regular hyperslab or not */
@@ -3594,11 +3593,11 @@ H5S__hyper_get_version_enc_size(H5S_t *space, hsize_t block_count, uint32_t *ver
/* Determine whether the number of blocks or the high bounds in the selection exceed (2^32 - 1) */
if (block_count > H5S_UINT32_MAX)
- count_up_version = TRUE;
+ count_up_version = true;
else {
for (u = 0; u < space->extent.rank; u++)
if (bounds_end[u] > H5S_UINT32_MAX) {
- bound_up_version = TRUE;
+ bound_up_version = true;
break;
} /* end if */
} /* end else */
@@ -3735,7 +3734,7 @@ H5S__hyper_serial_size(H5S_t *space)
/* Determine the number of blocks */
if (space->select.sel_info.hslab->unlim_dim < 0) /* ! H5S_UNLIMITED */
- block_count = H5S__get_select_hyper_nblocks(space, FALSE);
+ block_count = H5S__get_select_hyper_nblocks(space, false);
/* Determine the version and the encoded size */
if (H5S__hyper_get_version_enc_size(space, block_count, &version, &enc_size) < 0)
@@ -3953,8 +3952,8 @@ H5S__hyper_serialize(H5S_t *space, uint8_t **p)
unsigned fast_dim; /* Rank of the fastest changing dimension for the dataspace */
unsigned ndims; /* Rank of the dataspace */
unsigned u; /* Local counting variable */
- hbool_t complete = FALSE; /* Whether we are done with the iteration */
- hbool_t is_regular; /* Whether selection is regular */
+ bool complete = false; /* Whether we are done with the iteration */
+ bool is_regular; /* Whether selection is regular */
uint8_t enc_size; /* Encoded size */
herr_t ret_value = SUCCEED; /* return value */
@@ -3972,7 +3971,7 @@ H5S__hyper_serialize(H5S_t *space, uint8_t **p)
/* Calculate the # of blocks */
if (space->select.sel_info.hslab->unlim_dim < 0) /* ! H5S_UNLIMITED */
- block_count = H5S__get_select_hyper_nblocks(space, FALSE);
+ block_count = H5S__get_select_hyper_nblocks(space, false);
/* Determine the version and the encoded size */
if (H5S__hyper_get_version_enc_size(space, block_count, &version, &enc_size) < 0)
@@ -4086,7 +4085,7 @@ H5S__hyper_serialize(H5S_t *space, uint8_t **p)
} /* end for */
/* Go iterate over the hyperslabs */
- while (complete == FALSE) {
+ while (complete == false) {
/* Iterate over the blocks in the fastest dimension */
while (tmp_count[fast_dim] > 0) {
/* Add 8 bytes times the rank for each hyperslab selected */
@@ -4116,7 +4115,7 @@ H5S__hyper_serialize(H5S_t *space, uint8_t **p)
/* Bubble up the decrement to the slower changing dimensions */
temp_dim = (int)fast_dim - 1;
- while (temp_dim >= 0 && complete == FALSE) {
+ while (temp_dim >= 0 && complete == false) {
/* Decrement the block count */
tmp_count[temp_dim]--;
@@ -4126,7 +4125,7 @@ H5S__hyper_serialize(H5S_t *space, uint8_t **p)
/* Check for getting out of iterator */
if (temp_dim == 0)
- complete = TRUE;
+ complete = true;
/* Reset the block count in this dimension */
tmp_count[temp_dim] = diminfo[temp_dim].count;
@@ -4215,7 +4214,7 @@ H5S__hyper_serialize(H5S_t *space, uint8_t **p)
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5S__hyper_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hbool_t skip)
+H5S__hyper_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, bool skip)
{
H5S_t *tmp_space = NULL; /* Pointer to actual dataspace to use,
either *space or a newly allocated one */
@@ -4657,7 +4656,7 @@ H5S__get_select_hyper_blocklist(H5S_t *space, hsize_t startblock, hsize_t numblo
hsize_t end[H5S_MAX_RANK]; /* End of elements in dataspace */
unsigned fast_dim; /* Rank of the fastest changing dimension for the dataspace */
unsigned ndims; /* Rank of the dataspace */
- hbool_t done; /* Whether we are done with the iteration */
+ bool done; /* Whether we are done with the iteration */
unsigned u; /* Counter */
/* Set some convenience values */
@@ -4687,7 +4686,7 @@ H5S__get_select_hyper_blocklist(H5S_t *space, hsize_t startblock, hsize_t numblo
} /* end for */
/* We're not done with the iteration */
- done = FALSE;
+ done = false;
/* Go iterate over the hyperslabs */
while (!done && numblocks > 0) {
@@ -4757,7 +4756,7 @@ H5S__get_select_hyper_blocklist(H5S_t *space, hsize_t startblock, hsize_t numblo
/* Check for getting out of iterator */
if (temp_dim == 0)
- done = TRUE;
+ done = true;
/* Wrapped a dimension, go up to next dimension */
temp_dim--;
@@ -5110,7 +5109,7 @@ H5S__hyper_num_elem_non_unlim(const H5S_t *space, hsize_t *num_elem_non_unlim)
htri_t H5S__hyper_is_contiguous(space)
H5S_t *space; IN: Dataspace pointer to check
RETURNS
- TRUE/FALSE/FAIL
+ true/false/FAIL
DESCRIPTION
Checks to see if the current selection in the dataspace is contiguous.
This is primarily used for reading the entire selection in one swoop.
@@ -5122,10 +5121,10 @@ H5S__hyper_num_elem_non_unlim(const H5S_t *space, hsize_t *num_elem_non_unlim)
static H5_ATTR_PURE htri_t
H5S__hyper_is_contiguous(const H5S_t *space)
{
- hbool_t small_contiguous, /* Flag for small contiguous block */
+ bool small_contiguous, /* Flag for small contiguous block */
large_contiguous; /* Flag for large contiguous block */
unsigned u; /* index variable */
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -5151,31 +5150,31 @@ H5S__hyper_is_contiguous(const H5S_t *space)
*/
/* Initialize flags */
- large_contiguous = TRUE; /* assume true and reset if the dimensions don't match */
- small_contiguous = FALSE; /* assume false initially */
+ large_contiguous = true; /* assume true and reset if the dimensions don't match */
+ small_contiguous = false; /* assume false initially */
/* Check for a "large contiguous" block */
for (u = 0; u < space->extent.rank; u++) {
if (diminfo[u].count > 1) {
- large_contiguous = FALSE;
+ large_contiguous = false;
break;
} /* end if */
if (u > 0 && diminfo[u].block != space->extent.size[u]) {
- large_contiguous = FALSE;
+ large_contiguous = false;
break;
} /* end if */
} /* end for */
/* If we didn't find a large contiguous block, check for a small one */
if (!large_contiguous) {
- small_contiguous = TRUE;
+ small_contiguous = true;
for (u = 0; u < space->extent.rank; u++) {
if (diminfo[u].count > 1) {
- small_contiguous = FALSE;
+ small_contiguous = false;
break;
} /* end if */
if (u < (space->extent.rank - 1) && diminfo[u].block != 1) {
- small_contiguous = FALSE;
+ small_contiguous = false;
break;
} /* end if */
} /* end for */
@@ -5183,7 +5182,7 @@ H5S__hyper_is_contiguous(const H5S_t *space)
/* Indicate true if it's either a large or small contiguous block */
if (large_contiguous || small_contiguous)
- ret_value = TRUE;
+ ret_value = true;
} /* end if */
else {
H5S_hyper_span_info_t *spans; /* Hyperslab span info node */
@@ -5197,8 +5196,8 @@ H5S__hyper_is_contiguous(const H5S_t *space)
* block size must be 1 in all but the fastest changing dimension.
*/
/* Initialize flags */
- large_contiguous = TRUE; /* assume true and reset if the dimensions don't match */
- small_contiguous = FALSE; /* assume false initially */
+ large_contiguous = true; /* assume true and reset if the dimensions don't match */
+ small_contiguous = false; /* assume false initially */
/* Get information for slowest changing information */
spans = space->select.sel_info.hslab->span_lst;
@@ -5206,7 +5205,7 @@ H5S__hyper_is_contiguous(const H5S_t *space)
/* If there are multiple spans in the slowest changing dimension, the selection isn't contiguous */
if (span->next != NULL)
- large_contiguous = FALSE;
+ large_contiguous = false;
else {
/* Now check the rest of the dimensions */
if (span->down != NULL) {
@@ -5221,14 +5220,14 @@ H5S__hyper_is_contiguous(const H5S_t *space)
/* Check that this is the only span and it spans the entire dimension */
if (span->next != NULL) {
- large_contiguous = FALSE;
+ large_contiguous = false;
break;
} /* end if */
else {
/* If this span doesn't cover the entire dimension, then this selection isn't
* contiguous */
if (((span->high - span->low) + 1) != space->extent.size[u]) {
- large_contiguous = FALSE;
+ large_contiguous = false;
break;
} /* end if */
else {
@@ -5245,7 +5244,7 @@ H5S__hyper_is_contiguous(const H5S_t *space)
/* If we didn't find a large contiguous block, check for a small one */
if (!large_contiguous) {
- small_contiguous = TRUE;
+ small_contiguous = true;
/* Get information for slowest changing information */
spans = space->select.sel_info.hslab->span_lst;
@@ -5260,14 +5259,14 @@ H5S__hyper_is_contiguous(const H5S_t *space)
/* Check that this is the only span and it spans the entire dimension */
if (span->next != NULL) {
- small_contiguous = FALSE;
+ small_contiguous = false;
break;
} /* end if */
else {
/* If this span doesn't cover the entire dimension, then this selection isn't contiguous
*/
if (u < (space->extent.rank - 1) && ((span->high - span->low) + 1) != 1) {
- small_contiguous = FALSE;
+ small_contiguous = false;
break;
} /* end if */
else {
@@ -5283,7 +5282,7 @@ H5S__hyper_is_contiguous(const H5S_t *space)
/* Indicate true if it's either a large or small contiguous block */
if (large_contiguous || small_contiguous)
- ret_value = TRUE;
+ ret_value = true;
} /* end else */
FUNC_LEAVE_NOAPI(ret_value)
@@ -5298,7 +5297,7 @@ H5S__hyper_is_contiguous(const H5S_t *space)
htri_t H5S__hyper_is_single(space)
H5S_t *space; IN: Dataspace pointer to check
RETURNS
- TRUE/FALSE/FAIL
+ true/false/FAIL
DESCRIPTION
Checks to see if the current selection in the dataspace is a single block.
This is primarily used for reading the entire selection in one swoop.
@@ -5310,7 +5309,7 @@ H5S__hyper_is_contiguous(const H5S_t *space)
static H5_ATTR_PURE htri_t
H5S__hyper_is_single(const H5S_t *space)
{
- htri_t ret_value = TRUE; /* return value */
+ htri_t ret_value = true; /* return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -5331,7 +5330,7 @@ H5S__hyper_is_single(const H5S_t *space)
/* Check for a single block */
for (u = 0; u < space->extent.rank; u++)
if (space->select.sel_info.hslab->diminfo.opt[u].count > 1)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
} /* end if */
else {
H5S_hyper_span_info_t *spans; /* Hyperslab span info node */
@@ -5350,7 +5349,7 @@ H5S__hyper_is_single(const H5S_t *space)
/* Check that this is the only span and it spans the entire dimension */
if (span->next != NULL)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
else
/* Walk down to the next span */
spans = span->down;
@@ -5370,7 +5369,7 @@ H5S__hyper_is_single(const H5S_t *space)
htri_t H5S__hyper_is_regular(space)
H5S_t *space; IN: Dataspace pointer to check
RETURNS
- TRUE/FALSE/FAIL
+ true/false/FAIL
DESCRIPTION
Checks to see if the current selection in a dataspace is the a regular
pattern.
@@ -5398,9 +5397,9 @@ H5S__hyper_is_regular(H5S_t *space)
/* Only simple check for regular hyperslabs for now... */
if (space->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_YES)
- ret_value = TRUE;
+ ret_value = true;
else
- ret_value = FALSE;
+ ret_value = false;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__hyper_is_regular() */
@@ -5411,15 +5410,15 @@ H5S__hyper_is_regular(H5S_t *space)
PURPOSE
Helper routine to check if two hyperslab span trees are the same shape
USAGE
- hbool_t H5S__hyper_spans_shape_same_helper(span1, span2, offset, rest_zeros)
+ bool H5S__hyper_spans_shape_same_helper(span1, span2, offset, rest_zeros)
H5S_hyper_span_info_t *span_info1; IN: First span tree to compare
H5S_hyper_span_info_t *span_info2; IN: Second span tree to compare
hssize_t offset[]; IN: Offset between the span trees
- hbool_t rest_zeros[]; IN: Array of flags which indicate
+ bool rest_zeros[]; IN: Array of flags which indicate
the rest of the offset[] array
is zero values.
RETURNS
- TRUE (1) or FALSE (0) on success, can't fail
+ true (1) or false (0) on success, can't fail
DESCRIPTION
Compare two hyperslab span trees to determine if they refer to a selection
with the same shape, with a possible (constant) offset between their
@@ -5430,12 +5429,12 @@ H5S__hyper_is_regular(H5S_t *space)
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-static H5_ATTR_PURE hbool_t
+static H5_ATTR_PURE bool
H5S__hyper_spans_shape_same_helper(const H5S_hyper_span_info_t *span_info1,
const H5S_hyper_span_info_t *span_info2, hssize_t offset[],
- hbool_t rest_zeros[])
+ bool rest_zeros[])
{
- hbool_t ret_value = TRUE; /* Return value */
+ bool ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -5450,9 +5449,9 @@ H5S__hyper_spans_shape_same_helper(const H5S_hyper_span_info_t *span_info1,
* that's worth it. - QAK, 2019/01/23)
*/
if ((hsize_t)((hssize_t)span_info1->low_bounds[0] + offset[0]) != span_info2->low_bounds[0])
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
else if ((hsize_t)((hssize_t)span_info1->high_bounds[0] + offset[0]) != span_info2->high_bounds[0])
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
else {
const H5S_hyper_span_t *span1;
const H5S_hyper_span_t *span2;
@@ -5469,23 +5468,23 @@ H5S__hyper_spans_shape_same_helper(const H5S_hyper_span_info_t *span_info1,
while (1) {
/* Check for both spans being NULL */
if (span1 == NULL && span2 == NULL)
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
/* Check for one span being NULL */
if (span1 == NULL || span2 == NULL)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* Check if the actual low & high span information is the same */
if ((hsize_t)((hssize_t)span1->low + offset[0]) != span2->low ||
(hsize_t)((hssize_t)span1->high + offset[0]) != span2->high)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* Check for down tree for this span */
if (span1->down != NULL || span2->down != NULL) {
/* If the rest of the span trees have a zero offset, use the faster comparison routine */
if (rest_zeros[0]) {
if (!H5S__hyper_cmp_spans(span1->down, span2->down))
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
else {
/* Keep going... */
} /* end else */
@@ -5493,7 +5492,7 @@ H5S__hyper_spans_shape_same_helper(const H5S_hyper_span_info_t *span_info1,
else {
if (!H5S__hyper_spans_shape_same_helper(span1->down, span2->down, &offset[1],
&rest_zeros[1]))
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
else {
/* Keep going... */
} /* end else */
@@ -5509,7 +5508,7 @@ H5S__hyper_spans_shape_same_helper(const H5S_hyper_span_info_t *span_info1,
} /* end while */
} /* end else */
- /* Fall through, with default return value of 'TRUE' if spans were already visited */
+ /* Fall through, with default return value of 'true' if spans were already visited */
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -5521,11 +5520,11 @@ H5S__hyper_spans_shape_same_helper(const H5S_hyper_span_info_t *span_info1,
PURPOSE
Check if two hyperslab span trees are the same shape
USAGE
- hbool_t H5S__hyper_spans_shape_same(span1, span2)
+ bool H5S__hyper_spans_shape_same(span1, span2)
H5S_hyper_span_info_t *span_info1; IN: First span tree to compare
H5S_hyper_span_info_t *span_info2; IN: Second span tree to compare
RETURNS
- TRUE (1) or FALSE (0) on success, can't fail
+ true (1) or false (0) on success, can't fail
DESCRIPTION
Compare two hyperslab span trees to determine if they refer to a selection
with the same shape. Very similar to H5S__hyper_cmp_spans, except the
@@ -5535,17 +5534,17 @@ H5S__hyper_spans_shape_same_helper(const H5S_hyper_span_info_t *span_info1,
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-static H5_ATTR_PURE hbool_t
+static H5_ATTR_PURE bool
H5S__hyper_spans_shape_same(const H5S_hyper_span_info_t *span_info1, const H5S_hyper_span_info_t *span_info2,
unsigned ndims)
{
const H5S_hyper_span_t *span1; /* Pointer to spans in first span tree */
const H5S_hyper_span_t *span2; /* Pointer to spans in second span tree */
hssize_t offset[H5S_MAX_RANK]; /* Offset vector for selections */
- hbool_t rest_zeros[H5S_MAX_RANK]; /* Vector of flags to indicate when remaining offset is all zero */
- hbool_t zero_offset; /* Whether the two selections have a non-zero offset */
+ bool rest_zeros[H5S_MAX_RANK]; /* Vector of flags to indicate when remaining offset is all zero */
+ bool zero_offset; /* Whether the two selections have a non-zero offset */
unsigned u; /* Local index variable */
- hbool_t ret_value = TRUE; /* Return value */
+ bool ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -5561,7 +5560,7 @@ H5S__hyper_spans_shape_same(const H5S_hyper_span_info_t *span_info1, const H5S_h
/* Check for an offset between the two selections */
span1 = span_info1->head;
span2 = span_info2->head;
- zero_offset = TRUE;
+ zero_offset = true;
for (u = 0; u < ndims; u++) {
/* Check for offset in this dimension */
if (span1->low != span2->low) {
@@ -5569,7 +5568,7 @@ H5S__hyper_spans_shape_same(const H5S_hyper_span_info_t *span_info1, const H5S_h
/* Indicate that the offset vector is not all zeros */
if (zero_offset)
- zero_offset = FALSE;
+ zero_offset = false;
} /* end if */
/* Sanity check */
@@ -5590,7 +5589,7 @@ H5S__hyper_spans_shape_same(const H5S_hyper_span_info_t *span_info1, const H5S_h
/* Find first non-zero offset, from the fastest dimension up */
for (i = (int)(ndims - 1); i >= 0; i--)
if (offset[i]) {
- rest_zeros[i] = TRUE;
+ rest_zeros[i] = true;
break;
} /* end if */
@@ -5621,7 +5620,7 @@ H5S__hyper_spans_shape_same(const H5S_hyper_span_info_t *span_info1, const H5S_h
H5S_t *space1; IN: First dataspace to check
H5S_t *space2; IN: Second dataspace to check
RETURNS
- TRUE / FALSE / FAIL
+ true / false / FAIL
DESCRIPTION
Checks to see if the current selection in each dataspace are the same
shape.
@@ -5640,7 +5639,7 @@ H5S__hyper_shape_same(H5S_t *space1, H5S_t *space2)
{
unsigned space1_rank; /* Number of dimensions of first dataspace */
unsigned space2_rank; /* Number of dimensions of second dataspace */
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE
@@ -5679,15 +5678,15 @@ H5S__hyper_shape_same(H5S_t *space1, H5S_t *space2)
while (space2_dim >= 0) {
if (space1->select.sel_info.hslab->diminfo.opt[space1_dim].stride !=
space2->select.sel_info.hslab->diminfo.opt[space2_dim].stride)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
if (space1->select.sel_info.hslab->diminfo.opt[space1_dim].count !=
space2->select.sel_info.hslab->diminfo.opt[space2_dim].count)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
if (space1->select.sel_info.hslab->diminfo.opt[space1_dim].block !=
space2->select.sel_info.hslab->diminfo.opt[space2_dim].block)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
space1_dim--;
space2_dim--;
@@ -5695,7 +5694,7 @@ H5S__hyper_shape_same(H5S_t *space1, H5S_t *space2)
while (space1_dim >= 0) {
if (space1->select.sel_info.hslab->diminfo.opt[space1_dim].block != 1)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
space1_dim--;
} /* end while */
@@ -5731,11 +5730,11 @@ H5S__hyper_shape_same(H5S_t *space1, H5S_t *space2)
/* Check for more spans in this dimension */
if (span->next)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* Check for span size > 1 element */
if (span->low != span->high)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* Walk down to the next dimension */
spans1 = span->down;
@@ -5752,7 +5751,7 @@ H5S__hyper_shape_same(H5S_t *space1, H5S_t *space2)
ret_value = H5S__hyper_spans_shape_same(spans1, space2->select.sel_info.hslab->span_lst, space2_rank);
} /* end else */
- /* Fall through with 'TRUE' value, if not set earlier */
+ /* Fall through with 'true' value, if not set earlier */
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -5922,7 +5921,7 @@ H5S__hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ra
/* Check & update high bounds for lower dimensions */
if (*first_dim_modified >= 0) {
unsigned first_dim; /* First dimension modified, relative to this span tree */
- hbool_t first_dim_set = FALSE; /* Whether first dimension modified is set */
+ bool first_dim_set = false; /* Whether first dimension modified is set */
unsigned u; /* Local index variable */
/* Adjust first dimension modified to be relative to this span tree */
@@ -5941,7 +5940,7 @@ H5S__hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ra
/* Need to signal to higher dimensions if high bounds changed */
if (!first_dim_set) {
*first_dim_modified = (int)u;
- first_dim_set = TRUE;
+ first_dim_set = true;
} /* end if */
} /* end if */
} /* end for */
@@ -5985,7 +5984,7 @@ H5S__hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ra
*/
tmp_span = tail_span->down->head;
while (tmp_span != stop_span) {
- hbool_t attempt_merge_spans = FALSE; /* Whether to merge spans */
+ bool attempt_merge_spans = false; /* Whether to merge spans */
/* Different tests for when to run the 'merge' algorithm,
* depending whether there's "down trees" or not.
@@ -5993,7 +5992,7 @@ H5S__hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ra
if (NULL == tmp_span->down) {
/* Spin through spans until we find the one before the 'stop' span */
if (tmp_span->next == stop_span)
- attempt_merge_spans = TRUE;
+ attempt_merge_spans = true;
} /* end if */
else {
/* Check if we've compared the 'stop' span's "down tree" to
@@ -6001,7 +6000,7 @@ H5S__hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ra
*/
if (tmp_span->down->op_info[0].op_gen != op_gen) {
if (H5S__hyper_cmp_spans(tmp_span->down, stop_span->down))
- attempt_merge_spans = TRUE;
+ attempt_merge_spans = true;
/* Remember that we visited this span's "down tree" already */
/* (Because it wasn't the same as the 'stop' span's down tree
@@ -6215,7 +6214,7 @@ H5S_hyper_add_span_element(H5S_t *space, unsigned rank, const hsize_t *coords)
PURPOSE
Helper routine to detect intersections in span trees
USAGE
- hbool_t H5S__hyper_intersect_block_helper(spans, rank, start, end, op_info_i, op_gen)
+ bool H5S__hyper_intersect_block_helper(spans, rank, start, end, op_info_i, op_gen)
H5S_hyper_span_info_t *spans; IN: First span tree to operate with
unsigned rank; IN: Number of dimensions for span tree
hsize_t *start; IN: Starting coordinate for block
@@ -6223,7 +6222,7 @@ H5S_hyper_add_span_element(H5S_t *space, unsigned rank, const hsize_t *coords)
unsigned op_info_i; IN: Index of op info to use
uint64_t op_gen; IN: Operation generation
RETURN
- Non-negative (TRUE/FALSE) on success, can't fail
+ Non-negative (true/false) on success, can't fail
DESCRIPTION
Quickly detect intersections between span tree and block
GLOBAL VARIABLES
@@ -6231,11 +6230,11 @@ H5S_hyper_add_span_element(H5S_t *space, unsigned rank, const hsize_t *coords)
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-static hbool_t
+static bool
H5S__hyper_intersect_block_helper(H5S_hyper_span_info_t *spans, unsigned rank, const hsize_t *start,
const hsize_t *end, unsigned op_info_i, uint64_t op_gen)
{
- hbool_t ret_value = FALSE; /* Return value */
+ bool ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -6254,7 +6253,7 @@ H5S__hyper_intersect_block_helper(H5S_hyper_span_info_t *spans, unsigned rank, c
*/
for (u = 0; u < rank; u++)
if (start[u] > spans->high_bounds[u] || end[u] < spans->low_bounds[u])
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* Get the span list for spans in this tree */
curr = spans->head;
@@ -6267,12 +6266,12 @@ H5S__hyper_intersect_block_helper(H5S_hyper_span_info_t *spans, unsigned rank, c
curr = curr->next;
/* If this span is past the end of the block, then we're done in this dimension */
else if (curr->low > *end)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* block & span overlap */
else {
/* If this is the bottom dimension, then the span tree overlaps the block */
if (curr->down == NULL)
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
/* Recursively check spans in next dimension down */
else {
/* If there is an intersection in the "down" dimensions,
@@ -6280,7 +6279,7 @@ H5S__hyper_intersect_block_helper(H5S_hyper_span_info_t *spans, unsigned rank, c
*/
if (H5S__hyper_intersect_block_helper(curr->down, rank - 1, start + 1, end + 1, op_info_i,
op_gen))
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
/* No intersection in down dimensions, advance to next span */
curr = curr->next;
@@ -6292,7 +6291,7 @@ H5S__hyper_intersect_block_helper(H5S_hyper_span_info_t *spans, unsigned rank, c
spans->op_info[op_info_i].op_gen = op_gen;
} /* end if */
- /* Fall through with 'FALSE' return value */
+ /* Fall through with 'false' return value */
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -6309,7 +6308,7 @@ H5S__hyper_intersect_block_helper(H5S_hyper_span_info_t *spans, unsigned rank, c
const hsize_t *start; IN: Starting coordinate for block
const hsize_t *end; IN: Ending coordinate for block
RETURNS
- Non-negative TRUE / FALSE on success, negative on failure
+ Non-negative true / false on success, negative on failure
DESCRIPTION
Quickly detect intersections between both regular hyperslabs and span trees
with a block
@@ -6340,24 +6339,24 @@ H5S__hyper_intersect_block(H5S_t *space, const hsize_t *start, const hsize_t *en
/* Check for regular hyperslab intersection */
if (space->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_YES) {
- hbool_t single_block; /* Whether the regular selection is a single block */
+ bool single_block; /* Whether the regular selection is a single block */
unsigned u; /* Local index variable */
/* Check for a single block */
/* For a regular hyperslab to be single, it must have only one block
* (i.e. count == 1 in all dimensions).
*/
- single_block = TRUE;
+ single_block = true;
for (u = 0; u < space->extent.rank; u++)
if (space->select.sel_info.hslab->diminfo.opt[u].count > 1)
- single_block = FALSE;
+ single_block = false;
/* Single blocks have already been "compared" above, in the low / high
- * bound checking, so just return TRUE if we've reached here - they
+ * bound checking, so just return true if we've reached here - they
* would have been rejected earlier, if they didn't intersect.
*/
if (single_block)
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
else {
/* Loop over the dimensions, checking for an intersection */
for (u = 0; u < space->extent.rank; u++) {
@@ -6402,15 +6401,15 @@ H5S__hyper_intersect_block(H5S_t *space, const hsize_t *start, const hsize_t *en
* it doesn't intersect.
*/
if (adj_end < space->select.sel_info.hslab->diminfo.opt[u].stride)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
} /* end if */
} /* end if */
} /* end for */
/* If we've looped through all dimensions and none of them didn't
- * overlap, then all of them do, so we report TRUE.
+ * overlap, then all of them do, so we report true.
*/
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
} /* end else */
} /* end if */
else {
@@ -6517,7 +6516,7 @@ H5S__hyper_adjust_u_helper(H5S_hyper_span_info_t *spans, unsigned rank, const hs
static herr_t
H5S__hyper_adjust_u(H5S_t *space, const hsize_t *offset)
{
- hbool_t non_zero_offset = FALSE; /* Whether any offset is non-zero */
+ bool non_zero_offset = false; /* Whether any offset is non-zero */
unsigned u; /* Local index variable */
FUNC_ENTER_PACKAGE_NOERR
@@ -6529,7 +6528,7 @@ H5S__hyper_adjust_u(H5S_t *space, const hsize_t *offset)
/* Check for an all-zero offset vector */
for (u = 0; u < space->extent.rank; u++)
if (0 != offset[u]) {
- non_zero_offset = TRUE;
+ non_zero_offset = true;
break;
}
@@ -7052,7 +7051,7 @@ H5S__hyper_adjust_s_helper(H5S_hyper_span_info_t *spans, unsigned rank, const hs
static herr_t
H5S__hyper_adjust_s(H5S_t *space, const hssize_t *offset)
{
- hbool_t non_zero_offset = FALSE; /* Whether any offset is non-zero */
+ bool non_zero_offset = false; /* Whether any offset is non-zero */
unsigned u; /* Local index variable */
FUNC_ENTER_PACKAGE_NOERR
@@ -7064,7 +7063,7 @@ H5S__hyper_adjust_s(H5S_t *space, const hssize_t *offset)
/* Check for an all-zero offset vector */
for (u = 0; u < space->extent.rank; u++)
if (0 != offset[u]) {
- non_zero_offset = TRUE;
+ non_zero_offset = true;
break;
} /* end if */
@@ -7116,7 +7115,7 @@ H5S__hyper_adjust_s(H5S_t *space, const hssize_t *offset)
H5S_t *space; IN/OUT: Pointer to dataspace to move
hssize_t *old_offset; OUT: Pointer to space to store old offset
RETURNS
- TRUE/FALSE for hyperslab selection, FAIL on error
+ true/false for hyperslab selection, FAIL on error
DESCRIPTION
Copies the current selection offset into the array provided, then
inverts the selection offset, subtracts the offset from the hyperslab
@@ -7129,7 +7128,7 @@ H5S__hyper_adjust_s(H5S_t *space, const hssize_t *offset)
htri_t
H5S_hyper_normalize_offset(H5S_t *space, hssize_t *old_offset)
{
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -7155,7 +7154,7 @@ H5S_hyper_normalize_offset(H5S_t *space, hssize_t *old_offset)
memset(space->select.offset, 0, sizeof(hssize_t) * space->extent.rank);
/* Indicate that the offset was normalized */
- ret_value = TRUE;
+ ret_value = true;
} /* end if */
done:
@@ -7284,8 +7283,8 @@ H5S__hyper_append_span(H5S_hyper_span_info_t **span_tree, unsigned ndims, hsize_
H5S_hyper_span_info_t *new_down; /* Down pointer for new span node */
/* Sanity check */
- /* (If down_cmp was set to TRUE above, we won't be in this branch) */
- assert(down_cmp != TRUE);
+ /* (If down_cmp was set to true above, we won't be in this branch) */
+ assert(down_cmp != true);
/* Check if there is actually a down span */
if (down) {
@@ -7315,7 +7314,7 @@ H5S__hyper_append_span(H5S_hyper_span_info_t **span_tree, unsigned ndims, hsize_
/* Check if we are sharing down spans with a previous node */
/* (Only need to check for bounds changing if down spans aren't shared) */
- if (down_cmp == FALSE) {
+ if (down_cmp == false) {
unsigned u; /* Local index variable */
/* Loop over lower dimensions, checking & updating low & high bounds */
@@ -7388,10 +7387,10 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
unsigned ndims, H5S_hyper_span_info_t **a_not_b, H5S_hyper_span_info_t **a_and_b,
H5S_hyper_span_info_t **b_not_a)
{
- hbool_t need_a_not_b; /* Whether to generate a_not_b list */
- hbool_t need_a_and_b; /* Whether to generate a_and_b list */
- hbool_t need_b_not_a; /* Whether to generate b_not_a list */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool need_a_not_b; /* Whether to generate a_not_b list */
+ bool need_a_and_b; /* Whether to generate a_and_b list */
+ bool need_b_not_a; /* Whether to generate b_not_a list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -7451,14 +7450,14 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
else {
H5S_hyper_span_t *span_a; /* Pointer to a node in span tree 'a' */
H5S_hyper_span_t *span_b; /* Pointer to a node in span tree 'b' */
- hbool_t recover_a, recover_b; /* Flags to indicate when to recover temporary spans */
+ bool recover_a, recover_b; /* Flags to indicate when to recover temporary spans */
/* Get the pointers to the new and old span lists */
span_a = a_spans->head;
span_b = b_spans->head;
/* No spans to recover yet */
- recover_a = recover_b = FALSE;
+ recover_a = recover_b = false;
/* Work through the list of spans in the new list */
while (span_a != NULL && span_b != NULL) {
@@ -7535,7 +7534,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the a_not_b list */
if (down_a_not_b) {
- assert(need_a_not_b == TRUE);
+ assert(need_a_not_b == true);
/* Merge/add overlapped part with/to a_not_b list */
if (H5S__hyper_append_span(a_not_b, ndims, span_b->low, span_a->high,
@@ -7550,7 +7549,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the a_and_b list */
if (down_a_and_b) {
- assert(need_a_and_b == TRUE);
+ assert(need_a_and_b == true);
/* Merge/add overlapped part with/to a_and_b list */
if (H5S__hyper_append_span(a_and_b, ndims, span_b->low, span_a->high,
@@ -7565,7 +7564,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the b_not_a list */
if (down_b_not_a) {
- assert(need_b_not_a == TRUE);
+ assert(need_b_not_a == true);
/* Merge/add overlapped part with/to b_not_a list */
if (H5S__hyper_append_span(b_not_a, ndims, span_b->low, span_a->high,
@@ -7593,7 +7592,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Make upper part of span 'b' into new span 'b' */
H5S_HYPER_ADVANCE_SPAN(recover_b, span_b, tmp_span, FAIL);
- recover_b = TRUE;
+ recover_b = true;
} /* end if */
/* No upper part of span 'b' to split */
else {
@@ -7646,7 +7645,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the a_not_b list */
if (down_a_not_b) {
- assert(need_a_not_b == TRUE);
+ assert(need_a_not_b == true);
/* Merge/add overlapped part with/to a_not_b list */
if (H5S__hyper_append_span(a_not_b, ndims, span_b->low, span_b->high,
@@ -7661,7 +7660,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the a_and_b list */
if (down_a_and_b) {
- assert(need_a_and_b == TRUE);
+ assert(need_a_and_b == true);
/* Merge/add overlapped part with/to a_and_b list */
if (H5S__hyper_append_span(a_and_b, ndims, span_b->low, span_b->high,
@@ -7676,7 +7675,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the b_not_a list */
if (down_b_not_a) {
- assert(need_b_not_a == TRUE);
+ assert(need_b_not_a == true);
/* Merge/add overlapped part with/to b_not_a list */
if (H5S__hyper_append_span(b_not_a, ndims, span_b->low, span_b->high,
@@ -7699,7 +7698,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Make upper part of span 'a' the new span 'a' */
H5S_HYPER_ADVANCE_SPAN(recover_a, span_a, tmp_span, FAIL);
- recover_a = TRUE;
+ recover_a = true;
/* Advance span 'b' */
H5S_HYPER_ADVANCE_SPAN(recover_b, span_b, span_b->next, FAIL);
@@ -7754,7 +7753,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the a_not_b list */
if (down_a_not_b) {
- assert(need_a_not_b == TRUE);
+ assert(need_a_not_b == true);
/* Merge/add overlapped part with/to a_not_b list */
if (H5S__hyper_append_span(a_not_b, ndims, span_a->low, span_a->high,
@@ -7769,7 +7768,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the a_and_b list */
if (down_a_and_b) {
- assert(need_a_and_b == TRUE);
+ assert(need_a_and_b == true);
/* Merge/add overlapped part with/to a_and_b list */
if (H5S__hyper_append_span(a_and_b, ndims, span_a->low, span_a->high,
@@ -7784,7 +7783,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the b_not_a list */
if (down_b_not_a) {
- assert(need_b_not_a == TRUE);
+ assert(need_b_not_a == true);
/* Merge/add overlapped part with/to b_not_a list */
if (H5S__hyper_append_span(b_not_a, ndims, span_a->low, span_a->high,
@@ -7812,7 +7811,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Make upper part of span 'b' the new span 'b' */
H5S_HYPER_ADVANCE_SPAN(recover_b, span_b, tmp_span, FAIL);
- recover_b = TRUE;
+ recover_b = true;
} /* end if */
else {
/* Advance both span 'a' & span 'b' */
@@ -7872,7 +7871,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the a_not_b list */
if (down_a_not_b) {
- assert(need_a_not_b == TRUE);
+ assert(need_a_not_b == true);
/* Merge/add overlapped part with/to a_not_b list */
if (H5S__hyper_append_span(a_not_b, ndims, span_a->low, span_b->high,
@@ -7887,7 +7886,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the a_and_b list */
if (down_a_and_b) {
- assert(need_a_and_b == TRUE);
+ assert(need_a_and_b == true);
/* Merge/add overlapped part with/to a_and_b list */
if (H5S__hyper_append_span(a_and_b, ndims, span_a->low, span_b->high,
@@ -7902,7 +7901,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the b_not_a list */
if (down_b_not_a) {
- assert(need_b_not_a == TRUE);
+ assert(need_b_not_a == true);
/* Merge/add overlapped part with/to b_not_a list */
if (H5S__hyper_append_span(b_not_a, ndims, span_a->low, span_b->high,
@@ -7925,7 +7924,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Make upper part of span 'a' into new span 'a' */
H5S_HYPER_ADVANCE_SPAN(recover_a, span_a, tmp_span, FAIL);
- recover_a = TRUE;
+ recover_a = true;
/* Advance span 'b' */
H5S_HYPER_ADVANCE_SPAN(recover_b, span_b, span_b->next, FAIL);
@@ -8061,14 +8060,14 @@ H5S__hyper_merge_spans_helper(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
else {
H5S_hyper_span_t *span_a; /* Pointer to current span 'a' working on */
H5S_hyper_span_t *span_b; /* Pointer to current span 'b' working on */
- hbool_t recover_a, recover_b; /* Flags to indicate when to recover temporary spans */
+ bool recover_a, recover_b; /* Flags to indicate when to recover temporary spans */
/* Get the pointers to the 'a' and 'b' span lists */
span_a = a_spans->head;
span_b = b_spans->head;
/* No spans to recover yet */
- recover_a = recover_b = FALSE;
+ recover_a = recover_b = false;
/* Work through the list of spans in the new list */
while (span_a != NULL && span_b != NULL) {
@@ -8134,7 +8133,7 @@ H5S__hyper_merge_spans_helper(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
/* Set new span 'b' to tmp_span */
H5S_HYPER_ADVANCE_SPAN(recover_b, span_b, tmp_span, NULL);
- recover_b = TRUE;
+ recover_b = true;
} /* end if */
else {
/* Advance both span 'a' & 'b' */
@@ -8183,7 +8182,7 @@ H5S__hyper_merge_spans_helper(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
/* Set new span 'a' to tmp_span */
H5S_HYPER_ADVANCE_SPAN(recover_a, span_a, tmp_span, NULL);
- recover_a = TRUE;
+ recover_a = true;
/* Advance span 'b' */
H5S_HYPER_ADVANCE_SPAN(recover_b, span_b, span_b->next, NULL);
@@ -8239,7 +8238,7 @@ H5S__hyper_merge_spans_helper(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
/* Set new span 'b' to tmp_span */
H5S_HYPER_ADVANCE_SPAN(recover_b, span_b, tmp_span, NULL);
- recover_b = TRUE;
+ recover_b = true;
} /* end if */
else {
/* Advance both spans */
@@ -8295,7 +8294,7 @@ H5S__hyper_merge_spans_helper(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
/* Set new span 'a' to tmp_span */
H5S_HYPER_ADVANCE_SPAN(recover_a, span_a, tmp_span, NULL);
- recover_a = TRUE;
+ recover_a = true;
/* Advance span 'b' */
H5S_HYPER_ADVANCE_SPAN(recover_b, span_b, span_b->next, NULL);
@@ -8763,7 +8762,7 @@ H5S__hyper_update_diminfo(H5S_t *space, H5S_seloper_t op, const H5S_hyper_dim_t
space->select.sel_info.hslab->diminfo_valid = H5S_DIMINFO_VALID_NO;
else {
H5S_hyper_dim_t tmp_diminfo[H5S_MAX_RANK]; /* Temporary dimension info */
- hbool_t found_nonidentical_dim = FALSE;
+ bool found_nonidentical_dim = false;
unsigned curr_dim;
/* Copy current diminfo.opt values */
@@ -8896,7 +8895,7 @@ H5S__hyper_update_diminfo(H5S_t *space, H5S_seloper_t op, const H5S_hyper_dim_t
} /* end else */
/* Indicate that we found a nonidentical dim */
- found_nonidentical_dim = TRUE;
+ found_nonidentical_dim = true;
} /* end if */
} /* end for */
@@ -8942,7 +8941,7 @@ H5S__hyper_update_diminfo(H5S_t *space, H5S_seloper_t op, const H5S_hyper_dim_t
const H5S_hyper_span_t *spans; IN: Portion of span tree to check
H5S_hyper_dim_t span_slab_info[]; OUT: Rebuilt section of hyperslab description
RETURNS
- TRUE/FALSE for hyperslab selection rebuilt
+ true/false for hyperslab selection rebuilt
DESCRIPTION
Examine the span tree for a hyperslab selection and rebuild
the start/stride/count/block information for the selection, if possible.
@@ -8954,7 +8953,7 @@ H5S__hyper_update_diminfo(H5S_t *space, H5S_seloper_t op, const H5S_hyper_dim_t
REVISION LOG
KY, 2005/9/22
--------------------------------------------------------------------------*/
-static hbool_t
+static bool
H5S__hyper_rebuild_helper(const H5S_hyper_span_info_t *spans, H5S_hyper_dim_t span_slab_info[])
{
const H5S_hyper_span_t *span; /* Hyperslab span */
@@ -8964,7 +8963,7 @@ H5S__hyper_rebuild_helper(const H5S_hyper_span_info_t *spans, H5S_hyper_dim_t sp
hsize_t block; /* Block size for this dimension */
hsize_t prev_low; /* Low bound for previous span */
size_t spancount; /* Number of spans encountered in this dimension */
- hbool_t ret_value = TRUE; /* Return value */
+ bool ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -8981,7 +8980,7 @@ H5S__hyper_rebuild_helper(const H5S_hyper_span_info_t *spans, H5S_hyper_dim_t sp
if (span->down)
/* Go to the next down span and check whether the selection can be rebuilt */
if (!H5S__hyper_rebuild_helper(span->down, &span_slab_info[1]))
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* Assign the initial starting point & block size for this dimension */
start = span->low;
@@ -9001,7 +9000,7 @@ H5S__hyper_rebuild_helper(const H5S_hyper_span_info_t *spans, H5S_hyper_dim_t sp
/* (Can skip check if previous span's down pointer is same as current one) */
if (span->down && prev_span->down != span->down)
if (!H5S__hyper_cmp_spans(span->down, prev_span->down))
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* Obtain values for stride and block */
curr_stride = span->low - prev_low;
@@ -9011,10 +9010,10 @@ H5S__hyper_rebuild_helper(const H5S_hyper_span_info_t *spans, H5S_hyper_dim_t sp
* three spans are needed. Account for the first two spans.
*/
if (curr_block != block)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
if (spancount > 1) {
if (stride != curr_stride)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
} /* end if */
else
stride = curr_stride;
@@ -9073,7 +9072,7 @@ H5S__hyper_rebuild(H5S_t *space)
/* Check whether the slab can be rebuilt */
/* (Only regular selection can be rebuilt. If yes, fill in correct values) */
- if (FALSE == H5S__hyper_rebuild_helper(space->select.sel_info.hslab->span_lst, rebuilt_slab_info))
+ if (false == H5S__hyper_rebuild_helper(space->select.sel_info.hslab->span_lst, rebuilt_slab_info))
space->select.sel_info.hslab->diminfo_valid = H5S_DIMINFO_VALID_IMPOSSIBLE;
else {
/* Set the dimension info & bounds for the dataspace, from the rebuilt info */
@@ -9155,21 +9154,21 @@ H5S__hyper_generate_spans(H5S_t *space)
PURPOSE
Check if two selections' bounds overlap.
USAGE
- hbool_t H5S__check_spans_overlap(spans1, spans2)
+ bool H5S__check_spans_overlap(spans1, spans2)
const H5S_hyper_span_info_t *spans1; IN: Second span list
const H5S_hyper_span_info_t *spans2; IN: Second span list
RETURNS
- TRUE for overlap, FALSE for no overlap
+ true for overlap, false for no overlap
PROGRAMMER
GLOBAL VARIABLES
COMMENTS, BUGS, ASSUMPTIONS
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-static H5_ATTR_PURE hbool_t
+static H5_ATTR_PURE bool
H5S__check_spans_overlap(const H5S_hyper_span_info_t *spans1, const H5S_hyper_span_info_t *spans2)
{
- hbool_t ret_value = FALSE; /* Return value */
+ bool ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -9195,10 +9194,10 @@ H5S__check_spans_overlap(const H5S_hyper_span_info_t *spans1, const H5S_hyper_sp
/* Check lower dimensions for overlap */
if (H5S__check_spans_overlap(span1->down, span2->down))
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
} /* end if */
else
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
} /* end if */
/* Advance one of the spans */
@@ -9241,10 +9240,10 @@ H5S__check_spans_overlap(const H5S_hyper_span_info_t *spans1, const H5S_hyper_sp
H5S_t *space1; IN: Dataspace containing the first span list
H5S_seloper_t op; IN: Selection operation
H5S_hyper_span_info_t *space2_span_lst; IN: Second span list
- hbool_t can_own_span2; IN: Indicates whether the 2nd span list could be
+ bool can_own_span2; IN: Indicates whether the 2nd span list could be
owned by the result. If not, the 2nd span list
has to be copied.
- hbool_t *span2_owned; OUT: Indicates if the 2nd span list is actually owned
+ bool *span2_owned; OUT: Indicates if the 2nd span list is actually owned
H5S_t **result; OUT: The dataspace containing the new selection. It
could be same with the 1st dataspace.
RETURNS
@@ -9258,16 +9257,16 @@ H5S__check_spans_overlap(const H5S_hyper_span_info_t *spans1, const H5S_hyper_sp
--------------------------------------------------------------------------*/
static herr_t
H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *space2_span_lst,
- hbool_t can_own_span2, hbool_t *span2_owned, hbool_t *updated_spans, H5S_t **result)
+ bool can_own_span2, bool *span2_owned, bool *updated_spans, H5S_t **result)
{
H5S_hyper_span_info_t *a_not_b =
NULL; /* Span tree for hyperslab spans in old span tree and not in new span tree */
H5S_hyper_span_info_t *a_and_b = NULL; /* Span tree for hyperslab spans in both old and new span trees */
H5S_hyper_span_info_t *b_not_a =
NULL; /* Span tree for hyperslab spans in new span tree and not in old span tree */
- hbool_t overlapped = FALSE; /* Whether selections overlap */
- hbool_t is_result_new = FALSE;
- herr_t ret_value = SUCCEED; /* Return value */
+ bool overlapped = false; /* Whether selections overlap */
+ bool is_result_new = false;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -9280,16 +9279,16 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s
assert(span2_owned);
/* Reset flags to return */
- *span2_owned = FALSE;
- *updated_spans = FALSE;
+ *span2_owned = false;
+ *updated_spans = false;
/* The result shares the same info from space1 */
if (*result == NULL) {
- if (NULL == ((*result) = H5S_copy(space1, TRUE, TRUE)))
+ if (NULL == ((*result) = H5S_copy(space1, true, true)))
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to copy dataspace");
space1->select.sel_info.hslab->span_lst->count--;
(*result)->select.sel_info.hslab->span_lst = NULL;
- is_result_new = TRUE;
+ is_result_new = true;
} /* end if */
/* Check both spaces to see if they overlap */
@@ -9315,11 +9314,11 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s
else {
if (H5S__hyper_add_disjoint_spans(*result, space2_span_lst) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't append hyperslabs");
- *span2_owned = TRUE;
+ *span2_owned = true;
} /* end else */
/* Indicate that the spans changed */
- *updated_spans = TRUE;
+ *updated_spans = true;
break;
case H5S_SELECT_AND:
@@ -9335,7 +9334,7 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s
H5S__hyper_copy_span(space1->select.sel_info.hslab->span_lst, space1->extent.rank);
/* Indicate that the spans changed */
- *updated_spans = TRUE;
+ *updated_spans = true;
break;
case H5S_SELECT_NOTA:
@@ -9354,14 +9353,14 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s
H5S__hyper_copy_span(space2_span_lst, space1->extent.rank);
else {
(*result)->select.sel_info.hslab->span_lst = space2_span_lst;
- *span2_owned = TRUE;
+ *span2_owned = true;
}
/* Reset the number of items in selection */
(*result)->select.num_elem = H5S__hyper_spans_nelem(space2_span_lst);
/* Indicate that the spans changed */
- *updated_spans = TRUE;
+ *updated_spans = true;
break;
case H5S_SELECT_NOOP:
@@ -9460,7 +9459,7 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s
(*result)->select.num_elem = H5S__hyper_spans_nelem(a_not_b);
/* Indicate that the spans were updated */
- *updated_spans = TRUE;
+ *updated_spans = true;
/* Indicate that the a_not_b spans are owned */
a_not_b = NULL;
@@ -9483,7 +9482,7 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s
(*result)->select.num_elem = H5S__hyper_spans_nelem(a_and_b);
/* Indicate that the spans were updated */
- *updated_spans = TRUE;
+ *updated_spans = true;
/* Indicate that the a_and_b spans are owned */
a_and_b = NULL;
@@ -9498,19 +9497,19 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s
(*result)->select.num_elem += H5S__hyper_spans_nelem(b_not_a);
/* Indicate that the spans were updated */
- *updated_spans = TRUE;
+ *updated_spans = true;
} /* end if */
} /* end else for the case the new span overlaps with the old (i.e. space) */
/* Check if the spans weren't updated, and reset selection if so */
if (!*updated_spans) {
- /* If updated_spans remains FALSE as in this branch, it means the
+ /* If updated_spans remains false as in this branch, it means the
* result has been cleared in XOR / AND / NOTB / NOTA cases, and the
* result is a copy of the dataspace in the OR case.
*
* If two dataspaces have generated any of the three clipped
* span trees (i.e. a_not_b, a_and_b, and b_not_a), the
- * updated_spans must be TRUE.
+ * updated_spans must be true.
*/
if (H5S_SELECT_OR != op) {
/* Convert *result to "none" selection */
@@ -9581,11 +9580,11 @@ H5S__generate_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], c
new_spans = NULL;
}
else {
- hbool_t new_spans_owned = FALSE;
- hbool_t updated_spans = FALSE;
+ bool new_spans_owned = false;
+ bool updated_spans = false;
/* Generate new spans for space */
- if (H5S__fill_in_new_space(space, op, new_spans, TRUE, &new_spans_owned, &updated_spans, &space) < 0)
+ if (H5S__fill_in_new_space(space, op, new_spans, true, &new_spans_owned, &updated_spans, &space) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't generate the specified hyperslab");
/* Check if the spans were updated by H5S__fill_in_new_space */
@@ -9732,8 +9731,8 @@ static herr_t
H5S__hyper_regular_and_single_block(H5S_t *space, const hsize_t start[], const hsize_t block[])
{
hsize_t select_end, block_end; /* End of block & selection */
- hbool_t single_block; /* Whether the selection is a single block */
- hbool_t overlap; /* Whether block & selection overlap */
+ bool single_block; /* Whether the selection is a single block */
+ bool overlap; /* Whether block & selection overlap */
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
@@ -9745,10 +9744,10 @@ H5S__hyper_regular_and_single_block(H5S_t *space, const hsize_t start[], const h
assert(block);
/* Check for single block selection in dataspace */
- single_block = TRUE;
+ single_block = true;
for (u = 0; u < space->extent.rank; u++)
if (1 != space->select.sel_info.hslab->diminfo.opt[u].count) {
- single_block = FALSE;
+ single_block = false;
break;
} /* end if */
@@ -9758,7 +9757,7 @@ H5S__hyper_regular_and_single_block(H5S_t *space, const hsize_t start[], const h
hsize_t new_block[H5S_MAX_RANK]; /* New block size */
/* Check for overlap and compute new start offset & block sizes */
- overlap = TRUE;
+ overlap = true;
for (u = 0; u < space->extent.rank; u++) {
/* Compute the end of the selection & block in this dimension */
select_end = space->select.sel_info.hslab->diminfo.high_bounds[u];
@@ -9767,7 +9766,7 @@ H5S__hyper_regular_and_single_block(H5S_t *space, const hsize_t start[], const h
/* Check for overlap */
if (!H5S_RANGE_OVERLAP(space->select.sel_info.hslab->diminfo.opt[u].start, select_end, start[u],
block_end)) {
- overlap = FALSE;
+ overlap = false;
break;
} /* end if */
@@ -9793,15 +9792,15 @@ H5S__hyper_regular_and_single_block(H5S_t *space, const hsize_t start[], const h
hsize_t new_count[H5S_MAX_RANK]; /* New count for hyperslab selection */
hsize_t stride[H5S_MAX_RANK]; /* Stride for hyperslab selection */
hsize_t new_block[H5S_MAX_RANK]; /* New block for hyperslab selection */
- hbool_t partial_first_span; /* Whether first span in intersection is partial */
- hbool_t partial_last_span; /* Whether last span in intersection is partial */
+ bool partial_first_span; /* Whether first span in intersection is partial */
+ bool partial_last_span; /* Whether last span in intersection is partial */
/* Iterate over selection, checking for overlap and computing first / last
* span that intersects with the block.
*/
- overlap = TRUE;
- partial_first_span = FALSE;
- partial_last_span = FALSE;
+ overlap = true;
+ partial_first_span = false;
+ partial_last_span = false;
for (u = 0; u < space->extent.rank; u++) {
hsize_t first_span_start, first_span_end; /* Start / end of first span */
hsize_t last_span_start, last_span_end; /* Start / end of last span */
@@ -9814,7 +9813,7 @@ H5S__hyper_regular_and_single_block(H5S_t *space, const hsize_t start[], const h
/* Check for overlap */
if (!H5S_RANGE_OVERLAP(space->select.sel_info.hslab->diminfo.opt[u].start, select_end, start[u],
block_end)) {
- overlap = FALSE;
+ overlap = false;
break;
} /* end if */
@@ -9826,7 +9825,7 @@ H5S__hyper_regular_and_single_block(H5S_t *space, const hsize_t start[], const h
/* Check if first span overlaps _end_ of block */
if (block_end >= first_span_start && block_end <= first_span_end)
- partial_first_span = TRUE;
+ partial_first_span = true;
} /* end if */
else {
hsize_t adj_start; /* Start coord, adjusted for hyperslab selection parameters */
@@ -9847,7 +9846,7 @@ H5S__hyper_regular_and_single_block(H5S_t *space, const hsize_t start[], const h
/* Check if first span overlaps start of block */
if (first_span_start < start[u] && first_span_end >= start[u])
- partial_first_span = TRUE;
+ partial_first_span = true;
/* Advance first span to start higher than block's start,
* if it's not partial.
@@ -9866,7 +9865,7 @@ H5S__hyper_regular_and_single_block(H5S_t *space, const hsize_t start[], const h
/* Check if last span overlaps _start_ of block */
if (start[u] >= last_span_start && start[u] <= last_span_end)
- partial_last_span = TRUE;
+ partial_last_span = true;
} /* end if */
else {
hsize_t adj_end; /* End coord, adjusted for hyperslab selection parameters */
@@ -9887,13 +9886,13 @@ H5S__hyper_regular_and_single_block(H5S_t *space, const hsize_t start[], const h
/* Check if last span overlaps end of block */
if (block_end >= last_span_start && block_end <= last_span_end)
- partial_last_span = TRUE;
+ partial_last_span = true;
} /* end else */
/* Check if no spans are inside block */
/* (Can happen when block falls in "gap" between spans) */
if (last_span_end < start[u]) {
- overlap = FALSE;
+ overlap = false;
break;
} /* end if */
@@ -10187,7 +10186,7 @@ H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], cons
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't set regular hyperslab selection");
} /* end if */
else if (op >= H5S_SELECT_OR && op <= H5S_SELECT_NOTA) {
- hbool_t single_block; /* Whether the selection is a single block */
+ bool single_block; /* Whether the selection is a single block */
/* Sanity check */
assert(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS);
@@ -10229,10 +10228,10 @@ H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], cons
} /* end if */
/* Check for a single block selected */
- single_block = TRUE;
+ single_block = true;
for (u = 0; u < space->extent.rank; u++)
if (1 != opt_count[u]) {
- single_block = FALSE;
+ single_block = false;
break;
} /* end if */
@@ -10397,7 +10396,7 @@ H5S_combine_hyperslab(const H5S_t *old_space, H5S_seloper_t op, const hsize_t st
case H5S_SELECT_NOTA: /* Binary "B not A" operation for hyperslabs */
/* Convert to "none" selection */
/* Copy the first dataspace without sharing the list of spans */
- if (NULL == ((*new_space) = H5S_copy(old_space, TRUE, TRUE)))
+ if (NULL == ((*new_space) = H5S_copy(old_space, true, true)))
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to copy dataspace");
if (H5S_select_none((*new_space)) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't convert selection");
@@ -10407,7 +10406,7 @@ H5S_combine_hyperslab(const H5S_t *old_space, H5S_seloper_t op, const hsize_t st
case H5S_SELECT_XOR: /* Binary "xor" operation for hyperslabs */
case H5S_SELECT_NOTB: /* Binary "A not B" operation for hyperslabs */
/* Copy the first dataspace with sharing the list of spans */
- if (NULL == ((*new_space) = H5S_copy(old_space, FALSE, TRUE)))
+ if (NULL == ((*new_space) = H5S_copy(old_space, false, true)))
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to copy dataspace");
HGOTO_DONE(SUCCEED); /* Selection stays same */
@@ -10427,7 +10426,7 @@ H5S_combine_hyperslab(const H5S_t *old_space, H5S_seloper_t op, const hsize_t st
hsize_t *old_high_bounds;
hsize_t new_low_bounds[H5S_MAX_RANK]; /* New space's low & high bounds */
hsize_t new_high_bounds[H5S_MAX_RANK];
- hbool_t overlapped = FALSE;
+ bool overlapped = false;
/* Set up old space's low & high bounds */
if (old_space->select.sel_info.hslab->span_lst) {
@@ -10447,14 +10446,14 @@ H5S_combine_hyperslab(const H5S_t *old_space, H5S_seloper_t op, const hsize_t st
/* Check bound box of both spaces to see if they overlap */
if (H5S_RANGE_OVERLAP(old_low_bounds[0], old_high_bounds[0], new_low_bounds[0], new_high_bounds[0]))
- overlapped = TRUE;
+ overlapped = true;
/* Non-overlapping situations can be handled in special ways */
if (!overlapped) {
H5S_hyper_span_info_t *new_spans = NULL;
H5S_hyper_dim_t new_hyper_diminfo[H5S_MAX_RANK];
- if (NULL == ((*new_space) = H5S_copy(old_space, TRUE, TRUE)))
+ if (NULL == ((*new_space) = H5S_copy(old_space, true, true)))
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy dataspace");
if (NULL != (*new_space)->select.sel_info.hslab->span_lst) {
old_space->select.sel_info.hslab->span_lst->count--;
@@ -10526,7 +10525,7 @@ H5S_combine_hyperslab(const H5S_t *old_space, H5S_seloper_t op, const hsize_t st
} /* end if the selection of old space is H5S_SEL_HYPERSLABS */
/* Copy the first dataspace with sharing the list of spans */
- if (NULL == ((*new_space) = H5S_copy(old_space, TRUE, TRUE)))
+ if (NULL == ((*new_space) = H5S_copy(old_space, true, true)))
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to copy dataspace");
/* Note: a little overhead in calling the function as some conditions are checked again */
@@ -10550,9 +10549,9 @@ H5S_combine_hyperslab(const H5S_t *old_space, H5S_seloper_t op, const hsize_t st
static herr_t
H5S__fill_in_select(H5S_t *space1, H5S_seloper_t op, H5S_t *space2, H5S_t **result)
{
- hbool_t span2_owned;
- hbool_t updated_spans;
- herr_t ret_value = SUCCEED; /* Return value */
+ bool span2_owned;
+ bool updated_spans;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -10567,7 +10566,7 @@ H5S__fill_in_select(H5S_t *space1, H5S_seloper_t op, H5S_t *space2, H5S_t **resu
assert(space2->select.sel_info.hslab->span_lst);
/* Note: the offset of space2 is not considered here for bounding box */
- if (H5S__fill_in_new_space(space1, op, space2->select.sel_info.hslab->span_lst, FALSE, &span2_owned,
+ if (H5S__fill_in_new_space(space1, op, space2->select.sel_info.hslab->span_lst, false, &span2_owned,
&updated_spans, result) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't create the specified selection");
@@ -10640,7 +10639,7 @@ H5Scombine_hyperslab(hid_t space_id, H5S_seloper_t op, const hsize_t start[], co
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, H5I_INVALID_HID, "unable to set hyperslab selection");
/* Register */
- if ((ret_value = H5I_register(H5I_DATASPACE, new_space, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_DATASPACE, new_space, true)) < 0)
HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataspace ID");
done:
@@ -10779,7 +10778,7 @@ H5Scombine_select(hid_t space1_id, H5S_seloper_t op, hid_t space2_id)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, H5I_INVALID_HID, "unable to create hyperslab selection");
/* Register */
- if ((ret_value = H5I_register(H5I_DATASPACE, new_space, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_DATASPACE, new_space, true)) < 0)
HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataspace ID");
done:
@@ -11406,18 +11405,18 @@ H5S__hyper_proj_int_iterate(H5S_hyper_span_info_t *ss_span_info, const H5S_hyper
hsize_t low; /* Low bounds of current intersection */
hsize_t old_skip; /* Value of udata->skip before main loop */
hsize_t old_nelem; /* Value of udata->nelem before main loop */
- hbool_t check_intersect; /* Whether to check for intersecting elements */
+ bool check_intersect; /* Whether to check for intersecting elements */
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
/* Check for non-overlapping bounds */
- check_intersect = TRUE;
+ check_intersect = true;
for (u = 0; u < (udata->ss_rank - depth); u++)
if (!H5S_RANGE_OVERLAP(ss_span_info->low_bounds[u], ss_span_info->high_bounds[u],
sis_span_info->low_bounds[u], sis_span_info->high_bounds[u])) {
- check_intersect = FALSE;
+ check_intersect = false;
break;
} /* end if */
@@ -11646,7 +11645,7 @@ H5S__hyper_proj_int_iterate(H5S_hyper_span_info_t *ss_span_info, const H5S_hyper
src_intersect_space H5S_t *dst_space; IN: Selection that is mapped to src_space, and which contains the
result H5S_t *src_intersect_space; IN: Selection whose intersection with src_space is projected to dst_space
to obtain the result H5S_t *proj_space; OUT: Will contain the result (intersection of src_intersect_space
-and src_space projected from src_space to dst_space) after the operation hbool_t share_selection; IN: Whether
+and src_space projected from src_space to dst_space) after the operation bool share_selection; IN: Whether
we are allowed to share structures inside dst_space with proj_space RETURNS Non-negative on success/Negative
on failure. DESCRIPTION Projects the intersection of of the selections of src_space and src_intersect_space
within the selection of src_space as a selection within the selection of dst_space. The result is placed in
@@ -11657,7 +11656,7 @@ if dst_space must be preserved. GLOBAL VARIABLES COMMENTS, BUGS, ASSUMPTIONS EXA
--------------------------------------------------------------------------*/
herr_t
H5S__hyper_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_intersect_space,
- H5S_t *proj_space, hbool_t share_selection)
+ H5S_t *proj_space, bool share_selection)
{
H5S_hyper_project_intersect_ud_t udata; /* User data for subroutines */
H5S_hyper_span_info_t *ss_span_info;
@@ -11755,7 +11754,7 @@ H5S__hyper_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i
/* Check for elements in projected space */
if (udata.ps_span_info[0]) {
/* Allocate space for the hyperslab selection information (note this sets
- * diminfo_valid to FALSE, diminfo arrays to 0, and span list to NULL) */
+ * diminfo_valid to false, diminfo arrays to 0, and span list to NULL) */
if (NULL == (proj_space->select.sel_info.hslab = H5FL_CALLOC(H5S_hyper_sel_t)))
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate hyperslab info");
@@ -12012,7 +12011,7 @@ H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size)
hsize_t H5S__hyper_get_clip_extent_real(clip_space,num_slices,incl_trail)
const H5S_t *clip_space, IN: Space that clip size will be calculated based on
hsize_t num_slizes, IN: Number of slices clip_space should contain when clipped
- hbool_t incl_trail; IN: Whether to include trailing unselected space
+ bool incl_trail; IN: Whether to include trailing unselected space
RETURNS
Clip extent to match num_slices (never fails)
DESCRIPTION
@@ -12020,7 +12019,7 @@ H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size)
(via H5S_hyper_clip_unlim) in order for it to contain num_slices
slices in the unlimited dimension. If the clipped selection would end
immediately before a section of unselected space (i.e. at the end of a
- block), then if incl_trail is TRUE, the returned clip extent is
+ block), then if incl_trail is true, the returned clip extent is
selected to include that trailing "blank" space, otherwise it is
selected to end at the end before the blank space.
GLOBAL VARIABLES
@@ -12030,7 +12029,7 @@ H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size)
REVISION LOG
--------------------------------------------------------------------------*/
static hsize_t
-H5S__hyper_get_clip_extent_real(const H5S_t *clip_space, hsize_t num_slices, hbool_t incl_trail)
+H5S__hyper_get_clip_extent_real(const H5S_t *clip_space, hsize_t num_slices, bool incl_trail)
{
const H5S_hyper_dim_t *diminfo; /* Convenience pointer to opt_unlim_diminfo in unlimited dimension */
hsize_t count;
@@ -12090,16 +12089,16 @@ H5S__hyper_get_clip_extent_real(const H5S_t *clip_space, hsize_t num_slices, hbo
hsize_t H5S__hyper_get_clip_extent(clip_space,match_space,incl_trail)
const H5S_t *clip_space, IN: Space that clip size will be calculated based on
const H5S_t *match_space, IN: Space containing the same number of elements as clip_space should after
-clipping hbool_t incl_trail; IN: Whether to include trailing unselected space RETURNS Calculated clip
+clipping bool incl_trail; IN: Whether to include trailing unselected space RETURNS Calculated clip
extent (never fails) DESCRIPTION Calculates and returns the extent that clip_space should be clipped to (via
H5S_hyper_clip_unlim) in order for it to contain the same number of elements as match_space. If the clipped
selection would end immediately before a section of unselected space (i.e. at the end of a block), then if
-incl_trail is TRUE, the returned clip extent is selected to include that trailing "blank" space, otherwise it
+incl_trail is true, the returned clip extent is selected to include that trailing "blank" space, otherwise it
is selected to end at the end before the blank space. GLOBAL VARIABLES COMMENTS, BUGS, ASSUMPTIONS Note this
assumes the offset has been normalized. EXAMPLES REVISION LOG
--------------------------------------------------------------------------*/
hsize_t
-H5S_hyper_get_clip_extent(const H5S_t *clip_space, const H5S_t *match_space, hbool_t incl_trail)
+H5S_hyper_get_clip_extent(const H5S_t *clip_space, const H5S_t *match_space, bool incl_trail)
{
hsize_t num_slices; /* Number of slices in unlimited dimension */
hsize_t ret_value = 0; /* Return value */
@@ -12141,18 +12140,18 @@ H5S_hyper_get_clip_extent(const H5S_t *clip_space, const H5S_t *match_space, hbo
const H5S_t *clip_space, IN: Space that clip size will be calculated based on
const H5S_t *match_space, IN: Space that, after being clipped to match_clip_size, contains the same
number of elements as clip_space should after clipping hsize_t match_clip_size, IN: Extent match_space would
-be clipped to to match the number of elements in clip_space hbool_t incl_trail; IN: Whether to include
+be clipped to to match the number of elements in clip_space bool incl_trail; IN: Whether to include
trailing unselected space RETURNS Calculated clip extent (never fails) DESCRIPTION Calculates and returns the
extent that clip_space should be clipped to (via H5S_hyper_clip_unlim) in order for it to contain the same
number of elements as match_space would have after being clipped to match_clip_size. If the clipped selection
would end immediately before a section of unselected space (i.e. at the end of a block), then if incl_trail is
-TRUE, the returned clip extent is selected to include that trailing "blank" space, otherwise it is selected to
+true, the returned clip extent is selected to include that trailing "blank" space, otherwise it is selected to
end at the end before the blank space. GLOBAL VARIABLES COMMENTS, BUGS, ASSUMPTIONS Note this assumes the
offset has been normalized. EXAMPLES REVISION LOG
--------------------------------------------------------------------------*/
hsize_t
H5S_hyper_get_clip_extent_match(const H5S_t *clip_space, const H5S_t *match_space, hsize_t match_clip_size,
- hbool_t incl_trail)
+ bool incl_trail)
{
const H5S_hyper_dim_t
*match_diminfo; /* Convenience pointer to opt_unlim_diminfo in unlimited dimension in match_space */
@@ -12219,7 +12218,7 @@ H5S_hyper_get_clip_extent_match(const H5S_t *clip_space, const H5S_t *match_spac
H5S_t *H5S_hyper_get_unlim_block(space,block_index)
const H5S_t *space, IN: Space with unlimited selection
hsize_t block_index, IN: Index of block to return in unlimited dimension
- hbool_t incl_trail; IN: Whether to include trailing unselected space
+ bool incl_trail; IN: Whether to include trailing unselected space
RETURNS
New space on success/NULL on failure.
DESCRIPTION
@@ -12272,7 +12271,7 @@ H5S_hyper_get_unlim_block(const H5S_t *space, hsize_t block_index)
/* Create output space, copy extent */
if (NULL == (space_out = H5S_create(H5S_SIMPLE)))
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, NULL, "unable to create output dataspace");
- if (H5S__extent_copy_real(&space_out->extent, &space->extent, TRUE) < 0)
+ if (H5S__extent_copy_real(&space_out->extent, &space->extent, true) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, NULL, "unable to copy destination space extent");
/* Select block as defined by start/stride/count/block computed above */
@@ -12300,15 +12299,15 @@ H5S_hyper_get_unlim_block(const H5S_t *space, hsize_t block_index)
hsize_t H5S_hyper_get_first_inc_block(space,clip_size,partial)
const H5S_t *space, IN: Space with unlimited selection
hsize_t clip_size, IN: Extent space would be clipped to
- hbool_t *partial; OUT: Whether the ret_valueth block (first incomplete block) is partial
+ bool *partial; OUT: Whether the ret_valueth block (first incomplete block) is partial
RETURNS
Index of first incomplete block in clip_size (never fails).
DESCRIPTION
Calculates and returns the index (as would be passed to
H5S_hyper_get_unlim_block()) of the first block in the unlimited
dimension of space which would be incomplete or missing when space is
- clipped to clip_size. partial is set to TRUE if the first incomplete
- block is partial, and FALSE if the first incomplete block is missing.
+ clipped to clip_size. partial is set to true if the first incomplete
+ block is partial, and false if the first incomplete block is missing.
GLOBAL VARIABLES
COMMENTS, BUGS, ASSUMPTIONS
Note this assumes the offset has been normalized.
@@ -12316,7 +12315,7 @@ H5S_hyper_get_unlim_block(const H5S_t *space, hsize_t block_index)
REVISION LOG
--------------------------------------------------------------------------*/
hsize_t
-H5S_hyper_get_first_inc_block(const H5S_t *space, hsize_t clip_size, hbool_t *partial)
+H5S_hyper_get_first_inc_block(const H5S_t *space, hsize_t clip_size, bool *partial)
{
H5S_hyper_sel_t *hslab; /* Convenience pointer to hyperslab info */
H5S_hyper_dim_t *diminfo; /* Convenience pointer to diminfo in unlimited dimension */
@@ -12337,7 +12336,7 @@ H5S_hyper_get_first_inc_block(const H5S_t *space, hsize_t clip_size, hbool_t *pa
if (diminfo->start >= clip_size) {
ret_value = 0;
if (partial)
- partial = FALSE;
+ partial = false;
} /* end if */
else {
/* Calculate index of first incomplete block */
@@ -12346,9 +12345,9 @@ H5S_hyper_get_first_inc_block(const H5S_t *space, hsize_t clip_size, hbool_t *pa
if (partial) {
/* Check for partial block */
if ((diminfo->stride * ret_value) < (clip_size - diminfo->start))
- *partial = TRUE;
+ *partial = true;
else
- *partial = FALSE;
+ *partial = false;
} /* end if */
} /* end else */
@@ -12364,7 +12363,7 @@ H5S_hyper_get_first_inc_block(const H5S_t *space, hsize_t clip_size, hbool_t *pa
htri_t H5Sis_regular_hyperslab(dsid)
hid_t dsid; IN: Dataspace ID of hyperslab selection to query
RETURNS
- TRUE/FALSE for hyperslab selection, FAIL on error or when querying other
+ true/false for hyperslab selection, FAIL on error or when querying other
selection types.
DESCRIPTION
If a hyperslab can be represented as a single call to H5Sselect_hyperslab,
@@ -12438,7 +12437,7 @@ H5Sget_regular_hyperslab(hid_t spaceid, hsize_t start[] /*out*/, hsize_t stride[
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace");
if (H5S_GET_SELECT_TYPE(space) != H5S_SEL_HYPERSLABS)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a hyperslab selection");
- if (TRUE != H5S__hyper_is_regular(space))
+ if (true != H5S__hyper_is_regular(space))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a regular hyperslab selection");
/* Retrieve hyperslab parameters */
diff --git a/src/H5Smpio.c b/src/H5Smpio.c
index 179739962b4..10a9cd5b38f 100644
--- a/src/H5Smpio.c
+++ b/src/H5Smpio.c
@@ -62,19 +62,19 @@ typedef struct H5S_mpio_mpitype_list_t {
/* Local Prototypes */
/********************/
static herr_t H5S__mpio_all_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, int *count,
- hbool_t *is_derived_type);
-static herr_t H5S__mpio_none_type(MPI_Datatype *new_type, int *count, hbool_t *is_derived_type);
+ bool *is_derived_type);
+static herr_t H5S__mpio_none_type(MPI_Datatype *new_type, int *count, bool *is_derived_type);
static herr_t H5S__mpio_create_point_datatype(size_t elmt_size, hsize_t num_points, MPI_Aint *disp,
MPI_Datatype *new_type);
static herr_t H5S__mpio_point_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, int *count,
- hbool_t *is_derived_type, hbool_t do_permute, hsize_t **permute_map,
- hbool_t *is_permuted);
+ bool *is_derived_type, bool do_permute, hsize_t **permute_map,
+ bool *is_permuted);
static herr_t H5S__mpio_permute_type(H5S_t *space, size_t elmt_size, hsize_t **permute_map,
- MPI_Datatype *new_type, int *count, hbool_t *is_derived_type);
+ MPI_Datatype *new_type, int *count, bool *is_derived_type);
static herr_t H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, int *count,
- hbool_t *is_derived_type);
+ bool *is_derived_type);
static herr_t H5S__mpio_span_hyper_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
- int *count, hbool_t *is_derived_type);
+ int *count, bool *is_derived_type);
static herr_t H5S__release_datatype(H5S_mpio_mpitype_list_t *type_list);
static herr_t H5S__obtain_datatype(H5S_hyper_span_info_t *spans, const hsize_t *down, size_t elmt_size,
const MPI_Datatype *elmt_type, MPI_Datatype *span_type,
@@ -110,7 +110,7 @@ H5FL_EXTERN(H5S_sel_iter_t);
*/
static herr_t
H5S__mpio_all_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, int *count,
- hbool_t *is_derived_type)
+ bool *is_derived_type)
{
hsize_t total_bytes;
hssize_t snelmts; /* Total number of elmts (signed) */
@@ -136,7 +136,7 @@ H5S__mpio_all_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
/* fill in the return values */
*new_type = MPI_BYTE;
H5_CHECKED_ASSIGN(*count, int, total_bytes, hsize_t);
- *is_derived_type = FALSE;
+ *is_derived_type = false;
}
else {
/* Create a LARGE derived datatype for this transfer */
@@ -144,7 +144,7 @@ H5S__mpio_all_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL,
"couldn't create a large datatype from the all selection");
*count = 1;
- *is_derived_type = TRUE;
+ *is_derived_type = true;
}
done:
@@ -166,14 +166,14 @@ H5S__mpio_all_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
*-------------------------------------------------------------------------
*/
static herr_t
-H5S__mpio_none_type(MPI_Datatype *new_type, int *count, hbool_t *is_derived_type)
+H5S__mpio_none_type(MPI_Datatype *new_type, int *count, bool *is_derived_type)
{
FUNC_ENTER_PACKAGE_NOERR
/* fill in the return values */
*new_type = MPI_BYTE;
*count = 0;
- *is_derived_type = FALSE;
+ *is_derived_type = false;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5S__mpio_none_type() */
@@ -193,7 +193,7 @@ static herr_t
H5S__mpio_create_point_datatype(size_t elmt_size, hsize_t num_points, MPI_Aint *disp, MPI_Datatype *new_type)
{
MPI_Datatype elmt_type; /* MPI datatype for individual element */
- hbool_t elmt_type_created = FALSE; /* Whether the element MPI datatype was created */
+ bool elmt_type_created = false; /* Whether the element MPI datatype was created */
int *inner_blocks = NULL; /* Arrays for MPI datatypes when "large" datatype needed */
MPI_Aint *inner_disps = NULL;
MPI_Datatype *inner_types = NULL;
@@ -210,7 +210,7 @@ H5S__mpio_create_point_datatype(size_t elmt_size, hsize_t num_points, MPI_Aint *
/* Create an MPI datatype for an element */
if (MPI_SUCCESS != (mpi_code = MPI_Type_contiguous((int)elmt_size, MPI_BYTE, &elmt_type)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_contiguous failed", mpi_code)
- elmt_type_created = TRUE;
+ elmt_type_created = true;
bigio_count = H5_mpi_get_bigio_count();
@@ -357,7 +357,7 @@ H5S__mpio_create_point_datatype(size_t elmt_size, hsize_t num_points, MPI_Aint *
*/
static herr_t
H5S__mpio_point_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, int *count,
- hbool_t *is_derived_type, hbool_t do_permute, hsize_t **permute, hbool_t *is_permuted)
+ bool *is_derived_type, bool do_permute, hsize_t **permute, bool *is_permuted)
{
MPI_Aint *disp = NULL; /* Datatype displacement for each point*/
H5S_pnt_node_t *curr = NULL; /* Current point being operated on in from the selection */
@@ -414,7 +414,7 @@ H5S__mpio_point_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new_typ
if (u > 0 && disp[u] < disp[u - 1]) {
hsize_t s = 0, l = u, m = u / 2;
- *is_permuted = TRUE;
+ *is_permuted = true;
do {
if (disp[u] > disp[m])
s = m + 1;
@@ -453,7 +453,7 @@ H5S__mpio_point_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new_typ
/* Set values about MPI datatype created */
*count = 1;
- *is_derived_type = TRUE;
+ *is_derived_type = true;
done:
if (NULL != disp)
@@ -491,11 +491,11 @@ H5S__mpio_point_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new_typ
*/
static herr_t
H5S__mpio_permute_type(H5S_t *space, size_t elmt_size, hsize_t **permute, MPI_Datatype *new_type, int *count,
- hbool_t *is_derived_type)
+ bool *is_derived_type)
{
MPI_Aint *disp = NULL; /* Datatype displacement for each point*/
H5S_sel_iter_t *sel_iter = NULL; /* Selection iteration info */
- hbool_t sel_iter_init = FALSE; /* Selection iteration info has been initialized */
+ bool sel_iter_init = false; /* Selection iteration info has been initialized */
hssize_t snum_points; /* Signed number of elements in selection */
hsize_t num_points; /* Number of points in the selection */
hsize_t *off = NULL;
@@ -531,7 +531,7 @@ H5S__mpio_permute_type(H5S_t *space, size_t elmt_size, hsize_t **permute, MPI_Da
/* Initialize selection iterator */
if (H5S_select_iter_init(sel_iter, space, elmt_size, 0) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator");
- sel_iter_init = TRUE; /* Selection iteration info has been initialized */
+ sel_iter_init = true; /* Selection iteration info has been initialized */
/* Set the number of elements to iterate over */
H5_CHECKED_ASSIGN(max_elem, size_t, num_points, hsize_t);
@@ -597,7 +597,7 @@ H5S__mpio_permute_type(H5S_t *space, size_t elmt_size, hsize_t **permute, MPI_Da
/* Set values about MPI datatype created */
*count = 1;
- *is_derived_type = TRUE;
+ *is_derived_type = true;
done:
/* Release selection iterator */
@@ -637,10 +637,10 @@ H5S__mpio_permute_type(H5S_t *space, size_t elmt_size, hsize_t **permute, MPI_Da
*/
static herr_t
H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, int *count,
- hbool_t *is_derived_type)
+ bool *is_derived_type)
{
H5S_sel_iter_t *sel_iter = NULL; /* Selection iteration info */
- hbool_t sel_iter_init = FALSE; /* Selection iteration info has been initialized */
+ bool sel_iter_init = false; /* Selection iteration info has been initialized */
struct dim { /* less hassle than malloc/free & ilk */
hssize_t start;
@@ -678,7 +678,7 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
/* Initialize selection iterator */
if (H5S_select_iter_init(sel_iter, space, elmt_size, 0) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator");
- sel_iter_init = TRUE; /* Selection iteration info has been initialized */
+ sel_iter_init = true; /* Selection iteration info has been initialized */
/* Abbreviate args */
diminfo = sel_iter->u.hyp.diminfo;
@@ -954,7 +954,7 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
/* fill in the remaining return values */
*count = 1; /* only have to move one of these suckers! */
- *is_derived_type = TRUE;
+ *is_derived_type = true;
done:
/* Release selection iterator */
@@ -989,11 +989,11 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
*/
static herr_t
H5S__mpio_span_hyper_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, int *count,
- hbool_t *is_derived_type)
+ bool *is_derived_type)
{
H5S_mpio_mpitype_list_t type_list; /* List to track MPI data types created */
MPI_Datatype elmt_type; /* MPI datatype for an element */
- hbool_t elmt_type_is_derived = FALSE; /* Whether the element type has been created */
+ bool elmt_type_is_derived = false; /* Whether the element type has been created */
MPI_Datatype span_type; /* MPI datatype for overall span tree */
hsize_t bigio_count; /* Transition point to create derived type */
hsize_t down[H5S_MAX_RANK]; /* 'down' sizes for each dimension */
@@ -1018,7 +1018,7 @@ H5S__mpio_span_hyper_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *ne
else if (H5_mpio_create_large_type(elmt_size, 0, MPI_BYTE, &elmt_type) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL,
"couldn't create a large element datatype in span_hyper selection");
- elmt_type_is_derived = TRUE;
+ elmt_type_is_derived = true;
/* Compute 'down' sizes for each dimension */
H5VM_array_down(space->extent.rank, space->extent.size, down);
@@ -1044,7 +1044,7 @@ H5S__mpio_span_hyper_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *ne
/* fill in the remaining return values */
*count = 1;
- *is_derived_type = TRUE;
+ *is_derived_type = true;
done:
/* Release resources */
@@ -1120,7 +1120,7 @@ H5S__obtain_datatype(H5S_hyper_span_info_t *spans, const hsize_t *down, size_t e
size_t alloc_count = 0; /* Number of span tree nodes allocated at this level */
size_t outercount = 0; /* Number of span tree nodes at this level */
MPI_Datatype *inner_type = NULL;
- hbool_t inner_types_freed = FALSE; /* Whether the inner_type MPI datatypes have been freed */
+ bool inner_types_freed = false; /* Whether the inner_type MPI datatypes have been freed */
int *blocklen = NULL;
MPI_Aint *disp = NULL;
size_t u; /* Local index variable */
@@ -1148,7 +1148,7 @@ H5S__obtain_datatype(H5S_hyper_span_info_t *spans, const hsize_t *down, size_t e
/* If this is the fastest changing dimension, it is the base case for derived datatype. */
span = spans->head;
if (NULL == span->down) {
- hbool_t large_block = FALSE; /* Whether the block length is larger than 32 bit integer */
+ bool large_block = false; /* Whether the block length is larger than 32 bit integer */
outercount = 0;
while (span) {
@@ -1182,14 +1182,14 @@ H5S__obtain_datatype(H5S_hyper_span_info_t *spans, const hsize_t *down, size_t e
blocklen[outercount] = (int)nelmts;
if (bigio_count < (hsize_t)blocklen[outercount])
- large_block = TRUE; /* at least one block type is large, so set this flag to true */
+ large_block = true; /* at least one block type is large, so set this flag to true */
span = span->next;
outercount++;
} /* end while */
/* Everything fits into integers, so cast them and use hindexed */
- if (bigio_count >= outercount && large_block == FALSE) {
+ if (bigio_count >= outercount && large_block == false) {
if (MPI_SUCCESS !=
(mpi_code = MPI_Type_create_hindexed((int)outercount, blocklen, disp, *elmt_type,
&spans->op_info[op_info_i].u.down_type)))
@@ -1307,7 +1307,7 @@ H5S__obtain_datatype(H5S_hyper_span_info_t *spans, const hsize_t *down, size_t e
for (u = 0; u < outercount; u++)
if (MPI_SUCCESS != (mpi_code = MPI_Type_free(&inner_type[u])))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_free failed", mpi_code)
- inner_types_freed = TRUE;
+ inner_types_freed = true;
} /* end else */
/* Allocate space for the MPI data type list node */
@@ -1366,8 +1366,8 @@ H5S__obtain_datatype(H5S_hyper_span_info_t *spans, const hsize_t *down, size_t e
*-------------------------------------------------------------------------
*/
herr_t
-H5S_mpio_space_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, int *count,
- hbool_t *is_derived_type, hbool_t do_permute, hsize_t **permute_map, hbool_t *is_permuted)
+H5S_mpio_space_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, int *count, bool *is_derived_type,
+ bool do_permute, hsize_t **permute_map, bool *is_permuted)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -1386,7 +1386,7 @@ H5S_mpio_space_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, int
* out-of-order point selection, then permute this selection which
* should be a memory selection to match the file space permutation.
*/
- if (TRUE == *is_permuted) {
+ if (true == *is_permuted) {
switch (H5S_GET_SELECT_TYPE(space)) {
case H5S_SEL_NONE:
if (H5S__mpio_none_type(new_type, count, is_derived_type) < 0)
@@ -1436,7 +1436,7 @@ H5S_mpio_space_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, int
break;
case H5S_SEL_HYPERSLABS:
- if ((H5S_SELECT_IS_REGULAR(space) == TRUE)) {
+ if ((H5S_SELECT_IS_REGULAR(space) == true)) {
if (H5S__mpio_reg_hyper_type(space, elmt_size, new_type, count, is_derived_type) <
0)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL,
diff --git a/src/H5Snone.c b/src/H5Snone.c
index a20f37bc641..c4fdd4c670d 100644
--- a/src/H5Snone.c
+++ b/src/H5Snone.c
@@ -42,12 +42,12 @@
/********************/
/* Selection callbacks */
-static herr_t H5S__none_copy(H5S_t *dst, const H5S_t *src, hbool_t share_selection);
+static herr_t H5S__none_copy(H5S_t *dst, const H5S_t *src, bool share_selection);
static herr_t H5S__none_release(H5S_t *space);
static htri_t H5S__none_is_valid(const H5S_t *space);
static hssize_t H5S__none_serial_size(H5S_t *space);
static herr_t H5S__none_serialize(H5S_t *space, uint8_t **p);
-static herr_t H5S__none_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hbool_t skip);
+static herr_t H5S__none_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, bool skip);
static herr_t H5S__none_bounds(const H5S_t *space, hsize_t *start, hsize_t *end);
static herr_t H5S__none_offset(const H5S_t *space, hsize_t *off);
static int H5S__none_unlim_dim(const H5S_t *space);
@@ -226,7 +226,7 @@ H5S__none_iter_nelmts(const H5S_sel_iter_t H5_ATTR_UNUSED *iter)
htri_t H5S__none_iter_has_next_block(iter)
const H5S_sel_iter_t *iter; IN: Pointer to selection iterator
RETURNS
- Non-negative (TRUE/FALSE) on success/Negative on failure
+ Non-negative (true/false) on success/Negative on failure
DESCRIPTION
Check if there is another block available in the selection iterator.
GLOBAL VARIABLES
@@ -422,7 +422,7 @@ H5S__none_release(H5S_t H5_ATTR_UNUSED *space)
herr_t H5S__none_copy(dst, src, share_selection)
H5S_t *dst; OUT: Pointer to the destination dataspace
H5S_t *src; IN: Pointer to the source dataspace
- hbool_t; IN: Whether to share the selection between the dataspaces
+ bool; IN: Whether to share the selection between the dataspaces
RETURNS
Non-negative on success/Negative on failure
DESCRIPTION
@@ -434,7 +434,7 @@ H5S__none_release(H5S_t H5_ATTR_UNUSED *space)
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5S__none_copy(H5S_t *dst, const H5S_t H5_ATTR_UNUSED *src, hbool_t H5_ATTR_UNUSED share_selection)
+H5S__none_copy(H5S_t *dst, const H5S_t H5_ATTR_UNUSED *src, bool H5_ATTR_UNUSED share_selection)
{
FUNC_ENTER_PACKAGE_NOERR
@@ -457,7 +457,7 @@ H5S__none_copy(H5S_t *dst, const H5S_t H5_ATTR_UNUSED *src, hbool_t H5_ATTR_UNUS
htri_t H5S__none_is_valid(space);
H5S_t *space; IN: Dataspace pointer to query
RETURNS
- TRUE if the selection fits within the extent, FALSE if it does not and
+ true if the selection fits within the extent, false if it does not and
Negative on an error.
DESCRIPTION
Determines if the current selection at the current offset fits within the
@@ -474,7 +474,7 @@ H5S__none_is_valid(const H5S_t H5_ATTR_UNUSED *space)
assert(space);
- FUNC_LEAVE_NOAPI(TRUE)
+ FUNC_LEAVE_NOAPI(true)
} /* end H5S__none_is_valid() */
/*--------------------------------------------------------------------------
@@ -578,7 +578,7 @@ H5S__none_serialize(H5S_t *space, uint8_t **p)
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5S__none_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hbool_t skip)
+H5S__none_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, bool skip)
{
H5S_t *tmp_space = NULL; /* Pointer to actual dataspace to use,
either *space or a newly allocated one */
@@ -738,7 +738,7 @@ H5S__none_unlim_dim(const H5S_t H5_ATTR_UNUSED *space)
htri_t H5S__none_is_contiguous(space)
H5S_t *space; IN: Dataspace pointer to check
RETURNS
- TRUE/FALSE/FAIL
+ true/false/FAIL
DESCRIPTION
Checks to see if the current selection in the dataspace is contiguous.
This is primarily used for reading the entire selection in one swoop.
@@ -754,7 +754,7 @@ H5S__none_is_contiguous(const H5S_t H5_ATTR_UNUSED *space)
assert(space);
- FUNC_LEAVE_NOAPI(FALSE)
+ FUNC_LEAVE_NOAPI(false)
} /* end H5S__none_is_contiguous() */
/*--------------------------------------------------------------------------
@@ -766,7 +766,7 @@ H5S__none_is_contiguous(const H5S_t H5_ATTR_UNUSED *space)
htri_t H5S__none_is_single(space)
H5S_t *space; IN: Dataspace pointer to check
RETURNS
- TRUE/FALSE/FAIL
+ true/false/FAIL
DESCRIPTION
Checks to see if the current selection in the dataspace is a single block.
This is primarily used for reading the entire selection in one swoop.
@@ -782,7 +782,7 @@ H5S__none_is_single(const H5S_t H5_ATTR_UNUSED *space)
assert(space);
- FUNC_LEAVE_NOAPI(FALSE)
+ FUNC_LEAVE_NOAPI(false)
} /* end H5S__none_is_single() */
/*--------------------------------------------------------------------------
@@ -794,7 +794,7 @@ H5S__none_is_single(const H5S_t H5_ATTR_UNUSED *space)
htri_t H5S__none_is_regular(space)
H5S_t *space; IN: Dataspace pointer to check
RETURNS
- TRUE/FALSE/FAIL
+ true/false/FAIL
DESCRIPTION
Checks to see if the current selection in a dataspace is the a regular
pattern.
@@ -812,7 +812,7 @@ H5S__none_is_regular(H5S_t H5_ATTR_UNUSED *space)
/* Check args */
assert(space);
- FUNC_LEAVE_NOAPI(TRUE)
+ FUNC_LEAVE_NOAPI(true)
} /* end H5S__none_is_regular() */
/*--------------------------------------------------------------------------
@@ -825,7 +825,7 @@ H5S__none_is_regular(H5S_t H5_ATTR_UNUSED *space)
H5S_t *space1; IN: First dataspace to check
H5S_t *space2; IN: Second dataspace to check
RETURNS
- TRUE / FALSE / FAIL
+ true / false / FAIL
DESCRIPTION
Checks to see if the current selection in each dataspace are the same
shape.
@@ -843,7 +843,7 @@ H5S__none_shape_same(H5S_t H5_ATTR_UNUSED *space1, H5S_t H5_ATTR_UNUSED *space2)
assert(space1);
assert(space2);
- FUNC_LEAVE_NOAPI(TRUE)
+ FUNC_LEAVE_NOAPI(true)
} /* end H5S__none_shape_same() */
/*--------------------------------------------------------------------------
@@ -857,7 +857,7 @@ H5S__none_shape_same(H5S_t H5_ATTR_UNUSED *space1, H5S_t H5_ATTR_UNUSED *space2)
const hsize_t *start; IN: Starting coordinate for block
const hsize_t *end; IN: Ending coordinate for block
RETURNS
- Non-negative TRUE / FALSE on success, negative on failure
+ Non-negative true / false on success, negative on failure
DESCRIPTION
Quickly detect intersections with a block
GLOBAL VARIABLES
@@ -877,7 +877,7 @@ H5S__none_intersect_block(H5S_t H5_ATTR_UNUSED *space, const hsize_t H5_ATTR_UNU
assert(start);
assert(end);
- FUNC_LEAVE_NOAPI(FALSE)
+ FUNC_LEAVE_NOAPI(false)
} /* end H5S__none_intersect_block() */
/*--------------------------------------------------------------------------
diff --git a/src/H5Spkg.h b/src/H5Spkg.h
index 4367a4d3cdd..3ae63a50964 100644
--- a/src/H5Spkg.h
+++ b/src/H5Spkg.h
@@ -232,7 +232,7 @@ typedef struct {
/* Selection information methods */
/* Method to copy a selection */
-typedef herr_t (*H5S_sel_copy_func_t)(H5S_t *dst, const H5S_t *src, hbool_t share_selection);
+typedef herr_t (*H5S_sel_copy_func_t)(H5S_t *dst, const H5S_t *src, bool share_selection);
/* Method to release current selection */
typedef herr_t (*H5S_sel_release_func_t)(H5S_t *space);
/* Method to determine if current selection is valid for dataspace */
@@ -243,7 +243,7 @@ typedef hssize_t (*H5S_sel_serial_size_func_t)(H5S_t *space);
typedef herr_t (*H5S_sel_serialize_func_t)(H5S_t *space, uint8_t **p);
/* Method to create selection from "serialized" form (a byte sequence suitable for storing on disk) */
typedef herr_t (*H5S_sel_deserialize_func_t)(H5S_t **space, const uint8_t **p, const size_t p_size,
- hbool_t skip);
+ bool skip);
/* Method to determine smallest n-D bounding box containing the current selection */
typedef herr_t (*H5S_sel_bounds_func_t)(const H5S_t *space, hsize_t *start, hsize_t *end);
/* Method to determine linear offset of initial element in selection within dataspace */
@@ -312,7 +312,7 @@ typedef struct {
typedef struct {
const H5S_select_class_t *type; /* Pointer to selection's class info */
- hbool_t offset_changed; /* Indicate that the offset for the selection has been changed */
+ bool offset_changed; /* Indicate that the offset for the selection has been changed */
hssize_t offset[H5S_MAX_RANK]; /* Offset within the extent */
hsize_t num_elem; /* Number of elements in selection */
@@ -395,14 +395,14 @@ H5_DLLVAR const unsigned H5O_sdspace_ver_bounds[H5F_LIBVER_NBOUNDS];
/* Extent functions */
H5_DLL herr_t H5S__extent_release(H5S_extent_t *extent);
-H5_DLL herr_t H5S__extent_copy_real(H5S_extent_t *dst, const H5S_extent_t *src, hbool_t copy_max);
+H5_DLL herr_t H5S__extent_copy_real(H5S_extent_t *dst, const H5S_extent_t *src, bool copy_max);
/* Operations on hyperslab selections */
H5_DLL uint64_t H5S__hyper_get_op_gen(void);
H5_DLL void H5S__hyper_rebuild(H5S_t *space);
H5_DLL herr_t H5S__modify_select(H5S_t *space1, H5S_seloper_t op, H5S_t *space2);
H5_DLL herr_t H5S__hyper_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_intersect_space,
- H5S_t *proj_space, hbool_t share_space);
+ H5S_t *proj_space, bool share_space);
/* Operations on selection iterators */
H5_DLL herr_t H5S__sel_iter_close_cb(H5S_sel_iter_t *_sel_iter, void **request);
diff --git a/src/H5Spoint.c b/src/H5Spoint.c
index 602794686a6..8897d8ce136 100644
--- a/src/H5Spoint.c
+++ b/src/H5Spoint.c
@@ -52,12 +52,12 @@ static H5S_pnt_list_t *H5S__copy_pnt_list(const H5S_pnt_list_t *src, unsigned ra
static void H5S__free_pnt_list(H5S_pnt_list_t *pnt_lst);
/* Selection callbacks */
-static herr_t H5S__point_copy(H5S_t *dst, const H5S_t *src, hbool_t share_selection);
+static herr_t H5S__point_copy(H5S_t *dst, const H5S_t *src, bool share_selection);
static herr_t H5S__point_release(H5S_t *space);
static htri_t H5S__point_is_valid(const H5S_t *space);
static hssize_t H5S__point_serial_size(H5S_t *space);
static herr_t H5S__point_serialize(H5S_t *space, uint8_t **p);
-static herr_t H5S__point_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hbool_t skip);
+static herr_t H5S__point_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, bool skip);
static herr_t H5S__point_bounds(const H5S_t *space, hsize_t *start, hsize_t *end);
static herr_t H5S__point_offset(const H5S_t *space, hsize_t *off);
static int H5S__point_unlim_dim(const H5S_t *space);
@@ -283,7 +283,7 @@ H5S__point_iter_nelmts(const H5S_sel_iter_t *iter)
htri_t H5S__point_iter_has_next_block(iter)
const H5S_sel_iter_t *iter; IN: Pointer to selection iterator
RETURNS
- Non-negative (TRUE/FALSE) on success/Negative on failure
+ Non-negative (true/false) on success/Negative on failure
DESCRIPTION
Check if there is another block available in the selection iterator.
GLOBAL VARIABLES
@@ -294,7 +294,7 @@ H5S__point_iter_nelmts(const H5S_sel_iter_t *iter)
static htri_t
H5S__point_iter_has_next_block(const H5S_sel_iter_t *iter)
{
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -303,7 +303,7 @@ H5S__point_iter_has_next_block(const H5S_sel_iter_t *iter)
/* Check if there is another point in the list */
if (iter->u.pnt.curr->next == NULL)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -891,7 +891,7 @@ H5S__free_pnt_list(H5S_pnt_list_t *pnt_lst)
herr_t H5S__point_copy(dst, src, share_selection)
H5S_t *dst; OUT: Pointer to the destination dataspace
H5S_t *src; IN: Pointer to the source dataspace
- hbool_t share_selection; IN: Whether to share the selection between the dataspaces
+ bool share_selection; IN: Whether to share the selection between the dataspaces
RETURNS
Non-negative on success/Negative on failure
DESCRIPTION
@@ -903,7 +903,7 @@ H5S__free_pnt_list(H5S_pnt_list_t *pnt_lst)
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5S__point_copy(H5S_t *dst, const H5S_t *src, hbool_t H5_ATTR_UNUSED share_selection)
+H5S__point_copy(H5S_t *dst, const H5S_t *src, bool H5_ATTR_UNUSED share_selection)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -932,7 +932,7 @@ H5S__point_copy(H5S_t *dst, const H5S_t *src, hbool_t H5_ATTR_UNUSED share_selec
htri_t H5S__point_is_valid(space);
const H5S_t *space; IN: Dataspace pointer to query
RETURNS
- TRUE if the selection fits within the extent, FALSE if it does not and
+ true if the selection fits within the extent, false if it does not and
Negative on an error.
DESCRIPTION
Determines if the current selection at the current offset fits within the
@@ -946,7 +946,7 @@ static htri_t
H5S__point_is_valid(const H5S_t *space)
{
unsigned u; /* Counter */
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -957,9 +957,9 @@ H5S__point_is_valid(const H5S_t *space)
/* Bounds check the selected point + offset against the extent */
if ((space->select.sel_info.pnt_lst->high_bounds[u] + (hsize_t)space->select.offset[u]) >
space->extent.size[u])
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
if (((hssize_t)space->select.sel_info.pnt_lst->low_bounds[u] + space->select.offset[u]) < 0)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
} /* end for */
done:
@@ -1036,8 +1036,8 @@ H5Sget_select_elem_npoints(hid_t spaceid)
static herr_t
H5S__point_get_version_enc_size(const H5S_t *space, uint32_t *version, uint8_t *enc_size)
{
- hbool_t count_up_version = FALSE; /* Whether number of points exceed H5S_UINT32_MAX */
- hbool_t bound_up_version = FALSE; /* Whether high bounds exceed H5S_UINT32_MAX */
+ bool count_up_version = false; /* Whether number of points exceed H5S_UINT32_MAX */
+ bool bound_up_version = false; /* Whether high bounds exceed H5S_UINT32_MAX */
H5F_libver_t low_bound; /* The 'low' bound of library format versions */
H5F_libver_t high_bound; /* The 'high' bound of library format versions */
uint32_t tmp_version; /* Local temporary version */
@@ -1056,11 +1056,11 @@ H5S__point_get_version_enc_size(const H5S_t *space, uint32_t *version, uint8_t *
/* Determine whether number of points or high bounds exceeds (2^32 - 1) */
if (space->select.num_elem > H5S_UINT32_MAX)
- count_up_version = TRUE;
+ count_up_version = true;
else
for (u = 0; u < space->extent.rank; u++)
if (bounds_end[u] > H5S_UINT32_MAX) {
- bound_up_version = TRUE;
+ bound_up_version = true;
break;
} /* end if */
@@ -1336,7 +1336,7 @@ H5S__point_serialize(H5S_t *space, uint8_t **p)
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5S__point_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hbool_t skip)
+H5S__point_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, bool skip)
{
H5S_t *tmp_space = NULL; /* Pointer to actual dataspace to use,
either *space or a newly allocated one */
@@ -1800,7 +1800,7 @@ H5S__point_unlim_dim(const H5S_t H5_ATTR_UNUSED *space)
htri_t H5S__point_is_contiguous(space)
H5S_t *space; IN: Dataspace pointer to check
RETURNS
- TRUE/FALSE/FAIL
+ true/false/FAIL
DESCRIPTION
Checks to see if the current selection in the dataspace is contiguous.
This is primarily used for reading the entire selection in one swoop.
@@ -1823,10 +1823,10 @@ H5S__point_is_contiguous(const H5S_t *space)
/* One point is definitely contiguous */
if (space->select.num_elem == 1)
- ret_value = TRUE;
+ ret_value = true;
else /* More than one point might be contiguous, but it's complex to check and we don't need it right now
*/
- ret_value = FALSE;
+ ret_value = false;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__point_is_contiguous() */
@@ -1840,7 +1840,7 @@ H5S__point_is_contiguous(const H5S_t *space)
htri_t H5S__point_is_single(space)
H5S_t *space; IN: Dataspace pointer to check
RETURNS
- TRUE/FALSE/FAIL
+ true/false/FAIL
DESCRIPTION
Checks to see if the current selection in the dataspace is a single block.
This is primarily used for reading the entire selection in one swoop.
@@ -1860,9 +1860,9 @@ H5S__point_is_single(const H5S_t *space)
/* One point is definitely 'single' :-) */
if (space->select.num_elem == 1)
- ret_value = TRUE;
+ ret_value = true;
else
- ret_value = FALSE;
+ ret_value = false;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__point_is_single() */
@@ -1876,7 +1876,7 @@ H5S__point_is_single(const H5S_t *space)
htri_t H5S__point_is_regular(space)
H5S_t *space; IN: Dataspace pointer to check
RETURNS
- TRUE/FALSE/FAIL
+ true/false/FAIL
DESCRIPTION
Checks to see if the current selection in a dataspace is the a regular
pattern.
@@ -1900,9 +1900,9 @@ H5S__point_is_regular(H5S_t *space)
/* Only simple check for regular points for now... */
if (space->select.num_elem == 1)
- ret_value = TRUE;
+ ret_value = true;
else
- ret_value = FALSE;
+ ret_value = false;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__point_is_regular() */
@@ -1917,7 +1917,7 @@ H5S__point_is_regular(H5S_t *space)
H5S_t *space1; IN: First dataspace to check
H5S_t *space2; IN: Second dataspace to check
RETURNS
- TRUE / FALSE / FAIL
+ true / false / FAIL
DESCRIPTION
Checks to see if the current selection in each dataspace are the same
shape.
@@ -1935,7 +1935,7 @@ H5S__point_shape_same(H5S_t *space1, H5S_t *space2)
unsigned space2_rank; /* Number of dimensions of second dataspace */
int space1_dim; /* Current dimension in first dataspace */
int space2_dim; /* Current dimension in second dataspace */
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -1989,7 +1989,7 @@ H5S__point_shape_same(H5S_t *space1, H5S_t *space2)
/* Compare locations in common dimensions, including relative offset */
while (space2_dim >= 0) {
if ((hsize_t)((hssize_t)pnt1->pnt[space1_dim] + offset[space1_dim]) != pnt2->pnt[space2_dim])
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
space1_dim--;
space2_dim--;
@@ -1999,7 +1999,7 @@ H5S__point_shape_same(H5S_t *space1, H5S_t *space2)
while (space1_dim >= 0) {
/* Compare the absolute offset in the remaining dimensions */
if ((hssize_t)pnt1->pnt[space1_dim] != offset[space1_dim])
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
space1_dim--;
} /* end while */
@@ -2024,7 +2024,7 @@ H5S__point_shape_same(H5S_t *space1, H5S_t *space2)
const hsize_t *start; IN: Starting coordinate for block
const hsize_t *end; IN: Ending coordinate for block
RETURNS
- Non-negative TRUE / FALSE on success, negative on failure
+ Non-negative true / false on success, negative on failure
DESCRIPTION
Quickly detect intersections with a block
GLOBAL VARIABLES
@@ -2036,7 +2036,7 @@ htri_t
H5S__point_intersect_block(H5S_t *space, const hsize_t *start, const hsize_t *end)
{
H5S_pnt_node_t *pnt; /* Point information node */
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -2058,7 +2058,7 @@ H5S__point_intersect_block(H5S_t *space, const hsize_t *start, const hsize_t *en
/* Check if point was within block for all dimensions */
if (u == space->extent.rank)
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
/* Advance to next point */
pnt = pnt->next;
@@ -2089,7 +2089,7 @@ H5S__point_intersect_block(H5S_t *space, const hsize_t *start, const hsize_t *en
static herr_t
H5S__point_adjust_u(H5S_t *space, const hsize_t *offset)
{
- hbool_t non_zero_offset = FALSE; /* Whether any offset is non-zero */
+ bool non_zero_offset = false; /* Whether any offset is non-zero */
H5S_pnt_node_t *node; /* Point node */
unsigned rank; /* Dataspace rank */
unsigned u; /* Local index variable */
@@ -2102,7 +2102,7 @@ H5S__point_adjust_u(H5S_t *space, const hsize_t *offset)
/* Check for an all-zero offset vector */
for (u = 0; u < space->extent.rank; u++)
if (0 != offset[u]) {
- non_zero_offset = TRUE;
+ non_zero_offset = true;
break;
}
@@ -2156,7 +2156,7 @@ H5S__point_adjust_u(H5S_t *space, const hsize_t *offset)
static herr_t
H5S__point_adjust_s(H5S_t *space, const hssize_t *offset)
{
- hbool_t non_zero_offset = FALSE; /* Whether any offset is non-zero */
+ bool non_zero_offset = false; /* Whether any offset is non-zero */
H5S_pnt_node_t *node; /* Point node */
unsigned rank; /* Dataspace rank */
unsigned u; /* Local index variable */
@@ -2169,7 +2169,7 @@ H5S__point_adjust_s(H5S_t *space, const hssize_t *offset)
/* Check for an all-zero offset vector */
for (u = 0; u < space->extent.rank; u++)
if (0 != offset[u]) {
- non_zero_offset = TRUE;
+ non_zero_offset = true;
break;
} /* end if */
diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h
index ac46d9e362f..8fd73f54740 100644
--- a/src/H5Sprivate.h
+++ b/src/H5Sprivate.h
@@ -61,13 +61,13 @@ typedef struct {
* which there are contiguous regions in the lower
* dimensions that have been "flattened")
*/
- hbool_t diminfo_valid; /* Whether the dimension information is valid */
+ bool diminfo_valid; /* Whether the dimension information is valid */
/* "Flattened" regular hyperslab selection fields */
H5S_hyper_dim_t diminfo[H5S_MAX_RANK]; /* "Flattened" regular selection information */
hsize_t size[H5S_MAX_RANK]; /* "Flattened" dataspace extent information */
hssize_t sel_off[H5S_MAX_RANK]; /* "Flattened" selection offset information */
- hbool_t flattened[H5S_MAX_RANK]; /* Whether this dimension has been flattened */
+ bool flattened[H5S_MAX_RANK]; /* Whether this dimension has been flattened */
/* Irregular hyperslab selection fields */
hsize_t loc_off[H5S_MAX_RANK]; /* Byte offset in buffer, for each dimension's current offset */
@@ -201,12 +201,12 @@ typedef struct H5S_t H5S_t;
/* Operations on dataspaces */
H5_DLL herr_t H5S_init(void);
-H5_DLL H5S_t *H5S_copy(const H5S_t *src, hbool_t share_selection, hbool_t copy_max);
+H5_DLL H5S_t *H5S_copy(const H5S_t *src, bool share_selection, bool copy_max);
H5_DLL herr_t H5S_close(H5S_t *ds);
H5_DLL H5S_class_t H5S_get_simple_extent_type(const H5S_t *ds);
H5_DLL hssize_t H5S_get_simple_extent_npoints(const H5S_t *ds);
H5_DLL hsize_t H5S_get_npoints_max(const H5S_t *ds);
-H5_DLL hbool_t H5S_has_extent(const H5S_t *ds);
+H5_DLL bool H5S_has_extent(const H5S_t *ds);
H5_DLL int H5S_get_simple_extent_ndims(const H5S_t *ds);
H5_DLL int H5S_get_simple_extent_dims(const H5S_t *ds, hsize_t dims[] /*out*/, hsize_t max_dims[] /*out*/);
H5_DLL herr_t H5S_write(H5F_t *f, struct H5O_t *oh, unsigned update_flags, H5S_t *ds);
@@ -241,7 +241,7 @@ H5_DLL herr_t H5S_get_select_offset(const H5S_t *space, hsize_t *offset);
H5_DLL int H5S_get_select_unlim_dim(const H5S_t *space);
H5_DLL herr_t H5S_get_select_num_elem_non_unlim(const H5S_t *space, hsize_t *num_elem_non_unlim);
H5_DLL herr_t H5S_select_offset(H5S_t *space, const hssize_t *offset);
-H5_DLL herr_t H5S_select_copy(H5S_t *dst, const H5S_t *src, hbool_t share_selection);
+H5_DLL herr_t H5S_select_copy(H5S_t *dst, const H5S_t *src, bool share_selection);
H5_DLL htri_t H5S_select_shape_same(H5S_t *space1, H5S_t *space2);
H5_DLL htri_t H5S_select_intersect_block(H5S_t *space, const hsize_t *start, const hsize_t *end);
H5_DLL herr_t H5S_select_construct_projection(H5S_t *base_space, H5S_t **new_space_ptr,
@@ -258,12 +258,12 @@ H5_DLL herr_t H5S_select_adjust_s(H5S_t *space, const hssize_t *offset);
H5_DLL herr_t H5S_select_project_scalar(const H5S_t *space, hsize_t *offset);
H5_DLL herr_t H5S_select_project_simple(const H5S_t *space, H5S_t *new_space, hsize_t *offset);
H5_DLL herr_t H5S_select_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_intersect_space,
- H5S_t **new_space_ptr, hbool_t share_space);
+ H5S_t **new_space_ptr, bool share_space);
H5_DLL herr_t H5S_select_subtract(H5S_t *space, H5S_t *subtract_space);
-H5_DLL herr_t H5S_select_contig_block(H5S_t *space, hbool_t *is_contig, hsize_t *off, size_t *len);
+H5_DLL herr_t H5S_select_contig_block(H5S_t *space, bool *is_contig, hsize_t *off, size_t *len);
/* Operations on all selections */
-H5_DLL herr_t H5S_select_all(H5S_t *space, hbool_t rel_prev);
+H5_DLL herr_t H5S_select_all(H5S_t *space, bool rel_prev);
/* Operations on none selections */
H5_DLL herr_t H5S_select_none(H5S_t *space);
@@ -281,12 +281,11 @@ H5_DLL herr_t H5S_hyper_add_span_element(H5S_t *space, unsigned rank, const hsi
H5_DLL htri_t H5S_hyper_normalize_offset(H5S_t *space, hssize_t *old_offset);
H5_DLL herr_t H5S_hyper_denormalize_offset(H5S_t *space, const hssize_t *old_offset);
H5_DLL herr_t H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size);
-H5_DLL hsize_t H5S_hyper_get_clip_extent(const H5S_t *clip_space, const H5S_t *match_space,
- hbool_t incl_trail);
+H5_DLL hsize_t H5S_hyper_get_clip_extent(const H5S_t *clip_space, const H5S_t *match_space, bool incl_trail);
H5_DLL hsize_t H5S_hyper_get_clip_extent_match(const H5S_t *clip_space, const H5S_t *match_space,
- hsize_t match_clip_size, hbool_t incl_trail);
+ hsize_t match_clip_size, bool incl_trail);
H5_DLL H5S_t *H5S_hyper_get_unlim_block(const H5S_t *space, hsize_t block_index);
-H5_DLL hsize_t H5S_hyper_get_first_inc_block(const H5S_t *space, hsize_t clip_size, hbool_t *partial);
+H5_DLL hsize_t H5S_hyper_get_first_inc_block(const H5S_t *space, hsize_t clip_size, bool *partial);
/* Operations on selection iterators */
H5_DLL herr_t H5S_select_iter_init(H5S_sel_iter_t *iter, H5S_t *space, size_t elmt_size, unsigned flags);
@@ -300,8 +299,8 @@ H5_DLL herr_t H5S_sel_iter_close(H5S_sel_iter_t *sel_iter);
#ifdef H5_HAVE_PARALLEL
H5_DLL herr_t H5S_mpio_space_type(H5S_t *space, size_t elmt_size,
- /* out: */ MPI_Datatype *new_type, int *count, hbool_t *is_derived_type,
- hbool_t do_permute, hsize_t **permute_map, hbool_t *is_permuted);
+ /* out: */ MPI_Datatype *new_type, int *count, bool *is_derived_type,
+ bool do_permute, hsize_t **permute_map, bool *is_permuted);
#endif /* H5_HAVE_PARALLEL */
#endif /* H5Sprivate_H */
diff --git a/src/H5Spublic.h b/src/H5Spublic.h
index 737e88ba13c..2b6384f3db1 100644
--- a/src/H5Spublic.h
+++ b/src/H5Spublic.h
@@ -1194,8 +1194,9 @@ H5_DLL herr_t H5Sselect_elements(hid_t space_id, H5S_seloper_t op, size_t num_el
* 2x2 blocks of array elements starting with location (1,1) with the
* selected blocks at locations (1,1), (5,1), (9,1), (1,5), (5,5), etc.;
* in Fortran, they will specify a hyperslab consisting of 21 2x2
- * blocks of array elements starting with location (2,2) with the
- * selected blocks at locations (2,2), (6,2), (10,2), (2,6), (6,6), etc.
+ * blocks of array elements starting with location (2,2), since \p start
+ * is 0-based indexed, with the selected blocks at
+ * locations (2,2), (6,2), (10,2), (2,6), (6,6), etc.
*
* Regions selected with this function call default to C order
* iteration when I/O is performed.
diff --git a/src/H5Sselect.c b/src/H5Sselect.c
index 3087df3222b..13440cd64f5 100644
--- a/src/H5Sselect.c
+++ b/src/H5Sselect.c
@@ -101,7 +101,7 @@ H5S_select_offset(H5S_t *space, const hssize_t *offset)
H5MM_memcpy(space->select.offset, offset, sizeof(hssize_t) * space->extent.rank);
/* Indicate that the offset was changed */
- space->select.offset_changed = TRUE;
+ space->select.offset_changed = true;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S_select_offset() */
@@ -186,7 +186,7 @@ H5Sselect_copy(hid_t dst_id, hid_t src_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace");
/* Copy */
- if (H5S_select_copy(dst, src, FALSE) < 0)
+ if (H5S_select_copy(dst, src, false) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy selection");
done:
@@ -202,7 +202,7 @@ H5Sselect_copy(hid_t dst_id, hid_t src_id)
herr_t H5S_select_copy(dst, src, share_selection)
H5S_t *dst; OUT: Pointer to the destination dataspace
H5S_t *src; IN: Pointer to the source dataspace
- hbool_t; IN: Whether to share the selection between the dataspaces
+ bool; IN: Whether to share the selection between the dataspaces
RETURNS
Non-negative on success/Negative on failure
DESCRIPTION
@@ -219,7 +219,7 @@ H5Sselect_copy(hid_t dst_id, hid_t src_id)
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5S_select_copy(H5S_t *dst, const H5S_t *src, hbool_t share_selection)
+H5S_select_copy(H5S_t *dst, const H5S_t *src, bool share_selection)
{
herr_t ret_value = FAIL; /* Return value */
@@ -420,7 +420,7 @@ H5S_get_select_npoints(const H5S_t *space)
htri_t H5Sselect_void(dsid)
hid_t dsid; IN: Dataspace ID to query
RETURNS
- TRUE if the selection fits within the extent, FALSE if it does not and
+ true if the selection fits within the extent, false if it does not and
Negative on an error.
DESCRIPTION
Determines if the current selection at the current offset fits within the
@@ -459,7 +459,7 @@ H5Sselect_valid(hid_t spaceid)
htri_t H5S_select_void(space)
H5S_t *space; IN: Dataspace to query
RETURNS
- TRUE if the selection fits within the extent, FALSE if it does not and
+ true if the selection fits within the extent, false if it does not and
Negative on an error.
DESCRIPTION
Determines if the current selection at the current offset fits within the
@@ -518,7 +518,7 @@ H5S_select_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size)
uint32_t sel_type; /* Pointer to the selection type */
herr_t ret_value = FAIL; /* Return value */
const uint8_t *p_end = *p + p_size - 1; /* Pointer to last valid byte in buffer */
- hbool_t skip = (p_size == SIZE_MAX ? TRUE : FALSE); /* If p_size is unknown, skip buffer checks */
+ bool skip = (p_size == SIZE_MAX ? true : false); /* If p_size is unknown, skip buffer checks */
FUNC_ENTER_NOAPI(FAIL)
assert(space);
@@ -784,7 +784,7 @@ H5S_get_select_num_elem_non_unlim(const H5S_t *space, hsize_t *num_elem_non_unli
htri_t H5S_select_is_contiguous(space)
const H5S_t *space; IN: Dataspace of selection to query
RETURNS
- Non-negative (TRUE/FALSE) on success, negative on failure
+ Non-negative (true/false) on success, negative on failure
DESCRIPTION
Checks the selection to determine if the points to iterated over will be
contiguous in the particular dataspace.
@@ -820,7 +820,7 @@ H5S_select_is_contiguous(const H5S_t *space)
htri_t H5S_select_is_single(space)
const H5S_t *space; IN: Dataspace of selection to query
RETURNS
- Non-negative (TRUE/FALSE) on success, negative on failure
+ Non-negative (true/false) on success, negative on failure
DESCRIPTION
Checks the selection to determine if it occupies a single block in the
particular dataspace.
@@ -856,7 +856,7 @@ H5S_select_is_single(const H5S_t *space)
htri_t H5S_select_is_regular(space)
const H5S_t *space; IN: Dataspace of selection to query
RETURNS
- Non-negative (TRUE/FALSE) on success, negative on failure
+ Non-negative (true/false) on success, negative on failure
DESCRIPTION
Checks the selection to determine if it is "regular" (i.e. a single
block or a strided pattern) in the particular dataspace.
@@ -1360,7 +1360,7 @@ herr_t
H5S_select_iterate(void *buf, const H5T_t *type, H5S_t *space, const H5S_sel_iter_op_t *op, void *op_data)
{
H5S_sel_iter_t *iter = NULL; /* Selection iteration info */
- hbool_t iter_init = FALSE; /* Selection iteration info has been initialized */
+ bool iter_init = false; /* Selection iteration info has been initialized */
hsize_t *off = NULL; /* Array to store sequence offsets */
size_t *len = NULL; /* Array to store sequence lengths */
hssize_t nelmts; /* Number of elements in selection */
@@ -1390,7 +1390,7 @@ H5S_select_iterate(void *buf, const H5T_t *type, H5S_t *space, const H5S_sel_ite
/* Initialize iterator */
if (H5S_select_iter_init(iter, space, elmt_size, 0) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator");
- iter_init = TRUE; /* Selection iteration info has been initialized */
+ iter_init = true; /* Selection iteration info has been initialized */
/* Get the number of elements in selection */
if ((nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(space)) < 0)
@@ -1584,7 +1584,7 @@ H5S_get_select_type(const H5S_t *space)
const H5S_t *space1; IN: 1st Dataspace pointer to compare
const H5S_t *space2; IN: 2nd Dataspace pointer to compare
RETURNS
- TRUE/FALSE/FAIL
+ true/false/FAIL
DESCRIPTION
Checks to see if the current selection in the dataspaces are the same
dimensionality and shape.
@@ -1602,9 +1602,9 @@ H5S_select_shape_same(H5S_t *space1, H5S_t *space2)
{
H5S_sel_iter_t *iter_a = NULL; /* Selection a iteration info */
H5S_sel_iter_t *iter_b = NULL; /* Selection b iteration info */
- hbool_t iter_a_init = FALSE; /* Selection a iteration info has been initialized */
- hbool_t iter_b_init = FALSE; /* Selection b iteration info has been initialized */
- htri_t ret_value = TRUE; /* Return value */
+ bool iter_a_init = false; /* Selection a iteration info has been initialized */
+ bool iter_b_init = false; /* Selection b iteration info has been initialized */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1614,7 +1614,7 @@ H5S_select_shape_same(H5S_t *space1, H5S_t *space2)
/* Check for different number of elements selected */
if (H5S_GET_SELECT_NPOINTS(space1) != H5S_GET_SELECT_NPOINTS(space2))
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* Check special cases if both dataspaces aren't scalar */
/* (If only one is, the number of selected points check is sufficient) */
@@ -1684,7 +1684,7 @@ H5S_select_shape_same(H5S_t *space1, H5S_t *space2)
/* Verify that the ranges are the same */
if ((high_a[space_a_dim] - low_a[space_a_dim]) != (high_b[space_b_dim] - low_b[space_b_dim]))
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* Go to next dimension */
space_a_dim--;
@@ -1698,7 +1698,7 @@ H5S_select_shape_same(H5S_t *space1, H5S_t *space2)
/* This range should be flat to be the same in a lower dimension */
if (low_a[space_a_dim] != high_a[space_a_dim])
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
space_a_dim--;
} /* end while */
@@ -1709,7 +1709,7 @@ H5S_select_shape_same(H5S_t *space1, H5S_t *space2)
* the same, then the selections are the same, even if the
* selection types are different.
*/
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
} /* end if */
} /* end if */
@@ -1725,7 +1725,7 @@ H5S_select_shape_same(H5S_t *space1, H5S_t *space2)
hsize_t end_a[H5S_MAX_RANK]; /* End point of selection block in dataspace a */
hsize_t end_b[H5S_MAX_RANK]; /* End point of selection block in dataspace b */
hssize_t offset[H5S_MAX_RANK]; /* Offset of selection b blocks relative to selection a blocks */
- hbool_t first_block = TRUE; /* Flag to indicate the first block */
+ bool first_block = true; /* Flag to indicate the first block */
/* Allocate the selection iterators */
if (NULL == (iter_a = H5FL_MALLOC(H5S_sel_iter_t)))
@@ -1740,10 +1740,10 @@ H5S_select_shape_same(H5S_t *space1, H5S_t *space2)
*/
if (H5S_select_iter_init(iter_a, space_a, (size_t)0, 0) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator a");
- iter_a_init = TRUE;
+ iter_a_init = true;
if (H5S_select_iter_init(iter_b, space_b, (size_t)0, 0) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator b");
- iter_b_init = TRUE;
+ iter_b_init = true;
/* Iterate over all the blocks in each selection */
while (1) {
@@ -1768,7 +1768,7 @@ H5S_select_shape_same(H5S_t *space1, H5S_t *space2)
while (space_b_dim >= 0) {
if ((end_a[space_a_dim] - start_a[space_a_dim]) !=
(end_b[space_b_dim] - start_b[space_b_dim]))
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* Set the relative locations of the selections */
offset[space_a_dim] = (hssize_t)start_b[space_b_dim] - (hssize_t)start_a[space_a_dim];
@@ -1782,13 +1782,13 @@ H5S_select_shape_same(H5S_t *space1, H5S_t *space2)
*/
while (space_a_dim >= 0) {
if (start_a[space_a_dim] != end_a[space_a_dim])
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
space_a_dim--;
} /* end while */
/* Reset "first block" flag */
- first_block = FALSE;
+ first_block = false;
} /* end if */
/* Check over the blocks for each selection */
else {
@@ -1797,12 +1797,12 @@ H5S_select_shape_same(H5S_t *space1, H5S_t *space2)
/* Check if the blocks are in the same relative location */
if ((hsize_t)((hssize_t)start_a[space_a_dim] + offset[space_a_dim]) !=
start_b[space_b_dim])
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* If the block sizes from each selection doesn't match, get out */
if ((end_a[space_a_dim] - start_a[space_a_dim]) !=
(end_b[space_b_dim] - start_b[space_b_dim]))
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
space_a_dim--;
space_b_dim--;
@@ -1812,7 +1812,7 @@ H5S_select_shape_same(H5S_t *space1, H5S_t *space2)
while (space_a_dim >= 0) {
/* If the block size isn't 1, get out */
if (start_a[space_a_dim] != end_a[space_a_dim])
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
space_a_dim--;
} /* end while */
@@ -1826,10 +1826,10 @@ H5S_select_shape_same(H5S_t *space1, H5S_t *space2)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTNEXT, FAIL, "unable to check iterator block b");
/* Did we run out of blocks at the same time? */
- if ((status_a == FALSE) && (status_b == FALSE))
+ if ((status_a == false) && (status_b == false))
break;
else if (status_a != status_b)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
else {
/* Advance to next block in selection iterators */
if (H5S_SELECT_ITER_NEXT_BLOCK(iter_a) < 0)
@@ -1867,7 +1867,7 @@ H5S_select_shape_same(H5S_t *space1, H5S_t *space2)
hid_t space1_id; IN: ID of 1st Dataspace pointer to compare
hid_t space2_id; IN: ID of 2nd Dataspace pointer to compare
RETURNS
- TRUE/FALSE/FAIL
+ true/false/FAIL
DESCRIPTION
Checks to see if the current selection in the dataspaces are the same
dimensionality and shape.
@@ -1909,7 +1909,7 @@ H5Sselect_shape_same(hid_t space1_id, hid_t space2_id)
const hsize_t *start; IN: Starting coordinate of block
const hsize_t *end; IN: Opposite ("ending") coordinate of block
RETURNS
- TRUE / FALSE / FAIL
+ true / false / FAIL
DESCRIPTION
Checks to see if the current selection in the dataspace intersects with
the block given.
@@ -1924,7 +1924,7 @@ H5Sselect_shape_same(hid_t space1_id, hid_t space2_id)
htri_t
H5S_select_intersect_block(H5S_t *space, const hsize_t *start, const hsize_t *end)
{
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1947,7 +1947,7 @@ H5S_select_intersect_block(H5S_t *space, const hsize_t *start, const hsize_t *en
for (u = 0; u < space->extent.rank; u++)
/* If selection bounds & block don't overlap, can leave now */
if (!H5S_RANGE_OVERLAP(low[u], high[u], start[u], end[u]))
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
} /* end if */
/* Call selection type's intersect routine */
@@ -1969,7 +1969,7 @@ H5S_select_intersect_block(H5S_t *space, const hsize_t *start, const hsize_t *en
const hsize_t *start; IN: Starting coordinate of block
const hsize_t *end; IN: Opposite ("ending") coordinate of block
RETURNS
- TRUE / FALSE / FAIL
+ true / false / FAIL
DESCRIPTION
Checks to see if the current selection in the dataspace intersects with
the block given.
@@ -2237,14 +2237,14 @@ H5S_select_construct_projection(H5S_t *base_space, H5S_t **new_space_ptr, unsign
sizeof(new_space->select.offset[0]) * new_space_rank);
/* Propagate the offset changed flag into the new dataspace. */
- new_space->select.offset_changed = TRUE;
+ new_space->select.offset_changed = true;
} /* end if */
} /* end else */
/* If we have done the projection correctly, the following assertion
* should hold.
*/
- assert(TRUE == H5S_select_shape_same(base_space, new_space));
+ assert(true == H5S_select_shape_same(base_space, new_space));
/* load the address of the new space into *new_space_ptr */
*new_space_ptr = new_space;
@@ -2296,7 +2296,7 @@ herr_t
H5S_select_fill(const void *fill, size_t fill_size, H5S_t *space, void *_buf)
{
H5S_sel_iter_t *iter = NULL; /* Selection iteration info */
- hbool_t iter_init = FALSE; /* Selection iteration info has been initialized */
+ bool iter_init = false; /* Selection iteration info has been initialized */
hsize_t *off = NULL; /* Array to store sequence offsets */
size_t *len = NULL; /* Array to store sequence lengths */
hssize_t nelmts; /* Number of elements in selection */
@@ -2318,7 +2318,7 @@ H5S_select_fill(const void *fill, size_t fill_size, H5S_t *space, void *_buf)
/* Initialize iterator */
if (H5S_select_iter_init(iter, space, fill_size, 0) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator");
- iter_init = TRUE; /* Selection iteration info has been initialized */
+ iter_init = true; /* Selection iteration info has been initialized */
/* Get the number of elements in selection */
if ((nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(space)) < 0)
@@ -2391,7 +2391,7 @@ H5S_select_fill(const void *fill, size_t fill_size, H5S_t *space, void *_buf)
src_intersect_space H5S_t *dst_space; IN: Selection that is mapped to src_space H5S_t
*src_intersect_space; IN: Selection whose intersection with src_space is projected to dst_space to obtain the
result H5S_t **new_space_ptr; OUT: Will contain the result (intersection of src_intersect_space and src_space
-projected from src_space to dst_space) after the operation hbool_t share_selection; IN: Whether we are allowed
+projected from src_space to dst_space) after the operation bool share_selection; IN: Whether we are allowed
to share structures inside dst_space with proj_space
RETURNS
@@ -2410,14 +2410,14 @@ to share structures inside dst_space with proj_space
--------------------------------------------------------------------------*/
herr_t
H5S_select_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_intersect_space,
- H5S_t **new_space_ptr, hbool_t share_selection)
+ H5S_t **new_space_ptr, bool share_selection)
{
H5S_t *new_space = NULL; /* New dataspace constructed */
H5S_t *tmp_src_intersect_space = NULL; /* Temporary SIS converted from points->hyperslabs */
H5S_sel_iter_t *ss_iter = NULL; /* Selection iterator for src_space */
- hbool_t ss_iter_init = FALSE; /* Whether ss_iter has been initialized */
+ bool ss_iter_init = false; /* Whether ss_iter has been initialized */
H5S_sel_iter_t *ds_iter = NULL; /* Selection iterator for dst_space */
- hbool_t ds_iter_init = FALSE; /* Whether ds_iter has been initialized */
+ bool ds_iter_init = false; /* Whether ds_iter has been initialized */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -2438,14 +2438,14 @@ H5S_select_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i
/* Create new space, using dst extent. Start with "all" selection. */
if (NULL == (new_space = H5S_create(H5S_SIMPLE)))
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "unable to create output dataspace");
- if (H5S__extent_copy_real(&new_space->extent, &dst_space->extent, TRUE) < 0)
+ if (H5S__extent_copy_real(&new_space->extent, &dst_space->extent, true) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy destination space extent");
/* If the intersecting space is "all", the intersection must be equal to the
* source space and the projection must be equal to the destination space */
if (H5S_GET_SELECT_TYPE(src_intersect_space) == H5S_SEL_ALL) {
/* Copy the destination selection. */
- if (H5S_select_copy(new_space, dst_space, FALSE) < 0)
+ if (H5S_select_copy(new_space, dst_space, false) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy destination space selection");
} /* end if */
/* If any of the selections contain no elements, the projection must be
@@ -2486,7 +2486,7 @@ H5S_select_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i
/* Select all or none as appropriate */
if (intersect) {
- if (H5S_select_all(new_space, TRUE) < 0)
+ if (H5S_select_all(new_space, true) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't select all");
} /* end if */
else if (H5S_select_none(new_space) < 0)
@@ -2507,7 +2507,7 @@ H5S_select_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL,
"unable to create temporary source intersect dataspace");
if (H5S__extent_copy_real(&tmp_src_intersect_space->extent, &src_intersect_space->extent,
- FALSE) < 0)
+ false) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL,
"unable to copy source intersect space extent");
@@ -2543,11 +2543,11 @@ H5S_select_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i
if (H5S_select_iter_init(ss_iter, src_space, 1, H5S_SEL_ITER_SHARE_WITH_DATASPACE) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL,
"can't initialize source space selection iterator");
- ss_iter_init = TRUE;
+ ss_iter_init = true;
if (H5S_select_iter_init(ds_iter, dst_space, 1, H5S_SEL_ITER_SHARE_WITH_DATASPACE) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL,
"can't initialize destination space selection iterator");
- ds_iter_init = TRUE;
+ ds_iter_init = true;
/* Iterate over points */
do {
@@ -2688,11 +2688,11 @@ H5Sselect_project_intersection(hid_t src_space_id, hid_t dst_space_id, hid_t src
"rank of source space does not match rank of source intersect space");
/* Perform operation */
- if (H5S_select_project_intersection(src_space, dst_space, src_intersect_space, &proj_space, FALSE) < 0)
+ if (H5S_select_project_intersection(src_space, dst_space, src_intersect_space, &proj_space, false) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project dataspace intersection");
/* Register */
- if ((ret_value = H5I_register(H5I_DATASPACE, proj_space, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_DATASPACE, proj_space, true)) < 0)
HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID");
done:
@@ -2840,7 +2840,7 @@ H5Ssel_iter_create(hid_t space_id, size_t elmt_size, unsigned flags)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, H5I_INVALID_HID, "unable to initialize selection iterator");
/* Register */
- if ((ret_value = H5I_register(H5I_SPACE_SEL_ITER, sel_iter, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_SPACE_SEL_ITER, sel_iter, true)) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTREGISTER, H5I_INVALID_HID,
"unable to register dataspace selection iterator ID");
@@ -2938,7 +2938,7 @@ H5Ssel_iter_get_seq_list(hid_t sel_iter_id, size_t maxseq, size_t maxelmts, size
USAGE
herr_t H5S_select_contig_block(space, is_contig, off, len)
H5S_t *space; IN: Selection to check
- hbool_t *is_contig; OUT: Whether the selection is contiguous
+ bool *is_contig; OUT: Whether the selection is contiguous
hsize_t *off; OUT: Offset of selection
size_t *len; OUT: Length of selection
@@ -2955,10 +2955,10 @@ H5Ssel_iter_get_seq_list(hid_t sel_iter_id, size_t maxseq, size_t maxelmts, size
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5S_select_contig_block(H5S_t *space, hbool_t *is_contig, hsize_t *off, size_t *len)
+H5S_select_contig_block(H5S_t *space, bool *is_contig, hsize_t *off, size_t *len)
{
H5S_sel_iter_t *iter = NULL; /* Selection iterator */
- hbool_t iter_init = FALSE; /* Selection iteration info has been initialized */
+ bool iter_init = false; /* Selection iteration info has been initialized */
size_t nseq_tmp;
size_t nelem_tmp;
hsize_t sel_off;
@@ -2975,7 +2975,7 @@ H5S_select_contig_block(H5S_t *space, hbool_t *is_contig, hsize_t *off, size_t *
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate iterator");
if (H5S_select_iter_init(iter, space, 1, 0) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize memory selection information");
- iter_init = TRUE;
+ iter_init = true;
/* Get list of sequences for selection, to check if it is contiguous */
if (H5S_SELECT_ITER_GET_SEQ_LIST(iter, (size_t)1, (size_t)-1, &nseq_tmp, &nelem_tmp, &sel_off, &sel_len) <
@@ -2986,14 +2986,14 @@ H5S_select_contig_block(H5S_t *space, hbool_t *is_contig, hsize_t *off, size_t *
H5_CHECK_OVERFLOW(space->select.num_elem, hsize_t, size_t);
if (sel_len == (size_t)space->select.num_elem) {
if (is_contig)
- *is_contig = TRUE;
+ *is_contig = true;
if (off)
*off = sel_off;
if (len)
*len = sel_len;
}
else if (is_contig)
- *is_contig = FALSE;
+ *is_contig = false;
done:
if (iter_init && H5S_SELECT_ITER_RELEASE(iter) < 0)
diff --git a/src/H5Stest.c b/src/H5Stest.c
index e5888ef95d8..4978de0558e 100644
--- a/src/H5Stest.c
+++ b/src/H5Stest.c
@@ -168,7 +168,7 @@ H5S__check_spans_tail_ptr(const H5S_hyper_span_info_t *span_lst)
{
H5S_hyper_span_t *cur_elem;
H5S_hyper_span_t *actual_tail = NULL;
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE
@@ -217,7 +217,7 @@ H5S__check_points_tail_ptr(const H5S_pnt_list_t *pnt_lst)
{
H5S_pnt_node_t *cur_elem;
H5S_pnt_node_t *actual_tail = NULL;
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE
@@ -337,7 +337,7 @@ H5S__check_internal_consistency(const H5S_t *space)
htri_t H5S__internal_consistency_test(hid_t space_id)
hid_t space_id; IN: dataspace id
RETURNS
- Non-negative TRUE/FALSE on success, negative on failure
+ Non-negative true/false on success, negative on failure
DESCRIPTION
Check the states of internal data structures of the hyperslab, and see
whether they are consistent or not
@@ -351,7 +351,7 @@ htri_t
H5S__internal_consistency_test(hid_t space_id)
{
H5S_t *space; /* Pointer to 1st dataspace */
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE
diff --git a/src/H5T.c b/src/H5T.c
index 0511e22ebbd..c0b4eb7b449 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -251,7 +251,7 @@
{ \
H5T_INIT_TYPE_ALLOC_COMMON(H5T_REFERENCE) \
H5T_INIT_TYPE_NUM_COMMON(H5T_ORDER_NONE) \
- dt->shared->force_conv = TRUE; \
+ dt->shared->force_conv = true; \
dt->shared->u.atomic.u.r.file = NULL; \
dt->shared->u.atomic.u.r.loc = H5T_LOC_BADLOC; \
dt->shared->u.atomic.u.r.cls = NULL; \
@@ -261,7 +261,7 @@
{ \
H5T_INIT_TYPE_REF_COMMON \
dt->shared->u.atomic.u.r.rtype = H5R_OBJECT1; \
- dt->shared->u.atomic.u.r.opaque = FALSE; \
+ dt->shared->u.atomic.u.r.opaque = false; \
dt->shared->u.atomic.u.r.version = 0; \
}
@@ -269,7 +269,7 @@
{ \
H5T_INIT_TYPE_REF_COMMON \
dt->shared->u.atomic.u.r.rtype = H5R_DATASET_REGION1; \
- dt->shared->u.atomic.u.r.opaque = FALSE; \
+ dt->shared->u.atomic.u.r.opaque = false; \
dt->shared->u.atomic.u.r.version = 0; \
}
@@ -280,7 +280,7 @@
{ \
H5T_INIT_TYPE_REF_COMMON \
dt->shared->u.atomic.u.r.rtype = H5R_OBJECT2; \
- dt->shared->u.atomic.u.r.opaque = TRUE; \
+ dt->shared->u.atomic.u.r.opaque = true; \
dt->shared->u.atomic.u.r.version = H5R_ENCODE_VERSION; \
dt->shared->version = H5O_DTYPE_VERSION_4; \
}
@@ -326,7 +326,7 @@
H5_GLUE3(H5T_INIT_TYPE_, GUTS, _CORE) \
\
/* Register result */ \
- if (((GLOBAL) = H5I_register(H5I_DATATYPE, dt, FALSE)) < 0) \
+ if (((GLOBAL) = H5I_register(H5I_DATATYPE, dt, false)) < 0) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register datatype atom"); \
}
@@ -349,12 +349,12 @@ static herr_t H5T__set_size(H5T_t *dt, size_t size);
static herr_t H5T__close_cb(H5T_t *dt, void **request);
static H5T_path_t *H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name,
H5T_conv_func_t *conv);
-static hbool_t H5T__detect_vlen_ref(const H5T_t *dt);
+static bool H5T__detect_vlen_ref(const H5T_t *dt);
static H5T_t *H5T__initiate_copy(const H5T_t *old_dt);
static H5T_t *H5T__copy_transient(H5T_t *old_dt);
static H5T_t *H5T__copy_all(H5T_t *old_dt);
static herr_t H5T__complete_copy(H5T_t *new_dt, const H5T_t *old_dt, H5T_shared_t *reopened_fo,
- hbool_t set_memory_type, H5T_copy_func_t copyfn);
+ bool set_memory_type, H5T_copy_func_t copyfn);
/*****************************/
/* Library Private Variables */
@@ -611,9 +611,9 @@ H5T__init_inf(void)
/* +Inf */
d = (uint8_t *)&H5T_NATIVE_FLOAT_POS_INF_g;
- H5T__bit_set(d, dst->u.f.sign, (size_t)1, FALSE);
- H5T__bit_set(d, dst->u.f.epos, dst->u.f.esize, TRUE);
- H5T__bit_set(d, dst->u.f.mpos, dst->u.f.msize, FALSE);
+ H5T__bit_set(d, dst->u.f.sign, (size_t)1, false);
+ H5T__bit_set(d, dst->u.f.epos, dst->u.f.esize, true);
+ H5T__bit_set(d, dst->u.f.mpos, dst->u.f.msize, false);
/* Swap the bytes if the machine architecture is big-endian */
if (H5T_ORDER_BE == H5T_native_order_g) {
@@ -627,9 +627,9 @@ H5T__init_inf(void)
/* -Inf */
d = (uint8_t *)&H5T_NATIVE_FLOAT_NEG_INF_g;
- H5T__bit_set(d, dst->u.f.sign, (size_t)1, TRUE);
- H5T__bit_set(d, dst->u.f.epos, dst->u.f.esize, TRUE);
- H5T__bit_set(d, dst->u.f.mpos, dst->u.f.msize, FALSE);
+ H5T__bit_set(d, dst->u.f.sign, (size_t)1, true);
+ H5T__bit_set(d, dst->u.f.epos, dst->u.f.esize, true);
+ H5T__bit_set(d, dst->u.f.mpos, dst->u.f.msize, false);
/* Swap the bytes if the machine architecture is big-endian */
if (H5T_ORDER_BE == H5T_native_order_g) {
@@ -652,9 +652,9 @@ H5T__init_inf(void)
/* +Inf */
d = (uint8_t *)&H5T_NATIVE_DOUBLE_POS_INF_g;
- H5T__bit_set(d, dst->u.f.sign, (size_t)1, FALSE);
- H5T__bit_set(d, dst->u.f.epos, dst->u.f.esize, TRUE);
- H5T__bit_set(d, dst->u.f.mpos, dst->u.f.msize, FALSE);
+ H5T__bit_set(d, dst->u.f.sign, (size_t)1, false);
+ H5T__bit_set(d, dst->u.f.epos, dst->u.f.esize, true);
+ H5T__bit_set(d, dst->u.f.mpos, dst->u.f.msize, false);
/* Swap the bytes if the machine architecture is big-endian */
if (H5T_ORDER_BE == H5T_native_order_g) {
@@ -668,9 +668,9 @@ H5T__init_inf(void)
/* -Inf */
d = (uint8_t *)&H5T_NATIVE_DOUBLE_NEG_INF_g;
- H5T__bit_set(d, dst->u.f.sign, (size_t)1, TRUE);
- H5T__bit_set(d, dst->u.f.epos, dst->u.f.esize, TRUE);
- H5T__bit_set(d, dst->u.f.mpos, dst->u.f.msize, FALSE);
+ H5T__bit_set(d, dst->u.f.sign, (size_t)1, true);
+ H5T__bit_set(d, dst->u.f.epos, dst->u.f.esize, true);
+ H5T__bit_set(d, dst->u.f.mpos, dst->u.f.msize, false);
/* Swap the bytes if the machine architecture is big-endian */
if (H5T_ORDER_BE == H5T_native_order_g) {
@@ -733,8 +733,8 @@ H5T_init(void)
H5T_t *ref = NULL; /* Datatype structure for opaque references */
hsize_t dim[1] = {1}; /* Dimension info for array datatype */
herr_t status;
- hbool_t copied_dtype =
- TRUE; /* Flag to indicate whether datatype was copied or allocated (for error cleanup) */
+ bool copied_dtype =
+ true; /* Flag to indicate whether datatype was copied or allocated (for error cleanup) */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -812,8 +812,8 @@ H5T_init(void)
/* herr_t */
H5T_INIT_TYPE(OFFSET, H5T_NATIVE_HERR_g, COPY, native_int, SET, sizeof(herr_t))
- /* hbool_t */
- H5T_INIT_TYPE(OFFSET, H5T_NATIVE_HBOOL_g, COPY, native_uint, SET, sizeof(hbool_t))
+ /* bool */
+ H5T_INIT_TYPE(OFFSET, H5T_NATIVE_HBOOL_g, COPY, native_uint, SET, sizeof(bool))
/*------------------------------------------------------------
* IEEE Types
@@ -954,7 +954,7 @@ H5T_init(void)
/* Indicate that the types that are created from here down are allocated
* H5FL_ALLOC(), not copied with H5T_copy()
*/
- copied_dtype = FALSE;
+ copied_dtype = false;
/* Opaque data */
H5T_INIT_TYPE(OPAQ, H5T_NATIVE_OPAQUE_g, ALLOC, -, SET, 1)
@@ -1387,7 +1387,7 @@ H5T_init(void)
assert(H5P_CLS_DATATYPE_CREATE_g != NULL);
/* Register the default datatype creation property list */
- if ((H5P_LST_DATATYPE_CREATE_ID_g = H5P_create_id(H5P_CLS_DATATYPE_CREATE_g, FALSE)) < 0)
+ if ((H5P_LST_DATATYPE_CREATE_ID_g = H5P_create_id(H5P_CLS_DATATYPE_CREATE_g, false)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "can't insert property into class");
} /* end if */
@@ -1534,11 +1534,11 @@ H5T_top_term_package(void)
/* Unlock all datatypes, then free them */
/* note that we are ignoring the return value from H5I_iterate() */
/* Also note that we are incrementing 'n' in the callback */
- H5I_iterate(H5I_DATATYPE, H5T__unlock_cb, &n, FALSE);
+ H5I_iterate(H5I_DATATYPE, H5T__unlock_cb, &n, false);
/* Release all datatype IDs */
if (H5I_nmembers(H5I_DATATYPE) > 0) {
- (void)H5I_clear_type(H5I_DATATYPE, FALSE, FALSE);
+ (void)H5I_clear_type(H5I_DATATYPE, false, false);
n++; /*H5I*/
} /* end if */
@@ -1752,7 +1752,7 @@ H5Tcreate(H5T_class_t type, size_t size)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to create type");
/* Get an ID for the datatype */
- if ((ret_value = H5I_register(H5I_DATATYPE, dt, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_DATATYPE, dt, true)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register datatype ID");
done:
@@ -1847,7 +1847,7 @@ H5Tcopy(hid_t obj_id)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5I_INVALID_HID, "unable to copy");
/* Get an ID for the copied datatype */
- if ((ret_value = H5I_register(H5I_DATATYPE, new_dt, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_DATATYPE, new_dt, true)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register datatype atom");
done:
@@ -1962,7 +1962,7 @@ H5Tclose_async(const char *app_file, const char *app_func, unsigned app_line, hi
*
* Purpose: Determines if two datatypes are equal.
*
- * Return: Success: TRUE if equal, FALSE if unequal
+ * Return: Success: true if equal, false if unequal
*
* Failure: Negative
*
@@ -1984,7 +1984,7 @@ H5Tequal(hid_t type1_id, hid_t type2_id)
if (NULL == (dt2 = (H5T_t *)H5I_object_verify(type2_id, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype");
- ret_value = (0 == H5T_cmp(dt1, dt2, FALSE)) ? TRUE : FALSE;
+ ret_value = (0 == H5T_cmp(dt1, dt2, false)) ? true : false;
done:
FUNC_LEAVE_API(ret_value)
@@ -2020,7 +2020,7 @@ H5Tlock(hid_t type_id)
if (H5T_STATE_NAMED == dt->shared->state || H5T_STATE_OPEN == dt->shared->state)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to lock named datatype");
- if (H5T_lock(dt, TRUE) < 0)
+ if (H5T_lock(dt, true) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to lock transient datatype");
done:
@@ -2052,7 +2052,7 @@ H5Tget_class(hid_t type_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_NO_CLASS, "not a datatype");
/* Set return value */
- ret_value = H5T_get_class(dt, FALSE);
+ ret_value = H5T_get_class(dt, false);
done:
FUNC_LEAVE_API(ret_value)
@@ -2098,7 +2098,7 @@ H5T_get_class(const H5T_t *dt, htri_t internal)
* Purpose: Check whether a datatype contains (or is) a certain type of
* datatype.
*
- * Return: TRUE (1) or FALSE (0) on success/Negative on failure
+ * Return: true (1) or false (0) on success/Negative on failure
*
*-------------------------------------------------------------------------
*/
@@ -2118,7 +2118,7 @@ H5Tdetect_class(hid_t type, H5T_class_t cls)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_NO_CLASS, "not a datatype class");
/* Set return value */
- if ((ret_value = H5T_detect_class(dt, cls, TRUE)) < 0)
+ if ((ret_value = H5T_detect_class(dt, cls, true)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, H5T_NO_CLASS, "can't get datatype class");
done:
@@ -2131,15 +2131,15 @@ H5Tdetect_class(hid_t type, H5T_class_t cls)
* Purpose: Check whether a datatype contains (or is) a certain type of
* datatype.
*
- * Return: TRUE (1) or FALSE (0) on success/Negative on failure
+ * Return: true (1) or false (0) on success/Negative on failure
*
*-------------------------------------------------------------------------
*/
htri_t
-H5T_detect_class(const H5T_t *dt, H5T_class_t cls, hbool_t from_api)
+H5T_detect_class(const H5T_t *dt, H5T_class_t cls, bool from_api)
{
unsigned i;
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_NOAPI_NOERR
@@ -2156,7 +2156,7 @@ H5T_detect_class(const H5T_t *dt, H5T_class_t cls, hbool_t from_api)
/* Check if this type is the correct type */
if (dt->shared->type == cls)
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
/* check for types that might have the correct type as a component */
switch (dt->shared->type) {
@@ -2166,12 +2166,12 @@ H5T_detect_class(const H5T_t *dt, H5T_class_t cls, hbool_t from_api)
/* Check if this field's type is the correct type */
if (dt->shared->u.compnd.memb[i].type->shared->type == cls)
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
/* Recurse if it's VL, compound, enum or array */
if (H5T_IS_COMPLEX(dt->shared->u.compnd.memb[i].type->shared->type))
if ((nested_ret = H5T_detect_class(dt->shared->u.compnd.memb[i].type, cls, from_api)) !=
- FALSE)
+ false)
HGOTO_DONE(nested_ret);
} /* end for */
break;
@@ -2203,7 +2203,7 @@ H5T_detect_class(const H5T_t *dt, H5T_class_t cls, hbool_t from_api)
*
* Purpose: Check whether a datatype is a variable-length string
*
- * Return: TRUE (1) or FALSE (0) on success/Negative on failure
+ * Return: true (1) or false (0) on success/Negative on failure
*
*-------------------------------------------------------------------------
*/
@@ -2233,7 +2233,7 @@ H5Tis_variable_str(hid_t dtype_id)
*
* Purpose: Check whether a datatype is a variable-length string
*
- * Return: TRUE (1) or FALSE (0) on success/Negative on failure
+ * Return: true (1) or false (0) on success/Negative on failure
*
*-------------------------------------------------------------------------
*/
@@ -2356,7 +2356,7 @@ H5Tget_super(hid_t type)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a datatype");
if (NULL == (super = H5T_get_super(dt)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5I_INVALID_HID, "not a datatype");
- if ((ret_value = H5I_register(H5I_DATATYPE, super, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_DATATYPE, super, true)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register parent datatype");
done:
@@ -2423,7 +2423,7 @@ H5T__register_int(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T
assert(func);
/* Set up conversion function wrapper */
- conv_func.is_app = FALSE;
+ conv_func.is_app = false;
conv_func.u.lib_func = func;
/* Register conversion */
@@ -2473,7 +2473,7 @@ H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_con
if (H5T_PERS_HARD == pers) {
/* Only bother to register the path if it's not a no-op path (for this machine) */
- if (H5T_cmp(src, dst, FALSE)) {
+ if (H5T_cmp(src, dst, false)) {
/* Locate or create a new conversion path */
if (NULL == (new_path = H5T__path_find_real(src, dst, name, conv)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to locate/allocate conversion path");
@@ -2486,7 +2486,7 @@ H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_con
*/
for (i = 0; i < H5T_g.npaths; i++)
if (new_path != H5T_g.path[i])
- H5T_g.path[i]->cdata.recalc = TRUE;
+ H5T_g.path[i]->cdata.recalc = true;
} /* end if */
} /* end if */
else {
@@ -2500,7 +2500,7 @@ H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_con
H5T_g.asoft = na;
H5T_g.soft = x;
} /* end if */
- HDstrncpy(H5T_g.soft[H5T_g.nsoft].name, name, (size_t)H5T_NAMELEN);
+ strncpy(H5T_g.soft[H5T_g.nsoft].name, name, (size_t)H5T_NAMELEN);
H5T_g.soft[H5T_g.nsoft].name[H5T_NAMELEN - 1] = '\0';
H5T_g.soft[H5T_g.nsoft].src = src->shared->type;
H5T_g.soft[H5T_g.nsoft].dst = dst->shared->type;
@@ -2521,8 +2521,8 @@ H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_con
old_path->dst->shared->type != dst->shared->type)
continue;
- if ((tmp_sid = H5I_register(H5I_DATATYPE, H5T_copy(old_path->src, H5T_COPY_ALL), FALSE)) < 0 ||
- (tmp_did = H5I_register(H5I_DATATYPE, H5T_copy(old_path->dst, H5T_COPY_ALL), FALSE)) < 0)
+ if ((tmp_sid = H5I_register(H5I_DATATYPE, H5T_copy(old_path->src, H5T_COPY_ALL), false)) < 0 ||
+ (tmp_did = H5I_register(H5I_DATATYPE, H5T_copy(old_path->dst, H5T_COPY_ALL), false)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL,
"unable to register data types for conv query");
memset(&cdata, 0, sizeof cdata);
@@ -2549,13 +2549,13 @@ H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_con
/* Create a new conversion path */
if (NULL == (new_path = H5FL_CALLOC(H5T_path_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed");
- HDstrncpy(new_path->name, name, (size_t)H5T_NAMELEN);
+ strncpy(new_path->name, name, (size_t)H5T_NAMELEN);
new_path->name[H5T_NAMELEN - 1] = '\0';
if (NULL == (new_path->src = H5T_copy(old_path->src, H5T_COPY_ALL)) ||
NULL == (new_path->dst = H5T_copy(old_path->dst, H5T_COPY_ALL)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy data types");
new_path->conv = *conv;
- new_path->is_hard = FALSE;
+ new_path->is_hard = false;
new_path->cdata = cdata;
/* Replace previous path */
@@ -2659,7 +2659,7 @@ H5Tregister(H5T_pers_t pers, const char *name, hid_t src_id, hid_t dst_id, H5T_c
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no conversion function specified");
/* Set up conversion function wrapper */
- conv_func.is_app = TRUE;
+ conv_func.is_app = true;
conv_func.u.app_func = func;
/* Go register the function */
@@ -2697,7 +2697,7 @@ H5T__unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_c
for (i = H5T_g.nsoft - 1; i >= 0; --i) {
soft = H5T_g.soft + i;
assert(soft);
- if (name && *name && HDstrcmp(name, soft->name) != 0)
+ if (name && *name && strcmp(name, soft->name) != 0)
continue;
if (src && src->shared->type != soft->src)
continue;
@@ -2718,8 +2718,8 @@ H5T__unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_c
/* Not a match */
if (((H5T_PERS_SOFT == pers && path->is_hard) || (H5T_PERS_HARD == pers && !path->is_hard)) ||
- (name && *name && HDstrcmp(name, path->name) != 0) || (src && H5T_cmp(src, path->src, FALSE)) ||
- (dst && H5T_cmp(dst, path->dst, FALSE)) || (func && func != path->conv.u.app_func)) {
+ (name && *name && strcmp(name, path->name) != 0) || (src && H5T_cmp(src, path->src, false)) ||
+ (dst && H5T_cmp(dst, path->dst, false)) || (func && func != path->conv.u.app_func)) {
/*
* Notify all other functions to recalculate private data since some
* functions might cache a list of conversion functions. For
@@ -2727,7 +2727,7 @@ H5T__unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_c
* functions for the members, so removing a function should cause
* the list to be recalculated to avoid the removed function.
*/
- path->cdata.recalc = TRUE;
+ path->cdata.recalc = true;
} /* end if */
else {
/* Remove from table */
@@ -2859,8 +2859,8 @@ H5Tfind(hid_t src_id, hid_t dst_id, H5T_cdata_t **pcdata /*out*/)
* A hard conversion uses compiler's casting; a soft conversion
* uses the library's own conversion function.
*
- * Return: TRUE: hard conversion.
- * FALSE: soft conversion.
+ * Return: true: hard conversion.
+ * false: soft conversion.
* FAIL: failed.
*
*-------------------------------------------------------------------------
@@ -2923,7 +2923,7 @@ H5Tconvert(hid_t src_id, hid_t dst_id, size_t nelmts, void *buf, void *backgroun
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type");
if (H5P_DEFAULT == dxpl_id)
dxpl_id = H5P_DATASET_XFER_DEFAULT;
- else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ else if (true != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not dataset transfer property list");
/* Set DXPL for operation */
@@ -2972,7 +2972,7 @@ H5Treclaim(hid_t type_id, hid_t space_id, hid_t dxpl_id, void *buf)
/* Get the default dataset transfer property list if the user didn't provide one */
if (H5P_DEFAULT == dxpl_id)
dxpl_id = H5P_DATASET_XFER_DEFAULT;
- else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ else if (true != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms");
/* Set DXPL for operation */
@@ -3055,7 +3055,7 @@ H5Tdecode(const void *buf)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "can't decode object");
/* Register the type and return the ID */
- if ((ret_value = H5I_register(H5I_DATATYPE, dt, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_DATATYPE, dt, true)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register data type");
done:
@@ -3093,7 +3093,7 @@ H5T_encode(H5T_t *obj, unsigned char *buf, size_t *nalloc)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "can't allocate fake file struct");
/* Find out the size of buffer needed */
- if ((buf_size = H5O_msg_raw_size(f, H5O_DTYPE_ID, TRUE, obj)) == 0)
+ if ((buf_size = H5O_msg_raw_size(f, H5O_DTYPE_ID, true, obj)) == 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_BADSIZE, FAIL, "can't find datatype size");
/* Don't encode if buffer size isn't big enough or buffer is empty */
@@ -3107,7 +3107,7 @@ H5T_encode(H5T_t *obj, unsigned char *buf, size_t *nalloc)
*buf++ = H5T_ENCODE_VERSION;
/* Encode into user's buffer */
- if (H5O_msg_encode(f, H5O_DTYPE_ID, TRUE, buf, obj) < 0)
+ if (H5O_msg_encode(f, H5O_DTYPE_ID, true, buf, obj) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode object");
} /* end else */
@@ -3219,7 +3219,7 @@ H5T__create(H5T_class_t type, size_t size)
dt->shared->type = type;
if (type == H5T_COMPOUND) {
- dt->shared->u.compnd.packed = FALSE; /* Start out unpacked */
+ dt->shared->u.compnd.packed = false; /* Start out unpacked */
dt->shared->u.compnd.memb_size = 0;
} /* end if */
else if (type == H5T_OPAQUE)
@@ -3410,7 +3410,7 @@ H5T__copy_all(H5T_t *old_dt)
*-------------------------------------------------------------------------
*/
static herr_t
-H5T__complete_copy(H5T_t *new_dt, const H5T_t *old_dt, H5T_shared_t *reopened_fo, hbool_t set_memory_type,
+H5T__complete_copy(H5T_t *new_dt, const H5T_t *old_dt, H5T_shared_t *reopened_fo, bool set_memory_type,
H5T_copy_func_t copyfn)
{
H5T_t *tmp = NULL; /* Temporary copy of compound field's datatype */
@@ -3470,8 +3470,8 @@ H5T__complete_copy(H5T_t *new_dt, const H5T_t *old_dt, H5T_shared_t *reopened_fo
if (old_dt->shared->u.compnd.sorted != H5T_SORT_VALUE) {
for (old_match = -1, j = 0; j < old_dt->shared->u.compnd.nmembs; j++) {
- if (!HDstrcmp(new_dt->shared->u.compnd.memb[i].name,
- old_dt->shared->u.compnd.memb[j].name)) {
+ if (!strcmp(new_dt->shared->u.compnd.memb[i].name,
+ old_dt->shared->u.compnd.memb[j].name)) {
old_match = (int)j;
break;
} /* end if */
@@ -3715,7 +3715,7 @@ H5T_copy_reopen(H5T_t *old_dt)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, NULL, "unable to reopen named data type");
/* Insert opened named datatype into opened object list for the file */
- if (H5FO_insert(old_dt->sh_loc.file, old_dt->sh_loc.u.loc.oh_addr, new_dt->shared, FALSE) < 0)
+ if (H5FO_insert(old_dt->sh_loc.file, old_dt->sh_loc.u.loc.oh_addr, new_dt->shared, false) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINSERT, NULL,
"can't insert datatype into list of open objects");
@@ -3757,7 +3757,7 @@ H5T_copy_reopen(H5T_t *old_dt)
new_dt->shared->state = H5T_STATE_RDONLY;
/* Finish making the copy of the datatype */
- if (H5T__complete_copy(new_dt, old_dt, reopened_fo, TRUE, H5T_copy_reopen) < 0)
+ if (H5T__complete_copy(new_dt, old_dt, reopened_fo, true, H5T_copy_reopen) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "can't complete datatype initialization");
/* Set return value */
@@ -3791,7 +3791,7 @@ H5T_copy_reopen(H5T_t *old_dt)
*-------------------------------------------------------------------------
*/
herr_t
-H5T_lock(H5T_t *dt, hbool_t immutable)
+H5T_lock(H5T_t *dt, bool immutable)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -4031,7 +4031,7 @@ H5T_close(H5T_t *dt)
/* Close things down if this is the last reference to the open named datatype */
if (0 == dt->shared->fo_count) {
- hbool_t corked; /* Whether the named datatype is corked or not */
+ bool corked; /* Whether the named datatype is corked or not */
/* Uncork cache entries with object address tag for named datatype */
if (H5AC_cork(dt->oloc.file, dt->oloc.addr, H5AC__GET_CORKED, &corked) < 0)
@@ -4198,7 +4198,7 @@ H5T__set_size(H5T_t *dt, size_t size)
* Force conversions (i.e. memory to memory conversions
* should duplicate data, not point to the same VL strings)
*/
- dt->shared->force_conv = TRUE;
+ dt->shared->force_conv = true;
/* Before we mess with the info in the union, extract the
* values we need */
@@ -4303,11 +4303,11 @@ H5T_get_size(const H5T_t *dt)
* true if and only if the type keeps a pointer to a file VOL
* object internally.
*
- * Return: TRUE/FALSE (never fails)
+ * Return: true/false (never fails)
*
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
H5T_get_force_conv(const H5T_t *dt)
{
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
@@ -4334,11 +4334,11 @@ H5T_get_force_conv(const H5T_t *dt)
*-------------------------------------------------------------------------
*/
int
-H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset)
+H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, bool superset)
{
unsigned *idx1 = NULL, *idx2 = NULL;
size_t base_size;
- hbool_t swapped;
+ bool swapped;
unsigned u;
int tmp;
int ret_value = 0;
@@ -4398,28 +4398,28 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset)
if (dt1->shared->u.enumer.nmembs > 1) {
int i;
- for (i = (int)dt1->shared->u.compnd.nmembs - 1, swapped = TRUE; swapped && i >= 0; --i) {
+ for (i = (int)dt1->shared->u.compnd.nmembs - 1, swapped = true; swapped && i >= 0; --i) {
int j;
- for (j = 0, swapped = FALSE; j < i; j++)
- if (HDstrcmp(dt1->shared->u.compnd.memb[idx1[j]].name,
- dt1->shared->u.compnd.memb[idx1[j + 1]].name) > 0) {
+ for (j = 0, swapped = false; j < i; j++)
+ if (strcmp(dt1->shared->u.compnd.memb[idx1[j]].name,
+ dt1->shared->u.compnd.memb[idx1[j + 1]].name) > 0) {
unsigned tmp_idx = idx1[j];
idx1[j] = idx1[j + 1];
idx1[j + 1] = tmp_idx;
- swapped = TRUE;
+ swapped = true;
}
}
- for (i = (int)dt2->shared->u.compnd.nmembs - 1, swapped = TRUE; swapped && i >= 0; --i) {
+ for (i = (int)dt2->shared->u.compnd.nmembs - 1, swapped = true; swapped && i >= 0; --i) {
int j;
- for (j = 0, swapped = FALSE; j < i; j++)
- if (HDstrcmp(dt2->shared->u.compnd.memb[idx2[j]].name,
- dt2->shared->u.compnd.memb[idx2[j + 1]].name) > 0) {
+ for (j = 0, swapped = false; j < i; j++)
+ if (strcmp(dt2->shared->u.compnd.memb[idx2[j]].name,
+ dt2->shared->u.compnd.memb[idx2[j + 1]].name) > 0) {
unsigned tmp_idx = idx2[j];
idx2[j] = idx2[j + 1];
idx2[j + 1] = tmp_idx;
- swapped = TRUE;
+ swapped = true;
}
}
} /* end if */
@@ -4427,17 +4427,17 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset)
#ifdef H5T_DEBUG
/* I don't quite trust the code above yet :-) --RPM */
for (u = 0; u < dt1->shared->u.compnd.nmembs - 1; u++) {
- assert(HDstrcmp(dt1->shared->u.compnd.memb[idx1[u]].name,
- dt1->shared->u.compnd.memb[idx1[u + 1]].name));
- assert(HDstrcmp(dt2->shared->u.compnd.memb[idx2[u]].name,
- dt2->shared->u.compnd.memb[idx2[u + 1]].name));
+ assert(strcmp(dt1->shared->u.compnd.memb[idx1[u]].name,
+ dt1->shared->u.compnd.memb[idx1[u + 1]].name));
+ assert(strcmp(dt2->shared->u.compnd.memb[idx2[u]].name,
+ dt2->shared->u.compnd.memb[idx2[u + 1]].name));
}
#endif
/* Compare the members */
for (u = 0; u < dt1->shared->u.compnd.nmembs; u++) {
- tmp = HDstrcmp(dt1->shared->u.compnd.memb[idx1[u]].name,
- dt2->shared->u.compnd.memb[idx2[u]].name);
+ tmp = strcmp(dt1->shared->u.compnd.memb[idx1[u]].name,
+ dt2->shared->u.compnd.memb[idx2[u]].name);
if (tmp < 0)
HGOTO_DONE(-1);
if (tmp > 0)
@@ -4489,16 +4489,16 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset)
idx1[u] = u;
if (dt1->shared->u.enumer.nmembs > 1) {
int i;
- for (i = (int)dt1->shared->u.enumer.nmembs - 1, swapped = TRUE; swapped && i >= 0; --i) {
+ for (i = (int)dt1->shared->u.enumer.nmembs - 1, swapped = true; swapped && i >= 0; --i) {
int j;
- for (j = 0, swapped = FALSE; j < i; j++)
- if (HDstrcmp(dt1->shared->u.enumer.name[idx1[j]],
- dt1->shared->u.enumer.name[idx1[j + 1]]) > 0) {
+ for (j = 0, swapped = false; j < i; j++)
+ if (strcmp(dt1->shared->u.enumer.name[idx1[j]],
+ dt1->shared->u.enumer.name[idx1[j + 1]]) > 0) {
unsigned tmp_idx = idx1[j];
idx1[j] = idx1[j + 1];
idx1[j + 1] = tmp_idx;
- swapped = TRUE;
+ swapped = true;
}
}
}
@@ -4507,16 +4507,16 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset)
if (dt2->shared->u.enumer.nmembs > 1) {
int i;
- for (i = (int)dt2->shared->u.enumer.nmembs - 1, swapped = TRUE; swapped && i >= 0; --i) {
+ for (i = (int)dt2->shared->u.enumer.nmembs - 1, swapped = true; swapped && i >= 0; --i) {
int j;
- for (j = 0, swapped = FALSE; j < i; j++)
- if (HDstrcmp(dt2->shared->u.enumer.name[idx2[j]],
- dt2->shared->u.enumer.name[idx2[j + 1]]) > 0) {
+ for (j = 0, swapped = false; j < i; j++)
+ if (strcmp(dt2->shared->u.enumer.name[idx2[j]],
+ dt2->shared->u.enumer.name[idx2[j + 1]]) > 0) {
unsigned tmp_idx = idx2[j];
idx2[j] = idx2[j + 1];
idx2[j + 1] = tmp_idx;
- swapped = TRUE;
+ swapped = true;
}
}
}
@@ -4524,10 +4524,8 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset)
#ifdef H5T_DEBUG
/* I don't quite trust the code above yet :-) --RPM */
for (u = 0; u < dt1->shared->u.enumer.nmembs - 1; u++) {
- assert(
- HDstrcmp(dt1->shared->u.enumer.name[idx1[u]], dt1->shared->u.enumer.name[idx1[u + 1]]));
- assert(
- HDstrcmp(dt2->shared->u.enumer.name[idx2[u]], dt2->shared->u.enumer.name[idx2[u + 1]]));
+ assert(strcmp(dt1->shared->u.enumer.name[idx1[u]], dt1->shared->u.enumer.name[idx1[u + 1]]));
+ assert(strcmp(dt2->shared->u.enumer.name[idx2[u]], dt2->shared->u.enumer.name[idx2[u + 1]]));
}
#endif
@@ -4550,8 +4548,8 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset)
idx = (lt + rt) / 2;
/* compare */
- if ((cmp = HDstrcmp(dt1->shared->u.enumer.name[idx1[u]],
- dt2->shared->u.enumer.name[idx2[idx]])) < 0)
+ if ((cmp = strcmp(dt1->shared->u.enumer.name[idx1[u]],
+ dt2->shared->u.enumer.name[idx2[idx]])) < 0)
rt = idx;
else
lt = idx + 1;
@@ -4564,7 +4562,7 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset)
/* Check for exact member name match when not doing
* "superset" comparison
*/
- tmp = HDstrcmp(dt1->shared->u.enumer.name[idx1[u]], dt2->shared->u.enumer.name[idx2[u]]);
+ tmp = strcmp(dt1->shared->u.enumer.name[idx1[u]], dt2->shared->u.enumer.name[idx2[u]]);
if (tmp < 0)
HGOTO_DONE(-1);
if (tmp > 0)
@@ -4620,7 +4618,7 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset)
case H5T_OPAQUE:
if (dt1->shared->u.opaque.tag && dt2->shared->u.opaque.tag)
- HGOTO_DONE(HDstrcmp(dt1->shared->u.opaque.tag, dt2->shared->u.opaque.tag));
+ HGOTO_DONE(strcmp(dt1->shared->u.opaque.tag, dt2->shared->u.opaque.tag));
break;
case H5T_ARRAY:
@@ -4822,7 +4820,7 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst)
assert(dst->shared);
/* Set up conversion function wrapper */
- conv_func.is_app = FALSE;
+ conv_func.is_app = false;
conv_func.u.lib_func = NULL;
/* Call the internal routine, with additional parameters */
@@ -4889,8 +4887,8 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
if (NULL == (H5T_g.path[0] = H5FL_CALLOC(H5T_path_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
"memory allocation failed for no-op conversion path");
- HDsnprintf(H5T_g.path[0]->name, sizeof(H5T_g.path[0]->name), "no-op");
- H5T_g.path[0]->conv.is_app = FALSE;
+ snprintf(H5T_g.path[0]->name, sizeof(H5T_g.path[0]->name), "no-op");
+ H5T_g.path[0]->conv.is_app = false;
H5T_g.path[0]->conv.u.lib_func = H5T__conv_noop;
H5T_g.path[0]->cdata.command = H5T_CONV_INIT;
if (H5T__conv_noop((hid_t)FAIL, (hid_t)FAIL, &(H5T_g.path[0]->cdata), (size_t)0, (size_t)0, (size_t)0,
@@ -4901,7 +4899,7 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
#endif
H5E_clear_stack(NULL); /*ignore the error*/
} /* end if */
- H5T_g.path[0]->is_noop = TRUE;
+ H5T_g.path[0]->is_noop = true;
H5T_g.npaths = 1;
} /* end if */
@@ -4912,8 +4910,8 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
* Only allow the no-op conversion to occur if no "force conversion" flags
* are set
*/
- if (src->shared->force_conv == FALSE && dst->shared->force_conv == FALSE &&
- 0 == H5T_cmp(src, dst, TRUE)) {
+ if (src->shared->force_conv == false && dst->shared->force_conv == false &&
+ 0 == H5T_cmp(src, dst, true)) {
table = H5T_g.path[0];
cmp = 0;
md = 0;
@@ -4926,9 +4924,9 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
while (cmp && lt < rt) {
md = (lt + rt) / 2;
assert(H5T_g.path[md]);
- cmp = H5T_cmp(src, H5T_g.path[md]->src, FALSE);
+ cmp = H5T_cmp(src, H5T_g.path[md]->src, false);
if (0 == cmp)
- cmp = H5T_cmp(dst, H5T_g.path[md]->dst, FALSE);
+ cmp = H5T_cmp(dst, H5T_g.path[md]->dst, false);
if (cmp < 0)
rt = md;
else if (cmp > 0)
@@ -4954,11 +4952,11 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
if (NULL == (path = H5FL_CALLOC(H5T_path_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for type conversion path");
if (name && *name) {
- HDstrncpy(path->name, name, (size_t)H5T_NAMELEN);
+ strncpy(path->name, name, (size_t)H5T_NAMELEN);
path->name[H5T_NAMELEN - 1] = '\0';
} /* end if */
else
- HDsnprintf(path->name, sizeof(path->name), "NONAME");
+ snprintf(path->name, sizeof(path->name), "NONAME");
if (NULL == (path->src = H5T_copy(src, H5T_COPY_ALL)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to copy datatype for conversion path");
if (NULL == (path->dst = H5T_copy(dst, H5T_COPY_ALL)))
@@ -4976,10 +4974,10 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
(!table || (table && conv->is_app) || (table && !table->is_hard && !conv->is_app))) {
assert(path != table);
assert(NULL == path->conv.u.app_func);
- if (path->src && (src_id = H5I_register(H5I_DATATYPE, H5T_copy(path->src, H5T_COPY_ALL), FALSE)) < 0)
+ if (path->src && (src_id = H5I_register(H5I_DATATYPE, H5T_copy(path->src, H5T_COPY_ALL), false)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL,
"unable to register source conversion type for query");
- if (path->dst && (dst_id = H5I_register(H5I_DATATYPE, H5T_copy(path->dst, H5T_COPY_ALL), FALSE)) < 0)
+ if (path->dst && (dst_id = H5I_register(H5I_DATATYPE, H5T_copy(path->dst, H5T_COPY_ALL), false)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL,
"unable to register destination conversion type for query");
path->cdata.command = H5T_CONV_INIT;
@@ -4997,7 +4995,7 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
H5I_dec_ref(dst_id);
src_id = dst_id = -1;
path->conv = *conv;
- path->is_hard = TRUE;
+ path->is_hard = true;
} /* end if */
/*
@@ -5008,14 +5006,14 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
*/
assert(path->conv.u.app_func || (src && dst));
for (i = H5T_g.nsoft - 1; i >= 0 && !path->conv.u.app_func; --i) {
- hbool_t path_init_error = FALSE;
+ bool path_init_error = false;
if (src->shared->type != H5T_g.soft[i].src || dst->shared->type != H5T_g.soft[i].dst)
continue;
- if ((src_id = H5I_register(H5I_DATATYPE, H5T_copy(path->src, H5T_COPY_ALL), FALSE)) < 0)
+ if ((src_id = H5I_register(H5I_DATATYPE, H5T_copy(path->src, H5T_COPY_ALL), false)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL,
"unable to register src conversion type for query");
- if ((dst_id = H5I_register(H5I_DATATYPE, H5T_copy(path->dst, H5T_COPY_ALL), FALSE)) < 0)
+ if ((dst_id = H5I_register(H5I_DATATYPE, H5T_copy(path->dst, H5T_COPY_ALL), false)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL,
"unable to register dst conversion type for query");
path->cdata.command = H5T_CONV_INIT;
@@ -5024,22 +5022,22 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
(size_t)0, NULL, NULL, H5CX_get_dxpl()) < 0) {
memset(&(path->cdata), 0, sizeof(H5T_cdata_t));
H5E_clear_stack(NULL); /*ignore the error*/
- path_init_error = TRUE;
+ path_init_error = true;
} /* end if */
} /* end if */
else if ((H5T_g.soft[i].conv.u.lib_func)(src_id, dst_id, &(path->cdata), (size_t)0, (size_t)0,
(size_t)0, NULL, NULL) < 0) {
memset(&(path->cdata), 0, sizeof(H5T_cdata_t));
H5E_clear_stack(NULL); /*ignore the error*/
- path_init_error = TRUE;
+ path_init_error = true;
} /* end if */
/* Finish operation, if no error */
if (!path_init_error) {
- HDstrncpy(path->name, H5T_g.soft[i].name, (size_t)H5T_NAMELEN);
+ strncpy(path->name, H5T_g.soft[i].name, (size_t)H5T_NAMELEN);
path->name[H5T_NAMELEN - 1] = '\0';
path->conv = H5T_g.soft[i].conv;
- path->is_hard = FALSE;
+ path->is_hard = false;
} /* end else */
H5I_dec_ref(src_id);
H5I_dec_ref(dst_id);
@@ -5059,9 +5057,9 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
while (cmp && lt < rt) {
md = (lt + rt) / 2;
assert(H5T_g.path[md]);
- cmp = H5T_cmp(src, H5T_g.path[md]->src, FALSE);
+ cmp = H5T_cmp(src, H5T_g.path[md]->src, false);
if (0 == cmp)
- cmp = H5T_cmp(dst, H5T_g.path[md]->dst, FALSE);
+ cmp = H5T_cmp(dst, H5T_g.path[md]->dst, false);
if (cmp < 0)
rt = md;
else if (cmp > 0)
@@ -5125,11 +5123,11 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
/* Set the flag to indicate both source and destination types are compound types
* for the optimization of data reading (in H5Dio.c).
- * Make sure that path->are_compounds is only TRUE for compound types.
+ * Make sure that path->are_compounds is only true for compound types.
*/
- path->are_compounds = FALSE;
- if (H5T_COMPOUND == H5T_get_class(src, TRUE) && H5T_COMPOUND == H5T_get_class(dst, TRUE))
- path->are_compounds = TRUE;
+ path->are_compounds = false;
+ if (H5T_COMPOUND == H5T_get_class(src, true) && H5T_COMPOUND == H5T_get_class(dst, true))
+ path->are_compounds = true;
/* Set return value */
ret_value = path;
@@ -5158,18 +5156,18 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
* path in a multi-threaded application if one thread is using
* the no-op path when some other thread changes its definition.
*
- * Return: TRUE/FALSE (can't fail)
+ * Return: true/false (can't fail)
*
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
H5T_path_noop(const H5T_path_t *p)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
assert(p);
- FUNC_LEAVE_NOAPI(p->is_noop || (p->is_hard && 0 == H5T_cmp(p->src, p->dst, FALSE)))
+ FUNC_LEAVE_NOAPI(p->is_noop || (p->is_hard && 0 == H5T_cmp(p->src, p->dst, false)))
} /* end H5T_path_noop() */
/*-------------------------------------------------------------------------
@@ -5233,8 +5231,8 @@ H5T_path_bkg(const H5T_path_t *p)
* library's conversion function from type SRC to type DST
* is a hard conversion.
*
- * Return: TRUE: hard conversion.
- * FALSE: soft conversion.
+ * Return: true: hard conversion.
+ * false: soft conversion.
* FAIL: function failed.
*
*-------------------------------------------------------------------------
@@ -5394,23 +5392,23 @@ H5T_nameof(H5T_t *dt)
*
* Purpose: Check if a datatype is immutable.
*
- * Return: TRUE
+ * Return: true
*
- * FALSE
+ * false
*
*-------------------------------------------------------------------------
*/
htri_t
H5T_is_immutable(const H5T_t *dt)
{
- htri_t ret_value = FALSE;
+ htri_t ret_value = false;
FUNC_ENTER_NOAPI_NOERR
assert(dt);
if (dt->shared->state == H5T_STATE_IMMUTABLE)
- ret_value = TRUE;
+ ret_value = true;
FUNC_LEAVE_NOAPI(ret_value)
}
@@ -5420,21 +5418,21 @@ H5T_is_immutable(const H5T_t *dt)
*
* Purpose: Check if a datatype is named/committed.
*
- * Return: TRUE/FALSE/FAIL
+ * Return: true/false/FAIL
*
*-------------------------------------------------------------------------
*/
htri_t
H5T_is_named(const H5T_t *dt)
{
- htri_t ret_value = FALSE;
+ htri_t ret_value = false;
FUNC_ENTER_NOAPI_NOERR
assert(dt);
if (dt->vol_obj)
- ret_value = TRUE;
+ ret_value = true;
else
ret_value = (H5T_STATE_OPEN == dt->shared->state || H5T_STATE_NAMED == dt->shared->state);
@@ -5529,7 +5527,7 @@ H5T_get_ref_type(const H5T_t *dt)
* Purpose: Determines if a data type is sensible to store on disk
* (i.e. not partially initialized)
*
- * Return: Success: TRUE, FALSE
+ * Return: Success: true, false
*
* Failure: Negative
*
@@ -5548,17 +5546,17 @@ H5T_is_sensible(const H5T_t *dt)
case H5T_COMPOUND:
/* Only allow compound datatypes with at least one member to be stored on disk */
if (dt->shared->u.compnd.nmembs > 0)
- ret_value = TRUE;
+ ret_value = true;
else
- ret_value = FALSE;
+ ret_value = false;
break;
case H5T_ENUM:
/* Only allow enum datatypes with at least one member to be stored on disk */
if (dt->shared->u.enumer.nmembs > 0)
- ret_value = TRUE;
+ ret_value = true;
else
- ret_value = FALSE;
+ ret_value = false;
break;
case H5T_NO_CLASS:
@@ -5574,7 +5572,7 @@ H5T_is_sensible(const H5T_t *dt)
case H5T_NCLASSES:
default:
/* Assume all other datatype are sensible to store on disk */
- ret_value = TRUE;
+ ret_value = true;
break;
} /* end switch */
@@ -5594,8 +5592,8 @@ H5T_is_sensible(const H5T_t *dt)
RETURNS
One of two values on success:
- TRUE - If the location of any vlen types changed
- FALSE - If the location of any vlen types is the same
+ true - If the location of any vlen types changed
+ false - If the location of any vlen types is the same
<0 is returned on failure
DESCRIPTION
Recursively descends any VL or compound datatypes to mark all VL datatypes
@@ -5756,8 +5754,8 @@ H5T_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
*
* Return:
* One of two values on success:
- * TRUE - If the location of any vlen types changed
- * FALSE - If the location of any vlen types is the same
+ * true - If the location of any vlen types changed
+ * false - If the location of any vlen types is the same
* <0 is returned on failure
*
*-------------------------------------------------------------------------
@@ -5765,7 +5763,7 @@ H5T_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
htri_t
H5T_is_relocatable(const H5T_t *dt)
{
- htri_t ret_value = FALSE;
+ htri_t ret_value = false;
FUNC_ENTER_NOAPI_NOERR
@@ -5773,8 +5771,8 @@ H5T_is_relocatable(const H5T_t *dt)
assert(dt);
/* VL and reference datatypes are relocatable */
- if (H5T_detect_class(dt, H5T_VLEN, FALSE) || H5T_detect_class(dt, H5T_REFERENCE, FALSE))
- ret_value = TRUE;
+ if (H5T_detect_class(dt, H5T_VLEN, false) || H5T_detect_class(dt, H5T_REFERENCE, false))
+ ret_value = true;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_is_relocatable() */
@@ -5785,16 +5783,16 @@ H5T_is_relocatable(const H5T_t *dt)
* Purpose: Check whether a datatype contains (or is) a vlen reference
* datatype.
*
- * Return: TRUE (1) or FALSE (0) on success
+ * Return: true (1) or false (0) on success
* (Can't fail)
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
H5T__detect_vlen_ref(const H5T_t *dt)
{
unsigned u; /* Local index variable */
- hbool_t ret_value = FALSE; /* Return value */
+ bool ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -5804,7 +5802,7 @@ H5T__detect_vlen_ref(const H5T_t *dt)
/* Check if this datatype is a vlen reference */
/* TODO currently H5T_STD_REF is always considered as a vlen type */
if (H5T_REFERENCE == dt->shared->type && !dt->shared->u.atomic.u.r.opaque)
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
/* Check for types that might have the correct type as a component */
switch (dt->shared->type) {
@@ -5813,7 +5811,7 @@ H5T__detect_vlen_ref(const H5T_t *dt)
for (u = 0; u < dt->shared->u.compnd.nmembs; u++)
/* Recurse on field's datatype */
if (H5T__detect_vlen_ref(dt->shared->u.compnd.memb[u].type))
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
break;
case H5T_ARRAY:
@@ -5849,8 +5847,8 @@ H5T__detect_vlen_ref(const H5T_t *dt)
*
* Return:
* One of two values on success:
- * TRUE - If the datatype will be stored in a variable-length form
- * FALSE - If the datatype will NOT be stored in a variable-length form
+ * true - If the datatype will be stored in a variable-length form
+ * false - If the datatype will NOT be stored in a variable-length form
* <0 is returned on failure
*
*-------------------------------------------------------------------------
@@ -5858,7 +5856,7 @@ H5T__detect_vlen_ref(const H5T_t *dt)
htri_t
H5T_is_vl_storage(const H5T_t *dt)
{
- htri_t ret_value = FALSE;
+ htri_t ret_value = false;
FUNC_ENTER_NOAPI_NOERR
@@ -5866,12 +5864,12 @@ H5T_is_vl_storage(const H5T_t *dt)
assert(dt);
/* VL and region reference datatypes are stored in variable-length form */
- if (H5T_detect_class(dt, H5T_VLEN, FALSE))
- ret_value = TRUE;
- else if (H5T_detect_class(dt, H5T_REFERENCE, FALSE))
+ if (H5T_detect_class(dt, H5T_VLEN, false))
+ ret_value = true;
+ else if (H5T_detect_class(dt, H5T_REFERENCE, false))
ret_value = H5T__detect_vlen_ref(dt);
else
- ret_value = FALSE;
+ ret_value = false;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_is_vl_storage() */
diff --git a/src/H5TS.c b/src/H5TS.c
index 52cb1cef87c..8aadd904c34 100644
--- a/src/H5TS.c
+++ b/src/H5TS.c
@@ -792,7 +792,7 @@ H5TS_cancel_count_dec(void)
H5_DLL BOOL CALLBACK
H5TS_win32_process_enter(PINIT_ONCE InitOnce, PVOID Parameter, PVOID *lpContex)
{
- BOOL ret_value = TRUE;
+ BOOL ret_value = true;
FUNC_ENTER_NOAPI_NAMECHECK_ONLY
@@ -801,15 +801,15 @@ H5TS_win32_process_enter(PINIT_ONCE InitOnce, PVOID Parameter, PVOID *lpContex)
/* Set up thread local storage */
if (TLS_OUT_OF_INDEXES == (H5TS_errstk_key_g = TlsAlloc()))
- ret_value = FALSE;
+ ret_value = false;
#ifdef H5_HAVE_CODESTACK
if (TLS_OUT_OF_INDEXES == (H5TS_funcstk_key_g = TlsAlloc()))
- ret_value = FALSE;
+ ret_value = false;
#endif /* H5_HAVE_CODESTACK */
if (TLS_OUT_OF_INDEXES == (H5TS_apictx_key_g = TlsAlloc()))
- ret_value = FALSE;
+ ret_value = false;
FUNC_LEAVE_NOAPI_NAMECHECK_ONLY(ret_value)
} /* H5TS_win32_process_enter() */
diff --git a/src/H5Tarray.c b/src/H5Tarray.c
index 2c3d7c18d16..423baf9d209 100644
--- a/src/H5Tarray.c
+++ b/src/H5Tarray.c
@@ -104,7 +104,7 @@ H5Tarray_create2(hid_t base_id, unsigned ndims, const hsize_t dim[/* ndims */])
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to create datatype");
/* Register the type */
- if ((ret_value = H5I_register(H5I_DATATYPE, dt, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_DATATYPE, dt, true)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register datatype");
done:
@@ -163,8 +163,8 @@ H5T__array_create(H5T_t *base, unsigned ndims, const hsize_t dim[/* ndims */])
ret_value->shared->size = ret_value->shared->parent->shared->size * ret_value->shared->u.array.nelem;
/* Set the "force conversion" flag if the base datatype indicates */
- if (base->shared->force_conv == TRUE)
- ret_value->shared->force_conv = TRUE;
+ if (base->shared->force_conv == true)
+ ret_value->shared->force_conv = true;
/* Array datatypes need a later version of the datatype object header message */
ret_value->shared->version = MAX(base->shared->version, H5O_DTYPE_VERSION_2);
@@ -336,7 +336,7 @@ H5Tarray_create1(hid_t base_id, int ndims, const hsize_t dim[/* ndims */],
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to create datatype");
/* Register the type */
- if ((ret_value = H5I_register(H5I_DATATYPE, dt, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_DATATYPE, dt, true)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register datatype");
done:
diff --git a/src/H5Tbit.c b/src/H5Tbit.c
index 29d5347ae77..dd852a6b3dd 100644
--- a/src/H5Tbit.c
+++ b/src/H5Tbit.c
@@ -324,7 +324,7 @@ H5T__bit_set_d(uint8_t *buf, size_t offset, size_t size, uint64_t val)
*-------------------------------------------------------------------------
*/
void
-H5T__bit_set(uint8_t *buf, size_t offset, size_t size, hbool_t value)
+H5T__bit_set(uint8_t *buf, size_t offset, size_t size, bool value)
{
int idx;
@@ -383,7 +383,7 @@ H5T__bit_set(uint8_t *buf, size_t offset, size_t size, hbool_t value)
*-------------------------------------------------------------------------
*/
ssize_t
-H5T__bit_find(const uint8_t *buf, size_t offset, size_t size, H5T_sdir_t direction, hbool_t value)
+H5T__bit_find(const uint8_t *buf, size_t offset, size_t size, H5T_sdir_t direction, bool value)
{
ssize_t base = (ssize_t)offset;
ssize_t idx, i;
@@ -393,8 +393,8 @@ H5T__bit_find(const uint8_t *buf, size_t offset, size_t size, H5T_sdir_t directi
/* Use FUNC_ENTER_PACKAGE_NOERR here to avoid performance issues */
FUNC_ENTER_PACKAGE_NOERR
- /* Some functions call this with value=TRUE */
- assert(TRUE == 1);
+ /* Some functions call this with value=true */
+ assert(true == 1);
switch (direction) {
case H5T_BIT_LSB:
@@ -405,7 +405,7 @@ H5T__bit_find(const uint8_t *buf, size_t offset, size_t size, H5T_sdir_t directi
/* Beginning */
if (offset) {
for (iu = offset; iu < 8 && size > 0; iu++, size--)
- if (value == (hbool_t)((buf[idx] >> iu) & 0x01))
+ if (value == (bool)((buf[idx] >> iu) & 0x01))
HGOTO_DONE(8 * idx + (ssize_t)iu - base);
offset = 0;
@@ -416,7 +416,7 @@ H5T__bit_find(const uint8_t *buf, size_t offset, size_t size, H5T_sdir_t directi
while (size >= 8) {
if ((value ? 0x00 : 0xff) != buf[idx])
for (i = 0; i < 8; i++)
- if (value == (hbool_t)((buf[idx] >> i) & 0x01))
+ if (value == (bool)((buf[idx] >> i) & 0x01))
HGOTO_DONE(8 * idx + i - base);
size -= 8;
@@ -425,7 +425,7 @@ H5T__bit_find(const uint8_t *buf, size_t offset, size_t size, H5T_sdir_t directi
/* End */
for (i = 0; i < (ssize_t)size; i++)
- if (value == (hbool_t)((buf[idx] >> i) & 0x01))
+ if (value == (bool)((buf[idx] >> i) & 0x01))
HGOTO_DONE(8 * idx + i - base);
break;
@@ -437,7 +437,7 @@ H5T__bit_find(const uint8_t *buf, size_t offset, size_t size, H5T_sdir_t directi
/* Beginning */
if (size > 8 - offset && (offset + size) % 8) {
for (iu = (offset + size) % 8; iu > 0; --iu, --size)
- if (value == (hbool_t)((buf[idx] >> (iu - 1)) & 0x01))
+ if (value == (bool)((buf[idx] >> (iu - 1)) & 0x01))
HGOTO_DONE(8 * idx + (ssize_t)(iu - 1) - base);
--idx;
@@ -447,7 +447,7 @@ H5T__bit_find(const uint8_t *buf, size_t offset, size_t size, H5T_sdir_t directi
while (size >= 8) {
if ((value ? 0x00 : 0xff) != buf[idx]) {
for (i = 7; i >= 0; --i)
- if (value == (hbool_t)((buf[idx] >> i) & 0x01))
+ if (value == (bool)((buf[idx] >> i) & 0x01))
HGOTO_DONE(8 * idx + i - base);
} /* end if */
@@ -458,7 +458,7 @@ H5T__bit_find(const uint8_t *buf, size_t offset, size_t size, H5T_sdir_t directi
/* End */
if (size > 0) {
for (iu = offset + size; iu > offset; --iu)
- if (value == (hbool_t)((buf[idx] >> (iu - 1)) & 0x01))
+ if (value == (bool)((buf[idx] >> (iu - 1)) & 0x01))
HGOTO_DONE(8 * idx + (ssize_t)(iu - 1) - base);
}
break;
@@ -477,11 +477,11 @@ H5T__bit_find(const uint8_t *buf, size_t offset, size_t size, H5T_sdir_t directi
* Purpose: Increment part of a bit field by adding 1. The bit field
* starts with bit position START and is SIZE bits long.
*
- * Return: The carry-out value. TRUE if overflows, FALSE otherwise.
+ * Return: The carry-out value. true if overflows, false otherwise.
*
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
H5T__bit_inc(uint8_t *buf, size_t start, size_t size)
{
size_t idx = start / 8;
@@ -531,7 +531,7 @@ H5T__bit_inc(uint8_t *buf, size_t start, size_t size)
buf[idx] |= (uint8_t)(acc & mask);
}
- FUNC_LEAVE_NOAPI(carry ? TRUE : FALSE)
+ FUNC_LEAVE_NOAPI(carry ? true : false)
} /* end H5T__bit_inc() */
/*-------------------------------------------------------------------------
@@ -540,12 +540,12 @@ H5T__bit_inc(uint8_t *buf, size_t start, size_t size)
* Purpose: Decrement part of a bit field by subtracting 1. The bit
* field starts with bit position START and is SIZE bits long.
*
- * Return: The "borrow-in" value. It's TRUE if underflows, FALSE
+ * Return: The "borrow-in" value. It's true if underflows, false
* otherwise.
*
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
H5T__bit_dec(uint8_t *buf, size_t start, size_t size)
{
size_t idx = start / 8;
@@ -608,7 +608,7 @@ H5T__bit_dec(uint8_t *buf, size_t start, size_t size)
}
}
- FUNC_LEAVE_NOAPI(borrow ? TRUE : FALSE)
+ FUNC_LEAVE_NOAPI(borrow ? true : false)
} /* end H5T__bit_dec() */
/*-------------------------------------------------------------------------
diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c
index a812dd7235f..70b0930fa90 100644
--- a/src/H5Tcommit.c
+++ b/src/H5Tcommit.c
@@ -120,20 +120,20 @@ H5T__commit_api_common(hid_t loc_id, const char *name, hid_t type_id, hid_t lcpl
/* Get correct property list */
if (H5P_DEFAULT == lcpl_id)
lcpl_id = H5P_LINK_CREATE_DEFAULT;
- else if (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE))
+ else if (true != H5P_isa_class(lcpl_id, H5P_LINK_CREATE))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link creation property list");
/* Get correct property list */
if (H5P_DEFAULT == tcpl_id)
tcpl_id = H5P_DATATYPE_CREATE_DEFAULT;
- else if (TRUE != H5P_isa_class(tcpl_id, H5P_DATATYPE_CREATE))
+ else if (true != H5P_isa_class(tcpl_id, H5P_DATATYPE_CREATE))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not datatype creation property list");
/* Set the LCPL for the API context */
H5CX_set_lcpl(lcpl_id);
/* Set up object access arguments */
- if (H5VL_setup_acc_args(loc_id, H5P_CLS_TACC, TRUE, &tapl_id, vol_obj_ptr, &loc_params) < 0)
+ if (H5VL_setup_acc_args(loc_id, H5P_CLS_TACC, true, &tapl_id, vol_obj_ptr, &loc_params) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set object access arguments");
/* Commit the type */
@@ -336,16 +336,16 @@ H5Tcommit_anon(hid_t loc_id, hid_t type_id, hid_t tcpl_id, hid_t tapl_id)
/* Get correct property list */
if (H5P_DEFAULT == tcpl_id)
tcpl_id = H5P_DATATYPE_CREATE_DEFAULT;
- else if (TRUE != H5P_isa_class(tcpl_id, H5P_DATATYPE_CREATE))
+ else if (true != H5P_isa_class(tcpl_id, H5P_DATATYPE_CREATE))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not datatype creation property list");
if (H5P_DEFAULT == tapl_id)
tapl_id = H5P_DATATYPE_ACCESS_DEFAULT;
- else if (TRUE != H5P_isa_class(tapl_id, H5P_DATATYPE_ACCESS))
+ else if (true != H5P_isa_class(tapl_id, H5P_DATATYPE_ACCESS))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not datatype access property list");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&tapl_id, H5P_CLS_TACC, loc_id, TRUE) < 0)
+ if (H5CX_set_apl(&tapl_id, H5P_CLS_TACC, loc_id, true) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set access property list info");
/* Fill in location struct fields */
@@ -427,7 +427,7 @@ H5T__commit(H5F_t *file, H5T_t *type, hid_t tcpl_id)
{
H5O_loc_t temp_oloc; /* Temporary object header location */
H5G_name_t temp_path; /* Temporary path */
- hbool_t loc_init = FALSE; /* Have temp_oloc and temp_path been initialized? */
+ bool loc_init = false; /* Have temp_oloc and temp_path been initialized? */
size_t dtype_size; /* Size of the datatype message */
herr_t ret_value = SUCCEED; /* Return value */
@@ -466,7 +466,7 @@ H5T__commit(H5F_t *file, H5T_t *type, hid_t tcpl_id)
HGOTO_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "unable to initialize location");
if (H5G_name_reset(&temp_path) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "unable to initialize path");
- loc_init = TRUE;
+ loc_init = true;
/* Set the version for datatype */
if (H5T_set_version(file, type) < 0)
@@ -491,7 +491,7 @@ H5T__commit(H5F_t *file, H5T_t *type, hid_t tcpl_id)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy datatype location");
if (H5G_name_copy(&(type->path), &temp_path, H5_COPY_SHALLOW) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy datatype location");
- loc_init = FALSE;
+ loc_init = false;
/* Set the shared info fields */
H5T_update_shared(type);
@@ -501,7 +501,7 @@ H5T__commit(H5F_t *file, H5T_t *type, hid_t tcpl_id)
/* Add datatype to the list of open objects in the file */
if (H5FO_top_incr(type->sh_loc.file, type->sh_loc.u.loc.oh_addr) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINC, FAIL, "can't incr object ref. count");
- if (H5FO_insert(type->sh_loc.file, type->sh_loc.u.loc.oh_addr, type->shared, TRUE) < 0)
+ if (H5FO_insert(type->sh_loc.file, type->sh_loc.u.loc.oh_addr, type->shared, true) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINSERT, FAIL, "can't insert datatype into list of open objects");
/* Mark datatype as being on memory again. Since this datatype may still be
@@ -537,7 +537,7 @@ H5T__commit(H5F_t *file, H5T_t *type, hid_t tcpl_id)
*
* Purpose: Determines if a datatype is committed or not.
*
- * Return: TRUE/FALSE/Negative
+ * Return: true/false/Negative
*
*-------------------------------------------------------------------------
*/
@@ -621,7 +621,7 @@ H5T__open_api_common(hid_t loc_id, const char *name, hid_t tapl_id, void **token
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be an empty string");
/* Set up object access arguments */
- if (H5VL_setup_acc_args(loc_id, H5P_CLS_TACC, FALSE, &tapl_id, vol_obj_ptr, &loc_params) < 0)
+ if (H5VL_setup_acc_args(loc_id, H5P_CLS_TACC, false, &tapl_id, vol_obj_ptr, &loc_params) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments");
/* Open the datatype */
@@ -630,7 +630,7 @@ H5T__open_api_common(hid_t loc_id, const char *name, hid_t tapl_id, void **token
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open named datatype");
/* Register the type and return the ID */
- if ((ret_value = H5VL_register(H5I_DATATYPE, dt, (*vol_obj_ptr)->connector, TRUE)) < 0)
+ if ((ret_value = H5VL_register(H5I_DATATYPE, dt, (*vol_obj_ptr)->connector, true)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register named datatype");
done:
@@ -755,13 +755,13 @@ H5Tget_create_plist(hid_t dtype_id)
/* If the datatype is not committed/named, just copy the default
* creation property list and return that.
*/
- if (FALSE == is_named) {
+ if (false == is_named) {
H5P_genplist_t *tcpl_plist = NULL;
/* Copy the default datatype creation property list */
if (NULL == (tcpl_plist = (H5P_genplist_t *)H5I_object(H5P_LST_DATATYPE_CREATE_ID_g)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "can't get default creation property list");
- if ((ret_value = H5P_copy_plist(tcpl_plist, TRUE)) < 0)
+ if ((ret_value = H5P_copy_plist(tcpl_plist, true)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, H5I_INVALID_HID,
"unable to copy the creation property list");
} /* end if */
@@ -906,7 +906,7 @@ H5T__get_create_plist(const H5T_t *type)
/* Copy the default datatype creation property list */
if (NULL == (tcpl_plist = (H5P_genplist_t *)H5I_object(H5P_LST_DATATYPE_CREATE_ID_g)))
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, H5I_INVALID_HID, "can't get default creation property list");
- if ((new_tcpl_id = H5P_copy_plist(tcpl_plist, TRUE)) < 0)
+ if ((new_tcpl_id = H5P_copy_plist(tcpl_plist, true)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, H5I_INVALID_HID, "unable to copy the creation property list");
/* Get property list object for new TCPL */
@@ -947,7 +947,7 @@ H5T__open_name(const H5G_loc_t *loc, const char *name)
H5O_loc_t oloc; /* Datatype object location */
H5G_loc_t type_loc; /* Group object for datatype */
H5O_type_t obj_type; /* Type of object at location */
- hbool_t obj_found = FALSE; /* Object at 'name' found */
+ bool obj_found = false; /* Object at 'name' found */
H5T_t *ret_value = NULL; /* Return value */
FUNC_ENTER_PACKAGE
@@ -967,7 +967,7 @@ H5T__open_name(const H5G_loc_t *loc, const char *name)
*/
if (H5G_loc_find(loc, name, &type_loc /*out*/) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_NOTFOUND, NULL, "not found");
- obj_found = TRUE;
+ obj_found = true;
/* Check that the object found is the correct type */
if (H5O_obj_type(&oloc, &obj_type) < 0)
@@ -1023,7 +1023,7 @@ H5T_open(const H5G_loc_t *loc)
HGOTO_ERROR(H5E_DATATYPE, H5E_NOTFOUND, NULL, "not found");
/* Add the datatype to the list of opened objects in the file */
- if (H5FO_insert(dt->sh_loc.file, dt->sh_loc.u.loc.oh_addr, dt->shared, FALSE) < 0)
+ if (H5FO_insert(dt->sh_loc.file, dt->sh_loc.u.loc.oh_addr, dt->shared, false) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINSERT, NULL,
"can't insert datatype into list of open objects");
@@ -1378,11 +1378,11 @@ H5T_restore_refresh_state(hid_t tid, H5O_shared_t *cached_H5O_shared)
*
* Purpose: Check if the committed datatype is already VOL managed
*
- * Return: TRUE / FALSE
+ * Return: true / false
*
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
H5T_already_vol_managed(const H5T_t *dt)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
diff --git a/src/H5Tcompound.c b/src/H5Tcompound.c
index 725525bb776..f877d5263ae 100644
--- a/src/H5Tcompound.c
+++ b/src/H5Tcompound.c
@@ -159,7 +159,7 @@ H5Tget_member_class(hid_t type_id, unsigned membno)
/* Get the type's class. We have to use this function to get type class
* because of the concern of variable-length string.
*/
- ret_value = H5T_GET_CLASS(dt->shared->u.compnd.memb[membno].type->shared, FALSE);
+ ret_value = H5T_GET_CLASS(dt->shared->u.compnd.memb[membno].type->shared, false);
done:
FUNC_LEAVE_API(ret_value)
@@ -201,7 +201,7 @@ H5Tget_member_type(hid_t type_id, unsigned membno)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5I_INVALID_HID, "unable to retrieve member type");
/* Get an ID for the datatype */
- if ((ret_value = H5I_register(H5I_DATATYPE, memb_dt, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_DATATYPE, memb_dt, true)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable register datatype ID");
done:
@@ -369,7 +369,7 @@ H5Tpack(hid_t type_id)
/* Check args */
if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)) ||
- H5T_detect_class(dt, H5T_COMPOUND, TRUE) <= 0)
+ H5T_detect_class(dt, H5T_COMPOUND, true) <= 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a compound datatype");
/* Pack */
@@ -410,7 +410,7 @@ H5T__insert(H5T_t *parent, const char *name, size_t offset, const H5T_t *member)
/* Does NAME already exist in PARENT? */
for (i = 0; i < parent->shared->u.compnd.nmembs; i++)
- if (!HDstrcmp(parent->shared->u.compnd.memb[i].name, name))
+ if (!strcmp(parent->shared->u.compnd.memb[i].name, name))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINSERT, FAIL, "member name is not unique");
/* Does the new member overlap any existing member ? */
@@ -458,8 +458,8 @@ H5T__insert(H5T_t *parent, const char *name, size_t offset, const H5T_t *member)
H5T__update_packed(parent);
/* Set the "force conversion" flag if the field's datatype indicates */
- if (member->shared->force_conv == TRUE)
- parent->shared->force_conv = TRUE;
+ if (member->shared->force_conv == true)
+ parent->shared->force_conv = true;
/* Check for member having a later version than the parent */
if (parent->shared->version < member->shared->version)
@@ -493,9 +493,9 @@ H5T__pack(const H5T_t *dt)
assert(dt);
- if (H5T_detect_class(dt, H5T_COMPOUND, FALSE) > 0) {
+ if (H5T_detect_class(dt, H5T_COMPOUND, false) > 0) {
/* If datatype has been packed, skip packing it and indicate success */
- if (TRUE == H5T__is_packed(dt))
+ if (true == H5T__is_packed(dt))
HGOTO_DONE(SUCCEED);
/* Check for packing unmodifiable datatype */
@@ -538,7 +538,7 @@ H5T__pack(const H5T_t *dt)
dt->shared->size = MAX(1, offset);
/* Mark the type as packed now */
- dt->shared->u.compnd.packed = TRUE;
+ dt->shared->u.compnd.packed = true;
} /* end if */
} /* end if */
@@ -559,7 +559,7 @@ H5T__pack(const H5T_t *dt)
static htri_t
H5T__is_packed(const H5T_t *dt)
{
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -600,18 +600,18 @@ H5T__update_packed(const H5T_t *dt)
/* First check if all space is used in the "top level" type */
if (dt->shared->size == dt->shared->u.compnd.memb_size) {
- /* Set the packed flag to TRUE */
- dt->shared->u.compnd.packed = TRUE;
+ /* Set the packed flag to true */
+ dt->shared->u.compnd.packed = true;
/* Now check if all members are packed */
for (i = 0; i < dt->shared->u.compnd.nmembs; i++)
if (!H5T__is_packed(dt->shared->u.compnd.memb[i].type)) {
- dt->shared->u.compnd.packed = FALSE;
+ dt->shared->u.compnd.packed = false;
break;
} /* end if */
} /* end if */
else
- dt->shared->u.compnd.packed = FALSE;
+ dt->shared->u.compnd.packed = false;
FUNC_LEAVE_NOAPI_VOID
} /* end H5T__update_packed() */
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index daa282cd741..72debe8d200 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -718,7 +718,7 @@
H5T_t *st, *dt; /*datatype descriptors */ \
ST src_aligned; /*source aligned type */ \
DT dst_aligned; /*destination aligned type */ \
- hbool_t s_mv, d_mv; /*move data to align it? */ \
+ bool s_mv, d_mv; /*move data to align it? */ \
ssize_t s_stride, d_stride; /*src and dst strides */ \
size_t safe; /*how many elements are safe to process in each pass */ \
H5T_conv_cb_t cb_struct; /*conversion callback structure */ \
@@ -1681,7 +1681,7 @@ H5T__conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
uint8_t *src_rev = NULL; /*order-reversed source buffer */
H5T_conv_cb_t cb_struct = {NULL, NULL}; /*conversion callback structure */
H5T_conv_ret_t except_ret; /*return of callback function */
- hbool_t reverse; /*if reverse the order of destination */
+ bool reverse; /*if reverse the order of destination */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1718,7 +1718,7 @@ H5T__conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
}
else if (src->shared->size >= dst->shared->size) {
double olap_d =
- HDceil((double)(dst->shared->size) / (double)(src->shared->size - dst->shared->size));
+ ceil((double)(dst->shared->size) / (double)(src->shared->size - dst->shared->size));
olap = (size_t)olap_d;
sp = dp = (uint8_t *)buf;
@@ -1726,7 +1726,7 @@ H5T__conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
}
else {
double olap_d =
- HDceil((double)(src->shared->size) / (double)(dst->shared->size - src->shared->size));
+ ceil((double)(src->shared->size) / (double)(dst->shared->size - src->shared->size));
olap = (size_t)olap_d;
sp = (uint8_t *)buf + (nelmts - 1) * src->shared->size;
dp = (uint8_t *)buf + (nelmts - 1) * dst->shared->size;
@@ -1784,7 +1784,7 @@ H5T__conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
/* Initiate these variables */
except_ret = H5T_CONV_UNHANDLED;
- reverse = TRUE;
+ reverse = true;
/*
* Copy the significant part of the value. If the source is larger
@@ -1808,13 +1808,13 @@ H5T__conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception");
else if (except_ret == H5T_CONV_HANDLED)
/*Don't reverse because user handles it*/
- reverse = FALSE;
+ reverse = false;
}
else {
H5T__bit_copy(d, dst->shared->u.atomic.offset, s, src->shared->u.atomic.offset,
src->shared->u.atomic.prec);
H5T__bit_set(d, dst->shared->u.atomic.offset + src->shared->u.atomic.prec,
- dst->shared->u.atomic.prec - src->shared->u.atomic.prec, FALSE);
+ dst->shared->u.atomic.prec - src->shared->u.atomic.prec, false);
}
/*
@@ -1822,11 +1822,11 @@ H5T__conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
*/
switch (dst->shared->u.atomic.lsb_pad) {
case H5T_PAD_ZERO:
- H5T__bit_set(d, (size_t)0, dst->shared->u.atomic.offset, FALSE);
+ H5T__bit_set(d, (size_t)0, dst->shared->u.atomic.offset, false);
break;
case H5T_PAD_ONE:
- H5T__bit_set(d, (size_t)0, dst->shared->u.atomic.offset, TRUE);
+ H5T__bit_set(d, (size_t)0, dst->shared->u.atomic.offset, true);
break;
case H5T_PAD_ERROR:
@@ -1838,11 +1838,11 @@ H5T__conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
msb_pad_offset = dst->shared->u.atomic.offset + dst->shared->u.atomic.prec;
switch (dst->shared->u.atomic.msb_pad) {
case H5T_PAD_ZERO:
- H5T__bit_set(d, msb_pad_offset, 8 * dst->shared->size - msb_pad_offset, FALSE);
+ H5T__bit_set(d, msb_pad_offset, 8 * dst->shared->size - msb_pad_offset, false);
break;
case H5T_PAD_ONE:
- H5T__bit_set(d, msb_pad_offset, 8 * dst->shared->size - msb_pad_offset, TRUE);
+ H5T__bit_set(d, msb_pad_offset, 8 * dst->shared->size - msb_pad_offset, true);
break;
case H5T_PAD_ERROR:
@@ -2006,7 +2006,7 @@ H5T__conv_struct_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
priv->src_nmembs = src_nmembs;
/* The flag of special optimization to indicate if source members and destination
- * members are a subset of each other. Initialize it to FALSE */
+ * members are a subset of each other. Initialize it to false */
priv->subset_info.subset = H5T_SUBSET_FALSE;
priv->subset_info.copy_size = 0;
@@ -2026,7 +2026,7 @@ H5T__conv_struct_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
for (i = 0; i < src_nmembs; i++) {
src2dst[i] = -1;
for (j = 0; j < dst_nmembs; j++) {
- if (!HDstrcmp(src->shared->u.compnd.memb[i].name, dst->shared->u.compnd.memb[j].name)) {
+ if (!strcmp(src->shared->u.compnd.memb[i].name, dst->shared->u.compnd.memb[j].name)) {
H5_CHECKED_ASSIGN(src2dst[i], int, j, unsigned);
break;
} /* end if */
@@ -2036,12 +2036,12 @@ H5T__conv_struct_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
H5T_t *type;
type = H5T_copy(src->shared->u.compnd.memb[i].type, H5T_COPY_ALL);
- tid = H5I_register(H5I_DATATYPE, type, FALSE);
+ tid = H5I_register(H5I_DATATYPE, type, false);
assert(tid >= 0);
priv->src_memb_id[i] = tid;
type = H5T_copy(dst->shared->u.compnd.memb[src2dst[i]].type, H5T_COPY_ALL);
- tid = H5I_register(H5I_DATATYPE, type, FALSE);
+ tid = H5I_register(H5I_DATATYPE, type, false);
assert(tid >= 0);
priv->dst_memb_id[src2dst[i]] = tid;
} /* end if */
@@ -2088,7 +2088,7 @@ H5T__conv_struct_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
*/
if (src2dst[i] != (int)i ||
(src->shared->u.compnd.memb[i].offset != dst->shared->u.compnd.memb[i].offset) ||
- (priv->memb_path[i])->is_noop == FALSE) {
+ (priv->memb_path[i])->is_noop == false) {
priv->subset_info.subset = H5T_SUBSET_FALSE;
break;
} /* end if */
@@ -2108,7 +2108,7 @@ H5T__conv_struct_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
* there's conversion between members, don't do the optimization. */
if (src2dst[i] != (int)i ||
(src->shared->u.compnd.memb[i].offset != dst->shared->u.compnd.memb[i].offset) ||
- (priv->memb_path[i])->is_noop == FALSE) {
+ (priv->memb_path[i])->is_noop == false) {
priv->subset_info.subset = H5T_SUBSET_FALSE;
break;
}
@@ -2126,7 +2126,7 @@ H5T__conv_struct_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
{
}
- cdata->recalc = FALSE;
+ cdata->recalc = false;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -2432,7 +2432,7 @@ H5T__conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
size_t elmtno; /*element counter */
size_t copy_size; /*size of element for copying */
H5T_conv_struct_t *priv = NULL; /*private data */
- hbool_t no_stride = FALSE; /*flag to indicate no stride */
+ bool no_stride = false; /*flag to indicate no stride */
unsigned u; /*counters */
int i; /*counters */
herr_t ret_value = SUCCEED; /* Return value */
@@ -2538,7 +2538,7 @@ H5T__conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
if (!buf_stride || !bkg_stride)
bkg_stride = dst->shared->size;
if (!buf_stride) {
- no_stride = TRUE;
+ no_stride = true;
buf_stride = src->shared->size;
} /* end if */
@@ -2687,7 +2687,7 @@ H5T__conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed");
for (i = 0, j = 0; i < src->shared->u.enumer.nmembs && j < dst->shared->u.enumer.nmembs; i++, j++) {
while (j < dst->shared->u.enumer.nmembs &&
- HDstrcmp(src->shared->u.enumer.name[i], dst->shared->u.enumer.name[j]) != 0)
+ strcmp(src->shared->u.enumer.name[i], dst->shared->u.enumer.name[j]) != 0)
j++;
if (j >= dst->shared->u.enumer.nmembs)
HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL,
@@ -3034,7 +3034,7 @@ H5T__conv_enum_numeric(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
"unable to convert between src and dest datatype");
}
else if (!H5T_path_noop(tpath)) {
- if ((src_parent_id = H5I_register(H5I_DATATYPE, H5T_copy(src_parent, H5T_COPY_ALL), FALSE)) <
+ if ((src_parent_id = H5I_register(H5I_DATATYPE, H5T_copy(src_parent, H5T_COPY_ALL), false)) <
0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL,
"unable to register types for conversion");
@@ -3085,8 +3085,8 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
{
H5T_vlen_alloc_info_t vl_alloc_info; /* VL allocation info */
H5T_path_t *tpath = NULL; /* Type conversion path */
- hbool_t noop_conv = FALSE; /* Flag to indicate a noop conversion */
- hbool_t write_to_file = FALSE; /* Flag to indicate writing to file */
+ bool noop_conv = false; /* Flag to indicate a noop conversion */
+ bool write_to_file = false; /* Flag to indicate writing to file */
htri_t parent_is_vlen; /* Flag to indicate parent is vlen datatype */
size_t bg_seq_len = 0; /* The number of elements in the background sequence */
hid_t tsrc_id = -1, tdst_id = -1; /*temporary type atoms */
@@ -3103,7 +3103,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
size_t conv_buf_size = 0; /*size of conversion buffer in bytes */
void *tmp_buf = NULL; /*temporary background buffer */
size_t tmp_buf_size = 0; /*size of temporary bkg buffer */
- hbool_t nested = FALSE; /*flag of nested VL case */
+ bool nested = false; /*flag of nested VL case */
size_t elmtno; /*element number counter */
herr_t ret_value = SUCCEED; /* Return value */
@@ -3195,16 +3195,16 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
if (H5T_set_loc(tdst_cpy, dst->shared->u.vlen.file, dst->shared->u.vlen.loc) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set datatype location");
- if (((tsrc_id = H5I_register(H5I_DATATYPE, tsrc_cpy, FALSE)) < 0) ||
- ((tdst_id = H5I_register(H5I_DATATYPE, tdst_cpy, FALSE)) < 0))
+ if (((tsrc_id = H5I_register(H5I_DATATYPE, tsrc_cpy, false)) < 0) ||
+ ((tdst_id = H5I_register(H5I_DATATYPE, tdst_cpy, false)) < 0))
HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL,
"unable to register types for conversion");
} /* end else-if */
else
- noop_conv = TRUE;
+ noop_conv = true;
/* Check if we need a temporary buffer for this conversion */
- if ((parent_is_vlen = H5T_detect_class(dst->shared->parent, H5T_VLEN, FALSE)) < 0)
+ if ((parent_is_vlen = H5T_detect_class(dst->shared->parent, H5T_VLEN, false)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_SYSTEM, FAIL,
"internal error when detecting variable-length class");
if (tpath->cdata.need_bkg || parent_is_vlen) {
@@ -3221,11 +3221,11 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
/* Set flags to indicate we are writing to or reading from the file */
if (dst->shared->u.vlen.file != NULL)
- write_to_file = TRUE;
+ write_to_file = true;
/* Set the flag for nested VL case */
if (write_to_file && parent_is_vlen && bkg != NULL)
- nested = TRUE;
+ nested = true;
/* The outer loop of the type conversion macro, controlling which */
/* direction the buffer is walked */
@@ -3271,7 +3271,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
} /* end else */
for (elmtno = 0; elmtno < safe; elmtno++) {
- hbool_t is_nil; /* Whether sequence is "nil" */
+ bool is_nil; /* Whether sequence is "nil" */
/* Check for "nil" source sequence */
if ((*(src->shared->u.vlen.cls->isnull))(src->shared->u.vlen.file, s, &is_nil) < 0)
@@ -3540,9 +3540,9 @@ H5T__conv_array(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, s
}
else if (!H5T_path_noop(tpath)) {
if ((tsrc_id = H5I_register(H5I_DATATYPE, H5T_copy(src->shared->parent, H5T_COPY_ALL),
- FALSE)) < 0 ||
+ false)) < 0 ||
(tdst_id =
- H5I_register(H5I_DATATYPE, H5T_copy(dst->shared->parent, H5T_COPY_ALL), FALSE)) < 0)
+ H5I_register(H5I_DATATYPE, H5T_copy(dst->shared->parent, H5T_COPY_ALL), false)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL,
"unable to register types for conversion");
}
@@ -3722,9 +3722,9 @@ H5T__conv_ref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
} /* end else */
for (elmtno = 0; elmtno < safe; elmtno++) {
- size_t buf_size;
- hbool_t dst_copy = FALSE;
- hbool_t is_nil; /* Whether reference is "nil" */
+ size_t buf_size;
+ bool dst_copy = false;
+ bool is_nil; /* Whether reference is "nil" */
/* Check for "nil" source reference */
if ((*(src->shared->u.atomic.u.r.cls->isnull))(src->shared->u.atomic.u.r.file, s,
@@ -3833,7 +3833,7 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
size_t i; /*Local index variables */
H5T_conv_cb_t cb_struct = {NULL, NULL}; /*conversion callback structure */
H5T_conv_ret_t except_ret; /*return of callback function */
- hbool_t reverse; /*if reverse the order of destination */
+ bool reverse; /*if reverse the order of destination */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -3871,7 +3871,7 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
}
else if (src->shared->size >= dst->shared->size) {
double olap_d =
- HDceil((double)(dst->shared->size) / (double)(src->shared->size - dst->shared->size));
+ ceil((double)(dst->shared->size) / (double)(src->shared->size - dst->shared->size));
olap = (size_t)olap_d;
sp = dp = (uint8_t *)buf;
@@ -3879,7 +3879,7 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
}
else {
double olap_d =
- HDceil((double)(src->shared->size) / (double)(dst->shared->size - src->shared->size));
+ ceil((double)(src->shared->size) / (double)(dst->shared->size - src->shared->size));
olap = (size_t)olap_d;
sp = (uint8_t *)buf + (nelmts - 1) * src->shared->size;
dp = (uint8_t *)buf + (nelmts - 1) * dst->shared->size;
@@ -3948,19 +3948,19 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
* bit number is relative to the significant part of the number.
*/
sfirst = H5T__bit_find(s, src->shared->u.atomic.offset, src->shared->u.atomic.prec,
- H5T_BIT_MSB, TRUE);
+ H5T_BIT_MSB, true);
first = (size_t)sfirst;
/* Set these variables to default */
except_ret = H5T_CONV_UNHANDLED;
- reverse = TRUE;
+ reverse = true;
if (sfirst < 0) {
/*
* The source has no bits set and must therefore be zero.
* Set the destination to zero.
*/
- H5T__bit_set(d, dst->shared->u.atomic.offset, dst->shared->u.atomic.prec, FALSE);
+ H5T__bit_set(d, dst->shared->u.atomic.offset, dst->shared->u.atomic.prec, false);
}
else if (H5T_SGN_NONE == src->shared->u.atomic.u.i.sign &&
H5T_SGN_NONE == dst->shared->u.atomic.u.i.sign) {
@@ -3974,7 +3974,7 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
H5T__bit_copy(d, dst->shared->u.atomic.offset, s, src->shared->u.atomic.offset,
src->shared->u.atomic.prec);
H5T__bit_set(d, dst->shared->u.atomic.offset + src->shared->u.atomic.prec,
- dst->shared->u.atomic.prec - src->shared->u.atomic.prec, FALSE);
+ dst->shared->u.atomic.prec - src->shared->u.atomic.prec, false);
}
else if (first >= dst->shared->u.atomic.prec) {
/*overflow*/
@@ -3986,14 +3986,14 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
}
if (except_ret == H5T_CONV_UNHANDLED) {
- H5T__bit_set(d, dst->shared->u.atomic.offset, dst->shared->u.atomic.prec, TRUE);
+ H5T__bit_set(d, dst->shared->u.atomic.offset, dst->shared->u.atomic.prec, true);
}
else if (except_ret == H5T_CONV_ABORT)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL,
"can't handle conversion exception");
else if (except_ret == H5T_CONV_HANDLED)
/*Don't reverse because user handles it already*/
- reverse = FALSE;
+ reverse = false;
}
else {
H5T__bit_copy(d, dst->shared->u.atomic.offset, s, src->shared->u.atomic.offset,
@@ -4019,20 +4019,20 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
}
if (except_ret == H5T_CONV_UNHANDLED) {
- H5T__bit_set(d, dst->shared->u.atomic.offset, dst->shared->u.atomic.prec, FALSE);
+ H5T__bit_set(d, dst->shared->u.atomic.offset, dst->shared->u.atomic.prec, false);
}
else if (except_ret == H5T_CONV_ABORT)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL,
"can't handle conversion exception");
else if (except_ret == H5T_CONV_HANDLED)
/*Don't reverse because user handles it already*/
- reverse = FALSE;
+ reverse = false;
}
else if (src->shared->u.atomic.prec < dst->shared->u.atomic.prec) {
H5T__bit_copy(d, dst->shared->u.atomic.offset, s, src->shared->u.atomic.offset,
src->shared->u.atomic.prec - 1);
H5T__bit_set(d, dst->shared->u.atomic.offset + src->shared->u.atomic.prec - 1,
- (dst->shared->u.atomic.prec - src->shared->u.atomic.prec) + 1, FALSE);
+ (dst->shared->u.atomic.prec - src->shared->u.atomic.prec) + 1, false);
}
else if (first >= dst->shared->u.atomic.prec) {
/*overflow - source is positive*/
@@ -4044,13 +4044,13 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
}
if (except_ret == H5T_CONV_UNHANDLED)
- H5T__bit_set(d, dst->shared->u.atomic.offset, dst->shared->u.atomic.prec, TRUE);
+ H5T__bit_set(d, dst->shared->u.atomic.offset, dst->shared->u.atomic.prec, true);
else if (except_ret == H5T_CONV_ABORT)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL,
"can't handle conversion exception");
else if (except_ret == H5T_CONV_HANDLED)
/*Don't reverse because user handles it already*/
- reverse = FALSE;
+ reverse = false;
}
else {
H5T__bit_copy(d, dst->shared->u.atomic.offset, s, src->shared->u.atomic.offset,
@@ -4075,22 +4075,22 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
if (except_ret == H5T_CONV_UNHANDLED) {
H5T__bit_set(d, dst->shared->u.atomic.offset, dst->shared->u.atomic.prec - 1,
- TRUE);
+ true);
H5T__bit_set(d, (dst->shared->u.atomic.offset + dst->shared->u.atomic.prec - 1),
- (size_t)1, FALSE);
+ (size_t)1, false);
}
else if (except_ret == H5T_CONV_ABORT)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL,
"can't handle conversion exception");
else if (except_ret == H5T_CONV_HANDLED)
/*Don't reverse because user handles it already*/
- reverse = FALSE;
+ reverse = false;
}
else if (src->shared->u.atomic.prec < dst->shared->u.atomic.prec) {
H5T__bit_copy(d, dst->shared->u.atomic.offset, s, src->shared->u.atomic.offset,
src->shared->u.atomic.prec);
H5T__bit_set(d, dst->shared->u.atomic.offset + src->shared->u.atomic.prec,
- dst->shared->u.atomic.prec - src->shared->u.atomic.prec, FALSE);
+ dst->shared->u.atomic.prec - src->shared->u.atomic.prec, false);
}
else {
H5T__bit_copy(d, dst->shared->u.atomic.offset, s, src->shared->u.atomic.offset,
@@ -4106,7 +4106,7 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
* possible magnitude.
*/
ssize_t sfz = H5T__bit_find(s, src->shared->u.atomic.offset,
- src->shared->u.atomic.prec - 1, H5T_BIT_MSB, FALSE);
+ src->shared->u.atomic.prec - 1, H5T_BIT_MSB, false);
size_t fz = (size_t)sfz;
if (sfz >= 0 && fz + 1 >= dst->shared->u.atomic.prec) {
@@ -4120,22 +4120,22 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
if (except_ret == H5T_CONV_UNHANDLED) {
H5T__bit_set(d, dst->shared->u.atomic.offset, dst->shared->u.atomic.prec - 1,
- FALSE);
+ false);
H5T__bit_set(d, (dst->shared->u.atomic.offset + dst->shared->u.atomic.prec - 1),
- (size_t)1, TRUE);
+ (size_t)1, true);
}
else if (except_ret == H5T_CONV_ABORT)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL,
"can't handle conversion exception");
else if (except_ret == H5T_CONV_HANDLED)
/*Don't reverse because user handles it already*/
- reverse = FALSE;
+ reverse = false;
}
else if (src->shared->u.atomic.prec < dst->shared->u.atomic.prec) {
H5T__bit_copy(d, dst->shared->u.atomic.offset, s, src->shared->u.atomic.offset,
src->shared->u.atomic.prec);
H5T__bit_set(d, dst->shared->u.atomic.offset + src->shared->u.atomic.prec,
- dst->shared->u.atomic.prec - src->shared->u.atomic.prec, TRUE);
+ dst->shared->u.atomic.prec - src->shared->u.atomic.prec, true);
}
else {
H5T__bit_copy(d, dst->shared->u.atomic.offset, s, src->shared->u.atomic.offset,
@@ -4160,22 +4160,22 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
if (except_ret == H5T_CONV_UNHANDLED) {
H5T__bit_set(d, dst->shared->u.atomic.offset, dst->shared->u.atomic.prec - 1,
- TRUE);
+ true);
H5T__bit_set(d, (dst->shared->u.atomic.offset + dst->shared->u.atomic.prec - 1),
- (size_t)1, FALSE);
+ (size_t)1, false);
}
else if (except_ret == H5T_CONV_ABORT)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL,
"can't handle conversion exception");
else if (except_ret == H5T_CONV_HANDLED)
/*Don't reverse because user handles it already*/
- reverse = FALSE;
+ reverse = false;
}
else if (src->shared->u.atomic.prec < dst->shared->u.atomic.prec) {
H5T__bit_copy(d, dst->shared->u.atomic.offset, s, src->shared->u.atomic.offset,
src->shared->u.atomic.prec);
H5T__bit_set(d, dst->shared->u.atomic.offset + src->shared->u.atomic.prec,
- dst->shared->u.atomic.prec - src->shared->u.atomic.prec, FALSE);
+ dst->shared->u.atomic.prec - src->shared->u.atomic.prec, false);
}
else {
H5T__bit_copy(d, dst->shared->u.atomic.offset, s, src->shared->u.atomic.offset,
@@ -4190,7 +4190,7 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
assert(H5T_PAD_ZERO == dst->shared->u.atomic.lsb_pad ||
H5T_PAD_ONE == dst->shared->u.atomic.lsb_pad);
H5T__bit_set(d, (size_t)0, dst->shared->u.atomic.offset,
- (hbool_t)(H5T_PAD_ONE == dst->shared->u.atomic.lsb_pad));
+ (bool)(H5T_PAD_ONE == dst->shared->u.atomic.lsb_pad));
}
if (dst->shared->u.atomic.offset + dst->shared->u.atomic.prec != 8 * dst->shared->size) {
assert(H5T_PAD_ZERO == dst->shared->u.atomic.msb_pad ||
@@ -4198,7 +4198,7 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
H5T__bit_set(d, dst->shared->u.atomic.offset + dst->shared->u.atomic.prec,
8 * dst->shared->size -
(dst->shared->u.atomic.offset + dst->shared->u.atomic.prec),
- (hbool_t)(H5T_PAD_ONE == dst->shared->u.atomic.msb_pad));
+ (bool)(H5T_PAD_ONE == dst->shared->u.atomic.msb_pad));
}
/*
@@ -4277,13 +4277,13 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
size_t mpos; /*offset to useful mant is src */
uint64_t sign; /*source sign bit value */
size_t mrsh; /*amount to right shift mantissa*/
- hbool_t carry = FALSE; /*carry after rounding mantissa */
+ bool carry = false; /*carry after rounding mantissa */
size_t i; /*miscellaneous counters */
size_t implied; /*destination implied bits */
- hbool_t denormalized = FALSE; /*is either source or destination denormalized?*/
+ bool denormalized = false; /*is either source or destination denormalized?*/
H5T_conv_cb_t cb_struct = {NULL, NULL}; /*conversion callback structure */
H5T_conv_ret_t except_ret; /*return of callback function */
- hbool_t reverse; /*if reverse the order of destination */
+ bool reverse; /*if reverse the order of destination */
herr_t ret_value = SUCCEED; /*return value */
FUNC_ENTER_PACKAGE
@@ -4329,19 +4329,19 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
olap = nelmts;
}
else if (src_p->shared->size >= dst_p->shared->size) {
- double olap_d = HDceil((double)(dst_p->shared->size) /
- (double)(src_p->shared->size - dst_p->shared->size));
- olap = (size_t)olap_d;
+ double olap_d =
+ ceil((double)(dst_p->shared->size) / (double)(src_p->shared->size - dst_p->shared->size));
+ olap = (size_t)olap_d;
sp = dp = (uint8_t *)buf;
direction = 1;
}
else {
- double olap_d = HDceil((double)(src_p->shared->size) /
- (double)(dst_p->shared->size - src_p->shared->size));
- olap = (size_t)olap_d;
- sp = (uint8_t *)buf + (nelmts - 1) * src_p->shared->size;
- dp = (uint8_t *)buf + (nelmts - 1) * dst_p->shared->size;
- direction = -1;
+ double olap_d =
+ ceil((double)(src_p->shared->size) / (double)(dst_p->shared->size - src_p->shared->size));
+ olap = (size_t)olap_d;
+ sp = (uint8_t *)buf + (nelmts - 1) * src_p->shared->size;
+ dp = (uint8_t *)buf + (nelmts - 1) * dst_p->shared->size;
+ direction = -1;
}
/*
@@ -4364,7 +4364,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
for (elmtno = 0; elmtno < nelmts; elmtno++) {
/* Set these variables to default */
except_ret = H5T_CONV_UNHANDLED;
- reverse = TRUE;
+ reverse = true;
/*
* If the source and destination buffers overlap then use a
@@ -4427,15 +4427,15 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
/*
* Check for special cases: +0, -0, +Inf, -Inf, NaN
*/
- if (H5T__bit_find(s, src.u.f.mpos, src.u.f.msize, H5T_BIT_LSB, TRUE) < 0) {
- if (H5T__bit_find(s, src.u.f.epos, src.u.f.esize, H5T_BIT_LSB, TRUE) < 0) {
+ if (H5T__bit_find(s, src.u.f.mpos, src.u.f.msize, H5T_BIT_LSB, true) < 0) {
+ if (H5T__bit_find(s, src.u.f.epos, src.u.f.esize, H5T_BIT_LSB, true) < 0) {
/* +0 or -0 */
H5T__bit_copy(d, dst.u.f.sign, s, src.u.f.sign, (size_t)1);
- H5T__bit_set(d, dst.u.f.epos, dst.u.f.esize, FALSE);
- H5T__bit_set(d, dst.u.f.mpos, dst.u.f.msize, FALSE);
+ H5T__bit_set(d, dst.u.f.epos, dst.u.f.esize, false);
+ H5T__bit_set(d, dst.u.f.mpos, dst.u.f.msize, false);
goto padding;
}
- else if (H5T__bit_find(s, src.u.f.epos, src.u.f.esize, H5T_BIT_LSB, FALSE) < 0) {
+ else if (H5T__bit_find(s, src.u.f.epos, src.u.f.esize, H5T_BIT_LSB, false) < 0) {
/* +Inf or -Inf */
if (cb_struct.func) { /*If user's exception handler is present, use it*/
/*reverse order first*/
@@ -4451,17 +4451,17 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
if (except_ret == H5T_CONV_UNHANDLED) {
H5T__bit_copy(d, dst.u.f.sign, s, src.u.f.sign, (size_t)1);
- H5T__bit_set(d, dst.u.f.epos, dst.u.f.esize, TRUE);
- H5T__bit_set(d, dst.u.f.mpos, dst.u.f.msize, FALSE);
+ H5T__bit_set(d, dst.u.f.epos, dst.u.f.esize, true);
+ H5T__bit_set(d, dst.u.f.mpos, dst.u.f.msize, false);
/*If the destination no implied mantissa bit, we'll need to set
*the 1st bit of mantissa to 1. The Intel-Linux long double is
*this case.*/
if (H5T_NORM_NONE == dst.u.f.norm)
- H5T__bit_set(d, dst.u.f.mpos + dst.u.f.msize - 1, (size_t)1, TRUE);
+ H5T__bit_set(d, dst.u.f.mpos + dst.u.f.msize - 1, (size_t)1, true);
}
else if (except_ret == H5T_CONV_HANDLED) {
/*No need to reverse the order of destination because user handles it*/
- reverse = FALSE;
+ reverse = false;
goto next;
}
else if (except_ret == H5T_CONV_ABORT)
@@ -4472,8 +4472,8 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
}
}
else if (H5T_NORM_NONE == src.u.f.norm &&
- H5T__bit_find(s, src.u.f.mpos, src.u.f.msize - 1, H5T_BIT_LSB, TRUE) < 0 &&
- H5T__bit_find(s, src.u.f.epos, src.u.f.esize, H5T_BIT_LSB, FALSE) < 0) {
+ H5T__bit_find(s, src.u.f.mpos, src.u.f.msize - 1, H5T_BIT_LSB, true) < 0 &&
+ H5T__bit_find(s, src.u.f.epos, src.u.f.esize, H5T_BIT_LSB, false) < 0) {
/*This is a special case for the source of no implied mantissa bit.
*If the exponent bits are all 1s and only the 1st bit of mantissa
*is set to 1. It's infinity. The Intel-Linux "long double" is this case.*/
@@ -4491,17 +4491,17 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
if (except_ret == H5T_CONV_UNHANDLED) {
H5T__bit_copy(d, dst.u.f.sign, s, src.u.f.sign, (size_t)1);
- H5T__bit_set(d, dst.u.f.epos, dst.u.f.esize, TRUE);
- H5T__bit_set(d, dst.u.f.mpos, dst.u.f.msize, FALSE);
+ H5T__bit_set(d, dst.u.f.epos, dst.u.f.esize, true);
+ H5T__bit_set(d, dst.u.f.mpos, dst.u.f.msize, false);
/*If the destination no implied mantissa bit, we'll need to set
*the 1st bit of mantissa to 1. The Intel-Linux long double is
*this case.*/
if (H5T_NORM_NONE == dst.u.f.norm)
- H5T__bit_set(d, dst.u.f.mpos + dst.u.f.msize - 1, (size_t)1, TRUE);
+ H5T__bit_set(d, dst.u.f.mpos + dst.u.f.msize - 1, (size_t)1, true);
}
else if (except_ret == H5T_CONV_HANDLED) {
/*No need to reverse the order of destination because user handles it*/
- reverse = FALSE;
+ reverse = false;
goto next;
}
else if (except_ret == H5T_CONV_ABORT)
@@ -4514,7 +4514,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
* remain in place.
*/
}
- else if (H5T__bit_find(s, src.u.f.epos, src.u.f.esize, H5T_BIT_LSB, FALSE) < 0) {
+ else if (H5T__bit_find(s, src.u.f.epos, src.u.f.esize, H5T_BIT_LSB, false) < 0) {
/* NaN */
if (cb_struct.func) { /*If user's exception handler is present, use it*/
/*reverse order first*/
@@ -4527,12 +4527,12 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
/* There are many NaN values, so we just set all bits of
* the significand. */
H5T__bit_copy(d, dst.u.f.sign, s, src.u.f.sign, (size_t)1);
- H5T__bit_set(d, dst.u.f.epos, dst.u.f.esize, TRUE);
- H5T__bit_set(d, dst.u.f.mpos, dst.u.f.msize, TRUE);
+ H5T__bit_set(d, dst.u.f.epos, dst.u.f.esize, true);
+ H5T__bit_set(d, dst.u.f.mpos, dst.u.f.msize, true);
}
else if (except_ret == H5T_CONV_HANDLED) {
/*No need to reverse the order of destination because user handles it*/
- reverse = FALSE;
+ reverse = false;
goto next;
}
else if (except_ret == H5T_CONV_ABORT)
@@ -4549,7 +4549,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
expo = (int64_t)H5T__bit_get_d(s, src.u.f.epos, src.u.f.esize);
if (expo == 0)
- denormalized = TRUE;
+ denormalized = true;
/*
* Set markers for the source mantissa, excluding the leading `1'
@@ -4559,12 +4559,12 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
mpos = src.u.f.mpos;
mrsh = 0;
if (0 == expo || H5T_NORM_NONE == src.u.f.norm) {
- if ((bitno = H5T__bit_find(s, src.u.f.mpos, src.u.f.msize, H5T_BIT_MSB, TRUE)) > 0) {
+ if ((bitno = H5T__bit_find(s, src.u.f.mpos, src.u.f.msize, H5T_BIT_MSB, true)) > 0) {
msize = (size_t)bitno;
}
else if (0 == bitno) {
msize = 1;
- H5T__bit_set(s, src.u.f.mpos, (size_t)1, FALSE);
+ H5T__bit_set(s, src.u.f.mpos, (size_t)1, false);
}
}
else if (H5T_NORM_IMPLIED == src.u.f.norm) {
@@ -4614,7 +4614,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
if (expo < -(hssize_t)(dst.u.f.msize)) {
/* The exponent is way too small. Result is zero. */
expo = 0;
- H5T__bit_set(d, dst.u.f.mpos, dst.u.f.msize, FALSE);
+ H5T__bit_set(d, dst.u.f.mpos, dst.u.f.msize, false);
msize = 0;
}
else if (expo <= 0) {
@@ -4626,7 +4626,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
*/
mrsh += (size_t)(1 - expo);
expo = 0;
- denormalized = TRUE;
+ denormalized = true;
}
else if (expo >= expo_max) {
/*
@@ -4646,13 +4646,13 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
if (except_ret == H5T_CONV_UNHANDLED) {
expo = expo_max;
- H5T__bit_set(d, dst.u.f.mpos, dst.u.f.msize, FALSE);
+ H5T__bit_set(d, dst.u.f.mpos, dst.u.f.msize, false);
msize = 0;
}
else if (except_ret == H5T_CONV_ABORT)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception");
else if (except_ret == H5T_CONV_HANDLED) {
- reverse = FALSE;
+ reverse = false;
goto next;
}
}
@@ -4672,7 +4672,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
/* Don't do rounding if exponent is 111...110 and mantissa is 111...11.
* To do rounding and increment exponent in this case will create an infinity value.*/
if ((H5T__bit_find(s, mpos + (size_t)bitno, msize - (size_t)bitno, H5T_BIT_LSB,
- FALSE) >= 0 ||
+ false) >= 0 ||
expo < expo_max - 1)) {
carry = H5T__bit_inc(s, mpos + (size_t)bitno - 1, 1 + msize - (size_t)bitno);
if (carry)
@@ -4684,25 +4684,25 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
H5T__bit_inc(s, mpos + (size_t)bitno - 1, 1 + msize - (size_t)bitno);
}
else
- carry = FALSE;
+ carry = false;
/*
* Write the mantissa to the destination
*/
if (mrsh > dst.u.f.msize + 1) {
- H5T__bit_set(d, dst.u.f.mpos, dst.u.f.msize, FALSE);
+ H5T__bit_set(d, dst.u.f.mpos, dst.u.f.msize, false);
}
else if (mrsh == dst.u.f.msize + 1) {
- H5T__bit_set(d, dst.u.f.mpos + 1, dst.u.f.msize - 1, FALSE);
- H5T__bit_set(d, dst.u.f.mpos, (size_t)1, TRUE);
+ H5T__bit_set(d, dst.u.f.mpos + 1, dst.u.f.msize - 1, false);
+ H5T__bit_set(d, dst.u.f.mpos, (size_t)1, true);
}
else if (mrsh == dst.u.f.msize) {
- H5T__bit_set(d, dst.u.f.mpos, dst.u.f.msize, FALSE);
+ H5T__bit_set(d, dst.u.f.mpos, dst.u.f.msize, false);
H5T__bit_set_d(d, dst.u.f.mpos, MIN(2, dst.u.f.msize), (hsize_t)implied);
}
else {
if (mrsh > 0) {
- H5T__bit_set(d, dst.u.f.mpos + dst.u.f.msize - mrsh, mrsh, FALSE);
+ H5T__bit_set(d, dst.u.f.mpos + dst.u.f.msize - mrsh, mrsh, false);
H5T__bit_set_d(d, dst.u.f.mpos + dst.u.f.msize - mrsh, (size_t)2, (hsize_t)implied);
}
if (mrsh + msize >= dst.u.f.msize) {
@@ -4711,7 +4711,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
}
else {
H5T__bit_copy(d, dst.u.f.mpos + dst.u.f.msize - (mrsh + msize), s, mpos, msize);
- H5T__bit_set(d, dst.u.f.mpos, dst.u.f.msize - (mrsh + msize), FALSE);
+ H5T__bit_set(d, dst.u.f.mpos, dst.u.f.msize - (mrsh + msize), false);
}
}
@@ -4737,19 +4737,19 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
if (except_ret == H5T_CONV_UNHANDLED) {
expo = expo_max;
- H5T__bit_set(d, dst.u.f.mpos, dst.u.f.msize, FALSE);
+ H5T__bit_set(d, dst.u.f.mpos, dst.u.f.msize, false);
}
else if (except_ret == H5T_CONV_ABORT)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL,
"can't handle conversion exception");
else if (except_ret == H5T_CONV_HANDLED) {
- reverse = FALSE;
+ reverse = false;
goto next;
}
}
}
/*reset CARRY*/
- carry = FALSE;
+ carry = false;
H5_CHECK_OVERFLOW(expo, hssize_t, hsize_t);
H5T__bit_set_d(d, dst.u.f.epos, dst.u.f.esize, (hsize_t)expo);
@@ -4761,12 +4761,12 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
*/
if (dst.offset > 0) {
assert(H5T_PAD_ZERO == dst.lsb_pad || H5T_PAD_ONE == dst.lsb_pad);
- H5T__bit_set(d, (size_t)0, dst.offset, (hbool_t)(H5T_PAD_ONE == dst.lsb_pad));
+ H5T__bit_set(d, (size_t)0, dst.offset, (bool)(H5T_PAD_ONE == dst.lsb_pad));
}
if (dst.offset + dst.prec != 8 * dst_p->shared->size) {
assert(H5T_PAD_ZERO == dst.msb_pad || H5T_PAD_ONE == dst.msb_pad);
H5T__bit_set(d, dst.offset + dst.prec, 8 * dst_p->shared->size - (dst.offset + dst.prec),
- (hbool_t)(H5T_PAD_ONE == dst.msb_pad));
+ (bool)(H5T_PAD_ONE == dst.msb_pad));
}
/*
@@ -4900,14 +4900,14 @@ H5T__conv_s_s(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
}
else if (src->shared->size >= dst->shared->size) {
double olapd =
- HDceil((double)(dst->shared->size) / (double)(src->shared->size - dst->shared->size));
+ ceil((double)(dst->shared->size) / (double)(src->shared->size - dst->shared->size));
olap = (size_t)olapd;
sp = dp = (uint8_t *)buf;
direction = 1;
}
else {
double olapd =
- HDceil((double)(src->shared->size) / (double)(dst->shared->size - src->shared->size));
+ ceil((double)(src->shared->size) / (double)(dst->shared->size - src->shared->size));
olap = (size_t)olapd;
sp = (uint8_t *)buf + (nelmts - 1) * src->shared->size;
dp = (uint8_t *)buf + (nelmts - 1) * dst->shared->size;
@@ -7913,8 +7913,8 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
size_t first; /*first bit(MSB) in an integer */
ssize_t sfirst; /*a signed version of `first' */
H5T_conv_cb_t cb_struct = {NULL, NULL}; /*conversion callback structure */
- hbool_t truncated; /*if fraction value is dropped */
- hbool_t reverse; /*if reverse order of destination at the end */
+ bool truncated; /*if fraction value is dropped */
+ bool reverse; /*if reverse order of destination at the end */
H5T_conv_ret_t except_ret; /*return of callback function */
herr_t ret_value = SUCCEED; /* Return value */
@@ -7958,25 +7958,25 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
olap = nelmts;
}
else if (src_p->shared->size >= dst_p->shared->size) {
- double olap_d = HDceil((double)(dst_p->shared->size) /
- (double)(src_p->shared->size - dst_p->shared->size));
- olap = (size_t)olap_d;
+ double olap_d =
+ ceil((double)(dst_p->shared->size) / (double)(src_p->shared->size - dst_p->shared->size));
+ olap = (size_t)olap_d;
sp = dp = (uint8_t *)buf;
direction = 1;
}
else {
- double olap_d = HDceil((double)(src_p->shared->size) /
- (double)(dst_p->shared->size - src_p->shared->size));
- olap = (size_t)olap_d;
- sp = (uint8_t *)buf + (nelmts - 1) * src_p->shared->size;
- dp = (uint8_t *)buf + (nelmts - 1) * dst_p->shared->size;
- direction = -1;
+ double olap_d =
+ ceil((double)(src_p->shared->size) / (double)(dst_p->shared->size - src_p->shared->size));
+ olap = (size_t)olap_d;
+ sp = (uint8_t *)buf + (nelmts - 1) * src_p->shared->size;
+ dp = (uint8_t *)buf + (nelmts - 1) * dst_p->shared->size;
+ direction = -1;
}
/* Allocate enough space for the buffer holding temporary
* converted value
*/
- buf_size = (size_t)(HDpow(2.0, (double)src.u.f.esize) / 8 + 1);
+ buf_size = (size_t)(pow(2.0, (double)src.u.f.esize) / 8 + 1);
int_buf = (uint8_t *)H5MM_calloc(buf_size);
/* Get conversion exception callback property */
@@ -7990,8 +7990,8 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
for (elmtno = 0; elmtno < nelmts; elmtno++) {
/* Set these variables to default */
except_ret = H5T_CONV_UNHANDLED;
- truncated = FALSE;
- reverse = TRUE;
+ truncated = false;
+ reverse = true;
/*
* If the source and destination buffers overlap then use a
@@ -8046,7 +8046,7 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
}
/*zero-set all destination bits*/
- H5T__bit_set(d, dst.offset, dst.prec, FALSE);
+ H5T__bit_set(d, dst.offset, dst.prec, false);
/*
* Find the sign bit value of the source.
@@ -8056,13 +8056,13 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
/*
* Check for special cases: +0, -0, +Inf, -Inf, NaN
*/
- if (H5T__bit_find(s, src.u.f.mpos, src.u.f.msize, H5T_BIT_LSB, TRUE) < 0) {
- if (H5T__bit_find(s, src.u.f.epos, src.u.f.esize, H5T_BIT_LSB, TRUE) < 0) {
+ if (H5T__bit_find(s, src.u.f.mpos, src.u.f.msize, H5T_BIT_LSB, true) < 0) {
+ if (H5T__bit_find(s, src.u.f.epos, src.u.f.esize, H5T_BIT_LSB, true) < 0) {
/* +0 or -0 */
/* Set all bits to zero */
goto padding;
}
- else if (H5T__bit_find(s, src.u.f.epos, src.u.f.esize, H5T_BIT_LSB, FALSE) < 0) {
+ else if (H5T__bit_find(s, src.u.f.epos, src.u.f.esize, H5T_BIT_LSB, false) < 0) {
/* +Infinity or -Infinity */
if (sign) { /* -Infinity */
if (cb_struct.func) { /*If user's exception handler is present, use it*/
@@ -8075,11 +8075,11 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
if (except_ret == H5T_CONV_UNHANDLED) {
if (H5T_SGN_2 == dst.u.i.sign)
- H5T__bit_set(d, dst.prec - 1, (size_t)1, TRUE);
+ H5T__bit_set(d, dst.prec - 1, (size_t)1, true);
}
else if (except_ret == H5T_CONV_HANDLED) {
/*No need to reverse the order of destination because user handles it*/
- reverse = FALSE;
+ reverse = false;
goto next;
}
else if (except_ret == H5T_CONV_ABORT)
@@ -8097,13 +8097,13 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
if (except_ret == H5T_CONV_UNHANDLED) {
if (H5T_SGN_NONE == dst.u.i.sign)
- H5T__bit_set(d, dst.offset, dst.prec, TRUE);
+ H5T__bit_set(d, dst.offset, dst.prec, true);
else if (H5T_SGN_2 == dst.u.i.sign)
- H5T__bit_set(d, dst.offset, dst.prec - 1, TRUE);
+ H5T__bit_set(d, dst.offset, dst.prec - 1, true);
}
else if (except_ret == H5T_CONV_HANDLED) {
/*No need to reverse the order of destination because user handles it*/
- reverse = FALSE;
+ reverse = false;
goto next;
}
else if (except_ret == H5T_CONV_ABORT)
@@ -8114,8 +8114,8 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
}
}
else if (H5T_NORM_NONE == src.u.f.norm &&
- H5T__bit_find(s, src.u.f.mpos, src.u.f.msize - 1, H5T_BIT_LSB, TRUE) < 0 &&
- H5T__bit_find(s, src.u.f.epos, src.u.f.esize, H5T_BIT_LSB, FALSE) < 0) {
+ H5T__bit_find(s, src.u.f.mpos, src.u.f.msize - 1, H5T_BIT_LSB, true) < 0 &&
+ H5T__bit_find(s, src.u.f.epos, src.u.f.esize, H5T_BIT_LSB, false) < 0) {
/*This is a special case for the source of no implied mantissa bit.
*If the exponent bits are all 1s and only the 1st bit of mantissa
*is set to 1. It's infinity. The Intel-Linux "long double" is this case.*/
@@ -8131,11 +8131,11 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
if (except_ret == H5T_CONV_UNHANDLED) {
if (H5T_SGN_2 == dst.u.i.sign)
- H5T__bit_set(d, dst.prec - 1, (size_t)1, TRUE);
+ H5T__bit_set(d, dst.prec - 1, (size_t)1, true);
}
else if (except_ret == H5T_CONV_HANDLED) {
/*No need to reverse the order of destination because user handles it*/
- reverse = FALSE;
+ reverse = false;
goto next;
}
else if (except_ret == H5T_CONV_ABORT)
@@ -8153,13 +8153,13 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
if (except_ret == H5T_CONV_UNHANDLED) {
if (H5T_SGN_NONE == dst.u.i.sign)
- H5T__bit_set(d, dst.offset, dst.prec, TRUE);
+ H5T__bit_set(d, dst.offset, dst.prec, true);
else if (H5T_SGN_2 == dst.u.i.sign)
- H5T__bit_set(d, dst.offset, dst.prec - 1, TRUE);
+ H5T__bit_set(d, dst.offset, dst.prec - 1, true);
}
else if (except_ret == H5T_CONV_HANDLED) {
/*No need to reverse the order of destination because user handles it*/
- reverse = FALSE;
+ reverse = false;
goto next;
}
else if (except_ret == H5T_CONV_ABORT)
@@ -8168,7 +8168,7 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
}
goto padding;
}
- else if (H5T__bit_find(s, src.u.f.epos, src.u.f.esize, H5T_BIT_LSB, FALSE) < 0) {
+ else if (H5T__bit_find(s, src.u.f.epos, src.u.f.esize, H5T_BIT_LSB, false) < 0) {
/* NaN */
if (cb_struct.func) { /*If user's exception handler is present, use it*/
/*reverse order first*/
@@ -8183,7 +8183,7 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
}
else if (except_ret == H5T_CONV_HANDLED) {
/*No need to reverse the order of destination because user handles it*/
- reverse = FALSE;
+ reverse = false;
goto next;
}
else if (except_ret == H5T_CONV_ABORT)
@@ -8246,14 +8246,14 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
* during conversion. Set exception type to be "truncate"
*/
if ((size_t)expo < src.u.f.msize && cb_struct.func)
- truncated = TRUE;
+ truncated = true;
/*
* What is the bit position for the most significant bit(MSB) of S
* which is set? This is checked before converted to negative
* integer.
*/
- sfirst = H5T__bit_find(int_buf, (size_t)0, 8 * buf_size, H5T_BIT_MSB, TRUE);
+ sfirst = H5T__bit_find(int_buf, (size_t)0, 8 * buf_size, H5T_BIT_MSB, true);
first = (size_t)sfirst;
if (sfirst < 0) {
@@ -8283,7 +8283,7 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
"can't handle conversion exception");
else if (except_ret == H5T_CONV_HANDLED) {
/*No need to reverse the order of destination because user handles it*/
- reverse = FALSE;
+ reverse = false;
goto next;
}
}
@@ -8300,10 +8300,10 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
}
if (except_ret == H5T_CONV_UNHANDLED)
- H5T__bit_set(d, dst.offset, dst.prec, TRUE);
+ H5T__bit_set(d, dst.offset, dst.prec, true);
else if (except_ret == H5T_CONV_HANDLED) {
/*No need to reverse the order of destination because user handles it*/
- reverse = FALSE;
+ reverse = false;
goto next;
}
else if (except_ret == H5T_CONV_ABORT)
@@ -8325,7 +8325,7 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
H5T__bit_copy(d, dst.offset, int_buf, (size_t)0, first + 1);
else if (except_ret == H5T_CONV_HANDLED) {
/*No need to reverse the order of destination because user handles it*/
- reverse = FALSE;
+ reverse = false;
goto next;
}
else if (except_ret == H5T_CONV_ABORT)
@@ -8353,14 +8353,14 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
/*copy source value into destination*/
H5T__bit_copy(d, dst.offset, int_buf, (size_t)0, dst.prec - 1);
- H5T__bit_set(d, (dst.offset + dst.prec - 1), (size_t)1, TRUE);
+ H5T__bit_set(d, (dst.offset + dst.prec - 1), (size_t)1, true);
}
else if (except_ret == H5T_CONV_ABORT)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL,
"can't handle conversion exception");
else if (except_ret == H5T_CONV_HANDLED) {
/*No need to reverse the order of destination because user handles it*/
- reverse = FALSE;
+ reverse = false;
goto next;
}
}
@@ -8377,13 +8377,13 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
}
if (except_ret == H5T_CONV_UNHANDLED)
- H5T__bit_set(d, (dst.offset + dst.prec - 1), (size_t)1, TRUE);
+ H5T__bit_set(d, (dst.offset + dst.prec - 1), (size_t)1, true);
else if (except_ret == H5T_CONV_ABORT)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL,
"can't handle conversion exception");
else if (except_ret == H5T_CONV_HANDLED) {
/*No need to reverse the order of destination because user handles it*/
- reverse = FALSE;
+ reverse = false;
goto next;
}
}
@@ -8400,13 +8400,13 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
}
if (except_ret == H5T_CONV_UNHANDLED)
- H5T__bit_set(d, dst.offset, dst.prec - 1, TRUE);
+ H5T__bit_set(d, dst.offset, dst.prec - 1, true);
else if (except_ret == H5T_CONV_ABORT)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL,
"can't handle conversion exception");
else if (except_ret == H5T_CONV_HANDLED) {
/*No need to reverse the order of destination because user handles it*/
- reverse = FALSE;
+ reverse = false;
goto next;
}
}
@@ -8429,7 +8429,7 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
"can't handle conversion exception");
else if (except_ret == H5T_CONV_HANDLED) {
/*No need to reverse the order of destination because user handles it*/
- reverse = FALSE;
+ reverse = false;
goto next;
}
}
@@ -8442,12 +8442,12 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
*/
if (dst.offset > 0) {
assert(H5T_PAD_ZERO == dst.lsb_pad || H5T_PAD_ONE == dst.lsb_pad);
- H5T__bit_set(d, (size_t)0, dst.offset, (hbool_t)(H5T_PAD_ONE == dst.lsb_pad));
+ H5T__bit_set(d, (size_t)0, dst.offset, (bool)(H5T_PAD_ONE == dst.lsb_pad));
}
if (dst.offset + dst.prec != 8 * dst_p->shared->size) {
assert(H5T_PAD_ZERO == dst.msb_pad || H5T_PAD_ONE == dst.msb_pad);
H5T__bit_set(d, dst.offset + dst.prec, 8 * dst_p->shared->size - (dst.offset + dst.prec),
- (hbool_t)(H5T_PAD_ONE == dst.msb_pad));
+ (bool)(H5T_PAD_ONE == dst.msb_pad));
}
/*
@@ -8531,8 +8531,8 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
hsize_t expo; /*destination exponent */
hsize_t expo_max; /*maximal possible exponent value */
size_t sign; /*source sign bit value */
- hbool_t is_max_neg; /*source is maximal negative value*/
- hbool_t do_round; /*whether there is roundup */
+ bool is_max_neg; /*source is maximal negative value*/
+ bool do_round; /*whether there is roundup */
uint8_t *int_buf = NULL; /*buffer for temporary value */
size_t buf_size; /*buffer size for temporary value */
size_t i; /*miscellaneous counters */
@@ -8540,7 +8540,7 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
ssize_t sfirst; /*a signed version of `first' */
H5T_conv_cb_t cb_struct = {NULL, NULL}; /*conversion callback structure */
H5T_conv_ret_t except_ret; /*return of callback function */
- hbool_t reverse; /*if reverse the order of destination */
+ bool reverse; /*if reverse the order of destination */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -8583,19 +8583,19 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
olap = nelmts;
}
else if (src_p->shared->size >= dst_p->shared->size) {
- double olap_d = HDceil((double)(dst_p->shared->size) /
- (double)(src_p->shared->size - dst_p->shared->size));
- olap = (size_t)olap_d;
+ double olap_d =
+ ceil((double)(dst_p->shared->size) / (double)(src_p->shared->size - dst_p->shared->size));
+ olap = (size_t)olap_d;
sp = dp = (uint8_t *)buf;
direction = 1;
}
else {
- double olap_d = HDceil((double)(src_p->shared->size) /
- (double)(dst_p->shared->size - src_p->shared->size));
- olap = (size_t)olap_d;
- sp = (uint8_t *)buf + (nelmts - 1) * src_p->shared->size;
- dp = (uint8_t *)buf + (nelmts - 1) * dst_p->shared->size;
- direction = -1;
+ double olap_d =
+ ceil((double)(src_p->shared->size) / (double)(dst_p->shared->size - src_p->shared->size));
+ olap = (size_t)olap_d;
+ sp = (uint8_t *)buf + (nelmts - 1) * src_p->shared->size;
+ dp = (uint8_t *)buf + (nelmts - 1) * dst_p->shared->size;
+ direction = -1;
}
/* Allocate enough space for the buffer holding temporary
@@ -8615,7 +8615,7 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
for (elmtno = 0; elmtno < nelmts; elmtno++) {
/* Set these variables to default */
except_ret = H5T_CONV_UNHANDLED;
- reverse = TRUE;
+ reverse = true;
/* Make sure these variables are reset to 0. */
sign = 0; /*source sign bit value */
@@ -8661,7 +8661,7 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
}
/* Zero-set all destination bits*/
- H5T__bit_set(d, dst.offset, dst.prec, FALSE);
+ H5T__bit_set(d, dst.offset, dst.prec, false);
/* Copy source into a temporary buffer */
H5T__bit_copy(int_buf, (size_t)0, s, src.offset, src.prec);
@@ -8674,13 +8674,13 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
* bit(MSB) of S which is set?
*/
if (H5T_SGN_2 == src.u.i.sign) {
- sfirst = H5T__bit_find(int_buf, (size_t)0, src.prec - 1, H5T_BIT_MSB, TRUE);
+ sfirst = H5T__bit_find(int_buf, (size_t)0, src.prec - 1, H5T_BIT_MSB, true);
if (sign && sfirst < 0)
/* The case 0x80...00, which is negative with maximal value */
is_max_neg = 1;
}
else if (H5T_SGN_NONE == src.u.i.sign)
- sfirst = H5T__bit_find(int_buf, (size_t)0, src.prec, H5T_BIT_MSB, TRUE);
+ sfirst = H5T__bit_find(int_buf, (size_t)0, src.prec, H5T_BIT_MSB, true);
/* Handle special cases here. Integer is zero */
if (!sign && sfirst < 0)
@@ -8692,7 +8692,7 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
/* Equivalent to ~(i - 1) */
H5T__bit_dec(int_buf, (size_t)0, buf_size * 8);
H5T__bit_neg(int_buf, (size_t)0, buf_size * 8);
- sfirst = H5T__bit_find(int_buf, (size_t)0, src.prec - 1, H5T_BIT_MSB, TRUE);
+ sfirst = H5T__bit_find(int_buf, (size_t)0, src.prec - 1, H5T_BIT_MSB, true);
}
else {
/* If it's maximal negative number 0x80...000, treat it as if it overflowed
@@ -8751,7 +8751,7 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
}
if (except_ret == H5T_CONV_HANDLED) {
- reverse = FALSE;
+ reverse = false;
goto padding;
}
else if (except_ret == H5T_CONV_ABORT)
@@ -8811,7 +8811,7 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
}
/* Check if the exponent is too big */
- expo_max = (hsize_t)(HDpow(2.0, (double)dst.u.f.esize) - 1);
+ expo_max = (hsize_t)(pow(2.0, (double)dst.u.f.esize) - 1);
if (expo > expo_max) { /*overflows*/
if (cb_struct.func) { /*user's exception handler. Reverse back source order*/
@@ -8824,7 +8824,7 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL,
"can't handle conversion exception");
else if (except_ret == H5T_CONV_HANDLED) {
- reverse = FALSE;
+ reverse = false;
goto padding;
}
}
@@ -8851,12 +8851,12 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
*/
if (dst.offset > 0) {
assert(H5T_PAD_ZERO == dst.lsb_pad || H5T_PAD_ONE == dst.lsb_pad);
- H5T__bit_set(d, (size_t)0, dst.offset, (hbool_t)(H5T_PAD_ONE == dst.lsb_pad));
+ H5T__bit_set(d, (size_t)0, dst.offset, (bool)(H5T_PAD_ONE == dst.lsb_pad));
}
if (dst.offset + dst.prec != 8 * dst_p->shared->size) {
assert(H5T_PAD_ZERO == dst.msb_pad || H5T_PAD_ONE == dst.msb_pad);
H5T__bit_set(d, dst.offset + dst.prec, 8 * dst_p->shared->size - (dst.offset + dst.prec),
- (hbool_t)(H5T_PAD_ONE == dst.msb_pad));
+ (bool)(H5T_PAD_ONE == dst.msb_pad));
}
/*
diff --git a/src/H5Tdeprec.c b/src/H5Tdeprec.c
index 6fd4d450d5d..34e3687918e 100644
--- a/src/H5Tdeprec.c
+++ b/src/H5Tdeprec.c
@@ -179,7 +179,7 @@ H5Topen1(hid_t loc_id, const char *name)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open named datatype");
/* Register the type and return the ID */
- if ((ret_value = H5VL_register(H5I_DATATYPE, dt, vol_obj->connector, TRUE)) < 0)
+ if ((ret_value = H5VL_register(H5I_DATATYPE, dt, vol_obj->connector, true)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register named datatype");
done:
diff --git a/src/H5Tenum.c b/src/H5Tenum.c
index 3544ef568ec..09407b12aee 100644
--- a/src/H5Tenum.c
+++ b/src/H5Tenum.c
@@ -59,7 +59,7 @@ H5Tenum_create(hid_t parent_id)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5I_INVALID_HID, "cannot create enum type");
/* Register the type */
- if ((ret_value = H5I_register(H5I_DATATYPE, dt, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_DATATYPE, dt, true)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register data type ID");
done:
@@ -171,7 +171,7 @@ H5T__enum_insert(const H5T_t *dt, const char *name, const void *value)
/* The name and value had better not already exist */
for (i = 0; i < dt->shared->u.enumer.nmembs; i++) {
- if (!HDstrcmp(dt->shared->u.enumer.name[i], name))
+ if (!strcmp(dt->shared->u.enumer.name[i], name))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "name redefinition");
if (!memcmp((uint8_t *)dt->shared->u.enumer.value + (i * dt->shared->size), value, dt->shared->size))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "value redefinition");
@@ -334,7 +334,7 @@ H5T__enum_nameof(const H5T_t *dt, const void *value, char *name /*out*/, size_t
H5T_t *copied_dt = NULL; /* Do sorting in copied datatype */
unsigned lt, md = 0, rt; /* Indices for binary search */
int cmp = (-1); /* Comparison result */
- hbool_t alloc_name = FALSE; /* Whether name has been allocated */
+ bool alloc_name = false; /* Whether name has been allocated */
char *ret_value = NULL; /* Return value */
FUNC_ENTER_PACKAGE
@@ -378,12 +378,12 @@ H5T__enum_nameof(const H5T_t *dt, const void *value, char *name /*out*/, size_t
/* Save result name */
if (!name) {
- if (NULL == (name = (char *)H5MM_malloc(HDstrlen(copied_dt->shared->u.enumer.name[md]) + 1)))
+ if (NULL == (name = (char *)H5MM_malloc(strlen(copied_dt->shared->u.enumer.name[md]) + 1)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
- alloc_name = TRUE;
+ alloc_name = true;
} /* end if */
- HDstrncpy(name, copied_dt->shared->u.enumer.name[md], size);
- if (HDstrlen(copied_dt->shared->u.enumer.name[md]) >= size)
+ strncpy(name, copied_dt->shared->u.enumer.name[md], size);
+ if (strlen(copied_dt->shared->u.enumer.name[md]) >= size)
HGOTO_ERROR(H5E_DATATYPE, H5E_NOSPACE, NULL, "name has been truncated");
/* Set return value */
@@ -484,7 +484,7 @@ H5T__enum_valueof(const H5T_t *dt, const char *name, void *value /*out*/)
while (lt < rt) {
md = (lt + rt) / 2;
- cmp = HDstrcmp(name, copied_dt->shared->u.enumer.name[md]);
+ cmp = strcmp(name, copied_dt->shared->u.enumer.name[md]);
if (cmp < 0) {
rt = md;
}
diff --git a/src/H5Tfields.c b/src/H5Tfields.c
index 9d423d1d3b5..dc839bac677 100644
--- a/src/H5Tfields.c
+++ b/src/H5Tfields.c
@@ -215,12 +215,12 @@ H5Tget_member_index(hid_t type_id, const char *name)
switch (dt->shared->type) {
case H5T_COMPOUND:
for (i = 0; i < dt->shared->u.compnd.nmembs; i++)
- if (!HDstrcmp(dt->shared->u.compnd.memb[i].name, name))
+ if (!strcmp(dt->shared->u.compnd.memb[i].name, name))
HGOTO_DONE((int)i);
break;
case H5T_ENUM:
for (i = 0; i < dt->shared->u.enumer.nmembs; i++)
- if (!HDstrcmp(dt->shared->u.enumer.name[i], name))
+ if (!strcmp(dt->shared->u.enumer.name[i], name))
HGOTO_DONE((int)i);
break;
@@ -261,7 +261,7 @@ H5T__sort_value(const H5T_t *dt, int *map)
{
unsigned nmembs; /* Number of members for datatype */
size_t size;
- hbool_t swapped; /* Whether we've swapped fields */
+ bool swapped; /* Whether we've swapped fields */
uint8_t tbuf[32];
unsigned i, j; /* Local index variables */
herr_t ret_value = SUCCEED; /* Return value */
@@ -277,8 +277,8 @@ H5T__sort_value(const H5T_t *dt, int *map)
if (H5T_SORT_VALUE != dt->shared->u.compnd.sorted) {
dt->shared->u.compnd.sorted = H5T_SORT_VALUE;
nmembs = dt->shared->u.compnd.nmembs;
- for (i = nmembs - 1, swapped = TRUE; i > 0 && swapped; --i) {
- for (j = 0, swapped = FALSE; j < i; j++) {
+ for (i = nmembs - 1, swapped = true; i > 0 && swapped; --i) {
+ for (j = 0, swapped = false; j < i; j++) {
if (dt->shared->u.compnd.memb[j].offset > dt->shared->u.compnd.memb[j + 1].offset) {
H5T_cmemb_t tmp = dt->shared->u.compnd.memb[j];
dt->shared->u.compnd.memb[j] = dt->shared->u.compnd.memb[j + 1];
@@ -289,7 +289,7 @@ H5T__sort_value(const H5T_t *dt, int *map)
map[j] = map[j + 1];
map[j + 1] = x;
} /* end if */
- swapped = TRUE;
+ swapped = true;
} /* end if */
} /* end for */
} /* end for */
@@ -306,8 +306,8 @@ H5T__sort_value(const H5T_t *dt, int *map)
nmembs = dt->shared->u.enumer.nmembs;
size = dt->shared->size;
assert(size <= sizeof(tbuf));
- for (i = (nmembs - 1), swapped = TRUE; i > 0 && swapped; --i) {
- for (j = 0, swapped = FALSE; j < i; j++) {
+ for (i = (nmembs - 1), swapped = true; i > 0 && swapped; --i) {
+ for (j = 0, swapped = false; j < i; j++) {
if (memcmp((uint8_t *)dt->shared->u.enumer.value + (j * size),
(uint8_t *)dt->shared->u.enumer.value + ((j + 1) * size), size) > 0) {
/* Swap names */
@@ -329,7 +329,7 @@ H5T__sort_value(const H5T_t *dt, int *map)
map[j + 1] = x;
} /* end if */
- swapped = TRUE;
+ swapped = true;
} /* end if */
} /* end for */
} /* end for */
@@ -363,7 +363,7 @@ H5T__sort_name(const H5T_t *dt, int *map)
{
unsigned i, j, nmembs;
size_t size;
- hbool_t swapped;
+ bool swapped;
uint8_t tbuf[32];
FUNC_ENTER_PACKAGE_NOERR
@@ -377,14 +377,14 @@ H5T__sort_name(const H5T_t *dt, int *map)
if (H5T_SORT_NAME != dt->shared->u.compnd.sorted) {
dt->shared->u.compnd.sorted = H5T_SORT_NAME;
nmembs = dt->shared->u.compnd.nmembs;
- for (i = nmembs - 1, swapped = TRUE; i > 0 && swapped; --i) {
- for (j = 0, swapped = FALSE; j < i; j++) {
- if (HDstrcmp(dt->shared->u.compnd.memb[j].name, dt->shared->u.compnd.memb[j + 1].name) >
+ for (i = nmembs - 1, swapped = true; i > 0 && swapped; --i) {
+ for (j = 0, swapped = false; j < i; j++) {
+ if (strcmp(dt->shared->u.compnd.memb[j].name, dt->shared->u.compnd.memb[j + 1].name) >
0) {
H5T_cmemb_t tmp = dt->shared->u.compnd.memb[j];
dt->shared->u.compnd.memb[j] = dt->shared->u.compnd.memb[j + 1];
dt->shared->u.compnd.memb[j + 1] = tmp;
- swapped = TRUE;
+ swapped = true;
if (map) {
int x = map[j];
map[j] = map[j + 1];
@@ -396,8 +396,7 @@ H5T__sort_name(const H5T_t *dt, int *map)
#ifndef NDEBUG
/* I never trust a sort :-) -RPM */
for (i = 0; i < nmembs - 1; i++) {
- assert(HDstrcmp(dt->shared->u.compnd.memb[i].name, dt->shared->u.compnd.memb[i + 1].name) <
- 0);
+ assert(strcmp(dt->shared->u.compnd.memb[i].name, dt->shared->u.compnd.memb[i + 1].name) < 0);
}
#endif
}
@@ -408,9 +407,9 @@ H5T__sort_name(const H5T_t *dt, int *map)
nmembs = dt->shared->u.enumer.nmembs;
size = dt->shared->size;
assert(size <= sizeof(tbuf));
- for (i = nmembs - 1, swapped = TRUE; i > 0 && swapped; --i) {
- for (j = 0, swapped = FALSE; j < i; j++) {
- if (HDstrcmp(dt->shared->u.enumer.name[j], dt->shared->u.enumer.name[j + 1]) > 0) {
+ for (i = nmembs - 1, swapped = true; i > 0 && swapped; --i) {
+ for (j = 0, swapped = false; j < i; j++) {
+ if (strcmp(dt->shared->u.enumer.name[j], dt->shared->u.enumer.name[j + 1]) > 0) {
/* Swap names */
char *tmp = dt->shared->u.enumer.name[j];
dt->shared->u.enumer.name[j] = dt->shared->u.enumer.name[j + 1];
@@ -429,14 +428,14 @@ H5T__sort_name(const H5T_t *dt, int *map)
map[j + 1] = x;
}
- swapped = TRUE;
+ swapped = true;
}
}
}
#ifndef NDEBUG
/* I never trust a sort :-) -RPM */
for (i = 0; i < nmembs - 1; i++)
- assert(HDstrcmp(dt->shared->u.enumer.name[i], dt->shared->u.enumer.name[i + 1]) < 0);
+ assert(strcmp(dt->shared->u.enumer.name[i], dt->shared->u.enumer.name[i + 1]) < 0);
#endif
}
}
diff --git a/src/H5Tinit_float.c b/src/H5Tinit_float.c
index bc14e422195..3b9e127fe4e 100644
--- a/src/H5Tinit_float.c
+++ b/src/H5Tinit_float.c
@@ -58,7 +58,7 @@
*-------------------------------------------------------------------------
*/
#define DETECT_F(TYPE, VAR, INFO) \
- { \
+ do { \
TYPE _v1, _v2, _v3; \
unsigned char _buf1[sizeof(TYPE)], _buf3[sizeof(TYPE)]; \
unsigned char _pad_mask[sizeof(TYPE)]; \
@@ -79,11 +79,11 @@
* and interfere with detection of the various properties below unless we \
* know to ignore them. */ \
_v1 = (TYPE)4.0L; \
- memcpy(_buf1, (const void *)&_v1, sizeof(TYPE)); \
+ H5MM_memcpy(_buf1, (const void *)&_v1, sizeof(TYPE)); \
for (_i = 0; _i < (int)sizeof(TYPE); _i++) \
for (_byte_mask = (unsigned char)1; _byte_mask; _byte_mask = (unsigned char)(_byte_mask << 1)) { \
_buf1[_i] ^= _byte_mask; \
- memcpy((void *)&_v2, (const void *)_buf1, sizeof(TYPE)); \
+ H5MM_memcpy((void *)&_v2, (const void *)_buf1, sizeof(TYPE)); \
H5_GCC_CLANG_DIAG_OFF("float-equal") \
if (_v1 != _v2) \
_pad_mask[_i] |= _byte_mask; \
@@ -96,8 +96,8 @@
_v3 = _v1; \
_v1 += _v2; \
_v2 /= (TYPE)256.0L; \
- memcpy(_buf1, (const void *)&_v1, sizeof(TYPE)); \
- memcpy(_buf3, (const void *)&_v3, sizeof(TYPE)); \
+ H5MM_memcpy(_buf1, (const void *)&_v1, sizeof(TYPE)); \
+ H5MM_memcpy(_buf3, (const void *)&_v3, sizeof(TYPE)); \
_j = H5T__byte_cmp(sizeof(TYPE), _buf3, _buf1, _pad_mask); \
if (_j >= 0) { \
INFO.perm[_i] = _j; \
@@ -138,7 +138,7 @@
INFO.ebias = H5T__find_bias(INFO.epos, INFO.esize, INFO.perm, &_v1); \
H5T__set_precision(&(INFO)); \
COMP_ALIGNMENT(TYPE, INFO.comp_align); \
- }
+ } while (0)
/* Detect alignment for C structure */
#define COMP_ALIGNMENT(TYPE, COMP_ALIGN) \
@@ -489,7 +489,7 @@ H5T__init_native_float_types(void)
dt->shared->u.atomic.u.f.pad = H5T_PAD_ZERO;
/* Register the type and set global variables */
- if ((H5T_NATIVE_FLOAT_g = H5I_register(H5I_DATATYPE, dt, FALSE)) < 0)
+ if ((H5T_NATIVE_FLOAT_g = H5I_register(H5I_DATATYPE, dt, false)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "can't register ID for built-in datatype");
H5T_NATIVE_FLOAT_ALIGN_g = det.comp_align;
@@ -520,7 +520,7 @@ H5T__init_native_float_types(void)
dt->shared->u.atomic.u.f.pad = H5T_PAD_ZERO;
/* Register the type and set global variables */
- if ((H5T_NATIVE_DOUBLE_g = H5I_register(H5I_DATATYPE, dt, FALSE)) < 0)
+ if ((H5T_NATIVE_DOUBLE_g = H5I_register(H5I_DATATYPE, dt, false)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "can't register ID for built-in datatype");
H5T_NATIVE_DOUBLE_ALIGN_g = det.comp_align;
@@ -551,7 +551,7 @@ H5T__init_native_float_types(void)
dt->shared->u.atomic.u.f.pad = H5T_PAD_ZERO;
/* Register the type and set global variables */
- if ((H5T_NATIVE_LDOUBLE_g = H5I_register(H5I_DATATYPE, dt, FALSE)) < 0)
+ if ((H5T_NATIVE_LDOUBLE_g = H5I_register(H5I_DATATYPE, dt, false)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "can't register ID for built-in datatype");
H5T_NATIVE_LDOUBLE_ALIGN_g = det.comp_align;
diff --git a/src/H5Tmodule.h b/src/H5Tmodule.h
index 801d474cd24..b4f9289ec71 100644
--- a/src/H5Tmodule.h
+++ b/src/H5Tmodule.h
@@ -763,7 +763,7 @@
* #H5T_NATIVE_HBOOL
*
*
- * hbool_t
+ * bool
* |
*
*
diff --git a/src/H5Tnative.c b/src/H5Tnative.c
index 989efaa9c2e..f83e9c3a646 100644
--- a/src/H5Tnative.c
+++ b/src/H5Tnative.c
@@ -86,7 +86,7 @@ H5Tget_native_type(hid_t type_id, H5T_direction_t direction)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "cannot retrieve native type");
/* Get an ID for the new type */
- if ((ret_value = H5I_register(H5I_DATATYPE, new_dt, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_DATATYPE, new_dt, true)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register data type");
done:
@@ -137,7 +137,7 @@ H5T__get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_ali
assert(dtype);
- if (H5T_NO_CLASS == (h5_class = H5T_get_class(dtype, FALSE)))
+ if (H5T_NO_CLASS == (h5_class = H5T_get_class(dtype, false)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a valid class");
if (0 == (size = H5T_get_size(dtype)))
@@ -219,7 +219,7 @@ H5T__get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_ali
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type");
/* Update size, offset and compound alignment for parent. */
- if (0 == H5T_cmp(ret_value, dt, FALSE)) {
+ if (0 == H5T_cmp(ret_value, dt, false)) {
align = H5T_HOBJREF_ALIGN_g;
ref_size = sizeof(hobj_ref_t);
} /* end if */
@@ -228,7 +228,7 @@ H5T__get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_ali
if (NULL == (dt = (H5T_t *)H5I_object(H5T_STD_REF_DSETREG_g)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type");
- if (0 == H5T_cmp(ret_value, dt, FALSE)) {
+ if (0 == H5T_cmp(ret_value, dt, false)) {
align = H5T_HDSETREGREF_ALIGN_g;
ref_size = sizeof(hdset_reg_ref_t);
} /* end if */
@@ -344,9 +344,9 @@ H5T__get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_ali
H5T__get_native_type(super_type, direction, struct_align, offset, comp_size)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "base native type retrieval failed");
- if ((super_type_id = H5I_register(H5I_DATATYPE, super_type, FALSE)) < 0)
+ if ((super_type_id = H5I_register(H5I_DATATYPE, super_type, false)) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot register datatype");
- if ((nat_super_type_id = H5I_register(H5I_DATATYPE, nat_super_type, FALSE)) < 0)
+ if ((nat_super_type_id = H5I_register(H5I_DATATYPE, nat_super_type, false)) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot register datatype");
/* Allocate room for the enum values */
@@ -1240,7 +1240,7 @@ H5T__init_native_internal(void)
dt->shared->u.atomic.order = byte_order;
*table[j].alignmentp = table[j].alignment;
- if ((*table[j].hidp = H5I_register(H5I_DATATYPE, dt, FALSE)) < 0)
+ if ((*table[j].hidp = H5I_register(H5I_DATATYPE, dt, false)) < 0)
return FAIL;
}
}
diff --git a/src/H5Toh.c b/src/H5Toh.c
index 9269aa78d79..6d43561177b 100644
--- a/src/H5Toh.c
+++ b/src/H5Toh.c
@@ -75,8 +75,8 @@ const H5O_obj_class_t H5O_OBJ_DATATYPE[1] = {{
* Purpose: Determines if an object has the requisite messages for being
* a datatype.
*
- * Return: Success: TRUE if the required data type messages are
- * present; FALSE otherwise.
+ * Return: Success: true if the required data type messages are
+ * present; false otherwise.
*
* Failure: FAIL if the existence of certain messages
* cannot be determined.
diff --git a/src/H5Topaque.c b/src/H5Topaque.c
index 808eb8c4fdb..63282ec06e9 100644
--- a/src/H5Topaque.c
+++ b/src/H5Topaque.c
@@ -52,7 +52,7 @@ H5Tset_tag(hid_t type_id, const char *tag)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an opaque data type");
if (!tag)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no tag");
- if (HDstrlen(tag) >= H5T_OPAQUE_TAG_MAX)
+ if (strlen(tag) >= H5T_OPAQUE_TAG_MAX)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "tag too long");
/* Commit */
diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h
index 23fa960db0b..7a79d449c0f 100644
--- a/src/H5Tpkg.h
+++ b/src/H5Tpkg.h
@@ -156,7 +156,7 @@ typedef herr_t (*H5T_lib_conv_t)(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
/* Conversion callbacks (library internal ones don't need DXPL) */
typedef struct H5T_conv_func_t {
- hbool_t is_app; /* Whether conversion function is registered from application */
+ bool is_app; /* Whether conversion function is registered from application */
union {
H5T_conv_t app_func; /* Application data conversion function */
H5T_lib_conv_t lib_func; /* Library internal data conversion function */
@@ -169,18 +169,18 @@ struct H5T_path_t {
H5T_t *src; /*source datatype */
H5T_t *dst; /*destination datatype */
H5T_conv_func_t conv; /* Conversion function */
- hbool_t is_hard; /*is it a hard function? */
- hbool_t is_noop; /*is it the noop conversion? */
- hbool_t are_compounds; /*are source and dest both compounds?*/
+ bool is_hard; /*is it a hard function? */
+ bool is_noop; /*is it the noop conversion? */
+ bool are_compounds; /*are source and dest both compounds?*/
H5T_stats_t stats; /*statistics for the conversion */
H5T_cdata_t cdata; /*data for this function */
};
/* Reference function pointers */
-typedef herr_t (*H5T_ref_isnullfunc_t)(const H5VL_object_t *file, const void *src_buf, hbool_t *isnull);
+typedef herr_t (*H5T_ref_isnullfunc_t)(const H5VL_object_t *file, const void *src_buf, bool *isnull);
typedef herr_t (*H5T_ref_setnullfunc_t)(H5VL_object_t *file, void *dst_buf, void *bg_buf);
typedef size_t (*H5T_ref_getsizefunc_t)(H5VL_object_t *src_file, const void *src_buf, size_t src_size,
- H5VL_object_t *dst_file, hbool_t *dst_copy);
+ H5VL_object_t *dst_file, bool *dst_copy);
typedef herr_t (*H5T_ref_readfunc_t)(H5VL_object_t *src_file, const void *src_buf, size_t src_size,
H5VL_object_t *dst_file, void *dst_buf, size_t dst_size);
typedef herr_t (*H5T_ref_writefunc_t)(H5VL_object_t *src_file, const void *src_buf, size_t src_size,
@@ -225,7 +225,7 @@ typedef struct H5T_atomic_t {
struct {
H5R_type_t rtype; /* type of reference stored */
unsigned version; /* version of encoded reference */
- hbool_t opaque; /* opaque reference type */
+ bool opaque; /* opaque reference type */
H5T_loc_t loc; /* location of data in buffer */
H5VL_object_t *file; /* file VOL pointer (if data is on disk) */
const H5T_ref_class_t *cls; /* Pointer to ref class callbacks */
@@ -253,7 +253,7 @@ typedef struct H5T_compnd_t {
unsigned nalloc; /*num entries allocated in MEMB array*/
unsigned nmembs; /*number of members defined in struct*/
H5T_sort_t sorted; /*how are members sorted? */
- hbool_t packed; /*are members packed together? */
+ bool packed; /*are members packed together? */
H5T_cmemb_t *memb; /*array of struct members */
size_t memb_size; /*total of all member sizes */
} H5T_compnd_t;
@@ -278,7 +278,7 @@ typedef enum {
/* VL function pointers */
typedef herr_t (*H5T_vlen_getlen_func_t)(H5VL_object_t *file, const void *vl_addr, size_t *len);
typedef void *(*H5T_vlen_getptr_func_t)(void *vl_addr);
-typedef herr_t (*H5T_vlen_isnull_func_t)(const H5VL_object_t *file, void *vl_addr, hbool_t *isnull);
+typedef herr_t (*H5T_vlen_isnull_func_t)(const H5VL_object_t *file, void *vl_addr, bool *isnull);
typedef herr_t (*H5T_vlen_setnull_func_t)(H5VL_object_t *file, void *_vl, void *_bg);
typedef herr_t (*H5T_vlen_read_func_t)(H5VL_object_t *file, void *_vl, void *buf, size_t len);
typedef herr_t (*H5T_vlen_write_func_t)(H5VL_object_t *file, const H5T_vlen_alloc_info_t *vl_alloc_info,
@@ -334,8 +334,7 @@ typedef struct H5T_shared_t {
H5T_class_t type; /*which class of type is this? */
size_t size; /*total size of an instance of this type */
unsigned version; /* Version of object header message to encode this object with */
- hbool_t
- force_conv; /* Set if this type always needs to be converted and H5T__conv_noop cannot be called */
+ bool force_conv; /* Set if this type always needs to be converted and H5T__conv_noop cannot be called */
struct H5T_t *parent; /*parent type for derived datatypes */
H5VL_object_t *owned_vol_obj; /* Vol object owned by this type (free on close) */
union {
@@ -836,13 +835,13 @@ H5_DLL herr_t H5T__conv_ldouble_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *
H5_DLL void H5T__bit_copy(uint8_t *dst, size_t dst_offset, const uint8_t *src, size_t src_offset,
size_t size);
H5_DLL herr_t H5T__bit_shift(uint8_t *buf, ssize_t shift_dist, size_t offset, size_t size);
-H5_DLL void H5T__bit_set(uint8_t *buf, size_t offset, size_t size, hbool_t value);
+H5_DLL void H5T__bit_set(uint8_t *buf, size_t offset, size_t size, bool value);
H5_DLL uint64_t H5T__bit_get_d(uint8_t *buf, size_t offset, size_t size);
H5_DLL void H5T__bit_set_d(uint8_t *buf, size_t offset, size_t size, uint64_t val);
H5_DLL ssize_t H5T__bit_find(const uint8_t *buf, size_t offset, size_t size, H5T_sdir_t direction,
- hbool_t value);
-H5_DLL hbool_t H5T__bit_inc(uint8_t *buf, size_t start, size_t size);
-H5_DLL hbool_t H5T__bit_dec(uint8_t *buf, size_t start, size_t size);
+ bool value);
+H5_DLL bool H5T__bit_inc(uint8_t *buf, size_t start, size_t size);
+H5_DLL bool H5T__bit_dec(uint8_t *buf, size_t start, size_t size);
H5_DLL void H5T__bit_neg(uint8_t *buf, size_t start, size_t size);
/* VL functions */
diff --git a/src/H5Tprivate.h b/src/H5Tprivate.h
index a0c19cd9fc0..0332679e728 100644
--- a/src/H5Tprivate.h
+++ b/src/H5Tprivate.h
@@ -111,15 +111,15 @@ H5_DLLVAR H5T_order_t H5T_native_order_g;
H5_DLL herr_t H5T_init(void);
H5_DLL H5T_t *H5T_copy(const H5T_t *old_dt, H5T_copy_t method);
H5_DLL H5T_t *H5T_copy_reopen(H5T_t *old_dt);
-H5_DLL herr_t H5T_lock(H5T_t *dt, hbool_t immutable);
+H5_DLL herr_t H5T_lock(H5T_t *dt, bool immutable);
H5_DLL herr_t H5T_close(H5T_t *dt);
H5_DLL herr_t H5T_close_real(H5T_t *dt);
H5_DLL H5T_t *H5T_get_super(const H5T_t *dt);
H5_DLL H5T_class_t H5T_get_class(const H5T_t *dt, htri_t internal);
-H5_DLL htri_t H5T_detect_class(const H5T_t *dt, H5T_class_t cls, hbool_t from_api);
+H5_DLL htri_t H5T_detect_class(const H5T_t *dt, H5T_class_t cls, bool from_api);
H5_DLL size_t H5T_get_size(const H5T_t *dt);
-H5_DLL hbool_t H5T_get_force_conv(const H5T_t *dt);
-H5_DLL int H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset);
+H5_DLL bool H5T_get_force_conv(const H5T_t *dt);
+H5_DLL int H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, bool superset);
H5_DLL herr_t H5T_encode(H5T_t *obj, unsigned char *buf, size_t *nalloc);
H5_DLL H5T_t *H5T_decode(size_t buf_size, const unsigned char *buf);
H5_DLL herr_t H5T_debug(const H5T_t *dt, FILE *stream);
@@ -130,7 +130,7 @@ H5_DLL htri_t H5T_is_named(const H5T_t *dt);
H5_DLL herr_t H5T_convert_committed_datatype(H5T_t *dt, H5F_t *f);
H5_DLL htri_t H5T_is_relocatable(const H5T_t *dt);
H5_DLL H5T_path_t *H5T_path_find(const H5T_t *src, const H5T_t *dst);
-H5_DLL hbool_t H5T_path_noop(const H5T_path_t *p);
+H5_DLL bool H5T_path_noop(const H5T_path_t *p);
H5_DLL H5T_bkg_t H5T_path_bkg(const H5T_path_t *p);
H5_DLL H5T_subset_info_t *H5T_path_compound_subset(const H5T_path_t *p);
H5_DLL herr_t H5T_convert(H5T_path_t *tpath, hid_t src_id, hid_t dst_id, size_t nelmts, size_t buf_stride,
@@ -151,7 +151,7 @@ H5_DLL H5VL_object_t *H5T_get_named_type(const H5T_t *dt);
H5_DLL H5T_t *H5T_get_actual_type(H5T_t *dt);
H5_DLL herr_t H5T_save_refresh_state(hid_t tid, struct H5O_shared_t *cached_H5O_shared);
H5_DLL herr_t H5T_restore_refresh_state(hid_t tid, struct H5O_shared_t *cached_H5O_shared);
-H5_DLL hbool_t H5T_already_vol_managed(const H5T_t *dt);
+H5_DLL bool H5T_already_vol_managed(const H5T_t *dt);
H5_DLL htri_t H5T_is_vl_storage(const H5T_t *dt);
H5_DLL herr_t H5T_invoke_vol_optional(H5T_t *dt, H5VL_optional_args_t *args, hid_t dxpl_id, void **req,
H5VL_object_t **vol_obj_ptr);
diff --git a/src/H5Tref.c b/src/H5Tref.c
index ddc73ac5d36..cd603946bfa 100644
--- a/src/H5Tref.c
+++ b/src/H5Tref.c
@@ -71,20 +71,20 @@ struct H5Tref_dsetreg {
/* Local Prototypes */
/********************/
-static herr_t H5T__ref_mem_isnull(const H5VL_object_t *src_file, const void *src_buf, hbool_t *isnull);
+static herr_t H5T__ref_mem_isnull(const H5VL_object_t *src_file, const void *src_buf, bool *isnull);
static herr_t H5T__ref_mem_setnull(H5VL_object_t *dst_file, void *dst_buf, void *bg_buf);
static size_t H5T__ref_mem_getsize(H5VL_object_t *src_file, const void *src_buf, size_t src_size,
- H5VL_object_t *dst_file, hbool_t *dst_copy);
+ H5VL_object_t *dst_file, bool *dst_copy);
static herr_t H5T__ref_mem_read(H5VL_object_t *src_file, const void *src_buf, size_t src_size,
H5VL_object_t *dst_file, void *dst_buf, size_t dst_size);
static herr_t H5T__ref_mem_write(H5VL_object_t *src_file, const void *src_buf, size_t src_size,
H5R_type_t src_type, H5VL_object_t *dst_file, void *dst_buf, size_t dst_size,
void *bg_buf);
-static herr_t H5T__ref_disk_isnull(const H5VL_object_t *src_file, const void *src_buf, hbool_t *isnull);
+static herr_t H5T__ref_disk_isnull(const H5VL_object_t *src_file, const void *src_buf, bool *isnull);
static herr_t H5T__ref_disk_setnull(H5VL_object_t *dst_file, void *dst_buf, void *bg_buf);
static size_t H5T__ref_disk_getsize(H5VL_object_t *src_file, const void *src_buf, size_t src_size,
- H5VL_object_t *dst_file, hbool_t *dst_copy);
+ H5VL_object_t *dst_file, bool *dst_copy);
static herr_t H5T__ref_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t src_size,
H5VL_object_t *dst_file, void *dst_buf, size_t dst_size);
static herr_t H5T__ref_disk_write(H5VL_object_t *src_file, const void *src_buf, size_t src_size,
@@ -92,16 +92,15 @@ static herr_t H5T__ref_disk_write(H5VL_object_t *src_file, const void *src_buf,
size_t dst_size, void *bg_buf);
/* For compatibility */
-static herr_t H5T__ref_obj_disk_isnull(const H5VL_object_t *src_file, const void *src_buf, hbool_t *isnull);
+static herr_t H5T__ref_obj_disk_isnull(const H5VL_object_t *src_file, const void *src_buf, bool *isnull);
static size_t H5T__ref_obj_disk_getsize(H5VL_object_t *src_file, const void *src_buf, size_t src_size,
- H5VL_object_t *dst_file, hbool_t *dst_copy);
+ H5VL_object_t *dst_file, bool *dst_copy);
static herr_t H5T__ref_obj_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t src_size,
H5VL_object_t *dst_file, void *dst_buf, size_t dst_size);
-static herr_t H5T__ref_dsetreg_disk_isnull(const H5VL_object_t *src_file, const void *src_buf,
- hbool_t *isnull);
+static herr_t H5T__ref_dsetreg_disk_isnull(const H5VL_object_t *src_file, const void *src_buf, bool *isnull);
static size_t H5T__ref_dsetreg_disk_getsize(H5VL_object_t *src_file, const void *src_buf, size_t src_size,
- H5VL_object_t *dst_file, hbool_t *dst_copy);
+ H5VL_object_t *dst_file, bool *dst_copy);
static herr_t H5T__ref_dsetreg_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t src_size,
H5VL_object_t *dst_file, void *dst_buf, size_t dst_size);
@@ -150,8 +149,8 @@ static const H5T_ref_class_t H5T_ref_dsetreg_disk_g = {
*
* Return:
* One of two values on success:
- * TRUE - If the location of any reference types changed
- * FALSE - If the location of any reference types is the same
+ * true - If the location of any reference types changed
+ * false - If the location of any reference types is the same
* Negative value is returned on failure
*
*-------------------------------------------------------------------------
@@ -159,7 +158,7 @@ static const H5T_ref_class_t H5T_ref_dsetreg_disk_g = {
htri_t
H5T__ref_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
{
- htri_t ret_value = FALSE; /* Indicate success, but no location change */
+ htri_t ret_value = false; /* Indicate success, but no location change */
FUNC_ENTER_PACKAGE
H5T_REF_LOG_DEBUG("loc=%d", (int)loc);
@@ -170,7 +169,7 @@ H5T__ref_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
/* Only change the location if it's different */
if (loc == dt->shared->u.atomic.u.r.loc && file == dt->shared->u.atomic.u.r.file)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
switch (loc) {
case H5T_LOC_MEMORY: /* Memory based reference datatype */
@@ -237,7 +236,7 @@ H5T__ref_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
#ifndef NDEBUG
{
- hbool_t is_native = FALSE; /* Whether the file is using the native VOL connector */
+ bool is_native = false; /* Whether the file is using the native VOL connector */
/* Check if using native VOL connector */
if (H5VL_object_is_native(file, &is_native) < 0)
@@ -265,7 +264,7 @@ H5T__ref_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
#ifndef NDEBUG
{
- hbool_t is_native = FALSE; /* Whether the file is using the native VOL connector */
+ bool is_native = false; /* Whether the file is using the native VOL connector */
/* Check if using native VOL connector */
if (H5VL_object_is_native(file, &is_native) < 0)
@@ -342,7 +341,7 @@ H5T__ref_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
} /* end switch */
/* Indicate that the location changed */
- ret_value = TRUE;
+ ret_value = true;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -358,7 +357,7 @@ H5T__ref_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
*-------------------------------------------------------------------------
*/
static herr_t
-H5T__ref_mem_isnull(const H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf, hbool_t *isnull)
+H5T__ref_mem_isnull(const H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf, bool *isnull)
{
const unsigned char zeros[H5T_REF_MEM_SIZE] = {0};
herr_t ret_value = SUCCEED;
@@ -370,7 +369,7 @@ H5T__ref_mem_isnull(const H5VL_object_t H5_ATTR_UNUSED *src_file, const void *sr
assert(src_buf);
assert(isnull);
- *isnull = (0 == memcmp(src_buf, zeros, H5T_REF_MEM_SIZE)) ? TRUE : FALSE;
+ *isnull = (0 == memcmp(src_buf, zeros, H5T_REF_MEM_SIZE)) ? true : false;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__ref_mem_isnull() */
@@ -408,7 +407,7 @@ H5T__ref_mem_setnull(H5VL_object_t H5_ATTR_UNUSED *dst_file, void *dst_buf, H5_A
*/
static size_t
H5T__ref_mem_getsize(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf,
- size_t H5_ATTR_UNUSED src_size, H5VL_object_t *dst_file, hbool_t *dst_copy)
+ size_t H5_ATTR_UNUSED src_size, H5VL_object_t *dst_file, bool *dst_copy)
{
H5VL_object_t *vol_obj = NULL; /* VOL object for src ref's location */
const H5R_ref_priv_t *src_ref = (const H5R_ref_priv_t *)src_buf;
@@ -425,7 +424,7 @@ H5T__ref_mem_getsize(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf
assert(src_size == H5T_REF_MEM_SIZE);
if (NULL != dst_file) {
- hbool_t files_equal = TRUE; /* Whether src & dst references are in same file */
+ bool files_equal = true; /* Whether src & dst references are in same file */
/* Retrieve VOL object */
if (NULL == (vol_obj = H5VL_vol_object(src_ref->loc_id)))
@@ -447,7 +446,7 @@ H5T__ref_mem_getsize(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf
/* Pass the correct encoding version for the selection depending on the
* file libver bounds, this is later retrieved in H5S hyper encode */
if (src_ref->type == (int8_t)H5R_DATASET_REGION2) {
- hbool_t is_native = FALSE; /* Whether the dest. file is using the native VOL connector */
+ bool is_native = false; /* Whether the dest. file is using the native VOL connector */
/* Check if using native VOL connector */
if (H5VL_object_is_native(dst_file, &is_native) < 0)
@@ -502,7 +501,7 @@ H5T__ref_mem_getsize(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf
else {
/* Can do a direct copy and skip blob decoding */
if (src_ref->type == (int8_t)H5R_OBJECT2)
- *dst_copy = TRUE;
+ *dst_copy = true;
/* Get cached encoding size */
ret_value = src_ref->encode_size;
@@ -529,7 +528,7 @@ H5T__ref_mem_read(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf, s
{
H5VL_object_t *vol_obj; /* VOL object for src ref's location */
const H5R_ref_priv_t *src_ref = (const H5R_ref_priv_t *)src_buf;
- hbool_t files_equal = TRUE; /* Whether src & dst references are in same file */
+ bool files_equal = true; /* Whether src & dst references are in same file */
char *file_name = NULL; /* Actual file name */
char file_name_buf_static[256] = {'\0'}; /* File name */
char *file_name_buf_dyn =
@@ -564,7 +563,7 @@ H5T__ref_mem_read(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf, s
/* Pass the correct encoding version for the selection depending on the
* file libver bounds, this is later retrieved in H5S hyper encode */
if (src_ref->type == (int8_t)H5R_DATASET_REGION2) {
- hbool_t is_native = FALSE; /* Whether the dest. file is using the native VOL connector */
+ bool is_native = false; /* Whether the dest. file is using the native VOL connector */
/* Check if using native VOL connector */
if (H5VL_object_is_native(dst_file, &is_native) < 0)
@@ -666,7 +665,7 @@ H5T__ref_mem_write(H5VL_object_t *src_file, const void *src_buf, size_t src_size
#ifndef NDEBUG
if ((src_type == H5R_OBJECT1) || (src_type == H5R_DATASET_REGION1)) {
- hbool_t is_native = FALSE; /* Whether the src file is using the native VOL connector */
+ bool is_native = false; /* Whether the src file is using the native VOL connector */
/* Check if using native VOL connector */
if (H5VL_object_is_native(src_file, &is_native) < 0)
@@ -727,17 +726,17 @@ H5T__ref_mem_write(H5VL_object_t *src_file, const void *src_buf, size_t src_size
/* If no filename set, this is not an external reference */
if (NULL == H5R_REF_FILENAME(&tmp_ref)) {
/* TODO temporary hack to retrieve file object */
- if ((file_id = H5F_get_file_id(src_file, H5I_FILE, FALSE)) < 0)
+ if ((file_id = H5F_get_file_id(src_file, H5I_FILE, false)) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object");
/* Attach loc ID to reference and hold reference to it, this is a
- * user exposed reference so set app_ref to TRUE. */
- if (H5R__set_loc_id(&tmp_ref, file_id, TRUE, TRUE) < 0)
+ * user exposed reference so set app_ref to true. */
+ if (H5R__set_loc_id(&tmp_ref, file_id, true, true) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "unable to attach location id to reference");
} /* end if */
/* Set output info */
- memcpy(dst_ref, &tmp_ref, sizeof(tmp_ref));
+ H5MM_memcpy(dst_ref, &tmp_ref, sizeof(tmp_ref));
done:
if ((file_id != H5I_INVALID_HID) && (H5I_dec_ref(file_id) < 0))
@@ -763,7 +762,7 @@ H5T__ref_mem_write(H5VL_object_t *src_file, const void *src_buf, size_t src_size
*/
H5_GCC_CLANG_DIAG_OFF("cast-qual")
static herr_t
-H5T__ref_disk_isnull(const H5VL_object_t *src_file, const void *src_buf, hbool_t *isnull)
+H5T__ref_disk_isnull(const H5VL_object_t *src_file, const void *src_buf, bool *isnull)
{
const uint8_t *p = (const uint8_t *)src_buf;
H5R_type_t ref_type;
@@ -781,7 +780,7 @@ H5T__ref_disk_isnull(const H5VL_object_t *src_file, const void *src_buf, hbool_t
ref_type = (H5R_type_t)*p++;
if (ref_type) {
/* This is a valid reference */
- *isnull = FALSE;
+ *isnull = false;
}
else {
H5VL_blob_specific_args_t vol_cb_args; /* Arguments to VOL callback */
@@ -868,7 +867,7 @@ H5T__ref_disk_setnull(H5VL_object_t *dst_file, void *dst_buf, void *bg_buf)
*/
static size_t
H5T__ref_disk_getsize(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf, size_t src_size,
- H5VL_object_t H5_ATTR_UNUSED *dst_file, hbool_t *dst_copy)
+ H5VL_object_t H5_ATTR_UNUSED *dst_file, bool *dst_copy)
{
const uint8_t *p = (const uint8_t *)src_buf;
unsigned flags;
@@ -890,7 +889,7 @@ H5T__ref_disk_getsize(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_bu
if (!(flags & H5R_IS_EXTERNAL) && (ref_type == H5R_OBJECT2)) {
/* Can do a direct copy and skip blob decoding */
- *dst_copy = TRUE;
+ *dst_copy = true;
ret_value = src_size;
} /* end if */
@@ -1031,7 +1030,7 @@ H5T__ref_disk_write(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf,
*-------------------------------------------------------------------------
*/
static herr_t
-H5T__ref_obj_disk_isnull(const H5VL_object_t *src_file, const void *src_buf, hbool_t *isnull)
+H5T__ref_obj_disk_isnull(const H5VL_object_t *src_file, const void *src_buf, bool *isnull)
{
H5F_t *src_f;
const uint8_t *p = (const uint8_t *)src_buf;
@@ -1048,7 +1047,7 @@ H5T__ref_obj_disk_isnull(const H5VL_object_t *src_file, const void *src_buf, hbo
#ifndef NDEBUG
{
- hbool_t is_native = FALSE; /* Whether the src file is using the native VOL connector */
+ bool is_native = false; /* Whether the src file is using the native VOL connector */
/* Check if using native VOL connector */
if (H5VL_object_is_native(src_file, &is_native) < 0)
@@ -1067,7 +1066,7 @@ H5T__ref_obj_disk_isnull(const H5VL_object_t *src_file, const void *src_buf, hbo
H5F_addr_decode(src_f, &p, &addr);
/* Check if heap address is 'nil' */
- *isnull = (addr == 0) ? TRUE : FALSE;
+ *isnull = (addr == 0) ? true : false;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1085,7 +1084,7 @@ H5T__ref_obj_disk_isnull(const H5VL_object_t *src_file, const void *src_buf, hbo
static size_t
H5T__ref_obj_disk_getsize(H5VL_object_t *src_file, const void H5_ATTR_UNUSED *src_buf,
size_t H5_ATTR_UNUSED src_size, H5VL_object_t H5_ATTR_UNUSED *dst_file,
- hbool_t H5_ATTR_UNUSED *dst_copy)
+ bool H5_ATTR_UNUSED *dst_copy)
{
H5F_t *src_f;
size_t ret_value = 0;
@@ -1098,7 +1097,7 @@ H5T__ref_obj_disk_getsize(H5VL_object_t *src_file, const void H5_ATTR_UNUSED *sr
#ifndef NDEBUG
{
- hbool_t is_native = FALSE; /* Whether the src file is using the native VOL connector */
+ bool is_native = false; /* Whether the src file is using the native VOL connector */
/* Check if using native VOL connector */
if (H5VL_object_is_native(src_file, &is_native) < 0)
@@ -1146,7 +1145,7 @@ H5T__ref_obj_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t src_
#ifndef NDEBUG
{
- hbool_t is_native = FALSE; /* Whether the src file is using the native VOL connector */
+ bool is_native = false; /* Whether the src file is using the native VOL connector */
/* Check if using native VOL connector */
if (H5VL_object_is_native(src_file, &is_native) < 0)
@@ -1183,7 +1182,7 @@ H5T__ref_obj_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t src_
*-------------------------------------------------------------------------
*/
static herr_t
-H5T__ref_dsetreg_disk_isnull(const H5VL_object_t *src_file, const void *src_buf, hbool_t *isnull)
+H5T__ref_dsetreg_disk_isnull(const H5VL_object_t *src_file, const void *src_buf, bool *isnull)
{
H5F_t *src_f;
const uint8_t *p = (const uint8_t *)src_buf;
@@ -1200,7 +1199,7 @@ H5T__ref_dsetreg_disk_isnull(const H5VL_object_t *src_file, const void *src_buf,
#ifndef NDEBUG
{
- hbool_t is_native = FALSE; /* Whether the src file is using the native VOL connector */
+ bool is_native = false; /* Whether the src file is using the native VOL connector */
/* Check if using native VOL connector */
if (H5VL_object_is_native(src_file, &is_native) < 0)
@@ -1219,7 +1218,7 @@ H5T__ref_dsetreg_disk_isnull(const H5VL_object_t *src_file, const void *src_buf,
H5F_addr_decode(src_f, &p, &addr);
/* Check if heap address is 'nil' */
- *isnull = (addr == 0) ? TRUE : FALSE;
+ *isnull = (addr == 0) ? true : false;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1237,7 +1236,7 @@ H5T__ref_dsetreg_disk_isnull(const H5VL_object_t *src_file, const void *src_buf,
static size_t
H5T__ref_dsetreg_disk_getsize(H5VL_object_t H5_ATTR_UNUSED *src_file, const void H5_ATTR_UNUSED *src_buf,
size_t H5_ATTR_UNUSED src_size, H5VL_object_t H5_ATTR_UNUSED *dst_file,
- hbool_t H5_ATTR_UNUSED *dst_copy)
+ bool H5_ATTR_UNUSED *dst_copy)
{
size_t ret_value = sizeof(struct H5Tref_dsetreg);
@@ -1252,8 +1251,8 @@ H5T__ref_dsetreg_disk_getsize(H5VL_object_t H5_ATTR_UNUSED *src_file, const void
#ifndef NDEBUG
{
- H5F_t *src_f;
- hbool_t is_native = FALSE; /* Whether the src file is using the native VOL connector */
+ H5F_t *src_f;
+ bool is_native = false; /* Whether the src file is using the native VOL connector */
/* Check if using native VOL connector */
if (H5VL_object_is_native(src_file, &is_native) < 0)
@@ -1304,7 +1303,7 @@ H5T__ref_dsetreg_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t
#ifndef NDEBUG
{
- hbool_t is_native = FALSE; /* Whether the src file is using the native VOL connector */
+ bool is_native = false; /* Whether the src file is using the native VOL connector */
/* Check if using native VOL connector */
if (H5VL_object_is_native(src_file, &is_native) < 0)
diff --git a/src/H5Tvisit.c b/src/H5Tvisit.c
index 73c05cbb239..dd328c0aa15 100644
--- a/src/H5Tvisit.c
+++ b/src/H5Tvisit.c
@@ -80,8 +80,8 @@
herr_t
H5T__visit(H5T_t *dt, unsigned visit_flags, H5T_operator_t op, void *op_value)
{
- hbool_t is_complex; /* Flag indicating current datatype is "complex" */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool is_complex; /* Flag indicating current datatype is "complex" */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
diff --git a/src/H5Tvlen.c b/src/H5Tvlen.c
index 87f06000929..68087a8e134 100644
--- a/src/H5Tvlen.c
+++ b/src/H5Tvlen.c
@@ -53,7 +53,7 @@
/* Memory-based VL sequence callbacks */
static herr_t H5T__vlen_mem_seq_getlen(H5VL_object_t *file, const void *_vl, size_t *len);
static void *H5T__vlen_mem_seq_getptr(void *_vl);
-static herr_t H5T__vlen_mem_seq_isnull(const H5VL_object_t *file, void *_vl, hbool_t *isnull);
+static herr_t H5T__vlen_mem_seq_isnull(const H5VL_object_t *file, void *_vl, bool *isnull);
static herr_t H5T__vlen_mem_seq_setnull(H5VL_object_t *file, void *_vl, void *_bg);
static herr_t H5T__vlen_mem_seq_read(H5VL_object_t *file, void *_vl, void *_buf, size_t len);
static herr_t H5T__vlen_mem_seq_write(H5VL_object_t *file, const H5T_vlen_alloc_info_t *vl_alloc_info,
@@ -62,7 +62,7 @@ static herr_t H5T__vlen_mem_seq_write(H5VL_object_t *file, const H5T_vlen_alloc_
/* Memory-based VL string callbacks */
static herr_t H5T__vlen_mem_str_getlen(H5VL_object_t *file, const void *_vl, size_t *len);
static void *H5T__vlen_mem_str_getptr(void *_vl);
-static herr_t H5T__vlen_mem_str_isnull(const H5VL_object_t *file, void *_vl, hbool_t *isnull);
+static herr_t H5T__vlen_mem_str_isnull(const H5VL_object_t *file, void *_vl, bool *isnull);
static herr_t H5T__vlen_mem_str_setnull(H5VL_object_t *file, void *_vl, void *_bg);
static herr_t H5T__vlen_mem_str_read(H5VL_object_t *file, void *_vl, void *_buf, size_t len);
static herr_t H5T__vlen_mem_str_write(H5VL_object_t *file, const H5T_vlen_alloc_info_t *vl_alloc_info,
@@ -70,7 +70,7 @@ static herr_t H5T__vlen_mem_str_write(H5VL_object_t *file, const H5T_vlen_alloc_
/* Disk-based VL sequence (and string) callbacks */
static herr_t H5T__vlen_disk_getlen(H5VL_object_t *file, const void *_vl, size_t *len);
-static herr_t H5T__vlen_disk_isnull(const H5VL_object_t *file, void *_vl, hbool_t *isnull);
+static herr_t H5T__vlen_disk_isnull(const H5VL_object_t *file, void *_vl, bool *isnull);
static herr_t H5T__vlen_disk_setnull(H5VL_object_t *file, void *_vl, void *_bg);
static herr_t H5T__vlen_disk_read(H5VL_object_t *file, void *_vl, void *_buf, size_t len);
static herr_t H5T__vlen_disk_write(H5VL_object_t *file, const H5T_vlen_alloc_info_t *vl_alloc_info, void *_vl,
@@ -157,7 +157,7 @@ H5Tvlen_create(hid_t base_id)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "invalid VL location");
/* Register the type */
- if ((ret_value = H5I_register(H5I_DATATYPE, dt, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_DATATYPE, dt, true)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register datatype");
done:
@@ -196,7 +196,7 @@ H5T__vlen_create(const H5T_t *base)
* Force conversions (i.e. memory to memory conversions should duplicate
* data, not point to the same VL sequences)
*/
- dt->shared->force_conv = TRUE;
+ dt->shared->force_conv = true;
if (NULL == (dt->shared->parent = H5T_copy(base, H5T_COPY_ALL)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "can't copy base datatype");
@@ -228,8 +228,8 @@ H5T__vlen_create(const H5T_t *base)
*
* Return:
* One of two values on success:
- * TRUE - If the location of any vlen types changed
- * FALSE - If the location of any vlen types is the same
+ * true - If the location of any vlen types changed
+ * false - If the location of any vlen types is the same
* <0 is returned on failure
*
*-------------------------------------------------------------------------
@@ -237,7 +237,7 @@ H5T__vlen_create(const H5T_t *base)
htri_t
H5T__vlen_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
{
- htri_t ret_value = FALSE; /* Indicate success, but no location change */
+ htri_t ret_value = false; /* Indicate success, but no location change */
FUNC_ENTER_PACKAGE
@@ -337,7 +337,7 @@ H5T__vlen_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
} /* end switch */ /*lint !e788 All appropriate cases are covered */
/* Indicate that the location changed */
- ret_value = TRUE;
+ ret_value = true;
} /* end if */
done:
@@ -360,14 +360,11 @@ H5T__vlen_mem_seq_getlen(H5VL_object_t H5_ATTR_UNUSED *file, const void *_vl, si
FUNC_ENTER_PACKAGE_NOERR
- /* Check parameter */
assert(_vl);
assert(len);
- /* Copy to ensure correct alignment. memcpy is best here because
- * it optimizes to fast code.
- */
- memcpy(&vl, _vl, sizeof(hvl_t));
+ /* Copy to ensure correct alignment */
+ H5MM_memcpy(&vl, _vl, sizeof(hvl_t));
*len = vl.len;
@@ -390,10 +387,10 @@ H5T__vlen_mem_seq_getptr(void *_vl)
FUNC_ENTER_PACKAGE_NOERR
- /* check parameters, return result */
assert(_vl);
- /* Copy to ensure correct alignment. */
- memcpy(&vl, _vl, sizeof(hvl_t));
+
+ /* Copy to ensure correct alignment */
+ H5MM_memcpy(&vl, _vl, sizeof(hvl_t));
FUNC_LEAVE_NOAPI(vl.p)
} /* end H5T__vlen_mem_seq_getptr() */
@@ -408,19 +405,18 @@ H5T__vlen_mem_seq_getptr(void *_vl)
*-------------------------------------------------------------------------
*/
static herr_t
-H5T__vlen_mem_seq_isnull(const H5VL_object_t H5_ATTR_UNUSED *file, void *_vl, hbool_t *isnull)
+H5T__vlen_mem_seq_isnull(const H5VL_object_t H5_ATTR_UNUSED *file, void *_vl, bool *isnull)
{
hvl_t vl; /* User's hvl_t information */
FUNC_ENTER_PACKAGE_NOERR
- /* Check parameters */
assert(_vl);
- /* Copy to ensure correct alignment. */
- memcpy(&vl, _vl, sizeof(hvl_t));
+ /* Copy to ensure correct alignment */
+ H5MM_memcpy(&vl, _vl, sizeof(hvl_t));
- *isnull = ((vl.len == 0 || vl.p == NULL) ? TRUE : FALSE);
+ *isnull = ((vl.len == 0 || vl.p == NULL) ? true : false);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5T__vlen_mem_seq_isnull() */
@@ -470,11 +466,11 @@ H5T__vlen_mem_seq_read(H5VL_object_t H5_ATTR_UNUSED *file, void *_vl, void *buf,
FUNC_ENTER_PACKAGE_NOERR
- /* check parameters, copy data */
assert(buf);
assert(_vl);
- /* Copy to ensure correct alignment. */
- memcpy(&vl, _vl, sizeof(hvl_t));
+
+ /* Copy to ensure correct alignment */
+ H5MM_memcpy(&vl, _vl, sizeof(hvl_t));
assert(vl.p);
H5MM_memcpy(buf, vl.p, len);
@@ -549,13 +545,12 @@ H5T__vlen_mem_str_getlen(H5VL_object_t H5_ATTR_UNUSED *file, const void *_vl, si
FUNC_ENTER_PACKAGE_NOERR
- /* check parameters */
assert(_vl);
- /* Copy to ensure correct alignment. */
- memcpy(&s, _vl, sizeof(char *));
+ /* Copy to ensure correct alignment */
+ H5MM_memcpy(&s, _vl, sizeof(char *));
- *len = HDstrlen(s);
+ *len = strlen(s);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5T__vlen_mem_str_getlen() */
@@ -576,10 +571,10 @@ H5T__vlen_mem_str_getptr(void *_vl)
FUNC_ENTER_PACKAGE_NOERR
- /* check parameters */
assert(_vl);
- /* Copy to ensure correct alignment. */
- memcpy(&s, _vl, sizeof(char *));
+
+ /* Copy to ensure correct alignment */
+ H5MM_memcpy(&s, _vl, sizeof(char *));
FUNC_LEAVE_NOAPI(s)
} /* end H5T__vlen_mem_str_getptr() */
@@ -594,16 +589,16 @@ H5T__vlen_mem_str_getptr(void *_vl)
*-------------------------------------------------------------------------
*/
static herr_t
-H5T__vlen_mem_str_isnull(const H5VL_object_t H5_ATTR_UNUSED *file, void *_vl, hbool_t *isnull)
+H5T__vlen_mem_str_isnull(const H5VL_object_t H5_ATTR_UNUSED *file, void *_vl, bool *isnull)
{
char *s = NULL; /* Pointer to the user's string information */
FUNC_ENTER_PACKAGE_NOERR
- /* Copy to ensure correct alignment. */
- memcpy(&s, _vl, sizeof(char *));
+ /* Copy to ensure correct alignment */
+ H5MM_memcpy(&s, _vl, sizeof(char *));
- *isnull = (s == NULL ? TRUE : FALSE);
+ *isnull = (s == NULL ? true : false);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5T__vlen_mem_str_isnull() */
@@ -647,14 +642,13 @@ H5T__vlen_mem_str_read(H5VL_object_t H5_ATTR_UNUSED *file, void *_vl, void *buf,
FUNC_ENTER_PACKAGE_NOERR
if (len > 0) {
- /* check parameters */
assert(buf);
assert(_vl);
- /* Copy to ensure correct alignment. */
- memcpy(&s, _vl, sizeof(char *));
+ /* Copy to ensure correct alignment */
+ H5MM_memcpy(&s, _vl, sizeof(char *));
H5MM_memcpy(buf, s, len);
- } /* end if */
+ }
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5T__vlen_mem_str_read() */
@@ -740,7 +734,7 @@ H5T__vlen_disk_getlen(H5VL_object_t H5_ATTR_UNUSED *file, const void *_vl, size_
*-------------------------------------------------------------------------
*/
static herr_t
-H5T__vlen_disk_isnull(const H5VL_object_t *file, void *_vl, hbool_t *isnull)
+H5T__vlen_disk_isnull(const H5VL_object_t *file, void *_vl, bool *isnull)
{
H5VL_blob_specific_args_t vol_cb_args; /* Arguments to VOL callback */
uint8_t *vl = (uint8_t *)_vl; /* Pointer to the user's hvl_t information */
diff --git a/src/H5VL.c b/src/H5VL.c
index 53c72f70dd5..1b5186bf793 100644
--- a/src/H5VL.c
+++ b/src/H5VL.c
@@ -90,11 +90,11 @@ H5VLregister_connector(const H5VL_class_t *cls, hid_t vipl_id)
/* Check VOL initialization property list */
if (H5P_DEFAULT == vipl_id)
vipl_id = H5P_VOL_INITIALIZE_DEFAULT;
- else if (TRUE != H5P_isa_class(vipl_id, H5P_VOL_INITIALIZE))
+ else if (true != H5P_isa_class(vipl_id, H5P_VOL_INITIALIZE))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a VOL initialize property list");
/* Register connector */
- if ((ret_value = H5VL__register_connector_by_class(cls, TRUE, vipl_id)) < 0)
+ if ((ret_value = H5VL__register_connector_by_class(cls, true, vipl_id)) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register VOL connector");
done:
@@ -129,18 +129,18 @@ H5VLregister_connector_by_name(const char *name, hid_t vipl_id)
/* Check arguments */
if (!name)
HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, H5I_INVALID_HID, "null VOL connector name is disallowed");
- if (0 == HDstrlen(name))
+ if (0 == strlen(name))
HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, H5I_INVALID_HID,
"zero-length VOL connector name is disallowed");
/* Check VOL initialization property list */
if (H5P_DEFAULT == vipl_id)
vipl_id = H5P_VOL_INITIALIZE_DEFAULT;
- else if (TRUE != H5P_isa_class(vipl_id, H5P_VOL_INITIALIZE))
+ else if (true != H5P_isa_class(vipl_id, H5P_VOL_INITIALIZE))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a VOL initialize property list");
/* Register connector */
- if ((ret_value = H5VL__register_connector_by_name(name, TRUE, vipl_id)) < 0)
+ if ((ret_value = H5VL__register_connector_by_name(name, true, vipl_id)) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register VOL connector");
done:
@@ -180,11 +180,11 @@ H5VLregister_connector_by_value(H5VL_class_value_t value, hid_t vipl_id)
/* Check VOL initialization property list */
if (H5P_DEFAULT == vipl_id)
vipl_id = H5P_VOL_INITIALIZE_DEFAULT;
- else if (TRUE != H5P_isa_class(vipl_id, H5P_VOL_INITIALIZE))
+ else if (true != H5P_isa_class(vipl_id, H5P_VOL_INITIALIZE))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a VOL initialize property list");
/* Register connector */
- if ((ret_value = H5VL__register_connector_by_value(value, TRUE, vipl_id)) < 0)
+ if ((ret_value = H5VL__register_connector_by_value(value, true, vipl_id)) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register VOL connector");
done:
@@ -206,7 +206,7 @@ H5VLregister_connector_by_value(H5VL_class_value_t value, hid_t vipl_id)
htri_t
H5VLis_connector_registered_by_name(const char *name)
{
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE1("t", "*s", name);
@@ -234,7 +234,7 @@ H5VLis_connector_registered_by_name(const char *name)
htri_t
H5VLis_connector_registered_by_value(H5VL_class_value_t connector_value)
{
- htri_t ret_value = FALSE;
+ htri_t ret_value = false;
FUNC_ENTER_API(FAIL)
H5TRACE1("t", "VC", connector_value);
@@ -268,7 +268,7 @@ H5VLget_connector_id(hid_t obj_id)
H5TRACE1("i", "i", obj_id);
/* Get connector ID */
- if ((ret_value = H5VL__get_connector_id(obj_id, TRUE)) < 0)
+ if ((ret_value = H5VL__get_connector_id(obj_id, true)) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, H5I_INVALID_HID, "can't get VOL id");
done:
@@ -298,7 +298,7 @@ H5VLget_connector_id_by_name(const char *name)
H5TRACE1("i", "*s", name);
/* Get connector ID with this name */
- if ((ret_value = H5VL__get_connector_id_by_name(name, TRUE)) < 0)
+ if ((ret_value = H5VL__get_connector_id_by_name(name, true)) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, H5I_INVALID_HID, "can't get VOL id");
done:
@@ -328,7 +328,7 @@ H5VLget_connector_id_by_value(H5VL_class_value_t connector_value)
H5TRACE1("i", "VC", connector_value);
/* Get connector ID with this value */
- if ((ret_value = H5VL__get_connector_id_by_value(connector_value, TRUE)) < 0)
+ if ((ret_value = H5VL__get_connector_id_by_value(connector_value, true)) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, H5I_INVALID_HID, "can't get VOL id");
done:
@@ -494,7 +494,7 @@ H5VLunregister_connector(hid_t vol_id)
HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, FAIL, "not a VOL connector ID");
/* For the time being, we disallow unregistering the native VOL connector */
- if (H5I_INVALID_HID == (native_id = H5VL__get_connector_id_by_name(H5VL_NATIVE_NAME, FALSE)))
+ if (H5I_INVALID_HID == (native_id = H5VL__get_connector_id_by_name(H5VL_NATIVE_NAME, false)))
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "unable to find the native VOL connector ID");
if (vol_id == native_id)
HGOTO_ERROR(H5E_VOL, H5E_BADVALUE, FAIL, "unregistering the native VOL connector is not allowed");
@@ -609,7 +609,7 @@ H5VLwrap_register(void *obj, H5I_type_t type)
HGOTO_ERROR(H5E_VOL, H5E_BADVALUE, H5I_INVALID_HID, "obj is NULL");
/* Wrap the object and register an ID for it */
- if ((ret_value = H5VL_wrap_register(type, obj, TRUE)) < 0)
+ if ((ret_value = H5VL_wrap_register(type, obj, true)) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to wrap object");
done:
@@ -707,7 +707,7 @@ H5VLget_file_type(void *file_obj, hid_t connector_id, hid_t dtype_id)
if (NULL == (dtype = (H5T_t *)H5I_object_verify(dtype_id, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type");
- /* Create VOL object for file if necessary (force_conv will be TRUE if and
+ /* Create VOL object for file if necessary (force_conv will be true if and
* only if file needs to be passed to H5T_set_loc) */
if (H5T_GET_FORCE_CONV(dtype) &&
(NULL == (file_vol_obj = H5VL_create_object_using_vol_id(H5I_FILE, file_obj, connector_id))))
@@ -718,7 +718,7 @@ H5VLget_file_type(void *file_obj, hid_t connector_id, hid_t dtype_id)
HGOTO_ERROR(H5E_VOL, H5E_CANTCOPY, FAIL, "unable to copy datatype");
/* Register file type id */
- if ((file_type_id = H5I_register(H5I_DATATYPE, file_type, FALSE)) < 0) {
+ if ((file_type_id = H5I_register(H5I_DATATYPE, file_type, false)) < 0) {
(void)H5T_close_real(file_type);
HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, FAIL, "unable to register file datatype");
} /* end if */
diff --git a/src/H5VLcallback.c b/src/H5VLcallback.c
index e1dda22a31d..fe0f0aae150 100644
--- a/src/H5VLcallback.c
+++ b/src/H5VLcallback.c
@@ -345,7 +345,7 @@ H5VL__common_optional_op(hid_t id, H5I_type_t id_type, H5VL_reg_opt_oper_t reg_o
{
H5VL_object_t *tmp_vol_obj = NULL; /* Object for id */
H5VL_object_t **vol_obj_ptr = (_vol_obj_ptr ? _vol_obj_ptr : &tmp_vol_obj); /* Ptr to object ptr for id */
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -357,7 +357,7 @@ H5VL__common_optional_op(hid_t id, H5I_type_t id_type, H5VL_reg_opt_oper_t reg_o
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(*vol_obj_ptr) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
/* (Must return value from callback, for iterators) */
@@ -1018,15 +1018,15 @@ void *
H5VL_attr_create(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_params, const char *name,
hid_t type_id, hid_t space_id, hid_t acpl_id, hid_t aapl_id, hid_t dxpl_id, void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- void *ret_value = NULL; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ void *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (NULL == (ret_value = H5VL__attr_create(vol_obj->data, loc_params, vol_obj->connector->cls, name,
@@ -1122,15 +1122,15 @@ void *
H5VL_attr_open(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_params, const char *name,
hid_t aapl_id, hid_t dxpl_id, void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- void *ret_value = NULL; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ void *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (NULL == (ret_value = H5VL__attr_open(vol_obj->data, loc_params, vol_obj->connector->cls, name,
@@ -1221,15 +1221,15 @@ H5VL__attr_read(void *obj, const H5VL_class_t *cls, hid_t mem_type_id, void *buf
herr_t
H5VL_attr_read(const H5VL_object_t *vol_obj, hid_t mem_type_id, void *buf, hid_t dxpl_id, void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (H5VL__attr_read(vol_obj->data, vol_obj->connector->cls, mem_type_id, buf, dxpl_id, req) < 0)
@@ -1319,15 +1319,15 @@ H5VL__attr_write(void *obj, const H5VL_class_t *cls, hid_t mem_type_id, const vo
herr_t
H5VL_attr_write(const H5VL_object_t *vol_obj, hid_t mem_type_id, const void *buf, hid_t dxpl_id, void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (H5VL__attr_write(vol_obj->data, vol_obj->connector->cls, mem_type_id, buf, dxpl_id, req) < 0)
@@ -1417,15 +1417,15 @@ H5VL__attr_get(void *obj, const H5VL_class_t *cls, H5VL_attr_get_args_t *args, h
herr_t
H5VL_attr_get(const H5VL_object_t *vol_obj, H5VL_attr_get_args_t *args, hid_t dxpl_id, void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (H5VL__attr_get(vol_obj->data, vol_obj->connector->cls, args, dxpl_id, req) < 0)
@@ -1519,15 +1519,15 @@ herr_t
H5VL_attr_specific(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_params,
H5VL_attr_specific_args_t *args, hid_t dxpl_id, void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
/* (Must return value from callback, for iterators) */
@@ -1621,15 +1621,15 @@ H5VL__attr_optional(void *obj, const H5VL_class_t *cls, H5VL_optional_args_t *ar
herr_t
H5VL_attr_optional(const H5VL_object_t *vol_obj, H5VL_optional_args_t *args, hid_t dxpl_id, void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
/* (Must return value from callback, for iterators) */
@@ -1859,15 +1859,15 @@ H5VL_dataset_create(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_p
hid_t lcpl_id, hid_t type_id, hid_t space_id, hid_t dcpl_id, hid_t dapl_id, hid_t dxpl_id,
void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- void *ret_value = NULL; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ void *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (NULL ==
@@ -1964,15 +1964,15 @@ void *
H5VL_dataset_open(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_params, const char *name,
hid_t dapl_id, hid_t dxpl_id, void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- void *ret_value = NULL; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ void *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (NULL == (ret_value = H5VL__dataset_open(vol_obj->data, loc_params, vol_obj->connector->cls, name,
@@ -2069,7 +2069,7 @@ herr_t
H5VL_dataset_read_direct(size_t count, void *obj[], H5VL_t *connector, hid_t mem_type_id[],
hid_t mem_space_id[], hid_t file_space_id[], hid_t dxpl_id, void *buf[], void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
H5VL_object_t tmp_vol_obj; /* Temporary VOL object for setting VOL wrapper */
herr_t ret_value = SUCCEED; /* Return value */
@@ -2084,7 +2084,7 @@ H5VL_dataset_read_direct(size_t count, void *obj[], H5VL_t *connector, hid_t mem
tmp_vol_obj.rc = 1;
if (H5VL_set_vol_wrapper(&tmp_vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (H5VL__dataset_read(count, obj, connector->cls, mem_type_id, mem_space_id, file_space_id, dxpl_id, buf,
@@ -2113,11 +2113,11 @@ herr_t
H5VL_dataset_read(size_t count, const H5VL_object_t *vol_obj[], hid_t mem_type_id[], hid_t mem_space_id[],
hid_t file_space_id[], hid_t dxpl_id, void *buf[], void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- void *obj_local; /* Local buffer for obj */
- void **obj = &obj_local; /* Array of object pointers */
- size_t i; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ void *obj_local; /* Local buffer for obj */
+ void **obj = &obj_local; /* Array of object pointers */
+ size_t i; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -2127,7 +2127,7 @@ H5VL_dataset_read(size_t count, const H5VL_object_t *vol_obj[], hid_t mem_type_i
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj[0]) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Allocate obj array if necessary */
if (count > 1)
@@ -2259,7 +2259,7 @@ H5VL_dataset_write_direct(size_t count, void *obj[], H5VL_t *connector, hid_t me
hid_t mem_space_id[], hid_t file_space_id[], hid_t dxpl_id, const void *buf[],
void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
H5VL_object_t tmp_vol_obj; /* Temporary VOL object for setting VOL wrapper */
herr_t ret_value = SUCCEED; /* Return value */
@@ -2274,7 +2274,7 @@ H5VL_dataset_write_direct(size_t count, void *obj[], H5VL_t *connector, hid_t me
tmp_vol_obj.rc = 1;
if (H5VL_set_vol_wrapper(&tmp_vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (H5VL__dataset_write(count, obj, connector->cls, mem_type_id, mem_space_id, file_space_id, dxpl_id,
@@ -2303,11 +2303,11 @@ herr_t
H5VL_dataset_write(size_t count, const H5VL_object_t *vol_obj[], hid_t mem_type_id[], hid_t mem_space_id[],
hid_t file_space_id[], hid_t dxpl_id, const void *buf[], void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- void *obj_local; /* Local buffer for obj */
- void **obj = &obj_local; /* Array of object pointers */
- size_t i; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ void *obj_local; /* Local buffer for obj */
+ void **obj = &obj_local; /* Array of object pointers */
+ size_t i; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -2317,7 +2317,7 @@ H5VL_dataset_write(size_t count, const H5VL_object_t *vol_obj[], hid_t mem_type_
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj[0]) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Allocate obj array if necessary */
if (count > 1)
@@ -2443,15 +2443,15 @@ H5VL__dataset_get(void *obj, const H5VL_class_t *cls, H5VL_dataset_get_args_t *a
herr_t
H5VL_dataset_get(const H5VL_object_t *vol_obj, H5VL_dataset_get_args_t *args, hid_t dxpl_id, void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (H5VL__dataset_get(vol_obj->data, vol_obj->connector->cls, args, dxpl_id, req) < 0)
@@ -2543,15 +2543,15 @@ herr_t
H5VL_dataset_specific(const H5VL_object_t *vol_obj, H5VL_dataset_specific_args_t *args, hid_t dxpl_id,
void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (H5VL__dataset_specific(vol_obj->data, vol_obj->connector->cls, args, dxpl_id, req) < 0)
@@ -2642,15 +2642,15 @@ H5VL__dataset_optional(void *obj, const H5VL_class_t *cls, H5VL_optional_args_t
herr_t
H5VL_dataset_optional(const H5VL_object_t *vol_obj, H5VL_optional_args_t *args, hid_t dxpl_id, void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (H5VL__dataset_optional(vol_obj->data, vol_obj->connector->cls, args, dxpl_id, req) < 0)
@@ -2787,8 +2787,8 @@ H5VL__dataset_close(void *obj, const H5VL_class_t *cls, hid_t dxpl_id, void **re
herr_t
H5VL_dataset_close(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -2801,7 +2801,7 @@ H5VL_dataset_close(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (H5VL__dataset_close(vol_obj->data, vol_obj->connector->cls, dxpl_id, req) < 0)
@@ -2894,15 +2894,15 @@ void *
H5VL_datatype_commit(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_params, const char *name,
hid_t type_id, hid_t lcpl_id, hid_t tcpl_id, hid_t tapl_id, hid_t dxpl_id, void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- void *ret_value = NULL; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ void *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (NULL == (ret_value = H5VL__datatype_commit(vol_obj->data, loc_params, vol_obj->connector->cls, name,
@@ -2998,15 +2998,15 @@ void *
H5VL_datatype_open(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_params, const char *name,
hid_t tapl_id, hid_t dxpl_id, void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- void *ret_value = NULL; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ void *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (NULL == (ret_value = H5VL__datatype_open(vol_obj->data, loc_params, vol_obj->connector->cls, name,
@@ -3098,15 +3098,15 @@ H5VL__datatype_get(void *obj, const H5VL_class_t *cls, H5VL_datatype_get_args_t
herr_t
H5VL_datatype_get(const H5VL_object_t *vol_obj, H5VL_datatype_get_args_t *args, hid_t dxpl_id, void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (H5VL__datatype_get(vol_obj->data, vol_obj->connector->cls, args, dxpl_id, req) < 0)
@@ -3198,15 +3198,15 @@ herr_t
H5VL_datatype_specific(const H5VL_object_t *vol_obj, H5VL_datatype_specific_args_t *args, hid_t dxpl_id,
void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (H5VL__datatype_specific(vol_obj->data, vol_obj->connector->cls, args, dxpl_id, req) < 0)
@@ -3297,15 +3297,15 @@ H5VL__datatype_optional(void *obj, const H5VL_class_t *cls, H5VL_optional_args_t
herr_t
H5VL_datatype_optional(const H5VL_object_t *vol_obj, H5VL_optional_args_t *args, hid_t dxpl_id, void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (H5VL__datatype_optional(vol_obj->data, vol_obj->connector->cls, args, dxpl_id, req) < 0)
@@ -3335,7 +3335,7 @@ H5VL_datatype_optional_op(H5VL_object_t *vol_obj, H5VL_optional_args_t *args, hi
{
H5VL_object_t *tmp_vol_obj = NULL; /* Object for id */
H5VL_object_t **vol_obj_ptr = (_vol_obj_ptr ? _vol_obj_ptr : &tmp_vol_obj); /* Ptr to object ptr for id */
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -3349,7 +3349,7 @@ H5VL_datatype_optional_op(H5VL_object_t *vol_obj, H5VL_optional_args_t *args, hi
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(*vol_obj_ptr) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (H5VL__datatype_optional((*vol_obj_ptr)->data, (*vol_obj_ptr)->connector->cls, args, dxpl_id, req) < 0)
@@ -3486,15 +3486,15 @@ H5VL__datatype_close(void *obj, const H5VL_class_t *cls, hid_t dxpl_id, void **r
herr_t
H5VL_datatype_close(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (H5VL__datatype_close(vol_obj->data, vol_obj->connector->cls, dxpl_id, req) < 0)
@@ -3703,7 +3703,7 @@ H5VL__file_open_find_connector_cb(H5PL_type_t plugin_type, const void *plugin_in
const H5VL_class_t *cls = (const H5VL_class_t *)plugin_info;
H5P_genplist_t *fapl_plist;
H5P_genplist_t *fapl_plist_copy;
- hbool_t is_accessible = FALSE; /* Whether file is accessible */
+ bool is_accessible = false; /* Whether file is accessible */
ssize_t num_errors = 0;
herr_t status;
hid_t connector_id = H5I_INVALID_HID;
@@ -3724,13 +3724,13 @@ H5VL__file_open_find_connector_cb(H5PL_type_t plugin_type, const void *plugin_in
udata->cls = cls;
/* Attempt to register plugin as a VOL connector */
- if ((connector_id = H5VL__register_connector_by_class(cls, TRUE, H5P_VOL_INITIALIZE_DEFAULT)) < 0)
+ if ((connector_id = H5VL__register_connector_by_class(cls, true, H5P_VOL_INITIALIZE_DEFAULT)) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5_ITER_ERROR, "unable to register VOL connector");
/* Setup FAPL with registered VOL connector */
if (NULL == (fapl_plist = (H5P_genplist_t *)H5I_object_verify(udata->fapl_id, H5I_GENPROP_LST)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5_ITER_ERROR, "not a property list");
- if ((fapl_id = H5P_copy_plist(fapl_plist, TRUE)) < 0)
+ if ((fapl_id = H5P_copy_plist(fapl_plist, true)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy fapl");
if (NULL == (fapl_plist_copy = (H5P_genplist_t *)H5I_object_verify(fapl_id, H5I_GENPROP_LST)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5_ITER_ERROR, "not a property list");
@@ -3821,7 +3821,7 @@ H5VL_file_open(H5VL_connector_prop_t *connector_prop, const char *name, unsigned
/* Call the corresponding internal VOL routine */
if (NULL == (ret_value = H5VL__file_open(cls, name, flags, fapl_id, dxpl_id, req))) {
- hbool_t is_default_conn = TRUE;
+ bool is_default_conn = true;
/* Opening the file failed - Determine whether we should search
* the plugin path to see if any other VOL connectors are available
@@ -3951,15 +3951,15 @@ H5VL__file_get(void *obj, const H5VL_class_t *cls, H5VL_file_get_args_t *args, h
herr_t
H5VL_file_get(const H5VL_object_t *vol_obj, H5VL_file_get_args_t *args, hid_t dxpl_id, void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (H5VL__file_get(vol_obj->data, vol_obj->connector->cls, args, dxpl_id, req) < 0)
@@ -4050,7 +4050,7 @@ herr_t
H5VL_file_specific(const H5VL_object_t *vol_obj, H5VL_file_specific_args_t *args, hid_t dxpl_id, void **req)
{
const H5VL_class_t *cls; /* VOL connector's class struct */
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -4087,7 +4087,7 @@ H5VL_file_specific(const H5VL_object_t *vol_obj, H5VL_file_specific_args_t *args
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Set the VOL connector class pointer */
cls = vol_obj->connector->cls;
@@ -4181,15 +4181,15 @@ H5VL__file_optional(void *obj, const H5VL_class_t *cls, H5VL_optional_args_t *ar
herr_t
H5VL_file_optional(const H5VL_object_t *vol_obj, H5VL_optional_args_t *args, hid_t dxpl_id, void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (H5VL__file_optional(vol_obj->data, vol_obj->connector->cls, args, dxpl_id, req) < 0)
@@ -4326,15 +4326,15 @@ H5VL__file_close(void *obj, const H5VL_class_t *cls, hid_t dxpl_id, void **req)
herr_t
H5VL_file_close(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (H5VL__file_close(vol_obj->data, vol_obj->connector->cls, dxpl_id, req) < 0)
@@ -4426,15 +4426,15 @@ void *
H5VL_group_create(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_params, const char *name,
hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id, hid_t dxpl_id, void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- void *ret_value = NULL; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ void *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (NULL == (ret_value = H5VL__group_create(vol_obj->data, loc_params, vol_obj->connector->cls, name,
@@ -4529,15 +4529,15 @@ void *
H5VL_group_open(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_params, const char *name,
hid_t gapl_id, hid_t dxpl_id, void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- void *ret_value = NULL; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ void *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (NULL == (ret_value = H5VL__group_open(vol_obj->data, loc_params, vol_obj->connector->cls, name,
@@ -4628,15 +4628,15 @@ H5VL__group_get(void *obj, const H5VL_class_t *cls, H5VL_group_get_args_t *args,
herr_t
H5VL_group_get(const H5VL_object_t *vol_obj, H5VL_group_get_args_t *args, hid_t dxpl_id, void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (H5VL__group_get(vol_obj->data, vol_obj->connector->cls, args, dxpl_id, req) < 0)
@@ -4726,15 +4726,15 @@ H5VL__group_specific(void *obj, const H5VL_class_t *cls, H5VL_group_specific_arg
herr_t
H5VL_group_specific(const H5VL_object_t *vol_obj, H5VL_group_specific_args_t *args, hid_t dxpl_id, void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (H5VL__group_specific(vol_obj->data, vol_obj->connector->cls, args, dxpl_id, req) < 0)
@@ -4826,15 +4826,15 @@ H5VL__group_optional(void *obj, const H5VL_class_t *cls, H5VL_optional_args_t *a
herr_t
H5VL_group_optional(const H5VL_object_t *vol_obj, H5VL_optional_args_t *args, hid_t dxpl_id, void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
/* (Must return value from callback, for iterators) */
@@ -4973,15 +4973,15 @@ H5VL__group_close(void *obj, const H5VL_class_t *cls, hid_t dxpl_id, void **req)
herr_t
H5VL_group_close(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (H5VL__group_close(vol_obj->data, vol_obj->connector->cls, dxpl_id, req) < 0)
@@ -5075,7 +5075,7 @@ H5VL_link_create(H5VL_link_create_args_t *args, const H5VL_object_t *vol_obj,
const H5VL_loc_params_t *loc_params, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id, void **req)
{
H5VL_object_t tmp_vol_obj; /* Temporary VOL object */
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -5092,7 +5092,7 @@ H5VL_link_create(H5VL_link_create_args_t *args, const H5VL_object_t *vol_obj,
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(&tmp_vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (H5VL__link_create(args, vol_obj->data, loc_params, vol_obj->connector->cls, lcpl_id, lapl_id, dxpl_id,
@@ -5188,7 +5188,7 @@ H5VL_link_copy(const H5VL_object_t *src_vol_obj, const H5VL_loc_params_t *loc_pa
hid_t lapl_id, hid_t dxpl_id, void **req)
{
const H5VL_object_t *vol_obj; /* VOL object for object with data */
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -5197,7 +5197,7 @@ H5VL_link_copy(const H5VL_object_t *src_vol_obj, const H5VL_loc_params_t *loc_pa
vol_obj = (src_vol_obj->data ? src_vol_obj : dst_vol_obj);
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (H5VL__link_copy(src_vol_obj->data, loc_params1, (dst_vol_obj ? dst_vol_obj->data : NULL), loc_params2,
@@ -5295,7 +5295,7 @@ H5VL_link_move(const H5VL_object_t *src_vol_obj, const H5VL_loc_params_t *loc_pa
hid_t lapl_id, hid_t dxpl_id, void **req)
{
const H5VL_object_t *vol_obj; /* VOL object for object with data */
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -5304,7 +5304,7 @@ H5VL_link_move(const H5VL_object_t *src_vol_obj, const H5VL_loc_params_t *loc_pa
vol_obj = (src_vol_obj->data ? src_vol_obj : dst_vol_obj);
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (H5VL__link_move(src_vol_obj->data, loc_params1, (dst_vol_obj ? dst_vol_obj->data : NULL), loc_params2,
@@ -5399,15 +5399,15 @@ herr_t
H5VL_link_get(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_params, H5VL_link_get_args_t *args,
hid_t dxpl_id, void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (H5VL__link_get(vol_obj->data, loc_params, vol_obj->connector->cls, args, dxpl_id, req) < 0)
@@ -5500,15 +5500,15 @@ herr_t
H5VL_link_specific(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_params,
H5VL_link_specific_args_t *args, hid_t dxpl_id, void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
/* (Must return value from callback, for iterators) */
@@ -5603,15 +5603,15 @@ herr_t
H5VL_link_optional(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_params,
H5VL_optional_args_t *args, hid_t dxpl_id, void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (H5VL__link_optional(vol_obj->data, loc_params, vol_obj->connector->cls, args, dxpl_id, req) < 0)
@@ -5677,7 +5677,7 @@ H5VLlink_optional_op(const char *app_file, const char *app_func, unsigned app_li
H5VL_loc_params_t loc_params; /* Location parameters for object access */
void *token = NULL; /* Request token for async operation */
void **token_ptr = H5_REQUEST_NULL; /* Pointer to request token for async operation */
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -5688,7 +5688,7 @@ H5VLlink_optional_op(const char *app_file, const char *app_func, unsigned app_li
/* name is verified in H5VL_setup_name_args() */
/* Set up object access arguments */
- if (H5VL_setup_name_args(loc_id, name, FALSE, lapl_id, &vol_obj, &loc_params) < 0)
+ if (H5VL_setup_name_args(loc_id, name, false, lapl_id, &vol_obj, &loc_params) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set link access arguments");
/* Set up request token pointer for asynchronous operation */
@@ -5698,7 +5698,7 @@ H5VLlink_optional_op(const char *app_file, const char *app_func, unsigned app_li
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (H5VL__link_optional(vol_obj->data, &loc_params, vol_obj->connector->cls, args, dxpl_id, token_ptr) <
@@ -5764,15 +5764,15 @@ void *
H5VL_object_open(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *params, H5I_type_t *opened_type,
hid_t dxpl_id, void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- void *ret_value = NULL; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ void *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (NULL == (ret_value = H5VL__object_open(vol_obj->data, params, vol_obj->connector->cls, opened_type,
@@ -5868,8 +5868,8 @@ H5VL_object_copy(const H5VL_object_t *src_obj, const H5VL_loc_params_t *src_loc_
const H5VL_object_t *dst_obj, const H5VL_loc_params_t *dst_loc_params, const char *dst_name,
hid_t ocpypl_id, hid_t lcpl_id, hid_t dxpl_id, void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -5881,7 +5881,7 @@ H5VL_object_copy(const H5VL_object_t *src_obj, const H5VL_loc_params_t *src_loc_
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(src_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (H5VL__object_copy(src_obj->data, src_loc_params, src_name, dst_obj->data, dst_loc_params, dst_name,
@@ -5977,15 +5977,15 @@ herr_t
H5VL_object_get(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_params,
H5VL_object_get_args_t *args, hid_t dxpl_id, void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (H5VL__object_get(vol_obj->data, loc_params, vol_obj->connector->cls, args, dxpl_id, req) < 0)
@@ -6078,15 +6078,15 @@ herr_t
H5VL_object_specific(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_params,
H5VL_object_specific_args_t *args, hid_t dxpl_id, void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
/* (Must return value from callback, for iterators) */
@@ -6181,15 +6181,15 @@ herr_t
H5VL_object_optional(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_params,
H5VL_optional_args_t *args, hid_t dxpl_id, void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (H5VL__object_optional(vol_obj->data, loc_params, vol_obj->connector->cls, args, dxpl_id, req) < 0)
@@ -6256,7 +6256,7 @@ H5VLobject_optional_op(const char *app_file, const char *app_func, unsigned app_
H5VL_loc_params_t loc_params; /* Location parameters for object access */
void *token = NULL; /* Request token for async operation */
void **token_ptr = H5_REQUEST_NULL; /* Pointer to request token for async operation */
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -6267,7 +6267,7 @@ H5VLobject_optional_op(const char *app_file, const char *app_func, unsigned app_
/* name is verified in H5VL_setup_name_args() */
/* Set up object access arguments */
- if (H5VL_setup_name_args(loc_id, name, FALSE, lapl_id, &vol_obj, &loc_params) < 0)
+ if (H5VL_setup_name_args(loc_id, name, false, lapl_id, &vol_obj, &loc_params) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set link access arguments");
/* Set up request token pointer for asynchronous operation */
@@ -6277,7 +6277,7 @@ H5VLobject_optional_op(const char *app_file, const char *app_func, unsigned app_
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (H5VL__object_optional(vol_obj->data, &loc_params, vol_obj->connector->cls, args, dxpl_id, token_ptr) <
@@ -6351,15 +6351,15 @@ herr_t
H5VL_introspect_get_conn_cls(const H5VL_object_t *vol_obj, H5VL_get_conn_lvl_t lvl,
const H5VL_class_t **conn_cls)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (H5VL__introspect_get_conn_cls(vol_obj->data, vol_obj->connector->cls, lvl, conn_cls) < 0)
@@ -6527,15 +6527,15 @@ H5VL__introspect_opt_query(void *obj, const H5VL_class_t *cls, H5VL_subclass_t s
herr_t
H5VL_introspect_opt_query(const H5VL_object_t *vol_obj, H5VL_subclass_t subcls, int opt_type, uint64_t *flags)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (H5VL__introspect_opt_query(vol_obj->data, vol_obj->connector->cls, subcls, opt_type, flags) < 0)
@@ -6629,8 +6629,8 @@ H5VL__request_wait(void *req, const H5VL_class_t *cls, uint64_t timeout, H5VL_re
herr_t
H5VL_request_wait(const H5VL_object_t *vol_obj, uint64_t timeout, H5VL_request_status_t *status)
{
- hbool_t vol_wrapper_set = FALSE;
- herr_t ret_value = SUCCEED; /* Return value */
+ bool vol_wrapper_set = false;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -6640,7 +6640,7 @@ H5VL_request_wait(const H5VL_object_t *vol_obj, uint64_t timeout, H5VL_request_s
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (H5VL__request_wait(vol_obj->data, vol_obj->connector->cls, timeout, status) < 0)
@@ -6733,8 +6733,8 @@ H5VL__request_notify(void *req, const H5VL_class_t *cls, H5VL_request_notify_t c
herr_t
H5VL_request_notify(const H5VL_object_t *vol_obj, H5VL_request_notify_t cb, void *ctx)
{
- hbool_t vol_wrapper_set = FALSE;
- herr_t ret_value = SUCCEED; /* Return value */
+ bool vol_wrapper_set = false;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -6744,7 +6744,7 @@ H5VL_request_notify(const H5VL_object_t *vol_obj, H5VL_request_notify_t cb, void
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (H5VL__request_notify(vol_obj->data, vol_obj->connector->cls, cb, ctx) < 0)
@@ -6836,8 +6836,8 @@ H5VL__request_cancel(void *req, const H5VL_class_t *cls, H5VL_request_status_t *
herr_t
H5VL_request_cancel(const H5VL_object_t *vol_obj, H5VL_request_status_t *status)
{
- hbool_t vol_wrapper_set = FALSE;
- herr_t ret_value = SUCCEED; /* Return value */
+ bool vol_wrapper_set = false;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -6847,7 +6847,7 @@ H5VL_request_cancel(const H5VL_object_t *vol_obj, H5VL_request_status_t *status)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (H5VL__request_cancel(vol_obj->data, vol_obj->connector->cls, status) < 0)
@@ -6939,8 +6939,8 @@ H5VL__request_specific(void *req, const H5VL_class_t *cls, H5VL_request_specific
herr_t
H5VL_request_specific(const H5VL_object_t *vol_obj, H5VL_request_specific_args_t *args)
{
- hbool_t vol_wrapper_set = FALSE;
- herr_t ret_value = SUCCEED; /* Return value */
+ bool vol_wrapper_set = false;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -6950,7 +6950,7 @@ H5VL_request_specific(const H5VL_object_t *vol_obj, H5VL_request_specific_args_t
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (H5VL__request_specific(vol_obj->data, vol_obj->connector->cls, args) < 0)
@@ -7044,8 +7044,8 @@ H5VL__request_optional(void *req, const H5VL_class_t *cls, H5VL_optional_args_t
herr_t
H5VL_request_optional(const H5VL_object_t *vol_obj, H5VL_optional_args_t *args)
{
- hbool_t vol_wrapper_set = FALSE;
- herr_t ret_value = SUCCEED; /* Return value */
+ bool vol_wrapper_set = false;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -7055,7 +7055,7 @@ H5VL_request_optional(const H5VL_object_t *vol_obj, H5VL_optional_args_t *args)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if (H5VL__request_optional(vol_obj->data, vol_obj->connector->cls, args) < 0)
@@ -7185,8 +7185,8 @@ H5VL__request_free(void *req, const H5VL_class_t *cls)
herr_t
H5VL_request_free(const H5VL_object_t *vol_obj)
{
- hbool_t vol_wrapper_set = FALSE;
- herr_t ret_value = SUCCEED; /* Return value */
+ bool vol_wrapper_set = false;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -7196,7 +7196,7 @@ H5VL_request_free(const H5VL_object_t *vol_obj)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding VOL callback */
if (H5VL__request_free(vol_obj->data, vol_obj->connector->cls) < 0)
@@ -7999,15 +7999,15 @@ H5VL__optional(void *obj, const H5VL_class_t *cls, H5VL_optional_args_t *args, h
herr_t
H5VL_optional(const H5VL_object_t *vol_obj, H5VL_optional_args_t *args, hid_t dxpl_id, void **req)
{
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool vol_wrapper_set = false; /* Whether the VOL object wrapping context was set up */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info");
- vol_wrapper_set = TRUE;
+ vol_wrapper_set = true;
/* Call the corresponding internal VOL routine */
if ((ret_value = H5VL__optional(vol_obj->data, vol_obj->connector->cls, args, dxpl_id, req)) < 0)
diff --git a/src/H5VLint.c b/src/H5VLint.c
index 9cf55c99bed..feb2debd947 100644
--- a/src/H5VLint.c
+++ b/src/H5VLint.c
@@ -86,8 +86,7 @@ typedef struct {
static herr_t H5VL__free_cls(H5VL_class_t *cls, void **request);
static int H5VL__get_connector_cb(void *obj, hid_t id, void *_op_data);
static void *H5VL__wrap_obj(void *obj, H5I_type_t obj_type);
-static H5VL_object_t *H5VL__new_vol_obj(H5I_type_t type, void *object, H5VL_t *vol_connector,
- hbool_t wrap_obj);
+static H5VL_object_t *H5VL__new_vol_obj(H5I_type_t type, void *object, H5VL_t *vol_connector, bool wrap_obj);
static void *H5VL__object(hid_t id, H5I_type_t obj_type);
static herr_t H5VL__free_vol_wrapper(H5VL_wrap_ctx_t *vol_wrap_ctx);
@@ -244,7 +243,7 @@ H5VL_term_package(void)
else {
if (H5I_nmembers(H5I_VOL) > 0) {
/* Unregister all VOL connectors */
- (void)H5I_clear_type(H5I_VOL, TRUE, FALSE);
+ (void)H5I_clear_type(H5I_VOL, true, false);
n++;
} /* end if */
else {
@@ -318,7 +317,7 @@ H5VL__get_connector_cb(void *obj, hid_t id, void *_op_data)
FUNC_ENTER_PACKAGE_NOERR
if (H5VL_GET_CONNECTOR_BY_NAME == op_data->key.kind) {
- if (0 == HDstrcmp(cls->name, op_data->key.u.name)) {
+ if (0 == strcmp(cls->name, op_data->key.u.name)) {
op_data->found_id = id;
ret_value = H5_ITER_STOP;
} /* end if */
@@ -371,7 +370,7 @@ H5VL__set_def_conn(void)
} /* end if */
/* Check for environment variable set */
- env_var = HDgetenv(HDF5_VOL_CONNECTOR);
+ env_var = getenv(HDF5_VOL_CONNECTOR);
/* Only parse the string if it's set */
if (env_var && *env_var) {
@@ -395,25 +394,25 @@ H5VL__set_def_conn(void)
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't check if VOL connector already registered");
else if (connector_is_registered) {
/* Retrieve the ID of the already-registered VOL connector */
- if ((connector_id = H5VL__get_connector_id_by_name(tok, FALSE)) < 0)
+ if ((connector_id = H5VL__get_connector_id_by_name(tok, false)) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get VOL connector ID");
} /* end else-if */
else {
/* Check for VOL connectors that ship with the library */
- if (!HDstrcmp(tok, "native")) {
+ if (!strcmp(tok, "native")) {
connector_id = H5VL_NATIVE;
- if (H5I_inc_ref(connector_id, FALSE) < 0)
+ if (H5I_inc_ref(connector_id, false) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTINC, FAIL, "can't increment VOL connector refcount");
} /* end if */
- else if (!HDstrcmp(tok, "pass_through")) {
+ else if (!strcmp(tok, "pass_through")) {
connector_id = H5VL_PASSTHRU;
- if (H5I_inc_ref(connector_id, FALSE) < 0)
+ if (H5I_inc_ref(connector_id, false) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTINC, FAIL, "can't increment VOL connector refcount");
} /* end else-if */
else {
/* Register the VOL connector */
/* (NOTE: No provisions for vipl_id currently) */
- if ((connector_id = H5VL__register_connector_by_name(tok, TRUE, H5P_VOL_INITIALIZE_DEFAULT)) <
+ if ((connector_id = H5VL__register_connector_by_name(tok, true, H5P_VOL_INITIALIZE_DEFAULT)) <
0)
HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, FAIL, "can't register connector");
} /* end else */
@@ -434,7 +433,7 @@ H5VL__set_def_conn(void)
H5VL_def_conn_s.connector_info = NULL;
/* Increment the ref count on the default connector */
- if (H5I_inc_ref(H5VL_def_conn_s.connector_id, FALSE) < 0)
+ if (H5I_inc_ref(H5VL_def_conn_s.connector_id, false) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTINC, FAIL, "can't increment VOL connector refcount");
} /* end else */
@@ -524,10 +523,10 @@ H5VL__wrap_obj(void *obj, H5I_type_t obj_type)
*-------------------------------------------------------------------------
*/
static H5VL_object_t *
-H5VL__new_vol_obj(H5I_type_t type, void *object, H5VL_t *vol_connector, hbool_t wrap_obj)
+H5VL__new_vol_obj(H5I_type_t type, void *object, H5VL_t *vol_connector, bool wrap_obj)
{
H5VL_object_t *new_vol_obj = NULL; /* Pointer to new VOL object */
- hbool_t conn_rc_incr = FALSE; /* Whether the VOL connector refcount has been incremented */
+ bool conn_rc_incr = false; /* Whether the VOL connector refcount has been incremented */
H5VL_object_t *ret_value = NULL; /* Return value */
FUNC_ENTER_PACKAGE
@@ -555,7 +554,7 @@ H5VL__new_vol_obj(H5I_type_t type, void *object, H5VL_t *vol_connector, hbool_t
/* Bump the reference count on the VOL connector */
H5VL_conn_inc_rc(vol_connector);
- conn_rc_incr = TRUE;
+ conn_rc_incr = true;
/* If this is a datatype, we have to hide the VOL object under the H5T_t pointer */
if (H5I_DATATYPE == type) {
@@ -598,7 +597,7 @@ H5VL_conn_copy(H5VL_connector_prop_t *connector_prop)
/* Copy the connector ID & info, if there is one */
if (connector_prop->connector_id > 0) {
/* Increment the reference count on connector ID and copy connector info */
- if (H5I_inc_ref(connector_prop->connector_id, FALSE) < 0)
+ if (H5I_inc_ref(connector_prop->connector_id, false) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINC, FAIL,
"unable to increment ref count on VOL connector ID");
@@ -676,7 +675,7 @@ H5VL_conn_free(const H5VL_connector_prop_t *connector_prop)
*-------------------------------------------------------------------------
*/
hid_t
-H5VL_register(H5I_type_t type, void *object, H5VL_t *vol_connector, hbool_t app_ref)
+H5VL_register(H5I_type_t type, void *object, H5VL_t *vol_connector, bool app_ref)
{
H5VL_object_t *vol_obj = NULL; /* VOL object wrapper for library object */
hid_t ret_value = H5I_INVALID_HID; /* Return value */
@@ -689,7 +688,7 @@ H5VL_register(H5I_type_t type, void *object, H5VL_t *vol_connector, hbool_t app_
/* Set up VOL object for the passed-in data */
/* (Does not wrap object, since it's from a VOL callback) */
- if (NULL == (vol_obj = H5VL__new_vol_obj(type, object, vol_connector, FALSE)))
+ if (NULL == (vol_obj = H5VL__new_vol_obj(type, object, vol_connector, false)))
HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, FAIL, "can't create VOL object");
/* Register VOL object as _object_ type, for future object API calls */
@@ -719,7 +718,7 @@ H5VL_register(H5I_type_t type, void *object, H5VL_t *vol_connector, hbool_t app_
*-------------------------------------------------------------------------
*/
herr_t
-H5VL_register_using_existing_id(H5I_type_t type, void *object, H5VL_t *vol_connector, hbool_t app_ref,
+H5VL_register_using_existing_id(H5I_type_t type, void *object, H5VL_t *vol_connector, bool app_ref,
hid_t existing_id)
{
H5VL_object_t *new_vol_obj = NULL; /* Pointer to new VOL object */
@@ -733,7 +732,7 @@ H5VL_register_using_existing_id(H5I_type_t type, void *object, H5VL_t *vol_conne
/* Set up VOL object for the passed-in data */
/* (Wraps object, since it's a library object) */
- if (NULL == (new_vol_obj = H5VL__new_vol_obj(type, object, vol_connector, TRUE)))
+ if (NULL == (new_vol_obj = H5VL__new_vol_obj(type, object, vol_connector, true)))
HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, FAIL, "can't create VOL object");
/* Call the underlying H5I function to complete the registration */
@@ -759,7 +758,7 @@ H5VL_new_connector(hid_t connector_id)
{
H5VL_class_t *cls = NULL; /* VOL connector class */
H5VL_t *connector = NULL; /* New VOL connector struct */
- hbool_t conn_id_incr = FALSE; /* Whether the VOL connector ID has been incremented */
+ bool conn_id_incr = false; /* Whether the VOL connector ID has been incremented */
H5VL_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -773,9 +772,9 @@ H5VL_new_connector(hid_t connector_id)
HGOTO_ERROR(H5E_VOL, H5E_CANTALLOC, NULL, "can't allocate VOL connector struct");
connector->cls = cls;
connector->id = connector_id;
- if (H5I_inc_ref(connector->id, FALSE) < 0)
+ if (H5I_inc_ref(connector->id, false) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTINC, NULL, "unable to increment ref count on VOL connector");
- conn_id_incr = TRUE;
+ conn_id_incr = true;
/* Set return value */
ret_value = connector;
@@ -808,7 +807,7 @@ H5VL_new_connector(hid_t connector_id)
*-------------------------------------------------------------------------
*/
hid_t
-H5VL_register_using_vol_id(H5I_type_t type, void *obj, hid_t connector_id, hbool_t app_ref)
+H5VL_register_using_vol_id(H5I_type_t type, void *obj, hid_t connector_id, bool app_ref)
{
H5VL_t *connector = NULL; /* VOL connector struct */
hid_t ret_value = H5I_INVALID_HID; /* Return value */
@@ -891,7 +890,7 @@ H5VL_create_object_using_vol_id(H5I_type_t type, void *obj, hid_t connector_id)
{
H5VL_class_t *cls = NULL; /* VOL connector class */
H5VL_t *connector = NULL; /* VOL connector struct */
- hbool_t conn_id_incr = FALSE; /* Whether the VOL connector ID has been incremented */
+ bool conn_id_incr = false; /* Whether the VOL connector ID has been incremented */
H5VL_object_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -905,13 +904,13 @@ H5VL_create_object_using_vol_id(H5I_type_t type, void *obj, hid_t connector_id)
HGOTO_ERROR(H5E_VOL, H5E_CANTALLOC, NULL, "can't allocate VOL info struct");
connector->cls = cls;
connector->id = connector_id;
- if (H5I_inc_ref(connector->id, FALSE) < 0)
+ if (H5I_inc_ref(connector->id, false) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTINC, NULL, "unable to increment ref count on VOL connector");
- conn_id_incr = TRUE;
+ conn_id_incr = true;
/* Set up VOL object for the passed-in data */
/* (Wraps object, since it's a library object) */
- if (NULL == (ret_value = H5VL__new_vol_obj(type, obj, connector, TRUE)))
+ if (NULL == (ret_value = H5VL__new_vol_obj(type, obj, connector, true)))
HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "can't create VOL object");
done:
@@ -1059,7 +1058,7 @@ H5VL_free_object(H5VL_object_t *vol_obj)
*-------------------------------------------------------------------------
*/
herr_t
-H5VL_object_is_native(const H5VL_object_t *obj, hbool_t *is_native)
+H5VL_object_is_native(const H5VL_object_t *obj, bool *is_native)
{
const H5VL_class_t *cls; /* VOL connector class structs for object */
const H5VL_class_t *native_cls; /* Native VOL connector class structs */
@@ -1102,7 +1101,7 @@ H5VL_object_is_native(const H5VL_object_t *obj, hbool_t *is_native)
*-------------------------------------------------------------------------
*/
herr_t
-H5VL_file_is_same(const H5VL_object_t *vol_obj1, const H5VL_object_t *vol_obj2, hbool_t *same_file)
+H5VL_file_is_same(const H5VL_object_t *vol_obj1, const H5VL_object_t *vol_obj2, bool *same_file)
{
const H5VL_class_t *cls1; /* VOL connector class struct for first object */
const H5VL_class_t *cls2; /* VOL connector class struct for second object */
@@ -1130,7 +1129,7 @@ H5VL_file_is_same(const H5VL_object_t *vol_obj1, const H5VL_object_t *vol_obj2,
/* If the connector classes are different, the files are different */
if (cmp_value)
- *same_file = FALSE;
+ *same_file = false;
else {
void *obj2; /* Terminal object for second file */
H5VL_file_specific_args_t vol_cb_args; /* Arguments to VOL callback */
@@ -1167,7 +1166,7 @@ H5VL_file_is_same(const H5VL_object_t *vol_obj1, const H5VL_object_t *vol_obj2,
*-------------------------------------------------------------------------
*/
hid_t
-H5VL__register_connector(const void *_cls, hbool_t app_ref, hid_t vipl_id)
+H5VL__register_connector(const void *_cls, bool app_ref, hid_t vipl_id)
{
const H5VL_class_t *cls = (const H5VL_class_t *)_cls;
H5VL_class_t *saved = NULL;
@@ -1221,7 +1220,7 @@ H5VL__register_connector(const void *_cls, hbool_t app_ref, hid_t vipl_id)
*-------------------------------------------------------------------------
*/
hid_t
-H5VL__register_connector_by_class(const H5VL_class_t *cls, hbool_t app_ref, hid_t vipl_id)
+H5VL__register_connector_by_class(const H5VL_class_t *cls, bool app_ref, hid_t vipl_id)
{
H5VL_get_connector_ud_t op_data; /* Callback info for connector search */
hid_t ret_value = H5I_INVALID_HID; /* Return value */
@@ -1237,7 +1236,7 @@ H5VL__register_connector_by_class(const H5VL_class_t *cls, hbool_t app_ref, hid_
if (!cls->name)
HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID,
"VOL connector class name cannot be the NULL pointer");
- if (0 == HDstrlen(cls->name))
+ if (0 == strlen(cls->name))
HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID,
"VOL connector class name cannot be the empty string");
if (cls->info_cls.copy && !cls->info_cls.free)
@@ -1255,7 +1254,7 @@ H5VL__register_connector_by_class(const H5VL_class_t *cls, hbool_t app_ref, hid_
op_data.found_id = H5I_INVALID_HID;
/* Check if connector is already registered */
- if (H5I_iterate(H5I_VOL, H5VL__get_connector_cb, &op_data, TRUE) < 0)
+ if (H5I_iterate(H5I_VOL, H5VL__get_connector_cb, &op_data, true) < 0)
HGOTO_ERROR(H5E_VOL, H5E_BADITER, H5I_INVALID_HID, "can't iterate over VOL IDs");
/* Increment the ref count on the existing VOL connector ID, if it's already registered */
@@ -1290,7 +1289,7 @@ H5VL__register_connector_by_class(const H5VL_class_t *cls, hbool_t app_ref, hid_
*-------------------------------------------------------------------------
*/
hid_t
-H5VL__register_connector_by_name(const char *name, hbool_t app_ref, hid_t vipl_id)
+H5VL__register_connector_by_name(const char *name, bool app_ref, hid_t vipl_id)
{
H5VL_get_connector_ud_t op_data; /* Callback info for connector search */
hid_t ret_value = H5I_INVALID_HID; /* Return value */
@@ -1347,7 +1346,7 @@ H5VL__register_connector_by_name(const char *name, hbool_t app_ref, hid_t vipl_i
*-------------------------------------------------------------------------
*/
hid_t
-H5VL__register_connector_by_value(H5VL_class_value_t value, hbool_t app_ref, hid_t vipl_id)
+H5VL__register_connector_by_value(H5VL_class_value_t value, bool app_ref, hid_t vipl_id)
{
H5VL_get_connector_ud_t op_data; /* Callback info for connector search */
hid_t ret_value = H5I_INVALID_HID; /* Return value */
@@ -1404,7 +1403,7 @@ htri_t
H5VL__is_connector_registered_by_name(const char *name)
{
H5VL_get_connector_ud_t op_data; /* Callback info for connector search */
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1414,12 +1413,12 @@ H5VL__is_connector_registered_by_name(const char *name)
op_data.found_id = H5I_INVALID_HID;
/* Find connector with name */
- if (H5I_iterate(H5I_VOL, H5VL__get_connector_cb, &op_data, TRUE) < 0)
+ if (H5I_iterate(H5I_VOL, H5VL__get_connector_cb, &op_data, true) < 0)
HGOTO_ERROR(H5E_VOL, H5E_BADITER, FAIL, "can't iterate over VOL connectors");
/* Found a connector with that name */
if (op_data.found_id != H5I_INVALID_HID)
- ret_value = TRUE;
+ ret_value = true;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1441,7 +1440,7 @@ htri_t
H5VL__is_connector_registered_by_value(H5VL_class_value_t value)
{
H5VL_get_connector_ud_t op_data; /* Callback info for connector search */
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1451,12 +1450,12 @@ H5VL__is_connector_registered_by_value(H5VL_class_value_t value)
op_data.found_id = H5I_INVALID_HID;
/* Find connector with value */
- if (H5I_iterate(H5I_VOL, H5VL__get_connector_cb, &op_data, TRUE) < 0)
+ if (H5I_iterate(H5I_VOL, H5VL__get_connector_cb, &op_data, true) < 0)
HGOTO_ERROR(H5E_VOL, H5E_BADITER, FAIL, "can't iterate over VOL connectors");
/* Found a connector with that name */
if (op_data.found_id != H5I_INVALID_HID)
- ret_value = TRUE;
+ ret_value = true;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1473,7 +1472,7 @@ H5VL__is_connector_registered_by_value(H5VL_class_value_t value)
*-------------------------------------------------------------------------
*/
hid_t
-H5VL__get_connector_id(hid_t obj_id, hbool_t is_api)
+H5VL__get_connector_id(hid_t obj_id, bool is_api)
{
H5VL_object_t *vol_obj = NULL;
hid_t ret_value = H5I_INVALID_HID; /* Return value */
@@ -1504,7 +1503,7 @@ H5VL__get_connector_id(hid_t obj_id, hbool_t is_api)
*-------------------------------------------------------------------------
*/
hid_t
-H5VL__get_connector_id_by_name(const char *name, hbool_t is_api)
+H5VL__get_connector_id_by_name(const char *name, bool is_api)
{
hid_t ret_value = H5I_INVALID_HID; /* Return value */
@@ -1534,7 +1533,7 @@ H5VL__get_connector_id_by_name(const char *name, hbool_t is_api)
*-------------------------------------------------------------------------
*/
hid_t
-H5VL__get_connector_id_by_value(H5VL_class_value_t value, hbool_t is_api)
+H5VL__get_connector_id_by_value(H5VL_class_value_t value, bool is_api)
{
hid_t ret_value = H5I_INVALID_HID; /* Return value */
@@ -1578,7 +1577,7 @@ H5VL__peek_connector_id_by_name(const char *name)
op_data.found_id = H5I_INVALID_HID;
/* Find connector with name */
- if (H5I_iterate(H5I_VOL, H5VL__get_connector_cb, &op_data, TRUE) < 0)
+ if (H5I_iterate(H5I_VOL, H5VL__get_connector_cb, &op_data, true) < 0)
HGOTO_ERROR(H5E_VOL, H5E_BADITER, H5I_INVALID_HID, "can't iterate over VOL connectors");
/* Set return value */
@@ -1614,7 +1613,7 @@ H5VL__peek_connector_id_by_value(H5VL_class_value_t value)
op_data.found_id = H5I_INVALID_HID;
/* Find connector with value */
- if (H5I_iterate(H5I_VOL, H5VL__get_connector_cb, &op_data, TRUE) < 0)
+ if (H5I_iterate(H5I_VOL, H5VL__get_connector_cb, &op_data, true) < 0)
HGOTO_ERROR(H5E_VOL, H5E_BADITER, H5I_INVALID_HID, "can't iterate over VOL connectors");
/* Set return value */
@@ -1690,9 +1689,9 @@ H5VL__get_connector_name(hid_t id, char *name /*out*/, size_t size)
cls = vol_obj->connector->cls;
- len = HDstrlen(cls->name);
+ len = strlen(cls->name);
if (name) {
- HDstrncpy(name, cls->name, size);
+ strncpy(name, cls->name, size);
if (len >= size)
name[size - 1] = '\0';
} /* end if */
@@ -1973,7 +1972,7 @@ H5VL_cmp_connector_cls(int *cmp_value, const H5VL_class_t *cls1, const H5VL_clas
*cmp_value = 1;
HGOTO_DONE(SUCCEED);
} /* end if */
- if (0 != (*cmp_value = HDstrcmp(cls1->name, cls2->name)))
+ if (0 != (*cmp_value = strcmp(cls1->name, cls2->name)))
HGOTO_DONE(SUCCEED);
/* Compare connector VOL API versions */
@@ -2118,7 +2117,7 @@ H5VL_finish_lib_state(void)
FUNC_ENTER_NOAPI(FAIL)
/* Pop the API context off the stack */
- if (H5CX_pop(FALSE) < 0)
+ if (H5CX_pop(false) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTRESET, FAIL, "can't pop API context");
done:
@@ -2388,7 +2387,7 @@ H5VL_reset_vol_wrapper(void)
*-------------------------------------------------------------------------
*/
hid_t
-H5VL_wrap_register(H5I_type_t type, void *obj, hbool_t app_ref)
+H5VL_wrap_register(H5I_type_t type, void *obj, bool app_ref)
{
H5VL_wrap_ctx_t *vol_wrap_ctx = NULL; /* Object wrapping context */
void *new_obj; /* Newly wrapped object */
@@ -2411,7 +2410,7 @@ H5VL_wrap_register(H5I_type_t type, void *obj, hbool_t app_ref)
*/
if (type == H5I_DATATYPE)
if (vol_wrap_ctx->connector->id == H5VL_NATIVE)
- if (TRUE == H5T_already_vol_managed((const H5T_t *)obj))
+ if (true == H5T_already_vol_managed((const H5T_t *)obj))
HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, H5I_INVALID_HID, "can't wrap an uncommitted datatype");
/* Wrap the object with VOL connector info */
@@ -2435,7 +2434,7 @@ H5VL_wrap_register(H5I_type_t type, void *obj, hbool_t app_ref)
* Note: Matching the connector's name / value, but the connector
* having an incompatible version is not an error, but means
* that the connector isn't a "match". Setting the SUCCEED
- * value to FALSE and not failing for that case allows the
+ * value to false and not failing for that case allows the
* plugin framework to keep looking for other DLLs that match
* and have a compatible version.
*
@@ -2444,7 +2443,7 @@ H5VL_wrap_register(H5I_type_t type, void *obj, hbool_t app_ref)
*-------------------------------------------------------------------------
*/
herr_t
-H5VL_check_plugin_load(const H5VL_class_t *cls, const H5PL_key_t *key, hbool_t *success)
+H5VL_check_plugin_load(const H5VL_class_t *cls, const H5PL_key_t *key, bool *success)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -2458,8 +2457,8 @@ H5VL_check_plugin_load(const H5VL_class_t *cls, const H5PL_key_t *key, hbool_t *
/* Which kind of key are we looking for? */
if (key->vol.kind == H5VL_GET_CONNECTOR_BY_NAME) {
/* Check if plugin name matches VOL connector class name */
- if (cls->name && !HDstrcmp(cls->name, key->vol.u.name))
- *success = TRUE;
+ if (cls->name && !strcmp(cls->name, key->vol.u.name))
+ *success = true;
} /* end if */
else {
/* Sanity check */
@@ -2467,12 +2466,12 @@ H5VL_check_plugin_load(const H5VL_class_t *cls, const H5PL_key_t *key, hbool_t *
/* Check if plugin value matches VOL connector class value */
if (cls->value == key->vol.u.value)
- *success = TRUE;
+ *success = true;
} /* end else */
/* Connector is a match, but might not be a compatible version */
if (*success && cls->version != H5VL_VERSION)
- *success = FALSE;
+ *success = false;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5VL_check_plugin_load() */
@@ -2487,7 +2486,7 @@ H5VL_check_plugin_load(const H5VL_class_t *cls, const H5PL_key_t *key, hbool_t *
*-------------------------------------------------------------------------
*/
void
-H5VL__is_default_conn(hid_t fapl_id, hid_t connector_id, hbool_t *is_default)
+H5VL__is_default_conn(hid_t fapl_id, hid_t connector_id, bool *is_default)
{
FUNC_ENTER_PACKAGE_NOERR
@@ -2581,7 +2580,7 @@ H5VL_setup_loc_args(hid_t loc_id, H5VL_object_t **vol_obj, H5VL_loc_params_t *lo
*-------------------------------------------------------------------------
*/
herr_t
-H5VL_setup_acc_args(hid_t loc_id, const H5P_libclass_t *libclass, hbool_t is_collective, hid_t *acspl_id,
+H5VL_setup_acc_args(hid_t loc_id, const H5P_libclass_t *libclass, bool is_collective, hid_t *acspl_id,
H5VL_object_t **vol_obj, H5VL_loc_params_t *loc_params)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -2652,7 +2651,7 @@ H5VL_setup_self_args(hid_t loc_id, H5VL_object_t **vol_obj, H5VL_loc_params_t *l
*-------------------------------------------------------------------------
*/
herr_t
-H5VL_setup_name_args(hid_t loc_id, const char *name, hbool_t is_collective, hid_t lapl_id,
+H5VL_setup_name_args(hid_t loc_id, const char *name, bool is_collective, hid_t lapl_id,
H5VL_object_t **vol_obj, H5VL_loc_params_t *loc_params)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -2698,8 +2697,7 @@ H5VL_setup_name_args(hid_t loc_id, const char *name, hbool_t is_collective, hid_
*/
herr_t
H5VL_setup_idx_args(hid_t loc_id, const char *name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
- hbool_t is_collective, hid_t lapl_id, H5VL_object_t **vol_obj,
- H5VL_loc_params_t *loc_params)
+ bool is_collective, hid_t lapl_id, H5VL_object_t **vol_obj, H5VL_loc_params_t *loc_params)
{
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5VLmodule.h b/src/H5VLmodule.h
index 44b9af0454c..546b31e577a 100644
--- a/src/H5VLmodule.h
+++ b/src/H5VLmodule.h
@@ -454,7 +454,7 @@
* \code
* typedef struct {
* H5L_type_t type; // Type of link
- * hbool_t corder_valid; // Indicate if creation order is valid
+ * bool corder_valid; // Indicate if creation order is valid
* int64_t corder; // Creation order
* H5T_cset_t cset; // Character set of link name
* union {
diff --git a/src/H5VLnative.c b/src/H5VLnative.c
index 907f020b56e..b640cecd507 100644
--- a/src/H5VLnative.c
+++ b/src/H5VLnative.c
@@ -201,7 +201,7 @@ H5VL_native_register(void)
/* Register the native VOL connector, if it isn't already */
if (H5I_INVALID_HID == H5VL_NATIVE_ID_g)
if ((H5VL_NATIVE_ID_g =
- H5VL__register_connector(&H5VL_native_cls_g, TRUE, H5P_VOL_INITIALIZE_DEFAULT)) < 0)
+ H5VL__register_connector(&H5VL_native_cls_g, true, H5P_VOL_INITIALIZE_DEFAULT)) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTINSERT, H5I_INVALID_HID, "can't create ID for native VOL connector");
/* Set return value */
@@ -391,7 +391,7 @@ H5VLnative_addr_to_token(hid_t loc_id, haddr_t addr, H5O_token_t *token)
#ifndef NDEBUG
{
H5VL_object_t *vol_obj_container;
- hbool_t is_native_vol_obj;
+ bool is_native_vol_obj;
/* Get the location object */
if (NULL == (vol_obj_container = (H5VL_object_t *)H5I_object(loc_id)))
@@ -485,7 +485,7 @@ H5VLnative_token_to_addr(hid_t loc_id, H5O_token_t token, haddr_t *addr)
#ifndef NDEBUG
{
H5VL_object_t *vol_obj_container;
- hbool_t is_native_vol_obj;
+ bool is_native_vol_obj;
/* Get the location object */
if (NULL == (vol_obj_container = (H5VL_object_t *)H5I_object(loc_id)))
diff --git a/src/H5VLnative_attr.c b/src/H5VLnative_attr.c
index c41496a2e13..50aca652b2f 100644
--- a/src/H5VLnative_attr.c
+++ b/src/H5VLnative_attr.c
@@ -79,7 +79,7 @@ H5VL__native_attr_create(void *obj, const H5VL_loc_params_t *loc_params, const c
H5P_genplist_t *plist;
H5G_loc_t loc; /* Object location */
H5G_loc_t obj_loc; /* Location used to open group */
- hbool_t loc_found = FALSE;
+ bool loc_found = false;
H5T_t *type, *dt; /* Datatype to use for attribute */
H5S_t *space; /* Dataspace to use for attribute */
H5A_t *attr = NULL;
@@ -314,12 +314,12 @@ H5VL__native_attr_get(void *obj, H5VL_attr_get_args_t *args, hid_t H5_ATTR_UNUSE
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "can't open attribute");
/* Get the length of the name */
- *get_name_args->attr_name_len = HDstrlen(attr->shared->name);
+ *get_name_args->attr_name_len = strlen(attr->shared->name);
/* Copy the name into the user's buffer, if given */
if (get_name_args->buf) {
- HDstrncpy(get_name_args->buf, attr->shared->name,
- MIN((*get_name_args->attr_name_len + 1), get_name_args->buf_size));
+ strncpy(get_name_args->buf, attr->shared->name,
+ MIN((*get_name_args->attr_name_len + 1), get_name_args->buf_size));
if (*get_name_args->attr_name_len >= get_name_args->buf_size)
get_name_args->buf[get_name_args->buf_size - 1] = '\0';
} /* end if */
diff --git a/src/H5VLnative_blob.c b/src/H5VLnative_blob.c
index 6aebc014bef..718d5487561 100644
--- a/src/H5VLnative_blob.c
+++ b/src/H5VLnative_blob.c
@@ -156,7 +156,7 @@ H5VL__native_blob_specific(void *obj, void *blob_id, H5VL_blob_specific_args_t *
H5F_addr_decode(f, &id, &addr);
/* Check if heap address is 'nil' */
- *args->args.is_null.isnull = (addr == 0 ? TRUE : FALSE);
+ *args->args.is_null.isnull = (addr == 0 ? true : false);
break;
}
diff --git a/src/H5VLnative_dataset.c b/src/H5VLnative_dataset.c
index 92a224908f9..a58eb51b9a2 100644
--- a/src/H5VLnative_dataset.c
+++ b/src/H5VLnative_dataset.c
@@ -97,6 +97,16 @@ H5VL__native_dataset_io_setup(size_t count, void *obj[], hid_t mem_type_id[], hi
/* Iterate over datasets */
for (i = 0; i < count; i++) {
+ /* Initialize fields not set here to prevent use of uninitialized */
+ memset(&dinfo[i].layout_ops, 0, sizeof(dinfo[i].layout_ops));
+ memset(&dinfo[i].io_ops, 0, sizeof(dinfo[i].io_ops));
+ memset(&dinfo[i].layout_io_info, 0, sizeof(dinfo[i].layout_io_info));
+ memset(&dinfo[i].type_info, 0, sizeof(dinfo[i].type_info));
+ dinfo[i].store = NULL;
+ dinfo[i].layout = NULL;
+ dinfo[i].nelmts = 0;
+ dinfo[i].skip_io = false;
+
/* Set up dset */
dinfo[i].dset = (H5D_t *)obj[i];
assert(dinfo[i].dset);
@@ -133,7 +143,7 @@ H5VL__native_dataset_io_setup(size_t count, void *obj[], hid_t mem_type_id[], hi
dinfo[i].file_space = dinfo[i].dset->shared->space;
/* Copy, but share, selection from property list to dataset's dataspace */
- if (H5S_SELECT_COPY(dinfo[i].file_space, space, TRUE) < 0)
+ if (H5S_SELECT_COPY(dinfo[i].file_space, space, true) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy dataset I/O selection");
} /* end else-if */
else {
@@ -173,10 +183,10 @@ H5VL__native_dataset_io_setup(size_t count, void *obj[], hid_t mem_type_id[], hi
} /* end else */
/* Check for valid selections */
- if (H5S_SELECT_VALID(dinfo[i].file_space) != TRUE)
+ if (H5S_SELECT_VALID(dinfo[i].file_space) != true)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL,
"selection + offset not within extent for file dataspace");
- if (H5S_SELECT_VALID(dinfo[i].mem_space) != TRUE)
+ if (H5S_SELECT_VALID(dinfo[i].mem_space) != true)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL,
"selection + offset not within extent for memory dataspace");
@@ -220,7 +230,7 @@ H5VL__native_dataset_io_cleanup(size_t count, hid_t mem_space_id[], hid_t file_s
/* Reset file dataspace selection if it was copied from the property list */
if (H5S_PLIST == file_space_id[i] && dinfo[i].file_space)
- if (H5S_select_all(dinfo[i].file_space, TRUE) < 0)
+ if (H5S_select_all(dinfo[i].file_space, true) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTRELEASE, FAIL,
"unable to release file dataspace selection for H5S_PLIST");
}
diff --git a/src/H5VLnative_file.c b/src/H5VLnative_file.c
index 56cfae20f3e..9ebc2c28cfd 100644
--- a/src/H5VLnative_file.c
+++ b/src/H5VLnative_file.c
@@ -92,7 +92,7 @@ H5VL__native_file_create(const char *name, unsigned flags, hid_t fcpl_id, hid_t
/* Create the file */
if (NULL == (new_file = H5F_open(name, flags, fcpl_id, fapl_id)))
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to create file");
- new_file->id_exists = TRUE;
+ new_file->id_exists = true;
ret_value = (void *)new_file;
@@ -126,7 +126,7 @@ H5VL__native_file_open(const char *name, unsigned flags, hid_t fapl_id, hid_t H5
/* Open the file */
if (NULL == (new_file = H5F_open(name, flags, H5P_FILE_CREATE_DEFAULT, fapl_id)))
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file");
- new_file->id_exists = TRUE;
+ new_file->id_exists = true;
ret_value = (void *)new_file;
@@ -166,7 +166,7 @@ H5VL__native_file_get(void *obj, H5VL_file_get_args_t *args, hid_t H5_ATTR_UNUSE
/* H5Fget_access_plist */
case H5VL_FILE_GET_FAPL: {
- if ((args->args.get_fapl.fapl_id = H5F_get_access_plist((H5F_t *)obj, TRUE)) < 0)
+ if ((args->args.get_fapl.fapl_id = H5F_get_access_plist((H5F_t *)obj, true)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get file access property list");
break;
@@ -181,7 +181,7 @@ H5VL__native_file_get(void *obj, H5VL_file_get_args_t *args, hid_t H5_ATTR_UNUSE
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list");
/* Create the property list object to return */
- if ((args->args.get_fcpl.fcpl_id = H5P_copy_plist(plist, TRUE)) < 0)
+ if ((args->args.get_fcpl.fcpl_id = H5P_copy_plist(plist, true)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "unable to copy file creation properties");
break;
@@ -231,12 +231,12 @@ H5VL__native_file_get(void *obj, H5VL_file_get_args_t *args, hid_t H5_ATTR_UNUSE
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object");
/* Get length of file name */
- *file_args->file_name_len = HDstrlen(H5F_OPEN_NAME(f));
+ *file_args->file_name_len = strlen(H5F_OPEN_NAME(f));
/* Populate buffer with name, if given */
if (file_args->buf) {
- HDstrncpy(file_args->buf, H5F_OPEN_NAME(f),
- MIN(*file_args->file_name_len + 1, file_args->buf_size));
+ strncpy(file_args->buf, H5F_OPEN_NAME(f),
+ MIN(*file_args->file_name_len + 1, file_args->buf_size));
if (*file_args->file_name_len >= file_args->buf_size)
file_args->buf[file_args->buf_size - 1] = '\0';
} /* end if */
@@ -246,7 +246,7 @@ H5VL__native_file_get(void *obj, H5VL_file_get_args_t *args, hid_t H5_ATTR_UNUSE
/* H5Fget_obj_count */
case H5VL_FILE_GET_OBJ_COUNT: {
- if (H5F_get_obj_count((H5F_t *)obj, args->args.get_obj_count.types, TRUE,
+ if (H5F_get_obj_count((H5F_t *)obj, args->args.get_obj_count.types, true,
args->args.get_obj_count.count) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve object count");
@@ -258,7 +258,7 @@ H5VL__native_file_get(void *obj, H5VL_file_get_args_t *args, hid_t H5_ATTR_UNUSE
H5VL_file_get_obj_ids_args_t *file_args = &args->args.get_obj_ids;
if (H5F_get_obj_ids((H5F_t *)obj, file_args->types, file_args->max_objs, file_args->oid_list,
- TRUE, file_args->count) < 0)
+ true, file_args->count) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve object IDs");
break;
@@ -329,7 +329,7 @@ H5VL__native_file_specific(void *obj, H5VL_file_specific_args_t *args, hid_t H5_
/* Reopen the file through the VOL connector */
if (NULL == (new_file = H5F__reopen((H5F_t *)obj)))
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to reopen file");
- new_file->id_exists = TRUE;
+ new_file->id_exists = true;
/* Set 'out' value */
*args->args.reopen.file = new_file;
@@ -346,7 +346,7 @@ H5VL__native_file_specific(void *obj, H5VL_file_specific_args_t *args, hid_t H5_
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "error in HDF5 file check");
/* Set 'out' value */
- *args->args.is_accessible.accessible = (hbool_t)result;
+ *args->args.is_accessible.accessible = (bool)result;
break;
}
@@ -362,7 +362,7 @@ H5VL__native_file_specific(void *obj, H5VL_file_specific_args_t *args, hid_t H5_
/* Check if two files are the same */
case H5VL_FILE_IS_EQUAL: {
if (!obj || !args->args.is_equal.obj2)
- *args->args.is_equal.same_file = FALSE;
+ *args->args.is_equal.same_file = false;
else
*args->args.is_equal.same_file =
(((H5F_t *)obj)->shared == ((H5F_t *)args->args.is_equal.obj2)->shared);
@@ -771,7 +771,7 @@ H5VL__native_file_close(void *file, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR_U
HGOTO_ERROR(H5E_ID, H5E_CANTGET, FAIL, "invalid ID");
/* Get the number of references outstanding for this file ID */
- if ((nref = H5I_get_ref(file_id, FALSE)) < 0)
+ if ((nref = H5I_get_ref(file_id, false)) < 0)
HGOTO_ERROR(H5E_ID, H5E_CANTGET, FAIL, "can't get ID ref count");
if (nref == 1)
if (H5F__flush(f) < 0)
diff --git a/src/H5VLnative_link.c b/src/H5VLnative_link.c
index 342d65dd1b4..5f4fa4db6b2 100644
--- a/src/H5VLnative_link.c
+++ b/src/H5VLnative_link.c
@@ -184,7 +184,7 @@ H5VL__native_link_copy(void *src_obj, const H5VL_loc_params_t *loc_params1, void
/* Copy the link */
if (H5L__move(src_loc_p, loc_params1->loc_data.loc_by_name.name, dst_loc_p,
- loc_params2->loc_data.loc_by_name.name, TRUE, lcpl_id) < 0)
+ loc_params2->loc_data.loc_by_name.name, true, lcpl_id) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to copy link");
done:
@@ -226,7 +226,7 @@ H5VL__native_link_move(void *src_obj, const H5VL_loc_params_t *loc_params1, void
/* Move the link */
if (H5L__move(src_loc_p, loc_params1->loc_data.loc_by_name.name, dst_loc_p,
- loc_params2->loc_data.loc_by_name.name, FALSE, lcpl_id) < 0)
+ loc_params2->loc_data.loc_by_name.name, false, lcpl_id) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTMOVE, FAIL, "unable to move link");
done:
diff --git a/src/H5VLnative_object.c b/src/H5VLnative_object.c
index 82d267f074d..8c21e7f8d03 100644
--- a/src/H5VLnative_object.c
+++ b/src/H5VLnative_object.c
@@ -187,11 +187,11 @@ H5VL__native_object_get(void *obj, const H5VL_loc_params_t *loc_params, H5VL_obj
if (loc_params->type == H5VL_OBJECT_BY_SELF) {
*args->args.get_file.file = (void *)loc.oloc->file;
- /* TODO we currently need to set id_exists to TRUE because
+ /* TODO we currently need to set id_exists to true because
* the upper layer will create an ID from the returned
* object. In theory this should not be needed and id_exists
* should be removed once the H5Fmount code gets fixed. */
- loc.oloc->file->id_exists = TRUE;
+ loc.oloc->file->id_exists = true;
}
else
HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "unknown get_file parameters");
diff --git a/src/H5VLnative_token.c b/src/H5VLnative_token.c
index e03299ebfc2..353e8cdad86 100644
--- a/src/H5VLnative_token.c
+++ b/src/H5VLnative_token.c
@@ -107,12 +107,12 @@ H5VL__native_token_to_str(void *obj, H5I_type_t obj_type, const H5O_token_t *tok
if (addr == 0)
addr_ndigits = 1;
else
- addr_ndigits = (size_t)(HDfloor(HDlog10((double)addr)) + 1);
+ addr_ndigits = (size_t)(floor(log10((double)addr)) + 1);
if (NULL == (*token_str = H5MM_malloc(addr_ndigits + 1)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate buffer for token string");
- HDsnprintf(*token_str, addr_ndigits + 1, "%" PRIuHADDR, addr);
+ snprintf(*token_str, addr_ndigits + 1, "%" PRIuHADDR, addr);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -139,7 +139,7 @@ H5VL__native_str_to_token(void *obj, H5I_type_t obj_type, const char *token_str,
/* Check parameters */
assert(token_str);
- HDsscanf(token_str, "%" PRIuHADDR, &addr);
+ sscanf(token_str, "%" PRIuHADDR, &addr);
if (H5VL_native_addr_to_token(obj, obj_type, addr, token) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, FAIL, "can't convert address to object token");
diff --git a/src/H5VLpassthru.c b/src/H5VLpassthru.c
index 3867df2d7a6..09ac6617e09 100644
--- a/src/H5VLpassthru.c
+++ b/src/H5VLpassthru.c
@@ -650,7 +650,7 @@ H5VL_pass_through_info_to_str(const void *_info, char **str)
/* Allocate space for our info */
size_t strSize = 32 + under_vol_str_len;
- *str = (char *)H5allocate_memory(strSize, (hbool_t)0);
+ *str = (char *)H5allocate_memory(strSize, (bool)0);
assert(*str);
/* Encode our info */
diff --git a/src/H5VLpkg.h b/src/H5VLpkg.h
index 5a4ccc1482c..dae44eaf5d1 100644
--- a/src/H5VLpkg.h
+++ b/src/H5VLpkg.h
@@ -44,20 +44,20 @@
/* Package Private Prototypes */
/******************************/
H5_DLL herr_t H5VL__set_def_conn(void);
-H5_DLL hid_t H5VL__register_connector(const void *cls, hbool_t app_ref, hid_t vipl_id);
-H5_DLL hid_t H5VL__register_connector_by_class(const H5VL_class_t *cls, hbool_t app_ref, hid_t vipl_id);
-H5_DLL hid_t H5VL__register_connector_by_name(const char *name, hbool_t app_ref, hid_t vipl_id);
-H5_DLL hid_t H5VL__register_connector_by_value(H5VL_class_value_t value, hbool_t app_ref, hid_t vipl_id);
+H5_DLL hid_t H5VL__register_connector(const void *cls, bool app_ref, hid_t vipl_id);
+H5_DLL hid_t H5VL__register_connector_by_class(const H5VL_class_t *cls, bool app_ref, hid_t vipl_id);
+H5_DLL hid_t H5VL__register_connector_by_name(const char *name, bool app_ref, hid_t vipl_id);
+H5_DLL hid_t H5VL__register_connector_by_value(H5VL_class_value_t value, bool app_ref, hid_t vipl_id);
H5_DLL htri_t H5VL__is_connector_registered_by_name(const char *name);
H5_DLL htri_t H5VL__is_connector_registered_by_value(H5VL_class_value_t value);
-H5_DLL hid_t H5VL__get_connector_id(hid_t obj_id, hbool_t is_api);
-H5_DLL hid_t H5VL__get_connector_id_by_name(const char *name, hbool_t is_api);
-H5_DLL hid_t H5VL__get_connector_id_by_value(H5VL_class_value_t value, hbool_t is_api);
+H5_DLL hid_t H5VL__get_connector_id(hid_t obj_id, bool is_api);
+H5_DLL hid_t H5VL__get_connector_id_by_name(const char *name, bool is_api);
+H5_DLL hid_t H5VL__get_connector_id_by_value(H5VL_class_value_t value, bool is_api);
H5_DLL hid_t H5VL__peek_connector_id_by_name(const char *name);
H5_DLL hid_t H5VL__peek_connector_id_by_value(H5VL_class_value_t value);
H5_DLL herr_t H5VL__connector_str_to_info(const char *str, hid_t connector_id, void **info);
H5_DLL ssize_t H5VL__get_connector_name(hid_t id, char *name /*out*/, size_t size);
-H5_DLL void H5VL__is_default_conn(hid_t fapl_id, hid_t connector_id, hbool_t *is_default);
+H5_DLL void H5VL__is_default_conn(hid_t fapl_id, hid_t connector_id, bool *is_default);
H5_DLL herr_t H5VL__register_opt_operation(H5VL_subclass_t subcls, const char *op_name, int *op_val);
H5_DLL size_t H5VL__num_opt_operation(void);
H5_DLL herr_t H5VL__find_opt_operation(H5VL_subclass_t subcls, const char *op_name, int *op_val);
diff --git a/src/H5VLprivate.h b/src/H5VLprivate.h
index 5f73e74f87c..d0c856b9040 100644
--- a/src/H5VLprivate.h
+++ b/src/H5VLprivate.h
@@ -78,7 +78,7 @@ H5_DLL herr_t H5VL_get_cap_flags(const H5VL_connector_prop_t *prop, uint64_t *c
/* Functions that deal with VOL connectors */
union H5PL_key_t;
-H5_DLL herr_t H5VL_check_plugin_load(const H5VL_class_t *cls, const union H5PL_key_t *key, hbool_t *success);
+H5_DLL herr_t H5VL_check_plugin_load(const H5VL_class_t *cls, const union H5PL_key_t *key, bool *success);
/* NOTE: The object and ID functions below deal in VOL objects (i.e.;
* H5VL_object_t). Similar non-VOL calls exist in H5Iprivate.h. Use
@@ -100,9 +100,9 @@ H5_DLL H5VL_object_t *H5VL_create_object(void *object, H5VL_t *vol_connector);
H5_DLL H5VL_object_t *H5VL_create_object_using_vol_id(H5I_type_t type, void *obj, hid_t connector_id);
H5_DLL hsize_t H5VL_object_inc_rc(H5VL_object_t *obj);
H5_DLL herr_t H5VL_free_object(H5VL_object_t *obj);
-H5_DLL herr_t H5VL_object_is_native(const H5VL_object_t *obj, hbool_t *is_native);
+H5_DLL herr_t H5VL_object_is_native(const H5VL_object_t *obj, bool *is_native);
H5_DLL herr_t H5VL_file_is_same(const H5VL_object_t *vol_obj1, const H5VL_object_t *vol_obj2,
- hbool_t *same_file);
+ bool *same_file);
/* Functions that wrap / unwrap VOL objects */
H5_DLL herr_t H5VL_get_wrap_ctx(const H5VL_class_t *connector, void *obj, void **wrap_ctx);
@@ -122,23 +122,23 @@ H5_DLL herr_t H5VL_finish_lib_state(void);
H5_DLL herr_t H5VL_free_lib_state(void *state);
/* ID registration functions */
-H5_DLL hid_t H5VL_register(H5I_type_t type, void *object, H5VL_t *vol_connector, hbool_t app_ref);
-H5_DLL hid_t H5VL_wrap_register(H5I_type_t type, void *obj, hbool_t app_ref);
-H5_DLL hid_t H5VL_register_using_vol_id(H5I_type_t type, void *obj, hid_t connector_id, hbool_t app_ref);
+H5_DLL hid_t H5VL_register(H5I_type_t type, void *object, H5VL_t *vol_connector, bool app_ref);
+H5_DLL hid_t H5VL_wrap_register(H5I_type_t type, void *obj, bool app_ref);
+H5_DLL hid_t H5VL_register_using_vol_id(H5I_type_t type, void *obj, hid_t connector_id, bool app_ref);
H5_DLL herr_t H5VL_register_using_existing_id(H5I_type_t type, void *object, H5VL_t *vol_connector,
- hbool_t app_ref, hid_t existing_id);
+ bool app_ref, hid_t existing_id);
/* Object access functions */
struct H5P_libclass_t;
H5_DLL herr_t H5VL_setup_args(hid_t loc_id, H5I_type_t id_type, H5VL_object_t **vol_obj);
H5_DLL herr_t H5VL_setup_loc_args(hid_t loc_id, H5VL_object_t **vol_obj, H5VL_loc_params_t *loc_params);
-H5_DLL herr_t H5VL_setup_acc_args(hid_t loc_id, const struct H5P_libclass_t *libclass, hbool_t is_collective,
+H5_DLL herr_t H5VL_setup_acc_args(hid_t loc_id, const struct H5P_libclass_t *libclass, bool is_collective,
hid_t *acspl_id, H5VL_object_t **vol_obj, H5VL_loc_params_t *loc_params);
H5_DLL herr_t H5VL_setup_self_args(hid_t loc_id, H5VL_object_t **vol_obj, H5VL_loc_params_t *loc_params);
-H5_DLL herr_t H5VL_setup_name_args(hid_t loc_id, const char *name, hbool_t is_collective, hid_t lapl_id,
+H5_DLL herr_t H5VL_setup_name_args(hid_t loc_id, const char *name, bool is_collective, hid_t lapl_id,
H5VL_object_t **vol_obj, H5VL_loc_params_t *loc_params);
H5_DLL herr_t H5VL_setup_idx_args(hid_t loc_id, const char *name, H5_index_t idx_type, H5_iter_order_t order,
- hsize_t n, hbool_t is_collective, hid_t lapl_id, H5VL_object_t **vol_obj,
+ hsize_t n, bool is_collective, hid_t lapl_id, H5VL_object_t **vol_obj,
H5VL_loc_params_t *loc_params);
H5_DLL herr_t H5VL_setup_token_args(hid_t loc_id, H5O_token_t *obj_token, H5VL_object_t **vol_obj,
H5VL_loc_params_t *loc_params);
diff --git a/src/H5VM.c b/src/H5VM.c
index abfde225682..6bdf0792b0b 100644
--- a/src/H5VM.c
+++ b/src/H5VM.c
@@ -285,11 +285,11 @@ H5VM_hyper_stride(unsigned n, const hsize_t *size, const hsize_t *total_size, co
* assumes that both hyperslabs are relative to the same array,
* for if not, they could not possibly be equal.
*
- * Return: TRUE if the hyperslabs are equal (that is,
+ * Return: true if the hyperslabs are equal (that is,
* both refer to exactly the same elements of an
* array)
*
- * FALSE otherwise
+ * false otherwise
*
* Never returns FAIL
*
@@ -301,23 +301,23 @@ H5VM_hyper_eq(unsigned n, const hsize_t *offset1, const hsize_t *size1, const hs
{
hsize_t nelmts1 = 1, nelmts2 = 1;
unsigned i;
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = true; /* Return value */
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
if (n == 0)
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
for (i = 0; i < n; i++) {
if ((offset1 ? offset1[i] : 0) != (offset2 ? offset2[i] : 0))
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
if ((size1 ? size1[i] : 0) != (size2 ? size2[i] : 0))
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
if (0 == (nelmts1 *= (size1 ? size1[i] : 0)))
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
if (0 == (nelmts2 *= (size2 ? size2[i] : 0)))
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
}
done:
@@ -569,7 +569,7 @@ H5VM_stride_fill(unsigned n, hsize_t elmt_size, const hsize_t *size, const hsize
hsize_t nelmts; /*number of elements to fill */
hsize_t i; /*counter */
int j; /*counter */
- hbool_t carry; /*subtraction carray value */
+ bool carry; /*subtraction carray value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -583,11 +583,11 @@ H5VM_stride_fill(unsigned n, hsize_t elmt_size, const hsize_t *size, const hsize
memset(dst, (int)fill_value, (size_t)elmt_size); /*lint !e671 The elmt_size will be OK */
/* Decrement indices and advance pointer */
- for (j = (int)(n - 1), carry = TRUE; j >= 0 && carry; --j) {
+ for (j = (int)(n - 1), carry = true; j >= 0 && carry; --j) {
dst += stride[j];
if (--idx[j])
- carry = FALSE;
+ carry = false;
else {
assert(size);
idx[j] = size[j];
@@ -624,7 +624,7 @@ H5VM_stride_copy(unsigned n, hsize_t elmt_size, const hsize_t *size, const hsize
hsize_t nelmts; /*num elements to copy */
hsize_t i; /*counter */
int j; /*counters */
- hbool_t carry; /*carray for subtraction*/
+ bool carry; /*carray for subtraction*/
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -640,12 +640,12 @@ H5VM_stride_copy(unsigned n, hsize_t elmt_size, const hsize_t *size, const hsize
H5MM_memcpy(dst, src, (size_t)elmt_size); /*lint !e671 The elmt_size will be OK */
/* Decrement indices and advance pointers */
- for (j = (int)(n - 1), carry = TRUE; j >= 0 && carry; --j) {
+ for (j = (int)(n - 1), carry = true; j >= 0 && carry; --j) {
src += src_stride[j];
dst += dst_stride[j];
if (--idx[j])
- carry = FALSE;
+ carry = false;
else {
assert(size);
idx[j] = size[j];
@@ -687,7 +687,7 @@ H5VM_stride_copy_s(unsigned n, hsize_t elmt_size, const hsize_t *size, const hss
hsize_t nelmts; /*num elements to copy */
hsize_t i; /*counter */
int j; /*counters */
- hbool_t carry; /*carray for subtraction*/
+ bool carry; /*carray for subtraction*/
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -703,12 +703,12 @@ H5VM_stride_copy_s(unsigned n, hsize_t elmt_size, const hsize_t *size, const hss
H5MM_memcpy(dst, src, (size_t)elmt_size); /*lint !e671 The elmt_size will be OK */
/* Decrement indices and advance pointers */
- for (j = (int)(n - 1), carry = TRUE; j >= 0 && carry; --j) {
+ for (j = (int)(n - 1), carry = true; j >= 0 && carry; --j) {
src += src_stride[j];
dst += dst_stride[j];
if (--idx[j])
- carry = FALSE;
+ carry = false;
else {
assert(size);
idx[j] = size[j];
diff --git a/src/H5VMprivate.h b/src/H5VMprivate.h
index aa1c0f16bd3..d4e427306db 100644
--- a/src/H5VMprivate.h
+++ b/src/H5VMprivate.h
@@ -159,23 +159,23 @@ H5VM_vector_reduce_product(unsigned n, const hsize_t *v)
* only as an optimization and the naming (with a single underscore)
* reflects its inclusion in a "private" header file.
*
- * Return: Success: TRUE if all elements are zero,
- * Failure: TRUE if N is zero
+ * Return: Success: true if all elements are zero,
+ * Failure: true if N is zero
*-------------------------------------------------------------------------
*/
static inline htri_t H5_ATTR_UNUSED
H5VM_vector_zerop_u(int n, const hsize_t *v)
{
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = true; /* Return value */
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
if (!v)
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
while (n--)
if (*v++)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -190,24 +190,24 @@ H5VM_vector_zerop_u(int n, const hsize_t *v)
* only as an optimization and the naming (with a single underscore)
* reflects its inclusion in a "private" header file.
*
- * Return: Success: TRUE if all elements are zero,
- * FALSE otherwise
- * Failure: TRUE if N is zero
+ * Return: Success: true if all elements are zero,
+ * false otherwise
+ * Failure: true if N is zero
*-------------------------------------------------------------------------
*/
static inline htri_t H5_ATTR_UNUSED
H5VM_vector_zerop_s(int n, const hssize_t *v)
{
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = true; /* Return value */
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
if (!v)
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
while (n--)
if (*v++)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -472,14 +472,14 @@ static const unsigned char H5VM_bit_clear_g[8] = {0x7F, 0xBF, 0xDF, 0xEF, 0xF7,
* only as an optimization and the naming (with a single underscore)
* reflects its inclusion in a "private" header file.
*
- * Return: TRUE/FALSE
+ * Return: true/false
*-------------------------------------------------------------------------
*/
-static inline hbool_t H5_ATTR_UNUSED
+static inline bool H5_ATTR_UNUSED
H5VM_bit_get(const unsigned char *buf, size_t offset)
{
/* Test the appropriate bit in the buffer */
- return (hbool_t)((buf[offset / 8] & (H5VM_bit_set_g[offset % 8])) ? TRUE : FALSE);
+ return (bool)((buf[offset / 8] & (H5VM_bit_set_g[offset % 8])) ? true : false);
} /* end H5VM_bit_get() */
/*-------------------------------------------------------------------------
@@ -502,7 +502,7 @@ H5VM_bit_get(const unsigned char *buf, size_t offset)
*-------------------------------------------------------------------------
*/
static inline void H5_ATTR_UNUSED
-H5VM_bit_set(unsigned char *buf, size_t offset, hbool_t val)
+H5VM_bit_set(unsigned char *buf, size_t offset, bool val)
{
/* Set/reset the appropriate bit in the buffer */
if (val)
diff --git a/src/H5Z.c b/src/H5Z.c
index 111d71a3148..b514f628887 100644
--- a/src/H5Z.c
+++ b/src/H5Z.c
@@ -44,9 +44,8 @@ typedef struct H5Z_object_t {
H5Z_filter_t filter_id; /* ID of the filter we're looking for */
htri_t found; /* Whether we find an object using the filter */
#ifdef H5_HAVE_PARALLEL
- hbool_t
- sanity_checked; /* Whether the sanity check for collectively calling H5Zunregister has been done */
-#endif /* H5_HAVE_PARALLEL */
+ bool sanity_checked; /* Whether the sanity check for collectively calling H5Zunregister has been done */
+#endif /* H5_HAVE_PARALLEL */
} H5Z_object_t;
/* Enumerated type for dataset creation prelude callbacks */
@@ -163,7 +162,7 @@ H5Z_term_package(void)
} /* end if */
/* Truncate the comment to fit in the field */
- HDstrncpy(comment, H5Z_table_g[i].name, sizeof comment);
+ strncpy(comment, H5Z_table_g[i].name, sizeof comment);
comment[sizeof(comment) - 1] = '\0';
/*
@@ -401,13 +400,13 @@ H5Z__unregister(H5Z_filter_t filter_id)
/* Initialize the structure object for iteration */
object.filter_id = filter_id;
- object.found = FALSE;
+ object.found = false;
#ifdef H5_HAVE_PARALLEL
- object.sanity_checked = FALSE;
+ object.sanity_checked = false;
#endif /* H5_HAVE_PARALLEL */
/* Iterate through all opened datasets, returns a failure if any of them uses the filter */
- if (H5I_iterate(H5I_DATASET, H5Z__check_unregister_dset_cb, &object, FALSE) < 0)
+ if (H5I_iterate(H5I_DATASET, H5Z__check_unregister_dset_cb, &object, false) < 0)
HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed");
if (object.found)
@@ -415,7 +414,7 @@ H5Z__unregister(H5Z_filter_t filter_id)
"can't unregister filter because a dataset is still using it");
/* Iterate through all opened groups, returns a failure if any of them uses the filter */
- if (H5I_iterate(H5I_GROUP, H5Z__check_unregister_group_cb, &object, FALSE) < 0)
+ if (H5I_iterate(H5I_GROUP, H5Z__check_unregister_group_cb, &object, false) < 0)
HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed");
if (object.found)
@@ -423,7 +422,7 @@ H5Z__unregister(H5Z_filter_t filter_id)
"can't unregister filter because a group is still using it");
/* Iterate through all opened files and flush them */
- if (H5I_iterate(H5I_FILE, H5Z__flush_file_cb, &object, FALSE) < 0)
+ if (H5I_iterate(H5I_FILE, H5Z__flush_file_cb, &object, false) < 0)
HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed");
/* Remove filter from table */
@@ -445,8 +444,8 @@ H5Z__unregister(H5Z_filter_t filter_id)
*
* Purpose: Check if an object uses the filter to be unregistered.
*
- * Return: TRUE if the object uses the filter
- * FALSE if not
+ * Return: true if the object uses the filter
+ * false if not
* NEGATIVE on error
*
*-------------------------------------------------------------------------
@@ -455,7 +454,7 @@ static htri_t
H5Z__check_unregister(hid_t ocpl_id, H5Z_filter_t filter_id)
{
H5P_genplist_t *plist; /* Property list */
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE
@@ -477,10 +476,10 @@ H5Z__check_unregister(hid_t ocpl_id, H5Z_filter_t filter_id)
* Purpose: The callback function for H5Z__unregister. It iterates
* through all opened objects. If the object is a dataset
* or a group and it uses the filter to be unregistered, the
- * function returns TRUE.
+ * function returns true.
*
- * Return: TRUE if the object uses the filter
- * FALSE if not
+ * Return: true if the object uses the filter
+ * false if not
* NEGATIVE on error
*
*-------------------------------------------------------------------------
@@ -490,8 +489,8 @@ H5Z__check_unregister_group_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void
{
hid_t ocpl_id = -1;
H5Z_object_t *object = (H5Z_object_t *)key;
- htri_t filter_in_pline = FALSE;
- int ret_value = FALSE; /* Return value */
+ htri_t filter_in_pline = false;
+ int ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE
@@ -505,12 +504,12 @@ H5Z__check_unregister_group_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void
if ((filter_in_pline = H5Z__check_unregister(ocpl_id, object->filter_id)) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't check filter in pipeline");
- /* H5I_iterate expects TRUE to stop the loop over objects. Stop the loop and
+ /* H5I_iterate expects true to stop the loop over objects. Stop the loop and
* let H5Z__unregister return failure.
*/
if (filter_in_pline) {
- object->found = TRUE;
- ret_value = TRUE;
+ object->found = true;
+ ret_value = true;
}
done:
@@ -527,10 +526,10 @@ H5Z__check_unregister_group_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void
* Purpose: The callback function for H5Z__unregister. It iterates
* through all opened objects. If the object is a dataset
* or a group and it uses the filter to be unregistered, the
- * function returns TRUE.
+ * function returns true.
*
- * Return: TRUE if the object uses the filter
- * FALSE if not
+ * Return: true if the object uses the filter
+ * false if not
* NEGATIVE on error
*
*-------------------------------------------------------------------------
@@ -540,8 +539,8 @@ H5Z__check_unregister_dset_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void *
{
hid_t ocpl_id = -1;
H5Z_object_t *object = (H5Z_object_t *)key;
- htri_t filter_in_pline = FALSE;
- int ret_value = FALSE; /* Return value */
+ htri_t filter_in_pline = false;
+ int ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE
@@ -555,12 +554,12 @@ H5Z__check_unregister_dset_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void *
if ((filter_in_pline = H5Z__check_unregister(ocpl_id, object->filter_id)) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't check filter in pipeline");
- /* H5I_iterate expects TRUE to stop the loop over objects. Stop the loop and
+ /* H5I_iterate expects true to stop the loop over objects. Stop the loop and
* let H5Z__unregister return failure.
*/
if (filter_in_pline) {
- object->found = TRUE;
- ret_value = TRUE;
+ object->found = true;
+ ret_value = true;
}
done:
@@ -588,7 +587,7 @@ H5Z__flush_file_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void H5_ATTR_PARA
#ifdef H5_HAVE_PARALLEL
H5Z_object_t *object = (H5Z_object_t *)key;
#endif /* H5_HAVE_PARALLEL */
- int ret_value = FALSE; /* Return value */
+ int ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE
@@ -619,7 +618,7 @@ H5Z__flush_file_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void H5_ATTR_PARA
MPI_Barrier(mpi_comm);
/* Set the "sanity checked" flag */
- object->sanity_checked = TRUE;
+ object->sanity_checked = true;
} /* end if */
} /* end if */
#endif /* H5_HAVE_PARALLEL */
@@ -638,13 +637,13 @@ H5Z__flush_file_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void H5_ATTR_PARA
*
* Purpose: Check if a filter is available
*
- * Return: Non-negative (TRUE/FALSE) on success/Negative on failure
+ * Return: Non-negative (true/false) on success/Negative on failure
*-------------------------------------------------------------------------
*/
htri_t
H5Zfilter_avail(H5Z_filter_t id)
{
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE1("t", "Zf", id);
@@ -665,7 +664,7 @@ H5Zfilter_avail(H5Z_filter_t id)
*
* Purpose: Private function to check if a filter is available
*
- * Return: Non-negative (TRUE/FALSE) on success/Negative on failure
+ * Return: Non-negative (true/false) on success/Negative on failure
*-------------------------------------------------------------------------
*/
htri_t
@@ -674,20 +673,20 @@ H5Z_filter_avail(H5Z_filter_t id)
H5PL_key_t key; /* Key for finding a plugin */
const H5Z_class2_t *filter_info; /* Filter information */
size_t i; /* Local index variable */
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Is the filter already registered? */
for (i = 0; i < H5Z_table_used_g; i++)
if (H5Z_table_g[i].id == id)
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
key.id = (int)id;
if (NULL != (filter_info = (const H5Z_class2_t *)H5PL_load(H5PL_TYPE_FILTER, &key))) {
if (H5Z_register(filter_info) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register loaded filter");
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
} /* end if */
done:
@@ -713,7 +712,7 @@ H5Z__prelude_callback(const H5O_pline_t *pline, hid_t dcpl_id, hid_t type_id, hi
{
H5Z_class2_t *fclass; /* Individual filter information */
size_t u; /* Local index variable */
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE
@@ -749,7 +748,7 @@ H5Z__prelude_callback(const H5O_pline_t *pline, hid_t dcpl_id, hid_t type_id, hi
/* Indicate filter can't apply to this combination of parameters.
* If the filter is NOT optional, returns failure. */
- if (status == FALSE && !(pline->filter[u].flags & H5Z_FLAG_OPTIONAL))
+ if (status == false && !(pline->filter[u].flags & H5Z_FLAG_OPTIONAL))
HGOTO_ERROR(H5E_PLINE, H5E_CANAPPLY, FAIL, "filter parameters not appropriate");
} /* end if */
break;
@@ -837,7 +836,7 @@ H5Z__prepare_prelude_callback_dcpl(hid_t dcpl_id, hid_t type_id, H5Z_prelude_typ
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace");
/* Get ID for dataspace to pass to filter routines */
- if ((space_id = H5I_register(H5I_DATASPACE, space, FALSE)) < 0) {
+ if ((space_id = H5I_register(H5I_DATASPACE, space, false)) < 0) {
(void)H5S_close(space);
HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID");
}
@@ -992,7 +991,7 @@ H5Z_set_local_direct(const H5O_pline_t *pline)
* However, if any of these conditions exists and a filter is not
* optional, the function will produce an error.
*
- * Return: Non-negative(TRUE/FALSE) on success
+ * Return: Non-negative(true/false) on success
* Negative on failure
*
*-------------------------------------------------------------------------
@@ -1004,8 +1003,8 @@ H5Z_ignore_filters(hid_t dcpl_id, const H5T_t *type, const H5S_t *space)
H5O_pline_t pline; /* Object's I/O pipeline information */
H5S_class_t space_class; /* To check class of space */
H5T_class_t type_class; /* To check if type is VL */
- hbool_t bad_for_filters = FALSE; /* Suitable to have filters */
- htri_t ret_value = FALSE; /* TRUE for ignoring filters */
+ bool bad_for_filters = false; /* Suitable to have filters */
+ htri_t ret_value = false; /* true for ignoring filters */
FUNC_ENTER_NOAPI(FAIL)
@@ -1018,11 +1017,11 @@ H5Z_ignore_filters(hid_t dcpl_id, const H5T_t *type, const H5S_t *space)
/* Get datatype and dataspace classes for quick access */
space_class = H5S_GET_EXTENT_TYPE(space);
- type_class = H5T_get_class(type, FALSE);
+ type_class = H5T_get_class(type, false);
/* These conditions are not suitable for filters */
bad_for_filters = (H5S_NULL == space_class || H5S_SCALAR == space_class || H5T_VLEN == type_class ||
- (H5T_STRING == type_class && TRUE == H5T_is_variable_str(type)));
+ (H5T_STRING == type_class && true == H5T_is_variable_str(type)));
/* When these conditions occur, if there are required filters in pline,
then report a failure, otherwise, set flag that they can be ignored */
@@ -1035,7 +1034,7 @@ H5Z_ignore_filters(hid_t dcpl_id, const H5T_t *type, const H5S_t *space)
}
/* All filters are optional, we can ignore them */
- ret_value = TRUE;
+ ret_value = true;
}
} /* bad for filters */
@@ -1330,7 +1329,7 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags, unsigned *filter_mask /*i
if ((fclass_idx = H5Z__find_idx(pline->filter[idx].id)) < 0) {
H5PL_key_t key;
const H5Z_class2_t *filter_info;
- hbool_t issue_error = FALSE;
+ bool issue_error = false;
/* Try loading the filter */
key.id = (int)(pline->filter[idx].id);
@@ -1342,10 +1341,10 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags, unsigned *filter_mask /*i
/* Search in the table of registered filters again to find the dynamic filter just loaded
* and registered */
if ((fclass_idx = H5Z__find_idx(pline->filter[idx].id)) < 0)
- issue_error = TRUE;
+ issue_error = true;
}
else
- issue_error = TRUE;
+ issue_error = true;
/* Check for error */
if (issue_error) {
@@ -1500,8 +1499,8 @@ H5Z_filter_info(const H5O_pline_t *pline, H5Z_filter_t filter)
* Purpose: Check whether a filter is in the filter pipeline using the
* filter ID. This function is very similar to H5Z_filter_info
*
- * Return: TRUE - found filter
- * FALSE - not found
+ * Return: true - found filter
+ * false - not found
* FAIL - error
*-------------------------------------------------------------------------
*/
@@ -1509,7 +1508,7 @@ htri_t
H5Z_filter_in_pline(const H5O_pline_t *pline, H5Z_filter_t filter)
{
size_t idx; /* Index of filter in pipeline */
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_NOAPI_NOERR
@@ -1523,7 +1522,7 @@ H5Z_filter_in_pline(const H5O_pline_t *pline, H5Z_filter_t filter)
/* Check if the filter was not already in the pipeline */
if (idx >= pline->nused)
- ret_value = FALSE;
+ ret_value = false;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5Z_filter_in_pline() */
@@ -1534,7 +1533,7 @@ H5Z_filter_in_pline(const H5O_pline_t *pline, H5Z_filter_t filter)
* Purpose: Verify that all the filters in a pipeline are currently
* available (i.e. registered)
*
- * Return: Non-negative (TRUE/FALSE) on success
+ * Return: Non-negative (true/false) on success
* Negative on failure
*-------------------------------------------------------------------------
*/
@@ -1542,7 +1541,7 @@ htri_t
H5Z_all_filters_avail(const H5O_pline_t *pline)
{
size_t i, j; /* Local index variable */
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_NOAPI_NOERR
@@ -1558,7 +1557,7 @@ H5Z_all_filters_avail(const H5O_pline_t *pline)
/* Check if we didn't find the filter */
if (j == H5Z_table_used_g)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
} /* end for */
done:
@@ -1569,7 +1568,7 @@ H5Z_all_filters_avail(const H5O_pline_t *pline)
* Function: H5Z_delete
*
* Purpose: Delete filter FILTER from pipeline PLINE;
- * deletes all filters if FILTER is H5Z_FILTER_NONE
+ * deletes all filters if FILTER is H5Z_FILTER_ALL
*
* Return: Non-negative on success
* Negative on failure
@@ -1597,13 +1596,13 @@ H5Z_delete(H5O_pline_t *pline, H5Z_filter_t filter)
}
/* Delete filter */
else {
- size_t idx; /* Index of filter in pipeline */
- hbool_t found = FALSE; /* Indicate filter was found in pipeline */
+ size_t idx; /* Index of filter in pipeline */
+ bool found = false; /* Indicate filter was found in pipeline */
/* Locate the filter in the pipeline */
for (idx = 0; idx < pline->nused; idx++)
if (pline->filter[idx].id == filter) {
- found = TRUE;
+ found = true;
break;
}
@@ -1613,7 +1612,7 @@ H5Z_delete(H5O_pline_t *pline, H5Z_filter_t filter)
/* Free information for deleted filter */
if (pline->filter[idx].name && pline->filter[idx].name != pline->filter[idx]._name)
- assert((HDstrlen(pline->filter[idx].name) + 1) > H5Z_COMMON_NAME_LEN);
+ assert((strlen(pline->filter[idx].name) + 1) > H5Z_COMMON_NAME_LEN);
if (pline->filter[idx].name != pline->filter[idx]._name)
pline->filter[idx].name = (char *)H5MM_xfree(pline->filter[idx].name);
if (pline->filter[idx].cd_values && pline->filter[idx].cd_values != pline->filter[idx]._cd_values)
@@ -1626,7 +1625,7 @@ H5Z_delete(H5O_pline_t *pline, H5Z_filter_t filter)
/* Copy filters down & fix up any client data value arrays using internal storage */
for (; (idx + 1) < pline->nused; idx++) {
pline->filter[idx] = pline->filter[idx + 1];
- if (pline->filter[idx].name && (HDstrlen(pline->filter[idx].name) + 1) <= H5Z_COMMON_NAME_LEN)
+ if (pline->filter[idx].name && (strlen(pline->filter[idx].name) + 1) <= H5Z_COMMON_NAME_LEN)
pline->filter[idx].name = pline->filter[idx]._name;
if (pline->filter[idx].cd_nelmts <= H5Z_COMMON_CD_VALUES)
pline->filter[idx].cd_values = pline->filter[idx]._cd_values;
diff --git a/src/H5Zdeflate.c b/src/H5Zdeflate.c
index b7a372b645a..032945ae0bf 100644
--- a/src/H5Zdeflate.c
+++ b/src/H5Zdeflate.c
@@ -42,7 +42,7 @@ const H5Z_class2_t H5Z_DEFLATE[1] = {{
H5Z__filter_deflate, /* The actual filter function */
}};
-#define H5Z_DEFLATE_SIZE_ADJUST(s) (HDceil(((double)(s)) * 1.001) + 12)
+#define H5Z_DEFLATE_SIZE_ADJUST(s) (ceil(((double)(s)) * 1.001) + 12)
/*-------------------------------------------------------------------------
* Function: H5Z__filter_deflate
diff --git a/src/H5Znbit.c b/src/H5Znbit.c
index 80878f67904..65d09c78fef 100644
--- a/src/H5Znbit.c
+++ b/src/H5Znbit.c
@@ -45,11 +45,11 @@ static herr_t H5Z__calc_parms_compound(const H5T_t *type, size_t *cd_values_actu
static herr_t H5Z__set_parms_nooptype(const H5T_t *type, unsigned *cd_values_index, unsigned cd_values[]);
static herr_t H5Z__set_parms_atomic(const H5T_t *type, unsigned *cd_values_index, unsigned cd_values[],
- hbool_t *need_not_compress);
+ bool *need_not_compress);
static herr_t H5Z__set_parms_array(const H5T_t *type, unsigned *cd_values_index, unsigned cd_values[],
- hbool_t *need_not_compress);
+ bool *need_not_compress);
static herr_t H5Z__set_parms_compound(const H5T_t *type, unsigned *cd_values_index, unsigned cd_values[],
- hbool_t *need_not_compress);
+ bool *need_not_compress);
static void H5Z__nbit_next_byte(size_t *j, size_t *buf_len);
static void H5Z__nbit_decompress_one_byte(unsigned char *data, size_t data_offset, unsigned k,
@@ -121,7 +121,7 @@ static htri_t
H5Z__can_apply_nbit(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5_ATTR_UNUSED space_id)
{
const H5T_t *type; /* Datatype */
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE
@@ -130,7 +130,7 @@ H5Z__can_apply_nbit(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5_ATTR_U
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype");
/* Get datatype's class, for checking the "datatype class" */
- if (H5T_get_class(type, TRUE) == H5T_NO_CLASS)
+ if (H5T_get_class(type, true) == H5T_NO_CLASS)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype class");
/* Get datatype's size, for checking the "datatype size" */
@@ -220,7 +220,7 @@ H5Z__calc_parms_array(const H5T_t *type, size_t *cd_values_actual_nparms)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad base datatype");
/* Get base datatype's class */
- if ((dtype_base_class = H5T_get_class(dtype_base, TRUE)) == H5T_NO_CLASS)
+ if ((dtype_base_class = H5T_get_class(dtype_base, true)) == H5T_NO_CLASS)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad base datatype class");
/* Calculate number of the rest parameters according to base datatype's class */
@@ -311,7 +311,7 @@ H5Z__calc_parms_compound(const H5T_t *type, size_t *cd_values_actual_nparms)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad member datatype");
/* Get member datatype's class */
- if ((dtype_member_class = H5T_get_class(dtype_member, TRUE)) == H5T_NO_CLASS)
+ if ((dtype_member_class = H5T_get_class(dtype_member, true)) == H5T_NO_CLASS)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad member datatype class");
/* Store member offset */
@@ -416,7 +416,7 @@ H5Z__set_parms_nooptype(const H5T_t *type, unsigned *cd_values_index, unsigned c
*/
static herr_t
H5Z__set_parms_atomic(const H5T_t *type, unsigned *cd_values_index, unsigned cd_values[],
- hbool_t *need_not_compress)
+ bool *need_not_compress)
{
H5T_order_t dtype_order; /* Atomic datatype's endianness order */
size_t dtype_size; /* Atomic datatype's size (in bytes) */
@@ -482,11 +482,11 @@ H5Z__set_parms_atomic(const H5T_t *type, unsigned *cd_values_index, unsigned cd_
/* If before this point, there is no need to compress, check the need to
* compress at this point. If current datatype is not full-precision,
- * flag need_not_compress should be set to FALSE.
+ * flag need_not_compress should be set to false.
*/
if (*need_not_compress) /* so far no need to compress */
if (dtype_offset != 0 || dtype_precision != dtype_size * 8)
- *need_not_compress = FALSE;
+ *need_not_compress = false;
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5Z__set_parms_atomic() */
@@ -504,7 +504,7 @@ H5Z__set_parms_atomic(const H5T_t *type, unsigned *cd_values_index, unsigned cd_
*/
static herr_t
H5Z__set_parms_array(const H5T_t *type, unsigned *cd_values_index, unsigned cd_values[],
- hbool_t *need_not_compress)
+ bool *need_not_compress)
{
H5T_t *dtype_base = NULL; /* Array datatype's base datatype */
H5T_class_t dtype_base_class; /* Array datatype's base datatype's class */
@@ -530,7 +530,7 @@ H5Z__set_parms_array(const H5T_t *type, unsigned *cd_values_index, unsigned cd_v
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad base datatype");
/* Get base datatype's class */
- if ((dtype_base_class = H5T_get_class(dtype_base, TRUE)) == H5T_NO_CLASS)
+ if ((dtype_base_class = H5T_get_class(dtype_base, true)) == H5T_NO_CLASS)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad base datatype class");
/* Call appropriate function according to base datatype's class */
@@ -604,7 +604,7 @@ H5Z__set_parms_array(const H5T_t *type, unsigned *cd_values_index, unsigned cd_v
*/
static herr_t
H5Z__set_parms_compound(const H5T_t *type, unsigned *cd_values_index, unsigned cd_values[],
- hbool_t *need_not_compress)
+ bool *need_not_compress)
{
int snmembers; /* Compound datatype's number of members */
unsigned nmembers; /* Compound datatype's number of members */
@@ -645,7 +645,7 @@ H5Z__set_parms_compound(const H5T_t *type, unsigned *cd_values_index, unsigned c
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad member datatype");
/* Get member datatype's class */
- if ((dtype_member_class = H5T_get_class(dtype_member, TRUE)) < 0)
+ if ((dtype_member_class = H5T_get_class(dtype_member, true)) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad member datatype class");
/* Get member offset, success if H5T_get_class() success */
@@ -758,7 +758,7 @@ H5Z__set_local_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id)
unsigned *cd_values = NULL; /* Filter parameters */
hssize_t npoints; /* Number of points in the dataspace */
H5T_class_t dtype_class; /* Datatype's class */
- hbool_t need_not_compress; /* Flag if TRUE indicating no need to do nbit compression */
+ bool need_not_compress; /* Flag if true indicating no need to do nbit compression */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -768,13 +768,13 @@ H5Z__set_local_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype");
/* Get datatype's class */
- if ((dtype_class = H5T_get_class(type, TRUE)) == H5T_NO_CLASS)
+ if ((dtype_class = H5T_get_class(type, true)) == H5T_NO_CLASS)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype class");
/* Calculate how many parameters will fill the cd_values array
* First three parameters reserved for:
* 1. number of parameters in array cd_values
- * 2. flag if TRUE indicating no need to do nbit compression
+ * 2. flag if true indicating no need to do nbit compression
* 3. number of elements in the chunk
*/
cd_values_actual_nparms = 3;
@@ -845,8 +845,8 @@ H5Z__set_local_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id)
H5_CHECK_OVERFLOW(npoints, hssize_t, unsigned);
cd_values[cd_values_index++] = (unsigned)npoints;
- /* Assume no need to compress now, will be changed to FALSE later if not */
- need_not_compress = TRUE;
+ /* Assume no need to compress now, will be changed to false later if not */
+ need_not_compress = true;
/* Call appropriate function according to the datatype class */
switch (dtype_class) {
diff --git a/src/H5Zprivate.h b/src/H5Zprivate.h
index 166273805b6..82dcdea44d8 100644
--- a/src/H5Zprivate.h
+++ b/src/H5Zprivate.h
@@ -99,7 +99,7 @@ H5_DLL herr_t H5Z_xform_copy(H5Z_data_xform_t **data_xform_prop);
H5_DLL herr_t H5Z_xform_destroy(H5Z_data_xform_t *data_xform_prop);
H5_DLL herr_t H5Z_xform_eval(H5Z_data_xform_t *data_xform_prop, void *array, size_t array_size,
const H5T_t *buf_type);
-H5_DLL hbool_t H5Z_xform_noop(const H5Z_data_xform_t *data_xform_prop);
+H5_DLL bool H5Z_xform_noop(const H5Z_data_xform_t *data_xform_prop);
H5_DLL const char *H5Z_xform_extract_xform_str(const H5Z_data_xform_t *data_xform_prop);
#endif
diff --git a/src/H5Zpublic.h b/src/H5Zpublic.h
index 6d9b9914228..d906e3c9c5a 100644
--- a/src/H5Zpublic.h
+++ b/src/H5Zpublic.h
@@ -286,7 +286,7 @@ H5_DLL htri_t H5Zfilter_avail(H5Z_filter_t id);
* H5Z_FILTER_CONFIG_ENCODE_ENABLED & filter_config_flags
* \endcode
* is true, i.e., greater than 0 (zero), the queried filter
- * is configured to encode data; if the value is \c FALSE, i.e., equal to
+ * is configured to encode data; if the value is \c false, i.e., equal to
* 0 (zero), the filter is not so configured.
*
* If a filter is not encode-enabled, the corresponding \c H5Pset_*
diff --git a/src/H5Zscaleoffset.c b/src/H5Zscaleoffset.c
index c3de6a62d66..685e25a9c73 100644
--- a/src/H5Zscaleoffset.c
+++ b/src/H5Zscaleoffset.c
@@ -364,12 +364,12 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
#define H5Z_scaleoffset_max_min_3(i, d_nelmts, buf, filval, max, min, D_val) \
{ \
i = 0; \
- while (i < d_nelmts && HDfabs((double)(buf[i] - filval)) < HDpow(10.0, -D_val)) \
+ while (i < d_nelmts && fabs((double)(buf[i] - filval)) < pow(10.0, -D_val)) \
i++; \
if (i < d_nelmts) \
min = max = buf[i]; \
for (; i < d_nelmts; i++) { \
- if (HDfabs((double)(buf[i] - filval)) < HDpow(10.0, -D_val)) \
+ if (fabs((double)(buf[i] - filval)) < pow(10.0, -D_val)) \
continue; /* ignore fill value */ \
if (buf[i] > max) \
max = buf[i]; \
@@ -757,7 +757,7 @@ H5Z__can_apply_scaleoffset(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5
const H5T_t *type; /* Datatype */
H5T_class_t dtype_class; /* Datatype's class */
H5T_order_t dtype_order; /* Datatype's endianness order */
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE
@@ -766,7 +766,7 @@ H5Z__can_apply_scaleoffset(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype");
/* Get datatype's class, for checking the "datatype class" */
- if ((dtype_class = H5T_get_class(type, TRUE)) == H5T_NO_CLASS)
+ if ((dtype_class = H5T_get_class(type, true)) == H5T_NO_CLASS)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype class");
/* Get datatype's size, for checking the "datatype size" */
@@ -780,10 +780,10 @@ H5Z__can_apply_scaleoffset(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5
/* Range check datatype's endianness order */
if (dtype_order != H5T_ORDER_LE && dtype_order != H5T_ORDER_BE)
- HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FALSE, "bad datatype endianness order");
+ HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, false, "bad datatype endianness order");
}
else
- HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FALSE, "datatype class not supported by scaleoffset");
+ HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, false, "datatype class not supported by scaleoffset");
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -966,7 +966,7 @@ H5Z__set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id)
H5_CHECKED_ASSIGN(cd_values[H5Z_SCALEOFFSET_PARM_NELMTS], unsigned, npoints, hssize_t);
/* Get datatype's class */
- if ((dtype_class = H5T_get_class(type, TRUE)) == H5T_NO_CLASS)
+ if ((dtype_class = H5T_get_class(type, true)) == H5T_NO_CLASS)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype class");
/* Set "local" parameter for datatype's class */
@@ -1054,13 +1054,13 @@ H5Z__set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id)
if (status == H5D_FILL_VALUE_UNDEFINED)
cd_values[H5Z_SCALEOFFSET_PARM_FILAVAIL] = H5Z_SCALEOFFSET_FILL_UNDEFINED;
else {
- int need_convert = FALSE; /* Flag indicating conversion of byte order */
+ int need_convert = false; /* Flag indicating conversion of byte order */
cd_values[H5Z_SCALEOFFSET_PARM_FILAVAIL] = H5Z_SCALEOFFSET_FILL_DEFINED;
/* Check if memory byte order matches dataset datatype byte order */
if (H5T_native_order_g != dtype_order)
- need_convert = TRUE;
+ need_convert = true;
/* Before getting fill value, get its type */
if ((scale_type = H5Z__scaleoffset_get_type(cd_values[H5Z_SCALEOFFSET_PARM_CLASS],
@@ -1109,7 +1109,7 @@ H5Z__filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_valu
uint32_t minbits = 0; /* minimum number of bits to store values */
unsigned long long minval = 0; /* minimum value of input buffer */
enum H5Z_scaleoffset_t type; /* memory type corresponding to dataset datatype */
- int need_convert = FALSE; /* flag indicating conversion of byte order */
+ int need_convert = false; /* flag indicating conversion of byte order */
unsigned char *outbuf = NULL; /* pointer to new output buffer */
unsigned buf_offset = 21; /* buffer offset because of parameters stored in file */
unsigned i; /* index */
@@ -1125,12 +1125,12 @@ H5Z__filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_valu
switch (H5T_native_order_g) {
case H5T_ORDER_LE: /* memory is little-endian byte order */
if (cd_values[H5Z_SCALEOFFSET_PARM_ORDER] == H5Z_SCALEOFFSET_ORDER_BE)
- need_convert = TRUE;
+ need_convert = true;
break;
case H5T_ORDER_BE: /* memory is big-endian byte order */
if (cd_values[H5Z_SCALEOFFSET_PARM_ORDER] == H5Z_SCALEOFFSET_ORDER_LE)
- need_convert = TRUE;
+ need_convert = true;
break;
case H5T_ORDER_ERROR:
@@ -1562,11 +1562,11 @@ H5Z__scaleoffset_precompress_fd(void *data, unsigned d_nelmts, enum H5Z_scaleoff
FUNC_ENTER_PACKAGE
if (type == t_float)
- H5Z_scaleoffset_precompress_3(float, HDpowf, HDfabsf, HDroundf, HDlroundf, HDllroundf, data, d_nelmts,
- filavail, cd_values, minbits, minval, D_val);
+ H5Z_scaleoffset_precompress_3(float, powf, fabsf, roundf, lroundf, llroundf, data, d_nelmts, filavail,
+ cd_values, minbits, minval, D_val);
else if (type == t_double)
- H5Z_scaleoffset_precompress_3(double, HDpow, HDfabs, HDround, HDlround, HDllround, data, d_nelmts,
- filavail, cd_values, minbits, minval, D_val);
+ H5Z_scaleoffset_precompress_3(double, pow, fabs, round, lround, llround, data, d_nelmts, filavail,
+ cd_values, minbits, minval, D_val);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1585,10 +1585,10 @@ H5Z__scaleoffset_postdecompress_fd(void *data, unsigned d_nelmts, enum H5Z_scale
FUNC_ENTER_PACKAGE
if (type == t_float)
- H5Z_scaleoffset_postdecompress_3(float, HDpowf, data, d_nelmts, filavail, cd_values, minbits, sminval,
+ H5Z_scaleoffset_postdecompress_3(float, powf, data, d_nelmts, filavail, cd_values, minbits, sminval,
D_val);
else if (type == t_double)
- H5Z_scaleoffset_postdecompress_3(double, HDpow, data, d_nelmts, filavail, cd_values, minbits, sminval,
+ H5Z_scaleoffset_postdecompress_3(double, pow, data, d_nelmts, filavail, cd_values, minbits, sminval,
D_val);
done:
diff --git a/src/H5Zszip.c b/src/H5Zszip.c
index d636afd158e..052efa8c118 100644
--- a/src/H5Zszip.c
+++ b/src/H5Zszip.c
@@ -71,7 +71,7 @@ H5Z__can_apply_szip(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5_ATTR_U
const H5T_t *type; /* Datatype */
size_t dtype_size; /* Datatype's size (in bits) */
H5T_order_t dtype_order; /* Datatype's endianness order */
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE
@@ -85,7 +85,7 @@ H5Z__can_apply_szip(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5_ATTR_U
/* Range check datatype's size */
if (dtype_size > 32 && dtype_size != 64)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FALSE, "invalid datatype size");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, false, "invalid datatype size");
/* Get datatype's endianness order */
if ((dtype_order = H5T_get_order(type)) == H5T_ORDER_ERROR)
@@ -94,7 +94,7 @@ H5Z__can_apply_szip(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5_ATTR_U
/* Range check datatype's endianness order */
/* (Note: this may not handle non-atomic datatypes well) */
if (dtype_order != H5T_ORDER_LE && dtype_order != H5T_ORDER_BE)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FALSE, "invalid datatype endianness order");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, false, "invalid datatype endianness order");
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Ztrans.c b/src/H5Ztrans.c
index 88398977365..1b59efac3ee 100644
--- a/src/H5Ztrans.c
+++ b/src/H5Ztrans.c
@@ -86,8 +86,8 @@ static H5Z_node *H5Z__parse_term(H5Z_token *current, H5Z_datval_ptrs *dat_val_p
static H5Z_node *H5Z__parse_factor(H5Z_token *current, H5Z_datval_ptrs *dat_val_pointers);
static H5Z_node *H5Z__new_node(H5Z_token_type type);
static void H5Z__do_op(H5Z_node *tree);
-static hbool_t H5Z__op_is_numbs(H5Z_node *_tree);
-static hbool_t H5Z__op_is_numbs2(H5Z_node *_tree);
+static bool H5Z__op_is_numbs(H5Z_node *_tree);
+static bool H5Z__op_is_numbs2(H5Z_node *_tree);
static hid_t H5Z__xform_find_type(const H5T_t *type);
static herr_t H5Z__xform_eval_full(H5Z_node *tree, size_t array_size, hid_t array_type, H5Z_result *res);
static void H5Z__xform_destroy_parse_tree(H5Z_node *tree);
@@ -759,7 +759,7 @@ H5Z__parse_factor(H5Z_token *current, H5Z_datval_ptrs *dat_val_pointers)
if (!factor)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node");
- HDsscanf(current->tok_begin, "%ld", &factor->value.int_val);
+ sscanf(current->tok_begin, "%ld", &factor->value.int_val);
break;
case H5Z_XFORM_FLOAT:
@@ -767,7 +767,7 @@ H5Z__parse_factor(H5Z_token *current, H5Z_datval_ptrs *dat_val_pointers)
if (!factor)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node");
- HDsscanf(current->tok_begin, "%lf", &factor->value.float_val);
+ sscanf(current->tok_begin, "%lf", &factor->value.float_val);
break;
case H5Z_XFORM_SYMBOL:
@@ -1130,46 +1130,46 @@ H5Z__xform_find_type(const H5T_t *type)
assert(type);
/* Check for SHORT type */
- if ((tmp = (H5T_t *)H5I_object(H5T_NATIVE_SHORT)) && 0 == H5T_cmp(type, tmp, FALSE))
+ if ((tmp = (H5T_t *)H5I_object(H5T_NATIVE_SHORT)) && 0 == H5T_cmp(type, tmp, false))
HGOTO_DONE(H5T_NATIVE_SHORT);
/* Check for INT type */
- else if ((tmp = (H5T_t *)H5I_object(H5T_NATIVE_INT)) && 0 == H5T_cmp(type, tmp, FALSE))
+ else if ((tmp = (H5T_t *)H5I_object(H5T_NATIVE_INT)) && 0 == H5T_cmp(type, tmp, false))
HGOTO_DONE(H5T_NATIVE_INT);
/* Check for LONG type */
- else if ((tmp = (H5T_t *)H5I_object(H5T_NATIVE_LONG)) && 0 == H5T_cmp(type, tmp, FALSE))
+ else if ((tmp = (H5T_t *)H5I_object(H5T_NATIVE_LONG)) && 0 == H5T_cmp(type, tmp, false))
HGOTO_DONE(H5T_NATIVE_LONG);
/* Check for LONGLONG type */
- else if ((tmp = (H5T_t *)H5I_object(H5T_NATIVE_LLONG)) && 0 == H5T_cmp(type, tmp, FALSE))
+ else if ((tmp = (H5T_t *)H5I_object(H5T_NATIVE_LLONG)) && 0 == H5T_cmp(type, tmp, false))
HGOTO_DONE(H5T_NATIVE_LLONG);
/* Check for UCHAR type */
- else if ((tmp = (H5T_t *)H5I_object(H5T_NATIVE_UCHAR)) && 0 == H5T_cmp(type, tmp, FALSE))
+ else if ((tmp = (H5T_t *)H5I_object(H5T_NATIVE_UCHAR)) && 0 == H5T_cmp(type, tmp, false))
HGOTO_DONE(H5T_NATIVE_UCHAR);
/* Check for CHAR type */
- else if ((tmp = (H5T_t *)H5I_object(H5T_NATIVE_CHAR)) && 0 == H5T_cmp(type, tmp, FALSE))
+ else if ((tmp = (H5T_t *)H5I_object(H5T_NATIVE_CHAR)) && 0 == H5T_cmp(type, tmp, false))
HGOTO_DONE(H5T_NATIVE_CHAR);
/* Check for SCHAR type */
- else if ((tmp = (H5T_t *)H5I_object(H5T_NATIVE_SCHAR)) && 0 == H5T_cmp(type, tmp, FALSE))
+ else if ((tmp = (H5T_t *)H5I_object(H5T_NATIVE_SCHAR)) && 0 == H5T_cmp(type, tmp, false))
HGOTO_DONE(H5T_NATIVE_SCHAR);
/* Check for USHORT type */
- else if ((tmp = (H5T_t *)H5I_object(H5T_NATIVE_USHORT)) && 0 == H5T_cmp(type, tmp, FALSE))
+ else if ((tmp = (H5T_t *)H5I_object(H5T_NATIVE_USHORT)) && 0 == H5T_cmp(type, tmp, false))
HGOTO_DONE(H5T_NATIVE_USHORT);
/* Check for UINT type */
- else if ((tmp = (H5T_t *)H5I_object(H5T_NATIVE_UINT)) && 0 == H5T_cmp(type, tmp, FALSE))
+ else if ((tmp = (H5T_t *)H5I_object(H5T_NATIVE_UINT)) && 0 == H5T_cmp(type, tmp, false))
HGOTO_DONE(H5T_NATIVE_UINT);
/* Check for ULONG type */
- else if ((tmp = (H5T_t *)H5I_object(H5T_NATIVE_ULONG)) && 0 == H5T_cmp(type, tmp, FALSE))
+ else if ((tmp = (H5T_t *)H5I_object(H5T_NATIVE_ULONG)) && 0 == H5T_cmp(type, tmp, false))
HGOTO_DONE(H5T_NATIVE_ULONG);
/* Check for ULONGLONG type */
- else if ((tmp = (H5T_t *)H5I_object(H5T_NATIVE_ULLONG)) && 0 == H5T_cmp(type, tmp, FALSE))
+ else if ((tmp = (H5T_t *)H5I_object(H5T_NATIVE_ULLONG)) && 0 == H5T_cmp(type, tmp, false))
HGOTO_DONE(H5T_NATIVE_ULLONG);
/* Check for FLOAT type */
- else if ((tmp = (H5T_t *)H5I_object(H5T_NATIVE_FLOAT)) && 0 == H5T_cmp(type, tmp, FALSE))
+ else if ((tmp = (H5T_t *)H5I_object(H5T_NATIVE_FLOAT)) && 0 == H5T_cmp(type, tmp, false))
HGOTO_DONE(H5T_NATIVE_FLOAT);
/* Check for DOUBLE type */
- else if ((tmp = (H5T_t *)H5I_object(H5T_NATIVE_DOUBLE)) && 0 == H5T_cmp(type, tmp, FALSE))
+ else if ((tmp = (H5T_t *)H5I_object(H5T_NATIVE_DOUBLE)) && 0 == H5T_cmp(type, tmp, false))
HGOTO_DONE(H5T_NATIVE_DOUBLE);
/* Check for LONGDOUBLE type */
- else if ((tmp = (H5T_t *)H5I_object(H5T_NATIVE_LDOUBLE)) && 0 == H5T_cmp(type, tmp, FALSE))
+ else if ((tmp = (H5T_t *)H5I_object(H5T_NATIVE_LDOUBLE)) && 0 == H5T_cmp(type, tmp, false))
HGOTO_DONE(H5T_NATIVE_LDOUBLE);
else
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "could not find matching type");
@@ -1250,14 +1250,14 @@ H5Z__xform_copy_tree(H5Z_node *tree, H5Z_datval_ptrs *dat_val_pointers, H5Z_datv
* Purpose: Internal function to facilitate the condition check in
* H5Z__xform_reduce_tree to reduce the bulkiness of the code.
*
- * Return: TRUE or FALSE
+ * Return: true or false
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
H5Z__op_is_numbs(H5Z_node *_tree)
{
- hbool_t ret_value = FALSE;
+ bool ret_value = false;
FUNC_ENTER_PACKAGE_NOERR
@@ -1265,7 +1265,7 @@ H5Z__op_is_numbs(H5Z_node *_tree)
if (((_tree->lchild->type == H5Z_XFORM_INTEGER) || (_tree->lchild->type == H5Z_XFORM_FLOAT)) &&
((_tree->rchild->type == H5Z_XFORM_INTEGER) || (_tree->rchild->type == H5Z_XFORM_FLOAT)))
- ret_value = TRUE;
+ ret_value = true;
FUNC_LEAVE_NOAPI(ret_value)
}
@@ -1278,14 +1278,14 @@ H5Z__op_is_numbs(H5Z_node *_tree)
* The difference from H5Z__op_is_numbs is that the left child
* can be empty, like -x or +x.
*
- * Return: TRUE or FALSE
+ * Return: true or false
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
H5Z__op_is_numbs2(H5Z_node *_tree)
{
- hbool_t ret_value = FALSE;
+ bool ret_value = false;
FUNC_ENTER_PACKAGE_NOERR
@@ -1297,7 +1297,7 @@ H5Z__op_is_numbs2(H5Z_node *_tree)
((_tree->lchild->type == H5Z_XFORM_INTEGER) || (_tree->lchild->type == H5Z_XFORM_FLOAT))) &&
(_tree->rchild &&
((_tree->rchild->type == H5Z_XFORM_INTEGER) || (_tree->rchild->type == H5Z_XFORM_FLOAT)))))
- ret_value = TRUE;
+ ret_value = true;
FUNC_LEAVE_NOAPI(ret_value)
}
@@ -1420,9 +1420,9 @@ H5Z_xform_create(const char *expr)
/* Find the number of times "x" is used in this equation, and allocate room for storing that many points
* A more sophisticated check is needed to support scientific notation.
*/
- for (i = 0; i < HDstrlen(expr); i++) {
+ for (i = 0; i < strlen(expr); i++) {
if (isalpha(expr[i])) {
- if ((i > 0) && (i < (HDstrlen(expr) - 1))) {
+ if ((i > 0) && (i < (strlen(expr) - 1))) {
if (((expr[i] == 'E') || (expr[i] == 'e')) &&
(isdigit(expr[i - 1]) || (expr[i - 1] == '.')) &&
(isdigit(expr[i + 1]) || (expr[i + 1] == '-') || (expr[i + 1] == '+')))
@@ -1558,7 +1558,7 @@ H5Z_xform_copy(H5Z_data_xform_t **data_xform_prop)
/* Find the number of times "x" is used in this equation, and allocate room for storing that many
* points */
- for (i = 0; i < HDstrlen(new_data_xform_prop->xform_exp); i++)
+ for (i = 0; i < strlen(new_data_xform_prop->xform_exp); i++)
if (isalpha(new_data_xform_prop->xform_exp[i]))
count++;
@@ -1608,26 +1608,26 @@ H5Z_xform_copy(H5Z_data_xform_t **data_xform_prop)
*
* Purpose: Checks if a data transform will be performed
*
- * Return: TRUE for no data transform, FALSE for a data transform
+ * Return: true for no data transform, false for a data transform
*
* Comments: Can't fail
*
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
H5Z_xform_noop(const H5Z_data_xform_t *data_xform_prop)
{
- hbool_t ret_value = TRUE; /* Return value */
+ bool ret_value = true; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
if (data_xform_prop) {
- ret_value = FALSE;
+ ret_value = false;
/* Check for trivial data transformation: expression = "x" */
- if ((HDstrlen(data_xform_prop->xform_exp) == 1) && data_xform_prop->dat_val_pointers &&
+ if ((strlen(data_xform_prop->xform_exp) == 1) && data_xform_prop->dat_val_pointers &&
(data_xform_prop->dat_val_pointers->num_ptrs == 1)) {
- ret_value = TRUE;
+ ret_value = true;
} /* end if */
} /* end if */
diff --git a/src/H5checksum.c b/src/H5checksum.c
index b9823d86fbc..66a6c86c6e3 100644
--- a/src/H5checksum.c
+++ b/src/H5checksum.c
@@ -65,7 +65,7 @@
static uint32_t H5_crc_table[256];
/* Flag: has the table been computed? */
-static hbool_t H5_crc_table_computed = FALSE;
+static bool H5_crc_table_computed = false;
/*-------------------------------------------------------------------------
* Function: H5_checksum_fletcher32
@@ -162,7 +162,7 @@ H5__checksum_crc_make_table(void)
c = c >> 1;
H5_crc_table[n] = c;
}
- H5_crc_table_computed = TRUE;
+ H5_crc_table_computed = true;
FUNC_LEAVE_NOAPI_VOID
} /* end H5__checksum_crc_make_table() */
diff --git a/src/H5dbg.c b/src/H5dbg.c
index 69afd013fc2..7a3dfaa521c 100644
--- a/src/H5dbg.c
+++ b/src/H5dbg.c
@@ -102,30 +102,30 @@ H5_buffer_dump(FILE *stream, int indent, const uint8_t *buf, const uint8_t *mark
fprintf(stream, " ");
if (7 == v)
- HDfputc(' ', stream);
+ fputc(' ', stream);
} /* end for */
- HDfputc(' ', stream);
+ fputc(' ', stream);
/* Print the character values */
for (v = 0; v < 16; v++) {
if (u + v < buf_size) {
if (marker[u + v])
- HDfputc(' ', stream);
+ fputc(' ', stream);
else {
c = buf[buf_offset + u + v];
if (isprint(c))
- HDfputc(c, stream);
+ fputc(c, stream);
else
- HDfputc('.', stream);
+ fputc('.', stream);
} /* end else */
} /* end if */
if (7 == v)
- HDfputc(' ', stream);
+ fputc(' ', stream);
} /* end for */
- HDfputc('\n', stream);
+ fputc('\n', stream);
} /* end for */
FUNC_LEAVE_NOAPI(SUCCEED)
diff --git a/src/H5encode.h b/src/H5encode.h
index a9172ffc4e2..5be75d57f77 100644
--- a/src/H5encode.h
+++ b/src/H5encode.h
@@ -17,6 +17,11 @@
#ifndef H5encode_H
#define H5encode_H
+/***********/
+/* Headers */
+/***********/
+#include "H5MMprivate.h" /* Memory management */
+
/**************************/
/* Library Private Macros */
/**************************/
@@ -128,7 +133,7 @@
\
HDcompile_assert(sizeof(double) == 8); \
HDcompile_assert(sizeof(double) == sizeof(uint64_t)); \
- memcpy(&_n, &n, sizeof(double)); \
+ H5MM_memcpy(&_n, &n, sizeof(double)); \
for (_u = 0; _u < sizeof(uint64_t); _u++, _n >>= 8) \
*_p++ = (uint8_t)(_n & 0xff); \
(p) = (uint8_t *)(p) + 8; \
@@ -245,7 +250,7 @@
(p) += 8; \
for (_u = 0; _u < sizeof(uint64_t); _u++) \
_n = (_n << 8) | *(--p); \
- memcpy(&(n), &_n, sizeof(double)); \
+ H5MM_memcpy(&(n), &_n, sizeof(double)); \
(p) += 8; \
} while (0)
diff --git a/src/H5mpi.c b/src/H5mpi.c
index 8fd72525277..005a99aa6ae 100644
--- a/src/H5mpi.c
+++ b/src/H5mpi.c
@@ -335,11 +335,11 @@ H5_mpi_comm_cmp(MPI_Comm comm1, MPI_Comm comm2, int *result)
herr_t
H5_mpi_info_cmp(MPI_Info info1, MPI_Info info2, int *result)
{
- hbool_t same = FALSE;
- char *key = NULL;
- char *value1 = NULL;
- char *value2 = NULL;
- herr_t ret_value = SUCCEED;
+ bool same = false;
+ char *key = NULL;
+ char *value1 = NULL;
+ char *value2 = NULL;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(FAIL)
@@ -350,12 +350,12 @@ H5_mpi_info_cmp(MPI_Info info1, MPI_Info info2, int *result)
/* Check for MPI_INFO_NULL */
if (MPI_INFO_NULL == info1 && MPI_INFO_NULL == info2) {
/* Special case of both info objects being MPI_INFO_NULL */
- same = TRUE;
+ same = true;
}
else if (MPI_INFO_NULL == info1 || MPI_INFO_NULL == info2) {
/* Special case of one info object being MPI_INFO_NULL */
- same = FALSE;
+ same = false;
}
else {
int mpi_code;
@@ -369,9 +369,9 @@ H5_mpi_info_cmp(MPI_Info info1, MPI_Info info2, int *result)
HMPI_GOTO_ERROR(FAIL, "MPI_Info_get_nkeys failed", mpi_code)
if (nkeys_1 != nkeys_2)
- same = FALSE;
+ same = false;
else if (0 == nkeys_1 && 0 == nkeys_2)
- same = TRUE;
+ same = true;
else {
int i;
int flag1 = -1;
@@ -388,7 +388,7 @@ H5_mpi_info_cmp(MPI_Info info1, MPI_Info info2, int *result)
/* Iterate over the keys, comparing them */
for (i = 0; i < nkeys_1; i++) {
- same = TRUE;
+ same = true;
/* Memset the buffers to zero */
memset(key, 0, MPI_MAX_INFO_KEY);
@@ -407,7 +407,7 @@ H5_mpi_info_cmp(MPI_Info info1, MPI_Info info2, int *result)
/* Compare values and flags */
if (!flag1 || !flag2 || memcmp(value1, value2, MPI_MAX_INFO_VAL)) {
- same = FALSE;
+ same = false;
break;
}
@@ -576,8 +576,8 @@ H5_mpio_create_large_type(hsize_t num_elements, MPI_Aint stride_bytes, MPI_Datat
* MPI_(All)gatherv's `recvtype` parameter.
*
* `allgather` - Specifies whether the gather operation to be
- * performed should be MPI_Allgatherv (TRUE) or
- * MPI_Gatherv (FALSE).
+ * performed should be MPI_Allgatherv (true) or
+ * MPI_Gatherv (false).
*
* `root` - For MPI_Gatherv operations, specifies the rank
* that will receive the data sent by other ranks.
@@ -616,7 +616,7 @@ H5_mpio_create_large_type(hsize_t num_elements, MPI_Aint stride_bytes, MPI_Datat
*/
herr_t
H5_mpio_gatherv_alloc(void *send_buf, int send_count, MPI_Datatype send_type, const int recv_counts[],
- const int displacements[], MPI_Datatype recv_type, hbool_t allgather, int root,
+ const int displacements[], MPI_Datatype recv_type, bool allgather, int root,
MPI_Comm comm, int mpi_rank, int mpi_size, void **out_buf, size_t *out_buf_num_entries)
{
size_t recv_buf_num_entries = 0;
@@ -710,7 +710,7 @@ H5_mpio_gatherv_alloc(void *send_buf, int send_count, MPI_Datatype send_type, co
*/
herr_t
H5_mpio_gatherv_alloc_simple(void *send_buf, int send_count, MPI_Datatype send_type, MPI_Datatype recv_type,
- hbool_t allgather, int root, MPI_Comm comm, int mpi_rank, int mpi_size,
+ bool allgather, int root, MPI_Comm comm, int mpi_rank, int mpi_size,
void **out_buf, size_t *out_buf_num_entries)
{
int *recv_counts_disps_array = NULL;
@@ -791,7 +791,7 @@ H5_mpio_gatherv_alloc_simple(void *send_buf, int send_count, MPI_Datatype send_t
*-------------------------------------------------------------------------
*/
herr_t
-H5_mpio_get_file_sync_required(MPI_File fh, hbool_t *file_sync_required)
+H5_mpio_get_file_sync_required(MPI_File fh, bool *file_sync_required)
{
MPI_Info info_used;
int flag;
@@ -803,7 +803,7 @@ H5_mpio_get_file_sync_required(MPI_File fh, hbool_t *file_sync_required)
assert(file_sync_required);
- *file_sync_required = FALSE;
+ *file_sync_required = false;
if (MPI_SUCCESS != MPI_File_get_info(fh, &info_used))
HGOTO_ERROR(H5E_LIB, H5E_CANTGET, FAIL, "can't get MPI info");
@@ -812,18 +812,18 @@ H5_mpio_get_file_sync_required(MPI_File fh, hbool_t *file_sync_required)
MPI_Info_get(info_used, "romio_visibility_immediate", MPI_MAX_INFO_VAL - 1, value, &flag))
HGOTO_ERROR(H5E_LIB, H5E_CANTGET, FAIL, "can't get MPI info");
- if (flag && !HDstrcmp(value, "false"))
- *file_sync_required = TRUE;
+ if (flag && !strcmp(value, "false"))
+ *file_sync_required = true;
if (MPI_SUCCESS != MPI_Info_free(&info_used))
HGOTO_ERROR(H5E_LIB, H5E_CANTFREE, FAIL, "can't free MPI info");
/* Force setting the flag via env variable (temp solution before the flag is implemented in MPI) */
- sync_env_var = HDgetenv("HDF5_DO_MPI_FILE_SYNC");
- if (sync_env_var && (!HDstrcmp(sync_env_var, "TRUE") || !HDstrcmp(sync_env_var, "1")))
- *file_sync_required = TRUE;
- if (sync_env_var && (!HDstrcmp(sync_env_var, "FALSE") || !HDstrcmp(sync_env_var, "0")))
- *file_sync_required = FALSE;
+ sync_env_var = getenv("HDF5_DO_MPI_FILE_SYNC");
+ if (sync_env_var && (!strcmp(sync_env_var, "TRUE") || !strcmp(sync_env_var, "1")))
+ *file_sync_required = true;
+ if (sync_env_var && (!strcmp(sync_env_var, "FALSE") || !strcmp(sync_env_var, "0")))
+ *file_sync_required = false;
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5overflow.txt b/src/H5overflow.txt
index 87c51512989..e1222e8f587 100644
--- a/src/H5overflow.txt
+++ b/src/H5overflow.txt
@@ -9,7 +9,7 @@
# help@hdfgroup.org.
#
-# This file is used to generate the headers that is needed for detecting
+# This file is used to generate the header that is needed for detecting
# overflows between types at run-time
#
# The bin/make_overflow script reads in this file and creates the appropriate
diff --git a/src/H5private.h b/src/H5private.h
index 5286312f4e5..14a0ac3225f 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -334,7 +334,7 @@
* the entire library.
*/
#define H5_IS_KNOWN_BUFFER_OVERFLOW(skip, ptr, size, buffer_end) \
- (skip ? FALSE : ((ptr) + (size)-1) > (buffer_end))
+ (skip ? false : ((ptr) + (size)-1) > (buffer_end))
/*
* HDF Boolean type.
@@ -454,13 +454,13 @@
* It's the developer's responsibility not to pass in the value 0, which
* may cause the equation to fail.
*/
-#define H5_FLT_ABS_EQUAL(X, Y) (HDfabsf((X) - (Y)) < FLT_EPSILON)
-#define H5_DBL_ABS_EQUAL(X, Y) (HDfabs((X) - (Y)) < DBL_EPSILON)
-#define H5_LDBL_ABS_EQUAL(X, Y) (HDfabsl((X) - (Y)) < LDBL_EPSILON)
+#define H5_FLT_ABS_EQUAL(X, Y) (fabsf((X) - (Y)) < FLT_EPSILON)
+#define H5_DBL_ABS_EQUAL(X, Y) (fabs((X) - (Y)) < DBL_EPSILON)
+#define H5_LDBL_ABS_EQUAL(X, Y) (fabsl((X) - (Y)) < LDBL_EPSILON)
-#define H5_FLT_REL_EQUAL(X, Y, M) (HDfabsf(((Y) - (X)) / (X)) < (M))
-#define H5_DBL_REL_EQUAL(X, Y, M) (HDfabs(((Y) - (X)) / (X)) < (M))
-#define H5_LDBL_REL_EQUAL(X, Y, M) (HDfabsl(((Y) - (X)) / (X)) < (M))
+#define H5_FLT_REL_EQUAL(X, Y, M) (fabsf(((Y) - (X)) / (X)) < (M))
+#define H5_DBL_REL_EQUAL(X, Y, M) (fabs(((Y) - (X)) / (X)) < (M))
+#define H5_LDBL_REL_EQUAL(X, Y, M) (fabsl(((Y) - (X)) / (X)) < (M))
/* KiB, MiB, GiB, TiB, PiB, EiB - Used in profiling and timing code */
#define H5_KB (1024.0F)
@@ -550,7 +550,7 @@ typedef struct {
H5_timevals_t initial; /* Current interval start time */
H5_timevals_t final_interval; /* Last interval elapsed time */
H5_timevals_t total; /* Total elapsed time for all intervals */
- hbool_t is_running; /* Whether timer is running */
+ bool is_running; /* Whether timer is running */
} H5_timer_t;
/* Returns library bandwidth as a pretty string */
@@ -617,9 +617,6 @@ typedef off_t h5_stat_size_t;
#ifndef HDasctime
#define HDasctime(T) asctime(T)
#endif
-#ifndef HDceil
-#define HDceil(X) ceil(X)
-#endif
#ifndef HDchdir
#define HDchdir(S) chdir(S)
#endif
@@ -641,24 +638,9 @@ typedef off_t h5_stat_size_t;
#ifndef HDdifftime
#define HDdifftime(X, Y) difftime(X, Y)
#endif
-#ifndef HDfabs
-#define HDfabs(X) fabs(X)
-#endif
-#ifndef HDfabsf
-#define HDfabsf(X) fabsf(X)
-#endif
-#ifndef HDfabsl
-#define HDfabsl(X) fabsl(X)
-#endif
#ifndef HDfdopen
#define HDfdopen(N, S) fdopen(N, S)
#endif
-#ifndef HDfgetc
-#define HDfgetc(F) fgetc(F)
-#endif
-#ifndef HDfgets
-#define HDfgets(S, N, F) fgets(S, N, F)
-#endif
#ifndef HDfileno
#define HDfileno(F) fileno(F)
#endif
@@ -688,27 +670,6 @@ H5_DLL H5_ATTR_CONST int Nflock(int fd, int operation);
#endif /* HDflock */
-#ifndef HDfloor
-#define HDfloor(X) floor(X)
-#endif
-#ifndef HDfputc
-#define HDfputc(C, F) fputc(C, F)
-#endif
-#ifndef HDfputs
-#define HDfputs(S, F) fputs(S, F)
-#endif
-#ifndef HDfrexp
-#define HDfrexp(X, N) frexp(X, N)
-#endif
-#ifndef HDfrexpf
-#define HDfrexpf(X, N) frexpf(X, N)
-#endif
-#ifndef HDfrexpl
-#define HDfrexpl(X, N) frexpl(X, N)
-#endif
-#ifndef HDfscanf
-#define HDfscanf fscanf
-#endif
#ifndef HDfseek
#define HDfseek(F, O, W) fseeko(F, O, W)
#endif
@@ -721,9 +682,6 @@ H5_DLL H5_ATTR_CONST int Nflock(int fd, int operation);
#ifndef HDftruncate
#define HDftruncate(F, L) ftruncate(F, L)
#endif
-#ifndef HDgetc
-#define HDgetc(F) getc(F)
-#endif
#ifndef HDgetcwd
#define HDgetcwd(S, Z) getcwd(S, Z)
#endif
@@ -736,18 +694,9 @@ H5_DLL H5_ATTR_CONST int Nflock(int fd, int operation);
#define HDgetdrive() 0
#endif
-#ifndef HDgetenv
-#define HDgetenv(S) getenv(S)
-#endif
#ifndef HDgetpid
#define HDgetpid() getpid()
#endif
-
-/* Don't define HDgets - gets() was deprecated in C99 and removed in C11 */
-#ifdef HDgets
-#undef HDgets
-#endif
-
#ifndef HDgettimeofday
#define HDgettimeofday(S, P) gettimeofday(S, P)
#endif
@@ -757,45 +706,9 @@ H5_DLL H5_ATTR_CONST int Nflock(int fd, int operation);
#ifndef HDisatty
#define HDisatty(F) isatty(F)
#endif
-#ifndef HDisnan
-#define HDisnan(X) isnan(X)
-#endif
-#ifndef HDlabs
-#define HDlabs(X) labs(X)
-#endif
-#ifndef HDldexp
-#define HDldexp(X, N) ldexp(X, N)
-#endif
-#ifndef HDllround
-#define HDllround(V) llround(V)
-#endif
-#ifndef HDllroundf
-#define HDllroundf(V) llroundf(V)
-#endif
-#ifndef HDllroundl
-#define HDllroundl(V) llroundl(V)
-#endif
#ifndef HDlocaltime
#define HDlocaltime(T) localtime(T)
#endif
-#ifndef HDlog
-#define HDlog(X) log(X)
-#endif
-#ifndef HDlog2
-#define HDlog2(X) log2(X)
-#endif
-#ifndef HDlog10
-#define HDlog10(X) log10(X)
-#endif
-#ifndef HDlround
-#define HDlround(V) lround(V)
-#endif
-#ifndef HDlroundf
-#define HDlroundf(V) lroundf(V)
-#endif
-#ifndef HDlroundl
-#define HDlroundl(V) lroundl(V)
-#endif
#ifndef HDlseek
#define HDlseek(F, O, W) lseek(F, O, W)
#endif
@@ -817,27 +730,9 @@ H5_DLL H5_ATTR_CONST int Nflock(int fd, int operation);
#ifndef HDopendir
#define HDopendir(S) opendir(S)
#endif
-#ifndef HDperror
-#define HDperror(S) perror(S)
-#endif
-#ifndef HDpow
-#define HDpow(X, Y) pow(X, Y)
-#endif
-#ifndef HDpowf
-#define HDpowf(X, Y) powf(X, Y)
-#endif
#ifndef HDpread
#define HDpread(F, B, C, O) pread(F, B, C, O)
#endif
-#ifndef HDputc
-#define HDputc(C, F) putc(C, F)
-#endif
-#ifndef HDputchar
-#define HDputchar(C) putchar(C)
-#endif
-#ifndef HDputs
-#define HDputs(S) puts(S)
-#endif
#ifndef HDpwrite
#define HDpwrite(F, B, C, O) pwrite(F, B, C, O)
#endif
@@ -899,21 +794,9 @@ H5_DLL H5_ATTR_CONST int Nflock(int fd, int operation);
#ifndef HDrewind
#define HDrewind(F) rewind(F)
#endif
-#ifndef HDround
-#define HDround(V) round(V)
-#endif
-#ifndef HDroundf
-#define HDroundf(V) roundf(V)
-#endif
-#ifndef HDroundl
-#define HDroundl(V) roundl(V)
-#endif
#ifndef HDrmdir
#define HDrmdir(S) rmdir(S)
#endif
-#ifndef HDscanf
-#define HDscanf scanf /*varargs*/
-#endif
#ifndef HDsetbuf
#define HDsetbuf(F, S) setbuf(F, S)
#endif
@@ -938,24 +821,9 @@ H5_DLL H5_ATTR_CONST int Nflock(int fd, int operation);
#ifndef HDsleep
#define HDsleep(N) sleep(N)
#endif
-#ifndef HDsnprintf
-#define HDsnprintf snprintf /*varargs*/
-#endif
-#ifndef HDsprintf
-#define HDsprintf sprintf /*varargs*/
-#endif
-#ifndef HDsqrt
-#define HDsqrt(X) sqrt(X)
-#endif
-#ifndef HDsscanf
-#define HDsscanf sscanf /*varargs*/
-#endif
#ifndef HDstat
#define HDstat(S, B) stat(S, B)
#endif
-#ifndef HDstrcat
-#define HDstrcat(X, Y) strcat(X, Y)
-#endif
#ifndef HDstrcasestr
#if defined(H5_HAVE_STRCASESTR)
#define HDstrcasestr(X, Y) strcasestr(X, Y)
@@ -963,57 +831,12 @@ H5_DLL H5_ATTR_CONST int Nflock(int fd, int operation);
#define HDstrcasestr(X, Y) H5_strcasestr(X, Y)
#endif
#endif
-#ifndef HDstrchr
-#define HDstrchr(S, C) strchr(S, C)
-#endif
-#ifndef HDstrcmp
-#define HDstrcmp(X, Y) strcmp(X, Y)
-#endif
#ifndef HDstrcasecmp
#define HDstrcasecmp(X, Y) strcasecmp(X, Y)
#endif
-#ifndef HDstrcpy
-#define HDstrcpy(X, Y) strcpy(X, Y)
-#endif
-#ifndef HDstrcspn
-#define HDstrcspn(X, Y) strcspn(X, Y)
-#endif
-#ifndef HDstrdup
-#define HDstrdup(S) strdup(S)
-#endif
-#ifndef HDstrerror
-#define HDstrerror(N) strerror(N)
-#endif
-#ifndef HDstrftime
-#define HDstrftime(S, Z, F, T) strftime(S, Z, F, T)
-#endif
-#ifndef HDstrlen
-#define HDstrlen(S) strlen(S)
-#endif
-#ifndef HDstrnlen
-#define HDstrnlen(S, L) strnlen(S, L)
-#endif
-#ifndef HDstrncat
-#define HDstrncat(X, Y, Z) strncat(X, Y, Z)
-#endif
-#ifndef HDstrncmp
-#define HDstrncmp(X, Y, Z) strncmp(X, Y, Z)
-#endif
-#ifndef HDstrncpy
-#define HDstrncpy(X, Y, Z) strncpy(X, Y, Z)
-#endif
#ifndef HDstrndup
#define HDstrndup(S, N) strndup(S, N)
#endif
-#ifndef HDstrrchr
-#define HDstrrchr(S, C) strrchr(S, C)
-#endif
-#ifndef HDstrstr
-#define HDstrstr(X, Y) strstr(X, Y)
-#endif
-#ifndef HDstrtok
-#define HDstrtok(X, Y) strtok(X, Y)
-#endif
#ifndef HDstrtok_r
#define HDstrtok_r(X, Y, Z) strtok_r(X, Y, Z)
#endif
@@ -1047,18 +870,6 @@ H5_DLL int HDvasprintf(char **bufp, const char *fmt, va_list _ap);
#endif
#endif
-#ifndef HDvfprintf
-#define HDvfprintf(F, FMT, A) vfprintf(F, FMT, A)
-#endif
-#ifndef HDvprintf
-#define HDvprintf(FMT, A) vprintf(FMT, A)
-#endif
-#ifndef HDvsprintf
-#define HDvsprintf(S, FMT, A) vsprintf(S, FMT, A)
-#endif
-#ifndef HDvsnprintf
-#define HDvsnprintf(S, N, FMT, A) vsnprintf(S, N, FMT, A)
-#endif
#ifndef HDwrite
#define HDwrite(F, M, Z) write(F, M, Z)
#endif
@@ -1173,8 +984,8 @@ H5_DLL int HDvasprintf(char **bufp, const char *fmt, va_list _ap);
{ \
char *slash, *backslash; \
\
- slash = HDstrrchr(NAME, H5_DIR_SLASH_SEPC); \
- backslash = HDstrrchr(NAME, H5_DIR_SEPC); \
+ slash = strrchr(NAME, H5_DIR_SLASH_SEPC); \
+ backslash = strrchr(NAME, H5_DIR_SEPC); \
if (backslash > slash) \
(ptr = backslash); \
else \
@@ -1189,7 +1000,7 @@ H5_DLL int HDvasprintf(char **bufp, const char *fmt, va_list _ap);
#define H5_CHECK_ABSOLUTE(NAME) (H5_CHECK_DELIMITER(*NAME))
#define H5_CHECK_ABS_DRIVE(NAME) (0)
#define H5_CHECK_ABS_PATH(NAME) (0)
-#define H5_GET_LAST_DELIMITER(NAME, ptr) ptr = HDstrrchr(NAME, H5_DIR_SEPC);
+#define H5_GET_LAST_DELIMITER(NAME, ptr) ptr = strrchr(NAME, H5_DIR_SEPC);
#endif /* H5_HAVE_WINDOW_PATH */
@@ -1235,9 +1046,9 @@ typedef struct H5_debug_open_stream_t {
} H5_debug_open_stream_t;
typedef struct H5_debug_t {
- FILE *trace; /*API trace output stream */
- hbool_t ttop; /*Show only top-level calls? */
- hbool_t ttimes; /*Show trace event times? */
+ FILE *trace; /*API trace output stream */
+ bool ttop; /*Show only top-level calls? */
+ bool ttimes; /*Show trace event times? */
struct {
const char *name; /*package name */
FILE *stream; /*output stream or NULL */
@@ -1255,7 +1066,7 @@ typedef struct H5_debug_t {
((MPI_VERSION > (mpi_version)) || \
((MPI_VERSION == (mpi_version)) && (MPI_SUBVERSION >= (mpi_subversion))))
-extern hbool_t H5_coll_api_sanity_check_g;
+extern bool H5_coll_api_sanity_check_g;
#endif /* H5_HAVE_PARALLEL */
extern H5_debug_t H5_debug_g;
@@ -1382,8 +1193,8 @@ H5_DLL herr_t H5_trace_args(struct H5RS_str_t *rs, const char *type, va_list ap)
* profiling.
*
* Notes: Every file must have a file-scope variable called
- * `initialize_interface_g' of type hbool_t which is initialized
- * to FALSE.
+ * `initialize_interface_g' of type bool which is initialized
+ * to false.
*
* Don't use local variable initializers which contain
* calls to other library functions since the initializer
@@ -1444,8 +1255,8 @@ extern char H5_lib_vers_info_g[];
/* replacement structure for original global variable */
typedef struct H5_api_struct {
H5TS_mutex_t init_lock; /* API entrance mutex */
- hbool_t H5_libinit_g; /* Has the library been initialized? */
- hbool_t H5_libterm_g; /* Is the library being shutdown? */
+ bool H5_libinit_g; /* Has the library been initialized? */
+ bool H5_libterm_g; /* Is the library being shutdown? */
} H5_api_t;
/* Macros for accessing the global variables */
@@ -1484,8 +1295,8 @@ extern H5_api_t H5_g;
#define H5_API_SET_CANCEL
/* extern global variables */
-extern hbool_t H5_libinit_g; /* Has the library been initialized? */
-extern hbool_t H5_libterm_g; /* Is the library being shutdown? */
+extern bool H5_libinit_g; /* Has the library been initialized? */
+extern bool H5_libterm_g; /* Is the library being shutdown? */
/* Macros for accessing the global variables */
#define H5_INIT_GLOBAL (H5_libinit_g)
@@ -1508,12 +1319,12 @@ extern hbool_t H5_libterm_g; /* Is the library being shutdown? */
/* Forward declaration of H5CXpush() / H5CXpop() */
/* (Including H5CXprivate.h creates bad circular dependencies - QAK, 3/18/2018) */
H5_DLL herr_t H5CX_push(void);
-H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props);
+H5_DLL herr_t H5CX_pop(bool update_dxpl_props);
#ifndef NDEBUG
#define FUNC_ENTER_CHECK_NAME(asrt) \
{ \
- static hbool_t func_check = FALSE; \
+ static bool func_check = false; \
\
if (!func_check) { \
/* Check function naming status */ \
@@ -1522,7 +1333,7 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props);
"H5private.h (this is usually due to an incorrect number of underscores)"); \
\
/* Don't check again */ \
- func_check = TRUE; \
+ func_check = true; \
} /* end if */ \
} /* end scope */
#else /* NDEBUG */
@@ -1530,7 +1341,7 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props);
#endif /* NDEBUG */
#define FUNC_ENTER_COMMON(asrt) \
- hbool_t err_occurred = FALSE; \
+ bool err_occurred = false; \
\
FUNC_ENTER_CHECK_NAME(asrt);
@@ -1568,13 +1379,13 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props);
if (H5CX_push() < 0) \
HGOTO_ERROR(H5E_FUNC, H5E_CANTSET, err, "can't set API context"); \
else \
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Use this macro for all "normal" API functions */
#define FUNC_ENTER_API(err) \
{ \
{ \
- hbool_t api_ctx_pushed = FALSE; \
+ bool api_ctx_pushed = false; \
\
FUNC_ENTER_API_COMMON \
FUNC_ENTER_API_INIT(err); \
@@ -1590,7 +1401,7 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props);
#define FUNC_ENTER_API_NOCLEAR(err) \
{ \
{ \
- hbool_t api_ctx_pushed = FALSE; \
+ bool api_ctx_pushed = false; \
\
FUNC_ENTER_API_COMMON \
FUNC_ENTER_API_INIT(err); \
@@ -1824,12 +1635,12 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props);
} /*end scope from end of FUNC_ENTER*/ \
FUNC_LEAVE_API_COMMON(ret_value); \
if (api_ctx_pushed) { \
- (void)H5CX_pop(TRUE); \
- api_ctx_pushed = FALSE; \
+ (void)H5CX_pop(true); \
+ api_ctx_pushed = false; \
} \
H5_POP_FUNC \
if (err_occurred) \
- (void)H5E_dump_api_stack(TRUE); \
+ (void)H5E_dump_api_stack(true); \
FUNC_LEAVE_API_THREADSAFE \
return (ret_value); \
} \
@@ -1842,7 +1653,7 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props);
FUNC_LEAVE_API_COMMON(ret_value); \
H5_POP_FUNC \
if (err_occurred) \
- (void)H5E_dump_api_stack(TRUE); \
+ (void)H5E_dump_api_stack(true); \
FUNC_LEAVE_API_THREADSAFE \
return (ret_value); \
} \
@@ -1866,7 +1677,7 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props);
; \
} /*end scope from end of FUNC_ENTER*/ \
if (err_occurred) \
- (void)H5E_dump_api_stack(TRUE); \
+ (void)H5E_dump_api_stack(true); \
FUNC_LEAVE_API_THREADSAFE \
return (ret_value); \
} \
@@ -2081,13 +1892,13 @@ H5_DLL herr_t H5_mpio_create_large_type(hsize_t num_elements, MPI_Aint stride_b
MPI_Datatype *new_type);
H5_DLL herr_t H5_mpio_gatherv_alloc(void *send_buf, int send_count, MPI_Datatype send_type,
const int recv_counts[], const int displacements[],
- MPI_Datatype recv_type, hbool_t allgather, int root, MPI_Comm comm,
+ MPI_Datatype recv_type, bool allgather, int root, MPI_Comm comm,
int mpi_rank, int mpi_size, void **out_buf, size_t *out_buf_num_entries);
H5_DLL herr_t H5_mpio_gatherv_alloc_simple(void *send_buf, int send_count, MPI_Datatype send_type,
- MPI_Datatype recv_type, hbool_t allgather, int root, MPI_Comm comm,
+ MPI_Datatype recv_type, bool allgather, int root, MPI_Comm comm,
int mpi_rank, int mpi_size, void **out_buf,
size_t *out_buf_num_entries);
-H5_DLL herr_t H5_mpio_get_file_sync_required(MPI_File fh, hbool_t *file_sync_required);
+H5_DLL herr_t H5_mpio_get_file_sync_required(MPI_File fh, bool *file_sync_required);
#endif /* H5_HAVE_PARALLEL */
/* Functions for debugging */
diff --git a/src/H5public.h b/src/H5public.h
index 0ee7c5ae223..2d96d1e3d9b 100644
--- a/src/H5public.h
+++ b/src/H5public.h
@@ -237,6 +237,12 @@ typedef int herr_t;
/**
* C99-style Boolean type. Successful return values are zero (false) or positive
* (true). The typical true value is 1 but don't bet on it.
+ *
+ * \deprecated Now that we require C99, hbool_t is typedef'd to C99's bool
+ * and hbool_t is considered deprecated. Due to its long-standing,
+ * widespread use, we have no plans to remove the hbool_t typedef
+ * from the public API, though we will probably switch to using
+ * bool in the public API starting in the next major release of HDF5.
* \attention Boolean functions cannot fail.
*/
#include
@@ -647,7 +653,7 @@ H5_DLL herr_t H5check_version(unsigned majnum, unsigned minnum, unsigned relnum)
*
* \details H5is_library_terminating() queries whether the HDF5 library is in
* the process of shutting down. The \p is_terminating flag will only
- * be set to TRUE after shutdown starts, it will be FALSE before the
+ * be set to true after shutdown starts, it will be false before the
* library has been initialized, while the library is initialized, and
* after it has been closed. The value of \p is_terminating is
* undefined if this routine fails.
@@ -723,8 +729,8 @@ H5_DLL herr_t H5free_memory(void *mem);
* will later be freed internally by the HDF5 library.
*
* The boolean \p clear parameter specifies whether the buffer should
- * be initialized. If clear is \c TRUE, all bits in the buffer are to be
- * set to 0 (zero); if clear is \c FALSE, the buffer will not be
+ * be initialized. If clear is \c true, all bits in the buffer are to be
+ * set to 0 (zero); if clear is \c false, the buffer will not be
* initialized.
*
* This function is intended to have the semantics of malloc() and
diff --git a/src/H5system.c b/src/H5system.c
index eb233bcb25c..7ff521efb26 100644
--- a/src/H5system.c
+++ b/src/H5system.c
@@ -61,7 +61,7 @@
/*******************/
/* Track whether tzset routine was called */
-static hbool_t H5_ntzset = FALSE;
+static bool H5_ntzset = false;
#ifndef H5_HAVE_VASPRINTF
/* HDvasprintf provides vasprintf-like function on targets where it is
@@ -78,7 +78,7 @@ HDvasprintf(char **bufp, const char *fmt, va_list _ap)
va_list ap;
va_copy(ap, _ap);
- ret = HDvsnprintf(buf, bufsz, fmt, ap);
+ ret = vsnprintf(buf, bufsz, fmt, ap);
va_end(ap);
if (ret >= 0 && (size_t)ret < bufsz) {
*bufp = buf;
@@ -224,7 +224,7 @@ H5_make_time(struct tm *tm)
/* Initialize timezone information */
if (!H5_ntzset) {
HDtzset();
- H5_ntzset = TRUE;
+ H5_ntzset = true;
} /* end if */
/* Perform base conversion */
@@ -378,7 +378,7 @@ H5_get_win32_times(H5_timevals_t *tvs /*in,out*/)
FILETIME ExitTime;
LARGE_INTEGER counts_start;
static LARGE_INTEGER counts_freq;
- static hbool_t is_initialized = FALSE;
+ static bool is_initialized = false;
BOOL err;
assert(tvs);
@@ -389,7 +389,7 @@ H5_get_win32_times(H5_timevals_t *tvs /*in,out*/)
err = QueryPerformanceFrequency(&counts_freq);
if (0 == err)
return -1;
- is_initialized = TRUE;
+ is_initialized = true;
} /* end if */
/*************************
@@ -642,7 +642,7 @@ H5_build_extpath(const char *name, char **extpath /*out*/)
if (NULL == (cwdpath = (char *)H5MM_malloc(MAX_PATH_LEN)))
HGOTO_ERROR(H5E_INTERNAL, H5E_NOSPACE, FAIL, "memory allocation failed");
- name_len = HDstrlen(name) + 1;
+ name_len = strlen(name) + 1;
if (NULL == (new_name = (char *)H5MM_malloc(name_len)))
HGOTO_ERROR(H5E_INTERNAL, H5E_NOSPACE, FAIL, "memory allocation failed");
@@ -654,7 +654,7 @@ H5_build_extpath(const char *name, char **extpath /*out*/)
if (H5_CHECK_ABS_DRIVE(name)) {
drive = HDtoupper(name[0]) - 'A' + 1;
retcwd = HDgetdcwd(drive, cwdpath, MAX_PATH_LEN);
- HDstrncpy(new_name, &name[2], name_len);
+ strncpy(new_name, &name[2], name_len);
} /* end if */
/*
* Windows: name[0] is a '/' or '\'
@@ -662,14 +662,14 @@ H5_build_extpath(const char *name, char **extpath /*out*/)
* Unix: does not apply
*/
else if (H5_CHECK_ABS_PATH(name) && (0 != (drive = HDgetdrive()))) {
- HDsnprintf(cwdpath, MAX_PATH_LEN, "%c:%c", (drive + 'A' - 1), name[0]);
+ snprintf(cwdpath, MAX_PATH_LEN, "%c:%c", (drive + 'A' - 1), name[0]);
retcwd = cwdpath;
- HDstrncpy(new_name, &name[1], name_len);
+ strncpy(new_name, &name[1], name_len);
}
/* totally relative for Unix and Windows: get current working directory */
else {
retcwd = HDgetcwd(cwdpath, MAX_PATH_LEN);
- HDstrncpy(new_name, name, name_len);
+ strncpy(new_name, name, name_len);
} /* end if */
if (retcwd != NULL) {
@@ -677,17 +677,17 @@ H5_build_extpath(const char *name, char **extpath /*out*/)
size_t path_len;
assert(cwdpath);
- cwdlen = HDstrlen(cwdpath);
+ cwdlen = strlen(cwdpath);
assert(cwdlen);
assert(new_name);
- path_len = cwdlen + HDstrlen(new_name) + 2;
+ path_len = cwdlen + strlen(new_name) + 2;
if (NULL == (full_path = (char *)H5MM_malloc(path_len)))
HGOTO_ERROR(H5E_INTERNAL, H5E_NOSPACE, FAIL, "memory allocation failed");
- HDstrncpy(full_path, cwdpath, cwdlen + 1);
+ strncpy(full_path, cwdpath, cwdlen + 1);
if (!H5_CHECK_DELIMITER(cwdpath[cwdlen - 1]))
- HDstrncat(full_path, H5_DIR_SEPS, path_len - (cwdlen + 1));
- HDstrncat(full_path, new_name, path_len - (cwdlen + 1) - HDstrlen(H5_DIR_SEPS));
+ strncat(full_path, H5_DIR_SEPS, path_len - (cwdlen + 1));
+ strncat(full_path, new_name, path_len - (cwdlen + 1) - strlen(H5_DIR_SEPS));
} /* end if */
} /* end else */
@@ -734,8 +734,8 @@ H5_combine_path(const char *path1, const char *path2, char **full_name /*out*/)
assert(path2);
if (path1)
- path1_len = HDstrlen(path1);
- path2_len = HDstrlen(path2);
+ path1_len = strlen(path1);
+ path2_len = strlen(path2);
if (path1 == NULL || *path1 == '\0' || H5_CHECK_ABSOLUTE(path2)) {
@@ -753,7 +753,7 @@ H5_combine_path(const char *path1, const char *path2, char **full_name /*out*/)
*/
if (NULL == (*full_name = (char *)H5MM_malloc(path2_len + 3)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate path2 buffer");
- HDsnprintf(*full_name, (path2_len + 3), "%c:%s", path1[0], path2);
+ snprintf(*full_name, (path2_len + 3), "%c:%s", path1[0], path2);
} /* end if */
else {
/* On windows path2 is path absolute name ("\foo\bar"),
@@ -777,9 +777,9 @@ H5_combine_path(const char *path1, const char *path2, char **full_name /*out*/)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate filename buffer");
/* Compose the full file name */
- HDsnprintf(*full_name, (path1_len + path2_len + 2 + 2), "%s%s%s",
- path1, /* Extra "+2" to quiet GCC warning - 2019/07/05, QAK */
- (H5_CHECK_DELIMITER(path1[path1_len - 1]) ? "" : H5_DIR_SEPS), path2);
+ snprintf(*full_name, (path1_len + path2_len + 2 + 2), "%s%s%s",
+ path1, /* Extra "+2" to quiet GCC warning - 2019/07/05, QAK */
+ (H5_CHECK_DELIMITER(path1[path1_len - 1]) ? "" : H5_DIR_SEPS), path2);
} /* end else */
done:
@@ -803,14 +803,14 @@ H5_nanosleep(uint64_t nanosec)
FUNC_ENTER_NOAPI_NOINIT_NOERR
#ifdef H5_HAVE_WIN32_API
- DWORD dwMilliseconds = (DWORD)HDceil(nanosec / 1.0e6);
+ DWORD dwMilliseconds = (DWORD)ceil(nanosec / 1.0e6);
DWORD ignore;
/* Windows can't sleep at a ns resolution. Best we can do is ~1 ms. We
* don't care about the return value since the second parameter
- * (bAlertable) is FALSE, so it will always be zero.
+ * (bAlertable) is false, so it will always be zero.
*/
- ignore = SleepEx(dwMilliseconds, FALSE);
+ ignore = SleepEx(dwMilliseconds, false);
#else
@@ -1000,7 +1000,7 @@ H5_dirname(const char *path, char **dirname)
if (!dirname)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dirname can't be NULL");
- if (NULL == (sep = HDstrrchr(path, H5_DIR_SEPC))) {
+ if (NULL == (sep = strrchr(path, H5_DIR_SEPC))) {
/* Pathname with no file separator characters */
out = H5MM_strdup(".");
}
@@ -1109,7 +1109,7 @@ H5_basename(const char *path, char **basename)
if (!basename)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "basename can't be NULL");
- if (NULL == (sep = HDstrrchr(path, H5_DIR_SEPC))) {
+ if (NULL == (sep = strrchr(path, H5_DIR_SEPC))) {
if (*path == '\0')
/* Empty pathname */
out = H5MM_strdup(".");
@@ -1206,7 +1206,7 @@ H5_get_option(int argc, const char *const *argv, const char *opts, const struct
if (H5_optind >= argc || argv[H5_optind][0] != '-' || argv[H5_optind][1] == '\0') {
return EOF;
}
- else if (HDstrcmp(argv[H5_optind], "--") == 0) {
+ else if (strcmp(argv[H5_optind], "--") == 0) {
H5_optind++;
return EOF;
}
@@ -1216,19 +1216,19 @@ H5_get_option(int argc, const char *const *argv, const char *opts, const struct
/* long command line option */
int i;
const char ch = '=';
- char *arg = HDstrdup(&argv[H5_optind][2]);
+ char *arg = strdup(&argv[H5_optind][2]);
size_t arg_len = 0;
H5_optarg = strchr(&argv[H5_optind][2], ch);
- arg_len = HDstrlen(&argv[H5_optind][2]);
+ arg_len = strlen(&argv[H5_optind][2]);
if (H5_optarg) {
- arg_len -= HDstrlen(H5_optarg);
+ arg_len -= strlen(H5_optarg);
H5_optarg++; /* skip the equal sign */
}
arg[arg_len] = 0;
for (i = 0; l_opts && l_opts[i].name; i++) {
- if (HDstrcmp(arg, l_opts[i].name) == 0) {
+ if (strcmp(arg, l_opts[i].name) == 0) {
/* we've found a matching long command line flag */
optchar = l_opts[i].shortval;
@@ -1278,7 +1278,7 @@ H5_get_option(int argc, const char *const *argv, const char *opts, const struct
/* short command line option */
optchar = argv[H5_optind][sp];
- if (optchar == ':' || (cp = HDstrchr(opts, optchar)) == 0) {
+ if (optchar == ':' || (cp = strchr(opts, optchar)) == 0) {
if (H5_opterr)
fprintf(stderr, "%s: unknown option \"%c\"\n", argv[0], optchar);
diff --git a/src/H5timer.c b/src/H5timer.c
index c0a945b56d4..ac04d157fe9 100644
--- a/src/H5timer.c
+++ b/src/H5timer.c
@@ -95,41 +95,41 @@ H5_bandwidth(char *buf /*out*/, size_t bufsize, double nbytes, double nseconds)
double bw;
if (nseconds <= 0.0)
- HDstrcpy(buf, " NaN");
+ strcpy(buf, " NaN");
else {
bw = nbytes / nseconds;
if (H5_DBL_ABS_EQUAL(bw, 0.0))
- HDstrcpy(buf, "0.000 B/s");
+ strcpy(buf, "0.000 B/s");
else if (bw < 1.0)
- HDsnprintf(buf, bufsize, "%10.4e", bw);
+ snprintf(buf, bufsize, "%10.4e", bw);
else if (bw < (double)H5_KB) {
- HDsnprintf(buf, bufsize, "%05.4f", bw);
- HDstrcpy(buf + 5, " B/s");
+ snprintf(buf, bufsize, "%05.4f", bw);
+ strcpy(buf + 5, " B/s");
}
else if (bw < (double)H5_MB) {
- HDsnprintf(buf, bufsize, "%05.4f", bw / (double)H5_KB);
- HDstrcpy(buf + 5, " kB/s");
+ snprintf(buf, bufsize, "%05.4f", bw / (double)H5_KB);
+ strcpy(buf + 5, " kB/s");
}
else if (bw < (double)H5_GB) {
- HDsnprintf(buf, bufsize, "%05.4f", bw / (double)H5_MB);
- HDstrcpy(buf + 5, " MB/s");
+ snprintf(buf, bufsize, "%05.4f", bw / (double)H5_MB);
+ strcpy(buf + 5, " MB/s");
}
else if (bw < (double)H5_TB) {
- HDsnprintf(buf, bufsize, "%05.4f", bw / (double)H5_GB);
- HDstrcpy(buf + 5, " GB/s");
+ snprintf(buf, bufsize, "%05.4f", bw / (double)H5_GB);
+ strcpy(buf + 5, " GB/s");
}
else if (bw < (double)H5_PB) {
- HDsnprintf(buf, bufsize, "%05.4f", bw / (double)H5_TB);
- HDstrcpy(buf + 5, " TB/s");
+ snprintf(buf, bufsize, "%05.4f", bw / (double)H5_TB);
+ strcpy(buf + 5, " TB/s");
}
else if (bw < (double)H5_EB) {
- HDsnprintf(buf, bufsize, "%05.4f", bw / (double)H5_PB);
- HDstrcpy(buf + 5, " PB/s");
+ snprintf(buf, bufsize, "%05.4f", bw / (double)H5_PB);
+ strcpy(buf + 5, " PB/s");
}
else {
- HDsnprintf(buf, bufsize, "%10.4e", bw);
- if (HDstrlen(buf) > 10)
- HDsnprintf(buf, bufsize, "%10.3e", bw);
+ snprintf(buf, bufsize, "%10.4e", bw);
+ if (strlen(buf) > 10)
+ snprintf(buf, bufsize, "%10.3e", bw);
} /* end else-if */
} /* end else */
} /* end H5_bandwidth() */
@@ -386,7 +386,7 @@ H5_timer_start(H5_timer_t *timer /*in,out*/)
if (H5__timer_get_timevals(&(timer->initial)) < 0)
return -1;
- timer->is_running = TRUE;
+ timer->is_running = true;
return 0;
} /* end H5_timer_start() */
@@ -423,7 +423,7 @@ H5_timer_stop(H5_timer_t *timer /*in,out*/)
timer->total.system += timer->final_interval.system;
timer->total.user += timer->final_interval.user;
- timer->is_running = FALSE;
+ timer->is_running = false;
return 0;
} /* end H5_timer_stop() */
@@ -568,15 +568,15 @@ H5_timer_get_time_string(double seconds)
remainder_sec = seconds;
/* Extract days */
- days = HDfloor(remainder_sec / H5_SEC_PER_DAY);
+ days = floor(remainder_sec / H5_SEC_PER_DAY);
remainder_sec -= (days * H5_SEC_PER_DAY);
/* Extract hours */
- hours = HDfloor(remainder_sec / H5_SEC_PER_HOUR);
+ hours = floor(remainder_sec / H5_SEC_PER_HOUR);
remainder_sec -= (hours * H5_SEC_PER_HOUR);
/* Extract minutes */
- minutes = HDfloor(remainder_sec / H5_SEC_PER_MIN);
+ minutes = floor(remainder_sec / H5_SEC_PER_MIN);
remainder_sec -= (minutes * H5_SEC_PER_MIN);
/* The # of seconds left is in remainder_sec */
@@ -592,31 +592,30 @@ H5_timer_get_time_string(double seconds)
* (name? round_up_size? ?)
*/
if (seconds < 0.0)
- HDsnprintf(s, H5TIMER_TIME_STRING_LEN, "N/A");
+ snprintf(s, H5TIMER_TIME_STRING_LEN, "N/A");
else if (H5_DBL_ABS_EQUAL(0.0, seconds))
- HDsnprintf(s, H5TIMER_TIME_STRING_LEN, "0.0 s");
+ snprintf(s, H5TIMER_TIME_STRING_LEN, "0.0 s");
else if (seconds < 1.0E-6)
/* t < 1 us, Print time in ns */
- HDsnprintf(s, H5TIMER_TIME_STRING_LEN, "%.f ns", seconds * 1.0E9);
+ snprintf(s, H5TIMER_TIME_STRING_LEN, "%.f ns", seconds * 1.0E9);
else if (seconds < 1.0E-3)
/* t < 1 ms, Print time in us */
- HDsnprintf(s, H5TIMER_TIME_STRING_LEN, "%.1f us", seconds * 1.0E6);
+ snprintf(s, H5TIMER_TIME_STRING_LEN, "%.1f us", seconds * 1.0E6);
else if (seconds < 1.0)
/* t < 1 s, Print time in ms */
- HDsnprintf(s, H5TIMER_TIME_STRING_LEN, "%.1f ms", seconds * 1.0E3);
+ snprintf(s, H5TIMER_TIME_STRING_LEN, "%.1f ms", seconds * 1.0E3);
else if (seconds < H5_SEC_PER_MIN)
/* t < 1 m, Print time in s */
- HDsnprintf(s, H5TIMER_TIME_STRING_LEN, "%.2f s", seconds);
+ snprintf(s, H5TIMER_TIME_STRING_LEN, "%.2f s", seconds);
else if (seconds < H5_SEC_PER_HOUR)
/* t < 1 h, Print time in m and s */
- HDsnprintf(s, H5TIMER_TIME_STRING_LEN, "%.f m %.f s", minutes, remainder_sec);
+ snprintf(s, H5TIMER_TIME_STRING_LEN, "%.f m %.f s", minutes, remainder_sec);
else if (seconds < H5_SEC_PER_DAY)
/* t < 1 d, Print time in h, m and s */
- HDsnprintf(s, H5TIMER_TIME_STRING_LEN, "%.f h %.f m %.f s", hours, minutes, remainder_sec);
+ snprintf(s, H5TIMER_TIME_STRING_LEN, "%.f h %.f m %.f s", hours, minutes, remainder_sec);
else
/* Print time in d, h, m and s */
- HDsnprintf(s, H5TIMER_TIME_STRING_LEN, "%.f d %.f h %.f m %.f s", days, hours, minutes,
- remainder_sec);
+ snprintf(s, H5TIMER_TIME_STRING_LEN, "%.f d %.f h %.f m %.f s", days, hours, minutes, remainder_sec);
return s;
} /* end H5_timer_get_time_string() */
diff --git a/src/H5trace.c b/src/H5trace.c
index 0aa85eda078..07326e06f02 100644
--- a/src/H5trace.c
+++ b/src/H5trace.c
@@ -59,7 +59,7 @@
/********************/
/* Local Prototypes */
/********************/
-static herr_t H5_trace_args_bool(H5RS_str_t *rs, hbool_t val);
+static herr_t H5_trace_args_bool(H5RS_str_t *rs, bool val);
static herr_t H5_trace_args_cset(H5RS_str_t *rs, H5T_cset_t cset);
static herr_t H5_trace_args_close_degree(H5RS_str_t *rs, H5F_close_degree_t degree);
@@ -78,7 +78,7 @@ static herr_t H5_trace_args_close_degree(H5RS_str_t *rs, H5F_close_degree_t degr
/*-------------------------------------------------------------------------
* Function: H5_trace_args_bool
*
- * Purpose: This routine formats an hbool_t and adds the output to
+ * Purpose: This routine formats an bool and adds the output to
* the refcounted string (RS) argument.
*
* Return: SUCCEED / FAIL
@@ -86,11 +86,11 @@ static herr_t H5_trace_args_close_degree(H5RS_str_t *rs, H5F_close_degree_t degr
*-------------------------------------------------------------------------
*/
static herr_t
-H5_trace_args_bool(H5RS_str_t *rs, hbool_t val)
+H5_trace_args_bool(H5RS_str_t *rs, bool val)
{
/* FUNC_ENTER() should not be called */
- if (TRUE == val)
+ if (true == val)
H5RS_acat(rs, "TRUE");
else if (!val)
H5RS_acat(rs, "FALSE");
@@ -250,7 +250,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
type = rest + 1;
}
else {
- rest = (char *)HDstrchr(type, ']');
+ rest = (char *)strchr(type, ']');
assert(rest);
type = rest + 1;
asize_idx = -1;
@@ -472,10 +472,10 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
} /* end switch */
break;
- case 'b': /* hbool_t */
+ case 'b': /* bool */
{
- /* Can't pass hbool_t to va_arg() */
- hbool_t bool_var = (hbool_t)va_arg(ap, int);
+ /* Can't pass bool to va_arg() */
+ bool bool_var = (bool)va_arg(ap, int);
H5_trace_args_bool(rs, bool_var);
} /* end block */
@@ -897,42 +897,42 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
{
H5D_mpio_no_collective_cause_t nocol_cause_mode =
(H5D_mpio_no_collective_cause_t)va_arg(ap, int);
- hbool_t flag_already_displayed = FALSE;
+ bool flag_already_displayed = false;
/* Check for all bit-flags which might be set */
if (nocol_cause_mode & H5D_MPIO_COLLECTIVE) {
H5RS_acat(rs, "H5D_MPIO_COLLECTIVE");
- flag_already_displayed = TRUE;
+ flag_already_displayed = true;
} /* end if */
if (nocol_cause_mode & H5D_MPIO_SET_INDEPENDENT) {
H5RS_asprintf_cat(rs, "%sH5D_MPIO_SET_INDEPENDENT",
flag_already_displayed ? " | " : "");
- flag_already_displayed = TRUE;
+ flag_already_displayed = true;
} /* end if */
if (nocol_cause_mode & H5D_MPIO_DATATYPE_CONVERSION) {
H5RS_asprintf_cat(rs, "%sH5D_MPIO_DATATYPE_CONVERSION",
flag_already_displayed ? " | " : "");
- flag_already_displayed = TRUE;
+ flag_already_displayed = true;
} /* end if */
if (nocol_cause_mode & H5D_MPIO_DATA_TRANSFORMS) {
H5RS_asprintf_cat(rs, "%sH5D_MPIO_DATA_TRANSFORMS",
flag_already_displayed ? " | " : "");
- flag_already_displayed = TRUE;
+ flag_already_displayed = true;
} /* end if */
if (nocol_cause_mode & H5D_MPIO_MPI_OPT_TYPES_ENV_VAR_DISABLED) {
H5RS_asprintf_cat(rs, "%sH5D_MPIO_MPI_OPT_TYPES_ENV_VAR_DISABLED",
flag_already_displayed ? " | " : "");
- flag_already_displayed = TRUE;
+ flag_already_displayed = true;
} /* end if */
if (nocol_cause_mode & H5D_MPIO_NOT_SIMPLE_OR_SCALAR_DATASPACES) {
H5RS_asprintf_cat(rs, "%sH5D_MPIO_NOT_SIMPLE_OR_SCALAR_DATASPACES",
flag_already_displayed ? " | " : "");
- flag_already_displayed = TRUE;
+ flag_already_displayed = true;
} /* end if */
if (nocol_cause_mode & H5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET) {
H5RS_asprintf_cat(rs, "%sH5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET",
flag_already_displayed ? " | " : "");
- flag_already_displayed = TRUE;
+ flag_already_displayed = true;
} /* end if */
/* Display '' if there's no flags set */
@@ -3957,8 +3957,8 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
H5RS_str_t *rs = NULL;
hssize_t i;
FILE *out = H5_debug_g.trace;
- static hbool_t is_first_invocation = TRUE;
- H5_timer_t function_timer = {{0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}, FALSE};
+ static bool is_first_invocation = true;
+ H5_timer_t function_timer = {{0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}, false};
H5_timevals_t function_times = {0.0, 0.0, 0.0};
static H5_timer_t running_timer;
H5_timevals_t running_times;
@@ -3993,7 +3993,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
/* Get time for event if the trace times flag is set */
if (is_first_invocation && H5_debug_g.ttimes) {
/* Start the library-wide timer */
- is_first_invocation = FALSE;
+ is_first_invocation = false;
H5_timer_init(&running_timer);
H5_timer_start(&running_timer);
}
@@ -4021,8 +4021,8 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
H5_timer_get_times(function_timer, &function_times);
H5_timer_get_times(running_timer, &running_times);
- HDsnprintf(tmp, sizeof(tmp), "%.6f", (function_times.elapsed - running_times.elapsed));
- H5RS_asprintf_cat(rs, " %*s ", (int)HDstrlen(tmp), "");
+ snprintf(tmp, sizeof(tmp), "%.6f", (function_times.elapsed - running_times.elapsed));
+ H5RS_asprintf_cat(rs, " %*s ", (int)strlen(tmp), "");
}
for (i = 0; i < current_depth; i++)
H5RS_aputc(rs, '+');
@@ -4065,7 +4065,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
last_call_depth = current_depth++;
H5RS_acat(rs, ")");
}
- HDfputs(H5RS_get_str(rs), out);
+ fputs(H5RS_get_str(rs), out);
fflush(out);
H5RS_decr(rs);
diff --git a/test/API/H5_api_async_test.c b/test/API/H5_api_async_test.c
index 282f04a0353..7777e108acc 100644
--- a/test/API/H5_api_async_test.c
+++ b/test/API/H5_api_async_test.c
@@ -62,7 +62,7 @@ test_one_dataset_io(void)
hid_t es_id = H5I_INVALID_HID;
hsize_t dims[2] = {6, 10};
size_t num_in_progress;
- hbool_t op_failed;
+ bool op_failed;
int wbuf[6][10];
int rbuf[6][10];
int i, j;
@@ -328,7 +328,7 @@ test_multi_dataset_io(void)
hid_t es_id = H5I_INVALID_HID;
hsize_t dims[2] = {6, 10};
size_t num_in_progress;
- hbool_t op_failed;
+ bool op_failed;
char dset_name[32];
int wbuf[5][6][10];
int rbuf[5][6][10];
@@ -582,7 +582,7 @@ test_multi_file_dataset_io(void)
hid_t es_id = H5I_INVALID_HID;
hsize_t dims[2] = {6, 10};
size_t num_in_progress;
- hbool_t op_failed;
+ bool op_failed;
char file_name[32];
int wbuf[5][6][10];
int rbuf[5][6][10];
@@ -892,7 +892,7 @@ test_multi_file_grp_dset_io(void)
hid_t es_id = H5I_INVALID_HID;
hsize_t dims[2] = {6, 10};
size_t num_in_progress;
- hbool_t op_failed;
+ bool op_failed;
char file_name[32];
int wbuf[5][6][10];
int rbuf[5][6][10];
@@ -1208,7 +1208,7 @@ test_set_extent(void)
hsize_t start[2] = {0, 0};
hsize_t count[2] = {1, 10};
size_t num_in_progress;
- hbool_t op_failed;
+ bool op_failed;
htri_t tri_ret;
int wbuf[6][10];
int rbuf[6][10];
@@ -1413,10 +1413,10 @@ test_attribute_exists(void)
hid_t space_id = H5I_INVALID_HID;
hid_t es_id = H5I_INVALID_HID;
hsize_t dims[2] = {6, 10};
- hbool_t exists1;
- hbool_t exists2;
+ bool exists1;
+ bool exists2;
size_t num_in_progress;
- hbool_t op_failed;
+ bool op_failed;
TESTING("H5Aexists()");
@@ -1479,9 +1479,9 @@ test_attribute_exists(void)
/* Check if H5Aexists returned the correct values */
if (exists1)
- FAIL_PUTS_ERROR(" H5Aexists returned TRUE for an attribute that should not exist");
+ FAIL_PUTS_ERROR(" H5Aexists returned true for an attribute that should not exist");
if (!exists2)
- FAIL_PUTS_ERROR(" H5Aexists returned FALSE for an attribute that should exist");
+ FAIL_PUTS_ERROR(" H5Aexists returned false for an attribute that should exist");
/* Close */
if (H5Aclose_async(attr_id, es_id) < 0)
@@ -1534,7 +1534,7 @@ test_attribute_io(void)
hid_t es_id = H5I_INVALID_HID;
hsize_t dims[2] = {6, 10};
size_t num_in_progress;
- hbool_t op_failed;
+ bool op_failed;
int wbuf[6][10];
int rbuf[6][10];
int i, j;
@@ -1676,7 +1676,7 @@ test_attribute_io_tconv(void)
hid_t es_id = H5I_INVALID_HID;
hsize_t dims[2] = {6, 10};
size_t num_in_progress;
- hbool_t op_failed;
+ bool op_failed;
int wbuf[6][10];
int rbuf[6][10];
int i, j;
@@ -1821,7 +1821,7 @@ test_attribute_io_compound(void)
hid_t es_id = H5I_INVALID_HID;
hsize_t dims[2] = {6, 10};
size_t num_in_progress;
- hbool_t op_failed;
+ bool op_failed;
tattr_cmpd_t wbuf[6][10];
tattr_cmpd_t rbuf[6][10];
tattr_cmpd_t fbuf[6][10];
@@ -2131,7 +2131,7 @@ test_group(void)
H5G_info_t info2;
H5G_info_t info3;
size_t num_in_progress;
- hbool_t op_failed;
+ bool op_failed;
TESTING("group operations");
@@ -2288,19 +2288,19 @@ test_group(void)
static int
test_link(void)
{
- hid_t file_id = H5I_INVALID_HID;
- hid_t parent_group_id = H5I_INVALID_HID;
- hid_t group_id = H5I_INVALID_HID;
- hid_t gcpl_id = H5I_INVALID_HID;
- hid_t es_id = H5I_INVALID_HID;
- hbool_t existsh1;
- hbool_t existsh2;
- hbool_t existsh3;
- hbool_t existss1;
- hbool_t existss2;
- hbool_t existss3;
- size_t num_in_progress;
- hbool_t op_failed;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t parent_group_id = H5I_INVALID_HID;
+ hid_t group_id = H5I_INVALID_HID;
+ hid_t gcpl_id = H5I_INVALID_HID;
+ hid_t es_id = H5I_INVALID_HID;
+ bool existsh1;
+ bool existsh2;
+ bool existsh3;
+ bool existss1;
+ bool existss2;
+ bool existss3;
+ size_t num_in_progress;
+ bool op_failed;
TESTING("link operations");
@@ -2431,17 +2431,17 @@ test_link(void)
/* Check if existence returns were correct */
if (!existsh1)
- FAIL_PUTS_ERROR(" link exists returned FALSE for link that should exist");
+ FAIL_PUTS_ERROR(" link exists returned false for link that should exist");
if (!existss1)
- FAIL_PUTS_ERROR(" link exists returned FALSE for link that should exist");
+ FAIL_PUTS_ERROR(" link exists returned false for link that should exist");
if (!existsh2)
- FAIL_PUTS_ERROR(" link exists returned FALSE for link that should exist");
+ FAIL_PUTS_ERROR(" link exists returned false for link that should exist");
if (existss2)
- FAIL_PUTS_ERROR(" link exists returned TRUE for link that should not exist");
+ FAIL_PUTS_ERROR(" link exists returned true for link that should not exist");
if (existsh3)
- FAIL_PUTS_ERROR(" link exists returned TRUE for link that should not exist");
+ FAIL_PUTS_ERROR(" link exists returned true for link that should not exist");
if (existsh3)
- FAIL_PUTS_ERROR(" link exists returned TRUE for link that should not exist");
+ FAIL_PUTS_ERROR(" link exists returned true for link that should not exist");
/* Close */
if (H5Gclose_async(parent_group_id, es_id) < 0)
@@ -2492,7 +2492,7 @@ test_ocopy_orefresh(void)
hid_t es_id = H5I_INVALID_HID;
hsize_t dims[2] = {6, 10};
size_t num_in_progress;
- hbool_t op_failed;
+ bool op_failed;
TESTING("H5Ocopy() and H5Orefresh()");
@@ -2600,11 +2600,11 @@ test_ocopy_orefresh(void)
static int
test_file_reopen(void)
{
- hid_t file_id = H5I_INVALID_HID;
- hid_t reopened_file_id = H5I_INVALID_HID;
- hid_t es_id = H5I_INVALID_HID;
- size_t num_in_progress;
- hbool_t op_failed;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t reopened_file_id = H5I_INVALID_HID;
+ hid_t es_id = H5I_INVALID_HID;
+ size_t num_in_progress;
+ bool op_failed;
TESTING("H5Freopen()");
@@ -2676,7 +2676,7 @@ cleanup_files(void)
H5Fdelete(ASYNC_API_TEST_FILE, H5P_DEFAULT);
for (i = 0; i <= max_printf_file; i++) {
- HDsnprintf(file_name, 64, ASYNC_API_TEST_FILE_PRINTF, i);
+ snprintf(file_name, 64, ASYNC_API_TEST_FILE_PRINTF, i);
H5Fdelete(file_name, H5P_DEFAULT);
} /* end for */
}
diff --git a/test/API/H5_api_attribute_test.c b/test/API/H5_api_attribute_test.c
index 1b3ef969dcc..680ee4389f6 100644
--- a/test/API/H5_api_attribute_test.c
+++ b/test/API/H5_api_attribute_test.c
@@ -138,12 +138,12 @@ test_create_attribute_on_root(void)
goto error;
}
- if ((space_id = generate_random_dataspace(ATTRIBUTE_CREATE_ON_ROOT_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ if ((space_id = generate_random_dataspace(ATTRIBUTE_CREATE_ON_ROOT_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
- if ((attr_dtype1 = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype1 = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
- if ((attr_dtype2 = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype2 = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
PASSED();
@@ -296,17 +296,17 @@ test_create_attribute_on_dataset(void)
}
if ((dset_space_id =
- generate_random_dataspace(ATTRIBUTE_CREATE_ON_DATASET_DSET_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ generate_random_dataspace(ATTRIBUTE_CREATE_ON_DATASET_DSET_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
if ((attr_space_id =
- generate_random_dataspace(ATTRIBUTE_CREATE_ON_DATASET_ATTR_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ generate_random_dataspace(ATTRIBUTE_CREATE_ON_DATASET_ATTR_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
- if ((attr_dtype1 = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype1 = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
- if ((attr_dtype2 = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype2 = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((dset_id = H5Dcreate2(group_id, ATTRIBUTE_CREATE_ON_DATASET_DSET_NAME, dset_dtype, dset_space_id,
@@ -479,7 +479,7 @@ test_create_attribute_on_datatype(void)
goto error;
}
- if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((type_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype\n");
goto error;
@@ -492,12 +492,12 @@ test_create_attribute_on_datatype(void)
goto error;
}
- if ((space_id = generate_random_dataspace(ATTRIBUTE_CREATE_ON_DATATYPE_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ if ((space_id = generate_random_dataspace(ATTRIBUTE_CREATE_ON_DATATYPE_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
- if ((attr_dtype1 = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype1 = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
- if ((attr_dtype2 = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype2 = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
PASSED();
@@ -652,7 +652,7 @@ test_create_attribute_with_null_space(void)
if ((space_id = H5Screate(H5S_NULL)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_CREATE_NULL_DATASPACE_TEST_ATTR_NAME, attr_dtype, space_id,
@@ -763,7 +763,7 @@ test_create_attribute_with_scalar_space(void)
if ((space_id = H5Screate(H5S_SCALAR)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_CREATE_SCALAR_DATASPACE_TEST_ATTR_NAME, attr_dtype,
@@ -874,10 +874,10 @@ test_create_attribute_with_space_in_name(void)
}
if ((space_id =
- generate_random_dataspace(ATTRIBUTE_CREATE_WITH_SPACE_IN_NAME_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ generate_random_dataspace(ATTRIBUTE_CREATE_WITH_SPACE_IN_NAME_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_CREATE_WITH_SPACE_IN_NAME_ATTR_NAME, attr_dtype, space_id,
@@ -978,10 +978,10 @@ test_create_attribute_invalid_params(void)
goto error;
}
- if ((space_id = generate_random_dataspace(ATTRIBUTE_CREATE_INVALID_PARAMS_SPACE_RANK, NULL, NULL, TRUE)) <
+ if ((space_id = generate_random_dataspace(ATTRIBUTE_CREATE_INVALID_PARAMS_SPACE_RANK, NULL, NULL, true)) <
0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
PASSED();
@@ -1436,10 +1436,10 @@ test_open_attribute(void)
goto error;
}
- if ((space_id = generate_random_dataspace(ATTRIBUTE_OPEN_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ if ((space_id = generate_random_dataspace(ATTRIBUTE_OPEN_TEST_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
- if ((attr_type = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_type = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
/* Create several attributes */
@@ -1826,10 +1826,10 @@ test_open_attribute_invalid_params(void)
}
if ((space_id =
- generate_random_dataspace(ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ generate_random_dataspace(ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
- if ((attr_type = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_type = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME, attr_type, space_id,
@@ -2342,7 +2342,7 @@ test_write_attribute(void)
goto error;
}
- if ((space_id = generate_random_dataspace(ATTRIBUTE_WRITE_TEST_SPACE_RANK, NULL, dims, TRUE)) < 0)
+ if ((space_id = generate_random_dataspace(ATTRIBUTE_WRITE_TEST_SPACE_RANK, NULL, dims, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_WRITE_TEST_ATTR_NAME, ATTRIBUTE_WRITE_TEST_ATTR_DTYPE,
@@ -2475,7 +2475,7 @@ test_write_attribute_invalid_params(void)
}
if ((space_id =
- generate_random_dataspace(ATTRIBUTE_WRITE_INVALID_PARAMS_TEST_SPACE_RANK, NULL, dims, TRUE)) < 0)
+ generate_random_dataspace(ATTRIBUTE_WRITE_INVALID_PARAMS_TEST_SPACE_RANK, NULL, dims, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_WRITE_INVALID_PARAMS_TEST_ATTR_NAME,
@@ -2662,7 +2662,7 @@ test_read_attribute(void)
goto error;
}
- if ((space_id = generate_random_dataspace(ATTRIBUTE_READ_TEST_SPACE_RANK, NULL, dims, TRUE)) < 0)
+ if ((space_id = generate_random_dataspace(ATTRIBUTE_READ_TEST_SPACE_RANK, NULL, dims, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_READ_TEST_ATTR_NAME, ATTRIBUTE_READ_TEST_ATTR_DTYPE,
@@ -2821,7 +2821,7 @@ test_read_attribute_invalid_params(void)
}
if ((space_id =
- generate_random_dataspace(ATTRIBUTE_READ_INVALID_PARAMS_TEST_SPACE_RANK, NULL, dims, TRUE)) < 0)
+ generate_random_dataspace(ATTRIBUTE_READ_INVALID_PARAMS_TEST_SPACE_RANK, NULL, dims, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_READ_INVALID_PARAMS_TEST_ATTR_NAME,
@@ -3029,7 +3029,7 @@ test_read_empty_attribute(void)
goto error;
}
- if ((space_id = generate_random_dataspace(ATTRIBUTE_READ_EMPTY_SPACE_RANK, NULL, dims, TRUE)) < 0)
+ if ((space_id = generate_random_dataspace(ATTRIBUTE_READ_EMPTY_SPACE_RANK, NULL, dims, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_READ_EMPTY_ATTR_NAME, ATTRIBUTE_READ_EMPTY_DTYPE, space_id,
@@ -3216,10 +3216,10 @@ test_get_attribute_space_and_type(void)
}
if ((attr_space_id =
- generate_random_dataspace(ATTRIBUTE_GET_SPACE_TYPE_TEST_SPACE_RANK, NULL, attr_dims, TRUE)) < 0)
+ generate_random_dataspace(ATTRIBUTE_GET_SPACE_TYPE_TEST_SPACE_RANK, NULL, attr_dims, true)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_GET_SPACE_TYPE_TEST_ATTR_NAME, attr_dtype, attr_space_id,
@@ -3520,10 +3520,10 @@ test_get_attribute_space_and_type_invalid_params(void)
}
if ((attr_space_id = generate_random_dataspace(ATTRIBUTE_GET_SPACE_TYPE_INVALID_PARAMS_TEST_SPACE_RANK,
- NULL, NULL, TRUE)) < 0)
+ NULL, NULL, true)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_GET_SPACE_TYPE_INVALID_PARAMS_TEST_ATTR_NAME, attr_dtype,
@@ -3678,12 +3678,12 @@ test_attribute_property_lists(void)
goto error;
}
- if ((space_id = generate_random_dataspace(ATTRIBUTE_PROPERTY_LIST_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ if ((space_id = generate_random_dataspace(ATTRIBUTE_PROPERTY_LIST_TEST_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
- if ((attr_dtype1 = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype1 = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
- if ((attr_dtype2 = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype2 = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((acpl_id1 = H5Pcreate(H5P_ATTRIBUTE_CREATE)) < 0) {
@@ -3979,10 +3979,10 @@ test_get_attribute_name(void)
goto error;
}
- if ((space_id = generate_random_dataspace(ATTRIBUTE_GET_NAME_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ if ((space_id = generate_random_dataspace(ATTRIBUTE_GET_NAME_TEST_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
/* Create several attributes */
@@ -4082,8 +4082,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME);
@@ -4127,8 +4127,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name_by_idx_crt_order_increasing);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME);
@@ -4145,8 +4145,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name_by_idx_crt_order_increasing);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2);
@@ -4163,8 +4163,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name_by_idx_crt_order_increasing);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3);
@@ -4195,8 +4195,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name_by_idx_crt_order_decreasing);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME);
@@ -4213,8 +4213,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name_by_idx_crt_order_decreasing);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2);
@@ -4231,8 +4231,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name_by_idx_crt_order_decreasing);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3);
@@ -4257,8 +4257,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name_by_idx_name_order_increasing);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME);
@@ -4275,8 +4275,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name_by_idx_name_order_increasing);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2);
@@ -4293,8 +4293,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name_by_idx_name_order_increasing);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3);
@@ -4319,8 +4319,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name_by_idx_name_order_decreasing);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME);
@@ -4337,8 +4337,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name_by_idx_name_order_decreasing);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2);
@@ -4355,8 +4355,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name_by_idx_name_order_decreasing);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3);
@@ -4463,10 +4463,10 @@ test_get_attribute_name_invalid_params(void)
}
if ((space_id = generate_random_dataspace(ATTRIBUTE_GET_NAME_INVALID_PARAMS_TEST_SPACE_RANK, NULL, NULL,
- TRUE)) < 0)
+ true)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_GET_NAME_INVALID_PARAMS_TEST_ATTRIBUTE_NAME, attr_dtype,
@@ -4844,10 +4844,10 @@ test_get_attribute_info(void)
goto error;
}
- if ((space_id = generate_random_dataspace(ATTRIBUTE_GET_INFO_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ if ((space_id = generate_random_dataspace(ATTRIBUTE_GET_INFO_TEST_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
/* Create several attributes */
@@ -5480,10 +5480,10 @@ test_get_attribute_info_invalid_params(void)
}
if ((space_id = generate_random_dataspace(ATTRIBUTE_GET_INFO_INVALID_PARAMS_TEST_SPACE_RANK, NULL, NULL,
- TRUE)) < 0)
+ true)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_GET_INFO_INVALID_PARAMS_TEST_ATTR_NAME, attr_dtype,
@@ -5938,10 +5938,10 @@ test_rename_attribute(void)
goto error;
}
- if ((attr_space_id = generate_random_dataspace(ATTRIBUTE_RENAME_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ if ((attr_space_id = generate_random_dataspace(ATTRIBUTE_RENAME_TEST_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_RENAME_TEST_ATTR_NAME, attr_dtype, attr_space_id,
@@ -6157,10 +6157,10 @@ test_rename_attribute_invalid_params(void)
}
if ((attr_space_id = generate_random_dataspace(ATTRIBUTE_RENAME_INVALID_PARAMS_TEST_SPACE_RANK, NULL,
- NULL, TRUE)) < 0)
+ NULL, true)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_RENAME_INVALID_PARAMS_TEST_ATTR_NAME, attr_dtype,
@@ -6543,18 +6543,18 @@ test_attribute_iterate_group(void)
goto error;
}
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((attr_space_id =
- generate_random_dataspace(ATTRIBUTE_ITERATE_TEST_ATTR_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ generate_random_dataspace(ATTRIBUTE_ITERATE_TEST_ATTR_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
/* Create some attributes with a reverse-ordering naming scheme to test creation order */
for (i = 0; i < ATTRIBUTE_ITERATE_TEST_NUM_ATTRS; i++) {
char attr_name[ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE];
- HDsnprintf(attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE,
- ATTRIBUTE_ITERATE_TEST_ATTR_NAME "%d", (int)(ATTRIBUTE_ITERATE_TEST_NUM_ATTRS - i - 1));
+ snprintf(attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE, ATTRIBUTE_ITERATE_TEST_ATTR_NAME "%d",
+ (int)(ATTRIBUTE_ITERATE_TEST_NUM_ATTRS - i - 1));
if ((attr_id = H5Acreate2(group_id, attr_name, attr_dtype, attr_space_id, H5P_DEFAULT, H5P_DEFAULT)) <
0) {
@@ -6939,16 +6939,16 @@ test_attribute_iterate_dataset(void)
}
}
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((dset_space_id =
- generate_random_dataspace(ATTRIBUTE_ITERATE_TEST_DSET_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ generate_random_dataspace(ATTRIBUTE_ITERATE_TEST_DSET_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
if ((attr_space_id =
- generate_random_dataspace(ATTRIBUTE_ITERATE_TEST_ATTR_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ generate_random_dataspace(ATTRIBUTE_ITERATE_TEST_ATTR_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
if ((dset_id = H5Dcreate2(group_id, ATTRIBUTE_ITERATE_TEST_DSET_NAME, dset_dtype, dset_space_id,
@@ -6962,8 +6962,8 @@ test_attribute_iterate_dataset(void)
for (i = 0; i < ATTRIBUTE_ITERATE_TEST_NUM_ATTRS; i++) {
char attr_name[ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE];
- HDsnprintf(attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE,
- ATTRIBUTE_ITERATE_TEST_ATTR_NAME "%d", (int)(ATTRIBUTE_ITERATE_TEST_NUM_ATTRS - i - 1));
+ snprintf(attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE, ATTRIBUTE_ITERATE_TEST_ATTR_NAME "%d",
+ (int)(ATTRIBUTE_ITERATE_TEST_NUM_ATTRS - i - 1));
if ((attr_id = H5Acreate2(dset_id, attr_name, attr_dtype, attr_space_id, H5P_DEFAULT, H5P_DEFAULT)) <
0) {
@@ -7361,13 +7361,13 @@ test_attribute_iterate_datatype(void)
}
}
- if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((type_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((attr_space_id =
- generate_random_dataspace(ATTRIBUTE_ITERATE_TEST_ATTR_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ generate_random_dataspace(ATTRIBUTE_ITERATE_TEST_ATTR_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
if (H5Tcommit2(group_id, ATTRIBUTE_ITERATE_TEST_DTYPE_NAME, type_id, H5P_DEFAULT, tcpl_id, H5P_DEFAULT) <
@@ -7381,8 +7381,8 @@ test_attribute_iterate_datatype(void)
for (i = 0; i < ATTRIBUTE_ITERATE_TEST_NUM_ATTRS; i++) {
char attr_name[ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE];
- HDsnprintf(attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE,
- ATTRIBUTE_ITERATE_TEST_ATTR_NAME "%d", (int)(ATTRIBUTE_ITERATE_TEST_NUM_ATTRS - i - 1));
+ snprintf(attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE, ATTRIBUTE_ITERATE_TEST_ATTR_NAME "%d",
+ (int)(ATTRIBUTE_ITERATE_TEST_NUM_ATTRS - i - 1));
if ((attr_id = H5Acreate2(type_id, attr_name, attr_dtype, attr_space_id, H5P_DEFAULT, H5P_DEFAULT)) <
0) {
@@ -7774,11 +7774,11 @@ test_attribute_iterate_invalid_params(void)
goto error;
}
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((attr_space_id = generate_random_dataspace(ATTRIBUTE_ITERATE_INVALID_PARAMS_TEST_ATTR_SPACE_RANK,
- NULL, NULL, TRUE)) < 0)
+ NULL, NULL, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_ITERATE_INVALID_PARAMS_TEST_ATTR_NAME, attr_dtype,
@@ -8193,11 +8193,11 @@ test_attribute_iterate_0_attributes(void)
goto error;
}
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((dset_space_id = generate_random_dataspace(ATTRIBUTE_ITERATE_TEST_0_ATTRIBUTES_DSET_SPACE_RANK, NULL,
- NULL, FALSE)) < 0)
+ NULL, false)) < 0)
TEST_ERROR;
if ((dset_id = H5Dcreate2(group_id, ATTRIBUTE_ITERATE_TEST_0_ATTRIBUTES_DSET_NAME, dset_dtype,
@@ -8395,10 +8395,10 @@ test_delete_attribute(void)
goto error;
}
- if ((space_id = generate_random_dataspace(ATTRIBUTE_DELETION_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ if ((space_id = generate_random_dataspace(ATTRIBUTE_DELETION_TEST_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
PASSED();
@@ -9616,10 +9616,10 @@ test_delete_attribute_invalid_params(void)
}
if ((space_id = generate_random_dataspace(ATTRIBUTE_DELETION_INVALID_PARAMS_TEST_SPACE_RANK, NULL, NULL,
- TRUE)) < 0)
+ true)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_DELETION_INVALID_PARAMS_TEST_ATTR_NAME, attr_dtype,
@@ -10031,10 +10031,10 @@ test_attribute_exists(void)
goto error;
}
- if ((space_id = generate_random_dataspace(ATTRIBUTE_EXISTS_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ if ((space_id = generate_random_dataspace(ATTRIBUTE_EXISTS_TEST_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_EXISTS_TEST_ATTR_NAME, attr_dtype, space_id, H5P_DEFAULT,
@@ -10174,10 +10174,10 @@ test_attribute_exists_invalid_params(void)
}
if ((space_id = generate_random_dataspace(ATTRIBUTE_EXISTS_INVALID_PARAMS_TEST_SPACE_RANK, NULL, NULL,
- TRUE)) < 0)
+ true)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_EXISTS_INVALID_PARAMS_TEST_ATTR_NAME, attr_dtype, space_id,
@@ -10449,10 +10449,10 @@ test_attribute_many(void)
goto error;
}
- if ((space_id = generate_random_dataspace(ATTRIBUTE_MANY_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ if ((space_id = generate_random_dataspace(ATTRIBUTE_MANY_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
/* Create many attributes */
@@ -10557,10 +10557,10 @@ test_attribute_duplicate_id(void)
goto error;
}
- if ((space_id = generate_random_dataspace(ATTRIBUTE_DUPLICATE_ID_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ if ((space_id = generate_random_dataspace(ATTRIBUTE_DUPLICATE_ID_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_DUPLICATE_ID_ATTR_NAME, attr_dtype, space_id, H5P_DEFAULT,
@@ -10675,10 +10675,10 @@ test_get_number_attributes(void)
goto error;
}
- if ((space_id = generate_random_dataspace(ATTRIBUTE_GET_NUM_ATTRS_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ if ((space_id = generate_random_dataspace(ATTRIBUTE_GET_NUM_ATTRS_TEST_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_GET_NUM_ATTRS_TEST_ATTR_NAME, attr_dtype, space_id,
@@ -10855,10 +10855,10 @@ test_attr_shared_dtype(void)
goto error;
}
- if ((space_id = generate_random_dataspace(ATTRIBUTE_SHARED_DTYPE_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ if ((space_id = generate_random_dataspace(ATTRIBUTE_SHARED_DTYPE_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
/* Commit datatype to file */
@@ -10990,18 +10990,18 @@ attr_iter_callback1(hid_t location_id, const char *attr_name, const H5A_info_t *
*/
test_iteration = (counter_val / ATTRIBUTE_ITERATE_TEST_NUM_ATTRS);
if (test_iteration == 0 || test_iteration == 3) {
- HDsnprintf(expected_attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE,
- ATTRIBUTE_ITERATE_TEST_ATTR_NAME "%d",
- (int)(counter_val % ATTRIBUTE_ITERATE_TEST_NUM_ATTRS));
+ snprintf(expected_attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE,
+ ATTRIBUTE_ITERATE_TEST_ATTR_NAME "%d",
+ (int)(counter_val % ATTRIBUTE_ITERATE_TEST_NUM_ATTRS));
}
else {
- HDsnprintf(
+ snprintf(
expected_attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE,
ATTRIBUTE_ITERATE_TEST_ATTR_NAME "%d",
(int)(ATTRIBUTE_ITERATE_TEST_NUM_ATTRS - (counter_val % ATTRIBUTE_ITERATE_TEST_NUM_ATTRS) - 1));
}
- if (HDstrncmp(attr_name, expected_attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE)) {
+ if (strncmp(attr_name, expected_attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE)) {
printf(" attribute name '%s' didn't match expected name '%s'\n", attr_name, expected_attr_name);
ret_val = H5_ITER_ERROR;
goto done;
diff --git a/test/API/H5_api_dataset_test.c b/test/API/H5_api_dataset_test.c
index c64769c86b1..996e2cce4aa 100644
--- a/test/API/H5_api_dataset_test.c
+++ b/test/API/H5_api_dataset_test.c
@@ -179,10 +179,10 @@ test_create_dataset_under_root(void)
goto error;
}
- if ((fspace_id = generate_random_dataspace(DATASET_CREATE_UNDER_ROOT_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ if ((fspace_id = generate_random_dataspace(DATASET_CREATE_UNDER_ROOT_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
/* Create the Dataset under the root group of the file */
@@ -261,11 +261,11 @@ test_create_dataset_under_existing_group(void)
goto error;
}
- if ((fspace_id = generate_random_dataspace(DATASET_CREATE_UNDER_EXISTING_SPACE_RANK, NULL, NULL, FALSE)) <
+ if ((fspace_id = generate_random_dataspace(DATASET_CREATE_UNDER_EXISTING_SPACE_RANK, NULL, NULL, false)) <
0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((dset_id = H5Dcreate2(group_id, DATASET_CREATE_UNDER_EXISTING_DSET_NAME, dset_dtype, fspace_id,
@@ -351,11 +351,11 @@ test_create_dataset_invalid_params(void)
goto error;
}
- if ((fspace_id = generate_random_dataspace(DATASET_CREATE_INVALID_PARAMS_SPACE_RANK, NULL, NULL, FALSE)) <
+ if ((fspace_id = generate_random_dataspace(DATASET_CREATE_INVALID_PARAMS_SPACE_RANK, NULL, NULL, false)) <
0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
PASSED();
@@ -605,10 +605,10 @@ test_create_anonymous_dataset(void)
goto error;
}
- if ((fspace_id = generate_random_dataspace(DATASET_CREATE_ANONYMOUS_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ if ((fspace_id = generate_random_dataspace(DATASET_CREATE_ANONYMOUS_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((dset_id = H5Dcreate_anon(group_id, dset_dtype, fspace_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
@@ -696,10 +696,10 @@ test_create_anonymous_dataset_invalid_params(void)
}
if ((fspace_id = generate_random_dataspace(DATASET_CREATE_ANONYMOUS_INVALID_PARAMS_SPACE_RANK, NULL, NULL,
- FALSE)) < 0)
+ false)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
PASSED();
@@ -891,7 +891,7 @@ test_create_dataset_null_space(void)
if ((fspace_id = H5Screate(H5S_NULL)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((dset_id = H5Dcreate2(group_id, DATASET_CREATE_NULL_DATASPACE_TEST_DSET_NAME, dset_dtype, fspace_id,
@@ -988,7 +988,7 @@ test_create_dataset_scalar_space(void)
if ((fspace_id = H5Screate(H5S_SCALAR)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((dset_id = H5Dcreate2(group_id, DATASET_CREATE_SCALAR_DATASPACE_TEST_DSET_NAME, dset_dtype, fspace_id,
@@ -1184,20 +1184,20 @@ test_create_dataset_random_shapes(void)
goto error;
}
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
for (i = 0; i < DATASET_SHAPE_TEST_NUM_ITERATIONS; i++) {
char name[100];
int ndims = rand() % DATASET_SHAPE_TEST_MAX_DIMS + 1;
- if ((space_id = generate_random_dataspace(ndims, NULL, NULL, FALSE)) < 0) {
+ if ((space_id = generate_random_dataspace(ndims, NULL, NULL, false)) < 0) {
H5_FAILED();
printf(" couldn't create dataspace\n");
goto error;
}
- HDsprintf(name, "%s%zu", DATASET_SHAPE_TEST_DSET_BASE_NAME, i + 1);
+ sprintf(name, "%s%zu", DATASET_SHAPE_TEST_DSET_BASE_NAME, i + 1);
if ((dset_id = H5Dcreate2(group_id, name, dset_dtype, space_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
@@ -1292,10 +1292,10 @@ test_create_dataset_predefined_types(void)
char name[100];
if ((fspace_id =
- generate_random_dataspace(DATASET_PREDEFINED_TYPE_TEST_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ generate_random_dataspace(DATASET_PREDEFINED_TYPE_TEST_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
- HDsprintf(name, "%s%zu", DATASET_PREDEFINED_TYPE_TEST_BASE_NAME, i);
+ sprintf(name, "%s%zu", DATASET_PREDEFINED_TYPE_TEST_BASE_NAME, i);
if ((dset_id = H5Dcreate2(group_id, name, predefined_type_test_table[i], fspace_id, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
@@ -1400,7 +1400,7 @@ test_create_dataset_string_types(void)
goto error;
}
- if ((fspace_id = generate_random_dataspace(DATASET_STRING_TYPE_TEST_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ if ((fspace_id = generate_random_dataspace(DATASET_STRING_TYPE_TEST_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
PASSED();
@@ -1566,7 +1566,7 @@ test_create_dataset_compound_types(void)
goto error;
}
- if ((fspace_id = generate_random_dataspace(DATASET_COMPOUND_TYPE_TEST_DSET_RANK, NULL, NULL, FALSE)) < 0)
+ if ((fspace_id = generate_random_dataspace(DATASET_COMPOUND_TYPE_TEST_DSET_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
num_passes = (rand() % DATASET_COMPOUND_TYPE_TEST_MAX_PASSES) + 1;
@@ -1598,9 +1598,9 @@ test_create_dataset_compound_types(void)
size_t member_size;
char member_name[256];
- HDsnprintf(member_name, 256, "member%zu", j);
+ snprintf(member_name, 256, "member%zu", j);
- if ((type_pool[j] = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((type_pool[j] = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create compound datatype member %zu\n", j);
goto error;
@@ -1626,7 +1626,7 @@ test_create_dataset_compound_types(void)
if (H5Tpack(compound_type) < 0)
TEST_ERROR;
- HDsnprintf(dset_name, sizeof(dset_name), "%s%zu", DATASET_COMPOUND_TYPE_TEST_DSET_NAME, i);
+ snprintf(dset_name, sizeof(dset_name), "%s%zu", DATASET_COMPOUND_TYPE_TEST_DSET_NAME, i);
if ((dset_id = H5Dcreate2(group_id, dset_name, compound_type, fspace_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
@@ -1747,13 +1747,13 @@ test_create_dataset_enum_types(void)
for (i = 0; i < DATASET_ENUM_TYPE_TEST_NUM_MEMBERS; i++) {
char val_name[15];
- HDsnprintf(val_name, 15, "%s%zu", DATASET_ENUM_TYPE_TEST_VAL_BASE_NAME, i);
+ snprintf(val_name, 15, "%s%zu", DATASET_ENUM_TYPE_TEST_VAL_BASE_NAME, i);
if (H5Tenum_insert(enum_non_native, val_name, &i) < 0)
TEST_ERROR;
}
- if ((fspace_id = generate_random_dataspace(DATASET_ENUM_TYPE_TEST_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ if ((fspace_id = generate_random_dataspace(DATASET_ENUM_TYPE_TEST_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
if ((dset_id_native = H5Dcreate2(group_id, DATASET_ENUM_TYPE_TEST_DSET_NAME1, enum_native, fspace_id,
@@ -1879,7 +1879,7 @@ test_create_dataset_array_types(void)
for (i = 0; i < DATASET_ARRAY_TYPE_TEST_RANK1; i++)
array_dims1[i] = (hsize_t)(rand() % MAX_DIM_SIZE + 1);
- if ((array_base_type_id1 = generate_random_datatype(H5T_ARRAY, FALSE)) < 0)
+ if ((array_base_type_id1 = generate_random_datatype(H5T_ARRAY, false)) < 0)
TEST_ERROR;
if ((array_type_id1 = H5Tarray_create2(array_base_type_id1, DATASET_ARRAY_TYPE_TEST_RANK1, array_dims1)) <
@@ -1892,7 +1892,7 @@ test_create_dataset_array_types(void)
for (i = 0; i < DATASET_ARRAY_TYPE_TEST_RANK2; i++)
array_dims2[i] = (hsize_t)(rand() % MAX_DIM_SIZE + 1);
- if ((array_base_type_id2 = generate_random_datatype(H5T_ARRAY, FALSE)) < 0)
+ if ((array_base_type_id2 = generate_random_datatype(H5T_ARRAY, false)) < 0)
TEST_ERROR;
if ((array_type_id2 = H5Tarray_create2(array_base_type_id2, DATASET_ARRAY_TYPE_TEST_RANK2, array_dims2)) <
@@ -1906,7 +1906,7 @@ test_create_dataset_array_types(void)
for (i = 0; i < DATASET_ARRAY_TYPE_TEST_RANK3; i++)
array_dims3[i] = (hsize_t)(rand() % MAX_DIM_SIZE + 1);
- if ((array_base_type_id3 = generate_random_datatype(H5T_ARRAY, FALSE)) < 0)
+ if ((array_base_type_id3 = generate_random_datatype(H5T_ARRAY, false)) < 0)
TEST_ERROR;
if ((nested_type_id = H5Tarray_create2(array_base_type_id3, DATASET_ARRAY_TYPE_TEST_RANK3, array_dims3)) <
@@ -1922,7 +1922,7 @@ test_create_dataset_array_types(void)
goto error;
}
- if ((fspace_id = generate_random_dataspace(DATASET_ARRAY_TYPE_TEST_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ if ((fspace_id = generate_random_dataspace(DATASET_ARRAY_TYPE_TEST_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
if ((dset_id1 = H5Dcreate2(group_id, DATASET_ARRAY_TYPE_TEST_DSET_NAME1, array_type_id1, fspace_id,
@@ -2076,19 +2076,19 @@ test_create_dataset_creation_properties(void)
}
if ((fspace_id =
- generate_random_dataspace(DATASET_CREATION_PROPERTIES_TEST_SHAPE_RANK, NULL, dims, FALSE)) < 0)
+ generate_random_dataspace(DATASET_CREATION_PROPERTIES_TEST_SHAPE_RANK, NULL, dims, false)) < 0)
TEST_ERROR;
if ((compact_fspace_id =
- generate_random_dataspace(DATASET_CREATION_PROPERTIES_TEST_SHAPE_RANK, NULL, NULL, TRUE)) < 0)
+ generate_random_dataspace(DATASET_CREATION_PROPERTIES_TEST_SHAPE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
/* Set chunk dims to be size of dataset - for filters test */
for (i = 0; i < DATASET_CREATION_PROPERTIES_TEST_SHAPE_RANK; i++)
chunk_dims[i] = dims[i];
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
- if ((compact_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((compact_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
PASSED();
@@ -2118,7 +2118,7 @@ test_create_dataset_creation_properties(void)
PART_ERROR(DCPL_alloc_time_test);
}
- HDsprintf(name, "%s%zu", DATASET_CREATION_PROPERTIES_TEST_ALLOC_TIMES_BASE_NAME, i);
+ sprintf(name, "%s%zu", DATASET_CREATION_PROPERTIES_TEST_ALLOC_TIMES_BASE_NAME, i);
if ((dset_id = H5Dcreate2(group_id, name, dset_dtype, fspace_id, H5P_DEFAULT, dcpl_id,
H5P_DEFAULT)) < 0) {
@@ -2194,7 +2194,7 @@ test_create_dataset_creation_properties(void)
PART_ERROR(DCPL_attr_crt_order_test);
}
- HDsprintf(name, "%s%zu", DATASET_CREATION_PROPERTIES_TEST_CRT_ORDER_BASE_NAME, i);
+ sprintf(name, "%s%zu", DATASET_CREATION_PROPERTIES_TEST_CRT_ORDER_BASE_NAME, i);
if ((dset_id = H5Dcreate2(group_id, name, dset_dtype, fspace_id, H5P_DEFAULT, dcpl_id,
H5P_DEFAULT)) < 0) {
@@ -2327,7 +2327,7 @@ test_create_dataset_creation_properties(void)
PART_ERROR(DCPL_fill_time_property_test);
}
- HDsprintf(name, "%s%zu", DATASET_CREATION_PROPERTIES_TEST_FILL_TIMES_BASE_NAME, i);
+ sprintf(name, "%s%zu", DATASET_CREATION_PROPERTIES_TEST_FILL_TIMES_BASE_NAME, i);
if ((dset_id = H5Dcreate2(group_id, name, dset_dtype, fspace_id, H5P_DEFAULT, dcpl_id,
H5P_DEFAULT)) < 0) {
@@ -2513,7 +2513,7 @@ test_create_dataset_creation_properties(void)
}
}
- HDsprintf(name, "%s%zu", DATASET_CREATION_PROPERTIES_TEST_LAYOUTS_BASE_NAME, i);
+ sprintf(name, "%s%zu", DATASET_CREATION_PROPERTIES_TEST_LAYOUTS_BASE_NAME, i);
if ((dset_id =
H5Dcreate2(group_id, name, (H5D_COMPACT == layouts[i]) ? compact_dtype : dset_dtype,
@@ -2872,11 +2872,11 @@ test_open_dataset_invalid_params(void)
goto error;
}
- if ((fspace_id = generate_random_dataspace(DATASET_OPEN_INVALID_PARAMS_SPACE_RANK, NULL, NULL, FALSE)) <
+ if ((fspace_id = generate_random_dataspace(DATASET_OPEN_INVALID_PARAMS_SPACE_RANK, NULL, NULL, false)) <
0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((dset_id = H5Dcreate2(group_id, DATASET_OPEN_INVALID_PARAMS_DSET_NAME, dset_dtype, fspace_id,
@@ -3108,10 +3108,10 @@ test_get_dataset_space_and_type(void)
}
if ((dset_space_id =
- generate_random_dataspace(DATASET_GET_SPACE_TYPE_TEST_SPACE_RANK, NULL, dset_dims, FALSE)) < 0)
+ generate_random_dataspace(DATASET_GET_SPACE_TYPE_TEST_SPACE_RANK, NULL, dset_dims, false)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((dset_id = H5Dcreate2(group_id, DATASET_GET_SPACE_TYPE_TEST_DSET_NAME, dset_dtype, dset_space_id,
@@ -3397,10 +3397,10 @@ test_get_dataset_space_and_type_invalid_params(void)
}
if ((dset_space_id = generate_random_dataspace(DATASET_GET_SPACE_TYPE_INVALID_PARAMS_TEST_SPACE_RANK,
- NULL, NULL, FALSE)) < 0)
+ NULL, NULL, false)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((dset_id = H5Dcreate2(group_id, DATASET_GET_SPACE_TYPE_INVALID_PARAMS_TEST_DSET_NAME, dset_dtype,
@@ -3586,19 +3586,19 @@ test_dataset_property_lists(void)
goto error;
}
- if ((space_id = generate_random_dataspace(DATASET_PROPERTY_LIST_TEST_SPACE_RANK, NULL, dims, FALSE)) < 0)
+ if ((space_id = generate_random_dataspace(DATASET_PROPERTY_LIST_TEST_SPACE_RANK, NULL, dims, false)) < 0)
TEST_ERROR;
for (i = 0; i < DATASET_PROPERTY_LIST_TEST_SPACE_RANK; i++)
chunk_dims[i] = (hsize_t)(rand() % (int)dims[i] + 1);
- if ((dset_dtype1 = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype1 = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
- if ((dset_dtype2 = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype2 = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
- if ((dset_dtype3 = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype3 = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
- if ((dset_dtype4 = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype4 = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((dcpl_id1 = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
@@ -3765,7 +3765,7 @@ test_dataset_property_lists(void)
PART_ERROR(H5Dget_access_plist);
}
- if (HDstrncmp(tmp_prefix, path_prefix, (size_t)buf_size + 1)) {
+ if (strncmp(tmp_prefix, path_prefix, (size_t)buf_size + 1)) {
H5_FAILED();
printf(" DAPL values were incorrect!\n");
PART_ERROR(H5Dget_access_plist);
@@ -3779,7 +3779,7 @@ test_dataset_property_lists(void)
PART_ERROR(H5Dget_access_plist);
}
- if (!HDstrncmp(tmp_prefix, path_prefix, (size_t)buf_size + 1)) {
+ if (!strncmp(tmp_prefix, path_prefix, (size_t)buf_size + 1)) {
H5_FAILED();
printf(" DAPL property value was set!\n");
PART_ERROR(H5Dget_access_plist);
@@ -4451,7 +4451,7 @@ test_dataset_io_point_selections(void)
int file_state[DATASET_IO_POINT_DIM_0][DATASET_IO_POINT_DIM_1];
int erbuf[DATASET_IO_POINT_DIM_0][DATASET_IO_POINT_DIM_1];
int buf_point[DATASET_IO_POINT_NPOINTS];
- hbool_t do_chunk;
+ bool do_chunk;
int i, j;
TESTING("point selection I/O with all selection in memory and points in file");
@@ -4492,7 +4492,7 @@ test_dataset_io_point_selections(void)
TEST_ERROR;
/* Perform with and without chunking */
- for (do_chunk = FALSE;; do_chunk = TRUE) {
+ for (do_chunk = false;; do_chunk = true) {
if (do_chunk) {
TESTING("point selection I/O with all selection in memory and points in file with chunking");
@@ -7146,10 +7146,10 @@ test_dataset_set_extent_chunked_unlimited(void)
}
if ((fspace_id = generate_random_dataspace(DATASET_SET_EXTENT_CHUNKED_UNLIMITED_TEST_SPACE_RANK, max_dims,
- dims, FALSE)) < 0)
+ dims, false)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
@@ -7385,7 +7385,7 @@ test_dataset_set_extent_chunked_fixed(void)
if ((fspace_id2 = H5Screate_simple(DATASET_SET_EXTENT_CHUNKED_FIXED_TEST_SPACE_RANK, dims2, NULL)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
@@ -7417,14 +7417,14 @@ test_dataset_set_extent_chunked_fixed(void)
}
for (i = 0; i < DATASET_SET_EXTENT_CHUNKED_FIXED_TEST_NUM_PASSES; i++) {
- hbool_t skip_iterations = FALSE;
- size_t j;
+ bool skip_iterations = false;
+ size_t j;
for (j = 0; j < DATASET_SET_EXTENT_CHUNKED_FIXED_TEST_SPACE_RANK; j++) {
/* Ensure that the new dimensionality is less than the old dimensionality. */
do {
if (dims[j] == 1) {
- skip_iterations = TRUE;
+ skip_iterations = true;
break;
}
else
@@ -7486,14 +7486,14 @@ test_dataset_set_extent_chunked_fixed(void)
* of the changes to the dataset's dimensionality.
*/
for (i = 0; i < DATASET_SET_EXTENT_CHUNKED_FIXED_TEST_NUM_PASSES; i++) {
- hbool_t skip_iterations = FALSE;
- size_t j;
+ bool skip_iterations = false;
+ size_t j;
for (j = 0; j < DATASET_SET_EXTENT_CHUNKED_FIXED_TEST_SPACE_RANK; j++) {
/* Ensure that the new dimensionality is less than the old dimensionality. */
do {
if (dims2[j] == 1) {
- skip_iterations = TRUE;
+ skip_iterations = true;
break;
}
else
@@ -8151,7 +8151,7 @@ test_dataset_set_extent_invalid_params(void)
}
if ((fspace_id = generate_random_dataspace(DATASET_SET_EXTENT_INVALID_PARAMS_TEST_SPACE_RANK, NULL, dims,
- FALSE)) < 0)
+ false)) < 0)
TEST_ERROR;
for (i = 0; i < DATASET_SET_EXTENT_INVALID_PARAMS_TEST_SPACE_RANK; i++) {
@@ -8163,7 +8163,7 @@ test_dataset_set_extent_invalid_params(void)
} while (chunk_dims[i] > dims[i]);
}
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
/* Create a compact dataset */
@@ -8458,9 +8458,9 @@ test_create_single_chunk_dataset(void)
goto error;
}
- if ((fspace_id = generate_random_dataspace(DATASET_SINGLE_CHUNK_TEST_SPACE_RANK, NULL, dims, FALSE)) < 0)
+ if ((fspace_id = generate_random_dataspace(DATASET_SINGLE_CHUNK_TEST_SPACE_RANK, NULL, dims, false)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
@@ -8640,7 +8640,7 @@ test_write_single_chunk_dataset(void)
}
if ((fspace_id = generate_random_dataspace(DATASET_SINGLE_CHUNK_WRITE_TEST_DSET_SPACE_RANK, NULL, dims,
- FALSE)) < 0)
+ false)) < 0)
TEST_ERROR;
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
@@ -8859,7 +8859,7 @@ test_create_multi_chunk_dataset(void)
if ((fspace_id = H5Screate_simple(DATASET_MULTI_CHUNK_TEST_SPACE_RANK, dims, NULL)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
@@ -10658,7 +10658,7 @@ test_read_partial_chunk_hyperslab_selection(void)
for (i = 0; i < FIXED_NCHUNKS; i++) {
hsize_t start[DATASET_PARTIAL_CHUNK_READ_HYPER_SEL_TEST_DSET_SPACE_RANK];
hsize_t count[DATASET_PARTIAL_CHUNK_READ_HYPER_SEL_TEST_DSET_SPACE_RANK];
- hbool_t on_partial_edge_chunk = FALSE;
+ bool on_partial_edge_chunk = false;
size_t n_chunks_per_dim = (dims[1] / chunk_dims[1]) + (((dims[1] % chunk_dims[1]) > 0) ? 1 : 0);
on_partial_edge_chunk =
@@ -10844,7 +10844,7 @@ test_get_vlen_buf_size(void)
hid_t dataset = H5I_INVALID_HID;
hid_t dspace_id = H5I_INVALID_HID;
hid_t dtype_id = H5I_INVALID_HID;
- hbool_t freed_wdata = FALSE;
+ bool freed_wdata = false;
hsize_t dims1[] = {DATASET_GET_VLEN_BUF_SIZE_DSET_SPACE_DIM};
hsize_t size; /* Number of bytes which will be used */
unsigned i, j;
@@ -10924,7 +10924,7 @@ test_get_vlen_buf_size(void)
if (H5Treclaim(dtype_id, dspace_id, H5P_DEFAULT, wdata) < 0)
TEST_ERROR;
- freed_wdata = TRUE;
+ freed_wdata = true;
if (H5Dclose(dataset) < 0)
TEST_ERROR;
diff --git a/test/API/H5_api_datatype_test.c b/test/API/H5_api_datatype_test.c
index 5d6aa26a4eb..43baf71c54c 100644
--- a/test/API/H5_api_datatype_test.c
+++ b/test/API/H5_api_datatype_test.c
@@ -114,7 +114,7 @@ test_create_committed_datatype(void)
goto error;
}
- if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((type_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype to commit\n");
goto error;
@@ -198,7 +198,7 @@ test_create_committed_datatype_invalid_params(void)
goto error;
}
- if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((type_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype to commit\n");
goto error;
@@ -416,7 +416,7 @@ test_create_anonymous_committed_datatype(void)
goto error;
}
- if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((type_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype\n");
goto error;
@@ -499,7 +499,7 @@ test_create_anonymous_committed_datatype_invalid_params(void)
goto error;
}
- if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((type_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype\n");
goto error;
@@ -801,7 +801,7 @@ test_create_committed_datatype_empty_types(void)
static int
test_recommit_committed_type(void)
{
- htri_t is_committed = FALSE;
+ htri_t is_committed = false;
herr_t err_ret;
hid_t file_id = H5I_INVALID_HID;
hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID;
@@ -942,7 +942,7 @@ test_open_committed_datatype(void)
goto error;
}
- if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((type_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype to commit\n");
goto error;
@@ -1034,7 +1034,7 @@ test_open_committed_datatype_invalid_params(void)
goto error;
}
- if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((type_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype to commit\n");
goto error;
@@ -1207,7 +1207,7 @@ test_reopen_committed_datatype_indirect(void)
goto error;
}
- if ((space_id = generate_random_dataspace(DATATYPE_REOPEN_TEST_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ if ((space_id = generate_random_dataspace(DATATYPE_REOPEN_TEST_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
PASSED();
@@ -1730,13 +1730,13 @@ test_datatype_property_lists(void)
goto error;
}
- if ((type_id1 = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((type_id1 = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype\n");
goto error;
}
- if ((type_id2 = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((type_id2 = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype\n");
goto error;
@@ -1945,7 +1945,7 @@ test_create_dataset_with_committed_type(void)
goto error;
}
- if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((type_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype\n");
goto error;
@@ -1992,7 +1992,7 @@ test_create_dataset_with_committed_type(void)
goto error;
}
- if ((fspace_id = generate_random_dataspace(DATATYPE_CREATE_TEST_DATASET_DIMS, NULL, NULL, FALSE)) < 0)
+ if ((fspace_id = generate_random_dataspace(DATATYPE_CREATE_TEST_DATASET_DIMS, NULL, NULL, false)) < 0)
TEST_ERROR;
if ((dset_id = H5Dcreate2(group_id, DATASET_CREATE_WITH_DATATYPE_TEST_DSET_NAME, type_id, fspace_id,
@@ -2089,7 +2089,7 @@ test_create_attribute_with_committed_type(void)
goto error;
}
- if ((type_id = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) {
+ if ((type_id = generate_random_datatype(H5T_NO_CLASS, true)) < 0) {
H5_FAILED();
printf(" couldn't create datatype\n");
goto error;
@@ -2112,7 +2112,7 @@ test_create_attribute_with_committed_type(void)
}
if ((space_id =
- generate_random_dataspace(ATTRIBUTE_CREATE_WITH_DATATYPE_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ generate_random_dataspace(ATTRIBUTE_CREATE_WITH_DATATYPE_TEST_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_CREATE_WITH_DATATYPE_TEST_ATTR_NAME, type_id, space_id,
@@ -2220,7 +2220,7 @@ test_delete_committed_type(void)
goto error;
}
- if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((type_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype\n");
goto error;
@@ -2557,7 +2557,7 @@ test_cant_commit_predefined(void)
static int
test_cant_modify_committed_type(void)
{
- htri_t is_committed = FALSE;
+ htri_t is_committed = false;
herr_t err_ret;
hid_t file_id = H5I_INVALID_HID;
hid_t container_group = H5I_INVALID_HID;
diff --git a/test/API/H5_api_file_test.c b/test/API/H5_api_file_test.c
index 5f3af25b408..804b3bd1c58 100644
--- a/test/API/H5_api_file_test.c
+++ b/test/API/H5_api_file_test.c
@@ -948,7 +948,7 @@ test_flush_file(void)
}
for (u = 0; u < 10; u++) {
- HDsprintf(dset_name, "Dataset %u", u);
+ sprintf(dset_name, "Dataset %u", u);
if ((dset_id = H5Dcreate2(file_id, dset_name, H5T_STD_U32LE, dspace_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
@@ -2211,7 +2211,7 @@ test_get_file_name(void)
PART_ERROR(H5Fget_name_file_id);
}
- if (HDstrncmp(file_name_buf, prefixed_filename, (size_t)file_name_buf_len)) {
+ if (strncmp(file_name_buf, prefixed_filename, (size_t)file_name_buf_len)) {
H5_FAILED();
printf(" file name '%s' didn't match expected name '%s'\n", file_name_buf,
prefixed_filename);
@@ -2242,7 +2242,7 @@ test_get_file_name(void)
PART_ERROR(H5Fget_name_grp_id);
}
- if (HDstrncmp(file_name_buf, prefixed_filename, (size_t)file_name_buf_len)) {
+ if (strncmp(file_name_buf, prefixed_filename, (size_t)file_name_buf_len)) {
H5_FAILED();
printf(" file name '%s' didn't match expected name '%s'\n", file_name_buf,
prefixed_filename);
@@ -2287,7 +2287,7 @@ test_get_file_name(void)
PART_ERROR(H5Fget_name_dset_id);
}
- if (HDstrncmp(file_name_buf, prefixed_filename, (size_t)file_name_buf_len)) {
+ if (strncmp(file_name_buf, prefixed_filename, (size_t)file_name_buf_len)) {
H5_FAILED();
printf(" file name '%s' didn't match expected name '%s'\n", file_name_buf,
prefixed_filename);
@@ -2340,7 +2340,7 @@ test_get_file_name(void)
PART_ERROR(H5Fget_name_attr_id);
}
- if (HDstrncmp(file_name_buf, prefixed_filename, (size_t)file_name_buf_len)) {
+ if (strncmp(file_name_buf, prefixed_filename, (size_t)file_name_buf_len)) {
H5_FAILED();
printf(" file name '%s' didn't match expected name '%s'\n", file_name_buf,
prefixed_filename);
@@ -2393,7 +2393,7 @@ test_get_file_name(void)
PART_ERROR(H5Fget_name_dtype_id);
}
- if (HDstrncmp(file_name_buf, prefixed_filename, (size_t)file_name_buf_len)) {
+ if (strncmp(file_name_buf, prefixed_filename, (size_t)file_name_buf_len)) {
H5_FAILED();
printf(" file name '%s' didn't match expected name '%s'\n", file_name_buf,
prefixed_filename);
diff --git a/test/API/H5_api_group_test.c b/test/API/H5_api_group_test.c
index 7b9565587b9..4132f64b797 100644
--- a/test/API/H5_api_group_test.c
+++ b/test/API/H5_api_group_test.c
@@ -408,7 +408,7 @@ test_create_intermediate_group(void)
/* Set up plist for creating intermediate groups */
if ((crt_intmd_lcpl_id = H5Pcreate(H5P_LINK_CREATE)) < 0)
TEST_ERROR;
- if (H5Pset_create_intermediate_group(crt_intmd_lcpl_id, TRUE) < 0)
+ if (H5Pset_create_intermediate_group(crt_intmd_lcpl_id, true) < 0)
TEST_ERROR;
/* Create an intermediate group using a relative path */
@@ -1437,8 +1437,7 @@ test_get_group_info(void)
/* Create multiple groups under the parent group */
for (i = 0; i < GROUP_GET_INFO_TEST_GROUP_NUMB; i++) {
/* Create the groups with a reverse-ordering naming scheme to test creation order */
- HDsnprintf(group_name, NAME_BUF_SIZE, "group %02u",
- (unsigned)(GROUP_GET_INFO_TEST_GROUP_NUMB - i - 1));
+ snprintf(group_name, NAME_BUF_SIZE, "group %02u", (unsigned)(GROUP_GET_INFO_TEST_GROUP_NUMB - i - 1));
if ((group_id = H5Gcreate2(parent_group_id, group_name, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -1495,10 +1494,10 @@ test_get_group_info(void)
PART_ERROR(H5Gget_info);
}
- /* Assume that mounted should be FALSE in this case */
- if (group_info.mounted != FALSE) {
+ /* Assume that mounted should be false in this case */
+ if (group_info.mounted != false) {
H5_FAILED();
- printf(" group info's 'mounted' field was TRUE when it should have been FALSE\n");
+ printf(" group info's 'mounted' field was true when it should have been false\n");
PART_ERROR(H5Gget_info);
}
@@ -1548,10 +1547,10 @@ test_get_group_info(void)
PART_ERROR(H5Gget_info_by_name);
}
- /* Assume that mounted should be FALSE in this case */
- if (group_info.mounted != FALSE) {
+ /* Assume that mounted should be false in this case */
+ if (group_info.mounted != false) {
H5_FAILED();
- printf(" group info's 'mounted' field was TRUE when it should have been FALSE\n");
+ printf(" group info's 'mounted' field was true when it should have been false\n");
PART_ERROR(H5Gget_info_by_name);
}
@@ -1604,10 +1603,10 @@ test_get_group_info(void)
PART_ERROR(H5Gget_info_by_idx_crt_order_increasing);
}
- /* Assume that mounted should be FALSE in this case */
- if (group_info.mounted != FALSE) {
+ /* Assume that mounted should be false in this case */
+ if (group_info.mounted != false) {
H5_FAILED();
- printf(" group info's 'mounted' field was TRUE when it should have been FALSE\n");
+ printf(" group info's 'mounted' field was true when it should have been false\n");
PART_ERROR(H5Gget_info_by_idx_crt_order_increasing);
}
}
@@ -1661,10 +1660,10 @@ test_get_group_info(void)
PART_ERROR(H5Gget_info_by_idx_crt_order_decreasing);
}
- /* Assume that mounted should be FALSE in this case */
- if (group_info.mounted != FALSE) {
+ /* Assume that mounted should be false in this case */
+ if (group_info.mounted != false) {
H5_FAILED();
- printf(" group info's 'mounted' field was TRUE when it should have been FALSE\n");
+ printf(" group info's 'mounted' field was true when it should have been false\n");
PART_ERROR(H5Gget_info_by_idx_crt_order_decreasing);
}
}
@@ -1712,10 +1711,10 @@ test_get_group_info(void)
PART_ERROR(H5Gget_info_by_idx_name_order_increasing);
}
- /* Assume that mounted should be FALSE in this case */
- if (group_info.mounted != FALSE) {
+ /* Assume that mounted should be false in this case */
+ if (group_info.mounted != false) {
H5_FAILED();
- printf(" group info's 'mounted' field was TRUE when it should have been FALSE\n");
+ printf(" group info's 'mounted' field was true when it should have been false\n");
PART_ERROR(H5Gget_info_by_idx_name_order_increasing);
}
}
@@ -1763,10 +1762,10 @@ test_get_group_info(void)
PART_ERROR(H5Gget_info_by_idx_name_order_decreasing);
}
- /* Assume that mounted should be FALSE in this case */
- if (group_info.mounted != FALSE) {
+ /* Assume that mounted should be false in this case */
+ if (group_info.mounted != false) {
H5_FAILED();
- printf(" group info's 'mounted' field was TRUE when it should have been FALSE\n");
+ printf(" group info's 'mounted' field was true when it should have been false\n");
PART_ERROR(H5Gget_info_by_idx_name_order_decreasing);
}
}
diff --git a/test/API/H5_api_link_test.c b/test/API/H5_api_link_test.c
index caeafa60eb3..b6ae512f226 100644
--- a/test/API/H5_api_link_test.c
+++ b/test/API/H5_api_link_test.c
@@ -512,7 +512,7 @@ test_create_hard_link_many(void)
goto error;
}
- if (HDstrcmp(objname, "/" LINK_TEST_GROUP_NAME "/" HARD_LINK_TEST_GROUP_MANY_NAME "/hard21")) {
+ if (strcmp(objname, "/" LINK_TEST_GROUP_NAME "/" HARD_LINK_TEST_GROUP_MANY_NAME "/hard21")) {
H5_FAILED();
printf(" wrong name of the object '%s'\n", objname);
goto error;
@@ -900,8 +900,7 @@ test_create_hard_link_invalid_params(void)
{
TESTING_2("H5Lcreate_hard across files");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -1710,7 +1709,7 @@ test_create_soft_link_many(void)
goto error;
}
- if (HDstrcmp(objname, "/" LINK_TEST_GROUP_NAME "/" SOFT_LINK_TEST_GROUP_MANY_NAME "/soft16")) {
+ if (strcmp(objname, "/" LINK_TEST_GROUP_NAME "/" SOFT_LINK_TEST_GROUP_MANY_NAME "/soft16")) {
H5_FAILED();
printf(" wrong name of the object '%s'\n", objname);
goto error;
@@ -2000,7 +1999,7 @@ test_create_external_link(void)
return 0;
}
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -2108,7 +2107,7 @@ test_create_external_link_dangling(void)
return 0;
}
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -2249,8 +2248,7 @@ test_create_external_link_multi(void)
{
TESTING_2("Create the first external file to be pointed to");
- HDsnprintf(ext_link_filename1, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename1, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((file_id = H5Fcreate(ext_link_filename1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -2310,8 +2308,8 @@ test_create_external_link_multi(void)
{
TESTING_2("Create the second external file to be pointed to");
- HDsnprintf(ext_link_filename2, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME2);
+ snprintf(ext_link_filename2, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
+ EXTERNAL_LINK_TEST_FILE_NAME2);
if ((file_id = H5Fcreate(ext_link_filename2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -2367,8 +2365,8 @@ test_create_external_link_multi(void)
{
TESTING_2("Create the third external file to be pointed to");
- HDsnprintf(ext_link_filename3, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME3);
+ snprintf(ext_link_filename3, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
+ EXTERNAL_LINK_TEST_FILE_NAME3);
if ((file_id = H5Fcreate(ext_link_filename3, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -2464,7 +2462,7 @@ test_create_external_link_multi(void)
PART_ERROR(H5Lcreate_external_final_file);
}
- if (HDstrcmp(objname, "/A/B/C")) {
+ if (strcmp(objname, "/A/B/C")) {
H5_FAILED();
printf(" wrong name of the object '%s'\n", objname);
PART_ERROR(H5Lcreate_external_final_file);
@@ -2534,7 +2532,7 @@ test_create_external_link_multi(void)
PART_ERROR(H5Lcreate_external_object_created);
}
- if (HDstrcmp(objname, "/A/B/C/new_group")) {
+ if (strcmp(objname, "/A/B/C/new_group")) {
H5_FAILED();
printf(" wrong name of the object '%s'\n", objname);
PART_ERROR(H5Lcreate_external_object_created);
@@ -2607,8 +2605,8 @@ test_create_external_link_ping_pong(void)
return 0;
}
- HDsnprintf(ext_link_filename1, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_PING_PONG_NAME1);
- HDsnprintf(ext_link_filename2, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_PING_PONG_NAME2);
+ snprintf(ext_link_filename1, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_PING_PONG_NAME1);
+ snprintf(ext_link_filename2, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_PING_PONG_NAME2);
BEGIN_MULTIPART
{
@@ -2737,7 +2735,7 @@ test_create_external_link_ping_pong(void)
PART_ERROR(H5Lcreate_external_verify);
}
- if (HDstrcmp(objname, "/final")) {
+ if (strcmp(objname, "/final")) {
H5_FAILED();
printf(" wrong name of the object '%s'\n", objname);
PART_ERROR(H5Lcreate_external_verify);
@@ -2797,7 +2795,7 @@ test_create_external_link_ping_pong(void)
PART_ERROR(H5Lcreate_external_verify_again);
}
- if (HDstrcmp(objname, "/final/new_group")) {
+ if (strcmp(objname, "/final/new_group")) {
H5_FAILED();
printf(" wrong name of the object '%s'\n", objname);
PART_ERROR(H5Lcreate_external_verify_again);
@@ -2862,8 +2860,8 @@ test_create_external_link_invalid_params(void)
TESTING_2("test setup");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_INVALID_PARAMS_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
+ EXTERNAL_LINK_INVALID_PARAMS_TEST_FILE_NAME);
if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -3168,7 +3166,7 @@ test_create_user_defined_link(void)
goto error;
}
- if ((udata_size = HDsnprintf(udata, UD_LINK_TEST_UDATA_MAX_SIZE, "udata")) < 0)
+ if ((udata_size = snprintf(udata, UD_LINK_TEST_UDATA_MAX_SIZE, "udata")) < 0)
TEST_ERROR;
if (H5Lcreate_ud(group_id, UD_LINK_TEST_LINK_NAME, H5L_TYPE_EXTERNAL, udata, (size_t)udata_size,
@@ -3260,7 +3258,7 @@ test_create_user_defined_link_invalid_params(void)
goto error;
}
- if ((udata_size = HDsnprintf(udata, UD_LINK_INVALID_PARAMS_TEST_UDATA_MAX_SIZE, "udata")) < 0)
+ if ((udata_size = snprintf(udata, UD_LINK_INVALID_PARAMS_TEST_UDATA_MAX_SIZE, "udata")) < 0)
TEST_ERROR;
PASSED();
@@ -3753,8 +3751,7 @@ test_delete_link(void)
{
TESTING_2("H5Ldelete on external link");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -5717,8 +5714,7 @@ test_delete_link(void)
}
/* Create file for external link to reference */
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -5999,8 +5995,7 @@ test_delete_link(void)
}
/* Create file for external link to reference */
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -6275,8 +6270,7 @@ test_delete_link(void)
TESTING_2("H5Ldelete_by_idx on external link by alphabetical order in increasing order");
/* Create file for external link to reference */
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -6551,8 +6545,7 @@ test_delete_link(void)
TESTING_2("H5Ldelete_by_idx on external link by alphabetical order in decreasing order");
/* Create file for external link to reference */
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -8127,7 +8120,7 @@ test_copy_link(void)
PART_ERROR(H5Lcopy_soft_check);
}
- if (HDstrncmp(orig_link_val, new_link_val, COPY_LINK_TEST_LINK_VAL_BUF_SIZE)) {
+ if (strncmp(orig_link_val, new_link_val, COPY_LINK_TEST_LINK_VAL_BUF_SIZE)) {
H5_FAILED();
printf(" copied soft link's value '%s' doesn't match original link's value '%s'\n",
new_link_val, orig_link_val);
@@ -8260,8 +8253,7 @@ test_copy_link(void)
{
TESTING_2("H5Lcopy on external link (copied link's properties not checked)");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -8369,8 +8361,7 @@ test_copy_link(void)
TESTING_2("H5Lcopy on external link (copied link's properties checked)");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -8542,7 +8533,7 @@ test_copy_link(void)
PART_ERROR(H5Lcopy_external_check);
}
- if (HDstrncmp(new_filename, orig_filename, strlen(orig_filename)) < 0) {
+ if (strncmp(new_filename, orig_filename, strlen(orig_filename)) < 0) {
H5_FAILED();
printf(" copied external link's filename '%s' doesn't match original external link's "
"filename '%s'\n",
@@ -8550,7 +8541,7 @@ test_copy_link(void)
PART_ERROR(H5Lcopy_external_check);
}
- if (HDstrncmp(new_objname, orig_objname, strlen(orig_objname)) < 0) {
+ if (strncmp(new_objname, orig_objname, strlen(orig_objname)) < 0) {
H5_FAILED();
printf(" copied external link's object name '%s' doesn't match original external link's "
"object name '%s'\n",
@@ -8573,8 +8564,7 @@ test_copy_link(void)
{
TESTING_2("H5Lcopy on external link using H5L_SAME_LOC");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -9091,8 +9081,7 @@ test_copy_link_invalid_params(void)
{
TESTING_2("H5Lcopy invalid across files");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -9186,7 +9175,7 @@ test_move_link(void)
TESTING_2("test setup");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -9857,7 +9846,7 @@ test_move_link(void)
PART_ERROR(H5Lmove_soft_check);
}
- if (HDstrncmp(orig_link_val, new_link_val, MOVE_LINK_TEST_LINK_VAL_BUF_SIZE)) {
+ if (strncmp(orig_link_val, new_link_val, MOVE_LINK_TEST_LINK_VAL_BUF_SIZE)) {
H5_FAILED();
printf(" moved soft link's value '%s' doesn't match original link's value '%s'\n",
new_link_val, orig_link_val);
@@ -10067,8 +10056,7 @@ test_move_link(void)
{
TESTING_2("H5Lmove on external link (moved link's properties not checked)");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -10176,8 +10164,7 @@ test_move_link(void)
TESTING_2("H5Lmove on external link (moved link's properties checked)");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -10349,7 +10336,7 @@ test_move_link(void)
PART_ERROR(H5Lmove_external_check);
}
- if (HDstrncmp(new_filename, orig_filename, strlen(orig_filename)) < 0) {
+ if (strncmp(new_filename, orig_filename, strlen(orig_filename)) < 0) {
H5_FAILED();
printf(" moved external link's filename '%s' doesn't match original external link's "
"filename '%s'\n",
@@ -10357,7 +10344,7 @@ test_move_link(void)
PART_ERROR(H5Lmove_external_check);
}
- if (HDstrncmp(new_objname, orig_objname, strlen(orig_objname)) < 0) {
+ if (strncmp(new_objname, orig_objname, strlen(orig_objname)) < 0) {
H5_FAILED();
printf(" moved external link's object name '%s' doesn't match original external link's "
"object name '%s'\n",
@@ -10380,8 +10367,7 @@ test_move_link(void)
{
TESTING_2("H5Lmove on external link using H5L_SAME_LOC");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -10519,8 +10505,7 @@ test_move_link(void)
{
TESTING_2("H5Lmove to rename external link without moving it");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -11404,8 +11389,7 @@ test_move_link_invalid_params(void)
{
TESTING_2("H5Lmove into another file");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -11613,7 +11597,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_soft);
}
- if (HDstrncmp(link_val_buf, link_target, link_val_size)) {
+ if (strncmp(link_val_buf, link_target, link_val_size)) {
H5_FAILED();
printf(" soft link value did not match\n");
PART_ERROR(H5Lget_val_soft);
@@ -11644,8 +11628,7 @@ test_get_link_val(void)
memset(&link_info, 0, sizeof(link_info));
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -11714,14 +11697,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_external);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_external);
}
- if (HDstrncmp(ext_link_val, ext_obj_name, strlen(ext_obj_name) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name, strlen(ext_obj_name) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name);
@@ -11873,7 +11856,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_increasing);
}
- if (HDstrncmp(link_val_buf, link_target_a, strlen(link_target_a) + 1)) {
+ if (strncmp(link_val_buf, link_target_a, strlen(link_target_a) + 1)) {
H5_FAILED();
printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 0, link_target_a);
@@ -11904,7 +11887,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_increasing);
}
- if (HDstrncmp(link_val_buf, link_target_b, strlen(link_target_b) + 1)) {
+ if (strncmp(link_val_buf, link_target_b, strlen(link_target_b) + 1)) {
H5_FAILED();
printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 1, link_target_b);
@@ -11935,7 +11918,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_increasing);
}
- if (HDstrncmp(link_val_buf, link_target_c, strlen(link_target_c) + 1)) {
+ if (strncmp(link_val_buf, link_target_c, strlen(link_target_c) + 1)) {
H5_FAILED();
printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 2, link_target_c);
@@ -12067,7 +12050,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_decreasing);
}
- if (HDstrncmp(link_val_buf, link_target_a, strlen(link_target_a) + 1)) {
+ if (strncmp(link_val_buf, link_target_a, strlen(link_target_a) + 1)) {
H5_FAILED();
printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 2, link_target_a);
@@ -12098,7 +12081,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_decreasing);
}
- if (HDstrncmp(link_val_buf, link_target_b, strlen(link_target_b) + 1)) {
+ if (strncmp(link_val_buf, link_target_b, strlen(link_target_b) + 1)) {
H5_FAILED();
printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 1, link_target_b);
@@ -12129,7 +12112,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_decreasing);
}
- if (HDstrncmp(link_val_buf, link_target_c, strlen(link_target_c) + 1)) {
+ if (strncmp(link_val_buf, link_target_c, strlen(link_target_c) + 1)) {
H5_FAILED();
printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 0, link_target_c);
@@ -12255,7 +12238,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_soft_name_order_increasing);
}
- if (HDstrncmp(link_val_buf, link_target_a, strlen(link_target_a) + 1)) {
+ if (strncmp(link_val_buf, link_target_a, strlen(link_target_a) + 1)) {
H5_FAILED();
printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 0, link_target_a);
@@ -12286,7 +12269,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_soft_name_order_increasing);
}
- if (HDstrncmp(link_val_buf, link_target_b, strlen(link_target_b) + 1)) {
+ if (strncmp(link_val_buf, link_target_b, strlen(link_target_b) + 1)) {
H5_FAILED();
printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 1, link_target_b);
@@ -12317,7 +12300,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_soft_name_order_increasing);
}
- if (HDstrncmp(link_val_buf, link_target_c, strlen(link_target_c) + 1)) {
+ if (strncmp(link_val_buf, link_target_c, strlen(link_target_c) + 1)) {
H5_FAILED();
printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 2, link_target_c);
@@ -12443,7 +12426,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
- if (HDstrncmp(link_val_buf, link_target_a, strlen(link_target_a) + 1)) {
+ if (strncmp(link_val_buf, link_target_a, strlen(link_target_a) + 1)) {
H5_FAILED();
printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 2, link_target_a);
@@ -12474,7 +12457,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
- if (HDstrncmp(link_val_buf, link_target_b, strlen(link_target_b) + 1)) {
+ if (strncmp(link_val_buf, link_target_b, strlen(link_target_b) + 1)) {
H5_FAILED();
printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 1, link_target_b);
@@ -12505,7 +12488,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
- if (HDstrncmp(link_val_buf, link_target_c, strlen(link_target_c) + 1)) {
+ if (strncmp(link_val_buf, link_target_c, strlen(link_target_c) + 1)) {
H5_FAILED();
printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 0, link_target_c);
@@ -12543,8 +12526,7 @@ test_get_link_val(void)
PART_EMPTY(H5Lget_val_by_idx_external_crt_order_increasing);
}
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -12656,14 +12638,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
- if (HDstrncmp(ext_link_val, ext_obj_name_a, strlen(ext_obj_name_a) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name_a, strlen(ext_obj_name_a) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name_a);
@@ -12701,14 +12683,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
- if (HDstrncmp(ext_link_val, ext_obj_name_b, strlen(ext_obj_name_b) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name_b, strlen(ext_obj_name_b) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name_b);
@@ -12746,14 +12728,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
- if (HDstrncmp(ext_link_val, ext_obj_name_c, strlen(ext_obj_name_c) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name_c, strlen(ext_obj_name_c) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name_c);
@@ -12793,8 +12775,7 @@ test_get_link_val(void)
PART_EMPTY(H5Lget_val_by_idx_external_crt_order_decreasing);
}
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -12906,14 +12887,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
- if (HDstrncmp(ext_link_val, ext_obj_name_a, strlen(ext_obj_name_a) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name_a, strlen(ext_obj_name_a) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name_a);
@@ -12951,14 +12932,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
- if (HDstrncmp(ext_link_val, ext_obj_name_b, strlen(ext_obj_name_b) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name_b, strlen(ext_obj_name_b) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name_b);
@@ -12996,14 +12977,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
- if (HDstrncmp(ext_link_val, ext_obj_name_c, strlen(ext_obj_name_c) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name_c, strlen(ext_obj_name_c) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name_c);
@@ -13037,8 +13018,7 @@ test_get_link_val(void)
TESTING_2("H5Lget_val_by_idx on external link by alphabetical order in increasing order");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -13150,14 +13130,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
- if (HDstrncmp(ext_link_val, ext_obj_name_a, strlen(ext_obj_name_a) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name_a, strlen(ext_obj_name_a) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name_a);
@@ -13195,14 +13175,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
- if (HDstrncmp(ext_link_val, ext_obj_name_b, strlen(ext_obj_name_b) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name_b, strlen(ext_obj_name_b) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name_b);
@@ -13240,14 +13220,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
- if (HDstrncmp(ext_link_val, ext_obj_name_c, strlen(ext_obj_name_c) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name_c, strlen(ext_obj_name_c) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name_c);
@@ -13281,8 +13261,7 @@ test_get_link_val(void)
TESTING_2("H5Lget_val_by_idx on external link by alphabetical order in decreasing order");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -13394,14 +13373,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
- if (HDstrncmp(ext_link_val, ext_obj_name_a, strlen(ext_obj_name_a) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name_a, strlen(ext_obj_name_a) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name_a);
@@ -13439,14 +13418,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
- if (HDstrncmp(ext_link_val, ext_obj_name_b, strlen(ext_obj_name_b) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name_b, strlen(ext_obj_name_b) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name_b);
@@ -13484,14 +13463,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
- if (HDstrncmp(ext_link_val, ext_obj_name_c, strlen(ext_obj_name_c) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name_c, strlen(ext_obj_name_c) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name_c);
@@ -14189,8 +14168,7 @@ test_get_link_info(void)
memset(&link_info, 0, sizeof(link_info));
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -15755,8 +15733,7 @@ test_get_link_info(void)
PART_EMPTY(H5Lget_info_by_idx_external_crt_order_increasing);
}
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -15959,8 +15936,7 @@ test_get_link_info(void)
PART_EMPTY(H5Lget_info_by_idx_external_crt_order_decreasing);
}
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -16157,8 +16133,7 @@ test_get_link_info(void)
{
TESTING_2("H5Lget_info_by_idx2 on external link by alphabetical order in increasing order");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -16361,8 +16336,7 @@ test_get_link_info(void)
{
TESTING_2("H5Lget_info_by_idx2 on external link by alphabetical order in decreasing order");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -17156,8 +17130,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME3,
- strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME3) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME3,
+ strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME3) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_HARD_LINK_NAME3);
@@ -17178,8 +17152,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME2,
- strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME2) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME2,
+ strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME2) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_HARD_LINK_NAME2);
@@ -17200,8 +17174,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME,
- strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME,
+ strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_HARD_LINK_NAME);
@@ -17324,8 +17298,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME,
- strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME,
+ strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_HARD_LINK_NAME);
@@ -17346,8 +17320,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME2,
- strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME2) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME2,
+ strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME2) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_HARD_LINK_NAME2);
@@ -17368,8 +17342,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME3,
- strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME3) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME3,
+ strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME3) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_HARD_LINK_NAME3);
@@ -17486,8 +17460,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_hard_name_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME,
- strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME,
+ strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_HARD_LINK_NAME);
@@ -17508,8 +17482,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_hard_name_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME2,
- strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME2) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME2,
+ strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME2) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_HARD_LINK_NAME2);
@@ -17530,8 +17504,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_hard_name_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME3,
- strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME3) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME3,
+ strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME3) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_HARD_LINK_NAME3);
@@ -17648,8 +17622,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_hard_name_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME3,
- strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME3) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME3,
+ strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME3) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_HARD_LINK_NAME3);
@@ -17670,8 +17644,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_hard_name_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME2,
- strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME2) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME2,
+ strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME2) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_HARD_LINK_NAME2);
@@ -17692,8 +17666,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_hard_name_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME,
- strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME,
+ strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_HARD_LINK_NAME);
@@ -17816,8 +17790,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME3,
- strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME3) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME3,
+ strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME3) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
@@ -17838,8 +17812,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME2,
- strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME2) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME2,
+ strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME2) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
@@ -17860,8 +17834,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME,
- strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME,
+ strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_SOFT_LINK_NAME);
@@ -17984,8 +17958,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME,
- strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME,
+ strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_SOFT_LINK_NAME);
@@ -18006,8 +17980,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME2,
- strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME2) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME2,
+ strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME2) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
@@ -18028,8 +18002,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME3,
- strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME3) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME3,
+ strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME3) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
@@ -18146,8 +18120,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_soft_name_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME,
- strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME,
+ strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_SOFT_LINK_NAME);
@@ -18168,8 +18142,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_soft_name_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME2,
- strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME2) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME2,
+ strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME2) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
@@ -18190,8 +18164,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_soft_name_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME3,
- strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME3) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME3,
+ strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME3) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
@@ -18308,8 +18282,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_soft_name_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME3,
- strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME3) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME3,
+ strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME3) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
@@ -18330,8 +18304,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_soft_name_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME2,
- strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME2) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME2,
+ strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME2) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
@@ -18352,8 +18326,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_soft_name_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME,
- strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME,
+ strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_SOFT_LINK_NAME);
@@ -18388,8 +18362,7 @@ test_get_link_name(void)
}
/* Create file for external link to reference */
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -18495,8 +18468,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_external_crt_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3,
- strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3,
+ strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
@@ -18517,8 +18490,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_external_crt_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2,
- strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2,
+ strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
@@ -18539,8 +18512,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_external_crt_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME,
- strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME,
+ strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
@@ -18577,8 +18550,7 @@ test_get_link_name(void)
}
/* Create file for external link to reference */
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -18684,8 +18656,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_external_crt_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME,
- strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME,
+ strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
@@ -18706,8 +18678,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_external_crt_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2,
- strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2,
+ strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
@@ -18728,8 +18700,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_external_crt_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3,
- strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3,
+ strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
@@ -18760,8 +18732,7 @@ test_get_link_name(void)
TESTING_2("H5Lget_name_by_idx on external link by alphabetical order in increasing order");
/* Create file for external link to reference */
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -18867,8 +18838,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_external_name_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME,
- strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME,
+ strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
@@ -18889,8 +18860,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_external_name_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2,
- strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2,
+ strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
@@ -18911,8 +18882,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_external_name_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3,
- strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3,
+ strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
@@ -18943,8 +18914,7 @@ test_get_link_name(void)
TESTING_2("H5Lget_name_by_idx on external link by alphabetical order in decreasing order");
/* Create file for external link to reference */
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -19050,8 +19020,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_external_name_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3,
- strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3,
+ strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
@@ -19072,8 +19042,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_external_name_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2,
- strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2,
+ strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
@@ -19094,8 +19064,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_external_name_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME,
- strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME,
+ strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
@@ -19554,19 +19524,19 @@ test_link_iterate_hard_links(void)
goto error;
}
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((dset_dspace =
- generate_random_dataspace(LINK_ITER_HARD_LINKS_TEST_DSET_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ generate_random_dataspace(LINK_ITER_HARD_LINKS_TEST_DSET_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
for (i = 0; i < LINK_ITER_HARD_LINKS_TEST_NUM_LINKS; i++) {
char dset_name[LINK_ITER_HARD_LINKS_TEST_BUF_SIZE];
/* Create the datasets with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(dset_name, LINK_ITER_HARD_LINKS_TEST_BUF_SIZE, LINK_ITER_HARD_LINKS_TEST_LINK_NAME "%d",
- (int)(LINK_ITER_HARD_LINKS_TEST_NUM_LINKS - i - 1));
+ snprintf(dset_name, LINK_ITER_HARD_LINKS_TEST_BUF_SIZE, LINK_ITER_HARD_LINKS_TEST_LINK_NAME "%d",
+ (int)(LINK_ITER_HARD_LINKS_TEST_NUM_LINKS - i - 1));
if ((dset_id = H5Dcreate2(group_id, dset_name, dset_dtype, dset_dspace, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
@@ -19929,11 +19899,11 @@ test_link_iterate_soft_links(void)
char link_target[LINK_ITER_SOFT_LINKS_TEST_BUF_SIZE];
/* Create the links with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(link_name, LINK_ITER_SOFT_LINKS_TEST_BUF_SIZE, LINK_ITER_SOFT_LINKS_TEST_LINK_NAME "%d",
- (int)(LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS - i - 1));
+ snprintf(link_name, LINK_ITER_SOFT_LINKS_TEST_BUF_SIZE, LINK_ITER_SOFT_LINKS_TEST_LINK_NAME "%d",
+ (int)(LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS - i - 1));
- HDsnprintf(link_target, LINK_ITER_SOFT_LINKS_TEST_BUF_SIZE, "target%d",
- (int)(LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS - i - 1));
+ snprintf(link_target, LINK_ITER_SOFT_LINKS_TEST_BUF_SIZE, "target%d",
+ (int)(LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS - i - 1));
if (H5Lcreate_soft(link_target, group_id, link_name, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
@@ -20245,7 +20215,7 @@ test_link_iterate_external_links(void)
TESTING_2("test setup");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -20293,8 +20263,8 @@ test_link_iterate_external_links(void)
char link_name[LINK_ITER_EXT_LINKS_TEST_BUF_SIZE];
/* Create the links with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(link_name, LINK_ITER_EXT_LINKS_TEST_BUF_SIZE, LINK_ITER_EXT_LINKS_TEST_LINK_NAME "%d",
- (int)(LINK_ITER_EXT_LINKS_TEST_NUM_LINKS - i - 1));
+ snprintf(link_name, LINK_ITER_EXT_LINKS_TEST_BUF_SIZE, LINK_ITER_EXT_LINKS_TEST_LINK_NAME "%d",
+ (int)(LINK_ITER_EXT_LINKS_TEST_NUM_LINKS - i - 1));
if (H5Lcreate_external(ext_link_filename, "/", group_id, link_name, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
@@ -20642,7 +20612,7 @@ test_link_iterate_mixed_links(void)
TESTING_2("test setup");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -20686,11 +20656,11 @@ test_link_iterate_mixed_links(void)
goto error;
}
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((dset_dspace =
- generate_random_dataspace(LINK_ITER_MIXED_LINKS_TEST_DSET_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ generate_random_dataspace(LINK_ITER_MIXED_LINKS_TEST_DSET_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
if ((dset_id = H5Dcreate2(group_id, LINK_ITER_MIXED_LINKS_TEST_HARD_LINK_NAME, dset_dtype, dset_dspace,
@@ -21128,7 +21098,7 @@ test_link_iterate_invalid_params(void)
TESTING_2("test setup");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -21158,11 +21128,11 @@ test_link_iterate_invalid_params(void)
goto error;
}
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((dset_dspace =
- generate_random_dataspace(LINK_ITER_INVALID_PARAMS_TEST_DSET_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ generate_random_dataspace(LINK_ITER_INVALID_PARAMS_TEST_DSET_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
if ((dset_id = H5Dcreate2(group_id, LINK_ITER_INVALID_PARAMS_TEST_HARD_LINK_NAME, dset_dtype, dset_dspace,
@@ -21810,11 +21780,11 @@ test_link_visit_hard_links_no_cycles(void)
goto error;
}
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((dset_dspace = generate_random_dataspace(LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_DSET_SPACE_RANK, NULL,
- NULL, FALSE)) < 0)
+ NULL, false)) < 0)
TEST_ERROR;
for (i = 0; i < LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS; i++) {
@@ -21822,9 +21792,9 @@ test_link_visit_hard_links_no_cycles(void)
char grp_name[LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE];
/* Create the groups with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(grp_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d",
- (int)(LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - i - 1));
+ snprintf(grp_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d",
+ (int)(LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - i - 1));
if ((subgroup_id = H5Gcreate2(group_id, grp_name, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -21836,9 +21806,9 @@ test_link_visit_hard_links_no_cycles(void)
char dset_name[LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE];
/* Create the datasets with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(dset_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
- (int)(LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
+ snprintf(dset_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
+ (int)(LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
if ((dset_id = H5Dcreate2(subgroup_id, dset_name, dset_dtype, dset_dspace, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
@@ -22213,9 +22183,9 @@ test_link_visit_soft_links_no_cycles(void)
char grp_name[LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE];
/* Create the groups with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(grp_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d",
- (int)(LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - i - 1));
+ snprintf(grp_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d",
+ (int)(LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - i - 1));
if ((subgroup_id = H5Gcreate2(group_id, grp_name, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -22228,12 +22198,12 @@ test_link_visit_soft_links_no_cycles(void)
char link_target[LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE];
/* Create the links with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(link_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
- (int)(LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
+ snprintf(link_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
+ (int)(LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
- HDsnprintf(link_target, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE, "target%d",
- (int)(LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
+ snprintf(link_target, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE, "target%d",
+ (int)(LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
if (H5Lcreate_soft(link_target, subgroup_id, link_name, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
@@ -22555,7 +22525,7 @@ test_link_visit_external_links_no_cycles(void)
TESTING_2("test setup");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -22605,9 +22575,9 @@ test_link_visit_external_links_no_cycles(void)
char grp_name[LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE];
/* Create the groups with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(grp_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d",
- (int)(LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - i - 1));
+ snprintf(grp_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d",
+ (int)(LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - i - 1));
if ((subgroup_id = H5Gcreate2(group_id, grp_name, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -22619,9 +22589,9 @@ test_link_visit_external_links_no_cycles(void)
char link_name[LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE];
/* Create the links with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(link_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
- (int)(LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
+ snprintf(link_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
+ (int)(LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
if (H5Lcreate_external(ext_link_filename, "/", subgroup_id, link_name, H5P_DEFAULT, H5P_DEFAULT) <
0) {
@@ -22983,7 +22953,7 @@ test_link_visit_mixed_links_no_cycles(void)
TESTING_2("test setup");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -23044,11 +23014,11 @@ test_link_visit_mixed_links_no_cycles(void)
goto error;
}
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((fspace_id = generate_random_dataspace(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_SPACE_RANK, NULL,
- NULL, FALSE)) < 0)
+ NULL, false)) < 0)
TEST_ERROR;
if ((dset_id = H5Dcreate2(subgroup1, LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME, dset_dtype,
@@ -23499,9 +23469,9 @@ test_link_visit_hard_links_cycles(void)
char grp_name[LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE];
/* Create the groups with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(grp_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_HARD_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d",
- (int)(LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_SUBGROUPS - i - 1));
+ snprintf(grp_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_HARD_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d",
+ (int)(LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_SUBGROUPS - i - 1));
if ((subgroup_id = H5Gcreate2(group_id, grp_name, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -23513,9 +23483,9 @@ test_link_visit_hard_links_cycles(void)
char link_name[LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE];
/* Create the links with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(link_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_HARD_LINKS_CYCLE_TEST_LINK_NAME "%d",
- (int)(LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
+ snprintf(link_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_HARD_LINKS_CYCLE_TEST_LINK_NAME "%d",
+ (int)(LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, link_name, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
@@ -23872,9 +23842,9 @@ test_link_visit_soft_links_cycles(void)
char grp_name[LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE];
/* Create the groups with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(grp_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d",
- (int)(LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_SUBGROUPS - i - 1));
+ snprintf(grp_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d",
+ (int)(LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_SUBGROUPS - i - 1));
if ((subgroup_id = H5Gcreate2(group_id, grp_name, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -23887,13 +23857,13 @@ test_link_visit_soft_links_cycles(void)
char link_target[2 * LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE];
/* Create the links with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(link_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_SOFT_LINKS_CYCLE_TEST_LINK_NAME "%d",
- (int)(LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
+ snprintf(link_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_SOFT_LINKS_CYCLE_TEST_LINK_NAME "%d",
+ (int)(LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
- HDsnprintf(link_target, 2 * LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
- "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_SOFT_LINKS_CYCLE_TEST_SUBGROUP_NAME "/%s",
- grp_name);
+ snprintf(link_target, 2 * LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
+ "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_SOFT_LINKS_CYCLE_TEST_SUBGROUP_NAME "/%s",
+ grp_name);
if (H5Lcreate_soft(link_target, subgroup_id, link_name, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
@@ -24252,9 +24222,9 @@ test_link_visit_external_links_cycles(void)
char grp_name[LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE];
/* Create the groups with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(grp_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_EXT_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d",
- (int)(LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_SUBGROUPS - i - 1));
+ snprintf(grp_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_EXT_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d",
+ (int)(LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_SUBGROUPS - i - 1));
if ((subgroup_id = H5Gcreate2(group_id, grp_name, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -24267,13 +24237,13 @@ test_link_visit_external_links_cycles(void)
char link_target_obj[2 * LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE];
/* Create the links with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(link_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_EXT_LINKS_CYCLE_TEST_LINK_NAME "%d",
- (int)(LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
+ snprintf(link_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_EXT_LINKS_CYCLE_TEST_LINK_NAME "%d",
+ (int)(LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
- HDsnprintf(link_target_obj, 2 * LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
- "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_EXT_LINKS_CYCLE_TEST_SUBGROUP_NAME "/%s",
- grp_name);
+ snprintf(link_target_obj, 2 * LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
+ "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_EXT_LINKS_CYCLE_TEST_SUBGROUP_NAME "/%s",
+ grp_name);
if (H5Lcreate_external(H5_api_test_filename, link_target_obj, subgroup_id, link_name, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
@@ -24623,7 +24593,7 @@ test_link_visit_mixed_links_cycles(void)
TESTING_2("test setup");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -25060,7 +25030,7 @@ test_link_visit_invalid_params(void)
TESTING_2("test setup");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -25104,11 +25074,11 @@ test_link_visit_invalid_params(void)
goto error;
}
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((fspace_id = generate_random_dataspace(LINK_VISIT_INVALID_PARAMS_TEST_DSET_SPACE_RANK, NULL, NULL,
- FALSE)) < 0)
+ false)) < 0)
TEST_ERROR;
if ((dset_id = H5Dcreate2(subgroup1, LINK_VISIT_INVALID_PARAMS_TEST_DSET_NAME, dset_dtype, fspace_id,
@@ -25761,18 +25731,18 @@ link_iter_hard_links_cb(hid_t group_id, const char *name, const H5L_info2_t *inf
*/
test_iteration = (counter_val / LINK_ITER_HARD_LINKS_TEST_NUM_LINKS);
if (test_iteration == 0 || test_iteration == 3) {
- HDsnprintf(expected_link_name, LINK_ITER_HARD_LINKS_TEST_BUF_SIZE,
- LINK_ITER_HARD_LINKS_TEST_LINK_NAME "%d",
- (int)(counter_val % LINK_ITER_HARD_LINKS_TEST_NUM_LINKS));
+ snprintf(expected_link_name, LINK_ITER_HARD_LINKS_TEST_BUF_SIZE,
+ LINK_ITER_HARD_LINKS_TEST_LINK_NAME "%d",
+ (int)(counter_val % LINK_ITER_HARD_LINKS_TEST_NUM_LINKS));
}
else {
- HDsnprintf(expected_link_name, LINK_ITER_HARD_LINKS_TEST_BUF_SIZE,
- LINK_ITER_HARD_LINKS_TEST_LINK_NAME "%d",
- (int)(LINK_ITER_HARD_LINKS_TEST_NUM_LINKS -
- (counter_val % LINK_ITER_HARD_LINKS_TEST_NUM_LINKS) - 1));
+ snprintf(expected_link_name, LINK_ITER_HARD_LINKS_TEST_BUF_SIZE,
+ LINK_ITER_HARD_LINKS_TEST_LINK_NAME "%d",
+ (int)(LINK_ITER_HARD_LINKS_TEST_NUM_LINKS -
+ (counter_val % LINK_ITER_HARD_LINKS_TEST_NUM_LINKS) - 1));
}
- if (HDstrncmp(name, expected_link_name, LINK_ITER_HARD_LINKS_TEST_BUF_SIZE)) {
+ if (strncmp(name, expected_link_name, LINK_ITER_HARD_LINKS_TEST_BUF_SIZE)) {
printf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
ret_val = H5_ITER_ERROR;
goto done;
@@ -25821,18 +25791,18 @@ link_iter_soft_links_cb(hid_t group_id, const char *name, const H5L_info2_t *inf
*/
test_iteration = (counter_val / LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS);
if (test_iteration == 0 || test_iteration == 3) {
- HDsnprintf(expected_link_name, LINK_ITER_SOFT_LINKS_TEST_BUF_SIZE,
- LINK_ITER_SOFT_LINKS_TEST_LINK_NAME "%d",
- (int)(counter_val % LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS));
+ snprintf(expected_link_name, LINK_ITER_SOFT_LINKS_TEST_BUF_SIZE,
+ LINK_ITER_SOFT_LINKS_TEST_LINK_NAME "%d",
+ (int)(counter_val % LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS));
}
else {
- HDsnprintf(expected_link_name, LINK_ITER_SOFT_LINKS_TEST_BUF_SIZE,
- LINK_ITER_SOFT_LINKS_TEST_LINK_NAME "%d",
- (int)(LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS -
- (counter_val % LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS) - 1));
+ snprintf(expected_link_name, LINK_ITER_SOFT_LINKS_TEST_BUF_SIZE,
+ LINK_ITER_SOFT_LINKS_TEST_LINK_NAME "%d",
+ (int)(LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS -
+ (counter_val % LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS) - 1));
}
- if (HDstrncmp(name, expected_link_name, LINK_ITER_SOFT_LINKS_TEST_BUF_SIZE)) {
+ if (strncmp(name, expected_link_name, LINK_ITER_SOFT_LINKS_TEST_BUF_SIZE)) {
printf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
ret_val = H5_ITER_ERROR;
goto done;
@@ -25888,18 +25858,18 @@ link_iter_external_links_cb(hid_t group_id, const char *name, const H5L_info2_t
*/
test_iteration = (counter_val / LINK_ITER_EXT_LINKS_TEST_NUM_LINKS);
if (test_iteration == 0 || test_iteration == 3) {
- HDsnprintf(expected_link_name, LINK_ITER_EXT_LINKS_TEST_BUF_SIZE,
- LINK_ITER_EXT_LINKS_TEST_LINK_NAME "%d",
- (int)(counter_val % LINK_ITER_EXT_LINKS_TEST_NUM_LINKS));
+ snprintf(expected_link_name, LINK_ITER_EXT_LINKS_TEST_BUF_SIZE,
+ LINK_ITER_EXT_LINKS_TEST_LINK_NAME "%d",
+ (int)(counter_val % LINK_ITER_EXT_LINKS_TEST_NUM_LINKS));
}
else {
- HDsnprintf(expected_link_name, LINK_ITER_EXT_LINKS_TEST_BUF_SIZE,
- LINK_ITER_EXT_LINKS_TEST_LINK_NAME "%d",
- (int)(LINK_ITER_EXT_LINKS_TEST_NUM_LINKS -
- (counter_val % LINK_ITER_EXT_LINKS_TEST_NUM_LINKS) - 1));
+ snprintf(expected_link_name, LINK_ITER_EXT_LINKS_TEST_BUF_SIZE,
+ LINK_ITER_EXT_LINKS_TEST_LINK_NAME "%d",
+ (int)(LINK_ITER_EXT_LINKS_TEST_NUM_LINKS -
+ (counter_val % LINK_ITER_EXT_LINKS_TEST_NUM_LINKS) - 1));
}
- if (HDstrncmp(name, expected_link_name, LINK_ITER_EXT_LINKS_TEST_BUF_SIZE)) {
+ if (strncmp(name, expected_link_name, LINK_ITER_EXT_LINKS_TEST_BUF_SIZE)) {
printf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
ret_val = H5_ITER_ERROR;
goto done;
@@ -25932,8 +25902,8 @@ link_iter_mixed_links_cb(hid_t group_id, const char *name, const H5L_info2_t *in
UNUSED(group_id);
- if (!HDstrncmp(name, LINK_ITER_MIXED_LINKS_TEST_HARD_LINK_NAME,
- strlen(LINK_ITER_MIXED_LINKS_TEST_HARD_LINK_NAME) + 1) &&
+ if (!strncmp(name, LINK_ITER_MIXED_LINKS_TEST_HARD_LINK_NAME,
+ strlen(LINK_ITER_MIXED_LINKS_TEST_HARD_LINK_NAME) + 1) &&
(counter_val == 1 || counter_val == 4 || counter_val == 6 || counter_val == 11)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
@@ -25942,8 +25912,8 @@ link_iter_mixed_links_cb(hid_t group_id, const char *name, const H5L_info2_t *in
goto done;
}
- else if (!HDstrncmp(name, LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME,
- strlen(LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME) + 1) &&
+ else if (!strncmp(name, LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME,
+ strlen(LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME) + 1) &&
(counter_val == 2 || counter_val == 3 || counter_val == 7 || counter_val == 10)) {
if (H5L_TYPE_SOFT != info->type) {
ret_val = -1;
@@ -25952,8 +25922,8 @@ link_iter_mixed_links_cb(hid_t group_id, const char *name, const H5L_info2_t *in
goto done;
}
- else if (!HDstrncmp(name, LINK_ITER_MIXED_LINKS_TEST_EXT_LINK_NAME,
- strlen(LINK_ITER_MIXED_LINKS_TEST_EXT_LINK_NAME) + 1) &&
+ else if (!strncmp(name, LINK_ITER_MIXED_LINKS_TEST_EXT_LINK_NAME,
+ strlen(LINK_ITER_MIXED_LINKS_TEST_EXT_LINK_NAME) + 1) &&
(counter_val == 0 || counter_val == 5 || counter_val == 8 || counter_val == 9)) {
if (H5L_TYPE_EXTERNAL != info->type) {
ret_val = -1;
@@ -26022,29 +25992,29 @@ link_iter_idx_saving_cb(hid_t group_id, const char *name, const H5L_info2_t *inf
UNUSED(group_id);
if (broken && !*broken &&
- !HDstrncmp(name, LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME,
- strlen(LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME) + 1)) {
+ !strncmp(name, LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME,
+ strlen(LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME) + 1)) {
return (*broken = 1);
}
- if (!HDstrncmp(name, LINK_ITER_MIXED_LINKS_TEST_HARD_LINK_NAME,
- strlen(LINK_ITER_MIXED_LINKS_TEST_HARD_LINK_NAME) + 1)) {
+ if (!strncmp(name, LINK_ITER_MIXED_LINKS_TEST_HARD_LINK_NAME,
+ strlen(LINK_ITER_MIXED_LINKS_TEST_HARD_LINK_NAME) + 1)) {
if (H5L_TYPE_HARD != info->type) {
H5_FAILED();
printf(" link type did not match\n");
goto error;
}
}
- else if (!HDstrncmp(name, LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME,
- strlen(LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME) + 1)) {
+ else if (!strncmp(name, LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME,
+ strlen(LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME) + 1)) {
if (H5L_TYPE_SOFT != info->type) {
H5_FAILED();
printf(" link type did not match\n");
goto error;
}
}
- else if (!HDstrncmp(name, LINK_ITER_MIXED_LINKS_TEST_EXT_LINK_NAME,
- strlen(LINK_ITER_MIXED_LINKS_TEST_EXT_LINK_NAME) + 1)) {
+ else if (!strncmp(name, LINK_ITER_MIXED_LINKS_TEST_EXT_LINK_NAME,
+ strlen(LINK_ITER_MIXED_LINKS_TEST_EXT_LINK_NAME) + 1)) {
if (H5L_TYPE_EXTERNAL != info->type) {
H5_FAILED();
printf(" link type did not match\n");
@@ -26071,7 +26041,7 @@ link_iter_idx_saving_cb(hid_t group_id, const char *name, const H5L_info2_t *inf
static herr_t
link_visit_hard_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data)
{
- hbool_t is_subgroup_link;
+ bool is_subgroup_link;
size_t *i = (size_t *)op_data;
size_t counter_val = *((size_t *)op_data);
size_t test_iteration;
@@ -26127,34 +26097,34 @@ link_visit_hard_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_i
if (test_iteration == 0 || test_iteration == 3) {
if (is_subgroup_link) {
- HDsnprintf(expected_link_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d", (int)subgroup_number);
+ snprintf(expected_link_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d", (int)subgroup_number);
}
else {
- HDsnprintf(expected_link_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME
- "%d"
- "/" LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
- (int)subgroup_number, (int)link_idx_val);
+ snprintf(expected_link_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME
+ "%d"
+ "/" LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
+ (int)subgroup_number, (int)link_idx_val);
}
}
else {
if (is_subgroup_link) {
- HDsnprintf(expected_link_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d",
- (int)(LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1));
+ snprintf(expected_link_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d",
+ (int)(LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1));
}
else {
- HDsnprintf(expected_link_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME
- "%d"
- "/" LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
- (int)(LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1),
- (int)(LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - link_idx_val - 1));
+ snprintf(expected_link_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME
+ "%d"
+ "/" LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
+ (int)(LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1),
+ (int)(LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - link_idx_val - 1));
}
}
- if (HDstrncmp(name, expected_link_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE)) {
+ if (strncmp(name, expected_link_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE)) {
printf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
ret_val = H5_ITER_ERROR;
goto done;
@@ -26174,7 +26144,7 @@ link_visit_hard_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_i
static herr_t
link_visit_soft_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data)
{
- hbool_t is_subgroup_link;
+ bool is_subgroup_link;
size_t *i = (size_t *)op_data;
size_t counter_val = *((size_t *)op_data);
size_t test_iteration;
@@ -26240,34 +26210,34 @@ link_visit_soft_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_i
if (test_iteration == 0 || test_iteration == 3) {
if (is_subgroup_link) {
- HDsnprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d", (int)subgroup_number);
+ snprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d", (int)subgroup_number);
}
else {
- HDsnprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME
- "%d"
- "/" LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
- (int)subgroup_number, (int)link_idx_val);
+ snprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME
+ "%d"
+ "/" LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
+ (int)subgroup_number, (int)link_idx_val);
}
}
else {
if (is_subgroup_link) {
- HDsnprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d",
- (int)(LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1));
+ snprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d",
+ (int)(LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1));
}
else {
- HDsnprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME
- "%d"
- "/" LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
- (int)(LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1),
- (int)(LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - link_idx_val - 1));
+ snprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME
+ "%d"
+ "/" LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
+ (int)(LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1),
+ (int)(LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - link_idx_val - 1));
}
}
- if (HDstrncmp(name, expected_link_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE)) {
+ if (strncmp(name, expected_link_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE)) {
printf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
ret_val = H5_ITER_ERROR;
goto done;
@@ -26288,7 +26258,7 @@ static herr_t
link_visit_external_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info,
void *op_data)
{
- hbool_t is_subgroup_link;
+ bool is_subgroup_link;
size_t *i = (size_t *)op_data;
size_t counter_val = *((size_t *)op_data);
size_t test_iteration;
@@ -26361,34 +26331,34 @@ link_visit_external_links_no_cycles_cb(hid_t group_id, const char *name, const H
if (test_iteration == 0 || test_iteration == 3) {
if (is_subgroup_link) {
- HDsnprintf(expected_link_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d", (int)subgroup_number);
+ snprintf(expected_link_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d", (int)subgroup_number);
}
else {
- HDsnprintf(expected_link_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME
- "%d"
- "/" LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
- (int)subgroup_number, (int)link_idx_val);
+ snprintf(expected_link_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME
+ "%d"
+ "/" LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
+ (int)subgroup_number, (int)link_idx_val);
}
}
else {
if (is_subgroup_link) {
- HDsnprintf(expected_link_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d",
- (int)(LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1));
+ snprintf(expected_link_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d",
+ (int)(LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1));
}
else {
- HDsnprintf(expected_link_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME
- "%d"
- "/" LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
- (int)(LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1),
- (int)(LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - link_idx_val - 1));
+ snprintf(expected_link_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME
+ "%d"
+ "/" LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
+ (int)(LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1),
+ (int)(LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - link_idx_val - 1));
}
}
- if (HDstrncmp(name, expected_link_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE)) {
+ if (strncmp(name, expected_link_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE)) {
printf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
ret_val = H5_ITER_ERROR;
goto done;
@@ -26422,12 +26392,12 @@ link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_
UNUSED(group_id);
UNUSED(op_data);
- if (!HDstrncmp(name,
- LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME1,
- strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME1) +
- 1) &&
+ if (!strncmp(name,
+ LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME1,
+ strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME1) +
+ 1) &&
(counter_val == 2 || counter_val == 14 || counter_val == 18 || counter_val == 30)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
@@ -26438,12 +26408,12 @@ link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_
goto done;
}
- else if (!HDstrncmp(name,
- LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME2,
- strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME2) +
- 1) &&
+ else if (!strncmp(name,
+ LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME2,
+ strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME2) +
+ 1) &&
(counter_val == 3 || counter_val == 13 || counter_val == 19 || counter_val == 29)) {
if (H5L_TYPE_SOFT != info->type) {
ret_val = -1;
@@ -26454,12 +26424,12 @@ link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_
goto done;
}
- else if (!HDstrncmp(name,
- LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME3,
- strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME3) +
- 1) &&
+ else if (!strncmp(name,
+ LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME3,
+ strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME3) +
+ 1) &&
(counter_val == 6 || counter_val == 10 || counter_val == 22 || counter_val == 26)) {
if (H5L_TYPE_EXTERNAL != info->type) {
ret_val = -1;
@@ -26470,12 +26440,12 @@ link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_
goto done;
}
- else if (!HDstrncmp(name,
- LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME4,
- strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME4) +
- 1) &&
+ else if (!strncmp(name,
+ LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME4,
+ strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME4) +
+ 1) &&
(counter_val == 7 || counter_val == 9 || counter_val == 23 || counter_val == 25)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
@@ -26486,12 +26456,12 @@ link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_
goto done;
}
- else if (!HDstrncmp(name,
- LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME,
- strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME) +
- 1) &&
+ else if (!strncmp(name,
+ LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME,
+ strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME) +
+ 1) &&
(counter_val == 1 || counter_val == 15 || counter_val == 17 || counter_val == 31)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
@@ -26502,12 +26472,12 @@ link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_
goto done;
}
- else if (!HDstrncmp(name,
- LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME2,
- strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME2) +
- 1) &&
+ else if (!strncmp(name,
+ LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME2,
+ strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME2) +
+ 1) &&
(counter_val == 5 || counter_val == 11 || counter_val == 21 || counter_val == 27)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
@@ -26518,8 +26488,8 @@ link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_
goto done;
}
- else if (!HDstrncmp(name, LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2,
- strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2) + 1) &&
+ else if (!strncmp(name, LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2,
+ strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2) + 1) &&
(counter_val == 0 || counter_val == 12 || counter_val == 16 || counter_val == 28)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
@@ -26529,8 +26499,8 @@ link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_
goto done;
}
- else if (!HDstrncmp(name, LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3,
- strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3) + 1) &&
+ else if (!strncmp(name, LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3,
+ strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3) + 1) &&
(counter_val == 4 || counter_val == 8 || counter_val == 20 || counter_val == 24)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
@@ -26559,7 +26529,7 @@ link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_
static herr_t
link_visit_hard_links_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data)
{
- hbool_t is_subgroup_link;
+ bool is_subgroup_link;
size_t *i = (size_t *)op_data;
size_t counter_val = *((size_t *)op_data);
size_t test_iteration;
@@ -26615,34 +26585,34 @@ link_visit_hard_links_cycles_cb(hid_t group_id, const char *name, const H5L_info
if (test_iteration == 0 || test_iteration == 3) {
if (is_subgroup_link) {
- HDsnprintf(expected_link_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_HARD_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d", (int)subgroup_number);
+ snprintf(expected_link_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_HARD_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d", (int)subgroup_number);
}
else {
- HDsnprintf(expected_link_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_HARD_LINKS_CYCLE_TEST_NESTED_GRP_NAME
- "%d"
- "/" LINK_VISIT_HARD_LINKS_CYCLE_TEST_LINK_NAME "%d",
- (int)subgroup_number, (int)link_idx_val);
+ snprintf(expected_link_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_HARD_LINKS_CYCLE_TEST_NESTED_GRP_NAME
+ "%d"
+ "/" LINK_VISIT_HARD_LINKS_CYCLE_TEST_LINK_NAME "%d",
+ (int)subgroup_number, (int)link_idx_val);
}
}
else {
if (is_subgroup_link) {
- HDsnprintf(expected_link_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_HARD_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d",
- (int)(LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1));
+ snprintf(expected_link_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_HARD_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d",
+ (int)(LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1));
}
else {
- HDsnprintf(expected_link_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_HARD_LINKS_CYCLE_TEST_NESTED_GRP_NAME
- "%d"
- "/" LINK_VISIT_HARD_LINKS_CYCLE_TEST_LINK_NAME "%d",
- (int)(LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1),
- (int)(LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_LINKS_PER_GROUP - link_idx_val - 1));
+ snprintf(expected_link_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_HARD_LINKS_CYCLE_TEST_NESTED_GRP_NAME
+ "%d"
+ "/" LINK_VISIT_HARD_LINKS_CYCLE_TEST_LINK_NAME "%d",
+ (int)(LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1),
+ (int)(LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_LINKS_PER_GROUP - link_idx_val - 1));
}
}
- if (HDstrncmp(name, expected_link_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE)) {
+ if (strncmp(name, expected_link_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE)) {
printf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
ret_val = H5_ITER_ERROR;
goto done;
@@ -26662,7 +26632,7 @@ link_visit_hard_links_cycles_cb(hid_t group_id, const char *name, const H5L_info
static herr_t
link_visit_soft_links_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data)
{
- hbool_t is_subgroup_link;
+ bool is_subgroup_link;
size_t *i = (size_t *)op_data;
size_t counter_val = *((size_t *)op_data);
size_t test_iteration;
@@ -26728,34 +26698,34 @@ link_visit_soft_links_cycles_cb(hid_t group_id, const char *name, const H5L_info
if (test_iteration == 0 || test_iteration == 3) {
if (is_subgroup_link) {
- HDsnprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d", (int)subgroup_number);
+ snprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d", (int)subgroup_number);
}
else {
- HDsnprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NESTED_GRP_NAME
- "%d"
- "/" LINK_VISIT_SOFT_LINKS_CYCLE_TEST_LINK_NAME "%d",
- (int)subgroup_number, (int)link_idx_val);
+ snprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NESTED_GRP_NAME
+ "%d"
+ "/" LINK_VISIT_SOFT_LINKS_CYCLE_TEST_LINK_NAME "%d",
+ (int)subgroup_number, (int)link_idx_val);
}
}
else {
if (is_subgroup_link) {
- HDsnprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d",
- (int)(LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1));
+ snprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d",
+ (int)(LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1));
}
else {
- HDsnprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NESTED_GRP_NAME
- "%d"
- "/" LINK_VISIT_SOFT_LINKS_CYCLE_TEST_LINK_NAME "%d",
- (int)(LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1),
- (int)(LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_LINKS_PER_GROUP - link_idx_val - 1));
+ snprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NESTED_GRP_NAME
+ "%d"
+ "/" LINK_VISIT_SOFT_LINKS_CYCLE_TEST_LINK_NAME "%d",
+ (int)(LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1),
+ (int)(LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_LINKS_PER_GROUP - link_idx_val - 1));
}
}
- if (HDstrncmp(name, expected_link_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE)) {
+ if (strncmp(name, expected_link_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE)) {
printf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
ret_val = H5_ITER_ERROR;
goto done;
@@ -26775,7 +26745,7 @@ link_visit_soft_links_cycles_cb(hid_t group_id, const char *name, const H5L_info
static herr_t
link_visit_external_links_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data)
{
- hbool_t is_subgroup_link;
+ bool is_subgroup_link;
size_t *i = (size_t *)op_data;
size_t counter_val = *((size_t *)op_data);
size_t test_iteration;
@@ -26848,34 +26818,34 @@ link_visit_external_links_cycles_cb(hid_t group_id, const char *name, const H5L_
if (test_iteration == 0 || test_iteration == 3) {
if (is_subgroup_link) {
- HDsnprintf(expected_link_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_EXT_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d", (int)subgroup_number);
+ snprintf(expected_link_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_EXT_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d", (int)subgroup_number);
}
else {
- HDsnprintf(expected_link_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_EXT_LINKS_CYCLE_TEST_NESTED_GRP_NAME
- "%d"
- "/" LINK_VISIT_EXT_LINKS_CYCLE_TEST_LINK_NAME "%d",
- (int)subgroup_number, (int)link_idx_val);
+ snprintf(expected_link_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_EXT_LINKS_CYCLE_TEST_NESTED_GRP_NAME
+ "%d"
+ "/" LINK_VISIT_EXT_LINKS_CYCLE_TEST_LINK_NAME "%d",
+ (int)subgroup_number, (int)link_idx_val);
}
}
else {
if (is_subgroup_link) {
- HDsnprintf(expected_link_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_EXT_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d",
- (int)(LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1));
+ snprintf(expected_link_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_EXT_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d",
+ (int)(LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1));
}
else {
- HDsnprintf(expected_link_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_EXT_LINKS_CYCLE_TEST_NESTED_GRP_NAME
- "%d"
- "/" LINK_VISIT_EXT_LINKS_CYCLE_TEST_LINK_NAME "%d",
- (int)(LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1),
- (int)(LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_LINKS_PER_GROUP - link_idx_val - 1));
+ snprintf(expected_link_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_EXT_LINKS_CYCLE_TEST_NESTED_GRP_NAME
+ "%d"
+ "/" LINK_VISIT_EXT_LINKS_CYCLE_TEST_LINK_NAME "%d",
+ (int)(LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1),
+ (int)(LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_LINKS_PER_GROUP - link_idx_val - 1));
}
}
- if (HDstrncmp(name, expected_link_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE)) {
+ if (strncmp(name, expected_link_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE)) {
printf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
ret_val = H5_ITER_ERROR;
goto done;
@@ -26909,12 +26879,12 @@ link_visit_mixed_links_cycles_cb(hid_t group_id, const char *name, const H5L_inf
UNUSED(group_id);
UNUSED(op_data);
- if (!HDstrncmp(name,
- LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2
- "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME1,
- strlen(LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2
- "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME1) +
- 1) &&
+ if (!strncmp(name,
+ LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2
+ "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME1,
+ strlen(LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2
+ "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME1) +
+ 1) &&
(counter_val == 1 || counter_val == 11 || counter_val == 13 || counter_val == 23)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
@@ -26925,12 +26895,12 @@ link_visit_mixed_links_cycles_cb(hid_t group_id, const char *name, const H5L_inf
goto done;
}
- else if (!HDstrncmp(name,
- LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2
- "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME2,
- strlen(LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2
- "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME2) +
- 1) &&
+ else if (!strncmp(name,
+ LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2
+ "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME2,
+ strlen(LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2
+ "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME2) +
+ 1) &&
(counter_val == 2 || counter_val == 10 || counter_val == 14 || counter_val == 22)) {
if (H5L_TYPE_SOFT != info->type) {
ret_val = -1;
@@ -26941,12 +26911,12 @@ link_visit_mixed_links_cycles_cb(hid_t group_id, const char *name, const H5L_inf
goto done;
}
- else if (!HDstrncmp(name,
- LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3
- "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME3,
- strlen(LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3
- "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME3) +
- 1) &&
+ else if (!strncmp(name,
+ LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3
+ "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME3,
+ strlen(LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3
+ "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME3) +
+ 1) &&
(counter_val == 4 || counter_val == 8 || counter_val == 16 || counter_val == 20)) {
if (H5L_TYPE_EXTERNAL != info->type) {
ret_val = -1;
@@ -26957,12 +26927,12 @@ link_visit_mixed_links_cycles_cb(hid_t group_id, const char *name, const H5L_inf
goto done;
}
- else if (!HDstrncmp(name,
- LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3
- "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME4,
- strlen(LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3
- "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME4) +
- 1) &&
+ else if (!strncmp(name,
+ LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3
+ "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME4,
+ strlen(LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3
+ "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME4) +
+ 1) &&
(counter_val == 5 || counter_val == 7 || counter_val == 17 || counter_val == 19)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
@@ -26973,8 +26943,8 @@ link_visit_mixed_links_cycles_cb(hid_t group_id, const char *name, const H5L_inf
goto done;
}
- else if (!HDstrncmp(name, LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2,
- strlen(LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2) + 1) &&
+ else if (!strncmp(name, LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2,
+ strlen(LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2) + 1) &&
(counter_val == 0 || counter_val == 9 || counter_val == 12 || counter_val == 21)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
@@ -26984,8 +26954,8 @@ link_visit_mixed_links_cycles_cb(hid_t group_id, const char *name, const H5L_inf
goto done;
}
- else if (!HDstrncmp(name, LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3,
- strlen(LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3) + 1) &&
+ else if (!strncmp(name, LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3,
+ strlen(LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3) + 1) &&
(counter_val == 3 || counter_val == 6 || counter_val == 15 || counter_val == 18)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
diff --git a/test/API/H5_api_misc_test.c b/test/API/H5_api_misc_test.c
index 2e538043e5f..bce618ba8d7 100644
--- a/test/API/H5_api_misc_test.c
+++ b/test/API/H5_api_misc_test.c
@@ -60,11 +60,11 @@ test_open_link_without_leading_slash(void)
goto error;
}
- if ((space_id = generate_random_dataspace(OPEN_LINK_WITHOUT_SLASH_DSET_SPACE_RANK, NULL, NULL, FALSE)) <
+ if ((space_id = generate_random_dataspace(OPEN_LINK_WITHOUT_SLASH_DSET_SPACE_RANK, NULL, NULL, false)) <
0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((dset_id = H5Dcreate2(container_group, OPEN_LINK_WITHOUT_SLASH_DSET_NAME, dset_dtype, space_id,
@@ -235,13 +235,13 @@ test_object_creation_by_absolute_path(void)
/* Try to create a dataset nested at the end of this group chain by using an absolute pathname */
if ((fspace_id = generate_random_dataspace(OBJECT_CREATE_BY_ABSOLUTE_PATH_TEST_DSET_SPACE_RANK,
- NULL, NULL, FALSE)) < 0) {
+ NULL, NULL, false)) < 0) {
H5_FAILED();
printf(" failed to generate dataspace\n");
PART_ERROR(H5Dcreate_using_absolute_path);
}
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" failed to generate datatype\n");
PART_ERROR(H5Dcreate_using_absolute_path);
@@ -284,7 +284,7 @@ test_object_creation_by_absolute_path(void)
TESTING_2("creation of committed datatype using absolute pathname");
/* Try to create a committed datatype in the same fashion as the preceding dataset */
- if ((dtype_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((dtype_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype\n");
PART_ERROR(H5Tcommit_using_absolute_path);
@@ -411,20 +411,20 @@ test_absolute_vs_relative_path(void)
}
if ((fspace_id = generate_random_dataspace(ABSOLUTE_VS_RELATIVE_PATH_TEST_DSET_SPACE_RANK, NULL, NULL,
- FALSE)) < 0)
+ false)) < 0)
TEST_ERROR;
- if ((dset_dtype1 = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype1 = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
- if ((dset_dtype2 = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype2 = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
- if ((dset_dtype3 = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype3 = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
- if ((dset_dtype4 = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype4 = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
- if ((dset_dtype5 = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype5 = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
- if ((dset_dtype6 = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype6 = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
PASSED();
@@ -944,19 +944,19 @@ test_symbols_in_compound_field_name(void)
}
for (i = 0, total_type_size = 0; i < COMPOUND_WITH_SYMBOLS_IN_MEMBER_NAMES_TEST_NUM_SUBTYPES; i++) {
- type_pool[i] = generate_random_datatype(H5T_NO_CLASS, FALSE);
+ type_pool[i] = generate_random_datatype(H5T_NO_CLASS, false);
total_type_size += H5Tget_size(type_pool[i]);
}
- HDsnprintf(member_names[0], 256, "{{{ member0");
- HDsnprintf(member_names[1], 256, "member1 }}}");
- HDsnprintf(member_names[2], 256, "{{{ member2 }}");
- HDsnprintf(member_names[3], 256, "{{ member3 }}}");
- HDsnprintf(member_names[4], 256, "\\\"member4");
- HDsnprintf(member_names[5], 256, "member5\\\"");
- HDsnprintf(member_names[6], 256, "mem\\\"ber6");
- HDsnprintf(member_names[7], 256, "{{ member7\\\" }");
- HDsnprintf(member_names[8], 256, "{{ member8\\\\");
+ snprintf(member_names[0], 256, "{{{ member0");
+ snprintf(member_names[1], 256, "member1 }}}");
+ snprintf(member_names[2], 256, "{{{ member2 }}");
+ snprintf(member_names[3], 256, "{{ member3 }}}");
+ snprintf(member_names[4], 256, "\\\"member4");
+ snprintf(member_names[5], 256, "member5\\\"");
+ snprintf(member_names[6], 256, "mem\\\"ber6");
+ snprintf(member_names[7], 256, "{{ member7\\\" }");
+ snprintf(member_names[8], 256, "{{ member8\\\\");
if ((compound_type = H5Tcreate(H5T_COMPOUND, total_type_size)) < 0) {
H5_FAILED();
@@ -978,7 +978,7 @@ test_symbols_in_compound_field_name(void)
TEST_ERROR;
if ((fspace_id = generate_random_dataspace(COMPOUND_WITH_SYMBOLS_IN_MEMBER_NAMES_TEST_DSET_RANK, NULL,
- NULL, FALSE)) < 0)
+ NULL, false)) < 0)
TEST_ERROR;
if ((dset_id = H5Dcreate2(group_id, COMPOUND_WITH_SYMBOLS_IN_MEMBER_NAMES_TEST_DSET_NAME, compound_type,
diff --git a/test/API/H5_api_object_test.c b/test/API/H5_api_object_test.c
index 992071ec49e..d861661774a 100644
--- a/test/API/H5_api_object_test.c
+++ b/test/API/H5_api_object_test.c
@@ -150,10 +150,10 @@ test_open_object(void)
goto error;
}
- if ((fspace_id = generate_random_dataspace(OBJECT_OPEN_TEST_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ if ((fspace_id = generate_random_dataspace(OBJECT_OPEN_TEST_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
PASSED();
@@ -242,7 +242,7 @@ test_open_object(void)
{
TESTING_2("H5Oopen on a committed datatype");
- if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((type_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype '%s'\n", OBJECT_OPEN_TEST_TYPE_NAME);
PART_ERROR(H5Oopen_dtype);
@@ -836,10 +836,10 @@ test_object_exists(void)
goto error;
}
- if ((fspace_id = generate_random_dataspace(OBJECT_EXISTS_TEST_DSET_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ if ((fspace_id = generate_random_dataspace(OBJECT_EXISTS_TEST_DSET_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
PASSED();
@@ -921,7 +921,7 @@ test_object_exists(void)
{
TESTING_2("H5Oexists_by_name on a committed datatype");
- if ((dtype_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((dtype_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype '%s'\n", OBJECT_EXISTS_TEST_TYPE_NAME);
PART_ERROR(H5Oexists_by_name_dtype);
@@ -1287,10 +1287,10 @@ test_link_object(void)
goto error;
}
- if ((fspace_id = generate_random_dataspace(OBJECT_LINK_TEST_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ if ((fspace_id = generate_random_dataspace(OBJECT_LINK_TEST_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
PASSED();
@@ -1645,10 +1645,10 @@ test_incr_decr_object_refcount(void)
goto error;
}
- if ((fspace_id = generate_random_dataspace(OBJECT_REF_COUNT_TEST_DSET_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ if ((fspace_id = generate_random_dataspace(OBJECT_REF_COUNT_TEST_DSET_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
PASSED();
@@ -2022,12 +2022,12 @@ test_object_copy_basic(void)
goto error;
}
- if ((space_id = generate_random_dataspace(OBJECT_COPY_BASIC_TEST_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ if ((space_id = generate_random_dataspace(OBJECT_COPY_BASIC_TEST_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
- if ((attr_space_id = generate_random_dataspace(OBJECT_COPY_BASIC_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ if ((attr_space_id = generate_random_dataspace(OBJECT_COPY_BASIC_TEST_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
/* Create the test group object, along with its nested members and the attributes attached to it. */
@@ -2117,7 +2117,7 @@ test_object_copy_basic(void)
}
/* Create the test committed datatype object, along with the attributes attached to it. */
- if ((dtype_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((dtype_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype\n");
goto error;
@@ -2592,9 +2592,9 @@ test_object_copy_already_existing(void)
}
if ((space_id =
- generate_random_dataspace(OBJECT_COPY_ALREADY_EXISTING_TEST_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ generate_random_dataspace(OBJECT_COPY_ALREADY_EXISTING_TEST_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
/* Create the test group object */
@@ -2614,7 +2614,7 @@ test_object_copy_already_existing(void)
}
/* Create the test committed datatype object */
- if ((dtype_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((dtype_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype\n");
goto error;
@@ -3024,13 +3024,13 @@ test_object_copy_no_attributes(void)
goto error;
}
- if ((space_id = generate_random_dataspace(OBJECT_COPY_NO_ATTRS_TEST_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ if ((space_id = generate_random_dataspace(OBJECT_COPY_NO_ATTRS_TEST_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
- if ((attr_space_id = generate_random_dataspace(OBJECT_COPY_NO_ATTRS_TEST_SPACE_RANK, NULL, NULL, TRUE)) <
+ if ((attr_space_id = generate_random_dataspace(OBJECT_COPY_NO_ATTRS_TEST_SPACE_RANK, NULL, NULL, true)) <
0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
/* Create the test group object, along with the attributes attached to it. */
@@ -3090,7 +3090,7 @@ test_object_copy_no_attributes(void)
}
/* Create the test committed datatype object, along with the attributes attached to it. */
- if ((dtype_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((dtype_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype\n");
goto error;
@@ -3532,7 +3532,7 @@ test_object_copy_by_soft_link(void)
goto error;
}
- if ((attr_space_id = generate_random_dataspace(OBJECT_COPY_SOFT_LINK_TEST_SPACE_RANK, NULL, NULL, TRUE)) <
+ if ((attr_space_id = generate_random_dataspace(OBJECT_COPY_SOFT_LINK_TEST_SPACE_RANK, NULL, NULL, true)) <
0)
TEST_ERROR;
@@ -4241,14 +4241,14 @@ test_object_copy_between_files(void)
goto error;
}
- if ((space_id = generate_random_dataspace(OBJECT_COPY_BETWEEN_FILES_TEST_SPACE_RANK, NULL, NULL, FALSE)) <
+ if ((space_id = generate_random_dataspace(OBJECT_COPY_BETWEEN_FILES_TEST_SPACE_RANK, NULL, NULL, false)) <
0)
TEST_ERROR;
if ((attr_space_id =
- generate_random_dataspace(OBJECT_COPY_BETWEEN_FILES_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ generate_random_dataspace(OBJECT_COPY_BETWEEN_FILES_TEST_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
/* Create the test group object, along with its nested members and the attributes attached to it. */
@@ -4338,7 +4338,7 @@ test_object_copy_between_files(void)
}
/* Create the test committed datatype object, along with the attributes attached to it. */
- if ((dtype_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((dtype_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype\n");
goto error;
@@ -5106,13 +5106,13 @@ test_object_visit(void)
goto error;
}
- if ((fspace_id = generate_random_dataspace(OBJECT_VISIT_TEST_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ if ((fspace_id = generate_random_dataspace(OBJECT_VISIT_TEST_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
- if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((type_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype '%s'\n", OBJECT_VISIT_TEST_TYPE_NAME);
goto error;
@@ -6420,10 +6420,10 @@ test_close_object(void)
goto error;
}
- if ((fspace_id = generate_random_dataspace(OBJECT_CLOSE_TEST_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ if ((fspace_id = generate_random_dataspace(OBJECT_CLOSE_TEST_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
PASSED();
@@ -6500,7 +6500,7 @@ test_close_object(void)
{
TESTING_2("H5Oclose on a committed datatype");
- if ((dtype_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((dtype_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype '%s'\n", OBJECT_CLOSE_TEST_TYPE_NAME);
PART_ERROR(H5Oclose_dtype);
@@ -6675,11 +6675,11 @@ test_close_invalid_objects(void)
goto error;
}
- if ((attr_space_id = generate_random_dataspace(OBJECT_CLOSE_INVALID_TEST_SPACE_RANK, NULL, NULL, TRUE)) <
+ if ((attr_space_id = generate_random_dataspace(OBJECT_CLOSE_INVALID_TEST_SPACE_RANK, NULL, NULL, true)) <
0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, OBJECT_CLOSE_INVALID_TEST_ATTRIBUTE_NAME, attr_dtype, attr_space_id,
@@ -6883,7 +6883,7 @@ object_copy_attribute_iter_callback(hid_t location_id, const char *attr_name, co
snprintf(expected_name, 256, "attr%d", (int)(*counter));
- if (HDstrncmp(attr_name, expected_name, 256)) {
+ if (strncmp(attr_name, expected_name, 256)) {
printf(" attribute name '%s' did not match expected name '%s'\n", attr_name, expected_name);
ret_value = H5_ITER_ERROR;
goto done;
@@ -7028,28 +7028,28 @@ object_visit_callback(hid_t o_id, const char *name, const H5O_info2_t *object_in
UNUSED(o_id);
- if (!HDstrncmp(name, ".", strlen(".") + 1) &&
+ if (!strncmp(name, ".", strlen(".") + 1) &&
(counter_val == 0 || counter_val == 4 || counter_val == 8 || counter_val == 12)) {
if (H5O_TYPE_GROUP == object_info->type)
goto done;
else
printf(" type for object '%s' was not H5O_TYPE_GROUP\n", name);
}
- else if (!HDstrncmp(name, OBJECT_VISIT_TEST_GROUP_NAME, strlen(OBJECT_VISIT_TEST_GROUP_NAME) + 1) &&
+ else if (!strncmp(name, OBJECT_VISIT_TEST_GROUP_NAME, strlen(OBJECT_VISIT_TEST_GROUP_NAME) + 1) &&
(counter_val == 2 || counter_val == 6 || counter_val == 9 || counter_val == 15)) {
if (H5O_TYPE_GROUP == object_info->type)
goto done;
else
printf(" type for object '%s' was not H5O_TYPE_GROUP\n", name);
}
- else if (!HDstrncmp(name, OBJECT_VISIT_TEST_DSET_NAME, strlen(OBJECT_VISIT_TEST_DSET_NAME) + 1) &&
+ else if (!strncmp(name, OBJECT_VISIT_TEST_DSET_NAME, strlen(OBJECT_VISIT_TEST_DSET_NAME) + 1) &&
(counter_val == 1 || counter_val == 7 || counter_val == 10 || counter_val == 14)) {
if (H5O_TYPE_DATASET == object_info->type)
goto done;
else
printf(" type for object '%s' was not H5O_TYPE_DATASET\n", name);
}
- else if (!HDstrncmp(name, OBJECT_VISIT_TEST_TYPE_NAME, strlen(OBJECT_VISIT_TEST_TYPE_NAME) + 1) &&
+ else if (!strncmp(name, OBJECT_VISIT_TEST_TYPE_NAME, strlen(OBJECT_VISIT_TEST_TYPE_NAME) + 1) &&
(counter_val == 3 || counter_val == 5 || counter_val == 11 || counter_val == 13)) {
if (H5O_TYPE_NAMED_DATATYPE == object_info->type)
goto done;
@@ -7078,7 +7078,7 @@ object_visit_dset_callback(hid_t o_id, const char *name, const H5O_info2_t *obje
UNUSED(o_id);
UNUSED(op_data);
- if (HDstrncmp(name, ".", strlen(".") + 1)) {
+ if (strncmp(name, ".", strlen(".") + 1)) {
printf(" object '%s' didn't match known names\n", name);
return -1;
}
@@ -7102,7 +7102,7 @@ object_visit_dtype_callback(hid_t o_id, const char *name, const H5O_info2_t *obj
UNUSED(o_id);
UNUSED(op_data);
- if (HDstrncmp(name, ".", strlen(".") + 1)) {
+ if (strncmp(name, ".", strlen(".") + 1)) {
printf(" object '%s' didn't match known names\n", name);
return -1;
}
@@ -7128,7 +7128,7 @@ object_visit_soft_link_callback(hid_t o_id, const char *name, const H5O_info2_t
UNUSED(o_id);
- if (!HDstrncmp(name, ".", strlen(".") + 1) && (counter_val <= 5)) {
+ if (!strncmp(name, ".", strlen(".") + 1) && (counter_val <= 5)) {
if (H5O_TYPE_GROUP == object_info->type)
goto done;
else
diff --git a/test/API/H5_api_test.c b/test/API/H5_api_test.c
index 36855063d2e..654eb4024ac 100644
--- a/test/API/H5_api_test.c
+++ b/test/API/H5_api_test.c
@@ -124,7 +124,7 @@ main(int argc, char **argv)
hid_t registered_con_id = H5I_INVALID_HID;
char *vol_connector_string_copy = NULL;
char *vol_connector_info = NULL;
- hbool_t err_occurred = FALSE;
+ bool err_occurred = false;
/* Simple argument checking, TODO can improve that later */
if (argc > 1) {
@@ -155,13 +155,12 @@ main(int argc, char **argv)
seed = (unsigned)HDtime(NULL);
srand(seed);
- if (NULL == (test_path_prefix = HDgetenv(HDF5_API_TEST_PATH_PREFIX)))
+ if (NULL == (test_path_prefix = getenv(HDF5_API_TEST_PATH_PREFIX)))
test_path_prefix = "";
- HDsnprintf(H5_api_test_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix,
- TEST_FILE_NAME);
+ snprintf(H5_api_test_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, TEST_FILE_NAME);
- if (NULL == (vol_connector_string = HDgetenv(HDF5_VOL_CONNECTOR))) {
+ if (NULL == (vol_connector_string = getenv(HDF5_VOL_CONNECTOR))) {
printf("No VOL connector selected; using native VOL connector\n");
vol_connector_name = "native";
vol_connector_info = NULL;
@@ -169,21 +168,21 @@ main(int argc, char **argv)
else {
char *token;
- if (NULL == (vol_connector_string_copy = HDstrdup(vol_connector_string))) {
+ if (NULL == (vol_connector_string_copy = strdup(vol_connector_string))) {
fprintf(stderr, "Unable to copy VOL connector string\n");
- err_occurred = TRUE;
+ err_occurred = true;
goto done;
}
- if (NULL == (token = HDstrtok(vol_connector_string_copy, " "))) {
+ if (NULL == (token = strtok(vol_connector_string_copy, " "))) {
fprintf(stderr, "Error while parsing VOL connector string\n");
- err_occurred = TRUE;
+ err_occurred = true;
goto done;
}
vol_connector_name = token;
- if (NULL != (token = HDstrtok(NULL, " "))) {
+ if (NULL != (token = strtok(NULL, " "))) {
vol_connector_info = token;
}
}
@@ -197,7 +196,7 @@ main(int argc, char **argv)
if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0) {
fprintf(stderr, "Unable to create FAPL\n");
- err_occurred = TRUE;
+ err_occurred = true;
goto done;
}
@@ -208,19 +207,19 @@ main(int argc, char **argv)
* Otherwise, HDF5 will default to running the tests
* with the native connector, which could be misleading.
*/
- if (0 != HDstrcmp(vol_connector_name, "native")) {
+ if (0 != strcmp(vol_connector_name, "native")) {
htri_t is_registered;
if ((is_registered = H5VLis_connector_registered_by_name(vol_connector_name)) < 0) {
fprintf(stderr, "Unable to determine if VOL connector is registered\n");
- err_occurred = TRUE;
+ err_occurred = true;
goto done;
}
if (!is_registered) {
fprintf(stderr, "Specified VOL connector '%s' wasn't correctly registered!\n",
vol_connector_name);
- err_occurred = TRUE;
+ err_occurred = true;
goto done;
}
else {
@@ -231,19 +230,19 @@ main(int argc, char **argv)
*/
if (H5Pget_vol_id(fapl_id, &default_con_id) < 0) {
fprintf(stderr, "Couldn't retrieve ID of VOL connector set on default FAPL\n");
- err_occurred = TRUE;
+ err_occurred = true;
goto done;
}
if ((registered_con_id = H5VLget_connector_id_by_name(vol_connector_name)) < 0) {
fprintf(stderr, "Couldn't retrieve ID of registered VOL connector\n");
- err_occurred = TRUE;
+ err_occurred = true;
goto done;
}
if (default_con_id != registered_con_id) {
fprintf(stderr, "VOL connector set on default FAPL didn't match specified VOL connector\n");
- err_occurred = TRUE;
+ err_occurred = true;
goto done;
}
}
@@ -255,7 +254,7 @@ main(int argc, char **argv)
vol_cap_flags_g = H5VL_CAP_FLAG_NONE;
if (H5Pget_vol_cap_flags(fapl_id, &vol_cap_flags_g) < 0) {
fprintf(stderr, "Unable to retrieve VOL connector capability flags\n");
- err_occurred = TRUE;
+ err_occurred = true;
goto done;
}
@@ -265,7 +264,7 @@ main(int argc, char **argv)
*/
if (create_test_container(H5_api_test_filename, vol_cap_flags_g) < 0) {
fprintf(stderr, "Unable to create testing container file '%s'\n", H5_api_test_filename);
- err_occurred = TRUE;
+ err_occurred = true;
goto done;
}
@@ -290,17 +289,17 @@ main(int argc, char **argv)
if (default_con_id >= 0 && H5VLclose(default_con_id) < 0) {
fprintf(stderr, "Unable to close VOL connector ID\n");
- err_occurred = TRUE;
+ err_occurred = true;
}
if (registered_con_id >= 0 && H5VLclose(registered_con_id) < 0) {
fprintf(stderr, "Unable to close VOL connector ID\n");
- err_occurred = TRUE;
+ err_occurred = true;
}
if (fapl_id >= 0 && H5Pclose(fapl_id) < 0) {
fprintf(stderr, "Unable to close FAPL\n");
- err_occurred = TRUE;
+ err_occurred = true;
}
H5close();
diff --git a/test/API/H5_api_test_util.c b/test/API/H5_api_test_util.c
index 916f2ca8309..d0194f7b602 100644
--- a/test/API/H5_api_test_util.c
+++ b/test/API/H5_api_test_util.c
@@ -76,15 +76,15 @@
#define COMPACT_SPACE_MAX_DIM_SIZE 4
#define COMPACT_SPACE_MAX_DIMS 3
-typedef hid_t (*generate_datatype_func)(H5T_class_t parent_class, hbool_t is_compact);
+typedef hid_t (*generate_datatype_func)(H5T_class_t parent_class, bool is_compact);
-static hid_t generate_random_datatype_integer(H5T_class_t parent_class, hbool_t is_compact);
-static hid_t generate_random_datatype_float(H5T_class_t parent_class, hbool_t is_compact);
-static hid_t generate_random_datatype_string(H5T_class_t parent_class, hbool_t is_compact);
-static hid_t generate_random_datatype_compound(H5T_class_t parent_class, hbool_t is_compact);
-static hid_t generate_random_datatype_reference(H5T_class_t parent_class, hbool_t is_compact);
-static hid_t generate_random_datatype_enum(H5T_class_t parent_class, hbool_t is_compact);
-static hid_t generate_random_datatype_array(H5T_class_t parent_class, hbool_t is_compact);
+static hid_t generate_random_datatype_integer(H5T_class_t parent_class, bool is_compact);
+static hid_t generate_random_datatype_float(H5T_class_t parent_class, bool is_compact);
+static hid_t generate_random_datatype_string(H5T_class_t parent_class, bool is_compact);
+static hid_t generate_random_datatype_compound(H5T_class_t parent_class, bool is_compact);
+static hid_t generate_random_datatype_reference(H5T_class_t parent_class, bool is_compact);
+static hid_t generate_random_datatype_enum(H5T_class_t parent_class, bool is_compact);
+static hid_t generate_random_datatype_array(H5T_class_t parent_class, bool is_compact);
/*
* Helper function to generate a random HDF5 datatype in order to thoroughly
@@ -93,7 +93,7 @@ static hid_t generate_random_datatype_array(H5T_class_t parent_class, hbool_t is
* called with H5T_NO_CLASS for the parent_class parameter.
*/
hid_t
-generate_random_datatype(H5T_class_t parent_class, hbool_t is_compact)
+generate_random_datatype(H5T_class_t parent_class, bool is_compact)
{
generate_datatype_func gen_func;
static int depth = 0;
@@ -211,7 +211,7 @@ generate_random_datatype(H5T_class_t parent_class, hbool_t is_compact)
}
static hid_t
-generate_random_datatype_integer(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t H5_ATTR_UNUSED is_compact)
+generate_random_datatype_integer(H5T_class_t H5_ATTR_UNUSED parent_class, bool H5_ATTR_UNUSED is_compact)
{
hid_t type_to_copy = H5I_INVALID_HID;
hid_t datatype = H5I_INVALID_HID;
@@ -288,7 +288,7 @@ generate_random_datatype_integer(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_
}
static hid_t
-generate_random_datatype_float(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t H5_ATTR_UNUSED is_compact)
+generate_random_datatype_float(H5T_class_t H5_ATTR_UNUSED parent_class, bool H5_ATTR_UNUSED is_compact)
{
hid_t type_to_copy = H5I_INVALID_HID;
hid_t datatype = H5I_INVALID_HID;
@@ -330,7 +330,7 @@ generate_random_datatype_float(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t
}
static hid_t
-generate_random_datatype_string(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t H5_ATTR_UNUSED is_compact)
+generate_random_datatype_string(H5T_class_t H5_ATTR_UNUSED parent_class, bool H5_ATTR_UNUSED is_compact)
{
hid_t datatype = H5I_INVALID_HID;
hid_t ret_value = H5I_INVALID_HID;
@@ -387,7 +387,7 @@ generate_random_datatype_string(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t
}
static hid_t
-generate_random_datatype_compound(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t is_compact)
+generate_random_datatype_compound(H5T_class_t H5_ATTR_UNUSED parent_class, bool is_compact)
{
size_t num_members = 0;
size_t next_offset = 0;
@@ -410,7 +410,7 @@ generate_random_datatype_compound(H5T_class_t H5_ATTR_UNUSED parent_class, hbool
size_t member_size;
char member_name[256];
- HDsnprintf(member_name, 256, "compound_member%zu", i);
+ snprintf(member_name, 256, "compound_member%zu", i);
if ((compound_members[i] = generate_random_datatype(H5T_COMPOUND, is_compact)) < 0) {
printf(" couldn't create compound datatype member %zu\n", i);
@@ -455,7 +455,7 @@ generate_random_datatype_compound(H5T_class_t H5_ATTR_UNUSED parent_class, hbool
}
static hid_t
-generate_random_datatype_reference(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t H5_ATTR_UNUSED is_compact)
+generate_random_datatype_reference(H5T_class_t H5_ATTR_UNUSED parent_class, bool H5_ATTR_UNUSED is_compact)
{
hid_t datatype = H5I_INVALID_HID;
hid_t ret_value = H5I_INVALID_HID;
@@ -490,7 +490,7 @@ generate_random_datatype_reference(H5T_class_t H5_ATTR_UNUSED parent_class, hboo
}
static hid_t
-generate_random_datatype_enum(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t H5_ATTR_UNUSED is_compact)
+generate_random_datatype_enum(H5T_class_t H5_ATTR_UNUSED parent_class, bool H5_ATTR_UNUSED is_compact)
{
size_t num_members = 0;
hid_t datatype = H5I_INVALID_HID;
@@ -510,20 +510,20 @@ generate_random_datatype_enum(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t H
}
for (size_t i = 0; i < num_members; i++) {
- hbool_t unique;
- char name[ENUM_TYPE_MAX_MEMBER_NAME_LENGTH];
- int enum_val;
+ bool unique;
+ char name[ENUM_TYPE_MAX_MEMBER_NAME_LENGTH];
+ int enum_val;
- HDsnprintf(name, ENUM_TYPE_MAX_MEMBER_NAME_LENGTH, "enum_val%zu", i);
+ snprintf(name, ENUM_TYPE_MAX_MEMBER_NAME_LENGTH, "enum_val%zu", i);
do {
enum_val = rand();
/* Check for uniqueness of enum member */
- unique = TRUE;
+ unique = true;
for (size_t j = 0; j < i; j++)
if (enum_val == enum_member_vals[j])
- unique = FALSE;
+ unique = false;
} while (!unique);
enum_member_vals[i] = enum_val;
@@ -548,7 +548,7 @@ generate_random_datatype_enum(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t H
}
static hid_t
-generate_random_datatype_array(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t is_compact)
+generate_random_datatype_array(H5T_class_t H5_ATTR_UNUSED parent_class, bool is_compact)
{
unsigned ndims = 0;
hsize_t *array_dims = NULL;
@@ -599,7 +599,7 @@ generate_random_datatype_array(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t
* test support for dataspaces.
*/
hid_t
-generate_random_dataspace(int rank, const hsize_t *max_dims, hsize_t *dims_out, hbool_t is_compact)
+generate_random_dataspace(int rank, const hsize_t *max_dims, hsize_t *dims_out, bool is_compact)
{
hsize_t dataspace_dims[H5S_MAX_RANK];
size_t i;
@@ -750,7 +750,7 @@ prefix_filename(const char *prefix, const char *filename, char **filename_out)
goto done;
}
- HDsnprintf(out_buf, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", prefix, filename);
+ snprintf(out_buf, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", prefix, filename);
*filename_out = out_buf;
diff --git a/test/API/H5_api_test_util.h b/test/API/H5_api_test_util.h
index 5d127bbf70d..4e416af1242 100644
--- a/test/API/H5_api_test_util.h
+++ b/test/API/H5_api_test_util.h
@@ -15,8 +15,8 @@
#include "hdf5.h"
-hid_t generate_random_datatype(H5T_class_t parent_class, hbool_t is_compact);
-hid_t generate_random_dataspace(int rank, const hsize_t *max_dims, hsize_t *dims_out, hbool_t is_compact);
+hid_t generate_random_datatype(H5T_class_t parent_class, bool is_compact);
+hid_t generate_random_dataspace(int rank, const hsize_t *max_dims, hsize_t *dims_out, bool is_compact);
int create_test_container(char *filename, uint64_t vol_cap_flags);
herr_t prefix_filename(const char *prefix, const char *filename, char **filename_out);
herr_t remove_test_file(const char *prefix, const char *filename);
diff --git a/test/API/driver/CMakeLists.txt b/test/API/driver/CMakeLists.txt
index 23ba0535b0f..5993a447978 100644
--- a/test/API/driver/CMakeLists.txt
+++ b/test/API/driver/CMakeLists.txt
@@ -2,9 +2,9 @@ cmake_minimum_required (VERSION 3.18)
project(H5_API_TEST_DRIVER CXX)
if (NOT KWSYS_USE_LOCALCONTENT)
- set (KWSYS_URL ${KWSYS_TGZ_ORIGPATH}/${KWSYS_TGZ_ORIGNAME})
+ set (KWSYS_URL ${KWSYS_TGZ_ORIGPATH}/${KWSYS_TGZ_NAME})
else ()
- set (KWSYS_URL ${TGZPATH}/${KWSYS_TGZ_ORIGNAME})
+ set (KWSYS_URL ${TGZPATH}/${KWSYS_TGZ_NAME})
endif ()
# Only tgz files
FetchContent_Declare (KWSYS
diff --git a/test/API/tarray.c b/test/API/tarray.c
index e05cab314e9..7ab21146f81 100644
--- a/test/API/tarray.c
+++ b/test/API/tarray.c
@@ -686,7 +686,7 @@ test_array_compound_atomic(void)
/* Check the 1st field's name */
mname = H5Tget_member_name(tid2, 0);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "i") != 0)
+ if (strcmp(mname, "i") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -705,7 +705,7 @@ test_array_compound_atomic(void)
/* Check the 2nd field's name */
mname = H5Tget_member_name(tid2, 1);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "f") != 0)
+ if (strcmp(mname, "f") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -908,7 +908,7 @@ test_array_compound_array(void)
/* Check the 1st field's name */
mname = H5Tget_member_name(tid2, 0);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "i") != 0)
+ if (strcmp(mname, "i") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -927,7 +927,7 @@ test_array_compound_array(void)
/* Check the 2nd field's name */
mname = H5Tget_member_name(tid2, 1);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "f") != 0)
+ if (strcmp(mname, "f") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -1664,9 +1664,9 @@ test_array_bkg(void)
for (i = 0; i < dtsinfo->nsubfields; i++)
dtsinfo->name[i] = (char *)calloc((size_t)20, sizeof(char));
- HDstrcpy(dtsinfo->name[0], "One");
- HDstrcpy(dtsinfo->name[1], "Two");
- HDstrcpy(dtsinfo->name[2], "Three");
+ strcpy(dtsinfo->name[0], "One");
+ strcpy(dtsinfo->name[1], "Two");
+ strcpy(dtsinfo->name[2], "Three");
/* Create file */
/* ----------- */
@@ -1919,7 +1919,7 @@ test_compat(void)
size_t off; /* Offset of compound field */
hid_t mtid; /* Datatype ID for field */
int i; /* Index variables */
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -1967,7 +1967,7 @@ test_compat(void)
/* Check the 1st field's name */
mname = H5Tget_member_name(tid1, 0);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "i") != 0)
+ if (strcmp(mname, "i") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -1986,7 +1986,7 @@ test_compat(void)
/* Check the 2nd field's name */
mname = H5Tget_member_name(tid1, 1);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "f") != 0)
+ if (strcmp(mname, "f") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -2005,7 +2005,7 @@ test_compat(void)
/* Check the 3rd field's name */
mname = H5Tget_member_name(tid1, 2);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "l") != 0)
+ if (strcmp(mname, "l") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -2048,7 +2048,7 @@ test_compat(void)
/* Check the 1st field's name */
mname = H5Tget_member_name(tid1, 0);
CHECK_PTR(mname, "H5Tget_member_name");
- if (mname && HDstrcmp(mname, "i") != 0)
+ if (mname && strcmp(mname, "i") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
if (mname)
H5free_memory(mname);
@@ -2068,7 +2068,7 @@ test_compat(void)
/* Check the 2nd field's name */
mname = H5Tget_member_name(tid1, 1);
CHECK_PTR(mname, "H5Tget_member_name");
- if (mname && HDstrcmp(mname, "f") != 0)
+ if (mname && strcmp(mname, "f") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
if (mname)
H5free_memory(mname);
@@ -2116,7 +2116,7 @@ test_compat(void)
/* Check the 3rd field's name */
mname = H5Tget_member_name(tid1, 2);
CHECK_PTR(mname, "H5Tget_member_name");
- if (mname && HDstrcmp(mname, "l") != 0)
+ if (mname && strcmp(mname, "l") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
if (mname)
H5free_memory(mname);
@@ -2164,7 +2164,7 @@ test_compat(void)
/* Check the 4th field's name */
mname = H5Tget_member_name(tid1, 3);
CHECK_PTR(mname, "H5Tget_member_name");
- if (mname && HDstrcmp(mname, "d") != 0)
+ if (mname && strcmp(mname, "d") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
if (mname)
H5free_memory(mname);
diff --git a/test/API/tattr.c b/test/API/tattr.c
index a1ff6c6b92c..c4ae9f90fa2 100644
--- a/test/API/tattr.c
+++ b/test/API/tattr.c
@@ -166,7 +166,7 @@ typedef struct {
int stop; /* # of iterations to stop after */
hsize_t curr; /* Current creation order value */
size_t max_visit; /* Size of "visited attribute" flag array */
- hbool_t *visited; /* Pointer to array of "visited attribute" flags */
+ bool *visited; /* Pointer to array of "visited attribute" flags */
} attr_iter_info_t;
static herr_t attr_op1(hid_t loc_id, const char *name, const H5A_info_t *ainfo, void *op_data);
@@ -314,8 +314,8 @@ test_attr_basic_write(hid_t fapl)
if (attr_name) {
ret = (herr_t)H5Aget_name(attr, (size_t)(attr_name_size + 1), attr_name);
CHECK(ret, FAIL, "H5Aget_name");
- ret = HDstrcmp(attr_name, ATTR_TMP_NAME);
- VERIFY(ret, 0, "HDstrcmp");
+ ret = strcmp(attr_name, ATTR_TMP_NAME);
+ VERIFY(ret, 0, "strcmp");
free(attr_name);
attr_name = NULL;
@@ -351,8 +351,8 @@ test_attr_basic_write(hid_t fapl)
if (attr_name) {
ret = (herr_t)H5Aget_name(attr2, (size_t)(attr_name_size + 1), attr_name);
CHECK(ret, FAIL, "H5Aget_name");
- ret = HDstrcmp(attr_name, ATTR1A_NAME);
- VERIFY(ret, 0, "HDstrcmp");
+ ret = strcmp(attr_name, ATTR1A_NAME);
+ VERIFY(ret, 0, "strcmp");
free(attr_name);
attr_name = NULL;
@@ -887,8 +887,8 @@ test_attr_compound_read(hid_t fapl)
VERIFY(fields, 3, "H5Tget_nmembers");
for (i = 0; i < fields; i++) {
fieldname = H5Tget_member_name(type, (unsigned)i);
- if (!(HDstrcmp(fieldname, ATTR4_FIELDNAME1) != 0 || HDstrcmp(fieldname, ATTR4_FIELDNAME2) != 0 ||
- HDstrcmp(fieldname, ATTR4_FIELDNAME3) != 0))
+ if (!(strcmp(fieldname, ATTR4_FIELDNAME1) != 0 || strcmp(fieldname, ATTR4_FIELDNAME2) != 0 ||
+ strcmp(fieldname, ATTR4_FIELDNAME3) != 0))
TestErrPrintf("invalid field name for field #%d: %s\n", i, fieldname);
H5free_memory(fieldname);
} /* end for */
@@ -947,8 +947,8 @@ test_attr_compound_read(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR4_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR4_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR4_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR4_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR4_NAME);
/* Close attribute datatype */
@@ -1330,16 +1330,16 @@ test_attr_mult_read(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR1_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR1_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR1_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR1_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR1_NAME);
/* Verify Name with too small of a buffer */
- name_len = H5Aget_name(attr, HDstrlen(ATTR1_NAME), attr_name);
- VERIFY(name_len, HDstrlen(ATTR1_NAME), "H5Aget_name");
- HDstrcpy(temp_name, ATTR1_NAME); /* make a copy of the name */
- temp_name[HDstrlen(ATTR1_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
- if (HDstrcmp(attr_name, temp_name) != 0)
+ name_len = H5Aget_name(attr, strlen(ATTR1_NAME), attr_name);
+ VERIFY(name_len, strlen(ATTR1_NAME), "H5Aget_name");
+ strcpy(temp_name, ATTR1_NAME); /* make a copy of the name */
+ temp_name[strlen(ATTR1_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
+ if (strcmp(attr_name, temp_name) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, temp_name);
/* Close attribute */
@@ -1388,16 +1388,16 @@ test_attr_mult_read(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR2_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR2_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR2_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR2_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR2_NAME);
/* Verify Name with too small of a buffer */
- name_len = H5Aget_name(attr, HDstrlen(ATTR2_NAME), attr_name);
- VERIFY(name_len, HDstrlen(ATTR2_NAME), "H5Aget_name");
- HDstrcpy(temp_name, ATTR2_NAME); /* make a copy of the name */
- temp_name[HDstrlen(ATTR2_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
- if (HDstrcmp(attr_name, temp_name) != 0)
+ name_len = H5Aget_name(attr, strlen(ATTR2_NAME), attr_name);
+ VERIFY(name_len, strlen(ATTR2_NAME), "H5Aget_name");
+ strcpy(temp_name, ATTR2_NAME); /* make a copy of the name */
+ temp_name[strlen(ATTR2_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
+ if (strcmp(attr_name, temp_name) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, temp_name);
/* Close attribute */
@@ -1450,16 +1450,16 @@ test_attr_mult_read(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR3_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR3_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR3_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR3_NAME);
/* Verify Name with too small of a buffer */
- name_len = H5Aget_name(attr, HDstrlen(ATTR3_NAME), attr_name);
- VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name");
- HDstrcpy(temp_name, ATTR3_NAME); /* make a copy of the name */
- temp_name[HDstrlen(ATTR3_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
- if (HDstrcmp(attr_name, temp_name) != 0)
+ name_len = H5Aget_name(attr, strlen(ATTR3_NAME), attr_name);
+ VERIFY(name_len, strlen(ATTR3_NAME), "H5Aget_name");
+ strcpy(temp_name, ATTR3_NAME); /* make a copy of the name */
+ temp_name[strlen(ATTR3_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
+ if (strcmp(attr_name, temp_name) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, temp_name);
/* Close attribute */
@@ -1488,19 +1488,19 @@ attr_op1(hid_t H5_ATTR_UNUSED loc_id, const char *name, const H5A_info_t H5_ATTR
switch (*count) {
case 0:
- if (HDstrcmp(name, ATTR1_NAME) != 0)
+ if (strcmp(name, ATTR1_NAME) != 0)
TestErrPrintf("attribute name different: name=%s, should be %s\n", name, ATTR1_NAME);
(*count)++;
break;
case 1:
- if (HDstrcmp(name, ATTR2_NAME) != 0)
+ if (strcmp(name, ATTR2_NAME) != 0)
TestErrPrintf("attribute name different: name=%s, should be %s\n", name, ATTR2_NAME);
(*count)++;
break;
case 2:
- if (HDstrcmp(name, ATTR3_NAME) != 0)
+ if (strcmp(name, ATTR3_NAME) != 0)
TestErrPrintf("attribute name different: name=%s, should be %s\n", name, ATTR3_NAME);
(*count)++;
break;
@@ -1647,8 +1647,8 @@ test_attr_delete(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR1_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR1_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR1_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR1_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR1_NAME);
/* Close attribute */
@@ -1662,8 +1662,8 @@ test_attr_delete(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR3_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR3_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR3_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR3_NAME);
/* Close attribute */
@@ -1686,8 +1686,8 @@ test_attr_delete(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR3_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR3_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR3_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR3_NAME);
/* Close attribute */
@@ -2159,7 +2159,7 @@ test_attr_dense_verify(hid_t loc_id, unsigned max_attr)
/* Re-open all the attributes by name and verify the data */
for (u = 0; u < max_attr; u++) {
/* Open attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Aopen(loc_id, attrname, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Aopen");
@@ -2184,10 +2184,10 @@ test_attr_dense_verify(hid_t loc_id, unsigned max_attr)
CHECK(attr, FAIL, "H5Aopen_by_idx");
/* Verify Name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, check_name);
- VERIFY(name_len, HDstrlen(attrname), "H5Aget_name");
- if (HDstrcmp(check_name, attrname) != 0)
+ VERIFY(name_len, strlen(attrname), "H5Aget_name");
+ if (strcmp(check_name, attrname) != 0)
TestErrPrintf("attribute name different: attrname = '%s', should be '%s'\n", check_name,
attrname);
@@ -2283,12 +2283,12 @@ test_attr_dense_create(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Add attributes, until just before converting to dense storage */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -2303,17 +2303,17 @@ test_attr_dense_create(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Add one more attribute, to push into "dense" storage */
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Write data into the attribute */
ret = H5Awrite(attr, H5T_NATIVE_UINT, &u);
@@ -2436,12 +2436,12 @@ test_attr_dense_open(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Add attributes, until just before converting to dense storage */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -2460,17 +2460,17 @@ test_attr_dense_open(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Add one more attribute, to push into "dense" storage */
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Write data into the attribute */
ret = H5Awrite(attr, H5T_NATIVE_UINT, &u);
@@ -2550,7 +2550,7 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
*/
fcpl = H5Pcopy(fcpl);
CHECK(fcpl, FAIL, "H5Pcopy");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, 1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, true, 1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
}
fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl, fapl);
@@ -2603,12 +2603,12 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Add attributes, until well into dense storage */
for (u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -2628,7 +2628,7 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Close dataspace */
ret = H5Sclose(sid);
@@ -2653,7 +2653,7 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
/* Delete attributes until the attributes revert to compact storage again */
for (u--; u >= min_dense; u--) {
/* Delete attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
@@ -2664,29 +2664,29 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Delete one more attribute, which should cause reversion to compact storage */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Verify attributes still left */
ret = test_attr_dense_verify(dataset, (u - 1));
CHECK(ret, FAIL, "test_attr_dense_verify");
/* Delete another attribute, to verify deletion in compact storage */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (u - 1));
+ snprintf(attrname, sizeof(attrname), "attr %02u", (u - 1));
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Verify attributes still left */
ret = test_attr_dense_verify(dataset, (u - 2));
@@ -2754,7 +2754,7 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
*/
fcpl = H5Pcopy(fcpl);
CHECK(fcpl, FAIL, "H5Pcopy");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, 1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, true, 1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
}
fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl, fapl);
@@ -2794,7 +2794,7 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Pget_attr_phase_change");
/* Using creation order or not */
- for (use_corder = FALSE; use_corder <= TRUE; use_corder++) {
+ for (use_corder = false; use_corder <= true; use_corder++) {
if (use_corder) {
ret = H5Pset_attr_creation_order(dcpl, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED);
@@ -2807,12 +2807,12 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Add attributes, until well into dense storage */
for (u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, H5I_INVALID_HID, "H5Acreate2");
@@ -2825,7 +2825,7 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
/* Rename attribute */
- HDsnprintf(new_attrname, sizeof(new_attrname), "new attr %02u", u);
+ snprintf(new_attrname, sizeof(new_attrname), "new attr %02u", u);
/* Rename attribute */
ret = H5Arename_by_name(fid, DSET1_NAME, attrname, new_attrname, H5P_DEFAULT);
@@ -2839,7 +2839,7 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Close Dataset */
ret = H5Dclose(dataset);
@@ -2878,7 +2878,7 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
unsigned value; /* Attribute value */
/* Open attribute */
- HDsnprintf(attrname, sizeof(attrname), "new attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "new attr %02u", u);
attr = H5Aopen(dataset, attrname, H5P_DEFAULT);
CHECK(attr, H5I_INVALID_HID, "H5Aopen");
@@ -2953,7 +2953,7 @@ test_attr_dense_unlink(hid_t fcpl, hid_t fapl)
*/
fcpl = H5Pcopy(fcpl);
CHECK(fcpl, FAIL, "H5Pcopy");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, 1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, true, 1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
}
fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl, fapl);
@@ -3000,12 +3000,12 @@ test_attr_dense_unlink(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Add attributes, until well into dense storage */
for (u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3025,7 +3025,7 @@ test_attr_dense_unlink(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Close dataspace */
ret = H5Sclose(sid);
@@ -3148,14 +3148,14 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Add first attribute, which should be immediately in dense storage */
/* Create attribute */
u = 0;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3169,14 +3169,14 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Add second attribute, to allow deletions to be checked easily */
/* Create attribute */
u = 1;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3190,7 +3190,7 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Delete second attribute, attributes should still be stored densely */
@@ -3201,20 +3201,20 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Delete first attribute, attributes should not be stored densely */
/* Delete attribute */
u = 0;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Close dataspace */
@@ -3316,12 +3316,12 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Add attributes, until just before converting to dense storage */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3336,7 +3336,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Add one more attribute, to push into "dense" storage */
/* Create dataspace for attribute */
@@ -3344,13 +3344,13 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
CHECK(sid2, FAIL, "H5Screate_simple");
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Open the attribute just created and get a second ID */
attr2 = H5Aopen(dataset, attrname, H5P_DEFAULT);
@@ -3385,7 +3385,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Open first attribute for the dataset */
attr = H5Aopen(dataset, attrname, H5P_DEFAULT);
@@ -3437,7 +3437,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Open first attribute for the dataset */
attr = H5Aopen(dataset, attrname, H5P_DEFAULT);
@@ -3500,7 +3500,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Open first attribute for the dataset */
attr = H5Aopen_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)4, H5P_DEFAULT, H5P_DEFAULT);
@@ -3554,7 +3554,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Open attribute of the dataset for the first time */
attr = H5Aopen_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)2, H5P_DEFAULT, H5P_DEFAULT);
@@ -3568,7 +3568,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Open attribute for the second time */
attr2 = H5Aopen_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)2, H5P_DEFAULT, H5P_DEFAULT);
@@ -3618,7 +3618,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Open attribute of the dataset for the first time */
attr = H5Aopen_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)3, H5P_DEFAULT, H5P_DEFAULT);
@@ -3627,7 +3627,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
/* Delete a few attributes until the storage switches to compact */
for (u = min_dense - 1; u <= max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
add_attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(add_attr, FAIL, "H5Acreate2");
@@ -3642,7 +3642,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Open attribute for the second time */
attr2 = H5Aopen_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)3, H5P_DEFAULT, H5P_DEFAULT);
@@ -3695,7 +3695,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
/* Add attributes, until just before converting to dense storage */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(gid1, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3714,7 +3714,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
#if 0
/* Check on group's attribute storage status */
is_dense = H5O__is_attr_dense_test(gid1);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Open the hard link just created */
gid2 = H5Gopen2(fid, GROUP2_NAME, H5P_DEFAULT);
@@ -3858,16 +3858,16 @@ test_attr_big(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Add first "small" attribute, which should be in compact storage */
/* Create attribute */
u = 0;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3877,16 +3877,16 @@ test_attr_big(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Add second "small" attribute, which should stay in compact storage */
/* Create attribute */
u = 1;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3896,16 +3896,16 @@ test_attr_big(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Add first "big" attribute, which should push storage into dense form */
/* Create attribute */
u = 2;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, big_sid, H5P_DEFAULT, H5P_DEFAULT);
if (low == H5F_LIBVER_LATEST || attr >= 0) {
CHECK(attr, FAIL, "H5Acreate2");
@@ -3921,16 +3921,16 @@ test_attr_big(hid_t fcpl, hid_t fapl)
*/
#if 0
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, (nshared_indices ? FALSE : TRUE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (nshared_indices ? false : true), "H5O__is_attr_dense_test");
#endif
/* Add second "big" attribute, which should leave storage in dense form */
/* Create attribute */
u = 3;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, big_sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3945,67 +3945,67 @@ test_attr_big(hid_t fcpl, hid_t fapl)
*/
#if 0
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, (nshared_indices ? FALSE : TRUE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (nshared_indices ? false : true), "H5O__is_attr_dense_test");
#endif
/* Delete second "small" attribute, attributes should still be stored densely */
/* Delete attribute */
u = 1;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
#if 0
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, (nshared_indices ? FALSE : TRUE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (nshared_indices ? false : true), "H5O__is_attr_dense_test");
#endif
/* Delete second "big" attribute, attributes should still be stored densely */
/* Delete attribute */
u = 3;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
#if 0
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, (nshared_indices ? FALSE : TRUE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (nshared_indices ? false : true), "H5O__is_attr_dense_test");
#endif
/* Delete first "big" attribute, attributes should _not_ be stored densely */
/* Delete attribute */
u = 2;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
#if 0
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Delete first "small" attribute, should be no attributes now */
/* Delete attribute */
u = 0;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
#if 0
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
#endif
} /* end if */
#if 0
@@ -4019,9 +4019,9 @@ test_attr_big(hid_t fcpl, hid_t fapl)
* form - QAK)
*/
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
} /* end else */
#endif
@@ -4114,7 +4114,7 @@ test_attr_null_space(hid_t fcpl, hid_t fapl)
/* Add attribute with 'null' dataspace */
/* Create attribute */
- HDstrcpy(attrname, "null attr");
+ strcpy(attrname, "null attr");
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, null_sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -4132,7 +4132,7 @@ test_attr_null_space(hid_t fcpl, hid_t fapl)
/* Compare the dataspaces */
cmp = H5Sextent_equal(attr_sid, null_sid);
CHECK(cmp, FAIL, "H5Sextent_equal");
- VERIFY(cmp, TRUE, "H5Sextent_equal");
+ VERIFY(cmp, true, "H5Sextent_equal");
/* Close dataspace */
ret = H5Sclose(attr_sid);
@@ -4155,7 +4155,7 @@ test_attr_null_space(hid_t fcpl, hid_t fapl)
/* Add another attribute with 'null' dataspace */
/* Create attribute */
- HDstrcpy(attrname, "null attr #2");
+ strcpy(attrname, "null attr #2");
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, null_sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -4189,7 +4189,7 @@ test_attr_null_space(hid_t fcpl, hid_t fapl)
CHECK(dataset, FAIL, "H5Dopen2");
/* Open first attribute */
- HDstrcpy(attrname, "null attr #2");
+ strcpy(attrname, "null attr #2");
attr = H5Aopen(dataset, attrname, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Aopen");
@@ -4207,7 +4207,7 @@ test_attr_null_space(hid_t fcpl, hid_t fapl)
/* Compare the dataspaces */
cmp = H5Sextent_equal(attr_sid, null_sid);
CHECK(cmp, FAIL, "H5Sextent_equal");
- VERIFY(cmp, TRUE, "H5Sextent_equal");
+ VERIFY(cmp, true, "H5Sextent_equal");
/* Close dataspace */
ret = H5Sclose(attr_sid);
@@ -4229,7 +4229,7 @@ test_attr_null_space(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
/* Open second attribute */
- HDstrcpy(attrname, "null attr");
+ strcpy(attrname, "null attr");
attr = H5Aopen(dataset, attrname, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Aopen");
@@ -4387,7 +4387,7 @@ test_attr_deprec(hid_t fcpl, hid_t fapl)
**
****************************************************************/
static void
-test_attr_many(hbool_t new_format, hid_t fcpl, hid_t fapl)
+test_attr_many(bool new_format, hid_t fcpl, hid_t fapl)
{
hid_t fid; /* HDF5 File ID */
hid_t gid; /* Group ID */
@@ -4416,22 +4416,22 @@ test_attr_many(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create many attributes */
for (u = 0; u < nattr; u++) {
- HDsnprintf(attrname, sizeof(attrname), "a-%06u", u);
+ snprintf(attrname, sizeof(attrname), "a-%06u", u);
exists = H5Aexists(gid, attrname);
- VERIFY(exists, FALSE, "H5Aexists");
+ VERIFY(exists, false, "H5Aexists");
exists = H5Aexists_by_name(fid, GROUP1_NAME, attrname, H5P_DEFAULT);
- VERIFY(exists, FALSE, "H5Aexists_by_name");
+ VERIFY(exists, false, "H5Aexists_by_name");
aid = H5Acreate2(gid, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
exists = H5Aexists(gid, attrname);
- VERIFY(exists, TRUE, "H5Aexists");
+ VERIFY(exists, true, "H5Aexists");
exists = H5Aexists_by_name(fid, GROUP1_NAME, attrname, H5P_DEFAULT);
- VERIFY(exists, TRUE, "H5Aexists_by_name");
+ VERIFY(exists, true, "H5Aexists_by_name");
ret = H5Awrite(aid, H5T_NATIVE_UINT, &u);
CHECK(ret, FAIL, "H5Awrite");
@@ -4440,10 +4440,10 @@ test_attr_many(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
exists = H5Aexists(gid, attrname);
- VERIFY(exists, TRUE, "H5Aexists");
+ VERIFY(exists, true, "H5Aexists");
exists = H5Aexists_by_name(fid, GROUP1_NAME, attrname, H5P_DEFAULT);
- VERIFY(exists, TRUE, "H5Aexists_by_name");
+ VERIFY(exists, true, "H5Aexists_by_name");
} /* end for */
/* Close group */
@@ -4468,22 +4468,22 @@ test_attr_many(hbool_t new_format, hid_t fcpl, hid_t fapl)
for (u = 0; u < nattr; u++) {
unsigned value; /* Attribute value */
- HDsnprintf(attrname, sizeof(attrname), "a-%06u", u);
+ snprintf(attrname, sizeof(attrname), "a-%06u", u);
exists = H5Aexists(gid, attrname);
- VERIFY(exists, TRUE, "H5Aexists");
+ VERIFY(exists, true, "H5Aexists");
exists = H5Aexists_by_name(fid, GROUP1_NAME, attrname, H5P_DEFAULT);
- VERIFY(exists, TRUE, "H5Aexists_by_name");
+ VERIFY(exists, true, "H5Aexists_by_name");
aid = H5Aopen(gid, attrname, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Aopen");
exists = H5Aexists(gid, attrname);
- VERIFY(exists, TRUE, "H5Aexists");
+ VERIFY(exists, true, "H5Aexists");
exists = H5Aexists_by_name(fid, GROUP1_NAME, attrname, H5P_DEFAULT);
- VERIFY(exists, TRUE, "H5Aexists_by_name");
+ VERIFY(exists, true, "H5Aexists_by_name");
ret = H5Aread(aid, H5T_NATIVE_UINT, &value);
CHECK(ret, FAIL, "H5Aread");
@@ -4583,9 +4583,9 @@ test_attr_corder_create_basic(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Close Dataset */
@@ -4610,9 +4610,9 @@ test_attr_corder_create_basic(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Retrieve dataset creation property list for group */
@@ -4722,14 +4722,14 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Create several attributes, but keep storage in compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -4746,9 +4746,9 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (u + 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
} /* end for */
} /* end for */
@@ -4809,9 +4809,9 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, max_compact, "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Loop through attributes, checking their creation order values */
/* (the name index is used, but the creation order value is in the same order) */
@@ -4819,12 +4819,12 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl)
H5A_info_t ainfo; /* Attribute information */
/* Retrieve information for attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Aget_info_by_name(my_dataset, ".", attrname, &ainfo, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_info_by_name");
/* Verify creation order of attribute */
- VERIFY(ainfo.corder_valid, TRUE, "H5Aget_info_by_name");
+ VERIFY(ainfo.corder_valid, true, "H5Aget_info_by_name");
VERIFY(ainfo.corder, u, "H5Aget_info_by_name");
} /* end for */
} /* end for */
@@ -4929,14 +4929,14 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Create several attributes, but keep storage in compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -4953,14 +4953,14 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (u + 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
} /* end for */
/* Create another attribute, to push into dense storage */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", max_compact);
+ snprintf(attrname, sizeof(attrname), "attr %02u", max_compact);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -4977,9 +4977,9 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact + 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
@@ -5044,9 +5044,9 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact + 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Loop through attributes, checking their creation order values */
/* (the name index is used, but the creation order value is in the same order) */
@@ -5054,12 +5054,12 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
H5A_info_t ainfo; /* Attribute information */
/* Retrieve information for attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Aget_info_by_name(my_dataset, ".", attrname, &ainfo, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_info_by_name");
/* Verify creation order of attribute */
- VERIFY(ainfo.corder_valid, TRUE, "H5Aget_info_by_name");
+ VERIFY(ainfo.corder_valid, true, "H5Aget_info_by_name");
VERIFY(ainfo.corder, u, "H5Aget_info_by_name");
} /* end for */
} /* end for */
@@ -5274,9 +5274,9 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
} /* end for */
@@ -5330,7 +5330,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
/* Create several attributes, but keep storage in compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5347,14 +5347,14 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (u + 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
} /* end for */
/* Create another attribute, to push into dense storage */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", max_compact);
+ snprintf(attrname, sizeof(attrname), "attr %02u", max_compact);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5371,9 +5371,9 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact + 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
@@ -5382,7 +5382,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
#endif
/* Delete several attributes from object, until attribute storage resumes compact form */
for (u = max_compact; u >= min_dense; u--) {
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
#if 0
@@ -5391,9 +5391,9 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, u, "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
@@ -5403,7 +5403,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
} /* end for */
/* Delete another attribute, to push attribute storage into compact form */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (min_dense - 1));
+ snprintf(attrname, sizeof(attrname), "attr %02u", (min_dense - 1));
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
#if 0
@@ -5412,14 +5412,14 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (min_dense - 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Re-add attributes to get back into dense form */
for (u = (min_dense - 1); u < (max_compact + 1); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5437,9 +5437,9 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact + 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
@@ -5496,9 +5496,9 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact + 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
@@ -5507,7 +5507,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
#endif
/* Delete several attributes from object, until attribute storage resumes compact form */
for (u = max_compact; u >= min_dense; u--) {
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
#if 0
@@ -5516,9 +5516,9 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, u, "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
@@ -5528,7 +5528,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
} /* end for */
/* Delete another attribute, to push attribute storage into compact form */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (min_dense - 1));
+ snprintf(attrname, sizeof(attrname), "attr %02u", (min_dense - 1));
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
#if 0
@@ -5537,14 +5537,14 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (min_dense - 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Re-add attributes to get back into dense form */
for (u = (min_dense - 1); u < (max_compact + 1); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5562,9 +5562,9 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact + 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
@@ -5573,11 +5573,11 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
#endif
/* Delete all attributes */
for (u = max_compact; u > 0; u--) {
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
} /* end for */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", 0);
+ snprintf(attrname, sizeof(attrname), "attr %02u", 0);
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
} /* end for */
@@ -5678,7 +5678,7 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl)
/* Loop to leave file open when deleting dataset, or to close & re-open file
* before deleting dataset */
- for (reopen_file = FALSE; reopen_file <= TRUE; reopen_file++) {
+ for (reopen_file = false; reopen_file <= true; reopen_file++) {
/* Create test file */
fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl, fapl);
CHECK(fid, FAIL, "H5Fopen");
@@ -5712,14 +5712,14 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Create attributes, until attribute storage is in dense form */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5737,9 +5737,9 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact * 2), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
@@ -5821,7 +5821,7 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl)
*-------------------------------------------------------------------------
*/
static int
-attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t use_index)
+attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, bool use_index)
{
char tmpname[NAME_BUF_SIZE]; /* Temporary attribute name */
H5A_info_t ainfo; /* Attribute info struct */
@@ -5848,7 +5848,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname) != 0)
+ if (strcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
/* Don't test "native" order if there is no creation order index, since
@@ -5875,7 +5875,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC /* H5_ITER_NATIVE */, n,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname) != 0)
+ if (strcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
} /* end if */
@@ -5896,7 +5896,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname) != 0)
+ if (strcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
/* Verify the information for first attribute, in increasing name order */
@@ -5916,7 +5916,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname) != 0)
+ if (strcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
/* Don't test "native" order queries on link name order, since there's not
@@ -5940,7 +5940,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname) != 0)
+ if (strcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
/* Retrieve current # of errors */
@@ -5957,7 +5957,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
**
****************************************************************/
static void
-test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
+test_attr_info_by_idx(bool new_format, hid_t fcpl, hid_t fapl)
{
hid_t fid; /* HDF5 File ID */
hid_t dset1, dset2, dset3; /* Dataset IDs */
@@ -6001,7 +6001,7 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Pget_attr_phase_change");
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
/* Output message about test being performed */
if (use_index)
MESSAGE(5, ("Testing Querying Attribute Info By Index w/Creation Order Index\n"))
@@ -6013,7 +6013,7 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(fid, FAIL, "H5Fcreate");
/* Set attribute creation order tracking & indexing for object */
- if (new_format == TRUE) {
+ if (new_format == true) {
ret = H5Pset_attr_creation_order(
dcpl, (H5P_CRT_ORDER_TRACKED | (use_index ? H5P_CRT_ORDER_INDEXED : (unsigned)0)));
CHECK(ret, FAIL, "H5Pset_attr_creation_order");
@@ -6048,9 +6048,9 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Check for query on non-existent attribute */
H5E_BEGIN_TRY
@@ -6071,7 +6071,7 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -6093,9 +6093,9 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, max_compact, "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Check for out of bound offset queries */
H5E_BEGIN_TRY
@@ -6123,7 +6123,7 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for (; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -6137,7 +6137,7 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
#if 0
/* Verify state of object */
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
#endif
/* Verify information for new attribute */
ret = attr_info_by_idx_check(my_dataset, attrname, (hsize_t)u, use_index);
@@ -6149,9 +6149,9 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact * 2), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
if (new_format) {
/* Retrieve & verify # of records in the name & creation order indices */
@@ -6441,7 +6441,7 @@ test_attr_get_name_invalid_buf(hid_t fcpl, hid_t fapl)
**
****************************************************************/
static void
-test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
+test_attr_delete_by_idx(bool new_format, hid_t fcpl, hid_t fapl)
{
hid_t fid; /* HDF5 File ID */
hid_t dset1, dset2, dset3; /* Dataset IDs */
@@ -6498,7 +6498,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Loop over operating in different orders */
for (order = H5_ITER_INC; order <= H5_ITER_DEC; order++) {
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
/* Print appropriate test message */
if (idx_type == H5_INDEX_CRT_ORDER) {
if (order == H5_ITER_INC) {
@@ -6542,7 +6542,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(fid, FAIL, "H5Fcreate");
/* Set attribute creation order tracking & indexing for object */
- if (new_format == TRUE) {
+ if (new_format == true) {
ret = H5Pset_attr_creation_order(
dcpl, (H5P_CRT_ORDER_TRACKED | (use_index ? H5P_CRT_ORDER_INDEXED : (unsigned)0)));
CHECK(ret, FAIL, "H5Pset_attr_creation_order");
@@ -6577,9 +6577,9 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Check for deleting non-existent attribute */
H5E_BEGIN_TRY
@@ -6592,7 +6592,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -6615,9 +6615,9 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, max_compact, "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Check for out of bound deletions */
H5E_BEGIN_TRY
@@ -6671,10 +6671,10 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
if (order == H5_ITER_INC)
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (u + 1));
+ snprintf(attrname, sizeof(attrname), "attr %02u", (u + 1));
else
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (max_compact - (u + 2)));
- ret = HDstrcmp(attrname, tmpname);
+ snprintf(attrname, sizeof(attrname), "attr %02u", (max_compact - (u + 2)));
+ ret = strcmp(attrname, tmpname);
VERIFY(ret, 0, "H5Aget_name_by_idx");
} /* end for */
@@ -6684,7 +6684,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
#if 0
/* Verify state of attribute storage (empty) */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
#endif
} /* end for */
@@ -6710,7 +6710,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for (u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -6726,7 +6726,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Verify state of object */
if (u >= max_compact) {
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
} /* end if */
#endif
/* Verify information for new attribute */
@@ -6739,9 +6739,9 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact * 2), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
if (new_format) {
/* Retrieve & verify # of records in the name & creation order indices */
@@ -6804,11 +6804,10 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
if (order == H5_ITER_INC)
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (u + 1));
+ snprintf(attrname, sizeof(attrname), "attr %02u", (u + 1));
else
- HDsnprintf(attrname, sizeof(attrname), "attr %02u",
- ((max_compact * 2) - (u + 2)));
- ret = HDstrcmp(attrname, tmpname);
+ snprintf(attrname, sizeof(attrname), "attr %02u", ((max_compact * 2) - (u + 2)));
+ ret = strcmp(attrname, tmpname);
VERIFY(ret, 0, "H5Aget_name_by_idx");
} /* end for */
@@ -6818,7 +6817,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
#if 0
/* Verify state of attribute storage (empty) */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
#endif
/* Check for deletion on empty attribute storage again */
H5E_BEGIN_TRY
@@ -6853,7 +6852,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, to push into dense form */
for (u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -6869,7 +6868,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Verify state of object */
if (u >= max_compact) {
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
} /* end if */
#endif
/* Verify information for new attribute */
@@ -6922,11 +6921,11 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", idx_type, order, (hsize_t)u,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
if (order == H5_ITER_INC)
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", ((u * 2) + 1));
+ snprintf(attrname, sizeof(attrname), "attr %02u", ((u * 2) + 1));
else
- HDsnprintf(attrname, sizeof(attrname), "attr %02u",
- ((max_compact * 2) - ((u * 2) + 2)));
- ret = HDstrcmp(attrname, tmpname);
+ snprintf(attrname, sizeof(attrname), "attr %02u",
+ ((max_compact * 2) - ((u * 2) + 2)));
+ ret = strcmp(attrname, tmpname);
VERIFY(ret, 0, "H5Aget_name_by_idx");
} /* end for */
} /* end for */
@@ -6975,11 +6974,11 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
if (order == H5_ITER_INC)
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", ((u * 2) + 3));
+ snprintf(attrname, sizeof(attrname), "attr %02u", ((u * 2) + 3));
else
- HDsnprintf(attrname, sizeof(attrname), "attr %02u",
- ((max_compact * 2) - ((u * 2) + 4)));
- ret = HDstrcmp(attrname, tmpname);
+ snprintf(attrname, sizeof(attrname), "attr %02u",
+ ((max_compact * 2) - ((u * 2) + 4)));
+ ret = strcmp(attrname, tmpname);
VERIFY(ret, 0, "H5Aget_name_by_idx");
} /* end for */
@@ -6989,7 +6988,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
#if 0
/* Verify state of attribute storage (empty) */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
#endif
/* Check for deletion on empty attribute storage again */
H5E_BEGIN_TRY
@@ -7063,8 +7062,8 @@ attr_iterate2_cb(hid_t loc_id, const char *attr_name, const H5A_info_t *info, vo
} /* end if */
/* Verify name of link */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (unsigned)my_info.corder);
- if (HDstrcmp(attr_name, attrname) != 0)
+ snprintf(attrname, sizeof(attrname), "attr %02u", (unsigned)my_info.corder);
+ if (strcmp(attr_name, attrname) != 0)
return (H5_ITER_ERROR);
/* Check if we've visited this link before */
@@ -7072,7 +7071,7 @@ attr_iterate2_cb(hid_t loc_id, const char *attr_name, const H5A_info_t *info, vo
return (H5_ITER_ERROR);
if (op_data->visited[op_data->curr])
return (H5_ITER_ERROR);
- op_data->visited[op_data->curr] = TRUE;
+ op_data->visited[op_data->curr] = true;
/* Advance to next value, in correct direction */
if (op_data->order != H5_ITER_DEC)
@@ -7162,14 +7161,14 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate2(obj_id, idx_type, order, &skip, attr_iterate2_cb, iter_info);
CHECK(ret, FAIL, "H5Aiterate2");
/* Verify that we visited all the attributes */
VERIFY(skip, max_attrs, "H5Aiterate2");
for (v = 0; v < max_attrs; v++)
- VERIFY(iter_info->visited[v], TRUE, "H5Aiterate2");
+ VERIFY(iter_info->visited[v], true, "H5Aiterate2");
/* Iterate over attributes on object */
iter_info->nskipped = (unsigned)(skip = 0);
@@ -7177,14 +7176,14 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate_by_name(fid, dsetname, idx_type, order, &skip, attr_iterate2_cb, iter_info, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aiterate_by_name");
/* Verify that we visited all the attributes */
VERIFY(skip, max_attrs, "H5Aiterate_by_name");
for (v = 0; v < max_attrs; v++)
- VERIFY(iter_info->visited[v], TRUE, "H5Aiterate_by_name");
+ VERIFY(iter_info->visited[v], true, "H5Aiterate_by_name");
/* Iterate over attributes on object */
iter_info->nskipped = (unsigned)(skip = 0);
@@ -7192,14 +7191,14 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate_by_name(obj_id, ".", idx_type, order, &skip, attr_iterate2_cb, iter_info, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aiterate_by_name");
/* Verify that we visited all the attributes */
VERIFY(skip, max_attrs, "H5Aiterate_by_name");
for (v = 0; v < max_attrs; v++)
- VERIFY(iter_info->visited[v], TRUE, "H5Aiterate_by_name");
+ VERIFY(iter_info->visited[v], true, "H5Aiterate_by_name");
#if 0
#ifndef H5_NO_DEPRECATED_SYMBOLS
@@ -7209,14 +7208,14 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate1(obj_id, &oskip, attr_iterate1_cb, iter_info);
CHECK(ret, FAIL, "H5Aiterate1");
/* Verify that we visited all the attributes */
VERIFY(skip, max_attrs, "H5Aiterate1");
for (v = 0; v < max_attrs; v++)
- VERIFY(iter_info->visited[v], TRUE, "H5Aiterate1");
+ VERIFY(iter_info->visited[v], true, "H5Aiterate1");
#endif /* H5_NO_DEPRECATED_SYMBOLS */
#endif
@@ -7226,7 +7225,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? skip : ((max_attrs - 1) - skip);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate2(obj_id, idx_type, order, &skip, attr_iterate2_cb, iter_info);
CHECK(ret, FAIL, "H5Aiterate2");
@@ -7234,18 +7233,18 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
VERIFY(skip, max_attrs, "H5Aiterate2");
if (order == H5_ITER_INC) {
for (v = 0; v < (max_attrs / 2); v++)
- VERIFY(iter_info->visited[v + (max_attrs / 2)], TRUE, "H5Aiterate2");
+ VERIFY(iter_info->visited[v + (max_attrs / 2)], true, "H5Aiterate2");
} /* end if */
else if (order == H5_ITER_DEC) {
for (v = 0; v < (max_attrs / 2); v++)
- VERIFY(iter_info->visited[v], TRUE, "H5Aiterate2");
+ VERIFY(iter_info->visited[v], true, "H5Aiterate2");
} /* end if */
else {
unsigned nvisit = 0; /* # of links visited */
assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_attrs; v++)
- if (iter_info->visited[v] == TRUE)
+ if (iter_info->visited[v] == true)
nvisit++;
VERIFY(skip, (max_attrs / 2), "H5Aiterate2");
@@ -7257,7 +7256,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? skip : ((max_attrs - 1) - skip);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate_by_name(fid, dsetname, idx_type, order, &skip, attr_iterate2_cb, iter_info, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aiterate_by_name");
@@ -7265,18 +7264,18 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
VERIFY(skip, max_attrs, "H5Aiterate_by_name");
if (order == H5_ITER_INC) {
for (v = 0; v < (max_attrs / 2); v++)
- VERIFY(iter_info->visited[v + (max_attrs / 2)], TRUE, "H5Aiterate_by_name");
+ VERIFY(iter_info->visited[v + (max_attrs / 2)], true, "H5Aiterate_by_name");
} /* end if */
else if (order == H5_ITER_DEC) {
for (v = 0; v < (max_attrs / 2); v++)
- VERIFY(iter_info->visited[v], TRUE, "H5Aiterate_by_name");
+ VERIFY(iter_info->visited[v], true, "H5Aiterate_by_name");
} /* end if */
else {
unsigned nvisit = 0; /* # of links visited */
assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_attrs; v++)
- if (iter_info->visited[v] == TRUE)
+ if (iter_info->visited[v] == true)
nvisit++;
VERIFY(skip, (max_attrs / 2), "H5Aiterate_by_name");
@@ -7288,7 +7287,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? skip : ((max_attrs - 1) - skip);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate_by_name(obj_id, ".", idx_type, order, &skip, attr_iterate2_cb, iter_info, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aiterate_by_name");
@@ -7296,18 +7295,18 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
VERIFY(skip, max_attrs, "H5Aiterate_by_name");
if (order == H5_ITER_INC) {
for (v = 0; v < (max_attrs / 2); v++)
- VERIFY(iter_info->visited[v + (max_attrs / 2)], TRUE, "H5Aiterate_by_name");
+ VERIFY(iter_info->visited[v + (max_attrs / 2)], true, "H5Aiterate_by_name");
} /* end if */
else if (order == H5_ITER_DEC) {
for (v = 0; v < (max_attrs / 2); v++)
- VERIFY(iter_info->visited[v], TRUE, "H5Aiterate_by_name");
+ VERIFY(iter_info->visited[v], true, "H5Aiterate_by_name");
} /* end if */
else {
unsigned nvisit = 0; /* # of links visited */
assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_attrs; v++)
- if (iter_info->visited[v] == TRUE)
+ if (iter_info->visited[v] == true)
nvisit++;
VERIFY(skip, (max_attrs / 2), "H5Aiterate_by_name");
@@ -7321,7 +7320,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? (unsigned)oskip : ((max_attrs - 1) - oskip);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate1(obj_id, &oskip, attr_iterate1_cb, iter_info);
CHECK(ret, FAIL, "H5Aiterate1");
@@ -7329,18 +7328,18 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
VERIFY(oskip, max_attrs, "H5Aiterate1");
if (order == H5_ITER_INC) {
for (v = 0; v < (max_attrs / 2); v++)
- VERIFY(iter_info->visited[v + (max_attrs / 2)], TRUE, "H5Aiterate1");
+ VERIFY(iter_info->visited[v + (max_attrs / 2)], true, "H5Aiterate1");
} /* end if */
else if (order == H5_ITER_DEC) {
for (v = 0; v < (max_attrs / 2); v++)
- VERIFY(iter_info->visited[v], TRUE, "H5Aiterate1");
+ VERIFY(iter_info->visited[v], true, "H5Aiterate1");
} /* end if */
else {
unsigned nvisit = 0; /* # of links visited */
assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_attrs; v++)
- if (iter_info->visited[v] == TRUE)
+ if (iter_info->visited[v] == true)
nvisit++;
VERIFY(skip, (max_attrs / 2), "H5Aiterate1");
@@ -7354,7 +7353,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate2(obj_id, idx_type, order, &skip, attr_iterate2_cb, iter_info);
CHECK(ret, FAIL, "H5Aiterate2");
VERIFY(ret, CORDER_ITER_STOP, "H5Aiterate2");
@@ -7366,7 +7365,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate_by_name(fid, dsetname, idx_type, order, &skip, attr_iterate2_cb, iter_info, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aiterate_by_name");
VERIFY(ret, CORDER_ITER_STOP, "H5Aiterate_by_name");
@@ -7378,7 +7377,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate_by_name(obj_id, ".", idx_type, order, &skip, attr_iterate2_cb, iter_info, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aiterate_by_name");
VERIFY(ret, CORDER_ITER_STOP, "H5Aiterate_by_name");
@@ -7392,7 +7391,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate1(obj_id, &oskip, attr_iterate1_cb, iter_info);
CHECK(ret, FAIL, "H5Aiterate1");
VERIFY(ret, CORDER_ITER_STOP, "H5Aiterate1");
@@ -7441,7 +7440,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
**
****************************************************************/
static void
-test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
+test_attr_iterate2(bool new_format, hid_t fcpl, hid_t fapl)
{
hid_t fid; /* HDF5 File ID */
hid_t dset1, dset2, dset3; /* Dataset IDs */
@@ -7461,7 +7460,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
H5_index_t idx_type; /* Type of index to operate on */
H5_iter_order_t order; /* Order within in the index */
attr_iter_info_t iter_info; /* Iterator info */
- hbool_t *visited = NULL; /* Array of flags for visiting links */
+ bool *visited = NULL; /* Array of flags for visiting links */
hsize_t idx; /* Start index for iteration */
unsigned use_index; /* Use index on creation order values */
const char *dsetname; /* Name of dataset for attributes */
@@ -7494,7 +7493,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Allocate the "visited link" array */
iter_info.max_visit = max_compact * 2;
- visited = (hbool_t *)malloc(sizeof(hbool_t) * iter_info.max_visit);
+ visited = (bool *)malloc(sizeof(bool) * iter_info.max_visit);
CHECK_PTR(visited, "malloc");
iter_info.visited = visited;
@@ -7503,7 +7502,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Loop over operating in different orders */
for (order = H5_ITER_INC; order <= H5_ITER_DEC; order++) {
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
/* Print appropriate test message */
if (idx_type == H5_INDEX_CRT_ORDER) {
if (order == H5_ITER_INC) {
@@ -7547,7 +7546,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(fid, FAIL, "H5Fcreate");
/* Set attribute creation order tracking & indexing for object */
- if (new_format == TRUE) {
+ if (new_format == true) {
ret = H5Pset_attr_creation_order(
dcpl, (H5P_CRT_ORDER_TRACKED | (use_index ? H5P_CRT_ORDER_INDEXED : (unsigned)0)));
CHECK(ret, FAIL, "H5Pset_attr_creation_order");
@@ -7585,9 +7584,9 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Check for iterating over object with no attributes (should be OK) */
ret = H5Aiterate2(my_dataset, idx_type, order, NULL, attr_iterate2_cb, NULL);
@@ -7604,7 +7603,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -7627,9 +7626,9 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, max_compact, "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
if (vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) {
@@ -7691,7 +7690,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for (u = max_compact; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -7707,7 +7706,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Verify state of object */
if (u >= max_compact) {
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
} /* end if */
#endif
/* Verify information for new attribute */
@@ -7720,9 +7719,9 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact * 2), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
if (new_format) {
/* Retrieve & verify # of records in the name & creation order indices */
@@ -7857,7 +7856,7 @@ attr_open_by_idx_check(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order,
**
****************************************************************/
static void
-test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
+test_attr_open_by_idx(bool new_format, hid_t fcpl, hid_t fapl)
{
hid_t fid; /* HDF5 File ID */
hid_t dset1, dset2, dset3; /* Dataset IDs */
@@ -7910,7 +7909,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Loop over operating in different orders */
for (order = H5_ITER_INC; order <= H5_ITER_DEC; order++) {
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
/* Print appropriate test message */
if (idx_type == H5_INDEX_CRT_ORDER) {
if (order == H5_ITER_INC) {
@@ -7954,7 +7953,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(fid, FAIL, "H5Fcreate");
/* Set attribute creation order tracking & indexing for object */
- if (new_format == TRUE) {
+ if (new_format == true) {
ret = H5Pset_attr_creation_order(
dcpl, (H5P_CRT_ORDER_TRACKED | (use_index ? H5P_CRT_ORDER_INDEXED : (unsigned)0)));
CHECK(ret, FAIL, "H5Pset_attr_creation_order");
@@ -7989,9 +7988,9 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Check for opening an attribute on an object with no attributes */
H5E_BEGIN_TRY
@@ -8005,7 +8004,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -8028,9 +8027,9 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, max_compact, "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Check for out of bound opening an attribute on an object */
H5E_BEGIN_TRY
@@ -8068,7 +8067,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for (u = max_compact; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -8084,7 +8083,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Verify state of object */
if (u >= max_compact) {
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
} /* end if */
#endif
/* Verify information for new attribute */
@@ -8097,9 +8096,9 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact * 2), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
if (new_format) {
/* Retrieve & verify # of records in the name & creation order indices */
@@ -8174,7 +8173,7 @@ attr_open_check(hid_t fid, const char *dsetname, hid_t obj_id, unsigned max_attr
/* Open each attribute on object by index and check that it's the correct one */
for (u = 0; u < max_attrs; u++) {
/* Open the attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr_id = H5Aopen(obj_id, attrname, H5P_DEFAULT);
CHECK(attr_id, FAIL, "H5Aopen");
@@ -8234,7 +8233,7 @@ attr_open_check(hid_t fid, const char *dsetname, hid_t obj_id, unsigned max_attr
**
****************************************************************/
static void
-test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
+test_attr_open_by_name(bool new_format, hid_t fcpl, hid_t fapl)
{
hid_t fid; /* HDF5 File ID */
hid_t dset1, dset2, dset3; /* Dataset IDs */
@@ -8278,7 +8277,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Pget_attr_phase_change");
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
/* Print appropriate test message */
if (use_index)
MESSAGE(5, ("Testing Opening Attributes By Name w/Creation Order Index\n"))
@@ -8290,7 +8289,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(fid, FAIL, "H5Fcreate");
/* Set attribute creation order tracking & indexing for object */
- if (new_format == TRUE) {
+ if (new_format == true) {
ret = H5Pset_attr_creation_order(
dcpl, (H5P_CRT_ORDER_TRACKED | (use_index ? H5P_CRT_ORDER_INDEXED : (unsigned)0)));
CHECK(ret, FAIL, "H5Pset_attr_creation_order");
@@ -8328,9 +8327,9 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Check for opening a non-existent attribute on an object with no attributes */
H5E_BEGIN_TRY
@@ -8357,7 +8356,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -8379,9 +8378,9 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, max_compact, "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Check for opening a non-existent attribute on an object with compact attribute storage */
H5E_BEGIN_TRY
@@ -8435,7 +8434,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for (u = max_compact; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -8450,7 +8449,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Verify state of object */
if (u >= max_compact) {
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
} /* end if */
#endif
/* Verify information for new attribute */
@@ -8463,9 +8462,9 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact * 2), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
if (new_format) {
/* Retrieve & verify # of records in the name & creation order indices */
@@ -8532,7 +8531,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
**
****************************************************************/
static void
-test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
+test_attr_create_by_name(bool new_format, hid_t fcpl, hid_t fapl)
{
hid_t fid; /* HDF5 File ID */
hid_t dset1, dset2, dset3; /* Dataset IDs */
@@ -8575,7 +8574,7 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Pget_attr_phase_change");
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
/* Print appropriate test message */
if (use_index)
MESSAGE(5, ("Testing Creating Attributes By Name w/Creation Order Index\n"))
@@ -8587,7 +8586,7 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(fid, FAIL, "H5Fcreate");
/* Set attribute creation order tracking & indexing for object */
- if (new_format == TRUE) {
+ if (new_format == true) {
ret = H5Pset_attr_creation_order(
dcpl, (H5P_CRT_ORDER_TRACKED | (use_index ? H5P_CRT_ORDER_INDEXED : (unsigned)0)));
CHECK(ret, FAIL, "H5Pset_attr_creation_order");
@@ -8625,14 +8624,14 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Create attributes, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate_by_name(fid, dsetname, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate_by_name");
@@ -8655,9 +8654,9 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, max_compact, "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Test opening attributes stored compactly */
ret = attr_open_check(fid, dsetname, my_dataset, u);
@@ -8689,7 +8688,7 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for (u = max_compact; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate_by_name(fid, dsetname, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate_by_name");
@@ -8705,7 +8704,7 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Verify state of object */
if (u >= max_compact) {
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
} /* end if */
#endif
/* Verify information for new attribute */
@@ -8718,9 +8717,9 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact * 2), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
if (new_format) {
/* Retrieve & verify # of records in the name & creation order indices */
@@ -8916,14 +8915,14 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
#if 0
/* Check on datasets' attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
is_dense = H5O__is_attr_dense_test(dataset2);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Add attributes to each dataset, until after converting to dense storage */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
/* Alternate between creating "small" & "big" attributes */
if (u % 2) {
@@ -8933,7 +8932,7 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
#if 0
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
#endif
/* Write data into the attribute */
attr_value = u + 1;
@@ -8947,7 +8946,7 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
#if 0
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -8973,9 +8972,9 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
if (u < max_compact)
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Alternate between creating "small" & "big" attributes */
@@ -8986,7 +8985,7 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
#if 0
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
#endif
/* Write data into the attribute */
attr_value = u + 1;
@@ -9000,7 +8999,7 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
#if 0
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9026,9 +9025,9 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset2);
if (u < max_compact)
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
} /* end for */
@@ -9265,14 +9264,14 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
#if 0
/* Check on datasets' attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
is_dense = H5O__is_attr_dense_test(dataset2);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Add attributes to each dataset, until after converting to dense storage */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
/* Alternate between creating "small" & "big" attributes */
if (u % 2) {
@@ -9282,7 +9281,7 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
#if 0
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
#endif
/* Write data into the attribute */
attr_value = u + 1;
@@ -9296,7 +9295,7 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
#if 0
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9322,9 +9321,9 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
if (u < max_compact)
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Alternate between creating "small" & "big" attributes */
@@ -9335,7 +9334,7 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
#if 0
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
#endif
/* Write data into the attribute */
attr_value = u + 1;
@@ -9349,7 +9348,7 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
#if 0
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9375,13 +9374,13 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset2);
if (u < max_compact)
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Create new attribute name */
- HDsnprintf(attrname2, sizeof(attrname2), "new attr %02u", u);
+ snprintf(attrname2, sizeof(attrname2), "new attr %02u", u);
/* Change second dataset's attribute's name */
ret = H5Arename_by_name(fid, DSET2_NAME, attrname, attrname2, H5P_DEFAULT);
@@ -9396,12 +9395,12 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
if (u % 2) {
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
} /* end if */
else {
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9420,12 +9419,12 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
if (u % 2) {
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
} /* end if */
else {
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9450,12 +9449,12 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
if (u % 2) {
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
} /* end if */
else {
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9474,12 +9473,12 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
if (u % 2) {
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
} /* end if */
else {
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9724,14 +9723,14 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
#if 0
/* Check on datasets' attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
is_dense = H5O__is_attr_dense_test(dataset2);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Add attributes to each dataset, until after converting to dense storage */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
/* Alternate between creating "small" & "big" attributes */
if (u % 2) {
@@ -9741,7 +9740,7 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
#if 0
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
#endif
/* Write data into the attribute */
attr_value = u + 1;
@@ -9755,7 +9754,7 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
#if 0
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9781,9 +9780,9 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
if (u < max_compact)
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Alternate between creating "small" & "big" attributes */
@@ -9794,7 +9793,7 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
#if 0
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
#endif
/* Write data into the attribute */
attr_value = u + 1;
@@ -9808,7 +9807,7 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
#if 0
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9834,16 +9833,16 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset2);
if (u < max_compact)
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
} /* end for */
/* Delete attributes from second dataset */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
/* Delete second dataset's attribute */
ret = H5Adelete_by_name(fid, DSET2_NAME, attrname, H5P_DEFAULT);
@@ -9858,12 +9857,12 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
if (u % 2) {
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
} /* end if */
else {
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -10108,14 +10107,14 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
#if 0
/* Check on datasets' attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
is_dense = H5O__is_attr_dense_test(dataset2);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Add attributes to each dataset, until after converting to dense storage */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
/* Alternate between creating "small" & "big" attributes */
if (u % 2) {
@@ -10125,7 +10124,7 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
#if 0
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
#endif
/* Write data into the attribute */
attr_value = u + 1;
@@ -10139,7 +10138,7 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
#if 0
/* ChecFk that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -10165,9 +10164,9 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
if (u < max_compact)
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Alternate between creating "small" & "big" attributes */
@@ -10178,7 +10177,7 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
#if 0
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
#endif
/* Write data into the attribute */
attr_value = u + 1;
@@ -10192,7 +10191,7 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
#if 0
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -10218,9 +10217,9 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset2);
if (u < max_compact)
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
} /* end for */
@@ -10239,12 +10238,12 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
#if 0
/* Check on first dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Check ref count on attributes of first dataset */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
/* Open attribute on first dataset */
attr = H5Aopen(dataset, attrname, H5P_DEFAULT);
@@ -10253,12 +10252,12 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
if (u % 2) {
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
} /* end if */
else {
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -10518,7 +10517,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
/* Create attributes on group */
for (i = 0; i < BUG2_NATTR; i++) {
- HDsnprintf(aname, sizeof(aname), "%03u", i);
+ snprintf(aname, sizeof(aname), "%03u", i);
aid = H5Acreate2(gid, aname, H5T_STD_I32LE, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
@@ -10528,7 +10527,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
/* Delete every other attribute */
for (i = 1; i < BUG2_NATTR; i += 2) {
- HDsnprintf(aname, sizeof(aname), "%03u", i);
+ snprintf(aname, sizeof(aname), "%03u", i);
ret = H5Adelete(gid, aname);
CHECK(ret, FAIL, "H5Adelete");
}
@@ -10552,7 +10551,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
/* Open an attribute in the middle */
i = (BUG2_NATTR / 4) * 2;
- HDsnprintf(aname, sizeof(aname), "%03u", i);
+ snprintf(aname, sizeof(aname), "%03u", i);
aid = H5Aopen(gid, aname, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Aopen");
@@ -10561,7 +10560,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
CHECK(tid, FAIL, "H5Aget_type");
tri_ret = H5Tequal(tid, H5T_STD_I32LE);
- VERIFY(tri_ret, TRUE, "H5Tequal");
+ VERIFY(tri_ret, true, "H5Tequal");
/* Close IDs */
ret = H5Tclose(tid);
@@ -10595,7 +10594,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
/* Create attributes on group */
for (i = 0; i < BUG2_NATTR2; i++) {
- HDsnprintf(aname, sizeof(aname), "%03u", i);
+ snprintf(aname, sizeof(aname), "%03u", i);
aid = H5Acreate2(gid, aname, H5T_STD_I32LE, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
@@ -10605,7 +10604,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
/* Delete every other attribute */
for (i = 0; i < BUG2_NATTR2; i++) {
- HDsnprintf(aname, sizeof(aname), "%03u", i);
+ snprintf(aname, sizeof(aname), "%03u", i);
ret = H5Adelete(gid, aname);
CHECK(ret, FAIL, "H5Adelete");
}
@@ -11465,7 +11464,7 @@ test_attr_bug9(hid_t fcpl, hid_t fapl)
/* Create enough attributes to cause a change to dense storage */
for (i = 0; i < max_compact + 1; i++) {
/* Create attribute */
- HDsnprintf(aname, sizeof(aname), "%u", i);
+ snprintf(aname, sizeof(aname), "%u", i);
aid = H5Acreate2(gid, aname, H5T_NATIVE_CHAR, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
@@ -11721,13 +11720,13 @@ test_attr(void)
MESSAGE(7, ("testing with minimzied dataset object headers\n"));
dcpl = H5Pcreate(H5P_DATASET_CREATE);
CHECK(dcpl, FAIL, "H5Pcreate");
- ret = H5Pset_dset_no_attrs_hint(dcpl, TRUE);
+ ret = H5Pset_dset_no_attrs_hint(dcpl, true);
CHECK_I(ret, "H5Pset_dset_no_attrs_hint");
dcpl_g = dcpl;
}
#endif
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
hid_t my_fapl = fapl;
if (new_format)
@@ -11773,10 +11772,10 @@ test_attr(void)
/* This next test uses its own file information */
test_attr_duplicate_ids(my_fapl);
- for (use_shared = FALSE; use_shared <= TRUE; use_shared++) {
+ for (use_shared = false; use_shared <= true; use_shared++) {
hid_t my_fcpl;
- if (new_format == TRUE && use_shared) {
+ if (new_format == true && use_shared) {
MESSAGE(7, ("testing with shared attributes\n"));
my_fcpl = fcpl2;
}
@@ -11826,7 +11825,7 @@ test_attr(void)
through a different file handle */
/* tests specific to the "new format" */
- if (new_format == TRUE) {
+ if (new_format == true) {
/* General attribute tests */
test_attr_dense_create(my_fcpl, my_fapl); /* Test dense attribute storage creation */
test_attr_dense_open(my_fcpl, my_fapl); /* Test opening attributes in dense storage */
@@ -11857,7 +11856,7 @@ test_attr(void)
w/attribute creation order info */
/* More complex tests with exclusively both "new format" and "shared" attributes */
- if (use_shared == TRUE) {
+ if (use_shared == true) {
test_attr_shared_write(
my_fcpl,
my_fapl); /* Test writing to shared attributes in compact & dense storage */
diff --git a/test/API/tcoords.c b/test/API/tcoords.c
index d9b97114c57..5599def3210 100644
--- a/test/API/tcoords.c
+++ b/test/API/tcoords.c
@@ -42,7 +42,7 @@ int da_buffer[2][3][6][2];
**
*************************************************************/
static void
-test_singleEnd_selElements(hid_t file, hbool_t is_chunked)
+test_singleEnd_selElements(hid_t file, bool is_chunked)
{
hid_t sid, plid, did, msid;
char dset_name[NAME_LEN]; /* Dataset name */
@@ -87,9 +87,9 @@ test_singleEnd_selElements(hid_t file, hbool_t is_chunked)
/* Construct dataset's name */
memset(dset_name, 0, (size_t)NAME_LEN);
- HDstrcat(dset_name, SINGLE_END_DSET);
+ strcat(dset_name, SINGLE_END_DSET);
if (is_chunked)
- HDstrcat(dset_name, "_chunked");
+ strcat(dset_name, "_chunked");
did = H5Dcreate2(file, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, plid, H5P_DEFAULT);
CHECK(did, FAIL, "H5Dcreate2");
@@ -225,7 +225,7 @@ test_singleEnd_selElements(hid_t file, hbool_t is_chunked)
**
*************************************************************/
static void
-test_singleEnd_selHyperslab(hid_t file, hbool_t is_chunked)
+test_singleEnd_selHyperslab(hid_t file, bool is_chunked)
{
hid_t sid, did, msid;
char dset_name[NAME_LEN]; /* Dataset name */
@@ -259,9 +259,9 @@ test_singleEnd_selHyperslab(hid_t file, hbool_t is_chunked)
/* Construct dataset's name */
memset(dset_name, 0, NAME_LEN);
- HDstrcat(dset_name, SINGLE_END_DSET);
+ strcat(dset_name, SINGLE_END_DSET);
if (is_chunked)
- HDstrcat(dset_name, "_chunked");
+ strcat(dset_name, "_chunked");
/* Dataspace for the dataset in file */
sid = H5Screate_simple(4, da_dims, da_dims);
@@ -371,7 +371,7 @@ test_singleEnd_selHyperslab(hid_t file, hbool_t is_chunked)
**
*************************************************************/
static void
-test_multiple_ends(hid_t file, hbool_t is_chunked)
+test_multiple_ends(hid_t file, bool is_chunked)
{
hid_t sid, plid, did, msid;
char dset_name[NAME_LEN]; /* Dataset name */
@@ -462,9 +462,9 @@ test_multiple_ends(hid_t file, hbool_t is_chunked)
/* Construct dataset's name */
memset(dset_name, 0, NAME_LEN);
- HDstrcat(dset_name, MULTI_ENDS_SEL_HYPER_DSET);
+ strcat(dset_name, MULTI_ENDS_SEL_HYPER_DSET);
if (is_chunked)
- HDstrcat(dset_name, "_chunked");
+ strcat(dset_name, "_chunked");
did = H5Dcreate2(file, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, plid, H5P_DEFAULT);
CHECK(did, FAIL, "H5Dcreate2");
@@ -680,10 +680,10 @@ test_multiple_ends(hid_t file, hbool_t is_chunked)
void
test_coords(void)
{
- hid_t fid;
- hbool_t is_chunk[2] = {TRUE, FALSE};
- int i;
- herr_t ret; /* Generic error return */
+ hid_t fid;
+ bool is_chunk[2] = {true, false};
+ int i;
+ herr_t ret; /* Generic error return */
fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
CHECK(fid, FAIL, "H5Fcreate");
diff --git a/test/API/testhdf5.c b/test/API/testhdf5.c
index f69b1c80374..ca5d0e41eac 100644
--- a/test/API/testhdf5.c
+++ b/test/API/testhdf5.c
@@ -56,7 +56,7 @@ print_func(const char *format, ...)
int ret_value;
va_start(arglist, format);
- ret_value = HDvprintf(format, arglist);
+ ret_value = vprintf(format, arglist);
va_end(arglist);
return ret_value;
}
@@ -76,7 +76,7 @@ TestErrPrintf(const char *format, ...)
/* Print the requested information */
va_start(arglist, format);
- ret_value = HDvprintf(format, arglist);
+ ret_value = vprintf(format, arglist);
va_end(arglist);
/* Return the length of the string produced (like printf() does) */
@@ -121,9 +121,9 @@ getenv_all(MPI_Comm comm, int root, const char *name)
/* The root task does the getenv call
* and sends the result to the other tasks */
if (mpi_rank == root) {
- env = HDgetenv(name);
+ env = getenv(name);
if (env) {
- len = (int)HDstrlen(env);
+ len = (int)strlen(env);
MPI_Bcast(&len, 1, MPI_INT, root, comm);
MPI_Bcast(env, len, MPI_CHAR, root, comm);
}
@@ -138,7 +138,7 @@ getenv_all(MPI_Comm comm, int root, const char *name)
if (len >= 0) {
if (env == NULL)
env = (char *)malloc((size_t)len + 1);
- else if (HDstrlen(env) < (size_t)len)
+ else if (strlen(env) < (size_t)len)
env = (char *)realloc(env, (size_t)len + 1);
MPI_Bcast(env, len, MPI_CHAR, root, comm);
@@ -158,7 +158,7 @@ getenv_all(MPI_Comm comm, int root, const char *name)
/* use original getenv */
if (env)
free(env);
- env = HDgetenv(name);
+ env = getenv(name);
} /* end if */
return env;
@@ -218,7 +218,7 @@ h5_get_libver_fapl(hid_t fapl)
char buf[1024]; /* buffer for tokenizing HDF5_DRIVER */
/* Get the environment variable, if it exists */
- env = HDgetenv("HDF5_LIBVER_BOUNDS");
+ env = getenv("HDF5_LIBVER_BOUNDS");
#ifdef HDF5_LIBVER_BOUNDS
/* Use the environment variable, then the compile-time constant */
if (!env)
@@ -235,12 +235,12 @@ h5_get_libver_fapl(hid_t fapl)
* If it's nothing (environment variable was whitespace)
* just return the default fapl.
*/
- HDstrncpy(buf, env, sizeof(buf));
+ strncpy(buf, env, sizeof(buf));
buf[sizeof(buf) - 1] = '\0';
if (NULL == (tok = HDstrtok_r(buf, " \t\n\r", &lasts)))
goto done;
- if (!HDstrcmp(tok, "latest")) {
+ if (!strcmp(tok, "latest")) {
/* use the latest format */
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
goto error;
@@ -262,7 +262,7 @@ h5_get_libver_fapl(hid_t fapl)
#endif
static char *
h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fullname, size_t size,
- hbool_t nest_printf, hbool_t subst_for_superblock)
+ bool nest_printf, bool subst_for_superblock)
{
const char *prefix = NULL;
const char *driver_env_var = NULL; /* HDF5_DRIVER environment variable */
@@ -280,7 +280,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
/* Determine if driver is set by environment variable. If it is,
* only generate a suffix if fixing the filename for the superblock
* file. */
- driver_env_var = HDgetenv(HDF5_DRIVER);
+ driver_env_var = getenv(HDF5_DRIVER);
if (driver_env_var && (H5P_DEFAULT == fapl) && subst_for_superblock)
fapl = H5P_FILE_ACCESS_DEFAULT;
@@ -302,7 +302,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
* we are using the split driver since both of those
* use the multi VFD under the hood.
*/
- if (driver_env_var && !HDstrcmp(driver_env_var, "split")) {
+ if (driver_env_var && !strcmp(driver_env_var, "split")) {
/* split VFD */
if (subst_for_superblock)
suffix = ".h5.meta";
@@ -334,7 +334,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
#endif /* H5_HAVE_PARALLEL */
}
else {
- if (HDgetenv(HDF5_NOCLEANUP))
+ if (getenv(HDF5_NOCLEANUP))
SetTestNoCleanup();
}
#endif
@@ -370,7 +370,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
" export HDF5_PARAPREFIX\n"
"*** End of Hint ***\n");
- explained = TRUE;
+ explained = true;
#ifdef HDF5_PARAPREFIX
prefix = HDF5_PARAPREFIX;
#endif /* HDF5_PARAPREFIX */
@@ -382,7 +382,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
* For serial:
* First use the environment variable, then try the constant
*/
- prefix = HDgetenv("HDF5_PREFIX");
+ prefix = getenv("HDF5_PREFIX");
#ifdef HDF5_PREFIX
if (!prefix)
@@ -396,7 +396,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
/* This is a parallel system */
char *subdir;
- if (!HDstrcmp(prefix, HDF5_PARAPREFIX)) {
+ if (!strcmp(prefix, HDF5_PARAPREFIX)) {
/*
* If the prefix specifies the HDF5_PARAPREFIX directory, then
* default to using the "/tmp/$USER" or "/tmp/$LOGIN"
@@ -404,8 +404,8 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
*/
char *user, *login;
- user = HDgetenv("USER");
- login = HDgetenv("LOGIN");
+ user = getenv("USER");
+ login = getenv("LOGIN");
subdir = (user ? user : login);
if (subdir) {
@@ -421,11 +421,11 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
if (!fullname[0]) {
/* We didn't append the prefix yet */
- HDstrncpy(fullname, prefix, size);
+ strncpy(fullname, prefix, size);
fullname[size - 1] = '\0';
}
- if (HDstrlen(fullname) + HDstrlen(base_name) + 1 < size) {
+ if (strlen(fullname) + strlen(base_name) + 1 < size) {
/*
* Append the base_name with a slash first. Multiple
* slashes are handled below.
@@ -440,10 +440,10 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
* subdirectory. Default to PREFIX's original
* prefix value.
*/
- HDstrcpy(fullname, prefix);
+ strcpy(fullname, prefix);
- HDstrcat(fullname, "/");
- HDstrcat(fullname, base_name);
+ strcat(fullname, "/");
+ strcat(fullname, base_name);
}
else {
/* Buffer is too small */
@@ -451,25 +451,25 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
}
}
else {
- if (HDsnprintf(fullname, size, "%s/%s", prefix, base_name) == (int)size)
+ if (snprintf(fullname, size, "%s/%s", prefix, base_name) == (int)size)
/* Buffer is too small */
return NULL;
}
}
- else if (HDstrlen(base_name) >= size) {
+ else if (strlen(base_name) >= size) {
/* Buffer is too small */
return NULL;
}
else {
- HDstrcpy(fullname, base_name);
+ strcpy(fullname, base_name);
}
/* Append a suffix */
if (suffix) {
- if (HDstrlen(fullname) + HDstrlen(suffix) >= size)
+ if (strlen(fullname) + strlen(suffix) >= size)
return NULL;
- HDstrcat(fullname, suffix);
+ strcat(fullname, suffix);
}
/* Remove any double slashes in the filename */
@@ -486,33 +486,33 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
char *
h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size)
{
- return (h5_fixname_real(base_name, fapl, ".h5", fullname, size, FALSE, FALSE));
+ return (h5_fixname_real(base_name, fapl, ".h5", fullname, size, false, false));
}
char *
h5_fixname_superblock(const char *base_name, hid_t fapl_id, char *fullname, size_t size)
{
- return (h5_fixname_real(base_name, fapl_id, ".h5", fullname, size, FALSE, TRUE));
+ return (h5_fixname_real(base_name, fapl_id, ".h5", fullname, size, false, true));
}
-hbool_t
+bool
h5_using_default_driver(const char *drv_name)
{
- hbool_t ret_val = TRUE;
+ bool ret_val = true;
assert(H5_DEFAULT_VFD == H5FD_SEC2);
if (!drv_name)
- drv_name = HDgetenv(HDF5_DRIVER);
+ drv_name = getenv(HDF5_DRIVER);
if (drv_name)
- return (!HDstrcmp(drv_name, "sec2") || !HDstrcmp(drv_name, "nomatch"));
+ return (!strcmp(drv_name, "sec2") || !strcmp(drv_name, "nomatch"));
return ret_val;
}
herr_t
-h5_driver_is_default_vfd_compatible(hid_t fapl_id, hbool_t *default_vfd_compatible)
+h5_driver_is_default_vfd_compatible(hid_t fapl_id, bool *default_vfd_compatible)
{
unsigned long feat_flags = 0;
hid_t driver_id = H5I_INVALID_HID;
diff --git a/test/API/testhdf5.h b/test/API/testhdf5.h
index f2510b2e4a3..4e9e81dad92 100644
--- a/test/API/testhdf5.h
+++ b/test/API/testhdf5.h
@@ -29,8 +29,8 @@
#define VERBO_HI 9 /* High */
/* Turn off verbose reporting by default */
-#define VERBOSE_MED (FALSE)
-#define VERBOSE_HI (FALSE)
+#define VERBOSE_MED (false)
+#define VERBOSE_HI (false)
/* Use %ld to print the value because long should cover most cases. */
/* Used to make certain a return value _is_not_ a value */
@@ -147,7 +147,7 @@
"%s \n", \
(where), (int)__LINE__, __FILE__, x); \
} \
- if (HDstrcmp(x, val) != 0) { \
+ if (strcmp(x, val) != 0) { \
TestErrPrintf("*** UNEXPECTED VALUE from %s should be %s, but is %s at line %4d " \
"in %s\n", \
where, val, x, (int)__LINE__, __FILE__); \
@@ -220,27 +220,27 @@
}
#define PASSED() \
{ \
- HDputs(" PASSED"); \
+ puts(" PASSED"); \
fflush(stdout); \
}
#define H5_FAILED() \
{ \
- HDputs("*FAILED*"); \
+ puts("*FAILED*"); \
fflush(stdout); \
}
#define H5_WARNING() \
{ \
- HDputs("*WARNING*"); \
+ puts("*WARNING*"); \
fflush(stdout); \
}
#define SKIPPED() \
{ \
- HDputs(" -SKIP-"); \
+ puts(" -SKIP-"); \
fflush(stdout); \
}
#define PUTS_ERROR(s) \
{ \
- HDputs(s); \
+ puts(s); \
AT(); \
goto error; \
}
@@ -266,7 +266,7 @@
{ \
H5_FAILED(); \
AT(); \
- HDputs(s); \
+ puts(s); \
goto error; \
}
@@ -280,12 +280,12 @@ int print_func(const char *format, ...);
int TestErrPrintf(const char *format, ...);
hid_t h5_fileaccess(void);
/* Functions that will replace components of a FAPL */
-herr_t h5_get_vfd_fapl(hid_t fapl_id);
-herr_t h5_get_libver_fapl(hid_t fapl_id);
-char *h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size);
-char *h5_fixname_superblock(const char *base_name, hid_t fapl, char *fullname, size_t size);
-hbool_t h5_using_default_driver(const char *drv_name);
-herr_t h5_driver_is_default_vfd_compatible(hid_t fapl_id, hbool_t *default_vfd_compatible);
+herr_t h5_get_vfd_fapl(hid_t fapl_id);
+herr_t h5_get_libver_fapl(hid_t fapl_id);
+char *h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size);
+char *h5_fixname_superblock(const char *base_name, hid_t fapl, char *fullname, size_t size);
+bool h5_using_default_driver(const char *drv_name);
+herr_t h5_driver_is_default_vfd_compatible(hid_t fapl_id, bool *default_vfd_compatible);
#ifdef H5_HAVE_PARALLEL
char *getenv_all(MPI_Comm comm, int root, const char *name);
diff --git a/test/API/tfile.c b/test/API/tfile.c
index 16429c76764..6b316d47259 100644
--- a/test/API/tfile.c
+++ b/test/API/tfile.c
@@ -1213,14 +1213,14 @@ test_get_obj_ids(void)
/* creates NGROUPS groups under the root group */
for (m = 0; m < NGROUPS; m++) {
- HDsnprintf(gname, sizeof(gname), "group%d", m);
+ snprintf(gname, sizeof(gname), "group%d", m);
gid[m] = H5Gcreate2(fid, gname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(gid[m], FAIL, "H5Gcreate2");
}
/* create NDSETS datasets under the root group */
for (n = 0; n < NDSETS; n++) {
- HDsnprintf(dname, sizeof(dname), "dataset%d", n);
+ snprintf(dname, sizeof(dname), "dataset%d", n);
dset[n] = H5Dcreate2(fid, dname, H5T_NATIVE_INT, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(dset[n], FAIL, "H5Dcreate2");
}
@@ -1280,7 +1280,7 @@ test_get_obj_ids(void)
/* Open NDSETS datasets under the root group */
for (n = 0; n < NDSETS; n++) {
- HDsnprintf(dname, sizeof(dname), "dataset%d", n);
+ snprintf(dname, sizeof(dname), "dataset%d", n);
dset[n] = H5Dopen2(fid, dname, H5P_DEFAULT);
CHECK(dset[n], FAIL, "H5Dcreate2");
}
@@ -1770,8 +1770,8 @@ test_file_is_accessible(const char *env_h5_drvr)
#if 0
int posix_ret; /* Return value from POSIX calls */
#endif
- hbool_t driver_is_default_compatible;
- herr_t ret; /* Return value from HDF5 calls */
+ bool driver_is_default_compatible;
+ herr_t ret; /* Return value from HDF5 calls */
/* Output message about test being performed */
MESSAGE(5, ("Testing Detection of HDF5 Files\n"));
@@ -1805,7 +1805,7 @@ test_file_is_accessible(const char *env_h5_drvr)
/* Verify that the file is an HDF5 file */
is_hdf5 = H5Fis_accessible(filename, fapl_id);
- VERIFY(is_hdf5, TRUE, "H5Fis_accessible");
+ VERIFY(is_hdf5, true, "H5Fis_accessible");
/*****************************************/
/* Newly created file that is still open */
@@ -1824,7 +1824,7 @@ test_file_is_accessible(const char *env_h5_drvr)
/* Verify that the file is an HDF5 file */
is_hdf5 = H5Fis_accessible(filename, fapl_id);
- VERIFY(is_hdf5, TRUE, "H5Fis_accessible");
+ VERIFY(is_hdf5, true, "H5Fis_accessible");
/* Close file */
ret = H5Fclose(fid);
@@ -1837,7 +1837,7 @@ test_file_is_accessible(const char *env_h5_drvr)
/* This test is not currently working for the family VFD.
* There are failures when creating files with userblocks.
*/
- if (0 != HDstrcmp(env_h5_drvr, "family")) {
+ if (0 != strcmp(env_h5_drvr, "family")) {
/* Create a file creation property list with a non-default user block size */
fcpl_id = H5Pcreate(H5P_FILE_CREATE);
CHECK(fcpl_id, H5I_INVALID_HID, "H5Pcreate");
@@ -1859,7 +1859,7 @@ test_file_is_accessible(const char *env_h5_drvr)
/* Verify that the file is an HDF5 file */
is_hdf5 = H5Fis_accessible(filename, fapl_id);
- VERIFY(is_hdf5, TRUE, "H5Fis_accessible");
+ VERIFY(is_hdf5, true, "H5Fis_accessible");
} /* end if */
#if 0
if (driver_is_default_compatible) {
@@ -1877,7 +1877,7 @@ test_file_is_accessible(const char *env_h5_drvr)
/* Verify that the file is NOT an HDF5 file using the base filename */
is_hdf5 = H5Fis_accessible(non_hdf5_filename, fapl_id);
- VERIFY(is_hdf5, FALSE, "H5Fis_accessible (empty non-HDF5 file)");
+ VERIFY(is_hdf5, false, "H5Fis_accessible (empty non-HDF5 file)");
/***************************/
/* Non-empty non-HDF5 file */
@@ -1901,7 +1901,7 @@ test_file_is_accessible(const char *env_h5_drvr)
/* Verify that the file is not an HDF5 file */
is_hdf5 = H5Fis_accessible(non_hdf5_filename, fapl_id);
- VERIFY(is_hdf5, FALSE, "H5Fis_accessible (non-HDF5 file)");
+ VERIFY(is_hdf5, false, "H5Fis_accessible (non-HDF5 file)");
}
/* Clean up files */
@@ -1973,7 +1973,7 @@ test_file_ishdf5(const char *env_h5_drvr)
/* Verify that the file is an HDF5 file */
is_hdf5 = H5Fis_hdf5(sb_filename);
- VERIFY(is_hdf5, TRUE, "H5Fis_hdf5");
+ VERIFY(is_hdf5, true, "H5Fis_hdf5");
/*******************************/
/* Non-default user block size */
@@ -2000,7 +2000,7 @@ test_file_ishdf5(const char *env_h5_drvr)
/* Verify that the file is an HDF5 file */
is_hdf5 = H5Fis_hdf5(sb_filename);
- VERIFY(is_hdf5, TRUE, "H5Fis_hdf5");
+ VERIFY(is_hdf5, true, "H5Fis_hdf5");
/***************************/
/* Non-empty non-HDF5 file */
@@ -2027,7 +2027,7 @@ test_file_ishdf5(const char *env_h5_drvr)
/* Verify that the file is not an HDF5 file */
is_hdf5 = H5Fis_hdf5(sb_filename);
- VERIFY(is_hdf5, FALSE, "H5Fis_hdf5");
+ VERIFY(is_hdf5, false, "H5Fis_hdf5");
/* Clean up files */
#if 0
@@ -2082,7 +2082,7 @@ test_file_delete(hid_t fapl_id)
/* Verify that the file is an HDF5 file */
is_hdf5 = H5Fis_accessible(filename, fapl_id);
- VERIFY(is_hdf5, TRUE, "H5Fis_accessible");
+ VERIFY(is_hdf5, true, "H5Fis_accessible");
/* Delete the file */
ret = H5Fdelete(filename, fapl_id);
@@ -2127,7 +2127,7 @@ test_file_delete(hid_t fapl_id)
is_hdf5 = H5Fis_accessible(filename, fapl_id);
}
H5E_END_TRY
- CHECK(is_hdf5, TRUE, "H5Fis_accessible");
+ CHECK(is_hdf5, true, "H5Fis_accessible");
/* Try to delete it (should fail) */
H5E_BEGIN_TRY
@@ -2645,7 +2645,7 @@ test_file_double_dataset_open(void)
**
*****************************************************************/
static void
-test_file_double_file_dataset_open(hbool_t new_format)
+test_file_double_file_dataset_open(bool new_format)
{
hid_t fapl = -1; /* File access property list */
hid_t dcpl = -1; /* Dataset creation property list */
@@ -3065,8 +3065,8 @@ test_userblock_file_size(const char *env_h5_drvr)
herr_t ret; /* Generic return value */
/* Don't run with multi/split, family or direct drivers */
- if (!HDstrcmp(env_h5_drvr, "multi") || !HDstrcmp(env_h5_drvr, "split") ||
- !HDstrcmp(env_h5_drvr, "family") || !HDstrcmp(env_h5_drvr, "direct"))
+ if (!strcmp(env_h5_drvr, "multi") || !strcmp(env_h5_drvr, "split") ||
+ !strcmp(env_h5_drvr, "family") || !strcmp(env_h5_drvr, "direct"))
return;
/* Output message about test being performed */
@@ -3251,7 +3251,7 @@ cal_chksum(const char *file, uint32_t *chksum)
if (file_data) {
/* Read file's data into memory */
bytes_read = HDread(fdes, file_data, (size_t)sb.st_size);
- CHECK(bytes_read == sb.st_size, FALSE, "malloc");
+ CHECK(bytes_read == sb.st_size, false, "malloc");
/* Calculate checksum */
*chksum = H5_checksum_lookup3(file_data, sizeof(file_data), 0);
@@ -3386,7 +3386,7 @@ test_userblock_alignment_helper1(hid_t fcpl, hid_t fapl)
**
*****************************************************************/
static int
-test_userblock_alignment_helper2(hid_t fapl, hbool_t open_rw)
+test_userblock_alignment_helper2(hid_t fapl, bool open_rw)
{
hid_t fid; /* File ID */
int curr_num_errs = nerrors(); /* Retrieve the current # of errors */
@@ -3486,7 +3486,7 @@ test_userblock_alignment(const char *env_h5_drvr)
/* Call helper routines to perform file manipulations */
ret = test_userblock_alignment_helper1(fcpl, fapl);
CHECK(ret, FAIL, "test_userblock_alignment_helper1");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -3516,7 +3516,7 @@ test_userblock_alignment(const char *env_h5_drvr)
/* Call helper routines to perform file manipulations */
ret = test_userblock_alignment_helper1(fcpl, fapl);
CHECK(ret, FAIL, "test_userblock_alignment_helper1");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -3546,7 +3546,7 @@ test_userblock_alignment(const char *env_h5_drvr)
/* Call helper routines to perform file manipulations */
ret = test_userblock_alignment_helper1(fcpl, fapl);
CHECK(ret, FAIL, "test_userblock_alignment_helper1");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -3650,9 +3650,9 @@ test_userblock_alignment(const char *env_h5_drvr)
CHECK(ret, FAIL, "H5Pset_alignment");
/* Call helper routines to perform file manipulations */
- ret = test_userblock_alignment_helper2(fapl, FALSE);
+ ret = test_userblock_alignment_helper2(fapl, false);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -3710,13 +3710,13 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
ret = H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST);
CHECK(ret, FAIL, "H5Pset_libver_bounds");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
/* Call helper routines to perform file manipulations */
ret = test_userblock_alignment_helper1(fcpl, fapl);
CHECK(ret, FAIL, "test_userblock_alignment_helper1");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -3740,7 +3740,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
ret = H5Pset_userblock(fcpl, (hsize_t)1024);
CHECK(ret, FAIL, "H5Pset_userblock");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)1);
ret = H5Pset_file_space_page_size(fcpl, (hsize_t)512);
/* Create file access property list */
@@ -3752,7 +3752,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
/* Call helper routines to perform file manipulations */
ret = test_userblock_alignment_helper1(fcpl, fapl);
CHECK(ret, FAIL, "test_userblock_alignment_helper1");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -3814,7 +3814,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
ret = H5Pset_userblock(fcpl, (hsize_t)512);
CHECK(ret, FAIL, "H5Pset_userblock");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, true, (hsize_t)1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
ret = H5Pset_file_space_page_size(fcpl, (hsize_t)512);
CHECK(ret, FAIL, "H5Pset_file_space_page_size");
@@ -3828,7 +3828,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
/* Call helper routines to perform file manipulations */
ret = test_userblock_alignment_helper1(fcpl, fapl);
CHECK(ret, FAIL, "test_userblock_alignment_helper1");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -3852,7 +3852,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
ret = H5Pset_userblock(fcpl, (hsize_t)512);
CHECK(ret, FAIL, "H5Pset_userblock");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_NONE, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_NONE, false, (hsize_t)1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
ret = H5Pset_file_space_page_size(fcpl, (hsize_t)512);
CHECK(ret, FAIL, "H5Pset_file_space_page_size");
@@ -3892,7 +3892,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
ret = H5Pset_userblock(fcpl, (hsize_t)1024);
CHECK(ret, FAIL, "H5Pset_userblock");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, true, (hsize_t)1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
ret = H5Pset_file_space_page_size(fcpl, (hsize_t)1023);
CHECK(ret, FAIL, "H5Pset_file_space_page_size");
@@ -3932,7 +3932,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
ret = H5Pset_userblock(fcpl, (hsize_t)1024);
CHECK(ret, FAIL, "H5Pset_userblock");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, false, (hsize_t)1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
ret = H5Pset_file_space_page_size(fcpl, (hsize_t)1023);
CHECK(ret, FAIL, "H5Pset_file_space_page_size");
@@ -3946,7 +3946,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
/* Call helper routines to perform file manipulations */
ret = test_userblock_alignment_helper1(fcpl, fapl);
CHECK(ret, FAIL, "test_userblock_alignment_helper1");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -3970,7 +3970,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
ret = H5Pset_userblock(fcpl, (hsize_t)512);
CHECK(ret, FAIL, "H5Pset_userblock");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
ret = H5Pset_file_space_page_size(fcpl, (hsize_t)1024);
CHECK(ret, FAIL, "H5Pset_file_space_page_size");
@@ -4010,7 +4010,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
ret = H5Pset_userblock(fcpl, (hsize_t)512);
CHECK(ret, FAIL, "H5Pset_userblock");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_NONE, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_NONE, false, (hsize_t)1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
ret = H5Pset_file_space_page_size(fcpl, (hsize_t)1024);
CHECK(ret, FAIL, "H5Pset_file_space_page_size");
@@ -4024,7 +4024,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
/* Call helper routines to perform file manipulations */
ret = test_userblock_alignment_helper1(fcpl, fapl);
CHECK(ret, FAIL, "test_userblock_alignment_helper1");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -4050,7 +4050,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
ret = H5Pset_userblock(fcpl, (hsize_t)512);
CHECK(ret, FAIL, "H5Pset_userblock");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
ret = H5Pset_file_space_page_size(fcpl, (hsize_t)512);
CHECK(ret, FAIL, "H5Pset_file_space_page_size");
@@ -4070,9 +4070,9 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
CHECK(ret, FAIL, "H5Pset_alignment");
/* Call helper routines to perform file manipulations */
- ret = test_userblock_alignment_helper2(fapl, FALSE);
+ ret = test_userblock_alignment_helper2(fapl, false);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -4104,7 +4104,7 @@ test_filespace_info(const char *env_h5_drvr)
hid_t fapl, new_fapl; /* File access property lists */
hid_t fcpl, fcpl1, fcpl2; /* File creation property lists */
H5F_fspace_strategy_t strategy; /* File space strategy */
- hbool_t persist; /* Persist free-space or not */
+ bool persist; /* Persist free-space or not */
hsize_t threshold; /* Free-space section threshold */
unsigned new_format; /* New or old format */
H5F_fspace_strategy_t fs_strategy; /* File space strategy--iteration variable */
@@ -4112,14 +4112,14 @@ test_filespace_info(const char *env_h5_drvr)
hsize_t fs_threshold; /* Free-space section threshold--iteration variable */
hsize_t fsp_size; /* File space page size */
char filename[FILENAME_LEN]; /* Filename to use */
- hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
+ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */
herr_t ret; /* Return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing file creation public routines: H5Pget/set_file_space_strategy & "
"H5Pget/set_file_space_page_size\n"));
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
fapl = h5_fileaccess();
h5_fixname(FILESPACE_NAME[0], fapl, filename, sizeof filename);
@@ -4137,7 +4137,7 @@ test_filespace_info(const char *env_h5_drvr)
* Check file space information from a default file creation property list.
* Values expected:
* strategy--H5F_FILE_SPACE_AGGR
- * persist--FALSE
+ * persist--false
* threshold--1
* file space page size--4096
*/
@@ -4151,7 +4151,7 @@ test_filespace_info(const char *env_h5_drvr)
/* Verify file space information */
VERIFY(strategy, H5F_FSPACE_STRATEGY_FSM_AGGR, "H5Pget_file_space_strategy");
- VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
+ VERIFY(persist, false, "H5Pget_file_space_strategy");
VERIFY(threshold, 1, "H5Pget_file_space_strategy");
/* Retrieve file space page size */
@@ -4222,7 +4222,7 @@ test_filespace_info(const char *env_h5_drvr)
* Check file space information when creating a file with default properties.
* Values expected:
* strategy--H5F_FILE_SPACE_AGGR
- * persist--FALSE
+ * persist--false
* threshold--1
* file space page size--4096
*/
@@ -4240,7 +4240,7 @@ test_filespace_info(const char *env_h5_drvr)
/* Verify file space information */
VERIFY(strategy, H5F_FSPACE_STRATEGY_FSM_AGGR, "H5Pget_file_space_strategy");
- VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
+ VERIFY(persist, false, "H5Pget_file_space_strategy");
VERIFY(threshold, 1, "H5Pget_file_space_strategy");
/* Retrieve file space page size */
@@ -4260,7 +4260,7 @@ test_filespace_info(const char *env_h5_drvr)
* latest library format and default properties.
* Values expected:
* strategy--H5F_FILE_SPACE_AGGR
- * persist--FALSE
+ * persist--false
* threshold--1
* file space page size--4096
*/
@@ -4278,7 +4278,7 @@ test_filespace_info(const char *env_h5_drvr)
/* Verify file space information */
VERIFY(strategy, H5F_FSPACE_STRATEGY_FSM_AGGR, "H5Pget_file_space_strategy");
- VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
+ VERIFY(persist, false, "H5Pget_file_space_strategy");
VERIFY(threshold, 1, "H5Pget_file_space_strategy");
/* Retrieve file space page size */
@@ -4305,7 +4305,7 @@ test_filespace_info(const char *env_h5_drvr)
* File space page size: set to 512
*
*/
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
hid_t my_fapl;
/* Set the FAPL for the type of format */
@@ -4318,8 +4318,8 @@ test_filespace_info(const char *env_h5_drvr)
my_fapl = fapl;
} /* end else */
- /* Test with TRUE or FALSE for persisting free-space */
- for (fs_persist = FALSE; fs_persist <= TRUE; fs_persist++) {
+ /* Test with true or false for persisting free-space */
+ for (fs_persist = false; fs_persist <= true; fs_persist++) {
/* Test with free-space section threshold size: 0 to 10 */
for (fs_threshold = 0; fs_threshold <= TEST_THRESHOLD10; fs_threshold++) {
@@ -4336,7 +4336,7 @@ test_filespace_info(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
/* Set file space information */
- ret = H5Pset_file_space_strategy(fcpl, fs_strategy, (hbool_t)fs_persist, fs_threshold);
+ ret = H5Pset_file_space_strategy(fcpl, fs_strategy, (bool)fs_persist, fs_threshold);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
ret = H5Pset_file_space_page_size(fcpl, FSP_SIZE512);
@@ -4350,11 +4350,11 @@ test_filespace_info(const char *env_h5_drvr)
VERIFY(strategy, fs_strategy, "H5Pget_file_space_strategy");
if (fs_strategy < H5F_FSPACE_STRATEGY_AGGR) {
- VERIFY(persist, (hbool_t)fs_persist, "H5Pget_file_space_strategy");
+ VERIFY(persist, (bool)fs_persist, "H5Pget_file_space_strategy");
VERIFY(threshold, fs_threshold, "H5Pget_file_space_strategy");
}
else {
- VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
+ VERIFY(persist, false, "H5Pget_file_space_strategy");
VERIFY(threshold, 1, "H5Pget_file_space_strategy");
}
@@ -4383,7 +4383,7 @@ test_filespace_info(const char *env_h5_drvr)
VERIFY(threshold, fs_threshold, "H5Pget_file_space_strategy");
}
else {
- VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
+ VERIFY(persist, false, "H5Pget_file_space_strategy");
VERIFY(threshold, 1, "H5Pget_file_space_strategy");
}
@@ -4415,7 +4415,7 @@ test_filespace_info(const char *env_h5_drvr)
VERIFY(threshold, fs_threshold, "H5Pget_file_space_strategy");
}
else {
- VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
+ VERIFY(persist, false, "H5Pget_file_space_strategy");
VERIFY(threshold, 1, "H5Pget_file_space_strategy");
}
@@ -4464,13 +4464,13 @@ test_filespace_info(const char *env_h5_drvr)
*****************************************************************/
#if 0
static int
-set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t split)
+set_multi_split(hid_t fapl, hsize_t pagesize, bool split)
{
H5FD_mem_t memb_map[H5FD_MEM_NTYPES];
hid_t memb_fapl_arr[H5FD_MEM_NTYPES];
char *memb_name[H5FD_MEM_NTYPES];
haddr_t memb_addr[H5FD_MEM_NTYPES];
- hbool_t relax;
+ bool relax;
H5FD_mem_t mt;
assert(split);
@@ -4537,13 +4537,13 @@ test_file_freespace(const char *env_h5_drvr)
char filename[FILENAME_LEN]; /* Filename to use */
char name[32]; /* Dataset name */
unsigned new_format; /* To use old or new format */
- hbool_t split_vfd, multi_vfd; /* Indicate multi/split driver */
+ bool split_vfd, multi_vfd; /* Indicate multi/split driver */
hsize_t expected_freespace; /* Freespace expected */
hsize_t expected_fs_del; /* Freespace expected after delete */
herr_t ret; /* Return value */
- split_vfd = !HDstrcmp(env_h5_drvr, "split");
- multi_vfd = !HDstrcmp(env_h5_drvr, "multi");
+ split_vfd = !strcmp(env_h5_drvr, "split");
+ multi_vfd = !strcmp(env_h5_drvr, "multi");
if (!split_vfd && !multi_vfd) {
fapl = h5_fileaccess();
@@ -4560,7 +4560,7 @@ test_file_freespace(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
/* Test with old & new format */
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
hid_t my_fapl;
/* Set the FAPL for the type of format */
@@ -4574,7 +4574,7 @@ test_file_freespace(const char *env_h5_drvr)
CHECK(ret, FAIL, "set_multi_split");
}
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)1);
CHECK(ret, FAIL, "H5P_set_file_space_strategy");
expected_freespace = 4534;
@@ -4630,7 +4630,7 @@ test_file_freespace(const char *env_h5_drvr)
/* Create datasets in file */
for (u = 0; u < 10; u++) {
- HDsnprintf(name, sizeof(name), "Dataset %u", u);
+ snprintf(name, sizeof(name), "Dataset %u", u);
dset = H5Dcreate2(file, name, H5T_STD_U32LE, dspace, H5P_DEFAULT, dcpl, H5P_DEFAULT);
CHECK(dset, FAIL, "H5Dcreate2");
@@ -4653,7 +4653,7 @@ test_file_freespace(const char *env_h5_drvr)
#endif
/* Delete datasets in file */
for (k = 9; k >= 0; k--) {
- HDsnprintf(name, sizeof(name), "Dataset %u", (unsigned)k);
+ snprintf(name, sizeof(name), "Dataset %u", (unsigned)k);
ret = H5Ldelete(file, name, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Ldelete");
} /* end for */
@@ -4689,7 +4689,7 @@ test_file_freespace(const char *env_h5_drvr)
**
*****************************************************************/
static void
-test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
+test_sects_freespace(const char *env_h5_drvr, bool new_format)
{
char filename[FILENAME_LEN]; /* Filename to use */
hid_t file; /* File ID */
@@ -4715,14 +4715,14 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
hsize_t dims[1]; /* Dimension sizes */
unsigned u; /* Local index variable */
H5FD_mem_t type;
- hbool_t split_vfd = FALSE, multi_vfd = FALSE;
+ bool split_vfd = false, multi_vfd = false;
herr_t ret; /* Return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing H5Fget_free_sections()--free-space section info in the file\n"));
- split_vfd = !HDstrcmp(env_h5_drvr, "split");
- multi_vfd = !HDstrcmp(env_h5_drvr, "multi");
+ split_vfd = !strcmp(env_h5_drvr, "split");
+ multi_vfd = !strcmp(env_h5_drvr, "multi");
if (!split_vfd && !multi_vfd) {
@@ -4738,7 +4738,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
CHECK(ret, FAIL, "H5Pset_libver_bounds");
/* Set to paged aggregation and persistent free-space */
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, true, (hsize_t)1);
CHECK(ret, FAIL, "H5Pget_file_space_strategy");
/* Set up paged aligned address space for multi/split driver */
@@ -4748,7 +4748,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
}
}
else {
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, true, (hsize_t)1);
CHECK(ret, FAIL, "H5Pget_file_space_strategy");
}
@@ -4784,7 +4784,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
/* Create datasets in file */
for (u = 0; u < 10; u++) {
- HDsnprintf(name, sizeof(name), "Dataset %u", u);
+ snprintf(name, sizeof(name), "Dataset %u", u);
dset = H5Dcreate2(file, name, H5T_STD_U32LE, dspace, H5P_DEFAULT, dcpl, H5P_DEFAULT);
CHECK(dset, FAIL, "H5Dcreate2");
@@ -4802,7 +4802,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
/* Delete odd-numbered datasets in file */
for (u = 0; u < 10; u++) {
- HDsnprintf(name, sizeof(name), "Dataset %u", u);
+ snprintf(name, sizeof(name), "Dataset %u", u);
if (u % 2) {
ret = H5Ldelete(file, name, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Ldelete");
@@ -4961,7 +4961,7 @@ test_filespace_compatible(void)
ssize_t nread; /* Number of bytes read in */
unsigned i, j; /* Local index variable */
hssize_t free_space; /* Amount of free-space in the file */
- hbool_t persist; /* Persist free-space or not */
+ bool persist; /* Persist free-space or not */
hsize_t threshold; /* Free-space section threshold */
H5F_fspace_strategy_t strategy; /* File space handling strategy */
herr_t ret; /* Return value */
@@ -5008,10 +5008,10 @@ test_filespace_compatible(void)
CHECK(ret, FAIL, "H5Pget_file_space_strategy");
/* File space handling strategy should be H5F_FSPACE_STRATEGY_FSM_AGGR */
- /* Persisting free-space should be FALSE */
+ /* Persisting free-space should be false */
/* Free-space section threshold should be 1 */
VERIFY(strategy, H5F_FSPACE_STRATEGY_FSM_AGGR, "H5Pget_file_space_strategy");
- VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
+ VERIFY(persist, false, "H5Pget_file_space_strategy");
VERIFY(threshold, 1, "H5Pget_file_space_strategy");
/* Generate raw data */
@@ -5088,7 +5088,7 @@ test_filespace_1_10_0_compatible(void)
hid_t fid = -1; /* File id */
hid_t did = -1; /* Dataset id */
hid_t fcpl; /* File creation property list */
- hbool_t persist; /* Persist free-space or not */
+ bool persist; /* Persist free-space or not */
hsize_t threshold; /* Free-space section threshold */
H5F_fspace_strategy_t strategy; /* File space handling strategy */
int wbuf[24]; /* Buffer for dataset data */
@@ -5142,7 +5142,7 @@ test_filespace_1_10_0_compatible(void)
case 1:
VERIFY(strategy, H5F_FSPACE_STRATEGY_FSM_AGGR, "H5Pget_file_space_strategy");
- VERIFY(persist, TRUE, "H5Pget_file_space_strategy");
+ VERIFY(persist, true, "H5Pget_file_space_strategy");
#if 0
VERIFY(threshold, H5F_FREE_SPACE_THRESHOLD_DEF, "H5Pget_file_space_strategy");
#endif
@@ -5413,7 +5413,7 @@ test_filespace_round_compatible(void)
hid_t fcpl = -1; /* File creation property list ID */
unsigned j; /* Local index variable */
H5F_fspace_strategy_t strategy; /* File space strategy */
- hbool_t persist; /* Persist free-space or not */
+ bool persist; /* Persist free-space or not */
hsize_t threshold; /* Free-space section threshold */
hssize_t free_space; /* Amount of free space in the file */
int status; /* Status from copying the existing file */
@@ -5438,7 +5438,7 @@ test_filespace_round_compatible(void)
ret = H5Pget_file_space_strategy(fcpl, &strategy, &persist, &threshold);
CHECK(ret, FAIL, "H5Pget_file_space_strategy");
VERIFY(strategy, H5F_FSPACE_STRATEGY_FSM_AGGR, "H5Pget_file_space_strategy");
- VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
+ VERIFY(persist, false, "H5Pget_file_space_strategy");
VERIFY(threshold, 1, "H5Pget_file_space_strategy");
/* There should not be any free space in the file */
@@ -5672,7 +5672,7 @@ test_libver_bounds_open(void)
/* Get new low bound and verify that it has been upgraded properly */
ret = H5Pget_libver_bounds(new_fapl, &new_low, NULL);
CHECK(ret, FAIL, "H5Pget_libver_bounds");
- VERIFY(new_low >= H5F_LIBVER_V110, TRUE, "Low bound should be upgraded to at least H5F_LIBVER_V110");
+ VERIFY(new_low >= H5F_LIBVER_V110, true, "Low bound should be upgraded to at least H5F_LIBVER_V110");
ret = H5Pclose(new_fapl);
CHECK(ret, FAIL, "H5Pclose");
@@ -5720,7 +5720,7 @@ test_libver_bounds_copy(void)
hid_t fapl = -1; /* File access property list ID */
const char *src_fname; /* Source file name */
herr_t ret; /* Generic return value */
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
/* Output message about the test being performed */
MESSAGE(5, ("Testing H5Ocopy a dataset in a 1.8 library file to a 1.10 library file\n"));
@@ -5910,14 +5910,14 @@ test_libver_bounds_super(hid_t fapl, const char *env_h5_drvr)
/* Verify superblock version when creating a file with input fapl,
fcpl #A and with/without SWMR access */
if (H5FD__supports_swmr_test(env_h5_drvr))
- test_libver_bounds_super_create(fapl, fcpl, TRUE, FALSE);
- test_libver_bounds_super_create(fapl, fcpl, FALSE, FALSE);
+ test_libver_bounds_super_create(fapl, fcpl, true, false);
+ test_libver_bounds_super_create(fapl, fcpl, false, false);
/* Verify superblock version when opening a file which is created
with input fapl, fcpl #A and with/without SWMR access */
if (H5FD__supports_swmr_test(env_h5_drvr))
- test_libver_bounds_super_open(fapl, fcpl, TRUE, FALSE);
- test_libver_bounds_super_open(fapl, fcpl, FALSE, FALSE);
+ test_libver_bounds_super_open(fapl, fcpl, true, false);
+ test_libver_bounds_super_open(fapl, fcpl, false, false);
/* Close the fcpl */
ret = H5Pclose(fcpl);
@@ -5933,14 +5933,14 @@ test_libver_bounds_super(hid_t fapl, const char *env_h5_drvr)
/* Verify superblock version when creating a file with input fapl,
fcpl #B and with/without SWMR access */
if (H5FD__supports_swmr_test(env_h5_drvr))
- test_libver_bounds_super_create(fapl, fcpl, TRUE, FALSE);
- test_libver_bounds_super_create(fapl, fcpl, FALSE, FALSE);
+ test_libver_bounds_super_create(fapl, fcpl, true, false);
+ test_libver_bounds_super_create(fapl, fcpl, false, false);
/* Verify superblock version when opening a file which is created
with input fapl, fcpl #B and with/without SWMR access */
if (H5FD__supports_swmr_test(env_h5_drvr))
- test_libver_bounds_super_open(fapl, fcpl, TRUE, FALSE);
- test_libver_bounds_super_open(fapl, fcpl, FALSE, FALSE);
+ test_libver_bounds_super_open(fapl, fcpl, true, false);
+ test_libver_bounds_super_open(fapl, fcpl, false, false);
/* Close the fcpl */
ret = H5Pclose(fcpl);
@@ -5958,14 +5958,14 @@ test_libver_bounds_super(hid_t fapl, const char *env_h5_drvr)
/* Verify superblock version when creating a file with input fapl,
fcpl #C and with/without SWMR access */
if (H5FD__supports_swmr_test(env_h5_drvr))
- test_libver_bounds_super_create(fapl, fcpl, TRUE, FALSE);
- test_libver_bounds_super_create(fapl, fcpl, FALSE, FALSE);
+ test_libver_bounds_super_create(fapl, fcpl, true, false);
+ test_libver_bounds_super_create(fapl, fcpl, false, false);
/* Verify superblock version when opening a file which is created
with input fapl, fcpl #C and with/without SWMR access */
if (H5FD__supports_swmr_test(env_h5_drvr))
- test_libver_bounds_super_open(fapl, fcpl, TRUE, FALSE);
- test_libver_bounds_super_open(fapl, fcpl, FALSE, FALSE);
+ test_libver_bounds_super_open(fapl, fcpl, true, false);
+ test_libver_bounds_super_open(fapl, fcpl, false, false);
/* Close the fcpl */
ret = H5Pclose(fcpl);
@@ -5982,14 +5982,14 @@ test_libver_bounds_super(hid_t fapl, const char *env_h5_drvr)
/* Verify superblock version when creating a file with input fapl,
fcpl #D and with/without SWMR access */
if (H5FD__supports_swmr_test(env_h5_drvr))
- test_libver_bounds_super_create(fapl, fcpl, TRUE, TRUE);
- test_libver_bounds_super_create(fapl, fcpl, FALSE, TRUE);
+ test_libver_bounds_super_create(fapl, fcpl, true, true);
+ test_libver_bounds_super_create(fapl, fcpl, false, true);
/* Verify superblock version when opening a file which is created
with input fapl, fcpl #D and with/without SWMR access */
if (H5FD__supports_swmr_test(env_h5_drvr))
- test_libver_bounds_super_open(fapl, fcpl, TRUE, TRUE);
- test_libver_bounds_super_open(fapl, fcpl, FALSE, TRUE);
+ test_libver_bounds_super_open(fapl, fcpl, true, true);
+ test_libver_bounds_super_open(fapl, fcpl, false, true);
/* Close the fcpl */
ret = H5Pclose(fcpl);
@@ -6056,7 +6056,7 @@ test_libver_bounds_super_create(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t n
#endif
H5F_libver_t low, high; /* Low and high bounds */
#if 0
- hbool_t ok; /* The result is ok or not */
+ bool ok; /* The result is ok or not */
#endif
herr_t ret; /* The return value */
@@ -6083,17 +6083,17 @@ test_libver_bounds_super_create(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t n
else if (is_swmr) { /* SWMR is enabled */
if (high >= H5F_LIBVER_V110) { /* Should succeed */
- VERIFY(fid >= 0, TRUE, "H5Fcreate");
+ VERIFY(fid >= 0, true, "H5Fcreate");
#if 0
VERIFY(HDF5_SUPERBLOCK_VERSION_3, f->shared->sblock->super_vers, "HDF5_superblock_ver_bounds");
- VERIFY(f->shared->low_bound >= H5F_LIBVER_V110, TRUE, "HDF5_superblock_ver_bounds");
+ VERIFY(f->shared->low_bound >= H5F_LIBVER_V110, true, "HDF5_superblock_ver_bounds");
#endif
}
else /* Should fail */
- VERIFY(fid >= 0, FALSE, "H5Fcreate");
+ VERIFY(fid >= 0, false, "H5Fcreate");
}
else { /* Should succeed */
- VERIFY(fid >= 0, TRUE, "H5Fcreate");
+ VERIFY(fid >= 0, true, "H5Fcreate");
#if 0
VERIFY(low, f->shared->low_bound, "HDF5_superblock_ver_bounds");
@@ -6102,12 +6102,12 @@ test_libver_bounds_super_create(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t n
ok = (f->shared->sblock->super_vers == HDF5_SUPERBLOCK_VERSION_DEF ||
f->shared->sblock->super_vers == HDF5_SUPERBLOCK_VERSION_1 ||
f->shared->sblock->super_vers == HDF5_SUPERBLOCK_VERSION_2);
- VERIFY(ok, TRUE, "HDF5_superblock_ver_bounds");
+ VERIFY(ok, true, "HDF5_superblock_ver_bounds");
break;
case H5F_LIBVER_V18:
ok = (f->shared->sblock->super_vers == HDF5_SUPERBLOCK_VERSION_2);
- VERIFY(ok, TRUE, "HDF5_superblock_ver_bounds");
+ VERIFY(ok, true, "HDF5_superblock_ver_bounds");
break;
case H5F_LIBVER_V110:
@@ -6115,7 +6115,7 @@ test_libver_bounds_super_create(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t n
case H5F_LIBVER_V114:
case H5F_LIBVER_V116:
ok = (f->shared->sblock->super_vers == HDF5_SUPERBLOCK_VERSION_3);
- VERIFY(ok, TRUE, "HDF5_superblock_ver_bounds");
+ VERIFY(ok, true, "HDF5_superblock_ver_bounds");
break;
case H5F_LIBVER_ERROR:
@@ -6251,7 +6251,7 @@ test_libver_bounds_super_open(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t non
VERIFY(fid, H5I_INVALID_HID, "H5Fcreate");
}
else {
- VERIFY(fid >= 0, TRUE, "H5Fcreate");
+ VERIFY(fid >= 0, true, "H5Fcreate");
#if 0
/* Get the internal file pointer */
f = (H5F_t *)H5VL_object(fid);
@@ -6304,8 +6304,8 @@ test_libver_bounds_super_open(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t non
case 3:
if (high >= H5F_LIBVER_V110) {
/* Should succeed */
- VERIFY(fid >= 0, TRUE, "H5Fopen");
- VERIFY(f->shared->low_bound >= H5F_LIBVER_V110, TRUE,
+ VERIFY(fid >= 0, true, "H5Fopen");
+ VERIFY(f->shared->low_bound >= H5F_LIBVER_V110, true,
"HDF5_superblock_ver_bounds");
/* Close the file */
@@ -6313,15 +6313,15 @@ test_libver_bounds_super_open(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t non
CHECK(ret, FAIL, "H5Fclose");
}
else /* Should fail */
- VERIFY(fid >= 0, FALSE, "H5Fopen");
+ VERIFY(fid >= 0, false, "H5Fopen");
break;
case 2:
if (is_swmr) /* Should fail */
- VERIFY(fid >= 0, FALSE, "H5Fopen");
+ VERIFY(fid >= 0, false, "H5Fopen");
else { /* Should succeed */
- VERIFY(fid >= 0, TRUE, "H5Fopen");
- VERIFY(f->shared->low_bound >= H5F_LIBVER_V18, TRUE,
+ VERIFY(fid >= 0, true, "H5Fopen");
+ VERIFY(f->shared->low_bound >= H5F_LIBVER_V18, true,
"HDF5_superblock_ver_bounds");
/* Close the file */
@@ -6333,9 +6333,9 @@ test_libver_bounds_super_open(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t non
case 1:
case 0:
if (is_swmr) /* Should fail */
- VERIFY(fid >= 0, FALSE, "H5Fopen");
+ VERIFY(fid >= 0, false, "H5Fopen");
else { /* Should succeed */
- VERIFY(fid >= 0, TRUE, "H5Fopen");
+ VERIFY(fid >= 0, true, "H5Fopen");
VERIFY(f->shared->low_bound, low, "HDF5_superblock_ver_bounds");
ret = H5Fclose(fid);
@@ -7652,37 +7652,37 @@ test_libver_macros(void)
/* Output message about test being performed */
MESSAGE(5, ("Testing macros for library version comparison\n"));
- VERIFY(H5_VERSION_GE(major, minor, release), TRUE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major - 1, minor, release), TRUE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major - 1, minor + 1, release), TRUE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major - 1, minor, release + 1), TRUE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major, minor - 1, release), TRUE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major, minor - 1, release + 1), TRUE, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major, minor, release), true, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major - 1, minor, release), true, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major - 1, minor + 1, release), true, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major - 1, minor, release + 1), true, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major, minor - 1, release), true, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major, minor - 1, release + 1), true, "H5_VERSION_GE");
if (H5_VERS_RELEASE > 0)
- VERIFY(H5_VERSION_GE(major, minor, release - 1), TRUE, "H5_VERSION_GE");
-
- VERIFY(H5_VERSION_GE(major + 1, minor, release), FALSE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major + 1, minor - 1, release), FALSE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major + 1, minor - 1, release - 1), FALSE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major, minor + 1, release), FALSE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major, minor + 1, release - 1), FALSE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major, minor, release + 1), FALSE, "H5_VERSION_GE");
-
- VERIFY(H5_VERSION_LE(major, minor, release), TRUE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major + 1, minor, release), TRUE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major + 1, minor - 1, release), TRUE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major + 1, minor - 1, release - 1), TRUE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major, minor + 1, release), TRUE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major, minor + 1, release - 1), TRUE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major, minor, release + 1), TRUE, "H5_VERSION_LE");
-
- VERIFY(H5_VERSION_LE(major - 1, minor, release), FALSE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major - 1, minor + 1, release), FALSE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major - 1, minor + 1, release + 1), FALSE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major, minor - 1, release), FALSE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major, minor - 1, release + 1), FALSE, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_GE(major, minor, release - 1), true, "H5_VERSION_GE");
+
+ VERIFY(H5_VERSION_GE(major + 1, minor, release), false, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major + 1, minor - 1, release), false, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major + 1, minor - 1, release - 1), false, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major, minor + 1, release), false, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major, minor + 1, release - 1), false, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major, minor, release + 1), false, "H5_VERSION_GE");
+
+ VERIFY(H5_VERSION_LE(major, minor, release), true, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major + 1, minor, release), true, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major + 1, minor - 1, release), true, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major + 1, minor - 1, release - 1), true, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major, minor + 1, release), true, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major, minor + 1, release - 1), true, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major, minor, release + 1), true, "H5_VERSION_LE");
+
+ VERIFY(H5_VERSION_LE(major - 1, minor, release), false, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major - 1, minor + 1, release), false, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major - 1, minor + 1, release + 1), false, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major, minor - 1, release), false, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major, minor - 1, release + 1), false, "H5_VERSION_LE");
if (H5_VERS_RELEASE > 0)
- VERIFY(H5_VERSION_LE(major, minor, release - 1), FALSE, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major, minor, release - 1), false, "H5_VERSION_LE");
} /* test_libver_macros() */
/****************************************************************
@@ -7730,7 +7730,7 @@ test_libver_macros2(void)
CHECK(ret, FAIL, "H5Lunlink");
status = H5Lexists(file, "Group", H5P_DEFAULT);
- VERIFY(status, FALSE, "H5Lexists");
+ VERIFY(status, false, "H5Lexists");
#else
ret = H5Gunlink(file, "Group");
CHECK(ret, FAIL, "H5Gunlink");
@@ -7798,7 +7798,7 @@ test_incr_filesize(void)
CHECK(fcpl, FAIL, "H5Pcreate");
/* Set file space strategy */
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, false, (hsize_t)1);
CHECK(ret, FAIL, "H5P_set_file_space_strategy");
/* Create the test file */
@@ -7819,7 +7819,7 @@ test_incr_filesize(void)
/* Create datasets in file */
for (u = 0; u < 10; u++) {
- HDsnprintf(name, sizeof(name), "Dataset %u", u);
+ snprintf(name, sizeof(name), "Dataset %u", u);
dset = H5Dcreate2(fid, name, H5T_STD_U32LE, dspace, H5P_DEFAULT, dcpl, H5P_DEFAULT);
CHECK(dset, FAIL, "H5Dcreate2");
@@ -7896,7 +7896,7 @@ test_min_dset_ohdr(void)
char filename[FILENAME_LEN] = "";
hid_t file_id = -1;
hid_t file2_id = -1;
- hbool_t minimize;
+ bool minimize;
herr_t ret;
MESSAGE(5, ("Testing dataset object header minimization\n"));
@@ -7919,17 +7919,17 @@ test_min_dset_ohdr(void)
*/
ret = H5Fget_dset_no_attrs_hint(file_id, &minimize);
CHECK(ret, FAIL, "H5Fget_dset_no_attrs_hint");
- VERIFY(minimize, FALSE, "minimize flag");
+ VERIFY(minimize, false, "minimize flag");
/*----------------------------------------
- * TEST set to TRUE
+ * TEST set to true
*/
- ret = H5Fset_dset_no_attrs_hint(file_id, TRUE);
+ ret = H5Fset_dset_no_attrs_hint(file_id, true);
CHECK(ret, FAIL, "H5Fset_dset_no_attrs_hint");
ret = H5Fget_dset_no_attrs_hint(file_id, &minimize);
CHECK(ret, FAIL, "H5Fget_dset_no_attrs_hint");
- VERIFY(minimize, TRUE, "minimize flag");
+ VERIFY(minimize, true, "minimize flag");
/*----------------------------------------
* TEST second file open on same filename
@@ -7937,41 +7937,41 @@ test_min_dset_ohdr(void)
file2_id = H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT);
CHECK_I(file2_id, "H5Fopen");
- /* verify TRUE setting on second open
+ /* verify true setting on second open
*/
ret = H5Fget_dset_no_attrs_hint(file_id, &minimize);
CHECK(ret, FAIL, "H5Fget_dset_no_attrs_hint");
- VERIFY(minimize, TRUE, "minimize flag");
+ VERIFY(minimize, true, "minimize flag");
- /* re-set to FALSE on first open
+ /* re-set to false on first open
*/
- ret = H5Fset_dset_no_attrs_hint(file_id, FALSE);
+ ret = H5Fset_dset_no_attrs_hint(file_id, false);
CHECK(ret, FAIL, "H5Fset_dset_no_attrs_hint");
- /* verify FALSE set on both opens
+ /* verify false set on both opens
*/
ret = H5Fget_dset_no_attrs_hint(file_id, &minimize);
CHECK(ret, FAIL, "H5Fget_dset_no_attrs_hint");
- VERIFY(minimize, FALSE, "minimize flag");
+ VERIFY(minimize, false, "minimize flag");
ret = H5Fget_dset_no_attrs_hint(file2_id, &minimize);
CHECK(ret, FAIL, "H5Fget_dset_no_attrs_hint");
- VERIFY(minimize, FALSE, "minimize flag");
+ VERIFY(minimize, false, "minimize flag");
- /* re-set to TRUE on second open
+ /* re-set to true on second open
*/
- ret = H5Fset_dset_no_attrs_hint(file2_id, TRUE);
+ ret = H5Fset_dset_no_attrs_hint(file2_id, true);
CHECK(ret, FAIL, "H5Fset_dset_no_attrs_hint");
- /* verify TRUE set on both opens
+ /* verify true set on both opens
*/
ret = H5Fget_dset_no_attrs_hint(file_id, &minimize);
CHECK(ret, FAIL, "H5Fget_dset_no_attrs_hint");
- VERIFY(minimize, TRUE, "minimize flag");
+ VERIFY(minimize, true, "minimize flag");
ret = H5Fget_dset_no_attrs_hint(file2_id, &minimize);
CHECK(ret, FAIL, "H5Fget_dset_no_attrs_hint");
- VERIFY(minimize, TRUE, "minimize flag");
+ VERIFY(minimize, true, "minimize flag");
/*----------------------------------------
* TEST error cases
@@ -7980,7 +7980,7 @@ test_min_dset_ohdr(void)
/* trying to set with invalid file ID */
H5E_BEGIN_TRY
{
- ret = H5Fset_dset_no_attrs_hint(-1, TRUE);
+ ret = H5Fset_dset_no_attrs_hint(-1, true);
}
H5E_END_TRY
VERIFY(ret, FAIL, "H5Fset_dset_no_attrs_hint");
@@ -8253,14 +8253,14 @@ test_file(void)
{
const char *env_h5_drvr; /* File Driver value from environment */
hid_t fapl_id = H5I_INVALID_HID; /* VFD-dependent fapl ID */
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
herr_t ret;
/* Output message about test being performed */
MESSAGE(5, ("Testing Low-Level File I/O\n"));
/* Get the VFD to use */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
@@ -8288,8 +8288,8 @@ test_file(void)
test_file_double_group_open(); /* Test opening same group from two files works properly */
test_file_double_dataset_open(); /* Test opening same dataset from two files works properly */
test_file_double_datatype_open(); /* Test opening same named datatype from two files works properly */
- test_file_double_file_dataset_open(TRUE);
- test_file_double_file_dataset_open(FALSE);
+ test_file_double_file_dataset_open(true);
+ test_file_double_file_dataset_open(false);
#if 0
test_userblock_file_size(
env_h5_drvr); /* Tests that files created with a userblock have the correct size */
@@ -8310,10 +8310,10 @@ test_file(void)
/* Skipped testing for multi/split drivers */
/* Setup for multi/split drivers are there already */
test_sects_freespace(env_h5_drvr,
- TRUE); /* Test file public routine H5Fget_free_sections() for new format */
+ true); /* Test file public routine H5Fget_free_sections() for new format */
/* Skipped testing for multi/split drivers */
/* Setup for multi/split drivers are there already */
- test_sects_freespace(env_h5_drvr, FALSE); /* Test file public routine H5Fget_free_sections() */
+ test_sects_freespace(env_h5_drvr, false); /* Test file public routine H5Fget_free_sections() */
/* Skipped testing for multi/split drivers */
if (driver_is_default_compatible) {
diff --git a/test/API/tgenprop.c b/test/API/tgenprop.c
index 4b64baed01d..9a1f551819f 100644
--- a/test/API/tgenprop.c
+++ b/test/API/tgenprop.c
@@ -94,7 +94,7 @@ test_genprop_basic_class(void)
/* Check class name */
name = H5Pget_class_name(cid1);
CHECK_PTR(name, "H5Pget_class_name");
- if (HDstrcmp(name, CLASS1_NAME) != 0)
+ if (strcmp(name, CLASS1_NAME) != 0)
TestErrPrintf("Class names don't match!, name=%s, CLASS1_NAME=%s\n", name, CLASS1_NAME);
H5free_memory(name);
@@ -125,7 +125,7 @@ test_genprop_basic_class(void)
/* Check class name */
name = H5Pget_class_name(cid1);
CHECK_PTR(name, "H5Pget_class_name");
- if (HDstrcmp(name, CLASS2_NAME) != 0)
+ if (strcmp(name, CLASS2_NAME) != 0)
TestErrPrintf("Class names don't match!, name=%s, CLASS2_NAME=%s\n", name, CLASS2_NAME);
H5free_memory(name);
@@ -313,7 +313,7 @@ test_genprop_iter1(hid_t H5_ATTR_UNUSED id, const char *name, void *iter_data)
{
iter_data_t *idata = (iter_data_t *)iter_data;
- return HDstrcmp(name, idata->names[idata->iter_count++]);
+ return strcmp(name, idata->names[idata->iter_count++]);
}
/****************************************************************
@@ -868,7 +868,7 @@ test_genprop_iter2(hid_t H5_ATTR_UNUSED id, const char *name, void *iter_data)
{
iter_data_t *idata = (iter_data_t *)iter_data;
- return HDstrcmp(name, idata->names[idata->iter_count++]);
+ return strcmp(name, idata->names[idata->iter_count++]);
}
/****************************************************************
@@ -1026,7 +1026,7 @@ test_genprop_prop_crt_cb1(const char *name, size_t size, void *def_value)
{
/* Set the information from the creation call */
prop1_cb_info.crt_count++;
- prop1_cb_info.crt_name = HDstrdup(name);
+ prop1_cb_info.crt_name = strdup(name);
prop1_cb_info.crt_value = malloc(size);
memcpy(prop1_cb_info.crt_value, def_value, size);
@@ -1045,7 +1045,7 @@ test_genprop_prop_set_cb1(hid_t plist_id, const char *name, size_t size, void *v
prop1_cb_info.set_count++;
prop1_cb_info.set_plist_id = plist_id;
if (prop1_cb_info.set_name == NULL)
- prop1_cb_info.set_name = HDstrdup(name);
+ prop1_cb_info.set_name = strdup(name);
if (prop1_cb_info.set_value == NULL)
prop1_cb_info.set_value = malloc(size);
memcpy(prop1_cb_info.set_value, value, size);
@@ -1065,7 +1065,7 @@ test_genprop_prop_get_cb1(hid_t plist_id, const char *name, size_t size, void *v
prop1_cb_info.get_count++;
prop1_cb_info.get_plist_id = plist_id;
if (prop1_cb_info.get_name == NULL)
- prop1_cb_info.get_name = HDstrdup(name);
+ prop1_cb_info.get_name = strdup(name);
if (prop1_cb_info.get_value == NULL)
prop1_cb_info.get_value = malloc(size);
memcpy(prop1_cb_info.get_value, value, size);
@@ -1084,7 +1084,7 @@ test_genprop_prop_cop_cb1(const char *name, size_t size, void *value)
/* Set the information from the get call */
prop1_cb_info.cop_count++;
if (prop1_cb_info.cop_name == NULL)
- prop1_cb_info.cop_name = HDstrdup(name);
+ prop1_cb_info.cop_name = strdup(name);
if (prop1_cb_info.cop_value == NULL)
prop1_cb_info.cop_value = malloc(size);
memcpy(prop1_cb_info.cop_value, value, size);
@@ -1131,7 +1131,7 @@ test_genprop_prop_cls_cb1(const char *name, size_t size, void *value)
/* Set the information from the close call */
prop1_cb_info.cls_count++;
if (prop1_cb_info.cls_name == NULL)
- prop1_cb_info.cls_name = HDstrdup(name);
+ prop1_cb_info.cls_name = strdup(name);
if (prop1_cb_info.cls_value == NULL)
prop1_cb_info.cls_value = malloc(size);
memcpy(prop1_cb_info.cls_value, value, size);
@@ -1150,7 +1150,7 @@ test_genprop_prop_del_cb2(hid_t plist_id, const char *name, size_t size, void *v
/* Set the information from the delete call */
prop2_cb_info.del_count++;
prop2_cb_info.del_plist_id = plist_id;
- prop2_cb_info.del_name = HDstrdup(name);
+ prop2_cb_info.del_name = strdup(name);
prop2_cb_info.del_value = malloc(size);
memcpy(prop2_cb_info.del_value, value, size);
@@ -1238,7 +1238,7 @@ test_genprop_list_callback(void)
/* Verify creation callback information for properties tracked */
VERIFY(prop1_cb_info.crt_count, 1, "H5Pcreate");
- if (HDstrcmp(prop1_cb_info.crt_name, PROP1_NAME) != 0)
+ if (strcmp(prop1_cb_info.crt_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop1_cb_info.crt_value, PROP1_DEF_VALUE, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
@@ -1274,7 +1274,7 @@ test_genprop_list_callback(void)
/* Verify get callback information for properties tracked */
VERIFY(prop1_cb_info.get_count, 1, "H5Pget");
VERIFY(prop1_cb_info.get_plist_id, lid1, "H5Pget");
- if (HDstrcmp(prop1_cb_info.get_name, PROP1_NAME) != 0)
+ if (strcmp(prop1_cb_info.get_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop1_cb_info.get_value, PROP1_DEF_VALUE, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
@@ -1286,7 +1286,7 @@ test_genprop_list_callback(void)
/* Verify set callback information for properties tracked */
VERIFY(prop1_cb_info.set_count, 1, "H5Pset");
VERIFY(prop1_cb_info.set_plist_id, lid1, "H5Pset");
- if (HDstrcmp(prop1_cb_info.set_name, PROP1_NAME) != 0)
+ if (strcmp(prop1_cb_info.set_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop1_cb_info.set_value, &prop1_new_value, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
@@ -1309,7 +1309,7 @@ test_genprop_list_callback(void)
/* Verify get callback information again for properties tracked */
VERIFY(prop1_cb_info.get_count, 2, "H5Pget");
VERIFY(prop1_cb_info.get_plist_id, lid1, "H5Pget");
- if (HDstrcmp(prop1_cb_info.get_name, PROP1_NAME) != 0)
+ if (strcmp(prop1_cb_info.get_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop1_cb_info.get_value, &prop1_new_value, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
@@ -1321,7 +1321,7 @@ test_genprop_list_callback(void)
/* Verify delete callback information for properties tracked */
VERIFY(prop2_cb_info.del_count, 1, "H5Premove");
VERIFY(prop2_cb_info.del_plist_id, lid1, "H5Premove");
- if (HDstrcmp(prop2_cb_info.del_name, PROP2_NAME) != 0)
+ if (strcmp(prop2_cb_info.del_name, PROP2_NAME) != 0)
TestErrPrintf("Property #2 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop2_cb_info.del_value, PROP2_DEF_VALUE, PROP2_SIZE) != 0)
TestErrPrintf("Property #2 value doesn't match!, line=%d\n", __LINE__);
@@ -1332,7 +1332,7 @@ test_genprop_list_callback(void)
/* Verify copy callback information for properties tracked */
VERIFY(prop1_cb_info.cop_count, 1, "H5Pcopy");
- if (HDstrcmp(prop1_cb_info.cop_name, PROP1_NAME) != 0)
+ if (strcmp(prop1_cb_info.cop_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop1_cb_info.cop_value, &prop1_new_value, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
@@ -1355,7 +1355,7 @@ test_genprop_list_callback(void)
/* Verify close callback information for properties tracked */
VERIFY(prop1_cb_info.cls_count, 1, "H5Pclose");
- if (HDstrcmp(prop1_cb_info.cls_name, PROP1_NAME) != 0)
+ if (strcmp(prop1_cb_info.cls_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop1_cb_info.cls_value, &prop1_new_value, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
@@ -1811,7 +1811,7 @@ test_genprop_path(void)
/* Get full path for first class */
path = H5P__get_class_path_test(cid1);
CHECK_PTR(path, "H5P__get_class_path_test");
- if (HDstrcmp(path, CLASS1_PATH) != 0)
+ if (strcmp(path, CLASS1_PATH) != 0)
TestErrPrintf("Class names don't match!, path=%s, CLASS1_PATH=%s\n", path, CLASS1_PATH);
H5free_memory(path);
#endif
@@ -1827,7 +1827,7 @@ test_genprop_path(void)
/* Get full path for second class */
path = H5P__get_class_path_test(cid2);
CHECK_PTR(path, "H5P__get_class_path_test");
- if (HDstrcmp(path, CLASS2_PATH) != 0)
+ if (strcmp(path, CLASS2_PATH) != 0)
TestErrPrintf("Class names don't match!, path=%s, CLASS2_PATH=%s\n", path, CLASS2_PATH);
/* Open a copy of the class with the path name */
@@ -1888,7 +1888,7 @@ test_genprop_refcount(void)
/* Check class name */
name = H5Pget_class_name(cid1);
CHECK_PTR(name, "H5Pget_class_name");
- if (HDstrcmp(name, CLASS1_NAME) != 0)
+ if (strcmp(name, CLASS1_NAME) != 0)
TestErrPrintf("Class names don't match!, name=%s, CLASS1_NAME=%s\n", name, CLASS1_NAME);
H5free_memory(name);
@@ -1907,7 +1907,7 @@ test_genprop_refcount(void)
/* Check class name */
name = H5Pget_class_name(cid1);
CHECK_PTR(name, "H5Pget_class_name");
- if (HDstrcmp(name, CLASS1_NAME) != 0)
+ if (strcmp(name, CLASS1_NAME) != 0)
TestErrPrintf("Class names don't match!, name=%s, CLASS1_NAME=%s\n", name, CLASS1_NAME);
H5free_memory(name);
@@ -1918,7 +1918,7 @@ test_genprop_refcount(void)
/* Check class name */
name = H5Pget_class_name(cid1);
CHECK_PTR(name, "H5Pget_class_name");
- if (HDstrcmp(name, CLASS1_NAME) != 0)
+ if (strcmp(name, CLASS1_NAME) != 0)
TestErrPrintf("Class names don't match!, name=%s, CLASS1_NAME=%s\n", name, CLASS1_NAME);
H5free_memory(name);
diff --git a/test/API/th5o.c b/test/API/th5o.c
index 898c11ddb09..8a052ee7702 100644
--- a/test/API/th5o.c
+++ b/test/API/th5o.c
@@ -978,7 +978,7 @@ test_h5o_link(void)
/* Create LCPL with intermediate group creation flag set */
lcpl_id = H5Pcreate(H5P_LINK_CREATE);
CHECK(lcpl_id, FAIL, "H5Pcreate");
- ret = H5Pset_create_intermediate_group(lcpl_id, TRUE);
+ ret = H5Pset_create_intermediate_group(lcpl_id, true);
CHECK(ret, FAIL, "H5Pset_create_intermediate_group");
/* Create a file access property list */
@@ -1013,7 +1013,7 @@ test_h5o_link(void)
ret = H5Tcommit_anon(file_id, type_id, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tcommit_anon");
committed = H5Tcommitted(type_id);
- VERIFY(committed, TRUE, "H5Tcommitted");
+ VERIFY(committed, true, "H5Tcommitted");
/* Create a dataset with no name using the committed datatype*/
dset_id = H5Dcreate_anon(file_id, type_id, space_id, H5P_DEFAULT, H5P_DEFAULT);
@@ -1209,7 +1209,7 @@ test_h5o_comment(void)
len = H5Oget_comment(fid, check_comment, (size_t)comment_len + 1);
CHECK(len, FAIL, "H5Oget_comment");
- ret_value = HDstrcmp(file_comment, check_comment);
+ ret_value = strcmp(file_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment");
/* Open the group */
@@ -1223,7 +1223,7 @@ test_h5o_comment(void)
len = H5Oget_comment(grp, check_comment, (size_t)comment_len + 1);
CHECK(len, FAIL, "H5Oget_comment");
- ret_value = HDstrcmp(grp_comment, check_comment);
+ ret_value = strcmp(grp_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment");
/* Open the datatype */
@@ -1237,7 +1237,7 @@ test_h5o_comment(void)
len = H5Oget_comment(dtype, check_comment, (size_t)comment_len + 1);
CHECK(len, FAIL, "H5Oget_comment");
- ret_value = HDstrcmp(dtype_comment, check_comment);
+ ret_value = strcmp(dtype_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment");
/* Open the dataset */
@@ -1251,7 +1251,7 @@ test_h5o_comment(void)
len = H5Oget_comment(dset, check_comment, (size_t)comment_len + 1);
CHECK(ret, len, "H5Oget_comment");
- ret_value = HDstrcmp(dset_comment, check_comment);
+ ret_value = strcmp(dset_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment");
/* Close the IDs */
@@ -1384,7 +1384,7 @@ test_h5o_comment_by_name(void)
len = H5Oget_comment_by_name(fid, ".", check_comment, (size_t)comment_len + 1, H5P_DEFAULT);
CHECK(len, FAIL, "H5Oget_comment_by_name");
- ret_value = HDstrcmp(file_comment, check_comment);
+ ret_value = strcmp(file_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment_by_name");
/* Open the group */
@@ -1398,7 +1398,7 @@ test_h5o_comment_by_name(void)
len = H5Oget_comment_by_name(fid, "group", check_comment, (size_t)comment_len + 1, H5P_DEFAULT);
CHECK(len, FAIL, "H5Oget_comment_by_name");
- ret_value = HDstrcmp(grp_comment, check_comment);
+ ret_value = strcmp(grp_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment_by_name");
/* Getting the comment on the datatype and verify it */
@@ -1408,7 +1408,7 @@ test_h5o_comment_by_name(void)
len = H5Oget_comment_by_name(grp, "datatype", check_comment, (size_t)comment_len + 1, H5P_DEFAULT);
CHECK(len, FAIL, "H5Oget_comment");
- ret_value = HDstrcmp(dtype_comment, check_comment);
+ ret_value = strcmp(dtype_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment_by_name");
/* Getting the comment on the dataset and verify it */
@@ -1418,7 +1418,7 @@ test_h5o_comment_by_name(void)
len = H5Oget_comment_by_name(fid, "dataset", check_comment, (size_t)comment_len + 1, H5P_DEFAULT);
CHECK(len, FAIL, "H5Oget_comment_by_name");
- ret_value = HDstrcmp(dset_comment, check_comment);
+ ret_value = strcmp(dset_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment_by_name");
/* Close the IDs */
@@ -1706,16 +1706,16 @@ visit_obj_cb(hid_t group_id, const char *name, const H5O_info1_t *oinfo1, void H
H5O_info1_t oinfo2; /* Object info structs */
/* Verify the object info for "group1", "group2" and the root group */
- if (!(HDstrcmp(name, "group1"))) {
+ if (!(strcmp(name, "group1"))) {
H5Oget_info_by_name2(group_id, name, &oinfo2, H5O_INFO_NUM_ATTRS, H5P_DEFAULT);
VERIFY(oinfo1->num_attrs, oinfo2.num_attrs, "obj info from H5Ovisit1");
}
- else if (!(HDstrcmp(name, "group2"))) {
+ else if (!(strcmp(name, "group2"))) {
H5Oget_info_by_name2(group_id, name, &oinfo2, H5O_INFO_HDR, H5P_DEFAULT);
VERIFY(oinfo1->hdr.nmesgs, oinfo2.hdr.nmesgs, "obj info from H5Ovisit1/H5Oget_info2");
VERIFY(oinfo1->hdr.nchunks, oinfo2.hdr.nchunks, "obj info from H5Ovisit1/H5Oget_info2");
}
- else if (!(HDstrcmp(name, "."))) {
+ else if (!(strcmp(name, "."))) {
H5Oget_info_by_name2(group_id, name, &oinfo2, H5O_INFO_META_SIZE, H5P_DEFAULT);
VERIFY(oinfo1->meta_size.obj.index_size, oinfo2.meta_size.obj.index_size,
"obj info from H5Ovisit1/H5Oget_info2");
@@ -1768,7 +1768,7 @@ test_h5o_getinfo_visit(void)
/* Attach 10 attributes to "group1" */
for (j = 0; j < 10; j++) {
/* Create the attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr%u", j);
+ snprintf(attrname, sizeof(attrname), "attr%u", j);
/* Create the attribute */
aid = H5Acreate2(gid1, attrname, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
diff --git a/test/API/th5s.c b/test/API/th5s.c
index 7bf3191a24d..3ab21f4b2b5 100644
--- a/test/API/th5s.c
+++ b/test/API/th5s.c
@@ -128,7 +128,7 @@ test_h5s_basic(void)
hsize_t tmax[4];
hssize_t n; /* Number of dataspace elements */
#if 0
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
#endif
herr_t ret; /* Generic return value */
@@ -1624,7 +1624,7 @@ test_h5s_encode1(void)
****************************************************************/
static herr_t
test_h5s_check_encoding(hid_t in_fapl, hid_t in_sid, uint32_t expected_version, uint8_t expected_enc_size,
- hbool_t expected_to_fail)
+ bool expected_to_fail)
{
char *buf = NULL; /* Pointer to the encoded buffer */
size_t buf_size; /* Size of the encoded buffer */
@@ -1667,7 +1667,7 @@ test_h5s_check_encoding(hid_t in_fapl, hid_t in_sid, uint32_t expected_version,
/* Verify if the two dataspace selections (in_sid, d_sid) are the same shape */
check = H5Sselect_shape_same(in_sid, d_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare the starting/ending coordinates of the bounding box for in_sid and d_sid */
ret = H5Sget_select_bounds(in_sid, in_low_bounds, in_high_bounds);
@@ -1759,7 +1759,7 @@ test_h5s_encode_regular_hyper(H5F_libver_t low, H5F_libver_t high)
/* Testing with each configuration */
for (config = CONFIG_16; config <= CONFIG_32; config++) {
- hbool_t expected_to_fail = FALSE;
+ bool expected_to_fail = false;
/* Testing with unlimited or not */
for (unlim = 0; unlim <= 1; unlim++) {
@@ -1767,7 +1767,7 @@ test_h5s_encode_regular_hyper(H5F_libver_t low, H5F_libver_t high)
count = unlim ? H5S_UNLIMITED : 2;
if ((high <= H5F_LIBVER_V18) && (unlim || config == CONFIG_32))
- expected_to_fail = TRUE;
+ expected_to_fail = true;
if (low >= H5F_LIBVER_V112)
expected_version = 3;
@@ -1952,7 +1952,7 @@ test_h5s_encode_irregular_hyper(H5F_libver_t low, H5F_libver_t high)
/* Testing with each configuration */
for (config = CONFIG_8; config <= CONFIG_32; config++) {
- hbool_t expected_to_fail = FALSE; /* Whether H5Sencode2 is expected to fail */
+ bool expected_to_fail = false; /* Whether H5Sencode2 is expected to fail */
uint32_t expected_version = 0; /* Expected version for selection info */
uint32_t expected_enc_size = 0; /* Expected encoded size for selection info */
@@ -1963,7 +1963,7 @@ test_h5s_encode_irregular_hyper(H5F_libver_t low, H5F_libver_t high)
/* H5Sencode2 is expected to fail for library v110 and below
when the selection exceeds the 32 bits integer limit */
if (high <= H5F_LIBVER_V110 && config == CONFIG_32)
- expected_to_fail = TRUE;
+ expected_to_fail = true;
if (low >= H5F_LIBVER_V112 || config == CONFIG_32)
expected_version = 3;
@@ -2023,7 +2023,7 @@ test_h5s_encode_irregular_hyper(H5F_libver_t low, H5F_libver_t high)
/* Should be irregular hyperslab */
is_regular = H5Sis_regular_hyperslab(sid);
- VERIFY(is_regular, FALSE, "H5Sis_regular_hyperslab");
+ VERIFY(is_regular, false, "H5Sis_regular_hyperslab");
/* Verify the version and encoded size expected for the configuration */
assert(expected_enc_size <= 255);
@@ -2057,7 +2057,7 @@ test_h5s_encode_points(H5F_libver_t low, H5F_libver_t high)
hsize_t vdsdims[1] = {total_particles}; /* Dimension size */
hsize_t coord[4]; /* The point coordinates */
herr_t ret; /* Generic return value */
- hbool_t expected_to_fail = FALSE; /* Expected to fail or not */
+ bool expected_to_fail = false; /* Expected to fail or not */
uint32_t expected_version = 0; /* Expected version for selection info */
uint8_t expected_enc_size = 0; /* Expected encoded size of selection info */
@@ -2084,7 +2084,7 @@ test_h5s_encode_points(H5F_libver_t low, H5F_libver_t high)
ret = H5Sselect_elements(sid, H5S_SELECT_SET, (size_t)4, coord);
CHECK(ret, FAIL, "H5Sselect_elements");
- expected_to_fail = FALSE;
+ expected_to_fail = false;
expected_enc_size = 4;
expected_version = 1;
@@ -2109,7 +2109,7 @@ test_h5s_encode_points(H5F_libver_t low, H5F_libver_t high)
/* test 3 */
if (high <= H5F_LIBVER_V110)
- expected_to_fail = TRUE;
+ expected_to_fail = true;
if (high >= H5F_LIBVER_V112) {
expected_version = 2;
@@ -2677,423 +2677,423 @@ test_h5s_extent_equal(void)
/* Compare null dataspace against all others, including itself */
ext_equal = H5Sextent_equal(null_space, null_space);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare scalar dataspace against all others, including itself */
ext_equal = H5Sextent_equal(scalar_space, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, scalar_space);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare small 1-D dataspace w/no max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d1_space1, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d1_space1);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare larger 1-D dataspace w/no max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d1_space2, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d1_space2);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare small 1-D dataspace w/fixed max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d1_space3, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d1_space3);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare small 1-D dataspace w/unlimited max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d1_space4, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d1_space4);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare small 2-D dataspace w/no max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d2_space1, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d2_space1);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare larger 2-D dataspace w/no max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d2_space2, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d2_space2);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare small 2-D dataspace w/fixed max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d2_space3, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d2_space3);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare small 2-D dataspace w/unlimited max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d2_space4, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d2_space4);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare small 3-D dataspace w/no max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d3_space1, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d3_space1);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare larger 2-D dataspace w/no max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d3_space2, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d3_space2);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare small 2-D dataspace w/fixed max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d3_space3, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d3_space3);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare small 2-D dataspace w/unlimited max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d3_space4, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d3_space4);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
/* Close dataspaces */
ret = H5Sclose(null_space);
@@ -3216,7 +3216,7 @@ test_h5s_extent_copy(void)
/* Verify that the extents are equal */
ext_equal = H5Sextent_equal(tmp_space, spaces[j]);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
/* Verify that the correct number of elements is selected */
npoints_ret = H5Sget_select_npoints(tmp_space);
@@ -3228,7 +3228,7 @@ test_h5s_extent_copy(void)
/* Verify that the extents are equal */
ext_equal = H5Sextent_equal(tmp_space, spaces[i]);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
/* Verify that the correct number of elements is selected */
npoints_ret = H5Sget_select_npoints(tmp_space);
@@ -3279,7 +3279,7 @@ test_h5s_bug1(void)
/* Check that space1's selection is valid */
select_valid = H5Sselect_valid(space1);
CHECK(select_valid, FAIL, "H5Sselect_valid");
- VERIFY(select_valid, TRUE, "H5Sselect_valid result");
+ VERIFY(select_valid, true, "H5Sselect_valid result");
/* Close dataspaces */
ret = H5Sclose(space1);
@@ -3327,7 +3327,7 @@ test_h5s_bug2(void)
/* Check that space's selection is valid */
select_valid = H5Sselect_valid(space);
CHECK(select_valid, FAIL, "H5Sselect_valid");
- VERIFY(select_valid, TRUE, "H5Sselect_valid result");
+ VERIFY(select_valid, true, "H5Sselect_valid result");
/* Check that 4 elements are selected */
elements_selected = H5Sget_select_npoints(space);
diff --git a/test/API/tid.c b/test/API/tid.c
index b353a8a4f92..649bacb89f2 100644
--- a/test/API/tid.c
+++ b/test/API/tid.c
@@ -397,15 +397,15 @@ test_is_valid(void)
/* Check that the ID is valid */
tri_ret = H5Iis_valid(dtype);
- VERIFY(tri_ret, TRUE, "H5Iis_valid");
- if (tri_ret != TRUE)
+ VERIFY(tri_ret, true, "H5Iis_valid");
+ if (tri_ret != true)
goto out;
#if 0 /* Cannot call internal APIs and cannot call public H5Inmembers on library types */
/* Artificially manipulate the reference counts so app_count is 0, and dtype
* appears to be an internal id. This takes advantage of the fact that
* H5Ipkg is included.
*/
- ret = H5I_inc_ref(dtype, FALSE);
+ ret = H5I_inc_ref(dtype, false);
CHECK(ret, FAIL, "H5I_inc_ref");
if (ret < 0)
goto out;
@@ -416,8 +416,8 @@ test_is_valid(void)
/* Check that dtype is invalid */
tri_ret = H5Iis_valid(dtype);
- VERIFY(tri_ret, FALSE, "H5Iis_valid");
- if (tri_ret != FALSE)
+ VERIFY(tri_ret, false, "H5Iis_valid");
+ if (tri_ret != false)
goto out;
/* Close dtype and verify that it has been closed */
@@ -436,14 +436,14 @@ test_is_valid(void)
/* Check that dtype is invalid */
tri_ret = H5Iis_valid(dtype);
- VERIFY(tri_ret, FALSE, "H5Iis_valid");
- if (tri_ret != FALSE)
+ VERIFY(tri_ret, false, "H5Iis_valid");
+ if (tri_ret != false)
goto out;
#endif
/* Check that an id of -1 is invalid */
tri_ret = H5Iis_valid((hid_t)-1);
- VERIFY(tri_ret, FALSE, "H4Iis_valid");
- if (tri_ret != FALSE)
+ VERIFY(tri_ret, false, "H4Iis_valid");
+ if (tri_ret != false)
goto out;
return 0;
@@ -619,7 +619,7 @@ typedef struct rct_obj_t {
/* Whether we are currently freeing this object directly
* through H5Idec_ref().
*/
- hbool_t freeing;
+ bool freeing;
/* Pointer to the master list of all objects */
rct_obj_list_t *list;
@@ -677,7 +677,7 @@ rct_free_cb(void *_obj, void H5_ATTR_UNUSED **_ctx)
* not free another object. We don't want to recursively free the
* entire list when we free the first ID.
*/
- obj->list->objects[i].freeing = TRUE;
+ obj->list->objects[i].freeing = true;
/* Decrement the reference count on the object */
ret = H5Idec_ref(obj->list->objects[i].id);
@@ -686,7 +686,7 @@ rct_free_cb(void *_obj, void H5_ATTR_UNUSED **_ctx)
goto error;
/* Unset the "freeing" flag */
- obj->list->objects[i].freeing = FALSE;
+ obj->list->objects[i].freeing = false;
}
/* Verify the number of objects remaining in the master list is non-negative */
@@ -751,7 +751,7 @@ test_remove_clear_type(void)
/* Object setup */
objects[j].nfrees = 0;
- objects[j].freeing = FALSE;
+ objects[j].freeing = false;
objects[j].list = &obj_list;
/* Register an ID for it */
@@ -770,13 +770,13 @@ test_remove_clear_type(void)
}
/******************************************
- * Clear the type with force set to FALSE *
+ * Clear the type with force set to false *
******************************************/
- /* Clear the type. Since force is FALSE, only
+ /* Clear the type. Since force is false, only
* IDs with a reference count of 1 will be cleared.
*/
- ret = H5Iclear_type(obj_type, FALSE);
+ ret = H5Iclear_type(obj_type, false);
CHECK(ret, FAIL, "H5Iclear_type");
if (ret == FAIL)
goto error;
@@ -799,8 +799,8 @@ test_remove_clear_type(void)
}
/* No object should still be marked as "freeing" */
- VERIFY(objects[j].freeing, FALSE, "object marked as freeing");
- if (objects[j].freeing != FALSE)
+ VERIFY(objects[j].freeing, false, "object marked as freeing");
+ if (objects[j].freeing != false)
goto error;
}
@@ -821,11 +821,11 @@ test_remove_clear_type(void)
goto error;
/*****************************************
- * Clear the type with force set to TRUE *
+ * Clear the type with force set to true *
*****************************************/
- /* Clear the type. Since force is TRUE, all IDs will be cleared. */
- ret = H5Iclear_type(obj_type, TRUE);
+ /* Clear the type. Since force is true, all IDs will be cleared. */
+ ret = H5Iclear_type(obj_type, true);
CHECK(ret, FAIL, "H5Iclear_type");
if (ret == FAIL)
goto error;
@@ -839,8 +839,8 @@ test_remove_clear_type(void)
goto error;
/* No object should still be marked as "freeing" */
- VERIFY(objects[j].freeing, FALSE, "object marked as freeing");
- if (objects[j].freeing != FALSE)
+ VERIFY(objects[j].freeing, false, "object marked as freeing");
+ if (objects[j].freeing != false)
goto error;
}
@@ -1357,7 +1357,7 @@ test_future_ids(void)
CHECK(ret, FAIL, "H5Pisa_class");
if (FAIL == ret)
goto error;
- if (TRUE != ret)
+ if (true != ret)
goto error;
/* Verify that the application believes the ID is still a property list */
diff --git a/test/API/titerate.c b/test/API/titerate.c
index 23b65fccdec..5e6ce3626b4 100644
--- a/test/API/titerate.c
+++ b/test/API/titerate.c
@@ -52,8 +52,8 @@ typedef struct {
#define CORRUPTED_ATNAMELEN_FILE "memleak_H5O_dtype_decode_helper_H5Odtype.h5"
#define DSET_NAME "image"
typedef struct searched_err_t {
- char message[256];
- hbool_t found;
+ char message[256];
+ bool found;
} searched_err_t;
#if 0
/* Call back function for test_corrupted_attnamelen */
@@ -74,7 +74,7 @@ herr_t aiter_cb(hid_t group, const char *name, const H5A_info_t *ainfo, v
H5_ATTR_PURE int
iter_strcmp(const void *s1, const void *s2)
{
- return (HDstrcmp(*(const char *const *)s1, *(const char *const *)s2));
+ return (strcmp(*(const char *const *)s1, *(const char *const *)s2));
}
/****************************************************************
@@ -97,7 +97,7 @@ liter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2_t H5_ATTR
return 1;
}
- HDstrcpy(info->name, name);
+ strcpy(info->name, name);
switch (info->command) {
case RET_ZERO:
@@ -126,7 +126,7 @@ liter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2_t H5_ATTR
**
****************************************************************/
static void
-test_iter_group(hid_t fapl, hbool_t new_format)
+test_iter_group(hid_t fapl, bool new_format)
{
hid_t file; /* File ID */
hid_t dataset; /* Dataset ID */
@@ -166,12 +166,12 @@ test_iter_group(hid_t fapl, hbool_t new_format)
CHECK(filespace, FAIL, "H5Screate");
for (i = 0; i < NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "Dataset %d", i);
+ snprintf(name, sizeof(name), "Dataset %d", i);
dataset = H5Dcreate2(file, name, datatype, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(dataset, FAIL, "H5Dcreate2");
/* Keep a copy of the dataset names around for later */
- lnames[i] = HDstrdup(name);
+ lnames[i] = strdup(name);
CHECK_PTR(lnames[i], "strdup");
ret = H5Dclose(dataset);
@@ -182,13 +182,13 @@ test_iter_group(hid_t fapl, hbool_t new_format)
grp = H5Gcreate2(file, "grp", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Gcreate2");
- lnames[NDATASETS] = HDstrdup("grp");
+ lnames[NDATASETS] = strdup("grp");
CHECK_PTR(lnames[NDATASETS], "strdup");
ret = H5Tcommit2(file, "dtype", datatype, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tcommit2");
- lnames[NDATASETS + 1] = HDstrdup("dtype");
+ lnames[NDATASETS + 1] = strdup("dtype");
CHECK_PTR(lnames[NDATASETS], "strdup");
/* Close everything up */
@@ -333,7 +333,7 @@ test_iter_group(hid_t fapl, hbool_t new_format)
TestErrPrintf("Group iteration function walked too far!\n");
/* Verify that the correct name is retrieved */
- if (HDstrncmp(info.name, lnames[(size_t)(idx - 1)], NAMELEN) != 0)
+ if (strncmp(info.name, lnames[(size_t)(idx - 1)], NAMELEN) != 0)
TestErrPrintf(
"Group iteration function didn't return name correctly for link - lnames[%u] = '%s'!\n",
(unsigned)(idx - 1), lnames[(size_t)(idx - 1)]);
@@ -365,7 +365,7 @@ test_iter_group(hid_t fapl, hbool_t new_format)
TestErrPrintf("Group iteration function walked too far!\n");
/* Verify that the correct name is retrieved */
- if (HDstrncmp(info.name, lnames[(size_t)(idx - 1)], NAMELEN) != 0)
+ if (strncmp(info.name, lnames[(size_t)(idx - 1)], NAMELEN) != 0)
TestErrPrintf(
"Group iteration function didn't return name correctly for link - lnames[%u] = '%s'!\n",
(unsigned)(idx - 1), lnames[(size_t)(idx - 1)]);
@@ -397,7 +397,7 @@ aiter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5A_info_t H5_ATTR_
static int count = 0;
static int count2 = 0;
- HDstrcpy(info->name, name);
+ strcpy(info->name, name);
switch (info->command) {
case RET_ZERO:
@@ -426,7 +426,7 @@ aiter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5A_info_t H5_ATTR_
**
****************************************************************/
static void
-test_iter_attr(hid_t fapl, hbool_t new_format)
+test_iter_attr(hid_t fapl, bool new_format)
{
hid_t file; /* File ID */
hid_t dataset; /* Common Dataset ID */
@@ -458,12 +458,12 @@ test_iter_attr(hid_t fapl, hbool_t new_format)
CHECK(dataset, FAIL, "H5Dcreate2");
for (i = 0; i < NATTR; i++) {
- HDsnprintf(name, sizeof(name), "Attribute %02d", i);
+ snprintf(name, sizeof(name), "Attribute %02d", i);
attribute = H5Acreate2(dataset, name, H5T_NATIVE_INT, filespace, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attribute, FAIL, "H5Acreate2");
/* Keep a copy of the attribute names around for later */
- anames[i] = HDstrdup(name);
+ anames[i] = strdup(name);
CHECK_PTR(anames[i], "strdup");
ret = H5Aclose(attribute);
@@ -533,7 +533,7 @@ test_iter_attr(hid_t fapl, hbool_t new_format)
if (!new_format) {
/* Verify that the correct name is retrieved */
if (idx > 0) {
- if (HDstrcmp(info.name, anames[(size_t)idx - 1]) != 0)
+ if (strcmp(info.name, anames[(size_t)idx - 1]) != 0)
TestErrPrintf(
"%u: Attribute iteration function didn't set names correctly, info.name = "
"'%s', anames[%u] = '%s'!\n",
@@ -567,7 +567,7 @@ test_iter_attr(hid_t fapl, hbool_t new_format)
if (!new_format) {
/* Verify that the correct name is retrieved */
if (idx > 0) {
- if (HDstrcmp(info.name, anames[(size_t)idx - 1]) != 0)
+ if (strcmp(info.name, anames[(size_t)idx - 1]) != 0)
TestErrPrintf(
"%u: Attribute iteration function didn't set names correctly, info.name = "
"'%s', anames[%u] = '%s'!\n",
@@ -602,7 +602,7 @@ test_iter_attr(hid_t fapl, hbool_t new_format)
H5_ATTR_PURE int
iter_strcmp2(const void *s1, const void *s2)
{
- return (HDstrcmp((const char *)s1, (const char *)s2));
+ return (strcmp((const char *)s1, (const char *)s2));
} /* end iter_strcmp2() */
/****************************************************************
@@ -624,7 +624,7 @@ liter_cb2(hid_t loc_id, const char *name, const H5L_info2_t H5_ATTR_UNUSED *link
return 1;
}
- if (HDstrcmp(name, test_info->name) != 0) {
+ if (strcmp(name, test_info->name) != 0) {
TestErrPrintf("name = '%s', test_info = '%s'\n", name, test_info->name);
return (H5_ITER_ERROR);
} /* end if */
@@ -691,10 +691,10 @@ test_iter_group_large(hid_t fapl)
/* Create a bunch of groups */
for (i = 0; i < ITER_NGROUPS; i++) {
- HDsnprintf(gname, sizeof(gname), "Group_%d", i);
+ snprintf(gname, sizeof(gname), "Group_%d", i);
/* Add the name to the list of objects in the root group */
- HDstrcpy(names[i].name, gname);
+ strcpy(names[i].name, gname);
names[i].type = H5O_TYPE_GROUP;
/* Create a group */
@@ -711,7 +711,7 @@ test_iter_group_large(hid_t fapl)
CHECK(dataset, FAIL, "H5Dcreate2");
/* Add the name to the list of objects in the root group */
- HDstrcpy(names[ITER_NGROUPS].name, "Dataset1");
+ strcpy(names[ITER_NGROUPS].name, "Dataset1");
names[ITER_NGROUPS].type = H5O_TYPE_DATASET;
/* Close Dataset */
@@ -741,7 +741,7 @@ test_iter_group_large(hid_t fapl)
CHECK(ret, FAIL, "H5Tcommit2");
/* Add the name to the list of objects in the root group */
- HDstrcpy(names[ITER_NGROUPS + 1].name, "Datatype1");
+ strcpy(names[ITER_NGROUPS + 1].name, "Datatype1");
names[ITER_NGROUPS + 1].type = H5O_TYPE_NAMED_DATATYPE;
/* Close datatype */
@@ -809,12 +809,12 @@ test_grp_memb_funcs(hid_t fapl)
CHECK(filespace, FAIL, "H5Screate");
for (i = 0; i < NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "Dataset %d", i);
+ snprintf(name, sizeof(name), "Dataset %d", i);
dataset = H5Dcreate2(file, name, datatype, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(dataset, FAIL, "H5Dcreate2");
/* Keep a copy of the dataset names around for later */
- dnames[i] = HDstrdup(name);
+ dnames[i] = strdup(name);
CHECK_PTR(dnames[i], "strdup");
ret = H5Dclose(dataset);
@@ -825,13 +825,13 @@ test_grp_memb_funcs(hid_t fapl)
grp = H5Gcreate2(file, "grp", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Gcreate2");
- dnames[NDATASETS] = HDstrdup("grp");
+ dnames[NDATASETS] = strdup("grp");
CHECK_PTR(dnames[NDATASETS], "strdup");
ret = H5Tcommit2(file, "dtype", datatype, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tcommit2");
- dnames[NDATASETS + 1] = HDstrdup("dtype");
+ dnames[NDATASETS + 1] = strdup("dtype");
CHECK_PTR(dnames[NDATASETS], "strdup");
/* Close everything up */
@@ -880,18 +880,18 @@ test_grp_memb_funcs(hid_t fapl)
VERIFY(ret, name_len, "H5Lget_name_by_idx");
/* Keep a copy of the dataset names around for later */
- obj_names[i] = HDstrdup(dataset_name);
+ obj_names[i] = strdup(dataset_name);
CHECK_PTR(obj_names[i], "strdup");
ret = H5Oget_info_by_idx3(root_group, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, &oinfo,
H5O_INFO_BASIC, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_idx3");
- if (!HDstrcmp(dataset_name, "grp"))
+ if (!strcmp(dataset_name, "grp"))
VERIFY(oinfo.type, H5O_TYPE_GROUP, "H5Lget_name_by_idx");
- if (!HDstrcmp(dataset_name, "dtype"))
+ if (!strcmp(dataset_name, "dtype"))
VERIFY(oinfo.type, H5O_TYPE_NAMED_DATATYPE, "H5Lget_name_by_idx");
- if (!HDstrncmp(dataset_name, "Dataset", (size_t)7))
+ if (!strncmp(dataset_name, "Dataset", (size_t)7))
VERIFY(oinfo.type, H5O_TYPE_DATASET, "H5Lget_name_by_idx");
} /* end for */
@@ -909,8 +909,8 @@ test_grp_memb_funcs(hid_t fapl)
/* Compare object names */
for (i = 0; i < (int)ginfo.nlinks; i++) {
- ret = HDstrcmp(dnames[i], obj_names[i]);
- VERIFY(ret, 0, "HDstrcmp");
+ ret = strcmp(dnames[i], obj_names[i]);
+ VERIFY(ret, 0, "strcmp");
} /* end for */
ret = H5Gclose(root_group);
@@ -988,11 +988,11 @@ test_links(hid_t fapl)
CHECK(ret, FAIL, "H5Oget_info_by_idx3");
} /* end if */
- if (!HDstrcmp(obj_name, "g1.1"))
+ if (!strcmp(obj_name, "g1.1"))
VERIFY(oinfo.type, H5O_TYPE_GROUP, "H5Lget_name_by_idx");
- else if (!HDstrcmp(obj_name, "hardlink"))
+ else if (!strcmp(obj_name, "hardlink"))
VERIFY(oinfo.type, H5O_TYPE_GROUP, "H5Lget_name_by_idx");
- else if (!HDstrcmp(obj_name, "softlink"))
+ else if (!strcmp(obj_name, "softlink"))
VERIFY(linfo.type, H5L_TYPE_SOFT, "H5Lget_name_by_idx");
else
ERROR("unknown object name");
@@ -1030,8 +1030,8 @@ find_err_msg_cb(unsigned H5_ATTR_UNUSED n, const H5E_error2_t *err_desc, void *_
return H5_ITER_ERROR;
/* If the searched error message is found, stop the iteration */
- if (err_desc->desc != NULL && HDstrcmp(err_desc->desc, searched_err->message) == 0) {
- searched_err->found = TRUE;
+ if (err_desc->desc != NULL && strcmp(err_desc->desc, searched_err->message) == 0) {
+ searched_err->found = true;
status = H5_ITER_STOP;
}
@@ -1055,7 +1055,7 @@ test_corrupted_attnamelen(void)
searched_err_t err_caught; /* Data to be passed to callback func */
int err_status; /* Status returned by H5Aiterate2 */
herr_t ret; /* Return value */
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
const char *testfile = H5_get_srcdir_filename(CORRUPTED_ATNAMELEN_FILE); /* Corrected test file name */
const char *err_message = "attribute name has different length than stored length";
@@ -1087,15 +1087,15 @@ test_corrupted_attnamelen(void)
/* Make sure the intended error was caught */
if (err_status == -1) {
/* Initialize client data */
- HDstrcpy(err_caught.message, err_message);
- err_caught.found = FALSE;
+ strcpy(err_caught.message, err_message);
+ err_caught.found = false;
/* Look for the correct error message */
ret = H5Ewalk2(H5E_DEFAULT, H5E_WALK_UPWARD, find_err_msg_cb, &err_caught);
CHECK(ret, FAIL, "H5Ewalk2");
/* Fail if the indicated message is not found */
- CHECK(err_caught.found, FALSE, "test_corrupted_attnamelen: Expected error not found");
+ CHECK(err_caught.found, false, "test_corrupted_attnamelen: Expected error not found");
}
/* Close the dataset and file */
@@ -1172,11 +1172,11 @@ test_links_deprec(hid_t fapl)
CHECK(ret, FAIL, "H5Oget_info_by_idx");
} /* end if */
- if (!HDstrcmp(obj_name, "g1.1"))
+ if (!strcmp(obj_name, "g1.1"))
VERIFY(oinfo.type, H5O_TYPE_GROUP, "H5Lget_name_by_idx");
- else if (!HDstrcmp(obj_name, "hardlink"))
+ else if (!strcmp(obj_name, "hardlink"))
VERIFY(oinfo.type, H5O_TYPE_GROUP, "H5Lget_name_by_idx");
- else if (!HDstrcmp(obj_name, "softlink"))
+ else if (!strcmp(obj_name, "softlink"))
VERIFY(linfo.type, H5L_TYPE_SOFT, "H5Lget_name_by_idx");
else
ERROR("unknown object name");
@@ -1222,7 +1222,7 @@ test_iterate(void)
CHECK(ret, FAIL, "H5Pset_libver_bounds");
/* These next tests use the same file */
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
test_iter_group(new_format ? fapl2 : fapl, new_format); /* Test group iteration */
test_iter_group_large(new_format ? fapl2 : fapl); /* Test group iteration for large # of objects */
test_iter_attr(new_format ? fapl2 : fapl, new_format); /* Test attribute iteration */
diff --git a/test/API/tmisc.c b/test/API/tmisc.c
index 791d22b1f49..4c87425773c 100644
--- a/test/API/tmisc.c
+++ b/test/API/tmisc.c
@@ -488,8 +488,8 @@ test_misc2_write_attribute(void)
hid_t type;
herr_t ret;
misc2_struct data, data_check;
- char *string_att1 = HDstrdup("string attribute in file one");
- char *string_att2 = HDstrdup("string attribute in file two");
+ char *string_att1 = strdup("string attribute in file one");
+ char *string_att2 = strdup("string attribute in file two");
memset(&data, 0, sizeof(data));
memset(&data_check, 0, sizeof(data_check));
@@ -1131,7 +1131,7 @@ test_misc6(void)
/* Loop through adding attributes to each dataset */
for (u = 0; u < MISC6_NUMATTR; u++) {
/* Create name for attribute */
- HDsnprintf(attr_name, sizeof(attr_name), "Attr#%u", u);
+ snprintf(attr_name, sizeof(attr_name), "Attr#%u", u);
/* Open the file */
loc_id = H5Fopen(MISC6_FILE, H5F_ACC_RDWR, H5P_DEFAULT);
@@ -1848,7 +1848,7 @@ test_misc10(void)
hid_t dcpl; /* Dataset creation property list */
hid_t space, type; /* Old dataset's dataspace & datatype */
const char *testfile = H5_get_srcdir_filename(MISC10_FILE_OLD); /* Corrected test file name */
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
herr_t ret;
/* Output message about test being performed */
@@ -1934,7 +1934,7 @@ test_misc11(void)
#endif
H5F_fspace_strategy_t strategy; /* File space strategy */
hsize_t threshold; /* Free-space section threshold */
- hbool_t persist; /* To persist free-space or not */
+ bool persist; /* To persist free-space or not */
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -1995,7 +1995,7 @@ test_misc11(void)
ret = H5Pset_shared_mesg_nindexes(fcpl, MISC11_NINDEXES);
CHECK(ret, FAIL, "H5Pset_shared_mesg");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_NONE, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_NONE, false, (hsize_t)1);
CHECK(ret, FAIL, "H5Pset_file_space");
/* Creating a file with the non-default file creation property list should
@@ -2062,7 +2062,7 @@ test_misc11(void)
ret = H5Pget_file_space_strategy(fcpl, &strategy, &persist, &threshold);
CHECK(ret, FAIL, "H5Pget_file_space_strategy");
VERIFY(strategy, 3, "H5Pget_file_space_strategy");
- VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
+ VERIFY(persist, false, "H5Pget_file_space_strategy");
VERIFY(threshold, 1, "H5Pget_file_space_strategy");
/* Close file */
@@ -2166,11 +2166,11 @@ test_misc12(void)
CHECK(ret, FAIL, "H5Dread");
for (i = 0; i < MISC12_SPACE1_DIM1; i++)
- if (HDstrcmp(wdata[i], rdata[i]) != 0)
+ if (strcmp(wdata[i], rdata[i]) != 0)
TestErrPrintf("Error on line %d: wdata[%d]=%s, rdata[%d]=%s\n", __LINE__, i, wdata[i], i,
rdata[i]);
for (; i < (MISC12_SPACE1_DIM1 + MISC12_APPEND_SIZE); i++)
- if (HDstrcmp(wdata1[i - MISC12_SPACE1_DIM1], rdata[i]) != 0)
+ if (strcmp(wdata1[i - MISC12_SPACE1_DIM1], rdata[i]) != 0)
TestErrPrintf("Error on line %d: wdata1[%d]=%s, rdata[%d]=%s\n", __LINE__, i - MISC12_SPACE1_DIM1,
wdata1[i - MISC12_SPACE1_DIM1], i, rdata[i]);
@@ -2208,16 +2208,16 @@ misc13_init_data(unsigned *original_data)
original_data[u] = u;
}
-static hbool_t
+static bool
misc13_verify_data_match(const unsigned *original_data, const unsigned *read_data)
{
unsigned u;
for (u = 0; u < MISC13_DIM1; u++)
if (original_data[u] != read_data[u])
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
static void
@@ -2389,7 +2389,7 @@ misc13_insert_user_block(const char *old_name, const char *new_name, const char
CHECK_PTR(user_block, "calloc");
/* Copy in the user block data */
- memcpy(user_block, str, HDstrlen(str));
+ memcpy(user_block, str, strlen(str));
/* Open the new file */
new_fp = fopen(new_name, "wb");
@@ -2432,7 +2432,7 @@ misc13_insert_user_block(const char *old_name, const char *new_name, const char
static void
misc13_verify_file(const char *name, const unsigned *data, hsize_t userblock_size,
- hbool_t check_for_new_dataset)
+ bool check_for_new_dataset)
{
hid_t fid = -1; /* File ID */
hid_t gid1 = -1; /* Group IDs */
@@ -2476,7 +2476,7 @@ misc13_verify_file(const char *name, const unsigned *data, hsize_t userblock_siz
CHECK(tid, FAIL, "H5Topen2");
/* Verify the type is correct */
- VERIFY(H5Tequal(tid, H5T_NATIVE_INT), TRUE, "H5Tequal");
+ VERIFY(H5Tequal(tid, H5T_NATIVE_INT), true, "H5Tequal");
/* Close named datatype */
ret = H5Tclose(tid);
@@ -2497,7 +2497,7 @@ misc13_verify_file(const char *name, const unsigned *data, hsize_t userblock_siz
CHECK(tid, FAIL, "H5Topen2");
/* Verify the type is correct */
- VERIFY(H5Tequal(tid, H5T_NATIVE_INT), TRUE, "H5Tequal");
+ VERIFY(H5Tequal(tid, H5T_NATIVE_INT), true, "H5Tequal");
/* Close named datatype */
ret = H5Tclose(tid);
@@ -2551,7 +2551,7 @@ test_misc13(void)
{
unsigned *data = NULL; /* Data to write to dataset */
hsize_t userblock_size; /* Correct size of userblock */
- hbool_t check_for_new_dataset; /* Whether to check for the post-userblock-creation dataset */
+ bool check_for_new_dataset; /* Whether to check for the post-userblock-creation dataset */
/* Create a data buffer for the datasets */
data = (unsigned *)calloc(MISC13_DIM1, sizeof(unsigned));
@@ -2565,7 +2565,7 @@ test_misc13(void)
/* Verify file contents are correct */
userblock_size = 0;
- check_for_new_dataset = FALSE;
+ check_for_new_dataset = false;
misc13_verify_file(MISC13_FILE_1, data, userblock_size, check_for_new_dataset);
/* Create a new file by inserting a user block in front of the first file */
@@ -2573,7 +2573,7 @@ test_misc13(void)
/* Verify file contents are still correct */
userblock_size = MISC13_USERBLOCK_SIZE;
- check_for_new_dataset = FALSE;
+ check_for_new_dataset = false;
misc13_verify_file(MISC13_FILE_2, data, userblock_size, check_for_new_dataset);
/* Make certain we can modify the new file */
@@ -2581,7 +2581,7 @@ test_misc13(void)
/* Verify file contents are still correct */
userblock_size = MISC13_USERBLOCK_SIZE;
- check_for_new_dataset = TRUE;
+ check_for_new_dataset = true;
misc13_verify_file(MISC13_FILE_2, data, userblock_size, check_for_new_dataset);
/* Free the dataset buffer */
@@ -2925,13 +2925,13 @@ test_misc16(void)
/* Compare data read in */
for (i = 0; i < MISC16_SPACE_DIM; i++) {
- if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
+ if (strlen(wdata[i]) != strlen(rdata[i])) {
TestErrPrintf(
"Line %u: VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",
- (unsigned)__LINE__, (int)i, (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (unsigned)__LINE__, (int)i, (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
continue;
} /* end if */
- if (HDstrcmp(wdata[i], rdata[i]) != 0) {
+ if (strcmp(wdata[i], rdata[i]) != 0) {
TestErrPrintf("Line %u: VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n",
(unsigned)__LINE__, (int)i, wdata[i], (int)i, rdata[i]);
continue;
@@ -3013,13 +3013,13 @@ test_misc17(void)
/* Compare data in the way of strings. */
for (i = 0; i < MISC17_SPACE_DIM1; i++) {
- if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
+ if (strlen(wdata[i]) != strlen(rdata[i])) {
TestErrPrintf(
"Line %u: VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",
- (unsigned)__LINE__, (int)i, (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (unsigned)__LINE__, (int)i, (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
continue;
} /* end if */
- if (HDstrcmp(wdata[i], rdata[i]) != 0) {
+ if (strcmp(wdata[i], rdata[i]) != 0) {
TestErrPrintf("Line %u: VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n",
(unsigned)__LINE__, (int)i, wdata[i], (int)i, rdata[i]);
continue;
@@ -3133,7 +3133,7 @@ test_misc18(void)
/* Loop creating attributes on each dataset, flushing them to the file each time */
for (u = 0; u < 10; u++) {
/* Set up attribute name */
- HDsnprintf(attr_name, sizeof(attr_name), "Attr %u", u);
+ snprintf(attr_name, sizeof(attr_name), "Attr %u", u);
/* Create & close attribute on first dataset */
aid = H5Acreate2(did1, attr_name, H5T_STD_U32LE, sid, H5P_DEFAULT, H5P_DEFAULT);
@@ -3777,7 +3777,7 @@ test_misc20(void)
unsigned version; /* Version of storage layout info */
hsize_t contig_size; /* Size of contiguous storage size from layout into */
const char *testfile = H5_get_srcdir_filename(MISC20_FILE_OLD); /* Corrected test file name */
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -4255,7 +4255,7 @@ test_misc23(void)
CHECK(create_id, FAIL, "H5Pcreate");
/* Set flag for intermediate group creation */
- status = H5Pset_create_intermediate_group(create_id, TRUE);
+ status = H5Pset_create_intermediate_group(create_id, true);
CHECK(status, FAIL, "H5Pset_create_intermediate_group");
tmp_id = H5Gcreate2(file_id, "/A/B01/grp", create_id, H5P_DEFAULT, access_id);
@@ -4316,7 +4316,7 @@ test_misc23(void)
CHECK(create_id, FAIL, "H5Pcreate");
/* Set flag for intermediate group creation */
- status = H5Pset_create_intermediate_group(create_id, TRUE);
+ status = H5Pset_create_intermediate_group(create_id, true);
CHECK(status, FAIL, "H5Pset_create_intermediate_group");
tmp_id = H5Dcreate2(file_id, "/A/B06/dset", type_id, space_id, create_id, H5P_DEFAULT, H5P_DEFAULT);
@@ -4367,7 +4367,7 @@ test_misc23(void)
CHECK(create_id, FAIL, "H5Pcreate");
/* Set flag for intermediate group creation */
- status = H5Pset_create_intermediate_group(create_id, TRUE);
+ status = H5Pset_create_intermediate_group(create_id, true);
CHECK(status, FAIL, "H5Pset_create_intermediate_group");
tmp_id = H5Tcopy(H5T_NATIVE_INT16);
@@ -4427,17 +4427,17 @@ test_misc23(void)
CHECK(create_id, FAIL, "H5Pcreate");
/* Set flag for intermediate group creation */
- status = H5Pset_create_intermediate_group(create_id, TRUE);
+ status = H5Pset_create_intermediate_group(create_id, true);
CHECK(status, FAIL, "H5Pset_create_intermediate_group");
status = H5Lcopy(file_id, "/A/B01/grp", file_id, "/A/B16/grp", create_id, access_id);
CHECK(status, FAIL, "H5Lcopy");
tri_status = H5Lexists(file_id, "/A/B16/grp", access_id);
- VERIFY(tri_status, TRUE, "H5Lexists");
+ VERIFY(tri_status, true, "H5Lexists");
tri_status = H5Lexists(file_id, "/A/B01/grp", access_id);
- VERIFY(tri_status, TRUE, "H5Lexists");
+ VERIFY(tri_status, true, "H5Lexists");
/**********************************************************************
* test H5Lmove()
@@ -4447,10 +4447,10 @@ test_misc23(void)
CHECK(status, FAIL, "H5Lmove");
tri_status = H5Lexists(file_id, "/A/B17/grp", access_id);
- VERIFY(tri_status, TRUE, "H5Lexists");
+ VERIFY(tri_status, true, "H5Lexists");
tri_status = H5Lexists(file_id, "/A/B16/grp", access_id);
- VERIFY(tri_status, FALSE, "H5Lexists");
+ VERIFY(tri_status, false, "H5Lexists");
/**********************************************************************
* test H5Lcreate_hard()
@@ -4460,7 +4460,7 @@ test_misc23(void)
CHECK(status, FAIL, "H5Lcreate_hard");
tri_status = H5Lexists(file_id, "/A/B18/grp", access_id);
- VERIFY(tri_status, TRUE, "H5Lexists");
+ VERIFY(tri_status, true, "H5Lexists");
/**********************************************************************
* test H5Lcreate_soft()
@@ -4470,7 +4470,7 @@ test_misc23(void)
CHECK(status, FAIL, "H5Lcreate_soft");
tri_status = H5Lexists(file_id, "/A/B19/grp", access_id);
- VERIFY(tri_status, TRUE, "H5Lexists");
+ VERIFY(tri_status, true, "H5Lexists");
/**********************************************************************
* test H5Lcreate_external()
@@ -4482,7 +4482,7 @@ test_misc23(void)
CHECK(status, FAIL, "H5Lcreate_external");
tri_status = H5Lexists(file_id, "/A/B20/grp", access_id);
- VERIFY(tri_status, TRUE, "H5Lexists");
+ VERIFY(tri_status, true, "H5Lexists");
}
/**********************************************************************
@@ -4495,7 +4495,7 @@ test_misc23(void)
CHECK(status, FAIL, "H5Lcreate_ud");
tri_status = H5Lexists(file_id, "/A/B21/grp", access_id);
- VERIFY(tri_status, TRUE, "H5Lexists");
+ VERIFY(tri_status, true, "H5Lexists");
}
/**********************************************************************
@@ -5084,7 +5084,7 @@ test_misc25b(void)
hid_t fid; /* File ID */
hid_t gid; /* Group ID */
const char *testfile = H5_get_srcdir_filename(MISC25B_FILE); /* Corrected test file name */
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -5347,7 +5347,7 @@ test_misc27(void)
hid_t fid; /* File ID */
hid_t gid; /* Group ID */
const char *testfile = H5_get_srcdir_filename(MISC27_FILE); /* Corrected test file name */
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -5574,7 +5574,7 @@ test_misc28(void)
static void
test_misc29(void)
{
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
hid_t fid; /* File ID */
herr_t ret; /* Generic return value */
@@ -5641,7 +5641,7 @@ test_misc30(void)
/* Output message about test being performed */
MESSAGE(5, ("Local heap dropping free block info\n"));
- for (get_info = FALSE; get_info <= TRUE; get_info++) {
+ for (get_info = false; get_info <= true; get_info++) {
hid_t fid; /* File ID */
hid_t gid; /* Group ID */
int i; /* Local index counter */
@@ -5668,7 +5668,7 @@ test_misc30(void)
CHECK(ret, FAIL, "test_misc30_get_info");
}
- HDsnprintf(gname, sizeof(gname), "/g0/group%d", i);
+ snprintf(gname, sizeof(gname), "/g0/group%d", i);
gid = H5Gcreate2(fid, gname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(gid, FAIL, "H5Gcreate2");
@@ -5824,15 +5824,15 @@ test_misc32(void)
/* Size zero returns NULL.
* Also checks that a size of zero and setting the buffer clear flag
- * to TRUE can be used together.
+ * to true can be used together.
*
* Note that we have asserts in the code, so only check when NDEBUG
* is defined.
*/
#ifdef NDEBUG
- buffer = H5allocate_memory(0, FALSE);
+ buffer = H5allocate_memory(0, false);
CHECK_PTR_NULL(buffer, "H5allocate_memory"); /*BAD*/
- buffer = H5allocate_memory(0, TRUE);
+ buffer = H5allocate_memory(0, true);
CHECK_PTR_NULL(buffer, "H5allocate_memory"); /*BAD*/
#endif /* NDEBUG */
@@ -5840,7 +5840,7 @@ test_misc32(void)
/* Size zero returns NULL. Valgrind will confirm buffer is freed. */
size = 1024;
- buffer = H5allocate_memory(size, TRUE);
+ buffer = H5allocate_memory(size, true);
resized = H5resize_memory(buffer, 0);
CHECK_PTR_NULL(resized, "H5resize_memory");
@@ -5874,7 +5874,7 @@ test_misc33(void)
hid_t fid = -1; /* File ID */
const char *testfile = H5_get_srcdir_filename(MISC33_FILE); /* Corrected test file name */
H5O_info2_t oinfo; /* Structure for object metadata information */
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -6057,15 +6057,15 @@ static int test_misc36_context;
static void
test_misc36_cb1(void *_ctx)
{
- int *ctx = (int *)_ctx; /* Set up context pointer */
- hbool_t is_terminating; /* Flag indicating the library is terminating */
- herr_t ret; /* Return value */
+ int *ctx = (int *)_ctx; /* Set up context pointer */
+ bool is_terminating; /* Flag indicating the library is terminating */
+ herr_t ret; /* Return value */
/* Check whether the library thinks it's terminating */
- is_terminating = FALSE;
+ is_terminating = false;
ret = H5is_library_terminating(&is_terminating);
CHECK(ret, FAIL, "H5is_library_terminating");
- VERIFY(is_terminating, TRUE, "H5is_library_terminating");
+ VERIFY(is_terminating, true, "H5is_library_terminating");
/* Verify correct ordering for 'atclose' callbacks */
if (0 != *ctx)
@@ -6078,15 +6078,15 @@ test_misc36_cb1(void *_ctx)
static void
test_misc36_cb2(void *_ctx)
{
- int *ctx = (int *)_ctx; /* Set up context pointer */
- hbool_t is_terminating; /* Flag indicating the library is terminating */
- herr_t ret; /* Return value */
+ int *ctx = (int *)_ctx; /* Set up context pointer */
+ bool is_terminating; /* Flag indicating the library is terminating */
+ herr_t ret; /* Return value */
/* Check whether the library thinks it's terminating */
- is_terminating = FALSE;
+ is_terminating = false;
ret = H5is_library_terminating(&is_terminating);
CHECK(ret, FAIL, "H5is_library_terminating");
- VERIFY(is_terminating, TRUE, "H5is_library_terminating");
+ VERIFY(is_terminating, true, "H5is_library_terminating");
/* Verify correct ordering for 'atclose' callbacks */
if (1 != *ctx)
@@ -6104,27 +6104,27 @@ test_misc36_cb2(void *_ctx)
static void
test_misc36(void)
{
- hbool_t is_terminating; /* Flag indicating the library is terminating */
- herr_t ret; /* Return value */
+ bool is_terminating; /* Flag indicating the library is terminating */
+ herr_t ret; /* Return value */
/* Output message about test being performed */
MESSAGE(5, ("H5atclose and H5is_library_terminating API calls"));
/* Check whether the library thinks it's terminating */
- is_terminating = TRUE;
+ is_terminating = true;
ret = H5is_library_terminating(&is_terminating);
CHECK(ret, FAIL, "H5is_library_terminating");
- VERIFY(is_terminating, FALSE, "H5is_library_terminating");
+ VERIFY(is_terminating, false, "H5is_library_terminating");
/* Shut the library down */
test_misc36_context = 0;
H5close();
/* Check whether the library thinks it's terminating */
- is_terminating = TRUE;
+ is_terminating = true;
ret = H5is_library_terminating(&is_terminating);
CHECK(ret, FAIL, "H5is_library_terminating");
- VERIFY(is_terminating, FALSE, "H5is_library_terminating");
+ VERIFY(is_terminating, false, "H5is_library_terminating");
/* Check the close context was not changed */
VERIFY(test_misc36_context, 0, "H5atclose");
@@ -6133,10 +6133,10 @@ test_misc36(void)
H5open();
/* Check whether the library thinks it's terminating */
- is_terminating = TRUE;
+ is_terminating = true;
ret = H5is_library_terminating(&is_terminating);
CHECK(ret, FAIL, "H5is_library_terminating");
- VERIFY(is_terminating, FALSE, "H5is_library_terminating");
+ VERIFY(is_terminating, false, "H5is_library_terminating");
/* Register the 'atclose' callbacks */
/* (Note that these will be called in reverse order, which is checked) */
@@ -6176,7 +6176,7 @@ static void
test_misc37(void)
{
const char *testfile = H5_get_srcdir_filename(CVE_2020_10812_FILENAME);
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
hid_t fid;
herr_t ret;
@@ -6214,7 +6214,7 @@ test_misc37(void)
void
test_misc(void)
{
- hbool_t default_driver = h5_using_default_driver(NULL);
+ bool default_driver = h5_using_default_driver(NULL);
/* Output message about test being performed */
MESSAGE(5, ("Testing Miscellaneous Routines\n"));
diff --git a/test/API/trefer.c b/test/API/trefer.c
index 6e194d2d75a..e8abe16779b 100644
--- a/test/API/trefer.c
+++ b/test/API/trefer.c
@@ -1307,7 +1307,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
H5E_END_TRY
if (dset1 < 0) {
- VERIFY(libver_high <= H5F_LIBVER_V110, TRUE, "H5Dcreate2");
+ VERIFY(libver_high <= H5F_LIBVER_V110, true, "H5Dcreate2");
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
@@ -1605,7 +1605,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(hssize_ret, (hssize_t)H5S_UNLIMITED, "H5Sget_select_npoints");
tri_ret = H5Sis_regular_hyperslab(sid2);
CHECK(tri_ret, FAIL, "H5Sis_regular_hyperslab");
- VERIFY(tri_ret, TRUE, "H5Sis_regular_hyperslab Result");
+ VERIFY(tri_ret, true, "H5Sis_regular_hyperslab Result");
ret = H5Sget_regular_hyperslab(sid2, start, stride, count, block);
CHECK(ret, FAIL, "H5Sget_regular_hyperslab");
VERIFY(start[0], (hsize_t)1, "Hyperslab Coordinates");
@@ -1764,7 +1764,7 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
if (dset1 < 0) {
- VERIFY(libver_high <= H5F_LIBVER_V110, TRUE, "H5Dcreate2");
+ VERIFY(libver_high <= H5F_LIBVER_V110, true, "H5Dcreate2");
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
@@ -2126,19 +2126,19 @@ test_deref_iter_op(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2
/* Simple check for correct names */
if (*count == 0) {
- if (HDstrcmp(name, DSETNAME2) == 0)
+ if (strcmp(name, DSETNAME2) == 0)
ret_value = 0;
else
ret_value = -1;
} /* end if */
else if (*count == 1) {
- if (HDstrcmp(name, GROUPNAME2) == 0)
+ if (strcmp(name, GROUPNAME2) == 0)
ret_value = 0;
else
ret_value = -1;
} /* end if */
else if (*count == 2) {
- if (HDstrcmp(name, GROUPNAME3) == 0)
+ if (strcmp(name, GROUPNAME3) == 0)
ret_value = 0;
else
ret_value = -1;
@@ -3571,7 +3571,7 @@ test_reference(void)
MESSAGE(5, ("Testing References\n"));
/* Get the VFD to use */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
@@ -3595,7 +3595,7 @@ test_reference(void)
} /* end low bound */
/* The following test is currently broken with the Direct VFD */
- if (HDstrcmp(env_h5_drvr, "direct") != 0) {
+ if (strcmp(env_h5_drvr, "direct") != 0) {
test_reference_obj_deleted(); /* Test H5R object reference code for deleted objects */
}
diff --git a/test/API/tselect.c b/test/API/tselect.c
index b0a3626fd89..9d398be7916 100644
--- a/test/API/tselect.c
+++ b/test/API/tselect.c
@@ -1884,13 +1884,13 @@ verify_select_hyper_contig_dr__run_test(const uint16_t *cube_buf, size_t cube_si
uint16_t expected_value; /* Expected value in dataset */
unsigned i, j, k, l, m; /* Local index variables */
size_t s; /* Local index variable */
- hbool_t mis_match; /* Flag to indicate mismatch in expected value */
+ bool mis_match; /* Flag to indicate mismatch in expected value */
assert(cube_buf);
assert(cube_size > 0);
expected_value = 0;
- mis_match = FALSE;
+ mis_match = false;
cube_ptr = cube_buf;
s = 0;
i = 0;
@@ -1908,7 +1908,7 @@ verify_select_hyper_contig_dr__run_test(const uint16_t *cube_buf, size_t cube_si
/* Check for correct value */
if (*cube_ptr != expected_value)
- mis_match = TRUE;
+ mis_match = true;
/* Advance to next element */
cube_ptr++;
@@ -1944,7 +1944,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
unsigned edge_size, unsigned chunk_edge_size, unsigned small_rank,
unsigned large_rank, hid_t dset_type, hid_t xfer_plist)
{
- hbool_t mis_match; /* Flag indicating a value read in wasn't what was expected */
+ bool mis_match; /* Flag indicating a value read in wasn't what was expected */
hid_t fapl; /* File access property list */
hid_t fid1; /* File ID */
hid_t small_cube_sid; /* Dataspace ID for small cube in memory & file */
@@ -2015,7 +2015,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
CHECK(fapl, FAIL, "H5Pcreate");
/* Use the 'core' VFD for this test */
- ret = H5Pset_fapl_core(fapl, (size_t)(1024 * 1024), FALSE);
+ ret = H5Pset_fapl_core(fapl, (size_t)(1024 * 1024), false);
CHECK(ret, FAIL, "H5Pset_fapl_core");
/* Create file */
@@ -2162,7 +2162,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
* selections as having the same shape.
*/
check = H5Sselect_shape_same(small_cube_sid, file_large_cube_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Read selection from disk */
ret = H5Dread(large_cube_dataset, H5T_NATIVE_UINT16, small_cube_sid, file_large_cube_sid,
@@ -2170,14 +2170,14 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
CHECK(ret, FAIL, "H5Dread");
/* verify that expected data is retrieved */
- mis_match = FALSE;
+ mis_match = false;
ptr_1 = small_cube_buf_1;
expected_value = (uint16_t)((u * edge_size * edge_size * edge_size * edge_size) +
(v * edge_size * edge_size * edge_size) +
(w * edge_size * edge_size) + (x * edge_size));
for (s = 0; s < small_cube_size; s++) {
if (*ptr_1 != expected_value)
- mis_match = TRUE;
+ mis_match = true;
ptr_1++;
expected_value++;
} /* end for */
@@ -2227,7 +2227,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
* selections as having the same shape.
*/
check = H5Sselect_shape_same(small_cube_sid, mem_large_cube_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Read selection from disk */
ret = H5Dread(small_cube_dataset, H5T_NATIVE_UINT16, mem_large_cube_sid, small_cube_sid,
@@ -2245,23 +2245,23 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
assert(start_index < stop_index);
assert(stop_index <= large_cube_size);
- mis_match = FALSE;
+ mis_match = false;
ptr_1 = large_cube_buf_1;
expected_value = 0;
for (s = 0; s < start_index; s++) {
if (*ptr_1 != 0)
- mis_match = TRUE;
+ mis_match = true;
ptr_1++;
} /* end for */
for (; s <= stop_index; s++) {
if (*ptr_1 != expected_value)
- mis_match = TRUE;
+ mis_match = true;
expected_value++;
ptr_1++;
} /* end for */
for (; s < large_cube_size; s++) {
if (*ptr_1 != 0)
- mis_match = TRUE;
+ mis_match = true;
ptr_1++;
} /* end for */
if (mis_match)
@@ -2326,7 +2326,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
* on disk full small cube selections as having the same shape.
*/
check = H5Sselect_shape_same(small_cube_sid, mem_large_cube_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* write the slice from the in memory large cube to the on disk small cube */
ret = H5Dwrite(small_cube_dataset, H5T_NATIVE_UINT16, mem_large_cube_sid, small_cube_sid,
@@ -2339,14 +2339,14 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
CHECK(ret, FAIL, "H5Dread");
/* verify that expected data is retrieved */
- mis_match = FALSE;
+ mis_match = false;
ptr_1 = small_cube_buf_1;
expected_value = (uint16_t)((u * edge_size * edge_size * edge_size * edge_size) +
(v * edge_size * edge_size * edge_size) +
(w * edge_size * edge_size) + (x * edge_size));
for (s = 0; s < small_cube_size; s++) {
if (*ptr_1 != expected_value)
- mis_match = TRUE;
+ mis_match = true;
expected_value++;
ptr_1++;
} /* end for */
@@ -2413,7 +2413,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
* as having the same shape.
*/
check = H5Sselect_shape_same(small_cube_sid, file_large_cube_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* write the cube from memory to the target slice of the disk cube */
ret = H5Dwrite(large_cube_dataset, H5T_NATIVE_UINT16, small_cube_sid, file_large_cube_sid,
@@ -2439,23 +2439,23 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
assert(start_index < stop_index);
assert(stop_index <= large_cube_size);
- mis_match = FALSE;
+ mis_match = false;
ptr_1 = large_cube_buf_1;
expected_value = 0;
for (s = 0; s < start_index; s++) {
if (*ptr_1 != 0)
- mis_match = TRUE;
+ mis_match = true;
ptr_1++;
} /* end for */
for (; s <= stop_index; s++) {
if (*ptr_1 != expected_value)
- mis_match = TRUE;
+ mis_match = true;
expected_value++;
ptr_1++;
} /* end for */
for (; s < large_cube_size; s++) {
if (*ptr_1 != 0)
- mis_match = TRUE;
+ mis_match = true;
ptr_1++;
} /* end for */
if (mis_match)
@@ -2590,7 +2590,7 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid, u
unsigned edge_size, unsigned checker_edge_size,
unsigned sel_rank, const hsize_t sel_start[])
{
- hbool_t first_selection = TRUE;
+ bool first_selection = true;
unsigned n_cube_offset;
unsigned sel_offset;
hsize_t base_count;
@@ -2725,7 +2725,7 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid, u
if (((i + j + k + l + m) % 2) == 0) {
if (first_selection) {
- first_selection = FALSE;
+ first_selection = false;
ret = H5Sselect_hyperslab(tgt_n_cube_sid, H5S_SELECT_SET,
&(start[n_cube_offset]), &(stride[n_cube_offset]),
@@ -2775,7 +2775,7 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid, u
** test_select_hyper_checker_board_dr__verify_data():
**
** Examine the supplied buffer to see if it contains the
-** expected data. Return TRUE if it does, and FALSE
+** expected data. Return true if it does, and false
** otherwise.
**
** The supplied buffer is presumed to contain the results
@@ -2813,14 +2813,14 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid, u
**
****************************************************************/
#if 0
-H5_ATTR_PURE static hbool_t
+H5_ATTR_PURE static bool
test_select_hyper_checker_board_dr__verify_data(uint16_t *buf_ptr, unsigned rank, unsigned edge_size,
unsigned checker_edge_size, uint16_t first_expected_val,
- hbool_t buf_starts_in_checker)
+ bool buf_starts_in_checker)
{
- hbool_t good_data = TRUE;
- hbool_t in_checker;
- hbool_t start_in_checker[5];
+ bool good_data = true;
+ bool in_checker;
+ bool start_in_checker[5];
uint16_t expected_value;
uint16_t *val_ptr;
unsigned i, j, k, l, m; /* to track position in n-cube */
@@ -2885,11 +2885,11 @@ test_select_hyper_checker_board_dr__verify_data(uint16_t *buf_ptr, unsigned rank
if (in_checker) {
if (*val_ptr != expected_value)
- good_data = FALSE;
+ good_data = false;
} /* end if */
else {
if (*val_ptr != 0)
- good_data = FALSE;
+ good_data = false;
} /* end else */
val_ptr++;
@@ -2931,7 +2931,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
unsigned chunk_edge_size, unsigned small_rank,
unsigned large_rank, hid_t dset_type, hid_t xfer_plist)
{
- hbool_t data_ok;
+ bool data_ok;
hid_t fapl; /* File access property list */
hid_t fid; /* HDF5 File IDs */
hid_t full_small_cube_sid; /* Dataspace for small cube w/all selection */
@@ -3006,7 +3006,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
CHECK(fapl, FAIL, "H5Pcreate");
/* Use the 'core' VFD for this test */
- ret = H5Pset_fapl_core(fapl, (size_t)(1024 * 1024), FALSE);
+ ret = H5Pset_fapl_core(fapl, (size_t)(1024 * 1024), false);
CHECK(ret, FAIL, "H5Pset_fapl_core");
/* Create file */
@@ -3173,7 +3173,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
* selections as having the same shape.
*/
check = H5Sselect_shape_same(mem_small_cube_sid, file_large_cube_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* zero the buffer that we will be using for reading */
memset(small_cube_buf_1, 0, sizeof(*small_cube_buf_1) * small_cube_size);
@@ -3189,7 +3189,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
data_ok = test_select_hyper_checker_board_dr__verify_data(small_cube_buf_1, small_rank,
edge_size, checker_edge_size,
- expected_value, (hbool_t)TRUE);
+ expected_value, (bool)true);
if (!data_ok)
TestErrPrintf("small cube read from largecube has bad data! Line=%d\n", __LINE__);
@@ -3253,7 +3253,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
* selections as having the same shape.
*/
check = H5Sselect_shape_same(file_small_cube_sid, mem_large_cube_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* zero out the in memory large cube */
memset(large_cube_buf_1, 0, sizeof(*large_cube_buf_1) * large_cube_size);
@@ -3266,7 +3266,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
/* verify that the expected data and only the
* expected data was read.
*/
- data_ok = TRUE;
+ data_ok = true;
ptr_1 = large_cube_buf_1;
expected_value = 0;
start_index = (u * edge_size * edge_size * edge_size * edge_size) +
@@ -3280,13 +3280,13 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
/* verify that the large cube contains only zeros before the slice */
for (s = 0; s < start_index; s++) {
if (*ptr_1 != 0)
- data_ok = FALSE;
+ data_ok = false;
ptr_1++;
} /* end for */
assert(s == start_index);
data_ok &= test_select_hyper_checker_board_dr__verify_data(
- ptr_1, small_rank, edge_size, checker_edge_size, (uint16_t)0, (hbool_t)TRUE);
+ ptr_1, small_rank, edge_size, checker_edge_size, (uint16_t)0, (bool)true);
ptr_1 += small_cube_size;
s += small_cube_size;
@@ -3296,7 +3296,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
/* verify that the large cube contains only zeros after the slice */
for (s = stop_index + 1; s < large_cube_size; s++) {
if (*ptr_1 != 0)
- data_ok = FALSE;
+ data_ok = false;
ptr_1++;
} /* end for */
if (!data_ok)
@@ -3373,7 +3373,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
* selections as having the same shape.
*/
check = H5Sselect_shape_same(file_small_cube_sid, mem_large_cube_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* write the slice from the in memory large cube to the
* on disk small cube
@@ -3396,7 +3396,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
data_ok = test_select_hyper_checker_board_dr__verify_data(small_cube_buf_1, small_rank,
edge_size, checker_edge_size,
- expected_value, (hbool_t)TRUE);
+ expected_value, (bool)true);
if (!data_ok)
TestErrPrintf("small cube read from largecube has bad data! Line=%d\n", __LINE__);
@@ -3468,7 +3468,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
* selections as having the same shape.
*/
check = H5Sselect_shape_same(file_large_cube_sid, mem_small_cube_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* write the checker board selection of the in memory
* small cube to a slice through the on disk large
@@ -3490,7 +3490,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
* expected data was written to the on disk large
* cube.
*/
- data_ok = TRUE;
+ data_ok = true;
ptr_1 = large_cube_buf_1;
expected_value = 0;
start_index = (u * edge_size * edge_size * edge_size * edge_size) +
@@ -3504,14 +3504,14 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
/* verify that the large cube contains only zeros before the slice */
for (s = 0; s < start_index; s++) {
if (*ptr_1 != 0)
- data_ok = FALSE;
+ data_ok = false;
ptr_1++;
} /* end for */
assert(s == start_index);
/* verify that the slice contains the expected data */
data_ok &= test_select_hyper_checker_board_dr__verify_data(
- ptr_1, small_rank, edge_size, checker_edge_size, (uint16_t)0, (hbool_t)TRUE);
+ ptr_1, small_rank, edge_size, checker_edge_size, (uint16_t)0, (bool)true);
ptr_1 += small_cube_size;
s += small_cube_size;
@@ -3521,7 +3521,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
/* verify that the large cube contains only zeros after the slice */
for (s = stop_index + 1; s < large_cube_size; s++) {
if (*ptr_1 != 0)
- data_ok = FALSE;
+ data_ok = false;
ptr_1++;
} /* end for */
if (!data_ok)
@@ -4126,7 +4126,7 @@ test_select_hyper_offset(void)
ret = H5Soffset_simple(sid1, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid1);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
/* Check an invalid offset */
offset[0] = 10;
@@ -4135,7 +4135,7 @@ test_select_hyper_offset(void)
ret = H5Soffset_simple(sid1, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid1);
- VERIFY(valid, FALSE, "H5Sselect_valid");
+ VERIFY(valid, false, "H5Sselect_valid");
/* Reset offset */
offset[0] = 0;
@@ -4144,7 +4144,7 @@ test_select_hyper_offset(void)
ret = H5Soffset_simple(sid1, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid1);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
/* Select 15x26 hyperslab for memory dataset */
start[0] = 15;
@@ -4164,7 +4164,7 @@ test_select_hyper_offset(void)
ret = H5Soffset_simple(sid2, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid2);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
/* Create a dataset */
dataset = H5Dcreate2(fid1, SPACE1_NAME, H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -4295,7 +4295,7 @@ test_select_hyper_offset2(void)
ret = H5Soffset_simple(sid1, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid1);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
/* Select 4x10 hyperslab for memory dataset */
start[0] = 1;
@@ -4311,7 +4311,7 @@ test_select_hyper_offset2(void)
ret = H5Soffset_simple(sid2, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid2);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
/* Create a dataset */
dataset = H5Dcreate2(fid1, SPACE7_NAME, H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -4452,7 +4452,7 @@ test_select_point_offset(void)
ret = H5Soffset_simple(sid1, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid1);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
/* Check an invalid offset */
offset[0] = 10;
@@ -4461,7 +4461,7 @@ test_select_point_offset(void)
ret = H5Soffset_simple(sid1, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid1);
- VERIFY(valid, FALSE, "H5Sselect_valid");
+ VERIFY(valid, false, "H5Sselect_valid");
/* Reset offset */
offset[0] = 0;
@@ -4470,7 +4470,7 @@ test_select_point_offset(void)
ret = H5Soffset_simple(sid1, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid1);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
/* Select sequence of ten points for write dataset */
coord2[0][0] = 12;
@@ -4502,7 +4502,7 @@ test_select_point_offset(void)
ret = H5Soffset_simple(sid2, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid2);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
/* Create a dataset */
dataset = H5Dcreate2(fid1, SPACE1_NAME, H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -6985,13 +6985,13 @@ test_select_valid(void)
CHECK(error, FAIL, "H5Sselect_hyperslab");
valid = H5Sselect_valid(sub_space);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
error = H5Sselect_hyperslab(sub_space, H5S_SELECT_OR, safe_start, NULL, safe_count, NULL);
CHECK(error, FAIL, "H5Sselect_hyperslab");
valid = H5Sselect_valid(sub_space);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
error = H5Sclose(sub_space);
CHECK(error, FAIL, "H5Sclose");
@@ -7008,13 +7008,13 @@ test_select_valid(void)
CHECK(error, FAIL, "H5Sselect_hyperslab");
valid = H5Sselect_valid(sub_space);
- VERIFY(valid, FALSE, "H5Sselect_valid");
+ VERIFY(valid, false, "H5Sselect_valid");
error = H5Sselect_hyperslab(sub_space, H5S_SELECT_OR, safe_start, NULL, safe_count, NULL);
CHECK(error, FAIL, "H5Sselect_hyperslab");
valid = H5Sselect_valid(sub_space);
- VERIFY(valid, FALSE, "H5Sselect_valid");
+ VERIFY(valid, false, "H5Sselect_valid");
error = H5Sclose(sub_space);
CHECK(error, FAIL, "H5Sclose");
@@ -7031,13 +7031,13 @@ test_select_valid(void)
CHECK(error, FAIL, "H5Sselect_hyperslab");
valid = H5Sselect_valid(sub_space);
- VERIFY(valid, FALSE, "H5Sselect_valid");
+ VERIFY(valid, false, "H5Sselect_valid");
error = H5Sselect_hyperslab(sub_space, H5S_SELECT_OR, safe_start, NULL, safe_count, NULL);
CHECK(error, FAIL, "H5Sselect_hyperslab");
valid = H5Sselect_valid(sub_space);
- VERIFY(valid, FALSE, "H5Sselect_valid");
+ VERIFY(valid, false, "H5Sselect_valid");
error = H5Sclose(sub_space);
CHECK(error, FAIL, "H5Sclose");
@@ -8640,289 +8640,289 @@ test_shape_same(void)
/* Compare "all" selection to all the selections created */
/* Compare against itself */
check = H5Sselect_shape_same(all_sid, all_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(all_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(all_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "none" selection */
check = H5Sselect_shape_same(all_sid, none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(all_sid, single_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(all_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(all_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(all_sid, single_hyper_all_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(all_sid, single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(all_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(all_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(all_sid, none_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(all_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(all_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare "none" selection to all the selections created */
/* Compare against itself */
check = H5Sselect_shape_same(none_sid, none_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(none_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(none_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(none_sid, all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(none_sid, single_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(none_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(none_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(none_sid, single_hyper_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(none_sid, single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(none_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(none_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(none_sid, none_hyper_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(none_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(none_sid, scalar_none_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare single point selection to all the selections created */
/* Compare against itself */
check = H5Sselect_shape_same(single_pt_sid, single_pt_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(single_pt_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(single_pt_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(single_pt_sid, all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "none" selection */
check = H5Sselect_shape_same(single_pt_sid, none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(single_pt_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(single_pt_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(single_pt_sid, single_hyper_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(single_pt_sid, single_hyper_pt_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(single_pt_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(single_pt_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(single_pt_sid, none_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(single_pt_sid, scalar_all_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(single_pt_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare multiple point selection to all the selections created */
/* Compare against itself */
check = H5Sselect_shape_same(mult_pt_sid, mult_pt_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(mult_pt_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(mult_pt_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(mult_pt_sid, all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "none" selection */
check = H5Sselect_shape_same(mult_pt_sid, none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(mult_pt_sid, single_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(mult_pt_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(mult_pt_sid, single_hyper_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(mult_pt_sid, single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(mult_pt_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(mult_pt_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(mult_pt_sid, none_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(mult_pt_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(mult_pt_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare single "normal" hyperslab selection to all the selections created */
/* Compare against itself */
check = H5Sselect_shape_same(single_hyper_sid, single_hyper_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(single_hyper_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(single_hyper_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(single_hyper_sid, all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "none" selection */
check = H5Sselect_shape_same(single_hyper_sid, none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(single_hyper_sid, single_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(single_hyper_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(single_hyper_sid, single_hyper_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(single_hyper_sid, single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(single_hyper_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(single_hyper_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(single_hyper_sid, none_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
#ifdef NOT_YET
/* In theory, these two selections are the same shape, but the
@@ -8949,7 +8949,7 @@ test_shape_same(void)
/* Compare against hyperslab selection */
check = H5Sselect_shape_same(single_hyper_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
@@ -8980,69 +8980,69 @@ test_shape_same(void)
/* Compare against hyperslab selection */
check = H5Sselect_shape_same(single_hyper_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(single_hyper_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(single_hyper_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare single "all" hyperslab selection to all the selections created */
/* Compare against itself */
check = H5Sselect_shape_same(single_hyper_all_sid, single_hyper_all_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(single_hyper_all_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(single_hyper_all_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(single_hyper_all_sid, all_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against "none" selection */
check = H5Sselect_shape_same(single_hyper_all_sid, none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(single_hyper_all_sid, single_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(single_hyper_all_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(single_hyper_all_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(single_hyper_all_sid, single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(single_hyper_all_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(single_hyper_all_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(single_hyper_all_sid, none_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
#ifdef NOT_YET
/* In theory, these two selections are the same shape, but the
@@ -9068,7 +9068,7 @@ test_shape_same(void)
/* Compare against hyperslab selection */
check = H5Sselect_shape_same(single_hyper_all_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
@@ -9099,128 +9099,128 @@ test_shape_same(void)
/* Compare against hyperslab selection */
check = H5Sselect_shape_same(single_hyper_all_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(single_hyper_all_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(single_hyper_all_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare single "point" hyperslab selection to all the selections created */
/* Compare against itself */
check = H5Sselect_shape_same(single_hyper_pt_sid, single_hyper_pt_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(single_hyper_pt_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(single_hyper_pt_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "none" selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, single_pt_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, single_hyper_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, none_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, scalar_all_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare regular, strided hyperslab selection to all the selections created */
/* Compare against itself */
check = H5Sselect_shape_same(regular_hyper_sid, regular_hyper_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(regular_hyper_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(regular_hyper_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(regular_hyper_sid, all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "none" selection */
check = H5Sselect_shape_same(regular_hyper_sid, none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(regular_hyper_sid, single_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(regular_hyper_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, single_hyper_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, none_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Construct point selection which matches regular, strided hyperslab selection */
/* Create dataspace for point selection */
@@ -9239,7 +9239,7 @@ test_shape_same(void)
/* Compare against hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
@@ -9269,7 +9269,7 @@ test_shape_same(void)
/* Compare against hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
@@ -9294,69 +9294,69 @@ test_shape_same(void)
/* Compare against hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare irregular hyperslab selection to all the selections created */
/* Compare against itself */
check = H5Sselect_shape_same(irreg_hyper_sid, irreg_hyper_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(irreg_hyper_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(irreg_hyper_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(irreg_hyper_sid, all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "none" selection */
check = H5Sselect_shape_same(irreg_hyper_sid, none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(irreg_hyper_sid, single_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(irreg_hyper_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(irreg_hyper_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(irreg_hyper_sid, single_hyper_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(irreg_hyper_sid, single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(irreg_hyper_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(irreg_hyper_sid, none_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Construct hyperslab selection which matches irregular hyperslab selection */
/* Create dataspace for hyperslab selection */
@@ -9390,138 +9390,138 @@ test_shape_same(void)
/* Compare against hyperslab selection */
check = H5Sselect_shape_same(irreg_hyper_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(irreg_hyper_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(irreg_hyper_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare scalar "all" dataspace with all selections created */
/* Compare against itself */
check = H5Sselect_shape_same(scalar_all_sid, scalar_all_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(scalar_all_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(scalar_all_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(scalar_all_sid, all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "none" selection */
check = H5Sselect_shape_same(scalar_all_sid, none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(scalar_all_sid, single_pt_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(scalar_all_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(scalar_all_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(scalar_all_sid, single_hyper_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(scalar_all_sid, single_hyper_pt_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(scalar_all_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(scalar_all_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(scalar_all_sid, none_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(scalar_all_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare scalar "none" dataspace with all selections created */
/* Compare against itself */
check = H5Sselect_shape_same(scalar_none_sid, scalar_none_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(scalar_none_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(scalar_none_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(scalar_none_sid, all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "none" selection */
check = H5Sselect_shape_same(scalar_none_sid, none_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(scalar_none_sid, single_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(scalar_none_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(scalar_none_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(scalar_none_sid, single_hyper_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(scalar_none_sid, single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(scalar_none_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(scalar_none_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(scalar_none_sid, none_hyper_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(scalar_none_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Close dataspaces */
ret = H5Sclose(all_sid);
@@ -9563,16 +9563,16 @@ test_shape_same(void)
** xz plane, and three parallel to the yz plane.
**
** Assuming that z is the fastest changing dimension,
-** H5Sselect_shape_same() should return TRUE when comparing
+** H5Sselect_shape_same() should return true when comparing
** the full 2-D space against any hyperslab parallel to the
-** yz plane in the 3-D space, and FALSE when comparing the
+** yz plane in the 3-D space, and false when comparing the
** full 2-D space against the other two hyperslabs.
**
** Also create two additional 3-D dataspaces (10 X 10 X 10),
** and select a (10 X 10 X 2) hyperslab parallel to the yz
** axis in one of them, and two parallel (10 X 10 X 1) hyper
** slabs parallel to the yz axis in the other.
-** H5Sselect_shape_same() should return FALSE when comparing
+** H5Sselect_shape_same() should return false when comparing
** each to the 2-D selection.
**
****************************************************************/
@@ -9747,39 +9747,39 @@ test_shape_same_dr__smoke_check_1(void)
/* Compare against "xy" selection */
check = H5Sselect_shape_same(small_cube_xy_slice_0_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xy_slice_1_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xy_slice_2_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "xz" selection */
check = H5Sselect_shape_same(small_cube_xz_slice_0_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xz_slice_1_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xz_slice_2_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "yz" selection */
check = H5Sselect_shape_same(small_cube_yz_slice_0_sid, small_square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_yz_slice_1_sid, small_square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_yz_slice_2_sid, small_square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_yz_slice_3_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_yz_slice_4_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Close dataspaces */
ret = H5Sclose(small_square_sid);
@@ -9848,17 +9848,17 @@ test_shape_same_dr__smoke_check_1(void)
** to the yz plane.
**
** Assuming that z is the fastest changing dimension,
-** H5Sselect_shape_same() should return TRUE when comparing
+** H5Sselect_shape_same() should return true when comparing
** the 2-D space checker board selection against a checker
** board hyperslab parallel to the yz plane in the 3-D
-** space, and FALSE when comparing the 2-D checkerboard
+** space, and false when comparing the 2-D checkerboard
** selection against two hyperslabs parallel to the xy
** or xz planes.
**
** Also create an additional 3-D dataspaces (10 X 10 X 10),
** and select a checker board parallel with the yz axis,
** save with some squares being on different planes.
-** H5Sselect_shape_same() should return FALSE when
+** H5Sselect_shape_same() should return false when
** comparing this selection to the 2-D selection.
**
****************************************************************/
@@ -10124,36 +10124,36 @@ test_shape_same_dr__smoke_check_2(void)
/* Compare against "xy" selection */
check = H5Sselect_shape_same(small_cube_xy_slice_0_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xy_slice_1_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xy_slice_2_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "xz" selection */
check = H5Sselect_shape_same(small_cube_xz_slice_0_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xz_slice_1_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xz_slice_2_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "yz" selection */
check = H5Sselect_shape_same(small_cube_yz_slice_0_sid, small_square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_yz_slice_1_sid, small_square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_yz_slice_2_sid, small_square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_yz_slice_3_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Close dataspaces */
ret = H5Sclose(small_square_sid);
@@ -10222,10 +10222,10 @@ test_shape_same_dr__smoke_check_2(void)
** cases.
**
** Assuming that z is the fastest changing dimension,
-** H5Sselect_shape_same() should return TRUE when
+** H5Sselect_shape_same() should return true when
** comparing the 2-D irregular hyperslab selection
** against the irregular hyperslab selections parallel
-** to the yz plane in the 3-D space, and FALSE when
+** to the yz plane in the 3-D space, and false when
** comparing it against the irregular hyperslabs
** selections parallel to the xy or xz planes.
**
@@ -10605,33 +10605,33 @@ test_shape_same_dr__smoke_check_3(void)
/* Compare against "xy" selection */
check = H5Sselect_shape_same(small_cube_xy_slice_0_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xy_slice_1_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xy_slice_2_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "xz" selection */
check = H5Sselect_shape_same(small_cube_xz_slice_0_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xz_slice_1_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xz_slice_2_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "yz" selection */
check = H5Sselect_shape_same(small_cube_yz_slice_0_sid, small_square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_yz_slice_1_sid, small_square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_yz_slice_2_sid, small_square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Close dataspaces */
ret = H5Sclose(small_square_sid);
@@ -10691,8 +10691,8 @@ test_shape_same_dr__smoke_check_3(void)
**
** Compare the 2-D space against all the other spaces
** with H5Sselect_shape_same(). The (1 X 10 X 10) &
-** (1 X 1 X 10 X 10) should return TRUE. All others
-** should return FALSE.
+** (1 X 1 X 10 X 10) should return true. All others
+** should return false.
**
****************************************************************/
static void
@@ -10807,37 +10807,37 @@ test_shape_same_dr__smoke_check_4(void)
/* setup is done -- run the tests: */
check = H5Sselect_shape_same(three_d_space_0_sid, square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(three_d_space_1_sid, square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(three_d_space_2_sid, square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(three_d_space_3_sid, square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(four_d_space_0_sid, square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(four_d_space_1_sid, square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(four_d_space_2_sid, square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(four_d_space_3_sid, square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(four_d_space_4_sid, square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(four_d_space_5_sid, square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(four_d_space_6_sid, square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Close dataspaces */
ret = H5Sclose(square_sid);
@@ -10884,7 +10884,7 @@ test_shape_same_dr__smoke_check_4(void)
** of an m-cube (m > n) in a call to H5Sselect_shape_same().
** Note that this test does not require the n-cube and the
** n-dimensional slice to have the same rank (although
-** H5Sselect_shape_same() should always return FALSE if
+** H5Sselect_shape_same() should always return false if
** they don't).
**
** Per Quincey's suggestion, only test up to 5 dimensional
@@ -10893,7 +10893,7 @@ test_shape_same_dr__smoke_check_4(void)
****************************************************************/
static void
test_shape_same_dr__full_space_vs_slice(int test_num, int small_rank, int large_rank, int offset,
- hsize_t edge_size, hbool_t dim_selected[], hbool_t expected_result)
+ hsize_t edge_size, bool dim_selected[], bool expected_result)
{
char test_desc_0[128];
char test_desc_1[256];
@@ -10920,15 +10920,13 @@ test_shape_same_dr__full_space_vs_slice(int test_num, int small_rank, int large_
assert(edge_size > 0);
assert(edge_size <= 1000);
- HDsnprintf(test_desc_0, sizeof(test_desc_0), "\tn-cube slice through m-cube (n <= m) test %d.\n",
- test_num);
+ snprintf(test_desc_0, sizeof(test_desc_0), "\tn-cube slice through m-cube (n <= m) test %d.\n", test_num);
MESSAGE(7, ("%s", test_desc_0));
/* This statement must be updated if SS_DR_MAX_RANK is changed */
- HDsnprintf(test_desc_1, sizeof(test_desc_1),
- "\t\tranks: %d/%d offset: %d dim_selected: %d/%d/%d/%d/%d.\n", small_rank, large_rank, offset,
- (int)dim_selected[0], (int)dim_selected[1], (int)dim_selected[2], (int)dim_selected[3],
- (int)dim_selected[4]);
+ snprintf(test_desc_1, sizeof(test_desc_1), "\t\tranks: %d/%d offset: %d dim_selected: %d/%d/%d/%d/%d.\n",
+ small_rank, large_rank, offset, (int)dim_selected[0], (int)dim_selected[1], (int)dim_selected[2],
+ (int)dim_selected[3], (int)dim_selected[4]);
MESSAGE(7, ("%s", test_desc_1));
/* copy the edge size into the dims array */
@@ -11022,8 +11020,8 @@ test_shape_same_dr__full_space_vs_slice(int test_num, int small_rank, int large_
static void
test_shape_same_dr__run_full_space_vs_slice_tests(void)
{
- hbool_t dim_selected[5];
- hbool_t expected_result;
+ bool dim_selected[5];
+ bool expected_result;
int i, j;
int v, w, x, y, z;
int test_num = 0;
@@ -11036,52 +11034,52 @@ test_shape_same_dr__run_full_space_vs_slice_tests(void)
v = 0;
do {
if (v == 0)
- dim_selected[0] = FALSE;
+ dim_selected[0] = false;
else
- dim_selected[0] = TRUE;
+ dim_selected[0] = true;
w = 0;
do {
if (w == 0)
- dim_selected[1] = FALSE;
+ dim_selected[1] = false;
else
- dim_selected[1] = TRUE;
+ dim_selected[1] = true;
x = 0;
do {
if (x == 0)
- dim_selected[2] = FALSE;
+ dim_selected[2] = false;
else
- dim_selected[2] = TRUE;
+ dim_selected[2] = true;
y = 0;
do {
if (y == 0)
- dim_selected[3] = FALSE;
+ dim_selected[3] = false;
else
- dim_selected[3] = TRUE;
+ dim_selected[3] = true;
z = 0;
do {
if (z == 0)
- dim_selected[4] = FALSE;
+ dim_selected[4] = false;
else
- dim_selected[4] = TRUE;
+ dim_selected[4] = true;
/* compute the expected result: */
i = 0;
j = 4;
- expected_result = TRUE;
+ expected_result = true;
while ((i < small_rank) && expected_result) {
if (!dim_selected[j])
- expected_result = FALSE;
+ expected_result = false;
i++;
j--;
}
while ((i < large_rank) && expected_result) {
if (dim_selected[j])
- expected_result = FALSE;
+ expected_result = false;
i++;
j--;
}
@@ -11127,7 +11125,7 @@ test_shape_same_dr__run_full_space_vs_slice_tests(void)
**
** Note that this test does not require the n-cube and the
** n-dimensional slice to have the same rank (although
-** H5Sselect_shape_same() should always return FALSE if
+** H5Sselect_shape_same() should always return false if
** they don't).
**
** Per Quincey's suggestion, only test up to 5 dimensional
@@ -11136,7 +11134,7 @@ test_shape_same_dr__run_full_space_vs_slice_tests(void)
****************************************************************/
static void
test_shape_same_dr__checkerboard(int test_num, int small_rank, int large_rank, int offset, hsize_t edge_size,
- hsize_t checker_size, hbool_t dim_selected[], hbool_t expected_result)
+ hsize_t checker_size, bool dim_selected[], bool expected_result)
{
char test_desc_0[128];
char test_desc_1[256];
@@ -11174,22 +11172,22 @@ test_shape_same_dr__checkerboard(int test_num, int small_rank, int large_rank, i
assert(offset < (int)edge_size);
for (i = SS_DR_MAX_RANK - large_rank; i < SS_DR_MAX_RANK; i++)
- if (dim_selected[i] == TRUE)
+ if (dim_selected[i] == true)
dims_selected++;
assert(dims_selected >= 0);
assert(dims_selected <= large_rank);
- HDsnprintf(test_desc_0, sizeof(test_desc_0),
- "\tcheckerboard n-cube slice through m-cube (n <= m) test %d.\n", test_num);
+ snprintf(test_desc_0, sizeof(test_desc_0),
+ "\tcheckerboard n-cube slice through m-cube (n <= m) test %d.\n", test_num);
MESSAGE(7, ("%s", test_desc_0));
/* This statement must be updated if SS_DR_MAX_RANK is changed */
- HDsnprintf(test_desc_1, sizeof(test_desc_1),
- "\tranks: %d/%d edge/chkr size: %d/%d offset: %d dim_selected: %d/%d/%d/%d/%d:%d.\n",
- small_rank, large_rank, (int)edge_size, (int)checker_size, offset, (int)dim_selected[0],
- (int)dim_selected[1], (int)dim_selected[2], (int)dim_selected[3], (int)dim_selected[4],
- dims_selected);
+ snprintf(test_desc_1, sizeof(test_desc_1),
+ "\tranks: %d/%d edge/chkr size: %d/%d offset: %d dim_selected: %d/%d/%d/%d/%d:%d.\n", small_rank,
+ large_rank, (int)edge_size, (int)checker_size, offset, (int)dim_selected[0],
+ (int)dim_selected[1], (int)dim_selected[2], (int)dim_selected[3], (int)dim_selected[4],
+ dims_selected);
MESSAGE(7, ("%s", test_desc_1));
/* copy the edge size into the dims array */
@@ -11461,65 +11459,65 @@ test_shape_same_dr__checkerboard(int test_num, int small_rank, int large_rank, i
static void
test_shape_same_dr__run_checkerboard_tests(void)
{
- hbool_t dim_selected[5];
- hbool_t expected_result;
- int i, j;
- int v, w, x, y, z;
- int test_num = 0;
- int small_rank;
- int large_rank;
+ bool dim_selected[5];
+ bool expected_result;
+ int i, j;
+ int v, w, x, y, z;
+ int test_num = 0;
+ int small_rank;
+ int large_rank;
for (large_rank = 1; large_rank <= 5; large_rank++) {
for (small_rank = 1; small_rank <= large_rank; small_rank++) {
v = 0;
do {
if (v == 0)
- dim_selected[0] = FALSE;
+ dim_selected[0] = false;
else
- dim_selected[0] = TRUE;
+ dim_selected[0] = true;
w = 0;
do {
if (w == 0)
- dim_selected[1] = FALSE;
+ dim_selected[1] = false;
else
- dim_selected[1] = TRUE;
+ dim_selected[1] = true;
x = 0;
do {
if (x == 0)
- dim_selected[2] = FALSE;
+ dim_selected[2] = false;
else
- dim_selected[2] = TRUE;
+ dim_selected[2] = true;
y = 0;
do {
if (y == 0)
- dim_selected[3] = FALSE;
+ dim_selected[3] = false;
else
- dim_selected[3] = TRUE;
+ dim_selected[3] = true;
z = 0;
do {
if (z == 0)
- dim_selected[4] = FALSE;
+ dim_selected[4] = false;
else
- dim_selected[4] = TRUE;
+ dim_selected[4] = true;
/* compute the expected result: */
i = 0;
j = 4;
- expected_result = TRUE;
+ expected_result = true;
while ((i < small_rank) && expected_result) {
if (!dim_selected[j])
- expected_result = FALSE;
+ expected_result = false;
i++;
j--;
} /* end while */
while ((i < large_rank) && expected_result) {
if (dim_selected[j])
- expected_result = FALSE;
+ expected_result = false;
i++;
j--;
} /* end while */
@@ -11639,13 +11637,13 @@ test_shape_same_dr__run_checkerboard_tests(void)
**
** Note that this test does not require the n-cube and the
** n-dimensional slice to have the same rank (although
-** H5Sselect_shape_same() should always return FALSE if
+** H5Sselect_shape_same() should always return false if
** they don't).
**
****************************************************************/
static void
test_shape_same_dr__irregular(int test_num, int small_rank, int large_rank, int pattern_offset,
- int slice_offset, hbool_t dim_selected[], hbool_t expected_result)
+ int slice_offset, bool dim_selected[], bool expected_result)
{
char test_desc_0[128];
char test_desc_1[256];
@@ -11719,22 +11717,21 @@ test_shape_same_dr__irregular(int test_num, int small_rank, int large_rank, int
assert(pattern_offset <= 2);
for (i = SS_DR_MAX_RANK - large_rank; i < SS_DR_MAX_RANK; i++)
- if (dim_selected[i] == TRUE)
+ if (dim_selected[i] == true)
dims_selected++;
assert(dims_selected >= 0);
assert(dims_selected <= large_rank);
- HDsnprintf(test_desc_0, sizeof(test_desc_0),
- "\tirregular sub set of n-cube slice through m-cube (n <= m) test %d.\n", test_num);
+ snprintf(test_desc_0, sizeof(test_desc_0),
+ "\tirregular sub set of n-cube slice through m-cube (n <= m) test %d.\n", test_num);
MESSAGE(7, ("%s", test_desc_0));
/* This statement must be updated if SS_DR_MAX_RANK is changed */
- HDsnprintf(test_desc_1, sizeof(test_desc_1),
- "\tranks: %d/%d edge: %d s/p offset: %d/%d dim_selected: %d/%d/%d/%d/%d:%d.\n", small_rank,
- large_rank, edge_size, slice_offset, pattern_offset, (int)dim_selected[0],
- (int)dim_selected[1], (int)dim_selected[2], (int)dim_selected[3], (int)dim_selected[4],
- dims_selected);
+ snprintf(test_desc_1, sizeof(test_desc_1),
+ "\tranks: %d/%d edge: %d s/p offset: %d/%d dim_selected: %d/%d/%d/%d/%d:%d.\n", small_rank,
+ large_rank, edge_size, slice_offset, pattern_offset, (int)dim_selected[0], (int)dim_selected[1],
+ (int)dim_selected[2], (int)dim_selected[3], (int)dim_selected[4], dims_selected);
MESSAGE(7, ("%s", test_desc_1));
/* copy the edge size into the dims array */
@@ -11902,65 +11899,65 @@ test_shape_same_dr__irregular(int test_num, int small_rank, int large_rank, int
static void
test_shape_same_dr__run_irregular_tests(void)
{
- hbool_t dim_selected[5];
- hbool_t expected_result;
- int i, j;
- int v, w, x, y, z;
- int test_num = 0;
- int small_rank;
- int large_rank;
+ bool dim_selected[5];
+ bool expected_result;
+ int i, j;
+ int v, w, x, y, z;
+ int test_num = 0;
+ int small_rank;
+ int large_rank;
for (large_rank = 1; large_rank <= 5; large_rank++) {
for (small_rank = 1; small_rank <= large_rank; small_rank++) {
v = 0;
do {
if (v == 0)
- dim_selected[0] = FALSE;
+ dim_selected[0] = false;
else
- dim_selected[0] = TRUE;
+ dim_selected[0] = true;
w = 0;
do {
if (w == 0)
- dim_selected[1] = FALSE;
+ dim_selected[1] = false;
else
- dim_selected[1] = TRUE;
+ dim_selected[1] = true;
x = 0;
do {
if (x == 0)
- dim_selected[2] = FALSE;
+ dim_selected[2] = false;
else
- dim_selected[2] = TRUE;
+ dim_selected[2] = true;
y = 0;
do {
if (y == 0)
- dim_selected[3] = FALSE;
+ dim_selected[3] = false;
else
- dim_selected[3] = TRUE;
+ dim_selected[3] = true;
z = 0;
do {
if (z == 0)
- dim_selected[4] = FALSE;
+ dim_selected[4] = false;
else
- dim_selected[4] = TRUE;
+ dim_selected[4] = true;
/* compute the expected result: */
i = 0;
j = 4;
- expected_result = TRUE;
+ expected_result = true;
while ((i < small_rank) && expected_result) {
if (!dim_selected[j])
- expected_result = FALSE;
+ expected_result = false;
i++;
j--;
} /* end while */
while ((i < large_rank) && expected_result) {
if (dim_selected[j])
- expected_result = FALSE;
+ expected_result = false;
i++;
j--;
} /* end while */
@@ -12155,9 +12152,9 @@ test_space_rebuild(void)
CHECK(ret, FAIL, "H5S_hyper_rebuild");
}
if (ret != FAIL) {
- /* In this case, rebuild_check should be TRUE. */
+ /* In this case, rebuild_check should be true. */
rebuild_check = H5Sselect_shape_same(sid_reg1, sid_reg_ori1);
- CHECK(rebuild_check, FALSE, "H5Sselect_shape_same");
+ CHECK(rebuild_check, false, "H5Sselect_shape_same");
}
#endif
/* For irregular hyperslab */
@@ -12243,9 +12240,9 @@ test_space_rebuild(void)
CHECK(ret, FAIL, "H5S_hyper_rebuild");
} /* end if */
if (ret != FAIL) {
- /* In this case, rebuild_check should be TRUE. */
+ /* In this case, rebuild_check should be true. */
rebuild_check = H5Sselect_shape_same(sid_reg2, sid_reg_ori2);
- CHECK(rebuild_check, FALSE, "H5Sselect_shape_same");
+ CHECK(rebuild_check, false, "H5Sselect_shape_same");
}
#endif
/* 2-D irregular case */
@@ -12341,9 +12338,9 @@ test_space_rebuild(void)
CHECK(ret, FAIL, "H5S_hyper_rebuild");
}
if (ret != FAIL) {
- /* In this case, rebuild_check should be TRUE. */
+ /* In this case, rebuild_check should be true. */
rebuild_check = H5Sselect_shape_same(sid_reg3, sid_reg_ori3);
- CHECK(rebuild_check, FALSE, "H5Sselect_shape_same");
+ CHECK(rebuild_check, false, "H5Sselect_shape_same");
}
#endif
@@ -12452,9 +12449,9 @@ test_space_rebuild(void)
CHECK(ret, FAIL, "H5S_hyper_rebuild");
}
if (ret != FAIL) {
- /* In this case, rebuild_check should be TRUE. */
+ /* In this case, rebuild_check should be true. */
rebuild_check = H5Sselect_shape_same(sid_reg4, sid_reg_ori4);
- CHECK(rebuild_check, FALSE, "H5Sselect_shape_same");
+ CHECK(rebuild_check, false, "H5Sselect_shape_same");
}
#endif
@@ -12579,9 +12576,9 @@ test_space_rebuild(void)
CHECK(ret, FAIL, "H5S_hyper_rebuild");
}
if (ret != FAIL) {
- /* In this case, rebuild_check should be TRUE. */
+ /* In this case, rebuild_check should be true. */
rebuild_check = H5Sselect_shape_same(sid_reg5, sid_reg_ori5);
- CHECK(rebuild_check, FALSE, "H5Sselect_shape_same");
+ CHECK(rebuild_check, false, "H5Sselect_shape_same");
}
#endif
@@ -12645,7 +12642,7 @@ test_space_rebuild(void)
#endif
/* We use 5-D to test a special case with
- rebuilding routine TRUE, FALSE and TRUE */
+ rebuilding routine true, false and true */
sid_spec = H5Screate_simple(SPACERE5_RANK, dims5, NULL);
/* Build up the original five dimensional regular selection */
@@ -14233,9 +14230,9 @@ test_hyper_regular(void)
ret = H5Sselect_hyperslab(sid, H5S_SELECT_SET, start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
- /* Query if 'hyperslab' selection is regular hyperslab (should be TRUE) */
+ /* Query if 'hyperslab' selection is regular hyperslab (should be true) */
is_regular = H5Sis_regular_hyperslab(sid);
- VERIFY(is_regular, TRUE, "H5Sis_regular_hyperslab");
+ VERIFY(is_regular, true, "H5Sis_regular_hyperslab");
/* Retrieve the hyperslab parameters */
ret = H5Sget_regular_hyperslab(sid, q_start, q_stride, q_count, q_block);
@@ -14263,9 +14260,9 @@ test_hyper_regular(void)
ret = H5Sselect_hyperslab(sid, H5S_SELECT_OR, t_start, NULL, t_count, NULL);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
- /* Query if 'hyperslab' selection is regular hyperslab (should be FALSE) */
+ /* Query if 'hyperslab' selection is regular hyperslab (should be false) */
is_regular = H5Sis_regular_hyperslab(sid);
- VERIFY(is_regular, FALSE, "H5Sis_regular_hyperslab");
+ VERIFY(is_regular, false, "H5Sis_regular_hyperslab");
/* Query regular hyperslab selection info (should fail) */
H5E_BEGIN_TRY
@@ -14285,9 +14282,9 @@ test_hyper_regular(void)
ret = H5Sselect_hyperslab(sid, H5S_SELECT_XOR, t_start, NULL, t_count, NULL);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
- /* Query if 'hyperslab' selection is regular hyperslab (should be TRUE) */
+ /* Query if 'hyperslab' selection is regular hyperslab (should be true) */
is_regular = H5Sis_regular_hyperslab(sid);
- VERIFY(is_regular, TRUE, "H5Sis_regular_hyperslab");
+ VERIFY(is_regular, true, "H5Sis_regular_hyperslab");
/* Retrieve the hyperslab parameters */
ret = H5Sget_regular_hyperslab(sid, q_start, q_stride, q_count, q_block);
@@ -14980,54 +14977,54 @@ test_internal_consistency(void)
CHECK(tmp_sid, FAIL, "H5Scopy");
#if 0
check = H5S__internal_consistency_test(tmp_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
#endif
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
#if 0
/* Test "none" selection */
check = H5S__internal_consistency_test(none_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test single point selection */
check = H5S__internal_consistency_test(single_pt_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test multiple point selection */
check = H5S__internal_consistency_test(mult_pt_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test "plain" single hyperslab selection */
check = H5S__internal_consistency_test(single_hyper_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test "all" single hyperslab selection */
check = H5S__internal_consistency_test(single_hyper_all_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test "single point" single hyperslab selection */
check = H5S__internal_consistency_test(single_hyper_pt_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test regular, strided hyperslab selection */
check = H5S__internal_consistency_test(regular_hyper_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test irregular hyperslab selection */
check = H5S__internal_consistency_test(irreg_hyper_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test "no" hyperslab selection */
check = H5S__internal_consistency_test(none_hyper_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test scalar "all" hyperslab selection */
check = H5S__internal_consistency_test(scalar_all_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test scalar "none" hyperslab selection */
check = H5S__internal_consistency_test(scalar_none_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
#endif
/* Close dataspaces */
@@ -15755,7 +15752,7 @@ test_select_intersect_block(void)
/* Test block intersection with 'none' selection (always false) */
status = H5Sselect_intersect_block(sid, block_start, block_end);
- VERIFY(status, FALSE, "H5Sselect_intersect_block");
+ VERIFY(status, false, "H5Sselect_intersect_block");
/* Set selection to 'all' */
ret = H5Sselect_all(sid);
@@ -15763,7 +15760,7 @@ test_select_intersect_block(void)
/* Test block intersection with 'all' selection (always true) */
status = H5Sselect_intersect_block(sid, block_start, block_end);
- VERIFY(status, TRUE, "H5Sselect_intersect_block");
+ VERIFY(status, true, "H5Sselect_intersect_block");
/* Select sequence of ten points */
coord[0][0] = 0;
@@ -15791,9 +15788,9 @@ test_select_intersect_block(void)
/* Test block intersection with 'point' selection */
status = H5Sselect_intersect_block(sid, block_start, block_end);
- VERIFY(status, TRUE, "H5Sselect_intersect_block");
+ VERIFY(status, true, "H5Sselect_intersect_block");
status = H5Sselect_intersect_block(sid, block_start, block_end4);
- VERIFY(status, FALSE, "H5Sselect_intersect_block");
+ VERIFY(status, false, "H5Sselect_intersect_block");
/* Select single 4x6 hyperslab block at (2,1) */
start[0] = 2;
@@ -15809,9 +15806,9 @@ test_select_intersect_block(void)
/* Test block intersection with single 'hyperslab' selection */
status = H5Sselect_intersect_block(sid, block_start, block_end);
- VERIFY(status, TRUE, "H5Sselect_intersect_block");
+ VERIFY(status, true, "H5Sselect_intersect_block");
status = H5Sselect_intersect_block(sid, block_start, block_end4);
- VERIFY(status, FALSE, "H5Sselect_intersect_block");
+ VERIFY(status, false, "H5Sselect_intersect_block");
/* 'OR' another hyperslab block in, making an irregular hyperslab selection */
start[0] = 3;
@@ -15827,9 +15824,9 @@ test_select_intersect_block(void)
/* Test block intersection with 'hyperslab' selection */
status = H5Sselect_intersect_block(sid, block_start, block_end);
- VERIFY(status, TRUE, "H5Sselect_intersect_block");
+ VERIFY(status, true, "H5Sselect_intersect_block");
status = H5Sselect_intersect_block(sid, block_start, block_end4);
- VERIFY(status, FALSE, "H5Sselect_intersect_block");
+ VERIFY(status, false, "H5Sselect_intersect_block");
/* Select regular, strided hyperslab selection */
start[0] = 2;
@@ -15845,9 +15842,9 @@ test_select_intersect_block(void)
/* Test block intersection with single 'hyperslab' selection */
status = H5Sselect_intersect_block(sid, block_start, block_end);
- VERIFY(status, TRUE, "H5Sselect_intersect_block");
+ VERIFY(status, true, "H5Sselect_intersect_block");
status = H5Sselect_intersect_block(sid, block_start, block_end4);
- VERIFY(status, FALSE, "H5Sselect_intersect_block");
+ VERIFY(status, false, "H5Sselect_intersect_block");
/* Close dataspace */
ret = H5Sclose(sid);
@@ -16062,7 +16059,7 @@ test_h5s_set_extent_none(void)
null_sid = H5Screate(H5S_NULL);
CHECK(null_sid, H5I_INVALID_HID, "H5Screate");
equal = H5Sextent_equal(sid, null_sid);
- VERIFY(equal, TRUE, "H5Sextent_equal");
+ VERIFY(equal, true, "H5Sextent_equal");
/* Close */
ret = H5Sclose(sid);
@@ -16096,7 +16093,7 @@ test_select(void)
MESSAGE(5, ("Testing Selections\n"));
/* Get the VFD to use */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
@@ -16171,7 +16168,7 @@ test_select(void)
test_select_hyper_valid_combination(); /* Test different input combinations */
/* The following tests are currently broken with the Direct VFD */
- if (HDstrcmp(env_h5_drvr, "direct") != 0) {
+ if (strcmp(env_h5_drvr, "direct") != 0) {
test_select_hyper_and_2d(); /* Test hyperslab intersection (AND) code for 2-D dataset */
test_select_hyper_xor_2d(); /* Test hyperslab XOR code for 2-D dataset */
test_select_hyper_notb_2d(); /* Test hyperslab NOTB code for 2-D dataset */
diff --git a/test/API/tunicode.c b/test/API/tunicode.c
index 93e28e33294..8b404f2fef9 100644
--- a/test/API/tunicode.c
+++ b/test/API/tunicode.c
@@ -94,7 +94,7 @@ test_fl_string(hid_t fid, const char *string)
ret = H5Dread(dset_id, dtype_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf);
CHECK(ret, FAIL, "H5Dread");
- VERIFY(HDstrcmp(string, read_buf), 0, "strcmp");
+ VERIFY(strcmp(string, read_buf), 0, "strcmp");
/* Close all */
ret = H5Dclose(dset_id);
@@ -137,14 +137,14 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
* the right number of bytes (even or odd, depending on the test).
* We create a 'new_string' whose length is convenient by prepending
* an 'x' to 'string' when necessary. */
- length = HDstrlen(string);
+ length = strlen(string);
if (length % 2 != 1) {
- HDstrcpy(new_string, "x");
- HDstrcat(new_string, string);
+ strcpy(new_string, "x");
+ strcat(new_string, string);
length++;
}
else {
- HDstrcpy(new_string, string);
+ strcpy(new_string, string);
}
/* Convert a null-terminated string to a shorter and longer null
@@ -163,8 +163,8 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* Fill the buffer with two copies of the UTF-8 string, each with a
* terminating NULL. It will look like "abcdefg\0abcdefg\0". */
- HDstrncpy(buf, new_string, big_len);
- HDstrncpy(&buf[big_len], new_string, big_len);
+ strncpy(buf, new_string, big_len);
+ strncpy(&buf[big_len], new_string, big_len);
ret = H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tconvert");
@@ -174,11 +174,11 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
* like; UTF-8 characters may well have been truncated.
* To check that the conversion worked properly, we'll build this
* string manually. */
- HDstrncpy(cmpbuf, new_string, small_len - 1);
+ strncpy(cmpbuf, new_string, small_len - 1);
cmpbuf[small_len - 1] = '\0';
- HDstrncpy(&cmpbuf[small_len], new_string, small_len - 1);
+ strncpy(&cmpbuf[small_len], new_string, small_len - 1);
cmpbuf[2 * small_len - 1] = '\0';
- HDstrcpy(&cmpbuf[2 * small_len], new_string);
+ strcpy(&cmpbuf[2 * small_len], new_string);
VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
@@ -190,8 +190,8 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* First fill the buffer with NULLs */
memset(cmpbuf, '\0', (size_t)LONG_BUF_SIZE);
/* Copy in the characters */
- HDstrncpy(cmpbuf, new_string, small_len - 1);
- HDstrncpy(&cmpbuf[big_len], new_string, small_len - 1);
+ strncpy(cmpbuf, new_string, small_len - 1);
+ strncpy(&cmpbuf[big_len], new_string, small_len - 1);
VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
@@ -203,14 +203,14 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* Now test null padding. Null-padded strings do *not* need
* terminating NULLs, so the sizes of the datatypes are slightly
* different and we want a string with an even number of characters. */
- length = HDstrlen(string);
+ length = strlen(string);
if (length % 2 != 0) {
- HDstrcpy(new_string, "x");
- HDstrcat(new_string, string);
+ strcpy(new_string, "x");
+ strcat(new_string, string);
length++;
}
else {
- HDstrcpy(new_string, string);
+ strcpy(new_string, string);
}
/* Create a src_type that holds the UTF-8 string */
@@ -225,8 +225,8 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* Fill the buffer with two copies of the UTF-8 string.
* It will look like "abcdefghabcdefgh". */
- HDstrncpy(buf, new_string, big_len);
- HDstrncpy(&buf[big_len], new_string, big_len);
+ strncpy(buf, new_string, big_len);
+ strncpy(&buf[big_len], new_string, big_len);
ret = H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tconvert");
@@ -236,9 +236,9 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
* like; UTF-8 characters may well have been truncated.
* To check that the conversion worked properly, we'll build this
* string manually. */
- HDstrncpy(cmpbuf, new_string, small_len);
- HDstrncpy(&cmpbuf[small_len], new_string, small_len);
- HDstrncpy(&cmpbuf[2 * small_len], new_string, big_len);
+ strncpy(cmpbuf, new_string, small_len);
+ strncpy(&cmpbuf[small_len], new_string, small_len);
+ strncpy(&cmpbuf[2 * small_len], new_string, big_len);
VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
@@ -250,8 +250,8 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* First fill the buffer with NULLs */
memset(cmpbuf, '\0', (size_t)LONG_BUF_SIZE);
/* Copy in the characters */
- HDstrncpy(cmpbuf, new_string, small_len);
- HDstrncpy(&cmpbuf[big_len], new_string, small_len);
+ strncpy(cmpbuf, new_string, small_len);
+ strncpy(&cmpbuf[big_len], new_string, small_len);
VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
@@ -270,8 +270,8 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* Fill the buffer with two copies of the UTF-8 string.
* It will look like "abcdefghabcdefgh". */
- HDstrcpy(buf, new_string);
- HDstrcpy(&buf[big_len], new_string);
+ strcpy(buf, new_string);
+ strcpy(&buf[big_len], new_string);
ret = H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tconvert");
@@ -281,9 +281,9 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
* like; UTF-8 characters may have been truncated.
* To check that the conversion worked properly, we'll build this
* string manually. */
- HDstrncpy(cmpbuf, new_string, small_len);
- HDstrncpy(&cmpbuf[small_len], new_string, small_len);
- HDstrncpy(&cmpbuf[2 * small_len], new_string, big_len);
+ strncpy(cmpbuf, new_string, small_len);
+ strncpy(&cmpbuf[small_len], new_string, small_len);
+ strncpy(&cmpbuf[2 * small_len], new_string, big_len);
VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
@@ -295,8 +295,8 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* First fill the buffer with spaces */
memset(cmpbuf, ' ', (size_t)LONG_BUF_SIZE);
/* Copy in the characters */
- HDstrncpy(cmpbuf, new_string, small_len);
- HDstrncpy(&cmpbuf[big_len], new_string, small_len);
+ strncpy(cmpbuf, new_string, small_len);
+ strncpy(&cmpbuf[big_len], new_string, small_len);
VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
@@ -340,14 +340,14 @@ test_vl_string(hid_t fid, const char *string)
/* Make certain the correct amount of memory will be used */
ret = H5Dvlen_get_buf_size(dset_id, type_id, space_id, &size);
CHECK(ret, FAIL, "H5Dvlen_get_buf_size");
- VERIFY(size, (hsize_t)HDstrlen(string) + 1, "H5Dvlen_get_buf_size");
+ VERIFY(size, (hsize_t)strlen(string) + 1, "H5Dvlen_get_buf_size");
/* Read dataset from disk */
ret = H5Dread(dset_id, type_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf);
CHECK(ret, FAIL, "H5Dread");
/* Compare data read in */
- VERIFY(HDstrcmp(string, read_buf[0]), 0, "strcmp");
+ VERIFY(strcmp(string, read_buf[0]), 0, "strcmp");
/* Reclaim the read VL data */
ret = H5Treclaim(type_id, space_id, H5P_DEFAULT, read_buf);
@@ -403,7 +403,7 @@ test_objnames(hid_t fid, const char *string)
ret = H5Gclose(grp_id);
CHECK(ret, FAIL, "H5Gclose");
#if 0
- VERIFY(HDstrcmp(string, read_buf), 0, "strcmp");
+ VERIFY(strcmp(string, read_buf), 0, "strcmp");
#endif
/* Create a new dataset with a UTF-8 name */
grp1_id = H5Gcreate2(fid, GROUP1_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -487,9 +487,9 @@ test_objnames(hid_t fid, const char *string)
ret = H5Lcreate_hard(fid, GROUP2_NAME, grp3_id, GROUP2_NAME, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Lcreate_hard");
- HDstrcpy(path_buf, GROUP2_NAME);
- HDstrcat(path_buf, "/");
- HDstrcat(path_buf, string);
+ strcpy(path_buf, GROUP2_NAME);
+ strcat(path_buf, "/");
+ strcat(path_buf, string);
ret = H5Lcreate_hard(grp3_id, path_buf, H5L_SAME_LOC, string, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Lcreate_hard");
@@ -535,7 +535,7 @@ test_attrname(hid_t fid, const char *string)
CHECK(attr_id, FAIL, "H5Acreate2");
size = H5Aget_name(attr_id, (size_t)MAX_STRING_LENGTH, read_buf);
CHECK(size, FAIL, "H5Aget_name");
- ret = HDstrcmp(read_buf, string);
+ ret = strcmp(read_buf, string);
VERIFY(ret, 0, "strcmp");
read_buf[0] = '\0';
@@ -544,7 +544,7 @@ test_attrname(hid_t fid, const char *string)
CHECK(ret, FAIL, "H5Awrite");
ret = H5Aread(attr_id, dtype_id, read_buf);
CHECK(ret, FAIL, "H5Aread");
- ret = HDstrcmp(read_buf, string);
+ ret = strcmp(read_buf, string);
VERIFY(ret, 0, "strcmp");
/* Clean up */
@@ -602,7 +602,7 @@ test_compound(hid_t fid, const char *string)
/* Check that the field name was stored correctly */
readbuf = H5Tget_member_name(s1_tid, 0);
- ret = HDstrcmp(readbuf, string);
+ ret = strcmp(readbuf, string);
VERIFY(ret, 0, "strcmp");
H5free_memory(readbuf);
@@ -685,7 +685,7 @@ test_enum(hid_t H5_ATTR_UNUSED fid, const char *string)
VERIFY(val, E1_WHITE, "H5Tenum_valueof");
ret = H5Tenum_nameof(type_id, &val, readbuf, (size_t)MAX_STRING_LENGTH);
CHECK(ret, FAIL, "H5Tenum_nameof");
- ret = HDstrcmp(readbuf, string);
+ ret = strcmp(readbuf, string);
VERIFY(ret, 0, "strcmp");
/* Close the datatype */
@@ -712,7 +712,7 @@ test_opaque(hid_t H5_ATTR_UNUSED fid, const char *string)
/* Read the tag back. */
read_buf = H5Tget_tag(type_id);
- ret = HDstrcmp(read_buf, string);
+ ret = strcmp(read_buf, string);
VERIFY(ret, 0, "H5Tget_tag");
H5free_memory(read_buf);
@@ -786,7 +786,7 @@ dump_string(const char *string)
printf("The string was:\n %s", string);
printf("Or in hex:\n");
- length = HDstrlen(string);
+ length = strlen(string);
for (x = 0; x < length; x++)
printf("%x ", string[x] & (0x000000FF));
diff --git a/test/API/tvlstr.c b/test/API/tvlstr.c
index ced17ea527f..a9375c8e865 100644
--- a/test/API/tvlstr.c
+++ b/test/API/tvlstr.c
@@ -186,7 +186,7 @@ test_vlstrings_basic(void)
/* Count the actual number of bytes used by the strings */
for (i = 0, str_used = 0; i < SPACE1_DIM1; i++)
- str_used += HDstrlen(wdata[i]) + 1;
+ str_used += strlen(wdata[i]) + 1;
/* Compare against the strings actually written */
VERIFY(size, (hsize_t)str_used, "H5Dvlen_get_buf_size");
@@ -200,12 +200,12 @@ test_vlstrings_basic(void)
/* Compare data read in */
for (i = 0; i < SPACE1_DIM1; i++) {
- if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
+ if (strlen(wdata[i]) != strlen(rdata[i])) {
TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i,
- (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
continue;
} /* end if */
- if (HDstrcmp(wdata[i], rdata[i]) != 0) {
+ if (strcmp(wdata[i], rdata[i]) != 0) {
TestErrPrintf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n", (int)i, wdata[i],
(int)i, rdata[i]);
continue;
@@ -304,16 +304,16 @@ test_vlstrings_special(void)
/* Compare data read in */
for (i = 0; i < SPACE1_DIM1; i++) {
- if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
+ if (strlen(wdata[i]) != strlen(rdata[i])) {
TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i,
- (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
continue;
} /* end if */
if ((wdata[i] == NULL && rdata[i] != NULL) || (rdata[i] == NULL && wdata[i] != NULL)) {
TestErrPrintf("VL data values don't match!\n");
continue;
} /* end if */
- if (HDstrcmp(wdata[i], rdata[i]) != 0) {
+ if (strcmp(wdata[i], rdata[i]) != 0) {
TestErrPrintf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n", (int)i, wdata[i],
(int)i, rdata[i]);
continue;
@@ -424,12 +424,12 @@ test_vlstring_type(void)
ret = H5Tget_class(tid_vlstr);
VERIFY(ret, H5T_STRING, "H5Tget_class");
ret = H5Tis_variable_str(tid_vlstr);
- VERIFY(ret, TRUE, "H5Tis_variable_str");
+ VERIFY(ret, true, "H5Tis_variable_str");
/* Verify that the class detects as a string */
vl_str = H5Tdetect_class(tid_vlstr, H5T_STRING);
CHECK(vl_str, FAIL, "H5Tdetect_class");
- VERIFY(vl_str, TRUE, "H5Tdetect_class");
+ VERIFY(vl_str, true, "H5Tdetect_class");
/* Check default character set and padding */
cset = H5Tget_cset(tid_vlstr);
@@ -533,12 +533,12 @@ test_compact_vlstring(void)
/* Compare data read in */
for (i = 0; i < SPACE1_DIM1; i++) {
- if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
+ if (strlen(wdata[i]) != strlen(rdata[i])) {
TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i,
- (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
continue;
} /* end if */
- if (HDstrcmp(wdata[i], rdata[i]) != 0) {
+ if (strcmp(wdata[i], rdata[i]) != 0) {
TestErrPrintf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n", (int)i, wdata[i],
(int)i, rdata[i]);
continue;
@@ -611,7 +611,7 @@ test_write_vl_string_attribute(void)
ret = H5Aread(att, type, &string_att_check);
CHECK(ret, FAIL, "H5Aread");
- if (HDstrcmp(string_att_check, string_att) != 0)
+ if (strcmp(string_att_check, string_att) != 0)
TestErrPrintf("VL string attributes don't match!, string_att=%s, string_att_check=%s\n", string_att,
string_att_check);
@@ -634,7 +634,7 @@ test_write_vl_string_attribute(void)
ret = H5Aread(att, type, &string_att_check);
CHECK(ret, FAIL, "H5Aread");
- if (HDstrcmp(string_att_check, string_att_write) != 0)
+ if (strcmp(string_att_check, string_att_write) != 0)
TestErrPrintf("VL string attributes don't match!, string_att_write=%s, string_att_check=%s\n",
string_att_write, string_att_check);
@@ -695,7 +695,7 @@ test_read_vl_string_attribute(void)
ret = H5Aread(att, type, &string_att_check);
CHECK(ret, FAIL, "H5Aread");
- if (HDstrcmp(string_att_check, string_att) != 0)
+ if (strcmp(string_att_check, string_att) != 0)
TestErrPrintf("VL string attributes don't match!, string_att=%s, string_att_check=%s\n", string_att,
string_att_check);
@@ -713,7 +713,7 @@ test_read_vl_string_attribute(void)
ret = H5Aread(att, type, &string_att_check);
CHECK(ret, FAIL, "H5Aread");
- if (HDstrcmp(string_att_check, string_att_write) != 0)
+ if (strcmp(string_att_check, string_att_write) != 0)
TestErrPrintf("VL string attributes don't match!, string_att_write=%s, string_att_check=%s\n",
string_att_write, string_att_check);
@@ -772,7 +772,7 @@ read_scalar_dset(hid_t file, hid_t type, hid_t space, char *name, char *data)
ret = H5Dclose(dset);
CHECK(ret, FAIL, "H5Dclose");
- if (HDstrcmp(data, data_read) != 0)
+ if (strcmp(data, data_read) != 0)
TestErrPrintf("Expected %s for dataset %s but read %s\n", data, name, data_read);
ret = H5Treclaim(type, space, H5P_DEFAULT, &data_read);
@@ -816,33 +816,33 @@ test_vl_rewrite(void)
/* Create in file 1 */
for (i = 0; i < REWRITE_NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "/set_%d", i);
+ snprintf(name, sizeof(name), "/set_%d", i);
write_scalar_dset(file1, type, space, name, name);
}
/* Effectively copy data from file 1 to 2 */
for (i = 0; i < REWRITE_NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "/set_%d", i);
+ snprintf(name, sizeof(name), "/set_%d", i);
read_scalar_dset(file1, type, space, name, name);
write_scalar_dset(file2, type, space, name, name);
}
/* Read back from file 2 */
for (i = 0; i < REWRITE_NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "/set_%d", i);
+ snprintf(name, sizeof(name), "/set_%d", i);
read_scalar_dset(file2, type, space, name, name);
} /* end for */
/* Remove from file 2. */
for (i = 0; i < REWRITE_NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "/set_%d", i);
+ snprintf(name, sizeof(name), "/set_%d", i);
ret = H5Ldelete(file2, name, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Ldelete");
} /* end for */
/* Effectively copy from file 1 to file 2 */
for (i = 0; i < REWRITE_NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "/set_%d", i);
+ snprintf(name, sizeof(name), "/set_%d", i);
read_scalar_dset(file1, type, space, name, name);
write_scalar_dset(file2, type, space, name, name);
} /* end for */
diff --git a/test/API/tvltypes.c b/test/API/tvltypes.c
index b4ccef78f60..9e6027cd935 100644
--- a/test/API/tvltypes.c
+++ b/test/API/tvltypes.c
@@ -1244,9 +1244,9 @@ test_vltypes_compound_vlstr(void)
wdata[i].v.p = (s2 *)malloc((i + L3_INCM) * sizeof(s2));
wdata[i].v.len = i + L3_INCM;
for (t1 = (s2 *)((wdata[i].v).p), j = 0; j < (i + L3_INCM); j++, t1++) {
- HDstrcat(str, "m");
- t1->string = (char *)malloc(HDstrlen(str) * sizeof(char) + 1);
- HDstrcpy(t1->string, str);
+ strcat(str, "m");
+ t1->string = (char *)malloc(strlen(str) * sizeof(char) + 1);
+ strcpy(t1->string, str);
/*t1->color = red;*/
t1->color = blue;
}
@@ -1387,7 +1387,7 @@ test_vltypes_compound_vlstr(void)
for (t1 = (s2 *)(wdata[i].v.p), t2 = (s2 *)(rdata[i].v.p), j = 0; j < rdata[i].v.len;
j++, t1++, t2++) {
- if (HDstrcmp(t1->string, t2->string) != 0) {
+ if (strcmp(t1->string, t2->string) != 0) {
TestErrPrintf("VL data values don't match!, t1->string=%s, t2->string=%s\n", t1->string,
t2->string);
continue;
@@ -1409,14 +1409,14 @@ test_vltypes_compound_vlstr(void)
CHECK(ret, FAIL, "H5Treclaim");
/* Use this part for new data */
- HDstrcpy(str, "bbbbbbbb\0");
+ strcpy(str, "bbbbbbbb\0");
for (i = 0; i < SPACE1_DIM1; i++) {
wdata2[i].v.p = (s2 *)malloc((i + 1) * sizeof(s2));
wdata2[i].v.len = i + 1;
for (t1 = (s2 *)(wdata2[i].v).p, j = 0; j < i + 1; j++, t1++) {
- HDstrcat(str, "pp");
- t1->string = (char *)malloc(HDstrlen(str) * sizeof(char) + 1);
- HDstrcpy(t1->string, str);
+ strcat(str, "pp");
+ t1->string = (char *)malloc(strlen(str) * sizeof(char) + 1);
+ strcpy(t1->string, str);
t1->color = green;
}
} /* end for */
@@ -1448,7 +1448,7 @@ test_vltypes_compound_vlstr(void)
for (t1 = (s2 *)(wdata2[i].v.p), t2 = (s2 *)(rdata2[i].v.p), j = 0; j < rdata2[i].v.len;
j++, t1++, t2++) {
- if (HDstrcmp(t1->string, t2->string) != 0) {
+ if (strcmp(t1->string, t2->string) != 0) {
TestErrPrintf("VL data values don't match!, t1->string=%s, t2->string=%s\n", t1->string,
t2->string);
continue;
@@ -2657,16 +2657,16 @@ test_vltypes_fill_value(void)
/* Layout specific actions */
switch (layout) {
case H5D_COMPACT:
- HDstrcpy(dset_name1, "dataset1-compact");
- HDstrcpy(dset_name2, "dataset2-compact");
+ strcpy(dset_name1, "dataset1-compact");
+ strcpy(dset_name2, "dataset2-compact");
dset_dspace_id = small_dspace_id;
ret = H5Pset_layout(tmp_dcpl_id, H5D_COMPACT);
CHECK(ret, FAIL, "H5Pset_layout");
break;
case H5D_CONTIGUOUS:
- HDstrcpy(dset_name1, "dataset1-contig");
- HDstrcpy(dset_name2, "dataset2-contig");
+ strcpy(dset_name1, "dataset1-contig");
+ strcpy(dset_name2, "dataset2-contig");
dset_dspace_id = large_dspace_id;
break;
@@ -2678,15 +2678,15 @@ test_vltypes_fill_value(void)
CHECK(ret, FAIL, "H5Pset_chunk");
#ifdef H5_HAVE_FILTER_DEFLATE
if (test_loop == 1) {
- HDstrcpy(dset_name1, "dataset1-chunked-compressed");
- HDstrcpy(dset_name2, "dataset2-chunked-compressed");
+ strcpy(dset_name1, "dataset1-chunked-compressed");
+ strcpy(dset_name2, "dataset2-chunked-compressed");
ret = H5Pset_deflate(tmp_dcpl_id, 3);
CHECK(ret, FAIL, "H5Pset_deflate");
} /* end if */
else {
#endif /* H5_HAVE_FILTER_DEFLATE */
- HDstrcpy(dset_name1, "dataset1-chunked");
- HDstrcpy(dset_name2, "dataset2-chunked");
+ strcpy(dset_name1, "dataset1-chunked");
+ strcpy(dset_name2, "dataset2-chunked");
#ifdef H5_HAVE_FILTER_DEFLATE
} /* end else */
#endif /* H5_HAVE_FILTER_DEFLATE */
@@ -2767,16 +2767,16 @@ test_vltypes_fill_value(void)
/* Layout specific actions */
switch (layout) {
case H5D_COMPACT:
- HDstrcpy(dset_name1, "dataset1-compact");
- HDstrcpy(dset_name2, "dataset2-compact");
+ strcpy(dset_name1, "dataset1-compact");
+ strcpy(dset_name2, "dataset2-compact");
dset_dspace_id = small_dspace_id;
dset_select_dspace_id = small_select_dspace_id;
dset_elmts = SPACE4_DIM_SMALL;
break;
case H5D_CONTIGUOUS:
- HDstrcpy(dset_name1, "dataset1-contig");
- HDstrcpy(dset_name2, "dataset2-contig");
+ strcpy(dset_name1, "dataset1-contig");
+ strcpy(dset_name2, "dataset2-contig");
dset_dspace_id = large_dspace_id;
dset_select_dspace_id = large_select_dspace_id;
dset_elmts = SPACE4_DIM_LARGE;
@@ -2785,13 +2785,13 @@ test_vltypes_fill_value(void)
case H5D_CHUNKED:
#ifdef H5_HAVE_FILTER_DEFLATE
if (test_loop == 1) {
- HDstrcpy(dset_name1, "dataset1-chunked-compressed");
- HDstrcpy(dset_name2, "dataset2-chunked-compressed");
+ strcpy(dset_name1, "dataset1-chunked-compressed");
+ strcpy(dset_name2, "dataset2-chunked-compressed");
} /* end if */
else {
#endif /* H5_HAVE_FILTER_DEFLATE */
- HDstrcpy(dset_name1, "dataset1-chunked");
- HDstrcpy(dset_name2, "dataset2-chunked");
+ strcpy(dset_name1, "dataset1-chunked");
+ strcpy(dset_name2, "dataset2-chunked");
#ifdef H5_HAVE_FILTER_DEFLATE
} /* end else */
#endif /* H5_HAVE_FILTER_DEFLATE */
@@ -2821,10 +2821,10 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 || HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 || strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -2844,11 +2844,10 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if ((i % 2) == select_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
- HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 || strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -2879,10 +2878,10 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 || HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 || strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -2902,11 +2901,10 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if ((i % 2) == select_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
- HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 || strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -2954,16 +2952,16 @@ test_vltypes_fill_value(void)
/* Layout specific actions */
switch (layout) {
case H5D_COMPACT:
- HDstrcpy(dset_name1, "dataset1-compact");
- HDstrcpy(dset_name2, "dataset2-compact");
+ strcpy(dset_name1, "dataset1-compact");
+ strcpy(dset_name2, "dataset2-compact");
dset_dspace_id = small_dspace_id;
dset_select_dspace_id = small_select_dspace_id;
dset_elmts = SPACE4_DIM_SMALL;
break;
case H5D_CONTIGUOUS:
- HDstrcpy(dset_name1, "dataset1-contig");
- HDstrcpy(dset_name2, "dataset2-contig");
+ strcpy(dset_name1, "dataset1-contig");
+ strcpy(dset_name2, "dataset2-contig");
dset_dspace_id = large_dspace_id;
dset_select_dspace_id = large_select_dspace_id;
dset_elmts = SPACE4_DIM_LARGE;
@@ -2972,13 +2970,13 @@ test_vltypes_fill_value(void)
case H5D_CHUNKED:
#ifdef H5_HAVE_FILTER_DEFLATE
if (test_loop == 1) {
- HDstrcpy(dset_name1, "dataset1-chunked-compressed");
- HDstrcpy(dset_name2, "dataset2-chunked-compressed");
+ strcpy(dset_name1, "dataset1-chunked-compressed");
+ strcpy(dset_name2, "dataset2-chunked-compressed");
} /* end if */
else {
#endif /* H5_HAVE_FILTER_DEFLATE */
- HDstrcpy(dset_name1, "dataset1-chunked");
- HDstrcpy(dset_name2, "dataset2-chunked");
+ strcpy(dset_name1, "dataset1-chunked");
+ strcpy(dset_name2, "dataset2-chunked");
#ifdef H5_HAVE_FILTER_DEFLATE
} /* end else */
#endif /* H5_HAVE_FILTER_DEFLATE */
@@ -3021,22 +3019,21 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if (i == single_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
- HDstrcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
- HDstrcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
- HDstrcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
- HDstrcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
- HDstrcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
+ if (strcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
+ strcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
+ strcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
+ strcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
+ strcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
+ strcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
} /* end if */
else {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
- HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 || strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -3057,23 +3054,23 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if (i == single_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
- HDstrcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
- HDstrcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
- HDstrcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
- HDstrcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
- HDstrcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
+ if (strcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
+ strcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
+ strcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
+ strcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
+ strcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
+ strcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
} /* end if */
else {
if ((i % 2) == select_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
- HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 ||
+ strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -3109,22 +3106,21 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if (i == single_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
- HDstrcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
- HDstrcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
- HDstrcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
- HDstrcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
- HDstrcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
+ if (strcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
+ strcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
+ strcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
+ strcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
+ strcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
+ strcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
} /* end if */
else {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
- HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 || strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -3145,23 +3141,23 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if (i == single_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
- HDstrcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
- HDstrcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
- HDstrcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
- HDstrcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
- HDstrcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
+ if (strcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
+ strcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
+ strcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
+ strcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
+ strcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
+ strcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
} /* end if */
else {
if ((i % 2) == select_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
- HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 ||
+ strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
diff --git a/test/CMakePassthroughVOLTests.cmake b/test/CMakePassthroughVOLTests.cmake
index 94433de43c9..a5d9b598fb8 100644
--- a/test/CMakePassthroughVOLTests.cmake
+++ b/test/CMakePassthroughVOLTests.cmake
@@ -37,26 +37,26 @@ endforeach ()
foreach (voltest ${VOL_LIST})
foreach (h5_tfile ${HDF5_TEST_FILES})
- HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_tfile}" "${PROJECT_BINARY_DIR}/${voltest}/${h5_tfile}" "HDF5_VOLTEST_LIB_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_tfile}" "${PROJECT_BINARY_DIR}/${voltest}/${h5_tfile}" "HDF5_VOLTEST_LIB_files")
endforeach ()
endforeach ()
foreach (voltest ${VOL_LIST})
foreach (ref_file ${HDF5_REFERENCE_FILES})
- HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file}" "${PROJECT_BINARY_DIR}/${voltest}/${ref_file}" "HDF5_VOLTEST_LIB_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${ref_file}" "${PROJECT_BINARY_DIR}/${voltest}/${ref_file}" "HDF5_VOLTEST_LIB_files")
endforeach ()
endforeach ()
foreach (voltest ${VOL_LIST})
foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
- HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/${h5_file}" "${HDF5_TEST_BINARY_DIR}/${voltest}/${h5_file}" "HDF5_VOLTEST_LIB_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/${voltest}/${h5_file}" "HDF5_VOLTEST_LIB_files")
endforeach ()
endforeach ()
foreach (voltest ${VOL_LIST})
foreach (plistfile ${HDF5_REFERENCE_PLIST_FILES})
- HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/${plistfile}" "${PROJECT_BINARY_DIR}/${voltest}/testfiles/plist_files/${plistfile}" "HDF5_VOLTEST_LIB_files")
- HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/def_${plistfile}" "${PROJECT_BINARY_DIR}/${voltest}/testfiles/plist_files/def_${plistfile}" "HDF5_VOLTEST_LIB_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/plist_files/${plistfile}" "${PROJECT_BINARY_DIR}/${voltest}/testfiles/plist_files/${plistfile}" "HDF5_VOLTEST_LIB_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/plist_files/def_${plistfile}" "${PROJECT_BINARY_DIR}/${voltest}/testfiles/plist_files/def_${plistfile}" "HDF5_VOLTEST_LIB_files")
endforeach ()
endforeach ()
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake
index 67cba87017e..d2acc3500a5 100644
--- a/test/CMakeTests.cmake
+++ b/test/CMakeTests.cmake
@@ -36,12 +36,9 @@ add_custom_command (
)
foreach (h5_tfile ${HDF5_TEST_FILES})
- HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_tfile}" "${PROJECT_BINARY_DIR}/H5TEST/${h5_tfile}" "HDF5_TEST_LIB_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_tfile}" "${PROJECT_BINARY_DIR}/H5TEST/testfiles/${h5_tfile}" "HDF5_TEST_LIB_files")
endforeach ()
-# --------------------------------------------------------------------
-# Copy all the HDF5 files from the test directory into the source directory
-# --------------------------------------------------------------------
set (HDF5_REFERENCE_FILES
err_compat_1
err_compat_2
@@ -51,7 +48,7 @@ set (HDF5_REFERENCE_FILES
)
foreach (ref_file ${HDF5_REFERENCE_FILES})
- HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file}" "${PROJECT_BINARY_DIR}/H5TEST/${ref_file}" "HDF5_TEST_LIB_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${ref_file}" "${PROJECT_BINARY_DIR}/H5TEST/testfiles/${ref_file}" "HDF5_TEST_LIB_files")
endforeach ()
# --------------------------------------------------------------------
@@ -109,8 +106,8 @@ set (HDF5_REFERENCE_PLIST_FILES
)
foreach (plistfile ${HDF5_REFERENCE_PLIST_FILES})
- HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/${plistfile}" "${PROJECT_BINARY_DIR}/H5TEST/testfiles/plist_files/${plistfile}" "HDF5_TEST_LIB_files")
- HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/def_${plistfile}" "${PROJECT_BINARY_DIR}/H5TEST/testfiles/plist_files/def_${plistfile}" "HDF5_TEST_LIB_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/plist_files/${plistfile}" "${PROJECT_BINARY_DIR}/H5TEST/testfiles/plist_files/${plistfile}" "HDF5_TEST_LIB_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/plist_files/def_${plistfile}" "${PROJECT_BINARY_DIR}/H5TEST/testfiles/plist_files/def_${plistfile}" "HDF5_TEST_LIB_files")
endforeach ()
# --------------------------------------------------------------------
@@ -172,7 +169,7 @@ set (HDF5_REFERENCE_TEST_FILES
)
foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
- HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/${h5_file}" "${HDF5_TEST_BINARY_DIR}/H5TEST/${h5_file}" "HDF5_TEST_LIB_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_file}" "${HDF5_TEST_BINARY_DIR}/H5TEST/testfiles/${h5_file}" "HDF5_TEST_LIB_files")
endforeach ()
add_custom_target(HDF5_TEST_LIB_files ALL COMMENT "Copying files needed by HDF5_TEST_LIB tests" DEPENDS ${HDF5_TEST_LIB_files_list})
diff --git a/test/CMakeVFDTests.cmake b/test/CMakeVFDTests.cmake
index 7648166b7bc..ed7bd8639e3 100644
--- a/test/CMakeVFDTests.cmake
+++ b/test/CMakeVFDTests.cmake
@@ -26,26 +26,26 @@ endforeach ()
foreach (vfdtest ${VFD_LIST})
foreach (h5_tfile ${HDF5_TEST_FILES})
- HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_tfile}" "${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}" "HDF5_VFDTEST_LIB_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_tfile}" "${PROJECT_BINARY_DIR}/${vfdtest}/testfiles/${h5_tfile}" "HDF5_VFDTEST_LIB_files")
endforeach ()
endforeach ()
foreach (vfdtest ${VFD_LIST})
foreach (ref_file ${HDF5_REFERENCE_FILES})
- HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file}" "${PROJECT_BINARY_DIR}/${vfdtest}/${ref_file}" "HDF5_VFDTEST_LIB_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${ref_file}" "${PROJECT_BINARY_DIR}/${vfdtest}/testfiles/${ref_file}" "HDF5_VFDTEST_LIB_files")
endforeach ()
endforeach ()
foreach (vfdtest ${VFD_LIST})
foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
- HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/${h5_file}" "${HDF5_TEST_BINARY_DIR}/${vfdtest}/${h5_file}" "HDF5_VFDTEST_LIB_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_file}" "${HDF5_TEST_BINARY_DIR}/${vfdtest}/testfiles/${h5_file}" "HDF5_VFDTEST_LIB_files")
endforeach ()
endforeach ()
foreach (vfdtest ${VFD_LIST})
foreach (plistfile ${HDF5_REFERENCE_PLIST_FILES})
- HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/${plistfile}" "${PROJECT_BINARY_DIR}/${vfdtest}/testfiles/plist_files/${plistfile}" "HDF5_VFDTEST_LIB_files")
- HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/def_${plistfile}" "${PROJECT_BINARY_DIR}/${vfdtest}/testfiles/plist_files/def_${plistfile}" "HDF5_VFDTEST_LIB_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/plist_files/${plistfile}" "${PROJECT_BINARY_DIR}/${vfdtest}/testfiles/plist_files/${plistfile}" "HDF5_VFDTEST_LIB_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/plist_files/def_${plistfile}" "${PROJECT_BINARY_DIR}/${vfdtest}/testfiles/plist_files/def_${plistfile}" "HDF5_VFDTEST_LIB_files")
endforeach ()
endforeach ()
diff --git a/test/accum.c b/test/accum.c
index 6f4db2d4e6e..5a19efeebf5 100644
--- a/test/accum.c
+++ b/test/accum.c
@@ -51,7 +51,7 @@ unsigned test_read_after(H5F_t *f);
unsigned test_free(H5F_t *f);
unsigned test_big(H5F_t *f);
unsigned test_random_write(H5F_t *f);
-unsigned test_swmr_write_big(hbool_t newest_format);
+unsigned test_swmr_write_big(bool newest_format);
/* Helper Function Prototypes */
void accum_printf(const H5F_t *f);
@@ -61,7 +61,7 @@ void accum_printf(const H5F_t *f);
#define accum_read(a, s, b) H5F_block_read(f, H5FD_MEM_DEFAULT, (haddr_t)(a), (size_t)(s), (b))
#define accum_free(f, a, s) H5F__accum_free(f->shared, H5FD_MEM_DEFAULT, (haddr_t)(a), (hsize_t)(s))
#define accum_flush(f) H5F__accum_flush(f->shared)
-#define accum_reset(f) H5F__accum_reset(f->shared, TRUE)
+#define accum_reset(f) H5F__accum_reset(f->shared, true)
/* ================= */
/* Main Test Routine */
@@ -81,14 +81,14 @@ int
main(void)
{
unsigned nerrors = 0; /* track errors */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
- hid_t fid = -1;
- hid_t fapl = -1; /* File access property list */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
+ hid_t fid = H5I_INVALID_HID;
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
char filename[1024];
H5F_t *f = NULL; /* File for all tests */
/* Test Setup */
- HDputs("Testing the metadata accumulator");
+ puts("Testing the metadata accumulator");
/* File access property list */
h5_reset();
@@ -103,7 +103,7 @@ main(void)
/* Push API context */
if (H5CX_push() < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Get H5F_t * to internal file structure */
if (NULL == (f = (H5F_t *)H5VL_object(fid)))
@@ -133,30 +133,30 @@ main(void)
nerrors += test_random_write(f);
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
/* End of test code, close and delete file */
if (H5Fclose(fid) < 0)
TEST_ERROR;
/* This test uses a different file */
- nerrors += test_swmr_write_big(TRUE);
- nerrors += test_swmr_write_big(FALSE);
+ nerrors += test_swmr_write_big(true);
+ nerrors += test_swmr_write_big(false);
if (nerrors)
goto error;
- HDputs("All metadata accumulator tests passed.");
+ puts("All metadata accumulator tests passed.");
h5_cleanup(FILENAME, fapl);
return 0;
error:
if (api_ctx_pushed)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
return 1;
} /* end main() */
@@ -2047,19 +2047,19 @@ fprintf(stderr, "Random # seed was: %u\n", seed);
*-------------------------------------------------------------------------
*/
unsigned
-test_swmr_write_big(hbool_t newest_format)
+test_swmr_write_big(bool newest_format)
{
- hid_t fid = -1; /* File ID */
- hid_t fapl = -1; /* File access property list */
- H5F_t *rf = NULL; /* File pointer */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
+ H5F_t *rf = NULL; /* File pointer */
char filename[1024];
uint8_t *wbuf2 = NULL, *rbuf = NULL; /* Buffers for reading & writing */
uint8_t wbuf[1024]; /* Buffer for reading & writing */
unsigned u; /* Local index variable */
- hbool_t process_success = FALSE;
+ bool process_success = false;
char *driver = NULL; /* VFD string (from env variable) */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
if (newest_format)
TESTING("SWMR write of large metadata: with latest format");
@@ -2070,17 +2070,17 @@ test_swmr_write_big(hbool_t newest_format)
/* Not a Windows or POSIX system */
SKIPPED();
- HDputs(" Test skipped: Not a Windows or POSIX system.");
+ puts(" Test skipped: Not a Windows or POSIX system.");
return 0;
#else
/* Skip this test if SWMR I/O is not supported for the VFD specified
* by the environment variable.
*/
- driver = HDgetenv(HDF5_DRIVER);
+ driver = getenv(HDF5_DRIVER);
if (!H5FD__supports_swmr_test(driver)) {
SKIPPED();
- HDputs(" Test skipped due to VFD not supporting SWMR I/O.");
+ puts(" Test skipped due to VFD not supporting SWMR I/O.");
return 0;
}
@@ -2113,7 +2113,7 @@ test_swmr_write_big(hbool_t newest_format)
/* Push API context */
if (H5CX_push() < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Get H5F_t * to internal file structure */
if (NULL == (rf = (H5F_t *)H5VL_object(fid)))
@@ -2193,17 +2193,17 @@ test_swmr_write_big(hbool_t newest_format)
si.cb = sizeof(si);
ZeroMemory(&pi, sizeof(pi));
- if (0 == CreateProcess(NULL, SWMR_READER, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) {
+ if (0 == CreateProcess(NULL, SWMR_READER, NULL, NULL, false, 0, NULL, NULL, &si, &pi)) {
printf("CreateProcess failed (%d).\n", GetLastError());
FAIL_STACK_ERROR;
}
(void)WaitForSingleObject(pi.hProcess, INFINITE);
- if (FALSE == GetExitCodeProcess(pi.hProcess, &exit_code) || EXIT_FAILURE == exit_code)
- process_success = FALSE;
+ if (false == GetExitCodeProcess(pi.hProcess, &exit_code) || EXIT_FAILURE == exit_code)
+ process_success = false;
else
- process_success = TRUE;
+ process_success = true;
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
@@ -2215,7 +2215,7 @@ test_swmr_write_big(hbool_t newest_format)
/* Fork child process to verify that the data at [1024, 2014] does get written to disk */
if ((pid = fork()) < 0) {
- HDperror("fork");
+ perror("fork");
FAIL_STACK_ERROR;
}
else if (0 == pid) { /* Child process */
@@ -2228,7 +2228,7 @@ test_swmr_write_big(hbool_t newest_format)
char *const new_argv[] = {swmr_reader, NULL};
/* Run the reader */
status = execv(SWMR_READER, new_argv);
- printf("errno from execv = %s\n", HDstrerror(errno));
+ printf("errno from execv = %s\n", strerror(errno));
FAIL_STACK_ERROR;
} /* end if */
@@ -2238,7 +2238,7 @@ test_swmr_write_big(hbool_t newest_format)
/* Check if child process terminates normally and its return value */
if (WIFEXITED(status) && !WEXITSTATUS(status))
- process_success = TRUE;
+ process_success = true;
}
#endif /* defined(H5_HAVE_WIN32_API) */
@@ -2259,9 +2259,9 @@ test_swmr_write_big(hbool_t newest_format)
FAIL_STACK_ERROR;
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
/* Release memory */
if (wbuf2)
@@ -2277,7 +2277,7 @@ test_swmr_write_big(hbool_t newest_format)
H5Fclose(fid);
if (api_ctx_pushed)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
H5Pclose(fapl);
@@ -2319,7 +2319,7 @@ accum_printf(const H5F_t *f)
printf("=====================================================\n");
printf(" accumulator allocated size == %zu\n", accum->alloc_size);
printf(" accumulated data size == %zu\n", accum->size);
- fprintf(stdout, " accumulator dirty? == %s\n", accum->dirty ? "TRUE" : "FALSE");
+ fprintf(stdout, " accumulator dirty? == %s\n", accum->dirty ? "true" : "false");
printf("=====================================================\n");
fprintf(stdout, " start of accumulated data, loc = %" PRIuHADDR "\n", accum->loc);
if (accum->dirty) {
diff --git a/test/accum_swmr_reader.c b/test/accum_swmr_reader.c
index 659a60a5c0c..5b3ecd8a7fc 100644
--- a/test/accum_swmr_reader.c
+++ b/test/accum_swmr_reader.c
@@ -48,7 +48,7 @@ main(void)
uint8_t rbuf[1024]; /* Buffer for reading */
uint8_t buf[1024]; /* Buffer for holding the expected data */
char *driver = NULL; /* VFD string (from env variable) */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
/* Testing setup */
h5_reset();
@@ -56,7 +56,7 @@ main(void)
/* Skip this test if SWMR I/O is not supported for the VFD specified
* by the environment variable.
*/
- driver = HDgetenv(HDF5_DRIVER);
+ driver = getenv(HDF5_DRIVER);
if (!H5FD__supports_swmr_test(driver))
return EXIT_SUCCESS;
@@ -77,7 +77,7 @@ main(void)
/* Push API context */
if (H5CX_push() < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Get H5F_t * to internal file structure */
if (NULL == (f = (H5F_t *)H5VL_object(fid)))
@@ -98,9 +98,9 @@ main(void)
FAIL_STACK_ERROR;
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
return EXIT_SUCCESS;
@@ -113,7 +113,7 @@ main(void)
H5E_END_TRY
if (api_ctx_pushed)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
return EXIT_FAILURE;
} /* end main() */
diff --git a/test/app_ref.c b/test/app_ref.c
index 7d46470f590..729862ee39f 100644
--- a/test/app_ref.c
+++ b/test/app_ref.c
@@ -94,15 +94,15 @@ main(void)
TESTING("library shutdown with reference count > 1");
/* Get the VFD to use */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
/* Don't run this test with the multi/split VFD. A bug in library shutdown
* ordering causes problems with the multi VFD when IDs are left dangling.
*/
- if (!HDstrcmp(env_h5_drvr, "multi") || !HDstrcmp(env_h5_drvr, "split")) {
- HDputs("\n -- SKIPPED for incompatible VFD --");
+ if (!strcmp(env_h5_drvr, "multi") || !strcmp(env_h5_drvr, "split")) {
+ puts("\n -- SKIPPED for incompatible VFD --");
return 0;
}
@@ -193,7 +193,7 @@ main(void)
error:
- HDputs("***** APPLICATION REFERENCE COUNT TESTS FAILED *****");
+ puts("***** APPLICATION REFERENCE COUNT TESTS FAILED *****");
return EXIT_FAILURE;
}
diff --git a/test/atomic_reader.c b/test/atomic_reader.c
index c8bbbaef079..12e2d5cd6e9 100644
--- a/test/atomic_reader.c
+++ b/test/atomic_reader.c
@@ -114,7 +114,7 @@ verify(int fd, unsigned int k)
} /* end if */
/* Position the file at the beginning */
- if (lseek(fd, (off_t)0, SEEK_SET) < 0) {
+ if (lseek(fd, 0, SEEK_SET) < 0) {
printf("READER: error from lseek\n");
goto error;
} /* end if */
diff --git a/test/atomic_writer.c b/test/atomic_writer.c
index 33252f161ea..89edfe75e57 100644
--- a/test/atomic_writer.c
+++ b/test/atomic_writer.c
@@ -190,7 +190,7 @@ main(int argc, char *argv[])
buf[u] = n;
/* Position the file to the proper location */
- if (lseek(fd, (off_t)(n * sizeof(unsigned int)), SEEK_SET) < 0) {
+ if (lseek(fd, (n * sizeof(unsigned int)), SEEK_SET) < 0) {
printf("WRITER: error from lseek\n");
goto error;
} /* end if */
diff --git a/test/big.c b/test/big.c
index 4c4d31cf5c7..428da0aed11 100644
--- a/test/big.c
+++ b/test/big.c
@@ -143,7 +143,7 @@ is_sparse(void)
if ((fd = HDopen("x.h5", O_RDWR | O_TRUNC | O_CREAT, H5_POSIX_CREATE_MODE_RW)) < 0)
return 0;
- if (HDlseek(fd, (off_t)(1024 * 1024), SEEK_SET) != 1024 * 1024)
+ if (HDlseek(fd, (HDoff_t)(1024 * 1024), SEEK_SET) != 1024 * 1024)
return 0;
if (5 != HDwrite(fd, "hello", (size_t)5))
return 0;
@@ -263,11 +263,11 @@ enough_room(hid_t fapl)
/* Create files */
for (i = 0; i < NELMTS(fd); i++) {
- HDsnprintf(name, sizeof(name), filename, i);
+ snprintf(name, sizeof(name), filename, i);
if ((fd[i] = HDopen(name, O_RDWR | O_CREAT | O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0) {
goto done;
}
- if ((off_t)size != HDlseek(fd[i], (off_t)size, SEEK_SET)) {
+ if ((HDoff_t)size != HDlseek(fd[i], (HDoff_t)size, SEEK_SET)) {
goto done;
}
if (1 != HDwrite(fd[i], "X", (size_t)1)) {
@@ -278,7 +278,7 @@ enough_room(hid_t fapl)
done:
for (i = 0; i < NELMTS(fd) && fd[i] >= 0; i++) {
- HDsnprintf(name, sizeof(name), filename, i);
+ snprintf(name, sizeof(name), filename, i);
if (HDclose(fd[i]) < 0)
ret_value = 0;
HDremove(name);
@@ -306,11 +306,12 @@ writer(char *filename, hid_t fapl, fsizes_t testsize, int wrt_n)
hsize_t size2[1] = {8LL * 1024LL * 1024LL * 1024LL};
hsize_t hs_start[1];
hsize_t hs_size[1];
- hid_t file = -1, space1 = -1, space2 = -1, mem_space = -1, d1 = -1, d2 = -1;
- int *buf = (int *)malloc(sizeof(int) * WRT_SIZE);
- int i, j;
- FILE *out = fopen(DNAME, "w");
- hid_t dcpl;
+ hid_t file = H5I_INVALID_HID, space1 = H5I_INVALID_HID, space2 = H5I_INVALID_HID,
+ mem_space = H5I_INVALID_HID, d1 = H5I_INVALID_HID, d2 = H5I_INVALID_HID;
+ int *buf = (int *)malloc(sizeof(int) * WRT_SIZE);
+ int i, j;
+ FILE *out = fopen(DNAME, "w");
+ hid_t dcpl;
switch (testsize) {
case LFILE:
@@ -449,7 +450,7 @@ static int
reader(char *filename, hid_t fapl)
{
FILE *script = NULL;
- hid_t file = -1, mspace = -1, fspace = -1, d2 = -1;
+ hid_t file = H5I_INVALID_HID, mspace = H5I_INVALID_HID, fspace = H5I_INVALID_HID, d2 = H5I_INVALID_HID;
char ln[128], *s;
hsize_t hs_offset[1];
hsize_t hs_size[1] = {WRT_SIZE};
@@ -474,7 +475,7 @@ reader(char *filename, hid_t fapl)
FAIL_STACK_ERROR;
/* Read each region */
- while (HDfgets(ln, (int)sizeof(ln), script)) {
+ while (fgets(ln, (int)sizeof(ln), script)) {
if ('#' != ln[0])
break;
i = (int)strtol(ln + 1, &s, 10);
@@ -500,7 +501,7 @@ reader(char *filename, hid_t fapl)
}
else if (wrong) {
SKIPPED();
- HDputs(" Possible overlap with another region.");
+ puts(" Possible overlap with another region.");
nerrors++;
}
else {
@@ -575,7 +576,7 @@ test_sec2(hid_t fapl)
goto quit;
}
/* Test big file with the SEC2 driver */
- HDputs("Testing big file with the SEC2 Driver ");
+ puts("Testing big file with the SEC2 Driver ");
h5_fixname(FILENAME[1], fapl, filename, sizeof filename);
@@ -584,7 +585,7 @@ test_sec2(hid_t fapl)
if (reader(filename, fapl))
goto error;
- HDputs("Test passed with the SEC2 Driver.");
+ puts("Test passed with the SEC2 Driver.");
quit:
/* End with normal return code */
@@ -594,7 +595,7 @@ test_sec2(hid_t fapl)
return 0;
error:
- HDputs("*** TEST FAILED ***");
+ puts("*** TEST FAILED ***");
return 1;
} /* end test_sec2() */
@@ -609,7 +610,7 @@ test_stdio(hid_t fapl)
fprintf(stdout, "Test for stdio is skipped because file system does not support big files.\n");
goto quit;
}
- HDputs("\nTesting big file with the STDIO Driver ");
+ puts("\nTesting big file with the STDIO Driver ");
h5_fixname(FILENAME[2], fapl, filename, sizeof filename);
@@ -617,7 +618,7 @@ test_stdio(hid_t fapl)
goto error;
if (reader(filename, fapl))
goto error;
- HDputs("Test passed with the STDIO Driver.");
+ puts("Test passed with the STDIO Driver.");
/* Flush stdout at the end of this test routine to ensure later
* output to stderr will not come out before it.
@@ -632,7 +633,7 @@ test_stdio(hid_t fapl)
return 0;
error:
- HDputs("*** TEST FAILED ***");
+ puts("*** TEST FAILED ***");
fflush(stdout);
return 1;
} /* end test_stdio() */
@@ -643,7 +644,7 @@ test_family(hid_t fapl)
char filename[1024];
/* Test huge file with the family driver */
- HDputs("Testing big file with the Family Driver ");
+ puts("Testing big file with the Family Driver ");
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
goto error;
@@ -655,14 +656,14 @@ test_family(hid_t fapl)
* We shouldn't run this test if the file system doesn't support holes
* because we would generate multi-gigabyte files.
*/
- HDputs("Checking if file system is adequate for this test...");
+ puts("Checking if file system is adequate for this test...");
if (!sparse_support) {
- HDputs("Test skipped because file system does not support holes.");
+ puts("Test skipped because file system does not support holes.");
usage();
goto quit;
}
if (!enough_room(fapl)) {
- HDputs("Test skipped because of quota (file size or num open files).");
+ puts("Test skipped because of quota (file size or num open files).");
usage();
goto quit;
}
@@ -676,7 +677,7 @@ test_family(hid_t fapl)
if (reader(filename, fapl))
goto error;
- HDputs("Test passed with the Family Driver.");
+ puts("Test passed with the Family Driver.");
quit:
/* End with normal return code */
@@ -686,7 +687,7 @@ test_family(hid_t fapl)
return 0;
error:
- HDputs("*** TEST FAILED ***");
+ puts("*** TEST FAILED ***");
return 1;
} /* end test_family() */
@@ -705,14 +706,14 @@ int
main(int ac, char **av)
{
unsigned long seed = 0; /* Random # seed */
- hid_t fapl = -1;
- hid_t driver = -1;
+ hid_t fapl = H5I_INVALID_HID;
+ hid_t driver = H5I_INVALID_HID;
/* parameters setup */
while (--ac > 0) {
av++;
- if (HDstrcmp("-fsize", *av) == 0) {
+ if (strcmp("-fsize", *av) == 0) {
/* specify a different family file size */
ac--;
av++;
@@ -725,11 +726,11 @@ main(int ac, char **av)
return 1;
}
}
- else if (HDstrcmp("-c", *av) == 0) {
+ else if (strcmp("-c", *av) == 0) {
/* turn off file system check before test */
cflag = 0;
}
- else if (HDstrcmp("-h", *av) == 0) {
+ else if (strcmp("-h", *av) == 0) {
usage();
return 0;
}
@@ -771,14 +772,14 @@ main(int ac, char **av)
goto error;
}
else
- HDputs("This VFD is not supported");
+ puts("This VFD is not supported");
/* End with normal exit code */
/* fapls are cleaned up in the vfd test code */
return 0;
error:
- HDputs("*** TEST FAILED ***");
+ puts("*** TEST FAILED ***");
if (fapl > 0)
H5Pclose(fapl);
return 1;
diff --git a/test/bittests.c b/test/bittests.c
index 10cd28048ee..df4273792b1 100644
--- a/test/bittests.c
+++ b/test/bittests.c
@@ -44,31 +44,31 @@ test_find(void)
/* The zero length buffer */
memset(v1, 0xaa, sizeof v1);
- n = H5T__bit_find(v1, (size_t)0, (size_t)0, H5T_BIT_LSB, TRUE);
+ n = H5T__bit_find(v1, (size_t)0, (size_t)0, H5T_BIT_LSB, true);
if (-1 != n) {
H5_FAILED();
- HDputs(" Zero length test failed (lsb)!");
+ puts(" Zero length test failed (lsb)!");
goto failed;
}
- n = H5T__bit_find(v1, (size_t)0, (size_t)0, H5T_BIT_MSB, TRUE);
+ n = H5T__bit_find(v1, (size_t)0, (size_t)0, H5T_BIT_MSB, true);
if (-1 != n) {
H5_FAILED();
- HDputs(" Zero length test failed (msb)!");
+ puts(" Zero length test failed (msb)!");
goto failed;
}
/* The zero buffer */
memset(v1, 0, sizeof v1);
- n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_LSB, TRUE);
+ n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_LSB, true);
if (-1 != n) {
H5_FAILED();
- HDputs(" Zero buffer test failed (lsb)!");
+ puts(" Zero buffer test failed (lsb)!");
goto failed;
}
- n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_MSB, TRUE);
+ n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_MSB, true);
if (-1 != n) {
H5_FAILED();
- HDputs(" Zero buffer test failed (msb)!");
+ puts(" Zero buffer test failed (msb)!");
goto failed;
}
@@ -76,13 +76,13 @@ test_find(void)
for (i = 0; i < 8 * (int)sizeof(v1); i++) {
memset(v1, 0, sizeof v1);
v1[i / 8] = (uint8_t)(1 << (i % 8));
- n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_LSB, TRUE);
+ n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_LSB, true);
if ((ssize_t)i != n) {
H5_FAILED();
printf(" Test for set bit %d failed (lsb)!\n", i);
goto failed;
}
- n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_MSB, TRUE);
+ n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_MSB, true);
if ((ssize_t)i != n) {
H5_FAILED();
printf(" Test for set bit %d failed (msb)!\n", i);
@@ -92,16 +92,16 @@ test_find(void)
/* The one buffer */
memset(v1, 0xff, sizeof v1);
- n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_LSB, FALSE);
+ n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_LSB, false);
if (-1 != n) {
H5_FAILED();
- HDputs(" One buffer test failed (lsb)!");
+ puts(" One buffer test failed (lsb)!");
goto failed;
}
- n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_MSB, FALSE);
+ n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_MSB, false);
if (-1 != n) {
H5_FAILED();
- HDputs(" One buffer test failed (msb)!");
+ puts(" One buffer test failed (msb)!");
goto failed;
}
@@ -109,13 +109,13 @@ test_find(void)
for (i = 0; i < 8 * (int)sizeof(v1); i++) {
memset(v1, 0xff, sizeof v1);
v1[i / 8] &= (uint8_t) ~(1 << (i % 8));
- n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_LSB, FALSE);
+ n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_LSB, false);
if ((ssize_t)i != n) {
H5_FAILED();
printf(" Test for clear bit %d failed (lsb)!\n", i);
goto failed;
}
- n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_MSB, FALSE);
+ n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_MSB, false);
if ((ssize_t)i != n) {
H5_FAILED();
printf(" Test for clear bit %d failed (lsb)!\n", i);
@@ -170,12 +170,12 @@ test_copy(void)
break;
if (size > 0 && j >= (int)sizeof(v2)) {
H5_FAILED();
- HDputs(" Unabled to find copied region in destination");
+ puts(" Unabled to find copied region in destination");
goto failed;
}
if (0 == size && j < (int)sizeof(v2)) {
H5_FAILED();
- HDputs(" Found copied bits when we shouldn't have");
+ puts(" Found copied bits when we shouldn't have");
goto failed;
}
@@ -190,7 +190,7 @@ test_copy(void)
}
if (0 == size && n >= 0) {
H5_FAILED();
- HDputs(" Found copied bits and shouldn't have!");
+ puts(" Found copied bits and shouldn't have!");
goto failed;
}
n = H5T__bit_find(v2, d_offset, 8 * sizeof(v2) - d_offset, H5T_BIT_LSB, 0);
@@ -203,7 +203,7 @@ test_copy(void)
}
if (d_offset + size == 8 * sizeof(v2) && n >= 0) {
H5_FAILED();
- HDputs(" High-order zeros are present and shouldn't be!");
+ puts(" High-order zeros are present and shouldn't be!");
goto failed;
}
@@ -221,7 +221,7 @@ test_copy(void)
}
if (0 == size && n >= 0) {
H5_FAILED();
- HDputs(" Found copied bits but shouldn't have (reverse)!");
+ puts(" Found copied bits but shouldn't have (reverse)!");
goto failed;
}
n = H5T__bit_find(v2, (size_t)0, d_offset + size, H5T_BIT_MSB, 0);
@@ -234,7 +234,7 @@ test_copy(void)
}
if (0 == d_offset && n >= 0) {
H5_FAILED();
- HDputs(" Found leading original data but shouldn't have!");
+ puts(" Found leading original data but shouldn't have!");
goto failed;
}
}
@@ -671,18 +671,18 @@ test_set(void)
memset(v2, 0x00, sizeof v2);
/* Set some bits in v2 */
- H5T__bit_set(v2, d_offset, size, TRUE);
+ H5T__bit_set(v2, d_offset, size, true);
for (j = 0; j < (int)sizeof(v2); j++)
if (v2[j])
break;
if (size > 0 && j >= (int)sizeof(v2)) {
H5_FAILED();
- HDputs(" Unabled to find set region in buffer");
+ puts(" Unabled to find set region in buffer");
goto failed;
}
if (0 == size && j < (int)sizeof(v2)) {
H5_FAILED();
- HDputs(" Found set bits when we shouldn't have");
+ puts(" Found set bits when we shouldn't have");
goto failed;
}
@@ -697,7 +697,7 @@ test_set(void)
}
if (0 == size && n >= 0) {
H5_FAILED();
- HDputs(" Found set bits and shouldn't have!");
+ puts(" Found set bits and shouldn't have!");
goto failed;
}
n = H5T__bit_find(v2, d_offset, 8 * sizeof(v2) - d_offset, H5T_BIT_LSB, 0);
@@ -710,7 +710,7 @@ test_set(void)
}
if (d_offset + size == 8 * sizeof(v2) && n >= 0) {
H5_FAILED();
- HDputs(" High-order zeros are present and shouldn't be!");
+ puts(" High-order zeros are present and shouldn't be!");
goto failed;
}
@@ -728,7 +728,7 @@ test_set(void)
}
if (0 == size && n >= 0) {
H5_FAILED();
- HDputs(" Found set bits but shouldn't have (reverse)!");
+ puts(" Found set bits but shouldn't have (reverse)!");
goto failed;
}
n = H5T__bit_find(v2, (size_t)0, d_offset + size, H5T_BIT_MSB, 0);
@@ -741,7 +741,7 @@ test_set(void)
}
if (0 == d_offset && n >= 0) {
H5_FAILED();
- HDputs(" Found leading zeros but shouldn't have!");
+ puts(" Found leading zeros but shouldn't have!");
goto failed;
}
}
@@ -786,18 +786,18 @@ test_clear(void)
memset(v2, 0xff, sizeof v2);
/* Clear some bits in v2 */
- H5T__bit_set(v2, d_offset, size, FALSE);
+ H5T__bit_set(v2, d_offset, size, false);
for (j = 0; j < (int)sizeof(v2); j++)
if (0xff != v2[j])
break;
if (size > 0 && j >= (int)sizeof(v2)) {
H5_FAILED();
- HDputs(" Unabled to find cleared region in buffer");
+ puts(" Unabled to find cleared region in buffer");
goto failed;
}
if (0 == size && j < (int)sizeof(v2)) {
H5_FAILED();
- HDputs(" Found cleared bits when we shouldn't have");
+ puts(" Found cleared bits when we shouldn't have");
goto failed;
}
@@ -812,7 +812,7 @@ test_clear(void)
}
if (0 == size && n >= 0) {
H5_FAILED();
- HDputs(" Found cleared bits and shouldn't have!");
+ puts(" Found cleared bits and shouldn't have!");
goto failed;
}
n = H5T__bit_find(v2, d_offset, 8 * sizeof(v2) - d_offset, H5T_BIT_LSB, 1);
@@ -825,7 +825,7 @@ test_clear(void)
}
if (d_offset + size == 8 * sizeof(v2) && n >= 0) {
H5_FAILED();
- HDputs(" High-order ones are present and shouldn't be!");
+ puts(" High-order ones are present and shouldn't be!");
goto failed;
}
@@ -843,7 +843,7 @@ test_clear(void)
}
if (0 == size && n >= 0) {
H5_FAILED();
- HDputs(" Found cleared bits but shouldn't have (reverse)!");
+ puts(" Found cleared bits but shouldn't have (reverse)!");
goto failed;
}
n = H5T__bit_find(v2, (size_t)0, d_offset + size, H5T_BIT_MSB, 1);
@@ -856,7 +856,7 @@ test_clear(void)
}
if (0 == d_offset && n >= 0) {
H5_FAILED();
- HDputs(" Found leading ones but shouldn't have!");
+ puts(" Found leading ones but shouldn't have!");
goto failed;
}
}
diff --git a/test/btree2.c b/test/btree2.c
index 9b8edbe93b7..3ad30ac9f1a 100644
--- a/test/btree2.c
+++ b/test/btree2.c
@@ -39,7 +39,7 @@ static const char *FILENAME[] = {"btree2", "btree2_tmp", NULL};
/* Testing parameters */
typedef struct bt2_test_param_t {
- hbool_t reopen_btree; /* Whether to re-open the B-tree during the test */
+ bool reopen_btree; /* Whether to re-open the B-tree during the test */
} bt2_test_param_t;
/*-------------------------------------------------------------------------
@@ -351,7 +351,7 @@ iter_rec_cb(const void *_record, void *_op_data)
*
* Purpose: v2 B-tree find callback
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: FAIL
*
*-------------------------------------------------------------------------
@@ -363,9 +363,9 @@ find_cb(const void *_record, void *_op_data)
hsize_t *search = (hsize_t *)_op_data;
if (*record != *search)
- return (FALSE);
+ return (false);
- return (TRUE);
+ return (true);
} /* end find_cb() */
/*-------------------------------------------------------------------------
@@ -373,7 +373,7 @@ find_cb(const void *_record, void *_op_data)
*
* Purpose: v2 B-tree find callback for H5B2_test_rec_t records
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: FAIL
*
*-------------------------------------------------------------------------
@@ -385,10 +385,10 @@ find_rec_cb(const void *_record, void *_op_data)
H5B2_test_rec_t *search = (H5B2_test_rec_t *)_op_data;
if (record->key != search->key)
- return (FALSE);
+ return (false);
search->val = record->val;
- return (TRUE);
+ return (true);
} /* end find_rec_cb() */
/*-------------------------------------------------------------------------
@@ -420,7 +420,7 @@ find_dec_cb(const void *_record, void *_op_data)
*
* Purpose: v2 B-tree index callback for H5B2_test_rec_t records
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: FAIL
*
*-------------------------------------------------------------------------
@@ -436,7 +436,7 @@ index_rec_cb(const void *_record, void *_op_data)
search->key = record->key;
search->val = record->val;
- return (TRUE);
+ return (true);
} /* end index_rec_cb() */
/*-------------------------------------------------------------------------
@@ -473,13 +473,13 @@ neighbor_cb(const void *_record, void *_op_data)
*-------------------------------------------------------------------------
*/
static int
-modify_cb(void *_record, void *_op_data, hbool_t *changed)
+modify_cb(void *_record, void *_op_data, bool *changed)
{
hsize_t *record = (hsize_t *)_record;
hsize_t *modify = (hsize_t *)_op_data;
*record = *modify;
- *changed = TRUE;
+ *changed = true;
return (0);
} /* end modify_cb() */
@@ -495,14 +495,14 @@ modify_cb(void *_record, void *_op_data, hbool_t *changed)
*-------------------------------------------------------------------------
*/
static int
-modify_rec_cb(void *_record, void *_op_data, hbool_t *changed)
+modify_rec_cb(void *_record, void *_op_data, bool *changed)
{
H5B2_test_rec_t *record = (H5B2_test_rec_t *)_record;
H5B2_test_rec_t *modify = (H5B2_test_rec_t *)_op_data;
assert(record->key == modify->key);
record->val = modify->val;
- *changed = TRUE;
+ *changed = true;
return (0);
} /* end modify_rec_cb() */
@@ -519,9 +519,9 @@ modify_rec_cb(void *_record, void *_op_data, hbool_t *changed)
*-------------------------------------------------------------------------
*/
static int
-no_modify_cb(void H5_ATTR_UNUSED *_record, void H5_ATTR_UNUSED *_op_data, hbool_t *changed)
+no_modify_cb(void H5_ATTR_UNUSED *_record, void H5_ATTR_UNUSED *_op_data, bool *changed)
{
- *changed = FALSE;
+ *changed = false;
return (1);
} /* end no_modify_cb() */
@@ -561,14 +561,14 @@ remove_cb(const void *_record, void *_op_data)
static unsigned
test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t idx; /* Index within B-tree, for iterator */
- hbool_t found; /* Whether record was found */
- herr_t ret; /* Generic error return value */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t idx; /* Index within B-tree, for iterator */
+ bool found; /* Whether record was found */
+ herr_t ret; /* Generic error return value */
/*
* Test v2 B-tree creation
@@ -604,7 +604,7 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* Attempt to find record in B-tree with no records */
idx = 0;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &idx, &found, find_cb, NULL) < 0)
TEST_ERROR;
if (found)
@@ -639,7 +639,7 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* Attempt to find non-existent record in B-tree with 1 record */
/* (Should not be found, but not fail) */
idx = 41;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
TEST_ERROR;
if (found)
@@ -647,7 +647,7 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* Try again with NULL 'op' */
/* (Should not be found, but not fail) */
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &idx, &found, NULL, NULL) < 0)
TEST_ERROR;
if (found)
@@ -655,14 +655,14 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* Attempt to find existent record in B-tree with 1 record */
idx = 42;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
TEST_ERROR;
if (!found)
TEST_ERROR;
/* Try again with NULL 'op' */
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &idx, &found, NULL, NULL) < 0)
TEST_ERROR;
if (!found)
@@ -719,7 +719,7 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* Attempt to find non-existent record in level-0 B-tree with several records */
/* (Should not be found, but not fail) */
idx = 41;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
TEST_ERROR;
if (found)
@@ -727,7 +727,7 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* Attempt to find existent record in level-0 B-tree with several record */
idx = 56;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
TEST_ERROR;
if (!found)
@@ -799,16 +799,16 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
static unsigned
test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t idx; /* Index within B-tree, for iterator */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- unsigned u; /* Local index variable */
- hbool_t found; /* Whether record was found */
- herr_t ret; /* Generic error return value */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t idx; /* Index within B-tree, for iterator */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ unsigned u; /* Local index variable */
+ bool found; /* Whether record was found */
+ herr_t ret; /* Generic error return value */
/*
* Test inserting enough records into v2 B-tree to split the root node
@@ -894,7 +894,7 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_p
/* Attempt to find non-existent record in level-1 B-tree */
/* (Should not be found, but not fail) */
idx = INSERT_SPLIT_ROOT_NREC + 10;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
TEST_ERROR;
if (found)
@@ -902,7 +902,7 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_p
/* Attempt to find existent record in root of level-1 B-tree */
idx = 33;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
FAIL_STACK_ERROR;
if (!found)
@@ -910,7 +910,7 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_p
/* Attempt to find existent record in leaf of level-1 B-tree */
idx = 56;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
FAIL_STACK_ERROR;
if (!found)
@@ -982,13 +982,13 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_p
static unsigned
test_insert_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ unsigned u; /* Local index variable */
/*
* Test inserting many records into v2 B-tree
@@ -1132,13 +1132,13 @@ test_insert_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, cons
static unsigned
test_insert_level1_side_split(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ unsigned u; /* Local index variable */
/*
* Test inserting many records into v2 B-tree
@@ -1290,14 +1290,14 @@ test_insert_level1_side_split(hid_t fapl, const H5B2_create_t *cparam, const bt2
static unsigned
test_insert_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- hsize_t idx; /* Index within B-tree, for iterator */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ hsize_t idx; /* Index within B-tree, for iterator */
+ unsigned u; /* Local index variable */
/*
* Test inserting many records into v2 B-tree
@@ -1429,14 +1429,14 @@ test_insert_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, cons
static unsigned
test_insert_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- hsize_t idx; /* Index within B-tree, for iterator */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ hsize_t idx; /* Index within B-tree, for iterator */
+ unsigned u; /* Local index variable */
/*
* Test inserting many records into v2 B-tree
@@ -1544,16 +1544,16 @@ test_insert_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam, const b
static unsigned
test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- hsize_t idx; /* Index within B-tree, for iterator */
- unsigned u; /* Local index variable */
- hbool_t found; /* Whether record was found */
- herr_t ret; /* Generic error return value */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ hsize_t idx; /* Index within B-tree, for iterator */
+ unsigned u; /* Local index variable */
+ bool found; /* Whether record was found */
+ herr_t ret; /* Generic error return value */
/*
* Test inserting many records into v2 B-tree
@@ -1625,7 +1625,7 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* Attempt to find non-existent record in level-2 B-tree */
/* (Should not be found, but not fail) */
idx = INSERT_SPLIT_ROOT_NREC * 30;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
TEST_ERROR;
if (found)
@@ -1633,7 +1633,7 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* Attempt to find existent record in root of level-2 B-tree */
idx = 948;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
FAIL_STACK_ERROR;
if (!found)
@@ -1646,7 +1646,7 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* Attempt to find existent record in internal node of level-2 B-tree */
idx = 505;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
FAIL_STACK_ERROR;
if (!found)
@@ -1659,7 +1659,7 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* Attempt to find existent record in leaf of level-2 B-tree */
idx = 555;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
FAIL_STACK_ERROR;
if (!found)
@@ -1736,14 +1736,14 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
static unsigned
test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- hsize_t idx; /* Index within B-tree, for iterator */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ hsize_t idx; /* Index within B-tree, for iterator */
+ unsigned u; /* Local index variable */
/*
* Test inserting many records into v2 B-tree
@@ -1961,14 +1961,14 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, const
static unsigned
test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- hsize_t idx; /* Index within B-tree, for iterator */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ hsize_t idx; /* Index within B-tree, for iterator */
+ unsigned u; /* Local index variable */
/*
* Test inserting many records into v2 B-tree
@@ -2192,14 +2192,14 @@ static unsigned
test_insert_level2_2internal_redistrib(hid_t fapl, const H5B2_create_t *cparam,
const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- hsize_t idx; /* Index within B-tree, for iterator */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ hsize_t idx; /* Index within B-tree, for iterator */
+ unsigned u; /* Local index variable */
/*
* Test inserting many records into v2 B-tree
@@ -2360,14 +2360,14 @@ test_insert_level2_2internal_redistrib(hid_t fapl, const H5B2_create_t *cparam,
static unsigned
test_insert_level2_2internal_split(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- hsize_t idx; /* Index within B-tree, for iterator */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ hsize_t idx; /* Index within B-tree, for iterator */
+ unsigned u; /* Local index variable */
/*
* Test inserting many records into v2 B-tree
@@ -2536,14 +2536,14 @@ static unsigned
test_insert_level2_3internal_redistrib(hid_t fapl, const H5B2_create_t *cparam,
const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- hsize_t idx; /* Index within B-tree, for iterator */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ hsize_t idx; /* Index within B-tree, for iterator */
+ unsigned u; /* Local index variable */
/*
* Test inserting many records into v2 B-tree
@@ -2710,14 +2710,14 @@ test_insert_level2_3internal_redistrib(hid_t fapl, const H5B2_create_t *cparam,
static unsigned
test_insert_level2_3internal_split(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- hsize_t idx; /* Index within B-tree, for iterator */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ hsize_t idx; /* Index within B-tree, for iterator */
+ unsigned u; /* Local index variable */
/*
* Test inserting many records into v2 B-tree
@@ -2885,22 +2885,22 @@ test_insert_level2_3internal_split(hid_t fapl, const H5B2_create_t *cparam, cons
static unsigned
test_insert_lots(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[1024]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t idx; /* Index within B-tree, for iterator */
- time_t curr_time; /* Current time, for seeding random number generator */
- hsize_t *records; /* Record #'s for random insertion */
- unsigned u; /* Local index variable */
- unsigned swap_idx; /* Location to swap with when shuffling */
- hsize_t temp_rec; /* Temporary record */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- hsize_t nrec; /* Number of records in B-tree */
- hbool_t found; /* Whether record was found */
- herr_t ret; /* Generic error return value */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ char filename[1024]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t idx; /* Index within B-tree, for iterator */
+ time_t curr_time; /* Current time, for seeding random number generator */
+ hsize_t *records; /* Record #'s for random insertion */
+ unsigned u; /* Local index variable */
+ unsigned swap_idx; /* Location to swap with when shuffling */
+ hsize_t temp_rec; /* Temporary record */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ hsize_t nrec; /* Number of records in B-tree */
+ bool found; /* Whether record was found */
+ herr_t ret; /* Generic error return value */
/* Initialize random number seed */
curr_time = HDtime(NULL);
@@ -3006,7 +3006,7 @@ fprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time);
/* Attempt to find non-existent record in level-4 B-tree */
/* (Should not be found, but not fail) */
idx = INSERT_MANY * 2;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
TEST_ERROR;
if (found)
@@ -3018,7 +3018,7 @@ fprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time);
idx = (hsize_t)(HDrandom() % INSERT_MANY);
/* Attempt to find existent record in root of level-4 B-tree */
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
FAIL_STACK_ERROR;
if (!found)
@@ -3125,15 +3125,15 @@ fprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time);
static unsigned
test_update_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- H5B2_test_rec_t record; /* Record to insert into tree */
- H5B2_test_rec_t modify; /* Modified value */
- H5B2_test_rec_t find; /* Record to find */
- hbool_t found; /* Whether record was found */
- herr_t ret; /* Generic error return value */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ H5B2_test_rec_t record; /* Record to insert into tree */
+ H5B2_test_rec_t modify; /* Modified value */
+ H5B2_test_rec_t find; /* Record to find */
+ bool found; /* Whether record was found */
+ herr_t ret; /* Generic error return value */
/* Create the file for the test */
if (create_file(&file, &f, fapl) < 0)
@@ -3161,7 +3161,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* (Should not be found, but not fail) */
find.key = 10;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR;
if (find.val != (hsize_t)-1)
@@ -3171,7 +3171,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* Try again with NULL 'op' */
/* (Should not be found, but not fail) */
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, NULL, NULL) < 0)
FAIL_STACK_ERROR;
if (find.val != (hsize_t)-1)
@@ -3181,7 +3181,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* Attempt to find existent record in B-tree with 1 record */
find.key = 42;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR;
if (find.val != 72)
@@ -3191,7 +3191,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* Try again with NULL 'op' */
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, NULL, NULL) < 0)
FAIL_STACK_ERROR;
if (find.val != (hsize_t)-1)
@@ -3238,7 +3238,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* (Should not be found, but not fail) */
find.key = 10;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR;
if (find.val != (hsize_t)-1)
@@ -3248,7 +3248,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* Try again with NULL 'op' */
/* (Should not be found, but not fail) */
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, NULL, NULL) < 0)
FAIL_STACK_ERROR;
if (find.val != (hsize_t)-1)
@@ -3258,7 +3258,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* Attempt to find modified record in B-tree with 1 record */
find.key = 42;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR;
if (find.val != 43)
@@ -3268,7 +3268,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* Try again with NULL 'op' */
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, NULL, NULL) < 0)
FAIL_STACK_ERROR;
if (find.val != (hsize_t)-1)
@@ -3335,7 +3335,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* (Should not be found, but not fail) */
find.key = 10;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
TEST_ERROR;
if (find.val != (hsize_t)-1)
@@ -3345,7 +3345,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* Attempt to find existent record in level-0 B-tree with several records */
find.key = 56;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
TEST_ERROR;
if (find.val != 12)
@@ -3429,7 +3429,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* (Should not be found, but not fail) */
find.key = 41;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
TEST_ERROR;
if (find.val != (hsize_t)-1)
@@ -3439,7 +3439,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* Attempt to find existent record in level-0 B-tree with several record */
find.key = 56;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
TEST_ERROR;
if (find.val != 22)
@@ -3532,18 +3532,18 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
static unsigned
test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- H5B2_test_rec_t record; /* Record to insert into tree */
- H5B2_test_rec_t modify; /* Modified value */
- H5B2_test_rec_t find; /* Record to find */
- H5B2_test_rec_t idx; /* Index within B-tree, for iterator */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- unsigned u; /* Local index variable */
- hbool_t found; /* Whether record was found */
- herr_t ret; /* Generic error return value */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ H5B2_test_rec_t record; /* Record to insert into tree */
+ H5B2_test_rec_t modify; /* Modified value */
+ H5B2_test_rec_t find; /* Record to find */
+ H5B2_test_rec_t idx; /* Index within B-tree, for iterator */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ unsigned u; /* Local index variable */
+ bool found; /* Whether record was found */
+ herr_t ret; /* Generic error return value */
/*
* Test inserting enough records into v2 B-tree to split the root node
@@ -3677,7 +3677,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_p
/* (Should not be found, but not fail) */
find.key = 800;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
TEST_ERROR;
if (find.val != (hsize_t)-1)
@@ -3688,7 +3688,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_p
/* Attempt to find existent record in root of level-1 B-tree */
find.key = 33;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR;
if (find.key != 33)
@@ -3701,7 +3701,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_p
/* Attempt to find existent record in leaf of level-1 B-tree */
find.key = 56;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR;
if (find.key != 56)
@@ -3791,13 +3791,13 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_p
static unsigned
test_update_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- H5B2_test_rec_t record; /* Record to insert into tree */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ H5B2_test_rec_t record; /* Record to insert into tree */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ unsigned u; /* Local index variable */
/*
* Test inserting many records into v2 B-tree
@@ -3945,13 +3945,13 @@ test_update_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, cons
static unsigned
test_update_level1_side_split(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- H5B2_test_rec_t record; /* Record to insert into tree */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ H5B2_test_rec_t record; /* Record to insert into tree */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ unsigned u; /* Local index variable */
/*
* Test inserting many records into v2 B-tree
@@ -4107,14 +4107,14 @@ test_update_level1_side_split(hid_t fapl, const H5B2_create_t *cparam, const bt2
static unsigned
test_update_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- H5B2_test_rec_t record; /* Record to insert into tree */
- H5B2_test_rec_t idx; /* Index within B-tree, for iterator */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ H5B2_test_rec_t record; /* Record to insert into tree */
+ H5B2_test_rec_t idx; /* Index within B-tree, for iterator */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ unsigned u; /* Local index variable */
/*
* Test inserting many records into v2 B-tree
@@ -4250,14 +4250,14 @@ test_update_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, cons
static unsigned
test_update_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- H5B2_test_rec_t record; /* Record to insert into tree */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- H5B2_test_rec_t idx; /* Index within B-tree, for iterator */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ H5B2_test_rec_t record; /* Record to insert into tree */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ H5B2_test_rec_t idx; /* Index within B-tree, for iterator */
+ unsigned u; /* Local index variable */
/*
* Test inserting many records into v2 B-tree
@@ -4368,17 +4368,17 @@ test_update_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam, const b
static unsigned
test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- H5B2_test_rec_t record; /* Record to insert into tree */
- H5B2_test_rec_t find; /* Record to find */
- H5B2_test_rec_t idx; /* Index within B-tree, for iterator */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- unsigned u; /* Local index variable */
- hbool_t found; /* Whether record was found */
- herr_t ret; /* Generic error return value */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ H5B2_test_rec_t record; /* Record to insert into tree */
+ H5B2_test_rec_t find; /* Record to find */
+ H5B2_test_rec_t idx; /* Index within B-tree, for iterator */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ unsigned u; /* Local index variable */
+ bool found; /* Whether record was found */
+ herr_t ret; /* Generic error return value */
/*
* Test inserting many records into v2 B-tree
@@ -4458,7 +4458,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* (Should not be found, but not fail) */
find.key = INSERT_SPLIT_ROOT_NREC_REC * 42;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
TEST_ERROR;
if (find.val != (hsize_t)-1)
@@ -4469,7 +4469,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* Attempt to find existent record in root of level-2 B-tree */
find.key = 1347;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR;
if (find.val != (1347 * 2))
@@ -4485,7 +4485,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* Attempt to find existent record in internal node of level-2 B-tree */
find.key = 513;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR;
if (find.val != (513 * 2))
@@ -4501,7 +4501,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* Attempt to find existent record in leaf of level-2 B-tree */
find.key = 555;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR;
if (find.val != (555 * 2))
@@ -4635,7 +4635,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* (Should not be found, but not fail) */
find.key = INSERT_SPLIT_ROOT_NREC_REC * 42;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
TEST_ERROR;
if (find.val != (hsize_t)-1)
@@ -4646,7 +4646,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* Attempt to find existent record in root of level-2 B-tree */
find.key = 1344;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR;
if (find.val != (1344 * 2))
@@ -4662,7 +4662,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* Attempt to find existent record in internal node of level-2 B-tree */
find.key = 512;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR;
if (find.val != (512 * 2))
@@ -4678,7 +4678,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* Attempt to find existent record in leaf of level-2 B-tree */
find.key = 555;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR;
if (find.val != (555 * 2))
@@ -4822,7 +4822,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* (Should not be found, but not fail) */
find.key = INSERT_SPLIT_ROOT_NREC_REC * 42;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
TEST_ERROR;
if (find.val != (hsize_t)-1)
@@ -4833,7 +4833,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* Attempt to find existent record in root of level-2 B-tree */
find.key = 1345;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR;
if (find.val != (1345 * 2))
@@ -4849,7 +4849,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* Attempt to find existent record in internal node of level-2 B-tree */
find.key = 513;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR;
if (find.val != (513 * 2))
@@ -4865,7 +4865,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* Attempt to find existent record in leaf of level-2 B-tree */
find.key = 555;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR;
if (find.val != (555 * 2))
@@ -4956,21 +4956,21 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
static unsigned
test_update_lots(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- time_t curr_time; /* Current time, for seeding random number generator */
- H5B2_test_rec_t *records; /* Record #'s for random insertion */
- H5B2_test_rec_t record; /* Record to insert into tree */
- H5B2_test_rec_t modify; /* Modified value */
- H5B2_test_rec_t find; /* Record to find */
- H5B2_test_rec_t iter; /* Index within B-tree, for iterator */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- hsize_t nrec; /* Number of records in B-tree */
- unsigned u; /* Local index variable */
- hbool_t found; /* Whether record was found */
- herr_t ret; /* Generic error return value */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ time_t curr_time; /* Current time, for seeding random number generator */
+ H5B2_test_rec_t *records; /* Record #'s for random insertion */
+ H5B2_test_rec_t record; /* Record to insert into tree */
+ H5B2_test_rec_t modify; /* Modified value */
+ H5B2_test_rec_t find; /* Record to find */
+ H5B2_test_rec_t iter; /* Index within B-tree, for iterator */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ hsize_t nrec; /* Number of records in B-tree */
+ unsigned u; /* Local index variable */
+ bool found; /* Whether record was found */
+ herr_t ret; /* Generic error return value */
/* Initialize random number seed */
curr_time = HDtime(NULL);
@@ -5065,7 +5065,7 @@ fprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
/* (Should not be found, but not fail) */
find.key = INSERT_MANY_REC * 2;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
TEST_ERROR;
if (find.val != (hsize_t)-1)
@@ -5080,7 +5080,7 @@ fprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
find.val = (hsize_t)-1;
/* Attempt to find existent record in level-4 B-tree */
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR;
if (find.val != (find.key * 2))
@@ -5205,15 +5205,15 @@ fprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
static unsigned
test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- herr_t ret; /* Generic error return value */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ herr_t ret; /* Generic error return value */
/* Record removal tests */
TESTING("B-tree remove: record from empty B-tree");
@@ -5515,16 +5515,16 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
static unsigned
test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- unsigned u; /* Local index variable */
- herr_t ret; /* Generic error return value */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic error return value */
/* B-tree record removal tests */
TESTING("B-tree remove: non-existent record from level-1 B-tree");
@@ -5736,15 +5736,15 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam, const bt
static unsigned
test_remove_level1_redistrib(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ unsigned u; /* Local index variable */
/* More complex record removals */
TESTING("B-tree remove: redistribute 2 leaves in level-1 B-tree (r->l)");
@@ -5929,16 +5929,16 @@ test_remove_level1_redistrib(hid_t fapl, const H5B2_create_t *cparam, const bt2_
static unsigned
test_remove_level1_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- H5B2_node_info_test_t ninfo; /* B-tree node info */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ H5B2_node_info_test_t ninfo; /* B-tree node info */
+ unsigned u; /* Local index variable */
TESTING("B-tree remove: merge 2 leaves to 1 in level-1 B-tree (r->l)");
@@ -6104,16 +6104,16 @@ test_remove_level1_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam, const bt
static unsigned
test_remove_level1_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- H5B2_node_info_test_t ninfo; /* B-tree node info */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ H5B2_node_info_test_t ninfo; /* B-tree node info */
+ unsigned u; /* Local index variable */
TESTING("B-tree remove: merge 3 leaves to 2 in level-1 B-tree");
@@ -6226,16 +6226,16 @@ test_remove_level1_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam, const bt
static unsigned
test_remove_level1_promote(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- H5B2_node_info_test_t ninfo; /* B-tree node info */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ H5B2_node_info_test_t ninfo; /* B-tree node info */
+ unsigned u; /* Local index variable */
TESTING("B-tree remove: promote from right leaf of level-1 B-tree");
@@ -6450,16 +6450,16 @@ static unsigned
test_remove_level1_promote_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- H5B2_node_info_test_t ninfo; /* B-tree node info */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ H5B2_node_info_test_t ninfo; /* B-tree node info */
+ unsigned u; /* Local index variable */
TESTING("B-tree remove: promote from leaf of level-1 B-tree w/2 node redistrib");
@@ -6595,16 +6595,16 @@ static unsigned
test_remove_level1_promote_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- H5B2_node_info_test_t ninfo; /* B-tree node info */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ H5B2_node_info_test_t ninfo; /* B-tree node info */
+ unsigned u; /* Local index variable */
TESTING("B-tree remove: promote from leaf of level-1 B-tree w/3 node redistrib");
@@ -6740,16 +6740,16 @@ static unsigned
test_remove_level1_promote_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam,
const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- H5B2_node_info_test_t ninfo; /* B-tree node info */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ H5B2_node_info_test_t ninfo; /* B-tree node info */
+ unsigned u; /* Local index variable */
TESTING("B-tree remove: promote from leaf of level-1 B-tree w/2->1 merge");
@@ -6882,16 +6882,16 @@ static unsigned
test_remove_level1_promote_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam,
const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- H5B2_node_info_test_t ninfo; /* B-tree node info */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ H5B2_node_info_test_t ninfo; /* B-tree node info */
+ unsigned u; /* Local index variable */
TESTING("B-tree remove: promote from leaf of level-1 B-tree w/3->2 merge");
@@ -7023,16 +7023,16 @@ test_remove_level1_promote_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam,
static unsigned
test_remove_level1_collapse(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- H5B2_node_info_test_t ninfo; /* B-tree node info */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ H5B2_node_info_test_t ninfo; /* B-tree node info */
+ unsigned u; /* Local index variable */
TESTING("B-tree remove: collapse level-1 B-tree back to level-0");
@@ -7158,16 +7158,16 @@ test_remove_level1_collapse(hid_t fapl, const H5B2_create_t *cparam, const bt2_t
static unsigned
test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- H5B2_node_info_test_t ninfo; /* B-tree node info */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ H5B2_node_info_test_t ninfo; /* B-tree node info */
+ unsigned u; /* Local index variable */
TESTING("B-tree remove: promote from right internal of level-2 B-tree");
@@ -7441,16 +7441,16 @@ static unsigned
test_remove_level2_promote_2internal_redistrib(hid_t fapl, const H5B2_create_t *cparam,
const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- H5B2_node_info_test_t ninfo; /* B-tree node info */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ H5B2_node_info_test_t ninfo; /* B-tree node info */
+ unsigned u; /* Local index variable */
TESTING("B-tree remove: promote from right internal of level-2 B-tree w/redistrib");
@@ -7589,16 +7589,16 @@ static unsigned
test_remove_level2_promote_3internal_redistrib(hid_t fapl, const H5B2_create_t *cparam,
const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- H5B2_node_info_test_t ninfo; /* B-tree node info */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ H5B2_node_info_test_t ninfo; /* B-tree node info */
+ unsigned u; /* Local index variable */
TESTING("B-tree remove: promote from left internal of level-2 B-tree w/redistrib");
@@ -7737,16 +7737,16 @@ static unsigned
test_remove_level2_promote_2internal_merge(hid_t fapl, const H5B2_create_t *cparam,
const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- H5B2_node_info_test_t ninfo; /* B-tree node info */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ H5B2_node_info_test_t ninfo; /* B-tree node info */
+ unsigned u; /* Local index variable */
TESTING("B-tree remove: promote from right internal of level-2 B-tree w/merge");
@@ -7886,16 +7886,16 @@ static unsigned
test_remove_level2_promote_3internal_merge(hid_t fapl, const H5B2_create_t *cparam,
const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- H5B2_node_info_test_t ninfo; /* B-tree node info */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ H5B2_node_info_test_t ninfo; /* B-tree node info */
+ unsigned u; /* Local index variable */
TESTING("B-tree remove: promote from middle internal of level-2 B-tree w/merge");
@@ -8035,16 +8035,16 @@ static unsigned
test_remove_level2_2internal_merge_left(hid_t fapl, const H5B2_create_t *cparam,
const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- H5B2_node_info_test_t ninfo; /* B-tree node info */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ H5B2_node_info_test_t ninfo; /* B-tree node info */
+ unsigned u; /* Local index variable */
TESTING("B-tree remove: merge 2 internal nodes to 1 in level-2 B-tree (l->r)");
@@ -8158,16 +8158,16 @@ static unsigned
test_remove_level2_2internal_merge_right(hid_t fapl, const H5B2_create_t *cparam,
const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- H5B2_node_info_test_t ninfo; /* B-tree node info */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ H5B2_node_info_test_t ninfo; /* B-tree node info */
+ unsigned u; /* Local index variable */
TESTING("B-tree remove: merge 2 internal nodes to 1 in level-2 B-tree (r->l)");
@@ -8280,16 +8280,16 @@ test_remove_level2_2internal_merge_right(hid_t fapl, const H5B2_create_t *cparam
static unsigned
test_remove_level2_3internal_merge(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- H5B2_node_info_test_t ninfo; /* B-tree node info */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ H5B2_node_info_test_t ninfo; /* B-tree node info */
+ unsigned u; /* Local index variable */
TESTING("B-tree remove: merge 3 internal nodes to 2 in level-2 B-tree");
@@ -8403,17 +8403,17 @@ test_remove_level2_3internal_merge(hid_t fapl, const H5B2_create_t *cparam, cons
static unsigned
test_remove_level2_collapse_right(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- H5B2_node_info_test_t ninfo; /* B-tree node info */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ H5B2_node_info_test_t ninfo; /* B-tree node info */
+ unsigned u; /* Local index variable */
TESTING("B-tree remove: collapse level-2 B-tree back to level-1 (r->l)");
@@ -8526,12 +8526,12 @@ static unsigned
gen_l4_btree2(const char *filename, hid_t fapl, const H5B2_create_t *cparam, haddr_t *bt2_addr,
const hsize_t *records)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- hsize_t record; /* Record to insert into tree */
- unsigned u; /* Local index variable */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ hsize_t record; /* Record to insert into tree */
+ unsigned u; /* Local index variable */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
/* Create the file to work on */
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
@@ -8600,23 +8600,23 @@ gen_l4_btree2(const char *filename, hid_t fapl, const H5B2_create_t *cparam, had
static unsigned
test_remove_lots(const char *env_h5_drvr, hid_t fapl, const H5B2_create_t *cparam)
{
- hid_t file = -1; /* File ID */
- char filename[1024]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
- int fd = -1; /* File descriptor */
- h5_stat_t sb; /* Stat buffer for file */
- void *file_data = NULL; /* Copy of file data */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- time_t curr_time; /* Current time, for seeding random number generator */
- hsize_t *records; /* Record #'s for random insertion */
- unsigned u; /* Local index variable */
- unsigned rem_idx; /* Location to remove */
- hsize_t nrec; /* Number of records in B-tree */
- hbool_t single_file_vfd; /* Whether VFD used stores data in a single file */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ char filename[1024]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ int fd = -1; /* File descriptor */
+ h5_stat_t sb; /* Stat buffer for file */
+ void *file_data = NULL; /* Copy of file data */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ time_t curr_time; /* Current time, for seeding random number generator */
+ hsize_t *records; /* Record #'s for random insertion */
+ unsigned u; /* Local index variable */
+ unsigned rem_idx; /* Location to remove */
+ hsize_t nrec; /* Number of records in B-tree */
+ bool single_file_vfd; /* Whether VFD used stores data in a single file */
/* Initialize random number seed */
curr_time = HDtime(NULL);
@@ -9039,16 +9039,16 @@ fprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
static unsigned
test_find_neighbor(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t search; /* Search value */
- hsize_t *records; /* Record #'s for random insertion */
- unsigned u; /* Local index variable */
- H5B2_node_info_test_t ninfo; /* B-tree node info */
- herr_t ret; /* Generic error return value */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t search; /* Search value */
+ hsize_t *records; /* Record #'s for random insertion */
+ unsigned u; /* Local index variable */
+ H5B2_node_info_test_t ninfo; /* B-tree node info */
+ herr_t ret; /* Generic error return value */
/* Allocate space for the records */
if (NULL == (records = (hsize_t *)malloc(sizeof(hsize_t) * FIND_NEIGHBOR)))
@@ -9261,16 +9261,16 @@ test_find_neighbor(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param
static unsigned
test_delete(hid_t fapl, const H5B2_create_t *cparam)
{
- hid_t file = -1; /* File ID */
- char filename[1024]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
- h5_stat_size_t empty_size; /* Size of an empty file */
- h5_stat_size_t file_size; /* Size of each file created */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ char filename[1024]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ h5_stat_size_t empty_size; /* Size of an empty file */
+ h5_stat_size_t file_size; /* Size of each file created */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ unsigned u; /* Local index variable */
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
@@ -9530,18 +9530,18 @@ test_delete(hid_t fapl, const H5B2_create_t *cparam)
static unsigned
test_modify(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t modify; /* Modified value */
- hsize_t found; /* Found value */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- H5B2_node_info_test_t ninfo; /* B-tree node info */
- unsigned u; /* Local index variable */
- hbool_t rec_found; /* Whether record was found */
- herr_t ret; /* Generic error return value */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t modify; /* Modified value */
+ hsize_t found; /* Found value */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ H5B2_node_info_test_t ninfo; /* B-tree node info */
+ unsigned u; /* Local index variable */
+ bool rec_found; /* Whether record was found */
+ herr_t ret; /* Generic error return value */
/*
* Test modifying records
@@ -9612,7 +9612,7 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tpa
/* Attempt to find modified record */
record = 4331;
found = 4331;
- rec_found = FALSE;
+ rec_found = false;
if (H5B2_find(bt2, &record, &rec_found, find_cb, &found) < 0)
FAIL_STACK_ERROR;
if (found != 4331)
@@ -9663,7 +9663,7 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tpa
/* Attempt to find modified record */
record = 5352;
found = 5352;
- rec_found = FALSE;
+ rec_found = false;
if (H5B2_find(bt2, &record, &rec_found, find_cb, &found) < 0)
STACK_ERROR;
if (found != 5352)
@@ -9714,7 +9714,7 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tpa
/* Attempt to find modified record */
record = 9448;
found = 9448;
- rec_found = FALSE;
+ rec_found = false;
if (H5B2_find(bt2, &record, &rec_found, find_cb, &found) < 0)
STACK_ERROR;
if (found != 9448)
@@ -9773,17 +9773,17 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tpa
static unsigned
test_open_twice_diff(hid_t fapl, const H5B2_create_t *cparam)
{
- char filename[1024]; /* Filename to use */
- char filename_tmp[1024]; /* Temporary file name */
- hid_t file = -1; /* File ID */
- hid_t file2 = -1; /* File ID */
- hid_t file0 = -1; /* File ID */
- hid_t file00 = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5F_t *f2 = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- H5B2_t *bt2_2 = NULL; /* Second v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
+ char filename[1024]; /* Filename to use */
+ char filename_tmp[1024]; /* Temporary file name */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t file2 = H5I_INVALID_HID; /* File ID */
+ hid_t file0 = H5I_INVALID_HID; /* File ID */
+ hid_t file00 = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5F_t *f2 = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ H5B2_t *bt2_2 = NULL; /* Second v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
@@ -9909,16 +9909,16 @@ test_open_twice_diff(hid_t fapl, const H5B2_create_t *cparam)
int
main(void)
{
- H5B2_create_t cparam, cparam2; /* Creation parameters for v2 B-tree */
- bt2_test_param_t tparam; /* Test parameters for v2 B-tree */
- hid_t fapl = -1; /* File access property list for data files */
- unsigned nerrors = 0; /* Cumulative error count */
- unsigned reopen; /* Whether to reopen B-tree during tests */
+ H5B2_create_t cparam, cparam2; /* Creation parameters for v2 B-tree */
+ bt2_test_param_t tparam; /* Test parameters for v2 B-tree */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list for data files */
+ unsigned nerrors = 0; /* Cumulative error count */
+ unsigned reopen; /* Whether to reopen B-tree during tests */
int ExpressMode;
const char *envval = NULL;
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
- envval = HDgetenv(HDF5_DRIVER);
+ envval = getenv(HDF5_DRIVER);
if (envval == NULL)
envval = "nomatch";
@@ -9928,7 +9928,7 @@ main(void)
ExpressMode = GetTestExpress();
/* For the Direct I/O driver, skip intensive tests due to poor performance */
- if (!HDstrcmp(envval, "direct"))
+ if (!strcmp(envval, "direct"))
ExpressMode = 2;
if (ExpressMode > 1)
@@ -9940,17 +9940,17 @@ main(void)
/* Push API context */
if (H5CX_push() < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Loop over re-opening B-tree during tests */
- for (reopen = FALSE; reopen <= TRUE; reopen++) {
+ for (reopen = false; reopen <= true; reopen++) {
if (reopen) {
fprintf(stdout, "Testing with reopening B-tree:\n");
- tparam.reopen_btree = TRUE;
+ tparam.reopen_btree = true;
} /* end if */
else {
fprintf(stdout, "Testing without reopening B-tree:\n");
- tparam.reopen_btree = FALSE;
+ tparam.reopen_btree = false;
} /* end else */
/* Test B-tree record insertion */
@@ -10031,21 +10031,21 @@ main(void)
nerrors += (h5_verify_cached_stabs(FILENAME, fapl) < 0 ? 1 : 0);
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
if (nerrors)
goto error;
- HDputs("All v2 B-tree tests passed.");
+ puts("All v2 B-tree tests passed.");
h5_cleanup(FILENAME, fapl);
return 0;
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
H5E_BEGIN_TRY
{
@@ -10054,7 +10054,7 @@ main(void)
H5E_END_TRY
if (api_ctx_pushed)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
return 1;
} /* end main() */
diff --git a/test/cache.c b/test/cache.c
index 673b253a433..4e6288679b7 100644
--- a/test/cache.c
+++ b/test/cache.c
@@ -41,12 +41,12 @@ hid_t saved_fcpl_id = H5P_DEFAULT; /* store the fcpl id here between
* close.
*/
-hid_t saved_fid = -1; /* store the file id here between cache setup
- * and takedown.
- */
-hbool_t write_permitted = TRUE;
-hbool_t try_core_file_driver = FALSE;
-hbool_t core_file_driver_failed = FALSE;
+hid_t saved_fid = H5I_INVALID_HID; /* store the file id here between cache setup
+ * and takedown.
+ */
+bool write_permitted = true;
+bool try_core_file_driver = false;
+bool core_file_driver_failed = false;
/* global variable declarations: */
@@ -58,80 +58,80 @@ struct flush_cache_test_spec {
int entry_num;
int entry_type;
int entry_index;
- hbool_t insert_flag;
+ bool insert_flag;
unsigned int flags;
- hbool_t expected_deserialized;
- hbool_t expected_serialized;
- hbool_t expected_destroyed;
+ bool expected_deserialized;
+ bool expected_serialized;
+ bool expected_destroyed;
};
struct pe_flush_cache_test_spec {
int entry_num;
int entry_type;
int entry_index;
- hbool_t insert_flag;
+ bool insert_flag;
unsigned int flags;
int num_pins;
int pin_type[MAX_PINS];
int pin_idx[MAX_PINS];
- hbool_t expected_deserialized;
- hbool_t expected_serialized;
- hbool_t expected_destroyed;
+ bool expected_deserialized;
+ bool expected_serialized;
+ bool expected_destroyed;
};
struct fo_flush_entry_check {
- int entry_num;
- int entry_type;
- int entry_index;
- size_t expected_size;
- hbool_t in_cache;
- hbool_t at_main_addr;
- hbool_t is_dirty;
- hbool_t is_protected;
- hbool_t is_pinned;
- hbool_t expected_deserialized;
- hbool_t expected_serialized;
- hbool_t expected_destroyed;
+ int entry_num;
+ int entry_type;
+ int entry_index;
+ size_t expected_size;
+ bool in_cache;
+ bool at_main_addr;
+ bool is_dirty;
+ bool is_protected;
+ bool is_pinned;
+ bool expected_deserialized;
+ bool expected_serialized;
+ bool expected_destroyed;
};
struct fo_flush_cache_test_spec {
int entry_num;
int entry_type;
int entry_index;
- hbool_t insert_flag;
+ bool insert_flag;
unsigned int flags;
- hbool_t resize_flag;
+ bool resize_flag;
size_t new_size;
int num_pins;
int pin_type[MAX_PINS];
int pin_idx[MAX_PINS];
int num_flush_ops;
struct flush_op flush_ops[MAX_FLUSH_OPS];
- hbool_t expected_deserialized;
- hbool_t expected_serialized;
- hbool_t expected_destroyed;
+ bool expected_deserialized;
+ bool expected_serialized;
+ bool expected_destroyed;
};
struct move_entry_test_spec {
- int entry_type;
- int entry_index;
- hbool_t is_pinned;
- hbool_t is_protected;
+ int entry_type;
+ int entry_index;
+ bool is_pinned;
+ bool is_protected;
};
struct pinned_single_entry_test_spec {
int test_num;
int entry_type;
int entry_idx;
- hbool_t dirty_flag;
- hbool_t mark_dirty;
- hbool_t pop_mark_dirty_prot;
- hbool_t pop_mark_dirty_pinned;
- hbool_t unprotect_unpin;
+ bool dirty_flag;
+ bool mark_dirty;
+ bool pop_mark_dirty_prot;
+ bool pop_mark_dirty_pinned;
+ bool unprotect_unpin;
unsigned int flags;
unsigned int flush_flags;
- hbool_t expected_serialized;
- hbool_t expected_destroyed;
+ bool expected_serialized;
+ bool expected_destroyed;
};
/* private function declarations: */
@@ -158,21 +158,23 @@ static void check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num
struct pe_flush_cache_test_spec spec[]);
static void check_flush_cache__single_entry(H5F_t *file_ptr);
static void check_flush_cache__single_entry_test(H5F_t *file_ptr, int test_num, int entry_type, int entry_idx,
- hbool_t insert_flag, unsigned int flags,
- unsigned int flush_flags, hbool_t expected_deserialized,
- hbool_t expected_serialized, hbool_t expected_destroyed);
-static void check_flush_cache__pinned_single_entry_test(
- H5F_t *file_ptr, int test_num, int entry_type, int entry_idx, hbool_t unprot_dirty_flag,
- hbool_t mark_dirty, hbool_t pop_mark_dirty_prot, hbool_t pop_mark_dirty_pinned, hbool_t unprotect_unpin,
- unsigned int flags, unsigned int flush_flags, hbool_t expected_serialized, hbool_t expected_destroyed);
-static void check_flush_cache__flush_ops(H5F_t *file_ptr);
-static void check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flush_flags,
- int spec_size, const struct fo_flush_cache_test_spec spec[],
- unsigned init_expected_index_len,
- size_t init_expected_index_size, unsigned expected_index_len,
- size_t expected_index_size, int check_size,
- struct fo_flush_entry_check check[]);
-static void check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr);
+ bool insert_flag, unsigned int flags,
+ unsigned int flush_flags, bool expected_deserialized,
+ bool expected_serialized, bool expected_destroyed);
+static void check_flush_cache__pinned_single_entry_test(H5F_t *file_ptr, int test_num, int entry_type,
+ int entry_idx, bool unprot_dirty_flag,
+ bool mark_dirty, bool pop_mark_dirty_prot,
+ bool pop_mark_dirty_pinned, bool unprotect_unpin,
+ unsigned int flags, unsigned int flush_flags,
+ bool expected_serialized, bool expected_destroyed);
+static void check_flush_cache__flush_ops(H5F_t *file_ptr);
+static void check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flush_flags,
+ int spec_size, const struct fo_flush_cache_test_spec spec[],
+ unsigned init_expected_index_len,
+ size_t init_expected_index_size, unsigned expected_index_len,
+ size_t expected_index_size, int check_size,
+ struct fo_flush_entry_check check[]);
+static void check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr);
static unsigned check_get_entry_status(unsigned paged);
static unsigned check_expunge_entry(unsigned paged);
static unsigned check_multiple_read_protect(unsigned paged);
@@ -199,17 +201,17 @@ static unsigned check_unprotect_ro_dirty_err(unsigned paged);
static unsigned check_protect_ro_rw_err(unsigned paged);
static unsigned check_protect_retries(unsigned paged);
static unsigned check_check_evictions_enabled_err(unsigned paged);
-static unsigned check_auto_cache_resize(hbool_t cork_ageout, unsigned paged);
+static unsigned check_auto_cache_resize(bool cork_ageout, unsigned paged);
static unsigned check_auto_cache_resize_disable(unsigned paged);
static unsigned check_auto_cache_resize_epoch_markers(unsigned paged);
static unsigned check_auto_cache_resize_input_errs(unsigned paged);
static unsigned check_auto_cache_resize_aux_fcns(unsigned paged);
-static unsigned check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged);
+static unsigned check_metadata_blizzard_absence(bool fill_via_insertion, unsigned paged);
static unsigned check_flush_deps(unsigned paged);
static unsigned check_flush_deps_err(unsigned paged);
static unsigned check_flush_deps_order(unsigned paged);
static unsigned check_notify_cb(unsigned paged);
-static unsigned check_metadata_cork(hbool_t fill_via_insertion, unsigned paged);
+static unsigned check_metadata_cork(bool fill_via_insertion, unsigned paged);
static unsigned check_entry_deletions_during_scans(unsigned paged);
static void cedds__expunge_dirty_entry_in_flush_test(H5F_t *file_ptr);
static void cedds__H5C_make_space_in_cache(H5F_t *file_ptr);
@@ -222,7 +224,7 @@ static void check_stats__smoke_check_1(H5F_t *file_ptr);
static H5F_t *setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged);
-static void takedown_cache(H5F_t *file_ptr, hbool_t dump_stats, hbool_t dump_detailed_stats);
+static void takedown_cache(H5F_t *file_ptr, bool dump_stats, bool dump_detailed_stats);
/**************************************************************************/
/**************************************************************************/
@@ -245,10 +247,10 @@ static void takedown_cache(H5F_t *file_ptr, hbool_t dump_stats, hbool_t dump_det
static unsigned
smoke_check_1(int express_test, unsigned paged)
{
- hbool_t show_progress = FALSE;
- int dirty_unprotects = FALSE;
- int dirty_destroys = FALSE;
- hbool_t display_stats = FALSE;
+ bool show_progress = false;
+ int dirty_unprotects = false;
+ int dirty_destroys = false;
+ bool display_stats = false;
int32_t lag = 10;
int32_t max_index = (10 * 1024) - 1;
int mile_stone = 1;
@@ -285,7 +287,7 @@ smoke_check_1(int express_test, unsigned paged)
break;
}
- pass = TRUE;
+ pass = true;
if (show_progress) /* 1 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -303,15 +305,15 @@ smoke_check_1(int express_test, unsigned paged)
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ TRUE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ FALSE,
- /* do_destroys */ TRUE,
- /* do_mult_ro_protects */ TRUE,
+ /* display_detailed_stats */ false,
+ /* do_inserts */ true,
+ /* do_moves */ true,
+ /* move_to_main_addr */ false,
+ /* do_destroys */ true,
+ /* do_mult_ro_protects */ true,
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
@@ -321,15 +323,15 @@ smoke_check_1(int express_test, unsigned paged)
row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ FALSE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ TRUE,
- /* do_destroys */ FALSE,
- /* do_mult_ro_protects */ TRUE,
+ /* display_detailed_stats */ false,
+ /* do_inserts */ false,
+ /* do_moves */ true,
+ /* move_to_main_addr */ true,
+ /* do_destroys */ false,
+ /* do_mult_ro_protects */ true,
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
@@ -339,15 +341,15 @@ smoke_check_1(int express_test, unsigned paged)
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ TRUE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ FALSE,
- /* do_destroys */ FALSE,
- /* do_mult_ro_protects */ TRUE,
+ /* display_detailed_stats */ false,
+ /* do_inserts */ true,
+ /* do_moves */ true,
+ /* move_to_main_addr */ false,
+ /* do_destroys */ false,
+ /* do_mult_ro_protects */ true,
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
@@ -357,9 +359,9 @@ smoke_check_1(int express_test, unsigned paged)
/* flush and destroy all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ TRUE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ true,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 7 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -367,11 +369,11 @@ smoke_check_1(int express_test, unsigned paged)
col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ TRUE,
+ /* display_detailed_stats */ true,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 8 */
@@ -380,9 +382,9 @@ smoke_check_1(int express_test, unsigned paged)
/* flush all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ FALSE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ false,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 9 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -390,17 +392,17 @@ smoke_check_1(int express_test, unsigned paged)
col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ TRUE,
+ /* display_detailed_stats */ true,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 10 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
- takedown_cache(file_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, true);
if (show_progress) /* 11 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -440,10 +442,10 @@ smoke_check_1(int express_test, unsigned paged)
static unsigned
smoke_check_2(int express_test, unsigned paged)
{
- hbool_t show_progress = FALSE;
- int dirty_unprotects = TRUE;
- int dirty_destroys = TRUE;
- hbool_t display_stats = FALSE;
+ bool show_progress = false;
+ int dirty_unprotects = true;
+ int dirty_destroys = true;
+ bool display_stats = false;
int32_t max_index = (10 * 1024) - 1;
int32_t lag = 10;
int mile_stone = 1;
@@ -480,7 +482,7 @@ smoke_check_2(int express_test, unsigned paged)
break;
}
- pass = TRUE;
+ pass = true;
if (show_progress) /* 1 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -498,15 +500,15 @@ smoke_check_2(int express_test, unsigned paged)
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ TRUE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ FALSE,
- /* do_destroys */ TRUE,
- /* do_mult_ro_protects */ TRUE,
+ /* display_detailed_stats */ true,
+ /* do_inserts */ true,
+ /* do_moves */ true,
+ /* move_to_main_addr */ false,
+ /* do_destroys */ true,
+ /* do_mult_ro_protects */ true,
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
@@ -516,15 +518,15 @@ smoke_check_2(int express_test, unsigned paged)
row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ FALSE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ TRUE,
- /* do_destroys */ FALSE,
- /* do_mult_ro_protects */ TRUE,
+ /* display_detailed_stats */ true,
+ /* do_inserts */ false,
+ /* do_moves */ true,
+ /* move_to_main_addr */ true,
+ /* do_destroys */ false,
+ /* do_mult_ro_protects */ true,
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
@@ -534,15 +536,15 @@ smoke_check_2(int express_test, unsigned paged)
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ TRUE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ FALSE,
- /* do_destroys */ FALSE,
- /* do_mult_ro_protects */ TRUE,
+ /* display_detailed_stats */ true,
+ /* do_inserts */ true,
+ /* do_moves */ true,
+ /* move_to_main_addr */ false,
+ /* do_destroys */ false,
+ /* do_mult_ro_protects */ true,
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
@@ -552,9 +554,9 @@ smoke_check_2(int express_test, unsigned paged)
/* flush and destroy all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ TRUE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ true,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 7 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -562,11 +564,11 @@ smoke_check_2(int express_test, unsigned paged)
col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ TRUE,
+ /* display_detailed_stats */ true,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 8 */
@@ -575,9 +577,9 @@ smoke_check_2(int express_test, unsigned paged)
/* flush all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ FALSE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ false,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 9 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -585,17 +587,17 @@ smoke_check_2(int express_test, unsigned paged)
col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ TRUE,
+ /* display_detailed_stats */ true,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 10 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
- takedown_cache(file_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, true);
if (show_progress) /* 11 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -634,10 +636,10 @@ smoke_check_2(int express_test, unsigned paged)
static unsigned
smoke_check_3(int express_test, unsigned paged)
{
- hbool_t show_progress = FALSE;
- int dirty_unprotects = FALSE;
- int dirty_destroys = FALSE;
- hbool_t display_stats = FALSE;
+ bool show_progress = false;
+ int dirty_unprotects = false;
+ int dirty_destroys = false;
+ bool display_stats = false;
int32_t max_index = (10 * 1024) - 1;
int32_t lag = 10;
int mile_stone = 1;
@@ -674,7 +676,7 @@ smoke_check_3(int express_test, unsigned paged)
break;
}
- pass = TRUE;
+ pass = true;
if (show_progress) /* 1 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -692,15 +694,15 @@ smoke_check_3(int express_test, unsigned paged)
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ TRUE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ FALSE,
- /* do_destroys */ TRUE,
- /* do_mult_ro_protects */ TRUE,
+ /* display_detailed_stats */ true,
+ /* do_inserts */ true,
+ /* do_moves */ true,
+ /* move_to_main_addr */ false,
+ /* do_destroys */ true,
+ /* do_mult_ro_protects */ true,
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
@@ -710,15 +712,15 @@ smoke_check_3(int express_test, unsigned paged)
row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ FALSE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ TRUE,
- /* do_destroys */ FALSE,
- /* do_mult_ro_protects */ TRUE,
+ /* display_detailed_stats */ true,
+ /* do_inserts */ false,
+ /* do_moves */ true,
+ /* move_to_main_addr */ true,
+ /* do_destroys */ false,
+ /* do_mult_ro_protects */ true,
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
@@ -728,15 +730,15 @@ smoke_check_3(int express_test, unsigned paged)
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ TRUE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ FALSE,
- /* do_destroys */ FALSE,
- /* do_mult_ro_protects */ TRUE,
+ /* display_detailed_stats */ true,
+ /* do_inserts */ true,
+ /* do_moves */ true,
+ /* move_to_main_addr */ false,
+ /* do_destroys */ false,
+ /* do_mult_ro_protects */ true,
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
@@ -746,9 +748,9 @@ smoke_check_3(int express_test, unsigned paged)
/* flush and destroy all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ TRUE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ true,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 7 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -756,11 +758,11 @@ smoke_check_3(int express_test, unsigned paged)
col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ TRUE,
+ /* display_detailed_stats */ true,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 8 */
@@ -769,9 +771,9 @@ smoke_check_3(int express_test, unsigned paged)
/* flush all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ FALSE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ false,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 9 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -779,17 +781,17 @@ smoke_check_3(int express_test, unsigned paged)
col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ TRUE,
+ /* display_detailed_stats */ true,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 10 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
- takedown_cache(file_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, true);
if (show_progress) /* 11 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -829,10 +831,10 @@ smoke_check_3(int express_test, unsigned paged)
static unsigned
smoke_check_4(int express_test, unsigned paged)
{
- hbool_t show_progress = FALSE;
- int dirty_unprotects = TRUE;
- int dirty_destroys = TRUE;
- hbool_t display_stats = FALSE;
+ bool show_progress = false;
+ int dirty_unprotects = true;
+ int dirty_destroys = true;
+ bool display_stats = false;
int32_t max_index = (10 * 1024) - 1;
int32_t lag = 10;
int mile_stone = 1;
@@ -869,7 +871,7 @@ smoke_check_4(int express_test, unsigned paged)
break;
}
- pass = TRUE;
+ pass = true;
if (show_progress) /* 1 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -887,15 +889,15 @@ smoke_check_4(int express_test, unsigned paged)
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ TRUE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ FALSE,
- /* do_destroys */ TRUE,
- /* do_mult_ro_protects */ TRUE,
+ /* display_detailed_stats */ true,
+ /* do_inserts */ true,
+ /* do_moves */ true,
+ /* move_to_main_addr */ false,
+ /* do_destroys */ true,
+ /* do_mult_ro_protects */ true,
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
@@ -905,15 +907,15 @@ smoke_check_4(int express_test, unsigned paged)
row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ FALSE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ TRUE,
- /* do_destroys */ FALSE,
- /* do_mult_ro_protects */ TRUE,
+ /* display_detailed_stats */ true,
+ /* do_inserts */ false,
+ /* do_moves */ true,
+ /* move_to_main_addr */ true,
+ /* do_destroys */ false,
+ /* do_mult_ro_protects */ true,
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
@@ -923,15 +925,15 @@ smoke_check_4(int express_test, unsigned paged)
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ TRUE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ FALSE,
- /* do_destroys */ FALSE,
- /* do_mult_ro_protects */ TRUE,
+ /* display_detailed_stats */ true,
+ /* do_inserts */ true,
+ /* do_moves */ true,
+ /* move_to_main_addr */ false,
+ /* do_destroys */ false,
+ /* do_mult_ro_protects */ true,
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
@@ -941,9 +943,9 @@ smoke_check_4(int express_test, unsigned paged)
/* flush and destroy all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ TRUE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ true,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 7 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -951,11 +953,11 @@ smoke_check_4(int express_test, unsigned paged)
col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ TRUE,
+ /* display_detailed_stats */ true,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 8 */
@@ -964,9 +966,9 @@ smoke_check_4(int express_test, unsigned paged)
/* flush all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ FALSE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ false,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 9 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -974,17 +976,17 @@ smoke_check_4(int express_test, unsigned paged)
col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ TRUE,
+ /* display_detailed_stats */ true,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 10 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
- takedown_cache(file_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, true);
if (show_progress) /* 11 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -1025,9 +1027,9 @@ static unsigned
smoke_check_5(int express_test, unsigned paged)
{
herr_t result;
- hbool_t show_progress = FALSE;
- int dirty_unprotects = FALSE;
- hbool_t display_stats = FALSE;
+ bool show_progress = false;
+ int dirty_unprotects = false;
+ bool display_stats = false;
int32_t max_index = 1024;
int mile_stone = 1;
H5F_t *file_ptr = NULL;
@@ -1035,7 +1037,7 @@ smoke_check_5(int express_test, unsigned paged)
H5C_auto_size_ctl_t auto_size_ctl = {
/* int32_t version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* H5C_auto_resize_report_fcn rpt_fcn = */ NULL,
- /* hbool_t set_initial_size = */ TRUE,
+ /* bool set_initial_size = */ true,
/* size_t initial_size = */ (2 * 1024 * 1024),
/* double min_clean_fraction = */ 0.1,
@@ -1051,7 +1053,7 @@ smoke_check_5(int express_test, unsigned paged)
/* double increment = */ 2.0,
- /* hbool_t apply_max_increment = */ TRUE,
+ /* bool apply_max_increment = */ true,
/* size_t max_increment = */ (4 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
@@ -1065,12 +1067,12 @@ smoke_check_5(int express_test, unsigned paged)
/* double decrement = */ 0.9,
- /* hbool_t apply_max_decrement = */ TRUE,
+ /* bool apply_max_decrement = */ true,
/* size_t max_decrement = */ (1 * 1024 * 1024),
/* int32_t epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
+ /* bool apply_empty_reserve = */ true,
/* double empty_reserve = */ 0.5};
if (paged)
@@ -1104,7 +1106,7 @@ smoke_check_5(int express_test, unsigned paged)
break;
}
- pass = TRUE;
+ pass = true;
if (show_progress) /* 1 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -1123,7 +1125,7 @@ smoke_check_5(int express_test, unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 1.\n";
}
}
@@ -1133,33 +1135,33 @@ smoke_check_5(int express_test, unsigned paged)
hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ FALSE);
+ /* display_detailed_stats */ false,
+ /* do_inserts */ false);
if (show_progress) /* 4 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ FALSE);
+ /* display_detailed_stats */ false,
+ /* do_inserts */ false);
if (show_progress) /* 5 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ TRUE);
+ /* display_detailed_stats */ false,
+ /* do_inserts */ true);
if (show_progress) /* 6 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -1167,20 +1169,20 @@ smoke_check_5(int express_test, unsigned paged)
/* flush and destroy all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ TRUE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ true,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 7 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ TRUE,
+ /* display_detailed_stats */ false,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 8 */
@@ -1189,26 +1191,26 @@ smoke_check_5(int express_test, unsigned paged)
/* flush all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ FALSE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ false,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 9 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ TRUE,
+ /* display_detailed_stats */ false,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 10 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
- takedown_cache(file_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, true);
if (show_progress) /* 11 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -1249,9 +1251,9 @@ static unsigned
smoke_check_6(int express_test, unsigned paged)
{
herr_t result;
- hbool_t show_progress = FALSE;
- int dirty_unprotects = FALSE;
- hbool_t display_stats = FALSE;
+ bool show_progress = false;
+ int dirty_unprotects = false;
+ bool display_stats = false;
int mile_stone = 1;
int32_t max_index = 1024;
H5F_t *file_ptr = NULL;
@@ -1259,7 +1261,7 @@ smoke_check_6(int express_test, unsigned paged)
H5C_auto_size_ctl_t auto_size_ctl = {
/* int32_t version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* H5C_auto_resize_report_fcn rpt_fcn = */ NULL,
- /* hbool_t set_initial_size = */ TRUE,
+ /* bool set_initial_size = */ true,
/* size_t initial_size = */ (2 * 1024 * 1024),
/* double min_clean_fraction = */ 0.1,
@@ -1275,7 +1277,7 @@ smoke_check_6(int express_test, unsigned paged)
/* double increment = */ 2.0,
- /* hbool_t apply_max_increment = */ TRUE,
+ /* bool apply_max_increment = */ true,
/* size_t max_increment = */ (4 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
@@ -1289,12 +1291,12 @@ smoke_check_6(int express_test, unsigned paged)
/* double decrement = */ 0.9,
- /* hbool_t apply_max_decrement = */ TRUE,
+ /* bool apply_max_decrement = */ true,
/* size_t max_decrement = */ (1 * 1024 * 1024),
/* int32_t epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
+ /* bool apply_empty_reserve = */ true,
/* double empty_reserve = */ 0.05};
if (paged)
@@ -1308,7 +1310,7 @@ smoke_check_6(int express_test, unsigned paged)
return (0);
}
- pass = TRUE;
+ pass = true;
switch (express_test) {
case 0:
@@ -1347,7 +1349,7 @@ smoke_check_6(int express_test, unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 1.\n";
}
}
@@ -1357,33 +1359,33 @@ smoke_check_6(int express_test, unsigned paged)
hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ FALSE);
+ /* display_detailed_stats */ false,
+ /* do_inserts */ false);
if (show_progress) /* 4 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ FALSE);
+ /* display_detailed_stats */ false,
+ /* do_inserts */ false);
if (show_progress) /* 5 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ TRUE);
+ /* display_detailed_stats */ false,
+ /* do_inserts */ true);
if (show_progress) /* 6 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -1391,20 +1393,20 @@ smoke_check_6(int express_test, unsigned paged)
/* flush and destroy all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ TRUE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ true,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 7 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ TRUE,
+ /* display_detailed_stats */ false,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 8 */
@@ -1413,26 +1415,26 @@ smoke_check_6(int express_test, unsigned paged)
/* flush all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ FALSE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ false,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 9 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ TRUE,
+ /* display_detailed_stats */ false,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 10 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
- takedown_cache(file_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, true);
if (show_progress) /* 11 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -1473,9 +1475,9 @@ static unsigned
smoke_check_7(int express_test, unsigned paged)
{
herr_t result;
- hbool_t show_progress = FALSE;
- int dirty_unprotects = FALSE;
- hbool_t display_stats = FALSE;
+ bool show_progress = false;
+ int dirty_unprotects = false;
+ bool display_stats = false;
int mile_stone = 1;
int32_t max_index = 1024;
H5F_t *file_ptr = NULL;
@@ -1483,7 +1485,7 @@ smoke_check_7(int express_test, unsigned paged)
H5C_auto_size_ctl_t auto_size_ctl = {
/* int32_t version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* H5C_auto_resize_report_fcn rpt_fcn = */ NULL,
- /* hbool_t set_initial_size = */ TRUE,
+ /* bool set_initial_size = */ true,
/* size_t initial_size = */ (2 * 1024 * 1024),
/* double min_clean_fraction = */ 0.1,
@@ -1499,7 +1501,7 @@ smoke_check_7(int express_test, unsigned paged)
/* double increment = */ 2.0,
- /* hbool_t apply_max_increment = */ TRUE,
+ /* bool apply_max_increment = */ true,
/* size_t max_increment = */ (8 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
@@ -1514,12 +1516,12 @@ smoke_check_7(int express_test, unsigned paged)
/* double decrement = */ 0.9,
- /* hbool_t apply_max_decrement = */ TRUE,
+ /* bool apply_max_decrement = */ true,
/* size_t max_decrement = */ (1 * 1024 * 1024),
/* int32_t epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
+ /* bool apply_empty_reserve = */ true,
/* double empty_reserve = */ 0.1};
if (paged)
@@ -1553,7 +1555,7 @@ smoke_check_7(int express_test, unsigned paged)
break;
}
- pass = TRUE;
+ pass = true;
if (show_progress) /* 1 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -1572,7 +1574,7 @@ smoke_check_7(int express_test, unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 1.\n";
}
}
@@ -1582,33 +1584,33 @@ smoke_check_7(int express_test, unsigned paged)
hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ FALSE);
+ /* display_detailed_stats */ false,
+ /* do_inserts */ false);
if (show_progress) /* 4 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ FALSE);
+ /* display_detailed_stats */ false,
+ /* do_inserts */ false);
if (show_progress) /* 5 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ TRUE);
+ /* display_detailed_stats */ false,
+ /* do_inserts */ true);
if (show_progress) /* 6 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -1616,20 +1618,20 @@ smoke_check_7(int express_test, unsigned paged)
/* flush and destroy all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ TRUE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ true,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 7 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ TRUE,
+ /* display_detailed_stats */ false,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 8 */
@@ -1638,26 +1640,26 @@ smoke_check_7(int express_test, unsigned paged)
/* flush all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ FALSE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ false,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 9 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ TRUE,
+ /* display_detailed_stats */ false,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 10 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
- takedown_cache(file_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, true);
if (show_progress) /* 11 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -1698,9 +1700,9 @@ static unsigned
smoke_check_8(int express_test, unsigned paged)
{
herr_t result;
- hbool_t show_progress = FALSE;
- int dirty_unprotects = FALSE;
- hbool_t display_stats = FALSE;
+ bool show_progress = false;
+ int dirty_unprotects = false;
+ bool display_stats = false;
int mile_stone = 1;
int32_t max_index = 1024;
H5F_t *file_ptr = NULL;
@@ -1708,7 +1710,7 @@ smoke_check_8(int express_test, unsigned paged)
H5C_auto_size_ctl_t auto_size_ctl = {
/* int32_t version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* H5C_auto_resize_report_fcn rpt_fcn = */ NULL,
- /* hbool_t set_initial_size = */ TRUE,
+ /* bool set_initial_size = */ true,
/* size_t initial_size = */ (2 * 1024 * 1024),
/* double min_clean_fraction = */ 0.1,
@@ -1724,7 +1726,7 @@ smoke_check_8(int express_test, unsigned paged)
/* double increment = */ 2.0,
- /* hbool_t apply_max_increment = */ TRUE,
+ /* bool apply_max_increment = */ true,
/* size_t max_increment = */ (4 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
@@ -1739,12 +1741,12 @@ smoke_check_8(int express_test, unsigned paged)
/* double decrement = */ 0.9,
- /* hbool_t apply_max_decrement = */ TRUE,
+ /* bool apply_max_decrement = */ true,
/* size_t max_decrement = */ (1 * 1024 * 1024),
/* int32_t epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
+ /* bool apply_empty_reserve = */ true,
/* double empty_reserve = */ 0.1};
if (paged)
@@ -1778,7 +1780,7 @@ smoke_check_8(int express_test, unsigned paged)
break;
}
- pass = TRUE;
+ pass = true;
if (show_progress) /* 1 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -1797,7 +1799,7 @@ smoke_check_8(int express_test, unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 1.\n";
}
}
@@ -1807,33 +1809,33 @@ smoke_check_8(int express_test, unsigned paged)
hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ FALSE);
+ /* display_detailed_stats */ false,
+ /* do_inserts */ false);
if (show_progress) /* 4 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ FALSE);
+ /* display_detailed_stats */ false,
+ /* do_inserts */ false);
if (show_progress) /* 5 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ TRUE);
+ /* display_detailed_stats */ false,
+ /* do_inserts */ true);
if (show_progress) /* 6 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -1841,20 +1843,20 @@ smoke_check_8(int express_test, unsigned paged)
/* flush and destroy all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ TRUE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ true,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 7 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ TRUE,
+ /* display_detailed_stats */ false,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 8 */
@@ -1863,26 +1865,26 @@ smoke_check_8(int express_test, unsigned paged)
/* flush all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ FALSE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ false,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 9 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ TRUE,
+ /* display_detailed_stats */ false,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 10 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
- takedown_cache(file_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, true);
if (show_progress) /* 11 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -1926,11 +1928,11 @@ static unsigned
smoke_check_9(int express_test, unsigned paged)
{
herr_t result;
- hbool_t show_progress = FALSE;
- int dirty_unprotects = FALSE;
- int dirty_destroys = FALSE;
- hbool_t display_stats = FALSE;
- hbool_t display_detailed_stats = FALSE;
+ bool show_progress = false;
+ int dirty_unprotects = false;
+ int dirty_destroys = false;
+ bool display_stats = false;
+ bool display_detailed_stats = false;
int32_t max_index = (10 * 1024) - 1;
int32_t lag = 10;
int mile_stone = 1;
@@ -1968,7 +1970,7 @@ smoke_check_9(int express_test, unsigned paged)
break;
}
- pass = TRUE;
+ pass = true;
if (show_progress) /* 1 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -1988,11 +1990,11 @@ smoke_check_9(int express_test, unsigned paged)
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, FALSE);
+ result = H5C_set_evictions_enabled(cache_ptr, false);
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't disable evictions 1.\n";
}
}
@@ -2003,15 +2005,15 @@ smoke_check_9(int express_test, unsigned paged)
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
/* display_detailed_stats */ display_detailed_stats,
- /* do_inserts */ TRUE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ FALSE,
- /* do_destroys */ TRUE,
- /* do_mult_ro_protects */ TRUE,
+ /* do_inserts */ true,
+ /* do_moves */ true,
+ /* move_to_main_addr */ false,
+ /* do_destroys */ true,
+ /* do_mult_ro_protects */ true,
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
@@ -2022,11 +2024,11 @@ smoke_check_9(int express_test, unsigned paged)
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, TRUE);
+ result = H5C_set_evictions_enabled(cache_ptr, true);
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't enable evictions 1.\n";
}
}
@@ -2037,15 +2039,15 @@ smoke_check_9(int express_test, unsigned paged)
row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
/* display_detailed_stats */ display_detailed_stats,
- /* do_inserts */ FALSE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ TRUE,
- /* do_destroys */ FALSE,
- /* do_mult_ro_protects */ TRUE,
+ /* do_inserts */ false,
+ /* do_moves */ true,
+ /* move_to_main_addr */ true,
+ /* do_destroys */ false,
+ /* do_mult_ro_protects */ true,
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
@@ -2054,11 +2056,11 @@ smoke_check_9(int express_test, unsigned paged)
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, FALSE);
+ result = H5C_set_evictions_enabled(cache_ptr, false);
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't disable evictions 2.\n";
}
}
@@ -2070,15 +2072,15 @@ smoke_check_9(int express_test, unsigned paged)
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
/* display_detailed_stats */ display_detailed_stats,
- /* do_inserts */ TRUE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ FALSE,
- /* do_destroys */ FALSE,
- /* do_mult_ro_protects */ TRUE,
+ /* do_inserts */ true,
+ /* do_moves */ true,
+ /* move_to_main_addr */ false,
+ /* do_destroys */ false,
+ /* do_mult_ro_protects */ true,
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
@@ -2087,11 +2089,11 @@ smoke_check_9(int express_test, unsigned paged)
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, TRUE);
+ result = H5C_set_evictions_enabled(cache_ptr, true);
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't enable evictions 2.\n";
}
}
@@ -2102,20 +2104,20 @@ smoke_check_9(int express_test, unsigned paged)
/* flush and destroy all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ TRUE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ true,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 11 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, FALSE);
+ result = H5C_set_evictions_enabled(cache_ptr, false);
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't disable evictions 3.\n";
}
}
@@ -2126,11 +2128,11 @@ smoke_check_9(int express_test, unsigned paged)
col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
/* display_detailed_stats */ display_detailed_stats,
- /* do_inserts */ TRUE,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 13 */
@@ -2139,20 +2141,20 @@ smoke_check_9(int express_test, unsigned paged)
/* flush all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ FALSE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ false,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 14 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, TRUE);
+ result = H5C_set_evictions_enabled(cache_ptr, true);
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't enable evictions 3.\n";
}
}
@@ -2163,11 +2165,11 @@ smoke_check_9(int express_test, unsigned paged)
col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
/* display_detailed_stats */ display_detailed_stats,
- /* do_inserts */ TRUE,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 16 */
@@ -2175,11 +2177,11 @@ smoke_check_9(int express_test, unsigned paged)
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, FALSE);
+ result = H5C_set_evictions_enabled(cache_ptr, false);
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't disable evictions 4.\n";
}
}
@@ -2187,7 +2189,7 @@ smoke_check_9(int express_test, unsigned paged)
if (show_progress) /* 17 */
fprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n", __func__, mile_stone++, (int)pass);
- takedown_cache(file_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, true);
if (show_progress) /* 18 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -2231,11 +2233,11 @@ static unsigned
smoke_check_10(int express_test, unsigned paged)
{
herr_t result;
- hbool_t show_progress = FALSE;
- int dirty_unprotects = TRUE;
- int dirty_destroys = TRUE;
- hbool_t display_stats = FALSE;
- hbool_t display_detailed_stats = FALSE;
+ bool show_progress = false;
+ int dirty_unprotects = true;
+ int dirty_destroys = true;
+ bool display_stats = false;
+ bool display_detailed_stats = false;
int32_t max_index = (10 * 1024) - 1;
int32_t lag = 10;
int mile_stone = 1;
@@ -2273,7 +2275,7 @@ smoke_check_10(int express_test, unsigned paged)
break;
}
- pass = TRUE;
+ pass = true;
if (show_progress) /* 1 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -2292,15 +2294,15 @@ smoke_check_10(int express_test, unsigned paged)
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
/* display_detailed_stats */ display_detailed_stats,
- /* do_inserts */ TRUE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ FALSE,
- /* do_destroys */ TRUE,
- /* do_mult_ro_protects */ TRUE,
+ /* do_inserts */ true,
+ /* do_moves */ true,
+ /* move_to_main_addr */ false,
+ /* do_destroys */ true,
+ /* do_mult_ro_protects */ true,
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
@@ -2309,11 +2311,11 @@ smoke_check_10(int express_test, unsigned paged)
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, FALSE);
+ result = H5C_set_evictions_enabled(cache_ptr, false);
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't disable evictions 1.\n";
}
}
@@ -2324,15 +2326,15 @@ smoke_check_10(int express_test, unsigned paged)
row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
/* display_detailed_stats */ display_detailed_stats,
- /* do_inserts */ FALSE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ TRUE,
- /* do_destroys */ FALSE,
- /* do_mult_ro_protects */ TRUE,
+ /* do_inserts */ false,
+ /* do_moves */ true,
+ /* move_to_main_addr */ true,
+ /* do_destroys */ false,
+ /* do_mult_ro_protects */ true,
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
@@ -2341,11 +2343,11 @@ smoke_check_10(int express_test, unsigned paged)
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, TRUE);
+ result = H5C_set_evictions_enabled(cache_ptr, true);
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't enable evictions 1.\n";
}
}
@@ -2356,15 +2358,15 @@ smoke_check_10(int express_test, unsigned paged)
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
/* display_detailed_stats */ display_detailed_stats,
- /* do_inserts */ TRUE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ FALSE,
- /* do_destroys */ FALSE,
- /* do_mult_ro_protects */ TRUE,
+ /* do_inserts */ true,
+ /* do_moves */ true,
+ /* move_to_main_addr */ false,
+ /* do_destroys */ false,
+ /* do_mult_ro_protects */ true,
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
@@ -2373,11 +2375,11 @@ smoke_check_10(int express_test, unsigned paged)
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, FALSE);
+ result = H5C_set_evictions_enabled(cache_ptr, false);
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't disable evictions 2.\n";
}
}
@@ -2388,20 +2390,20 @@ smoke_check_10(int express_test, unsigned paged)
/* flush and destroy all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ TRUE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ true,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 10 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, TRUE);
+ result = H5C_set_evictions_enabled(cache_ptr, true);
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't enable evictions 2.\n";
}
}
@@ -2412,11 +2414,11 @@ smoke_check_10(int express_test, unsigned paged)
col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
/* display_detailed_stats */ display_detailed_stats,
- /* do_inserts */ TRUE,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 12 */
@@ -2424,11 +2426,11 @@ smoke_check_10(int express_test, unsigned paged)
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, FALSE);
+ result = H5C_set_evictions_enabled(cache_ptr, false);
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't disable evictions 3.\n";
}
}
@@ -2439,20 +2441,20 @@ smoke_check_10(int express_test, unsigned paged)
/* flush all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ FALSE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ false,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 14 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, TRUE);
+ result = H5C_set_evictions_enabled(cache_ptr, true);
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't enable evictions 3.\n";
}
}
@@ -2463,11 +2465,11 @@ smoke_check_10(int express_test, unsigned paged)
col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
/* display_detailed_stats */ display_detailed_stats,
- /* do_inserts */ TRUE,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 16 */
@@ -2475,11 +2477,11 @@ smoke_check_10(int express_test, unsigned paged)
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, FALSE);
+ result = H5C_set_evictions_enabled(cache_ptr, false);
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't disable evictions 4.\n";
}
}
@@ -2487,7 +2489,7 @@ smoke_check_10(int express_test, unsigned paged)
if (show_progress) /* 17 */
fprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n", __func__, mile_stone++, (int)pass);
- takedown_cache(file_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, true);
if (show_progress) /* 18 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -2516,9 +2518,9 @@ smoke_check_10(int express_test, unsigned paged)
*
* Purpose: A basic test of the write permitted function. In essence,
* we load the cache up with dirty entryies, set
- * write_permitted to FALSE, and then protect a bunch of
+ * write_permitted to false, and then protect a bunch of
* entries. If there are any writes while write_permitted is
- * FALSE, the test will fail.
+ * false, the test will fail.
*
* Return: void
*
@@ -2535,8 +2537,8 @@ write_permitted_check(int
#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
- hbool_t show_progress = FALSE;
- hbool_t display_stats = FALSE;
+ bool show_progress = false;
+ bool display_stats = false;
int32_t max_index = (10 * 1024) - 1;
int32_t lag = 10;
int mile_stone = 1;
@@ -2571,7 +2573,7 @@ write_permitted_check(int
break;
}
- pass = TRUE;
+ pass = true;
if (show_progress) /* 1 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -2589,57 +2591,57 @@ write_permitted_check(int
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ TRUE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ FALSE,
- /* do_destroys */ TRUE,
- /* do_mult_ro_protects */ TRUE,
- /* dirty_destroys */ TRUE,
- /* dirty_unprotects */ TRUE);
+ /* display_detailed_stats */ true,
+ /* do_inserts */ true,
+ /* do_moves */ true,
+ /* move_to_main_addr */ false,
+ /* do_destroys */ true,
+ /* do_mult_ro_protects */ true,
+ /* dirty_destroys */ true,
+ /* dirty_unprotects */ true);
if (show_progress) /* 4 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
- write_permitted = FALSE;
+ write_permitted = false;
row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ FALSE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ TRUE,
- /* do_destroys */ FALSE,
- /* do_mult_ro_protects */ TRUE,
- /* dirty_destroys */ FALSE,
+ /* display_detailed_stats */ true,
+ /* do_inserts */ false,
+ /* do_moves */ true,
+ /* move_to_main_addr */ true,
+ /* do_destroys */ false,
+ /* do_mult_ro_protects */ true,
+ /* dirty_destroys */ false,
/* dirty_unprotects */ NO_CHANGE);
if (show_progress) /* 5 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
- write_permitted = TRUE;
+ write_permitted = true;
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ TRUE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ FALSE,
- /* do_destroys */ FALSE,
- /* do_mult_ro_protects */ TRUE,
- /* dirty_destroys */ TRUE,
- /* dirty_unprotects */ TRUE);
+ /* display_detailed_stats */ true,
+ /* do_inserts */ true,
+ /* do_moves */ true,
+ /* move_to_main_addr */ false,
+ /* do_destroys */ false,
+ /* do_mult_ro_protects */ true,
+ /* dirty_destroys */ true,
+ /* dirty_unprotects */ true);
if (show_progress) /* 6 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -2647,9 +2649,9 @@ write_permitted_check(int
/* flush and destroy all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ TRUE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ true,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 7 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -2657,34 +2659,34 @@ write_permitted_check(int
col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ TRUE,
- /* dirty_unprotects */ TRUE);
+ /* display_detailed_stats */ true,
+ /* do_inserts */ true,
+ /* dirty_unprotects */ true);
if (show_progress) /* 8 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
- write_permitted = FALSE;
+ write_permitted = false;
col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ FALSE,
+ /* display_detailed_stats */ true,
+ /* do_inserts */ false,
/* dirty_unprotects */ NO_CHANGE);
- write_permitted = TRUE;
+ write_permitted = true;
if (show_progress) /* 9 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
- takedown_cache(file_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, true);
if (show_progress) /* 10 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -2738,10 +2740,10 @@ check_insert_entry(unsigned paged)
int entry_type = PICO_ENTRY_TYPE;
int i;
herr_t result;
- hbool_t in_cache;
- hbool_t is_dirty;
- hbool_t is_protected;
- hbool_t is_pinned;
+ bool in_cache;
+ bool is_dirty;
+ bool is_protected;
+ bool is_pinned;
size_t entry_size;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
@@ -2754,7 +2756,7 @@ check_insert_entry(unsigned paged)
else
TESTING("H5C_insert_entry() functionality");
- pass = TRUE;
+ pass = true;
/* Allocate a cache, and insert entries into it using all
* combinations of flags. Verify that the entries are inserted,
@@ -2796,7 +2798,7 @@ check_insert_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_entry_status() reports failure.";
}
@@ -2805,7 +2807,7 @@ check_insert_entry(unsigned paged)
/* check the universals */
if ((!in_cache) || (!is_dirty) || (is_protected) || (entry_size != entry_sizes[entry_type])) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected insert results 1.";
}
}
@@ -2817,18 +2819,18 @@ check_insert_entry(unsigned paged)
if (!is_pinned) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected insert results 2.";
}
}
else if (is_pinned) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected insert results 3.";
}
else if (is_pinned != ((entry_ptr->header).is_pinned)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected insert results 4.";
}
}
@@ -2844,13 +2846,13 @@ check_insert_entry(unsigned paged)
if (!((entry_ptr->header).flush_marker)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected insert results 5.";
}
}
else if ((entry_ptr->header).flush_marker) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected insert results 6.";
}
}
@@ -2868,7 +2870,7 @@ check_insert_entry(unsigned paged)
if (search_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected insert results 7.";
}
}
@@ -2887,7 +2889,7 @@ check_insert_entry(unsigned paged)
if (search_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected insert results 8.";
}
}
@@ -2907,7 +2909,7 @@ check_insert_entry(unsigned paged)
if (search_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected insert results 9.";
}
}
@@ -2938,7 +2940,7 @@ check_insert_entry(unsigned paged)
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected insert results 10.";
}
}
@@ -2958,7 +2960,7 @@ check_insert_entry(unsigned paged)
(cache_ptr->max_pl_len != 0) || (cache_ptr->max_pl_size != (size_t)0) ||
(cache_ptr->max_pel_len != 2) || (cache_ptr->max_pel_size != 2 * entry_sizes[entry_type])) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected insert results 11.";
}
}
@@ -2974,7 +2976,7 @@ check_insert_entry(unsigned paged)
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -3014,7 +3016,7 @@ check_flush_cache(unsigned paged)
else
TESTING("H5C_flush_cache() functionality");
- pass = TRUE;
+ pass = true;
/* allocate a cache, and flush it under various circumstances.
* To the extent possible, verify that the desired actions took
@@ -3058,7 +3060,7 @@ check_flush_cache(unsigned paged)
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -3096,12 +3098,12 @@ check_flush_cache__empty_cache(H5F_t *file_ptr)
if (cache_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache_ptr NULL on entry to empty cache case.";
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache not empty at beginning of empty cache case.";
}
@@ -3154,12 +3156,12 @@ check_flush_cache__multi_entry(H5F_t *file_ptr)
if (cache_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache_ptr NULL on entry to multi entry case.";
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache not empty at beginning of multi entry case.";
}
@@ -3171,67 +3173,67 @@ check_flush_cache__multi_entry(H5F_t *file_ptr)
{/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 75,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 2,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 25,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 3,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 50,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 4,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 10,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 5,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 20,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 6,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 30,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 7,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 40,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE}};
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false}};
check_flush_cache__multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec);
}
@@ -3244,67 +3246,67 @@ check_flush_cache__multi_entry(H5F_t *file_ptr)
{/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 75,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 2,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 25,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 3,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 50,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 4,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 10,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 5,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 20,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 6,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 30,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 7,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 40,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE}};
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true}};
check_flush_cache__multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec);
}
@@ -3317,67 +3319,67 @@ check_flush_cache__multi_entry(H5F_t *file_ptr)
{/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 75,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 2,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 25,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 3,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 50,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 4,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 10,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 5,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 20,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 6,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 30,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 7,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 40,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE}};
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false}};
check_flush_cache__multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec);
}
@@ -3390,67 +3392,67 @@ check_flush_cache__multi_entry(H5F_t *file_ptr)
{/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 75,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 2,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 25,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 3,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 50,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 4,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 10,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 5,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 20,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 6,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 30,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 7,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 40,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE}};
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false}};
check_flush_cache__multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec);
}
@@ -3463,67 +3465,67 @@ check_flush_cache__multi_entry(H5F_t *file_ptr)
{/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 75,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 2,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 25,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 3,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 50,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 4,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 10,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 5,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 20,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 6,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 30,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 7,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 40,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE}};
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true}};
check_flush_cache__multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec);
}
@@ -3536,67 +3538,67 @@ check_flush_cache__multi_entry(H5F_t *file_ptr)
{/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 75,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 2,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 25,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 3,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 50,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 4,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 10,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 5,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 20,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 6,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 30,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 7,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 40,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE}};
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true}};
check_flush_cache__multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec);
}
@@ -3609,67 +3611,67 @@ check_flush_cache__multi_entry(H5F_t *file_ptr)
{/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 75,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 2,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 25,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 3,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 50,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 4,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 10,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 5,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 20,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 6,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 30,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 7,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 40,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE}};
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false}};
check_flush_cache__multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec);
}
@@ -3683,67 +3685,67 @@ check_flush_cache__multi_entry(H5F_t *file_ptr)
{/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 75,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 2,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 25,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 3,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 50,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 4,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 10,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 5,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 20,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 6,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 30,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 7,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 40,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE}};
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true}};
check_flush_cache__multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec);
}
@@ -3758,67 +3760,67 @@ check_flush_cache__multi_entry(H5F_t *file_ptr)
{/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 75,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 2,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 25,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 3,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 50,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 4,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 10,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 5,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 20,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 6,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 30,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 7,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 40,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE}};
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false}};
check_flush_cache__multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec);
}
@@ -3837,99 +3839,99 @@ check_flush_cache__multi_entry(H5F_t *file_ptr)
{/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
/* num_pins = */ 0,
/* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 75,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
/* num_pins = */ 1,
/* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 2,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 25,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
/* num_pins = */ 2,
/* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, 75, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 3,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 50,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
/* num_pins = */ 3,
/* pin_type[MAX_PINS] = */
{PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, 75, 25, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 4,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 10,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
/* num_pins = */ 4,
/* pin_type[MAX_PINS] = */
{PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, 75, 25, 50, -1, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 5,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 20,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
/* num_pins = */ 5,
/* pin_type[MAX_PINS] = */
{PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, MONSTER_ENTRY_TYPE, -1, -1,
-1},
/* pin_idx[MAX_PINS] = */ {100, 75, 25, 50, 10, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 6,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 30,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
/* num_pins = */ 6,
/* pin_type[MAX_PINS] = */
{PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, MONSTER_ENTRY_TYPE,
MONSTER_ENTRY_TYPE, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, 75, 25, 50, 10, 20, -1, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 7,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 40,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
/* num_pins = */ 7,
/* pin_type[MAX_PINS] = */
{PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, MONSTER_ENTRY_TYPE,
MONSTER_ENTRY_TYPE, MONSTER_ENTRY_TYPE, -1},
/* pin_idx[MAX_PINS] = */ {100, 75, 25, 50, 10, 20, 30, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE}};
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false}};
check_flush_cache__pe_multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec);
}
@@ -3942,93 +3944,93 @@ check_flush_cache__multi_entry(H5F_t *file_ptr)
{/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
/* num_pins = */ 0,
/* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 75,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
/* num_pins = */ 1,
/* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 2,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 25,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
/* num_pins = */ 2,
/* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, 75, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 3,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 50,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
/* num_pins = */ 3,
/* pin_type[MAX_PINS] = */
{PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, 75, 25, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 4,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 10,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
/* num_pins = */ 0,
/* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 5,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 20,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
/* num_pins = */ 1,
/* pin_type[MAX_PINS] = */ {MONSTER_ENTRY_TYPE, -1, -1, -1, -1 - 1, -1, -1},
/* pin_idx[MAX_PINS] = */ {10, -1, -1, -1 - 1, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 6,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 30,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
/* num_pins = */ 2,
/* pin_type[MAX_PINS] = */ {MONSTER_ENTRY_TYPE, MONSTER_ENTRY_TYPE, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {10, 20, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 7,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 40,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
/* num_pins = */ 3,
/* pin_type[MAX_PINS] = */
{MONSTER_ENTRY_TYPE, MONSTER_ENTRY_TYPE, MONSTER_ENTRY_TYPE, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {10, 20, 30, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE}};
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true}};
check_flush_cache__pe_multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec);
}
@@ -4041,91 +4043,91 @@ check_flush_cache__multi_entry(H5F_t *file_ptr)
{/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
/* num_pins = */ 0,
/* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 75,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
/* num_pins = */ 1,
/* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 2,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 25,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
/* num_pins = */ 1,
/* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 3,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 50,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
/* num_pins = */ 1,
/* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 4,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 10,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
/* num_pins = */ 0,
/* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 5,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 20,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
/* num_pins = */ 0,
/* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 6,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 30,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
/* num_pins = */ 0,
/* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 7,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 40,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
/* num_pins = */ 0,
/* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE}};
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true}};
check_flush_cache__pe_multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec);
}
@@ -4138,93 +4140,93 @@ check_flush_cache__multi_entry(H5F_t *file_ptr)
{/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
/* num_pins = */ 0,
/* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 75,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
/* num_pins = */ 1,
/* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 2,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 25,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
/* num_pins = */ 1,
/* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 3,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 50,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
/* num_pins = */ 1,
/* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 4,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 10,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
/* num_pins = */ 0,
/* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 5,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 20,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
/* num_pins = */ 4,
/* pin_type[MAX_PINS] = */
{PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, 75, 25, 50, -1, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 6,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 30,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
/* num_pins = */ 4,
/* pin_type[MAX_PINS] = */
{PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, 75, 25, 50, -1, -1, -1, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 7,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 40,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
/* num_pins = */ 0,
/* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE}};
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true}};
check_flush_cache__pe_multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec);
}
@@ -4238,91 +4240,91 @@ check_flush_cache__multi_entry(H5F_t *file_ptr)
{/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
/* num_pins = */ 0,
/* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 75,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
/* num_pins = */ 1,
/* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 2,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 25,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
/* num_pins = */ 1,
/* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 3,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 50,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
/* num_pins = */ 1,
/* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 4,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 10,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
/* num_pins = */ 1,
/* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 5,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 20,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
/* num_pins = */ 1,
/* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 6,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 30,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
/* num_pins = */ 1,
/* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 7,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 40,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
/* num_pins = */ 1,
/* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE}};
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true}};
check_flush_cache__pe_multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec);
}
@@ -4352,21 +4354,21 @@ check_flush_cache__multi_entry_test(H5F_t *file_ptr, int test_num, unsigned int
if (cache_ptr == NULL) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "cache_ptr NULL on entry to single entry test #%d.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "cache_ptr NULL on entry to single entry test #%d.", test_num);
failure_mssg = msg;
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
- pass = FALSE;
+ pass = false;
- HDsnprintf(msg, (size_t)128, "cache not empty at beginning of multi entry test #%d.", test_num);
+ snprintf(msg, (size_t)128, "cache not empty at beginning of multi entry test #%d.", test_num);
failure_mssg = msg;
}
else if ((spec_size < 1) || (spec == NULL)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "missing/bad test spec on entry to multi entry test #%d.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "missing/bad test spec on entry to multi entry test #%d.", test_num);
failure_mssg = msg;
}
@@ -4377,9 +4379,8 @@ check_flush_cache__multi_entry_test(H5F_t *file_ptr, int test_num, unsigned int
(spec[u].entry_type >= NUMBER_OF_ENTRY_TYPES) || (spec[u].entry_index < 0) ||
(spec[u].entry_index > max_indices[spec[u].entry_type])) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "bad data in spec[%u] on entry to multi entry test #%d.", u,
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "bad data in spec[%u] on entry to multi entry test #%d.", u, test_num);
failure_mssg = msg;
}
u++;
@@ -4410,8 +4411,8 @@ check_flush_cache__multi_entry_test(H5F_t *file_ptr, int test_num, unsigned int
if (!pass) {
- HDsnprintf(msg, (size_t)128, "flush with flags 0x%x failed in multi entry test #%d.", flush_flags,
- test_num);
+ snprintf(msg, (size_t)128, "flush with flags 0x%x failed in multi entry test #%d.", flush_flags,
+ test_num);
failure_mssg = msg;
}
}
@@ -4425,9 +4426,9 @@ check_flush_cache__multi_entry_test(H5F_t *file_ptr, int test_num, unsigned int
(entry_ptr->serialized != spec[u].expected_serialized) ||
(entry_ptr->destroyed != spec[u].expected_destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Bad status on entry %u after flush in multi entry test #%d.", u,
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Bad status on entry %u after flush in multi entry test #%d.", u,
+ test_num);
failure_mssg = msg;
}
u++;
@@ -4440,9 +4441,9 @@ check_flush_cache__multi_entry_test(H5F_t *file_ptr, int test_num, unsigned int
(((flush_flags & H5C__FLUSH_INVALIDATE_FLAG) != 0) &&
((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache len/size after flush in multi entry test #%d.",
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache len/size after flush in multi entry test #%d.",
+ test_num);
failure_mssg = msg;
}
}
@@ -4454,15 +4455,15 @@ check_flush_cache__multi_entry_test(H5F_t *file_ptr, int test_num, unsigned int
if (!pass) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Flush failed on cleanup in multi entry test #%d.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Flush failed on cleanup in multi entry test #%d.", test_num);
failure_mssg = msg;
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache len/size after cleanup in multi entry test #%d.",
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache len/size after cleanup in multi entry test #%d.",
+ test_num);
failure_mssg = msg;
}
}
@@ -4473,9 +4474,9 @@ check_flush_cache__multi_entry_test(H5F_t *file_ptr, int test_num, unsigned int
base_addr = entries[spec[u].entry_type];
entry_ptr = &(base_addr[spec[u].entry_index]);
- entry_ptr->deserialized = FALSE;
- entry_ptr->serialized = FALSE;
- entry_ptr->destroyed = FALSE;
+ entry_ptr->deserialized = false;
+ entry_ptr->serialized = false;
+ entry_ptr->destroyed = false;
u++;
}
@@ -4507,21 +4508,21 @@ check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num, unsigned i
if (cache_ptr == NULL) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "cache_ptr NULL on entry to pe multi entry test #%d.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "cache_ptr NULL on entry to pe multi entry test #%d.", test_num);
failure_mssg = msg;
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
- pass = FALSE;
+ pass = false;
- HDsnprintf(msg, (size_t)128, "cache not empty at beginning of pe multi entry test #%d.", test_num);
+ snprintf(msg, (size_t)128, "cache not empty at beginning of pe multi entry test #%d.", test_num);
failure_mssg = msg;
}
else if ((spec_size < 1) || (spec == NULL)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "missing/bad test spec on entry to pe multi entry test #%d.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "missing/bad test spec on entry to pe multi entry test #%d.", test_num);
failure_mssg = msg;
}
@@ -4533,9 +4534,9 @@ check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num, unsigned i
(spec[u].entry_index > max_indices[spec[u].entry_type]) || (spec[u].num_pins < 0) ||
(spec[u].num_pins > MAX_PINS)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "bad data in spec[%u] on entry to pe multi entry test #%d.", u,
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "bad data in spec[%u] on entry to pe multi entry test #%d.", u,
+ test_num);
failure_mssg = msg;
}
u++;
@@ -4571,8 +4572,8 @@ check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num, unsigned i
if (!pass) {
- HDsnprintf(msg, (size_t)128, "flush with flags 0x%x failed in pe multi entry test #%d.",
- flush_flags, test_num);
+ snprintf(msg, (size_t)128, "flush with flags 0x%x failed in pe multi entry test #%d.",
+ flush_flags, test_num);
failure_mssg = msg;
}
}
@@ -4587,9 +4588,9 @@ check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num, unsigned i
(entry_ptr->serialized != spec[u].expected_serialized) ||
(entry_ptr->destroyed != spec[u].expected_destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Bad status on entry %u after flush in pe multi entry test #%d.", u,
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Bad status on entry %u after flush in pe multi entry test #%d.", u,
+ test_num);
failure_mssg = msg;
}
u++;
@@ -4602,9 +4603,9 @@ check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num, unsigned i
(((flush_flags & H5C__FLUSH_INVALIDATE_FLAG) != 0) &&
((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache len/size after flush in pe multi entry test #%d.",
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache len/size after flush in pe multi entry test #%d.",
+ test_num);
failure_mssg = msg;
}
}
@@ -4616,15 +4617,15 @@ check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num, unsigned i
if (!pass) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Flush failed on cleanup in pe multi entry test #%d.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Flush failed on cleanup in pe multi entry test #%d.", test_num);
failure_mssg = msg;
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128,
- "Unexpected cache len/size after cleanup in pe multi entry test #%d.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache len/size after cleanup in pe multi entry test #%d.",
+ test_num);
failure_mssg = msg;
}
}
@@ -4635,9 +4636,9 @@ check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num, unsigned i
base_addr = entries[spec[u].entry_type];
entry_ptr = &(base_addr[spec[u].entry_index]);
- entry_ptr->deserialized = FALSE;
- entry_ptr->serialized = FALSE;
- entry_ptr->destroyed = FALSE;
+ entry_ptr->deserialized = false;
+ entry_ptr->serialized = false;
+ entry_ptr->destroyed = false;
u++;
}
@@ -4653,7 +4654,7 @@ check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num, unsigned i
* the case in which the flush callback dirties, resizes,
* and/or moves entries.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -4671,26 +4672,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
if (cache_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache_ptr NULL on entry to flush ops test.";
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache not empty at beginning of flush ops test.";
}
spec = malloc((size_t)max_num_spec * sizeof(struct fo_flush_cache_test_spec));
if (spec == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "couldn't allocate flush ops test spec array";
}
checks = malloc((size_t)max_num_check * sizeof(struct fo_flush_entry_check));
if (checks == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "couldn't allocate flush ops test check array";
}
@@ -4716,9 +4717,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 0,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -4726,26 +4727,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[1] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 1,
/* entry_type = */ 0,
/* entry_index = */ 1,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -4753,32 +4754,32 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 1,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__DIRTY, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 0,
/* expected_size = */ (size_t)0,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -4810,9 +4811,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 0,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -4820,26 +4821,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[1] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 1,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -4847,32 +4848,32 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 1,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr*/
- {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 0,
/* expected_size = */ (size_t)0,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -4901,9 +4902,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 0,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ TRUE,
+ /* resize_flag = */ true,
/* new_size = */ VARIABLE_ENTRY_SIZE / 4,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -4911,32 +4912,32 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 1,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr:*/
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 0,
/* expected_size = */ (size_t)0,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -4967,9 +4968,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 0,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ TRUE,
+ /* resize_flag = */ true,
/* new_size = */ VARIABLE_ENTRY_SIZE / 4,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -4977,32 +4978,32 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 1,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 0,
/* expected_size = */ (size_t)0,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5040,9 +5041,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 0,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -5050,32 +5051,32 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 2,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 0,
/* expected_size = */ (size_t)0,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5094,7 +5095,7 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
*/
if (pass) {
- spec[0].flush_ops[1].flag = TRUE;
+ spec[0].flush_ops[1].flag = true;
test_num = 6;
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
@@ -5137,9 +5138,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 0,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -5147,32 +5148,32 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 2,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 0,
/* expected_size = */ (size_t)0,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5196,8 +5197,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
flush_flags = H5C__FLUSH_INVALIDATE_FLAG;
expected_index_len = 0;
expected_index_size = 0;
- spec[0].flush_ops[1].flag = TRUE;
- spec[0].expected_destroyed = TRUE;
+ spec[0].flush_ops[1].flag = true;
+ spec[0].expected_destroyed = true;
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5230,9 +5231,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 0,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ TRUE,
+ /* resize_flag = */ true,
/* new_size = */ VARIABLE_ENTRY_SIZE / 2,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -5240,32 +5241,32 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 2,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 0,
/* expected_size = */ (size_t)0,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5284,7 +5285,7 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
*/
if (pass) {
- spec[0].flush_ops[1].flag = TRUE;
+ spec[0].flush_ops[1].flag = true;
test_num = 10;
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
@@ -5321,9 +5322,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 0,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ TRUE,
+ /* resize_flag = */ true,
/* new_size = */ VARIABLE_ENTRY_SIZE / 2,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -5331,32 +5332,32 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 2,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 0,
/* expected_size = */ (size_t)0,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5379,8 +5380,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
flush_flags = H5C__FLUSH_INVALIDATE_FLAG;
expected_index_len = 0;
expected_index_size = 0;
- spec[0].flush_ops[1].flag = TRUE;
- spec[0].expected_destroyed = TRUE;
+ spec[0].flush_ops[1].flag = true;
+ spec[0].expected_destroyed = true;
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5414,9 +5415,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 1,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -5424,44 +5425,44 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 2,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, 0, 2, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__DIRTY, 0, 0, false, 0, NULL},
+ {FLUSH_OP__DIRTY, 0, 2, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 0,
/* expected_size = */ PICO_ENTRY_SIZE,
- /* in_cache = */ TRUE,
- /* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ true,
+ /* at_main_addr = */ true,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[1] = (struct fo_flush_entry_check){/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 2,
/* expected_size = */ PICO_ENTRY_SIZE,
- /* in_cache = */ TRUE,
- /* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ true,
+ /* at_main_addr = */ true,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5496,9 +5497,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 1,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -5506,44 +5507,44 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 2,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, 0, 2, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__DIRTY, 0, 0, false, 0, NULL},
+ {FLUSH_OP__DIRTY, 0, 2, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 0,
/* expected_size = */ PICO_ENTRY_SIZE,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ true,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
checks[1] = (struct fo_flush_entry_check){/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 2,
/* expected_size = */ PICO_ENTRY_SIZE,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ true,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5576,9 +5577,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 1,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -5586,44 +5587,44 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 4,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 0,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 4,
- /* in_cache = */ TRUE,
- /* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ true,
+ /* at_main_addr = */ true,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[1] = (struct fo_flush_entry_check){/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 2,
- /* in_cache = */ TRUE,
- /* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ true,
+ /* at_main_addr = */ true,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5657,9 +5658,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 1,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -5667,44 +5668,44 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 4,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 0,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 4,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ true,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
checks[1] = (struct fo_flush_entry_check){/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 2,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ true,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5737,9 +5738,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 1,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -5747,44 +5748,44 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 6,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 0,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 4,
- /* in_cache = */ TRUE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ true,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[1] = (struct fo_flush_entry_check){/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 2,
- /* in_cache = */ TRUE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ true,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5801,10 +5802,10 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
if (pass) {
test_num = 18;
- spec[0].flush_ops[2].flag = TRUE;
- spec[0].flush_ops[5].flag = TRUE;
- checks[0].at_main_addr = TRUE;
- checks[1].at_main_addr = TRUE;
+ spec[0].flush_ops[2].flag = true;
+ spec[0].flush_ops[5].flag = true;
+ checks[0].at_main_addr = true;
+ checks[1].at_main_addr = true;
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5841,9 +5842,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 1,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -5851,44 +5852,44 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 6,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 0,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 4,
- /* in_cache = */ TRUE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ true,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[1] = (struct fo_flush_entry_check){/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 2,
- /* in_cache = */ TRUE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ true,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5908,15 +5909,15 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
flush_flags = H5C__FLUSH_INVALIDATE_FLAG;
expected_index_len = 0;
expected_index_size = (size_t)0;
- spec[0].expected_destroyed = TRUE;
- spec[0].flush_ops[2].flag = TRUE;
- spec[0].flush_ops[5].flag = TRUE;
- checks[0].at_main_addr = TRUE;
- checks[0].in_cache = FALSE;
- checks[0].expected_destroyed = TRUE;
- checks[1].at_main_addr = TRUE;
- checks[1].in_cache = FALSE;
- checks[1].expected_destroyed = TRUE;
+ spec[0].expected_destroyed = true;
+ spec[0].flush_ops[2].flag = true;
+ spec[0].flush_ops[5].flag = true;
+ checks[0].at_main_addr = true;
+ checks[0].in_cache = false;
+ checks[0].expected_destroyed = true;
+ checks[1].at_main_addr = true;
+ checks[1].in_cache = false;
+ checks[1].expected_destroyed = true;
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5956,9 +5957,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 1,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -5966,26 +5967,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 6,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[1] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 11,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -5993,26 +5994,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 6,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 10, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 10, FALSE, 0, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 10, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 12, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 12, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 12, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 10, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 10, false, 0, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 10, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 12, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 12, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 12, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false};
spec[2] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 2,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 0,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -6020,26 +6021,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[3] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 3,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 1,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -6047,68 +6048,68 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 0,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 4,
- /* in_cache = */ TRUE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ TRUE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ true,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ true,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false};
checks[1] = (struct fo_flush_entry_check){/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 2,
- /* in_cache = */ TRUE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ TRUE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ true,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ true,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false};
checks[2] = (struct fo_flush_entry_check){/* entry_num = */ 2,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 10,
/* expected_size = */ VARIABLE_ENTRY_SIZE,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ true,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false};
checks[3] = (struct fo_flush_entry_check){/* entry_num = */ 3,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 12,
/* expected_size = */ VARIABLE_ENTRY_SIZE,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ true,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -6144,9 +6145,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 1,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -6154,26 +6155,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 6,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[1] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 11,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -6181,26 +6182,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 6,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 10, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 10, FALSE, 0, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 10, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 12, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 12, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 12, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 10, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 10, false, 0, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 10, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 12, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 12, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 12, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[2] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 2,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 0,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -6208,26 +6209,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[3] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 3,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 1,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -6235,26 +6236,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false};
spec[4] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 4,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 10,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -6262,26 +6263,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 1,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[5] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 5,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 20,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -6289,68 +6290,68 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 1,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 0,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 4,
- /* in_cache = */ TRUE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ true,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[1] = (struct fo_flush_entry_check){/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 2,
- /* in_cache = */ TRUE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ true,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[2] = (struct fo_flush_entry_check){/* entry_num = */ 2,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 10,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 4,
- /* in_cache = */ TRUE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ true,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[3] = (struct fo_flush_entry_check){/* entry_num = */ 3,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 12,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 2,
- /* in_cache = */ TRUE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ true,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -6387,9 +6388,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 1,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -6397,26 +6398,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 6,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[1] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 11,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -6424,26 +6425,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 6,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 10, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 10, FALSE, 0, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 10, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 12, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 12, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 12, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 10, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 10, false, 0, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 10, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 12, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 12, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 12, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[2] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 2,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 0,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -6451,26 +6452,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[3] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 3,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 1,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -6478,26 +6479,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true};
spec[4] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 4,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 10,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -6505,26 +6506,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 1,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[5] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 5,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 20,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -6532,68 +6533,68 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 1,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 0,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 4,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
checks[1] = (struct fo_flush_entry_check){/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 2,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
checks[2] = (struct fo_flush_entry_check){/* entry_num = */ 2,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 10,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 4,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
checks[3] = (struct fo_flush_entry_check){/* entry_num = */ 3,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 12,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 2,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -6626,9 +6627,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -6636,26 +6637,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[1] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 50,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 1,
/* pin_type = */ {PICO_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
@@ -6663,26 +6664,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 1,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 100, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 100, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[2] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 2,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 150,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 1,
/* pin_type = */ {PICO_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
@@ -6690,32 +6691,32 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 1,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 100, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 100, false, 0, NULL},
+ {FLUSH_OP__DIRTY, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 0,
/* expected_size = */ (size_t)0,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -6745,9 +6746,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -6755,26 +6756,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[1] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 50,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 1,
/* pin_type = */ {PICO_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
@@ -6782,26 +6783,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 1,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 100, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 100, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[2] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 2,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 150,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 1,
/* pin_type = */ {PICO_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
@@ -6809,32 +6810,32 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 1,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 100, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 100, false, 0, NULL},
+ {FLUSH_OP__DIRTY, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 0,
/* expected_size = */ (size_t)0,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -6934,9 +6935,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 200,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -6944,26 +6945,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[1] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -6971,26 +6972,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[2] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 2,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2300,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -6998,26 +6999,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[3] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 3,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 1000,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -7025,26 +7026,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 4,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 200, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 300, FALSE, 0, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 300, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 200, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 300, false, 0, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 300, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[4] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 4,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2000,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -7052,26 +7053,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 3,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2100, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2200, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2300, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2100, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2200, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2300, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[5] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 5,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 350,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 2,
/* pin_type = */ {VARIABLE_ENTRY_TYPE, VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0},
@@ -7079,26 +7080,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 3,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 350, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 350, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[6] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 6,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 450,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 2,
/* pin_type = */ {VARIABLE_ENTRY_TYPE, VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0},
@@ -7106,26 +7107,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 3,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 450, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 450, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[7] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 7,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 650,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 2,
/* pin_type = */ {VARIABLE_ENTRY_TYPE, VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0},
@@ -7133,26 +7134,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 3,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 650, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 650, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[8] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 8,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 750,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 2,
/* pin_type = */ {VARIABLE_ENTRY_TYPE, VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0},
@@ -7160,26 +7161,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 3,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 750, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 750, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[9] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 9,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 500,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -7187,56 +7188,56 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 4,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 350, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 450, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 650, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 750, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 350, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 450, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 650, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 750, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 100,
/* expected_size = */ VARIABLE_ENTRY_SIZE,
- /* in_cache = */ TRUE,
- /* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ true,
+ /* at_main_addr = */ true,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[1] = (struct fo_flush_entry_check){/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 300,
/* expected_size = */ VARIABLE_ENTRY_SIZE,
- /* in_cache = */ TRUE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ true,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[2] = (struct fo_flush_entry_check){/* entry_num = */ 2,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2200,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 2,
- /* in_cache = */ TRUE,
- /* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ true,
+ /* at_main_addr = */ true,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -7342,9 +7343,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 200,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -7352,26 +7353,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[1] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -7379,26 +7380,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[2] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 2,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2300,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -7406,26 +7407,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[3] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 3,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 1000,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -7433,26 +7434,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 4,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 200, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 300, FALSE, 0, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 300, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 200, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 300, false, 0, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 300, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[4] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 4,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2000,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -7460,26 +7461,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 3,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2100, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2200, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2300, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2100, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2200, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2300, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[5] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 5,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 350,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 2,
/* pin_type = */ {VARIABLE_ENTRY_TYPE, VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0},
@@ -7487,26 +7488,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 3,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 350, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 350, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[6] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 6,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 450,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 2,
/* pin_type = */ {VARIABLE_ENTRY_TYPE, VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0},
@@ -7514,26 +7515,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 3,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 450, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 450, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[7] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 7,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 650,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 2,
/* pin_type = */ {VARIABLE_ENTRY_TYPE, VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0},
@@ -7541,26 +7542,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 3,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 650, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 650, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[8] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 8,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 750,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 2,
/* pin_type = */ {VARIABLE_ENTRY_TYPE, VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0},
@@ -7568,26 +7569,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 3,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 750, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 750, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[9] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 9,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 500,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -7595,56 +7596,56 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 4,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 350, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 450, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 650, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 750, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 350, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 450, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 650, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 750, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 100,
/* expected_size = */ VARIABLE_ENTRY_SIZE,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ true,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
checks[1] = (struct fo_flush_entry_check){/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 300,
/* expected_size = */ VARIABLE_ENTRY_SIZE,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
checks[2] = (struct fo_flush_entry_check){/* entry_num = */ 2,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2200,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 2,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ true,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -7675,9 +7676,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -7685,26 +7686,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[1] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 200,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ TRUE,
+ /* resize_flag = */ true,
/* new_size = */ VARIABLE_ENTRY_SIZE / 2,
/* num_pins = */ 1,
/* pin_type = */ {VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
@@ -7712,26 +7713,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 3,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 200, FALSE, VARIABLE_ENTRY_SIZE, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 200, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 200, false, VARIABLE_ENTRY_SIZE, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 200, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[2] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 2,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 300,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ TRUE,
+ /* resize_flag = */ true,
/* new_size = */ VARIABLE_ENTRY_SIZE / 4,
/* num_pins = */ 1,
/* pin_type = */ {VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
@@ -7739,26 +7740,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 3,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 400, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 300, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 300, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 400, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 300, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 300, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[3] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 3,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 400,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -7766,26 +7767,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[4] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 4,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 500,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ TRUE,
+ /* resize_flag = */ true,
/* new_size = */ VARIABLE_ENTRY_SIZE / 4,
/* num_pins = */ 1,
/* pin_type = */ {VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
@@ -7793,32 +7794,32 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 3,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 500, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 500, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 500, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 500, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 0,
/* expected_size = */ 0,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -7851,9 +7852,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -7861,26 +7862,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[1] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 200,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ TRUE,
+ /* resize_flag = */ true,
/* new_size = */ VARIABLE_ENTRY_SIZE / 2,
/* num_pins = */ 1,
/* pin_type = */ {VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
@@ -7888,26 +7889,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 3,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 200, FALSE, VARIABLE_ENTRY_SIZE, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 200, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 200, false, VARIABLE_ENTRY_SIZE, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 200, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[2] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 2,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 300,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ TRUE,
+ /* resize_flag = */ true,
/* new_size = */ VARIABLE_ENTRY_SIZE / 4,
/* num_pins = */ 1,
/* pin_type = */ {VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
@@ -7915,26 +7916,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 3,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 400, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 300, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 300, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 400, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 300, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 300, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[3] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 3,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 400,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -7942,26 +7943,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[4] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 4,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 500,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ TRUE,
+ /* resize_flag = */ true,
/* new_size = */ VARIABLE_ENTRY_SIZE / 4,
/* num_pins = */ 1,
/* pin_type = */ {VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
@@ -7969,32 +7970,32 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 3,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 500, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 500, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 500, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 500, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 0,
/* expected_size = */ 0,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -8038,21 +8039,21 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
if (cache_ptr == NULL) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "cache_ptr NULL on entry to flush op test #%d.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "cache_ptr NULL on entry to flush op test #%d.", test_num);
failure_mssg = msg;
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
- pass = FALSE;
+ pass = false;
- HDsnprintf(msg, (size_t)128, "cache not empty at beginning of flush op test #%d.", test_num);
+ snprintf(msg, (size_t)128, "cache not empty at beginning of flush op test #%d.", test_num);
failure_mssg = msg;
}
else if ((spec_size < 1) || (spec == NULL)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "missing/bad test spec on entry to flush op test #%d.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "missing/bad test spec on entry to flush op test #%d.", test_num);
failure_mssg = msg;
}
@@ -8065,8 +8066,8 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
(spec[i].num_pins > MAX_PINS) || (spec[i].num_flush_ops < 0) ||
(spec[i].num_flush_ops > MAX_FLUSH_OPS)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "bad data in spec[%d] on entry to flush op test #%d.", i, test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "bad data in spec[%d] on entry to flush op test #%d.", i, test_num);
failure_mssg = msg;
}
i++;
@@ -8080,8 +8081,8 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
(check[i].entry_index > max_indices[check[i].entry_type]) ||
(check[i].expected_size <= (size_t)0)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "bad data in check[%d] on entry to flush op test #%d.", i, test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "bad data in check[%d] on entry to flush op test #%d.", i, test_num);
failure_mssg = msg;
}
i++;
@@ -8099,7 +8100,7 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
protect_entry(file_ptr, spec[i].entry_type, spec[i].entry_index);
if (spec[i].resize_flag)
- resize_entry(file_ptr, spec[i].entry_type, spec[i].entry_index, spec[i].new_size, TRUE);
+ resize_entry(file_ptr, spec[i].entry_type, spec[i].entry_index, spec[i].new_size, true);
unprotect_entry(file_ptr, spec[i].entry_type, spec[i].entry_index, spec[i].flags);
}
@@ -8124,9 +8125,9 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
if ((cache_ptr->index_len != init_expected_index_len) ||
(cache_ptr->index_size != init_expected_index_size)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache len/size before flush in flush op test #%d.",
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache len/size before flush in flush op test #%d.",
+ test_num);
failure_mssg = msg;
}
}
@@ -8137,9 +8138,9 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
if (!pass) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "flush with flags 0x%x failed in flush op test #%d.", flush_flags,
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "flush with flags 0x%x failed in flush op test #%d.", flush_flags,
+ test_num);
failure_mssg = msg;
}
}
@@ -8154,8 +8155,8 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
(entry_ptr->serialized != spec[i].expected_serialized) ||
(entry_ptr->destroyed != spec[i].expected_destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Bad status on entry %d after flush op test #%d.", i, test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Bad status on entry %d after flush op test #%d.", i, test_num);
failure_mssg = msg;
}
i++;
@@ -8168,9 +8169,8 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
if (check[i].in_cache != entry_in_cache(cache_ptr, check[i].entry_type, check[i].entry_index)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Check1 failed on entry %d after flush op test #%d.", i,
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Check1 failed on entry %d after flush op test #%d.", i, test_num);
failure_mssg = msg;
}
@@ -8191,9 +8191,8 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
(entry_ptr->serialized != check[i].expected_serialized) ||
(entry_ptr->destroyed != check[i].expected_destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Check2 failed on entry %d after flush op test #%d.", i,
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Check2 failed on entry %d after flush op test #%d.", i, test_num);
failure_mssg = msg;
}
i++;
@@ -8208,9 +8207,9 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
(((flush_flags & H5C__FLUSH_INVALIDATE_FLAG) != 0) &&
((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache len/size after flush in flush op test #%d.",
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache len/size after flush in flush op test #%d.",
+ test_num);
failure_mssg = msg;
}
}
@@ -8222,15 +8221,15 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
if (!pass) {
- HDsnprintf(msg, (size_t)128, "Flush failed on cleanup in flush op test #%d.", test_num);
+ snprintf(msg, (size_t)128, "Flush failed on cleanup in flush op test #%d.", test_num);
failure_mssg = msg;
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0) ||
(cache_ptr->clean_index_size != 0) || (cache_ptr->dirty_index_size != 0)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128,
- "Unexpected cache len/size/cs/ds after cleanup in flush op test #%d.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache len/size/cs/ds after cleanup in flush op test #%d.",
+ test_num);
failure_mssg = msg;
}
}
@@ -8243,9 +8242,9 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
entry_ptr->size = entry_sizes[spec[i].entry_type];
- entry_ptr->deserialized = FALSE;
- entry_ptr->serialized = FALSE;
- entry_ptr->destroyed = FALSE;
+ entry_ptr->deserialized = false;
+ entry_ptr->serialized = false;
+ entry_ptr->destroyed = false;
i++;
}
@@ -8258,9 +8257,9 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
entry_ptr->size = entry_sizes[check[i].entry_type];
- entry_ptr->deserialized = FALSE;
- entry_ptr->serialized = FALSE;
- entry_ptr->destroyed = FALSE;
+ entry_ptr->deserialized = false;
+ entry_ptr->serialized = false;
+ entry_ptr->destroyed = false;
i++;
}
@@ -8273,7 +8272,7 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
* Purpose: Verify that flush operations work as expected when an
* entry is evicted.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -8296,7 +8295,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
expected = malloc((size_t)num_total_entries * sizeof(struct expected_entry_status));
if (expected == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "couldn't allocate expected entry status array\n";
}
@@ -8310,14 +8309,14 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
expected[i].entry_type = VARIABLE_ENTRY_TYPE;
expected[i].entry_index = (int)(i);
expected[i].size = VARIABLE_ENTRY_SIZE;
- expected[i].in_cache = TRUE;
- expected[i].at_main_addr = TRUE;
- expected[i].is_dirty = TRUE;
- expected[i].is_protected = FALSE;
- expected[i].is_pinned = FALSE;
- expected[i].deserialized = TRUE;
- expected[i].serialized = FALSE;
- expected[i].destroyed = FALSE;
+ expected[i].in_cache = true;
+ expected[i].at_main_addr = true;
+ expected[i].is_dirty = true;
+ expected[i].is_protected = false;
+ expected[i].is_pinned = false;
+ expected[i].deserialized = true;
+ expected[i].serialized = false;
+ expected[i].destroyed = false;
memset(expected[i].flush_dep_par_type, 0, sizeof(expected[i].flush_dep_par_type));
memset(expected[i].flush_dep_par_idx, 0, sizeof(expected[i].flush_dep_par_idx));
@@ -8326,20 +8325,20 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
expected[i].flush_dep_nchd = 0;
expected[i].flush_dep_ndirty_chd = 0;
expected[i].flush_order = -1;
- expected[i].is_corked = FALSE;
+ expected[i].is_corked = false;
}
/* NOTE: special cases for particular variable entries */
expected[0].size = VARIABLE_ENTRY_SIZE / 4;
- expected[0].is_pinned = TRUE;
+ expected[0].is_pinned = true;
expected[1].size = VARIABLE_ENTRY_SIZE / 4;
- expected[2].is_dirty = FALSE;
+ expected[2].is_dirty = false;
expected[3].size = VARIABLE_ENTRY_SIZE / 4;
- expected[4].is_dirty = FALSE;
+ expected[4].is_dirty = false;
expected[5].size = VARIABLE_ENTRY_SIZE / 4;
@@ -8347,23 +8346,23 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
expected[7].size = VARIABLE_ENTRY_SIZE / 2;
- expected[8].is_dirty = FALSE;
+ expected[8].is_dirty = false;
- expected[9].is_dirty = FALSE;
- expected[9].is_pinned = TRUE;
+ expected[9].is_dirty = false;
+ expected[9].is_pinned = true;
for (; i < num_variable_entries + num_monster_entries; i++) {
expected[i].entry_type = MONSTER_ENTRY_TYPE;
expected[i].entry_index = (int)(i - num_variable_entries);
expected[i].size = MONSTER_ENTRY_SIZE;
- expected[i].in_cache = TRUE;
- expected[i].at_main_addr = TRUE;
- expected[i].is_dirty = TRUE;
- expected[i].is_protected = FALSE;
- expected[i].is_pinned = FALSE;
- expected[i].deserialized = TRUE;
- expected[i].serialized = FALSE;
- expected[i].destroyed = FALSE;
+ expected[i].in_cache = true;
+ expected[i].at_main_addr = true;
+ expected[i].is_dirty = true;
+ expected[i].is_protected = false;
+ expected[i].is_pinned = false;
+ expected[i].deserialized = true;
+ expected[i].serialized = false;
+ expected[i].destroyed = false;
memset(expected[i].flush_dep_par_type, 0, sizeof(expected[i].flush_dep_par_type));
memset(expected[i].flush_dep_par_idx, 0, sizeof(expected[i].flush_dep_par_idx));
@@ -8372,21 +8371,21 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
expected[i].flush_dep_nchd = 0;
expected[i].flush_dep_ndirty_chd = 0;
expected[i].flush_order = -1;
- expected[i].is_corked = FALSE;
+ expected[i].is_corked = false;
}
for (; i < num_total_entries; i++) {
expected[i].entry_type = LARGE_ENTRY_TYPE;
expected[i].entry_index = (int)(i - num_monster_entries - num_variable_entries);
expected[i].size = LARGE_ENTRY_SIZE;
- expected[i].in_cache = TRUE;
- expected[i].at_main_addr = TRUE;
- expected[i].is_dirty = TRUE;
- expected[i].is_protected = FALSE;
- expected[i].is_pinned = FALSE;
- expected[i].deserialized = TRUE;
- expected[i].serialized = FALSE;
- expected[i].destroyed = FALSE;
+ expected[i].in_cache = true;
+ expected[i].at_main_addr = true;
+ expected[i].is_dirty = true;
+ expected[i].is_protected = false;
+ expected[i].is_pinned = false;
+ expected[i].deserialized = true;
+ expected[i].serialized = false;
+ expected[i].destroyed = false;
memset(expected[i].flush_dep_par_type, 0, sizeof(expected[i].flush_dep_par_type));
memset(expected[i].flush_dep_par_idx, 0, sizeof(expected[i].flush_dep_par_idx));
@@ -8395,30 +8394,30 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
expected[i].flush_dep_nchd = 0;
expected[i].flush_dep_ndirty_chd = 0;
expected[i].flush_order = -1;
- expected[i].is_corked = FALSE;
+ expected[i].is_corked = false;
}
assert(i == num_total_entries);
- pass = TRUE;
+ pass = true;
}
if (pass) {
if (cache_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache_ptr NULL on entry to flush ops test.";
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache not empty at start of flush ops eviction test.";
}
else if ((cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected cache config at start of flush op eviction test.";
}
else {
@@ -8453,33 +8452,33 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
*/
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 0);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 0, (VARIABLE_ENTRY_SIZE / 4), TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 0, (VARIABLE_ENTRY_SIZE / 4), true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 0, H5C__DIRTIED_FLAG);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 1);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 1, (VARIABLE_ENTRY_SIZE / 4), TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 1, (VARIABLE_ENTRY_SIZE / 4), true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 1, H5C__DIRTIED_FLAG);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 2);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 2, H5C__NO_FLAGS_SET);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 3);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 3, (VARIABLE_ENTRY_SIZE / 4), TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 3, (VARIABLE_ENTRY_SIZE / 4), true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 3, H5C__DIRTIED_FLAG);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 4);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 4, H5C__NO_FLAGS_SET);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 5);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 5, (VARIABLE_ENTRY_SIZE / 4), TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 5, (VARIABLE_ENTRY_SIZE / 4), true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 5, H5C__DIRTIED_FLAG);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 6);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 6, (VARIABLE_ENTRY_SIZE / 2), TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 6, (VARIABLE_ENTRY_SIZE / 2), true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 6, H5C__DIRTIED_FLAG);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 7);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 7, (VARIABLE_ENTRY_SIZE / 2), TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 7, (VARIABLE_ENTRY_SIZE / 2), true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 7, H5C__DIRTIED_FLAG);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 8);
@@ -8492,7 +8491,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
(cache_ptr->index_size !=
(4 * (VARIABLE_ENTRY_SIZE / 4)) + (2 * (VARIABLE_ENTRY_SIZE / 2)) + (4 * VARIABLE_ENTRY_SIZE))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected size/len in flush op eviction test 1.";
}
}
@@ -8526,22 +8525,22 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
*
* (VET, 9) dirties (VET, 8)
*/
- add_flush_op(VARIABLE_ENTRY_TYPE, 1, FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, (size_t)0, NULL);
- add_flush_op(VARIABLE_ENTRY_TYPE, 1, FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, TRUE,
+ add_flush_op(VARIABLE_ENTRY_TYPE, 1, FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, false, (size_t)0, NULL);
+ add_flush_op(VARIABLE_ENTRY_TYPE, 1, FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, true,
3 * VARIABLE_ENTRY_SIZE / 4, NULL);
- add_flush_op(VARIABLE_ENTRY_TYPE, 3, FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, (size_t)0, NULL);
- add_flush_op(VARIABLE_ENTRY_TYPE, 3, FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, TRUE,
+ add_flush_op(VARIABLE_ENTRY_TYPE, 3, FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, false, (size_t)0, NULL);
+ add_flush_op(VARIABLE_ENTRY_TYPE, 3, FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, true,
VARIABLE_ENTRY_SIZE, NULL);
- add_flush_op(VARIABLE_ENTRY_TYPE, 3, FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, (size_t)0, NULL);
+ add_flush_op(VARIABLE_ENTRY_TYPE, 3, FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, false, (size_t)0, NULL);
- add_flush_op(VARIABLE_ENTRY_TYPE, 5, FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, (size_t)0, NULL);
- add_flush_op(VARIABLE_ENTRY_TYPE, 5, FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 5, TRUE,
+ add_flush_op(VARIABLE_ENTRY_TYPE, 5, FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, false, (size_t)0, NULL);
+ add_flush_op(VARIABLE_ENTRY_TYPE, 5, FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 5, true,
VARIABLE_ENTRY_SIZE / 2, NULL);
- add_flush_op(VARIABLE_ENTRY_TYPE, 7, FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 9, FALSE, (size_t)0, NULL);
+ add_flush_op(VARIABLE_ENTRY_TYPE, 7, FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 9, false, (size_t)0, NULL);
- add_flush_op(VARIABLE_ENTRY_TYPE, 9, FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 8, FALSE, (size_t)0, NULL);
+ add_flush_op(VARIABLE_ENTRY_TYPE, 9, FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 8, false, (size_t)0, NULL);
}
if (pass) {
@@ -8600,7 +8599,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
((4 * VARIABLE_ENTRY_SIZE / 4) + (2 * VARIABLE_ENTRY_SIZE / 2) + (4 * VARIABLE_ENTRY_SIZE) +
(31 * MONSTER_ENTRY_SIZE) + (1 * LARGE_ENTRY_SIZE)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected size/len in flush op eviction test 2.";
}
else {
@@ -8650,10 +8649,10 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
* Start by updating the expected table for the expected changes in entry status:
*/
expected[0].size = 3 * VARIABLE_ENTRY_SIZE / 4;
- expected[1].is_dirty = FALSE;
- expected[1].serialized = TRUE;
- expected[2].in_cache = FALSE;
- expected[2].destroyed = TRUE;
+ expected[1].is_dirty = false;
+ expected[1].serialized = true;
+ expected[2].in_cache = false;
+ expected[2].destroyed = true;
num_large_entries = 2;
@@ -8666,7 +8665,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
(cache_ptr->index_size != ((1 * (3 * VARIABLE_ENTRY_SIZE / 4)) + (3 * VARIABLE_ENTRY_SIZE / 4) +
(2 * VARIABLE_ENTRY_SIZE / 2) + (3 * VARIABLE_ENTRY_SIZE) +
(31 * MONSTER_ENTRY_SIZE) + (2 * LARGE_ENTRY_SIZE)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected size/len in flush op eviction test 3.";
}
@@ -8712,11 +8711,11 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
* Start by updating the expected table for the expected changes in entry status:
*/
expected[0].size = VARIABLE_ENTRY_SIZE;
- expected[0].at_main_addr = FALSE;
- expected[3].is_dirty = FALSE;
- expected[3].serialized = TRUE;
- expected[4].in_cache = FALSE;
- expected[4].destroyed = TRUE;
+ expected[0].at_main_addr = false;
+ expected[3].is_dirty = false;
+ expected[3].serialized = true;
+ expected[4].in_cache = false;
+ expected[4].destroyed = true;
num_large_entries = 3;
@@ -8730,7 +8729,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
((3 * VARIABLE_ENTRY_SIZE / 4) + (2 * VARIABLE_ENTRY_SIZE / 2) + (3 * VARIABLE_ENTRY_SIZE) +
(31 * MONSTER_ENTRY_SIZE) + (3 * LARGE_ENTRY_SIZE)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected size/len in flush op eviction test 4.";
}
@@ -8780,15 +8779,15 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
*/
expected[5].size = VARIABLE_ENTRY_SIZE / 2;
- expected[5].is_dirty = FALSE;
- expected[5].serialized = TRUE;
- expected[6].is_dirty = FALSE;
- expected[6].serialized = TRUE;
- expected[7].is_dirty = FALSE;
- expected[7].serialized = TRUE;
- expected[8].in_cache = FALSE;
- expected[8].destroyed = TRUE;
- expected[9].is_dirty = TRUE;
+ expected[5].is_dirty = false;
+ expected[5].serialized = true;
+ expected[6].is_dirty = false;
+ expected[6].serialized = true;
+ expected[7].is_dirty = false;
+ expected[7].serialized = true;
+ expected[8].in_cache = false;
+ expected[8].destroyed = true;
+ expected[9].is_dirty = true;
num_large_entries = 5;
@@ -8807,7 +8806,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
((2 * VARIABLE_ENTRY_SIZE / 4) + (3 * VARIABLE_ENTRY_SIZE / 2) + (2 * VARIABLE_ENTRY_SIZE) +
(31 * MONSTER_ENTRY_SIZE) + (5 * LARGE_ENTRY_SIZE)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected size/len in flush op eviction test 5.";
}
@@ -8844,7 +8843,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
((2 * VARIABLE_ENTRY_SIZE / 4) + (3 * VARIABLE_ENTRY_SIZE / 2) + (2 * VARIABLE_ENTRY_SIZE) +
(31 * MONSTER_ENTRY_SIZE) + (5 * LARGE_ENTRY_SIZE)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected size/len in flush op eviction test 6.";
}
@@ -8888,13 +8887,13 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
* Start by updating the expected table for the expected changes in entry status:
*/
- expected[0].is_pinned = FALSE;
- expected[1].in_cache = FALSE;
- expected[1].destroyed = TRUE;
- expected[3].in_cache = FALSE;
- expected[3].destroyed = TRUE;
- expected[5].in_cache = FALSE;
- expected[5].destroyed = TRUE;
+ expected[0].is_pinned = false;
+ expected[1].in_cache = false;
+ expected[1].destroyed = true;
+ expected[3].in_cache = false;
+ expected[3].destroyed = true;
+ expected[5].in_cache = false;
+ expected[5].destroyed = true;
num_large_entries = 8;
@@ -8911,7 +8910,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
(cache_ptr->index_size != ((2 * VARIABLE_ENTRY_SIZE / 2) + (2 * VARIABLE_ENTRY_SIZE) +
(31 * MONSTER_ENTRY_SIZE) + (8 * LARGE_ENTRY_SIZE)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected size/len in flush op eviction test 7.";
}
@@ -8953,8 +8952,8 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
* Start by updating the expected table for the expected changes in entry status:
*/
- expected[6].in_cache = FALSE;
- expected[6].destroyed = TRUE;
+ expected[6].in_cache = false;
+ expected[6].destroyed = true;
num_large_entries = 9;
@@ -8970,7 +8969,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
(cache_ptr->index_size != ((1 * VARIABLE_ENTRY_SIZE / 2) + (2 * VARIABLE_ENTRY_SIZE) +
(31 * MONSTER_ENTRY_SIZE) + (9 * LARGE_ENTRY_SIZE)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected size/len in flush op eviction test 8.";
}
@@ -9014,9 +9013,9 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
* Start by updating the expected table for the expected changes in entry status:
*/
- expected[7].in_cache = FALSE;
- expected[7].destroyed = TRUE;
- expected[9].is_pinned = FALSE;
+ expected[7].in_cache = false;
+ expected[7].destroyed = true;
+ expected[9].is_pinned = false;
num_large_entries = 10;
@@ -9032,7 +9031,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
(cache_ptr->index_size !=
((2 * VARIABLE_ENTRY_SIZE) + (31 * MONSTER_ENTRY_SIZE) + (10 * LARGE_ENTRY_SIZE)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected size/len in flush op eviction test 9.";
}
@@ -9067,7 +9066,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
(cache_ptr->index_size !=
((2 * VARIABLE_ENTRY_SIZE) + (31 * MONSTER_ENTRY_SIZE) + (10 * LARGE_ENTRY_SIZE)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected size/len in flush op eviction test 10.";
}
@@ -9175,35 +9174,35 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
*/
base_addr = entries[VARIABLE_ENTRY_TYPE];
entry_ptr = &(base_addr[8]);
- entry_ptr->deserialized = FALSE;
- entry_ptr->deserialized = FALSE;
- entry_ptr->destroyed = FALSE;
-
- expected[0].in_cache = FALSE;
- expected[0].is_dirty = FALSE;
- expected[0].serialized = TRUE;
- expected[0].destroyed = TRUE;
- expected[8].in_cache = TRUE;
- expected[8].is_dirty = FALSE;
- expected[8].deserialized = TRUE;
- expected[8].serialized = TRUE;
- expected[8].destroyed = FALSE;
- expected[9].in_cache = FALSE;
- expected[9].is_dirty = FALSE;
- expected[9].serialized = TRUE;
- expected[9].destroyed = TRUE;
-
- expected[10].in_cache = TRUE;
- expected[10].is_dirty = FALSE;
- expected[10].serialized = TRUE;
- expected[10].destroyed = FALSE;
+ entry_ptr->deserialized = false;
+ entry_ptr->deserialized = false;
+ entry_ptr->destroyed = false;
+
+ expected[0].in_cache = false;
+ expected[0].is_dirty = false;
+ expected[0].serialized = true;
+ expected[0].destroyed = true;
+ expected[8].in_cache = true;
+ expected[8].is_dirty = false;
+ expected[8].deserialized = true;
+ expected[8].serialized = true;
+ expected[8].destroyed = false;
+ expected[9].in_cache = false;
+ expected[9].is_dirty = false;
+ expected[9].serialized = true;
+ expected[9].destroyed = true;
+
+ expected[10].in_cache = true;
+ expected[10].is_dirty = false;
+ expected[10].serialized = true;
+ expected[10].destroyed = false;
num_large_entries = 12;
for (i = num_variable_entries; i < num_variable_entries + num_monster_entries + num_large_entries - 1;
i++) {
- expected[i].is_dirty = FALSE;
- expected[i].serialized = TRUE;
+ expected[i].is_dirty = false;
+ expected[i].serialized = true;
}
for (i = 10; i < 12; i++) {
@@ -9217,7 +9216,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
(cache_ptr->index_size !=
((1 * VARIABLE_ENTRY_SIZE) + (31 * MONSTER_ENTRY_SIZE) + (12 * LARGE_ENTRY_SIZE)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected size/len in flush op eviction test 11.";
}
@@ -9238,7 +9237,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
*/
base_addr = entries[VARIABLE_ENTRY_TYPE];
entry_ptr = &(base_addr[8]);
- entry_ptr->serialized = FALSE;
+ entry_ptr->serialized = false;
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 8);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 8, H5C__DIRTIED_FLAG);
@@ -9256,7 +9255,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
*/
base_addr = entries[MONSTER_ENTRY_TYPE];
entry_ptr = &(base_addr[0]);
- entry_ptr->destroyed = FALSE;
+ entry_ptr->destroyed = false;
for (i = 1; i < num_monster_entries; i++) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -9281,25 +9280,25 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
/* update the expected array to mark all these entries dirty again. */
for (i = num_variable_entries; i < num_variable_entries + num_monster_entries + num_large_entries - 1;
i++) {
- expected[i].is_dirty = TRUE;
+ expected[i].is_dirty = true;
}
/* update MET 0 to set its in cache flag, and reset
* its destroyed flag
*/
- expected[10].in_cache = TRUE;
+ expected[10].in_cache = true;
/* pass through non variable entries will flush VET 8, and evict VET 9.
* Update accordingly.
*/
- expected[8].in_cache = TRUE;
- expected[8].is_dirty = TRUE;
- expected[8].serialized = FALSE;
- expected[8].destroyed = FALSE;
- expected[9].in_cache = FALSE;
- expected[9].is_dirty = FALSE;
- expected[9].serialized = TRUE;
- expected[9].destroyed = TRUE;
+ expected[8].in_cache = true;
+ expected[8].is_dirty = true;
+ expected[8].serialized = false;
+ expected[8].destroyed = false;
+ expected[9].in_cache = false;
+ expected[9].is_dirty = false;
+ expected[9].serialized = true;
+ expected[9].destroyed = true;
/* verify cache size */
if ((cache_ptr->index_len != 44) ||
@@ -9308,7 +9307,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
(cache_ptr->index_size !=
((1 * VARIABLE_ENTRY_SIZE) + (31 * MONSTER_ENTRY_SIZE) + (12 * LARGE_ENTRY_SIZE)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected size/len in flush op eviction test 12.";
}
@@ -9363,10 +9362,10 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
* entry status:
*/
- expected[8].in_cache = FALSE;
- expected[8].is_dirty = FALSE;
- expected[8].serialized = TRUE;
- expected[8].destroyed = TRUE;
+ expected[8].in_cache = false;
+ expected[8].is_dirty = false;
+ expected[8].serialized = true;
+ expected[8].destroyed = true;
num_large_entries = 14;
@@ -9375,8 +9374,8 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
*/
for (i = num_variable_entries; i < num_variable_entries + num_monster_entries + num_large_entries - 1;
i++) {
- expected[i].is_dirty = FALSE;
- expected[i].serialized = TRUE;
+ expected[i].is_dirty = false;
+ expected[i].serialized = true;
}
for (i = 12; i < 14; i++) {
@@ -9390,7 +9389,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
(2 * 1024 * 1024) - (6 * VARIABLE_ENTRY_SIZE) + (13 * LARGE_ENTRY_SIZE)) ||
(cache_ptr->index_size != ((31 * MONSTER_ENTRY_SIZE) + (14 * LARGE_ENTRY_SIZE)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected size/len in flush op eviction test 13.";
}
@@ -9418,7 +9417,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
if ((pass) && ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache len/size after cleanup of flush op eviction test";
}
}
@@ -9451,7 +9450,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
(cache_ptr->entry_flush_size_changes[VARIABLE_ENTRY_TYPE] != 1) ||
(cache_ptr->cache_flush_size_changes[VARIABLE_ENTRY_TYPE] != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg =
"Unexpected variable size entry stats in check_flush_cache__flush_op_eviction_test().";
}
@@ -9476,7 +9475,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
(cache_ptr->entry_flush_size_changes[LARGE_ENTRY_TYPE] != 0) ||
(cache_ptr->cache_flush_size_changes[LARGE_ENTRY_TYPE] != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected large entry stats in check_flush_cache__flush_op_eviction_test().";
}
}
@@ -9500,7 +9499,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
(cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0) ||
(cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected monster entry stats in check_flush_cache__flush_op_eviction_test().";
}
}
@@ -9533,12 +9532,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
if (cache_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache_ptr NULL on entry to single entry case.";
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache not empty at beginning of single entry case.";
}
@@ -9549,12 +9548,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 1,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__NO_FLAGS_SET,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -9564,12 +9563,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 2,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__DIRTIED_FLAG,
/* flush_flags */ H5C__NO_FLAGS_SET,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -9579,12 +9578,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 3,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -9594,12 +9593,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 4,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__DIRTIED_FLAG,
/* flush_flags */ H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -9609,12 +9608,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 5,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -9624,12 +9623,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 6,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__DIRTIED_FLAG,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -9639,12 +9638,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 7,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -9654,12 +9653,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 8,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__DIRTIED_FLAG,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -9669,12 +9668,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 9,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -9684,12 +9683,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 10,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__DIRTIED_FLAG,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -9699,12 +9698,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 11,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -9714,12 +9713,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 12,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__DIRTIED_FLAG,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -9729,12 +9728,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 13,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_INVALIDATE_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -9744,12 +9743,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 14,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__DIRTIED_FLAG,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_INVALIDATE_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -9759,13 +9758,13 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 15,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG |
H5C__FLUSH_MARKED_ENTRIES_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -9775,13 +9774,13 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 16,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__DIRTIED_FLAG,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG |
H5C__FLUSH_MARKED_ENTRIES_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -9791,12 +9790,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 17,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__NO_FLAGS_SET,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -9806,12 +9805,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 18,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__NO_FLAGS_SET,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -9821,12 +9820,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 19,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -9836,12 +9835,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 20,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -9851,12 +9850,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 21,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -9866,12 +9865,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 22,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -9881,12 +9880,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 23,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -9896,12 +9895,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 24,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -9911,12 +9910,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 25,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -9926,12 +9925,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 26,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -9941,12 +9940,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 27,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -9956,12 +9955,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 28,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -9971,12 +9970,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 29,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_INVALIDATE_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -9986,12 +9985,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 30,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_INVALIDATE_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -10001,13 +10000,13 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 31,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG |
H5C__FLUSH_MARKED_ENTRIES_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -10017,13 +10016,13 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 32,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG |
H5C__FLUSH_MARKED_ENTRIES_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -10033,12 +10032,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 33,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__NO_FLAGS_SET,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -10048,12 +10047,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 34,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__NO_FLAGS_SET,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -10063,12 +10062,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 35,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -10078,12 +10077,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 36,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -10093,12 +10092,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 37,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -10108,12 +10107,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 38,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -10123,12 +10122,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 39,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -10138,12 +10137,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 40,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -10153,12 +10152,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 41,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -10168,12 +10167,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 42,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -10183,12 +10182,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 43,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -10198,12 +10197,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 44,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -10213,12 +10212,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 45,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_INVALIDATE_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -10228,12 +10227,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 46,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_INVALIDATE_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -10243,13 +10242,13 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 47,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG |
H5C__FLUSH_MARKED_ENTRIES_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -10259,13 +10258,13 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 48,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG |
H5C__FLUSH_MARKED_ENTRIES_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -10275,12 +10274,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 49,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__NO_FLAGS_SET,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -10290,12 +10289,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 50,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__NO_FLAGS_SET,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -10305,12 +10304,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 51,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -10320,12 +10319,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 52,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -10335,12 +10334,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 53,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -10350,12 +10349,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 54,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -10365,12 +10364,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 55,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -10380,12 +10379,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 56,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -10395,12 +10394,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 57,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -10410,12 +10409,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 58,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -10425,12 +10424,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 59,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -10440,12 +10439,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 60,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -10455,12 +10454,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 61,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_INVALIDATE_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -10470,12 +10469,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 62,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_INVALIDATE_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -10485,13 +10484,13 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 63,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG |
H5C__FLUSH_MARKED_ENTRIES_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -10501,13 +10500,13 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 64,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG |
H5C__FLUSH_MARKED_ENTRIES_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
/* Now run single entry tests for pinned entries. Test all combinations
@@ -10539,12 +10538,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
*
* In addition to simply checking to see if the test case runs,
* we also check to see if the desired operations take place on the
- * cache entry. Thus expected_serialized is set to TRUE if we
+ * cache entry. Thus expected_serialized is set to true if we
* we expect the entry to be flushed, and expected_destroyed is set
- * to TRUE if we expect the entry to be destroyed.
+ * to true if we expect the entry to be destroyed.
*
* In this test, we are working with pinned entries which can't be
- * evicted, so expected_destroyed is always FALSE. We could pull it
+ * evicted, so expected_destroyed is always false. We could pull it
* from the table, but it is a hold over from the code this test
* was adapted from, and it doesn't do any particular harm.
*
@@ -10577,7 +10576,7 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
spec = malloc(256 * sizeof(struct pinned_single_entry_test_spec));
if (spec == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "couldn't allocated pinned single entry test spec array";
}
@@ -10585,21 +10584,21 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
int test_num;
int entry_type;
int entry_idx;
- hbool_t dirty_flag;
- hbool_t mark_dirty;
- hbool_t pop_mark_dirty_prot;
- hbool_t pop_mark_dirty_pinned;
- hbool_t unprotect_unpin;
+ bool dirty_flag;
+ bool mark_dirty;
+ bool pop_mark_dirty_prot;
+ bool pop_mark_dirty_pinned;
+ bool unprotect_unpin;
unsigned int flags;
unsigned int flush_flags;
- hbool_t expected_serialized;
- hbool_t expected_destroyed;
+ bool expected_serialized;
+ bool expected_destroyed;
test_num = (int)(i + 1);
entry_type = PICO_ENTRY_TYPE;
entry_idx = 0;
- /* Generate alternating sequences of TRUE/FALSE */
+ /* Generate alternating sequences of true/false */
dirty_flag = (i / 16) % 2;
mark_dirty = (i / 8) % 2;
pop_mark_dirty_prot = (i / 4) % 2;
@@ -10637,25 +10636,25 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
break;
}
- expected_serialized = FALSE;
+ expected_serialized = false;
if (0 == (flush_flags & H5C__FLUSH_CLEAR_ONLY_FLAG)) {
if (flush_flags & H5C__FLUSH_MARKED_ENTRIES_FLAG) {
if (flags & H5C__SET_FLUSH_MARKER_FLAG) {
if (mark_dirty && pop_mark_dirty_prot) {
- expected_serialized = TRUE;
+ expected_serialized = true;
}
else if (dirty_flag || pop_mark_dirty_prot) {
- expected_serialized = TRUE;
+ expected_serialized = true;
}
}
}
else {
if (dirty_flag || mark_dirty || pop_mark_dirty_prot || pop_mark_dirty_pinned)
- expected_serialized = TRUE;
+ expected_serialized = true;
}
}
- expected_destroyed = FALSE;
+ expected_destroyed = false;
spec[i] = (struct pinned_single_entry_test_spec){
test_num,
@@ -10709,9 +10708,9 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
static void
check_flush_cache__single_entry_test(H5F_t *file_ptr, int test_num, int entry_type, int entry_idx,
- hbool_t insert_flag, unsigned int flags, unsigned int flush_flags,
- hbool_t expected_deserialized, hbool_t expected_serialized,
- hbool_t expected_destroyed)
+ bool insert_flag, unsigned int flags, unsigned int flush_flags,
+ bool expected_deserialized, bool expected_serialized,
+ bool expected_destroyed)
{
H5C_t *cache_ptr = file_ptr->shared->cache;
static char msg[128];
@@ -10720,21 +10719,21 @@ check_flush_cache__single_entry_test(H5F_t *file_ptr, int test_num, int entry_ty
if (cache_ptr == NULL) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "cache_ptr NULL on entry to single entry test #%d.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "cache_ptr NULL on entry to single entry test #%d.", test_num);
failure_mssg = msg;
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "cache not empty at beginning of single entry test #%d.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "cache not empty at beginning of single entry test #%d.", test_num);
failure_mssg = msg;
}
else if ((entry_type < 0) || (entry_type >= NUMBER_OF_ENTRY_TYPES) || (entry_idx < 0) ||
(entry_idx > max_indices[entry_type])) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Bad parameters on entry to single entry test #%d.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Bad parameters on entry to single entry test #%d.", test_num);
failure_mssg = msg;
}
@@ -10761,8 +10760,8 @@ check_flush_cache__single_entry_test(H5F_t *file_ptr, int test_num, int entry_ty
if (!pass) { /* construct and set actual failure message */
- HDsnprintf(msg, (size_t)128, "flush with flags 0x%x failed in single entry test #%d.",
- flush_flags, test_num);
+ snprintf(msg, (size_t)128, "flush with flags 0x%x failed in single entry test #%d.", flush_flags,
+ test_num);
failure_mssg = msg;
}
@@ -10770,9 +10769,9 @@ check_flush_cache__single_entry_test(H5F_t *file_ptr, int test_num, int entry_ty
(entry_ptr->serialized != expected_serialized) ||
(entry_ptr->destroyed != expected_destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry status after flush in single entry test #%d.",
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry status after flush in single entry test #%d.",
+ test_num);
failure_mssg = msg;
}
else if ((((flush_flags & H5C__FLUSH_INVALIDATE_FLAG) == 0) &&
@@ -10780,9 +10779,9 @@ check_flush_cache__single_entry_test(H5F_t *file_ptr, int test_num, int entry_ty
(((flush_flags & H5C__FLUSH_INVALIDATE_FLAG) != 0) &&
((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache len/size after flush in single entry test #%d.",
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache len/size after flush in single entry test #%d.",
+ test_num);
failure_mssg = msg;
}
}
@@ -10794,21 +10793,21 @@ check_flush_cache__single_entry_test(H5F_t *file_ptr, int test_num, int entry_ty
if (!pass) { /* construct and set actual failure message */
- HDsnprintf(msg, (size_t)128, "Flush failed on cleanup in single entry test #%d.", test_num);
+ snprintf(msg, (size_t)128, "Flush failed on cleanup in single entry test #%d.", test_num);
failure_mssg = msg;
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache len/size after cleanup in single entry test #%d.",
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache len/size after cleanup in single entry test #%d.",
+ test_num);
failure_mssg = msg;
}
else {
- entry_ptr->deserialized = FALSE;
- entry_ptr->serialized = FALSE;
- entry_ptr->destroyed = FALSE;
+ entry_ptr->deserialized = false;
+ entry_ptr->serialized = false;
+ entry_ptr->destroyed = false;
}
}
@@ -10826,36 +10825,34 @@ check_flush_cache__single_entry_test(H5F_t *file_ptr, int test_num, int entry_ty
static void
check_flush_cache__pinned_single_entry_test(H5F_t *file_ptr, int test_num, int entry_type, int entry_idx,
- hbool_t unprot_dirty_flag, hbool_t mark_dirty,
- hbool_t pop_mark_dirty_prot, hbool_t pop_mark_dirty_pinned,
- hbool_t unprotect_unpin, unsigned int flags,
- unsigned int flush_flags, hbool_t expected_serialized,
- hbool_t expected_destroyed)
+ bool unprot_dirty_flag, bool mark_dirty, bool pop_mark_dirty_prot,
+ bool pop_mark_dirty_pinned, bool unprotect_unpin,
+ unsigned int flags, unsigned int flush_flags,
+ bool expected_serialized, bool expected_destroyed)
{
H5C_t *cache_ptr = file_ptr->shared->cache;
static char msg[128];
- hbool_t expected_deserialized = TRUE;
+ bool expected_deserialized = true;
test_entry_t *base_addr;
test_entry_t *entry_ptr = NULL;
if (cache_ptr == NULL) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "cache_ptr NULL on entry to pinned single entry test #%d.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "cache_ptr NULL on entry to pinned single entry test #%d.", test_num);
failure_mssg = msg;
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "cache not empty at beginning of pinned single entry test #%d.",
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "cache not empty at beginning of pinned single entry test #%d.", test_num);
failure_mssg = msg;
}
else if ((entry_type < 0) || (entry_type >= NUMBER_OF_ENTRY_TYPES) || (entry_idx < 0) ||
(entry_idx > max_indices[entry_type])) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Bad parameters on entry to pinned single entry test #%d.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Bad parameters on entry to pinned single entry test #%d.", test_num);
failure_mssg = msg;
}
@@ -10892,17 +10889,17 @@ check_flush_cache__pinned_single_entry_test(H5F_t *file_ptr, int test_num, int e
if (!pass) { /* construct and set the correct failure message */
- HDsnprintf(msg, (size_t)128, "flush with flags 0x%x failed in pinned single entry test #%d.",
- flush_flags, test_num);
+ snprintf(msg, (size_t)128, "flush with flags 0x%x failed in pinned single entry test #%d.",
+ flush_flags, test_num);
failure_mssg = msg;
}
else if ((entry_ptr->deserialized != expected_deserialized) ||
(entry_ptr->serialized != expected_serialized) ||
(entry_ptr->destroyed != expected_destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128,
- "Unexpected entry status after flush in pinned single entry test #%d.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry status after flush in pinned single entry test #%d.",
+ test_num);
failure_mssg = msg;
}
else if ((((flush_flags & H5C__FLUSH_INVALIDATE_FLAG) == 0) &&
@@ -10910,9 +10907,9 @@ check_flush_cache__pinned_single_entry_test(H5F_t *file_ptr, int test_num, int e
(((flush_flags & H5C__FLUSH_INVALIDATE_FLAG) != 0) &&
((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128,
- "Unexpected cache len/size after flush in pinned single entry test #%d.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128,
+ "Unexpected cache len/size after flush in pinned single entry test #%d.", test_num);
failure_mssg = msg;
}
}
@@ -10940,22 +10937,21 @@ check_flush_cache__pinned_single_entry_test(H5F_t *file_ptr, int test_num, int e
if (!pass) {
- HDsnprintf(msg, (size_t)128, "Flush failed on cleanup in pinned single entry test #%d.",
- test_num);
+ snprintf(msg, (size_t)128, "Flush failed on cleanup in pinned single entry test #%d.", test_num);
failure_mssg = msg;
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128,
- "Unexpected cache len/size after cleanup in pinned single entry test #%d.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128,
+ "Unexpected cache len/size after cleanup in pinned single entry test #%d.", test_num);
failure_mssg = msg;
}
else {
- entry_ptr->deserialized = FALSE;
- entry_ptr->serialized = FALSE;
- entry_ptr->destroyed = FALSE;
+ entry_ptr->deserialized = false;
+ entry_ptr->serialized = false;
+ entry_ptr->destroyed = false;
}
}
@@ -10976,10 +10972,10 @@ check_get_entry_status(unsigned paged)
{
static char msg[128];
herr_t result;
- hbool_t in_cache;
- hbool_t is_dirty;
- hbool_t is_protected;
- hbool_t is_pinned;
+ bool in_cache;
+ bool is_dirty;
+ bool is_protected;
+ bool is_pinned;
size_t entry_size;
H5F_t *file_ptr = NULL;
test_entry_t *base_addr = NULL;
@@ -10990,7 +10986,7 @@ check_get_entry_status(unsigned paged)
else
TESTING("H5C_get_entry_status() functionality");
- pass = TRUE;
+ pass = true;
if (pass) {
@@ -11000,7 +10996,7 @@ check_get_entry_status(unsigned paged)
if (file_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "file_ptr NULL from setup_cache.";
}
else {
@@ -11021,14 +11017,14 @@ check_get_entry_status(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 1.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 1.");
failure_mssg = msg;
}
else if (in_cache) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 1.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 1.");
failure_mssg = msg;
}
}
@@ -11047,14 +11043,14 @@ check_get_entry_status(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 2.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 2.");
failure_mssg = msg;
}
else if (!in_cache || is_dirty || is_protected || is_pinned) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 2.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 2.");
failure_mssg = msg;
}
}
@@ -11071,14 +11067,14 @@ check_get_entry_status(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 3.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 3.");
failure_mssg = msg;
}
else if (!in_cache || is_dirty || !is_protected || is_pinned) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 3.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 3.");
failure_mssg = msg;
}
}
@@ -11095,14 +11091,14 @@ check_get_entry_status(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 4.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 4.");
failure_mssg = msg;
}
else if (!in_cache || is_dirty || is_protected || !is_pinned) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 4.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 4.");
failure_mssg = msg;
}
}
@@ -11119,14 +11115,14 @@ check_get_entry_status(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 5.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 5.");
failure_mssg = msg;
}
else if (!in_cache || !is_dirty || is_protected || !is_pinned) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 5.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 5.");
failure_mssg = msg;
}
}
@@ -11143,21 +11139,21 @@ check_get_entry_status(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 6.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 6.");
failure_mssg = msg;
}
else if (!in_cache || !is_dirty || is_protected || is_pinned) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 6.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 6.");
failure_mssg = msg;
}
}
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -11191,10 +11187,10 @@ check_expunge_entry(unsigned paged)
{
static char msg[128];
herr_t result;
- hbool_t in_cache;
- hbool_t is_dirty;
- hbool_t is_protected;
- hbool_t is_pinned;
+ bool in_cache;
+ bool is_dirty;
+ bool is_protected;
+ bool is_pinned;
size_t entry_size;
H5F_t *file_ptr = NULL;
test_entry_t *base_addr;
@@ -11205,7 +11201,7 @@ check_expunge_entry(unsigned paged)
else
TESTING("H5C_expunge_entry() functionality");
- pass = TRUE;
+ pass = true;
if (pass) {
@@ -11228,20 +11224,20 @@ check_expunge_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 1.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 1.");
failure_mssg = msg;
}
else if (in_cache) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 1.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 1.");
failure_mssg = msg;
}
else if ((entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 1.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 1.");
failure_mssg = msg;
}
}
@@ -11264,20 +11260,20 @@ check_expunge_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 2.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 2.");
failure_mssg = msg;
}
else if (!in_cache || is_dirty || is_protected || is_pinned) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 2.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 2.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 2.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 2.");
failure_mssg = msg;
}
}
@@ -11302,20 +11298,20 @@ check_expunge_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 3.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 3.");
failure_mssg = msg;
}
else if (in_cache) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 3.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 3.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (!entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 3.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 3.");
failure_mssg = msg;
}
}
@@ -11338,20 +11334,20 @@ check_expunge_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 4.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 4.");
failure_mssg = msg;
}
else if (in_cache) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 4.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 4.");
failure_mssg = msg;
}
else if ((entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 4.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 4.");
failure_mssg = msg;
}
}
@@ -11374,20 +11370,20 @@ check_expunge_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 5.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 5.");
failure_mssg = msg;
}
else if (!in_cache || !is_dirty || is_protected || is_pinned) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 5.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 5.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 5.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 5.");
failure_mssg = msg;
}
}
@@ -11412,27 +11408,27 @@ check_expunge_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 6.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 6.");
failure_mssg = msg;
}
else if (in_cache) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 6.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 6.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (!entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 6.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 6.");
failure_mssg = msg;
}
}
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -11475,7 +11471,7 @@ check_multiple_read_protect(unsigned paged)
else
TESTING("multiple read only protects on a single entry");
- pass = TRUE;
+ pass = true;
/* allocate a cache. Should succeed.
*
@@ -11512,7 +11508,7 @@ check_multiple_read_protect(unsigned paged)
if ((entry_ptr->header.is_protected) || (entry_ptr->header.is_read_only) ||
(entry_ptr->header.ro_ref_count != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected ro protected status 1.\n";
}
}
@@ -11521,7 +11517,7 @@ check_multiple_read_protect(unsigned paged)
if ((cache_ptr->write_protects[0] != 0) || (cache_ptr->read_protects[0] != 0) ||
(cache_ptr->max_read_protects[0] != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected protect stats 1.\n";
}
#endif /* H5C_COLLECT_CACHE_STATS */
@@ -11532,7 +11528,7 @@ check_multiple_read_protect(unsigned paged)
if ((!(entry_ptr->header.is_protected)) || (!(entry_ptr->header.is_read_only)) ||
(entry_ptr->header.ro_ref_count != 1)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected ro protected status 2.\n";
}
}
@@ -11541,7 +11537,7 @@ check_multiple_read_protect(unsigned paged)
if ((cache_ptr->write_protects[0] != 0) || (cache_ptr->read_protects[0] != 1) ||
(cache_ptr->max_read_protects[0] != 1)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected protect stats 2.\n";
}
#endif /* H5C_COLLECT_CACHE_STATS */
@@ -11552,7 +11548,7 @@ check_multiple_read_protect(unsigned paged)
if ((!(entry_ptr->header.is_protected)) || (!(entry_ptr->header.is_read_only)) ||
(entry_ptr->header.ro_ref_count != 2)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected ro protected status 3.\n";
}
}
@@ -11561,7 +11557,7 @@ check_multiple_read_protect(unsigned paged)
if ((cache_ptr->write_protects[0] != 0) || (cache_ptr->read_protects[0] != 2) ||
(cache_ptr->max_read_protects[0] != 2)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected protect stats 3.\n";
}
#endif /* H5C_COLLECT_CACHE_STATS */
@@ -11572,7 +11568,7 @@ check_multiple_read_protect(unsigned paged)
if ((!(entry_ptr->header.is_protected)) || (!(entry_ptr->header.is_read_only)) ||
(entry_ptr->header.ro_ref_count != 1)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected ro protected status 4.\n";
}
}
@@ -11581,7 +11577,7 @@ check_multiple_read_protect(unsigned paged)
if ((cache_ptr->write_protects[0] != 0) || (cache_ptr->read_protects[0] != 2) ||
(cache_ptr->max_read_protects[0] != 2)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected protect stats 4.\n";
}
#endif /* H5C_COLLECT_CACHE_STATS */
@@ -11592,7 +11588,7 @@ check_multiple_read_protect(unsigned paged)
if ((!(entry_ptr->header.is_protected)) || (!(entry_ptr->header.is_read_only)) ||
(entry_ptr->header.ro_ref_count != 2)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected ro protected status 5.\n";
}
}
@@ -11601,7 +11597,7 @@ check_multiple_read_protect(unsigned paged)
if ((cache_ptr->write_protects[0] != 0) || (cache_ptr->read_protects[0] != 3) ||
(cache_ptr->max_read_protects[0] != 2)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected protect stats 5.\n";
}
#endif /* H5C_COLLECT_CACHE_STATS */
@@ -11612,7 +11608,7 @@ check_multiple_read_protect(unsigned paged)
if ((!(entry_ptr->header.is_protected)) || (!(entry_ptr->header.is_read_only)) ||
(entry_ptr->header.ro_ref_count != 3)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected ro protected status 6.\n";
}
}
@@ -11621,7 +11617,7 @@ check_multiple_read_protect(unsigned paged)
if ((cache_ptr->write_protects[0] != 0) || (cache_ptr->read_protects[0] != 4) ||
(cache_ptr->max_read_protects[0] != 3)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected protect stats 6.\n";
}
#endif /* H5C_COLLECT_CACHE_STATS */
@@ -11632,7 +11628,7 @@ check_multiple_read_protect(unsigned paged)
if ((!(entry_ptr->header.is_protected)) || (!(entry_ptr->header.is_read_only)) ||
(entry_ptr->header.ro_ref_count != 2)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected ro protected status 7.\n";
}
}
@@ -11641,7 +11637,7 @@ check_multiple_read_protect(unsigned paged)
if ((cache_ptr->write_protects[0] != 0) || (cache_ptr->read_protects[0] != 4) ||
(cache_ptr->max_read_protects[0] != 3)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected protect stats 7.\n";
}
#endif /* H5C_COLLECT_CACHE_STATS */
@@ -11652,7 +11648,7 @@ check_multiple_read_protect(unsigned paged)
if ((!(entry_ptr->header.is_protected)) || (!(entry_ptr->header.is_read_only)) ||
(entry_ptr->header.ro_ref_count != 1)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected ro protected status 8.\n";
}
}
@@ -11661,7 +11657,7 @@ check_multiple_read_protect(unsigned paged)
if ((cache_ptr->write_protects[0] != 0) || (cache_ptr->read_protects[0] != 4) ||
(cache_ptr->max_read_protects[0] != 3)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected protect stats 8.\n";
}
#endif /* H5C_COLLECT_CACHE_STATS */
@@ -11672,7 +11668,7 @@ check_multiple_read_protect(unsigned paged)
if ((entry_ptr->header.is_protected) || (entry_ptr->header.is_read_only) ||
(entry_ptr->header.ro_ref_count != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected ro protected status 9.\n";
}
}
@@ -11681,7 +11677,7 @@ check_multiple_read_protect(unsigned paged)
if ((cache_ptr->write_protects[0] != 0) || (cache_ptr->read_protects[0] != 4) ||
(cache_ptr->max_read_protects[0] != 3)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected protect stats 9.\n";
}
#endif /* H5C_COLLECT_CACHE_STATS */
@@ -11696,7 +11692,7 @@ check_multiple_read_protect(unsigned paged)
if ((!(entry_ptr->header.is_protected)) || (entry_ptr->header.is_read_only) ||
(entry_ptr->header.ro_ref_count != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected ro protected status 10.\n";
}
}
@@ -11705,7 +11701,7 @@ check_multiple_read_protect(unsigned paged)
if ((cache_ptr->write_protects[0] != 1) || (cache_ptr->read_protects[0] != 4) ||
(cache_ptr->max_read_protects[0] != 3)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected protect stats 10.\n";
}
#endif /* H5C_COLLECT_CACHE_STATS */
@@ -11716,7 +11712,7 @@ check_multiple_read_protect(unsigned paged)
if ((entry_ptr->header.is_protected) || (entry_ptr->header.is_read_only) ||
(entry_ptr->header.ro_ref_count != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected ro protected status 11.\n";
}
}
@@ -11725,7 +11721,7 @@ check_multiple_read_protect(unsigned paged)
if ((cache_ptr->write_protects[0] != 1) || (cache_ptr->read_protects[0] != 4) ||
(cache_ptr->max_read_protects[0] != 3)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected protect stats 11.\n";
}
#endif /* H5C_COLLECT_CACHE_STATS */
@@ -11771,18 +11767,18 @@ check_multiple_read_protect(unsigned paged)
if (H5C_pin_protected_entry((void *)entry_ptr) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_pin_protected_entry() failed.\n";
}
else if (!(entry_ptr->header.is_pinned)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "entry (0,4) not pinned.\n";
}
else {
/* keep test bed sanity checks happy */
- entry_ptr->is_pinned = TRUE;
+ entry_ptr->is_pinned = true;
}
}
@@ -11793,7 +11789,7 @@ check_multiple_read_protect(unsigned paged)
if (pass && (entry_ptr->header.is_pinned)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "entry (0,4) still pinned.\n";
}
@@ -11809,14 +11805,14 @@ check_multiple_read_protect(unsigned paged)
if ((cache_ptr->write_protects[0] != 5) || (cache_ptr->read_protects[0] != 9) ||
(cache_ptr->max_read_protects[0] != 3)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected protect stats 11.\n";
}
#endif /* H5C_COLLECT_CACHE_STATS */
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -11855,20 +11851,20 @@ check_move_entry(unsigned paged)
struct move_entry_test_spec test_specs[4] = {
{/* int entry_type = */ PICO_ENTRY_TYPE,
/* int entry_index = */ 10,
- /* hbool_t is_pinned = */ FALSE,
- /* hbool_t is_protected = */ FALSE},
+ /* bool is_pinned = */ false,
+ /* bool is_protected = */ false},
{/* int entry_type = */ PICO_ENTRY_TYPE,
/* int entry_index = */ 20,
- /* hbool_t is_pinned = */ TRUE,
- /* hbool_t is_protected = */ FALSE},
+ /* bool is_pinned = */ true,
+ /* bool is_protected = */ false},
{/* int entry_type = */ PICO_ENTRY_TYPE,
/* int entry_index = */ 30,
- /* hbool_t is_pinned = */ FALSE,
- /* hbool_t is_protected = */ TRUE},
+ /* bool is_pinned = */ false,
+ /* bool is_protected = */ true},
{/* int entry_type = */ PICO_ENTRY_TYPE,
/* int entry_index = */ 40,
- /* hbool_t is_pinned = */ TRUE,
- /* hbool_t is_protected = */ TRUE},
+ /* bool is_pinned = */ true,
+ /* bool is_protected = */ true},
};
if (paged)
@@ -11876,7 +11872,7 @@ check_move_entry(unsigned paged)
else
TESTING("H5C_move_entry() functionality");
- pass = TRUE;
+ pass = true;
/* allocate a cache, load entries into it, and then move
* them. To the extent possible, verify that the desired
@@ -11917,7 +11913,7 @@ check_move_entry(unsigned paged)
}
if (pass)
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
if (pass)
PASSED();
@@ -11935,7 +11931,7 @@ check_move_entry(unsigned paged)
*
* Purpose: Run a move entry test.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -11954,14 +11950,14 @@ check_move_entry__run_test(H5F_t *file_ptr, unsigned test_num, struct move_entry
if (cache_ptr == NULL) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "cache_ptr NULL on entry to move test #%u.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "cache_ptr NULL on entry to move test #%u.", test_num);
failure_mssg = msg;
}
else if (spec_ptr == NULL) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "spec_ptr NULL on entry to move test #%u.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "spec_ptr NULL on entry to move test #%u.", test_num);
failure_mssg = msg;
}
@@ -11974,8 +11970,8 @@ check_move_entry__run_test(H5F_t *file_ptr, unsigned test_num, struct move_entry
((entry_ptr->cache_ptr != cache_ptr) && (entry_ptr->cache_ptr != NULL)) ||
(!(entry_ptr->at_main_addr)) || (entry_ptr->addr != entry_ptr->main_addr)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "bad entry_ptr in move test #%u.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "bad entry_ptr in move test #%u.", test_num);
failure_mssg = msg;
}
}
@@ -11990,7 +11986,7 @@ check_move_entry__run_test(H5F_t *file_ptr, unsigned test_num, struct move_entry
if (!spec_ptr->is_protected)
unprotect_entry(file_ptr, spec_ptr->entry_type, spec_ptr->entry_index, flags);
- move_entry(cache_ptr, spec_ptr->entry_type, spec_ptr->entry_index, FALSE);
+ move_entry(cache_ptr, spec_ptr->entry_type, spec_ptr->entry_index, false);
}
if (pass) {
@@ -12004,8 +12000,8 @@ check_move_entry__run_test(H5F_t *file_ptr, unsigned test_num, struct move_entry
if (!(entry_ptr->header.is_pinned)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Pinned entry not pinned after move in test #%u.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Pinned entry not pinned after move in test #%u.", test_num);
failure_mssg = msg;
}
@@ -12021,9 +12017,9 @@ check_move_entry__run_test(H5F_t *file_ptr, unsigned test_num, struct move_entry
if (test_ptr == NULL) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Pinned entry not in pel after move in test #%u.",
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Pinned entry not in pel after move in test #%u.",
+ test_num);
failure_mssg = msg;
}
} /* end else */
@@ -12035,8 +12031,8 @@ check_move_entry__run_test(H5F_t *file_ptr, unsigned test_num, struct move_entry
if (entry_ptr->header.is_pinned) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unpinned entry pinned after move in test #%u.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Unpinned entry pinned after move in test #%u.", test_num);
failure_mssg = msg;
}
@@ -12045,9 +12041,8 @@ check_move_entry__run_test(H5F_t *file_ptr, unsigned test_num, struct move_entry
else {
if ((entry_ptr->header.prev != NULL) ||
(cache_ptr->LRU_head_ptr != (H5C_cache_entry_t *)entry_ptr)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Entry not at head of LRU after move in test #%u.",
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Entry not at head of LRU after move in test #%u.", test_num);
failure_mssg = msg;
}
} /* end else */
@@ -12056,9 +12051,8 @@ check_move_entry__run_test(H5F_t *file_ptr, unsigned test_num, struct move_entry
if (spec_ptr->is_protected) {
if (!(entry_ptr->header.is_protected)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Protected entry not protected after move in test #%u.",
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Protected entry not protected after move in test #%u.", test_num);
failure_mssg = msg;
}
@@ -12068,16 +12062,16 @@ check_move_entry__run_test(H5F_t *file_ptr, unsigned test_num, struct move_entry
else {
if (entry_ptr->header.is_protected) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unprotected entry not unprotected after move in test #%u.",
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Unprotected entry not unprotected after move in test #%u.",
+ test_num);
failure_mssg = msg;
}
} /* end else */
}
/* put the entry back where it started from */
- move_entry(cache_ptr, spec_ptr->entry_type, spec_ptr->entry_index, TRUE);
+ move_entry(cache_ptr, spec_ptr->entry_type, spec_ptr->entry_index, true);
} /* check_move_entry__run_test() */
@@ -12105,7 +12099,7 @@ check_pin_protected_entry(unsigned paged)
else
TESTING("H5C_pin_protected_entry() functionality");
- pass = TRUE;
+ pass = true;
/* Create a cache, protect an entry, and then use H5C_pin_protected_entry()
* to pin it. Verify that the entry is in fact pined. Unprotect the entry
@@ -12120,7 +12114,7 @@ check_pin_protected_entry(unsigned paged)
if (file_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "file_ptr NULL from setup_cache.";
}
}
@@ -12139,19 +12133,19 @@ check_pin_protected_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_pin_protected_entry() reports failure.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_pin_protected_entry() reports failure.");
failure_mssg = msg;
}
else if (!(entry_ptr->header.is_pinned)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "entry not pinned when it should be.");
+ pass = false;
+ snprintf(msg, (size_t)128, "entry not pinned when it should be.");
failure_mssg = msg;
}
else {
- entry_ptr->is_pinned = TRUE;
+ entry_ptr->is_pinned = true;
}
}
@@ -12159,7 +12153,7 @@ check_pin_protected_entry(unsigned paged)
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -12194,10 +12188,10 @@ check_resize_entry(unsigned paged)
{
static char msg[128];
herr_t result;
- hbool_t in_cache;
- hbool_t is_dirty;
- hbool_t is_protected;
- hbool_t is_pinned;
+ bool in_cache;
+ bool is_dirty;
+ bool is_protected;
+ bool is_pinned;
size_t entry_size;
size_t reported_entry_size;
H5F_t *file_ptr = NULL;
@@ -12239,7 +12233,7 @@ check_resize_entry(unsigned paged)
* the cache.
*/
- pass = TRUE;
+ pass = true;
/* tests with only one entry in the cache: */
@@ -12251,7 +12245,7 @@ check_resize_entry(unsigned paged)
if (file_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "file_ptr NULL from setup_cache.";
}
else {
@@ -12268,8 +12262,8 @@ check_resize_entry(unsigned paged)
if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0) || (cache_ptr->slist_len != 0) ||
(cache_ptr->slist_size != 0)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 1.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 1.");
failure_mssg = msg;
}
}
@@ -12284,8 +12278,8 @@ check_resize_entry(unsigned paged)
if ((cache_ptr->index_len != 1) || (cache_ptr->index_size != LARGE_ENTRY_SIZE) ||
(cache_ptr->slist_len != 0) || (cache_ptr->slist_size != 0)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 2.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 2.");
failure_mssg = msg;
}
}
@@ -12297,20 +12291,20 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 1.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 1.");
failure_mssg = msg;
}
else if (!in_cache || is_dirty || !is_protected || is_pinned) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 1.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 1.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 1.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 1.");
failure_mssg = msg;
}
}
@@ -12321,8 +12315,8 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "error(s) in H5C_resize_entry().");
+ pass = false;
+ snprintf(msg, (size_t)128, "error(s) in H5C_resize_entry().");
failure_mssg = msg;
}
else {
@@ -12331,8 +12325,8 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_unprotect() reports failure 1.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_unprotect() reports failure 1.");
failure_mssg = msg;
}
else {
@@ -12340,8 +12334,8 @@ check_resize_entry(unsigned paged)
/* tidy up so we play nice with the standard protect / unprotect
* calls.
*/
- entry_ptr->is_protected = FALSE;
- entry_ptr->is_dirty = TRUE;
+ entry_ptr->is_protected = false;
+ entry_ptr->is_dirty = true;
entry_ptr->size = LARGE_ENTRY_SIZE / 2;
}
}
@@ -12353,8 +12347,8 @@ check_resize_entry(unsigned paged)
((cache_ptr->slist_enabled) &&
((cache_ptr->slist_len != 1) || (cache_ptr->slist_size != (LARGE_ENTRY_SIZE / 2))))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 3.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 3.");
failure_mssg = msg;
}
}
@@ -12366,21 +12360,21 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 2.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 2.");
failure_mssg = msg;
}
else if (!in_cache || !is_dirty || is_protected || is_pinned ||
(reported_entry_size != (LARGE_ENTRY_SIZE / 2))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 2.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 2.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 2.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 2.");
failure_mssg = msg;
}
}
@@ -12396,8 +12390,8 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "error(s) in H5C_resize_entry().");
+ pass = false;
+ snprintf(msg, (size_t)128, "error(s) in H5C_resize_entry().");
failure_mssg = msg;
}
else {
@@ -12406,8 +12400,8 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_unprotect() reports failure 2.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_unprotect() reports failure 2.");
failure_mssg = msg;
}
else {
@@ -12415,8 +12409,8 @@ check_resize_entry(unsigned paged)
/* tidy up so we play nice with the standard protect / unprotect
* calls.
*/
- entry_ptr->is_protected = FALSE;
- entry_ptr->is_dirty = TRUE;
+ entry_ptr->is_protected = false;
+ entry_ptr->is_dirty = true;
entry_ptr->size = LARGE_ENTRY_SIZE;
}
}
@@ -12428,8 +12422,8 @@ check_resize_entry(unsigned paged)
((cache_ptr->slist_enabled) &&
((cache_ptr->slist_len != 1) || (cache_ptr->slist_size != LARGE_ENTRY_SIZE)))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 4.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 4.");
failure_mssg = msg;
}
}
@@ -12441,21 +12435,21 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 3.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 3.");
failure_mssg = msg;
}
else if (!in_cache || !is_dirty || is_protected || is_pinned ||
(reported_entry_size != LARGE_ENTRY_SIZE)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 3.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 3.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 3.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 3.");
failure_mssg = msg;
}
}
@@ -12473,8 +12467,8 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_resize_entry() reports failure 1.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_resize_entry() reports failure 1.");
failure_mssg = msg;
}
}
@@ -12485,8 +12479,8 @@ check_resize_entry(unsigned paged)
((cache_ptr->slist_enabled) &&
((cache_ptr->slist_len != 1) || (cache_ptr->slist_size != (LARGE_ENTRY_SIZE / 4))))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 5.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 5.");
failure_mssg = msg;
}
}
@@ -12498,21 +12492,21 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 4.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 4.");
failure_mssg = msg;
}
else if (!in_cache || !is_dirty || is_protected || !is_pinned ||
(reported_entry_size != (LARGE_ENTRY_SIZE / 4))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 4.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 4.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 4.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 4.");
failure_mssg = msg;
}
}
@@ -12523,8 +12517,8 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_resize_entry() reports failure 2.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_resize_entry() reports failure 2.");
failure_mssg = msg;
}
}
@@ -12535,8 +12529,8 @@ check_resize_entry(unsigned paged)
((cache_ptr->slist_enabled) &&
((cache_ptr->slist_len != 1) || (cache_ptr->slist_size != LARGE_ENTRY_SIZE)))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 6.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 6.");
failure_mssg = msg;
}
}
@@ -12548,21 +12542,21 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 5.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 5.");
failure_mssg = msg;
}
else if (!in_cache || !is_dirty || is_protected || !is_pinned ||
(reported_entry_size != LARGE_ENTRY_SIZE)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 5.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 5.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 5.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 5.");
failure_mssg = msg;
}
}
@@ -12581,20 +12575,20 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 6.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 6.");
failure_mssg = msg;
}
else if (in_cache) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 6.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 6.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (!entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 6.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 6.");
failure_mssg = msg;
}
}
@@ -12604,8 +12598,8 @@ check_resize_entry(unsigned paged)
if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0) ||
((cache_ptr->slist_enabled) && ((cache_ptr->slist_len != 0) || (cache_ptr->slist_size != 0)))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 7.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 7.");
failure_mssg = msg;
}
}
@@ -12617,8 +12611,8 @@ check_resize_entry(unsigned paged)
if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0) ||
((cache_ptr->slist_enabled) && ((cache_ptr->slist_len != 0) || (cache_ptr->slist_size != 0)))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 8.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 8.");
failure_mssg = msg;
}
@@ -12645,8 +12639,8 @@ check_resize_entry(unsigned paged)
((cache_ptr->slist_enabled) &&
((cache_ptr->slist_len != 1) || (cache_ptr->slist_size != LARGE_ENTRY_SIZE)))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 9.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 9.");
failure_mssg = msg;
}
}
@@ -12662,8 +12656,8 @@ check_resize_entry(unsigned paged)
((cache_ptr->slist_enabled) &&
((cache_ptr->slist_len != 1) || (cache_ptr->slist_size != LARGE_ENTRY_SIZE)))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 10.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 10.");
failure_mssg = msg;
}
}
@@ -12675,20 +12669,20 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 7.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 7.");
failure_mssg = msg;
}
else if (!in_cache || is_dirty || !is_protected || is_pinned) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 7.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 7.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 7.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 7.");
failure_mssg = msg;
}
}
@@ -12699,8 +12693,8 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "error(s) in H5C_resize_entry().");
+ pass = false;
+ snprintf(msg, (size_t)128, "error(s) in H5C_resize_entry().");
failure_mssg = msg;
}
else {
@@ -12709,8 +12703,8 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_unprotect() reports failure 3.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_unprotect() reports failure 3.");
failure_mssg = msg;
}
else {
@@ -12718,8 +12712,8 @@ check_resize_entry(unsigned paged)
/* tidy up so we play nice with the standard protect / unprotect
* calls.
*/
- entry_ptr->is_protected = FALSE;
- entry_ptr->is_dirty = TRUE;
+ entry_ptr->is_protected = false;
+ entry_ptr->is_dirty = true;
entry_ptr->size = LARGE_ENTRY_SIZE / 2;
}
}
@@ -12733,8 +12727,8 @@ check_resize_entry(unsigned paged)
((cache_ptr->slist_len != 2) ||
(cache_ptr->slist_size != (LARGE_ENTRY_SIZE + (LARGE_ENTRY_SIZE / 2)))))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 11.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 11.");
failure_mssg = msg;
}
}
@@ -12746,21 +12740,21 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 8.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 8.");
failure_mssg = msg;
}
else if (!in_cache || !is_dirty || is_protected || is_pinned ||
(reported_entry_size != (LARGE_ENTRY_SIZE / 2))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 8.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 8.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 8.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 8.");
failure_mssg = msg;
}
}
@@ -12776,8 +12770,8 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "error(s) in H5C_resize_entry().");
+ pass = false;
+ snprintf(msg, (size_t)128, "error(s) in H5C_resize_entry().");
failure_mssg = msg;
}
else {
@@ -12786,8 +12780,8 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_unprotect() reports failure 4.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_unprotect() reports failure 4.");
failure_mssg = msg;
}
else {
@@ -12795,8 +12789,8 @@ check_resize_entry(unsigned paged)
/* tidy up so we play nice with the standard protect / unprotect
* calls.
*/
- entry_ptr->is_protected = FALSE;
- entry_ptr->is_dirty = TRUE;
+ entry_ptr->is_protected = false;
+ entry_ptr->is_dirty = true;
entry_ptr->size = LARGE_ENTRY_SIZE;
}
}
@@ -12808,8 +12802,8 @@ check_resize_entry(unsigned paged)
((cache_ptr->slist_enabled) &&
((cache_ptr->slist_len != 2) || (cache_ptr->slist_size != 2 * LARGE_ENTRY_SIZE)))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 12.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 12.");
failure_mssg = msg;
}
}
@@ -12821,21 +12815,21 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 9.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 9.");
failure_mssg = msg;
}
else if (!in_cache || !is_dirty || is_protected || is_pinned ||
(reported_entry_size != LARGE_ENTRY_SIZE)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 9.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 9.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 9.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 9.");
failure_mssg = msg;
}
}
@@ -12853,8 +12847,8 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_resize_entry() reports failure 3.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_resize_entry() reports failure 3.");
failure_mssg = msg;
}
}
@@ -12867,8 +12861,8 @@ check_resize_entry(unsigned paged)
((cache_ptr->slist_len != 2) ||
(cache_ptr->slist_size != (LARGE_ENTRY_SIZE + (LARGE_ENTRY_SIZE / 4)))))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 13.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 13.");
failure_mssg = msg;
}
}
@@ -12880,21 +12874,21 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 10.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 10.");
failure_mssg = msg;
}
else if (!in_cache || !is_dirty || is_protected || !is_pinned ||
(reported_entry_size != (LARGE_ENTRY_SIZE / 4))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 10.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 10.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 10.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 10.");
failure_mssg = msg;
}
}
@@ -12905,8 +12899,8 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_resize_entry() reports failure 4.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_resize_entry() reports failure 4.");
failure_mssg = msg;
}
}
@@ -12917,8 +12911,8 @@ check_resize_entry(unsigned paged)
((cache_ptr->slist_enabled) &&
((cache_ptr->slist_len != 2) || (cache_ptr->slist_size != (2 * LARGE_ENTRY_SIZE))))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 14.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 14.");
failure_mssg = msg;
}
}
@@ -12930,21 +12924,21 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 11.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 11.");
failure_mssg = msg;
}
else if (!in_cache || !is_dirty || is_protected || !is_pinned ||
(reported_entry_size != LARGE_ENTRY_SIZE)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 11.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 11.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 11.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 11.");
failure_mssg = msg;
}
}
@@ -12963,20 +12957,20 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 12.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 12.");
failure_mssg = msg;
}
else if (in_cache) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 12.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 12.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (!entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 12.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 12.");
failure_mssg = msg;
}
}
@@ -12987,8 +12981,8 @@ check_resize_entry(unsigned paged)
((cache_ptr->slist_enabled) &&
((cache_ptr->slist_len != 1) || (cache_ptr->slist_size != LARGE_ENTRY_SIZE)))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 15.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 15.");
failure_mssg = msg;
}
}
@@ -13010,15 +13004,15 @@ check_resize_entry(unsigned paged)
if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0) ||
((cache_ptr->slist_enabled) && ((cache_ptr->slist_len != 0) || (cache_ptr->slist_size != 0)))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 16.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 16.");
failure_mssg = msg;
}
}
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -13053,9 +13047,9 @@ check_evictions_enabled(unsigned paged)
{
static char msg[128];
herr_t result;
- hbool_t show_progress = FALSE;
- hbool_t evictions_enabled;
- hbool_t in_cache;
+ bool show_progress = false;
+ bool evictions_enabled;
+ bool in_cache;
int i;
int mile_stone = 1;
H5F_t *file_ptr = NULL;
@@ -13103,7 +13097,7 @@ check_evictions_enabled(unsigned paged)
* Now flush and discard the cache -- should succeed.
*/
- pass = TRUE;
+ pass = true;
if (show_progress) /* 1 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -13117,7 +13111,7 @@ check_evictions_enabled(unsigned paged)
if (file_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "file_ptr NULL from setup_cache.";
}
else {
@@ -13135,10 +13129,10 @@ check_evictions_enabled(unsigned paged)
if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0) ||
((cache_ptr->slist_enabled) && ((cache_ptr->slist_len != 0) || (cache_ptr->slist_size != 0))) ||
- (cache_ptr->evictions_enabled != TRUE)) {
+ (cache_ptr->evictions_enabled != true)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 1.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 1.");
failure_mssg = msg;
}
}
@@ -13151,10 +13145,10 @@ check_evictions_enabled(unsigned paged)
result = H5C_get_evictions_enabled(cache_ptr, &evictions_enabled);
- if ((result != SUCCEED) || (evictions_enabled != TRUE)) {
+ if ((result != SUCCEED) || (evictions_enabled != true)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected evictions enabled 1.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected evictions enabled 1.");
failure_mssg = msg;
}
}
@@ -13179,10 +13173,10 @@ check_evictions_enabled(unsigned paged)
if ((cache_ptr->index_len != 16) || (cache_ptr->index_size != 16 * MONSTER_ENTRY_SIZE) ||
((cache_ptr->slist_enabled) && ((cache_ptr->slist_len != 0) || (cache_ptr->slist_size != 0))) ||
- (cache_ptr->evictions_enabled != TRUE)) {
+ (cache_ptr->evictions_enabled != true)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 2.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 2.");
failure_mssg = msg;
}
}
@@ -13205,10 +13199,10 @@ check_evictions_enabled(unsigned paged)
if ((cache_ptr->index_len != 16) || (cache_ptr->index_size != 16 * MONSTER_ENTRY_SIZE) ||
((cache_ptr->slist_enabled) && ((cache_ptr->slist_len != 0) || (cache_ptr->slist_size != 0))) ||
- (cache_ptr->evictions_enabled != TRUE)) {
+ (cache_ptr->evictions_enabled != true)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 3.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 3.");
failure_mssg = msg;
}
}
@@ -13225,20 +13219,20 @@ check_evictions_enabled(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 1.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 1.");
failure_mssg = msg;
}
else if (in_cache) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 1.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 1.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (!entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 1.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 1.");
failure_mssg = msg;
}
}
@@ -13261,10 +13255,10 @@ check_evictions_enabled(unsigned paged)
if ((cache_ptr->index_len != 16) || (cache_ptr->index_size != 16 * MONSTER_ENTRY_SIZE) ||
((cache_ptr->slist_enabled) &&
((cache_ptr->slist_len != 1) || (cache_ptr->slist_size != MONSTER_ENTRY_SIZE))) ||
- (cache_ptr->evictions_enabled != TRUE)) {
+ (cache_ptr->evictions_enabled != true)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 4.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 4.");
failure_mssg = msg;
}
}
@@ -13281,20 +13275,20 @@ check_evictions_enabled(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 2.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 2.");
failure_mssg = msg;
}
else if (in_cache) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 2.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 2.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (!entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 2.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 2.");
failure_mssg = msg;
}
}
@@ -13305,12 +13299,12 @@ check_evictions_enabled(unsigned paged)
/* disable evictions */
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, FALSE);
+ result = H5C_set_evictions_enabled(cache_ptr, false);
if (result != SUCCEED) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "can't disable evictions 1.");
+ pass = false;
+ snprintf(msg, (size_t)128, "can't disable evictions 1.");
failure_mssg = msg;
}
}
@@ -13324,10 +13318,10 @@ check_evictions_enabled(unsigned paged)
if ((cache_ptr->index_len != 16) || (cache_ptr->index_size != 16 * MONSTER_ENTRY_SIZE) ||
((cache_ptr->slist_enabled) &&
((cache_ptr->slist_len != 1) || (cache_ptr->slist_size != MONSTER_ENTRY_SIZE))) ||
- (cache_ptr->evictions_enabled != FALSE)) {
+ (cache_ptr->evictions_enabled != false)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 5.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 5.");
failure_mssg = msg;
}
}
@@ -13351,10 +13345,10 @@ check_evictions_enabled(unsigned paged)
if ((cache_ptr->index_len != 17) || (cache_ptr->index_size != 17 * MONSTER_ENTRY_SIZE) ||
((cache_ptr->slist_enabled) &&
((cache_ptr->slist_len != 1) || (cache_ptr->slist_size != MONSTER_ENTRY_SIZE))) ||
- (cache_ptr->evictions_enabled != FALSE)) {
+ (cache_ptr->evictions_enabled != false)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 6.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 6.");
failure_mssg = msg;
}
}
@@ -13377,10 +13371,10 @@ check_evictions_enabled(unsigned paged)
if ((cache_ptr->index_len != 18) || (cache_ptr->index_size != 18 * MONSTER_ENTRY_SIZE) ||
((cache_ptr->slist_enabled) &&
((cache_ptr->slist_len != 2) || (cache_ptr->slist_size != 2 * MONSTER_ENTRY_SIZE))) ||
- (cache_ptr->evictions_enabled != FALSE)) {
+ (cache_ptr->evictions_enabled != false)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 7.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 7.");
failure_mssg = msg;
}
}
@@ -13391,12 +13385,12 @@ check_evictions_enabled(unsigned paged)
/* re-enable evictions */
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, TRUE);
+ result = H5C_set_evictions_enabled(cache_ptr, true);
if (result != SUCCEED) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "can't enable evictions 1.");
+ pass = false;
+ snprintf(msg, (size_t)128, "can't enable evictions 1.");
failure_mssg = msg;
}
}
@@ -13420,10 +13414,10 @@ check_evictions_enabled(unsigned paged)
if ((cache_ptr->index_len != 18) || (cache_ptr->index_size != 18 * MONSTER_ENTRY_SIZE) ||
((cache_ptr->slist_enabled) &&
((cache_ptr->slist_len != 2) || (cache_ptr->slist_size != 2 * MONSTER_ENTRY_SIZE))) ||
- (cache_ptr->evictions_enabled != TRUE)) {
+ (cache_ptr->evictions_enabled != true)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 8.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 8.");
failure_mssg = msg;
}
}
@@ -13450,10 +13444,10 @@ check_evictions_enabled(unsigned paged)
if ((cache_ptr->index_len != 16) || (cache_ptr->index_size != 16 * MONSTER_ENTRY_SIZE) ||
((cache_ptr->slist_enabled) &&
((cache_ptr->slist_len != 2) || (cache_ptr->slist_size != 2 * MONSTER_ENTRY_SIZE))) ||
- (cache_ptr->evictions_enabled != TRUE)) {
+ (cache_ptr->evictions_enabled != true)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 9.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 9.");
failure_mssg = msg;
}
}
@@ -13470,20 +13464,20 @@ check_evictions_enabled(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 3.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 3.");
failure_mssg = msg;
}
else if (in_cache) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 3.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 3.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (!entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 3.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 3.");
failure_mssg = msg;
}
}
@@ -13500,20 +13494,20 @@ check_evictions_enabled(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 4.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 4.");
failure_mssg = msg;
}
else if (in_cache) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 4.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 4.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (!entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 4.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 4.");
failure_mssg = msg;
}
}
@@ -13524,12 +13518,12 @@ check_evictions_enabled(unsigned paged)
/* disable evictions again */
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, FALSE);
+ result = H5C_set_evictions_enabled(cache_ptr, false);
if (result != SUCCEED) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "can't disable evictions 2.");
+ pass = false;
+ snprintf(msg, (size_t)128, "can't disable evictions 2.");
failure_mssg = msg;
}
}
@@ -13555,10 +13549,10 @@ check_evictions_enabled(unsigned paged)
if ((cache_ptr->index_len != 17) || (cache_ptr->index_size != 17 * MONSTER_ENTRY_SIZE) ||
((cache_ptr->slist_enabled) &&
((cache_ptr->slist_len != 2) || (cache_ptr->slist_size != 2 * MONSTER_ENTRY_SIZE))) ||
- (cache_ptr->evictions_enabled != FALSE)) {
+ (cache_ptr->evictions_enabled != false)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 10.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 10.");
failure_mssg = msg;
}
}
@@ -13569,12 +13563,12 @@ check_evictions_enabled(unsigned paged)
/* re-enable evictions again */
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, TRUE);
+ result = H5C_set_evictions_enabled(cache_ptr, true);
if (result != SUCCEED) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "can't enable evictions 2.");
+ pass = false;
+ snprintf(msg, (size_t)128, "can't enable evictions 2.");
failure_mssg = msg;
}
}
@@ -13597,10 +13591,10 @@ check_evictions_enabled(unsigned paged)
if ((cache_ptr->index_len != 16) || (cache_ptr->index_size != 16 * MONSTER_ENTRY_SIZE) ||
((cache_ptr->slist_enabled) &&
((cache_ptr->slist_len != 3) || (cache_ptr->slist_size != 3 * MONSTER_ENTRY_SIZE))) ||
- (cache_ptr->evictions_enabled != TRUE)) {
+ (cache_ptr->evictions_enabled != true)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 11.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 11.");
failure_mssg = msg;
}
}
@@ -13617,20 +13611,20 @@ check_evictions_enabled(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 5.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 5.");
failure_mssg = msg;
}
else if (in_cache) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 5.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 5.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (!entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 5.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 5.");
failure_mssg = msg;
}
}
@@ -13641,12 +13635,12 @@ check_evictions_enabled(unsigned paged)
/* disable evictions one last time before we shut down */
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, FALSE);
+ result = H5C_set_evictions_enabled(cache_ptr, false);
if (result != SUCCEED) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "can't disable evictions 3.");
+ pass = false;
+ snprintf(msg, (size_t)128, "can't disable evictions 3.");
failure_mssg = msg;
}
}
@@ -13656,7 +13650,7 @@ check_evictions_enabled(unsigned paged)
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (show_progress) /* 34 */
@@ -13700,7 +13694,7 @@ check_flush_protected_err(unsigned paged)
else
TESTING("flush cache with protected entry error");
- pass = TRUE;
+ pass = true;
/* allocate a cache, protect an entry, and try to flush. This
* should fail. Unprotect the entry and flush again -- should
@@ -13721,22 +13715,22 @@ check_flush_protected_err(unsigned paged)
protect_entry(file_ptr, 0, 0);
/* enable slist prior to flush */
- if ((pass) && (H5C_set_slist_enabled(cache_ptr, TRUE, FALSE) < 0)) {
+ if ((pass) && (H5C_set_slist_enabled(cache_ptr, true, false) < 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unable to enable slist prior to flush.\n";
}
if ((pass) && (H5C_flush_cache(file_ptr, H5C__NO_FLAGS_SET) >= 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "flush succeeded on cache with protected entry.\n";
}
/* disable the slist after the flush */
- if ((pass) && (H5C_set_slist_enabled(cache_ptr, FALSE, FALSE) < 0)) {
+ if ((pass) && (H5C_set_slist_enabled(cache_ptr, false, false) < 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unable to disable slist after flush.\n";
}
@@ -13747,7 +13741,7 @@ check_flush_protected_err(unsigned paged)
H5C_FLUSH_CACHE(file_ptr, H5C__NO_FLAGS_SET, "flush failed after unprotect.\n")
}
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -13787,7 +13781,7 @@ check_destroy_pinned_err(unsigned paged)
else
TESTING("destroy cache with permanently pinned entry error");
- pass = TRUE;
+ pass = true;
/* allocate a cache, pin an entry, and try to flush destroy. This
* should fail. Unpin the entry and flush destroy again -- should
@@ -13803,19 +13797,19 @@ check_destroy_pinned_err(unsigned paged)
unprotect_entry(file_ptr, 0, 0, H5C__PIN_ENTRY_FLAG);
if (H5C_prep_for_file_close(file_ptr) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected failure of prep for file close.\n";
} /* end if */
if (H5C_dest(file_ptr) >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "destroy succeeded on cache with pinned entry.\n";
} /* end if */
else {
unpin_entry(0, 0);
if (H5C_dest(file_ptr) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "destroy failed after unpin.\n";
} /* end if */
else
@@ -13831,7 +13825,7 @@ check_destroy_pinned_err(unsigned paged)
* This causes the function to close and delete the file,
* while skipping the call to H5C_dest().
*/
- takedown_cache(NULL, FALSE, FALSE);
+ takedown_cache(NULL, false, false);
} /* end if */
if (pass) {
@@ -13869,7 +13863,7 @@ check_destroy_protected_err(unsigned paged)
else
TESTING("destroy cache with protected entry error");
- pass = TRUE;
+ pass = true;
/* allocate a cache, protect an entry, and try to flush. This
* should fail. Unprotect the entry and flush again -- should
@@ -13892,20 +13886,20 @@ check_destroy_protected_err(unsigned paged)
* prior to the final protect call.
*/
if (H5C_prep_for_file_close(file_ptr) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected failure of prep for file close.\n";
} /* end if */
protect_entry(file_ptr, 0, 0);
if (H5C_dest(file_ptr) >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "destroy succeeded on cache with protected entry.\n";
} /* end if */
else {
unprotect_entry(file_ptr, 0, 0, H5C__DIRTIED_FLAG);
if (H5C_dest(file_ptr) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "destroy failed after unprotect.\n";
} /* end if */
else {
@@ -13922,7 +13916,7 @@ check_destroy_protected_err(unsigned paged)
* This causes the function to close and delete the file,
* while skipping the call to H5C_dest().
*/
- takedown_cache(NULL, FALSE, FALSE);
+ takedown_cache(NULL, false, false);
} /* end if */
if (pass) {
@@ -13963,7 +13957,7 @@ check_duplicate_insert_err(unsigned paged)
else
TESTING("duplicate entry insertion error");
- pass = TRUE;
+ pass = true;
/* allocate a cache, protect an entry, and then try to insert
* the entry again. This should fail. Unprotect the entry and
@@ -13988,14 +13982,14 @@ check_duplicate_insert_err(unsigned paged)
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "insert of duplicate entry succeeded.\n";
}
else {
unprotect_entry(file_ptr, 0, 0, H5C__DIRTIED_FLAG);
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
}
}
@@ -14039,7 +14033,7 @@ check_double_pin_err(unsigned paged)
else
TESTING("pin a pinned entry error");
- pass = TRUE;
+ pass = true;
/* allocate a cache, protect an entry, unprotect it with the pin flag,
* protect it again, and then try to unprotect it again with the pin
@@ -14068,7 +14062,7 @@ check_double_pin_err(unsigned paged)
if (result > 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "attempt to pin a pinned entry succeeded.\n";
}
else {
@@ -14079,7 +14073,7 @@ check_double_pin_err(unsigned paged)
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -14121,7 +14115,7 @@ check_double_unpin_err(unsigned paged)
else
TESTING("unpin an unpinned entry error");
- pass = TRUE;
+ pass = true;
/* allocate a cache, protect an entry, unprotect it with the unpin flag.
* -- This should fail.
@@ -14148,7 +14142,7 @@ check_double_unpin_err(unsigned paged)
if (result > 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "attempt to unpin an unpinned entry succeeded 1.\n";
}
else {
@@ -14163,14 +14157,14 @@ check_double_unpin_err(unsigned paged)
if (result > 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "attempt to unpin an unpinned entry succeeded 2.\n";
}
}
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -14212,7 +14206,7 @@ check_pin_entry_errs(unsigned paged)
else
TESTING("pin entry related errors");
- pass = TRUE;
+ pass = true;
/* Allocate a cache, protect an entry, unprotect it with no flags,
* and then call H5C_pin_protected_entry() to pin it -- This should fail.
@@ -14245,7 +14239,7 @@ check_pin_entry_errs(unsigned paged)
if (result > 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "attempt to pin an unprotected entry succeeded.\n";
}
else {
@@ -14264,7 +14258,7 @@ check_pin_entry_errs(unsigned paged)
if (result > 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "attempt to pin a pinned, protected entry succeeded.\n";
}
else {
@@ -14275,7 +14269,7 @@ check_pin_entry_errs(unsigned paged)
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -14317,7 +14311,7 @@ check_double_protect_err(unsigned paged)
else
TESTING("protect a protected entry error");
- pass = TRUE;
+ pass = true;
/* allocate a cache, protect an entry, and then try to protect
* the entry again. This should fail. Unprotect the entry and
@@ -14342,7 +14336,7 @@ check_double_protect_err(unsigned paged)
if (cache_entry_ptr != NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "attempt to protect a protected entry succeeded.\n";
}
}
@@ -14354,7 +14348,7 @@ check_double_protect_err(unsigned paged)
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -14396,7 +14390,7 @@ check_double_unprotect_err(unsigned paged)
else
TESTING("unprotect an unprotected entry error");
- pass = TRUE;
+ pass = true;
/* allocate a cache, protect an entry, unprotect it, and then try to
* unprotect the entry again. This should fail. Destroy the cache
@@ -14422,14 +14416,14 @@ check_double_unprotect_err(unsigned paged)
if (result > 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "attempt to unprotect an unprotected entry succeeded 1.\n";
}
}
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -14474,7 +14468,7 @@ check_mark_entry_dirty_errs(unsigned paged)
else
TESTING("mark entry dirty related errors");
- pass = TRUE;
+ pass = true;
/* allocate a cache, protect an entry, unprotect the entry without
* pinning it, and try to mark it dirty -- this should fail.
@@ -14501,14 +14495,14 @@ check_mark_entry_dirty_errs(unsigned paged)
if (result > 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "attempt to dirty a unpinned and unprotected entry succeeded.\n";
}
}
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -14550,7 +14544,7 @@ check_expunge_entry_errs(unsigned paged)
else
TESTING("expunge entry related errors");
- pass = TRUE;
+ pass = true;
/* Allocate a cache, protect an entry, and then call H5C_expunge_entry()
* to expunge it -- this should fail
@@ -14581,7 +14575,7 @@ check_expunge_entry_errs(unsigned paged)
if (result > 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "attempt to expunge a protected entry succeeded.\n";
}
else {
@@ -14596,7 +14590,7 @@ check_expunge_entry_errs(unsigned paged)
if (result > 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "attempt to expunge a pinned entry succeeded.\n";
}
else {
@@ -14611,14 +14605,14 @@ check_expunge_entry_errs(unsigned paged)
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "attempt to expunge an unpinned and unprotected entry failed.\n";
}
}
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -14663,7 +14657,7 @@ check_move_entry_errs(unsigned paged)
else
TESTING("move entry related errors");
- pass = TRUE;
+ pass = true;
/* allocate a cache, and insert several entries. Try to move
* entries to other entries resident in the cache. This should
@@ -14689,7 +14683,7 @@ check_move_entry_errs(unsigned paged)
result = H5C_move_entry(cache_ptr, types[0], entry_0_0_ptr->addr, entry_0_1_ptr->addr);
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "move to addr of same type succeeded.\n";
} /* end if */
} /* end if */
@@ -14698,13 +14692,13 @@ check_move_entry_errs(unsigned paged)
result = H5C_move_entry(cache_ptr, types[0], entry_0_0_ptr->addr, entry_1_0_ptr->addr);
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "move to addr of different type succeeded.\n";
} /* end if */
} /* end if */
if (pass)
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
/* Allocate a cache, protect an entry R/O, and then call
* H5C_move_entry() to move it -- this should fail.
@@ -14729,7 +14723,7 @@ check_move_entry_errs(unsigned paged)
result = H5C_move_entry(cache_ptr, types[0], entry_ptr->header.addr, entry_ptr->header.addr + 10);
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Call to H5C_move_entry on a R/O protected entry succeeded.\n";
} /* end if */
else
@@ -14737,7 +14731,7 @@ check_move_entry_errs(unsigned paged)
} /* end if */
if (pass)
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
if (pass)
PASSED();
@@ -14773,7 +14767,7 @@ check_resize_entry_errs(unsigned paged)
else
TESTING("resize entry related errors");
- pass = TRUE;
+ pass = true;
/* Allocate a cache, protect an entry, and then call
* H5C_resize_entry() to resize it -- this should succeed.
@@ -14803,7 +14797,7 @@ check_resize_entry_errs(unsigned paged)
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Call to H5C_resize_entry on a protected entry failed.\n";
}
else {
@@ -14818,7 +14812,7 @@ check_resize_entry_errs(unsigned paged)
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Call to H5C_resize_entry with 0 new size succeeded.\n";
}
else {
@@ -14829,7 +14823,7 @@ check_resize_entry_errs(unsigned paged)
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -14871,7 +14865,7 @@ check_unprotect_ro_dirty_err(unsigned paged)
else
TESTING("unprotect a read only entry dirty error");
- pass = TRUE;
+ pass = true;
/* allocate a cache, protect an entry read only, and then unprotect it
* with the dirtied flag set. This should fail. Destroy the cache
@@ -14895,7 +14889,7 @@ check_unprotect_ro_dirty_err(unsigned paged)
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "attempt to unprotect a ro entry dirty succeeded 1.\n";
}
}
@@ -14907,7 +14901,7 @@ check_unprotect_ro_dirty_err(unsigned paged)
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
/* allocate a another cache, protect an entry read only twice, and
@@ -14934,7 +14928,7 @@ check_unprotect_ro_dirty_err(unsigned paged)
if (result > 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "attempt to unprotect a ro entry dirty succeeded 2.\n";
}
}
@@ -14947,7 +14941,7 @@ check_unprotect_ro_dirty_err(unsigned paged)
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -14989,7 +14983,7 @@ check_protect_ro_rw_err(unsigned paged)
else
TESTING("protect a read only entry rw error");
- pass = TRUE;
+ pass = true;
/* allocate a cache, protect an entry read only, and then try to protect
* it again rw. This should fail.
@@ -15015,7 +15009,7 @@ check_protect_ro_rw_err(unsigned paged)
if (thing_ptr != NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "attempt to protect a ro entry rw succeeded.\n";
}
}
@@ -15027,7 +15021,7 @@ check_protect_ro_rw_err(unsigned paged)
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -15072,7 +15066,7 @@ check_protect_retries(unsigned paged)
else
TESTING("protect an entry to verify retries");
- pass = TRUE;
+ pass = true;
/* Set up the cache */
if (pass) {
@@ -15098,7 +15092,7 @@ check_protect_retries(unsigned paged)
/* test case (1):
* --actual_len is smaller the initial length from get_load_size()
- * --verify_chksum() returns TRUE after max_verify_ct is reached
+ * --verify_chksum() returns true after max_verify_ct is reached
*
*/
entry_ptr->actual_len = entry_ptr->size / 2;
@@ -15114,7 +15108,7 @@ check_protect_retries(unsigned paged)
(entry_ptr->addr != entry_ptr->header.addr) ||
(entry_ptr->verify_ct != entry_ptr->max_verify_ct)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "error from H5C_protect().";
}
else {
@@ -15123,8 +15117,8 @@ check_protect_retries(unsigned paged)
entry_ptr->cache_ptr = cache_ptr;
entry_ptr->file_ptr = file_ptr;
- entry_ptr->is_protected = TRUE;
- entry_ptr->is_read_only = TRUE;
+ entry_ptr->is_protected = true;
+ entry_ptr->is_read_only = true;
entry_ptr->ro_ref_count++;
}
@@ -15139,7 +15133,7 @@ check_protect_retries(unsigned paged)
/* test case (2):
* --actual_len is greater the initial length from get_load_size()
- * --verify_chksum() returns FALSE even after all tries is reached
+ * --verify_chksum() returns false even after all tries is reached
* (file_ptr->shared->read_attempts is smaller then max_verify_ct)
*/
entry_ptr->actual_len = entry_ptr->size * 2;
@@ -15151,10 +15145,10 @@ check_protect_retries(unsigned paged)
/* H5C_protect() should fail after all retries fail */
if (cache_entry_ptr != NULL)
- pass = FALSE;
+ pass = false;
}
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
reset_entries();
if (pass) {
@@ -15187,17 +15181,17 @@ check_protect_retries(unsigned paged)
static unsigned
check_check_evictions_enabled_err(unsigned paged)
{
- herr_t result;
- hbool_t evictions_enabled;
- H5F_t *file_ptr = NULL;
- H5C_t *cache_ptr = NULL;
+ herr_t result;
+ bool evictions_enabled;
+ H5F_t *file_ptr = NULL;
+ H5C_t *cache_ptr = NULL;
if (paged)
TESTING("get/set evictions enabled errors (paged aggregation)");
else
TESTING("get/set evictions enabled errors");
- pass = TRUE;
+ pass = true;
/* allocate a cache.
*
@@ -15226,7 +15220,7 @@ check_check_evictions_enabled_err(unsigned paged)
if (result == SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_evictions_enabled succeeded() 1.\n";
}
}
@@ -15237,18 +15231,18 @@ check_check_evictions_enabled_err(unsigned paged)
if (result == SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_evictions_enabled succeeded() 2.\n";
}
}
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, TRUE);
+ result = H5C_set_evictions_enabled(cache_ptr, true);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_evictions_enabled failed().\n";
}
}
@@ -15257,14 +15251,14 @@ check_check_evictions_enabled_err(unsigned paged)
(cache_ptr->resize_ctl).incr_mode = H5C_incr__threshold;
- result = H5C_get_evictions_enabled(cache_ptr, FALSE);
+ result = H5C_get_evictions_enabled(cache_ptr, false);
if (result == SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_evictions_enabled succeeded() 1.\n";
}
- else if (cache_ptr->evictions_enabled == TRUE) {
+ else if (cache_ptr->evictions_enabled == true) {
}
(cache_ptr->resize_ctl).incr_mode = H5C_incr__off;
@@ -15274,11 +15268,11 @@ check_check_evictions_enabled_err(unsigned paged)
(cache_ptr->resize_ctl).decr_mode = H5C_decr__threshold;
- result = H5C_get_evictions_enabled(cache_ptr, FALSE);
+ result = H5C_get_evictions_enabled(cache_ptr, false);
if (result == SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_evictions_enabled succeeded() 2.\n";
}
@@ -15287,7 +15281,7 @@ check_check_evictions_enabled_err(unsigned paged)
if (cache_ptr) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -15319,7 +15313,7 @@ check_check_evictions_enabled_err(unsigned paged)
*-------------------------------------------------------------------------
*/
-hbool_t rpt_fcn_called = FALSE;
+bool rpt_fcn_called = false;
enum H5C_resize_status rpt_status;
static void
@@ -15328,14 +15322,14 @@ test_rpt_fcn(H5_ATTR_UNUSED H5C_t *cache_ptr, H5_ATTR_UNUSED int32_t version, H5
H5_ATTR_UNUSED size_t new_max_cache_size, H5_ATTR_UNUSED size_t old_min_clean_size,
H5_ATTR_UNUSED size_t new_min_clean_size)
{
- rpt_fcn_called = TRUE;
+ rpt_fcn_called = true;
rpt_status = status;
}
static unsigned
-check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
+check_auto_cache_resize(bool cork_ageout, unsigned paged)
{
- hbool_t show_progress = FALSE;
+ bool show_progress = false;
herr_t result;
int32_t i;
int32_t checkpoint = 0;
@@ -15345,7 +15339,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
/* int32_t version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* H5C_auto_resize_report_fcn rpt_fcn = */ test_rpt_fcn,
- /* hbool_t set_initial_size = */ TRUE,
+ /* bool set_initial_size = */ true,
/* size_t initial_size = */ (512 * 1024),
/* double min_clean_fraction = */ 0.5,
@@ -15361,7 +15355,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
/* double increment = */ 2.0,
- /* hbool_t apply_max_increment = */ TRUE,
+ /* bool apply_max_increment = */ true,
/* size_t max_increment = */ (4 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
@@ -15375,12 +15369,12 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
/* double decrement = */ 0.1,
- /* hbool_t apply_max_decrement = */ TRUE,
+ /* bool apply_max_decrement = */ true,
/* size_t max_decrement = */ (1 * 1024 * 1024),
/* int32_t epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
+ /* bool apply_empty_reserve = */ true,
/* double empty_reserve = */ 0.05};
if (paged)
@@ -15388,7 +15382,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
else
TESTING("automatic cache resizing");
- pass = TRUE;
+ pass = true;
if (show_progress)
fprintf(stderr, "check point %d\n", checkpoint++);
@@ -15408,7 +15402,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) {
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 1.\n";
}
}
@@ -15416,7 +15410,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) {
if ((cache_ptr->max_cache_size != (512 * 1024)) || (cache_ptr->min_clean_size != (256 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after initialization.\n";
}
}
@@ -15428,7 +15422,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
* full status.
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, PICO_ENTRY_TYPE, i);
@@ -15441,7 +15435,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != not_full) || (cache_ptr->max_cache_size != (512 * 1024)) ||
(cache_ptr->min_clean_size != (256 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 1.\n";
}
}
@@ -15454,7 +15448,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -15467,7 +15461,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != increase) ||
(cache_ptr->max_cache_size != (1 * 1024 * 1024)) || (cache_ptr->min_clean_size != (512 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 2.\n";
}
}
@@ -15480,7 +15474,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, PICO_ENTRY_TYPE, i);
@@ -15493,7 +15487,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != not_full) ||
(cache_ptr->max_cache_size != (1 * 1024 * 1024)) || (cache_ptr->min_clean_size != (512 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 3.\n";
}
}
@@ -15506,7 +15500,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -15520,7 +15514,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 4.\n";
}
}
@@ -15533,7 +15527,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -15547,7 +15541,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 5.\n";
}
}
@@ -15560,7 +15554,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -15574,7 +15568,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 6.\n";
}
}
@@ -15588,7 +15582,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -15602,7 +15596,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (12 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (6 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 7.\n";
}
}
@@ -15615,7 +15609,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -15629,7 +15623,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (14 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (7 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 8.\n";
}
}
@@ -15642,7 +15636,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -15656,7 +15650,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (14 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (7 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 9.\n";
}
}
@@ -15670,7 +15664,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -15684,7 +15678,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (13 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (6 * 1024 * 1024 + 512 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 10.\n";
}
}
@@ -15702,7 +15696,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 4 * 1000 * 1000 + 10;
auto_size_ctl.min_clean_fraction = 0.1;
@@ -15718,7 +15712,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (4 * 1000 * 1000);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -15731,17 +15725,17 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = TRUE;
+ auto_size_ctl.apply_max_decrement = true;
auto_size_ctl.max_decrement = (1 * 1000 * 1000);
auto_size_ctl.epochs_before_eviction = 3;
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 2.\n";
}
}
@@ -15751,7 +15745,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((cache_ptr->max_cache_size != (4 * 1000 * 1000 + 10)) ||
(cache_ptr->min_clean_size != (400 * 1000 + 1))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 1.\n";
}
}
@@ -15764,7 +15758,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -15778,7 +15772,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (3 * 1000 * 1000 + 10)) ||
(cache_ptr->min_clean_size != (300 * 1000 + 1))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 11.\n";
}
}
@@ -15792,7 +15786,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -15806,7 +15800,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (2 * 1000 * 1000 + 10)) ||
(cache_ptr->min_clean_size != (200 * 1000 + 1))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 12.\n";
}
}
@@ -15820,7 +15814,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -15834,7 +15828,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (1 * 1000 * 1000 + 10)) ||
(cache_ptr->min_clean_size != (100 * 1000 + 1))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 13.\n";
}
}
@@ -15848,7 +15842,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -15861,7 +15855,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != decrease) ||
(cache_ptr->max_cache_size != (500 * 1000 + 5)) || (cache_ptr->min_clean_size != (50 * 1000))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 14.\n";
}
}
@@ -15874,7 +15868,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -15887,7 +15881,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != decrease) || (cache_ptr->max_cache_size != (500 * 1000)) ||
(cache_ptr->min_clean_size != (50 * 1000))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 15.\n";
}
}
@@ -15900,7 +15894,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -15913,7 +15907,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != at_min_size) || (cache_ptr->max_cache_size != (500 * 1000)) ||
(cache_ptr->min_clean_size != (50 * 1000))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 16.\n";
}
}
@@ -15926,7 +15920,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 900)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -15947,7 +15941,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != in_spec) || (cache_ptr->max_cache_size != (500 * 1000)) ||
(cache_ptr->min_clean_size != (50 * 1000))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 17.\n";
}
}
@@ -15960,7 +15954,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -15973,7 +15967,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != increase) ||
(cache_ptr->max_cache_size != (1 * 1000 * 1000)) || (cache_ptr->min_clean_size != (100 * 1000))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 18.\n";
}
}
@@ -15986,7 +15980,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -15999,7 +15993,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != decrease) || (cache_ptr->max_cache_size != (500 * 1000)) ||
(cache_ptr->min_clean_size != (50 * 1000))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 19.\n";
}
}
@@ -16017,7 +16011,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 4 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -16033,7 +16027,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.increment = 4.0;
- auto_size_ctl.apply_max_increment = FALSE;
+ auto_size_ctl.apply_max_increment = false;
auto_size_ctl.max_increment = (4 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -16046,17 +16040,17 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.decrement = 0.25;
- auto_size_ctl.apply_max_decrement = FALSE;
+ auto_size_ctl.apply_max_decrement = false;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 3;
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 3.\n";
}
}
@@ -16066,7 +16060,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 2.\n";
}
}
@@ -16079,7 +16073,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -16092,7 +16086,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != decrease) ||
(cache_ptr->max_cache_size != (1 * 1024 * 1024)) || (cache_ptr->min_clean_size != (512 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 20.\n";
}
}
@@ -16105,7 +16099,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -16119,7 +16113,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 21.\n";
}
}
@@ -16132,7 +16126,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -16146,7 +16140,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (16 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (8 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 22.\n";
}
}
@@ -16159,7 +16153,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -16173,7 +16167,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 23.\n";
}
}
@@ -16193,7 +16187,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 8 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -16209,7 +16203,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (4 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -16222,17 +16216,17 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = FALSE;
+ auto_size_ctl.apply_max_decrement = false;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 3;
- auto_size_ctl.apply_empty_reserve = FALSE;
+ auto_size_ctl.apply_empty_reserve = false;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 4.\n";
}
}
@@ -16242,7 +16236,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 3.\n";
}
}
@@ -16261,7 +16255,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
* not be able to.
*/
if (pass) { /* first epoch */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16275,7 +16269,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 24.\n";
}
}
@@ -16284,7 +16278,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) { /* second epoch */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 1000;
while (pass && (i < 2000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16298,7 +16292,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 25.\n";
}
}
@@ -16307,7 +16301,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) { /* third epoch */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 2000;
while (pass && (i < 3000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16321,7 +16315,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 26.\n";
}
}
@@ -16334,7 +16328,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
* happen until we get the hit rate above the lower threshold.
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 3000;
while (pass && (i < 4000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16348,7 +16342,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 27.\n";
}
}
@@ -16360,7 +16354,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
* reduction now.
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 3000;
while (pass && (i < 4000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16373,7 +16367,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != decrease) || (cache_ptr->max_cache_size != (2001 * 1024)) ||
(cache_ptr->min_clean_size != (int)(2001 * 512))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 28.\n";
}
}
@@ -16384,7 +16378,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
/* sixth epoch -- force the hit rate to 100% again.
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 3000;
while (pass && (i < 4000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16397,7 +16391,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != decrease) || (cache_ptr->max_cache_size != (1001 * 1024)) ||
(cache_ptr->min_clean_size != (int)(1001 * 512))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 29.\n";
}
}
@@ -16408,7 +16402,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
/* seventh epoch -- force the hit rate to 100% again.
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 3000;
while (pass && (i < 4000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16421,7 +16415,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != decrease) || (cache_ptr->max_cache_size != (1000 * 1024)) ||
(cache_ptr->min_clean_size != (int)(1000 * 512))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 30.\n";
}
}
@@ -16433,7 +16427,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
* state.
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 3000;
while (pass && (i < 4000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16446,7 +16440,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != in_spec) || (cache_ptr->max_cache_size != (1000 * 1024)) ||
(cache_ptr->min_clean_size != (int)(1000 * 512))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 31.\n";
}
}
@@ -16459,7 +16453,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
* should be decreased to the minimum.
*/
if (pass) { /* ninth epoch */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -16472,7 +16466,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != in_spec) || (cache_ptr->max_cache_size != (1000 * 1024)) ||
(cache_ptr->min_clean_size != (int)(1000 * 512))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 32.\n";
}
}
@@ -16481,7 +16475,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) { /* tenth epoch */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -16494,7 +16488,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != in_spec) || (cache_ptr->max_cache_size != (1000 * 1024)) ||
(cache_ptr->min_clean_size != (int)(1000 * 512))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 33.\n";
}
}
@@ -16503,7 +16497,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) { /* eleventh epoch -- cache size reduction */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -16517,7 +16511,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (256 * 1024)) || (cache_ptr->index_len != 2) ||
(cache_ptr->index_size != MONSTER_ENTRY_SIZE + MEDIUM_ENTRY_SIZE)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 34.\n";
}
}
@@ -16526,7 +16520,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) { /* twelfth epoch -- at minimum size so no more ageouts */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -16540,7 +16534,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (256 * 1024)) || (cache_ptr->index_len != 2) ||
(cache_ptr->index_size != MONSTER_ENTRY_SIZE + MEDIUM_ENTRY_SIZE)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 35.\n";
}
}
@@ -16561,7 +16555,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 8 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -16577,7 +16571,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (4 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -16590,19 +16584,19 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = TRUE;
+ auto_size_ctl.apply_max_decrement = true;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 3;
- auto_size_ctl.apply_empty_reserve = FALSE;
+ auto_size_ctl.apply_empty_reserve = false;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 5.\n";
}
}
@@ -16612,7 +16606,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 4.\n";
}
}
@@ -16629,7 +16623,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) { /* first epoch */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16643,7 +16637,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 36.\n";
}
}
@@ -16653,7 +16647,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) { /* second epoch */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 1000;
while (pass && (i < 2000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16667,7 +16661,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 37.\n";
}
}
@@ -16677,7 +16671,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) { /* third epoch */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 2000;
while (pass && (i < 3000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16691,7 +16685,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 38.\n";
}
}
@@ -16705,7 +16699,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 3000;
while (pass && (i < 4000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16719,7 +16713,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 39.\n";
}
}
@@ -16732,7 +16726,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 3000;
while (pass && (i < 4000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16746,7 +16740,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (7 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (7 * 512 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 40.\n";
}
}
@@ -16758,7 +16752,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 2000;
while (pass && (i < 3000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16772,7 +16766,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (6 * 512 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 41.\n";
}
}
@@ -16784,7 +16778,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 3000;
while (pass && (i < 4000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16798,7 +16792,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (5 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (5 * 512 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 42.\n";
}
}
@@ -16810,7 +16804,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 2000;
while (pass && (i < 3000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16824,7 +16818,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 512 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 43.\n";
}
}
@@ -16836,7 +16830,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 3000;
while (pass && (i < 4000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16850,7 +16844,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (3 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (3 * 512 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 44.\n";
}
}
@@ -16862,7 +16856,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 2000;
while (pass && (i < 3000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16876,7 +16870,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 512 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 45.\n";
}
}
@@ -16888,7 +16882,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 3000;
while (pass && (i < 4000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16901,7 +16895,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != decrease) || (cache_ptr->max_cache_size != (2000 * 1024)) ||
(cache_ptr->min_clean_size != (int)(2000 * 512))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 46.\n";
}
}
@@ -16914,7 +16908,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 2000;
while (pass && (i < 3000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16927,7 +16921,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != in_spec) || (cache_ptr->max_cache_size != (2000 * 1024)) ||
(cache_ptr->min_clean_size != (int)(2000 * 512))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 47.\n";
}
}
@@ -16941,7 +16935,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) { /* thirteenth epoch */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -16954,7 +16948,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != in_spec) || (cache_ptr->max_cache_size != (2000 * 1024)) ||
(cache_ptr->min_clean_size != (int)(2000 * 512))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 48.\n";
}
}
@@ -16964,7 +16958,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) { /* fourteenth epoch */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -16978,7 +16972,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (1001 * 1024 + MONSTER_ENTRY_SIZE)) ||
(cache_ptr->min_clean_size != (1001 * 512 + MONSTER_ENTRY_SIZE / 2))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 49.\n";
}
}
@@ -16988,7 +16982,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) { /* fifteenth epoch -- cache size reduction */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -17002,7 +16996,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (256 * 1024)) || (cache_ptr->index_len != 2) ||
(cache_ptr->index_size != MONSTER_ENTRY_SIZE + MEDIUM_ENTRY_SIZE)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 50.\n";
}
}
@@ -17012,7 +17006,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) { /* sixteenth epoch -- at minimum size so no more ageouts */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -17026,7 +17020,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (256 * 1024)) || (cache_ptr->index_len != 2) ||
(cache_ptr->index_size != MONSTER_ENTRY_SIZE + MEDIUM_ENTRY_SIZE)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 51.\n";
}
}
@@ -17043,7 +17037,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 8 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -17059,7 +17053,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (4 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -17072,19 +17066,19 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = FALSE;
+ auto_size_ctl.apply_max_decrement = false;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 3;
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.5; /* for ease of testing */
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 6.\n";
}
}
@@ -17094,7 +17088,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 5.\n";
}
}
@@ -17111,7 +17105,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) { /* first epoch */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -17125,7 +17119,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 52.\n";
}
}
@@ -17135,7 +17129,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) { /* second epoch */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 1000;
while (pass && (i < 2000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -17149,7 +17143,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 53.\n";
}
}
@@ -17159,7 +17153,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) { /* third epoch */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 2000;
while (pass && (i < 3000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -17173,7 +17167,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 54.\n";
}
}
@@ -17187,7 +17181,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 3000;
while (pass && (i < 4000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -17201,7 +17195,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 55.\n";
}
}
@@ -17214,7 +17208,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 3000;
while (pass && (i < 4000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -17227,7 +17221,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != decrease) || (cache_ptr->max_cache_size != (4002 * 1024)) ||
(cache_ptr->min_clean_size != (int)(4002 * 512))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 56.\n";
}
}
@@ -17239,7 +17233,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 3000;
while (pass && (i < 4000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -17252,7 +17246,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != decrease) || (cache_ptr->max_cache_size != (2002 * 1024)) ||
(cache_ptr->min_clean_size != (int)(2002 * 512))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 57.\n";
}
}
@@ -17264,7 +17258,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 3000;
while (pass && (i < 4000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -17277,7 +17271,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != decrease) || (cache_ptr->max_cache_size != (2000 * 1024)) ||
(cache_ptr->min_clean_size != (int)(2000 * 512))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 58.\n";
}
}
@@ -17290,7 +17284,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 3000;
while (pass && (i < 4000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -17303,7 +17297,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != in_spec) || (cache_ptr->max_cache_size != (2000 * 1024)) ||
(cache_ptr->min_clean_size != (int)(2000 * 512))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 59.\n";
}
}
@@ -17317,7 +17311,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) { /* ninth epoch */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -17330,7 +17324,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != in_spec) || (cache_ptr->max_cache_size != (2000 * 1024)) ||
(cache_ptr->min_clean_size != (int)(2000 * 512))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 60.\n";
}
}
@@ -17340,7 +17334,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) { /* tenth epoch */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -17353,7 +17347,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != in_spec) || (cache_ptr->max_cache_size != (2000 * 1024)) ||
(cache_ptr->min_clean_size != (2000 * 512))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 61.\n";
}
}
@@ -17363,7 +17357,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) { /* eleventh epoch -- cache size reduction */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -17377,7 +17371,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (256 * 1024)) || (cache_ptr->index_len != 2) ||
(cache_ptr->index_size != MONSTER_ENTRY_SIZE + MEDIUM_ENTRY_SIZE)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 62.\n";
}
}
@@ -17387,7 +17381,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) { /* twelfth epoch -- at minimum size so no more ageouts */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -17401,7 +17395,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (256 * 1024)) || (cache_ptr->index_len != 2) ||
(cache_ptr->index_size != MONSTER_ENTRY_SIZE + MEDIUM_ENTRY_SIZE)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 63.\n";
}
}
@@ -17420,7 +17414,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 8 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -17436,7 +17430,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (4 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -17452,17 +17446,17 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = FALSE;
+ auto_size_ctl.apply_max_decrement = false;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 1; /* for ease of testing */
- auto_size_ctl.apply_empty_reserve = FALSE;
+ auto_size_ctl.apply_empty_reserve = false;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 7.\n";
}
}
@@ -17472,7 +17466,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 6.\n";
}
}
@@ -17486,7 +17480,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) { /* first epoch -- hit rate 0 */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
@@ -17500,7 +17494,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 64.\n";
}
}
@@ -17510,7 +17504,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) { /* second epoch -- hit rate 0 */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 1000;
while (pass && (i < 2000)) {
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
@@ -17524,7 +17518,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 65.\n";
}
}
@@ -17534,7 +17528,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) { /* third epoch -- hit rate 1.0 -- should see decrease */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
@@ -17548,7 +17542,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (1001 * LARGE_ENTRY_SIZE)) ||
(cache_ptr->min_clean_size != (1001 * LARGE_ENTRY_SIZE / 2))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 66.\n";
}
}
@@ -17559,7 +17553,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
/* fourth epoch -- load up the cache again -- hit rate 0 */
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -17573,7 +17567,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (1001 * LARGE_ENTRY_SIZE)) ||
(cache_ptr->min_clean_size != (1001 * LARGE_ENTRY_SIZE / 2))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 67.\n";
}
}
@@ -17584,7 +17578,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
/* fifth epoch -- still loading up the cache -- hit rate 0 */
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 1000;
while (pass && (i < 2000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -17598,7 +17592,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (1001 * LARGE_ENTRY_SIZE)) ||
(cache_ptr->min_clean_size != (1001 * LARGE_ENTRY_SIZE / 2))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 68.\n";
}
}
@@ -17609,7 +17603,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
/* sixth epoch -- force hit rate to .998 -- should be no reduction */
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 1002;
while (pass && (i < 2002)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -17623,7 +17617,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (1001 * LARGE_ENTRY_SIZE)) ||
(cache_ptr->min_clean_size != (1001 * LARGE_ENTRY_SIZE / 2))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 69.\n";
}
}
@@ -17635,7 +17629,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 1003;
while (pass && (i < 2003)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -17649,7 +17643,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (1000 * MEDIUM_ENTRY_SIZE)) ||
(cache_ptr->min_clean_size != (1000 * MEDIUM_ENTRY_SIZE / 2))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 70.\n";
}
}
@@ -17667,7 +17661,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 8 * 1000 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -17683,7 +17677,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (4 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -17696,17 +17690,17 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = TRUE;
+ auto_size_ctl.apply_max_decrement = true;
auto_size_ctl.max_decrement = (1 * 1000 * 1024);
auto_size_ctl.epochs_before_eviction = 1; /* for ease of testing */
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.5; /* for ease of testing */
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 8.\n";
}
}
@@ -17716,7 +17710,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((cache_ptr->max_cache_size != (8 * 1000 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1000 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 7.\n";
}
}
@@ -17730,7 +17724,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) { /* first epoch -- hit rate 0 */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
@@ -17744,7 +17738,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (8 * 1000 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1000 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 71.\n";
}
}
@@ -17754,7 +17748,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) { /* second epoch -- hit rate 0 */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 1000;
while (pass && (i < 2000)) {
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
@@ -17768,7 +17762,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (8 * 1000 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1000 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 72.\n";
}
}
@@ -17786,7 +17780,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
@@ -17801,7 +17795,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (4 * 1000 * 1024)) ||
(cache_ptr->index_size != (7 * 1000 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 73.\n";
}
}
@@ -17814,7 +17808,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
@@ -17829,7 +17823,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (4 * 1000 * 1024)) ||
(cache_ptr->index_size != (6 * 1000 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 74.\n";
}
}
@@ -17842,7 +17836,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
@@ -17857,7 +17851,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (4 * 1000 * 1024)) ||
(cache_ptr->index_size != (5 * 1000 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 75.\n";
}
}
@@ -17871,7 +17865,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
@@ -17886,7 +17880,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (4 * 1000 * 1024)) ||
(cache_ptr->index_size != (4 * 1000 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 76.\n";
}
}
@@ -17898,7 +17892,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
@@ -17913,7 +17907,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (4 * 1000 * 1024)) ||
(cache_ptr->index_size != (4 * 1000 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 77.\n";
}
}
@@ -17926,7 +17920,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -17941,7 +17935,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (4 * 1000 * 1024)) ||
(cache_ptr->index_size != (5 * 1000 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 78.\n";
}
}
@@ -17955,7 +17949,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -17970,7 +17964,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (4 * 1000 * 1024)) ||
(cache_ptr->index_size != (4 * 1000 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 79.\n";
}
}
@@ -17984,7 +17978,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -17999,7 +17993,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (7 * 1000 * 1024 / 2)) ||
(cache_ptr->index_size != (3 * 1000 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 80.\n";
}
}
@@ -18013,7 +18007,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -18028,7 +18022,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (3 * 1000 * 1024)) ||
(cache_ptr->index_size != (2 * 1000 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 81.\n";
}
}
@@ -18040,7 +18034,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -18055,7 +18049,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (5 * 1000 * 1024 / 2)) ||
(cache_ptr->index_size != (1 * 1000 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 82.\n";
}
}
@@ -18067,7 +18061,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -18082,7 +18076,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (2 * 1000 * 1024)) ||
(cache_ptr->index_size != (1 * 1000 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 83.\n";
}
}
@@ -18094,7 +18088,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -18109,7 +18103,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (3 * 1000 * 1024 / 2)) ||
(cache_ptr->index_size != (1 * 1000 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 84.\n";
}
}
@@ -18121,7 +18115,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -18136,7 +18130,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (1 * 1000 * 1024)) ||
(cache_ptr->index_size != (1 * 1000 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 85.\n";
}
}
@@ -18148,7 +18142,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -18163,7 +18157,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (1 * 1000 * 1024)) ||
(cache_ptr->index_size != (1 * 1000 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 86.\n";
}
}
@@ -18193,7 +18187,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- flush_cache(file_ptr, TRUE, FALSE, FALSE);
+ flush_cache(file_ptr, true, false, false);
reset_entries();
}
@@ -18209,7 +18203,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 64 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -18225,7 +18219,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (32 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__add_space;
@@ -18238,17 +18232,17 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = TRUE;
+ auto_size_ctl.apply_max_decrement = true;
auto_size_ctl.max_decrement = (1 * 1000 * 1024);
auto_size_ctl.epochs_before_eviction = 1; /* for ease of testing */
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.5; /* for ease of testing */
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 12.\n";
}
}
@@ -18258,7 +18252,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((cache_ptr->max_cache_size != (64 * 1024)) || (cache_ptr->min_clean_size != (32 * 1024)) ||
(cache_ptr->index_len != 0) || (cache_ptr->index_size != 0) || (cache_ptr->cache_accesses != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (0).\n";
}
}
@@ -18278,7 +18272,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (32 * 1024)) || (cache_ptr->index_len != 1) ||
(cache_ptr->index_size != HUGE_ENTRY_SIZE) || (cache_ptr->cache_accesses != 1)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (1).\n";
}
}
@@ -18303,7 +18297,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->index_size != (HUGE_ENTRY_SIZE + MONSTER_ENTRY_SIZE)) ||
(cache_ptr->cache_accesses != 1)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (2).\n";
}
}
@@ -18327,7 +18321,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->index_size != ((2 * MONSTER_ENTRY_SIZE) + HUGE_ENTRY_SIZE)) ||
(cache_ptr->cache_accesses != 1)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (3).\n";
}
}
@@ -18349,7 +18343,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->index_len != 2) || (cache_ptr->index_size != (2 * MONSTER_ENTRY_SIZE)) ||
(cache_ptr->cache_accesses != 2)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (4).\n";
}
}
@@ -18369,7 +18363,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 13.\n";
}
}
@@ -18378,7 +18372,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (32 * 1024)) || (cache_ptr->index_len != 0) ||
(cache_ptr->index_size != 0) || (cache_ptr->cache_accesses != 0)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (5).\n";
}
}
@@ -18405,7 +18399,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (32 * 1024)) || (cache_ptr->index_len != 1) ||
(cache_ptr->index_size != HUGE_ENTRY_SIZE) || (cache_ptr->cache_accesses != 2)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (6).\n";
}
}
@@ -18427,7 +18421,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->index_size != HUGE_ENTRY_SIZE + MONSTER_ENTRY_SIZE) ||
(cache_ptr->cache_accesses != 0)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (7).\n";
}
}
@@ -18446,7 +18440,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->index_size != 2 * MONSTER_ENTRY_SIZE + HUGE_ENTRY_SIZE) ||
(cache_ptr->cache_accesses != 0)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (8).\n";
}
}
@@ -18468,7 +18462,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->index_len != 2) || (cache_ptr->index_size != (2 * MONSTER_ENTRY_SIZE)) ||
(cache_ptr->cache_accesses != 1)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (9).\n";
}
}
@@ -18487,22 +18481,22 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
expunge_entry(file_ptr, MONSTER_ENTRY_TYPE, 6);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, 1024, TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, 1024, true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, H5C__DIRTIED_FLAG);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, 1024, TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, 1024, true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, H5C__DIRTIED_FLAG);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, 1024, TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, 1024, true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, H5C__DIRTIED_FLAG);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 13);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 13, 1024, TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 13, 1024, true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 13, H5C__DIRTIED_FLAG);
- flush_cache(file_ptr, TRUE, FALSE, FALSE);
+ flush_cache(file_ptr, true, false, false);
if (pass) {
@@ -18511,7 +18505,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 13.\n";
}
}
@@ -18520,7 +18514,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (3 * 1024)) || (cache_ptr->index_len != 0) ||
(cache_ptr->index_size != 0) || (cache_ptr->cache_accesses != 0)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (10).\n";
}
}
@@ -18547,7 +18541,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (3 * 1024)) || (cache_ptr->index_len != 4) ||
(cache_ptr->index_size != 4 * 1024) || (cache_ptr->cache_accesses != 4)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (11).\n";
}
}
@@ -18561,14 +18555,14 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) {
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, (3 * 1024), TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, (3 * 1024), true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, H5C__DIRTIED_FLAG);
if (pass && (((cache_ptr->max_cache_size != (6 * 1024)) ||
(cache_ptr->min_clean_size != (3 * 1024)) || (cache_ptr->index_len != 4) ||
(cache_ptr->index_size != 6 * 1024) || (cache_ptr->cache_accesses != 5)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (12).\n";
}
}
@@ -18583,14 +18577,14 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) {
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, (10 * 1024), TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, (10 * 1024), true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, H5C__DIRTIED_FLAG);
if (pass && (((cache_ptr->max_cache_size != (13 * 1024)) ||
(cache_ptr->min_clean_size != (13 * 512)) || (cache_ptr->index_len != 4) ||
(cache_ptr->index_size != 13 * 1024) || (cache_ptr->cache_accesses != 0)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (13).\n";
}
}
@@ -18604,14 +18598,14 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) {
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, (10 * 1024), TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, (10 * 1024), true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, H5C__DIRTIED_FLAG);
if (pass && (((cache_ptr->max_cache_size != (22 * 1024)) ||
(cache_ptr->min_clean_size != (11 * 1024)) || (cache_ptr->index_len != 4) ||
(cache_ptr->index_size != 22 * 1024) || (cache_ptr->cache_accesses != 0)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (14).\n";
}
}
@@ -18625,14 +18619,14 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) {
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, (10 * 1024), TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, (10 * 1024), true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, H5C__DIRTIED_FLAG);
if (pass && (((cache_ptr->max_cache_size != (22 * 1024)) ||
(cache_ptr->min_clean_size != (11 * 1024)) || (cache_ptr->index_len != 4) ||
(cache_ptr->index_size != 31 * 1024) || (cache_ptr->cache_accesses != 1)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (15).\n";
}
}
@@ -18647,15 +18641,15 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) {
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, (1 * 1024), TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, (1 * 1024), true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, H5C__DIRTIED_FLAG);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, (1 * 1024), TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, (1 * 1024), true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, H5C__DIRTIED_FLAG);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, (1 * 1024), TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, (1 * 1024), true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, H5C__DIRTIED_FLAG);
if (pass) {
@@ -18665,7 +18659,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 14.\n";
}
}
@@ -18674,7 +18668,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (3 * 1024)) || (cache_ptr->index_len != 4) ||
(cache_ptr->index_size != 4 * 1024) || (cache_ptr->cache_accesses != 0)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (16).\n";
}
}
@@ -18688,13 +18682,13 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, H5C__PIN_ENTRY_FLAG);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, 2 * 1024, TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, 2 * 1024, true);
if (pass && (((cache_ptr->max_cache_size != (6 * 1024)) || (cache_ptr->min_clean_size != (6 * 512)) ||
(cache_ptr->index_len != 4) || (cache_ptr->index_size != 5 * 1024) ||
(cache_ptr->cache_accesses != 1)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (17).\n";
}
}
@@ -18704,13 +18698,13 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) {
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, 10 * 1024, TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, 10 * 1024, true);
if (pass && (((cache_ptr->max_cache_size != (13 * 1024)) ||
(cache_ptr->min_clean_size != (13 * 512)) || (cache_ptr->index_len != 4) ||
(cache_ptr->index_size != 13 * 1024) || (cache_ptr->cache_accesses != 0)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (18).\n";
}
}
@@ -18722,13 +18716,13 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, H5C__PIN_ENTRY_FLAG);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, 10 * 1024, TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, 10 * 1024, true);
if (pass && (((cache_ptr->max_cache_size != (22 * 1024)) ||
(cache_ptr->min_clean_size != (11 * 1024)) || (cache_ptr->index_len != 4) ||
(cache_ptr->index_size != 22 * 1024) || (cache_ptr->cache_accesses != 0)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (19).\n";
}
}
@@ -18740,13 +18734,13 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, H5C__PIN_ENTRY_FLAG);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, 10 * 1024, TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, 10 * 1024, true);
if (pass && (((cache_ptr->max_cache_size != (22 * 1024)) ||
(cache_ptr->min_clean_size != (11 * 1024)) || (cache_ptr->index_len != 4) ||
(cache_ptr->index_size != 31 * 1024) || (cache_ptr->cache_accesses != 1)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (20).\n";
}
}
@@ -18772,7 +18766,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (11 * 1024)) || (cache_ptr->index_len != 4) ||
(cache_ptr->index_size != 31 * 1024) || (cache_ptr->cache_accesses != 4)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (21).\n";
}
}
@@ -18787,15 +18781,15 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) {
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, (1 * 1024), TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, (1 * 1024), true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, H5C__DIRTIED_FLAG);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, (1 * 1024), TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, (1 * 1024), true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, H5C__DIRTIED_FLAG);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, (1 * 1024), TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, (1 * 1024), true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, H5C__DIRTIED_FLAG);
if (pass) {
@@ -18805,7 +18799,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 15.\n";
}
}
@@ -18814,7 +18808,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (3 * 1024)) || (cache_ptr->index_len != 4) ||
(cache_ptr->index_size != 4 * 1024) || (cache_ptr->cache_accesses != 0)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (22).\n";
}
}
@@ -18823,13 +18817,13 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, H5C__PIN_ENTRY_FLAG);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, 2 * 1024, TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, 2 * 1024, true);
if (pass && (((cache_ptr->max_cache_size != (6 * 1024)) || (cache_ptr->min_clean_size != (6 * 512)) ||
(cache_ptr->index_len != 4) || (cache_ptr->index_size != 5 * 1024) ||
(cache_ptr->cache_accesses != 1)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (23).\n";
}
}
@@ -18839,13 +18833,13 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) {
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, 10 * 1024, TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, 10 * 1024, true);
if (pass && (((cache_ptr->max_cache_size != (13 * 1024)) ||
(cache_ptr->min_clean_size != (13 * 512)) || (cache_ptr->index_len != 4) ||
(cache_ptr->index_size != 13 * 1024) || (cache_ptr->cache_accesses != 0)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (24).\n";
}
}
@@ -18857,13 +18851,13 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, H5C__PIN_ENTRY_FLAG);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, 10 * 1024, TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, 10 * 1024, true);
if (pass && (((cache_ptr->max_cache_size != (22 * 1024)) ||
(cache_ptr->min_clean_size != (11 * 1024)) || (cache_ptr->index_len != 4) ||
(cache_ptr->index_size != 22 * 1024) || (cache_ptr->cache_accesses != 0)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (25).\n";
}
}
@@ -18875,13 +18869,13 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, H5C__PIN_ENTRY_FLAG);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, 10 * 1024, TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, 10 * 1024, true);
if (pass && (((cache_ptr->max_cache_size != (22 * 1024)) ||
(cache_ptr->min_clean_size != (11 * 1024)) || (cache_ptr->index_len != 4) ||
(cache_ptr->index_size != 31 * 1024) || (cache_ptr->cache_accesses != 1)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (26).\n";
}
}
@@ -18907,7 +18901,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (11 * 1024)) || (cache_ptr->index_len != 4) ||
(cache_ptr->index_size != 31 * 1024) || (cache_ptr->cache_accesses != 4)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (27).\n";
}
}
@@ -18926,7 +18920,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (11 * 1024)) || (cache_ptr->index_len != 0) ||
(cache_ptr->index_size != 0) || (cache_ptr->cache_accesses != 4)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (28).\n";
}
}
@@ -18943,7 +18937,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 4 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -18959,7 +18953,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (4 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__add_space;
@@ -18972,17 +18966,17 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = TRUE;
+ auto_size_ctl.apply_max_decrement = true;
auto_size_ctl.max_decrement = (2 * 1024);
auto_size_ctl.epochs_before_eviction = 1; /* for ease of testing */
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.5; /* for ease of testing */
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 15.\n";
}
}
@@ -18995,7 +18989,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((cache_ptr->max_cache_size != (4 * 1024)) || (cache_ptr->min_clean_size != (4 * 512)) ||
(cache_ptr->index_len != 0) || (cache_ptr->index_size != 0) || (cache_ptr->cache_accesses != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache after initialization 15.\n";
}
}
@@ -19008,16 +19002,16 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0);
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
if (pass && (((cache_ptr->max_cache_size != (4 * 1024)) || (cache_ptr->min_clean_size != (4 * 512)) ||
(cache_ptr->index_len != 1) || (cache_ptr->index_size != LARGE_ENTRY_SIZE) ||
- (cache_ptr->cache_accesses != 1) || (rpt_fcn_called == TRUE)))) {
+ (cache_ptr->cache_accesses != 1) || (rpt_fcn_called == true)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (29).\n";
}
}
@@ -19031,7 +19025,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 1);
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 1, H5C__NO_FLAGS_SET);
@@ -19039,9 +19033,9 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass &&
(((cache_ptr->max_cache_size != (12 * 1024)) || (cache_ptr->min_clean_size != (12 * 512)) ||
(cache_ptr->index_len != 2) || (cache_ptr->index_size != 2 * LARGE_ENTRY_SIZE) ||
- (cache_ptr->cache_accesses != 1) || (rpt_fcn_called != TRUE)))) {
+ (cache_ptr->cache_accesses != 1) || (rpt_fcn_called != true)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (30).\n";
}
}
@@ -19054,7 +19048,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 2);
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 2, H5C__NO_FLAGS_SET);
@@ -19064,9 +19058,9 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass &&
(((cache_ptr->max_cache_size != (12 * 1024)) || (cache_ptr->min_clean_size != (12 * 512)) ||
(cache_ptr->index_len != 3) || (cache_ptr->index_size != 3 * LARGE_ENTRY_SIZE) ||
- (cache_ptr->cache_accesses != 3) || (rpt_fcn_called != FALSE)))) {
+ (cache_ptr->cache_accesses != 3) || (rpt_fcn_called != false)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (31).\n";
}
}
@@ -19079,7 +19073,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, TINY_ENTRY_TYPE, 0);
@@ -19092,7 +19086,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (cache_ptr->max_cache_size != (4 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024)) || (cache_ptr->index_size != (1 * TINY_ENTRY_SIZE))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (32).\n";
}
}
@@ -19103,7 +19097,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
/* Force another flash increase */
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0);
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
@@ -19111,10 +19105,10 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass && (((cache_ptr->max_cache_size != (4 * 1024 + 128)) ||
(cache_ptr->min_clean_size != (2 * 1024 + 64)) || (cache_ptr->index_len != 2) ||
(cache_ptr->index_size != LARGE_ENTRY_SIZE + TINY_ENTRY_SIZE) ||
- (cache_ptr->cache_accesses != 1) || (rpt_fcn_called == FALSE) ||
+ (cache_ptr->cache_accesses != 1) || (rpt_fcn_called == false) ||
(rpt_status != flash_increase)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (33).\n";
}
}
@@ -19125,7 +19119,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
/* force regular size increase up to maximum */
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 500)) {
protect_entry(file_ptr, TINY_ENTRY_TYPE, i);
@@ -19136,9 +19130,9 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if ((cache_ptr->max_cache_size != (20 * 1024)) || (cache_ptr->min_clean_size != (10 * 1024)) ||
- (rpt_fcn_called == FALSE) || (rpt_status != at_max_size)) {
+ (rpt_fcn_called == false) || (rpt_status != at_max_size)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (34).\n";
}
}
@@ -19148,7 +19142,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (show_progress)
@@ -19181,7 +19175,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
static unsigned
check_auto_cache_resize_disable(unsigned paged)
{
- hbool_t show_progress = FALSE;
+ bool show_progress = false;
herr_t result;
int32_t i;
int32_t checkpoint = 0;
@@ -19191,7 +19185,7 @@ check_auto_cache_resize_disable(unsigned paged)
/* int32_t version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* H5C_auto_resize_report_fcn rpt_fcn = */ test_rpt_fcn,
- /* hbool_t set_initial_size = */ TRUE,
+ /* bool set_initial_size = */ true,
/* size_t initial_size = */ (512 * 1024),
/* double min_clean_fraction = */ 0.5,
@@ -19207,7 +19201,7 @@ check_auto_cache_resize_disable(unsigned paged)
/* double increment = */ 2.0,
- /* hbool_t apply_max_increment = */ TRUE,
+ /* bool apply_max_increment = */ true,
/* size_t max_increment = */ (4 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
@@ -19221,12 +19215,12 @@ check_auto_cache_resize_disable(unsigned paged)
/* double decrement = */ 0.1,
- /* hbool_t apply_max_decrement = */ TRUE,
+ /* bool apply_max_decrement = */ true,
/* size_t max_decrement = */ (1 * 1024 * 1024),
/* int32_t epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
+ /* bool apply_empty_reserve = */ true,
/* double empty_reserve = */ 0.05};
if (paged)
@@ -19234,7 +19228,7 @@ check_auto_cache_resize_disable(unsigned paged)
else
TESTING("automatic cache resize disable");
- pass = TRUE;
+ pass = true;
if (show_progress)
fprintf(stderr, "check point %d\n", checkpoint++);
@@ -19252,7 +19246,7 @@ check_auto_cache_resize_disable(unsigned paged)
if (file_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "file_ptr NULL from setup_cache.";
}
else {
@@ -19267,7 +19261,7 @@ check_auto_cache_resize_disable(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 1.\n";
}
}
@@ -19276,7 +19270,7 @@ check_auto_cache_resize_disable(unsigned paged)
if ((cache_ptr->max_cache_size != (512 * 1024)) || (cache_ptr->min_clean_size != (256 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after initialization.\n";
}
}
@@ -19296,7 +19290,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 4 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -19312,7 +19306,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.increment = 1.0; /* disable size increases */
- auto_size_ctl.apply_max_increment = FALSE;
+ auto_size_ctl.apply_max_increment = false;
auto_size_ctl.max_increment = (4 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -19325,19 +19319,19 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = FALSE;
+ auto_size_ctl.apply_max_decrement = false;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 3;
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 2.\n";
}
}
@@ -19347,7 +19341,7 @@ check_auto_cache_resize_disable(unsigned paged)
if ((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 1.\n";
}
}
@@ -19360,7 +19354,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -19375,7 +19369,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 1.\n";
}
}
@@ -19388,7 +19382,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -19403,7 +19397,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 2.\n";
}
}
@@ -19416,7 +19410,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -19431,7 +19425,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 3.\n";
}
}
@@ -19448,7 +19442,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 4 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -19464,7 +19458,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = FALSE;
+ auto_size_ctl.apply_max_increment = false;
auto_size_ctl.max_increment = (4 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -19476,19 +19470,19 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.upper_hr_threshold = 0.995;
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = FALSE;
+ auto_size_ctl.apply_max_decrement = false;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 3;
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 3.\n";
}
}
@@ -19498,7 +19492,7 @@ check_auto_cache_resize_disable(unsigned paged)
if ((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 2.\n";
}
}
@@ -19511,7 +19505,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -19526,7 +19520,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 4.\n";
}
}
@@ -19539,7 +19533,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -19554,7 +19548,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 5.\n";
}
}
@@ -19567,7 +19561,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -19582,7 +19576,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 6.\n";
}
}
@@ -19599,7 +19593,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 4 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -19615,7 +19609,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = FALSE;
+ auto_size_ctl.apply_max_increment = false;
auto_size_ctl.max_increment = (4 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -19628,19 +19622,19 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = FALSE;
+ auto_size_ctl.apply_max_decrement = false;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 3;
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 4.\n";
}
}
@@ -19650,7 +19644,7 @@ check_auto_cache_resize_disable(unsigned paged)
if ((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 3.\n";
}
}
@@ -19663,7 +19657,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -19678,7 +19672,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 7.\n";
}
}
@@ -19691,7 +19685,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -19706,7 +19700,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 8.\n";
}
}
@@ -19719,7 +19713,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -19734,7 +19728,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 9.\n";
}
}
@@ -19750,7 +19744,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 4 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -19766,7 +19760,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (2 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -19779,19 +19773,19 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.decrement = 1.0; /* disable size decreases */
- auto_size_ctl.apply_max_decrement = TRUE;
+ auto_size_ctl.apply_max_decrement = true;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 3;
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 5.\n";
}
}
@@ -19804,7 +19798,7 @@ check_auto_cache_resize_disable(unsigned paged)
if ((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 4.\n";
}
}
@@ -19817,7 +19811,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -19832,7 +19826,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 10.\n";
}
}
@@ -19844,7 +19838,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -19859,7 +19853,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 11.\n";
}
}
@@ -19872,7 +19866,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -19887,7 +19881,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 12.\n";
}
}
@@ -19904,7 +19898,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 4 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -19920,7 +19914,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (2 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -19933,19 +19927,19 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = TRUE;
+ auto_size_ctl.apply_max_decrement = true;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 3;
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 6.\n";
}
}
@@ -19955,7 +19949,7 @@ check_auto_cache_resize_disable(unsigned paged)
if ((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 5.\n";
}
}
@@ -19968,7 +19962,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -19983,7 +19977,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 13.\n";
}
}
@@ -19995,7 +19989,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -20010,7 +20004,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 14.\n";
}
}
@@ -20023,7 +20017,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -20038,7 +20032,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 15.\n";
}
}
@@ -20054,7 +20048,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 4 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -20070,7 +20064,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (2 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -20083,19 +20077,19 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = TRUE;
+ auto_size_ctl.apply_max_decrement = true;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 3;
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 7.\n";
}
}
@@ -20105,7 +20099,7 @@ check_auto_cache_resize_disable(unsigned paged)
if ((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 6.\n";
}
}
@@ -20118,7 +20112,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -20133,7 +20127,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 16.\n";
}
}
@@ -20145,7 +20139,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -20160,7 +20154,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 17.\n";
}
}
@@ -20173,7 +20167,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -20188,7 +20182,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 18.\n";
}
}
@@ -20206,7 +20200,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 4 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -20222,7 +20216,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (2 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -20235,19 +20229,19 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = TRUE;
+ auto_size_ctl.apply_max_decrement = true;
auto_size_ctl.max_decrement = 0; /* disable decrement */
auto_size_ctl.epochs_before_eviction = 1;
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 8.\n";
}
}
@@ -20257,7 +20251,7 @@ check_auto_cache_resize_disable(unsigned paged)
if ((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 7.\n";
}
}
@@ -20268,7 +20262,7 @@ check_auto_cache_resize_disable(unsigned paged)
if (pass) {
/* flush the cache and destroy all entries so we start from a known point */
- flush_cache(file_ptr, TRUE, FALSE, FALSE);
+ flush_cache(file_ptr, true, false, false);
}
if (show_progress)
@@ -20279,7 +20273,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
@@ -20294,7 +20288,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 19.\n";
}
}
@@ -20306,7 +20300,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 1000;
while (pass && (i < 2000)) {
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
@@ -20321,7 +20315,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 20.\n";
}
}
@@ -20335,7 +20329,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
@@ -20350,7 +20344,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 21.\n";
}
}
@@ -20362,7 +20356,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -20377,7 +20371,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 22.\n";
}
}
@@ -20392,7 +20386,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -20407,7 +20401,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 23.\n";
}
}
@@ -20423,7 +20417,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 4 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -20439,7 +20433,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (2 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -20452,19 +20446,19 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = TRUE;
+ auto_size_ctl.apply_max_decrement = true;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 1;
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 1.0; /* disable decrement */
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 9.\n";
}
}
@@ -20474,7 +20468,7 @@ check_auto_cache_resize_disable(unsigned paged)
if ((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 8.\n";
}
}
@@ -20485,7 +20479,7 @@ check_auto_cache_resize_disable(unsigned paged)
if (pass) {
/* flush the cache and destroy all entries so we start from a known point */
- flush_cache(file_ptr, TRUE, FALSE, FALSE);
+ flush_cache(file_ptr, true, false, false);
}
if (show_progress)
@@ -20496,7 +20490,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
@@ -20511,7 +20505,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 24.\n";
}
}
@@ -20523,7 +20517,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 1000;
while (pass && (i < 2000)) {
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
@@ -20538,7 +20532,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 25.\n";
}
}
@@ -20552,7 +20546,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
@@ -20567,7 +20561,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 26.\n";
}
}
@@ -20579,7 +20573,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -20594,7 +20588,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 27.\n";
}
}
@@ -20609,7 +20603,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -20624,7 +20618,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 28.\n";
}
}
@@ -20647,7 +20641,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 4 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -20663,7 +20657,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (2 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -20676,19 +20670,19 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = TRUE;
+ auto_size_ctl.apply_max_decrement = true;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 1;
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 10.\n";
}
}
@@ -20698,7 +20692,7 @@ check_auto_cache_resize_disable(unsigned paged)
if ((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 9.\n";
}
}
@@ -20709,7 +20703,7 @@ check_auto_cache_resize_disable(unsigned paged)
if (pass) {
/* flush the cache and destroy all entries so we start from a known point */
- flush_cache(file_ptr, TRUE, FALSE, FALSE);
+ flush_cache(file_ptr, true, false, false);
}
if (show_progress)
@@ -20720,7 +20714,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
@@ -20735,7 +20729,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 29.\n";
}
}
@@ -20747,7 +20741,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 1000;
while (pass && (i < 2000)) {
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
@@ -20762,7 +20756,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 30.\n";
}
}
@@ -20778,7 +20772,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
@@ -20794,7 +20788,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->min_clean_size != (2 * 1024 * 1024)) || (cache_ptr->index_len != 2000) ||
(cache_ptr->index_size != 2000 * SMALL_ENTRY_SIZE)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 31.\n";
}
}
@@ -20806,7 +20800,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -20821,7 +20815,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 32.\n";
}
}
@@ -20838,7 +20832,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 999);
@@ -20853,7 +20847,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 33.\n";
}
}
@@ -20873,7 +20867,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 2 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -20889,7 +20883,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (2 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -20902,19 +20896,19 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = TRUE;
+ auto_size_ctl.apply_max_decrement = true;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 3;
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 11.\n";
}
}
@@ -20924,7 +20918,7 @@ check_auto_cache_resize_disable(unsigned paged)
if ((cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 10.\n";
}
}
@@ -20937,7 +20931,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -20952,7 +20946,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->size_decrease_possible) || (cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 34.\n";
}
}
@@ -20965,7 +20959,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -20980,7 +20974,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->size_decrease_possible) || (cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 35.\n";
}
}
@@ -20993,7 +20987,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 4 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.25;
@@ -21009,7 +21003,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.increment = 1.0; /* disable size increment */
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (2 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -21022,19 +21016,19 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.decrement = 1.0; /* disable size decrement */
- auto_size_ctl.apply_max_decrement = TRUE;
+ auto_size_ctl.apply_max_decrement = true;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 3;
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 12.\n";
}
}
@@ -21044,7 +21038,7 @@ check_auto_cache_resize_disable(unsigned paged)
if ((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 11.\n";
}
}
@@ -21057,7 +21051,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -21072,7 +21066,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->size_decrease_possible) || (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 36.\n";
}
}
@@ -21085,7 +21079,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -21100,7 +21094,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->size_decrease_possible) || (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 37.\n";
}
}
@@ -21113,7 +21107,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = FALSE;
+ auto_size_ctl.set_initial_size = false;
auto_size_ctl.initial_size = 2 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -21129,7 +21123,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (2 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -21142,19 +21136,19 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = TRUE;
+ auto_size_ctl.apply_max_decrement = true;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 3;
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 13.\n";
}
}
@@ -21164,7 +21158,7 @@ check_auto_cache_resize_disable(unsigned paged)
if ((cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 12.\n";
}
}
@@ -21177,7 +21171,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -21192,7 +21186,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->size_decrease_possible) || (cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 38.\n";
}
}
@@ -21205,7 +21199,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -21220,7 +21214,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->size_decrease_possible) || (cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 39.\n";
}
}
@@ -21233,7 +21227,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 4 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.25;
@@ -21249,7 +21243,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.increment = 1.0; /* disable size increment */
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (2 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -21262,19 +21256,19 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = TRUE;
+ auto_size_ctl.apply_max_decrement = true;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 3;
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 14.\n";
}
}
@@ -21284,7 +21278,7 @@ check_auto_cache_resize_disable(unsigned paged)
if ((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 13.\n";
}
}
@@ -21297,7 +21291,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -21312,7 +21306,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->size_decrease_possible) || (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 40.\n";
}
}
@@ -21325,7 +21319,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -21340,7 +21334,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->size_decrease_possible) || (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 41.\n";
}
}
@@ -21353,7 +21347,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 4 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -21369,7 +21363,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (2 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -21382,19 +21376,19 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.decrement = 1.0; /* disable size decrement */
- auto_size_ctl.apply_max_decrement = TRUE;
+ auto_size_ctl.apply_max_decrement = true;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 3;
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 15.\n";
}
}
@@ -21404,7 +21398,7 @@ check_auto_cache_resize_disable(unsigned paged)
if ((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 14.\n";
}
}
@@ -21417,7 +21411,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -21432,7 +21426,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->size_decrease_possible) || (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 42.\n";
}
}
@@ -21445,7 +21439,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -21460,7 +21454,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->size_decrease_possible) || (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 43.\n";
}
}
@@ -21473,7 +21467,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 4 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -21489,7 +21483,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (2 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -21502,19 +21496,19 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = TRUE;
+ auto_size_ctl.apply_max_decrement = true;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 3;
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 16.\n";
}
}
@@ -21524,7 +21518,7 @@ check_auto_cache_resize_disable(unsigned paged)
if ((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 15.\n";
}
}
@@ -21537,7 +21531,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -21552,7 +21546,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->size_decrease_possible) || (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 44.\n";
}
}
@@ -21565,7 +21559,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -21580,7 +21574,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->size_decrease_possible) || (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 45.\n";
}
}
@@ -21620,7 +21614,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 64 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -21636,7 +21630,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (2 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -21649,19 +21643,19 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = TRUE;
+ auto_size_ctl.apply_max_decrement = true;
auto_size_ctl.max_decrement = (1 * 1024);
auto_size_ctl.epochs_before_eviction = 3;
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 17.\n";
}
}
@@ -21670,7 +21664,7 @@ check_auto_cache_resize_disable(unsigned paged)
if ((cache_ptr->max_cache_size != (64 * 1024)) || (cache_ptr->min_clean_size != (32 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 16.\n";
}
}
@@ -21681,14 +21675,14 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0);
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
if (pass && (((cache_ptr->max_cache_size != (64 * 1024)) ||
(cache_ptr->min_clean_size != (32 * 1024)) || (cache_ptr->index_len != 1) ||
- (cache_ptr->index_size != LARGE_ENTRY_SIZE) || (rpt_fcn_called != FALSE)))) {
+ (cache_ptr->index_size != LARGE_ENTRY_SIZE) || (rpt_fcn_called != false)))) {
fprintf(stdout, "\nmax_cache_size = %ld.\n", (long)(cache_ptr->max_cache_size));
fprintf(stdout, "min_clean_size = %ld.\n", (long)(cache_ptr->min_clean_size));
@@ -21696,7 +21690,7 @@ check_auto_cache_resize_disable(unsigned paged)
fprintf(stdout, "index_size = %ld.\n", (long)(cache_ptr->index_size));
fprintf(stdout, "rpt_fcn_called = %ld.\n", (long)(rpt_fcn_called));
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 46.\n";
}
}
@@ -21713,14 +21707,14 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
if (pass && (((cache_ptr->max_cache_size != (64 * 1024)) ||
(cache_ptr->min_clean_size != (32 * 1024)) || (cache_ptr->index_len != 1) ||
- (cache_ptr->index_size != MONSTER_ENTRY_SIZE) || (rpt_fcn_called != FALSE)))) {
+ (cache_ptr->index_size != MONSTER_ENTRY_SIZE) || (rpt_fcn_called != false)))) {
fprintf(stdout, "\nmax_cache_size = %ld.\n", (long)(cache_ptr->max_cache_size));
fprintf(stdout, "min_clean_size = %ld.\n", (long)(cache_ptr->min_clean_size));
@@ -21728,7 +21722,7 @@ check_auto_cache_resize_disable(unsigned paged)
fprintf(stdout, "index_size = %ld.\n", (long)(cache_ptr->index_size));
fprintf(stdout, "rpt_fcn_called = %ld.\n", (long)(rpt_fcn_called));
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 47.\n";
}
}
@@ -21738,7 +21732,7 @@ check_auto_cache_resize_disable(unsigned paged)
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (show_progress)
@@ -21774,7 +21768,7 @@ check_auto_cache_resize_disable(unsigned paged)
static unsigned
check_auto_cache_resize_epoch_markers(unsigned paged)
{
- hbool_t show_progress = FALSE;
+ bool show_progress = false;
herr_t result;
int32_t i;
int32_t j;
@@ -21785,7 +21779,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
/* int32_t version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* H5C_auto_resize_report_fcn rpt_fcn = */ test_rpt_fcn,
- /* hbool_t set_initial_size = */ TRUE,
+ /* bool set_initial_size = */ true,
/* size_t initial_size = */ (512 * 1024),
/* double min_clean_fraction = */ 0.5,
@@ -21801,7 +21795,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
/* double increment = */ 2.0,
- /* hbool_t apply_max_increment = */ TRUE,
+ /* bool apply_max_increment = */ true,
/* size_t max_increment = */ (4 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
@@ -21815,12 +21809,12 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
/* double decrement = */ 0.1,
- /* hbool_t apply_max_decrement = */ TRUE,
+ /* bool apply_max_decrement = */ true,
/* size_t max_decrement = */ (1 * 1024 * 1024),
/* int32_t epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
+ /* bool apply_empty_reserve = */ true,
/* double empty_reserve = */ 0.05};
if (paged)
@@ -21828,7 +21822,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
else
TESTING("automatic cache resize epoch marker management");
- pass = TRUE;
+ pass = true;
if (show_progress)
fprintf(stderr, "check point %d\n", checkpoint++);
@@ -21847,7 +21841,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 1.\n";
}
}
@@ -21856,7 +21850,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
if ((cache_ptr->max_cache_size != (512 * 1024)) || (cache_ptr->min_clean_size != (256 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after initialization.\n";
}
}
@@ -21872,7 +21866,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 8 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -21888,7 +21882,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (4 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -21901,19 +21895,19 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = FALSE;
+ auto_size_ctl.apply_max_decrement = false;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 10;
- auto_size_ctl.apply_empty_reserve = FALSE;
+ auto_size_ctl.apply_empty_reserve = false;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 2.\n";
}
}
@@ -21923,7 +21917,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
if ((cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 1.\n";
}
}
@@ -21939,14 +21933,14 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
if (cache_ptr->epoch_markers_active != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected # of epoch markers 1.\n";
}
}
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -21962,7 +21956,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
(cache_ptr->min_clean_size != (4 * 1024 * 1024)) ||
(cache_ptr->index_size != (1 * 1000 * MEDIUM_ENTRY_SIZE))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 0.\n";
}
}
@@ -21975,7 +21969,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
j = 2;
while (pass && (j <= 10)) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = (j - 2) * 1000;
while (pass && (i < (j - 1) * 1000)) {
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
@@ -21988,7 +21982,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != in_spec) || (cache_ptr->epoch_markers_active != j)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected # of epoch markers 2.\n";
}
@@ -22004,7 +21998,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 9000;
while (pass && (i < 10000)) {
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
@@ -22020,7 +22014,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
(cache_ptr->min_clean_size != ((10 * 1000 * SMALL_ENTRY_SIZE + MEDIUM_ENTRY_SIZE) / 2)) ||
(cache_ptr->index_size != (10 * 1000 * SMALL_ENTRY_SIZE + MEDIUM_ENTRY_SIZE))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 1.\n";
}
}
@@ -22036,7 +22030,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 8 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -22052,7 +22046,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (4 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -22065,19 +22059,19 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = FALSE;
+ auto_size_ctl.apply_max_decrement = false;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 1;
- auto_size_ctl.apply_empty_reserve = FALSE;
+ auto_size_ctl.apply_empty_reserve = false;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 3.\n";
}
}
@@ -22087,7 +22081,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
if ((cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 2.\n";
}
}
@@ -22101,7 +22095,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
if (cache_ptr->epoch_markers_active != 1) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected # of epoch markers 3.\n";
}
}
@@ -22112,7 +22106,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 9000;
while (pass && (i < 10000)) {
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
@@ -22127,7 +22121,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
(cache_ptr->min_clean_size != (256 * 1024)) ||
(cache_ptr->index_size != (1 * 1000 * SMALL_ENTRY_SIZE))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 2.\n";
}
}
@@ -22141,7 +22135,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
if (cache_ptr->epoch_markers_active != 1) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected # of epoch markers 4.\n";
}
}
@@ -22154,7 +22148,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 8 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -22170,7 +22164,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (4 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -22183,19 +22177,19 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = FALSE;
+ auto_size_ctl.apply_max_decrement = false;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 1;
- auto_size_ctl.apply_empty_reserve = FALSE;
+ auto_size_ctl.apply_empty_reserve = false;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 4.\n";
}
}
@@ -22205,7 +22199,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
if ((cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 3.\n";
}
}
@@ -22216,7 +22210,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
if (cache_ptr->epoch_markers_active != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected # of epoch markers 5.\n";
}
}
@@ -22232,7 +22226,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 8 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -22248,7 +22242,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (4 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -22261,19 +22255,19 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = FALSE;
+ auto_size_ctl.apply_max_decrement = false;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 10;
- auto_size_ctl.apply_empty_reserve = FALSE;
+ auto_size_ctl.apply_empty_reserve = false;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 5.\n";
}
}
@@ -22284,7 +22278,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
if (cache_ptr->epoch_markers_active != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected # of epoch markers 6.\n";
}
}
@@ -22298,7 +22292,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
j = 1;
while (pass && (j <= 10)) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = (j - 1) * 1000;
while (pass && (i < j * 1000)) {
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
@@ -22311,7 +22305,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != in_spec) || (cache_ptr->epoch_markers_active != j)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected # of epoch markers 7.\n";
}
@@ -22328,7 +22322,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
if (cache_ptr->epoch_markers_active != 10) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected # of epoch markers 8.\n";
}
}
@@ -22341,7 +22335,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 8 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -22357,7 +22351,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (4 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -22370,19 +22364,19 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = FALSE;
+ auto_size_ctl.apply_max_decrement = false;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 10;
- auto_size_ctl.apply_empty_reserve = FALSE;
+ auto_size_ctl.apply_empty_reserve = false;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 6.\n";
}
}
@@ -22393,7 +22387,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
if (cache_ptr->epoch_markers_active != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected # of epoch markers 9.\n";
}
}
@@ -22410,7 +22404,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
(cache_ptr->min_clean_size != (4 * 1024 * 1024)) ||
(cache_ptr->index_size != (10 * 1000 * SMALL_ENTRY_SIZE)) || (cache_ptr->index_len != 10000)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 3.\n";
}
}
@@ -22420,7 +22414,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (show_progress)
@@ -22463,7 +22457,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
/* int32_t version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* H5C_auto_resize_report_fcn rpt_fcn = */ test_rpt_fcn,
- /* hbool_t set_initial_size = */ TRUE,
+ /* bool set_initial_size = */ true,
/* size_t initial_size = */ (512 * 1024),
/* double min_clean_fraction = */ 0.5,
@@ -22479,7 +22473,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
/* double increment = */ 2.0,
- /* hbool_t apply_max_increment = */ TRUE,
+ /* bool apply_max_increment = */ true,
/* size_t max_increment = */ (4 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
@@ -22493,12 +22487,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
/* double decrement = */ 0.1,
- /* hbool_t apply_max_decrement = */ TRUE,
+ /* bool apply_max_decrement = */ true,
/* size_t max_decrement = */ (1 * 1024 * 1024),
/* int32_t epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
+ /* bool apply_empty_reserve = */ true,
/* double empty_reserve = */ 0.05};
H5C_auto_size_ctl_t invalid_auto_size_ctl;
@@ -22509,7 +22503,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
else
TESTING("automatic cache resize input errors");
- pass = TRUE;
+ pass = true;
/* allocate a cache, and set a reference automatic cache control
* configuration. Then feed H5C_set_cache_auto_resize_config()
@@ -22531,7 +22525,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 1.\n";
}
}
@@ -22540,7 +22534,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
if ((cache_ptr->max_cache_size != (512 * 1024)) || (cache_ptr->min_clean_size != (256 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after initialization.\n";
}
}
@@ -22551,12 +22545,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 1.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 1.";
}
}
@@ -22566,7 +22560,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.5;
@@ -22582,7 +22576,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -22595,19 +22589,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.5;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(NULL, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted NULL cache_ptr.\n";
}
}
@@ -22618,12 +22612,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 2.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 2.";
}
}
@@ -22635,7 +22629,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = -1; /* INVALID */
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.5;
@@ -22651,7 +22645,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -22664,19 +22658,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.5;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad version.\n";
}
}
@@ -22687,12 +22681,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 3.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 3.";
}
}
@@ -22704,7 +22698,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 16 * 1024 * 1024 + 1;
/* INVALID */
@@ -22721,7 +22715,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -22734,19 +22728,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.5;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad init size 1.\n";
}
}
@@ -22757,12 +22751,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 4.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 4.";
}
}
@@ -22772,7 +22766,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 1 * 1024 * 1024 - 1;
/* INVALID */
@@ -22789,7 +22783,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -22802,19 +22796,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.5;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad init size 2.\n";
}
}
@@ -22825,12 +22819,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 5.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 5.";
}
}
@@ -22842,7 +22836,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 1.00001; /* INVALID */
@@ -22858,7 +22852,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -22871,19 +22865,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.5;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad min clean frac 1.\n";
}
}
@@ -22894,12 +22888,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 6.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 6.";
}
}
@@ -22909,7 +22903,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = -0.00001; /* INVALID */
@@ -22925,7 +22919,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -22938,19 +22932,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.5;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad min clean frac 2.\n";
}
}
@@ -22961,12 +22955,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 7.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 7.";
}
}
@@ -22978,7 +22972,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.5;
@@ -22995,7 +22989,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -23008,19 +23002,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.5;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad max_size.\n";
}
}
@@ -23031,12 +23025,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 8.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 8.";
}
}
@@ -23046,7 +23040,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.5;
@@ -23062,7 +23056,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -23075,19 +23069,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.5;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad size pair.\n";
}
}
@@ -23098,12 +23092,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 9.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 9.";
}
}
@@ -23113,7 +23107,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.5;
@@ -23129,7 +23123,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -23142,19 +23136,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.5;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad min_size.\n";
}
}
@@ -23165,12 +23159,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 10.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 10.";
}
}
@@ -23182,7 +23176,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.1;
@@ -23199,7 +23193,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -23212,19 +23206,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.9;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad epoch len 1.\n";
}
}
@@ -23235,12 +23229,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 11.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 11.";
}
}
@@ -23250,7 +23244,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.1;
@@ -23267,7 +23261,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -23280,19 +23274,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.9;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad epoch len 2.\n";
}
}
@@ -23303,12 +23297,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 12.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 12.";
}
}
@@ -23320,7 +23314,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.1;
@@ -23336,7 +23330,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -23349,19 +23343,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.9;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad incr_mode 1.\n";
}
}
@@ -23372,12 +23366,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 13.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 13.";
}
}
@@ -23387,7 +23381,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.1;
@@ -23403,7 +23397,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -23416,19 +23410,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.9;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad incr_mode 2.\n";
}
}
@@ -23439,12 +23433,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 14.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 14.";
}
}
@@ -23456,7 +23450,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.5;
@@ -23472,7 +23466,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -23485,19 +23479,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.5;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad upper threshold.\n";
}
}
@@ -23508,12 +23502,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 15.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 15.";
}
}
@@ -23523,7 +23517,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.5;
@@ -23539,7 +23533,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -23552,19 +23546,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.5;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad threshold pair.\n";
}
}
@@ -23575,12 +23569,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 16.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 16.";
}
}
@@ -23590,7 +23584,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.5;
@@ -23606,7 +23600,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -23619,19 +23613,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.5;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad lower threshold.\n";
}
}
@@ -23642,12 +23636,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 17.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 17.";
}
}
@@ -23659,7 +23653,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.1;
@@ -23675,7 +23669,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 0.99999; /* INVALID */
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -23688,19 +23682,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.5;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad increment.\n";
}
}
@@ -23711,12 +23705,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 18.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 18.";
}
}
@@ -23728,7 +23722,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.1;
@@ -23744,7 +23738,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = (enum H5C_cache_flash_incr_mode) - 1; /* INVALID */
@@ -23757,19 +23751,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.9;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad flash_incr_mode.\n";
}
}
@@ -23780,12 +23774,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 19.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 19.";
}
}
@@ -23797,7 +23791,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.1;
@@ -23813,7 +23807,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__add_space;
@@ -23826,19 +23820,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.9;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad flash_multiple(1).\n";
}
}
@@ -23849,12 +23843,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 20.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 20.";
}
}
@@ -23864,7 +23858,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.1;
@@ -23880,7 +23874,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__add_space;
@@ -23893,19 +23887,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.9;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad flash_multiple(2).\n";
}
}
@@ -23916,12 +23910,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 21.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 21.";
}
}
@@ -23933,7 +23927,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.1;
@@ -23949,7 +23943,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__add_space;
@@ -23962,19 +23956,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.9;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad flash_threshold(1).\n";
}
}
@@ -23985,12 +23979,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 22.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 22.";
}
}
@@ -24000,7 +23994,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.1;
@@ -24016,7 +24010,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__add_space;
@@ -24029,19 +24023,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.9;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad flash_threshold(2).\n";
}
}
@@ -24052,12 +24046,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 23.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 23.";
}
}
@@ -24069,7 +24063,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.1;
@@ -24085,7 +24079,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -24098,19 +24092,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.9;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad decr_mode 1.\n";
}
}
@@ -24121,12 +24115,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 24.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 24.";
}
}
@@ -24136,7 +24130,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.1;
@@ -24152,7 +24146,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -24165,19 +24159,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.9;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad decr_mode 2.\n";
}
}
@@ -24188,12 +24182,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 25.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 25.";
}
}
@@ -24205,7 +24199,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.1;
@@ -24221,7 +24215,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -24234,19 +24228,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 1.000001; /* INVALID */
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad decrement 1.\n";
}
}
@@ -24257,12 +24251,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 26.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 26.";
}
}
@@ -24272,7 +24266,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.1;
@@ -24288,7 +24282,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -24301,19 +24295,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = -0.000001; /* INVALID */
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad decrement 2.\n";
}
}
@@ -24324,12 +24318,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 27.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 27.";
}
}
@@ -24341,7 +24335,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.1;
@@ -24357,7 +24351,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -24370,19 +24364,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.9;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 0; /* INVALID */
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad epochs_before_eviction 1.\n";
}
}
@@ -24393,12 +24387,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 28.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 28.";
}
}
@@ -24408,7 +24402,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.1;
@@ -24424,7 +24418,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -24437,19 +24431,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.9;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = H5C__MAX_EPOCH_MARKERS + 1; /* INVALID */
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad epochs_before_eviction 2.\n";
}
}
@@ -24460,12 +24454,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 29.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 29.";
}
}
@@ -24477,7 +24471,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.1;
@@ -24493,7 +24487,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -24506,19 +24500,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.9;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = -0.0000001; /* INVALID */
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad empty_reserve 1.\n";
}
}
@@ -24529,12 +24523,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 30.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 30.";
}
}
@@ -24544,7 +24538,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.1;
@@ -24560,7 +24554,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -24573,19 +24567,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.9;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = H5C__MAX_EPOCH_MARKERS + 1; /* INVALID */
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad empty_reserve 2.\n";
}
}
@@ -24596,12 +24590,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 31.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 31.";
}
}
@@ -24616,7 +24610,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config accepted NULL cache_ptr.\n";
}
}
@@ -24627,14 +24621,14 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config accepted NULL config ptr.\n";
}
}
if (cache_ptr) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -24684,7 +24678,7 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
H5C_auto_size_ctl_t auto_size_ctl = {
/* int32_t version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* H5C_auto_resize_report_fcn rpt_fcn = */ NULL,
- /* hbool_t set_initial_size = */ TRUE,
+ /* bool set_initial_size = */ true,
/* size_t initial_size = */ (1 * 1024 * 1024),
/* double min_clean_fraction = */ 0.5,
@@ -24700,7 +24694,7 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
/* double increment = */ 2.0,
- /* hbool_t apply_max_increment = */ TRUE,
+ /* bool apply_max_increment = */ true,
/* size_t max_increment = */ (4 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
@@ -24714,12 +24708,12 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
/* double decrement = */ 0.9,
- /* hbool_t apply_max_decrement = */ TRUE,
+ /* bool apply_max_decrement = */ true,
/* size_t max_decrement = */ (1 * 1024 * 1024),
/* int32_t epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
+ /* bool apply_empty_reserve = */ true,
/* double empty_reserve = */ 0.5};
if (paged)
@@ -24727,7 +24721,7 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
else
TESTING("automatic cache resize auxiliary functions");
- pass = TRUE;
+ pass = true;
/* allocate a cache, and then test the various auxiliary functions.
*/
@@ -24746,7 +24740,7 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 1.\n";
}
}
@@ -24755,7 +24749,7 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
if ((cache_ptr->max_cache_size != (1 * 1024 * 1024)) || (cache_ptr->min_clean_size != (512 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after initialization.\n";
}
}
@@ -24769,7 +24763,7 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
if ((H5C_get_cache_hit_rate(NULL, &hit_rate) != FAIL) ||
(H5C_get_cache_hit_rate(cache_ptr, NULL) != FAIL)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_hit_rate accepts bad params.\n";
}
}
@@ -24780,19 +24774,19 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_hit_rate failed.\n";
}
else if (!H5_DBL_ABS_EQUAL(hit_rate, 0.0)) { /* i.e. hit_rate != 0.0 */
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_hit_rate returned unexpected hit rate 1.\n";
}
}
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, PICO_ENTRY_TYPE, i);
@@ -24811,29 +24805,29 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_hit_rate failed.\n";
}
else if (!H5_DBL_ABS_EQUAL(hit_rate, 0.0)) { /* i.e. hit_rate != 0.0 */
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_hit_rate returned unexpected hit rate 2.\n";
}
else if ((cache_ptr->cache_accesses != 1000) || (cache_ptr->cache_hits != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache hit rate stats.\n";
}
else if (rpt_fcn_called) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Report function called?.\n";
}
}
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, PICO_ENTRY_TYPE, 0);
@@ -24852,22 +24846,22 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_hit_rate failed.\n";
}
else if (!H5_DBL_ABS_EQUAL(hit_rate, 0.5)) { /* i.e. hit_rate != 0.5 */
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_hit_rate returned unexpected hit rate 3.\n";
}
else if ((cache_ptr->cache_accesses != 2000) || (cache_ptr->cache_hits != 1000)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache hit rate stats.\n";
}
else if (rpt_fcn_called) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Report function called?.\n";
}
}
@@ -24878,12 +24872,12 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_reset_cache_hit_rate_stats accepted NULL cache_ptr.\n";
}
else if ((cache_ptr->cache_accesses != 2000) || (cache_ptr->cache_hits != 1000)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Failed call to H5C_reset_cache_hit_rate_stats altered stats?\n";
}
}
@@ -24894,19 +24888,19 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_reset_cache_hit_rate_stats failed.\n";
}
else if ((cache_ptr->cache_accesses != 0) || (cache_ptr->cache_hits != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache hit rate stats.\n";
}
}
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, PICO_ENTRY_TYPE, i + 500);
@@ -24925,22 +24919,22 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_hit_rate failed.\n";
}
else if (!H5_DBL_ABS_EQUAL(hit_rate, 0.5)) { /* i.e. hit_rate != 0.5 */
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_hit_rate returned unexpected hit rate 4.\n";
}
else if ((cache_ptr->cache_accesses != 1000) || (cache_ptr->cache_hits != 500)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache hit rate stats.\n";
}
else if (rpt_fcn_called) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Report function called?.\n";
}
}
@@ -24957,7 +24951,7 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_size accepted NULL cache_ptr.\n";
}
}
@@ -24973,27 +24967,27 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_size failed 1.\n";
}
else if (max_size != (1 * 1024 * 1024)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_size reports unexpected max_size 1.\n";
}
else if (min_clean_size != (512 * 1024)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_size reports unexpected min_clean_size 1.\n";
}
else if (cur_size != (1500 * PICO_ENTRY_SIZE)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_size reports unexpected cur_size 1.\n";
}
else if (cur_num_entries != 1500) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_size reports unexpected cur_num_entries 1.\n";
}
}
@@ -25021,27 +25015,27 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_size failed 2.\n";
}
else if (max_size != (1 * 1024 * 1024)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_size reports unexpected max_size 2.\n";
}
else if (min_clean_size != (512 * 1024)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_size reports unexpected min_clean_size 2.\n";
}
else if (cur_size != ((1500 * PICO_ENTRY_SIZE) + MONSTER_ENTRY_SIZE)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_size reports unexpected cur_size 2.\n";
}
else if (cur_num_entries != 1501) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_size reports unexpected cur_num_entries 2.\n";
}
}
@@ -25054,12 +25048,12 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_size failed 3.\n";
}
else if (max_size != (1 * 1024 * 1024)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_size reports unexpected max_size 3.\n";
}
}
@@ -25072,12 +25066,12 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_size failed 4.\n";
}
else if (min_clean_size != (512 * 1024)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_size reports unexpected min_clean_size 4.\n";
}
}
@@ -25090,12 +25084,12 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_size failed 5.\n";
}
else if (cur_size != ((1500 * PICO_ENTRY_SIZE) + MONSTER_ENTRY_SIZE)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_size reports unexpected cur_size 5.\n";
}
}
@@ -25108,19 +25102,19 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_size failed 6.\n";
}
else if (cur_num_entries != 1501) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_size reports unexpected cur_num_entries 2.\n";
}
}
if (cache_ptr) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -25162,14 +25156,14 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
*/
static unsigned
-check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
+check_metadata_blizzard_absence(bool fill_via_insertion, unsigned paged)
{
struct expected_entry_status *expected = NULL;
int entry_type = HUGE_ENTRY_TYPE;
size_t entry_size = HUGE_ENTRY_SIZE; /* 16 KB */
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
- hbool_t show_progress = FALSE;
+ bool show_progress = false;
int32_t checkpoint = 0;
int32_t entry_idx = 0;
int32_t i;
@@ -25177,12 +25171,12 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
/* Expected deserialized status of entries depends on how they get into
* the cache. Insertions = not deserialized, protect/unprotect = deserialized.
*/
- hbool_t deserialized = (hbool_t) !(fill_via_insertion);
+ bool deserialized = (bool)!(fill_via_insertion);
expected = malloc(150 * sizeof(struct expected_entry_status));
if (expected == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "couldn't allocate expected entry status array\n";
}
@@ -25194,14 +25188,14 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
expected[i].entry_type = HUGE_ENTRY_TYPE;
expected[i].entry_index = (int)i;
expected[i].size = HUGE_ENTRY_SIZE;
- expected[i].in_cache = FALSE;
- expected[i].at_main_addr = TRUE;
- expected[i].is_dirty = FALSE;
- expected[i].is_protected = FALSE;
- expected[i].is_pinned = FALSE;
- expected[i].deserialized = FALSE;
- expected[i].serialized = FALSE;
- expected[i].destroyed = FALSE;
+ expected[i].in_cache = false;
+ expected[i].at_main_addr = true;
+ expected[i].is_dirty = false;
+ expected[i].is_protected = false;
+ expected[i].is_pinned = false;
+ expected[i].deserialized = false;
+ expected[i].serialized = false;
+ expected[i].destroyed = false;
memset(expected[i].flush_dep_par_type, 0, sizeof(expected[i].flush_dep_par_type));
memset(expected[i].flush_dep_par_idx, 0, sizeof(expected[i].flush_dep_par_idx));
@@ -25210,10 +25204,10 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
expected[i].flush_dep_nchd = 0;
expected[i].flush_dep_ndirty_chd = 0;
expected[i].flush_order = -1;
- expected[i].is_corked = FALSE;
+ expected[i].is_corked = false;
}
- pass = TRUE;
+ pass = true;
}
reset_entries();
@@ -25245,7 +25239,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
if (file_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad return from cache initialization.\n";
}
else
@@ -25304,8 +25298,8 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
/* Change expected values, and verify the status of the entries
* after each insertion
*/
- expected[entry_idx].in_cache = TRUE;
- expected[entry_idx].is_dirty = TRUE;
+ expected[entry_idx].in_cache = true;
+ expected[entry_idx].is_dirty = true;
expected[entry_idx].deserialized = (unsigned char)deserialized;
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -25370,12 +25364,12 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
*/
/* entry w/ index 0 has now been flushed and is now clean. */
- expected[0].is_dirty = FALSE;
- expected[0].serialized = TRUE;
+ expected[0].is_dirty = false;
+ expected[0].serialized = true;
/* entry w/ index 26 is now in the cache and dirty. */
- expected[26].in_cache = TRUE;
- expected[26].is_dirty = TRUE;
+ expected[26].in_cache = true;
+ expected[26].is_dirty = true;
expected[26].deserialized = (unsigned char)deserialized;
/* verify the status */
@@ -25424,12 +25418,12 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
*/
/* entry w/ index 1 has now been flushed and is now clean. */
- expected[1].is_dirty = FALSE;
- expected[1].serialized = TRUE;
+ expected[1].is_dirty = false;
+ expected[1].serialized = true;
/* entry w/ index 27 is now in the cache and dirty. */
- expected[27].in_cache = TRUE;
- expected[27].is_dirty = TRUE;
+ expected[27].in_cache = true;
+ expected[27].is_dirty = true;
expected[27].deserialized = (unsigned char)deserialized;
/* verify the status */
@@ -25470,11 +25464,11 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
* entry currently getting inserted is now in the cache and
* dirty.
*/
- expected[entry_idx - 26].is_dirty = FALSE;
- expected[entry_idx - 26].serialized = TRUE;
+ expected[entry_idx - 26].is_dirty = false;
+ expected[entry_idx - 26].serialized = true;
- expected[entry_idx].in_cache = TRUE;
- expected[entry_idx].is_dirty = TRUE;
+ expected[entry_idx].in_cache = true;
+ expected[entry_idx].is_dirty = true;
expected[entry_idx].deserialized = (unsigned char)deserialized;
/* verify the status */
@@ -25485,9 +25479,9 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
}
/* Verify that the cache is now full */
- if (cache_ptr->cache_full != TRUE) {
+ if (cache_ptr->cache_full != true) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache not completely filled.\n";
}
}
@@ -25546,18 +25540,18 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
*/
/* entry w/ index 0 has been evicted. */
- expected[0].in_cache = FALSE;
- expected[0].destroyed = TRUE;
+ expected[0].in_cache = false;
+ expected[0].destroyed = true;
/* entries w/ indices 24,25 have now been flushed and are clean. */
- expected[24].is_dirty = FALSE;
- expected[24].serialized = TRUE;
- expected[25].is_dirty = FALSE;
- expected[25].serialized = TRUE;
+ expected[24].is_dirty = false;
+ expected[24].serialized = true;
+ expected[25].is_dirty = false;
+ expected[25].serialized = true;
/* entry w/ index 50 is now in the cache and dirty */
- expected[50].in_cache = TRUE;
- expected[50].is_dirty = TRUE;
+ expected[50].in_cache = true;
+ expected[50].is_dirty = true;
expected[50].deserialized = (unsigned char)deserialized;
/* verify the status */
@@ -25600,13 +25594,13 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
}
/* This past inserted entry is now in the cache and dirty */
- expected[entry_idx].in_cache = TRUE;
- expected[entry_idx].is_dirty = TRUE;
+ expected[entry_idx].in_cache = true;
+ expected[entry_idx].is_dirty = true;
expected[entry_idx].deserialized = (unsigned char)deserialized;
/* The entry inserted 50 insertions ago has been evicted */
- expected[entry_idx - 50].in_cache = FALSE;
- expected[entry_idx - 50].destroyed = TRUE;
+ expected[entry_idx - 50].in_cache = false;
+ expected[entry_idx - 50].destroyed = true;
/* If the newly inserted entry is among the first 24
* insertions in this loop, then the insertion will
@@ -25614,8 +25608,8 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
* 25 insertions ago. */
if (entry_idx < 75) {
- expected[entry_idx - 25].is_dirty = FALSE;
- expected[entry_idx - 25].serialized = TRUE;
+ expected[entry_idx - 25].is_dirty = false;
+ expected[entry_idx - 25].serialized = true;
}
/* If the newly inserted entry is among the last
* 25 insertions in this loop, then the insertion will
@@ -25626,8 +25620,8 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
* flush-then-evict, it switches to evict-then-flush. */
else {
- expected[entry_idx - 26].is_dirty = FALSE;
- expected[entry_idx - 26].serialized = TRUE;
+ expected[entry_idx - 26].is_dirty = false;
+ expected[entry_idx - 26].serialized = true;
}
/* Verify this expected status */
@@ -25672,9 +25666,9 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
*/
flush_cache(file_ptr, /* H5F_t * file_ptr */
- FALSE, /* hbool_t destory_entries */
- FALSE, /* hbool_t dump_stats */
- FALSE); /* hbool_t dump_detailed_stats */
+ false, /* bool destory_entries */
+ false, /* bool dump_stats */
+ false); /* bool dump_detailed_stats */
/* Verify that the cache is clean */
verify_clean();
@@ -25688,8 +25682,8 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
/* entries w/ indices 74-99 have been flushed. */
for (i = 74; i < 100; i++) {
- expected[i].is_dirty = FALSE;
- expected[i].serialized = TRUE;
+ expected[i].is_dirty = false;
+ expected[i].serialized = true;
}
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
0, /* int tag */
@@ -25729,13 +25723,13 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
}
/* This past inserted entry is now in the cache and dirty */
- expected[entry_idx].in_cache = TRUE;
- expected[entry_idx].is_dirty = TRUE;
+ expected[entry_idx].in_cache = true;
+ expected[entry_idx].is_dirty = true;
expected[entry_idx].deserialized = (unsigned char)deserialized;
/* The entry with ID minus 50 will have been evicted */
- expected[entry_idx - 50].in_cache = FALSE;
- expected[entry_idx - 50].destroyed = TRUE;
+ expected[entry_idx - 50].in_cache = false;
+ expected[entry_idx - 50].destroyed = true;
/* verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -25777,16 +25771,16 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
*/
/* entry w/ index 76 has been evicted. */
- expected[76].in_cache = FALSE;
- expected[76].destroyed = TRUE;
+ expected[76].in_cache = false;
+ expected[76].destroyed = true;
/* entry w/ index 100 has now been flushed and is now clean. */
- expected[100].is_dirty = FALSE;
- expected[100].serialized = TRUE;
+ expected[100].is_dirty = false;
+ expected[100].serialized = true;
/* entry w/ index 26 is now in the cache and dirty. */
- expected[126].in_cache = TRUE;
- expected[126].is_dirty = TRUE;
+ expected[126].in_cache = true;
+ expected[126].is_dirty = true;
expected[126].deserialized = (unsigned char)deserialized;
/* verify the status */
@@ -25822,17 +25816,17 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
}
/* This past inserted entry is now in the cache and dirty */
- expected[entry_idx].in_cache = TRUE;
- expected[entry_idx].is_dirty = TRUE;
+ expected[entry_idx].in_cache = true;
+ expected[entry_idx].is_dirty = true;
expected[entry_idx].deserialized = (unsigned char)deserialized;
/* The entry with ID minus 50 will have been evicted */
- expected[entry_idx - 50].in_cache = FALSE;
- expected[entry_idx - 50].destroyed = TRUE;
+ expected[entry_idx - 50].in_cache = false;
+ expected[entry_idx - 50].destroyed = true;
/* The entry with ID minus 26 will now be clean */
- expected[entry_idx - 26].is_dirty = FALSE;
- expected[entry_idx - 26].serialized = TRUE;
+ expected[entry_idx - 26].is_dirty = false;
+ expected[entry_idx - 26].serialized = true;
/* verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -25848,7 +25842,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
if (cache_ptr) {
/* We're done with testing. We can take down the cache. */
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
reset_entries();
}
@@ -25892,11 +25886,11 @@ check_flush_deps(unsigned paged)
{
/* entry entry in at main flush dep flush dep child flush flush flush */
/* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd: srlzd: dest: par type[]: par idx[]: dep npart: dep nchd: dep ndirty chd: order: corked: */
- { PICO_ENTRY_TYPE, 0, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { PICO_ENTRY_TYPE, 1, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { PICO_ENTRY_TYPE, 2, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { PICO_ENTRY_TYPE, 3, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { PICO_ENTRY_TYPE, 4, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE}
+ { PICO_ENTRY_TYPE, 0, PICO_ENTRY_SIZE, false, true, false, false, false, false, false, false, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, false},
+ { PICO_ENTRY_TYPE, 1, PICO_ENTRY_SIZE, false, true, false, false, false, false, false, false, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, false},
+ { PICO_ENTRY_TYPE, 2, PICO_ENTRY_SIZE, false, true, false, false, false, false, false, false, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, false},
+ { PICO_ENTRY_TYPE, 3, PICO_ENTRY_SIZE, false, true, false, false, false, false, false, false, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, false},
+ { PICO_ENTRY_TYPE, 4, PICO_ENTRY_SIZE, false, true, false, false, false, false, false, false, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, false}
};
/* clang-format on */
@@ -25905,7 +25899,7 @@ check_flush_deps(unsigned paged)
else
TESTING("flush dependencies");
- pass = TRUE;
+ pass = true;
/* allocate a cache, build up flush dependency hierarchy and tear it down.
* Verify that all performs as expected.
@@ -25928,8 +25922,8 @@ check_flush_deps(unsigned paged)
/* Change expected values, and verify the status of the entries
* after each insertion
*/
- expected[u].in_cache = TRUE;
- expected[u].is_dirty = TRUE;
+ expected[u].in_cache = true;
+ expected[u].is_dirty = true;
/* Verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -25944,7 +25938,7 @@ check_flush_deps(unsigned paged)
/* Create flush dependency between entries 0 (child) & 1 (parent) */
{
- hbool_t in_cache, is_flush_dep_parent, is_flush_dep_child;
+ bool in_cache, is_flush_dep_parent, is_flush_dep_child;
test_entry_t *entry_ptr;
protect_entry(file_ptr, entry_type, 1);
@@ -25993,8 +25987,8 @@ check_flush_deps(unsigned paged)
expected[0].flush_dep_par_type[0] = entry_type;
expected[0].flush_dep_par_idx[0] = 1;
expected[0].flush_dep_npar = 1;
- expected[1].is_protected = TRUE;
- expected[1].is_pinned = TRUE;
+ expected[1].is_protected = true;
+ expected[1].is_pinned = true;
expected[1].flush_dep_nchd = 1;
expected[1].flush_dep_ndirty_chd = 1;
@@ -26024,8 +26018,8 @@ check_flush_deps(unsigned paged)
* after destroy flush dependency
*/
expected[0].flush_dep_npar = 0;
- expected[1].is_protected = FALSE;
- expected[1].is_pinned = FALSE;
+ expected[1].is_protected = false;
+ expected[1].is_pinned = false;
expected[1].flush_dep_nchd = 0;
expected[1].flush_dep_ndirty_chd = 0;
@@ -26063,8 +26057,8 @@ check_flush_deps(unsigned paged)
expected[1].flush_dep_par_type[0] = entry_type;
expected[1].flush_dep_par_idx[0] = 2;
expected[1].flush_dep_npar = 1;
- expected[2].is_protected = TRUE;
- expected[2].is_pinned = TRUE;
+ expected[2].is_protected = true;
+ expected[2].is_pinned = true;
expected[2].flush_dep_nchd = 2;
expected[2].flush_dep_ndirty_chd = 2;
@@ -26099,8 +26093,8 @@ check_flush_deps(unsigned paged)
*/
expected[0].flush_dep_npar = 0;
expected[1].flush_dep_npar = 0;
- expected[2].is_protected = FALSE;
- expected[2].is_pinned = FALSE;
+ expected[2].is_protected = false;
+ expected[2].is_pinned = false;
expected[2].flush_dep_nchd = 0;
expected[2].flush_dep_ndirty_chd = 0;
@@ -26133,8 +26127,8 @@ check_flush_deps(unsigned paged)
expected[0].flush_dep_par_type[0] = entry_type;
expected[0].flush_dep_par_idx[0] = 1;
expected[0].flush_dep_npar = 1;
- expected[1].is_protected = TRUE;
- expected[1].is_pinned = TRUE;
+ expected[1].is_protected = true;
+ expected[1].is_pinned = true;
expected[1].flush_dep_nchd = 1;
expected[1].flush_dep_ndirty_chd = 1;
@@ -26160,8 +26154,8 @@ check_flush_deps(unsigned paged)
expected[1].flush_dep_par_type[0] = entry_type;
expected[1].flush_dep_par_idx[0] = 2;
expected[1].flush_dep_npar = 1;
- expected[2].is_protected = TRUE;
- expected[2].is_pinned = TRUE;
+ expected[2].is_protected = true;
+ expected[2].is_pinned = true;
expected[2].flush_dep_nchd = 1;
expected[2].flush_dep_ndirty_chd = 1;
@@ -26187,8 +26181,8 @@ check_flush_deps(unsigned paged)
expected[2].flush_dep_par_type[0] = entry_type;
expected[2].flush_dep_par_idx[0] = 3;
expected[2].flush_dep_npar = 1;
- expected[3].is_protected = TRUE;
- expected[3].is_pinned = TRUE;
+ expected[3].is_protected = true;
+ expected[3].is_pinned = true;
expected[3].flush_dep_nchd = 1;
expected[3].flush_dep_ndirty_chd = 1;
@@ -26218,8 +26212,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[2].flush_dep_npar = 0;
- expected[3].is_protected = FALSE;
- expected[3].is_pinned = FALSE;
+ expected[3].is_protected = false;
+ expected[3].is_pinned = false;
expected[3].flush_dep_nchd = 0;
expected[3].flush_dep_ndirty_chd = 0;
@@ -26246,8 +26240,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[1].flush_dep_npar = 0;
- expected[2].is_protected = FALSE;
- expected[2].is_pinned = FALSE;
+ expected[2].is_protected = false;
+ expected[2].is_pinned = false;
expected[2].flush_dep_nchd = 0;
expected[2].flush_dep_ndirty_chd = 0;
@@ -26274,8 +26268,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[0].flush_dep_npar = 0;
- expected[1].is_protected = FALSE;
- expected[1].is_pinned = FALSE;
+ expected[1].is_protected = false;
+ expected[1].is_pinned = false;
expected[1].flush_dep_nchd = 0;
expected[1].flush_dep_ndirty_chd = 0;
@@ -26308,8 +26302,8 @@ check_flush_deps(unsigned paged)
expected[0].flush_dep_par_type[0] = entry_type;
expected[0].flush_dep_par_idx[0] = 1;
expected[0].flush_dep_npar = 1;
- expected[1].is_protected = TRUE;
- expected[1].is_pinned = TRUE;
+ expected[1].is_protected = true;
+ expected[1].is_pinned = true;
expected[1].flush_dep_nchd = 1;
expected[1].flush_dep_ndirty_chd = 1;
@@ -26335,8 +26329,8 @@ check_flush_deps(unsigned paged)
expected[1].flush_dep_par_type[0] = entry_type;
expected[1].flush_dep_par_idx[0] = 2;
expected[1].flush_dep_npar = 1;
- expected[2].is_protected = TRUE;
- expected[2].is_pinned = TRUE;
+ expected[2].is_protected = true;
+ expected[2].is_pinned = true;
expected[2].flush_dep_nchd = 1;
expected[2].flush_dep_ndirty_chd = 1;
@@ -26362,8 +26356,8 @@ check_flush_deps(unsigned paged)
expected[2].flush_dep_par_type[0] = entry_type;
expected[2].flush_dep_par_idx[0] = 3;
expected[2].flush_dep_npar = 1;
- expected[3].is_protected = TRUE;
- expected[3].is_pinned = TRUE;
+ expected[3].is_protected = true;
+ expected[3].is_pinned = true;
expected[3].flush_dep_nchd = 1;
expected[3].flush_dep_ndirty_chd = 1;
@@ -26393,8 +26387,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[0].flush_dep_npar = 0;
- expected[1].is_protected = FALSE;
- expected[1].is_pinned = FALSE;
+ expected[1].is_protected = false;
+ expected[1].is_pinned = false;
expected[1].flush_dep_nchd = 0;
expected[1].flush_dep_ndirty_chd = 0;
@@ -26421,8 +26415,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[1].flush_dep_npar = 0;
- expected[2].is_protected = FALSE;
- expected[2].is_pinned = FALSE;
+ expected[2].is_protected = false;
+ expected[2].is_pinned = false;
expected[2].flush_dep_nchd = 0;
expected[2].flush_dep_ndirty_chd = 0;
@@ -26449,8 +26443,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[2].flush_dep_npar = 0;
- expected[3].is_protected = FALSE;
- expected[3].is_pinned = FALSE;
+ expected[3].is_protected = false;
+ expected[3].is_pinned = false;
expected[3].flush_dep_nchd = 0;
expected[3].flush_dep_ndirty_chd = 0;
@@ -26483,8 +26477,8 @@ check_flush_deps(unsigned paged)
expected[2].flush_dep_par_type[0] = entry_type;
expected[2].flush_dep_par_idx[0] = 3;
expected[2].flush_dep_npar = 1;
- expected[3].is_protected = TRUE;
- expected[3].is_pinned = TRUE;
+ expected[3].is_protected = true;
+ expected[3].is_pinned = true;
expected[3].flush_dep_nchd = 1;
expected[3].flush_dep_ndirty_chd = 1;
@@ -26510,8 +26504,8 @@ check_flush_deps(unsigned paged)
expected[1].flush_dep_par_type[0] = entry_type;
expected[1].flush_dep_par_idx[0] = 2;
expected[1].flush_dep_npar = 1;
- expected[2].is_protected = TRUE;
- expected[2].is_pinned = TRUE;
+ expected[2].is_protected = true;
+ expected[2].is_pinned = true;
expected[2].flush_dep_nchd = 1;
expected[2].flush_dep_ndirty_chd = 1;
@@ -26537,8 +26531,8 @@ check_flush_deps(unsigned paged)
expected[0].flush_dep_par_type[0] = entry_type;
expected[0].flush_dep_par_idx[0] = 1;
expected[0].flush_dep_npar = 1;
- expected[1].is_protected = TRUE;
- expected[1].is_pinned = TRUE;
+ expected[1].is_protected = true;
+ expected[1].is_pinned = true;
expected[1].flush_dep_nchd = 1;
expected[1].flush_dep_ndirty_chd = 1;
@@ -26568,8 +26562,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[2].flush_dep_npar = 0;
- expected[3].is_protected = FALSE;
- expected[3].is_pinned = FALSE;
+ expected[3].is_protected = false;
+ expected[3].is_pinned = false;
expected[3].flush_dep_nchd = 0;
expected[3].flush_dep_ndirty_chd = 0;
@@ -26596,8 +26590,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[1].flush_dep_npar = 0;
- expected[2].is_protected = FALSE;
- expected[2].is_pinned = FALSE;
+ expected[2].is_protected = false;
+ expected[2].is_pinned = false;
expected[2].flush_dep_nchd = 0;
expected[2].flush_dep_ndirty_chd = 0;
@@ -26624,8 +26618,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[0].flush_dep_npar = 0;
- expected[1].is_protected = FALSE;
- expected[1].is_pinned = FALSE;
+ expected[1].is_protected = false;
+ expected[1].is_pinned = false;
expected[1].flush_dep_nchd = 0;
expected[1].flush_dep_ndirty_chd = 0;
@@ -26658,8 +26652,8 @@ check_flush_deps(unsigned paged)
expected[2].flush_dep_par_type[0] = entry_type;
expected[2].flush_dep_par_idx[0] = 3;
expected[2].flush_dep_npar = 1;
- expected[3].is_protected = TRUE;
- expected[3].is_pinned = TRUE;
+ expected[3].is_protected = true;
+ expected[3].is_pinned = true;
expected[3].flush_dep_nchd = 1;
expected[3].flush_dep_ndirty_chd = 1;
@@ -26685,8 +26679,8 @@ check_flush_deps(unsigned paged)
expected[1].flush_dep_par_type[0] = entry_type;
expected[1].flush_dep_par_idx[0] = 2;
expected[1].flush_dep_npar = 1;
- expected[2].is_protected = TRUE;
- expected[2].is_pinned = TRUE;
+ expected[2].is_protected = true;
+ expected[2].is_pinned = true;
expected[2].flush_dep_nchd = 1;
expected[2].flush_dep_ndirty_chd = 1;
@@ -26712,8 +26706,8 @@ check_flush_deps(unsigned paged)
expected[0].flush_dep_par_type[0] = entry_type;
expected[0].flush_dep_par_idx[0] = 1;
expected[0].flush_dep_npar = 1;
- expected[1].is_protected = TRUE;
- expected[1].is_pinned = TRUE;
+ expected[1].is_protected = true;
+ expected[1].is_pinned = true;
expected[1].flush_dep_nchd = 1;
expected[1].flush_dep_ndirty_chd = 1;
@@ -26743,8 +26737,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[0].flush_dep_npar = 0;
- expected[1].is_protected = FALSE;
- expected[1].is_pinned = FALSE;
+ expected[1].is_protected = false;
+ expected[1].is_pinned = false;
expected[1].flush_dep_nchd = 0;
expected[1].flush_dep_ndirty_chd = 0;
@@ -26771,8 +26765,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[1].flush_dep_npar = 0;
- expected[2].is_protected = FALSE;
- expected[2].is_pinned = FALSE;
+ expected[2].is_protected = false;
+ expected[2].is_pinned = false;
expected[2].flush_dep_nchd = 0;
expected[2].flush_dep_ndirty_chd = 0;
@@ -26799,8 +26793,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[2].flush_dep_npar = 0;
- expected[3].is_protected = FALSE;
- expected[3].is_pinned = FALSE;
+ expected[3].is_protected = false;
+ expected[3].is_pinned = false;
expected[3].flush_dep_nchd = 0;
expected[3].flush_dep_ndirty_chd = 0;
@@ -26832,8 +26826,8 @@ check_flush_deps(unsigned paged)
expected[u].flush_dep_par_type[0] = entry_type;
expected[u].flush_dep_par_idx[0] = 4;
expected[u].flush_dep_npar = 1;
- expected[4].is_protected = TRUE;
- expected[4].is_pinned = TRUE;
+ expected[4].is_protected = true;
+ expected[4].is_pinned = true;
expected[4].flush_dep_nchd++;
expected[4].flush_dep_ndirty_chd++;
@@ -26873,8 +26867,8 @@ check_flush_deps(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
*/
- expected[4].is_protected = FALSE;
- expected[4].is_pinned = FALSE;
+ expected[4].is_protected = false;
+ expected[4].is_pinned = false;
} /* end if */
/* Verify the status */
@@ -26909,8 +26903,8 @@ check_flush_deps(unsigned paged)
expected[0].flush_dep_par_type[0] = entry_type;
expected[0].flush_dep_par_idx[0] = 1;
expected[0].flush_dep_npar = 1;
- expected[1].is_protected = TRUE;
- expected[1].is_pinned = TRUE;
+ expected[1].is_protected = true;
+ expected[1].is_pinned = true;
expected[1].flush_dep_nchd = 1;
expected[1].flush_dep_ndirty_chd = 1;
@@ -26936,8 +26930,8 @@ check_flush_deps(unsigned paged)
expected[3].flush_dep_par_type[0] = entry_type;
expected[3].flush_dep_par_idx[0] = 4;
expected[3].flush_dep_npar = 1;
- expected[4].is_protected = TRUE;
- expected[4].is_pinned = TRUE;
+ expected[4].is_protected = true;
+ expected[4].is_pinned = true;
expected[4].flush_dep_nchd = 1;
expected[4].flush_dep_ndirty_chd = 1;
@@ -26963,8 +26957,8 @@ check_flush_deps(unsigned paged)
expected[4].flush_dep_par_type[0] = entry_type;
expected[4].flush_dep_par_idx[0] = 0;
expected[4].flush_dep_npar = 1;
- expected[0].is_protected = TRUE;
- expected[0].is_pinned = TRUE;
+ expected[0].is_protected = true;
+ expected[0].is_pinned = true;
expected[0].flush_dep_nchd = 1;
expected[0].flush_dep_ndirty_chd = 1;
@@ -26994,8 +26988,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[4].flush_dep_npar = 0;
- expected[0].is_protected = FALSE;
- expected[0].is_pinned = FALSE;
+ expected[0].is_protected = false;
+ expected[0].is_pinned = false;
expected[0].flush_dep_nchd = 0;
expected[0].flush_dep_ndirty_chd = 0;
@@ -27022,8 +27016,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[3].flush_dep_npar = 0;
- expected[4].is_protected = FALSE;
- expected[4].is_pinned = FALSE;
+ expected[4].is_protected = false;
+ expected[4].is_pinned = false;
expected[4].flush_dep_nchd = 0;
expected[4].flush_dep_ndirty_chd = 0;
@@ -27050,8 +27044,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[0].flush_dep_npar = 0;
- expected[1].is_protected = FALSE;
- expected[1].is_pinned = FALSE;
+ expected[1].is_protected = false;
+ expected[1].is_pinned = false;
expected[1].flush_dep_nchd = 0;
expected[1].flush_dep_ndirty_chd = 0;
@@ -27086,8 +27080,8 @@ check_flush_deps(unsigned paged)
expected[0].flush_dep_par_type[0] = entry_type;
expected[0].flush_dep_par_idx[0] = 1;
expected[0].flush_dep_npar = 1;
- expected[1].is_protected = TRUE;
- expected[1].is_pinned = TRUE;
+ expected[1].is_protected = true;
+ expected[1].is_pinned = true;
expected[1].flush_dep_nchd = 1;
expected[1].flush_dep_ndirty_chd = 1;
@@ -27113,8 +27107,8 @@ check_flush_deps(unsigned paged)
expected[1].flush_dep_par_type[0] = entry_type;
expected[1].flush_dep_par_idx[0] = 2;
expected[1].flush_dep_npar = 1;
- expected[2].is_protected = TRUE;
- expected[2].is_pinned = TRUE;
+ expected[2].is_protected = true;
+ expected[2].is_pinned = true;
expected[2].flush_dep_nchd = 1;
expected[2].flush_dep_ndirty_chd = 1;
@@ -27140,8 +27134,8 @@ check_flush_deps(unsigned paged)
expected[3].flush_dep_par_type[0] = entry_type;
expected[3].flush_dep_par_idx[0] = 4;
expected[3].flush_dep_npar = 1;
- expected[4].is_protected = TRUE;
- expected[4].is_pinned = TRUE;
+ expected[4].is_protected = true;
+ expected[4].is_pinned = true;
expected[4].flush_dep_nchd = 1;
expected[4].flush_dep_ndirty_chd = 1;
@@ -27211,8 +27205,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[3].flush_dep_npar = 0;
- expected[4].is_protected = FALSE;
- expected[4].is_pinned = FALSE;
+ expected[4].is_protected = false;
+ expected[4].is_pinned = false;
expected[4].flush_dep_nchd = 0;
expected[4].flush_dep_ndirty_chd = 0;
@@ -27239,8 +27233,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[1].flush_dep_npar = 0;
- expected[2].is_protected = FALSE;
- expected[2].is_pinned = FALSE;
+ expected[2].is_protected = false;
+ expected[2].is_pinned = false;
expected[2].flush_dep_nchd = 0;
expected[2].flush_dep_ndirty_chd = 0;
@@ -27267,8 +27261,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[0].flush_dep_npar = 0;
- expected[1].is_protected = FALSE;
- expected[1].is_pinned = FALSE;
+ expected[1].is_protected = false;
+ expected[1].is_pinned = false;
expected[1].flush_dep_nchd = 0;
expected[1].flush_dep_ndirty_chd = 0;
@@ -27303,8 +27297,8 @@ check_flush_deps(unsigned paged)
expected[0].flush_dep_par_type[0] = entry_type;
expected[0].flush_dep_par_idx[0] = 1;
expected[0].flush_dep_npar = 1;
- expected[1].is_protected = TRUE;
- expected[1].is_pinned = TRUE;
+ expected[1].is_protected = true;
+ expected[1].is_pinned = true;
expected[1].flush_dep_nchd = 1;
expected[1].flush_dep_ndirty_chd = 1;
@@ -27330,8 +27324,8 @@ check_flush_deps(unsigned paged)
expected[1].flush_dep_par_type[0] = entry_type;
expected[1].flush_dep_par_idx[0] = 2;
expected[1].flush_dep_npar = 1;
- expected[2].is_protected = TRUE;
- expected[2].is_pinned = TRUE;
+ expected[2].is_protected = true;
+ expected[2].is_pinned = true;
expected[2].flush_dep_nchd = 1;
expected[2].flush_dep_ndirty_chd = 1;
@@ -27357,8 +27351,8 @@ check_flush_deps(unsigned paged)
expected[3].flush_dep_par_type[0] = entry_type;
expected[3].flush_dep_par_idx[0] = 4;
expected[3].flush_dep_npar = 1;
- expected[4].is_protected = TRUE;
- expected[4].is_pinned = TRUE;
+ expected[4].is_protected = true;
+ expected[4].is_pinned = true;
expected[4].flush_dep_nchd = 1;
expected[4].flush_dep_ndirty_chd = 1;
@@ -27428,8 +27422,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[3].flush_dep_npar = 0;
- expected[4].is_protected = FALSE;
- expected[4].is_pinned = FALSE;
+ expected[4].is_protected = false;
+ expected[4].is_pinned = false;
expected[4].flush_dep_nchd = 0;
expected[4].flush_dep_ndirty_chd = 0;
@@ -27456,8 +27450,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[1].flush_dep_npar = 0;
- expected[2].is_protected = FALSE;
- expected[2].is_pinned = FALSE;
+ expected[2].is_protected = false;
+ expected[2].is_pinned = false;
expected[2].flush_dep_nchd = 0;
expected[2].flush_dep_ndirty_chd = 0;
@@ -27484,8 +27478,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[0].flush_dep_npar = 0;
- expected[1].is_protected = FALSE;
- expected[1].is_pinned = FALSE;
+ expected[1].is_protected = false;
+ expected[1].is_pinned = false;
expected[1].flush_dep_nchd = 0;
expected[1].flush_dep_ndirty_chd = 0;
@@ -27522,8 +27516,8 @@ check_flush_deps(unsigned paged)
expected[0].flush_dep_par_type[0] = entry_type;
expected[0].flush_dep_par_idx[0] = 1;
expected[0].flush_dep_npar = 1;
- expected[1].is_protected = TRUE;
- expected[1].is_pinned = TRUE;
+ expected[1].is_protected = true;
+ expected[1].is_pinned = true;
expected[1].flush_dep_nchd = 1;
expected[1].flush_dep_ndirty_chd = 1;
@@ -27557,8 +27551,8 @@ check_flush_deps(unsigned paged)
* after destroy flush dependency
*/
expected[0].flush_dep_npar = 0;
- expected[1].is_protected = FALSE;
- expected[1].is_pinned = FALSE;
+ expected[1].is_protected = false;
+ expected[1].is_pinned = false;
expected[1].flush_dep_nchd = 0;
expected[1].flush_dep_ndirty_chd = 0;
@@ -27595,8 +27589,8 @@ check_flush_deps(unsigned paged)
expected[0].flush_dep_par_type[0] = entry_type;
expected[0].flush_dep_par_idx[0] = 1;
expected[0].flush_dep_npar = 1;
- expected[1].is_protected = TRUE;
- expected[1].is_pinned = TRUE;
+ expected[1].is_protected = true;
+ expected[1].is_pinned = true;
expected[1].flush_dep_nchd = 1;
expected[1].flush_dep_ndirty_chd = 1;
@@ -27638,8 +27632,8 @@ check_flush_deps(unsigned paged)
* after destroy flush dependency
*/
expected[0].flush_dep_npar = 0;
- expected[1].is_protected = FALSE;
- expected[1].is_pinned = FALSE;
+ expected[1].is_protected = false;
+ expected[1].is_pinned = false;
expected[1].flush_dep_nchd = 0;
expected[1].flush_dep_ndirty_chd = 0;
@@ -27672,8 +27666,8 @@ check_flush_deps(unsigned paged)
expected[0].flush_dep_par_type[0] = entry_type;
expected[0].flush_dep_par_idx[0] = 1;
expected[0].flush_dep_npar = 1;
- expected[1].is_protected = TRUE;
- expected[1].is_pinned = TRUE;
+ expected[1].is_protected = true;
+ expected[1].is_pinned = true;
expected[1].flush_dep_nchd = 1;
expected[1].flush_dep_ndirty_chd = 1;
@@ -27699,8 +27693,8 @@ check_flush_deps(unsigned paged)
expected[0].flush_dep_par_type[1] = entry_type;
expected[0].flush_dep_par_idx[1] = 2;
expected[0].flush_dep_npar = 2;
- expected[2].is_protected = TRUE;
- expected[2].is_pinned = TRUE;
+ expected[2].is_protected = true;
+ expected[2].is_pinned = true;
expected[2].flush_dep_nchd = 1;
expected[2].flush_dep_ndirty_chd = 1;
@@ -27732,8 +27726,8 @@ check_flush_deps(unsigned paged)
expected[0].flush_dep_par_type[0] = entry_type;
expected[0].flush_dep_par_idx[0] = 2;
expected[0].flush_dep_npar = 1;
- expected[1].is_protected = FALSE;
- expected[1].is_pinned = FALSE;
+ expected[1].is_protected = false;
+ expected[1].is_pinned = false;
expected[1].flush_dep_nchd = 0;
expected[1].flush_dep_ndirty_chd = 0;
@@ -27760,8 +27754,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[0].flush_dep_npar = 0;
- expected[2].is_protected = FALSE;
- expected[2].is_pinned = FALSE;
+ expected[2].is_protected = false;
+ expected[2].is_pinned = false;
expected[2].flush_dep_nchd = 0;
expected[2].flush_dep_ndirty_chd = 0;
@@ -27776,7 +27770,7 @@ check_flush_deps(unsigned paged)
done:
if (file_ptr)
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
if (pass)
PASSED();
@@ -27810,7 +27804,7 @@ check_flush_deps_err(unsigned paged)
else
TESTING("flush dependency errors");
- pass = TRUE;
+ pass = true;
/* Loop over test cases, check for various errors in configuring flush
* dependencies. Verify that all performs as expected.
@@ -28031,7 +28025,7 @@ check_flush_deps_err(unsigned paged)
CACHE_ERROR("Unknown test case!")
} /* end switch */
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
if (!pass)
CACHE_ERROR("takedown_cache failed")
file_ptr = NULL;
@@ -28039,7 +28033,7 @@ check_flush_deps_err(unsigned paged)
done:
if (file_ptr)
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
if (pass)
PASSED();
@@ -28075,11 +28069,11 @@ check_flush_deps_order(unsigned paged)
{
/* entry entry in at main flush dep flush dep child flush flush flush */
/* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd: srlzd: dest: par type[]: par idx[]: dep npart: dep nchd: dep ndirty chd: order: corked: */
- { PICO_ENTRY_TYPE, 0, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { PICO_ENTRY_TYPE, 1, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { PICO_ENTRY_TYPE, 2, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { PICO_ENTRY_TYPE, 3, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { PICO_ENTRY_TYPE, 4, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE}
+ { PICO_ENTRY_TYPE, 0, PICO_ENTRY_SIZE, false, true, false, false, false, false, false, false, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, false},
+ { PICO_ENTRY_TYPE, 1, PICO_ENTRY_SIZE, false, true, false, false, false, false, false, false, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, false},
+ { PICO_ENTRY_TYPE, 2, PICO_ENTRY_SIZE, false, true, false, false, false, false, false, false, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, false},
+ { PICO_ENTRY_TYPE, 3, PICO_ENTRY_SIZE, false, true, false, false, false, false, false, false, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, false},
+ { PICO_ENTRY_TYPE, 4, PICO_ENTRY_SIZE, false, true, false, false, false, false, false, false, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, false}
};
/* clang-format on */
@@ -28088,7 +28082,7 @@ check_flush_deps_order(unsigned paged)
else
TESTING("flush dependencies flush order");
- pass = TRUE;
+ pass = true;
/* allocate a cache, build up flush dependency hierarchy and tear it down.
* Verify that all performs as expected.
@@ -28110,8 +28104,8 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after each insertion
*/
- expected[u].in_cache = TRUE;
- expected[u].is_dirty = TRUE;
+ expected[u].in_cache = true;
+ expected[u].is_dirty = true;
/* Verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -28140,8 +28134,8 @@ check_flush_deps_order(unsigned paged)
expected[0].flush_dep_par_type[0] = entry_type;
expected[0].flush_dep_par_idx[0] = 1;
expected[0].flush_dep_npar = 1;
- expected[1].is_protected = TRUE;
- expected[1].is_pinned = TRUE;
+ expected[1].is_protected = true;
+ expected[1].is_pinned = true;
expected[1].flush_dep_nchd = 1;
expected[1].flush_dep_ndirty_chd = 1;
@@ -28156,8 +28150,8 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
@@ -28176,20 +28170,20 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
*/
- expected[0].is_dirty = FALSE;
- expected[0].serialized = TRUE;
+ expected[0].is_dirty = false;
+ expected[0].serialized = true;
expected[0].flush_order = 0;
- expected[1].is_dirty = FALSE;
- expected[1].serialized = TRUE;
+ expected[1].is_dirty = false;
+ expected[1].serialized = true;
expected[1].flush_order = 1;
- expected[1].is_protected = FALSE;
+ expected[1].is_protected = false;
expected[1].flush_dep_ndirty_chd = 0;
- expected[2].is_dirty = FALSE;
- expected[2].serialized = TRUE;
- expected[3].is_dirty = FALSE;
- expected[3].serialized = TRUE;
- expected[4].is_dirty = FALSE;
- expected[4].serialized = TRUE;
+ expected[2].is_dirty = false;
+ expected[2].serialized = true;
+ expected[3].is_dirty = false;
+ expected[3].serialized = true;
+ expected[4].is_dirty = false;
+ expected[4].serialized = true;
/* Verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -28210,7 +28204,7 @@ check_flush_deps_order(unsigned paged)
* after destroy flush dependency
*/
expected[0].flush_dep_npar = 0;
- expected[1].is_pinned = FALSE;
+ expected[1].is_pinned = false;
expected[1].flush_dep_nchd = 0;
/* Verify the status */
@@ -28237,8 +28231,8 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after creating flush dependency
*/
- expected[0].is_protected = TRUE;
- expected[0].is_pinned = TRUE;
+ expected[0].is_protected = true;
+ expected[0].is_pinned = true;
expected[0].flush_dep_nchd = 1;
expected[1].flush_dep_par_type[0] = entry_type;
expected[1].flush_dep_par_idx[0] = 0;
@@ -28255,8 +28249,8 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
@@ -28266,15 +28260,15 @@ check_flush_deps_order(unsigned paged)
CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0 & 1 dirty, so they are flushed */
- dirty_entry(file_ptr, entry_type, 0, TRUE);
- dirty_entry(file_ptr, entry_type, 1, FALSE);
+ dirty_entry(file_ptr, entry_type, 0, true);
+ dirty_entry(file_ptr, entry_type, 1, false);
if (!pass)
CACHE_ERROR("dirty_entry failed")
/* Reset 'serialized' flag & 'flush_order' value in expected array */
- expected[0].serialized = FALSE;
+ expected[0].serialized = false;
expected[0].flush_order = -1;
- expected[1].serialized = FALSE;
+ expected[1].serialized = false;
expected[1].flush_order = -1;
/* Reset index for tracking flush order */
@@ -28287,12 +28281,12 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
*/
- expected[0].is_dirty = FALSE;
- expected[0].serialized = TRUE;
+ expected[0].is_dirty = false;
+ expected[0].serialized = true;
expected[0].flush_order = 1;
- expected[0].is_protected = FALSE;
- expected[1].is_dirty = FALSE;
- expected[1].serialized = TRUE;
+ expected[0].is_protected = false;
+ expected[1].is_dirty = false;
+ expected[1].serialized = true;
expected[1].flush_order = 0;
/* Verify the status */
@@ -28313,7 +28307,7 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
*/
- expected[0].is_pinned = FALSE;
+ expected[0].is_pinned = false;
expected[0].flush_dep_nchd = 0;
expected[1].flush_dep_npar = 0;
@@ -28353,8 +28347,8 @@ check_flush_deps_order(unsigned paged)
expected[1].flush_dep_par_type[0] = entry_type;
expected[1].flush_dep_par_idx[0] = 2;
expected[1].flush_dep_npar = 1;
- expected[2].is_protected = TRUE;
- expected[2].is_pinned = TRUE;
+ expected[2].is_protected = true;
+ expected[2].is_pinned = true;
expected[2].flush_dep_nchd = 2;
/* Verify the status */
@@ -28368,9 +28362,9 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
@@ -28380,18 +28374,18 @@ check_flush_deps_order(unsigned paged)
CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0, 1 & 2 dirty, so they are flushed */
- dirty_entry(file_ptr, entry_type, 0, FALSE);
- dirty_entry(file_ptr, entry_type, 1, FALSE);
- dirty_entry(file_ptr, entry_type, 2, TRUE);
+ dirty_entry(file_ptr, entry_type, 0, false);
+ dirty_entry(file_ptr, entry_type, 1, false);
+ dirty_entry(file_ptr, entry_type, 2, true);
if (!pass)
CACHE_ERROR("dirty_entry failed")
/* Reset 'serialized' flag & 'flush_order' value in expected array */
- expected[0].serialized = FALSE;
+ expected[0].serialized = false;
expected[0].flush_order = -1;
- expected[1].serialized = FALSE;
+ expected[1].serialized = false;
expected[1].flush_order = -1;
- expected[2].serialized = FALSE;
+ expected[2].serialized = false;
expected[2].flush_order = -1;
/* Reset index for tracking flush order */
@@ -28404,16 +28398,16 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
*/
- expected[0].is_dirty = FALSE;
- expected[0].serialized = TRUE;
+ expected[0].is_dirty = false;
+ expected[0].serialized = true;
expected[0].flush_order = 0;
- expected[1].is_dirty = FALSE;
- expected[1].serialized = TRUE;
+ expected[1].is_dirty = false;
+ expected[1].serialized = true;
expected[1].flush_order = 1;
- expected[2].is_dirty = FALSE;
- expected[2].serialized = TRUE;
+ expected[2].is_dirty = false;
+ expected[2].serialized = true;
expected[2].flush_order = 2;
- expected[2].is_protected = FALSE;
+ expected[2].is_protected = false;
/* Verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -28439,7 +28433,7 @@ check_flush_deps_order(unsigned paged)
*/
expected[0].flush_dep_npar = 0;
expected[1].flush_dep_npar = 0;
- expected[2].is_pinned = FALSE;
+ expected[2].is_pinned = false;
expected[2].flush_dep_nchd = 0;
/* Verify the status */
@@ -28472,8 +28466,8 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after creating flush dependency
*/
- expected[0].is_protected = TRUE;
- expected[0].is_pinned = TRUE;
+ expected[0].is_protected = true;
+ expected[0].is_pinned = true;
expected[0].flush_dep_nchd = 2;
expected[1].flush_dep_par_type[0] = entry_type;
expected[1].flush_dep_par_idx[0] = 0;
@@ -28493,9 +28487,9 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
@@ -28505,18 +28499,18 @@ check_flush_deps_order(unsigned paged)
CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0, 1 & 2 dirty, so they are flushed */
- dirty_entry(file_ptr, entry_type, 0, TRUE);
- dirty_entry(file_ptr, entry_type, 1, FALSE);
- dirty_entry(file_ptr, entry_type, 2, FALSE);
+ dirty_entry(file_ptr, entry_type, 0, true);
+ dirty_entry(file_ptr, entry_type, 1, false);
+ dirty_entry(file_ptr, entry_type, 2, false);
if (!pass)
CACHE_ERROR("dirty_entry failed")
/* Reset 'serialized' flag & 'flush_order' value in expected array */
- expected[0].serialized = FALSE;
+ expected[0].serialized = false;
expected[0].flush_order = -1;
- expected[1].serialized = FALSE;
+ expected[1].serialized = false;
expected[1].flush_order = -1;
- expected[2].serialized = FALSE;
+ expected[2].serialized = false;
expected[2].flush_order = -1;
/* Reset index for tracking flush order */
@@ -28529,15 +28523,15 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
*/
- expected[0].is_dirty = FALSE;
- expected[0].serialized = TRUE;
+ expected[0].is_dirty = false;
+ expected[0].serialized = true;
expected[0].flush_order = 2;
- expected[0].is_protected = FALSE;
- expected[1].is_dirty = FALSE;
- expected[1].serialized = TRUE;
+ expected[0].is_protected = false;
+ expected[1].is_dirty = false;
+ expected[1].serialized = true;
expected[1].flush_order = 0;
- expected[2].is_dirty = FALSE;
- expected[2].serialized = TRUE;
+ expected[2].is_dirty = false;
+ expected[2].serialized = true;
expected[2].flush_order = 1;
/* Verify the status */
@@ -28562,7 +28556,7 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
*/
- expected[0].is_pinned = FALSE;
+ expected[0].is_pinned = false;
expected[0].flush_dep_nchd = 0;
expected[1].flush_dep_npar = 0;
expected[2].flush_dep_npar = 0;
@@ -28596,8 +28590,8 @@ check_flush_deps_order(unsigned paged)
expected[0].flush_dep_par_type[0] = entry_type;
expected[0].flush_dep_par_idx[0] = 1;
expected[0].flush_dep_npar = 1;
- expected[1].is_protected = TRUE;
- expected[1].is_pinned = TRUE;
+ expected[1].is_protected = true;
+ expected[1].is_pinned = true;
expected[1].flush_dep_nchd = 1;
/* Verify the status */
@@ -28622,8 +28616,8 @@ check_flush_deps_order(unsigned paged)
expected[1].flush_dep_par_type[0] = entry_type;
expected[1].flush_dep_par_idx[0] = 2;
expected[1].flush_dep_npar = 1;
- expected[2].is_protected = TRUE;
- expected[2].is_pinned = TRUE;
+ expected[2].is_protected = true;
+ expected[2].is_pinned = true;
expected[2].flush_dep_nchd = 1;
/* Verify the status */
@@ -28648,8 +28642,8 @@ check_flush_deps_order(unsigned paged)
expected[2].flush_dep_par_type[0] = entry_type;
expected[2].flush_dep_par_idx[0] = 3;
expected[2].flush_dep_npar = 1;
- expected[3].is_protected = TRUE;
- expected[3].is_pinned = TRUE;
+ expected[3].is_protected = true;
+ expected[3].is_pinned = true;
expected[3].flush_dep_nchd = 1;
/* Verify the status */
@@ -28663,10 +28657,10 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 3, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 3, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
@@ -28690,21 +28684,21 @@ check_flush_deps_order(unsigned paged)
CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0-3 dirty, so they are flushed */
- dirty_entry(file_ptr, entry_type, 0, FALSE);
- dirty_entry(file_ptr, entry_type, 1, TRUE);
- dirty_entry(file_ptr, entry_type, 2, TRUE);
- dirty_entry(file_ptr, entry_type, 3, TRUE);
+ dirty_entry(file_ptr, entry_type, 0, false);
+ dirty_entry(file_ptr, entry_type, 1, true);
+ dirty_entry(file_ptr, entry_type, 2, true);
+ dirty_entry(file_ptr, entry_type, 3, true);
if (!pass)
CACHE_ERROR("dirty_entry failed")
/* Reset 'serialized' flag & 'flush_order' value in expected array */
- expected[0].serialized = FALSE;
+ expected[0].serialized = false;
expected[0].flush_order = -1;
- expected[1].serialized = FALSE;
+ expected[1].serialized = false;
expected[1].flush_order = -1;
- expected[2].serialized = FALSE;
+ expected[2].serialized = false;
expected[2].flush_order = -1;
- expected[3].serialized = FALSE;
+ expected[3].serialized = false;
expected[3].flush_order = -1;
/* Reset index for tracking flush order */
@@ -28717,20 +28711,20 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
*/
- expected[0].is_dirty = FALSE;
- expected[0].serialized = TRUE;
+ expected[0].is_dirty = false;
+ expected[0].serialized = true;
expected[0].flush_order = 0;
- expected[1].is_dirty = FALSE;
- expected[1].serialized = TRUE;
+ expected[1].is_dirty = false;
+ expected[1].serialized = true;
expected[1].flush_order = 1;
- expected[1].is_protected = FALSE;
- expected[2].is_dirty = FALSE;
- expected[2].serialized = TRUE;
+ expected[1].is_protected = false;
+ expected[2].is_dirty = false;
+ expected[2].serialized = true;
expected[2].flush_order = 2;
- expected[2].is_protected = FALSE;
- expected[3].serialized = TRUE;
+ expected[2].is_protected = false;
+ expected[3].serialized = true;
expected[3].flush_order = 3;
- expected[3].is_protected = FALSE;
+ expected[3].is_protected = false;
/* Verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -28751,7 +28745,7 @@ check_flush_deps_order(unsigned paged)
* after destroying flush dependency
*/
expected[2].flush_dep_npar = 0;
- expected[3].is_pinned = FALSE;
+ expected[3].is_pinned = false;
expected[3].flush_dep_nchd = 0;
/* Verify the status */
@@ -28770,7 +28764,7 @@ check_flush_deps_order(unsigned paged)
* after destroying flush dependency
*/
expected[1].flush_dep_npar = 0;
- expected[2].is_pinned = FALSE;
+ expected[2].is_pinned = false;
expected[2].flush_dep_nchd = 0;
/* Verify the status */
@@ -28789,7 +28783,7 @@ check_flush_deps_order(unsigned paged)
* after destroying flush dependency
*/
expected[0].flush_dep_npar = 0;
- expected[1].is_pinned = FALSE;
+ expected[1].is_pinned = false;
expected[1].flush_dep_nchd = 0;
/* Verify the status */
@@ -28818,8 +28812,8 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after creating flush dependency
*/
- expected[0].is_protected = TRUE;
- expected[0].is_pinned = TRUE;
+ expected[0].is_protected = true;
+ expected[0].is_pinned = true;
expected[0].flush_dep_nchd = 1;
expected[1].flush_dep_par_type[0] = entry_type;
expected[1].flush_dep_par_idx[0] = 0;
@@ -28844,8 +28838,8 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after creating flush dependency
*/
- expected[1].is_protected = TRUE;
- expected[1].is_pinned = TRUE;
+ expected[1].is_protected = true;
+ expected[1].is_pinned = true;
expected[1].flush_dep_nchd = 1;
expected[2].flush_dep_par_type[0] = entry_type;
expected[2].flush_dep_par_idx[0] = 1;
@@ -28870,8 +28864,8 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after creating flush dependency
*/
- expected[2].is_protected = TRUE;
- expected[2].is_pinned = TRUE;
+ expected[2].is_protected = true;
+ expected[2].is_pinned = true;
expected[2].flush_dep_nchd = 1;
expected[3].flush_dep_par_type[0] = entry_type;
expected[3].flush_dep_par_idx[0] = 2;
@@ -28888,10 +28882,10 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 3, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 3, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
@@ -28915,21 +28909,21 @@ check_flush_deps_order(unsigned paged)
CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0-3 dirty, so they are flushed */
- dirty_entry(file_ptr, entry_type, 0, TRUE);
- dirty_entry(file_ptr, entry_type, 1, TRUE);
- dirty_entry(file_ptr, entry_type, 2, TRUE);
- dirty_entry(file_ptr, entry_type, 3, FALSE);
+ dirty_entry(file_ptr, entry_type, 0, true);
+ dirty_entry(file_ptr, entry_type, 1, true);
+ dirty_entry(file_ptr, entry_type, 2, true);
+ dirty_entry(file_ptr, entry_type, 3, false);
if (!pass)
CACHE_ERROR("dirty_entry failed")
/* Reset 'serialized' flag & 'flush_order' value in expected array */
- expected[0].serialized = FALSE;
+ expected[0].serialized = false;
expected[0].flush_order = -1;
- expected[1].serialized = FALSE;
+ expected[1].serialized = false;
expected[1].flush_order = -1;
- expected[2].serialized = FALSE;
+ expected[2].serialized = false;
expected[2].flush_order = -1;
- expected[3].serialized = FALSE;
+ expected[3].serialized = false;
expected[3].flush_order = -1;
/* Reset index for tracking flush order */
@@ -28942,20 +28936,20 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
*/
- expected[0].is_dirty = FALSE;
- expected[0].serialized = TRUE;
+ expected[0].is_dirty = false;
+ expected[0].serialized = true;
expected[0].flush_order = 3;
- expected[0].is_protected = FALSE;
- expected[1].is_dirty = FALSE;
- expected[1].serialized = TRUE;
+ expected[0].is_protected = false;
+ expected[1].is_dirty = false;
+ expected[1].serialized = true;
expected[1].flush_order = 2;
- expected[1].is_protected = FALSE;
- expected[2].is_dirty = FALSE;
- expected[2].serialized = TRUE;
+ expected[1].is_protected = false;
+ expected[2].is_dirty = false;
+ expected[2].serialized = true;
expected[2].flush_order = 1;
- expected[2].is_protected = FALSE;
- expected[3].is_dirty = FALSE;
- expected[3].serialized = TRUE;
+ expected[2].is_protected = false;
+ expected[3].is_dirty = false;
+ expected[3].serialized = true;
expected[3].flush_order = 0;
/* Verify the status */
@@ -28976,7 +28970,7 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
*/
- expected[2].is_pinned = FALSE;
+ expected[2].is_pinned = false;
expected[2].flush_dep_nchd = 0;
expected[3].flush_dep_npar = 0;
@@ -28995,7 +28989,7 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
*/
- expected[1].is_pinned = FALSE;
+ expected[1].is_pinned = false;
expected[1].flush_dep_nchd = 0;
expected[2].flush_dep_npar = 0;
@@ -29014,7 +29008,7 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
*/
- expected[0].is_pinned = FALSE;
+ expected[0].is_pinned = false;
expected[0].flush_dep_nchd = 0;
expected[1].flush_dep_npar = 0;
@@ -29046,8 +29040,8 @@ check_flush_deps_order(unsigned paged)
expected[u].flush_dep_par_type[0] = entry_type;
expected[u].flush_dep_par_idx[0] = 4;
expected[u].flush_dep_npar = 1;
- expected[4].is_protected = TRUE;
- expected[4].is_pinned = TRUE;
+ expected[4].is_protected = true;
+ expected[4].is_pinned = true;
expected[4].flush_dep_nchd = u + 1;
/* Verify the status */
@@ -29062,11 +29056,11 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 3, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 4, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 3, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 4, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
@@ -29076,24 +29070,24 @@ check_flush_deps_order(unsigned paged)
CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0-4 dirty, so they are flushed */
- dirty_entry(file_ptr, entry_type, 0, FALSE);
- dirty_entry(file_ptr, entry_type, 1, FALSE);
- dirty_entry(file_ptr, entry_type, 2, FALSE);
- dirty_entry(file_ptr, entry_type, 3, FALSE);
- dirty_entry(file_ptr, entry_type, 4, TRUE);
+ dirty_entry(file_ptr, entry_type, 0, false);
+ dirty_entry(file_ptr, entry_type, 1, false);
+ dirty_entry(file_ptr, entry_type, 2, false);
+ dirty_entry(file_ptr, entry_type, 3, false);
+ dirty_entry(file_ptr, entry_type, 4, true);
if (!pass)
CACHE_ERROR("dirty_entry failed")
/* Reset 'serialized' flag & 'flush_order' value in expected array */
- expected[0].serialized = FALSE;
+ expected[0].serialized = false;
expected[0].flush_order = -1;
- expected[1].serialized = FALSE;
+ expected[1].serialized = false;
expected[1].flush_order = -1;
- expected[2].serialized = FALSE;
+ expected[2].serialized = false;
expected[2].flush_order = -1;
- expected[3].serialized = FALSE;
+ expected[3].serialized = false;
expected[3].flush_order = -1;
- expected[4].serialized = FALSE;
+ expected[4].serialized = false;
expected[4].flush_order = -1;
/* Reset index for tracking flush order */
@@ -29106,22 +29100,22 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
*/
- expected[0].is_dirty = FALSE;
- expected[0].serialized = TRUE;
+ expected[0].is_dirty = false;
+ expected[0].serialized = true;
expected[0].flush_order = 0;
- expected[1].is_dirty = FALSE;
- expected[1].serialized = TRUE;
+ expected[1].is_dirty = false;
+ expected[1].serialized = true;
expected[1].flush_order = 1;
- expected[2].is_dirty = FALSE;
- expected[2].serialized = TRUE;
+ expected[2].is_dirty = false;
+ expected[2].serialized = true;
expected[2].flush_order = 2;
- expected[3].is_dirty = FALSE;
- expected[3].serialized = TRUE;
+ expected[3].is_dirty = false;
+ expected[3].serialized = true;
expected[3].flush_order = 3;
- expected[4].is_dirty = FALSE;
- expected[4].serialized = TRUE;
+ expected[4].is_dirty = false;
+ expected[4].serialized = true;
expected[4].flush_order = 4;
- expected[4].is_protected = FALSE;
+ expected[4].is_protected = false;
/* Verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -29150,7 +29144,7 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
*/
- expected[4].is_pinned = FALSE;
+ expected[4].is_pinned = false;
} /* end if */
/* Verify the status */
@@ -29182,8 +29176,8 @@ check_flush_deps_order(unsigned paged)
expected[u].flush_dep_par_type[0] = entry_type;
expected[u].flush_dep_par_idx[0] = 0;
expected[u].flush_dep_npar = 1;
- expected[0].is_protected = TRUE;
- expected[0].is_pinned = TRUE;
+ expected[0].is_protected = true;
+ expected[0].is_pinned = true;
expected[0].flush_dep_nchd = u;
/* Verify the status */
@@ -29198,11 +29192,11 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 3, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 4, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 3, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 4, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
@@ -29212,24 +29206,24 @@ check_flush_deps_order(unsigned paged)
CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0-4 dirty, so they are flushed */
- dirty_entry(file_ptr, entry_type, 0, TRUE);
- dirty_entry(file_ptr, entry_type, 1, FALSE);
- dirty_entry(file_ptr, entry_type, 2, FALSE);
- dirty_entry(file_ptr, entry_type, 3, FALSE);
- dirty_entry(file_ptr, entry_type, 4, FALSE);
+ dirty_entry(file_ptr, entry_type, 0, true);
+ dirty_entry(file_ptr, entry_type, 1, false);
+ dirty_entry(file_ptr, entry_type, 2, false);
+ dirty_entry(file_ptr, entry_type, 3, false);
+ dirty_entry(file_ptr, entry_type, 4, false);
if (!pass)
CACHE_ERROR("dirty_entry failed")
/* Reset 'serialized' flag & 'flush_order' value in expected array */
- expected[0].serialized = FALSE;
+ expected[0].serialized = false;
expected[0].flush_order = -1;
- expected[1].serialized = FALSE;
+ expected[1].serialized = false;
expected[1].flush_order = -1;
- expected[2].serialized = FALSE;
+ expected[2].serialized = false;
expected[2].flush_order = -1;
- expected[3].serialized = FALSE;
+ expected[3].serialized = false;
expected[3].flush_order = -1;
- expected[4].serialized = FALSE;
+ expected[4].serialized = false;
expected[4].flush_order = -1;
/* Reset index for tracking flush order */
@@ -29242,21 +29236,21 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
*/
- expected[0].is_dirty = FALSE;
- expected[0].serialized = TRUE;
+ expected[0].is_dirty = false;
+ expected[0].serialized = true;
expected[0].flush_order = 4;
- expected[0].is_protected = FALSE;
- expected[1].is_dirty = FALSE;
- expected[1].serialized = TRUE;
+ expected[0].is_protected = false;
+ expected[1].is_dirty = false;
+ expected[1].serialized = true;
expected[1].flush_order = 0;
- expected[2].is_dirty = FALSE;
- expected[2].serialized = TRUE;
+ expected[2].is_dirty = false;
+ expected[2].serialized = true;
expected[2].flush_order = 1;
- expected[3].is_dirty = FALSE;
- expected[3].serialized = TRUE;
+ expected[3].is_dirty = false;
+ expected[3].serialized = true;
expected[3].flush_order = 2;
- expected[4].is_dirty = FALSE;
- expected[4].serialized = TRUE;
+ expected[4].is_dirty = false;
+ expected[4].serialized = true;
expected[4].flush_order = 3;
/* Verify the status */
@@ -29286,7 +29280,7 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
*/
- expected[0].is_pinned = FALSE;
+ expected[0].is_pinned = false;
} /* end if */
/* Verify the status */
@@ -29321,8 +29315,8 @@ check_flush_deps_order(unsigned paged)
expected[0].flush_dep_par_type[0] = entry_type;
expected[0].flush_dep_par_idx[0] = 1;
expected[0].flush_dep_npar = 1;
- expected[1].is_protected = TRUE;
- expected[1].is_pinned = TRUE;
+ expected[1].is_protected = true;
+ expected[1].is_pinned = true;
expected[1].flush_dep_nchd = 1;
/* Verify the status */
@@ -29347,8 +29341,8 @@ check_flush_deps_order(unsigned paged)
expected[3].flush_dep_par_type[0] = entry_type;
expected[3].flush_dep_par_idx[0] = 4;
expected[3].flush_dep_npar = 1;
- expected[4].is_protected = TRUE;
- expected[4].is_pinned = TRUE;
+ expected[4].is_protected = true;
+ expected[4].is_pinned = true;
expected[4].flush_dep_nchd = 1;
/* Verify the status */
@@ -29373,8 +29367,8 @@ check_flush_deps_order(unsigned paged)
expected[4].flush_dep_par_type[0] = entry_type;
expected[4].flush_dep_par_idx[0] = 0;
expected[4].flush_dep_npar = 1;
- expected[0].is_protected = TRUE;
- expected[0].is_pinned = TRUE;
+ expected[0].is_protected = true;
+ expected[0].is_pinned = true;
expected[0].flush_dep_nchd = 1;
/* Verify the status */
@@ -29388,11 +29382,11 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
- add_flush_op(entry_type, 3, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 4, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 3, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 4, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
@@ -29416,23 +29410,23 @@ check_flush_deps_order(unsigned paged)
CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0 & 1, 3 & 4 dirty, so they are flushed */
- dirty_entry(file_ptr, entry_type, 0, TRUE);
- dirty_entry(file_ptr, entry_type, 1, TRUE);
- dirty_entry(file_ptr, entry_type, 3, FALSE);
- dirty_entry(file_ptr, entry_type, 4, TRUE);
+ dirty_entry(file_ptr, entry_type, 0, true);
+ dirty_entry(file_ptr, entry_type, 1, true);
+ dirty_entry(file_ptr, entry_type, 3, false);
+ dirty_entry(file_ptr, entry_type, 4, true);
if (!pass)
CACHE_ERROR("dirty_entry failed")
/* Reset 'serialized' flag & 'flush_order' value in expected array */
- expected[0].serialized = FALSE;
+ expected[0].serialized = false;
expected[0].flush_order = -1;
- expected[1].serialized = FALSE;
+ expected[1].serialized = false;
expected[1].flush_order = -1;
- expected[2].serialized = FALSE;
+ expected[2].serialized = false;
expected[2].flush_order = -1;
- expected[3].serialized = FALSE;
+ expected[3].serialized = false;
expected[3].flush_order = -1;
- expected[4].serialized = FALSE;
+ expected[4].serialized = false;
expected[4].flush_order = -1;
/* Reset index for tracking flush order */
@@ -29445,23 +29439,23 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
*/
- expected[0].is_dirty = FALSE;
- expected[0].serialized = TRUE;
+ expected[0].is_dirty = false;
+ expected[0].serialized = true;
expected[0].flush_order = 2;
- expected[0].is_protected = FALSE;
- expected[1].is_dirty = FALSE;
- expected[1].serialized = TRUE;
+ expected[0].is_protected = false;
+ expected[1].is_dirty = false;
+ expected[1].serialized = true;
expected[1].flush_order = 3;
- expected[1].is_protected = FALSE;
- expected[2].is_dirty = FALSE;
- expected[2].serialized = TRUE;
- expected[3].is_dirty = FALSE;
- expected[3].serialized = TRUE;
+ expected[1].is_protected = false;
+ expected[2].is_dirty = false;
+ expected[2].serialized = true;
+ expected[3].is_dirty = false;
+ expected[3].serialized = true;
expected[3].flush_order = 0;
- expected[4].is_dirty = FALSE;
- expected[4].serialized = TRUE;
+ expected[4].is_dirty = false;
+ expected[4].serialized = true;
expected[4].flush_order = 1;
- expected[4].is_protected = FALSE;
+ expected[4].is_protected = false;
/* Verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -29482,7 +29476,7 @@ check_flush_deps_order(unsigned paged)
* after destroying flush dependency
*/
expected[4].flush_dep_npar = 0;
- expected[0].is_pinned = FALSE;
+ expected[0].is_pinned = false;
expected[0].flush_dep_nchd = 0;
/* Verify the status */
@@ -29501,7 +29495,7 @@ check_flush_deps_order(unsigned paged)
* after destroying flush dependency
*/
expected[3].flush_dep_npar = 0;
- expected[4].is_pinned = FALSE;
+ expected[4].is_pinned = false;
expected[4].flush_dep_nchd = 0;
/* Verify the status */
@@ -29520,7 +29514,7 @@ check_flush_deps_order(unsigned paged)
* after destroying flush dependency
*/
expected[0].flush_dep_npar = 0;
- expected[1].is_pinned = FALSE;
+ expected[1].is_pinned = false;
expected[1].flush_dep_nchd = 0;
/* Verify the status */
@@ -29554,8 +29548,8 @@ check_flush_deps_order(unsigned paged)
expected[0].flush_dep_par_type[0] = entry_type;
expected[0].flush_dep_par_idx[0] = 1;
expected[0].flush_dep_npar = 1;
- expected[1].is_protected = TRUE;
- expected[1].is_pinned = TRUE;
+ expected[1].is_protected = true;
+ expected[1].is_pinned = true;
expected[1].flush_dep_nchd = 1;
/* Verify the status */
@@ -29580,8 +29574,8 @@ check_flush_deps_order(unsigned paged)
expected[1].flush_dep_par_type[0] = entry_type;
expected[1].flush_dep_par_idx[0] = 2;
expected[1].flush_dep_npar = 1;
- expected[2].is_protected = TRUE;
- expected[2].is_pinned = TRUE;
+ expected[2].is_protected = true;
+ expected[2].is_pinned = true;
expected[2].flush_dep_nchd = 1;
/* Verify the status */
@@ -29606,8 +29600,8 @@ check_flush_deps_order(unsigned paged)
expected[3].flush_dep_par_type[0] = entry_type;
expected[3].flush_dep_par_idx[0] = 4;
expected[3].flush_dep_npar = 1;
- expected[4].is_protected = TRUE;
- expected[4].is_pinned = TRUE;
+ expected[4].is_protected = true;
+ expected[4].is_pinned = true;
expected[4].flush_dep_nchd = 1;
/* Verify the status */
@@ -29641,11 +29635,11 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 3, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 4, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 3, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 4, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
@@ -29669,24 +29663,24 @@ check_flush_deps_order(unsigned paged)
CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0-4 dirty, so they are flushed */
- dirty_entry(file_ptr, entry_type, 0, FALSE);
- dirty_entry(file_ptr, entry_type, 1, TRUE);
- dirty_entry(file_ptr, entry_type, 2, TRUE);
- dirty_entry(file_ptr, entry_type, 3, FALSE);
- dirty_entry(file_ptr, entry_type, 4, TRUE);
+ dirty_entry(file_ptr, entry_type, 0, false);
+ dirty_entry(file_ptr, entry_type, 1, true);
+ dirty_entry(file_ptr, entry_type, 2, true);
+ dirty_entry(file_ptr, entry_type, 3, false);
+ dirty_entry(file_ptr, entry_type, 4, true);
if (!pass)
CACHE_ERROR("dirty_entry failed")
/* Reset 'serialized' flag & 'flush_order' value in expected array */
- expected[0].serialized = FALSE;
+ expected[0].serialized = false;
expected[0].flush_order = -1;
- expected[1].serialized = FALSE;
+ expected[1].serialized = false;
expected[1].flush_order = -1;
- expected[2].serialized = FALSE;
+ expected[2].serialized = false;
expected[2].flush_order = -1;
- expected[3].serialized = FALSE;
+ expected[3].serialized = false;
expected[3].flush_order = -1;
- expected[4].serialized = FALSE;
+ expected[4].serialized = false;
expected[4].flush_order = -1;
/* Reset index for tracking flush order */
@@ -29699,25 +29693,25 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
*/
- expected[0].is_dirty = FALSE;
- expected[0].serialized = TRUE;
+ expected[0].is_dirty = false;
+ expected[0].serialized = true;
expected[0].flush_order = 0;
- expected[0].is_protected = FALSE;
- expected[1].is_dirty = FALSE;
- expected[1].serialized = TRUE;
+ expected[0].is_protected = false;
+ expected[1].is_dirty = false;
+ expected[1].serialized = true;
expected[1].flush_order = 3;
- expected[1].is_protected = FALSE;
- expected[2].is_dirty = FALSE;
- expected[2].serialized = TRUE;
+ expected[1].is_protected = false;
+ expected[2].is_dirty = false;
+ expected[2].serialized = true;
expected[2].flush_order = 4;
- expected[2].is_protected = FALSE;
- expected[3].is_dirty = FALSE;
- expected[3].serialized = TRUE;
+ expected[2].is_protected = false;
+ expected[3].is_dirty = false;
+ expected[3].serialized = true;
expected[3].flush_order = 1;
- expected[4].is_dirty = FALSE;
- expected[4].serialized = TRUE;
+ expected[4].is_dirty = false;
+ expected[4].serialized = true;
expected[4].flush_order = 2;
- expected[4].is_protected = FALSE;
+ expected[4].is_protected = false;
/* Verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -29756,7 +29750,7 @@ check_flush_deps_order(unsigned paged)
* after destroying flush dependency
*/
expected[3].flush_dep_npar = 0;
- expected[4].is_pinned = FALSE;
+ expected[4].is_pinned = false;
expected[4].flush_dep_nchd = 0;
/* Verify the status */
@@ -29775,7 +29769,7 @@ check_flush_deps_order(unsigned paged)
* after destroying flush dependency
*/
expected[1].flush_dep_npar = 0;
- expected[2].is_pinned = FALSE;
+ expected[2].is_pinned = false;
expected[2].flush_dep_nchd = 0;
/* Verify the status */
@@ -29794,7 +29788,7 @@ check_flush_deps_order(unsigned paged)
* after destroying flush dependency
*/
expected[0].flush_dep_npar = 0;
- expected[1].is_pinned = FALSE;
+ expected[1].is_pinned = false;
expected[1].flush_dep_nchd = 0;
/* Verify the status */
@@ -29828,8 +29822,8 @@ check_flush_deps_order(unsigned paged)
expected[0].flush_dep_par_type[0] = entry_type;
expected[0].flush_dep_par_idx[0] = 1;
expected[0].flush_dep_npar = 1;
- expected[1].is_protected = TRUE;
- expected[1].is_pinned = TRUE;
+ expected[1].is_protected = true;
+ expected[1].is_pinned = true;
expected[1].flush_dep_nchd = 1;
/* Verify the status */
@@ -29854,8 +29848,8 @@ check_flush_deps_order(unsigned paged)
expected[1].flush_dep_par_type[0] = entry_type;
expected[1].flush_dep_par_idx[0] = 2;
expected[1].flush_dep_npar = 1;
- expected[2].is_protected = TRUE;
- expected[2].is_pinned = TRUE;
+ expected[2].is_protected = true;
+ expected[2].is_pinned = true;
expected[2].flush_dep_nchd = 1;
/* Verify the status */
@@ -29880,8 +29874,8 @@ check_flush_deps_order(unsigned paged)
expected[3].flush_dep_par_type[0] = entry_type;
expected[3].flush_dep_par_idx[0] = 4;
expected[3].flush_dep_npar = 1;
- expected[4].is_protected = TRUE;
- expected[4].is_pinned = TRUE;
+ expected[4].is_protected = true;
+ expected[4].is_pinned = true;
expected[4].flush_dep_nchd = 1;
/* Verify the status */
@@ -29915,11 +29909,11 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 3, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 4, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 3, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 4, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
@@ -29943,24 +29937,24 @@ check_flush_deps_order(unsigned paged)
CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0-4 dirty, so they are flushed */
- dirty_entry(file_ptr, entry_type, 0, FALSE);
- dirty_entry(file_ptr, entry_type, 1, TRUE);
- dirty_entry(file_ptr, entry_type, 2, TRUE);
- dirty_entry(file_ptr, entry_type, 3, FALSE);
- dirty_entry(file_ptr, entry_type, 4, TRUE);
+ dirty_entry(file_ptr, entry_type, 0, false);
+ dirty_entry(file_ptr, entry_type, 1, true);
+ dirty_entry(file_ptr, entry_type, 2, true);
+ dirty_entry(file_ptr, entry_type, 3, false);
+ dirty_entry(file_ptr, entry_type, 4, true);
if (!pass)
CACHE_ERROR("dirty_entry failed")
/* Reset 'serialized' flag & 'flush_order' value in expected array */
- expected[0].serialized = FALSE;
+ expected[0].serialized = false;
expected[0].flush_order = -1;
- expected[1].serialized = FALSE;
+ expected[1].serialized = false;
expected[1].flush_order = -1;
- expected[2].serialized = FALSE;
+ expected[2].serialized = false;
expected[2].flush_order = -1;
- expected[3].serialized = FALSE;
+ expected[3].serialized = false;
expected[3].flush_order = -1;
- expected[4].serialized = FALSE;
+ expected[4].serialized = false;
expected[4].flush_order = -1;
/* Reset index for tracking flush order */
@@ -29973,25 +29967,25 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
*/
- expected[0].is_dirty = FALSE;
- expected[0].serialized = TRUE;
+ expected[0].is_dirty = false;
+ expected[0].serialized = true;
expected[0].flush_order = 0;
- expected[0].is_protected = FALSE;
- expected[1].is_dirty = FALSE;
- expected[1].serialized = TRUE;
+ expected[0].is_protected = false;
+ expected[1].is_dirty = false;
+ expected[1].serialized = true;
expected[1].flush_order = 1;
- expected[1].is_protected = FALSE;
- expected[2].is_dirty = FALSE;
- expected[2].serialized = TRUE;
+ expected[1].is_protected = false;
+ expected[2].is_dirty = false;
+ expected[2].serialized = true;
expected[2].flush_order = 4;
- expected[2].is_protected = FALSE;
- expected[3].is_dirty = FALSE;
- expected[3].serialized = TRUE;
+ expected[2].is_protected = false;
+ expected[3].is_dirty = false;
+ expected[3].serialized = true;
expected[3].flush_order = 2;
- expected[4].is_dirty = FALSE;
- expected[4].serialized = TRUE;
+ expected[4].is_dirty = false;
+ expected[4].serialized = true;
expected[4].flush_order = 3;
- expected[4].is_protected = FALSE;
+ expected[4].is_protected = false;
/* Verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -30030,7 +30024,7 @@ check_flush_deps_order(unsigned paged)
* after destroying flush dependency
*/
expected[3].flush_dep_npar = 0;
- expected[4].is_pinned = FALSE;
+ expected[4].is_pinned = false;
expected[4].flush_dep_nchd = 0;
/* Verify the status */
@@ -30049,7 +30043,7 @@ check_flush_deps_order(unsigned paged)
* after destroying flush dependency
*/
expected[1].flush_dep_npar = 0;
- expected[2].is_pinned = FALSE;
+ expected[2].is_pinned = false;
expected[2].flush_dep_nchd = 0;
/* Verify the status */
@@ -30068,7 +30062,7 @@ check_flush_deps_order(unsigned paged)
* after destroying flush dependency
*/
expected[0].flush_dep_npar = 0;
- expected[1].is_pinned = FALSE;
+ expected[1].is_pinned = false;
expected[1].flush_dep_nchd = 0;
/* Verify the status */
@@ -30101,8 +30095,8 @@ check_flush_deps_order(unsigned paged)
expected[0].flush_dep_par_type[0] = entry_type;
expected[0].flush_dep_par_idx[0] = 1;
expected[0].flush_dep_npar = 1;
- expected[1].is_protected = TRUE;
- expected[1].is_pinned = TRUE;
+ expected[1].is_protected = true;
+ expected[1].is_pinned = true;
expected[1].flush_dep_nchd = 1;
/* Verify the status */
@@ -30127,8 +30121,8 @@ check_flush_deps_order(unsigned paged)
expected[0].flush_dep_par_type[1] = entry_type;
expected[0].flush_dep_par_idx[1] = 2;
expected[0].flush_dep_npar = 2;
- expected[2].is_protected = TRUE;
- expected[2].is_pinned = TRUE;
+ expected[2].is_protected = true;
+ expected[2].is_pinned = true;
expected[2].flush_dep_nchd = 1;
/* Verify the status */
@@ -30173,8 +30167,8 @@ check_flush_deps_order(unsigned paged)
expected[0].flush_dep_par_type[2] = entry_type;
expected[0].flush_dep_par_idx[2] = 3;
expected[0].flush_dep_npar = 3;
- expected[3].is_protected = TRUE;
- expected[3].is_pinned = TRUE;
+ expected[3].is_protected = true;
+ expected[3].is_pinned = true;
expected[3].flush_dep_nchd = 1;
/* Verify the status */
@@ -30228,10 +30222,10 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 3, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 3, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
@@ -30255,21 +30249,21 @@ check_flush_deps_order(unsigned paged)
CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0-3 dirty, so they are flushed */
- dirty_entry(file_ptr, entry_type, 0, FALSE);
- dirty_entry(file_ptr, entry_type, 1, TRUE);
- dirty_entry(file_ptr, entry_type, 2, TRUE);
- dirty_entry(file_ptr, entry_type, 3, FALSE);
+ dirty_entry(file_ptr, entry_type, 0, false);
+ dirty_entry(file_ptr, entry_type, 1, true);
+ dirty_entry(file_ptr, entry_type, 2, true);
+ dirty_entry(file_ptr, entry_type, 3, false);
if (!pass)
CACHE_ERROR("dirty_entry failed")
/* Reset 'flushed' flag & 'flush_order' value in expected array */
- expected[0].serialized = FALSE;
+ expected[0].serialized = false;
expected[0].flush_order = -1;
- expected[1].serialized = FALSE;
+ expected[1].serialized = false;
expected[1].flush_order = -1;
- expected[2].serialized = FALSE;
+ expected[2].serialized = false;
expected[2].flush_order = -1;
- expected[3].serialized = FALSE;
+ expected[3].serialized = false;
expected[3].flush_order = -1;
/* Reset index for tracking flush order */
@@ -30282,22 +30276,22 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
*/
- expected[0].is_dirty = FALSE;
- expected[0].serialized = TRUE;
+ expected[0].is_dirty = false;
+ expected[0].serialized = true;
expected[0].flush_order = 0;
- expected[0].is_protected = FALSE;
- expected[1].is_dirty = FALSE;
- expected[1].serialized = TRUE;
+ expected[0].is_protected = false;
+ expected[1].is_dirty = false;
+ expected[1].serialized = true;
expected[1].flush_order = 1;
- expected[1].is_protected = FALSE;
- expected[2].is_dirty = FALSE;
- expected[2].serialized = TRUE;
+ expected[1].is_protected = false;
+ expected[2].is_dirty = false;
+ expected[2].serialized = true;
expected[2].flush_order = 2;
- expected[2].is_protected = FALSE;
- expected[3].is_dirty = FALSE;
- expected[3].serialized = TRUE;
+ expected[2].is_protected = false;
+ expected[3].is_dirty = false;
+ expected[3].serialized = true;
expected[3].flush_order = 3;
- expected[3].is_protected = FALSE;
+ expected[3].is_protected = false;
/* Verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -30354,7 +30348,7 @@ check_flush_deps_order(unsigned paged)
* after destroying flush dependency
*/
expected[0].flush_dep_npar = 2;
- expected[3].is_pinned = FALSE;
+ expected[3].is_pinned = false;
expected[3].flush_dep_nchd = 0;
/* Verify the status */
@@ -30391,7 +30385,7 @@ check_flush_deps_order(unsigned paged)
* after destroying flush dependency
*/
expected[0].flush_dep_npar = 1;
- expected[2].is_pinned = FALSE;
+ expected[2].is_pinned = false;
expected[2].flush_dep_nchd = 0;
/* Verify the status */
@@ -30410,7 +30404,7 @@ check_flush_deps_order(unsigned paged)
* after destroying flush dependency
*/
expected[0].flush_dep_npar = 0;
- expected[1].is_pinned = FALSE;
+ expected[1].is_pinned = false;
expected[1].flush_dep_nchd = 0;
/* Verify the status */
@@ -30443,8 +30437,8 @@ check_flush_deps_order(unsigned paged)
expected[3].flush_dep_par_type[0] = entry_type;
expected[3].flush_dep_par_idx[0] = 2;
expected[3].flush_dep_npar = 1;
- expected[2].is_protected = TRUE;
- expected[2].is_pinned = TRUE;
+ expected[2].is_protected = true;
+ expected[2].is_pinned = true;
expected[2].flush_dep_nchd = 1;
/* Verify the status */
@@ -30469,8 +30463,8 @@ check_flush_deps_order(unsigned paged)
expected[3].flush_dep_par_type[1] = entry_type;
expected[3].flush_dep_par_idx[1] = 1;
expected[3].flush_dep_npar = 2;
- expected[1].is_protected = TRUE;
- expected[1].is_pinned = TRUE;
+ expected[1].is_protected = true;
+ expected[1].is_pinned = true;
expected[1].flush_dep_nchd = 1;
/* Verify the status */
@@ -30515,8 +30509,8 @@ check_flush_deps_order(unsigned paged)
expected[3].flush_dep_par_type[2] = entry_type;
expected[3].flush_dep_par_idx[2] = 0;
expected[3].flush_dep_npar = 3;
- expected[0].is_protected = TRUE;
- expected[0].is_pinned = TRUE;
+ expected[0].is_protected = true;
+ expected[0].is_pinned = true;
expected[0].flush_dep_nchd = 1;
/* Verify the status */
@@ -30570,10 +30564,10 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 3, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 3, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
@@ -30597,21 +30591,21 @@ check_flush_deps_order(unsigned paged)
CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0-3 dirty, so they are flushed */
- dirty_entry(file_ptr, entry_type, 0, FALSE);
- dirty_entry(file_ptr, entry_type, 1, TRUE);
- dirty_entry(file_ptr, entry_type, 2, TRUE);
- dirty_entry(file_ptr, entry_type, 3, FALSE);
+ dirty_entry(file_ptr, entry_type, 0, false);
+ dirty_entry(file_ptr, entry_type, 1, true);
+ dirty_entry(file_ptr, entry_type, 2, true);
+ dirty_entry(file_ptr, entry_type, 3, false);
if (!pass)
CACHE_ERROR("dirty_entry failed")
/* Reset 'flushed' flag & 'flush_order' value in expected array */
- expected[0].serialized = FALSE;
+ expected[0].serialized = false;
expected[0].flush_order = -1;
- expected[1].serialized = FALSE;
+ expected[1].serialized = false;
expected[1].flush_order = -1;
- expected[2].serialized = FALSE;
+ expected[2].serialized = false;
expected[2].flush_order = -1;
- expected[3].serialized = FALSE;
+ expected[3].serialized = false;
expected[3].flush_order = -1;
/* Reset index for tracking flush order */
@@ -30624,22 +30618,22 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
*/
- expected[0].is_dirty = FALSE;
- expected[0].serialized = TRUE;
+ expected[0].is_dirty = false;
+ expected[0].serialized = true;
expected[0].flush_order = 3;
- expected[0].is_protected = FALSE;
- expected[1].is_dirty = FALSE;
- expected[1].serialized = TRUE;
+ expected[0].is_protected = false;
+ expected[1].is_dirty = false;
+ expected[1].serialized = true;
expected[1].flush_order = 2;
- expected[1].is_protected = FALSE;
- expected[2].is_dirty = FALSE;
- expected[2].serialized = TRUE;
+ expected[1].is_protected = false;
+ expected[2].is_dirty = false;
+ expected[2].serialized = true;
expected[2].flush_order = 1;
- expected[2].is_protected = FALSE;
- expected[3].is_dirty = FALSE;
- expected[3].serialized = TRUE;
+ expected[2].is_protected = false;
+ expected[3].is_dirty = false;
+ expected[3].serialized = true;
expected[3].flush_order = 0;
- expected[3].is_protected = FALSE;
+ expected[3].is_protected = false;
/* Verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -30696,7 +30690,7 @@ check_flush_deps_order(unsigned paged)
* after destroying flush dependency
*/
expected[3].flush_dep_npar = 2;
- expected[0].is_pinned = FALSE;
+ expected[0].is_pinned = false;
expected[0].flush_dep_nchd = 0;
/* Verify the status */
@@ -30733,7 +30727,7 @@ check_flush_deps_order(unsigned paged)
* after destroying flush dependency
*/
expected[3].flush_dep_npar = 1;
- expected[1].is_pinned = FALSE;
+ expected[1].is_pinned = false;
expected[1].flush_dep_nchd = 0;
/* Verify the status */
@@ -30752,7 +30746,7 @@ check_flush_deps_order(unsigned paged)
* after destroying flush dependency
*/
expected[3].flush_dep_npar = 0;
- expected[2].is_pinned = FALSE;
+ expected[2].is_pinned = false;
expected[2].flush_dep_nchd = 0;
/* Verify the status */
@@ -30766,7 +30760,7 @@ check_flush_deps_order(unsigned paged)
done:
if (file_ptr)
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
if (pass)
PASSED();
@@ -30802,11 +30796,11 @@ check_notify_cb(unsigned paged)
{
/* entry entry in at main flush dep flush dep child flush flush flush */
/* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd: srlzd: dest: par type[]: par idx[]: dep npart: dep nchd: dep ndirty chd: order: corked: */
- { NOTIFY_ENTRY_TYPE, 0, NOTIFY_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { NOTIFY_ENTRY_TYPE, 1, NOTIFY_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { NOTIFY_ENTRY_TYPE, 2, NOTIFY_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { NOTIFY_ENTRY_TYPE, 3, NOTIFY_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { NOTIFY_ENTRY_TYPE, 4, NOTIFY_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE}
+ { NOTIFY_ENTRY_TYPE, 0, NOTIFY_ENTRY_SIZE, false, true, false, false, false, false, false, false, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, false},
+ { NOTIFY_ENTRY_TYPE, 1, NOTIFY_ENTRY_SIZE, false, true, false, false, false, false, false, false, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, false},
+ { NOTIFY_ENTRY_TYPE, 2, NOTIFY_ENTRY_SIZE, false, true, false, false, false, false, false, false, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, false},
+ { NOTIFY_ENTRY_TYPE, 3, NOTIFY_ENTRY_SIZE, false, true, false, false, false, false, false, false, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, false},
+ { NOTIFY_ENTRY_TYPE, 4, NOTIFY_ENTRY_SIZE, false, true, false, false, false, false, false, false, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, false}
};
/* clang-format on */
@@ -30815,7 +30809,7 @@ check_notify_cb(unsigned paged)
else
TESTING("'notify' callback");
- pass = TRUE;
+ pass = true;
/* Allocate a cache, insert & remove entries, triggering 'notify' callback.
* Verify that all performs as expected.
@@ -30840,8 +30834,8 @@ check_notify_cb(unsigned paged)
/* Change expected values, and verify the status of the entries
* after each insertion
*/
- expected[u].in_cache = TRUE;
- expected[u].is_dirty = TRUE;
+ expected[u].in_cache = true;
+ expected[u].is_dirty = true;
/* Verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -30868,10 +30862,10 @@ check_notify_cb(unsigned paged)
/* Change expected values, and verify the status of the entries
* after each expunge
*/
- expected[u].in_cache = FALSE;
- expected[u].is_dirty = TRUE;
- expected[u].serialized = FALSE;
- expected[u].destroyed = TRUE;
+ expected[u].in_cache = false;
+ expected[u].is_dirty = true;
+ expected[u].serialized = false;
+ expected[u].destroyed = true;
/* Verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -30898,10 +30892,10 @@ check_notify_cb(unsigned paged)
/* Change expected values, and verify the status of the entries
* after each insertion
*/
- expected[u].in_cache = TRUE;
- expected[u].is_dirty = FALSE;
- expected[u].is_protected = TRUE;
- expected[u].deserialized = TRUE;
+ expected[u].in_cache = true;
+ expected[u].is_dirty = false;
+ expected[u].is_protected = true;
+ expected[u].deserialized = true;
/* Verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -30928,9 +30922,9 @@ check_notify_cb(unsigned paged)
/* Change expected values, and verify the status of the entries
* after each insertion
*/
- expected[u].in_cache = TRUE;
- expected[u].is_dirty = TRUE;
- expected[u].is_protected = FALSE;
+ expected[u].in_cache = true;
+ expected[u].is_dirty = true;
+ expected[u].is_protected = false;
/* Verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -30957,10 +30951,10 @@ check_notify_cb(unsigned paged)
/* Change expected values, and verify the status of the entries
* after each expunge
*/
- expected[u].in_cache = FALSE;
- expected[u].is_dirty = TRUE;
- expected[u].serialized = FALSE;
- expected[u].destroyed = TRUE;
+ expected[u].in_cache = false;
+ expected[u].is_dirty = true;
+ expected[u].serialized = false;
+ expected[u].destroyed = true;
/* Verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -30979,7 +30973,7 @@ check_notify_cb(unsigned paged)
} /* end for */
done:
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
if (pass)
PASSED();
@@ -31004,7 +30998,7 @@ check_notify_cb(unsigned paged)
*-------------------------------------------------------------------------
*/
static unsigned
-check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
+check_metadata_cork(bool fill_via_insertion, unsigned paged)
{
struct expected_entry_status *expected = NULL;
const char *fcn_name = "check_metadata_cork";
@@ -31012,7 +31006,7 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
size_t entry_size = HUGE_ENTRY_SIZE; /* 16 KB */
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
- hbool_t show_progress = FALSE;
+ bool show_progress = false;
int32_t checkpoint = 0;
int32_t entry_idx = 0;
int32_t i;
@@ -31020,12 +31014,12 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
/* Expected deserialized status of entries depends on how they get into
* the cache. Insertions = not deserialized, protect/unprotect = deserialized.
*/
- hbool_t deserialized = (hbool_t) !(fill_via_insertion);
+ bool deserialized = (bool)!(fill_via_insertion);
expected = malloc(150 * sizeof(struct expected_entry_status));
if (expected == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "couldn't allocate expected entry status array\n";
}
@@ -31037,14 +31031,14 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
expected[i].entry_type = HUGE_ENTRY_TYPE;
expected[i].entry_index = (int)i;
expected[i].size = HUGE_ENTRY_SIZE;
- expected[i].in_cache = FALSE;
- expected[i].at_main_addr = TRUE;
- expected[i].is_dirty = FALSE;
- expected[i].is_protected = FALSE;
- expected[i].is_pinned = FALSE;
- expected[i].deserialized = FALSE;
- expected[i].serialized = FALSE;
- expected[i].destroyed = FALSE;
+ expected[i].in_cache = false;
+ expected[i].at_main_addr = true;
+ expected[i].is_dirty = false;
+ expected[i].is_protected = false;
+ expected[i].is_pinned = false;
+ expected[i].deserialized = false;
+ expected[i].serialized = false;
+ expected[i].destroyed = false;
memset(expected[i].flush_dep_par_type, 0, sizeof(expected[i].flush_dep_par_type));
memset(expected[i].flush_dep_par_idx, 0, sizeof(expected[i].flush_dep_par_idx));
@@ -31053,10 +31047,10 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
expected[i].flush_dep_nchd = 0;
expected[i].flush_dep_ndirty_chd = 0;
expected[i].flush_order = -1;
- expected[i].is_corked = FALSE;
+ expected[i].is_corked = false;
}
- pass = TRUE;
+ pass = true;
}
reset_entries();
@@ -31080,7 +31074,7 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
if (file_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad return from cache initialization.\n";
}
else
@@ -31131,10 +31125,10 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
/* Change expected values, and verify the status of the entries
* after each insertion
*/
- expected[entry_idx].in_cache = TRUE;
- expected[entry_idx].is_dirty = TRUE;
+ expected[entry_idx].in_cache = true;
+ expected[entry_idx].is_dirty = true;
expected[entry_idx].deserialized = (unsigned char)deserialized;
- expected[entry_idx].is_corked = TRUE;
+ expected[entry_idx].is_corked = true;
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
entry_idx, /* int tag */
@@ -31187,10 +31181,10 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
*/
/* entry w/ index 26 is now in the cache and dirty. */
- expected[26].in_cache = TRUE;
- expected[26].is_dirty = TRUE;
+ expected[26].in_cache = true;
+ expected[26].is_dirty = true;
expected[26].deserialized = (unsigned char)deserialized;
- expected[26].is_corked = TRUE;
+ expected[26].is_corked = true;
/* verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -31228,10 +31222,10 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
* all entries are dirty corked entries.
*
*/
- expected[27].in_cache = TRUE;
- expected[27].is_dirty = TRUE;
+ expected[27].in_cache = true;
+ expected[27].is_dirty = true;
expected[27].deserialized = (unsigned char)deserialized;
- expected[27].is_corked = TRUE;
+ expected[27].is_corked = true;
/* verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -31269,10 +31263,10 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
/*
* Expected status: all entries are dirty corked entries.
*/
- expected[entry_idx].in_cache = TRUE;
- expected[entry_idx].is_dirty = TRUE;
+ expected[entry_idx].in_cache = true;
+ expected[entry_idx].is_dirty = true;
expected[entry_idx].deserialized = (unsigned char)deserialized;
- expected[entry_idx].is_corked = TRUE;
+ expected[entry_idx].is_corked = true;
/* Verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -31282,9 +31276,9 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
}
/* Verify that the cache is now full */
- if (cache_ptr->cache_full != TRUE) {
+ if (cache_ptr->cache_full != true) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache not completely filled.\n";
}
}
@@ -31328,10 +31322,10 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
}
/* This past inserted entry is now in the cache: dirty and corked */
- expected[entry_idx].in_cache = TRUE;
- expected[entry_idx].is_dirty = TRUE;
+ expected[entry_idx].in_cache = true;
+ expected[entry_idx].is_dirty = true;
expected[entry_idx].deserialized = (unsigned char)deserialized;
- expected[entry_idx].is_corked = TRUE;
+ expected[entry_idx].is_corked = true;
/* Verify this expected status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -31365,9 +31359,9 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
*/
flush_cache(file_ptr, /* H5F_t * file_ptr */
- FALSE, /* hbool_t destory_entries */
- FALSE, /* hbool_t dump_stats */
- FALSE); /* hbool_t dump_detailed_stats */
+ false, /* bool destory_entries */
+ false, /* bool dump_stats */
+ false); /* bool dump_detailed_stats */
/* Verify that the cache is clean */
verify_clean();
@@ -31375,9 +31369,9 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
/* Verify the status of the entries. */
/* All entries are flushed, clean but still corked */
for (i = 0; i < 100; i++) {
- expected[i].serialized = TRUE;
- expected[i].is_dirty = FALSE;
- expected[i].is_corked = TRUE;
+ expected[i].serialized = true;
+ expected[i].is_dirty = false;
+ expected[i].is_corked = true;
}
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
0, /* int tag */
@@ -31392,9 +31386,9 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
/* Will evict 50 clean "corked" entries all at once when inserting the 100th entry */
for (i = 0; i < 51; i++) {
- expected[i].in_cache = FALSE;
- expected[i].destroyed = TRUE;
- expected[i].is_corked = TRUE;
+ expected[i].in_cache = false;
+ expected[i].destroyed = true;
+ expected[i].is_corked = true;
}
/* Insert the 100th entry */
@@ -31416,10 +31410,10 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
}
/* The 100th inserted entry is now in the cache and dirty */
- expected[100].in_cache = TRUE;
- expected[100].is_dirty = TRUE;
+ expected[100].in_cache = true;
+ expected[100].is_dirty = true;
expected[100].deserialized = (unsigned char)deserialized;
- expected[100].is_corked = TRUE;
+ expected[100].is_corked = true;
/* verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -31455,14 +31449,14 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
}
/* The inserted entry is now in the cache and dirty */
- expected[entry_idx].in_cache = TRUE;
- expected[entry_idx].is_dirty = TRUE;
+ expected[entry_idx].in_cache = true;
+ expected[entry_idx].is_dirty = true;
expected[entry_idx].deserialized = (unsigned char)deserialized;
- expected[entry_idx].is_corked = TRUE;
+ expected[entry_idx].is_corked = true;
- expected[entry_idx - 50].in_cache = FALSE;
- expected[entry_idx - 50].destroyed = TRUE;
- expected[entry_idx - 50].is_corked = TRUE;
+ expected[entry_idx - 50].in_cache = false;
+ expected[entry_idx - 50].destroyed = true;
+ expected[entry_idx - 50].is_corked = true;
/* verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -31496,14 +31490,14 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
}
/* Verify the status of the entries. */
- expected[126].in_cache = TRUE;
- expected[126].is_dirty = TRUE;
+ expected[126].in_cache = true;
+ expected[126].is_dirty = true;
expected[126].deserialized = (unsigned char)deserialized;
- expected[126].is_corked = TRUE;
+ expected[126].is_corked = true;
- expected[126 - 50].in_cache = FALSE;
- expected[126 - 50].destroyed = TRUE;
- expected[126 - 50].is_corked = TRUE;
+ expected[126 - 50].in_cache = false;
+ expected[126 - 50].destroyed = true;
+ expected[126 - 50].is_corked = true;
/* verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -31538,15 +31532,15 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
}
/* This past inserted entry is now in the cache, dirty and corked */
- expected[entry_idx].in_cache = TRUE;
- expected[entry_idx].is_dirty = TRUE;
+ expected[entry_idx].in_cache = true;
+ expected[entry_idx].is_dirty = true;
expected[entry_idx].deserialized = (unsigned char)deserialized;
- expected[entry_idx].is_corked = TRUE;
+ expected[entry_idx].is_corked = true;
/* Entry that is 50 entries away will be evicted since it is clean even though corked */
- expected[entry_idx - 50].in_cache = FALSE;
- expected[entry_idx - 50].destroyed = TRUE;
- expected[entry_idx - 50].is_corked = TRUE;
+ expected[entry_idx - 50].in_cache = false;
+ expected[entry_idx - 50].destroyed = true;
+ expected[entry_idx - 50].is_corked = true;
/* verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -31560,7 +31554,7 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
fprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass);
/* We're done with testing. We can take down the cache. */
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
reset_entries();
if (show_progress) /* 13 */
@@ -31596,7 +31590,7 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
* This function contains tests for correct handling on this
* situation.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -31612,7 +31606,7 @@ check_entry_deletions_during_scans(unsigned paged)
else
TESTING("entry deletion during list scan detection and adaption");
- pass = TRUE;
+ pass = true;
/* allocate a cache, and flush it under various circumstances.
* To the extent possible, verify that the desired actions took
@@ -31652,7 +31646,7 @@ check_entry_deletions_during_scans(unsigned paged)
cedds__H5C_flush_invalidate_cache__bucket_scan(file_ptr);
}
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
if (pass) {
PASSED();
@@ -31686,7 +31680,7 @@ check_entry_deletions_during_scans(unsigned paged)
*
* H5C_flush_cache() should handle this deletion gracefully.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -31703,7 +31697,7 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t *file_ptr)
expected = malloc(36 * sizeof(struct expected_entry_status));
if (expected == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "couldn't allocate expected entry status array\n";
}
@@ -31717,14 +31711,14 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t *file_ptr)
expected[i].entry_type = HUGE_ENTRY_TYPE;
expected[i].entry_index = (int)i;
expected[i].size = HUGE_ENTRY_SIZE;
- expected[i].in_cache = TRUE;
- expected[i].at_main_addr = TRUE;
- expected[i].is_dirty = TRUE;
- expected[i].is_protected = FALSE;
- expected[i].is_pinned = FALSE;
- expected[i].deserialized = TRUE;
- expected[i].serialized = FALSE;
- expected[i].destroyed = FALSE;
+ expected[i].in_cache = true;
+ expected[i].at_main_addr = true;
+ expected[i].is_dirty = true;
+ expected[i].is_protected = false;
+ expected[i].is_pinned = false;
+ expected[i].deserialized = true;
+ expected[i].serialized = false;
+ expected[i].destroyed = false;
for (size_t j = 0; j < MAX_FLUSH_DEP_PARS; j++) {
expected[i].flush_dep_par_type[j] = -1;
@@ -31735,28 +31729,28 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t *file_ptr)
expected[i].flush_dep_nchd = 0;
expected[i].flush_dep_ndirty_chd = 0;
expected[i].flush_order = -1;
- expected[i].is_corked = FALSE;
+ expected[i].is_corked = false;
}
- pass = TRUE;
+ pass = true;
}
if (pass) {
if (cache_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache_ptr NULL on entry to cedds expunge dirty entry in flush test.";
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache not empty on entry to cedds expunge dirty entry in flush test.";
}
else if ((cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected cache config at start of cedds expunge dirty entry in flush test.";
}
else {
@@ -31800,7 +31794,7 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t *file_ptr)
if ((cache_ptr->index_len != 4) || (cache_ptr->index_size != (4 * HUGE_ENTRY_SIZE))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected size/len in cedds expunge dirty entry in flush test (1)";
}
@@ -31813,7 +31807,7 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t *file_ptr)
* (HET, 0) expunges (HET, 1)
*
*/
- add_flush_op(HUGE_ENTRY_TYPE, 0, FLUSH_OP__EXPUNGE, HUGE_ENTRY_TYPE, 1, FALSE, (size_t)0, NULL);
+ add_flush_op(HUGE_ENTRY_TYPE, 0, FLUSH_OP__EXPUNGE, HUGE_ENTRY_TYPE, 1, false, (size_t)0, NULL);
}
if (pass) {
@@ -31850,7 +31844,7 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t *file_ptr)
if ((pass) && ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache len/size after cedds expunge dirty entry in flush test";
}
}
@@ -31875,14 +31869,14 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t *file_ptr)
(cache_ptr->entry_flush_size_changes[HUGE_ENTRY_TYPE] != 0) ||
(cache_ptr->cache_flush_size_changes[HUGE_ENTRY_TYPE] != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected huge size entry stats in cedds__expunge_dirty_entry_in_flush_test().";
} /* end if */
if (pass)
if ((cache_ptr->slist_scan_restarts != 1) || (cache_ptr->LRU_scan_restarts != 0) ||
(cache_ptr->index_scan_restarts != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected scan restart stats in cedds__expunge_dirty_entry_in_flush_test().";
} /* end if */
#endif /* H5C_COLLECT_CACHE_STATS */
@@ -31915,7 +31909,7 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t *file_ptr)
* restart its scan of the LRU from the tail, instead of
* examining the now deleted next item up on the LRU.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -31934,7 +31928,7 @@ cedds__H5C_make_space_in_cache(H5F_t *file_ptr)
expected = malloc(36 * sizeof(struct expected_entry_status));
if (expected == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "couldn't allocate expected entry status array\n";
}
@@ -31956,14 +31950,14 @@ cedds__H5C_make_space_in_cache(H5F_t *file_ptr)
expected[i].size = MONSTER_ENTRY_SIZE;
}
- expected[i].in_cache = TRUE;
- expected[i].at_main_addr = TRUE;
- expected[i].is_dirty = TRUE;
- expected[i].is_protected = FALSE;
- expected[i].is_pinned = FALSE;
- expected[i].deserialized = TRUE;
- expected[i].serialized = FALSE;
- expected[i].destroyed = FALSE;
+ expected[i].in_cache = true;
+ expected[i].at_main_addr = true;
+ expected[i].is_dirty = true;
+ expected[i].is_protected = false;
+ expected[i].is_pinned = false;
+ expected[i].deserialized = true;
+ expected[i].serialized = false;
+ expected[i].destroyed = false;
for (size_t j = 0; j < MAX_FLUSH_DEP_PARS; j++) {
expected[i].flush_dep_par_type[j] = -1;
@@ -31974,28 +31968,28 @@ cedds__H5C_make_space_in_cache(H5F_t *file_ptr)
expected[i].flush_dep_nchd = 0;
expected[i].flush_dep_ndirty_chd = 0;
expected[i].flush_order = -1;
- expected[i].is_corked = FALSE;
+ expected[i].is_corked = false;
}
- pass = TRUE;
+ pass = true;
}
if (pass) {
if (cache_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache_ptr NULL on entry to cedds for H5C__make_space_in_cache() test.";
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache not empty at start of flush ops eviction test.";
}
else if ((cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected cache config at start of cedds H5C__make_space_in_cache() test.";
}
else {
@@ -32043,7 +32037,7 @@ cedds__H5C_make_space_in_cache(H5F_t *file_ptr)
if ((cache_ptr->index_len != 4) || (cache_ptr->index_size != (4 * HUGE_ENTRY_SIZE))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected size/len in H5C__make_space_in_cache() test (1)";
}
@@ -32056,7 +32050,7 @@ cedds__H5C_make_space_in_cache(H5F_t *file_ptr)
* (HET, 0) expunges (HET, 1)
*
*/
- add_flush_op(HUGE_ENTRY_TYPE, 0, FLUSH_OP__EXPUNGE, HUGE_ENTRY_TYPE, 1, FALSE, (size_t)0, NULL);
+ add_flush_op(HUGE_ENTRY_TYPE, 0, FLUSH_OP__EXPUNGE, HUGE_ENTRY_TYPE, 1, false, (size_t)0, NULL);
}
if (pass) {
@@ -32092,7 +32086,7 @@ cedds__H5C_make_space_in_cache(H5F_t *file_ptr)
if ((cache_ptr->index_len != 35) || (cache_ptr->index_size != 2 * 1024 * 1024) ||
(cache_ptr->index_size != ((4 * HUGE_ENTRY_SIZE) + (31 * MONSTER_ENTRY_SIZE)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected size/len in H5C__make_space_in_cache() test (2)";
}
else {
@@ -32136,7 +32130,7 @@ cedds__H5C_make_space_in_cache(H5F_t *file_ptr)
if ((cache_ptr->index_len != 32) || (cache_ptr->index_size != 2 * 1024 * 1024) ||
(cache_ptr->index_size != (32 * MONSTER_ENTRY_SIZE))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected size/len in H5C__make_space_in_cache() test (3)";
}
else {
@@ -32145,19 +32139,19 @@ cedds__H5C_make_space_in_cache(H5F_t *file_ptr)
* then call verify_entry_status().
*/
for (i = 0; i < num_huge_entries; i++) {
- expected[i].in_cache = FALSE;
- expected[i].is_dirty = FALSE;
- expected[i].serialized = TRUE;
- expected[i].destroyed = TRUE;
+ expected[i].in_cache = false;
+ expected[i].is_dirty = false;
+ expected[i].serialized = true;
+ expected[i].destroyed = true;
}
/* (HET, 1) was expunged, so touch its entry up accordingly */
- expected[1].is_dirty = TRUE;
- expected[1].serialized = FALSE;
+ expected[1].is_dirty = true;
+ expected[1].serialized = false;
for (i = num_huge_entries; i < num_huge_entries + num_monster_entries - 1; i++) {
- expected[i].is_dirty = FALSE;
- expected[i].serialized = TRUE;
+ expected[i].is_dirty = false;
+ expected[i].serialized = true;
}
/* verify the expected status of all entries: */
@@ -32174,7 +32168,7 @@ cedds__H5C_make_space_in_cache(H5F_t *file_ptr)
if ((pass) && ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache len/size after cleanup of flush op eviction test";
}
}
@@ -32201,7 +32195,7 @@ cedds__H5C_make_space_in_cache(H5F_t *file_ptr)
(cache_ptr->entry_flush_size_changes[HUGE_ENTRY_TYPE] != 0) ||
(cache_ptr->cache_flush_size_changes[HUGE_ENTRY_TYPE] != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected large entry stats in cedds__H5C_make_space_in_cache().";
}
}
@@ -32224,7 +32218,7 @@ cedds__H5C_make_space_in_cache(H5F_t *file_ptr)
(cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0) ||
(cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected monster entry stats in cedds__H5C_make_space_in_cache().";
} /* end if */
@@ -32232,7 +32226,7 @@ cedds__H5C_make_space_in_cache(H5F_t *file_ptr)
if ((cache_ptr->slist_scan_restarts != 0) || (cache_ptr->LRU_scan_restarts != 1) ||
(cache_ptr->index_scan_restarts != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected scan restart stats in cedds__H5C_make_space_in_cache().";
} /* end if */
@@ -32266,7 +32260,7 @@ cedds__H5C_make_space_in_cache(H5F_t *file_ptr)
* restart its scan of the LRU from the tail, instead of
* examining the now deleted next item up on the LRU.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -32285,7 +32279,7 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
/* int32_t version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* H5C_auto_resize_report_fcn rpt_fcn = */ test_rpt_fcn,
- /* hbool_t set_initial_size = */ TRUE,
+ /* bool set_initial_size = */ true,
/* size_t initial_size = */ (2 * 1024 * 1024),
/* double min_clean_fraction = */ 0.5,
@@ -32301,7 +32295,7 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
/* double increment = */ 2.0,
- /* hbool_t apply_max_increment = */ TRUE,
+ /* bool apply_max_increment = */ true,
/* size_t max_increment = */ (4 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
@@ -32315,18 +32309,18 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
/* double decrement = */ 0.5,
- /* hbool_t apply_max_decrement = */ FALSE,
+ /* bool apply_max_decrement = */ false,
/* size_t max_decrement = */ (1 * 1024 * 1024),
/* int32_t epochs_before_eviction = */ 1,
- /* hbool_t apply_empty_reserve = */ TRUE,
+ /* bool apply_empty_reserve = */ true,
/* double empty_reserve = */ 0.05};
expected = malloc(36 * sizeof(struct expected_entry_status));
if (expected == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "couldn't allocate expected entry status array\n";
}
@@ -32340,17 +32334,17 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
expected[i].entry_type = MONSTER_ENTRY_TYPE;
expected[i].entry_index = (int)i;
expected[i].size = MONSTER_ENTRY_SIZE;
- expected[i].in_cache = TRUE;
- expected[i].at_main_addr = TRUE;
+ expected[i].in_cache = true;
+ expected[i].at_main_addr = true;
/* NOTE: special case for first entry */
expected[i].is_dirty = (i == 0);
- expected[i].is_protected = FALSE;
- expected[i].is_pinned = FALSE;
- expected[i].deserialized = TRUE;
- expected[i].serialized = FALSE;
- expected[i].destroyed = FALSE;
+ expected[i].is_protected = false;
+ expected[i].is_pinned = false;
+ expected[i].deserialized = true;
+ expected[i].serialized = false;
+ expected[i].destroyed = false;
for (size_t j = 0; j < MAX_FLUSH_DEP_PARS; j++) {
expected[i].flush_dep_par_type[j] = -1;
@@ -32361,30 +32355,30 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
expected[i].flush_dep_nchd = 0;
expected[i].flush_dep_ndirty_chd = 0;
expected[i].flush_order = -1;
- expected[i].is_corked = FALSE;
+ expected[i].is_corked = false;
}
- pass = TRUE;
+ pass = true;
}
if (pass) {
if (cache_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache_ptr NULL on entry to cedds for "
"H5C__autoadjust__ageout__evict_aged_out_entries() test.";
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg =
"cache not empty at start cedds for H5C__autoadjust__ageout__evict_aged_out_entries() test.";
}
else if ((cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected cache config at start of cedds "
"H5C__autoadjust__ageout__evict_aged_out_entries() test.";
}
@@ -32407,7 +32401,7 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed.";
}
}
@@ -32419,7 +32413,7 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 1.\n";
}
}
@@ -32467,7 +32461,7 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
* (MET, 0) expunges (MET, 1)
*
*/
- add_flush_op(MONSTER_ENTRY_TYPE, 0, FLUSH_OP__EXPUNGE, MONSTER_ENTRY_TYPE, 1, FALSE, (size_t)0, NULL);
+ add_flush_op(MONSTER_ENTRY_TYPE, 0, FLUSH_OP__EXPUNGE, MONSTER_ENTRY_TYPE, 1, false, (size_t)0, NULL);
}
if (pass) {
@@ -32491,7 +32485,7 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
if ((cache_ptr->index_len != 32) || (cache_ptr->index_size != 2 * 1024 * 1024) ||
(cache_ptr->index_size != (32 * MONSTER_ENTRY_SIZE))) {
- pass = FALSE;
+ pass = false;
failure_mssg =
"unexpected size/len in H5C__autoadjust__ageout__evict_aged_out_entries() test (1)";
}
@@ -32535,7 +32529,7 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
if ((cache_ptr->index_len != 2) || (cache_ptr->index_size != 2 * MONSTER_ENTRY_SIZE)) {
- pass = FALSE;
+ pass = false;
failure_mssg =
"unexpected size/len in H5C__autoadjust__ageout__evict_aged_out_entries() test (2)";
}
@@ -32545,13 +32539,13 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
* this point, and then verify.
*/
- expected[0].is_dirty = FALSE;
- expected[0].serialized = TRUE;
+ expected[0].is_dirty = false;
+ expected[0].serialized = true;
for (i = 1; i < 31; i++) {
- expected[i].in_cache = FALSE;
- expected[i].is_dirty = FALSE;
- expected[i].destroyed = TRUE;
+ expected[i].in_cache = false;
+ expected[i].is_dirty = false;
+ expected[i].destroyed = true;
}
verify_entry_status(cache_ptr, 0, 32, expected);
@@ -32561,14 +32555,14 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
/* restore the initial resize configuration */
if (pass) {
- saved_auto_size_ctl.set_initial_size = TRUE;
+ saved_auto_size_ctl.set_initial_size = true;
saved_auto_size_ctl.initial_size = 2 * 1024 * 1024;
result = H5C_set_cache_auto_resize_config(cache_ptr, &saved_auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 2.\n";
}
}
@@ -32582,7 +32576,7 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
if ((pass) && ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache len/size after cleanup of flush op eviction test";
}
}
@@ -32610,7 +32604,7 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
(cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0) ||
(cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg =
"Unexpected monster entry stats in cedds__H5C__autoadjust__ageout__evict_aged_out_entries().";
} /* end if */
@@ -32619,7 +32613,7 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
if ((cache_ptr->slist_scan_restarts != 0) || (cache_ptr->LRU_scan_restarts != 1) ||
(cache_ptr->index_scan_restarts != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg =
"unexpected scan restart stats in cedds__H5C__autoadjust__ageout__evict_aged_out_entries().";
} /* end if */
@@ -32715,7 +32709,7 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
* it will attempt to continue its scan of the bucket with
* an entry that has been deleted from the cache.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -32742,11 +32736,11 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t *file_ptr)
*/
/* entry entry in at main flush dep flush dep child flush flush flush */
/* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd: srlzd: dest: par type[]: par idx[]: dep npart: dep nchd: dep ndirty chd: order: corked: */
- { MONSTER_ENTRY_TYPE, 0, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, {-1,0,0,0,0,0,0,0}, {-1,0,0,0,0,0,0,0}, 0, 1, 1, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 8, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,0,0,0,0,0,0,0}, {-1,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 16, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,0,0,0,0,0,0,0}, {-1,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 24, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,0,0,0,0,0,0,0}, {-1,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 31, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {MONSTER_ENTRY_TYPE,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 1, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 0, MONSTER_ENTRY_SIZE, true, true, true, false, true, true, false, false, {-1,0,0,0,0,0,0,0}, {-1,0,0,0,0,0,0,0}, 0, 1, 1, -1, false},
+ { MONSTER_ENTRY_TYPE, 8, MONSTER_ENTRY_SIZE, true, true, false, false, false, true, false, false, {-1,0,0,0,0,0,0,0}, {-1,0,0,0,0,0,0,0}, 0, 0, 0, -1, false},
+ { MONSTER_ENTRY_TYPE, 16, MONSTER_ENTRY_SIZE, true, true, false, false, false, true, false, false, {-1,0,0,0,0,0,0,0}, {-1,0,0,0,0,0,0,0}, 0, 0, 0, -1, false},
+ { MONSTER_ENTRY_TYPE, 24, MONSTER_ENTRY_SIZE, true, true, false, false, false, true, false, false, {-1,0,0,0,0,0,0,0}, {-1,0,0,0,0,0,0,0}, 0, 0, 0, -1, false},
+ { MONSTER_ENTRY_TYPE, 31, MONSTER_ENTRY_SIZE, true, true, true, false, false, true, false, false, {MONSTER_ENTRY_TYPE,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 1, 0, 0, -1, false},
};
/* clang-format on */
@@ -32754,20 +32748,20 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t *file_ptr)
if (cache_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg =
"cache_ptr NULL on entry to cedds for cedds__H5C_flush_invalidate_cache__bucket_scan() test.";
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg =
"cache not empty at start cedds for cedds__H5C_flush_invalidate_cache__bucket_scan() test.";
}
else if ((cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected cache config at start of cedds "
"cedds__H5C_flush_invalidate_cache__bucket_scan() test.";
}
@@ -32820,7 +32814,7 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t *file_ptr)
if (expected_hash_bucket != H5C__HASH_FCN(entry_addr)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Test entries don't map to same bucket -- hash table size or hash fcn change?";
}
}
@@ -32833,7 +32827,7 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t *file_ptr)
* (MET, 0) expunges (MET, 8)
*
*/
- add_flush_op(MONSTER_ENTRY_TYPE, 0, FLUSH_OP__EXPUNGE, MONSTER_ENTRY_TYPE, 8, FALSE, (size_t)0, NULL);
+ add_flush_op(MONSTER_ENTRY_TYPE, 0, FLUSH_OP__EXPUNGE, MONSTER_ENTRY_TYPE, 8, false, (size_t)0, NULL);
}
if (pass) {
@@ -32858,7 +32852,7 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t *file_ptr)
if (expected_hash_bucket == H5C__HASH_FCN(entry_addr)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Dirty entry maps to same hash bucket as clean entries?!?!";
}
}
@@ -32882,7 +32876,7 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t *file_ptr)
* (MET, 31) destroys flush dependency with (MET, 8)
*
*/
- add_flush_op(MONSTER_ENTRY_TYPE, 31, FLUSH_OP__DEST_FLUSH_DEP, MONSTER_ENTRY_TYPE, 0, FALSE,
+ add_flush_op(MONSTER_ENTRY_TYPE, 31, FLUSH_OP__DEST_FLUSH_DEP, MONSTER_ENTRY_TYPE, 0, false,
(size_t)0, NULL);
}
@@ -32920,12 +32914,12 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t *file_ptr)
if (scan_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "premature end of hash bucket list?!?!";
}
else if ((scan_ptr == NULL) || (scan_ptr != &(entry_ptr->header))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad test hash bucket setup?!?!";
}
@@ -32946,7 +32940,7 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t *file_ptr)
if ((pass) && ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache len/size after cleanup of flush op eviction test";
}
}
@@ -32974,7 +32968,7 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t *file_ptr)
(cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0) ||
(cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg =
"Unexpected monster entry stats in cedds__H5C_flush_invalidate_cache__bucket_scan().";
} /* end if */
@@ -32986,7 +32980,7 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t *file_ptr)
*/
if ((cache_ptr->slist_scan_restarts != 0) || (cache_ptr->LRU_scan_restarts != 0) ||
(cache_ptr->index_scan_restarts != 1)) {
- pass = FALSE;
+ pass = false;
failure_mssg =
"unexpected scan restart stats in cedds__H5C_flush_invalidate_cache__bucket_scan().";
}
@@ -33035,7 +33029,7 @@ check_stats(unsigned paged)
#if H5C_COLLECT_CACHE_STATS
- pass = TRUE;
+ pass = true;
reset_entries();
@@ -33048,7 +33042,7 @@ check_stats(unsigned paged)
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -33088,7 +33082,7 @@ check_stats(unsigned paged)
* check that will serve as a place holder until more complete
* tests are implemented.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -33104,18 +33098,18 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
if (pass) {
if (cache_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache_ptr NULL on entry to check_stats__smoke_check_1().";
} /* end if */
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache not empty on entry to check_stats__smoke_check_1().";
} /* end else-if */
else if ((cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected cache config at start of check_stats__smoke_check_1().";
} /* end else-if */
@@ -33155,7 +33149,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
(cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0) ||
(cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected monster size entry stats in check_stats__smoke_check_1(1).";
} /* end if */
@@ -33176,7 +33170,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
(cache_ptr->entries_scanned_to_make_space != 0) || (cache_ptr->slist_scan_restarts != 0) ||
(cache_ptr->LRU_scan_restarts != 0) || (cache_ptr->index_scan_restarts != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache stats in check_stats__smoke_check_1(1).";
} /* end if */
}
@@ -33191,7 +33185,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
(cache_ptr->max_size[MONSTER_ENTRY_TYPE] != 64 * 1024) ||
(cache_ptr->max_pins[MONSTER_ENTRY_TYPE] != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected monster entry level stats in check_stats__smoke_check_1(1).";
} /* end if */
#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */
@@ -33228,7 +33222,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
(cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0) ||
(cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected monster size entry stats in check_stats__smoke_check_1(2).";
} /* end if */
@@ -33250,7 +33244,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
(cache_ptr->entries_scanned_to_make_space != 0) || (cache_ptr->slist_scan_restarts != 0) ||
(cache_ptr->LRU_scan_restarts != 0) || (cache_ptr->index_scan_restarts != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache stats in check_stats__smoke_check_1(2).";
} /* end if */
}
@@ -33265,7 +33259,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
(cache_ptr->max_size[MONSTER_ENTRY_TYPE] != 64 * 1024) ||
(cache_ptr->max_pins[MONSTER_ENTRY_TYPE] != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected monster entry level stats in check_stats__smoke_check_1(2).";
} /* end if */
#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */
@@ -33302,7 +33296,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
(cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0) ||
(cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected monster size entry stats in check_stats__smoke_check_1(3).";
} /* end if */
@@ -33325,7 +33319,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
(cache_ptr->entries_scanned_to_make_space != 33) || (cache_ptr->slist_scan_restarts != 0) ||
(cache_ptr->LRU_scan_restarts != 0) || (cache_ptr->index_scan_restarts != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache stats in check_stats__smoke_check_1(3).";
} /* end if */
}
@@ -33340,7 +33334,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
(cache_ptr->max_size[MONSTER_ENTRY_TYPE] != 64 * 1024) ||
(cache_ptr->max_pins[MONSTER_ENTRY_TYPE] != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected monster entry level stats in check_stats__smoke_check_1(3).";
} /* end if */
@@ -33363,7 +33357,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
if ((pass) && ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache len/size after check_stats__smoke_check_1()";
} /* end else-if */
@@ -33391,7 +33385,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
(cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0) ||
(cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected monster size entry stats in check_stats__smoke_check_1(4).";
} /* end if */
@@ -33414,7 +33408,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
(cache_ptr->entries_scanned_to_make_space != 33) || (cache_ptr->slist_scan_restarts != 0) ||
(cache_ptr->LRU_scan_restarts != 0) || (cache_ptr->index_scan_restarts != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache stats in check_stats__smoke_check_1(4).";
} /* end if */
}
@@ -33429,7 +33423,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
(cache_ptr->max_size[MONSTER_ENTRY_TYPE] != 64 * 1024) ||
(cache_ptr->max_pins[MONSTER_ENTRY_TYPE] != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected monster entry level stats in check_stats__smoke_check_1(4).";
} /* end if */
@@ -33466,7 +33460,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
*-------------------------------------------------------------------------
*/
static herr_t
-check_write_permitted(const H5F_t H5_ATTR_UNUSED *f, hbool_t *write_permitted_ptr)
+check_write_permitted(const H5F_t H5_ATTR_UNUSED *f, bool *write_permitted_ptr)
{
assert(write_permitted_ptr);
@@ -33509,10 +33503,10 @@ H5F_t *
setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
{
char filename[512];
- hbool_t show_progress = FALSE;
- hbool_t verbose = TRUE;
+ bool show_progress = false;
+ bool verbose = true;
int mile_stone = 1;
- hid_t fid = -1;
+ hid_t fid = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
H5F_t *ret_val = NULL;
@@ -33527,7 +33521,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
if (pass) {
if ((fcpl_id = H5Pcreate(H5P_FILE_CREATE)) == FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pcreate(H5P_FILE_CREATE) failed.\n";
}
}
@@ -33535,7 +33529,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
if (pass && paged) {
/* Set up paged aggregation strategy */
if (H5Pset_file_space_strategy(fcpl_id, H5F_FSPACE_STRATEGY_PAGE, 1, (hsize_t)1) == FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_file_space_strategy() failed.\n";
H5Pclose(fcpl_id);
fcpl_id = H5P_DEFAULT;
@@ -33545,7 +33539,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
if (pass && paged) {
/* Set up file space page size to BASE_ADDR */
if (H5Pset_file_space_page_size(fcpl_id, (hsize_t)BASE_ADDR) == FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_file_space_page_size() failed.\n";
H5Pclose(fcpl_id);
fcpl_id = H5P_DEFAULT;
@@ -33558,7 +33552,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
/* setup the file name */
if (pass) {
if (NULL == h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -33568,17 +33562,17 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
if (pass && try_core_file_driver) {
if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) == FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pcreate(H5P_FILE_ACCESS) failed.\n";
}
- else if (H5Pset_fapl_core(fapl_id, MAX_ADDR, FALSE) < 0) {
+ else if (H5Pset_fapl_core(fapl_id, MAX_ADDR, false) < 0) {
H5Pclose(fapl_id);
fapl_id = H5P_DEFAULT;
- pass = FALSE;
+ pass = false;
failure_mssg = "H5P_set_fapl_core() failed.\n";
}
else if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl_id, fapl_id)) < 0) {
- core_file_driver_failed = TRUE;
+ core_file_driver_failed = true;
if (verbose)
fprintf(stdout, "%s: H5Fcreate() with CFD failed.\n", __func__);
@@ -33600,7 +33594,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
saved_fid = fid;
if (fid < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fcreate() failed.";
if (verbose)
@@ -33618,7 +33612,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
assert(fid >= 0);
saved_fid = fid;
if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fflush() failed.";
if (verbose)
@@ -33627,7 +33621,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
else {
file_ptr = (H5F_t *)H5VL_object_verify(fid, H5I_FILE);
if (file_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Can't get file_ptr.";
if (verbose)
@@ -33674,7 +33668,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
file_ptr->shared->cache = NULL;
cache_ptr = H5C_create(max_cache_size, min_clean_size, (NUMBER_OF_ENTRY_TYPES - 1), types,
- check_write_permitted, TRUE, NULL, NULL);
+ check_write_permitted, true, NULL, NULL);
file_ptr->shared->cache = cache_ptr;
}
@@ -33684,7 +33678,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
if (pass) {
if (cache_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_create() failed.";
if (verbose)
@@ -33699,7 +33693,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
actual_base_addr = H5MF_alloc(file_ptr, H5FD_MEM_DEFAULT, (hsize_t)(ADDR_SPACE_SIZE + BASE_ADDR));
if (actual_base_addr == HADDR_UNDEF) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5MF_alloc() failed.";
if (verbose)
@@ -33710,7 +33704,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
* actual_base_addr is <= BASE_ADDR. This should only happen
* if the size of the superblock is increase.
*/
- pass = FALSE;
+ pass = false;
failure_mssg = "actual_base_addr > BASE_ADDR";
if (verbose)
@@ -33725,7 +33719,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
if (pass) {
/* Need to set this else all cache tests will fail */
- cache_ptr->ignore_tags = TRUE;
+ cache_ptr->ignore_tags = true;
H5C_stats__reset(cache_ptr);
ret_val = file_ptr;
@@ -33744,7 +33738,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
* dump stats first. Then close and delete the associate
* file.
*
- * If pass is FALSE, do nothing.
+ * If pass is false, do nothing.
*
* Return: void
*
@@ -33752,7 +33746,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
*/
void
-takedown_cache(H5F_t *file_ptr, hbool_t dump_stats, hbool_t dump_detailed_stats)
+takedown_cache(H5F_t *file_ptr, bool dump_stats, bool dump_detailed_stats)
{
char filename[512];
@@ -33766,11 +33760,11 @@ takedown_cache(H5F_t *file_ptr, hbool_t dump_stats, hbool_t dump_detailed_stats)
if (H5C_prep_for_file_close(file_ptr) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected failure of prep for file close.\n";
}
- flush_cache(file_ptr, TRUE, FALSE, FALSE);
+ flush_cache(file_ptr, true, false, false);
H5C_dest(file_ptr);
@@ -33808,7 +33802,7 @@ takedown_cache(H5F_t *file_ptr, hbool_t dump_stats, hbool_t dump_detailed_stats)
if (H5Fclose(saved_fid) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "couldn't close test file.";
}
else {
@@ -33817,19 +33811,19 @@ takedown_cache(H5F_t *file_ptr, hbool_t dump_stats, hbool_t dump_detailed_stats)
}
/* Pop API context */
- H5CX_pop(FALSE);
+ H5CX_pop(false);
if ((!try_core_file_driver) || (core_file_driver_failed)) {
if (h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "couldn't delete test file.";
}
}
@@ -33862,7 +33856,7 @@ main(void)
printf("=========================================\n");
if (!h5_using_default_driver(NULL)) {
- HDputs(" -- SKIPPED for incompatible VFD --");
+ puts(" -- SKIPPED for incompatible VFD --");
exit(EXIT_SUCCESS);
}
@@ -33874,7 +33868,7 @@ main(void)
/* Test with paged aggregation enabled or not */
/* Each test will call setup_cache() which set up the file space strategy according to "paged" */
- for (paged = FALSE; paged <= TRUE; paged++) {
+ for (paged = false; paged <= true; paged++) {
if (paged) {
@@ -33923,20 +33917,20 @@ main(void)
nerrs += check_protect_ro_rw_err(paged);
nerrs += check_protect_retries(paged);
nerrs += check_check_evictions_enabled_err(paged);
- nerrs += check_auto_cache_resize(FALSE, paged);
- nerrs += check_auto_cache_resize(TRUE, paged);
+ nerrs += check_auto_cache_resize(false, paged);
+ nerrs += check_auto_cache_resize(true, paged);
nerrs += check_auto_cache_resize_disable(paged);
nerrs += check_auto_cache_resize_epoch_markers(paged);
nerrs += check_auto_cache_resize_input_errs(paged);
nerrs += check_auto_cache_resize_aux_fcns(paged);
- nerrs += check_metadata_blizzard_absence(TRUE, paged);
- nerrs += check_metadata_blizzard_absence(FALSE, paged);
+ nerrs += check_metadata_blizzard_absence(true, paged);
+ nerrs += check_metadata_blizzard_absence(false, paged);
nerrs += check_flush_deps(paged);
nerrs += check_flush_deps_err(paged);
nerrs += check_flush_deps_order(paged);
nerrs += check_notify_cb(paged);
- nerrs += check_metadata_cork(TRUE, paged);
- nerrs += check_metadata_cork(FALSE, paged);
+ nerrs += check_metadata_cork(true, paged);
+ nerrs += check_metadata_cork(false, paged);
nerrs += check_entry_deletions_during_scans(paged);
nerrs += check_stats(paged);
} /* end for */
diff --git a/test/cache_api.c b/test/cache_api.c
index 0f5a5ddcfdc..de636cf4bb2 100644
--- a/test/cache_api.c
+++ b/test/cache_api.c
@@ -27,12 +27,12 @@ static const char *FILENAME[] = {"cache_api_test", NULL};
/* private function declarations: */
-static hbool_t check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id);
-static hbool_t check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id);
-static hbool_t mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id);
+static bool check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id);
+static bool check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id);
+static bool mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id);
static H5AC_cache_config_t *init_invalid_configs(void);
-static hbool_t check_fapl_mdc_api_errs(void);
-static hbool_t check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id);
+static bool check_fapl_mdc_api_errs(void);
+static bool check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id);
/**************************************************************************/
/**************************************************************************/
@@ -51,29 +51,29 @@ static hbool_t check_file_mdc_api_errs(unsigned paged, hid_t fcpl_i
* be sufficient to verify that the desired configuration
* data is getting to the cache.
*
- * Return: Test pass status (TRUE/FALSE)
+ * Return: Test pass status (true/false)
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
{
char filename[512];
herr_t result;
- hid_t fapl_id = -1;
- hid_t test_fapl_id = -1;
- hid_t file_id = -1;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t test_fapl_id = H5I_INVALID_HID;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
H5AC_cache_config_t default_config = H5AC__DEFAULT_CACHE_CONFIG;
H5AC_cache_config_t mod_config = {
/* int version = */ H5AC__CURR_CACHE_CONFIG_VERSION,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
+ /* bool rpt_fcn_enabled = */ false,
+ /* bool open_trace_file = */ false,
+ /* bool close_trace_file = */ false,
/* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
+ /* bool evictions_enabled = */ true,
+ /* bool set_initial_size = */ true,
/* size_t initial_size = */ (1 * 1024 * 1024 + 1),
/* double min_clean_fraction = */ 0.2,
/* size_t max_size = */ (16 * 1024 * 1024 + 1),
@@ -82,7 +82,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
/* double lower_hr_threshold = */ 0.91,
/* double increment = */ 2.1,
- /* hbool_t apply_max_increment = */ TRUE,
+ /* bool apply_max_increment = */ true,
/* size_t max_increment = */ (4 * 1024 * 1024 + 1),
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
@@ -91,10 +91,10 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out,
/* double upper_hr_threshold = */ 0.998,
/* double decrement = */ 0.91,
- /* hbool_t apply_max_decrement = */ TRUE,
+ /* bool apply_max_decrement = */ true,
/* size_t max_decrement = */ (1 * 1024 * 1024 - 1),
/* int epochs_before_eviction = */ 4,
- /* hbool_t apply_empty_reserve = */ TRUE,
+ /* bool apply_empty_reserve = */ true,
/* double empty_reserve = */ 0.05,
/* int dirty_bytes_threshold = */ (256 * 1024),
/* int metadata_write_strategy = */
@@ -108,7 +108,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
else
TESTING("MDC/FAPL related API calls");
- pass = TRUE;
+ pass = true;
XLATE_EXT_TO_INT_MDC_CONFIG(default_auto_size_ctl, default_config)
XLATE_EXT_TO_INT_MDC_CONFIG(mod_auto_size_ctl, mod_config)
@@ -123,7 +123,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (fapl_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pcreate(H5P_FILE_ACCESS) failed.\n";
}
}
@@ -136,12 +136,12 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pget_mdc_config() failed.\n";
}
- else if (!CACHE_CONFIGS_EQUAL(default_config, scratch, TRUE, TRUE)) {
+ else if (!CACHE_CONFIGS_EQUAL(default_config, scratch, true, true)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "retrieved config doesn't match default.";
}
}
@@ -156,7 +156,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_mdc_config() failed.\n";
}
}
@@ -169,12 +169,12 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pget_mdc_config() failed.\n";
}
- else if (!CACHE_CONFIGS_EQUAL(mod_config, scratch, TRUE, TRUE)) {
+ else if (!CACHE_CONFIGS_EQUAL(mod_config, scratch, true, true)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "retrieved config doesn't match mod config.";
}
}
@@ -183,7 +183,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (H5Pclose(fapl_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pclose() failed.\n";
}
}
@@ -200,7 +200,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -212,7 +212,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (file_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fcreate() failed.\n";
}
}
@@ -224,7 +224,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (file_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Can't get file_ptr.\n";
}
else {
@@ -238,7 +238,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (cache_ptr == NULL || cache_ptr->resize_ctl.version != H5C__CURR_AUTO_SIZE_CTL_VER) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Can't access cache resize_ctl.\n";
}
}
@@ -246,9 +246,9 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* compare the cache's internal configuration with the expected value */
if (pass) {
- if (!resize_configs_are_equal(&default_auto_size_ctl, &cache_ptr->resize_ctl, TRUE)) {
+ if (!resize_configs_are_equal(&default_auto_size_ctl, &cache_ptr->resize_ctl, true)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected value(s) in cache resize_ctl 1.\n";
}
}
@@ -260,7 +260,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (fapl_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fget_access_plist() failed.\n";
}
}
@@ -276,17 +276,17 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pget_mdc_config() failed.\n";
}
- else if (!CACHE_CONFIGS_EQUAL(default_config, scratch, TRUE, TRUE)) {
+ else if (!CACHE_CONFIGS_EQUAL(default_config, scratch, true, true)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "config retrieved from file doesn't match default.";
}
else if (H5Pclose(fapl_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pclose() failed.\n";
}
}
@@ -296,12 +296,12 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
else if (H5Fdelete(filename, H5P_DEFAULT) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fdelete() failed.\n";
}
}
@@ -320,7 +320,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (fapl_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pcreate(H5P_FILE_ACCESS) failed.\n";
}
}
@@ -333,7 +333,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_mdc_config() failed.\n";
}
}
@@ -343,7 +343,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -355,7 +355,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (file_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fcreate() failed.\n";
}
}
@@ -367,7 +367,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (file_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Can't get file_ptr.\n";
}
else {
@@ -381,7 +381,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (cache_ptr == NULL || cache_ptr->resize_ctl.version != H5C__CURR_AUTO_SIZE_CTL_VER) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Can't access cache resize_ctl.\n";
}
}
@@ -389,9 +389,9 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* compare the cache's internal configuration with the expected value */
if (pass) {
- if (!resize_configs_are_equal(&mod_auto_size_ctl, &cache_ptr->resize_ctl, TRUE)) {
+ if (!resize_configs_are_equal(&mod_auto_size_ctl, &cache_ptr->resize_ctl, true)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected value(s) in cache resize_ctl 2.\n";
}
}
@@ -403,7 +403,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (test_fapl_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fget_access_plist() failed.\n";
}
}
@@ -419,17 +419,17 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pget_mdc_config() failed.\n";
}
- else if (!CACHE_CONFIGS_EQUAL(mod_config, scratch, TRUE, TRUE)) {
+ else if (!CACHE_CONFIGS_EQUAL(mod_config, scratch, true, true)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "config retrieved from file doesn't match.";
}
else if (H5Pclose(test_fapl_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pclose() failed.\n";
}
}
@@ -439,12 +439,12 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
else if (H5Fdelete(filename, fapl_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fdelete() failed.\n";
}
}
@@ -454,7 +454,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (H5Pclose(fapl_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pclose() failed.\n";
}
}
@@ -491,15 +491,15 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
* We shouldn't need to verify data correctness beyond that
* point.
*
- * Return: Test pass status (TRUE/FALSE)
+ * Return: Test pass status (true/false)
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
{
char filename[512];
- hid_t file_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
size_t max_size;
size_t min_clean_size;
size_t cur_size;
@@ -508,12 +508,12 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
H5AC_cache_config_t default_config = H5AC__DEFAULT_CACHE_CONFIG;
H5AC_cache_config_t mod_config_1 = {
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
+ /* bool rpt_fcn_enabled = */ false,
+ /* bool open_trace_file = */ false,
+ /* bool close_trace_file = */ false,
/* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
+ /* bool evictions_enabled = */ true,
+ /* bool set_initial_size = */ true,
/* size_t initial_size = */ (1 * 1024 * 1024 + 1),
/* double min_clean_fraction = */ 0.2,
/* size_t max_size = */ (16 * 1024 * 1024 + 1),
@@ -522,7 +522,7 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
/* double lower_hr_threshold = */ 0.91,
/* double increment = */ 2.1,
- /* hbool_t apply_max_increment = */ TRUE,
+ /* bool apply_max_increment = */ true,
/* size_t max_increment = */ (4 * 1024 * 1024 + 1),
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
@@ -531,22 +531,22 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out,
/* double upper_hr_threshold = */ 0.998,
/* double decrement = */ 0.91,
- /* hbool_t apply_max_decrement = */ TRUE,
+ /* bool apply_max_decrement = */ true,
/* size_t max_decrement = */ (1 * 1024 * 1024 - 1),
/* int epochs_before_eviction = */ 4,
- /* hbool_t apply_empty_reserve = */ TRUE,
+ /* bool apply_empty_reserve = */ true,
/* double empty_reserve = */ 0.05,
/* int dirty_bytes_threshold = */ (256 * 1024),
/* int metadata_write_strategy = */
H5AC__DEFAULT_METADATA_WRITE_STRATEGY};
H5AC_cache_config_t mod_config_2 = {
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ TRUE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
+ /* bool rpt_fcn_enabled = */ true,
+ /* bool open_trace_file = */ false,
+ /* bool close_trace_file = */ false,
/* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
+ /* bool evictions_enabled = */ true,
+ /* bool set_initial_size = */ true,
/* size_t initial_size = */ (512 * 1024),
/* double min_clean_fraction = */ 0.1,
/* size_t max_size = */ (8 * 1024 * 1024),
@@ -555,7 +555,7 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
/* double lower_hr_threshold = */ 0.9,
/* double increment = */ 2.0,
- /* hbool_t apply_max_increment = */ TRUE,
+ /* bool apply_max_increment = */ true,
/* size_t max_increment = */ (2 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
@@ -564,22 +564,22 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__threshold,
/* double upper_hr_threshold = */ 0.9995,
/* double decrement = */ 0.95,
- /* hbool_t apply_max_decrement = */ TRUE,
+ /* bool apply_max_decrement = */ true,
/* size_t max_decrement = */ (512 * 1024),
/* int epochs_before_eviction = */ 4,
- /* hbool_t apply_empty_reserve = */ TRUE,
+ /* bool apply_empty_reserve = */ true,
/* double empty_reserve = */ 0.05,
/* int dirty_bytes_threshold = */ (256 * 1024),
/* int metadata_write_strategy = */
H5AC__DEFAULT_METADATA_WRITE_STRATEGY};
H5AC_cache_config_t mod_config_3 = {
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
+ /* bool rpt_fcn_enabled = */ false,
+ /* bool open_trace_file = */ false,
+ /* bool close_trace_file = */ false,
/* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
+ /* bool evictions_enabled = */ true,
+ /* bool set_initial_size = */ true,
/* size_t initial_size = */ (1 * 1024 * 1024),
/* double min_clean_fraction = */ 0.2,
/* size_t max_size = */ (16 * 1024 * 1024),
@@ -588,7 +588,7 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__off,
/* double lower_hr_threshold = */ 0.90,
/* double increment = */ 2.0,
- /* hbool_t apply_max_increment = */ TRUE,
+ /* bool apply_max_increment = */ true,
/* size_t max_increment = */ (4 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
@@ -597,22 +597,22 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__off,
/* double upper_hr_threshold = */ 0.999,
/* double decrement = */ 0.9,
- /* hbool_t apply_max_decrement = */ FALSE,
+ /* bool apply_max_decrement = */ false,
/* size_t max_decrement = */ (1 * 1024 * 1024 - 1),
/* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ FALSE,
+ /* bool apply_empty_reserve = */ false,
/* double empty_reserve = */ 0.05,
/* int dirty_bytes_threshold = */ (256 * 1024),
/* int metadata_write_strategy = */
H5AC__DEFAULT_METADATA_WRITE_STRATEGY};
H5AC_cache_config_t mod_config_4 = {
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
+ /* bool rpt_fcn_enabled = */ false,
+ /* bool open_trace_file = */ false,
+ /* bool close_trace_file = */ false,
/* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
+ /* bool evictions_enabled = */ true,
+ /* bool set_initial_size = */ true,
/* size_t initial_size = */ (1 * 1024 * 1024),
/* double min_clean_fraction = */ 0.15,
/* size_t max_size = */ (20 * 1024 * 1024),
@@ -621,7 +621,7 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
/* double lower_hr_threshold = */ 0.9,
/* double increment = */ 2.0,
- /* hbool_t apply_max_increment = */ TRUE,
+ /* bool apply_max_increment = */ true,
/* size_t max_increment = */ (2 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
@@ -631,10 +631,10 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
H5C_decr__age_out_with_threshold,
/* double upper_hr_threshold = */ 0.999,
/* double decrement = */ 0.9,
- /* hbool_t apply_max_decrement = */ TRUE,
+ /* bool apply_max_decrement = */ true,
/* size_t max_decrement = */ (1 * 1024 * 1024),
/* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
+ /* bool apply_empty_reserve = */ true,
/* double empty_reserve = */ 0.1,
/* int dirty_bytes_threshold = */ (256 * 1024),
/* int metadata_write_strategy = */
@@ -645,7 +645,7 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
else
TESTING("MDC/FILE related API calls");
- pass = TRUE;
+ pass = true;
/* Open a file with the default FAPL. Verify that the cache is
* configured as per the default both by looking at its internal
@@ -660,7 +660,7 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -672,65 +672,65 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (file_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fcreate() failed.\n";
}
}
/* verify that the cache is set to the default config */
- validate_mdc_config(file_id, &default_config, TRUE, 1);
+ validate_mdc_config(file_id, &default_config, true, 1);
/* set alternate config 1 */
if (pass) {
if (H5Fset_mdc_config(file_id, &mod_config_1) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fset_mdc_config() failed 1.\n";
}
}
/* verify that the cache is now set to the alternate config */
- validate_mdc_config(file_id, &mod_config_1, TRUE, 2);
+ validate_mdc_config(file_id, &mod_config_1, true, 2);
/* set alternate config 2 */
if (pass) {
if (H5Fset_mdc_config(file_id, &mod_config_2) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fset_mdc_config() failed 2.\n";
}
}
/* verify that the cache is now set to the alternate config */
- validate_mdc_config(file_id, &mod_config_2, TRUE, 3);
+ validate_mdc_config(file_id, &mod_config_2, true, 3);
/* set alternate config 3 */
if (pass) {
if (H5Fset_mdc_config(file_id, &mod_config_3) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fset_mdc_config() failed 3.\n";
}
}
/* verify that the cache is now set to the alternate config */
- validate_mdc_config(file_id, &mod_config_3, TRUE, 4);
+ validate_mdc_config(file_id, &mod_config_3, true, 4);
/* set alternate config 4 */
if (pass) {
if (H5Fset_mdc_config(file_id, &mod_config_4) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fset_mdc_config() failed 4.\n";
}
}
/* verify that the cache is now set to the alternate config */
- validate_mdc_config(file_id, &mod_config_4, TRUE, 5);
+ validate_mdc_config(file_id, &mod_config_4, true, 5);
/* Run some quick smoke checks on the cache status monitoring
* calls -- no interesting data as the cache hasn't had a
@@ -741,12 +741,12 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (H5Fget_mdc_hit_rate(file_id, &hit_rate) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fget_mdc_hit_rate() failed 1.\n";
}
else if (!H5_DBL_ABS_EQUAL(hit_rate, 0.0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fget_mdc_hit_rate() returned unexpected hit rate.\n";
}
}
@@ -755,13 +755,13 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (H5Fget_mdc_size(file_id, &max_size, &min_clean_size, &cur_size, &cur_num_entries) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fget_mdc_size() failed 1.\n";
}
else if ((mod_config_4.initial_size != max_size) ||
(min_clean_size != (size_t)((double)max_size * mod_config_4.min_clean_fraction))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fget_mdc_size() returned unexpected value(s).\n";
}
}
@@ -771,12 +771,12 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
else if (H5Fdelete(filename, H5P_DEFAULT) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fdelete() failed.\n";
}
}
@@ -808,7 +808,7 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
* NOTE: This test takes some time to run and checks the
* testing express level value.
*
- * Return: Test pass status (TRUE/FALSE)
+ * Return: Test pass status (true/false)
*
*-------------------------------------------------------------------------
*/
@@ -818,21 +818,21 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
#define NUM_DSETS 6
#define NUM_RANDOM_ACCESSES 200000
-static hbool_t
+static bool
mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
{
char filename[512];
- hbool_t valid_chunk;
- hbool_t dump_hit_rate = FALSE;
+ bool valid_chunk;
+ bool dump_hit_rate = false;
int64_t min_accesses = 1000;
double min_hit_rate = 0.90;
- hbool_t dump_cache_size = FALSE;
- hid_t file_id = -1;
- hid_t dataspace_id = -1;
+ bool dump_cache_size = false;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t dataspace_id = H5I_INVALID_HID;
hid_t filespace_ids[NUM_DSETS];
- hid_t memspace_id = -1;
+ hid_t memspace_id = H5I_INVALID_HID;
hid_t dataset_ids[NUM_DSETS];
- hid_t properties = -1;
+ hid_t properties = H5I_INVALID_HID;
char dset_name[64];
int i, j, k, l, m, n;
herr_t status;
@@ -844,12 +844,12 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
H5AC_cache_config_t default_config = H5AC__DEFAULT_CACHE_CONFIG;
H5AC_cache_config_t mod_config_1 = {
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
+ /* bool rpt_fcn_enabled = */ false,
+ /* bool open_trace_file = */ false,
+ /* bool close_trace_file = */ false,
/* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
+ /* bool evictions_enabled = */ true,
+ /* bool set_initial_size = */ true,
/* size_t initial_size = */ 500000,
/* double min_clean_fraction = */ 0.1,
/* size_t max_size = */ 16000000,
@@ -858,7 +858,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__off,
/* double lower_hr_threshold = */ 0.95,
/* double increment = */ 2.0,
- /* hbool_t apply_max_increment = */ FALSE,
+ /* bool apply_max_increment = */ false,
/* size_t max_increment = */ 4000000,
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
@@ -867,22 +867,22 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__off,
/* double upper_hr_threshold = */ 0.999,
/* double decrement = */ 0.9,
- /* hbool_t apply_max_decrement = */ FALSE,
+ /* bool apply_max_decrement = */ false,
/* size_t max_decrement = */ 1000000,
/* int epochs_before_eviction = */ 2,
- /* hbool_t apply_empty_reserve = */ TRUE,
+ /* bool apply_empty_reserve = */ true,
/* double empty_reserve = */ 0.05,
/* int dirty_bytes_threshold = */ (256 * 1024),
/* int metadata_write_strategy = */
H5AC__DEFAULT_METADATA_WRITE_STRATEGY};
H5AC_cache_config_t mod_config_2 = {
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
+ /* bool rpt_fcn_enabled = */ false,
+ /* bool open_trace_file = */ false,
+ /* bool close_trace_file = */ false,
/* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
+ /* bool evictions_enabled = */ true,
+ /* bool set_initial_size = */ true,
/* size_t initial_size = */ 12000000,
/* double min_clean_fraction = */ 0.1,
/* size_t max_size = */ 16000000,
@@ -891,7 +891,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__off,
/* double lower_hr_threshold = */ 0.95,
/* double increment = */ 2.0,
- /* hbool_t apply_max_increment = */ FALSE,
+ /* bool apply_max_increment = */ false,
/* size_t max_increment = */ 4000000,
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
@@ -900,22 +900,22 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__off,
/* double upper_hr_threshold = */ 0.999,
/* double decrement = */ 0.9,
- /* hbool_t apply_max_decrement = */ FALSE,
+ /* bool apply_max_decrement = */ false,
/* size_t max_decrement = */ 1000000,
/* int epochs_before_eviction = */ 2,
- /* hbool_t apply_empty_reserve = */ TRUE,
+ /* bool apply_empty_reserve = */ true,
/* double empty_reserve = */ 0.05,
/* int dirty_bytes_threshold = */ (256 * 1024),
/* int metadata_write_strategy = */
H5AC__DEFAULT_METADATA_WRITE_STRATEGY};
H5AC_cache_config_t mod_config_3 = {
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
+ /* bool rpt_fcn_enabled = */ false,
+ /* bool open_trace_file = */ false,
+ /* bool close_trace_file = */ false,
/* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
+ /* bool evictions_enabled = */ true,
+ /* bool set_initial_size = */ true,
/* size_t initial_size = */ 2000000,
/* double min_clean_fraction = */ 0.1,
/* size_t max_size = */ 16000000,
@@ -924,7 +924,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__off,
/* double lower_hr_threshold = */ 0.95,
/* double increment = */ 2.0,
- /* hbool_t apply_max_increment = */ FALSE,
+ /* bool apply_max_increment = */ false,
/* size_t max_increment = */ 4000000,
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
@@ -933,10 +933,10 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__off,
/* double upper_hr_threshold = */ 0.999,
/* double decrement = */ 0.9,
- /* hbool_t apply_max_decrement = */ FALSE,
+ /* bool apply_max_decrement = */ false,
/* size_t max_decrement = */ 1000000,
/* int epochs_before_eviction = */ 2,
- /* hbool_t apply_empty_reserve = */ TRUE,
+ /* bool apply_empty_reserve = */ true,
/* double empty_reserve = */ 0.05,
/* int dirty_bytes_threshold = */ (256 * 1024),
/* int metadata_write_strategy = */
@@ -947,7 +947,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
else
TESTING("MDC API smoke check");
- pass = TRUE;
+ pass = true;
if (express_test > 0) {
@@ -971,7 +971,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -983,26 +983,26 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (file_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fcreate() failed.\n";
}
}
/* verify that the cache is set to the default config */
- validate_mdc_config(file_id, &default_config, TRUE, 1);
+ validate_mdc_config(file_id, &default_config, true, 1);
/* set alternate config 1 */
if (pass) {
if (H5Fset_mdc_config(file_id, &mod_config_1) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fset_mdc_config() failed 1.\n";
}
}
/* verify that the cache is now set to the alternate config */
- validate_mdc_config(file_id, &mod_config_1, TRUE, 2);
+ validate_mdc_config(file_id, &mod_config_1, true, 2);
/* create the datasets */
if (pass) {
@@ -1017,7 +1017,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (dataspace_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Screate_simple() failed.";
}
@@ -1033,7 +1033,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (properties < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pcreate() failed.";
}
}
@@ -1042,7 +1042,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (H5Pset_chunk(properties, 2, chunk_size) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_chunk() failed.";
}
}
@@ -1050,13 +1050,13 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
/* create the dataset */
if (pass) {
- HDsnprintf(dset_name, sizeof(dset_name), "/dset%03d", i);
+ snprintf(dset_name, sizeof(dset_name), "/dset%03d", i);
dataset_ids[i] = H5Dcreate2(file_id, dset_name, H5T_STD_I32BE, dataspace_id, H5P_DEFAULT,
properties, H5P_DEFAULT);
if (dataset_ids[i] < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dcreate2() failed.";
}
}
@@ -1068,7 +1068,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (filespace_ids[i] < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dget_space() failed.";
}
}
@@ -1086,7 +1086,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (memspace_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Screate_simple() failed.";
}
}
@@ -1102,7 +1102,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sselect_hyperslab() failed.";
}
}
@@ -1131,7 +1131,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "disk H5Sselect_hyperslab() failed.";
}
@@ -1141,7 +1141,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dwrite() failed.";
}
m++;
@@ -1173,13 +1173,13 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (H5Fset_mdc_config(file_id, &mod_config_2) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fset_mdc_config() failed 2.\n";
}
}
/* verify that the cache is now set to the alternate config */
- validate_mdc_config(file_id, &mod_config_2, TRUE, 3);
+ validate_mdc_config(file_id, &mod_config_2, true, 3);
/* do random reads on all datasets */
n = 0;
@@ -1197,7 +1197,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "disk hyperslab create failed.";
}
@@ -1209,7 +1209,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "disk hyperslab create failed.";
}
}
@@ -1217,18 +1217,18 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
/* validate the slab */
if (pass) {
- valid_chunk = TRUE;
+ valid_chunk = true;
for (k = 0; k < CHUNK_SIZE; k++) {
for (l = 0; l < CHUNK_SIZE; l++) {
if (data_chunk[k][l] != ((DSET_SIZE * DSET_SIZE * m) + (DSET_SIZE * (i + k)) + j + l)) {
- valid_chunk = FALSE;
+ valid_chunk = false;
}
}
}
if (!valid_chunk) {
- pass = FALSE;
+ pass = false;
failure_mssg = "slab validation failed.";
}
}
@@ -1248,7 +1248,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
while ((pass) && (i < NUM_DSETS)) {
if (H5Sclose(filespace_ids[i]) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sclose() failed.";
}
i++;
@@ -1259,7 +1259,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
while ((pass) && (i < NUM_DSETS)) {
if (H5Dclose(dataset_ids[i]) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dclose() failed.";
}
i++;
@@ -1270,13 +1270,13 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (H5Fset_mdc_config(file_id, &mod_config_3) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fset_mdc_config() failed 3.\n";
}
}
/* verify that the cache is now set to the alternate config */
- validate_mdc_config(file_id, &mod_config_3, TRUE, 4);
+ validate_mdc_config(file_id, &mod_config_3, true, 4);
/* do random reads on data set 0 only */
m = 0;
@@ -1294,7 +1294,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "disk hyperslab create failed.";
}
@@ -1306,7 +1306,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "disk hyperslab create failed.";
}
}
@@ -1314,19 +1314,19 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
/* validate the slab */
if (pass) {
- valid_chunk = TRUE;
+ valid_chunk = true;
for (k = 0; k < CHUNK_SIZE; k++) {
for (l = 0; l < CHUNK_SIZE; l++) {
if (data_chunk[k][l] != ((DSET_SIZE * DSET_SIZE * m) + (DSET_SIZE * (i + k)) + j + l)) {
- valid_chunk = FALSE;
+ valid_chunk = false;
}
}
}
if (!valid_chunk) {
- pass = FALSE;
+ pass = false;
failure_mssg = "slab validation failed.";
}
}
@@ -1346,7 +1346,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (H5Sclose(filespace_ids[0]) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sclose(filespace_ids[0]) failed.";
}
}
@@ -1356,7 +1356,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (H5Sclose(dataspace_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sclose(dataspace) failed.";
}
}
@@ -1366,7 +1366,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (H5Sclose(memspace_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sclose(memspace_id) failed.";
}
}
@@ -1376,7 +1376,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (H5Dclose(dataset_ids[0]) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dclose(dataset_ids[0]) failed.";
}
}
@@ -1386,12 +1386,12 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
else if (H5Fdelete(filename, H5P_DEFAULT) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fdelete() failed.\n";
}
}
@@ -1422,7 +1422,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
* related API calls.
*
* Note: It is assumed that boolean parameters are only set
- * to TRUE/FALSE.
+ * to true/false.
*
* Return: Success: Pointer to an array of cache configurations.
* Failure: NULL
@@ -1450,12 +1450,12 @@ init_invalid_configs(void)
for (i = 0; i < NUM_INVALID_CONFIGS; i++) {
configs[i].version = H5C__CURR_AUTO_SIZE_CTL_VER;
- configs[i].rpt_fcn_enabled = FALSE;
- configs[i].open_trace_file = FALSE;
- configs[i].close_trace_file = FALSE;
+ configs[i].rpt_fcn_enabled = false;
+ configs[i].open_trace_file = false;
+ configs[i].close_trace_file = false;
/* trace file name set to all ASCII NUL by calloc() */
- configs[i].evictions_enabled = TRUE;
- configs[i].set_initial_size = TRUE;
+ configs[i].evictions_enabled = true;
+ configs[i].set_initial_size = true;
configs[i].initial_size = (1 * 1024 * 1024);
configs[i].min_clean_fraction = 0.25;
configs[i].max_size = (16 * 1024 * 1024);
@@ -1464,7 +1464,7 @@ init_invalid_configs(void)
configs[i].incr_mode = H5C_incr__threshold;
configs[i].lower_hr_threshold = 0.9;
configs[i].increment = 2.0;
- configs[i].apply_max_increment = TRUE;
+ configs[i].apply_max_increment = true;
configs[i].max_increment = (4 * 1024 * 1024);
configs[i].flash_incr_mode = H5C_flash_incr__off;
configs[i].flash_multiple = 2.0;
@@ -1472,10 +1472,10 @@ init_invalid_configs(void)
configs[i].decr_mode = H5C_decr__age_out_with_threshold;
configs[i].upper_hr_threshold = 0.999;
configs[i].decrement = 0.9;
- configs[i].apply_max_decrement = TRUE;
+ configs[i].apply_max_decrement = true;
configs[i].max_decrement = (1 * 1024 * 1024);
configs[i].epochs_before_eviction = 3;
- configs[i].apply_empty_reserve = TRUE;
+ configs[i].apply_empty_reserve = true;
configs[i].empty_reserve = 0.1;
configs[i].dirty_bytes_threshold = (256 * 1024);
configs[i].metadata_write_strategy = H5AC__DEFAULT_METADATA_WRITE_STRATEGY;
@@ -1486,8 +1486,8 @@ init_invalid_configs(void)
/* 0 -- bad version */
configs[0].version = -1;
- /* 1 -- open_trace_file == TRUE and empty trace_file_name */
- configs[1].open_trace_file = TRUE;
+ /* 1 -- open_trace_file == true and empty trace_file_name */
+ configs[1].open_trace_file = true;
/* trace file name set to all ASCII NUL by calloc() */
/* 2 -- max_size too big */
@@ -1592,11 +1592,11 @@ init_invalid_configs(void)
configs[32].dirty_bytes_threshold = (H5C__MAX_MAX_CACHE_SIZE / 4) + 1;
/* 33 -- attempt to disable evictions when auto incr enabled */
- configs[33].evictions_enabled = FALSE;
+ configs[33].evictions_enabled = false;
configs[33].decr_mode = H5C_decr__off;
/* 34 -- attempt to disable evictions when auto decr enabled */
- configs[34].evictions_enabled = FALSE;
+ configs[34].evictions_enabled = false;
configs[34].decr_mode = H5C_decr__age_out;
/* 35 -- unknown metadata write strategy */
@@ -1612,23 +1612,23 @@ init_invalid_configs(void)
* Purpose: Verify that the FAPL related MDC API calls reject input
* errors gracefully.
*
- * Return: Test pass status (TRUE/FALSE)
+ * Return: Test pass status (true/false)
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
check_fapl_mdc_api_errs(void)
{
static char msg[128];
int i;
herr_t result;
- hid_t fapl_id = -1;
+ hid_t fapl_id = H5I_INVALID_HID;
H5AC_cache_config_t default_config = H5AC__DEFAULT_CACHE_CONFIG;
H5AC_cache_config_t scratch;
TESTING("MDC/FAPL related API input errors");
- pass = TRUE;
+ pass = true;
/* first test H5Pget_mdc_config().
*/
@@ -1638,13 +1638,13 @@ check_fapl_mdc_api_errs(void)
H5E_BEGIN_TRY
{
- result = H5Pget_mdc_config((hid_t)-1, &scratch);
+ result = H5Pget_mdc_config((hid_t)H5I_INVALID_HID, &scratch);
}
H5E_END_TRY
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pget_mdc_config() accepted invalid plist_id.";
}
}
@@ -1659,16 +1659,16 @@ check_fapl_mdc_api_errs(void)
if (fapl_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pcreate(H5P_FILE_ACCESS) failed.\n";
}
}
scratch.version = H5C__CURR_AUTO_SIZE_CTL_VER;
if ((pass) && ((H5Pget_mdc_config(fapl_id, &scratch) < 0) ||
- (!CACHE_CONFIGS_EQUAL(default_config, scratch, TRUE, TRUE)))) {
+ (!CACHE_CONFIGS_EQUAL(default_config, scratch, true, true)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "New FAPL has unexpected metadata cache config?!?!?.\n";
}
@@ -1682,7 +1682,7 @@ check_fapl_mdc_api_errs(void)
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pget_mdc_config() accepted NULL config_ptr.";
}
}
@@ -1700,7 +1700,7 @@ check_fapl_mdc_api_errs(void)
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pget_mdc_config() accepted bad config version.";
}
}
@@ -1713,13 +1713,13 @@ check_fapl_mdc_api_errs(void)
H5E_BEGIN_TRY
{
- result = H5Pset_mdc_config((hid_t)-1, &default_config);
+ result = H5Pset_mdc_config((hid_t)H5I_INVALID_HID, &default_config);
}
H5E_END_TRY
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_mdc_config() accepted bad invalid plist_id.";
}
}
@@ -1734,7 +1734,7 @@ check_fapl_mdc_api_errs(void)
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_mdc_config() accepted NULL config_ptr.";
}
}
@@ -1749,8 +1749,8 @@ check_fapl_mdc_api_errs(void)
if (result >= 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5Pset_mdc_config() accepted invalid_configs[%d].", i);
+ pass = false;
+ snprintf(msg, (size_t)128, "H5Pset_mdc_config() accepted invalid_configs[%d].", i);
failure_mssg = msg;
}
i++;
@@ -1761,9 +1761,9 @@ check_fapl_mdc_api_errs(void)
*/
scratch.version = H5C__CURR_AUTO_SIZE_CTL_VER;
if ((pass) && ((H5Pget_mdc_config(fapl_id, &scratch) < 0) ||
- (!CACHE_CONFIGS_EQUAL(default_config, scratch, TRUE, TRUE)))) {
+ (!CACHE_CONFIGS_EQUAL(default_config, scratch, true, true)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "FAPL metadata cache config changed???.\n";
}
@@ -1791,19 +1791,19 @@ check_fapl_mdc_api_errs(void)
* Purpose: Verify that the file related MDC API calls reject input
* errors gracefully.
*
- * Return: Test pass status (TRUE/FALSE)
+ * Return: Test pass status (true/false)
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
{
char filename[512];
static char msg[128];
- hbool_t show_progress = FALSE;
+ bool show_progress = false;
int i;
herr_t result;
- hid_t file_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
size_t max_size;
size_t min_clean_size;
size_t cur_size;
@@ -1817,7 +1817,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
else
TESTING("MDC/FILE related API input errors");
- pass = TRUE;
+ pass = true;
/* Create a file for test purposes, and verify that its metadata cache
* set to the default MDC configuration.
@@ -1833,7 +1833,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
if (h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -1849,12 +1849,12 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
if (file_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fcreate() failed.\n";
}
}
- validate_mdc_config(file_id, &default_config, TRUE, 1);
+ validate_mdc_config(file_id, &default_config, true, 1);
/* test H5Fget_mdc_config(). */
@@ -1868,13 +1868,13 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
H5E_BEGIN_TRY
{
- result = H5Fget_mdc_config((hid_t)-1, &scratch);
+ result = H5Fget_mdc_config((hid_t)H5I_INVALID_HID, &scratch);
}
H5E_END_TRY
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fget_mdc_config() accepted invalid file_id.";
}
}
@@ -1894,7 +1894,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fget_mdc_config() accepted NULL config_ptr.";
}
}
@@ -1915,7 +1915,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fget_mdc_config() accepted bad config version.";
}
}
@@ -1932,13 +1932,13 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
H5E_BEGIN_TRY
{
- result = H5Fset_mdc_config((hid_t)-1, &default_config);
+ result = H5Fset_mdc_config((hid_t)H5I_INVALID_HID, &default_config);
}
H5E_END_TRY
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fset_mdc_config() accepted bad invalid file_id.";
}
}
@@ -1958,7 +1958,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fset_mdc_config() accepted NULL config_ptr.";
}
}
@@ -1978,8 +1978,8 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
if (result >= 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5Fset_mdc_config() accepted invalid_configs[%d].", i);
+ pass = false;
+ snprintf(msg, (size_t)128, "H5Fset_mdc_config() accepted invalid_configs[%d].", i);
failure_mssg = msg;
}
i++;
@@ -1988,7 +1988,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
/* verify that none of the above calls to H5Fset_mdc_config() changed
* the configuration in the FAPL.
*/
- validate_mdc_config(file_id, &default_config, TRUE, 2);
+ validate_mdc_config(file_id, &default_config, true, 2);
/* test H5Fget_mdc_hit_rate() */
if (pass) {
@@ -2000,13 +2000,13 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
H5E_BEGIN_TRY
{
- result = H5Fget_mdc_hit_rate((hid_t)-1, &hit_rate);
+ result = H5Fget_mdc_hit_rate((hid_t)H5I_INVALID_HID, &hit_rate);
}
H5E_END_TRY
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fget_mdc_hit_rate() accepted bad file_id.";
}
}
@@ -2026,7 +2026,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fget_mdc_hit_rate() accepted NULL hit_rate_ptr.";
}
}
@@ -2041,13 +2041,13 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
H5E_BEGIN_TRY
{
- result = H5Freset_mdc_hit_rate_stats((hid_t)-1);
+ result = H5Freset_mdc_hit_rate_stats((hid_t)H5I_INVALID_HID);
}
H5E_END_TRY
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Freset_mdc_hit_rate_stats() accepted bad file_id.";
}
}
@@ -2062,13 +2062,14 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
H5E_BEGIN_TRY
{
- result = H5Fget_mdc_size((hid_t)-1, &max_size, &min_clean_size, &cur_size, &cur_num_entries);
+ result = H5Fget_mdc_size((hid_t)H5I_INVALID_HID, &max_size, &min_clean_size, &cur_size,
+ &cur_num_entries);
}
H5E_END_TRY
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fget_mdc_size() accepted bad file_id.";
}
}
@@ -2086,7 +2087,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
(H5Fget_mdc_size(file_id, NULL, NULL, NULL, &cur_num_entries) < 0) ||
(H5Fget_mdc_size(file_id, NULL, NULL, NULL, NULL) < 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fget_mdc_size() failed to handle NULL params.";
}
}
@@ -2101,12 +2102,12 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
else if (H5Fdelete(filename, H5P_DEFAULT) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fdelete() failed.\n";
}
}
@@ -2143,8 +2144,8 @@ main(void)
{
unsigned nerrs = 0;
int express_test;
- hid_t fcpl_id = -1;
- hid_t fcpl2_id = -1;
+ hid_t fcpl_id = H5I_INVALID_HID;
+ hid_t fcpl2_id = H5I_INVALID_HID;
unsigned paged;
H5open();
@@ -2186,7 +2187,7 @@ main(void)
/* Test with paged aggregation enabled or not */
/* The "my_fcpl" passed to each test has the paged or non-paged strategy set up accordingly */
- for (paged = FALSE; paged <= TRUE; paged++) {
+ for (paged = false; paged <= true; paged++) {
hid_t my_fcpl = fcpl_id;
if (paged) {
diff --git a/test/cache_common.c b/test/cache_common.c
index b406ff418de..02a216b9c7e 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -20,7 +20,7 @@
#include "cache_common.h"
-hbool_t pass = TRUE; /* set to false on error */
+bool pass = true; /* set to false on error */
const char *failure_mssg = NULL;
static char tmp_msg_buf[256];
@@ -36,7 +36,7 @@ static test_entry_t *monster_entries = NULL, *orig_monster_entries = NULL;
static test_entry_t *variable_entries = NULL, *orig_variable_entries = NULL;
static test_entry_t *notify_entries = NULL, *orig_notify_entries = NULL;
-hbool_t orig_entry_arrays_init = FALSE;
+bool orig_entry_arrays_init = false;
static herr_t pico_get_initial_load_size(void *udata_ptr, size_t *image_len_ptr);
static herr_t nano_get_initial_load_size(void *udata_ptr, size_t *image_len_ptr);
@@ -55,17 +55,17 @@ static herr_t variable_get_final_load_size(const void *image, size_t image_len,
static htri_t variable_verify_chksum(const void *image_ptr, size_t len, void *udata_ptr);
-static void *pico_deserialize(const void *image_ptr, size_t len, void *udata_ptr, hbool_t *dirty_ptr);
-static void *nano_deserialize(const void *image_ptr, size_t len, void *udata_ptr, hbool_t *dirty_ptr);
-static void *micro_deserialize(const void *image_ptr, size_t len, void *udata_ptr, hbool_t *dirty_ptr);
-static void *tiny_deserialize(const void *image_ptr, size_t len, void *udata_ptr, hbool_t *dirty_ptr);
-static void *small_deserialize(const void *image_ptr, size_t len, void *udata_ptr, hbool_t *dirty_ptr);
-static void *medium_deserialize(const void *image_ptr, size_t len, void *udata_ptr, hbool_t *dirty_ptr);
-static void *large_deserialize(const void *image_ptr, size_t len, void *udata_ptr, hbool_t *dirty_ptr);
-static void *huge_deserialize(const void *image_ptr, size_t len, void *udata_ptr, hbool_t *dirty_ptr);
-static void *monster_deserialize(const void *image_ptr, size_t len, void *udata_ptr, hbool_t *dirty_ptr);
-static void *variable_deserialize(const void *image_ptr, size_t len, void *udata_ptr, hbool_t *dirty_ptr);
-static void *notify_deserialize(const void *image_ptr, size_t len, void *udata_ptr, hbool_t *dirty_ptr);
+static void *pico_deserialize(const void *image_ptr, size_t len, void *udata_ptr, bool *dirty_ptr);
+static void *nano_deserialize(const void *image_ptr, size_t len, void *udata_ptr, bool *dirty_ptr);
+static void *micro_deserialize(const void *image_ptr, size_t len, void *udata_ptr, bool *dirty_ptr);
+static void *tiny_deserialize(const void *image_ptr, size_t len, void *udata_ptr, bool *dirty_ptr);
+static void *small_deserialize(const void *image_ptr, size_t len, void *udata_ptr, bool *dirty_ptr);
+static void *medium_deserialize(const void *image_ptr, size_t len, void *udata_ptr, bool *dirty_ptr);
+static void *large_deserialize(const void *image_ptr, size_t len, void *udata_ptr, bool *dirty_ptr);
+static void *huge_deserialize(const void *image_ptr, size_t len, void *udata_ptr, bool *dirty_ptr);
+static void *monster_deserialize(const void *image_ptr, size_t len, void *udata_ptr, bool *dirty_ptr);
+static void *variable_deserialize(const void *image_ptr, size_t len, void *udata_ptr, bool *dirty_ptr);
+static void *notify_deserialize(const void *image_ptr, size_t len, void *udata_ptr, bool *dirty_ptr);
static herr_t pico_image_len(const void *thing, size_t *image_len_ptr);
static herr_t nano_image_len(const void *thing, size_t *image_len_ptr);
@@ -135,7 +135,7 @@ static void mark_flush_dep_clean(test_entry_t *entry_ptr);
static herr_t get_initial_load_size(void *udata_ptr, size_t *image_len_ptr, int32_t entry_type);
static herr_t get_final_load_size(const void *image, size_t image_len, void *udata, size_t *actual_len,
int32_t entry_type);
-static void *deserialize(const void *image_ptr, size_t len, void *udata_ptr, hbool_t *dirty_ptr,
+static void *deserialize(const void *image_ptr, size_t len, void *udata_ptr, bool *dirty_ptr,
int32_t entry_type);
static herr_t image_len(const void *thing, size_t *image_len_ptr, int32_t entry_type);
static herr_t pre_serialize(H5F_t *f, void *thing, haddr_t addr, size_t len, haddr_t *new_addr_ptr,
@@ -599,8 +599,8 @@ variable_get_final_load_size(const void *image, size_t image_len, void *udata, s
* --check is ok only after 'max_verify_ct' is reached
* --otherwise check is not ok
*
- * Return: TRUE: checksum is ok
- * FALSE: checksum is not ok
+ * Return: true: checksum is ok
+ * false: checksum is not ok
*
*-------------------------------------------------------------------------
*/
@@ -632,9 +632,9 @@ verify_chksum(const void H5_ATTR_UNUSED *image, size_t H5_ATTR_UNUSED len, void
assert(entry->addr == addr);
if (++entry->verify_ct >= entry->max_verify_ct)
- return (TRUE);
+ return (true);
else
- return (FALSE);
+ return (false);
} /* verify_chksum() */
@@ -656,7 +656,7 @@ variable_verify_chksum(const void *image, size_t len, void *udata)
*-------------------------------------------------------------------------
*/
static void *
-deserialize(const void *image, size_t H5_ATTR_NDEBUG_UNUSED len, void *udata, hbool_t *dirty,
+deserialize(const void *image, size_t H5_ATTR_NDEBUG_UNUSED len, void *udata, bool *dirty,
int32_t H5_ATTR_NDEBUG_UNUSED entry_type)
{
test_entry_t *entry;
@@ -685,8 +685,8 @@ deserialize(const void *image, size_t H5_ATTR_NDEBUG_UNUSED len, void *udata, hb
assert(entry->flush_dep_npar == 0);
assert(entry->flush_dep_nchd == 0);
- /* for now *dirty will always be FALSE */
- *dirty = FALSE;
+ /* for now *dirty will always be false */
+ *dirty = false;
/* verify that the image contains the expected data. */
assert(image != NULL);
@@ -715,76 +715,76 @@ deserialize(const void *image, size_t H5_ATTR_NDEBUG_UNUSED len, void *udata, hb
} /* end else */
} /* end if */
- entry->deserialized = TRUE;
- entry->header.is_dirty = FALSE;
- entry->is_dirty = FALSE;
+ entry->deserialized = true;
+ entry->header.is_dirty = false;
+ entry->is_dirty = false;
(entry->deserializes)++;
return ((void *)entry);
} /* deserialize() */
void *
-pico_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty)
+pico_deserialize(const void *image, size_t len, void *udata, bool *dirty)
{
return deserialize(image, len, udata, dirty, PICO_ENTRY_TYPE);
}
void *
-nano_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty)
+nano_deserialize(const void *image, size_t len, void *udata, bool *dirty)
{
return deserialize(image, len, udata, dirty, NANO_ENTRY_TYPE);
}
void *
-micro_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty)
+micro_deserialize(const void *image, size_t len, void *udata, bool *dirty)
{
return deserialize(image, len, udata, dirty, MICRO_ENTRY_TYPE);
}
void *
-tiny_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty)
+tiny_deserialize(const void *image, size_t len, void *udata, bool *dirty)
{
return deserialize(image, len, udata, dirty, TINY_ENTRY_TYPE);
}
void *
-small_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty)
+small_deserialize(const void *image, size_t len, void *udata, bool *dirty)
{
return deserialize(image, len, udata, dirty, SMALL_ENTRY_TYPE);
}
void *
-medium_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty)
+medium_deserialize(const void *image, size_t len, void *udata, bool *dirty)
{
return deserialize(image, len, udata, dirty, MEDIUM_ENTRY_TYPE);
}
void *
-large_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty)
+large_deserialize(const void *image, size_t len, void *udata, bool *dirty)
{
return deserialize(image, len, udata, dirty, LARGE_ENTRY_TYPE);
}
void *
-huge_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty)
+huge_deserialize(const void *image, size_t len, void *udata, bool *dirty)
{
return deserialize(image, len, udata, dirty, HUGE_ENTRY_TYPE);
}
void *
-monster_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty)
+monster_deserialize(const void *image, size_t len, void *udata, bool *dirty)
{
return deserialize(image, len, udata, dirty, MONSTER_ENTRY_TYPE);
}
void *
-variable_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty)
+variable_deserialize(const void *image, size_t len, void *udata, bool *dirty)
{
return deserialize(image, len, udata, dirty, VARIABLE_ENTRY_TYPE);
}
void *
-notify_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty)
+notify_deserialize(const void *image, size_t len, void *udata, bool *dirty)
{
return deserialize(image, len, udata, dirty, NOTIFY_ENTRY_TYPE);
}
@@ -953,7 +953,7 @@ pre_serialize(H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *thing, haddr_t H5_ATTR_NDEBU
execute_flush_op(entry->file_ptr, entry, &((entry->flush_ops)[i]), flags_ptr);
} /* end for */
entry->num_flush_ops = 0;
- entry->flush_op_self_resize_in_progress = FALSE;
+ entry->flush_op_self_resize_in_progress = false;
/* This looks wrong, but it isn't -- *flags_ptr will be modified
* by execute_flush_op() only if the target is this entry --
@@ -1122,7 +1122,7 @@ serialize(const H5F_t H5_ATTR_UNUSED *f, void *image_ptr, size_t len, void *thin
* as close to that callback as we will get. Hence mark the entry
* clean here. If all goes well, it will be flushed shortly.
*/
- entry->is_dirty = FALSE;
+ entry->is_dirty = false;
if (entry->flush_dep_npar > 0) {
assert(entry->flush_dep_ndirty_chd == 0);
@@ -1133,13 +1133,13 @@ serialize(const H5F_t H5_ATTR_UNUSED *f, void *image_ptr, size_t len, void *thin
* as initialized.
*/
if (entry->at_main_addr)
- entry->written_to_main_addr = TRUE;
+ entry->written_to_main_addr = true;
else
- entry->written_to_alt_addr = TRUE;
+ entry->written_to_alt_addr = true;
/* do book keeping */
(entry->serializes)++;
- entry->serialized = TRUE;
+ entry->serialized = true;
return (SUCCEED);
} /* serialize() */
@@ -1345,7 +1345,7 @@ free_icr(test_entry_t *entry, int32_t H5_ATTR_NDEBUG_UNUSED entry_type)
entry->num_pins = 0;
} /* end if */
- entry->destroyed = TRUE;
+ entry->destroyed = true;
entry->cache_ptr = NULL;
return (SUCCEED);
@@ -1426,7 +1426,7 @@ notify_free_icr(void *thing)
/*-------------------------------------------------------------------------
* Function: add_flush_op
*
- * Purpose: Do nothing if pass is FALSE on entry.
+ * Purpose: Do nothing if pass is false on entry.
*
* Otherwise, add the specified flush operation to the
* target instance of test_entry_t.
@@ -1437,7 +1437,7 @@ notify_free_icr(void *thing)
*/
void
-add_flush_op(int target_type, int target_idx, int op_code, int type, int idx, hbool_t flag, size_t new_size,
+add_flush_op(int target_type, int target_idx, int op_code, int type, int idx, bool flag, size_t new_size,
unsigned *order_ptr)
{
int i;
@@ -1476,7 +1476,7 @@ add_flush_op(int target_type, int target_idx, int op_code, int type, int idx, hb
/*-------------------------------------------------------------------------
* Function: create_pinned_entry_dependency
*
- * Purpose: Do nothing if pass is FALSE on entry.
+ * Purpose: Do nothing if pass is false on entry.
*
* Otherwise, set up a pinned entry dependency so we can
* test the pinned entry modifications to the flush routine.
@@ -1558,7 +1558,7 @@ create_pinned_entry_dependency(H5F_t *file_ptr, int pinning_type, int pinning_id
*/
void
-dirty_entry(H5F_t *file_ptr, int32_t type, int32_t idx, hbool_t dirty_pin)
+dirty_entry(H5F_t *file_ptr, int32_t type, int32_t idx, bool dirty_pin)
{
test_entry_t *base_addr;
test_entry_t *entry_ptr;
@@ -1576,7 +1576,7 @@ dirty_entry(H5F_t *file_ptr, int32_t type, int32_t idx, hbool_t dirty_pin)
if (!entry_in_cache(cache_ptr, type, idx)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "entry to be dirty pinned is not in cache.";
}
else {
@@ -1590,7 +1590,7 @@ dirty_entry(H5F_t *file_ptr, int32_t type, int32_t idx, hbool_t dirty_pin)
if (!((entry_ptr->header).is_pinned)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "entry to be dirty pinned is not pinned.";
}
else {
@@ -1667,7 +1667,7 @@ execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr, struct flush_o
(*flags_ptr) |= H5C__SERIALIZE_RESIZED_FLAG;
- entry_ptr->flush_op_self_resize_in_progress = TRUE;
+ entry_ptr->flush_op_self_resize_in_progress = true;
}
else {
@@ -1690,12 +1690,12 @@ execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr, struct flush_o
if (op_ptr->flag) {
assert(entry_ptr->addr == entry_ptr->alt_addr);
entry_ptr->addr = entry_ptr->main_addr;
- entry_ptr->at_main_addr = TRUE;
+ entry_ptr->at_main_addr = true;
} /* end if */
else {
assert(entry_ptr->addr == entry_ptr->main_addr);
entry_ptr->addr = entry_ptr->alt_addr;
- entry_ptr->at_main_addr = FALSE;
+ entry_ptr->at_main_addr = false;
} /* end else */
} /* end if */
else
@@ -1733,7 +1733,7 @@ execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr, struct flush_o
break;
default:
- pass = FALSE;
+ pass = false;
failure_mssg = "Undefined flush op code.";
break;
}
@@ -1747,15 +1747,15 @@ execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr, struct flush_o
* Purpose: Given a pointer to a cache, an entry type, and an index,
* determine if the entry is currently in the cache.
*
- * Return: TRUE if the entry is in the cache, and FALSE otherwise.
+ * Return: true if the entry is in the cache, and false otherwise.
*
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
entry_in_cache(H5C_t *cache_ptr, int32_t type, int32_t idx)
{
- hbool_t in_cache = FALSE; /* will set to TRUE if necessary */
+ bool in_cache = false; /* will set to true if necessary */
test_entry_t *base_addr;
test_entry_t *entry_ptr;
H5C_cache_entry_t *test_ptr = NULL;
@@ -1775,7 +1775,7 @@ entry_in_cache(H5C_t *cache_ptr, int32_t type, int32_t idx)
if (test_ptr != NULL) {
- in_cache = TRUE;
+ in_cache = true;
assert(test_ptr == (H5C_cache_entry_t *)entry_ptr);
assert(entry_ptr->addr == entry_ptr->header.addr);
}
@@ -2003,10 +2003,10 @@ reset_entries(void)
base_addr[j].header.addr = (haddr_t)0;
base_addr[j].header.size = (size_t)0;
base_addr[j].header.type = NULL;
- base_addr[j].header.is_dirty = FALSE;
- base_addr[j].header.is_protected = FALSE;
- base_addr[j].header.is_read_only = FALSE;
- base_addr[j].header.ro_ref_count = FALSE;
+ base_addr[j].header.is_dirty = false;
+ base_addr[j].header.is_protected = false;
+ base_addr[j].header.is_read_only = false;
+ base_addr[j].header.ro_ref_count = false;
base_addr[j].header.next = NULL;
base_addr[j].header.prev = NULL;
#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
@@ -2016,10 +2016,10 @@ reset_entries(void)
base_addr[j].self = &(base_addr[j]);
base_addr[j].cache_ptr = NULL;
- base_addr[j].written_to_main_addr = FALSE;
- base_addr[j].written_to_alt_addr = FALSE;
+ base_addr[j].written_to_main_addr = false;
+ base_addr[j].written_to_alt_addr = false;
base_addr[j].addr = addr;
- base_addr[j].at_main_addr = TRUE;
+ base_addr[j].at_main_addr = true;
base_addr[j].main_addr = addr;
base_addr[j].alt_addr = alt_addr;
base_addr[j].size = entry_size;
@@ -2027,14 +2027,14 @@ reset_entries(void)
base_addr[j].index = j;
base_addr[j].serializes = 0;
base_addr[j].deserializes = 0;
- base_addr[j].is_dirty = FALSE;
- base_addr[j].is_protected = FALSE;
- base_addr[j].is_read_only = FALSE;
- base_addr[j].ro_ref_count = FALSE;
+ base_addr[j].is_dirty = false;
+ base_addr[j].is_protected = false;
+ base_addr[j].is_read_only = false;
+ base_addr[j].ro_ref_count = false;
- base_addr[j].is_corked = FALSE;
+ base_addr[j].is_corked = false;
- base_addr[j].is_pinned = FALSE;
+ base_addr[j].is_pinned = false;
base_addr[j].pinning_ref_count = 0;
base_addr[j].num_pins = 0;
for (k = 0; k < MAX_PINS; k++) {
@@ -2047,21 +2047,21 @@ reset_entries(void)
base_addr[j].flush_ops[k].op_code = FLUSH_OP__NO_OP;
base_addr[j].flush_ops[k].type = -1;
base_addr[j].flush_ops[k].idx = -1;
- base_addr[j].flush_ops[k].flag = FALSE;
+ base_addr[j].flush_ops[k].flag = false;
base_addr[j].flush_ops[k].size = 0;
}
- base_addr[j].flush_op_self_resize_in_progress = FALSE;
+ base_addr[j].flush_op_self_resize_in_progress = false;
- base_addr[j].deserialized = FALSE;
- base_addr[j].serialized = FALSE;
- base_addr[j].destroyed = FALSE;
- base_addr[j].expunged = FALSE;
+ base_addr[j].deserialized = false;
+ base_addr[j].serialized = false;
+ base_addr[j].destroyed = false;
+ base_addr[j].expunged = false;
base_addr[j].flush_dep_npar = 0;
base_addr[j].flush_dep_nchd = 0;
base_addr[j].flush_dep_ndirty_chd = 0;
- base_addr[j].pinned_from_client = FALSE;
- base_addr[j].pinned_from_cache = FALSE;
+ base_addr[j].pinned_from_client = false;
+ base_addr[j].pinned_from_cache = false;
base_addr[j].flush_order = 0;
@@ -2081,7 +2081,7 @@ reset_entries(void)
} /* end for */
/* Indicate that we've made a copy for later */
- orig_entry_arrays_init = TRUE;
+ orig_entry_arrays_init = true;
} /* end if */
else {
for (i = 0; i < NUMBER_OF_ENTRY_TYPES; i++) {
@@ -2113,7 +2113,7 @@ reset_entries(void)
*/
void
-resize_entry(H5F_t *file_ptr, int32_t type, int32_t idx, size_t new_size, hbool_t in_cache)
+resize_entry(H5F_t *file_ptr, int32_t type, int32_t idx, size_t new_size, bool in_cache)
{
test_entry_t *base_addr;
test_entry_t *entry_ptr;
@@ -2133,7 +2133,7 @@ resize_entry(H5F_t *file_ptr, int32_t type, int32_t idx, size_t new_size, hbool_
if (!entry_in_cache(cache_ptr, type, idx)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "entry to be resized pinned is not in cache.";
}
else {
@@ -2148,23 +2148,23 @@ resize_entry(H5F_t *file_ptr, int32_t type, int32_t idx, size_t new_size, hbool_
if (!(entry_ptr->header.is_pinned || entry_ptr->header.is_protected)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "entry to be resized is not pinned or protected.";
}
else {
- hbool_t was_dirty = entry_ptr->is_dirty;
+ bool was_dirty = entry_ptr->is_dirty;
entry_ptr->size = new_size;
result = H5C_resize_entry((void *)entry_ptr, new_size);
- entry_ptr->is_dirty = TRUE;
+ entry_ptr->is_dirty = true;
if (entry_ptr->flush_dep_npar > 0 && !was_dirty)
mark_flush_dep_dirty(entry_ptr);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "error(s) in H5C_resize_entry().";
}
else {
@@ -2177,7 +2177,7 @@ resize_entry(H5F_t *file_ptr, int32_t type, int32_t idx, size_t new_size, hbool_
else {
protect_entry(file_ptr, type, idx);
- resize_entry(file_ptr, type, idx, new_size, TRUE);
+ resize_entry(file_ptr, type, idx, new_size, true);
unprotect_entry(file_ptr, type, idx, H5C__DIRTIED_FLAG);
}
}
@@ -2188,9 +2188,9 @@ resize_entry(H5F_t *file_ptr, int32_t type, int32_t idx, size_t new_size, hbool_
* Function: verify_clean
*
* Purpose: Verify that all cache entries are marked as clean. If any
- * are not, set pass to FALSE.
+ * are not, set pass to false.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -2225,7 +2225,7 @@ verify_clean(void)
if (dirty_count > 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "verify_clean() found dirty entry(s).";
}
}
@@ -2237,9 +2237,9 @@ verify_clean(void)
*
* Purpose: Verify that a list of entries have the expected status.
* If any discrepancies are found, set the failure message
- * and set pass to FALSE.
+ * and set pass to false.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -2255,21 +2255,21 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
while ((pass) && (i < num_entries)) {
test_entry_t *base_addr = entries[expected[i].entry_type];
test_entry_t *entry_ptr = &(base_addr[expected[i].entry_index]);
- hbool_t in_cache = FALSE; /* will set to TRUE if necessary */
+ bool in_cache = false; /* will set to true if necessary */
unsigned u; /* Local index variable */
if ((!expected[i].in_cache) && ((expected[i].is_protected) || (expected[i].is_pinned))) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf), "%d: Contradictory data in expected[%d].\n", tag, i);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf), "%d: Contradictory data in expected[%d].\n", tag, i);
failure_mssg = tmp_msg_buf;
}
if ((!expected[i].in_cache) && (expected[i].is_dirty) && (!entry_ptr->expunged)) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d: expected[%d] specs non-expunged, dirty, non-resident.\n", tag, i);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d: expected[%d] specs non-expunged, dirty, non-resident.\n", tag, i);
failure_mssg = tmp_msg_buf;
}
@@ -2279,11 +2279,11 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (in_cache != expected[i].in_cache) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) in cache actual/expected = %d/%d.\n", tag,
- (int)expected[i].entry_type, (int)expected[i].entry_index, (int)in_cache,
- (int)expected[i].in_cache);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) in cache actual/expected = %d/%d.\n", tag,
+ (int)expected[i].entry_type, (int)expected[i].entry_index, (int)in_cache,
+ (int)expected[i].in_cache);
failure_mssg = tmp_msg_buf;
}
}
@@ -2292,11 +2292,11 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (entry_ptr->size != expected[i].size) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) size actual/expected = %ld/%ld.\n", tag,
- (int)expected[i].entry_type, (int)expected[i].entry_index, (long)(entry_ptr->size),
- (long)expected[i].size);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) size actual/expected = %ld/%ld.\n", tag,
+ (int)expected[i].entry_type, (int)expected[i].entry_index, (long)(entry_ptr->size),
+ (long)expected[i].size);
failure_mssg = tmp_msg_buf;
}
}
@@ -2305,11 +2305,11 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (entry_ptr->header.size != expected[i].size) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) header size actual/expected = %ld/%ld.\n", tag,
- (int)expected[i].entry_type, (int)expected[i].entry_index,
- (long)(entry_ptr->header.size), (long)expected[i].size);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) header size actual/expected = %ld/%ld.\n", tag,
+ (int)expected[i].entry_type, (int)expected[i].entry_index,
+ (long)(entry_ptr->header.size), (long)expected[i].size);
failure_mssg = tmp_msg_buf;
}
}
@@ -2318,11 +2318,11 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (entry_ptr->at_main_addr != expected[i].at_main_addr) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) at main addr actual/expected = %d/%d.\n", tag,
- (int)expected[i].entry_type, (int)expected[i].entry_index,
- (int)(entry_ptr->at_main_addr), (int)expected[i].at_main_addr);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) at main addr actual/expected = %d/%d.\n", tag,
+ (int)expected[i].entry_type, (int)expected[i].entry_index,
+ (int)(entry_ptr->at_main_addr), (int)expected[i].at_main_addr);
failure_mssg = tmp_msg_buf;
}
}
@@ -2331,11 +2331,11 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (entry_ptr->is_dirty != expected[i].is_dirty) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) is_dirty actual/expected = %d/%d.\n", tag,
- (int)expected[i].entry_type, (int)expected[i].entry_index,
- (int)(entry_ptr->is_dirty), (int)expected[i].is_dirty);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) is_dirty actual/expected = %d/%d.\n", tag,
+ (int)expected[i].entry_type, (int)expected[i].entry_index,
+ (int)(entry_ptr->is_dirty), (int)expected[i].is_dirty);
failure_mssg = tmp_msg_buf;
}
}
@@ -2344,11 +2344,11 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (entry_ptr->header.is_dirty != expected[i].is_dirty) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) header is_dirty actual/expected = %d/%d.\n", tag,
- (int)expected[i].entry_type, (int)expected[i].entry_index,
- (int)(entry_ptr->header.is_dirty), (int)expected[i].is_dirty);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) header is_dirty actual/expected = %d/%d.\n", tag,
+ (int)expected[i].entry_type, (int)expected[i].entry_index,
+ (int)(entry_ptr->header.is_dirty), (int)expected[i].is_dirty);
failure_mssg = tmp_msg_buf;
}
}
@@ -2357,11 +2357,11 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (entry_ptr->is_protected != expected[i].is_protected) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) is_protected actual/expected = %d/%d.\n", tag,
- (int)expected[i].entry_type, (int)expected[i].entry_index,
- (int)(entry_ptr->is_protected), (int)expected[i].is_protected);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) is_protected actual/expected = %d/%d.\n", tag,
+ (int)expected[i].entry_type, (int)expected[i].entry_index,
+ (int)(entry_ptr->is_protected), (int)expected[i].is_protected);
failure_mssg = tmp_msg_buf;
}
}
@@ -2370,11 +2370,11 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (entry_ptr->header.is_protected != expected[i].is_protected) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) header is_protected actual/expected = %d/%d.\n", tag,
- (int)expected[i].entry_type, (int)expected[i].entry_index,
- (int)(entry_ptr->header.is_protected), (int)expected[i].is_protected);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) header is_protected actual/expected = %d/%d.\n", tag,
+ (int)expected[i].entry_type, (int)expected[i].entry_index,
+ (int)(entry_ptr->header.is_protected), (int)expected[i].is_protected);
failure_mssg = tmp_msg_buf;
}
}
@@ -2383,11 +2383,11 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (entry_ptr->is_pinned != expected[i].is_pinned) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) is_pinned actual/expected = %d/%d.\n", tag,
- (int)expected[i].entry_type, (int)expected[i].entry_index,
- (int)(entry_ptr->is_pinned), (int)expected[i].is_pinned);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) is_pinned actual/expected = %d/%d.\n", tag,
+ (int)expected[i].entry_type, (int)expected[i].entry_index,
+ (int)(entry_ptr->is_pinned), (int)expected[i].is_pinned);
failure_mssg = tmp_msg_buf;
}
}
@@ -2396,11 +2396,11 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (entry_ptr->is_corked != expected[i].is_corked) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) is_corked actual/expected = %d/%d.\n", tag,
- (int)expected[i].entry_type, (int)expected[i].entry_index,
- (int)(entry_ptr->is_corked), (int)expected[i].is_corked);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) is_corked actual/expected = %d/%d.\n", tag,
+ (int)expected[i].entry_type, (int)expected[i].entry_index,
+ (int)(entry_ptr->is_corked), (int)expected[i].is_corked);
failure_mssg = tmp_msg_buf;
}
}
@@ -2409,11 +2409,11 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (entry_ptr->header.is_pinned != expected[i].is_pinned) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) header is_pinned actual/expected = %d/%d.\n", tag,
- (int)expected[i].entry_type, (int)expected[i].entry_index,
- (int)(entry_ptr->header.is_pinned), (int)expected[i].is_pinned);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) header is_pinned actual/expected = %d/%d.\n", tag,
+ (int)expected[i].entry_type, (int)expected[i].entry_index,
+ (int)(entry_ptr->header.is_pinned), (int)expected[i].is_pinned);
failure_mssg = tmp_msg_buf;
}
}
@@ -2424,13 +2424,13 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
(entry_ptr->serialized != expected[i].serialized) ||
(entry_ptr->destroyed != expected[i].destroyed)) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d,%d) deserialized = %d(%d), serialized = %d(%d), dest = %d(%d)\n",
- tag, (int)expected[i].entry_type, (int)expected[i].entry_index,
- (int)(entry_ptr->deserialized), (int)(expected[i].deserialized),
- (int)(entry_ptr->serialized), (int)(expected[i].serialized),
- (int)(entry_ptr->destroyed), (int)(expected[i].destroyed));
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d,%d) deserialized = %d(%d), serialized = %d(%d), dest = %d(%d)\n", tag,
+ (int)expected[i].entry_type, (int)expected[i].entry_index,
+ (int)(entry_ptr->deserialized), (int)(expected[i].deserialized),
+ (int)(entry_ptr->serialized), (int)(expected[i].serialized),
+ (int)(entry_ptr->destroyed), (int)(expected[i].destroyed));
failure_mssg = tmp_msg_buf;
}
}
@@ -2440,21 +2440,21 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
/* # of flush dependency parents */
if (pass) {
if (entry_ptr->flush_dep_npar != expected[i].flush_dep_npar) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) flush_dep_npar actual/expected = %u/%u.\n", tag,
- expected[i].entry_type, expected[i].entry_index, entry_ptr->flush_dep_npar,
- expected[i].flush_dep_npar);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) flush_dep_npar actual/expected = %u/%u.\n", tag,
+ expected[i].entry_type, expected[i].entry_index, entry_ptr->flush_dep_npar,
+ expected[i].flush_dep_npar);
failure_mssg = tmp_msg_buf;
} /* end if */
} /* end if */
if ((pass) && (in_cache)) {
if (entry_ptr->header.flush_dep_nparents != expected[i].flush_dep_npar) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) header flush_dep_nparents actual/expected = %u/%u.\n", tag,
- expected[i].entry_type, expected[i].entry_index,
- entry_ptr->header.flush_dep_nparents, expected[i].flush_dep_npar);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) header flush_dep_nparents actual/expected = %u/%u.\n", tag,
+ expected[i].entry_type, expected[i].entry_index,
+ entry_ptr->header.flush_dep_nparents, expected[i].flush_dep_npar);
failure_mssg = tmp_msg_buf;
} /* end if */
} /* end if */
@@ -2464,11 +2464,11 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (pass) {
for (u = 0; u < entry_ptr->flush_dep_npar; u++) {
if (entry_ptr->flush_dep_par_type[u] != expected[i].flush_dep_par_type[u]) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) flush_dep_par_type[%u] actual/expected = %d/%d.\n", tag,
- expected[i].entry_type, expected[i].entry_index, u,
- entry_ptr->flush_dep_par_type[u], expected[i].flush_dep_par_type[u]);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) flush_dep_par_type[%u] actual/expected = %d/%d.\n", tag,
+ expected[i].entry_type, expected[i].entry_index, u,
+ entry_ptr->flush_dep_par_type[u], expected[i].flush_dep_par_type[u]);
failure_mssg = tmp_msg_buf;
} /* end if */
} /* end for */
@@ -2476,11 +2476,11 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (pass) {
for (u = 0; u < entry_ptr->flush_dep_npar; u++) {
if (entry_ptr->flush_dep_par_idx[u] != expected[i].flush_dep_par_idx[u]) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) flush_dep_par_idx[%u] actual/expected = %d/%d.\n", tag,
- expected[i].entry_type, expected[i].entry_index, u,
- entry_ptr->flush_dep_par_idx[u], expected[i].flush_dep_par_idx[u]);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) flush_dep_par_idx[%u] actual/expected = %d/%d.\n", tag,
+ expected[i].entry_type, expected[i].entry_index, u,
+ entry_ptr->flush_dep_par_idx[u], expected[i].flush_dep_par_idx[u]);
failure_mssg = tmp_msg_buf;
} /* end if */
} /* end for */
@@ -2489,41 +2489,41 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
/* # of flush dependency children and dirty children */
if (pass) {
if (entry_ptr->flush_dep_nchd != expected[i].flush_dep_nchd) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) flush_dep_nchd actual/expected = %u/%u.\n", tag,
- expected[i].entry_type, expected[i].entry_index, entry_ptr->flush_dep_nchd,
- expected[i].flush_dep_nchd);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) flush_dep_nchd actual/expected = %u/%u.\n", tag,
+ expected[i].entry_type, expected[i].entry_index, entry_ptr->flush_dep_nchd,
+ expected[i].flush_dep_nchd);
failure_mssg = tmp_msg_buf;
} /* end if */
} /* end if */
if ((pass) && (in_cache)) {
if (entry_ptr->header.flush_dep_nchildren != expected[i].flush_dep_nchd) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) header flush_dep_nchildren actual/expected = %u/%u.\n", tag,
- expected[i].entry_type, expected[i].entry_index,
- entry_ptr->header.flush_dep_nchildren, expected[i].flush_dep_nchd);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) header flush_dep_nchildren actual/expected = %u/%u.\n", tag,
+ expected[i].entry_type, expected[i].entry_index,
+ entry_ptr->header.flush_dep_nchildren, expected[i].flush_dep_nchd);
failure_mssg = tmp_msg_buf;
} /* end if */
} /* end if */
if (pass) {
if (entry_ptr->flush_dep_ndirty_chd != expected[i].flush_dep_ndirty_chd) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) flush_dep_ndirty_chd actual/expected = %u/%u.\n", tag,
- expected[i].entry_type, expected[i].entry_index, entry_ptr->flush_dep_ndirty_chd,
- expected[i].flush_dep_ndirty_chd);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) flush_dep_ndirty_chd actual/expected = %u/%u.\n", tag,
+ expected[i].entry_type, expected[i].entry_index, entry_ptr->flush_dep_ndirty_chd,
+ expected[i].flush_dep_ndirty_chd);
failure_mssg = tmp_msg_buf;
} /* end if */
} /* end if */
if ((pass) && (in_cache)) {
if (entry_ptr->header.flush_dep_ndirty_children != expected[i].flush_dep_ndirty_chd) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) header flush_dep_ndirty_children actual/expected = %u/%u.\n",
- tag, expected[i].entry_type, expected[i].entry_index,
- entry_ptr->header.flush_dep_ndirty_children, expected[i].flush_dep_ndirty_chd);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) header flush_dep_ndirty_children actual/expected = %u/%u.\n", tag,
+ expected[i].entry_type, expected[i].entry_index,
+ entry_ptr->header.flush_dep_ndirty_children, expected[i].flush_dep_ndirty_chd);
failure_mssg = tmp_msg_buf;
} /* end if */
} /* end if */
@@ -2531,11 +2531,11 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
/* Flush dependency flush order */
if (pass) {
if (expected[i].flush_order >= 0 && entry_ptr->flush_order != (unsigned)expected[i].flush_order) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) flush_order actual/expected = %u/%d.\n", tag,
- expected[i].entry_type, expected[i].entry_index, entry_ptr->flush_order,
- expected[i].flush_order);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) flush_order actual/expected = %u/%d.\n", tag,
+ expected[i].entry_type, expected[i].entry_index, entry_ptr->flush_order,
+ expected[i].flush_order);
failure_mssg = tmp_msg_buf;
} /* end if */
} /* end if */
@@ -2549,9 +2549,9 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
* Function: verify_unprotected
*
* Purpose: Verify that no cache entries are marked as protected. If
- * any are, set pass to FALSE.
+ * any are, set pass to false.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -2588,7 +2588,7 @@ verify_unprotected(void)
if (protected_count > 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "verify_unprotected() found protected entry(s).";
}
}
@@ -2639,12 +2639,12 @@ expunge_entry(H5F_t *file_ptr, int32_t type, int32_t idx)
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "error in H5C_expunge_entry().";
}
else {
- entry_ptr->expunged = TRUE;
+ entry_ptr->expunged = true;
}
}
@@ -2662,9 +2662,9 @@ expunge_entry(H5F_t *file_ptr, int32_t type, int32_t idx)
*/
void
-flush_cache(H5F_t *file_ptr, hbool_t destroy_entries, hbool_t dump_stats, hbool_t dump_detailed_stats)
+flush_cache(H5F_t *file_ptr, bool destroy_entries, bool dump_stats, bool dump_detailed_stats)
{
- hbool_t verbose = FALSE;
+ bool verbose = false;
verify_unprotected();
@@ -2699,7 +2699,7 @@ flush_cache(H5F_t *file_ptr, hbool_t destroy_entries, hbool_t dump_stats, hbool_
(long long)(cache_ptr->index_len), (long long)(cache_ptr->index_size),
(long long)(cache_ptr->clean_index_size), (long long)(cache_ptr->dirty_index_size));
}
- pass = FALSE;
+ pass = false;
failure_mssg = "non zero index len/sizes after H5C_flush_cache() with invalidate.";
}
}
@@ -2731,7 +2731,7 @@ cork_entry_type(H5F_t *file_ptr, int32_t type)
baddrs = base_addrs[type];
if (H5C_cork(cache_ptr, baddrs, H5C__SET_CORK, NULL) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "error in H5C_cork().";
} /* end if */
} /* end if */
@@ -2763,7 +2763,7 @@ uncork_entry_type(H5F_t *file_ptr, int32_t type)
baddrs = base_addrs[type];
if (H5C_cork(cache_ptr, baddrs, H5C__UNCORK, NULL) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "error in H5C_cork().";
} /* end if */
} /* end if */
@@ -2787,7 +2787,7 @@ insert_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags)
{
H5C_t *cache_ptr;
herr_t result;
- hbool_t insert_pinned;
+ bool insert_pinned;
test_entry_t *base_addr;
test_entry_t *entry_ptr;
haddr_t baddrs;
@@ -2811,9 +2811,9 @@ insert_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags)
assert(entry_ptr->flush_dep_npar == 0);
assert(entry_ptr->flush_dep_nchd == 0);
- insert_pinned = (hbool_t)((flags & H5C__PIN_ENTRY_FLAG) != 0);
+ insert_pinned = (bool)((flags & H5C__PIN_ENTRY_FLAG) != 0);
- entry_ptr->is_dirty = TRUE;
+ entry_ptr->is_dirty = true;
/* Set the base address of the entry type into the property list as tag */
/* Use to cork entries for the object */
@@ -2824,7 +2824,7 @@ insert_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags)
if ((result < 0) || (entry_ptr->header.is_protected) || (entry_ptr->header.type != types[type]) ||
(entry_ptr->size != entry_ptr->header.size) || (entry_ptr->addr != entry_ptr->header.addr)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "error in H5C_insert().";
#if 0 /* This is useful debugging code. Lets keep it around. */
@@ -2856,7 +2856,7 @@ insert_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags)
entry_ptr->pinned_from_client = insert_pinned;
if (entry_ptr->header.tag_info && entry_ptr->header.tag_info->corked)
- entry_ptr->is_corked = TRUE;
+ entry_ptr->is_corked = true;
assert(entry_ptr->header.is_dirty);
assert(((entry_ptr->header).type)->id == type);
@@ -2869,7 +2869,7 @@ insert_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags)
*
* Purpose: Mark the specified entry as dirty.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -2882,7 +2882,7 @@ mark_entry_dirty(int32_t type, int32_t idx)
herr_t result;
test_entry_t *base_addr;
test_entry_t *entry_ptr;
- hbool_t was_dirty;
+ bool was_dirty;
if (pass) {
@@ -2898,7 +2898,7 @@ mark_entry_dirty(int32_t type, int32_t idx)
assert(entry_ptr->header.is_protected || entry_ptr->header.is_pinned);
was_dirty = entry_ptr->is_dirty;
- entry_ptr->is_dirty = TRUE;
+ entry_ptr->is_dirty = true;
if (entry_ptr->flush_dep_npar > 0 && !was_dirty)
mark_flush_dep_dirty(entry_ptr);
@@ -2911,7 +2911,7 @@ mark_entry_dirty(int32_t type, int32_t idx)
(entry_ptr->header.type != types[type]) || (entry_ptr->size != entry_ptr->header.size) ||
(entry_ptr->addr != entry_ptr->header.addr)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "error in H5C_mark_entry_dirty().";
}
@@ -2933,10 +2933,10 @@ mark_entry_dirty(int32_t type, int32_t idx)
*/
void
-move_entry(H5C_t *cache_ptr, int32_t type, int32_t idx, hbool_t main_addr)
+move_entry(H5C_t *cache_ptr, int32_t type, int32_t idx, bool main_addr)
{
herr_t result = 0;
- hbool_t done = TRUE; /* will set to FALSE if we have work to do */
+ bool done = true; /* will set to false if we have work to do */
haddr_t old_addr = HADDR_UNDEF;
haddr_t new_addr = HADDR_UNDEF;
test_entry_t *base_addr;
@@ -2964,7 +2964,7 @@ move_entry(H5C_t *cache_ptr, int32_t type, int32_t idx, hbool_t main_addr)
assert(entry_ptr->addr == entry_ptr->main_addr);
- done = FALSE;
+ done = false;
old_addr = entry_ptr->addr;
new_addr = entry_ptr->alt_addr;
}
@@ -2974,15 +2974,15 @@ move_entry(H5C_t *cache_ptr, int32_t type, int32_t idx, hbool_t main_addr)
assert(entry_ptr->addr == entry_ptr->alt_addr);
- done = FALSE;
+ done = false;
old_addr = entry_ptr->addr;
new_addr = entry_ptr->main_addr;
}
if (!done) {
- hbool_t was_dirty = entry_ptr->is_dirty;
+ bool was_dirty = entry_ptr->is_dirty;
- entry_ptr->is_dirty = TRUE;
+ entry_ptr->is_dirty = true;
if (entry_ptr->flush_dep_npar > 0 && !was_dirty)
mark_flush_dep_dirty(entry_ptr);
@@ -2997,7 +2997,7 @@ move_entry(H5C_t *cache_ptr, int32_t type, int32_t idx, hbool_t main_addr)
if ((result < 0) ||
((!(entry_ptr->header.destroy_in_progress)) && (entry_ptr->header.addr != new_addr))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "error in H5C_move_entry().";
}
else {
@@ -3020,7 +3020,7 @@ move_entry(H5C_t *cache_ptr, int32_t type, int32_t idx, hbool_t main_addr)
*
* Purpose: Protect the entry indicated by the type and index.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -3088,7 +3088,7 @@ protect_entry(H5F_t *file_ptr, int32_t type, int32_t idx)
entry_ptr->verify_ct, entry_ptr->max_verify_ct);
H5Eprint2(H5E_DEFAULT, stdout);
#endif
- pass = FALSE;
+ pass = false;
failure_mssg = "error in H5C_protect().";
} /* end if */
@@ -3098,12 +3098,12 @@ protect_entry(H5F_t *file_ptr, int32_t type, int32_t idx)
entry_ptr->cache_ptr = cache_ptr;
entry_ptr->file_ptr = file_ptr;
- entry_ptr->is_protected = TRUE;
+ entry_ptr->is_protected = true;
} /* end else */
if (entry_ptr->header.tag_info && entry_ptr->header.tag_info->corked)
- entry_ptr->is_corked = TRUE;
+ entry_ptr->is_corked = true;
assert(((entry_ptr->header).type)->id == type);
} /* end if */
@@ -3116,7 +3116,7 @@ protect_entry(H5F_t *file_ptr, int32_t type, int32_t idx)
* Purpose: Do a read only protect the entry indicated by the type
* and index.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -3155,7 +3155,7 @@ protect_entry_ro(H5F_t *file_ptr, int32_t type, int32_t idx)
(entry_ptr->header.type != types[type]) || (entry_ptr->size != entry_ptr->header.size) ||
(entry_ptr->addr != entry_ptr->header.addr)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "error in read only H5C_protect().";
}
else {
@@ -3164,8 +3164,8 @@ protect_entry_ro(H5F_t *file_ptr, int32_t type, int32_t idx)
entry_ptr->cache_ptr = cache_ptr;
entry_ptr->file_ptr = file_ptr;
- entry_ptr->is_protected = TRUE;
- entry_ptr->is_read_only = TRUE;
+ entry_ptr->is_protected = true;
+ entry_ptr->is_read_only = true;
entry_ptr->ro_ref_count++;
}
@@ -3179,7 +3179,7 @@ protect_entry_ro(H5F_t *file_ptr, int32_t type, int32_t idx)
*
* Purpose: Pin the entry indicated by the type and index.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -3210,18 +3210,18 @@ pin_entry(int32_t type, int32_t idx)
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_pin_protected_entry() reports failure.";
}
else if (!(entry_ptr->header.is_pinned)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "entry not pinned when it should be.";
}
else {
- entry_ptr->pinned_from_client = TRUE;
- entry_ptr->is_pinned = TRUE;
+ entry_ptr->pinned_from_client = true;
+ entry_ptr->is_pinned = true;
}
} /* end if */
@@ -3232,7 +3232,7 @@ pin_entry(int32_t type, int32_t idx)
*
* Purpose: Unpin the entry indicated by the type and index.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -3268,11 +3268,11 @@ unpin_entry(int32_t type, int32_t idx)
(entry_ptr->header.type != types[type]) || (entry_ptr->size != entry_ptr->header.size) ||
(entry_ptr->addr != entry_ptr->header.addr)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "error in H5C_unpin().";
}
- entry_ptr->pinned_from_client = FALSE;
+ entry_ptr->pinned_from_client = false;
entry_ptr->is_pinned = entry_ptr->pinned_from_cache;
@@ -3286,7 +3286,7 @@ unpin_entry(int32_t type, int32_t idx)
*
* Purpose: Unprotect the entry indicated by the type and index.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -3297,8 +3297,8 @@ void
unprotect_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags)
{
herr_t result;
- hbool_t pin_flag_set;
- hbool_t unpin_flag_set;
+ bool pin_flag_set;
+ bool unpin_flag_set;
test_entry_t *base_addr;
test_entry_t *entry_ptr;
@@ -3315,17 +3315,17 @@ unprotect_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags)
assert(entry_ptr->header.is_protected);
assert(entry_ptr->is_protected);
- pin_flag_set = (hbool_t)((flags & H5C__PIN_ENTRY_FLAG) != 0);
- unpin_flag_set = (hbool_t)((flags & H5C__UNPIN_ENTRY_FLAG) != 0);
+ pin_flag_set = (bool)((flags & H5C__PIN_ENTRY_FLAG) != 0);
+ unpin_flag_set = (bool)((flags & H5C__UNPIN_ENTRY_FLAG) != 0);
assert(!(pin_flag_set && unpin_flag_set));
assert((!pin_flag_set) || (!(entry_ptr->is_pinned)));
assert((!unpin_flag_set) || (entry_ptr->is_pinned));
if (flags & H5C__DIRTIED_FLAG) {
- hbool_t was_dirty = entry_ptr->is_dirty;
+ bool was_dirty = entry_ptr->is_dirty;
- entry_ptr->is_dirty = TRUE;
+ entry_ptr->is_dirty = true;
if (entry_ptr->flush_dep_npar > 0 && !was_dirty)
mark_flush_dep_dirty(entry_ptr);
@@ -3339,7 +3339,7 @@ unprotect_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags)
(entry_ptr->header.type != types[type]) || (entry_ptr->size != entry_ptr->header.size) ||
(entry_ptr->addr != entry_ptr->header.addr)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "error in H5C_unprotect().";
}
else {
@@ -3349,25 +3349,25 @@ unprotect_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags)
}
else if (entry_ptr->ro_ref_count == 1) {
- entry_ptr->is_protected = FALSE;
- entry_ptr->is_read_only = FALSE;
+ entry_ptr->is_protected = false;
+ entry_ptr->is_read_only = false;
entry_ptr->ro_ref_count = 0;
}
else {
- entry_ptr->is_protected = FALSE;
+ entry_ptr->is_protected = false;
}
if (pin_flag_set) {
assert(entry_ptr->header.is_pinned);
- entry_ptr->pinned_from_client = TRUE;
- entry_ptr->is_pinned = TRUE;
+ entry_ptr->pinned_from_client = true;
+ entry_ptr->is_pinned = true;
}
else if (unpin_flag_set) {
assert(entry_ptr->header.is_pinned == entry_ptr->header.pinned_from_cache);
- entry_ptr->pinned_from_client = FALSE;
+ entry_ptr->pinned_from_client = false;
entry_ptr->is_pinned = entry_ptr->pinned_from_cache;
}
}
@@ -3399,10 +3399,10 @@ unprotect_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags)
*-------------------------------------------------------------------------
*/
void
-row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t verbose, hbool_t reset_stats,
- hbool_t display_stats, hbool_t display_detailed_stats, hbool_t do_inserts,
- hbool_t do_moves, hbool_t move_to_main_addr, hbool_t do_destroys,
- hbool_t do_mult_ro_protects, int dirty_destroys, int dirty_unprotects)
+row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, bool verbose, bool reset_stats,
+ bool display_stats, bool display_detailed_stats, bool do_inserts, bool do_moves,
+ bool move_to_main_addr, bool do_destroys, bool do_mult_ro_protects, int dirty_destroys,
+ int dirty_unprotects)
{
H5C_t *cache_ptr = NULL;
int32_t type = 0;
@@ -3719,8 +3719,8 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
*/
void
-hl_row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, hbool_t reset_stats,
- hbool_t display_stats, hbool_t display_detailed_stats, hbool_t do_inserts)
+hl_row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, bool verbose, bool reset_stats,
+ bool display_stats, bool display_detailed_stats, bool do_inserts)
{
H5C_t *cache_ptr = NULL;
int32_t type = 0;
@@ -3808,10 +3808,10 @@ hl_row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, h
*/
void
-row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t verbose, hbool_t reset_stats,
- hbool_t display_stats, hbool_t display_detailed_stats, hbool_t do_inserts,
- hbool_t do_moves, hbool_t move_to_main_addr, hbool_t do_destroys,
- hbool_t do_mult_ro_protects, int dirty_destroys, int dirty_unprotects)
+row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, bool verbose, bool reset_stats,
+ bool display_stats, bool display_detailed_stats, bool do_inserts, bool do_moves,
+ bool move_to_main_addr, bool do_destroys, bool do_mult_ro_protects,
+ int dirty_destroys, int dirty_unprotects)
{
H5C_t *cache_ptr = NULL;
int32_t type = NUMBER_OF_ENTRY_TYPES - 1;
@@ -4065,8 +4065,8 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
*/
void
-hl_row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, hbool_t reset_stats,
- hbool_t display_stats, hbool_t display_detailed_stats, hbool_t do_inserts)
+hl_row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, bool verbose, bool reset_stats,
+ bool display_stats, bool display_detailed_stats, bool do_inserts)
{
H5C_t *cache_ptr = NULL;
int32_t type = NUMBER_OF_ENTRY_TYPES - 1;
@@ -4154,9 +4154,8 @@ hl_row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose,
*/
void
-col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t verbose, hbool_t reset_stats,
- hbool_t display_stats, hbool_t display_detailed_stats, hbool_t do_inserts,
- int dirty_unprotects)
+col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, bool verbose, bool reset_stats,
+ bool display_stats, bool display_detailed_stats, bool do_inserts, int dirty_unprotects)
{
H5C_t *cache_ptr = NULL;
int32_t type = 0;
@@ -4243,8 +4242,8 @@ col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
*/
void
-hl_col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, hbool_t reset_stats,
- hbool_t display_stats, hbool_t display_detailed_stats, hbool_t do_inserts,
+hl_col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, bool verbose, bool reset_stats,
+ bool display_stats, bool display_detailed_stats, bool do_inserts,
int dirty_unprotects)
{
H5C_t *cache_ptr = NULL;
@@ -4343,8 +4342,8 @@ hl_col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, h
*/
void
-col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t verbose, hbool_t reset_stats,
- hbool_t display_stats, hbool_t display_detailed_stats, hbool_t do_inserts,
+col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, bool verbose, bool reset_stats,
+ bool display_stats, bool display_detailed_stats, bool do_inserts,
int dirty_unprotects)
{
H5C_t *cache_ptr = NULL;
@@ -4444,8 +4443,8 @@ col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
*/
void
-hl_col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, hbool_t reset_stats,
- hbool_t display_stats, hbool_t display_detailed_stats, hbool_t do_inserts,
+hl_col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, bool verbose, bool reset_stats,
+ bool display_stats, bool display_detailed_stats, bool do_inserts,
int dirty_unprotects)
{
H5C_t *cache_ptr = NULL;
@@ -4556,7 +4555,7 @@ create_flush_dependency(int32_t par_type, int32_t par_idx, int32_t chd_type, int
test_entry_t *par_entry_ptr; /* Parent entry */
test_entry_t *chd_base_addr; /* Base entry of child's entry array */
test_entry_t *chd_entry_ptr; /* Child entry */
- hbool_t par_is_pinned; /* Whether parent is already pinned */
+ bool par_is_pinned; /* Whether parent is already pinned */
herr_t result; /* API routine status */
/* Get parent entry */
@@ -4584,7 +4583,7 @@ create_flush_dependency(int32_t par_type, int32_t par_idx, int32_t chd_type, int
if ((result < 0) || (!par_entry_ptr->header.is_pinned) ||
(!(par_entry_ptr->header.flush_dep_nchildren > 0))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "error in H5C_create_flush_dependency().";
} /* end if */
@@ -4598,9 +4597,9 @@ create_flush_dependency(int32_t par_type, int32_t par_idx, int32_t chd_type, int
assert(par_entry_ptr->flush_dep_ndirty_chd < par_entry_ptr->flush_dep_nchd);
par_entry_ptr->flush_dep_ndirty_chd++;
} /* end if */
- par_entry_ptr->pinned_from_cache = TRUE;
+ par_entry_ptr->pinned_from_cache = true;
if (!par_is_pinned)
- par_entry_ptr->is_pinned = TRUE;
+ par_entry_ptr->is_pinned = true;
} /* end if */
} /* create_flush_dependency() */
@@ -4652,7 +4651,7 @@ destroy_flush_dependency(int32_t par_type, int32_t par_idx, int32_t chd_type, in
assert(chd_entry_ptr == chd_entry_ptr->self);
if (H5C_destroy_flush_dependency(par_entry_ptr, chd_entry_ptr) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "error in H5C_destroy_flush_dependency().";
} /* end if */
@@ -4671,7 +4670,7 @@ destroy_flush_dependency(int32_t par_type, int32_t par_idx, int32_t chd_type, in
chd_entry_ptr->flush_dep_npar--;
par_entry_ptr->flush_dep_nchd--;
if (par_entry_ptr->flush_dep_nchd == 0) {
- par_entry_ptr->pinned_from_cache = FALSE;
+ par_entry_ptr->pinned_from_cache = false;
par_entry_ptr->is_pinned = par_entry_ptr->pinned_from_client;
} /* end if */
if (chd_entry_ptr->is_dirty || chd_entry_ptr->flush_dep_ndirty_chd > 0) {
@@ -4771,13 +4770,13 @@ mark_flush_dep_clean(test_entry_t *entry_ptr)
*
* If the number of cache accesses exceeds the value provided
* in the min_accesses parameter, and the hit rate is less than
- * min_hit_rate, set pass to FALSE, and set failure_mssg to
+ * min_hit_rate, set pass to false, and set failure_mssg to
* a string indicating that hit rate was unexpectedly low.
*
* Return hit rate in *hit_rate_ptr, and print the data to
* stdout if requested.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to an appropriate value.
*
* Return: void
@@ -4786,8 +4785,8 @@ mark_flush_dep_clean(test_entry_t *entry_ptr)
*/
void
-check_and_validate_cache_hit_rate(hid_t file_id, double *hit_rate_ptr, hbool_t dump_data,
- int64_t min_accesses, double min_hit_rate)
+check_and_validate_cache_hit_rate(hid_t file_id, double *hit_rate_ptr, bool dump_data, int64_t min_accesses,
+ double min_hit_rate)
{
herr_t result;
int64_t cache_hits = 0;
@@ -4804,14 +4803,14 @@ check_and_validate_cache_hit_rate(hid_t file_id, double *hit_rate_ptr, hbool_t d
if (file_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Can't get file_ptr.";
}
else {
cache_ptr = file_ptr->shared->cache;
if (NULL == cache_ptr) {
- pass = FALSE;
+ pass = false;
failure_mssg = "NULL cache pointer";
}
}
@@ -4836,12 +4835,12 @@ check_and_validate_cache_hit_rate(hid_t file_id, double *hit_rate_ptr, hbool_t d
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fget_mdc_hit_rate() failed.";
}
else if (!H5_DBL_ABS_EQUAL(hit_rate, expected_hit_rate)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected hit rate.";
}
}
@@ -4852,7 +4851,7 @@ check_and_validate_cache_hit_rate(hid_t file_id, double *hit_rate_ptr, hbool_t d
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Freset_mdc_hit_rate_stats() failed.";
}
}
@@ -4872,7 +4871,7 @@ check_and_validate_cache_hit_rate(hid_t file_id, double *hit_rate_ptr, hbool_t d
if ((pass) && (cache_accesses > min_accesses) && (hit_rate < min_hit_rate)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpectedly low hit rate.";
}
@@ -4889,7 +4888,7 @@ check_and_validate_cache_hit_rate(hid_t file_id, double *hit_rate_ptr, hbool_t d
* parameters if these parameters are not NULL. Print the
* data to stdout if requested.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to an appropriate value.
*
* Return: void
@@ -4899,7 +4898,7 @@ check_and_validate_cache_hit_rate(hid_t file_id, double *hit_rate_ptr, hbool_t d
void
check_and_validate_cache_size(hid_t file_id, size_t *max_size_ptr, size_t *min_clean_size_ptr,
- size_t *cur_size_ptr, int32_t *cur_num_entries_ptr, hbool_t dump_data)
+ size_t *cur_size_ptr, int32_t *cur_num_entries_ptr, bool dump_data)
{
herr_t result;
size_t expected_max_size;
@@ -4920,14 +4919,14 @@ check_and_validate_cache_size(hid_t file_id, size_t *max_size_ptr, size_t *min_c
if (file_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Can't get file_ptr.";
}
else {
cache_ptr = file_ptr->shared->cache;
if (NULL == cache_ptr) {
- pass = FALSE;
+ pass = false;
failure_mssg = "NULL cache pointer";
}
}
@@ -4945,13 +4944,13 @@ check_and_validate_cache_size(hid_t file_id, size_t *max_size_ptr, size_t *min_c
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fget_mdc_size() failed.";
}
else if ((max_size != expected_max_size) || (min_clean_size != expected_min_clean_size) ||
(cur_size != expected_cur_size) || (cur_num_entries != (int)expected_cur_num_entries)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fget_mdc_size() returned unexpected value(s).";
}
}
@@ -4986,58 +4985,58 @@ check_and_validate_cache_size(hid_t file_id, size_t *max_size_ptr, size_t *min_c
} /* check_and_validate_cache_size() */
-H5_ATTR_PURE hbool_t
-resize_configs_are_equal(const H5C_auto_size_ctl_t *a, const H5C_auto_size_ctl_t *b, hbool_t compare_init)
+H5_ATTR_PURE bool
+resize_configs_are_equal(const H5C_auto_size_ctl_t *a, const H5C_auto_size_ctl_t *b, bool compare_init)
{
if (a->version != b->version)
- return (FALSE);
+ return (false);
else if (a->rpt_fcn != b->rpt_fcn)
- return (FALSE);
+ return (false);
else if (compare_init && (a->set_initial_size != b->set_initial_size))
- return (FALSE);
+ return (false);
else if (compare_init && (a->initial_size != b->initial_size))
- return (FALSE);
+ return (false);
else if (!H5_DBL_ABS_EQUAL(a->min_clean_fraction, b->min_clean_fraction))
- return (FALSE);
+ return (false);
else if (a->max_size != b->max_size)
- return (FALSE);
+ return (false);
else if (a->min_size != b->min_size)
- return (FALSE);
+ return (false);
else if (a->epoch_length != b->epoch_length)
- return (FALSE);
+ return (false);
else if (a->incr_mode != b->incr_mode)
- return (FALSE);
+ return (false);
else if (!H5_DBL_ABS_EQUAL(a->lower_hr_threshold, b->lower_hr_threshold))
- return (FALSE);
+ return (false);
else if (!H5_DBL_ABS_EQUAL(a->increment, b->increment))
- return (FALSE);
+ return (false);
else if (a->apply_max_increment != b->apply_max_increment)
- return (FALSE);
+ return (false);
else if (a->max_increment != b->max_increment)
- return (FALSE);
+ return (false);
else if (a->flash_incr_mode != b->flash_incr_mode)
- return (FALSE);
+ return (false);
else if (!H5_DBL_ABS_EQUAL(a->flash_multiple, b->flash_multiple))
- return (FALSE);
+ return (false);
else if (!H5_DBL_ABS_EQUAL(a->flash_threshold, b->flash_threshold))
- return (FALSE);
+ return (false);
else if (a->decr_mode != b->decr_mode)
- return (FALSE);
+ return (false);
else if (!H5_DBL_ABS_EQUAL(a->upper_hr_threshold, b->upper_hr_threshold))
- return (FALSE);
+ return (false);
else if (!H5_DBL_ABS_EQUAL(a->decrement, b->decrement))
- return (FALSE);
+ return (false);
else if (a->apply_max_decrement != b->apply_max_decrement)
- return (FALSE);
+ return (false);
else if (a->max_decrement != b->max_decrement)
- return (FALSE);
+ return (false);
else if (a->epochs_before_eviction != b->epochs_before_eviction)
- return (FALSE);
+ return (false);
else if (a->apply_empty_reserve != b->apply_empty_reserve)
- return (FALSE);
+ return (false);
else if (!H5_DBL_ABS_EQUAL(a->empty_reserve, b->empty_reserve))
- return (FALSE);
- return (TRUE);
+ return (false);
+ return (true);
}
/*-------------------------------------------------------------------------
@@ -5047,7 +5046,7 @@ resize_configs_are_equal(const H5C_auto_size_ctl_t *a, const H5C_auto_size_ctl_t
* has both internal and external configuration matching
* *config_ptr.
*
- * Do nothing on success. On failure, set pass to FALSE, and
+ * Do nothing on success. On failure, set pass to false, and
* load an error message into failue_mssg. Note that
* failure_msg is assumed to be at least 128 bytes in length.
*
@@ -5057,7 +5056,7 @@ resize_configs_are_equal(const H5C_auto_size_ctl_t *a, const H5C_auto_size_ctl_t
*/
void
-validate_mdc_config(hid_t file_id, H5AC_cache_config_t *ext_config_ptr, hbool_t compare_init, int test_num)
+validate_mdc_config(hid_t file_id, H5AC_cache_config_t *ext_config_ptr, bool compare_init, int test_num)
{
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
@@ -5073,8 +5072,8 @@ validate_mdc_config(hid_t file_id, H5AC_cache_config_t *ext_config_ptr, hbool_t
if (file_ptr == NULL) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf), "Can't get file_ptr #%d.", test_num);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf), "Can't get file_ptr #%d.", test_num);
failure_mssg = tmp_msg_buf;
}
else {
@@ -5088,8 +5087,8 @@ validate_mdc_config(hid_t file_id, H5AC_cache_config_t *ext_config_ptr, hbool_t
if (cache_ptr == NULL || cache_ptr->resize_ctl.version != H5C__CURR_AUTO_SIZE_CTL_VER) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf), "Can't access cache resize_ctl #%d.", test_num);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf), "Can't access cache resize_ctl #%d.", test_num);
failure_mssg = tmp_msg_buf;
}
}
@@ -5099,8 +5098,8 @@ validate_mdc_config(hid_t file_id, H5AC_cache_config_t *ext_config_ptr, hbool_t
if (!resize_configs_are_equal(&int_config, &cache_ptr->resize_ctl, compare_init)) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf), "Unexpected internal config #%d.", test_num);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf), "Unexpected internal config #%d.", test_num);
failure_mssg = tmp_msg_buf;
}
}
@@ -5112,8 +5111,8 @@ validate_mdc_config(hid_t file_id, H5AC_cache_config_t *ext_config_ptr, hbool_t
if (H5Fget_mdc_config(file_id, &scratch) < 0) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf), "H5Fget_mdc_config() failed #%d.", test_num);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf), "H5Fget_mdc_config() failed #%d.", test_num);
failure_mssg = tmp_msg_buf;
}
}
@@ -5122,7 +5121,7 @@ validate_mdc_config(hid_t file_id, H5AC_cache_config_t *ext_config_ptr, hbool_t
/* Recall that in any configuration supplied by the cache
* at run time, the set_initial_size field will always
- * be FALSE, regardless of the value passed in. Thus we
+ * be false, regardless of the value passed in. Thus we
* always presume that this field need not match that of
* the supplied external configuration.
*
@@ -5131,10 +5130,10 @@ validate_mdc_config(hid_t file_id, H5AC_cache_config_t *ext_config_ptr, hbool_t
* Depending on circumstances, this may or may not match
* the original. Hence the compare_init parameter.
*/
- if (!CACHE_CONFIGS_EQUAL((*ext_config_ptr), scratch, FALSE, compare_init)) {
+ if (!CACHE_CONFIGS_EQUAL((*ext_config_ptr), scratch, false, compare_init)) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf), "Unexpected external config #%d.", test_num);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf), "Unexpected external config #%d.", test_num);
failure_mssg = tmp_msg_buf;
}
}
diff --git a/test/cache_common.h b/test/cache_common.h
index 8c54b5c855e..a9a8dbb45a9 100644
--- a/test/cache_common.h
+++ b/test/cache_common.h
@@ -35,7 +35,7 @@
#define CACHE_ERROR(s) \
{ \
failure_mssg = "Line #" H5_TOSTRING(__LINE__) ": " s; \
- pass = FALSE; \
+ pass = false; \
goto done; \
}
@@ -131,7 +131,7 @@
* H5C__FLUSH_MARKED_ENTRIES_FLAG). Compute clear_slist
* and pass it into H5C_set_slist_enabled as appropriate.
*
- * On error, set pass to FALSE, and set failure_mssg
+ * On error, set pass to false, and set failure_mssg
* to the supplied error message.
*
* Return: N/A
@@ -140,12 +140,12 @@
#define H5C_FLUSH_CACHE(file, flags, fail_mssg) \
{ \
- hbool_t clear_slist; \
- herr_t rslt; \
+ bool clear_slist; \
+ herr_t rslt; \
\
clear_slist = ((flags & H5C__FLUSH_MARKED_ENTRIES_FLAG) != 0); \
\
- rslt = H5C_set_slist_enabled((file)->shared->cache, TRUE, FALSE); \
+ rslt = H5C_set_slist_enabled((file)->shared->cache, true, false); \
\
if (rslt >= 0) { \
\
@@ -154,12 +154,12 @@
\
if (rslt >= 0) { \
\
- rslt = H5C_set_slist_enabled((file)->shared->cache, FALSE, clear_slist); \
+ rslt = H5C_set_slist_enabled((file)->shared->cache, false, clear_slist); \
} \
\
if (rslt < 0) { \
\
- pass = FALSE; \
+ pass = false; \
failure_mssg = (fail_mssg); \
} \
} /* H5C_FLUSH_CACHE */
@@ -211,25 +211,25 @@ typedef struct flush_op {
* function implementing the flush
* operation.
*/
- hbool_t flag; /* boolean flag passed into the
+ bool flag; /* boolean flag passed into the
* function implementing the flush
* operation. The meaning of the
* flag is dependent upon the flush
* operation:
*
- * FLUSH_OP__DIRTY: TRUE iff the
+ * FLUSH_OP__DIRTY: true iff the
* target is pinned, and is to
* be dirtied via the
* H5C_mark_entry_dirty()
* call.
*
- * FLUSH_OP__RESIZE: TRUE iff the
+ * FLUSH_OP__RESIZE: true iff the
* target is pinned, and is to
* be resized via the
* H5C_resize_entry()
* call.
*
- * FLUSH_OP__MOVE: TRUE iff the
+ * FLUSH_OP__MOVE: true iff the
* target is to be moved to
* its main address.
*/
@@ -264,7 +264,7 @@ typedef struct test_entry_t {
* the entry resides, or NULL if the
* entry is not in cache.
*/
- hbool_t written_to_main_addr;
+ bool written_to_main_addr;
/* Flag indicating whether an image
* of the entry has been written to
* its main address. Since we no
@@ -273,7 +273,7 @@ typedef struct test_entry_t {
* entry is serialized while at its
* main address.
*/
- hbool_t written_to_alt_addr;
+ bool written_to_alt_addr;
/* Flag indicating whether an image
* of the entry has been written to
* its alternate address. Since we no
@@ -285,7 +285,7 @@ typedef struct test_entry_t {
haddr_t addr; /* where the cache thinks this entry
* is located
*/
- hbool_t at_main_addr; /* boolean flag indicating whether
+ bool at_main_addr; /* boolean flag indicating whether
* the entry is supposed to be at
* either its main or alternate
* address.
@@ -309,23 +309,23 @@ typedef struct test_entry_t {
int32_t deserializes; /* number of times this entry has
* been deserialized
*/
- hbool_t is_dirty; /* entry has been modified since
+ bool is_dirty; /* entry has been modified since
* last write
*/
- hbool_t is_protected; /* entry should currently be on
+ bool is_protected; /* entry should currently be on
* the cache's protected list.
*/
- hbool_t is_read_only; /* TRUE iff the entry should be
+ bool is_read_only; /* true iff the entry should be
* protected read only.
*/
int ro_ref_count; /* Number of outstanding read only
* protects on the entry.
*/
- hbool_t is_pinned; /* entry is currently pinned in
+ bool is_pinned; /* entry is currently pinned in
* the cache.
*/
haddr_t tag; /* the base_addr as tag for corking entries */
- hbool_t is_corked; /* entry is currently corked or not */
+ bool is_corked; /* entry is currently corked or not */
int pinning_ref_count; /* Number of entries that
* pin this entry in the cache.
* When this count drops to zero,
@@ -358,8 +358,8 @@ typedef struct test_entry_t {
* num_flush_ops contains the number
* of valid entries in this array.
*/
- hbool_t flush_op_self_resize_in_progress; /* Boolean flag
- * that is set to TRUE iff this
+ bool flush_op_self_resize_in_progress; /* Boolean flag
+ * that is set to true iff this
* entry is being flushed, it has
* been resized by a resize flush
* op, and the flush function has
@@ -368,16 +368,16 @@ typedef struct test_entry_t {
* checking code that would otherwise
* cause a false test failure.
*/
- hbool_t deserialized; /* entry has been deserialized since
+ bool deserialized; /* entry has been deserialized since
* the last time it was reset.
*/
- hbool_t serialized; /* entry has been serialized since the
+ bool serialized; /* entry has been serialized since the
* last time it was reset.
*/
- hbool_t destroyed; /* entry has been destroyed since the
+ bool destroyed; /* entry has been destroyed since the
* last time it was reset.
*/
- hbool_t expunged; /* entry has been expunged since the
+ bool expunged; /* entry has been expunged since the
* last time it was reset.
*/
int flush_dep_par_type[MAX_FLUSH_DEP_PARS]; /* Entry types of flush dependency parents */
@@ -385,10 +385,10 @@ typedef struct test_entry_t {
unsigned flush_dep_npar; /* Number of flush dependency parents */
unsigned flush_dep_nchd; /* Number of flush dependency children */
unsigned
- flush_dep_ndirty_chd; /* Number of dirty flush dependency children (including grandchildren, etc.) */
- hbool_t pinned_from_client; /* entry was pinned by client call */
- hbool_t pinned_from_cache; /* entry was pinned by cache internally */
- unsigned flush_order; /* Order that entry was flushed in */
+ flush_dep_ndirty_chd; /* Number of dirty flush dependency children (including grandchildren, etc.) */
+ bool pinned_from_client; /* entry was pinned by client call */
+ bool pinned_from_cache; /* entry was pinned by cache internally */
+ unsigned flush_order; /* Order that entry was flushed in */
unsigned notify_after_insert_count; /* Count of times that entry was inserted in cache */
unsigned notify_before_evict_count; /* Count of times that entry was removed in cache */
@@ -443,7 +443,7 @@ typedef struct test_entry_t {
#define CACHE_CONFIGS_EQUAL(a, b, cmp_set_init, cmp_init_size) \
(((a).version == (b).version) && ((a).rpt_fcn_enabled == (b).rpt_fcn_enabled) && \
((a).open_trace_file == (b).open_trace_file) && ((a).close_trace_file == (b).close_trace_file) && \
- (((a).open_trace_file == FALSE) || (strcmp((a).trace_file_name, (b).trace_file_name) == 0)) && \
+ (((a).open_trace_file == false) || (strcmp((a).trace_file_name, (b).trace_file_name) == 0)) && \
((a).evictions_enabled == (b).evictions_enabled) && \
((!cmp_set_init) || ((a).set_initial_size == (b).set_initial_size)) && \
((!cmp_init_size) || ((a).initial_size == (b).initial_size)) && \
@@ -502,14 +502,14 @@ struct expected_entry_status {
int entry_type;
int entry_index;
size_t size;
- hbool_t in_cache;
- hbool_t at_main_addr;
- hbool_t is_dirty;
- hbool_t is_protected;
- hbool_t is_pinned;
- hbool_t deserialized;
- hbool_t serialized;
- hbool_t destroyed;
+ bool in_cache;
+ bool at_main_addr;
+ bool is_dirty;
+ bool is_protected;
+ bool is_pinned;
+ bool deserialized;
+ bool serialized;
+ bool destroyed;
int flush_dep_par_type[MAX_FLUSH_DEP_PARS]; /* Entry types of flush dependency parents */
int flush_dep_par_idx[MAX_FLUSH_DEP_PARS]; /* Indices of flush dependency parents */
unsigned flush_dep_npar; /* Number of flush dependency parents */
@@ -520,7 +520,7 @@ struct expected_entry_status {
};
/* global variable externs: */
-H5TEST_DLLVAR hbool_t pass; /* set to false on error */
+H5TEST_DLLVAR bool pass; /* set to false on error */
H5TEST_DLLVAR const char *failure_mssg;
H5TEST_DLLVAR test_entry_t *entries[NUMBER_OF_ENTRY_TYPES];
@@ -539,12 +539,12 @@ extern "C" {
/* function declarations: */
-H5TEST_DLL void add_flush_op(int target_type, int target_idx, int op_code, int type, int idx, hbool_t flag,
+H5TEST_DLL void add_flush_op(int target_type, int target_idx, int op_code, int type, int idx, bool flag,
size_t size, unsigned *order);
H5TEST_DLL void addr_to_type_and_index(haddr_t addr, int32_t *type_ptr, int32_t *index_ptr);
-H5TEST_DLL void dirty_entry(H5F_t *file_ptr, int32_t type, int32_t idx, hbool_t dirty_pin);
+H5TEST_DLL void dirty_entry(H5F_t *file_ptr, int32_t type, int32_t idx, bool dirty_pin);
H5TEST_DLL void expunge_entry(H5F_t *file_ptr, int32_t type, int32_t idx);
@@ -552,7 +552,7 @@ H5TEST_DLL void insert_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigne
H5TEST_DLL void mark_entry_dirty(int32_t type, int32_t idx);
-H5TEST_DLL void move_entry(H5C_t *cache_ptr, int32_t type, int32_t idx, hbool_t main_addr);
+H5TEST_DLL void move_entry(H5C_t *cache_ptr, int32_t type, int32_t idx, bool main_addr);
H5TEST_DLL void protect_entry(H5F_t *file_ptr, int32_t type, int32_t idx);
@@ -560,7 +560,7 @@ H5TEST_DLL void protect_entry_ro(H5F_t *file_ptr, int32_t type, int32_t idx);
H5TEST_DLL void pin_entry(int32_t type, int32_t idx);
-H5TEST_DLL hbool_t entry_in_cache(H5C_t *cache_ptr, int32_t type, int32_t idx);
+H5TEST_DLL bool entry_in_cache(H5C_t *cache_ptr, int32_t type, int32_t idx);
H5TEST_DLL void create_pinned_entry_dependency(H5F_t *file_ptr, int pinning_type, int pinning_idx,
int pinned_type, int pinned_idx);
@@ -575,51 +575,43 @@ H5TEST_DLL void cork_entry_type(H5F_t *file_ptr, int32_t type);
H5TEST_DLL void uncork_entry_type(H5F_t *file_ptr, int32_t type);
-H5TEST_DLL void resize_entry(H5F_t *file_ptr, int32_t type, int32_t idx, size_t new_size, hbool_t in_cache);
+H5TEST_DLL void resize_entry(H5F_t *file_ptr, int32_t type, int32_t idx, size_t new_size, bool in_cache);
-H5TEST_DLL void row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t verbose,
- hbool_t reset_stats, hbool_t display_stats,
- hbool_t display_detailed_stats, hbool_t do_inserts, hbool_t do_moves,
- hbool_t move_to_main_addr, hbool_t do_destroys,
- hbool_t do_mult_ro_protects, int dirty_destroys, int dirty_unprotects);
+H5TEST_DLL void row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, bool verbose,
+ bool reset_stats, bool display_stats, bool display_detailed_stats,
+ bool do_inserts, bool do_moves, bool move_to_main_addr,
+ bool do_destroys, bool do_mult_ro_protects, int dirty_destroys,
+ int dirty_unprotects);
-H5TEST_DLL void hl_row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose,
- hbool_t reset_stats, hbool_t display_stats,
- hbool_t display_detailed_stats, hbool_t do_inserts);
+H5TEST_DLL void hl_row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, bool verbose, bool reset_stats,
+ bool display_stats, bool display_detailed_stats, bool do_inserts);
-H5TEST_DLL void row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t verbose,
- hbool_t reset_stats, hbool_t display_stats,
- hbool_t display_detailed_stats, hbool_t do_inserts, hbool_t do_moves,
- hbool_t move_to_main_addr, hbool_t do_destroys,
- hbool_t do_mult_ro_protects, int dirty_destroys,
+H5TEST_DLL void row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, bool verbose,
+ bool reset_stats, bool display_stats, bool display_detailed_stats,
+ bool do_inserts, bool do_moves, bool move_to_main_addr,
+ bool do_destroys, bool do_mult_ro_protects, int dirty_destroys,
int dirty_unprotects);
-H5TEST_DLL void hl_row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose,
- hbool_t reset_stats, hbool_t display_stats,
- hbool_t display_detailed_stats, hbool_t do_inserts);
+H5TEST_DLL void hl_row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, bool verbose, bool reset_stats,
+ bool display_stats, bool display_detailed_stats, bool do_inserts);
-H5TEST_DLL void col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t verbose,
- hbool_t reset_stats, hbool_t display_stats,
- hbool_t display_detailed_stats, hbool_t do_inserts,
- int dirty_unprotects);
+H5TEST_DLL void col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, bool verbose,
+ bool reset_stats, bool display_stats, bool display_detailed_stats,
+ bool do_inserts, int dirty_unprotects);
-H5TEST_DLL void hl_col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose,
- hbool_t reset_stats, hbool_t display_stats,
- hbool_t display_detailed_stats, hbool_t do_inserts,
+H5TEST_DLL void hl_col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, bool verbose, bool reset_stats,
+ bool display_stats, bool display_detailed_stats, bool do_inserts,
int dirty_unprotects);
-H5TEST_DLL void col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t verbose,
- hbool_t reset_stats, hbool_t display_stats,
- hbool_t display_detailed_stats, hbool_t do_inserts,
- int dirty_unprotects);
+H5TEST_DLL void col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, bool verbose,
+ bool reset_stats, bool display_stats, bool display_detailed_stats,
+ bool do_inserts, int dirty_unprotects);
-H5TEST_DLL void hl_col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose,
- hbool_t reset_stats, hbool_t display_stats,
- hbool_t display_detailed_stats, hbool_t do_inserts,
+H5TEST_DLL void hl_col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, bool verbose, bool reset_stats,
+ bool display_stats, bool display_detailed_stats, bool do_inserts,
int dirty_unprotects);
-H5TEST_DLL void flush_cache(H5F_t *file_ptr, hbool_t destroy_entries, hbool_t dump_stats,
- hbool_t dump_detailed_stats);
+H5TEST_DLL void flush_cache(H5F_t *file_ptr, bool destroy_entries, bool dump_stats, bool dump_detailed_stats);
H5TEST_DLL void unpin_entry(int32_t type, int32_t idx);
@@ -640,17 +632,17 @@ H5TEST_DLL void destroy_flush_dependency(int32_t parent_type, int32_t parent_idx
/*** H5AC level utility functions ***/
-H5TEST_DLL hbool_t resize_configs_are_equal(const H5C_auto_size_ctl_t *a, const H5C_auto_size_ctl_t *b,
- hbool_t compare_init);
+H5TEST_DLL bool resize_configs_are_equal(const H5C_auto_size_ctl_t *a, const H5C_auto_size_ctl_t *b,
+ bool compare_init);
-H5TEST_DLL void check_and_validate_cache_hit_rate(hid_t file_id, double *hit_rate_ptr, hbool_t dump_data,
+H5TEST_DLL void check_and_validate_cache_hit_rate(hid_t file_id, double *hit_rate_ptr, bool dump_data,
int64_t min_accesses, double min_hit_rate);
H5TEST_DLL void check_and_validate_cache_size(hid_t file_id, size_t *max_size_ptr, size_t *min_clean_size_ptr,
size_t *cur_size_ptr, int32_t *cur_num_entries_ptr,
- hbool_t dump_data);
+ bool dump_data);
-H5TEST_DLL void validate_mdc_config(hid_t file_id, H5AC_cache_config_t *ext_config_ptr, hbool_t compare_init,
+H5TEST_DLL void validate_mdc_config(hid_t file_id, H5AC_cache_config_t *ext_config_ptr, bool compare_init,
int test_num);
/** Debugging functions -- normally commented out ***/
diff --git a/test/cache_image.c b/test/cache_image.c
index 2e95a97baa1..60e23984366 100644
--- a/test/cache_image.c
+++ b/test/cache_image.c
@@ -24,36 +24,35 @@ static const char *FILENAMES[] = {"cache_image_test", NULL};
/* local utility function declarations */
static void create_datasets(hid_t file_id, int min_dset, int max_dset);
static void delete_datasets(hid_t file_id, int min_dset, int max_dset);
-static void open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_only,
- hbool_t set_mdci_fapl, hbool_t config_fsm, hbool_t set_eoc,
- const char *hdf_file_name, unsigned cache_image_flags, hid_t *file_id_ptr,
- H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr);
-static void attempt_swmr_open_hdf5_file(hbool_t create_file, hbool_t set_mdci_fapl,
- const char *hdf_file_name);
+static void open_hdf5_file(bool create_file, bool mdci_sbem_expected, bool read_only, bool set_mdci_fapl,
+ bool config_fsm, bool set_eoc, const char *hdf_file_name,
+ unsigned cache_image_flags, hid_t *file_id_ptr, H5F_t **file_ptr_ptr,
+ H5C_t **cache_ptr_ptr);
+static void attempt_swmr_open_hdf5_file(bool create_file, bool set_mdci_fapl, const char *hdf_file_name);
static void verify_datasets(hid_t file_id, int min_dset, int max_dset);
/* local test function declarations */
-static unsigned check_cache_image_ctl_flow_1(hbool_t single_file_vfd);
-static unsigned check_cache_image_ctl_flow_2(hbool_t single_file_vfd);
-static unsigned check_cache_image_ctl_flow_3(hbool_t single_file_vfd);
-static unsigned check_cache_image_ctl_flow_4(hbool_t single_file_vfd);
-static unsigned check_cache_image_ctl_flow_5(hbool_t single_file_vfd);
-static unsigned check_cache_image_ctl_flow_6(hbool_t single_file_vfd);
-
-static unsigned cache_image_smoke_check_1(hbool_t single_file_vfd);
-static unsigned cache_image_smoke_check_2(hbool_t single_file_vfd);
-static unsigned cache_image_smoke_check_3(hbool_t single_file_vfd);
-static unsigned cache_image_smoke_check_4(hbool_t single_file_vfd);
-static unsigned cache_image_smoke_check_5(hbool_t single_file_vfd);
-static unsigned cache_image_smoke_check_6(hbool_t single_file_vfd);
-
-static unsigned cache_image_api_error_check_1(hbool_t single_file_vfd);
-static unsigned cache_image_api_error_check_2(hbool_t single_file_vfd);
-static unsigned cache_image_api_error_check_3(hbool_t single_file_vfd);
-static unsigned cache_image_api_error_check_4(hbool_t single_file_vfd);
-
-static unsigned get_free_sections_test(hbool_t single_file_vfd);
-static unsigned evict_on_close_test(hbool_t single_file_vfd);
+static unsigned check_cache_image_ctl_flow_1(bool single_file_vfd);
+static unsigned check_cache_image_ctl_flow_2(bool single_file_vfd);
+static unsigned check_cache_image_ctl_flow_3(bool single_file_vfd);
+static unsigned check_cache_image_ctl_flow_4(bool single_file_vfd);
+static unsigned check_cache_image_ctl_flow_5(bool single_file_vfd);
+static unsigned check_cache_image_ctl_flow_6(bool single_file_vfd);
+
+static unsigned cache_image_smoke_check_1(bool single_file_vfd);
+static unsigned cache_image_smoke_check_2(bool single_file_vfd);
+static unsigned cache_image_smoke_check_3(bool single_file_vfd);
+static unsigned cache_image_smoke_check_4(bool single_file_vfd);
+static unsigned cache_image_smoke_check_5(bool single_file_vfd);
+static unsigned cache_image_smoke_check_6(bool single_file_vfd);
+
+static unsigned cache_image_api_error_check_1(bool single_file_vfd);
+static unsigned cache_image_api_error_check_2(bool single_file_vfd);
+static unsigned cache_image_api_error_check_3(bool single_file_vfd);
+static unsigned cache_image_api_error_check_4(bool single_file_vfd);
+
+static unsigned get_free_sections_test(bool single_file_vfd);
+static unsigned evict_on_close_test(bool single_file_vfd);
/****************************************************************************/
/***************************** Utility Functions ****************************/
@@ -62,16 +61,16 @@ static unsigned evict_on_close_test(hbool_t single_file_vfd);
/*-------------------------------------------------------------------------
* Function: create_datasets()
*
- * Purpose: If pass is TRUE on entry, create the specified datasets
+ * Purpose: If pass is true on entry, create the specified datasets
* in the indicated file.
*
* Datasets and their contents must be well known, as we
* will verify that they contain the expected data later.
*
- * On failure, set pass to FALSE, and set failure_mssg
+ * On failure, set pass to false, and set failure_mssg
* to point to an appropriate failure message.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -87,18 +86,18 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
{
const char *fcn_name = "create_datasets()";
char dset_name[64];
- hbool_t show_progress = FALSE;
- hbool_t valid_chunk;
- hbool_t verbose = FALSE;
+ bool show_progress = false;
+ bool valid_chunk;
+ bool verbose = false;
int cp = 0;
int i, j, k, l, m;
int data_chunk[CHUNK_SIZE][CHUNK_SIZE];
herr_t status;
- hid_t dataspace_id = -1;
+ hid_t dataspace_id = H5I_INVALID_HID;
hid_t filespace_ids[MAX_NUM_DSETS];
- hid_t memspace_id = -1;
+ hid_t memspace_id = H5I_INVALID_HID;
hid_t dataset_ids[MAX_NUM_DSETS];
- hid_t properties = -1;
+ hid_t properties = H5I_INVALID_HID;
hsize_t dims[2];
hsize_t a_size[2];
hsize_t offset[2];
@@ -125,7 +124,7 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
if (dataspace_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Screate_simple() failed.";
}
@@ -141,7 +140,7 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
if (properties < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pcreate() failed.";
}
}
@@ -150,7 +149,7 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
if (H5Pset_chunk(properties, 2, chunk_size) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_chunk() failed.";
}
}
@@ -158,13 +157,13 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
/* create the dataset */
if (pass) {
- HDsnprintf(dset_name, sizeof(dset_name), "/dset%03d", i);
+ snprintf(dset_name, sizeof(dset_name), "/dset%03d", i);
dataset_ids[i] = H5Dcreate2(file_id, dset_name, H5T_STD_I32BE, dataspace_id, H5P_DEFAULT,
properties, H5P_DEFAULT);
if (dataset_ids[i] < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dcreate() failed.";
}
}
@@ -176,7 +175,7 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
if (filespace_ids[i] < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dget_space() failed.";
}
}
@@ -197,7 +196,7 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
if (memspace_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Screate_simple() failed.";
}
}
@@ -216,7 +215,7 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sselect_hyperslab() failed.";
}
}
@@ -247,7 +246,7 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "disk H5Sselect_hyperslab() failed.";
}
@@ -257,7 +256,7 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dwrite() failed.";
}
m++;
@@ -288,7 +287,7 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "disk hyperslab create failed.";
}
@@ -300,7 +299,7 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "disk hyperslab create failed.";
}
}
@@ -308,13 +307,13 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
/* validate the slab */
if (pass) {
- valid_chunk = TRUE;
+ valid_chunk = true;
for (k = 0; k < CHUNK_SIZE; k++) {
for (l = 0; l < CHUNK_SIZE; l++) {
if (data_chunk[k][l] !=
((DSET_SIZE * DSET_SIZE * m) + (DSET_SIZE * (i + k)) + j + l)) {
- valid_chunk = FALSE;
+ valid_chunk = false;
if (verbose) {
@@ -330,7 +329,7 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
if (!valid_chunk) {
- pass = FALSE;
+ pass = false;
failure_mssg = "slab validation failed.";
if (verbose) {
@@ -354,7 +353,7 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
while ((pass) && (i <= max_dset)) {
if (H5Sclose(filespace_ids[i]) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sclose() failed.";
}
i++;
@@ -365,7 +364,7 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
while ((pass) && (i <= max_dset)) {
if (H5Dclose(dataset_ids[i]) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dclose() failed.";
}
i++;
@@ -376,7 +375,7 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
if (H5Sclose(memspace_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sclose(memspace_id) failed.";
}
}
@@ -386,17 +385,17 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
/*-------------------------------------------------------------------------
* Function: delete_datasets()
*
- * Purpose: If pass is TRUE on entry, verify and then delete the
+ * Purpose: If pass is true on entry, verify and then delete the
* dataset(s) indicated by min_dset and max_dset in the
* indicated file.
*
* Datasets and their contents must be well know, as we
* will verify that they contain the expected data later.
*
- * On failure, set pass to FALSE, and set failure_mssg
+ * On failure, set pass to false, and set failure_mssg
* to point to an appropriate failure message.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -408,7 +407,7 @@ delete_datasets(hid_t file_id, int min_dset, int max_dset)
{
const char *fcn_name = "delete_datasets()";
char dset_name[64];
- hbool_t show_progress = FALSE;
+ bool show_progress = false;
int cp = 0;
int i;
@@ -434,11 +433,11 @@ delete_datasets(hid_t file_id, int min_dset, int max_dset)
i = min_dset;
while ((pass) && (i <= max_dset)) {
- HDsnprintf(dset_name, sizeof(dset_name), "/dset%03d", i);
+ snprintf(dset_name, sizeof(dset_name), "/dset%03d", i);
if (H5Ldelete(file_id, dset_name, H5P_DEFAULT) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Ldelete() failed.";
}
@@ -458,32 +457,32 @@ delete_datasets(hid_t file_id, int min_dset, int max_dset)
* and test to see if it has a metadata cache image superblock
* extension message.
*
- * Set pass to FALSE and issue a suitable failure
+ * Set pass to false and issue a suitable failure
* message if either the file contains a metadata cache image
- * superblock extension and mdci_sbem_expected is TRUE, or
+ * superblock extension and mdci_sbem_expected is true, or
* vice versa.
*
- * If mdci_sbem_expected is TRUE, also verify that the metadata
+ * If mdci_sbem_expected is true, also verify that the metadata
* cache has been advised of this.
*
- * If read_only is TRUE, open the file read only. Otherwise
+ * If read_only is true, open the file read only. Otherwise
* open the file read/write.
*
- * If set_mdci_fapl is TRUE, set the metadata cache image
+ * If set_mdci_fapl is true, set the metadata cache image
* FAPL entry when opening the file, and verify that the
* metadata cache is notified.
*
- * If config_fsm is TRUE, setup the persistent free space
+ * If config_fsm is true, setup the persistent free space
* manager. Note that this flag may only be set if
- * create_file is also TRUE.
+ * create_file is also true.
*
* Return pointers to the cache data structure and file data
* structures.
*
- * On failure, set pass to FALSE, and set failure_mssg
+ * On failure, set pass to false, and set failure_mssg
* to point to an appropriate failure message.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -491,22 +490,22 @@ delete_datasets(hid_t file_id, int min_dset, int max_dset)
*/
static void
-open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_only, hbool_t set_mdci_fapl,
- hbool_t config_fsm, hbool_t set_eoc, const char *hdf_file_name, unsigned cache_image_flags,
- hid_t *file_id_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr)
+open_hdf5_file(bool create_file, bool mdci_sbem_expected, bool read_only, bool set_mdci_fapl, bool config_fsm,
+ bool set_eoc, const char *hdf_file_name, unsigned cache_image_flags, hid_t *file_id_ptr,
+ H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr)
{
const char *fcn_name = "open_hdf5_file()";
- hbool_t show_progress = FALSE;
- hbool_t verbose = FALSE;
+ bool show_progress = false;
+ bool verbose = false;
int cp = 0;
- hid_t fapl_id = -1;
- hid_t fcpl_id = -1;
- hid_t file_id = -1;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t fcpl_id = H5I_INVALID_HID;
+ hid_t file_id = H5I_INVALID_HID;
herr_t result;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
H5C_cache_image_ctl_t image_ctl;
- H5AC_cache_image_config_t cache_image_config = {H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION, TRUE, FALSE,
+ H5AC_cache_image_config_t cache_image_config = {H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION, true, false,
H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE};
if (pass) {
@@ -521,7 +520,7 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
(file_ptr_ptr == NULL) || (cache_ptr_ptr == NULL)) {
failure_mssg = "Bad param(s) on entry to open_hdf5_file().\n";
- pass = FALSE;
+ pass = false;
}
else if (verbose) {
@@ -539,7 +538,7 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
if (fapl_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fileaccess() failed.\n";
}
}
@@ -552,7 +551,7 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
if (H5Pset_libver_bounds(fapl_id, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_libver_bounds() failed.\n";
}
}
@@ -567,16 +566,16 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pget_mdc_image_config() failed.\n";
}
if ((cache_image_config.version != H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION) ||
- (cache_image_config.generate_image != FALSE) ||
- (cache_image_config.save_resize_status != FALSE) ||
+ (cache_image_config.generate_image != false) ||
+ (cache_image_config.save_resize_status != false) ||
(cache_image_config.entry_ageout != H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected default cache image config.\n";
}
}
@@ -588,15 +587,15 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
if ((pass) && (set_mdci_fapl)) {
/* set cache image config fields to taste */
- cache_image_config.generate_image = TRUE;
- cache_image_config.save_resize_status = FALSE;
+ cache_image_config.generate_image = true;
+ cache_image_config.save_resize_status = false;
cache_image_config.entry_ageout = H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE;
result = H5Pset_mdc_image_config(fapl_id, &cache_image_config);
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_mdc_image_config() failed.\n";
}
}
@@ -611,14 +610,14 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
if (fcpl_id <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pcreate(H5P_FILE_CREATE) failed.";
}
}
if ((pass) && (config_fsm)) {
- if (H5Pset_file_space_strategy(fcpl_id, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1) < 0) {
- pass = FALSE;
+ if (H5Pset_file_space_strategy(fcpl_id, H5F_FSPACE_STRATEGY_PAGE, true, (hsize_t)1) < 0) {
+ pass = false;
failure_mssg = "H5Pset_file_space_strategy() failed.";
}
}
@@ -629,9 +628,9 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
/* set evict on close if indicated */
if ((pass) && (set_eoc)) {
- if (H5Pset_evict_on_close(fapl_id, TRUE) < 0) {
+ if (H5Pset_evict_on_close(fapl_id, true) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_evict_on_close() failed.";
}
}
@@ -667,7 +666,7 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
if (file_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fcreate() or H5Fopen() failed.\n";
}
else {
@@ -676,7 +675,7 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
if (file_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Can't get file_ptr.";
if (verbose) {
@@ -696,7 +695,7 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
if (file_ptr->shared->cache == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't get cache pointer(1).\n";
}
else {
@@ -719,7 +718,7 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
if (H5C__get_cache_image_config(cache_ptr, &image_ctl) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "error returned by H5C__get_cache_image_config().";
}
}
@@ -734,22 +733,22 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
if (read_only) {
if ((image_ctl.version != H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION) ||
- (image_ctl.generate_image != FALSE) || (image_ctl.save_resize_status != FALSE) ||
+ (image_ctl.generate_image != false) || (image_ctl.save_resize_status != false) ||
(image_ctl.entry_ageout != H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE) ||
(image_ctl.flags != H5C_CI__ALL_FLAGS)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected image_ctl values(1).\n";
}
}
else {
if ((image_ctl.version != H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION) ||
- (image_ctl.generate_image != TRUE) || (image_ctl.save_resize_status != FALSE) ||
+ (image_ctl.generate_image != true) || (image_ctl.save_resize_status != false) ||
(image_ctl.entry_ageout != H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE) ||
(image_ctl.flags != H5C_CI__ALL_FLAGS)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected image_ctl values(2).\n";
}
}
@@ -757,11 +756,11 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
else {
if ((image_ctl.version != H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION) ||
- (image_ctl.generate_image != FALSE) || (image_ctl.save_resize_status != FALSE) ||
+ (image_ctl.generate_image != false) || (image_ctl.save_resize_status != false) ||
(image_ctl.entry_ageout != H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE) ||
(image_ctl.flags != H5C_CI__ALL_FLAGS)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected image_ctl values(3).\n";
}
}
@@ -776,7 +775,7 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
if (H5C_set_cache_image_config(file_ptr, cache_ptr, &image_ctl) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "error returned by H5C_set_cache_image_config().";
}
}
@@ -786,9 +785,9 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
if (pass) {
- if (cache_ptr->close_warning_received == TRUE) {
+ if (cache_ptr->close_warning_received == true) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected value of close_warning_received.\n";
}
@@ -796,26 +795,26 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
if (read_only) {
- if ((cache_ptr->load_image != TRUE) || (cache_ptr->delete_image != FALSE)) {
+ if ((cache_ptr->load_image != true) || (cache_ptr->delete_image != false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "mdci sb extension message not present?\n";
}
}
else {
- if ((cache_ptr->load_image != TRUE) || (cache_ptr->delete_image != TRUE)) {
+ if ((cache_ptr->load_image != true) || (cache_ptr->delete_image != true)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "mdci sb extension message not present?\n";
}
}
}
else {
- if ((cache_ptr->load_image == TRUE) || (cache_ptr->delete_image == TRUE)) {
+ if ((cache_ptr->load_image == true) || (cache_ptr->delete_image == true)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "mdci sb extension message present?\n";
}
}
@@ -845,7 +844,7 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
*
* In all cases, the attempted open or create should fail.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -853,15 +852,15 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
*/
static void
-attempt_swmr_open_hdf5_file(const hbool_t create_file, const hbool_t set_mdci_fapl, const char *hdf_file_name)
+attempt_swmr_open_hdf5_file(const bool create_file, const bool set_mdci_fapl, const char *hdf_file_name)
{
const char *fcn_name = "attempt_swmr_open_hdf5_file()";
- hbool_t show_progress = FALSE;
+ bool show_progress = false;
int cp = 0;
- hid_t fapl_id = -1;
- hid_t file_id = -1;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t file_id = H5I_INVALID_HID;
herr_t result;
- H5AC_cache_image_config_t cache_image_config = {H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION, TRUE, FALSE,
+ H5AC_cache_image_config_t cache_image_config = {H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION, true, false,
H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE};
/* create a file access property list. */
@@ -871,7 +870,7 @@ attempt_swmr_open_hdf5_file(const hbool_t create_file, const hbool_t set_mdci_fa
if (fapl_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fileaccess() failed.\n";
}
}
@@ -884,7 +883,7 @@ attempt_swmr_open_hdf5_file(const hbool_t create_file, const hbool_t set_mdci_fa
if (H5Pset_libver_bounds(fapl_id, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_libver_bounds() failed.\n";
}
}
@@ -896,15 +895,15 @@ attempt_swmr_open_hdf5_file(const hbool_t create_file, const hbool_t set_mdci_fa
if ((pass) && (set_mdci_fapl)) {
/* set cache image config fields to taste */
- cache_image_config.generate_image = TRUE;
- cache_image_config.save_resize_status = FALSE;
+ cache_image_config.generate_image = true;
+ cache_image_config.save_resize_status = false;
cache_image_config.entry_ageout = H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE;
result = H5Pset_mdc_image_config(fapl_id, &cache_image_config);
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_mdc_image_config() failed.\n";
}
}
@@ -934,7 +933,7 @@ attempt_swmr_open_hdf5_file(const hbool_t create_file, const hbool_t set_mdci_fa
if (file_id >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "SWMR H5Fcreate() or H5Fopen() succeeded.\n";
}
}
@@ -947,7 +946,7 @@ attempt_swmr_open_hdf5_file(const hbool_t create_file, const hbool_t set_mdci_fa
/*-------------------------------------------------------------------------
* Function: verify_datasets()
*
- * Purpose: If pass is TRUE on entry, verify that the datasets in the
+ * Purpose: If pass is true on entry, verify that the datasets in the
* file exist and contain the expected data.
*
* Note that these datasets were created by
@@ -955,10 +954,10 @@ attempt_swmr_open_hdf5_file(const hbool_t create_file, const hbool_t set_mdci_fa
* function must be reflected in this function, and
* vise-versa.
*
- * On failure, set pass to FALSE, and set failure_mssg
+ * On failure, set pass to false, and set failure_mssg
* to point to an appropriate failure message.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -970,15 +969,15 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
{
const char *fcn_name = "verify_datasets()";
char dset_name[64];
- hbool_t show_progress = FALSE;
- hbool_t valid_chunk;
- hbool_t verbose = FALSE;
+ bool show_progress = false;
+ bool valid_chunk;
+ bool verbose = false;
int cp = 0;
int i, j, k, l, m;
int data_chunk[CHUNK_SIZE][CHUNK_SIZE];
herr_t status;
hid_t filespace_ids[MAX_NUM_DSETS];
- hid_t memspace_id = -1;
+ hid_t memspace_id = H5I_INVALID_HID;
hid_t dataset_ids[MAX_NUM_DSETS];
hsize_t dims[2];
hsize_t a_size[2];
@@ -1001,12 +1000,12 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
/* open the dataset */
if (pass) {
- HDsnprintf(dset_name, sizeof(dset_name), "/dset%03d", i);
+ snprintf(dset_name, sizeof(dset_name), "/dset%03d", i);
dataset_ids[i] = H5Dopen2(file_id, dset_name, H5P_DEFAULT);
if (dataset_ids[i] < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dopen2() failed.";
}
}
@@ -1018,7 +1017,7 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
if (filespace_ids[i] < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dget_space() failed.";
}
}
@@ -1039,7 +1038,7 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
if (memspace_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Screate_simple() failed.";
}
}
@@ -1058,7 +1057,7 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sselect_hyperslab() failed.";
}
}
@@ -1083,7 +1082,7 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "disk hyperslab create failed.";
}
@@ -1095,7 +1094,7 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "disk hyperslab create failed.";
}
}
@@ -1103,13 +1102,13 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
/* validate the slab */
if (pass) {
- valid_chunk = TRUE;
+ valid_chunk = true;
for (k = 0; k < CHUNK_SIZE; k++) {
for (l = 0; l < CHUNK_SIZE; l++) {
if (data_chunk[k][l] !=
((DSET_SIZE * DSET_SIZE * m) + (DSET_SIZE * (i + k)) + j + l)) {
- valid_chunk = FALSE;
+ valid_chunk = false;
if (verbose) {
@@ -1125,7 +1124,7 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
if (!valid_chunk) {
- pass = FALSE;
+ pass = false;
failure_mssg = "slab validation failed.";
if (verbose) {
@@ -1149,7 +1148,7 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
while ((pass) && (i <= max_dset)) {
if (H5Sclose(filespace_ids[i]) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sclose() failed.";
}
i++;
@@ -1160,7 +1159,7 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
while ((pass) && (i <= max_dset)) {
if (H5Dclose(dataset_ids[i]) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dclose() failed.";
}
i++;
@@ -1171,7 +1170,7 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
if (H5Sclose(memspace_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sclose(memspace_id) failed.";
}
}
@@ -1247,12 +1246,12 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
*/
static unsigned
-check_cache_image_ctl_flow_1(hbool_t single_file_vfd)
+check_cache_image_ctl_flow_1(bool single_file_vfd)
{
const char *fcn_name = "check_cache_image_ctl_flow_1()";
char filename[512];
- hbool_t show_progress = FALSE;
- hid_t file_id = -1;
+ bool show_progress = false;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
int cp = 0;
@@ -1262,11 +1261,11 @@ check_cache_image_ctl_flow_1(hbool_t single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
- pass = TRUE;
+ pass = true;
if (show_progress)
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -1276,7 +1275,7 @@ check_cache_image_ctl_flow_1(hbool_t single_file_vfd)
if (h5_fixname(FILENAMES[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -1294,12 +1293,12 @@ check_cache_image_ctl_flow_1(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ TRUE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ true,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__GEN_MDCI_SBE_MESG,
/* file_id_ptr */ &file_id,
@@ -1326,7 +1325,7 @@ check_cache_image_ctl_flow_1(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -1344,12 +1343,12 @@ check_cache_image_ctl_flow_1(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -1387,7 +1386,7 @@ check_cache_image_ctl_flow_1(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -1403,12 +1402,12 @@ check_cache_image_ctl_flow_1(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -1425,7 +1424,7 @@ check_cache_image_ctl_flow_1(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -1439,7 +1438,7 @@ check_cache_image_ctl_flow_1(hbool_t single_file_vfd)
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -1521,12 +1520,12 @@ check_cache_image_ctl_flow_1(hbool_t single_file_vfd)
*/
static unsigned
-check_cache_image_ctl_flow_2(hbool_t single_file_vfd)
+check_cache_image_ctl_flow_2(bool single_file_vfd)
{
const char *fcn_name = "check_cache_image_ctl_flow_2()";
char filename[512];
- hbool_t show_progress = FALSE;
- hid_t file_id = -1;
+ bool show_progress = false;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
int cp = 0;
@@ -1536,11 +1535,11 @@ check_cache_image_ctl_flow_2(hbool_t single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
- pass = TRUE;
+ pass = true;
if (show_progress)
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -1550,7 +1549,7 @@ check_cache_image_ctl_flow_2(hbool_t single_file_vfd)
if (h5_fixname(FILENAMES[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -1568,12 +1567,12 @@ check_cache_image_ctl_flow_2(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ TRUE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ true,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__GEN_MDCI_SBE_MESG,
/* file_id_ptr */ &file_id,
@@ -1590,7 +1589,7 @@ check_cache_image_ctl_flow_2(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -1608,12 +1607,12 @@ check_cache_image_ctl_flow_2(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -1630,7 +1629,7 @@ check_cache_image_ctl_flow_2(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -1646,12 +1645,12 @@ check_cache_image_ctl_flow_2(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -1668,7 +1667,7 @@ check_cache_image_ctl_flow_2(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -1682,7 +1681,7 @@ check_cache_image_ctl_flow_2(hbool_t single_file_vfd)
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -1782,12 +1781,12 @@ check_cache_image_ctl_flow_2(hbool_t single_file_vfd)
*/
static unsigned
-check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
+check_cache_image_ctl_flow_3(bool single_file_vfd)
{
const char *fcn_name = "check_cache_image_ctl_flow_3()";
char filename[512];
- hbool_t show_progress = FALSE;
- hid_t file_id = -1;
+ bool show_progress = false;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
int cp = 0;
@@ -1797,11 +1796,11 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
- pass = TRUE;
+ pass = true;
if (show_progress) /* 0 */
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -1811,7 +1810,7 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
if (h5_fixname(FILENAMES[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -1827,12 +1826,12 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ TRUE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ true,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -1849,7 +1848,7 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -1867,12 +1866,12 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__GEN_MDCI_SBE_MESG,
/* file_id_ptr */ &file_id,
@@ -1899,7 +1898,7 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -1918,12 +1917,12 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ TRUE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ true,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -1950,7 +1949,7 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -1969,12 +1968,12 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -2001,7 +2000,7 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -2017,12 +2016,12 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -2039,7 +2038,7 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -2053,7 +2052,7 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -2145,12 +2144,12 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
*/
static unsigned
-check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
+check_cache_image_ctl_flow_4(bool single_file_vfd)
{
const char *fcn_name = "check_cache_image_ctl_flow_4()";
char filename[512];
- hbool_t show_progress = FALSE;
- hid_t file_id = -1;
+ bool show_progress = false;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
int cp = 0;
@@ -2160,11 +2159,11 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
- pass = TRUE;
+ pass = true;
if (show_progress) /* 0 */
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -2174,7 +2173,7 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
if (h5_fixname(FILENAMES[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -2190,12 +2189,12 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ TRUE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ true,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -2212,7 +2211,7 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -2230,12 +2229,12 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__GEN_MDCI_SBE_MESG,
/* file_id_ptr */ &file_id,
@@ -2252,7 +2251,7 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -2271,12 +2270,12 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ TRUE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ true,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -2293,7 +2292,7 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -2312,12 +2311,12 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -2334,7 +2333,7 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -2350,12 +2349,12 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -2372,7 +2371,7 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -2386,7 +2385,7 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -2471,12 +2470,12 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
*/
static unsigned
-check_cache_image_ctl_flow_5(hbool_t single_file_vfd)
+check_cache_image_ctl_flow_5(bool single_file_vfd)
{
const char *fcn_name = "check_cache_image_ctl_flow_5()";
char filename[512];
- hbool_t show_progress = FALSE;
- hid_t file_id = -1;
+ bool show_progress = false;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
int cp = 0;
@@ -2486,11 +2485,11 @@ check_cache_image_ctl_flow_5(hbool_t single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
- pass = TRUE;
+ pass = true;
if (show_progress) /* 0 */
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -2500,7 +2499,7 @@ check_cache_image_ctl_flow_5(hbool_t single_file_vfd)
if (h5_fixname(FILENAMES[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -2518,12 +2517,12 @@ check_cache_image_ctl_flow_5(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ TRUE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ true,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__GEN_MDCI_SBE_MESG,
/* file_id_ptr */ &file_id,
@@ -2550,7 +2549,7 @@ check_cache_image_ctl_flow_5(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -2575,12 +2574,12 @@ check_cache_image_ctl_flow_5(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__GEN_MDCI_SBE_MESG,
/* file_id_ptr */ &file_id,
@@ -2607,7 +2606,7 @@ check_cache_image_ctl_flow_5(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -2626,12 +2625,12 @@ check_cache_image_ctl_flow_5(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -2658,7 +2657,7 @@ check_cache_image_ctl_flow_5(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -2672,7 +2671,7 @@ check_cache_image_ctl_flow_5(hbool_t single_file_vfd)
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -2749,12 +2748,12 @@ check_cache_image_ctl_flow_5(hbool_t single_file_vfd)
*/
static unsigned
-check_cache_image_ctl_flow_6(hbool_t single_file_vfd)
+check_cache_image_ctl_flow_6(bool single_file_vfd)
{
const char *fcn_name = "check_cache_image_ctl_flow_6()";
char filename[512];
- hbool_t show_progress = FALSE;
- hid_t file_id = -1;
+ bool show_progress = false;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
int cp = 0;
@@ -2764,11 +2763,11 @@ check_cache_image_ctl_flow_6(hbool_t single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
- pass = TRUE;
+ pass = true;
if (show_progress) /* 0 */
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -2778,7 +2777,7 @@ check_cache_image_ctl_flow_6(hbool_t single_file_vfd)
if (h5_fixname(FILENAMES[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -2796,12 +2795,12 @@ check_cache_image_ctl_flow_6(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ TRUE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ true,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__GEN_MDCI_SBE_MESG,
/* file_id_ptr */ &file_id,
@@ -2818,7 +2817,7 @@ check_cache_image_ctl_flow_6(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -2843,12 +2842,12 @@ check_cache_image_ctl_flow_6(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__GEN_MDCI_SBE_MESG,
/* file_id_ptr */ &file_id,
@@ -2865,7 +2864,7 @@ check_cache_image_ctl_flow_6(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -2884,12 +2883,12 @@ check_cache_image_ctl_flow_6(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -2906,7 +2905,7 @@ check_cache_image_ctl_flow_6(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -2920,7 +2919,7 @@ check_cache_image_ctl_flow_6(hbool_t single_file_vfd)
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -3032,12 +3031,12 @@ check_cache_image_ctl_flow_6(hbool_t single_file_vfd)
*/
static unsigned
-cache_image_smoke_check_1(hbool_t single_file_vfd)
+cache_image_smoke_check_1(bool single_file_vfd)
{
const char *fcn_name = "cache_image_smoke_check_1()";
char filename[512];
- hbool_t show_progress = FALSE;
- hid_t file_id = -1;
+ bool show_progress = false;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
int cp = 0;
@@ -3047,11 +3046,11 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
- pass = TRUE;
+ pass = true;
if (show_progress)
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -3061,7 +3060,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
if (h5_fixname(FILENAMES[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -3078,12 +3077,12 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ TRUE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ true,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -3106,7 +3105,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(1).";
}
}
@@ -3121,7 +3120,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -3139,12 +3138,12 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -3171,7 +3170,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 1) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block not loaded(1).";
}
}
@@ -3186,7 +3185,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -3202,12 +3201,12 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -3234,7 +3233,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(2).";
}
}
@@ -3249,7 +3248,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -3265,12 +3264,12 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -3290,7 +3289,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -3306,12 +3305,12 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -3337,7 +3336,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(3).";
}
}
@@ -3352,7 +3351,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -3366,7 +3365,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -3440,12 +3439,12 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
*/
static unsigned
-cache_image_smoke_check_2(hbool_t single_file_vfd)
+cache_image_smoke_check_2(bool single_file_vfd)
{
const char *fcn_name = "cache_image_smoke_check_2()";
char filename[512];
- hbool_t show_progress = FALSE;
- hid_t file_id = -1;
+ bool show_progress = false;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
int cp = 0;
@@ -3455,11 +3454,11 @@ cache_image_smoke_check_2(hbool_t single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
- pass = TRUE;
+ pass = true;
if (show_progress)
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -3469,7 +3468,7 @@ cache_image_smoke_check_2(hbool_t single_file_vfd)
if (h5_fixname(FILENAMES[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -3486,12 +3485,12 @@ cache_image_smoke_check_2(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ TRUE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ TRUE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ true,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ true,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -3514,7 +3513,7 @@ cache_image_smoke_check_2(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(1).";
}
}
@@ -3529,7 +3528,7 @@ cache_image_smoke_check_2(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -3545,12 +3544,12 @@ cache_image_smoke_check_2(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -3573,7 +3572,7 @@ cache_image_smoke_check_2(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -3589,12 +3588,12 @@ cache_image_smoke_check_2(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -3625,7 +3624,7 @@ cache_image_smoke_check_2(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -3639,7 +3638,7 @@ cache_image_smoke_check_2(hbool_t single_file_vfd)
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -3735,12 +3734,12 @@ cache_image_smoke_check_2(hbool_t single_file_vfd)
*/
static unsigned
-cache_image_smoke_check_3(hbool_t single_file_vfd)
+cache_image_smoke_check_3(bool single_file_vfd)
{
const char *fcn_name = "cache_image_smoke_check_3()";
char filename[512];
- hbool_t show_progress = FALSE;
- hid_t file_id = -1;
+ bool show_progress = false;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
int cp = 0;
@@ -3750,11 +3749,11 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
- pass = TRUE;
+ pass = true;
if (show_progress)
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -3764,7 +3763,7 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
if (h5_fixname(FILENAMES[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -3781,12 +3780,12 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ TRUE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ TRUE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ true,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ true,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -3809,7 +3808,7 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(1).";
}
}
@@ -3824,7 +3823,7 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -3840,12 +3839,12 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ TRUE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ true,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -3872,7 +3871,7 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
if (cache_ptr->images_loaded == 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block not loaded(1).";
}
}
@@ -3887,7 +3886,7 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -3903,12 +3902,12 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -3935,7 +3934,7 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
if (cache_ptr->images_loaded == 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block not loaded(2).";
}
}
@@ -3950,7 +3949,7 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -3963,12 +3962,12 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -3995,7 +3994,7 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(2).";
}
}
@@ -4010,7 +4009,7 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -4024,7 +4023,7 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -4109,12 +4108,12 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
*/
static unsigned
-cache_image_smoke_check_4(hbool_t single_file_vfd)
+cache_image_smoke_check_4(bool single_file_vfd)
{
const char *fcn_name = "cache_image_smoke_check_4()";
char filename[512];
- hbool_t show_progress = FALSE;
- hid_t file_id = -1;
+ bool show_progress = false;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
int cp = 0;
@@ -4126,11 +4125,11 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
- pass = TRUE;
+ pass = true;
if (show_progress)
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -4140,7 +4139,7 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
if (h5_fixname(FILENAMES[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -4157,12 +4156,12 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ TRUE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ TRUE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ true,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ true,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -4185,7 +4184,7 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(1).";
}
}
@@ -4200,7 +4199,7 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -4218,12 +4217,12 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -4246,7 +4245,7 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
if (cache_ptr->images_loaded == 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block not loaded(1).";
}
}
@@ -4261,7 +4260,7 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -4279,12 +4278,12 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -4311,7 +4310,7 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
if (cache_ptr->images_loaded == 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block not loaded(2).";
}
}
@@ -4326,7 +4325,7 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -4339,12 +4338,12 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -4371,7 +4370,7 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(2).";
}
}
@@ -4386,7 +4385,7 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -4400,7 +4399,7 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -4499,14 +4498,14 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
#define MAX_NUM_GROUPS 64
static unsigned
-cache_image_smoke_check_5(hbool_t single_file_vfd)
+cache_image_smoke_check_5(bool single_file_vfd)
{
const char *fcn_name = "cache_image_smoke_check_5()";
char filename[512];
char process_group_name[512];
- hbool_t show_progress = FALSE;
- hid_t file_id = -1;
- hid_t proc_gid = -1;
+ bool show_progress = false;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t proc_gid = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
int cp = 0;
@@ -4519,11 +4518,11 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
- pass = TRUE;
+ pass = true;
if (show_progress)
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -4535,7 +4534,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
if (h5_fixname(FILENAMES[0], fapl_id, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
@@ -4554,12 +4553,12 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ TRUE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ TRUE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ true,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ true,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -4573,13 +4572,13 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
/* 2) Create a process specific group. */
if (pass) {
- HDsnprintf(process_group_name, sizeof(process_group_name), "/process_%d", min_group);
+ snprintf(process_group_name, sizeof(process_group_name), "/process_%d", min_group);
proc_gid = H5Gcreate2(file_id, process_group_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (proc_gid < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Gcreate2() failed (1).\n";
}
}
@@ -4596,7 +4595,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(1).";
}
}
@@ -4611,7 +4610,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
if (H5Gclose(proc_gid) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Gclose(proc_gid) failed. (1)";
}
}
@@ -4620,7 +4619,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -4638,12 +4637,12 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -4663,7 +4662,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
if (cache_ptr->images_loaded == 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block not loaded(1).";
}
}
@@ -4676,13 +4675,13 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
if (pass) {
max_group++;
- HDsnprintf(process_group_name, sizeof(process_group_name), "/process_%d", max_group);
+ snprintf(process_group_name, sizeof(process_group_name), "/process_%d", max_group);
proc_gid = H5Gcreate2(file_id, process_group_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (proc_gid < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Gcreate2() failed (2).\n";
}
}
@@ -4703,7 +4702,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
if (H5Gclose(proc_gid) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Gclose(process_gid) failed. (2)";
}
}
@@ -4712,7 +4711,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -4728,12 +4727,12 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
* superblock extension message.
*/
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ TRUE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ true,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -4747,14 +4746,14 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
/* 11) Validate all the zoos. */
i = min_group;
while (pass && i <= max_group) {
- HDsnprintf(process_group_name, sizeof(process_group_name), "/process_%d", i);
+ snprintf(process_group_name, sizeof(process_group_name), "/process_%d", i);
validate_zoo(file_id, process_group_name, i++);
}
#if H5C_COLLECT_CACHE_STATS
if (pass) {
if (cache_ptr->images_loaded == 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block not loaded(2).";
}
}
@@ -4766,7 +4765,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
/* 12) Close the file. */
if (pass) {
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -4779,12 +4778,12 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -4799,7 +4798,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
i = min_group;
while ((pass) && (i <= max_group)) {
- HDsnprintf(process_group_name, sizeof(process_group_name), "/process_%d", i);
+ snprintf(process_group_name, sizeof(process_group_name), "/process_%d", i);
validate_zoo(file_id, process_group_name, i++);
}
@@ -4808,7 +4807,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
if (cache_ptr->images_loaded == 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block not loaded(2).";
}
}
@@ -4823,7 +4822,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -4836,12 +4835,12 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -4859,7 +4858,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
*/
i = min_group;
while ((pass) && (i <= max_group)) {
- HDsnprintf(process_group_name, sizeof(process_group_name), "/process_%d", i);
+ snprintf(process_group_name, sizeof(process_group_name), "/process_%d", i);
validate_zoo(file_id, process_group_name, i++);
}
@@ -4868,7 +4867,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(2).";
}
}
@@ -4883,7 +4882,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -4897,7 +4896,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -4994,12 +4993,12 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
*/
static unsigned
-cache_image_smoke_check_6(hbool_t single_file_vfd)
+cache_image_smoke_check_6(bool single_file_vfd)
{
const char *fcn_name = "cache_image_smoke_check_6()";
char filename[512];
- hbool_t show_progress = FALSE;
- hid_t file_id = -1;
+ bool show_progress = false;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
h5_stat_size_t file_size;
@@ -5012,11 +5011,11 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
- pass = TRUE;
+ pass = true;
if (show_progress)
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -5026,7 +5025,7 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
if (h5_fixname(FILENAMES[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -5043,12 +5042,12 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ TRUE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ TRUE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ true,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ true,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -5071,7 +5070,7 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(1).";
}
}
@@ -5086,7 +5085,7 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -5104,12 +5103,12 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -5132,7 +5131,7 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
if (cache_ptr->images_loaded == 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block not loaded(1).";
}
}
@@ -5156,7 +5155,7 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -5174,12 +5173,12 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -5202,7 +5201,7 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
if (cache_ptr->images_loaded == 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block not loaded(2).";
}
}
@@ -5217,7 +5216,7 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -5230,12 +5229,12 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -5261,7 +5260,7 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(2).";
}
}
@@ -5273,7 +5272,7 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -5294,11 +5293,11 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
*/
if (pass) {
if ((file_size = h5_get_file_size(filename, H5P_DEFAULT)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_get_file_size() failed.\n";
}
else if (file_size > 20 * 1024) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpectedly large file size.\n";
}
}
@@ -5311,7 +5310,7 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -5386,12 +5385,12 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
*/
static unsigned
-cache_image_api_error_check_1(hbool_t single_file_vfd)
+cache_image_api_error_check_1(bool single_file_vfd)
{
const char *fcn_name = "cache_image_api_error_check_1()";
char filename[512];
- hbool_t show_progress = FALSE;
- hid_t file_id = -1;
+ bool show_progress = false;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
int cp = 0;
@@ -5401,11 +5400,11 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
- pass = TRUE;
+ pass = true;
if (show_progress)
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -5415,7 +5414,7 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
if (h5_fixname(FILENAMES[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -5427,12 +5426,12 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ TRUE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ TRUE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ true,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ true,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -5455,7 +5454,7 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(1).";
}
}
@@ -5470,7 +5469,7 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -5482,12 +5481,12 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ TRUE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ true,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -5515,7 +5514,7 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(2).";
}
}
@@ -5530,7 +5529,7 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -5542,12 +5541,12 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ TRUE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ true,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -5575,7 +5574,7 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(3).";
}
}
@@ -5590,7 +5589,7 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -5602,12 +5601,12 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -5635,7 +5634,7 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(4).";
}
}
@@ -5650,7 +5649,7 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -5664,7 +5663,7 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -5751,12 +5750,12 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
*/
static unsigned
-cache_image_api_error_check_2(hbool_t single_file_vfd)
+cache_image_api_error_check_2(bool single_file_vfd)
{
const char *fcn_name = "cache_image_api_error_check_2()";
char filename[512];
- hbool_t show_progress = FALSE;
- hid_t file_id = -1;
+ bool show_progress = false;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
int cp = 0;
@@ -5766,11 +5765,11 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
- pass = TRUE;
+ pass = true;
if (show_progress)
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -5780,7 +5779,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
if (h5_fixname(FILENAMES[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -5792,12 +5791,12 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ TRUE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ TRUE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ true,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ true,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -5820,7 +5819,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(1).";
}
}
@@ -5835,7 +5834,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -5847,12 +5846,12 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ TRUE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ true,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -5880,7 +5879,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 1) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block was not loaded(1).";
}
}
@@ -5895,7 +5894,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -5907,12 +5906,12 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ TRUE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ true,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -5940,7 +5939,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 1) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block was not loaded(2).";
}
}
@@ -5955,7 +5954,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -5967,12 +5966,12 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -6000,7 +5999,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 1) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block was not loaded(3).";
}
}
@@ -6015,7 +6014,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -6027,12 +6026,12 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -6060,7 +6059,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block was loaded(2).";
}
}
@@ -6075,7 +6074,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -6089,7 +6088,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -6149,12 +6148,12 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
*/
static unsigned
-cache_image_api_error_check_3(hbool_t single_file_vfd)
+cache_image_api_error_check_3(bool single_file_vfd)
{
const char *fcn_name = "cache_image_api_error_check_3()";
char filename[512];
- hbool_t show_progress = FALSE;
- hid_t file_id = -1;
+ bool show_progress = false;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
int cp = 0;
@@ -6164,11 +6163,11 @@ cache_image_api_error_check_3(hbool_t single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
- pass = TRUE;
+ pass = true;
if (show_progress)
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -6178,7 +6177,7 @@ cache_image_api_error_check_3(hbool_t single_file_vfd)
if (h5_fixname(FILENAMES[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -6190,12 +6189,12 @@ cache_image_api_error_check_3(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ TRUE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ TRUE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ true,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ true,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -6214,7 +6213,7 @@ cache_image_api_error_check_3(hbool_t single_file_vfd)
{
if (H5Fstart_swmr_write(file_id) == SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "SWMR start succeeded in file with cache image.";
}
}
@@ -6230,13 +6229,13 @@ cache_image_api_error_check_3(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -6248,8 +6247,8 @@ cache_image_api_error_check_3(hbool_t single_file_vfd)
* access and cache image requested -- should fail.
*/
- attempt_swmr_open_hdf5_file(/* create_file */ TRUE,
- /* set_mdci_fapl */ TRUE,
+ attempt_swmr_open_hdf5_file(/* create_file */ true,
+ /* set_mdci_fapl */ true,
/* hdf_file_name */ filename);
if (show_progress)
@@ -6272,12 +6271,12 @@ cache_image_api_error_check_3(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ TRUE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ TRUE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ true,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ true,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -6300,7 +6299,7 @@ cache_image_api_error_check_3(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(1).";
}
}
@@ -6315,7 +6314,7 @@ cache_image_api_error_check_3(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -6325,8 +6324,8 @@ cache_image_api_error_check_3(hbool_t single_file_vfd)
/* 9) Attempt to open the file with SWMR write access -- should fail. */
- attempt_swmr_open_hdf5_file(/* create_file */ FALSE,
- /* set_mdci_fapl */ TRUE,
+ attempt_swmr_open_hdf5_file(/* create_file */ false,
+ /* set_mdci_fapl */ true,
/* hdf_file_name */ filename);
if (show_progress)
@@ -6338,7 +6337,7 @@ cache_image_api_error_check_3(hbool_t single_file_vfd)
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -6427,13 +6426,13 @@ cache_image_api_error_check_3(hbool_t single_file_vfd)
*/
static unsigned
-cache_image_api_error_check_4(hbool_t single_file_vfd)
+cache_image_api_error_check_4(bool single_file_vfd)
{
const char *fcn_name = "cache_image_api_error_check_4()";
char filename[512];
- hbool_t show_progress = FALSE;
- hid_t fapl_id = -1;
- hid_t file_id = -1;
+ bool show_progress = false;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
int cp = 0;
@@ -6444,11 +6443,11 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
- pass = TRUE;
+ pass = true;
if (show_progress)
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -6458,7 +6457,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (h5_fixname(FILENAMES[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -6475,7 +6474,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (fapl_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fileaccess() failed.\n";
}
}
@@ -6487,13 +6486,13 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
/* set cache image config fields to taste */
cache_image_config.version = H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION;
- cache_image_config.generate_image = TRUE;
- cache_image_config.save_resize_status = FALSE;
+ cache_image_config.generate_image = true;
+ cache_image_config.save_resize_status = false;
cache_image_config.entry_ageout = H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE;
if (H5Pset_mdc_image_config(fapl_id, &cache_image_config) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_mdc_image_config() failed.\n";
}
}
@@ -6509,7 +6508,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (file_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fcreate() failed.\n";
}
else {
@@ -6518,7 +6517,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (file_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Can't get file_ptr.";
}
}
@@ -6534,7 +6533,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (file_ptr->shared->cache == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't get cache pointer(1).\n";
}
else {
@@ -6560,7 +6559,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(1).";
}
}
@@ -6575,7 +6574,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -6587,12 +6586,12 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ TRUE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ true,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -6617,7 +6616,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(2).";
}
}
@@ -6632,7 +6631,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -6651,7 +6650,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (file_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fopen() failed.\n";
}
else {
@@ -6660,7 +6659,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (file_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Can't get file_ptr.";
}
}
@@ -6676,7 +6675,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (file_ptr->shared->cache == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't get cache pointer(1).\n";
}
else {
@@ -6690,9 +6689,9 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (pass) {
- if ((cache_ptr->load_image == TRUE) || (cache_ptr->delete_image == TRUE)) {
+ if ((cache_ptr->load_image == true) || (cache_ptr->delete_image == true)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "mdci sb extension message present?\n";
}
}
@@ -6706,7 +6705,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -6724,7 +6723,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (file_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fopen() failed.\n";
}
else {
@@ -6733,7 +6732,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (file_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Can't get file_ptr.";
}
}
@@ -6749,7 +6748,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (file_ptr->shared->cache == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't get cache pointer(1).\n";
}
else {
@@ -6763,9 +6762,9 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (pass) {
- if ((cache_ptr->load_image == TRUE) || (cache_ptr->delete_image == TRUE)) {
+ if ((cache_ptr->load_image == true) || (cache_ptr->delete_image == true)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "mdci sb extension message present?\n";
}
}
@@ -6788,7 +6787,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(2).";
}
}
@@ -6813,7 +6812,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -6828,12 +6827,12 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -6859,7 +6858,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(2).";
}
}
@@ -6874,7 +6873,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -6888,7 +6887,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -6996,12 +6995,12 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
*-------------------------------------------------------------------------
*/
static unsigned
-get_free_sections_test(hbool_t single_file_vfd)
+get_free_sections_test(bool single_file_vfd)
{
const char *fcn_name = "get_free_sections_test()";
char filename[512];
- hbool_t show_progress = FALSE;
- hid_t file_id = -1;
+ bool show_progress = false;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
h5_stat_size_t file_size;
@@ -7012,11 +7011,11 @@ get_free_sections_test(hbool_t single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
- pass = TRUE;
+ pass = true;
if (show_progress)
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -7026,7 +7025,7 @@ get_free_sections_test(hbool_t single_file_vfd)
if (h5_fixname(FILENAMES[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -7040,12 +7039,12 @@ get_free_sections_test(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ TRUE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ TRUE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ true,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ true,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -7090,7 +7089,7 @@ get_free_sections_test(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed (1).\n";
}
}
@@ -7102,12 +7101,12 @@ get_free_sections_test(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ TRUE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ true,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -7124,7 +7123,7 @@ get_free_sections_test(hbool_t single_file_vfd)
if ((!file_ptr->shared->cache->load_image) || (file_ptr->shared->cache->image_loaded)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected cache image status.\n";
}
}
@@ -7139,14 +7138,14 @@ get_free_sections_test(hbool_t single_file_vfd)
if (pass) {
- /* file_ptr->shared->first_alloc_dealloc is set to FALSE if the
+ /* file_ptr->shared->first_alloc_dealloc is set to false if the
* file is opened R/O.
*/
if ((!H5_addr_defined(file_ptr->shared->eoa_fsm_fsalloc)) ||
(!H5_addr_defined(file_ptr->shared->cache->image_addr)) ||
(H5_addr_gt(file_ptr->shared->eoa_fsm_fsalloc, file_ptr->shared->cache->image_addr))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected cache image status (1).\n";
}
}
@@ -7160,7 +7159,7 @@ get_free_sections_test(hbool_t single_file_vfd)
if (H5Fget_free_sections(file_id, H5FD_MEM_DEFAULT, (size_t)0, NULL) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fget_free_sections() failed (1).\n";
}
}
@@ -7175,7 +7174,7 @@ get_free_sections_test(hbool_t single_file_vfd)
if (!file_ptr->shared->cache->image_loaded) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache image not loaded (1).\n";
}
}
@@ -7199,7 +7198,7 @@ get_free_sections_test(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed (2).\n";
}
}
@@ -7211,12 +7210,12 @@ get_free_sections_test(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -7233,7 +7232,7 @@ get_free_sections_test(hbool_t single_file_vfd)
if ((!file_ptr->shared->cache->load_image) || (file_ptr->shared->cache->image_loaded)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected cache image status.\n";
}
}
@@ -7251,7 +7250,7 @@ get_free_sections_test(hbool_t single_file_vfd)
(!H5_addr_defined(file_ptr->shared->cache->image_addr)) ||
(H5_addr_gt(file_ptr->shared->eoa_fsm_fsalloc, file_ptr->shared->cache->image_addr))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected cache image status (2).\n";
}
}
@@ -7265,7 +7264,7 @@ get_free_sections_test(hbool_t single_file_vfd)
if (H5Fget_free_sections(file_id, H5FD_MEM_DEFAULT, (size_t)0, NULL) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fget_free_sections() failed (2).\n";
}
}
@@ -7280,7 +7279,7 @@ get_free_sections_test(hbool_t single_file_vfd)
if (!file_ptr->shared->cache->image_loaded) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache image not loaded (2).\n";
}
}
@@ -7314,7 +7313,7 @@ get_free_sections_test(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed (3).\n";
}
}
@@ -7328,12 +7327,12 @@ get_free_sections_test(hbool_t single_file_vfd)
if ((file_size = h5_get_file_size(filename, H5P_DEFAULT)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_get_file_size() failed.\n";
}
else if (file_size > 20 * 1024) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpectedly large file size.\n";
}
}
@@ -7347,7 +7346,7 @@ get_free_sections_test(hbool_t single_file_vfd)
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -7434,14 +7433,14 @@ get_free_sections_test(hbool_t single_file_vfd)
*-------------------------------------------------------------------------
*/
static unsigned
-evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
+evict_on_close_test(bool H5_ATTR_PARALLEL_UNUSED single_file_vfd)
{
#ifndef H5_HAVE_PARALLEL
const char *fcn_name = "evict_on_close_test()";
char filename[512];
- hbool_t show_progress = FALSE;
- hbool_t verbose = FALSE;
- hid_t file_id = -1;
+ bool show_progress = false;
+ bool verbose = false;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
int cp = 0;
@@ -7451,18 +7450,18 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
#ifdef H5_HAVE_PARALLEL
SKIPPED();
- HDputs(" EoC not supported in the parallel library.");
+ puts(" EoC not supported in the parallel library.");
return 0;
#else
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
- pass = TRUE;
+ pass = true;
if (show_progress)
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -7472,7 +7471,7 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
if (h5_fixname(FILENAMES[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -7485,12 +7484,12 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
*/
if (pass) {
- open_hdf5_file(/* create_file */ TRUE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ TRUE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ true,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ true,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -7525,7 +7524,7 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed (1).\n";
}
}
@@ -7537,12 +7536,12 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -7598,7 +7597,7 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed (2).\n";
}
}
@@ -7610,12 +7609,12 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ TRUE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ TRUE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ true,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ true,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -7650,7 +7649,7 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed (3).\n";
}
}
@@ -7662,12 +7661,12 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ TRUE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ true,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -7702,7 +7701,7 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed (3).\n";
}
}
@@ -7716,7 +7715,7 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -7754,12 +7753,12 @@ int
main(void)
{
const char *env_h5_drvr; /* File driver value from environment */
- hbool_t single_file_vfd; /* Whether VFD used stores data in a single file */
+ bool single_file_vfd; /* Whether VFD used stores data in a single file */
unsigned nerrs = 0;
int express_test;
/* Get the VFD to use */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
diff --git a/test/cache_logging.c b/test/cache_logging.c
index 5001c495924..5372021f335 100644
--- a/test/cache_logging.c
+++ b/test/cache_logging.c
@@ -32,20 +32,20 @@ static const char *FILENAME[] = {"cache_logging", NULL};
static herr_t
test_logging_api(void)
{
- hid_t fapl = -1;
- hbool_t is_enabled;
- hbool_t is_enabled_out;
- hbool_t start_on_access;
- hbool_t start_on_access_out;
- char *location = NULL;
- size_t size;
-
- hid_t fid = -1;
- hid_t gid = -1;
- hbool_t is_currently_logging;
- char group_name[12];
- char filename[1024];
- int i;
+ hid_t fapl = H5I_INVALID_HID;
+ bool is_enabled;
+ bool is_enabled_out;
+ bool start_on_access;
+ bool start_on_access_out;
+ char *location = NULL;
+ size_t size;
+
+ hid_t fid = H5I_INVALID_HID;
+ hid_t gid = H5I_INVALID_HID;
+ bool is_currently_logging;
+ char group_name[12];
+ char filename[1024];
+ int i;
TESTING("metadata cache log api calls");
@@ -53,8 +53,8 @@ test_logging_api(void)
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
/* Set up metadata cache logging */
- is_enabled = TRUE;
- start_on_access = FALSE;
+ is_enabled = true;
+ start_on_access = false;
if (H5Pset_mdc_log_options(fapl, is_enabled, LOG_LOCATION, start_on_access) < 0)
TEST_ERROR;
@@ -67,13 +67,13 @@ test_logging_api(void)
/* Check to make sure that the property list getter returns the correct
* location string buffer size;
*/
- is_enabled_out = FALSE;
- start_on_access_out = TRUE;
+ is_enabled_out = false;
+ start_on_access_out = true;
location = NULL;
size = 999;
if (H5Pget_mdc_log_options(fapl, &is_enabled_out, location, &size, &start_on_access_out) < 0)
TEST_ERROR;
- if (size != HDstrlen(LOG_LOCATION) + 1)
+ if (size != strlen(LOG_LOCATION) + 1)
TEST_ERROR;
/* Check to make sure that the property list getter works */
@@ -82,7 +82,7 @@ test_logging_api(void)
if (H5Pget_mdc_log_options(fapl, &is_enabled_out, location, &size, &start_on_access_out) < 0)
TEST_ERROR;
if ((is_enabled != is_enabled_out) || (start_on_access != start_on_access_out) ||
- HDstrcmp(LOG_LOCATION, location) != 0)
+ strcmp(LOG_LOCATION, location) != 0)
TEST_ERROR;
/* Create a file */
@@ -92,25 +92,25 @@ test_logging_api(void)
TEST_ERROR;
/* Check to see if the logging flags were set correctly */
- is_enabled = FALSE;
- is_currently_logging = TRUE;
- if ((H5Fget_mdc_logging_status(fid, &is_enabled, &is_currently_logging) < 0) || (is_enabled != TRUE) ||
- (is_currently_logging != FALSE))
+ is_enabled = false;
+ is_currently_logging = true;
+ if ((H5Fget_mdc_logging_status(fid, &is_enabled, &is_currently_logging) < 0) || (is_enabled != true) ||
+ (is_currently_logging != false))
TEST_ERROR;
/* Turn on logging and check flags */
if (H5Fstart_mdc_logging(fid) < 0)
TEST_ERROR;
- is_enabled = FALSE;
- is_currently_logging = FALSE;
- if ((H5Fget_mdc_logging_status(fid, &is_enabled, &is_currently_logging) < 0) || (is_enabled != TRUE) ||
- (is_currently_logging != TRUE))
+ is_enabled = false;
+ is_currently_logging = false;
+ if ((H5Fget_mdc_logging_status(fid, &is_enabled, &is_currently_logging) < 0) || (is_enabled != true) ||
+ (is_currently_logging != true))
TEST_ERROR;
/* Perform some manipulations */
for (i = 0; i < N_GROUPS; i++) {
memset(group_name, 0, sizeof(group_name));
- HDsnprintf(group_name, sizeof(group_name), "%d", i);
+ snprintf(group_name, sizeof(group_name), "%d", i);
if ((gid = H5Gcreate2(fid, group_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(gid) < 0)
@@ -120,10 +120,10 @@ test_logging_api(void)
/* Turn off logging and check flags */
if (H5Fstop_mdc_logging(fid) < 0)
TEST_ERROR;
- is_enabled = FALSE;
- is_currently_logging = TRUE;
- if ((H5Fget_mdc_logging_status(fid, &is_enabled, &is_currently_logging) < 0) || (is_enabled != TRUE) ||
- (is_currently_logging != FALSE))
+ is_enabled = false;
+ is_currently_logging = true;
+ if ((H5Fget_mdc_logging_status(fid, &is_enabled, &is_currently_logging) < 0) || (is_enabled != true) ||
+ (is_currently_logging != false))
TEST_ERROR;
/* Clean up */
diff --git a/test/cache_tagging.c b/test/cache_tagging.c
index 9af8bf25e77..61b1dbe571d 100644
--- a/test/cache_tagging.c
+++ b/test/cache_tagging.c
@@ -205,7 +205,7 @@ mark_all_entries_investigated(hid_t fid)
entry_ptr = cache_ptr->index[i];
while (entry_ptr != NULL) {
if (!entry_ptr->dirtied)
- entry_ptr->dirtied = TRUE;
+ entry_ptr->dirtied = true;
entry_ptr = entry_ptr->ht_next;
} /* end if */
@@ -247,7 +247,7 @@ reset_all_entries_investigated(hid_t fid)
entry_ptr = cache_ptr->index[i];
while (entry_ptr != NULL) {
if (entry_ptr->dirtied)
- entry_ptr->dirtied = FALSE;
+ entry_ptr->dirtied = false;
entry_ptr = entry_ptr->ht_next;
} /* end if */
@@ -295,7 +295,7 @@ verify_tag(hid_t fid, int id, haddr_t tag)
TEST_ERROR;
/* Mark the entry/tag pair as found */
- entry_ptr->dirtied = TRUE;
+ entry_ptr->dirtied = true;
/* leave now that we've found the entry */
goto done;
@@ -328,7 +328,7 @@ evict_entries(hid_t fid)
mark_all_entries_investigated(fid);
/* setup the skip list prior to calling H5C_flush_cache() */
- if (H5C_set_slist_enabled(f->shared->cache, TRUE, FALSE) < 0)
+ if (H5C_set_slist_enabled(f->shared->cache, true, false) < 0)
TEST_ERROR;
/* Evict all we can from the cache to examine full tag creation tree */
@@ -338,7 +338,7 @@ evict_entries(hid_t fid)
H5C_flush_cache(f, H5C__FLUSH_INVALIDATE_FLAG);
/* shutdown the slist -- allow it to be non-empty */
- if (H5C_set_slist_enabled(f->shared->cache, FALSE, TRUE) < 0)
+ if (H5C_set_slist_enabled(f->shared->cache, false, true) < 0)
TEST_ERROR;
return 0;
@@ -416,11 +416,11 @@ static unsigned
check_file_creation_tags(hid_t fcpl_id, int type)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose test output */
-#endif /* NDEBUG */
- hid_t fapl = -1; /* File access prop list */
+ int verbose = false; /* verbose test output */
+#endif /* NDEBUG */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t sbe_tag = 0;
@@ -517,13 +517,13 @@ static unsigned
check_file_open_tags(hid_t fcpl, int type)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t fapl = -1; /* File access prop list */
- haddr_t root_tag; /* Root Group Tag */
- haddr_t sbe_tag = HADDR_UNDEF; /* Sblock Extension Tag */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
+ haddr_t root_tag; /* Root Group Tag */
+ haddr_t sbe_tag = HADDR_UNDEF; /* Sblock Extension Tag */
/* Testing Macro */
TESTING("tag application during file open");
@@ -643,14 +643,14 @@ static unsigned
check_group_creation_tags(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t gid = -1; /* Group Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Group Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t fapl = -1; /* File access prop list */
- haddr_t root_tag = HADDR_UNDEF; /* Root Group Tag */
- haddr_t g_tag; /* Group Tag */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
+ haddr_t root_tag = HADDR_UNDEF; /* Root Group Tag */
+ haddr_t g_tag; /* Group Tag */
/* Testing Macro */
TESTING("tag application during group creation");
@@ -763,16 +763,16 @@ static unsigned
check_multi_group_creation_tags(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t gid = -1; /* Group Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Group Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- char gname[16]; /* group name buffer */
- int i = 0; /* iterator */
- hid_t fapl = -1; /* File access prop list */
- haddr_t g_tag = 0; /* Group tag value */
- haddr_t root_tag = 0; /* Root group tag value */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ char gname[16]; /* group name buffer */
+ int i = 0; /* iterator */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
+ haddr_t g_tag = 0; /* Group tag value */
+ haddr_t root_tag = 0; /* Root group tag value */
/* Testing Macro */
TESTING("tag application during multiple group creation");
@@ -805,7 +805,7 @@ check_multi_group_creation_tags(void)
for (i = 0; i < MULTIGROUPS; i++) {
- HDsnprintf(gname, sizeof(gname), "%d", i);
+ snprintf(gname, sizeof(gname), "%d", i);
if ((gid = H5Gcreate2(fid, gname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(gid) < 0)
@@ -827,7 +827,7 @@ check_multi_group_creation_tags(void)
for (i = 0; i < MULTIGROUPS; i++) {
/* Re-open the group */
- HDsnprintf(gname, sizeof(gname), "%d", i);
+ snprintf(gname, sizeof(gname), "%d", i);
if ((gid = H5Gopen2(fid, gname, H5P_DEFAULT)) < 0)
TEST_ERROR;
@@ -911,18 +911,18 @@ static unsigned
check_link_iteration_tags(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t sid = -1; /* Group Identifier */
- hid_t did = -1; /* Group Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Group Identifier */
+ hid_t did = H5I_INVALID_HID; /* Group Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- int i = 0; /* iterator */
- haddr_t root_tag = 0; /* Root Group Tag Value */
- char dsetname[500]; /* Name of dataset */
- H5G_info_t ginfo; /* Group Info Struct */
- hid_t fapl = -1; /* File access prop list */
- hid_t root_group = -1; /* Root Group Identifier */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ int i = 0; /* iterator */
+ haddr_t root_tag = 0; /* Root Group Tag Value */
+ char dsetname[500]; /* Name of dataset */
+ H5G_info_t ginfo; /* Group Info Struct */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
+ hid_t root_group = H5I_INVALID_HID; /* Root Group Identifier */
/* Testing Macro */
TESTING("tag application during iteration over links in a group");
@@ -951,7 +951,7 @@ check_link_iteration_tags(void)
/* Create many datasets in root group */
for (i = 0; i < 500; i++) {
- HDsnprintf(dsetname, sizeof(dsetname), "Dset %d", i);
+ snprintf(dsetname, sizeof(dsetname), "Dset %d", i);
if ((did = H5Dcreate2(fid, dsetname, H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
0)
TEST_ERROR;
@@ -1048,19 +1048,19 @@ static unsigned
check_dense_attribute_tags(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t aid = -1; /* File Identifier */
- hid_t sid = -1; /* Group Identifier */
- hid_t did = -1; /* Group Identifier */
- hid_t dcpl = -1; /* Group Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t aid = H5I_INVALID_HID; /* File Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Group Identifier */
+ hid_t did = H5I_INVALID_HID; /* Group Identifier */
+ hid_t dcpl = H5I_INVALID_HID; /* Group Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- int i = 0; /* iterator */
- hid_t fapl = -1; /* File access property list */
- haddr_t d_tag = 0; /* Dataset tag value */
- haddr_t root_tag = 0; /* Root group tag value */
- char attrname[500]; /* Name of attribute */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ int i = 0; /* iterator */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
+ haddr_t d_tag = 0; /* Dataset tag value */
+ haddr_t root_tag = 0; /* Root group tag value */
+ char attrname[500]; /* Name of attribute */
/* Testing Macro */
TESTING("tag application during dense attribute manipulation");
@@ -1111,7 +1111,7 @@ check_dense_attribute_tags(void)
for (i = 0; i < 50; i++) {
- HDsnprintf(attrname, sizeof(attrname), "attr %d", i);
+ snprintf(attrname, sizeof(attrname), "attr %d", i);
if ((aid = H5Acreate2(did, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Awrite(aid, H5T_NATIVE_UINT, &i) < 0)
@@ -1278,12 +1278,12 @@ static unsigned
check_group_open_tags(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t gid = -1; /* Group Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Group Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t fapl = -1; /* File access prop list */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = HADDR_UNDEF;
haddr_t g_tag;
@@ -1404,15 +1404,15 @@ static unsigned
check_attribute_creation_tags(hid_t fcpl, int type)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t aid = -1; /* Attribute Identifier */
- hid_t gid = -1; /* Group Identifier */
- hid_t sid = -1; /* Dataspace Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t aid = H5I_INVALID_HID; /* Attribute Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Group Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t fapl = -1; /* File access prop list */
- haddr_t root_tag = 0; /* Root group tag */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
+ haddr_t root_tag = 0; /* Root group tag */
haddr_t g_tag = 0;
hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; /* dimensions */
@@ -1566,14 +1566,14 @@ static unsigned
check_attribute_open_tags(hid_t fcpl, int type)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t aid = -1; /* Attribute Identifier */
- hid_t gid = -1; /* Group Identifier */
- hid_t sid = -1; /* Dataspace Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t aid = H5I_INVALID_HID; /* Attribute Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Group Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t fapl = -1; /* File access prop list */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t g_tag = 0;
hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */
@@ -1730,21 +1730,21 @@ static unsigned
check_attribute_rename_tags(hid_t fcpl, int type)
{
/* Variable declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t gid = -1; /* Group Identifier */
- hid_t aid = -1; /* Attribute Identifier */
- hid_t sid = -1; /* Dataset Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Group Identifier */
+ hid_t aid = H5I_INVALID_HID; /* Attribute Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataset Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- int *data = NULL; /* data buffer */
- int i, j, k = 0; /* iterators */
- hid_t fapl = -1; /* File access prop list */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ int *data = NULL; /* data buffer */
+ int i, j, k = 0; /* iterators */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t g_tag = 0;
hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; /* dimensions */
- hbool_t persistent_fsms = FALSE;
+ bool persistent_fsms = false;
/* Testing Macro */
TESTING("tag application during attribute renaming");
@@ -1940,21 +1940,21 @@ static unsigned
check_attribute_delete_tags(hid_t fcpl, int type)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t gid = -1; /* Group Identifier */
- hid_t aid = -1; /* Attribute Identifier */
- hid_t sid = -1; /* Dataset Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Group Identifier */
+ hid_t aid = H5I_INVALID_HID; /* Attribute Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataset Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- int *data = NULL; /* data buffer */
- int i, j, k = 0; /* iterators */
- hid_t fapl = -1; /* File access prop list */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ int *data = NULL; /* data buffer */
+ int i, j, k = 0; /* iterators */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t g_tag = 0;
hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; /* dimensions */
- hbool_t persistent_fsms = FALSE;
+ bool persistent_fsms = false;
/* Testing Macro */
TESTING("tag application during attribute delete");
@@ -2129,16 +2129,16 @@ static unsigned
check_dataset_creation_tags(hid_t fcpl, int type)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t did = -1; /* Dataset Identifier */
- hid_t sid = -1; /* Dataspace Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t did = H5I_INVALID_HID; /* Dataset Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t dcpl = -1; /* dataset creation pl */
- hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation pl */
+ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
- hid_t fapl = -1; /* File access prop list */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t d_tag = 0;
hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */
@@ -2286,16 +2286,16 @@ static unsigned
check_dataset_creation_earlyalloc_tags(hid_t fcpl, int type)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t did = -1; /* Dataset Identifier */
- hid_t sid = -1; /* Dataspace Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t did = H5I_INVALID_HID; /* Dataset Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t dcpl = -1; /* dataset creation pl */
- hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation pl */
+ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
- hid_t fapl = -1; /* File access prop list */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t d_tag = 0;
hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */
@@ -2449,16 +2449,16 @@ static unsigned
check_dataset_open_tags(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t did = -1; /* Dataset Identifier */
- hid_t sid = -1; /* Dataspace Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t did = H5I_INVALID_HID; /* Dataset Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t dcpl = -1; /* dataset creation pl */
- hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation pl */
+ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
- hid_t fapl = -1; /* File access prop list */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t d_tag = 0;
hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */
@@ -2598,16 +2598,16 @@ static unsigned
check_dataset_write_tags(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t did = -1; /* Dataset Identifier */
- hid_t sid = -1; /* Dataspace Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t did = H5I_INVALID_HID; /* Dataset Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t dcpl = -1; /* dataset creation pl */
- hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation pl */
+ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
- hid_t fapl = -1; /* File access prop list */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t d_tag = 0;
hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */
@@ -2761,16 +2761,16 @@ static unsigned
check_attribute_write_tags(hid_t fcpl, int type)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t gid = -1; /* Group Identifier */
- hid_t aid = -1; /* Attribute Identifier */
- hid_t sid = -1; /* Dataset Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Group Identifier */
+ hid_t aid = H5I_INVALID_HID; /* Attribute Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataset Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- int *data = NULL; /* data buffer */
- int i, j, k = 0; /* iterators */
- hid_t fapl = -1; /* File access prop list */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ int *data = NULL; /* data buffer */
+ int i, j, k = 0; /* iterators */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t g_tag = 0;
hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */
@@ -2945,16 +2945,16 @@ static unsigned
check_dataset_read_tags(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t did = -1; /* Dataset Identifier */
- hid_t sid = -1; /* Dataspace Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t did = H5I_INVALID_HID; /* Dataset Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t dcpl = -1; /* dataset creation pl */
- hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation pl */
+ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
- hid_t fapl = -1; /* File access prop list */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t d_tag = 0;
hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */
@@ -3104,16 +3104,16 @@ static unsigned
check_dataset_size_retrieval(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t did = -1; /* Dataset Identifier */
- hid_t sid = -1; /* Dataspace Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t did = H5I_INVALID_HID; /* Dataset Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t dcpl = -1; /* dataset creation pl */
- hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation pl */
+ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
- hid_t fapl = -1; /* File access prop list */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t d_tag = 0;
hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */
@@ -3265,16 +3265,16 @@ check_dataset_extend_tags(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t did = -1; /* Dataset Identifier */
- hid_t sid = -1; /* Dataspace Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t did = H5I_INVALID_HID; /* Dataset Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t dcpl = -1; /* dataset creation pl */
- hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation pl */
+ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
- hid_t fapl = -1; /* File access prop list */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t d_tag = 0;
hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */
@@ -3425,12 +3425,12 @@ static unsigned
check_object_info_tags(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t gid = -1; /* Group Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Group Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t fapl = -1; /* File access prop list */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = HADDR_UNDEF;
haddr_t g_tag;
H5O_native_info_t ninfo; /* Native object info struct */
@@ -3557,12 +3557,12 @@ static unsigned
check_object_copy_tags(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t gid = -1; /* Group Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Group Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t fapl = -1; /* File access prop list */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = HADDR_UNDEF;
haddr_t g_tag;
haddr_t copy_tag;
@@ -3702,17 +3702,17 @@ static unsigned
check_link_removal_tags(hid_t fcpl, int type)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t did = -1; /* Dataset Identifier */
- hid_t sid = -1; /* Dataspace Identifier */
- hid_t gid = -1; /* Dataspace Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t did = H5I_INVALID_HID; /* Dataset Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t dcpl = -1; /* dataset creation pl */
- hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation pl */
+ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
- hid_t fapl = -1; /* File access prop list */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t d_tag = 0;
haddr_t g_tag = 0;
@@ -3888,17 +3888,17 @@ check_link_getname_tags(void)
{
/* Variable Declarations */
char name[500];
- hid_t fid = -1; /* File Identifier */
- hid_t did = -1; /* Dataset Identifier */
- hid_t sid = -1; /* Dataspace Identifier */
- hid_t gid = -1; /* Dataspace Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t did = H5I_INVALID_HID; /* Dataset Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t dcpl = -1; /* dataset creation pl */
- hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation pl */
+ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
- hid_t fapl = -1; /* File access prop list */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t d_tag = 0;
haddr_t g_tag = 0;
@@ -4063,13 +4063,13 @@ static unsigned
check_external_link_creation_tags(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t fid2 = -1; /* File Identifier */
- hid_t gid = -1; /* Dataspace Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t fid2 = H5I_INVALID_HID; /* File Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t fapl = -1; /* File access prop list */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
/* Testing Macro */
@@ -4185,16 +4185,16 @@ static unsigned
check_external_link_open_tags(void)
{
/* Variable Declarations */
- haddr_t link_tag = 0; /* link tag */
- hid_t fid = -1; /* File Identifier */
- hid_t fid2 = -1; /* File Identifier */
- hid_t gid = -1; /* Dataspace Identifier */
- hid_t xid = -1; /* Dataspace Identifier */
+ haddr_t link_tag = 0; /* link tag */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t fid2 = H5I_INVALID_HID; /* File Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Dataspace Identifier */
+ hid_t xid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- H5O_native_info_t ninfo; /* Native object info struct */
- hid_t fapl = -1; /* File access prop list */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ H5O_native_info_t ninfo; /* Native object info struct */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t root2_tag = 0;
@@ -4357,12 +4357,12 @@ check_invalid_tag_application(void)
#ifdef H5C_DO_TAGGING_SANITY_CHECKS
/* Variables */
H5F_t *f = NULL;
- hid_t fid = -1;
+ hid_t fid = H5I_INVALID_HID;
haddr_t addr;
H5HL_t *lheap = NULL;
- hid_t fapl = -1; /* File access prop list */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
-#endif /* H5C_DO_TAGGING_SANITY_CHECKS */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
+#endif /* H5C_DO_TAGGING_SANITY_CHECKS */
/* Testing Macro */
TESTING("failure on invalid tag application");
@@ -4382,7 +4382,7 @@ check_invalid_tag_application(void)
/* Push API context */
if (H5CX_push() < 0)
TEST_ERROR;
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Get internal file pointer*/
if (NULL == (f = (H5F_t *)H5VL_object(fid)))
@@ -4420,9 +4420,9 @@ check_invalid_tag_application(void)
TEST_ERROR;
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
TEST_ERROR;
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
/* Close open objects and file */
if (H5Fclose(fid) < 0)
@@ -4440,7 +4440,7 @@ check_invalid_tag_application(void)
#ifdef H5C_DO_TAGGING_SANITY_CHECKS
error:
if (api_ctx_pushed)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
return 1;
#endif /* H5C_DO_TAGGING_SANITY_CHECKS */
@@ -4460,18 +4460,18 @@ int
main(void)
{
/* Variable Declarations */
- hid_t fcpl_default = -1; /* file creation prop list */
- hid_t fcpl_shmesg_all = -1; /* file creation prop list */
- hid_t fcpl = -1; /* file creation prop list */
- unsigned nerrs = 0; /* Error Encountered */
- int test_type = 0; /* test type iterator */
+ hid_t fcpl_default = H5I_INVALID_HID; /* file creation prop list */
+ hid_t fcpl_shmesg_all = H5I_INVALID_HID; /* file creation prop list */
+ hid_t fcpl = H5I_INVALID_HID; /* file creation prop list */
+ unsigned nerrs = 0; /* Error Encountered */
+ int test_type = 0; /* test type iterator */
/* Open the HDF5 Library */
H5open();
/* Only run with sec2/default driver */
if (!h5_using_default_driver(NULL)) {
- HDputs(" -- SKIPPED for incompatible VFD --");
+ puts(" -- SKIPPED for incompatible VFD --");
exit(EXIT_SUCCESS);
}
@@ -4486,7 +4486,7 @@ main(void)
fcpl_shmesg_all = H5Pcreate(H5P_FILE_CREATE);
H5Pset_shared_mesg_nindexes(fcpl_shmesg_all, 1);
H5Pset_shared_mesg_index(fcpl_shmesg_all, 0, H5O_SHMESG_ALL_FLAG, 20);
- H5Pset_file_space_strategy(fcpl_shmesg_all, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)0);
+ H5Pset_file_space_strategy(fcpl_shmesg_all, H5F_FSPACE_STRATEGY_FSM_AGGR, true, (hsize_t)0);
/* ========= */
/* Run Tests */
diff --git a/test/chunk_info.c b/test/chunk_info.c
index cb79dc1a739..9533b2aacee 100644
--- a/test/chunk_info.c
+++ b/test/chunk_info.c
@@ -169,7 +169,7 @@ static int
verify_get_chunk_info(hid_t dset, hid_t dspace, hsize_t chk_index, hsize_t exp_chk_size,
const hsize_t *exp_offset, unsigned exp_flt_msk)
{
- unsigned read_flt_msk = 0; /* Read filter mask */
+ uint32_t read_flt_msk = 0; /* Read filter mask */
hsize_t out_offset[2] = {0, 0}; /* Buffer to get offset coordinates */
hsize_t size = 0; /* Size of an allocated/written chunk */
haddr_t addr = 0; /* Address of an allocated/written chunk */
@@ -210,7 +210,7 @@ verify_get_chunk_info(hid_t dset, hid_t dspace, hsize_t chk_index, hsize_t exp_c
static int
verify_get_chunk_info_by_coord(hid_t dset, hsize_t *offset, hsize_t exp_chk_size, unsigned exp_flt_msk)
{
- unsigned read_flt_msk = 0; /* Read filter mask */
+ uint32_t read_flt_msk = 0; /* Read filter mask */
hsize_t size = 0; /* Size of an allocated/written chunk */
haddr_t addr = 0; /* Address of an allocated/written chunk */
@@ -247,7 +247,7 @@ verify_get_chunk_info_by_coord(hid_t dset, hsize_t *offset, hsize_t exp_chk_size
static int
verify_empty_chunk_info(hid_t dset, hsize_t *offset)
{
- unsigned read_flt_msk = 0; /* Read filter mask */
+ uint32_t read_flt_msk = 0; /* Read filter mask */
hsize_t size = 0; /* Size of an allocated/written chunk */
haddr_t addr = 0; /* Address of an allocated/written chunk */
@@ -319,7 +319,7 @@ verify_selected_chunks(hid_t dset, hid_t plist, const hsize_t *start, const hsiz
{
int read_buf[CHUNK_NX][CHUNK_NY];
int expected_buf[NUM_CHUNKS][CHUNK_NX][CHUNK_NY]; /* Expected data */
- unsigned read_flt_msk = 0; /* Filter mask read back */
+ uint32_t read_flt_msk = 0; /* Filter mask read back */
hsize_t offset[2] = {0, 0}; /* Offset coordinates of a chunk */
hsize_t chk_index; /* Chunk index */
hsize_t ii, jj; /* Array indices */
@@ -434,7 +434,7 @@ verify_idx_nchunks(hid_t dset, hid_t dspace, H5D_chunk_index_t exp_idx_type, hsi
/* Ensure the correct chunk indexing scheme is used */
if (idx_type != exp_idx_type) {
char msg[256];
- HDsnprintf(msg, sizeof(msg), "Should be using %s.\n", index_type_str(idx_type));
+ snprintf(msg, sizeof(msg), "Should be using %s.\n", index_type_str(idx_type));
FAIL_PUTS_ERROR(msg);
}
@@ -494,8 +494,8 @@ test_get_chunk_info_highest_v18(hid_t fapl)
haddr_t addr = 0; /* Address of an allocated/written chunk */
hsize_t chk_index = 0; /* Index of a chunk */
hsize_t dims[2] = {NX, NY}; /* Dataset dimensions */
- unsigned flt_msk = 0; /* Filter mask */
- unsigned read_flt_msk = 0; /* Filter mask after direct read */
+ uint32_t flt_msk = 0; /* Filter mask */
+ uint32_t read_flt_msk = 0; /* Filter mask after direct read */
int fillvalue = -1; /* Fill value */
hsize_t offset[2] = {0, 0}; /* Offset coordinates of a chunk */
#ifdef H5_HAVE_FILTER_DEFLATE
@@ -825,8 +825,8 @@ test_chunk_info_single_chunk(const char *filename, hid_t fapl)
hsize_t chunk_dims[2] = {NX, NY}; /* Chunk dimensions */
int data_buf[NX][NY]; /* Input buffer */
H5D_chunk_index_t idx_type; /* Dataset chunk index type */
- unsigned flt_msk = 0; /* Filter mask */
- unsigned read_flt_msk = 0; /* Filter mask after direct read */
+ uint32_t flt_msk = 0; /* Filter mask */
+ uint32_t read_flt_msk = 0; /* Filter mask after direct read */
hsize_t offset[2]; /* Offset coordinates of a chunk */
hsize_t out_offset[2] = {0, 0}; /* Buffer to get offset coordinates */
hsize_t size = 0; /* Size of an allocated/written chunk */
@@ -970,7 +970,7 @@ test_chunk_info_implicit(char *filename, hid_t fapl)
hid_t cparms = H5I_INVALID_HID; /* Creation plist */
hsize_t dims[2] = {NX, NY}; /* Dataset dimensions */
hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY}; /* Chunk dimensions */
- unsigned flt_msk = 0; /* Filter mask */
+ uint32_t flt_msk = 0; /* Filter mask */
hsize_t chk_index = 0; /* Index of a chunk */
hsize_t ii, jj; /* Array indices */
hsize_t start[2] = {START_CHK_X, START_CHK_Y}; /* Start position */
@@ -1089,8 +1089,8 @@ test_chunk_info_fixed_array(const char *filename, hid_t fapl)
hid_t cparms = H5I_INVALID_HID; /* Creation plist */
hsize_t dims[2] = {NX, NY}; /* Dataset dimensions */
hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY}; /* Chunk dimensions */
- unsigned flt_msk = 0; /* Filter mask */
- unsigned read_flt_msk = 0; /* Filter mask after direct read */
+ uint32_t flt_msk = 0; /* Filter mask */
+ uint32_t read_flt_msk = 0; /* Filter mask after direct read */
hsize_t offset[2]; /* Offset coordinates of a chunk */
hsize_t start[2] = {START_CHK_X, START_CHK_Y}; /* Start position */
hsize_t end[2] = {END_CHK_X, END_CHK_Y}; /* End position */
@@ -1233,8 +1233,8 @@ test_chunk_info_extensible_array(const char *filename, hid_t fapl)
hsize_t dims[2] = {NX, NY}; /* Dataset dimensions */
hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY}; /* Chunk dimensions */
hsize_t maxdims[2] = {H5S_UNLIMITED, NY}; /* One unlimited dimension */
- unsigned flt_msk = 0; /* Filter mask */
- unsigned read_flt_msk = 0; /* Filter mask after direct read */
+ uint32_t flt_msk = 0; /* Filter mask */
+ uint32_t read_flt_msk = 0; /* Filter mask after direct read */
hsize_t offset[2]; /* Offset coordinates of a chunk */
hsize_t start[2] = {START_CHK_X, START_CHK_Y}; /* Start position */
hsize_t end[2] = {END_CHK_X, END_CHK_Y}; /* End position */
@@ -1382,8 +1382,8 @@ test_chunk_info_version2_btrees(const char *filename, hid_t fapl)
hsize_t dims[2] = {NX, NY}; /* Dataset dimensions */
hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY}; /* Chunk dimensions */
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; /* Two unlimited dims */
- unsigned flt_msk = 0; /* Filter mask */
- unsigned read_flt_msk = 0; /* Filter mask after direct read */
+ uint32_t flt_msk = 0; /* Filter mask */
+ uint32_t read_flt_msk = 0; /* Filter mask after direct read */
hsize_t offset[2]; /* Offset coordinates of a chunk */
hsize_t start[2] = {START_CHK_X, START_CHK_Y}; /* Start position */
hsize_t end[2] = {END_CHK_X, END_CHK_Y}; /* End position */
@@ -1579,8 +1579,8 @@ test_basic_query(hid_t fapl)
hsize_t dims[2] = {NX, NY}; /* Dataset dimensions */
hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY}; /* Chunk dimensions */
int direct_buf[CHUNK_NX][CHUNK_NY]; /* Data in chunks */
- unsigned flt_msk = 0; /* Filter mask */
- unsigned read_flt_msk = 0; /* Filter mask after direct read */
+ uint32_t flt_msk = 0; /* Filter mask */
+ uint32_t read_flt_msk = 0; /* Filter mask after direct read */
hsize_t offset[2]; /* Offset coordinates of a chunk */
hsize_t out_offset[2] = {0, 0}; /* Buffer to get offset coordinates */
hsize_t size = 0; /* Size of an allocated/written chunk */
@@ -1797,7 +1797,7 @@ test_failed_attempts(const char *filename, hid_t fapl)
hid_t dset = H5I_INVALID_HID; /* Dataset ID */
hsize_t dims[2] = {NX, NY}; /* Dataset dimensions */
int data_buf[NX][NY]; /* Input buffer */
- unsigned read_flt_msk = 0; /* Filter mask after direct read */
+ uint32_t read_flt_msk = 0; /* Filter mask after direct read */
hsize_t offset[2]; /* Offset coordinates of a chunk */
hsize_t out_offset[2] = {0, 0}; /* Buffer to get offset coordinates */
hsize_t size = 0; /* Size of an allocated/written chunk */
@@ -2009,8 +2009,8 @@ test_flt_msk_with_skip_compress(hid_t fapl)
int check_chunk[CHUNK_NX][CHUNK_NY]; /* Buffer to read data in */
int read_direct_buf[CHUNK_NX][CHUNK_NY]; /* Buffer to read a chunk */
hsize_t read_buf_size = 0; /* buf size */
- unsigned flt_msk = 0; /* Filter mask */
- unsigned read_flt_msk = 0; /* Filter mask after direct read */
+ uint32_t flt_msk = 0; /* Filter mask */
+ uint32_t read_flt_msk = 0; /* Filter mask after direct read */
hsize_t offset[2] = {0, 0}; /* Offset coordinates of a chunk */
hsize_t nchunks = 0; /* Number of chunks */
hsize_t chk_index = 0; /* Index of a chunk */
diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c
index 5e7a6e13d4a..02dbde3759a 100644
--- a/test/cmpd_dset.c
+++ b/test/cmpd_dset.c
@@ -19,7 +19,7 @@
#include "h5test.h"
-static const char *FILENAME[] = {"cmpd_dset", "src_subset", "dst_subset", NULL};
+static const char *FILENAME[] = {"cmpd_dset", "src_subset", "dst_subset", "select_cmpd_dset", NULL};
const char *DSET_NAME[] = {"contig_src_subset", "chunk_src_subset", "contig_dst_subset", "chunk_dst_subset",
NULL};
@@ -78,6 +78,17 @@ typedef struct s6_t {
unsigned int post;
} s6_t;
+typedef struct s7_t {
+ int32_t a;
+ int32_t d;
+} s7_t;
+
+typedef struct s8_t {
+ int64_t a;
+ int64_t b;
+ int64_t c;
+} s8_t;
+
/* Structures for testing the optimization for the Chicago company. */
typedef struct {
int a, b, c[8], d, e;
@@ -85,28 +96,1186 @@ typedef struct {
double k, l, m, n;
} stype1;
-typedef struct {
- int a, b, c[8], d, e;
- float f, g, h[16], i, j;
- double k, l, m, n;
- long o, p, q;
-} stype2;
+typedef struct {
+ int a, b, c[8], d, e;
+ float f, g, h[16], i, j;
+ double k, l, m, n;
+ long o, p, q;
+} stype2;
+
+typedef struct {
+ int a, b, c[8], d, e;
+} stype3;
+
+typedef struct {
+ int a, b, c[8], d, e;
+ float f, g, h[16], i, j;
+ double k, l, m, n;
+ long o, p, q;
+ long long r, s, t;
+} stype4;
+
+#define NX 100U
+#define NY 2000U
+#define PACK_NMEMBS 100
+
+static void initialize_stype1(unsigned char *buf, size_t num);
+static void initialize_stype2(unsigned char *buf, size_t num);
+static void initialize_stype3(unsigned char *buf, size_t num);
+static void initialize_stype4(unsigned char *buf, size_t num);
+static hid_t create_stype1(void);
+static hid_t create_stype2(void);
+static hid_t create_stype3(void);
+static hid_t create_stype4(void);
+static int compare_data(void *src_data, void *dst_data, hbool_t src_subset);
+static int compare_stype4_data(void *expect_buf, void *rbuf);
+static int compare_s1_data(void *expect_buf, void *rbuf);
+static int compare_s1_s3_data(void *expect_buf, void *rbuf);
+static int compare_s7_data(void *expect_buf, void *rbuf);
+static int compare_a_d_data(void *exp1_buf, void *exp2_buf, void *rbuf);
+static int compare_a_b_c_data(void *exp1_buf, void *exp2_buf, void *rbuf);
+
+/*-------------------------------------------------------------------------
+ * Function: compare_stype4_data
+ *
+ * Purpose: Compare data (the common fields in stype4/stype2) read in rbuf with expected data
+ * in expect_buf.
+ *
+ * Return: Success: 0
+ *
+ * Failure: negative
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+compare_stype4_data(void *expect_buf, void *rbuf)
+{
+ int i;
+
+ for (i = 0; i < (int)(NX * NY); i++) {
+ stype4 *s1_ptr;
+ stype4 *s2_ptr;
+ s1_ptr = ((stype4 *)expect_buf) + i;
+ s2_ptr = ((stype4 *)rbuf) + i;
+
+ if (s1_ptr->a != s2_ptr->a || s1_ptr->b != s2_ptr->b || s1_ptr->c[0] != s2_ptr->c[0] ||
+ s1_ptr->c[1] != s2_ptr->c[1] || s1_ptr->c[2] != s2_ptr->c[2] || s1_ptr->c[3] != s2_ptr->c[3] ||
+ s1_ptr->c[4] != s2_ptr->c[4] || s1_ptr->c[5] != s2_ptr->c[5] || s1_ptr->c[6] != s2_ptr->c[6] ||
+ s1_ptr->c[7] != s2_ptr->c[7] || s1_ptr->d != s2_ptr->d || s1_ptr->e != s2_ptr->e ||
+ !H5_FLT_ABS_EQUAL(s1_ptr->f, s2_ptr->f) || !H5_FLT_ABS_EQUAL(s1_ptr->g, s2_ptr->g) ||
+ !H5_FLT_ABS_EQUAL(s1_ptr->h[0], s2_ptr->h[0]) || !H5_FLT_ABS_EQUAL(s1_ptr->h[1], s2_ptr->h[1]) ||
+ !H5_FLT_ABS_EQUAL(s1_ptr->h[2], s2_ptr->h[2]) || !H5_FLT_ABS_EQUAL(s1_ptr->h[3], s2_ptr->h[3]) ||
+ !H5_FLT_ABS_EQUAL(s1_ptr->h[4], s2_ptr->h[4]) || !H5_FLT_ABS_EQUAL(s1_ptr->h[5], s2_ptr->h[5]) ||
+ !H5_FLT_ABS_EQUAL(s1_ptr->h[6], s2_ptr->h[6]) || !H5_FLT_ABS_EQUAL(s1_ptr->h[7], s2_ptr->h[7]) ||
+ !H5_FLT_ABS_EQUAL(s1_ptr->h[8], s2_ptr->h[8]) || !H5_FLT_ABS_EQUAL(s1_ptr->h[9], s2_ptr->h[9]) ||
+ !H5_FLT_ABS_EQUAL(s1_ptr->h[10], s2_ptr->h[10]) ||
+ !H5_FLT_ABS_EQUAL(s1_ptr->h[11], s2_ptr->h[11]) ||
+ !H5_FLT_ABS_EQUAL(s1_ptr->h[12], s2_ptr->h[12]) ||
+ !H5_FLT_ABS_EQUAL(s1_ptr->h[13], s2_ptr->h[13]) ||
+ !H5_FLT_ABS_EQUAL(s1_ptr->h[14], s2_ptr->h[14]) ||
+ !H5_FLT_ABS_EQUAL(s1_ptr->h[15], s2_ptr->h[15]) || !H5_FLT_ABS_EQUAL(s1_ptr->i, s2_ptr->i) ||
+ !H5_FLT_ABS_EQUAL(s1_ptr->j, s2_ptr->j) || !H5_DBL_ABS_EQUAL(s1_ptr->k, s2_ptr->k) ||
+ !H5_DBL_ABS_EQUAL(s1_ptr->l, s2_ptr->l) || !H5_DBL_ABS_EQUAL(s1_ptr->m, s2_ptr->m) ||
+ !H5_DBL_ABS_EQUAL(s1_ptr->n, s2_ptr->n) || s1_ptr->o != s2_ptr->o || s1_ptr->p != s2_ptr->p ||
+ s1_ptr->q != s2_ptr->q) {
+ H5_FAILED();
+ printf(" i=%d\n", i);
+ printf(" exp_buf={a=%d, b=%d, c=[%d,%d,%d,%d,%d,%d,%d,%d], d=%d, e=%d, f=%f, g=%f, "
+ "h=[%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f], i=%f, j=%f, k=%f, l=%f, m=%f, n=%f, "
+ "o=%ld, p=%ld, q=%ld}\n",
+ s1_ptr->a, s1_ptr->b, s1_ptr->c[0], s1_ptr->c[1], s1_ptr->c[2], s1_ptr->c[3], s1_ptr->c[4],
+ s1_ptr->c[5], s1_ptr->c[6], s1_ptr->c[7], s1_ptr->d, s1_ptr->e, (double)s1_ptr->f,
+ (double)s1_ptr->g, (double)s1_ptr->h[0], (double)s1_ptr->h[1], (double)s1_ptr->h[2],
+ (double)s1_ptr->h[3], (double)s1_ptr->h[4], (double)s1_ptr->h[5], (double)s1_ptr->h[6],
+ (double)s1_ptr->h[7], (double)s1_ptr->h[8], (double)s1_ptr->h[9], (double)s1_ptr->h[10],
+ (double)s1_ptr->h[11], (double)s1_ptr->h[12], (double)s1_ptr->h[13], (double)s1_ptr->h[14],
+ (double)s1_ptr->h[15], (double)s1_ptr->i, (double)s1_ptr->j, s1_ptr->k, s1_ptr->l,
+ s1_ptr->m, s1_ptr->n, s1_ptr->o, s1_ptr->p, s1_ptr->q);
+ printf(" rbuf={a=%d, b=%d, c=[%d,%d,%d,%d,%d,%d,%d,%d], d=%d, e=%d, f=%f, g=%f, "
+ "h=[%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f], i=%f, j=%f, k=%f, l=%f, m=%f, n=%f, "
+ "o=%ld, p=%ld, q=%ld}\n",
+ s2_ptr->a, s2_ptr->b, s2_ptr->c[0], s2_ptr->c[1], s2_ptr->c[2], s2_ptr->c[3], s2_ptr->c[4],
+ s2_ptr->c[5], s2_ptr->c[6], s2_ptr->c[7], s2_ptr->d, s2_ptr->e, (double)s2_ptr->f,
+ (double)s2_ptr->g, (double)s2_ptr->h[0], (double)s2_ptr->h[1], (double)s2_ptr->h[2],
+ (double)s2_ptr->h[3], (double)s2_ptr->h[4], (double)s2_ptr->h[5], (double)s2_ptr->h[6],
+ (double)s2_ptr->h[7], (double)s2_ptr->h[8], (double)s2_ptr->h[9], (double)s2_ptr->h[10],
+ (double)s2_ptr->h[11], (double)s2_ptr->h[12], (double)s2_ptr->h[13], (double)s2_ptr->h[14],
+ (double)s2_ptr->h[15], (double)s2_ptr->i, (double)s2_ptr->j, s2_ptr->k, s2_ptr->l,
+ s2_ptr->m, s2_ptr->n, s1_ptr->o, s1_ptr->p, s1_ptr->q);
+
+ goto error;
+ }
+ } /* end for */
+
+ return SUCCEED;
+
+error:
+ return FAIL;
+
+} /* compare_stype4_data() */
+
+/*-------------------------------------------------------------------------
+ * Function: compare_s1_data
+ *
+ * Purpose: Compare data (s1_t) read in rbuf with expected data in expect_buf.
+ *
+ * Return: Success: 0
+ *
+ * Failure: negative
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+compare_s1_data(void *expect_buf, void *rbuf)
+{
+ int i;
+ s1_t *s1_ptr;
+ s1_t *s2_ptr;
+
+ /* Compare save_s1 with rbuf1. They should be the same */
+ for (i = 0; i < (int)(NX * NY); i++) {
+ s1_ptr = ((s1_t *)expect_buf) + i;
+ s2_ptr = ((s1_t *)rbuf) + i;
+
+ if (s1_ptr->a != s2_ptr->a || s1_ptr->b != s2_ptr->b || s1_ptr->c[0] != s2_ptr->c[0] ||
+ s1_ptr->c[1] != s2_ptr->c[1] || s1_ptr->c[2] != s2_ptr->c[2] || s1_ptr->c[3] != s2_ptr->c[3] ||
+ s1_ptr->d != s2_ptr->d || s1_ptr->e != s2_ptr->e) {
+ H5_FAILED();
+ printf(" i=%d\n", i);
+ puts(" Incorrect values read from the file");
+ goto error;
+ }
+ }
+
+ return SUCCEED;
+
+error:
+ return FAIL;
+
+} /* compare_s1_data() */
+
+/*-------------------------------------------------------------------------
+ * Function: compare_s1_s3_data
+ *
+ * Purpose: Compare data (s1_t/s3_t) read in rbuf with expected data in expect_buf.
+ *
+ * Return: Success: 0
+ *
+ * Failure: negative
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+compare_s1_s3_data(void *expect_buf, void *rbuf)
+{
+ int i;
+ s1_t *s1_ptr;
+ s3_t *s2_ptr;
+
+ for (i = 0; i < (int)(NX * NY); i++) {
+ s1_ptr = ((s1_t *)expect_buf) + i;
+ s2_ptr = ((s3_t *)rbuf) + i;
+
+ if (s1_ptr->a != s2_ptr->a || s1_ptr->b != s2_ptr->b || s1_ptr->c[0] != s2_ptr->c[0] ||
+ s1_ptr->c[1] != s2_ptr->c[1] || s1_ptr->c[2] != s2_ptr->c[2] || s1_ptr->c[3] != s2_ptr->c[3] ||
+ s1_ptr->d != s2_ptr->d || s1_ptr->e != s2_ptr->e) {
+ H5_FAILED();
+ printf(" i=%d\n", i);
+ puts(" Incorrect values read from the file");
+ goto error;
+ }
+ }
+
+ return SUCCEED;
+
+error:
+ return FAIL;
+
+} /* compare_s1_s3_data() */
+
+/*-------------------------------------------------------------------------
+ * Function: compare_s7_data
+ *
+ * Purpose: Compare data (s7_t) read in rbuf with expected data in expect_buf.
+ *
+ * Return: Success: 0
+ *
+ * Failure: negative
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+compare_s7_data(void *expect_buf, void *rbuf)
+{
+ int i;
+ s7_t *s1_ptr;
+ s7_t *s2_ptr;
+
+ for (i = 0; i < (int)(NX * NY); i++) {
+ s1_ptr = ((s7_t *)expect_buf) + i;
+ s2_ptr = ((s7_t *)rbuf) + i;
+
+ /* Compare only the data */
+ if (s1_ptr->a != s2_ptr->a || s1_ptr->d != s2_ptr->d) {
+ H5_FAILED();
+ printf(" i=%d\n", i);
+ printf(" expect_buf:a=%d, d=%d\n", s1_ptr->a, s1_ptr->d);
+ printf(" rbuf:a=%d, d=%d", s2_ptr->a, s2_ptr->d);
+ goto error;
+ }
+ } /* end for */
+
+ return SUCCEED;
+
+error:
+ return FAIL;
+
+} /* compare_s7_data() */
+
+/*-------------------------------------------------------------------------
+ * Function: compare_s7_s8_data
+ *
+ * Purpose: Compare data read in rbuf with expected data
+ * in expect_buf: save_s7, save_s8.
+ *
+ * Return: Success: 0
+ *
+ * Failure: negative
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+compare_a_d_data(void *exp1_buf, void *exp2_buf, void *rbuf)
+{
+ int i;
+ s7_t *s1_ptr;
+ s8_t *s2_ptr;
+ s7_t *rbuf_ptr;
+
+ for (i = 0; i < (int)(NX * NY); i++) {
+ s1_ptr = ((s7_t *)exp1_buf) + i;
+ s2_ptr = ((s8_t *)exp2_buf) + i;
+ rbuf_ptr = ((s7_t *)rbuf) + i;
+
+ if (s2_ptr->a != rbuf_ptr->a || s1_ptr->d != rbuf_ptr->d) {
+ H5_FAILED();
+ printf(" i=%d\n", i);
+ printf(" expect_buf:a=%d, d=%d\n", (int32_t)s2_ptr->a, s1_ptr->d);
+ printf(" rbuf: a=%d, d=%d", rbuf_ptr->a, rbuf_ptr->d);
+ goto error;
+ }
+ } /* end for */
+
+ return SUCCEED;
+
+error:
+ return FAIL;
+
+} /* compare_a_d_data() */
+
+/*-------------------------------------------------------------------------
+ * Function: compare_a_b_c_data
+ *
+ * Purpose: Compare data read in rbuf with expected data
+ * in expect_buf: save_s8, save_rbuf8.
+ *
+ * Return: Success: 0
+ *
+ * Failure: negative
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+compare_a_b_c_data(void *exp1_buf, void *exp2_buf, void *rbuf)
+{
+ int i;
+ s8_t *s1_ptr;
+ s8_t *s2_ptr;
+ s8_t *rbuf_ptr;
+
+ for (i = 0; i < (int)(NX * NY); i++) {
+ s1_ptr = ((s8_t *)exp1_buf) + i;
+ s2_ptr = ((s8_t *)exp2_buf) + i;
+ rbuf_ptr = ((s8_t *)rbuf) + i;
+
+ if (s1_ptr->a != rbuf_ptr->a || s2_ptr->b != rbuf_ptr->b || s2_ptr->c != rbuf_ptr->c) {
+ H5_FAILED();
+ printf(" i=%d\n", i);
+ printf(" expect_buf:a=%ld, b=%ld, c=%ld\n", s1_ptr->a, s2_ptr->b, s2_ptr->c);
+ printf(" rbuf: a=%ld, b=%ld, c=%ld", rbuf_ptr->a, rbuf_ptr->b, rbuf_ptr->c);
+ goto error;
+ }
+ } /* end for */
+
+ return SUCCEED;
+
+error:
+ return FAIL;
+
+} /* compare_a_b_c_data() */
+
+/*-------------------------------------------------------------------------
+ * Function: test_select_src_subset
+ *
+ * Purpose: This is derived from test_hdf5_src_subset() for selection
+ * I/O testing:
+ *
+ * Test the optimization of compound data writing, rewriting,
+ * and reading when the source type is a subset of the destination
+ * type. For example:
+ * struct source { struct destination {
+ * TYPE1 A; --> TYPE1 A;
+ * TYPE2 B; --> TYPE2 B;
+ * TYPE3 C; --> TYPE3 C;
+ * }; TYPE4 D;
+ * TYPE5 E;
+ * };
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ *-------------------------------------------------------------------------
+ */
+static unsigned
+test_select_src_subset(char *fname, hid_t fapl, hid_t in_dxpl, unsigned set_fillvalue, unsigned set_buf)
+{
+ hid_t fid = H5I_INVALID_HID;
+ hid_t rew_tid = H5I_INVALID_HID, src_tid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
+ hid_t dxpl = H5I_INVALID_HID;
+ hsize_t dims[2] = {NX, NY};
+ hsize_t chunk_dims[2] = {NX / 10, NY / 10};
+ unsigned char *rew_buf = NULL, *save_rew_buf = NULL, *rbuf = NULL;
+ int fillvalue = (-1);
+ size_t ss, ss1, ss2;
+
+ /* Create the file for this test */
+ if ((fid = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ goto error;
+
+ /* Build hdf5 datatypes */
+ if ((src_tid = create_stype1()) < 0)
+ goto error;
+
+ if ((rew_tid = create_stype3()) < 0)
+ goto error;
+
+ /* Create the data space */
+ if ((sid = H5Screate_simple(2, dims, NULL)) < 0)
+ goto error;
+
+ /* Allocate space and initialize data */
+ rbuf = (unsigned char *)calloc(NX * NY, sizeof(stype3));
+
+ rew_buf = (unsigned char *)calloc(NX * NY, sizeof(stype3));
+ initialize_stype3(rew_buf, (size_t)NX * NY);
+
+ /* Save a copy as the buffer may be clobbered due to H5Pset_modify_write_buf() */
+ save_rew_buf = (unsigned char *)calloc(NX * NY, sizeof(stype3));
+ initialize_stype3(save_rew_buf, (size_t)NX * NY);
+
+ /* Create dataset creation property list */
+ if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ goto error;
+
+ /*
+ * Create contiguous and chunked datasets.
+ * Write to the datasets in a different compound subset order
+ */
+ printf(" test_select_src_subset(): writing data to contiguous and chunked datasets");
+
+ if (set_fillvalue) {
+ if (H5Pset_fill_value(dcpl, src_tid, &fillvalue) < 0)
+ goto error;
+ }
+
+ dxpl = H5Pcopy(in_dxpl);
+ if (set_buf) {
+ ss1 = H5Tget_size(rew_tid);
+ ss2 = H5Tget_size(src_tid);
+ ss = MAX(ss1, ss2) * NX * NY;
+
+ if (H5Pset_buffer(dxpl, ss, NULL, NULL) < 0)
+ goto error;
+ }
+
+ /* Create contiguous data set */
+ if ((did = H5Dcreate2(fid, DSET_NAME[0], src_tid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ goto error;
+
+ /* Write to the dataset with rew_tid */
+ if (H5Dwrite(did, rew_tid, H5S_ALL, H5S_ALL, dxpl, rew_buf) < 0)
+ goto error;
+
+ if (H5Dread(did, rew_tid, H5S_ALL, H5S_ALL, dxpl, rbuf) < 0)
+ goto error;
+
+ if (memcmp(save_rew_buf, rbuf, sizeof(stype3) * NX * NY) != 0)
+ goto error;
+
+ if (H5Dclose(did) < 0)
+ goto error;
+
+ /* Set chunking */
+ if (H5Pset_chunk(dcpl, 2, chunk_dims) < 0)
+ goto error;
+
+ /* Create chunked data set */
+ if ((did = H5Dcreate2(fid, DSET_NAME[1], src_tid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ goto error;
+
+ /* Write to the dataset with rew_tid */
+ if (H5Dwrite(did, rew_tid, H5S_ALL, H5S_ALL, dxpl, rew_buf) < 0)
+ FAIL_STACK_ERROR;
+
+ if (H5Dread(did, rew_tid, H5S_ALL, H5S_ALL, dxpl, rbuf) < 0)
+ goto error;
+
+ if (memcmp(save_rew_buf, rbuf, sizeof(stype3) * NX * NY) != 0)
+ goto error;
+
+ if (H5Dclose(did) < 0)
+ goto error;
+
+ /* Finishing test and release resources */
+ if (H5Sclose(sid) < 0)
+ FAIL_STACK_ERROR;
+
+ if (H5Pclose(dcpl) < 0)
+ FAIL_STACK_ERROR;
+
+ if (H5Pclose(dxpl) < 0)
+ FAIL_STACK_ERROR;
+
+ if (H5Tclose(src_tid) < 0)
+ FAIL_STACK_ERROR;
+
+ if (H5Tclose(rew_tid) < 0)
+ FAIL_STACK_ERROR;
+
+ if (H5Fclose(fid) < 0)
+ FAIL_STACK_ERROR;
+
+ free(rbuf);
+ free(rew_buf);
+ free(save_rew_buf);
+
+ PASSED();
+ return 0;
+
+error:
+ H5E_BEGIN_TRY
+ {
+ H5Sclose(sid);
+ H5Pclose(dcpl);
+ H5Pclose(dxpl);
+ H5Dclose(did);
+ H5Fclose(fid);
+ H5Tclose(src_tid);
+ H5Tclose(rew_tid);
+ }
+ H5E_END_TRY
+
+ if (rbuf)
+ free(rbuf);
+ if (rew_buf)
+ free(rew_buf);
+ if (save_rew_buf)
+ free(save_rew_buf);
+
+ printf("\n*** SELECT SRC SUBSET TEST FAILED ***\n");
+ return 1;
+} /* test_select_src_subset() */
+
+/*-------------------------------------------------------------------------
+ * Function: test_select_dst_subset
+ *
+ * Purpose: This is derived from test_hdf5_dst_subset() for selection
+ * I/O testing:
+
+ * Test the optimization of compound data writing, rewriting,
+ * and reading when the destination type is a subset of the
+ * source type. For example:
+ * struct source { struct destination {
+ * TYPE1 A; --> TYPE1 A;
+ * TYPE2 B; --> TYPE2 B;
+ * TYPE3 C; --> TYPE3 C;
+ * TYPE4 D; }
+ * TYPE5 E;
+ * };
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ *-------------------------------------------------------------------------
+ */
+static unsigned
+test_select_dst_subset(char *fname, hid_t fapl, hid_t in_dxpl, unsigned set_fillvalue, unsigned set_buf)
+{
+ hid_t fid = H5I_INVALID_HID;
+ hid_t rew_tid = H5I_INVALID_HID, src_tid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
+ hid_t dxpl = H5I_INVALID_HID;
+ hsize_t dims[2] = {NX, NY};
+ hsize_t chunk_dims[2] = {NX / 10, NY / 10};
+ unsigned char *rew_buf = NULL, *save_rew_buf = NULL, *rbuf = NULL;
+ int fillvalue = (-1);
+ size_t ss, ss1, ss2;
+
+ /* Create the file for this test */
+ if ((fid = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ goto error;
+
+ /* Build hdf5 datatypes */
+ if ((src_tid = create_stype2()) < 0)
+ goto error;
+
+ if ((rew_tid = create_stype4()) < 0)
+ goto error;
+
+ /* Create the data space */
+ if ((sid = H5Screate_simple(2, dims, NULL)) < 0)
+ goto error;
+
+ rbuf = (unsigned char *)calloc(NX * NY, sizeof(stype4));
+
+ rew_buf = (unsigned char *)calloc(NX * NY, sizeof(stype4));
+ initialize_stype4(rew_buf, (size_t)NX * NY);
+
+ /* Save a copy as the buffer may be clobbered due to H5Pset_modify_write_buf() */
+ save_rew_buf = (unsigned char *)calloc(NX * NY, sizeof(stype4));
+ initialize_stype4(save_rew_buf, (size_t)NX * NY);
+
+ /* Create dataset creation property list */
+ if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ goto error;
+
+ /*
+ * Write data to contiguous and chunked datasets.
+ */
+ printf(" test_select_dst_subset(): writing data to contiguous and chunked datasets");
+
+ if (set_fillvalue) {
+ if (H5Pset_fill_value(dcpl, src_tid, &fillvalue) < 0)
+ goto error;
+ }
+
+ dxpl = H5Pcopy(in_dxpl);
+ if (set_buf) {
+ ss1 = H5Tget_size(rew_tid);
+ ss2 = H5Tget_size(src_tid);
+ ss = MAX(ss1, ss2) * NX * NY;
+
+ if (H5Pset_buffer(dxpl, ss, NULL, NULL) < 0)
+ goto error;
+ }
+
+ /* Create contiguous data set */
+ if ((did = H5Dcreate2(fid, DSET_NAME[2], src_tid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ goto error;
+
+ /* Write to the dataset with rew_tid */
+ if (H5Dwrite(did, rew_tid, H5S_ALL, H5S_ALL, dxpl, rew_buf) < 0)
+ goto error;
+
+ /* Read from the dataset with rew_tid */
+ if (H5Dread(did, rew_tid, H5S_ALL, H5S_ALL, dxpl, rbuf) < 0)
+ goto error;
+
+ if (compare_stype4_data(save_rew_buf, rbuf) < 0)
+ goto error;
+
+ if (H5Dclose(did) < 0)
+ goto error;
+
+ /* Set chunking */
+ if (H5Pset_chunk(dcpl, 2, chunk_dims) < 0)
+ goto error;
+
+ /* Create chunked data set */
+ if ((did = H5Dcreate2(fid, DSET_NAME[3], src_tid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ goto error;
+
+ initialize_stype4(rew_buf, (size_t)NX * NY);
+
+ /* Write data to the dataset with rew_tid */
+ if (H5Dwrite(did, rew_tid, H5S_ALL, H5S_ALL, dxpl, rew_buf) < 0)
+ goto error;
+
+ /* Read frm the dataset with rew_tid */
+ if (H5Dread(did, rew_tid, H5S_ALL, H5S_ALL, dxpl, rbuf) < 0)
+ goto error;
+
+ if (compare_stype4_data(save_rew_buf, rbuf) < 0)
+ goto error;
+
+ if (H5Dclose(did) < 0)
+ goto error;
+
+ /* Finishing test and release resources */
+ if (H5Sclose(sid) < 0)
+ goto error;
+
+ if (H5Pclose(dcpl) < 0)
+ goto error;
+
+ if (H5Pclose(dxpl) < 0)
+ FAIL_STACK_ERROR;
+
+ if (H5Tclose(src_tid) < 0)
+ goto error;
+
+ if (H5Tclose(rew_tid) < 0)
+ goto error;
+ if (H5Fclose(fid) < 0)
+ goto error;
+
+ free(rbuf);
+ free(rew_buf);
+ free(save_rew_buf);
+
+ PASSED();
+ return 0;
-typedef struct {
- int a, b, c[8], d, e;
-} stype3;
+error:
+ H5E_BEGIN_TRY
+ {
+ H5Sclose(sid);
+ H5Pclose(dcpl);
+ H5Pclose(dxpl);
+ H5Dclose(did);
+ H5Fclose(fid);
+ H5Tclose(src_tid);
+ H5Tclose(rew_tid);
+ }
+ H5E_END_TRY
-typedef struct {
- int a, b, c[8], d, e;
- float f, g, h[16], i, j;
- double k, l, m, n;
- long o, p, q;
- long long r, s, t;
-} stype4;
+ if (rbuf)
+ free(rbuf);
+ if (rew_buf)
+ free(rew_buf);
+ if (save_rew_buf)
+ free(save_rew_buf);
-#define NX 100U
-#define NY 2000U
-#define PACK_NMEMBS 100
+ printf("\n*** SELECT DST SUBSET TEST FAILED ***\n");
+ return 1;
+} /* test_select_dst_subset */
+
+/*-------------------------------------------------------------------------
+ * Function: test_select_compound
+ *
+ * Purpose: This is derived from test_comppound() for selection I/O
+ * testing:
+ *
+ * --Creates a simple dataset of a compound type and then
+ * writes it in original and reverse order.
+ * --Creates another dataset to verify the CI window
+ * is fixed.
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ *-------------------------------------------------------------------------
+ */
+static unsigned
+test_select_compound(char *fname, hid_t fapl, hid_t in_dxpl, unsigned set_fillvalue, unsigned set_buf)
+{
+ hid_t s1_tid = H5I_INVALID_HID;
+ hid_t s3_tid = H5I_INVALID_HID;
+ hid_t s7_tid = H5I_INVALID_HID;
+ hid_t s8_tid = H5I_INVALID_HID;
+
+ /* Buffers */
+ s1_t *s1 = NULL;
+ s1_t *save_s1 = NULL;
+ s3_t *s3 = NULL;
+ s3_t *save_s3 = NULL;
+ s1_t *rbuf1 = NULL;
+ s3_t *rbuf3 = NULL;
+
+ s7_t *s7 = NULL;
+ s7_t *save_s7 = NULL;
+ s7_t *rbuf7 = NULL;
+
+ s8_t *s8 = NULL;
+ s8_t *save_s8 = NULL;
+ s8_t *rbuf8 = NULL;
+ s8_t *save_rbuf8 = NULL;
+
+ /* Other variables */
+ unsigned int i;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
+ hid_t dxpl = H5I_INVALID_HID;
+ hid_t array_dt = H5I_INVALID_HID;
+ static hsize_t dim[] = {NX, NY};
+ int fillvalue = (-1);
+ size_t ss = 0, ss1 = 0, ss2 = 0;
+ hsize_t memb_size[1] = {4};
+
+ /* Allocate buffers */
+ if (NULL == (s1 = (s1_t *)calloc(NX * NY, sizeof(s1_t))))
+ goto error;
+ if (NULL == (save_s1 = (s1_t *)calloc(NX * NY, sizeof(s1_t))))
+ goto error;
+ if (NULL == (rbuf1 = (s1_t *)calloc(NX * NY, sizeof(s1_t))))
+ goto error;
+ if (NULL == (s3 = (s3_t *)calloc(NX * NY, sizeof(s3_t))))
+ goto error;
+ if (NULL == (save_s3 = (s3_t *)calloc(NX * NY, sizeof(s3_t))))
+ goto error;
+ if (NULL == (rbuf3 = (s3_t *)calloc(NX * NY, sizeof(s3_t))))
+ goto error;
+
+ if (NULL == (s7 = (s7_t *)calloc(NX * NY, sizeof(s7_t))))
+ goto error;
+ if (NULL == (save_s7 = (s7_t *)calloc(NX * NY, sizeof(s7_t))))
+ goto error;
+ if (NULL == (rbuf7 = (s7_t *)calloc(NX * NY, sizeof(s7_t))))
+ goto error;
+
+ if (NULL == (s8 = (s8_t *)calloc(NX * NY, sizeof(s8_t))))
+ goto error;
+ if (NULL == (save_s8 = (s8_t *)calloc(NX * NY, sizeof(s8_t))))
+ goto error;
+ if (NULL == (rbuf8 = (s8_t *)calloc(NX * NY, sizeof(s8_t))))
+ goto error;
+ if (NULL == (save_rbuf8 = (s8_t *)calloc(NX * NY, sizeof(s8_t))))
+ goto error;
+
+ /* Create the file */
+ if ((fid = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) {
+ goto error;
+ }
+
+ /* Create the data space */
+ if ((sid = H5Screate_simple(2, dim, NULL)) < 0)
+ goto error;
+
+ /* Create dataset creation property list */
+ if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ goto error;
+
+ /* Create a copy of the incoming dataset transfer property list */
+ if ((dxpl = H5Pcopy(in_dxpl)) < 0)
+ goto error;
+
+ /*
+ * Create and write to the dataset in original compound struct members order
+ */
+ printf(" test_select_compound(): basic compound write");
+
+ /* Initialize buffer with s1_t */
+ for (i = 0; i < NX * NY; i++) {
+ s1[i].a = 8 * i + 0;
+ s1[i].b = 2000 + 2 * i;
+ s1[i].c[0] = 8 * i + 2;
+ s1[i].c[1] = 8 * i + 3;
+ s1[i].c[2] = 8 * i + 4;
+ s1[i].c[3] = 8 * i + 5;
+ s1[i].d = 2001 + 2 * i;
+ s1[i].e = 8 * i + 7;
+ }
+ memcpy(save_s1, s1, sizeof(s1_t) * NX * NY);
+
+ /* Create file type s1_t */
+ if ((s1_tid = H5Tcreate(H5T_COMPOUND, sizeof(s1_t))) < 0)
+ goto error;
+ array_dt = H5Tarray_create2(H5T_NATIVE_INT, 1, memb_size);
+ if (H5Tinsert(s1_tid, "a", HOFFSET(s1_t, a), H5T_NATIVE_INT) < 0 ||
+ H5Tinsert(s1_tid, "b", HOFFSET(s1_t, b), H5T_NATIVE_INT) < 0 ||
+ H5Tinsert(s1_tid, "c", HOFFSET(s1_t, c), array_dt) < 0 ||
+ H5Tinsert(s1_tid, "d", HOFFSET(s1_t, d), H5T_NATIVE_INT) < 0 ||
+ H5Tinsert(s1_tid, "e", HOFFSET(s1_t, e), H5T_NATIVE_INT) < 0)
+ goto error;
+ H5Tclose(array_dt);
+
+ /* Set fill value accordingly */
+ if (set_fillvalue) {
+ if (H5Pset_fill_value(dcpl, s1_tid, &fillvalue) < 0)
+ goto error;
+ }
+
+ /* Create the dataset with file type s1_tid */
+ if ((did = H5Dcreate2(fid, "s1", s1_tid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ goto error;
+
+ /* Set buffer size accordingly */
+ if (set_buf) {
+ ss1 = H5Tget_size(s1_tid);
+
+ if (H5Pset_buffer(dxpl, ss1, NULL, NULL) < 0)
+ goto error;
+ }
+
+ /* Write to the dataset with file type s1_tid */
+ if (H5Dwrite(did, s1_tid, H5S_ALL, H5S_ALL, dxpl, s1) < 0)
+ goto error;
+
+ /* Read from the dataset with file type s1_tid */
+ if (H5Dread(did, s1_tid, H5S_ALL, H5S_ALL, dxpl, rbuf1) < 0)
+ goto error;
+
+ /* Verify data is correct */
+ if (compare_s1_data(save_s1, rbuf1) < 0)
+ goto error;
+
+ PASSED();
+
+ /*
+ * Write to the dataset with s3 memory buffer. This buffer
+ * has the same data space but the data type is different: the
+ * data type is a struct whose members are in the opposite order.
+ */
+ printf(" test_select_compound(): reversal of struct members");
+
+ /* Create mem type s3_tid */
+ if ((s3_tid = H5Tcreate(H5T_COMPOUND, sizeof(s3_t))) < 0)
+ goto error;
+ array_dt = H5Tarray_create2(H5T_NATIVE_INT, 1, memb_size);
+ if (H5Tinsert(s3_tid, "a", HOFFSET(s3_t, a), H5T_NATIVE_INT) < 0 ||
+ H5Tinsert(s3_tid, "b", HOFFSET(s3_t, b), H5T_NATIVE_INT) < 0 ||
+ H5Tinsert(s3_tid, "c", HOFFSET(s3_t, c), array_dt) < 0 ||
+ H5Tinsert(s3_tid, "d", HOFFSET(s3_t, d), H5T_NATIVE_INT) < 0 ||
+ H5Tinsert(s3_tid, "e", HOFFSET(s3_t, e), H5T_NATIVE_INT) < 0)
+ goto error;
+ H5Tclose(array_dt);
+
+ /* Initialize buffer with s3_t */
+ for (i = 0; i < NX * NY; i++) {
+ s3[i].a = 8 * i + 0;
+ s3[i].b = 2000 + 2 * i;
+ s3[i].c[0] = 8 * i + 2;
+ s3[i].c[1] = 8 * i + 3;
+ s3[i].c[2] = 8 * i + 4;
+ s3[i].c[3] = 8 * i + 5;
+ s3[i].d = 2001 + 2 * i;
+ s3[i].e = 8 * i + 7;
+ }
+
+ memcpy(save_s3, s3, sizeof(s3_t) * NX * NY);
+
+ /* Set buffer size accordingly */
+ if (set_buf) {
+ /* ss1 is set already previously */
+ ss2 = H5Tget_size(s3_tid);
+ ss = MAX(ss1, ss2) * NX * NY;
+
+ if (H5Pset_buffer(dxpl, ss, NULL, NULL) < 0)
+ goto error;
+ }
+
+ /* Read from the dataset with mem type s3_tid */
+ if (H5Dread(did, s3_tid, H5S_ALL, H5S_ALL, dxpl, rbuf3) < 0)
+ goto error;
+
+ if (compare_s1_s3_data(save_s1, rbuf3) < 0)
+ goto error;
+
+ if (H5Dclose(did) < 0)
+ goto error;
+
+ PASSED();
+
+ printf(" test_select_compound(): verify fix for non-optimized compound conversions with memory type "
+ "larger than file ");
+
+ /* Create file type s7_tid */
+ if ((s7_tid = H5Tcreate(H5T_COMPOUND, sizeof(s7_t))) < 0)
+ goto error;
+
+ if (H5Tinsert(s7_tid, "a", HOFFSET(s7_t, a), H5T_NATIVE_INT32) < 0 ||
+ H5Tinsert(s7_tid, "d", HOFFSET(s7_t, d), H5T_NATIVE_INT32) < 0)
+ goto error;
+
+ /* Initialize buffer with s7_t */
+ for (i = 0; i < NX * NY; i++) {
+ s7[i].a = (int32_t)(2 * i);
+ s7[i].d = (int32_t)(2 * i + 1);
+ }
+ memcpy(save_s7, s7, sizeof(s7_t) * NX * NY);
+
+ /* Create mem type s8_tid */
+ if ((s8_tid = H5Tcreate(H5T_COMPOUND, sizeof(s8_t))) < 0)
+ goto error;
+
+ if (H5Tinsert(s8_tid, "a", HOFFSET(s8_t, a), H5T_NATIVE_INT64) < 0 ||
+ H5Tinsert(s8_tid, "b", HOFFSET(s8_t, b), H5T_NATIVE_INT64) < 0 ||
+ H5Tinsert(s8_tid, "c", HOFFSET(s8_t, c), H5T_NATIVE_INT64) < 0)
+ goto error;
+
+ /* Initialize buffer with s8_t */
+ for (i = 0; i < NX * NY; i++) {
+ s8[i].a = (int64_t)(2 * NX * NY + 3 * i);
+ s8[i].b = (int64_t)(2 * NX * NY + 3 * i + 1);
+ s8[i].c = (int64_t)(2 * NX * NY + 3 * i + 2);
+ }
+ memcpy(save_s8, s8, sizeof(s8_t) * NX * NY);
+
+ /* Set fill value accordingly */
+ if (set_fillvalue) {
+ if (H5Pset_fill_value(dcpl, s7_tid, &fillvalue) < 0)
+ goto error;
+ }
+
+ /* Set buffer size accordingly */
+ if (set_buf) {
+ ss1 = H5Tget_size(s7_tid);
+ ss2 = H5Tget_size(s8_tid);
+ ss = MAX(ss1, ss2) * NX * NY;
+
+ if (H5Pset_buffer(dxpl, ss, NULL, NULL) < 0)
+ goto error;
+ }
+
+ /* Create dataset with file type s7_tid */
+ if ((did = H5Dcreate2(fid, "ss", s7_tid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ goto error;
+
+ /* Write to the dataset with mem type s7_tid */
+ if (H5Dwrite(did, s7_tid, H5S_ALL, H5S_ALL, dxpl, s7) < 0)
+ goto error;
+
+ /* Read from the dataset with mem type s7_tid */
+ if (H5Dread(did, s7_tid, H5S_ALL, H5S_ALL, dxpl, rbuf7) < 0)
+ goto error;
+
+ /* Verify data read is correct */
+ if (compare_s7_data(save_s7, rbuf7) < 0)
+ goto error;
+
+ /* Write to the dataset with mem type s8_tid */
+ if (H5Dwrite(did, s8_tid, H5S_ALL, H5S_ALL, dxpl, s8) < 0)
+ goto error;
+
+ /* Read from the dataset with mem type s7_tid */
+ memset(rbuf7, 0, NX * NY * sizeof(s7_t));
+ if (H5Dread(did, s7_tid, H5S_ALL, H5S_ALL, dxpl, rbuf7) < 0)
+ goto error;
+
+ /* Verify a: save_s8, d: save_s7 */
+ if (compare_a_d_data(save_s7, save_s8, rbuf7) < 0)
+ goto error;
+
+ /* Initialize read buffer of s8_t with unique values */
+ for (i = 0; i < NX * NY; i++) {
+ rbuf8[i].a = (int64_t)(5 * NX * NY + 3 * i);
+ rbuf8[i].b = (int64_t)(5 * NX * NY + 3 * i + 1);
+ rbuf8[i].c = (int64_t)(5 * NX * NY + 3 * i + 2);
+ }
+ memcpy(save_rbuf8, rbuf8, sizeof(s8_t) * NX * NY);
+
+ /* Read from the dataset with mem type s8_tid */
+ if (H5Dread(did, s8_tid, H5S_ALL, H5S_ALL, dxpl, rbuf8) < 0)
+ goto error;
+
+ /* Verify a: save_s8; b, c: save_rbuf8 */
+ if (compare_a_b_c_data(save_s8, save_rbuf8, rbuf8) < 0)
+ goto error;
+
+ if (H5Dclose(did) < 0)
+ goto error;
+
+ PASSED();
+
+ /*
+ * Release resources.
+ */
+ if (H5Sclose(sid) < 0)
+ goto error;
+
+ if (H5Pclose(dcpl) < 0)
+ goto error;
+
+ if (H5Pclose(dxpl) < 0)
+ goto error;
+
+ if (H5Tclose(s1_tid) < 0)
+ goto error;
+
+ if (H5Tclose(s3_tid) < 0)
+ goto error;
+
+ if (H5Tclose(s7_tid) < 0)
+ goto error;
+
+ if (H5Tclose(s8_tid) < 0)
+ goto error;
+
+ if (H5Fclose(fid) < 0)
+ goto error;
+
+ /* Release buffers */
+ free(s1);
+ free(s3);
+ free(save_s3);
+ free(rbuf1);
+ free(rbuf3);
+ free(s7);
+ free(save_s7);
+ free(s8);
+ free(save_s8);
+ free(rbuf7);
+ free(rbuf8);
+ free(save_rbuf8);
+
+ return 0;
+
+error:
+ H5E_BEGIN_TRY
+ {
+ H5Sclose(sid);
+ H5Pclose(dcpl);
+ H5Pclose(dxpl);
+ H5Dclose(did);
+ H5Fclose(fid);
+ H5Tclose(s1_tid);
+ H5Tclose(s3_tid);
+ H5Tclose(s7_tid);
+ H5Tclose(s8_tid);
+ }
+ H5E_END_TRY
+
+ /* Release resources */
+ if (s1)
+ free(s1);
+ if (s3)
+ free(s3);
+ if (save_s3)
+ free(save_s3);
+ if (rbuf1)
+ free(rbuf1);
+ if (rbuf3)
+ free(rbuf3);
+ if (s7)
+ free(s7);
+ if (save_s7)
+ free(save_s7);
+ if (s8)
+ free(s8);
+ if (save_s8)
+ free(save_s8);
+ if (rbuf7)
+ free(rbuf7);
+ if (rbuf8)
+ free(rbuf8);
+ if (save_rbuf8)
+ free(save_rbuf8);
+
+ printf("\n*** SELECT COMPOUND DATASET TESTS FAILED ***\n");
+ return 1;
+} /* test_select_compound() */
+
+/*
+ * Purpose: Tests for selection I/O with compound types:
+ * --set_cache: set chunk cache to 0 or not
+ * via H5Pset_cache(fapl...)
+ * --set_fillvalue: set fill value or not
+ * via H5Pset_fill_value(dcpl...)
+ * --select_io: enable selection I/O or not
+ * via H5Pset_selection_io(dxpl...)
+ * --mwbuf: with or without modifying write buffers
+ * via H5Pset_modify_write_buf(dxpl...)
+ * --set_buf: with or without setting the maximum size
+ * for the type conversion buffer and background buffer
+ * via H5Pset_buffer(dxpl...)
+ *
+ * These tests will test the selection I/O pipeline in particular
+ * triggering H5D__scatgath_read()/write(),
+ * H5D__scatgath_write_select_read()/write(),
+ * and with/without the optimized compound read/write.
+ */
+static unsigned
+test_compounds_selection_io(void)
+{
+ unsigned nerrs = 0;
+ unsigned set_cache; /* Set cache to 0 or not */
+ unsigned set_fillvalue; /* Set fill value or not */
+ unsigned select_io; /* Enable selection I/O or not */
+ unsigned mwbuf; /* With or without modifying write buffers */
+ unsigned set_buf; /* With or without H5Pset_buffer */
+ hid_t fapl = -1;
+ hid_t dxpl = -1;
+ char fname[256];
+
+ fapl = h5_fileaccess();
+ h5_fixname(FILENAME[3], fapl, fname, sizeof(fname));
+
+ for (set_cache = FALSE; set_cache <= TRUE; set_cache++) {
+ for (set_fillvalue = FALSE; set_fillvalue <= TRUE; set_fillvalue++) {
+ for (select_io = FALSE; select_io <= TRUE; select_io++) {
+ for (mwbuf = FALSE; mwbuf <= TRUE; mwbuf++) {
+ for (set_buf = FALSE; set_buf <= TRUE; set_buf++) {
+
+ if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ goto error;
+
+ if (set_cache) {
+ printf(" With chunk cache set 0, ");
+ if (H5Pset_cache(fapl, 0, (size_t)0, (size_t)0, 0.0) < 0)
+ goto error;
+ }
+ else
+ printf(" With default chunk cache, ");
+
+ if (set_fillvalue)
+ printf("set fill value, ");
+ else
+ printf("not set fill value, ");
+
+ if (select_io) {
+ printf("selection I/O ON, ");
+ if (H5Pset_selection_io(dxpl, H5D_SELECTION_IO_MODE_ON) < 0)
+ goto error;
+ }
+ else
+ printf("selection I/O OFF, ");
+
+ if (mwbuf) {
+ printf("with modify write buf, ");
+ if (H5Pset_modify_write_buf(dxpl, TRUE) < 0)
+ goto error;
+ }
+ else
+ printf("without modify write buf, ");
+
+ if (set_buf)
+ printf("with H5Pset_buffer:\n");
+ else
+ printf("without H5Pset_buffer:\n");
+
+ nerrs += test_select_compound(fname, fapl, dxpl, set_fillvalue, set_buf);
+ nerrs += test_select_src_subset(fname, fapl, dxpl, set_fillvalue, set_buf);
+ nerrs += test_select_dst_subset(fname, fapl, dxpl, set_fillvalue, set_buf);
+
+ if (H5Pclose(dxpl) < 0)
+ goto error;
+
+ } /* set_buf */
+ } /* mwbuf */
+ } /* select_io */
+ } /* set_fillvalue */
+ } /* set_cache */
+
+ if (H5Pclose(fapl) < 0)
+ goto error;
+
+ if (nerrs)
+ goto error;
+
+ return 0;
+
+error:
+ printf("*** COMPOUNDS TESTS FOR SELECTION I/O FAILED ***");
+
+ return 1;
+} /* test_compounds_selection_io() */
/*-------------------------------------------------------------------------
* Function: test_compound
@@ -202,7 +1371,7 @@ test_compound(char *filename, hid_t fapl)
goto error;
if ((ret_code = H5Pget_preserve(PRESERVE)) != 0) {
printf("Preserve status of dataset transfer property list should be"
- " 0 (FALSE), got %d\n",
+ " 0 (false), got %d\n",
ret_code);
goto error;
}
@@ -210,7 +1379,7 @@ test_compound(char *filename, hid_t fapl)
goto error;
if ((ret_code = H5Pget_preserve(PRESERVE)) != 1) {
printf("Preserve status of dataset transfer property list should be"
- " 1 (TRUE), got %d\n",
+ " 1 (true), got %d\n",
ret_code);
goto error;
}
@@ -286,7 +1455,7 @@ test_compound(char *filename, hid_t fapl)
s1[i].c[1] != s2[i].c[1] || s1[i].c[2] != s2[i].c[2] || s1[i].c[3] != s2[i].c[3] ||
s1[i].d != s2[i].d || s1[i].e != s2[i].e) {
H5_FAILED();
- HDputs(" Incorrect values read from the file");
+ puts(" Incorrect values read from the file");
goto error;
}
}
@@ -323,7 +1492,7 @@ test_compound(char *filename, hid_t fapl)
s1[i].c[1] != s3[i].c[1] || s1[i].c[2] != s3[i].c[2] || s1[i].c[3] != s3[i].c[3] ||
s1[i].d != s3[i].d || s1[i].e != s3[i].e) {
H5_FAILED();
- HDputs(" Incorrect values read from the file");
+ puts(" Incorrect values read from the file");
goto error;
}
}
@@ -353,7 +1522,7 @@ test_compound(char *filename, hid_t fapl)
for (i = 0; i < NX * NY; i++) {
if (s1[i].b != s4[i].b || s1[i].d != s4[i].d) {
H5_FAILED();
- HDputs(" Incorrect values read from the file");
+ puts(" Incorrect values read from the file");
goto error;
}
}
@@ -397,7 +1566,7 @@ test_compound(char *filename, hid_t fapl)
s1[i].c[1] != s5[i].c[1] || s1[i].c[2] != s5[i].c[2] || s1[i].c[3] != s5[i].c[3] ||
s1[i].d != s5[i].d || s1[i].e != s5[i].e) {
H5_FAILED();
- HDputs(" Incorrect values read from the file");
+ puts(" Incorrect values read from the file");
goto error;
}
}
@@ -407,7 +1576,7 @@ test_compound(char *filename, hid_t fapl)
if (s5[i].pre != 1000 + 4 * i || s5[i].mid1 != 1001 + 4 * i || s5[i].mid2 != 1002 + 4 * i ||
s5[i].post != 1003 + 4 * i) {
H5_FAILED();
- HDputs(" Memory values were clobbered");
+ puts(" Memory values were clobbered");
goto error;
}
}
@@ -466,7 +1635,7 @@ test_compound(char *filename, hid_t fapl)
s1[i].c[1] != s6[i].c[1] || s1[i].c[2] != s6[i].c[2] || s1[i].c[3] != s6[i].c[3] ||
s1[i].d != s6[i].d || s1[i].e != s6[i].e) {
H5_FAILED();
- HDputs(" Incorrect values read from the file");
+ puts(" Incorrect values read from the file");
goto error;
}
}
@@ -476,7 +1645,7 @@ test_compound(char *filename, hid_t fapl)
if (s6[i].pre != 1000 + 4 * i || s6[i].mid1 != 1001 + 4 * i || s6[i].mid2 != 1002 + 4 * i ||
s6[i].post != 1003 + 4 * i) {
H5_FAILED();
- HDputs(" Memory values were clobbered");
+ puts(" Memory values were clobbered");
goto error;
}
}
@@ -545,7 +1714,7 @@ test_compound(char *filename, hid_t fapl)
s2[i].c[1] != s1[i].c[1] || s2[i].c[2] != s1[i].c[2] || s2[i].c[3] != s1[i].c[3] ||
s2[i].d != s1[i].d || s2[i].e != s1[i].e) {
H5_FAILED();
- HDputs(" Incorrect values read from file");
+ puts(" Incorrect values read from file");
goto error;
}
}
@@ -588,7 +1757,7 @@ test_compound(char *filename, hid_t fapl)
if (ps8->a != ps1->a || ps8->b != ps1->b || ps8->c[0] != ps1->c[0] || ps8->c[1] != ps1->c[1] ||
ps8->c[2] != ps1->c[2] || ps8->c[3] != ps1->c[3] || ps8->d != ps1->d || ps8->e != ps1->e) {
H5_FAILED();
- HDputs(" Incorrect values read from file");
+ puts(" Incorrect values read from file");
goto error;
}
}
@@ -627,7 +1796,7 @@ test_compound(char *filename, hid_t fapl)
ps2->c[1] != ps1->c[1] || ps2->c[2] != ps1->c[2] || ps2->c[3] != ps1->c[3] ||
ps2->d != ps1->d || ps2->e != ps1->e) {
H5_FAILED();
- HDputs(" Memory values clobbered");
+ puts(" Memory values clobbered");
goto error;
}
}
@@ -636,7 +1805,7 @@ test_compound(char *filename, hid_t fapl)
ps2->c[1] != (unsigned)(-1) || ps2->c[2] != (unsigned)(-1) ||
ps2->c[3] != (unsigned)(-1) || ps2->d != (unsigned)(-1) || ps2->e != (unsigned)(-1)) {
H5_FAILED();
- HDputs(" Incorrect values read from file");
+ puts(" Incorrect values read from file");
goto error;
}
}
@@ -675,7 +1844,7 @@ test_compound(char *filename, hid_t fapl)
ps5->c[2] != ps1->c[2] || ps5->c[3] != ps1->c[3] || ps5->mid2 != (unsigned)(-1) ||
ps5->d != ps1->d || ps5->e != ps1->e || ps5->post != (unsigned)(-1)) {
H5_FAILED();
- HDputs(" Memory values clobbered");
+ puts(" Memory values clobbered");
goto error;
}
}
@@ -686,7 +1855,7 @@ test_compound(char *filename, hid_t fapl)
ps5->c[3] != (unsigned)(-1) || ps5->mid2 != (unsigned)(-1) || ps5->d != (unsigned)(-1) ||
ps5->e != (unsigned)(-1) || ps5->post != (unsigned)(-1)) {
H5_FAILED();
- HDputs(" Incorrect values read from file");
+ puts(" Incorrect values read from file");
goto error;
}
}
@@ -735,7 +1904,7 @@ test_compound(char *filename, hid_t fapl)
ps1->c[1] != 8 * (i * NY + j) + 3 || ps1->c[2] != 8 * (i * NY + j) + 4 ||
ps1->c[3] != 8 * (i * NY + j) + 5 || ps1->e != 8 * (i * NY + j) + 7) {
H5_FAILED();
- HDputs(" Write clobbered values");
+ puts(" Write clobbered values");
goto error;
}
@@ -743,14 +1912,14 @@ test_compound(char *filename, hid_t fapl)
j < f_offset[1] + h_size[1]) {
if (ps1->b != (unsigned)(-1) || ps1->d != (unsigned)(-1)) {
H5_FAILED();
- HDputs(" Wrong values written or read");
+ puts(" Wrong values written or read");
goto error;
}
}
else {
if (ps1->b != 8 * (i * NY + j) + 1 || ps1->d != 8 * (i * NY + j) + 6) {
H5_FAILED();
- HDputs(" Write clobbered values");
+ puts(" Write clobbered values");
goto error;
}
}
@@ -776,7 +1945,7 @@ test_compound(char *filename, hid_t fapl)
return 0;
error:
- HDputs("*** DATASET TESTS FAILED ***");
+ puts("*** DATASET TESTS FAILED ***");
/* Release resources */
if (s1)
@@ -1159,7 +2328,7 @@ create_stype4(void)
*-------------------------------------------------------------------------
*/
static int
-compare_data(void *src_data, void *dst_data, hbool_t src_subset)
+compare_data(void *src_data, void *dst_data, bool src_subset)
{
stype1 *s_ptr;
stype2 *d_ptr;
@@ -1220,7 +2389,7 @@ compare_data(void *src_data, void *dst_data, hbool_t src_subset)
* Function: test_hdf5_src_subset
*
* Purpose: Test the optimization of compound data writing, rewriting,
- * and reading when the source type is a subset of destination
+ * and reading when the source type is a subset of the destination
* type. For example:
* struct source { struct destination {
* TYPE1 A; --> TYPE1 A;
@@ -1324,7 +2493,7 @@ test_hdf5_src_subset(char *filename, hid_t fapl)
if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
FAIL_STACK_ERROR;
- if (H5Pset_preserve(dxpl, TRUE) < 0)
+ if (H5Pset_preserve(dxpl, true) < 0)
FAIL_STACK_ERROR;
/* Rewrite contiguous data set */
@@ -1364,7 +2533,7 @@ test_hdf5_src_subset(char *filename, hid_t fapl)
if (H5Dread(dataset, dst_tid, H5S_ALL, H5S_ALL, dxpl, rbuf) < 0)
FAIL_STACK_ERROR;
- if (compare_data(orig, rbuf, TRUE) < 0)
+ if (compare_data(orig, rbuf, true) < 0)
TEST_ERROR;
if (H5Dclose(dataset) < 0)
@@ -1377,7 +2546,7 @@ test_hdf5_src_subset(char *filename, hid_t fapl)
if (H5Dread(dataset, dst_tid, H5S_ALL, H5S_ALL, dxpl, rbuf) < 0)
FAIL_STACK_ERROR;
- if (compare_data(orig, rbuf, TRUE) < 0)
+ if (compare_data(orig, rbuf, true) < 0)
TEST_ERROR;
if (H5Dclose(dataset) < 0)
@@ -1414,7 +2583,7 @@ test_hdf5_src_subset(char *filename, hid_t fapl)
free(rbuf);
free(rew_buf);
- HDputs("*** DATASET TESTS FAILED ***");
+ puts("*** DATASET TESTS FAILED ***");
return 1;
}
@@ -1432,7 +2601,7 @@ test_hdf5_src_subset(char *filename, hid_t fapl)
* TYPE5 E;
* };
* This optimization is for the Chicago company. This test
- * is in opposite of test_hdf5_src_subset.
+ * is the opposite of test_hdf5_src_subset.
*
* Return: Success: 0
*
@@ -1527,7 +2696,7 @@ test_hdf5_dst_subset(char *filename, hid_t fapl)
if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
goto error;
- if (H5Pset_preserve(dxpl, TRUE) < 0)
+ if (H5Pset_preserve(dxpl, true) < 0)
goto error;
/* Rewrite contiguous data set */
@@ -1567,7 +2736,7 @@ test_hdf5_dst_subset(char *filename, hid_t fapl)
if (H5Dread(dataset, dst_tid, H5S_ALL, H5S_ALL, dxpl, rbuf) < 0)
goto error;
- if (compare_data(orig, rbuf, FALSE) < 0)
+ if (compare_data(orig, rbuf, false) < 0)
goto error;
if (H5Dclose(dataset) < 0)
@@ -1580,7 +2749,7 @@ test_hdf5_dst_subset(char *filename, hid_t fapl)
if (H5Dread(dataset, dst_tid, H5S_ALL, H5S_ALL, dxpl, rbuf) < 0)
goto error;
- if (compare_data(orig, rbuf, FALSE) < 0)
+ if (compare_data(orig, rbuf, false) < 0)
goto error;
if (H5Dclose(dataset) < 0)
@@ -1613,7 +2782,7 @@ test_hdf5_dst_subset(char *filename, hid_t fapl)
return 0;
error:
- HDputs("*** DATASET TESTS FAILED ***");
+ puts("*** DATASET TESTS FAILED ***");
return 1;
}
@@ -1686,9 +2855,9 @@ test_pack_ooo(void)
for (extra_space = 0; extra_space < 2; extra_space++) {
if (extra_space)
- HDputs("With extra space at the end of compound...");
+ puts("With extra space at the end of compound...");
else
- HDputs("Without extra space at the end of compound...");
+ puts("Without extra space at the end of compound...");
TESTING("random member insertion with empty compound subtype");
@@ -1702,7 +2871,7 @@ test_pack_ooo(void)
/* Insert the compound members in the random order previously generated */
for (i = 0; i < PACK_NMEMBS; i++) {
- HDsnprintf(name, sizeof(name), "%05d", i);
+ snprintf(name, sizeof(name), "%05d", i);
if (i == sub_cmpd_order) {
if (H5Tinsert(cmpd, name, (size_t)(4 * order[i]), sub_cmpd) < 0)
PACK_OOO_ERROR
@@ -1735,7 +2904,7 @@ test_pack_ooo(void)
/* Insert the compound members in the random order previously generated */
for (i = 0; i < PACK_NMEMBS; i++) {
- HDsnprintf(name, sizeof(name), "%05d", i);
+ snprintf(name, sizeof(name), "%05d", i);
if (i == sub_cmpd_order) {
if (H5Tinsert(cmpd, name, (size_t)(4 * order[i]), sub_cmpd) < 0)
PACK_OOO_ERROR
@@ -1770,7 +2939,7 @@ test_pack_ooo(void)
/* Insert the compound members in reverse order, with compound last */
for (i = 0; i < PACK_NMEMBS; i++) {
- HDsnprintf(name, sizeof(name), "%05d", i);
+ snprintf(name, sizeof(name), "%05d", i);
if (i == PACK_NMEMBS - 1) {
if (H5Tinsert(cmpd, name, (size_t)(4 * (PACK_NMEMBS - i - 1)), sub_cmpd) < 0)
PACK_OOO_ERROR
@@ -1803,7 +2972,7 @@ test_pack_ooo(void)
/* Insert the compound members in reverse order, with compound last */
for (i = 0; i < PACK_NMEMBS; i++) {
- HDsnprintf(name, sizeof(name), "%05d", i);
+ snprintf(name, sizeof(name), "%05d", i);
if (i == PACK_NMEMBS - 1) {
if (H5Tinsert(cmpd, name, (size_t)(4 * (PACK_NMEMBS - i - 1)), sub_cmpd) < 0)
PACK_OOO_ERROR
@@ -1838,7 +3007,7 @@ test_pack_ooo(void)
/* Insert the compound members in forward order, with compound first */
for (i = 0; i < PACK_NMEMBS; i++) {
- HDsnprintf(name, sizeof(name), "%05d", i);
+ snprintf(name, sizeof(name), "%05d", i);
if (i == 0) {
if (H5Tinsert(cmpd, name, (size_t)(4 * i), sub_cmpd) < 0)
PACK_OOO_ERROR
@@ -1871,7 +3040,7 @@ test_pack_ooo(void)
/* Insert the compound members in forward order */
for (i = 0; i < PACK_NMEMBS; i++) {
- HDsnprintf(name, sizeof(name), "%05d", i);
+ snprintf(name, sizeof(name), "%05d", i);
if (i == 0) {
if (H5Tinsert(cmpd, name, (size_t)(4 * i), sub_cmpd) < 0)
PACK_OOO_ERROR
@@ -1898,7 +3067,7 @@ test_pack_ooo(void)
return 0;
error:
- HDputs("*** DATASET TESTS FAILED ***");
+ puts("*** DATASET TESTS FAILED ***");
return 1;
}
@@ -1920,10 +3089,10 @@ test_pack_ooo(void)
static unsigned
test_ooo_order(char *filename, hid_t fapl_id)
{
- hid_t file = -1; /* File ID */
- hid_t dtype = -1; /* Datatype IDs */
- hid_t dtype_tmp = -1; /* Temp Datatype ID */
- H5T_t *dt = NULL; /* Datatype pointer */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t dtype = H5I_INVALID_HID; /* Datatype IDs */
+ hid_t dtype_tmp = H5I_INVALID_HID; /* Temp Datatype ID */
+ H5T_t *dt = NULL; /* Datatype pointer */
TESTING("that compound member insertion order is preserved");
@@ -2138,7 +3307,7 @@ test_ooo_order(char *filename, hid_t fapl_id)
H5Fclose(file);
}
H5E_END_TRY
- HDputs("*** DATASET TESTS FAILED ***");
+ puts("*** DATASET TESTS FAILED ***");
return 1;
} /* test_ooo_order */
@@ -2165,7 +3334,7 @@ main(int argc, char *argv[])
/* Turn off optimized compound converter? */
if (argc > 1) {
- if (argc > 2 || HDstrcmp("--noopt", argv[1]) != 0) {
+ if (argc > 2 || strcmp("--noopt", argv[1]) != 0) {
fprintf(stderr, "usage: %s [--noopt]\n", argv[0]);
exit(EXIT_FAILURE);
}
@@ -2173,26 +3342,29 @@ main(int argc, char *argv[])
(H5T_conv_t)((void (*)(void))H5T__conv_struct_opt));
}
+ printf("Testing compound dataset for selection I/O cases----\n");
+ nerrors += test_compounds_selection_io();
+
/* Create the file */
fapl_id = h5_fileaccess();
h5_fixname(FILENAME[0], fapl_id, fname, sizeof(fname));
- HDputs("Testing compound dataset:");
+ puts("Testing compound dataset:");
nerrors += test_compound(fname, fapl_id);
- HDputs("Testing the optimization of when the source type is a subset of the dest:");
+ puts("Testing the optimization of when the source type is a subset of the dest:");
h5_fixname(FILENAME[1], fapl_id, fname, sizeof(fname));
nerrors += test_hdf5_src_subset(fname, fapl_id);
- HDputs("Testing the optimization of when the dest type is a subset of the source:");
+ puts("Testing the optimization of when the dest type is a subset of the source:");
h5_fixname(FILENAME[2], fapl_id, fname, sizeof(fname));
nerrors += test_hdf5_dst_subset(fname, fapl_id);
- HDputs("Testing that compound types can be packed out of order:");
+ puts("Testing that compound types can be packed out of order:");
nerrors += test_pack_ooo();
- HDputs("Testing compound member ordering:");
+ puts("Testing compound member ordering:");
nerrors += test_ooo_order(fname, fapl_id);
/* Verify symbol table messages are cached */
@@ -2204,6 +3376,6 @@ main(int argc, char *argv[])
}
h5_cleanup(FILENAME, fapl_id);
- HDputs("All compound dataset tests passed.");
+ puts("All compound dataset tests passed.");
return 0;
}
diff --git a/test/cmpd_dtransform.c b/test/cmpd_dtransform.c
index bb611108a7d..8fd3788a9ab 100644
--- a/test/cmpd_dtransform.c
+++ b/test/cmpd_dtransform.c
@@ -46,8 +46,8 @@ main(void)
/* Compound datatype */
if (NULL == (atts = malloc(sizeof(att_t))))
TEST_ERROR;
- HDstrcpy(atts[0].name, "Name");
- HDstrcpy(atts[0].unit, "Unit");
+ strcpy(atts[0].name, "Name");
+ strcpy(atts[0].unit, "Unit");
/* String type */
if ((str_dtyp_id = H5Tcopy(H5T_C_S1)) < 0)
@@ -113,9 +113,9 @@ main(void)
FAIL_STACK_ERROR;
/* Verify attribute */
- if (HDstrcmp(atts_res[0].name, atts[0].name) != 0)
+ if (strcmp(atts_res[0].name, atts[0].name) != 0)
TEST_ERROR;
- if (HDstrcmp(atts_res[0].unit, atts[0].unit) != 0)
+ if (strcmp(atts_res[0].unit, atts[0].unit) != 0)
TEST_ERROR;
/* Read the data */
diff --git a/test/cork.c b/test/cork.c
index d67d18b92e2..e0a7196b601 100644
--- a/test/cork.c
+++ b/test/cork.c
@@ -65,14 +65,14 @@
/* ===================== */
/* Tests */
-static unsigned test_objs_cork(hbool_t swmr, hbool_t new_format);
-static unsigned test_dset_cork(hbool_t swmr, hbool_t new_format);
+static unsigned test_objs_cork(bool swmr, bool new_format);
+static unsigned test_dset_cork(bool swmr, bool new_format);
static unsigned verify_old_dset_cork(void);
-static unsigned verify_obj_dset_cork(hbool_t swmr);
-static unsigned verify_dset_cork(hbool_t swmr, hbool_t new_format);
-static unsigned verify_group_cork(hbool_t swmr);
-static unsigned verify_named_cork(hbool_t swmr);
-static unsigned verify_multiple_cork(hbool_t swmr);
+static unsigned verify_obj_dset_cork(bool swmr);
+static unsigned verify_dset_cork(bool swmr, bool new_format);
+static unsigned verify_group_cork(bool swmr);
+static unsigned verify_named_cork(bool swmr);
+static unsigned verify_multiple_cork(bool swmr);
/*-------------------------------------------------------------------------
* Function: verify_old_dset_cork
@@ -133,7 +133,7 @@ verify_old_dset_cork(void)
TEST_ERROR;
/* Verify cork status */
- if (H5C__verify_cork_tag_test(fid, oinfo.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo.token, true) < 0)
TEST_ERROR;
/* Set up data array */
@@ -154,7 +154,7 @@ verify_old_dset_cork(void)
TEST_ERROR;
/* Verify the cork status for DSET_BT1 */
- if (H5C__verify_cork_tag_test(fid, oinfo.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo.token, true) < 0)
TEST_ERROR;
/* Create compact dataset: DSET_COMPACT */
@@ -178,7 +178,7 @@ verify_old_dset_cork(void)
TEST_ERROR;
/* Verify cork status */
- if (H5C__verify_cork_tag_test(fid, oinfo2.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo2.token, true) < 0)
TEST_ERROR;
/* Closing */
@@ -226,11 +226,11 @@ verify_old_dset_cork(void)
TEST_ERROR;
/* Verify the cork status for DSET_CONTIG */
- if (H5C__verify_cork_tag_test(fid, oinfo3.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo3.token, true) < 0)
TEST_ERROR;
/* Verify the cork status for DSET_BT1 */
- if (H5C__verify_cork_tag_test(fid, oinfo.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo.token, false) < 0)
TEST_ERROR;
/* Un-cork the dataset: DSET_CONTIG */
@@ -238,7 +238,7 @@ verify_old_dset_cork(void)
TEST_ERROR;
/* Verify the cork status for DSET_CONTIG */
- if (H5C__verify_cork_tag_test(fid, oinfo3.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo3.token, false) < 0)
TEST_ERROR;
/* Closing */
@@ -291,7 +291,7 @@ verify_old_dset_cork(void)
*-------------------------------------------------------------------------
*/
static unsigned
-verify_obj_dset_cork(hbool_t swmr)
+verify_obj_dset_cork(bool swmr)
{
/* Variable Declarations */
hid_t fid = H5I_INVALID_HID; /* File ID */
@@ -342,7 +342,7 @@ verify_obj_dset_cork(hbool_t swmr)
TEST_ERROR;
/* Verify cork status of the dataset: DSET */
- if (H5C__verify_cork_tag_test(fid, oinfo.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo.token, false) < 0)
TEST_ERROR;
/* Cork the dataset: DSET */
@@ -354,7 +354,7 @@ verify_obj_dset_cork(hbool_t swmr)
TEST_ERROR;
/* Verify cork status of the dataset: DSET */
- if (H5C__verify_cork_tag_test(fid, oinfo.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo.token, true) < 0)
TEST_ERROR;
/* Close the attribute */
@@ -362,7 +362,7 @@ verify_obj_dset_cork(hbool_t swmr)
TEST_ERROR;
/* Verify cork status of the dataset: DSET */
- if (H5C__verify_cork_tag_test(fid, oinfo.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo.token, true) < 0)
TEST_ERROR;
/* Create dcpl */
@@ -390,7 +390,7 @@ verify_obj_dset_cork(hbool_t swmr)
/* Attach 8 attributes to the dataset */
for (i = 0; i < 8; i++) {
- HDsnprintf(attrname, sizeof(attrname), "attr %d", i);
+ snprintf(attrname, sizeof(attrname), "attr %d", i);
if ((aid = H5Acreate2(did2, attrname, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Awrite(aid, H5T_NATIVE_INT, &i) < 0)
@@ -400,7 +400,7 @@ verify_obj_dset_cork(hbool_t swmr)
} /* end for */
/* Verify cork status of the dataset: DSET_NONE */
- if (H5C__verify_cork_tag_test(fid, oinfo2.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo2.token, true) < 0)
TEST_ERROR;
/* Closing */
@@ -429,7 +429,7 @@ verify_obj_dset_cork(hbool_t swmr)
TEST_ERROR;
/* Verify cork status of the dataset: DSET */
- if (H5C__verify_cork_tag_test(fid, oinfo2.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo2.token, false) < 0)
TEST_ERROR;
/* Open the attribute attached to the dataset object: DSET_NONE */
@@ -442,7 +442,7 @@ verify_obj_dset_cork(hbool_t swmr)
TEST_ERROR;
/* Verify cork status of the dataset: DSET_NONE */
- if (H5C__verify_cork_tag_test(fid, oinfo2.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo2.token, true) < 0)
TEST_ERROR;
/* Close the attribute */
@@ -450,7 +450,7 @@ verify_obj_dset_cork(hbool_t swmr)
TEST_ERROR;
/* Verify cork status of the dataset: DSET */
- if (H5C__verify_cork_tag_test(fid, oinfo.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo.token, true) < 0)
TEST_ERROR;
/* Closing */
@@ -494,7 +494,7 @@ verify_obj_dset_cork(hbool_t swmr)
*-------------------------------------------------------------------------
*/
static unsigned
-verify_dset_cork(hbool_t swmr, hbool_t new_format)
+verify_dset_cork(bool swmr, bool new_format)
{
/* Variable Declarations */
hid_t fid = H5I_INVALID_HID; /* File ID */
@@ -568,7 +568,7 @@ verify_dset_cork(hbool_t swmr, hbool_t new_format)
TEST_ERROR;
/* Verify cork status */
- if (H5C__verify_cork_tag_test(fid, oinfo.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo.token, true) < 0)
TEST_ERROR;
/* Create chunked dataset with fixed array indexing: DSET_FA */
@@ -590,11 +590,11 @@ verify_dset_cork(hbool_t swmr, hbool_t new_format)
TEST_ERROR;
/* Verify the cork status for DSET_FA */
- if (H5C__verify_cork_tag_test(fid, oinfo2.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo2.token, true) < 0)
TEST_ERROR;
/* Verify the cork status for DSET_EA */
- if (H5C__verify_cork_tag_test(fid, oinfo.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo.token, false) < 0)
TEST_ERROR;
/* Create chunked dataset with v2-Btree indexing */
@@ -613,7 +613,7 @@ verify_dset_cork(hbool_t swmr, hbool_t new_format)
TEST_ERROR;
/* Verify the cork status for DSET_BT2 */
- if (H5C__verify_cork_tag_test(fid, oinfo3.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo3.token, true) < 0)
TEST_ERROR;
/* Closing */
@@ -664,7 +664,7 @@ verify_dset_cork(hbool_t swmr, hbool_t new_format)
TEST_ERROR;
/* Verify the cork status for DSET_EA */
- if (H5C__verify_cork_tag_test(fid, oinfo.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo.token, false) < 0)
TEST_ERROR;
/* Open and write to the dataset: DSET_FA */
@@ -678,7 +678,7 @@ verify_dset_cork(hbool_t swmr, hbool_t new_format)
TEST_ERROR;
/* Verify the cork status for DSET_FA */
- if (H5C__verify_cork_tag_test(fid, oinfo2.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo2.token, true) < 0)
TEST_ERROR;
/* Open and write to the dataset: DSET_BT2 */
@@ -688,7 +688,7 @@ verify_dset_cork(hbool_t swmr, hbool_t new_format)
TEST_ERROR;
/* Verify the cork status for DSET_BT2 */
- if (H5C__verify_cork_tag_test(fid, oinfo3.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo3.token, false) < 0)
TEST_ERROR;
/* Cork the dataset: DSET_BT2 */
@@ -696,7 +696,7 @@ verify_dset_cork(hbool_t swmr, hbool_t new_format)
TEST_ERROR;
/* Verify the cork status for DSET_BT2 */
- if (H5C__verify_cork_tag_test(fid, oinfo3.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo3.token, true) < 0)
TEST_ERROR;
/* Closing */
@@ -750,7 +750,7 @@ verify_dset_cork(hbool_t swmr, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static unsigned
-verify_group_cork(hbool_t swmr)
+verify_group_cork(bool swmr)
{
/* Variable Declarations */
hid_t fid = H5I_INVALID_HID; /* File ID */
@@ -806,11 +806,11 @@ verify_group_cork(hbool_t swmr)
TEST_ERROR;
/* Verify cork status of the groups */
- if (H5C__verify_cork_tag_test(fid, oinfo.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo.token, false) < 0)
TEST_ERROR;
- if (H5C__verify_cork_tag_test(fid, oinfo2.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo2.token, true) < 0)
TEST_ERROR;
- if (H5C__verify_cork_tag_test(fid, oinfo3.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo3.token, false) < 0)
TEST_ERROR;
/* Close the second group: GRP2 */
@@ -822,7 +822,7 @@ verify_group_cork(hbool_t swmr)
FAIL_STACK_ERROR;
/* Verify cork status of the second group: GRP2 */
- if (H5C__verify_cork_tag_test(fid, oinfo2.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo2.token, false) < 0)
TEST_ERROR;
/* Closing */
@@ -854,7 +854,7 @@ verify_group_cork(hbool_t swmr)
/* Attach 8 attributes to the third group: GRP3 */
for (i = 0; i < 8; i++) {
- HDsnprintf(attrname, sizeof(attrname), "attr %d", i);
+ snprintf(attrname, sizeof(attrname), "attr %d", i);
if ((aid = H5Acreate2(gid3, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Awrite(aid, H5T_NATIVE_UINT, &i) < 0)
@@ -863,7 +863,7 @@ verify_group_cork(hbool_t swmr)
if (i == 3) {
if (H5Odisable_mdc_flushes(gid3) < 0)
TEST_ERROR;
- if (H5C__verify_cork_tag_test(fid, oinfo3.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo3.token, true) < 0)
TEST_ERROR;
}
if (H5Aclose(aid) < 0)
@@ -871,7 +871,7 @@ verify_group_cork(hbool_t swmr)
} /* end for */
/* Verify cork status of the third group: GRP3 */
- if (H5C__verify_cork_tag_test(fid, oinfo3.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo3.token, true) < 0)
TEST_ERROR;
/* Closing */
@@ -917,7 +917,7 @@ verify_group_cork(hbool_t swmr)
*-------------------------------------------------------------------------
*/
static unsigned
-verify_named_cork(hbool_t swmr)
+verify_named_cork(bool swmr)
{
/* Variable Declarations */
hid_t fid = H5I_INVALID_HID; /* File ID */
@@ -995,11 +995,11 @@ verify_named_cork(hbool_t swmr)
TEST_ERROR;
/* Verify cork status of the named datatypes */
- if (H5C__verify_cork_tag_test(fid, oinfo.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo.token, true) < 0)
TEST_ERROR;
- if (H5C__verify_cork_tag_test(fid, oinfo2.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo2.token, false) < 0)
TEST_ERROR;
- if (H5C__verify_cork_tag_test(fid, oinfo3.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo3.token, true) < 0)
TEST_ERROR;
/* Close the datatypes */
@@ -1019,11 +1019,11 @@ verify_named_cork(hbool_t swmr)
FAIL_STACK_ERROR;
/* Verify cork status of the named datatypes */
- if (H5C__verify_cork_tag_test(fid, oinfo.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo.token, false) < 0)
TEST_ERROR;
- if (H5C__verify_cork_tag_test(fid, oinfo2.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo2.token, false) < 0)
TEST_ERROR;
- if (H5C__verify_cork_tag_test(fid, oinfo3.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo3.token, false) < 0)
TEST_ERROR;
/* Closing */
@@ -1069,7 +1069,7 @@ verify_named_cork(hbool_t swmr)
/* Attach 8 attributes to datatype: DT3 */
for (i = 0; i < 8; i++) {
- HDsnprintf(attrname, sizeof(attrname), "attr %d", i);
+ snprintf(attrname, sizeof(attrname), "attr %d", i);
if ((aid = H5Acreate2(tid3, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Awrite(aid, H5T_NATIVE_UINT, &i) < 0)
@@ -1078,7 +1078,7 @@ verify_named_cork(hbool_t swmr)
if (i == 3) {
if (H5Odisable_mdc_flushes(tid3) < 0)
TEST_ERROR;
- if (H5C__verify_cork_tag_test(fid, oinfo3.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo3.token, true) < 0)
TEST_ERROR;
}
if (H5Aclose(aid) < 0)
@@ -1098,20 +1098,20 @@ verify_named_cork(hbool_t swmr)
TEST_ERROR;
/* Verify cork status of the datatype: DT */
- if (H5C__verify_cork_tag_test(fid, oinfo.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo.token, false) < 0)
TEST_ERROR;
/* Verify cork status of the datatype: DT2 */
- if (H5C__verify_cork_tag_test(fid, oinfo2.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo2.token, true) < 0)
TEST_ERROR;
/* Verify cork status of the datatype: DT3 */
- if (H5C__verify_cork_tag_test(fid, oinfo3.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo3.token, true) < 0)
TEST_ERROR;
/* Un-cork the datatype: DT3 */
if (H5Oenable_mdc_flushes(tid3) < 0)
TEST_ERROR;
/* Verify cork status of the datatype: DT3 */
- if (H5C__verify_cork_tag_test(fid, oinfo3.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo3.token, false) < 0)
TEST_ERROR;
/* Cork the datatype: DT */
@@ -1119,14 +1119,14 @@ verify_named_cork(hbool_t swmr)
TEST_ERROR;
/* Verify cork status of the datatype: DT */
- if (H5C__verify_cork_tag_test(fid, oinfo.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo.token, true) < 0)
TEST_ERROR;
/* Verify cork status of the datatype: DT2 */
- if (H5C__verify_cork_tag_test(fid, oinfo2.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo2.token, true) < 0)
TEST_ERROR;
/* Verify cork status of the dataset: DSET */
- if (H5C__verify_cork_tag_test(fid, oinfo4.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo4.token, true) < 0)
TEST_ERROR;
/* Close the dataset */
@@ -1134,11 +1134,11 @@ verify_named_cork(hbool_t swmr)
TEST_ERROR;
/* Verify cork status of the datatype: DT */
- if (H5C__verify_cork_tag_test(fid, oinfo.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo.token, true) < 0)
TEST_ERROR;
/* Verify cork status of the dataset: DSET */
- if (H5C__verify_cork_tag_test(fid, oinfo4.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo4.token, false) < 0)
TEST_ERROR;
/* Closing */
@@ -1192,7 +1192,7 @@ verify_named_cork(hbool_t swmr)
*-------------------------------------------------------------------------
*/
static unsigned
-verify_multiple_cork(hbool_t swmr)
+verify_multiple_cork(bool swmr)
{
/* Variable Declarations */
hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File ID */
@@ -1207,7 +1207,7 @@ verify_multiple_cork(hbool_t swmr)
H5O_info2_t oinfo1, oinfo2, oinfo3; /* Object metadata information */
hsize_t dim[1] = {5}; /* Dimension sizes */
unsigned flags; /* File access flags */
- hbool_t corked; /* Cork status */
+ bool corked; /* Cork status */
herr_t ret; /* Return value */
/* Testing Macro */
@@ -1306,7 +1306,7 @@ verify_multiple_cork(hbool_t swmr)
/* Verify cork status of the group: gid2 */
if (H5Oget_info3(gid2, &oinfo1, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- if (H5C__verify_cork_tag_test(fid2, oinfo1.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid2, oinfo1.token, true) < 0)
TEST_ERROR;
/* Check cork status of the group: gid1 */
@@ -1334,7 +1334,7 @@ verify_multiple_cork(hbool_t swmr)
/* Verify cork status of the dataset: did1 */
if (H5Oget_info3(did1, &oinfo2, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- if (H5C__verify_cork_tag_test(fid1, oinfo2.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid1, oinfo2.token, true) < 0)
TEST_ERROR;
/* Check cork status of the dataset: did2 */
@@ -1362,7 +1362,7 @@ verify_multiple_cork(hbool_t swmr)
/* Verify cork status of the datatype: tid2 */
if (H5Oget_info3(tid2, &oinfo3, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- if (H5C__verify_cork_tag_test(fid2, oinfo3.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid2, oinfo3.token, true) < 0)
TEST_ERROR;
/* Check cork status of the datatype: tid1 */
@@ -1378,7 +1378,7 @@ verify_multiple_cork(hbool_t swmr)
/* Verify cork status of the group: gid1 */
if (H5Oget_info3(gid1, &oinfo1, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- if (H5C__verify_cork_tag_test(fid1, oinfo1.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid1, oinfo1.token, false) < 0)
TEST_ERROR;
/* Check cork status of the group: gid2 */
@@ -1398,7 +1398,7 @@ verify_multiple_cork(hbool_t swmr)
TEST_ERROR;
/* Verify cork status of the group: gid1 */
- if (H5C__verify_cork_tag_test(fid1, oinfo1.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid1, oinfo1.token, false) < 0)
TEST_ERROR;
/* Close the group: gid1 */
@@ -1412,7 +1412,7 @@ verify_multiple_cork(hbool_t swmr)
/* Verify cork status of the dataset: did2 */
if (H5Oget_info3(did2, &oinfo2, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- if (H5C__verify_cork_tag_test(fid2, oinfo2.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid2, oinfo2.token, false) < 0)
TEST_ERROR;
/* Check cork status of the dataset: did1 */
@@ -1432,7 +1432,7 @@ verify_multiple_cork(hbool_t swmr)
TEST_ERROR;
/* Verify cork status of the dataset: did1 */
- if (H5C__verify_cork_tag_test(fid1, oinfo2.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid1, oinfo2.token, false) < 0)
TEST_ERROR;
/* Close the dataset: did1 */
@@ -1565,7 +1565,7 @@ verify_multiple_cork(hbool_t swmr)
*-------------------------------------------------------------------------
*/
static unsigned
-test_objs_cork(hbool_t swmr, hbool_t new_format)
+test_objs_cork(bool swmr, bool new_format)
{
hid_t fid = H5I_INVALID_HID; /* HDF5 File ID */
hid_t fapl = H5I_INVALID_HID; /* File access property list */
@@ -1575,7 +1575,7 @@ test_objs_cork(hbool_t swmr, hbool_t new_format)
hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
hid_t aid = H5I_INVALID_HID; /* Attribute ID */
hsize_t dims[RANK]; /* Dataset dimension sizes */
- hbool_t corked; /* Cork status of an object */
+ bool corked; /* Cork status of an object */
unsigned flags; /* File access flags */
herr_t ret; /* Return value */
@@ -1865,7 +1865,7 @@ test_objs_cork(hbool_t swmr, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static unsigned
-test_dset_cork(hbool_t swmr, hbool_t new_format)
+test_dset_cork(bool swmr, bool new_format)
{
hid_t fid = H5I_INVALID_HID; /* File ID */
hid_t fapl; /* File access property list */
@@ -1882,7 +1882,7 @@ test_dset_cork(hbool_t swmr, hbool_t new_format)
int **wbuf = NULL; /* Data buffer for writes (pointers to fake 2D array) */
int *wbuf_data = NULL; /* Data buffer for writes (real data) */
int *rbuf_data = NULL; /* Data buffer for reads (real data) */
- hbool_t corked; /* Cork status of an object */
+ bool corked; /* Cork status of an object */
unsigned flags; /* File access flags */
/* Testing Macro */
@@ -2234,25 +2234,25 @@ main(void)
/* Skip these tests if SWMR I/O is not supported for the VFD specified
* by the environment variable.
*/
- driver = HDgetenv(HDF5_DRIVER);
+ driver = getenv(HDF5_DRIVER);
if (!H5FD__supports_swmr_test(driver)) {
- HDputs("-- SKIPPED SWMR tests for SWMR-incompatible VFD --");
+ puts("-- SKIPPED SWMR tests for SWMR-incompatible VFD --");
continue;
}
}
/* Tests with new/old library format */
/* This is the test moved from th5o.c: test_h5o_cork() */
- nerrs += test_objs_cork(swmr, TRUE);
- nerrs += test_objs_cork(swmr, FALSE);
+ nerrs += test_objs_cork(swmr, true);
+ nerrs += test_objs_cork(swmr, false);
/* This is the test moved from th5o.c: test_h5o_cork_dataset() */
- nerrs += test_dset_cork(swmr, TRUE);
- nerrs += test_dset_cork(swmr, FALSE);
+ nerrs += test_dset_cork(swmr, true);
+ nerrs += test_dset_cork(swmr, false);
/* Tests with/without SWMR access */
nerrs += verify_obj_dset_cork(swmr);
- nerrs += verify_dset_cork(swmr, TRUE);
- nerrs += verify_dset_cork(swmr, FALSE);
+ nerrs += verify_dset_cork(swmr, true);
+ nerrs += verify_dset_cork(swmr, false);
nerrs += verify_group_cork(swmr);
nerrs += verify_named_cork(swmr);
nerrs += verify_multiple_cork(swmr);
diff --git a/test/cross_read.c b/test/cross_read.c
index 8369a767499..ce1f90b9e10 100644
--- a/test/cross_read.c
+++ b/test/cross_read.c
@@ -66,11 +66,11 @@ static const char *FILENAME[] = {"vms_data", "le_data", "be_data", NULL};
static int
check_data_i(const char *dsetname, hid_t fid)
{
- hid_t did = -1; /* dataset ID */
- long long data_in[NX + 1][NY]; /* input buffer */
- long long data_out[NX + 1][NY]; /* output buffer */
- int i, j; /* iterators */
- int nerrors = 0; /* # errors in dataset values */
+ hid_t did = H5I_INVALID_HID; /* dataset ID */
+ long long data_in[NX + 1][NY]; /* input buffer */
+ long long data_out[NX + 1][NY]; /* output buffer */
+ int i, j; /* iterators */
+ int nerrors = 0; /* # errors in dataset values */
/* Open the dataset. */
if ((did = H5Dopen2(fid, dsetname, H5P_DEFAULT)) < 0)
@@ -137,11 +137,11 @@ check_data_i(const char *dsetname, hid_t fid)
static int
check_data_f(const char *dsetname, hid_t fid)
{
- hid_t did = -1; /* dataset ID */
- double data_in[NX + 1][NY]; /* input buffer */
- double data_out[NX + 1][NY]; /* output buffer */
- int i, j; /* iterators */
- int nerrors = 0; /* # of errors in dataset values */
+ hid_t did = H5I_INVALID_HID; /* dataset ID */
+ double data_in[NX + 1][NY]; /* input buffer */
+ double data_out[NX + 1][NY]; /* output buffer */
+ int i, j; /* iterators */
+ int nerrors = 0; /* # of errors in dataset values */
/* Open the dataset. */
if ((did = H5Dopen2(fid, dsetname, H5P_DEFAULT)) < 0)
@@ -209,7 +209,7 @@ static int
check_file(char *filename)
{
const char *pathname = H5_get_srcdir_filename(filename); /* Corrected test file name */
- hid_t fid = -1; /* file ID */
+ hid_t fid = H5I_INVALID_HID; /* file ID */
int nerrors = 0; /* # of datasets with errors */
#if !defined(H5_HAVE_FILTER_DEFLATE) || !defined(H5_HAVE_FILTER_SZIP)
const char *not_supported = " filter is not enabled."; /* no filter message */
@@ -274,7 +274,7 @@ check_file(char *filename)
nerrors += check_data_f(DATASETNAME16, fid);
#else /*H5_HAVE_FILTER_DEFLATE*/
SKIPPED();
- HDputs(not_supported);
+ puts(not_supported);
#endif /*H5_HAVE_FILTER_DEFLATE*/
TESTING("dataset of BE FLOAT with Deflate filter");
@@ -282,7 +282,7 @@ check_file(char *filename)
nerrors += check_data_f(DATASETNAME17, fid);
#else /*H5_HAVE_FILTER_DEFLATE*/
SKIPPED();
- HDputs(not_supported);
+ puts(not_supported);
#endif /*H5_HAVE_FILTER_DEFLATE*/
TESTING("dataset of LE FLOAT with Szip filter");
@@ -290,7 +290,7 @@ check_file(char *filename)
nerrors += check_data_f(DATASETNAME18, fid);
#else /*H5_HAVE_FILTER_SZIP*/
SKIPPED();
- HDputs(not_supported);
+ puts(not_supported);
#endif /*H5_HAVE_FILTER_SZIP*/
TESTING("dataset of BE FLOAT with Szip filter");
@@ -298,7 +298,7 @@ check_file(char *filename)
nerrors += check_data_f(DATASETNAME19, fid);
#else /*H5_HAVE_FILTER_SZIP*/
SKIPPED();
- HDputs(not_supported);
+ puts(not_supported);
#endif /*H5_HAVE_FILTER_SZIP*/
TESTING("dataset of LE FLOAT with Shuffle filter");
@@ -338,9 +338,9 @@ check_file(char *filename)
int
main(void)
{
- hbool_t driver_is_default_compatible;
- char filename[1024];
- int nerrors = 0;
+ bool driver_is_default_compatible;
+ char filename[1024];
+ int nerrors = 0;
h5_reset();
@@ -348,21 +348,21 @@ main(void)
* Skip tests for VFDs that aren't compatible with default VFD.
*/
if (h5_driver_is_default_vfd_compatible(H5P_DEFAULT, &driver_is_default_compatible) < 0) {
- HDputs(" -- couldn't check if VFD is compatible with default VFD --");
+ puts(" -- couldn't check if VFD is compatible with default VFD --");
exit(EXIT_SUCCESS);
}
if (!driver_is_default_compatible) {
- HDputs(" -- SKIPPED for incompatible VFD --");
+ puts(" -- SKIPPED for incompatible VFD --");
exit(EXIT_SUCCESS);
}
- HDputs("\n");
- HDputs("Testing reading data created on Linux");
+ puts("\n");
+ puts("Testing reading data created on Linux");
h5_fixname(FILENAME[1], H5P_DEFAULT, filename, sizeof(filename));
nerrors += check_file(filename);
- HDputs("\n");
- HDputs("Testing reading data created on Solaris");
+ puts("\n");
+ puts("Testing reading data created on Solaris");
h5_fixname(FILENAME[2], H5P_DEFAULT, filename, sizeof(filename));
nerrors += check_file(filename);
diff --git a/test/dangle.c b/test/dangle.c
index c589448a8fa..4079fce6f51 100644
--- a/test/dangle.c
+++ b/test/dangle.c
@@ -627,20 +627,20 @@ main(void)
int nerrors = 0;
/* Get the VFD to use */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
/* Don't run this test with the multi/split VFD. A bug in library shutdown
* ordering causes problems with the multi VFD when IDs are left dangling.
*/
- if (!HDstrcmp(env_h5_drvr, "multi") || !HDstrcmp(env_h5_drvr, "split")) {
- HDputs(" -- SKIPPED for incompatible VFD --");
+ if (!strcmp(env_h5_drvr, "multi") || !strcmp(env_h5_drvr, "split")) {
+ puts(" -- SKIPPED for incompatible VFD --");
return 0;
}
/* Run tests w/weak file close */
- HDputs("Testing dangling objects with weak file close:");
+ puts("Testing dangling objects with weak file close:");
nerrors += test_dangle_dataset(H5F_CLOSE_WEAK);
nerrors += test_dangle_group(H5F_CLOSE_WEAK);
nerrors += test_dangle_datatype1(H5F_CLOSE_WEAK);
@@ -648,7 +648,7 @@ main(void)
nerrors += test_dangle_attribute(H5F_CLOSE_WEAK);
/* Run tests w/semi file close */
- HDputs("Testing dangling objects with semi file close:");
+ puts("Testing dangling objects with semi file close:");
nerrors += test_dangle_dataset(H5F_CLOSE_SEMI);
nerrors += test_dangle_group(H5F_CLOSE_SEMI);
nerrors += test_dangle_datatype1(H5F_CLOSE_SEMI);
@@ -656,7 +656,7 @@ main(void)
nerrors += test_dangle_attribute(H5F_CLOSE_SEMI);
/* Run tests w/strong file close */
- HDputs("Testing dangling objects with strong file close:");
+ puts("Testing dangling objects with strong file close:");
nerrors += test_dangle_dataset(H5F_CLOSE_STRONG);
nerrors += test_dangle_group(H5F_CLOSE_STRONG);
nerrors += test_dangle_datatype1(H5F_CLOSE_STRONG);
@@ -669,11 +669,11 @@ main(void)
/* Check for errors */
if (nerrors)
goto error;
- HDputs("All dangling ID tests passed.");
+ puts("All dangling ID tests passed.");
return 0;
error:
- HDputs("***** DANGLING ID TESTS FAILED *****");
+ puts("***** DANGLING ID TESTS FAILED *****");
return 1;
}
diff --git a/test/del_many_dense_attrs.c b/test/del_many_dense_attrs.c
index 58ecb61b488..b0000f9518d 100644
--- a/test/del_many_dense_attrs.c
+++ b/test/del_many_dense_attrs.c
@@ -53,17 +53,17 @@ catch_signal(int H5_ATTR_UNUSED signo)
int
main(void)
{
- hid_t fid = -1; /* HDF5 File ID */
- hid_t gid = -1; /* Group ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t aid = -1; /* Attribute ID */
- hid_t tid = -1; /* Datatype ID */
- hid_t fapl = -1; /* File access property lists */
- hid_t gcpl = -1; /* Group creation property list */
- char aname[50]; /* Name of attribute */
- const char *basename = "attr"; /* Name prefix for attribute */
- char filename[100]; /* File name */
- int i; /* Local index variable */
+ hid_t fid = H5I_INVALID_HID; /* HDF5 File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property lists */
+ hid_t gcpl = H5I_INVALID_HID; /* Group creation property list */
+ char aname[50]; /* Name of attribute */
+ const char *basename = "attr"; /* Name prefix for attribute */
+ char filename[100]; /* File name */
+ int i; /* Local index variable */
/* Testing setup */
h5_reset();
@@ -114,7 +114,7 @@ main(void)
/* Create attributes in the group */
for (i = ATTR_COUNT; i >= 0; i--) {
/* Set up the attribute name */
- HDsnprintf(aname, sizeof(aname), "%s%d", basename, i);
+ snprintf(aname, sizeof(aname), "%s%d", basename, i);
/* Create the attribute */
if ((aid = H5Acreate2(gid, aname, tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -160,7 +160,7 @@ main(void)
/* Delete the attributes */
for (i = 0; i <= ATTR_COUNT; i++) {
/* Set up the attribute name */
- HDsnprintf(aname, sizeof(aname), "%s%d", basename, i);
+ snprintf(aname, sizeof(aname), "%s%d", basename, i);
/* Delete the attribute */
if (H5Adelete(gid, aname) < 0)
diff --git a/test/direct_chunk.c b/test/direct_chunk.c
index 89eb90c9719..bde67dbdb5c 100644
--- a/test/direct_chunk.c
+++ b/test/direct_chunk.c
@@ -47,7 +47,7 @@
#define CHUNK_NY 4
#ifdef H5_HAVE_FILTER_DEFLATE
-#define DEFLATE_SIZE_ADJUST(s) (HDceil(((double)(s)) * 1.001) + 12.0)
+#define DEFLATE_SIZE_ADJUST(s) (ceil(((double)(s)) * 1.001) + 12.0)
#endif
/* Temporary filter IDs used for testing */
@@ -120,9 +120,9 @@ static const H5Z_class2_t H5Z_BOGUS2[1] = {{
static int
test_direct_chunk_write(hid_t file)
{
- hid_t dataspace = -1, dataset = -1;
- hid_t mem_space = -1;
- hid_t cparms = -1, dxpl = -1;
+ hid_t dataspace = H5I_INVALID_HID, dataset = H5I_INVALID_HID;
+ hid_t mem_space = H5I_INVALID_HID;
+ hid_t cparms = H5I_INVALID_HID, dxpl = H5I_INVALID_HID;
hsize_t dims[2] = {NX, NY};
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
@@ -131,7 +131,7 @@ test_direct_chunk_write(hid_t file)
int data[NX][NY];
int i, j, n;
- unsigned filter_mask = 0;
+ uint32_t filter_mask = 0;
int direct_buf[CHUNK_NX][CHUNK_NY];
int check_chunk[CHUNK_NX][CHUNK_NY];
hsize_t offset[2] = {0, 0};
@@ -389,9 +389,9 @@ test_direct_chunk_overwrite_data(hid_t fid)
int16_t overwrite_buf[OVERWRITE_CHUNK_NY][OVERWRITE_CHUNK_NX];
uint32_t filter_mask = 0;
hid_t tid = H5T_NATIVE_UINT16;
- hid_t dcpl_id = -1;
- hid_t sid = -1;
- hid_t did = -1;
+ hid_t dcpl_id = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
uint16_t fill_value = 0;
hsize_t dset_dims[] = {1, OVERWRITE_CHUNK_NY, OVERWRITE_CHUNK_2NX};
hsize_t dset_max_dims[] = {H5S_UNLIMITED, OVERWRITE_CHUNK_NY, OVERWRITE_CHUNK_2NX};
@@ -490,23 +490,23 @@ test_direct_chunk_overwrite_data(hid_t fid)
static int
test_skip_compress_write1(hid_t file)
{
- hid_t dataspace = -1, dataset = -1;
- hid_t mem_space = -1;
- hid_t cparms = -1, dxpl = -1;
+ hid_t dataspace = H5I_INVALID_HID, dataset = H5I_INVALID_HID;
+ hid_t mem_space = H5I_INVALID_HID;
+ hid_t cparms = H5I_INVALID_HID, dxpl = H5I_INVALID_HID;
hsize_t dims[2] = {NX, NY};
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
herr_t status;
int i, j, n;
- unsigned filter_mask = 0;
+ uint32_t filter_mask = 0;
int direct_buf[CHUNK_NX][CHUNK_NY];
int check_chunk[CHUNK_NX][CHUNK_NY];
hsize_t offset[2] = {0, 0};
size_t buf_size = CHUNK_NX * CHUNK_NY * sizeof(int);
int aggression = 9; /* Compression aggression setting */
- unsigned read_filter_mask = 0; /* filter mask after direct read */
+ uint32_t read_filter_mask = 0; /* filter mask after direct read */
int read_direct_buf[CHUNK_NX][CHUNK_NY];
hsize_t read_buf_size = 0; /* buf size */
@@ -738,16 +738,16 @@ filter_bogus2(unsigned int flags, size_t H5_ATTR_UNUSED cd_nelmts,
static int
test_skip_compress_write2(hid_t file)
{
- hid_t dataspace = -1, dataset = -1;
- hid_t mem_space = -1;
- hid_t cparms = -1, dxpl = -1;
+ hid_t dataspace = H5I_INVALID_HID, dataset = H5I_INVALID_HID;
+ hid_t mem_space = H5I_INVALID_HID;
+ hid_t cparms = H5I_INVALID_HID, dxpl = H5I_INVALID_HID;
hsize_t dims[2] = {NX, NY};
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
herr_t status;
int i, j, n;
- unsigned filter_mask = 0; /* orig filter mask */
+ uint32_t filter_mask = 0; /* orig filter mask */
int origin_direct_buf[CHUNK_NX][CHUNK_NY];
int direct_buf[CHUNK_NX][CHUNK_NY];
int check_chunk[CHUNK_NX][CHUNK_NY];
@@ -755,7 +755,7 @@ test_skip_compress_write2(hid_t file)
size_t buf_size = CHUNK_NX * CHUNK_NY * sizeof(int);
int aggression = 9; /* Compression aggression setting */
- unsigned read_filter_mask = 0; /* filter mask after direct read */
+ uint32_t read_filter_mask = 0; /* filter mask after direct read */
int read_direct_buf[CHUNK_NX][CHUNK_NY];
hsize_t read_buf_size = 0; /* buf size */
@@ -944,19 +944,19 @@ test_data_conv(hid_t file)
int a, c[4], e;
} dst_type_t;
- hid_t dataspace = -1, dataset = -1;
- hid_t mem_space = -1;
- hid_t cparms = -1, dxpl = -1;
+ hid_t dataspace = H5I_INVALID_HID, dataset = H5I_INVALID_HID;
+ hid_t mem_space = H5I_INVALID_HID;
+ hid_t cparms = H5I_INVALID_HID, dxpl = H5I_INVALID_HID;
hsize_t dims[2] = {NX, NY};
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
herr_t status;
int i, j, n;
const hsize_t four = 4;
- hid_t st = -1, dt = -1;
+ hid_t st = H5I_INVALID_HID, dt = H5I_INVALID_HID;
hid_t array_dt;
- unsigned filter_mask = 0;
+ uint32_t filter_mask = 0;
src_type_t direct_buf[CHUNK_NX][CHUNK_NY];
dst_type_t check_chunk[CHUNK_NX][CHUNK_NY];
src_type_t read_chunk[CHUNK_NX][CHUNK_NY]; /* For H5Dread_chunk */
@@ -1170,15 +1170,15 @@ test_data_conv(hid_t file)
static int
test_invalid_parameters(hid_t file)
{
- hid_t dataspace = -1, dataset = -1;
- hid_t mem_space = -1;
- hid_t cparms = -1, dxpl = -1;
+ hid_t dataspace = H5I_INVALID_HID, dataset = H5I_INVALID_HID;
+ hid_t mem_space = H5I_INVALID_HID;
+ hid_t cparms = H5I_INVALID_HID, dxpl = H5I_INVALID_HID;
hsize_t dims[2] = {NX, NY};
hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
herr_t status;
int i, j, n;
- unsigned filter_mask = 0;
+ uint32_t filter_mask = 0;
int direct_buf[CHUNK_NX][CHUNK_NY];
hsize_t offset[2] = {0, 0};
size_t buf_size = CHUNK_NX * CHUNK_NY * sizeof(int);
@@ -1267,14 +1267,15 @@ test_invalid_parameters(hid_t file)
/* Check invalid dataset ID for H5Dwrite_chunk and H5Dread_chunk */
H5E_BEGIN_TRY
{
- if ((status = H5Dwrite_chunk((hid_t)-1, dxpl, filter_mask, offset, buf_size, direct_buf)) != FAIL)
+ if ((status = H5Dwrite_chunk((hid_t)H5I_INVALID_HID, dxpl, filter_mask, offset, buf_size,
+ direct_buf)) != FAIL)
goto error;
}
H5E_END_TRY
H5E_BEGIN_TRY
{
- if ((status = H5Dread_chunk((hid_t)-1, dxpl, offset, &filter_mask, direct_buf)) != FAIL)
+ if ((status = H5Dread_chunk((hid_t)H5I_INVALID_HID, dxpl, offset, &filter_mask, direct_buf)) != FAIL)
goto error;
}
H5E_END_TRY
@@ -1282,14 +1283,16 @@ test_invalid_parameters(hid_t file)
/* Check invalid DXPL ID for H5Dwrite_chunk and H5Dread_chunk */
H5E_BEGIN_TRY
{
- if ((status = H5Dwrite_chunk(dataset, (hid_t)-1, filter_mask, offset, buf_size, direct_buf)) != FAIL)
+ if ((status = H5Dwrite_chunk(dataset, (hid_t)H5I_INVALID_HID, filter_mask, offset, buf_size,
+ direct_buf)) != FAIL)
goto error;
}
H5E_END_TRY
H5E_BEGIN_TRY
{
- if ((status = H5Dread_chunk(dataset, (hid_t)-1, offset, &filter_mask, direct_buf)) != FAIL)
+ if ((status = H5Dread_chunk(dataset, (hid_t)H5I_INVALID_HID, offset, &filter_mask, direct_buf)) !=
+ FAIL)
goto error;
}
H5E_END_TRY
@@ -1414,9 +1417,9 @@ test_invalid_parameters(hid_t file)
static int
test_direct_chunk_read_no_cache(hid_t file)
{
- hid_t dataspace = -1, dataset = -1;
- hid_t mem_space = -1;
- hid_t cparms = -1, dxpl = -1, dapl = -1;
+ hid_t dataspace = H5I_INVALID_HID, dataset = H5I_INVALID_HID;
+ hid_t mem_space = H5I_INVALID_HID;
+ hid_t cparms = H5I_INVALID_HID, dxpl = H5I_INVALID_HID, dapl = H5I_INVALID_HID;
hsize_t dims[2] = {NX, NY};
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
@@ -1425,7 +1428,7 @@ test_direct_chunk_read_no_cache(hid_t file)
int data[NX][NY];
int i, j, k, l, n; /* local index variables */
- unsigned filter_mask = 0; /* filter mask returned from H5Dread_chunk */
+ uint32_t filter_mask = 0; /* filter mask returned from H5Dread_chunk */
int direct_buf[CHUNK_NX][CHUNK_NY]; /* chunk read with H5Dread and manually decompressed */
int check_chunk[CHUNK_NX][CHUNK_NY]; /* chunk read with H5Dread */
hsize_t offset[2]; /* chunk offset used for H5Dread_chunk */
@@ -1590,11 +1593,11 @@ test_direct_chunk_read_no_cache(hid_t file)
#ifdef H5_HAVE_FILTER_DEFLATE
static int
-test_direct_chunk_read_cache(hid_t file, hbool_t flush)
+test_direct_chunk_read_cache(hid_t file, bool flush)
{
- hid_t dataspace = -1, dataset = -1;
- hid_t mem_space = -1;
- hid_t cparms = -1, dxpl = -1;
+ hid_t dataspace = H5I_INVALID_HID, dataset = H5I_INVALID_HID;
+ hid_t mem_space = H5I_INVALID_HID;
+ hid_t cparms = H5I_INVALID_HID, dxpl = H5I_INVALID_HID;
hsize_t dims[2] = {NX, NY};
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
@@ -1603,7 +1606,7 @@ test_direct_chunk_read_cache(hid_t file, hbool_t flush)
int data[NX][NY];
int i, j, k, l, n; /* local index variables */
- unsigned filter_mask = 0; /* filter mask returned from H5Dread_chunk */
+ uint32_t filter_mask = 0; /* filter mask returned from H5Dread_chunk */
int direct_buf[CHUNK_NX][CHUNK_NY]; /* chunk read with H5Dread and manually decompressed */
int check_chunk[CHUNK_NX][CHUNK_NY]; /* chunk read with H5Dread */
hsize_t offset[2]; /* chunk offset used for H5Dread_chunk */
@@ -1791,9 +1794,9 @@ test_direct_chunk_read_cache(hid_t file, hbool_t flush)
static int
test_read_unfiltered_dset(hid_t file)
{
- hid_t dataspace = -1, dataset = -1;
- hid_t mem_space = -1;
- hid_t cparms = -1, dxpl = -1;
+ hid_t dataspace = H5I_INVALID_HID, dataset = H5I_INVALID_HID;
+ hid_t mem_space = H5I_INVALID_HID;
+ hid_t cparms = H5I_INVALID_HID, dxpl = H5I_INVALID_HID;
hsize_t dims[2] = {NX, NY};
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
@@ -1801,7 +1804,7 @@ test_read_unfiltered_dset(hid_t file)
int data[NX][NY];
int i, j, k, l, n;
- unsigned filter_mask = 0;
+ uint32_t filter_mask = 0;
int direct_buf[CHUNK_NX][CHUNK_NY];
int check_chunk[CHUNK_NX][CHUNK_NY]; /* chunk read with H5Dread */
hsize_t offset[2] = {0, 0};
@@ -1944,9 +1947,9 @@ test_read_unfiltered_dset(hid_t file)
static int
test_read_unallocated_chunk(hid_t file)
{
- hid_t dataspace = -1, dataset = -1;
- hid_t mem_space = -1;
- hid_t cparms = -1, dxpl = -1;
+ hid_t dataspace = H5I_INVALID_HID, dataset = H5I_INVALID_HID;
+ hid_t mem_space = H5I_INVALID_HID;
+ hid_t cparms = H5I_INVALID_HID, dxpl = H5I_INVALID_HID;
hsize_t dims[2] = {NX, NY};
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
@@ -1955,7 +1958,7 @@ test_read_unallocated_chunk(hid_t file)
herr_t status; /* status from H5 function calls */
hsize_t i, j; /* local index variables */
- unsigned filter_mask = 0; /* filter mask returned from H5Dread_chunk */
+ uint32_t filter_mask = 0; /* filter mask returned from H5Dread_chunk */
int direct_buf[CHUNK_NX][CHUNK_NY]; /* chunk read with H5Dread and manually decompressed */
hsize_t offset[2]; /* chunk offset used for H5Dread_chunk */
@@ -2249,15 +2252,15 @@ main(void)
/* Test direct chunk read */
#ifdef H5_HAVE_FILTER_DEFLATE
nerrors += test_direct_chunk_read_no_cache(file_id);
- nerrors += test_direct_chunk_read_cache(file_id, TRUE);
- nerrors += test_direct_chunk_read_cache(file_id, FALSE);
+ nerrors += test_direct_chunk_read_cache(file_id, true);
+ nerrors += test_direct_chunk_read_cache(file_id, false);
#endif /* H5_HAVE_FILTER_DEFLATE */
nerrors += test_read_unfiltered_dset(file_id);
nerrors += test_read_unallocated_chunk(file_id);
/* Loop over test configurations */
for (config = 0; config < CONFIG_END; config++) {
- hbool_t need_comma = FALSE;
+ bool need_comma = false;
/* Check for invalid combinations */
if ((config & CONFIG_REOPEN_FILE) && !(config & CONFIG_REOPEN_DSET))
@@ -2271,31 +2274,31 @@ main(void)
if (need_comma)
printf(", ");
printf("latest format");
- need_comma = TRUE;
+ need_comma = true;
} /* end if */
if (config & CONFIG_REOPEN_FILE) {
if (need_comma)
printf(", ");
printf("reopen file");
- need_comma = TRUE;
+ need_comma = true;
} /* end if */
else if (config & CONFIG_REOPEN_DSET) {
if (need_comma)
printf(", ");
printf("reopen dataset");
- need_comma = TRUE;
+ need_comma = true;
} /* end if */
if (config & CONFIG_DIRECT_WRITE) {
if (need_comma)
printf(", ");
printf("direct write");
- need_comma = TRUE;
+ need_comma = true;
} /* end if */
if (config & CONFIG_DIRECT_READ) {
if (need_comma)
printf(", ");
printf("direct read");
- need_comma = TRUE;
+ need_comma = true;
} /* end if */
printf(":\n");
fflush(stdout);
@@ -2310,10 +2313,10 @@ main(void)
if (nerrors)
goto error;
- HDputs("All direct chunk read/write tests passed.");
+ puts("All direct chunk read/write tests passed.");
return EXIT_SUCCESS;
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
return EXIT_FAILURE;
}
diff --git a/test/dsets.c b/test/dsets.c
index 6d8c9dc1d36..9bebbb851b5 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -416,7 +416,7 @@ test_create(hid_t file)
H5E_END_TRY
if (dataset >= 0) {
H5_FAILED();
- HDputs(" Library allowed overwrite of existing dataset.");
+ puts(" Library allowed overwrite of existing dataset.");
goto error;
}
@@ -443,7 +443,7 @@ test_create(hid_t file)
H5E_END_TRY
if (dataset >= 0) {
H5_FAILED();
- HDputs(" Opened a non-existent dataset.");
+ puts(" Opened a non-existent dataset.");
goto error;
}
@@ -467,7 +467,7 @@ test_create(hid_t file)
H5E_END_TRY
if (dataset >= 0) {
H5_FAILED();
- HDputs(" Opened a dataset with incorrect chunking parameters.");
+ puts(" Opened a dataset with incorrect chunking parameters.");
goto error;
}
@@ -531,9 +531,9 @@ test_create(hid_t file)
static herr_t
test_simple_io(const char *env_h5_drvr, hid_t fapl)
{
- char filename[FILENAME_BUF_SIZE];
- hid_t file = -1, dataset = -1, space = -1, xfer = -1;
- int i, j, n;
+ char filename[FILENAME_BUF_SIZE];
+ hid_t file = H5I_INVALID_HID, dataset = H5I_INVALID_HID, space = H5I_INVALID_HID, xfer = H5I_INVALID_HID;
+ int i, j, n;
hsize_t dims[2];
void *tconv_buf = NULL;
int f = -1;
@@ -544,8 +544,8 @@ test_simple_io(const char *env_h5_drvr, hid_t fapl)
TESTING("simple I/O");
/* Can't run this test with multi-file VFDs because of HDopen/read/seek the file directly */
- if (HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
- HDstrcmp(env_h5_drvr, "family") != 0) {
+ if (strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0 &&
+ strcmp(env_h5_drvr, "family") != 0) {
h5_fixname(FILENAME[4], fapl, filename, sizeof filename);
/* Set up data array */
@@ -626,7 +626,7 @@ test_simple_io(const char *env_h5_drvr, hid_t fapl)
file = -1;
f = HDopen(filename, O_RDONLY);
- HDlseek(f, (off_t)offset, SEEK_SET);
+ HDlseek(f, (HDoff_t)offset, SEEK_SET);
if (HDread(f, rdata_bytes, sizeof(int) * DSET_DIM1 * DSET_DIM2) < 0)
goto error;
@@ -653,7 +653,7 @@ test_simple_io(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support continuous address space");
+ puts(" Current VFD doesn't support continuous address space");
} /* end else */
return SUCCEED;
@@ -691,11 +691,11 @@ test_simple_io(const char *env_h5_drvr, hid_t fapl)
*-------------------------------------------------------------------------
*/
static herr_t
-test_userblock_offset(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
+test_userblock_offset(const char *env_h5_drvr, hid_t fapl, bool new_format)
{
- char filename[FILENAME_BUF_SIZE];
- hid_t file = -1, fcpl = -1, dataset = -1, space = -1;
- int i, j;
+ char filename[FILENAME_BUF_SIZE];
+ hid_t file = H5I_INVALID_HID, fcpl = H5I_INVALID_HID, dataset = H5I_INVALID_HID, space = H5I_INVALID_HID;
+ int i, j;
hsize_t dims[2];
int f = -1;
haddr_t offset;
@@ -705,8 +705,8 @@ test_userblock_offset(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
TESTING("dataset offset with user block");
/* Can't run this test with multi-file VFDs because of HDopen/read/seek the file directly */
- if (HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
- HDstrcmp(env_h5_drvr, "family") != 0) {
+ if (strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0 &&
+ strcmp(env_h5_drvr, "family") != 0) {
h5_fixname(FILENAME[2], fapl, filename, sizeof filename);
/* Set up data array */
@@ -763,7 +763,7 @@ test_userblock_offset(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
file = -1;
f = HDopen(filename, O_RDONLY);
- HDlseek(f, (off_t)offset, SEEK_SET);
+ HDlseek(f, (HDoff_t)offset, SEEK_SET);
if (HDread(f, rdata_bytes, sizeof(int) * DSET_DIM1 * DSET_DIM2) < 0)
goto error;
@@ -789,7 +789,7 @@ test_userblock_offset(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support continuous address space");
+ puts(" Current VFD doesn't support continuous address space");
} /* end else */
return SUCCEED;
@@ -836,7 +836,7 @@ test_compact_io(hid_t fapl)
hid_t space = H5I_INVALID_HID;
hid_t plist = H5I_INVALID_HID;
- hid_t verfile = -1, new_fapl = -1;
+ hid_t verfile = H5I_INVALID_HID, new_fapl = H5I_INVALID_HID;
hsize_t dims[2];
int wbuf[16][8], rbuf[16][8];
char filename[FILENAME_BUF_SIZE];
@@ -1053,10 +1053,10 @@ test_compact_io(hid_t fapl)
static herr_t
test_max_compact(hid_t fapl)
{
- hid_t file = -1;
- hid_t dataset = -1;
- hid_t space = -1;
- hid_t plist = -1;
+ hid_t file = H5I_INVALID_HID;
+ hid_t dataset = H5I_INVALID_HID;
+ hid_t space = H5I_INVALID_HID;
+ hid_t plist = H5I_INVALID_HID;
hsize_t dims[1];
size_t compact_size;
int *wbuf = NULL;
@@ -1215,12 +1215,13 @@ test_max_compact(hid_t fapl)
static herr_t
test_layout_extend(hid_t fapl)
{
- char filename[FILENAME_BUF_SIZE]; /* File name */
- hid_t fid = -1; /* File id */
- hid_t sid_fix = -1, sid_unlim = -1; /* Dataspace id */
- hid_t dcpl_compact = -1, dcpl_contig = -1, dcpl_chunked = -1; /* Dataset creation property list id */
- hid_t did_fixed = -1, did_unlim = -1; /* Dataset id */
- hsize_t cur_size[1] = {10}; /* Current size of dataspace */
+ char filename[FILENAME_BUF_SIZE]; /* File name */
+ hid_t fid = H5I_INVALID_HID; /* File id */
+ hid_t sid_fix = H5I_INVALID_HID, sid_unlim = H5I_INVALID_HID; /* Dataspace id */
+ hid_t dcpl_compact = H5I_INVALID_HID, dcpl_contig = H5I_INVALID_HID,
+ dcpl_chunked = H5I_INVALID_HID; /* Dataset creation property list id */
+ hid_t did_fixed = H5I_INVALID_HID, did_unlim = H5I_INVALID_HID; /* Dataset id */
+ hsize_t cur_size[1] = {10}; /* Current size of dataspace */
hsize_t max_unlim[1] = {H5S_UNLIMITED}; /* Maximum size of dataspace (unlimited) */
hsize_t max_fix[1] = {100}; /* Maximum size of dataspace (fixed) */
hsize_t chunk_dim[1] = {10}; /* Chunk size */
@@ -1469,7 +1470,7 @@ test_conv_buffer(hid_t fid)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Library shouldn't allow conversion buffer too small");
+ puts(" Library shouldn't allow conversion buffer too small");
goto error;
}
@@ -1504,7 +1505,7 @@ test_conv_buffer(hid_t fid)
free(cf);
free(cfrR);
- HDputs(" PASSED");
+ puts(" PASSED");
return SUCCEED;
error:
@@ -1543,7 +1544,7 @@ test_tconv(hid_t file)
{
char *out = NULL, *in = NULL;
hsize_t dims[1];
- hid_t space = -1, dataset = -1;
+ hid_t space = H5I_INVALID_HID, dataset = H5I_INVALID_HID;
int i;
if ((out = (char *)malloc((size_t)(4 * 1000 * 1000))) == NULL)
@@ -1584,7 +1585,7 @@ test_tconv(hid_t file)
if (in[4 * i + 0] != out[4 * i + 3] || in[4 * i + 1] != out[4 * i + 2] ||
in[4 * i + 2] != out[4 * i + 1] || in[4 * i + 3] != out[4 * i + 0]) {
H5_FAILED();
- HDputs(" Read with byte order conversion failed.");
+ puts(" Read with byte order conversion failed.");
goto error;
}
}
@@ -1596,7 +1597,7 @@ test_tconv(hid_t file)
free(out);
free(in);
- HDputs(" PASSED");
+ puts(" PASSED");
return SUCCEED;
error:
@@ -1935,7 +1936,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
TESTING(" filters (setup)");
/* Check if all the filters are available */
- if (H5Pall_filters_avail(dcpl) != TRUE) {
+ if (H5Pall_filters_avail(dcpl) != true) {
H5_FAILED();
printf(" Line %d: Incorrect filter availability\n", __LINE__);
goto error;
@@ -2286,11 +2287,11 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
static herr_t
test_filter_noencoder(const char *dset_name)
{
- hid_t file_id = -1;
- hid_t dset_id = -1;
- hid_t test_dset_id = -1;
- hid_t dcpl_id = -1;
- hid_t space_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t test_dset_id = H5I_INVALID_HID;
+ hid_t dcpl_id = H5I_INVALID_HID;
+ hid_t space_id = H5I_INVALID_HID;
hsize_t dims = 10;
herr_t err;
int test_ints[10] = {12};
@@ -2525,7 +2526,7 @@ test_filters(hid_t file)
* STEP 0: Test null I/O filter by itself.
*----------------------------------------------------------
*/
- HDputs("Testing 'null' filter");
+ puts("Testing 'null' filter");
if ((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto error;
if (H5Pset_chunk(dc, 2, chunk_size) < 0)
@@ -2547,7 +2548,7 @@ test_filters(hid_t file)
* STEP 1: Test Fletcher32 Checksum by itself.
*----------------------------------------------------------
*/
- HDputs("Testing Fletcher32 checksum(enabled for read)");
+ puts("Testing Fletcher32 checksum(enabled for read)");
if ((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto error;
if (H5Pset_chunk(dc, 2, chunk_size) < 0)
@@ -2561,23 +2562,23 @@ test_filters(hid_t file)
goto error;
if (fletcher32_size <= null_size) {
H5_FAILED();
- HDputs(" Size after checksumming is incorrect.");
+ puts(" Size after checksumming is incorrect.");
goto error;
} /* end if */
/* Disable checksum during read */
- HDputs("Testing Fletcher32 checksum(disabled for read)");
+ puts("Testing Fletcher32 checksum(disabled for read)");
if (test_filter_internal(file, DSET_FLETCHER32_NAME_2, dc, DISABLE_FLETCHER32, DATA_NOT_CORRUPTED,
&fletcher32_size) < 0)
goto error;
if (fletcher32_size <= null_size) {
H5_FAILED();
- HDputs(" Size after checksumming is incorrect.");
+ puts(" Size after checksumming is incorrect.");
goto error;
} /* end if */
/* Try to corrupt data and see if checksum fails */
- HDputs("Testing Fletcher32 checksum(when data is corrupted)");
+ puts("Testing Fletcher32 checksum(when data is corrupted)");
data_corrupt[0] = 52;
data_corrupt[1] = 33;
data_corrupt[2] = 27;
@@ -2591,7 +2592,7 @@ test_filters(hid_t file)
goto error;
if (fletcher32_size <= null_size) {
H5_FAILED();
- HDputs(" Size after checksumming is incorrect.");
+ puts(" Size after checksumming is incorrect.");
goto error;
} /* end if */
@@ -2604,7 +2605,7 @@ test_filters(hid_t file)
*----------------------------------------------------------
*/
#ifdef H5_HAVE_FILTER_DEFLATE
- HDputs("Testing deflate filter");
+ puts("Testing deflate filter");
if ((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto error;
if (H5Pset_chunk(dc, 2, chunk_size) < 0)
@@ -2621,7 +2622,7 @@ test_filters(hid_t file)
#else /* H5_HAVE_FILTER_DEFLATE */
TESTING("deflate filter");
SKIPPED();
- HDputs(" Deflate filter not enabled");
+ puts(" Deflate filter not enabled");
#endif /* H5_HAVE_FILTER_DEFLATE */
/*----------------------------------------------------------
@@ -2636,7 +2637,7 @@ test_filters(hid_t file)
if (H5Pset_chunk(dc, 2, chunk_size) < 0)
goto error;
- HDputs("");
+ puts("");
if (H5Pset_szip(dc, szip_options_mask, szip_pixels_per_block) < 0)
goto error;
if (test_filter_internal(file, DSET_SZIP_NAME, dc, DISABLE_FLETCHER32, DATA_NOT_CORRUPTED,
@@ -2652,7 +2653,7 @@ test_filters(hid_t file)
TESTING("szip filter (without encoder)");
if (h5_szip_can_encode() != 1) {
- HDputs("");
+ puts("");
if (test_filter_noencoder(NOENCODER_SZIP_DATASET) < 0)
goto error;
}
@@ -2663,14 +2664,14 @@ test_filters(hid_t file)
#else /* H5_HAVE_FILTER_SZIP */
TESTING("szip filter");
SKIPPED();
- HDputs(" Szip filter not enabled");
+ puts(" Szip filter not enabled");
#endif /* H5_HAVE_FILTER_SZIP */
/*----------------------------------------------------------
* STEP 4: Test shuffling by itself.
*----------------------------------------------------------
*/
- HDputs("Testing shuffle filter");
+ puts("Testing shuffle filter");
if ((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto error;
if (H5Pset_chunk(dc, 2, chunk_size) < 0)
@@ -2683,7 +2684,7 @@ test_filters(hid_t file)
goto error;
if (shuffle_size != null_size) {
H5_FAILED();
- HDputs(" Shuffled size not the same as uncompressed size.");
+ puts(" Shuffled size not the same as uncompressed size.");
goto error;
} /* end if */
@@ -2696,7 +2697,7 @@ test_filters(hid_t file)
*----------------------------------------------------------
*/
#ifdef H5_HAVE_FILTER_DEFLATE
- HDputs("Testing shuffle+deflate+checksum filters(checksum first)");
+ puts("Testing shuffle+deflate+checksum filters(checksum first)");
if ((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto error;
if (H5Pset_chunk(dc, 2, chunk_size) < 0)
@@ -2716,7 +2717,7 @@ test_filters(hid_t file)
if (H5Pclose(dc) < 0)
goto error;
- HDputs("Testing shuffle+deflate+checksum filters(checksum last)");
+ puts("Testing shuffle+deflate+checksum filters(checksum last)");
if ((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto error;
if (H5Pset_chunk(dc, 2, chunk_size) < 0)
@@ -2738,7 +2739,7 @@ test_filters(hid_t file)
#else /* H5_HAVE_FILTER_DEFLATE */
TESTING("shuffle+deflate+fletcher32 filters");
SKIPPED();
- HDputs(" Deflate filter not enabled");
+ puts(" Deflate filter not enabled");
#endif /* H5_HAVE_FILTER_DEFLATE */
/*----------------------------------------------------------
@@ -2759,7 +2760,7 @@ test_filters(hid_t file)
/* Make sure encoding is enabled */
if (h5_szip_can_encode() == 1) {
- HDputs("");
+ puts("");
if (H5Pset_szip(dc, szip_options_mask, szip_pixels_per_block) < 0)
goto error;
if (test_filter_internal(file, DSET_SHUF_SZIP_FLET_NAME, dc, ENABLE_FLETCHER32, DATA_NOT_CORRUPTED,
@@ -2773,7 +2774,7 @@ test_filters(hid_t file)
TESTING("shuffle+szip+checksum filters(checksum first, without encoder)");
if (h5_szip_can_encode() != 1) {
- HDputs("");
+ puts("");
if (test_filter_noencoder(NOENCODER_SZIP_SHUFF_FLETCH_DATASET) < 0)
goto error;
}
@@ -2789,7 +2790,7 @@ test_filters(hid_t file)
/* Make sure encoding is enabled */
if (h5_szip_can_encode() == 1) {
- HDputs("");
+ puts("");
if ((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto error;
if (H5Pset_chunk(dc, 2, chunk_size) < 0)
@@ -2816,7 +2817,7 @@ test_filters(hid_t file)
#else /* H5_HAVE_FILTER_SZIP */
TESTING("shuffle+szip+fletcher32 filters");
SKIPPED();
- HDputs(" szip filter not enabled");
+ puts(" szip filter not enabled");
#endif /* H5_HAVE_FILTER_SZIP */
return SUCCEED;
@@ -2845,14 +2846,14 @@ test_missing_filter(hid_t file)
size_t i, j; /* Local index variables */
herr_t ret; /* Generic return value */
const char *testfile = H5_get_srcdir_filename(FILE_DEFLATE_NAME); /* Corrected test file name */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
TESTING("dataset access with missing filter");
/* Unregister the deflate filter */
#ifdef H5_HAVE_FILTER_DEFLATE
/* Verify deflate filter is registered currently */
- if (H5Zfilter_avail(H5Z_FILTER_DEFLATE) != TRUE) {
+ if (H5Zfilter_avail(H5Z_FILTER_DEFLATE) != true) {
H5_FAILED();
printf(" Line %d: Deflate filter not available\n", __LINE__);
goto error;
@@ -2861,7 +2862,7 @@ test_missing_filter(hid_t file)
/* Push API context */
if (H5CX_push() < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Unregister deflate filter */
/* (Use private routine, to avoid range checking on filter ID) */
@@ -2872,7 +2873,7 @@ test_missing_filter(hid_t file)
} /* end if */
#endif /* H5_HAVE_FILTER_DEFLATE */
/* Verify deflate filter is not registered currently */
- if (H5Zfilter_avail(H5Z_FILTER_DEFLATE) != FALSE) {
+ if (H5Zfilter_avail(H5Z_FILTER_DEFLATE) != false) {
H5_FAILED();
printf(" Line %d: Deflate filter available\n", __LINE__);
goto error;
@@ -2902,7 +2903,7 @@ test_missing_filter(hid_t file)
printf(" Line %d: Can't check filter availability\n", __LINE__);
goto error;
} /* end if */
- if (ret != FALSE) {
+ if (ret != false) {
H5_FAILED();
printf(" Line %d: Filter shouldn't be available\n", __LINE__);
goto error;
@@ -3040,7 +3041,7 @@ test_missing_filter(hid_t file)
/* Re-register the deflate filter */
/* Verify deflate filter is not registered currently */
- if (H5Zfilter_avail(H5Z_FILTER_DEFLATE) != FALSE) {
+ if (H5Zfilter_avail(H5Z_FILTER_DEFLATE) != false) {
H5_FAILED();
printf(" Line %d: Deflate filter available\n", __LINE__);
goto error;
@@ -3054,7 +3055,7 @@ test_missing_filter(hid_t file)
} /* end if */
/* Verify deflate filter is registered currently */
- if (H5Zfilter_avail(H5Z_FILTER_DEFLATE) != TRUE) {
+ if (H5Zfilter_avail(H5Z_FILTER_DEFLATE) != true) {
H5_FAILED();
printf(" Line %d: Deflate filter not available\n", __LINE__);
goto error;
@@ -3062,16 +3063,16 @@ test_missing_filter(hid_t file)
#endif /* H5_HAVE_FILTER_DEFLATE */
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
PASSED();
return SUCCEED;
error:
if (api_ctx_pushed)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
return FAIL;
} /* end test_missing_filter() */
@@ -3195,7 +3196,7 @@ test_nbit_int(hid_t file)
double power;
size_t i, j;
- HDputs("Testing nbit filter");
+ puts("Testing nbit filter");
TESTING(" nbit int (setup)");
/* Define dataset datatype (integer), and set precision, offset */
@@ -3233,7 +3234,7 @@ test_nbit_int(hid_t file)
/* Initialize data, assuming size of long long >= size of int */
for (i = 0; i < (size_t)size[0]; i++)
for (j = 0; j < (size_t)size[1]; j++) {
- power = HDpow(2.0, (double)(precision - 1));
+ power = pow(2.0, (double)(precision - 1));
orig_data[i][j] = (int)(((long long)HDrandom() % (long long)power) << offset);
/* even-numbered values are negative */
@@ -3387,7 +3388,7 @@ test_nbit_float(hid_t file)
*/
for (i = 0; i < (size_t)size[0]; i++) {
for (j = 0; j < (size_t)size[1]; j++) {
- if (HDisnan(orig_data[i][j]))
+ if (isnan(orig_data[i][j]))
continue; /* skip if value is NaN */
if (!H5_FLT_ABS_EQUAL(new_data[i][j], orig_data[i][j])) {
H5_FAILED();
@@ -3509,7 +3510,7 @@ test_nbit_double(hid_t file)
*/
for (i = 0; i < (size_t)size[0]; i++) {
for (j = 0; j < (size_t)size[1]; j++) {
- if (HDisnan(orig_data[i][j]))
+ if (isnan(orig_data[i][j]))
continue; /* skip if value is NaN */
if (!H5_DBL_ABS_EQUAL(new_data[i][j], orig_data[i][j])) {
H5_FAILED();
@@ -3610,7 +3611,7 @@ test_nbit_array(hid_t file)
for (j = 0; j < (size_t)size[1]; j++)
for (m = 0; m < (size_t)adims[0]; m++)
for (n = 0; n < (size_t)adims[1]; n++) {
- power = HDpow(2.0, (double)precision);
+ power = pow(2.0, (double)precision);
orig_data[i][j][m][n] =
(unsigned int)(((long long)HDrandom() % (long long)power) << offset);
} /* end for */
@@ -3803,11 +3804,11 @@ test_nbit_compound(hid_t file)
/* Initialize data, assuming size of long long >= size of member datatypes */
for (i = 0; i < (size_t)size[0]; i++)
for (j = 0; j < (size_t)size[1]; j++) {
- power = HDpow(2.0, (double)(precision[0] - 1));
+ power = pow(2.0, (double)(precision[0] - 1));
orig_data[i][j].i = (int)(((long long)HDrandom() % (long long)power) << offset[0]);
- power = HDpow(2.0, (double)(precision[1] - 1));
+ power = pow(2.0, (double)(precision[1] - 1));
orig_data[i][j].c = (char)(((long long)HDrandom() % (long long)power) << offset[1]);
- power = HDpow(2.0, (double)(precision[2] - 1));
+ power = pow(2.0, (double)(precision[2] - 1));
orig_data[i][j].s = (short)(((long long)HDrandom() % (long long)power) << offset[2]);
orig_data[i][j].f = float_val[i][j];
@@ -3852,7 +3853,7 @@ test_nbit_compound(hid_t file)
if (((unsigned)new_data[i][j].i & i_mask) != ((unsigned)orig_data[i][j].i & i_mask) ||
((unsigned)new_data[i][j].c & c_mask) != ((unsigned)orig_data[i][j].c & c_mask) ||
((unsigned)new_data[i][j].s & s_mask) != ((unsigned)orig_data[i][j].s & s_mask) ||
- (!HDisnan(orig_data[i][j].f) && !H5_FLT_ABS_EQUAL(new_data[i][j].f, orig_data[i][j].f))) {
+ (!isnan(orig_data[i][j].f) && !H5_FLT_ABS_EQUAL(new_data[i][j].f, orig_data[i][j].f))) {
H5_FAILED();
printf(" Read different values than written.\n");
printf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
@@ -4082,32 +4083,32 @@ test_nbit_compound_2(hid_t file)
/* Initialize data, assuming size of long long >= size of member datatypes */
for (i = 0; i < (size_t)size[0]; i++)
for (j = 0; j < (size_t)size[1]; j++) {
- power = HDpow(2.0, (double)(precision[0] - 1));
+ power = pow(2.0, (double)(precision[0] - 1));
orig_data[i][j].a.i = (int)(((long long)HDrandom() % (long long)power) << offset[0]);
- power = HDpow(2.0, (double)(precision[1] - 1));
+ power = pow(2.0, (double)(precision[1] - 1));
orig_data[i][j].a.c = (char)(((long long)HDrandom() % (long long)power) << offset[1]);
- power = HDpow(2.0, (double)(precision[2] - 1));
+ power = pow(2.0, (double)(precision[2] - 1));
orig_data[i][j].a.s = (short)(-(((long long)HDrandom() % (long long)power) << offset[2]));
orig_data[i][j].a.f = float_val[i][j];
- power = HDpow(2.0, (double)precision[3]);
+ power = pow(2.0, (double)precision[3]);
orig_data[i][j].v = (unsigned int)(((long long)HDrandom() % (long long)power) << offset[3]);
for (m = 0; m < (size_t)array_dims[0]; m++)
for (n = 0; n < (size_t)array_dims[1]; n++) {
- power = HDpow(2.0, (double)(precision[4] - 1));
+ power = pow(2.0, (double)(precision[4] - 1));
orig_data[i][j].b[m][n] = (char)(((long long)HDrandom() % (long long)power) << offset[4]);
} /* end for */
for (m = 0; m < (size_t)array_dims[0]; m++)
for (n = 0; n < (size_t)array_dims[1]; n++) {
- power = HDpow(2.0, (double)(precision[0] - 1));
+ power = pow(2.0, (double)(precision[0] - 1));
orig_data[i][j].d[m][n].i =
(int)(-(((long long)HDrandom() % (long long)power) << offset[0]));
- power = HDpow(2.0, (double)(precision[1] - 1));
+ power = pow(2.0, (double)(precision[1] - 1));
orig_data[i][j].d[m][n].c =
(char)(((long long)HDrandom() % (long long)power) << offset[1]);
- power = HDpow(2.0, (double)(precision[2] - 1));
+ power = pow(2.0, (double)(precision[2] - 1));
orig_data[i][j].d[m][n].s =
(short)(((long long)HDrandom() % (long long)power) << offset[2]);
orig_data[i][j].d[m][n].f = float_val[i][j];
@@ -4176,7 +4177,7 @@ test_nbit_compound_2(hid_t file)
((unsigned)orig_data[i][j].d[m][n].c & c_mask) ||
((unsigned)new_data[i][j].d[m][n].s & s_mask) !=
((unsigned)orig_data[i][j].d[m][n].s & s_mask) ||
- (!HDisnan(new_data[i][j].d[m][n].f) &&
+ (!isnan(new_data[i][j].d[m][n].f) &&
!H5_FLT_ABS_EQUAL(new_data[i][j].d[m][n].f, new_data[i][j].d[m][n].f))) {
d_failed = 1;
goto out;
@@ -4186,7 +4187,7 @@ test_nbit_compound_2(hid_t file)
if (((unsigned)new_data[i][j].a.i & i_mask) != ((unsigned)orig_data[i][j].a.i & i_mask) ||
((unsigned)new_data[i][j].a.c & c_mask) != ((unsigned)orig_data[i][j].a.c & c_mask) ||
((unsigned)new_data[i][j].a.s & s_mask) != ((unsigned)orig_data[i][j].a.s & s_mask) ||
- (!HDisnan(new_data[i][j].a.f) && !H5_FLT_ABS_EQUAL(new_data[i][j].a.f, new_data[i][j].a.f)) ||
+ (!isnan(new_data[i][j].a.f) && !H5_FLT_ABS_EQUAL(new_data[i][j].a.f, new_data[i][j].a.f)) ||
new_data[i][j].v != orig_data[i][j].v || b_failed || d_failed) {
H5_FAILED();
printf(" Read different values than written.\n");
@@ -4265,7 +4266,7 @@ test_nbit_compound_3(hid_t file)
} atomic;
hid_t i_tid, str_tid, vl_str_tid, v_tid, o_tid;
hid_t cmpd_tid; /* atomic compound datatype */
- hid_t dataset, space, dc, obj_ref_dataset = -1;
+ hid_t dataset, space, dc, obj_ref_dataset = H5I_INVALID_HID;
const hsize_t size[1] = {5};
const hsize_t chunk_size[1] = {5};
atomic orig_data[5];
@@ -4335,11 +4336,11 @@ test_nbit_compound_3(hid_t file)
/* Initialize data */
for (i = 0; i < (size_t)size[0]; i++) {
- power = HDpow(2.0, 17.0 - 1.0);
+ power = pow(2.0, 17.0 - 1.0);
memset(&orig_data[i], 0, sizeof(orig_data[i]));
orig_data[i].i = (int)(HDrandom() % (long)power);
- HDstrcpy(orig_data[i].str, "fixed-length C string");
- orig_data[i].vl_str = HDstrdup("variable-length C string");
+ strcpy(orig_data[i].str, "fixed-length C string");
+ orig_data[i].vl_str = strdup("variable-length C string");
orig_data[i].v.p = malloc((size_t)(i + 1) * sizeof(unsigned int));
orig_data[i].v.len = (size_t)i + 1;
@@ -4379,9 +4380,9 @@ test_nbit_compound_3(hid_t file)
/* Check that the values read are the same as the values written */
for (i = 0; i < (size_t)size[0]; i++) {
- if (new_data[i].i != orig_data[i].i || HDstrcmp(new_data[i].str, orig_data[i].str) != 0 ||
- HDstrcmp(new_data[i].vl_str, orig_data[i].vl_str) != 0 ||
- new_data[i].v.len != orig_data[i].v.len || new_data[i].r != orig_data[i].r) {
+ if (new_data[i].i != orig_data[i].i || strcmp(new_data[i].str, orig_data[i].str) != 0 ||
+ strcmp(new_data[i].vl_str, orig_data[i].vl_str) != 0 || new_data[i].v.len != orig_data[i].v.len ||
+ new_data[i].r != orig_data[i].r) {
H5_FAILED();
printf(" Read different values than written.\n");
printf(" At index %lu\n", (unsigned long)i);
@@ -4521,7 +4522,7 @@ test_nbit_int_size(hid_t file)
*/
for (i = 0; i < DSET_DIM1; i++)
for (j = 0; j < DSET_DIM2; j++) {
- power = HDpow(2.0, (double)(precision - 1));
+ power = pow(2.0, (double)(precision - 1));
orig[i][j] = HDrandom() % (int)power << offset;
}
@@ -4845,7 +4846,7 @@ test_scaleoffset_int(hid_t file)
int new_data[2][5];
size_t i, j;
- HDputs("Testing scaleoffset filter");
+ puts("Testing scaleoffset filter");
TESTING(" scaleoffset int without fill value (setup)");
datatype = H5Tcopy(H5T_NATIVE_INT);
@@ -5173,7 +5174,7 @@ test_scaleoffset_float(hid_t file)
/* Check that the values read are the same as the values written */
for (i = 0; i < (size_t)size[0]; i++) {
for (j = 0; j < (size_t)size[1]; j++) {
- if (HDfabs((double)(new_data[i][j] - orig_data[i][j])) > HDpow(10.0, -3.0)) {
+ if (fabs((double)(new_data[i][j] - orig_data[i][j])) > pow(10.0, -3.0)) {
H5_FAILED();
printf(" Read different values than written.\n");
printf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
@@ -5316,7 +5317,7 @@ test_scaleoffset_float_2(hid_t file)
/* Check that the values read are the same as the values written */
for (j = 0; j < (size_t)size[1]; j++) {
- if (HDfabs((double)(new_data[0][j] - orig_data[0][j])) > HDpow(10.0, -3.0)) {
+ if (fabs((double)(new_data[0][j] - orig_data[0][j])) > pow(10.0, -3.0)) {
H5_FAILED();
printf(" Read different values than written.\n");
printf(" At index %lu,%lu\n", (unsigned long)0, (unsigned long)j);
@@ -5434,7 +5435,7 @@ test_scaleoffset_double(hid_t file)
/* Check that the values read are the same as the values written */
for (i = 0; i < (size_t)size[0]; i++) {
for (j = 0; j < (size_t)size[1]; j++) {
- if (HDfabs(new_data[i][j] - orig_data[i][j]) > HDpow(10.0, -7.0)) {
+ if (fabs(new_data[i][j] - orig_data[i][j]) > pow(10.0, -7.0)) {
H5_FAILED();
printf(" Read different values than written.\n");
printf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
@@ -5577,7 +5578,7 @@ test_scaleoffset_double_2(hid_t file)
/* Check that the values read are the same as the values written */
for (j = 0; j < (size_t)size[1]; j++) {
- if (HDfabs((double)(new_data[0][j] - orig_data[0][j])) > HDpow(10.0, -7.0)) {
+ if (fabs((double)(new_data[0][j] - orig_data[0][j])) > pow(10.0, -7.0)) {
H5_FAILED();
printf(" Read different values than written.\n");
printf(" At index %lu,%lu\n", (unsigned long)0, (unsigned long)j);
@@ -5622,9 +5623,9 @@ test_scaleoffset_double_2(hid_t file)
static herr_t
test_multiopen(hid_t file)
{
- hid_t dcpl = -1, space = -1, dset1 = -1, dset2 = -1;
- hsize_t cur_size[1] = {10};
- hsize_t tmp_size[1];
+ hid_t dcpl = H5I_INVALID_HID, space = H5I_INVALID_HID, dset1 = H5I_INVALID_HID, dset2 = H5I_INVALID_HID;
+ hsize_t cur_size[1] = {10};
+ hsize_t tmp_size[1];
static hsize_t max_size[1] = {H5S_UNLIMITED};
TESTING("multi-open with extending");
@@ -5697,9 +5698,9 @@ test_multiopen(hid_t file)
static herr_t
test_types(hid_t file)
{
- hid_t grp = -1, type = -1, space = -1, dset = -1;
- size_t i;
- hsize_t nelmts;
+ hid_t grp = H5I_INVALID_HID, type = H5I_INVALID_HID, space = H5I_INVALID_HID, dset = H5I_INVALID_HID;
+ size_t i;
+ hsize_t nelmts;
unsigned char buf[32];
TESTING("various datatypes");
@@ -6414,11 +6415,11 @@ test_can_apply_szip(hid_t
}
else {
SKIPPED();
- HDputs(" Szip encoding is not enabled.");
+ puts(" Szip encoding is not enabled.");
}
#else /* H5_HAVE_FILTER_SZIP */
SKIPPED();
- HDputs(" Szip filter is not enabled.");
+ puts(" Szip filter is not enabled.");
#endif /* H5_HAVE_FILTER_SZIP */
return SUCCEED;
@@ -6714,12 +6715,13 @@ test_set_local(hid_t fapl)
static herr_t
test_compare_dcpl(hid_t file)
{
- hid_t dsid = (-1); /* Dataset ID */
- hid_t sid = (-1); /* Dataspace ID */
- hid_t dcpl = (-1); /* Dataspace creation property list ID */
- hid_t dcpl1 = (-1), dcpl2 = (-1); /* Dataspace creation property list IDs from datasets */
- const hsize_t dims[2] = {500, 4096}; /* Dataspace dimensions */
- const hsize_t chunk_dims[2] = {250, 2048}; /* Chunk dimensions */
+ hid_t dsid = (H5I_INVALID_HID); /* Dataset ID */
+ hid_t sid = (H5I_INVALID_HID); /* Dataspace ID */
+ hid_t dcpl = (H5I_INVALID_HID); /* Dataspace creation property list ID */
+ hid_t dcpl1 = (H5I_INVALID_HID),
+ dcpl2 = (H5I_INVALID_HID); /* Dataspace creation property list IDs from datasets */
+ const hsize_t dims[2] = {500, 4096}; /* Dataspace dimensions */
+ const hsize_t chunk_dims[2] = {250, 2048}; /* Chunk dimensions */
TESTING("comparing dataset creation property lists");
@@ -6814,16 +6816,17 @@ test_compare_dcpl(hid_t file)
static herr_t
test_copy_dcpl(hid_t file, hid_t fapl)
{
- hid_t dsid1 = (-1), dsid2 = (-1); /* Dataset ID */
- hid_t new_dsid1 = (-1), new_dsid2 = (-1); /* Dataset ID */
- hid_t sid = (-1); /* Dataspace ID */
- hid_t dcpl = (-1); /* Dataset creation property list ID */
- hid_t dcpl1 = (-1), dcpl2 = (-1); /* Copies of creation property list IDs */
- hid_t dcpl1_copy = (-1), dcpl2_copy = (-1); /* Copies of creation property list IDs */
- const hsize_t dims[2] = {500, 4096}; /* Dataspace dimensions */
- const hsize_t chunk_dims[2] = {250, 2048}; /* Chunk dimensions */
+ hid_t dsid1 = (H5I_INVALID_HID), dsid2 = (H5I_INVALID_HID); /* Dataset ID */
+ hid_t new_dsid1 = (H5I_INVALID_HID), new_dsid2 = (H5I_INVALID_HID); /* Dataset ID */
+ hid_t sid = (H5I_INVALID_HID); /* Dataspace ID */
+ hid_t dcpl = (H5I_INVALID_HID); /* Dataset creation property list ID */
+ hid_t dcpl1 = (H5I_INVALID_HID), dcpl2 = (H5I_INVALID_HID); /* Copies of creation property list IDs */
+ hid_t dcpl1_copy = (H5I_INVALID_HID),
+ dcpl2_copy = (H5I_INVALID_HID); /* Copies of creation property list IDs */
+ const hsize_t dims[2] = {500, 4096}; /* Dataspace dimensions */
+ const hsize_t chunk_dims[2] = {250, 2048}; /* Chunk dimensions */
char filename[FILENAME_BUF_SIZE];
- hid_t new_file = (-1);
+ hid_t new_file = (H5I_INVALID_HID);
TESTING("copying dataset creation property lists");
@@ -6972,16 +6975,16 @@ static herr_t
test_filter_delete(hid_t file)
{
#ifdef H5_HAVE_FILTER_DEFLATE
- H5Z_filter_t filtn; /* filter identification number */
- hid_t dsid = -1; /* dataset ID */
- hid_t sid = -1; /* dataspace ID */
- hid_t dcpl = -1; /* dataset creation property list ID */
- hid_t dcpl1 = -1; /* dataset creation property list ID */
- hsize_t dims[2] = {20, 20}; /* dataspace dimensions */
- hsize_t chunk_dims[2] = {10, 10}; /* chunk dimensions */
- int nfilters; /* number of filters in DCPL */
- unsigned flags; /* flags for filter */
- herr_t ret; /* generic return value */
+ H5Z_filter_t filtn; /* filter identification number */
+ hid_t dsid = H5I_INVALID_HID; /* dataset ID */
+ hid_t sid = H5I_INVALID_HID; /* dataspace ID */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation property list ID */
+ hid_t dcpl1 = H5I_INVALID_HID; /* dataset creation property list ID */
+ hsize_t dims[2] = {20, 20}; /* dataspace dimensions */
+ hsize_t chunk_dims[2] = {10, 10}; /* chunk dimensions */
+ int nfilters; /* number of filters in DCPL */
+ unsigned flags; /* flags for filter */
+ herr_t ret; /* generic return value */
int i;
#endif
@@ -7121,16 +7124,16 @@ test_filter_delete(hid_t file)
static herr_t
auxread_fdata(hid_t fid, const char *name)
{
- hid_t dset_id = -1; /* dataset ID */
- hid_t dcpl_id = -1; /* dataset creation property list ID */
- hid_t space_id = -1; /* space ID */
- hid_t ftype_id = -1; /* file data type ID */
- hid_t mtype_id = -1; /* memory data type ID */
- size_t msize; /* memory size of memory type */
- void *buf = NULL; /* data buffer */
- hsize_t nelmts; /* number of elements in dataset */
- int rank; /* rank of dataset */
- hsize_t dims[H5S_MAX_RANK]; /* dimensions of dataset */
+ hid_t dset_id = H5I_INVALID_HID; /* dataset ID */
+ hid_t dcpl_id = H5I_INVALID_HID; /* dataset creation property list ID */
+ hid_t space_id = H5I_INVALID_HID; /* space ID */
+ hid_t ftype_id = H5I_INVALID_HID; /* file data type ID */
+ hid_t mtype_id = H5I_INVALID_HID; /* memory data type ID */
+ size_t msize; /* memory size of memory type */
+ void *buf = NULL; /* data buffer */
+ hsize_t nelmts; /* number of elements in dataset */
+ int rank; /* rank of dataset */
+ hsize_t dims[H5S_MAX_RANK]; /* dimensions of dataset */
int i;
if ((dset_id = H5Dopen2(fid, name, H5P_DEFAULT)) < 0)
@@ -7203,10 +7206,10 @@ auxread_fdata(hid_t fid, const char *name)
static herr_t
test_filters_endianess(void)
{
- hid_t fid = -1; /* file ID */
- hid_t dsid = -1; /* dataset ID */
- hid_t sid = -1; /* dataspace ID */
- hid_t dcpl = -1; /* dataset creation property list ID */
+ hid_t fid = H5I_INVALID_HID; /* file ID */
+ hid_t dsid = H5I_INVALID_HID; /* dataset ID */
+ hid_t sid = H5I_INVALID_HID; /* dataspace ID */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation property list ID */
const char *data_file = H5_get_srcdir_filename("test_filters_le.h5"); /* Corrected test file name */
TESTING("filters with big-endian/little-endian data");
@@ -7277,8 +7280,8 @@ test_filters_endianess(void)
static herr_t
test_zero_dims(hid_t file)
{
- hid_t s = -1, d = -1, dcpl = -1;
- hid_t s2 = -1, d2 = -1, dcpl2 = -1;
+ hid_t s = H5I_INVALID_HID, d = H5I_INVALID_HID, dcpl = H5I_INVALID_HID;
+ hid_t s2 = H5I_INVALID_HID, d2 = H5I_INVALID_HID, dcpl2 = H5I_INVALID_HID;
hsize_t dzero = 0, dmax = H5S_UNLIMITED, csize = 5;
hsize_t dzero2[2] = {0, 0};
hsize_t dmax2[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
@@ -7485,9 +7488,9 @@ test_zero_dims(hid_t file)
static herr_t
test_missing_chunk(hid_t file)
{
- hid_t d = -1, did2 = -1; /* Dataset IDs */
- hid_t dcpl = -1, dcpl2 = -1; /* Dataset creation property IDs */
- hid_t s = -1, sid2 = -1; /* Dataspace ID */
+ hid_t d = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dcpl = H5I_INVALID_HID, dcpl2 = H5I_INVALID_HID; /* Dataset creation property IDs */
+ hid_t s = H5I_INVALID_HID, sid2 = H5I_INVALID_HID; /* Dataspace ID */
hsize_t hs_start[1], hs_stride[1], hs_count[1], hs_block[1]; /* Hyperslab setting */
hsize_t hs_start2[2], hs_stride2[2], hs_count2[2], hs_block2[2]; /* Hyperslab setting */
@@ -7737,9 +7740,9 @@ test_missing_chunk(hid_t file)
static H5_ATTR_CONST long
gcd(long l0, long r0)
{
- long magnitude, remainder;
- hbool_t negative = ((l0 < 0) != (r0 < 0));
- long l = HDlabs(l0), r = HDlabs(r0);
+ long magnitude, remainder;
+ bool negative = ((l0 < 0) != (r0 < 0));
+ long l = labs(l0), r = labs(r0);
do {
if (l < r) {
@@ -7805,10 +7808,11 @@ make_random_offset_and_increment(long nelts, long *offsetp, long *incp)
*-------------------------------------------------------------------------
*/
static herr_t
-test_random_chunks_real(const char *testname, hbool_t early_alloc, hid_t fapl)
+test_random_chunks_real(const char *testname, bool early_alloc, hid_t fapl)
{
- char filename[FILENAME_BUF_SIZE];
- hid_t s = -1, m = -1, d = -1, dcpl = -1, file = -1;
+ char filename[FILENAME_BUF_SIZE];
+ hid_t s = H5I_INVALID_HID, m = H5I_INVALID_HID, d = H5I_INVALID_HID, dcpl = H5I_INVALID_HID,
+ file = H5I_INVALID_HID;
int wbuf[NPOINTS], rbuf[NPOINTS], check2[20][20];
hsize_t coord[NPOINTS][2];
const hsize_t dsize[2] = {100, 100}, dmax[2] = {H5S_UNLIMITED, H5S_UNLIMITED}, csize[2] = {10, 10},
@@ -8287,8 +8291,8 @@ test_random_chunks(hid_t fapl)
int nerrors = 0; /* Errors in sub-tests */
nerrors +=
- test_random_chunks_real("Write/read on randomly selected chunks w/non-implicit index", FALSE, fapl);
- nerrors += test_random_chunks_real("Write/read on randomly selected chunks w/implicit index", TRUE, fapl);
+ test_random_chunks_real("Write/read on randomly selected chunks w/non-implicit index", false, fapl);
+ nerrors += test_random_chunks_real("Write/read on randomly selected chunks w/implicit index", true, fapl);
return nerrors;
} /* end test_random_chunks() */
@@ -8372,7 +8376,7 @@ test_deprec(hid_t file)
H5E_END_TRY
if (dataset >= 0) {
H5_FAILED();
- HDputs(" Library allowed overwrite of existing dataset.");
+ puts(" Library allowed overwrite of existing dataset.");
goto error;
}
@@ -8397,7 +8401,7 @@ test_deprec(hid_t file)
H5E_END_TRY
if (dataset >= 0) {
H5_FAILED();
- HDputs(" Opened a non-existent dataset.");
+ puts(" Opened a non-existent dataset.");
goto error;
}
@@ -8450,7 +8454,7 @@ test_deprec(hid_t file)
H5E_END_TRY
if (dataset >= 0) {
H5_FAILED();
- HDputs(" Opened a dataset with incorrect chunking parameters.");
+ puts(" Opened a dataset with incorrect chunking parameters.");
goto error;
}
@@ -8514,7 +8518,7 @@ test_deprec(hid_t file)
if (H5Pset_filter(dcpl, H5Z_FILTER_DEPREC, 0, (size_t)0, NULL) < 0)
goto error;
- HDputs("");
+ puts("");
if (test_filter_internal(file, DSET_DEPREC_NAME_FILTER, dcpl, DISABLE_FLETCHER32, DATA_NOT_CORRUPTED,
&deprec_size) < 0)
goto error;
@@ -8543,10 +8547,10 @@ static herr_t
test_huge_chunks(hid_t fapl)
{
char filename[FILENAME_BUF_SIZE];
- hid_t fid = -1; /* File ID */
- hid_t dcpl = -1; /* Dataset creation property list ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t dsid = -1; /* Dataset ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t dsid = H5I_INVALID_HID; /* Dataset ID */
hsize_t dim, chunk_dim; /* Dataset and chunk dimensions */
hsize_t dim2[3], chunk_dim2[3]; /* Dataset and chunk dimensions */
herr_t ret; /* Generic return value */
@@ -8671,14 +8675,14 @@ static herr_t
test_chunk_cache(hid_t fapl)
{
char filename[FILENAME_BUF_SIZE];
- hid_t fid = -1; /* File ID */
- hid_t fapl_local = -1; /* Local fapl */
- hid_t fapl_def = -1; /* Default fapl */
- hid_t dcpl = -1; /* Dataset creation property list ID */
- hid_t dapl1 = -1; /* Dataset access property list ID */
- hid_t dapl2 = -1; /* Dataset access property list ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t dsid = -1; /* Dataset ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fapl_local = H5I_INVALID_HID; /* Local fapl */
+ hid_t fapl_def = H5I_INVALID_HID; /* Default fapl */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t dapl1 = H5I_INVALID_HID; /* Dataset access property list ID */
+ hid_t dapl2 = H5I_INVALID_HID; /* Dataset access property list ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t dsid = H5I_INVALID_HID; /* Dataset ID */
hsize_t dim, chunk_dim; /* Dataset and chunk dimensions */
size_t nslots_1, nslots_2, nslots_3, nslots_4; /* rdcc number of elements */
size_t nbytes_1, nbytes_2, nbytes_3, nbytes_4; /* rdcc number of bytes */
@@ -8940,12 +8944,12 @@ static herr_t
test_big_chunks_bypass_cache(hid_t fapl)
{
char filename[FILENAME_BUF_SIZE];
- hid_t fid = -1; /* File ID */
- hid_t fapl_local = -1; /* File access property list ID */
- hid_t dcpl = -1, t_dcpl = -1; /* Dataset creation property list ID */
- hid_t sid = -1, t_sid = -1; /* Dataspace ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fapl_local = H5I_INVALID_HID; /* File access property list ID */
+ hid_t dcpl = H5I_INVALID_HID, t_dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t sid = H5I_INVALID_HID, t_sid = H5I_INVALID_HID; /* Dataspace ID */
hid_t mid; /* Memory space ID */
- hid_t dsid = -1, t_dsid = -1; /* Dataset ID */
+ hid_t dsid = H5I_INVALID_HID, t_dsid = H5I_INVALID_HID; /* Dataset ID */
hsize_t dim, chunk_dim; /* Dataset and chunk dimensions */
hsize_t t_dim[2], t_max[2], t_chunk_dim[2]; /* Dataset and chunk dimensions */
size_t rdcc_nelmts, rdcc_nbytes; /* Chunk cache parameters */
@@ -9309,17 +9313,17 @@ static herr_t
test_chunk_fast(const char *env_h5_driver, hid_t fapl)
{
char filename[FILENAME_BUF_SIZE];
- hid_t fid = -1; /* File ID */
- hid_t my_fapl = -1; /* File access property list ID */
- hid_t dcpl = -1; /* Dataset creation property list ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t scalar_sid = -1; /* Scalar dataspace ID */
- hid_t dsid = -1; /* Dataset ID */
- hsize_t fill; /* Temporary value, for filling arrays */
- hsize_t hs_size[EARRAY_MAX_RANK]; /* Hyperslab size */
- hsize_t chunk_dim[EARRAY_MAX_RANK]; /* Chunk dimensions */
- H5F_libver_t low; /* File format low bound */
- unsigned swmr; /* Whether file should be written with SWMR access enabled */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t my_fapl = H5I_INVALID_HID; /* File access property list ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t scalar_sid = H5I_INVALID_HID; /* Scalar dataspace ID */
+ hid_t dsid = H5I_INVALID_HID; /* Dataset ID */
+ hsize_t fill; /* Temporary value, for filling arrays */
+ hsize_t hs_size[EARRAY_MAX_RANK]; /* Hyperslab size */
+ hsize_t chunk_dim[EARRAY_MAX_RANK]; /* Chunk dimensions */
+ H5F_libver_t low; /* File format low bound */
+ unsigned swmr; /* Whether file should be written with SWMR access enabled */
TESTING("datasets w/extensible array as chunk index");
@@ -9726,17 +9730,17 @@ static herr_t
test_reopen_chunk_fast(hid_t fapl)
{
char filename[FILENAME_BUF_SIZE];
- hid_t fid = -1; /* File ID */
- hid_t dcpl = -1; /* Dataset creation property list ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t scalar_sid = -1; /* Scalar dataspace ID */
- hid_t dsid = -1; /* Dataset ID */
- hsize_t dim, max_dim, chunk_dim; /* Dataset and chunk dimensions */
- hsize_t hs_offset; /* Hyperslab offset */
- hsize_t hs_size; /* Hyperslab size */
- H5D_alloc_time_t alloc_time; /* Storage allocation time */
- unsigned write_elem, read_elem; /* Element written/read */
- unsigned u; /* Local index variable */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t scalar_sid = H5I_INVALID_HID; /* Scalar dataspace ID */
+ hid_t dsid = H5I_INVALID_HID; /* Dataset ID */
+ hsize_t dim, max_dim, chunk_dim; /* Dataset and chunk dimensions */
+ hsize_t hs_offset; /* Hyperslab offset */
+ hsize_t hs_size; /* Hyperslab size */
+ H5D_alloc_time_t alloc_time; /* Storage allocation time */
+ unsigned write_elem, read_elem; /* Element written/read */
+ unsigned u; /* Local index variable */
TESTING("datasets w/extensible array open/reopen with read/write");
@@ -9860,10 +9864,10 @@ static herr_t
test_chunk_fast_bug1(hid_t fapl)
{
char filename[FILENAME_BUF_SIZE];
- hid_t fid = -1; /* File ID */
- hid_t dcpl = -1; /* Dataset creation property list ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t dsid = -1; /* Dataset ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t dsid = H5I_INVALID_HID; /* Dataset ID */
hsize_t dim[2], max_dim[2], chunk_dim[2]; /* Dataset and chunk dimensions */
H5D_alloc_time_t alloc_time; /* Storage allocation time */
@@ -10064,22 +10068,22 @@ static herr_t
test_chunk_expand(hid_t fapl)
{
char filename[FILENAME_BUF_SIZE];
- hid_t fid = -1; /* File ID */
- hid_t dcpl = -1, dcpl2 = -1; /* Dataset creation property list ID */
- hid_t sid = -1, sid2 = -1; /* Dataspace ID */
- hid_t scalar_sid = -1; /* Scalar dataspace ID */
- hid_t dsid = -1, dsid2 = -1; /* Dataset ID */
- hsize_t dim, max_dim, chunk_dim; /* Dataset and chunk dimensions */
- hsize_t dim2[2], max_dim2[2], chunk_dim2[2]; /* Dataset and chunk dimensions */
- H5D_chunk_index_t idx_type, idx_type2; /* Dataset chunk index type */
- H5F_libver_t low, high; /* File format bounds */
- hsize_t hs_offset, hs_offset2[2]; /* Hyperslab offset */
- hsize_t hs_size, hs_size2[2]; /* Hyperslab size */
- H5D_alloc_time_t alloc_time; /* Storage allocation time */
- unsigned write_elem, read_elem; /* Element written/read */
- unsigned write_elem2, read_elem2; /* Element written/read */
- unsigned u; /* Local index variable */
- herr_t status; /* Generic return value */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t dcpl = H5I_INVALID_HID, dcpl2 = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t sid = H5I_INVALID_HID, sid2 = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t scalar_sid = H5I_INVALID_HID; /* Scalar dataspace ID */
+ hid_t dsid = H5I_INVALID_HID, dsid2 = H5I_INVALID_HID; /* Dataset ID */
+ hsize_t dim, max_dim, chunk_dim; /* Dataset and chunk dimensions */
+ hsize_t dim2[2], max_dim2[2], chunk_dim2[2]; /* Dataset and chunk dimensions */
+ H5D_chunk_index_t idx_type, idx_type2; /* Dataset chunk index type */
+ H5F_libver_t low, high; /* File format bounds */
+ hsize_t hs_offset, hs_offset2[2]; /* Hyperslab offset */
+ hsize_t hs_size, hs_size2[2]; /* Hyperslab size */
+ H5D_alloc_time_t alloc_time; /* Storage allocation time */
+ unsigned write_elem, read_elem; /* Element written/read */
+ unsigned write_elem2, read_elem2; /* Element written/read */
+ unsigned u; /* Local index variable */
+ herr_t status; /* Generic return value */
TESTING("filter expanding chunks too much");
@@ -10091,7 +10095,7 @@ test_chunk_expand(hid_t fapl)
if (sizeof(size_t) <= 4 && low != H5F_LIBVER_LATEST) {
SKIPPED();
- HDputs(" Current machine can't test for error w/old file format");
+ puts(" Current machine can't test for error w/old file format");
} /* end if */
else {
/* Register "expansion" filter */
@@ -10099,7 +10103,7 @@ test_chunk_expand(hid_t fapl)
FAIL_STACK_ERROR;
/* Check that the filter was registered */
- if (TRUE != H5Zfilter_avail(H5Z_FILTER_EXPAND))
+ if (true != H5Zfilter_avail(H5Z_FILTER_EXPAND))
FAIL_STACK_ERROR;
/* Loop over storage allocation time */
@@ -10550,7 +10554,7 @@ test_chunk_expand(hid_t fapl)
FAIL_STACK_ERROR;
/* Check that the filter was unregistered */
- if (FALSE != H5Zfilter_avail(H5Z_FILTER_EXPAND))
+ if (false != H5Zfilter_avail(H5Z_FILTER_EXPAND))
FAIL_STACK_ERROR;
PASSED();
@@ -10606,16 +10610,16 @@ static herr_t
test_fixed_array(hid_t fapl)
{
char filename[FILENAME_BUF_SIZE]; /* File name */
- hid_t fid = -1; /* File ID */
- hid_t dcpl = -1; /* Dataset creation property list ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
- hid_t sid = -1; /* Dataspace ID for dataset with fixed dimensions */
- hid_t sid_big = -1; /* Dataspate ID for big dataset */
- hid_t sid_max = -1; /* Dataspace ID for dataset with maximum dimensions set */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID for dataset with fixed dimensions */
+ hid_t sid_big = H5I_INVALID_HID; /* Dataspate ID for big dataset */
+ hid_t sid_max = H5I_INVALID_HID; /* Dataspace ID for dataset with maximum dimensions set */
- hid_t dsid = -1; /* Dataset ID for dataset with fixed dimensions */
- hid_t dsid_big = -1; /* Dataset ID for big dataset with fixed dimensions */
- hid_t dsid_max = -1; /* Dataset ID for dataset with maximum dimensions set */
+ hid_t dsid = H5I_INVALID_HID; /* Dataset ID for dataset with fixed dimensions */
+ hid_t dsid_big = H5I_INVALID_HID; /* Dataset ID for big dataset with fixed dimensions */
+ hid_t dsid_max = H5I_INVALID_HID; /* Dataset ID for dataset with maximum dimensions set */
hsize_t dim2[2] = {48, 18}; /* Dataset dimensions */
const hsize_t dim2_big[2] = {500, 60}; /* Big dataset dimensions */
@@ -10719,7 +10723,7 @@ test_fixed_array(hid_t fapl)
#ifdef H5_HAVE_FILTER_DEFLATE
/* Loop over compressing chunks */
- for (compress = FALSE; compress <= TRUE; compress++) {
+ for (compress = false; compress <= true; compress++) {
#endif /* H5_HAVE_FILTER_DEFLATE */
/* Loop over storage allocation time */
@@ -11143,18 +11147,19 @@ static herr_t
test_single_chunk(hid_t fapl)
{
char filename[FILENAME_BUF_SIZE]; /* File name */
- hid_t fid = -1; /* File ID */
- hid_t dcpl = -1; /* Dataset creation property list ID */
- hid_t t_dcpl = -1; /* Dataset creation property list ID */
-
- hid_t sid = -1, sid_max = -1; /* Dataspace ID for dataset with fixed dimensions */
- hid_t did = -1, did_max = -1; /* Dataset ID for dataset with fixed dimensions */
- hsize_t dim2[2] = {DSET_DIM1, DSET_DIM2}; /* Dataset dimensions */
- hsize_t t_dim2[2] = {DSET_TMP_DIM1, DSET_TMP_DIM2}; /* Dataset dimensions */
- int *wbuf = NULL; /* write buffer */
- int *t_wbuf = NULL; /* write buffer */
- int *rbuf = NULL; /* read buffer */
- int *t_rbuf = NULL; /* read buffer */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t t_dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+
+ hid_t sid = H5I_INVALID_HID,
+ sid_max = H5I_INVALID_HID; /* Dataspace ID for dataset with fixed dimensions */
+ hid_t did = H5I_INVALID_HID, did_max = H5I_INVALID_HID; /* Dataset ID for dataset with fixed dimensions */
+ hsize_t dim2[2] = {DSET_DIM1, DSET_DIM2}; /* Dataset dimensions */
+ hsize_t t_dim2[2] = {DSET_TMP_DIM1, DSET_TMP_DIM2}; /* Dataset dimensions */
+ int *wbuf = NULL; /* write buffer */
+ int *t_wbuf = NULL; /* write buffer */
+ int *rbuf = NULL; /* read buffer */
+ int *t_rbuf = NULL; /* read buffer */
H5D_chunk_index_t idx_type; /* Dataset chunk index type */
H5F_libver_t low, high; /* File format bounds */
@@ -11205,7 +11210,7 @@ test_single_chunk(hid_t fapl)
#ifdef H5_HAVE_FILTER_DEFLATE
/* Loop over compressing chunks */
- for (compress = FALSE; compress <= TRUE; compress++) {
+ for (compress = false; compress <= true; compress++) {
#endif /* H5_HAVE_FILTER_DEFLATE */
/* Loop over storage allocation time */
@@ -11420,11 +11425,11 @@ test_single_chunk(hid_t fapl)
static herr_t
test_idx_compatible(void)
{
- hid_t fid = -1; /* File id */
- hid_t did = -1; /* Dataset id */
- const char *filename = NULL; /* old test file name */
- unsigned j; /* Local index variable */
- H5D_chunk_index_t idx_type; /* Chunked dataset index type */
+ hid_t fid = H5I_INVALID_HID; /* File id */
+ hid_t did = H5I_INVALID_HID; /* Dataset id */
+ const char *filename = NULL; /* old test file name */
+ unsigned j; /* Local index variable */
+ H5D_chunk_index_t idx_type; /* Chunked dataset index type */
/* Output message about test being performed */
TESTING("compatibility for 1.6/1.8 datasets that use B-tree indexing");
@@ -11497,10 +11502,10 @@ test_idx_compatible(void)
static herr_t
test_unfiltered_edge_chunks(hid_t fapl)
{
- hid_t fid = -1; /* File id */
- hid_t did = -1; /* Dataset id */
- hid_t sid = -1; /* Dataspace id */
- hid_t dcpl = -1; /* DCPL id */
+ hid_t fid = H5I_INVALID_HID; /* File id */
+ hid_t did = H5I_INVALID_HID; /* Dataset id */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace id */
+ hid_t dcpl = H5I_INVALID_HID; /* DCPL id */
hsize_t dim[2] = {4, 3}; /* Dataset dimensions */
hsize_t cdim[2] = {2, 2}; /* Chunk dimension */
char wbuf[4][3]; /* Write buffer */
@@ -11640,15 +11645,15 @@ static herr_t
test_large_chunk_shrink(hid_t fapl)
{
char filename[FILENAME_BUF_SIZE];
- hid_t fid = -1; /* File ID */
- hid_t dcpl = -1; /* Dataset creation property list ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t scalar_sid = -1; /* Scalar dataspace ID */
- hid_t dsid = -1; /* Dataset ID */
- hsize_t dim, max_dim, chunk_dim; /* Dataset and chunk dimensions */
- hsize_t hs_offset; /* Hyperslab offset */
- hsize_t hs_size; /* Hyperslab size */
- unsigned write_elem, read_elem; /* Element written/read */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t scalar_sid = H5I_INVALID_HID; /* Scalar dataspace ID */
+ hid_t dsid = H5I_INVALID_HID; /* Dataset ID */
+ hsize_t dim, max_dim, chunk_dim; /* Dataset and chunk dimensions */
+ hsize_t hs_offset; /* Hyperslab offset */
+ hsize_t hs_size; /* Hyperslab size */
+ unsigned write_elem, read_elem; /* Element written/read */
TESTING("shrinking large chunk");
@@ -11773,11 +11778,11 @@ static herr_t
test_zero_dim_dset(hid_t fapl)
{
char filename[FILENAME_BUF_SIZE];
- hid_t fid = -1; /* File ID */
- hid_t dcpl = -1; /* Dataset creation property list ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t dsid = -1; /* Dataset ID */
- hsize_t dim, chunk_dim; /* Dataset and chunk dimensions */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t dsid = H5I_INVALID_HID; /* Dataset ID */
+ hsize_t dim, chunk_dim; /* Dataset and chunk dimensions */
int data[1];
H5F_libver_t low, high; /* File format bounds */
herr_t ret; /* Generic return value */
@@ -11878,11 +11883,11 @@ static herr_t
test_swmr_non_latest(const char *env_h5_driver, hid_t fapl)
{
char filename[FILENAME_BUF_SIZE];
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group ID */
- hid_t dcpl = -1; /* Dataset creation property list ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
hsize_t dim[1], dims2[2]; /* Size of dataset */
hsize_t max_dim[1], max_dims2[2]; /* Maximum size of dataset */
hsize_t chunk_dim[1], chunk_dims2[2]; /* Chunk dimensions */
@@ -11898,7 +11903,7 @@ test_swmr_non_latest(const char *env_h5_driver, hid_t fapl)
*/
if (!H5FD__supports_swmr_test(env_h5_driver)) {
SKIPPED();
- HDputs(" Test skipped due to VFD not supporting SWMR I/O.");
+ puts(" Test skipped due to VFD not supporting SWMR I/O.");
return SUCCEED;
}
@@ -12148,12 +12153,12 @@ static herr_t
test_earray_hdr_fd(const char *env_h5_driver, hid_t fapl)
{
char filename[FILENAME_BUF_SIZE];
- hid_t fid = -1;
- hid_t sid = -1;
- hid_t did = -1;
- hid_t tid = -1;
- hid_t dcpl = -1;
- hid_t msid = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
+ hid_t msid = H5I_INVALID_HID;
H5D_chunk_index_t idx_type;
const hsize_t shape[1] = {8};
const hsize_t maxshape[1] = {H5S_UNLIMITED};
@@ -12168,7 +12173,7 @@ test_earray_hdr_fd(const char *env_h5_driver, hid_t fapl)
*/
if (!H5FD__supports_swmr_test(env_h5_driver)) {
SKIPPED();
- HDputs(" Test skipped due to VFD not supporting SWMR I/O.");
+ puts(" Test skipped due to VFD not supporting SWMR I/O.");
return SUCCEED;
}
@@ -12269,12 +12274,12 @@ static herr_t
test_farray_hdr_fd(const char *env_h5_driver, hid_t fapl)
{
char filename[FILENAME_BUF_SIZE];
- hid_t fid = -1;
- hid_t sid = -1;
- hid_t did = -1;
- hid_t tid = -1;
- hid_t dcpl = -1;
- hid_t msid = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
+ hid_t msid = H5I_INVALID_HID;
H5D_chunk_index_t idx_type;
const hsize_t shape[1] = {8};
const hsize_t maxshape[1] = {64};
@@ -12289,7 +12294,7 @@ test_farray_hdr_fd(const char *env_h5_driver, hid_t fapl)
*/
if (!H5FD__supports_swmr_test(env_h5_driver)) {
SKIPPED();
- HDputs(" Test skipped due to VFD not supporting SWMR I/O.");
+ puts(" Test skipped due to VFD not supporting SWMR I/O.");
return SUCCEED;
}
@@ -12390,12 +12395,12 @@ static herr_t
test_bt2_hdr_fd(const char *env_h5_driver, hid_t fapl)
{
char filename[FILENAME_BUF_SIZE];
- hid_t fid = -1;
- hid_t sid = -1;
- hid_t did = -1;
- hid_t tid = -1;
- hid_t dcpl = -1;
- hid_t msid = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
+ hid_t msid = H5I_INVALID_HID;
H5D_chunk_index_t idx_type;
const hsize_t shape[2] = {8, 8};
const hsize_t maxshape[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
@@ -12416,7 +12421,7 @@ test_bt2_hdr_fd(const char *env_h5_driver, hid_t fapl)
*/
if (!H5FD__supports_swmr_test(env_h5_driver)) {
SKIPPED();
- HDputs(" Test skipped due to VFD not supporting SWMR I/O.");
+ puts(" Test skipped due to VFD not supporting SWMR I/O.");
return SUCCEED;
}
@@ -12516,13 +12521,13 @@ static herr_t
test_storage_size(hid_t fapl)
{
char filename[FILENAME_BUF_SIZE];
- hid_t fid = -1; /* File ID */
- hid_t dcpl = -1, dcpl2 = -1; /* Dataset creation property list IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t dsid = -1; /* Dataset ID */
- hsize_t dims[2], max_dims[2]; /* Dataset dimensions */
- hsize_t new_dims[2]; /* New dataset dimensions */
- hsize_t chunk_dims[2]; /* Chunk dimensions */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t dcpl = H5I_INVALID_HID, dcpl2 = H5I_INVALID_HID; /* Dataset creation property list IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t dsid = H5I_INVALID_HID; /* Dataset ID */
+ hsize_t dims[2], max_dims[2]; /* Dataset dimensions */
+ hsize_t new_dims[2]; /* New dataset dimensions */
+ hsize_t chunk_dims[2]; /* Chunk dimensions */
int wdata[STORAGE_SIZE_DIM1][STORAGE_SIZE_DIM2];
hsize_t ssize; /* Dataset storage size */
@@ -13005,15 +13010,15 @@ static herr_t
test_power2up(hid_t fapl)
{
char filename[FILENAME_BUF_SIZE];
- hid_t fid = -1; /* File ID */
- hid_t dcpl = -1; /* Dataset creation property list */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hsize_t dims[2]; /* Dataset dimension sizes */
- hsize_t max_dims[2]; /* Maximum dimension sizes */
- hsize_t chunk_dims[2]; /* Chunk dimensions */
- hsize_t ext_dims[2]; /* Extended dimension sizes */
- herr_t status; /* Error status */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hsize_t dims[2]; /* Dataset dimension sizes */
+ hsize_t max_dims[2]; /* Maximum dimension sizes */
+ hsize_t chunk_dims[2]; /* Chunk dimensions */
+ hsize_t ext_dims[2]; /* Extended dimension sizes */
+ herr_t status; /* Error status */
TESTING("the next power of 2");
@@ -13134,8 +13139,8 @@ scatter_cb(void **src_buf /*out*/, size_t *src_buf_bytes_used /*out*/, void *_sc
static herr_t
test_scatter(void)
{
- hid_t sid = -1; /* Dataspace ID */
- hsize_t dim[3] = {8, 5, 8}; /* Dataspace dimensions */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hsize_t dim[3] = {8, 5, 8}; /* Dataspace dimensions */
hsize_t start[3] = {0, 0, 0};
hsize_t stride[3] = {0, 0, 0};
hsize_t count[3] = {0, 0, 0};
@@ -13402,9 +13407,9 @@ test_scatter(void)
*-------------------------------------------------------------------------
*/
typedef struct gather_info_t {
- int *expect_dst_buf; /* Expected destination data buffer */
- size_t max_nelmts; /* Maximum number of elements passed to callback */
- hbool_t last_call; /* Whether this should be the last time the callback is called */
+ int *expect_dst_buf; /* Expected destination data buffer */
+ size_t max_nelmts; /* Maximum number of elements passed to callback */
+ bool last_call; /* Whether this should be the last time the callback is called */
} gather_info_t;
static herr_t
@@ -13433,7 +13438,7 @@ gather_cb(const void *dst_buf, size_t dst_buf_bytes_used, void *_gather_info)
if (gather_info->last_call)
TEST_ERROR;
if (nelmts < gather_info->max_nelmts)
- gather_info->last_call = TRUE;
+ gather_info->last_call = true;
/* Compare data and expected data */
for (i = 0; i < (int)nelmts; i++)
@@ -13449,8 +13454,8 @@ gather_cb(const void *dst_buf, size_t dst_buf_bytes_used, void *_gather_info)
static herr_t
test_gather(void)
{
- hid_t sid = -1; /* Dataspace ID */
- hsize_t dim[3] = {8, 5, 8}; /* Dataspace dimensions */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hsize_t dim[3] = {8, 5, 8}; /* Dataspace dimensions */
hsize_t start[3] = {0, 0, 0};
hsize_t stride[3] = {0, 0, 0};
hsize_t count[3] = {0, 0, 0};
@@ -13501,7 +13506,7 @@ test_gather(void)
/* Initialize gather_info */
gather_info.expect_dst_buf = expect_dst_buf;
gather_info.max_nelmts = dst_buf_size;
- gather_info.last_call = FALSE;
+ gather_info.last_call = false;
/* Gather data */
if (H5Dgather(sid, src_buf, H5T_NATIVE_INT, dst_buf_size * sizeof(dst_buf[0]), dst_buf, gather_cb,
@@ -13538,7 +13543,7 @@ test_gather(void)
/* Initialize gather_info */
gather_info.expect_dst_buf = expect_dst_buf;
gather_info.max_nelmts = dst_buf_size - 1;
- gather_info.last_call = FALSE;
+ gather_info.last_call = false;
/* Gather data */
if (H5Dgather(sid, src_buf, H5T_NATIVE_INT, dst_buf_size * sizeof(dst_buf[0]) - 1, dst_buf, gather_cb,
@@ -13578,7 +13583,7 @@ test_gather(void)
/* Initialize gather_info */
gather_info.expect_dst_buf = expect_dst_buf;
gather_info.max_nelmts = dst_buf_size;
- gather_info.last_call = FALSE;
+ gather_info.last_call = false;
/* Gather data */
if (H5Dgather(sid, src_buf, H5T_NATIVE_INT, dst_buf_size * sizeof(dst_buf[0]), dst_buf, gather_cb,
@@ -13634,7 +13639,7 @@ test_gather(void)
/* Initialize gather_info */
gather_info.expect_dst_buf = expect_dst_buf;
gather_info.max_nelmts = dst_buf_size;
- gather_info.last_call = FALSE;
+ gather_info.last_call = false;
/* Gather data */
if (H5Dgather(sid, src_buf, H5T_NATIVE_INT, dst_buf_size * sizeof(dst_buf[0]), dst_buf, gather_cb,
@@ -13691,7 +13696,7 @@ test_gather(void)
/* Initialize gather_info */
gather_info.expect_dst_buf = expect_dst_buf;
gather_info.max_nelmts = dst_buf_size;
- gather_info.last_call = FALSE;
+ gather_info.last_call = false;
/* Gather data */
if (H5Dgather(sid, src_buf, H5T_NATIVE_INT, dst_buf_size * sizeof(dst_buf[0]), dst_buf, gather_cb,
@@ -13725,7 +13730,7 @@ test_gather(void)
/* Initialize gather_info */
gather_info.expect_dst_buf = expect_dst_buf;
gather_info.max_nelmts = dst_buf_size;
- gather_info.last_call = FALSE;
+ gather_info.last_call = false;
/* Gather data */
if (H5Dgather(sid, src_buf, H5T_NATIVE_INT, dst_buf_size * sizeof(dst_buf[0]), dst_buf, gather_cb,
@@ -13813,8 +13818,8 @@ scatter_error_cb_unalign(void **src_buf /*out*/, size_t *src_buf_bytes_used /*ou
static herr_t
test_scatter_error(void)
{
- hid_t sid = -1; /* Dataspace ID */
- hsize_t dim[1] = {10}; /* Dataspace dimensions */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hsize_t dim[1] = {10}; /* Dataspace dimensions */
hsize_t start[3] = {2};
hsize_t count[3] = {6};
int src_buf[7]; /* Source data buffer */
@@ -14005,8 +14010,8 @@ gather_error_cb_fail(const void H5_ATTR_UNUSED *dst_buf, size_t H5_ATTR_UNUSED d
static herr_t
test_gather_error(void)
{
- hid_t sid = -1; /* Dataspace ID */
- hsize_t dim[1] = {10}; /* Dataspace dimensions */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hsize_t dim[1] = {10}; /* Dataspace dimensions */
hsize_t start[1] = {2};
hsize_t count[1] = {6};
int src_buf[10]; /* Source data buffer */
@@ -14038,7 +14043,7 @@ test_gather_error(void)
/* Verify that base configuration passes */
gather_info.expect_dst_buf = expect_dst_buf;
gather_info.max_nelmts = 6;
- gather_info.last_call = FALSE;
+ gather_info.last_call = false;
if (H5Dgather(sid, src_buf, H5T_NATIVE_INT, 6 * sizeof(dst_buf[0]), dst_buf, gather_cb, &gather_info) < 0)
TEST_ERROR;
@@ -14046,7 +14051,7 @@ test_gather_error(void)
* Test invalid parameters
*/
gather_info.expect_dst_buf = expect_dst_buf;
- gather_info.last_call = FALSE;
+ gather_info.last_call = false;
H5E_BEGIN_TRY
{
ret = H5Dgather(H5T_NATIVE_INT, src_buf, H5T_NATIVE_INT, 6 * sizeof(dst_buf[0]), dst_buf, gather_cb,
@@ -14057,7 +14062,7 @@ test_gather_error(void)
TEST_ERROR;
gather_info.expect_dst_buf = expect_dst_buf;
- gather_info.last_call = FALSE;
+ gather_info.last_call = false;
H5E_BEGIN_TRY
{
ret = H5Dgather(sid, NULL, H5T_NATIVE_INT, 6 * sizeof(dst_buf[0]), dst_buf, gather_cb, &gather_info);
@@ -14067,7 +14072,7 @@ test_gather_error(void)
TEST_ERROR;
gather_info.expect_dst_buf = expect_dst_buf;
- gather_info.last_call = FALSE;
+ gather_info.last_call = false;
H5E_BEGIN_TRY
{
ret = H5Dgather(sid, src_buf, sid, 6 * sizeof(dst_buf[0]), dst_buf, gather_cb, &gather_info);
@@ -14077,7 +14082,7 @@ test_gather_error(void)
TEST_ERROR;
gather_info.expect_dst_buf = expect_dst_buf;
- gather_info.last_call = FALSE;
+ gather_info.last_call = false;
H5E_BEGIN_TRY
{
ret = H5Dgather(sid, src_buf, H5T_NATIVE_INT, 0, dst_buf, gather_cb, &gather_info);
@@ -14087,7 +14092,7 @@ test_gather_error(void)
TEST_ERROR;
gather_info.expect_dst_buf = expect_dst_buf;
- gather_info.last_call = FALSE;
+ gather_info.last_call = false;
H5E_BEGIN_TRY
{
ret = H5Dgather(sid, src_buf, H5T_NATIVE_INT, 1, dst_buf, gather_cb, &gather_info);
@@ -14097,7 +14102,7 @@ test_gather_error(void)
TEST_ERROR;
gather_info.expect_dst_buf = expect_dst_buf;
- gather_info.last_call = FALSE;
+ gather_info.last_call = false;
H5E_BEGIN_TRY
{
ret = H5Dgather(sid, src_buf, H5T_NATIVE_INT, 6 * sizeof(dst_buf[0]), NULL, gather_cb, &gather_info);
@@ -14107,7 +14112,7 @@ test_gather_error(void)
TEST_ERROR;
gather_info.expect_dst_buf = expect_dst_buf;
- gather_info.last_call = FALSE;
+ gather_info.last_call = false;
H5E_BEGIN_TRY
{
ret = H5Dgather(sid, src_buf, H5T_NATIVE_INT, 5 * sizeof(dst_buf[0]), dst_buf, NULL, &gather_info);
@@ -14120,7 +14125,7 @@ test_gather_error(void)
* Test callback returns failure
*/
gather_info.expect_dst_buf = expect_dst_buf;
- gather_info.last_call = FALSE;
+ gather_info.last_call = false;
H5E_BEGIN_TRY
{
ret = H5Dgather(sid, src_buf, H5T_NATIVE_INT, 6 * sizeof(dst_buf[0]), dst_buf, gather_error_cb_fail,
@@ -14380,10 +14385,10 @@ dls_01_main(void)
if (NULL == buffer)
TEST_ERROR;
- HDstrcpy(buffer, strings[0]);
- HDstrcpy(buffer + DLS_01_STR_SIZE, strings[1]);
- HDstrcpy(buffer + DLS_01_STR_SIZE * 2, strings[2]);
- HDstrcpy(buffer + DLS_01_STR_SIZE * 3, strings[3]);
+ strcpy(buffer, strings[0]);
+ strcpy(buffer + DLS_01_STR_SIZE, strings[1]);
+ strcpy(buffer + DLS_01_STR_SIZE * 2, strings[2]);
+ strcpy(buffer + DLS_01_STR_SIZE * 3, strings[3]);
fapl = H5Pcreate(H5P_FILE_ACCESS);
if (fapl <= 0)
@@ -14453,15 +14458,15 @@ dls_01_main(void)
static herr_t
test_compact_open_close_dirty(hid_t fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t did = -1; /* Dataset ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t dcpl = -1; /* Dataset creation property list */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
hsize_t dims[1] = {10}; /* Dimension */
int wbuf[10]; /* Data buffer */
char filename[FILENAME_BUF_SIZE]; /* Filename */
int i; /* Local index variable */
- hbool_t dirty; /* The dirty flag */
+ bool dirty; /* The dirty flag */
TESTING("compact dataset repeated open/close and dirty flag");
@@ -14579,15 +14584,15 @@ test_compact_open_close_dirty(hid_t fapl)
static herr_t
test_versionbounds(void)
{
- hid_t fapl = -1;
- hid_t srcfile = -1; /* Files with source dsets */
- hid_t vfile = -1; /* File with virtual dset */
- hid_t dcpl = -1; /* Dataset creation property list */
- hid_t srcspace = -1; /* Source dataspaces */
- hid_t vspace = -1; /* Virtual dset dataspaces */
- hid_t srcdset = -1; /* Source dataset */
- hid_t vdset = -1; /* Virtual dataset */
- hsize_t dims[1] = {3}; /* Data space current size */
+ hid_t fapl = H5I_INVALID_HID;
+ hid_t srcfile = H5I_INVALID_HID; /* Files with source dsets */
+ hid_t vfile = H5I_INVALID_HID; /* File with virtual dset */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
+ hid_t srcspace = H5I_INVALID_HID; /* Source dataspaces */
+ hid_t vspace = H5I_INVALID_HID; /* Virtual dset dataspaces */
+ hid_t srcdset = H5I_INVALID_HID; /* Source dataset */
+ hid_t vdset = H5I_INVALID_HID; /* Virtual dataset */
+ hsize_t dims[1] = {3}; /* Data space current size */
char srcfilename[FILENAME_BUF_SIZE];
char vfilename1[FILENAME_BUF_SIZE];
char vfilename2[FILENAME_BUF_SIZE];
@@ -14662,7 +14667,7 @@ test_versionbounds(void)
if (vdset > 0) /* dataset created successfully */
{
/* Virtual dataset is only available starting in V110 */
- VERIFY(high >= H5F_LIBVER_V110, TRUE, "virtual dataset");
+ VERIFY(high >= H5F_LIBVER_V110, true, "virtual dataset");
if (H5Dclose(vdset) < 0)
TEST_ERROR;
@@ -14732,11 +14737,11 @@ test_versionbounds(void)
static herr_t
test_object_header_minimization_dcpl(void)
{
- hid_t dcpl_id = -1;
- hid_t file_id = -1;
- char filename[FILENAME_BUF_SIZE] = "";
- hbool_t minimize = FALSE;
- herr_t ret;
+ hid_t dcpl_id = H5I_INVALID_HID;
+ hid_t file_id = H5I_INVALID_HID;
+ char filename[FILENAME_BUF_SIZE] = "";
+ bool minimize = false;
+ herr_t ret;
TESTING("dcpl flags to minimize dataset object header");
@@ -14762,23 +14767,23 @@ test_object_header_minimization_dcpl(void)
/* Default value (not set explicitly) */
if (H5Pget_dset_no_attrs_hint(dcpl_id, &minimize) == FAIL)
TEST_ERROR;
- if (FALSE != minimize)
+ if (false != minimize)
TEST_ERROR;
- /* FALSE-set value */
- if (H5Pset_dset_no_attrs_hint(dcpl_id, FALSE) == FAIL)
+ /* false-set value */
+ if (H5Pset_dset_no_attrs_hint(dcpl_id, false) == FAIL)
TEST_ERROR;
if (H5Pget_dset_no_attrs_hint(dcpl_id, &minimize) == FAIL)
TEST_ERROR;
- if (FALSE != minimize)
+ if (false != minimize)
TEST_ERROR;
- /* TRUE-set value */
- if (H5Pset_dset_no_attrs_hint(dcpl_id, TRUE) == FAIL)
+ /* true-set value */
+ if (H5Pset_dset_no_attrs_hint(dcpl_id, true) == FAIL)
TEST_ERROR;
if (H5Pget_dset_no_attrs_hint(dcpl_id, &minimize) == FAIL)
TEST_ERROR;
- if (TRUE != minimize)
+ if (true != minimize)
TEST_ERROR;
/***************/
@@ -14797,7 +14802,7 @@ test_object_header_minimization_dcpl(void)
/* Invalid DCPL ID should fail */
H5E_BEGIN_TRY
{
- ret = H5Pset_dset_no_attrs_hint(H5I_INVALID_HID, FALSE);
+ ret = H5Pset_dset_no_attrs_hint(H5I_INVALID_HID, false);
}
H5E_END_TRY
if (ret == SUCCEED)
@@ -14806,7 +14811,7 @@ test_object_header_minimization_dcpl(void)
/* Invalid DCPL ID should fail */
H5E_BEGIN_TRY
{
- ret = H5Pset_dset_no_attrs_hint(H5I_INVALID_HID, TRUE);
+ ret = H5Pset_dset_no_attrs_hint(H5I_INVALID_HID, true);
}
H5E_END_TRY
if (ret == SUCCEED)
@@ -15243,7 +15248,7 @@ test_0sized_dset_metadata_alloc(hid_t fapl_id)
/*************/
/* Iterate over file format versions */
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
H5D_layout_t layout; /* Dataset layout type */
H5D_alloc_time_t alloc_time; /* Storage allocation time */
@@ -15278,8 +15283,8 @@ test_0sized_dset_metadata_alloc(hid_t fapl_id)
continue;
/* Compose dataset name */
- HDsnprintf(dset_name, sizeof(dset_name), "/Dataset-%u-%u", (unsigned)alloc_time,
- (unsigned)layout);
+ snprintf(dset_name, sizeof(dset_name), "/Dataset-%u-%u", (unsigned)alloc_time,
+ (unsigned)layout);
/* Set up DCPL */
if ((dcpl_id_copy = H5Pcopy(dcpl_id)) < 0)
@@ -15407,7 +15412,7 @@ main(void)
{
char filename[FILENAME_BUF_SIZE];
hid_t file, grp, fapl, fapl2;
- hid_t fcpl = -1, fcpl2 = -1;
+ hid_t fcpl = H5I_INVALID_HID, fcpl2 = H5I_INVALID_HID;
unsigned new_format;
unsigned paged;
unsigned minimized_ohdr;
@@ -15417,17 +15422,17 @@ main(void)
double rdcc_w0;
int nerrors = 0;
const char *envval;
- hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
- hbool_t driver_is_default_compatible;
+ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */
+ bool driver_is_default_compatible;
int i;
/* Don't run this test using certain file drivers */
- envval = HDgetenv(HDF5_DRIVER);
+ envval = getenv(HDF5_DRIVER);
if (envval == NULL)
envval = "nomatch";
/* Current VFD that does not support contiguous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(envval, "split") != 0 && HDstrcmp(envval, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(envval, "split") != 0 && strcmp(envval, "multi") != 0);
/* Set the random # seed */
HDsrandom((unsigned)HDtime(NULL));
@@ -15494,23 +15499,23 @@ main(void)
TEST_ERROR;
/* Set file space strategy to paged aggregation and persisting free-space */
- if (H5Pset_file_space_strategy(fcpl2, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl2, H5F_FSPACE_STRATEGY_PAGE, true, (hsize_t)1) < 0)
TEST_ERROR;
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
/* Test with paged aggregation enabled or not */
- for (paged = FALSE; paged <= TRUE; paged++) {
+ for (paged = false; paged <= true; paged++) {
/* Temporary: skip testing for multi/split drivers:
fail file create when persisting free-space or using paged aggregation strategy */
if (!contig_addr_vfd && paged)
continue;
- for (minimized_ohdr = FALSE; minimized_ohdr <= TRUE; minimized_ohdr++) {
+ for (minimized_ohdr = false; minimized_ohdr <= true; minimized_ohdr++) {
/* Test with old & new format groups */
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
hid_t my_fapl, my_fcpl;
/* Set the FAPL for the type of format */
@@ -15518,22 +15523,22 @@ main(void)
my_fapl = fapl2;
if (paged) {
my_fcpl = fcpl2;
- HDputs("\nTesting with new file format and paged aggregation");
+ puts("\nTesting with new file format and paged aggregation");
}
else {
my_fcpl = fcpl;
- HDputs("\nTesting with new file format and non-paged aggregation");
+ puts("\nTesting with new file format and non-paged aggregation");
}
} /* end if */
else {
my_fapl = fapl;
if (paged) {
my_fcpl = fcpl2;
- HDputs("Testing with old file format and paged aggregation:");
+ puts("Testing with old file format and paged aggregation:");
}
else {
my_fcpl = fcpl;
- HDputs("Testing with old file format and non-paged aggregation:");
+ puts("Testing with old file format and non-paged aggregation:");
}
} /* end else */
@@ -15541,10 +15546,10 @@ main(void)
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, my_fcpl, my_fapl)) < 0)
goto error;
- if (TRUE == minimized_ohdr) {
- if (0 > H5Fset_dset_no_attrs_hint(file, TRUE))
+ if (true == minimized_ohdr) {
+ if (0 > H5Fset_dset_no_attrs_hint(file, true))
goto error;
- HDputs("(minimized dataset object headers with file setting)");
+ puts("(minimized dataset object headers with file setting)");
}
/* Cause the library to emit initial messages */
diff --git a/test/dt_arith.c b/test/dt_arith.c
index ed80d5f3183..ab89b689837 100644
--- a/test/dt_arith.c
+++ b/test/dt_arith.c
@@ -298,9 +298,9 @@ static int without_hardware_g = 0;
*00000111,..., until 11111111.*/ \
memset(tmp1, 0, SRC_SIZE); \
memset(tmp2, 0, SRC_SIZE); \
- H5T__bit_set(tmp2, SRC_PREC - 1, (size_t)1, TRUE); /*the negative value*/ \
+ H5T__bit_set(tmp2, SRC_PREC - 1, (size_t)1, true); /*the negative value*/ \
for (n = 0; n < SRC_MANT_DIG - 1; n++) { \
- H5T__bit_set(tmp1, n, (size_t)1, TRUE); /*turn on 1 bit each time*/ \
+ H5T__bit_set(tmp1, n, (size_t)1, true); /*turn on 1 bit each time*/ \
CHANGE_ORDER(tmp1, SRC_ORDR, SRC_SIZE); /*change order for big endian*/ \
memcpy(buf_p, tmp1, SRC_SIZE); \
memcpy(saved_p, tmp1, SRC_SIZE); \
@@ -309,7 +309,7 @@ static int without_hardware_g = 0;
saved_p += SRC_SIZE; \
\
/*negative values*/ \
- H5T__bit_set(tmp2, n, (size_t)1, TRUE); \
+ H5T__bit_set(tmp2, n, (size_t)1, true); \
CHANGE_ORDER(tmp2, SRC_ORDR, SRC_SIZE); \
memcpy(buf_p, tmp2, SRC_SIZE); \
memcpy(saved_p, tmp2, SRC_SIZE); \
@@ -344,7 +344,7 @@ static int without_hardware_g = 0;
buf_p = BUF; \
\
/* +0 */ \
- H5T__bit_set(value, (size_t)0, SRC_PREC, FALSE); \
+ H5T__bit_set(value, (size_t)0, SRC_PREC, false); \
memcpy(buf_p, value, SRC_SIZE * sizeof(unsigned char)); \
buf_p += SRC_SIZE; \
\
@@ -352,7 +352,7 @@ static int without_hardware_g = 0;
if (n == 1) { \
memset(value, 0, SRC_SIZE * sizeof(unsigned char)); \
/* -0 */ \
- H5T__bit_set(value, (size_t)(SRC_PREC - 1), (size_t)1, TRUE); \
+ H5T__bit_set(value, (size_t)(SRC_PREC - 1), (size_t)1, true); \
CHANGE_ORDER(value, SRC_ORDR, SRC_SIZE); /*change order for big endian*/ \
memcpy(buf_p, value, SRC_SIZE * sizeof(unsigned char)); \
CHANGE_ORDER(value, SRC_ORDR, SRC_SIZE); /*change back the order for bit operation*/ \
@@ -360,21 +360,21 @@ static int without_hardware_g = 0;
} \
\
/* +/-infinity */ \
- H5T__bit_set(value, (size_t)(SRC_MANT_DIG - 1), SRC_PREC - SRC_MANT_DIG, TRUE); \
+ H5T__bit_set(value, (size_t)(SRC_MANT_DIG - 1), SRC_PREC - SRC_MANT_DIG, true); \
CHANGE_ORDER(value, SRC_ORDR, SRC_SIZE); /*change order for big endian*/ \
memcpy(buf_p, value, SRC_SIZE * sizeof(unsigned char)); \
CHANGE_ORDER(value, SRC_ORDR, SRC_SIZE); /*change back the order for bit operation*/ \
buf_p += SRC_SIZE; \
\
/* +/-SNaN */ \
- H5T__bit_set(value, (size_t)0, (size_t)1, TRUE); \
+ H5T__bit_set(value, (size_t)0, (size_t)1, true); \
CHANGE_ORDER(value, SRC_ORDR, SRC_SIZE); /*change order for big endian*/ \
memcpy(buf_p, value, SRC_SIZE * sizeof(unsigned char)); \
CHANGE_ORDER(value, SRC_ORDR, SRC_SIZE); /*change back the order for bit operation*/ \
buf_p += SRC_SIZE; \
\
/* +/-QNaN */ \
- H5T__bit_set(value, (size_t)(SRC_MANT_DIG - 2), (size_t)1, TRUE); \
+ H5T__bit_set(value, (size_t)(SRC_MANT_DIG - 2), (size_t)1, true); \
CHANGE_ORDER(value, SRC_ORDR, SRC_SIZE); /*change order for big endian*/ \
memcpy(buf_p, value, SRC_SIZE * sizeof(unsigned char)); \
CHANGE_ORDER(value, SRC_ORDR, SRC_SIZE); /*change back the order for bit operation*/ \
@@ -385,8 +385,8 @@ static int without_hardware_g = 0;
free(value); \
} while (0)
-static hbool_t overflows(unsigned char *origin_bits, hid_t src_id, size_t dst_num_bits);
-static int my_isnan(dtype_t type, void *val);
+static bool overflows(unsigned char *origin_bits, hid_t src_id, size_t dst_num_bits);
+static int my_isnan(dtype_t type, void *val);
static int my_isinf(int endian, const unsigned char *val, size_t size, size_t mpos, size_t msize, size_t epos,
size_t esize);
@@ -403,10 +403,10 @@ static void
fpe_handler(int H5_ATTR_UNUSED signo)
{
SKIPPED();
- HDputs(" Test skipped due to SIGFPE.");
+ puts(" Test skipped due to SIGFPE.");
#ifndef HANDLE_SIGFPE
- HDputs(" Remaining tests could not be run.");
- HDputs(" Please turn off SIGFPE on overflows and try again.");
+ puts(" Remaining tests could not be run.");
+ puts(" Please turn off SIGFPE on overflows and try again.");
#endif
exit(255);
}
@@ -505,7 +505,7 @@ test_hard_query(void)
TESTING("query functions of compiler conversion");
/* Verify the conversion from int to float is a hard conversion. */
- if (H5Tcompiler_conv(H5T_NATIVE_INT, H5T_NATIVE_FLOAT) != TRUE) {
+ if (H5Tcompiler_conv(H5T_NATIVE_INT, H5T_NATIVE_FLOAT) != true) {
H5_FAILED();
printf("Can't query conversion function\n");
goto error;
@@ -515,7 +515,7 @@ test_hard_query(void)
* is a soft conversion. */
H5Tunregister(H5T_PERS_HARD, NULL, H5T_NATIVE_INT, H5T_NATIVE_FLOAT,
(H5T_conv_t)((void (*)(void))H5T__conv_int_float));
- if (H5Tcompiler_conv(H5T_NATIVE_INT, H5T_NATIVE_FLOAT) != FALSE) {
+ if (H5Tcompiler_conv(H5T_NATIVE_INT, H5T_NATIVE_FLOAT) != false) {
H5_FAILED();
printf("Can't query conversion function\n");
goto error;
@@ -525,7 +525,7 @@ test_hard_query(void)
* is a hard conversion. */
H5Tregister(H5T_PERS_HARD, "int_flt", H5T_NATIVE_INT, H5T_NATIVE_FLOAT,
(H5T_conv_t)((void (*)(void))H5T__conv_int_float));
- if (H5Tcompiler_conv(H5T_NATIVE_INT, H5T_NATIVE_FLOAT) != TRUE) {
+ if (H5Tcompiler_conv(H5T_NATIVE_INT, H5T_NATIVE_FLOAT) != true) {
H5_FAILED();
printf("Can't query conversion function\n");
goto error;
@@ -567,7 +567,7 @@ expt_handle(H5T_conv_except_t except_type, hid_t H5_ATTR_UNUSED src_id, hid_t H5
if (except_type == H5T_CONV_EXCEPT_RANGE_HI || except_type == H5T_CONV_EXCEPT_RANGE_LOW ||
except_type == H5T_CONV_EXCEPT_TRUNCATE) {
- if (*(hbool_t *)user_data)
+ if (*(bool *)user_data)
*(signed char *)dst_buf = fill_value1;
else
*(int *)dst_buf = fill_value2;
@@ -601,7 +601,7 @@ static int
test_particular_fp_integer(void)
{
hid_t dxpl_id;
- hbool_t flag;
+ bool flag;
double src_d = (double)SCHAR_MAX;
signed char dst_c;
unsigned char *buf1 = NULL, *buf2 = NULL;
@@ -777,8 +777,8 @@ test_particular_fp_integer(void)
static int
test_derived_flt(void)
{
- hid_t file = -1, tid1 = -1, tid2 = -1;
- hid_t dxpl_id = -1;
+ hid_t file = H5I_INVALID_HID, tid1 = H5I_INVALID_HID, tid2 = H5I_INVALID_HID;
+ hid_t dxpl_id = H5I_INVALID_HID;
char filename[1024];
size_t spos, epos, esize, mpos, msize, size;
size_t src_size, dst_size;
@@ -953,8 +953,8 @@ test_derived_flt(void)
/* Print errors */
if (0 == fails_this_test++) {
- HDsnprintf(str, sizeof(str),
- "\nTesting random sw derived floating-point -> derived floating-point conversions");
+ snprintf(str, sizeof(str),
+ "\nTesting random sw derived floating-point -> derived floating-point conversions");
printf("%-70s", str);
fflush(stdout);
H5_FAILED();
@@ -976,7 +976,7 @@ test_derived_flt(void)
printf(" %29d\n", *aligned);
if (fails_this_test >= max_fails) {
- HDputs(" maximum failures reached, aborting test...");
+ puts(" maximum failures reached, aborting test...");
goto error;
}
}
@@ -1122,8 +1122,8 @@ test_derived_flt(void)
/* Print errors */
if (0 == fails_this_test++) {
- HDsnprintf(str, sizeof(str),
- "\nTesting random sw derived floating-point -> derived floating-point conversions");
+ snprintf(str, sizeof(str),
+ "\nTesting random sw derived floating-point -> derived floating-point conversions");
printf("%-70s", str);
fflush(stdout);
H5_FAILED();
@@ -1141,7 +1141,7 @@ test_derived_flt(void)
printf("\n");
if (fails_this_test >= max_fails) {
- HDputs(" maximum failures reached, aborting test...");
+ puts(" maximum failures reached, aborting test...");
goto error;
}
}
@@ -1223,8 +1223,8 @@ test_derived_flt(void)
static int
test_derived_integer(void)
{
- hid_t file = -1, tid1 = -1, tid2 = -1;
- hid_t dxpl_id = -1;
+ hid_t file = H5I_INVALID_HID, tid1 = H5I_INVALID_HID, tid2 = H5I_INVALID_HID;
+ hid_t dxpl_id = H5I_INVALID_HID;
char filename[1024];
size_t src_size, dst_size;
unsigned char *buf = NULL, *saved_buf = NULL;
@@ -1435,8 +1435,7 @@ test_derived_integer(void)
/* Print errors */
if (0 == fails_this_test++) {
- HDsnprintf(str, sizeof(str),
- "\nTesting random sw derived integer -> derived integer conversions");
+ snprintf(str, sizeof(str), "\nTesting random sw derived integer -> derived integer conversions");
printf("%-70s", str);
fflush(stdout);
H5_FAILED();
@@ -1454,7 +1453,7 @@ test_derived_integer(void)
printf("\n");
if (fails_this_test >= max_fails) {
- HDputs(" maximum failures reached, aborting test...");
+ puts(" maximum failures reached, aborting test...");
goto error;
}
}
@@ -1664,14 +1663,14 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
/* Sanity checks */
if (OTHER == src_type || OTHER == dst_type) {
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
printf("%-70s", str);
H5_FAILED();
- HDputs(" Unknown data type.");
+ puts(" Unknown data type.");
goto error;
}
else {
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
printf("%-70s", str);
fflush(stdout);
fails_this_test = 0;
@@ -2532,8 +2531,8 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
}
if (++fails_all_tests >= max_fails) {
- HDputs(" maximum failures reached, aborting test...");
- HDputs(" (dst is library's conversion output. ans is compiler's conversion output.)");
+ puts(" maximum failures reached, aborting test...");
+ puts(" (dst is library's conversion output. ans is compiler's conversion output.)");
goto done;
}
}
@@ -2627,7 +2626,7 @@ test_conv_int_2(void)
*
* Purpose: Determines whether VAL points to NaN.
*
- * Return: TRUE or FALSE
+ * Return: true or false
*
*-------------------------------------------------------------------------
*/
@@ -2667,26 +2666,26 @@ my_isnan(dtype_t type, void *val)
float x = 0.0;
memcpy(&x, val, sizeof(float));
- HDsnprintf(s, sizeof(s), "%g", (double)x);
+ snprintf(s, sizeof(s), "%g", (double)x);
}
else if (FLT_DOUBLE == type) {
double x = 0.0;
memcpy(&x, val, sizeof(double));
- HDsnprintf(s, sizeof(s), "%g", x);
+ snprintf(s, sizeof(s), "%g", x);
#if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE
}
else if (FLT_LDOUBLE == type) {
long double x = 0.0L;
memcpy(&x, val, sizeof(long double));
- HDsnprintf(s, sizeof(s), "%Lg", x);
+ snprintf(s, sizeof(s), "%Lg", x);
#endif
}
else {
return 0;
}
- if (HDstrstr(s, "NaN") || HDstrstr(s, "NAN") || HDstrstr(s, "nan"))
+ if (strstr(s, "NaN") || strstr(s, "NAN") || strstr(s, "nan"))
retval = 1;
}
@@ -2698,7 +2697,7 @@ my_isnan(dtype_t type, void *val)
*
* Purpose: Determines whether VAL points to +/-infinity.
*
- * Return: TRUE or FALSE
+ * Return: true or false
*
*-------------------------------------------------------------------------
*/
@@ -2786,7 +2785,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
fflush(stdout);
fflush(stderr);
if ((child_pid = fork()) < 0) {
- HDperror("fork");
+ perror("fork");
return 1;
}
else if (child_pid > 0) {
@@ -2799,12 +2798,12 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
return WEXITSTATUS(status);
}
else if (WIFSIGNALED(status)) {
- HDsnprintf(str, sizeof(str), " Child caught signal %d.", WTERMSIG(status));
- HDputs(str);
+ snprintf(str, sizeof(str), " Child caught signal %d.", WTERMSIG(status));
+ puts(str);
return 1; /*child exit after catching non-SIGFPE signal */
}
else {
- HDputs(" Child didn't exit normally.");
+ puts(" Child didn't exit normally.");
return 1;
}
}
@@ -2857,39 +2856,37 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
/* Sanity checks */
if (sizeof(float) == sizeof(double))
- HDputs("Sizeof(float)==sizeof(double) - some tests may not be sensible.");
+ puts("Sizeof(float)==sizeof(double) - some tests may not be sensible.");
if (OTHER == src_type || OTHER == dst_type) {
- if (!HDstrcmp(name, "noop"))
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name,
- dst_type_name);
+ if (!strcmp(name, "noop"))
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
else if (run_test == TEST_SPECIAL)
- HDsnprintf(str, sizeof(str), "Testing %s special %s -> %s conversions", name, src_type_name,
- dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s special %s -> %s conversions", name, src_type_name,
+ dst_type_name);
else if (run_test == TEST_NORMAL)
- HDsnprintf(str, sizeof(str), "Testing %s normalized %s -> %s conversions", name, src_type_name,
- dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s normalized %s -> %s conversions", name, src_type_name,
+ dst_type_name);
else if (run_test == TEST_DENORM)
- HDsnprintf(str, sizeof(str), "Testing %s denormalized %s -> %s conversions", name, src_type_name,
- dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s denormalized %s -> %s conversions", name, src_type_name,
+ dst_type_name);
printf("%-70s", str);
H5_FAILED();
- HDputs(" Unknown data type.");
+ puts(" Unknown data type.");
goto error;
}
else {
- if (!HDstrcmp(name, "noop"))
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name,
- dst_type_name);
+ if (!strcmp(name, "noop"))
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
else if (run_test == TEST_SPECIAL)
- HDsnprintf(str, sizeof(str), "Testing %s special %s -> %s conversions", name, src_type_name,
- dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s special %s -> %s conversions", name, src_type_name,
+ dst_type_name);
else if (run_test == TEST_NORMAL)
- HDsnprintf(str, sizeof(str), "Testing %s normalized %s -> %s conversions", name, src_type_name,
- dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s normalized %s -> %s conversions", name, src_type_name,
+ dst_type_name);
else if (run_test == TEST_DENORM)
- HDsnprintf(str, sizeof(str), "Testing %s denormalized %s -> %s conversions", name, src_type_name,
- dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s denormalized %s -> %s conversions", name, src_type_name,
+ dst_type_name);
printf("%-70s", str);
fflush(stdout);
@@ -3014,8 +3011,8 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
if (FLT_FLOAT == dst_type) {
hw_f = (float)(*((double *)aligned));
hw = (unsigned char *)&hw_f;
- underflow = HDfabs(*((double *)aligned)) < (double)FLT_MIN;
- overflow = HDfabs(*((double *)aligned)) > (double)FLT_MAX;
+ underflow = fabs(*((double *)aligned)) < (double)FLT_MIN;
+ overflow = fabs(*((double *)aligned)) > (double)FLT_MAX;
}
else if (FLT_DOUBLE == dst_type) {
hw_d = *((double *)aligned);
@@ -3034,14 +3031,14 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
if (FLT_FLOAT == dst_type) {
hw_f = (float)*((long double *)aligned);
hw = (unsigned char *)&hw_f;
- underflow = HDfabsl(*((long double *)aligned)) < (long double)FLT_MIN;
- overflow = HDfabsl(*((long double *)aligned)) > (long double)FLT_MAX;
+ underflow = fabsl(*((long double *)aligned)) < (long double)FLT_MIN;
+ overflow = fabsl(*((long double *)aligned)) > (long double)FLT_MAX;
}
else if (FLT_DOUBLE == dst_type) {
hw_d = (double)*((long double *)aligned);
hw = (unsigned char *)&hw_d;
- underflow = HDfabsl(*((long double *)aligned)) < (long double)DBL_MIN;
- overflow = HDfabsl(*((long double *)aligned)) > (long double)DBL_MAX;
+ underflow = fabsl(*((long double *)aligned)) < (long double)DBL_MIN;
+ overflow = fabsl(*((long double *)aligned)) > (long double)DBL_MAX;
}
else {
hw_ld = *((long double *)aligned);
@@ -3120,32 +3117,32 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
if (FLT_FLOAT == dst_type) {
float x = 0.0;
memcpy(&x, &buf[j * dst_size], sizeof(float));
- if (underflow && HDfabsf(x) <= FLT_MIN && HDfabsf(hw_f) <= FLT_MIN)
+ if (underflow && fabsf(x) <= FLT_MIN && fabsf(hw_f) <= FLT_MIN)
continue; /* all underflowed, no error */
if (overflow && my_isinf(dendian, buf + j * sizeof(float), dst_size, dst_mpos, dst_msize,
dst_epos, dst_esize))
continue; /* all overflowed, no error */
- check_mant[0] = (double)HDfrexpf(x, check_expo + 0);
- check_mant[1] = (double)HDfrexpf(hw_f, check_expo + 1);
+ check_mant[0] = (double)frexpf(x, check_expo + 0);
+ check_mant[1] = (double)frexpf(hw_f, check_expo + 1);
}
else if (FLT_DOUBLE == dst_type) {
double x = 0.0;
memcpy(&x, &buf[j * dst_size], sizeof(double));
- if (underflow && HDfabs(x) <= DBL_MIN && HDfabs(hw_d) <= DBL_MIN)
+ if (underflow && fabs(x) <= DBL_MIN && fabs(hw_d) <= DBL_MIN)
continue; /* all underflowed, no error */
if (overflow && my_isinf(dendian, buf + j * sizeof(double), dst_size, dst_mpos, dst_msize,
dst_epos, dst_esize))
continue; /* all overflowed, no error */
- check_mant[0] = HDfrexp(x, check_expo + 0);
- check_mant[1] = HDfrexp(hw_d, check_expo + 1);
+ check_mant[0] = frexp(x, check_expo + 0);
+ check_mant[1] = frexp(hw_d, check_expo + 1);
#if (H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE)
}
else {
long double x = 0.0L;
memcpy(&x, &buf[j * dst_size], sizeof(long double));
/* dst is largest float, no need to check underflow. */
- check_mant[0] = (double)HDfrexpl(x, check_expo + 0);
- check_mant[1] = (double)HDfrexpl(hw_ld, check_expo + 1);
+ check_mant[0] = (double)frexpl(x, check_expo + 0);
+ check_mant[1] = (double)frexpl(hw_ld, check_expo + 1);
#endif
}
/* Special check for denormalized values */
@@ -3157,18 +3154,18 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
/* Re-scale the mantissas based on any exponent difference */
if (expo_diff != 0)
- check_mant[0] = HDldexp(check_mant[0], expo_diff);
+ check_mant[0] = ldexp(check_mant[0], expo_diff);
/* Compute the proper epsilon */
- epsilon = HDldexp(epsilon, -valid_bits);
+ epsilon = ldexp(epsilon, -valid_bits);
/* Check for "close enough" fit with scaled epsilon value */
- if (HDfabs(check_mant[0] - check_mant[1]) <= epsilon)
+ if (fabs(check_mant[0] - check_mant[1]) <= epsilon)
continue;
} /* end if */
else {
if (check_expo[0] == check_expo[1] &&
- HDfabs(check_mant[0] - check_mant[1]) < (double)FP_EPSILON)
+ fabs(check_mant[0] - check_mant[1]) < (double)FP_EPSILON)
continue;
} /* end else */
}
@@ -3244,10 +3241,10 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
* denormalized or special values, print out warning message.*/
if (++fails_all_tests >= max_fails) {
if (run_test == TEST_NORMAL)
- HDputs(" maximum failures reached, aborting test...");
+ puts(" maximum failures reached, aborting test...");
else if (run_test == TEST_DENORM || run_test == TEST_SPECIAL)
- HDputs(" maximum warnings reached, aborting test...");
- HDputs(" (dst is library's conversion output. ans is compiler's conversion output.)");
+ puts(" maximum warnings reached, aborting test...");
+ puts(" (dst is library's conversion output. ans is compiler's conversion output.)");
goto done;
}
@@ -3338,7 +3335,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
int fill_value = 9; /*fill value for conversion exception*/
H5T_conv_except_func_t op; /*returned callback function for conversion exception*/
void *user_data; /*returned pointer to user data passed in to the callback*/
- hbool_t except_set = FALSE; /*whether user's exception handling is set*/
+ bool except_set = false; /*whether user's exception handling is set*/
size_t nelmts = 0; /*num values per test */
const size_t max_fails = 40; /*max number of failures*/
size_t fails_all_tests = 0; /*number of failures */
@@ -3496,10 +3493,10 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
/* Sanity checks */
if (OTHER == src_type || OTHER == dst_type) {
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
printf("%-70s", str);
H5_FAILED();
- HDputs(" Unknown data type.");
+ puts(" Unknown data type.");
goto error;
}
@@ -3507,10 +3504,10 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
INT_INT == src_type || INT_UINT == src_type || INT_LONG == src_type || INT_ULONG == src_type ||
INT_LLONG == src_type || INT_ULLONG == src_type) &&
(FLT_FLOAT != dst_type && FLT_DOUBLE != dst_type && FLT_LDOUBLE != dst_type)) {
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
printf("%-70s", str);
H5_FAILED();
- HDputs(" 1. Not an integer-float conversion.");
+ puts(" 1. Not an integer-float conversion.");
goto error;
}
@@ -3518,31 +3515,31 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
(INT_SCHAR != dst_type && INT_UCHAR != dst_type && INT_SHORT != dst_type && INT_USHORT != dst_type &&
INT_INT != dst_type && INT_UINT != dst_type && INT_LONG != dst_type && INT_ULONG != dst_type &&
INT_LLONG != dst_type && INT_ULLONG != dst_type)) {
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
printf("%-70s", str);
H5_FAILED();
- HDputs(" 2. Not a float-integer conversion.");
+ puts(" 2. Not a float-integer conversion.");
goto error;
}
if (INT_SCHAR == src_type || INT_UCHAR == src_type || INT_SHORT == src_type || INT_USHORT == src_type ||
INT_INT == src_type || INT_UINT == src_type || INT_LONG == src_type || INT_ULONG == src_type ||
INT_LLONG == src_type || INT_ULLONG == src_type) {
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
printf("%-70s", str);
fflush(stdout);
fails_this_test = 0;
}
else {
if (run_test == TEST_NORMAL)
- HDsnprintf(str, sizeof(str), "Testing %s normalized %s -> %s conversions", name, src_type_name,
- dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s normalized %s -> %s conversions", name, src_type_name,
+ dst_type_name);
else if (run_test == TEST_DENORM)
- HDsnprintf(str, sizeof(str), "Testing %s denormalized %s -> %s conversions", name, src_type_name,
- dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s denormalized %s -> %s conversions", name, src_type_name,
+ dst_type_name);
else
- HDsnprintf(str, sizeof(str), "Testing %s special %s -> %s conversions", name, src_type_name,
- dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s special %s -> %s conversions", name, src_type_name,
+ dst_type_name);
printf("%-70s", str);
fflush(stdout);
fails_this_test = 0;
@@ -3580,7 +3577,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
if (H5Pset_type_conv_cb(dxpl_id, except_func, &fill_value) < 0)
goto error;
else
- except_set = TRUE;
+ except_set = true;
if (H5Pget_type_conv_cb(dxpl_id, &op, &user_data) < 0)
goto error;
@@ -4461,10 +4458,10 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
* denormalized or special values, print out warning message.*/
if (++fails_all_tests >= max_fails) {
if (run_test == TEST_NORMAL)
- HDputs(" maximum failures reached, aborting test...");
+ puts(" maximum failures reached, aborting test...");
else if (run_test == TEST_DENORM || run_test == TEST_SPECIAL)
- HDputs(" maximum warnings reached, aborting test...");
- HDputs(" (dst is library's conversion output. ans is compiler's conversion output.)");
+ puts(" maximum warnings reached, aborting test...");
+ puts(" (dst is library's conversion output. ans is compiler's conversion output.)");
goto done;
}
@@ -4522,16 +4519,16 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
* check if overflow occurs.
*
*
- * Return: TRUE: overflow happens
+ * Return: true: overflow happens
*
- * FALSE: no overflow
+ * false: no overflow
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
overflows(unsigned char *origin_bits, hid_t src_id, size_t dst_num_bits)
{
- hbool_t ret_value = FALSE;
+ bool ret_value = false;
hsize_t expt;
size_t mant_digits = 0, expt_digits = 0, bias = 0;
size_t epos, mpos;
@@ -4556,18 +4553,18 @@ overflows(unsigned char *origin_bits, hid_t src_id, size_t dst_num_bits)
memcpy(bits, origin_bits, src_prec / 8 + 1);
/*Check for special cases: +Inf, -Inf*/
- if (H5T__bit_find(bits, mpos, mant_digits, H5T_BIT_LSB, TRUE) < 0) {
- if (H5T__bit_find(bits, epos, expt_digits, H5T_BIT_LSB, FALSE) < 0) {
- ret_value = TRUE;
+ if (H5T__bit_find(bits, mpos, mant_digits, H5T_BIT_LSB, true) < 0) {
+ if (H5T__bit_find(bits, epos, expt_digits, H5T_BIT_LSB, false) < 0) {
+ ret_value = true;
goto done;
}
}
- else if (H5T_NORM_NONE == norm && H5T__bit_find(bits, mpos, mant_digits - 1, H5T_BIT_LSB, TRUE) < 0 &&
- H5T__bit_find(bits, epos, expt_digits, H5T_BIT_LSB, FALSE) < 0) {
+ else if (H5T_NORM_NONE == norm && H5T__bit_find(bits, mpos, mant_digits - 1, H5T_BIT_LSB, true) < 0 &&
+ H5T__bit_find(bits, epos, expt_digits, H5T_BIT_LSB, false) < 0) {
/*This is a special case for the source of no implied mantissa bit.
*If the exponent bits are all 1s and only the 1st bit of mantissa
*is set to 1. It's infinity. The Intel-Linux "long double" is this case.*/
- ret_value = TRUE;
+ ret_value = true;
goto done;
}
@@ -4575,7 +4572,7 @@ overflows(unsigned char *origin_bits, hid_t src_id, size_t dst_num_bits)
expt = H5T__bit_get_d(bits, mant_digits, expt_digits) - bias;
if (expt >= (dst_num_bits - 1)) {
- ret_value = TRUE;
+ ret_value = true;
goto done;
}
@@ -4594,7 +4591,7 @@ overflows(unsigned char *origin_bits, hid_t src_id, size_t dst_num_bits)
indx = H5T__bit_find(mant_bits, (size_t)0, (size_t)(32 * 8), H5T_BIT_MSB, 1);
if ((size_t)indx >= dst_num_bits)
- ret_value = TRUE;
+ ret_value = true;
done:
return ret_value;
@@ -4771,7 +4768,7 @@ run_fp_tests(const char *name)
{
int nerrors = 0;
- if (!HDstrcmp(name, "noop")) {
+ if (!strcmp(name, "noop")) {
nerrors += test_conv_flt_1("noop", TEST_NOOP, H5T_NATIVE_FLOAT, H5T_NATIVE_FLOAT);
nerrors += test_conv_flt_1("noop", TEST_NOOP, H5T_NATIVE_DOUBLE, H5T_NATIVE_DOUBLE);
nerrors += test_conv_flt_1("noop", TEST_NOOP, H5T_NATIVE_LDOUBLE, H5T_NATIVE_LDOUBLE);
@@ -4800,11 +4797,11 @@ run_fp_tests(const char *name)
{
char str[256]; /*string */
- HDsnprintf(str, sizeof(str), "Testing %s denormalized %s -> %s conversions", name, "long double",
- "float");
+ snprintf(str, sizeof(str), "Testing %s denormalized %s -> %s conversions", name, "long double",
+ "float");
printf("%-70s", str);
SKIPPED();
- HDputs(" Test skipped due to the conversion problem on IBM ppc64le cpu.");
+ puts(" Test skipped due to the conversion problem on IBM ppc64le cpu.");
}
#endif
@@ -4824,11 +4821,11 @@ run_fp_tests(const char *name)
{
char str[256]; /*string */
- HDsnprintf(str, sizeof(str), "Testing %s special %s -> %s conversions", name, "long double",
- "float or double");
+ snprintf(str, sizeof(str), "Testing %s special %s -> %s conversions", name, "long double",
+ "float or double");
printf("%-70s", str);
SKIPPED();
- HDputs(" Test skipped due to the conversion problem on IBM ppc64le cpu.");
+ puts(" Test skipped due to the conversion problem on IBM ppc64le cpu.");
}
#endif
#endif
@@ -4900,11 +4897,10 @@ run_int_fp_conv(const char *name)
{
char str[256]; /*string */
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "(unsigned) long",
- "long double");
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "(unsigned) long", "long double");
printf("%-70s", str);
SKIPPED();
- HDputs(" Test skipped due to the special algorithm of hardware conversion.");
+ puts(" Test skipped due to the special algorithm of hardware conversion.");
}
#endif
#endif /* H5_SIZEOF_LONG!=H5_SIZEOF_INT */
@@ -4915,10 +4911,10 @@ run_int_fp_conv(const char *name)
{
char str[256]; /*hello string */
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "long long", "long double");
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "long long", "long double");
printf("%-70s", str);
SKIPPED();
- HDputs(" Test skipped due to compiler error in handling conversion.");
+ puts(" Test skipped due to compiler error in handling conversion.");
}
#endif /* H5_LLONG_TO_LDOUBLE_CORRECT */
#if H5_LLONG_TO_LDOUBLE_CORRECT
@@ -4927,11 +4923,11 @@ run_int_fp_conv(const char *name)
{
char str[256]; /*hello string */
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "unsigned long long",
- "long double");
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "unsigned long long",
+ "long double");
printf("%-70s", str);
SKIPPED();
- HDputs(" Test skipped due to compiler not handling conversion.");
+ puts(" Test skipped due to compiler not handling conversion.");
}
#endif /* H5_LLONG_TO_LDOUBLE_CORRECT */
#endif
@@ -4984,7 +4980,7 @@ run_fp_int_conv(const char *name)
#endif
#if H5_SIZEOF_LONG_LONG != H5_SIZEOF_LONG
- if (!HDstrcmp(name, "hw")) { /* Hardware conversion */
+ if (!strcmp(name, "hw")) { /* Hardware conversion */
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_LLONG);
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_LLONG);
}
@@ -5016,11 +5012,11 @@ run_fp_int_conv(const char *name)
#else
char str[256]; /*string */
- HDsnprintf(str, sizeof(str), "Testing %s special %s -> %s conversions", name, "long double",
- "signed and unsigned char, short, int, long");
+ snprintf(str, sizeof(str), "Testing %s special %s -> %s conversions", name, "long double",
+ "signed and unsigned char, short, int, long");
printf("%-70s", str);
SKIPPED();
- HDputs(" Test skipped due to the conversion problem on IBM ppc64le cpu.");
+ puts(" Test skipped due to the conversion problem on IBM ppc64le cpu.");
#endif
}
#if H5_SIZEOF_LONG != H5_SIZEOF_INT
@@ -5039,11 +5035,11 @@ run_fp_int_conv(const char *name)
{
char str[256]; /*string */
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "long double",
- "(unsigned) long");
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "long double",
+ "(unsigned) long");
printf("%-70s", str);
SKIPPED();
- HDputs(" Test skipped due to the special algorithm of hardware conversion.");
+ puts(" Test skipped due to the special algorithm of hardware conversion.");
}
#endif
#endif /*H5_SIZEOF_LONG!=H5_SIZEOF_INT */
@@ -5055,10 +5051,10 @@ run_fp_int_conv(const char *name)
{
char str[256]; /*string */
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "long double", "long long");
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "long double", "long long");
printf("%-70s", str);
SKIPPED();
- HDputs(" Test skipped due to hardware conversion error.");
+ puts(" Test skipped due to hardware conversion error.");
}
#endif /*H5_LDOUBLE_TO_LLONG_ACCURATE*/
#if defined(H5_LDOUBLE_TO_LLONG_ACCURATE)
@@ -5067,11 +5063,11 @@ run_fp_int_conv(const char *name)
{
char str[256]; /*string */
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "long double",
- "unsigned long long");
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "long double",
+ "unsigned long long");
printf("%-70s", str);
SKIPPED();
- HDputs(" Test skipped due to hardware conversion error.");
+ puts(" Test skipped due to hardware conversion error.");
}
#endif /*H5_LDOUBLE_TO_LLONG_ACCURATE*/
#endif
@@ -5140,7 +5136,7 @@ main(void)
* Software tests
*----------------------------------------------------------------------
*/
- without_hardware_g = TRUE;
+ without_hardware_g = true;
/* Restore the default error handler (set in h5_reset()) */
h5_restore_err();
diff --git a/test/dtransform.c b/test/dtransform.c
index 6892a7ccfe5..6ec48a68e25 100644
--- a/test/dtransform.c
+++ b/test/dtransform.c
@@ -25,10 +25,10 @@ static int test_set(void);
static int test_getset(hid_t dxpl_id_simple);
/* These are needed for multiple tests, so are declared here globally and are init'ed in init_test */
-hid_t dset_id_int = -1;
-hid_t dset_id_float = -1;
-hid_t dset_id_int_chunk = -1;
-hid_t dset_id_float_chunk = -1;
+hid_t dset_id_int = H5I_INVALID_HID;
+hid_t dset_id_float = H5I_INVALID_HID;
+hid_t dset_id_int_chunk = H5I_INVALID_HID;
+hid_t dset_id_float_chunk = H5I_INVALID_HID;
const float windchillFfloat[ROWS][COLS] = {
{36.0F, 31.0F, 25.0F, 19.0F, 13.0F, 7.0F, 1.0F, -5.0F, -11.0F, -16.0F, -22.0F, -28.0F, -34.0F, -40.0F,
@@ -315,13 +315,13 @@ const int transformData[ROWS][COLS] = {{36, 31, 25, 19, 13, 7, 1, 5, 11, 16, 22,
int
main(void)
{
- hid_t dxpl_id_c_to_f = -1;
+ hid_t dxpl_id_c_to_f = H5I_INVALID_HID;
hid_t dxpl_id_c_to_f_copy = 1;
- hid_t dxpl_id_simple = -1;
- hid_t dxpl_id_polynomial = -1;
- hid_t dxpl_id_polynomial_copy = -1;
- hid_t dxpl_id_utrans_inv = -1;
- hid_t file_id = -1;
+ hid_t dxpl_id_simple = H5I_INVALID_HID;
+ hid_t dxpl_id_polynomial = H5I_INVALID_HID;
+ hid_t dxpl_id_polynomial_copy = H5I_INVALID_HID;
+ hid_t dxpl_id_utrans_inv = H5I_INVALID_HID;
+ hid_t file_id = H5I_INVALID_HID;
const char *c_to_f = "(9/5.0)*x + 32";
const char *simple = "(4/2) * ( (2 + 4)/(5 - 2.5))"; /* this equals 4.8 */
@@ -452,11 +452,11 @@ init_test(hid_t file_id)
/* utrans is a transform for char types: numbers are restricted from -128 to 127, fits into char */
const char *utrans = "(x/4+25)*3";
- hid_t dataspace = -1;
- hid_t dxpl_id_f_to_c = -1;
- hid_t dxpl_id_utrans = -1;
- hid_t cparms = -1;
- hid_t filespace = -1;
+ hid_t dataspace = H5I_INVALID_HID;
+ hid_t dxpl_id_f_to_c = H5I_INVALID_HID;
+ hid_t dxpl_id_utrans = H5I_INVALID_HID;
+ hid_t cparms = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
hsize_t dim[2] = {ROWS, COLS};
hsize_t offset[2] = {0, 0};
@@ -857,12 +857,12 @@ test_getset(const hid_t dxpl_id_c_to_f)
TESTING("H5Pget_data_transform");
- if (NULL == (ptrgetTest = (char *)malloc(HDstrlen(simple) + 1)))
+ if (NULL == (ptrgetTest = (char *)malloc(strlen(simple) + 1)))
TEST_ERROR;
- if (H5Pget_data_transform(dxpl_id_c_to_f, ptrgetTest, HDstrlen(c_to_f) + 1) < 0)
+ if (H5Pget_data_transform(dxpl_id_c_to_f, ptrgetTest, strlen(c_to_f) + 1) < 0)
TEST_ERROR;
- if (HDstrcmp(c_to_f, ptrgetTest) != 0)
+ if (strcmp(c_to_f, ptrgetTest) != 0)
FAIL_PUTS_ERROR(" ERROR: Data transform failed to match what was set\n");
PASSED();
@@ -888,11 +888,11 @@ test_getset(const hid_t dxpl_id_c_to_f)
TESTING("H5Pget_data_transform, after resetting transform property");
- if (NULL == (ptrgetTest = (char *)calloc((size_t)1, HDstrlen(simple) + 1)))
+ if (NULL == (ptrgetTest = (char *)calloc((size_t)1, strlen(simple) + 1)))
TEST_ERROR;
- if (H5Pget_data_transform(dxpl_id_c_to_f, ptrgetTest, HDstrlen(simple) + 1) < 0)
+ if (H5Pget_data_transform(dxpl_id_c_to_f, ptrgetTest, strlen(simple) + 1) < 0)
TEST_ERROR;
- if (HDstrcmp(simple, ptrgetTest) != 0)
+ if (strcmp(simple, ptrgetTest) != 0)
FAIL_PUTS_ERROR(" ERROR: Data transform failed to match what was set\n");
PASSED();
@@ -912,14 +912,14 @@ test_getset(const hid_t dxpl_id_c_to_f)
static int
test_set(void)
{
- hid_t dxpl_id = -1;
+ hid_t dxpl_id = H5I_INVALID_HID;
H5E_auto2_t func;
const char *str = "(9/5.0)*x + 32";
char *ptrgetTest = NULL;
TESTING("H5Pget_data_transform (get before set)");
- if (NULL == (ptrgetTest = (char *)malloc(HDstrlen(str) + 1)))
+ if (NULL == (ptrgetTest = (char *)malloc(strlen(str) + 1)))
TEST_ERROR;
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
@@ -930,7 +930,7 @@ test_set(void)
H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
- if (H5Pget_data_transform(dxpl_id, ptrgetTest, HDstrlen(str) + 1) < 0)
+ if (H5Pget_data_transform(dxpl_id, ptrgetTest, strlen(str) + 1) < 0)
PASSED();
else
FAIL_PUTS_ERROR(" ERROR: Data transform get before set succeeded (it shouldn't have)\n");
diff --git a/test/dtypes.c b/test/dtypes.c
index 21a79a1fb8e..74b6f617f1c 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -309,7 +309,7 @@ test_copy(void)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Should not be able to close a predefined type!");
+ puts(" Should not be able to close a predefined type!");
goto error;
}
@@ -364,15 +364,15 @@ test_detect(void)
* Test class of some atomic types.
*------------------------------------------------------------------------------*/
/* Native integers should be in the integer class */
- if (H5Tdetect_class(H5T_NATIVE_INT, H5T_INTEGER) != TRUE)
+ if (H5Tdetect_class(H5T_NATIVE_INT, H5T_INTEGER) != true)
TEST_ERROR;
/* Native integers should _not_ be in other classes */
- if (H5Tdetect_class(H5T_NATIVE_INT, H5T_FLOAT) != FALSE)
+ if (H5Tdetect_class(H5T_NATIVE_INT, H5T_FLOAT) != false)
TEST_ERROR;
- if (H5Tdetect_class(H5T_NATIVE_INT, H5T_ARRAY) != FALSE)
+ if (H5Tdetect_class(H5T_NATIVE_INT, H5T_ARRAY) != false)
TEST_ERROR;
- if (H5Tdetect_class(H5T_NATIVE_INT, H5T_ENUM) != FALSE)
+ if (H5Tdetect_class(H5T_NATIVE_INT, H5T_ENUM) != false)
TEST_ERROR;
/*--------------------------------------------------------------------------------
@@ -393,15 +393,15 @@ test_detect(void)
TEST_ERROR;
/* Make certain that the correct classes can be detected */
- if (H5Tdetect_class(atom_cmpd_id, H5T_COMPOUND) != TRUE)
+ if (H5Tdetect_class(atom_cmpd_id, H5T_COMPOUND) != true)
TEST_ERROR;
- if (H5Tdetect_class(atom_cmpd_id, H5T_INTEGER) != TRUE)
+ if (H5Tdetect_class(atom_cmpd_id, H5T_INTEGER) != true)
TEST_ERROR;
- if (H5Tdetect_class(atom_cmpd_id, H5T_FLOAT) != TRUE)
+ if (H5Tdetect_class(atom_cmpd_id, H5T_FLOAT) != true)
TEST_ERROR;
/* Make certain that an incorrect class is not detected */
- if (H5Tdetect_class(atom_cmpd_id, H5T_VLEN) != FALSE)
+ if (H5Tdetect_class(atom_cmpd_id, H5T_VLEN) != false)
TEST_ERROR;
/*--------------------------------------------------------------------------------
@@ -412,17 +412,17 @@ test_detect(void)
TEST_ERROR;
/* Make certain that the correct classes can be detected */
- if (H5Tdetect_class(atom_arr_id, H5T_ARRAY) != TRUE)
+ if (H5Tdetect_class(atom_arr_id, H5T_ARRAY) != true)
TEST_ERROR;
- if (H5Tdetect_class(atom_arr_id, H5T_REFERENCE) != TRUE)
+ if (H5Tdetect_class(atom_arr_id, H5T_REFERENCE) != true)
TEST_ERROR;
/* Make certain that an incorrect class is not detected */
- if (H5Tdetect_class(atom_arr_id, H5T_VLEN) != FALSE)
+ if (H5Tdetect_class(atom_arr_id, H5T_VLEN) != false)
TEST_ERROR;
- if (H5Tdetect_class(atom_arr_id, H5T_FLOAT) != FALSE)
+ if (H5Tdetect_class(atom_arr_id, H5T_FLOAT) != false)
TEST_ERROR;
- if (H5Tdetect_class(atom_arr_id, H5T_INTEGER) != FALSE)
+ if (H5Tdetect_class(atom_arr_id, H5T_INTEGER) != false)
TEST_ERROR;
/* Create a VL datatype with an atomic base type of float*/
@@ -430,15 +430,15 @@ test_detect(void)
TEST_ERROR;
/* Make certain that the correct classes can be detected */
- if (H5Tdetect_class(atom_vlf_id, H5T_VLEN) != TRUE)
+ if (H5Tdetect_class(atom_vlf_id, H5T_VLEN) != true)
TEST_ERROR;
- if (H5Tdetect_class(atom_vlf_id, H5T_FLOAT) != TRUE)
+ if (H5Tdetect_class(atom_vlf_id, H5T_FLOAT) != true)
TEST_ERROR;
/* Make certain that an incorrect class is not detected */
- if (H5Tdetect_class(atom_vlf_id, H5T_COMPOUND) != FALSE)
+ if (H5Tdetect_class(atom_vlf_id, H5T_COMPOUND) != false)
TEST_ERROR;
- if (H5Tdetect_class(atom_vlf_id, H5T_INTEGER) != FALSE)
+ if (H5Tdetect_class(atom_vlf_id, H5T_INTEGER) != false)
TEST_ERROR;
/* Create a VL datatype with an atomic base type of char. It should be a VL
@@ -447,13 +447,13 @@ test_detect(void)
TEST_ERROR;
/* Make certain that the correct classes can be detected */
- if (H5Tdetect_class(atom_vlc_id, H5T_VLEN) != TRUE)
+ if (H5Tdetect_class(atom_vlc_id, H5T_VLEN) != true)
TEST_ERROR;
- if (H5Tdetect_class(atom_vlc_id, H5T_INTEGER) != TRUE)
+ if (H5Tdetect_class(atom_vlc_id, H5T_INTEGER) != true)
TEST_ERROR;
/* Make certain that an incorrect class is not detected */
- if (H5Tdetect_class(atom_vlc_id, H5T_STRING) != FALSE)
+ if (H5Tdetect_class(atom_vlc_id, H5T_STRING) != false)
TEST_ERROR;
/* Create a VL string. It should be a string, not a VL class. */
@@ -463,11 +463,11 @@ test_detect(void)
TEST_ERROR;
/* Make certain that the correct classes can be detected */
- if (H5Tdetect_class(atom_vls_id, H5T_STRING) != TRUE)
+ if (H5Tdetect_class(atom_vls_id, H5T_STRING) != true)
TEST_ERROR;
/* Make certain that an incorrect class is not detected */
- if (H5Tdetect_class(atom_vls_id, H5T_VLEN) != FALSE)
+ if (H5Tdetect_class(atom_vls_id, H5T_VLEN) != false)
TEST_ERROR;
/*--------------------------------------------------------------------------------
@@ -490,25 +490,25 @@ test_detect(void)
TEST_ERROR;
/* Make certain that the correct classes can be detected */
- if (H5Tdetect_class(cplx_cmpd_id, H5T_COMPOUND) != TRUE)
+ if (H5Tdetect_class(cplx_cmpd_id, H5T_COMPOUND) != true)
TEST_ERROR;
- if (H5Tdetect_class(cplx_cmpd_id, H5T_ARRAY) != TRUE)
+ if (H5Tdetect_class(cplx_cmpd_id, H5T_ARRAY) != true)
TEST_ERROR;
- if (H5Tdetect_class(cplx_cmpd_id, H5T_REFERENCE) != TRUE)
+ if (H5Tdetect_class(cplx_cmpd_id, H5T_REFERENCE) != true)
TEST_ERROR;
- if (H5Tdetect_class(cplx_cmpd_id, H5T_INTEGER) != TRUE)
+ if (H5Tdetect_class(cplx_cmpd_id, H5T_INTEGER) != true)
TEST_ERROR;
- if (H5Tdetect_class(cplx_cmpd_id, H5T_FLOAT) != TRUE)
+ if (H5Tdetect_class(cplx_cmpd_id, H5T_FLOAT) != true)
TEST_ERROR;
- if (H5Tdetect_class(cplx_cmpd_id, H5T_STRING) != TRUE)
+ if (H5Tdetect_class(cplx_cmpd_id, H5T_STRING) != true)
TEST_ERROR;
- if (H5Tdetect_class(cplx_cmpd_id, H5T_VLEN) != TRUE)
+ if (H5Tdetect_class(cplx_cmpd_id, H5T_VLEN) != true)
TEST_ERROR;
/* Make certain that an incorrect class is not detected */
- if (H5Tdetect_class(cplx_cmpd_id, H5T_TIME) != FALSE)
+ if (H5Tdetect_class(cplx_cmpd_id, H5T_TIME) != false)
TEST_ERROR;
- if (H5Tdetect_class(cplx_cmpd_id, H5T_ENUM) != FALSE)
+ if (H5Tdetect_class(cplx_cmpd_id, H5T_ENUM) != false)
TEST_ERROR;
/* Close complex compound datatype */
@@ -750,7 +750,7 @@ test_compound_2(void)
const size_t nelmts = NTESTELEM;
const hsize_t four = 4;
unsigned char *buf = NULL, *orig = NULL, *bkg = NULL;
- hid_t st = -1, dt = -1;
+ hid_t st = H5I_INVALID_HID, dt = H5I_INVALID_HID;
hid_t array_dt;
int64_t nmembs;
int i;
@@ -875,7 +875,7 @@ test_compound_3(void)
const size_t nelmts = NTESTELEM;
const hsize_t four = 4;
unsigned char *buf = NULL, *orig = NULL, *bkg = NULL;
- hid_t st = -1, dt = -1;
+ hid_t st = H5I_INVALID_HID, dt = H5I_INVALID_HID;
hid_t array_dt;
int64_t nmembs;
int i;
@@ -1000,7 +1000,7 @@ test_compound_4(void)
const size_t nelmts = NTESTELEM;
const hsize_t four = 4;
unsigned char *buf = NULL, *orig = NULL, *bkg = NULL;
- hid_t st = -1, dt = -1;
+ hid_t st = H5I_INVALID_HID, dt = H5I_INVALID_HID;
hid_t array_dt;
int64_t nmembs;
int i;
@@ -1225,7 +1225,7 @@ test_compound_6(void)
const size_t nelmts = NTESTELEM;
unsigned char *buf = NULL, *orig = NULL, *bkg = NULL;
- hid_t st = -1, dt = -1;
+ hid_t st = H5I_INVALID_HID, dt = H5I_INVALID_HID;
int64_t nmembs;
int i;
@@ -1850,7 +1850,7 @@ test_compound_9(void)
goto error;
} /* end if */
- if (rdata.i1 != wdata.i1 || rdata.i2 != wdata.i2 || HDstrcmp(rdata.str, wdata.str) != 0) {
+ if (rdata.i1 != wdata.i1 || rdata.i2 != wdata.i2 || strcmp(rdata.str, wdata.str) != 0) {
H5_FAILED();
AT();
printf("incorrect read data\n");
@@ -1924,7 +1924,7 @@ test_compound_9(void)
goto error;
} /* end if */
- if (rdata.i1 != wdata.i1 || rdata.i2 != wdata.i2 || HDstrcmp(rdata.str, wdata.str) != 0) {
+ if (rdata.i1 != wdata.i1 || rdata.i2 != wdata.i2 || strcmp(rdata.str, wdata.str) != 0) {
H5_FAILED();
AT();
printf("incorrect read data\n");
@@ -1998,12 +1998,12 @@ test_compound_10(void)
for (i = 0; i < ARRAY_DIM; i++) {
wdata[i].i1 = i * 10 + i;
- wdata[i].str = HDstrdup("C string A");
+ wdata[i].str = strdup("C string A");
wdata[i].str[9] = (char)(wdata[i].str[9] + i);
wdata[i].i2 = i * 1000 + i * 10;
- wdata[i].text.p = (void *)HDstrdup("variable-length text A\0");
- len = wdata[i].text.len = HDstrlen((char *)wdata[i].text.p) + 1;
+ wdata[i].text.p = (void *)strdup("variable-length text A\0");
+ len = wdata[i].text.len = strlen((char *)wdata[i].text.p) + 1;
((char *)(wdata[i].text.p))[len - 2] = (char)(((char *)(wdata[i].text.p))[len - 2] + i);
((char *)(wdata[i].text.p))[len - 1] = '\0';
}
@@ -2109,7 +2109,7 @@ test_compound_10(void)
for (i = 0; i < ARRAY_DIM; i++) {
if (rdata[i].i1 != wdata[i].i1 || rdata[i].i2 != wdata[i].i2 ||
- HDstrcmp(rdata[i].str, wdata[i].str) != 0) {
+ strcmp(rdata[i].str, wdata[i].str) != 0) {
H5_FAILED();
AT();
printf("incorrect read data\n");
@@ -2125,7 +2125,7 @@ test_compound_10(void)
t1 = rdata[i].text.p;
t2 = wdata[i].text.p;
- if (HDstrcmp((char *)t1, (char *)t2) != 0) {
+ if (strcmp((char *)t1, (char *)t2) != 0) {
H5_FAILED();
AT();
printf("incorrect VL read data\n");
@@ -2264,7 +2264,7 @@ test_compound_11(void)
((big_t *)buf)[u].s1 = (char *)malloc((size_t)32);
if (!((big_t *)buf)[u].s1)
TEST_ERROR;
- HDsnprintf(((big_t *)buf)[u].s1, 32, "%u", (unsigned)u);
+ snprintf(((big_t *)buf)[u].s1, 32, "%u", (unsigned)u);
} /* end for */
/* Make copy of buffer before conversion */
@@ -2307,7 +2307,7 @@ test_compound_11(void)
((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
TEST_ERROR;
} /* end if */
- else if (HDstrcmp(((big_t *)buf_orig)[u].s1, ((little_t *)buf)[u].s1) != 0) {
+ else if (strcmp(((big_t *)buf_orig)[u].s1, ((little_t *)buf)[u].s1) != 0) {
printf("Error, line #%d: buf_orig[%u].s1=%s, buf[%u].s1=%s\n", __LINE__, (unsigned)u,
((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
TEST_ERROR;
@@ -2358,7 +2358,7 @@ test_compound_11(void)
((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
TEST_ERROR;
} /* end if */
- else if (HDstrcmp(((big_t *)buf_orig)[u].s1, ((little_t *)buf)[u].s1) != 0) {
+ else if (strcmp(((big_t *)buf_orig)[u].s1, ((little_t *)buf)[u].s1) != 0) {
printf("Error, line #%d: buf_orig[%u].s1=%s, buf[%u].s1=%s\n", __LINE__, (unsigned)u,
((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
TEST_ERROR;
@@ -2399,7 +2399,7 @@ test_compound_11(void)
((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
TEST_ERROR;
} /* end if */
- else if (HDstrcmp(((big_t *)buf_orig)[u].s1, ((little_t *)buf)[u].s1) != 0) {
+ else if (strcmp(((big_t *)buf_orig)[u].s1, ((little_t *)buf)[u].s1) != 0) {
printf("Error, line #%d: buf_orig[%u].s1=%s, buf[%u].s1=%s\n", __LINE__, (unsigned)u,
((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
TEST_ERROR;
@@ -2525,7 +2525,7 @@ test_compound_12(void)
H5E_END_TRY
if (ret >= 0) {
H5_FAILED();
- HDputs(" Tries to cut off the last member. Should have failed.");
+ puts(" Tries to cut off the last member. Should have failed.");
goto error;
}
@@ -2971,14 +2971,14 @@ test_compound_14(void)
goto error;
} /* end if */
- if (rdata1.c1 != wdata1.c1 || rdata1.c2 != wdata1.c2 || HDstrcmp(rdata1.str, wdata1.str) != 0) {
+ if (rdata1.c1 != wdata1.c1 || rdata1.c2 != wdata1.c2 || strcmp(rdata1.str, wdata1.str) != 0) {
H5_FAILED();
AT();
printf("incorrect read data\n");
goto error;
} /* end if */
- if (rdata2.c1 != wdata2.c1 || rdata2.c2 != wdata2.c2 || HDstrcmp(rdata2.str, wdata2.str) != 0 ||
+ if (rdata2.c1 != wdata2.c1 || rdata2.c2 != wdata2.c2 || strcmp(rdata2.str, wdata2.str) != 0 ||
rdata2.l1 != wdata2.l1 || rdata2.l2 != wdata2.l2 || rdata2.l3 != wdata2.l3 ||
rdata2.l4 != wdata2.l4) {
H5_FAILED();
@@ -3069,14 +3069,14 @@ test_compound_14(void)
goto error;
} /* end if */
- if (rdata1.c1 != wdata1.c1 || rdata1.c2 != wdata1.c2 || HDstrcmp(rdata1.str, wdata1.str) != 0) {
+ if (rdata1.c1 != wdata1.c1 || rdata1.c2 != wdata1.c2 || strcmp(rdata1.str, wdata1.str) != 0) {
H5_FAILED();
AT();
printf("incorrect read data\n");
goto error;
} /* end if */
- if (rdata2.c1 != wdata2.c1 || rdata2.c2 != wdata2.c2 || HDstrcmp(rdata2.str, wdata2.str) != 0 ||
+ if (rdata2.c1 != wdata2.c1 || rdata2.c2 != wdata2.c2 || strcmp(rdata2.str, wdata2.str) != 0 ||
rdata2.l1 != wdata2.l1 || rdata2.l2 != wdata2.l2 || rdata2.l3 != wdata2.l3 ||
rdata2.l4 != wdata2.l4) {
H5_FAILED();
@@ -3688,16 +3688,16 @@ test_compound_17(void)
static int
test_compound_18(void)
{
- hid_t file = -1;
- hid_t gid = -1;
- hid_t did = -1;
- hid_t aid = -1;
- hid_t tid = -1;
- hid_t sid = -1;
+ hid_t file = H5I_INVALID_HID;
+ hid_t gid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t aid = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
hsize_t dim = 1;
const char *testfile = H5_get_srcdir_filename(TESTFILE); /* Corrected test file name */
char filename[1024];
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
herr_t ret;
TESTING("accessing objects with compound datatypes that have no fields");
@@ -3842,7 +3842,7 @@ test_query(void)
long c;
double d;
};
- hid_t file = -1, tid1 = -1, tid2 = -1;
+ hid_t file = H5I_INVALID_HID, tid1 = H5I_INVALID_HID, tid2 = H5I_INVALID_HID;
char filename[1024];
char compnd_type[] = "Compound_type", enum_type[] = "Enum_type";
short enum_val;
@@ -4028,7 +4028,7 @@ test_query(void)
printf("Can't get name for enum member\n");
goto error;
} /* end if */
- if (HDstrcmp("YELLOW", enum_name) != 0) {
+ if (strcmp("YELLOW", enum_name) != 0) {
H5_FAILED();
printf("Incorrect name for enum member\n");
goto error;
@@ -4081,10 +4081,11 @@ static int
test_transient(hid_t fapl)
{
static hsize_t ds_size[2] = {10, 20};
- hid_t file = -1, type = -1, space = -1, dset = -1, t2 = -1;
- char filename[1024];
- hid_t ret_id; /* Generic hid_t return value */
- herr_t status;
+ hid_t file = H5I_INVALID_HID, type = H5I_INVALID_HID, space = H5I_INVALID_HID, dset = H5I_INVALID_HID,
+ t2 = H5I_INVALID_HID;
+ char filename[1024];
+ hid_t ret_id; /* Generic hid_t return value */
+ herr_t status;
TESTING("transient datatypes");
@@ -4103,7 +4104,7 @@ test_transient(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Predefined types should not be modifiable!");
+ puts(" Predefined types should not be modifiable!");
goto error;
}
H5E_BEGIN_TRY
@@ -4113,7 +4114,7 @@ test_transient(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Predefined types should not be closable!");
+ puts(" Predefined types should not be closable!");
goto error;
}
@@ -4131,7 +4132,7 @@ test_transient(hid_t fapl)
H5E_END_TRY
if (ret_id >= 0) {
H5_FAILED();
- HDputs(" Attributes should not be allowed for transient types!");
+ puts(" Attributes should not be allowed for transient types!");
goto error;
}
@@ -4153,7 +4154,7 @@ test_transient(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Dataset datatypes should not be modifiable!");
+ puts(" Dataset datatypes should not be modifiable!");
goto error;
}
if (H5Tclose(t2) < 0)
@@ -4176,7 +4177,7 @@ test_transient(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Dataset datatypes should not be modifiable!");
+ puts(" Dataset datatypes should not be modifiable!");
goto error;
}
if (H5Tclose(t2) < 0)
@@ -4232,7 +4233,8 @@ test_transient(hid_t fapl)
static int
test_named(hid_t fapl)
{
- hid_t file = -1, type = -1, space = -1, dset = -1, t2 = -1, t3 = -1, attr1 = -1;
+ hid_t file = H5I_INVALID_HID, type = H5I_INVALID_HID, space = H5I_INVALID_HID, dset = H5I_INVALID_HID,
+ t2 = H5I_INVALID_HID, t3 = H5I_INVALID_HID, attr1 = H5I_INVALID_HID;
herr_t status;
static hsize_t ds_size[2] = {10, 20};
size_t i, j;
@@ -4257,7 +4259,7 @@ test_named(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Predefined types should not be committable!");
+ puts(" Predefined types should not be committable!");
goto error;
}
@@ -4270,7 +4272,7 @@ test_named(hid_t fapl)
goto error;
if (0 == status) {
H5_FAILED();
- HDputs(" H5Tcommitted() returned false!");
+ puts(" H5Tcommitted() returned false!");
goto error;
}
@@ -4282,7 +4284,7 @@ test_named(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Committed type is not constant!");
+ puts(" Committed type is not constant!");
goto error;
}
@@ -4295,7 +4297,7 @@ test_named(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Committed types should not be recommitted!");
+ puts(" Committed types should not be recommitted!");
goto error;
}
@@ -4320,7 +4322,7 @@ test_named(hid_t fapl)
goto error;
if (status) {
H5_FAILED();
- HDputs(" Copying a named type should result in a transient type!");
+ puts(" Copying a named type should result in a transient type!");
goto error;
}
if (H5Tset_precision(t2, (size_t)256) < 0)
@@ -4339,7 +4341,7 @@ test_named(hid_t fapl)
goto error;
if (!status) {
H5_FAILED();
- HDputs(" Opened named types should be named types!");
+ puts(" Opened named types should be named types!");
goto error;
}
@@ -4354,7 +4356,7 @@ test_named(hid_t fapl)
goto error;
if (!status) {
H5_FAILED();
- HDputs(" Dataset type should be a named type!");
+ puts(" Dataset type should be a named type!");
goto error;
}
@@ -4373,7 +4375,7 @@ test_named(hid_t fapl)
goto error;
if (!status) {
H5_FAILED();
- HDputs(" Dataset type should be a named type!");
+ puts(" Dataset type should be a named type!");
goto error;
}
@@ -4399,7 +4401,7 @@ test_named(hid_t fapl)
goto error;
if (!status) {
H5_FAILED();
- HDputs(" Dataset type should be a named type!");
+ puts(" Dataset type should be a named type!");
goto error;
}
if (H5Tclose(t2) < 0)
@@ -4427,7 +4429,7 @@ test_named(hid_t fapl)
goto error;
if (status) {
H5_FAILED();
- HDputs(" Copied type should not be a named type!");
+ puts(" Copied type should not be a named type!");
goto error;
}
if ((dset = H5Dcreate2(file, "dset3", t2, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -4438,7 +4440,7 @@ test_named(hid_t fapl)
goto error;
if (status) {
H5_FAILED();
- HDputs(" Datatype from dataset using copied type should not be a named type!");
+ puts(" Datatype from dataset using copied type should not be a named type!");
goto error;
}
if (H5Tclose(t3) < 0)
@@ -4469,7 +4471,7 @@ test_named(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Types should not be committable to a read-only file!");
+ puts(" Types should not be committable to a read-only file!");
goto error;
}
@@ -4483,7 +4485,7 @@ test_named(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Types should not be committable to a read-only file!");
+ puts(" Types should not be committable to a read-only file!");
goto error;
}
@@ -4550,7 +4552,7 @@ test_str_create(void)
{
hid_t fixed_str1, fixed_str2;
hid_t vlen_str1, vlen_str2;
- htri_t is_vl_str = FALSE;
+ htri_t is_vl_str = false;
size_t query_size, str_size = 10;
TESTING("string type creation using H5Tcreate");
@@ -4631,8 +4633,8 @@ static int
test_conv_str_1(void)
{
char *buf = NULL;
- hid_t src_type = -1;
- hid_t dst_type = -1;
+ hid_t src_type = H5I_INVALID_HID;
+ hid_t dst_type = H5I_INVALID_HID;
TESTING("string conversions");
@@ -4651,14 +4653,14 @@ test_conv_str_1(void)
goto error;
if (memcmp(buf, "abcd\0abcd\0abcdefghi\0", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Truncated C-string test failed");
+ puts(" Truncated C-string test failed");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
if (memcmp(buf, "abcd\0\0\0\0\0\0abcd\0\0\0\0\0\0", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Extended C-string test failed");
+ puts(" Extended C-string test failed");
goto error;
}
free(buf);
@@ -4682,14 +4684,14 @@ test_conv_str_1(void)
goto error;
if (memcmp(buf, "abcdeabcdeabcdefghij", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Truncated C buffer test failed");
+ puts(" Truncated C buffer test failed");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
if (memcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Extended C buffer test failed");
+ puts(" Extended C buffer test failed");
goto error;
}
free(buf);
@@ -4713,14 +4715,14 @@ test_conv_str_1(void)
goto error;
if (memcmp(buf, "abcdeabcdeabcdefghij", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Truncated Fortran-string test failed");
+ puts(" Truncated Fortran-string test failed");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
if (memcmp(buf, "abcde abcde ", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Extended Fortran-string test failed");
+ puts(" Extended Fortran-string test failed");
goto error;
}
free(buf);
@@ -4747,7 +4749,7 @@ test_conv_str_1(void)
goto error;
if (memcmp(buf, "abcdefghijabcdefghij", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Non-terminated string test 1");
+ puts(" Non-terminated string test 1");
goto error;
}
H5Tclose(dst_type);
@@ -4758,7 +4760,7 @@ test_conv_str_1(void)
goto error;
if (memcmp(buf, "abcd\0abcd\0abcdefghij", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Non-terminated string test 2");
+ puts(" Non-terminated string test 2");
goto error;
}
memcpy(buf, "abcdeabcdexxxxxxxxxx", (size_t)20);
@@ -4766,7 +4768,7 @@ test_conv_str_1(void)
goto error;
if (memcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Non-terminated string test 2");
+ puts(" Non-terminated string test 2");
goto error;
}
free(buf);
@@ -4790,14 +4792,14 @@ test_conv_str_1(void)
goto error;
if (memcmp(buf, "abcdefghi abcdefghi ", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" C string to Fortran test 1");
+ puts(" C string to Fortran test 1");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
if (memcmp(buf, "abcdefghi\0abcdefghi\0", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Fortran to C string test 1");
+ puts(" Fortran to C string test 1");
goto error;
}
if (H5Tclose(dst_type) < 0)
@@ -4809,14 +4811,14 @@ test_conv_str_1(void)
goto error;
if (memcmp(buf, "abcdeabcdeabcdefgh\0\0", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" C string to Fortran test 2");
+ puts(" C string to Fortran test 2");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
if (memcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Fortran to C string test 2");
+ puts(" Fortran to C string test 2");
goto error;
}
if (H5Tclose(src_type) < 0)
@@ -4832,14 +4834,14 @@ test_conv_str_1(void)
goto error;
if (memcmp(buf, "abcd abcd ", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" C string to Fortran test 3");
+ puts(" C string to Fortran test 3");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
if (memcmp(buf, "abcd\0abcd\0abcd ", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Fortran to C string test 3");
+ puts(" Fortran to C string test 3");
goto error;
}
free(buf);
@@ -4863,14 +4865,14 @@ test_conv_str_1(void)
goto error;
if (memcmp(buf, "abcdefghijabcdefghij", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" C buffer to Fortran test 1");
+ puts(" C buffer to Fortran test 1");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
if (memcmp(buf, "abcdefghijabcdefghij", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Fortran to C buffer test 1");
+ puts(" Fortran to C buffer test 1");
goto error;
}
if (H5Tclose(dst_type) < 0)
@@ -4882,14 +4884,14 @@ test_conv_str_1(void)
goto error;
if (memcmp(buf, "abcdeabcdeabcdefgh\0\0", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" C buffer to Fortran test 2");
+ puts(" C buffer to Fortran test 2");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
if (memcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Fortran to C buffer test 2");
+ puts(" Fortran to C buffer test 2");
goto error;
}
if (H5Tclose(src_type) < 0)
@@ -4905,14 +4907,14 @@ test_conv_str_1(void)
goto error;
if (memcmp(buf, "abcd abcd ", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" C buffer to Fortran test 3");
+ puts(" C buffer to Fortran test 3");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
if (memcmp(buf, "abcd\0abcd\0abcd ", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Fortran to C buffer test 3");
+ puts(" Fortran to C buffer test 3");
goto error;
}
if (H5Tclose(src_type) < 0)
@@ -4962,8 +4964,8 @@ static int
test_conv_str_2(void)
{
char *buf = NULL, s[80];
- hid_t c_type = -1;
- hid_t f_type = -1;
+ hid_t c_type = H5I_INVALID_HID;
+ hid_t f_type = H5I_INVALID_HID;
const size_t nelmts = NTESTELEM;
size_t i, j, nchars;
int ret_value = 1;
@@ -4986,7 +4988,7 @@ test_conv_str_2(void)
} /* end for */
/* Do the conversions */
- HDsnprintf(s, sizeof(s), "Testing random string conversion speed");
+ snprintf(s, sizeof(s), "Testing random string conversion speed");
printf("%-70s", s);
fflush(stdout);
if (H5Tconvert(c_type, f_type, nelmts, buf, NULL, H5P_DEFAULT) < 0)
@@ -5031,8 +5033,8 @@ static int
test_conv_str_3(void)
{
char *buf = NULL;
- hid_t type = -1;
- hid_t super = -1;
+ hid_t type = H5I_INVALID_HID;
+ hid_t super = H5I_INVALID_HID;
const size_t nelmts = NTESTELEM;
size_t i, j, nchars;
int ret_value = 1;
@@ -5168,8 +5170,8 @@ test_conv_enum_1(void)
{
const size_t nelmts = NTESTELEM;
int i, val, *buf = NULL;
- hid_t t1 = -1;
- hid_t t2 = -1;
+ hid_t t1 = H5I_INVALID_HID;
+ hid_t t2 = H5I_INVALID_HID;
char s[80];
int ret_value = 1;
size_t u;
@@ -5194,14 +5196,14 @@ test_conv_enum_1(void)
buf[u] = HDrand() % 26;
/* Conversions */
- HDsnprintf(s, sizeof(s), "Testing random enum conversion O(N)");
+ snprintf(s, sizeof(s), "Testing random enum conversion O(N)");
printf("%-70s", s);
fflush(stdout);
if (H5Tconvert(t1, t2, nelmts, buf, NULL, H5P_DEFAULT) < 0)
goto error;
PASSED();
- HDsnprintf(s, sizeof(s), "Testing random enum conversion O(N log N)");
+ snprintf(s, sizeof(s), "Testing random enum conversion O(N log N)");
printf("%-70s", s);
fflush(stdout);
if (H5Tconvert(t2, t1, nelmts, buf, NULL, H5P_DEFAULT) < 0)
@@ -5243,7 +5245,7 @@ test_conv_enum_1(void)
static int
test_conv_enum_2(void)
{
- hid_t srctype = -1, dsttype = -1, oddsize = -1;
+ hid_t srctype = H5I_INVALID_HID, dsttype = H5I_INVALID_HID, oddsize = H5I_INVALID_HID;
int *data = NULL, i, nerrors = 0;
const char *mname[] = {"RED", "GREEN", "BLUE", "YELLOW", "PINK", "PURPLE", "ORANGE", "WHITE"};
@@ -5317,7 +5319,7 @@ static int
test_conv_bitfield(void)
{
unsigned char buf[4];
- hid_t st = -1, dt = -1;
+ hid_t st = H5I_INVALID_HID, dt = H5I_INVALID_HID;
TESTING("bitfield conversions");
@@ -5411,7 +5413,7 @@ test_conv_bitfield(void)
static int
test_bitfield_funcs(void)
{
- hid_t type = -1, ntype = -1, super = -1;
+ hid_t type = H5I_INVALID_HID, ntype = H5I_INVALID_HID, super = H5I_INVALID_HID;
size_t size;
char *tag = 0;
H5T_pad_t inpad;
@@ -5613,7 +5615,7 @@ static int
opaque_check(int tag_it)
{
#define OPAQUE_NELMTS 1000
- hid_t st = -1, dt = -1;
+ hid_t st = H5I_INVALID_HID, dt = H5I_INVALID_HID;
herr_t status;
char buf[1]; /*not really used*/
int saved;
@@ -5689,7 +5691,7 @@ static int
opaque_long(void)
{
char *long_tag = NULL;
- hid_t dt = -1;
+ hid_t dt = H5I_INVALID_HID;
herr_t ret;
/* Build opaque type */
@@ -5743,7 +5745,7 @@ opaque_long(void)
static int
opaque_funcs(void)
{
- hid_t type = -1, super = -1;
+ hid_t type = H5I_INVALID_HID, super = H5I_INVALID_HID;
size_t size;
H5T_pad_t inpad;
H5T_cset_t cset;
@@ -6455,9 +6457,9 @@ test_latest(void)
long c;
double d;
};
- hid_t file = (-1); /* File ID */
- hid_t tid1 = (-1), tid2 = (-1); /* Datatype ID */
- hid_t fapl = (-1); /* File access property list */
+ hid_t file = (H5I_INVALID_HID); /* File ID */
+ hid_t tid1 = (H5I_INVALID_HID), tid2 = (H5I_INVALID_HID); /* Datatype ID */
+ hid_t fapl = (H5I_INVALID_HID); /* File access property list */
H5O_native_info_t oi; /* Stat buffer for committed datatype */
hsize_t old_dtype_oh_size; /* Size of object header with "old" format */
hsize_t new_dtype_oh_size; /* Size of object header with "new" format */
@@ -6800,7 +6802,7 @@ test_int_float_except(void)
PASSED();
#else /* H5_SIZEOF_INT==4 && H5_SIZEOF_FLOAT==4 */
SKIPPED();
- HDputs(" Test skipped due to int or float not 4 bytes.");
+ puts(" Test skipped due to int or float not 4 bytes.");
#endif /* H5_SIZEOF_INT==4 && H5_SIZEOF_FLOAT==4 */
return 0;
@@ -7073,9 +7075,10 @@ test_set_order_compound(hid_t fapl)
atomic_cmpd d[3][4];
} complex_cmpd;
- hid_t file = -1;
- hid_t cmpd = -1, memb_cmpd = -1, memb_array1 = -1, memb_array2 = -1, cmpd_array = -1;
- hid_t vl_id = -1;
+ hid_t file = H5I_INVALID_HID;
+ hid_t cmpd = H5I_INVALID_HID, memb_cmpd = H5I_INVALID_HID, memb_array1 = H5I_INVALID_HID,
+ memb_array2 = H5I_INVALID_HID, cmpd_array = H5I_INVALID_HID;
+ hid_t vl_id = H5I_INVALID_HID;
hsize_t dims[2] = {3, 4}; /* Array dimensions */
char filename[1024];
herr_t ret; /* Generic return value */
@@ -7224,7 +7227,8 @@ test_set_order_compound(hid_t fapl)
static int
test_named_indirect_reopen(hid_t fapl)
{
- hid_t file = -1, type = -1, reopened_type = -1, strtype = -1, dset = -1, space = -1;
+ hid_t file = H5I_INVALID_HID, type = H5I_INVALID_HID, reopened_type = H5I_INVALID_HID,
+ strtype = H5I_INVALID_HID, dset = H5I_INVALID_HID, space = H5I_INVALID_HID;
static hsize_t dims[1] = {3};
size_t dt_size;
int enum_value;
@@ -7384,7 +7388,7 @@ test_named_indirect_reopen(hid_t fapl)
TEST_ERROR;
if (NULL == (tag_ret = H5Tget_tag(type)))
TEST_ERROR;
- if (HDstrcmp(tag, tag_ret) != 0)
+ if (strcmp(tag, tag_ret) != 0)
TEST_ERROR;
H5free_memory(tag_ret);
tag_ret = NULL;
@@ -7400,7 +7404,7 @@ test_named_indirect_reopen(hid_t fapl)
TEST_ERROR;
if (NULL == (tag_ret = H5Tget_tag(type)))
TEST_ERROR;
- if (HDstrcmp(tag, tag_ret) != 0)
+ if (strcmp(tag, tag_ret) != 0)
TEST_ERROR;
H5free_memory(tag_ret);
tag_ret = NULL;
@@ -7592,11 +7596,11 @@ create_del_obj_named_test_file(const char *filename, hid_t fapl, H5F_libver_t lo
static int
test_delete_obj_named(hid_t fapl)
{
- hid_t filea1 = -1, filea2 = -1, fileb = -1; /* File IDs */
- hid_t attr = -1; /* Attribute ID */
- hid_t dset = -1; /* Dataset ID */
- hid_t fapl2 = -1; /* File access property list ID */
- H5F_libver_t low, high; /* File format bounds */
+ hid_t filea1 = H5I_INVALID_HID, filea2 = H5I_INVALID_HID, fileb = H5I_INVALID_HID; /* File IDs */
+ hid_t attr = H5I_INVALID_HID; /* Attribute ID */
+ hid_t dset = H5I_INVALID_HID; /* Dataset ID */
+ hid_t fapl2 = H5I_INVALID_HID; /* File access property list ID */
+ H5F_libver_t low, high; /* File format bounds */
char filename[1024], filename2[1024];
TESTING("deleting objects that use named datatypes");
@@ -7709,15 +7713,15 @@ test_delete_obj_named(hid_t fapl)
static int
test_delete_obj_named_fileid(hid_t fapl)
{
- hid_t filea1 = -1, filea2 = -1, fileb = -1; /* File IDs */
- hid_t dset_fid = -1; /* File ID from dataset */
- hid_t type_fid = -1; /* File ID from datatype */
- hid_t attr_fid = -1; /* File ID from attribute */
- hid_t type = -1; /* Datatype ID */
- hid_t attr = -1; /* Attribute ID */
- hid_t dset = -1; /* Dataset ID */
- hid_t fapl2 = -1; /* File access property list ID */
- H5F_libver_t low, high; /* File format bounds */
+ hid_t filea1 = H5I_INVALID_HID, filea2 = H5I_INVALID_HID, fileb = H5I_INVALID_HID; /* File IDs */
+ hid_t dset_fid = H5I_INVALID_HID; /* File ID from dataset */
+ hid_t type_fid = H5I_INVALID_HID; /* File ID from datatype */
+ hid_t attr_fid = H5I_INVALID_HID; /* File ID from attribute */
+ hid_t type = H5I_INVALID_HID; /* Datatype ID */
+ hid_t attr = H5I_INVALID_HID; /* Attribute ID */
+ hid_t dset = H5I_INVALID_HID; /* Dataset ID */
+ hid_t fapl2 = H5I_INVALID_HID; /* File access property list ID */
+ H5F_libver_t low, high; /* File format bounds */
char filename[1024], filename2[1024];
TESTING("deleting objects that use named datatypes");
@@ -7908,14 +7912,14 @@ test_delete_obj_named_fileid(hid_t fapl)
static int
test_deprec(hid_t fapl)
{
- hid_t file = -1; /* File ID */
- hid_t type = -1; /* Datatype ID */
- unsigned rank = 2; /* Rank for array datatype */
- hsize_t dims[2] = {3, 3}; /* Dimensions for array datatype */
- int perm[2] = {0, 1}; /* Dimensions permutations for array datatype */
- hsize_t rdims[2] = {0, 0}; /* Dimensions for querying array datatype */
- int rperm[2] = {-2, -2}; /* Dimensions permutations for array datatype */
- hbool_t dim_mismatch; /* Whether any dimensions didn't match */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t type = H5I_INVALID_HID; /* Datatype ID */
+ unsigned rank = 2; /* Rank for array datatype */
+ hsize_t dims[2] = {3, 3}; /* Dimensions for array datatype */
+ int perm[2] = {0, 1}; /* Dimensions permutations for array datatype */
+ hsize_t rdims[2] = {0, 0}; /* Dimensions for querying array datatype */
+ int rperm[2] = {-2, -2}; /* Dimensions permutations for array datatype */
+ bool dim_mismatch; /* Whether any dimensions didn't match */
char filename[1024];
unsigned u; /* Local index variable */
herr_t status; /* Generic routine value */
@@ -7928,9 +7932,9 @@ test_deprec(hid_t fapl)
FAIL_STACK_ERROR;
/* Make certain that the correct classes can be detected */
- if (H5Tdetect_class(type, H5T_ARRAY) != TRUE)
+ if (H5Tdetect_class(type, H5T_ARRAY) != true)
FAIL_STACK_ERROR;
- if (H5Tdetect_class(type, H5T_INTEGER) != TRUE)
+ if (H5Tdetect_class(type, H5T_INTEGER) != true)
FAIL_STACK_ERROR;
/* Get the array dimensions */
@@ -7939,24 +7943,24 @@ test_deprec(hid_t fapl)
FAIL_STACK_ERROR;
/* Check the array dimensions */
- dim_mismatch = FALSE;
+ dim_mismatch = false;
for (u = 0; u < rank; u++)
if (rdims[u] != dims[u]) {
TestErrPrintf("Array dimension information doesn't match!, rdims1[%u]=%d, tdims1[%u]=%d\n", u,
(int)rdims[u], u, (int)dims[u]);
- dim_mismatch = TRUE;
+ dim_mismatch = true;
} /* end if */
if (dim_mismatch)
FAIL_PUTS_ERROR(" Dimensions didn't match!");
/* Check the array dimension permutations */
- dim_mismatch = FALSE;
+ dim_mismatch = false;
for (u = 0; u < rank; u++)
if (rperm[u] != -2) {
TestErrPrintf(
"Array dimension permutation information was modified!, rdims1[%u]=%d, tdims1[%u]=%d\n", u,
rperm[u], u, perm[u]);
- dim_mismatch = TRUE;
+ dim_mismatch = true;
} /* end if */
if (dim_mismatch)
FAIL_PUTS_ERROR(" Dimension permutations modified!");
@@ -8038,7 +8042,7 @@ test_deprec(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Types should not be committable to a read-only file!");
+ puts(" Types should not be committable to a read-only file!");
goto error;
}
@@ -8076,13 +8080,13 @@ test_deprec(hid_t fapl)
static int
test_utf_ascii_conv(void)
{
- hid_t fid = -1;
- hid_t did = -1;
- hid_t utf8_vtid = -1;
- hid_t ascii_vtid = -1;
- hid_t utf8_tid = -1;
- hid_t ascii_tid = -1;
- hid_t sid = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t utf8_vtid = H5I_INVALID_HID;
+ hid_t ascii_vtid = H5I_INVALID_HID;
+ hid_t utf8_tid = H5I_INVALID_HID;
+ hid_t ascii_tid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
const char *utf8_w = "foo!";
char *ascii_r = NULL;
const char *ascii_w = "bar!";
@@ -8340,8 +8344,8 @@ test_utf_ascii_conv(void)
static herr_t
verify_version(hid_t dtype, H5F_libver_t low, unsigned *highest_version)
{
- hid_t base_dtype = -1;
- hid_t mem_dtype = -1;
+ hid_t base_dtype = H5I_INVALID_HID;
+ hid_t mem_dtype = H5I_INVALID_HID;
H5T_t *dtypep = NULL; /* Internal structure of a datatype */
H5T_class_t type_cls = H5T_NO_CLASS; /* Temporary var for datatype class */
int nmembers = 0;
@@ -8509,25 +8513,25 @@ test_versionbounds(void)
color_t enum_color;
} outer_cmp_t;
- hid_t file = -1; /* File ID */
- hid_t space = -1; /* Dataspace ID */
- hid_t dset = -1; /* Dataset ID */
- hid_t fcpl = -1; /* File creation property list ID */
- hid_t fapl = -1; /* Copy of file access property list ID */
- hid_t dcpl = -1; /* Dataset creation property list ID */
- hid_t dset_dtype = -1; /* Dataset's datatype */
- hid_t arr_chartype = -1; /* Array of characters datatype */
- hid_t vlen_floattype = -1; /* Vlen of float datatype */
- hid_t enum_type = -1; /* Enumeration datatype */
- hid_t outer_cmp_type = -1; /* Outer compound datatype */
- hid_t inner_cmp_type = -1; /* Inner compound datatype */
- hid_t simple_cmp_type = -1; /* Simple cmpd dtype, contains no other cmpd */
- hid_t outer_arr_type = -1; /* Outermost array datatype */
- hid_t inner_arr_type = -1; /* Inner array datatype */
- H5F_t *filep = NULL; /* Pointer to internal structure of a file */
- H5T_t *dtypep = NULL; /* Pointer to internal structure of a datatype */
- hsize_t arr_dim[] = {ARRAY_LEN}; /* Length of the array */
- int low, high; /* Indices for iterating over versions */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t space = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t dset = H5I_INVALID_HID; /* Dataset ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list ID */
+ hid_t fapl = H5I_INVALID_HID; /* Copy of file access property list ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t dset_dtype = H5I_INVALID_HID; /* Dataset's datatype */
+ hid_t arr_chartype = H5I_INVALID_HID; /* Array of characters datatype */
+ hid_t vlen_floattype = H5I_INVALID_HID; /* Vlen of float datatype */
+ hid_t enum_type = H5I_INVALID_HID; /* Enumeration datatype */
+ hid_t outer_cmp_type = H5I_INVALID_HID; /* Outer compound datatype */
+ hid_t inner_cmp_type = H5I_INVALID_HID; /* Inner compound datatype */
+ hid_t simple_cmp_type = H5I_INVALID_HID; /* Simple cmpd dtype, contains no other cmpd */
+ hid_t outer_arr_type = H5I_INVALID_HID; /* Outermost array datatype */
+ hid_t inner_arr_type = H5I_INVALID_HID; /* Inner array datatype */
+ H5F_t *filep = NULL; /* Pointer to internal structure of a file */
+ H5T_t *dtypep = NULL; /* Pointer to internal structure of a datatype */
+ hsize_t arr_dim[] = {ARRAY_LEN}; /* Length of the array */
+ int low, high; /* Indices for iterating over versions */
H5F_libver_t versions[] = {H5F_LIBVER_EARLIEST, H5F_LIBVER_V18, H5F_LIBVER_V110,
H5F_LIBVER_V112, H5F_LIBVER_V114, H5F_LIBVER_V114};
int versions_count = 6; /* Number of version bounds in the array */
@@ -8746,9 +8750,9 @@ test_versionbounds(void)
int
main(void)
{
- hbool_t driver_is_parallel;
- long nerrors = 0;
- hid_t fapl = H5I_INVALID_HID;
+ bool driver_is_parallel;
+ long nerrors = 0;
+ hid_t fapl = H5I_INVALID_HID;
/* Set the random # seed */
HDsrandom((unsigned)HDtime(NULL));
diff --git a/test/earray.c b/test/earray.c
index 8f5b2beac4c..9cea8f4560a 100644
--- a/test/earray.c
+++ b/test/earray.c
@@ -136,13 +136,13 @@ struct earray_test_param_t {
/* Flush depend test context */
typedef struct earray_flush_depend_ctx_t {
- hbool_t base_obj; /* Flag to indicate that base object has been flushed */
- hbool_t idx0_obj; /* Flag to indicate that index 0's object has been flushed */
- hbool_t idx0_elem; /* Flag to indicate that index 0's element has been flushed */
- hbool_t idx1_obj; /* Flag to indicate that index 1's object has been flushed */
- hbool_t idx1_elem; /* Flag to indicate that index 1's element has been flushed */
- hbool_t idx10000_obj; /* Flag to indicate that index 10000's object has been flushed */
- hbool_t idx10000_elem; /* Flag to indicate that index 10000's element has been flushed */
+ bool base_obj; /* Flag to indicate that base object has been flushed */
+ bool idx0_obj; /* Flag to indicate that index 0's object has been flushed */
+ bool idx0_elem; /* Flag to indicate that index 0's element has been flushed */
+ bool idx1_obj; /* Flag to indicate that index 1's object has been flushed */
+ bool idx1_elem; /* Flag to indicate that index 1's element has been flushed */
+ bool idx10000_obj; /* Flag to indicate that index 10000's object has been flushed */
+ bool idx10000_elem; /* Flag to indicate that index 10000's element has been flushed */
} earray_flush_depend_ctx_t;
/* Extensible array test cache object */
@@ -566,10 +566,10 @@ finish(hid_t file, hid_t fapl, H5F_t *f, H5EA_t *ea, haddr_t ea_addr)
static unsigned
test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSED *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5EA_t *ea = NULL; /* Extensible array wrapper */
- haddr_t ea_addr = HADDR_UNDEF; /* Array address in file */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5EA_t *ea = NULL; /* Extensible array wrapper */
+ haddr_t ea_addr = HADDR_UNDEF; /* Array address in file */
/* Create file & retrieve pointer to internal file object */
if (create_file(H5F_ACC_TRUNC, fapl, &file, &f) < 0)
@@ -753,7 +753,7 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
}
#else /* NDEBUG */
SKIPPED();
- HDputs(" Not tested when assertions are disabled");
+ puts(" Not tested when assertions are disabled");
#endif /* NDEBUG */
/*
@@ -808,10 +808,10 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
static unsigned
test_reopen(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5EA_t *ea = NULL; /* Extensible array wrapper */
- haddr_t ea_addr = HADDR_UNDEF; /* Array address in file */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5EA_t *ea = NULL; /* Extensible array wrapper */
+ haddr_t ea_addr = HADDR_UNDEF; /* Array address in file */
/* Create file & retrieve pointer to internal file object */
if (create_file(H5F_ACC_TRUNC, fapl, &file, &f) < 0)
@@ -876,13 +876,13 @@ test_reopen(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam)
static unsigned
test_open_twice(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- hid_t file2 = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5F_t *f2 = NULL; /* Internal file object pointer */
- H5EA_t *ea = NULL; /* Extensible array wrapper */
- H5EA_t *ea2 = NULL; /* Extensible array wrapper */
- haddr_t ea_addr = HADDR_UNDEF; /* Array address in file */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t file2 = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5F_t *f2 = NULL; /* Internal file object pointer */
+ H5EA_t *ea = NULL; /* Extensible array wrapper */
+ H5EA_t *ea2 = NULL; /* Extensible array wrapper */
+ haddr_t ea_addr = HADDR_UNDEF; /* Array address in file */
/* Create file & retrieve pointer to internal file object */
if (create_file(H5F_ACC_TRUNC, fapl, &file, &f) < 0)
@@ -984,10 +984,10 @@ static unsigned
test_open_twice_diff(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam)
{
char filename_tmp[EARRAY_FILENAME_LEN]; /* Temporary file name */
- hid_t file = -1; /* File ID */
- hid_t file2 = -1; /* File ID */
- hid_t file0 = -1; /* File ID */
- hid_t file00 = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t file2 = H5I_INVALID_HID; /* File ID */
+ hid_t file0 = H5I_INVALID_HID; /* File ID */
+ hid_t file00 = H5I_INVALID_HID; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
H5F_t *f2 = NULL; /* Internal file object pointer */
H5EA_t *ea = NULL; /* Extensible array wrapper */
@@ -1120,12 +1120,12 @@ test_open_twice_diff(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tpa
static unsigned
test_delete_open(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5EA_t *ea = NULL; /* Extensible array wrapper */
- H5EA_t *ea2 = NULL; /* Extensible array wrapper */
- haddr_t ea_addr = HADDR_UNDEF; /* Array address in file */
- h5_stat_size_t file_size; /* File size, after deleting array */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5EA_t *ea = NULL; /* Extensible array wrapper */
+ H5EA_t *ea2 = NULL; /* Extensible array wrapper */
+ haddr_t ea_addr = HADDR_UNDEF; /* Array address in file */
+ h5_stat_size_t file_size; /* File size, after deleting array */
/* Create file & retrieve pointer to internal file object */
if (create_file(H5F_ACC_TRUNC, fapl, &file, &f) < 0)
@@ -1961,20 +1961,20 @@ static unsigned
test_set_elmts(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam, hsize_t nelmts,
const char *test_str)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5EA_t *ea = NULL; /* Extensible array wrapper */
- void *eiter_info; /* Extensible array iterator info */
- earray_state_t state; /* State of extensible array */
- uint64_t welmt; /* Element to write */
- uint64_t relmt; /* Element to read */
- hsize_t nelmts_written; /* Highest element written in array */
- hsize_t cnt; /* Count of array indices */
- hssize_t smax; /* Index value of max. element set */
- hsize_t max; /* Index value of max. element set */
- hssize_t sidx; /* Index value of first element of first data block */
- hsize_t idx; /* Index value of first element of first data block */
- haddr_t ea_addr = HADDR_UNDEF; /* Array address in file */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5EA_t *ea = NULL; /* Extensible array wrapper */
+ void *eiter_info; /* Extensible array iterator info */
+ earray_state_t state; /* State of extensible array */
+ uint64_t welmt; /* Element to write */
+ uint64_t relmt; /* Element to read */
+ hsize_t nelmts_written; /* Highest element written in array */
+ hsize_t cnt; /* Count of array indices */
+ hssize_t smax; /* Index value of max. element set */
+ hsize_t max; /* Index value of max. element set */
+ hssize_t sidx; /* Index value of first element of first data block */
+ hsize_t idx; /* Index value of first element of first data block */
+ haddr_t ea_addr = HADDR_UNDEF; /* Array address in file */
/*
* Display testing message
@@ -2136,16 +2136,16 @@ static unsigned
test_skip_elmts(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam, hsize_t skip_elmts,
const char *test_str)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5EA_t *ea = NULL; /* Extensible array wrapper */
- earray_state_t state; /* State of extensible array */
- uint64_t welmt; /* Element to write */
- uint64_t relmt; /* Element to read */
- hsize_t nelmts_written; /* Highest element written in array */
- hsize_t idx; /* Index value of element to get */
- hsize_t cnt; /* Count of array indices */
- haddr_t ea_addr = HADDR_UNDEF; /* Array address in file */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5EA_t *ea = NULL; /* Extensible array wrapper */
+ earray_state_t state; /* State of extensible array */
+ uint64_t welmt; /* Element to write */
+ uint64_t relmt; /* Element to read */
+ hsize_t nelmts_written; /* Highest element written in array */
+ hsize_t idx; /* Index value of element to get */
+ hsize_t cnt; /* Count of array indices */
+ haddr_t ea_addr = HADDR_UNDEF; /* Array address in file */
/*
* Display testing message
@@ -2291,15 +2291,15 @@ test_skip_elmts(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam,
int
main(void)
{
- H5EA_create_t cparam; /* Creation parameters for extensible array */
- earray_test_param_t tparam; /* Testing parameters */
- earray_test_type_t curr_test; /* Current test being worked on */
- earray_iter_type_t curr_iter; /* Current iteration type being worked on */
- hid_t fapl = -1; /* File access property list for data files */
- unsigned nerrors = 0; /* Cumulative error count */
- time_t curr_time; /* Current time, for seeding random number generator */
- int ExpressMode; /* Test express value */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ H5EA_create_t cparam; /* Creation parameters for extensible array */
+ earray_test_param_t tparam; /* Testing parameters */
+ earray_test_type_t curr_test; /* Current test being worked on */
+ earray_iter_type_t curr_iter; /* Current iteration type being worked on */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list for data files */
+ unsigned nerrors = 0; /* Cumulative error count */
+ time_t curr_time; /* Current time, for seeding random number generator */
+ int ExpressMode; /* Test express value */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
/* Reset library */
h5_reset();
@@ -2314,7 +2314,7 @@ main(void)
/* Push API context */
if (H5CX_push() < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Seed random #'s */
curr_time = HDtime(NULL);
@@ -2349,12 +2349,12 @@ main(void)
switch (curr_test) {
/* "Normal" testing parameters */
case EARRAY_TEST_NORMAL:
- HDputs("Testing with normal parameters");
+ puts("Testing with normal parameters");
break;
/* "Re-open array" testing parameters */
case EARRAY_TEST_REOPEN:
- HDputs("Testing with reopen array flag set");
+ puts("Testing with reopen array flag set");
tparam.reopen_array = EARRAY_TEST_REOPEN;
break;
@@ -2383,31 +2383,31 @@ main(void)
switch (curr_iter) {
/* "Forward" testing parameters */
case EARRAY_ITER_FW:
- HDputs("Testing with forward iteration");
+ puts("Testing with forward iteration");
tparam.eiter = &ea_iter_fw;
break;
/* "Reverse" testing parameters */
case EARRAY_ITER_RV:
- HDputs("Testing with reverse iteration");
+ puts("Testing with reverse iteration");
tparam.eiter = &ea_iter_rv;
break;
/* "Random" testing parameters */
case EARRAY_ITER_RND:
- HDputs("Testing with random iteration");
+ puts("Testing with random iteration");
tparam.eiter = &ea_iter_rnd;
break;
/* "Random #2" testing parameters */
case EARRAY_ITER_RND2:
- HDputs("Testing with random #2 iteration");
+ puts("Testing with random #2 iteration");
tparam.eiter = &ea_iter_rnd2;
break;
/* "Cyclic" testing parameters */
case EARRAY_ITER_CYC:
- HDputs("Testing with cyclic iteration");
+ puts("Testing with cyclic iteration");
tparam.eiter = &ea_iter_cyc;
break;
@@ -2429,16 +2429,15 @@ main(void)
/* Test first element in data block */
nelmts = (hsize_t)((hsize_t)1 + cparam.idx_blk_elmts + tparam.sblk_info[sblk].start_idx +
(tparam.sblk_info[sblk].dblk_nelmts * dblk));
- HDsnprintf(test_str, sizeof(test_str),
- "setting first element of array's data block #%llu",
- (unsigned long long)ndblks);
+ snprintf(test_str, sizeof(test_str), "setting first element of array's data block #%llu",
+ (unsigned long long)ndblks);
nerrors += test_set_elmts(fapl, &cparam, &tparam, nelmts, test_str);
/* Test all elements in data block */
nelmts = (hsize_t)(cparam.idx_blk_elmts + tparam.sblk_info[sblk].start_idx +
(tparam.sblk_info[sblk].dblk_nelmts * (dblk + 1)));
- HDsnprintf(test_str, sizeof(test_str), "setting all elements of array's data block #%llu",
- (unsigned long long)ndblks);
+ snprintf(test_str, sizeof(test_str), "setting all elements of array's data block #%llu",
+ (unsigned long long)ndblks);
nerrors += test_set_elmts(fapl, &cparam, &tparam, nelmts, test_str);
/* Increment data block being tested */
@@ -2475,13 +2474,13 @@ main(void)
nerrors += (h5_verify_cached_stabs(FILENAME, fapl) < 0 ? 1 : 0);
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
if (nerrors)
goto error;
- HDputs("All extensible array tests passed.");
+ puts("All extensible array tests passed.");
/* Clean up file used */
h5_cleanup(FILENAME, fapl);
@@ -2489,7 +2488,7 @@ main(void)
return 0;
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
H5E_BEGIN_TRY
{
@@ -2498,7 +2497,7 @@ main(void)
H5E_END_TRY
if (api_ctx_pushed)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
return 1;
} /* end main() */
diff --git a/test/efc.c b/test/efc.c
index cb7cdde66aa..484320dc3d0 100644
--- a/test/efc.c
+++ b/test/efc.c
@@ -2638,11 +2638,11 @@ main(void)
unsigned nerrors = 0; /* track errors */
H5P_genplist_t *plist; /* Property list pointer for FAPL */
H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
int i; /* iterator */
/* Test Setup */
- HDputs("Testing the external file cache");
+ puts("Testing the external file cache");
/* Create property lists */
fcpl_id = H5Pcreate(H5P_FILE_CREATE);
@@ -2664,7 +2664,7 @@ main(void)
/* Push API context */
if (H5CX_push() < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Get the VOL info from the fapl */
plist = (H5P_genplist_t *)H5I_object(fapl_id);
@@ -2688,14 +2688,14 @@ main(void)
nerrors += (h5_verify_cached_stabs(FILENAME, fapl_id) < 0 ? 1 : 0);
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
if (nerrors)
goto error;
- HDputs("All external file cache tests passed.");
+ puts("All external file cache tests passed.");
h5_clean_files(FILENAME, fapl_id);
@@ -2706,7 +2706,7 @@ main(void)
return EXIT_SUCCESS;
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
H5E_BEGIN_TRY
{
@@ -2715,7 +2715,7 @@ main(void)
H5E_END_TRY
if (api_ctx_pushed)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
for (i = 0; i < N_FILENAMES; i++) {
free(filename[i]);
diff --git a/test/enc_dec_plist.c b/test/enc_dec_plist.c
index cd97cb9c8c0..e643b1bd5ff 100644
--- a/test/enc_dec_plist.c
+++ b/test/enc_dec_plist.c
@@ -24,10 +24,10 @@
static int
test_encode_decode(hid_t orig_pl, H5F_libver_t low, H5F_libver_t high)
{
- hid_t pl = (-1); /* Decoded property list */
- hid_t fapl = -1; /* File access property list */
- void *temp_buf = NULL; /* Pointer to encoding buffer */
- size_t temp_size = 0; /* Size of encoding buffer */
+ hid_t pl = (H5I_INVALID_HID); /* Decoded property list */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
+ void *temp_buf = NULL; /* Pointer to encoding buffer */
+ size_t temp_size = 0; /* Size of encoding buffer */
/* Create file access property list */
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
@@ -113,24 +113,24 @@ test_encode_decode(hid_t orig_pl, H5F_libver_t low, H5F_libver_t high)
int
main(void)
{
- hid_t dcpl; /* dataset create prop. list */
- hid_t dapl; /* dataset access prop. list */
- hid_t dxpl; /* dataset xfer prop. list */
- hid_t gcpl; /* group create prop. list */
- hid_t ocpypl; /* object copy prop. list */
- hid_t ocpl; /* object create prop. list */
- hid_t lcpl; /* link create prop. list */
- hid_t lapl; /* link access prop. list */
- hid_t fapl; /* file access prop. list */
- hid_t fcpl; /* file create prop. list */
- hid_t strcpl; /* string create prop. list */
- hid_t acpl; /* attribute create prop. list */
- hid_t srcspace = -1; /* Source dataspaces */
- hid_t vspace = -1; /* Virtual dset dataspaces */
- hsize_t dims[1] = {3}; /* Data space current size */
- hsize_t chunk_size[2] = {16384, 4}; /* chunk size */
- double fill = 2.7; /* Fill value */
- hsize_t max_size[1]; /* data space maximum size */
+ hid_t dcpl; /* dataset create prop. list */
+ hid_t dapl; /* dataset access prop. list */
+ hid_t dxpl; /* dataset xfer prop. list */
+ hid_t gcpl; /* group create prop. list */
+ hid_t ocpypl; /* object copy prop. list */
+ hid_t ocpl; /* object create prop. list */
+ hid_t lcpl; /* link create prop. list */
+ hid_t lapl; /* link access prop. list */
+ hid_t fapl; /* file access prop. list */
+ hid_t fcpl; /* file create prop. list */
+ hid_t strcpl; /* string create prop. list */
+ hid_t acpl; /* attribute create prop. list */
+ hid_t srcspace = H5I_INVALID_HID; /* Source dataspaces */
+ hid_t vspace = H5I_INVALID_HID; /* Virtual dset dataspaces */
+ hsize_t dims[1] = {3}; /* Data space current size */
+ hsize_t chunk_size[2] = {16384, 4}; /* chunk size */
+ double fill = 2.7; /* Fill value */
+ hsize_t max_size[1]; /* data space maximum size */
size_t nslots = 521 * 2;
size_t nbytes = 1048576 * 10;
double w0 = 0.5;
@@ -140,12 +140,12 @@ main(void)
H5F_libver_t low, high; /* Low and high bounds */
H5AC_cache_config_t my_cache_config = {H5AC__CURR_CACHE_CONFIG_VERSION,
- TRUE,
- FALSE,
- FALSE,
+ true,
+ false,
+ false,
"temp",
- TRUE,
- FALSE,
+ true,
+ false,
(2 * 2048 * 1024),
0.3,
(64 * 1024 * 1024),
@@ -154,7 +154,7 @@ main(void)
H5C_incr__threshold,
0.8,
3.0,
- TRUE,
+ true,
(8 * 1024 * 1024),
H5C_flash_incr__add_space,
2.0,
@@ -162,15 +162,15 @@ main(void)
H5C_decr__age_out_with_threshold,
0.997,
0.8,
- TRUE,
+ true,
(3 * 1024 * 1024),
3,
- FALSE,
+ false,
0.2,
(256 * 2048),
H5AC__DEFAULT_METADATA_WRITE_STRATEGY};
- H5AC_cache_image_config_t my_cache_image_config = {H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION, TRUE, FALSE,
+ H5AC_cache_image_config_t my_cache_image_config = {H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION, true, false,
-1};
/* Loop through all the combinations of low/high version bounds */
@@ -187,9 +187,9 @@ main(void)
/* Display testing info */
low_string = h5_get_version_string(low);
high_string = h5_get_version_string(high);
- HDsnprintf(msg, sizeof(msg),
- "Testing ENCODE/DECODE with file version bounds: (%s, %s):", low_string, high_string);
- HDputs(msg);
+ snprintf(msg, sizeof(msg),
+ "Testing ENCODE/DECODE with file version bounds: (%s, %s):", low_string, high_string);
+ puts(msg);
if (VERBOSE_MED)
printf("Encode/Decode DCPLs\n");
@@ -216,7 +216,7 @@ main(void)
if ((H5Pset_fill_value(dcpl, H5T_NATIVE_DOUBLE, &fill)) < 0)
FAIL_STACK_ERROR;
- if ((H5Pset_dset_no_attrs_hint(dcpl, FALSE)) < 0)
+ if ((H5Pset_dset_no_attrs_hint(dcpl, false)) < 0)
FAIL_STACK_ERROR;
max_size[0] = 100;
@@ -370,7 +370,7 @@ main(void)
if (H5Pset_selection_io(dxpl, H5D_SELECTION_IO_MODE_ON) < 0)
FAIL_STACK_ERROR;
- if (H5Pset_modify_write_buf(dxpl, TRUE) < 0)
+ if (H5Pset_modify_write_buf(dxpl, true) < 0)
FAIL_STACK_ERROR;
/* Test encoding & decoding property list */
@@ -435,7 +435,7 @@ main(void)
TESTING("LCPL Encoding/Decoding");
- if ((H5Pset_create_intermediate_group(lcpl, TRUE)) < 0)
+ if ((H5Pset_create_intermediate_group(lcpl, true)) < 0)
FAIL_STACK_ERROR;
/* Test encoding & decoding property list */
diff --git a/test/enc_dec_plist_cross_platform.c b/test/enc_dec_plist_cross_platform.c
index 81464cb2126..a3682147843 100644
--- a/test/enc_dec_plist_cross_platform.c
+++ b/test/enc_dec_plist_cross_platform.c
@@ -31,121 +31,121 @@ main(void)
/******* ENCODE/DECODE DCPLS *****/
TESTING("Default DCPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/def_dcpl_") < 0)
+ if (test_plists("plist_files/def_dcpl_") < 0)
FAIL_STACK_ERROR;
PASSED();
TESTING("DCPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/dcpl_") < 0)
+ if (test_plists("plist_files/dcpl_") < 0)
FAIL_STACK_ERROR;
PASSED();
/******* ENCODE/DECODE DAPLS *****/
TESTING("Default DAPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/def_dapl_") < 0)
+ if (test_plists("plist_files/def_dapl_") < 0)
FAIL_STACK_ERROR;
PASSED();
TESTING("DAPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/dapl_") < 0)
+ if (test_plists("plist_files/dapl_") < 0)
FAIL_STACK_ERROR;
PASSED();
/******* ENCODE/DECODE DXPLS *****/
TESTING("Default DXPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/def_dxpl_") < 0)
+ if (test_plists("plist_files/def_dxpl_") < 0)
FAIL_STACK_ERROR;
PASSED();
TESTING("DXPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/dxpl_") < 0)
+ if (test_plists("plist_files/dxpl_") < 0)
FAIL_STACK_ERROR;
PASSED();
/******* ENCODE/DECODE GCPLS *****/
TESTING("Default GCPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/def_gcpl_") < 0)
+ if (test_plists("plist_files/def_gcpl_") < 0)
FAIL_STACK_ERROR;
PASSED();
TESTING("GCPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/gcpl_") < 0)
+ if (test_plists("plist_files/gcpl_") < 0)
FAIL_STACK_ERROR;
PASSED();
/******* ENCODE/DECODE LCPLS *****/
TESTING("Default LCPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/def_lcpl_") < 0)
+ if (test_plists("plist_files/def_lcpl_") < 0)
FAIL_STACK_ERROR;
PASSED();
TESTING("LCPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/lcpl_") < 0)
+ if (test_plists("plist_files/lcpl_") < 0)
FAIL_STACK_ERROR;
PASSED();
/******* ENCODE/DECODE LAPLS *****/
TESTING("Default LAPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/def_lapl_") < 0)
+ if (test_plists("plist_files/def_lapl_") < 0)
FAIL_STACK_ERROR;
PASSED();
TESTING("LAPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/lapl_") < 0)
+ if (test_plists("plist_files/lapl_") < 0)
FAIL_STACK_ERROR;
PASSED();
/******* ENCODE/DECODE OCPLS *****/
TESTING("Default OCPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/def_ocpl_") < 0)
+ if (test_plists("plist_files/def_ocpl_") < 0)
FAIL_STACK_ERROR;
PASSED();
TESTING("OCPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/ocpl_") < 0)
+ if (test_plists("plist_files/ocpl_") < 0)
FAIL_STACK_ERROR;
PASSED();
/******* ENCODE/DECODE OCPYPLS *****/
TESTING("Default OCPYPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/def_ocpypl_") < 0)
+ if (test_plists("plist_files/def_ocpypl_") < 0)
FAIL_STACK_ERROR;
PASSED();
TESTING("OCPYPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/ocpypl_") < 0)
+ if (test_plists("plist_files/ocpypl_") < 0)
FAIL_STACK_ERROR;
PASSED();
/******* ENCODE/DECODE FCPLS *****/
TESTING("Default FCPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/def_fcpl_") < 0)
+ if (test_plists("plist_files/def_fcpl_") < 0)
FAIL_STACK_ERROR;
PASSED();
TESTING("FCPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/fcpl_") < 0)
+ if (test_plists("plist_files/fcpl_") < 0)
FAIL_STACK_ERROR;
PASSED();
/******* ENCODE/DECODE FAPLS *****/
TESTING("Default FAPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/def_fapl_") < 0)
+ if (test_plists("plist_files/def_fapl_") < 0)
FAIL_STACK_ERROR;
PASSED();
TESTING("FAPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/fapl_") < 0)
+ if (test_plists("plist_files/fapl_") < 0)
FAIL_STACK_ERROR;
PASSED();
/******* ENCODE/DECODE STRCPLS *****/
TESTING("Default STRCPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/def_strcpl_") < 0)
+ if (test_plists("plist_files/def_strcpl_") < 0)
FAIL_STACK_ERROR;
PASSED();
TESTING("STRCPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/strcpl_") < 0)
+ if (test_plists("plist_files/strcpl_") < 0)
FAIL_STACK_ERROR;
PASSED();
/******* ENCODE/DECODE ACPLS *****/
TESTING("Default ACPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/def_acpl_") < 0)
+ if (test_plists("plist_files/def_acpl_") < 0)
FAIL_STACK_ERROR;
PASSED();
TESTING("ACPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/acpl_") < 0)
+ if (test_plists("plist_files/acpl_") < 0)
FAIL_STACK_ERROR;
PASSED();
@@ -170,8 +170,8 @@ test_plists(const char *filename_prefix)
for (config_1 = 0; config_1 < (NCONFIG - 1); config_1++)
for (config_2 = config_1 + 1; config_2 < NCONFIG; config_2++) {
/* Generate filename for file 1 */
- if (HDsnprintf(filename, sizeof(filename), "%s%s%s", filename_prefix,
- config_1 & CONFIG_64 ? "64" : "32", config_1 & CONFIG_LE ? "le" : "be") < 0)
+ if (snprintf(filename, sizeof(filename), "%s%s%s", filename_prefix,
+ config_1 & CONFIG_64 ? "64" : "32", config_1 & CONFIG_LE ? "le" : "be") < 0)
TEST_ERROR;
/* Read file 1 */
@@ -186,8 +186,8 @@ test_plists(const char *filename_prefix)
HDclose(fd_1);
/* Generate filename for file 2 */
- if (HDsnprintf(filename, sizeof(filename), "%s%s%s", filename_prefix,
- config_2 & CONFIG_64 ? "64" : "32", config_2 & CONFIG_LE ? "le" : "be") < 0)
+ if (snprintf(filename, sizeof(filename), "%s%s%s", filename_prefix,
+ config_2 & CONFIG_64 ? "64" : "32", config_2 & CONFIG_LE ? "le" : "be") < 0)
TEST_ERROR;
/* Read file 1 */
diff --git a/test/enum.c b/test/enum.c
index 8ee0606979b..b64355cadba 100644
--- a/test/enum.c
+++ b/test/enum.c
@@ -808,12 +808,12 @@ main(void)
if (nerrors)
goto error;
- HDputs("All enum tests passed.");
+ puts("All enum tests passed.");
h5_cleanup(FILENAME, fapl_id);
return EXIT_SUCCESS;
error:
- HDputs("*** ENUM TESTS FAILED ***");
+ puts("*** ENUM TESTS FAILED ***");
return EXIT_FAILURE;
}
diff --git a/test/error_test.c b/test/error_test.c
index b4d366a64ba..57b1eb7a6b3 100644
--- a/test/error_test.c
+++ b/test/error_test.c
@@ -89,9 +89,9 @@ static herr_t custom_print_cb(unsigned n, const H5E_error2_t *err_desc, void *cl
static herr_t
test_error(hid_t file)
{
- hid_t dataset = -1;
- hid_t space = -1;
- hid_t estack_id = -1;
+ hid_t dataset = H5I_INVALID_HID;
+ hid_t space = H5I_INVALID_HID;
+ hid_t estack_id = H5I_INVALID_HID;
hsize_t dims[2];
const char *FUNC_test_error = "test_error";
H5E_auto2_t old_func;
@@ -175,15 +175,15 @@ test_error(hid_t file)
static herr_t
init_error(void)
{
- ssize_t cls_size = (ssize_t)HDstrlen(ERR_CLS_NAME) + 1;
- ssize_t msg_size = (ssize_t)HDstrlen(ERR_MIN_SUBROUTINE_MSG) + 1;
+ ssize_t cls_size = (ssize_t)strlen(ERR_CLS_NAME) + 1;
+ ssize_t msg_size = (ssize_t)strlen(ERR_MIN_SUBROUTINE_MSG) + 1;
char *cls_name = NULL;
char *msg = NULL;
H5E_type_t msg_type;
- if (NULL == (cls_name = (char *)malloc(HDstrlen(ERR_CLS_NAME) + 1)))
+ if (NULL == (cls_name = (char *)malloc(strlen(ERR_CLS_NAME) + 1)))
TEST_ERROR;
- if (NULL == (msg = (char *)malloc(HDstrlen(ERR_MIN_SUBROUTINE_MSG) + 1)))
+ if (NULL == (msg = (char *)malloc(strlen(ERR_MIN_SUBROUTINE_MSG) + 1)))
TEST_ERROR;
if ((ERR_CLS = H5Eregister_class(ERR_CLS_NAME, PROG_NAME, PROG_VERS)) < 0)
@@ -191,7 +191,7 @@ init_error(void)
if (cls_size != H5Eget_class_name(ERR_CLS, cls_name, (size_t)cls_size) + 1)
TEST_ERROR;
- if (HDstrcmp(ERR_CLS_NAME, cls_name) != 0)
+ if (strcmp(ERR_CLS_NAME, cls_name) != 0)
TEST_ERROR;
if ((ERR_MAJ_TEST = H5Ecreate_msg(ERR_CLS, H5E_MAJOR, ERR_MAJ_TEST_MSG)) < 0)
@@ -216,7 +216,7 @@ init_error(void)
TEST_ERROR;
if (msg_type != H5E_MINOR)
TEST_ERROR;
- if (HDstrcmp(msg, ERR_MIN_SUBROUTINE_MSG) != 0)
+ if (strcmp(msg, ERR_MIN_SUBROUTINE_MSG) != 0)
TEST_ERROR;
/* Register another class for later testing. */
@@ -293,7 +293,7 @@ long_desc_cb(unsigned H5_ATTR_UNUSED n, const H5E_error2_t *err_desc, void *clie
{
char *real_desc = (char *)client_data;
- if (err_desc->desc != NULL && HDstrcmp(err_desc->desc, real_desc) == 0)
+ if (err_desc->desc != NULL && strcmp(err_desc->desc, real_desc) == 0)
return 0;
else
return -1;
@@ -345,10 +345,10 @@ test_long_desc(void)
long_desc) < 0)
TEST_ERROR;
- /* Create the string that should be in the description. Must use HDsnprintf here
+ /* Create the string that should be in the description. Must use snprintf here
* because snprintf is _snprintf on Windows
*/
- HDsnprintf(full_desc, (size_t)(LONG_DESC_SIZE + 128), format, long_desc);
+ snprintf(full_desc, (size_t)(LONG_DESC_SIZE + 128), format, long_desc);
/* Make certain that the description is correct */
if (H5Ewalk2(H5E_DEFAULT, H5E_WALK_UPWARD, long_desc_cb, full_desc) < 0)
@@ -456,10 +456,10 @@ custom_print_cb(unsigned n, const H5E_error2_t *err_desc, void *client_data)
static herr_t
test_create(void)
{
- const char *err_func = "test_create"; /* Function name for pushing error */
- const char *err_msg = "Error message"; /* Error message for pushing error */
- ssize_t err_num; /* Number of errors on stack */
- hid_t estack_id = -1; /* Error stack ID */
+ const char *err_func = "test_create"; /* Function name for pushing error */
+ const char *err_msg = "Error message"; /* Error message for pushing error */
+ ssize_t err_num; /* Number of errors on stack */
+ hid_t estack_id = H5I_INVALID_HID; /* Error stack ID */
/* Create an empty error stack */
if ((estack_id = H5Ecreate_stack()) < 0)
@@ -512,11 +512,11 @@ test_create(void)
static herr_t
test_copy(void)
{
- const char *err_func = "test_copy"; /* Function name for pushing error */
- const char *err_msg = "Error message"; /* Error message for pushing error */
- ssize_t err_num; /* Number of errors on stack */
- hid_t estack_id = -1; /* Error stack ID */
- herr_t ret; /* Generic return value */
+ const char *err_func = "test_copy"; /* Function name for pushing error */
+ const char *err_msg = "Error message"; /* Error message for pushing error */
+ ssize_t err_num; /* Number of errors on stack */
+ hid_t estack_id = H5I_INVALID_HID; /* Error stack ID */
+ herr_t ret; /* Generic return value */
/* Push an error with a long description */
if (H5Epush(H5E_DEFAULT, __FILE__, err_func, __LINE__, ERR_CLS, ERR_MAJ_TEST, ERR_MIN_SUBROUTINE, "%s",
@@ -585,8 +585,8 @@ test_append(void)
const char *err_msg1 = "Error message #1"; /* Error message #1 for pushing error */
const char *err_msg2 = "Error message #2"; /* Error message #2 for pushing error */
ssize_t err_num; /* Number of errors on stack */
- hid_t estack_id1 = -1; /* Error stack ID */
- hid_t estack_id2 = -1; /* Error stack ID */
+ hid_t estack_id1 = H5I_INVALID_HID; /* Error stack ID */
+ hid_t estack_id2 = H5I_INVALID_HID; /* Error stack ID */
herr_t ret; /* Generic return value */
/* Push an error */
@@ -625,28 +625,28 @@ test_append(void)
/* Try to append bad error stack IDs */
H5E_BEGIN_TRY
{
- ret = H5Eappend_stack(H5E_DEFAULT, H5E_DEFAULT, FALSE);
+ ret = H5Eappend_stack(H5E_DEFAULT, H5E_DEFAULT, false);
}
H5E_END_TRY
if (ret >= 0)
TEST_ERROR;
H5E_BEGIN_TRY
{
- ret = H5Eappend_stack(estack_id1, H5E_DEFAULT, FALSE);
+ ret = H5Eappend_stack(estack_id1, H5E_DEFAULT, false);
}
H5E_END_TRY
if (ret >= 0)
TEST_ERROR;
H5E_BEGIN_TRY
{
- ret = H5Eappend_stack(H5E_DEFAULT, estack_id2, FALSE);
+ ret = H5Eappend_stack(H5E_DEFAULT, estack_id2, false);
}
H5E_END_TRY
if (ret >= 0)
TEST_ERROR;
/* Append error stack #2 to error stack #1, without closing stack #2 */
- if (H5Eappend_stack(estack_id1, estack_id2, FALSE) < 0)
+ if (H5Eappend_stack(estack_id1, estack_id2, false) < 0)
TEST_ERROR;
/* Check the number of errors on stack #1 */
@@ -660,7 +660,7 @@ test_append(void)
TEST_ERROR;
/* Append error stack #2 to error stack #1, and close stack #2 */
- if (H5Eappend_stack(estack_id1, estack_id2, TRUE) < 0)
+ if (H5Eappend_stack(estack_id1, estack_id2, true) < 0)
TEST_ERROR;
/* Try to close error stack #2. Should fail because H5Eappend_stack
@@ -737,8 +737,8 @@ static herr_t
test_filter_error(const char *fname, hid_t fapl)
{
const char *pathname = H5_get_srcdir_filename(fname); /* Corrected test file name */
- hid_t file = -1;
- hid_t dataset = -1;
+ hid_t file = H5I_INVALID_HID;
+ hid_t dataset = H5I_INVALID_HID;
int buf[20];
fprintf(stderr, "\nTesting error message during data reading when filter isn't registered\n");
@@ -777,16 +777,16 @@ test_filter_error(const char *fname, hid_t fapl)
int
main(void)
{
- hid_t file = -1;
- hid_t fapl = -1;
- hid_t estack_id = -1;
+ hid_t file = H5I_INVALID_HID;
+ hid_t fapl = H5I_INVALID_HID;
+ hid_t estack_id = H5I_INVALID_HID;
char filename[1024];
const char *env_h5_drvr; /* File driver value from environment */
const char *FUNC_main = "main";
int i;
/* Get the VFD to use */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
@@ -879,7 +879,7 @@ main(void)
* the test file was pre-generated.
*/
h5_fixname(DATAFILE, H5P_DEFAULT, filename, sizeof filename);
- if (!h5_using_default_driver(env_h5_drvr) && HDstrcmp(env_h5_drvr, "stdio")) {
+ if (!h5_using_default_driver(env_h5_drvr) && strcmp(env_h5_drvr, "stdio")) {
/* If not using the library's default VFD or the stdio VFD, force
* the library's default VFD here. The test file was pre-generated
* and can cause issues with many VFDs.
diff --git a/test/event_set.c b/test/event_set.c
index 8102d4ad937..52aa6ba5a4b 100644
--- a/test/event_set.c
+++ b/test/event_set.c
@@ -184,7 +184,7 @@ test_es_create(void)
size_t count; /* # of events in set */
size_t num_errs; /* # of failed events in set */
uint64_t num_ops; /* # of events inserted into set */
- hbool_t err_occurred; /* Whether an error has occurred */
+ bool err_occurred; /* Whether an error has occurred */
TESTING("event set creation");
@@ -200,7 +200,7 @@ test_es_create(void)
FAIL_PUTS_ERROR("should be empty event set");
/* Check for errors */
- err_occurred = FALSE;
+ err_occurred = false;
if (H5ESget_err_status(es_id, &err_occurred) < 0)
TEST_ERROR;
if (err_occurred)
@@ -311,12 +311,12 @@ test_es_none(void)
static int
test_es_get_requests(void)
{
- hid_t es_id; /* Event set ID */
- hid_t connector_ids[2]; /* Connector IDs */
- void *requests[2]; /* Requests */
- int req_targets[2]; /* Dummy targets for void * requests */
- size_t count; /* # of events in set */
- hbool_t op_failed; /* Whether an operation failed (unused) */
+ hid_t es_id; /* Event set ID */
+ hid_t connector_ids[2]; /* Connector IDs */
+ void *requests[2]; /* Requests */
+ int req_targets[2]; /* Dummy targets for void * requests */
+ size_t count; /* # of events in set */
+ bool op_failed; /* Whether an operation failed (unused) */
TESTING("event set get requests");
@@ -681,11 +681,11 @@ main(void)
goto error;
/* Report status */
- HDputs("All event set tests passed.");
+ puts("All event set tests passed.");
exit(EXIT_SUCCESS);
error:
- HDputs("***** EVENT SET TESTS FAILED *****");
+ puts("***** EVENT SET TESTS FAILED *****");
exit(EXIT_FAILURE);
} /* end main() */
diff --git a/test/evict_on_close.c b/test/evict_on_close.c
index feebb08a553..9ca7f9f9cf3 100644
--- a/test/evict_on_close.c
+++ b/test/evict_on_close.c
@@ -69,11 +69,11 @@ const char *FILENAMES[] = {"evict-on-close", /* 0 */
#define SUBGROUP_NAME_SIZE 16
/* Prototypes */
-static hbool_t verify_tag_not_in_cache(const H5F_t *f, haddr_t tag);
-static herr_t check_evict_on_close_api(void);
-static hid_t generate_eoc_test_file(hid_t fapl_id);
-static herr_t check_dset_scheme(hid_t fid, const char *dset_name);
-static herr_t check_group_layout(hid_t fid, const char *group_name);
+static bool verify_tag_not_in_cache(const H5F_t *f, haddr_t tag);
+static herr_t check_evict_on_close_api(void);
+static hid_t generate_eoc_test_file(hid_t fapl_id);
+static herr_t check_dset_scheme(hid_t fid, const char *dset_name);
+static herr_t check_group_layout(hid_t fid, const char *group_name);
/*-------------------------------------------------------------------------
* Function: verify_tag_not_in_cache()
@@ -81,11 +81,11 @@ static herr_t check_group_layout(hid_t fid, const char *group_name);
* Purpose: Ensure that metadata cache entries with a given tag are not
* present in the cache.
*
- * Return: TRUE/FALSE
+ * Return: true/false
*
*-------------------------------------------------------------------------
*/
-static H5_ATTR_PURE hbool_t
+static H5_ATTR_PURE bool
verify_tag_not_in_cache(const H5F_t *f, haddr_t tag)
{
H5C_t *cache_ptr = NULL; /* cache pointer */
@@ -100,13 +100,13 @@ verify_tag_not_in_cache(const H5F_t *f, haddr_t tag)
entry_ptr = cache_ptr->index[i];
while (entry_ptr != NULL) {
if (tag == entry_ptr->tag_info->tag)
- return TRUE;
+ return true;
else
entry_ptr = entry_ptr->ht_next;
}
}
- return FALSE;
+ return false;
} /* end verify_tag_not_in_cache() */
/*-------------------------------------------------------------------------
@@ -122,22 +122,22 @@ verify_tag_not_in_cache(const H5F_t *f, haddr_t tag)
static hid_t
generate_eoc_test_file(hid_t fapl_id)
{
- char filename[FILENAME_BUF_SIZE]; /* decorated file name */
- hid_t fid = -1; /* file ID (returned) */
- hid_t fapl_copy_id = -1; /* ID of copied fapl */
- hid_t gid1 = -1, gid2 = -1; /* group IDs */
- hid_t sid = -1; /* dataspace ID */
- hid_t dcpl_id = -1; /* dataset creation plist */
- hid_t did = -1; /* dataset ID */
- int rank; /* # of array dimensions */
- hsize_t current_dims[2]; /* current dataset size */
- hsize_t maximum_dims[2]; /* maximum dataset size */
- hsize_t chunk_dims[2]; /* chunk dimensions */
- H5D_chunk_index_t idx_type; /* dataset chunk index type */
- H5D_layout_t layout_type; /* dataset layout type */
- int *data = NULL; /* buffer for fake data */
- int n; /* # of data elements */
- int i; /* iterator (# subgroups) */
+ char filename[FILENAME_BUF_SIZE]; /* decorated file name */
+ hid_t fid = H5I_INVALID_HID; /* file ID (returned) */
+ hid_t fapl_copy_id = H5I_INVALID_HID; /* ID of copied fapl */
+ hid_t gid1 = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* group IDs */
+ hid_t sid = H5I_INVALID_HID; /* dataspace ID */
+ hid_t dcpl_id = H5I_INVALID_HID; /* dataset creation plist */
+ hid_t did = H5I_INVALID_HID; /* dataset ID */
+ int rank; /* # of array dimensions */
+ hsize_t current_dims[2]; /* current dataset size */
+ hsize_t maximum_dims[2]; /* maximum dataset size */
+ hsize_t chunk_dims[2]; /* chunk dimensions */
+ H5D_chunk_index_t idx_type; /* dataset chunk index type */
+ H5D_layout_t layout_type; /* dataset layout type */
+ int *data = NULL; /* buffer for fake data */
+ int n; /* # of data elements */
+ int i; /* iterator (# subgroups) */
TESTING("generating evict-on-close test file");
@@ -184,7 +184,7 @@ generate_eoc_test_file(hid_t fapl_id)
/* Create the group name */
memset(subgroup_name, '\0', SUBGROUP_NAME_SIZE);
- if (HDsnprintf(subgroup_name, (size_t)(SUBGROUP_NAME_SIZE - 1), "%d", i) < 0)
+ if (snprintf(subgroup_name, (size_t)(SUBGROUP_NAME_SIZE - 1), "%d", i) < 0)
TEST_ERROR;
if ((gid2 = H5Gcreate2(gid1, subgroup_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -279,7 +279,7 @@ generate_eoc_test_file(hid_t fapl_id)
/* Create the group name */
memset(subgroup_name, '\0', SUBGROUP_NAME_SIZE);
- if (HDsnprintf(subgroup_name, (size_t)(SUBGROUP_NAME_SIZE - 1), "%d", i) < 0)
+ if (snprintf(subgroup_name, (size_t)(SUBGROUP_NAME_SIZE - 1), "%d", i) < 0)
TEST_ERROR;
if ((gid2 = H5Gcreate2(gid1, subgroup_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -584,12 +584,12 @@ generate_eoc_test_file(hid_t fapl_id)
static herr_t
check_group_layout(hid_t fid, const char *group_name)
{
- H5F_t *file_ptr = NULL; /* ptr to internal file struct */
- hid_t gid1 = -1, gid2 = -1; /* group IDs */
- H5G_t *grp_ptr = NULL; /* ptr to internal group struct */
- haddr_t tag1, tag2; /* MD cache tags for groups */
- uint32_t before, during, after; /* cache sizes */
- int i; /* iterator */
+ H5F_t *file_ptr = NULL; /* ptr to internal file struct */
+ hid_t gid1 = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* group IDs */
+ H5G_t *grp_ptr = NULL; /* ptr to internal group struct */
+ haddr_t tag1, tag2; /* MD cache tags for groups */
+ uint32_t before, during, after; /* cache sizes */
+ int i; /* iterator */
/* NOTE: The TESTING() macro is called in main() */
@@ -620,7 +620,7 @@ check_group_layout(hid_t fid, const char *group_name)
/* Create the group name */
memset(subgroup_name, '\0', SUBGROUP_NAME_SIZE);
- if (HDsnprintf(subgroup_name, (size_t)(SUBGROUP_NAME_SIZE - 1), "%d", i) < 0)
+ if (snprintf(subgroup_name, (size_t)(SUBGROUP_NAME_SIZE - 1), "%d", i) < 0)
TEST_ERROR;
if ((gid2 = H5Gopen2(gid1, subgroup_name, H5P_DEFAULT)) < 0)
@@ -633,7 +633,7 @@ check_group_layout(hid_t fid, const char *group_name)
if (H5Gclose(gid2) < 0)
TEST_ERROR;
- if (TRUE == verify_tag_not_in_cache(file_ptr, tag2))
+ if (true == verify_tag_not_in_cache(file_ptr, tag2))
TEST_ERROR;
} /* end for */
@@ -663,7 +663,7 @@ check_group_layout(hid_t fid, const char *group_name)
#endif
/* Ensure that the cache does not contain entries with the tag */
- if (TRUE == verify_tag_not_in_cache(file_ptr, tag1))
+ if (true == verify_tag_not_in_cache(file_ptr, tag1))
TEST_ERROR;
/* Compare the number of cache entries */
if (before != after || before == during)
@@ -698,12 +698,12 @@ check_group_layout(hid_t fid, const char *group_name)
static herr_t
check_dset_scheme(hid_t fid, const char *dset_name)
{
- H5F_t *file_ptr = NULL; /* ptr to internal file struct */
- hid_t did = -1; /* dataset ID */
- H5D_t *dset_ptr = NULL; /* ptr to internal dset struct */
- haddr_t tag; /* MD cache tag for dataset */
- int *data = NULL; /* buffer for fake data */
- uint32_t before, during, after; /* cache sizes */
+ H5F_t *file_ptr = NULL; /* ptr to internal file struct */
+ hid_t did = H5I_INVALID_HID; /* dataset ID */
+ H5D_t *dset_ptr = NULL; /* ptr to internal dset struct */
+ haddr_t tag; /* MD cache tag for dataset */
+ int *data = NULL; /* buffer for fake data */
+ uint32_t before, during, after; /* cache sizes */
/* NOTE: The TESTING() macro is called in main() */
@@ -764,7 +764,7 @@ check_dset_scheme(hid_t fid, const char *dset_name)
#endif
/* Ensure that the cache does not contain entries with the tag */
- if (TRUE == verify_tag_not_in_cache(file_ptr, tag))
+ if (true == verify_tag_not_in_cache(file_ptr, tag))
TEST_ERROR;
/* Compare the number of cache entries */
@@ -801,10 +801,10 @@ check_dset_scheme(hid_t fid, const char *dset_name)
static herr_t
check_evict_on_close_api(void)
{
- hid_t fapl_id = -1;
- hid_t dapl_id = -1;
- hbool_t evict_on_close;
- herr_t status;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t dapl_id = H5I_INVALID_HID;
+ bool evict_on_close;
+ herr_t status;
TESTING("evict on close API");
@@ -813,22 +813,22 @@ check_evict_on_close_api(void)
TEST_ERROR;
/* Check the default */
- evict_on_close = TRUE;
+ evict_on_close = true;
if (H5Pget_evict_on_close(fapl_id, &evict_on_close) < 0)
TEST_ERROR;
- if (evict_on_close != FALSE)
+ if (evict_on_close != false)
FAIL_PUTS_ERROR("Incorrect default evict on close value.");
/* Set the evict on close property */
- evict_on_close = TRUE;
+ evict_on_close = true;
if (H5Pset_evict_on_close(fapl_id, evict_on_close) < 0)
TEST_ERROR;
/* Make sure we can get it back out */
- evict_on_close = FALSE;
+ evict_on_close = false;
if (H5Pget_evict_on_close(fapl_id, &evict_on_close) < 0)
TEST_ERROR;
- if (evict_on_close != TRUE)
+ if (evict_on_close != true)
FAIL_PUTS_ERROR("Incorrect evict on close value.");
/* close fapl */
@@ -883,9 +883,9 @@ check_evict_on_close_api(void)
int
main(void)
{
- hid_t fapl_id = -1; /* VFD-specific fapl */
- hid_t fid = -1; /* file ID */
- unsigned nerrors = 0; /* number of test errors */
+ hid_t fapl_id = H5I_INVALID_HID; /* VFD-specific fapl */
+ hid_t fid = H5I_INVALID_HID; /* file ID */
+ unsigned nerrors = 0; /* number of test errors */
printf("Testing evict-on-close cache behavior\n");
@@ -902,7 +902,7 @@ main(void)
} /* end if */
/* Set evict-on-close property */
- if (H5Pset_evict_on_close(fapl_id, TRUE) < 0) {
+ if (H5Pset_evict_on_close(fapl_id, true) < 0) {
nerrors++;
PUTS_ERROR("Unable to set evict-on-close property\n");
} /* end if */
@@ -990,9 +990,9 @@ main(void)
static herr_t
check_evict_on_close_parallel_fail(void)
{
- hid_t fapl_id = -1;
- hbool_t evict_on_close;
- herr_t status;
+ hid_t fapl_id = H5I_INVALID_HID;
+ bool evict_on_close;
+ herr_t status;
TESTING("evict on close fails in parallel");
@@ -1001,7 +1001,7 @@ check_evict_on_close_parallel_fail(void)
TEST_ERROR;
/* Set the evict on close property (should fail)*/
- evict_on_close = TRUE;
+ evict_on_close = true;
H5E_BEGIN_TRY
{
status = H5Pset_evict_on_close(fapl_id, evict_on_close);
diff --git a/test/external.c b/test/external.c
index aad2d7c8d08..bf3c5bdf8e0 100644
--- a/test/external.c
+++ b/test/external.c
@@ -29,7 +29,7 @@
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
files_have_same_contents(const char *name1, const char *name2)
{
int fd1 = 0;
@@ -38,7 +38,7 @@ files_have_same_contents(const char *name1, const char *name2)
ssize_t n2 = 0;
char buf1[1024];
char buf2[1024];
- hbool_t ret = FALSE; /* not equal until proven otherwise */
+ bool ret = false; /* not equal until proven otherwise */
if ((fd1 = HDopen(name1, O_RDONLY)) < 0)
goto out;
@@ -61,7 +61,7 @@ files_have_same_contents(const char *name1, const char *name2)
break;
if (n1 == 0 && n2 == 0) {
- ret = TRUE;
+ ret = true;
break;
}
@@ -91,15 +91,15 @@ files_have_same_contents(const char *name1, const char *name2)
static int
test_non_extendible(hid_t file)
{
- hid_t dcpl = -1; /* dataset creation properties */
- hid_t space = -1; /* data space */
- hid_t dset = -1; /* dataset */
- hsize_t cur_size[1] = {100}; /* data space current size */
- hsize_t max_size[1] = {100}; /* data space maximum size */
- int n = 0; /* number of external files */
- off_t file_offset = 0; /* external file offset */
- hsize_t file_size = 0; /* sizeof external file segment */
- haddr_t dset_addr = HADDR_UNDEF; /* address of dataset */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation properties */
+ hid_t space = H5I_INVALID_HID; /* data space */
+ hid_t dset = H5I_INVALID_HID; /* dataset */
+ hsize_t cur_size[1] = {100}; /* data space current size */
+ hsize_t max_size[1] = {100}; /* data space maximum size */
+ int n = 0; /* number of external files */
+ off_t file_offset = 0; /* external file offset */
+ hsize_t file_size = 0; /* sizeof external file segment */
+ haddr_t dset_addr = HADDR_UNDEF; /* address of dataset */
TESTING("fixed-size data space, exact storage");
@@ -139,7 +139,7 @@ test_non_extendible(hid_t file)
FAIL_STACK_ERROR;
if (1 != n) {
H5_FAILED();
- HDputs(" Returned external count is wrong.");
+ puts(" Returned external count is wrong.");
printf(" got: %d\n ans: 1\n", n);
goto error;
}
@@ -149,13 +149,13 @@ test_non_extendible(hid_t file)
FAIL_STACK_ERROR;
if (file_offset != 0) {
H5_FAILED();
- HDputs(" Wrong file offset.");
+ puts(" Wrong file offset.");
printf(" got: %lu\n ans: 0\n", (unsigned long)file_offset);
goto error;
}
if (file_size != (max_size[0] * sizeof(int))) {
H5_FAILED();
- HDputs(" Wrong file size.");
+ puts(" Wrong file size.");
printf(" got: %" PRIuHSIZE "\n ans: %" PRIuHSIZE "\n", file_size, max_size[0] * sizeof(int));
goto error;
}
@@ -193,11 +193,11 @@ test_non_extendible(hid_t file)
static int
test_too_small(hid_t file)
{
- hid_t dcpl = -1; /* dataset creation properties */
- hid_t space = -1; /* data space */
- hid_t dset = -1; /* dataset */
- hsize_t cur_size[1] = {100}; /* current data space size */
- hsize_t max_size[1] = {100}; /* maximum data space size */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation properties */
+ hid_t space = H5I_INVALID_HID; /* data space */
+ hid_t dset = H5I_INVALID_HID; /* dataset */
+ hsize_t cur_size[1] = {100}; /* current data space size */
+ hsize_t max_size[1] = {100}; /* maximum data space size */
TESTING("external storage is too small");
@@ -250,11 +250,11 @@ test_too_small(hid_t file)
static int
test_large_enough_current_eventual(hid_t file)
{
- hid_t dcpl = -1; /* dataset creation properties */
- hid_t space = -1; /* data space */
- hid_t dset = -1; /* dataset */
- hsize_t cur_size[1] = {100}; /* current data space size */
- hsize_t max_size[1] = {200}; /* maximum data space size */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation properties */
+ hid_t space = H5I_INVALID_HID; /* data space */
+ hid_t dset = H5I_INVALID_HID; /* dataset */
+ hsize_t cur_size[1] = {100}; /* current data space size */
+ hsize_t max_size[1] = {200}; /* maximum data space size */
TESTING("extendible dataspace, exact external size");
@@ -302,11 +302,11 @@ test_large_enough_current_eventual(hid_t file)
static int
test_large_enough_current_not_eventual(hid_t file)
{
- hid_t dcpl = -1; /* dataset creation properties */
- hid_t space = -1; /* data space */
- hid_t dset = -1; /* dataset */
- hsize_t cur_size[1] = {100}; /* current data space size */
- hsize_t max_size[1] = {200}; /* maximum data space size */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation properties */
+ hid_t space = H5I_INVALID_HID; /* data space */
+ hid_t dset = H5I_INVALID_HID; /* dataset */
+ hsize_t cur_size[1] = {100}; /* current data space size */
+ hsize_t max_size[1] = {200}; /* maximum data space size */
TESTING("extendible dataspace, external storage is too small");
@@ -359,9 +359,9 @@ test_large_enough_current_not_eventual(hid_t file)
static int
test_unlimited(hid_t file)
{
- hid_t dcpl = -1; /* dataset creation properties */
- hid_t space = -1; /* data space */
- hid_t dset = -1; /* dataset */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation properties */
+ hid_t space = H5I_INVALID_HID; /* data space */
+ hid_t dset = H5I_INVALID_HID; /* dataset */
hsize_t cur_size[1] = {100}; /* data space current size */
hsize_t max_size[1] = {H5S_UNLIMITED}; /* data space maximum size */
int n; /* number of external files */
@@ -396,7 +396,7 @@ test_unlimited(hid_t file)
FAIL_STACK_ERROR;
if (1 != n) {
H5_FAILED();
- HDputs(" Returned external count is wrong.");
+ puts(" Returned external count is wrong.");
printf(" got: %d\n ans: 1\n", n);
goto error;
} /* end if */
@@ -405,13 +405,13 @@ test_unlimited(hid_t file)
FAIL_STACK_ERROR;
if (file_offset != 0) {
H5_FAILED();
- HDputs(" Wrong file offset.");
+ puts(" Wrong file offset.");
printf(" got: %lu\n ans: 0\n", (unsigned long)file_offset);
goto error;
}
if (H5F_UNLIMITED != file_size) {
H5_FAILED();
- HDputs(" Wrong file size.");
+ puts(" Wrong file size.");
printf(" got: %lu\n ans: INF\n", (unsigned long)file_size);
goto error;
}
@@ -457,7 +457,7 @@ add_external_files(hid_t dcpl_id, unsigned int n_external_files, off_t offset, h
return -1;
}
for (i = 0; i < n_external_files; i++) {
- if (HDsnprintf(exname, AEF_EXNAME_MAX_LEN, "ext%d.data", i + 1) > AEF_EXNAME_MAX_LEN) {
+ if (snprintf(exname, AEF_EXNAME_MAX_LEN, "ext%d.data", i + 1) > AEF_EXNAME_MAX_LEN) {
fprintf(stderr, "External file %d overflows name buffer\n", i + 1);
fflush(stderr);
return -1;
@@ -484,12 +484,12 @@ add_external_files(hid_t dcpl_id, unsigned int n_external_files, off_t offset, h
static int
test_multiple_files(hid_t file)
{
- hid_t dcpl = -1; /* dataset creation properties */
- hid_t space = -1; /* dataspace */
- hid_t dset = -1; /* dataset */
- hsize_t cur_size[1] = {100}; /* data space current size */
- hsize_t max_size[1] = {100}; /* data space maximum size */
- hsize_t max_ext_size; /* maximum size of external files */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation properties */
+ hid_t space = H5I_INVALID_HID; /* dataspace */
+ hid_t dset = H5I_INVALID_HID; /* dataset */
+ hsize_t cur_size[1] = {100}; /* data space current size */
+ hsize_t max_size[1] = {100}; /* data space maximum size */
+ hsize_t max_ext_size; /* maximum size of external files */
unsigned int n_external_files = 4;
TESTING("multiple external files");
@@ -568,9 +568,9 @@ test_multiple_files(hid_t file)
static int
test_add_to_unlimited(void)
{
- hid_t dcpl = -1; /* dataset creation properties */
- herr_t status = FAIL; /* function return status */
- int n = 0; /* number of external files */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation properties */
+ herr_t status = FAIL; /* function return status */
+ int n = 0; /* number of external files */
TESTING("external file following unlimited file");
@@ -620,8 +620,8 @@ test_add_to_unlimited(void)
static int
test_overflow(void)
{
- hid_t dcpl = -1; /* dataset creation properties */
- herr_t status = FAIL; /* return status */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation properties */
+ herr_t status = FAIL; /* return status */
TESTING("address overflow in external files");
@@ -666,19 +666,19 @@ test_overflow(void)
static int
test_read_file_set(hid_t fapl)
{
- hid_t file = -1; /* file to write to */
- hid_t dcpl = -1; /* dataset creation properties */
- hid_t space = -1; /* data space */
- hid_t dset = -1; /* dataset */
- hid_t grp = -1; /* group to emit diagnostics */
- size_t i = 0; /* miscellaneous counter */
- char filename[1024]; /* file names */
- int part[PART_SIZE]; /* raw data buffer (partial) */
- int whole[TOTAL_SIZE]; /* raw data buffer (total) */
- hsize_t cur_size; /* current data space size */
- hid_t hs_space = -1; /* hyperslab data space */
- hsize_t hs_start = 30; /* hyperslab starting offset */
- hsize_t hs_count = 25; /* hyperslab size */
+ hid_t file = H5I_INVALID_HID; /* file to write to */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation properties */
+ hid_t space = H5I_INVALID_HID; /* data space */
+ hid_t dset = H5I_INVALID_HID; /* dataset */
+ hid_t grp = H5I_INVALID_HID; /* group to emit diagnostics */
+ size_t i = 0; /* miscellaneous counter */
+ char filename[1024]; /* file names */
+ int part[PART_SIZE]; /* raw data buffer (partial) */
+ int whole[TOTAL_SIZE]; /* raw data buffer (total) */
+ hsize_t cur_size; /* current data space size */
+ hid_t hs_space = H5I_INVALID_HID; /* hyperslab data space */
+ hsize_t hs_start = 30; /* hyperslab starting offset */
+ hsize_t hs_count = 25; /* hyperslab size */
TESTING("read external dataset");
@@ -686,7 +686,7 @@ test_read_file_set(hid_t fapl)
TEST_ERROR;
/* Reset the raw data files */
- if (reset_raw_data_files(FALSE) < 0)
+ if (reset_raw_data_files(false) < 0)
TEST_ERROR;
/* Create the file and an initial group. This causes messages about
@@ -705,7 +705,7 @@ test_read_file_set(hid_t fapl)
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
FAIL_STACK_ERROR;
for (i = 0; i < N_EXT_FILES; i++) {
- HDsnprintf(filename, sizeof(filename), "extern_%dr.raw", (int)i + 1);
+ snprintf(filename, sizeof(filename), "extern_%dr.raw", (int)i + 1);
if (H5Pset_external(dcpl, filename, (off_t)(i * GARBAGE_PER_FILE), (hsize_t)sizeof(part)) < 0)
FAIL_STACK_ERROR;
}
@@ -788,19 +788,19 @@ test_read_file_set(hid_t fapl)
static int
test_write_file_set(hid_t fapl)
{
- hid_t file = -1; /* file to which to write */
- hid_t dcpl = -1; /* dataset creation properties */
- hid_t mem_space = -1; /* memory data space */
- hid_t file_space = -1; /* file data space */
- hid_t dset = -1; /* dataset */
- unsigned i = 0; /* miscellaneous counter */
- int part[PART_SIZE]; /* raw data buffer (partial) */
- int whole[TOTAL_SIZE]; /* raw data buffer (total) */
- hsize_t cur_size = 100; /* current data space size */
- hsize_t max_size = 200; /* maximum data space size */
- hsize_t hs_start = 100; /* hyperslab starting offset */
- hsize_t hs_count = 100; /* hyperslab size */
- char filename[1024]; /* file name */
+ hid_t file = H5I_INVALID_HID; /* file to which to write */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation properties */
+ hid_t mem_space = H5I_INVALID_HID; /* memory data space */
+ hid_t file_space = H5I_INVALID_HID; /* file data space */
+ hid_t dset = H5I_INVALID_HID; /* dataset */
+ unsigned i = 0; /* miscellaneous counter */
+ int part[PART_SIZE]; /* raw data buffer (partial) */
+ int whole[TOTAL_SIZE]; /* raw data buffer (total) */
+ hsize_t cur_size = 100; /* current data space size */
+ hsize_t max_size = 200; /* maximum data space size */
+ hsize_t hs_start = 100; /* hyperslab starting offset */
+ hsize_t hs_count = 100; /* hyperslab size */
+ char filename[1024]; /* file name */
TESTING("write external dataset");
@@ -818,7 +818,7 @@ test_write_file_set(hid_t fapl)
for (i = 0; i < N_EXT_FILES; i++) {
hsize_t size;
- HDsnprintf(filename, sizeof(filename), "extern_%dw.raw", (int)i + 1);
+ snprintf(filename, sizeof(filename), "extern_%dw.raw", (int)i + 1);
if (i != N_EXT_FILES - 1)
size = (hsize_t)sizeof(part);
@@ -830,7 +830,7 @@ test_write_file_set(hid_t fapl)
} /* end for */
/* Reset the raw data files */
- if (reset_raw_data_files(FALSE) < 0)
+ if (reset_raw_data_files(false) < 0)
TEST_ERROR;
/* Create the dataset */
@@ -849,8 +849,8 @@ test_write_file_set(hid_t fapl)
for (i = 0; i < N_EXT_FILES; i++) {
char name1[64], name2[64];
- HDsnprintf(name1, sizeof(name1), "extern_%dr.raw", i + 1);
- HDsnprintf(name2, sizeof(name2), "extern_%dw.raw", i + 1);
+ snprintf(name1, sizeof(name1), "extern_%dr.raw", i + 1);
+ snprintf(name2, sizeof(name2), "extern_%dw.raw", i + 1);
if (!files_have_same_contents(name1, name2))
FAIL_PUTS_ERROR(" Output differs from expected value.");
} /* end for */
@@ -915,16 +915,16 @@ test_write_file_set(hid_t fapl)
static int
test_path_absolute(hid_t fapl)
{
- hid_t file = -1; /* file to write to */
- hid_t dcpl = -1; /* dataset creation properties */
- hid_t space = -1; /* data space */
- hid_t dset = -1; /* dataset */
- size_t i = 0; /* miscellaneous counter */
- char cwdpath[1024]; /* working directory */
- char filename[1088]; /* file name */
- int part[PART_SIZE]; /* raw data buffer (partial) */
- int whole[TOTAL_SIZE]; /* raw data buffer (total) */
- hsize_t cur_size; /* current data space size */
+ hid_t file = H5I_INVALID_HID; /* file to write to */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation properties */
+ hid_t space = H5I_INVALID_HID; /* data space */
+ hid_t dset = H5I_INVALID_HID; /* dataset */
+ size_t i = 0; /* miscellaneous counter */
+ char cwdpath[1024]; /* working directory */
+ char filename[1088]; /* file name */
+ int part[PART_SIZE]; /* raw data buffer (partial) */
+ int whole[TOTAL_SIZE]; /* raw data buffer (total) */
+ hsize_t cur_size; /* current data space size */
TESTING("absolute filenames for external file");
@@ -933,7 +933,7 @@ test_path_absolute(hid_t fapl)
FAIL_STACK_ERROR;
/* Reset the raw data files */
- if (reset_raw_data_files(FALSE) < 0)
+ if (reset_raw_data_files(false) < 0)
TEST_ERROR;
/* Create the dcpl */
@@ -942,11 +942,11 @@ test_path_absolute(hid_t fapl)
if (NULL == HDgetcwd(cwdpath, sizeof(cwdpath)))
TEST_ERROR;
for (i = 0; i < N_EXT_FILES; i++) {
- HDsnprintf(filename, sizeof(filename), "%s%sextern_%zur.raw", cwdpath, H5_DIR_SEPS, i + 1);
+ snprintf(filename, sizeof(filename), "%s%sextern_%zur.raw", cwdpath, H5_DIR_SEPS, i + 1);
#if defined(H5_HAVE_WINDOW_PATH)
/* For windows, test path-absolute case (\dir\file.raw) for the second file */
if (i == 1)
- HDsnprintf(filename, sizeof(filename), "%s%sextern_%zur.raw", cwdpath + 2, H5_DIR_SEPS, i + 1);
+ snprintf(filename, sizeof(filename), "%s%sextern_%zur.raw", cwdpath + 2, H5_DIR_SEPS, i + 1);
#endif
if (H5Pset_external(dcpl, filename, (off_t)(i * GARBAGE_PER_FILE), (hsize_t)sizeof(part)) < 0)
FAIL_STACK_ERROR;
@@ -1007,15 +1007,15 @@ test_path_absolute(hid_t fapl)
static int
test_path_relative(hid_t fapl)
{
- hid_t file = -1; /* file to write to */
- hid_t dcpl = -1; /* dataset creation properties */
- hid_t space = -1; /* data space */
- hid_t dset = -1; /* dataset */
- size_t i = 0; /* miscellaneous counters */
- char filename[1024]; /* file name */
- int part[PART_SIZE]; /* raw data buffer (partial) */
- int whole[TOTAL_SIZE]; /* raw data buffer (total) */
- hsize_t cur_size; /* current data space size */
+ hid_t file = H5I_INVALID_HID; /* file to write to */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation properties */
+ hid_t space = H5I_INVALID_HID; /* data space */
+ hid_t dset = H5I_INVALID_HID; /* dataset */
+ size_t i = 0; /* miscellaneous counters */
+ char filename[1024]; /* file name */
+ int part[PART_SIZE]; /* raw data buffer (partial) */
+ int whole[TOTAL_SIZE]; /* raw data buffer (total) */
+ hsize_t cur_size; /* current data space size */
TESTING("filenames relative to current directory for external file");
@@ -1030,14 +1030,14 @@ test_path_relative(hid_t fapl)
FAIL_STACK_ERROR;
/* Reset the raw data files */
- if (reset_raw_data_files(FALSE) < 0)
+ if (reset_raw_data_files(false) < 0)
TEST_ERROR;
/* Create the dataset */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
FAIL_STACK_ERROR;
for (i = 0; i < N_EXT_FILES; i++) {
- HDsnprintf(filename, sizeof(filename), "extern_%dr.raw", (int)i + 1);
+ snprintf(filename, sizeof(filename), "extern_%dr.raw", (int)i + 1);
if (H5Pset_external(dcpl, filename, (off_t)(i * GARBAGE_PER_FILE), (hsize_t)sizeof(part)) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -1096,20 +1096,20 @@ test_path_relative(hid_t fapl)
static int
test_path_relative_cwd(hid_t fapl)
{
- hid_t file = -1; /* file to write to */
- hid_t dcpl = -1; /* dataset creation properties */
- hid_t space = -1; /* data space */
- hid_t dapl = -1; /* dataset access property list */
- hid_t dapl2 = -1; /* copy of dapl */
- hid_t dset = -1; /* dataset */
- hid_t dset2 = -1; /* dataset, opened a second time */
- hid_t dset3 = -1; /* dataset, opened with different prefix */
- size_t i = 0; /* miscellaneous counters */
- char filename[1024]; /* file name */
- int part[PART_SIZE]; /* raw data buffer (partial) */
- int whole[TOTAL_SIZE]; /* raw data buffer (total) */
- hsize_t cur_size; /* current data space size */
- char buffer[1024]; /* buffer to read efile_prefix */
+ hid_t file = H5I_INVALID_HID; /* file to write to */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation properties */
+ hid_t space = H5I_INVALID_HID; /* data space */
+ hid_t dapl = H5I_INVALID_HID; /* dataset access property list */
+ hid_t dapl2 = H5I_INVALID_HID; /* copy of dapl */
+ hid_t dset = H5I_INVALID_HID; /* dataset */
+ hid_t dset2 = H5I_INVALID_HID; /* dataset, opened a second time */
+ hid_t dset3 = H5I_INVALID_HID; /* dataset, opened with different prefix */
+ size_t i = 0; /* miscellaneous counters */
+ char filename[1024]; /* file name */
+ int part[PART_SIZE]; /* raw data buffer (partial) */
+ int whole[TOTAL_SIZE]; /* raw data buffer (total) */
+ hsize_t cur_size; /* current data space size */
+ char buffer[1024]; /* buffer to read efile_prefix */
TESTING("filenames relative to HDF5 file for external file");
@@ -1124,14 +1124,14 @@ test_path_relative_cwd(hid_t fapl)
FAIL_STACK_ERROR;
/* Reset the raw data files */
- if (reset_raw_data_files(FALSE) < 0)
+ if (reset_raw_data_files(false) < 0)
TEST_ERROR;
/* Create the dataset */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
FAIL_STACK_ERROR;
for (i = 0; i < N_EXT_FILES; i++) {
- HDsnprintf(filename, sizeof(filename), "..%sextern_%dr.raw", H5_DIR_SEPS, (int)i + 1);
+ snprintf(filename, sizeof(filename), "..%sextern_%dr.raw", H5_DIR_SEPS, (int)i + 1);
if (H5Pset_external(dcpl, filename, (off_t)(i * GARBAGE_PER_FILE), (hsize_t)sizeof(part)) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -1145,7 +1145,7 @@ test_path_relative_cwd(hid_t fapl)
FAIL_STACK_ERROR;
if (H5Pget_efile_prefix(dapl, buffer, sizeof(buffer)) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(buffer, "${ORIGIN}") != 0)
+ if (strcmp(buffer, "${ORIGIN}") != 0)
FAIL_PUTS_ERROR("efile prefix not set correctly");
if ((dapl2 = H5Pcopy(dapl)) < 0)
FAIL_STACK_ERROR;
@@ -1260,14 +1260,14 @@ test_path_relative_cwd(hid_t fapl)
static int
test_h5d_get_access_plist(hid_t fapl_id)
{
- hid_t fid = -1; /* file to write to */
- hid_t dcpl_id = -1; /* dataset creation properties */
- hid_t dapl_id = -1; /* dataset access properties */
- hid_t sid = -1; /* data space */
- hid_t did = -1; /* dataset */
- hsize_t dims = 0; /* dataset size */
- char *buffer = NULL; /* saved prefix name from dapl */
- char filename[1024]; /* file names */
+ hid_t fid = H5I_INVALID_HID; /* file to write to */
+ hid_t dcpl_id = H5I_INVALID_HID; /* dataset creation properties */
+ hid_t dapl_id = H5I_INVALID_HID; /* dataset access properties */
+ hid_t sid = H5I_INVALID_HID; /* data space */
+ hid_t did = H5I_INVALID_HID; /* dataset */
+ hsize_t dims = 0; /* dataset size */
+ char *buffer = NULL; /* saved prefix name from dapl */
+ char filename[1024]; /* file names */
TESTING("H5Dget_access_plist() returns correct prefix");
@@ -1275,7 +1275,7 @@ test_h5d_get_access_plist(hid_t fapl_id)
TEST_ERROR;
/* Reset the raw data files */
- if (reset_raw_data_files(FALSE) < 0)
+ if (reset_raw_data_files(false) < 0)
TEST_ERROR;
/* Create the file */
@@ -1315,7 +1315,7 @@ test_h5d_get_access_plist(hid_t fapl_id)
TEST_ERROR;
if (H5Pget_efile_prefix(dapl_id, buffer, (size_t)64) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(buffer, "someprefix") != 0)
+ if (strcmp(buffer, "someprefix") != 0)
FAIL_PUTS_ERROR("external file prefix from dapl incorrect");
/* Close everything */
@@ -1361,13 +1361,13 @@ test_h5d_get_access_plist(hid_t fapl_id)
int
main(void)
{
- hid_t fapl_id_old = -1; /* file access properties (old format) */
- hid_t fapl_id_new = -1; /* file access properties (new format) */
- hid_t fid = -1; /* file for test_1* functions */
- hid_t gid = -1; /* group to emit diagnostics */
- char filename[1024]; /* file name for test_1* funcs */
- unsigned latest_format; /* default or latest file format */
- int nerrors = 0; /* number of errors */
+ hid_t fapl_id_old = H5I_INVALID_HID; /* file access properties (old format) */
+ hid_t fapl_id_new = H5I_INVALID_HID; /* file access properties (new format) */
+ hid_t fid = H5I_INVALID_HID; /* file for test_1* functions */
+ hid_t gid = H5I_INVALID_HID; /* group to emit diagnostics */
+ char filename[1024]; /* file name for test_1* funcs */
+ unsigned latest_format; /* default or latest file format */
+ int nerrors = 0; /* number of errors */
h5_reset();
@@ -1383,19 +1383,19 @@ main(void)
/* The file format doesn't matter for this test */
nerrors += test_h5d_get_access_plist(fapl_id_new);
- HDputs("");
+ puts("");
/* Test with old & new format groups */
- for (latest_format = FALSE; latest_format <= TRUE; latest_format++) {
- hid_t current_fapl_id = -1;
+ for (latest_format = false; latest_format <= true; latest_format++) {
+ hid_t current_fapl_id = H5I_INVALID_HID;
/* Set the fapl for different file formats */
if (latest_format) {
- HDputs("\nTesting with the latest file format:");
+ puts("\nTesting with the latest file format:");
current_fapl_id = fapl_id_new;
}
else {
- HDputs("Testing with the default file format:");
+ puts("Testing with the default file format:");
current_fapl_id = fapl_id_old;
}
@@ -1444,7 +1444,7 @@ main(void)
if (H5Pclose(fapl_id_new) < 0)
FAIL_STACK_ERROR;
- HDputs("All external storage tests passed.");
+ puts("All external storage tests passed.");
/* Clean up files used by file set tests */
if (h5_cleanup(EXT_FNAME, fapl_id_old)) {
diff --git a/test/external_common.c b/test/external_common.c
index 0fd47f24b4f..8f0b7b9177c 100644
--- a/test/external_common.c
+++ b/test/external_common.c
@@ -27,7 +27,7 @@
*-------------------------------------------------------------------------
*/
herr_t
-reset_raw_data_files(hbool_t is_env)
+reset_raw_data_files(bool is_env)
{
int fd = 0; /* external file descriptor */
size_t i, j; /* iterators */
@@ -52,9 +52,9 @@ reset_raw_data_files(hbool_t is_env)
/* Open file */
if (is_env)
- HDsnprintf(filename, sizeof(filename), "extern_env_%lur.raw", (unsigned long)i + 1);
+ snprintf(filename, sizeof(filename), "extern_env_%lur.raw", (unsigned long)i + 1);
else
- HDsnprintf(filename, sizeof(filename), "extern_%lur.raw", (unsigned long)i + 1);
+ snprintf(filename, sizeof(filename), "extern_%lur.raw", (unsigned long)i + 1);
if ((fd = HDopen(filename, O_RDWR | O_CREAT | O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0)
goto error;
@@ -89,9 +89,9 @@ reset_raw_data_files(hbool_t is_env)
/* Open file */
if (is_env)
- HDsnprintf(filename, sizeof(filename), "extern_env_%luw.raw", (unsigned long)i + 1);
+ snprintf(filename, sizeof(filename), "extern_env_%luw.raw", (unsigned long)i + 1);
else
- HDsnprintf(filename, sizeof(filename), "extern_%luw.raw", (unsigned long)i + 1);
+ snprintf(filename, sizeof(filename), "extern_%luw.raw", (unsigned long)i + 1);
if ((fd = HDopen(filename, O_RDWR | O_CREAT | O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0)
goto error;
diff --git a/test/external_common.h b/test/external_common.h
index 197be06fdb2..cf00fe2d986 100644
--- a/test/external_common.h
+++ b/test/external_common.h
@@ -31,7 +31,7 @@
extern "C" {
#endif
-H5TEST_DLL herr_t reset_raw_data_files(hbool_t is_env);
+H5TEST_DLL herr_t reset_raw_data_files(bool is_env);
#ifdef __cplusplus
}
diff --git a/test/external_env.c b/test/external_env.c
index 1a91c2a0c17..6d6146aed8c 100644
--- a/test/external_env.c
+++ b/test/external_env.c
@@ -38,17 +38,17 @@ static const char *EXT_ENV_FNAME[] = {"extern_env_dir/env_file_1", NULL};
static int
test_path_env(hid_t fapl)
{
- hid_t file = -1; /* file to write to */
- hid_t dcpl = -1; /* dataset creation properties */
- hid_t space = -1; /* data space */
- hid_t dapl = -1; /* dataset access property list */
- hid_t dset = -1; /* dataset */
- size_t i; /* miscellaneous counters */
- char filename[1024]; /* file name */
- int part[PART_SIZE]; /* raw data buffer (partial) */
- int whole[TOTAL_SIZE]; /* raw data buffer (total) */
- hsize_t cur_size; /* current data space size */
- char buffer[1024]; /* buffer to read efile_prefix */
+ hid_t file = H5I_INVALID_HID; /* file to write to */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation properties */
+ hid_t space = H5I_INVALID_HID; /* data space */
+ hid_t dapl = H5I_INVALID_HID; /* dataset access property list */
+ hid_t dset = H5I_INVALID_HID; /* dataset */
+ size_t i; /* miscellaneous counters */
+ char filename[1024]; /* file name */
+ int part[PART_SIZE]; /* raw data buffer (partial) */
+ int whole[TOTAL_SIZE]; /* raw data buffer (total) */
+ hsize_t cur_size; /* current data space size */
+ char buffer[1024]; /* buffer to read efile_prefix */
TESTING("prefix in HDF5_EXTFILE_PREFIX");
@@ -60,14 +60,14 @@ test_path_env(hid_t fapl)
FAIL_STACK_ERROR;
/* Reset the raw data files */
- if (reset_raw_data_files(TRUE) < 0)
+ if (reset_raw_data_files(true) < 0)
TEST_ERROR;
/* Create the dataset */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
FAIL_STACK_ERROR;
for (i = 0; i < N_EXT_FILES; i++) {
- HDsnprintf(filename, sizeof(filename), "..%sextern_env_%dr.raw", H5_DIR_SEPS, (int)i + 1);
+ snprintf(filename, sizeof(filename), "..%sextern_env_%dr.raw", H5_DIR_SEPS, (int)i + 1);
if (H5Pset_external(dcpl, filename, (off_t)(i * GARBAGE_PER_FILE), (hsize_t)sizeof(part)) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -83,7 +83,7 @@ test_path_env(hid_t fapl)
FAIL_STACK_ERROR;
if (H5Pget_efile_prefix(dapl, buffer, sizeof(buffer)) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(buffer, "someprefix") != 0)
+ if (strcmp(buffer, "someprefix") != 0)
FAIL_PUTS_ERROR("efile prefix not set correctly");
/* Create dataset */
@@ -137,12 +137,12 @@ test_path_env(hid_t fapl)
int
main(void)
{
- hid_t fapl_id_old = -1; /* file access properties (old format) */
- hid_t fapl_id_new = -1; /* file access properties (new format) */
- hid_t fid = -1; /* file for test_1* functions */
- hid_t gid = -1; /* group to emit diagnostics */
- unsigned latest_format; /* default or latest file format */
- int nerrors = 0; /* number of errors */
+ hid_t fapl_id_old = H5I_INVALID_HID; /* file access properties (old format) */
+ hid_t fapl_id_new = H5I_INVALID_HID; /* file access properties (new format) */
+ hid_t fid = H5I_INVALID_HID; /* file for test_1* functions */
+ hid_t gid = H5I_INVALID_HID; /* group to emit diagnostics */
+ unsigned latest_format; /* default or latest file format */
+ int nerrors = 0; /* number of errors */
h5_reset();
@@ -156,16 +156,16 @@ main(void)
FAIL_STACK_ERROR;
/* Test with old & new format groups */
- for (latest_format = FALSE; latest_format <= TRUE; latest_format++) {
- hid_t current_fapl_id = -1;
+ for (latest_format = false; latest_format <= true; latest_format++) {
+ hid_t current_fapl_id = H5I_INVALID_HID;
/* Set the fapl for different file formats */
if (latest_format) {
- HDputs("\nTesting with the latest file format:");
+ puts("\nTesting with the latest file format:");
current_fapl_id = fapl_id_new;
} /* end if */
else {
- HDputs("Testing with the default file format:");
+ puts("Testing with the default file format:");
current_fapl_id = fapl_id_old;
} /* end else */
@@ -179,7 +179,7 @@ main(void)
if (H5Pclose(fapl_id_new) < 0)
FAIL_STACK_ERROR;
- HDputs("All external storage tests passed.");
+ puts("All external storage tests passed.");
/* Clean up files used by file set tests */
if (h5_cleanup(EXT_ENV_FNAME, fapl_id_old)) {
diff --git a/test/farray.c b/test/farray.c
index a7a41250f23..791cb549f1b 100644
--- a/test/farray.c
+++ b/test/farray.c
@@ -418,10 +418,10 @@ finish(hid_t fid, hid_t fapl_id, H5F_t *f, H5FA_t *fa, haddr_t fa_addr)
static unsigned
test_create(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t H5_ATTR_UNUSED *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5FA_t *fa = NULL; /* Fixed array wrapper */
- haddr_t fa_addr = HADDR_UNDEF; /* Array address in file */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5FA_t *fa = NULL; /* Fixed array wrapper */
+ haddr_t fa_addr = HADDR_UNDEF; /* Array address in file */
/* Create file & retrieve pointer to internal file object */
if (create_file(fapl, &file, &f) < 0)
@@ -491,7 +491,7 @@ test_create(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t H5_ATTR_UNUSE
}
#else /* NDEBUG */
SKIPPED();
- HDputs(" Not tested when assertions are disabled");
+ puts(" Not tested when assertions are disabled");
#endif /* NDEBUG */
/*
@@ -546,10 +546,10 @@ test_create(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t H5_ATTR_UNUSE
static unsigned
test_reopen(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5FA_t *fa = NULL; /* Fixed array wrapper */
- haddr_t fa_addr = HADDR_UNDEF; /* Array address in file */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5FA_t *fa = NULL; /* Fixed array wrapper */
+ haddr_t fa_addr = HADDR_UNDEF; /* Array address in file */
/* Create file & retrieve pointer to internal file object */
if (create_file(fapl, &file, &f) < 0)
@@ -850,12 +850,12 @@ test_open_twice_diff(hid_t fapl_id, H5FA_create_t *cparam, farray_test_param_t *
static unsigned
test_delete_open(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5FA_t *fa = NULL; /* Fixed array wrapper */
- H5FA_t *fa2 = NULL; /* Fixed array wrapper */
- haddr_t fa_addr = HADDR_UNDEF; /* Array address in file */
- h5_stat_size_t file_size; /* File size, after deleting array */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5FA_t *fa = NULL; /* Fixed array wrapper */
+ H5FA_t *fa2 = NULL; /* Fixed array wrapper */
+ haddr_t fa_addr = HADDR_UNDEF; /* Array address in file */
+ h5_stat_size_t file_size; /* File size, after deleting array */
/* Create file & retrieve pointer to internal file object */
if (create_file(fapl, &file, &f) < 0)
@@ -1338,18 +1338,18 @@ static unsigned
test_set_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam, hsize_t nelmts,
const char *test_str)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5FA_t *fa = NULL; /* Fixed array wrapper */
- void *fiter_info; /* Fixed array iterator info */
- farray_state_t state; /* State of fixed array */
- uint64_t welmt; /* Element to write */
- uint64_t relmt; /* Element to read */
- hsize_t cnt; /* Count of array indices */
- hssize_t sidx; /* Index value of next element in the fixed array */
- hsize_t idx; /* Index value of next element in the fixed array */
- hsize_t fa_nelmts; /* # of elements in fixed array */
- haddr_t fa_addr = HADDR_UNDEF; /* Array address in file */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5FA_t *fa = NULL; /* Fixed array wrapper */
+ void *fiter_info; /* Fixed array iterator info */
+ farray_state_t state; /* State of fixed array */
+ uint64_t welmt; /* Element to write */
+ uint64_t relmt; /* Element to read */
+ hsize_t cnt; /* Count of array indices */
+ hssize_t sidx; /* Index value of next element in the fixed array */
+ hsize_t idx; /* Index value of next element in the fixed array */
+ hsize_t fa_nelmts; /* # of elements in fixed array */
+ haddr_t fa_addr = HADDR_UNDEF; /* Array address in file */
assert(nelmts);
/*
@@ -1494,18 +1494,18 @@ test_set_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam, h
*/
static unsigned
test_skip_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam, hsize_t skip_elmts,
- hbool_t check_rest, const char *test_str)
+ bool check_rest, const char *test_str)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5FA_t *fa = NULL; /* Extensible array wrapper */
- farray_state_t state; /* State of extensible array */
- uint64_t welmt; /* Element to write */
- uint64_t relmt; /* Element to read */
- hsize_t idx; /* Index value of element to get */
- hsize_t cnt; /* Count of array indices */
- hsize_t fa_nelmts; /* # of elements in fixed array */
- haddr_t fa_addr = HADDR_UNDEF; /* Array address in file */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5FA_t *fa = NULL; /* Extensible array wrapper */
+ farray_state_t state; /* State of extensible array */
+ uint64_t welmt; /* Element to write */
+ uint64_t relmt; /* Element to read */
+ hsize_t idx; /* Index value of element to get */
+ hsize_t cnt; /* Count of array indices */
+ hsize_t fa_nelmts; /* # of elements in fixed array */
+ haddr_t fa_addr = HADDR_UNDEF; /* Array address in file */
/*
* Display testing message
@@ -1622,15 +1622,15 @@ test_skip_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam,
int
main(void)
{
- H5FA_create_t cparam; /* Creation parameters for fixed array */
- farray_test_param_t tparam; /* Testing parameters */
- farray_test_type_t curr_test; /* Current test being worked on */
- farray_iter_type_t curr_iter; /* Current iteration type being worked on */
- hid_t fapl = -1; /* File access property list for data files */
- unsigned nerrors = 0; /* Cumulative error count */
- time_t curr_time; /* Current time, for seeding random number generator */
- int ExpressMode; /* Test express value */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ H5FA_create_t cparam; /* Creation parameters for fixed array */
+ farray_test_param_t tparam; /* Testing parameters */
+ farray_test_type_t curr_test; /* Current test being worked on */
+ farray_iter_type_t curr_iter; /* Current iteration type being worked on */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list for data files */
+ unsigned nerrors = 0; /* Cumulative error count */
+ time_t curr_time; /* Current time, for seeding random number generator */
+ int ExpressMode; /* Test express value */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
/* Reset library */
h5_reset();
@@ -1645,7 +1645,7 @@ main(void)
/* Push API context */
if (H5CX_push() < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Seed random #'s */
curr_time = HDtime(NULL);
@@ -1678,12 +1678,12 @@ main(void)
switch (curr_test) {
/* "Normal" testing parameters */
case FARRAY_TEST_NORMAL:
- HDputs("Testing with NORMAL PARAMETERS");
+ puts("Testing with NORMAL PARAMETERS");
break;
/* "Re-open array" testing parameters */
case FARRAY_TEST_REOPEN:
- HDputs("Testing with reopen array flag set");
+ puts("Testing with reopen array flag set");
tparam.reopen_array = FARRAY_TEST_REOPEN;
break;
@@ -1710,25 +1710,25 @@ main(void)
switch (curr_iter) {
/* "Forward" testing parameters */
case FARRAY_ITER_FW:
- HDputs("Testing with forward iteration");
+ puts("Testing with forward iteration");
tparam.fiter = &fa_iter_fw;
break;
/* "Reverse" testing parameters */
case FARRAY_ITER_RV:
- HDputs("Testing with reverse iteration");
+ puts("Testing with reverse iteration");
tparam.fiter = &fa_iter_rv;
break;
/* "Random" testing parameters */
case FARRAY_ITER_RND:
- HDputs("Testing with random iteration");
+ puts("Testing with random iteration");
tparam.fiter = &fa_iter_rnd;
break;
/* "Cyclic" testing parameters */
case FARRAY_ITER_CYC:
- HDputs("Testing with cyclic iteration");
+ puts("Testing with cyclic iteration");
tparam.fiter = &fa_iter_cyc;
break;
@@ -1747,10 +1747,10 @@ main(void)
} /* end for */
/* Check skipping elements */
- nerrors += test_skip_elmts(fapl, &cparam, &tparam, (hsize_t)1, TRUE, "skipping to first element");
+ nerrors += test_skip_elmts(fapl, &cparam, &tparam, (hsize_t)1, true, "skipping to first element");
nerrors += test_skip_elmts(fapl, &cparam, &tparam, ((hsize_t)1 << cparam.max_dblk_page_nelmts_bits),
- TRUE, "skipping to first element in data block page");
- nerrors += test_skip_elmts(fapl, &cparam, &tparam, (hsize_t)(tparam.nelmts - 1), TRUE,
+ true, "skipping to first element in data block page");
+ nerrors += test_skip_elmts(fapl, &cparam, &tparam, (hsize_t)(tparam.nelmts - 1), true,
"skipping to last element");
/* Create Fixed Array */
@@ -1768,7 +1768,7 @@ main(void)
init_cparam(&cparam, &tparam);
/* Set the last element in the Fixed Array */
- nerrors += test_skip_elmts(fapl, &cparam, &tparam, (hsize_t)(tparam.nelmts - 1), FALSE,
+ nerrors += test_skip_elmts(fapl, &cparam, &tparam, (hsize_t)(tparam.nelmts - 1), false,
"skipping to last element");
} /* end for */
@@ -1776,13 +1776,13 @@ main(void)
nerrors += (h5_verify_cached_stabs(FILENAME, fapl) < 0 ? 1 : 0);
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
if (nerrors)
goto error;
- HDputs("All fixed array tests passed.");
+ puts("All fixed array tests passed.");
/* Clean up file used */
h5_cleanup(FILENAME, fapl);
@@ -1790,7 +1790,7 @@ main(void)
exit(EXIT_SUCCESS);
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
H5E_BEGIN_TRY
{
@@ -1799,7 +1799,7 @@ main(void)
H5E_END_TRY
if (api_ctx_pushed)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
exit(EXIT_FAILURE);
} /* end main() */
diff --git a/test/fheap.c b/test/fheap.c
index b8c78da909b..19a1e6adc16 100644
--- a/test/fheap.c
+++ b/test/fheap.c
@@ -40,7 +40,7 @@
/* "Small" heap creation parameters */
#define SMALL_DBLOCK_OVERHEAD 21 /* Overhead for direct blocks */
-#define SMALL_CHECKSUM_DBLOCKS TRUE /* Whether to checksum direct blocks */
+#define SMALL_CHECKSUM_DBLOCKS true /* Whether to checksum direct blocks */
#define SMALL_MAN_WIDTH 4 /* Managed obj. table width */
#define SMALL_MAN_START_BLOCK_SIZE 512 /* Managed obj. starting block size */
#define SMALL_MAN_MAX_DIRECT_SIZE (64 * 1024) /* Managed obj. max. direct block size */
@@ -52,7 +52,7 @@
/* "Large" heap creation parameters */
#define LARGE_DBLOCK_OVERHEAD 21 /* Overhead for direct blocks */
/* (coincidentally the same size as for small direct blocks) */
-#define LARGE_CHECKSUM_DBLOCKS FALSE /* Whether to checksum direct blocks */
+#define LARGE_CHECKSUM_DBLOCKS false /* Whether to checksum direct blocks */
#define LARGE_MAN_WIDTH 32 /* Managed obj. table width */
#define LARGE_MAN_START_BLOCK_SIZE 4096 /* Managed obj. starting block size */
#define LARGE_MAN_MAX_DIRECT_SIZE (1024 * 1024) /* Managed obj. max. direct block size */
@@ -376,8 +376,8 @@ add_obj(H5HF_t *fh, size_t obj_off, size_t obj_size, fheap_heap_state_t *state,
/* Check for tracking the heap's state */
if (state) {
- size_t tiny_max_len; /* Max. length of tiny objects */
- hbool_t tiny_len_extended; /* Do tiny objects use two bytes for the length? */
+ size_t tiny_max_len; /* Max. length of tiny objects */
+ bool tiny_len_extended; /* Do tiny objects use two bytes for the length? */
/* Check information about tiny objects */
if (H5HF_get_tiny_info_test(fh, &tiny_max_len, &tiny_len_extended) < 0)
@@ -517,7 +517,7 @@ begin_test(fheap_test_param_t *tparam, const char *base_desc, fheap_heap_ids_t *
*/
size_t test_desc_len = strlen(base_desc) + sizeof(" ") + strlen(del_str);
test_desc = H5MM_malloc(test_desc_len);
- (void)HDsnprintf(test_desc, test_desc_len, "%s %s", base_desc, del_str);
+ (void)snprintf(test_desc, test_desc_len, "%s %s", base_desc, del_str);
TESTING(test_desc);
H5MM_xfree(test_desc);
@@ -1719,7 +1719,7 @@ fill_all_4th_indirect_rows(H5HF_t *fh, size_t obj_size, fheap_heap_state_t *stat
static unsigned
test_create(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_create_t test_cparam; /* Creation parameters for heap */
@@ -1835,7 +1835,7 @@ test_create(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
static unsigned
test_reopen(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_create_t test_cparam; /* Creation parameters for heap */
@@ -1845,7 +1845,7 @@ test_reopen(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
h5_stat_size_t file_size; /* File size, after deleting heap */
size_t id_len; /* Size of fractal heap IDs */
fheap_heap_state_t state; /* State of fractal heap */
- hbool_t page = FALSE; /* Paged aggregation strategy or not */
+ bool page = false; /* Paged aggregation strategy or not */
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -1871,7 +1871,7 @@ test_reopen(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
STACK_ERROR;
if (f->shared->fs_strategy == H5F_FSPACE_STRATEGY_PAGE)
- page = TRUE;
+ page = true;
/* Ignore metadata tags in the file's cache */
if (H5AC_ignore_tags(f) < 0)
@@ -1985,8 +1985,8 @@ test_reopen(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
static unsigned
test_open_twice(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- hid_t file2 = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t file2 = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5F_t *f2 = NULL; /* Internal file object pointer */
@@ -1998,7 +1998,7 @@ test_open_twice(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
h5_stat_size_t file_size; /* File size, after deleting heap */
size_t id_len; /* Size of fractal heap IDs */
fheap_heap_state_t state; /* State of fractal heap */
- hbool_t page = FALSE; /* Paged aggregation strategy or not */
+ bool page = false; /* Paged aggregation strategy or not */
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -2024,7 +2024,7 @@ test_open_twice(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
STACK_ERROR;
if (f->shared->fs_strategy == H5F_FSPACE_STRATEGY_PAGE)
- page = TRUE;
+ page = true;
/* Ignore metadata tags in the file's cache */
if (H5AC_ignore_tags(f) < 0)
@@ -2160,7 +2160,7 @@ test_open_twice(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
static unsigned
test_delete_open(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_create_t test_cparam; /* Creation parameters for heap */
@@ -2335,7 +2335,7 @@ test_delete_open(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
static unsigned
test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -2343,8 +2343,8 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
unsigned deflate_level; /* Deflation level */
size_t id_len; /* Size of fractal heap IDs */
size_t tiny_max_len; /* Max. length of tiny objects */
- hbool_t tiny_len_extended; /* Do tiny objects use two bytes for the length? */
- hbool_t huge_ids_direct; /* Are 'huge' objects directly accessed? */
+ bool tiny_len_extended; /* Do tiny objects use two bytes for the length? */
+ bool huge_ids_direct; /* Are 'huge' objects directly accessed? */
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -2383,11 +2383,11 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
FAIL_STACK_ERROR;
if (tiny_max_len != (HEAP_ID_LEN - 1))
TEST_ERROR;
- if (tiny_len_extended != FALSE)
+ if (tiny_len_extended != false)
TEST_ERROR;
if (H5HF_get_huge_info_test(fh, NULL, &huge_ids_direct) < 0)
FAIL_STACK_ERROR;
- if (huge_ids_direct != FALSE)
+ if (huge_ids_direct != false)
TEST_ERROR;
/* Close the fractal heap */
@@ -2412,11 +2412,11 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
FAIL_STACK_ERROR;
if (tiny_max_len != 16)
TEST_ERROR;
- if (tiny_len_extended != FALSE)
+ if (tiny_len_extended != false)
TEST_ERROR;
if (H5HF_get_huge_info_test(fh, NULL, &huge_ids_direct) < 0)
FAIL_STACK_ERROR;
- if (huge_ids_direct != TRUE)
+ if (huge_ids_direct != true)
TEST_ERROR;
/* Close the fractal heap */
@@ -2446,11 +2446,11 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
FAIL_STACK_ERROR;
if (tiny_max_len != 27)
TEST_ERROR;
- if (tiny_len_extended != TRUE)
+ if (tiny_len_extended != true)
TEST_ERROR;
if (H5HF_get_huge_info_test(fh, NULL, &huge_ids_direct) < 0)
FAIL_STACK_ERROR;
- if (huge_ids_direct != TRUE)
+ if (huge_ids_direct != true)
TEST_ERROR;
/* Close the fractal heap */
@@ -2491,11 +2491,11 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
FAIL_STACK_ERROR;
if (tiny_max_len != 7)
TEST_ERROR;
- if (tiny_len_extended != FALSE)
+ if (tiny_len_extended != false)
TEST_ERROR;
if (H5HF_get_huge_info_test(fh, NULL, &huge_ids_direct) < 0)
FAIL_STACK_ERROR;
- if (huge_ids_direct != FALSE)
+ if (huge_ids_direct != false)
TEST_ERROR;
/* Close the fractal heap */
@@ -2521,11 +2521,11 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
FAIL_STACK_ERROR;
if (tiny_max_len != 16)
TEST_ERROR;
- if (tiny_len_extended != FALSE)
+ if (tiny_len_extended != false)
TEST_ERROR;
if (H5HF_get_huge_info_test(fh, NULL, &huge_ids_direct) < 0)
FAIL_STACK_ERROR;
- if (huge_ids_direct != TRUE)
+ if (huge_ids_direct != true)
TEST_ERROR;
/* Close the fractal heap */
@@ -2551,11 +2551,11 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
FAIL_STACK_ERROR;
if (tiny_max_len != 16)
TEST_ERROR;
- if (tiny_len_extended != FALSE)
+ if (tiny_len_extended != false)
TEST_ERROR;
if (H5HF_get_huge_info_test(fh, NULL, &huge_ids_direct) < 0)
FAIL_STACK_ERROR;
- if (huge_ids_direct != TRUE)
+ if (huge_ids_direct != true)
TEST_ERROR;
/* Close the fractal heap */
@@ -2581,11 +2581,11 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
FAIL_STACK_ERROR;
if (tiny_max_len != 17)
TEST_ERROR;
- if (tiny_len_extended != TRUE)
+ if (tiny_len_extended != true)
TEST_ERROR;
if (H5HF_get_huge_info_test(fh, NULL, &huge_ids_direct) < 0)
FAIL_STACK_ERROR;
- if (huge_ids_direct != TRUE)
+ if (huge_ids_direct != true)
TEST_ERROR;
/* Close the fractal heap */
@@ -2611,11 +2611,11 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
FAIL_STACK_ERROR;
if (tiny_max_len != 43)
TEST_ERROR;
- if (tiny_len_extended != TRUE)
+ if (tiny_len_extended != true)
TEST_ERROR;
if (H5HF_get_huge_info_test(fh, NULL, &huge_ids_direct) < 0)
FAIL_STACK_ERROR;
- if (huge_ids_direct != TRUE)
+ if (huge_ids_direct != true)
TEST_ERROR;
/* Close the fractal heap */
@@ -2670,7 +2670,7 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
static unsigned
test_filtered_create(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -2789,7 +2789,7 @@ test_filtered_create(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
static unsigned
test_size(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -2928,7 +2928,7 @@ test_size(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
static unsigned
test_reopen_hdr(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
{
- hid_t file1 = -1; /* File ID */
+ hid_t file1 = H5I_INVALID_HID; /* File ID */
hid_t file2 = -2; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
@@ -3057,7 +3057,7 @@ test_reopen_hdr(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
static unsigned
test_man_insert_weird(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -3169,7 +3169,7 @@ test_man_insert_weird(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpa
static unsigned
test_man_insert_first(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -3267,7 +3267,7 @@ test_man_insert_first(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpa
static unsigned
test_man_insert_second(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -3360,7 +3360,7 @@ test_man_insert_second(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
static unsigned
test_man_insert_root_mult(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -3456,7 +3456,7 @@ test_man_insert_root_mult(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
static unsigned
test_man_insert_force_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -3559,7 +3559,7 @@ test_man_insert_force_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_par
static unsigned
test_man_insert_fill_second(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -3663,7 +3663,7 @@ test_man_insert_fill_second(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_
static unsigned
test_man_insert_third_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -3771,7 +3771,7 @@ test_man_insert_third_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
static unsigned
test_man_fill_first_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -3864,7 +3864,7 @@ test_man_fill_first_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *t
static unsigned
test_man_start_second_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -3964,7 +3964,7 @@ test_man_start_second_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
static unsigned
test_man_fill_second_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -4062,7 +4062,7 @@ test_man_fill_second_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
static unsigned
test_man_start_third_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -4169,7 +4169,7 @@ test_man_start_third_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
static unsigned
test_man_fill_fourth_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -4264,7 +4264,7 @@ test_man_fill_fourth_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
static unsigned
test_man_fill_all_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -4357,7 +4357,7 @@ test_man_fill_all_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_para
static unsigned
test_man_first_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -4456,7 +4456,7 @@ test_man_first_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_
static unsigned
test_man_second_direct_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -4563,7 +4563,7 @@ test_man_second_direct_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fhe
static unsigned
test_man_fill_first_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -4663,7 +4663,7 @@ test_man_fill_first_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_
static unsigned
test_man_second_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -4771,7 +4771,7 @@ test_man_second_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test
static unsigned
test_man_fill_second_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -4876,7 +4876,7 @@ test_man_fill_second_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap
static unsigned
test_man_fill_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -4971,7 +4971,7 @@ test_man_fill_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fheap_te
static unsigned
test_man_start_2nd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -5077,7 +5077,7 @@ test_man_start_2nd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t
static unsigned
test_man_recursive_indirect_two_deep(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -5177,7 +5177,7 @@ test_man_recursive_indirect_two_deep(hid_t fapl, H5HF_create_t *cparam, fheap_te
static unsigned
test_man_start_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -5284,7 +5284,7 @@ test_man_start_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t
static unsigned
test_man_fill_first_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -5392,7 +5392,7 @@ test_man_fill_first_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fh
static unsigned
test_man_fill_3rd_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -5497,7 +5497,7 @@ test_man_fill_3rd_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fhea
static unsigned
test_man_fill_all_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -5603,7 +5603,7 @@ test_man_fill_all_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fhea
static unsigned
test_man_start_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -5715,7 +5715,7 @@ test_man_start_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t
static unsigned
test_man_fill_first_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -5833,7 +5833,7 @@ test_man_fill_first_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fh
static unsigned
test_man_fill_4th_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -5942,7 +5942,7 @@ test_man_fill_4th_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fhea
static unsigned
test_man_fill_all_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -6053,7 +6053,7 @@ test_man_fill_all_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fhea
static unsigned
test_man_start_5th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -6177,7 +6177,7 @@ test_man_start_5th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t
static unsigned
test_man_remove_bogus(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -6334,7 +6334,7 @@ fprintf(stderr, "Random # seed was: %lu\n", seed);
static unsigned
test_man_remove_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -6495,7 +6495,7 @@ test_man_remove_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara
static unsigned
test_man_remove_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -6686,7 +6686,7 @@ test_man_remove_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara
static unsigned
test_man_remove_one_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -6852,7 +6852,7 @@ test_man_remove_one_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
static unsigned
test_man_remove_two_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -7089,7 +7089,7 @@ test_man_remove_two_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
static unsigned
test_man_remove_three_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -7384,7 +7384,7 @@ test_man_remove_three_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
static unsigned
test_man_incr_insert_remove(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -7449,7 +7449,7 @@ test_man_incr_insert_remove(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_
if (H5HF_remove(fh, heap_id[j]) < 0)
FAIL_STACK_ERROR;
- HDsnprintf(obj2.b, sizeof(obj2.b), "%s%2d", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", j);
+ snprintf(obj2.b, sizeof(obj2.b), "%s%2d", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", j);
if (H5HF_insert(fh, (sizeof(obj2)), &obj2, heap_id[j]) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -7460,7 +7460,7 @@ test_man_incr_insert_remove(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_
/* Insert object */
memset(heap_id[i], 0, id_len);
- HDsnprintf(obj1.b, sizeof(obj1.b), "%s%2d", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", i);
+ snprintf(obj1.b, sizeof(obj1.b), "%s%2d", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", i);
if (H5HF_insert(fh, (sizeof(obj1)), &obj1, heap_id[i]) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -7511,7 +7511,7 @@ test_man_incr_insert_remove(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_
static unsigned
test_man_remove_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -7581,7 +7581,7 @@ test_man_remove_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_
static unsigned
test_man_remove_two_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -7666,7 +7666,7 @@ test_man_remove_two_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
static unsigned
test_man_remove_first_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -7733,7 +7733,7 @@ test_man_remove_first_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
static unsigned
test_man_remove_first_two_rows(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -7802,7 +7802,7 @@ test_man_remove_first_two_rows(hid_t fapl, H5HF_create_t *cparam, fheap_test_par
static unsigned
test_man_remove_first_four_rows(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -7875,7 +7875,7 @@ test_man_remove_first_four_rows(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
static unsigned
test_man_remove_all_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -7942,7 +7942,7 @@ test_man_remove_all_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
static unsigned
test_man_remove_2nd_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -8013,7 +8013,7 @@ test_man_remove_2nd_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
static unsigned
test_man_remove_3rd_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -8091,7 +8091,7 @@ test_man_remove_3rd_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
static unsigned
test_man_skip_start_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -8166,7 +8166,7 @@ test_man_skip_start_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
static unsigned
test_man_skip_start_block_add_back(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -8262,7 +8262,7 @@ test_man_skip_start_block_add_back(hid_t fapl, H5HF_create_t *cparam, fheap_test
static unsigned
test_man_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -8369,7 +8369,7 @@ test_man_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_t
static unsigned
test_man_skip_2nd_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -8463,7 +8463,7 @@ test_man_skip_2nd_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *t
static unsigned
test_man_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -8606,7 +8606,7 @@ static unsigned
test_man_fill_one_partial_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam,
fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -8769,7 +8769,7 @@ test_man_fill_one_partial_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *
static unsigned
test_man_fill_row_skip_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -8894,7 +8894,7 @@ static unsigned
test_man_skip_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_t *cparam,
fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -9019,7 +9019,7 @@ static unsigned
test_man_fill_direct_skip_indirect_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam,
fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -9141,7 +9141,7 @@ static unsigned
test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam,
fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -9270,7 +9270,7 @@ static unsigned
test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam,
fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -9413,7 +9413,7 @@ static unsigned
test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam,
fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -9573,7 +9573,7 @@ static unsigned
test_man_fill_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_t *cparam,
fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -9726,7 +9726,7 @@ static unsigned
test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped(hid_t fapl, H5HF_create_t *cparam,
fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -9907,7 +9907,7 @@ static unsigned
test_man_fill_2nd_direct_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam,
fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -10035,7 +10035,7 @@ static unsigned
test_man_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam,
fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -10174,7 +10174,7 @@ test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(h
H5HF_create_t *cparam,
fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -10324,7 +10324,7 @@ test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped(
H5HF_create_t *cparam,
fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -10478,7 +10478,7 @@ static unsigned
test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam,
fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -10639,7 +10639,7 @@ static unsigned
test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_skipped(
hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -10804,7 +10804,7 @@ static unsigned
test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam,
fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -10964,7 +10964,7 @@ static unsigned
test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(
hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -11144,7 +11144,7 @@ static unsigned
test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_start_block_add_skipped(
hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -11361,7 +11361,7 @@ static unsigned
test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped(
hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -11558,7 +11558,7 @@ static unsigned
test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped(
hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -11784,7 +11784,7 @@ test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_
static unsigned
test_man_frag_simple(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -11912,7 +11912,7 @@ test_man_frag_simple(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
static unsigned
test_man_frag_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -12080,7 +12080,7 @@ test_man_frag_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
static unsigned
test_man_frag_2nd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -12189,7 +12189,7 @@ test_man_frag_2nd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
static unsigned
test_man_frag_3rd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -12300,7 +12300,7 @@ test_man_frag_3rd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
static unsigned
test_huge_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -12447,7 +12447,7 @@ test_huge_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
static unsigned
test_huge_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -12674,7 +12674,7 @@ test_huge_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
static unsigned
test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -12976,7 +12976,7 @@ test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
static unsigned
test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -13396,7 +13396,7 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
static unsigned
test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -13413,8 +13413,8 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam
fheap_heap_state_t state; /* State of fractal heap */
unsigned deflate_level; /* Deflation level */
size_t old_actual_id_len = 0; /* Old actual ID length */
- hbool_t huge_ids_direct; /* Are 'huge' objects directly accessed? */
- hbool_t pline_init = FALSE; /* Whether the I/O pipeline has been initialized */
+ bool huge_ids_direct; /* Are 'huge' objects directly accessed? */
+ bool pline_init = false; /* Whether the I/O pipeline has been initialized */
/* Test description */
const char *base_desc = "insert 'huge' object into heap with I/O filters, then remove";
@@ -13425,7 +13425,7 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam
deflate_level = 6;
if (H5Z_append(&tmp_cparam.pline, H5Z_FILTER_DEFLATE, H5Z_FLAG_OPTIONAL, (size_t)1, &deflate_level) < 0)
FAIL_STACK_ERROR;
- pline_init = TRUE;
+ pline_init = true;
/* Adjust actual ID length, if asking for IDs that can directly access 'huge' objects */
if (cparam->id_len == 1) {
@@ -13454,15 +13454,15 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam
if (H5HF_get_huge_info_test(fh, NULL, &huge_ids_direct) < 0)
FAIL_STACK_ERROR;
if (cparam->id_len == 1) {
- if (huge_ids_direct != TRUE)
+ if (huge_ids_direct != true)
TEST_ERROR;
} /* end if */
else if (tparam->actual_id_len >= 29) {
- if (huge_ids_direct != TRUE)
+ if (huge_ids_direct != true)
TEST_ERROR;
} /* end if */
else {
- if (huge_ids_direct != FALSE)
+ if (huge_ids_direct != false)
TEST_ERROR;
} /* end else */
@@ -13606,7 +13606,7 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam
static unsigned
test_tiny_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -13753,7 +13753,7 @@ test_tiny_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
static unsigned
test_tiny_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -13981,7 +13981,7 @@ test_tiny_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
static unsigned
test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -14582,7 +14582,7 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
static unsigned
test_filtered_man_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -14752,7 +14752,7 @@ test_filtered_man_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_para
static unsigned
test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -15079,7 +15079,7 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
static unsigned
test_random(hsize_t size_limit, hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -15280,7 +15280,7 @@ fprintf(stderr, "Random # seed was: %lu\n", seed);
static unsigned
test_random_pow2(hsize_t size_limit, hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -15488,13 +15488,13 @@ fprintf(stderr, "Random # seed was: %lu\n", seed);
*/
/* Custom filter used to verify that the filters are actually called and do not
* just silently fail */
-static hbool_t test_write_filter_called;
+static bool test_write_filter_called;
static size_t
test_write_filter(unsigned int H5_ATTR_UNUSED flags, size_t H5_ATTR_UNUSED cd_nelmts,
const unsigned int H5_ATTR_UNUSED cd_values[], size_t nbytes,
size_t H5_ATTR_UNUSED *buf_size, void H5_ATTR_UNUSED **buf)
{
- test_write_filter_called = TRUE;
+ test_write_filter_called = true;
return nbytes;
} /* end link_filter_filter */
@@ -15502,7 +15502,7 @@ test_write_filter(unsigned int H5_ATTR_UNUSED flags, size_t H5_ATTR_UNUSED cd_ne
static unsigned
test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -15511,7 +15511,7 @@ test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
size_t id_len; /* Size of fractal heap IDs */
unsigned char tiny_heap_id[HEAP_ID_LEN]; /* Heap ID for 'tiny' object */
unsigned char huge_heap_id[HEAP_ID_LEN]; /* Heap ID for 'huge' object */
- hbool_t id_changed = FALSE; /* Whether the heap ID changed */
+ bool id_changed = false; /* Whether the heap ID changed */
unsigned char *rewrite_obj = NULL; /* Pointer to re-write buffer for objects */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
@@ -15549,8 +15549,8 @@ test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
/* Register and append custom filter */
filter_class.version = H5Z_CLASS_T_VERS;
filter_class.id = H5Z_FILTER_RESERVED + 43;
- filter_class.encoder_present = TRUE;
- filter_class.decoder_present = TRUE;
+ filter_class.encoder_present = true;
+ filter_class.decoder_present = true;
filter_class.name = "custom_fheap_filter";
filter_class.can_apply = NULL;
filter_class.set_local = NULL;
@@ -15559,7 +15559,7 @@ test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
TEST_ERROR;
if (H5Z_append(&tmp_cparam.pline, H5Z_FILTER_RESERVED + 43, 0, (size_t)0, NULL) < 0)
FAIL_STACK_ERROR;
- test_write_filter_called = FALSE;
+ test_write_filter_called = false;
} /* end if */
/* Perform common file & heap open operations */
@@ -15621,7 +15621,7 @@ test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
if (tparam->comp == FHEAP_TEST_COMPRESS) {
if (!test_write_filter_called)
TEST_ERROR;
- test_write_filter_called = FALSE;
+ test_write_filter_called = false;
} /* end if */
/* Re-open the file */
@@ -15779,7 +15779,7 @@ test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
static unsigned
test_bug1(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -15947,28 +15947,28 @@ test_bug1(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
int
main(void)
{
- fheap_test_param_t tparam; /* Testing parameters */
- H5HF_create_t small_cparam; /* Creation parameters for "small" heap */
- H5HF_create_t large_cparam; /* Creation parameters for "large" heap */
- hid_t fapl = -1, def_fapl = -1; /* File access property list for data files */
- hid_t pb_fapl = -1; /* File access property list for data files */
- hid_t fcpl = -1, def_fcpl = -1; /* File creation property list for data files */
- fheap_test_type_t curr_test; /* Current test being worked on */
- unsigned u, v; /* Local index variable */
- unsigned nerrors = 0; /* Cumulative error count */
+ fheap_test_param_t tparam; /* Testing parameters */
+ H5HF_create_t small_cparam; /* Creation parameters for "small" heap */
+ H5HF_create_t large_cparam; /* Creation parameters for "large" heap */
+ hid_t fapl = H5I_INVALID_HID, def_fapl = H5I_INVALID_HID; /* File access property list for data files */
+ hid_t pb_fapl = H5I_INVALID_HID; /* File access property list for data files */
+ hid_t fcpl = H5I_INVALID_HID, def_fcpl = H5I_INVALID_HID; /* File creation property list for data files */
+ fheap_test_type_t curr_test; /* Current test being worked on */
+ unsigned u, v; /* Local index variable */
+ unsigned nerrors = 0; /* Cumulative error count */
unsigned num_pb_fs = 1; /* The number of settings to test for page buffering and file space handling */
int ExpressMode; /* Express testing level */
const char *envval; /* Environment variable */
- hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
/* Don't run this test using certain file drivers */
- envval = HDgetenv(HDF5_DRIVER);
+ envval = getenv(HDF5_DRIVER);
if (envval == NULL)
envval = "nomatch";
/* Current VFD that does not support contiguous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(envval, "split") != 0 && HDstrcmp(envval, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(envval, "split") != 0 && strcmp(envval, "multi") != 0);
/* Reset library */
h5_reset();
@@ -16003,7 +16003,7 @@ main(void)
/* Push API context */
if (H5CX_push() < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Allocate space for the shared objects */
shared_obj_size_g = large_cparam.max_man_size + 256;
@@ -16037,12 +16037,12 @@ main(void)
switch (v) {
case 0:
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, FALSE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, false, (hsize_t)1) < 0)
TEST_ERROR;
fapl = def_fapl;
break;
case 1:
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, true, (hsize_t)1) < 0)
TEST_ERROR;
fapl = def_fapl;
/* This is a fix for the daily test failure from the checkin for libver bounds. */
@@ -16074,22 +16074,22 @@ main(void)
TEST_ERROR;
break;
case 2:
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)1) < 0)
TEST_ERROR;
fapl = def_fapl;
break;
case 3:
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, true, (hsize_t)1) < 0)
TEST_ERROR;
fapl = def_fapl;
break;
case 4:
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)1) < 0)
TEST_ERROR;
fapl = pb_fapl;
break;
case 5:
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, true, (hsize_t)1) < 0)
TEST_ERROR;
fapl = pb_fapl;
break;
@@ -16112,12 +16112,12 @@ main(void)
switch (curr_test) {
/* "Normal" testing parameters */
case FHEAP_TEST_NORMAL:
- HDputs("Testing with normal parameters");
+ puts("Testing with normal parameters");
break;
/* "Re-open heap" testing parameters */
case FHEAP_TEST_REOPEN:
- HDputs("Testing with reopen heap flag set");
+ puts("Testing with reopen heap flag set");
tparam.reopen_heap = FHEAP_TEST_REOPEN;
break;
@@ -16149,12 +16149,12 @@ main(void)
switch (fill) {
/* "Bulk fill" heap blocks with 'large' objects */
case FHEAP_TEST_FILL_LARGE:
- HDputs("Bulk-filling blocks w/large objects");
+ puts("Bulk-filling blocks w/large objects");
break;
/* "Bulk fill" heap blocks with 'single' objects */
case FHEAP_TEST_FILL_SINGLE:
- HDputs("Bulk-filling blocks w/single object");
+ puts("Bulk-filling blocks w/single object");
break;
/* An unknown test? */
@@ -16354,12 +16354,12 @@ main(void)
switch (id_len) {
/* Use "normal" form for 'huge' object's heap IDs */
case 0:
- HDputs("Using 'normal' heap ID format for 'huge' objects");
+ puts("Using 'normal' heap ID format for 'huge' objects");
break;
/* Use "direct" form for 'huge' object's heap IDs */
case 1:
- HDputs("Using 'direct' heap ID format for 'huge' objects");
+ puts("Using 'direct' heap ID format for 'huge' objects");
/* Adjust actual length of heap IDs for directly storing 'huge' object's file
* offset & length in heap ID */
@@ -16369,8 +16369,8 @@ main(void)
/* Use "direct" storage for 'huge' objects and larger IDs for 'tiny' objects */
case 2:
small_cparam.id_len = 37;
- HDputs("Using 'direct' heap ID format for 'huge' objects and larger IDs for "
- "'tiny' objects");
+ puts("Using 'direct' heap ID format for 'huge' objects and larger IDs for "
+ "'tiny' objects");
tparam.actual_id_len = 37;
break;
@@ -16436,7 +16436,7 @@ main(void)
printf("***Express test mode on. Some tests skipped\n");
else {
/* Random tests using "small" heap creation parameters */
- HDputs("Using 'small' heap creation parameters");
+ puts("Using 'small' heap creation parameters");
/* (reduce size of tests when re-opening each time) */
/* XXX: Try to speed things up enough that these tests don't have to be reduced when
@@ -16458,7 +16458,7 @@ main(void)
fapl, &small_cparam, &tparam);
/* Random tests using "large" heap creation parameters */
- HDputs("Using 'large' heap creation parameters");
+ puts("Using 'large' heap creation parameters");
tparam.actual_id_len = LARGE_HEAP_ID_LEN;
/* (reduce size of tests when re-opening each time) */
@@ -16513,7 +16513,7 @@ main(void)
if (nerrors)
goto error;
- HDputs("All fractal heap tests passed.");
+ puts("All fractal heap tests passed.");
/* Release space for the shared objects */
H5MM_xfree(shared_wobj_g);
@@ -16528,9 +16528,9 @@ main(void)
TEST_ERROR;
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
/* Clean up file used */
h5_cleanup(FILENAME, def_fapl);
@@ -16538,7 +16538,7 @@ main(void)
return 0;
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
H5E_BEGIN_TRY
{
H5MM_xfree(shared_wobj_g);
@@ -16554,7 +16554,7 @@ main(void)
H5E_END_TRY
if (api_ctx_pushed)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
return 1;
} /* end main() */
diff --git a/test/file_image.c b/test/file_image.c
index 2b4e481b053..81b49d6bd4e 100644
--- a/test/file_image.c
+++ b/test/file_image.c
@@ -79,8 +79,8 @@ typedef struct {
static int
test_properties(void)
{
- hid_t fapl_1 = -1;
- hid_t fapl_2 = -1;
+ hid_t fapl_1 = H5I_INVALID_HID;
+ hid_t fapl_2 = H5I_INVALID_HID;
char *buffer = 0;
int count = 10;
void *temp = 0;
@@ -552,10 +552,10 @@ test_core(void)
VERIFY(tmp != NULL, "h5_fixname failed");
/* Append ".copy" to the filename from the source directory */
- VERIFY(HDstrlen(filename) < (1023 - 5), "file name too long.");
- HDstrncpy(copied_filename, filename, (size_t)1023);
+ VERIFY(strlen(filename) < (1023 - 5), "file name too long.");
+ strncpy(copied_filename, filename, (size_t)1023);
copied_filename[1023] = '\0';
- HDstrcat(copied_filename, ".copy");
+ strcat(copied_filename, ".copy");
/* Make a copy of the data file from svn. */
ret = h5_make_local_copy(filename, copied_filename);
@@ -676,31 +676,31 @@ test_core(void)
*/
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
static int
-test_get_file_image(const char *test_banner, const int file_name_num, hid_t fapl, hbool_t user)
+test_get_file_image(const char *test_banner, const int file_name_num, hid_t fapl, bool user)
{
char file_name[1024] = "\0";
void *insertion_ptr = NULL;
void *image_ptr = NULL;
void *file_image_ptr = NULL;
- hbool_t is_family_file = FALSE;
- hbool_t identical;
+ bool is_family_file = false;
+ bool identical;
int data[100];
int i;
int fd = -1;
int result;
- hid_t driver = -1;
- hid_t file_id = -1;
- hid_t dset_id = -1;
- hid_t space_id = -1;
- hid_t core_fapl_id = -1;
- hid_t core_file_id = -1;
+ hid_t driver = H5I_INVALID_HID;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t space_id = H5I_INVALID_HID;
+ hid_t core_fapl_id = H5I_INVALID_HID;
+ hid_t core_file_id = H5I_INVALID_HID;
herr_t err;
hsize_t dims[2];
ssize_t bytes_read;
ssize_t image_size;
ssize_t file_size;
h5_stat_t stat_buf;
- hid_t fcpl = -1;
+ hid_t fcpl = H5I_INVALID_HID;
herr_t ret;
TESTING(test_banner);
@@ -710,11 +710,11 @@ test_get_file_image(const char *test_banner, const int file_name_num, hid_t fapl
VERIFY(driver >= 0, "H5Pget_driver(fapl) failed");
if (driver == H5FD_FAMILY)
- is_family_file = TRUE;
+ is_family_file = true;
/* setup the file name */
h5_fixname(FILENAME2[file_name_num], fapl, file_name, sizeof(file_name));
- VERIFY(HDstrlen(file_name) > 0, "h5_fixname failed");
+ VERIFY(strlen(file_name) > 0, "h5_fixname failed");
fcpl = H5Pcreate(H5P_FILE_CREATE);
VERIFY(fcpl >= 0, "H5Pcreate");
@@ -783,7 +783,7 @@ test_get_file_image(const char *test_banner, const int file_name_num, hid_t fapl
file_size = 0;
do {
- HDsnprintf(member_file_name, (size_t)1024, file_name, i);
+ snprintf(member_file_name, (size_t)1024, file_name, i);
/* get the size of the member file */
result = HDstat(member_file_name, &stat_buf);
@@ -811,7 +811,7 @@ test_get_file_image(const char *test_banner, const int file_name_num, hid_t fapl
while (size_remaining > 0) {
/* construct the member file name */
- HDsnprintf(member_file_name, 1024, file_name, i);
+ snprintf(member_file_name, 1024, file_name, i);
/* open the test file using standard I/O calls */
fd = HDopen(member_file_name, O_RDONLY);
@@ -871,7 +871,7 @@ test_get_file_image(const char *test_banner, const int file_name_num, hid_t fapl
HDoff_t off;
/* Position at userblock */
- off = HDlseek(fd, (off_t)USERBLOCK_SIZE, SEEK_SET);
+ off = HDlseek(fd, (HDoff_t)USERBLOCK_SIZE, SEEK_SET);
VERIFY(off >= 0, "HDlseek() failed.");
}
@@ -885,11 +885,11 @@ test_get_file_image(const char *test_banner, const int file_name_num, hid_t fapl
}
/* verify that the file and the image contain the same data */
- identical = TRUE;
+ identical = true;
i = 0;
while ((i < (int)image_size) && identical) {
if (((char *)image_ptr)[i] != ((char *)file_image_ptr)[i])
- identical = FALSE;
+ identical = false;
i++;
}
VERIFY(identical, "file and image differ.");
@@ -901,7 +901,7 @@ test_get_file_image(const char *test_banner, const int file_name_num, hid_t fapl
VERIFY(core_fapl_id >= 0, "H5Pcreate() failed");
/* setup core_fapl_id to use the core file driver */
- err = H5Pset_fapl_core(core_fapl_id, (size_t)(64 * 1024), FALSE);
+ err = H5Pset_fapl_core(core_fapl_id, (size_t)(64 * 1024), false);
VERIFY(err == SUCCEED, "H5Pset_fapl_core() failed.");
/* Set file image in core fapl */
@@ -958,10 +958,10 @@ test_get_file_image_error_rejection(void)
void *image_ptr = NULL;
int data[100];
int i;
- hid_t fapl_id = -1;
- hid_t file_id = -1;
- hid_t dset_id = -1;
- hid_t space_id = -1;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t space_id = H5I_INVALID_HID;
herr_t err;
hsize_t dims[2];
ssize_t bytes_read;
@@ -994,7 +994,7 @@ test_get_file_image_error_rejection(void)
/* setup the file name */
h5_fixname(FILENAME2[6], fapl_id, file_name, sizeof(file_name));
- VERIFY(HDstrlen(file_name) > 0, "h5_fixname failed");
+ VERIFY(strlen(file_name) > 0, "h5_fixname failed");
/* create the file */
file_id = H5Fcreate(file_name, 0, H5P_DEFAULT, fapl_id);
@@ -1121,12 +1121,12 @@ test_get_file_image_error_rejection(void)
VERIFY(fapl_id >= 0, "H5Pcreate(2) failed");
/* setup the fapl for the multi file driver */
- err = H5Pset_fapl_multi(fapl_id, memb_map, memb_fapl, memb_name, memb_addr, FALSE);
+ err = H5Pset_fapl_multi(fapl_id, memb_map, memb_fapl, memb_name, memb_addr, false);
VERIFY(err >= 0, "H5Pset_fapl_multi failed");
/* setup the file name */
h5_fixname(FILENAME2[4], fapl_id, file_name, sizeof(file_name));
- VERIFY(HDstrlen(file_name) > 0, "h5_fixname failed");
+ VERIFY(strlen(file_name) > 0, "h5_fixname failed");
/* create the file */
file_id = H5Fcreate(file_name, 0, H5P_DEFAULT, fapl_id);
@@ -1188,7 +1188,7 @@ test_get_file_image_error_rejection(void)
/* setup the file name */
h5_fixname(FILENAME2[5], fapl_id, file_name, sizeof(file_name));
- VERIFY(HDstrlen(file_name) > 0, "h5_fixname failed");
+ VERIFY(strlen(file_name) > 0, "h5_fixname failed");
/* create the file */
file_id = H5Fcreate(file_name, 0, H5P_DEFAULT, fapl_id);
@@ -1248,7 +1248,7 @@ test_get_file_image_error_rejection(void)
VERIFY(err >= 0, "H5Pset_fapl_family failed");
h5_fixname(FILENAME2[3], fapl_id, file_name, sizeof(file_name));
- VERIFY(HDstrlen(file_name) > 0, "h5_fixname failed");
+ VERIFY(strlen(file_name) > 0, "h5_fixname failed");
/* create the file */
file_id = H5Fcreate(file_name, 0, H5P_DEFAULT, fapl_id);
@@ -1308,7 +1308,7 @@ main(void)
{
int errors = 0;
hid_t fapl;
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
unsigned user;
h5_reset();
@@ -1325,7 +1325,7 @@ main(void)
}
/* Perform tests with/without user block */
- for (user = FALSE; user <= TRUE; user++) {
+ for (user = false; user <= true; user++) {
/* test H5Fget_file_image() with sec2 driver */
fapl = H5Pcreate(H5P_FILE_ACCESS);
@@ -1343,7 +1343,7 @@ main(void)
/* test H5Fget_file_image() with core driver */
fapl = H5Pcreate(H5P_FILE_ACCESS);
- if (H5Pset_fapl_core(fapl, (size_t)(64 * 1024), TRUE) < 0)
+ if (H5Pset_fapl_core(fapl, (size_t)(64 * 1024), true) < 0)
errors++;
else
errors += test_get_file_image("H5Fget_file_image() with core driver", 2, fapl, user);
diff --git a/test/filenotclosed.c b/test/filenotclosed.c
index 3142d4bc2b2..806a7a498d9 100644
--- a/test/filenotclosed.c
+++ b/test/filenotclosed.c
@@ -49,21 +49,21 @@ catch_signal(int H5_ATTR_UNUSED signo)
int
main(void)
{
- hid_t fapl = -1; /* File access property lists */
- hid_t fid = -1; /* File ID */
- hid_t did = -1; /* Dataset ID */
- hid_t dcpl = -1; /* Dataset creation property list */
- hid_t sid = -1; /* Dataspace ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property lists */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
hsize_t cur_dim[1] = {5}; /* Current dimension sizes */
hsize_t max_dim[1] = {H5S_UNLIMITED}; /* Maximum dimension sizes */
hsize_t chunk_dim[1] = {10}; /* Chunk dimension sizes */
int buf[5] = {1, 2, 3, 4, 5}; /* The data to be written to the dataset */
char filename[100]; /* File name */
const char *env_h5_drvr; /* File Driver value from environment */
- hbool_t contig_addr_vfd; /* Contiguous address vfd */
+ bool contig_addr_vfd; /* Contiguous address vfd */
/* Get the VFD to use */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
@@ -72,10 +72,10 @@ main(void)
* Further investigation is needed to resolve the test failure with the
* split/multi driver. Please see HDFFV-10160.
*/
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (!contig_addr_vfd) {
SKIPPED();
- HDputs(" Temporary skipped for a spilt/multi driver");
+ puts(" Temporary skipped for a spilt/multi driver");
exit(EXIT_SUCCESS);
}
@@ -135,6 +135,6 @@ main(void)
exit(EXIT_SUCCESS);
error:
- HDputs("*** TEST FAILED ***");
+ puts("*** TEST FAILED ***");
exit(EXIT_FAILURE);
}
diff --git a/test/fillval.c b/test/fillval.c
index 6813233e830..2e8cb4767df 100644
--- a/test/fillval.c
+++ b/test/fillval.c
@@ -61,7 +61,7 @@ typedef struct {
static hid_t
create_compound_type(void)
{
- hid_t ret_value = -1;
+ hid_t ret_value = H5I_INVALID_HID;
if ((ret_value = H5Tcreate(H5T_COMPOUND, sizeof(comp_datatype))) < 0)
goto error;
@@ -99,8 +99,8 @@ create_compound_type(void)
static hid_t
create_compound_vl_type(void)
{
- hid_t str_id = -1; /* Datatype for VL-string fields */
- hid_t ret_value = -1;
+ hid_t str_id = H5I_INVALID_HID; /* Datatype for VL-string fields */
+ hid_t ret_value = H5I_INVALID_HID;
/* Create a string datatype */
if ((str_id = H5Tcopy(H5T_C_S1)) < 0)
@@ -150,9 +150,9 @@ create_compound_vl_type(void)
static int
test_getset(void)
{
- hid_t dcpl = -1;
+ hid_t dcpl = H5I_INVALID_HID;
int fill_i;
- hid_t type_ss = -1, type_si = -1;
+ hid_t type_ss = H5I_INVALID_HID, type_si = H5I_INVALID_HID;
struct fill_si {
int v1, v2;
} fill_si;
@@ -190,7 +190,7 @@ test_getset(void)
H5E_END_TRY
if (fill_i != 0) {
H5_FAILED();
- HDputs(" H5Pget_fill_value() should return default 0");
+ puts(" H5Pget_fill_value() should return default 0");
goto error;
}
@@ -209,8 +209,8 @@ test_getset(void)
goto error;
if (fill_ss.v1 != fill_ss_rd.v1 || fill_ss.v2 != fill_ss_rd.v2) {
H5_FAILED();
- HDputs(" Failed to get fill value using same data type that was ");
- HDputs(" used to set the fill value.");
+ puts(" Failed to get fill value using same data type that was ");
+ puts(" used to set the fill value.");
goto error;
}
@@ -221,8 +221,8 @@ test_getset(void)
goto error;
if (fill_ss.v1 != fill_si.v1 || fill_ss.v2 != fill_si.v2) {
H5_FAILED();
- HDputs(" Failed to get fill value using a data type other than what");
- HDputs(" was used to set the fill value.");
+ puts(" Failed to get fill value using a data type other than what");
+ puts(" was used to set the fill value.");
goto error;
}
@@ -235,7 +235,7 @@ test_getset(void)
goto error;
if (fill_si.v1 != fill_ss.v1 || fill_si.v2 != fill_ss.v2) {
H5_FAILED();
- HDputs(" Resetting the fill value was unsuccessful.");
+ puts(" Resetting the fill value was unsuccessful.");
goto error;
}
@@ -275,12 +275,13 @@ static int
test_getset_vl(hid_t fapl)
{
hsize_t dims[1] = {2};
- hid_t fileid = (-1), spaceid = (-1), dtypeid = (-1), datasetid = (-1), plistid = (-1);
- char fill_value[] = "aaaa";
- char orig_fill_value[] = "aaaa";
- char *f1 = fill_value;
- char *f2;
- char filename[1024];
+ hid_t fileid = (H5I_INVALID_HID), spaceid = (H5I_INVALID_HID), dtypeid = (H5I_INVALID_HID),
+ datasetid = (H5I_INVALID_HID), plistid = (H5I_INVALID_HID);
+ char fill_value[] = "aaaa";
+ char orig_fill_value[] = "aaaa";
+ char *f1 = fill_value;
+ char *f2;
+ char filename[1024];
TESTING("property lists, with variable-length datatype");
@@ -304,7 +305,7 @@ test_getset_vl(hid_t fapl)
TEST_ERROR;
/* Verify that the fill value is the original value */
- if (HDstrcmp(f2, orig_fill_value) != 0)
+ if (strcmp(f2, orig_fill_value) != 0)
TEST_ERROR;
/* Release the fill value retrieved */
@@ -346,7 +347,7 @@ test_getset_vl(hid_t fapl)
TEST_ERROR;
/* Verify that the fill value is the original value */
- if (HDstrcmp(f2, orig_fill_value) != 0)
+ if (strcmp(f2, orig_fill_value) != 0)
TEST_ERROR;
/* Release the fill value retrieved */
@@ -662,12 +663,12 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
goto error;
if (alloc_time != H5D_ALLOC_TIME_LATE) {
H5_FAILED();
- HDputs(" Got non-H5D_ALLOC_TIME_LATE space allocation time.");
+ puts(" Got non-H5D_ALLOC_TIME_LATE space allocation time.");
printf(" Got %d\n", alloc_time);
}
if (fill_time != H5D_FILL_TIME_ALLOC) {
H5_FAILED();
- HDputs(" Got non-H5D_FILL_TIME_ALLOC fill value write time.");
+ puts(" Got non-H5D_FILL_TIME_ALLOC fill value write time.");
printf(" Got %d\n", fill_time);
}
if (H5Dclose(dset3) < 0)
@@ -682,7 +683,7 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
goto error;
if (layout == H5D_CONTIGUOUS && allocation != H5D_SPACE_STATUS_NOT_ALLOCATED) {
H5_FAILED();
- HDputs(" Got allocated space instead of unallocated.");
+ puts(" Got allocated space instead of unallocated.");
printf(" Got %d\n", allocation);
goto error;
}
@@ -694,12 +695,12 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
goto error;
if (alloc_time != H5D_ALLOC_TIME_LATE) {
H5_FAILED();
- HDputs(" Got non-H5D_ALLOC_TIME_LATE space allocation time.");
+ puts(" Got non-H5D_ALLOC_TIME_LATE space allocation time.");
printf(" Got %d\n", alloc_time);
}
if (fill_time != H5D_FILL_TIME_NEVER) {
H5_FAILED();
- HDputs(" Got non-H5D_FILL_TIME_NEVER fill value write time.");
+ puts(" Got non-H5D_FILL_TIME_NEVER fill value write time.");
printf(" Got %d\n", fill_time);
}
if (H5Dclose(dset4) < 0)
@@ -717,7 +718,7 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
if (!H5_FLT_ABS_EQUAL(rd_c.a, 0) || !H5_DBL_ABS_EQUAL(rd_c.y, fill_ctype.y) || rd_c.x != 0 ||
rd_c.z != '\0') {
H5_FAILED();
- HDputs(" Got wrong fill value");
+ puts(" Got wrong fill value");
printf(" Got rd_c.a=%f, rd_c.y=%f and rd_c.x=%d, rd_c.z=%c\n", (double)rd_c.a, rd_c.y, rd_c.x,
rd_c.z);
}
@@ -746,14 +747,14 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
goto error;
if (alloc_time != H5D_ALLOC_TIME_EARLY) {
H5_FAILED();
- HDputs(" Got non-H5D_ALLOC_TIME_EARLY space allocation time.");
+ puts(" Got non-H5D_ALLOC_TIME_EARLY space allocation time.");
printf(" Got %d\n", alloc_time);
}
if (H5Pget_fill_time(dcpl, &fill_time) < 0)
goto error;
if (fill_time != H5D_FILL_TIME_NEVER) {
H5_FAILED();
- HDputs(" Got non-H5D_FILL_TIME_NEVER fill value write time.");
+ puts(" Got non-H5D_FILL_TIME_NEVER fill value write time.");
printf(" Got %d\n", fill_time);
}
if (H5Dclose(dset5) < 0)
@@ -786,14 +787,14 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
goto error;
if (alloc_time != H5D_ALLOC_TIME_EARLY) {
H5_FAILED();
- HDputs(" Got non-H5D_ALLOC_TIME_EARLY space allocation time.");
+ puts(" Got non-H5D_ALLOC_TIME_EARLY space allocation time.");
printf(" Got %d\n", alloc_time);
}
if (H5Pget_fill_time(dcpl, &fill_time) < 0)
goto error;
if (fill_time != H5D_FILL_TIME_ALLOC) {
H5_FAILED();
- HDputs(" Got non-H5D_FILL_TIME_ALLOC fill value write time.");
+ puts(" Got non-H5D_FILL_TIME_ALLOC fill value write time.");
printf(" Got %d\n", fill_time);
}
if (H5Dclose(dset6) < 0)
@@ -811,7 +812,7 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
if (!H5_FLT_ABS_EQUAL(rd_c.a, 0) || !H5_DBL_ABS_EQUAL(rd_c.y, fill_ctype.y) || rd_c.x != 0 ||
rd_c.z != '\0') {
H5_FAILED();
- HDputs(" Got wrong fill value");
+ puts(" Got wrong fill value");
printf(" Got rd_c.a=%f, rd_c.y=%f and rd_c.x=%d, rd_c.z=%c\n", (double)rd_c.a, rd_c.y, rd_c.x,
rd_c.z);
}
@@ -872,7 +873,8 @@ static int
test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, H5D_fill_time_t fill_time,
H5D_layout_t layout, H5T_class_t datatype, hid_t ctype_id)
{
- hid_t fspace = -1, mspace = -1, dset1 = -1, dset2 = -1;
+ hid_t fspace = H5I_INVALID_HID, mspace = H5I_INVALID_HID, dset1 = H5I_INVALID_HID,
+ dset2 = H5I_INVALID_HID;
hsize_t cur_size[5] = {2, 8, 8, 4, 2};
hsize_t one[5] = {1, 1, 1, 1, 1};
hsize_t hs_size[5], hs_stride[5];
@@ -899,7 +901,7 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, H5D_f
fill_c.z = ((comp_datatype *)_fillval)->z;
}
else {
- HDputs("Invalid type for test");
+ puts("Invalid type for test");
goto error;
}
@@ -1205,7 +1207,7 @@ static int
test_rdwr(hid_t fapl, const char *base_name, H5D_layout_t layout)
{
char filename[1024];
- hid_t file = -1, dcpl = -1, ctype_id = -1;
+ hid_t file = H5I_INVALID_HID, dcpl = H5I_INVALID_HID, ctype_id = H5I_INVALID_HID;
hsize_t ch_size[5] = {2, 8, 8, 4, 2};
int nerrors = 0;
int fillval = 0x4c70f1cd;
@@ -1480,8 +1482,8 @@ test_extend_init_cmpd_vl(void *_buf, size_t nelmts, const void *_val)
*buf = *val;
/* Deep copy string fields */
- buf->a = HDstrdup(val->a);
- buf->b = HDstrdup(val->b);
+ buf->a = strdup(val->a);
+ buf->b = strdup(val->b);
buf++;
nelmts--;
@@ -1509,8 +1511,8 @@ test_extend_verify_cmpd_vl(unsigned lineno, const hsize_t *offset, const void *_
(const comp_vl_datatype *)_compare_val; /* Value to compare against */
/* Verify value */
- if ((test_val->x != compare_val->x) || HDstrcmp(test_val->a, compare_val->a) != 0 ||
- HDstrcmp(test_val->b, compare_val->b) != 0 || (test_val->y != compare_val->y)) {
+ if ((test_val->x != compare_val->x) || strcmp(test_val->a, compare_val->a) != 0 ||
+ strcmp(test_val->b, compare_val->b) != 0 || (test_val->y != compare_val->y)) {
fprintf(stdout, "%u: Value read was not expected.\n", lineno);
fprintf(stdout,
" Elmt = {%" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
@@ -1563,10 +1565,10 @@ static int
test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, const hsize_t *ch_size, hsize_t *start_size,
hsize_t *max_size, hid_t dtype, void *fillval)
{
- hid_t fspace = -1, mspace = -1; /* File & memory dataspaces */
- hid_t dset = -1; /* Dataset ID */
- hid_t dcpl = -1; /* Dataset creation property list */
- hsize_t extend_size[5]; /* Dimensions to extend to */
+ hid_t fspace = H5I_INVALID_HID, mspace = H5I_INVALID_HID; /* File & memory dataspaces */
+ hid_t dset = H5I_INVALID_HID; /* Dataset ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
+ hsize_t extend_size[5]; /* Dimensions to extend to */
hsize_t one[5] = {1, 1, 1, 1, 1}; /* Dimensions of single element dataspace */
hsize_t hs_size[5], hs_stride[5], hs_offset[5];
size_t nelmts;
@@ -1585,8 +1587,8 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, const hsize_t
unsigned i, j; /* Local index variables */
/* Set vl datatype init value strings */
- init_val_c.a = HDstrdup("baz");
- init_val_c.b = HDstrdup("mumble");
+ init_val_c.a = strdup("baz");
+ init_val_c.b = strdup("mumble");
/* Make copy of dataset creation property list */
if ((dcpl = H5Pcopy(_dcpl)) < 0)
@@ -2029,9 +2031,9 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, const hsize_t
static int
test_extend(hid_t fapl, const char *base_name, H5D_layout_t layout)
{
- hid_t file = -1; /* File ID */
- hid_t dcpl = -1; /* Dataset creation property list ID */
- hid_t cmpd_vl_tid = -1; /* Compound+vl datatype ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t cmpd_vl_tid = H5I_INVALID_HID; /* Compound+vl datatype ID */
hsize_t start_size[5] = {8, 8, 8, 4, 2};
hsize_t max_size[5] = {32, 32, 32, 16, 8};
hsize_t ch_size[5] = {1, 8, 8, 4, 2};
@@ -2050,8 +2052,8 @@ test_extend(hid_t fapl, const char *base_name, H5D_layout_t layout)
TESTING("contiguous dataset extend");
/* Set vl datatype fill value strings */
- fillval_c.a = HDstrdup("foo");
- fillval_c.b = HDstrdup("bar");
+ fillval_c.a = strdup("foo");
+ fillval_c.b = strdup("bar");
/* Create dataset creation property list */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
@@ -2110,7 +2112,7 @@ test_extend(hid_t fapl, const char *base_name, H5D_layout_t layout)
*/
if (H5D_CONTIGUOUS == layout) {
SKIPPED();
- HDputs(" Not implemented yet -- needs H5S_SELECT_DIFF operator");
+ puts(" Not implemented yet -- needs H5S_SELECT_DIFF operator");
goto skip;
}
#endif
@@ -2188,8 +2190,9 @@ test_extend(hid_t fapl, const char *base_name, H5D_layout_t layout)
static int
test_compatible(void)
{
- hid_t file = -1, dset1 = -1, dset2 = -1;
- hid_t dcpl1 = -1, dcpl2 = -1, fspace = -1, mspace = -1;
+ hid_t file = H5I_INVALID_HID, dset1 = H5I_INVALID_HID, dset2 = H5I_INVALID_HID;
+ hid_t dcpl1 = H5I_INVALID_HID, dcpl2 = H5I_INVALID_HID, fspace = H5I_INVALID_HID,
+ mspace = H5I_INVALID_HID;
int rd_fill = 0, fill_val = 4444, val_rd = 0;
hsize_t dims[2], one[2] = {1, 1};
hsize_t hs_offset[2] = {3, 4};
@@ -2223,7 +2226,7 @@ test_compatible(void)
goto error;
if (dims[0] != 8 || dims[1] != 8) {
H5_FAILED();
- HDputs(" Got a different dimension size than what was set.");
+ puts(" Got a different dimension size than what was set.");
printf(" Got dims[0]=%ld, dims[1]=%ld, set 8x8\n", (long)dims[0], (long)dims[1]);
goto error;
}
@@ -2235,7 +2238,7 @@ test_compatible(void)
goto error;
if (val_rd != 0) {
H5_FAILED();
- HDputs(" Got a different value than what was set.");
+ puts(" Got a different value than what was set.");
printf(" Got %ld, set 0\n", (long)val_rd);
goto error;
}
@@ -2276,7 +2279,7 @@ test_compatible(void)
goto error;
if (dims[0] != 8 || dims[1] != 8) {
H5_FAILED();
- HDputs(" Got a different dimension size than what was set.");
+ puts(" Got a different dimension size than what was set.");
printf(" Got dims[0]=%ld, dims[1]=%ld, set 8x8\n", (long)dims[0], (long)dims[1]);
goto error;
}
@@ -2288,7 +2291,7 @@ test_compatible(void)
goto error;
if (val_rd != fill_val) {
H5_FAILED();
- HDputs(" Got a different value than what was set.");
+ puts(" Got a different value than what was set.");
printf(" Got %ld, set %ld\n", (long)val_rd, (long)fill_val);
goto error;
}
@@ -2339,7 +2342,7 @@ test_compatible(void)
static int
test_partalloc_cases(hid_t file, hid_t dcpl, const char *dname, H5D_fill_time_t fill_time)
{
- hid_t fspace = -1, dset1 = -1, rspace = -1;
+ hid_t fspace = H5I_INVALID_HID, dset1 = H5I_INVALID_HID, rspace = H5I_INVALID_HID;
herr_t ret;
hsize_t ds_size[2] = {4, 4};
hsize_t max_size[2] = {H5S_UNLIMITED, 4};
@@ -2461,7 +2464,7 @@ static int
test_partalloc(hid_t fapl, const char *base_name)
{
char filename[1024];
- hid_t file = -1, dcpl = -1;
+ hid_t file = H5I_INVALID_HID, dcpl = H5I_INVALID_HID;
hsize_t ch_size[2] = {1, 4};
int nerrors = 0;
@@ -2603,18 +2606,18 @@ int
main(int argc, char *argv[])
{
int nerrors = 0, argno, test_contig = 1, test_chunk = 1, test_compact = 1;
- hid_t fapl = (-1), fapl2 = (-1); /* File access property lists */
- unsigned new_format; /* Whether to use the new format or not */
- hbool_t driver_is_default_compatible;
+ hid_t fapl = (H5I_INVALID_HID), fapl2 = (H5I_INVALID_HID); /* File access property lists */
+ unsigned new_format; /* Whether to use the new format or not */
+ bool driver_is_default_compatible;
if (argc >= 2) {
test_contig = test_chunk = test_compact = 0;
for (argno = 1; argno < argc; argno++) {
- if (!HDstrcmp(argv[argno], "contiguous"))
+ if (!strcmp(argv[argno], "contiguous"))
test_contig = 1;
- else if (!HDstrcmp(argv[argno], "chunked"))
+ else if (!strcmp(argv[argno], "chunked"))
test_chunk = 1;
- else if (!HDstrcmp(argv[argno], "compact"))
+ else if (!strcmp(argv[argno], "compact"))
test_compact = 1;
else {
fprintf(stderr, "usage: %s [contiguous] [chunked] [compact]\n", argv[0]);
@@ -2642,16 +2645,16 @@ main(int argc, char *argv[])
TEST_ERROR;
/* Loop over using new group format */
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
hid_t my_fapl;
/* Set the FAPL for the type of format */
if (new_format) {
- HDputs("\nTesting with new file format:");
+ puts("\nTesting with new file format:");
my_fapl = fapl2;
} /* end if */
else {
- HDputs("Testing with old file format:");
+ puts("Testing with old file format:");
my_fapl = fapl;
} /* end else */
@@ -2689,7 +2692,7 @@ main(int argc, char *argv[])
if (nerrors)
goto error;
- HDputs("All fill value tests passed.");
+ puts("All fill value tests passed.");
if (h5_cleanup(FILENAME, fapl))
HDremove(FILE_NAME_RAW);
@@ -2697,6 +2700,6 @@ main(int argc, char *argv[])
exit(EXIT_SUCCESS);
error:
- HDputs("***** FILL VALUE TESTS FAILED *****");
+ puts("***** FILL VALUE TESTS FAILED *****");
exit(EXIT_FAILURE);
}
diff --git a/test/filter_fail.c b/test/filter_fail.c
index 0044cf90360..10296175909 100644
--- a/test/filter_fail.c
+++ b/test/filter_fail.c
@@ -91,12 +91,12 @@ filter_fail(unsigned int flags, size_t H5_ATTR_UNUSED cd_nelmts, const unsigned
*-------------------------------------------------------------------------
*/
static herr_t
-test_filter_write(char *file_name, hid_t my_fapl, hbool_t cache_enabled)
+test_filter_write(char *file_name, hid_t my_fapl, bool cache_enabled)
{
- hid_t file = -1;
- hid_t dataset = -1; /* dataset ID */
- hid_t sid = -1; /* dataspace ID */
- hid_t dcpl = -1; /* dataset creation property list ID */
+ hid_t file = H5I_INVALID_HID;
+ hid_t dataset = H5I_INVALID_HID; /* dataset ID */
+ hid_t sid = H5I_INVALID_HID; /* dataspace ID */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation property list ID */
hsize_t dims[1] = {DIM}; /* dataspace dimension - 10*/
hsize_t chunk_dims[1] = {FILTER_CHUNK_DIM}; /* chunk dimension - 2*/
int points[DIM]; /* Data */
@@ -129,7 +129,7 @@ test_filter_write(char *file_name, hid_t my_fapl, hbool_t cache_enabled)
TEST_ERROR;
/* Check that the filter was registered */
- if (TRUE != H5Zfilter_avail(H5Z_FILTER_FAIL_TEST))
+ if (true != H5Zfilter_avail(H5Z_FILTER_FAIL_TEST))
FAIL_STACK_ERROR;
/* Enable the filter as mandatory */
@@ -159,7 +159,7 @@ test_filter_write(char *file_name, hid_t my_fapl, hbool_t cache_enabled)
H5E_END_TRY
if (ret >= 0) {
H5_FAILED();
- HDputs(" Data writing is supposed to fail because the chunk can't be written to file.");
+ puts(" Data writing is supposed to fail because the chunk can't be written to file.");
TEST_ERROR;
}
}
@@ -180,7 +180,7 @@ test_filter_write(char *file_name, hid_t my_fapl, hbool_t cache_enabled)
H5E_END_TRY
if (ret >= 0) {
H5_FAILED();
- HDputs(" Dataset is supposed to fail because the chunk can't be flushed to file.");
+ puts(" Dataset is supposed to fail because the chunk can't be flushed to file.");
TEST_ERROR;
}
}
@@ -225,10 +225,10 @@ test_filter_write(char *file_name, hid_t my_fapl, hbool_t cache_enabled)
static herr_t
test_filter_read(char *file_name, hid_t my_fapl)
{
- hid_t file = -1;
- hid_t dataset = -1; /* dataset ID */
- hid_t sid = -1;
- hid_t mspace = -1;
+ hid_t file = H5I_INVALID_HID;
+ hid_t dataset = H5I_INVALID_HID; /* dataset ID */
+ hid_t sid = H5I_INVALID_HID;
+ hid_t mspace = H5I_INVALID_HID;
hsize_t dims[1] = {DIM}; /* dataspace dimension - 10*/
int rbuf[DIM]; /* Data */
hsize_t dset_size = 0; /* Dataset storage size */
@@ -375,7 +375,7 @@ main(void)
/* The chunk cache is used so that the flushing of data chunks happens
* during H5Dclose. All values are default. */
- nerrors += (test_filter_write(filename, fapl, TRUE) < 0 ? 1 : 0);
+ nerrors += (test_filter_write(filename, fapl, true) < 0 ? 1 : 0);
nerrors += (test_filter_read(filename, fapl) < 0 ? 1 : 0);
h5_fixname(FILENAME[1], fapl, filename, sizeof filename);
@@ -386,7 +386,7 @@ main(void)
TEST_ERROR;
/* Run the test again. */
- nerrors += (test_filter_write(filename, fapl, FALSE) < 0 ? 1 : 0);
+ nerrors += (test_filter_write(filename, fapl, false) < 0 ? 1 : 0);
nerrors += (test_filter_read(filename, fapl) < 0 ? 1 : 0);
/* Verify symbol table messages are cached */
diff --git a/test/filter_plugin.c b/test/filter_plugin.c
index 6bd63d561b7..1571bf22787 100644
--- a/test/filter_plugin.c
+++ b/test/filter_plugin.c
@@ -144,11 +144,11 @@ allocate_and_init_2D_array(int ***arr, const hsize_t *sizes, int **initial_value
*-------------------------------------------------------------------------
*/
static herr_t
-compare_2D_arrays(int **dset1, int **dset2, const hsize_t *sizes, /*OUT*/ hbool_t *are_same)
+compare_2D_arrays(int **dset1, int **dset2, const hsize_t *sizes, /*OUT*/ bool *are_same)
{
hsize_t i, j; /* index variables */
- *are_same = TRUE;
+ *are_same = true;
/* Check all the array values. This could optionally emit any
* bad data, but it's not clear how that would help debugging.
@@ -156,7 +156,7 @@ compare_2D_arrays(int **dset1, int **dset2, const hsize_t *sizes, /*OUT*/ hbool_
for (i = 0; i < sizes[0]; i++)
for (j = 0; j < sizes[1]; j++)
if (dset1[i][j] != dset2[i][j]) {
- *are_same = FALSE;
+ *are_same = false;
return SUCCEED;
}
@@ -176,19 +176,19 @@ compare_2D_arrays(int **dset1, int **dset2, const hsize_t *sizes, /*OUT*/ hbool_
static herr_t
ensure_filter_works(hid_t fid, const char *name, hid_t dcpl_id)
{
- hid_t did = -1; /* Dataset ID */
- hid_t dxpl_id = -1; /* Dataset xfer property list ID */
- hid_t write_dxpl_id = -1; /* Dataset xfer property list ID for writing */
- hid_t sid = -1; /* Dataspace ID */
- void *tconv_buf = NULL; /* Temporary conversion buffer */
- int **orig = NULL; /* Data written to the dataset */
- int **read = NULL; /* Data read from the dataset */
- size_t r, c; /* Data rows and columns */
- size_t hs_r, hs_c, hs_offr, hs_offc; /* Hypserslab sizes and offsets */
- size_t i, j; /* Local index variables */
- int n = 0; /* Value written to point array */
- hbool_t are_same; /* Output from dataset compare function */
- int ***save_array = NULL; /* (Global) array where the final data go */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset xfer property list ID */
+ hid_t write_dxpl_id = H5I_INVALID_HID; /* Dataset xfer property list ID for writing */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ void *tconv_buf = NULL; /* Temporary conversion buffer */
+ int **orig = NULL; /* Data written to the dataset */
+ int **read = NULL; /* Data read from the dataset */
+ size_t r, c; /* Data rows and columns */
+ size_t hs_r, hs_c, hs_offr, hs_offc; /* Hypserslab sizes and offsets */
+ size_t i, j; /* Local index variables */
+ int n = 0; /* Value written to point array */
+ bool are_same; /* Output from dataset compare function */
+ int ***save_array = NULL; /* (Global) array where the final data go */
/* initialize */
r = (size_t)sizes_g[0];
@@ -222,7 +222,7 @@ ensure_filter_works(hid_t fid, const char *name, hid_t dcpl_id)
TESTING(" filters (setup)");
/* Check if all the filters are available */
- if (H5Pall_filters_avail(dcpl_id) != TRUE)
+ if (H5Pall_filters_avail(dcpl_id) != true)
TEST_ERROR;
/* Create the dataset */
@@ -243,7 +243,7 @@ ensure_filter_works(hid_t fid, const char *name, hid_t dcpl_id)
/* The input buffer was calloc'd and has not been initialized yet */
if (compare_2D_arrays(orig, read, sizes_g, &are_same) < 0)
TEST_ERROR;
- if (FALSE == are_same)
+ if (false == are_same)
TEST_ERROR;
PASSED();
@@ -278,7 +278,7 @@ ensure_filter_works(hid_t fid, const char *name, hid_t dcpl_id)
/* Check that the values read are the same as the values written */
if (compare_2D_arrays(orig, read, sizes_g, &are_same) < 0)
TEST_ERROR;
- if (FALSE == are_same)
+ if (false == are_same)
TEST_ERROR;
PASSED();
@@ -306,7 +306,7 @@ ensure_filter_works(hid_t fid, const char *name, hid_t dcpl_id)
/* Check that the values read are the same as the values written */
if (compare_2D_arrays(orig, read, sizes_g, &are_same) < 0)
TEST_ERROR;
- if (FALSE == are_same)
+ if (false == are_same)
TEST_ERROR;
PASSED();
@@ -330,7 +330,7 @@ ensure_filter_works(hid_t fid, const char *name, hid_t dcpl_id)
/* Check that the values read are the same as the values written */
if (compare_2D_arrays(orig, read, sizes_g, &are_same) < 0)
TEST_ERROR;
- if (FALSE == are_same)
+ if (false == are_same)
TEST_ERROR;
PASSED();
@@ -366,7 +366,7 @@ ensure_filter_works(hid_t fid, const char *name, hid_t dcpl_id)
/* Check that the values read are the same as the values written */
if (compare_2D_arrays(orig, read, sizes_g, &are_same) < 0)
TEST_ERROR;
- if (FALSE == are_same)
+ if (false == are_same)
TEST_ERROR;
PASSED();
@@ -374,13 +374,13 @@ ensure_filter_works(hid_t fid, const char *name, hid_t dcpl_id)
/* Save the data written to the file for later comparison when the file
* is reopened for read test.
*/
- if (!HDstrcmp(name, DSET_DEFLATE_NAME))
+ if (!strcmp(name, DSET_DEFLATE_NAME))
save_array = &orig_deflate_g;
- else if (!HDstrcmp(name, DSET_FILTER1_NAME))
+ else if (!strcmp(name, DSET_FILTER1_NAME))
save_array = &orig_dynlib1_g;
- else if (!HDstrcmp(name, DSET_FILTER2_NAME))
+ else if (!strcmp(name, DSET_FILTER2_NAME))
save_array = &orig_dynlib2_g;
- else if (!HDstrcmp(name, DSET_FILTER3_NAME))
+ else if (!strcmp(name, DSET_FILTER3_NAME))
save_array = &orig_dynlib4_g;
else
TEST_ERROR;
@@ -437,9 +437,9 @@ ensure_filter_works(hid_t fid, const char *name, hid_t dcpl_id)
static herr_t
test_dataset_write_with_filters(hid_t fid)
{
- hid_t dcpl_id = -1; /* Dataset creation property list ID */
- unsigned int filter1_data; /* Data used by filter 1 */
- unsigned int libver_values[4]; /* Used w/ the filter that makes HDF5 calls */
+ hid_t dcpl_id = H5I_INVALID_HID; /* Dataset creation property list ID */
+ unsigned int filter1_data; /* Data used by filter 1 */
+ unsigned int libver_values[4]; /* Used w/ the filter that makes HDF5 calls */
#ifdef H5_HAVE_FILTER_DEFLATE
unsigned int compress_level; /* Deflate compression level */
#endif
@@ -448,7 +448,7 @@ test_dataset_write_with_filters(hid_t fid)
* STEP 1: Test deflation by itself.
*----------------------------------------------------------
*/
- HDputs("Testing dataset writes with deflate filter");
+ puts("Testing dataset writes with deflate filter");
#ifdef H5_HAVE_FILTER_DEFLATE
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
TEST_ERROR;
@@ -467,14 +467,14 @@ test_dataset_write_with_filters(hid_t fid)
TEST_ERROR;
#else /* H5_HAVE_FILTER_DEFLATE */
SKIPPED();
- HDputs(" Deflate filter not enabled");
+ puts(" Deflate filter not enabled");
#endif /* H5_HAVE_FILTER_DEFLATE */
/*----------------------------------------------------------
* STEP 2: Test filter plugin 1 by itself.
*----------------------------------------------------------
*/
- HDputs(" dataset writes with filter plugin 1");
+ puts(" dataset writes with filter plugin 1");
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
TEST_ERROR;
if (H5Pset_chunk(dcpl_id, 2, chunk_sizes_g) < 0)
@@ -506,7 +506,7 @@ test_dataset_write_with_filters(hid_t fid)
* STEP 3: Test filter plugin 2 by itself.
*----------------------------------------------------------
*/
- HDputs(" dataset writes with filter plugin 2");
+ puts(" dataset writes with filter plugin 2");
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
TEST_ERROR;
if (H5Pset_chunk(dcpl_id, 2, chunk_sizes_g) < 0)
@@ -534,7 +534,7 @@ test_dataset_write_with_filters(hid_t fid)
* (This filter plugin makes HDF5 API calls)
*----------------------------------------------------------
*/
- HDputs(" dataset writes with filter plugin 3");
+ puts(" dataset writes with filter plugin 3");
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
TEST_ERROR;
if (H5Pset_chunk(dcpl_id, 2, chunk_sizes_g) < 0)
@@ -633,7 +633,7 @@ test_read_data(hid_t did, int *origin_data)
static herr_t
test_dataset_read_with_filters(hid_t fid)
{
- hid_t did = -1; /* Dataset ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
/*----------------------------------------------------------
* STEP 1: Test deflation by itself.
@@ -642,7 +642,7 @@ test_dataset_read_with_filters(hid_t fid)
TESTING("dataset read I/O with deflate filter");
#ifdef H5_HAVE_FILTER_DEFLATE
- if (H5Zfilter_avail(H5Z_FILTER_DEFLATE) != TRUE)
+ if (H5Zfilter_avail(H5Z_FILTER_DEFLATE) != true)
TEST_ERROR;
if ((did = H5Dopen2(fid, DSET_DEFLATE_NAME, H5P_DEFAULT)) < 0)
@@ -656,7 +656,7 @@ test_dataset_read_with_filters(hid_t fid)
#else /* H5_HAVE_FILTER_DEFLATE */
SKIPPED();
- HDputs(" Deflate filter not enabled");
+ puts(" Deflate filter not enabled");
#endif /* H5_HAVE_FILTER_DEFLATE */
/*----------------------------------------------------------
@@ -768,8 +768,8 @@ ensure_data_read_fails(hid_t did)
static herr_t
test_no_read_when_plugins_disabled(hid_t fid)
{
- hid_t did = -1; /* Dataset ID */
- unsigned plugin_flags; /* Plugin access flags */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ unsigned plugin_flags; /* Plugin access flags */
TESTING("filter plugin 1 with filter plugins disabled");
@@ -826,9 +826,9 @@ test_no_read_when_plugins_disabled(hid_t fid)
static herr_t
test_creating_groups_using_plugins(hid_t fid)
{
- hid_t gcpl_id = -1;
- hid_t gid = -1;
- hid_t sub_gid = -1;
+ hid_t gcpl_id = H5I_INVALID_HID;
+ hid_t gid = H5I_INVALID_HID;
+ hid_t sub_gid = H5I_INVALID_HID;
int i;
char subgroup_name[256];
@@ -849,8 +849,8 @@ test_creating_groups_using_plugins(hid_t fid)
for (i = 0; i < N_SUBGROUPS; i++) {
char *sp = subgroup_name;
- sp += HDsnprintf(subgroup_name, sizeof(subgroup_name), SUBGROUP_PREFIX);
- HDsprintf(sp, "%d", i);
+ sp += snprintf(subgroup_name, sizeof(subgroup_name), SUBGROUP_PREFIX);
+ sprintf(sp, "%d", i);
if ((sub_gid = H5Gcreate2(gid, subgroup_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
@@ -893,8 +893,8 @@ test_creating_groups_using_plugins(hid_t fid)
static herr_t
test_opening_groups_using_plugins(hid_t fid)
{
- hid_t gid = -1;
- hid_t sub_gid = -1;
+ hid_t gid = H5I_INVALID_HID;
+ hid_t sub_gid = H5I_INVALID_HID;
int i;
char subgroup_name[256];
@@ -908,8 +908,8 @@ test_opening_groups_using_plugins(hid_t fid)
for (i = 0; i < N_SUBGROUPS; i++) {
char *sp = subgroup_name;
- sp += HDsnprintf(subgroup_name, sizeof(subgroup_name), SUBGROUP_PREFIX);
- HDsprintf(sp, "%d", i);
+ sp += snprintf(subgroup_name, sizeof(subgroup_name), SUBGROUP_PREFIX);
+ sprintf(sp, "%d", i);
if ((sub_gid = H5Gopen2(gid, subgroup_name, H5P_DEFAULT)) < 0)
TEST_ERROR;
@@ -958,9 +958,9 @@ test_path_api_calls(void)
char path[256];
char temp_name[256];
- HDputs("Testing access to the filter path table");
+ puts("Testing access to the filter path table");
- if (H5Zfilter_avail(FILTER1_ID) != TRUE)
+ if (H5Zfilter_avail(FILTER1_ID) != true)
TEST_ERROR;
/* Set the number of paths to create for this test.
@@ -1017,7 +1017,7 @@ test_path_api_calls(void)
/* Add a bunch of paths to the path table */
for (u = 0; u < n_starting_paths; u++) {
- HDsnprintf(path, sizeof(path), "a_path_%u", u);
+ snprintf(path, sizeof(path), "a_path_%u", u);
if (H5PLappend(path) < 0) {
fprintf(stderr, " at %u: %s\n", u, path);
TEST_ERROR;
@@ -1063,7 +1063,7 @@ test_path_api_calls(void)
fprintf(stderr, " get 0 len: %zd : %s\n", path_len, path);
TEST_ERROR;
}
- if (HDstrcmp(path, "a_path_0") != 0) {
+ if (strcmp(path, "a_path_0") != 0) {
fprintf(stderr, " get 0: %s\n", path);
TEST_ERROR;
}
@@ -1075,7 +1075,7 @@ test_path_api_calls(void)
/* Get path at index 1 */
if ((path_len = H5PLget(1, path, 256)) <= 0)
TEST_ERROR;
- if (HDstrcmp(path, "a_path_1") != 0) {
+ if (strcmp(path, "a_path_1") != 0) {
fprintf(stderr, " get 1: %s\n", path);
TEST_ERROR;
}
@@ -1083,8 +1083,8 @@ test_path_api_calls(void)
/* Get path at the last index */
if ((path_len = H5PLget(n_starting_paths - 1, path, 256)) <= 0)
TEST_ERROR;
- HDsnprintf(temp_name, sizeof(temp_name), "a_path_%u", n_starting_paths - 1);
- if (HDstrcmp(path, temp_name) != 0) {
+ snprintf(temp_name, sizeof(temp_name), "a_path_%u", n_starting_paths - 1);
+ if (strcmp(path, temp_name) != 0) {
fprintf(stderr, " get %u: %s\n", n_starting_paths - 1, path);
TEST_ERROR;
}
@@ -1121,7 +1121,7 @@ test_path_api_calls(void)
/* Verify that the entries were moved */
if ((path_len = H5PLget(8, path, 256)) <= 0)
TEST_ERROR;
- if (HDstrcmp(path, "a_path_9") != 0) {
+ if (strcmp(path, "a_path_9") != 0) {
fprintf(stderr, " get 8: %s\n", path);
TEST_ERROR;
}
@@ -1137,7 +1137,7 @@ test_path_api_calls(void)
TESTING(" prepend");
/* Prepend one path */
- HDsnprintf(path, sizeof(path), "a_path_%d", n_starting_paths + 1);
+ snprintf(path, sizeof(path), "a_path_%d", n_starting_paths + 1);
if (H5PLprepend(path) < 0) {
fprintf(stderr, " prepend %u: %s\n", n_starting_paths + 1, path);
TEST_ERROR;
@@ -1152,7 +1152,7 @@ test_path_api_calls(void)
/* Verify that the entries were moved */
if (H5PLget(8, path, 256) <= 0)
TEST_ERROR;
- if (HDstrcmp(path, "a_path_7") != 0) {
+ if (strcmp(path, "a_path_7") != 0) {
fprintf(stderr, " get 8: %s\n", path);
TEST_ERROR;
}
@@ -1160,8 +1160,8 @@ test_path_api_calls(void)
/* Verify that the path was inserted at index zero */
if (H5PLget(0, path, 256) <= 0)
TEST_ERROR;
- HDsnprintf(temp_name, sizeof(temp_name), "a_path_%d", n_starting_paths + 1);
- if (HDstrcmp(path, temp_name) != 0) {
+ snprintf(temp_name, sizeof(temp_name), "a_path_%d", n_starting_paths + 1);
+ if (strcmp(path, temp_name) != 0) {
fprintf(stderr, " get 0: %s\n", path);
TEST_ERROR;
}
@@ -1175,7 +1175,7 @@ test_path_api_calls(void)
TESTING(" replace");
/* Replace one path at index 1 */
- HDsnprintf(path, sizeof(path), "a_path_%u", n_starting_paths + 4);
+ snprintf(path, sizeof(path), "a_path_%u", n_starting_paths + 4);
if (H5PLreplace(path, 1) < 0) {
fprintf(stderr, " replace 1: %s\n", path);
TEST_ERROR;
@@ -1194,8 +1194,8 @@ test_path_api_calls(void)
/* Check path at index 0 */
if (H5PLget(0, path, 256) <= 0)
TEST_ERROR;
- HDsnprintf(temp_name, sizeof(temp_name), "a_path_%u", n_starting_paths + 1);
- if (HDstrcmp(path, temp_name) != 0) {
+ snprintf(temp_name, sizeof(temp_name), "a_path_%u", n_starting_paths + 1);
+ if (strcmp(path, temp_name) != 0) {
fprintf(stderr, " get 0: %s\n", path);
TEST_ERROR;
}
@@ -1203,7 +1203,7 @@ test_path_api_calls(void)
/* Check path at index 2 */
if (H5PLget(2, path, 256) <= 0)
TEST_ERROR;
- if (HDstrcmp(path, "a_path_1") != 0) {
+ if (strcmp(path, "a_path_1") != 0) {
fprintf(stderr, " get 2: %s\n", path);
TEST_ERROR;
}
@@ -1227,7 +1227,7 @@ test_path_api_calls(void)
/* Verify that the entries were moved */
if (H5PLget(4, path, 256) <= 0)
TEST_ERROR;
- if (HDstrcmp(path, "a_path_4") != 0) {
+ if (strcmp(path, "a_path_4") != 0) {
fprintf(stderr, " get 4: %s\n", path);
TEST_ERROR;
}
@@ -1242,7 +1242,7 @@ test_path_api_calls(void)
TESTING(" insert");
/* Insert one path at index 3*/
- HDsnprintf(path, sizeof(path), "a_path_%d", n_starting_paths + 5);
+ snprintf(path, sizeof(path), "a_path_%d", n_starting_paths + 5);
if (H5PLinsert(path, 3) < 0) {
fprintf(stderr, " insert 3: %s\n", path);
TEST_ERROR;
@@ -1251,7 +1251,7 @@ test_path_api_calls(void)
/* Verify that the entries were moved */
if (H5PLget(4, path, 256) <= 0)
TEST_ERROR;
- if (HDstrcmp(path, "a_path_2") != 0) {
+ if (strcmp(path, "a_path_2") != 0) {
fprintf(stderr, " get 4: %s\n", path);
TEST_ERROR;
}
@@ -1315,7 +1315,7 @@ test_filter_numbers(void)
unsigned int flags;
unsigned int filter_config;
- HDputs("Testing filter number handling");
+ puts("Testing filter number handling");
/* Check that out-of-range filter numbers are handled correctly */
TESTING(" Filter # out of range");
@@ -1433,9 +1433,9 @@ int
main(void)
{
char filename[FILENAME_BUF_SIZE];
- hid_t fid = -1;
- hid_t old_ff_fapl_id = -1;
- hid_t new_ff_fapl_id = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t old_ff_fapl_id = H5I_INVALID_HID;
+ hid_t new_ff_fapl_id = H5I_INVALID_HID;
unsigned new_format;
int nerrors = 0;
@@ -1443,7 +1443,7 @@ main(void)
/* ENSURE THAT WRITING TO DATASETS AND CREATING GROUPS WORKS */
/*******************************************************************/
/* Test with old & new format groups */
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
hid_t my_fapl_id;
/* Testing setup */
@@ -1462,7 +1462,7 @@ main(void)
/* Set the FAPL for the type of format */
if (new_format) {
- HDputs("\nTesting with new file format:");
+ puts("\nTesting with new file format:");
/* Copy the file access property list and set the latest file format on it */
if ((new_ff_fapl_id = H5Pcopy(old_ff_fapl_id)) < 0)
TEST_ERROR;
@@ -1472,7 +1472,7 @@ main(void)
my_fapl_id = new_ff_fapl_id;
}
else {
- HDputs("Testing with old file format:");
+ puts("Testing with old file format:");
my_fapl_id = old_ff_fapl_id;
}
@@ -1504,7 +1504,7 @@ main(void)
/* ENSURE THAT READING FROM DATASETS AND OPENING GROUPS WORKS */
/*******************************************************************/
- HDputs("\nTesting reading data with with dynamic plugin filters:");
+ puts("\nTesting reading data with with dynamic plugin filters:");
/* Close the library so that all loaded plugin libraries are unloaded */
h5_reset();
diff --git a/test/flush1.c b/test/flush1.c
index 074c76ce7e8..566d5614c9c 100644
--- a/test/flush1.c
+++ b/test/flush1.c
@@ -38,7 +38,7 @@ static const char *FILENAME[] = {"flush", "flush-swmr", "noflu
/* Number of sub-groups created in the containing group */
#define NGROUPS 100
-static hid_t create_file(const char *filename, hid_t fapl_id, hbool_t swmr);
+static hid_t create_file(const char *filename, hid_t fapl_id, bool swmr);
static herr_t add_dset_to_file(hid_t fid, const char *dset_name);
/*-------------------------------------------------------------------------
@@ -52,14 +52,14 @@ static herr_t add_dset_to_file(hid_t fid, const char *dset_name);
*-------------------------------------------------------------------------
*/
static hid_t
-create_file(const char *filename, hid_t fapl_id, hbool_t swmr)
+create_file(const char *filename, hid_t fapl_id, bool swmr)
{
- hid_t fid = -1; /* file ID */
- hid_t top_gid = -1; /* containing group ID */
- hid_t gid = -1; /* subgroup ID */
- char group_name[32]; /* group name */
- unsigned flags; /* file open flags */
- int i; /* iterator */
+ hid_t fid = H5I_INVALID_HID; /* file ID */
+ hid_t top_gid = H5I_INVALID_HID; /* containing group ID */
+ hid_t gid = H5I_INVALID_HID; /* subgroup ID */
+ char group_name[32]; /* group name */
+ unsigned flags; /* file open flags */
+ int i; /* iterator */
flags = H5F_ACC_TRUNC | (swmr ? H5F_ACC_SWMR_WRITE : 0);
@@ -74,7 +74,7 @@ create_file(const char *filename, hid_t fapl_id, hbool_t swmr)
if ((top_gid = H5Gcreate2(fid, "top_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
STACK_ERROR;
for (i = 0; i < NGROUPS; i++) {
- HDsnprintf(group_name, sizeof(group_name), "group%02d", i);
+ snprintf(group_name, sizeof(group_name), "group%02d", i);
if ((gid = H5Gcreate2(top_gid, group_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
STACK_ERROR;
if (H5Gclose(gid) < 0)
@@ -110,13 +110,13 @@ create_file(const char *filename, hid_t fapl_id, hbool_t swmr)
static herr_t
add_dset_to_file(hid_t fid, const char *dset_name)
{
- hid_t dcpl_id = -1; /* dataset creation plist ID */
- hid_t sid = -1; /* dataspace ID */
- hid_t did = -1; /* dataset ID */
- int *data = NULL; /* data buffer */
- hsize_t dims[1] = {NELEMENTS}; /* size of dataset */
- hsize_t chunk_dims[1] = {CHUNK_SIZE}; /* chunk size */
- int i; /* iterator */
+ hid_t dcpl_id = H5I_INVALID_HID; /* dataset creation plist ID */
+ hid_t sid = H5I_INVALID_HID; /* dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* dataset ID */
+ int *data = NULL; /* data buffer */
+ hsize_t dims[1] = {NELEMENTS}; /* size of dataset */
+ hsize_t chunk_dims[1] = {CHUNK_SIZE}; /* chunk size */
+ int i; /* iterator */
/* Create a chunked dataset */
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
@@ -176,19 +176,19 @@ add_dset_to_file(hid_t fid, const char *dset_name)
int
main(void)
{
- char *driver = NULL; /* name of current VFD (from env var) */
- hbool_t vfd_supports_swmr; /* whether the current VFD supports SWMR */
- hid_t fid = -1; /* file ID */
- hid_t fapl_id = -1; /* file access proplist ID */
- char filename[1024]; /* filename */
- hbool_t use_swmr; /* whether or not to use SWMR I/O */
+ char *driver = NULL; /* name of current VFD (from env var) */
+ bool vfd_supports_swmr; /* whether the current VFD supports SWMR */
+ hid_t fid = H5I_INVALID_HID; /* file ID */
+ hid_t fapl_id = H5I_INVALID_HID; /* file access proplist ID */
+ char filename[1024]; /* filename */
+ bool use_swmr; /* whether or not to use SWMR I/O */
h5_reset();
if ((fapl_id = h5_fileaccess()) < 0)
TEST_ERROR;
/* Check if the current VFD supports SWMR */
- driver = HDgetenv(HDF5_DRIVER);
+ driver = getenv(HDF5_DRIVER);
vfd_supports_swmr = H5FD__supports_swmr_test(driver);
/*************************************************/
@@ -198,7 +198,7 @@ main(void)
/* Create a file and flush */
TESTING("H5Fflush (part1 with flush)");
h5_fixname(FILENAME[0], fapl_id, filename, sizeof(filename));
- use_swmr = FALSE;
+ use_swmr = false;
if ((fid = create_file(filename, fapl_id, use_swmr)) < 0)
TEST_ERROR;
if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0)
@@ -209,7 +209,7 @@ main(void)
TESTING("H5Fflush (part1 with flush + SWMR)");
if (vfd_supports_swmr) {
h5_fixname(FILENAME[1], fapl_id, filename, sizeof(filename));
- use_swmr = TRUE;
+ use_swmr = true;
if ((fid = create_file(filename, fapl_id, use_swmr)) < 0)
TEST_ERROR;
if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0)
@@ -222,7 +222,7 @@ main(void)
/* Create a file which will not be flushed */
TESTING("H5Fflush (part1 without flush)");
h5_fixname(FILENAME[2], fapl_id, filename, sizeof(filename));
- use_swmr = FALSE;
+ use_swmr = false;
if ((fid = create_file(filename, fapl_id, use_swmr)) < 0)
TEST_ERROR;
PASSED();
@@ -231,7 +231,7 @@ main(void)
TESTING("H5Fflush (part1 without flush + SWMR)");
if (vfd_supports_swmr) {
h5_fixname(FILENAME[3], fapl_id, filename, sizeof(filename));
- use_swmr = TRUE;
+ use_swmr = true;
if ((fid = create_file(filename, fapl_id, use_swmr)) < 0)
TEST_ERROR;
PASSED();
@@ -242,7 +242,7 @@ main(void)
/* Create a file, flush, add a dataset, flush */
TESTING("H5Fflush (part1 with flush and later addition and another flush)");
h5_fixname(FILENAME[4], fapl_id, filename, sizeof(filename));
- use_swmr = FALSE;
+ use_swmr = false;
if ((fid = create_file(filename, fapl_id, use_swmr)) < 0)
TEST_ERROR;
if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0)
@@ -257,7 +257,7 @@ main(void)
TESTING("H5Fflush (part1 with flush and later addition and another flush + SWMR)");
if (vfd_supports_swmr) {
h5_fixname(FILENAME[5], fapl_id, filename, sizeof(filename));
- use_swmr = TRUE;
+ use_swmr = true;
if ((fid = create_file(filename, fapl_id, use_swmr)) < 0)
TEST_ERROR;
if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0)
@@ -274,7 +274,7 @@ main(void)
/* Create a file, flush, add a dataset, (no flush) */
TESTING("H5Fflush (part1 with flush and later addition)");
h5_fixname(FILENAME[6], fapl_id, filename, sizeof(filename));
- use_swmr = FALSE;
+ use_swmr = false;
if ((fid = create_file(filename, fapl_id, use_swmr)) < 0)
TEST_ERROR;
if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0)
@@ -287,7 +287,7 @@ main(void)
TESTING("H5Fflush (part1 with flush and later addition + SWMR)");
if (vfd_supports_swmr) {
h5_fixname(FILENAME[7], fapl_id, filename, sizeof(filename));
- use_swmr = TRUE;
+ use_swmr = true;
if ((fid = create_file(filename, fapl_id, use_swmr)) < 0)
TEST_ERROR;
if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0)
diff --git a/test/flush2.c b/test/flush2.c
index 05beed7deb7..ccec232e3d7 100644
--- a/test/flush2.c
+++ b/test/flush2.c
@@ -39,26 +39,26 @@ static const char *FILENAME[] = {"flush", "flush-swmr", "noflu
/* Number of sub-groups created in the containing group */
#define NGROUPS 100
-static hbool_t dset_ok(hid_t fid, const char *dset_name);
-static hbool_t file_ok(const char *filename, hid_t fapl_id, hbool_t check_second_dset);
+static bool dset_ok(hid_t fid, const char *dset_name);
+static bool file_ok(const char *filename, hid_t fapl_id, bool check_second_dset);
/*-------------------------------------------------------------------------
* Function: dset_ok
*
* Purpose: Checks if the data in a dataset is what it is supposed to be.
*
- * Return: TRUE/FALSE
+ * Return: true/false
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
dset_ok(hid_t fid, const char *dset_name)
{
- hid_t sid = -1; /* dataspace ID */
- hid_t did = -1; /* dataset ID */
- int *data = NULL; /* data buffer */
- hsize_t dims[1] = {0}; /* size of dataset */
- int i; /* iterator */
+ hid_t sid = H5I_INVALID_HID; /* dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* dataset ID */
+ int *data = NULL; /* data buffer */
+ hsize_t dims[1] = {0}; /* size of dataset */
+ int i; /* iterator */
/* Open the dataset and check size */
if ((did = H5Dopen2(fid, dset_name, H5P_DEFAULT)) < 0)
@@ -86,7 +86,7 @@ dset_ok(hid_t fid, const char *dset_name)
free(data);
- return TRUE;
+ return true;
error:
H5E_BEGIN_TRY
@@ -98,7 +98,7 @@ dset_ok(hid_t fid, const char *dset_name)
free(data);
- return FALSE;
+ return false;
} /* end dset_ok() */
/*-------------------------------------------------------------------------
@@ -106,18 +106,18 @@ dset_ok(hid_t fid, const char *dset_name)
*
* Purpose: Checks that the contents of a file are what they should be.
*
- * Return: TRUE/FALSE
+ * Return: true/false
*
*-------------------------------------------------------------------------
*/
-static hbool_t
-file_ok(const char *filename, hid_t fapl_id, hbool_t check_second_dset)
+static bool
+file_ok(const char *filename, hid_t fapl_id, bool check_second_dset)
{
- hid_t fid = -1; /* file ID */
- hid_t top_gid = -1; /* containing group ID */
- hid_t gid = -1; /* subgroup ID */
- char group_name[32]; /* group name */
- int i; /* iterator */
+ hid_t fid = H5I_INVALID_HID; /* file ID */
+ hid_t top_gid = H5I_INVALID_HID; /* containing group ID */
+ hid_t gid = H5I_INVALID_HID; /* subgroup ID */
+ char group_name[32]; /* group name */
+ int i; /* iterator */
/* open file */
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY, fapl_id)) < 0)
@@ -134,7 +134,7 @@ file_ok(const char *filename, hid_t fapl_id, hbool_t check_second_dset)
if ((top_gid = H5Gopen2(fid, "top_group", H5P_DEFAULT)) < 0)
goto error;
for (i = 0; i < NGROUPS; i++) {
- HDsnprintf(group_name, sizeof(group_name), "group%02d", i);
+ snprintf(group_name, sizeof(group_name), "group%02d", i);
if ((gid = H5Gopen2(top_gid, group_name, H5P_DEFAULT)) < 0)
goto error;
if (H5Gclose(gid) < 0)
@@ -146,7 +146,7 @@ file_ok(const char *filename, hid_t fapl_id, hbool_t check_second_dset)
if (H5Fclose(fid) < 0)
goto error;
- return TRUE;
+ return true;
error:
H5E_BEGIN_TRY
@@ -157,7 +157,7 @@ file_ok(const char *filename, hid_t fapl_id, hbool_t check_second_dset)
}
H5E_END_TRY
- return FALSE;
+ return false;
} /* end file_ok() */
/*-------------------------------------------------------------------------
@@ -173,9 +173,9 @@ file_ok(const char *filename, hid_t fapl_id, hbool_t check_second_dset)
static herr_t
clear_status_flags(const char *filename, hid_t fapl_id)
{
- hid_t new_fapl_id = -1; /* copy of the file access plist ID */
- hid_t fid = -1; /* file ID */
- hbool_t clear = TRUE;
+ hid_t new_fapl_id = H5I_INVALID_HID; /* copy of the file access plist ID */
+ hid_t fid = H5I_INVALID_HID; /* file ID */
+ bool clear = true;
/* Get a copy of fapl */
if ((new_fapl_id = H5Pcopy(fapl_id)) < 0)
@@ -223,20 +223,20 @@ clear_status_flags(const char *filename, hid_t fapl_id)
int
main(void)
{
- char *driver = NULL; /* name of current VFD (from env var) */
- hbool_t vfd_supports_swmr; /* whether the current VFD supports SWMR */
- hid_t fapl_id = -1; /* file access proplist ID */
- char filename[1024]; /* filename */
- hbool_t check_second_dset; /* whether or not to check the second dset */
- H5E_auto2_t func; /* for shutting off error reporting */
- hbool_t driver_is_default_vfd_compatible;
+ char *driver = NULL; /* name of current VFD (from env var) */
+ bool vfd_supports_swmr; /* whether the current VFD supports SWMR */
+ hid_t fapl_id = H5I_INVALID_HID; /* file access proplist ID */
+ char filename[1024]; /* filename */
+ bool check_second_dset; /* whether or not to check the second dset */
+ H5E_auto2_t func; /* for shutting off error reporting */
+ bool driver_is_default_vfd_compatible;
h5_reset();
if ((fapl_id = h5_fileaccess()) < 0)
PUTS_ERROR("bad vfd-dependent fapl");
/* Check if the current VFD supports SWMR */
- driver = HDgetenv(HDF5_DRIVER);
+ driver = getenv(HDF5_DRIVER);
vfd_supports_swmr = H5FD__supports_swmr_test(driver);
if (h5_driver_is_default_vfd_compatible(fapl_id, &driver_is_default_vfd_compatible) < 0) {
@@ -253,7 +253,7 @@ main(void)
/* Check the case where the file was flushed */
TESTING("H5Fflush (part2 with flush)");
h5_fixname(FILENAME[0], fapl_id, filename, sizeof(filename));
- check_second_dset = FALSE;
+ check_second_dset = false;
if (file_ok(filename, fapl_id, check_second_dset))
PASSED();
else
@@ -264,7 +264,7 @@ main(void)
TESTING("H5Fflush (part2 with flush + SWMR)");
if (vfd_supports_swmr) {
h5_fixname(FILENAME[1], fapl_id, filename, sizeof(filename));
- check_second_dset = FALSE;
+ check_second_dset = false;
if (clear_status_flags(filename, fapl_id) < 0)
TEST_ERROR;
if (file_ok(filename, fapl_id, check_second_dset))
@@ -284,11 +284,11 @@ main(void)
if (H5Eset_auto2(H5E_DEFAULT, NULL, NULL) < 0)
FAIL_STACK_ERROR;
h5_fixname(FILENAME[2], fapl_id, filename, sizeof(filename));
- check_second_dset = FALSE;
+ check_second_dset = false;
if (file_ok(filename, fapl_id, check_second_dset)) {
#if defined H5_HAVE_WIN32_API && !defined(hdf5_EXPORTS)
SKIPPED();
- HDputs(" the DLL will flush the file even when calling _exit, skip this test temporarily");
+ puts(" the DLL will flush the file even when calling _exit, skip this test temporarily");
#else
TEST_ERROR;
#endif
@@ -309,13 +309,13 @@ main(void)
if (H5Eset_auto2(H5E_DEFAULT, NULL, NULL) < 0)
FAIL_STACK_ERROR;
h5_fixname(FILENAME[3], fapl_id, filename, sizeof(filename));
- check_second_dset = FALSE;
+ check_second_dset = false;
if (clear_status_flags(filename, fapl_id) < 0)
TEST_ERROR;
if (file_ok(filename, fapl_id, check_second_dset)) {
#if defined H5_HAVE_WIN32_API && !defined(hdf5_EXPORTS)
SKIPPED();
- HDputs(" the DLL will flush the file even when calling _exit, skip this test temporarily");
+ puts(" the DLL will flush the file even when calling _exit, skip this test temporarily");
#else
TEST_ERROR;
#endif
@@ -334,7 +334,7 @@ main(void)
* added afterward and then flushed
*/
TESTING("H5Fflush (part2 with flush and later addition and another flush)");
- check_second_dset = TRUE;
+ check_second_dset = true;
h5_fixname(FILENAME[4], fapl_id, filename, sizeof(filename));
if (file_ok(filename, fapl_id, check_second_dset))
PASSED();
@@ -347,7 +347,7 @@ main(void)
*/
TESTING("H5Fflush (part2 with flush and later addition and another flush + SWMR)");
if (vfd_supports_swmr) {
- check_second_dset = TRUE;
+ check_second_dset = true;
h5_fixname(FILENAME[5], fapl_id, filename, sizeof(filename));
if (clear_status_flags(filename, fapl_id) < 0)
TEST_ERROR;
@@ -370,11 +370,11 @@ main(void)
if (H5Eset_auto2(H5E_DEFAULT, NULL, NULL) < 0)
FAIL_STACK_ERROR;
h5_fixname(FILENAME[6], fapl_id, filename, sizeof(filename));
- check_second_dset = TRUE;
+ check_second_dset = true;
if (file_ok(filename, fapl_id, check_second_dset)) {
#if defined H5_HAVE_WIN32_API && !defined(hdf5_EXPORTS)
SKIPPED();
- HDputs(" the DLL will flush the file even when calling _exit, skip this test temporarily");
+ puts(" the DLL will flush the file even when calling _exit, skip this test temporarily");
#else
TEST_ERROR;
#endif
@@ -397,13 +397,13 @@ main(void)
if (H5Eset_auto2(H5E_DEFAULT, NULL, NULL) < 0)
FAIL_STACK_ERROR;
h5_fixname(FILENAME[7], fapl_id, filename, sizeof(filename));
- check_second_dset = TRUE;
+ check_second_dset = true;
if (clear_status_flags(filename, fapl_id) < 0)
TEST_ERROR;
if (file_ok(filename, fapl_id, check_second_dset)) {
#if defined H5_HAVE_WIN32_API && !defined(hdf5_EXPORTS)
SKIPPED();
- HDputs(" the DLL will flush the file even when calling _exit, skip this test temporarily");
+ puts(" the DLL will flush the file even when calling _exit, skip this test temporarily");
#else
TEST_ERROR;
#endif
diff --git a/test/flushrefresh.c b/test/flushrefresh.c
index 745b6ef202a..297db60e7ac 100644
--- a/test/flushrefresh.c
+++ b/test/flushrefresh.c
@@ -146,7 +146,7 @@ main(int argc, char *argv[])
* anything. */
/* Determine driver being used */
- envval = HDgetenv(HDF5_DRIVER);
+ envval = getenv(HDF5_DRIVER);
if (envval == NULL || H5FD__supports_swmr_test(envval)) {
if (test_flush() != SUCCEED)
@@ -1054,7 +1054,7 @@ herr_t
flush_verification(const char *obj_pathname, const char *expected)
{
/* Variables */
- hid_t oid = -1, fid = -1;
+ hid_t oid = H5I_INVALID_HID, fid = H5I_INVALID_HID;
herr_t status = 0;
H5O_info2_t oinfo;
@@ -1068,13 +1068,13 @@ flush_verification(const char *obj_pathname, const char *expected)
H5E_END_TRY
/* Compare to expected result */
- if (HDstrcmp(expected, FLUSHED) == 0) {
+ if (strcmp(expected, FLUSHED) == 0) {
if ((oid < 0) || (status < 0)) {
fprintf(stderr, "Error! %s should be on disk, but was NOT!\n", obj_pathname);
PROCESS_ERROR;
} /* end if */
}
- else if (HDstrcmp(expected, NOT_FLUSHED) == 0) {
+ else if (strcmp(expected, NOT_FLUSHED) == 0) {
if ((oid > 0) || (status > 0)) {
fprintf(stderr, "Error! %s not expected to be flushed, but it was found on disk!\n",
obj_pathname);
@@ -1199,7 +1199,7 @@ refresh_verification(const char *obj_pathname)
H5O_native_info_t refreshed_ninfo;
int tries = 800, sleep_tries = 400;
int token_cmp;
- hbool_t ok = FALSE;
+ bool ok = false;
HDremove(SIGNAL_BETWEEN_PROCESSES_2);
@@ -1265,20 +1265,20 @@ refresh_verification(const char *obj_pathname)
* test cases is easy). */
do {
- if ((HDstrcmp(obj_pathname, D1) == 0) || (HDstrcmp(obj_pathname, D2) == 0)) {
+ if ((strcmp(obj_pathname, D1) == 0) || (strcmp(obj_pathname, D2) == 0)) {
if (H5Drefresh(oid) < 0)
PROCESS_ERROR;
} /* end if */
- else if ((HDstrcmp(obj_pathname, G1) == 0) || (HDstrcmp(obj_pathname, G2) == 0)) {
+ else if ((strcmp(obj_pathname, G1) == 0) || (strcmp(obj_pathname, G2) == 0)) {
if (H5Grefresh(oid) < 0)
PROCESS_ERROR;
} /* end if */
- else if ((HDstrcmp(obj_pathname, T1) == 0) || (HDstrcmp(obj_pathname, T2) == 0)) {
+ else if ((strcmp(obj_pathname, T1) == 0) || (strcmp(obj_pathname, T2) == 0)) {
if (H5Trefresh(oid) < 0)
PROCESS_ERROR;
} /* end if */
- else if ((HDstrcmp(obj_pathname, D3) == 0) || (HDstrcmp(obj_pathname, G3) == 0) ||
- (HDstrcmp(obj_pathname, T3) == 0)) {
+ else if ((strcmp(obj_pathname, D3) == 0) || (strcmp(obj_pathname, G3) == 0) ||
+ (strcmp(obj_pathname, T3) == 0)) {
if (H5Orefresh(oid) < 0)
PROCESS_ERROR;
} /* end if */
@@ -1304,7 +1304,7 @@ refresh_verification(const char *obj_pathname)
(flushed_ninfo.hdr.nmesgs != refreshed_ninfo.hdr.nmesgs) &&
(flushed_ninfo.hdr.nchunks != refreshed_ninfo.hdr.nchunks) &&
(flushed_ninfo.hdr.space.total != refreshed_ninfo.hdr.space.total)) {
- ok = TRUE;
+ ok = true;
break;
}
diff --git a/test/freespace.c b/test/freespace.c
index e1628b71811..b278d2a217f 100644
--- a/test/freespace.c
+++ b/test/freespace.c
@@ -276,10 +276,10 @@ TEST_sect_free(H5FS_section_info_t *sect)
/*
* Determine if the section can be shrunk and set _udata accordingly
- * if _udata passed in is NULL, return FALSE
+ * if _udata passed in is NULL, return false
* Otherwise:
- * if section's address+size is the end of file, return TRUE
- * otherwise return FALSE
+ * if section's address+size is the end of file, return true
+ * otherwise return false
*/
static herr_t
TEST_sect_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
@@ -289,15 +289,15 @@ TEST_sect_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
haddr_t end, eoa;
if (can_shrink == NULL)
- return FALSE;
+ return false;
end = sect->sect_info.addr + sect->sect_info.size;
eoa = TEST_get_eoa();
if (end == eoa)
- *can_shrink = TRUE;
+ *can_shrink = true;
else
- *can_shrink = FALSE;
+ *can_shrink = false;
return (htri_t)*can_shrink;
} /* TEST_sect_can_shrink() */
@@ -317,11 +317,11 @@ TEST_sect_shrinking(H5FS_section_info_t **_sect, void *_udata)
if (TEST_sect_free((H5FS_section_info_t *)*sect) < 0)
TEST_ERROR;
*sect = NULL;
- return TRUE;
+ return true;
} /* end if */
error:
- return FALSE;
+ return false;
}
/*
@@ -440,7 +440,7 @@ check_stats(const H5F_t *f, const H5FS_t *frsp, frspace_state_t *state)
static unsigned
test_fs_create(hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5FS_t *frsp = NULL; /* pointer to free space structure */
@@ -581,7 +581,7 @@ test_fs_create(hid_t fapl)
static unsigned
test_fs_sect_add(hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5FS_t *frsp = NULL; /* pointer to free space structure */
@@ -593,7 +593,7 @@ test_fs_sect_add(hid_t fapl)
TEST_free_section_t *sect_node = NULL;
unsigned init_flags = 0;
h5_stat_size_t file_size = 0, tmp_file_size = 0, fr_meta_size = 0;
- unsigned can_shrink = FALSE;
+ unsigned can_shrink = false;
TESTING("adding a section via H5FS_sect_add() to free-space: test 1");
@@ -925,7 +925,7 @@ test_fs_sect_add(hid_t fapl)
static unsigned
test_fs_sect_find(hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5FS_t *frsp = NULL; /* pointer to free space structure */
@@ -936,7 +936,7 @@ test_fs_sect_find(hid_t fapl)
TEST_free_section_t *sect_node1 = NULL, *sect_node2, *sect_node3 = NULL, *sect_node4 = NULL;
TEST_free_section_t *node;
- htri_t node_found = FALSE;
+ htri_t node_found = false;
unsigned init_flags = 0;
TESTING("H5FS_sect_find(): free-space is empty");
@@ -1309,7 +1309,7 @@ test_fs_sect_find(hid_t fapl)
static unsigned
test_fs_sect_merge(hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5FS_t *frsp = NULL; /* pointer to free space structure */
@@ -1320,7 +1320,7 @@ test_fs_sect_merge(hid_t fapl)
TEST_free_section_t *sect_node1 = NULL, *sect_node2 = NULL, *sect_node3 = NULL, *sect_node4 = NULL;
unsigned init_flags = 0;
- htri_t node_found = FALSE;
+ htri_t node_found = false;
TEST_free_section_t *node;
TESTING("the merge of sections when H5FS_sect_add() to free-space: test 1");
@@ -1787,7 +1787,7 @@ test_fs_sect_merge(hid_t fapl)
static unsigned
test_fs_sect_shrink(hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5FS_t *frsp = NULL; /* pointer to free space structure */
@@ -1798,8 +1798,8 @@ test_fs_sect_shrink(hid_t fapl)
TEST_free_section_t *sect_node1 = NULL, *sect_node2 = NULL;
unsigned init_flags = 0;
- unsigned can_shrink = FALSE;
- htri_t node_found = FALSE;
+ unsigned can_shrink = false;
+ htri_t node_found = false;
TEST_free_section_t *node;
TESTING("shrinking of sections when H5FS_sect_add() to free-space: test 1");
@@ -1839,7 +1839,7 @@ test_fs_sect_shrink(hid_t fapl)
init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE50,
TEST_FSPACE_SECT_TYPE_NEW, H5FS_SECT_LIVE);
- can_shrink = FALSE;
+ can_shrink = false;
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, &can_shrink) < 0)
FAIL_STACK_ERROR;
@@ -1874,7 +1874,7 @@ test_fs_sect_shrink(hid_t fapl)
init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE50, TEST_FSPACE_SECT_TYPE,
H5FS_SECT_LIVE);
- can_shrink = FALSE;
+ can_shrink = false;
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, &can_shrink) < 0)
FAIL_STACK_ERROR;
@@ -2134,7 +2134,7 @@ test_fs_sect_shrink(hid_t fapl)
static unsigned
test_fs_sect_change_class(hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5FS_t *frsp = NULL; /* pointer to free space structure */
@@ -2422,7 +2422,7 @@ test_fs_sect_change_class(hid_t fapl)
static unsigned
test_fs_sect_extend(hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5FS_t *frsp = NULL; /* pointer to free space structure */
@@ -2505,7 +2505,7 @@ test_fs_sect_extend(hid_t fapl)
if ((status = H5FS_sect_try_extend(f, frsp, (haddr_t)TEST_SECT_SIZE80, (hsize_t)TEST_SECT_SIZE20,
(hsize_t)TEST_SECT_SIZE40, 0, NULL)) < 0)
FAIL_STACK_ERROR;
- if (FALSE == status)
+ if (false == status)
TEST_ERROR;
/* Succeed in extending the block: free space info is decremented accordingly */
@@ -2582,7 +2582,7 @@ test_fs_sect_extend(hid_t fapl)
if ((status = H5FS_sect_try_extend(f, frsp, (haddr_t)TEST_SECT_ADDR80, (hsize_t)TEST_SECT_SIZE20,
(hsize_t)TEST_SECT_SIZE50, 0, NULL)) < 0)
FAIL_STACK_ERROR;
- if (TRUE == status)
+ if (true == status)
TEST_ERROR;
/* Not able to extend the block: free space info remains the same */
@@ -2656,7 +2656,7 @@ test_fs_sect_extend(hid_t fapl)
if ((status = H5FS_sect_try_extend(f, frsp, (haddr_t)TEST_SECT_ADDR80, (hsize_t)TEST_SECT_SIZE20,
(hsize_t)TEST_SECT_SIZE30, 0, NULL)) < 0)
TEST_ERROR;
- if (FALSE == status)
+ if (false == status)
TEST_ERROR;
/* Succeed in extending the block: total free space is decreased but other info remains the same */
@@ -2731,7 +2731,7 @@ test_fs_sect_extend(hid_t fapl)
if ((status = H5FS_sect_try_extend(f, frsp, (haddr_t)TEST_SECT_ADDR80, (hsize_t)TEST_SECT_SIZE15,
(hsize_t)TEST_SECT_SIZE40, 0, NULL)) < 0)
TEST_ERROR;
- if (TRUE == status)
+ if (true == status)
TEST_ERROR;
/* Not able to extend the block: free space manager info remains the same */
@@ -2778,7 +2778,7 @@ test_fs_sect_extend(hid_t fapl)
static unsigned
test_fs_sect_iterate(hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5FS_t *frsp = NULL; /* pointer to free space structure */
@@ -2874,9 +2874,9 @@ test_fs_sect_iterate(hid_t fapl)
int
main(void)
{
- hid_t fapl = -1; /* File access property list for data files */
- unsigned nerrors = 0; /* Cumulative error count */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list for data files */
+ unsigned nerrors = 0; /* Cumulative error count */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
h5_reset();
@@ -2888,7 +2888,7 @@ main(void)
/* Push API context */
if (H5CX_push() < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* make sure alignment is not set for tests to succeed */
if (H5Pset_alignment(fapl, (hsize_t)1, (hsize_t)1) < 0) {
@@ -2910,18 +2910,18 @@ main(void)
if (nerrors)
goto error;
- HDputs("All free-space tests passed.");
+ puts("All free-space tests passed.");
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
h5_cleanup(FILENAME, fapl);
exit(EXIT_SUCCESS);
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
H5E_BEGIN_TRY
{
H5Pclose(fapl);
@@ -2929,7 +2929,7 @@ main(void)
H5E_END_TRY
if (api_ctx_pushed)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
exit(EXIT_FAILURE);
} /* main() */
diff --git a/test/gen_bad_offset.c b/test/gen_bad_offset.c
index e9e3393f240..4f7b95997d8 100644
--- a/test/gen_bad_offset.c
+++ b/test/gen_bad_offset.c
@@ -50,10 +50,10 @@
int
main(void)
{
- hid_t fid = -1, gid1 = -1, gid2 = -1; /* File and group IDs */
- hid_t did = -1, sid = -1; /* Dataset and dataspace IDs */
- int fd = -1; /* File descriptor */
- int64_t val = 999; /* Bad offset value */
+ hid_t fid = H5I_INVALID_HID, gid1 = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* File and group IDs */
+ hid_t did = H5I_INVALID_HID, sid = H5I_INVALID_HID; /* Dataset and dataspace IDs */
+ int fd = -1; /* File descriptor */
+ int64_t val = 999; /* Bad offset value */
/* Create the test file */
if ((fid = H5Fcreate(TESTFILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
diff --git a/test/gen_bad_ohdr.c b/test/gen_bad_ohdr.c
index d2a9d096075..a464867b45d 100644
--- a/test/gen_bad_ohdr.c
+++ b/test/gen_bad_ohdr.c
@@ -29,23 +29,23 @@
#define ATTRNAME2 "Attribute #2"
#endif /* H5O_ENABLE_BAD_MESG_COUNT */
-#ifndef TRUE
-#define TRUE 1
-#endif /* TRUE */
-#ifndef FALSE
-#define FALSE 0
-#endif /* FALSE */
+#ifndef true
+#define true 1
+#endif /* true */
+#ifndef false
+#define false 0
+#endif /* false */
int
main(void)
{
#ifdef H5O_ENABLE_BAD_MESG_COUNT
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t aid = -1; /* Attribute ID */
- hid_t gcpl = -1; /* Group creation property list ID */
- hbool_t store_bad_mesg_count; /* Flag for storing a bad message count */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ hid_t gcpl = H5I_INVALID_HID; /* Group creation property list ID */
+ bool store_bad_mesg_count; /* Flag for storing a bad message count */
/* Create test file */
if ((fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -56,7 +56,7 @@ main(void)
goto error;
/* Add property for storing bad message count */
- store_bad_mesg_count = TRUE;
+ store_bad_mesg_count = true;
if (H5Pinsert2(gcpl, H5O_BAD_MESG_COUNT_NAME, H5O_BAD_MESG_COUNT_SIZE, &store_bad_mesg_count, NULL, NULL,
NULL, NULL, NULL, NULL) < 0)
goto error;
@@ -109,7 +109,7 @@ main(void)
}
H5E_END_TRY
#else /* H5O_ENABLE_BAD_MESG_COUNT */
- HDputs("H5O_BAD_MESG_COUNT compiler macro not defined!");
+ puts("H5O_BAD_MESG_COUNT compiler macro not defined!");
#endif /* H5O_ENABLE_BAD_MESG_COUNT */
return 1;
}
diff --git a/test/gen_bogus.c b/test/gen_bogus.c
index adccc5c5485..67fc63059eb 100644
--- a/test/gen_bogus.c
+++ b/test/gen_bogus.c
@@ -23,12 +23,12 @@
#define FILENAME "tbogus.h5"
#endif /* H5O_ENABLE_BOGUS */
-#ifndef TRUE
-#define TRUE 1
-#endif /* TRUE */
-#ifndef FALSE
-#define FALSE 0
-#endif /* FALSE */
+#ifndef true
+#define true 1
+#endif /* true */
+#ifndef false
+#define false 0
+#endif /* false */
#ifdef H5O_ENABLE_BOGUS
@@ -40,10 +40,10 @@
static int
generate_datasets(hid_t loc_id, unsigned bogus_id)
{
- hid_t sid = -1; /* Dataspace ID */
- hid_t dcpl = -1; /* Dataset creation property list ID */
- hid_t did = -1; /* Dataset ID */
- uint8_t bogus_flags = 0; /* Flags for bogus message */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ uint8_t bogus_flags = 0; /* Flags for bogus message */
/* Create dataspace for datasets */
if ((sid = H5Screate(H5S_SCALAR)) < 0)
@@ -140,8 +140,8 @@ int
main(void)
{
#ifdef H5O_ENABLE_BOGUS
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
/* Create file for test datasets */
if ((fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -176,7 +176,7 @@ main(void)
}
H5E_END_TRY
#else /* H5O_ENABLE_BOGUS */
- HDputs("H5O_ENABLE_BOGUS compiler macro not defined!");
+ puts("H5O_ENABLE_BOGUS compiler macro not defined!");
#endif /* H5O_ENABLE_BOGUS */
return 1;
}
diff --git a/test/gen_bounds.c b/test/gen_bounds.c
index 1198694a319..53fa436a6dc 100644
--- a/test/gen_bounds.c
+++ b/test/gen_bounds.c
@@ -109,12 +109,12 @@
static herr_t
gen_earliest_latest(void)
{
- hid_t fid = -1; /* File ID */
- hid_t fapl = -1; /* File access property list ID */
- hid_t fcpl = -1; /* File creation property list ID */
- hid_t dcpl = -1; /* Dataset creation property list ID */
- hid_t space = -1; /* Dataspace ID */
- hid_t dset = -1; /* Dataset ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t space = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t dset = H5I_INVALID_HID; /* Dataset ID */
float *buf = NULL; /* Buffer for writing data */
float *bufp = NULL; /* Pointer to data buffer */
hsize_t dims[RANK] = {DIM1, DIM2}; /* Dimensions */
@@ -253,12 +253,12 @@ gen_earliest_latest(void)
static herr_t
gen_earliest_v18(void)
{
- hid_t fid = -1; /* File ID */
- hid_t fapl = -1; /* File access property list ID */
- hid_t fcpl = -1; /* File creation property list ID */
- hid_t dcpl = -1; /* Dataset creation property list ID */
- hid_t space = -1; /* Dataspace ID */
- hid_t dset = -1; /* Dataset ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t space = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t dset = H5I_INVALID_HID; /* Dataset ID */
float *buf = NULL; /* Buffer for writing data */
float *bufp = NULL; /* Pointer to data buffer */
hsize_t dims[RANK] = {DIM1, DIM2}; /* Dimensions */
@@ -372,11 +372,11 @@ gen_earliest_v18(void)
static herr_t
gen_latest_latest(void)
{
- hid_t fid = -1; /* File ID */
- hid_t fapl = -1; /* File access property list ID */
- hid_t dcpl = -1; /* Dataset creation property list ID */
- hid_t space = -1; /* Dataspace ID */
- hid_t dset = -1; /* Dataset ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t space = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t dset = H5I_INVALID_HID; /* Dataset ID */
float *buf = NULL; /* Buffer for writing data */
float *bufp = NULL; /* Pointer to data buffer */
hsize_t dims[RANK] = {DIM1, DIM2}; /* Dimensions */
@@ -480,12 +480,12 @@ gen_latest_latest(void)
static herr_t
gen_v18_latest(void)
{
- hid_t fid = -1; /* File ID */
- hid_t fapl = -1; /* File access property list ID */
- hid_t fcpl = -1; /* File creation property list ID */
- hid_t dcpl = -1; /* Dataset creation property list ID */
- hid_t space = -1; /* Dataspace ID */
- hid_t dset = -1; /* Dataset ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t space = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t dset = H5I_INVALID_HID; /* Dataset ID */
float *buf = NULL; /* Buffer for writing data */
float *bufp = NULL; /* Pointer to data buffer */
hsize_t dims[RANK] = {DIM1, DIM2}; /* Dimensions */
@@ -595,12 +595,12 @@ gen_v18_latest(void)
static herr_t
gen_v18_v18(void)
{
- hid_t fid = -1; /* File ID */
- hid_t fapl = -1; /* File access property list ID */
- hid_t fcpl = -1; /* File creation property list ID */
- hid_t dcpl = -1; /* Dataset creation property list ID */
- hid_t space = -1; /* Dataspace ID */
- hid_t dset = -1; /* Dataset ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t space = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t dset = H5I_INVALID_HID; /* Dataset ID */
float *buf = NULL; /* Buffer for writing data */
float *bufp = NULL; /* Pointer to data buffer */
hsize_t dims[RANK] = {DIM1, DIM2}; /* Dimensions */
diff --git a/test/gen_cross.c b/test/gen_cross.c
index 1bcfd64a274..77e321e1471 100644
--- a/test/gen_cross.c
+++ b/test/gen_cross.c
@@ -87,8 +87,8 @@ int create_nbit_dsets_float(hid_t fid, hid_t fsid, hid_t msid);
int
create_normal_dset(hid_t fid, hid_t fsid, hid_t msid)
{
- hid_t dataset = -1; /* file and dataset handles */
- hid_t dcpl = -1;
+ hid_t dataset = H5I_INVALID_HID; /* file and dataset handles */
+ hid_t dcpl = H5I_INVALID_HID;
float data[NX][NY]; /* data to write */
float fillvalue = -2.2f;
int i, j;
@@ -188,8 +188,8 @@ create_normal_dset(hid_t fid, hid_t fsid, hid_t msid)
int
create_scale_offset_dsets_float(hid_t fid, hid_t fsid, hid_t msid)
{
- hid_t dataset = -1; /* dataset handles */
- hid_t dcpl = -1;
+ hid_t dataset = H5I_INVALID_HID; /* dataset handles */
+ hid_t dcpl = H5I_INVALID_HID;
float data[NX][NY]; /* data to write */
float fillvalue = -2.2f;
hsize_t chunk[RANK] = {CHUNK0, CHUNK1};
@@ -273,8 +273,8 @@ create_scale_offset_dsets_float(hid_t fid, hid_t fsid, hid_t msid)
int
create_scale_offset_dsets_double(hid_t fid, hid_t fsid, hid_t msid)
{
- hid_t dataset = -1; /* dataset handles */
- hid_t dcpl = -1;
+ hid_t dataset = H5I_INVALID_HID; /* dataset handles */
+ hid_t dcpl = H5I_INVALID_HID;
double data[NX][NY]; /* data to write */
double fillvalue = -2.2;
hsize_t chunk[RANK] = {CHUNK0, CHUNK1};
@@ -358,8 +358,8 @@ create_scale_offset_dsets_double(hid_t fid, hid_t fsid, hid_t msid)
int
create_scale_offset_dsets_char(hid_t fid, hid_t fsid, hid_t msid)
{
- hid_t dataset = -1; /* dataset handles */
- hid_t dcpl = -1;
+ hid_t dataset = H5I_INVALID_HID; /* dataset handles */
+ hid_t dcpl = H5I_INVALID_HID;
char data[NX][NY]; /* data to write */
char fillvalue = -2;
hsize_t chunk[RANK] = {CHUNK0, CHUNK1};
@@ -451,8 +451,8 @@ create_scale_offset_dsets_char(hid_t fid, hid_t fsid, hid_t msid)
int
create_scale_offset_dsets_short(hid_t fid, hid_t fsid, hid_t msid)
{
- hid_t dataset = -1; /* dataset handles */
- hid_t dcpl = -1;
+ hid_t dataset = H5I_INVALID_HID; /* dataset handles */
+ hid_t dcpl = H5I_INVALID_HID;
short data[NX][NY]; /* data to write */
short fillvalue = -2;
hsize_t chunk[RANK] = {CHUNK0, CHUNK1};
@@ -544,8 +544,8 @@ create_scale_offset_dsets_short(hid_t fid, hid_t fsid, hid_t msid)
int
create_scale_offset_dsets_int(hid_t fid, hid_t fsid, hid_t msid)
{
- hid_t dataset = -1; /* dataset handles */
- hid_t dcpl = -1;
+ hid_t dataset = H5I_INVALID_HID; /* dataset handles */
+ hid_t dcpl = H5I_INVALID_HID;
int data[NX][NY]; /* data to write */
int fillvalue = -2;
hsize_t chunk[RANK] = {CHUNK0, CHUNK1};
@@ -638,8 +638,8 @@ create_scale_offset_dsets_int(hid_t fid, hid_t fsid, hid_t msid)
int
create_scale_offset_dsets_long_long(hid_t fid, hid_t fsid, hid_t msid)
{
- hid_t dataset = -1; /* dataset handles */
- hid_t dcpl = -1;
+ hid_t dataset = H5I_INVALID_HID; /* dataset handles */
+ hid_t dcpl = H5I_INVALID_HID;
long long data[NX][NY]; /* data to write */
long long fillvalue = -2;
hsize_t chunk[RANK] = {CHUNK0, CHUNK1};
@@ -731,8 +731,8 @@ create_scale_offset_dsets_long_long(hid_t fid, hid_t fsid, hid_t msid)
int
create_fletcher_dsets_float(hid_t fid, hid_t fsid, hid_t msid)
{
- hid_t dataset = -1; /* dataset handles */
- hid_t dcpl = -1;
+ hid_t dataset = H5I_INVALID_HID; /* dataset handles */
+ hid_t dcpl = H5I_INVALID_HID;
float data[NX][NY]; /* data to write */
float fillvalue = -2.2f;
hsize_t chunk[RANK] = {CHUNK0, CHUNK1};
@@ -817,8 +817,8 @@ int
create_deflate_dsets_float(hid_t fid, hid_t fsid, hid_t msid)
{
#ifdef H5_HAVE_FILTER_DEFLATE
- hid_t dataset = -1; /* dataset handles */
- hid_t dcpl = -1;
+ hid_t dataset = H5I_INVALID_HID; /* dataset handles */
+ hid_t dcpl = H5I_INVALID_HID;
float data[NX][NY]; /* data to write */
float fillvalue = -2.2f;
hsize_t chunk[RANK] = {CHUNK0, CHUNK1};
@@ -879,7 +879,7 @@ create_deflate_dsets_float(hid_t fid, hid_t fsid, hid_t msid)
#else /* H5_HAVE_FILTER_DEFLATE */
const char *not_supported = "Deflate filter is not enabled. Can't create the dataset.";
- HDputs(not_supported);
+ puts(not_supported);
#endif /* H5_HAVE_FILTER_DEFLATE */
return 0;
@@ -998,8 +998,8 @@ create_szip_dsets_float(hid_t fid, hid_t fsid, hid_t msid)
int
create_shuffle_dsets_float(hid_t fid, hid_t fsid, hid_t msid)
{
- hid_t dataset = -1; /* dataset handles */
- hid_t dcpl = -1;
+ hid_t dataset = H5I_INVALID_HID; /* dataset handles */
+ hid_t dcpl = H5I_INVALID_HID;
float data[NX][NY]; /* data to write */
float fillvalue = -2.2f;
hsize_t chunk[RANK] = {CHUNK0, CHUNK1};
@@ -1083,9 +1083,9 @@ create_shuffle_dsets_float(hid_t fid, hid_t fsid, hid_t msid)
int
create_nbit_dsets_float(hid_t fid, hid_t fsid, hid_t msid)
{
- hid_t dataset = -1; /* dataset handles */
- hid_t datatype = -1;
- hid_t dcpl = -1;
+ hid_t dataset = H5I_INVALID_HID; /* dataset handles */
+ hid_t datatype = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
size_t precision, offset;
float data[NX][NY]; /* data to write */
float fillvalue = -2.2f;
@@ -1188,9 +1188,9 @@ create_nbit_dsets_float(hid_t fid, hid_t fsid, hid_t msid)
int
main(void)
{
- hid_t file = -1;
- hid_t filespace = -1;
- hid_t memspace = -1;
+ hid_t file = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
+ hid_t memspace = H5I_INVALID_HID;
hsize_t dimsf[RANK];
hsize_t start[RANK] = {0, 0};
@@ -1263,7 +1263,7 @@ main(void)
if (create_szip_dsets_float(file, filespace, memspace) < 0)
TEST_ERROR;
#else /* H5_HAVE_FILTER_SZIP */
- HDputs("Szip filter is not enabled. Can't create the dataset.");
+ puts("Szip filter is not enabled. Can't create the dataset.");
#endif /* H5_HAVE_FILTER_SZIP */
/* Create a dataset of FLOAT with shuffle filter */
diff --git a/test/gen_deflate.c b/test/gen_deflate.c
index 9c3d20f713a..b19dcbd573d 100644
--- a/test/gen_deflate.c
+++ b/test/gen_deflate.c
@@ -40,7 +40,7 @@
int
main(void)
{
- hid_t fid = -1, sid = -1, did = -1, dcpl_id = -1;
+ hid_t fid = H5I_INVALID_HID, sid = H5I_INVALID_HID, did = H5I_INVALID_HID, dcpl_id = H5I_INVALID_HID;
hsize_t dims[SPACE_RANK] = {SPACE_DIM1, SPACE_DIM2};
hsize_t chunk_dims[SPACE_RANK] = {CHUNK_DIM1, CHUNK_DIM2};
size_t i, j; /* Local index variables */
diff --git a/test/gen_file_image.c b/test/gen_file_image.c
index bb86ecc80b9..c5c15106df1 100644
--- a/test/gen_file_image.c
+++ b/test/gen_file_image.c
@@ -33,7 +33,7 @@
int
main(void)
{
- hid_t fid = -1, sid = -1, did = -1;
+ hid_t fid = H5I_INVALID_HID, sid = H5I_INVALID_HID, did = H5I_INVALID_HID;
hsize_t dims[SPACE_RANK] = {SPACE_DIM1, SPACE_DIM2};
size_t i, j; /* Local index variables */
int *data = NULL; /* Dataset data */
diff --git a/test/gen_filespace.c b/test/gen_filespace.c
index 69c1c1e2629..27f3d2628cb 100644
--- a/test/gen_filespace.c
+++ b/test/gen_filespace.c
@@ -26,8 +26,8 @@ const char *FILENAMES[] = {
#define DATASET "dset"
#define NUM_ELMTS 100
-#define FALSE 0
-#define TRUE 1
+#define false 0
+#define true 1
/*
* Compile and run this program in the trunk to generate
@@ -46,20 +46,20 @@ const char *FILENAMES[] = {
int
main(void)
{
- hid_t fid = -1; /* File ID */
- hid_t fcpl = -1; /* File creation property list */
- hid_t did = -1; /* Dataset ID */
- hid_t sid = -1; /* Dataspace ID */
- hsize_t dim[1]; /* Dimension sizes */
- int data[NUM_ELMTS]; /* Buffer for data */
- int i, j; /* Local index variables */
- H5F_fspace_strategy_t fs_strategy; /* File space handling strategy */
- unsigned fs_persist; /* Persisting free-space or not */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hsize_t dim[1]; /* Dimension sizes */
+ int data[NUM_ELMTS]; /* Buffer for data */
+ int i, j; /* Local index variables */
+ H5F_fspace_strategy_t fs_strategy; /* File space handling strategy */
+ unsigned fs_persist; /* Persisting free-space or not */
j = 0;
for (fs_strategy = H5F_FSPACE_STRATEGY_FSM_AGGR; fs_strategy < H5F_FSPACE_STRATEGY_NTYPES;
fs_strategy++) {
- for (fs_persist = FALSE; fs_persist <= TRUE; fs_persist++) {
+ for (fs_persist = false; fs_persist <= true; fs_persist++) {
if (fs_persist && fs_strategy >= H5F_FSPACE_STRATEGY_AGGR)
continue;
diff --git a/test/gen_filters.c b/test/gen_filters.c
index 2bb458c1be9..6b96dec872e 100644
--- a/test/gen_filters.c
+++ b/test/gen_filters.c
@@ -41,12 +41,12 @@ static size_t filter_bogus(unsigned int flags, size_t cd_nelmts, const unsigned
static herr_t
test_filters_endianess(void)
{
- hid_t fid = -1; /* file ID */
- hid_t dsid = -1; /* dataset ID */
- hid_t sid = -1; /* dataspace ID */
- hid_t dcpl = -1; /* dataset creation property list ID */
- hsize_t dims[1] = {20}; /* dataspace dimensions */
- hsize_t chunk_dims[1] = {10}; /* chunk dimensions */
+ hid_t fid = H5I_INVALID_HID; /* file ID */
+ hid_t dsid = H5I_INVALID_HID; /* dataset ID */
+ hid_t sid = H5I_INVALID_HID; /* dataspace ID */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation property list ID */
+ hsize_t dims[1] = {20}; /* dataspace dimensions */
+ hsize_t chunk_dims[1] = {10}; /* chunk dimensions */
int buf[20];
int rank = 1;
int i;
@@ -146,12 +146,12 @@ filter_bogus(unsigned int H5_ATTR_UNUSED flags, size_t H5_ATTR_UNUSED cd_nelmts,
static herr_t
create_file_with_bogus_filter(void)
{
- hid_t fid = -1; /* file ID */
- hid_t dsid = -1; /* dataset ID */
- hid_t sid = -1; /* dataspace ID */
- hid_t dcpl = -1; /* dataset creation property list ID */
- hsize_t dims[1] = {20}; /* dataspace dimensions */
- hsize_t chunk_dims[1] = {10}; /* chunk dimensions */
+ hid_t fid = H5I_INVALID_HID; /* file ID */
+ hid_t dsid = H5I_INVALID_HID; /* dataset ID */
+ hid_t sid = H5I_INVALID_HID; /* dataspace ID */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation property list ID */
+ hsize_t dims[1] = {20}; /* dataspace dimensions */
+ hsize_t chunk_dims[1] = {10}; /* chunk dimensions */
int buf[20];
int rank = 1;
int i;
diff --git a/test/gen_new_fill.c b/test/gen_new_fill.c
index 955c375015c..b27daee83c0 100644
--- a/test/gen_new_fill.c
+++ b/test/gen_new_fill.c
@@ -27,7 +27,8 @@
int
main(void)
{
- hid_t file = -1, dcpl = -1, space = -1, dset1 = -1, dset2 = -1;
+ hid_t file = H5I_INVALID_HID, dcpl = H5I_INVALID_HID, space = H5I_INVALID_HID, dset1 = H5I_INVALID_HID,
+ dset2 = H5I_INVALID_HID;
hsize_t cur_size[2] = {8, 8};
H5D_space_status_t allocation;
int fill_val1 = 4444, fill_val2 = 5555;
diff --git a/test/gen_new_group.c b/test/gen_new_group.c
index 31c44cc4dbf..e9d55cbd172 100644
--- a/test/gen_new_group.c
+++ b/test/gen_new_group.c
@@ -28,12 +28,12 @@
int
main(void)
{
- hid_t fid = -1; /* File ID */
- hid_t fapl = -1; /* File access property list ID */
- hid_t fcpl = -1; /* File creation property list ID */
- hid_t gid = -1; /* Group creation property list ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list ID */
+ hid_t gid = H5I_INVALID_HID; /* Group creation property list ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
/* Create file creation property list */
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
diff --git a/test/gen_old_group.c b/test/gen_old_group.c
index 3ed8a1f36cb..25e2a3306f6 100644
--- a/test/gen_old_group.c
+++ b/test/gen_old_group.c
@@ -30,8 +30,8 @@
int
main(void)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group creation property list ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group creation property list ID */
/* Create file for test groups */
if ((fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
diff --git a/test/gen_plist.c b/test/gen_plist.c
index bd94e9cc053..6d40ae707f5 100644
--- a/test/gen_plist.c
+++ b/test/gen_plist.c
@@ -48,12 +48,12 @@ main(void)
int little_endian;
int word_length;
H5AC_cache_config_t my_cache_config = {H5AC__CURR_CACHE_CONFIG_VERSION,
- 1 /*TRUE*/,
- 0 /*FALSE*/,
- 0 /*FALSE*/,
+ 1 /*true*/,
+ 0 /*false*/,
+ 0 /*false*/,
"temp",
- 1 /*TRUE*/,
- 0 /*FALSE*/,
+ 1 /*true*/,
+ 0 /*false*/,
(2 * 2048 * 1024),
0.3,
(64 * 1024 * 1024),
@@ -62,7 +62,7 @@ main(void)
H5C_incr__threshold,
0.8,
3.0,
- 1 /*TRUE*/,
+ 1 /*true*/,
(8 * 1024 * 1024),
H5C_flash_incr__add_space,
2.0,
@@ -70,14 +70,14 @@ main(void)
H5C_decr__age_out_with_threshold,
0.997,
0.8,
- 1 /*TRUE*/,
+ 1 /*true*/,
(3 * 1024 * 1024),
3,
- 0 /*FALSE*/,
+ 0 /*false*/,
0.2,
(256 * 2048),
H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY};
- H5AC_cache_image_config_t my_cache_image_config = {H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION, TRUE, FALSE,
+ H5AC_cache_image_config_t my_cache_image_config = {H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION, true, false,
-1};
/* check endianness */
@@ -105,7 +105,7 @@ main(void)
if ((dcpl1 = H5Pcreate(H5P_DATASET_CREATE)) < 0)
assert(dcpl1 > 0);
- if ((ret = encode_plist(dcpl1, little_endian, word_length, "testfiles/plist_files/def_dcpl_")) < 0)
+ if ((ret = encode_plist(dcpl1, little_endian, word_length, "plist_files/def_dcpl_")) < 0)
assert(ret > 0);
if ((ret = H5Pset_chunk(dcpl1, 1, &chunk_size)) < 0)
@@ -119,7 +119,7 @@ main(void)
if ((ret = H5Pset_fill_value(dcpl1, H5T_STD_I32BE, &fill)) < 0)
assert(ret > 0);
- if ((ret = H5Pset_dset_no_attrs_hint(dcpl1, FALSE)) < 0)
+ if ((ret = H5Pset_dset_no_attrs_hint(dcpl1, false)) < 0)
assert(ret > 0);
max_size[0] = 100;
@@ -132,7 +132,7 @@ main(void)
if ((ret = H5Pset_external(dcpl1, "ext4.data", (off_t)0, (hsize_t)(max_size[0] * sizeof(int) / 4))) < 0)
assert(ret > 0);
- if ((ret = encode_plist(dcpl1, little_endian, word_length, "testfiles/plist_files/dcpl_")) < 0)
+ if ((ret = encode_plist(dcpl1, little_endian, word_length, "plist_files/dcpl_")) < 0)
assert(ret > 0);
/* release resource */
@@ -143,13 +143,13 @@ main(void)
if ((dapl1 = H5Pcreate(H5P_DATASET_ACCESS)) < 0)
assert(dapl1 > 0);
- if ((ret = encode_plist(dapl1, little_endian, word_length, "testfiles/plist_files/def_dapl_")) < 0)
+ if ((ret = encode_plist(dapl1, little_endian, word_length, "plist_files/def_dapl_")) < 0)
assert(ret > 0);
if ((ret = H5Pset_chunk_cache(dapl1, nslots, nbytes, w0)) < 0)
assert(ret > 0);
- if ((ret = encode_plist(dapl1, little_endian, word_length, "testfiles/plist_files/dapl_")) < 0)
+ if ((ret = encode_plist(dapl1, little_endian, word_length, "plist_files/dapl_")) < 0)
assert(ret > 0);
/* release resource */
@@ -160,7 +160,7 @@ main(void)
if ((dxpl1 = H5Pcreate(H5P_DATASET_XFER)) < 0)
assert(dxpl1 > 0);
- if ((ret = encode_plist(dxpl1, little_endian, word_length, "testfiles/plist_files/def_dxpl_")) < 0)
+ if ((ret = encode_plist(dxpl1, little_endian, word_length, "plist_files/def_dxpl_")) < 0)
assert(ret > 0);
if ((ret = H5Pset_btree_ratios(dxpl1, 0.2, 0.6, 0.2)) < 0)
@@ -186,10 +186,10 @@ main(void)
if ((ret = H5Pset_selection_io(dxpl1, H5D_SELECTION_IO_MODE_ON)) < 0)
assert(ret > 0);
- if ((ret = H5Pset_modify_write_buf(dxpl1, TRUE)) < 0)
+ if ((ret = H5Pset_modify_write_buf(dxpl1, true)) < 0)
assert(ret > 0);
- if ((ret = encode_plist(dxpl1, little_endian, word_length, "testfiles/plist_files/dxpl_")) < 0)
+ if ((ret = encode_plist(dxpl1, little_endian, word_length, "plist_files/dxpl_")) < 0)
assert(ret > 0);
/* release resource */
@@ -200,7 +200,7 @@ main(void)
if ((gcpl1 = H5Pcreate(H5P_GROUP_CREATE)) < 0)
assert(gcpl1 > 0);
- if ((ret = encode_plist(gcpl1, little_endian, word_length, "testfiles/plist_files/def_gcpl_")) < 0)
+ if ((ret = encode_plist(gcpl1, little_endian, word_length, "plist_files/def_gcpl_")) < 0)
assert(ret > 0);
if ((ret = H5Pset_local_heap_size_hint(gcpl1, 256)) < 0)
@@ -219,7 +219,7 @@ main(void)
if ((ret = H5Pset_link_creation_order(gcpl1, (H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED))) < 0)
assert(ret > 0);
- if ((ret = encode_plist(gcpl1, little_endian, word_length, "testfiles/plist_files/gcpl_")) < 0)
+ if ((ret = encode_plist(gcpl1, little_endian, word_length, "plist_files/gcpl_")) < 0)
assert(ret > 0);
/* release resource */
@@ -230,13 +230,13 @@ main(void)
if ((lcpl1 = H5Pcreate(H5P_LINK_CREATE)) < 0)
assert(lcpl1 > 0);
- if ((ret = encode_plist(lcpl1, little_endian, word_length, "testfiles/plist_files/def_lcpl_")) < 0)
+ if ((ret = encode_plist(lcpl1, little_endian, word_length, "plist_files/def_lcpl_")) < 0)
assert(ret > 0);
- if ((ret = H5Pset_create_intermediate_group(lcpl1, 1 /*TRUE*/)) < 0)
+ if ((ret = H5Pset_create_intermediate_group(lcpl1, 1 /*true*/)) < 0)
assert(ret > 0);
- if ((ret = encode_plist(lcpl1, little_endian, word_length, "testfiles/plist_files/lcpl_")) < 0)
+ if ((ret = encode_plist(lcpl1, little_endian, word_length, "plist_files/lcpl_")) < 0)
assert(ret > 0);
/* release resource */
@@ -247,7 +247,7 @@ main(void)
if ((ocpypl1 = H5Pcreate(H5P_OBJECT_COPY)) < 0)
assert(ocpypl1 > 0);
- if ((ret = encode_plist(ocpypl1, little_endian, word_length, "testfiles/plist_files/def_ocpypl_")) < 0)
+ if ((ret = encode_plist(ocpypl1, little_endian, word_length, "plist_files/def_ocpypl_")) < 0)
assert(ret > 0);
ret = H5Pset_copy_object(ocpypl1, H5O_COPY_EXPAND_EXT_LINK_FLAG);
@@ -259,7 +259,7 @@ main(void)
ret = H5Padd_merge_committed_dtype_path(ocpypl1, "bar");
assert(ret >= 0);
- if ((ret = encode_plist(ocpypl1, little_endian, word_length, "testfiles/plist_files/ocpypl_")) < 0)
+ if ((ret = encode_plist(ocpypl1, little_endian, word_length, "plist_files/ocpypl_")) < 0)
assert(ret > 0);
/* release resource */
@@ -270,7 +270,7 @@ main(void)
if ((ocpl1 = H5Pcreate(H5P_OBJECT_CREATE)) < 0)
assert(ocpl1 > 0);
- if ((ret = encode_plist(ocpl1, little_endian, word_length, "testfiles/plist_files/def_ocpl_")) < 0)
+ if ((ret = encode_plist(ocpl1, little_endian, word_length, "plist_files/def_ocpl_")) < 0)
assert(ret > 0);
if ((ret = H5Pset_attr_creation_order(ocpl1, (H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED))) < 0)
@@ -282,7 +282,7 @@ main(void)
if ((ret = H5Pset_filter(ocpl1, H5Z_FILTER_FLETCHER32, 0, (size_t)0, NULL)) < 0)
assert(ret > 0);
- if ((ret = encode_plist(ocpl1, little_endian, word_length, "testfiles/plist_files/ocpl_")) < 0)
+ if ((ret = encode_plist(ocpl1, little_endian, word_length, "plist_files/ocpl_")) < 0)
assert(ret > 0);
/* release resource */
@@ -293,7 +293,7 @@ main(void)
if ((lapl1 = H5Pcreate(H5P_LINK_ACCESS)) < 0)
assert(lapl1 > 0);
- if ((ret = encode_plist(lapl1, little_endian, word_length, "testfiles/plist_files/def_lapl_")) < 0)
+ if ((ret = encode_plist(lapl1, little_endian, word_length, "plist_files/def_lapl_")) < 0)
assert(ret > 0);
if ((ret = H5Pset_nlinks(lapl1, (size_t)134)) < 0)
@@ -318,7 +318,7 @@ main(void)
if ((ret = H5Pclose(fapl1)) < 0)
assert(ret > 0);
- if ((ret = encode_plist(lapl1, little_endian, word_length, "testfiles/plist_files/lapl_")) < 0)
+ if ((ret = encode_plist(lapl1, little_endian, word_length, "plist_files/lapl_")) < 0)
assert(ret > 0);
/* release resource */
@@ -329,7 +329,7 @@ main(void)
if ((fapl1 = H5Pcreate(H5P_FILE_ACCESS)) < 0)
assert(fapl1 > 0);
- if ((ret = encode_plist(fapl1, little_endian, word_length, "testfiles/plist_files/def_fapl_")) < 0)
+ if ((ret = encode_plist(fapl1, little_endian, word_length, "plist_files/def_fapl_")) < 0)
assert(ret > 0);
if ((ret = H5Pset_family_offset(fapl1, 1024)) < 0)
@@ -359,7 +359,7 @@ main(void)
if ((ret = H5Pset_mdc_image_config(fapl1, &my_cache_image_config)) < 0)
assert(ret > 0);
- if ((ret = encode_plist(fapl1, little_endian, word_length, "testfiles/plist_files/fapl_")) < 0)
+ if ((ret = encode_plist(fapl1, little_endian, word_length, "plist_files/fapl_")) < 0)
assert(ret > 0);
/* release resource */
@@ -370,7 +370,7 @@ main(void)
if ((fcpl1 = H5Pcreate(H5P_FILE_CREATE)) < 0)
assert(fcpl1 > 0);
- if ((ret = encode_plist(fcpl1, little_endian, word_length, "testfiles/plist_files/def_fcpl_")) < 0)
+ if ((ret = encode_plist(fcpl1, little_endian, word_length, "plist_files/def_fcpl_")) < 0)
assert(ret > 0);
if ((ret = H5Pset_userblock(fcpl1, 1024) < 0))
@@ -394,13 +394,13 @@ main(void)
if ((ret = H5Pset_sizes(fcpl1, 8, 4) < 0))
assert(ret > 0);
- if ((ret = H5Pset_file_space_strategy(fcpl1, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1)) < 0)
+ if ((ret = H5Pset_file_space_strategy(fcpl1, H5F_FSPACE_STRATEGY_PAGE, true, (hsize_t)1)) < 0)
assert(ret > 0);
if ((ret = H5Pset_file_space_page_size(fcpl1, (hsize_t)4096)) < 0)
assert(ret > 0);
- if ((ret = encode_plist(fcpl1, little_endian, word_length, "testfiles/plist_files/fcpl_")) < 0)
+ if ((ret = encode_plist(fcpl1, little_endian, word_length, "plist_files/fcpl_")) < 0)
assert(ret > 0);
/* release resource */
@@ -411,13 +411,13 @@ main(void)
strcpl1 = H5Pcreate(H5P_STRING_CREATE);
assert(strcpl1 > 0);
- ret = encode_plist(strcpl1, little_endian, word_length, "testfiles/plist_files/def_strcpl_");
+ ret = encode_plist(strcpl1, little_endian, word_length, "plist_files/def_strcpl_");
assert(ret > 0);
ret = H5Pset_char_encoding(strcpl1, H5T_CSET_UTF8);
assert(ret >= 0);
- ret = encode_plist(strcpl1, little_endian, word_length, "testfiles/plist_files/strcpl_");
+ ret = encode_plist(strcpl1, little_endian, word_length, "plist_files/strcpl_");
assert(ret > 0);
/* release resource */
@@ -428,13 +428,13 @@ main(void)
acpl1 = H5Pcreate(H5P_ATTRIBUTE_CREATE);
assert(acpl1 > 0);
- ret = encode_plist(acpl1, little_endian, word_length, "testfiles/plist_files/def_acpl_");
+ ret = encode_plist(acpl1, little_endian, word_length, "plist_files/def_acpl_");
assert(ret > 0);
ret = H5Pset_char_encoding(acpl1, H5T_CSET_UTF8);
assert(ret >= 0);
- ret = encode_plist(acpl1, little_endian, word_length, "testfiles/plist_files/acpl_");
+ ret = encode_plist(acpl1, little_endian, word_length, "plist_files/acpl_");
assert(ret > 0);
/* release resource */
@@ -455,8 +455,8 @@ encode_plist(hid_t plist_id, int little_endian, int word_length, const char *fil
char filename[1024];
/* Generate filename */
- if ((ret = HDsnprintf(filename, sizeof(filename), "%s%d%s", filename_prefix, word_length,
- little_endian ? "le" : "be")) < 0)
+ if ((ret = snprintf(filename, sizeof(filename), "%s%d%s", filename_prefix, word_length,
+ little_endian ? "le" : "be")) < 0)
assert(ret > 0);
/* first call to encode returns only the size of the buffer needed */
diff --git a/test/gen_udlinks.c b/test/gen_udlinks.c
index 9843fcda0f4..91f938df508 100644
--- a/test/gen_udlinks.c
+++ b/test/gen_udlinks.c
@@ -30,9 +30,9 @@
int
main(void)
{
- hid_t fid1 = -1;
- hid_t fid2 = -1;
- hid_t gid = -1;
+ hid_t fid1 = H5I_INVALID_HID;
+ hid_t fid2 = H5I_INVALID_HID;
+ hid_t gid = H5I_INVALID_HID;
char filename1[NAME_BUF_SIZE];
char filename2[NAME_BUF_SIZE];
diff --git a/test/genall5.c b/test/genall5.c
index 005e9442f51..67e76d1610e 100644
--- a/test/genall5.c
+++ b/test/genall5.c
@@ -32,7 +32,7 @@
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* Return: void
@@ -43,15 +43,15 @@
void
ns_grp_0(hid_t fid, const char *group_name)
{
- hid_t gid = -1;
- hid_t gcpl = -1;
+ hid_t gid = H5I_INVALID_HID;
+ hid_t gcpl = H5I_INVALID_HID;
herr_t ret;
if (pass) {
gcpl = H5Pcreate(H5P_GROUP_CREATE);
if (gcpl <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_0: H5Pcreate() failed";
}
assert(gcpl > 0);
@@ -61,7 +61,7 @@ ns_grp_0(hid_t fid, const char *group_name)
ret = H5Pset_link_creation_order(gcpl, H5P_CRT_ORDER_TRACKED);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_0: H5Pset_link_creation_order() failed";
}
assert(ret >= 0);
@@ -71,7 +71,7 @@ ns_grp_0(hid_t fid, const char *group_name)
gid = H5Gcreate2(fid, group_name, H5P_DEFAULT, gcpl, H5P_DEFAULT);
if (gid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_0: H5Gcreate2() failed";
}
assert(gid > 0);
@@ -81,7 +81,7 @@ ns_grp_0(hid_t fid, const char *group_name)
ret = H5Pclose(gcpl);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_0: H5Pclose(gcpl) failed";
}
assert(ret >= 0);
@@ -91,7 +91,7 @@ ns_grp_0(hid_t fid, const char *group_name)
ret = H5Gclose(gid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_0: H5Gclose(gid) failed";
}
assert(ret >= 0);
@@ -107,7 +107,7 @@ ns_grp_0(hid_t fid, const char *group_name)
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* Return: void
@@ -118,8 +118,8 @@ ns_grp_0(hid_t fid, const char *group_name)
void
vrfy_ns_grp_0(hid_t fid, const char *group_name)
{
- hid_t gid = -1;
- hid_t gcpl = -1;
+ hid_t gid = H5I_INVALID_HID;
+ hid_t gcpl = H5I_INVALID_HID;
H5G_info_t grp_info;
unsigned crt_order_flags = 0;
herr_t ret;
@@ -128,7 +128,7 @@ vrfy_ns_grp_0(hid_t fid, const char *group_name)
gid = H5Gopen2(fid, group_name, H5P_DEFAULT);
if (gid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_0: H5Gopen2() failed";
}
assert(gid > 0);
@@ -138,7 +138,7 @@ vrfy_ns_grp_0(hid_t fid, const char *group_name)
gcpl = H5Gget_create_plist(gid);
if (gcpl <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_0: H5Gget_create_plist() failed";
}
assert(gcpl > 0);
@@ -148,11 +148,11 @@ vrfy_ns_grp_0(hid_t fid, const char *group_name)
ret = H5Pget_link_creation_order(gcpl, &crt_order_flags);
if (gcpl <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_0: H5Pget_link_creation_order() failed";
}
else if (H5P_CRT_ORDER_TRACKED != crt_order_flags) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_0: H5P_CRT_ORDER_TRACKED != crt_order_flags";
}
assert(ret >= 0);
@@ -163,7 +163,7 @@ vrfy_ns_grp_0(hid_t fid, const char *group_name)
ret = H5Pclose(gcpl);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_0: H5Pclose() failed";
}
assert(ret >= 0);
@@ -174,38 +174,38 @@ vrfy_ns_grp_0(hid_t fid, const char *group_name)
ret = H5Gget_info(gid, &grp_info);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_0: H5Gget_info() failed";
}
else if (H5G_STORAGE_TYPE_COMPACT != grp_info.storage_type) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_0: H5G_STORAGE_TYPE_COMPACT != grp_info.storage_type";
}
else if (0 != grp_info.nlinks) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_0: 0 != grp_info.nlinks";
}
else if (0 != grp_info.max_corder) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_0: 0 != grp_info.max_corder";
}
- else if (FALSE != grp_info.mounted) {
- pass = FALSE;
- failure_mssg = "vrfy_ns_grp_0: FALSE != grp_info.mounted";
+ else if (false != grp_info.mounted) {
+ pass = false;
+ failure_mssg = "vrfy_ns_grp_0: false != grp_info.mounted";
}
assert(ret >= 0);
assert(H5G_STORAGE_TYPE_COMPACT == grp_info.storage_type);
assert(0 == grp_info.nlinks);
assert(0 == grp_info.max_corder);
- assert(FALSE == grp_info.mounted);
+ assert(false == grp_info.mounted);
}
if (pass) {
ret = H5Gclose(gid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_0: H5Gclose() failed";
}
assert(ret >= 0);
@@ -221,7 +221,7 @@ vrfy_ns_grp_0(hid_t fid, const char *group_name)
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* Return: void
@@ -232,8 +232,8 @@ vrfy_ns_grp_0(hid_t fid, const char *group_name)
void
ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
{
- hid_t gid = -1;
- hid_t gcpl = -1;
+ hid_t gid = H5I_INVALID_HID;
+ hid_t gcpl = H5I_INVALID_HID;
unsigned max_compact;
unsigned u;
herr_t ret;
@@ -242,7 +242,7 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
gcpl = H5Pcreate(H5P_GROUP_CREATE);
if (gcpl <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_c: H5Pcreate(H5P_GROUP_CREATE) failed";
}
assert(gcpl > 0);
@@ -252,7 +252,7 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Pset_link_creation_order(gcpl, H5P_CRT_ORDER_TRACKED);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_c: H5Pset_link_creation_order() failed";
}
assert(ret >= 0);
@@ -262,7 +262,7 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
gid = H5Gcreate2(fid, group_name, H5P_DEFAULT, gcpl, H5P_DEFAULT);
if (gid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_c: H5Gcreate2() failed";
}
assert(gid > 0);
@@ -273,15 +273,15 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Pget_link_phase_change(gcpl, &max_compact, NULL);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_c: H5Pget_link_phase_change() failed";
}
else if (nlinks <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_c: nlinks <= 0";
}
else if (nlinks >= max_compact) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_c: nlinks >= max_compact";
}
@@ -294,13 +294,13 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
while ((pass) && (u < nlinks)) {
char linkname[16];
- HDsnprintf(linkname, sizeof(linkname), "%u", u);
+ snprintf(linkname, sizeof(linkname), "%u", u);
if (0 == (u % 3)) {
ret = H5Lcreate_soft(group_name, gid, linkname, H5P_DEFAULT, H5P_DEFAULT);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_c: H5Lcreate_soft() failed";
}
assert(ret >= 0);
@@ -309,7 +309,7 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Lcreate_hard(fid, "/", gid, linkname, H5P_DEFAULT, H5P_DEFAULT);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_c: H5Lcreate_hard() failed";
}
assert(ret >= 0);
@@ -319,7 +319,7 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Lcreate_external("external.h5", "/ext", gid, linkname, H5P_DEFAULT, H5P_DEFAULT);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_c: H5Lcreate_external() failed";
}
assert(ret >= 0);
@@ -332,7 +332,7 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Pclose(gcpl);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_c: H5Pclose(gcpl) failed";
}
assert(ret >= 0);
@@ -342,7 +342,7 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Gclose(gid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_c: H5Gclose(gid) failed";
}
assert(ret >= 0);
@@ -358,7 +358,7 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* Return: void
@@ -369,8 +369,8 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
void
vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
{
- hid_t gid = -1;
- hid_t gcpl = -1;
+ hid_t gid = H5I_INVALID_HID;
+ hid_t gcpl = H5I_INVALID_HID;
H5G_info_t grp_info;
unsigned crt_order_flags = 0;
unsigned u;
@@ -380,7 +380,7 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
gid = H5Gopen2(fid, group_name, H5P_DEFAULT);
if (gid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: H5Gopen2() failed";
}
assert(gid > 0);
@@ -390,7 +390,7 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
gcpl = H5Gget_create_plist(gid);
if (gcpl <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: H5Gget_create_plist(gid) failed";
}
assert(gcpl > 0);
@@ -400,11 +400,11 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Pget_link_creation_order(gcpl, &crt_order_flags);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: H5Pget_link_creation_order() failed";
}
else if (H5P_CRT_ORDER_TRACKED != crt_order_flags) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: H5P_CRT_ORDER_TRACKED != crt_order_flags";
}
assert(ret >= 0);
@@ -415,7 +415,7 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Pclose(gcpl);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: H5Pclose() failed";
}
assert(ret >= 0);
@@ -426,31 +426,31 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Gget_info(gid, &grp_info);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: H5Gget_info() failed";
}
else if (H5G_STORAGE_TYPE_COMPACT != grp_info.storage_type) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: H5G_STORAGE_TYPE_COMPACT != grp_info.storage_type";
}
else if (nlinks != grp_info.nlinks) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: nlinks != grp_info.nlinks";
}
else if (nlinks != grp_info.max_corder) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: nlinks != grp_info.max_corder";
}
- else if (FALSE != grp_info.mounted) {
- pass = FALSE;
- failure_mssg = "vrfy_ns_grp_c: FALSE != grp_info.mounted";
+ else if (false != grp_info.mounted) {
+ pass = false;
+ failure_mssg = "vrfy_ns_grp_c: false != grp_info.mounted";
}
assert(ret >= 0);
assert(H5G_STORAGE_TYPE_COMPACT == grp_info.storage_type);
assert(nlinks == grp_info.nlinks);
assert(nlinks == grp_info.max_corder);
- assert(FALSE == grp_info.mounted);
+ assert(false == grp_info.mounted);
}
u = 0;
@@ -459,11 +459,11 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
char linkname[16];
htri_t link_exists;
- HDsnprintf(linkname, sizeof(linkname), "%u", u);
+ snprintf(linkname, sizeof(linkname), "%u", u);
link_exists = H5Lexists(gid, linkname, H5P_DEFAULT);
if (link_exists < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: H5Lexists() failed";
}
assert(link_exists >= 0);
@@ -472,23 +472,23 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Lget_info2(gid, linkname, &lnk_info, H5P_DEFAULT);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: H5Lget_info() failed";
}
- else if (TRUE != lnk_info.corder_valid) {
- pass = FALSE;
- failure_mssg = "vrfy_ns_grp_c: TRUE != lnk_info.corder_valid";
+ else if (true != lnk_info.corder_valid) {
+ pass = false;
+ failure_mssg = "vrfy_ns_grp_c: true != lnk_info.corder_valid";
}
else if (u != lnk_info.corder) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: u != lnk_info.corder";
}
else if (H5T_CSET_ASCII != lnk_info.cset) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: H5T_CSET_ASCII != lnk_info.cset";
}
assert(ret >= 0);
- assert(TRUE == lnk_info.corder_valid);
+ assert(true == lnk_info.corder_valid);
assert(u == lnk_info.corder);
assert(H5T_CSET_ASCII == lnk_info.cset);
@@ -496,35 +496,35 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
char *slinkval;
if (H5L_TYPE_SOFT != lnk_info.type) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: H5L_TYPE_SOFT != lnk_info.type";
}
- else if ((HDstrlen(group_name) + 1) != lnk_info.u.val_size) {
- pass = FALSE;
- failure_mssg = "vrfy_ns_grp_c: (HDstrlen(group_name) + 1) != lnk_info.u.val_size";
+ else if ((strlen(group_name) + 1) != lnk_info.u.val_size) {
+ pass = false;
+ failure_mssg = "vrfy_ns_grp_c: (strlen(group_name) + 1) != lnk_info.u.val_size";
}
assert(H5L_TYPE_SOFT == lnk_info.type);
- assert((HDstrlen(group_name) + 1) == lnk_info.u.val_size);
+ assert((strlen(group_name) + 1) == lnk_info.u.val_size);
slinkval = (char *)malloc(lnk_info.u.val_size);
if (!slinkval) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: malloc of slinkval failed";
}
assert(slinkval);
ret = H5Lget_val(gid, linkname, slinkval, lnk_info.u.val_size, H5P_DEFAULT);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: H5Lget_val() failed";
}
- else if (0 != HDstrcmp(slinkval, group_name)) {
- pass = FALSE;
- failure_mssg = "vrfy_ns_grp_c: 0 != HDstrcmp(slinkval, group_name)";
+ else if (0 != strcmp(slinkval, group_name)) {
+ pass = false;
+ failure_mssg = "vrfy_ns_grp_c: 0 != strcmp(slinkval, group_name)";
}
assert(ret >= 0);
- assert(0 == HDstrcmp(slinkval, group_name));
+ assert(0 == strcmp(slinkval, group_name));
free(slinkval);
} /* end if */
@@ -533,7 +533,7 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
int token_cmp = 0;
if (H5L_TYPE_HARD != lnk_info.type) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: H5L_TYPE_HARD != lnk_info.type";
}
assert(H5L_TYPE_HARD == lnk_info.type);
@@ -542,17 +542,17 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Oget_info3(fid, &root_oinfo, H5O_INFO_BASIC);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: H5Oget_info() failed.";
}
else {
if (H5Otoken_cmp(fid, &root_oinfo.token, &lnk_info.u.token, &token_cmp) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: H5Otoken_cmp() failed.";
}
if (token_cmp) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: root_oinfo.token != lnk_info.u.token";
}
}
@@ -567,7 +567,7 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
assert(2 == (u % 3));
if (H5L_TYPE_EXTERNAL != lnk_info.type) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: H5L_TYPE_EXTERNAL != lnk_info.type";
}
assert(H5L_TYPE_EXTERNAL == lnk_info.type);
@@ -575,34 +575,34 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
elinkval = malloc(lnk_info.u.val_size);
if (!elinkval) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: malloc of elinkval failed.";
}
assert(elinkval);
ret = H5Lget_val(gid, linkname, elinkval, lnk_info.u.val_size, H5P_DEFAULT);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: H5Lget_val() failed.";
}
assert(ret >= 0);
ret = H5Lunpack_elink_val(elinkval, lnk_info.u.val_size, NULL, &file, &path);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: H5Lunpack_elink_val() failed.";
}
- else if (0 != HDstrcmp(file, "external.h5")) {
- pass = FALSE;
- failure_mssg = "vrfy_ns_grp_c: 0 != HDstrcmp(file, \"external.h5\")";
+ else if (0 != strcmp(file, "external.h5")) {
+ pass = false;
+ failure_mssg = "vrfy_ns_grp_c: 0 != strcmp(file, \"external.h5\")";
}
- else if (0 != HDstrcmp(path, "/ext")) {
- pass = FALSE;
- failure_mssg = "vrfy_ns_grp_c: 0 != HDstrcmp(path, \"/ext\")";
+ else if (0 != strcmp(path, "/ext")) {
+ pass = false;
+ failure_mssg = "vrfy_ns_grp_c: 0 != strcmp(path, \"/ext\")";
}
assert(ret >= 0);
- assert(0 == HDstrcmp(file, "external.h5"));
- assert(0 == HDstrcmp(path, "/ext"));
+ assert(0 == strcmp(file, "external.h5"));
+ assert(0 == strcmp(path, "/ext"));
free(elinkval);
} /* end else */
@@ -614,7 +614,7 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Gclose(gid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: H5Gclose() failed.";
}
assert(ret >= 0);
@@ -630,7 +630,7 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* Return: void
@@ -641,8 +641,8 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
void
ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
{
- hid_t gid = -1;
- hid_t gcpl = -1;
+ hid_t gid = H5I_INVALID_HID;
+ hid_t gcpl = H5I_INVALID_HID;
unsigned max_compact;
unsigned u;
herr_t ret;
@@ -651,7 +651,7 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
gcpl = H5Pcreate(H5P_GROUP_CREATE);
if (gcpl <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_d: H5Pcreate() failed.";
}
assert(gcpl > 0);
@@ -661,7 +661,7 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Pset_link_creation_order(gcpl, H5P_CRT_ORDER_TRACKED);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_d: H5Pset_link_creation_order() failed.";
}
assert(ret >= 0);
@@ -671,7 +671,7 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
gid = H5Gcreate2(fid, group_name, H5P_DEFAULT, gcpl, H5P_DEFAULT);
if (gid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_d: H5Gcreate2() failed.";
}
assert(gid > 0);
@@ -682,11 +682,11 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Pget_link_phase_change(gcpl, &max_compact, NULL);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_d: H5Pget_link_phase_change() failed.";
}
else if (nlinks <= max_compact) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_d: nlinks <= max_compact";
}
assert(ret >= 0);
@@ -697,13 +697,13 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
while ((pass) && (u < nlinks)) {
char linkname[16];
- HDsnprintf(linkname, sizeof(linkname), "%u", u);
+ snprintf(linkname, sizeof(linkname), "%u", u);
if (0 == (u % 3)) {
ret = H5Lcreate_soft(group_name, gid, linkname, H5P_DEFAULT, H5P_DEFAULT);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_d: H5Lcreate_soft() failed.";
}
assert(ret >= 0);
@@ -712,7 +712,7 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Lcreate_hard(fid, "/", gid, linkname, H5P_DEFAULT, H5P_DEFAULT);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_d: H5Lcreate_hard() failed.";
}
assert(ret >= 0);
@@ -723,7 +723,7 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Lcreate_external("external.h5", "/ext", gid, linkname, H5P_DEFAULT, H5P_DEFAULT);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_d: H5Lcreate_external() failed.";
}
assert(ret >= 0);
@@ -736,7 +736,7 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Pclose(gcpl);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_d: H5Pclose() failed.";
}
assert(ret >= 0);
@@ -746,7 +746,7 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Gclose(gid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_d: H5Gclose() failed.";
}
assert(ret >= 0);
@@ -762,7 +762,7 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* Return: void
@@ -773,8 +773,8 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
void
vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
{
- hid_t gid = -1;
- hid_t gcpl = -1;
+ hid_t gid = H5I_INVALID_HID;
+ hid_t gcpl = H5I_INVALID_HID;
H5G_info_t grp_info;
unsigned crt_order_flags = 0;
unsigned u;
@@ -784,7 +784,7 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
gid = H5Gopen2(fid, group_name, H5P_DEFAULT);
if (gid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5Gopen2() failed.";
}
assert(gid > 0);
@@ -794,7 +794,7 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
gcpl = H5Gget_create_plist(gid);
if (gcpl <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5Gget_create_plist() failed.";
}
assert(gcpl > 0);
@@ -804,11 +804,11 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Pget_link_creation_order(gcpl, &crt_order_flags);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5Pget_link_creation_order() failed.";
}
else if (H5P_CRT_ORDER_TRACKED != crt_order_flags) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5P_CRT_ORDER_TRACKED != crt_order_flags";
}
assert(ret >= 0);
@@ -819,7 +819,7 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Pclose(gcpl);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5Pclose() failed.";
}
assert(ret >= 0);
@@ -830,30 +830,30 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Gget_info(gid, &grp_info);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5Gget_info() failed.";
}
else if (H5G_STORAGE_TYPE_DENSE != grp_info.storage_type) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5G_STORAGE_TYPE_DENSE != grp_info.storage_type";
}
else if (nlinks != grp_info.nlinks) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: nlinks != grp_info.nlinks";
}
else if (nlinks != grp_info.max_corder) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: nlinks != grp_info.max_corder";
}
- else if (FALSE != grp_info.mounted) {
- pass = FALSE;
- failure_mssg = "vrfy_ns_grp_d: FALSE != grp_info.mounted";
+ else if (false != grp_info.mounted) {
+ pass = false;
+ failure_mssg = "vrfy_ns_grp_d: false != grp_info.mounted";
}
assert(ret >= 0);
assert(H5G_STORAGE_TYPE_DENSE == grp_info.storage_type);
assert(nlinks == grp_info.nlinks);
assert(nlinks == grp_info.max_corder);
- assert(FALSE == grp_info.mounted);
+ assert(false == grp_info.mounted);
}
u = 0;
@@ -862,11 +862,11 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
char linkname[16];
htri_t link_exists;
- HDsnprintf(linkname, sizeof(linkname), "%u", u);
+ snprintf(linkname, sizeof(linkname), "%u", u);
link_exists = H5Lexists(gid, linkname, H5P_DEFAULT);
if (link_exists < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5Lexists() failed.";
}
assert(link_exists >= 0);
@@ -875,23 +875,23 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Lget_info2(gid, linkname, &lnk_info, H5P_DEFAULT);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5Lget_info() failed.";
}
- else if (TRUE != lnk_info.corder_valid) {
- pass = FALSE;
- failure_mssg = "vrfy_ns_grp_d: TRUE != lnk_info.corder_valid";
+ else if (true != lnk_info.corder_valid) {
+ pass = false;
+ failure_mssg = "vrfy_ns_grp_d: true != lnk_info.corder_valid";
}
else if (u != lnk_info.corder) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: u != lnk_info.corder";
}
else if (H5T_CSET_ASCII != lnk_info.cset) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5T_CSET_ASCII != lnk_info.cset";
}
assert(ret >= 0);
- assert(TRUE == lnk_info.corder_valid);
+ assert(true == lnk_info.corder_valid);
assert(u == lnk_info.corder);
assert(H5T_CSET_ASCII == lnk_info.cset);
@@ -899,35 +899,35 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
char *slinkval;
if (H5L_TYPE_SOFT != lnk_info.type) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5L_TYPE_SOFT != lnk_info.type";
}
- else if ((HDstrlen(group_name) + 1) != lnk_info.u.val_size) {
- pass = FALSE;
+ else if ((strlen(group_name) + 1) != lnk_info.u.val_size) {
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5L_TYPE_SOFT != lnk_info.type";
}
assert(H5L_TYPE_SOFT == lnk_info.type);
- assert((HDstrlen(group_name) + 1) == lnk_info.u.val_size);
+ assert((strlen(group_name) + 1) == lnk_info.u.val_size);
slinkval = (char *)malloc(lnk_info.u.val_size);
if (!slinkval) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: malloc of slinkval failed";
}
assert(slinkval);
ret = H5Lget_val(gid, linkname, slinkval, lnk_info.u.val_size, H5P_DEFAULT);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5Lget_val() failed";
}
- else if (0 != HDstrcmp(slinkval, group_name)) {
- pass = FALSE;
- failure_mssg = "vrfy_ns_grp_d: 0 != HDstrcmp(slinkval, group_name)";
+ else if (0 != strcmp(slinkval, group_name)) {
+ pass = false;
+ failure_mssg = "vrfy_ns_grp_d: 0 != strcmp(slinkval, group_name)";
}
assert(ret >= 0);
- assert(0 == HDstrcmp(slinkval, group_name));
+ assert(0 == strcmp(slinkval, group_name));
free(slinkval);
} /* end if */
@@ -936,7 +936,7 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
int token_cmp = 0;
if (H5L_TYPE_HARD != lnk_info.type) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5L_TYPE_HARD != lnk_info.type";
}
assert(H5L_TYPE_HARD == lnk_info.type);
@@ -944,17 +944,17 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
memset(&root_oinfo, 0, sizeof(root_oinfo));
ret = H5Oget_info3(fid, &root_oinfo, H5O_INFO_BASIC);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5Oget_info() failed.";
}
else {
if (H5Otoken_cmp(fid, &root_oinfo.token, &lnk_info.u.token, &token_cmp) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5Otoken_cmp() failed.";
}
if (token_cmp) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: root_oinfo.token != lnk_info.u.token";
}
}
@@ -969,7 +969,7 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
assert(2 == (u % 3));
if (H5L_TYPE_EXTERNAL != lnk_info.type) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5L_TYPE_EXTERNAL != lnk_info.type";
}
assert(H5L_TYPE_EXTERNAL == lnk_info.type);
@@ -977,34 +977,34 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
elinkval = malloc(lnk_info.u.val_size);
if (!elinkval) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: malloc of elinkval failed.";
}
assert(elinkval);
ret = H5Lget_val(gid, linkname, elinkval, lnk_info.u.val_size, H5P_DEFAULT);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5Lget_val failed.";
}
assert(ret >= 0);
ret = H5Lunpack_elink_val(elinkval, lnk_info.u.val_size, NULL, &file, &path);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5Lunpack_elink_val failed.";
}
- else if (0 != HDstrcmp(file, "external.h5")) {
- pass = FALSE;
- failure_mssg = "vrfy_ns_grp_d: 0 != HDstrcmp(file, \"external.h5\").";
+ else if (0 != strcmp(file, "external.h5")) {
+ pass = false;
+ failure_mssg = "vrfy_ns_grp_d: 0 != strcmp(file, \"external.h5\").";
}
- else if (0 != HDstrcmp(path, "/ext")) {
- pass = FALSE;
- failure_mssg = "vrfy_ns_grp_d: 0 != HDstrcmp(path, \"/ext\")";
+ else if (0 != strcmp(path, "/ext")) {
+ pass = false;
+ failure_mssg = "vrfy_ns_grp_d: 0 != strcmp(path, \"/ext\")";
}
assert(ret >= 0);
- assert(0 == HDstrcmp(file, "external.h5"));
- assert(0 == HDstrcmp(path, "/ext"));
+ assert(0 == strcmp(file, "external.h5"));
+ assert(0 == strcmp(path, "/ext"));
free(elinkval);
} /* end else */
@@ -1016,7 +1016,7 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Gclose(gid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5Gclose() failed.";
}
assert(ret >= 0);
@@ -1031,7 +1031,7 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* Return: void
@@ -1042,8 +1042,8 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
void
os_grp_0(hid_t fid, const char *group_name)
{
- hid_t gid = -1;
- hid_t fapl = -1;
+ hid_t gid = H5I_INVALID_HID;
+ hid_t fapl = H5I_INVALID_HID;
H5F_libver_t low = H5F_LIBVER_ERROR, high = H5F_LIBVER_ERROR;
herr_t ret;
@@ -1051,7 +1051,7 @@ os_grp_0(hid_t fid, const char *group_name)
if (pass) { /* get the file's file access property list */
fapl = H5Fget_access_plist(fid);
if (fapl <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "os_grp_0: H5Fget_access_plist() failed.";
}
assert(fapl > 0);
@@ -1060,7 +1060,7 @@ os_grp_0(hid_t fid, const char *group_name)
if (pass) { /* get low and high bounds from fapl */
ret = H5Pget_libver_bounds(fapl, &low, &high);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "os_grp_0: H5Pget_libver_bounds() failed(1).";
}
assert(ret >= 0);
@@ -1070,7 +1070,7 @@ os_grp_0(hid_t fid, const char *group_name)
if (low >= H5F_LIBVER_V18) {
ret = H5Fset_libver_bounds(fid, H5F_LIBVER_EARLIEST, high);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "os_grp_0: H5Fset_libver_bounds() failed(1).";
}
assert(ret >= 0);
@@ -1080,7 +1080,7 @@ os_grp_0(hid_t fid, const char *group_name)
if (pass) {
gid = H5Gcreate2(fid, group_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "os_grp_0: H5Gcreate2() failed.";
}
assert(gid > 0);
@@ -1090,7 +1090,7 @@ os_grp_0(hid_t fid, const char *group_name)
ret = H5Gclose(gid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "os_grp_0: H5Gclose() failed.";
}
assert(ret >= 0);
@@ -1100,7 +1100,7 @@ os_grp_0(hid_t fid, const char *group_name)
if (low >= H5F_LIBVER_V18) {
ret = H5Fset_libver_bounds(fid, low, high);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "os_grp_0: H5Fset_libver_bounds() failed(1).";
}
assert(ret >= 0);
@@ -1116,7 +1116,7 @@ os_grp_0(hid_t fid, const char *group_name)
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* Return: void
@@ -1127,8 +1127,8 @@ os_grp_0(hid_t fid, const char *group_name)
void
vrfy_os_grp_0(hid_t fid, const char *group_name)
{
- hid_t gid = -1;
- hid_t gcpl = -1;
+ hid_t gid = H5I_INVALID_HID;
+ hid_t gcpl = H5I_INVALID_HID;
H5G_info_t grp_info;
unsigned crt_order_flags = 0;
herr_t ret;
@@ -1137,7 +1137,7 @@ vrfy_os_grp_0(hid_t fid, const char *group_name)
gid = H5Gopen2(fid, group_name, H5P_DEFAULT);
if (gid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_0: H5Gopen2() failed.";
}
assert(gid > 0);
@@ -1147,7 +1147,7 @@ vrfy_os_grp_0(hid_t fid, const char *group_name)
gcpl = H5Gget_create_plist(gid);
if (gcpl <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_0: H5Gget_create_plist() failed.";
}
assert(gcpl > 0);
@@ -1158,11 +1158,11 @@ vrfy_os_grp_0(hid_t fid, const char *group_name)
ret = H5Pget_link_creation_order(gcpl, &crt_order_flags);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_0: H5Pget_link_creation_order() failed";
}
else if (0 != crt_order_flags) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_0: 0 != crt_order_flags";
}
assert(ret >= 0);
@@ -1173,7 +1173,7 @@ vrfy_os_grp_0(hid_t fid, const char *group_name)
ret = H5Pclose(gcpl);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_0: H5Pclose() failed.";
}
assert(ret >= 0);
@@ -1184,37 +1184,37 @@ vrfy_os_grp_0(hid_t fid, const char *group_name)
ret = H5Gget_info(gid, &grp_info);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_0: H5Gget_info() failed.";
}
else if (H5G_STORAGE_TYPE_SYMBOL_TABLE != grp_info.storage_type) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_0: H5G_STORAGE_TYPE_SYMBOL_TABLE != grp_info.storage_type";
}
else if (0 != grp_info.nlinks) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_0: 0 != grp_info.nlinks";
}
else if (0 != grp_info.max_corder) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_0: 0 != grp_info.max_corder";
}
- else if (FALSE != grp_info.mounted) {
- pass = FALSE;
- failure_mssg = "vrfy_os_grp_0: FALSE != grp_info.mounted";
+ else if (false != grp_info.mounted) {
+ pass = false;
+ failure_mssg = "vrfy_os_grp_0: false != grp_info.mounted";
}
assert(ret >= 0);
assert(H5G_STORAGE_TYPE_SYMBOL_TABLE == grp_info.storage_type);
assert(0 == grp_info.nlinks);
assert(0 == grp_info.max_corder);
- assert(FALSE == grp_info.mounted);
+ assert(false == grp_info.mounted);
}
if (pass) {
ret = H5Gclose(gid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_0: H5Gclose() failed.";
}
assert(ret >= 0);
@@ -1230,7 +1230,7 @@ vrfy_os_grp_0(hid_t fid, const char *group_name)
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* Return: void
@@ -1241,16 +1241,16 @@ vrfy_os_grp_0(hid_t fid, const char *group_name)
void
os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
{
- hid_t gid = -1;
+ hid_t gid = H5I_INVALID_HID;
unsigned u;
- hid_t fapl = -1;
+ hid_t fapl = H5I_INVALID_HID;
H5F_libver_t low = H5F_LIBVER_ERROR, high = H5F_LIBVER_ERROR;
herr_t ret;
if (pass) { /* get the file's file access property list */
fapl = H5Fget_access_plist(fid);
if (fapl <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "os_grp_n: H5Fget_access_plist() failed.";
}
assert(fapl > 0);
@@ -1259,7 +1259,7 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
if (pass) { /* get low and high bounds from fapl */
ret = H5Pget_libver_bounds(fapl, &low, &high);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "os_grp_0: H5Pget_libver_bounds() failed(1).";
}
assert(ret >= 0);
@@ -1269,7 +1269,7 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
if (low >= H5F_LIBVER_V18) {
ret = H5Fset_libver_bounds(fid, H5F_LIBVER_EARLIEST, high);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "os_grp_0: H5Fset_libver_bounds() failed(1).";
}
assert(ret >= 0);
@@ -1279,7 +1279,7 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
if (pass) {
gid = H5Gcreate2(fid, group_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "os_grp_n: H5Gcreate2() failed.";
}
assert(gid > 0);
@@ -1291,12 +1291,12 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
while ((pass) && (u < nlinks)) {
char linkname[32];
- HDsnprintf(linkname, sizeof(linkname), "ln%d_%u", proc_num, u);
+ snprintf(linkname, sizeof(linkname), "ln%d_%u", proc_num, u);
if (0 == (u % 2)) {
ret = H5Lcreate_soft(group_name, gid, linkname, H5P_DEFAULT, H5P_DEFAULT);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "os_grp_n: H5Lcreate_soft() failed.";
}
assert(ret >= 0);
@@ -1306,7 +1306,7 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
ret = H5Lcreate_hard(fid, "/", gid, linkname, H5P_DEFAULT, H5P_DEFAULT);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "os_grp_n: H5Lcreate_hard() failed.";
}
assert(ret >= 0);
@@ -1319,7 +1319,7 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
ret = H5Gclose(gid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "os_grp_n: H5Gclose() failed.";
}
assert(ret >= 0);
@@ -1329,7 +1329,7 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
if (low >= H5F_LIBVER_V18) {
ret = H5Fset_libver_bounds(fid, low, high);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "os_grp_n: H5Fset_libver_bounds() failed(2).";
}
assert(ret >= 0);
@@ -1346,7 +1346,7 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* Return: void
@@ -1356,8 +1356,8 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
void
vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
{
- hid_t gid = -1;
- hid_t gcpl = -1;
+ hid_t gid = H5I_INVALID_HID;
+ hid_t gcpl = H5I_INVALID_HID;
H5G_info_t grp_info;
unsigned crt_order_flags = 0;
unsigned u;
@@ -1367,7 +1367,7 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
gid = H5Gopen2(fid, group_name, H5P_DEFAULT);
if (gid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: H5Gopen2() failed";
}
assert(gid > 0);
@@ -1377,7 +1377,7 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
gcpl = H5Gget_create_plist(gid);
if (gcpl <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: H5Gget_create_plist() failed";
}
assert(gcpl > 0);
@@ -1387,11 +1387,11 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
ret = H5Pget_link_creation_order(gcpl, &crt_order_flags);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: H5Pget_link_creation_order";
}
else if (0 != crt_order_flags) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: 0 != crt_order_flags";
}
assert(ret >= 0);
@@ -1402,7 +1402,7 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
ret = H5Pclose(gcpl);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: H5Pclose() failed";
}
assert(ret >= 0);
@@ -1414,30 +1414,30 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
ret = H5Gget_info(gid, &grp_info);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: H5Gget_info() failed";
}
else if (H5G_STORAGE_TYPE_SYMBOL_TABLE != grp_info.storage_type) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: H5G_STORAGE_TYPE_SYMBOL_TABLE != grp_info.storage_type";
}
else if (nlinks != grp_info.nlinks) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: nlinks != grp_info.nlinks";
}
else if (0 != grp_info.max_corder) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: 0 != grp_info.max_corder";
}
- else if (FALSE != grp_info.mounted) {
- pass = FALSE;
- failure_mssg = "vrfy_os_grp_n: FALSE != grp_info.mounted";
+ else if (false != grp_info.mounted) {
+ pass = false;
+ failure_mssg = "vrfy_os_grp_n: false != grp_info.mounted";
}
assert(ret >= 0);
assert(H5G_STORAGE_TYPE_SYMBOL_TABLE == grp_info.storage_type);
assert(nlinks == grp_info.nlinks);
assert(0 == grp_info.max_corder);
- assert(FALSE == grp_info.mounted);
+ assert(false == grp_info.mounted);
}
u = 0;
@@ -1446,11 +1446,11 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
char linkname[32];
htri_t link_exists;
- HDsnprintf(linkname, sizeof(linkname), "ln%d_%u", proc_num, u);
+ snprintf(linkname, sizeof(linkname), "ln%d_%u", proc_num, u);
link_exists = H5Lexists(gid, linkname, H5P_DEFAULT);
if (link_exists < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: H5Lexists() failed";
}
assert(link_exists >= 0);
@@ -1459,39 +1459,39 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
ret = H5Lget_info2(gid, linkname, &lnk_info, H5P_DEFAULT);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: H5Lget_info() failed";
}
- else if (FALSE != lnk_info.corder_valid) {
- pass = FALSE;
- failure_mssg = "vrfy_os_grp_n: FALSE != lnk_info.corder_valid";
+ else if (false != lnk_info.corder_valid) {
+ pass = false;
+ failure_mssg = "vrfy_os_grp_n: false != lnk_info.corder_valid";
}
else if (H5T_CSET_ASCII != lnk_info.cset) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: H5T_CSET_ASCII != lnk_info.cset";
}
assert(ret >= 0);
- assert(FALSE == lnk_info.corder_valid);
+ assert(false == lnk_info.corder_valid);
assert(H5T_CSET_ASCII == lnk_info.cset);
if (0 == (u % 2)) {
char *slinkval;
if (H5L_TYPE_SOFT != lnk_info.type) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: H5L_TYPE_SOFT != lnk_info.type";
}
- else if ((HDstrlen(group_name) + 1) != lnk_info.u.val_size) {
- pass = FALSE;
- failure_mssg = "vrfy_os_grp_n: (HDstrlen(group_name) + 1) != lnk_info.u.val_size";
+ else if ((strlen(group_name) + 1) != lnk_info.u.val_size) {
+ pass = false;
+ failure_mssg = "vrfy_os_grp_n: (strlen(group_name) + 1) != lnk_info.u.val_size";
}
assert(H5L_TYPE_SOFT == lnk_info.type);
- assert((HDstrlen(group_name) + 1) == lnk_info.u.val_size);
+ assert((strlen(group_name) + 1) == lnk_info.u.val_size);
slinkval = (char *)malloc(lnk_info.u.val_size);
if (!slinkval) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: malloc of slinkval failed";
}
assert(slinkval);
@@ -1499,15 +1499,15 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
ret = H5Lget_val(gid, linkname, slinkval, lnk_info.u.val_size, H5P_DEFAULT);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: H5Lget_val() failed";
}
- else if (0 != HDstrcmp(slinkval, group_name)) {
- pass = FALSE;
- failure_mssg = "vrfy_os_grp_n: 0 != HDstrcmp(slinkval, group_name)";
+ else if (0 != strcmp(slinkval, group_name)) {
+ pass = false;
+ failure_mssg = "vrfy_os_grp_n: 0 != strcmp(slinkval, group_name)";
}
assert(ret >= 0);
- assert(0 == HDstrcmp(slinkval, group_name));
+ assert(0 == strcmp(slinkval, group_name));
free(slinkval);
} /* end if */
@@ -1518,7 +1518,7 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
assert(1 == (u % 2));
if (H5L_TYPE_HARD != lnk_info.type) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: H5L_TYPE_HARD != lnk_info.type";
}
assert(H5L_TYPE_HARD == lnk_info.type);
@@ -1527,17 +1527,17 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
ret = H5Oget_info3(fid, &root_oinfo, H5O_INFO_BASIC);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: H5Oget_info() failed.";
}
else {
if (H5Otoken_cmp(fid, &root_oinfo.token, &lnk_info.u.token, &token_cmp) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: H5Otoken_cmp() failed.";
}
if (token_cmp) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: root_oinfo.token != lnk_info.u.token";
}
}
@@ -1552,7 +1552,7 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
ret = H5Gclose(gid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: H5Gclose() failed.";
}
assert(ret >= 0);
@@ -1569,7 +1569,7 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* Return: void
@@ -1577,12 +1577,12 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
*-------------------------------------------------------------------------
*/
void
-ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
+ds_ctg_i(hid_t fid, const char *dset_name, bool write_data)
{
int *wdata = NULL;
unsigned u;
- hid_t dsid = -1;
- hid_t sid = -1;
+ hid_t dsid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
hsize_t dims[1] = {DSET_DIMS};
herr_t ret;
@@ -1590,7 +1590,7 @@ ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
sid = H5Screate_simple(1, dims, NULL);
if (sid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_ctg_i: H5Screate_simple() failed";
}
assert(sid > 0);
@@ -1600,7 +1600,7 @@ ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
dsid = H5Dcreate2(fid, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (dsid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_ctg_i: H5Dcreate2() failed";
}
assert(dsid > 0);
@@ -1610,7 +1610,7 @@ ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Sclose(sid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_ctg_i: H5Sclose() failed";
}
assert(ret >= 0);
@@ -1620,7 +1620,7 @@ ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
wdata = (int *)malloc(sizeof(int) * DSET_DIMS);
if (!wdata) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_ctg_i: malloc of wdata failed.";
}
assert(wdata);
@@ -1633,7 +1633,7 @@ ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Dwrite(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_ctg_i: H5Dwrite() failed.";
}
assert(ret >= 0);
@@ -1645,7 +1645,7 @@ ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Dclose(dsid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_ctg_i: H5Dclose() failed";
}
assert(ret >= 0);
@@ -1661,7 +1661,7 @@ ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* Return: void
@@ -1669,14 +1669,14 @@ ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
*-------------------------------------------------------------------------
*/
void
-vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
+vrfy_ds_ctg_i(hid_t fid, const char *dset_name, bool write_data)
{
int *rdata = NULL;
unsigned u;
- hid_t dsid = -1;
- hid_t sid = -1;
- hid_t tid = -1;
- hid_t dcpl = -1;
+ hid_t dsid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
H5D_space_status_t allocation;
H5D_layout_t layout;
int ndims;
@@ -1688,7 +1688,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
dsid = H5Dopen2(fid, dset_name, H5P_DEFAULT);
if (dsid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: H5Dopen2() failed.";
}
assert(dsid > 0);
@@ -1698,7 +1698,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
sid = H5Dget_space(dsid);
if (sid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: H5Dget_space() failed.";
}
assert(sid > 0);
@@ -1708,7 +1708,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
ndims = H5Sget_simple_extent_ndims(sid);
if (1 != ndims) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: 1 != ndims";
}
assert(1 == ndims);
@@ -1718,15 +1718,15 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Sget_simple_extent_dims(sid, dims, max_dims);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: H5Sget_simple_extent_dims() failed";
}
else if (DSET_DIMS != dims[0]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: DSET_DIMS != dims[0]";
}
else if (DSET_DIMS != max_dims[0]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: DSET_DIMS != max_dims[0]";
}
assert(ret >= 0);
@@ -1738,7 +1738,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Sclose(sid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: H5Sclose() failed.";
}
assert(ret >= 0);
@@ -1748,7 +1748,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
tid = H5Dget_type(dsid);
if (tid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: H5Dget_type() failed.";
}
assert(tid > 0);
@@ -1758,7 +1758,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
type_equal = H5Tequal(tid, H5T_NATIVE_INT);
if (1 != type_equal) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: type not H5T_NATIVE_INT";
}
assert(1 == type_equal);
@@ -1768,7 +1768,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Tclose(tid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: H5Tclose() failed.";
}
assert(ret >= 0);
@@ -1778,15 +1778,15 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Dget_space_status(dsid, &allocation);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: H5Dget_space_status() failed.";
}
else if (write_data && (allocation != H5D_SPACE_STATUS_ALLOCATED)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: write_data && allocation != H5D_SPACE_STATUS_ALLOCATED";
}
else if (!write_data && (allocation != H5D_SPACE_STATUS_NOT_ALLOCATED)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: !write_data && allocation != H5D_SPACE_STATUS_NOT_ALLOCATED";
}
assert(ret >= 0);
@@ -1798,7 +1798,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
dcpl = H5Dget_create_plist(dsid);
if (dcpl <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: H5Dget_create_plist() failed.";
}
assert(dcpl > 0);
@@ -1808,7 +1808,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
layout = H5Pget_layout(dcpl);
if (H5D_CONTIGUOUS != layout) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: H5D_CONTIGUOUS != layout";
}
assert(H5D_CONTIGUOUS == layout);
@@ -1818,7 +1818,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Pclose(dcpl);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: H5Pclose() failed.";
}
assert(ret >= 0);
@@ -1828,7 +1828,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
rdata = (int *)malloc(sizeof(int) * DSET_DIMS);
if (!rdata) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: malloc of rdata failed.";
}
assert(rdata);
@@ -1837,7 +1837,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
if ((pass) && (write_data)) {
ret = H5Dread(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: H5Dread() failed.";
}
assert(ret >= 0);
@@ -1846,7 +1846,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
if ((pass) && (write_data)) {
for (u = 0; u < DSET_DIMS; u++) {
if ((int)u != rdata[u]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: u != rdata[u].";
break;
}
@@ -1860,7 +1860,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Dclose(dsid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: H5Dclose() failed";
}
assert(ret >= 0);
@@ -1877,7 +1877,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* Return: void
@@ -1885,13 +1885,13 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
*-------------------------------------------------------------------------
*/
void
-ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
+ds_chk_i(hid_t fid, const char *dset_name, bool write_data)
{
int *wdata = NULL;
unsigned u;
- hid_t dsid = -1;
- hid_t dcpl = -1;
- hid_t sid = -1;
+ hid_t dsid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
hsize_t dims[1] = {DSET_DIMS};
hsize_t chunk_dims[1] = {DSET_CHUNK_DIMS};
herr_t ret;
@@ -1900,7 +1900,7 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
sid = H5Screate_simple(1, dims, NULL);
if (sid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_chk_i: H5Screate_simple() failed.";
}
assert(sid > 0);
@@ -1910,7 +1910,7 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
dcpl = H5Pcreate(H5P_DATASET_CREATE);
if (dcpl <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_chk_i: H5Pcreate() failed.";
}
assert(dcpl > 0);
@@ -1920,7 +1920,7 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Pset_chunk(dcpl, 1, chunk_dims);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_chk_i: H5Pset_chunk() failed.";
}
assert(ret >= 0);
@@ -1930,7 +1930,7 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
dsid = H5Dcreate2(fid, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT);
if (dsid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_chk_i: H5Dcreate2() failed";
}
assert(dsid > 0);
@@ -1940,7 +1940,7 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Pclose(dcpl);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_chk_i: H5Pclose() failed.";
}
assert(ret >= 0);
@@ -1950,7 +1950,7 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Sclose(sid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_chk_i: H5Sclose() failed.";
}
assert(ret >= 0);
@@ -1960,7 +1960,7 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
wdata = (int *)malloc(sizeof(int) * DSET_DIMS);
if (!wdata) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_chk_i: malloc of wdata failed.";
}
assert(wdata);
@@ -1972,7 +1972,7 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Dwrite(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_chk_i: H5Dwrite() failed.";
}
assert(ret >= 0);
@@ -1983,7 +1983,7 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Dclose(dsid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_chk_i: H5Dclose() failed.";
}
assert(ret >= 0);
@@ -1999,7 +1999,7 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* Return: void
@@ -2007,14 +2007,14 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
*-------------------------------------------------------------------------
*/
void
-vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
+vrfy_ds_chk_i(hid_t fid, const char *dset_name, bool write_data)
{
int *rdata = NULL;
unsigned u;
- hid_t dsid = -1;
- hid_t sid = -1;
- hid_t tid = -1;
- hid_t dcpl = -1;
+ hid_t dsid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
H5D_space_status_t allocation;
H5D_layout_t layout;
int ndims;
@@ -2026,7 +2026,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
dsid = H5Dopen2(fid, dset_name, H5P_DEFAULT);
if (dsid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: H5Dopen2() failed.";
}
assert(dsid > 0);
@@ -2036,7 +2036,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
sid = H5Dget_space(dsid);
if (sid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: H5Dget_space() failed.";
}
assert(sid > 0);
@@ -2046,7 +2046,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
ndims = H5Sget_simple_extent_ndims(sid);
if (1 != ndims) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: 1 != ndims";
}
assert(1 == ndims);
@@ -2056,15 +2056,15 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Sget_simple_extent_dims(sid, dims, max_dims);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: H5Sget_simple_extent_dims() failed";
}
else if (DSET_DIMS != dims[0]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: DSET_DIMS != dims[0]";
}
else if (DSET_DIMS != max_dims[0]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: DSET_DIMS != max_dims[0]";
}
assert(ret >= 0);
@@ -2076,7 +2076,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Sclose(sid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: H5Sclose() failed.";
}
assert(ret >= 0);
@@ -2086,7 +2086,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
tid = H5Dget_type(dsid);
if (tid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: H5Dget_type() failed.";
}
assert(tid > 0);
@@ -2096,7 +2096,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
type_equal = H5Tequal(tid, H5T_NATIVE_INT);
if (1 != type_equal) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: tid != H5T_NATIVE_INT";
}
assert(1 == type_equal);
@@ -2106,7 +2106,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Tclose(tid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: H5Tclose() failed.";
}
assert(ret >= 0);
@@ -2116,15 +2116,15 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Dget_space_status(dsid, &allocation);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: H5Dget_space_status() failed.";
}
else if (write_data && (allocation != H5D_SPACE_STATUS_ALLOCATED)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: write_data && allocation != H5D_SPACE_STATUS_ALLOCATED";
}
else if (!write_data && (allocation != H5D_SPACE_STATUS_NOT_ALLOCATED)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: !write_data && allocation != H5D_SPACE_STATUS_NOT_ALLOCATED";
}
assert(ret >= 0);
@@ -2136,7 +2136,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
dcpl = H5Dget_create_plist(dsid);
if (dcpl <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: H5Dget_create_plist() failed.";
}
assert(dcpl > 0);
@@ -2146,7 +2146,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
layout = H5Pget_layout(dcpl);
if (H5D_CHUNKED != layout) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: H5D_CHUNKED != layout";
}
assert(H5D_CHUNKED == layout);
@@ -2156,11 +2156,11 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Pget_chunk(dcpl, 1, chunk_dims);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: H5Pget_chunk";
}
else if (DSET_CHUNK_DIMS != chunk_dims[0]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: ";
}
assert(ret >= 0);
@@ -2171,7 +2171,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Pclose(dcpl);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: H5Pclose() failed.";
}
assert(ret >= 0);
@@ -2181,7 +2181,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
rdata = (int *)malloc(sizeof(int) * DSET_DIMS);
if (!rdata) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: malloc of rdata failed.";
}
assert(rdata);
@@ -2190,7 +2190,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
if ((pass) && (write_data)) {
ret = H5Dread(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: H5Dread() failed.";
}
assert(ret >= 0);
@@ -2199,7 +2199,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
if ((pass) && (write_data)) {
for (u = 0; u < DSET_DIMS; u++) {
if ((int)u != rdata[u]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: u != rdata[u]";
break;
}
@@ -2213,7 +2213,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Dclose(dsid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: H5Dclose() failed.";
}
assert(ret >= 0);
@@ -2230,7 +2230,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* Return: void
@@ -2238,13 +2238,13 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
*-------------------------------------------------------------------------
*/
void
-ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
+ds_cpt_i(hid_t fid, const char *dset_name, bool write_data)
{
int *wdata = NULL;
unsigned u;
- hid_t dsid = -1;
- hid_t dcpl = -1;
- hid_t sid = -1;
+ hid_t dsid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
hsize_t dims[1] = {DSET_COMPACT_DIMS};
herr_t ret;
@@ -2252,7 +2252,7 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
sid = H5Screate_simple(1, dims, NULL);
if (sid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_cpt_i: H5Screate_simple() failed.";
}
assert(sid > 0);
@@ -2262,7 +2262,7 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
dcpl = H5Pcreate(H5P_DATASET_CREATE);
if (dcpl <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_cpt_i: H5Pcreate() failed.";
}
assert(dcpl > 0);
@@ -2272,7 +2272,7 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Pset_layout(dcpl, H5D_COMPACT);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_cpt_i: H5Pset_layout() failed.";
}
assert(ret >= 0);
@@ -2282,7 +2282,7 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
dsid = H5Dcreate2(fid, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT);
if (dsid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_cpt_i: H5Dcreate2() failed.";
}
assert(dsid > 0);
@@ -2292,7 +2292,7 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Pclose(dcpl);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_cpt_i: H5Pclose() failed.";
}
assert(ret >= 0);
@@ -2302,7 +2302,7 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Sclose(sid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_cpt_i: H5Sclose() failed.";
}
assert(ret >= 0);
@@ -2312,7 +2312,7 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
wdata = (int *)malloc(sizeof(int) * DSET_COMPACT_DIMS);
if (!wdata) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_cpt_i: malloc of wdata failed.";
}
assert(wdata);
@@ -2325,7 +2325,7 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Dwrite(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_cpt_i: H5Dwrite() failed.";
}
assert(ret >= 0);
@@ -2337,7 +2337,7 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Dclose(dsid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_cpt_i: H5Dclose() failed.";
}
assert(ret >= 0);
@@ -2353,7 +2353,7 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* Return: void
@@ -2361,14 +2361,14 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
*-------------------------------------------------------------------------
*/
void
-vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
+vrfy_ds_cpt_i(hid_t fid, const char *dset_name, bool write_data)
{
int *rdata = NULL;
unsigned u;
- hid_t dsid = -1;
- hid_t sid = -1;
- hid_t tid = -1;
- hid_t dcpl = -1;
+ hid_t dsid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
H5D_space_status_t allocation;
H5D_layout_t layout;
int ndims;
@@ -2380,7 +2380,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
dsid = H5Dopen2(fid, dset_name, H5P_DEFAULT);
if (dsid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_cpt_i: H5Dopen2() failed.";
}
assert(dsid > 0);
@@ -2390,7 +2390,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
sid = H5Dget_space(dsid);
if (sid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_cpt_i: H5Dget_space() failed.";
}
assert(sid > 0);
@@ -2400,7 +2400,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
ndims = H5Sget_simple_extent_ndims(sid);
if (1 != ndims) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_cpt_i: 1 != ndims";
}
assert(1 == ndims);
@@ -2410,15 +2410,15 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Sget_simple_extent_dims(sid, dims, max_dims);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_cpt_i: H5Sget_simple_extent_dims() failed";
}
else if (DSET_COMPACT_DIMS != dims[0]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_cpt_i: DSET_COMPACT_DIMS != dims[0]";
}
else if (DSET_COMPACT_DIMS != max_dims[0]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_cpt_i: DSET_COMPACT_DIMS != max_dims[0]";
}
assert(ret >= 0);
@@ -2430,7 +2430,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Sclose(sid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_cpt_i: H5Sclose() failed.";
}
assert(ret >= 0);
@@ -2440,7 +2440,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
tid = H5Dget_type(dsid);
if (tid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_cpt_i: H5Dget_type() failed.";
}
assert(tid > 0);
@@ -2450,7 +2450,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
type_equal = H5Tequal(tid, H5T_NATIVE_INT);
if (1 != type_equal) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_cpt_i: type != H5T_NATIVE_INT";
}
assert(1 == type_equal);
@@ -2460,7 +2460,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Tclose(tid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_cpt_i: H5Tclose() failed.";
}
assert(ret >= 0);
@@ -2470,11 +2470,11 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Dget_space_status(dsid, &allocation);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_cpt_i: H5Dget_space_status() failed.";
}
else if (H5D_SPACE_STATUS_ALLOCATED != allocation) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_cpt_i: H5D_SPACE_STATUS_ALLOCATED != allocation";
}
assert(ret >= 0);
@@ -2485,7 +2485,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
dcpl = H5Dget_create_plist(dsid);
if (dcpl <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_cpt_i: H5Dget_create_plist() failed.";
}
assert(dcpl > 0);
@@ -2495,7 +2495,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
layout = H5Pget_layout(dcpl);
if (H5D_COMPACT != layout) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_cpt_i: H5D_COMPACT != layout";
}
assert(H5D_COMPACT == layout);
@@ -2505,7 +2505,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Pclose(dcpl);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_cpt_i: H5Pclose() failed.";
}
assert(ret >= 0);
@@ -2515,7 +2515,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
rdata = (int *)malloc(sizeof(int) * DSET_COMPACT_DIMS);
if (!rdata) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_cpt_i: malloc of rdata failed.";
}
assert(rdata);
@@ -2524,7 +2524,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
if ((pass) && (write_data)) {
ret = H5Dread(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_cpt_i: H5Dread() failed.";
}
assert(ret >= 0);
@@ -2533,7 +2533,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
if ((pass) && (write_data)) {
for (u = 0; u < DSET_COMPACT_DIMS; u++) {
if ((int)u != rdata[u]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_cpt_i: (int)u != rdata[u]";
break;
}
@@ -2547,7 +2547,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Dclose(dsid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_cpt_i: H5Dclose() failed.";
}
assert(ret >= 0);
@@ -2564,7 +2564,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* Return: void
@@ -2572,11 +2572,11 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
*-------------------------------------------------------------------------
*/
void
-ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
+ds_ctg_v(hid_t fid, const char *dset_name, bool write_data)
{
- hid_t dsid = -1;
- hid_t sid = -1;
- hid_t tid = -1;
+ hid_t dsid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
hsize_t dims[1] = {DSET_SMALL_DIMS};
herr_t ret;
hvl_t *wdata = NULL;
@@ -2586,7 +2586,7 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
sid = H5Screate_simple(1, dims, NULL);
if (sid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_ctg_v: H5Screate_simple";
}
assert(sid > 0);
@@ -2596,7 +2596,7 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
tid = H5Tvlen_create(H5T_NATIVE_INT);
if (tid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_ctg_v: H5Tvlen_create() failed.";
}
assert(tid > 0);
@@ -2606,7 +2606,7 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
dsid = H5Dcreate2(fid, dset_name, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (dsid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_ctg_v: H5Dcreate2() failed.";
}
assert(dsid > 0);
@@ -2616,7 +2616,7 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
wdata = (hvl_t *)malloc(sizeof(hvl_t) * DSET_SMALL_DIMS);
if (!wdata) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_ctg_v: malloc of wdata failed.";
}
assert(wdata);
@@ -2632,7 +2632,7 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
tdata = (int *)malloc(sizeof(int) * len);
if (!tdata) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_ctg_v: malloc of tdata failed.";
break;
}
@@ -2650,7 +2650,7 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Dwrite(dsid, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_ctg_v: H5Dwrite() failed.";
}
assert(ret >= 0);
@@ -2660,7 +2660,7 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Treclaim(tid, sid, H5P_DEFAULT, wdata);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_ctg_v: H5Treclaim() failed.";
}
assert(ret >= 0);
@@ -2672,7 +2672,7 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Sclose(sid);
if (sid < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_ctg_v: H5Sclose() failed.";
}
assert(ret >= 0);
@@ -2682,7 +2682,7 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Tclose(tid);
if (tid < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_ctg_v: H5Tclose() failed.";
}
assert(ret >= 0);
@@ -2692,7 +2692,7 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Dclose(dsid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_ctg_v: H5Dclose() failed.";
}
assert(ret >= 0);
@@ -2708,7 +2708,7 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* Return: void
@@ -2716,13 +2716,13 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
*-------------------------------------------------------------------------
*/
void
-vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
+vrfy_ds_ctg_v(hid_t fid, const char *dset_name, bool write_data)
{
- hid_t dsid = -1;
- hid_t sid = -1;
- hid_t tid = -1;
- hid_t tmp_tid = -1;
- hid_t dcpl = -1;
+ hid_t dsid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ hid_t tmp_tid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
H5D_space_status_t allocation;
H5D_layout_t layout;
int ndims;
@@ -2736,7 +2736,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
dsid = H5Dopen2(fid, dset_name, H5P_DEFAULT);
if (dsid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: H5Dopen2() failed.";
}
assert(dsid > 0);
@@ -2746,7 +2746,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
sid = H5Dget_space(dsid);
if (sid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: H5Dget_space() failed";
}
assert(sid > 0);
@@ -2756,7 +2756,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
ndims = H5Sget_simple_extent_ndims(sid);
if (1 != ndims) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: 1 != ndims";
}
assert(1 == ndims);
@@ -2766,15 +2766,15 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Sget_simple_extent_dims(sid, dims, max_dims);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: H5Sget_simple_extent_dims() failed.";
}
else if (DSET_SMALL_DIMS != dims[0]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: DSET_SMALL_DIMS != dims[0]";
}
else if (DSET_SMALL_DIMS != max_dims[0]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: DSET_SMALL_DIMS != max_dims[0]";
}
assert(ret >= 0);
@@ -2786,7 +2786,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
tid = H5Dget_type(dsid);
if (tid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: H5Dget_type() failed.";
}
assert(tid > 0);
@@ -2796,7 +2796,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
tmp_tid = H5Tvlen_create(H5T_NATIVE_INT);
if (tmp_tid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: H5Tvlen_create() failed.";
}
assert(tmp_tid > 0);
@@ -2806,7 +2806,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
type_equal = H5Tequal(tid, tmp_tid);
if (1 != type_equal) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: type != vlen H5T_NATIVE_INT";
}
assert(1 == type_equal);
@@ -2816,7 +2816,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Tclose(tmp_tid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: H5Tclose() failed.";
}
assert(ret >= 0);
@@ -2826,15 +2826,15 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Dget_space_status(dsid, &allocation);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: H5Dget_space_status() failed";
}
else if (write_data && (allocation != H5D_SPACE_STATUS_ALLOCATED)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: write_data && allocation != H5D_SPACE_STATUS_ALLOCATED";
}
else if (!write_data && (allocation != H5D_SPACE_STATUS_NOT_ALLOCATED)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: !write_data && allocation != H5D_SPACE_STATUS_NOT_ALLOCATED";
}
assert(ret >= 0);
@@ -2846,7 +2846,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
dcpl = H5Dget_create_plist(dsid);
if (dcpl <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: H5Dget_create_plist() failed.";
}
assert(dcpl > 0);
@@ -2856,7 +2856,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
layout = H5Pget_layout(dcpl);
if (H5D_CONTIGUOUS != layout) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: H5D_CONTIGUOUS != layout";
}
assert(H5D_CONTIGUOUS == layout);
@@ -2866,7 +2866,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Pclose(dcpl);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: H5Pclose() failed.";
}
assert(ret >= 0);
@@ -2876,7 +2876,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
rdata = (hvl_t *)malloc(sizeof(hvl_t) * DSET_SMALL_DIMS);
if (!rdata) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: malloc of rdata failed.";
}
assert(rdata);
@@ -2886,7 +2886,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Dread(dsid, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: H5Dread() failed.";
}
assert(ret >= 0);
@@ -2902,12 +2902,12 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
int *tdata = (int *)rdata[u].p;
if (!tdata) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: !tdata";
break;
}
else if ((int)(u + v) != tdata[v]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: (int)(u + v) != tdata[v]";
break;
}
@@ -2921,7 +2921,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Treclaim(tid, sid, H5P_DEFAULT, rdata);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: H5Treclaim() failed.";
}
assert(ret >= 0);
@@ -2933,7 +2933,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Sclose(sid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: H5Sclose() failed.";
}
assert(ret >= 0);
@@ -2943,7 +2943,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Tclose(tid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: H5Tclose() failed.";
}
assert(ret >= 0);
@@ -2953,7 +2953,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Dclose(dsid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: H5Dclose() failed.";
}
assert(ret >= 0);
@@ -2971,7 +2971,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* This function was initially created to assist in testing
@@ -2996,27 +2996,27 @@ create_zoo(hid_t fid, const char *base_path, int proc_num)
/* Add & verify an empty "new style" group */
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/A", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/A", base_path);
+ assert(strlen(full_path) < 1024);
ns_grp_0(fid, full_path);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/A", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/A", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_ns_grp_0(fid, full_path);
}
/* Add & verify a compact "new style" group (3 link messages) */
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/B", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/B", base_path);
+ assert(strlen(full_path) < 1024);
ns_grp_c(fid, full_path, 3);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/B", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/B", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_ns_grp_c(fid, full_path, 3);
}
@@ -3024,27 +3024,27 @@ create_zoo(hid_t fid, const char *base_path, int proc_num)
* fractal heap)
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/C", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/C", base_path);
+ assert(strlen(full_path) < 1024);
ns_grp_d(fid, full_path, 300);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/C", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/C", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_ns_grp_d(fid, full_path, 300);
}
/* Add & verify an empty "old style" group to file */
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/D", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/D", base_path);
+ assert(strlen(full_path) < 1024);
os_grp_0(fid, full_path);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/D", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/D", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_os_grp_0(fid, full_path);
}
@@ -3052,14 +3052,14 @@ create_zoo(hid_t fid, const char *base_path, int proc_num)
* local heap) to file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/E", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/E", base_path);
+ assert(strlen(full_path) < 1024);
os_grp_n(fid, full_path, proc_num, 300);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/E", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/E", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_os_grp_n(fid, full_path, proc_num, 300);
}
@@ -3067,120 +3067,120 @@ create_zoo(hid_t fid, const char *base_path, int proc_num)
* to file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/F", base_path);
- assert(HDstrlen(full_path) < 1024);
- ds_ctg_i(fid, full_path, FALSE);
+ snprintf(full_path, sizeof(full_path), "%s/F", base_path);
+ assert(strlen(full_path) < 1024);
+ ds_ctg_i(fid, full_path, false);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/F", base_path);
- assert(HDstrlen(full_path) < 1024);
- vrfy_ds_ctg_i(fid, full_path, FALSE);
+ snprintf(full_path, sizeof(full_path), "%s/F", base_path);
+ assert(strlen(full_path) < 1024);
+ vrfy_ds_ctg_i(fid, full_path, false);
}
/* Add & verify a contiguous dataset w/integer datatype (with data)
* to file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/G", base_path);
- assert(HDstrlen(full_path) < 1024);
- ds_ctg_i(fid, full_path, TRUE);
+ snprintf(full_path, sizeof(full_path), "%s/G", base_path);
+ assert(strlen(full_path) < 1024);
+ ds_ctg_i(fid, full_path, true);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/G", base_path);
- assert(HDstrlen(full_path) < 1024);
- vrfy_ds_ctg_i(fid, full_path, TRUE);
+ snprintf(full_path, sizeof(full_path), "%s/G", base_path);
+ assert(strlen(full_path) < 1024);
+ vrfy_ds_ctg_i(fid, full_path, true);
}
/* Add & verify a chunked dataset w/integer datatype (but no data)
* to file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/H", base_path);
- assert(HDstrlen(full_path) < 1024);
- ds_chk_i(fid, full_path, FALSE);
+ snprintf(full_path, sizeof(full_path), "%s/H", base_path);
+ assert(strlen(full_path) < 1024);
+ ds_chk_i(fid, full_path, false);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/H", base_path);
- assert(HDstrlen(full_path) < 1024);
- vrfy_ds_chk_i(fid, full_path, FALSE);
+ snprintf(full_path, sizeof(full_path), "%s/H", base_path);
+ assert(strlen(full_path) < 1024);
+ vrfy_ds_chk_i(fid, full_path, false);
}
/* Add & verify a chunked dataset w/integer datatype (and data)
* to file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/I", base_path);
- assert(HDstrlen(full_path) < 1024);
- ds_chk_i(fid, full_path, TRUE);
+ snprintf(full_path, sizeof(full_path), "%s/I", base_path);
+ assert(strlen(full_path) < 1024);
+ ds_chk_i(fid, full_path, true);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/I", base_path);
- assert(HDstrlen(full_path) < 1024);
- vrfy_ds_chk_i(fid, full_path, TRUE);
+ snprintf(full_path, sizeof(full_path), "%s/I", base_path);
+ assert(strlen(full_path) < 1024);
+ vrfy_ds_chk_i(fid, full_path, true);
}
/* Add & verify a compact dataset w/integer datatype (but no data)
* to file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/J", base_path);
- assert(HDstrlen(full_path) < 1024);
- ds_cpt_i(fid, full_path, FALSE);
+ snprintf(full_path, sizeof(full_path), "%s/J", base_path);
+ assert(strlen(full_path) < 1024);
+ ds_cpt_i(fid, full_path, false);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/J", base_path);
- assert(HDstrlen(full_path) < 1024);
- vrfy_ds_cpt_i(fid, full_path, FALSE);
+ snprintf(full_path, sizeof(full_path), "%s/J", base_path);
+ assert(strlen(full_path) < 1024);
+ vrfy_ds_cpt_i(fid, full_path, false);
}
/* Add & verify a compact dataset w/integer datatype (and data)
* to file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/K", base_path);
- assert(HDstrlen(full_path) < 1024);
- ds_cpt_i(fid, full_path, TRUE);
+ snprintf(full_path, sizeof(full_path), "%s/K", base_path);
+ assert(strlen(full_path) < 1024);
+ ds_cpt_i(fid, full_path, true);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/K", base_path);
- assert(HDstrlen(full_path) < 1024);
- vrfy_ds_cpt_i(fid, full_path, TRUE);
+ snprintf(full_path, sizeof(full_path), "%s/K", base_path);
+ assert(strlen(full_path) < 1024);
+ vrfy_ds_cpt_i(fid, full_path, true);
}
/* Add & verify a contiguous dataset w/variable-length datatype
* (but no data) to file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/L", base_path);
- assert(HDstrlen(full_path) < 1024);
- ds_ctg_v(fid, full_path, FALSE);
+ snprintf(full_path, sizeof(full_path), "%s/L", base_path);
+ assert(strlen(full_path) < 1024);
+ ds_ctg_v(fid, full_path, false);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/L", base_path);
- assert(HDstrlen(full_path) < 1024);
- vrfy_ds_ctg_v(fid, full_path, FALSE);
+ snprintf(full_path, sizeof(full_path), "%s/L", base_path);
+ assert(strlen(full_path) < 1024);
+ vrfy_ds_ctg_v(fid, full_path, false);
}
/* Add & verify a contiguous dataset w/variable-length datatype
* (and data) to file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/M", base_path);
- assert(HDstrlen(full_path) < 1024);
- ds_ctg_v(fid, full_path, TRUE);
+ snprintf(full_path, sizeof(full_path), "%s/M", base_path);
+ assert(strlen(full_path) < 1024);
+ ds_ctg_v(fid, full_path, true);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/M", base_path);
- assert(HDstrlen(full_path) < 1024);
- vrfy_ds_ctg_v(fid, full_path, TRUE);
+ snprintf(full_path, sizeof(full_path), "%s/M", base_path);
+ assert(strlen(full_path) < 1024);
+ vrfy_ds_ctg_v(fid, full_path, true);
}
} /* create_zoo() */
@@ -3193,7 +3193,7 @@ create_zoo(hid_t fid, const char *base_path, int proc_num)
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* This function was initially created to assist in testing
@@ -3218,15 +3218,15 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num)
/* validate an empty "new style" group */
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/A", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/A", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_ns_grp_0(fid, full_path);
}
/* validate a compact "new style" group (3 link messages) */
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/B", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/B", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_ns_grp_c(fid, full_path, 3);
}
@@ -3234,15 +3234,15 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num)
* fractal heap)
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/C", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/C", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_ns_grp_d(fid, full_path, 300);
}
/* validate an empty "old style" group in file */
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/D", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/D", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_os_grp_0(fid, full_path);
}
@@ -3250,8 +3250,8 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num)
* local heap)
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/E", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/E", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_os_grp_n(fid, full_path, proc_num, 300);
}
@@ -3259,72 +3259,72 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num)
* in file.
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/F", base_path);
- assert(HDstrlen(full_path) < 1024);
- vrfy_ds_ctg_i(fid, full_path, FALSE);
+ snprintf(full_path, sizeof(full_path), "%s/F", base_path);
+ assert(strlen(full_path) < 1024);
+ vrfy_ds_ctg_i(fid, full_path, false);
}
/* validate a contiguous dataset w/integer datatype (with data)
* in file.
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/G", base_path);
- assert(HDstrlen(full_path) < 1024);
- vrfy_ds_ctg_i(fid, full_path, TRUE);
+ snprintf(full_path, sizeof(full_path), "%s/G", base_path);
+ assert(strlen(full_path) < 1024);
+ vrfy_ds_ctg_i(fid, full_path, true);
}
/* validate a chunked dataset w/integer datatype (but no data)
* in file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/H", base_path);
- assert(HDstrlen(full_path) < 1024);
- vrfy_ds_chk_i(fid, full_path, FALSE);
+ snprintf(full_path, sizeof(full_path), "%s/H", base_path);
+ assert(strlen(full_path) < 1024);
+ vrfy_ds_chk_i(fid, full_path, false);
}
/* validate a chunked dataset w/integer datatype (and data)
* in file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/I", base_path);
- assert(HDstrlen(full_path) < 1024);
- vrfy_ds_chk_i(fid, full_path, TRUE);
+ snprintf(full_path, sizeof(full_path), "%s/I", base_path);
+ assert(strlen(full_path) < 1024);
+ vrfy_ds_chk_i(fid, full_path, true);
}
/* Validate a compact dataset w/integer datatype (but no data)
* in file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/J", base_path);
- assert(HDstrlen(full_path) < 1024);
- vrfy_ds_cpt_i(fid, full_path, FALSE);
+ snprintf(full_path, sizeof(full_path), "%s/J", base_path);
+ assert(strlen(full_path) < 1024);
+ vrfy_ds_cpt_i(fid, full_path, false);
}
/* validate a compact dataset w/integer datatype (and data)
* in file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/K", base_path);
- assert(HDstrlen(full_path) < 1024);
- vrfy_ds_cpt_i(fid, full_path, TRUE);
+ snprintf(full_path, sizeof(full_path), "%s/K", base_path);
+ assert(strlen(full_path) < 1024);
+ vrfy_ds_cpt_i(fid, full_path, true);
}
/* validate a contiguous dataset w/variable-length datatype
* (but no data) to file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/L", base_path);
- assert(HDstrlen(full_path) < 1024);
- vrfy_ds_ctg_v(fid, full_path, FALSE);
+ snprintf(full_path, sizeof(full_path), "%s/L", base_path);
+ assert(strlen(full_path) < 1024);
+ vrfy_ds_ctg_v(fid, full_path, false);
}
/* validate a contiguous dataset w/variable-length datatype
* (and data) to file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/M", base_path);
- assert(HDstrlen(full_path) < 1024);
- vrfy_ds_ctg_v(fid, full_path, TRUE);
+ snprintf(full_path, sizeof(full_path), "%s/M", base_path);
+ assert(strlen(full_path) < 1024);
+ vrfy_ds_ctg_v(fid, full_path, true);
}
} /* validate_zoo() */
diff --git a/test/genall5.h b/test/genall5.h
index bd365d7fb79..e299c83e29d 100644
--- a/test/genall5.h
+++ b/test/genall5.h
@@ -33,14 +33,14 @@ void vrfy_os_grp_0(hid_t fid, const char *group_name);
void os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks);
void vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks);
-void ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data);
-void vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data);
+void ds_ctg_i(hid_t fid, const char *dset_name, bool write_data);
+void vrfy_ds_ctg_i(hid_t fid, const char *dset_name, bool write_data);
-void ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data);
-void vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data);
+void ds_chk_i(hid_t fid, const char *dset_name, bool write_data);
+void vrfy_ds_chk_i(hid_t fid, const char *dset_name, bool write_data);
-void ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data);
-void vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data);
+void ds_cpt_i(hid_t fid, const char *dset_name, bool write_data);
+void vrfy_ds_cpt_i(hid_t fid, const char *dset_name, bool write_data);
-void ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data);
-void vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data);
+void ds_ctg_v(hid_t fid, const char *dset_name, bool write_data);
+void vrfy_ds_ctg_v(hid_t fid, const char *dset_name, bool write_data);
diff --git a/test/getname.c b/test/getname.c
index 12f85d04d0d..6802ae365c6 100644
--- a/test/getname.c
+++ b/test/getname.c
@@ -64,15 +64,15 @@ check_name(hid_t id, const char *chk_name, const char *chk_user_path)
TEST_ERROR;
/* Check on name from H5Iget_name() */
- if (HDstrcmp(name, chk_name) != 0)
+ if (strcmp(name, chk_name) != 0)
goto error;
/* Check on user path */
- if (HDstrcmp(user_path, chk_user_path) != 0)
+ if (strcmp(user_path, chk_user_path) != 0)
goto error;
/* Check that if user path is hidden, the name from H5Iget_name() and the user path should be different */
- if (user_path_hidden && !HDstrcmp(chk_name, chk_user_path))
+ if (user_path_hidden && !strcmp(chk_name, chk_user_path))
TEST_ERROR;
/* Everything matches */
@@ -1435,7 +1435,7 @@ test_main(hid_t file_id, hid_t fapl)
/* Check that name is longer */
if (name_len <= SMALL_NAME_BUF_SIZE)
TEST_ERROR;
- if (HDstrcmp(name2, "/") != 0)
+ if (strcmp(name2, "/") != 0)
TEST_ERROR;
}
@@ -1477,7 +1477,7 @@ test_main(hid_t file_id, hid_t fapl)
TEST_ERROR;
/* Verify */
- if (HDstrcmp(name3, "/g17") != 0)
+ if (strcmp(name3, "/g17") != 0)
TEST_ERROR;
*name3 = '\0';
@@ -1487,7 +1487,7 @@ test_main(hid_t file_id, hid_t fapl)
TEST_ERROR;
/* Verify */
- if (HDstrcmp(name3, "/g") != 0)
+ if (strcmp(name3, "/g") != 0)
TEST_ERROR;
free(name3);
@@ -3306,7 +3306,7 @@ test_obj_ref(hid_t fapl)
namelen = H5Iget_name(dataset2, (char *)buf, sizeof(buf));
if (H5Dclose(dataset2) < 0)
FAIL_STACK_ERROR;
- if (!((HDstrcmp(buf, "/Dataset3") == 0) && (namelen == 9)))
+ if (!((strcmp(buf, "/Dataset3") == 0) && (namelen == 9)))
TEST_ERROR;
*buf = '\0';
@@ -3320,7 +3320,7 @@ test_obj_ref(hid_t fapl)
TEST_ERROR;
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[0], (char *)buf, sizeof(buf));
- if (!((HDstrcmp(buf, "/Dataset3") == 0) && (namelen == 9)))
+ if (!((strcmp(buf, "/Dataset3") == 0) && (namelen == 9)))
TEST_ERROR;
PASSED();
@@ -3332,11 +3332,11 @@ test_obj_ref(hid_t fapl)
namelen = H5Iget_name(dataset2, (char *)buf, sizeof(buf));
if (H5Dclose(dataset2) < 0)
FAIL_STACK_ERROR;
- if (!((HDstrcmp(buf, "/Group1/Dataset2") == 0) && (namelen == 16)))
+ if (!((strcmp(buf, "/Group1/Dataset2") == 0) && (namelen == 16)))
TEST_ERROR;
*buf = '\0';
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[1], (char *)buf, sizeof(buf));
- if (!((HDstrcmp(buf, "/Group1/Dataset2") == 0) && (namelen == 16)))
+ if (!((strcmp(buf, "/Group1/Dataset2") == 0) && (namelen == 16)))
TEST_ERROR;
PASSED();
@@ -3348,11 +3348,11 @@ test_obj_ref(hid_t fapl)
namelen = H5Iget_name(group, (char *)buf, sizeof(buf));
if (H5Gclose(group) < 0)
FAIL_STACK_ERROR;
- if (!((HDstrcmp(buf, "/Group1") == 0) && (namelen == 7)))
+ if (!((strcmp(buf, "/Group1") == 0) && (namelen == 7)))
TEST_ERROR;
*buf = '\0';
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[2], (char *)buf, sizeof(buf));
- if (!((HDstrcmp(buf, "/Group1") == 0) && (namelen == 7)))
+ if (!((strcmp(buf, "/Group1") == 0) && (namelen == 7)))
TEST_ERROR;
PASSED();
@@ -3364,11 +3364,11 @@ test_obj_ref(hid_t fapl)
namelen = H5Iget_name(tid1, (char *)buf, sizeof(buf));
if (H5Tclose(tid1) < 0)
FAIL_STACK_ERROR;
- if (!((HDstrcmp(buf, "/Group1/Datatype1") == 0) && (namelen == 17)))
+ if (!((strcmp(buf, "/Group1/Datatype1") == 0) && (namelen == 17)))
TEST_ERROR;
*buf = '\0';
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[3], (char *)buf, sizeof(buf));
- if (!((HDstrcmp(buf, "/Group1/Datatype1") == 0) && (namelen == 17)))
+ if (!((strcmp(buf, "/Group1/Datatype1") == 0) && (namelen == 17)))
TEST_ERROR;
PASSED();
@@ -3380,11 +3380,11 @@ test_obj_ref(hid_t fapl)
namelen = H5Iget_name(dataset2, (char *)buf, sizeof(buf));
if (H5Dclose(dataset2) < 0)
FAIL_STACK_ERROR;
- if (!((HDstrcmp(buf, "/Group1/Group2/Dataset4") == 0) && (namelen == 23)))
+ if (!((strcmp(buf, "/Group1/Group2/Dataset4") == 0) && (namelen == 23)))
TEST_ERROR;
*buf = '\0';
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[4], (char *)buf, sizeof(buf));
- if (!((HDstrcmp(buf, "/Group1/Group2/Dataset4") == 0) && (namelen == 23)))
+ if (!((strcmp(buf, "/Group1/Group2/Dataset4") == 0) && (namelen == 23)))
TEST_ERROR;
PASSED();
@@ -3396,11 +3396,11 @@ test_obj_ref(hid_t fapl)
namelen = H5Iget_name(group, (char *)buf, sizeof(buf));
if (H5Gclose(group) < 0)
FAIL_STACK_ERROR;
- if (!((HDstrcmp(buf, "/Group1/Group2") == 0) && (namelen == 14)))
+ if (!((strcmp(buf, "/Group1/Group2") == 0) && (namelen == 14)))
TEST_ERROR;
*buf = '\0';
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[5], (char *)buf, sizeof(buf));
- if (!((HDstrcmp(buf, "/Group1/Group2") == 0) && (namelen == 14)))
+ if (!((strcmp(buf, "/Group1/Group2") == 0) && (namelen == 14)))
TEST_ERROR;
PASSED();
@@ -3412,11 +3412,11 @@ test_obj_ref(hid_t fapl)
namelen = H5Iget_name(dataset2, (char *)buf, sizeof(buf));
if (H5Dclose(dataset2) < 0)
FAIL_STACK_ERROR;
- if (!((HDstrcmp(buf, "/Group1/Dataset5") == 0) && (namelen == 16)))
+ if (!((strcmp(buf, "/Group1/Dataset5") == 0) && (namelen == 16)))
TEST_ERROR;
*buf = '\0';
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[6], (char *)buf, sizeof(buf));
- if (!((HDstrcmp(buf, "/Group1/Dataset5") == 0) && (namelen == 16)))
+ if (!((strcmp(buf, "/Group1/Dataset5") == 0) && (namelen == 16)))
TEST_ERROR;
PASSED();
@@ -3428,11 +3428,11 @@ test_obj_ref(hid_t fapl)
namelen = H5Iget_name(group, (char *)buf, sizeof(buf));
if (H5Gclose(group) < 0)
FAIL_STACK_ERROR;
- if (!((HDstrcmp(buf, "/") == 0) && (namelen == 1)))
+ if (!((strcmp(buf, "/") == 0) && (namelen == 1)))
TEST_ERROR;
*buf = '\0';
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[7], (char *)buf, sizeof(buf));
- if (!((HDstrcmp(buf, "/") == 0) && (namelen == 1)))
+ if (!((strcmp(buf, "/") == 0) && (namelen == 1)))
TEST_ERROR;
PASSED();
@@ -3600,7 +3600,7 @@ test_reg_ref(hid_t fapl)
TEST_ERROR;
name_size1 = H5Rget_name(dsetr_id, H5R_DATASET_REGION, &ref_out[0], (char *)buf1, NAME_BUF_SIZE);
- if (!((HDstrcmp(buf1, "/MATRIX") == 0) && (name_size1 == 7)))
+ if (!((strcmp(buf1, "/MATRIX") == 0) && (name_size1 == 7)))
TEST_ERROR;
PASSED();
@@ -3612,7 +3612,7 @@ test_reg_ref(hid_t fapl)
/* Get name of the dataset the first region reference points using H5Iget_name */
*buf2 = '\0';
name_size2 = H5Iget_name(dsetv_id, (char *)buf2, NAME_BUF_SIZE);
- if (!((HDstrcmp(buf2, "/MATRIX") == 0) && (name_size2 == 7)))
+ if (!((strcmp(buf2, "/MATRIX") == 0) && (name_size2 == 7)))
TEST_ERROR;
if (H5Dclose(dsetv_id) < 0)
@@ -3624,7 +3624,7 @@ test_reg_ref(hid_t fapl)
TESTING("H5Rget_name to get name from region reference(pnt selec)");
*buf1 = '\0';
name_size1 = H5Rget_name(dsetr_id, H5R_DATASET_REGION, &ref_out[1], (char *)buf1, NAME_BUF_SIZE);
- if (!((HDstrcmp(buf1, "/MATRIX") == 0) && (name_size1 == 7)))
+ if (!((strcmp(buf1, "/MATRIX") == 0) && (name_size1 == 7)))
TEST_ERROR;
PASSED();
@@ -3637,7 +3637,7 @@ test_reg_ref(hid_t fapl)
/* Get name of the dataset the first region reference points using H5Iget_name */
*buf2 = '\0';
name_size2 = H5Iget_name(dsetv_id, (char *)buf2, NAME_BUF_SIZE);
- if (!((HDstrcmp(buf2, "/MATRIX") == 0) && (name_size2 == 7)))
+ if (!((strcmp(buf2, "/MATRIX") == 0) && (name_size2 == 7)))
TEST_ERROR;
if (H5Dclose(dsetv_id) < 0)
@@ -3676,7 +3676,7 @@ test_elinks(hid_t fapl)
hid_t group, group2; /* Group IDs */
char name[NAME_BUF_SIZE]; /* Buffer for storing object's name */
ssize_t namelen; /* Length of object's name */
- hbool_t name_cached; /* Indicate if name is cached */
+ bool name_cached; /* Indicate if name is cached */
/* Initialize the file names */
h5_fixname(FILENAME[1], fapl, filename1, sizeof filename1);
@@ -3711,9 +3711,9 @@ test_elinks(hid_t fapl)
/* Query the external link object's name */
*name = '\0';
- name_cached = FALSE;
+ name_cached = false;
namelen = H5I__get_name_test(group, (char *)name, sizeof(name), &name_cached);
- if (!((HDstrcmp(name, "/Group2") == 0) && (namelen == 7) && name_cached))
+ if (!((strcmp(name, "/Group2") == 0) && (namelen == 7) && name_cached))
TEST_ERROR;
/* Close Group */
@@ -3726,9 +3726,9 @@ test_elinks(hid_t fapl)
/* Query the external link to external link object's name */
*name = '\0';
- name_cached = FALSE;
+ name_cached = false;
namelen = H5I__get_name_test(group, (char *)name, sizeof(name), &name_cached);
- if (!((HDstrcmp(name, "/Group2") == 0) && (namelen == 7) && name_cached))
+ if (!((strcmp(name, "/Group2") == 0) && (namelen == 7) && name_cached))
TEST_ERROR;
/* Close Group */
@@ -3750,11 +3750,11 @@ test_elinks(hid_t fapl)
int
main(void)
{
- hid_t file_id = (-1);
- int nerrors = 0;
- hid_t fapl;
- char filename0[1024];
- hbool_t driver_is_parallel;
+ hid_t file_id = (H5I_INVALID_HID);
+ int nerrors = 0;
+ hid_t fapl;
+ char filename0[1024];
+ bool driver_is_parallel;
/* Reset the library and get the file access property list */
h5_reset();
@@ -3788,7 +3788,7 @@ main(void)
if (nerrors)
goto error;
- HDputs("All getname tests passed.");
+ puts("All getname tests passed.");
h5_cleanup(FILENAME, fapl);
@@ -3801,7 +3801,7 @@ main(void)
}
H5E_END_TRY
- HDputs("***** GET NAME TESTS FAILED *****");
+ puts("***** GET NAME TESTS FAILED *****");
return 1;
}
diff --git a/test/gheap.c b/test/gheap.c
index 714ba277941..782c80c8288 100644
--- a/test/gheap.c
+++ b/test/gheap.c
@@ -38,9 +38,9 @@
nerrors++; \
if (nerrors <= GHEAP_REPEATED_ERR_LIM) { \
H5_FAILED(); \
- HDputs(MSG); \
+ puts(MSG); \
if (nerrors == GHEAP_REPEATED_ERR_LIM) \
- HDputs(" Suppressing further errors..."); \
+ puts(" Suppressing further errors..."); \
} /* end if */ \
} while (0) /* end GHEAP_REPEATED_ERR */
@@ -84,7 +84,7 @@ test_1(hid_t fapl)
goto error;
if (NULL == (f = (H5F_t *)H5VL_object(file))) {
H5_FAILED();
- HDputs(" Unable to create file");
+ puts(" Unable to create file");
goto error;
}
@@ -100,12 +100,12 @@ test_1(hid_t fapl)
status = H5HG_insert(f, size, out, obj + u);
if (status < 0) {
H5_FAILED();
- HDputs(" Unable to insert object into global heap");
+ puts(" Unable to insert object into global heap");
nerrors++;
}
else if (u && H5_addr_gt(obj[u - 1].addr, obj[u].addr)) {
H5_FAILED();
- HDputs(" Collection addresses are not monotonically increasing");
+ puts(" Collection addresses are not monotonically increasing");
nerrors++;
}
}
@@ -119,12 +119,12 @@ test_1(hid_t fapl)
H5Eclear2(H5E_DEFAULT);
if (NULL == H5HG_read(f, obj + u, in, NULL)) {
H5_FAILED();
- HDputs(" Unable to read object");
+ puts(" Unable to read object");
nerrors++;
}
else if (memcmp(in, out, size) != 0) {
H5_FAILED();
- HDputs(" Value read doesn't match value written");
+ puts(" Value read doesn't match value written");
nerrors++;
}
}
@@ -189,7 +189,7 @@ test_2(hid_t fapl)
goto error;
if (NULL == (f = (H5F_t *)H5VL_object(file))) {
H5_FAILED();
- HDputs(" Unable to create file");
+ puts(" Unable to create file");
goto error;
}
@@ -202,7 +202,7 @@ test_2(hid_t fapl)
H5Eclear2(H5E_DEFAULT);
if (H5HG_insert(f, size, out, obj + u) < 0) {
H5_FAILED();
- HDputs(" Unable to insert object into global heap");
+ puts(" Unable to insert object into global heap");
nerrors++;
}
}
@@ -216,12 +216,12 @@ test_2(hid_t fapl)
H5Eclear2(H5E_DEFAULT);
if (NULL == H5HG_read(f, obj + u, in, NULL)) {
H5_FAILED();
- HDputs(" Unable to read object");
+ puts(" Unable to read object");
nerrors++;
}
else if (memcmp(in, out, size) != 0) {
H5_FAILED();
- HDputs(" Value read doesn't match value written");
+ puts(" Value read doesn't match value written");
nerrors++;
}
}
@@ -286,7 +286,7 @@ test_3(hid_t fapl)
goto error;
if (NULL == (f = (H5F_t *)H5VL_object(file))) {
H5_FAILED();
- HDputs(" Unable to create file");
+ puts(" Unable to create file");
goto error;
}
@@ -298,7 +298,7 @@ test_3(hid_t fapl)
status = H5HG_insert(f, size, out, obj + u);
if (status < 0) {
H5_FAILED();
- HDputs(" Unable to insert object into global heap");
+ puts(" Unable to insert object into global heap");
nerrors++;
}
}
@@ -308,7 +308,7 @@ test_3(hid_t fapl)
status = H5HG_remove(f, obj + u);
if (status < 0) {
H5_FAILED();
- HDputs(" Unable to remove object");
+ puts(" Unable to remove object");
nerrors++;
}
}
@@ -374,7 +374,7 @@ test_4(hid_t fapl)
goto error;
if (NULL == (f = (H5F_t *)H5VL_object(file))) {
H5_FAILED();
- HDputs(" Unable to create file");
+ puts(" Unable to create file");
goto error;
}
@@ -386,7 +386,7 @@ test_4(hid_t fapl)
status = H5HG_insert(f, size, out, obj + u);
if (status < 0) {
H5_FAILED();
- HDputs(" Unable to insert object into global heap");
+ puts(" Unable to insert object into global heap");
nerrors++;
}
@@ -399,7 +399,7 @@ test_4(hid_t fapl)
status = H5HG_remove(f, obj + u - 1);
if (status < 0) {
H5_FAILED();
- HDputs(" Unable to remove object");
+ puts(" Unable to remove object");
nerrors++;
}
memset(obj + u - 1, 0, sizeof *obj);
@@ -465,7 +465,7 @@ test_ooo_indices(hid_t fapl)
goto error;
if (NULL == (f = (H5F_t *)H5VL_object(file))) {
H5_FAILED();
- HDputs(" Unable to create file");
+ puts(" Unable to create file");
goto error;
}
@@ -509,7 +509,7 @@ test_ooo_indices(hid_t fapl)
goto error;
if (NULL == (f = (H5F_t *)H5VL_object(file))) {
H5_FAILED();
- HDputs(" Unable to open file");
+ puts(" Unable to open file");
goto error;
} /* end if */
@@ -519,7 +519,7 @@ test_ooo_indices(hid_t fapl)
goto error;
if (i != j) {
H5_FAILED();
- HDputs(" Incorrect read value");
+ puts(" Incorrect read value");
goto error;
}
}
@@ -557,9 +557,9 @@ test_ooo_indices(hid_t fapl)
int
main(void)
{
- int nerrors = 0;
- hid_t fapl_id = H5I_INVALID_HID;
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ int nerrors = 0;
+ hid_t fapl_id = H5I_INVALID_HID;
+ bool api_ctx_pushed = false; /* Whether API context pushed */
h5_reset();
if ((fapl_id = h5_fileaccess()) < 0)
@@ -568,7 +568,7 @@ main(void)
/* Push API context */
if (H5CX_push() < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
nerrors += test_1(fapl_id);
nerrors += test_2(fapl_id);
@@ -582,12 +582,12 @@ main(void)
if (nerrors)
goto error;
- HDputs("All global heap tests passed.");
+ puts("All global heap tests passed.");
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
h5_cleanup(FILENAME, fapl_id);
exit(EXIT_SUCCESS);
@@ -600,8 +600,8 @@ main(void)
H5E_END_TRY
if (api_ctx_pushed)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
exit(EXIT_FAILURE);
} /* end main() */
diff --git a/test/h5test.c b/test/h5test.c
index 0628643a4a6..04820880885 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -118,7 +118,7 @@ uint64_t vol_cap_flags_g = H5VL_CAP_FLAG_NONE;
static herr_t h5_errors(hid_t estack, void *client_data);
static char *h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fullname,
- size_t size, hbool_t nest_printf, hbool_t subst_for_superblock);
+ size_t size, bool nest_printf, bool subst_for_superblock);
/*-------------------------------------------------------------------------
* Function: h5_errors
@@ -361,7 +361,7 @@ h5_test_init(void)
char *
h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size)
{
- return (h5_fixname_real(base_name, fapl, ".h5", fullname, size, FALSE, FALSE));
+ return (h5_fixname_real(base_name, fapl, ".h5", fullname, size, false, false));
}
/*-------------------------------------------------------------------------
@@ -383,7 +383,7 @@ h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size)
char *
h5_fixname_superblock(const char *base_name, hid_t fapl_id, char *fullname, size_t size)
{
- return (h5_fixname_real(base_name, fapl_id, ".h5", fullname, size, FALSE, TRUE));
+ return (h5_fixname_real(base_name, fapl_id, ".h5", fullname, size, false, true));
}
/*-------------------------------------------------------------------------
@@ -402,7 +402,7 @@ h5_fixname_superblock(const char *base_name, hid_t fapl_id, char *fullname, size
char *
h5_fixname_no_suffix(const char *base_name, hid_t fapl, char *fullname, size_t size)
{
- return (h5_fixname_real(base_name, fapl, NULL, fullname, size, FALSE, FALSE));
+ return (h5_fixname_real(base_name, fapl, NULL, fullname, size, false, false));
}
/*-------------------------------------------------------------------------
@@ -424,7 +424,7 @@ h5_fixname_no_suffix(const char *base_name, hid_t fapl, char *fullname, size_t s
char *
h5_fixname_printf(const char *base_name, hid_t fapl, char *fullname, size_t size)
{
- return (h5_fixname_real(base_name, fapl, ".h5", fullname, size, TRUE, FALSE));
+ return (h5_fixname_real(base_name, fapl, ".h5", fullname, size, true, false));
}
/*-------------------------------------------------------------------------
@@ -448,14 +448,14 @@ h5_fixname_printf(const char *base_name, hid_t fapl, char *fullname, size_t size
*/
static char *
h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fullname, size_t size,
- hbool_t nest_printf, hbool_t subst_for_superblock)
+ bool nest_printf, bool subst_for_superblock)
{
const char *prefix = NULL;
const char *driver_env_var = NULL; /* HDF5_DRIVER environment variable */
char *ptr, last = '\0';
const char *suffix = _suffix;
size_t i, j;
- hid_t driver = -1;
+ hid_t driver = H5I_INVALID_HID;
int isppdriver = 0; /* if the driver is MPI parallel */
if (!base_name || !fullname || size < 1)
@@ -466,7 +466,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
/* Determine if driver is set by environment variable. If it is,
* only generate a suffix if fixing the filename for the superblock
* file. */
- driver_env_var = HDgetenv(HDF5_DRIVER);
+ driver_env_var = getenv(HDF5_DRIVER);
if (driver_env_var && (H5P_DEFAULT == fapl) && subst_for_superblock)
fapl = H5P_FILE_ACCESS_DEFAULT;
@@ -479,8 +479,14 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
if (H5FD_FAMILY == driver) {
if (subst_for_superblock)
suffix = "-000000.h5";
- else
- suffix = nest_printf ? "-%%06d.h5" : "-%06d.h5";
+ else {
+ if (nest_printf) {
+ suffix = "-%%06d.h5";
+ }
+ else {
+ suffix = "-%06d.h5";
+ }
+ }
}
else if (H5FD_MULTI == driver) {
@@ -493,7 +499,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
if (!driver_env_var)
driver_env_var = HDF5_DRIVER;
#endif
- if (driver_env_var && !HDstrcmp(driver_env_var, "split")) {
+ if (driver_env_var && !strcmp(driver_env_var, "split")) {
/* split VFD */
if (subst_for_superblock)
suffix = ".h5.meta";
@@ -525,7 +531,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
#endif /* H5_HAVE_PARALLEL */
}
else {
- if (HDgetenv(HDF5_NOCLEANUP))
+ if (getenv(HDF5_NOCLEANUP))
SetTestNoCleanup();
}
@@ -561,7 +567,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
" export HDF5_PARAPREFIX\n"
"*** End of Hint ***\n");
- explained = TRUE;
+ explained = true;
#ifdef HDF5_PARAPREFIX
prefix = HDF5_PARAPREFIX;
#endif /* HDF5_PARAPREFIX */
@@ -573,7 +579,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
* For serial:
* First use the environment variable, then try the constant
*/
- prefix = HDgetenv("HDF5_PREFIX");
+ prefix = getenv("HDF5_PREFIX");
#ifdef HDF5_PREFIX
if (!prefix)
@@ -587,7 +593,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
/* This is a parallel system */
char *subdir;
- if (!HDstrcmp(prefix, HDF5_PARAPREFIX)) {
+ if (!strcmp(prefix, HDF5_PARAPREFIX)) {
/*
* If the prefix specifies the HDF5_PARAPREFIX directory, then
* default to using the "/tmp/$USER" or "/tmp/$LOGIN"
@@ -595,8 +601,8 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
*/
char *user, *login;
- user = HDgetenv("USER");
- login = HDgetenv("LOGIN");
+ user = getenv("USER");
+ login = getenv("LOGIN");
subdir = (user ? user : login);
if (subdir) {
@@ -612,11 +618,11 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
if (!fullname[0]) {
/* We didn't append the prefix yet */
- HDstrncpy(fullname, prefix, size);
+ strncpy(fullname, prefix, size);
fullname[size - 1] = '\0';
}
- if (HDstrlen(fullname) + HDstrlen(base_name) + 1 < size) {
+ if (strlen(fullname) + strlen(base_name) + 1 < size) {
/*
* Append the base_name with a slash first. Multiple
* slashes are handled below.
@@ -631,10 +637,10 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
* subdirectory. Default to PREFIX's original
* prefix value.
*/
- HDstrcpy(fullname, prefix);
+ strcpy(fullname, prefix);
- HDstrcat(fullname, "/");
- HDstrcat(fullname, base_name);
+ strcat(fullname, "/");
+ strcat(fullname, base_name);
}
else {
/* Buffer is too small */
@@ -642,25 +648,25 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
}
}
else {
- if (HDsnprintf(fullname, size, "%s/%s", prefix, base_name) == (int)size)
+ if (snprintf(fullname, size, "%s/%s", prefix, base_name) == (int)size)
/* Buffer is too small */
return NULL;
}
}
- else if (HDstrlen(base_name) >= size) {
+ else if (strlen(base_name) >= size) {
/* Buffer is too small */
return NULL;
}
else {
- HDstrcpy(fullname, base_name);
+ strcpy(fullname, base_name);
}
/* Append a suffix */
if (suffix) {
- if (HDstrlen(fullname) + HDstrlen(suffix) >= size)
+ if (strlen(fullname) + strlen(suffix) >= size)
return NULL;
- HDstrcat(fullname, suffix);
+ strcat(fullname, suffix);
}
/* Remove any double slashes in the filename */
@@ -694,7 +700,7 @@ h5_rmprefix(const char *filename)
{
const char *ret_ptr;
- if ((ret_ptr = HDstrstr(filename, ":")) == NULL)
+ if ((ret_ptr = strstr(filename, ":")) == NULL)
ret_ptr = filename;
else
ret_ptr++;
@@ -786,7 +792,7 @@ h5_get_libver_fapl(hid_t fapl)
char buf[1024]; /* buffer for tokenizing HDF5_DRIVER */
/* Get the environment variable, if it exists */
- env = HDgetenv("HDF5_LIBVER_BOUNDS");
+ env = getenv("HDF5_LIBVER_BOUNDS");
#ifdef HDF5_LIBVER_BOUNDS
/* Use the environment variable, then the compile-time constant */
if (!env)
@@ -803,12 +809,12 @@ h5_get_libver_fapl(hid_t fapl)
* If it's nothing (environment variable was whitespace)
* just return the default fapl.
*/
- HDstrncpy(buf, env, sizeof(buf));
+ strncpy(buf, env, sizeof(buf));
buf[sizeof(buf) - 1] = '\0';
if (NULL == (tok = HDstrtok_r(buf, " \t\n\r", &lasts)))
goto done;
- if (!HDstrcmp(tok, "latest")) {
+ if (!strcmp(tok, "latest")) {
/* use the latest format */
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
goto error;
@@ -924,10 +930,10 @@ h5_set_info_object(void)
int ret_value = 0;
/* handle any MPI INFO hints via $HDF5_MPI_INFO */
- if ((envp = HDgetenv("HDF5_MPI_INFO")) != NULL) {
+ if ((envp = getenv("HDF5_MPI_INFO")) != NULL) {
char *next, *valp;
- valp = envp = next = HDstrdup(envp);
+ valp = envp = next = strdup(envp);
if (!valp)
return 0;
@@ -944,7 +950,7 @@ h5_set_info_object(void)
valp++;
/* copy key/value pair into temporary buffer */
- len = HDstrcspn(valp, ";");
+ len = strcspn(valp, ";");
next = &valp[len];
if (NULL == (key_val = (char *)calloc(1, len + 1)))
return -1;
@@ -953,7 +959,7 @@ h5_set_info_object(void)
if (*next == ';')
++next;
- namep = HDstrncpy(key_val, valp, len);
+ namep = strncpy(key_val, valp, len);
/* pass up any beginning whitespaces */
while (*namep && (*namep == ' ' || *namep == '\t'))
@@ -963,13 +969,13 @@ h5_set_info_object(void)
continue; /* was all white space, so move to next k/v pair */
/* eat up any ending white spaces */
- endp = &namep[HDstrlen(namep) - 1];
+ endp = &namep[strlen(namep) - 1];
while (endp && (*endp == ' ' || *endp == '\t'))
*endp-- = '\0';
/* find the '=' */
- valp = HDstrchr(namep, '=');
+ valp = strchr(namep, '=');
if (valp != NULL) { /* it's a valid key/value pairing */
char *tmp_val = valp + 1;
@@ -1087,18 +1093,18 @@ h5_get_file_size(const char *filename, hid_t fapl)
h5_stat_size_t tot_size = 0;
char *driver_env_var = NULL;
- driver_env_var = HDgetenv(HDF5_DRIVER);
- if (driver_env_var && !HDstrcmp(driver_env_var, "split")) {
+ driver_env_var = getenv(HDF5_DRIVER);
+ if (driver_env_var && !strcmp(driver_env_var, "split")) {
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) {
if (mt != H5FD_MEM_DRAW && mt != H5FD_MEM_SUPER)
continue;
/* Create the filename to query */
if (mt == H5FD_MEM_DRAW) {
- HDsnprintf(temp, sizeof temp, "%s.raw", filename);
+ snprintf(temp, sizeof temp, "%s.raw", filename);
}
else {
- HDsnprintf(temp, sizeof temp, "%s.meta", filename);
+ snprintf(temp, sizeof temp, "%s.meta", filename);
}
/* Check for existence of file */
@@ -1113,10 +1119,10 @@ h5_get_file_size(const char *filename, hid_t fapl)
} /* end for */
}
else {
- assert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES);
+ assert(strlen(multi_letters) == H5FD_MEM_NTYPES);
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) {
/* Create the filename to query */
- HDsnprintf(temp, sizeof temp, "%s-%c.h5", filename, multi_letters[mt]);
+ snprintf(temp, sizeof temp, "%s-%c.h5", filename, multi_letters[mt]);
/* Check for existence of file */
if (0 == HDaccess(temp, F_OK)) {
@@ -1158,7 +1164,7 @@ h5_get_file_size(const char *filename, hid_t fapl)
/* Try all filenames possible, until we find one that's missing */
for (j = 0; /*void*/; j++) {
/* Create the filename to query */
- HDsnprintf(temp, sizeof temp, filename, j);
+ snprintf(temp, sizeof temp, filename, j);
/* Check for existence of file */
if (HDaccess(temp, F_OK) < 0)
@@ -1215,7 +1221,7 @@ print_func(const char *format, ...)
int ret_value;
va_start(arglist, format);
- ret_value = HDvprintf(format, arglist);
+ ret_value = vprintf(format, arglist);
va_end(arglist);
return ret_value;
}
@@ -1301,9 +1307,9 @@ getenv_all(MPI_Comm comm, int root, const char *name)
/* The root task does the getenv call
* and sends the result to the other tasks */
if (mpi_rank == root) {
- env = HDgetenv(name);
+ env = getenv(name);
if (env) {
- len = (int)HDstrlen(env);
+ len = (int)strlen(env);
MPI_Bcast(&len, 1, MPI_INT, root, comm);
MPI_Bcast(env, len, MPI_CHAR, root, comm);
}
@@ -1318,7 +1324,7 @@ getenv_all(MPI_Comm comm, int root, const char *name)
if (len >= 0) {
if (env == NULL)
env = (char *)malloc((size_t)len + 1);
- else if (HDstrlen(env) < (size_t)len)
+ else if (strlen(env) < (size_t)len)
env = (char *)realloc(env, (size_t)len + 1);
MPI_Bcast(env, len, MPI_CHAR, root, comm);
@@ -1338,7 +1344,7 @@ getenv_all(MPI_Comm comm, int root, const char *name)
/* use original getenv */
if (env)
free(env);
- env = HDgetenv(name);
+ env = getenv(name);
} /* end if */
return env;
@@ -1445,7 +1451,7 @@ h5_verify_cached_stabs_cb(hid_t oid, const char H5_ATTR_UNUSED *name, const H5O_
herr_t
h5_verify_cached_stabs(const char *base_name[], hid_t fapl)
{
- hid_t file = -1;
+ hid_t file = H5I_INVALID_HID;
char filename[1024];
int i = 0;
@@ -1893,9 +1899,9 @@ H5_get_srcdir_filename(const char *filename)
/* Build path to test file. We're checking the length so suppress
* the gcc format-truncation warning.
*/
- if ((HDstrlen(srcdir) + HDstrlen(filename) + 1) < sizeof(srcdir_testpath)) {
+ if ((strlen(srcdir) + strlen("testfiles/") + strlen(filename) + 1) < sizeof(srcdir_testpath)) {
H5_GCC_DIAG_OFF("format-truncation")
- HDsnprintf(srcdir_testpath, sizeof(srcdir_testpath), "%s%s", srcdir, filename);
+ snprintf(srcdir_testpath, sizeof(srcdir_testpath), "%stestfiles/%s", srcdir, filename);
H5_GCC_DIAG_ON("format-truncation")
return srcdir_testpath;
}
@@ -1916,15 +1922,15 @@ H5_get_srcdir_filename(const char *filename)
const char *
H5_get_srcdir(void)
{
- const char *srcdir = HDgetenv("srcdir");
+ const char *srcdir = getenv("srcdir");
/* Check for using the srcdir from configure time */
if (NULL == srcdir)
srcdir = config_srcdir;
/* Build path to all test files */
- if ((HDstrlen(srcdir) + 2) < sizeof(srcdir_path)) {
- HDsnprintf(srcdir_path, sizeof(srcdir_path), "%s/", srcdir);
+ if ((strlen(srcdir) + 2) < sizeof(srcdir_path)) {
+ snprintf(srcdir_path, sizeof(srcdir_path), "%s/", srcdir);
return (srcdir_path);
} /* end if */
else
@@ -2004,19 +2010,19 @@ h5_duplicate_file_by_bytes(const char *orig, const char *dest)
* Purpose: Checks if file locking is enabled on this file system.
*
* Return: SUCCEED/FAIL
- * are_enabled will be FALSE if file locking is disabled on
+ * are_enabled will be false if file locking is disabled on
* the file system of if there were errors.
*
*-------------------------------------------------------------------------
*/
herr_t
-h5_check_if_file_locking_enabled(hbool_t *is_enabled)
+h5_check_if_file_locking_enabled(bool *is_enabled)
{
const char *filename = "locking_test_file";
int pmode = O_RDWR | O_CREAT | O_TRUNC;
int fd = -1;
- *is_enabled = TRUE;
+ *is_enabled = true;
if ((fd = HDopen(filename, pmode, H5_POSIX_CREATE_MODE_RW)) < 0)
goto error;
@@ -2032,7 +2038,7 @@ h5_check_if_file_locking_enabled(hbool_t *is_enabled)
* error condition.
*/
errno = 0;
- *is_enabled = FALSE;
+ *is_enabled = false;
}
else
goto error;
@@ -2048,7 +2054,7 @@ h5_check_if_file_locking_enabled(hbool_t *is_enabled)
return SUCCEED;
error:
- *is_enabled = FALSE;
+ *is_enabled = false;
if (fd > -1) {
HDclose(fd);
HDremove(filename);
@@ -2063,22 +2069,22 @@ h5_check_if_file_locking_enabled(hbool_t *is_enabled)
* default VFD. If `drv_name` is NULL, the HDF5_DRIVER
* environment is checked instead (if it is set).
*
- * Return: TRUE/FALSE
+ * Return: true/false
*
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
h5_using_default_driver(const char *drv_name)
{
- hbool_t ret_val = TRUE;
+ bool ret_val = true;
assert(H5_DEFAULT_VFD == H5FD_SEC2);
if (!drv_name)
- drv_name = HDgetenv(HDF5_DRIVER);
+ drv_name = getenv(HDF5_DRIVER);
if (drv_name)
- return (!HDstrcmp(drv_name, "sec2") || !HDstrcmp(drv_name, "nomatch"));
+ return (!strcmp(drv_name, "sec2") || !strcmp(drv_name, "nomatch"));
return ret_val;
}
@@ -2093,12 +2099,12 @@ h5_using_default_driver(const char *drv_name)
* which are not currently supported for parallel HDF5, such
* as writing of VL or region reference datatypes.
*
- * Return: TRUE/FALSE
+ * Return: true/false
*
*-------------------------------------------------------------------------
*/
herr_t
-h5_using_parallel_driver(hid_t fapl_id, hbool_t *driver_is_parallel)
+h5_using_parallel_driver(hid_t fapl_id, bool *driver_is_parallel)
{
unsigned long feat_flags = 0;
hid_t driver_id = H5I_INVALID_HID;
@@ -2141,7 +2147,7 @@ h5_using_parallel_driver(hid_t fapl_id, hbool_t *driver_is_parallel)
*-------------------------------------------------------------------------
*/
herr_t
-h5_driver_is_default_vfd_compatible(hid_t fapl_id, hbool_t *default_vfd_compatible)
+h5_driver_is_default_vfd_compatible(hid_t fapl_id, bool *default_vfd_compatible)
{
unsigned long feat_flags = 0;
hid_t driver_id = H5I_INVALID_HID;
@@ -2186,28 +2192,28 @@ h5_driver_is_default_vfd_compatible(hid_t fapl_id, hbool_t *default_vfd_compatib
* Eventually, this should become a VFD feature flag so this
* check is less fragile.
*
- * Return: TRUE/FALSE
+ * Return: true/false
*
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
h5_driver_uses_multiple_files(const char *drv_name, unsigned flags)
{
- hbool_t ret_val = FALSE;
+ bool ret_val = false;
if (!drv_name)
- drv_name = HDgetenv(HDF5_DRIVER);
+ drv_name = getenv(HDF5_DRIVER);
if (drv_name) {
if ((flags & H5_EXCLUDE_MULTIPART_DRIVERS) == 0) {
- if (!HDstrcmp(drv_name, "split") || !HDstrcmp(drv_name, "multi") ||
- !HDstrcmp(drv_name, "family") || !HDstrcmp(drv_name, H5FD_SUBFILING_NAME))
- return TRUE;
+ if (!strcmp(drv_name, "split") || !strcmp(drv_name, "multi") || !strcmp(drv_name, "family") ||
+ !strcmp(drv_name, H5FD_SUBFILING_NAME))
+ return true;
}
if ((flags & H5_EXCLUDE_NON_MULTIPART_DRIVERS) == 0) {
- if (!HDstrcmp(drv_name, "splitter"))
- return TRUE;
+ if (!strcmp(drv_name, "splitter"))
+ return true;
}
}
diff --git a/test/h5test.h b/test/h5test.h
index 27d90af40de..8bba0777ef9 100644
--- a/test/h5test.h
+++ b/test/h5test.h
@@ -113,30 +113,30 @@ H5TEST_DLLVAR MPI_Info h5_io_info_g; /* MPI INFO object for IO */
} while (0)
#define PASSED() \
do { \
- HDputs(" PASSED"); \
+ puts(" PASSED"); \
fflush(stdout); \
n_tests_passed_g++; \
} while (0)
#define H5_FAILED() \
do { \
- HDputs("*FAILED*"); \
+ puts("*FAILED*"); \
fflush(stdout); \
n_tests_failed_g++; \
} while (0)
#define H5_WARNING() \
do { \
- HDputs("*WARNING*"); \
+ puts("*WARNING*"); \
fflush(stdout); \
} while (0)
#define SKIPPED() \
do { \
- HDputs(" -SKIP-"); \
+ puts(" -SKIP-"); \
fflush(stdout); \
n_tests_skipped_g++; \
} while (0)
#define PUTS_ERROR(s) \
do { \
- HDputs(s); \
+ puts(s); \
AT(); \
goto error; \
} while (0)
@@ -162,7 +162,7 @@ H5TEST_DLLVAR MPI_Info h5_io_info_g; /* MPI INFO object for IO */
do { \
H5_FAILED(); \
AT(); \
- HDputs(s); \
+ puts(s); \
goto error; \
} while (0)
@@ -172,7 +172,7 @@ H5TEST_DLLVAR MPI_Info h5_io_info_g; /* MPI INFO object for IO */
#define TESTING_MULTIPART(WHAT) \
do { \
printf("Testing %-62s", WHAT); \
- HDputs(""); \
+ puts(""); \
fflush(stdout); \
} while (0)
@@ -289,11 +289,11 @@ H5TEST_DLL H5VL_class_t *h5_get_dummy_vol_class(void);
H5TEST_DLL const char *h5_get_version_string(H5F_libver_t libver);
H5TEST_DLL int h5_compare_file_bytes(char *fname1, char *fname2);
H5TEST_DLL int h5_duplicate_file_by_bytes(const char *orig, const char *dest);
-H5TEST_DLL herr_t h5_check_if_file_locking_enabled(hbool_t *are_enabled);
-H5TEST_DLL hbool_t h5_using_default_driver(const char *drv_name);
-H5TEST_DLL herr_t h5_using_parallel_driver(hid_t fapl_id, hbool_t *driver_is_parallel);
-H5TEST_DLL herr_t h5_driver_is_default_vfd_compatible(hid_t fapl_id, hbool_t *default_vfd_compatible);
-H5TEST_DLL hbool_t h5_driver_uses_multiple_files(const char *drv_name, unsigned flags);
+H5TEST_DLL herr_t h5_check_if_file_locking_enabled(bool *are_enabled);
+H5TEST_DLL bool h5_using_default_driver(const char *drv_name);
+H5TEST_DLL herr_t h5_using_parallel_driver(hid_t fapl_id, bool *driver_is_parallel);
+H5TEST_DLL herr_t h5_driver_is_default_vfd_compatible(hid_t fapl_id, bool *default_vfd_compatible);
+H5TEST_DLL bool h5_driver_uses_multiple_files(const char *drv_name, unsigned flags);
/* Functions that will replace components of a FAPL */
H5TEST_DLL herr_t h5_get_libver_fapl(hid_t fapl_id);
@@ -353,6 +353,7 @@ H5TEST_DLLVAR size_t n_tests_passed_g;
H5TEST_DLLVAR size_t n_tests_failed_g;
H5TEST_DLLVAR size_t n_tests_skipped_g;
H5TEST_DLLVAR uint64_t vol_cap_flags_g;
+H5TEST_DLLVAR int mpi_rank_framework_g;
H5TEST_DLL void h5_send_message(const char *file, const char *arg1, const char *arg2);
H5TEST_DLL herr_t h5_wait_message(const char *file);
diff --git a/test/hdfs.c b/test/hdfs.c
index 52e2eae34a4..857a54c9c12 100644
--- a/test/hdfs.c
+++ b/test/hdfs.c
@@ -274,7 +274,7 @@
*----------------------------------------------------------------------------
*/
#define JSVERIFY_STR(expected, actual, reason) \
- if (HDstrcmp((actual), (expected)) != 0) { \
+ if (strcmp((actual), (expected)) != 0) { \
JSERR_STR((expected), (actual), (reason)); \
goto error; \
} /* JSVERIFY_STR */
@@ -313,7 +313,7 @@
*----------------------------------------------------------------------------
*/
#define JSVERIFY_STR(actual, expected, reason) \
- if (HDstrcmp((actual), (expected)) != 0) { \
+ if (strcmp((actual), (expected)) != 0) { \
JSERR_STR((expected), (actual), (reason)); \
goto error; \
} /* JSVERIFY_STR */
@@ -374,7 +374,7 @@ test_fapl_config_validation(void)
#ifndef H5_HAVE_LIBHDFS
TESTING("HDFS fapl configuration validation");
SKIPPED();
- HDputs(" HDFS VFD is not enabled");
+ puts(" HDFS VFD is not enabled");
fflush(stdout);
return 0;
@@ -397,7 +397,7 @@ test_fapl_config_validation(void)
* test-local variables *
************************/
- hid_t fapl_id = -1; /* file access property list ID */
+ hid_t fapl_id = H5I_INVALID_HID; /* file access property list ID */
H5FD_hdfs_fapl_t config;
H5FD_hdfs_fapl_t fa_fetch;
herr_t success = SUCCEED;
@@ -579,7 +579,7 @@ test_hdfs_fapl(void)
#ifndef H5_HAVE_LIBHDFS
TESTING("HDFS fapl ");
SKIPPED();
- HDputs(" HDFS VFD is not enabled");
+ puts(" HDFS VFD is not enabled");
fflush(stdout);
return 0;
@@ -588,9 +588,9 @@ test_hdfs_fapl(void)
* test-local variables *
************************/
- hid_t fapl_id = -1; /* file access property list ID */
- hid_t driver_id = -1; /* ID for this VFD */
- unsigned long driver_flags = 0; /* VFD feature flags */
+ hid_t fapl_id = H5I_INVALID_HID; /* file access property list ID */
+ hid_t driver_id = H5I_INVALID_HID; /* ID for this VFD */
+ unsigned long driver_flags = 0; /* VFD feature flags */
H5FD_hdfs_fapl_t hdfs_fa_0 = {
1, /* version*/
"", /* node name */
@@ -662,7 +662,7 @@ test_vfd_open(void)
#ifndef H5_HAVE_LIBHDFS
TESTING("HDFS VFD-level open");
SKIPPED();
- HDputs(" HDFS VFD is not enabled");
+ puts(" HDFS VFD is not enabled");
fflush(stdout);
return 0;
@@ -687,7 +687,7 @@ test_vfd_open(void)
unsigned flags;
int which_fapl;
haddr_t maxaddr;
- hbool_t might_use_other_driver;
+ bool might_use_other_driver;
};
/************************
@@ -701,7 +701,7 @@ test_vfd_open(void)
H5F_ACC_RDONLY,
FAPL_H5P_DEFAULT,
MAXADDR,
- TRUE,
+ true,
},
{
"generic file access property list is invalid",
@@ -709,7 +709,7 @@ test_vfd_open(void)
H5F_ACC_RDONLY,
FAPL_UNCONFIGURED,
MAXADDR,
- TRUE,
+ true,
},
{
"filename cannot be null",
@@ -717,7 +717,7 @@ test_vfd_open(void)
H5F_ACC_RDONLY,
FAPL_HDFS,
MAXADDR,
- FALSE,
+ false,
},
{
"filename cannot be empty",
@@ -725,7 +725,7 @@ test_vfd_open(void)
H5F_ACC_RDONLY,
FAPL_HDFS,
MAXADDR,
- FALSE,
+ false,
},
{
"file at filename must exist",
@@ -733,7 +733,7 @@ test_vfd_open(void)
H5F_ACC_RDONLY,
FAPL_HDFS,
MAXADDR,
- FALSE,
+ false,
},
{
"read-write flag not supported",
@@ -741,7 +741,7 @@ test_vfd_open(void)
H5F_ACC_RDWR,
FAPL_HDFS,
MAXADDR,
- FALSE,
+ false,
},
{
"truncate flag not supported",
@@ -749,7 +749,7 @@ test_vfd_open(void)
H5F_ACC_TRUNC,
FAPL_HDFS,
MAXADDR,
- FALSE,
+ false,
},
{
"create flag not supported",
@@ -757,7 +757,7 @@ test_vfd_open(void)
H5F_ACC_CREAT,
FAPL_HDFS,
MAXADDR,
- FALSE,
+ false,
},
{
"EXCL flag not supported",
@@ -765,7 +765,7 @@ test_vfd_open(void)
H5F_ACC_EXCL,
FAPL_HDFS,
MAXADDR,
- FALSE,
+ false,
},
{
"maxaddr cannot be 0 (caught in `H5FD_open()`)",
@@ -773,14 +773,14 @@ test_vfd_open(void)
H5F_ACC_RDONLY,
FAPL_HDFS,
0,
- FALSE,
+ false,
},
};
unsigned i = 0;
unsigned failing_conditions_count = 10;
H5FD_t *fd = NULL;
- hid_t fapl_hdfs = -1;
- hid_t fapl_unconfigured = -1;
+ hid_t fapl_hdfs = H5I_INVALID_HID;
+ hid_t fapl_unconfigured = H5I_INVALID_HID;
TESTING("HDFS VFD-level open");
@@ -820,7 +820,7 @@ test_vfd_open(void)
}
H5E_END_TRY
if (NULL != fd) {
- if (TRUE == T.might_use_other_driver && H5FD_HDFS != fd->driver_id) {
+ if (true == T.might_use_other_driver && H5FD_HDFS != fd->driver_id) {
fprintf(stderr, "\n!!!!! WARNING !!!!!\n"
" Successful open of file on local system "
"with non-HDFS VFD.\n");
@@ -915,7 +915,7 @@ test_eof_eoa(void)
#ifndef H5_HAVE_LIBHDFS
TESTING("HDFS eof/eoa gets and sets");
SKIPPED();
- HDputs(" HDFS VFD is not enabled");
+ puts(" HDFS VFD is not enabled");
fflush(stdout);
return 0;
@@ -934,7 +934,7 @@ test_eof_eoa(void)
************************/
H5FD_t *fd_shakespeare = NULL;
- hid_t fapl_id = -1;
+ hid_t fapl_id = H5I_INVALID_HID;
TESTING("HDFS eof/eoa gets and sets");
@@ -1025,7 +1025,7 @@ test_H5FDread_without_eoa_set_fails(void)
#ifndef H5_HAVE_LIBHDFS
TESTING("HDFS VFD read-eoa temporal coupling library limitation");
SKIPPED();
- HDputs(" HDFS VFD is not enabled");
+ puts(" HDFS VFD is not enabled");
fflush(stdout);
return 0;
@@ -1034,7 +1034,7 @@ test_H5FDread_without_eoa_set_fails(void)
char buffer[HDFS_TEST_MAX_BUF_SIZE];
unsigned int i = 0;
H5FD_t *file_shakespeare = NULL;
- hid_t fapl_id = -1;
+ hid_t fapl_id = H5I_INVALID_HID;
TESTING("HDFS VFD read-eoa temporal coupling library limitation");
@@ -1124,7 +1124,7 @@ test_read(void)
#ifndef H5_HAVE_LIBHDFS
TESTING("HDFS VFD read/range-gets");
SKIPPED();
- HDputs(" HDFS VFD is not enabled");
+ puts(" HDFS VFD is not enabled");
fflush(stdout);
return 0;
@@ -1206,7 +1206,7 @@ test_read(void)
char buffer[HDFS_TEST_MAX_BUF_SIZE];
unsigned int i = 0;
H5FD_t *file_raven = NULL;
- hid_t fapl_id = -1;
+ hid_t fapl_id = H5I_INVALID_HID;
TESTING("HDFS VFD read/range-gets");
@@ -1331,7 +1331,7 @@ test_noops_and_autofails(void)
#ifndef H5_HAVE_LIBHDFS
TESTING("HDFS VFD always-fail and no-op routines");
SKIPPED();
- HDputs(" HDFS VFD is not enabled");
+ puts(" HDFS VFD is not enabled");
fflush(stdout);
return 0;
@@ -1349,7 +1349,7 @@ test_noops_and_autofails(void)
* test-local variables *
************************/
- hid_t fapl_id = -1;
+ hid_t fapl_id = H5I_INVALID_HID;
H5FD_t *file = NULL;
const char data[36] = "The Force shall be with you, always";
@@ -1379,10 +1379,10 @@ test_noops_and_autofails(void)
H5E_BEGIN_TRY{JSVERIFY(FAIL, H5FDwrite(file, H5FD_MEM_DRAW, H5P_DEFAULT, 1000, 35, data),
"write must fail")} H5E_END_TRY
- H5E_BEGIN_TRY{JSVERIFY(FAIL, H5FDtruncate(file, H5P_DEFAULT, FALSE), "truncate must fail")} H5E_END_TRY
+ H5E_BEGIN_TRY{JSVERIFY(FAIL, H5FDtruncate(file, H5P_DEFAULT, false), "truncate must fail")} H5E_END_TRY
H5E_BEGIN_TRY{
- JSVERIFY(FAIL, H5FDtruncate(file, H5P_DEFAULT, TRUE), "truncate must fail (closing)")} H5E_END_TRY
+ JSVERIFY(FAIL, H5FDtruncate(file, H5P_DEFAULT, true), "truncate must fail (closing)")} H5E_END_TRY
/************
* TEARDOWN *
@@ -1467,7 +1467,7 @@ test_H5F_integration(void)
#ifndef H5_HAVE_LIBHDFS
TESTING("HDFS file access through HD5F library (H5F API)");
SKIPPED();
- HDputs(" HDFS VFD is not enabled");
+ puts(" HDFS VFD is not enabled");
fflush(stdout);
return 0;
@@ -1485,8 +1485,8 @@ test_H5F_integration(void)
* test-local variables *
************************/
- hid_t file = -1;
- hid_t fapl_id = -1;
+ hid_t file = H5I_INVALID_HID;
+ hid_t fapl_id = H5I_INVALID_HID;
TESTING("HDFS file access through HD5F library (H5F API)");
@@ -1579,13 +1579,13 @@ main(void)
static char hdfs_namenode_name[HDFS_NAMENODE_NAME_MAX_SIZE] = "";
const char *hdfs_namenode_name_env = NULL;
- hdfs_namenode_name_env = HDgetenv("HDFS_TEST_NAMENODE_NAME");
+ hdfs_namenode_name_env = getenv("HDFS_TEST_NAMENODE_NAME");
if (hdfs_namenode_name_env == NULL || hdfs_namenode_name_env[0] == '\0') {
- HDstrncpy(hdfs_namenode_name, "localhost", HDFS_NAMENODE_NAME_MAX_SIZE);
+ strncpy(hdfs_namenode_name, "localhost", HDFS_NAMENODE_NAME_MAX_SIZE);
}
else {
- HDstrncpy(/* TODO: error-check? */
- default_fa.namenode_name, hdfs_namenode_name_env, HDFS_NAMENODE_NAME_MAX_SIZE);
+ strncpy(/* TODO: error-check? */
+ default_fa.namenode_name, hdfs_namenode_name_env, HDFS_NAMENODE_NAME_MAX_SIZE);
}
#endif /* H5_HAVE_LIBHDFS */
diff --git a/test/hyperslab.c b/test/hyperslab.c
index e2ca4f1b1eb..2777e0465c6 100644
--- a/test/hyperslab.c
+++ b/test/hyperslab.c
@@ -148,19 +148,19 @@ test_fill(size_t nx, size_t ny, size_t nz, size_t di, size_t dj, size_t dk, size
if (0 == ny) {
ndims = 1;
ny = nz = 1;
- HDsnprintf(dim, sizeof(dim), "%lu", (unsigned long)nx);
+ snprintf(dim, sizeof(dim), "%lu", (unsigned long)nx);
} /* end if */
else {
ndims = 2;
nz = 1;
- HDsnprintf(dim, sizeof(dim), "%lux%lu", (unsigned long)nx, (unsigned long)ny);
+ snprintf(dim, sizeof(dim), "%lux%lu", (unsigned long)nx, (unsigned long)ny);
} /* end else */
} /* end if */
else {
ndims = 3;
- HDsnprintf(dim, sizeof(dim), "%lux%lux%lu", (unsigned long)nx, (unsigned long)ny, (unsigned long)nz);
+ snprintf(dim, sizeof(dim), "%lux%lux%lu", (unsigned long)nx, (unsigned long)ny, (unsigned long)nz);
} /* end else */
- HDsnprintf(s, sizeof(s), "Testing hyperslab fill %-11s variable hyperslab", dim);
+ snprintf(s, sizeof(s), "Testing hyperslab fill %-11s variable hyperslab", dim);
printf("%-70s", s);
fflush(stdout);
@@ -303,17 +303,17 @@ test_copy(int mode, size_t nx, size_t ny, size_t nz, size_t di, size_t dj, size_
if (0 == ny) {
ndims = 1;
ny = nz = 1;
- HDsnprintf(dim, sizeof(dim), "%lu", (unsigned long)nx);
+ snprintf(dim, sizeof(dim), "%lu", (unsigned long)nx);
} /* end if */
else {
ndims = 2;
nz = 1;
- HDsnprintf(dim, sizeof(dim), "%lux%lu", (unsigned long)nx, (unsigned long)ny);
+ snprintf(dim, sizeof(dim), "%lux%lu", (unsigned long)nx, (unsigned long)ny);
} /* end else */
} /* end if */
else {
ndims = 3;
- HDsnprintf(dim, sizeof(dim), "%lux%lux%lu", (unsigned long)nx, (unsigned long)ny, (unsigned long)nz);
+ snprintf(dim, sizeof(dim), "%lux%lux%lu", (unsigned long)nx, (unsigned long)ny, (unsigned long)nz);
} /* end else */
switch (mode) {
@@ -346,7 +346,7 @@ test_copy(int mode, size_t nx, size_t ny, size_t nz, size_t di, size_t dj, size_
HDabort();
} /* end switch */
- HDsnprintf(s, sizeof(s), "Testing hyperslab copy %-11s %s", dim, sub);
+ snprintf(s, sizeof(s), "Testing hyperslab copy %-11s %s", dim, sub);
printf("%-70s", s);
fflush(stdout);
@@ -597,15 +597,15 @@ test_multifill(size_t nx)
s[0] = '\0';
for (i = 0; i < nx; i++) {
if (dst[i].left != 3333333)
- HDsnprintf(s, sizeof(s), "bad dst[%lu].left", (unsigned long)i);
+ snprintf(s, sizeof(s), "bad dst[%lu].left", (unsigned long)i);
else if (!H5_DBL_ABS_EQUAL(dst[i].mid, fill.mid))
/* Check if two DOUBLE values are equal. If their difference
* is smaller than the EPSILON value for double, they are
* considered equal. See the definition in h5test.h.
*/
- HDsnprintf(s, sizeof(s), "bad dst[%lu].mid", (unsigned long)i);
+ snprintf(s, sizeof(s), "bad dst[%lu].mid", (unsigned long)i);
else if (dst[i].right != 4444444)
- HDsnprintf(s, sizeof(s), "bad dst[%lu].right", (unsigned long)i);
+ snprintf(s, sizeof(s), "bad dst[%lu].right", (unsigned long)i);
if (s[0]) {
H5_FAILED();
if (!HDisatty(1)) {
@@ -744,8 +744,7 @@ test_transpose(size_t nx, size_t ny)
char s[256];
hsize_t i, j;
- HDsnprintf(s, sizeof(s), "Testing 2d transpose by stride %4lux%-lud", (unsigned long)nx,
- (unsigned long)ny);
+ snprintf(s, sizeof(s), "Testing 2d transpose by stride %4lux%-lud", (unsigned long)nx, (unsigned long)ny);
printf("%-70s", s);
fflush(stdout);
@@ -840,8 +839,8 @@ test_sub_super(size_t nx, size_t ny)
hsize_t i, j;
char s[256];
- HDsnprintf(s, sizeof(s), "Testing image sampling %4lux%-4lu to %4lux%-4lu ", (unsigned long)(2 * nx),
- (unsigned long)(2 * ny), (unsigned long)nx, (unsigned long)ny);
+ snprintf(s, sizeof(s), "Testing image sampling %4lux%-4lu to %4lux%-4lu ", (unsigned long)(2 * nx),
+ (unsigned long)(2 * ny), (unsigned long)nx, (unsigned long)ny);
printf("%-70s", s);
fflush(stdout);
@@ -890,8 +889,8 @@ test_sub_super(size_t nx, size_t ny)
* Test replicating pixels to produce an image twice as large in each
* dimension.
*/
- HDsnprintf(s, sizeof(s), "Testing image sampling %4lux%-4lu to %4lux%-4lu ", (unsigned long)nx,
- (unsigned long)ny, (unsigned long)(2 * nx), (unsigned long)(2 * ny));
+ snprintf(s, sizeof(s), "Testing image sampling %4lux%-4lu to %4lux%-4lu ", (unsigned long)nx,
+ (unsigned long)ny, (unsigned long)(2 * nx), (unsigned long)(2 * ny));
printf("%-70s", s);
fflush(stdout);
@@ -917,17 +916,17 @@ test_sub_super(size_t nx, size_t ny)
for (i = 0; i < nx; i++) {
for (j = 0; j < ny; j++) {
if (half[i * ny + j] != twice[4 * i * ny + 2 * j])
- HDsnprintf(s, sizeof(s), "half[%lu][%lu] != twice[%lu][%lu]", (unsigned long)i,
- (unsigned long)j, (unsigned long)i * 2, (unsigned long)j * 2);
+ snprintf(s, sizeof(s), "half[%lu][%lu] != twice[%lu][%lu]", (unsigned long)i,
+ (unsigned long)j, (unsigned long)i * 2, (unsigned long)j * 2);
else if (half[i * ny + j] != twice[4 * i * ny + 2 * j + 1])
- HDsnprintf(s, sizeof(s), "half[%lu][%lu] != twice[%lu][%lu]", (unsigned long)i,
- (unsigned long)j, (unsigned long)i * 2, (unsigned long)j * 2 + 1);
+ snprintf(s, sizeof(s), "half[%lu][%lu] != twice[%lu][%lu]", (unsigned long)i,
+ (unsigned long)j, (unsigned long)i * 2, (unsigned long)j * 2 + 1);
else if (half[i * ny + j] != twice[(2 * i + 1) * 2 * ny + 2 * j])
- HDsnprintf(s, sizeof(s), "half[%lu][%lu] != twice[%lu][%lu]", (unsigned long)i,
- (unsigned long)j, (unsigned long)i * 2 + 1, (unsigned long)j * 2);
+ snprintf(s, sizeof(s), "half[%lu][%lu] != twice[%lu][%lu]", (unsigned long)i,
+ (unsigned long)j, (unsigned long)i * 2 + 1, (unsigned long)j * 2);
else if (half[i * ny + j] != twice[(2 * i + 1) * 2 * ny + 2 * j + 1])
- HDsnprintf(s, sizeof(s), "half[%lu][%lu] != twice[%lu][%lu]", (unsigned long)i,
- (unsigned long)j, (unsigned long)i * 2 + 1, (unsigned long)j * 2 + 1);
+ snprintf(s, sizeof(s), "half[%lu][%lu] != twice[%lu][%lu]", (unsigned long)i,
+ (unsigned long)j, (unsigned long)i * 2 + 1, (unsigned long)j * 2 + 1);
if (s[0]) {
H5_FAILED();
if (!HDisatty(1)) {
@@ -982,7 +981,7 @@ test_array_fill(size_t lo, size_t hi)
size_t u, v, w; /* Local index variables */
char s[256];
- HDsnprintf(s, sizeof(s), "array filling %4lu-%-4lu elements", (unsigned long)lo, (unsigned long)hi);
+ snprintf(s, sizeof(s), "array filling %4lu-%-4lu elements", (unsigned long)lo, (unsigned long)hi);
TESTING(s);
/* Initialize */
@@ -1043,8 +1042,8 @@ test_array_offset_n_calc(size_t n, size_t x, size_t y, size_t z)
hsize_t new_coords[ARRAY_OFFSET_NDIMS]; /* X, Y & X coordinates of offset */
char s[256];
- HDsnprintf(s, sizeof(s), "array offset %4lux%4lux%4lu elements", (unsigned long)z, (unsigned long)y,
- (unsigned long)x);
+ snprintf(s, sizeof(s), "array offset %4lux%4lux%4lu elements", (unsigned long)z, (unsigned long)y,
+ (unsigned long)x);
TESTING(s);
/* Initialize */
@@ -1126,9 +1125,9 @@ main(int argc, char *argv[])
int i;
for (i = 1, size_of_test = 0; i < argc; i++) {
- if (!HDstrcmp(argv[i], "small"))
+ if (!strcmp(argv[i], "small"))
size_of_test |= TEST_SMALL;
- else if (!HDstrcmp(argv[i], "medium"))
+ else if (!strcmp(argv[i], "medium"))
size_of_test |= TEST_MEDIUM;
else {
printf("unrecognized argument: %s\n", argv[i]);
diff --git a/test/istore.c b/test/istore.c
index 8dcc2050ef7..33032d1a22f 100644
--- a/test/istore.c
+++ b/test/istore.c
@@ -62,7 +62,7 @@ is_sparse(void)
if ((fd = HDopen("x.h5", O_RDWR | O_TRUNC | O_CREAT, H5_POSIX_CREATE_MODE_RW)) < 0)
return 0;
- if (HDlseek(fd, (off_t)(1024 * 1024), SEEK_SET) != 1024 * 1024)
+ if (HDlseek(fd, (HDoff_t)(1024 * 1024), SEEK_SET) != 1024 * 1024)
return 0;
if (5 != HDwrite(fd, "hello", (size_t)5))
return 0;
@@ -194,7 +194,7 @@ test_create(hid_t f, const char *prefix)
dims[u] = my_chunk_dims[u] = 2;
/* Create chunked dataset of this dimensionality */
- HDsnprintf(name, sizeof name, "%s_%02u", prefix, u);
+ snprintf(name, sizeof name, "%s_%02u", prefix, u);
if ((dataset = new_object(f, name, (int)u, dims, my_chunk_dims)) < 0)
return FAIL;
@@ -240,21 +240,20 @@ test_extend(hid_t f, const char *prefix, size_t nx, size_t ny, size_t nz)
if (!ny) {
ndims = 1;
ny = nz = 1;
- HDsnprintf(dims, sizeof(dims), "%lu", (unsigned long)nx);
+ snprintf(dims, sizeof(dims), "%lu", (unsigned long)nx);
}
else {
ndims = 2;
nz = 1;
- HDsnprintf(dims, sizeof(dims), "%lux%lu", (unsigned long)nx, (unsigned long)ny);
+ snprintf(dims, sizeof(dims), "%lux%lu", (unsigned long)nx, (unsigned long)ny);
}
}
else {
ndims = 3;
- HDsnprintf(dims, sizeof(dims), "%lux%lux%lu", (unsigned long)nx, (unsigned long)ny,
- (unsigned long)nz);
+ snprintf(dims, sizeof(dims), "%lux%lux%lu", (unsigned long)nx, (unsigned long)ny, (unsigned long)nz);
}
- HDsnprintf(s, sizeof(s), "istore extend: %s", dims);
+ snprintf(s, sizeof(s), "istore extend: %s", dims);
TESTING(s);
buf = (uint8_t *)malloc(nx * ny * nz);
check = (uint8_t *)malloc(nx * ny * nz);
@@ -268,7 +267,7 @@ test_extend(hid_t f, const char *prefix, size_t nx, size_t ny, size_t nz)
max_corner[2] = 0;
/* Build the new empty object */
- HDsnprintf(name, sizeof(name), "%s_%s", prefix, dims);
+ snprintf(name, sizeof(name), "%s_%s", prefix, dims);
if ((dataset = new_object(f, name, ndims, whole_size, whole_size)) < 0) {
fprintf(stderr, " Cannot create %u-d object `%s'\n", ndims, name);
goto error;
@@ -433,21 +432,20 @@ test_sparse(hid_t f, const char *prefix, size_t nblocks, size_t nx, size_t ny, s
if (!ny) {
ndims = 1;
ny = nz = 1;
- HDsnprintf(dims, sizeof(dims), "%lu", (unsigned long)nx);
+ snprintf(dims, sizeof(dims), "%lu", (unsigned long)nx);
}
else {
ndims = 2;
nz = 1;
- HDsnprintf(dims, sizeof(dims), "%lux%lu", (unsigned long)nx, (unsigned long)ny);
+ snprintf(dims, sizeof(dims), "%lux%lu", (unsigned long)nx, (unsigned long)ny);
}
}
else {
ndims = 3;
- HDsnprintf(dims, sizeof(dims), "%lux%lux%lu", (unsigned long)nx, (unsigned long)ny,
- (unsigned long)nz);
+ snprintf(dims, sizeof(dims), "%lux%lux%lu", (unsigned long)nx, (unsigned long)ny, (unsigned long)nz);
}
- HDsnprintf(s, sizeof(s), "istore sparse: %s", dims);
+ snprintf(s, sizeof(s), "istore sparse: %s", dims);
TESTING(s);
if (skip_test) {
SKIPPED();
@@ -466,7 +464,7 @@ test_sparse(hid_t f, const char *prefix, size_t nblocks, size_t nx, size_t ny, s
size[2] = nz;
/* Build the new empty object */
- HDsnprintf(name, sizeof(name), "%s_%s", prefix, dims);
+ snprintf(name, sizeof(name), "%s_%s", prefix, dims);
if ((dataset = new_object(f, name, ndims, whole_size, chunk_dims)) < 0) {
printf(" Cannot create %u-d object `%s'\n", ndims, name);
goto error;
@@ -543,7 +541,7 @@ test_sparse(hid_t f, const char *prefix, size_t nblocks, size_t nx, size_t ny, s
int
main(int argc, char *argv[])
{
- hid_t fapl = -1, file = -1, fcpl = -1;
+ hid_t fapl = H5I_INVALID_HID, file = H5I_INVALID_HID, fcpl = H5I_INVALID_HID;
herr_t status;
int nerrors = 0;
unsigned size_of_test;
@@ -559,13 +557,13 @@ main(int argc, char *argv[])
else {
int i;
for (i = 1, size_of_test = 0; i < argc; i++) {
- if (!HDstrcmp(argv[i], "small")) {
+ if (!strcmp(argv[i], "small")) {
size_of_test |= TEST_SMALL;
}
- else if (!HDstrcmp(argv[i], "medium")) {
+ else if (!strcmp(argv[i], "medium")) {
size_of_test |= TEST_MEDIUM;
}
- else if (!HDstrcmp(argv[i], "large")) {
+ else if (!strcmp(argv[i], "large")) {
size_of_test |= TEST_LARGE;
}
else {
diff --git a/test/lheap.c b/test/lheap.c
index 5f99c43c9d3..7b9863411fd 100644
--- a/test/lheap.c
+++ b/test/lheap.c
@@ -42,7 +42,7 @@ int
main(void)
{
hid_t fapl = H5P_DEFAULT; /* file access properties */
- hid_t file = -1; /* hdf5 file */
+ hid_t file = H5I_INVALID_HID; /* hdf5 file */
H5F_t *f = NULL; /* hdf5 file pointer */
char filename[1024]; /* file name */
haddr_t heap_addr; /* local heap address */
@@ -51,8 +51,8 @@ main(void)
int i, j; /* miscellaneous counters */
char buf[1024]; /* the value to store */
const char *s; /* value to read */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
- hbool_t driver_is_default_compatible;
+ bool api_ctx_pushed = false; /* Whether API context pushed */
+ bool driver_is_default_compatible;
/* Reset library */
h5_reset();
@@ -61,7 +61,7 @@ main(void)
/* Push API context */
if (H5CX_push() < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/*
* Test writing to the heap...
@@ -91,13 +91,13 @@ main(void)
goto error;
}
for (i = 0; i < NOBJS; i++) {
- HDsnprintf(buf, sizeof(buf), "%03d-", i);
+ snprintf(buf, sizeof(buf), "%03d-", i);
for (j = 4; j < i; j++)
buf[j] = (char)('0' + j % 10);
if (j > 4)
buf[j] = '\0';
- if (H5HL_insert(f, heap, HDstrlen(buf) + 1, buf, &obj[i]) < 0) {
+ if (H5HL_insert(f, heap, strlen(buf) + 1, buf, &obj[i]) < 0) {
H5_FAILED();
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
@@ -131,7 +131,7 @@ main(void)
goto error;
}
for (i = 0; i < NOBJS; i++) {
- HDsnprintf(buf, sizeof(buf), "%03d-", i);
+ snprintf(buf, sizeof(buf), "%03d-", i);
for (j = 4; j < i; j++)
buf[j] = (char)('0' + j % 10);
if (j > 4)
@@ -149,7 +149,7 @@ main(void)
goto error;
}
- if (HDstrcmp(s, buf) != 0) {
+ if (strcmp(s, buf) != 0) {
H5_FAILED();
printf(" i=%d, heap offset=%lu\n", i, (unsigned long)(obj[i]));
printf(" got: \"%s\"\n", s);
@@ -176,7 +176,7 @@ main(void)
TESTING("opening pre-created file with non-default sizes");
{
const char *testfile = H5_get_srcdir_filename(TESTFILE); /* Corrected test file name */
- hid_t dset = -1;
+ hid_t dset = H5I_INVALID_HID;
file = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT);
if (file >= 0) {
if ((dset = H5Dopen2(file, "/Dataset1", H5P_DEFAULT)) < 0)
@@ -200,17 +200,17 @@ main(void)
TEST_ERROR;
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
- HDputs("All local heap tests passed.");
+ puts("All local heap tests passed.");
h5_cleanup(FILENAME, fapl);
return EXIT_SUCCESS;
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
H5E_BEGIN_TRY
{
H5Fclose(file);
@@ -218,7 +218,7 @@ main(void)
H5E_END_TRY
if (api_ctx_pushed)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
return EXIT_FAILURE;
}
diff --git a/test/links.c b/test/links.c
index 8f6af5b8581..6f07d32253e 100644
--- a/test/links.c
+++ b/test/links.c
@@ -160,7 +160,7 @@ typedef struct {
int stop; /* # of iterations to stop after */
int64_t curr; /* Current creation order value */
size_t max_visit; /* Size of "visited link" flag array */
- hbool_t *visited; /* Pointer to array of "visited link" flags */
+ bool *visited; /* Pointer to array of "visited link" flags */
} link_iter_info_t;
/* Link visit structs */
@@ -400,9 +400,9 @@ const H5L_class_t UD_plist_class[1] = {{
static void
fix_ext_filename(char *path_name, char *cwd, const char *file_name)
{
- HDstrcpy(path_name, cwd);
- HDstrcat(path_name, "/");
- HDstrcat(path_name, file_name);
+ strcpy(path_name, cwd);
+ strcat(path_name, "/");
+ strcat(path_name, file_name);
}
/*-------------------------------------------------------------------------
@@ -415,7 +415,7 @@ fix_ext_filename(char *path_name, char *cwd, const char *file_name)
*-------------------------------------------------------------------------
*/
static int
-mklinks(hid_t fapl, hbool_t new_format)
+mklinks(hid_t fapl, bool new_format)
{
hid_t file, scalar, grp, d1;
hsize_t size[1] = {1};
@@ -484,12 +484,13 @@ mklinks(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-new_links(hid_t fapl, hbool_t new_format)
+new_links(hid_t fapl, bool new_format)
{
- hid_t file_a, file_b = (-1);
- hid_t grp1_a = (-1), grp1_b = (-1), grp2_a = (-1), grp2_b = (-1);
- hid_t scalar = (-1);
- hid_t dset1 = (-1), dset2 = (-1);
+ hid_t file_a, file_b = (H5I_INVALID_HID);
+ hid_t grp1_a = (H5I_INVALID_HID), grp1_b = (H5I_INVALID_HID), grp2_a = (H5I_INVALID_HID),
+ grp2_b = (H5I_INVALID_HID);
+ hid_t scalar = (H5I_INVALID_HID);
+ hid_t dset1 = (H5I_INVALID_HID), dset2 = (H5I_INVALID_HID);
char filename[NAME_BUF_SIZE];
hsize_t size[1] = {1};
@@ -610,7 +611,7 @@ new_links(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-cklinks(hid_t fapl, hbool_t new_format)
+cklinks(hid_t fapl, bool new_format)
{
hid_t file;
H5O_info2_t oinfo1, oinfo2;
@@ -649,19 +650,19 @@ cklinks(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
if (token_cmp) {
H5_FAILED();
- HDputs(" Hard link test failed. Link seems not to point to the ");
- HDputs(" expected file location.");
+ puts(" Hard link test failed. Link seems not to point to the ");
+ puts(" expected file location.");
TEST_ERROR;
} /* end if */
- if (H5Lexists(file, "/", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(file, "/", H5P_DEFAULT) != true)
FAIL_STACK_ERROR;
- if (H5Lexists(file, "d1", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(file, "d1", H5P_DEFAULT) != true)
FAIL_STACK_ERROR;
- if (H5Lexists(file, "grp1/hard", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(file, "grp1/hard", H5P_DEFAULT) != true)
FAIL_STACK_ERROR;
- if (H5Lexists(file, "/grp1", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(file, "/grp1", H5P_DEFAULT) != true)
FAIL_STACK_ERROR;
- if (H5Lexists(file, "/grp1/hard", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(file, "/grp1/hard", H5P_DEFAULT) != true)
FAIL_STACK_ERROR;
H5E_BEGIN_TRY
{
@@ -670,7 +671,7 @@ cklinks(hid_t fapl, hbool_t new_format)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" H5Lexists() should have failed for a path with missing components.");
+ puts(" H5Lexists() should have failed for a path with missing components.");
TEST_ERROR;
} /* end if */
H5E_BEGIN_TRY
@@ -680,7 +681,7 @@ cklinks(hid_t fapl, hbool_t new_format)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" H5Lexists() should have failed for a path with missing components.");
+ puts(" H5Lexists() should have failed for a path with missing components.");
TEST_ERROR;
} /* end if */
@@ -696,18 +697,18 @@ cklinks(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
if (token_cmp) {
H5_FAILED();
- HDputs(" Soft link test failed. Link seems not to point to the ");
- HDputs(" expected file location.");
+ puts(" Soft link test failed. Link seems not to point to the ");
+ puts(" expected file location.");
TEST_ERROR;
} /* end if */
if (H5Lget_val(file, "grp1/soft", linkval, sizeof linkval, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(linkval, "/d1") != 0) {
+ if (strcmp(linkval, "/d1") != 0) {
H5_FAILED();
- HDputs(" Soft link test failed. Wrong link value");
+ puts(" Soft link test failed. Wrong link value");
TEST_ERROR;
} /* end if */
- if (H5Lexists(file, "grp1/soft", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(file, "grp1/soft", H5P_DEFAULT) != true)
FAIL_STACK_ERROR;
/* Dangling link */
@@ -718,7 +719,7 @@ cklinks(hid_t fapl, hbool_t new_format)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" H5Oget_info_by_name() should have failed for a dangling link.");
+ puts(" H5Oget_info_by_name() should have failed for a dangling link.");
TEST_ERROR;
} /* end if */
if (H5Lget_info2(file, "grp1/dangle", &linfo, H5P_DEFAULT) < 0)
@@ -733,12 +734,12 @@ cklinks(hid_t fapl, hbool_t new_format)
printf(" %d: Can't retrieve link value\n", __LINE__);
TEST_ERROR;
} /* end if */
- if (HDstrcmp(linkval, "foobar") != 0) {
+ if (strcmp(linkval, "foobar") != 0) {
H5_FAILED();
- HDputs(" Dangling link test failed. Wrong link value");
+ puts(" Dangling link test failed. Wrong link value");
TEST_ERROR;
} /* end if */
- if (H5Lexists(file, "grp1/dangle", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(file, "grp1/dangle", H5P_DEFAULT) != true)
FAIL_STACK_ERROR;
/* Recursive link */
@@ -749,7 +750,7 @@ cklinks(hid_t fapl, hbool_t new_format)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" H5Oget_info_by_name() should have failed for a recursive link.");
+ puts(" H5Oget_info_by_name() should have failed for a recursive link.");
TEST_ERROR;
} /* end if */
if (H5Lget_info2(file, "grp1/recursive", &linfo, H5P_DEFAULT) < 0)
@@ -764,14 +765,14 @@ cklinks(hid_t fapl, hbool_t new_format)
printf(" %d: Can't retrieve link value\n", __LINE__);
TEST_ERROR;
} /* end if */
- if (HDstrcmp(linkval, "/grp1/recursive") != 0) {
+ if (strcmp(linkval, "/grp1/recursive") != 0) {
H5_FAILED();
- HDputs(" Recursive link test failed. Wrong link value");
+ puts(" Recursive link test failed. Wrong link value");
TEST_ERROR;
} /* end if */
/* Non-existent link */
- if (H5Lexists(file, "foobar", H5P_DEFAULT) == TRUE)
+ if (H5Lexists(file, "foobar", H5P_DEFAULT) == true)
FAIL_STACK_ERROR;
/* Cleanup */
@@ -796,7 +797,7 @@ cklinks(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-ck_new_links(hid_t fapl, hbool_t new_format)
+ck_new_links(hid_t fapl, bool new_format)
{
hid_t file;
H5O_info2_t oi_dset, oi_hard1, oi_hard2;
@@ -834,8 +835,8 @@ ck_new_links(hid_t fapl, hbool_t new_format)
TEST_ERROR;
if (token_cmp1 || token_cmp2) {
H5_FAILED();
- HDputs(" Hard link test failed. Link seems not to point to the ");
- HDputs(" expected file location.");
+ puts(" Hard link test failed. Link seems not to point to the ");
+ puts(" expected file location.");
TEST_ERROR;
}
@@ -860,13 +861,13 @@ ck_new_links(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-long_links(hid_t fapl, hbool_t new_format)
+long_links(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group ID */
- hid_t gid2 = -1; /* Datatype ID */
- char *objname = NULL; /* Name of object [Long] */
- size_t u; /* Local index variable */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t gid2 = H5I_INVALID_HID; /* Datatype ID */
+ char *objname = NULL; /* Name of object [Long] */
+ size_t u; /* Local index variable */
char filename[NAME_BUF_SIZE];
if (new_format)
@@ -939,11 +940,11 @@ long_links(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-toomany(hid_t fapl, hbool_t new_format)
+toomany(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- char objname[NAME_BUF_SIZE]; /* Object name */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ char objname[NAME_BUF_SIZE]; /* Object name */
char filename[NAME_BUF_SIZE];
if (new_format)
@@ -1063,7 +1064,7 @@ toomany(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/hard21") != 0)
+ if (strcmp(objname, "/hard21") != 0)
TEST_ERROR;
/* Create object in hard-linked group */
@@ -1086,7 +1087,7 @@ toomany(hid_t fapl, hbool_t new_format)
H5E_END_TRY
if (gid >= 0) {
H5_FAILED();
- HDputs(" Should have failed for sequence of too many nested links.");
+ puts(" Should have failed for sequence of too many nested links.");
TEST_ERROR;
} /* end if */
@@ -1097,7 +1098,7 @@ toomany(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/soft16") != 0)
+ if (strcmp(objname, "/soft16") != 0)
TEST_ERROR;
/* Create object using soft links */
@@ -1138,14 +1139,14 @@ toomany(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-test_lcpl(hid_t fapl, hbool_t new_format)
+test_lcpl(hid_t fapl, bool new_format)
{
- hid_t file_id = -1;
- hid_t group_id = -1;
- hid_t space_id = -1;
- hid_t dset_id = -1;
- hid_t type_id = -1;
- hid_t lcpl_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t group_id = H5I_INVALID_HID;
+ hid_t space_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t type_id = H5I_INVALID_HID;
+ hid_t lcpl_id = H5I_INVALID_HID;
H5L_info2_t linfo;
char filename[1024];
hsize_t dims[2];
@@ -1351,11 +1352,12 @@ test_lcpl(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-test_move(hid_t fapl, hbool_t new_format)
+test_move(hid_t fapl, bool new_format)
{
- hid_t file_a = -1, file_b = -1;
- hid_t grp_1 = -1, grp_2 = -1, grp_move = -1, moved_grp = -1;
- char filename[1024];
+ hid_t file_a = H5I_INVALID_HID, file_b = H5I_INVALID_HID;
+ hid_t grp_1 = H5I_INVALID_HID, grp_2 = H5I_INVALID_HID, grp_move = H5I_INVALID_HID,
+ moved_grp = H5I_INVALID_HID;
+ char filename[1024];
if (new_format)
TESTING("H5Lmove (w/new group format)");
@@ -1407,13 +1409,13 @@ test_move(hid_t fapl, hbool_t new_format)
/* Move a soft link across files. Should succeed. */
if (H5Lmove(grp_2, "soft", file_b, "soft_new_name", H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (H5Lexists(file_b, "soft_new_name", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(file_b, "soft_new_name", H5P_DEFAULT) != true)
TEST_ERROR;
/* Move an external link across files. Should succeed. */
if (H5Lmove(grp_2, "ext", file_b, "ext_new_name", H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (H5Lexists(file_b, "ext_new_name", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(file_b, "ext_new_name", H5P_DEFAULT) != true)
TEST_ERROR;
/* Move a group across groups in the same file while renaming it. */
@@ -1434,7 +1436,7 @@ test_move(hid_t fapl, hbool_t new_format)
H5E_END_TRY
if (moved_grp >= 0) {
H5_FAILED();
- HDputs(" Group still in original location?");
+ puts(" Group still in original location?");
TEST_ERROR;
} /* end if */
@@ -1518,11 +1520,12 @@ test_move(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-test_copy(hid_t fapl, hbool_t new_format)
+test_copy(hid_t fapl, bool new_format)
{
- hid_t file_a = -1, file_b = -1;
- hid_t grp_1 = -1, grp_2 = -1, grp_move = -1, moved_grp = -1;
- char filename[1024];
+ hid_t file_a = H5I_INVALID_HID, file_b = H5I_INVALID_HID;
+ hid_t grp_1 = H5I_INVALID_HID, grp_2 = H5I_INVALID_HID, grp_move = H5I_INVALID_HID,
+ moved_grp = H5I_INVALID_HID;
+ char filename[1024];
if (new_format)
TESTING("H5Lcopy (w/new group format)");
@@ -1574,13 +1577,13 @@ test_copy(hid_t fapl, hbool_t new_format)
/* Copy a soft link across files. Should succeed. */
if (H5Lcopy(grp_2, "soft", file_b, "soft_new_name", H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (H5Lexists(file_b, "soft_new_name", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(file_b, "soft_new_name", H5P_DEFAULT) != true)
TEST_ERROR;
/* Copy an external link across files. Should succeed. */
if (H5Lcopy(grp_2, "ext", file_b, "ext_new_name", H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (H5Lexists(file_b, "ext_new_name", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(file_b, "ext_new_name", H5P_DEFAULT) != true)
TEST_ERROR;
/* Move a group across groups in the same file while renaming it. */
@@ -1693,13 +1696,13 @@ test_copy(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-test_move_preserves(hid_t fapl_id, hbool_t new_format)
+test_move_preserves(hid_t fapl_id, bool new_format)
{
- hid_t file_id = -1;
- hid_t group_id = -1;
- hid_t fcpl_id = -1; /* Group creation property list ID */
- hid_t lcpl_id = -1;
- hid_t lcpl2_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t group_id = H5I_INVALID_HID;
+ hid_t fcpl_id = H5I_INVALID_HID; /* Group creation property list ID */
+ hid_t lcpl_id = H5I_INVALID_HID;
+ hid_t lcpl2_id = H5I_INVALID_HID;
H5O_info2_t oinfo;
H5L_info2_t linfo;
H5T_cset_t old_cset;
@@ -1756,7 +1759,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format)
old_cset = linfo.cset;
if (old_cset != H5T_CSET_UTF8)
TEST_ERROR;
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
old_corder = linfo.corder;
if (old_corder != 0)
@@ -1783,7 +1786,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format)
TEST_ERROR;
if (old_cset != linfo.cset)
TEST_ERROR;
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
if (old_corder != linfo.corder)
TEST_ERROR;
@@ -1800,7 +1803,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format)
TEST_ERROR;
if (old_corder == linfo.corder)
TEST_ERROR;
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
if (linfo.corder != 1)
TEST_ERROR;
@@ -1819,7 +1822,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format)
TEST_ERROR;
if (H5Lget_info2(file_id, "group_copied", &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
if (linfo.corder != 2)
TEST_ERROR;
@@ -1837,7 +1840,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format)
TEST_ERROR;
if (H5Lget_info2(file_id, "group_copied2", &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
if (linfo.corder != 3)
TEST_ERROR;
@@ -1853,7 +1856,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format)
TEST_ERROR;
if (H5Lget_info2(file_id, "group", &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
if (old_corder != linfo.corder)
TEST_ERROR;
@@ -1871,7 +1874,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format)
TEST_ERROR;
if (H5Lget_info2(file_id, "group_moved", &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
if (linfo.corder != 4)
TEST_ERROR;
@@ -1889,7 +1892,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format)
TEST_ERROR;
if (H5Lget_info2(file_id, "group_moved_again", &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
if (linfo.corder != 5)
TEST_ERROR;
@@ -1933,11 +1936,11 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format)
*/
#ifndef H5_NO_DEPRECATED_SYMBOLS
static int
-test_deprec(hid_t fapl, hbool_t new_format)
+test_deprec(hid_t fapl, bool new_format)
{
- hid_t file_id = -1;
- hid_t group1_id = -1;
- hid_t group2_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t group1_id = H5I_INVALID_HID;
+ hid_t group2_id = H5I_INVALID_HID;
H5G_stat_t sb_hard1, sb_hard2, sb_soft1, sb_soft2;
H5G_obj_t obj_type; /* Object type */
hsize_t num_objs; /* Number of objects in a group */
@@ -1966,7 +1969,7 @@ test_deprec(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
if (H5Gget_comment(file_id, "group1", sizeof(tmpstr), tmpstr) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(tmpstr, "comment") != 0)
+ if (strcmp(tmpstr, "comment") != 0)
TEST_ERROR;
/* Create links using H5Glink and H5Glink2 */
@@ -1982,7 +1985,7 @@ test_deprec(hid_t fapl, hbool_t new_format)
/* Test getting the names for objects */
if (H5Gget_objname_by_idx(group1_id, (hsize_t)0, tmpstr, sizeof(tmpstr)) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(tmpstr, "link_to_group2") != 0)
+ if (strcmp(tmpstr, "link_to_group2") != 0)
TEST_ERROR;
H5E_BEGIN_TRY
{
@@ -2014,63 +2017,63 @@ test_deprec(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* Test that H5Glink created hard links properly */
- if (H5Gget_objinfo(file_id, "/group2", TRUE, &sb_hard1) < 0)
+ if (H5Gget_objinfo(file_id, "/group2", true, &sb_hard1) < 0)
FAIL_STACK_ERROR;
- if (H5Gget_objinfo(file_id, "/group1/link_to_group2", TRUE, &sb_hard2) < 0)
+ if (H5Gget_objinfo(file_id, "/group1/link_to_group2", true, &sb_hard2) < 0)
FAIL_STACK_ERROR;
if (memcmp(&sb_hard1.objno, sb_hard2.objno, sizeof(sb_hard1.objno)) != 0) {
H5_FAILED();
- HDputs(" Hard link test failed. Link seems not to point to the ");
- HDputs(" expected file location.");
+ puts(" Hard link test failed. Link seems not to point to the ");
+ puts(" expected file location.");
TEST_ERROR;
} /* end if */
/* Test for the other hard link created */
- if (H5Gget_objinfo(file_id, "/group1", TRUE, &sb_hard1) < 0)
+ if (H5Gget_objinfo(file_id, "/group1", true, &sb_hard1) < 0)
FAIL_STACK_ERROR;
- if (H5Gget_objinfo(file_id, "/group2/link_to_group1", TRUE, &sb_hard2) < 0)
+ if (H5Gget_objinfo(file_id, "/group2/link_to_group1", true, &sb_hard2) < 0)
FAIL_STACK_ERROR;
if (memcmp(&sb_hard1.objno, sb_hard2.objno, sizeof(sb_hard1.objno)) != 0) {
H5_FAILED();
- HDputs(" Hard link test failed. Link seems not to point to the ");
- HDputs(" expected file location.");
+ puts(" Hard link test failed. Link seems not to point to the ");
+ puts(" expected file location.");
TEST_ERROR;
} /* end if */
/* Test the soft link */
- if (H5Gget_objinfo(file_id, "/group2/soft_link_to_group1", FALSE, &sb_soft1) < 0)
+ if (H5Gget_objinfo(file_id, "/group2/soft_link_to_group1", false, &sb_soft1) < 0)
FAIL_STACK_ERROR;
if (sb_soft1.type != H5G_LINK)
TEST_ERROR;
- if (sb_soft1.linklen != HDstrlen("link_to_group1") + 1)
+ if (sb_soft1.linklen != strlen("link_to_group1") + 1)
TEST_ERROR;
if (H5Gget_linkval(group2_id, "soft_link_to_group1", sb_soft1.linklen, tmpstr) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp("link_to_group1", tmpstr) != 0)
+ if (strcmp("link_to_group1", tmpstr) != 0)
TEST_ERROR;
/* Test non-existing links with H5Gget_objinfo */
H5E_BEGIN_TRY
{
- if (H5Gget_objinfo(file_id, "/group2/soft_link_no_exist", TRUE, NULL) >= 0)
+ if (H5Gget_objinfo(file_id, "/group2/soft_link_no_exist", true, NULL) >= 0)
FAIL_STACK_ERROR;
}
H5E_END_TRY
/* Test the dangling soft link */
- if (H5Gget_objinfo(file_id, "/group2/dangle_soft_link", FALSE, &sb_soft2) < 0)
+ if (H5Gget_objinfo(file_id, "/group2/dangle_soft_link", false, &sb_soft2) < 0)
FAIL_STACK_ERROR;
if (sb_soft2.type != H5G_LINK)
TEST_ERROR;
- if (sb_soft2.linklen != HDstrlen("dangle") + 1)
+ if (sb_soft2.linklen != strlen("dangle") + 1)
TEST_ERROR;
if (H5Gget_linkval(group2_id, "dangle_soft_link", sb_soft2.linklen, tmpstr) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp("dangle", tmpstr) != 0)
+ if (strcmp("dangle", tmpstr) != 0)
TEST_ERROR;
/* Test H5Gmove and H5Gmove2 */
@@ -2135,7 +2138,7 @@ test_deprec(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-cklinks_deprec(hid_t fapl, hbool_t new_format)
+cklinks_deprec(hid_t fapl, bool new_format)
{
hid_t file;
H5O_info1_t oinfo1, oinfo2;
@@ -2167,19 +2170,19 @@ cklinks_deprec(hid_t fapl, hbool_t new_format)
} /* end if */
if (H5_addr_ne(oinfo1.addr, oinfo2.addr)) {
H5_FAILED();
- HDputs(" Hard link test failed. Link seems not to point to the ");
- HDputs(" expected file location.");
+ puts(" Hard link test failed. Link seems not to point to the ");
+ puts(" expected file location.");
TEST_ERROR;
} /* end if */
- if (H5Lexists(file, "/", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(file, "/", H5P_DEFAULT) != true)
FAIL_STACK_ERROR;
- if (H5Lexists(file, "d1", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(file, "d1", H5P_DEFAULT) != true)
FAIL_STACK_ERROR;
- if (H5Lexists(file, "grp1/hard", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(file, "grp1/hard", H5P_DEFAULT) != true)
FAIL_STACK_ERROR;
- if (H5Lexists(file, "/grp1", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(file, "/grp1", H5P_DEFAULT) != true)
FAIL_STACK_ERROR;
- if (H5Lexists(file, "/grp1/hard", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(file, "/grp1/hard", H5P_DEFAULT) != true)
FAIL_STACK_ERROR;
H5E_BEGIN_TRY
{
@@ -2188,7 +2191,7 @@ cklinks_deprec(hid_t fapl, hbool_t new_format)
H5E_END_TRY
if (exists >= 0) {
H5_FAILED();
- HDputs(" H5Lexists() should have failed for a path with missing components.");
+ puts(" H5Lexists() should have failed for a path with missing components.");
TEST_ERROR;
} /* end if */
H5E_BEGIN_TRY
@@ -2198,7 +2201,7 @@ cklinks_deprec(hid_t fapl, hbool_t new_format)
H5E_END_TRY
if (exists >= 0) {
H5_FAILED();
- HDputs(" H5Lexists() should have failed for a path with missing components.");
+ puts(" H5Lexists() should have failed for a path with missing components.");
TEST_ERROR;
} /* end if */
@@ -2212,18 +2215,18 @@ cklinks_deprec(hid_t fapl, hbool_t new_format)
} /* end if */
if (H5_addr_ne(oinfo1.addr, oinfo2.addr)) {
H5_FAILED();
- HDputs(" Soft link test failed. Link seems not to point to the ");
- HDputs(" expected file location.");
+ puts(" Soft link test failed. Link seems not to point to the ");
+ puts(" expected file location.");
TEST_ERROR;
} /* end if */
if (H5Lget_val(file, "grp1/soft", linkval, sizeof linkval, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(linkval, "/d1") != 0) {
+ if (strcmp(linkval, "/d1") != 0) {
H5_FAILED();
- HDputs(" Soft link test failed. Wrong link value");
+ puts(" Soft link test failed. Wrong link value");
TEST_ERROR;
} /* end if */
- if (H5Lexists(file, "grp1/soft", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(file, "grp1/soft", H5P_DEFAULT) != true)
FAIL_STACK_ERROR;
/* Dangling link */
@@ -2234,7 +2237,7 @@ cklinks_deprec(hid_t fapl, hbool_t new_format)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" H5Oget_info_by_name() should have failed for a dangling link.");
+ puts(" H5Oget_info_by_name() should have failed for a dangling link.");
TEST_ERROR;
} /* end if */
if (H5Lget_info1(file, "grp1/dangle", &linfo, H5P_DEFAULT) < 0)
@@ -2249,12 +2252,12 @@ cklinks_deprec(hid_t fapl, hbool_t new_format)
printf(" %d: Can't retrieve link value\n", __LINE__);
TEST_ERROR;
} /* end if */
- if (HDstrcmp(linkval, "foobar") != 0) {
+ if (strcmp(linkval, "foobar") != 0) {
H5_FAILED();
- HDputs(" Dangling link test failed. Wrong link value");
+ puts(" Dangling link test failed. Wrong link value");
TEST_ERROR;
} /* end if */
- if (H5Lexists(file, "grp1/dangle", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(file, "grp1/dangle", H5P_DEFAULT) != true)
FAIL_STACK_ERROR;
/* Recursive link */
@@ -2265,7 +2268,7 @@ cklinks_deprec(hid_t fapl, hbool_t new_format)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" H5Oget_info_by_name() should have failed for a recursive link.");
+ puts(" H5Oget_info_by_name() should have failed for a recursive link.");
TEST_ERROR;
} /* end if */
if (H5Lget_info1(file, "grp1/recursive", &linfo, H5P_DEFAULT) < 0)
@@ -2280,14 +2283,14 @@ cklinks_deprec(hid_t fapl, hbool_t new_format)
printf(" %d: Can't retrieve link value\n", __LINE__);
TEST_ERROR;
} /* end if */
- if (HDstrcmp(linkval, "/grp1/recursive") != 0) {
+ if (strcmp(linkval, "/grp1/recursive") != 0) {
H5_FAILED();
- HDputs(" Recursive link test failed. Wrong link value");
+ puts(" Recursive link test failed. Wrong link value");
TEST_ERROR;
} /* end if */
/* Non-existent link */
- if (H5Lexists(file, "foobar", H5P_DEFAULT) == TRUE)
+ if (H5Lexists(file, "foobar", H5P_DEFAULT) == true)
FAIL_STACK_ERROR;
/* Cleanup */
@@ -2311,14 +2314,14 @@ cklinks_deprec(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-test_lcpl_deprec(hid_t fapl, hbool_t new_format)
+test_lcpl_deprec(hid_t fapl, bool new_format)
{
- hid_t file_id = -1;
- hid_t group_id = -1;
- hid_t space_id = -1;
- hid_t dset_id = -1;
- hid_t type_id = -1;
- hid_t lcpl_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t group_id = H5I_INVALID_HID;
+ hid_t space_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t type_id = H5I_INVALID_HID;
+ hid_t lcpl_id = H5I_INVALID_HID;
H5L_info1_t linfo;
char filename[1024];
hsize_t dims[2];
@@ -2525,13 +2528,13 @@ test_lcpl_deprec(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-test_move_preserves_deprec(hid_t fapl_id, hbool_t new_format)
+test_move_preserves_deprec(hid_t fapl_id, bool new_format)
{
- hid_t file_id = -1;
- hid_t group_id = -1;
- hid_t fcpl_id = -1; /* Group creation property list ID */
- hid_t lcpl_id = -1;
- hid_t lcpl2_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t group_id = H5I_INVALID_HID;
+ hid_t fcpl_id = H5I_INVALID_HID; /* Group creation property list ID */
+ hid_t lcpl_id = H5I_INVALID_HID;
+ hid_t lcpl2_id = H5I_INVALID_HID;
H5O_info1_t oinfo;
H5L_info1_t linfo;
H5T_cset_t old_cset;
@@ -2589,7 +2592,7 @@ test_move_preserves_deprec(hid_t fapl_id, hbool_t new_format)
old_cset = linfo.cset;
if (old_cset != H5T_CSET_UTF8)
TEST_ERROR;
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
old_corder = linfo.corder;
if (old_corder != 0)
@@ -2616,7 +2619,7 @@ test_move_preserves_deprec(hid_t fapl_id, hbool_t new_format)
TEST_ERROR;
if (old_cset != linfo.cset)
TEST_ERROR;
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
if (old_corder != linfo.corder)
TEST_ERROR;
@@ -2633,7 +2636,7 @@ test_move_preserves_deprec(hid_t fapl_id, hbool_t new_format)
TEST_ERROR;
if (old_corder == linfo.corder)
TEST_ERROR;
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
if (linfo.corder != 1)
TEST_ERROR;
@@ -2652,7 +2655,7 @@ test_move_preserves_deprec(hid_t fapl_id, hbool_t new_format)
TEST_ERROR;
if (H5Lget_info1(file_id, "group_copied", &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
if (linfo.corder != 2)
TEST_ERROR;
@@ -2670,7 +2673,7 @@ test_move_preserves_deprec(hid_t fapl_id, hbool_t new_format)
TEST_ERROR;
if (H5Lget_info1(file_id, "group_copied2", &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
if (linfo.corder != 3)
TEST_ERROR;
@@ -2686,7 +2689,7 @@ test_move_preserves_deprec(hid_t fapl_id, hbool_t new_format)
TEST_ERROR;
if (H5Lget_info1(file_id, "group", &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
if (old_corder != linfo.corder)
TEST_ERROR;
@@ -2704,7 +2707,7 @@ test_move_preserves_deprec(hid_t fapl_id, hbool_t new_format)
TEST_ERROR;
if (H5Lget_info1(file_id, "group_moved", &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
if (linfo.corder != 4)
TEST_ERROR;
@@ -2722,7 +2725,7 @@ test_move_preserves_deprec(hid_t fapl_id, hbool_t new_format)
TEST_ERROR;
if (H5Lget_info1(file_id, "group_moved_again", &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
if (linfo.corder != 5)
TEST_ERROR;
@@ -2765,12 +2768,12 @@ test_move_preserves_deprec(hid_t fapl_id, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_link_root_deprec(hid_t fapl, hbool_t new_format)
+external_link_root_deprec(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- H5L_info1_t linfo; /* Link information */
- char objname[NAME_BUF_SIZE]; /* Object name */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ H5L_info1_t linfo; /* Link information */
+ char objname[NAME_BUF_SIZE]; /* Object name */
char filename1[NAME_BUF_SIZE];
char filename2[NAME_BUF_SIZE];
const char *file; /* File from external link */
@@ -2794,7 +2797,7 @@ external_link_root_deprec(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* Check that external links are registered with the library */
- if (H5Lis_registered(H5L_TYPE_EXTERNAL) != TRUE)
+ if (H5Lis_registered(H5L_TYPE_EXTERNAL) != true)
TEST_ERROR;
/* Create file with link to first file */
@@ -2810,21 +2813,21 @@ external_link_root_deprec(hid_t fapl, hbool_t new_format)
goto error;
if (H5L_TYPE_EXTERNAL != linfo.type) {
H5_FAILED();
- HDputs(" Unexpected object type - should have been an external link");
+ puts(" Unexpected object type - should have been an external link");
goto error;
}
if (H5Lget_val(fid, "ext_link", objname, sizeof(objname), H5P_DEFAULT) < 0)
TEST_ERROR;
if (H5Lunpack_elink_val(objname, linfo.u.val_size, NULL, &file, &path) < 0)
TEST_ERROR;
- if (HDstrcmp(file, filename1) != 0) {
+ if (strcmp(file, filename1) != 0) {
H5_FAILED();
- HDputs(" External link file name incorrect");
+ puts(" External link file name incorrect");
goto error;
}
- if (HDstrcmp(path, "/") != 0) {
+ if (strcmp(path, "/") != 0) {
H5_FAILED();
- HDputs(" External link path incorrect");
+ puts(" External link path incorrect");
goto error;
}
@@ -2838,21 +2841,21 @@ external_link_root_deprec(hid_t fapl, hbool_t new_format)
goto error;
if (H5L_TYPE_EXTERNAL != linfo.type) {
H5_FAILED();
- HDputs(" Unexpected object type - should have been an external link");
+ puts(" Unexpected object type - should have been an external link");
goto error;
}
if (H5Lget_val(fid, "ext_link", objname, sizeof(objname), H5P_DEFAULT) < 0)
TEST_ERROR;
if (H5Lunpack_elink_val(objname, linfo.u.val_size, NULL, &file, &path) < 0)
TEST_ERROR;
- if (HDstrcmp(file, filename1) != 0) {
+ if (strcmp(file, filename1) != 0) {
H5_FAILED();
- HDputs(" External link file name incorrect");
+ puts(" External link file name incorrect");
goto error;
}
- if (HDstrcmp(path, "/") != 0) {
+ if (strcmp(path, "/") != 0) {
H5_FAILED();
- HDputs(" External link path incorrect");
+ puts(" External link path incorrect");
goto error;
}
@@ -2869,7 +2872,7 @@ external_link_root_deprec(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/") != 0)
+ if (strcmp(objname, "/") != 0)
TEST_ERROR;
/* Create object in external file */
@@ -2914,11 +2917,11 @@ external_link_root_deprec(hid_t fapl, hbool_t new_format)
/* Check names */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/new_group") != 0)
+ if (strcmp(objname, "/new_group") != 0)
TEST_ERROR;
if (H5Iget_name(gid2, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/newer_group") != 0)
+ if (strcmp(objname, "/newer_group") != 0)
TEST_ERROR;
/* Close opened objects */
@@ -2984,14 +2987,14 @@ external_link_root_deprec(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_link_query_deprec(hid_t fapl, hbool_t new_format)
+external_link_query_deprec(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
- const char *file_name; /* Name of the file the external link points to */
- const char *object_name; /* Name of the object the external link points to */
- H5O_info1_t oi; /* Object information */
- H5L_info1_t li; /* Link information */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
+ const char *file_name; /* Name of the file the external link points to */
+ const char *object_name; /* Name of the object the external link points to */
+ H5O_info1_t oi; /* Object information */
+ H5L_info1_t li; /* Link information */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], /* Names of files to externally link across */
query_buf[NAME_BUF_SIZE]; /* Buffer to hold query result */
@@ -3016,11 +3019,11 @@ external_link_query_deprec(hid_t fapl, hbool_t new_format)
/* Get size of buffer for external link */
if (H5Lget_info1(fid, "src", &li, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (li.u.val_size != (1 + (HDstrlen(filename2) + 1) + (HDstrlen("/dst") + 1)))
+ if (li.u.val_size != (1 + (strlen(filename2) + 1) + (strlen("/dst") + 1)))
TEST_ERROR;
if (H5L_TYPE_EXTERNAL != li.type) {
H5_FAILED();
- HDputs(" Unexpected link class - should have been an external link");
+ puts(" Unexpected link class - should have been an external link");
goto error;
}
@@ -3049,11 +3052,11 @@ external_link_query_deprec(hid_t fapl, hbool_t new_format)
/* Get size of buffer for external link */
if (H5Lget_info1(fid, "src", &li, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (li.u.val_size != (1 + (HDstrlen(filename2) + 1) + (HDstrlen("/dst") + 1)))
+ if (li.u.val_size != (1 + (strlen(filename2) + 1) + (strlen("/dst") + 1)))
TEST_ERROR;
if (H5L_TYPE_EXTERNAL != li.type) {
H5_FAILED();
- HDputs(" Unexpected link class - should have been an external link");
+ puts(" Unexpected link class - should have been an external link");
goto error;
}
@@ -3066,9 +3069,9 @@ external_link_query_deprec(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* Compare the file and object names */
- if (HDstrcmp(file_name, filename2) != 0)
+ if (strcmp(file_name, filename2) != 0)
TEST_ERROR;
- if (HDstrcmp(object_name, "/dst") != 0)
+ if (strcmp(object_name, "/dst") != 0)
TEST_ERROR;
/* Query information about object that external link points to */
@@ -3076,7 +3079,7 @@ external_link_query_deprec(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
if (H5O_TYPE_GROUP != oi.type) {
H5_FAILED();
- HDputs(" Unexpected object type - should have been a group");
+ puts(" Unexpected object type - should have been a group");
goto error;
}
@@ -3138,11 +3141,13 @@ external_link_query_deprec(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_link_closing_deprec(hid_t fapl, hbool_t new_format)
+external_link_closing_deprec(hid_t fapl, bool new_format)
{
- hid_t fid1 = (-1), fid2 = (-1), fid3 = (-1), fid4 = (-1);
- hid_t gid = (-1), tid = (-1), tid2 = (-1), sid = (-1), did = (-1);
- hid_t lcpl_id = (-1);
+ hid_t fid1 = (H5I_INVALID_HID), fid2 = (H5I_INVALID_HID), fid3 = (H5I_INVALID_HID),
+ fid4 = (H5I_INVALID_HID);
+ hid_t gid = (H5I_INVALID_HID), tid = (H5I_INVALID_HID), tid2 = (H5I_INVALID_HID), sid = (H5I_INVALID_HID),
+ did = (H5I_INVALID_HID);
+ hid_t lcpl_id = (H5I_INVALID_HID);
hsize_t dims[2];
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE],
filename4[NAME_BUF_SIZE], /* Names of files to externally link across */
@@ -3262,7 +3267,7 @@ external_link_closing_deprec(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
if (H5Oget_comment_by_name(fid1, "elink/elink/elink/group1_moved", buf, sizeof(buf), H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(buf, "comment") != 0)
+ if (strcmp(buf, "comment") != 0)
TEST_ERROR;
/* Test H5*open */
@@ -3366,7 +3371,7 @@ external_link_closing_deprec(hid_t fapl, hbool_t new_format)
/* Add a few regular groups and a soft link in file2 using intermediate group creation */
if ((lcpl_id = H5Pcreate(H5P_LINK_CREATE)) < 0)
TEST_ERROR;
- if (H5Pset_create_intermediate_group(lcpl_id, TRUE) < 0)
+ if (H5Pset_create_intermediate_group(lcpl_id, true) < 0)
TEST_ERROR;
if (H5Lcreate_soft("/elink2", fid1, "elink/file2group1/file2group2/slink", lcpl_id, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -3449,7 +3454,7 @@ UD_hard_create_deprec(const char H5_ATTR_UNUSED *link_name, hid_t loc_group, con
size_t udata_size, hid_t H5_ATTR_UNUSED lcpl_id)
{
haddr_t addr;
- hid_t target_obj = -1;
+ hid_t target_obj = H5I_INVALID_HID;
herr_t ret_value = 0;
if (udata_size != sizeof(haddr_t)) {
@@ -3523,7 +3528,7 @@ UD_hard_traverse_deprec(const char H5_ATTR_UNUSED *link_name, hid_t cur_group, c
size_t udata_size, hid_t H5_ATTR_UNUSED lapl_id, hid_t H5_ATTR_UNUSED dxpl_id)
{
haddr_t addr;
- hid_t ret_value = -1;
+ hid_t ret_value = H5I_INVALID_HID;
if (udata_size != sizeof(haddr_t))
return FAIL;
@@ -3540,7 +3545,7 @@ static herr_t
UD_hard_delete_deprec(const char H5_ATTR_UNUSED *link_name, hid_t file, const void *udata, size_t udata_size)
{
haddr_t addr;
- hid_t target_obj = -1;
+ hid_t target_obj = H5I_INVALID_HID;
herr_t ret_value = 0;
if (udata_size != sizeof(haddr_t)) {
@@ -3611,11 +3616,11 @@ UD_hard_delete_deprec(const char H5_ATTR_UNUSED *link_name, hid_t file, const vo
static int
ud_hard_links_deprec(hid_t fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- H5L_info1_t li; /* Link information */
- char objname[NAME_BUF_SIZE]; /* Object name */
- h5_stat_size_t empty_size; /* Size of an empty file */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ H5L_info1_t li; /* Link information */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ h5_stat_size_t empty_size; /* Size of an empty file */
char filename[NAME_BUF_SIZE];
TESTING("user-defined hard link using deprecated routines (w/new group format)");
@@ -3636,9 +3641,9 @@ ud_hard_links_deprec(hid_t fapl)
TEST_ERROR;
/* Check that external links are registered and UD hard links are not */
- if (H5Lis_registered(H5L_TYPE_EXTERNAL) != TRUE)
+ if (H5Lis_registered(H5L_TYPE_EXTERNAL) != true)
TEST_ERROR;
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != FALSE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != false)
TEST_ERROR;
/* Register "user-defined hard links" with the library */
@@ -3646,9 +3651,9 @@ ud_hard_links_deprec(hid_t fapl)
TEST_ERROR;
/* Check that UD hard links are now registered */
- if (H5Lis_registered(H5L_TYPE_EXTERNAL) != TRUE)
+ if (H5Lis_registered(H5L_TYPE_EXTERNAL) != true)
TEST_ERROR;
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != TRUE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != true)
TEST_ERROR;
/* Create a group for the UD hard link to point to */
@@ -3681,7 +3686,7 @@ ud_hard_links_deprec(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/group") != 0)
+ if (strcmp(objname, "/group") != 0)
TEST_ERROR;
/* Create object in group */
@@ -3701,7 +3706,7 @@ ud_hard_links_deprec(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/group/new_group") != 0)
+ if (strcmp(objname, "/group/new_group") != 0)
TEST_ERROR;
/* Close opened object */
@@ -3716,7 +3721,7 @@ ud_hard_links_deprec(hid_t fapl)
TEST_ERROR;
if (UD_HARD_TYPE != li.type) {
H5_FAILED();
- HDputs(" Unexpected link class - should have been a UD hard link");
+ puts(" Unexpected link class - should have been a UD hard link");
goto error;
} /* end if */
@@ -3768,10 +3773,10 @@ ud_hard_links_deprec(hid_t fapl)
static int
ud_link_reregister_deprec(hid_t fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- H5L_info1_t li; /* Link information */
- char objname[NAME_BUF_SIZE]; /* Object name */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ H5L_info1_t li; /* Link information */
+ char objname[NAME_BUF_SIZE]; /* Object name */
char filename[NAME_BUF_SIZE];
h5_stat_size_t empty_size; /* Size of an empty file */
@@ -3793,7 +3798,7 @@ ud_link_reregister_deprec(hid_t fapl)
TEST_ERROR;
/* Check that UD hard links are not registered */
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != FALSE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != false)
TEST_ERROR;
/* Register "user-defined hard links" with the library */
@@ -3801,7 +3806,7 @@ ud_link_reregister_deprec(hid_t fapl)
TEST_ERROR;
/* Check that UD hard links are registered */
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != TRUE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != true)
TEST_ERROR;
/* Point a UD defined hard link to a group in the same way as the previous test */
@@ -3827,7 +3832,7 @@ ud_link_reregister_deprec(hid_t fapl)
TEST_ERROR;
/* Check that UD hard links are no longer registered */
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != FALSE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != false)
TEST_ERROR;
/* Verify that we can't traverse the ud link anymore */
@@ -3852,7 +3857,7 @@ ud_link_reregister_deprec(hid_t fapl)
TEST_ERROR;
/* Check that UD hard links are registered again */
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != TRUE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != true)
TEST_ERROR;
/* Open a group through the ud link (now a different class of link).
@@ -3864,7 +3869,7 @@ ud_link_reregister_deprec(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/" REREG_TARGET_NAME) != 0)
+ if (strcmp(objname, "/" REREG_TARGET_NAME) != 0)
TEST_ERROR;
/* Create object in group */
@@ -3884,7 +3889,7 @@ ud_link_reregister_deprec(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/rereg_target/new_group") != 0)
+ if (strcmp(objname, "/rereg_target/new_group") != 0)
TEST_ERROR;
/* Close opened object */
@@ -3901,7 +3906,7 @@ ud_link_reregister_deprec(hid_t fapl)
* other link type */
if (H5Lregister(UD_hard_class_deprec) < 0)
FAIL_STACK_ERROR;
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != TRUE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != true)
FAIL_STACK_ERROR;
/* Ensure we can open the group through the UD link (now that UD hard
@@ -3932,7 +3937,7 @@ ud_link_reregister_deprec(hid_t fapl)
if (H5Lunregister((H5L_type_t)UD_HARD_TYPE) < 0)
FAIL_STACK_ERROR;
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != FALSE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != false)
FAIL_STACK_ERROR;
PASSED();
@@ -3950,11 +3955,11 @@ ud_link_reregister_deprec(hid_t fapl)
} /* end ud_link_reregister_deprec() */
static int
-ud_callbacks_deprec(hid_t fapl, hbool_t new_format)
+ud_callbacks_deprec(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group ID */
- hid_t lcpl = -1; /* Link Creation PL */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t lcpl = H5I_INVALID_HID; /* Link Creation PL */
H5L_info1_t li; /* Link information */
char ud_target_name[] = UD_CB_TARGET; /* Link target name */
char filename[NAME_BUF_SIZE];
@@ -3972,11 +3977,11 @@ ud_callbacks_deprec(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* Check that registered link classes are, and unregistered ones aren't */
- if (H5Lis_registered(H5L_TYPE_EXTERNAL) != TRUE)
+ if (H5Lis_registered(H5L_TYPE_EXTERNAL) != true)
TEST_ERROR;
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != FALSE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != false)
TEST_ERROR;
- if (H5Lis_registered((H5L_type_t)UD_CB_TYPE) != FALSE)
+ if (H5Lis_registered((H5L_type_t)UD_CB_TYPE) != false)
TEST_ERROR;
/* Hit two birds with one stone: register UD hard links from previous
@@ -3990,11 +3995,11 @@ ud_callbacks_deprec(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* Check that registered link classes are, and unregistered ones aren't */
- if (H5Lis_registered(H5L_TYPE_EXTERNAL) != TRUE)
+ if (H5Lis_registered(H5L_TYPE_EXTERNAL) != true)
TEST_ERROR;
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != TRUE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != true)
TEST_ERROR;
- if (H5Lis_registered((H5L_type_t)UD_CB_TYPE) != TRUE)
+ if (H5Lis_registered((H5L_type_t)UD_CB_TYPE) != true)
TEST_ERROR;
/* Create a group for the UD link to point to */
@@ -4021,14 +4026,14 @@ ud_callbacks_deprec(hid_t fapl, hbool_t new_format)
TEST_ERROR;
if (UD_CB_TYPE != li.type) {
H5_FAILED();
- HDputs(" Unexpected link class - should have been a UD hard link");
+ puts(" Unexpected link class - should have been a UD hard link");
goto error;
}
/* Fill the query buffer */
if (H5Lget_val(fid, UD_CB_LINK_NAME, query_buf, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(query_buf, "query succeeded") != 0)
+ if (strcmp(query_buf, "query succeeded") != 0)
TEST_ERROR;
/* Move the link */
@@ -4127,14 +4132,14 @@ ud_callbacks_deprec(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-lapl_nlinks_deprec(hid_t fapl, hbool_t new_format)
+lapl_nlinks_deprec(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t plist = -1; /* lapl ID */
- hid_t tid = -1, sid = -1, did = -1; /* Other IDs */
- hid_t gapl = -1, dapl = -1, tapl = -1; /* Other property lists */
- char objname[NAME_BUF_SIZE]; /* Object name */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t plist = H5I_INVALID_HID; /* lapl ID */
+ hid_t tid = H5I_INVALID_HID, sid = H5I_INVALID_HID, did = H5I_INVALID_HID; /* Other IDs */
+ hid_t gapl = H5I_INVALID_HID, dapl = H5I_INVALID_HID, tapl = H5I_INVALID_HID; /* Other property lists */
+ char objname[NAME_BUF_SIZE]; /* Object name */
char filename[NAME_BUF_SIZE];
size_t nlinks; /* nlinks for H5Pset_nlinks */
hsize_t dims[2];
@@ -4228,7 +4233,7 @@ lapl_nlinks_deprec(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/soft17") != 0)
+ if (strcmp(objname, "/soft17") != 0)
TEST_ERROR;
/* Create group using soft link */
@@ -4261,7 +4266,7 @@ lapl_nlinks_deprec(hid_t fapl, hbool_t new_format)
H5E_END_TRY
if (gid >= 0) {
H5_FAILED();
- HDputs(" Should have failed for sequence of too many nested links.");
+ puts(" Should have failed for sequence of too many nested links.");
goto error;
}
@@ -4272,7 +4277,7 @@ lapl_nlinks_deprec(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/soft4") != 0)
+ if (strcmp(objname, "/soft4") != 0)
TEST_ERROR;
/* Test other functions that should use a LAPL */
@@ -4434,13 +4439,13 @@ lapl_nlinks_deprec(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-linkinfo_deprec(hid_t fapl, hbool_t new_format)
+linkinfo_deprec(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group ID */
- hid_t tid = -1; /* Type ID */
- hid_t sid = -1, did = -1; /* Dataspace and dataset IDs */
- H5L_info1_t li; /* Link information */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t tid = H5I_INVALID_HID; /* Type ID */
+ hid_t sid = H5I_INVALID_HID, did = H5I_INVALID_HID; /* Dataspace and dataset IDs */
+ H5L_info1_t li; /* Link information */
char filename[NAME_BUF_SIZE];
if (new_format)
@@ -4549,15 +4554,15 @@ linkinfo_deprec(hid_t fapl, hbool_t new_format)
static int
corder_create_compact_deprec(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1, group_id2 = -1; /* Group IDs */
- hid_t gcpl_id = -1; /* Group creation property list ID */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- unsigned nlinks; /* Number of link messages in group's header */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char filename[NAME_BUF_SIZE]; /* File name */
- unsigned u; /* Local index variable */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID, group_id2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t gcpl_id = H5I_INVALID_HID; /* Group creation property list ID */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ unsigned nlinks; /* Number of link messages in group's header */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ unsigned u; /* Local index variable */
TESTING("creating compact group with creation order indexing using deprecated routines");
@@ -4579,11 +4584,11 @@ corder_create_compact_deprec(hid_t fapl)
TEST_ERROR;
/* Check on group's initial status */
- if (H5G__is_empty_test(group_id) != TRUE)
+ if (H5G__is_empty_test(group_id) != true)
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) == TRUE)
+ if (H5G__is_new_dense_test(group_id) == true)
TEST_ERROR;
/* Query the group creation properties */
@@ -4592,20 +4597,20 @@ corder_create_compact_deprec(hid_t fapl)
/* Create several links, but keep group in compact form */
for (u = 0; u < max_compact; u++) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(group_id2) < 0)
TEST_ERROR;
/* Verify state of group */
- if (H5G__has_links_test(group_id, &nlinks) != TRUE)
+ if (H5G__has_links_test(group_id, &nlinks) != true)
TEST_ERROR;
if (nlinks != (u + 1))
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) == TRUE)
+ if (H5G__is_new_dense_test(group_id) == true)
TEST_ERROR;
} /* end for */
@@ -4630,13 +4635,13 @@ corder_create_compact_deprec(hid_t fapl)
FAIL_STACK_ERROR;
/* Verify state of group */
- if (H5G__has_links_test(group_id, &nlinks) != TRUE)
+ if (H5G__has_links_test(group_id, &nlinks) != true)
TEST_ERROR;
if (nlinks != max_compact)
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) == TRUE)
+ if (H5G__is_new_dense_test(group_id) == true)
TEST_ERROR;
/* Loop through links, checking their creation order values */
@@ -4645,12 +4650,12 @@ corder_create_compact_deprec(hid_t fapl)
H5L_info1_t linfo; /* Link information */
/* Retrieve information for link */
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if (H5Lget_info1(group_id, objname, &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
/* Verify creation order of link */
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
if (linfo.corder != u)
TEST_ERROR;
@@ -4691,17 +4696,17 @@ corder_create_compact_deprec(hid_t fapl)
static int
corder_create_dense_deprec(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1, group_id2 = -1; /* Group IDs */
- hid_t gcpl_id = -1; /* Group creation property list ID */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- unsigned nlinks; /* Number of link messages in group's header */
- hsize_t name_count; /* # of records in name index */
- hsize_t corder_count; /* # of records in creation order index */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char filename[NAME_BUF_SIZE]; /* File name */
- unsigned u; /* Local index variable */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID, group_id2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t gcpl_id = H5I_INVALID_HID; /* Group creation property list ID */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ unsigned nlinks; /* Number of link messages in group's header */
+ hsize_t name_count; /* # of records in name index */
+ hsize_t corder_count; /* # of records in creation order index */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ unsigned u; /* Local index variable */
TESTING("creating dense group with creation order indexing using deprecated routines");
@@ -4723,11 +4728,11 @@ corder_create_dense_deprec(hid_t fapl)
TEST_ERROR;
/* Check on group's initial status */
- if (H5G__is_empty_test(group_id) != TRUE)
+ if (H5G__is_empty_test(group_id) != true)
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) == TRUE)
+ if (H5G__is_new_dense_test(group_id) == true)
TEST_ERROR;
/* Query the group creation properties */
@@ -4736,36 +4741,36 @@ corder_create_dense_deprec(hid_t fapl)
/* Create several links, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(group_id2) < 0)
TEST_ERROR;
/* Verify state of group */
- if (H5G__has_links_test(group_id, &nlinks) != TRUE)
+ if (H5G__has_links_test(group_id, &nlinks) != true)
TEST_ERROR;
if (nlinks != (u + 1))
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) == TRUE)
+ if (H5G__is_new_dense_test(group_id) == true)
TEST_ERROR;
} /* end for */
/* Create another link, to push group into dense form */
- HDsnprintf(objname, sizeof(objname), "filler %u", max_compact);
+ snprintf(objname, sizeof(objname), "filler %u", max_compact);
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(group_id2) < 0)
TEST_ERROR;
/* Verify state of group */
- if (H5G__has_links_test(group_id, NULL) == TRUE)
+ if (H5G__has_links_test(group_id, NULL) == true)
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Retrieve & verify # of records in the name & creation order indices */
@@ -4795,11 +4800,11 @@ corder_create_dense_deprec(hid_t fapl)
FAIL_STACK_ERROR;
/* Verify state of group */
- if (H5G__has_links_test(group_id, NULL) == TRUE)
+ if (H5G__has_links_test(group_id, NULL) == true)
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Loop through links, checking their creation order values */
@@ -4808,12 +4813,12 @@ corder_create_dense_deprec(hid_t fapl)
H5L_info1_t linfo; /* Link information */
/* Retrieve information for link */
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if (H5Lget_info1(group_id, objname, &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
/* Verify creation order of link */
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
if (linfo.corder != u)
TEST_ERROR;
@@ -4855,8 +4860,7 @@ corder_create_dense_deprec(hid_t fapl)
*-------------------------------------------------------------------------
*/
static int
-link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, hbool_t hard_link,
- hbool_t use_index)
+link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, bool hard_link, bool use_index)
{
char tmpname[NAME_BUF_SIZE]; /* Temporary link name */
char valname[NAME_BUF_SIZE]; /* Link value name */
@@ -4864,7 +4868,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
H5L_info1_t linfo; /* Link info struct */
/* Make link value for increasing/native order queries */
- HDsnprintf(valname, sizeof(valname), "value %02u", (unsigned)n);
+ snprintf(valname, sizeof(valname), "value %02u", (unsigned)n);
/* Verify the link information for first link, in increasing creation order */
memset(&linfo, 0, sizeof(linfo));
@@ -4887,7 +4891,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end if */
@@ -4896,7 +4900,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpname, (size_t)NAME_BUF_SIZE,
H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(linkname, tmpname) != 0)
+ if (strcmp(linkname, tmpname) != 0)
TEST_ERROR;
/* Don't test "native" order if there is no creation order index, since
@@ -4926,7 +4930,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, n, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end if */
@@ -4935,7 +4939,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, n, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(linkname, tmpname) != 0)
+ if (strcmp(linkname, tmpname) != 0)
TEST_ERROR;
} /* end if */
@@ -4960,7 +4964,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end if */
@@ -4969,7 +4973,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(linkname, tmpname) != 0)
+ if (strcmp(linkname, tmpname) != 0)
TEST_ERROR;
/* Verify the link information for first link, in increasing link name order */
@@ -4992,7 +4996,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpval, (size_t)NAME_BUF_SIZE,
H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end if */
@@ -5001,7 +5005,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpname, (size_t)NAME_BUF_SIZE,
H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(linkname, tmpname) != 0)
+ if (strcmp(linkname, tmpname) != 0)
TEST_ERROR;
/* Don't test "native" order queries on link name order, since there's not
@@ -5028,7 +5032,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end if */
@@ -5037,7 +5041,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(linkname, tmpname) != 0)
+ if (strcmp(linkname, tmpname) != 0)
TEST_ERROR;
/* Success */
@@ -5061,26 +5065,26 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
static int
link_info_by_idx_deprec(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1; /* Group ID */
- hid_t gcpl_id = -1; /* Group creation property list ID */
- unsigned hard_link; /* Create hard or soft link? */
- unsigned use_index; /* Use index on creation order values */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- H5L_info1_t linfo; /* Link info struct */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char valname[NAME_BUF_SIZE]; /* Link value name */
- char filename[NAME_BUF_SIZE]; /* File name */
- char tmpname[NAME_BUF_SIZE]; /* Temporary link name */
- unsigned u; /* Local index variable */
- ssize_t name_len; /* Length of name */
- herr_t ret; /* Generic return value */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID; /* Group ID */
+ hid_t gcpl_id = H5I_INVALID_HID; /* Group creation property list ID */
+ unsigned hard_link; /* Create hard or soft link? */
+ unsigned use_index; /* Use index on creation order values */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ H5L_info1_t linfo; /* Link info struct */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char valname[NAME_BUF_SIZE]; /* Link value name */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ char tmpname[NAME_BUF_SIZE]; /* Temporary link name */
+ unsigned u; /* Local index variable */
+ ssize_t name_len; /* Length of name */
+ herr_t ret; /* Generic return value */
/* Loop over creating hard or soft links */
- for (hard_link = FALSE; hard_link <= TRUE; hard_link++) {
+ for (hard_link = false; hard_link <= true; hard_link++) {
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
if (hard_link) {
if (use_index)
TESTING("querying info by index w/creation order index, using hard links and deprecated "
@@ -5141,7 +5145,7 @@ link_info_by_idx_deprec(hid_t fapl)
/* Create several links, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Check for creating hard or soft link */
if (hard_link) {
@@ -5156,7 +5160,7 @@ link_info_by_idx_deprec(hid_t fapl)
} /* end if */
else {
/* Make value for link */
- HDsnprintf(valname, sizeof(valname), "value %02u", u);
+ snprintf(valname, sizeof(valname), "value %02u", u);
/* Create soft link */
if (H5Lcreate_soft(valname, group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
@@ -5169,7 +5173,7 @@ link_info_by_idx_deprec(hid_t fapl)
} /* end for */
/* Verify state of group */
- if (H5G__has_links_test(group_id, NULL) != TRUE)
+ if (H5G__has_links_test(group_id, NULL) != true)
TEST_ERROR;
/* Check for out of bound offset queries */
@@ -5201,7 +5205,7 @@ link_info_by_idx_deprec(hid_t fapl)
/* Create more links, to push group into dense form */
for (; u < (max_compact * 2); u++) {
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Check for creating hard or soft link */
if (hard_link) {
@@ -5216,7 +5220,7 @@ link_info_by_idx_deprec(hid_t fapl)
} /* end if */
else {
/* Make value for link */
- HDsnprintf(valname, sizeof(valname), "value %02u", u);
+ snprintf(valname, sizeof(valname), "value %02u", u);
/* Create soft link */
if (H5Lcreate_soft(valname, group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
@@ -5224,7 +5228,7 @@ link_info_by_idx_deprec(hid_t fapl)
} /* end else */
/* Verify state of group */
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Verify link information for new link */
@@ -5300,22 +5304,22 @@ link_info_by_idx_deprec(hid_t fapl)
static int
link_info_by_idx_old_deprec(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1, group_id2 = -1; /* Group IDs */
- unsigned hard_link; /* Create hard or soft link? */
- H5L_info1_t linfo; /* Link info struct */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char valname[NAME_BUF_SIZE]; /* Link value name */
- char filename[NAME_BUF_SIZE]; /* File name */
- haddr_t objno[CORDER_NLINKS]; /* Addresses of the objects created */
- char tmpname[NAME_BUF_SIZE]; /* Temporary link name */
- char tmpval[NAME_BUF_SIZE]; /* Temporary link value */
- unsigned u; /* Local index variable */
- ssize_t name_len; /* Length of name */
- herr_t ret; /* Generic return value */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID, group_id2 = H5I_INVALID_HID; /* Group IDs */
+ unsigned hard_link; /* Create hard or soft link? */
+ H5L_info1_t linfo; /* Link info struct */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char valname[NAME_BUF_SIZE]; /* Link value name */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ haddr_t objno[CORDER_NLINKS]; /* Addresses of the objects created */
+ char tmpname[NAME_BUF_SIZE]; /* Temporary link name */
+ char tmpval[NAME_BUF_SIZE]; /* Temporary link value */
+ unsigned u; /* Local index variable */
+ ssize_t name_len; /* Length of name */
+ herr_t ret; /* Generic return value */
/* Loop over creating hard or soft links */
- for (hard_link = FALSE; hard_link <= TRUE; hard_link++) {
+ for (hard_link = false; hard_link <= true; hard_link++) {
if (hard_link)
TESTING("querying info by index in old-style group, using hard links and deprecated routines");
else
@@ -5333,7 +5337,7 @@ link_info_by_idx_old_deprec(hid_t fapl)
/* Create several links */
for (u = 0; u < CORDER_NLINKS; u++) {
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Check for creating hard or soft link */
if (hard_link) {
@@ -5354,7 +5358,7 @@ link_info_by_idx_old_deprec(hid_t fapl)
} /* end if */
else {
/* Make value for link */
- HDsnprintf(valname, sizeof(valname), "value %02u", u);
+ snprintf(valname, sizeof(valname), "value %02u", u);
/* Create soft link */
if (H5Lcreate_soft(valname, group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
@@ -5367,10 +5371,10 @@ link_info_by_idx_old_deprec(hid_t fapl)
unsigned dec_u = CORDER_NLINKS - (u + 1); /* Decreasing mapped index */
/* Make link name for increasing/native order queries */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Make link value for increasing/native order queries */
- HDsnprintf(valname, sizeof(valname), "value %02u", u);
+ snprintf(valname, sizeof(valname), "value %02u", u);
/* Verify link information (in increasing order) */
if (hard_link) {
@@ -5384,7 +5388,7 @@ link_info_by_idx_old_deprec(hid_t fapl)
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)u, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end else */
@@ -5392,7 +5396,7 @@ link_info_by_idx_old_deprec(hid_t fapl)
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)u, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, tmpname) != 0)
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
/* Verify link information (in native order - native is increasing) */
@@ -5407,7 +5411,7 @@ link_info_by_idx_old_deprec(hid_t fapl)
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)u, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end else */
@@ -5415,14 +5419,14 @@ link_info_by_idx_old_deprec(hid_t fapl)
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)u, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, tmpname) != 0)
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
/* Make link name for decreasing order queries */
- HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u);
+ snprintf(objname, sizeof(objname), "filler %02u", dec_u);
/* Make link value for decreasing order queries */
- HDsnprintf(valname, sizeof(valname), "value %02u", dec_u);
+ snprintf(valname, sizeof(valname), "value %02u", dec_u);
/* Verify link information (in decreasing order) */
if (hard_link) {
@@ -5436,7 +5440,7 @@ link_info_by_idx_old_deprec(hid_t fapl)
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)u, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end else */
@@ -5444,7 +5448,7 @@ link_info_by_idx_old_deprec(hid_t fapl)
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)u, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, tmpname) != 0)
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -5467,7 +5471,7 @@ link_info_by_idx_old_deprec(hid_t fapl)
TEST_ERROR;
/* Verify state of group */
- if (H5G__has_stab_test(group_id) != TRUE)
+ if (H5G__has_stab_test(group_id) != true)
TEST_ERROR;
/* Close the group */
@@ -5506,27 +5510,27 @@ link_info_by_idx_old_deprec(hid_t fapl)
static int
delete_by_idx_deprec(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1; /* Group ID */
- hid_t gcpl_id = -1; /* Group creation property list ID */
- H5_index_t idx_type; /* Type of index to operate on */
- H5_iter_order_t order; /* Order within in the index */
- unsigned use_index; /* Use index on creation order values */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- H5L_info1_t linfo; /* Link info struct */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char filename[NAME_BUF_SIZE]; /* File name */
- char tmpname[NAME_BUF_SIZE]; /* Temporary link name */
- unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID; /* Group ID */
+ hid_t gcpl_id = H5I_INVALID_HID; /* Group creation property list ID */
+ H5_index_t idx_type; /* Type of index to operate on */
+ H5_iter_order_t order; /* Order within in the index */
+ unsigned use_index; /* Use index on creation order values */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ H5L_info1_t linfo; /* Link info struct */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ char tmpname[NAME_BUF_SIZE]; /* Temporary link name */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic return value */
/* Loop over operating on different indices on link fields */
for (idx_type = H5_INDEX_NAME; idx_type <= H5_INDEX_CRT_ORDER; idx_type++) {
/* Loop over operating in different orders */
for (order = H5_ITER_INC; order <= H5_ITER_DEC; order++) {
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
/* Print appropriate test message */
if (idx_type == H5_INDEX_CRT_ORDER) {
if (order == H5_ITER_INC) {
@@ -5614,7 +5618,7 @@ delete_by_idx_deprec(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -5624,12 +5628,12 @@ delete_by_idx_deprec(hid_t fapl)
TEST_ERROR;
/* Verify link information for new link */
- if (link_info_by_idx_check_deprec(group_id, objname, (hsize_t)u, TRUE, use_index) < 0)
+ if (link_info_by_idx_check_deprec(group_id, objname, (hsize_t)u, true, use_index) < 0)
TEST_ERROR;
} /* end for */
/* Verify state of group (compact) */
- if (H5G__has_links_test(group_id, NULL) != TRUE)
+ if (H5G__has_links_test(group_id, NULL) != true)
TEST_ERROR;
/* Check for out of bound deletion */
@@ -5667,10 +5671,10 @@ delete_by_idx_deprec(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1));
+ snprintf(objname, sizeof(objname), "filler %02u", (u + 1));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u", (max_compact - (u + 2)));
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u", (max_compact - (u + 2)));
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -5679,7 +5683,7 @@ delete_by_idx_deprec(hid_t fapl)
TEST_ERROR;
/* Verify state of group (empty) */
- if (H5G__has_links_test(group_id, NULL) == TRUE)
+ if (H5G__has_links_test(group_id, NULL) == true)
TEST_ERROR;
/* Create more links, to push group into dense form */
@@ -5687,7 +5691,7 @@ delete_by_idx_deprec(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -5698,11 +5702,11 @@ delete_by_idx_deprec(hid_t fapl)
/* Verify state of group (dense) */
if (u >= max_compact)
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Verify link information for new link */
- if (link_info_by_idx_check_deprec(group_id, objname, (hsize_t)u, TRUE, use_index) < 0)
+ if (link_info_by_idx_check_deprec(group_id, objname, (hsize_t)u, true, use_index) < 0)
TEST_ERROR;
} /* end for */
@@ -5741,10 +5745,10 @@ delete_by_idx_deprec(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1));
+ snprintf(objname, sizeof(objname), "filler %02u", (u + 1));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u", ((max_compact * 2) - (u + 2)));
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u", ((max_compact * 2) - (u + 2)));
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -5753,9 +5757,9 @@ delete_by_idx_deprec(hid_t fapl)
TEST_ERROR;
/* Verify state of group (empty) */
- if (H5G__has_links_test(group_id, NULL) == TRUE)
+ if (H5G__has_links_test(group_id, NULL) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) == TRUE)
+ if (H5G__is_new_dense_test(group_id) == true)
TEST_ERROR;
/* Check for deletion on empty group again */
@@ -5774,7 +5778,7 @@ delete_by_idx_deprec(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -5785,11 +5789,11 @@ delete_by_idx_deprec(hid_t fapl)
/* Verify state of group (dense) */
if (u >= max_compact)
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Verify link information for new link */
- if (link_info_by_idx_check_deprec(group_id, objname, (hsize_t)u, TRUE, use_index) < 0)
+ if (link_info_by_idx_check_deprec(group_id, objname, (hsize_t)u, true, use_index) < 0)
TEST_ERROR;
} /* end for */
@@ -5819,11 +5823,11 @@ delete_by_idx_deprec(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 1));
+ snprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 1));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u",
- ((max_compact * 2) - ((u * 2) + 2)));
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u",
+ ((max_compact * 2) - ((u * 2) + 2)));
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -5853,11 +5857,11 @@ delete_by_idx_deprec(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 3));
+ snprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 3));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u",
- ((max_compact * 2) - ((u * 2) + 4)));
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u",
+ ((max_compact * 2) - ((u * 2) + 4)));
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -5866,9 +5870,9 @@ delete_by_idx_deprec(hid_t fapl)
TEST_ERROR;
/* Verify state of group (empty) */
- if (H5G__has_links_test(group_id, NULL) == TRUE)
+ if (H5G__has_links_test(group_id, NULL) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) == TRUE)
+ if (H5G__is_new_dense_test(group_id) == true)
TEST_ERROR;
/* Close the group */
@@ -5914,16 +5918,16 @@ delete_by_idx_deprec(hid_t fapl)
static int
delete_by_idx_old_deprec(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1, group_id2 = -1; /* Group IDs */
- H5L_info1_t linfo; /* Link info struct */
- H5_iter_order_t order; /* Order within in the index */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char filename[NAME_BUF_SIZE]; /* File name */
- haddr_t objno[CORDER_NLINKS]; /* Addresses of the objects created */
- char tmpname[NAME_BUF_SIZE]; /* Temporary link name */
- unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID, group_id2 = H5I_INVALID_HID; /* Group IDs */
+ H5L_info1_t linfo; /* Link info struct */
+ H5_iter_order_t order; /* Order within in the index */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ haddr_t objno[CORDER_NLINKS]; /* Addresses of the objects created */
+ char tmpname[NAME_BUF_SIZE]; /* Temporary link name */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic return value */
/* Loop over operating in different orders */
for (order = H5_ITER_INC; order <= H5_ITER_DEC; order++) {
@@ -5960,7 +5964,7 @@ delete_by_idx_old_deprec(hid_t fapl)
H5O_info1_t oi; /* Buffer for querying object's info */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create group */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -6021,10 +6025,10 @@ delete_by_idx_old_deprec(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1));
+ snprintf(objname, sizeof(objname), "filler %02u", (u + 1));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u);
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u", dec_u);
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -6042,7 +6046,7 @@ delete_by_idx_old_deprec(hid_t fapl)
TEST_ERROR;
/* Verify state of group */
- if (H5G__has_stab_test(group_id) != TRUE)
+ if (H5G__has_stab_test(group_id) != true)
TEST_ERROR;
/* Delete links in middle */
@@ -6052,7 +6056,7 @@ delete_by_idx_old_deprec(hid_t fapl)
H5O_info1_t oi; /* Buffer for querying object's info */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create group */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -6095,10 +6099,10 @@ delete_by_idx_old_deprec(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 1));
+ snprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 1));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u);
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u", dec_u);
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -6129,10 +6133,10 @@ delete_by_idx_old_deprec(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 3));
+ snprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 3));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u);
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u", dec_u);
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -6141,7 +6145,7 @@ delete_by_idx_old_deprec(hid_t fapl)
TEST_ERROR;
/* Verify state of group */
- if (H5G__has_stab_test(group_id) != TRUE)
+ if (H5G__has_stab_test(group_id) != true)
TEST_ERROR;
/* Close the group */
@@ -6213,8 +6217,8 @@ link_iterate_deprec_cb(hid_t group_id, const char *link_name, const H5L_info1_t
} /* end if */
/* Verify name of link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", (unsigned)my_info.corder);
- if (HDstrcmp(link_name, objname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u", (unsigned)my_info.corder);
+ if (strcmp(link_name, objname) != 0)
return H5_ITER_ERROR;
/* Check if we've visited this link before */
@@ -6222,7 +6226,7 @@ link_iterate_deprec_cb(hid_t group_id, const char *link_name, const H5L_info1_t
return H5_ITER_ERROR;
if (op_data->visited[op_data->curr])
return H5_ITER_ERROR;
- op_data->visited[op_data->curr] = TRUE;
+ op_data->visited[op_data->curr] = true;
/* Advance to next value, in correct direction */
if (op_data->order != H5_ITER_DEC)
@@ -6295,7 +6299,7 @@ link_iterate_check_deprec(hid_t group_id, H5_index_t idx_type, H5_iter_order_t o
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if (H5Literate1(group_id, idx_type, order, &skip, link_iterate_deprec_cb, iter_info) < 0)
TEST_ERROR;
@@ -6303,7 +6307,7 @@ link_iterate_check_deprec(hid_t group_id, H5_index_t idx_type, H5_iter_order_t o
if (skip != max_links)
TEST_ERROR;
for (v = 0; v < max_links; v++)
- if (iter_info->visited[v] == FALSE)
+ if (iter_info->visited[v] == false)
TEST_ERROR;
/* Iterate over links in group, with H5Giterate */
@@ -6312,7 +6316,7 @@ link_iterate_check_deprec(hid_t group_id, H5_index_t idx_type, H5_iter_order_t o
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if (H5Giterate(group_id, ".", &gskip, group_iterate_deprec_cb, iter_info) < 0)
TEST_ERROR;
@@ -6320,7 +6324,7 @@ link_iterate_check_deprec(hid_t group_id, H5_index_t idx_type, H5_iter_order_t o
if (gskip != (int)max_links)
TEST_ERROR;
for (v = 0; v < max_links; v++)
- if (iter_info->visited[v] == FALSE)
+ if (iter_info->visited[v] == false)
TEST_ERROR;
/* Skip over some links in group */
@@ -6329,7 +6333,7 @@ link_iterate_check_deprec(hid_t group_id, H5_index_t idx_type, H5_iter_order_t o
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = (int64_t)(order != H5_ITER_DEC ? skip : ((max_links - 1) - skip));
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if (H5Literate1(group_id, idx_type, order, &skip, link_iterate_deprec_cb, iter_info) < 0)
TEST_ERROR;
@@ -6338,12 +6342,12 @@ link_iterate_check_deprec(hid_t group_id, H5_index_t idx_type, H5_iter_order_t o
TEST_ERROR;
if (order == H5_ITER_INC) {
for (v = 0; v < (max_links / 2); v++)
- if (iter_info->visited[v + (max_links / 2)] == FALSE)
+ if (iter_info->visited[v + (max_links / 2)] == false)
TEST_ERROR;
} /* end if */
else if (order == H5_ITER_DEC) {
for (v = 0; v < (max_links / 2); v++)
- if (iter_info->visited[v] == FALSE)
+ if (iter_info->visited[v] == false)
TEST_ERROR;
} /* end if */
else {
@@ -6351,7 +6355,7 @@ link_iterate_check_deprec(hid_t group_id, H5_index_t idx_type, H5_iter_order_t o
assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_links; v++)
- if (iter_info->visited[v] == TRUE)
+ if (iter_info->visited[v] == true)
nvisit++;
if (nvisit != (max_links / 2))
@@ -6364,7 +6368,7 @@ link_iterate_check_deprec(hid_t group_id, H5_index_t idx_type, H5_iter_order_t o
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? (unsigned)gskip : ((max_links - 1) - (unsigned)gskip);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if (H5Giterate(group_id, ".", &gskip, group_iterate_deprec_cb, iter_info) < 0)
TEST_ERROR;
@@ -6373,12 +6377,12 @@ link_iterate_check_deprec(hid_t group_id, H5_index_t idx_type, H5_iter_order_t o
TEST_ERROR;
if (order == H5_ITER_INC) {
for (v = 0; v < (max_links / 2); v++)
- if (iter_info->visited[v + (max_links / 2)] == FALSE)
+ if (iter_info->visited[v + (max_links / 2)] == false)
TEST_ERROR;
} /* end if */
else if (order == H5_ITER_DEC) {
for (v = 0; v < (max_links / 2); v++)
- if (iter_info->visited[v] == FALSE)
+ if (iter_info->visited[v] == false)
TEST_ERROR;
} /* end if */
else {
@@ -6386,7 +6390,7 @@ link_iterate_check_deprec(hid_t group_id, H5_index_t idx_type, H5_iter_order_t o
assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_links; v++)
- if (iter_info->visited[v] == TRUE)
+ if (iter_info->visited[v] == true)
nvisit++;
if (nvisit != (max_links / 2))
@@ -6399,7 +6403,7 @@ link_iterate_check_deprec(hid_t group_id, H5_index_t idx_type, H5_iter_order_t o
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if ((ret = H5Literate1(group_id, idx_type, order, &skip, link_iterate_deprec_cb, iter_info)) < 0)
TEST_ERROR;
if (ret != CORDER_ITER_STOP)
@@ -6413,7 +6417,7 @@ link_iterate_check_deprec(hid_t group_id, H5_index_t idx_type, H5_iter_order_t o
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if ((ret = H5Giterate(group_id, ".", &gskip, group_iterate_deprec_cb, iter_info)) < 0)
TEST_ERROR;
if (ret != CORDER_ITER_STOP)
@@ -6452,21 +6456,21 @@ link_iterate_check_deprec(hid_t group_id, H5_index_t idx_type, H5_iter_order_t o
static int
link_iterate_deprec(hid_t fapl)
{
- hid_t file_id = (-1); /* File ID */
- hid_t group_id = (-1); /* Group ID */
- hid_t gcpl_id = (-1); /* Group creation property list ID */
- H5_index_t idx_type; /* Type of index to operate on */
- H5_iter_order_t order; /* Order within in the index */
- unsigned use_index; /* Use index on creation order values */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char filename[NAME_BUF_SIZE]; /* File name */
- link_iter_info_t iter_info; /* Iterator info */
- hbool_t *visited = NULL; /* Array of flags for visiting links */
- hsize_t skip; /* # of links to skip in group */
- unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ hid_t file_id = (H5I_INVALID_HID); /* File ID */
+ hid_t group_id = (H5I_INVALID_HID); /* Group ID */
+ hid_t gcpl_id = (H5I_INVALID_HID); /* Group creation property list ID */
+ H5_index_t idx_type; /* Type of index to operate on */
+ H5_iter_order_t order; /* Order within in the index */
+ unsigned use_index; /* Use index on creation order values */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ link_iter_info_t iter_info; /* Iterator info */
+ bool *visited = NULL; /* Array of flags for visiting links */
+ hsize_t skip; /* # of links to skip in group */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic return value */
/* Create group creation property list */
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0)
@@ -6478,7 +6482,7 @@ link_iterate_deprec(hid_t fapl)
/* Allocate the "visited link" array */
iter_info.max_visit = max_compact * 2;
- if (NULL == (visited = (hbool_t *)malloc(sizeof(hbool_t) * iter_info.max_visit)))
+ if (NULL == (visited = (bool *)malloc(sizeof(bool) * iter_info.max_visit)))
TEST_ERROR;
iter_info.visited = visited;
@@ -6487,7 +6491,7 @@ link_iterate_deprec(hid_t fapl)
/* Loop over operating in different orders */
for (order = H5_ITER_INC; order <= H5_ITER_NATIVE; order++) {
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
/* Print appropriate test message */
if (idx_type == H5_INDEX_CRT_ORDER) {
if (order == H5_ITER_INC) {
@@ -6570,7 +6574,7 @@ link_iterate_deprec(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -6581,7 +6585,7 @@ link_iterate_deprec(hid_t fapl)
} /* end for */
/* Verify state of group (compact) */
- if (H5G__has_links_test(group_id, NULL) != TRUE)
+ if (H5G__has_links_test(group_id, NULL) != true)
TEST_ERROR;
/* Check for out of bound iteration on compact group */
@@ -6603,7 +6607,7 @@ link_iterate_deprec(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -6614,7 +6618,7 @@ link_iterate_deprec(hid_t fapl)
} /* end for */
/* Verify state of group (dense) */
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Check for out of bound iteration on dense group */
@@ -6709,9 +6713,9 @@ link_iterate_old_deprec_cb(hid_t group_id, const char *link_name, const H5L_info
} /* end if */
/* Verify name of link */
- HDsnprintf(objname, sizeof(objname), "filler %02u",
- (info ? (unsigned)op_data->curr : (unsigned)((op_data->ncalled - 1) + op_data->nskipped)));
- if (HDstrcmp(link_name, objname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u",
+ (info ? (unsigned)op_data->curr : (unsigned)((op_data->ncalled - 1) + op_data->nskipped)));
+ if (strcmp(link_name, objname) != 0)
return H5_ITER_ERROR;
/* Check if we've visited this link before */
@@ -6719,7 +6723,7 @@ link_iterate_old_deprec_cb(hid_t group_id, const char *link_name, const H5L_info
return H5_ITER_ERROR;
if (op_data->visited[op_data->curr])
return H5_ITER_ERROR;
- op_data->visited[op_data->curr] = TRUE;
+ op_data->visited[op_data->curr] = true;
/* Advance to next value, in correct direction */
if (op_data->order != H5_ITER_DEC)
@@ -6775,7 +6779,7 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if (H5Literate1(group_id, H5_INDEX_NAME, order, &skip, link_iterate_old_deprec_cb, iter_info) < 0)
TEST_ERROR;
@@ -6783,7 +6787,7 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma
if (skip != max_links)
TEST_ERROR;
for (v = 0; v < max_links; v++)
- if (iter_info->visited[v] == FALSE)
+ if (iter_info->visited[v] == false)
TEST_ERROR;
/* Iterate over links in group, with H5Giterate */
@@ -6792,7 +6796,7 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if (H5Giterate(group_id, ".", &gskip, group_iterate_old_deprec_cb, iter_info) < 0)
TEST_ERROR;
@@ -6800,7 +6804,7 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma
if (gskip != (int)max_links)
TEST_ERROR;
for (v = 0; v < max_links; v++)
- if (iter_info->visited[v] == FALSE)
+ if (iter_info->visited[v] == false)
TEST_ERROR;
/* Skip over some links in group */
@@ -6809,7 +6813,7 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = (int64_t)(order != H5_ITER_DEC ? skip : ((max_links - 1) - skip));
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if (H5Literate1(group_id, H5_INDEX_NAME, order, &skip, link_iterate_old_deprec_cb, iter_info) < 0)
TEST_ERROR;
@@ -6818,12 +6822,12 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma
TEST_ERROR;
if (order == H5_ITER_INC) {
for (v = 0; v < (max_links / 2); v++)
- if (iter_info->visited[v + (max_links / 2)] == FALSE)
+ if (iter_info->visited[v + (max_links / 2)] == false)
TEST_ERROR;
} /* end if */
else if (order == H5_ITER_DEC) {
for (v = 0; v < (max_links / 2); v++)
- if (iter_info->visited[v] == FALSE)
+ if (iter_info->visited[v] == false)
TEST_ERROR;
} /* end if */
else {
@@ -6831,7 +6835,7 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma
assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_links; v++)
- if (iter_info->visited[v] == TRUE)
+ if (iter_info->visited[v] == true)
nvisit++;
if (nvisit != (max_links / 2))
@@ -6844,7 +6848,7 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? (unsigned)gskip : ((max_links - 1) - (unsigned)gskip);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if (H5Giterate(group_id, ".", &gskip, group_iterate_old_deprec_cb, iter_info) < 0)
TEST_ERROR;
@@ -6853,12 +6857,12 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma
TEST_ERROR;
if (order == H5_ITER_INC) {
for (v = 0; v < (max_links / 2); v++)
- if (iter_info->visited[v + (max_links / 2)] == FALSE)
+ if (iter_info->visited[v + (max_links / 2)] == false)
TEST_ERROR;
} /* end if */
else if (order == H5_ITER_DEC) {
for (v = 0; v < (max_links / 2); v++)
- if (iter_info->visited[v] == FALSE)
+ if (iter_info->visited[v] == false)
TEST_ERROR;
} /* end if */
else {
@@ -6866,7 +6870,7 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma
assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_links; v++)
- if (iter_info->visited[v] == TRUE)
+ if (iter_info->visited[v] == true)
nvisit++;
if (nvisit != (max_links / 2))
@@ -6879,7 +6883,7 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if ((ret = H5Literate1(group_id, H5_INDEX_NAME, order, &skip, link_iterate_old_deprec_cb, iter_info)) < 0)
TEST_ERROR;
if (ret != CORDER_ITER_STOP)
@@ -6893,7 +6897,7 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if ((ret = H5Giterate(group_id, ".", &gskip, group_iterate_old_deprec_cb, iter_info)) < 0)
TEST_ERROR;
if (ret != CORDER_ITER_STOP)
@@ -6915,7 +6919,8 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma
skip = 0;
H5E_BEGIN_TRY
{
- ret = H5Literate1((hid_t)(-1), H5_INDEX_NAME, order, &skip, link_iterate_fail_deprec_cb, NULL);
+ ret = H5Literate1((hid_t)(H5I_INVALID_HID), H5_INDEX_NAME, order, &skip, link_iterate_fail_deprec_cb,
+ NULL);
}
H5E_END_TRY
if (ret >= 0)
@@ -6923,7 +6928,7 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma
H5E_BEGIN_TRY
{
- ret = H5Giterate((hid_t)(-1), ".", &gskip, group_iterate_old_deprec_cb, iter_info);
+ ret = H5Giterate((hid_t)(H5I_INVALID_HID), ".", &gskip, group_iterate_old_deprec_cb, iter_info);
}
H5E_END_TRY
if (ret >= 0)
@@ -6948,20 +6953,20 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma
static int
link_iterate_old_deprec(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1; /* Group ID */
- H5_iter_order_t order; /* Order within in the index */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char filename[NAME_BUF_SIZE]; /* File name */
- link_iter_info_t iter_info; /* Iterator info */
- hbool_t *visited = NULL; /* Array of flags for visiting links */
- hsize_t skip; /* # of links to skip in group */
- unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID; /* Group ID */
+ H5_iter_order_t order; /* Order within in the index */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ link_iter_info_t iter_info; /* Iterator info */
+ bool *visited = NULL; /* Array of flags for visiting links */
+ hsize_t skip; /* # of links to skip in group */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic return value */
/* Allocate the "visited link" array */
iter_info.max_visit = CORDER_NLINKS;
- if (NULL == (visited = (hbool_t *)malloc(sizeof(hbool_t) * iter_info.max_visit)))
+ if (NULL == (visited = (bool *)malloc(sizeof(bool) * iter_info.max_visit)))
TEST_ERROR;
iter_info.visited = visited;
@@ -7001,7 +7006,7 @@ link_iterate_old_deprec(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -7011,7 +7016,7 @@ link_iterate_old_deprec(hid_t fapl)
} /* end for */
/* Verify state of group (symbol table) */
- if (H5G__has_stab_test(group_id) != TRUE)
+ if (H5G__has_stab_test(group_id) != true)
TEST_ERROR;
/* Check for out of bound iteration on old-style group */
@@ -7082,12 +7087,12 @@ link_iterate_old_deprec(hid_t fapl)
*-------------------------------------------------------------------------
*/
static int
-external_link_root(hid_t fapl, hbool_t new_format)
+external_link_root(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- H5L_info2_t linfo; /* Link information */
- char objname[NAME_BUF_SIZE]; /* Object name */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ H5L_info2_t linfo; /* Link information */
+ char objname[NAME_BUF_SIZE]; /* Object name */
char filename1[NAME_BUF_SIZE];
char filename2[NAME_BUF_SIZE];
const char *file; /* File from external link */
@@ -7111,7 +7116,7 @@ external_link_root(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* Check that external links are registered with the library */
- if (H5Lis_registered(H5L_TYPE_EXTERNAL) != TRUE)
+ if (H5Lis_registered(H5L_TYPE_EXTERNAL) != true)
TEST_ERROR;
/* Create file with link to first file */
@@ -7127,21 +7132,21 @@ external_link_root(hid_t fapl, hbool_t new_format)
goto error;
if (H5L_TYPE_EXTERNAL != linfo.type) {
H5_FAILED();
- HDputs(" Unexpected object type - should have been an external link");
+ puts(" Unexpected object type - should have been an external link");
goto error;
}
if (H5Lget_val(fid, "ext_link", objname, sizeof(objname), H5P_DEFAULT) < 0)
TEST_ERROR;
if (H5Lunpack_elink_val(objname, linfo.u.val_size, NULL, &file, &path) < 0)
TEST_ERROR;
- if (HDstrcmp(file, filename1) != 0) {
+ if (strcmp(file, filename1) != 0) {
H5_FAILED();
- HDputs(" External link file name incorrect");
+ puts(" External link file name incorrect");
goto error;
}
- if (HDstrcmp(path, "/") != 0) {
+ if (strcmp(path, "/") != 0) {
H5_FAILED();
- HDputs(" External link path incorrect");
+ puts(" External link path incorrect");
goto error;
}
@@ -7155,21 +7160,21 @@ external_link_root(hid_t fapl, hbool_t new_format)
goto error;
if (H5L_TYPE_EXTERNAL != linfo.type) {
H5_FAILED();
- HDputs(" Unexpected object type - should have been an external link");
+ puts(" Unexpected object type - should have been an external link");
goto error;
}
if (H5Lget_val(fid, "ext_link", objname, sizeof(objname), H5P_DEFAULT) < 0)
TEST_ERROR;
if (H5Lunpack_elink_val(objname, linfo.u.val_size, NULL, &file, &path) < 0)
TEST_ERROR;
- if (HDstrcmp(file, filename1) != 0) {
+ if (strcmp(file, filename1) != 0) {
H5_FAILED();
- HDputs(" External link file name incorrect");
+ puts(" External link file name incorrect");
goto error;
}
- if (HDstrcmp(path, "/") != 0) {
+ if (strcmp(path, "/") != 0) {
H5_FAILED();
- HDputs(" External link path incorrect");
+ puts(" External link path incorrect");
goto error;
}
@@ -7186,7 +7191,7 @@ external_link_root(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/") != 0)
+ if (strcmp(objname, "/") != 0)
TEST_ERROR;
/* Create object in external file */
@@ -7231,11 +7236,11 @@ external_link_root(hid_t fapl, hbool_t new_format)
/* Check names */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/new_group") != 0)
+ if (strcmp(objname, "/new_group") != 0)
TEST_ERROR;
if (H5Iget_name(gid2, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/newer_group") != 0)
+ if (strcmp(objname, "/newer_group") != 0)
TEST_ERROR;
/* Close opened objects */
@@ -7301,11 +7306,11 @@ external_link_root(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_link_path(hid_t fapl, hbool_t new_format)
+external_link_path(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- char objname[NAME_BUF_SIZE]; /* Object name */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ char objname[NAME_BUF_SIZE]; /* Object name */
char filename1[NAME_BUF_SIZE];
char filename2[NAME_BUF_SIZE];
@@ -7357,7 +7362,7 @@ external_link_path(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/A/B/C") != 0)
+ if (strcmp(objname, "/A/B/C") != 0)
TEST_ERROR;
/* Create object in external file */
@@ -7387,7 +7392,7 @@ external_link_path(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/A/B/C/new_group") != 0)
+ if (strcmp(objname, "/A/B/C/new_group") != 0)
TEST_ERROR;
/* Close opened object */
@@ -7423,11 +7428,11 @@ external_link_path(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_link_mult(hid_t fapl, hbool_t new_format)
+external_link_mult(hid_t fapl, bool new_format)
{
- hid_t fid = -1, fid2 = -1; /* File IDs */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- char objname[NAME_BUF_SIZE]; /* Object name */
+ hid_t fid = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File IDs */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ char objname[NAME_BUF_SIZE]; /* Object name */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE],
filename4[NAME_BUF_SIZE]; /* Names of files to externally link across */
@@ -7529,7 +7534,7 @@ external_link_mult(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/A/B/C") != 0)
+ if (strcmp(objname, "/A/B/C") != 0)
TEST_ERROR;
/* Create object in external file */
@@ -7559,7 +7564,7 @@ external_link_mult(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/A/B/C/new_group") != 0)
+ if (strcmp(objname, "/A/B/C/new_group") != 0)
TEST_ERROR;
/* Close opened object */
@@ -7621,12 +7626,12 @@ external_link_mult(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_link_self(hid_t fapl, hbool_t new_format)
+external_link_self(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t lcpl_id = -1; /* Link Creation Property List ID */
- char objname[NAME_BUF_SIZE]; /* Object name */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t lcpl_id = H5I_INVALID_HID; /* Link Creation Property List ID */
+ char objname[NAME_BUF_SIZE]; /* Object name */
char filename1[NAME_BUF_SIZE];
char filename2[NAME_BUF_SIZE];
char filename3[NAME_BUF_SIZE];
@@ -7648,7 +7653,7 @@ external_link_self(hid_t fapl, hbool_t new_format)
/* Create an lcpl with intermediate group creation set */
if ((lcpl_id = H5Pcreate(H5P_LINK_CREATE)) < 0)
TEST_ERROR;
- if (H5Pset_create_intermediate_group(lcpl_id, TRUE) < 0)
+ if (H5Pset_create_intermediate_group(lcpl_id, true) < 0)
TEST_ERROR;
/* Create a series of groups within the file: /A/B and /X/Y/Z */
@@ -7675,7 +7680,7 @@ external_link_self(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/X") != 0)
+ if (strcmp(objname, "/X") != 0)
TEST_ERROR;
/* Create object through external link */
@@ -7697,7 +7702,7 @@ external_link_self(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/X/new_group") != 0)
+ if (strcmp(objname, "/X/new_group") != 0)
TEST_ERROR;
/* Close opened object */
@@ -7812,10 +7817,10 @@ external_link_self(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_link_pingpong(hid_t fapl, hbool_t new_format)
+external_link_pingpong(hid_t fapl, bool new_format)
{
- hid_t fid = (-1); /* File ID */
- hid_t gid = (-1), gid2 = (-1); /* Group IDs */
+ hid_t fid = (H5I_INVALID_HID); /* File ID */
+ hid_t gid = (H5I_INVALID_HID), gid2 = (H5I_INVALID_HID); /* Group IDs */
char objname[NAME_BUF_SIZE]; /* Object name */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE]; /* Names of files to externally link across */
@@ -7877,7 +7882,7 @@ external_link_pingpong(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/final") != 0)
+ if (strcmp(objname, "/final") != 0)
TEST_ERROR;
/* Create object in external file */
@@ -7907,7 +7912,7 @@ external_link_pingpong(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/final/new_group") != 0)
+ if (strcmp(objname, "/final/new_group") != 0)
TEST_ERROR;
/* Close opened object */
@@ -7964,10 +7969,10 @@ external_link_pingpong(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_link_toomany(hid_t fapl, hbool_t new_format)
+external_link_toomany(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
char objname[NAME_BUF_SIZE]; /* Object name */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE]; /* Names of files to externally link across */
@@ -8069,7 +8074,7 @@ external_link_toomany(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/final") != 0)
+ if (strcmp(objname, "/final") != 0)
TEST_ERROR;
/* Create object in external file */
@@ -8113,12 +8118,12 @@ external_link_toomany(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_link_dangling(hid_t fapl, hbool_t new_format)
+external_link_dangling(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
- hid_t rid = -1; /* Root Group ID */
- hid_t status = -1; /* Status */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
+ hid_t rid = H5I_INVALID_HID; /* Root Group ID */
+ hid_t status = H5I_INVALID_HID; /* Status */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE]; /* Names of files to externally link across */
if (new_format)
@@ -8168,7 +8173,7 @@ external_link_dangling(hid_t fapl, hbool_t new_format)
H5E_END_TRY
if (gid >= 0) {
H5_FAILED();
- HDputs(" Should have failed for sequence of too many nested links.");
+ puts(" Should have failed for sequence of too many nested links.");
goto error;
}
@@ -8180,7 +8185,7 @@ external_link_dangling(hid_t fapl, hbool_t new_format)
H5E_END_TRY
if (gid >= 0) {
H5_FAILED();
- HDputs(" Should have failed for sequence of too many nested links.");
+ puts(" Should have failed for sequence of too many nested links.");
goto error;
}
@@ -8192,7 +8197,7 @@ external_link_dangling(hid_t fapl, hbool_t new_format)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(
+ puts(
" Retrieving name of object by index through dangling file external link should have failed.");
} /* end if */
@@ -8233,11 +8238,11 @@ external_link_dangling(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_link_prefix(hid_t fapl, hbool_t new_format)
+external_link_prefix(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
- hid_t gapl_id = -1;
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
+ hid_t gapl_id = H5I_INVALID_HID;
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE];
if (new_format)
@@ -8293,7 +8298,7 @@ external_link_prefix(hid_t fapl, hbool_t new_format)
/* should be able to find the target file from pathnames set via H5Pset_elink_prefix() */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp_links directory.");
+ puts(" Should have found the file in tmp_links directory.");
goto error;
}
@@ -8330,10 +8335,10 @@ external_link_prefix(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_link_abs_mainpath(hid_t fapl, hbool_t new_format)
+external_link_abs_mainpath(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE], tmpname[NAME_BUF_SIZE],
cwdpath[NAME_BUF_SIZE];
@@ -8390,7 +8395,7 @@ external_link_abs_mainpath(hid_t fapl, hbool_t new_format)
/* should be able to find the target file from absolute path set for main file */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp_links directory.");
+ puts(" Should have found the file in tmp_links directory.");
goto error;
}
@@ -8426,10 +8431,10 @@ external_link_abs_mainpath(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_link_rel_mainpath(hid_t fapl, hbool_t new_format)
+external_link_rel_mainpath(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE];
if (new_format)
@@ -8478,7 +8483,7 @@ external_link_rel_mainpath(hid_t fapl, hbool_t new_format)
/* should be able to find the target file from the main file's relative pathname */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in current working directory");
+ puts(" Should have found the file in current working directory");
goto error;
}
@@ -8514,10 +8519,10 @@ external_link_rel_mainpath(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_link_cwd(hid_t fapl, hbool_t new_format)
+external_link_cwd(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], tmpname[NAME_BUF_SIZE], cwdpath[NAME_BUF_SIZE];
if (new_format)
@@ -8571,7 +8576,7 @@ external_link_cwd(hid_t fapl, hbool_t new_format)
/* should be able to find the target file from the current working directory */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in current working directory");
+ puts(" Should have found the file in current working directory");
goto error;
}
@@ -8608,10 +8613,10 @@ external_link_cwd(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_link_abstar(hid_t fapl, hbool_t new_format)
+external_link_abstar(hid_t fapl, bool new_format)
{
- hid_t fid = (-1); /* File ID */
- hid_t gid = (-1); /* Group IDs */
+ hid_t fid = (H5I_INVALID_HID); /* File ID */
+ hid_t gid = (H5I_INVALID_HID); /* Group IDs */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE], tmpname[NAME_BUF_SIZE],
cwdpath[NAME_BUF_SIZE];
@@ -8669,7 +8674,7 @@ external_link_abstar(hid_t fapl, hbool_t new_format)
/* should be able to find the target file with absolute path */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp_links directory.");
+ puts(" Should have found the file in tmp_links directory.");
goto error;
}
@@ -8706,10 +8711,10 @@ external_link_abstar(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_link_abstar_cur(hid_t fapl, hbool_t new_format)
+external_link_abstar_cur(hid_t fapl, bool new_format)
{
- hid_t fid = (-1); /* File ID */
- hid_t gid = (-1); /* Group IDs */
+ hid_t fid = (H5I_INVALID_HID); /* File ID */
+ hid_t gid = (H5I_INVALID_HID); /* Group IDs */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE], tmpname[NAME_BUF_SIZE],
cwdpath[NAME_BUF_SIZE];
@@ -8767,7 +8772,7 @@ external_link_abstar_cur(hid_t fapl, hbool_t new_format)
/* should be able to find the target file from main file's current working directory */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in current working directory.");
+ puts(" Should have found the file in current working directory.");
goto error;
}
@@ -8803,10 +8808,10 @@ external_link_abstar_cur(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_link_reltar(hid_t fapl, hbool_t new_format)
+external_link_reltar(hid_t fapl, bool new_format)
{
- hid_t fid = (-1); /* File ID */
- hid_t gid = (-1); /* Group IDs */
+ hid_t fid = (H5I_INVALID_HID); /* File ID */
+ hid_t gid = (H5I_INVALID_HID); /* Group IDs */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE];
if (new_format)
@@ -8848,7 +8853,7 @@ external_link_reltar(hid_t fapl, hbool_t new_format)
/* Open object through external link */
if ((gid = H5Gopen2(fid, "ext_link", H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp_links directory.");
+ puts(" Should have found the file in tmp_links directory.");
goto error;
} /* end if */
@@ -8886,10 +8891,10 @@ external_link_reltar(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_link_chdir(hid_t fapl, hbool_t new_format)
+external_link_chdir(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE];
if (new_format)
@@ -8948,7 +8953,7 @@ external_link_chdir(hid_t fapl, hbool_t new_format)
*/
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp_links directory.");
+ puts(" Should have found the file in tmp_links directory.");
goto error;
}
@@ -8992,16 +8997,16 @@ external_link_chdir(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_set_elink_fapl1(hid_t fapl, hbool_t new_format)
+external_set_elink_fapl1(hid_t fapl, bool new_format)
{
- hid_t fid = (-1);
- hid_t fidA = (-1), fidB = (-1);
- hid_t gidA = (-1), gidB = (-1);
- hid_t oidA = (-1), oidB = (-1);
+ hid_t fid = (H5I_INVALID_HID);
+ hid_t fidA = (H5I_INVALID_HID), fidB = (H5I_INVALID_HID);
+ hid_t gidA = (H5I_INVALID_HID), gidB = (H5I_INVALID_HID);
+ hid_t oidA = (H5I_INVALID_HID), oidB = (H5I_INVALID_HID);
char filename1[NAME_BUF_SIZE], filename2A[NAME_BUF_SIZE], filename2B[NAME_BUF_SIZE],
tmpname[NAME_BUF_SIZE], cwdpath[NAME_BUF_SIZE];
- hid_t fam_fapl = -1, multi_fapl = -1;
- hid_t lapl_idA = -1, lapl_idB = -1;
+ hid_t fam_fapl = H5I_INVALID_HID, multi_fapl = H5I_INVALID_HID;
+ hid_t lapl_idA = H5I_INVALID_HID, lapl_idB = H5I_INVALID_HID;
hid_t memb_fapl[H5FD_MEM_NTYPES];
char sv[H5FD_MEM_NTYPES][64];
H5FD_mem_t mt, memb_map[H5FD_MEM_NTYPES];
@@ -9051,33 +9056,33 @@ external_set_elink_fapl1(hid_t fapl, hbool_t new_format)
memb_map[H5FD_MEM_GHEAP] = H5FD_MEM_GHEAP;
memb_map[H5FD_MEM_LHEAP] = H5FD_MEM_LHEAP;
- HDsnprintf(sv[H5FD_MEM_SUPER], sizeof(sv[H5FD_MEM_SUPER]), "%%s-%c.h5", 's');
+ snprintf(sv[H5FD_MEM_SUPER], sizeof(sv[H5FD_MEM_SUPER]), "%%s-%c.h5", 's');
memb_name[H5FD_MEM_SUPER] = sv[H5FD_MEM_SUPER];
memb_addr[H5FD_MEM_SUPER] = 0;
- HDsnprintf(sv[H5FD_MEM_BTREE], sizeof(sv[H5FD_MEM_BTREE]), "%%s-%c.h5", 'b');
+ snprintf(sv[H5FD_MEM_BTREE], sizeof(sv[H5FD_MEM_BTREE]), "%%s-%c.h5", 'b');
memb_name[H5FD_MEM_BTREE] = sv[H5FD_MEM_BTREE];
memb_addr[H5FD_MEM_BTREE] = HADDR_MAX / 6;
- HDsnprintf(sv[H5FD_MEM_DRAW], sizeof(sv[H5FD_MEM_DRAW]), "%%s-%c.h5", 'r');
+ snprintf(sv[H5FD_MEM_DRAW], sizeof(sv[H5FD_MEM_DRAW]), "%%s-%c.h5", 'r');
memb_name[H5FD_MEM_DRAW] = sv[H5FD_MEM_DRAW];
memb_addr[H5FD_MEM_DRAW] = HADDR_MAX / 3;
- HDsnprintf(sv[H5FD_MEM_GHEAP], sizeof(sv[H5FD_MEM_GHEAP]), "%%s-%c.h5", 'g');
+ snprintf(sv[H5FD_MEM_GHEAP], sizeof(sv[H5FD_MEM_GHEAP]), "%%s-%c.h5", 'g');
memb_name[H5FD_MEM_GHEAP] = sv[H5FD_MEM_GHEAP];
memb_addr[H5FD_MEM_GHEAP] = HADDR_MAX / 2;
- HDsnprintf(sv[H5FD_MEM_LHEAP], sizeof(sv[H5FD_MEM_LHEAP]), "%%s-%c.h5", 'l');
+ snprintf(sv[H5FD_MEM_LHEAP], sizeof(sv[H5FD_MEM_LHEAP]), "%%s-%c.h5", 'l');
memb_name[H5FD_MEM_LHEAP] = sv[H5FD_MEM_LHEAP];
memb_addr[H5FD_MEM_LHEAP] = (HADDR_MAX / 3) * 2;
- HDsnprintf(sv[H5FD_MEM_OHDR], sizeof(sv[H5FD_MEM_OHDR]), "%%s-%c.h5", 'o');
+ snprintf(sv[H5FD_MEM_OHDR], sizeof(sv[H5FD_MEM_OHDR]), "%%s-%c.h5", 'o');
memb_name[H5FD_MEM_OHDR] = sv[H5FD_MEM_OHDR];
memb_addr[H5FD_MEM_OHDR] = (HADDR_MAX / 6) * 5;
/* create "multi" fapl */
multi_fapl = h5_fileaccess();
- if (H5Pset_fapl_multi(multi_fapl, memb_map, memb_fapl, memb_name, memb_addr, TRUE) < 0)
+ if (H5Pset_fapl_multi(multi_fapl, memb_map, memb_fapl, memb_name, memb_addr, true) < 0)
TEST_ERROR;
/* set up name for external linked target file B: "extlinks16B" */
@@ -9129,7 +9134,7 @@ external_set_elink_fapl1(hid_t fapl, hbool_t new_format)
/* should succeed in opening the target object A in the current working directory */
if (oidA < 0) {
H5_FAILED();
- HDputs(" Should succeed in opening family target file A in current working directory");
+ puts(" Should succeed in opening family target file A in current working directory");
goto error;
}
@@ -9145,7 +9150,7 @@ external_set_elink_fapl1(hid_t fapl, hbool_t new_format)
/* should succeed in opening the target object B in the current working directory */
if (oidB < 0) {
H5_FAILED();
- HDputs(" Should succeed in opening multi target file B in current working directory");
+ puts(" Should succeed in opening multi target file B in current working directory");
goto error;
}
@@ -9209,7 +9214,7 @@ external_set_elink_fapl1(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_set_elink_fapl2(hid_t fapl, hbool_t new_format)
+external_set_elink_fapl2(hid_t fapl, bool new_format)
{
hid_t fid = H5I_INVALID_HID;
hid_t gid = H5I_INVALID_HID;
@@ -9267,7 +9272,7 @@ external_set_elink_fapl2(hid_t fapl, hbool_t new_format)
/* create fapl for the target file to be a "core" file */
core_fapl = h5_fileaccess();
- if (H5Pset_fapl_core(core_fapl, (size_t)CORE_INCREMENT, TRUE) < 0)
+ if (H5Pset_fapl_core(core_fapl, (size_t)CORE_INCREMENT, true) < 0)
TEST_ERROR;
/* set up name for external linked target file: "extlinks17" */
@@ -9323,7 +9328,7 @@ external_set_elink_fapl2(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* create fapl to be a "core" file without backing store */
- if (H5Pset_fapl_core(core_fapl, (size_t)CORE_INCREMENT, FALSE) < 0)
+ if (H5Pset_fapl_core(core_fapl, (size_t)CORE_INCREMENT, false) < 0)
TEST_ERROR;
/* Set file access property list for link access to use the "core" driver */
@@ -9336,7 +9341,7 @@ external_set_elink_fapl2(hid_t fapl, hbool_t new_format)
did = H5Dopen2(fid, "ext_link", dapl_id);
if (did < 0) {
H5_FAILED();
- HDputs(" Should succeed in opening the target dataset");
+ puts(" Should succeed in opening the target dataset");
goto error;
}
@@ -9427,10 +9432,10 @@ external_set_elink_fapl2(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_set_elink_fapl3(hbool_t new_format)
+external_set_elink_fapl3(bool new_format)
{
- hid_t core_fapl = -1, stdio_fapl = -1;
- hid_t lapl_id = -1, new_lapl_id = -1, l_fapl = -1, out_fapl;
+ hid_t core_fapl = H5I_INVALID_HID, stdio_fapl = H5I_INVALID_HID;
+ hid_t lapl_id = H5I_INVALID_HID, new_lapl_id = H5I_INVALID_HID, l_fapl = H5I_INVALID_HID, out_fapl;
if (new_format)
TESTING("H5Pset/get_fapl() (w/new group format)");
@@ -9439,7 +9444,7 @@ external_set_elink_fapl3(hbool_t new_format)
/* create fapl for the target file to be a "core" file */
core_fapl = h5_fileaccess();
- if (H5Pset_fapl_core(core_fapl, (size_t)CORE_INCREMENT, TRUE) < 0)
+ if (H5Pset_fapl_core(core_fapl, (size_t)CORE_INCREMENT, true) < 0)
TEST_ERROR;
stdio_fapl = h5_fileaccess();
@@ -9529,9 +9534,10 @@ external_set_elink_fapl3(hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_set_elink_acc_flags(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
+external_set_elink_acc_flags(const char *env_h5_drvr, hid_t fapl, bool new_format)
{
- hid_t file1 = -1, file2 = -1, group = -1, subgroup = -1, gapl = -1;
+ hid_t file1 = H5I_INVALID_HID, file2 = H5I_INVALID_HID, group = H5I_INVALID_HID,
+ subgroup = H5I_INVALID_HID, gapl = H5I_INVALID_HID;
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE];
herr_t ret;
unsigned flags;
@@ -9840,13 +9846,13 @@ external_set_elink_cb_cb(const char *parent_file, const char *parent_group, cons
set_elink_cb_t *op_data = (set_elink_cb_t *)_op_data;
/* Verify file and object names are correct */
- if (HDstrcmp(parent_file, op_data->parent_file) != 0)
+ if (strcmp(parent_file, op_data->parent_file) != 0)
return FAIL;
- if (HDstrcmp(parent_group, "/group1") != 0)
+ if (strcmp(parent_group, "/group1") != 0)
return FAIL;
- if (HDstrcmp(target_file, op_data->target_file) != 0)
+ if (strcmp(target_file, op_data->target_file) != 0)
return FAIL;
- if (HDstrcmp(target_obj, "/") != 0)
+ if (strcmp(target_obj, "/") != 0)
return FAIL;
/* Set flags to be read-write */
@@ -9867,10 +9873,11 @@ external_set_elink_cb_cb(const char *parent_file, const char *parent_group, cons
/* Main test function */
static int
-external_set_elink_cb(hid_t fapl, hbool_t new_format)
+external_set_elink_cb(hid_t fapl, bool new_format)
{
- hid_t file1 = -1, file2 = -1, group = -1, gapl = -1, fam_fapl = -1, ret_fapl = -1, base_driver;
- set_elink_cb_t op_data, *op_data_p;
+ hid_t file1 = H5I_INVALID_HID, file2 = H5I_INVALID_HID, group = H5I_INVALID_HID, gapl = H5I_INVALID_HID,
+ fam_fapl = H5I_INVALID_HID, ret_fapl = H5I_INVALID_HID, base_driver;
+ set_elink_cb_t op_data, *op_data_p;
H5L_elink_traverse_t cb;
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE];
unsigned flags;
@@ -9886,7 +9893,7 @@ external_set_elink_cb(hid_t fapl, hbool_t new_format)
/* Core file driver has issues when used as the member file driver for a family file */
/* Family file driver cannot be used with family or multi drivers for member files */
/* Also disable parallel member drivers, because H5F_HAS_FEATURE(H5FD_FEAT_HAS_MPI)
- would report FALSE, causing problems */
+ would report false, causing problems */
base_driver = H5Pget_driver(fapl);
op_data.base_fapl =
(base_driver == H5FD_FAMILY || base_driver == H5FD_MULTI || base_driver == H5FD_MPIO ||
@@ -10098,10 +10105,10 @@ external_reset_register(void)
*-------------------------------------------------------------------------
*/
static int
-external_link_win1(hid_t fapl, hbool_t new_format)
+external_link_win1(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE], tmpname[NAME_BUF_SIZE],
cwdpath[NAME_BUF_SIZE];
@@ -10117,9 +10124,9 @@ external_link_win1(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* set up name for target link: "/CWD/tmp_links/extlinks10" */
- HDstrcpy(tmpname, &cwdpath[2]); /* stripped the drive letter to make it rel drive but absolute path */
- HDstrcat(tmpname, "/");
- HDstrcat(tmpname, FILENAME[30]);
+ strcpy(tmpname, &cwdpath[2]); /* stripped the drive letter to make it rel drive but absolute path */
+ strcat(tmpname, "/");
+ strcat(tmpname, FILENAME[30]);
h5_fixname(tmpname, fapl, filename2, sizeof filename2);
/* set up name for target file: "extlinks10" */
@@ -10155,7 +10162,7 @@ external_link_win1(hid_t fapl, hbool_t new_format)
/* should be able to find the target file via main file's CWD*/
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in CWD.");
+ puts(" Should have found the file in CWD.");
goto error;
}
@@ -10192,10 +10199,10 @@ external_link_win1(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_link_win2(hid_t fapl, hbool_t new_format)
+external_link_win2(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE], tmpname[NAME_BUF_SIZE],
cwdpath[NAME_BUF_SIZE];
@@ -10213,10 +10220,9 @@ external_link_win2(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* set up name for target link: "/CWD/tmp_links/extlinks11" */
- HDstrcpy(tmpname,
- &cwdpath[2]); /* stripped the drive letter to make it relative drive but absolute path */
- HDstrcat(tmpname, "/");
- HDstrcat(tmpname, FILENAME[31]);
+ strcpy(tmpname, &cwdpath[2]); /* stripped the drive letter to make it relative drive but absolute path */
+ strcat(tmpname, "/");
+ strcat(tmpname, FILENAME[31]);
h5_fixname(tmpname, fapl, filename2, sizeof filename2);
/* set up name for target file: "tmp_links/extlinks11" */
@@ -10252,7 +10258,7 @@ external_link_win2(hid_t fapl, hbool_t new_format)
/* should be able to find the target file directly */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp_links.");
+ puts(" Should have found the file in tmp_links.");
goto error;
}
@@ -10289,10 +10295,10 @@ external_link_win2(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_link_win3(hid_t fapl, hbool_t new_format)
+external_link_win3(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
int drive = 0;
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE], tmpname[NAME_BUF_SIZE];
@@ -10310,7 +10316,7 @@ external_link_win3(hid_t fapl, hbool_t new_format)
/* set up name for target link: ":tmp_links/extlinks12" */
drive = HDgetdrive();
- HDsnprintf(tmpname, sizeof(tmpname), "%c:%s", (drive + 'A' - 1), FILENAME[32]);
+ snprintf(tmpname, sizeof(tmpname), "%c:%s", (drive + 'A' - 1), FILENAME[32]);
h5_fixname(tmpname, fapl, filename2, sizeof filename2);
/* set up name for target file: "tmp_links/extlinks12" */
@@ -10346,7 +10352,7 @@ external_link_win3(hid_t fapl, hbool_t new_format)
/* should be able to find the target file directly */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp_links.");
+ puts(" Should have found the file in tmp_links.");
goto error;
}
@@ -10383,10 +10389,10 @@ external_link_win3(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_link_win4(hid_t fapl, hbool_t new_format)
+external_link_win4(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
int drive = 0;
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE], tmpname[NAME_BUF_SIZE];
@@ -10397,11 +10403,11 @@ external_link_win4(hid_t fapl, hbool_t new_format)
/* set up name for main file: ":tmp_links/extlinks0" */
drive = HDgetdrive();
- HDsnprintf(tmpname, sizeof(tmpname), "%c:%s", (drive + 'A' - 1), FILENAME[13]);
+ snprintf(tmpname, sizeof(tmpname), "%c:%s", (drive + 'A' - 1), FILENAME[13]);
h5_fixname(tmpname, fapl, filename1, sizeof filename1);
/* set up name for target link: ":extlinks13" */
- HDsnprintf(tmpname, sizeof(tmpname), "%c:%s", (drive + 'A' - 1), FILENAME[33]);
+ snprintf(tmpname, sizeof(tmpname), "%c:%s", (drive + 'A' - 1), FILENAME[33]);
h5_fixname(tmpname, fapl, filename2, sizeof filename2);
/* set up name for target file: "tmp_links/extlinks13" */
@@ -10437,7 +10443,7 @@ external_link_win4(hid_t fapl, hbool_t new_format)
/* should be able to find the target file via main file's absolute drive/relative path */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in CWD.");
+ puts(" Should have found the file in CWD.");
goto error;
}
@@ -10474,10 +10480,10 @@ external_link_win4(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_link_win5(hid_t fapl, hbool_t new_format)
+external_link_win5(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
int drive = 0;
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE], tmpname[NAME_BUF_SIZE],
cwdpath[NAME_BUF_SIZE];
@@ -10496,13 +10502,13 @@ external_link_win5(hid_t fapl, hbool_t new_format)
drive += 1;
/* set up name for main file: "/CWD/extlinks0" */
- HDstrcpy(tmpname, &cwdpath[2]); /* stripped the drive letter to make it rel drive but absolute path */
- HDstrcat(tmpname, "/");
- HDstrcat(tmpname, FILENAME[12]);
+ strcpy(tmpname, &cwdpath[2]); /* stripped the drive letter to make it rel drive but absolute path */
+ strcat(tmpname, "/");
+ strcat(tmpname, FILENAME[12]);
h5_fixname(tmpname, fapl, filename1, sizeof filename1);
/* set up name for target link: ":tmp_links/extlinks14" */
- HDsnprintf(tmpname, sizeof(tmpname), "%c:%s", (drive + 'A' - 1), FILENAME[35]);
+ snprintf(tmpname, sizeof(tmpname), "%c:%s", (drive + 'A' - 1), FILENAME[35]);
h5_fixname(tmpname, fapl, filename2, sizeof filename2);
/* set up name for target file: "tmp_links/extlinks14" */
@@ -10538,7 +10544,7 @@ external_link_win5(hid_t fapl, hbool_t new_format)
/* should be able to find the target file via main file's rel drive/abs path */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in CWD.");
+ puts(" Should have found the file in CWD.");
goto error;
}
@@ -10575,10 +10581,10 @@ external_link_win5(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_link_win6(hid_t fapl, hbool_t new_format)
+external_link_win6(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
int drive = 0;
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE], tmpname[NAME_BUF_SIZE];
@@ -10600,7 +10606,7 @@ external_link_win6(hid_t fapl, hbool_t new_format)
h5_fixname(FILENAME[12], fapl, filename1, sizeof filename1);
/* set up name for target link: ":tmp_links/extlinks15" */
- HDsnprintf(tmpname, sizeof(tmpname), "%c:%s", (drive + 'A' - 1), FILENAME[36]);
+ snprintf(tmpname, sizeof(tmpname), "%c:%s", (drive + 'A' - 1), FILENAME[36]);
h5_fixname(tmpname, fapl, filename2, sizeof filename2);
/* set up name for target file: "tmp/extlinks15" */
@@ -10636,7 +10642,7 @@ external_link_win6(hid_t fapl, hbool_t new_format)
/* should be able to find the target file via target file's rel path in current drive */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp_links.");
+ puts(" Should have found the file in tmp_links.");
goto error;
}
@@ -10673,10 +10679,10 @@ external_link_win6(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_link_win7(hid_t fapl, hbool_t new_format)
+external_link_win7(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE], tmpname[NAME_BUF_SIZE],
cwdpath[NAME_BUF_SIZE];
@@ -10693,9 +10699,9 @@ external_link_win7(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* set up name for target link: "\\127.0.0.1\c$/tmp_links/extlinks10" */
- HDstrcpy(tmpname, "\\\\127.0.0.1\\c$"); /* absolute path */
- HDstrcat(tmpname, "/");
- HDstrcat(tmpname, FILENAME[30]);
+ strcpy(tmpname, "\\\\127.0.0.1\\c$"); /* absolute path */
+ strcat(tmpname, "/");
+ strcat(tmpname, FILENAME[30]);
h5_fixname(tmpname, fapl, filename2, sizeof filename2);
/* set up name for target file: "extlinks15" */
@@ -10731,7 +10737,7 @@ external_link_win7(hid_t fapl, hbool_t new_format)
/* should be able to find the target file via main file's local host/main drive*/
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in local host/main drive.");
+ puts(" Should have found the file in local host/main drive.");
goto error;
}
@@ -10769,10 +10775,10 @@ external_link_win7(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_link_win8(hid_t fapl, hbool_t new_format)
+external_link_win8(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
int drive = 0;
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE], tmpname[NAME_BUF_SIZE],
cwdpath[NAME_BUF_SIZE];
@@ -10795,7 +10801,7 @@ external_link_win8(hid_t fapl, hbool_t new_format)
/* set up name for target link: ":\CWD\extlinks10" */
drive = HDgetdrive();
- HDsnprintf(tmpname, sizeof(tmpname), "\\\\?\\%c:%s\\%s", (drive + 'A' - 1), &cwdpath[2], FILENAME[30]);
+ snprintf(tmpname, sizeof(tmpname), "\\\\?\\%c:%s\\%s", (drive + 'A' - 1), &cwdpath[2], FILENAME[30]);
h5_fixname(tmpname, fapl, filename2, sizeof filename2);
/* set up name for target file: "extlinks10" */
@@ -10831,7 +10837,7 @@ external_link_win8(hid_t fapl, hbool_t new_format)
/* should be able to find the target file directly */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp_links.");
+ puts(" Should have found the file in tmp_links.");
goto error;
}
@@ -10868,10 +10874,10 @@ external_link_win8(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_link_win9(hid_t fapl, hbool_t new_format)
+external_link_win9(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE], tmpname[NAME_BUF_SIZE],
cwdpath[NAME_BUF_SIZE];
@@ -10888,9 +10894,9 @@ external_link_win9(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* set up name for target link: "\\?\UNC\127.0.0.1\c$/tmp_links/extlinks10" */
- HDstrcpy(tmpname, "\\\\?\\UNC\127.0.0.1\\c$"); /* absolute path */
- HDstrcat(tmpname, "/");
- HDstrcat(tmpname, FILENAME[30]);
+ strcpy(tmpname, "\\\\?\\UNC\127.0.0.1\\c$"); /* absolute path */
+ strcat(tmpname, "/");
+ strcat(tmpname, FILENAME[30]);
h5_fixname(tmpname, fapl, filename2, sizeof filename2);
/* set up name for target file: "extlinks15" */
@@ -10926,7 +10932,7 @@ external_link_win9(hid_t fapl, hbool_t new_format)
/* should be able to find the target file via main file's local host/main drive*/
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in local host/main drive.");
+ puts(" Should have found the file in local host/main drive.");
goto error;
}
@@ -10961,10 +10967,10 @@ external_link_win9(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_link_recursive(hid_t fapl, hbool_t new_format)
+external_link_recursive(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
char filename1[NAME_BUF_SIZE]; /* Names of files to externally link across */
if (new_format)
@@ -10999,7 +11005,7 @@ external_link_recursive(hid_t fapl, hbool_t new_format)
H5E_END_TRY
if (gid >= 0) {
H5_FAILED();
- HDputs(" Should have failed for recursive external links.");
+ puts(" Should have failed for recursive external links.");
goto error;
}
@@ -11031,14 +11037,14 @@ external_link_recursive(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_link_query(hid_t fapl, hbool_t new_format)
+external_link_query(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
- const char *file_name; /* Name of the file the external link points to */
- const char *object_name; /* Name of the object the external link points to */
- H5O_info2_t oi; /* Object information */
- H5L_info2_t li; /* Link information */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
+ const char *file_name; /* Name of the file the external link points to */
+ const char *object_name; /* Name of the object the external link points to */
+ H5O_info2_t oi; /* Object information */
+ H5L_info2_t li; /* Link information */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], /* Names of files to externally link across */
query_buf[NAME_BUF_SIZE]; /* Buffer to hold query result */
@@ -11063,11 +11069,11 @@ external_link_query(hid_t fapl, hbool_t new_format)
/* Get size of buffer for external link */
if (H5Lget_info2(fid, "src", &li, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (li.u.val_size != (1 + (HDstrlen(filename2) + 1) + (HDstrlen("/dst") + 1)))
+ if (li.u.val_size != (1 + (strlen(filename2) + 1) + (strlen("/dst") + 1)))
TEST_ERROR;
if (H5L_TYPE_EXTERNAL != li.type) {
H5_FAILED();
- HDputs(" Unexpected link class - should have been an external link");
+ puts(" Unexpected link class - should have been an external link");
goto error;
}
@@ -11096,11 +11102,11 @@ external_link_query(hid_t fapl, hbool_t new_format)
/* Get size of buffer for external link */
if (H5Lget_info2(fid, "src", &li, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (li.u.val_size != (1 + (HDstrlen(filename2) + 1) + (HDstrlen("/dst") + 1)))
+ if (li.u.val_size != (1 + (strlen(filename2) + 1) + (strlen("/dst") + 1)))
TEST_ERROR;
if (H5L_TYPE_EXTERNAL != li.type) {
H5_FAILED();
- HDputs(" Unexpected link class - should have been an external link");
+ puts(" Unexpected link class - should have been an external link");
goto error;
}
@@ -11113,9 +11119,9 @@ external_link_query(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* Compare the file and object names */
- if (HDstrcmp(file_name, filename2) != 0)
+ if (strcmp(file_name, filename2) != 0)
TEST_ERROR;
- if (HDstrcmp(object_name, "/dst") != 0)
+ if (strcmp(object_name, "/dst") != 0)
TEST_ERROR;
/* Query information about object that external link points to */
@@ -11123,7 +11129,7 @@ external_link_query(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
if (H5O_TYPE_GROUP != oi.type) {
H5_FAILED();
- HDputs(" Unexpected object type - should have been a group");
+ puts(" Unexpected object type - should have been a group");
goto error;
}
@@ -11184,10 +11190,10 @@ external_link_query(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_link_unlink_compact(hid_t fapl, hbool_t new_format)
+external_link_unlink_compact(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE]; /* Names of files to externally link across */
if (new_format)
@@ -11277,11 +11283,11 @@ external_link_unlink_compact(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_link_unlink_dense(hid_t fapl, hbool_t new_format)
+external_link_unlink_dense(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gcpl = -1; /* Group creation property list ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gcpl = H5I_INVALID_HID; /* Group creation property list ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
char objname[NAME_BUF_SIZE]; /* Object name */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE]; /* Names of files to externally link across */
unsigned nmsgs; /* Number of messages in group's header */
@@ -11307,7 +11313,7 @@ external_link_unlink_dense(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
/* Check on root group's status */
- if (H5G__is_empty_test(gid) != TRUE)
+ if (H5G__is_empty_test(gid) != true)
TEST_ERROR;
/* Query the group creation properties */
@@ -11323,18 +11329,18 @@ external_link_unlink_dense(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* Check on root group's status */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, &nmsgs) != TRUE)
+ if (H5G__has_links_test(gid, &nmsgs) != true)
TEST_ERROR;
if (nmsgs != 1)
TEST_ERROR;
- if (H5G__has_stab_test(gid) == TRUE)
+ if (H5G__has_stab_test(gid) == true)
TEST_ERROR;
/* Create enough objects in the root group to change it into a "dense" group */
for (u = 0; u < max_compact; u++) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if ((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(gid2) < 0)
@@ -11342,11 +11348,11 @@ external_link_unlink_dense(hid_t fapl, hbool_t new_format)
} /* end for */
/* Check on root group's status */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, NULL) == TRUE)
+ if (H5G__has_links_test(gid, NULL) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(gid) != TRUE)
+ if (H5G__is_new_dense_test(gid) != true)
TEST_ERROR;
/* Close group creation property list */
@@ -11389,21 +11395,21 @@ external_link_unlink_dense(hid_t fapl, hbool_t new_format)
/* Remove enough objects in the root group to change it into a "compact" group */
for (u = 0; u < ((max_compact - min_dense) + 1); u++) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if (H5Ldelete(gid, objname, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
/* Check on root group's status */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, &nmsgs) != TRUE)
+ if (H5G__has_links_test(gid, &nmsgs) != true)
TEST_ERROR;
if (nmsgs != (min_dense - 1))
TEST_ERROR;
- if (H5G__is_new_dense_test(gid) == TRUE)
+ if (H5G__is_new_dense_test(gid) == true)
TEST_ERROR;
- if (H5G__has_stab_test(gid) == TRUE)
+ if (H5G__has_stab_test(gid) == true)
TEST_ERROR;
/* Close root group */
@@ -11454,10 +11460,10 @@ external_link_unlink_dense(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_link_move(hid_t fapl, hbool_t new_format)
+external_link_move(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
char objname[NAME_BUF_SIZE]; /* Object name */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE]; /* Names of files to externally link across */
@@ -11512,7 +11518,7 @@ external_link_move(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(objname, "/dst") != 0)
+ if (strcmp(objname, "/dst") != 0)
TEST_ERROR;
/* Create object in external file */
@@ -11572,7 +11578,7 @@ external_link_move(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(objname, "/dst") != 0)
+ if (strcmp(objname, "/dst") != 0)
TEST_ERROR;
/* Create object in external file */
@@ -11619,7 +11625,7 @@ external_link_move(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(objname, "/dst") != 0)
+ if (strcmp(objname, "/dst") != 0)
TEST_ERROR;
/* Move external link back to original location */
@@ -11629,7 +11635,7 @@ external_link_move(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(objname, "/dst") != 0)
+ if (strcmp(objname, "/dst") != 0)
TEST_ERROR;
/* Create object in external file */
@@ -11689,11 +11695,11 @@ external_link_move(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_link_ride(hid_t fapl, hbool_t new_format)
+external_link_ride(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gcpl = -1; /* Group creation property list ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gcpl = H5I_INVALID_HID; /* Group creation property list ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
char objname[NAME_BUF_SIZE]; /* Object name */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE]; /* Names of files to externally link across */
unsigned nmsgs; /* Number of messages in group's header */
@@ -11719,7 +11725,7 @@ external_link_ride(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
/* Check on root group's status */
- if (H5G__is_empty_test(gid) != TRUE)
+ if (H5G__is_empty_test(gid) != true)
TEST_ERROR;
/* Query the group creation properties */
@@ -11730,7 +11736,7 @@ external_link_ride(hid_t fapl, hbool_t new_format)
/* Create enough objects in the root group to change it into a "dense" group */
for (u = 0; u < (max_compact + 1); u++) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if ((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(gid2) < 0)
@@ -11738,16 +11744,16 @@ external_link_ride(hid_t fapl, hbool_t new_format)
} /* end for */
/* Check on root group's status */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, NULL) == TRUE)
+ if (H5G__has_links_test(gid, NULL) == true)
TEST_ERROR;
if (new_format) {
- if (H5G__is_new_dense_test(gid) != TRUE)
+ if (H5G__is_new_dense_test(gid) != true)
TEST_ERROR;
} /* end if */
else {
- if (H5G__has_stab_test(gid) != TRUE)
+ if (H5G__has_stab_test(gid) != true)
TEST_ERROR;
} /* end else */
@@ -11757,11 +11763,11 @@ external_link_ride(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* Check on root group's status */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, NULL) == TRUE)
+ if (H5G__has_links_test(gid, NULL) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(gid) != TRUE)
+ if (H5G__is_new_dense_test(gid) != true)
TEST_ERROR;
/* Close group creation property list */
@@ -11803,7 +11809,7 @@ external_link_ride(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/dst") != 0)
+ if (strcmp(objname, "/dst") != 0)
TEST_ERROR;
/* Create object in external file */
@@ -11824,21 +11830,21 @@ external_link_ride(hid_t fapl, hbool_t new_format)
/* Remove enough objects in the root group to change it into a "compact" group */
for (u = 0; u < ((max_compact - min_dense) + 3); u++) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if (H5Ldelete(gid, objname, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
/* Check on root group's status */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, &nmsgs) != TRUE)
+ if (H5G__has_links_test(gid, &nmsgs) != true)
TEST_ERROR;
if (nmsgs != (min_dense - 1))
TEST_ERROR;
- if (H5G__has_stab_test(gid) == TRUE)
+ if (H5G__has_stab_test(gid) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(gid) == TRUE)
+ if (H5G__is_new_dense_test(gid) == true)
TEST_ERROR;
/* Close root group */
@@ -11852,7 +11858,7 @@ external_link_ride(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/dst") != 0)
+ if (strcmp(objname, "/dst") != 0)
TEST_ERROR;
/* Create object in external file */
@@ -11921,11 +11927,13 @@ external_link_ride(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_link_closing(hid_t fapl, hbool_t new_format)
+external_link_closing(hid_t fapl, bool new_format)
{
- hid_t fid1 = (-1), fid2 = (-1), fid3 = (-1), fid4 = (-1);
- hid_t gid = (-1), tid = (-1), tid2 = (-1), sid = (-1), did = (-1);
- hid_t lcpl_id = (-1);
+ hid_t fid1 = (H5I_INVALID_HID), fid2 = (H5I_INVALID_HID), fid3 = (H5I_INVALID_HID),
+ fid4 = (H5I_INVALID_HID);
+ hid_t gid = (H5I_INVALID_HID), tid = (H5I_INVALID_HID), tid2 = (H5I_INVALID_HID), sid = (H5I_INVALID_HID),
+ did = (H5I_INVALID_HID);
+ hid_t lcpl_id = (H5I_INVALID_HID);
hsize_t dims[2];
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE],
filename4[NAME_BUF_SIZE], /* Names of files to externally link across */
@@ -12045,7 +12053,7 @@ external_link_closing(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
if (H5Oget_comment_by_name(fid1, "elink/elink/elink/group1_moved", buf, sizeof(buf), H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(buf, "comment") != 0)
+ if (strcmp(buf, "comment") != 0)
TEST_ERROR;
/* Test H5*open */
@@ -12149,7 +12157,7 @@ external_link_closing(hid_t fapl, hbool_t new_format)
/* Add a few regular groups and a soft link in file2 using intermediate group creation */
if ((lcpl_id = H5Pcreate(H5P_LINK_CREATE)) < 0)
TEST_ERROR;
- if (H5Pset_create_intermediate_group(lcpl_id, TRUE) < 0)
+ if (H5Pset_create_intermediate_group(lcpl_id, true) < 0)
TEST_ERROR;
if (H5Lcreate_soft("/elink2", fid1, "elink/file2group1/file2group2/slink", lcpl_id, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -12237,12 +12245,12 @@ external_link_closing(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_link_endian(hbool_t new_format)
+external_link_endian(bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t lapl_id = -1; /* Prop List ID */
- const char *pathbuf = H5_get_srcdir(); /* Path to the files */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t lapl_id = H5I_INVALID_HID; /* Prop List ID */
+ const char *pathbuf = H5_get_srcdir(); /* Path to the files */
const char *namebuf;
if (new_format)
@@ -12322,12 +12330,12 @@ external_link_endian(hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_link_strong(hid_t fapl, hbool_t new_format)
+external_link_strong(hid_t fapl, bool new_format)
{
- hid_t my_fapl = (-1); /* File access property list */
- hid_t fid1 = (-1), fid2 = (-1); /* File ID */
- hid_t gid1 = (-1), gid2 = (-1); /* Group IDs */
- char objname[NAME_BUF_SIZE]; /* Object name */
+ hid_t my_fapl = (H5I_INVALID_HID); /* File access property list */
+ hid_t fid1 = (H5I_INVALID_HID), fid2 = (H5I_INVALID_HID); /* File ID */
+ hid_t gid1 = (H5I_INVALID_HID), gid2 = (H5I_INVALID_HID); /* Group IDs */
+ char objname[NAME_BUF_SIZE]; /* Object name */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE];
if (new_format)
@@ -12388,7 +12396,7 @@ external_link_strong(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
if (H5Iget_name(gid2, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/A/B/C") != 0)
+ if (strcmp(objname, "/A/B/C") != 0)
TEST_ERROR;
if (H5Gclose(gid2) < 0)
TEST_ERROR;
@@ -12427,31 +12435,31 @@ external_link_strong(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_symlink(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
+external_symlink(const char *env_h5_drvr, hid_t fapl, bool new_format)
{
#ifdef H5_HAVE_SYMLINK
- hid_t file1 = H5I_INVALID_HID;
- hid_t file2 = H5I_INVALID_HID;
- hid_t file3 = H5I_INVALID_HID;
- hid_t file4 = H5I_INVALID_HID;
- hid_t file5 = H5I_INVALID_HID;
- hid_t group2 = H5I_INVALID_HID;
- hid_t group3 = H5I_INVALID_HID;
- hid_t group4 = H5I_INVALID_HID;
- hid_t group5 = H5I_INVALID_HID;
- char *filename1 = NULL;
- char *filename2a = NULL;
- char *filename2b = NULL;
- char *filename3a = NULL;
- char *filename3b = NULL;
- char *filename4a = NULL;
- char *filename4b = NULL;
- char *filename5a = NULL;
- char *filename5b = NULL;
- char *tmpname = NULL;
- char *cwdpath = NULL;
- hbool_t have_posix_compat_vfd; /* Whether VFD used is compatible w/POSIX I/O calls */
-#endif /* H5_HAVE_SYMLINK */
+ hid_t file1 = H5I_INVALID_HID;
+ hid_t file2 = H5I_INVALID_HID;
+ hid_t file3 = H5I_INVALID_HID;
+ hid_t file4 = H5I_INVALID_HID;
+ hid_t file5 = H5I_INVALID_HID;
+ hid_t group2 = H5I_INVALID_HID;
+ hid_t group3 = H5I_INVALID_HID;
+ hid_t group4 = H5I_INVALID_HID;
+ hid_t group5 = H5I_INVALID_HID;
+ char *filename1 = NULL;
+ char *filename2a = NULL;
+ char *filename2b = NULL;
+ char *filename3a = NULL;
+ char *filename3b = NULL;
+ char *filename4a = NULL;
+ char *filename4b = NULL;
+ char *filename5a = NULL;
+ char *filename5b = NULL;
+ char *tmpname = NULL;
+ char *cwdpath = NULL;
+ bool have_posix_compat_vfd; /* Whether VFD used is compatible w/POSIX I/O calls */
+#endif /* H5_HAVE_SYMLINK */
if (new_format)
TESTING("external links w/symlink files (w/new group format)");
@@ -12462,11 +12470,11 @@ external_symlink(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
/* Skip test when using VFDs that can't provide a POSIX compatible file
* descriptor.
*/
- have_posix_compat_vfd = (hbool_t)(!HDstrcmp(env_h5_drvr, "sec2") || !HDstrcmp(env_h5_drvr, "core") ||
- !HDstrcmp(env_h5_drvr, "nomatch"));
+ have_posix_compat_vfd = (bool)(!strcmp(env_h5_drvr, "sec2") || !strcmp(env_h5_drvr, "core") ||
+ !strcmp(env_h5_drvr, "nomatch"));
if (!have_posix_compat_vfd) {
SKIPPED();
- HDputs(" Current VFD doesn't support POSIX I/O calls");
+ puts(" Current VFD doesn't support POSIX I/O calls");
return SUCCEED;
}
@@ -12707,7 +12715,7 @@ external_symlink(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
#else /* H5_HAVE_SYMLINK */
SKIPPED();
- HDputs(" Current file system or operating system doesn't support symbolic links");
+ puts(" Current file system or operating system doesn't support symbolic links");
return SUCCEED;
#endif /* H5_HAVE_SYMLINK */
@@ -12726,11 +12734,11 @@ external_symlink(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_copy_invalid_object(hid_t fapl, hbool_t new_format)
+external_copy_invalid_object(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group ID */
- hid_t ocpyplid = -1; /* Object copy plist ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t ocpyplid = H5I_INVALID_HID; /* Object copy plist ID */
char filename[NAME_BUF_SIZE];
if (new_format)
@@ -12806,11 +12814,11 @@ external_copy_invalid_object(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_dont_fail_to_source(hid_t fapl, hbool_t new_format)
+external_dont_fail_to_source(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group ID */
- hid_t oid = -1; /* Object ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t oid = H5I_INVALID_HID; /* Object ID */
char filename[NAME_BUF_SIZE];
if (new_format)
@@ -12875,14 +12883,14 @@ external_dont_fail_to_source(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_file_cache(hid_t fapl, hbool_t new_format)
+external_file_cache(hid_t fapl, bool new_format)
{
- hid_t my_fapl = -1; /* Temporary FAPL */
- hid_t fid1 = -1; /* File ID */
- hid_t fid2 = -1; /* File ID */
- hid_t fid3 = -1; /* File ID */
- hid_t fid4 = -1; /* File ID */
- hid_t oid = -1; /* Object ID */
+ hid_t my_fapl = H5I_INVALID_HID; /* Temporary FAPL */
+ hid_t fid1 = H5I_INVALID_HID; /* File ID */
+ hid_t fid2 = H5I_INVALID_HID; /* File ID */
+ hid_t fid3 = H5I_INVALID_HID; /* File ID */
+ hid_t fid4 = H5I_INVALID_HID; /* File ID */
+ hid_t oid = H5I_INVALID_HID; /* Object ID */
unsigned efc_size;
char filename1[NAME_BUF_SIZE];
char filename2[NAME_BUF_SIZE];
@@ -13233,14 +13241,14 @@ external_file_cache(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_open_twice(hid_t fapl, hbool_t new_format)
+external_open_twice(hid_t fapl, bool new_format)
{
- hid_t fid1 = -1; /* File ID */
- hid_t fid2 = -1; /* File ID */
- hid_t oid1 = -1; /* Object ID */
- hid_t oid2 = -1; /* Object ID */
- hid_t type = -1; /* Datatype ID */
- hid_t space = -1; /* Dataspace ID */
+ hid_t fid1 = H5I_INVALID_HID; /* File ID */
+ hid_t fid2 = H5I_INVALID_HID; /* File ID */
+ hid_t oid1 = H5I_INVALID_HID; /* Object ID */
+ hid_t oid2 = H5I_INVALID_HID; /* Object ID */
+ hid_t type = H5I_INVALID_HID; /* Datatype ID */
+ hid_t space = H5I_INVALID_HID; /* Dataspace ID */
char filename1[NAME_BUF_SIZE];
char filename2[NAME_BUF_SIZE];
@@ -13448,26 +13456,26 @@ external_open_twice(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_link_with_committed_datatype(hid_t fapl, hbool_t new_format)
+external_link_with_committed_datatype(hid_t fapl, bool new_format)
{
- hid_t fid1 = -1, fid2 = -1; /* File IDs */
- hid_t gid1 = -1, gid2 = -1; /* Group IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t sid2 = -1; /* Dataspace ID */
- hid_t aid = -1; /* Attribute ID */
- hid_t atid = -1; /* Attribute's datatype ID */
- hid_t did = -1; /* Dataset ID */
- hid_t dtid = -1; /* Dataset's datatype ID */
- hid_t dcpl = -1; /* Dataset creation property list */
- int wdata = 99; /* Attribute data written */
- int wbuf[60]; /* Data buffer for writing */
- int rbuf[60]; /* Data buffer for reading */
- int i; /* Local index variable */
- char filename1[NAME_BUF_SIZE]; /* File name for main file */
- char filename2[NAME_BUF_SIZE]; /* File name for target file */
- hsize_t dims[2] = {5, 12}; /* Dimension sizes */
- hsize_t chunks[2] = {3, 7}; /* Chunk sizes */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File IDs */
+ hid_t gid1 = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t sid2 = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ hid_t atid = H5I_INVALID_HID; /* Attribute's datatype ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t dtid = H5I_INVALID_HID; /* Dataset's datatype ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
+ int wdata = 99; /* Attribute data written */
+ int wbuf[60]; /* Data buffer for writing */
+ int rbuf[60]; /* Data buffer for reading */
+ int i; /* Local index variable */
+ char filename1[NAME_BUF_SIZE]; /* File name for main file */
+ char filename2[NAME_BUF_SIZE]; /* File name for target file */
+ hsize_t dims[2] = {5, 12}; /* Dimension sizes */
+ hsize_t chunks[2] = {3, 7}; /* Chunk sizes */
if (new_format)
TESTING("attach committed datatype to external group's attribute/dataset(w/new group format)");
@@ -13529,7 +13537,7 @@ external_link_with_committed_datatype(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
/* Verify the datatype is not committed */
- if (H5Tcommitted(atid) == TRUE)
+ if (H5Tcommitted(atid) == true)
FAIL_STACK_ERROR;
/* Close the attribute */
@@ -13568,7 +13576,7 @@ external_link_with_committed_datatype(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
/* Verify the datatype is not committed */
- if (H5Tcommitted(dtid) == TRUE)
+ if (H5Tcommitted(dtid) == true)
FAIL_STACK_ERROR;
/* Close the dataset */
@@ -13610,7 +13618,7 @@ external_link_with_committed_datatype(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
/* Verify the datatype is committed */
- if (H5Tcommitted(tid) == FALSE)
+ if (H5Tcommitted(tid) == false)
FAIL_STACK_ERROR;
/* Open the group which is externally linked to target file */
@@ -13626,7 +13634,7 @@ external_link_with_committed_datatype(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
/* Verify the attribute's datatype is not committed */
- if (H5Tcommitted(atid) == TRUE)
+ if (H5Tcommitted(atid) == true)
FAIL_STACK_ERROR;
/* Close the attribute */
@@ -13646,7 +13654,7 @@ external_link_with_committed_datatype(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
/* Verify the dataset's datatype is not committed */
- if (H5Tcommitted(dtid) == TRUE)
+ if (H5Tcommitted(dtid) == true)
FAIL_STACK_ERROR;
/* Read the dataset */
@@ -13715,9 +13723,9 @@ external_link_with_committed_datatype(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-external_link_public_macros(hid_t fapl, hbool_t new_format)
+external_link_public_macros(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
H5L_info2_t linfo; /* Link information */
char objname[NAME_BUF_SIZE]; /* Object name */
char filename1[NAME_BUF_SIZE];
@@ -13744,7 +13752,7 @@ external_link_public_macros(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* Check that external links are registered with the library */
- if (H5Lis_registered(H5L_TYPE_EXTERNAL) != TRUE)
+ if (H5Lis_registered(H5L_TYPE_EXTERNAL) != true)
TEST_ERROR;
/* Create file with link to first file */
@@ -13761,7 +13769,7 @@ external_link_public_macros(hid_t fapl, hbool_t new_format)
if (H5L_TYPE_EXTERNAL != linfo.type) {
H5_FAILED();
- HDputs(" Unexpected object type - should have been an external link");
+ puts(" Unexpected object type - should have been an external link");
goto error;
}
@@ -13771,22 +13779,22 @@ external_link_public_macros(hid_t fapl, hbool_t new_format)
if (H5Lunpack_elink_val(objname, linfo.u.val_size, &flags, &file, &path) < 0)
TEST_ERROR;
- if (HDstrcmp(file, filename1) != 0) {
+ if (strcmp(file, filename1) != 0) {
H5_FAILED();
- HDputs(" External link file name incorrect");
+ puts(" External link file name incorrect");
goto error;
}
- if (HDstrcmp(path, "/") != 0) {
+ if (strcmp(path, "/") != 0) {
H5_FAILED();
- HDputs(" External link path incorrect");
+ puts(" External link path incorrect");
goto error;
}
/* External link version & flags */
if (flags != ((H5L_EXT_VERSION << 4) | H5L_EXT_FLAGS_ALL)) {
H5_FAILED();
- HDputs(" External link version or flags are incorrect");
+ puts(" External link version or flags are incorrect");
goto error;
}
@@ -13828,7 +13836,7 @@ UD_hard_create(const char H5_ATTR_UNUSED *link_name, hid_t loc_group, const void
hid_t H5_ATTR_UNUSED lcpl_id)
{
H5O_token_t token;
- hid_t target_obj = -1;
+ hid_t target_obj = H5I_INVALID_HID;
herr_t ret_value = 0;
if (udata_size != sizeof(H5O_token_t)) {
@@ -13902,7 +13910,7 @@ UD_hard_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group, const vo
hid_t H5_ATTR_UNUSED lapl_id, hid_t H5_ATTR_UNUSED dxpl_id)
{
H5O_token_t token;
- hid_t ret_value = -1;
+ hid_t ret_value = H5I_INVALID_HID;
if (udata_size != sizeof(H5O_token_t))
return FAIL;
@@ -13920,7 +13928,7 @@ static herr_t
UD_hard_delete(const char H5_ATTR_UNUSED *link_name, hid_t file, const void *udata, size_t udata_size)
{
H5O_token_t token;
- hid_t target_obj = -1;
+ hid_t target_obj = H5I_INVALID_HID;
herr_t ret_value = 0;
if (udata_size != sizeof(H5O_token_t)) {
@@ -13991,11 +13999,11 @@ UD_hard_delete(const char H5_ATTR_UNUSED *link_name, hid_t file, const void *uda
static int
ud_hard_links(hid_t fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- H5L_info2_t li; /* Link information */
- char objname[NAME_BUF_SIZE]; /* Object name */
- h5_stat_size_t empty_size; /* Size of an empty file */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ H5L_info2_t li; /* Link information */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ h5_stat_size_t empty_size; /* Size of an empty file */
char filename[NAME_BUF_SIZE];
TESTING("user-defined hard link (w/new group format)");
@@ -14016,9 +14024,9 @@ ud_hard_links(hid_t fapl)
TEST_ERROR;
/* Check that external links are registered and UD hard links are not */
- if (H5Lis_registered(H5L_TYPE_EXTERNAL) != TRUE)
+ if (H5Lis_registered(H5L_TYPE_EXTERNAL) != true)
TEST_ERROR;
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != FALSE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != false)
TEST_ERROR;
/* Register "user-defined hard links" with the library */
@@ -14026,9 +14034,9 @@ ud_hard_links(hid_t fapl)
TEST_ERROR;
/* Check that UD hard links are now registered */
- if (H5Lis_registered(H5L_TYPE_EXTERNAL) != TRUE)
+ if (H5Lis_registered(H5L_TYPE_EXTERNAL) != true)
TEST_ERROR;
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != TRUE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != true)
TEST_ERROR;
/* Create a group for the UD hard link to point to */
@@ -14061,7 +14069,7 @@ ud_hard_links(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/group") != 0)
+ if (strcmp(objname, "/group") != 0)
TEST_ERROR;
/* Create object in group */
@@ -14081,7 +14089,7 @@ ud_hard_links(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/group/new_group") != 0)
+ if (strcmp(objname, "/group/new_group") != 0)
TEST_ERROR;
/* Close opened object */
@@ -14096,7 +14104,7 @@ ud_hard_links(hid_t fapl)
TEST_ERROR;
if (UD_HARD_TYPE != li.type) {
H5_FAILED();
- HDputs(" Unexpected link class - should have been a UD hard link");
+ puts(" Unexpected link class - should have been a UD hard link");
goto error;
} /* end if */
@@ -14176,10 +14184,10 @@ UD_rereg_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group, const v
static int
ud_link_reregister(hid_t fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- H5L_info2_t li; /* Link information */
- char objname[NAME_BUF_SIZE]; /* Object name */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ H5L_info2_t li; /* Link information */
+ char objname[NAME_BUF_SIZE]; /* Object name */
char filename[NAME_BUF_SIZE];
h5_stat_size_t empty_size; /* Size of an empty file */
@@ -14201,7 +14209,7 @@ ud_link_reregister(hid_t fapl)
TEST_ERROR;
/* Check that UD hard links are not registered */
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != FALSE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != false)
TEST_ERROR;
/* Register "user-defined hard links" with the library */
@@ -14209,7 +14217,7 @@ ud_link_reregister(hid_t fapl)
TEST_ERROR;
/* Check that UD hard links are registered */
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != TRUE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != true)
TEST_ERROR;
/* Point a UD defined hard link to a group in the same way as the previous test */
@@ -14235,7 +14243,7 @@ ud_link_reregister(hid_t fapl)
TEST_ERROR;
/* Check that UD hard links are no longer registered */
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != FALSE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != false)
TEST_ERROR;
/* Verify that we can't traverse the ud link anymore */
@@ -14260,7 +14268,7 @@ ud_link_reregister(hid_t fapl)
TEST_ERROR;
/* Check that UD hard links are registered again */
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != TRUE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != true)
TEST_ERROR;
/* Open a group through the ud link (now a different class of link).
@@ -14272,7 +14280,7 @@ ud_link_reregister(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/" REREG_TARGET_NAME) != 0)
+ if (strcmp(objname, "/" REREG_TARGET_NAME) != 0)
TEST_ERROR;
/* Create object in group */
@@ -14292,7 +14300,7 @@ ud_link_reregister(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/rereg_target/new_group") != 0)
+ if (strcmp(objname, "/rereg_target/new_group") != 0)
TEST_ERROR;
/* Close opened object */
@@ -14309,7 +14317,7 @@ ud_link_reregister(hid_t fapl)
* other link type */
if (H5Lregister(UD_hard_class) < 0)
FAIL_STACK_ERROR;
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != TRUE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != true)
FAIL_STACK_ERROR;
/* Ensure we can open the group through the UD link (now that UD hard
@@ -14340,7 +14348,7 @@ ud_link_reregister(hid_t fapl)
if (H5Lunregister((H5L_type_t)UD_HARD_TYPE) < 0)
FAIL_STACK_ERROR;
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != FALSE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != false)
FAIL_STACK_ERROR;
PASSED();
@@ -14381,9 +14389,9 @@ UD_cb_create(const char *link_name, hid_t loc_group, const void *udata, size_t u
if (lcpl_id < 0)
TEST_ERROR;
- if (HDstrcmp(link_name, UD_CB_LINK_NAME) != 0 && HDstrcmp(link_name, NEW_UD_CB_LINK_NAME) != 0)
+ if (strcmp(link_name, UD_CB_LINK_NAME) != 0 && strcmp(link_name, NEW_UD_CB_LINK_NAME) != 0)
TEST_ERROR;
- if (HDstrcmp((const char *)udata, UD_CB_TARGET) != 0)
+ if (strcmp((const char *)udata, UD_CB_TARGET) != 0)
TEST_ERROR;
if (udata_size != UD_CB_TARGET_LEN)
TEST_ERROR;
@@ -14408,9 +14416,9 @@ UD_cb_traverse(const char *link_name, hid_t cur_group, const void *udata, size_t
if (udata_size > 0 && !udata)
TEST_ERROR;
- if (HDstrcmp(link_name, UD_CB_LINK_NAME) != 0 && HDstrcmp(link_name, NEW_UD_CB_LINK_NAME) != 0)
+ if (strcmp(link_name, UD_CB_LINK_NAME) != 0 && strcmp(link_name, NEW_UD_CB_LINK_NAME) != 0)
TEST_ERROR;
- if (HDstrcmp((const char *)udata, UD_CB_TARGET) != 0)
+ if (strcmp((const char *)udata, UD_CB_TARGET) != 0)
TEST_ERROR;
if (udata_size != UD_CB_TARGET_LEN)
TEST_ERROR;
@@ -14435,9 +14443,9 @@ UD_cb_move(const char *new_name, hid_t new_loc, const void *udata, size_t udata_
if (udata_size > 0 && !udata)
TEST_ERROR;
- if (HDstrcmp(new_name, NEW_UD_CB_LINK_NAME) != 0)
+ if (strcmp(new_name, NEW_UD_CB_LINK_NAME) != 0)
TEST_ERROR;
- if (HDstrcmp((const char *)udata, UD_CB_TARGET) != 0)
+ if (strcmp((const char *)udata, UD_CB_TARGET) != 0)
TEST_ERROR;
if (udata_size != UD_CB_TARGET_LEN)
TEST_ERROR;
@@ -14459,9 +14467,9 @@ UD_cb_delete(const char *link_name, hid_t file, const void *udata, size_t udata_
if (udata_size > 0 && !udata)
TEST_ERROR;
- if (HDstrcmp(link_name, UD_CB_LINK_NAME) != 0 && HDstrcmp(link_name, NEW_UD_CB_LINK_NAME) != 0)
+ if (strcmp(link_name, UD_CB_LINK_NAME) != 0 && strcmp(link_name, NEW_UD_CB_LINK_NAME) != 0)
TEST_ERROR;
- if (HDstrcmp((const char *)udata, UD_CB_TARGET) != 0)
+ if (strcmp((const char *)udata, UD_CB_TARGET) != 0)
TEST_ERROR;
if (udata_size != UD_CB_TARGET_LEN)
TEST_ERROR;
@@ -14481,9 +14489,9 @@ UD_cb_query(const char *link_name, const void *udata, size_t udata_size, void *b
if (udata_size > 0 && !udata)
TEST_ERROR;
- if (HDstrcmp(link_name, UD_CB_LINK_NAME) != 0)
+ if (strcmp(link_name, UD_CB_LINK_NAME) != 0)
TEST_ERROR;
- if (HDstrcmp((const char *)udata, UD_CB_TARGET) != 0)
+ if (strcmp((const char *)udata, UD_CB_TARGET) != 0)
TEST_ERROR;
if (udata_size != UD_CB_TARGET_LEN)
TEST_ERROR;
@@ -14491,7 +14499,7 @@ UD_cb_query(const char *link_name, const void *udata, size_t udata_size, void *b
if (buf) {
if (buf_size < 16)
TEST_ERROR;
- HDstrcpy((char *)buf, "query succeeded");
+ strcpy((char *)buf, "query succeeded");
} /* end if */
/* There are 15 characters and a NULL in "query succeeded" */
@@ -14502,11 +14510,11 @@ UD_cb_query(const char *link_name, const void *udata, size_t udata_size, void *b
} /* end UD_cb_query() */
static int
-ud_callbacks(hid_t fapl, hbool_t new_format)
+ud_callbacks(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group ID */
- hid_t lcpl = -1; /* Link Creation PL */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t lcpl = H5I_INVALID_HID; /* Link Creation PL */
H5L_info2_t li; /* Link information */
char ud_target_name[] = UD_CB_TARGET; /* Link target name */
char filename[NAME_BUF_SIZE];
@@ -14524,11 +14532,11 @@ ud_callbacks(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* Check that registered link classes are, and unregistered ones aren't */
- if (H5Lis_registered(H5L_TYPE_EXTERNAL) != TRUE)
+ if (H5Lis_registered(H5L_TYPE_EXTERNAL) != true)
TEST_ERROR;
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != FALSE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != false)
TEST_ERROR;
- if (H5Lis_registered((H5L_type_t)UD_CB_TYPE) != FALSE)
+ if (H5Lis_registered((H5L_type_t)UD_CB_TYPE) != false)
TEST_ERROR;
/* Hit two birds with one stone: register UD hard links from previous
@@ -14542,11 +14550,11 @@ ud_callbacks(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* Check that registered link classes are, and unregistered ones aren't */
- if (H5Lis_registered(H5L_TYPE_EXTERNAL) != TRUE)
+ if (H5Lis_registered(H5L_TYPE_EXTERNAL) != true)
TEST_ERROR;
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != TRUE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != true)
TEST_ERROR;
- if (H5Lis_registered((H5L_type_t)UD_CB_TYPE) != TRUE)
+ if (H5Lis_registered((H5L_type_t)UD_CB_TYPE) != true)
TEST_ERROR;
/* Create a group for the UD link to point to */
@@ -14573,14 +14581,14 @@ ud_callbacks(hid_t fapl, hbool_t new_format)
TEST_ERROR;
if (UD_CB_TYPE != li.type) {
H5_FAILED();
- HDputs(" Unexpected link class - should have been a UD hard link");
+ puts(" Unexpected link class - should have been a UD hard link");
goto error;
}
/* Fill the query buffer */
if (H5Lget_val(fid, UD_CB_LINK_NAME, query_buf, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(query_buf, "query succeeded") != 0)
+ if (strcmp(query_buf, "query succeeded") != 0)
TEST_ERROR;
/* Move the link */
@@ -14702,11 +14710,11 @@ UD_plist_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group, const v
} /* end UD_plist_traverse() */
static int
-lapl_udata(hid_t fapl, hbool_t new_format)
+lapl_udata(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t plist_id = -1; /* Property List ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t plist_id = H5I_INVALID_HID; /* Property List ID */
char group_a_name[NAME_BUF_SIZE];
char group_b_name[NAME_BUF_SIZE];
char filename[NAME_BUF_SIZE];
@@ -14758,7 +14766,7 @@ lapl_udata(hid_t fapl, hbool_t new_format)
/* Create a non-default lapl with a new property pointing to group a*/
if ((plist_id = H5Pcreate(H5P_LINK_ACCESS)) < 0)
TEST_ERROR;
- HDstrcpy(group_a_name, "group_a");
+ strcpy(group_a_name, "group_a");
if (H5Pinsert2(plist_id, DEST_PROP_NAME, (size_t)NAME_BUF_SIZE, group_a_name, NULL, NULL, NULL, NULL,
NULL, NULL) < 0)
TEST_ERROR;
@@ -14780,7 +14788,7 @@ lapl_udata(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* Now use the same ud link to access group_b */
- HDstrcpy(group_b_name, "group_b");
+ strcpy(group_b_name, "group_b");
if (H5Pset(plist_id, DEST_PROP_NAME, group_b_name) < 0)
TEST_ERROR;
@@ -14936,7 +14944,7 @@ UD_cbsucc_query(const char H5_ATTR_UNUSED *link_name, const void H5_ATTR_UNUSED
*/
if (buf != NULL && buf_size >= 8)
- HDstrcpy((char *)buf, "succeed");
+ strcpy((char *)buf, "succeed");
return 8;
} /* end UD_cbsucc_query() */
@@ -15027,10 +15035,10 @@ const H5L_class_t UD_error4_class[1] = {{
}};
static int
-ud_link_errors(hid_t fapl, hbool_t new_format)
+ud_link_errors(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
char group_name[NAME_BUF_SIZE];
char filename[NAME_BUF_SIZE];
char query_buf[NAME_BUF_SIZE];
@@ -15094,8 +15102,8 @@ ud_link_errors(hid_t fapl, hbool_t new_format)
H5E_END_TRY
/* Create a user-defined link to the group. */
- HDstrcpy(group_name, "/group");
- if (H5Lcreate_ud(fid, "/ud_link", (H5L_type_t)UD_CBFAIL_TYPE, &group_name, HDstrlen(group_name) + 1,
+ strcpy(group_name, "/group");
+ if (H5Lcreate_ud(fid, "/ud_link", (H5L_type_t)UD_CBFAIL_TYPE, &group_name, strlen(group_name) + 1,
H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
@@ -15173,7 +15181,7 @@ ud_link_errors(hid_t fapl, hbool_t new_format)
TEST_ERROR;
if (H5Lget_val(fid, "ud_link", query_buf, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(query_buf, "succeed") != 0)
+ if (strcmp(query_buf, "succeed") != 0)
TEST_ERROR;
/* Moving and copying should both succeed */
@@ -15214,14 +15222,14 @@ ud_link_errors(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-lapl_nlinks(hid_t fapl, hbool_t new_format)
+lapl_nlinks(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t plist = -1; /* lapl ID */
- hid_t tid = -1, sid = -1, did = -1; /* Other IDs */
- hid_t gapl = -1, dapl = -1, tapl = -1; /* Other property lists */
- char objname[NAME_BUF_SIZE]; /* Object name */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t plist = H5I_INVALID_HID; /* lapl ID */
+ hid_t tid = H5I_INVALID_HID, sid = H5I_INVALID_HID, did = H5I_INVALID_HID; /* Other IDs */
+ hid_t gapl = H5I_INVALID_HID, dapl = H5I_INVALID_HID, tapl = H5I_INVALID_HID; /* Other property lists */
+ char objname[NAME_BUF_SIZE]; /* Object name */
char filename[NAME_BUF_SIZE];
size_t nlinks; /* nlinks for H5Pset_nlinks */
hsize_t dims[2];
@@ -15315,7 +15323,7 @@ lapl_nlinks(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/soft17") != 0)
+ if (strcmp(objname, "/soft17") != 0)
TEST_ERROR;
/* Create group using soft link */
@@ -15348,7 +15356,7 @@ lapl_nlinks(hid_t fapl, hbool_t new_format)
H5E_END_TRY
if (gid >= 0) {
H5_FAILED();
- HDputs(" Should have failed for sequence of too many nested links.");
+ puts(" Should have failed for sequence of too many nested links.");
goto error;
}
@@ -15359,7 +15367,7 @@ lapl_nlinks(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/soft4") != 0)
+ if (strcmp(objname, "/soft4") != 0)
TEST_ERROR;
/* Test other functions that should use a LAPL */
@@ -15521,13 +15529,13 @@ lapl_nlinks(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-linkinfo(hid_t fapl, hbool_t new_format)
+linkinfo(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group ID */
- hid_t tid = -1; /* Type ID */
- hid_t sid = -1, did = -1; /* Dataspace and dataset IDs */
- H5L_info2_t li; /* Link information */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t tid = H5I_INVALID_HID; /* Type ID */
+ hid_t sid = H5I_INVALID_HID, did = H5I_INVALID_HID; /* Dataspace and dataset IDs */
+ H5L_info2_t li; /* Link information */
char filename[NAME_BUF_SIZE];
if (new_format)
@@ -15638,9 +15646,9 @@ linkinfo(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-check_all_closed(hid_t fapl, hbool_t new_format, int stopat)
+check_all_closed(hid_t fapl, bool new_format, int stopat)
{
- hid_t fid = -1;
+ hid_t fid = H5I_INVALID_HID;
char filename[NAME_BUF_SIZE];
int x;
@@ -15687,11 +15695,11 @@ check_all_closed(hid_t fapl, hbool_t new_format, int stopat)
static hid_t
build_visit_file(hid_t fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t tid = -1; /* Datatype ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
char filename[NAME_BUF_SIZE];
const char *pathname = H5_get_srcdir_filename(LINKED_FILE); /* Corrected test file name */
@@ -15819,7 +15827,7 @@ visit_link_cb(hid_t H5_ATTR_UNUSED group_id, const char *name, const H5L_info2_t
lvisit_ud_t *op_data = (lvisit_ud_t *)_op_data;
/* Check for correct link information */
- if (HDstrcmp(op_data->info[op_data->idx].path, name) != 0)
+ if (strcmp(op_data->info[op_data->idx].path, name) != 0)
return (H5_ITER_ERROR);
if (op_data->info[op_data->idx].type != linfo->type)
return (H5_ITER_ERROR);
@@ -15840,11 +15848,11 @@ visit_link_cb(hid_t H5_ATTR_UNUSED group_id, const char *name, const H5L_info2_t
*-------------------------------------------------------------------------
*/
static int
-link_visit(hid_t fapl, hbool_t new_format)
+link_visit(hid_t fapl, bool new_format)
{
lvisit_ud_t udata; /* User-data for visiting */
- hid_t fid = -1;
- hid_t gid = -1; /* Group ID */
+ hid_t fid = H5I_INVALID_HID;
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
if (new_format)
TESTING("link visiting (w/new group format)");
@@ -15917,11 +15925,11 @@ link_visit(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-link_visit_by_name(hid_t fapl, hbool_t new_format)
+link_visit_by_name(hid_t fapl, bool new_format)
{
lvisit_ud_t udata; /* User-data for visiting */
- hid_t fid = -1;
- hid_t gid = -1; /* Group ID */
+ hid_t fid = H5I_INVALID_HID;
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
if (new_format)
TESTING("link visiting by name (w/new group format)");
@@ -16010,7 +16018,7 @@ visit_obj_cb(hid_t H5_ATTR_UNUSED group_id, const char *name, const H5O_info2_t
ovisit_ud_t *op_data = (ovisit_ud_t *)_op_data;
/* Check for correct object information */
- if (HDstrcmp(op_data->info[op_data->idx].path, name) != 0)
+ if (strcmp(op_data->info[op_data->idx].path, name) != 0)
return (H5_ITER_ERROR);
if (op_data->info[op_data->idx].type != oinfo->type)
return (H5_ITER_ERROR);
@@ -16031,11 +16039,11 @@ visit_obj_cb(hid_t H5_ATTR_UNUSED group_id, const char *name, const H5O_info2_t
*-------------------------------------------------------------------------
*/
static int
-obj_visit(hid_t fapl, hbool_t new_format)
+obj_visit(hid_t fapl, bool new_format)
{
ovisit_ud_t udata; /* User-data for visiting */
- hid_t fid = -1;
- hid_t gid = -1; /* Group ID */
+ hid_t fid = H5I_INVALID_HID;
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
if (new_format)
TESTING("object visiting (w/new group format)");
@@ -16112,11 +16120,11 @@ obj_visit(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-obj_visit_by_name(hid_t fapl, hbool_t new_format)
+obj_visit_by_name(hid_t fapl, bool new_format)
{
ovisit_ud_t udata; /* User-data for visiting */
- hid_t fid = -1;
- hid_t gid = -1; /* Group ID */
+ hid_t fid = H5I_INVALID_HID;
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
if (new_format)
TESTING("object visiting by name (w/new group format)");
@@ -16230,10 +16238,10 @@ visit_obj_stop_cb(hid_t H5_ATTR_UNUSED group_id, const char H5_ATTR_UNUSED *name
*-------------------------------------------------------------------------
*/
static int
-obj_visit_stop(hid_t fapl, hbool_t new_format)
+obj_visit_stop(hid_t fapl, bool new_format)
{
unsigned nvisited; /* User-data for visiting */
- hid_t fid = -1;
+ hid_t fid = H5I_INVALID_HID;
herr_t ret; /* Return value */
if (new_format)
@@ -16359,17 +16367,17 @@ link_filter_filter(unsigned int flags, size_t cd_nelmts, const unsigned int cd_v
} /* end link_filter_filter */
static int
-link_filters(hid_t fapl, hbool_t new_format)
+link_filters(hid_t fapl, bool new_format)
{
- hid_t fid = -1, fcpl = -1;
- hid_t gid1 = -1, gid2 = -1, gcpl1 = -1, gcpl2 = -1;
- hid_t lcpl = -1;
- size_t cd_nelmts = 1;
- unsigned cd_value = 2112;
- unsigned cd_value_out;
- unsigned flags_out;
- unsigned filter_config_out;
- int nfilters = 0;
+ hid_t fid = H5I_INVALID_HID, fcpl = H5I_INVALID_HID;
+ hid_t gid1 = H5I_INVALID_HID, gid2 = H5I_INVALID_HID, gcpl1 = H5I_INVALID_HID, gcpl2 = H5I_INVALID_HID;
+ hid_t lcpl = H5I_INVALID_HID;
+ size_t cd_nelmts = 1;
+ unsigned cd_value = 2112;
+ unsigned cd_value_out;
+ unsigned flags_out;
+ unsigned filter_config_out;
+ int nfilters = 0;
H5Z_class2_t filter_class;
char name_out[24];
char filename[NAME_BUF_SIZE];
@@ -16418,8 +16426,8 @@ link_filters(hid_t fapl, hbool_t new_format)
/* Register and add custom filter */
filter_class.version = H5Z_CLASS_T_VERS;
filter_class.id = H5Z_FILTER_RESERVED + 42;
- filter_class.encoder_present = TRUE;
- filter_class.decoder_present = TRUE;
+ filter_class.encoder_present = true;
+ filter_class.decoder_present = true;
filter_class.name = "custom_link_filter";
filter_class.can_apply = link_filter_can_apply;
filter_class.set_local = link_filter_set_local;
@@ -16433,7 +16441,7 @@ link_filters(hid_t fapl, hbool_t new_format)
/* Test various other filter functions for use on gcpl's */
if (H5Pget_nfilters(gcpl1) != nfilters)
TEST_ERROR;
- if (H5Pall_filters_avail(gcpl1) != TRUE)
+ if (H5Pall_filters_avail(gcpl1) != true)
TEST_ERROR;
/* Create a group using this filter, add some soft links to it */
@@ -16489,13 +16497,13 @@ link_filters(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* Verify that all links have been copied */
- if (H5Lexists(gid2, "link1", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(gid2, "link1", H5P_DEFAULT) != true)
TEST_ERROR;
- if (H5Lexists(gid2, "link2", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(gid2, "link2", H5P_DEFAULT) != true)
TEST_ERROR;
- if (H5Lexists(gid2, "link3", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(gid2, "link3", H5P_DEFAULT) != true)
TEST_ERROR;
- if (H5Lexists(gid2, "link4", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(gid2, "link4", H5P_DEFAULT) != true)
TEST_ERROR;
/* Retrieve gcpl, verify number of filters */
@@ -16547,13 +16555,13 @@ link_filters(hid_t fapl, hbool_t new_format)
if (H5Pget_filter_by_id2(gcpl2, H5Z_FILTER_RESERVED + 42, &flags_out, &cd_nelmts, &cd_value_out,
(size_t)24, name_out, &filter_config_out) < 0)
TEST_ERROR;
- if (flags_out != 0 || cd_value_out != cd_value || HDstrcmp(filter_class.name, name_out) != 0 ||
+ if (flags_out != 0 || cd_value_out != cd_value || strcmp(filter_class.name, name_out) != 0 ||
filter_config_out != (H5Z_FILTER_CONFIG_ENCODE_ENABLED | H5Z_FILTER_CONFIG_DECODE_ENABLED))
TEST_ERROR;
if (H5Pget_filter2(gcpl2, (unsigned)(nfilters - 1), &flags_out, &cd_nelmts, &cd_value_out, (size_t)24,
name_out, &filter_config_out) < 0)
TEST_ERROR;
- if (flags_out != 0 || cd_value_out != cd_value || HDstrcmp(filter_class.name, name_out) != 0 ||
+ if (flags_out != 0 || cd_value_out != cd_value || strcmp(filter_class.name, name_out) != 0 ||
filter_config_out != (H5Z_FILTER_CONFIG_ENCODE_ENABLED | H5Z_FILTER_CONFIG_DECODE_ENABLED))
TEST_ERROR;
@@ -16564,7 +16572,7 @@ link_filters(hid_t fapl, hbool_t new_format)
if (H5Pget_filter_by_id2(gcpl2, H5Z_FILTER_RESERVED + 42, &flags_out, &cd_nelmts, &cd_value_out,
(size_t)24, name_out, &filter_config_out) < 0)
TEST_ERROR;
- if (flags_out != 0 || cd_value_out != cd_value || HDstrcmp(filter_class.name, name_out) != 0 ||
+ if (flags_out != 0 || cd_value_out != cd_value || strcmp(filter_class.name, name_out) != 0 ||
filter_config_out != (H5Z_FILTER_CONFIG_ENCODE_ENABLED | H5Z_FILTER_CONFIG_DECODE_ENABLED))
TEST_ERROR;
@@ -16596,7 +16604,7 @@ link_filters(hid_t fapl, hbool_t new_format)
/* Create lcpl, setting the "create intermediate groups" flag */
if ((lcpl = H5Pcreate(H5P_LINK_CREATE)) < 0)
TEST_ERROR;
- if (H5Pset_create_intermediate_group(lcpl, (unsigned)TRUE) < 0)
+ if (H5Pset_create_intermediate_group(lcpl, (unsigned)true) < 0)
TEST_ERROR;
/* Create new group, with missing intermediate groups, in compressed group */
@@ -16770,11 +16778,11 @@ link_filters(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-obj_exists(hid_t fapl, hbool_t new_format)
+obj_exists(hid_t fapl, bool new_format)
{
char filename[NAME_BUF_SIZE]; /* Buffer for file name */
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
herr_t status; /* Generic return value */
if (new_format)
@@ -16805,7 +16813,7 @@ obj_exists(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
/* Verify that H5Oexists_by_name() succeeds for hard linked object */
- if (TRUE != H5Oexists_by_name(fid, "group", H5P_DEFAULT))
+ if (true != H5Oexists_by_name(fid, "group", H5P_DEFAULT))
TEST_ERROR;
/* Verify that H5Oexists_by_name() returns false for non-existent object in non-root group */
@@ -16822,32 +16830,32 @@ obj_exists(hid_t fapl, hbool_t new_format)
if (H5Lcreate_soft("dangle", fid, "soft1", H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- /* Verify that H5Oexists_by_name() returns FALSE for dangling soft-link in root group */
- if (FALSE != H5Oexists_by_name(fid, "soft1", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns false for dangling soft-link in root group */
+ if (false != H5Oexists_by_name(fid, "soft1", H5P_DEFAULT))
TEST_ERROR;
/* Create soft-link in root group that points to object */
if (H5Lcreate_soft("/group", fid, "soft2", H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- /* Verify that H5Oexists_by_name() returns TRUE for soft-link in root group that points to object */
- if (TRUE != H5Oexists_by_name(fid, "soft2", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns true for soft-link in root group that points to object */
+ if (true != H5Oexists_by_name(fid, "soft2", H5P_DEFAULT))
TEST_ERROR;
/* Create dangling soft-link in non-root group */
if (H5Lcreate_soft("dangle", fid, "group/soft1", H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- /* Verify that H5Oexists_by_name() returns FALSE for dangling soft-link in non-root group */
- if (FALSE != H5Oexists_by_name(fid, "group/soft1", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns false for dangling soft-link in non-root group */
+ if (false != H5Oexists_by_name(fid, "group/soft1", H5P_DEFAULT))
TEST_ERROR;
/* Create soft-link in non-root group that points to object */
if (H5Lcreate_soft("/group", fid, "group/soft2", H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- /* Verify that H5Oexists_by_name() returns TRUE for soft-link in non-root group that points to object */
- if (TRUE != H5Oexists_by_name(fid, "group/soft2", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns true for soft-link in non-root group that points to object */
+ if (true != H5Oexists_by_name(fid, "group/soft2", H5P_DEFAULT))
TEST_ERROR;
/* External links */
@@ -16855,53 +16863,53 @@ obj_exists(hid_t fapl, hbool_t new_format)
if (H5Lcreate_external("nofile", "dangle", fid, "external1", H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
- /* Verify that H5Oexists_by_name() returns FALSE for dangling (file doesn't exist) external link in root
+ /* Verify that H5Oexists_by_name() returns false for dangling (file doesn't exist) external link in root
* group */
- if (FALSE != H5Oexists_by_name(fid, "external1", H5P_DEFAULT))
+ if (false != H5Oexists_by_name(fid, "external1", H5P_DEFAULT))
TEST_ERROR;
/* Create dangling (object doesn't exist) external link in root group */
if (H5Lcreate_external(filename, "dangle", fid, "external2", H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
- /* Verify that H5Oexists_by_name() returns FALSE for dangling (object doesn't exist) external link in root
+ /* Verify that H5Oexists_by_name() returns false for dangling (object doesn't exist) external link in root
* group */
- if (FALSE != H5Oexists_by_name(fid, "external2", H5P_DEFAULT))
+ if (false != H5Oexists_by_name(fid, "external2", H5P_DEFAULT))
TEST_ERROR;
/* Create external link in root group that points to object */
if (H5Lcreate_external(filename, "group", fid, "external3", H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
- /* Verify that H5Oexists_by_name() returns TRUE for external link in root group that points to object */
- if (TRUE != H5Oexists_by_name(fid, "external3", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns true for external link in root group that points to object */
+ if (true != H5Oexists_by_name(fid, "external3", H5P_DEFAULT))
TEST_ERROR;
/* Create dangling (file doesn't exist) external link in non-root group */
if (H5Lcreate_external("nofile", "dangle", fid, "group/external1", H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
- /* Verify that H5Oexists_by_name() returns FALSE for dangling (file doesn't exist) external link in
+ /* Verify that H5Oexists_by_name() returns false for dangling (file doesn't exist) external link in
* non-root group */
- if (FALSE != H5Oexists_by_name(fid, "group/external1", H5P_DEFAULT))
+ if (false != H5Oexists_by_name(fid, "group/external1", H5P_DEFAULT))
TEST_ERROR;
/* Create dangling (object doesn't exist) external link in non-root group */
if (H5Lcreate_external(filename, "dangle", fid, "group/external2", H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
- /* Verify that H5Oexists_by_name() returns FALSE for dangling (object doesn't exist) external link in
+ /* Verify that H5Oexists_by_name() returns false for dangling (object doesn't exist) external link in
* non-root group */
- if (FALSE != H5Oexists_by_name(fid, "group/external2", H5P_DEFAULT))
+ if (false != H5Oexists_by_name(fid, "group/external2", H5P_DEFAULT))
TEST_ERROR;
/* Create external link in non-root group that points to object */
if (H5Lcreate_external(filename, "group", fid, "group/external3", H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
- /* Verify that H5Oexists_by_name() returns TRUE for external link in non-root group that points to object
+ /* Verify that H5Oexists_by_name() returns true for external link in non-root group that points to object
*/
- if (TRUE != H5Oexists_by_name(fid, "group/external3", H5P_DEFAULT))
+ if (true != H5Oexists_by_name(fid, "group/external3", H5P_DEFAULT))
TEST_ERROR;
/* Soft->External links */
@@ -16909,24 +16917,24 @@ obj_exists(hid_t fapl, hbool_t new_format)
if (H5Lcreate_soft("external1", fid, "soft-elink1", H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- /* Verify that H5Oexists_by_name() returns FALSE */
- if (FALSE != H5Oexists_by_name(fid, "soft-elink1", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns false */
+ if (false != H5Oexists_by_name(fid, "soft-elink1", H5P_DEFAULT))
TEST_ERROR;
/* Create soft-link in root group that points to dangling (object doesn't exist) external link */
if (H5Lcreate_soft("external2", fid, "soft-elink2", H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- /* Verify that H5Oexists_by_name() returns FALSE */
- if (FALSE != H5Oexists_by_name(fid, "soft-elink2", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns false */
+ if (false != H5Oexists_by_name(fid, "soft-elink2", H5P_DEFAULT))
TEST_ERROR;
/* Create soft-link in root group that points to external link that points to object */
if (H5Lcreate_soft("external3", fid, "soft-elink3", H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- /* Verify that H5Oexists_by_name() returns TRUE */
- if (TRUE != H5Oexists_by_name(fid, "soft-elink3", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns true */
+ if (true != H5Oexists_by_name(fid, "soft-elink3", H5P_DEFAULT))
TEST_ERROR;
/* Create soft-link in root group that points to dangling (file doesn't exist) external link in non-root
@@ -16934,8 +16942,8 @@ obj_exists(hid_t fapl, hbool_t new_format)
if (H5Lcreate_soft("group/external1", fid, "soft-elink4", H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- /* Verify that H5Oexists_by_name() returns FALSE */
- if (FALSE != H5Oexists_by_name(fid, "soft-elink4", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns false */
+ if (false != H5Oexists_by_name(fid, "soft-elink4", H5P_DEFAULT))
TEST_ERROR;
/* Create soft-link in root group that points to dangling (object doesn't exist) external link in non-root
@@ -16943,40 +16951,40 @@ obj_exists(hid_t fapl, hbool_t new_format)
if (H5Lcreate_soft("group/external2", fid, "soft-elink5", H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- /* Verify that H5Oexists_by_name() returns FALSE */
- if (FALSE != H5Oexists_by_name(fid, "soft-elink5", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns false */
+ if (false != H5Oexists_by_name(fid, "soft-elink5", H5P_DEFAULT))
TEST_ERROR;
/* Create soft-link in root group that points to external link in non-root group that points to object */
if (H5Lcreate_soft("group/external3", fid, "soft-elink6", H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- /* Verify that H5Oexists_by_name() returns TRUE */
- if (TRUE != H5Oexists_by_name(fid, "soft-elink6", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns true */
+ if (true != H5Oexists_by_name(fid, "soft-elink6", H5P_DEFAULT))
TEST_ERROR;
/* Create soft-link in non-root group that points to dangling (file doesn't exist) external link */
if (H5Lcreate_soft("/external1", fid, "group/soft-elink1", H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- /* Verify that H5Oexists_by_name() returns FALSE */
- if (FALSE != H5Oexists_by_name(fid, "group/soft-elink1", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns false */
+ if (false != H5Oexists_by_name(fid, "group/soft-elink1", H5P_DEFAULT))
TEST_ERROR;
/* Create soft-link in non-root group that points to dangling (object doesn't exist) external link */
if (H5Lcreate_soft("/external2", fid, "group/soft-elink2", H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- /* Verify that H5Oexists_by_name() returns FALSE */
- if (FALSE != H5Oexists_by_name(fid, "group/soft-elink2", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns false */
+ if (false != H5Oexists_by_name(fid, "group/soft-elink2", H5P_DEFAULT))
TEST_ERROR;
/* Create soft-link in non-root group that points to external link that points to object */
if (H5Lcreate_soft("/external3", fid, "group/soft-elink3", H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- /* Verify that H5Oexists_by_name() returns TRUE */
- if (TRUE != H5Oexists_by_name(fid, "group/soft-elink3", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns true */
+ if (true != H5Oexists_by_name(fid, "group/soft-elink3", H5P_DEFAULT))
TEST_ERROR;
/* Create soft-link in non-root group that points to dangling (file doesn't exist) external link in
@@ -16984,8 +16992,8 @@ obj_exists(hid_t fapl, hbool_t new_format)
if (H5Lcreate_soft("/group/external1", fid, "group/soft-elink4", H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- /* Verify that H5Oexists_by_name() returns FALSE */
- if (FALSE != H5Oexists_by_name(fid, "group/soft-elink4", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns false */
+ if (false != H5Oexists_by_name(fid, "group/soft-elink4", H5P_DEFAULT))
TEST_ERROR;
/* Create soft-link in non-root group that points to dangling (object doesn't exist) external link in
@@ -16993,8 +17001,8 @@ obj_exists(hid_t fapl, hbool_t new_format)
if (H5Lcreate_soft("/group/external2", fid, "group/soft-elink5", H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- /* Verify that H5Oexists_by_name() returns FALSE */
- if (FALSE != H5Oexists_by_name(fid, "group/soft-elink5", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns false */
+ if (false != H5Oexists_by_name(fid, "group/soft-elink5", H5P_DEFAULT))
TEST_ERROR;
/* Create soft-link in non-root group that points to external link in non-root group that points to object
@@ -17002,8 +17010,8 @@ obj_exists(hid_t fapl, hbool_t new_format)
if (H5Lcreate_soft("/group/external3", fid, "group/soft-elink6", H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- /* Verify that H5Oexists_by_name() returns TRUE */
- if (TRUE != H5Oexists_by_name(fid, "group/soft-elink6", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns true */
+ if (true != H5Oexists_by_name(fid, "group/soft-elink6", H5P_DEFAULT))
TEST_ERROR;
/* External->Soft links */
@@ -17011,56 +17019,56 @@ obj_exists(hid_t fapl, hbool_t new_format)
if (H5Lcreate_external(filename, "soft1", fid, "elink-soft1", H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
- /* Verify that H5Oexists_by_name() returns FALSE */
- if (FALSE != H5Oexists_by_name(fid, "elink-soft1", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns false */
+ if (false != H5Oexists_by_name(fid, "elink-soft1", H5P_DEFAULT))
TEST_ERROR;
/* Create external link in root group that points to soft link in root group that points to object */
if (H5Lcreate_external(filename, "soft2", fid, "elink-soft2", H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
- /* Verify that H5Oexists_by_name() returns TRUE */
- if (TRUE != H5Oexists_by_name(fid, "elink-soft2", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns true */
+ if (true != H5Oexists_by_name(fid, "elink-soft2", H5P_DEFAULT))
TEST_ERROR;
/* Create external link in root group that points to dangling soft link in non-root group */
if (H5Lcreate_external(filename, "group/soft1", fid, "elink-soft3", H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
- /* Verify that H5Oexists_by_name() returns FALSE */
- if (FALSE != H5Oexists_by_name(fid, "elink-soft3", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns false */
+ if (false != H5Oexists_by_name(fid, "elink-soft3", H5P_DEFAULT))
TEST_ERROR;
/* Create external link in root group that points to soft link in root group that points to object */
if (H5Lcreate_external(filename, "group/soft2", fid, "elink-soft4", H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
- /* Verify that H5Oexists_by_name() returns TRUE */
- if (TRUE != H5Oexists_by_name(fid, "elink-soft4", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns true */
+ if (true != H5Oexists_by_name(fid, "elink-soft4", H5P_DEFAULT))
TEST_ERROR;
/* Create external link in non-root group that points to dangling soft link in root group */
if (H5Lcreate_external(filename, "soft1", fid, "group/elink-soft1", H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
- /* Verify that H5Oexists_by_name() returns FALSE */
- if (FALSE != H5Oexists_by_name(fid, "group/elink-soft1", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns false */
+ if (false != H5Oexists_by_name(fid, "group/elink-soft1", H5P_DEFAULT))
TEST_ERROR;
/* Create external link in non-root group that points to soft link in root group that points to object */
if (H5Lcreate_external(filename, "soft2", fid, "group/elink-soft2", H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
- /* Verify that H5Oexists_by_name() returns TRUE */
- if (TRUE != H5Oexists_by_name(fid, "group/elink-soft2", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns true */
+ if (true != H5Oexists_by_name(fid, "group/elink-soft2", H5P_DEFAULT))
TEST_ERROR;
/* Create external link in non-root group that points to dangling soft link in non-root group */
if (H5Lcreate_external(filename, "group/soft1", fid, "group/elink-soft3", H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
- /* Verify that H5Oexists_by_name() returns FALSE */
- if (FALSE != H5Oexists_by_name(fid, "group/elink-soft3", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns false */
+ if (false != H5Oexists_by_name(fid, "group/elink-soft3", H5P_DEFAULT))
TEST_ERROR;
/* Create external link in non-root group that points to soft link in non-root group that points to object
@@ -17068,8 +17076,8 @@ obj_exists(hid_t fapl, hbool_t new_format)
if (H5Lcreate_external(filename, "group/soft2", fid, "group/elink-soft4", H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
- /* Verify that H5Oexists_by_name() returns TRUE */
- if (TRUE != H5Oexists_by_name(fid, "group/elink-soft4", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns true */
+ if (true != H5Oexists_by_name(fid, "group/elink-soft4", H5P_DEFAULT))
TEST_ERROR;
/* Close file created */
@@ -17101,12 +17109,12 @@ obj_exists(hid_t fapl, hbool_t new_format)
static int
corder_create_empty(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1; /* Group ID */
- hid_t gcpl_id = -1; /* Group creation property list ID */
- unsigned crt_order_flags; /* Status of creation order info for GCPL */
- herr_t ret; /* Generic return value */
- char filename[NAME_BUF_SIZE]; /* File name */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID; /* Group ID */
+ hid_t gcpl_id = H5I_INVALID_HID; /* Group creation property list ID */
+ unsigned crt_order_flags; /* Status of creation order info for GCPL */
+ herr_t ret; /* Generic return value */
+ char filename[NAME_BUF_SIZE]; /* File name */
TESTING("creating empty group with creation order indexing");
@@ -17133,7 +17141,7 @@ corder_create_empty(hid_t fapl)
H5E_END_TRY
if (ret > 0) {
H5_FAILED();
- HDputs(
+ puts(
" H5Pset_link_create_order() should have failed for a creation order index with no tracking.");
TEST_ERROR;
} /* end if */
@@ -17155,7 +17163,7 @@ corder_create_empty(hid_t fapl)
TEST_ERROR;
/* Check on group's status */
- if (H5G__is_empty_test(group_id) != TRUE)
+ if (H5G__is_empty_test(group_id) != true)
TEST_ERROR;
/* Close the group */
@@ -17179,7 +17187,7 @@ corder_create_empty(hid_t fapl)
FAIL_STACK_ERROR;
/* Check on group's status */
- if (H5G__is_empty_test(group_id) != TRUE)
+ if (H5G__is_empty_test(group_id) != true)
TEST_ERROR;
/* Retrieve group creation property list for group */
@@ -17231,15 +17239,15 @@ corder_create_empty(hid_t fapl)
static int
corder_create_compact(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1, group_id2 = -1; /* Group IDs */
- hid_t gcpl_id = -1; /* Group creation property list ID */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- unsigned nlinks; /* Number of link messages in group's header */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char filename[NAME_BUF_SIZE]; /* File name */
- unsigned u; /* Local index variable */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID, group_id2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t gcpl_id = H5I_INVALID_HID; /* Group creation property list ID */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ unsigned nlinks; /* Number of link messages in group's header */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ unsigned u; /* Local index variable */
TESTING("creating compact group with creation order indexing");
@@ -17261,11 +17269,11 @@ corder_create_compact(hid_t fapl)
TEST_ERROR;
/* Check on group's initial status */
- if (H5G__is_empty_test(group_id) != TRUE)
+ if (H5G__is_empty_test(group_id) != true)
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) == TRUE)
+ if (H5G__is_new_dense_test(group_id) == true)
TEST_ERROR;
/* Query the group creation properties */
@@ -17274,20 +17282,20 @@ corder_create_compact(hid_t fapl)
/* Create several links, but keep group in compact form */
for (u = 0; u < max_compact; u++) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(group_id2) < 0)
TEST_ERROR;
/* Verify state of group */
- if (H5G__has_links_test(group_id, &nlinks) != TRUE)
+ if (H5G__has_links_test(group_id, &nlinks) != true)
TEST_ERROR;
if (nlinks != (u + 1))
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) == TRUE)
+ if (H5G__is_new_dense_test(group_id) == true)
TEST_ERROR;
} /* end for */
@@ -17312,13 +17320,13 @@ corder_create_compact(hid_t fapl)
FAIL_STACK_ERROR;
/* Verify state of group */
- if (H5G__has_links_test(group_id, &nlinks) != TRUE)
+ if (H5G__has_links_test(group_id, &nlinks) != true)
TEST_ERROR;
if (nlinks != max_compact)
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) == TRUE)
+ if (H5G__is_new_dense_test(group_id) == true)
TEST_ERROR;
/* Loop through links, checking their creation order values */
@@ -17327,12 +17335,12 @@ corder_create_compact(hid_t fapl)
H5L_info2_t linfo; /* Link information */
/* Retrieve information for link */
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if (H5Lget_info2(group_id, objname, &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
/* Verify creation order of link */
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
if (linfo.corder != u)
TEST_ERROR;
@@ -17373,17 +17381,17 @@ corder_create_compact(hid_t fapl)
static int
corder_create_dense(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1, group_id2 = -1; /* Group IDs */
- hid_t gcpl_id = -1; /* Group creation property list ID */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- unsigned nlinks; /* Number of link messages in group's header */
- hsize_t name_count; /* # of records in name index */
- hsize_t corder_count; /* # of records in creation order index */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char filename[NAME_BUF_SIZE]; /* File name */
- unsigned u; /* Local index variable */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID, group_id2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t gcpl_id = H5I_INVALID_HID; /* Group creation property list ID */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ unsigned nlinks; /* Number of link messages in group's header */
+ hsize_t name_count; /* # of records in name index */
+ hsize_t corder_count; /* # of records in creation order index */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ unsigned u; /* Local index variable */
TESTING("creating dense group with creation order indexing");
@@ -17405,11 +17413,11 @@ corder_create_dense(hid_t fapl)
TEST_ERROR;
/* Check on group's initial status */
- if (H5G__is_empty_test(group_id) != TRUE)
+ if (H5G__is_empty_test(group_id) != true)
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) == TRUE)
+ if (H5G__is_new_dense_test(group_id) == true)
TEST_ERROR;
/* Query the group creation properties */
@@ -17418,36 +17426,36 @@ corder_create_dense(hid_t fapl)
/* Create several links, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(group_id2) < 0)
TEST_ERROR;
/* Verify state of group */
- if (H5G__has_links_test(group_id, &nlinks) != TRUE)
+ if (H5G__has_links_test(group_id, &nlinks) != true)
TEST_ERROR;
if (nlinks != (u + 1))
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) == TRUE)
+ if (H5G__is_new_dense_test(group_id) == true)
TEST_ERROR;
} /* end for */
/* Create another link, to push group into dense form */
- HDsnprintf(objname, sizeof(objname), "filler %u", max_compact);
+ snprintf(objname, sizeof(objname), "filler %u", max_compact);
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(group_id2) < 0)
TEST_ERROR;
/* Verify state of group */
- if (H5G__has_links_test(group_id, NULL) == TRUE)
+ if (H5G__has_links_test(group_id, NULL) == true)
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Retrieve & verify # of records in the name & creation order indices */
@@ -17477,11 +17485,11 @@ corder_create_dense(hid_t fapl)
FAIL_STACK_ERROR;
/* Verify state of group */
- if (H5G__has_links_test(group_id, NULL) == TRUE)
+ if (H5G__has_links_test(group_id, NULL) == true)
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Loop through links, checking their creation order values */
@@ -17490,12 +17498,12 @@ corder_create_dense(hid_t fapl)
H5L_info2_t linfo; /* Link information */
/* Retrieve information for link */
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if (H5Lget_info2(group_id, objname, &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
/* Verify creation order of link */
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
if (linfo.corder != u)
TEST_ERROR;
@@ -17536,19 +17544,19 @@ corder_create_dense(hid_t fapl)
static int
corder_transition(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1, group_id2 = -1; /* Group IDs */
- hid_t gcpl_id = -1; /* Group creation property list ID */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- unsigned nlinks; /* Number of link messages in group's header */
- hsize_t name_count; /* # of records in name index */
- hsize_t corder_count; /* # of records in creation order index */
- h5_stat_size_t empty_size; /* Size of empty file */
- h5_stat_size_t file_size; /* Size of file after operating on it */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char filename[NAME_BUF_SIZE]; /* File name */
- unsigned u; /* Local index variable */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID, group_id2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t gcpl_id = H5I_INVALID_HID; /* Group creation property list ID */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ unsigned nlinks; /* Number of link messages in group's header */
+ hsize_t name_count; /* # of records in name index */
+ hsize_t corder_count; /* # of records in creation order index */
+ h5_stat_size_t empty_size; /* Size of empty file */
+ h5_stat_size_t file_size; /* Size of file after operating on it */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ unsigned u; /* Local index variable */
TESTING("transitioning group with creation order indexing between dense & compact forms");
@@ -17605,7 +17613,7 @@ corder_transition(hid_t fapl)
/* Create several links, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(group_id2) < 0)
@@ -17613,18 +17621,18 @@ corder_transition(hid_t fapl)
} /* end for */
/* Create another link, to push group into dense form */
- HDsnprintf(objname, sizeof(objname), "filler %u", max_compact);
+ snprintf(objname, sizeof(objname), "filler %u", max_compact);
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(group_id2) < 0)
TEST_ERROR;
/* Verify state of group */
- if (H5G__has_links_test(group_id, NULL) == TRUE)
+ if (H5G__has_links_test(group_id, NULL) == true)
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Retrieve & verify # of records in the name & creation order indices */
@@ -17635,16 +17643,16 @@ corder_transition(hid_t fapl)
/* Delete several links from group, until it resumes compact form */
for (u = max_compact; u >= min_dense; u--) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if (H5Ldelete(group_id, objname, H5P_DEFAULT) < 0)
TEST_ERROR;
/* Verify state of group */
- if (H5G__has_links_test(group_id, NULL) == TRUE)
+ if (H5G__has_links_test(group_id, NULL) == true)
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Retrieve & verify # of records in the name & creation order indices */
@@ -17655,23 +17663,23 @@ corder_transition(hid_t fapl)
} /* end for */
/* Delete another link, to push group into compact form */
- HDsnprintf(objname, sizeof(objname), "filler %u", (min_dense - 1));
+ snprintf(objname, sizeof(objname), "filler %u", (min_dense - 1));
if (H5Ldelete(group_id, objname, H5P_DEFAULT) < 0)
TEST_ERROR;
/* Verify state of group */
- if (H5G__has_links_test(group_id, &nlinks) != TRUE)
+ if (H5G__has_links_test(group_id, &nlinks) != true)
TEST_ERROR;
if (nlinks != (min_dense - 1))
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) == TRUE)
+ if (H5G__is_new_dense_test(group_id) == true)
TEST_ERROR;
/* Re-add links to get back into dense form */
for (u = (min_dense - 1); u < (max_compact + 1); u++) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(group_id2) < 0)
@@ -17679,11 +17687,11 @@ corder_transition(hid_t fapl)
} /* end for */
/* Verify state of group */
- if (H5G__has_links_test(group_id, NULL) == TRUE)
+ if (H5G__has_links_test(group_id, NULL) == true)
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Retrieve & verify # of records in the name & creation order indices */
@@ -17709,11 +17717,11 @@ corder_transition(hid_t fapl)
FAIL_STACK_ERROR;
/* Verify state of group */
- if (H5G__has_links_test(group_id, NULL) == TRUE)
+ if (H5G__has_links_test(group_id, NULL) == true)
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Retrieve & verify # of records in the name & creation order indices */
@@ -17724,16 +17732,16 @@ corder_transition(hid_t fapl)
/* Delete several links from group, until it resumes compact form */
for (u = max_compact; u >= min_dense; u--) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if (H5Ldelete(group_id, objname, H5P_DEFAULT) < 0)
TEST_ERROR;
/* Verify state of group */
- if (H5G__has_links_test(group_id, NULL) == TRUE)
+ if (H5G__has_links_test(group_id, NULL) == true)
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Retrieve & verify # of records in the name & creation order indices */
@@ -17744,23 +17752,23 @@ corder_transition(hid_t fapl)
} /* end for */
/* Delete another link, to push group into compact form */
- HDsnprintf(objname, sizeof(objname), "filler %u", (min_dense - 1));
+ snprintf(objname, sizeof(objname), "filler %u", (min_dense - 1));
if (H5Ldelete(group_id, objname, H5P_DEFAULT) < 0)
TEST_ERROR;
/* Verify state of group */
- if (H5G__has_links_test(group_id, &nlinks) != TRUE)
+ if (H5G__has_links_test(group_id, &nlinks) != true)
TEST_ERROR;
if (nlinks != (min_dense - 1))
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) == TRUE)
+ if (H5G__is_new_dense_test(group_id) == true)
TEST_ERROR;
/* Re-add links to get back into dense form */
for (u = (min_dense - 1); u < (max_compact + 1); u++) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(group_id2) < 0)
@@ -17768,11 +17776,11 @@ corder_transition(hid_t fapl)
} /* end for */
/* Verify state of group */
- if (H5G__has_links_test(group_id, NULL) == TRUE)
+ if (H5G__has_links_test(group_id, NULL) == true)
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Retrieve & verify # of records in the name & creation order indices */
@@ -17783,11 +17791,11 @@ corder_transition(hid_t fapl)
/* Delete all the links */
for (u = max_compact; u > 0; u--) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if (H5Ldelete(group_id, objname, H5P_DEFAULT) < 0)
TEST_ERROR;
} /* end for */
- HDsnprintf(objname, sizeof(objname), "filler %u", (unsigned)0);
+ snprintf(objname, sizeof(objname), "filler %u", (unsigned)0);
if (H5Ldelete(group_id, objname, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -17833,25 +17841,25 @@ corder_transition(hid_t fapl)
static int
corder_delete(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1, group_id2 = -1; /* Group IDs */
- hid_t gcpl_id = -1; /* Group creation property list ID */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- hsize_t name_count; /* # of records in name index */
- hsize_t corder_count; /* # of records in creation order index */
- unsigned reopen_file; /* Whether to re-open the file before deleting group */
- h5_stat_size_t empty_size; /* Size of empty file */
- h5_stat_size_t file_size; /* Size of file after operating on it */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char filename[NAME_BUF_SIZE]; /* File name */
- unsigned u; /* Local index variable */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID, group_id2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t gcpl_id = H5I_INVALID_HID; /* Group creation property list ID */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ hsize_t name_count; /* # of records in name index */
+ hsize_t corder_count; /* # of records in creation order index */
+ unsigned reopen_file; /* Whether to re-open the file before deleting group */
+ h5_stat_size_t empty_size; /* Size of empty file */
+ h5_stat_size_t file_size; /* Size of file after operating on it */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ unsigned u; /* Local index variable */
TESTING("deleting group with creation order indexing in dense form");
/* Loop to leave file open when deleting group, or to close & re-open file
* before deleting group */
- for (reopen_file = FALSE; reopen_file <= TRUE; reopen_file++) {
+ for (reopen_file = false; reopen_file <= true; reopen_file++) {
/* Create file */
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
@@ -17899,7 +17907,7 @@ corder_delete(hid_t fapl)
/* Create links until the group is in dense form */
for (u = 0; u < max_compact * 2; u++) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
if (H5Gclose(group_id2) < 0)
@@ -17907,11 +17915,11 @@ corder_delete(hid_t fapl)
} /* end for */
/* Verify state of group */
- if (H5G__has_links_test(group_id, NULL) == TRUE)
+ if (H5G__has_links_test(group_id, NULL) == true)
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Retrieve & verify # of records in the name & creation order indices */
@@ -17984,7 +17992,7 @@ corder_delete(hid_t fapl)
*-------------------------------------------------------------------------
*/
static int
-link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t hard_link, hbool_t use_index)
+link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, bool hard_link, bool use_index)
{
char tmpname[NAME_BUF_SIZE]; /* Temporary link name */
char valname[NAME_BUF_SIZE]; /* Link value name */
@@ -17992,7 +18000,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
H5L_info2_t linfo; /* Link info struct */
/* Make link value for increasing/native order queries */
- HDsnprintf(valname, sizeof(valname), "value %02u", (unsigned)n);
+ snprintf(valname, sizeof(valname), "value %02u", (unsigned)n);
/* Verify the link information for first link, in increasing creation order */
memset(&linfo, 0, sizeof(linfo));
@@ -18015,7 +18023,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end if */
@@ -18024,7 +18032,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpname, (size_t)NAME_BUF_SIZE,
H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(linkname, tmpname) != 0)
+ if (strcmp(linkname, tmpname) != 0)
TEST_ERROR;
/* Don't test "native" order if there is no creation order index, since
@@ -18054,7 +18062,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, n, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end if */
@@ -18063,7 +18071,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, n, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(linkname, tmpname) != 0)
+ if (strcmp(linkname, tmpname) != 0)
TEST_ERROR;
} /* end if */
@@ -18088,7 +18096,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end if */
@@ -18097,7 +18105,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(linkname, tmpname) != 0)
+ if (strcmp(linkname, tmpname) != 0)
TEST_ERROR;
/* Verify the link information for first link, in increasing link name order */
@@ -18120,7 +18128,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpval, (size_t)NAME_BUF_SIZE,
H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end if */
@@ -18129,7 +18137,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpname, (size_t)NAME_BUF_SIZE,
H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(linkname, tmpname) != 0)
+ if (strcmp(linkname, tmpname) != 0)
TEST_ERROR;
/* Don't test "native" order queries on link name order, since there's not
@@ -18156,7 +18164,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end if */
@@ -18165,7 +18173,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(linkname, tmpname) != 0)
+ if (strcmp(linkname, tmpname) != 0)
TEST_ERROR;
/* Success */
@@ -18189,26 +18197,26 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
static int
link_info_by_idx(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1; /* Group ID */
- hid_t gcpl_id = -1; /* Group creation property list ID */
- unsigned hard_link; /* Create hard or soft link? */
- unsigned use_index; /* Use index on creation order values */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- H5L_info2_t linfo; /* Link info struct */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char valname[NAME_BUF_SIZE]; /* Link value name */
- char filename[NAME_BUF_SIZE]; /* File name */
- char tmpname[NAME_BUF_SIZE]; /* Temporary link name */
- unsigned u; /* Local index variable */
- ssize_t name_len; /* Length of name */
- herr_t ret; /* Generic return value */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID; /* Group ID */
+ hid_t gcpl_id = H5I_INVALID_HID; /* Group creation property list ID */
+ unsigned hard_link; /* Create hard or soft link? */
+ unsigned use_index; /* Use index on creation order values */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ H5L_info2_t linfo; /* Link info struct */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char valname[NAME_BUF_SIZE]; /* Link value name */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ char tmpname[NAME_BUF_SIZE]; /* Temporary link name */
+ unsigned u; /* Local index variable */
+ ssize_t name_len; /* Length of name */
+ herr_t ret; /* Generic return value */
/* Loop over creating hard or soft links */
- for (hard_link = FALSE; hard_link <= TRUE; hard_link++) {
+ for (hard_link = false; hard_link <= true; hard_link++) {
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
if (hard_link) {
if (use_index)
TESTING("querying info by index w/creation order index, using hard links");
@@ -18265,7 +18273,7 @@ link_info_by_idx(hid_t fapl)
/* Create several links, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Check for creating hard or soft link */
if (hard_link) {
@@ -18280,7 +18288,7 @@ link_info_by_idx(hid_t fapl)
} /* end if */
else {
/* Make value for link */
- HDsnprintf(valname, sizeof(valname), "value %02u", u);
+ snprintf(valname, sizeof(valname), "value %02u", u);
/* Create soft link */
if (H5Lcreate_soft(valname, group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
@@ -18293,7 +18301,7 @@ link_info_by_idx(hid_t fapl)
} /* end for */
/* Verify state of group */
- if (H5G__has_links_test(group_id, NULL) != TRUE)
+ if (H5G__has_links_test(group_id, NULL) != true)
TEST_ERROR;
/* Check for out of bound offset queries */
@@ -18325,7 +18333,7 @@ link_info_by_idx(hid_t fapl)
/* Create more links, to push group into dense form */
for (; u < (max_compact * 2); u++) {
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Check for creating hard or soft link */
if (hard_link) {
@@ -18340,7 +18348,7 @@ link_info_by_idx(hid_t fapl)
} /* end if */
else {
/* Make value for link */
- HDsnprintf(valname, sizeof(valname), "value %02u", u);
+ snprintf(valname, sizeof(valname), "value %02u", u);
/* Create soft link */
if (H5Lcreate_soft(valname, group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
@@ -18348,7 +18356,7 @@ link_info_by_idx(hid_t fapl)
} /* end else */
/* Verify state of group */
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Verify link information for new link */
@@ -18424,8 +18432,8 @@ link_info_by_idx(hid_t fapl)
static int
link_info_by_idx_old(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1, group_id2 = -1; /* Group IDs */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID, group_id2 = H5I_INVALID_HID; /* Group IDs */
H5F_t *f = NULL;
unsigned hard_link; /* Create hard or soft link? */
H5L_info2_t linfo; /* Link info struct */
@@ -18442,7 +18450,7 @@ link_info_by_idx_old(hid_t fapl)
herr_t ret; /* Generic return value */
/* Loop over creating hard or soft links */
- for (hard_link = FALSE; hard_link <= TRUE; hard_link++) {
+ for (hard_link = false; hard_link <= true; hard_link++) {
if (hard_link)
TESTING("querying info by index in old-style group, using hard links");
else
@@ -18468,7 +18476,7 @@ link_info_by_idx_old(hid_t fapl)
/* Create several links */
for (u = 0; u < CORDER_NLINKS; u++) {
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Check for creating hard or soft link */
if (hard_link) {
@@ -18490,7 +18498,7 @@ link_info_by_idx_old(hid_t fapl)
} /* end if */
else {
/* Make value for link */
- HDsnprintf(valname, sizeof(valname), "value %02u", u);
+ snprintf(valname, sizeof(valname), "value %02u", u);
/* Create soft link */
if (H5Lcreate_soft(valname, group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
@@ -18503,10 +18511,10 @@ link_info_by_idx_old(hid_t fapl)
unsigned dec_u = CORDER_NLINKS - (u + 1); /* Decreasing mapped index */
/* Make link name for increasing/native order queries */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Make link value for increasing/native order queries */
- HDsnprintf(valname, sizeof(valname), "value %02u", u);
+ snprintf(valname, sizeof(valname), "value %02u", u);
/* Verify link information (in increasing order) */
if (hard_link) {
@@ -18522,7 +18530,7 @@ link_info_by_idx_old(hid_t fapl)
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)u, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end else */
@@ -18530,7 +18538,7 @@ link_info_by_idx_old(hid_t fapl)
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)u, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, tmpname) != 0)
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
/* Verify link information (in native order - native is increasing) */
@@ -18547,7 +18555,7 @@ link_info_by_idx_old(hid_t fapl)
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)u, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end else */
@@ -18555,14 +18563,14 @@ link_info_by_idx_old(hid_t fapl)
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)u, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, tmpname) != 0)
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
/* Make link name for decreasing order queries */
- HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u);
+ snprintf(objname, sizeof(objname), "filler %02u", dec_u);
/* Make link value for decreasing order queries */
- HDsnprintf(valname, sizeof(valname), "value %02u", dec_u);
+ snprintf(valname, sizeof(valname), "value %02u", dec_u);
/* Verify link information (in decreasing order) */
if (hard_link) {
@@ -18578,7 +18586,7 @@ link_info_by_idx_old(hid_t fapl)
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)u, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end else */
@@ -18586,7 +18594,7 @@ link_info_by_idx_old(hid_t fapl)
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)u, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, tmpname) != 0)
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -18609,7 +18617,7 @@ link_info_by_idx_old(hid_t fapl)
TEST_ERROR;
/* Verify state of group */
- if (H5G__has_stab_test(group_id) != TRUE)
+ if (H5G__has_stab_test(group_id) != true)
TEST_ERROR;
/* Close the group */
@@ -18648,27 +18656,27 @@ link_info_by_idx_old(hid_t fapl)
static int
delete_by_idx(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1; /* Group ID */
- hid_t gcpl_id = -1; /* Group creation property list ID */
- H5_index_t idx_type; /* Type of index to operate on */
- H5_iter_order_t order; /* Order within in the index */
- unsigned use_index; /* Use index on creation order values */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- H5L_info2_t linfo; /* Link info struct */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char filename[NAME_BUF_SIZE]; /* File name */
- char tmpname[NAME_BUF_SIZE]; /* Temporary link name */
- unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID; /* Group ID */
+ hid_t gcpl_id = H5I_INVALID_HID; /* Group creation property list ID */
+ H5_index_t idx_type; /* Type of index to operate on */
+ H5_iter_order_t order; /* Order within in the index */
+ unsigned use_index; /* Use index on creation order values */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ H5L_info2_t linfo; /* Link info struct */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ char tmpname[NAME_BUF_SIZE]; /* Temporary link name */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic return value */
/* Loop over operating on different indices on link fields */
for (idx_type = H5_INDEX_NAME; idx_type <= H5_INDEX_CRT_ORDER; idx_type++) {
/* Loop over operating in different orders */
for (order = H5_ITER_INC; order <= H5_ITER_DEC; order++) {
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
/* Print appropriate test message */
if (idx_type == H5_INDEX_CRT_ORDER) {
if (order == H5_ITER_INC) {
@@ -18756,7 +18764,7 @@ delete_by_idx(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -18766,12 +18774,12 @@ delete_by_idx(hid_t fapl)
TEST_ERROR;
/* Verify link information for new link */
- if (link_info_by_idx_check(group_id, objname, (hsize_t)u, TRUE, use_index) < 0)
+ if (link_info_by_idx_check(group_id, objname, (hsize_t)u, true, use_index) < 0)
TEST_ERROR;
} /* end for */
/* Verify state of group (compact) */
- if (H5G__has_links_test(group_id, NULL) != TRUE)
+ if (H5G__has_links_test(group_id, NULL) != true)
TEST_ERROR;
/* Check for out of bound deletion */
@@ -18809,10 +18817,10 @@ delete_by_idx(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1));
+ snprintf(objname, sizeof(objname), "filler %02u", (u + 1));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u", (max_compact - (u + 2)));
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u", (max_compact - (u + 2)));
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -18821,7 +18829,7 @@ delete_by_idx(hid_t fapl)
TEST_ERROR;
/* Verify state of group (empty) */
- if (H5G__has_links_test(group_id, NULL) == TRUE)
+ if (H5G__has_links_test(group_id, NULL) == true)
TEST_ERROR;
/* Create more links, to push group into dense form */
@@ -18829,7 +18837,7 @@ delete_by_idx(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -18840,11 +18848,11 @@ delete_by_idx(hid_t fapl)
/* Verify state of group (dense) */
if (u >= max_compact)
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Verify link information for new link */
- if (link_info_by_idx_check(group_id, objname, (hsize_t)u, TRUE, use_index) < 0)
+ if (link_info_by_idx_check(group_id, objname, (hsize_t)u, true, use_index) < 0)
TEST_ERROR;
} /* end for */
@@ -18883,10 +18891,10 @@ delete_by_idx(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1));
+ snprintf(objname, sizeof(objname), "filler %02u", (u + 1));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u", ((max_compact * 2) - (u + 2)));
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u", ((max_compact * 2) - (u + 2)));
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -18895,9 +18903,9 @@ delete_by_idx(hid_t fapl)
TEST_ERROR;
/* Verify state of group (empty) */
- if (H5G__has_links_test(group_id, NULL) == TRUE)
+ if (H5G__has_links_test(group_id, NULL) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) == TRUE)
+ if (H5G__is_new_dense_test(group_id) == true)
TEST_ERROR;
/* Check for deletion on empty group again */
@@ -18916,7 +18924,7 @@ delete_by_idx(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -18927,11 +18935,11 @@ delete_by_idx(hid_t fapl)
/* Verify state of group (dense) */
if (u >= max_compact)
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Verify link information for new link */
- if (link_info_by_idx_check(group_id, objname, (hsize_t)u, TRUE, use_index) < 0)
+ if (link_info_by_idx_check(group_id, objname, (hsize_t)u, true, use_index) < 0)
TEST_ERROR;
} /* end for */
@@ -18961,11 +18969,11 @@ delete_by_idx(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 1));
+ snprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 1));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u",
- ((max_compact * 2) - ((u * 2) + 2)));
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u",
+ ((max_compact * 2) - ((u * 2) + 2)));
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -18995,11 +19003,11 @@ delete_by_idx(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 3));
+ snprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 3));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u",
- ((max_compact * 2) - ((u * 2) + 4)));
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u",
+ ((max_compact * 2) - ((u * 2) + 4)));
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -19008,9 +19016,9 @@ delete_by_idx(hid_t fapl)
TEST_ERROR;
/* Verify state of group (empty) */
- if (H5G__has_links_test(group_id, NULL) == TRUE)
+ if (H5G__has_links_test(group_id, NULL) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) == TRUE)
+ if (H5G__is_new_dense_test(group_id) == true)
TEST_ERROR;
/* Close the group */
@@ -19056,8 +19064,8 @@ delete_by_idx(hid_t fapl)
static int
delete_by_idx_old(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1, group_id2 = -1; /* Group IDs */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID, group_id2 = H5I_INVALID_HID; /* Group IDs */
H5F_t *f = NULL;
H5L_info2_t linfo; /* Link info struct */
H5_iter_order_t order; /* Order within in the index */
@@ -19111,7 +19119,7 @@ delete_by_idx_old(hid_t fapl)
H5O_info2_t oi; /* Buffer for querying object's info */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create group */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -19177,10 +19185,10 @@ delete_by_idx_old(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1));
+ snprintf(objname, sizeof(objname), "filler %02u", (u + 1));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u);
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u", dec_u);
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -19198,7 +19206,7 @@ delete_by_idx_old(hid_t fapl)
TEST_ERROR;
/* Verify state of group */
- if (H5G__has_stab_test(group_id) != TRUE)
+ if (H5G__has_stab_test(group_id) != true)
TEST_ERROR;
/* Delete links in middle */
@@ -19208,7 +19216,7 @@ delete_by_idx_old(hid_t fapl)
H5O_info2_t oi; /* Buffer for querying object's info */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create group */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -19256,10 +19264,10 @@ delete_by_idx_old(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 1));
+ snprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 1));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u);
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u", dec_u);
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -19294,10 +19302,10 @@ delete_by_idx_old(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 3));
+ snprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 3));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u);
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u", dec_u);
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -19306,7 +19314,7 @@ delete_by_idx_old(hid_t fapl)
TEST_ERROR;
/* Verify state of group */
- if (H5G__has_stab_test(group_id) != TRUE)
+ if (H5G__has_stab_test(group_id) != true)
TEST_ERROR;
/* Close the group */
@@ -19382,8 +19390,8 @@ link_iterate_cb(hid_t group_id, const char *link_name, const H5L_info2_t *info,
} /* end if */
/* Verify name of link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", (unsigned)my_info.corder);
- if (HDstrcmp(link_name, objname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u", (unsigned)my_info.corder);
+ if (strcmp(link_name, objname) != 0)
return H5_ITER_ERROR;
/* Check if we've visited this link before */
@@ -19391,7 +19399,7 @@ link_iterate_cb(hid_t group_id, const char *link_name, const H5L_info2_t *info,
return H5_ITER_ERROR;
if (op_data->visited[op_data->curr])
return H5_ITER_ERROR;
- op_data->visited[op_data->curr] = TRUE;
+ op_data->visited[op_data->curr] = true;
/* Advance to next value, in correct direction */
if (op_data->order != H5_ITER_DEC)
@@ -19469,7 +19477,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if (H5Literate2(group_id, idx_type, order, &skip, link_iterate_cb, iter_info) < 0)
TEST_ERROR;
@@ -19477,7 +19485,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u
if (skip != max_links)
TEST_ERROR;
for (v = 0; v < max_links; v++)
- if (iter_info->visited[v] == FALSE)
+ if (iter_info->visited[v] == false)
TEST_ERROR;
#ifndef H5_NO_DEPRECATED_SYMBOLS
@@ -19487,7 +19495,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if (H5Giterate(group_id, ".", &gskip, group_iterate_cb, iter_info) < 0)
TEST_ERROR;
@@ -19495,7 +19503,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u
if (gskip != (int)max_links)
TEST_ERROR;
for (v = 0; v < max_links; v++)
- if (iter_info->visited[v] == FALSE)
+ if (iter_info->visited[v] == false)
TEST_ERROR;
#endif /* H5_NO_DEPRECATED_SYMBOLS */
@@ -19505,7 +19513,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = (int64_t)(order != H5_ITER_DEC ? skip : ((max_links - 1) - skip));
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if (H5Literate2(group_id, idx_type, order, &skip, link_iterate_cb, iter_info) < 0)
TEST_ERROR;
@@ -19514,12 +19522,12 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u
TEST_ERROR;
if (order == H5_ITER_INC) {
for (v = 0; v < (max_links / 2); v++)
- if (iter_info->visited[v + (max_links / 2)] == FALSE)
+ if (iter_info->visited[v + (max_links / 2)] == false)
TEST_ERROR;
} /* end if */
else if (order == H5_ITER_DEC) {
for (v = 0; v < (max_links / 2); v++)
- if (iter_info->visited[v] == FALSE)
+ if (iter_info->visited[v] == false)
TEST_ERROR;
} /* end if */
else {
@@ -19527,7 +19535,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u
assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_links; v++)
- if (iter_info->visited[v] == TRUE)
+ if (iter_info->visited[v] == true)
nvisit++;
if (nvisit != (max_links / 2))
@@ -19541,7 +19549,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? (unsigned)gskip : ((max_links - 1) - (unsigned)gskip);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if (H5Giterate(group_id, ".", &gskip, group_iterate_cb, iter_info) < 0)
TEST_ERROR;
@@ -19550,12 +19558,12 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u
TEST_ERROR;
if (order == H5_ITER_INC) {
for (v = 0; v < (max_links / 2); v++)
- if (iter_info->visited[v + (max_links / 2)] == FALSE)
+ if (iter_info->visited[v + (max_links / 2)] == false)
TEST_ERROR;
} /* end if */
else if (order == H5_ITER_DEC) {
for (v = 0; v < (max_links / 2); v++)
- if (iter_info->visited[v] == FALSE)
+ if (iter_info->visited[v] == false)
TEST_ERROR;
} /* end if */
else {
@@ -19563,7 +19571,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u
assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_links; v++)
- if (iter_info->visited[v] == TRUE)
+ if (iter_info->visited[v] == true)
nvisit++;
if (nvisit != (max_links / 2))
@@ -19577,7 +19585,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if ((ret = H5Literate2(group_id, idx_type, order, &skip, link_iterate_cb, iter_info)) < 0)
TEST_ERROR;
if (ret != CORDER_ITER_STOP)
@@ -19592,7 +19600,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if ((ret = H5Giterate(group_id, ".", &gskip, group_iterate_cb, iter_info)) < 0)
TEST_ERROR;
if (ret != CORDER_ITER_STOP)
@@ -19632,21 +19640,21 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u
static int
link_iterate(hid_t fapl)
{
- hid_t file_id = (-1); /* File ID */
- hid_t group_id = (-1); /* Group ID */
- hid_t gcpl_id = (-1); /* Group creation property list ID */
- H5_index_t idx_type; /* Type of index to operate on */
- H5_iter_order_t order; /* Order within in the index */
- unsigned use_index; /* Use index on creation order values */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char filename[NAME_BUF_SIZE]; /* File name */
- link_iter_info_t iter_info; /* Iterator info */
- hbool_t *visited = NULL; /* Array of flags for visiting links */
- hsize_t skip; /* # of links to skip in group */
- unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ hid_t file_id = (H5I_INVALID_HID); /* File ID */
+ hid_t group_id = (H5I_INVALID_HID); /* Group ID */
+ hid_t gcpl_id = (H5I_INVALID_HID); /* Group creation property list ID */
+ H5_index_t idx_type; /* Type of index to operate on */
+ H5_iter_order_t order; /* Order within in the index */
+ unsigned use_index; /* Use index on creation order values */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ link_iter_info_t iter_info; /* Iterator info */
+ bool *visited = NULL; /* Array of flags for visiting links */
+ hsize_t skip; /* # of links to skip in group */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic return value */
/* Create group creation property list */
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0)
@@ -19658,7 +19666,7 @@ link_iterate(hid_t fapl)
/* Allocate the "visited link" array */
iter_info.max_visit = max_compact * 2;
- if (NULL == (visited = (hbool_t *)malloc(sizeof(hbool_t) * iter_info.max_visit)))
+ if (NULL == (visited = (bool *)malloc(sizeof(bool) * iter_info.max_visit)))
TEST_ERROR;
iter_info.visited = visited;
@@ -19667,7 +19675,7 @@ link_iterate(hid_t fapl)
/* Loop over operating in different orders */
for (order = H5_ITER_INC; order <= H5_ITER_NATIVE; order++) {
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
/* Print appropriate test message */
if (idx_type == H5_INDEX_CRT_ORDER) {
if (order == H5_ITER_INC) {
@@ -19750,7 +19758,7 @@ link_iterate(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -19761,7 +19769,7 @@ link_iterate(hid_t fapl)
} /* end for */
/* Verify state of group (compact) */
- if (H5G__has_links_test(group_id, NULL) != TRUE)
+ if (H5G__has_links_test(group_id, NULL) != true)
TEST_ERROR;
/* Check for out of bound iteration on compact group */
@@ -19783,7 +19791,7 @@ link_iterate(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -19794,7 +19802,7 @@ link_iterate(hid_t fapl)
} /* end for */
/* Verify state of group (dense) */
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Check for out of bound iteration on dense group */
@@ -19893,9 +19901,9 @@ link_iterate_old_cb(hid_t group_id, const char *link_name, const H5L_info2_t *in
} /* end if */
/* Verify name of link */
- HDsnprintf(objname, sizeof(objname), "filler %02u",
- (info ? (unsigned)op_data->curr : (unsigned)((op_data->ncalled - 1) + op_data->nskipped)));
- if (HDstrcmp(link_name, objname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u",
+ (info ? (unsigned)op_data->curr : (unsigned)((op_data->ncalled - 1) + op_data->nskipped)));
+ if (strcmp(link_name, objname) != 0)
return H5_ITER_ERROR;
/* Check if we've visited this link before */
@@ -19903,7 +19911,7 @@ link_iterate_old_cb(hid_t group_id, const char *link_name, const H5L_info2_t *in
return H5_ITER_ERROR;
if (op_data->visited[op_data->curr])
return H5_ITER_ERROR;
- op_data->visited[op_data->curr] = TRUE;
+ op_data->visited[op_data->curr] = true;
/* Advance to next value, in correct direction */
if (op_data->order != H5_ITER_DEC)
@@ -19963,7 +19971,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if (H5Literate2(group_id, H5_INDEX_NAME, order, &skip, link_iterate_old_cb, iter_info) < 0)
TEST_ERROR;
@@ -19971,7 +19979,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links
if (skip != max_links)
TEST_ERROR;
for (v = 0; v < max_links; v++)
- if (iter_info->visited[v] == FALSE)
+ if (iter_info->visited[v] == false)
TEST_ERROR;
#ifndef H5_NO_DEPRECATED_SYMBOLS
@@ -19981,7 +19989,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if (H5Giterate(group_id, ".", &gskip, group_iterate_old_cb, iter_info) < 0)
TEST_ERROR;
@@ -19989,7 +19997,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links
if (gskip != (int)max_links)
TEST_ERROR;
for (v = 0; v < max_links; v++)
- if (iter_info->visited[v] == FALSE)
+ if (iter_info->visited[v] == false)
TEST_ERROR;
#endif /* H5_NO_DEPRECATED_SYMBOLS */
@@ -19999,7 +20007,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = (int64_t)(order != H5_ITER_DEC ? skip : ((max_links - 1) - skip));
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if (H5Literate2(group_id, H5_INDEX_NAME, order, &skip, link_iterate_old_cb, iter_info) < 0)
TEST_ERROR;
@@ -20008,12 +20016,12 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links
TEST_ERROR;
if (order == H5_ITER_INC) {
for (v = 0; v < (max_links / 2); v++)
- if (iter_info->visited[v + (max_links / 2)] == FALSE)
+ if (iter_info->visited[v + (max_links / 2)] == false)
TEST_ERROR;
} /* end if */
else if (order == H5_ITER_DEC) {
for (v = 0; v < (max_links / 2); v++)
- if (iter_info->visited[v] == FALSE)
+ if (iter_info->visited[v] == false)
TEST_ERROR;
} /* end if */
else {
@@ -20021,7 +20029,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links
assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_links; v++)
- if (iter_info->visited[v] == TRUE)
+ if (iter_info->visited[v] == true)
nvisit++;
if (nvisit != (max_links / 2))
@@ -20035,7 +20043,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? (unsigned)gskip : ((max_links - 1) - (unsigned)gskip);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if (H5Giterate(group_id, ".", &gskip, group_iterate_old_cb, iter_info) < 0)
TEST_ERROR;
@@ -20044,12 +20052,12 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links
TEST_ERROR;
if (order == H5_ITER_INC) {
for (v = 0; v < (max_links / 2); v++)
- if (iter_info->visited[v + (max_links / 2)] == FALSE)
+ if (iter_info->visited[v + (max_links / 2)] == false)
TEST_ERROR;
} /* end if */
else if (order == H5_ITER_DEC) {
for (v = 0; v < (max_links / 2); v++)
- if (iter_info->visited[v] == FALSE)
+ if (iter_info->visited[v] == false)
TEST_ERROR;
} /* end if */
else {
@@ -20057,7 +20065,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links
assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_links; v++)
- if (iter_info->visited[v] == TRUE)
+ if (iter_info->visited[v] == true)
nvisit++;
if (nvisit != (max_links / 2))
@@ -20071,7 +20079,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if ((ret = H5Literate2(group_id, H5_INDEX_NAME, order, &skip, link_iterate_old_cb, iter_info)) < 0)
TEST_ERROR;
if (ret != CORDER_ITER_STOP)
@@ -20086,7 +20094,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if ((ret = H5Giterate(group_id, ".", &gskip, group_iterate_old_cb, iter_info)) < 0)
TEST_ERROR;
if (ret != CORDER_ITER_STOP)
@@ -20109,7 +20117,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links
skip = 0;
H5E_BEGIN_TRY
{
- ret = H5Literate2((hid_t)(-1), H5_INDEX_NAME, order, &skip, link_iterate_fail_cb, NULL);
+ ret = H5Literate2((hid_t)(H5I_INVALID_HID), H5_INDEX_NAME, order, &skip, link_iterate_fail_cb, NULL);
}
H5E_END_TRY
if (ret >= 0)
@@ -20118,7 +20126,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links
#ifndef H5_NO_DEPRECATED_SYMBOLS
H5E_BEGIN_TRY
{
- ret = H5Giterate((hid_t)(-1), ".", &gskip, group_iterate_old_cb, iter_info);
+ ret = H5Giterate((hid_t)(H5I_INVALID_HID), ".", &gskip, group_iterate_old_cb, iter_info);
}
H5E_END_TRY
if (ret >= 0)
@@ -20144,20 +20152,20 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links
static int
link_iterate_old(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1; /* Group ID */
- H5_iter_order_t order; /* Order within in the index */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char filename[NAME_BUF_SIZE]; /* File name */
- link_iter_info_t iter_info; /* Iterator info */
- hbool_t *visited = NULL; /* Array of flags for visiting links */
- hsize_t skip; /* # of links to skip in group */
- unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID; /* Group ID */
+ H5_iter_order_t order; /* Order within in the index */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ link_iter_info_t iter_info; /* Iterator info */
+ bool *visited = NULL; /* Array of flags for visiting links */
+ hsize_t skip; /* # of links to skip in group */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic return value */
/* Allocate the "visited link" array */
iter_info.max_visit = CORDER_NLINKS;
- if (NULL == (visited = (hbool_t *)malloc(sizeof(hbool_t) * iter_info.max_visit)))
+ if (NULL == (visited = (bool *)malloc(sizeof(bool) * iter_info.max_visit)))
TEST_ERROR;
iter_info.visited = visited;
@@ -20194,7 +20202,7 @@ link_iterate_old(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -20204,7 +20212,7 @@ link_iterate_old(hid_t fapl)
} /* end for */
/* Verify state of group (symbol table) */
- if (H5G__has_stab_test(group_id) != TRUE)
+ if (H5G__has_stab_test(group_id) != true)
TEST_ERROR;
/* Check for out of bound iteration on old-style group */
@@ -20277,13 +20285,13 @@ static int
open_by_idx_check(hid_t main_group_id, hid_t soft_group_id, hid_t mount_file_id, H5_index_t idx_type,
H5_iter_order_t order, unsigned max_links, H5O_token_t *objno)
{
- char mntname[NAME_BUF_SIZE]; /* Link value */
- hid_t group_id = -1; /* ID of group to test */
- H5O_info2_t oi; /* Buffer for querying object's info */
- H5O_token_t mnt_root_token; /* Token (address) of root group in file to mount */
- hid_t obj_id; /* ID of object opened */
- unsigned mnt_idx; /* Index to mount group on */
- unsigned u, v; /* Local index variables */
+ char mntname[NAME_BUF_SIZE]; /* Link value */
+ hid_t group_id = H5I_INVALID_HID; /* ID of group to test */
+ H5O_info2_t oi; /* Buffer for querying object's info */
+ H5O_token_t mnt_root_token; /* Token (address) of root group in file to mount */
+ hid_t obj_id; /* ID of object opened */
+ unsigned mnt_idx; /* Index to mount group on */
+ unsigned u, v; /* Local index variables */
int token_cmp;
/* Work through main & soft link groups */
@@ -20338,7 +20346,7 @@ open_by_idx_check(hid_t main_group_id, hid_t soft_group_id, hid_t mount_file_id,
/* Mount a file over a group in main group */
mnt_idx = 2;
- HDsnprintf(mntname, sizeof(mntname), "/%s/filler %02u", CORDER_GROUP_NAME, mnt_idx);
+ snprintf(mntname, sizeof(mntname), "/%s/filler %02u", CORDER_GROUP_NAME, mnt_idx);
if (H5Fmount(main_group_id, mntname, mount_file_id, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -20389,23 +20397,23 @@ open_by_idx_check(hid_t main_group_id, hid_t soft_group_id, hid_t mount_file_id,
static int
open_by_idx(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t mount_file_id = -1; /* File ID for file to mount */
- hid_t group_id = -1; /* Group ID */
- hid_t soft_group_id = -1; /* Group ID for soft links */
- hid_t gcpl_id = -1; /* Group creation property list ID */
- H5_index_t idx_type; /* Type of index to operate on */
- H5_iter_order_t order; /* Order within in the index */
- unsigned use_index; /* Use index on creation order values */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- H5O_info2_t oi; /* Buffer for querying object's info */
- char filename[NAME_BUF_SIZE]; /* File name */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char valname[2 * NAME_BUF_SIZE]; /* Link value */
- H5O_token_t *objno = NULL; /* Tokens (addresses) of the objects created */
- unsigned u; /* Local index variable */
- hid_t ret; /* Generic return value */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t mount_file_id = H5I_INVALID_HID; /* File ID for file to mount */
+ hid_t group_id = H5I_INVALID_HID; /* Group ID */
+ hid_t soft_group_id = H5I_INVALID_HID; /* Group ID for soft links */
+ hid_t gcpl_id = H5I_INVALID_HID; /* Group creation property list ID */
+ H5_index_t idx_type; /* Type of index to operate on */
+ H5_iter_order_t order; /* Order within in the index */
+ unsigned use_index; /* Use index on creation order values */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ H5O_info2_t oi; /* Buffer for querying object's info */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char valname[2 * NAME_BUF_SIZE]; /* Link value */
+ H5O_token_t *objno = NULL; /* Tokens (addresses) of the objects created */
+ unsigned u; /* Local index variable */
+ hid_t ret; /* Generic return value */
/* Create group creation property list */
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0)
@@ -20429,7 +20437,7 @@ open_by_idx(hid_t fapl)
/* Loop over operating in different orders */
for (order = H5_ITER_INC; order <= H5_ITER_NATIVE; order++) {
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
/* Print appropriate test message */
if (idx_type == H5_INDEX_CRT_ORDER) {
if (order == H5_ITER_INC) {
@@ -20515,7 +20523,7 @@ open_by_idx(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -20532,13 +20540,13 @@ open_by_idx(hid_t fapl)
TEST_ERROR;
/* Create soft link in another group, to objects in main group */
- HDsnprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
+ snprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
if (H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
}
/* Verify state of group (compact) */
- if (H5G__has_links_test(group_id, NULL) != TRUE)
+ if (H5G__has_links_test(group_id, NULL) != true)
TEST_ERROR;
/* Check for out of bound open by index on compact group */
@@ -20559,7 +20567,7 @@ open_by_idx(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -20576,13 +20584,13 @@ open_by_idx(hid_t fapl)
TEST_ERROR;
/* Create soft link in another group, to objects in main group */
- HDsnprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
+ snprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
if (H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
} /* end for */
/* Verify state of group (dense) */
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Check for out of bound open by index on compact group */
@@ -20658,14 +20666,14 @@ static int
open_by_idx_check_old(hid_t main_group_id, hid_t soft_group_id, hid_t mount_file_id, H5_index_t idx_type,
H5_iter_order_t order, unsigned max_links, H5O_token_t *objno)
{
- char mntname[NAME_BUF_SIZE]; /* Link value */
- hid_t group_id = -1; /* ID of group to test */
- H5O_info2_t oi; /* Buffer for querying object's info */
- H5O_token_t mnt_root_token; /* Token of root group in file to mount */
- hid_t obj_id; /* ID of object opened */
- unsigned mnt_idx; /* Index to mount group on */
- unsigned u, v; /* Local index variables */
- int cmp_value; /* Token comparison value */
+ char mntname[NAME_BUF_SIZE]; /* Link value */
+ hid_t group_id = H5I_INVALID_HID; /* ID of group to test */
+ H5O_info2_t oi; /* Buffer for querying object's info */
+ H5O_token_t mnt_root_token; /* Token of root group in file to mount */
+ hid_t obj_id; /* ID of object opened */
+ unsigned mnt_idx; /* Index to mount group on */
+ unsigned u, v; /* Local index variables */
+ int cmp_value; /* Token comparison value */
/* Work through main & soft link groups */
for (v = 0; v < 2; v++) {
@@ -20719,7 +20727,7 @@ open_by_idx_check_old(hid_t main_group_id, hid_t soft_group_id, hid_t mount_file
/* Mount a file over a group in main group */
mnt_idx = 2;
- HDsnprintf(mntname, sizeof(mntname), "/%s/filler %02u", CORDER_GROUP_NAME, mnt_idx);
+ snprintf(mntname, sizeof(mntname), "/%s/filler %02u", CORDER_GROUP_NAME, mnt_idx);
if (H5Fmount(main_group_id, mntname, mount_file_id, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -20770,18 +20778,18 @@ open_by_idx_check_old(hid_t main_group_id, hid_t soft_group_id, hid_t mount_file
static int
open_by_idx_old(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t mount_file_id = -1; /* File ID for file to mount */
- hid_t group_id = -1; /* Group ID */
- hid_t soft_group_id = -1; /* Group ID for soft links */
- H5_iter_order_t order; /* Order within in the index */
- H5O_info2_t oi; /* Buffer for querying object's info */
- char filename[NAME_BUF_SIZE]; /* File name */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char valname[2 * NAME_BUF_SIZE]; /* Link value */
- H5O_token_t objno[CORDER_NLINKS]; /* Tokens for the objects created */
- unsigned u; /* Local index variable */
- hid_t ret; /* Generic return value */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t mount_file_id = H5I_INVALID_HID; /* File ID for file to mount */
+ hid_t group_id = H5I_INVALID_HID; /* Group ID */
+ hid_t soft_group_id = H5I_INVALID_HID; /* Group ID for soft links */
+ H5_iter_order_t order; /* Order within in the index */
+ H5O_info2_t oi; /* Buffer for querying object's info */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char valname[2 * NAME_BUF_SIZE]; /* Link value */
+ H5O_token_t objno[CORDER_NLINKS]; /* Tokens for the objects created */
+ unsigned u; /* Local index variable */
+ hid_t ret; /* Generic return value */
/* Create file to mount */
h5_fixname(FILENAME[1], fapl, filename, sizeof filename);
@@ -20830,7 +20838,7 @@ open_by_idx_old(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -20846,13 +20854,13 @@ open_by_idx_old(hid_t fapl)
TEST_ERROR;
/* Create soft link in another group, to objects in main group */
- HDsnprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
+ snprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
if (H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
} /* end for */
/* Verify state of group (symbol table) */
- if (H5G__has_stab_test(group_id) != TRUE)
+ if (H5G__has_stab_test(group_id) != true)
TEST_ERROR;
/* Check for out of bound open by index */
@@ -20923,10 +20931,10 @@ static int
object_info_check(hid_t main_group_id, hid_t soft_group_id, H5_index_t idx_type, H5_iter_order_t order,
unsigned max_links, H5O_token_t *objno)
{
- char objname[NAME_BUF_SIZE]; /* Object name */
- hid_t group_id = -1; /* ID of group to test */
- H5O_info2_t oinfo; /* Buffer for querying object's info */
- unsigned u, v; /* Local index variables */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ hid_t group_id = H5I_INVALID_HID; /* ID of group to test */
+ H5O_info2_t oinfo; /* Buffer for querying object's info */
+ unsigned u, v; /* Local index variables */
int token_cmp;
/* Work through main & soft link groups */
@@ -20940,7 +20948,7 @@ object_info_check(hid_t main_group_id, hid_t soft_group_id, H5_index_t idx_type,
/* Open each object in group by name and check that it's the correct one */
for (u = 0; u < max_links; u++) {
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Query the object's information, by name */
if (H5Oget_info_by_name3(group_id, objname, &oinfo, H5O_INFO_BASIC | H5O_INFO_NUM_ATTRS,
@@ -21006,24 +21014,24 @@ object_info_check(hid_t main_group_id, hid_t soft_group_id, H5_index_t idx_type,
static int
object_info(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1; /* Group ID */
- hid_t soft_group_id = -1; /* Group ID for soft links */
- hid_t gcpl_id = -1; /* Group creation property list ID */
- hid_t space_id = -1; /* Dataspace ID (for attributes) */
- H5_index_t idx_type; /* Type of index to operate on */
- H5_iter_order_t order; /* Order within in the index */
- unsigned use_index; /* Use index on creation order values */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- H5O_info2_t oinfo; /* Buffer for querying object's info */
- char filename[NAME_BUF_SIZE]; /* File name */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char valname[2 * NAME_BUF_SIZE]; /* Link value */
- char attrname[NAME_BUF_SIZE]; /* Attribute name */
- H5O_token_t *objno = NULL; /* Tokens (addresses) of the objects created */
- herr_t ret; /* Generic return value */
- unsigned u, v; /* Local index variables */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID; /* Group ID */
+ hid_t soft_group_id = H5I_INVALID_HID; /* Group ID for soft links */
+ hid_t gcpl_id = H5I_INVALID_HID; /* Group creation property list ID */
+ hid_t space_id = H5I_INVALID_HID; /* Dataspace ID (for attributes) */
+ H5_index_t idx_type; /* Type of index to operate on */
+ H5_iter_order_t order; /* Order within in the index */
+ unsigned use_index; /* Use index on creation order values */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ H5O_info2_t oinfo; /* Buffer for querying object's info */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char valname[2 * NAME_BUF_SIZE]; /* Link value */
+ char attrname[NAME_BUF_SIZE]; /* Attribute name */
+ H5O_token_t *objno = NULL; /* Tokens (addresses) of the objects created */
+ herr_t ret; /* Generic return value */
+ unsigned u, v; /* Local index variables */
/* Create group creation property list */
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0)
@@ -21046,7 +21054,7 @@ object_info(hid_t fapl)
/* Loop over operating in different orders */
for (order = H5_ITER_INC; order <= H5_ITER_NATIVE; order++) {
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
/* Print appropriate test message */
if (idx_type == H5_INDEX_CRT_ORDER) {
if (order == H5_ITER_INC) {
@@ -21139,7 +21147,7 @@ object_info(hid_t fapl)
hid_t attr_id; /* Attribute ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -21154,7 +21162,7 @@ object_info(hid_t fapl)
/* Create attributes on new object */
for (v = 0; v < u; v++) {
/* Make name for attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", v);
+ snprintf(attrname, sizeof(attrname), "attr %02u", v);
/* Create attribute */
if ((attr_id = H5Acreate2(group_id2, attrname, H5T_NATIVE_INT, space_id, H5P_DEFAULT,
@@ -21171,13 +21179,13 @@ object_info(hid_t fapl)
TEST_ERROR;
/* Create soft link in another group, to objects in main group */
- HDsnprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
+ snprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
if (H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
} /* end for */
/* Verify state of group (compact) */
- if (H5G__has_links_test(group_id, NULL) != TRUE)
+ if (H5G__has_links_test(group_id, NULL) != true)
TEST_ERROR;
/* Check for out of bound query by index */
@@ -21200,7 +21208,7 @@ object_info(hid_t fapl)
hid_t attr_id; /* Attribute ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -21215,7 +21223,7 @@ object_info(hid_t fapl)
/* Create attributes on new object */
for (v = 0; v < u; v++) {
/* Make name for attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", v);
+ snprintf(attrname, sizeof(attrname), "attr %02u", v);
/* Create attribute */
if ((attr_id = H5Acreate2(group_id2, attrname, H5T_NATIVE_INT, space_id, H5P_DEFAULT,
@@ -21232,13 +21240,13 @@ object_info(hid_t fapl)
TEST_ERROR;
/* Create soft link in another group, to objects in main group */
- HDsnprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
+ snprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
if (H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
} /* end for */
/* Verify state of group (dense) */
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Check for out of bound query by index */
@@ -21311,10 +21319,10 @@ static int
object_info_check_old(hid_t main_group_id, hid_t soft_group_id, H5_index_t idx_type, H5_iter_order_t order,
unsigned max_links, H5O_token_t *objno)
{
- char objname[NAME_BUF_SIZE]; /* Object name */
- hid_t group_id = -1; /* ID of group to test */
- H5O_info2_t oinfo; /* Buffer for querying object's info */
- unsigned u, v; /* Local index variables */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ hid_t group_id = H5I_INVALID_HID; /* ID of group to test */
+ H5O_info2_t oinfo; /* Buffer for querying object's info */
+ unsigned u, v; /* Local index variables */
/* Work through main & soft link groups */
for (v = 0; v < 2; v++) {
@@ -21329,7 +21337,7 @@ object_info_check_old(hid_t main_group_id, hid_t soft_group_id, H5_index_t idx_t
int cmp_value; /* Token comparison value */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Query the object's information, by name */
if (H5Oget_info_by_name3(group_id, objname, &oinfo, H5O_INFO_BASIC | H5O_INFO_NUM_ATTRS,
@@ -21394,19 +21402,19 @@ object_info_check_old(hid_t main_group_id, hid_t soft_group_id, H5_index_t idx_t
static int
object_info_old(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1; /* Group ID */
- hid_t soft_group_id = -1; /* Group ID for soft links */
- hid_t space_id = -1; /* Dataspace ID (for attributes) */
- H5_iter_order_t order; /* Order within in the index */
- H5O_info2_t oinfo; /* Buffer for querying object's info */
- char filename[NAME_BUF_SIZE]; /* File name */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char valname[2 * NAME_BUF_SIZE]; /* Link value */
- char attrname[NAME_BUF_SIZE]; /* Attribute name */
- H5O_token_t objno[CORDER_NLINKS]; /* Tokens for the objects created */
- herr_t ret; /* Generic return value */
- unsigned u, v; /* Local index variables */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID; /* Group ID */
+ hid_t soft_group_id = H5I_INVALID_HID; /* Group ID for soft links */
+ hid_t space_id = H5I_INVALID_HID; /* Dataspace ID (for attributes) */
+ H5_iter_order_t order; /* Order within in the index */
+ H5O_info2_t oinfo; /* Buffer for querying object's info */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char valname[2 * NAME_BUF_SIZE]; /* Link value */
+ char attrname[NAME_BUF_SIZE]; /* Attribute name */
+ H5O_token_t objno[CORDER_NLINKS]; /* Tokens for the objects created */
+ herr_t ret; /* Generic return value */
+ unsigned u, v; /* Local index variables */
/* Create dataspace for attributes */
if ((space_id = H5Screate(H5S_SCALAR)) < 0)
@@ -21457,7 +21465,7 @@ object_info_old(hid_t fapl)
hid_t attr_id; /* Attribute ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -21471,7 +21479,7 @@ object_info_old(hid_t fapl)
/* Create attributes on new object */
for (v = 0; v < u; v++) {
/* Make name for attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", v);
+ snprintf(attrname, sizeof(attrname), "attr %02u", v);
/* Create attribute */
if ((attr_id = H5Acreate2(group_id2, attrname, H5T_NATIVE_INT, space_id, H5P_DEFAULT,
@@ -21488,13 +21496,13 @@ object_info_old(hid_t fapl)
TEST_ERROR;
/* Create soft link in another group, to objects in main group */
- HDsnprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
+ snprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
if (H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
} /* end for */
/* Verify state of group (symbol table) */
- if (H5G__has_stab_test(group_id) != TRUE)
+ if (H5G__has_stab_test(group_id) != true)
TEST_ERROR;
/* Check for out of bound query by index */
@@ -21567,22 +21575,22 @@ object_info_old(hid_t fapl)
static int
group_info(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1; /* Group ID */
- hid_t soft_group_id = -1; /* Group ID for soft links */
- hid_t gcpl_id = -1; /* Group creation property list ID */
- H5_index_t idx_type; /* Type of index to operate on */
- H5_iter_order_t order; /* Order within in the index */
- unsigned use_index; /* Use index on creation order values */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- H5G_info_t grp_info; /* Buffer for querying object's info */
- char filename[NAME_BUF_SIZE]; /* File name */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char objname2[NAME_BUF_SIZE]; /* Object name */
- char valname[2 * NAME_BUF_SIZE]; /* Link value */
- herr_t ret; /* Generic return value */
- unsigned u, v; /* Local index variables */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID; /* Group ID */
+ hid_t soft_group_id = H5I_INVALID_HID; /* Group ID for soft links */
+ hid_t gcpl_id = H5I_INVALID_HID; /* Group creation property list ID */
+ H5_index_t idx_type; /* Type of index to operate on */
+ H5_iter_order_t order; /* Order within in the index */
+ unsigned use_index; /* Use index on creation order values */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ H5G_info_t grp_info; /* Buffer for querying object's info */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char objname2[NAME_BUF_SIZE]; /* Object name */
+ char valname[2 * NAME_BUF_SIZE]; /* Link value */
+ herr_t ret; /* Generic return value */
+ unsigned u, v; /* Local index variables */
/* Create group creation property list */
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0)
@@ -21597,7 +21605,7 @@ group_info(hid_t fapl)
/* Loop over operating in different orders */
for (order = H5_ITER_INC; order <= H5_ITER_NATIVE; order++) {
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
/* Print appropriate test message */
if (idx_type == H5_INDEX_CRT_ORDER) {
if (order == H5_ITER_INC) {
@@ -21689,7 +21697,7 @@ group_info(hid_t fapl)
hid_t group_id2, group_id3; /* Group IDs */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0)
@@ -21734,7 +21742,7 @@ group_info(hid_t fapl)
/* Create objects in new group created */
for (v = 0; v <= u; v++) {
/* Make name for link */
- HDsnprintf(objname2, sizeof(objname2), "filler %02u", v);
+ snprintf(objname2, sizeof(objname2), "filler %02u", v);
/* Create hard link, with group object */
if ((group_id3 =
@@ -21845,7 +21853,7 @@ group_info(hid_t fapl)
TEST_ERROR;
/* Create soft link in another group, to objects in main group */
- HDsnprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
+ snprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
if (H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -21863,7 +21871,7 @@ group_info(hid_t fapl)
} /* end for */
/* Verify state of group (compact) */
- if (H5G__has_links_test(group_id, NULL) != TRUE)
+ if (H5G__has_links_test(group_id, NULL) != true)
TEST_ERROR;
/* Check for out of bound query by index */
@@ -21881,7 +21889,7 @@ group_info(hid_t fapl)
hid_t group_id2, group_id3; /* Group IDs */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0)
@@ -21926,7 +21934,7 @@ group_info(hid_t fapl)
/* Create objects in new group created */
for (v = 0; v <= u; v++) {
/* Make name for link */
- HDsnprintf(objname2, sizeof(objname2), "filler %02u", v);
+ snprintf(objname2, sizeof(objname2), "filler %02u", v);
/* Create hard link, with group object */
if ((group_id3 =
@@ -22037,7 +22045,7 @@ group_info(hid_t fapl)
TEST_ERROR;
/* Create soft link in another group, to objects in main group */
- HDsnprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
+ snprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
if (H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -22055,7 +22063,7 @@ group_info(hid_t fapl)
} /* end for */
/* Verify state of group (dense) */
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Check for out of bound query by index */
@@ -22116,17 +22124,17 @@ group_info(hid_t fapl)
static int
group_info_old(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1; /* Group ID */
- hid_t soft_group_id = -1; /* Group ID for soft links */
- H5_iter_order_t order; /* Order within in the index */
- H5G_info_t grp_info; /* Buffer for querying object's info */
- char filename[NAME_BUF_SIZE]; /* File name */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char objname2[NAME_BUF_SIZE]; /* Object name */
- char valname[2 * NAME_BUF_SIZE]; /* Link value */
- herr_t ret; /* Generic return value */
- unsigned u, v; /* Local index variables */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID; /* Group ID */
+ hid_t soft_group_id = H5I_INVALID_HID; /* Group ID for soft links */
+ H5_iter_order_t order; /* Order within in the index */
+ H5G_info_t grp_info; /* Buffer for querying object's info */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char objname2[NAME_BUF_SIZE]; /* Object name */
+ char valname[2 * NAME_BUF_SIZE]; /* Link value */
+ herr_t ret; /* Generic return value */
+ unsigned u, v; /* Local index variables */
/* Loop over operating in different orders */
for (order = H5_ITER_INC; order <= H5_ITER_NATIVE; order++) {
@@ -22169,7 +22177,7 @@ group_info_old(hid_t fapl)
hid_t group_id2, group_id3; /* Group IDs */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -22214,7 +22222,7 @@ group_info_old(hid_t fapl)
/* Create objects in new group created */
for (v = 0; v <= u; v++) {
/* Make name for link */
- HDsnprintf(objname2, sizeof(objname2), "filler %02u", v);
+ snprintf(objname2, sizeof(objname2), "filler %02u", v);
/* Create hard link, with group object */
if ((group_id3 = H5Gcreate2(group_id2, objname2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -22324,7 +22332,7 @@ group_info_old(hid_t fapl)
TEST_ERROR;
/* Create soft link in another group, to objects in main group */
- HDsnprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
+ snprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
if (H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -22342,7 +22350,7 @@ group_info_old(hid_t fapl)
} /* end for */
/* Verify state of group (old-style) */
- if (H5G__has_stab_test(group_id) != TRUE)
+ if (H5G__has_stab_test(group_id) != true)
TEST_ERROR;
/* Check for out of bound query by index */
@@ -22405,15 +22413,15 @@ group_info_old(hid_t fapl)
static int
timestamps(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1; /* Group ID */
- hid_t group_id2 = -1; /* Group ID */
- hid_t gcpl_id = -1; /* Group creation property list ID */
- hid_t gcpl_id2 = -1; /* Group creation property list ID */
- H5O_info2_t oinfo, oinfo2; /* Object info for groups created */
- H5O_native_info_t ninfo, ninfo2; /* Native info for groups created */
- char filename[NAME_BUF_SIZE]; /* File name */
- hbool_t track_times; /* The object timestamp setting */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID; /* Group ID */
+ hid_t group_id2 = H5I_INVALID_HID; /* Group ID */
+ hid_t gcpl_id = H5I_INVALID_HID; /* Group creation property list ID */
+ hid_t gcpl_id2 = H5I_INVALID_HID; /* Group creation property list ID */
+ H5O_info2_t oinfo, oinfo2; /* Object info for groups created */
+ H5O_native_info_t ninfo, ninfo2; /* Native info for groups created */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ bool track_times; /* The object timestamp setting */
/* Print test message */
TESTING("timestamps on objects");
@@ -22427,11 +22435,11 @@ timestamps(hid_t fapl)
TEST_ERROR;
/* Check default timestamp information */
- if (track_times != TRUE)
+ if (track_times != true)
TEST_ERROR;
/* Set a non-default object timestamp setting */
- if (H5Pset_obj_track_times(gcpl_id, FALSE) < 0)
+ if (H5Pset_obj_track_times(gcpl_id, false) < 0)
TEST_ERROR;
/* Query the object timestamp setting */
@@ -22439,7 +22447,7 @@ timestamps(hid_t fapl)
TEST_ERROR;
/* Check default timestamp information */
- if (track_times != FALSE)
+ if (track_times != false)
TEST_ERROR;
/* Create file */
@@ -22468,11 +22476,11 @@ timestamps(hid_t fapl)
/* Query & verify the object timestamp settings */
if (H5Pget_obj_track_times(gcpl_id, &track_times) < 0)
TEST_ERROR;
- if (track_times != FALSE)
+ if (track_times != false)
TEST_ERROR;
if (H5Pget_obj_track_times(gcpl_id2, &track_times) < 0)
TEST_ERROR;
- if (track_times != TRUE)
+ if (track_times != true)
TEST_ERROR;
/* Query the object information for each group */
@@ -22550,11 +22558,11 @@ timestamps(hid_t fapl)
/* Query & verify the object timestamp settings */
if (H5Pget_obj_track_times(gcpl_id, &track_times) < 0)
TEST_ERROR;
- if (track_times != FALSE)
+ if (track_times != false)
TEST_ERROR;
if (H5Pget_obj_track_times(gcpl_id2, &track_times) < 0)
TEST_ERROR;
- if (track_times != TRUE)
+ if (track_times != true)
TEST_ERROR;
/* Query the object information for each group */
@@ -22640,15 +22648,15 @@ timestamps(hid_t fapl)
int
main(void)
{
- hid_t fapl = -1, fapl2 = -1; /* File access property lists */
+ hid_t fapl = H5I_INVALID_HID, fapl2 = H5I_INVALID_HID; /* File access property lists */
int nerrors = 0;
unsigned new_format; /* Whether to use the new format or not */
unsigned minimize_dset_oh;
unsigned efc; /* Whether to use the external file cache */
const char *env_h5_drvr; /* File Driver value from environment */
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
@@ -22676,7 +22684,7 @@ main(void)
dcpl_g = H5P_DEFAULT;
}
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
hid_t my_fapl;
/* Check for FAPL to use */
@@ -22718,7 +22726,7 @@ main(void)
#endif /* H5_NO_DEPRECATED_SYMBOLS */
/* Skip external link tests for splitter VFD, which has external link-related bugs */
- if (HDstrcmp(env_h5_drvr, "splitter")) {
+ if (strcmp(env_h5_drvr, "splitter")) {
/* tests for external link */
/* Test external file cache first, so it sees the default efc setting on the fapl
@@ -22736,7 +22744,7 @@ main(void)
nerrors += external_set_elink_acc_flags(env_h5_drvr, my_fapl, new_format) < 0 ? 1 : 0;
/* Try external link tests both with and without the external file cache */
- for (efc = FALSE; efc <= TRUE; efc++) {
+ for (efc = false; efc <= true; efc++) {
if (efc) {
if (H5Pset_elink_file_cache_size(my_fapl, 8) < 0)
TEST_ERROR;
@@ -22817,7 +22825,7 @@ main(void)
* so assume that everything that passed for external links
* above has already been tested for UD links.
*/
- if (new_format == TRUE) {
+ if (new_format == true) {
nerrors += ud_hard_links(fapl2) < 0 ? 1 : 0; /* requires new format groups */
#ifndef H5_NO_DEPRECATED_SYMBOLS
nerrors += ud_hard_links_deprec(fapl2) < 0 ? 1 : 0; /* requires new format groups */
@@ -22945,6 +22953,6 @@ main(void)
exit(EXIT_SUCCESS);
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
exit(EXIT_FAILURE);
} /* end main() */
diff --git a/test/links_env.c b/test/links_env.c
index 620380b4922..1eae52a5128 100644
--- a/test/links_env.c
+++ b/test/links_env.c
@@ -30,7 +30,7 @@ static const char *FILENAME[] = {"extlinks_env0", /* 0: main file */
TMPDIR "extlinks_env1", /* 2 */
NULL};
-static int external_link_env(hid_t fapl, hbool_t new_format);
+static int external_link_env(hid_t fapl, bool new_format);
/*-------------------------------------------------------------------------
* Function: external_link_env (moved from links.c)
@@ -48,11 +48,11 @@ static int external_link_env(hid_t fapl, hbool_t new_format);
*-------------------------------------------------------------------------
*/
static int
-external_link_env(hid_t fapl, hbool_t new_format)
+external_link_env(hid_t fapl, bool new_format)
{
- hid_t fid = (-1); /* File ID */
- hid_t gid = (-1); /* Group IDs */
- const char *envval = NULL; /* Pointer to environment variable */
+ hid_t fid = (H5I_INVALID_HID); /* File ID */
+ hid_t gid = (H5I_INVALID_HID); /* Group IDs */
+ const char *envval = NULL; /* Pointer to environment variable */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE],
filename3[NAME_BUF_SIZE]; /* Holders for filename */
@@ -61,9 +61,9 @@ external_link_env(hid_t fapl, hbool_t new_format)
else
TESTING("external links via environment variable");
- if ((envval = HDgetenv("HDF5_EXT_PREFIX")) == NULL)
+ if ((envval = getenv("HDF5_EXT_PREFIX")) == NULL)
envval = "nomatch";
- if (HDstrcmp(envval, ".:tmp_links_env") != 0)
+ if (strcmp(envval, ".:tmp_links_env") != 0)
TEST_ERROR;
/* Set up name for main file:"extlinks_env0" */
@@ -109,7 +109,7 @@ external_link_env(hid_t fapl, hbool_t new_format)
/* Should be able to find the target file from pathnames set via HDF5_EXT_PREFIX */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp_links_env directory.");
+ puts(" Should have found the file in tmp_links_env directory.");
goto error;
}
@@ -149,26 +149,26 @@ main(void)
int nerrors = 0; /* Error from tests */
/* Get the VFD to use */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
/* Splitter VFD has issues with external links */
- if (!HDstrcmp(env_h5_drvr, "splitter")) {
- HDputs(" -- SKIPPED for incompatible VFD --");
+ if (!strcmp(env_h5_drvr, "splitter")) {
+ puts(" -- SKIPPED for incompatible VFD --");
exit(EXIT_SUCCESS);
}
h5_reset();
fapl = h5_fileaccess();
- nerrors += external_link_env(fapl, FALSE) < 0 ? 1 : 0;
+ nerrors += external_link_env(fapl, false) < 0 ? 1 : 0;
/* Set the "use the latest version of the format" bounds for creating objects in the file */
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
TEST_ERROR;
- nerrors += external_link_env(fapl, TRUE) < 0 ? 1 : 0;
+ nerrors += external_link_env(fapl, true) < 0 ? 1 : 0;
/* Verify symbol table messages are cached */
nerrors += (h5_verify_cached_stabs(FILENAME, fapl) < 0 ? 1 : 0);
@@ -189,6 +189,6 @@ main(void)
exit(EXIT_SUCCESS);
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
exit(EXIT_FAILURE);
} /* end main() */
diff --git a/test/mdset.c b/test/mdset.c
index 6e736df516a..013eb775553 100644
--- a/test/mdset.c
+++ b/test/mdset.c
@@ -50,8 +50,8 @@ static const char *FILENAME[] = {"mdset", "mdset1", "mdset2", NULL};
char dset_name[MAX_DSETS][DSET_MAX_NAME_LEN];
/* Whether these filters are available */
-htri_t deflate_avail = FALSE;
-htri_t fletcher32_avail = FALSE;
+htri_t deflate_avail = false;
+htri_t fletcher32_avail = false;
static int
test_mdset_location(hid_t fapl_id)
@@ -183,7 +183,7 @@ test_mdset(size_t niter, unsigned flags, hid_t fapl_id)
size_t max_dsets;
size_t buf_size;
size_t ndsets;
- hid_t file_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
hid_t dcpl_id[MAX_DSETS];
hsize_t dset_dims[MAX_DSETS][3];
hsize_t chunk_dims[2];
@@ -196,7 +196,7 @@ test_mdset(size_t niter, unsigned flags, hid_t fapl_id)
unsigned *wbufi[MAX_DSETS][MAX_DSET_X];
unsigned *efbuf = NULL;
unsigned *efbufi[MAX_DSETS][MAX_DSET_X];
- hbool_t do_read;
+ bool do_read;
hsize_t start[3];
hsize_t count[3];
hsize_t points[3 * MAX_POINTS];
@@ -321,7 +321,7 @@ test_mdset(size_t niter, unsigned flags, hid_t fapl_id)
for (j = 0; j < ndsets; j++) {
hid_t source_dset;
- hbool_t use_chunk =
+ bool use_chunk =
(flags & MDSET_FLAG_CHUNK) || ((flags & MDSET_FLAG_MLAYOUT) && (j == 1 || j == 2));
/* Generate file dataspace */
@@ -388,7 +388,7 @@ test_mdset(size_t niter, unsigned flags, hid_t fapl_id)
for (j = 0; j < OPS_PER_FILE; j++) {
/* Decide whether to read or write. Can't read on the first iteration with external
* layout because the write is needed to create the external file. */
- do_read = (j == 0 && flags & MDSET_FLAG_MLAYOUT) ? FALSE : (hbool_t)(HDrandom() % 2);
+ do_read = (j == 0 && flags & MDSET_FLAG_MLAYOUT) ? false : (bool)(HDrandom() % 2);
/* Loop over datasets */
for (k = 0; k < ndsets; k++) {
diff --git a/test/mf.c b/test/mf.c
index bc01c3870b4..269419f546c 100644
--- a/test/mf.c
+++ b/test/mf.c
@@ -133,11 +133,11 @@ static unsigned test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t
static unsigned test_mf_align_alloc4(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl);
static unsigned test_mf_align_alloc5(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl);
static unsigned test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl);
-static unsigned test_mf_tmp(const char *env_h5_drvr, hid_t fapl, hbool_t new_format);
-static unsigned test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format);
-static unsigned test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format);
-static unsigned test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format);
-static unsigned test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format);
+static unsigned test_mf_tmp(const char *env_h5_drvr, hid_t fapl, bool new_format);
+static unsigned test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, bool new_format);
+static unsigned test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, bool new_format);
+static unsigned test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, bool new_format);
+static unsigned test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, bool new_format);
#ifdef PB_OUT
static unsigned test_mf_fs_persist_split(void);
static unsigned test_mf_fs_persist_multi(void);
@@ -212,24 +212,24 @@ check_stats(const H5F_t *f, const H5FS_t *frsp, H5FS_stat_t *state)
static unsigned
test_mf_eoa(const char *env_h5_drvr, hid_t fapl)
{
- hid_t file = -1; /* File ID */
- hid_t fapl_new = -1; /* copy of fapl */
- char filename[FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
- h5_stat_size_t file_size, new_file_size; /* file size */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t fapl_new = H5I_INVALID_HID; /* copy of fapl */
+ char filename[FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ h5_stat_size_t file_size, new_file_size; /* file size */
H5FD_mem_t type;
haddr_t addr1, addr2;
haddr_t ma_addr = HADDR_UNDEF, new_ma_addr = HADDR_UNDEF;
hsize_t ma_size = 0;
- hbool_t suitable_vfd;
+ bool suitable_vfd;
TESTING("H5MM_alloc() of file allocation");
/* Skip test when using VFDs that has different address spaces for each
* type of metadata allocation. Also skip test for Direct VFD.
*/
- suitable_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
- HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0 &&
+ strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
/* Set the filename to use for this test */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -324,7 +324,7 @@ test_mf_eoa(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support continuous address space");
+ puts(" Current VFD doesn't support continuous address space");
} /* end else */
return (0);
@@ -361,8 +361,8 @@ test_mf_eoa(const char *env_h5_drvr, hid_t fapl)
static unsigned
test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
{
- hid_t file = -1; /* File ID */
- hid_t fapl_new = -1; /* copy of fapl */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t fapl_new = H5I_INVALID_HID; /* copy of fapl */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
h5_stat_size_t file_size = 0, new_file_size; /* file size */
@@ -370,15 +370,15 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
haddr_t addr = 0;
haddr_t ma_addr = HADDR_UNDEF, new_ma_addr = HADDR_UNDEF;
hsize_t ma_size = 0, new_ma_size = 0;
- hbool_t suitable_vfd;
+ bool suitable_vfd;
TESTING("H5MF_try_shrink() of file allocation: test 1");
/* Skip test when using VFDs that has different address spaces for each
* type of metadata allocation. Also skip test for Direct VFD.
*/
- suitable_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
- HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0 &&
+ strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -472,7 +472,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
TESTING("H5MF_try_shrink() of file allocation: test 2");
@@ -522,7 +522,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
TESTING("H5MF_try_shrink() of file allocation: test 3");
@@ -567,7 +567,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
TESTING("H5MF_try_shrink() of file allocation: test 4");
@@ -615,7 +615,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
return (0);
@@ -648,25 +648,25 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
static unsigned
test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl)
{
- hid_t file = -1; /* File ID */
- hid_t fapl_new = -1; /* copy of fapl */
- char filename[FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
- h5_stat_size_t file_size, new_file_size; /* File size */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t fapl_new = H5I_INVALID_HID; /* copy of fapl */
+ char filename[FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ h5_stat_size_t file_size, new_file_size; /* File size */
H5FD_mem_t type;
haddr_t addr;
htri_t was_extended;
haddr_t ma_addr = HADDR_UNDEF, new_ma_addr = HADDR_UNDEF;
hsize_t ma_size = 0, new_ma_size = 0;
- hbool_t suitable_vfd;
+ bool suitable_vfd;
TESTING("H5MF_try_extend() of file allocation: test 1");
/* Skip test when using VFDs that has different address spaces for each
* type of metadata allocation. Also skip test for Direct VFD.
*/
- suitable_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
- HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0 &&
+ strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -758,7 +758,7 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
TESTING("H5MF_try_extend() of file allocation: test 2");
@@ -822,7 +822,7 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
return (0);
@@ -861,11 +861,11 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl)
*-------------------------------------------------------------------------
*/
static unsigned
-test_mf_tmp(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
+test_mf_tmp(const char *env_h5_drvr, hid_t fapl, bool new_format)
{
- hid_t file = -1; /* File ID */
- hid_t fapl2 = -1; /* File access property list */
- hid_t fcpl = -1; /* File creation property list */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t fapl2 = H5I_INVALID_HID; /* File access property list */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list */
if (new_format)
TESTING("'temporary' file space allocation with new library format");
@@ -899,7 +899,7 @@ test_mf_tmp(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
if (H5Pset_libver_bounds(fapl2, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
FAIL_STACK_ERROR;
- H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1);
+ H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)1);
} /* end if */
/* Create the file to work on */
@@ -1031,7 +1031,7 @@ test_mf_tmp(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support continuous address space");
+ puts(" Current VFD doesn't support continuous address space");
} /* end else */
return (0);
@@ -1056,11 +1056,11 @@ test_mf_tmp(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
static unsigned
test_mf_fs_start(hid_t fapl)
{
- hid_t file = -1; /* File ID */
- hid_t fapl_new = -1; /* copy of fapl */
- char filename[FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
- h5_stat_size_t file_size, new_file_size; /* file size */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t fapl_new = H5I_INVALID_HID; /* copy of fapl */
+ char filename[FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ h5_stat_size_t file_size, new_file_size; /* file size */
H5FS_stat_t state;
TESTING("H5MF_create_fstype()/H5MF__open_fstype() of free-space manager");
@@ -1167,11 +1167,11 @@ test_mf_fs_start(hid_t fapl)
static unsigned
test_mf_fs_alloc_free(hid_t fapl)
{
- hid_t file = -1; /* File ID */
- hid_t fapl_new = -1; /* copy of fapl */
- char filename[FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
- h5_stat_size_t file_size, new_file_size; /* file size */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t fapl_new = H5I_INVALID_HID; /* copy of fapl */
+ char filename[FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ h5_stat_size_t file_size, new_file_size; /* file size */
H5MF_free_section_t *sect_node = NULL;
haddr_t addr;
haddr_t tmp;
@@ -1258,7 +1258,7 @@ test_mf_fs_alloc_free(hid_t fapl)
/* Remove section A from free-space */
if (H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE30, f->shared->fs_man[H5FD_MEM_SUPER], &tmp) !=
- TRUE)
+ true)
TEST_ERROR;
if (tmp != TBLOCK_ADDR70)
@@ -1334,7 +1334,7 @@ test_mf_fs_alloc_free(hid_t fapl)
/* Remove section A from free-space */
if (H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE30, f->shared->fs_man[H5FD_MEM_SUPER], &tmp) !=
- TRUE)
+ true)
TEST_ERROR;
if (tmp != TBLOCK_ADDR70)
@@ -1404,7 +1404,7 @@ test_mf_fs_alloc_free(hid_t fapl)
/* Remove section A from free-space */
if (H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE30, f->shared->fs_man[H5FD_MEM_SUPER], &tmp) !=
- TRUE)
+ true)
TEST_ERROR;
/* Verify that the block is section A in free-space */
@@ -1496,11 +1496,11 @@ test_mf_fs_alloc_free(hid_t fapl)
static unsigned
test_mf_fs_extend(hid_t fapl)
{
- hid_t file = -1; /* File ID */
- hid_t fapl_new = -1; /* copy of fapl */
- char filename[FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
- h5_stat_size_t file_size, new_file_size; /* file size */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t fapl_new = H5I_INVALID_HID; /* copy of fapl */
+ char filename[FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ h5_stat_size_t file_size, new_file_size; /* file size */
H5MF_free_section_t *sect_node1 = NULL, *sect_node2 = NULL;
haddr_t addr;
haddr_t tmp;
@@ -1620,7 +1620,7 @@ test_mf_fs_extend(hid_t fapl)
/* Remove the extended block */
if (H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)(TBLOCK_SIZE30 + TBLOCK_SIZE50),
- f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != TRUE)
+ f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != true)
TEST_ERROR;
if (tmp != TBLOCK_ADDR70)
@@ -1725,7 +1725,7 @@ test_mf_fs_extend(hid_t fapl)
/* Remove the merged sections A & B from free-space */
if (H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)(TBLOCK_SIZE30 + TBLOCK_SIZE50),
- f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != TRUE)
+ f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != true)
TEST_ERROR;
if (tmp != addr)
@@ -1830,7 +1830,7 @@ test_mf_fs_extend(hid_t fapl)
/* Remove the merged sections A & B from free-space */
if (H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)(TBLOCK_SIZE30 + TBLOCK_SIZE50),
- f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != TRUE)
+ f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != true)
TEST_ERROR;
if (tmp != addr)
@@ -1936,7 +1936,7 @@ test_mf_fs_extend(hid_t fapl)
/* Remove section A from free-space manager */
if (H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)(TBLOCK_SIZE30 - 10), f->shared->fs_man[H5FD_MEM_SUPER],
- &tmp) != TRUE)
+ &tmp) != true)
TEST_ERROR;
if (tmp != addr)
@@ -1944,7 +1944,7 @@ test_mf_fs_extend(hid_t fapl)
/* Remove section B from free-space manager */
if (H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE50, f->shared->fs_man[H5FD_MEM_SUPER], &tmp) !=
- TRUE)
+ true)
TEST_ERROR;
if (H5Fclose(file) < 0)
@@ -2004,7 +2004,7 @@ test_mf_fs_extend(hid_t fapl)
static unsigned
test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
haddr_t addr, saddr;
@@ -2012,12 +2012,12 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl)
haddr_t ma_addr = HADDR_UNDEF;
hsize_t ma_size = 0;
H5MF_free_section_t *sect_node = NULL;
- hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
+ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */
TESTING("A free-space section absorbs an aggregator: test 1");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -2062,7 +2062,7 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl)
/* Verify that the section did absorb the aggregator */
if (H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)(ma_addr + ma_size),
- f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != TRUE)
+ f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != true)
TEST_ERROR;
if (tmp != ma_addr)
@@ -2082,7 +2082,7 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
TESTING("A free-space section absorbs an aggregator: test 2");
@@ -2122,7 +2122,7 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl)
/* Verify that the section did absorb the aggregator */
if (H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)(ma_size + TBLOCK_SIZE30),
- f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != TRUE)
+ f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != true)
TEST_ERROR;
if ((tmp + TBLOCK_SIZE30) != ma_addr)
@@ -2144,7 +2144,7 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
return (0);
@@ -2179,7 +2179,7 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl)
static unsigned
test_mf_aggr_alloc1(const char *env_h5_drvr, hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
hid_t fcpl; /* File creation property list */
@@ -2188,13 +2188,13 @@ test_mf_aggr_alloc1(const char *env_h5_drvr, hid_t fapl)
haddr_t addr1, addr2;
haddr_t ma_addr = HADDR_UNDEF;
hsize_t ma_size = 0;
- hbool_t suitable_vfd;
+ bool suitable_vfd;
TESTING("H5MF_alloc() of meta/sdata aggregator:test 1");
/* Skip test when using VFDs that don't use the metadata aggregator. Also skip test for Direct VFD. */
- suitable_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
- HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0 &&
+ strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -2204,7 +2204,7 @@ test_mf_aggr_alloc1(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR;
/* Set to H5F_FSPACE_STRATEGY_AGGR strategy */
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_AGGR, FALSE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_AGGR, false, (hsize_t)1) < 0)
TEST_ERROR;
/* Create the file to work on */
@@ -2289,7 +2289,7 @@ test_mf_aggr_alloc1(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
return (0);
@@ -2332,7 +2332,7 @@ test_mf_aggr_alloc1(const char *env_h5_drvr, hid_t fapl)
static unsigned
test_mf_aggr_alloc2(const char *env_h5_drvr, hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
h5_stat_size_t file_size, new_file_size; /* file size */
@@ -2340,13 +2340,13 @@ test_mf_aggr_alloc2(const char *env_h5_drvr, hid_t fapl)
haddr_t addr1, addr2, addr3;
haddr_t ma_addr = HADDR_UNDEF;
hsize_t ma_size = 0;
- hbool_t suitable_vfd;
+ bool suitable_vfd;
TESTING("H5MF_alloc() of meta/sdata aggregator:test 2");
/* Skip test when using VFDs that don't use the metadata aggregator. Also skip test for Direct VFD. */
- suitable_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
- HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0 &&
+ strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -2434,7 +2434,7 @@ test_mf_aggr_alloc2(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
return (0);
@@ -2489,7 +2489,7 @@ test_mf_aggr_alloc2(const char *env_h5_drvr, hid_t fapl)
static unsigned
test_mf_aggr_alloc3(const char *env_h5_drvr, hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
h5_stat_size_t file_size, new_file_size; /* file size */
@@ -2499,12 +2499,12 @@ test_mf_aggr_alloc3(const char *env_h5_drvr, hid_t fapl)
hsize_t ma_size = 0, new_ma_size = 0;
haddr_t sdata_addr = HADDR_UNDEF;
hsize_t sdata_size = 0;
- hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
+ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */
TESTING("H5MF_alloc() of meta/sdata aggregator: test 3");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -2600,7 +2600,7 @@ test_mf_aggr_alloc3(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
return (0);
@@ -2659,7 +2659,7 @@ test_mf_aggr_alloc3(const char *env_h5_drvr, hid_t fapl)
static unsigned
test_mf_aggr_alloc4(const char *env_h5_drvr, hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
h5_stat_size_t file_size, new_file_size; /* File size */
@@ -2667,12 +2667,12 @@ test_mf_aggr_alloc4(const char *env_h5_drvr, hid_t fapl)
haddr_t addr1, addr2, saddr1, saddr2, saddr3;
haddr_t ma_addr = HADDR_UNDEF, new_ma_addr = HADDR_UNDEF, sdata_addr = HADDR_UNDEF;
hsize_t ma_size = 0, new_ma_size = 0, sdata_size = 0;
- hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
+ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */
TESTING("H5MF_alloc() of meta/sdata aggregator:test 4");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -2768,7 +2768,7 @@ test_mf_aggr_alloc4(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
return (0);
@@ -2808,7 +2808,7 @@ test_mf_aggr_alloc4(const char *env_h5_drvr, hid_t fapl)
static unsigned
test_mf_aggr_alloc5(const char *env_h5_drvr, hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
h5_stat_size_t file_size, new_file_size; /* File size */
@@ -2816,12 +2816,12 @@ test_mf_aggr_alloc5(const char *env_h5_drvr, hid_t fapl)
haddr_t addr1, addr2, addr3;
haddr_t ma_addr = HADDR_UNDEF, new_ma_addr = HADDR_UNDEF;
hsize_t ma_size = 0, new_ma_size = 0;
- hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
+ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */
TESTING("H5MF_alloc() of meta/sdata aggregator:test 5");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -2894,7 +2894,7 @@ test_mf_aggr_alloc5(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
return (0);
@@ -2945,7 +2945,7 @@ test_mf_aggr_alloc5(const char *env_h5_drvr, hid_t fapl)
static unsigned
test_mf_aggr_alloc6(const char *env_h5_drvr, hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
h5_stat_size_t file_size, new_file_size; /* file size */
@@ -2954,12 +2954,12 @@ test_mf_aggr_alloc6(const char *env_h5_drvr, hid_t fapl)
haddr_t ma_addr = HADDR_UNDEF, new_ma_addr = HADDR_UNDEF, sdata_addr = HADDR_UNDEF;
hsize_t ma_size = 0, new_ma_size = 0, sdata_size = 0;
H5FS_stat_t state;
- hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
+ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */
TESTING("H5MF_alloc() of meta/sdata aggregator:test 6");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -3057,7 +3057,7 @@ test_mf_aggr_alloc6(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
return (0);
@@ -3119,7 +3119,7 @@ test_mf_aggr_alloc6(const char *env_h5_drvr, hid_t fapl)
static unsigned
test_mf_aggr_alloc7(const char *env_h5_drvr, hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
h5_stat_size_t empty_size, file_size;
@@ -3128,12 +3128,12 @@ test_mf_aggr_alloc7(const char *env_h5_drvr, hid_t fapl)
haddr_t ma_addr = HADDR_UNDEF, sdata_addr = HADDR_UNDEF;
hsize_t ma_size = 0, sdata_size = 0;
H5FS_stat_t state;
- hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
+ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */
TESTING("H5MF_alloc() of meta/sdata aggregator:test 7");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -3249,7 +3249,7 @@ test_mf_aggr_alloc7(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
return (0);
@@ -3290,7 +3290,7 @@ test_mf_aggr_alloc7(const char *env_h5_drvr, hid_t fapl)
static unsigned
test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
h5_stat_size_t empty_size = 0, file_size;
@@ -3299,12 +3299,12 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
haddr_t ma_addr = HADDR_UNDEF, new_ma_addr = HADDR_UNDEF, sdata_addr = HADDR_UNDEF;
hsize_t ma_size = 0, new_ma_size = 0, sdata_size = 0;
htri_t was_extended;
- hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
+ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */
TESTING("H5MF_try_extend() of meta/sdata aggregator: test 1");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -3408,7 +3408,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
TESTING("H5MF_try_extend() of meta/sdata aggregator: test 2");
@@ -3478,7 +3478,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
TESTING("H5MF_try_extend() of meta/sdata aggregator: test 3");
@@ -3548,7 +3548,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
return (0);
@@ -3587,7 +3587,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
static unsigned
test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
h5_stat_size_t empty_size = 0, file_size;
@@ -3597,12 +3597,12 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl)
haddr_t new_sdata_addr = HADDR_UNDEF;
hsize_t ma_size = 0, new_ma_size = 0;
hsize_t sdata_size = 0, new_sdata_size = 0;
- hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
+ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */
TESTING("H5MF_try_shrink() of meta/sdata aggregator: test 1");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -3660,7 +3660,7 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
TESTING("H5MF_try_shrink() of meta/sdata aggregator: test 2");
@@ -3725,7 +3725,7 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
TESTING("H5MF_try_shrink() of meta/sdata aggregator: test 3");
@@ -3788,7 +3788,7 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
return (0);
@@ -3837,8 +3837,8 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl)
static unsigned
test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
{
- hid_t file = -1; /* File ID */
- hid_t fapl1 = -1;
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t fapl1 = H5I_INVALID_HID;
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
h5_stat_size_t file_size, new_file_size;
@@ -3849,7 +3849,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
htri_t was_extended;
H5FS_stat_t state;
hsize_t alignment = 0, mis_align = 0, tmp = 0, accum = 0;
- hbool_t suitable_vfd;
+ bool suitable_vfd;
TESTING("H5MM_alloc() of file allocation with alignment: test 1");
@@ -3857,8 +3857,8 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
* don't push mis-aligned space fragments on the file free space list.
* Also skip test for Direct VFD.
*/
- suitable_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
- HDstrcmp(env_h5_drvr, "multi") != 0 && HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "stdio") != 0 && strcmp(env_h5_drvr, "split") != 0 &&
+ strcmp(env_h5_drvr, "multi") != 0 && strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -3963,7 +3963,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support mis-aligned fragments");
+ puts(" Current VFD doesn't support mis-aligned fragments");
} /* end else */
TESTING("H5MF_try_shrink() of file allocation with alignment: test 2");
@@ -4021,7 +4021,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support mis-aligned fragments");
+ puts(" Current VFD doesn't support mis-aligned fragments");
} /* end else */
TESTING("H5MF_try_extend() of file allocation with alignment: test 3");
@@ -4082,7 +4082,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support mis-aligned fragments");
+ puts(" Current VFD doesn't support mis-aligned fragments");
} /* end else */
if (fapl1 >= 0 && H5Pclose(fapl1) < 0)
@@ -4134,7 +4134,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
static unsigned
test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
h5_stat_size_t file_size;
H5F_t *f = NULL; /* Internal file object pointer */
@@ -4143,7 +4143,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
H5FS_stat_t state;
htri_t was_extended;
hsize_t alignment = 0, tmp = 0, mis_align = 0;
- hbool_t suitable_vfd;
+ bool suitable_vfd;
TESTING("H5MF_alloc() of free-space manager with alignment: test 1");
@@ -4307,8 +4307,8 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
* don't push mis-aligned space fragments on the file free space list
* Also skip test for Direct VFD.
*/
- suitable_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
- HDstrcmp(env_h5_drvr, "multi") != 0 && HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "stdio") != 0 && strcmp(env_h5_drvr, "split") != 0 &&
+ strcmp(env_h5_drvr, "multi") != 0 && strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
if ((file_size = h5_get_file_size(filename, new_fapl)) < 0)
TEST_ERROR;
@@ -4380,7 +4380,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support mis-aligned fragments");
+ puts(" Current VFD doesn't support mis-aligned fragments");
} /* end else */
return (0);
@@ -4495,7 +4495,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
static unsigned
test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
h5_stat_size_t file_size; /* File size */
@@ -4506,7 +4506,7 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
haddr_t ma_addr = HADDR_UNDEF;
hsize_t ma_size = 0, mis_align = 0;
hsize_t alignment = 0, tmp = 0;
- hbool_t suitable_vfd;
+ bool suitable_vfd;
TESTING("H5MF_alloc() of meta/sdata aggregator with alignment: test 1");
@@ -4514,8 +4514,8 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
* don't push mis-aligned space fragments on the file free space list.
* Also skip test for Direct VFD.
*/
- suitable_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
- HDstrcmp(env_h5_drvr, "multi") != 0 && HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "stdio") != 0 && strcmp(env_h5_drvr, "split") != 0 &&
+ strcmp(env_h5_drvr, "multi") != 0 && strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -4656,7 +4656,7 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support mis-aligned fragments");
+ puts(" Current VFD doesn't support mis-aligned fragments");
} /* end else */
return (0);
@@ -4759,7 +4759,7 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
static unsigned
test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
h5_stat_size_t file_size; /* File size */
@@ -4769,7 +4769,7 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
haddr_t ma_addr = HADDR_UNDEF, sdata_addr = HADDR_UNDEF;
hsize_t ma_size = 0, sdata_size = 0, mis_align = 0;
hsize_t alignment = 0, tmp = 0;
- hbool_t suitable_vfd;
+ bool suitable_vfd;
TESTING("H5MF_alloc() of meta/sdata aggregator with alignment: test 2");
@@ -4777,8 +4777,8 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
* don't push mis-aligned space fragments on the file free space list.
* Also skip test for Direct VFD.
*/
- suitable_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
- HDstrcmp(env_h5_drvr, "multi") != 0 && HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "stdio") != 0 && strcmp(env_h5_drvr, "split") != 0 &&
+ strcmp(env_h5_drvr, "multi") != 0 && strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -4950,7 +4950,7 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support mis-aligned fragments");
+ puts(" Current VFD doesn't support mis-aligned fragments");
} /* end else */
return (0);
@@ -5104,7 +5104,7 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
static unsigned
test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
h5_stat_size_t file_size;
@@ -5115,7 +5115,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
haddr_t ma_addr = HADDR_UNDEF, sdata_addr = HADDR_UNDEF;
hsize_t ma_size = 0, sdata_size = 0, mis_align = 0;
hsize_t alignment = 0, tmp = 0;
- hbool_t suitable_vfd;
+ bool suitable_vfd;
TESTING("H5MF_alloc() of meta/sdata aggregator with alignment: test 3");
@@ -5123,8 +5123,8 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
* don't push mis-aligned space fragments on the file free space list.
* Also skip test for Direct VFD.
*/
- suitable_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
- HDstrcmp(env_h5_drvr, "multi") != 0 && HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "stdio") != 0 && strcmp(env_h5_drvr, "split") != 0 &&
+ strcmp(env_h5_drvr, "multi") != 0 && strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -5336,7 +5336,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support mis-aligned fragments");
+ puts(" Current VFD doesn't support mis-aligned fragments");
} /* end else */
return (0);
@@ -5419,7 +5419,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
static unsigned
test_mf_align_alloc4(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
h5_stat_size_t file_size;
@@ -5429,7 +5429,7 @@ test_mf_align_alloc4(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
haddr_t ma_addr = HADDR_UNDEF;
hsize_t ma_size = 0, saved_ma_size = 0;
hsize_t alignment = 0, mis_align = 0, tmp = 0;
- hbool_t suitable_vfd;
+ bool suitable_vfd;
TESTING("H5MF_alloc() of meta/sdata aggregator with alignment: test 4");
@@ -5437,8 +5437,8 @@ test_mf_align_alloc4(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
* don't push mis-aligned space fragments on the file free space list.
* Also skip test for Direct VFD.
*/
- suitable_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
- HDstrcmp(env_h5_drvr, "multi") != 0 && HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "stdio") != 0 && strcmp(env_h5_drvr, "split") != 0 &&
+ strcmp(env_h5_drvr, "multi") != 0 && strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -5552,7 +5552,7 @@ test_mf_align_alloc4(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support mis-aligned fragments");
+ puts(" Current VFD doesn't support mis-aligned fragments");
} /* end else */
return (0);
@@ -5637,7 +5637,7 @@ test_mf_align_alloc4(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
static unsigned
test_mf_align_alloc5(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
h5_stat_size_t file_size;
@@ -5648,7 +5648,7 @@ test_mf_align_alloc5(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
haddr_t sdata_addr = HADDR_UNDEF, new_sdata_addr = HADDR_UNDEF;
hsize_t ma_size = 0, new_ma_size = 0, sdata_size = 0, new_sdata_size = 0;
hsize_t alignment = 0, mis_align = 0, tmp = 0;
- hbool_t suitable_vfd;
+ bool suitable_vfd;
TESTING("H5MF_alloc() of meta/sdata aggregator with alignment: test 5");
@@ -5656,8 +5656,8 @@ test_mf_align_alloc5(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
* don't push mis-aligned space fragments on the file free space list.
* Also skip test for Direct VFD.
*/
- suitable_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
- HDstrcmp(env_h5_drvr, "multi") != 0 && HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "stdio") != 0 && strcmp(env_h5_drvr, "split") != 0 &&
+ strcmp(env_h5_drvr, "multi") != 0 && strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -5782,7 +5782,7 @@ test_mf_align_alloc5(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support mis-aligned fragments");
+ puts(" Current VFD doesn't support mis-aligned fragments");
} /* end else */
return (0);
@@ -5908,7 +5908,7 @@ test_mf_align_alloc5(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
static unsigned
test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
h5_stat_size_t file_size;
@@ -5919,7 +5919,7 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
haddr_t ma_addr = HADDR_UNDEF, new_ma_addr = HADDR_UNDEF, sdata_addr = HADDR_UNDEF;
hsize_t ma_size = 0, new_ma_size = 0, sdata_size = 0;
hsize_t alignment = 0, mis_align = 0, tmp = 0;
- hbool_t suitable_vfd;
+ bool suitable_vfd;
TESTING("H5MF_alloc() of meta/sdata aggregator with alignment: test 6");
@@ -5927,8 +5927,8 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
* don't push mis-aligned space fragments on the file free space list.
* Also skip test for Direct VFD.
*/
- suitable_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
- HDstrcmp(env_h5_drvr, "multi") != 0 && HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "stdio") != 0 && strcmp(env_h5_drvr, "split") != 0 &&
+ strcmp(env_h5_drvr, "multi") != 0 && strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -6097,7 +6097,7 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support mis-aligned fragments");
+ puts(" Current VFD doesn't support mis-aligned fragments");
} /* end else */
return 0;
@@ -6118,15 +6118,15 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
static unsigned
test_mf_bug1(const char *env_h5_drvr, hid_t fapl)
{
- hid_t file = -1; /* File ID */
- hid_t copied_fapl = -1; /* FAPL to use for this test */
- char filename[FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t copied_fapl = H5I_INVALID_HID; /* FAPL to use for this test */
+ char filename[FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5FD_mem_t type;
haddr_t addr1, addr2;
hsize_t block_size;
hsize_t align;
- hbool_t split = FALSE, multi = FALSE;
+ bool split = false, multi = false;
TESTING("H5MF_alloc() bug 1");
@@ -6147,10 +6147,10 @@ test_mf_bug1(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR;
/* Check for split or multi driver */
- if (!HDstrcmp(env_h5_drvr, "split"))
- split = TRUE;
- else if (!HDstrcmp(env_h5_drvr, "multi"))
- multi = TRUE;
+ if (!strcmp(env_h5_drvr, "split"))
+ split = true;
+ else if (!strcmp(env_h5_drvr, "multi"))
+ multi = true;
/* Add alignment to member files for split/multi driver */
if (split || multi) {
@@ -6178,7 +6178,7 @@ test_mf_bug1(const char *env_h5_drvr, hid_t fapl)
hid_t memb_fapl_arr[H5FD_MEM_NTYPES];
char *memb_name[H5FD_MEM_NTYPES];
haddr_t memb_addr[H5FD_MEM_NTYPES];
- hbool_t relax;
+ bool relax;
H5FD_mem_t mt;
/* Get current multi settings */
@@ -6296,9 +6296,9 @@ test_mf_bug1(const char *env_h5_drvr, hid_t fapl)
static unsigned
test_mf_fs_persist_split(void)
{
- hid_t file = -1; /* File ID */
- hid_t fcpl = -1; /* File creation property list ID */
- hid_t fapl = -1; /* File access property list ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5FD_mem_t type, stype, btype; /* File allocation type */
@@ -6341,7 +6341,7 @@ test_mf_fs_persist_split(void)
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
FAIL_STACK_ERROR;
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, true, (hsize_t)1) < 0)
FAIL_STACK_ERROR;
/* Set the filename to use for this test (dependent on fapl) */
@@ -6583,22 +6583,22 @@ test_mf_fs_persist_split(void)
memb_map[H5FD_MEM_DRAW] = H5FD_MEM_DRAW; \
memb_map[H5FD_MEM_GHEAP] = H5FD_MEM_GHEAP; \
memb_map[H5FD_MEM_LHEAP] = H5FD_MEM_LHEAP; \
- HDsnprintf(sv[H5FD_MEM_SUPER], 64, "%%s-%c.h5", 's'); \
+ snprintf(sv[H5FD_MEM_SUPER], 64, "%%s-%c.h5", 's'); \
memb_name[H5FD_MEM_SUPER] = sv[H5FD_MEM_SUPER]; \
memb_addr[H5FD_MEM_SUPER] = 0; \
- HDsnprintf(sv[H5FD_MEM_BTREE], 64, "%%s-%c.h5", 'b'); \
+ snprintf(sv[H5FD_MEM_BTREE], 64, "%%s-%c.h5", 'b'); \
memb_name[H5FD_MEM_BTREE] = sv[H5FD_MEM_BTREE]; \
memb_addr[H5FD_MEM_BTREE] = HADDR_MAX / 6; \
- HDsnprintf(sv[H5FD_MEM_DRAW], 64, "%%s-%c.h5", 'r'); \
+ snprintf(sv[H5FD_MEM_DRAW], 64, "%%s-%c.h5", 'r'); \
memb_name[H5FD_MEM_DRAW] = sv[H5FD_MEM_DRAW]; \
memb_addr[H5FD_MEM_DRAW] = HADDR_MAX / 3; \
- HDsnprintf(sv[H5FD_MEM_GHEAP], 64, "%%s-%c.h5", 'g'); \
+ snprintf(sv[H5FD_MEM_GHEAP], 64, "%%s-%c.h5", 'g'); \
memb_name[H5FD_MEM_GHEAP] = sv[H5FD_MEM_GHEAP]; \
memb_addr[H5FD_MEM_GHEAP] = HADDR_MAX / 2; \
- HDsnprintf(sv[H5FD_MEM_LHEAP], 64, "%%s-%c.h5", 'l'); \
+ snprintf(sv[H5FD_MEM_LHEAP], 64, "%%s-%c.h5", 'l'); \
memb_name[H5FD_MEM_LHEAP] = sv[H5FD_MEM_LHEAP]; \
memb_addr[H5FD_MEM_LHEAP] = HADDR_MAX * 2 / 3; \
- HDsnprintf(sv[H5FD_MEM_OHDR], 64, "%%s-%c.h5", 'o'); \
+ snprintf(sv[H5FD_MEM_OHDR], 64, "%%s-%c.h5", 'o'); \
memb_name[H5FD_MEM_OHDR] = sv[H5FD_MEM_OHDR]; \
memb_addr[H5FD_MEM_OHDR] = HADDR_MAX * 5 / 6; \
}
@@ -6611,9 +6611,9 @@ test_mf_fs_persist_split(void)
static unsigned
test_mf_fs_persist_multi(void)
{
- hid_t file = -1; /* File ID */
- hid_t fcpl = -1; /* File creation property list ID */
- hid_t fapl = -1; /* File access property list ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5FD_mem_t type, stype, btype, gtype; /* File allocation type */
@@ -6624,7 +6624,7 @@ test_mf_fs_persist_multi(void)
haddr_t gaddr1, gaddr2; /* File address for H5FD_MEM_GHEAP */
haddr_t tmp_addr; /* Temporary variable for address */
H5FS_section_info_t *node; /* Free space section node */
- htri_t node_found = FALSE; /* Indicate section is in free-space */
+ htri_t node_found = false; /* Indicate section is in free-space */
H5FD_mem_t memb_map[H5FD_MEM_NTYPES]; /* Memory usage map */
hid_t memb_fapl[H5FD_MEM_NTYPES]; /* Member access properties */
char sv[H5FD_MEM_NTYPES][64]; /* Name generators */
@@ -6651,7 +6651,7 @@ test_mf_fs_persist_multi(void)
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
FAIL_STACK_ERROR;
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, true, (hsize_t)1) < 0)
FAIL_STACK_ERROR;
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
@@ -6659,7 +6659,7 @@ test_mf_fs_persist_multi(void)
MULTI_SETUP(memb_map, memb_fapl, memb_name, memb_addr, sv)
- if (H5Pset_fapl_multi(fapl, memb_map, memb_fapl, memb_name, memb_addr, TRUE) < 0)
+ if (H5Pset_fapl_multi(fapl, memb_map, memb_fapl, memb_name, memb_addr, true) < 0)
TEST_ERROR;
/* Set the filename to use for this test (dependent on fapl) */
@@ -6931,11 +6931,11 @@ test_mf_fs_persist_multi(void)
*-------------------------------------------------------------------------
*/
static unsigned
-test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
+test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, bool new_format)
{
- hid_t file = -1; /* File ID */
- hid_t fcpl = -1; /* File creation property list ID */
- hid_t fapl2 = -1; /* File access property list ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list ID */
+ hid_t fapl2 = H5I_INVALID_HID; /* File access property list ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5FD_mem_t type; /* File allocation type */
@@ -6949,7 +6949,7 @@ test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
else
TESTING("File's free-space is persistent with old library format");
- if (HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0) {
+ if (strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0) {
/* File creation property list template */
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
@@ -6964,12 +6964,12 @@ test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
if (H5Pset_libver_bounds(fapl2, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
FAIL_STACK_ERROR;
/* Set to paged aggregation and persisting free-space */
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, true, (hsize_t)1) < 0)
TEST_ERROR;
}
else {
/* Setting: aggregation with persisting free-space */
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, true, (hsize_t)1) < 0)
TEST_ERROR;
}
@@ -7084,7 +7084,7 @@ test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
}
else {
SKIPPED();
- HDputs(" Current VFD doesn't support persisting free-space or paged aggregation strategy");
+ puts(" Current VFD doesn't support persisting free-space or paged aggregation strategy");
}
return (0);
@@ -7106,11 +7106,11 @@ test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static unsigned
-test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
+test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, bool new_format)
{
- hid_t file = -1; /* File ID */
- hid_t fcpl = -1; /* File creation property list */
- hid_t fapl2 = -1; /* File access property list */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list */
+ hid_t fapl2 = H5I_INVALID_HID; /* File access property list */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5FD_mem_t type; /* File allocation type */
@@ -7118,7 +7118,7 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
haddr_t addr1, addr2, addr3, addr4; /* File address for H5FD_MEM_SUPER */
haddr_t addrx;
H5FD_mem_t fs_type;
- hbool_t contig_addr_vfd;
+ bool contig_addr_vfd;
if (new_format)
TESTING("File's free-space is going away with new library format");
@@ -7126,7 +7126,7 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
TESTING("File's free-space is going away with old library format");
/* Current VFD that does not support contiguous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
@@ -7148,7 +7148,7 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
}
/* Set to aggregation and persisting free-space */
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, true, (hsize_t)1) < 0)
FAIL_STACK_ERROR;
/* Set the filename to use for this test (dependent on fapl) */
@@ -7273,7 +7273,7 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
}
else {
SKIPPED();
- HDputs(" Current VFD doesn't support persistent free-space manager");
+ puts(" Current VFD doesn't support persistent free-space manager");
}
return (0);
@@ -7296,11 +7296,11 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static unsigned
-test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
+test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, bool new_format)
{
- hid_t file = -1; /* File ID */
- hid_t fcpl = -1; /* File creation property list template */
- hid_t fapl2 = -1; /* File access property list template */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list template */
+ hid_t fapl2 = H5I_INVALID_HID; /* File access property list template */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5FD_mem_t type; /* File allocation type */
@@ -7309,7 +7309,7 @@ test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_for
H5F_fspace_strategy_t fs_type; /* File space handling strategy */
hsize_t fs_threshold; /* Free-space section threshold */
unsigned fs_persist; /* To persist free-space or not */
- hbool_t contig_addr_vfd;
+ bool contig_addr_vfd;
if (new_format)
TESTING("File space strategy/persisting/threshold with new library format");
@@ -7317,7 +7317,7 @@ test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_for
TESTING("File space strategy/persisting/threshold with old library format");
/* Current VFD that does not support contiguous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -7330,8 +7330,8 @@ test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_for
if (H5Pset_libver_bounds(fapl2, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
FAIL_STACK_ERROR;
- /* Test with TRUE or FALSE for persisting free-space */
- for (fs_persist = FALSE; fs_persist <= TRUE; fs_persist++) {
+ /* Test with true or false for persisting free-space */
+ for (fs_persist = false; fs_persist <= true; fs_persist++) {
for (fs_threshold = 0; fs_threshold <= TEST_THRESHOLD10; fs_threshold++) {
@@ -7346,7 +7346,7 @@ test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_for
FAIL_STACK_ERROR;
/* Set default file space information */
- if (H5Pset_file_space_strategy(fcpl, fs_type, (hbool_t)fs_persist, fs_threshold) < 0)
+ if (H5Pset_file_space_strategy(fcpl, fs_type, (bool)fs_persist, fs_threshold) < 0)
FAIL_STACK_ERROR;
/* Create the file to work on */
@@ -7465,11 +7465,11 @@ test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_for
*-------------------------------------------------------------------------
*/
static unsigned
-test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
+test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, bool new_format)
{
- hid_t file = -1; /* File ID */
- hid_t fcpl = -1; /* File creation property list template */
- hid_t fapl2 = -1; /* File access property list template */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list template */
+ hid_t fapl2 = H5I_INVALID_HID; /* File access property list template */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5FD_mem_t type; /* File allocation type */
@@ -7479,7 +7479,7 @@ test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format
unsigned fs_persist; /* To persist free-space or not */
H5FS_stat_t fs_state; /* Information for free-space manager */
H5FS_stat_t fs_state_zero; /* Information for free-space manager */
- hbool_t contig_addr_vfd;
+ bool contig_addr_vfd;
if (new_format)
TESTING("File space merge/shrink for section size < threshold with new library format");
@@ -7487,7 +7487,7 @@ test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format
TESTING("File space merge/shrink for section size < threshold with old library format");
/* Current VFD that does not support contiguous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -7502,8 +7502,8 @@ test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format
if (H5Pset_libver_bounds(fapl2, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
FAIL_STACK_ERROR;
- /* Test with TRUE or FALSE for persisting free-space */
- for (fs_persist = FALSE; fs_persist <= TRUE; fs_persist++) {
+ /* Test with true or false for persisting free-space */
+ for (fs_persist = false; fs_persist <= true; fs_persist++) {
/* Testing for H5F_FSPACE_STRATEGY_FSM_AGGR and H5F_FSPACE_STRATEGY_PAGE strategies only */
for (fs_type = H5F_FSPACE_STRATEGY_FSM_AGGR; fs_type < H5F_FSPACE_STRATEGY_AGGR; fs_type++) {
@@ -7672,7 +7672,7 @@ test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format
static unsigned
test_dichotomy(hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5FD_mem_t type, stype;
@@ -7746,13 +7746,13 @@ test_dichotomy(hid_t fapl)
*-------------------------------------------------------------------------
*/
static int
-set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t is_multi_or_split)
+set_multi_split(hid_t fapl, hsize_t pagesize, bool is_multi_or_split)
{
H5FD_mem_t memb_map[H5FD_MEM_NTYPES];
hid_t memb_fapl_arr[H5FD_MEM_NTYPES];
char *memb_name[H5FD_MEM_NTYPES];
haddr_t memb_addr[H5FD_MEM_NTYPES];
- hbool_t relax;
+ bool relax;
H5FD_mem_t mt;
assert(is_multi_or_split);
@@ -7804,14 +7804,14 @@ static unsigned
test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t fcpl = -1; /* File creation property list */
- hid_t fapl_new = -1; /* File access property list ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- haddr_t addr2, addr3; /* Addresses for small metadata blocks */
- haddr_t saddr1; /* Addresses for small raw data blocks */
- haddr_t gaddr1; /* Addresses for large data blocks */
- hbool_t split = FALSE, multi = FALSE;
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list */
+ hid_t fapl_new = H5I_INVALID_HID; /* File access property list ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ haddr_t addr2, addr3; /* Addresses for small metadata blocks */
+ haddr_t saddr1; /* Addresses for small raw data blocks */
+ haddr_t gaddr1; /* Addresses for large data blocks */
+ bool split = false, multi = false;
char filename[FILENAME_LEN]; /* Filename to use */
haddr_t found_addr; /* Address of the found section */
unsigned fs_persist; /* To persist free-space or not */
@@ -7819,10 +7819,10 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
TESTING("Paged aggregation for file space: H5MF_alloc/H5MF_xfree");
/* Check for split or multi driver */
- if (!HDstrcmp(env_h5_drvr, "split"))
- split = TRUE;
- else if (!HDstrcmp(env_h5_drvr, "multi"))
- multi = TRUE;
+ if (!strcmp(env_h5_drvr, "split"))
+ split = true;
+ else if (!strcmp(env_h5_drvr, "multi"))
+ multi = true;
if (!multi && !split) {
@@ -7836,8 +7836,8 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
if (set_multi_split(fapl_new, 4096, split) < 0)
TEST_ERROR;
- /* Test with TRUE or FALSE for persisting free-space */
- for (fs_persist = FALSE; fs_persist <= TRUE; fs_persist++) {
+ /* Test with true or false for persisting free-space */
+ for (fs_persist = false; fs_persist <= true; fs_persist++) {
H5F_mem_page_t fs_type;
/* File creation property list */
@@ -8002,7 +8002,7 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
}
else {
SKIPPED();
- HDputs(" Current VFD doesn't support persisting free-space or paged aggregation strategy");
+ puts(" Current VFD doesn't support persisting free-space or paged aggregation strategy");
}
return (0);
@@ -8034,13 +8034,13 @@ static unsigned
test_page_try_shrink(const char *env_h5_drvr, hid_t fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t fcpl = -1; /* File creation property list */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list */
H5F_t *f = NULL; /* Internal file object pointer */
haddr_t addr1; /* Address for small metadata block */
haddr_t saddr1; /* Address for small raw data block */
haddr_t gaddr1; /* Address for large data block */
- hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
+ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */
htri_t status; /* status from shrinking */
h5_stat_size_t file_size; /* File size */
char filename[FILENAME_LEN]; /* Filename to use */
@@ -8048,7 +8048,7 @@ test_page_try_shrink(const char *env_h5_drvr, hid_t fapl)
TESTING("Paged aggregation for file space: H5MF_try_shrink()");
/* Current VFD that does not support continuous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
@@ -8060,7 +8060,7 @@ test_page_try_shrink(const char *env_h5_drvr, hid_t fapl)
FAIL_STACK_ERROR;
/* Set the strategy to paged aggregation */
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)1) < 0)
FAIL_STACK_ERROR;
/* Create the file to work on */
@@ -8080,7 +8080,7 @@ test_page_try_shrink(const char *env_h5_drvr, hid_t fapl)
/* Couldn't shrink due to the section (remaining space in the page) is in the small metadata
* free-space manager */
- if (status == TRUE)
+ if (status == true)
TEST_ERROR;
/* Allocate a small raw data block with saddr1 */
@@ -8092,7 +8092,7 @@ test_page_try_shrink(const char *env_h5_drvr, hid_t fapl)
/* Couldn't shrink due to the section (remaining space in the page) is in the small raw data
* free-space manager */
- if (status == TRUE)
+ if (status == true)
TEST_ERROR;
/* Allocate a large data block with gaddr1 */
@@ -8104,7 +8104,7 @@ test_page_try_shrink(const char *env_h5_drvr, hid_t fapl)
/* Couldn't shrink due to the section (remaining space in the page) is in the large-sized free-space
* manager */
- if (status == TRUE)
+ if (status == true)
TEST_ERROR;
/* Free the block with saddr1--merge to become 1 page, then return to the large manager */
@@ -8132,7 +8132,7 @@ test_page_try_shrink(const char *env_h5_drvr, hid_t fapl)
}
else {
SKIPPED();
- HDputs(" Current VFD doesn't support paged aggregation");
+ puts(" Current VFD doesn't support paged aggregation");
}
return (0);
@@ -8163,20 +8163,20 @@ static unsigned
test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t fcpl = -1; /* File creation property list */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list */
H5F_t *f = NULL; /* Internal file object pointer */
haddr_t addr1, addr2, addr3; /* Addresses for small metadata blocks */
haddr_t saddr1; /* Address for small raw data block */
- hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
+ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */
htri_t was_extended; /* Whether the block can be extended or not */
char filename[FILENAME_LEN]; /* Filename to use */
TESTING("Paged aggregation for file space: H5MF_try_extend() a small block");
/* Current VFD that does not support continuous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
- HDstrcmp(env_h5_drvr, "family") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0 &&
+ strcmp(env_h5_drvr, "family") != 0);
if (contig_addr_vfd) {
@@ -8188,7 +8188,7 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
FAIL_STACK_ERROR;
/* Set the strategy to paged aggregation */
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)1) < 0)
FAIL_STACK_ERROR;
/* Create the file to work on */
@@ -8206,7 +8206,7 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
was_extended =
H5MF_try_extend(f, H5FD_MEM_OHDR, (haddr_t)addr1, (hsize_t)TBLOCK_SIZE98, (hsize_t)3100);
/* Should succeed */
- if (was_extended != TRUE)
+ if (was_extended != true)
TEST_ERROR;
/* Allocate 2 small metadata blocks with addr2 and addr3--will be on another metadata page */
@@ -8228,7 +8228,7 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
was_extended = H5MF_try_extend(f, H5FD_MEM_OHDR, (haddr_t)addr1, (hsize_t)TBLOCK_SIZE3198,
(hsize_t)TBLOCK_SIZE100);
/* Shouldn't succeed--should not cross page boundary */
- if (was_extended == TRUE)
+ if (was_extended == true)
TEST_ERROR;
/* Try extending the block with addr1 into the free-space section that is big enough to fulfill the
@@ -8236,7 +8236,7 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
was_extended = H5MF_try_extend(f, H5FD_MEM_OHDR, (haddr_t)addr1, (hsize_t)TBLOCK_SIZE3198,
(hsize_t)TBLOCK_SIZE50);
/* Should succeed */
- if (was_extended != TRUE)
+ if (was_extended != true)
TEST_ERROR;
/* Free the block with addr1 */
@@ -8251,14 +8251,14 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
was_extended = H5MF_try_extend(f, H5FD_MEM_OHDR, (haddr_t)addr1, (hsize_t)TBLOCK_SIZE3286,
(hsize_t)TBLOCK_SIZE11);
/* Shouldn't succeed */
- if (was_extended == TRUE)
+ if (was_extended == true)
TEST_ERROR;
/* Try extending the block into the threshold with size < H5F_FILE_SPACE_PGEND_META_THRES */
was_extended = H5MF_try_extend(f, H5FD_MEM_OHDR, (haddr_t)addr1, (hsize_t)TBLOCK_SIZE3286,
(hsize_t)TBLOCK_SIZE2);
/* Should succeed */
- if (was_extended != TRUE)
+ if (was_extended != true)
TEST_ERROR;
/* Free the block with addr3--will merge with the remaining sections to become a page and then free
@@ -8272,14 +8272,14 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
was_extended = H5MF_try_extend(f, H5FD_MEM_DRAW, (haddr_t)saddr1, (hsize_t)TBLOCK_SIZE4086,
(hsize_t)TBLOCK_SIZE11);
/* Shouldn't succeed */
- if (was_extended == TRUE)
+ if (was_extended == true)
TEST_ERROR;
/* Try extending the block not crossing page boundary */
was_extended = H5MF_try_extend(f, H5FD_MEM_DRAW, (haddr_t)saddr1, (hsize_t)TBLOCK_SIZE4086,
(hsize_t)TBLOCK_SIZE10);
/* Should succeed */
- if (was_extended != TRUE)
+ if (was_extended != true)
TEST_ERROR;
/* The extended block is now "large" in size */
@@ -8287,7 +8287,7 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
was_extended = H5MF_try_extend(f, H5FD_MEM_DRAW, (haddr_t)saddr1, (hsize_t)TBLOCK_SIZE4096,
(hsize_t)TBLOCK_SIZE10);
/* Should succeed */
- if (was_extended != TRUE)
+ if (was_extended != true)
TEST_ERROR;
/* Try extending the large-sized block */
@@ -8295,7 +8295,7 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
(hsize_t)TBLOCK_SIZE5000);
/* Should not succeed because the mis-aligned fragment in the page is in the large-sized free-space
* manager */
- if (was_extended == TRUE)
+ if (was_extended == true)
TEST_ERROR;
/* Close the file */
@@ -8310,7 +8310,7 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
}
else {
SKIPPED();
- HDputs(" Current VFD doesn't support paged aggregation");
+ puts(" Current VFD doesn't support paged aggregation");
}
return (0);
@@ -8341,18 +8341,18 @@ static unsigned
test_page_large_try_extend(const char *env_h5_drvr, hid_t fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t fcpl = -1; /* File creation property list */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list */
H5F_t *f = NULL; /* Internal file object pointer */
haddr_t gaddr1, gaddr2, gaddr3, gaddr4; /* Addresses for large data blocks */
- hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
+ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */
htri_t was_extended; /* Whether the block can be extended or not */
char filename[FILENAME_LEN]; /* Filename to use */
TESTING("Paged aggregation for file space: H5MF_try_extend() a large block");
/* Current VFD that does not support continuous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
@@ -8364,7 +8364,7 @@ test_page_large_try_extend(const char *env_h5_drvr, hid_t fapl)
FAIL_STACK_ERROR;
/* Set the strategy to paged aggregation */
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)1) < 0)
FAIL_STACK_ERROR;
/* Create the file to work on */
@@ -8386,7 +8386,7 @@ test_page_large_try_extend(const char *env_h5_drvr, hid_t fapl)
was_extended = H5MF_try_extend(f, H5FD_MEM_DRAW, (haddr_t)gaddr1, (hsize_t)TBLOCK_SIZE6000,
(hsize_t)TBLOCK_SIZE2192);
/* Should succeed */
- if (was_extended != TRUE)
+ if (was_extended != true)
TEST_ERROR;
/* Allocate a large data block with gaddr2 */
@@ -8399,7 +8399,7 @@ test_page_large_try_extend(const char *env_h5_drvr, hid_t fapl)
was_extended = H5MF_try_extend(f, H5FD_MEM_DRAW, (haddr_t)gaddr1, (hsize_t)TBLOCK_SIZE8192,
(hsize_t)TBLOCK_SIZE50);
/* Should not succeed */
- if (was_extended == TRUE)
+ if (was_extended == true)
TEST_ERROR;
/* Allocate a large data block with gaddr3 */
@@ -8413,7 +8413,7 @@ test_page_large_try_extend(const char *env_h5_drvr, hid_t fapl)
was_extended = H5MF_try_extend(f, H5FD_MEM_DRAW, (haddr_t)gaddr2, (hsize_t)TBLOCK_SIZE8000,
(hsize_t)TBLOCK_SIZE100);
/* Should succeed */
- if (was_extended == FALSE)
+ if (was_extended == false)
TEST_ERROR;
/* Try extending the block with gaddr2--there is no free-space section big enough to fulfill the
@@ -8421,7 +8421,7 @@ test_page_large_try_extend(const char *env_h5_drvr, hid_t fapl)
was_extended = H5MF_try_extend(f, H5FD_MEM_DRAW, (haddr_t)gaddr2, (hsize_t)TBLOCK_SIZE8100,
(hsize_t)TBLOCK_SIZE100);
/* Should not succeed */
- if (was_extended == TRUE)
+ if (was_extended == true)
TEST_ERROR;
/* Try extending the block with gaddr2--there is a free-space section big enough to fulfill the
@@ -8429,7 +8429,7 @@ test_page_large_try_extend(const char *env_h5_drvr, hid_t fapl)
was_extended = H5MF_try_extend(f, H5FD_MEM_DRAW, (haddr_t)gaddr2, (hsize_t)TBLOCK_SIZE8100,
(hsize_t)TBLOCK_SIZE90);
/* Should succeed */
- if (was_extended == FALSE)
+ if (was_extended == false)
TEST_ERROR;
/* Try extending the block with gaddr2 */
@@ -8438,7 +8438,7 @@ test_page_large_try_extend(const char *env_h5_drvr, hid_t fapl)
was_extended = H5MF_try_extend(f, H5FD_MEM_DRAW, (haddr_t)gaddr2, (hsize_t)TBLOCK_SIZE8190,
(hsize_t)TBLOCK_SIZE5);
/* Should not succeed */
- if (was_extended == TRUE)
+ if (was_extended == true)
TEST_ERROR;
/* Allocate a large data block with gaddr4 */
@@ -8456,7 +8456,7 @@ test_page_large_try_extend(const char *env_h5_drvr, hid_t fapl)
was_extended = H5MF_try_extend(f, H5FD_MEM_DRAW, (haddr_t)gaddr2, (hsize_t)TBLOCK_SIZE8190,
(hsize_t)TBLOCK_SIZE5);
/* Should succeed */
- if (was_extended == FALSE)
+ if (was_extended == false)
TEST_ERROR;
/* Close file */
@@ -8471,7 +8471,7 @@ test_page_large_try_extend(const char *env_h5_drvr, hid_t fapl)
}
else {
SKIPPED();
- HDputs(" Current VFD doesn't support paged aggregation strategy");
+ puts(" Current VFD doesn't support paged aggregation strategy");
}
return (0);
@@ -8502,11 +8502,11 @@ static unsigned
test_page_large(const char *env_h5_drvr, hid_t fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t fcpl = -1; /* File creation property list ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list ID */
H5F_t *f = NULL; /* Internal file object pointer */
haddr_t gaddr1, gaddr2, gaddr3, gaddr4; /* Addresses for blocks */
- hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
+ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */
H5FS_stat_t fs_stat; /* Information for free-space manager */
h5_stat_size_t file_size; /* File size */
char filename[FILENAME_LEN]; /* Filename to use */
@@ -8514,7 +8514,7 @@ test_page_large(const char *env_h5_drvr, hid_t fapl)
TESTING("Paged aggregation for file space: large allocations and de-allocations");
/* Current VFD that does not support continuous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
@@ -8526,7 +8526,7 @@ test_page_large(const char *env_h5_drvr, hid_t fapl)
FAIL_STACK_ERROR;
/* Set the strategy to paged aggregation */
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)1) < 0)
FAIL_STACK_ERROR;
/* Create the file to work on */
@@ -8625,7 +8625,7 @@ test_page_large(const char *env_h5_drvr, hid_t fapl)
}
else {
SKIPPED();
- HDputs(" Current VFD doesn't support paged aggregation strategy");
+ puts(" Current VFD doesn't support paged aggregation strategy");
}
return (0);
@@ -8654,24 +8654,24 @@ test_page_large(const char *env_h5_drvr, hid_t fapl)
static unsigned
test_page_small(const char *env_h5_drvr, hid_t fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t fcpl = -1; /* File creation property list */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list */
H5F_t *f = NULL; /* Internal file object pointer */
haddr_t addr2, addr3, addr4, addr5; /* Addresses for blocks */
haddr_t addr9, addr10, addr11; /* Address for small metadata blocks */
haddr_t saddr1, saddr2; /* Addresses for small raw data blocks */
H5FS_stat_t fs_stat; /* Information for free-space manager */
char filename[FILENAME_LEN]; /* Filename to use */
- hbool_t multi = FALSE, split = FALSE, family = FALSE;
+ bool multi = false, split = false, family = false;
TESTING("Paged aggregation for file space: small allocations and de-allocations");
- if (!HDstrcmp(env_h5_drvr, "split"))
- split = TRUE;
- else if (!HDstrcmp(env_h5_drvr, "multi"))
- multi = TRUE;
- else if (!HDstrcmp(env_h5_drvr, "family"))
- family = TRUE;
+ if (!strcmp(env_h5_drvr, "split"))
+ split = true;
+ else if (!strcmp(env_h5_drvr, "multi"))
+ multi = true;
+ else if (!strcmp(env_h5_drvr, "family"))
+ family = true;
if (!multi && !split) {
@@ -8683,7 +8683,7 @@ test_page_small(const char *env_h5_drvr, hid_t fapl)
FAIL_STACK_ERROR;
/* Set the strategy to paged aggregation */
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)1) < 0)
FAIL_STACK_ERROR;
/* Create the file to work on */
@@ -8794,7 +8794,7 @@ test_page_small(const char *env_h5_drvr, hid_t fapl)
}
else {
SKIPPED();
- HDputs(" Current VFD doesn't support paged aggregation strategy");
+ puts(" Current VFD doesn't support paged aggregation strategy");
}
return (0);
@@ -8825,24 +8825,24 @@ static unsigned
test_page_alignment(const char *env_h5_drvr, hid_t fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t fcpl = -1; /* File creation property list ID */
- hid_t fcpl2 = -1; /* File creation property list ID */
- hid_t fapl_new = -1; /* File access property list ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- haddr_t addr1, addr2; /* Addresses for small metadata blocks */
- haddr_t saddr1, saddr2; /* Addresses for small raw data blocks */
- haddr_t gaddr1, gaddr2; /* Addresses for blocks */
- char filename[FILENAME_LEN]; /* Filename to use */
- hbool_t split = FALSE, multi = FALSE;
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list ID */
+ hid_t fcpl2 = H5I_INVALID_HID; /* File creation property list ID */
+ hid_t fapl_new = H5I_INVALID_HID; /* File access property list ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ haddr_t addr1, addr2; /* Addresses for small metadata blocks */
+ haddr_t saddr1, saddr2; /* Addresses for small raw data blocks */
+ haddr_t gaddr1, gaddr2; /* Addresses for blocks */
+ char filename[FILENAME_LEN]; /* Filename to use */
+ bool split = false, multi = false;
TESTING("Paged aggregation and H5Pset_alignment: verify proper alignment is used");
/* Check for split or multi driver */
- if (!HDstrcmp(env_h5_drvr, "split"))
- split = TRUE;
- else if (!HDstrcmp(env_h5_drvr, "multi"))
- multi = TRUE;
+ if (!strcmp(env_h5_drvr, "split"))
+ split = true;
+ else if (!strcmp(env_h5_drvr, "multi"))
+ multi = true;
if (!multi && !split) {
@@ -8871,7 +8871,7 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
hid_t memb_fapl_arr[H5FD_MEM_NTYPES];
char *memb_name[H5FD_MEM_NTYPES];
haddr_t memb_addr[H5FD_MEM_NTYPES];
- hbool_t relax;
+ bool relax;
H5FD_mem_t mt;
/* Create fapl */
@@ -8939,7 +8939,7 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
/* Set the strategy to paged aggregation and persisting free space */
/* The alignment to use will be the library's default file space page size */
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, true, (hsize_t)1) < 0)
TEST_ERROR;
/* Create the file to work on */
@@ -9052,7 +9052,7 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR;
/* Set strategy to H5F_FSPACE_STRATEGY_AGGR but meta/raw data block is 0 as set in fapl_new */
- if (H5Pset_file_space_strategy(fcpl2, H5F_FSPACE_STRATEGY_AGGR, FALSE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl2, H5F_FSPACE_STRATEGY_AGGR, false, (hsize_t)1) < 0)
TEST_ERROR;
/* fapl_new has latest format, H5Pset_alignment set, and disable meta/raw block */
@@ -9106,7 +9106,7 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
}
else {
SKIPPED();
- HDputs(" Current VFD doesn't support persisting free-space or paged aggregation strategy");
+ puts(" Current VFD doesn't support persisting free-space or paged aggregation strategy");
}
return (0);
@@ -9126,15 +9126,15 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
int
main(void)
{
- hid_t fapl = -1; /* File access property list for data files */
- hid_t new_fapl = -1; /* File access property list for alignment & aggr setting */
- unsigned nerrors = 0; /* Cumulative error count */
- test_type_t curr_test; /* Current test being worked on */
- const char *env_h5_drvr; /* File Driver value from environment */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list for data files */
+ hid_t new_fapl = H5I_INVALID_HID; /* File access property list for alignment & aggr setting */
+ unsigned nerrors = 0; /* Cumulative error count */
+ test_type_t curr_test; /* Current test being worked on */
+ const char *env_h5_drvr; /* File Driver value from environment */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
/* Get the VFD to use */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
@@ -9145,7 +9145,7 @@ main(void)
/* Push API context */
if (H5CX_push() < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Make a copy of the FAPL before adjusting the alignment */
if ((new_fapl = H5Pcopy(fapl)) < 0)
@@ -9206,32 +9206,32 @@ main(void)
} /* end for */
/* For old and new format--interaction with temporary file space allocation */
- nerrors += test_mf_tmp(env_h5_drvr, fapl, FALSE);
- nerrors += test_mf_tmp(env_h5_drvr, fapl, TRUE);
+ nerrors += test_mf_tmp(env_h5_drvr, fapl, false);
+ nerrors += test_mf_tmp(env_h5_drvr, fapl, true);
/* For old and new format--free-space merge/shrunk away */
/* Temporary: modify to skip testing for multi/split driver:
fail file create when persisting free-space or using paged aggregation strategy */
- nerrors += test_mf_fs_gone(env_h5_drvr, fapl, FALSE);
- nerrors += test_mf_fs_gone(env_h5_drvr, fapl, TRUE);
+ nerrors += test_mf_fs_gone(env_h5_drvr, fapl, false);
+ nerrors += test_mf_fs_gone(env_h5_drvr, fapl, true);
/* Temporary: modify to skip testing multi/split driver:
fail file create when persisting free-space or using paged aggregation strategy */
- nerrors += test_mf_strat_thres_gone(env_h5_drvr, fapl, FALSE);
- nerrors += test_mf_strat_thres_gone(env_h5_drvr, fapl, TRUE);
+ nerrors += test_mf_strat_thres_gone(env_h5_drvr, fapl, false);
+ nerrors += test_mf_strat_thres_gone(env_h5_drvr, fapl, true);
/* For old and new format--persisting free-space */
/* Temporary: Modify to skip testing for multi/split driver:
fail file create when persisting free-space or using paged aggregation strategy */
- nerrors += test_mf_fs_persist(env_h5_drvr, fapl, FALSE);
- nerrors += test_mf_fs_persist(env_h5_drvr, fapl, TRUE);
+ nerrors += test_mf_fs_persist(env_h5_drvr, fapl, false);
+ nerrors += test_mf_fs_persist(env_h5_drvr, fapl, true);
/* Temporary: modify to skip testing for multi/split driver:
fail file create when persisting free-space or using paged aggregation strategy */
- nerrors += test_mf_strat_thres_persist(env_h5_drvr, fapl, FALSE);
- nerrors += test_mf_strat_thres_persist(env_h5_drvr, fapl, TRUE);
+ nerrors += test_mf_strat_thres_persist(env_h5_drvr, fapl, false);
+ nerrors += test_mf_strat_thres_persist(env_h5_drvr, fapl, true);
/* Temporary skipped for multi/split drivers:
fail file create when persisting free-space or using paged aggregation strategy */
@@ -9262,18 +9262,18 @@ main(void)
h5_cleanup(FILENAME, fapl);
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
if (nerrors)
goto error;
- HDputs("All free-space manager tests for file memory passed.");
+ puts("All free-space manager tests for file memory passed.");
return (0);
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
H5E_BEGIN_TRY
{
H5Pclose(fapl);
@@ -9282,7 +9282,7 @@ main(void)
H5E_END_TRY
if (api_ctx_pushed)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
return (1);
} /* main() */
diff --git a/test/mirror_vfd.c b/test/mirror_vfd.c
index e0068c05f27..f7f88deb1a9 100644
--- a/test/mirror_vfd.c
+++ b/test/mirror_vfd.c
@@ -115,7 +115,7 @@ static herr_t _close_chunking_ids(unsigned min_dset, unsigned max_dset, hid_t *d
hid_t *filespace_ids, hid_t *dataset_ids, hid_t *memspace_id);
static herr_t populate_filepath(const char *dirname, const char *_basename, hid_t fapl_id, char *path_out,
- hbool_t h5suffix);
+ bool h5suffix);
static hid_t create_mirroring_split_fapl(const char *_basename, struct mirrortest_filenames *names,
const struct mt_opts *opts);
@@ -125,15 +125,15 @@ static hid_t create_mirroring_split_fapl(const char *_basename, struct mirrortes
*
* Purpose: Given a directory name and a base name, concatenate the two and
* run h5fixname() to get the "actual" path to the intended target.
- * `h5suffix' should be FALSE to keep the base name unaltered;
- * TRUE will append the '.h5' h5suffix to the basename...
- * FALSE -> h5fixname_no_suffix(), TRUE -> h5fixname()
+ * `h5suffix' should be false to keep the base name unaltered;
+ * true will append the '.h5' h5suffix to the basename...
+ * false -> h5fixname_no_suffix(), true -> h5fixname()
* / /
*
* ----------------------------------------------------------------------------
*/
static herr_t
-populate_filepath(const char *dirname, const char *basename, hid_t fapl_id, char *path_out, hbool_t h5suffix)
+populate_filepath(const char *dirname, const char *basename, hid_t fapl_id, char *path_out, bool h5suffix)
{
char *path = NULL;
@@ -143,12 +143,12 @@ populate_filepath(const char *dirname, const char *basename, hid_t fapl_id, char
if (NULL == (path = calloc(H5FD_SPLITTER_PATH_MAX, sizeof(char))))
TEST_ERROR;
- if (HDsnprintf(path, H5FD_SPLITTER_PATH_MAX, "%s%s%s", dirname,
- (dirname[HDstrlen(dirname)] == '/') ? "" : "/", /* slash iff needed */
- basename) > H5FD_SPLITTER_PATH_MAX)
+ if (snprintf(path, H5FD_SPLITTER_PATH_MAX, "%s%s%s", dirname,
+ (dirname[strlen(dirname)] == '/') ? "" : "/", /* slash iff needed */
+ basename) > H5FD_SPLITTER_PATH_MAX)
TEST_ERROR;
- if (h5suffix == TRUE) {
+ if (h5suffix == true) {
if (h5_fixname(path, fapl_id, path_out, H5FD_SPLITTER_PATH_MAX) == NULL)
TEST_ERROR;
}
@@ -184,18 +184,18 @@ build_paths(const char *basename, H5FD_splitter_vfd_config_t *splitter_config,
if (NULL == (baselogname = calloc(H5FD_SPLITTER_PATH_MAX, sizeof(char))))
TEST_ERROR;
- if (populate_filepath(MIRROR_RW_DIR, basename, splitter_config->rw_fapl_id, names->rw, TRUE) < 0)
+ if (populate_filepath(MIRROR_RW_DIR, basename, splitter_config->rw_fapl_id, names->rw, true) < 0)
TEST_ERROR;
- if (populate_filepath(MIRROR_WO_DIR, basename, splitter_config->wo_fapl_id, names->wo, TRUE) < 0)
+ if (populate_filepath(MIRROR_WO_DIR, basename, splitter_config->wo_fapl_id, names->wo, true) < 0)
TEST_ERROR;
if (basename == NULL || *basename == 0)
TEST_ERROR;
- if (HDsnprintf(baselogname, H5FD_SPLITTER_PATH_MAX, "%s_err.log", basename) > H5FD_SPLITTER_PATH_MAX)
+ if (snprintf(baselogname, H5FD_SPLITTER_PATH_MAX, "%s_err.log", basename) > H5FD_SPLITTER_PATH_MAX)
TEST_ERROR;
- if (populate_filepath(MIRROR_WO_DIR, baselogname, splitter_config->wo_fapl_id, names->log, FALSE) < 0)
+ if (populate_filepath(MIRROR_WO_DIR, baselogname, splitter_config->wo_fapl_id, names->log, false) < 0)
TEST_ERROR;
free(baselogname);
@@ -248,7 +248,7 @@ test_fapl_configuration(void)
if (SERVER_HANDSHAKE_PORT != fa_out.handshake_port)
TEST_ERROR;
- if (HDstrncmp(SERVER_IP_ADDRESS, (const char *)fa_out.remote_ip, H5FD_MIRROR_MAX_IP_LEN))
+ if (strncmp(SERVER_IP_ADDRESS, (const char *)fa_out.remote_ip, H5FD_MIRROR_MAX_IP_LEN))
TEST_ERROR;
if (H5Pclose(fapl_id) < 0)
@@ -936,7 +936,7 @@ test_encdec_open(H5FD_mirror_xmit_t xmit_mock)
TEST_ERROR;
if (xmit_out->size_t_blob != xmit_in->size_t_blob)
TEST_ERROR;
- if (HDstrncmp(xmit_out->filename, xmit_in->filename, H5FD_MIRROR_XMIT_FILEPATH_MAX) != 0) {
+ if (strncmp(xmit_out->filename, xmit_in->filename, H5FD_MIRROR_XMIT_FILEPATH_MAX) != 0) {
PRINT_BUFFER_DIFF(xmit_out->filename, xmit_in->filename, H5FD_MIRROR_XMIT_FILEPATH_MAX);
TEST_ERROR;
}
@@ -965,7 +965,7 @@ test_encdec_open(H5FD_mirror_xmit_t xmit_mock)
/* Update expected "filepath" in structure */
for (size_t i = 0x20; i < H5FD_MIRROR_XMIT_FILEPATH_MAX + 0x20; i++)
xmit_in->filename[i - 0x20] = (i > 0xFF) ? 0 : (char)i;
- if (HDstrncmp(xmit_out->filename, xmit_in->filename, H5FD_MIRROR_XMIT_FILEPATH_MAX) != 0) {
+ if (strncmp(xmit_out->filename, xmit_in->filename, H5FD_MIRROR_XMIT_FILEPATH_MAX) != 0) {
PRINT_BUFFER_DIFF(xmit_out->filename, xmit_in->filename, H5FD_MIRROR_XMIT_FILEPATH_MAX);
TEST_ERROR;
}
@@ -1056,7 +1056,7 @@ test_encdec_reply(H5FD_mirror_xmit_t xmit_mock)
TEST_ERROR;
if (xmit_out.status != xmit_in.status)
TEST_ERROR;
- if (HDstrncmp(xmit_out.message, xmit_in.message, H5FD_MIRROR_STATUS_MESSAGE_MAX) != 0) {
+ if (strncmp(xmit_out.message, xmit_in.message, H5FD_MIRROR_STATUS_MESSAGE_MAX) != 0) {
PRINT_BUFFER_DIFF(xmit_out.message, xmit_in.message, H5FD_MIRROR_STATUS_MESSAGE_MAX);
TEST_ERROR;
}
@@ -1081,7 +1081,7 @@ test_encdec_reply(H5FD_mirror_xmit_t xmit_mock)
/* Update expected "message" in structure */
for (i = 0x10; i < H5FD_MIRROR_STATUS_MESSAGE_MAX + 0x10; i++)
xmit_in.message[i - 0x10] = (i > 0xFF) ? 0 : (char)i;
- if (HDstrncmp(xmit_out.message, xmit_in.message, H5FD_MIRROR_STATUS_MESSAGE_MAX) != 0) {
+ if (strncmp(xmit_out.message, xmit_in.message, H5FD_MIRROR_STATUS_MESSAGE_MAX) != 0) {
PRINT_BUFFER_DIFF(xmit_out.message, xmit_in.message, H5FD_MIRROR_STATUS_MESSAGE_MAX);
TEST_ERROR;
}
@@ -1217,7 +1217,7 @@ create_mirroring_split_fapl(const char *basename, struct mirrortest_filenames *n
*/
splitter_config->magic = H5FD_SPLITTER_MAGIC;
splitter_config->version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
- splitter_config->ignore_wo_errs = FALSE;
+ splitter_config->ignore_wo_errs = false;
splitter_config->rw_fapl_id = H5I_INVALID_HID;
splitter_config->wo_fapl_id = H5I_INVALID_HID;
@@ -1234,7 +1234,7 @@ create_mirroring_split_fapl(const char *basename, struct mirrortest_filenames *n
mirror_conf.magic = H5FD_MIRROR_FAPL_MAGIC;
mirror_conf.version = H5FD_MIRROR_CURR_FAPL_T_VERSION;
mirror_conf.handshake_port = opts->portno;
- if (HDstrncpy(mirror_conf.remote_ip, opts->ip, H5FD_MIRROR_MAX_IP_LEN) == NULL)
+ if (strncpy(mirror_conf.remote_ip, opts->ip, H5FD_MIRROR_MAX_IP_LEN) == NULL)
TEST_ERROR;
if ((splitter_config->wo_fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0)
TEST_ERROR;
@@ -1246,9 +1246,9 @@ create_mirroring_split_fapl(const char *basename, struct mirrortest_filenames *n
TEST_ERROR;
/* Set file paths for w/o and logfile */
- if (HDstrncpy(splitter_config->wo_path, (const char *)names->wo, H5FD_SPLITTER_PATH_MAX) == NULL)
+ if (strncpy(splitter_config->wo_path, (const char *)names->wo, H5FD_SPLITTER_PATH_MAX) == NULL)
TEST_ERROR;
- if (HDstrncpy(splitter_config->log_file_path, (const char *)names->log, H5FD_SPLITTER_PATH_MAX) == NULL)
+ if (strncpy(splitter_config->log_file_path, (const char *)names->log, H5FD_SPLITTER_PATH_MAX) == NULL)
TEST_ERROR;
/* Create Splitter FAPL */
@@ -1452,21 +1452,21 @@ _create_chunking_ids(hid_t file_id, unsigned min_dset, unsigned max_dset, hsize_
/* Create dataspace IDs */
for (unsigned m = min_dset; m <= max_dset; m++) {
if ((dataspace_ids[m] = H5Screate_simple(2, dset_dims, NULL)) < 0) {
- HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to create dataspace ID %d\n", m);
+ snprintf(mesg, MIRR_MESG_SIZE, "unable to create dataspace ID %d\n", m);
FAIL_PUTS_ERROR(mesg);
}
}
/* Create dataset IDs */
for (unsigned m = min_dset; m <= max_dset; m++) {
- if (HDsnprintf(dset_name, DSET_NAME_LEN, "/dset%03d", m) > DSET_NAME_LEN) {
- HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to compose dset name %d\n", m);
+ if (snprintf(dset_name, DSET_NAME_LEN, "/dset%03d", m) > DSET_NAME_LEN) {
+ snprintf(mesg, MIRR_MESG_SIZE, "unable to compose dset name %d\n", m);
FAIL_PUTS_ERROR(mesg);
}
if ((dataset_ids[m] = H5Dcreate2(file_id, dset_name, H5T_STD_I32BE, dataspace_ids[m], H5P_DEFAULT,
dcpl_id, H5P_DEFAULT)) < 0) {
- HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to create dset ID %d\n", m);
+ snprintf(mesg, MIRR_MESG_SIZE, "unable to create dset ID %d\n", m);
FAIL_PUTS_ERROR(mesg);
}
}
@@ -1474,7 +1474,7 @@ _create_chunking_ids(hid_t file_id, unsigned min_dset, unsigned max_dset, hsize_
/* Get file space IDs */
for (unsigned m = min_dset; m <= max_dset; m++) {
if ((filespace_ids[m] = H5Dget_space(dataset_ids[m])) < 0) {
- HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to create filespace ID %d\n", m);
+ snprintf(mesg, MIRR_MESG_SIZE, "unable to create filespace ID %d\n", m);
FAIL_PUTS_ERROR(mesg);
}
}
@@ -1522,13 +1522,13 @@ _open_chunking_ids(hid_t file_id, unsigned min_dset, unsigned max_dset, hsize_t
/* Open dataset IDs */
for (unsigned m = min_dset; m <= max_dset; m++) {
- if (HDsnprintf(dset_name, DSET_NAME_LEN, "/dset%03d", m) > DSET_NAME_LEN) {
- HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to compose dset name %d\n", m);
+ if (snprintf(dset_name, DSET_NAME_LEN, "/dset%03d", m) > DSET_NAME_LEN) {
+ snprintf(mesg, MIRR_MESG_SIZE, "unable to compose dset name %d\n", m);
FAIL_PUTS_ERROR(mesg);
}
if ((dataset_ids[m] = H5Dopen2(file_id, dset_name, H5P_DEFAULT)) < 0) {
- HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to open dset ID %d\n", m);
+ snprintf(mesg, MIRR_MESG_SIZE, "unable to open dset ID %d\n", m);
FAIL_PUTS_ERROR(mesg);
}
}
@@ -1536,7 +1536,7 @@ _open_chunking_ids(hid_t file_id, unsigned min_dset, unsigned max_dset, hsize_t
/* Open filespace IDs */
for (unsigned m = min_dset; m <= max_dset; m++) {
if ((filespace_ids[m] = H5Dget_space(dataset_ids[m])) < 0) {
- HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to get filespace ID %d\n", m);
+ snprintf(mesg, MIRR_MESG_SIZE, "unable to get filespace ID %d\n", m);
FAIL_PUTS_ERROR(mesg);
}
}
@@ -1575,16 +1575,16 @@ _close_chunking_ids(unsigned min_dset, unsigned max_dset, hid_t *dataspace_ids,
LOGPRINT(3, "closing ids[%d]\n", m);
if (dataspace_ids) {
if (H5Sclose(dataspace_ids[m]) < 0) {
- HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to close dataspace_id[%d]\n", m);
+ snprintf(mesg, MIRR_MESG_SIZE, "unable to close dataspace_id[%d]\n", m);
FAIL_PUTS_ERROR(mesg);
}
}
if (H5Dclose(dataset_ids[m]) < 0) {
- HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to close dataset_id[%d]\n", m);
+ snprintf(mesg, MIRR_MESG_SIZE, "unable to close dataset_id[%d]\n", m);
FAIL_PUTS_ERROR(mesg);
}
if (H5Sclose(filespace_ids[m]) < 0) {
- HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to close filespace_id[%d]\n", m);
+ snprintf(mesg, MIRR_MESG_SIZE, "unable to close filespace_id[%d]\n", m);
FAIL_PUTS_ERROR(mesg);
}
}
@@ -1635,7 +1635,7 @@ _verify_datasets(unsigned min_dset, unsigned max_dset, hid_t *filespace_ids, hid
if (H5Dread(dataset_ids[m], H5T_NATIVE_INT, memspace_id, filespace_ids[m], H5P_DEFAULT,
data_chunk) < 0) {
- HDsnprintf(mesg, MIRR_MESG_SIZE, " H5Dread() [%d][%d][%d]\n", i, j, m);
+ snprintf(mesg, MIRR_MESG_SIZE, " H5Dread() [%d][%d][%d]\n", i, j, m);
FAIL_PUTS_ERROR(mesg);
}
@@ -1643,8 +1643,8 @@ _verify_datasets(unsigned min_dset, unsigned max_dset, hid_t *filespace_ids, hid
for (l = 0; l < CHUNK_DIM; l++) {
if ((unsigned)data_chunk[k][l] !=
((DSET_DIM * DSET_DIM * m) + (DSET_DIM * (i + k)) + j + l)) {
- HDsnprintf(mesg, MIRR_MESG_SIZE, " MISMATCH [%d][%d][%d][%d][%d]\n", i, j, m,
- k, l);
+ snprintf(mesg, MIRR_MESG_SIZE, " MISMATCH [%d][%d][%d][%d][%d]\n", i, j, m,
+ k, l);
FAIL_PUTS_ERROR(mesg);
}
}
@@ -2059,7 +2059,7 @@ test_vanishing_datasets(const struct mt_opts *opts)
/* Delete datasets */
if (i >= max_at_one_time) {
- if (HDsnprintf(namebuf, DSET_NAME_LEN, "/dset%02d", (i - max_at_one_time)) > DSET_NAME_LEN)
+ if (snprintf(namebuf, DSET_NAME_LEN, "/dset%02d", (i - max_at_one_time)) > DSET_NAME_LEN)
TEST_ERROR;
if (H5Ldelete(file_id, namebuf, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -2067,7 +2067,7 @@ test_vanishing_datasets(const struct mt_opts *opts)
/* Write to datasets */
if (i < (max_loops - max_at_one_time)) {
- if (HDsnprintf(namebuf, DSET_NAME_LEN, "/dset%02d", i) > DSET_NAME_LEN)
+ if (snprintf(namebuf, DSET_NAME_LEN, "/dset%02d", i) > DSET_NAME_LEN)
TEST_ERROR;
if ((dset_id = H5Dcreate2(file_id, namebuf, H5T_STD_U32LE, dspace_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
@@ -2191,7 +2191,7 @@ test_concurrent_access(const struct mt_opts *opts)
char name[16] = "";
hid_t fapl_id = H5I_INVALID_HID;
- HDsnprintf(name, 15, "concurrent%d", i);
+ snprintf(name, 15, "concurrent%d", i);
if ((fapl_id = create_mirroring_split_fapl(name, &bundle[i].names, opts)) < 0)
TEST_ERROR;
bundle[i].fapl_id = fapl_id;
@@ -2296,12 +2296,12 @@ parse_args(int argc, char **argv, struct mt_opts *opts)
int i = 0;
opts->portno = SERVER_HANDSHAKE_PORT;
- HDstrncpy(opts->ip, SERVER_IP_ADDRESS, H5FD_MIRROR_MAX_IP_LEN);
+ strncpy(opts->ip, SERVER_IP_ADDRESS, H5FD_MIRROR_MAX_IP_LEN);
for (i = 1; i < argc; i++) { /* start with first possible option argument */
- if (!HDstrncmp(argv[i], "--ip=", 5))
- HDstrncpy(opts->ip, argv[i] + 5, H5FD_MIRROR_MAX_IP_LEN);
- else if (!HDstrncmp(argv[i], "--port=", 7))
+ if (!strncmp(argv[i], "--ip=", 5))
+ strncpy(opts->ip, argv[i] + 5, H5FD_MIRROR_MAX_IP_LEN);
+ else if (!strncmp(argv[i], "--port=", 7))
opts->portno = atoi(argv[i] + 7);
else {
printf("Unrecognized option: '%s'\n", argv[i]);
@@ -2310,8 +2310,8 @@ parse_args(int argc, char **argv, struct mt_opts *opts)
} /* end for each argument from command line */
/* Auto-replace 'localhost' with numeric IP */
- if (!HDstrncmp(opts->ip, "localhost", 10)) /* include NUL terminator */
- HDstrncpy(opts->ip, "127.0.0.1", H5FD_MIRROR_MAX_IP_LEN);
+ if (!strncmp(opts->ip, "localhost", 10)) /* include NUL terminator */
+ strncpy(opts->ip, "127.0.0.1", H5FD_MIRROR_MAX_IP_LEN);
return 0;
} /* end parse_args() */
@@ -2346,7 +2346,7 @@ confirm_server(struct mt_opts *opts)
while (1) {
if (connect(live_socket, (struct sockaddr *)&target_addr, (socklen_t)sizeof(target_addr)) < 0) {
if (attempt > 10) {
- printf("ERROR connect() (%d)\n%s\n", errno, HDstrerror(errno));
+ printf("ERROR connect() (%d)\n%s\n", errno, strerror(errno));
return -1;
}
@@ -2359,7 +2359,7 @@ confirm_server(struct mt_opts *opts)
attempt++;
HDsleep(1);
- printf("attempt #%u: ERROR connect() (%d)\n%s\n", attempt, errno, HDstrerror(errno));
+ printf("attempt #%u: ERROR connect() (%d)\n%s\n", attempt, errno, strerror(errno));
/* Re-open socket for retry */
live_socket = socket(AF_INET, SOCK_STREAM, 0);
@@ -2374,7 +2374,7 @@ confirm_server(struct mt_opts *opts)
/* Request confirmation from the server */
if (HDwrite(live_socket, "CONFIRM", 8) == -1) {
- printf("ERROR write() (%d)\n%s\n", errno, HDstrerror(errno));
+ printf("ERROR write() (%d)\n%s\n", errno, strerror(errno));
return -1;
}
@@ -2383,7 +2383,7 @@ confirm_server(struct mt_opts *opts)
printf("ERROR read() can't receive data\n");
return -1;
}
- if (HDstrncmp("ALIVE", mybuf, 6)) {
+ if (strncmp("ALIVE", mybuf, 6)) {
printf("ERROR read() didn't receive data from server\n");
return -1;
}
diff --git a/test/mount.c b/test/mount.c
index e418b255e8b..bc619b1b62b 100644
--- a/test/mount.c
+++ b/test/mount.c
@@ -41,7 +41,7 @@ static int bm[NX][NY]; /* Data buffers */
static int
setup(hid_t fapl)
{
- hid_t file = -1;
+ hid_t file = H5I_INVALID_HID;
char filename[1024];
/* file 1 */
@@ -111,7 +111,7 @@ setup(hid_t fapl)
static int
test_basic(hid_t fapl)
{
- hid_t file1 = -1, file2 = -1, grp = -1;
+ hid_t file1 = H5I_INVALID_HID, file2 = H5I_INVALID_HID, grp = H5I_INVALID_HID;
char filename1[1024], filename2[1024];
TESTING("basic functionality");
@@ -162,7 +162,8 @@ test_basic(hid_t fapl)
static int
test_illegal(hid_t fapl)
{
- hid_t file1 = -1, file1b = -1, file2 = -1, file3 = -1, file3b = -1, mnt = -1;
+ hid_t file1 = H5I_INVALID_HID, file1b = H5I_INVALID_HID, file2 = H5I_INVALID_HID, file3 = H5I_INVALID_HID,
+ file3b = H5I_INVALID_HID, mnt = H5I_INVALID_HID;
char filename1[1024], filename2[1024], filename3[1024];
herr_t status;
@@ -189,7 +190,7 @@ test_illegal(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Mounting a file on itself should have failed.");
+ puts(" Mounting a file on itself should have failed.");
TEST_ERROR;
} /* end if */
@@ -209,7 +210,7 @@ test_illegal(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Mounting two files at one mount point should have failed.");
+ puts(" Mounting two files at one mount point should have failed.");
TEST_ERROR;
} /* end if */
if (H5Funmount(mnt, ".") < 0)
@@ -234,7 +235,7 @@ test_illegal(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Mounting same file opened twice at one mount point should have failed.");
+ puts(" Mounting same file opened twice at one mount point should have failed.");
TEST_ERROR;
} /* end if */
if (H5Funmount(mnt, ".") < 0)
@@ -252,7 +253,7 @@ test_illegal(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Creating a cycle with mount points should have failed.");
+ puts(" Creating a cycle with mount points should have failed.");
TEST_ERROR;
} /* end if */
if (H5Funmount(file1, "/mnt1") < 0)
@@ -301,8 +302,9 @@ test_illegal(hid_t fapl)
static int
test_samefile(hid_t fapl)
{
- hid_t file1a = -1, file1b = -1, file2 = -1, file3 = -1;
- hid_t mnt1a = -1, mnt1b = -1;
+ hid_t file1a = H5I_INVALID_HID, file1b = H5I_INVALID_HID, file2 = H5I_INVALID_HID,
+ file3 = H5I_INVALID_HID;
+ hid_t mnt1a = H5I_INVALID_HID, mnt1b = H5I_INVALID_HID;
char filename1[1024], filename2[1024], filename3[1024];
H5G_info_t grp_info;
herr_t status;
@@ -443,10 +445,10 @@ test_samefile(hid_t fapl)
static int
test_hide(hid_t fapl)
{
- hid_t file1 = -1, file2 = -1, grp = -1;
+ hid_t file1 = H5I_INVALID_HID, file2 = H5I_INVALID_HID, grp = H5I_INVALID_HID;
H5O_info2_t oi1, oi2;
char filename1[1024], filename2[1024];
- hbool_t same_obj;
+ bool same_obj;
TESTING("name hiding under mount point");
h5_fixname(FILENAME[0], fapl, filename1, sizeof(filename1));
@@ -472,7 +474,7 @@ test_hide(hid_t fapl)
H5E_END_TRY
if (grp >= 0) {
H5_FAILED();
- HDputs(" Name is still accessible under mount point.");
+ puts(" Name is still accessible under mount point.");
TEST_ERROR;
}
@@ -483,21 +485,21 @@ test_hide(hid_t fapl)
if (H5Oget_info_by_name3(file1, "/file1", &oi2, H5O_INFO_BASIC, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- same_obj = TRUE;
+ same_obj = true;
if (oi1.fileno == oi2.fileno) {
int token_cmp;
if (H5Otoken_cmp(file1, &oi1.token, &oi2.token, &token_cmp) < 0)
FAIL_STACK_ERROR;
if (token_cmp)
- same_obj = FALSE;
+ same_obj = false;
}
else
- same_obj = FALSE;
+ same_obj = false;
if (!same_obj) {
H5_FAILED();
- HDputs(" Hard link failed for hidden object.");
+ puts(" Hard link failed for hidden object.");
TEST_ERROR;
}
@@ -538,10 +540,10 @@ test_hide(hid_t fapl)
static int
test_assoc(hid_t fapl)
{
- hid_t file1 = -1, file2 = -1;
+ hid_t file1 = H5I_INVALID_HID, file2 = H5I_INVALID_HID;
H5O_info2_t oi1, oi2;
char filename1[1024], filename2[1024];
- hbool_t same_obj;
+ bool same_obj;
TESTING("mount point open");
h5_fixname(FILENAME[0], fapl, filename1, sizeof filename1);
@@ -567,21 +569,21 @@ test_assoc(hid_t fapl)
if (H5Oget_info_by_name3(file1, "/mnt1", &oi2, H5O_INFO_BASIC, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- same_obj = TRUE;
+ same_obj = true;
if (oi1.fileno == oi2.fileno) {
int token_cmp;
if (H5Otoken_cmp(file1, &oi1.token, &oi2.token, &token_cmp) < 0)
FAIL_STACK_ERROR;
if (token_cmp)
- same_obj = FALSE;
+ same_obj = false;
}
else
- same_obj = FALSE;
+ same_obj = false;
if (!same_obj) {
H5_FAILED();
- HDputs(" Association failed.");
+ puts(" Association failed.");
TEST_ERROR;
} /* end if */
@@ -622,7 +624,7 @@ test_assoc(hid_t fapl)
static int
test_mntlnk(hid_t fapl)
{
- hid_t file1 = -1, file2 = -1, grp = -1;
+ hid_t file1 = H5I_INVALID_HID, file2 = H5I_INVALID_HID, grp = H5I_INVALID_HID;
char filename1[1024], filename2[1024];
TESTING("multi-linked mount point");
@@ -687,7 +689,7 @@ test_mntlnk(hid_t fapl)
static int
test_move(hid_t fapl)
{
- hid_t file1 = -1, file2 = -1;
+ hid_t file1 = H5I_INVALID_HID, file2 = H5I_INVALID_HID;
herr_t status;
char filename1[1024], filename2[1024];
@@ -712,7 +714,7 @@ test_move(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Moving an object across files shouldn't have been possible");
+ puts(" Moving an object across files shouldn't have been possible");
TEST_ERROR;
} /* end if */
@@ -752,7 +754,7 @@ test_move(hid_t fapl)
static int
test_preopen(hid_t fapl)
{
- hid_t file1 = -1, file2 = -1, grp = -1;
+ hid_t file1 = H5I_INVALID_HID, file2 = H5I_INVALID_HID, grp = H5I_INVALID_HID;
H5O_info2_t oinfo;
char filename1[1024], filename2[1024];
@@ -817,7 +819,7 @@ static int
test_postopen(hid_t fapl)
{
- hid_t file1 = -1, file2 = -1, grp = -1;
+ hid_t file1 = H5I_INVALID_HID, file2 = H5I_INVALID_HID, grp = H5I_INVALID_HID;
H5O_info2_t oinfo;
char filename1[1024], filename2[1024];
@@ -886,7 +888,7 @@ test_postopen(hid_t fapl)
static int
test_unlink(hid_t fapl)
{
- hid_t file1 = -1, file2 = -1, mnt = -1, root = -1;
+ hid_t file1 = H5I_INVALID_HID, file2 = H5I_INVALID_HID, mnt = H5I_INVALID_HID, root = H5I_INVALID_HID;
H5O_info2_t oinfo;
char filename1[1024], filename2[1024];
herr_t status;
@@ -933,7 +935,7 @@ test_unlink(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Incorrect traversal from mount point!");
+ puts(" Incorrect traversal from mount point!");
TEST_ERROR;
} /* end if */
@@ -954,7 +956,7 @@ test_unlink(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Traversal through mount point should not have worked!");
+ puts(" Traversal through mount point should not have worked!");
TEST_ERROR;
} /* end if */
H5E_BEGIN_TRY
@@ -964,7 +966,7 @@ test_unlink(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Traversal through mount point should not have worked!");
+ puts(" Traversal through mount point should not have worked!");
TEST_ERROR;
} /* end if */
@@ -1035,7 +1037,7 @@ test_unlink(hid_t fapl)
static int
test_mvmpt(hid_t fapl)
{
- hid_t file1 = -1, file2 = -1;
+ hid_t file1 = H5I_INVALID_HID, file2 = H5I_INVALID_HID;
H5O_info2_t oinfo;
char filename1[1024], filename2[1024];
@@ -1093,9 +1095,9 @@ test_mvmpt(hid_t fapl)
static int
test_interlink(hid_t fapl)
{
- hid_t file1 = -1, file2 = -1;
+ hid_t file1 = H5I_INVALID_HID, file2 = H5I_INVALID_HID;
#ifdef NOT_NOW
- hid_t type = -1, space = -1, dset = -1;
+ hid_t type = H5I_INVALID_HID, space = H5I_INVALID_HID, dset = H5I_INVALID_HID;
hsize_t cur_dims[1] = {2};
#endif /* NOT_NOW */
char filename1[1024], filename2[1024];
@@ -1120,7 +1122,7 @@ test_interlink(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Interfile hard link should not have been allowed!");
+ puts(" Interfile hard link should not have been allowed!");
TEST_ERROR;
} /* end if */
@@ -1132,7 +1134,7 @@ test_interlink(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Interfile renaming should not have been allowed!");
+ puts(" Interfile renaming should not have been allowed!");
TEST_ERROR;
} /* end if */
@@ -1155,7 +1157,7 @@ test_interlink(hid_t fapl)
H5E_END_TRY
if (dset >= 0) {
H5_FAILED();
- HDputs(" Dataset and shared type must be in the same file!");
+ puts(" Dataset and shared type must be in the same file!");
TEST_ERROR;
} /* end if */
@@ -1166,7 +1168,7 @@ test_interlink(hid_t fapl)
FAIL_STACK_ERROR;
#else /* NOT_NOW */
SKIPPED();
- HDputs(" Test skipped due file pointer sharing issue (Jira 7638).");
+ puts(" Test skipped due file pointer sharing issue (Jira 7638).");
#endif /* NOT_NOW */
/* Shut down */
@@ -1210,7 +1212,7 @@ test_interlink(hid_t fapl)
static int
test_uniformity(hid_t fapl)
{
- hid_t file1 = -1, file2 = -1;
+ hid_t file1 = H5I_INVALID_HID, file2 = H5I_INVALID_HID;
H5O_info2_t oinfo;
char filename1[1024], filename2[1024];
@@ -1284,7 +1286,7 @@ test_uniformity(hid_t fapl)
static int
test_close(hid_t fapl)
{
- hid_t file1 = -1, file2 = -1;
+ hid_t file1 = H5I_INVALID_HID, file2 = H5I_INVALID_HID;
H5O_info2_t oinfo;
char filename1[1024], filename2[1024];
@@ -1307,7 +1309,7 @@ test_close(hid_t fapl)
FAIL_STACK_ERROR;
if (H5Oget_info_by_name3(file2, "/mnt1", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDputs(" File1 contents are not accessible!");
+ puts(" File1 contents are not accessible!");
TEST_ERROR;
} /* end if */
if (H5Fclose(file2) < 0)
@@ -1369,15 +1371,17 @@ test_close(hid_t fapl)
static int
test_mount_after_close(hid_t fapl)
{
- hid_t fid1 = -1, fid2 = -1; /* File IDs */
- hid_t gidA = -1, gidAB = -1, gidABM = -1, gidX = -1, gidXY = -1; /* Group identifiers */
- hid_t gidABMX = -1, gidABC = -1, gidABT = -1; /* Group IDs for testing */
- hid_t didABMXYD = -1; /* Dataset ID for testing */
- hid_t did = -1, sid = -1; /* Dataset and dataspace identifiers */
- char filename1[1024], filename2[1024]; /* Name of files to mount */
- char objname[NAME_BUF_SIZE]; /* Name of object opened */
- hsize_t dims[] = {NX, NY}; /* Dataset dimensions */
- int i, j; /* Local index variable */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File IDs */
+ hid_t gidA = H5I_INVALID_HID, gidAB = H5I_INVALID_HID, gidABM = H5I_INVALID_HID, gidX = H5I_INVALID_HID,
+ gidXY = H5I_INVALID_HID; /* Group identifiers */
+ hid_t gidABMX = H5I_INVALID_HID, gidABC = H5I_INVALID_HID,
+ gidABT = H5I_INVALID_HID; /* Group IDs for testing */
+ hid_t didABMXYD = H5I_INVALID_HID; /* Dataset ID for testing */
+ hid_t did = H5I_INVALID_HID, sid = H5I_INVALID_HID; /* Dataset and dataspace identifiers */
+ char filename1[1024], filename2[1024]; /* Name of files to mount */
+ char objname[NAME_BUF_SIZE]; /* Name of object opened */
+ hsize_t dims[] = {NX, NY}; /* Dataset dimensions */
+ int i, j; /* Local index variable */
TESTING("mounting on group after file is closed");
h5_fixname(FILENAME[0], fapl, filename1, sizeof filename1);
@@ -1502,7 +1506,7 @@ test_mount_after_close(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidABMX, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(objname, "/A/B/M/X") != 0)
+ if (strcmp(objname, "/A/B/M/X") != 0)
TEST_ERROR;
/* Close object in mounted file */
@@ -1517,7 +1521,7 @@ test_mount_after_close(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidABC, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(objname, "/A/B/C") != 0)
+ if (strcmp(objname, "/A/B/C") != 0)
TEST_ERROR;
/* Close object in mounted file */
@@ -1532,7 +1536,7 @@ test_mount_after_close(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidABT, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(objname, "/A/B/T") != 0)
+ if (strcmp(objname, "/A/B/T") != 0)
TEST_ERROR;
/* Close object in original file */
@@ -1547,7 +1551,7 @@ test_mount_after_close(hid_t fapl)
*objname = '\0';
if (H5Iget_name(didABMXYD, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(objname, "/A/B/M/X/Y/D") != 0)
+ if (strcmp(objname, "/A/B/M/X/Y/D") != 0)
TEST_ERROR;
/* Close object in mounted file */
@@ -1599,16 +1603,18 @@ test_mount_after_close(hid_t fapl)
static int
test_mount_after_unmount(hid_t fapl)
{
- hid_t fid1 = -1, fid2 = -1, fid3 = -1, fid4 = -1; /* File IDs */
- hid_t gidA = -1, gidB = -1, gidX = -1, gidY = -1, gidZ = -1; /* Group identifiers */
- hid_t gidBM = -1; /* Group identifiers */
- hid_t gidBMZ = -1; /* Group identifiers */
- hid_t gidAM = -1; /* Group identifiers */
- hid_t gidAMX = -1; /* Group identifiers */
- hid_t gidAMXX = -1; /* Group identifiers */
- hid_t gidAMXMY = -1; /* Group identifiers */
- hid_t gidXM = -1; /* Group identifiers */
- hid_t gidXX = -1; /* Group identifiers */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID, fid3 = H5I_INVALID_HID,
+ fid4 = H5I_INVALID_HID; /* File IDs */
+ hid_t gidA = H5I_INVALID_HID, gidB = H5I_INVALID_HID, gidX = H5I_INVALID_HID, gidY = H5I_INVALID_HID,
+ gidZ = H5I_INVALID_HID; /* Group identifiers */
+ hid_t gidBM = H5I_INVALID_HID; /* Group identifiers */
+ hid_t gidBMZ = H5I_INVALID_HID; /* Group identifiers */
+ hid_t gidAM = H5I_INVALID_HID; /* Group identifiers */
+ hid_t gidAMX = H5I_INVALID_HID; /* Group identifiers */
+ hid_t gidAMXX = H5I_INVALID_HID; /* Group identifiers */
+ hid_t gidAMXMY = H5I_INVALID_HID; /* Group identifiers */
+ hid_t gidXM = H5I_INVALID_HID; /* Group identifiers */
+ hid_t gidXX = H5I_INVALID_HID; /* Group identifiers */
char filename1[1024], filename2[1024], filename3[1024], filename4[1024]; /* Name of files to mount */
char objname[NAME_BUF_SIZE]; /* Name of object opened */
@@ -1715,7 +1721,7 @@ test_mount_after_unmount(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidAMXX, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/A/M/X/X") != 0)
+ if (strcmp(objname, "/A/M/X/X") != 0)
TEST_ERROR;
/* Open group in mounted file #2 */
@@ -1735,7 +1741,7 @@ test_mount_after_unmount(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidAMXMY, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/A/M/X/M/Y") != 0)
+ if (strcmp(objname, "/A/M/X/M/Y") != 0)
TEST_ERROR;
/* Unmount second file */
@@ -1746,7 +1752,7 @@ test_mount_after_unmount(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidAMXMY, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/X/M/Y") != 0)
+ if (strcmp(objname, "/X/M/Y") != 0)
TEST_ERROR;
/* Rename object in file #3 that is "disconnected" from name hierarchy */
@@ -1766,7 +1772,7 @@ test_mount_after_unmount(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidAMXMY, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/X/M/Z") != 0)
+ if (strcmp(objname, "/X/M/Z") != 0)
TEST_ERROR;
/* Mount fourth file */
@@ -1782,7 +1788,7 @@ test_mount_after_unmount(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidBMZ, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/B/M/Z") != 0)
+ if (strcmp(objname, "/B/M/Z") != 0)
TEST_ERROR;
/* Unmount third file */
@@ -1863,10 +1869,10 @@ test_mount_after_unmount(hid_t fapl)
static int
test_missing_unmount(hid_t fapl)
{
- hid_t fid1 = -1, fid2 = -1, fid3 = -1; /* File IDs */
- hid_t gidA = -1, gidE = -1, gidM = -1; /* Group IDs */
- hid_t gidAE = -1, gidAEM = -1; /* Group IDs */
- char filename1[1024], filename2[1024], filename3[1024]; /* Name of files to mount */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID, fid3 = H5I_INVALID_HID; /* File IDs */
+ hid_t gidA = H5I_INVALID_HID, gidE = H5I_INVALID_HID, gidM = H5I_INVALID_HID; /* Group IDs */
+ hid_t gidAE = H5I_INVALID_HID, gidAEM = H5I_INVALID_HID; /* Group IDs */
+ char filename1[1024], filename2[1024], filename3[1024]; /* Name of files to mount */
TESTING("missing unmount");
@@ -2010,8 +2016,8 @@ test_missing_unmount(hid_t fapl)
static int
test_hold_open_file(hid_t fapl)
{
- hid_t fid1 = -1, fid2 = -1; /* File IDs */
- hid_t gidA = -1, gidM = -1, gidAM = -1; /* Group IDs */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File IDs */
+ hid_t gidA = H5I_INVALID_HID, gidM = H5I_INVALID_HID, gidAM = H5I_INVALID_HID; /* Group IDs */
char filename1[1024], filename2[1024]; /* Name of files to mount */
TESTING("hold open w/file");
@@ -2135,9 +2141,10 @@ test_hold_open_file(hid_t fapl)
static int
test_hold_open_group(hid_t fapl)
{
- hid_t fid1 = -1, fid2 = -1; /* File IDs */
- hid_t gid = -1, gidA = -1, gidM = -1, gidAM = -1, gidAM2 = -1; /* Group IDs */
- char filename1[1024], filename2[1024]; /* Name of files to mount */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File IDs */
+ hid_t gid = H5I_INVALID_HID, gidA = H5I_INVALID_HID, gidM = H5I_INVALID_HID, gidAM = H5I_INVALID_HID,
+ gidAM2 = H5I_INVALID_HID; /* Group IDs */
+ char filename1[1024], filename2[1024]; /* Name of files to mount */
TESTING("hold open w/group");
@@ -2286,10 +2293,10 @@ test_hold_open_group(hid_t fapl)
static int
test_fcdegree_same(hid_t fapl)
{
- hid_t fid1 = -1, fid2 = -1; /* File IDs */
- hid_t gidA = -1, gidM = -1, gidAM = -1; /* Group IDs */
- hid_t fapl_id = -1; /* FAPL IDs */
- herr_t ret; /* Generic return value */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File IDs */
+ hid_t gidA = H5I_INVALID_HID, gidM = H5I_INVALID_HID, gidAM = H5I_INVALID_HID; /* Group IDs */
+ hid_t fapl_id = H5I_INVALID_HID; /* FAPL IDs */
+ herr_t ret; /* Generic return value */
char filename1[1024], filename2[1024]; /* Name of files to mount */
TESTING("file close degrees must be same");
@@ -2425,10 +2432,10 @@ test_fcdegree_same(hid_t fapl)
static int
test_fcdegree_semi(hid_t fapl)
{
- hid_t fid1 = -1, fid2 = -1; /* File IDs */
- hid_t gidA = -1, gidM = -1, gidAM = -1; /* Group IDs */
- hid_t fapl_id = -1; /* FAPL IDs */
- herr_t ret; /* Generic return value */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File IDs */
+ hid_t gidA = H5I_INVALID_HID, gidM = H5I_INVALID_HID, gidAM = H5I_INVALID_HID; /* Group IDs */
+ hid_t fapl_id = H5I_INVALID_HID; /* FAPL IDs */
+ herr_t ret; /* Generic return value */
char filename1[1024], filename2[1024]; /* Name of files to mount */
TESTING("'semi' file close degree");
@@ -2563,9 +2570,9 @@ test_fcdegree_semi(hid_t fapl)
static int
test_fcdegree_strong(hid_t fapl)
{
- hid_t fid1 = -1, fid2 = -1; /* File IDs */
- hid_t gidA = -1, gidM = -1, gidAM = -1; /* Group IDs */
- hid_t fapl_id = -1; /* FAPL IDs */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File IDs */
+ hid_t gidA = H5I_INVALID_HID, gidM = H5I_INVALID_HID, gidAM = H5I_INVALID_HID; /* Group IDs */
+ hid_t fapl_id = H5I_INVALID_HID; /* FAPL IDs */
H5O_info2_t oinfo;
char filename1[1024], filename2[1024]; /* Name of files to mount */
herr_t ret; /* Generic return value */
@@ -2700,9 +2707,10 @@ test_fcdegree_strong(hid_t fapl)
static int
test_acc_perm(hid_t fapl)
{
- hid_t fid1 = -1, fid2 = -1, fid3 = -1; /* File IDs */
- hid_t gidA = -1, gidB = -1, gidC = -1, gidM = -1, gidAM = -1, gidAMZ = -1; /* Group IDs */
- hid_t bad_id = -1; /* Bad ID from object create */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID, fid3 = H5I_INVALID_HID; /* File IDs */
+ hid_t gidA = H5I_INVALID_HID, gidB = H5I_INVALID_HID, gidC = H5I_INVALID_HID, gidM = H5I_INVALID_HID,
+ gidAM = H5I_INVALID_HID, gidAMZ = H5I_INVALID_HID; /* Group IDs */
+ hid_t bad_id = H5I_INVALID_HID; /* Bad ID from object create */
char name[NAME_BUF_SIZE]; /* Buffer for filename retrieved */
char filename1[1024], filename2[1024], filename3[1024]; /* Name of files to mount */
@@ -2748,7 +2756,7 @@ test_acc_perm(hid_t fapl)
/* Get and verify file name */
if (H5Fget_name(gidA, name, NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(name, filename1) != 0)
+ if (strcmp(name, filename1) != 0)
TEST_ERROR;
if ((fid2 = H5Fopen(filename2, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
@@ -2757,7 +2765,7 @@ test_acc_perm(hid_t fapl)
/* Get and verify file name */
if (H5Fget_name(fid2, name, NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(name, filename2) != 0)
+ if (strcmp(name, filename2) != 0)
TEST_ERROR;
/* Mount files together */
@@ -2767,7 +2775,7 @@ test_acc_perm(hid_t fapl)
/* Get and verify file name */
if (H5Fget_name(fid2, name, NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(name, filename2) != 0)
+ if (strcmp(name, filename2) != 0)
TEST_ERROR;
/* Open group in mounted file */
@@ -2777,7 +2785,7 @@ test_acc_perm(hid_t fapl)
/* Get and verify file name */
if (H5Fget_name(gidAM, name, NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(name, filename2) != 0)
+ if (strcmp(name, filename2) != 0)
TEST_ERROR;
/* Attempt to create objects in read only file (should fail) */
@@ -2823,7 +2831,7 @@ test_acc_perm(hid_t fapl)
/* Get and verify file name */
if (H5Fget_name(gidAMZ, name, NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(name, filename3) != 0)
+ if (strcmp(name, filename3) != 0)
TEST_ERROR;
/* Close object in file #3 */
@@ -2899,12 +2907,14 @@ test_acc_perm(hid_t fapl)
static int
test_mult_mount(hid_t fapl)
{
- hid_t fid1 = -1, fid2 = -1, fid3 = -1, fid3_2 = -1; /* File IDs */
- hid_t gidA = -1, gidB = -1; /* Group IDs in file #1 */
- hid_t gidM = -1, gidN = -1, gidAM = -1; /* Group IDs in file #2 */
- hid_t gidS = -1, gidT = -1, gidU = -1, gidBS = -1, gidAMT = -1; /* Group IDs in file #3 */
- char name[NAME_BUF_SIZE]; /* Buffer for filename retrieved */
- char filename1[1024], filename2[1024], filename3[1024]; /* Name of files to mount */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID, fid3 = H5I_INVALID_HID,
+ fid3_2 = H5I_INVALID_HID; /* File IDs */
+ hid_t gidA = H5I_INVALID_HID, gidB = H5I_INVALID_HID; /* Group IDs in file #1 */
+ hid_t gidM = H5I_INVALID_HID, gidN = H5I_INVALID_HID, gidAM = H5I_INVALID_HID; /* Group IDs in file #2 */
+ hid_t gidS = H5I_INVALID_HID, gidT = H5I_INVALID_HID, gidU = H5I_INVALID_HID, gidBS = H5I_INVALID_HID,
+ gidAMT = H5I_INVALID_HID; /* Group IDs in file #3 */
+ char name[NAME_BUF_SIZE]; /* Buffer for filename retrieved */
+ char filename1[1024], filename2[1024], filename3[1024]; /* Name of files to mount */
TESTING("multiple mounts");
@@ -3014,7 +3024,7 @@ test_mult_mount(hid_t fapl)
*name = '\0';
if (H5Iget_name(gidAMT, name, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(name, "/A/M/T") != 0)
+ if (strcmp(name, "/A/M/T") != 0)
TEST_ERROR;
/* Create object in file #3 */
@@ -3032,7 +3042,7 @@ test_mult_mount(hid_t fapl)
*name = '\0';
if (H5Iget_name(gidBS, name, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(name, "/B/S") != 0)
+ if (strcmp(name, "/B/S") != 0)
TEST_ERROR;
/* Re-open object created in file #3 through file #1 mount path */
@@ -3117,10 +3127,11 @@ test_mult_mount(hid_t fapl)
static int
test_nested_survive(hid_t fapl)
{
- hid_t fid1 = -1, fid2 = -1, fid3 = -1; /* File IDs */
- hid_t gidA = -1; /* Group IDs in file #1 */
- hid_t gidM = -1, gidAM = -1; /* Group IDs in file #2 */
- hid_t gidS = -1, gidMS = -1, gidAMS = -1; /* Group IDs in file #3 */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID, fid3 = H5I_INVALID_HID; /* File IDs */
+ hid_t gidA = H5I_INVALID_HID; /* Group IDs in file #1 */
+ hid_t gidM = H5I_INVALID_HID, gidAM = H5I_INVALID_HID; /* Group IDs in file #2 */
+ hid_t gidS = H5I_INVALID_HID, gidMS = H5I_INVALID_HID,
+ gidAMS = H5I_INVALID_HID; /* Group IDs in file #3 */
char name[NAME_BUF_SIZE]; /* Buffer for filename retrieved */
ssize_t name_len; /* Filename length */
char filename1[1024], filename2[1024], filename3[1024]; /* Name of files to mount */
@@ -3208,7 +3219,7 @@ test_nested_survive(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidAM, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len == 0 || HDstrcmp(name, "/A/M") != 0)
+ if (name_len == 0 || strcmp(name, "/A/M") != 0)
TEST_ERROR;
/* Unmount file #2 from file #1 */
@@ -3219,7 +3230,7 @@ test_nested_survive(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidAM, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len != 0 || HDstrcmp(name, "") != 0)
+ if (name_len != 0 || strcmp(name, "") != 0)
TEST_ERROR;
/* Open object in file #3 through file #1 mount path (should fail) */
@@ -3239,7 +3250,7 @@ test_nested_survive(hid_t fapl)
*name = '\0';
if (H5Iget_name(gidMS, name, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(name, "/M/S") != 0)
+ if (strcmp(name, "/M/S") != 0)
TEST_ERROR;
/* Close group in file #3 */
@@ -3258,7 +3269,7 @@ test_nested_survive(hid_t fapl)
*name = '\0';
if (H5Iget_name(gidAMS, name, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(name, "/A/M/S") != 0)
+ if (strcmp(name, "/A/M/S") != 0)
TEST_ERROR;
/* Close group in file #3 */
@@ -3325,12 +3336,12 @@ test_nested_survive(hid_t fapl)
static int
test_close_parent(hid_t fapl)
{
- hid_t fid1 = -1, fid2 = -1; /* File IDs */
- hid_t gidA = -1; /* Group IDs in file #1 */
- hid_t gidM = -1; /* Group IDs in file #2 */
- char name[NAME_BUF_SIZE]; /* Buffer for filename retrieved */
- ssize_t name_len; /* Filename length */
- char filename1[1024], filename2[1024]; /* Name of files to mount */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File IDs */
+ hid_t gidA = H5I_INVALID_HID; /* Group IDs in file #1 */
+ hid_t gidM = H5I_INVALID_HID; /* Group IDs in file #2 */
+ char name[NAME_BUF_SIZE]; /* Buffer for filename retrieved */
+ ssize_t name_len; /* Filename length */
+ char filename1[1024], filename2[1024]; /* Name of files to mount */
TESTING("close parent");
@@ -3402,7 +3413,7 @@ test_close_parent(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidM, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len == 0 || HDstrcmp(name, "/A/M") != 0)
+ if (name_len == 0 || strcmp(name, "/A/M") != 0)
TEST_ERROR;
/* Unmount file #2 from file #1, closing file #1 */
@@ -3413,7 +3424,7 @@ test_close_parent(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidM, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len == 0 || HDstrcmp(name, "/M") != 0)
+ if (name_len == 0 || strcmp(name, "/M") != 0)
TEST_ERROR;
/* Just file #2's underlying shared file should be open still */
@@ -3491,17 +3502,18 @@ test_close_parent(hid_t fapl)
static int
test_cut_graph(hid_t fapl)
{
- hid_t fid1 = -1, fid2 = -1, fid3 = -1, fid4 = -1, fid5 = -1, fid6 = -1, fid7 = -1; /* File IDs */
- hid_t gidA = -1, gidB = -1; /* Group IDs in file #1 */
- hid_t gidD = -1, gidE = -1; /* Group IDs in file #2 */
- hid_t gidH = -1, gidI = -1; /* Group IDs in file #3 */
- hid_t gidK = -1; /* Group IDs in file #4 */
- hid_t gidM = -1; /* Group IDs in file #5 */
- hid_t gidO = -1; /* Group IDs in file #6 */
- hid_t gidQ = -1; /* Group IDs in file #7 */
- char name[NAME_BUF_SIZE]; /* Buffer for filename retrieved */
- ssize_t name_len; /* Filename length */
- ssize_t obj_count; /* Number of objects open */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID, fid3 = H5I_INVALID_HID, fid4 = H5I_INVALID_HID,
+ fid5 = H5I_INVALID_HID, fid6 = H5I_INVALID_HID, fid7 = H5I_INVALID_HID; /* File IDs */
+ hid_t gidA = H5I_INVALID_HID, gidB = H5I_INVALID_HID; /* Group IDs in file #1 */
+ hid_t gidD = H5I_INVALID_HID, gidE = H5I_INVALID_HID; /* Group IDs in file #2 */
+ hid_t gidH = H5I_INVALID_HID, gidI = H5I_INVALID_HID; /* Group IDs in file #3 */
+ hid_t gidK = H5I_INVALID_HID; /* Group IDs in file #4 */
+ hid_t gidM = H5I_INVALID_HID; /* Group IDs in file #5 */
+ hid_t gidO = H5I_INVALID_HID; /* Group IDs in file #6 */
+ hid_t gidQ = H5I_INVALID_HID; /* Group IDs in file #7 */
+ char name[NAME_BUF_SIZE]; /* Buffer for filename retrieved */
+ ssize_t name_len; /* Filename length */
+ ssize_t obj_count; /* Number of objects open */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE],
filename4[NAME_BUF_SIZE], filename5[NAME_BUF_SIZE], filename6[NAME_BUF_SIZE],
filename7[NAME_BUF_SIZE]; /* Name of files to mount */
@@ -3675,7 +3687,7 @@ test_cut_graph(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidM, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len == 0 || HDstrcmp(name, "/A/E/M") != 0)
+ if (name_len == 0 || strcmp(name, "/A/E/M") != 0)
TEST_ERROR;
/* Open object in file #7 */
@@ -3686,7 +3698,7 @@ test_cut_graph(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidQ, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len == 0 || HDstrcmp(name, "/B/I/Q") != 0)
+ if (name_len == 0 || strcmp(name, "/B/I/Q") != 0)
TEST_ERROR;
/* Close file #1 */
@@ -3746,7 +3758,7 @@ test_cut_graph(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidK, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len == 0 || HDstrcmp(name, "/D/K") != 0)
+ if (name_len == 0 || strcmp(name, "/D/K") != 0)
TEST_ERROR;
if (H5Gclose(gidK) < 0)
@@ -3769,7 +3781,7 @@ test_cut_graph(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidO, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len == 0 || HDstrcmp(name, "/B/H/O") != 0)
+ if (name_len == 0 || strcmp(name, "/B/H/O") != 0)
TEST_ERROR;
if (H5Gclose(gidO) < 0)
@@ -3779,14 +3791,14 @@ test_cut_graph(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidM, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len == 0 || HDstrcmp(name, "/E/M") != 0)
+ if (name_len == 0 || strcmp(name, "/E/M") != 0)
TEST_ERROR;
/* Check the name of "Q" is still defined */
*name = '\0';
if ((name_len = H5Iget_name(gidQ, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len == 0 || HDstrcmp(name, "/B/I/Q") != 0)
+ if (name_len == 0 || strcmp(name, "/B/I/Q") != 0)
TEST_ERROR;
/* Check that all seven underlying files are still opened */
@@ -3811,7 +3823,7 @@ test_cut_graph(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidQ, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len == 0 || HDstrcmp(name, "/I/Q") != 0)
+ if (name_len == 0 || strcmp(name, "/I/Q") != 0)
TEST_ERROR;
/* Open object in file #6 from file #7 */
@@ -3822,7 +3834,7 @@ test_cut_graph(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidO, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len == 0 || HDstrcmp(name, "/H/O") != 0)
+ if (name_len == 0 || strcmp(name, "/H/O") != 0)
TEST_ERROR;
if (H5Gclose(gidO) < 0)
@@ -3878,13 +3890,13 @@ test_cut_graph(hid_t fapl)
static int
test_symlink(hid_t fapl)
{
- hid_t fid1 = -1, fid2 = -1, fid3 = -1; /* File IDs */
- hid_t gidA = -1, gidB = -1; /* Group IDs in file #1 */
- hid_t gidD = -1, gidE = -1; /* Group IDs in file #2 */
- hid_t gidH = -1, gidI = -1; /* Group IDs in file #3 */
- hid_t gidL = -1; /* Group IDs through soft link to file #3 */
- char name[NAME_BUF_SIZE]; /* Buffer for filename retrieved */
- ssize_t name_len; /* Filename length */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID, fid3 = H5I_INVALID_HID; /* File IDs */
+ hid_t gidA = H5I_INVALID_HID, gidB = H5I_INVALID_HID; /* Group IDs in file #1 */
+ hid_t gidD = H5I_INVALID_HID, gidE = H5I_INVALID_HID; /* Group IDs in file #2 */
+ hid_t gidH = H5I_INVALID_HID, gidI = H5I_INVALID_HID; /* Group IDs in file #3 */
+ hid_t gidL = H5I_INVALID_HID; /* Group IDs through soft link to file #3 */
+ char name[NAME_BUF_SIZE]; /* Buffer for filename retrieved */
+ ssize_t name_len; /* Filename length */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE],
filename3[NAME_BUF_SIZE]; /* Name of files to mount */
@@ -3986,7 +3998,7 @@ test_symlink(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidL, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len == 0 || HDstrcmp(name, "/L") != 0)
+ if (name_len == 0 || strcmp(name, "/L") != 0)
TEST_ERROR;
/* Close file #1 */
@@ -4038,8 +4050,9 @@ test_symlink(hid_t fapl)
static int
test_sharedacc(hid_t fapl)
{
- hid_t fid1[2] = {-1, -1}, fid2[2] = {-1, -1}; /* File IDs */
- hid_t gid = -1;
+ hid_t fid1[2] = {H5I_INVALID_HID, H5I_INVALID_HID},
+ fid2[2] = {H5I_INVALID_HID, H5I_INVALID_HID}; /* File IDs */
+ hid_t gid = H5I_INVALID_HID;
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE],
filename3[NAME_BUF_SIZE]; /* Name of files to mount */
int i, j, k; /* Counters */
@@ -4139,8 +4152,8 @@ test_sharedacc(hid_t fapl)
static int
test_sharedclose(hid_t fapl)
{
- hid_t fid1a = -1, fid1b = -1, fid2 = -1, fid3 = -2; /* File IDs */
- hid_t gid1 = -1, gid2 = -1, gid3 = -1;
+ hid_t fid1a = H5I_INVALID_HID, fid1b = H5I_INVALID_HID, fid2 = H5I_INVALID_HID, fid3 = -2; /* File IDs */
+ hid_t gid1 = H5I_INVALID_HID, gid2 = H5I_INVALID_HID, gid3 = H5I_INVALID_HID;
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE],
filename3[NAME_BUF_SIZE]; /* Name of files to mount */
@@ -4293,8 +4306,8 @@ test_sharedclose(hid_t fapl)
static int
test_multisharedclose(hid_t fapl)
{
- hid_t fid1 = -1, fid2 = -1; /* File IDs */
- hid_t gid1 = -1, gid2 = -1, gid3 = -1;
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File IDs */
+ hid_t gid1 = H5I_INVALID_HID, gid2 = H5I_INVALID_HID, gid3 = H5I_INVALID_HID;
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE],
filename4[NAME_BUF_SIZE]; /* Name of files to mount */
@@ -4443,7 +4456,7 @@ int
main(void)
{
int nerrors = 0;
- hid_t fapl = -1;
+ hid_t fapl = H5I_INVALID_HID;
h5_reset();
fapl = h5_fileaccess();
@@ -4488,12 +4501,12 @@ main(void)
if (nerrors)
goto error;
- HDputs("All mount tests passed.");
+ puts("All mount tests passed.");
h5_cleanup(FILENAME, fapl);
return 0;
error:
- HDputs("***** MOUNT ERRORS *****");
+ puts("***** MOUNT ERRORS *****");
return 1;
}
diff --git a/test/mtime.c b/test/mtime.c
index 11668c8969a..60bfaaaadc7 100644
--- a/test/mtime.c
+++ b/test/mtime.c
@@ -46,7 +46,7 @@ main(void)
signed char buf1[32], buf2[32];
char filename[1024];
int token_cmp;
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
h5_reset();
fapl = h5_fileaccess();
@@ -96,26 +96,26 @@ main(void)
/* Compare object tokens & times from the two ways of calling H5Oget_info() */
if (token_cmp || oi1.ctime != oi2.ctime) {
H5_FAILED();
- HDputs(" Calling H5Oget_info() with the dataset ID returned");
- HDputs(" different values than calling it with a file and dataset");
- HDputs(" name.");
+ puts(" Calling H5Oget_info() with the dataset ID returned");
+ puts(" different values than calling it with a file and dataset");
+ puts(" name.");
goto error;
}
/* Compare times -- they must be within 60 seconds of one another */
if (0 == oi1.ctime) {
SKIPPED();
- HDputs(" The modification time could not be decoded on this OS.");
- HDputs(" Modification times will be maintained in the file but");
- HDputs(" cannot be queried on this system. See H5O_mtime_decode().");
+ puts(" The modification time could not be decoded on this OS.");
+ puts(" Modification times will be maintained in the file but");
+ puts(" cannot be queried on this system. See H5O_mtime_decode().");
return 0;
}
- else if (HDfabs(HDdifftime(now, oi1.ctime)) > 60.0) {
+ else if (fabs(HDdifftime(now, oi1.ctime)) > 60.0) {
H5_FAILED();
tm = HDlocaltime(&(oi1.ctime));
- HDstrftime((char *)buf1, sizeof buf1, "%Y-%m-%d %H:%M:%S", tm);
+ strftime((char *)buf1, sizeof buf1, "%Y-%m-%d %H:%M:%S", tm);
tm = HDlocaltime(&now);
- HDstrftime((char *)buf2, sizeof buf2, "%Y-%m-%d %H:%M:%S", tm);
+ strftime((char *)buf2, sizeof buf2, "%Y-%m-%d %H:%M:%S", tm);
printf(" got: %s\n ans: %s\n", buf1, buf2);
goto error;
}
@@ -138,7 +138,7 @@ main(void)
H5_FAILED();
/* If this fails, examine H5Omtime.c. Modification time is very
* system dependent (e.g., on Windows DST must be hardcoded). */
- HDputs(" Old modification time incorrect");
+ puts(" Old modification time incorrect");
goto error;
}
if (H5Fclose(file) < 0)
@@ -168,7 +168,7 @@ main(void)
TEST_ERROR;
if (oi2.ctime != MTIME2) {
H5_FAILED();
- HDputs(" Modification time incorrect.");
+ puts(" Modification time incorrect.");
goto error;
}
if (H5Fclose(file) < 0)
@@ -188,7 +188,7 @@ main(void)
TEST_ERROR;
/* All looks good */
- HDputs("All modification time tests passed.");
+ puts("All modification time tests passed.");
h5_cleanup(FILENAME, fapl);
return EXIT_SUCCESS;
diff --git a/test/ntypes.c b/test/ntypes.c
index 99ac1511dec..f36a6006c11 100644
--- a/test/ntypes.c
+++ b/test/ntypes.c
@@ -62,8 +62,8 @@ static const char *FILENAME[] = {"ntypes", NULL};
static herr_t
test_atomic_dtype(hid_t file)
{
- hid_t dataset = -1, space = -1;
- hid_t dtype = -1, native_type = -1;
+ hid_t dataset = H5I_INVALID_HID, space = H5I_INVALID_HID;
+ hid_t dtype = H5I_INVALID_HID, native_type = H5I_INVALID_HID;
int i, j, n;
hsize_t dims[2];
void *tmp = NULL;
@@ -319,8 +319,9 @@ test_compound_dtype2(hid_t file)
s2 st;
unsigned long long l;
} s1;
- hid_t dataset = -1, space = -1;
- hid_t dtype = -1, native_type = -1, tid = -1, tid2 = -1, tid_m = -1, tid_m2 = -1, mem_id = -1,
+ hid_t dataset = H5I_INVALID_HID, space = H5I_INVALID_HID;
+ hid_t dtype = H5I_INVALID_HID, native_type = H5I_INVALID_HID, tid = H5I_INVALID_HID,
+ tid2 = H5I_INVALID_HID, tid_m = H5I_INVALID_HID, tid_m2 = H5I_INVALID_HID, mem_id = H5I_INVALID_HID,
nest_mem_id = -1;
int i, j, n;
hsize_t dims[2];
@@ -445,7 +446,7 @@ test_compound_dtype2(hid_t file)
if ((native_type = H5Tget_native_type(dtype, H5T_DIR_DEFAULT)) < 0)
TEST_ERROR;
- if (H5Tequal(native_type, tid_m) != TRUE)
+ if (H5Tequal(native_type, tid_m) != true)
TEST_ERROR;
/* Verify the datatype of each field retrieved and converted */
@@ -629,8 +630,9 @@ test_compound_dtype(hid_t file)
unsigned int i;
long long l;
} s1;
- hid_t dataset = -1, space = -1;
- hid_t dtype = -1, native_type = -1, tid = -1, tid2 = -1, mem_id = -1;
+ hid_t dataset = H5I_INVALID_HID, space = H5I_INVALID_HID;
+ hid_t dtype = H5I_INVALID_HID, native_type = H5I_INVALID_HID, tid = H5I_INVALID_HID,
+ tid2 = H5I_INVALID_HID, mem_id = H5I_INVALID_HID;
int i, j, n;
hsize_t dims[2];
s1 *temp_point = NULL;
@@ -711,7 +713,7 @@ test_compound_dtype(hid_t file)
if ((native_type = H5Tget_native_type(dtype, H5T_DIR_DEFAULT)) < 0)
TEST_ERROR;
- if (H5Tequal(native_type, tid2) != TRUE)
+ if (H5Tequal(native_type, tid2) != true)
TEST_ERROR;
/* Verify the datatype of each field retrieved and converted */
@@ -837,8 +839,9 @@ test_compound_dtype3(hid_t file)
int a[5];
long long l;
} s1;
- hid_t dataset = -1, space = -1;
- hid_t dtype = -1, native_type = -1, tid = -1, tid2 = -1, tid_m = -1, tid_m2 = -1, mem_id = -1,
+ hid_t dataset = H5I_INVALID_HID, space = H5I_INVALID_HID;
+ hid_t dtype = H5I_INVALID_HID, native_type = H5I_INVALID_HID, tid = H5I_INVALID_HID,
+ tid2 = H5I_INVALID_HID, tid_m = H5I_INVALID_HID, tid_m2 = H5I_INVALID_HID, mem_id = H5I_INVALID_HID,
nest_mem_id = -1;
hsize_t array_dims[1] = {5};
int i, j, k, n;
@@ -1073,8 +1076,9 @@ test_compound_opaque(hid_t file)
unsigned char o[5];
long long l;
} s1;
- hid_t dataset = -1, space = -1;
- hid_t dtype = -1, native_type = -1, tid = -1, tid2 = -1, tid_m = -1, mem_id = -1;
+ hid_t dataset = H5I_INVALID_HID, space = H5I_INVALID_HID;
+ hid_t dtype = H5I_INVALID_HID, native_type = H5I_INVALID_HID, tid = H5I_INVALID_HID,
+ tid2 = H5I_INVALID_HID, tid_m = H5I_INVALID_HID, mem_id = H5I_INVALID_HID;
int i, j, k, n;
hsize_t dims[2];
s1 *temp_point = NULL, *temp_check = NULL;
@@ -1290,8 +1294,9 @@ test_compound_opaque(hid_t file)
static herr_t
test_enum_dtype(hid_t file)
{
- hid_t dataset = -1, space = -1;
- hid_t tid = -1, tid_m = -1, dtype = -1, native_type = -1;
+ hid_t dataset = H5I_INVALID_HID, space = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID, tid_m = H5I_INVALID_HID, dtype = H5I_INVALID_HID,
+ native_type = H5I_INVALID_HID;
int i, j, n;
hsize_t dims[2];
void *tmp = NULL;
@@ -1449,8 +1454,9 @@ test_array_dtype(hid_t file)
int i;
long long l;
} s1;
- hid_t dataset = -1, space = -1;
- hid_t dtype = -1, native_type = -1, tid = -1, tid2 = -1, tid3 = -1, tid_m = -1;
+ hid_t dataset = H5I_INVALID_HID, space = H5I_INVALID_HID;
+ hid_t dtype = H5I_INVALID_HID, native_type = H5I_INVALID_HID, tid = H5I_INVALID_HID,
+ tid2 = H5I_INVALID_HID, tid3 = H5I_INVALID_HID, tid_m = H5I_INVALID_HID;
int i, j, k, n;
hsize_t space_dims[2], array_dims[1] = {5};
s1 *temp_point = NULL, *temp_check = NULL;
@@ -1627,8 +1633,9 @@ test_array_dtype(hid_t file)
static herr_t
test_array_dtype2(hid_t file)
{
- hid_t dataset = -1, space = -1;
- hid_t dtype = -1, native_type = -1, tid = -1, tid_m = -1;
+ hid_t dataset = H5I_INVALID_HID, space = H5I_INVALID_HID;
+ hid_t dtype = H5I_INVALID_HID, native_type = H5I_INVALID_HID, tid = H5I_INVALID_HID,
+ tid_m = H5I_INVALID_HID;
int i, j, k, n;
hsize_t space_dims[2], array_dims[1] = {5};
void *tmp = NULL;
@@ -1778,10 +1785,11 @@ test_vl_dtype(hid_t file)
hvl_t rdata[SPACE1_DIM1]; /* Information read in */
hvl_t *t1, *t2; /* Temporary pointer to VL information */
hsize_t dims1[] = {SPACE1_DIM1};
- hid_t dataset = -1, space = -1;
- hid_t dtype = -1, native_type = -1, nat_super_type = -1, tid = -1, tid2 = -1, tid_m = -1, tid_m2 = -1;
- size_t i, j, k;
- void **tmp = NULL;
+ hid_t dataset = H5I_INVALID_HID, space = H5I_INVALID_HID;
+ hid_t dtype = H5I_INVALID_HID, native_type = H5I_INVALID_HID, nat_super_type = H5I_INVALID_HID,
+ tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID, tid_m = H5I_INVALID_HID, tid_m2 = H5I_INVALID_HID;
+ size_t i, j, k;
+ void **tmp = NULL;
TESTING("variable length datatype");
@@ -1981,11 +1989,11 @@ test_vlstr_dtype(hid_t file)
"conceived in liberty and dedicated to the proposition that all men are created equal.",
"Now we are engaged in a great civil war,",
"testing whether that nation or any nation so conceived and so dedicated can long endure."};
- char *rdata[SPACE1_DIM1]; /* Information read in */
- hbool_t rdata_alloc = FALSE; /* Whether the read data is allocated */
- hid_t dataset = -1; /* Dataset ID */
- hid_t sid1 = -1; /* Dataspace ID */
- hid_t tid1 = -1, dtype = -1, native_type = -1; /* Datatype ID */
+ char *rdata[SPACE1_DIM1]; /* Information read in */
+ bool rdata_alloc = false; /* Whether the read data is allocated */
+ hid_t dataset = H5I_INVALID_HID; /* Dataset ID */
+ hid_t sid1 = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t tid1 = H5I_INVALID_HID, dtype = H5I_INVALID_HID, native_type = H5I_INVALID_HID; /* Datatype ID */
hsize_t dims1[] = {SPACE1_DIM1};
unsigned i; /* counting variable */
@@ -2036,17 +2044,17 @@ test_vlstr_dtype(hid_t file)
/* Read dataset from disk */
if (H5Dread(dataset, native_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata) < 0)
TEST_ERROR;
- rdata_alloc = TRUE;
+ rdata_alloc = true;
/* Compare data read in */
for (i = 0; i < SPACE1_DIM1; i++) {
- if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
+ if (strlen(wdata[i]) != strlen(rdata[i])) {
H5_FAILED();
printf(" VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i,
- (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
goto error;
} /* end if */
- if (HDstrcmp(wdata[i], rdata[i]) != 0) {
+ if (strcmp(wdata[i], rdata[i]) != 0) {
H5_FAILED();
printf(" VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n", (int)i, wdata[i], (int)i,
rdata[i]);
@@ -2071,7 +2079,7 @@ test_vlstr_dtype(hid_t file)
/* Free memory for rdata */
for (i = 0; i < SPACE1_DIM1; i++)
free(rdata[i]);
- rdata_alloc = FALSE;
+ rdata_alloc = false;
PASSED();
return 0;
@@ -2112,11 +2120,11 @@ test_str_dtype(hid_t file)
{
const char wdata[SPACE1_DIM1][4] = {"one", "two", "3rd", "4th"}; /* Information to write */
char rdata[SPACE1_DIM1][4]; /* Information read in */
- hid_t dataset = -1; /* Dataset ID */
- hid_t sid1 = -1; /* Dataspace ID */
- hid_t tid1 = -1, dtype = -1, native_type = -1; /* Datatype ID */
- hsize_t dims1[] = {SPACE1_DIM1};
- unsigned i; /* counting variable */
+ hid_t dataset = H5I_INVALID_HID; /* Dataset ID */
+ hid_t sid1 = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t tid1 = H5I_INVALID_HID, dtype = H5I_INVALID_HID, native_type = H5I_INVALID_HID; /* Datatype ID */
+ hsize_t dims1[] = {SPACE1_DIM1};
+ unsigned i; /* counting variable */
/* Output message about test being performed */
TESTING("fixed-length string datatype");
@@ -2168,13 +2176,13 @@ test_str_dtype(hid_t file)
/* Compare data read in */
for (i = 0; i < SPACE1_DIM1; i++) {
- if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
+ if (strlen(wdata[i]) != strlen(rdata[i])) {
H5_FAILED();
printf(" data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i,
- (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
goto error;
} /* end if */
- if (HDstrcmp(wdata[i], rdata[i]) != 0) {
+ if (strcmp(wdata[i], rdata[i]) != 0) {
H5_FAILED();
printf(" data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n", (int)i, wdata[i], (int)i,
rdata[i]);
@@ -2234,10 +2242,10 @@ test_refer_dtype(hid_t file)
float c;
} s1_t;
- hid_t dataset = -1; /* Dataset ID */
- hid_t group = -1; /* Group ID */
- hid_t sid1 = -1; /* Dataspace ID */
- hid_t tid1 = -1, dtype = -1, native_type = -1; /* Datatype ID */
+ hid_t dataset = H5I_INVALID_HID; /* Dataset ID */
+ hid_t group = H5I_INVALID_HID; /* Group ID */
+ hid_t sid1 = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t tid1 = H5I_INVALID_HID, dtype = H5I_INVALID_HID, native_type = H5I_INVALID_HID; /* Datatype ID */
hsize_t dims1[] = {1};
H5O_type_t obj_type; /* Object type */
hobj_ref_t *wbuf = NULL, /* buffer to write to disk */
@@ -2395,11 +2403,11 @@ test_refer_dtype(hid_t file)
static herr_t
test_refer_dtype2(hid_t file)
{
- hid_t dset1 = -1, /* Dataset ID */
- dset2 = -1; /* Dereferenced dataset ID */
- hid_t sid1 = -1, /* Dataspace ID #1 */
- sid2 = -1; /* Dataspace ID #2 */
- hid_t dtype = -1, native_type = -1;
+ hid_t dset1 = H5I_INVALID_HID, /* Dataset ID */
+ dset2 = -1; /* Dereferenced dataset ID */
+ hid_t sid1 = H5I_INVALID_HID, /* Dataspace ID #1 */
+ sid2 = -1; /* Dataspace ID #2 */
+ hid_t dtype = H5I_INVALID_HID, native_type = H5I_INVALID_HID;
hsize_t dims1[] = {1}, dims2[] = {SPACE2_DIM1, SPACE2_DIM2};
hsize_t start[SPACE2_RANK]; /* Starting location of hyperslab */
hsize_t stride[SPACE2_RANK]; /* Stride of hyperslab */
@@ -2604,8 +2612,8 @@ test_refer_dtype2(hid_t file)
static herr_t
test_opaque_dtype(hid_t file)
{
- hid_t type = -1, space = -1, dset = -1;
- hid_t dataset = -1, dtype = -1, native_type = -1;
+ hid_t type = H5I_INVALID_HID, space = H5I_INVALID_HID, dset = H5I_INVALID_HID;
+ hid_t dataset = H5I_INVALID_HID, dtype = H5I_INVALID_HID, native_type = H5I_INVALID_HID;
size_t i;
unsigned char wbuf[32], rbuf[32];
hsize_t nelmts;
@@ -2698,8 +2706,9 @@ test_opaque_dtype(hid_t file)
static herr_t
test_bitfield_dtype(hid_t file)
{
- hid_t type = -1, space = -1, dset1 = -1, dset2 = -1;
- hid_t dataset1 = -1, dataset2 = -1, dtype = -1, native_type = -1;
+ hid_t type = H5I_INVALID_HID, space = H5I_INVALID_HID, dset1 = H5I_INVALID_HID, dset2 = H5I_INVALID_HID;
+ hid_t dataset1 = H5I_INVALID_HID, dataset2 = H5I_INVALID_HID, dtype = H5I_INVALID_HID,
+ native_type = H5I_INVALID_HID;
size_t ntype_size, i;
unsigned char wbuf[BITFIELD_ENUMB * sizeof(int)];
unsigned char *p = NULL;
@@ -2849,19 +2858,19 @@ test_bitfield_dtype(hid_t file)
static herr_t
test_ninteger(void)
{
- hid_t fid1 = -1; /* file ID */
- hid_t fid2 = -1; /* file ID */
- hid_t did1 = -1; /* dataset ID */
- hid_t did2 = -1; /* dataset ID */
- hid_t sid1 = -1; /* dataspace ID */
- hid_t dcpl1 = -1; /* dataset creation property list ID */
- hid_t dcpl2 = -1; /* dataset creation property list ID */
- hid_t tid1 = -1; /* file datatype */
- hid_t tid2 = -1; /* file datatype */
- hid_t nid1 = -1; /* native datatype */
- hid_t nid2 = -1; /* native datatype */
- hsize_t dims[1] = {DIM3}; /* dataspace dimensions */
- int rank = 1; /* rank of dataset */
+ hid_t fid1 = H5I_INVALID_HID; /* file ID */
+ hid_t fid2 = H5I_INVALID_HID; /* file ID */
+ hid_t did1 = H5I_INVALID_HID; /* dataset ID */
+ hid_t did2 = H5I_INVALID_HID; /* dataset ID */
+ hid_t sid1 = H5I_INVALID_HID; /* dataspace ID */
+ hid_t dcpl1 = H5I_INVALID_HID; /* dataset creation property list ID */
+ hid_t dcpl2 = H5I_INVALID_HID; /* dataset creation property list ID */
+ hid_t tid1 = H5I_INVALID_HID; /* file datatype */
+ hid_t tid2 = H5I_INVALID_HID; /* file datatype */
+ hid_t nid1 = H5I_INVALID_HID; /* native datatype */
+ hid_t nid2 = H5I_INVALID_HID; /* native datatype */
+ hsize_t dims[1] = {DIM3}; /* dataspace dimensions */
+ int rank = 1; /* rank of dataset */
int buf[DIM3];
int chk[DIM3];
int i;
@@ -3052,10 +3061,10 @@ test_ninteger(void)
int
main(void)
{
- hid_t file, fapl;
- int nerrors = 0;
- char filename[1024];
- hbool_t driver_is_parallel;
+ hid_t file, fapl;
+ int nerrors = 0;
+ char filename[1024];
+ bool driver_is_parallel;
h5_reset();
fapl = h5_fileaccess();
diff --git a/test/objcopy.c b/test/objcopy.c
index 8848ab18923..d604c540b83 100644
--- a/test/objcopy.c
+++ b/test/objcopy.c
@@ -204,28 +204,28 @@ token_insert(H5O_info2_t *oi)
*
* Purpose: Check if a token has already been encountered
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: (can't fail)
*
*-------------------------------------------------------------------------
*/
-static H5_ATTR_PURE hbool_t
+static H5_ATTR_PURE bool
token_lookup(hid_t loc_id, H5O_info2_t *oi)
{
size_t n;
int token_cmp;
if (oi->rc < 2)
- return FALSE; /*only one link possible*/
+ return false; /*only one link possible*/
for (n = 0; n < idtab_g.nobjs; n++) {
if (H5Otoken_cmp(loc_id, &idtab_g.obj[n], &oi->token, &token_cmp) < 0)
- return FALSE;
+ return false;
if (!token_cmp)
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
} /* end token_lookup() */
/*-------------------------------------------------------------------------
@@ -258,9 +258,10 @@ token_reset(void)
static herr_t
attach_ref_attr(hid_t file_id, hid_t loc_id)
{
- char dsetname1[] = "dataset1_pointed_by_ref_attr";
- char dsetname2[] = "dataset2_pointed_by_ref_attr";
- hid_t did1 = (-1), did2 = (-1), aid = (-1), sid = (-1), sid_ref = (-1);
+ char dsetname1[] = "dataset1_pointed_by_ref_attr";
+ char dsetname2[] = "dataset2_pointed_by_ref_attr";
+ hid_t did1 = (H5I_INVALID_HID), did2 = (H5I_INVALID_HID), aid = (H5I_INVALID_HID),
+ sid = (H5I_INVALID_HID), sid_ref = (H5I_INVALID_HID);
hsize_t dims[2] = {2, 9};
hsize_t dims_ref[1] = {2};
hobj_ref_t ref[2];
@@ -333,10 +334,10 @@ static herr_t
attach_reg_ref_attr(hid_t file_id, hid_t loc_id)
{
const char dsetnamev[] = "dataset_pointed_by_reg_ref_attr";
- hid_t aid = (-1);
- hid_t space_id = (-1); /* dataspace identifiers */
- hid_t spacer_id = (-1); /* dataspace identifiers */
- hid_t dsetv_id = (-1); /*dataset identifiers*/
+ hid_t aid = (H5I_INVALID_HID);
+ hid_t space_id = (H5I_INVALID_HID); /* dataspace identifiers */
+ hid_t spacer_id = (H5I_INVALID_HID); /* dataspace identifiers */
+ hid_t dsetv_id = (H5I_INVALID_HID); /*dataset identifiers*/
hsize_t dims[2] = {2, 9};
hsize_t dimsr[1] = {2};
int rank = 2;
@@ -429,10 +430,10 @@ create_reg_ref_dataset(hid_t file_id, hid_t loc_id)
const char dsetnamer[] = "dataset_with_reg_ref";
const char dsetnamer1[] = "compact_dataset_with_reg_ref";
const char dsetnamer2[] = "compressed_dataset_with_reg_ref";
- hid_t space_id = (-1); /* dataspace identifiers */
- hid_t spacer_id = (-1);
- hid_t dsetv_id = (-1); /*dataset identifiers*/
- hid_t dsetr_id = (-1);
+ hid_t space_id = (H5I_INVALID_HID); /* dataspace identifiers */
+ hid_t spacer_id = (H5I_INVALID_HID);
+ hid_t dsetv_id = (H5I_INVALID_HID); /*dataset identifiers*/
+ hid_t dsetr_id = (H5I_INVALID_HID);
hsize_t dims[2] = {2, 9};
hsize_t dimsr[1] = {2};
int rank = 2;
@@ -444,7 +445,7 @@ create_reg_ref_dataset(hid_t file_id, hid_t loc_id)
hsize_t count[2];
hsize_t coord[3][2] = {{0, 0}, {1, 6}, {0, 8}};
size_t num_points = 3;
- hid_t pid = (-1);
+ hid_t pid = (H5I_INVALID_HID);
if ((space_id = H5Screate_simple(rank, dims, NULL)) < 0)
TEST_ERROR;
@@ -547,7 +548,7 @@ create_reg_ref_dataset(hid_t file_id, hid_t loc_id)
static int
test_copy_attach_attribute_vl(hid_t loc_id)
{
- hid_t aid = -1, sid = -1, tid = -1;
+ hid_t aid = H5I_INVALID_HID, sid = H5I_INVALID_HID, tid = H5I_INVALID_HID;
hvl_t buf[4];
hsize_t dim1 = 4;
unsigned int i, j;
@@ -602,11 +603,11 @@ test_copy_attach_attribute_vl(hid_t loc_id)
static int
test_copy_attach_attributes(hid_t loc_id, hid_t type_id)
{
- hid_t aid = -1, sid = -1;
+ hid_t aid = H5I_INVALID_HID, sid = H5I_INVALID_HID;
char attr_name[ATTR_NAME_LEN];
int attr_data[2];
hsize_t dim1 = 2;
- hid_t acpl = -1;
+ hid_t acpl = H5I_INVALID_HID;
unsigned u;
int ret_value = -1;
@@ -618,7 +619,7 @@ test_copy_attach_attributes(hid_t loc_id, hid_t type_id)
goto done;
for (u = 0; u < num_attributes_g; u++) {
- HDsnprintf(attr_name, sizeof(attr_name), "%u attr", u);
+ snprintf(attr_name, sizeof(attr_name), "%u attr", u);
/* Set attribute data */
attr_data[0] = (int)(100 * u);
@@ -669,10 +670,10 @@ test_copy_attach_attributes(hid_t loc_id, hid_t type_id)
static int
test_copy_attach_paired_attributes(hid_t loc_id, hid_t loc_id2, hid_t type_id)
{
- hid_t aid = -1, sid = -1;
+ hid_t aid = H5I_INVALID_HID, sid = H5I_INVALID_HID;
char attr_name[ATTR_NAME_LEN];
int attr_data[2];
- hid_t acpl = -1;
+ hid_t acpl = H5I_INVALID_HID;
unsigned u;
hsize_t dim1 = 2;
@@ -684,7 +685,7 @@ test_copy_attach_paired_attributes(hid_t loc_id, hid_t loc_id2, hid_t type_id)
goto done;
for (u = 0; u < num_attributes_g; u++) {
- HDsnprintf(attr_name, sizeof(attr_name), "%u attr", u);
+ snprintf(attr_name, sizeof(attr_name), "%u attr", u);
/* Set attribute data */
attr_data[0] = (int)(100 * u);
@@ -738,23 +739,23 @@ test_copy_attach_paired_attributes(hid_t loc_id, hid_t loc_id2, hid_t type_id)
*
* Purpose: Compare two attributes to check that they are equal
*
- * Return: TRUE if attributes are equal/FALSE if they are different
+ * Return: true if attributes are equal/false if they are different
*
*-------------------------------------------------------------------------
*/
static int
compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_owner)
{
- hid_t sid = -1, sid2 = -1; /* Dataspace IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype IDs */
- size_t elmt_size; /* Size of datatype */
- htri_t is_committed; /* If the datatype is committed */
- htri_t is_committed2; /* If the datatype is committed */
- H5A_info_t ainfo; /* Attribute info */
- H5A_info_t ainfo2; /* Attribute info */
- hssize_t nelmts; /* # of elements in dataspace */
- void *rbuf = NULL; /* Buffer for reading raw data */
- void *rbuf2 = NULL; /* Buffer for reading raw data */
+ hid_t sid = H5I_INVALID_HID, sid2 = H5I_INVALID_HID; /* Dataspace IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
+ size_t elmt_size; /* Size of datatype */
+ htri_t is_committed; /* If the datatype is committed */
+ htri_t is_committed2; /* If the datatype is committed */
+ H5A_info_t ainfo; /* Attribute info */
+ H5A_info_t ainfo2; /* Attribute info */
+ hssize_t nelmts; /* # of elements in dataspace */
+ void *rbuf = NULL; /* Buffer for reading raw data */
+ void *rbuf2 = NULL; /* Buffer for reading raw data */
/* Check the character sets are equal */
if (H5Aget_info(aid, &ainfo) < 0)
@@ -790,7 +791,7 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_
TEST_ERROR;
/* Compare the datatypes */
- if (H5Tequal(tid, tid2) != TRUE)
+ if (H5Tequal(tid, tid2) != true)
TEST_ERROR;
/* Determine the size of datatype (for later) */
@@ -808,7 +809,7 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_
TEST_ERROR;
/* Compare the dataspaces */
- if (H5Sextent_equal(sid, sid2) != TRUE)
+ if (H5Sextent_equal(sid, sid2) != true)
TEST_ERROR;
/* Determine the number of elements in dataspace (for later) */
@@ -843,10 +844,10 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_
TEST_ERROR;
/* Reclaim vlen data, if necessary */
- if (H5Tdetect_class(tid, H5T_VLEN) == TRUE)
+ if (H5Tdetect_class(tid, H5T_VLEN) == true)
if (H5Treclaim(tid, sid, H5P_DEFAULT, rbuf) < 0)
TEST_ERROR;
- if (H5Tdetect_class(tid2, H5T_VLEN) == TRUE)
+ if (H5Tdetect_class(tid2, H5T_VLEN) == true)
if (H5Treclaim(tid2, sid2, H5P_DEFAULT, rbuf2) < 0)
TEST_ERROR;
@@ -872,7 +873,7 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_
if (H5Tclose(tid2) < 0)
TEST_ERROR;
- return TRUE;
+ return true;
error:
if (rbuf)
@@ -887,7 +888,7 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_
H5Tclose(tid);
}
H5E_END_TRY
- return FALSE;
+ return false;
} /* end compare_attribute() */
/*-------------------------------------------------------------------------
@@ -895,7 +896,7 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_
*
* Purpose: Compare "standard" attributes on two objects to check that they are equal
*
- * Return: TRUE if objects have same attributes/FALSE if they are different
+ * Return: true if objects have same attributes/false if they are different
*
* Note: This isn't very general, the attributes are assumed to be
* those written in test_copy_attach_attributes().
@@ -905,9 +906,9 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_
static int
compare_std_attributes(hid_t oid, hid_t oid2, hid_t pid)
{
- hid_t aid = -1, aid2 = -1; /* Attribute IDs */
- H5O_info2_t oinfo1, oinfo2; /* Object info */
- unsigned cpy_flags; /* Object copy flags */
+ hid_t aid = H5I_INVALID_HID, aid2 = H5I_INVALID_HID; /* Attribute IDs */
+ H5O_info2_t oinfo1, oinfo2; /* Object info */
+ unsigned cpy_flags; /* Object copy flags */
/* Retrieve the object copy flags from the property list, if it's non-DEFAULT */
if (pid != H5P_DEFAULT) {
@@ -962,7 +963,7 @@ compare_std_attributes(hid_t oid, hid_t oid2, hid_t pid)
} /* end if */
/* Objects should be the same. :-) */
- return TRUE;
+ return true;
error:
H5E_BEGIN_TRY
@@ -971,7 +972,7 @@ compare_std_attributes(hid_t oid, hid_t oid2, hid_t pid)
H5Aclose(aid);
}
H5E_END_TRY
- return FALSE;
+ return false;
} /* end compare_std_attributes() */
/*-------------------------------------------------------------------------
@@ -979,7 +980,7 @@ compare_std_attributes(hid_t oid, hid_t oid2, hid_t pid)
*
* Purpose: Compare two buffers of data to check that they are equal
*
- * Return: TRUE if buffer are equal/FALSE if they are different
+ * Return: true if buffer are equal/false if they are different
*
*-------------------------------------------------------------------------
*/
@@ -996,7 +997,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
/* If the type is a compound containing a vlen, loop over all elements for
* each compound member. Compounds containing reference are not supported
* yet. */
- if ((H5Tget_class(tid) == H5T_COMPOUND) && (H5Tdetect_class(tid, H5T_VLEN) == TRUE)) {
+ if ((H5Tget_class(tid) == H5T_COMPOUND) && (H5Tdetect_class(tid, H5T_VLEN) == true)) {
hid_t memb_id; /* Member id */
const uint8_t *memb1; /* Pointer to current member */
const uint8_t *memb2; /* Pointer to current member */
@@ -1059,7 +1060,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
else {
/* vlens cannot currently be nested below the top layer of a
* compound */
- assert(H5Tdetect_class(memb_id, H5T_VLEN) == FALSE);
+ assert(H5Tdetect_class(memb_id, H5T_VLEN) == false);
/* Iterate over all elements, calling memcmp() for each */
for (elmt = 0; elmt < nelmts; elmt++) {
@@ -1073,7 +1074,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
} /* end else */
} /* end for */
}
- else if (H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ else if (H5Tdetect_class(tid, H5T_VLEN) == true) {
const hvl_t *vl_buf1, *vl_buf2; /* Aliases for buffers to compare */
hid_t base_tid; /* Base type of vlen datatype */
size_t u; /* Local index variable */
@@ -1103,7 +1104,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
if (H5Tclose(base_tid) < 0)
TEST_ERROR;
} /* end if */
- else if (H5Tdetect_class(tid, H5T_REFERENCE) == TRUE) {
+ else if (H5Tdetect_class(tid, H5T_REFERENCE) == true) {
size_t u; /* Local index variable */
/* Check for "simple" reference datatype */
@@ -1151,24 +1152,24 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
TEST_ERROR;
if (H5Oclose(obj2_id) < 0)
TEST_ERROR;
- return TRUE;
+ return true;
}
}
/* Check for types of objects handled */
switch (obj1_type) {
case H5O_TYPE_DATASET:
- if (compare_datasets(obj1_id, obj2_id, pid, NULL) != TRUE)
+ if (compare_datasets(obj1_id, obj2_id, pid, NULL) != true)
TEST_ERROR;
break;
case H5O_TYPE_GROUP:
- if (compare_groups(obj1_id, obj2_id, pid, -1, 0) != TRUE)
+ if (compare_groups(obj1_id, obj2_id, pid, -1, 0) != true)
TEST_ERROR;
break;
case H5O_TYPE_NAMED_DATATYPE:
- if (H5Tequal(obj1_id, obj2_id) != TRUE)
+ if (H5Tequal(obj1_id, obj2_id) != true)
TEST_ERROR;
break;
@@ -1229,24 +1230,24 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
TEST_ERROR;
if (H5Oclose(obj2_id) < 0)
TEST_ERROR;
- return TRUE;
+ return true;
}
}
/* Check for types of objects handled */
switch (obj1_type) {
case H5O_TYPE_DATASET:
- if (compare_datasets(obj1_id, obj2_id, pid, NULL) != TRUE)
+ if (compare_datasets(obj1_id, obj2_id, pid, NULL) != true)
TEST_ERROR;
break;
case H5O_TYPE_GROUP:
- if (compare_groups(obj1_id, obj2_id, pid, -1, 0) != TRUE)
+ if (compare_groups(obj1_id, obj2_id, pid, -1, 0) != true)
TEST_ERROR;
break;
case H5O_TYPE_NAMED_DATATYPE:
- if (H5Tequal(obj1_id, obj2_id) != TRUE)
+ if (H5Tequal(obj1_id, obj2_id) != true)
TEST_ERROR;
break;
@@ -1289,10 +1290,10 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
TEST_ERROR;
/* Data should be the same. :-) */
- return TRUE;
+ return true;
error:
- return FALSE;
+ return false;
} /* end compare_data() */
/*-------------------------------------------------------------------------
@@ -1300,25 +1301,25 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
*
* Purpose: Compare two datasets to check that they are equal
*
- * Return: TRUE if datasets are equal/FALSE if they are different
+ * Return: true if datasets are equal/false if they are different
*
*-------------------------------------------------------------------------
*/
static int
compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
{
- hid_t sid = -1, sid2 = -1; /* Dataspace IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype IDs */
- hid_t dcpl = -1, dcpl2 = -1; /* Dataset creation property list IDs */
- size_t elmt_size; /* Size of datatype */
- htri_t is_committed; /* If the datatype is committed */
- htri_t is_committed2; /* If the datatype is committed */
- int nfilters; /* Number of filters applied to dataset */
- hssize_t nelmts; /* # of elements in dataspace */
- void *rbuf = NULL; /* Buffer for reading raw data */
- void *rbuf2 = NULL; /* Buffer for reading raw data */
- H5D_space_status_t space_status; /* Dataset's raw dataspace status */
- H5D_space_status_t space_status2; /* Dataset's raw dataspace status */
+ hid_t sid = H5I_INVALID_HID, sid2 = H5I_INVALID_HID; /* Dataspace IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
+ hid_t dcpl = H5I_INVALID_HID, dcpl2 = H5I_INVALID_HID; /* Dataset creation property list IDs */
+ size_t elmt_size; /* Size of datatype */
+ htri_t is_committed; /* If the datatype is committed */
+ htri_t is_committed2; /* If the datatype is committed */
+ int nfilters; /* Number of filters applied to dataset */
+ hssize_t nelmts; /* # of elements in dataspace */
+ void *rbuf = NULL; /* Buffer for reading raw data */
+ void *rbuf2 = NULL; /* Buffer for reading raw data */
+ H5D_space_status_t space_status; /* Dataset's raw dataspace status */
+ H5D_space_status_t space_status2; /* Dataset's raw dataspace status */
/* Check the datatypes are equal */
@@ -1339,7 +1340,7 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
TEST_ERROR;
/* Compare the datatypes */
- if (H5Tequal(tid, tid2) != TRUE)
+ if (H5Tequal(tid, tid2) != true)
TEST_ERROR;
/* Determine the size of datatype (for later) */
@@ -1357,7 +1358,7 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
TEST_ERROR;
/* Compare the dataspaces */
- if (H5Sextent_equal(sid, sid2) != TRUE)
+ if (H5Sextent_equal(sid, sid2) != true)
TEST_ERROR;
/* Determine the number of elements in dataspace (for later) */
@@ -1375,7 +1376,7 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
TEST_ERROR;
/* Compare the rest of the dataset creation property lists */
- if (H5Pequal(dcpl, dcpl2) != TRUE)
+ if (H5Pequal(dcpl, dcpl2) != true)
TEST_ERROR;
/* Get the number of filters on dataset (for later) */
@@ -1441,10 +1442,10 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
TEST_ERROR;
/* Reclaim vlen data, if necessary */
- if (H5Tdetect_class(tid, H5T_VLEN) == TRUE)
+ if (H5Tdetect_class(tid, H5T_VLEN) == true)
if (H5Treclaim(tid, sid, H5P_DEFAULT, rbuf) < 0)
TEST_ERROR;
- if (H5Tdetect_class(tid2, H5T_VLEN) == TRUE)
+ if (H5Tdetect_class(tid2, H5T_VLEN) == true)
if (H5Treclaim(tid2, sid2, H5P_DEFAULT, rbuf2) < 0)
TEST_ERROR;
@@ -1471,11 +1472,11 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
TEST_ERROR;
/* Check if the attributes are equal */
- if (compare_std_attributes(did, did2, pid) != TRUE)
+ if (compare_std_attributes(did, did2, pid) != true)
TEST_ERROR;
/* Datasets should be the same. :-) */
- return TRUE;
+ return true;
error:
H5E_BEGIN_TRY
@@ -1492,7 +1493,7 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
H5Tclose(tid);
}
H5E_END_TRY
- return FALSE;
+ return false;
} /* end compare_datasets() */
/*-------------------------------------------------------------------------
@@ -1500,7 +1501,7 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
*
* Purpose: Compare two groups to check that they are "equal"
*
- * Return: TRUE if group are equal/FALSE if they are different
+ * Return: true if group are equal/false if they are different
*
*-------------------------------------------------------------------------
*/
@@ -1550,7 +1551,7 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
if (H5Lget_name_by_idx(gid2, ".", H5_INDEX_NAME, H5_ITER_INC, idx, objname2,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, objname2) != 0)
+ if (strcmp(objname, objname2) != 0)
TEST_ERROR;
/* Get link info */
@@ -1613,19 +1614,19 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
switch (oinfo.type) {
case H5O_TYPE_GROUP:
/* Compare groups */
- if (compare_groups(oid, oid2, pid, depth - 1, copy_flags) != TRUE)
+ if (compare_groups(oid, oid2, pid, depth - 1, copy_flags) != true)
TEST_ERROR;
break;
case H5O_TYPE_DATASET:
/* Compare datasets */
- if (compare_datasets(oid, oid2, pid, NULL) != TRUE)
+ if (compare_datasets(oid, oid2, pid, NULL) != true)
TEST_ERROR;
break;
case H5O_TYPE_NAMED_DATATYPE:
/* Compare datatypes */
- if (H5Tequal(oid, oid2) != TRUE)
+ if (H5Tequal(oid, oid2) != true)
TEST_ERROR;
break;
@@ -1681,18 +1682,18 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
} /* end if */
/* Check if the attributes are equal */
- if (compare_std_attributes(gid, gid2, pid) != TRUE)
+ if (compare_std_attributes(gid, gid2, pid) != true)
TEST_ERROR;
/* Groups should be the same. :-) */
- return TRUE;
+ return true;
error:
H5E_BEGIN_TRY
{
}
H5E_END_TRY
- return FALSE;
+ return false;
} /* end compare_groups() */
/*-------------------------------------------------------------------------
@@ -1701,9 +1702,9 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
* Purpose: If using new format, the index array type should be NEW_TYPE
* If not, the index array type should be OLD_TYPE
*
- * Return: TRUE if the index type retrieved for the dataset DID is
+ * Return: true if the index type retrieved for the dataset DID is
* as expected
- * FALSE if not
+ * false if not
*
*-------------------------------------------------------------------------
*/
@@ -1729,9 +1730,9 @@ compare_idx_type(hid_t fapl, hid_t did, H5D_chunk_index_t new_type, H5D_chunk_in
else if (idx_type != old_type)
TEST_ERROR;
- return TRUE;
+ return true;
error:
- return FALSE;
+ return false;
} /* compare_idx_type() */
/*-------------------------------------------------------------------------
@@ -1747,8 +1748,8 @@ compare_idx_type(hid_t fapl, hid_t did, H5D_chunk_index_t new_type, H5D_chunk_in
static int
test_copy_named_datatype(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype IDs */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -1807,7 +1808,7 @@ test_copy_named_datatype(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d
FAIL_STACK_ERROR;
/* Compare the datatypes */
- if (H5Tequal(tid, tid2) != TRUE)
+ if (H5Tequal(tid, tid2) != true)
TEST_ERROR;
/* close the destination datatype */
@@ -1854,8 +1855,8 @@ test_copy_named_datatype(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d
static int
test_copy_named_datatype_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype IDs */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -1914,7 +1915,7 @@ test_copy_named_datatype_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_
FAIL_STACK_ERROR;
/* Compare the datatypes */
- if (H5Tequal(tid, tid2) != TRUE)
+ if (H5Tequal(tid, tid2) != true)
TEST_ERROR;
/* close the destination datatype */
@@ -1961,8 +1962,8 @@ test_copy_named_datatype_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_
static int
test_copy_named_datatype_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype IDs */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -2029,7 +2030,7 @@ test_copy_named_datatype_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
FAIL_STACK_ERROR;
/* Compare the datatypes */
- if (H5Tequal(tid, tid2) != TRUE)
+ if (H5Tequal(tid, tid2) != true)
TEST_ERROR;
/* close the destination datatype */
@@ -2078,14 +2079,14 @@ test_copy_named_datatype_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
static int
test_copy_named_datatype_attr_self(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype IDs */
- hid_t aid = -1; /* Attribute ID */
- hid_t sid = -1; /* Dataspace ID */
- hsize_t dims[2] = {3, 4}; /* Dataspace dimensions */
- H5O_info2_t oinfo, oinfo2; /* Object info */
- H5G_info_t ginfo; /* Group info */
- hbool_t same_type;
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hsize_t dims[2] = {3, 4}; /* Dataspace dimensions */
+ H5O_info2_t oinfo, oinfo2; /* Object info */
+ H5G_info_t ginfo; /* Group info */
+ bool same_type;
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -2164,7 +2165,7 @@ test_copy_named_datatype_attr_self(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
FAIL_STACK_ERROR;
/* Compare the datatypes */
- if (H5Tequal(tid, tid2) != TRUE)
+ if (H5Tequal(tid, tid2) != true)
TEST_ERROR;
/* close the source datatype */
@@ -2180,7 +2181,7 @@ test_copy_named_datatype_attr_self(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
TEST_ERROR;
/* verify that the attribute's datatype is committed */
- if (H5Tcommitted(tid) != TRUE)
+ if (H5Tcommitted(tid) != true)
TEST_ERROR;
/* verify that the tokens of the datatypes are the same */
@@ -2189,16 +2190,16 @@ test_copy_named_datatype_attr_self(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
if (H5Oget_info3(tid2, &oinfo2, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- same_type = TRUE;
+ same_type = true;
if (oinfo.fileno == oinfo2.fileno) {
int token_cmp;
if (H5Otoken_cmp(tid2, &oinfo.token, &oinfo2.token, &token_cmp) < 0)
TEST_ERROR;
if (token_cmp)
- same_type = FALSE;
+ same_type = false;
}
else
- same_type = FALSE;
+ same_type = false;
if (!same_type)
FAIL_PUTS_ERROR("destination attribute does not use the same committed datatype");
@@ -2256,12 +2257,12 @@ test_copy_named_datatype_attr_self(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
static int
test_copy_dataset_simple(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- hsize_t dim2d[2]; /* Dataset dimensions */
- int i, j; /* local index variables */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ int i, j; /* local index variables */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -2342,7 +2343,7 @@ test_copy_dataset_simple(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -2398,19 +2399,19 @@ test_copy_dataset_simple(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d
static int
test_copy_dataset_versionbounds(hid_t fcpl_src, hid_t fapl_src)
{
- hid_t fid_src = -1, fid_dst = -1; /* Source and destination file IDs */
- hid_t fapl_dst = -1; /* File access plist for dest file */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did_src = -1, did_dst = -1; /* Source and destination dataset IDs */
- int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- hsize_t dim2d[2]; /* Dataset dimensions */
- char src_fname[NAME_BUF_SIZE]; /* Name of source file */
- char dst_fname[NAME_BUF_SIZE]; /* Name of destination file */
- H5F_libver_t low, high; /* File format bounds */
- unsigned srcdset_layoutversion; /* Layout version of source dataset */
- int i, j; /* Local index variables */
- H5D_t *dsetp = NULL; /* Pointer to internal dset structure */
- herr_t ret; /* Generic return value */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* Source and destination file IDs */
+ hid_t fapl_dst = H5I_INVALID_HID; /* File access plist for dest file */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did_src = H5I_INVALID_HID, did_dst = H5I_INVALID_HID; /* Source and destination dataset IDs */
+ int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ char src_fname[NAME_BUF_SIZE]; /* Name of source file */
+ char dst_fname[NAME_BUF_SIZE]; /* Name of destination file */
+ H5F_libver_t low, high; /* File format bounds */
+ unsigned srcdset_layoutversion; /* Layout version of source dataset */
+ int i, j; /* Local index variables */
+ H5D_t *dsetp = NULL; /* Pointer to internal dset structure */
+ herr_t ret; /* Generic return value */
TESTING("H5Ocopy(): simple dataset with version bounds");
@@ -2542,7 +2543,7 @@ test_copy_dataset_versionbounds(hid_t fcpl_src, hid_t fapl_src)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did_src, did_dst, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did_src, did_dst, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* Close the datasets */
@@ -2595,12 +2596,12 @@ test_copy_dataset_versionbounds(hid_t fcpl_src, hid_t fapl_src)
static int
test_copy_dataset_simple_samefile(hid_t fcpl, hid_t fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- hsize_t dim2d[2]; /* Dataset dimensions */
- int i, j; /* local index variables */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ int i, j; /* local index variables */
char filename[NAME_BUF_SIZE];
TESTING("H5Ocopy(): simple dataset within the same file");
@@ -2670,7 +2671,7 @@ test_copy_dataset_simple_samefile(hid_t fcpl, hid_t fapl)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -2715,13 +2716,12 @@ test_copy_dataset_simple_samefile(hid_t fcpl, hid_t fapl)
*-------------------------------------------------------------------------
*/
static int
-test_copy_dataset_simple_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
- hbool_t test_open)
+test_copy_dataset_simple_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool test_open)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hsize_t dim2d[2]; /* Dataset dimensions */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hsize_t dim2d[2]; /* Dataset dimensions */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -2803,7 +2803,7 @@ test_copy_dataset_simple_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -2851,11 +2851,11 @@ test_copy_dataset_simple_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
static int
test_copy_dataset_compound(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t tid = -1; /* Datatype ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hsize_t dim1d[1]; /* Dataset dimensions */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hsize_t dim1d[1]; /* Dataset dimensions */
typedef struct comp_t {
int a;
double d;
@@ -2954,7 +2954,7 @@ test_copy_dataset_compound(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3003,18 +3003,18 @@ test_copy_dataset_compound(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
static int
test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hsize_t max_dim1d[1]; /* Dataset max. dimensions */
- hsize_t dim2d[2]; /* Dataset dimensions */
- hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
- hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
- float buf1d[DIM_SIZE_1]; /* Buffer for writing data */
- float buf2d[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- int i, j; /* Local index variables */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hsize_t max_dim1d[1]; /* Dataset max. dimensions */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
+ hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
+ float buf1d[DIM_SIZE_1]; /* Buffer for writing data */
+ float buf2d[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ int i, j; /* Local index variables */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -3329,11 +3329,11 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_EARRAY, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_EARRAY, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf1d) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf1d) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3353,11 +3353,11 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf1d) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf1d) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3377,11 +3377,11 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf2d) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf2d) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3401,11 +3401,11 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf2d) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf2d) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3425,11 +3425,11 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf2d) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf2d) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3449,11 +3449,11 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf2d) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf2d) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3473,11 +3473,11 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf2d) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf2d) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3527,15 +3527,15 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
static int
test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hsize_t max_dim1d[1]; /* Dataset max. dimensions */
- hsize_t dim2d[2]; /* Dataset dimensions */
- hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
- hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hsize_t max_dim1d[1]; /* Dataset max. dimensions */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
+ hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -3829,11 +3829,11 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_EARRAY, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_EARRAY, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3853,11 +3853,11 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3877,11 +3877,11 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3901,11 +3901,11 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3925,11 +3925,11 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3949,11 +3949,11 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3973,11 +3973,11 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -4027,21 +4027,21 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
static int
test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hsize_t new_dim1d[1]; /* Dataset dimensions */
- hsize_t max_dim1d[1]; /* Dataset max. dimensions */
- hsize_t dim2d[2]; /* Dataset dimensions */
- hsize_t new_dim2d[2]; /* Dataset dimensions */
- hsize_t max_dim2d[2]; /* Dataset max. dimensions */
- hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
- hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
- float buf1d[DIM_SIZE_1]; /* Buffer for writing data */
- float buf2d[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- int i, j; /* Local index variables */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hsize_t new_dim1d[1]; /* Dataset dimensions */
+ hsize_t max_dim1d[1]; /* Dataset max. dimensions */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ hsize_t new_dim2d[2]; /* Dataset dimensions */
+ hsize_t max_dim2d[2]; /* Dataset max. dimensions */
+ hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
+ hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
+ float buf1d[DIM_SIZE_1]; /* Buffer for writing data */
+ float buf2d[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ int i, j; /* Local index variables */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -4279,11 +4279,11 @@ test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_EARRAY, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_EARRAY, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -4303,11 +4303,11 @@ test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_BT2, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_BT2, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -4327,11 +4327,11 @@ test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -4351,11 +4351,11 @@ test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -4405,14 +4405,14 @@ static int
test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
#ifdef H5_HAVE_FILTER_DEFLATE
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hsize_t dim2d[2]; /* Dataset dimensions */
- hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
- float buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- int i, j; /* Local index variables */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
+ float buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ int i, j; /* Local index variables */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
#endif /* H5_HAVE_FILTER_DEFLATE */
@@ -4425,7 +4425,7 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
(void)src_fapl;
(void)dst_fapl; /* Silence compiler */
SKIPPED();
- HDputs(" Deflation filter not available");
+ puts(" Deflation filter not available");
#else /* H5_HAVE_FILTER_DEFLATE */
/* set initial data values */
for (i = 0; i < DIM_SIZE_1; i++)
@@ -4671,11 +4671,11 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -4694,11 +4694,11 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED2, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -4717,11 +4717,11 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED2_SINGLE, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -4740,11 +4740,11 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED3_SINGLE, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -4763,11 +4763,11 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED4_SINGLE, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -4820,18 +4820,17 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
*-------------------------------------------------------------------------
*/
static int
-test_copy_dataset_no_edge_filt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
- hbool_t test_open)
+test_copy_dataset_no_edge_filt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool test_open)
{
#ifdef H5_HAVE_FILTER_DEFLATE
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hsize_t dim2d[2]; /* Dataset dimensions */
- hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
- float buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- int i, j; /* Local index variables */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
+ float buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ int i, j; /* Local index variables */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
#endif /* H5_HAVE_FILTER_DEFLATE */
@@ -4849,7 +4848,7 @@ test_copy_dataset_no_edge_filt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
(void)src_fapl;
(void)dst_fapl; /* Silence compiler */
SKIPPED();
- HDputs(" Deflation filter not available");
+ puts(" Deflation filter not available");
#else /* H5_HAVE_FILTER_DEFLATE */
/* set initial data values */
for (i = 0; i < DIM_SIZE_1; i++)
@@ -4945,11 +4944,11 @@ test_copy_dataset_no_edge_filt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
TEST_ERROR;
/* H5Pset_chunk_opts() will set layout version to 4 which will use latest indexing available */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_FARRAY) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_FARRAY) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -5002,15 +5001,15 @@ test_copy_dataset_no_edge_filt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
*-------------------------------------------------------------------------
*/
static int
-test_copy_dataset_compact(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, hbool_t test_open)
+test_copy_dataset_compact(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool test_open)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hsize_t dim2d[2]; /* Dataset dimensions */
- float buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- int i, j; /* Local index variables */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ float buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ int i, j; /* Local index variables */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -5110,7 +5109,7 @@ test_copy_dataset_compact(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -5159,10 +5158,10 @@ test_copy_dataset_compact(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
static int
test_copy_dataset_external(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
int i;
hsize_t size;
hsize_t dim1d[1];
@@ -5255,7 +5254,7 @@ test_copy_dataset_external(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -5305,10 +5304,10 @@ test_copy_dataset_external(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
static int
test_copy_dataset_named_dtype(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
int i;
hsize_t dim1d[1];
int buf[DIM_SIZE_1];
@@ -5397,7 +5396,7 @@ test_copy_dataset_named_dtype(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hi
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -5447,11 +5446,11 @@ test_copy_dataset_named_dtype(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hi
static int
test_copy_dataset_named_dtype_hier(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
int i;
hsize_t dim1d[1];
int buf[DIM_SIZE_1];
@@ -5560,7 +5559,7 @@ test_copy_dataset_named_dtype_hier(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
FAIL_STACK_ERROR;
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the destination group */
@@ -5612,11 +5611,11 @@ test_copy_dataset_named_dtype_hier(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
static int
test_copy_dataset_named_dtype_hier_outside(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
int i;
hsize_t dim1d[1];
int buf[DIM_SIZE_1];
@@ -5725,7 +5724,7 @@ test_copy_dataset_named_dtype_hier_outside(hid_t fcpl_src, hid_t fcpl_dst, hid_t
FAIL_STACK_ERROR;
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the destination group */
@@ -5779,12 +5778,12 @@ test_copy_dataset_named_dtype_hier_outside(hid_t fcpl_src, hid_t fcpl_dst, hid_t
*/
static int
test_copy_dataset_multi_ohdr_chunks(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
- hbool_t test_open)
+ bool test_open)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
int i;
hsize_t dim1d[1];
int buf[DIM_SIZE_1];
@@ -5901,7 +5900,7 @@ test_copy_dataset_multi_ohdr_chunks(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fa
FAIL_STACK_ERROR;
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the destination group */
@@ -5952,11 +5951,11 @@ test_copy_dataset_multi_ohdr_chunks(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fa
static int
test_copy_dataset_attr_named_dtype(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
int i;
hsize_t dim1d[1];
int buf[DIM_SIZE_1];
@@ -6068,7 +6067,7 @@ test_copy_dataset_attr_named_dtype(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
FAIL_STACK_ERROR;
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the destination group */
@@ -6120,14 +6119,14 @@ test_copy_dataset_attr_named_dtype(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
static int
test_copy_dataset_contig_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -6205,7 +6204,7 @@ test_copy_dataset_contig_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -6225,7 +6224,7 @@ test_copy_dataset_contig_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -6277,16 +6276,16 @@ test_copy_dataset_contig_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_
static int
test_copy_dataset_chunked_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
- hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
+ hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -6391,11 +6390,11 @@ test_copy_dataset_chunked_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_VL, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -6414,11 +6413,11 @@ test_copy_dataset_chunked_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_VL2, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -6438,7 +6437,7 @@ test_copy_dataset_chunked_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -6491,15 +6490,15 @@ test_copy_dataset_chunked_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
static int
test_copy_dataset_compact_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -6587,7 +6586,7 @@ test_copy_dataset_compact_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -6607,7 +6606,7 @@ test_copy_dataset_compact_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -6659,11 +6658,11 @@ test_copy_dataset_compact_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
static int
test_copy_attribute_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t aid = -1, aid2 = -1; /* Attribute IDs */
- hsize_t dim2d[2]; /* Dataset dimensions */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t aid = H5I_INVALID_HID, aid2 = H5I_INVALID_HID; /* Attribute IDs */
+ hsize_t dim2d[2]; /* Dataset dimensions */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -6742,7 +6741,7 @@ test_copy_attribute_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst
if ((aid2 = H5Aopen_by_idx(did2, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)0, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
TEST_ERROR;
- if (compare_attribute(aid, aid2, H5P_DEFAULT, NULL, did) != TRUE)
+ if (compare_attribute(aid, aid2, H5P_DEFAULT, NULL, did) != true)
TEST_ERROR;
if (H5Aclose(aid) < 0)
TEST_ERROR;
@@ -6795,13 +6794,13 @@ test_copy_attribute_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst
static int
attach_attribute_compound_vlstr(hid_t loc_id)
{
- hid_t aid = -1; /* Attribute ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t tid = -1; /* Datatype ID */
- hid_t vl_str_tid = -1; /* Variable length string datatype ID */
- hid_t cmpd_tid = -1; /* Compound datatype ID */
- hsize_t dim1 = 1; /* Dimension size */
- typedef struct { /* Compound structure for the attribute */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t vl_str_tid = H5I_INVALID_HID; /* Variable length string datatype ID */
+ hid_t cmpd_tid = H5I_INVALID_HID; /* Compound datatype ID */
+ hsize_t dim1 = 1; /* Dimension size */
+ typedef struct { /* Compound structure for the attribute */
int i;
char *v;
} s1;
@@ -6836,11 +6835,11 @@ attach_attribute_compound_vlstr(hid_t loc_id)
goto done;
/* Write to the attribute */
- len = HDstrlen(ATTR_CMPD_STRING) + 1;
+ len = strlen(ATTR_CMPD_STRING) + 1;
buf.i = 9;
if (NULL == (buf.v = (char *)calloc(len, sizeof(char))))
goto done;
- HDstrncpy(buf.v, ATTR_CMPD_STRING, len);
+ strncpy(buf.v, ATTR_CMPD_STRING, len);
if (H5Awrite(aid, cmpd_tid, &buf) < 0)
goto done;
@@ -6876,10 +6875,10 @@ attach_attribute_compound_vlstr(hid_t loc_id)
static int
compare_attribute_compound_vlstr(hid_t loc, hid_t loc2)
{
- hid_t aid = -1, aid2 = -1; /* Attribute IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype IDs */
- hid_t sid = -1, sid2 = -1; /* Dataspace IDs */
- hid_t dxpl_id = -1;
+ hid_t aid = H5I_INVALID_HID, aid2 = H5I_INVALID_HID; /* Attribute IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
+ hid_t sid = H5I_INVALID_HID, sid2 = H5I_INVALID_HID; /* Dataspace IDs */
+ hid_t dxpl_id = H5I_INVALID_HID;
typedef struct { /* Compound structure for the attribute */
int i;
char *v;
@@ -6916,9 +6915,9 @@ compare_attribute_compound_vlstr(hid_t loc, hid_t loc2)
/* Compare the attributes' data */
if (rbuf.i != rbuf2.i)
FAIL_STACK_ERROR;
- if (HDstrlen(rbuf.v) != HDstrlen(rbuf2.v))
+ if (strlen(rbuf.v) != strlen(rbuf2.v))
FAIL_STACK_ERROR;
- if (memcmp(rbuf.v, rbuf2.v, HDstrlen(rbuf.v)) != 0)
+ if (memcmp(rbuf.v, rbuf2.v, strlen(rbuf.v)) != 0)
FAIL_STACK_ERROR;
/* Reclaim vlen buffer */
@@ -6944,7 +6943,7 @@ compare_attribute_compound_vlstr(hid_t loc, hid_t loc2)
FAIL_STACK_ERROR;
if (H5Aclose(aid2) < 0)
FAIL_STACK_ERROR;
- return TRUE;
+ return true;
error:
H5E_BEGIN_TRY
@@ -6960,7 +6959,7 @@ compare_attribute_compound_vlstr(hid_t loc, hid_t loc2)
H5Pclose(dxpl_id);
}
H5E_END_TRY
- return FALSE;
+ return false;
} /* compare_attribute_compound_vlstr() */
@@ -6981,14 +6980,14 @@ compare_attribute_compound_vlstr(hid_t loc, hid_t loc2)
static int
test_copy_attribute_compound_vlstr(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t aid = -1, aid2 = -1; /* Attribute IDs */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hsize_t dim2d[2]; /* Dataset dimensions */
- char src_filename[NAME_BUF_SIZE]; /* Source file name */
- char dst_filename[NAME_BUF_SIZE]; /* Destination file name */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t aid = H5I_INVALID_HID, aid2 = H5I_INVALID_HID; /* Attribute IDs */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ char src_filename[NAME_BUF_SIZE]; /* Source file name */
+ char dst_filename[NAME_BUF_SIZE]; /* Destination file name */
TESTING("H5Ocopy(): attribute with compound datatype consisting of variable length string");
@@ -7143,16 +7142,16 @@ static int
test_copy_dataset_compressed_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
#ifdef H5_HAVE_FILTER_DEFLATE
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t tid = -1; /* Datatype ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- hsize_t dim2d[2]; /* Dataset dimensions */
- hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
- hvl_t buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- int i, j, k; /* Local index variables */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
+ hvl_t buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ int i, j, k; /* Local index variables */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
#endif /* H5_HAVE_FILTER_DEFLATE */
@@ -7165,7 +7164,7 @@ test_copy_dataset_compressed_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
(void)src_fapl;
(void)dst_fapl; /* Silence compiler */
SKIPPED();
- HDputs(" Deflation filter not available");
+ puts(" Deflation filter not available");
#else /* H5_HAVE_FILTER_DEFLATE */
/* set initial data values */
for (i = 0; i < DIM_SIZE_1; i++) {
@@ -7254,7 +7253,7 @@ test_copy_dataset_compressed_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -7274,7 +7273,7 @@ test_copy_dataset_compressed_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -7329,8 +7328,8 @@ test_copy_dataset_compressed_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
static int
test_copy_group_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -7389,7 +7388,7 @@ test_copy_group_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_
FAIL_STACK_ERROR;
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the destination group */
@@ -7436,11 +7435,11 @@ test_copy_group_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_
static int
test_copy_root_group(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t gid_sub = -1; /* Sub-group ID */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t gid_sub = H5I_INVALID_HID; /* Sub-group ID */
hsize_t dim2d[2];
int buf[DIM_SIZE_1][DIM_SIZE_2];
int i, j;
@@ -7542,7 +7541,7 @@ test_copy_root_group(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_f
FAIL_STACK_ERROR;
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the destination group */
@@ -7592,11 +7591,11 @@ test_copy_root_group(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_f
static int
test_copy_group(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t gid_sub = -1; /* Sub-group ID */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t gid_sub = H5I_INVALID_HID; /* Sub-group ID */
hsize_t dim2d[2];
int buf[DIM_SIZE_1][DIM_SIZE_2];
int i, j;
@@ -7698,7 +7697,7 @@ test_copy_group(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
FAIL_STACK_ERROR;
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the destination group */
@@ -7748,11 +7747,11 @@ test_copy_group(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
static int
test_copy_group_deep(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t gid_sub = -1, gid_sub2; /* Sub-group IDs */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t gid_sub = H5I_INVALID_HID, gid_sub2; /* Sub-group IDs */
hsize_t dim2d[2];
int buf[DIM_SIZE_1][DIM_SIZE_2];
int i, j, k; /* Local index variables */
@@ -7796,17 +7795,17 @@ test_copy_group_deep(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_f
/* create nested sub-groups & datasets */
for (i = 0; i < NUM_SUB_GROUPS; i++) {
- HDsnprintf(objname, sizeof(objname), "Group #%d", i);
+ snprintf(objname, sizeof(objname), "Group #%d", i);
if ((gid_sub = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
for (j = 0; j < NUM_SUB_GROUPS; j++) {
- HDsnprintf(objname, sizeof(objname), "Group #%d", j);
+ snprintf(objname, sizeof(objname), "Group #%d", j);
if ((gid_sub2 = H5Gcreate2(gid_sub, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
for (k = 0; k < NUM_DATASETS; k++) {
- HDsnprintf(objname, sizeof(objname), "Dataset #%d", k);
+ snprintf(objname, sizeof(objname), "Dataset #%d", k);
/* add a dataset to the group */
if ((did = H5Dcreate2(gid_sub2, objname, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT,
@@ -7864,7 +7863,7 @@ test_copy_group_deep(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_f
FAIL_STACK_ERROR;
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the destination group */
@@ -7914,9 +7913,9 @@ test_copy_group_deep(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_f
static int
test_copy_group_loop(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t gid_sub = -1, gid_sub2 = -1; /* Sub-group IDs */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t gid_sub = H5I_INVALID_HID, gid_sub2 = H5I_INVALID_HID; /* Sub-group IDs */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -7994,7 +7993,7 @@ test_copy_group_loop(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_f
FAIL_STACK_ERROR;
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the destination group */
@@ -8048,11 +8047,11 @@ test_copy_group_loop(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_f
static int
test_copy_group_wide_loop(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t gid_sub = -1, gid_sub2 = -1; /* Sub-group IDs */
- unsigned u, v; /* Local index variables */
- char objname[NAME_BUF_SIZE]; /* Object name buffer */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t gid_sub = H5I_INVALID_HID, gid_sub2 = H5I_INVALID_HID; /* Sub-group IDs */
+ unsigned u, v; /* Local index variables */
+ char objname[NAME_BUF_SIZE]; /* Object name buffer */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -8079,12 +8078,12 @@ test_copy_group_wide_loop(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
/* create wide sub-group hierarchy, with multiple links to higher groups */
for (u = 0; u < NUM_WIDE_LOOP_GROUPS; u++) {
- HDsnprintf(objname, sizeof(objname), "%s-%u", NAME_GROUP_SUB, u);
+ snprintf(objname, sizeof(objname), "%s-%u", NAME_GROUP_SUB, u);
if ((gid_sub = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
for (v = 0; v < NUM_WIDE_LOOP_GROUPS; v++) {
- HDsnprintf(objname, sizeof(objname), "%s-%u", NAME_GROUP_SUB_SUB2, v);
+ snprintf(objname, sizeof(objname), "%s-%u", NAME_GROUP_SUB_SUB2, v);
if ((gid_sub2 = H5Gcreate2(gid_sub, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
@@ -8144,7 +8143,7 @@ test_copy_group_wide_loop(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
FAIL_STACK_ERROR;
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the destination group */
@@ -8193,13 +8192,13 @@ test_copy_group_wide_loop(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
static int
test_copy_group_links(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1, fid_ext = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t plid = -1; /* Object copy plist ID */
- hsize_t dim2d[2];
- hsize_t dim1d[1];
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID, fid_ext = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t plid = H5I_INVALID_HID; /* Object copy plist ID */
+ hsize_t dim2d[2];
+ hsize_t dim1d[1];
H5L_info2_t linfo;
int buf[DIM_SIZE_1][DIM_SIZE_2];
int i, j;
@@ -8382,7 +8381,7 @@ test_copy_group_links(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_
TEST_ERROR;
if ((did2 = H5Dopen2(fid_dst, NAME_LINK_SOFT, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* Delete expanded dataset, add soft link */
@@ -8415,7 +8414,7 @@ test_copy_group_links(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_
TEST_ERROR;
if ((did2 = H5Dopen2(fid_dst, NAME_LINK_EXTERN, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* Delete expanded dataset, add external link */
@@ -8435,7 +8434,7 @@ test_copy_group_links(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_
} /* end if */
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the destination group */
@@ -8459,7 +8458,7 @@ test_copy_group_links(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_
TEST_ERROR;
/* Compare the groups */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* Close groups */
@@ -8517,12 +8516,12 @@ test_copy_group_links(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_
*-------------------------------------------------------------------------
*/
static int
-test_copy_soft_link(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, hbool_t test_open)
+test_copy_soft_link(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool test_open)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t gid = -1; /* Group ID */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
hsize_t dim2d[2];
int buf[DIM_SIZE_1][DIM_SIZE_2];
int i, j;
@@ -8625,7 +8624,7 @@ test_copy_soft_link(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fa
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -8674,10 +8673,10 @@ test_copy_soft_link(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fa
static int
test_copy_ext_link(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1, fid_ext = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t gid = -1; /* Group ID */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID, fid_ext = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
hsize_t dim2d[2];
int buf[DIM_SIZE_1][DIM_SIZE_2];
int i, j;
@@ -8782,7 +8781,7 @@ test_copy_ext_link(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fap
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -8836,13 +8835,13 @@ test_copy_ext_link(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fap
static int
test_copy_exist(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset IDs */
- int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- hsize_t dim2d[2]; /* Dataset dimensions */
- int i, j; /* local index variables */
- herr_t ret; /* Generic return value */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset IDs */
+ int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ int i, j; /* local index variables */
+ herr_t ret; /* Generic return value */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -8960,14 +8959,14 @@ test_copy_exist(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
static int
test_copy_path(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t gid = -1; /* Group ID */
- int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- hsize_t dim2d[2]; /* Dataset dimensions */
- int i, j; /* local index variables */
- herr_t ret; /* Generic return value */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ int i, j; /* local index variables */
+ herr_t ret; /* Generic return value */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -9073,7 +9072,7 @@ test_copy_path(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -9122,8 +9121,8 @@ test_copy_path(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
static int
test_copy_same_file_named_datatype(hid_t fcpl_src, hid_t fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t tid = -1, tid2 = -1; /* Datatype IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
char filename[NAME_BUF_SIZE];
TESTING("H5Ocopy(): named datatype in same file");
@@ -9155,7 +9154,7 @@ test_copy_same_file_named_datatype(hid_t fcpl_src, hid_t fapl)
FAIL_STACK_ERROR;
/* Compare the datatypes */
- if (H5Tequal(tid, tid2) != TRUE)
+ if (H5Tequal(tid, tid2) != true)
TEST_ERROR;
/* close the destination datatype */
@@ -9199,11 +9198,11 @@ test_copy_same_file_named_datatype(hid_t fcpl_src, hid_t fapl)
*-------------------------------------------------------------------------
*/
static int
-test_copy_old_layout(hid_t fcpl_dst, hid_t fapl, hbool_t test_open)
+test_copy_old_layout(hid_t fcpl_dst, hid_t fapl, bool test_open)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t src_fapl = -1; /* Source file FAPL ID */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t src_fapl = H5I_INVALID_HID; /* Source file FAPL ID */
const char *src_filename = H5_get_srcdir_filename(FILE_OLD_LAYOUT); /* Corrected test file name */
char dst_filename[NAME_BUF_SIZE];
@@ -9262,7 +9261,7 @@ test_copy_old_layout(hid_t fcpl_dst, hid_t fapl, hbool_t test_open)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -9311,15 +9310,15 @@ test_copy_old_layout(hid_t fcpl_dst, hid_t fapl, hbool_t test_open)
static int
test_copy_dataset_compact_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid_copy = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid_copy = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -9419,7 +9418,7 @@ test_copy_dataset_compact_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -9439,7 +9438,7 @@ test_copy_dataset_compact_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid_copy, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid_copy, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -9493,14 +9492,14 @@ test_copy_dataset_compact_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
static int
test_copy_dataset_contig_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid_copy = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid_copy = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -9590,7 +9589,7 @@ test_copy_dataset_contig_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -9610,7 +9609,7 @@ test_copy_dataset_contig_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid_copy, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid_copy, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -9665,18 +9664,18 @@ test_copy_dataset_contig_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
*/
static int
test_copy_dataset_chunked_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
- hbool_t test_open)
+ bool test_open)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid_copy = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
- hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid_copy = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -9786,7 +9785,7 @@ test_copy_dataset_chunked_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -9806,7 +9805,7 @@ test_copy_dataset_chunked_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid_copy, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid_copy, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -9860,16 +9859,16 @@ test_copy_dataset_chunked_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
static int
test_copy_dataset_compressed_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid_copy = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
- hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid_copy = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -9971,7 +9970,7 @@ test_copy_dataset_compressed_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -9991,7 +9990,7 @@ test_copy_dataset_compressed_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid_copy, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid_copy, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -10045,16 +10044,16 @@ test_copy_dataset_compressed_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_
static int
test_copy_dataset_compact_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j, k; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
- hvl_t *tvl; /* Temporary pointer to VL information */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j, k; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hvl_t *tvl; /* Temporary pointer to VL information */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -10158,7 +10157,7 @@ test_copy_dataset_compact_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -10178,7 +10177,7 @@ test_copy_dataset_compact_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid2, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid2, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -10235,19 +10234,18 @@ test_copy_dataset_compact_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
*-------------------------------------------------------------------------
*/
static int
-test_copy_dataset_contig_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
- hbool_t test_open)
+test_copy_dataset_contig_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool test_open)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j, k; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
- hvl_t *tvl; /* Temporary pointer to VL information */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j, k; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hvl_t *tvl; /* Temporary pointer to VL information */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -10358,7 +10356,7 @@ test_copy_dataset_contig_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -10378,7 +10376,7 @@ test_copy_dataset_contig_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid2, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid2, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -10434,15 +10432,15 @@ test_copy_dataset_contig_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
static int
test_copy_dataset_chunked_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j, k; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j, k; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
hvl_t *tvl; /* Temporary pointer to VL information */
hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
char src_filename[NAME_BUF_SIZE];
@@ -10563,11 +10561,11 @@ test_copy_dataset_chunked_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_VL_VL, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -10586,11 +10584,11 @@ test_copy_dataset_chunked_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_VL_VL2, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -10610,7 +10608,7 @@ test_copy_dataset_chunked_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid2, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid2, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -10668,17 +10666,17 @@ test_copy_dataset_chunked_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
*/
static int
test_copy_dataset_compressed_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
- hbool_t test_open)
+ bool test_open)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j, k; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j, k; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
hvl_t *tvl; /* Temporary pointer to VL information */
hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
char src_filename[NAME_BUF_SIZE];
@@ -10794,7 +10792,7 @@ test_copy_dataset_compressed_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -10814,7 +10812,7 @@ test_copy_dataset_compressed_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid2, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid2, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -10879,16 +10877,16 @@ typedef struct cmpd_vl_t {
static int
test_copy_dataset_contig_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t tid2 = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t did2 = -1; /* Dataset ID */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- cmpd_vl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t tid2 = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t did2 = H5I_INVALID_HID; /* Dataset ID */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ cmpd_vl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -10977,7 +10975,7 @@ test_copy_dataset_contig_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -10997,7 +10995,7 @@ test_copy_dataset_contig_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -11052,16 +11050,16 @@ test_copy_dataset_contig_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
static int
test_copy_dataset_chunked_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
- cmpd_vl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
+ cmpd_vl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -11159,7 +11157,7 @@ test_copy_dataset_chunked_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -11179,7 +11177,7 @@ test_copy_dataset_chunked_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -11235,15 +11233,15 @@ test_copy_dataset_chunked_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
static int
test_copy_dataset_compact_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- cmpd_vl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ cmpd_vl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -11341,7 +11339,7 @@ test_copy_dataset_compact_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -11361,7 +11359,7 @@ test_copy_dataset_compact_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -11421,14 +11419,14 @@ test_copy_dataset_compact_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
static int
test_copy_null_ref(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid1 = -1, fid2 = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Object copy property list ID */
- hid_t did1 = -1, did2 = -1; /* Dataset IDs */
- hsize_t dim1d[1] = {2}; /* Dataset dimensions */
- hobj_ref_t obj_buf[2]; /* Buffer for object refs */
- hdset_reg_ref_t reg_buf[2]; /* Buffer for region refs */
- char zeros[MAX(sizeof(obj_buf), sizeof(reg_buf))]; /* Array of zeros, for memcmp */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Object copy property list ID */
+ hid_t did1 = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hsize_t dim1d[1] = {2}; /* Dataset dimensions */
+ hobj_ref_t obj_buf[2]; /* Buffer for object refs */
+ hdset_reg_ref_t reg_buf[2]; /* Buffer for region refs */
+ char zeros[MAX(sizeof(obj_buf), sizeof(reg_buf))]; /* Array of zeros, for memcmp */
char src_filename[NAME_BUF_SIZE];
char mid_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -11612,18 +11610,18 @@ test_copy_null_ref(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fap
static int
test_copy_null_ref_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid1 = -1, fid2 = -1, fid3 = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Object copy property list ID */
- hid_t did1 = -1, did2 = -1; /* Dataset IDs */
- hid_t did3 = -1, did4 = -1; /* Dataset IDs */
- hid_t did5 = -1, did6 = -1; /* Dataset IDs */
- hid_t dcpl = -1; /* Dataset creation property list */
- hsize_t chunk_dim1d[1] = {2}; /* Chunk dimensions */
- hsize_t dim1d[1] = {3}; /* Dataset dimensions */
- hobj_ref_t obj_buf[3]; /* Buffer for object refs */
- hdset_reg_ref_t reg_buf[3]; /* Buffer for region refs */
- char zeros[MAX(sizeof(obj_buf), sizeof(reg_buf))]; /* Array of zeros, for memcmp */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID, fid3 = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Object copy property list ID */
+ hid_t did1 = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t did3 = H5I_INVALID_HID, did4 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t did5 = H5I_INVALID_HID, did6 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
+ hsize_t chunk_dim1d[1] = {2}; /* Chunk dimensions */
+ hsize_t dim1d[1] = {3}; /* Dataset dimensions */
+ hobj_ref_t obj_buf[3]; /* Buffer for object refs */
+ hdset_reg_ref_t reg_buf[3]; /* Buffer for region refs */
+ char zeros[MAX(sizeof(obj_buf), sizeof(reg_buf))]; /* Array of zeros, for memcmp */
char src_filename[NAME_BUF_SIZE];
char mid_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -11817,9 +11815,9 @@ test_copy_null_ref_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds
static int
test_copy_attr_crt_order(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid1 = -1, fid2 = -1; /* File IDs */
- hid_t gcplid = -1; /* Group creation property list ID */
- hid_t gid1 = -1, gid2 = -1; /* Group IDs */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File IDs */
+ hid_t gcplid = H5I_INVALID_HID; /* Group creation property list ID */
+ hid_t gid1 = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -11889,7 +11887,7 @@ test_copy_attr_crt_order(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d
TEST_ERROR;
/* Compare the attributes */
- if (compare_std_attributes(gid1, gid2, H5P_DEFAULT) != TRUE)
+ if (compare_std_attributes(gid1, gid2, H5P_DEFAULT) != true)
TEST_ERROR;
/* Close groups */
@@ -11905,7 +11903,7 @@ test_copy_attr_crt_order(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d
TEST_ERROR;
/* Compare the attributes */
- if (compare_std_attributes(gid1, gid2, H5P_DEFAULT) != TRUE)
+ if (compare_std_attributes(gid1, gid2, H5P_DEFAULT) != true)
TEST_ERROR;
/* Close groups */
@@ -11948,18 +11946,18 @@ test_copy_attr_crt_order(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d
*/
static int
test_copy_committed_datatype_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
- hbool_t reopen)
+ bool reopen)
{
- hid_t fid_src1 = -1, fid_src2 = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t ocpypl_id = -1; /* Object copy plist ID */
- unsigned int i; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- int buf[DIM_SIZE_1]; /* Buffer for writing data */
- H5O_info2_t oinfo; /* Object info */
- H5O_token_t exp_token; /* Expected object token */
+ hid_t fid_src1 = H5I_INVALID_HID, fid_src2 = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t ocpypl_id = H5I_INVALID_HID; /* Object copy plist ID */
+ unsigned int i; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ int buf[DIM_SIZE_1]; /* Buffer for writing data */
+ H5O_info2_t oinfo; /* Object info */
+ H5O_token_t exp_token; /* Expected object token */
char src1_filename[NAME_BUF_SIZE];
char src2_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -12264,19 +12262,19 @@ test_copy_committed_datatype_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
*-------------------------------------------------------------------------
*/
static int
-test_copy_committed_datatype_merge_same_file(hid_t fcpl, hid_t fapl, hbool_t reopen)
+test_copy_committed_datatype_merge_same_file(hid_t fcpl, hid_t fapl, bool reopen)
{
- hid_t fid = -1; /* File ID */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t gid = -1; /* Group ID */
- hid_t ocpypl_id = -1; /* Object copy plist ID */
- unsigned int i; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- int buf[DIM_SIZE_1]; /* Buffer for writing data */
- H5O_info2_t oinfo; /* Object info */
- H5O_token_t exp_token; /* Expected object token */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t ocpypl_id = H5I_INVALID_HID; /* Object copy plist ID */
+ unsigned int i; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ int buf[DIM_SIZE_1]; /* Buffer for writing data */
+ H5O_info2_t oinfo; /* Object info */
+ H5O_token_t exp_token; /* Expected object token */
char filename[NAME_BUF_SIZE];
int token_cmp;
@@ -12657,19 +12655,18 @@ test_copy_committed_datatype_merge_same_file(hid_t fcpl, hid_t fapl, hbool_t reo
*-------------------------------------------------------------------------
*/
static int
-test_copy_committed_dt_merge_sugg(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
- hbool_t reopen)
+test_copy_committed_dt_merge_sugg(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool reopen)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t ocpypl_id = -1; /* Object copy plist ID */
- unsigned int i; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- int buf[DIM_SIZE_1]; /* Buffer for writing data */
- H5O_info2_t oinfo; /* Object info */
- H5O_token_t exp_token; /* Expected object token */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t ocpypl_id = H5I_INVALID_HID; /* Object copy plist ID */
+ unsigned int i; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ int buf[DIM_SIZE_1]; /* Buffer for writing data */
+ H5O_info2_t oinfo; /* Object info */
+ H5O_token_t exp_token; /* Expected object token */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
int token_cmp;
@@ -12952,21 +12949,20 @@ test_copy_committed_dt_merge_sugg(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
*-------------------------------------------------------------------------
*/
static int
-test_copy_committed_dt_merge_attr(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
- hbool_t reopen)
+test_copy_committed_dt_merge_attr(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool reopen)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t aid = -1; /* Attribute ID */
- hid_t gid = -1; /* Group ID */
- hid_t ocpypl_id = -1; /* Object copy plist ID */
- unsigned int i; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- int buf[DIM_SIZE_1]; /* Buffer for writing data */
- H5O_info2_t oinfo; /* Object info */
- H5O_token_t exp_token; /* Expected object token */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t ocpypl_id = H5I_INVALID_HID; /* Object copy plist ID */
+ unsigned int i; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ int buf[DIM_SIZE_1]; /* Buffer for writing data */
+ H5O_info2_t oinfo; /* Object info */
+ H5O_token_t exp_token; /* Expected object token */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
int token_cmp;
@@ -13224,25 +13220,25 @@ test_copy_committed_dt_merge_attr(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
*-------------------------------------------------------------------------
*/
static int
-test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, hbool_t reopen)
+test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool reopen)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t gid = -1; /* Group IDs */
- hid_t f_tid = -1; /* Datatype ID for root group */
- hid_t g_tid = -1; /* Datatype ID for group */
- hid_t anon_tid = -1; /* Anonymous datatype */
- hid_t aid = -1; /* Attribute ID */
- hid_t ocpypl_id = -1; /* Object copy plist ID */
- int i; /* Local index variable */
- hsize_t dim1d[1]; /* dimension sizes */
- int buf[DIM_SIZE_1]; /* Buffer for data */
- H5O_token_t exp_token_int, exp_token_short; /* Expected object tokenes */
- H5O_info2_t oinfo; /* Object info */
- char src_filename[NAME_BUF_SIZE]; /* Source file name */
- char dst_filename[NAME_BUF_SIZE]; /* Destination file name */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
+ hid_t f_tid = H5I_INVALID_HID; /* Datatype ID for root group */
+ hid_t g_tid = H5I_INVALID_HID; /* Datatype ID for group */
+ hid_t anon_tid = H5I_INVALID_HID; /* Anonymous datatype */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ hid_t ocpypl_id = H5I_INVALID_HID; /* Object copy plist ID */
+ int i; /* Local index variable */
+ hsize_t dim1d[1]; /* dimension sizes */
+ int buf[DIM_SIZE_1]; /* Buffer for data */
+ H5O_token_t exp_token_int, exp_token_short; /* Expected object tokenes */
+ H5O_info2_t oinfo; /* Object info */
+ char src_filename[NAME_BUF_SIZE]; /* Source file name */
+ char dst_filename[NAME_BUF_SIZE]; /* Destination file name */
int token_cmp;
if (reopen)
@@ -13694,20 +13690,20 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d
*-------------------------------------------------------------------------
*/
static int
-test_copy_cdt_merge_cdt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, hbool_t reopen)
+test_copy_cdt_merge_cdt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool reopen)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid1 = -1, tid2 = -1; /* Datatype IDs */
- hid_t tid3 = -1, tid4 = -1; /* Datatype IDs */
- hid_t tid5 = -1, tid = -1; /* Datatype IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t aid = -1; /* Attribute ID */
- hid_t ocpypl_id = -1; /* Object copy plist ID */
- hsize_t dim1d[1]; /* dimension sizes */
- H5O_info2_t oinfo; /* Object info */
- H5O_token_t exp_token; /* Expected object token */
- char src_filename[NAME_BUF_SIZE]; /* Source file name */
- char dst_filename[NAME_BUF_SIZE]; /* Destination file name */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid1 = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
+ hid_t tid3 = H5I_INVALID_HID, tid4 = H5I_INVALID_HID; /* Datatype IDs */
+ hid_t tid5 = H5I_INVALID_HID, tid = H5I_INVALID_HID; /* Datatype IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ hid_t ocpypl_id = H5I_INVALID_HID; /* Object copy plist ID */
+ hsize_t dim1d[1]; /* dimension sizes */
+ H5O_info2_t oinfo; /* Object info */
+ H5O_token_t exp_token; /* Expected object token */
+ char src_filename[NAME_BUF_SIZE]; /* Source file name */
+ char dst_filename[NAME_BUF_SIZE]; /* Destination file name */
int token_cmp;
if (reopen)
@@ -14007,13 +14003,13 @@ test_copy_cdt_merge_cdt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds
*-------------------------------------------------------------------------
*/
static int
-test_copy_cdt_merge_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, hbool_t reopen)
+test_copy_cdt_merge_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool reopen)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t ocpypl_id = -1; /* Object copy plist ID */
- H5O_info2_t oinfo; /* Object info */
- H5O_token_t exp_token; /* Expected object token */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t ocpypl_id = H5I_INVALID_HID; /* Object copy plist ID */
+ H5O_info2_t oinfo; /* Object info */
+ H5O_token_t exp_token; /* Expected object token */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
int token_cmp;
@@ -14320,18 +14316,18 @@ test_copy_cdt_merge_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
*-------------------------------------------------------------------------
*/
static int
-test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, hbool_t reopen)
+test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool reopen)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t ocpypl_id = -1; /* Object copy plist ID */
- unsigned int i; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- int buf[DIM_SIZE_1]; /* Buffer for writing data */
- H5O_info2_t oinfo; /* Object info */
- H5O_token_t exp_token; /* Expected object token */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t ocpypl_id = H5I_INVALID_HID; /* Object copy plist ID */
+ unsigned int i; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ int buf[DIM_SIZE_1]; /* Buffer for writing data */
+ H5O_info2_t oinfo; /* Object info */
+ H5O_token_t exp_token; /* Expected object token */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
int token_cmp;
@@ -14693,19 +14689,19 @@ test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
*-------------------------------------------------------------------------
*/
static int
-test_copy_cdt_merge_all_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, hbool_t reopen)
+test_copy_cdt_merge_all_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool reopen)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t gid = -1; /* Group ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t tid = -1; /* Datatype ID */
- hid_t aid = -1; /* Attribute ID */
- hid_t did = -1; /* Dataset ID */
- hid_t exp_did = -1; /* Dataset ID */
- hid_t tid_short = -1; /* Datatype ID */
- hid_t exp_tid = -1; /* Expected datatype ID */
- hid_t ocpypl_id = -1; /* Object copy plist ID */
- hsize_t dim1d[1]; /* Dataset dimensions */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t exp_did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t tid_short = H5I_INVALID_HID; /* Datatype ID */
+ hid_t exp_tid = H5I_INVALID_HID; /* Expected datatype ID */
+ hid_t ocpypl_id = H5I_INVALID_HID; /* Object copy plist ID */
+ hsize_t dim1d[1]; /* Dataset dimensions */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -15336,18 +15332,18 @@ mcdt_search_cb(void *_udata)
} /* mcdt_search_cb() */
static int
-test_copy_set_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, hbool_t reopen)
+test_copy_set_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool reopen)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t ocpypl_id = -1; /* Object copy plist ID */
- unsigned int i; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- int buf[DIM_SIZE_1]; /* Buffer for writing data */
- H5O_info2_t oinfo; /* Object info */
- H5O_token_t exp_token; /* Expected object token */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t ocpypl_id = H5I_INVALID_HID; /* Object copy plist ID */
+ unsigned int i; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ int buf[DIM_SIZE_1]; /* Buffer for writing data */
+ H5O_info2_t oinfo; /* Object info */
+ H5O_token_t exp_token; /* Expected object token */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
mcdt_search_cb_ud cb_udata; /* User data for callback */
@@ -15808,17 +15804,16 @@ mcdt_search_cbB(void *_udata)
/* The main test function */
static int
-test_copy_set_get_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
- hbool_t reopen)
+test_copy_set_get_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool reopen)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t ocpypl_id = -1; /* Object copy plist ID */
- unsigned int i; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- int buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t ocpypl_id = H5I_INVALID_HID; /* Object copy plist ID */
+ unsigned int i; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ int buf[DIM_SIZE_1]; /* Buffer for writing data */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
H5O_mcdt_search_cb_t mcdt_cb = NULL; /* The callback function */
@@ -16222,8 +16217,8 @@ test_copy_cdt_v1_header_bug(hid_t fcpl_src, hid_t src_fapl)
static int
test_copy_iterate(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid1 = -1, fid2 = -1; /* File IDs */
- hid_t gid = -1; /* Group ID */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File IDs */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
int i;
char grp_name[16];
char src_filename[NAME_BUF_SIZE];
@@ -16244,7 +16239,7 @@ test_copy_iterate(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl
/* Create groups */
for (i = 0; i < 9; i++) {
- HDsnprintf(grp_name, sizeof(grp_name), "grp%d", i);
+ snprintf(grp_name, sizeof(grp_name), "grp%d", i);
if ((gid = H5Gcreate2(fid1, grp_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(gid) < 0)
@@ -16307,16 +16302,16 @@ test_copy_iterate(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl
*/
static int
test_copy_option(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, unsigned flag,
- hbool_t crt_intermediate_grp, const char *test_desciption)
+ bool crt_intermediate_grp, const char *test_desciption)
{
- hid_t fid_src = -1, fid_dst = -1, fid_ext = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t gid = -1, gid2 = -1, gid_ref = -1; /* Group IDs */
- hid_t gid_sub = -1, gid_sub_sub = -1; /* Sub-group ID */
- hid_t pid = -1, lcpl_id = -1; /* Property IDs */
- unsigned cpy_flags; /* Object copy flags */
- int depth = -1; /* Copy depth */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID, fid_ext = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID, gid_ref = H5I_INVALID_HID; /* Group IDs */
+ hid_t gid_sub = H5I_INVALID_HID, gid_sub_sub = H5I_INVALID_HID; /* Sub-group ID */
+ hid_t pid = H5I_INVALID_HID, lcpl_id = H5I_INVALID_HID; /* Property IDs */
+ unsigned cpy_flags; /* Object copy flags */
+ int depth = -1; /* Copy depth */
hsize_t dim2d[2];
int buf[DIM_SIZE_1][DIM_SIZE_2];
int i, j;
@@ -16554,7 +16549,7 @@ test_copy_option(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
/* Create link creation plist to pass in intermediate group creation */
if ((lcpl_id = H5Pcreate(H5P_LINK_CREATE)) < 0)
TEST_ERROR;
- if (H5Pset_create_intermediate_group(lcpl_id, TRUE) < 0)
+ if (H5Pset_create_intermediate_group(lcpl_id, true) < 0)
TEST_ERROR;
if (H5Ocopy(fid_src, NAME_GROUP_TOP, fid_dst, "/new_g0/new_g00", pid, lcpl_id) < 0)
@@ -16634,7 +16629,7 @@ test_copy_option(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
} /* end else */
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, pid, depth, flag) != TRUE)
+ if (compare_groups(gid, gid2, pid, depth, flag) != true)
TEST_ERROR;
if (H5Gclose(gid2) < 0)
TEST_ERROR;
@@ -16715,18 +16710,18 @@ test_copy_option(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
static int
test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t tid = -1; /* Datatype ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t did3 = -1, did4 = -1; /* Dataset IDs */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t pid = -1; /* Dataset creation property list */
- hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimension sizes */
- int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- int newbuf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- hsize_t dim2d[2]; /* Dataset dimensions */
- int i, j; /* local index variables */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t did3 = H5I_INVALID_HID, did4 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list */
+ hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimension sizes */
+ int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ int newbuf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ int i, j; /* local index variables */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -16818,9 +16813,9 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did3, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did3, H5P_DEFAULT, buf) != true)
TEST_ERROR;
- if (compare_datasets(did2, did4, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did2, did4, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the copied dataset */
@@ -16845,9 +16840,9 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did3, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did3, H5P_DEFAULT, buf) != true)
TEST_ERROR;
- if (compare_datasets(did2, did4, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did2, did4, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the copied dataset in DST file */
@@ -16893,9 +16888,9 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did3, H5P_DEFAULT, newbuf) != TRUE)
+ if (compare_datasets(did, did3, H5P_DEFAULT, newbuf) != true)
TEST_ERROR;
- if (compare_datasets(did2, did4, H5P_DEFAULT, newbuf) != TRUE)
+ if (compare_datasets(did2, did4, H5P_DEFAULT, newbuf) != true)
TEST_ERROR;
/* close the copied dataset in SRC file */
@@ -16919,9 +16914,9 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did3, H5P_DEFAULT, newbuf) != TRUE)
+ if (compare_datasets(did, did3, H5P_DEFAULT, newbuf) != true)
TEST_ERROR;
- if (compare_datasets(did2, did4, H5P_DEFAULT, newbuf) != TRUE)
+ if (compare_datasets(did2, did4, H5P_DEFAULT, newbuf) != true)
TEST_ERROR;
/* close the copied dataset in DST file */
@@ -16977,7 +16972,7 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the copied dataset in SRC file */
@@ -16997,7 +16992,7 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the copied dataset in DST file */
@@ -17043,7 +17038,7 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst
TEST_ERROR;
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the DST dataset */
@@ -17062,7 +17057,7 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst
TEST_ERROR;
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the group in DST file */
@@ -17130,10 +17125,10 @@ main(void)
int configuration; /* Configuration of tests. */
int ExpressMode;
const char *env_h5_drvr; /* File Driver value from environment */
- hbool_t same_file; /* Whether to run tests that only use one file */
- hbool_t driver_is_default_compatible;
+ bool same_file; /* Whether to run tests that only use one file */
+ bool driver_is_default_compatible;
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
@@ -17179,10 +17174,10 @@ main(void)
hid_t fcpl_src;
hid_t fcpl_dst;
- /* Start with same_file == TRUE. Use source file settings for these
+ /* Start with same_file == true. Use source file settings for these
* tests. Don't run with a non-default destination file setting, as
* destination settings have no effect. */
- same_file = TRUE;
+ same_file = true;
/* No need to test dense attributes with old format */
if (!(configuration & CONFIG_SRC_NEW_FORMAT) && (configuration & CONFIG_DENSE))
@@ -17190,52 +17185,52 @@ main(void)
/* Test with and without shared messages */
if (configuration & CONFIG_SHARE_SRC) {
- HDputs("\nTesting with shared src messages:");
+ puts("\nTesting with shared src messages:");
fcpl_src = fcpl_shared;
}
else {
- HDputs("\nTesting without shared src messages:");
+ puts("\nTesting without shared src messages:");
fcpl_src = H5P_DEFAULT;
}
if (configuration & CONFIG_SHARE_DST) {
- HDputs("Testing with shared dst messages:");
+ puts("Testing with shared dst messages:");
fcpl_dst = fcpl_shared;
- same_file = FALSE;
+ same_file = false;
}
else {
- HDputs("Testing without shared dst messages:");
+ puts("Testing without shared dst messages:");
fcpl_dst = H5P_DEFAULT;
}
/* Set the FAPL for the source file's type of format */
if (configuration & CONFIG_SRC_NEW_FORMAT) {
- HDputs("Testing with latest format for source file:");
+ puts("Testing with latest format for source file:");
src_fapl = fapl2;
/* Test with and without dense attributes */
if (configuration & CONFIG_DENSE) {
- HDputs("Testing with dense attributes:");
+ puts("Testing with dense attributes:");
num_attributes_g = max_compact + 1;
}
else {
- HDputs("Testing without dense attributes:");
+ puts("Testing without dense attributes:");
num_attributes_g = MAX(min_dense, 2) - 2;
}
} /* end if */
else {
- HDputs("Testing with oldest file format for source file:");
+ puts("Testing with oldest file format for source file:");
src_fapl = fapl;
num_attributes_g = 4;
} /* end else */
/* Set the FAPL for the destination file's type of format */
if (configuration & CONFIG_DST_NEW_FORMAT) {
- HDputs("Testing with latest format for destination file:");
+ puts("Testing with latest format for destination file:");
dst_fapl = fapl2;
- same_file = FALSE;
+ same_file = false;
} /* end if */
else {
- HDputs("Testing with oldest file format for destination file:");
+ puts("Testing with oldest file format for destination file:");
dst_fapl = fapl;
} /* end else */
@@ -17245,8 +17240,8 @@ main(void)
nerrors += test_copy_dataset_simple_samefile(fcpl_src, src_fapl);
/* Test with dataset opened in the file or not */
- nerrors += test_copy_dataset_simple_empty(fcpl_src, fcpl_dst, src_fapl, dst_fapl, FALSE);
- nerrors += test_copy_dataset_simple_empty(fcpl_src, fcpl_dst, src_fapl, dst_fapl, TRUE);
+ nerrors += test_copy_dataset_simple_empty(fcpl_src, fcpl_dst, src_fapl, dst_fapl, false);
+ nerrors += test_copy_dataset_simple_empty(fcpl_src, fcpl_dst, src_fapl, dst_fapl, true);
nerrors += test_copy_dataset_compound(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
nerrors += test_copy_dataset_chunked(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
@@ -17255,15 +17250,15 @@ main(void)
nerrors += test_copy_dataset_compressed(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
/* Test with dataset opened in the file or not */
- nerrors += test_copy_dataset_no_edge_filt(fcpl_src, fcpl_dst, src_fapl, dst_fapl, FALSE);
- nerrors += test_copy_dataset_no_edge_filt(fcpl_src, fcpl_dst, src_fapl, dst_fapl, TRUE);
+ nerrors += test_copy_dataset_no_edge_filt(fcpl_src, fcpl_dst, src_fapl, dst_fapl, false);
+ nerrors += test_copy_dataset_no_edge_filt(fcpl_src, fcpl_dst, src_fapl, dst_fapl, true);
/* Test with dataset opened in the file or not */
- nerrors += test_copy_dataset_compact(fcpl_src, fcpl_dst, src_fapl, dst_fapl, FALSE);
- nerrors += test_copy_dataset_compact(fcpl_src, fcpl_dst, src_fapl, dst_fapl, TRUE);
+ nerrors += test_copy_dataset_compact(fcpl_src, fcpl_dst, src_fapl, dst_fapl, false);
+ nerrors += test_copy_dataset_compact(fcpl_src, fcpl_dst, src_fapl, dst_fapl, true);
- nerrors += test_copy_dataset_multi_ohdr_chunks(fcpl_src, fcpl_dst, src_fapl, dst_fapl, FALSE);
- nerrors += test_copy_dataset_multi_ohdr_chunks(fcpl_src, fcpl_dst, src_fapl, dst_fapl, TRUE);
+ nerrors += test_copy_dataset_multi_ohdr_chunks(fcpl_src, fcpl_dst, src_fapl, dst_fapl, false);
+ nerrors += test_copy_dataset_multi_ohdr_chunks(fcpl_src, fcpl_dst, src_fapl, dst_fapl, true);
nerrors += test_copy_dataset_attr_named_dtype(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
@@ -17276,8 +17271,8 @@ main(void)
nerrors += test_copy_group_links(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
/* Test with dataset opened in the file or not */
- nerrors += test_copy_soft_link(fcpl_src, fcpl_dst, src_fapl, dst_fapl, FALSE);
- nerrors += test_copy_soft_link(fcpl_src, fcpl_dst, src_fapl, dst_fapl, TRUE);
+ nerrors += test_copy_soft_link(fcpl_src, fcpl_dst, src_fapl, dst_fapl, false);
+ nerrors += test_copy_soft_link(fcpl_src, fcpl_dst, src_fapl, dst_fapl, true);
nerrors += test_copy_ext_link(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
nerrors += test_copy_exist(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
@@ -17287,30 +17282,30 @@ main(void)
nerrors += test_copy_attr_crt_order(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
- nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl, H5O_COPY_WITHOUT_ATTR_FLAG, FALSE,
+ nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl, H5O_COPY_WITHOUT_ATTR_FLAG, false,
"H5Ocopy(): without attributes");
- nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl, 0, TRUE,
+ nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl, 0, true,
"H5Ocopy(): with missing groups");
nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl, H5O_COPY_EXPAND_SOFT_LINK_FLAG,
- FALSE, "H5Ocopy(): expand soft link");
+ false, "H5Ocopy(): expand soft link");
nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl, H5O_COPY_EXPAND_EXT_LINK_FLAG,
- FALSE, "H5Ocopy(): expand external link");
+ false, "H5Ocopy(): expand external link");
/* Splitter VFD currently has external link-related bugs */
- if (HDstrcmp(env_h5_drvr, "splitter")) {
+ if (strcmp(env_h5_drvr, "splitter")) {
nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl,
- H5O_COPY_EXPAND_SOFT_LINK_FLAG | H5O_COPY_EXPAND_EXT_LINK_FLAG, FALSE,
+ H5O_COPY_EXPAND_SOFT_LINK_FLAG | H5O_COPY_EXPAND_EXT_LINK_FLAG, false,
"H5Ocopy(): expand soft and external links");
}
nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl, H5O_COPY_SHALLOW_HIERARCHY_FLAG,
- FALSE, "H5Ocopy(): shallow group copy");
+ false, "H5Ocopy(): shallow group copy");
nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl, H5O_COPY_EXPAND_REFERENCE_FLAG,
- FALSE, "H5Ocopy(): expand object reference");
+ false, "H5Ocopy(): expand object reference");
nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl, H5O_COPY_PRESERVE_NULL_FLAG,
- FALSE, "H5Ocopy(): preserve NULL messages");
+ false, "H5Ocopy(): preserve NULL messages");
nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl,
- H5O_COPY_WITHOUT_ATTR_FLAG | H5O_COPY_PRESERVE_NULL_FLAG, TRUE,
+ H5O_COPY_WITHOUT_ATTR_FLAG | H5O_COPY_PRESERVE_NULL_FLAG, true,
"H5Ocopy(): preserve NULL messages");
nerrors += test_copy_dataset_open(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
@@ -17324,7 +17319,7 @@ main(void)
nerrors += test_copy_named_datatype_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
/* Loop over reopening the file */
- for (reopen = FALSE; reopen <= TRUE; reopen++) {
+ for (reopen = false; reopen <= true; reopen++) {
nerrors += test_copy_committed_datatype_merge(fcpl_src, fcpl_dst, src_fapl, dst_fapl, reopen);
if (same_file)
@@ -17358,21 +17353,21 @@ main(void)
nerrors += test_copy_dataset_contig_named_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
/* Test with dataset opened in the file or not */
- nerrors += test_copy_dataset_chunked_named_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, FALSE);
- nerrors += test_copy_dataset_chunked_named_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, TRUE);
+ nerrors += test_copy_dataset_chunked_named_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, false);
+ nerrors += test_copy_dataset_chunked_named_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, true);
nerrors += test_copy_dataset_compressed_named_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
nerrors += test_copy_dataset_compact_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
/* Test with dataset opened in the file or not */
- nerrors += test_copy_dataset_contig_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, FALSE);
- nerrors += test_copy_dataset_contig_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, TRUE);
+ nerrors += test_copy_dataset_contig_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, false);
+ nerrors += test_copy_dataset_contig_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, true);
nerrors += test_copy_dataset_chunked_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
/* Test with dataset opened in the file or not */
- nerrors += test_copy_dataset_compressed_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, FALSE);
- nerrors += test_copy_dataset_compressed_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, TRUE);
+ nerrors += test_copy_dataset_compressed_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, false);
+ nerrors += test_copy_dataset_compressed_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, true);
nerrors += test_copy_dataset_contig_cmpd_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
nerrors += test_copy_dataset_chunked_cmpd_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
@@ -17382,8 +17377,8 @@ main(void)
if (driver_is_default_compatible) {
/* Test with dataset opened in the file or not */
- nerrors += test_copy_old_layout(fcpl_dst, dst_fapl, FALSE);
- nerrors += test_copy_old_layout(fcpl_dst, dst_fapl, TRUE);
+ nerrors += test_copy_old_layout(fcpl_dst, dst_fapl, false);
+ nerrors += test_copy_old_layout(fcpl_dst, dst_fapl, true);
}
/* Test with dataset opened in the file or not */
@@ -17412,7 +17407,7 @@ main(void)
exit(EXIT_FAILURE);
} /* end if */
- HDputs("All object copying tests passed.");
+ puts("All object copying tests passed.");
/* close property list.
* NOTE: if this property list is not closed and the test is
diff --git a/test/objcopy_ref.c b/test/objcopy_ref.c
index 7a81aea3347..58326d5409c 100644
--- a/test/objcopy_ref.c
+++ b/test/objcopy_ref.c
@@ -112,28 +112,28 @@ token_insert(H5O_info2_t *oinfo)
*
* Purpose: Check if a token has already been encountered
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: (can't fail)
*
*-------------------------------------------------------------------------
*/
-static H5_ATTR_PURE hbool_t
+static H5_ATTR_PURE bool
token_lookup(hid_t loc_id, H5O_info2_t *oinfo)
{
size_t n;
int token_cmp;
if (oinfo->rc < 2)
- return FALSE; /*only one link possible*/
+ return false; /*only one link possible*/
for (n = 0; n < idtab_g.nobjs; n++) {
if (H5Otoken_cmp(loc_id, &(idtab_g.obj[n]), &oinfo->token, &token_cmp) < 0)
- return FALSE;
+ return false;
if (0 == token_cmp)
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
} /* end token_lookup() */
/*-------------------------------------------------------------------------
@@ -166,9 +166,10 @@ token_reset(void)
static herr_t
attach_ref_attr(hid_t file_id, hid_t loc_id)
{
- char dsetname1[] = "dataset1_pointed_by_ref_attr";
- char dsetname2[] = "dataset2_pointed_by_ref_attr";
- hid_t did1 = (-1), did2 = (-1), aid = (-1), sid = (-1), sid_ref = (-1);
+ char dsetname1[] = "dataset1_pointed_by_ref_attr";
+ char dsetname2[] = "dataset2_pointed_by_ref_attr";
+ hid_t did1 = (H5I_INVALID_HID), did2 = (H5I_INVALID_HID), aid = (H5I_INVALID_HID),
+ sid = (H5I_INVALID_HID), sid_ref = (H5I_INVALID_HID);
hsize_t dims[2] = {2, 9};
hsize_t dims_ref[1] = {2};
H5R_ref_t ref[2];
@@ -247,10 +248,10 @@ static herr_t
attach_reg_ref_attr(hid_t file_id, hid_t loc_id)
{
const char dsetnamev[] = "dataset_pointed_by_reg_ref_attr";
- hid_t aid = (-1);
- hid_t space_id = (-1); /* dataspace identifiers */
- hid_t spacer_id = (-1); /* dataspace identifiers */
- hid_t dsetv_id = (-1); /*dataset identifiers*/
+ hid_t aid = (H5I_INVALID_HID);
+ hid_t space_id = (H5I_INVALID_HID); /* dataspace identifiers */
+ hid_t spacer_id = (H5I_INVALID_HID); /* dataspace identifiers */
+ hid_t dsetv_id = (H5I_INVALID_HID); /*dataset identifiers*/
hsize_t dims[2] = {2, 9};
hsize_t dimsr[1] = {2};
int rank = 2;
@@ -347,10 +348,10 @@ create_reg_ref_dataset(hid_t file_id, hid_t loc_id)
const char dsetnamer[] = "dataset_with_reg_ref";
const char dsetnamer1[] = "compact_dataset_with_reg_ref";
const char dsetnamer2[] = "compressed_dataset_with_reg_ref";
- hid_t space_id = (-1); /* dataspace identifiers */
- hid_t spacer_id = (-1);
- hid_t dsetv_id = (-1); /*dataset identifiers*/
- hid_t dsetr_id = (-1);
+ hid_t space_id = (H5I_INVALID_HID); /* dataspace identifiers */
+ hid_t spacer_id = (H5I_INVALID_HID);
+ hid_t dsetv_id = (H5I_INVALID_HID); /*dataset identifiers*/
+ hid_t dsetr_id = (H5I_INVALID_HID);
hsize_t dims[2] = {2, 9};
hsize_t dimsr[1] = {2};
int rank = 2;
@@ -362,7 +363,7 @@ create_reg_ref_dataset(hid_t file_id, hid_t loc_id)
hsize_t count[2];
hsize_t coord[3][2] = {{0, 0}, {1, 6}, {0, 8}};
size_t num_points = 3;
- hid_t pid = (-1);
+ hid_t pid = (H5I_INVALID_HID);
if ((space_id = H5Screate_simple(rank, dims, NULL)) < 0)
TEST_ERROR;
@@ -471,11 +472,11 @@ create_reg_ref_dataset(hid_t file_id, hid_t loc_id)
static int
test_copy_attach_attributes(hid_t loc_id, hid_t type_id)
{
- hid_t aid = -1, sid = -1;
+ hid_t aid = H5I_INVALID_HID, sid = H5I_INVALID_HID;
char attr_name[ATTR_NAME_LEN];
int attr_data[2];
hsize_t dim1 = 2;
- hid_t acpl = -1;
+ hid_t acpl = H5I_INVALID_HID;
unsigned u;
int ret_value = -1;
@@ -487,7 +488,7 @@ test_copy_attach_attributes(hid_t loc_id, hid_t type_id)
goto done;
for (u = 0; u < num_attributes_g; u++) {
- HDsnprintf(attr_name, sizeof(attr_name), "%u attr", u);
+ snprintf(attr_name, sizeof(attr_name), "%u attr", u);
/* Set attribute data */
attr_data[0] = (int)(100 * u);
@@ -531,23 +532,23 @@ test_copy_attach_attributes(hid_t loc_id, hid_t type_id)
*
* Purpose: Compare two attributes to check that they are equal
*
- * Return: TRUE if attributes are equal/FALSE if they are different
+ * Return: true if attributes are equal/false if they are different
*
*-------------------------------------------------------------------------
*/
static int
compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_owner)
{
- hid_t sid = -1, sid2 = -1; /* Dataspace IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype IDs */
- size_t elmt_size; /* Size of datatype */
- htri_t is_committed; /* If the datatype is committed */
- htri_t is_committed2; /* If the datatype is committed */
- H5A_info_t ainfo; /* Attribute info */
- H5A_info_t ainfo2; /* Attribute info */
- hssize_t nelmts; /* # of elements in dataspace */
- void *rbuf = NULL; /* Buffer for reading raw data */
- void *rbuf2 = NULL; /* Buffer for reading raw data */
+ hid_t sid = H5I_INVALID_HID, sid2 = H5I_INVALID_HID; /* Dataspace IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
+ size_t elmt_size; /* Size of datatype */
+ htri_t is_committed; /* If the datatype is committed */
+ htri_t is_committed2; /* If the datatype is committed */
+ H5A_info_t ainfo; /* Attribute info */
+ H5A_info_t ainfo2; /* Attribute info */
+ hssize_t nelmts; /* # of elements in dataspace */
+ void *rbuf = NULL; /* Buffer for reading raw data */
+ void *rbuf2 = NULL; /* Buffer for reading raw data */
/* Check the character sets are equal */
if (H5Aget_info(aid, &ainfo) < 0)
@@ -583,7 +584,7 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_
TEST_ERROR;
/* Compare the datatypes */
- if (H5Tequal(tid, tid2) != TRUE)
+ if (H5Tequal(tid, tid2) != true)
TEST_ERROR;
/* Determine the size of datatype (for later) */
@@ -601,7 +602,7 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_
TEST_ERROR;
/* Compare the dataspaces */
- if (H5Sextent_equal(sid, sid2) != TRUE)
+ if (H5Sextent_equal(sid, sid2) != true)
TEST_ERROR;
/* Determine the number of elements in dataspace (for later) */
@@ -636,10 +637,10 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_
TEST_ERROR;
/* Reclaim vlen data, if necessary */
- if (H5Tdetect_class(tid, H5T_VLEN) == TRUE || H5Tdetect_class(tid, H5T_REFERENCE) == TRUE)
+ if (H5Tdetect_class(tid, H5T_VLEN) == true || H5Tdetect_class(tid, H5T_REFERENCE) == true)
if (H5Treclaim(tid, sid, H5P_DEFAULT, rbuf) < 0)
TEST_ERROR;
- if (H5Tdetect_class(tid2, H5T_VLEN) == TRUE || H5Tdetect_class(tid2, H5T_REFERENCE) == TRUE)
+ if (H5Tdetect_class(tid2, H5T_VLEN) == true || H5Tdetect_class(tid2, H5T_REFERENCE) == true)
if (H5Treclaim(tid2, sid2, H5P_DEFAULT, rbuf2) < 0)
TEST_ERROR;
@@ -665,7 +666,7 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_
if (H5Tclose(tid2) < 0)
TEST_ERROR;
- return TRUE;
+ return true;
error:
if (rbuf)
@@ -680,7 +681,7 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_
H5Tclose(tid);
}
H5E_END_TRY
- return FALSE;
+ return false;
} /* end compare_attribute() */
/*-------------------------------------------------------------------------
@@ -688,7 +689,7 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_
*
* Purpose: Compare "standard" attributes on two objects to check that they are equal
*
- * Return: TRUE if objects have same attributes/FALSE if they are different
+ * Return: true if objects have same attributes/false if they are different
*
* Note: This isn't very general, the attributes are assumed to be
* those written in test_copy_attach_attributes().
@@ -698,9 +699,9 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_
static int
compare_std_attributes(hid_t oid, hid_t oid2, hid_t pid)
{
- hid_t aid = -1, aid2 = -1; /* Attribute IDs */
- H5O_info2_t oinfo1, oinfo2; /* Object info */
- unsigned cpy_flags; /* Object copy flags */
+ hid_t aid = H5I_INVALID_HID, aid2 = H5I_INVALID_HID; /* Attribute IDs */
+ H5O_info2_t oinfo1, oinfo2; /* Object info */
+ unsigned cpy_flags; /* Object copy flags */
/* Retrieve the object copy flags from the property list, if it's non-DEFAULT */
if (pid != H5P_DEFAULT) {
@@ -755,7 +756,7 @@ compare_std_attributes(hid_t oid, hid_t oid2, hid_t pid)
} /* end if */
/* Objects should be the same. :-) */
- return TRUE;
+ return true;
error:
H5E_BEGIN_TRY
@@ -764,7 +765,7 @@ compare_std_attributes(hid_t oid, hid_t oid2, hid_t pid)
H5Aclose(aid);
}
H5E_END_TRY
- return FALSE;
+ return false;
} /* end compare_std_attributes() */
/*-------------------------------------------------------------------------
@@ -772,7 +773,7 @@ compare_std_attributes(hid_t oid, hid_t oid2, hid_t pid)
*
* Purpose: Compare two buffers of data to check that they are equal
*
- * Return: TRUE if buffer are equal/FALSE if they are different
+ * Return: true if buffer are equal/false if they are different
*
*-------------------------------------------------------------------------
*/
@@ -789,7 +790,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
/* If the type is a compound containing a vlen, loop over all elements for
* each compound member. Compounds containing reference are not supported
* yet. */
- if ((H5Tget_class(tid) == H5T_COMPOUND) && (H5Tdetect_class(tid, H5T_VLEN) == TRUE)) {
+ if ((H5Tget_class(tid) == H5T_COMPOUND) && (H5Tdetect_class(tid, H5T_VLEN) == true)) {
hid_t memb_id; /* Member id */
const uint8_t *memb1; /* Pointer to current member */
const uint8_t *memb2; /* Pointer to current member */
@@ -852,7 +853,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
else {
/* vlens cannot currently be nested below the top layer of a
* compound */
- assert(H5Tdetect_class(memb_id, H5T_VLEN) == FALSE);
+ assert(H5Tdetect_class(memb_id, H5T_VLEN) == false);
/* Iterate over all elements, calling memcmp() for each */
for (elmt = 0; elmt < nelmts; elmt++) {
@@ -866,7 +867,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
} /* end else */
} /* end for */
}
- else if (H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ else if (H5Tdetect_class(tid, H5T_VLEN) == true) {
const hvl_t *vl_buf1, *vl_buf2; /* Aliases for buffers to compare */
hid_t base_tid; /* Base type of vlen datatype */
size_t u; /* Local index variable */
@@ -896,7 +897,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
if (H5Tclose(base_tid) < 0)
TEST_ERROR;
} /* end if */
- else if (H5Tdetect_class(tid, H5T_REFERENCE) == TRUE) {
+ else if (H5Tdetect_class(tid, H5T_REFERENCE) == true) {
size_t u; /* Local index variable */
/* Check for "simple" reference datatype */
@@ -946,24 +947,24 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
TEST_ERROR;
if (H5Oclose(obj2_id) < 0)
TEST_ERROR;
- return TRUE;
+ return true;
}
}
/* Check for types of objects handled */
switch (obj1_type) {
case H5O_TYPE_DATASET:
- if (compare_datasets(obj1_id, obj2_id, pid, NULL) != TRUE)
+ if (compare_datasets(obj1_id, obj2_id, pid, NULL) != true)
TEST_ERROR;
break;
case H5O_TYPE_GROUP:
- if (compare_groups(obj1_id, obj2_id, pid, -1, 0) != TRUE)
+ if (compare_groups(obj1_id, obj2_id, pid, -1, 0) != true)
TEST_ERROR;
break;
case H5O_TYPE_NAMED_DATATYPE:
- if (H5Tequal(obj1_id, obj2_id) != TRUE)
+ if (H5Tequal(obj1_id, obj2_id) != true)
TEST_ERROR;
break;
@@ -1010,10 +1011,10 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
TEST_ERROR;
/* Data should be the same. :-) */
- return TRUE;
+ return true;
error:
- return FALSE;
+ return false;
} /* end compare_data() */
/*-------------------------------------------------------------------------
@@ -1021,25 +1022,25 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
*
* Purpose: Compare two datasets to check that they are equal
*
- * Return: TRUE if datasets are equal/FALSE if they are different
+ * Return: true if datasets are equal/false if they are different
*
*-------------------------------------------------------------------------
*/
static int
compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
{
- hid_t sid = -1, sid2 = -1; /* Dataspace IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype IDs */
- hid_t dcpl = -1, dcpl2 = -1; /* Dataset creation property list IDs */
- size_t elmt_size; /* Size of datatype */
- htri_t is_committed; /* If the datatype is committed */
- htri_t is_committed2; /* If the datatype is committed */
- int nfilters; /* Number of filters applied to dataset */
- hssize_t nelmts; /* # of elements in dataspace */
- void *rbuf = NULL; /* Buffer for reading raw data */
- void *rbuf2 = NULL; /* Buffer for reading raw data */
- H5D_space_status_t space_status; /* Dataset's raw dataspace status */
- H5D_space_status_t space_status2; /* Dataset's raw dataspace status */
+ hid_t sid = H5I_INVALID_HID, sid2 = H5I_INVALID_HID; /* Dataspace IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
+ hid_t dcpl = H5I_INVALID_HID, dcpl2 = H5I_INVALID_HID; /* Dataset creation property list IDs */
+ size_t elmt_size; /* Size of datatype */
+ htri_t is_committed; /* If the datatype is committed */
+ htri_t is_committed2; /* If the datatype is committed */
+ int nfilters; /* Number of filters applied to dataset */
+ hssize_t nelmts; /* # of elements in dataspace */
+ void *rbuf = NULL; /* Buffer for reading raw data */
+ void *rbuf2 = NULL; /* Buffer for reading raw data */
+ H5D_space_status_t space_status; /* Dataset's raw dataspace status */
+ H5D_space_status_t space_status2; /* Dataset's raw dataspace status */
/* Check the datatypes are equal */
@@ -1060,7 +1061,7 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
TEST_ERROR;
/* Compare the datatypes */
- if (H5Tequal(tid, tid2) != TRUE)
+ if (H5Tequal(tid, tid2) != true)
TEST_ERROR;
/* Determine the size of datatype (for later) */
@@ -1078,7 +1079,7 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
TEST_ERROR;
/* Compare the dataspaces */
- if (H5Sextent_equal(sid, sid2) != TRUE)
+ if (H5Sextent_equal(sid, sid2) != true)
TEST_ERROR;
/* Determine the number of elements in dataspace (for later) */
@@ -1096,7 +1097,7 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
TEST_ERROR;
/* Compare the rest of the dataset creation property lists */
- if (H5Pequal(dcpl, dcpl2) != TRUE)
+ if (H5Pequal(dcpl, dcpl2) != true)
TEST_ERROR;
/* Get the number of filters on dataset (for later) */
@@ -1162,10 +1163,10 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
TEST_ERROR;
/* Reclaim vlen data, if necessary */
- if (H5Tdetect_class(tid, H5T_VLEN) == TRUE || H5Tdetect_class(tid, H5T_REFERENCE) == TRUE)
+ if (H5Tdetect_class(tid, H5T_VLEN) == true || H5Tdetect_class(tid, H5T_REFERENCE) == true)
if (H5Treclaim(tid, sid, H5P_DEFAULT, rbuf) < 0)
TEST_ERROR;
- if (H5Tdetect_class(tid2, H5T_VLEN) == TRUE || H5Tdetect_class(tid2, H5T_REFERENCE) == TRUE)
+ if (H5Tdetect_class(tid2, H5T_VLEN) == true || H5Tdetect_class(tid2, H5T_REFERENCE) == true)
if (H5Treclaim(tid2, sid2, H5P_DEFAULT, rbuf2) < 0)
TEST_ERROR;
@@ -1192,11 +1193,11 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
TEST_ERROR;
/* Check if the attributes are equal */
- if (compare_std_attributes(did, did2, pid) != TRUE)
+ if (compare_std_attributes(did, did2, pid) != true)
TEST_ERROR;
/* Datasets should be the same. :-) */
- return TRUE;
+ return true;
error:
H5E_BEGIN_TRY
@@ -1213,7 +1214,7 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
H5Tclose(tid);
}
H5E_END_TRY
- return FALSE;
+ return false;
} /* end compare_datasets() */
/*-------------------------------------------------------------------------
@@ -1221,7 +1222,7 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
*
* Purpose: Compare two groups to check that they are "equal"
*
- * Return: TRUE if group are equal/FALSE if they are different
+ * Return: true if group are equal/false if they are different
*
*-------------------------------------------------------------------------
*/
@@ -1271,7 +1272,7 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
if (H5Lget_name_by_idx(gid2, ".", H5_INDEX_NAME, H5_ITER_INC, idx, objname2,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, objname2) != 0)
+ if (strcmp(objname, objname2) != 0)
TEST_ERROR;
/* Get link info */
@@ -1334,19 +1335,19 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
switch (oinfo.type) {
case H5O_TYPE_GROUP:
/* Compare groups */
- if (compare_groups(oid, oid2, pid, depth - 1, copy_flags) != TRUE)
+ if (compare_groups(oid, oid2, pid, depth - 1, copy_flags) != true)
TEST_ERROR;
break;
case H5O_TYPE_DATASET:
/* Compare datasets */
- if (compare_datasets(oid, oid2, pid, NULL) != TRUE)
+ if (compare_datasets(oid, oid2, pid, NULL) != true)
TEST_ERROR;
break;
case H5O_TYPE_NAMED_DATATYPE:
/* Compare datatypes */
- if (H5Tequal(oid, oid2) != TRUE)
+ if (H5Tequal(oid, oid2) != true)
TEST_ERROR;
break;
@@ -1402,18 +1403,18 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
} /* end if */
/* Check if the attributes are equal */
- if (compare_std_attributes(gid, gid2, pid) != TRUE)
+ if (compare_std_attributes(gid, gid2, pid) != true)
TEST_ERROR;
/* Groups should be the same. :-) */
- return TRUE;
+ return true;
error:
H5E_BEGIN_TRY
{
}
H5E_END_TRY
- return FALSE;
+ return false;
} /* end compare_groups() */
/*-------------------------------------------------------------------------
@@ -1428,16 +1429,16 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
*/
static int
test_copy_option(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, unsigned flag,
- hbool_t crt_intermediate_grp, const char *test_desciption)
+ bool crt_intermediate_grp, const char *test_desciption)
{
- hid_t fid_src = -1, fid_dst = -1, fid_ext = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t gid = -1, gid2 = -1, gid_ref = -1; /* Group IDs */
- hid_t gid_sub = -1, gid_sub_sub = -1; /* Sub-group ID */
- hid_t pid = -1, lcpl_id = -1; /* Property IDs */
- unsigned cpy_flags; /* Object copy flags */
- int depth = -1; /* Copy depth */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID, fid_ext = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID, gid_ref = H5I_INVALID_HID; /* Group IDs */
+ hid_t gid_sub = H5I_INVALID_HID, gid_sub_sub = H5I_INVALID_HID; /* Sub-group ID */
+ hid_t pid = H5I_INVALID_HID, lcpl_id = H5I_INVALID_HID; /* Property IDs */
+ unsigned cpy_flags; /* Object copy flags */
+ int depth = -1; /* Copy depth */
hsize_t dim2d[2];
int buf[DIM_SIZE_1][DIM_SIZE_2];
int i, j;
@@ -1675,7 +1676,7 @@ test_copy_option(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
/* Create link creation plist to pass in intermediate group creation */
if ((lcpl_id = H5Pcreate(H5P_LINK_CREATE)) < 0)
TEST_ERROR;
- if (H5Pset_create_intermediate_group(lcpl_id, TRUE) < 0)
+ if (H5Pset_create_intermediate_group(lcpl_id, true) < 0)
TEST_ERROR;
if (H5Ocopy(fid_src, NAME_GROUP_TOP, fid_dst, "/new_g0/new_g00", pid, lcpl_id) < 0)
@@ -1755,7 +1756,7 @@ test_copy_option(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
} /* end else */
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, pid, depth, flag) != TRUE)
+ if (compare_groups(gid, gid2, pid, depth, flag) != true)
TEST_ERROR;
if (H5Gclose(gid2) < 0)
TEST_ERROR;
@@ -1869,56 +1870,56 @@ main(void)
/* Test with and without shared messages */
if (configuration & CONFIG_SHARE_SRC) {
- HDputs("\nTesting with shared src messages:");
+ puts("\nTesting with shared src messages:");
fcpl_src = fcpl_shared;
}
else {
- HDputs("\nTesting without shared src messages:");
+ puts("\nTesting without shared src messages:");
fcpl_src = H5P_DEFAULT;
}
if (configuration & CONFIG_SHARE_DST) {
- HDputs("Testing with shared dst messages:");
+ puts("Testing with shared dst messages:");
fcpl_dst = fcpl_shared;
}
else {
- HDputs("Testing without shared dst messages:");
+ puts("Testing without shared dst messages:");
fcpl_dst = H5P_DEFAULT;
}
/* Set the FAPL for the source file's type of format */
if (configuration & CONFIG_SRC_NEW_FORMAT) {
- HDputs("Testing with latest format for source file:");
+ puts("Testing with latest format for source file:");
src_fapl = fapl2;
/* Test with and without dense attributes */
if (configuration & CONFIG_DENSE) {
- HDputs("Testing with dense attributes:");
+ puts("Testing with dense attributes:");
num_attributes_g = max_compact + 1;
}
else {
- HDputs("Testing without dense attributes:");
+ puts("Testing without dense attributes:");
num_attributes_g = MAX(min_dense, 2) - 2;
}
} /* end if */
else {
- HDputs("Testing with oldest file format for source file:");
+ puts("Testing with oldest file format for source file:");
src_fapl = fapl;
num_attributes_g = 4;
} /* end else */
/* Set the FAPL for the destination file's type of format */
if (configuration & CONFIG_DST_NEW_FORMAT) {
- HDputs("Testing with latest format for destination file:");
+ puts("Testing with latest format for destination file:");
dst_fapl = fapl2;
} /* end if */
else {
- HDputs("Testing with oldest file format for destination file:");
+ puts("Testing with oldest file format for destination file:");
dst_fapl = fapl;
} /* end else */
/* The tests... */
nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl, H5O_COPY_EXPAND_REFERENCE_FLAG,
- FALSE, "H5Ocopy(): expand object reference");
+ false, "H5Ocopy(): expand object reference");
} /* end for */
/* Reset file token checking info */
@@ -1933,7 +1934,7 @@ main(void)
exit(EXIT_FAILURE);
} /* end if */
- HDputs("All object copying tests passed.");
+ puts("All object copying tests passed.");
/* close property list.
* NOTE: if this property list is not closed and the test is
diff --git a/test/ohdr.c b/test/ohdr.c
index 95a4dc34800..99b979b0777 100644
--- a/test/ohdr.c
+++ b/test/ohdr.c
@@ -68,7 +68,7 @@ static const char *FILENAME[] = {"ohdr", "ohdr_min_a", "ohdr_min_b", NULL};
static herr_t
test_cont(char *filename, hid_t fapl)
{
- hid_t file = -1;
+ hid_t file = H5I_INVALID_HID;
H5F_t *f = NULL;
H5O_hdr_info_t hdr_info;
H5O_loc_t oh_locA, oh_locB;
@@ -138,7 +138,7 @@ test_cont(char *filename, hid_t fapl)
nchunks = hdr_info.nchunks;
/* remove the 1st H5O_NAME_ID message */
- if (H5O_msg_remove(&oh_locA, H5O_NAME_ID, 0, FALSE) < 0)
+ if (H5O_msg_remove(&oh_locA, H5O_NAME_ID, 0, false) < 0)
FAIL_STACK_ERROR;
if (H5O_get_hdr_info(&oh_locA, &hdr_info) < 0)
@@ -181,7 +181,7 @@ test_cont(char *filename, hid_t fapl)
static herr_t
test_ohdr_cache(char *filename, hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
hid_t my_fapl; /* FAPL ID */
H5AC_cache_config_t mdc_config; /* Metadata cache configuration info */
H5F_t *f = NULL; /* File handle */
@@ -201,7 +201,7 @@ test_ohdr_cache(char *filename, hid_t fapl)
mdc_config.version = H5AC__CURR_CACHE_CONFIG_VERSION;
if (H5Pget_mdc_config(my_fapl, &mdc_config) < 0)
FAIL_STACK_ERROR;
- mdc_config.set_initial_size = TRUE;
+ mdc_config.set_initial_size = true;
mdc_config.initial_size = 32 * 1024;
mdc_config.max_size = 64 * 1024;
mdc_config.min_size = 8 * 1024;
@@ -316,19 +316,19 @@ test_ohdr_cache(char *filename, hid_t fapl)
* bytes. For SWMR access, the read should be done all at one time.
*/
static herr_t
-test_ohdr_swmr(hbool_t new_format)
+test_ohdr_swmr(bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t fapl = -1; /* File access property list */
- hid_t did = -1; /* Dataset ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t plist = -1; /* Dataset creation property list */
- size_t compact_size = 1024; /* The size of compact dataset */
- int *wbuf = NULL; /* Buffer for writing */
- hsize_t dims[1]; /* Dimension sizes */
- size_t u; /* Iterator */
- int n; /* Data variable */
- H5O_native_info_t ninfo; /* Information for the object */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t plist = H5I_INVALID_HID; /* Dataset creation property list */
+ size_t compact_size = 1024; /* The size of compact dataset */
+ int *wbuf = NULL; /* Buffer for writing */
+ hsize_t dims[1]; /* Dimension sizes */
+ size_t u; /* Iterator */
+ int n; /* Data variable */
+ H5O_native_info_t ninfo; /* Information for the object */
if (new_format) {
TESTING("exercise the coding for the re-read of the object header for SWMR access: latest-format");
@@ -528,23 +528,23 @@ test_ohdr_badness(hid_t fapl)
static herr_t
test_unknown(unsigned bogus_id, char *filename, hid_t fapl)
{
- hid_t fid = -1; /* file ID */
- hid_t gid = -1; /* group ID */
- hid_t did = -1; /* Dataset ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t aid = -1; /* Attribute ID */
- hid_t loc = -1; /* location: file or group ID */
- hid_t fid_bogus = -1; /* bogus file ID */
- hid_t gid_bogus = -1; /* bogus group ID */
- hid_t loc_bogus = -1; /* location: bogus file or group ID */
+ hid_t fid = H5I_INVALID_HID; /* file ID */
+ hid_t gid = H5I_INVALID_HID; /* group ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ hid_t loc = H5I_INVALID_HID; /* location: file or group ID */
+ hid_t fid_bogus = H5I_INVALID_HID; /* bogus file ID */
+ hid_t gid_bogus = H5I_INVALID_HID; /* bogus group ID */
+ hid_t loc_bogus = H5I_INVALID_HID; /* location: bogus file or group ID */
char testfile[TESTFILE_LEN];
/* create a different name for a local copy of the data file to be
opened with rd/wr file permissions in case build and test are
done in the source directory. */
- HDstrncpy(testfile, FILE_BOGUS, TESTFILE_LEN);
+ strncpy(testfile, FILE_BOGUS, TESTFILE_LEN);
testfile[TESTFILE_LEN - 1] = '\0';
- HDstrncat(testfile, ".copy", sizeof(testfile) - HDstrlen(testfile) - 1);
+ strncat(testfile, ".copy", sizeof(testfile) - strlen(testfile) - 1);
/* Make a copy of the data file from svn. */
if (h5_make_local_copy(FILE_BOGUS, testfile) < 0)
@@ -652,7 +652,7 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl)
FAIL_STACK_ERROR;
/* Check that the "unknown" message was _NOT_ marked */
- if (H5O__check_msg_marked_test(did, FALSE) < 0)
+ if (H5O__check_msg_marked_test(did, false) < 0)
FAIL_STACK_ERROR;
/* Close the dataset */
@@ -734,7 +734,7 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl)
FAIL_STACK_ERROR;
/* Check that the "unknown" message was marked */
- if (H5O__check_msg_marked_test(did, TRUE) < 0)
+ if (H5O__check_msg_marked_test(did, true) < 0)
FAIL_STACK_ERROR;
/* Close the dataset */
@@ -922,7 +922,7 @@ test_minimized_dset_ohdr_attribute_addition(hid_t fapl_id)
/* Set the 'no attrs' hint on the dcpl */
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) == H5I_INVALID_HID)
TEST_ERROR;
- if (H5Pset_dset_no_attrs_hint(dcpl_id, TRUE) < 0)
+ if (H5Pset_dset_no_attrs_hint(dcpl_id, true) < 0)
TEST_ERROR;
/* The dataset doesn't need to contain data */
@@ -945,7 +945,7 @@ test_minimized_dset_ohdr_attribute_addition(hid_t fapl_id)
* ADD A (STRING) ATTRIBUTE AND MANIPULATE IT *
**********************************************/
- buf_size = HDstrlen(ATTR_LONG) + 1;
+ buf_size = strlen(ATTR_LONG) + 1;
if (NULL == (in_buf = (char *)calloc(buf_size, sizeof(char))))
TEST_ERROR;
if (NULL == (out_buf = (char *)calloc(buf_size, sizeof(char))))
@@ -964,7 +964,7 @@ test_minimized_dset_ohdr_attribute_addition(hid_t fapl_id)
TEST_ERROR;
/* Write attribute data */
- HDstrcpy(in_buf, ATTR_SHORT);
+ strcpy(in_buf, ATTR_SHORT);
if (H5Awrite(aid, H5T_NATIVE_CHAR, in_buf) < 0)
TEST_ERROR;
@@ -975,12 +975,12 @@ test_minimized_dset_ohdr_attribute_addition(hid_t fapl_id)
/* Read the data back and verify */
if (H5Aread(aid, H5T_NATIVE_CHAR, out_buf) < 0)
TEST_ERROR;
- if (HDstrcmp(in_buf, out_buf) != 0)
+ if (strcmp(in_buf, out_buf) != 0)
TEST_ERROR;
/* modify the string attribute */
memset(in_buf, 0, buf_size);
- HDstrcpy(in_buf, ATTR_LONG);
+ strcpy(in_buf, ATTR_LONG);
if (H5Awrite(aid, H5T_NATIVE_CHAR, in_buf) < 0)
TEST_ERROR;
@@ -990,7 +990,7 @@ test_minimized_dset_ohdr_attribute_addition(hid_t fapl_id)
/* Read the data back and verify */
if (H5Aread(aid, H5T_NATIVE_CHAR, out_buf) < 0)
TEST_ERROR;
- if (HDstrcmp(in_buf, out_buf) != 0)
+ if (strcmp(in_buf, out_buf) != 0)
TEST_ERROR;
/* Close */
@@ -1010,7 +1010,7 @@ test_minimized_dset_ohdr_attribute_addition(hid_t fapl_id)
for (i = 0; i < N_ATTRS; i++) {
/* Set the attribute's name */
- if (HDsnprintf(attr_name, ATTR_NAME_MAX, "int_attr_%d", i) < 0)
+ if (snprintf(attr_name, ATTR_NAME_MAX, "int_attr_%d", i) < 0)
TEST_ERROR;
/* Create an integer attribute on the dataset */
@@ -1083,23 +1083,23 @@ test_minimized_dset_ohdr_size_comparisons(hid_t fapl_id)
unsigned compact = 0;
/* IDs that are file-agnostic */
- hid_t dspace_id = -1;
- hid_t int_type_id = -1;
- hid_t dcpl_minimize = -1;
- hid_t dcpl_dontmin = -1;
- hid_t dcpl_default = -1;
+ hid_t dspace_id = H5I_INVALID_HID;
+ hid_t int_type_id = H5I_INVALID_HID;
+ hid_t dcpl_minimize = H5I_INVALID_HID;
+ hid_t dcpl_dontmin = H5I_INVALID_HID;
+ hid_t dcpl_default = H5I_INVALID_HID;
/* IDs for non-minimized file open */
- hid_t file_f_id = -1; /* lower 'f' for standard file setting */
- hid_t dset_f_x_id = -1; /* 'x' for default */
- hid_t dset_f_N_id = -1; /* 'N' for explicit non-minimized dset */
- hid_t dset_f_Y_id = -1; /* 'Y' for minimized dset */
+ hid_t file_f_id = H5I_INVALID_HID; /* lower 'f' for standard file setting */
+ hid_t dset_f_x_id = H5I_INVALID_HID; /* 'x' for default */
+ hid_t dset_f_N_id = H5I_INVALID_HID; /* 'N' for explicit non-minimized dset */
+ hid_t dset_f_Y_id = H5I_INVALID_HID; /* 'Y' for minimized dset */
/* IDs for minimized file open */
- hid_t file_F_id = -1; /* upper 'F' for minimized file setting */
- hid_t dset_F_x_id = -1; /* 'x' for default */
- hid_t dset_F_N_id = -1; /* 'N' for explicit non-minimized dset */
- hid_t dset_F_Y_id = -1; /* 'Y' for minimized dset */
+ hid_t file_F_id = H5I_INVALID_HID; /* upper 'F' for minimized file setting */
+ hid_t dset_F_x_id = H5I_INVALID_HID; /* 'x' for default */
+ hid_t dset_F_N_id = H5I_INVALID_HID; /* 'N' for explicit non-minimized dset */
+ hid_t dset_F_Y_id = H5I_INVALID_HID; /* 'Y' for minimized dset */
char filename_a[512] = "";
char filename_b[512] = "";
@@ -1138,14 +1138,14 @@ test_minimized_dset_ohdr_size_comparisons(hid_t fapl_id)
dcpl_minimize = H5Pcreate(H5P_DATASET_CREATE);
if (dcpl_minimize < 0)
TEST_ERROR;
- ret = H5Pset_dset_no_attrs_hint(dcpl_minimize, TRUE);
+ ret = H5Pset_dset_no_attrs_hint(dcpl_minimize, true);
if (ret < 0)
TEST_ERROR;
dcpl_dontmin = H5Pcreate(H5P_DATASET_CREATE);
if (dcpl_dontmin < 0)
TEST_ERROR;
- ret = H5Pset_dset_no_attrs_hint(dcpl_dontmin, FALSE);
+ ret = H5Pset_dset_no_attrs_hint(dcpl_dontmin, false);
if (ret < 0)
TEST_ERROR;
@@ -1191,7 +1191,7 @@ test_minimized_dset_ohdr_size_comparisons(hid_t fapl_id)
file_F_id = H5Fcreate(filename_b, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
if (file_F_id < 0)
TEST_ERROR;
- ret = H5Fset_dset_no_attrs_hint(file_F_id, TRUE);
+ ret = H5Fset_dset_no_attrs_hint(file_F_id, true);
if (ret < 0)
TEST_ERROR;
@@ -1310,16 +1310,16 @@ test_minimized_dset_ohdr_with_filter(hid_t fapl_id)
const unsigned filter_values[] = {0}; /* TBD */
const hsize_t chunk_dim[] = {32}; /* needed for filter */
const int ndims = 1;
- hid_t dspace_id = -1;
- hid_t dtype_id = -1;
- hid_t dcpl_xZ_id = -1;
- hid_t dcpl_mx_id = -1;
- hid_t dcpl_mZ_id = -1;
- hid_t dset_xx_id = -1;
- hid_t dset_xZ_id = -1;
- hid_t dset_mx_id = -1;
- hid_t dset_mZ_id = -1;
- hid_t file_id = -1;
+ hid_t dspace_id = H5I_INVALID_HID;
+ hid_t dtype_id = H5I_INVALID_HID;
+ hid_t dcpl_xZ_id = H5I_INVALID_HID;
+ hid_t dcpl_mx_id = H5I_INVALID_HID;
+ hid_t dcpl_mZ_id = H5I_INVALID_HID;
+ hid_t dset_xx_id = H5I_INVALID_HID;
+ hid_t dset_xZ_id = H5I_INVALID_HID;
+ hid_t dset_mx_id = H5I_INVALID_HID;
+ hid_t dset_mZ_id = H5I_INVALID_HID;
+ hid_t file_id = H5I_INVALID_HID;
herr_t ret;
/* dcpl suffixes:
@@ -1342,7 +1342,7 @@ test_minimized_dset_ohdr_with_filter(hid_t fapl_id)
dcpl_mx_id = H5Pcreate(H5P_DATASET_CREATE);
if (dcpl_mx_id < 0)
TEST_ERROR;
- ret = H5Pset_dset_no_attrs_hint(dcpl_mx_id, TRUE);
+ ret = H5Pset_dset_no_attrs_hint(dcpl_mx_id, true);
if (ret < 0)
TEST_ERROR;
@@ -1358,7 +1358,7 @@ test_minimized_dset_ohdr_with_filter(hid_t fapl_id)
dcpl_mZ_id = H5Pcreate(H5P_DATASET_CREATE);
if (dcpl_mZ_id < 0)
TEST_ERROR;
- ret = H5Pset_dset_no_attrs_hint(dcpl_mZ_id, TRUE);
+ ret = H5Pset_dset_no_attrs_hint(dcpl_mZ_id, true);
if (ret < 0)
TEST_ERROR;
ret = H5Pset_chunk(dcpl_mZ_id, ndims, chunk_dim);
@@ -1469,19 +1469,19 @@ test_minimized_dset_ohdr_modification_times(hid_t _fapl_id)
char filename[512] = "";
const hsize_t extents[1] = {128}; /* extents of dataspace */
- hid_t dspace_id = -1;
- hid_t dtype_id = -1;
- hid_t dcpl_xT_id = -1; /* Track modtime */
- hid_t dcpl_mx_id = -1; /* minimized */
- hid_t dcpl_mT_id = -1; /* minimized, Track */
- hid_t dcpl_mN_id = -1; /* minimized, do Not track */
- hid_t dset_xx_id = -1;
- hid_t dset_xT_id = -1;
- hid_t dset_mx_id = -1;
- hid_t dset_mT_id = -1;
- hid_t dset_mN_id = -1;
- hid_t file_id = -1;
- hid_t fapl_id = -1;
+ hid_t dspace_id = H5I_INVALID_HID;
+ hid_t dtype_id = H5I_INVALID_HID;
+ hid_t dcpl_xT_id = H5I_INVALID_HID; /* Track modtime */
+ hid_t dcpl_mx_id = H5I_INVALID_HID; /* minimized */
+ hid_t dcpl_mT_id = H5I_INVALID_HID; /* minimized, Track */
+ hid_t dcpl_mN_id = H5I_INVALID_HID; /* minimized, do Not track */
+ hid_t dset_xx_id = H5I_INVALID_HID;
+ hid_t dset_xT_id = H5I_INVALID_HID;
+ hid_t dset_mx_id = H5I_INVALID_HID;
+ hid_t dset_mT_id = H5I_INVALID_HID;
+ hid_t dset_mN_id = H5I_INVALID_HID;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t fapl_id = H5I_INVALID_HID;
herr_t ret;
unsigned i = 0; /* for testcase loop */
@@ -1517,34 +1517,34 @@ test_minimized_dset_ohdr_modification_times(hid_t _fapl_id)
dcpl_mx_id = H5Pcreate(H5P_DATASET_CREATE);
if (dcpl_mx_id < 0)
TEST_ERROR;
- ret = H5Pset_dset_no_attrs_hint(dcpl_mx_id, TRUE);
+ ret = H5Pset_dset_no_attrs_hint(dcpl_mx_id, true);
if (ret < 0)
TEST_ERROR;
dcpl_xT_id = H5Pcreate(H5P_DATASET_CREATE);
if (dcpl_xT_id < 0)
TEST_ERROR;
- ret = H5Pset_obj_track_times(dcpl_xT_id, TRUE);
+ ret = H5Pset_obj_track_times(dcpl_xT_id, true);
if (ret < 0)
TEST_ERROR;
dcpl_mT_id = H5Pcreate(H5P_DATASET_CREATE);
if (dcpl_mT_id < 0)
TEST_ERROR;
- ret = H5Pset_dset_no_attrs_hint(dcpl_mT_id, TRUE);
+ ret = H5Pset_dset_no_attrs_hint(dcpl_mT_id, true);
if (ret < 0)
TEST_ERROR;
- ret = H5Pset_obj_track_times(dcpl_mT_id, TRUE);
+ ret = H5Pset_obj_track_times(dcpl_mT_id, true);
if (ret < 0)
TEST_ERROR;
dcpl_mN_id = H5Pcreate(H5P_DATASET_CREATE);
if (dcpl_mN_id < 0)
TEST_ERROR;
- ret = H5Pset_dset_no_attrs_hint(dcpl_mN_id, TRUE);
+ ret = H5Pset_dset_no_attrs_hint(dcpl_mN_id, true);
if (ret < 0)
TEST_ERROR;
- ret = H5Pset_obj_track_times(dcpl_mN_id, FALSE);
+ ret = H5Pset_obj_track_times(dcpl_mN_id, false);
if (ret < 0)
TEST_ERROR;
@@ -1686,13 +1686,13 @@ test_minimized_dset_ohdr_fillvalue_backwards_compatability(hid_t _fapl_id)
char filename[512] = "";
const hsize_t extents[1] = {64}; /* extents of dataspace */
const int fill[1] = {343}; /* fill value of dataset */
- hid_t file_id = -1;
- hid_t dtype_id = -1;
- hid_t dspace_id = -1;
- hid_t dcpl_id = -1;
- hid_t fapl_id = -1;
- hid_t dset_0_id = -1;
- hid_t dset_1_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t dtype_id = H5I_INVALID_HID;
+ hid_t dspace_id = H5I_INVALID_HID;
+ hid_t dcpl_id = H5I_INVALID_HID;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t dset_0_id = H5I_INVALID_HID;
+ hid_t dset_1_id = H5I_INVALID_HID;
herr_t ret;
/*********
@@ -1720,7 +1720,7 @@ test_minimized_dset_ohdr_fillvalue_backwards_compatability(hid_t _fapl_id)
if (dcpl_id < 0)
TEST_ERROR;
- ret = H5Pset_dset_no_attrs_hint(dcpl_id, TRUE);
+ ret = H5Pset_dset_no_attrs_hint(dcpl_id, true);
if (ret == FAIL)
TEST_ERROR;
@@ -1824,22 +1824,22 @@ test_minimized_dset_ohdr_fillvalue_backwards_compatability(hid_t _fapl_id)
int
main(void)
{
- hid_t fapl = -1;
- hid_t file = -1;
+ hid_t fapl = H5I_INVALID_HID;
+ hid_t file = H5I_INVALID_HID;
H5F_t *f = NULL;
const char *env_h5_drvr; /* File driver value from environment */
- hbool_t single_file_vfd; /* Whether VFD used stores data in a single file */
+ bool single_file_vfd; /* Whether VFD used stores data in a single file */
char filename[1024];
H5O_hdr_info_t hdr_info; /* Object info */
H5O_loc_t oh_loc; /* Object header locations */
H5F_libver_t low, high; /* File format bounds */
time_t time_new, ro;
int i; /* Local index variable */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
herr_t ret; /* Generic return value */
/* Get the VFD to use */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
@@ -1854,7 +1854,7 @@ main(void)
/* Push API context */
if (H5CX_push() < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Loop through all the combinations of low/high library format bounds */
for (low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) {
@@ -1876,8 +1876,8 @@ main(void)
/* Display info about testing */
low_string = h5_get_version_string(low);
high_string = h5_get_version_string(high);
- HDsnprintf(msg, sizeof(msg), "Using file format version: (%s, %s)", low_string, high_string);
- HDputs(msg);
+ snprintf(msg, sizeof(msg), "Using file format version: (%s, %s)", low_string, high_string);
+ puts(msg);
/* test on object continuation block */
if (test_cont(filename, fapl) < 0)
@@ -2029,9 +2029,9 @@ main(void)
* Delete all time messages.
*/
TESTING("message deletion");
- if (H5O_msg_remove(&oh_loc, H5O_MTIME_NEW_ID, H5O_ALL, TRUE) < 0)
+ if (H5O_msg_remove(&oh_loc, H5O_MTIME_NEW_ID, H5O_ALL, true) < 0)
FAIL_STACK_ERROR;
- if (H5O_msg_remove(&oh_loc, H5O_MTIME_ID, H5O_ALL, TRUE) < 0)
+ if (H5O_msg_remove(&oh_loc, H5O_MTIME_ID, H5O_ALL, true) < 0)
FAIL_STACK_ERROR;
if (H5O_msg_read(&oh_loc, H5O_MTIME_NEW_ID, &ro))
FAIL_STACK_ERROR;
@@ -2067,7 +2067,7 @@ main(void)
H5E_END_TRY
if (ret >= 0)
TEST_ERROR;
- if (H5O_msg_remove(&oh_loc, H5O_MTIME_NEW_ID, H5O_ALL, TRUE) < 0)
+ if (H5O_msg_remove(&oh_loc, H5O_MTIME_NEW_ID, H5O_ALL, true) < 0)
FAIL_STACK_ERROR;
PASSED();
@@ -2084,23 +2084,23 @@ main(void)
/* Test reading datasets with undefined object header messages
* and the various "fail/mark if unknown" object header message flags
*/
- HDputs("Accessing objects with unknown header messages: H5O_BOGUS_VALID_ID");
+ puts("Accessing objects with unknown header messages: H5O_BOGUS_VALID_ID");
if (single_file_vfd) {
if (test_unknown(H5O_BOGUS_VALID_ID, filename, fapl) < 0)
TEST_ERROR;
} /* end if */
else {
SKIPPED();
- HDputs(" Unknown header message test not supported with the current VFD.");
+ puts(" Unknown header message test not supported with the current VFD.");
} /* end else */
- HDputs("Accessing objects with unknown header messages: H5O_BOGUS_INVALID_ID");
+ puts("Accessing objects with unknown header messages: H5O_BOGUS_INVALID_ID");
if (single_file_vfd) {
if (test_unknown(H5O_BOGUS_INVALID_ID, filename, fapl) < 0)
TEST_ERROR;
} /* end if */
else {
SKIPPED();
- HDputs(" Unknown header message test not supported with the current VFD.");
+ puts(" Unknown header message test not supported with the current VFD.");
} /* end else */
/* Test object header creation metadata cache issues */
@@ -2134,25 +2134,25 @@ main(void)
if (H5FD__supports_swmr_test(env_h5_drvr)) {
/* A test to exercise the re-read of the object header for SWMR access */
- if (test_ohdr_swmr(TRUE) < 0)
+ if (test_ohdr_swmr(true) < 0)
TEST_ERROR;
- if (test_ohdr_swmr(FALSE) < 0)
+ if (test_ohdr_swmr(false) < 0)
TEST_ERROR;
}
else
- HDputs("Skipped SWMR tests for SWMR-incompatible VFD");
+ puts("Skipped SWMR tests for SWMR-incompatible VFD");
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
- HDputs("All object header tests passed.");
+ puts("All object header tests passed.");
h5_cleanup(FILENAME, fapl);
return 0;
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
H5E_BEGIN_TRY
{
H5Fclose(file);
@@ -2160,7 +2160,7 @@ main(void)
H5E_END_TRY
if (api_ctx_pushed)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
return 1;
} /* end main() */
diff --git a/test/onion.c b/test/onion.c
index 51e5d249e81..5b9bb929dc6 100644
--- a/test/onion.c
+++ b/test/onion.c
@@ -68,7 +68,7 @@ struct write_info {
const unsigned char *buf;
};
struct revise_revision {
- hbool_t truncate; /* onion-create, truncating any existing data */
+ bool truncate; /* onion-create, truncating any existing data */
uint64_t revision_num;
size_t n_writes;
struct write_info writes[ONION_TEST_REV_REV_WRITES_MAX];
@@ -119,15 +119,15 @@ onion_filepaths_init(const char *basename)
if (NULL == (paths->canon = malloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE)))
TEST_ERROR;
- HDsnprintf(paths->canon, ONION_TEST_FIXNAME_SIZE, "%s", basename);
+ snprintf(paths->canon, ONION_TEST_FIXNAME_SIZE, "%s", basename);
if (NULL == (paths->onion = malloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE)))
TEST_ERROR;
- HDsnprintf(paths->onion, ONION_TEST_FIXNAME_SIZE, "%s.onion", paths->canon);
+ snprintf(paths->onion, ONION_TEST_FIXNAME_SIZE, "%s.onion", paths->canon);
if (NULL == (paths->recovery = malloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE)))
TEST_ERROR;
- HDsnprintf(paths->recovery, ONION_TEST_FIXNAME_SIZE, "%s.onion.recovery", paths->canon);
+ snprintf(paths->recovery, ONION_TEST_FIXNAME_SIZE, "%s.onion.recovery", paths->canon);
return paths;
@@ -848,7 +848,7 @@ test_fapl(void)
TEST_ERROR;
if (0 != info_out.force_write_open)
TEST_ERROR;
- if (HDstrcmp(info_in.comment, info_out.comment))
+ if (strcmp(info_in.comment, info_out.comment))
TEST_ERROR;
/* Cleanup */
@@ -1285,7 +1285,7 @@ test_revision_record_encode_decode(void)
0, 0, 0, 0, /* Bytes 080-083: checksum (populated below) */
/* ENTRY 1 */
0, 0xF0, 0x2E, 0, 0, 0, 0, 0, /* Bytes 084-091: entry 1: logical offset */
- 0xA7, 0, 0, 0, 0, 0, 0, 0, /* Bytes 092-099: entry 1: physical address */
+ 0xA7, 0, 0, 0, 0, 0, 0, 0, /* Bytes 092-099: entry 1: physical address */
0, 0, 0, 0, /* Bytes 100-103: checksum (populated below) */
/* ENTRY 2 */
0, 0x50, 0x15, 0, 0, 0x20, 0, 0, /* Bytes 104-111: entry 2: logical offset */
@@ -1308,7 +1308,7 @@ test_revision_record_encode_decode(void)
uint64_t size_ret;
H5FD_onion_revision_record_t r_out;
uint32_t checksum = 0;
- hbool_t badness = FALSE;
+ bool badness = false;
char comment[25] = "Example comment message.";
H5FD_onion_revision_record_t record = {
H5FD_ONION_REVISION_RECORD_VERSION_CURR,
@@ -1328,7 +1328,7 @@ test_revision_record_encode_decode(void)
};
size_t exp_size = H5FD_ONION_ENCODED_SIZE_REVISION_RECORD +
(H5FD_ONION_ENCODED_SIZE_INDEX_ENTRY * record.archival_index.n_entries) +
- HDstrlen("Example comment message.") + 1;
+ strlen("Example comment message.") + 1;
r_out.archival_index.list = NULL;
r_out.comment = NULL;
@@ -1386,7 +1386,7 @@ test_revision_record_encode_decode(void)
for (i = 0; i < exp_size; i++) {
if (exp[i] != buf[i]) {
- badness = TRUE;
+ badness = true;
printf("Bad encoded record - Index %zu: expected 0x%02X but got 0x%02X\n", i,
(unsigned int)exp[i], (unsigned int)buf[i]);
}
@@ -1478,15 +1478,15 @@ test_revision_record_encode_decode(void)
TEST_ERROR;
if (record.checksum != r_out.checksum)
TEST_ERROR;
- if (HDstrncmp(record.time_of_creation, r_out.time_of_creation, 16) != 0)
+ if (strncmp(record.time_of_creation, r_out.time_of_creation, 16) != 0)
TEST_ERROR;
if (record.comment_size != r_out.comment_size)
TEST_ERROR;
- if (record.comment_size != HDstrlen(r_out.comment) + 1)
+ if (record.comment_size != strlen(r_out.comment) + 1)
TEST_ERROR;
- if (HDstrlen(record.comment) != HDstrlen(r_out.comment))
+ if (strlen(record.comment) != strlen(r_out.comment))
TEST_ERROR;
- if (HDstrcmp(record.comment, r_out.comment) != 0)
+ if (strcmp(record.comment, r_out.comment) != 0)
TEST_ERROR;
if (H5FD_ONION_ARCHIVAL_INDEX_VERSION_CURR != r_out.archival_index.version)
@@ -1766,9 +1766,9 @@ verify_history_as_expected_onion(H5FD_t *raw_file, struct expected_history *filt
TEST_ERROR;
}
else {
- if (HDstrlen(rev_out.comment) != HDstrlen(erp->comment))
+ if (strlen(rev_out.comment) != strlen(erp->comment))
TEST_ERROR;
- if (HDstrcmp(rev_out.comment, erp->comment) != 0)
+ if (strcmp(rev_out.comment, erp->comment) != 0)
TEST_ERROR;
}
if (erp->n_index_entries != (uint64_t)(-1) &&
@@ -1897,9 +1897,9 @@ verify_stored_onion_create_0_open(struct onion_filepaths *paths, H5FD_onion_fapl
* Purpose: Test the ability of the Onion VFD to create a valid
* 'onionized' file.
*
- * When `truncate_canonical` is FALSE, the canonical file is
+ * When `truncate_canonical` is false, the canonical file is
* nonexistent on the backing store on onion-creation.
- * When `truncate_canonical` is TRUE, a canonical file is created
+ * When `truncate_canonical` is true, a canonical file is created
* on the backing store with known contents, which are to be
* truncated on onion-creation.
*
@@ -1908,7 +1908,7 @@ verify_stored_onion_create_0_open(struct onion_filepaths *paths, H5FD_onion_fapl
*-----------------------------------------------------------------------------
*/
static int
-test_create_oniontarget(hbool_t truncate_canonical, hbool_t with_initial_data)
+test_create_oniontarget(bool truncate_canonical, bool with_initial_data)
{
const char *basename = "somesuch";
hid_t fapl_id = H5I_INVALID_HID;
@@ -1929,11 +1929,11 @@ test_create_oniontarget(hbool_t truncate_canonical, hbool_t with_initial_data)
struct expected_history filter;
char *buf = NULL;
- if (TRUE == truncate_canonical && TRUE == with_initial_data)
+ if (true == truncate_canonical && true == with_initial_data)
TESTING("onion creation; truncate extant canonical; w/ initial data");
- else if (TRUE == truncate_canonical)
+ else if (true == truncate_canonical)
TESTING("onion creation; truncate extant canonical; no initial data");
- else if (TRUE == with_initial_data)
+ else if (true == with_initial_data)
TESTING("onion creation; no extant canonical; w/ initial data");
else
TESTING("onion creation; no extant canonical; no initial data");
@@ -1955,7 +1955,7 @@ test_create_oniontarget(hbool_t truncate_canonical, hbool_t with_initial_data)
HDremove(paths->recovery);
/* Create canonical file to be truncated */
- if (TRUE == truncate_canonical) {
+ if (true == truncate_canonical) {
/* Create canonical file. */
vfile_raw = H5FDopen(paths->canon, flags_create_s, onion_info.backing_fapl_id, HADDR_UNDEF);
if (NULL == vfile_raw)
@@ -2017,7 +2017,7 @@ test_create_oniontarget(hbool_t truncate_canonical, hbool_t with_initial_data)
* WRITING
*/
- if (TRUE == with_initial_data) {
+ if (true == with_initial_data) {
haddr_t half_size = 0;
haddr_t buf_size = 0;
@@ -2111,7 +2111,7 @@ test_create_oniontarget(hbool_t truncate_canonical, hbool_t with_initial_data)
filter.revisions[0].n_index_entries = (uint64_t)(-1); /* don't care */
filter.revisions[0].revision_num = 0;
filter.revisions[0].parent_revision_num = 0;
- filter.revisions[0].logical_eof = (TRUE == with_initial_data) ? a_list_size_s : 0;
+ filter.revisions[0].logical_eof = (true == with_initial_data) ? a_list_size_s : 0;
if (verify_history_as_expected_onion(vfile_raw, &filter) < 0)
TEST_ERROR;
@@ -2126,7 +2126,7 @@ test_create_oniontarget(hbool_t truncate_canonical, hbool_t with_initial_data)
if (NULL == vfile_ro)
TEST_ERROR;
- if (TRUE == with_initial_data) {
+ if (true == with_initial_data) {
/* Initial revision contains data */
if (H5FDget_eof(vfile_ro, H5FD_MEM_DRAW) != a_list_size_s)
TEST_ERROR;
@@ -2204,9 +2204,9 @@ test_create_oniontarget(hbool_t truncate_canonical, hbool_t with_initial_data)
* Purpose: Test the ability of the Onion VFD to create a valid
* 'onionized' file.
*
- * When `truncate_canonical` is FALSE, the canonical file is
+ * When `truncate_canonical` is false, the canonical file is
* nonexistent on the backing store on onion-creation.
- * When `truncate_canonical` is TRUE, a canonical file is created
+ * When `truncate_canonical` is true, a canonical file is created
* on the backing store with known contents, which are to be
* truncated on onion-creation.
*
@@ -2263,12 +2263,12 @@ test_several_revisions_with_logical_gaps(void)
HDremove(paths->recovery);
/* Empty first revision */
- about[0].truncate = TRUE;
+ about[0].truncate = true;
about[0].revision_num = H5FD_ONION_FAPL_INFO_REVISION_ID_LATEST;
about[0].comment = "first";
about[0].n_writes = 0;
- about[1].truncate = FALSE;
+ about[1].truncate = false;
about[1].revision_num = H5FD_ONION_FAPL_INFO_REVISION_ID_LATEST;
about[1].comment = "second";
about[1].n_writes = 1;
@@ -2276,7 +2276,7 @@ test_several_revisions_with_logical_gaps(void)
about[1].writes[0].size = a_list_size_s;
about[1].writes[0].buf = a_list_s;
- about[2].truncate = FALSE;
+ about[2].truncate = false;
about[2].revision_num = H5FD_ONION_FAPL_INFO_REVISION_ID_LATEST;
about[2].comment = "third";
about[2].n_writes = 1; /* TODO: several writes */
@@ -2284,7 +2284,7 @@ test_several_revisions_with_logical_gaps(void)
about[2].writes[0].size = b_list_size_s;
about[2].writes[0].buf = b_list_s;
- about[3].truncate = FALSE;
+ about[3].truncate = false;
about[3].revision_num = H5FD_ONION_FAPL_INFO_REVISION_ID_LATEST;
about[3].comment = "fourth";
about[3].n_writes = 1;
@@ -2577,15 +2577,15 @@ do_onion_open_and_writes(const char *filename, H5FD_onion_fapl_info_t *onion_inf
size_t j = 0;
unsigned int flags = H5F_ACC_RDWR;
- if (i != 0 && about[i].truncate == TRUE)
+ if (i != 0 && about[i].truncate == true)
goto error;
- if (TRUE == about[i].truncate)
+ if (true == about[i].truncate)
flags |= H5F_ACC_CREAT | H5F_ACC_TRUNC;
onion_info_p->revision_num = about[i].revision_num;
if (about[i].comment != NULL) {
- j = MIN(HDstrlen(about[i].comment), H5FD_ONION_FAPL_INFO_COMMENT_MAX_LEN);
+ j = MIN(strlen(about[i].comment), H5FD_ONION_FAPL_INFO_COMMENT_MAX_LEN);
memcpy(onion_info_p->comment, about[i].comment, j);
}
onion_info_p->comment[j] = '\0';
@@ -2615,7 +2615,7 @@ do_onion_open_and_writes(const char *filename, H5FD_onion_fapl_info_t *onion_inf
if (memcmp(buf_vfy, wi->buf, wi->size) != 0) {
const unsigned char *_buf = wi->buf;
size_t z = 0;
- HDputs("i exp act");
+ puts("i exp act");
for (z = 0; z < wi->size; z++)
printf("%02zx %c %c\n", z, _buf[z], buf_vfy[z]);
fflush(stdout);
@@ -2712,7 +2712,7 @@ test_page_aligned_history_create(void)
HDremove(paths->onion);
HDremove(paths->recovery);
- about[0].truncate = TRUE;
+ about[0].truncate = true;
about[0].revision_num = H5FD_ONION_FAPL_INFO_REVISION_ID_LATEST;
about[0].comment = "initial_commit";
about[0].n_writes = 1;
@@ -2720,7 +2720,7 @@ test_page_aligned_history_create(void)
about[0].writes[0].size = b_list_size_s;
about[0].writes[0].buf = b_list_s;
- about[1].truncate = FALSE;
+ about[1].truncate = false;
about[1].revision_num = H5FD_ONION_FAPL_INFO_REVISION_ID_LATEST;
about[1].comment = "second";
about[1].n_writes = 1;
@@ -2746,7 +2746,7 @@ test_page_aligned_history_create(void)
if (memcmp(a_list_s, buf + a_off, a_list_size_s) != 0) {
size_t k;
printf("aoff: %" PRIu64 "\n", a_off);
- HDputs("i exp act");
+ puts("i exp act");
for (k = 0; k < b_list_size_s; k++) {
printf("%3zu:: %c : %c\n", k, (k < a_off) ? ' ' : a_list_s[k - a_off], buf[k]);
}
@@ -2756,7 +2756,7 @@ test_page_aligned_history_create(void)
if (memcmp(b_list_s, buf, a_off) != 0) {
size_t k;
printf("aoff: %" PRIu64 "\n", a_off);
- HDputs("i exp act");
+ puts("i exp act");
for (k = 0; k < b_list_size_s; k++) {
printf("%3zu:: %c : %c\n", k, (k < a_off) ? b_list_s[k] : ' ', buf[k]);
}
@@ -4918,12 +4918,12 @@ main(void)
/* The onion VFD only supports the sec2 VFD under the hood, so skip this
* test when the environment variable has been set to something else
*/
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
- if ((0 != HDstrcmp(env_h5_drvr, "nomatch")) && (0 != HDstrcmp(env_h5_drvr, "sec2"))) {
+ if ((0 != strcmp(env_h5_drvr, "nomatch")) && (0 != strcmp(env_h5_drvr, "sec2"))) {
SKIPPED();
- HDputs("Onion VFD test skipped due to non-sec2 default VFD");
+ puts("Onion VFD test skipped due to non-sec2 default VFD");
exit(EXIT_SUCCESS);
}
@@ -4941,10 +4941,10 @@ main(void)
nerrors -= test_history_encode_decode_empty();
nerrors -= test_history_encode_decode();
nerrors -= test_revision_record_encode_decode();
- nerrors -= test_create_oniontarget(FALSE, FALSE);
- nerrors -= test_create_oniontarget(TRUE, FALSE);
- nerrors -= test_create_oniontarget(FALSE, TRUE);
- nerrors -= test_create_oniontarget(TRUE, TRUE);
+ nerrors -= test_create_oniontarget(false, false);
+ nerrors -= test_create_oniontarget(true, false);
+ nerrors -= test_create_oniontarget(false, true);
+ nerrors -= test_create_oniontarget(true, true);
nerrors -= test_several_revisions_with_logical_gaps();
nerrors -= test_page_aligned_history_create();
nerrors -= test_integration_create();
diff --git a/test/page_buffer.c b/test/page_buffer.c
index 6eed35f6061..651e84a348c 100644
--- a/test/page_buffer.c
+++ b/test/page_buffer.c
@@ -82,13 +82,13 @@ static const char *FILENAME[] = {"filepaged", NULL};
static unsigned
create_file(char *filename, hid_t fcpl, hid_t fapl)
{
- hid_t file_id = -1;
- hid_t dset_id = -1;
- hid_t grp_id = -1;
- hid_t filespace = -1;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t grp_id = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
hsize_t dimsf[2] = {NX, NY}; /* dataset dimensions */
int *data = NULL; /* pointer to data buffer to write */
- hid_t dcpl = -1;
+ hid_t dcpl = H5I_INVALID_HID;
int i;
int num_elements;
int j;
@@ -116,28 +116,28 @@ create_file(char *filename, hid_t fcpl, hid_t fapl)
for (i = 0; i < NUM_DSETS; i++) {
- HDsnprintf(dset_name, sizeof(dset_name), "D1dset%d", i);
+ snprintf(dset_name, sizeof(dset_name), "D1dset%d", i);
if ((dset_id = H5Dcreate2(grp_id, dset_name, H5T_NATIVE_INT, filespace, H5P_DEFAULT, dcpl,
H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
if (H5Dclose(dset_id) < 0)
FAIL_STACK_ERROR;
- HDsnprintf(dset_name, sizeof(dset_name), "D2dset%d", i);
+ snprintf(dset_name, sizeof(dset_name), "D2dset%d", i);
if ((dset_id = H5Dcreate2(grp_id, dset_name, H5T_NATIVE_INT, filespace, H5P_DEFAULT, dcpl,
H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
if (H5Dclose(dset_id) < 0)
FAIL_STACK_ERROR;
- HDsnprintf(dset_name, sizeof(dset_name), "D3dset%d", i);
+ snprintf(dset_name, sizeof(dset_name), "D3dset%d", i);
if ((dset_id = H5Dcreate2(grp_id, dset_name, H5T_NATIVE_INT, filespace, H5P_DEFAULT, dcpl,
H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
if (H5Dclose(dset_id) < 0)
FAIL_STACK_ERROR;
- HDsnprintf(dset_name, sizeof(dset_name), "dset%d", i);
+ snprintf(dset_name, sizeof(dset_name), "dset%d", i);
if ((dset_id = H5Dcreate2(grp_id, dset_name, H5T_NATIVE_INT, filespace, H5P_DEFAULT, dcpl,
H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
@@ -162,13 +162,13 @@ create_file(char *filename, hid_t fcpl, hid_t fapl)
}
}
- HDsnprintf(dset_name, sizeof(dset_name), "D1dset%d", i);
+ snprintf(dset_name, sizeof(dset_name), "D1dset%d", i);
if (H5Ldelete(grp_id, dset_name, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- HDsnprintf(dset_name, sizeof(dset_name), "D2dset%d", i);
+ snprintf(dset_name, sizeof(dset_name), "D2dset%d", i);
if (H5Ldelete(grp_id, dset_name, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- HDsnprintf(dset_name, sizeof(dset_name), "D3dset%d", i);
+ snprintf(dset_name, sizeof(dset_name), "D3dset%d", i);
if (H5Ldelete(grp_id, dset_name, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
}
@@ -219,9 +219,9 @@ create_file(char *filename, hid_t fcpl, hid_t fapl)
static unsigned
open_file(char *filename, hid_t fapl, hsize_t page_size, size_t page_buffer_size)
{
- hid_t file_id = -1;
- hid_t dset_id = -1;
- hid_t grp_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t grp_id = H5I_INVALID_HID;
int *data = NULL; /* pointer to data buffer to write */
int i;
int j;
@@ -252,7 +252,7 @@ open_file(char *filename, hid_t fapl, hsize_t page_size, size_t page_buffer_size
for (i = 0; i < NUM_DSETS; i++) {
- HDsnprintf(dset_name, sizeof(dset_name), "dset%d", i);
+ snprintf(dset_name, sizeof(dset_name), "dset%d", i);
if ((dset_id = H5Dopen2(grp_id, dset_name, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
@@ -301,20 +301,20 @@ open_file(char *filename, hid_t fapl, hsize_t page_size, size_t page_buffer_size
static unsigned
set_multi_split(const char *env_h5_drvr, hid_t fapl, hsize_t pagesize)
{
- hbool_t split = FALSE;
- hbool_t multi = FALSE;
+ bool split = false;
+ bool multi = false;
H5FD_mem_t memb_map[H5FD_MEM_NTYPES];
hid_t memb_fapl_arr[H5FD_MEM_NTYPES];
char *memb_name[H5FD_MEM_NTYPES];
haddr_t memb_addr[H5FD_MEM_NTYPES];
- hbool_t relax;
+ bool relax;
H5FD_mem_t mt;
/* Check for split or multi driver */
- if (!HDstrcmp(env_h5_drvr, "split"))
- split = TRUE;
- else if (!HDstrcmp(env_h5_drvr, "multi"))
- multi = TRUE;
+ if (!strcmp(env_h5_drvr, "split"))
+ split = true;
+ else if (!strcmp(env_h5_drvr, "multi"))
+ multi = true;
if (split || multi) {
@@ -376,10 +376,10 @@ set_multi_split(const char *env_h5_drvr, hid_t fapl, hsize_t pagesize)
static unsigned
test_args(hid_t orig_fapl, const char *env_h5_drvr)
{
- char filename[FILENAME_LEN]; /* Filename to use */
- hid_t file_id = -1; /* File ID */
- hid_t fcpl = -1;
- hid_t fapl = -1;
+ char filename[FILENAME_LEN]; /* Filename to use */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID;
+ hid_t fapl = H5I_INVALID_HID;
herr_t ret;
TESTING("Settings for Page Buffering");
@@ -547,10 +547,10 @@ test_args(hid_t orig_fapl, const char *env_h5_drvr)
static unsigned
test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
{
- char filename[FILENAME_LEN]; /* Filename to use */
- hid_t file_id = -1; /* File ID */
- hid_t fcpl = -1;
- hid_t fapl = -1;
+ char filename[FILENAME_LEN]; /* Filename to use */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID;
+ hid_t fapl = H5I_INVALID_HID;
size_t base_page_cnt;
size_t page_count = 0;
int i, num_elements = 2000;
@@ -810,10 +810,10 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
static unsigned
test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr)
{
- char filename[FILENAME_LEN]; /* Filename to use */
- hid_t file_id = -1; /* File ID */
- hid_t fcpl = -1;
- hid_t fapl = -1;
+ char filename[FILENAME_LEN]; /* Filename to use */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID;
+ hid_t fapl = H5I_INVALID_HID;
size_t base_page_cnt;
size_t page_count = 0;
int i;
@@ -1049,10 +1049,10 @@ test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr)
static unsigned
test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
{
- char filename[FILENAME_LEN]; /* Filename to use */
- hid_t file_id = -1; /* File ID */
- hid_t fcpl = -1;
- hid_t fapl = -1;
+ char filename[FILENAME_LEN]; /* Filename to use */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID;
+ hid_t fapl = H5I_INVALID_HID;
size_t base_raw_cnt = 0;
size_t base_meta_cnt = 0;
size_t page_count = 0;
@@ -1667,10 +1667,10 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
static unsigned
test_stats_collection(hid_t orig_fapl, const char *env_h5_drvr)
{
- char filename[FILENAME_LEN]; /* Filename to use */
- hid_t file_id = -1; /* File ID */
- hid_t fcpl = -1;
- hid_t fapl = -1;
+ char filename[FILENAME_LEN]; /* Filename to use */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID;
+ hid_t fapl = H5I_INVALID_HID;
int i;
int num_elements = 1000;
size_t base_raw_cnt = 0;
@@ -1956,10 +1956,10 @@ test_stats_collection(hid_t orig_fapl, const char *env_h5_drvr)
static unsigned
verify_page_buffering_disabled(hid_t orig_fapl, const char *env_h5_drvr)
{
- char filename[FILENAME_LEN]; /* Filename to use */
- hid_t file_id = -1; /* File ID */
- hid_t fcpl = -1;
- hid_t fapl = -1;
+ char filename[FILENAME_LEN]; /* Filename to use */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID;
+ hid_t fapl = H5I_INVALID_HID;
TESTING("Page Buffering Disabled");
h5_fixname(FILENAME[0], orig_fapl, filename, sizeof(filename));
@@ -2064,15 +2064,15 @@ verify_page_buffering_disabled(hid_t orig_fapl, const char *env_h5_drvr)
int
main(void)
{
- hid_t fapl = -1; /* File access property list for data files */
- unsigned nerrors = 0; /* Cumulative error count */
- const char *env_h5_drvr = NULL; /* File Driver value from environment */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list for data files */
+ unsigned nerrors = 0; /* Cumulative error count */
+ const char *env_h5_drvr = NULL; /* File Driver value from environment */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
h5_reset();
/* Get the VFD to use */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
@@ -2080,10 +2080,10 @@ main(void)
* Page buffering depends on paged aggregation which is
* currently disabled for multi/split drivers.
*/
- if ((0 == HDstrcmp(env_h5_drvr, "multi")) || (0 == HDstrcmp(env_h5_drvr, "split"))) {
+ if ((0 == strcmp(env_h5_drvr, "multi")) || (0 == strcmp(env_h5_drvr, "split"))) {
SKIPPED();
- HDputs("Skip page buffering test because paged aggregation is disabled for multi/split drivers");
+ puts("Skip page buffering test because paged aggregation is disabled for multi/split drivers");
exit(EXIT_SUCCESS);
} /* end if */
@@ -2095,11 +2095,11 @@ main(void)
/* Push API context */
if (H5CX_push() < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
#ifdef H5_HAVE_PARALLEL
- HDputs("Page Buffering is disabled for parallel.");
+ puts("Page Buffering is disabled for parallel.");
nerrors += verify_page_buffering_disabled(fapl, env_h5_drvr);
#else /* H5_HAVE_PARALLEL */
@@ -2118,11 +2118,11 @@ main(void)
goto error;
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
- HDputs("All Page Buffering tests passed.");
+ puts("All Page Buffering tests passed.");
exit(EXIT_SUCCESS);
@@ -2136,7 +2136,7 @@ main(void)
H5E_END_TRY
if (api_ctx_pushed)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
exit(EXIT_FAILURE);
} /* main() */
diff --git a/test/reserved.c b/test/reserved.c
index 1b29f8b8a13..5540d044b62 100644
--- a/test/reserved.c
+++ b/test/reserved.c
@@ -31,8 +31,8 @@ static const char *FILENAME[] = {"rsrv_heap", "rsrv_ohdr", "rsrv_vlen", NULL};
static herr_t
rsrv_heap(void)
{
- hid_t file_id = (-1), dataset_id = (-1), dataspace_id = (-1);
- hid_t fapl = (-1), fcpl = (-1);
+ hid_t file_id = (H5I_INVALID_HID), dataset_id = (H5I_INVALID_HID), dataspace_id = (H5I_INVALID_HID);
+ hid_t fapl = (H5I_INVALID_HID), fcpl = (H5I_INVALID_HID);
hsize_t dims[1] = {1};
char filename[1024], dset_name[10];
int i;
@@ -64,7 +64,7 @@ rsrv_heap(void)
}
H5E_END_TRY
- HDsnprintf(dset_name, sizeof(dset_name), "Dset %d", i);
+ snprintf(dset_name, sizeof(dset_name), "Dset %d", i);
H5E_BEGIN_TRY
{
@@ -108,7 +108,7 @@ rsrv_heap(void)
if (H5open() < 0)
TEST_ERROR;
- HDsnprintf(dset_name, sizeof(dset_name), "Dset %d", i - 2);
+ snprintf(dset_name, sizeof(dset_name), "Dset %d", i - 2);
file_id = H5Fopen(filename, H5F_ACC_RDONLY, H5P_DEFAULT);
if (file_id < 0)
@@ -160,8 +160,8 @@ rsrv_heap(void)
static herr_t
rsrv_ohdr(void)
{
- hid_t file_id = (-1), dataset_id = (-1), dataspace_id = (-1);
- hid_t fapl = (-1), fcpl = (-1), aid, attr_id;
+ hid_t file_id = (H5I_INVALID_HID), dataset_id = (H5I_INVALID_HID), dataspace_id = (H5I_INVALID_HID);
+ hid_t fapl = (H5I_INVALID_HID), fcpl = (H5I_INVALID_HID), aid, attr_id;
hsize_t dims[2];
herr_t status;
int attrval[4][6];
@@ -205,7 +205,7 @@ rsrv_ohdr(void)
} /* end for */
for (i = 0; i < 2000; i++) {
- HDsnprintf(attrname, sizeof(attrname), "attr %d", i);
+ snprintf(attrname, sizeof(attrname), "attr %d", i);
H5E_BEGIN_TRY
{
aid = H5Screate_simple(2, dims, NULL);
@@ -298,8 +298,9 @@ rsrv_ohdr(void)
static herr_t
rsrv_vlen(void)
{
- hid_t file_id = (-1), dataset_id = (-1), dataspace_id = (-1), type_id = (-1);
- hid_t fapl = (-1), fcpl = (-1), mem_space_id = (-1);
+ hid_t file_id = (H5I_INVALID_HID), dataset_id = (H5I_INVALID_HID), dataspace_id = (H5I_INVALID_HID),
+ type_id = (H5I_INVALID_HID);
+ hid_t fapl = (H5I_INVALID_HID), fcpl = (H5I_INVALID_HID), mem_space_id = (H5I_INVALID_HID);
hssize_t offset[1];
hsize_t start[1];
hsize_t dims[1], count[1];
@@ -465,12 +466,12 @@ main(void)
hid_t fapl;
const char *envval = NULL;
- envval = HDgetenv(HDF5_DRIVER);
+ envval = getenv(HDF5_DRIVER);
if (envval == NULL)
envval = "nomatch";
/* QAK: should be able to use the core driver? */
- if (HDstrcmp(envval, "core") && HDstrcmp(envval, "split") && HDstrcmp(envval, "multi") &&
- HDstrcmp(envval, "family")) {
+ if (strcmp(envval, "core") && strcmp(envval, "split") && strcmp(envval, "multi") &&
+ strcmp(envval, "family")) {
num_errs += rsrv_ohdr();
num_errs += rsrv_heap();
num_errs += rsrv_vlen();
@@ -478,14 +479,14 @@ main(void)
if (num_errs > 0)
printf("**** %d FAILURE%s! ****\n", num_errs, num_errs == 1 ? "" : "S");
else
- HDputs("All address space reservation tests passed.");
+ puts("All address space reservation tests passed.");
fapl = h5_fileaccess();
h5_cleanup(FILENAME, fapl);
return num_errs;
}
else {
- HDputs("All address space reservation tests skipped - Incompatible with current Virtual File Driver");
+ puts("All address space reservation tests skipped - Incompatible with current Virtual File Driver");
}
#endif /* BROKEN */
diff --git a/test/ros3.c b/test/ros3.c
index 267aa0a9e6e..cc058fbc9b0 100644
--- a/test/ros3.c
+++ b/test/ros3.c
@@ -288,7 +288,7 @@ jserr_str(const char *expected, const char *actual, const char *reason)
*----------------------------------------------------------------------------
*/
#define JSVERIFY_STR(expected, actual, reason) \
- if (HDstrcmp((actual), (expected)) != 0) { \
+ if (strcmp((actual), (expected)) != 0) { \
JSERR_STR((expected), (actual), (reason)); \
goto error; \
} /* JSVERIFY_STR */
@@ -327,7 +327,7 @@ jserr_str(const char *expected, const char *actual, const char *reason)
*----------------------------------------------------------------------------
*/
#define JSVERIFY_STR(actual, expected, reason) \
- if (HDstrcmp((actual), (expected)) != 0) { \
+ if (strcmp((actual), (expected)) != 0) { \
JSERR_STR((expected), (actual), (reason)); \
goto error; \
} /* JSVERIFY_STR */
@@ -349,12 +349,12 @@ jserr_str(const char *expected, const char *actual, const char *reason)
#define S3_TEST_RESOURCE_H5_PUBLIC "GMODO-SVM01.h5"
#define S3_TEST_RESOURCE_MISSING "missing.csv"
-static char url_text_restricted[S3_TEST_MAX_URL_SIZE] = "";
-static char url_text_public[S3_TEST_MAX_URL_SIZE] = "";
-static char url_h5_public[S3_TEST_MAX_URL_SIZE] = "";
-static char url_missing[S3_TEST_MAX_URL_SIZE] = "";
-static char s3_test_bucket_url[S3_TEST_MAX_URL_SIZE] = "";
-static hbool_t s3_test_bucket_defined = FALSE;
+static char url_text_restricted[S3_TEST_MAX_URL_SIZE] = "";
+static char url_text_public[S3_TEST_MAX_URL_SIZE] = "";
+static char url_h5_public[S3_TEST_MAX_URL_SIZE] = "";
+static char url_missing[S3_TEST_MAX_URL_SIZE] = "";
+static char s3_test_bucket_url[S3_TEST_MAX_URL_SIZE] = "";
+static bool s3_test_bucket_defined = false;
/* Global variables for aws test profile.
* An attempt is made to read ~/.aws/credentials and ~/.aws/config upon test
@@ -367,12 +367,12 @@ static char s3_test_aws_access_key_id[64];
static char s3_test_aws_secret_access_key[128];
H5FD_ros3_fapl_t restricted_access_fa = {H5FD_CURR_ROS3_FAPL_T_VERSION, /* fapl version */
- TRUE, /* authenticate */
+ true, /* authenticate */
"", /* aws region */
"", /* access key id */
""}; /* secret access key */
-H5FD_ros3_fapl_t anonymous_fa = {H5FD_CURR_ROS3_FAPL_T_VERSION, FALSE, "", "", ""};
+H5FD_ros3_fapl_t anonymous_fa = {H5FD_CURR_ROS3_FAPL_T_VERSION, false, "", "", ""};
/*---------------------------------------------------------------------------
*
@@ -412,7 +412,7 @@ test_fapl_config_validation(void)
* test-local variables *
************************/
- hid_t fapl_id = -1; /* file access property list ID */
+ hid_t fapl_id = H5I_INVALID_HID; /* file access property list ID */
H5FD_ros3_fapl_t config;
H5FD_ros3_fapl_t fa_fetch;
herr_t success = SUCCEED;
@@ -427,7 +427,7 @@ test_fapl_config_validation(void)
SUCCEED,
{
H5FD_CURR_ROS3_FAPL_T_VERSION, /* version */
- FALSE, /* authenticate */
+ false, /* authenticate */
"", /* aws_region */
"", /* secret_id */
"", /* secret_key */
@@ -438,7 +438,7 @@ test_fapl_config_validation(void)
FAIL,
{
H5FD_CURR_ROS3_FAPL_T_VERSION,
- TRUE,
+ true,
"",
"",
"",
@@ -449,7 +449,7 @@ test_fapl_config_validation(void)
SUCCEED,
{
H5FD_CURR_ROS3_FAPL_T_VERSION,
- TRUE,
+ true,
"region",
"me",
"",
@@ -460,7 +460,7 @@ test_fapl_config_validation(void)
FAIL,
{
H5FD_CURR_ROS3_FAPL_T_VERSION,
- TRUE,
+ true,
"",
"me",
"",
@@ -471,7 +471,7 @@ test_fapl_config_validation(void)
FAIL,
{
H5FD_CURR_ROS3_FAPL_T_VERSION,
- TRUE,
+ true,
"where",
"",
"",
@@ -482,7 +482,7 @@ test_fapl_config_validation(void)
SUCCEED,
{
H5FD_CURR_ROS3_FAPL_T_VERSION,
- TRUE,
+ true,
"where",
"who",
"thisIsA GREAT seeeecrit",
@@ -493,7 +493,7 @@ test_fapl_config_validation(void)
FAIL,
{
12345,
- FALSE,
+ false,
"",
"",
"",
@@ -505,7 +505,7 @@ test_fapl_config_validation(void)
SUCCEED,
{
H5FD_CURR_ROS3_FAPL_T_VERSION,
- FALSE,
+ false,
"someregion",
"someid",
"somekey",
@@ -519,9 +519,9 @@ test_fapl_config_validation(void)
* TESTS *
*********/
- if (FALSE == s3_test_bucket_defined) {
+ if (false == s3_test_bucket_defined) {
SKIPPED();
- HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
fflush(stdout);
return 0;
}
@@ -620,12 +620,12 @@ test_ros3_fapl(void)
* test-local variables *
************************/
- hid_t fapl_id = -1; /* file access property list ID */
- hid_t driver_id = -1; /* ID for this VFD */
- unsigned long driver_flags = 0; /* VFD feature flags */
+ hid_t fapl_id = H5I_INVALID_HID; /* file access property list ID */
+ hid_t driver_id = H5I_INVALID_HID; /* ID for this VFD */
+ unsigned long driver_flags = 0; /* VFD feature flags */
H5FD_ros3_fapl_t ros3_fa_0 = {
H5FD_CURR_ROS3_FAPL_T_VERSION, /* version */
- FALSE, /* authenticate */
+ false, /* authenticate */
"", /* aws_region */
"", /* secret_id */
"plugh", /* secret_key */
@@ -786,23 +786,23 @@ test_vfd_open(void)
},
};
H5FD_t *fd = NULL;
- hbool_t curl_ready = FALSE;
- hid_t fapl_id = -1;
- hid_t fapl_file_access = -1;
+ bool curl_ready = false;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t fapl_file_access = H5I_INVALID_HID;
unsigned i = 0;
unsigned tests_count = 10;
TESTING("ROS3 VFD-level open");
- if (FALSE == s3_test_bucket_defined) {
+ if (false == s3_test_bucket_defined) {
SKIPPED();
- HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
fflush(stdout);
return 0;
}
FAIL_IF(CURLE_OK != curl_global_init(CURL_GLOBAL_DEFAULT))
- curl_ready = TRUE;
+ curl_ready = true;
fapl_file_access = H5Pcreate(H5P_FILE_ACCESS);
FAIL_IF(fapl_file_access < 0)
@@ -858,7 +858,7 @@ test_vfd_open(void)
fapl_file_access = -1;
curl_global_cleanup();
- curl_ready = FALSE;
+ curl_ready = false;
PASSED();
return 0;
@@ -885,7 +885,7 @@ test_vfd_open(void)
}
H5E_END_TRY
}
- if (curl_ready == TRUE) {
+ if (curl_ready == true) {
curl_global_cleanup();
}
@@ -929,21 +929,21 @@ test_eof_eoa(void)
************************/
H5FD_t *fd_shakespeare = NULL;
- hbool_t curl_ready = FALSE;
- hid_t fapl_id = -1;
+ bool curl_ready = false;
+ hid_t fapl_id = H5I_INVALID_HID;
TESTING("ROS3 eof/eoa gets and sets");
if (s3_test_credentials_loaded == 0) {
SKIPPED();
- HDputs(" s3 credentials are not loaded");
+ puts(" s3 credentials are not loaded");
fflush(stdout);
return 0;
}
- if (FALSE == s3_test_bucket_defined) {
+ if (false == s3_test_bucket_defined) {
SKIPPED();
- HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
fflush(stdout);
return 0;
}
@@ -953,7 +953,7 @@ test_eof_eoa(void)
*********/
FAIL_IF(CURLE_OK != curl_global_init(CURL_GLOBAL_DEFAULT))
- curl_ready = TRUE;
+ curl_ready = true;
fapl_id = H5Pcreate(H5P_FILE_ACCESS);
FAIL_IF(0 > fapl_id)
@@ -995,7 +995,7 @@ test_eof_eoa(void)
fapl_id = -1;
curl_global_cleanup();
- curl_ready = FALSE;
+ curl_ready = false;
PASSED();
return 0;
@@ -1007,7 +1007,7 @@ test_eof_eoa(void)
if (fd_shakespeare)
(void)H5FDclose(fd_shakespeare);
- if (TRUE == curl_ready)
+ if (true == curl_ready)
curl_global_cleanup();
if (fapl_id >= 0) {
H5E_BEGIN_TRY
@@ -1038,20 +1038,20 @@ test_H5FDread_without_eoa_set_fails(void)
char buffer[256];
unsigned int i = 0;
H5FD_t *file_shakespeare = NULL;
- hid_t fapl_id = -1;
+ hid_t fapl_id = H5I_INVALID_HID;
TESTING("ROS3 VFD read-eoa temporal coupling library limitation ");
if (s3_test_credentials_loaded == 0) {
SKIPPED();
- HDputs(" s3 credentials are not loaded");
+ puts(" s3 credentials are not loaded");
fflush(stdout);
return 0;
}
- if (FALSE == s3_test_bucket_defined) {
+ if (false == s3_test_bucket_defined) {
SKIPPED();
- HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
fflush(stdout);
return 0;
}
@@ -1209,20 +1209,20 @@ test_read(void)
char buffer[S3_TEST_MAX_URL_SIZE];
unsigned int i = 0;
H5FD_t *file_raven = NULL;
- hid_t fapl_id = -1;
+ hid_t fapl_id = H5I_INVALID_HID;
TESTING("ROS3 VFD read/range-gets");
if (s3_test_credentials_loaded == 0) {
SKIPPED();
- HDputs(" s3 credentials are not loaded");
+ puts(" s3 credentials are not loaded");
fflush(stdout);
return 0;
}
- if (FALSE == s3_test_bucket_defined) {
+ if (false == s3_test_bucket_defined) {
SKIPPED();
- HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
fflush(stdout);
return 0;
}
@@ -1347,16 +1347,16 @@ test_noops_and_autofails(void)
* test-local variables *
************************/
- hbool_t curl_ready = FALSE;
- hid_t fapl_id = -1;
+ bool curl_ready = false;
+ hid_t fapl_id = H5I_INVALID_HID;
H5FD_t *file = NULL;
const char data[36] = "The Force shall be with you, always";
TESTING("ROS3 VFD always-fail and no-op routines");
- if (FALSE == s3_test_bucket_defined) {
+ if (false == s3_test_bucket_defined) {
SKIPPED();
- HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
fflush(stdout);
return 0;
}
@@ -1366,7 +1366,7 @@ test_noops_and_autofails(void)
*********/
FAIL_IF(CURLE_OK != curl_global_init(CURL_GLOBAL_DEFAULT))
- curl_ready = TRUE;
+ curl_ready = true;
/* create ROS3 fapl
*/
@@ -1388,10 +1388,10 @@ test_noops_and_autofails(void)
H5E_BEGIN_TRY{JSVERIFY(FAIL, H5FDwrite(file, H5FD_MEM_DRAW, H5P_DEFAULT, 1000, 35, data),
"write must fail")} H5E_END_TRY
- H5E_BEGIN_TRY{JSVERIFY(FAIL, H5FDtruncate(file, H5P_DEFAULT, FALSE), "truncate must fail")} H5E_END_TRY
+ H5E_BEGIN_TRY{JSVERIFY(FAIL, H5FDtruncate(file, H5P_DEFAULT, false), "truncate must fail")} H5E_END_TRY
H5E_BEGIN_TRY{
- JSVERIFY(FAIL, H5FDtruncate(file, H5P_DEFAULT, TRUE), "truncate must fail (closing)")} H5E_END_TRY
+ JSVERIFY(FAIL, H5FDtruncate(file, H5P_DEFAULT, true), "truncate must fail (closing)")} H5E_END_TRY
/************
* TEARDOWN *
@@ -1404,7 +1404,7 @@ test_noops_and_autofails(void)
fapl_id = -1;
curl_global_cleanup();
- curl_ready = FALSE;
+ curl_ready = false;
PASSED();
return 0;
@@ -1424,7 +1424,7 @@ test_noops_and_autofails(void)
if (file) {
(void)H5FDclose(file);
}
- if (curl_ready == TRUE) {
+ if (curl_ready == true) {
curl_global_cleanup();
}
@@ -1466,21 +1466,21 @@ test_cmp(void)
H5FD_t *fd_raven = NULL;
H5FD_t *fd_shakes = NULL;
H5FD_t *fd_raven_2 = NULL;
- hbool_t curl_ready = FALSE;
- hid_t fapl_id = -1;
+ bool curl_ready = false;
+ hid_t fapl_id = H5I_INVALID_HID;
TESTING("ROS3 cmp (comparison)");
if (s3_test_credentials_loaded == 0) {
SKIPPED();
- HDputs(" s3 credentials are not loaded");
+ puts(" s3 credentials are not loaded");
fflush(stdout);
return 0;
}
- if (FALSE == s3_test_bucket_defined) {
+ if (false == s3_test_bucket_defined) {
SKIPPED();
- HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
fflush(stdout);
return 0;
}
@@ -1490,7 +1490,7 @@ test_cmp(void)
*********/
FAIL_IF(CURLE_OK != curl_global_init(CURL_GLOBAL_DEFAULT))
- curl_ready = TRUE;
+ curl_ready = true;
fapl_id = H5Pcreate(H5P_FILE_ACCESS);
FAIL_IF(0 > fapl_id)
@@ -1527,7 +1527,7 @@ test_cmp(void)
fapl_id = -1;
curl_global_cleanup();
- curl_ready = FALSE;
+ curl_ready = false;
PASSED();
return 0;
@@ -1543,7 +1543,7 @@ test_cmp(void)
(void)H5FDclose(fd_raven_2);
if (fd_shakes != NULL)
(void)H5FDclose(fd_shakes);
- if (TRUE == curl_ready)
+ if (true == curl_ready)
curl_global_cleanup();
if (fapl_id >= 0) {
H5E_BEGIN_TRY
@@ -1587,21 +1587,21 @@ test_H5F_integration(void)
* test-local variables *
************************/
- hid_t file = -1;
- hid_t fapl_id = -1;
+ hid_t file = H5I_INVALID_HID;
+ hid_t fapl_id = H5I_INVALID_HID;
TESTING("S3 file access through HD5F library (H5F API)");
if (s3_test_credentials_loaded == 0) {
SKIPPED();
- HDputs(" s3 credentials are not loaded");
+ puts(" s3 credentials are not loaded");
fflush(stdout);
return 0;
}
- if (FALSE == s3_test_bucket_defined) {
+ if (false == s3_test_bucket_defined) {
SKIPPED();
- HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
fflush(stdout);
return 0;
}
@@ -1695,37 +1695,37 @@ main(void)
* initialize test urls *
************************/
- bucket_url_env = HDgetenv("HDF5_ROS3_TEST_BUCKET_URL");
+ bucket_url_env = getenv("HDF5_ROS3_TEST_BUCKET_URL");
if (bucket_url_env == NULL || bucket_url_env[0] == '\0') {
printf("WARNING: S3 bucket url is not defined in environment "
"variable 'HDF5_ROS3_TEST_BUCKET_URL'!\n");
}
else {
- HDstrncpy(s3_test_bucket_url, bucket_url_env, S3_TEST_MAX_URL_SIZE);
- s3_test_bucket_defined = TRUE;
+ strncpy(s3_test_bucket_url, bucket_url_env, S3_TEST_MAX_URL_SIZE);
+ s3_test_bucket_defined = true;
}
- if (S3_TEST_MAX_URL_SIZE < HDsnprintf(url_text_restricted, (size_t)S3_TEST_MAX_URL_SIZE, "%s/%s",
- (const char *)s3_test_bucket_url,
- (const char *)S3_TEST_RESOURCE_TEXT_RESTRICTED)) {
+ if (S3_TEST_MAX_URL_SIZE < snprintf(url_text_restricted, (size_t)S3_TEST_MAX_URL_SIZE, "%s/%s",
+ (const char *)s3_test_bucket_url,
+ (const char *)S3_TEST_RESOURCE_TEXT_RESTRICTED)) {
printf("* ros3 setup failed (text_restricted) ! *\n");
return 1;
}
- if (S3_TEST_MAX_URL_SIZE < HDsnprintf(url_text_public, (size_t)S3_TEST_MAX_URL_SIZE, "%s/%s",
- (const char *)s3_test_bucket_url,
- (const char *)S3_TEST_RESOURCE_TEXT_PUBLIC)) {
+ if (S3_TEST_MAX_URL_SIZE < snprintf(url_text_public, (size_t)S3_TEST_MAX_URL_SIZE, "%s/%s",
+ (const char *)s3_test_bucket_url,
+ (const char *)S3_TEST_RESOURCE_TEXT_PUBLIC)) {
printf("* ros3 setup failed (text_public) ! *\n");
return 1;
}
- if (S3_TEST_MAX_URL_SIZE < HDsnprintf(url_h5_public, (size_t)S3_TEST_MAX_URL_SIZE, "%s/%s",
- (const char *)s3_test_bucket_url,
- (const char *)S3_TEST_RESOURCE_H5_PUBLIC)) {
+ if (S3_TEST_MAX_URL_SIZE < snprintf(url_h5_public, (size_t)S3_TEST_MAX_URL_SIZE, "%s/%s",
+ (const char *)s3_test_bucket_url,
+ (const char *)S3_TEST_RESOURCE_H5_PUBLIC)) {
printf("* ros3 setup failed (h5_public) ! *\n");
return 1;
}
- if (S3_TEST_MAX_URL_SIZE < HDsnprintf(url_missing, S3_TEST_MAX_URL_SIZE, "%s/%s",
- (const char *)s3_test_bucket_url,
- (const char *)S3_TEST_RESOURCE_MISSING)) {
+ if (S3_TEST_MAX_URL_SIZE < snprintf(url_missing, S3_TEST_MAX_URL_SIZE, "%s/%s",
+ (const char *)s3_test_bucket_url,
+ (const char *)S3_TEST_RESOURCE_MISSING)) {
printf("* ros3 setup failed (missing) ! *\n");
return 1;
}
@@ -1745,12 +1745,11 @@ main(void)
if (SUCCEED == H5FD_s3comms_load_aws_profile(S3_TEST_PROFILE_NAME, s3_test_aws_access_key_id,
s3_test_aws_secret_access_key, s3_test_aws_region)) {
s3_test_credentials_loaded = 1;
- HDstrncpy(restricted_access_fa.aws_region, (const char *)s3_test_aws_region,
- H5FD_ROS3_MAX_REGION_LEN);
- HDstrncpy(restricted_access_fa.secret_id, (const char *)s3_test_aws_access_key_id,
- H5FD_ROS3_MAX_SECRET_ID_LEN);
- HDstrncpy(restricted_access_fa.secret_key, (const char *)s3_test_aws_secret_access_key,
- H5FD_ROS3_MAX_SECRET_KEY_LEN);
+ strncpy(restricted_access_fa.aws_region, (const char *)s3_test_aws_region, H5FD_ROS3_MAX_REGION_LEN);
+ strncpy(restricted_access_fa.secret_id, (const char *)s3_test_aws_access_key_id,
+ H5FD_ROS3_MAX_SECRET_ID_LEN);
+ strncpy(restricted_access_fa.secret_key, (const char *)s3_test_aws_secret_access_key,
+ H5FD_ROS3_MAX_SECRET_KEY_LEN);
}
/******************
diff --git a/test/s3comms.c b/test/s3comms.c
index ea32769967a..40f163e8ef2 100644
--- a/test/s3comms.c
+++ b/test/s3comms.c
@@ -281,7 +281,7 @@ jserr_str(const char *expected, const char *actual, const char *reason)
*----------------------------------------------------------------------------
*/
#define JSVERIFY_STR(expected, actual, reason) \
- if (HDstrcmp((actual), (expected)) != 0) { \
+ if (strcmp((actual), (expected)) != 0) { \
JSERR_STR((expected), (actual), (reason)); \
goto error; \
} /* JSVERIFY_STR */
@@ -323,7 +323,7 @@ jserr_str(const char *expected, const char *actual, const char *reason)
*----------------------------------------------------------------------------
*/
#define JSVERIFY_STR(actual, expected, reason) \
- if (HDstrcmp((actual), (expected)) != 0) { \
+ if (strcmp((actual), (expected)) != 0) { \
JSERR_STR((expected), (actual), (reason)); \
goto error; \
} /* JSVERIFY_STR */
@@ -344,13 +344,13 @@ jserr_str(const char *expected, const char *actual, const char *reason)
* startup -- if unable to open either file or cannot load region, id, and key,
* tests connecting with S3 will not be run
*/
-static int s3_test_credentials_loaded = 0;
-static char s3_test_aws_region[16] = "";
-static char s3_test_aws_access_key_id[64] = "";
-static char s3_test_aws_secret_access_key[128] = "";
-static char s3_test_aws_security_token[1024] = "";
-static char s3_test_bucket_url[S3_TEST_MAX_URL_SIZE] = "";
-static hbool_t s3_test_bucket_defined = FALSE;
+static int s3_test_credentials_loaded = 0;
+static char s3_test_aws_region[16] = "";
+static char s3_test_aws_access_key_id[64] = "";
+static char s3_test_aws_secret_access_key[128] = "";
+static char s3_test_aws_security_token[1024] = "";
+static char s3_test_bucket_url[S3_TEST_MAX_URL_SIZE] = "";
+static bool s3_test_bucket_defined = false;
/*---------------------------------------------------------------------------
*
@@ -585,7 +585,7 @@ test_bytes_to_hex(void)
const char exp[17]; /* in size * 2 + 1 for null terminator */
const unsigned char in[8];
size_t size;
- hbool_t lower;
+ bool lower;
};
/************************
@@ -597,16 +597,16 @@ test_bytes_to_hex(void)
"52F3000C9A",
{82, 243, 0, 12, 154},
5,
- FALSE,
+ false,
},
{
"009a0cf3005200", /* lowercase alphas */
{0, 154, 12, 243, 0, 82, 0},
7,
- TRUE,
+ true,
},
{
- "", {17, 63, 26, 56}, 0, FALSE, /* irrelevant */
+ "", {17, 63, 26, 56}, 0, false, /* irrelevant */
},
};
int i = 0;
@@ -628,7 +628,7 @@ test_bytes_to_hex(void)
/* dest cannot be null
*/
- JSVERIFY(FAIL, H5FD_s3comms_bytes_to_hex(NULL, (const unsigned char *)"nada", 5, FALSE),
+ JSVERIFY(FAIL, H5FD_s3comms_bytes_to_hex(NULL, (const unsigned char *)"nada", 5, false),
"destination cannot be null")
PASSED();
@@ -666,7 +666,7 @@ test_hrb_init_request(void)
const char *resource;
const char *exp_res;
const char *version;
- hbool_t ret_null;
+ bool ret_null;
};
/************************
@@ -680,7 +680,7 @@ test_hrb_init_request(void)
"/path/to/some/file",
"/path/to/some/file",
"HTTP/1.1",
- FALSE,
+ false,
},
{
"null verb substitutes to GET",
@@ -688,7 +688,7 @@ test_hrb_init_request(void)
"/MYPATH/MYFILE.tiff",
"/MYPATH/MYFILE.tiff",
"HTTP/1.1",
- FALSE,
+ false,
},
{
"demonstrate non-GET verb",
@@ -696,7 +696,7 @@ test_hrb_init_request(void)
"/MYPATH/MYFILE.tiff",
"/MYPATH/MYFILE.tiff",
"HTTP/1.1",
- FALSE,
+ false,
},
{
"slash prepended to resource path, if necessary",
@@ -704,7 +704,7 @@ test_hrb_init_request(void)
"MYPATH/MYFILE.tiff",
"/MYPATH/MYFILE.tiff",
NULL,
- FALSE,
+ false,
},
{
"null resource path causes problem",
@@ -712,7 +712,7 @@ test_hrb_init_request(void)
NULL,
NULL,
NULL,
- TRUE,
+ true,
},
};
struct testcase *C = NULL;
@@ -725,7 +725,7 @@ test_hrb_init_request(void)
for (i = 0; i < ncases; i++) {
C = &cases[i];
req = H5FD_s3comms_hrb_init_request(C->verb, C->resource, C->version);
- if (cases[i].ret_null == TRUE) {
+ if (cases[i].ret_null == true) {
FAIL_IF(req != NULL);
}
else {
@@ -1188,8 +1188,8 @@ test_HMAC_SHA256(void)
SHA256_DIGEST_LENGTH,
"AWS4-HMAC-SHA256\n20130524T000000Z\n20130524/us-east-1/s3/"
"aws4_request\n7344ae5b7ee6c3e7e6b0fe0640412a37625d1fbfff95c48bbb2dc43964946972",
- HDstrlen("AWS4-HMAC-SHA256\n20130524T000000Z\n20130524/us-east-1/s3/"
- "aws4_request\n7344ae5b7ee6c3e7e6b0fe0640412a37625d1fbfff95c48bbb2dc43964946972"),
+ strlen("AWS4-HMAC-SHA256\n20130524T000000Z\n20130524/us-east-1/s3/"
+ "aws4_request\n7344ae5b7ee6c3e7e6b0fe0640412a37625d1fbfff95c48bbb2dc43964946972"),
"f0e8bdb87c964420e857bd35b5d6ed310bd44f0170aba48dd91039c6036bdb41",
SHA256_DIGEST_LENGTH * 2 + 1, /* +1 for null terminator */
},
@@ -1228,7 +1228,7 @@ test_HMAC_SHA256(void)
cases[i].msg);
if (cases[i].ret == SUCCEED) {
#ifdef VERBOSE
- if (0 != HDstrncmp(cases[i].exp, dest, HDstrlen(cases[i].exp))) {
+ if (0 != strncmp(cases[i].exp, dest, strlen(cases[i].exp))) {
/* print out how wrong things are, and then fail
*/
dest = (char *)realloc(dest, cases[i].dest_size + 1);
@@ -1240,7 +1240,7 @@ test_HMAC_SHA256(void)
#else /* VERBOSE not defined */
/* simple pass/fail test
*/
- JSVERIFY(0, HDstrncmp(cases[i].exp, dest, HDstrlen(cases[i].exp)), NULL);
+ JSVERIFY(0, strncmp(cases[i].exp, dest, strlen(cases[i].exp)), NULL);
#endif /* VERBOSE */
}
free(dest);
@@ -1313,7 +1313,7 @@ test_nlowercase(void)
JSVERIFY(SUCCEED, H5FD_s3comms_nlowercase(dest, cases[i].in, cases[i].len), cases[i].in)
if (cases[i].len > 0) {
- JSVERIFY(0, HDstrncmp(dest, cases[i].exp, cases[i].len), NULL)
+ JSVERIFY(0, strncmp(dest, cases[i].exp, cases[i].len), NULL)
}
free(dest);
} /* end for each testcase */
@@ -1679,7 +1679,7 @@ test_percent_encode_char(void)
JSVERIFY(SUCCEED, H5FD_s3comms_percent_encode_char(dest, (const unsigned char)cases[i].c, &dest_len),
NULL)
JSVERIFY(cases[i].exp_len, dest_len, NULL)
- JSVERIFY(0, HDstrncmp(dest, cases[i].exp, dest_len), NULL)
+ JSVERIFY(0, strncmp(dest, cases[i].exp, dest_len), NULL)
JSVERIFY_STR(cases[i].exp, dest, NULL)
}
@@ -1711,15 +1711,15 @@ test_s3r_get_filesize(void)
/* setup -- compose url to target resource
*/
- if (FALSE == s3_test_bucket_defined) {
+ if (false == s3_test_bucket_defined) {
SKIPPED();
- HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
fflush(stdout);
return 0;
}
- FAIL_IF(S3_TEST_MAX_URL_SIZE < HDsnprintf(url_raven, S3_TEST_MAX_URL_SIZE, "%s/%s", s3_test_bucket_url,
- S3_TEST_RESOURCE_TEXT_PUBLIC));
+ FAIL_IF(S3_TEST_MAX_URL_SIZE < snprintf(url_raven, S3_TEST_MAX_URL_SIZE, "%s/%s", s3_test_bucket_url,
+ S3_TEST_RESOURCE_TEXT_PUBLIC));
JSVERIFY(0, H5FD_s3comms_s3r_get_filesize(NULL), "filesize of the null handle should be 0")
@@ -1762,20 +1762,20 @@ test_s3r_open(void)
struct tm *now = NULL;
char iso8601now[ISO8601_SIZE];
s3r_t *handle = NULL;
- hbool_t curl_ready = FALSE;
+ bool curl_ready = false;
parsed_url_t *purl = NULL;
TESTING("s3r_open");
if (s3_test_credentials_loaded == 0) {
SKIPPED();
- HDputs(" s3 credentials are not loaded");
+ puts(" s3 credentials are not loaded");
fflush(stdout);
return 0;
}
- if (FALSE == s3_test_bucket_defined) {
+ if (false == s3_test_bucket_defined) {
SKIPPED();
- HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
fflush(stdout);
return 0;
}
@@ -1784,14 +1784,14 @@ test_s3r_open(void)
* PRE-TEST SETUP *
******************/
- FAIL_IF(S3_TEST_MAX_URL_SIZE < HDsnprintf(url_shakespeare, S3_TEST_MAX_URL_SIZE, "%s/%s",
- s3_test_bucket_url, S3_TEST_RESOURCE_TEXT_RESTRICTED));
+ FAIL_IF(S3_TEST_MAX_URL_SIZE < snprintf(url_shakespeare, S3_TEST_MAX_URL_SIZE, "%s/%s",
+ s3_test_bucket_url, S3_TEST_RESOURCE_TEXT_RESTRICTED));
- FAIL_IF(S3_TEST_MAX_URL_SIZE < HDsnprintf(url_missing, S3_TEST_MAX_URL_SIZE, "%s/%s", s3_test_bucket_url,
- S3_TEST_RESOURCE_MISSING));
+ FAIL_IF(S3_TEST_MAX_URL_SIZE < snprintf(url_missing, S3_TEST_MAX_URL_SIZE, "%s/%s", s3_test_bucket_url,
+ S3_TEST_RESOURCE_MISSING));
- FAIL_IF(S3_TEST_MAX_URL_SIZE < HDsnprintf(url_raven, S3_TEST_MAX_URL_SIZE, "%s/%s", s3_test_bucket_url,
- S3_TEST_RESOURCE_TEXT_PUBLIC));
+ FAIL_IF(S3_TEST_MAX_URL_SIZE < snprintf(url_raven, S3_TEST_MAX_URL_SIZE, "%s/%s", s3_test_bucket_url,
+ S3_TEST_RESOURCE_TEXT_PUBLIC));
/* Set given bucket url with invalid/inactive port number for badport.
* Note, this sort of micro-management of parsed_url_t is not advised
@@ -1800,20 +1800,20 @@ test_s3r_open(void)
if (purl->port == NULL) {
purl->port = (char *)H5MM_malloc(sizeof(char) * 5);
FAIL_IF(purl->port == NULL);
- FAIL_IF(5 < HDsnprintf(purl->port, 5, "9000"))
+ FAIL_IF(5 < snprintf(purl->port, 5, "9000"))
}
- else if (HDstrcmp(purl->port, "9000") != 0) {
- FAIL_IF(5 < HDsnprintf(purl->port, 5, "9000"))
+ else if (strcmp(purl->port, "9000") != 0) {
+ FAIL_IF(5 < snprintf(purl->port, 5, "9000"))
}
else {
- FAIL_IF(5 < HDsnprintf(purl->port, 5, "1234"))
+ FAIL_IF(5 < snprintf(purl->port, 5, "1234"))
}
- FAIL_IF(S3_TEST_MAX_URL_SIZE < HDsnprintf(url_raven_badport, S3_TEST_MAX_URL_SIZE, "%s://%s:%s/%s",
- purl->scheme, purl->host, purl->port,
- S3_TEST_RESOURCE_TEXT_PUBLIC));
+ FAIL_IF(S3_TEST_MAX_URL_SIZE < snprintf(url_raven_badport, S3_TEST_MAX_URL_SIZE, "%s://%s:%s/%s",
+ purl->scheme, purl->host, purl->port,
+ S3_TEST_RESOURCE_TEXT_PUBLIC));
curl_global_init(CURL_GLOBAL_DEFAULT);
- curl_ready = TRUE;
+ curl_ready = true;
now = gmnow();
FAIL_IF(now == NULL)
@@ -1907,7 +1907,7 @@ test_s3r_open(void)
handle = NULL;
curl_global_cleanup();
- curl_ready = FALSE;
+ curl_ready = false;
FAIL_IF(FAIL == H5FD_s3comms_free_purl(purl))
purl = NULL;
@@ -1923,7 +1923,7 @@ test_s3r_open(void)
H5FD_s3comms_s3r_close(handle);
if (purl != NULL)
H5FD_s3comms_free_purl(purl);
- if (curl_ready == TRUE)
+ if (curl_ready == true)
curl_global_cleanup();
return -1;
@@ -1961,7 +1961,7 @@ test_s3r_read(void)
char url_raven[S3_TEST_MAX_URL_SIZE];
char buffer[S3COMMS_TEST_BUFFER_SIZE];
s3r_t *handle = NULL;
- hbool_t curl_ready = FALSE;
+ bool curl_ready = false;
unsigned int i = 0;
TESTING("test_s3r_read");
@@ -1969,17 +1969,17 @@ test_s3r_read(void)
/*
* initial setup
*/
- if (FALSE == s3_test_bucket_defined) {
+ if (false == s3_test_bucket_defined) {
SKIPPED();
- HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
fflush(stdout);
return 0;
}
curl_global_init(CURL_GLOBAL_DEFAULT);
- curl_ready = TRUE;
- FAIL_IF(S3_TEST_MAX_URL_SIZE < HDsnprintf(url_raven, S3_TEST_MAX_URL_SIZE, "%s/%s", s3_test_bucket_url,
- S3_TEST_RESOURCE_TEXT_PUBLIC));
+ curl_ready = true;
+ FAIL_IF(S3_TEST_MAX_URL_SIZE < snprintf(url_raven, S3_TEST_MAX_URL_SIZE, "%s/%s", s3_test_bucket_url,
+ S3_TEST_RESOURCE_TEXT_PUBLIC));
for (i = 0; i < S3COMMS_TEST_BUFFER_SIZE; i++)
buffer[i] = '\0';
@@ -2032,7 +2032,7 @@ test_s3r_read(void)
JSVERIFY(SUCCEED, H5FD_s3comms_s3r_read(handle, (haddr_t)6370, (size_t)0, buffer), NULL)
JSVERIFY(
0,
- HDstrncmp(
+ strncmp(
buffer,
"And my soul from out that shadow that lies floating on the floor\nShall be lifted—nevermore!\n",
94),
@@ -2049,7 +2049,7 @@ test_s3r_read(void)
H5FD_s3comms_s3r_read(handle, (haddr_t)6400, (size_t)100, /* 6400+100 > 6464 */
buffer),
NULL)
- JSVERIFY(0, HDstrcmp("", buffer), NULL)
+ JSVERIFY(0, strcmp("", buffer), NULL)
/************************
* read starts past eof *
@@ -2059,14 +2059,14 @@ test_s3r_read(void)
H5FD_s3comms_s3r_read(handle, (haddr_t)1200699, /* 1200699 > 6464 */
(size_t)100, buffer),
NULL)
- JSVERIFY(0, HDstrcmp("", buffer), NULL)
+ JSVERIFY(0, strcmp("", buffer), NULL)
/**********************
* read starts on eof *
**********************/
JSVERIFY(FAIL, H5FD_s3comms_s3r_read(handle, (haddr_t)6464, (size_t)0, buffer), NULL)
- JSVERIFY(0, HDstrcmp("", buffer), NULL)
+ JSVERIFY(0, strcmp("", buffer), NULL)
/*************
* TEAR DOWN *
@@ -2076,7 +2076,7 @@ test_s3r_read(void)
handle = NULL;
curl_global_cleanup();
- curl_ready = FALSE;
+ curl_ready = false;
PASSED();
return 0;
@@ -2089,7 +2089,7 @@ test_s3r_read(void)
if (handle != NULL)
H5FD_s3comms_s3r_close(handle);
- if (curl_ready == TRUE)
+ if (curl_ready == true)
curl_global_cleanup();
return -1;
@@ -2153,7 +2153,7 @@ test_signing_key(void)
JSVERIFY(SUCCEED, H5FD_s3comms_signing_key(key, cases[i].secret_key, cases[i].region, cases[i].when),
NULL)
- JSVERIFY(0, HDstrncmp((const char *)cases[i].exp, (const char *)key, SHA256_DIGEST_LENGTH),
+ JSVERIFY(0, strncmp((const char *)cases[i].exp, (const char *)key, SHA256_DIGEST_LENGTH),
(const char *)cases[i].exp)
free(key);
@@ -2324,12 +2324,12 @@ test_trim(void)
assert(str == NULL);
str = (char *)malloc(sizeof(char) * cases[i].in_len);
assert(str != NULL);
- HDstrncpy(str, cases[i].in, cases[i].in_len);
+ strncpy(str, cases[i].in, cases[i].in_len);
JSVERIFY(SUCCEED, H5FD_s3comms_trim(dest, str, cases[i].in_len, &dest_len), NULL)
JSVERIFY(cases[i].exp_len, dest_len, cases[i].in)
if (dest_len > 0) {
- JSVERIFY(0, HDstrncmp(cases[i].exp, dest, dest_len), cases[i].exp)
+ JSVERIFY(0, strncmp(cases[i].exp, dest, dest_len), cases[i].exp)
}
free(str);
str = NULL;
@@ -2378,7 +2378,7 @@ test_uriencode(void)
struct testcase {
const char *str;
size_t s_len;
- hbool_t encode_slash;
+ bool encode_slash;
const char *expected;
};
@@ -2389,37 +2389,37 @@ test_uriencode(void)
struct testcase cases[] = {{
"/path/to/resource.jpg",
21,
- FALSE,
+ false,
"/path/to/resource.jpg",
},
{
"/path/to/resource.jpg",
21,
- TRUE,
+ true,
"%2Fpath%2Fto%2Fresource.jpg",
},
{
"string got_spaa ces",
20,
- TRUE,
+ true,
"string%20got_spaa%20%20ces",
},
{
"sp ac~es/and-sl ash.encoded",
27,
- TRUE,
+ true,
"sp%20ac~es%2Fand-sl%20ash.encoded",
},
{
"sp ac~es/and-sl ash.unencoded",
29,
- FALSE,
+ false,
"sp%20ac~es/and-sl%20ash.unencoded",
},
{
"/path/to/resource.txt",
0,
- FALSE,
+ false,
"",
}};
@@ -2439,8 +2439,8 @@ test_uriencode(void)
JSVERIFY(SUCCEED,
H5FD_s3comms_uriencode(dest, cases[i].str, str_len, cases[i].encode_slash, &dest_written),
NULL);
- JSVERIFY(HDstrlen(cases[i].expected), dest_written, NULL)
- JSVERIFY(0, HDstrncmp(dest, cases[i].expected, dest_written), cases[i].expected);
+ JSVERIFY(strlen(cases[i].expected), dest_written, NULL)
+ JSVERIFY(0, strncmp(dest, cases[i].expected, dest_written), cases[i].expected);
free(dest);
dest = NULL;
@@ -2453,9 +2453,9 @@ test_uriencode(void)
dest = (char *)malloc(sizeof(char) * 15);
assert(dest != NULL);
- JSVERIFY(FAIL, H5FD_s3comms_uriencode(NULL, "word$", 5, FALSE, &dest_written),
+ JSVERIFY(FAIL, H5FD_s3comms_uriencode(NULL, "word$", 5, false, &dest_written),
"destination cannot be NULL");
- JSVERIFY(FAIL, H5FD_s3comms_uriencode(dest, NULL, 5, FALSE, &dest_written),
+ JSVERIFY(FAIL, H5FD_s3comms_uriencode(dest, NULL, 5, false, &dest_written),
"source string cannot be NULL");
free(dest);
@@ -2520,14 +2520,14 @@ main(void)
s3_test_credentials_loaded = 1;
}
- bucket_url_env = HDgetenv("HDF5_ROS3_TEST_BUCKET_URL");
+ bucket_url_env = getenv("HDF5_ROS3_TEST_BUCKET_URL");
if (bucket_url_env == NULL || bucket_url_env[0] == '\0') {
printf("WARNING: S3 bucket url is not defined in environment "
"variable 'HDF5_ROS3_TEST_BUCKET_URL'!\n");
}
else {
- HDstrncpy(s3_test_bucket_url, bucket_url_env, S3_TEST_MAX_URL_SIZE);
- s3_test_bucket_defined = TRUE;
+ strncpy(s3_test_bucket_url, bucket_url_env, S3_TEST_MAX_URL_SIZE);
+ s3_test_bucket_defined = true;
}
/* tests ordered roughly by dependence */
diff --git a/test/select_io_dset.c b/test/select_io_dset.c
index 0f38aba8297..79449aac070 100644
--- a/test/select_io_dset.c
+++ b/test/select_io_dset.c
@@ -141,8 +141,8 @@ test_no_type_conv(hid_t fid, unsigned chunked, unsigned dtrans, unsigned mwbuf)
}
/* Generate dataset name */
- HDsnprintf(dset_name, sizeof(dset_name), "no_tconv_%s_%s_%s", chunked ? "chunked" : "contig",
- dtrans ? "xform" : "noxform", mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_name, sizeof(dset_name), "no_tconv_%s_%s_%s", chunked ? "chunked" : "contig",
+ dtrans ? "xform" : "noxform", mwbuf ? "mwbuf" : "nomwbuf");
/* Create dataset */
if ((did = H5Dcreate2(fid, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
@@ -163,7 +163,7 @@ test_no_type_conv(hid_t fid, unsigned chunked, unsigned dtrans, unsigned mwbuf)
/* Set modify write buffer if requested */
if (mwbuf)
- if (H5Pset_modify_write_buf(dxpl, TRUE) < 0)
+ if (H5Pset_modify_write_buf(dxpl, true) < 0)
FAIL_STACK_ERROR;
if ((ntrans_dxpl = H5Pcopy(dxpl)) < 0)
@@ -265,6 +265,7 @@ test_no_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
char *wbuf_bak = NULL;
char *rbuf = NULL;
char dset_name[DSET_NAME_LEN];
+ int fillvalue = (-1);
if ((wbuf = (char *)malloc((size_t)(4 * DSET_SELECT_DIM))) == NULL)
FAIL_STACK_ERROR;
@@ -282,16 +283,20 @@ test_no_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Set modify write buffer if requested */
if (mwbuf)
- if (H5Pset_modify_write_buf(dxpl, TRUE) < 0)
+ if (H5Pset_modify_write_buf(dxpl, true) < 0)
FAIL_STACK_ERROR;
/* Create 1d data space */
dims[0] = DSET_SELECT_DIM;
if ((sid = H5Screate_simple(1, dims, NULL)) < 0)
FAIL_STACK_ERROR;
+
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
FAIL_STACK_ERROR;
+ if (H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillvalue) < 0)
+ FAIL_STACK_ERROR;
+
if (chunked) {
cdims[0] = DSET_SELECT_CHUNK_DIM;
if (H5Pset_chunk(dcpl, 1, cdims) < 0)
@@ -299,8 +304,8 @@ test_no_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
}
/* Generate dataset name */
- HDsnprintf(dset_name, sizeof(dset_name), "no_size_change_%s_%s", chunked ? "chunked" : "contig",
- mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_name, sizeof(dset_name), "no_size_change_%s_%s", chunked ? "chunked" : "contig",
+ mwbuf ? "mwbuf" : "nomwbuf");
/* Create 1d dataset */
if ((did = H5Dcreate2(fid, dset_name, H5T_STD_I32BE, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
@@ -431,8 +436,8 @@ test_larger_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsign
}
/* Generate dataset name */
- HDsnprintf(dset_name, sizeof(dset_name), "larger_no_bkg_%s_%s_%s", chunked ? "chunked" : "contig",
- dtrans ? "xform" : "noxform", mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_name, sizeof(dset_name), "larger_no_bkg_%s_%s_%s", chunked ? "chunked" : "contig",
+ dtrans ? "xform" : "noxform", mwbuf ? "mwbuf" : "nomwbuf");
/* Create dataset */
if ((did = H5Dcreate2(fid, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
@@ -453,7 +458,7 @@ test_larger_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsign
/* Set modify write buffer if requested */
if (mwbuf)
- if (H5Pset_modify_write_buf(dxpl, TRUE) < 0)
+ if (H5Pset_modify_write_buf(dxpl, true) < 0)
FAIL_STACK_ERROR;
if ((ntrans_dxpl = H5Pcopy(dxpl)) < 0)
@@ -573,8 +578,8 @@ test_smaller_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsig
}
/* Generate dataset name */
- HDsnprintf(dset_name, sizeof(dset_name), "smaller_no_bkg_%s_%s_%s", chunked ? "chunked" : "contig",
- dtrans ? "xform" : "noxform", mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_name, sizeof(dset_name), "smaller_no_bkg_%s_%s_%s", chunked ? "chunked" : "contig",
+ dtrans ? "xform" : "noxform", mwbuf ? "mwbuf" : "nomwbuf");
/* Create 1d chunked dataset with/without data transform */
if ((did = H5Dcreate2(fid, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
@@ -595,7 +600,7 @@ test_smaller_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsig
/* Set modify write buffer if requested */
if (mwbuf)
- if (H5Pset_modify_write_buf(dxpl, TRUE) < 0)
+ if (H5Pset_modify_write_buf(dxpl, true) < 0)
FAIL_STACK_ERROR;
if ((ntrans_dxpl = H5Pcopy(dxpl)) < 0)
@@ -721,6 +726,7 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
s2_t *s2_wbuf_bak = NULL;
s2_t *s2_rbuf = NULL;
char dset_name[DSET_NAME_LEN];
+ int fillvalue = -1;
/* Create dataset transfer property list */
if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
@@ -731,7 +737,7 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Set modify write buffer if requested */
if (mwbuf)
- if (H5Pset_modify_write_buf(dxpl, TRUE) < 0)
+ if (H5Pset_modify_write_buf(dxpl, true) < 0)
FAIL_STACK_ERROR;
/* Allocate buffers for datasets */
@@ -762,9 +768,13 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
dims[0] = DSET_SELECT_DIM;
if ((sid = H5Screate_simple(1, dims, NULL)) < 0)
FAIL_STACK_ERROR;
+
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
FAIL_STACK_ERROR;
+ if (H5Pset_fill_value(dcpl, s1_tid, &fillvalue) < 0)
+ FAIL_STACK_ERROR;
+
if (chunked) {
cdims[0] = DSET_SELECT_CHUNK_DIM;
if (H5Pset_chunk(dcpl, 1, cdims) < 0)
@@ -774,8 +784,8 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Case 5(a) */
/* Generate dataset name */
- HDsnprintf(dset_name, sizeof(dset_name), "cmpd_with_bkg_%s_%s", chunked ? "chunked" : "contig",
- mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_name, sizeof(dset_name), "cmpd_with_bkg_%s_%s", chunked ? "chunked" : "contig",
+ mwbuf ? "mwbuf" : "nomwbuf");
/* Create 1d dataset */
if ((did = H5Dcreate2(fid, dset_name, s1_tid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
@@ -1081,7 +1091,7 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m
/* Set modify write buffer if requested */
if (mwbuf)
- if (H5Pset_modify_write_buf(dxpl, TRUE) < 0)
+ if (H5Pset_modify_write_buf(dxpl, true) < 0)
FAIL_STACK_ERROR;
if ((ntrans_dxpl = H5Pcopy(dxpl)) < 0)
@@ -1101,8 +1111,8 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m
FAIL_STACK_ERROR;
/* Generate dataset name */
- HDsnprintf(dset_names[i], sizeof(dset_names[i]), "multi_dset%d_%s_%s_%s", i,
- chunked ? "chunked" : "contig", dtrans ? "xform" : "noxform", mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_names[i], sizeof(dset_names[i]), "multi_dset%d_%s_%s_%s", i,
+ chunked ? "chunked" : "contig", dtrans ? "xform" : "noxform", mwbuf ? "mwbuf" : "nomwbuf");
/* Create ith dataset */
if ((dset_dids[i] =
@@ -1401,7 +1411,7 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Set modify write buffer if requested */
if (mwbuf)
- if (H5Pset_modify_write_buf(dxpl, TRUE) < 0)
+ if (H5Pset_modify_write_buf(dxpl, true) < 0)
FAIL_STACK_ERROR;
dims[0] = DSET_SELECT_DIM;
@@ -1431,8 +1441,8 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
FAIL_STACK_ERROR;
/* Generate dataset name */
- HDsnprintf(dset_names[i], sizeof(dset_names[i]), "multi_cmpd_dset%d_%s_%s", i,
- chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_names[i], sizeof(dset_names[i]), "multi_cmpd_dset%d_%s_%s", i,
+ chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
/* Create ith dataset */
if ((dset_dids[i] =
@@ -1842,7 +1852,7 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Set modify write buffer if requested */
if (mwbuf)
- if (H5Pset_modify_write_buf(dxpl, TRUE) < 0)
+ if (H5Pset_modify_write_buf(dxpl, true) < 0)
FAIL_STACK_ERROR;
dims[0] = DSET_SELECT_DIM;
@@ -1865,8 +1875,8 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
FAIL_STACK_ERROR;
/* Generate dataset name */
- HDsnprintf(dset_names[i], sizeof(dset_names[i]), "multi_size_dset%d_%s_%s", i,
- chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_names[i], sizeof(dset_names[i]), "multi_size_dset%d_%s_%s", i,
+ chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
/* Create ith dataset */
if ((dset_dids[i] = H5Dcreate2(fid, dset_names[i], H5T_STD_I32BE, file_sids[i], H5P_DEFAULT, dcpl,
@@ -2276,7 +2286,7 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf)
/* Set modify write buffer if requested */
if (mwbuf)
- if (H5Pset_modify_write_buf(dxpl, TRUE) < 0)
+ if (H5Pset_modify_write_buf(dxpl, true) < 0)
FAIL_STACK_ERROR;
/* Set dataset layout: contiguous or chunked */
@@ -2332,24 +2342,24 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf)
mm = HDrandom() % (int)ndsets;
if (mm == 0) {
dset_types[i] = DSET_WITH_NO_CONV;
- HDsnprintf(dset_names[i], sizeof(dset_names[i]), "multi_all_nconv_dset%d_%s_%s", i,
- chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_names[i], sizeof(dset_names[i]), "multi_all_nconv_dset%d_%s_%s", i,
+ chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
if ((dset_dids[i] = H5Dcreate2(fid, dset_names[i], H5T_NATIVE_INT, file_sids[i], H5P_DEFAULT,
dcpl, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
}
else if (mm == 1) {
dset_types[i] = DSET_WITH_CONV_AND_NO_BKG;
- HDsnprintf(dset_names[i], sizeof(dset_names[i]), "multi_all_conv_nbkg_dset%d_%s_%s", i,
- chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_names[i], sizeof(dset_names[i]), "multi_all_conv_nbkg_dset%d_%s_%s", i,
+ chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
if ((dset_dids[i] = H5Dcreate2(fid, dset_names[i], H5T_NATIVE_LONG, file_sids[i], H5P_DEFAULT,
dcpl, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
}
else {
dset_types[i] = DSET_WITH_CONV_AND_BKG;
- HDsnprintf(dset_names[i], sizeof(dset_names[i]), "multi_all_conv_bkg_dset%d_%s_%s", i,
- chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_names[i], sizeof(dset_names[i]), "multi_all_conv_bkg_dset%d_%s_%s", i,
+ chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
if ((dset_dids[i] = H5Dcreate2(fid, dset_names[i], s1_tid, file_sids[i], H5P_DEFAULT, dcpl,
H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
@@ -2729,8 +2739,9 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf)
* Verify H5Pset/get_selection_io API works as expected
*/
static herr_t
-test_set_get_select_io_mode(hid_t fid)
+test_set_get_select_io_mode(const char *filename, hid_t fapl)
{
+ hid_t fid = H5I_INVALID_HID;
hid_t did = H5I_INVALID_HID;
hid_t sid = H5I_INVALID_HID;
hid_t dcpl = H5I_INVALID_HID;
@@ -2744,6 +2755,9 @@ test_set_get_select_io_mode(hid_t fid)
printf("\n");
TESTING("H5Pget/set_selection_io_mode()");
+ if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ FAIL_STACK_ERROR;
+
if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
@@ -2808,6 +2822,8 @@ test_set_get_select_io_mode(hid_t fid)
FAIL_STACK_ERROR;
if (H5Sclose(sid) < 0)
FAIL_STACK_ERROR;
+ if (H5Fclose(fid) < 0)
+ FAIL_STACK_ERROR;
PASSED();
@@ -2820,6 +2836,7 @@ test_set_get_select_io_mode(hid_t fid)
H5Dclose(did);
H5Pclose(dcpl);
H5Pclose(dxpl);
+ H5Fclose(fid);
}
H5E_END_TRY
@@ -2843,7 +2860,7 @@ test_no_selection_io_cause_mode(const char *filename, hid_t fapl, uint32_t test_
hid_t sid = H5I_INVALID_HID;
hsize_t dims[1];
hsize_t cdims[1];
- hbool_t is_chunked = FALSE;
+ bool is_chunked = false;
hid_t tid = H5T_NATIVE_INT;
uint32_t no_selection_io_cause_write = 0;
uint32_t no_selection_io_cause_read = 0;
@@ -2859,8 +2876,8 @@ test_no_selection_io_cause_mode(const char *filename, hid_t fapl, uint32_t test_
/* The split and multi driver are not compatible with page buffering. No message since the other
* cases aren't skipped. */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
- if (env_h5_drvr && (!HDstrcmp(env_h5_drvr, "split") || !HDstrcmp(env_h5_drvr, "multi")))
+ env_h5_drvr = getenv(HDF5_DRIVER);
+ if (env_h5_drvr && (!strcmp(env_h5_drvr, "split") || !strcmp(env_h5_drvr, "multi")))
return 0;
}
@@ -2908,13 +2925,13 @@ test_no_selection_io_cause_mode(const char *filename, hid_t fapl, uint32_t test_
if (test_mode == TEST_DATASET_FILTER) {
if (H5Pset_deflate(dcpl, 9) < 0)
FAIL_STACK_ERROR;
- is_chunked = TRUE;
+ is_chunked = true;
no_selection_io_cause_write_expected |= H5D_SEL_IO_DATASET_FILTER;
no_selection_io_cause_read_expected |= H5D_SEL_IO_DATASET_FILTER;
}
if (test_mode == TEST_CHUNK_CACHE) {
- is_chunked = TRUE;
+ is_chunked = true;
no_selection_io_cause_write_expected |= H5D_SEL_IO_CHUNK_CACHE;
no_selection_io_cause_read_expected |= H5D_SEL_IO_CHUNK_CACHE;
}
@@ -2945,7 +2962,7 @@ test_no_selection_io_cause_mode(const char *filename, hid_t fapl, uint32_t test_
/* If we're using in-place type conversion sel io will succeed and only switch to scalar at the
* VFL */
if (test_mode & TEST_IN_PLACE_TCONV) {
- if (H5Pset_modify_write_buf(dxpl, TRUE) < 0)
+ if (H5Pset_modify_write_buf(dxpl, true) < 0)
FAIL_STACK_ERROR;
no_selection_io_cause_write_expected |= H5D_SEL_IO_NO_VECTOR_OR_SELECTION_IO_CB;
}
@@ -3123,150 +3140,176 @@ main(void)
{
int nerrors = 0;
char filename[FILENAME_BUF_SIZE];
- hid_t fapl = H5I_INVALID_HID;
- hid_t fid = H5I_INVALID_HID;
+ hid_t fapl = H5I_INVALID_HID;
+ hid_t fapl2 = H5I_INVALID_HID;
+ hid_t fid = H5I_INVALID_HID;
int test_select_config;
- unsigned chunked;
- unsigned dtrans;
- unsigned mwbuf;
+ unsigned set_cache; /* Set chunk cache to 0 or not */
+ unsigned chunked; /* Set to chunked dataset or not */
+ unsigned dtrans; /* Set to using data transform or not */
+ unsigned mwbuf; /* With/without modifying write buffer */
/* Testing setup */
h5_reset();
fapl = h5_fileaccess();
-
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
- if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ if ((fapl2 = H5Pcopy(fapl)) < 0)
TEST_ERROR;
- /* Test with contiguous or chunked dataset */
- for (chunked = FALSE; chunked <= TRUE; chunked++) {
+ for (set_cache = FALSE; set_cache <= TRUE; set_cache++) {
- /* Data transforms only apply to integer or floating-point datasets */
- /* therefore, not all tests are run with data transform */
- for (dtrans = FALSE; dtrans <= TRUE; dtrans++) {
+ /* Disable chunk caching on fapl2 */
+ if (set_cache) {
+ if (H5Pset_cache(fapl2, 0, (size_t)0, (size_t)0, 0.0) < 0)
+ TEST_ERROR;
+ }
- /* Test with and without modify_write_buf turned on */
- for (mwbuf = FALSE; mwbuf <= TRUE; mwbuf++) {
- /* Print configuration message */
- printf("Testing for selection I/O ");
- if (chunked)
- printf("with chunked dataset, ");
- else
- printf("with contiguous dataset, ");
- if (dtrans)
- printf("data transform, ");
- else
- printf("without data transform, ");
- if (mwbuf)
- printf("and with modifying write buffers\n");
- else
- printf("and without modifying write buffers\n");
+ if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl2)) < 0)
+ TEST_ERROR;
- for (test_select_config = (int)TEST_NO_TYPE_CONV;
- test_select_config < (int)TEST_SELECT_NTESTS; test_select_config++) {
+ /* Test with contiguous or chunked dataset */
+ for (chunked = false; chunked <= true; chunked++) {
- switch (test_select_config) {
- case TEST_NO_TYPE_CONV: /* case 1 */
- TESTING_2("No type conversion (null case)");
+ /* Data transforms only apply to integer or floating-point datasets */
+ /* therefore, not all tests are run with data transform */
+ for (dtrans = false; dtrans <= true; dtrans++) {
- nerrors += (test_no_type_conv(fid, chunked, dtrans, mwbuf) < 0 ? 1 : 0);
+ /* Test with and without modify_write_buf turned on */
+ for (mwbuf = false; mwbuf <= true; mwbuf++) {
- break;
+ /* Print configuration message */
+ printf("Testing for selection I/O ");
- case TEST_NO_SIZE_CHANGE_NO_BKG: /* case 2 */
- TESTING_2("No size change, no background buffer");
+ if (set_cache)
+ printf("with 0 chunk cache, ");
+ else
+ printf("with default chunk cache, ");
- /* Data transforms does not apply to the dataset datatype for this test */
- if (dtrans)
- SKIPPED();
- else
- nerrors += (test_no_size_change_no_bkg(fid, chunked, mwbuf) < 0 ? 1 : 0);
+ if (chunked)
+ printf("with chunked dataset, ");
+ else
+ printf("with contiguous dataset, ");
- break;
+ if (dtrans)
+ printf("data transform, ");
+ else
+ printf("without data transform, ");
- case TEST_LARGER_MEM_NO_BKG: /* case 3 */
- TESTING_2("Larger memory type, no background buffer");
+ if (mwbuf)
+ printf("and with modifying write buffers\n");
+ else
+ printf("and without modifying write buffers\n");
- nerrors += (test_larger_mem_type_no_bkg(fid, chunked, dtrans, mwbuf) < 0 ? 1 : 0);
+ for (test_select_config = (int)TEST_NO_TYPE_CONV;
+ test_select_config < (int)TEST_SELECT_NTESTS; test_select_config++) {
- break;
+ switch (test_select_config) {
+ case TEST_NO_TYPE_CONV: /* case 1 */
+ TESTING_2("No type conversion (null case)");
- case TEST_SMALLER_MEM_NO_BKG: /* case 4 */
- TESTING_2("Smaller memory type, no background buffer");
+ nerrors += (test_no_type_conv(fid, chunked, dtrans, mwbuf) < 0 ? 1 : 0);
- nerrors +=
- (test_smaller_mem_type_no_bkg(fid, chunked, dtrans, mwbuf) < 0 ? 1 : 0);
+ break;
- break;
+ case TEST_NO_SIZE_CHANGE_NO_BKG: /* case 2 */
+ TESTING_2("No size change, no background buffer");
- case TEST_CMPD_WITH_BKG: /* case 5 */
- TESTING_2("Compound types with background buffer");
+ /* Data transforms does not apply to the dataset datatype for this test */
+ if (dtrans)
+ SKIPPED();
+ else
+ nerrors += (test_no_size_change_no_bkg(fid, chunked, mwbuf) < 0 ? 1 : 0);
- /* Data transforms does not apply to the dataset datatype for this test */
- if (dtrans)
- SKIPPED();
- else
- nerrors += (test_cmpd_with_bkg(fid, chunked, mwbuf) < 0 ? 1 : 0);
+ break;
- break;
+ case TEST_LARGER_MEM_NO_BKG: /* case 3 */
+ TESTING_2("Larger memory type, no background buffer");
- case TEST_MULTI_CONV_NO_BKG: /* case 6 */
- TESTING_2("multi-datasets: type conv + no bkg buffer");
+ nerrors +=
+ (test_larger_mem_type_no_bkg(fid, chunked, dtrans, mwbuf) < 0 ? 1 : 0);
- nerrors += test_multi_dsets_no_bkg(fid, chunked, dtrans, mwbuf);
- break;
+ break;
- case TEST_MULTI_CONV_BKG: /* case 7 */
- TESTING_2("multi-datasets: type conv + bkg buffer");
+ case TEST_SMALLER_MEM_NO_BKG: /* case 4 */
+ TESTING_2("Smaller memory type, no background buffer");
- /* Data transforms does not apply to the dataset datatype for this test */
- if (dtrans)
- SKIPPED();
- else
- nerrors += test_multi_dsets_cmpd_with_bkg(fid, chunked, mwbuf);
+ nerrors +=
+ (test_smaller_mem_type_no_bkg(fid, chunked, dtrans, mwbuf) < 0 ? 1 : 0);
- break;
+ break;
- case TEST_MULTI_CONV_SIZE_CHANGE: /* case 8 */
- TESTING_2("multi-datasets: type conv + size change + no bkg buffer");
+ case TEST_CMPD_WITH_BKG: /* case 5 */
+ TESTING_2("Compound types with background buffer");
- /* Data transforms does not apply to the dataset datatype for this test */
- if (dtrans)
- SKIPPED();
- else
- nerrors += test_multi_dsets_size_change_no_bkg(fid, chunked, mwbuf);
+ /* Data transforms does not apply to the dataset datatype for this test */
+ if (dtrans)
+ SKIPPED();
+ else
+ nerrors += (test_cmpd_with_bkg(fid, chunked, mwbuf) < 0 ? 1 : 0);
- break;
+ break;
- case TEST_MULTI_ALL: /* case 9 */
- TESTING_2("multi-datasets: no conv + conv without bkg + conv with bkg");
+ case TEST_MULTI_CONV_NO_BKG: /* case 6 */
+ TESTING_2("multi-datasets: type conv + no bkg buffer");
- /* Data transforms does not apply to the dataset datatype for this test */
- if (dtrans)
- SKIPPED();
- else
- nerrors += test_multi_dsets_all(10, fid, chunked, mwbuf);
+ nerrors += test_multi_dsets_no_bkg(fid, chunked, dtrans, mwbuf);
- break;
+ break;
- case TEST_SELECT_NTESTS:
- default:
- TEST_ERROR;
+ case TEST_MULTI_CONV_BKG: /* case 7 */
+ TESTING_2("multi-datasets: type conv + bkg buffer");
- } /* end switch */
- } /* end for test_select_config */
+ /* Data transforms does not apply to the dataset datatype for this test */
+ if (dtrans)
+ SKIPPED();
+ else
+ nerrors += test_multi_dsets_cmpd_with_bkg(fid, chunked, mwbuf);
- } /* end mwbuf */
+ break;
- } /* end dtrans */
+ case TEST_MULTI_CONV_SIZE_CHANGE: /* case 8 */
+ TESTING_2("multi-datasets: type conv + size change + no bkg buffer");
- } /* end chunked */
+ /* Data transforms does not apply to the dataset datatype for this test */
+ if (dtrans)
+ SKIPPED();
+ else
+ nerrors += test_multi_dsets_size_change_no_bkg(fid, chunked, mwbuf);
- nerrors += test_set_get_select_io_mode(fid);
+ break;
- if (H5Fclose(fid) < 0)
- TEST_ERROR;
+ case TEST_MULTI_ALL: /* case 9 */
+ TESTING_2("multi-datasets: no conv + conv without bkg + conv with bkg");
+
+ /* Data transforms does not apply to the dataset datatype for this test */
+ if (dtrans)
+ SKIPPED();
+ else
+ nerrors += test_multi_dsets_all(10, fid, chunked, mwbuf);
+
+ break;
+
+ case TEST_SELECT_NTESTS:
+ default:
+ TEST_ERROR;
+
+ } /* end switch */
+ } /* end for test_select_config */
+
+ } /* end mwbuf */
+
+ } /* end dtrans */
+
+ } /* end chunked */
+
+ if (H5Fclose(fid) < 0)
+ TEST_ERROR;
+
+ } /* end set_cache */
+
+ /* Use own file */
+ nerrors += test_set_get_select_io_mode(filename, fapl);
/* Use own file */
nerrors += test_get_no_selection_io_cause(filename, fapl);
diff --git a/test/set_extent.c b/test/set_extent.c
index 661ef4e4031..d418f2edc71 100644
--- a/test/set_extent.c
+++ b/test/set_extent.c
@@ -78,21 +78,21 @@ typedef enum rank4_index_t {
RANK4_NINDICES, /* Must be last */
} rank4_index_t;
-static int do_ranks(hid_t fapl, hbool_t new_format, hbool_t use_select_io);
-static int do_layouts(hid_t fapl, hbool_t use_select_io);
-
-static int test_rank1(hid_t fapl, hid_t dcpl, hid_t dxpl, hbool_t do_fill_value, hbool_t disable_edge_filters,
- hbool_t set_istore_k);
-static int test_rank2(hid_t fapl, hid_t dcpl, hid_t dxpl, hbool_t do_fill_value, hbool_t disable_edge_filters,
- hbool_t set_istore_k);
-static int test_rank3(hid_t fapl, hid_t dcpl, hid_t dxpl, hbool_t do_fill_value, hbool_t disable_edge_filters,
- hbool_t set_istore_k);
-static int test_random_rank4(hid_t fapl, hid_t dcpl, hid_t dxpl, hbool_t do_fillvalue,
- hbool_t disable_edge_filters, hbool_t do_sparse, rank4_index_t index_type);
-static int test_random_rank4_vl(hid_t fapl, hid_t dcpl, hid_t dxpl, hbool_t do_fillvalue,
- hbool_t disable_edge_filters, hbool_t do_sparse, rank4_index_t index_type);
-
-static int test_external(hid_t fapl, hbool_t use_select_io);
+static int do_ranks(hid_t fapl, bool new_format, bool use_select_io);
+static int do_layouts(hid_t fapl, bool use_select_io);
+
+static int test_rank1(hid_t fapl, hid_t dcpl, hid_t dxpl, bool do_fill_value, bool disable_edge_filters,
+ bool set_istore_k);
+static int test_rank2(hid_t fapl, hid_t dcpl, hid_t dxpl, bool do_fill_value, bool disable_edge_filters,
+ bool set_istore_k);
+static int test_rank3(hid_t fapl, hid_t dcpl, hid_t dxpl, bool do_fill_value, bool disable_edge_filters,
+ bool set_istore_k);
+static int test_random_rank4(hid_t fapl, hid_t dcpl, hid_t dxpl, bool do_fillvalue, bool disable_edge_filters,
+ bool do_sparse, rank4_index_t index_type);
+static int test_random_rank4_vl(hid_t fapl, hid_t dcpl, hid_t dxpl, bool do_fillvalue,
+ bool disable_edge_filters, bool do_sparse, rank4_index_t index_type);
+
+static int test_external(hid_t fapl, bool use_select_io);
static int test_layouts(H5D_layout_t layout, hid_t fapl, hid_t dxpl);
static void test_random_rank4_dump(unsigned ndim_sets, hsize_t dim_log[][4], hsize_t cdims[4], int j, int k,
int l, int m);
@@ -111,13 +111,13 @@ main(void)
unsigned chunk_cache; /* Whether to enable chunk caching */
int nerrors = 0;
const char *env_h5_drvr; /* File Driver value from environment */
- hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
+ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
/* Current VFD that does not support contiguous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
/* Initialize random number seed */
HDsrandom((unsigned)HDtime(NULL));
@@ -142,11 +142,11 @@ main(void)
TEST_ERROR;
/* Test with old & new format groups */
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
hid_t my_fapl;
/* Test chunked datasets with and without chunk cache */
- for (chunk_cache = FALSE; chunk_cache <= TRUE; chunk_cache++) {
+ for (chunk_cache = false; chunk_cache <= true; chunk_cache++) {
/* Output message about the type of format */
if (new_format)
printf("Testing with new file format");
@@ -155,11 +155,11 @@ main(void)
/* Set the FAPL for the chunk cache settings */
if (chunk_cache) {
- HDputs(" and chunk cache enabled:");
+ puts(" and chunk cache enabled:");
my_fapl = fapl;
} /* end if */
else {
- HDputs(" and chunk cache disabled:");
+ puts(" and chunk cache disabled:");
my_fapl = fapl2;
} /* end else */
@@ -179,19 +179,19 @@ main(void)
/* Tests which use chunked datasets */
if (!new_format || (new_format && contig_addr_vfd)) {
/* Run do_ranks() with H5D_SELECTION_IO_MODE_DEFAULT/H5D_SELECTION_IO_MODE_ON */
- nerrors += do_ranks(my_fapl, new_format, FALSE) < 0 ? 1 : 0;
- nerrors += do_ranks(my_fapl, new_format, TRUE) < 0 ? 1 : 0;
+ nerrors += do_ranks(my_fapl, new_format, false) < 0 ? 1 : 0;
+ nerrors += do_ranks(my_fapl, new_format, true) < 0 ? 1 : 0;
}
} /* end for */
/* Tests which do not use chunked datasets */
if (!new_format || (new_format && contig_addr_vfd)) {
/* Run test_external() with H5D_SELECTION_IO_MODE_DEFAULT/H5D_SELECTION_IO_MODE_ON */
- nerrors += test_external(fapl, FALSE) < 0 ? 1 : 0;
- nerrors += test_external(fapl, TRUE) < 0 ? 1 : 0;
+ nerrors += test_external(fapl, false) < 0 ? 1 : 0;
+ nerrors += test_external(fapl, true) < 0 ? 1 : 0;
/* Run do_layouts() with H5D_SELECTION_IO_MODE_DEFAULT/H5D_SELECTION_IO_MODE_ON */
- nerrors += do_layouts(fapl, FALSE) < 0 ? 1 : 0;
- nerrors += do_layouts(fapl, TRUE) < 0 ? 1 : 0;
+ nerrors += do_layouts(fapl, false) < 0 ? 1 : 0;
+ nerrors += do_layouts(fapl, true) < 0 ? 1 : 0;
}
} /* end for */
@@ -209,7 +209,7 @@ main(void)
if (nerrors)
goto error;
- HDputs("All H5Dset_extent tests passed.");
+ puts("All H5Dset_extent tests passed.");
return 0;
@@ -224,17 +224,17 @@ main(void)
*-------------------------------------------------------------------------
*/
static int
-do_ranks(hid_t fapl, hbool_t new_format, hbool_t use_select_io)
+do_ranks(hid_t fapl, bool new_format, bool use_select_io)
{
- hbool_t do_fillvalue = FALSE;
- hbool_t disable_edge_filters = FALSE;
+ bool do_fillvalue = false;
+ bool disable_edge_filters = false;
rank4_index_t index_type;
- hid_t dcpl = -1;
- hid_t dxpl = -1;
+ hid_t dcpl = H5I_INVALID_HID;
+ hid_t dxpl = H5I_INVALID_HID;
int fillvalue = FILL_VALUE;
unsigned config;
- hbool_t driver_is_parallel;
+ bool driver_is_parallel;
if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
@@ -272,21 +272,21 @@ do_ranks(hid_t fapl, hbool_t new_format, hbool_t use_select_io)
} /* end if */
if (config & CONFIG_FILL) {
- do_fillvalue = TRUE;
+ do_fillvalue = true;
if (H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillvalue) < 0)
TEST_ERROR;
} /* end if */
else
- do_fillvalue = FALSE;
+ do_fillvalue = false;
if (config & CONFIG_EARLY_ALLOC)
if (H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_EARLY) < 0)
TEST_ERROR;
if (config & CONFIG_UNFILT_EDGE)
- disable_edge_filters = TRUE;
+ disable_edge_filters = true;
else
- disable_edge_filters = FALSE;
+ disable_edge_filters = false;
/* Run tests */
if (do_fillvalue) {
@@ -301,22 +301,22 @@ do_ranks(hid_t fapl, hbool_t new_format, hbool_t use_select_io)
else if (H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0)
TEST_ERROR;
- if (test_rank1(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, FALSE) < 0) {
+ if (test_rank1(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, false) < 0) {
DO_RANKS_PRINT_CONFIG("Rank 1")
printf(" Fill time: %s\n", (ifset ? "H5D_FILL_TIME_IFSET" : "H5D_FILL_TIME_ALLOC"));
goto error;
} /* end if */
- if (test_rank2(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, FALSE) < 0) {
+ if (test_rank2(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, false) < 0) {
DO_RANKS_PRINT_CONFIG("Rank 2")
printf(" Fill time: %s\n", (ifset ? "H5D_FILL_TIME_IFSET" : "H5D_FILL_TIME_ALLOC"));
goto error;
} /* end if */
- if (test_rank3(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, FALSE) < 0) {
+ if (test_rank3(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, false) < 0) {
DO_RANKS_PRINT_CONFIG("Rank 3")
printf(" Fill time: %s\n", (ifset ? "H5D_FILL_TIME_IFSET" : "H5D_FILL_TIME_ALLOC"));
goto error;
} /* end if */
- if (test_rank2(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, TRUE) < 0) {
+ if (test_rank2(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, true) < 0) {
DO_RANKS_PRINT_CONFIG("Rank 2 with non-default indexed storage B-tree")
printf(" Fill time: %s\n", (ifset ? "H5D_FILL_TIME_IFSET" : "H5D_FILL_TIME_ALLOC"));
goto error;
@@ -329,19 +329,19 @@ do_ranks(hid_t fapl, hbool_t new_format, hbool_t use_select_io)
if (H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0)
TEST_ERROR;
- if (test_rank1(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, FALSE) < 0) {
+ if (test_rank1(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, false) < 0) {
DO_RANKS_PRINT_CONFIG("Rank 1")
goto error;
} /* end if */
- if (test_rank2(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, FALSE) < 0) {
+ if (test_rank2(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, false) < 0) {
DO_RANKS_PRINT_CONFIG("Rank 2")
goto error;
} /* end if */
- if (test_rank3(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, FALSE) < 0) {
+ if (test_rank3(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, false) < 0) {
DO_RANKS_PRINT_CONFIG("Rank 3")
goto error;
} /* end if */
- if (test_rank2(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, TRUE) < 0) {
+ if (test_rank2(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, true) < 0) {
DO_RANKS_PRINT_CONFIG("Rank 2 with non-default indexed storage B-tree")
goto error;
} /* end if */
@@ -356,7 +356,7 @@ do_ranks(hid_t fapl, hbool_t new_format, hbool_t use_select_io)
*/
for (index_type = RANK4_INDEX_BTREE; index_type < RANK4_NINDICES; index_type++) {
/* Standard test */
- if (test_random_rank4(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, FALSE, index_type) <
+ if (test_random_rank4(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, false, index_type) <
0) {
DO_RANKS_PRINT_CONFIG("Randomized rank 4")
printf(" Index: %s\n", index_type == RANK4_INDEX_BTREE
@@ -367,7 +367,7 @@ do_ranks(hid_t fapl, hbool_t new_format, hbool_t use_select_io)
if (!driver_is_parallel) {
/* VL test */
- if (test_random_rank4_vl(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, FALSE,
+ if (test_random_rank4_vl(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, false,
index_type) < 0) {
DO_RANKS_PRINT_CONFIG("Randomized rank 4 variable length")
printf(" Index: %s\n", index_type == RANK4_INDEX_BTREE
@@ -379,7 +379,7 @@ do_ranks(hid_t fapl, hbool_t new_format, hbool_t use_select_io)
/* Sparse allocation test (regular and VL) */
if (!(config & CONFIG_EARLY_ALLOC)) {
- if (test_random_rank4(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, TRUE,
+ if (test_random_rank4(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, true,
index_type) < 0) {
DO_RANKS_PRINT_CONFIG("Randomized rank 4 with sparse allocation")
printf(" Index: %s\n", index_type == RANK4_INDEX_BTREE
@@ -389,7 +389,7 @@ do_ranks(hid_t fapl, hbool_t new_format, hbool_t use_select_io)
} /* end if */
if (!driver_is_parallel) {
- if (test_random_rank4_vl(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, TRUE,
+ if (test_random_rank4_vl(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, true,
index_type) < 0) {
DO_RANKS_PRINT_CONFIG("Randomized rank 4 variable length with sparse allocation")
printf(" Index: %s\n",
@@ -435,10 +435,10 @@ do_ranks(hid_t fapl, hbool_t new_format, hbool_t use_select_io)
*-------------------------------------------------------------------------
*/
static int
-do_layouts(hid_t fapl, hbool_t use_select_io)
+do_layouts(hid_t fapl, bool use_select_io)
{
- hid_t new_fapl = -1;
- hid_t dxpl = -1;
+ hid_t new_fapl = H5I_INVALID_HID;
+ hid_t dxpl = H5I_INVALID_HID;
H5F_libver_t low, high; /* Low and high bounds */
herr_t ret; /* Generic return value */
@@ -510,14 +510,14 @@ do_layouts(hid_t fapl, hbool_t use_select_io)
*/
static int
-test_rank1(hid_t fapl, hid_t dcpl, hid_t dxpl, hbool_t do_fill_value, hbool_t disable_edge_filters,
- hbool_t set_istore_k)
+test_rank1(hid_t fapl, hid_t dcpl, hid_t dxpl, bool do_fill_value, bool disable_edge_filters,
+ bool set_istore_k)
{
- hid_t fid = -1;
- hid_t did = -1;
- hid_t sid = -1;
- hid_t my_dcpl = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t my_dcpl = H5I_INVALID_HID;
hid_t fcpl;
hsize_t dims_o[RANK1] = {DIM0}; /* original dimensions */
hsize_t dims_s[RANK1] = {DIMS0}; /* shrinking dimensions */
@@ -844,14 +844,14 @@ test_rank1(hid_t fapl, hid_t dcpl, hid_t dxpl, hbool_t do_fill_value, hbool_t di
*/
static int
-test_rank2(hid_t fapl, hid_t dcpl, hid_t dxpl, hbool_t do_fill_value, hbool_t disable_edge_filters,
- hbool_t set_istore_k)
+test_rank2(hid_t fapl, hid_t dcpl, hid_t dxpl, bool do_fill_value, bool disable_edge_filters,
+ bool set_istore_k)
{
- hid_t fid = -1;
- hid_t did = -1;
- hid_t sid = -1;
- hid_t my_dcpl = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t my_dcpl = H5I_INVALID_HID;
hid_t fcpl;
hsize_t dims_o[RANK2] = {DIM0, DIM1}; /* original dimensions */
hsize_t dims_s[RANK2] = {DIMS0, DIMS1}; /* shrinking dimensions */
@@ -1339,14 +1339,14 @@ test_rank2(hid_t fapl, hid_t dcpl, hid_t dxpl, hbool_t do_fill_value, hbool_t di
*/
static int
-test_rank3(hid_t fapl, hid_t dcpl, hid_t dxpl, hbool_t do_fill_value, hbool_t disable_edge_filters,
- hbool_t set_istore_k)
+test_rank3(hid_t fapl, hid_t dcpl, hid_t dxpl, bool do_fill_value, bool disable_edge_filters,
+ bool set_istore_k)
{
- hid_t fid = -1;
- hid_t did = -1;
- hid_t sid = -1;
- hid_t my_dcpl = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t my_dcpl = H5I_INVALID_HID;
hid_t fcpl;
hsize_t dims_o[RANK3] = {DIM0, DIM1, DIM2}; /* original dimensions */
hsize_t dims_s[RANK3] = {DIMS0, DIMS1, DIMS2}; /* shrinking dimensions */
@@ -1774,14 +1774,14 @@ test_rank3(hid_t fapl, hid_t dcpl, hid_t dxpl, hbool_t do_fill_value, hbool_t di
*-------------------------------------------------------------------------
*/
static int
-test_external(hid_t fapl, hbool_t use_select_io)
+test_external(hid_t fapl, bool use_select_io)
{
- hid_t fid = -1;
- hid_t did = -1;
- hid_t sid = -1;
- hid_t dcpl = -1;
- hid_t dxpl = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
+ hid_t dxpl = H5I_INVALID_HID;
hsize_t dims_o[RANK2] = {DIM0, DIM1}; /* original dimensions */
hsize_t dims_s[RANK2] = {DIMS0, DIMS1}; /* shrinking dimensions */
hsize_t dims_e[RANK2] = {DIME0, DIM1}; /* extended dimensions, dimension 1 is the original */
@@ -2080,10 +2080,10 @@ static int
test_layouts(H5D_layout_t layout, hid_t fapl, hid_t dxpl)
{
- hid_t fid = -1;
- hid_t did = -1;
- hid_t sid = -1;
- hid_t dcpl = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
herr_t ret;
hsize_t dims_o[RANK2] = {DIM0, DIM1}; /* original dimensions */
hsize_t dims_s[RANK2] = {DIMS0, DIMS1}; /* shrinking dimensions */
@@ -2293,14 +2293,14 @@ test_layouts(H5D_layout_t layout, hid_t fapl, hid_t dxpl)
*-------------------------------------------------------------------------
*/
static int
-test_random_rank4(hid_t fapl, hid_t dcpl, hid_t dxpl, hbool_t do_fillvalue, hbool_t disable_edge_filters,
- hbool_t do_sparse, rank4_index_t index_type)
+test_random_rank4(hid_t fapl, hid_t dcpl, hid_t dxpl, bool do_fillvalue, bool disable_edge_filters,
+ bool do_sparse, rank4_index_t index_type)
{
- hid_t file = -1;
- hid_t dset = -1;
- hid_t fspace = -1;
- hid_t mspace = -1;
- hid_t my_dcpl = -1;
+ hid_t file = H5I_INVALID_HID;
+ hid_t dset = H5I_INVALID_HID;
+ hid_t fspace = H5I_INVALID_HID;
+ hid_t mspace = H5I_INVALID_HID;
+ hid_t my_dcpl = H5I_INVALID_HID;
hsize_t dims[4] = {10, 10, 10, 10}; /* Dataset's dimensions */
hsize_t max_dims[4] = {10, 10, 10, 10}; /* Maximum dimensions */
hsize_t old_dims[4]; /* Old dataset dimensions */
@@ -2318,8 +2318,8 @@ test_random_rank4(hid_t fapl, hid_t dcpl, hid_t dxpl, hbool_t do_fillvalue, hboo
struct {
hsize_t arr[RAND4_NITER + 1][4];
} *dim_log = NULL; /* Log of dataset dimensions */
- hbool_t zero_dim = FALSE; /* Whether a dimension is 0 */
- hbool_t writing = TRUE; /* Whether we're writing to the dset */
+ bool zero_dim = false; /* Whether a dimension is 0 */
+ bool writing = true; /* Whether we're writing to the dset */
unsigned scalar_iter; /* Iteration to shrink dset to 1x1x1x1 */
unsigned i, j, k, l, m; /* Local indices */
char filename[NAME_BUF_SIZE];
@@ -2399,12 +2399,12 @@ test_random_rank4(hid_t fapl, hid_t dcpl, hid_t dxpl, hbool_t do_fillvalue, hboo
/* Generate new dataset size, 0-10 (0 much less likely). If i is
* scalar_iter, set all dims to 1. */
- zero_dim = FALSE;
+ zero_dim = false;
for (j = 0; j < 4; j++) {
old_dims[j] = dims[j];
if ((dims[j] = (hsize_t)(i == scalar_iter ? 1 : (HDrandom() % 11))) == 0)
if ((dims[j] = (hsize_t)(HDrandom() % 11)) == 0)
- zero_dim = TRUE;
+ zero_dim = true;
dim_log->arr[i + 1][j] = dims[j];
} /* end for */
@@ -2510,15 +2510,15 @@ test_random_rank4(hid_t fapl, hid_t dcpl, hid_t dxpl, hbool_t do_fillvalue, hboo
*-------------------------------------------------------------------------
*/
static int
-test_random_rank4_vl(hid_t fapl, hid_t dcpl, hid_t dxpl, hbool_t do_fillvalue, hbool_t disable_edge_filters,
- hbool_t do_sparse, rank4_index_t index_type)
+test_random_rank4_vl(hid_t fapl, hid_t dcpl, hid_t dxpl, bool do_fillvalue, bool disable_edge_filters,
+ bool do_sparse, rank4_index_t index_type)
{
- hid_t file = -1;
- hid_t dset = -1;
- hid_t type = -1;
- hid_t fspace = -1;
- hid_t mspace = -1;
- hid_t my_dcpl = -1;
+ hid_t file = H5I_INVALID_HID;
+ hid_t dset = H5I_INVALID_HID;
+ hid_t type = H5I_INVALID_HID;
+ hid_t fspace = H5I_INVALID_HID;
+ hid_t mspace = H5I_INVALID_HID;
+ hid_t my_dcpl = H5I_INVALID_HID;
hsize_t dims[4] = {10, 10, 10, 10}; /* Dataset's dimensions */
hsize_t max_dims[4] = {10, 10, 10, 10}; /* Maximum dimensions */
hsize_t old_dims[4]; /* Old dataset dimensions */
@@ -2536,8 +2536,8 @@ test_random_rank4_vl(hid_t fapl, hid_t dcpl, hid_t dxpl, hbool_t do_fillvalue, h
struct {
hsize_t arr[RAND4_NITER + 1][4];
} *dim_log = NULL; /* Log of dataset dimensions */
- hbool_t zero_dim = FALSE; /* Whether a dimension is 0 */
- hbool_t writing = TRUE; /* Whether we're writing to the dset */
+ bool zero_dim = false; /* Whether a dimension is 0 */
+ bool writing = true; /* Whether we're writing to the dset */
hvl_t fill_value; /* Fill value */
unsigned scalar_iter; /* Iteration to shrink dset to 1x1x1x1 */
unsigned i, j, k, l, m; /* Local indices */
@@ -2661,12 +2661,12 @@ test_random_rank4_vl(hid_t fapl, hid_t dcpl, hid_t dxpl, hbool_t do_fillvalue, h
/* Generate new dataset size, 0-10 (0 much less likely). If i is
* scalar_iter, set all dims to 1. */
- zero_dim = FALSE;
+ zero_dim = false;
for (j = 0; j < 4; j++) {
old_dims[j] = dims[j];
if ((dims[j] = (hsize_t)(i == scalar_iter ? 1 : (HDrandom() % 11))) == 0)
if ((dims[j] = (hsize_t)(HDrandom() % 11)) == 0)
- zero_dim = TRUE;
+ zero_dim = true;
dim_log->arr[i + 1][j] = dims[j];
}
diff --git a/test/stab.c b/test/stab.c
index 6bdba653e32..1b7da018822 100644
--- a/test/stab.c
+++ b/test/stab.c
@@ -83,10 +83,10 @@ static const char *FILENAME[] = {"stab", NULL};
*-------------------------------------------------------------------------
*/
static int
-test_misc(hid_t fcpl, hid_t fapl, hbool_t new_format)
+test_misc(hid_t fcpl, hid_t fapl, bool new_format)
{
- hid_t fid = (-1); /* File ID */
- hid_t g1 = (-1), g2 = (-1), g3 = (-1);
+ hid_t fid = (H5I_INVALID_HID); /* File ID */
+ hid_t g1 = (H5I_INVALID_HID), g2 = (H5I_INVALID_HID), g3 = (H5I_INVALID_HID);
char filename[NAME_BUF_SIZE];
char comment[64];
@@ -125,9 +125,9 @@ test_misc(hid_t fcpl, hid_t fapl, hbool_t new_format)
TEST_ERROR;
if (H5Oget_comment_by_name(g3, "././.", comment, sizeof comment, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(comment, "hello world") != 0) {
+ if (strcmp(comment, "hello world") != 0) {
H5_FAILED();
- HDputs(" Read the wrong comment string from the group.");
+ puts(" Read the wrong comment string from the group.");
printf(" got: \"%s\"\n ans: \"hello world\"\n", comment);
TEST_ERROR;
}
@@ -184,10 +184,10 @@ test_misc(hid_t fcpl, hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-test_long(hid_t fcpl, hid_t fapl, hbool_t new_format)
+test_long(hid_t fcpl, hid_t fapl, bool new_format)
{
- hid_t fid = (-1); /* File ID */
- hid_t g1 = (-1), g2 = (-1);
+ hid_t fid = (H5I_INVALID_HID); /* File ID */
+ hid_t g1 = (H5I_INVALID_HID), g2 = (H5I_INVALID_HID);
size_t name2Len;
char *name1 = NULL, *name2 = NULL;
char filename[NAME_BUF_SIZE];
@@ -210,7 +210,7 @@ test_long(hid_t fcpl, hid_t fapl, hbool_t new_format)
name1[LONG_NAME_LEN - 1] = '\0';
name2Len = (2 * LONG_NAME_LEN) + 2;
name2 = (char *)malloc(name2Len);
- HDsnprintf(name2, name2Len, "%s/%s", name1, name1);
+ snprintf(name2, name2Len, "%s/%s", name1, name1);
/* Create groups */
if ((g1 = H5Gcreate2(fid, name1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -268,10 +268,10 @@ test_long(hid_t fcpl, hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-test_large(hid_t fcpl, hid_t fapl, hbool_t new_format)
+test_large(hid_t fcpl, hid_t fapl, bool new_format)
{
- hid_t fid = (-1); /* File ID */
- hid_t cwg = (-1), dir = (-1); /* Group IDs */
+ hid_t fid = (H5I_INVALID_HID); /* File ID */
+ hid_t cwg = (H5I_INVALID_HID), dir = (H5I_INVALID_HID); /* Group IDs */
char filename[NAME_BUF_SIZE];
char name[NAME_BUF_SIZE];
int i;
@@ -293,17 +293,17 @@ test_large(hid_t fcpl, hid_t fapl, hbool_t new_format)
if ((cwg = H5Gcreate2(fid, "/big", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (new_format)
- if (H5G__has_stab_test(cwg) != FALSE)
+ if (H5G__has_stab_test(cwg) != false)
TEST_ERROR;
for (i = 0; i < LARGE_NOBJS; i++) {
- HDsnprintf(name, sizeof(name), "%05d%05d", (HDrandom() % 100000), i);
+ snprintf(name, sizeof(name), "%05d%05d", (HDrandom() % 100000), i);
if ((dir = H5Gcreate2(cwg, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(dir) < 0)
TEST_ERROR;
}
if (new_format)
- if (H5G__is_new_dense_test(cwg) != TRUE)
+ if (H5G__is_new_dense_test(cwg) != true)
TEST_ERROR;
if (H5Gclose(cwg) < 0)
TEST_ERROR;
@@ -342,18 +342,18 @@ test_large(hid_t fcpl, hid_t fapl, hbool_t new_format)
static int
lifecycle(hid_t fcpl, hid_t fapl2)
{
- hid_t fid = (-1); /* File ID */
- hid_t gid = (-1); /* Group ID */
- hid_t gid2 = (-1); /* Datatype ID */
- hid_t gcpl = (-1); /* Group creation property list ID */
- size_t lheap_size_hint; /* Local heap size hint */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- unsigned est_num_entries; /* Estimated # of entries in group */
- unsigned est_name_len; /* Estimated length of entry name */
- unsigned nmsgs; /* Number of messages in group's header */
- H5O_native_info_t ninfo; /* Object info */
- char objname[NAME_BUF_SIZE]; /* Object name */
+ hid_t fid = (H5I_INVALID_HID); /* File ID */
+ hid_t gid = (H5I_INVALID_HID); /* Group ID */
+ hid_t gid2 = (H5I_INVALID_HID); /* Datatype ID */
+ hid_t gcpl = (H5I_INVALID_HID); /* Group creation property list ID */
+ size_t lheap_size_hint; /* Local heap size hint */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ unsigned est_num_entries; /* Estimated # of entries in group */
+ unsigned est_name_len; /* Estimated length of entry name */
+ unsigned nmsgs; /* Number of messages in group's header */
+ H5O_native_info_t ninfo; /* Object info */
+ char objname[NAME_BUF_SIZE]; /* Object name */
char filename[NAME_BUF_SIZE];
h5_stat_size_t empty_size; /* Size of an empty file */
unsigned u; /* Local index variable */
@@ -431,16 +431,16 @@ lifecycle(hid_t fcpl, hid_t fapl2)
TEST_ERROR;
/* Use internal testing routine to check that the group has no links or symbol table */
- if (H5G__is_empty_test(gid) != TRUE)
+ if (H5G__is_empty_test(gid) != true)
TEST_ERROR;
/* Create first "bottom" group */
- HDsnprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, (unsigned)0);
+ snprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, (unsigned)0);
if ((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
/* Check on bottom group's status */
- if (H5G__is_empty_test(gid2) != TRUE)
+ if (H5G__is_empty_test(gid2) != true)
TEST_ERROR;
/* Close bottom group */
@@ -448,9 +448,9 @@ lifecycle(hid_t fcpl, hid_t fapl2)
TEST_ERROR;
/* Check on top group's status */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, &nmsgs) != TRUE)
+ if (H5G__has_links_test(gid, &nmsgs) != true)
TEST_ERROR;
if (nmsgs != 1)
TEST_ERROR;
@@ -458,12 +458,12 @@ lifecycle(hid_t fcpl, hid_t fapl2)
/* Create several more bottom groups, to push the top group almost to a symbol table */
/* (Start counting at '1', since we've already created one bottom group */
for (u = 1; u < LIFECYCLE_MAX_COMPACT; u++) {
- HDsnprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, u);
+ snprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, u);
if ((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
/* Check on bottom group's status */
- if (H5G__is_empty_test(gid2) != TRUE)
+ if (H5G__is_empty_test(gid2) != true)
TEST_ERROR;
/* Close bottom group */
@@ -472,13 +472,13 @@ lifecycle(hid_t fcpl, hid_t fapl2)
} /* end for */
/* Check on top group's status */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, &nmsgs) != TRUE)
+ if (H5G__has_links_test(gid, &nmsgs) != true)
TEST_ERROR;
if (nmsgs != LIFECYCLE_MAX_COMPACT)
TEST_ERROR;
- if (H5G__is_new_dense_test(gid) != FALSE)
+ if (H5G__is_new_dense_test(gid) != false)
TEST_ERROR;
/* Check that the object header is only one chunk and the space has been allocated correctly */
@@ -494,12 +494,12 @@ lifecycle(hid_t fcpl, hid_t fapl2)
TEST_ERROR;
/* Create one more "bottom" group, which should push top group into using a symbol table */
- HDsnprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, u);
+ snprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, u);
if ((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
/* Check on bottom group's status */
- if (H5G__is_empty_test(gid2) != TRUE)
+ if (H5G__is_empty_test(gid2) != true)
TEST_ERROR;
/* Close bottom group */
@@ -507,11 +507,11 @@ lifecycle(hid_t fcpl, hid_t fapl2)
TEST_ERROR;
/* Check on top group's status */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, NULL) == TRUE)
+ if (H5G__has_links_test(gid, NULL) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(gid) != TRUE)
+ if (H5G__is_new_dense_test(gid) != true)
TEST_ERROR;
/* Check that the object header is still one chunk and the space has been allocated correctly */
@@ -528,7 +528,7 @@ lifecycle(hid_t fcpl, hid_t fapl2)
/* Unlink objects from top group */
while (u >= LIFECYCLE_MIN_DENSE) {
- HDsnprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, u);
+ snprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, u);
if (H5Ldelete(gid, objname, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
@@ -537,38 +537,38 @@ lifecycle(hid_t fcpl, hid_t fapl2)
} /* end while */
/* Check on top group's status */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, NULL) == TRUE)
+ if (H5G__has_links_test(gid, NULL) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(gid) != TRUE)
+ if (H5G__is_new_dense_test(gid) != true)
TEST_ERROR;
/* Unlink one more object from the group, which should transform back to using links */
- HDsnprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, u);
+ snprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, u);
if (H5Ldelete(gid, objname, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
u--;
/* Check on top group's status */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, &nmsgs) != TRUE)
+ if (H5G__has_links_test(gid, &nmsgs) != true)
TEST_ERROR;
if (nmsgs != (LIFECYCLE_MIN_DENSE - 1))
TEST_ERROR;
/* Unlink last two objects from top group */
- HDsnprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, u);
+ snprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, u);
if (H5Ldelete(gid, objname, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
u--;
- HDsnprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, u);
+ snprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, u);
if (H5Ldelete(gid, objname, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
/* Check on top group's status */
- if (H5G__is_empty_test(gid) != TRUE)
+ if (H5G__is_empty_test(gid) != true)
TEST_ERROR;
/* Close top group */
@@ -625,10 +625,10 @@ lifecycle(hid_t fcpl, hid_t fapl2)
static int
long_compact(hid_t fcpl, hid_t fapl2)
{
- hid_t fid = (-1); /* File ID */
- hid_t gid = (-1); /* Group ID */
- hid_t gid2 = (-1); /* Group ID */
- char *objname = NULL; /* Object name */
+ hid_t fid = (H5I_INVALID_HID); /* File ID */
+ hid_t gid = (H5I_INVALID_HID); /* Group ID */
+ hid_t gid2 = (H5I_INVALID_HID); /* Group ID */
+ char *objname = NULL; /* Object name */
char filename[NAME_BUF_SIZE];
h5_stat_size_t empty_size; /* Size of an empty file */
h5_stat_size_t file_size; /* Size of each file created */
@@ -663,7 +663,7 @@ long_compact(hid_t fcpl, hid_t fapl2)
TEST_ERROR;
/* Use internal testing routine to check that the group has no links or dense storage */
- if (H5G__is_empty_test(gid) != TRUE)
+ if (H5G__is_empty_test(gid) != true)
TEST_ERROR;
/* Create first group with "long" name */
@@ -671,7 +671,7 @@ long_compact(hid_t fcpl, hid_t fapl2)
TEST_ERROR;
/* Check on bottom group's status */
- if (H5G__is_empty_test(gid2) != TRUE)
+ if (H5G__is_empty_test(gid2) != true)
TEST_ERROR;
/* Close bottom group */
@@ -680,11 +680,11 @@ long_compact(hid_t fcpl, hid_t fapl2)
/* Check on top group's status */
/* (Should have dense storage to hold links, since name is too long for object header message) */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, NULL) == TRUE)
+ if (H5G__has_links_test(gid, NULL) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(gid) != TRUE)
+ if (H5G__is_new_dense_test(gid) != true)
TEST_ERROR;
/* Create second group with "long" name */
@@ -693,7 +693,7 @@ long_compact(hid_t fcpl, hid_t fapl2)
TEST_ERROR;
/* Check on bottom group's status */
- if (H5G__is_empty_test(gid2) != TRUE)
+ if (H5G__is_empty_test(gid2) != true)
TEST_ERROR;
/* Close bottom group */
@@ -702,11 +702,11 @@ long_compact(hid_t fcpl, hid_t fapl2)
/* Check on top group's status */
/* (Should have dense storage to hold links, since name is too long for object header message) */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, NULL) == TRUE)
+ if (H5G__has_links_test(gid, NULL) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(gid) != TRUE)
+ if (H5G__is_new_dense_test(gid) != true)
TEST_ERROR;
/* Unlink second object from top group */
@@ -715,11 +715,11 @@ long_compact(hid_t fcpl, hid_t fapl2)
/* Check on top group's status */
/* (Should still be dense storage to hold links, since name is too long for object header message) */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, NULL) == TRUE)
+ if (H5G__has_links_test(gid, NULL) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(gid) != TRUE)
+ if (H5G__is_new_dense_test(gid) != true)
TEST_ERROR;
/* Unlink first object from top group */
@@ -729,7 +729,7 @@ long_compact(hid_t fcpl, hid_t fapl2)
/* Check on top group's status */
/* (Should have deleted the dense storage now) */
- if (H5G__is_empty_test(gid) != TRUE)
+ if (H5G__is_empty_test(gid) != true)
TEST_ERROR;
/* Free object name */
@@ -788,11 +788,11 @@ long_compact(hid_t fcpl, hid_t fapl2)
static int
read_old(void)
{
- hid_t fid = (-1); /* File ID */
- hid_t gid = (-1); /* Group ID */
- hid_t gid2 = (-1); /* Group ID */
- char objname[NAME_BUF_SIZE]; /* Object name */
- unsigned u; /* Local index variable */
+ hid_t fid = (H5I_INVALID_HID); /* File ID */
+ hid_t gid = (H5I_INVALID_HID); /* Group ID */
+ hid_t gid2 = (H5I_INVALID_HID); /* Group ID */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ unsigned u; /* Local index variable */
TESTING("reading old groups");
@@ -809,21 +809,21 @@ read_old(void)
TEST_ERROR;
/* Check on old group's status */
- if (H5G__is_empty_test(gid) == FALSE)
+ if (H5G__is_empty_test(gid) == false)
TEST_ERROR;
- if (H5G__has_links_test(gid, NULL) == TRUE)
+ if (H5G__has_links_test(gid, NULL) == true)
TEST_ERROR;
- if (H5G__has_stab_test(gid) != TRUE)
+ if (H5G__has_stab_test(gid) != true)
TEST_ERROR;
/* Create a bunch of objects in the group */
for (u = 0; u < READ_OLD_NGROUPS; u++) {
- HDsnprintf(objname, sizeof(objname), "Group %u", u);
+ snprintf(objname, sizeof(objname), "Group %u", u);
if ((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
/* Check on bottom group's status */
- if (H5G__is_empty_test(gid2) != TRUE)
+ if (H5G__is_empty_test(gid2) != true)
TEST_ERROR;
/* Close bottom group */
@@ -833,27 +833,27 @@ read_old(void)
/* Check on old group's status */
/* (Should stay in old "symbol table" form) */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, NULL) == TRUE)
+ if (H5G__has_links_test(gid, NULL) == true)
TEST_ERROR;
- if (H5G__has_stab_test(gid) != TRUE)
+ if (H5G__has_stab_test(gid) != true)
TEST_ERROR;
/* Delete new objects from old group */
for (u = 0; u < READ_OLD_NGROUPS; u++) {
- HDsnprintf(objname, sizeof(objname), "Group %u", u);
+ snprintf(objname, sizeof(objname), "Group %u", u);
if (H5Ldelete(gid, objname, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
/* Check on old group's status */
/* (Should stay in old "symbol table" form, but have no links) */
- if (H5G__is_empty_test(gid) == FALSE)
+ if (H5G__is_empty_test(gid) == false)
TEST_ERROR;
- if (H5G__has_links_test(gid, NULL) == TRUE)
+ if (H5G__has_links_test(gid, NULL) == true)
TEST_ERROR;
- if (H5G__has_stab_test(gid) != TRUE)
+ if (H5G__has_stab_test(gid) != true)
TEST_ERROR;
/* Close old group */
@@ -892,11 +892,11 @@ read_old(void)
static int
no_compact(hid_t fcpl, hid_t fapl2)
{
- hid_t fid = (-1); /* File ID */
- hid_t gid = (-1); /* Group ID */
- hid_t gid2 = (-1); /* Datatype ID */
- hid_t gcpl = (-1); /* Group creation property list ID */
- char objname[NAME_BUF_SIZE]; /* Object name */
+ hid_t fid = (H5I_INVALID_HID); /* File ID */
+ hid_t gid = (H5I_INVALID_HID); /* Group ID */
+ hid_t gid2 = (H5I_INVALID_HID); /* Datatype ID */
+ hid_t gcpl = (H5I_INVALID_HID); /* Group creation property list ID */
+ char objname[NAME_BUF_SIZE]; /* Object name */
char filename[NAME_BUF_SIZE];
h5_stat_size_t empty_size; /* Size of an empty file */
h5_stat_size_t file_size; /* Size of each file created */
@@ -947,16 +947,16 @@ no_compact(hid_t fcpl, hid_t fapl2)
TEST_ERROR;
/* Use internal testing routine to check that the group has no links or dense storage */
- if (H5G__is_empty_test(gid) != TRUE)
+ if (H5G__is_empty_test(gid) != true)
TEST_ERROR;
/* Create first "bottom" group */
- HDsnprintf(objname, sizeof(objname), NO_COMPACT_BOTTOM_GROUP, (unsigned)0);
+ snprintf(objname, sizeof(objname), NO_COMPACT_BOTTOM_GROUP, (unsigned)0);
if ((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
/* Check on bottom group's status */
- if (H5G__is_empty_test(gid2) != TRUE)
+ if (H5G__is_empty_test(gid2) != true)
TEST_ERROR;
/* Close bottom group */
@@ -964,20 +964,20 @@ no_compact(hid_t fcpl, hid_t fapl2)
TEST_ERROR;
/* Check on top group's status */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, NULL) == TRUE)
+ if (H5G__has_links_test(gid, NULL) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(gid) != TRUE)
+ if (H5G__is_new_dense_test(gid) != true)
TEST_ERROR;
/* Unlink object from top group */
- HDsnprintf(objname, sizeof(objname), NO_COMPACT_BOTTOM_GROUP, (unsigned)0);
+ snprintf(objname, sizeof(objname), NO_COMPACT_BOTTOM_GROUP, (unsigned)0);
if (H5Ldelete(gid, objname, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
/* Check on top group's status */
- if (H5G__is_empty_test(gid) != TRUE)
+ if (H5G__is_empty_test(gid) != true)
TEST_ERROR;
/* Close top group */
@@ -1029,14 +1029,14 @@ no_compact(hid_t fcpl, hid_t fapl2)
static int
gcpl_on_root(hid_t fapl2)
{
- hid_t fid = (-1); /* File ID */
- hid_t gid = (-1); /* Group ID */
- hid_t gid2 = (-1); /* Datatype ID */
- hid_t fcpl = (-1); /* File creation property list ID */
- hid_t gcpl = (-1); /* Group creation property list ID */
- hid_t lcpl = (-1); /* Link creation property list ID */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ hid_t fid = (H5I_INVALID_HID); /* File ID */
+ hid_t gid = (H5I_INVALID_HID); /* Group ID */
+ hid_t gid2 = (H5I_INVALID_HID); /* Datatype ID */
+ hid_t fcpl = (H5I_INVALID_HID); /* File creation property list ID */
+ hid_t gcpl = (H5I_INVALID_HID); /* Group creation property list ID */
+ hid_t lcpl = (H5I_INVALID_HID); /* Link creation property list ID */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
char filename[NAME_BUF_SIZE];
TESTING("setting root group creation properties");
@@ -1089,7 +1089,7 @@ gcpl_on_root(hid_t fapl2)
/* Create a link creation property list, with intermediate group creation set */
if ((lcpl = H5Pcreate(H5P_LINK_CREATE)) < 0)
TEST_ERROR;
- if (H5Pset_create_intermediate_group(lcpl, TRUE) < 0)
+ if (H5Pset_create_intermediate_group(lcpl, true) < 0)
TEST_ERROR;
/* Create a group and intermediate groups, to check if root group settings are inherited */
@@ -1179,10 +1179,10 @@ static int
old_api(hid_t fapl)
{
#ifndef H5_NO_DEPRECATED_SYMBOLS
- hid_t fid = (-1); /* File ID */
- hid_t gid = (-1); /* Group ID */
- h5_stat_size_t small_file_size; /* Size of small group file */
- h5_stat_size_t large_file_size; /* Size of large group file */
+ hid_t fid = (H5I_INVALID_HID); /* File ID */
+ hid_t gid = (H5I_INVALID_HID); /* Group ID */
+ h5_stat_size_t small_file_size; /* Size of small group file */
+ h5_stat_size_t large_file_size; /* Size of large group file */
char filename[NAME_BUF_SIZE];
#endif /* H5_NO_DEPRECATED_SYMBOLS */
@@ -1250,7 +1250,7 @@ old_api(hid_t fapl)
(void)fapl;
SKIPPED();
- HDputs(" Deprecated API symbols not enabled");
+ puts(" Deprecated API symbols not enabled");
#endif /* H5_NO_DEPRECATED_SYMBOLS */
return 0;
@@ -1281,8 +1281,8 @@ old_api(hid_t fapl)
static int
corrupt_stab_msg(void)
{
- hid_t fid = (-1); /* File ID */
- hid_t did = (-1); /* Dataset ID */
+ hid_t fid = (H5I_INVALID_HID); /* File ID */
+ hid_t did = (H5I_INVALID_HID); /* Dataset ID */
TESTING("corrupt symbol table message");
@@ -1376,17 +1376,17 @@ main(void)
hid_t fcpl, fcpl2; /* File creation property list ID */
unsigned new_format; /* Whether to use the new format or not */
const char *env_h5_drvr; /* File Driver value from environment */
- hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
- hbool_t driver_is_default_compatible;
+ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */
+ bool driver_is_default_compatible;
int nerrors = 0;
/* Get the VFD to use */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
/* VFD that does not support contiguous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
/* Reset library */
h5_reset();
@@ -1415,7 +1415,7 @@ main(void)
TEST_ERROR;
/* Loop over using new group format */
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
hid_t my_fapl = fapl;
hid_t my_fcpl = fcpl;
@@ -1465,7 +1465,7 @@ main(void)
if (nerrors)
goto error;
- HDputs("All symbol table tests passed.");
+ puts("All symbol table tests passed.");
/* Cleanup */
if (GetTestCleanup()) {
@@ -1477,6 +1477,6 @@ main(void)
return 0;
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
return 1;
}
diff --git a/test/swmr.c b/test/swmr.c
index d91d2738dfd..aacf498b22e 100644
--- a/test/swmr.c
+++ b/test/swmr.c
@@ -63,9 +63,9 @@ static int test_metadata_read_attempts(hid_t in_fapl);
static int test_metadata_read_retry_info(hid_t in_fapl);
/* Tests for H5Fstart_swmr_write() */
-static int test_start_swmr_write(hid_t in_fapl, hbool_t new_format);
-static int test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format);
-static int test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format);
+static int test_start_swmr_write(hid_t in_fapl, bool new_format);
+static int test_err_start_swmr_write(hid_t in_fapl, bool new_format);
+static int test_start_swmr_write_concur(hid_t in_fapl, bool new_format);
static int test_start_swmr_write_stress_ohdr(hid_t in_fapl);
static int test_start_swmr_write_persist_dapl(hid_t in_fapl);
@@ -90,16 +90,16 @@ static int test_file_lock_concur(hid_t fapl);
static int test_file_lock_swmr_concur(hid_t fapl);
/* Test file lock environment variable */
-static int test_file_locking(hid_t in_fapl, hbool_t turn_locking_on, hbool_t env_var_override);
+static int test_file_locking(hid_t in_fapl, bool turn_locking_on, bool env_var_override);
/* Tests for SWMR VFD flag */
static int test_swmr_vfd_flag(void);
/* Tests for H5Drefresh: concurrent access */
-static int test_refresh_concur(hid_t in_fapl, hbool_t new_format);
+static int test_refresh_concur(hid_t in_fapl, bool new_format);
/* Tests for multiple opens of files and datasets with H5Drefresh() & H5Fstart_swmr_write(): same process */
-static int test_multiple_same(hid_t in_fapl, hbool_t new_format);
+static int test_multiple_same(hid_t in_fapl, bool new_format);
/*
* Tests for H5Pget/set_metadata_read_attemps(), H5Fget_metadata_read_retry_info()
@@ -115,12 +115,12 @@ static int test_multiple_same(hid_t in_fapl, hbool_t new_format);
static int
test_metadata_read_attempts(hid_t in_fapl)
{
- hid_t fapl = -1; /* File access property list */
- hid_t file_fapl = -1; /* The file's access property list */
- hid_t fid = -1, fid1 = -1, fid2 = -1; /* File IDs */
- hid_t driver_id = -1; /* ID for this VFD */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
+ hid_t file_fapl = H5I_INVALID_HID; /* The file's access property list */
+ hid_t fid = H5I_INVALID_HID, fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File IDs */
+ hid_t driver_id = H5I_INVALID_HID; /* ID for this VFD */
unsigned long driver_flags = 0; /* VFD feature flags */
- hbool_t compat_w_default_vfd; /* current VFD compat w/ H5P_DEFAULT? */
+ bool compat_w_default_vfd; /* current VFD compat w/ H5P_DEFAULT? */
unsigned attempts; /* The # of read attempts */
char filename[NAME_BUF_SIZE]; /* File name */
herr_t ret; /* Generic return value */
@@ -138,11 +138,11 @@ test_metadata_read_attempts(hid_t in_fapl)
FAIL_STACK_ERROR;
if (H5FDdriver_query(driver_id, &driver_flags) < 0)
FAIL_STACK_ERROR;
- compat_w_default_vfd = (driver_flags & H5FD_FEAT_DEFAULT_VFD_COMPATIBLE) ? TRUE : FALSE;
+ compat_w_default_vfd = (driver_flags & H5FD_FEAT_DEFAULT_VFD_COMPATIBLE) ? true : false;
if (!compat_w_default_vfd) {
SKIPPED();
- HDputs(" The current VFD is not compatible with the default VFD.");
+ puts(" The current VFD is not compatible with the default VFD.");
return 0;
}
@@ -1570,28 +1570,28 @@ test_metadata_read_retry_info(hid_t in_fapl)
* Close the group and file
*/
static int
-test_start_swmr_write(hid_t in_fapl, hbool_t new_format)
+test_start_swmr_write(hid_t in_fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t fapl = -1; /* File access property */
- hid_t gid = -1; /* Group ID */
- hid_t dcpl = -1; /* Dataset creation property */
- hid_t file_fapl = -1; /* File access property for the file */
- hid_t did1 = -1, did2 = -1, did3 = -1; /* Dataset IDs */
- hid_t did1_a = -1, did1_b = -1;
- hid_t sid1 = -1, sid2 = -1, sid3 = -1; /* Dataspace IDs */
- hsize_t dim[1] = {1}; /* Dimension sizes */
- hsize_t max_dim[1] = {H5S_UNLIMITED}; /* Maximum dimension sizes */
- hsize_t chunk_dim[1] = {2}; /* Chunk dimension sizes */
- hsize_t dim2[2] = {5, 10}; /* Dimension sizes */
- hsize_t max_dim2[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; /* Maximum dimension sizes */
- hsize_t chunk_dim2[2] = {2, 7}; /* Chunk dimension sizes */
- H5D_chunk_index_t idx_type; /* Dataset chunk index type */
- int wdata = 99; /* Data to write */
- int rdata; /* Data read */
- unsigned attempts; /* The retrieved # of read attempts */
- char filename[NAME_BUF_SIZE]; /* File name */
- herr_t ret; /* Return value */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property */
+ hid_t file_fapl = H5I_INVALID_HID; /* File access property for the file */
+ hid_t did1 = H5I_INVALID_HID, did2 = H5I_INVALID_HID, did3 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t did1_a = H5I_INVALID_HID, did1_b = H5I_INVALID_HID;
+ hid_t sid1 = H5I_INVALID_HID, sid2 = H5I_INVALID_HID, sid3 = H5I_INVALID_HID; /* Dataspace IDs */
+ hsize_t dim[1] = {1}; /* Dimension sizes */
+ hsize_t max_dim[1] = {H5S_UNLIMITED}; /* Maximum dimension sizes */
+ hsize_t chunk_dim[1] = {2}; /* Chunk dimension sizes */
+ hsize_t dim2[2] = {5, 10}; /* Dimension sizes */
+ hsize_t max_dim2[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; /* Maximum dimension sizes */
+ hsize_t chunk_dim2[2] = {2, 7}; /* Chunk dimension sizes */
+ H5D_chunk_index_t idx_type; /* Dataset chunk index type */
+ int wdata = 99; /* Data to write */
+ int rdata; /* Data read */
+ unsigned attempts; /* The retrieved # of read attempts */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ herr_t ret; /* Return value */
/* Get a copy of the parameter fapl (non-latest-format) */
if ((fapl = H5Pcopy(in_fapl)) < 0)
@@ -1938,20 +1938,20 @@ test_start_swmr_write(hid_t in_fapl, hbool_t new_format)
* --fail to enable SWMR due to superblock version not 3
*/
static int
-test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
+test_err_start_swmr_write(hid_t in_fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t fid2 = -1; /* File ID */
- hid_t fapl = -1; /* A copy of file access property */
- hid_t new_fapl = -1; /* A copy of file access property */
- hid_t gid = -1; /* Group ID */
- hid_t did = -1; /* Dataset ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t aid = -1; /* Attribute ID */
- hid_t tid = -1; /* Datatype ID */
- hid_t bad_fid = -1; /* Test fid (should never represent a real ID) */
- herr_t ret; /* Return value */
- char filename[NAME_BUF_SIZE]; /* File name */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fid2 = H5I_INVALID_HID; /* File ID */
+ hid_t fapl = H5I_INVALID_HID; /* A copy of file access property */
+ hid_t new_fapl = H5I_INVALID_HID; /* A copy of file access property */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t bad_fid = H5I_INVALID_HID; /* Test fid (should never represent a real ID) */
+ herr_t ret; /* Return value */
+ char filename[NAME_BUF_SIZE]; /* File name */
/* Create a copy of the input parameter in_fapl */
if ((fapl = H5Pcopy(in_fapl)) < 0)
@@ -2401,7 +2401,7 @@ test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
#if !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID))
static int
-test_start_swmr_write_concur(hid_t H5_ATTR_UNUSED in_fapl, hbool_t new_format)
+test_start_swmr_write_concur(hid_t H5_ATTR_UNUSED in_fapl, bool new_format)
{
if (new_format) {
TESTING("H5Fstart_swmr_write()--concurrent access for latest format");
@@ -2411,27 +2411,27 @@ test_start_swmr_write_concur(hid_t H5_ATTR_UNUSED in_fapl, hbool_t new_format)
}
SKIPPED();
- HDputs(" Test skipped due to fork or waitpid not defined.");
+ puts(" Test skipped due to fork or waitpid not defined.");
return 0;
} /* test_start_swmr_write_concur() */
#else /* !defined(H5_HAVE_FORK && defined(H5_HAVE_WAITPID) */
static int
-test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
+test_start_swmr_write_concur(hid_t in_fapl, bool new_format)
{
- hid_t fid = -1, fid1 = -1, fid2 = -1; /* File IDs */
- hid_t fapl; /* File access property list */
- pid_t childpid = 0; /* Child process ID */
- pid_t tmppid; /* Child process ID returned by waitpid */
- int child_status; /* Status passed to waitpid */
- int child_wait_option = 0; /* Options passed to waitpid */
- int child_exit_val; /* Exit status of the child */
- char filename[NAME_BUF_SIZE]; /* File name */
-
- hid_t did = -1, did1 = -1, did2 = -1, did3 = -1;
- hid_t sid = -1;
- hid_t dcpl = -1;
+ hid_t fid = H5I_INVALID_HID, fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File IDs */
+ hid_t fapl; /* File access property list */
+ pid_t childpid = 0; /* Child process ID */
+ pid_t tmppid; /* Child process ID returned by waitpid */
+ int child_status; /* Status passed to waitpid */
+ int child_wait_option = 0; /* Options passed to waitpid */
+ int child_exit_val; /* Exit status of the child */
+ char filename[NAME_BUF_SIZE]; /* File name */
+
+ hid_t did = H5I_INVALID_HID, did1 = H5I_INVALID_HID, did2 = H5I_INVALID_HID, did3 = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
hsize_t chunk_dims[1] = {1};
hsize_t maxdims[1] = {H5S_UNLIMITED};
hsize_t dims[1] = {1};
@@ -2583,9 +2583,9 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
if ((childpid = fork()) < 0)
FAIL_STACK_ERROR;
- if (childpid == 0) { /* Child process */
- hid_t child_fid1 = -1, child_fid2; /* File IDs */
- hid_t child_did1 = -1, child_did2 = -1; /* Dataset IDs */
+ if (childpid == 0) { /* Child process */
+ hid_t child_fid1 = H5I_INVALID_HID, child_fid2; /* File IDs */
+ hid_t child_did1 = H5I_INVALID_HID, child_did2 = H5I_INVALID_HID; /* Dataset IDs */
int child_notify = 0;
int rdata = 0;
@@ -3029,14 +3029,14 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
static int
test_start_swmr_write_stress_ohdr(hid_t in_fapl)
{
- hid_t fid = -1; /* File IDs */
- hid_t fapl; /* File access property list */
- char filename[NAME_BUF_SIZE]; /* File name */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t tid = -1; /* Datatype ID */
- hid_t dcpl = -1; /* Dataset creation property list ID */
- hid_t aid = -1; /* Attribute ID */
+ hid_t fid = H5I_INVALID_HID; /* File IDs */
+ hid_t fapl; /* File access property list */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
hsize_t chunk_dims[2] = {10, 10};
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
char fill[256]; /* Fill value for dataset */
@@ -3241,19 +3241,19 @@ tssw_persist_dapl_verify(hid_t did, hid_t vdsid1, hid_t vdsid2, hsize_t boundary
TEST_ERROR;
if (rdcc_nbytes != rdcc_nbytes_out)
TEST_ERROR;
- if (HDfabs(rdcc_w0 - rdcc_w0_out) > (double)FP_EPSILON)
+ if (fabs(rdcc_w0 - rdcc_w0_out) > (double)FP_EPSILON)
TEST_ERROR;
/* Get efile prefix property and verify */
if (H5Pget_efile_prefix(dapl, efile_prefix_out, sizeof(efile_prefix_out)) < 0)
TEST_ERROR;
- if (HDstrncmp(efile_prefix, efile_prefix_out, sizeof(efile_prefix_out)))
+ if (strncmp(efile_prefix, efile_prefix_out, sizeof(efile_prefix_out)))
TEST_ERROR;
/* Get virtual prefix property and verify */
if (H5Pget_virtual_prefix(vds_dapl1, virtual_prefix_out, sizeof(virtual_prefix_out)) < 0)
TEST_ERROR;
- if (HDstrncmp(virtual_prefix, virtual_prefix_out, sizeof(virtual_prefix_out)))
+ if (strncmp(virtual_prefix, virtual_prefix_out, sizeof(virtual_prefix_out)))
TEST_ERROR;
/* Get virtual printf gap property and verify */
@@ -3582,14 +3582,14 @@ flush_cb(hid_t H5_ATTR_UNUSED obj_id, void *_udata)
static int
test_object_flush_cb(hid_t in_fapl)
{
- hid_t fapl = -1; /* A copy of file access property list */
- hid_t ffapl = -1; /* A file's file access property list */
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group ID */
- hid_t did1 = -1, did2 = -1; /* Dataset IDs */
- hid_t sid = -1; /* Dataspace ID */
- hsize_t dims[2] = {5, 10}; /* Dataset dimension sizes */
- int buf[50]; /* Data buffer */
+ hid_t fapl = H5I_INVALID_HID; /* A copy of file access property list */
+ hid_t ffapl = H5I_INVALID_HID; /* A file's file access property list */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t did1 = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hsize_t dims[2] = {5, 10}; /* Dataset dimension sizes */
+ int buf[50]; /* Data buffer */
H5F_flush_cb_t ret_cb; /* The callback function set in object flush property */
void *ret_ct; /* The user data set in object flush property */
unsigned flush_ct = 0; /* The user data for object flush property */
@@ -3860,13 +3860,13 @@ append_cb2(hid_t H5_ATTR_UNUSED dset_id, hsize_t H5_ATTR_UNUSED *cur_dims, void
static int
test_append_flush_generic(void)
{
- hid_t dapl = -1; /* A copy of dataset access property */
- hsize_t boundary[3]; /* The boundary for append flush property */
- unsigned count = 0; /* The user data for append flush property */
- hsize_t ret_boundary[3]; /* The boundary set in append flush property */
- H5D_append_cb_t ret_cb; /* The callback function set in append flush property */
- unsigned *ret_count; /* The user data set in append flush property */
- herr_t ret; /* The return value */
+ hid_t dapl = H5I_INVALID_HID; /* A copy of dataset access property */
+ hsize_t boundary[3]; /* The boundary for append flush property */
+ unsigned count = 0; /* The user data for append flush property */
+ hsize_t ret_boundary[3]; /* The boundary set in append flush property */
+ H5D_append_cb_t ret_cb; /* The callback function set in append flush property */
+ unsigned *ret_count; /* The user data set in append flush property */
+ herr_t ret; /* The return value */
TESTING("H5Fget/set_append_flush() for a generic dataset access property list");
@@ -4035,13 +4035,13 @@ test_append_flush_generic(void)
static int
test_append_flush_dataset_chunked(hid_t in_fapl)
{
- hid_t fid = -1; /* file ID */
- hid_t fapl = -1; /* A copy of file access property */
- hid_t did1 = -1, did2 = -1; /* The dataset ID */
- hid_t sid = -1; /* The dataspace ID */
- hid_t dcpl = -1; /* A copy of dataset creation property */
- hid_t dapl = -1; /* A copy of dataset access property */
- hid_t ddapl = -1; /* The dataset access property of the opened dataset */
+ hid_t fid = H5I_INVALID_HID; /* file ID */
+ hid_t fapl = H5I_INVALID_HID; /* A copy of file access property */
+ hid_t did1 = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* The dataset ID */
+ hid_t sid = H5I_INVALID_HID; /* The dataspace ID */
+ hid_t dcpl = H5I_INVALID_HID; /* A copy of dataset creation property */
+ hid_t dapl = H5I_INVALID_HID; /* A copy of dataset access property */
+ hid_t ddapl = H5I_INVALID_HID; /* The dataset access property of the opened dataset */
hsize_t boundary[3]; /* Boundary size */
unsigned count = 0; /* User data */
@@ -4258,12 +4258,12 @@ test_append_flush_dataset_chunked(hid_t in_fapl)
static int
test_append_flush_dataset_fixed(hid_t in_fapl)
{
- hid_t fid = -1; /* file ID */
- hid_t fapl = -1; /* A copy of file access property */
- hid_t did1 = -1, did2 = -1; /* The dataset ID */
- hid_t sid = -1; /* The dataspace ID */
- hid_t dapl = -1; /* A copy of dataset access property */
- hid_t ddapl = -1; /* The dataset access property of the opened dataset */
+ hid_t fid = H5I_INVALID_HID; /* file ID */
+ hid_t fapl = H5I_INVALID_HID; /* A copy of file access property */
+ hid_t did1 = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* The dataset ID */
+ hid_t sid = H5I_INVALID_HID; /* The dataspace ID */
+ hid_t dapl = H5I_INVALID_HID; /* A copy of dataset access property */
+ hid_t ddapl = H5I_INVALID_HID; /* The dataset access property of the opened dataset */
hsize_t boundary[3]; /* Boundary size */
unsigned count = 0; /* User data */
@@ -4476,14 +4476,14 @@ test_append_flush_dataset_fixed(hid_t in_fapl)
static int
test_append_flush_dataset_multiple(hid_t in_fapl)
{
- hid_t fid = -1; /* file ID */
- hid_t fapl = -1; /* A copy of file access property */
- hid_t did1 = -1, did2 = -1; /* The dataset ID */
- hid_t sid = -1; /* The dataspace ID */
- hid_t dcpl = -1; /* A copy of dataset creation property */
- hid_t dapl1 = -1; /* A copy of dataset access property */
- hid_t dapl2 = -1; /* A copy of dataset access property */
- hid_t ddapl = -1; /* The dataset access property of the opened dataset */
+ hid_t fid = H5I_INVALID_HID; /* file ID */
+ hid_t fapl = H5I_INVALID_HID; /* A copy of file access property */
+ hid_t did1 = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* The dataset ID */
+ hid_t sid = H5I_INVALID_HID; /* The dataspace ID */
+ hid_t dcpl = H5I_INVALID_HID; /* A copy of dataset creation property */
+ hid_t dapl1 = H5I_INVALID_HID; /* A copy of dataset access property */
+ hid_t dapl2 = H5I_INVALID_HID; /* A copy of dataset access property */
+ hid_t ddapl = H5I_INVALID_HID; /* The dataset access property of the opened dataset */
hsize_t boundary1[3]; /* Boundary size */
hsize_t boundary2[3]; /* Boundary size */
@@ -4705,10 +4705,10 @@ test_append_flush_dataset_multiple(hid_t in_fapl)
static int
test_file_lock_same(hid_t in_fapl)
{
- hid_t fid = -1, fid2 = -1; /* File IDs */
- hid_t fapl = -1; /* File access property list */
- unsigned intent; /* File access flags */
- char filename[NAME_BUF_SIZE]; /* file name */
+ hid_t fid = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File IDs */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
+ unsigned intent; /* File access flags */
+ char filename[NAME_BUF_SIZE]; /* file name */
/* Output message about test being performed */
TESTING("File open with different combinations of flags--single process access");
@@ -4716,7 +4716,7 @@ test_file_lock_same(hid_t in_fapl)
/* Set locking in the fapl */
if ((fapl = H5Pcopy(in_fapl)) < 0)
FAIL_STACK_ERROR;
- if (H5Pset_file_locking(fapl, TRUE, TRUE) < 0)
+ if (H5Pset_file_locking(fapl, true, true) < 0)
FAIL_STACK_ERROR;
/* Set the filename to use for this test (dependent on fapl) */
@@ -5188,7 +5188,7 @@ test_file_lock_concur(hid_t H5_ATTR_UNUSED in_fapl)
/* Output message about test being performed */
TESTING("File open with different combinations of flags--concurrent access");
SKIPPED();
- HDputs(" Test skipped due to fork or waitpid not defined.");
+ puts(" Test skipped due to fork or waitpid not defined.");
return 0;
} /* end test_file_lock_concur() */
@@ -5198,8 +5198,8 @@ test_file_lock_concur(hid_t H5_ATTR_UNUSED in_fapl)
static int
test_file_lock_concur(hid_t in_fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t fapl = -1; /* File access property list */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
char filename[NAME_BUF_SIZE]; /* file name */
pid_t childpid = 0; /* Child process ID */
int child_status; /* Status passed to waitpid */
@@ -5213,7 +5213,7 @@ test_file_lock_concur(hid_t in_fapl)
/* Set locking in the fapl */
if ((fapl = H5Pcopy(in_fapl)) < 0)
FAIL_STACK_ERROR;
- if (H5Pset_file_locking(fapl, TRUE, TRUE) < 0)
+ if (H5Pset_file_locking(fapl, true, true) < 0)
FAIL_STACK_ERROR;
/* Set the filename to use for this test (dependent on fapl) */
@@ -5581,7 +5581,7 @@ test_file_lock_swmr_concur(hid_t H5_ATTR_UNUSED in_fapl)
/* Output message about test being performed */
TESTING("File open with different combintations of flags + SWMR flags--concurrent access");
SKIPPED();
- HDputs(" Test skipped due to fork or waitpid not defined.");
+ puts(" Test skipped due to fork or waitpid not defined.");
return 0;
} /* end test_file_lock_swmr_concur() */
@@ -5606,7 +5606,7 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Set locking in the fapl */
if ((fapl = H5Pcopy(in_fapl)) < 0)
FAIL_STACK_ERROR;
- if (H5Pset_file_locking(fapl, TRUE, TRUE) < 0)
+ if (H5Pset_file_locking(fapl, true, true) < 0)
FAIL_STACK_ERROR;
/* Set the filename to use for this test (dependent on fapl) */
@@ -6596,7 +6596,7 @@ test_file_lock_swmr_concur(hid_t in_fapl)
**
*****************************************************************/
static int
-test_file_locking(hid_t in_fapl, hbool_t turn_locking_on, hbool_t env_var_override)
+test_file_locking(hid_t in_fapl, bool turn_locking_on, bool env_var_override)
{
#if !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID))
if (turn_locking_on && env_var_override)
@@ -6608,11 +6608,11 @@ test_file_locking(hid_t in_fapl, hbool_t turn_locking_on, hbool_t env_var_overri
else
TESTING("File locking: OFF");
SKIPPED();
- HDputs(" Test skipped due to fork or waitpid not defined.");
+ puts(" Test skipped due to fork or waitpid not defined.");
return 0;
#else /* !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID)) */
- hid_t fid = -1; /* File ID */
- hid_t fapl = -1; /* File access property list */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
char filename[NAME_BUF_SIZE]; /* file name */
pid_t childpid = 0; /* Child process ID */
int child_status; /* Status passed to waitpid */
@@ -6636,18 +6636,18 @@ test_file_locking(hid_t in_fapl, hbool_t turn_locking_on, hbool_t env_var_overri
TEST_ERROR;
/* Set locking in the fapl */
- if (H5Pset_file_locking(fapl, turn_locking_on ? TRUE : FALSE, TRUE) < 0)
+ if (H5Pset_file_locking(fapl, turn_locking_on ? true : false, true) < 0)
TEST_ERROR;
/* If requested, set the environment variable */
if (env_var_override) {
- if (HDsetenv(HDF5_USE_FILE_LOCKING, turn_locking_on ? "FALSE" : "TRUE", TRUE) < 0)
+ if (HDsetenv(HDF5_USE_FILE_LOCKING, turn_locking_on ? "FALSE" : "TRUE", true) < 0)
TEST_ERROR;
if (H5F__reparse_file_lock_variable_test() < 0)
TEST_ERROR;
}
else {
- if (HDsetenv(HDF5_USE_FILE_LOCKING, "", TRUE) < 0)
+ if (HDsetenv(HDF5_USE_FILE_LOCKING, "", true) < 0)
TEST_ERROR;
if (H5F__reparse_file_lock_variable_test() < 0)
TEST_ERROR;
@@ -6803,7 +6803,7 @@ test_different_lock_flags(hid_t in_fapl)
TEST_ERROR;
/* Set locking in the fapl */
- if (H5Pset_file_locking(fapl_id, TRUE, TRUE) < 0)
+ if (H5Pset_file_locking(fapl_id, true, true) < 0)
TEST_ERROR;
/* Set the filename to use for this test (dependent on fapl) */
@@ -6818,7 +6818,7 @@ test_different_lock_flags(hid_t in_fapl)
TEST_ERROR;
/* Unset locking in the fapl */
- if (H5Pset_file_locking(fapl_id, FALSE, FALSE) < 0)
+ if (H5Pset_file_locking(fapl_id, false, false) < 0)
TEST_ERROR;
/* Open the test file with different flags (should FAIL) */
@@ -6860,10 +6860,10 @@ test_different_lock_flags(hid_t in_fapl)
static int
test_swmr_vfd_flag(void)
{
- hid_t fid = -1; /* file ID */
- hid_t sec2_fapl = -1; /* fapl ID of a VFD that supports SWMR writes (sec2) */
- hid_t bad_fapl = -1; /* fapl ID of a VFD that does not support SWMR writes (stdio) */
- char filename[NAME_BUF_SIZE]; /* file name */
+ hid_t fid = H5I_INVALID_HID; /* file ID */
+ hid_t sec2_fapl = H5I_INVALID_HID; /* fapl ID of a VFD that supports SWMR writes (sec2) */
+ hid_t bad_fapl = H5I_INVALID_HID; /* fapl ID of a VFD that does not support SWMR writes (stdio) */
+ char filename[NAME_BUF_SIZE]; /* file name */
TESTING("SWMR-enabled VFD flag functionality");
@@ -7073,7 +7073,7 @@ test_bug_refresh(hid_t in_fapl)
#if !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID))
static int
-test_refresh_concur(hid_t H5_ATTR_UNUSED in_fapl, hbool_t new_format)
+test_refresh_concur(hid_t H5_ATTR_UNUSED in_fapl, bool new_format)
{
if (new_format) {
TESTING("H5Drefresh()--concurrent access for latest format");
@@ -7083,14 +7083,14 @@ test_refresh_concur(hid_t H5_ATTR_UNUSED in_fapl, hbool_t new_format)
}
SKIPPED();
- HDputs(" Test skipped due to fork or waitpid not defined.");
+ puts(" Test skipped due to fork or waitpid not defined.");
return 0;
} /* test_refresh_concur() */
#else /* !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID)) */
static int
-test_refresh_concur(hid_t in_fapl, hbool_t new_format)
+test_refresh_concur(hid_t in_fapl, bool new_format)
{
hid_t fid = H5I_INVALID_HID; /* File ID */
hid_t fapl; /* File access property list */
@@ -7101,9 +7101,9 @@ test_refresh_concur(hid_t in_fapl, hbool_t new_format)
int child_exit_val; /* Exit status of the child */
char filename[NAME_BUF_SIZE]; /* File name */
- hid_t did = -1;
- hid_t sid = -1;
- hid_t dcpl = -1;
+ hid_t did = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
hsize_t chunk_dims[1] = {1};
hsize_t maxdims[1] = {H5S_UNLIMITED};
hsize_t dims[1] = {1};
@@ -7175,11 +7175,11 @@ test_refresh_concur(hid_t in_fapl, hbool_t new_format)
if ((childpid = fork()) < 0)
FAIL_STACK_ERROR;
- if (childpid == 0) { /* Child process */
- hid_t child_fid1 = -1; /* File ID */
- hid_t child_fid2 = -1; /* File ID */
- hid_t child_did1 = -1, child_did2 = -1;
- hid_t child_sid = -1;
+ if (childpid == 0) { /* Child process */
+ hid_t child_fid1 = H5I_INVALID_HID; /* File ID */
+ hid_t child_fid2 = H5I_INVALID_HID; /* File ID */
+ hid_t child_did1 = H5I_INVALID_HID, child_did2 = H5I_INVALID_HID;
+ hid_t child_sid = H5I_INVALID_HID;
hsize_t tdims[1];
int rbuf[2] = {0, 0};
int child_notify = 0;
@@ -7403,14 +7403,15 @@ test_refresh_concur(hid_t in_fapl, hbool_t new_format)
* opens of files and datasets.
*/
static int
-test_multiple_same(hid_t in_fapl, hbool_t new_format)
+test_multiple_same(hid_t in_fapl, bool new_format)
{
- hid_t fid = -1, fid1 = -1, fid2 = -1, fid3 = -1; /* File IDs */
- hid_t fapl; /* File access property list */
- char filename[NAME_BUF_SIZE]; /* File name */
- hid_t did = -1, did1 = -1, did2 = -1, did3 = -1;
- hid_t sid = -1;
- hid_t dcpl = -1;
+ hid_t fid = H5I_INVALID_HID, fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID,
+ fid3 = H5I_INVALID_HID; /* File IDs */
+ hid_t fapl; /* File access property list */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ hid_t did = H5I_INVALID_HID, did1 = H5I_INVALID_HID, did2 = H5I_INVALID_HID, did3 = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
hsize_t chunk_dims[2] = {1, 2};
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
hsize_t dims[2] = {1, 1};
@@ -7728,12 +7729,12 @@ test_multiple_same(hid_t in_fapl, hbool_t new_format)
int
main(void)
{
- int nerrors = 0; /* The # of errors */
- hid_t fapl = H5I_INVALID_HID; /* File access property list ID */
- char *driver = NULL; /* VFD string (from env variable) */
- char *lock_env_var = NULL; /* file locking env var pointer */
- hbool_t use_file_locking; /* read from env var */
- hbool_t file_locking_enabled = FALSE; /* Checks if the file system supports locks */
+ int nerrors = 0; /* The # of errors */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list ID */
+ char *driver = NULL; /* VFD string (from env variable) */
+ char *lock_env_var = NULL; /* file locking env var pointer */
+ bool use_file_locking; /* read from env var */
+ bool file_locking_enabled = false; /* Checks if the file system supports locks */
/* Testing setup */
h5_reset();
@@ -7741,7 +7742,7 @@ main(void)
/* Skip this test if SWMR I/O is not supported for the VFD specified
* by the environment variable.
*/
- driver = HDgetenv(HDF5_DRIVER);
+ driver = getenv(HDF5_DRIVER);
if (!H5FD__supports_swmr_test(driver)) {
printf("This VFD does not support SWMR I/O\n");
return EXIT_SUCCESS;
@@ -7751,11 +7752,11 @@ main(void)
* about file locking. File locking should be used unless explicitly
* disabled.
*/
- lock_env_var = HDgetenv(HDF5_USE_FILE_LOCKING);
- if (lock_env_var && !HDstrcmp(lock_env_var, "FALSE"))
- use_file_locking = FALSE;
+ lock_env_var = getenv(HDF5_USE_FILE_LOCKING);
+ if (lock_env_var && !strcmp(lock_env_var, "FALSE"))
+ use_file_locking = false;
else
- use_file_locking = TRUE;
+ use_file_locking = true;
/* Check if file locking is enabled on this file system */
if (use_file_locking)
@@ -7770,10 +7771,10 @@ main(void)
#ifdef OUT
nerrors += test_bug_refresh(fapl);
#endif
- nerrors += test_refresh_concur(fapl, TRUE);
- nerrors += test_refresh_concur(fapl, FALSE);
- nerrors += test_multiple_same(fapl, TRUE);
- nerrors += test_multiple_same(fapl, FALSE);
+ nerrors += test_refresh_concur(fapl, true);
+ nerrors += test_refresh_concur(fapl, false);
+ nerrors += test_multiple_same(fapl, true);
+ nerrors += test_multiple_same(fapl, false);
/* Tests on H5Pget/set_metadata_read_attempts() and H5Fget_metadata_read_retry_info() */
nerrors += test_metadata_read_attempts(fapl);
@@ -7785,12 +7786,12 @@ main(void)
* H5Fcreate(write, latest format) or H5Fcreate(SWMR write, non-latest-format)
* --both result in v3 superblock and latest version support
*/
- nerrors += test_start_swmr_write(fapl, TRUE);
- nerrors += test_start_swmr_write(fapl, FALSE);
- nerrors += test_err_start_swmr_write(fapl, TRUE);
- nerrors += test_err_start_swmr_write(fapl, FALSE);
- nerrors += test_start_swmr_write_concur(fapl, TRUE);
- nerrors += test_start_swmr_write_concur(fapl, FALSE);
+ nerrors += test_start_swmr_write(fapl, true);
+ nerrors += test_start_swmr_write(fapl, false);
+ nerrors += test_err_start_swmr_write(fapl, true);
+ nerrors += test_err_start_swmr_write(fapl, false);
+ nerrors += test_start_swmr_write_concur(fapl, true);
+ nerrors += test_start_swmr_write_concur(fapl, false);
nerrors += test_start_swmr_write_stress_ohdr(fapl);
nerrors += test_start_swmr_write_persist_dapl(fapl);
@@ -7827,7 +7828,7 @@ main(void)
/* Tests SWMR VFD compatibility flag.
* Only needs to run when the VFD is the default (sec2).
*/
- if (NULL == driver || !HDstrcmp(driver, "") || !HDstrcmp(driver, "sec2"))
+ if (NULL == driver || !strcmp(driver, "") || !strcmp(driver, "sec2"))
nerrors += test_swmr_vfd_flag();
/* Test multiple opens via different locking flags */
@@ -7838,10 +7839,10 @@ main(void)
* so they should be run last.
*/
if (use_file_locking && file_locking_enabled) {
- nerrors += test_file_locking(fapl, TRUE, TRUE);
- nerrors += test_file_locking(fapl, TRUE, FALSE);
- nerrors += test_file_locking(fapl, FALSE, TRUE);
- nerrors += test_file_locking(fapl, FALSE, FALSE);
+ nerrors += test_file_locking(fapl, true, true);
+ nerrors += test_file_locking(fapl, true, false);
+ nerrors += test_file_locking(fapl, false, true);
+ nerrors += test_file_locking(fapl, false, false);
}
if (nerrors)
diff --git a/test/swmr_common.c b/test/swmr_common.c
index ef4c5501479..dd7dd8edd18 100644
--- a/test/swmr_common.c
+++ b/test/swmr_common.c
@@ -181,7 +181,7 @@ generate_name(char *name_buf, size_t name_buf_length, unsigned level, unsigned c
{
assert(name_buf);
- HDsnprintf(name_buf, name_buf_length, "%u-%04u", level, count);
+ snprintf(name_buf, name_buf_length, "%u-%04u", level, count);
return 0;
} /* end generate_name() */
@@ -209,7 +209,7 @@ generate_symbols(void)
char name_buf[64];
generate_name(name_buf, sizeof(name_buf), u, v);
- symbol_info[u][v].name = HDstrdup(name_buf);
+ symbol_info[u][v].name = strdup(name_buf);
symbol_info[u][v].dsid = -1;
symbol_info[u][v].nrecords = 0;
} /* end for */
diff --git a/test/swmr_generator.c b/test/swmr_generator.c
index 75e392dce59..0259a30c66c 100644
--- a/test/swmr_generator.c
+++ b/test/swmr_generator.c
@@ -44,7 +44,7 @@
/* Local Prototypes */
/********************/
-static int gen_skeleton(const char *filename, hbool_t verbose, hbool_t swmr_write, int comp_level,
+static int gen_skeleton(const char *filename, bool verbose, bool swmr_write, int comp_level,
const char *index_type, unsigned random_seed);
static void usage(void);
@@ -57,10 +57,10 @@ static void usage(void);
* Parameters: const char *filename
* The SWMR test file's name.
*
- * hbool_t verbose
+ * bool verbose
* Whether verbose console output is desired.
*
- * hbool_t swmr_write
+ * bool swmr_write
* Whether to create the file with SWMR writing enabled
*
* int comp_level
@@ -79,8 +79,8 @@ static void usage(void);
*-------------------------------------------------------------------------
*/
static int
-gen_skeleton(const char *filename, hbool_t verbose, hbool_t swmr_write, int comp_level,
- const char *index_type, unsigned random_seed)
+gen_skeleton(const char *filename, bool verbose, bool swmr_write, int comp_level, const char *index_type,
+ unsigned random_seed)
{
hid_t fid; /* File ID for new HDF5 file */
hid_t fcpl; /* File creation property list */
@@ -115,7 +115,7 @@ gen_skeleton(const char *filename, hbool_t verbose, hbool_t swmr_write, int comp
* With one unlimited dimension, we get the extensible array index
* type, with two unlimited dimensions, we get a v2 B-tree.
*/
- if (!HDstrcmp(index_type, "b2"))
+ if (!strcmp(index_type, "b2"))
max_dims[0] = H5S_UNLIMITED;
/* Create file creation property list */
@@ -182,10 +182,10 @@ gen_skeleton(const char *filename, hbool_t verbose, hbool_t swmr_write, int comp
/* Create the datasets */
for (u = 0; u < NLEVELS; u++)
for (v = 0; v < symbol_count[u]; v++) {
- hid_t dsid; /* Dataset ID */
- char name_buf[64];
- hbool_t move_dataspace_message =
- FALSE; /* Whether to move the dataspace message out of object header chunk #0 */
+ hid_t dsid; /* Dataset ID */
+ char name_buf[64];
+ bool move_dataspace_message =
+ false; /* Whether to move the dataspace message out of object header chunk #0 */
generate_name(name_buf, sizeof(name_buf), u, v);
if ((dsid = H5Dcreate2(fid, name_buf, tid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
@@ -193,7 +193,7 @@ gen_skeleton(const char *filename, hbool_t verbose, hbool_t swmr_write, int comp
/* Determine if the dataspace message for this dataset should be
* moved out of chunk #0 of the object header
- * (Set to TRUE for every fourth dataset)
+ * (Set to true for every fourth dataset)
*/
move_dataspace_message = !(HDrandom() % 4);
if (move_dataspace_message) {
@@ -260,10 +260,10 @@ int
main(int argc, char *argv[])
{
int comp_level = -1; /* Compression level (-1 is no compression) */
- hbool_t verbose = TRUE; /* Whether to emit some informational messages */
- hbool_t swmr_write = FALSE; /* Whether to create file with SWMR_WRITE access */
+ bool verbose = true; /* Whether to emit some informational messages */
+ bool swmr_write = false; /* Whether to create file with SWMR_WRITE access */
const char *index_type = "b1"; /* Chunk index type */
- hbool_t use_seed = FALSE; /* Set to TRUE if a seed was set on the command line */
+ bool use_seed = false; /* Set to true if a seed was set on the command line */
unsigned random_seed = 0; /* Random # seed */
unsigned u; /* Local index variables */
int temp;
@@ -285,14 +285,14 @@ main(int argc, char *argv[])
/* Chunk index type */
case 'i':
index_type = argv[u + 1];
- if (HDstrcmp(index_type, "ea") != 0 && HDstrcmp(index_type, "b2") != 0)
+ if (strcmp(index_type, "ea") != 0 && strcmp(index_type, "b2") != 0)
usage();
u += 2;
break;
/* Random # seed */
case 'r':
- use_seed = TRUE;
+ use_seed = true;
temp = atoi(argv[u + 1]);
if (temp < 0)
usage();
@@ -303,13 +303,13 @@ main(int argc, char *argv[])
/* Be quiet */
case 'q':
- verbose = FALSE;
+ verbose = false;
u++;
break;
/* Run with SWMR_WRITE */
case 's':
- swmr_write = TRUE;
+ swmr_write = true;
u++;
break;
diff --git a/test/swmr_reader.c b/test/swmr_reader.c
index 08c63076686..18f204dee31 100644
--- a/test/swmr_reader.c
+++ b/test/swmr_reader.c
@@ -34,16 +34,16 @@
/* Local Prototypes */
/********************/
-static int check_dataset(hid_t fid, hbool_t verbose, FILE *verbose_file, const char *sym_name,
- symbol_t *record, hid_t rec_sid);
-static int read_records(const char *filename, hbool_t verbose, FILE *verbose_file, unsigned random_seed,
+static int check_dataset(hid_t fid, bool verbose, FILE *verbose_file, const char *sym_name, symbol_t *record,
+ hid_t rec_sid);
+static int read_records(const char *filename, bool verbose, FILE *verbose_file, unsigned random_seed,
unsigned long nseconds, unsigned poll_time, unsigned ncommon, unsigned nrandom);
/*******************/
/* Local Variables */
/*******************/
-static hid_t symbol_tid = -1; /* The type ID for the SWMR datasets */
+static hid_t symbol_tid = H5I_INVALID_HID; /* The type ID for the SWMR datasets */
/*-------------------------------------------------------------------------
* Function: check_dataset
@@ -55,7 +55,7 @@ static hid_t symbol_tid = -1; /* The type ID for the SWMR datasets */
* Parameters: hid_t fid
* The SWMR test file's ID.
*
- * hbool_t verbose
+ * bool verbose
* Whether verbose console output is desired.
*
* FILE *verbose_file
@@ -78,7 +78,7 @@ static hid_t symbol_tid = -1; /* The type ID for the SWMR datasets */
*-------------------------------------------------------------------------
*/
static int
-check_dataset(hid_t fid, hbool_t verbose, FILE *verbose_file, const char *sym_name, symbol_t *record,
+check_dataset(hid_t fid, bool verbose, FILE *verbose_file, const char *sym_name, symbol_t *record,
hid_t rec_sid)
{
hid_t dsid; /* Dataset ID */
@@ -163,7 +163,7 @@ check_dataset(hid_t fid, hbool_t verbose, FILE *verbose_file, const char *sym_na
* Parameters: const char *filename
* The SWMR test file's name.
*
- * hbool_t verbose
+ * bool verbose
* Whether verbose console output is desired.
*
* FILE *verbose_file
@@ -190,7 +190,7 @@ check_dataset(hid_t fid, hbool_t verbose, FILE *verbose_file, const char *sym_na
*-------------------------------------------------------------------------
*/
static int
-read_records(const char *filename, hbool_t verbose, FILE *verbose_file, unsigned random_seed,
+read_records(const char *filename, bool verbose, FILE *verbose_file, unsigned random_seed,
unsigned long nseconds, unsigned poll_time, unsigned ncommon, unsigned nrandom)
{
time_t start_time; /* Starting time */
@@ -202,7 +202,7 @@ read_records(const char *filename, hbool_t verbose, FILE *verbose_file, unsigned
hid_t fapl; /* file access property list */
symbol_t record; /* The record to read from the dataset */
unsigned v; /* Local index variable */
- hbool_t use_log_vfd = FALSE; /* Use the log VFD (set this manually) */
+ bool use_log_vfd = false; /* Use the log VFD (set this manually) */
assert(filename);
assert(nseconds != 0);
@@ -278,7 +278,7 @@ read_records(const char *filename, hbool_t verbose, FILE *verbose_file, unsigned
if (use_log_vfd) {
char verbose_name[1024];
- HDsnprintf(verbose_name, sizeof(verbose_name), "swmr_reader.log.%u", random_seed);
+ snprintf(verbose_name, sizeof(verbose_name), "swmr_reader.log.%u", random_seed);
H5Pset_fapl_log(fapl, verbose_name, H5FD_LOG_ALL, (size_t)(512 * 1024 * 1024));
} /* end if */
@@ -392,9 +392,9 @@ main(int argc, char *argv[])
int poll_time = 1; /* # of seconds between polling */
int ncommon = 5; /* # of common symbols to poll */
int nrandom = 10; /* # of random symbols to poll */
- hbool_t verbose = TRUE; /* Whether to emit some informational messages */
+ bool verbose = true; /* Whether to emit some informational messages */
FILE *verbose_file = NULL; /* File handle for verbose output */
- hbool_t use_seed = FALSE; /* Set to 1 if a seed was set on the command line */
+ bool use_seed = false; /* Set to 1 if a seed was set on the command line */
unsigned random_seed = 0; /* Random # seed */
unsigned u; /* Local index variables */
int temp;
@@ -425,13 +425,13 @@ main(int argc, char *argv[])
/* Be quiet */
case 'q':
- verbose = FALSE;
+ verbose = false;
u++;
break;
/* Random # seed */
case 'r':
- use_seed = TRUE;
+ use_seed = true;
temp = atoi(argv[u + 1]);
if (temp < 0)
usage();
@@ -481,7 +481,7 @@ main(int argc, char *argv[])
if (verbose) {
char verbose_name[1024];
- HDsnprintf(verbose_name, sizeof(verbose_name), "swmr_reader.out.%u", random_seed);
+ snprintf(verbose_name, sizeof(verbose_name), "swmr_reader.out.%u", random_seed);
if (NULL == (verbose_file = fopen(verbose_name, "w"))) {
fprintf(stderr, "Can't open verbose output file!\n");
exit(EXIT_FAILURE);
diff --git a/test/swmr_remove_reader.c b/test/swmr_remove_reader.c
index 9a393565aa3..614aed2cfa6 100644
--- a/test/swmr_remove_reader.c
+++ b/test/swmr_remove_reader.c
@@ -35,7 +35,7 @@
/* Local Variables */
/*******************/
-static hid_t symbol_tid = -1;
+static hid_t symbol_tid = H5I_INVALID_HID;
/********************/
/* Local Prototypes */
diff --git a/test/swmr_sparse_reader.c b/test/swmr_sparse_reader.c
index 5a2f4648807..a6d8fd49d38 100644
--- a/test/swmr_sparse_reader.c
+++ b/test/swmr_sparse_reader.c
@@ -41,7 +41,7 @@
/* Local Variables */
/*******************/
-static hid_t symbol_tid = (-1);
+static hid_t symbol_tid = (H5I_INVALID_HID);
/********************/
/* Local Prototypes */
diff --git a/test/swmr_sparse_writer.c b/test/swmr_sparse_writer.c
index edef5c6002c..88d0b51daac 100644
--- a/test/swmr_sparse_writer.c
+++ b/test/swmr_sparse_writer.c
@@ -173,7 +173,7 @@ add_records(hid_t fid, unsigned verbose, unsigned long nrecords, unsigned long f
symbol_info_t *symbol; /* Symbol to write record to */
hid_t file_sid; /* Dataset's space ID */
hid_t aid; /* Attribute ID */
- hbool_t corked; /* Whether the dataset was corked */
+ bool corked; /* Whether the dataset was corked */
/* Get a random dataset, according to the symbol distribution */
symbol = choose_dataset();
@@ -188,7 +188,7 @@ add_records(hid_t fid, unsigned verbose, unsigned long nrecords, unsigned long f
* flushed before the data has been written */
if (H5Odisable_mdc_flushes(symbol->dsid) < 0)
return -1;
- corked = TRUE;
+ corked = true;
if (H5Dset_extent(symbol->dsid, dim) < 0)
return -1;
@@ -204,7 +204,7 @@ add_records(hid_t fid, unsigned verbose, unsigned long nrecords, unsigned long f
else {
if ((aid = H5Aopen(symbol->dsid, "seq", H5P_DEFAULT)) < 0)
return -1;
- corked = FALSE;
+ corked = false;
} /* end else */
/* Get the coordinate to write */
diff --git a/test/swmr_start_write.c b/test/swmr_start_write.c
index 2bea7d459d8..6254da8b8c9 100644
--- a/test/swmr_start_write.c
+++ b/test/swmr_start_write.c
@@ -35,10 +35,10 @@
/* Local Prototypes */
/********************/
-static hid_t create_file(const char *filename, hbool_t verbose, FILE *verbose_file, unsigned random_seed);
-static int create_datasets(hid_t fid, int comp_level, hbool_t verbose, FILE *verbose_file,
+static hid_t create_file(const char *filename, bool verbose, FILE *verbose_file, unsigned random_seed);
+static int create_datasets(hid_t fid, int comp_level, bool verbose, FILE *verbose_file,
const char *index_type);
-static int add_records(hid_t fid, hbool_t verbose, FILE *verbose_file, unsigned long nrecords,
+static int add_records(hid_t fid, bool verbose, FILE *verbose_file, unsigned long nrecords,
unsigned long flush_count);
static void usage(void);
@@ -63,7 +63,7 @@ static void usage(void);
*-------------------------------------------------------------------------
*/
static hid_t
-create_file(const char *filename, hbool_t verbose, FILE *verbose_file, unsigned random_seed)
+create_file(const char *filename, bool verbose, FILE *verbose_file, unsigned random_seed)
{
hid_t fid; /* File ID for new HDF5 file */
hid_t fcpl; /* File creation property list */
@@ -135,7 +135,7 @@ create_file(const char *filename, hbool_t verbose, FILE *verbose_file, unsigned
*-------------------------------------------------------------------------
*/
static int
-create_datasets(hid_t fid, int comp_level, hbool_t verbose, FILE *verbose_file, const char *index_type)
+create_datasets(hid_t fid, int comp_level, bool verbose, FILE *verbose_file, const char *index_type)
{
hid_t dcpl; /* Dataset creation property list */
hid_t tid; /* Datatype for dataset elements */
@@ -155,7 +155,7 @@ create_datasets(hid_t fid, int comp_level, hbool_t verbose, FILE *verbose_file,
* With one unlimited dimension, we get the extensible array index
* type, with two unlimited dimensions, we get a v-2 B-tree.
*/
- if (!HDstrcmp(index_type, "b2"))
+ if (!strcmp(index_type, "b2"))
max_dims[0] = H5S_UNLIMITED;
/* Create dataspace for creating datasets */
@@ -209,7 +209,7 @@ create_datasets(hid_t fid, int comp_level, hbool_t verbose, FILE *verbose_file,
*-------------------------------------------------------------------------
*/
static int
-add_records(hid_t fid, hbool_t verbose, FILE *verbose_file, unsigned long nrecords, unsigned long flush_count)
+add_records(hid_t fid, bool verbose, FILE *verbose_file, unsigned long nrecords, unsigned long flush_count)
{
hid_t tid; /* Datatype ID for records */
hid_t mem_sid; /* Memory dataspace ID */
@@ -356,9 +356,9 @@ main(int argc, char *argv[])
hid_t fid; /* File ID for file opened */
long nrecords = 0; /* # of records to append */
long flush_count = 10000; /* # of records to write between flushing file */
- hbool_t verbose = TRUE; /* Whether to emit some informational messages */
+ bool verbose = true; /* Whether to emit some informational messages */
FILE *verbose_file = NULL; /* File handle for verbose output */
- hbool_t use_seed = FALSE; /* Set to TRUE if a seed was set on the command line */
+ bool use_seed = false; /* Set to true if a seed was set on the command line */
unsigned random_seed = 0; /* Random # seed */
int comp_level = -1; /* Compression level (-1 is no compression) */
const char *index_type = "b1"; /* Chunk index type */
@@ -384,7 +384,7 @@ main(int argc, char *argv[])
/* Chunk index type */
case 'i':
index_type = argv[u + 1];
- if (HDstrcmp(index_type, "ea") != 0 && HDstrcmp(index_type, "b2") != 0)
+ if (strcmp(index_type, "ea") != 0 && strcmp(index_type, "b2") != 0)
usage();
u += 2;
break;
@@ -399,13 +399,13 @@ main(int argc, char *argv[])
/* Be quiet */
case 'q':
- verbose = FALSE;
+ verbose = false;
u++;
break;
/* Random # seed */
case 'r':
- use_seed = TRUE;
+ use_seed = true;
temp = atoi(argv[u + 1]);
if (temp < 0)
usage();
@@ -448,7 +448,7 @@ main(int argc, char *argv[])
if (verbose) {
char verbose_name[1024];
- HDsnprintf(verbose_name, sizeof(verbose_name), "swmr_writer.out.%u", random_seed);
+ snprintf(verbose_name, sizeof(verbose_name), "swmr_writer.out.%u", random_seed);
if (NULL == (verbose_file = fopen(verbose_name, "w"))) {
fprintf(stderr, "Can't open verbose output file!\n");
exit(EXIT_FAILURE);
diff --git a/test/swmr_writer.c b/test/swmr_writer.c
index 8397c437a52..7fe1a31284a 100644
--- a/test/swmr_writer.c
+++ b/test/swmr_writer.c
@@ -34,9 +34,9 @@
/* Local Prototypes */
/********************/
-static hid_t open_skeleton(const char *filename, hbool_t verbose, FILE *verbose_file, unsigned random_seed,
- hbool_t old);
-static int add_records(hid_t fid, hbool_t verbose, FILE *verbose_file, unsigned long nrecords,
+static hid_t open_skeleton(const char *filename, bool verbose, FILE *verbose_file, unsigned random_seed,
+ bool old);
+static int add_records(hid_t fid, bool verbose, FILE *verbose_file, unsigned long nrecords,
unsigned long flush_count);
static void usage(void);
@@ -48,7 +48,7 @@ static void usage(void);
* Parameters: const char *filename
* The filename of the SWMR HDF5 file to open
*
- * hbool_t verbose
+ * bool verbose
* Whether or not to emit verbose console messages
*
* FILE *verbose_file
@@ -57,7 +57,7 @@ static void usage(void);
* unsigned random_seed
* Random seed for the file (used for verbose logging)
*
- * hbool_t old
+ * bool old
* Whether to write in "old" file format
*
* Return: Success: The file ID of the opened SWMR file
@@ -68,12 +68,12 @@ static void usage(void);
*-------------------------------------------------------------------------
*/
static hid_t
-open_skeleton(const char *filename, hbool_t verbose, FILE *verbose_file, unsigned random_seed, hbool_t old)
+open_skeleton(const char *filename, bool verbose, FILE *verbose_file, unsigned random_seed, bool old)
{
hid_t fid; /* File ID for new HDF5 file */
hid_t fapl; /* File access property list */
unsigned u, v; /* Local index variable */
- hbool_t use_log_vfd = FALSE; /* Use the log VFD (set this manually) */
+ bool use_log_vfd = false; /* Use the log VFD (set this manually) */
assert(filename);
@@ -90,7 +90,7 @@ open_skeleton(const char *filename, hbool_t verbose, FILE *verbose_file, unsigne
if (use_log_vfd) {
char verbose_name[1024];
- HDsnprintf(verbose_name, sizeof(verbose_name), "swmr_writer.log.%u", random_seed);
+ snprintf(verbose_name, sizeof(verbose_name), "swmr_writer.log.%u", random_seed);
H5Pset_fapl_log(fapl, verbose_name, H5FD_LOG_ALL, (size_t)(512 * 1024 * 1024));
} /* end if */
@@ -127,7 +127,7 @@ open_skeleton(const char *filename, hbool_t verbose, FILE *verbose_file, unsigne
* Parameters: hid_t fid
* The file ID of the SWMR HDF5 file
*
- * hbool_t verbose
+ * bool verbose
* Whether or not to emit verbose console messages
*
* FILE *verbose_file
@@ -145,7 +145,7 @@ open_skeleton(const char *filename, hbool_t verbose, FILE *verbose_file, unsigne
*-------------------------------------------------------------------------
*/
static int
-add_records(hid_t fid, hbool_t verbose, FILE *verbose_file, unsigned long nrecords, unsigned long flush_count)
+add_records(hid_t fid, bool verbose, FILE *verbose_file, unsigned long nrecords, unsigned long flush_count)
{
hid_t tid; /* Datatype ID for records */
hid_t mem_sid; /* Memory dataspace ID */
@@ -279,10 +279,10 @@ main(int argc, char *argv[])
hid_t fid; /* File ID for file opened */
long nrecords = 0; /* # of records to append */
long flush_count = 10000; /* # of records to write between flushing file */
- hbool_t verbose = TRUE; /* Whether to emit some informational messages */
+ bool verbose = true; /* Whether to emit some informational messages */
FILE *verbose_file = NULL; /* File handle for verbose output */
- hbool_t old = FALSE; /* Whether to use non-latest-format when opening file */
- hbool_t use_seed = FALSE; /* Set to TRUE if a seed was set on the command line */
+ bool old = false; /* Whether to use non-latest-format when opening file */
+ bool use_seed = false; /* Set to true if a seed was set on the command line */
unsigned random_seed = 0; /* Random # seed */
unsigned u; /* Local index variable */
int temp;
@@ -305,13 +305,13 @@ main(int argc, char *argv[])
/* Be quiet */
case 'q':
- verbose = FALSE;
+ verbose = false;
u++;
break;
/* Random # seed */
case 'r':
- use_seed = TRUE;
+ use_seed = true;
temp = atoi(argv[u + 1]);
random_seed = (unsigned)temp;
u += 2;
@@ -319,7 +319,7 @@ main(int argc, char *argv[])
/* Use non-latest-format when opening file */
case 'o':
- old = TRUE;
+ old = true;
u++;
break;
@@ -356,7 +356,7 @@ main(int argc, char *argv[])
if (verbose) {
char verbose_name[1024];
- HDsnprintf(verbose_name, sizeof(verbose_name), "swmr_writer.out.%u", random_seed);
+ snprintf(verbose_name, sizeof(verbose_name), "swmr_writer.out.%u", random_seed);
if (NULL == (verbose_file = fopen(verbose_name, "w"))) {
fprintf(stderr, "Can't open verbose output file!\n");
exit(EXIT_FAILURE);
diff --git a/test/tarray.c b/test/tarray.c
index b5ce9213d9d..494b65c559d 100644
--- a/test/tarray.c
+++ b/test/tarray.c
@@ -686,7 +686,7 @@ test_array_compound_atomic(void)
/* Check the 1st field's name */
mname = H5Tget_member_name(tid2, 0);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "i") != 0)
+ if (strcmp(mname, "i") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -705,7 +705,7 @@ test_array_compound_atomic(void)
/* Check the 2nd field's name */
mname = H5Tget_member_name(tid2, 1);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "f") != 0)
+ if (strcmp(mname, "f") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -908,7 +908,7 @@ test_array_compound_array(void)
/* Check the 1st field's name */
mname = H5Tget_member_name(tid2, 0);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "i") != 0)
+ if (strcmp(mname, "i") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -927,7 +927,7 @@ test_array_compound_array(void)
/* Check the 2nd field's name */
mname = H5Tget_member_name(tid2, 1);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "f") != 0)
+ if (strcmp(mname, "f") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -1664,9 +1664,9 @@ test_array_bkg(void)
for (i = 0; i < dtsinfo->nsubfields; i++)
dtsinfo->name[i] = (char *)calloc((size_t)20, sizeof(char));
- HDstrcpy(dtsinfo->name[0], "One");
- HDstrcpy(dtsinfo->name[1], "Two");
- HDstrcpy(dtsinfo->name[2], "Three");
+ strcpy(dtsinfo->name[0], "One");
+ strcpy(dtsinfo->name[1], "Two");
+ strcpy(dtsinfo->name[2], "Three");
/* Create file */
/* ----------- */
@@ -1918,7 +1918,7 @@ test_compat(void)
size_t off; /* Offset of compound field */
hid_t mtid; /* Datatype ID for field */
int i; /* Index variables */
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -1966,7 +1966,7 @@ test_compat(void)
/* Check the 1st field's name */
mname = H5Tget_member_name(tid1, 0);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "i") != 0)
+ if (strcmp(mname, "i") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -1985,7 +1985,7 @@ test_compat(void)
/* Check the 2nd field's name */
mname = H5Tget_member_name(tid1, 1);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "f") != 0)
+ if (strcmp(mname, "f") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -2004,7 +2004,7 @@ test_compat(void)
/* Check the 3rd field's name */
mname = H5Tget_member_name(tid1, 2);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "l") != 0)
+ if (strcmp(mname, "l") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -2047,7 +2047,7 @@ test_compat(void)
/* Check the 1st field's name */
mname = H5Tget_member_name(tid1, 0);
CHECK_PTR(mname, "H5Tget_member_name");
- if (mname && HDstrcmp(mname, "i") != 0)
+ if (mname && strcmp(mname, "i") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
if (mname)
H5free_memory(mname);
@@ -2067,7 +2067,7 @@ test_compat(void)
/* Check the 2nd field's name */
mname = H5Tget_member_name(tid1, 1);
CHECK_PTR(mname, "H5Tget_member_name");
- if (mname && HDstrcmp(mname, "f") != 0)
+ if (mname && strcmp(mname, "f") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
if (mname)
H5free_memory(mname);
@@ -2115,7 +2115,7 @@ test_compat(void)
/* Check the 3rd field's name */
mname = H5Tget_member_name(tid1, 2);
CHECK_PTR(mname, "H5Tget_member_name");
- if (mname && HDstrcmp(mname, "l") != 0)
+ if (mname && strcmp(mname, "l") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
if (mname)
H5free_memory(mname);
@@ -2163,7 +2163,7 @@ test_compat(void)
/* Check the 4th field's name */
mname = H5Tget_member_name(tid1, 3);
CHECK_PTR(mname, "H5Tget_member_name");
- if (mname && HDstrcmp(mname, "d") != 0)
+ if (mname && strcmp(mname, "d") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
if (mname)
H5free_memory(mname);
diff --git a/test/tattr.c b/test/tattr.c
index 91cba514b52..2e391c545d7 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -164,7 +164,7 @@ typedef struct {
int stop; /* # of iterations to stop after */
hsize_t curr; /* Current creation order value */
size_t max_visit; /* Size of "visited attribute" flag array */
- hbool_t *visited; /* Pointer to array of "visited attribute" flags */
+ bool *visited; /* Pointer to array of "visited attribute" flags */
} attr_iter_info_t;
static herr_t attr_op1(hid_t loc_id, const char *name, const H5A_info_t *ainfo, void *op_data);
@@ -308,8 +308,8 @@ test_attr_basic_write(hid_t fapl)
if (attr_name) {
ret = (herr_t)H5Aget_name(attr, (size_t)(attr_name_size + 1), attr_name);
CHECK(ret, FAIL, "H5Aget_name");
- ret = HDstrcmp(attr_name, ATTR_TMP_NAME);
- VERIFY(ret, 0, "HDstrcmp");
+ ret = strcmp(attr_name, ATTR_TMP_NAME);
+ VERIFY(ret, 0, "strcmp");
free(attr_name);
attr_name = NULL;
@@ -345,8 +345,8 @@ test_attr_basic_write(hid_t fapl)
if (attr_name) {
ret = (herr_t)H5Aget_name(attr2, (size_t)(attr_name_size + 1), attr_name);
CHECK(ret, FAIL, "H5Aget_name");
- ret = HDstrcmp(attr_name, ATTR1A_NAME);
- VERIFY(ret, 0, "HDstrcmp");
+ ret = strcmp(attr_name, ATTR1A_NAME);
+ VERIFY(ret, 0, "strcmp");
free(attr_name);
attr_name = NULL;
@@ -870,8 +870,8 @@ test_attr_compound_read(hid_t fapl)
VERIFY(fields, 3, "H5Tget_nmembers");
for (i = 0; i < fields; i++) {
fieldname = H5Tget_member_name(type, (unsigned)i);
- if (!(HDstrcmp(fieldname, ATTR4_FIELDNAME1) != 0 || HDstrcmp(fieldname, ATTR4_FIELDNAME2) != 0 ||
- HDstrcmp(fieldname, ATTR4_FIELDNAME3) != 0))
+ if (!(strcmp(fieldname, ATTR4_FIELDNAME1) != 0 || strcmp(fieldname, ATTR4_FIELDNAME2) != 0 ||
+ strcmp(fieldname, ATTR4_FIELDNAME3) != 0))
TestErrPrintf("invalid field name for field #%d: %s\n", i, fieldname);
H5free_memory(fieldname);
} /* end for */
@@ -930,8 +930,8 @@ test_attr_compound_read(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR4_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR4_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR4_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR4_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR4_NAME);
/* Close attribute datatype */
@@ -1305,16 +1305,16 @@ test_attr_mult_read(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR1_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR1_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR1_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR1_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR1_NAME);
/* Verify Name with too small of a buffer */
- name_len = H5Aget_name(attr, HDstrlen(ATTR1_NAME), attr_name);
- VERIFY(name_len, HDstrlen(ATTR1_NAME), "H5Aget_name");
- HDstrcpy(temp_name, ATTR1_NAME); /* make a copy of the name */
- temp_name[HDstrlen(ATTR1_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
- if (HDstrcmp(attr_name, temp_name) != 0)
+ name_len = H5Aget_name(attr, strlen(ATTR1_NAME), attr_name);
+ VERIFY(name_len, strlen(ATTR1_NAME), "H5Aget_name");
+ strcpy(temp_name, ATTR1_NAME); /* make a copy of the name */
+ temp_name[strlen(ATTR1_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
+ if (strcmp(attr_name, temp_name) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, temp_name);
/* Close attribute */
@@ -1363,16 +1363,16 @@ test_attr_mult_read(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR2_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR2_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR2_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR2_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR2_NAME);
/* Verify Name with too small of a buffer */
- name_len = H5Aget_name(attr, HDstrlen(ATTR2_NAME), attr_name);
- VERIFY(name_len, HDstrlen(ATTR2_NAME), "H5Aget_name");
- HDstrcpy(temp_name, ATTR2_NAME); /* make a copy of the name */
- temp_name[HDstrlen(ATTR2_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
- if (HDstrcmp(attr_name, temp_name) != 0)
+ name_len = H5Aget_name(attr, strlen(ATTR2_NAME), attr_name);
+ VERIFY(name_len, strlen(ATTR2_NAME), "H5Aget_name");
+ strcpy(temp_name, ATTR2_NAME); /* make a copy of the name */
+ temp_name[strlen(ATTR2_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
+ if (strcmp(attr_name, temp_name) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, temp_name);
/* Close attribute */
@@ -1425,16 +1425,16 @@ test_attr_mult_read(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR3_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR3_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR3_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR3_NAME);
/* Verify Name with too small of a buffer */
- name_len = H5Aget_name(attr, HDstrlen(ATTR3_NAME), attr_name);
- VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name");
- HDstrcpy(temp_name, ATTR3_NAME); /* make a copy of the name */
- temp_name[HDstrlen(ATTR3_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
- if (HDstrcmp(attr_name, temp_name) != 0)
+ name_len = H5Aget_name(attr, strlen(ATTR3_NAME), attr_name);
+ VERIFY(name_len, strlen(ATTR3_NAME), "H5Aget_name");
+ strcpy(temp_name, ATTR3_NAME); /* make a copy of the name */
+ temp_name[strlen(ATTR3_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
+ if (strcmp(attr_name, temp_name) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, temp_name);
/* Close attribute */
@@ -1463,19 +1463,19 @@ attr_op1(hid_t H5_ATTR_UNUSED loc_id, const char *name, const H5A_info_t H5_ATTR
switch (*count) {
case 0:
- if (HDstrcmp(name, ATTR1_NAME) != 0)
+ if (strcmp(name, ATTR1_NAME) != 0)
TestErrPrintf("attribute name different: name=%s, should be %s\n", name, ATTR1_NAME);
(*count)++;
break;
case 1:
- if (HDstrcmp(name, ATTR2_NAME) != 0)
+ if (strcmp(name, ATTR2_NAME) != 0)
TestErrPrintf("attribute name different: name=%s, should be %s\n", name, ATTR2_NAME);
(*count)++;
break;
case 2:
- if (HDstrcmp(name, ATTR3_NAME) != 0)
+ if (strcmp(name, ATTR3_NAME) != 0)
TestErrPrintf("attribute name different: name=%s, should be %s\n", name, ATTR3_NAME);
(*count)++;
break;
@@ -1620,8 +1620,8 @@ test_attr_delete(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR1_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR1_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR1_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR1_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR1_NAME);
/* Close attribute */
@@ -1635,8 +1635,8 @@ test_attr_delete(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR3_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR3_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR3_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR3_NAME);
/* Close attribute */
@@ -1659,8 +1659,8 @@ test_attr_delete(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR3_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR3_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR3_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR3_NAME);
/* Close attribute */
@@ -2126,7 +2126,7 @@ test_attr_dense_verify(hid_t loc_id, unsigned max_attr)
/* Re-open all the attributes by name and verify the data */
for (u = 0; u < max_attr; u++) {
/* Open attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Aopen(loc_id, attrname, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Aopen");
@@ -2151,10 +2151,10 @@ test_attr_dense_verify(hid_t loc_id, unsigned max_attr)
CHECK(attr, FAIL, "H5Aopen_by_idx");
/* Verify Name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, check_name);
- VERIFY(name_len, HDstrlen(attrname), "H5Aget_name");
- if (HDstrcmp(check_name, attrname) != 0)
+ VERIFY(name_len, strlen(attrname), "H5Aget_name");
+ if (strcmp(check_name, attrname) != 0)
TestErrPrintf("attribute name different: attrname = '%s', should be '%s'\n", check_name,
attrname);
@@ -2246,12 +2246,12 @@ test_attr_dense_create(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Add attributes, until just before converting to dense storage */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -2266,17 +2266,17 @@ test_attr_dense_create(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Add one more attribute, to push into "dense" storage */
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Write data into the attribute */
ret = H5Awrite(attr, H5T_NATIVE_UINT, &u);
@@ -2392,12 +2392,12 @@ test_attr_dense_open(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Add attributes, until just before converting to dense storage */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -2416,17 +2416,17 @@ test_attr_dense_open(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Add one more attribute, to push into "dense" storage */
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Write data into the attribute */
ret = H5Awrite(attr, H5T_NATIVE_UINT, &u);
@@ -2501,7 +2501,7 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
*/
fcpl = H5Pcopy(fcpl);
CHECK(fcpl, FAIL, "H5Pcopy");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, 1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, true, 1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
}
fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl, fapl);
@@ -2554,12 +2554,12 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Add attributes, until well into dense storage */
for (u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -2579,7 +2579,7 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Close dataspace */
ret = H5Sclose(sid);
@@ -2604,7 +2604,7 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
/* Delete attributes until the attributes revert to compact storage again */
for (u--; u >= min_dense; u--) {
/* Delete attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
@@ -2615,29 +2615,29 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Delete one more attribute, which should cause reversion to compact storage */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Verify attributes still left */
ret = test_attr_dense_verify(dataset, (u - 1));
CHECK(ret, FAIL, "test_attr_dense_verify");
/* Delete another attribute, to verify deletion in compact storage */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (u - 1));
+ snprintf(attrname, sizeof(attrname), "attr %02u", (u - 1));
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Verify attributes still left */
ret = test_attr_dense_verify(dataset, (u - 2));
@@ -2702,7 +2702,7 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
*/
fcpl = H5Pcopy(fcpl);
CHECK(fcpl, FAIL, "H5Pcopy");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, 1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, true, 1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
}
fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl, fapl);
@@ -2742,7 +2742,7 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Pget_attr_phase_change");
/* Using creation order or not */
- for (use_corder = FALSE; use_corder <= TRUE; use_corder++) {
+ for (use_corder = false; use_corder <= true; use_corder++) {
if (use_corder) {
ret = H5Pset_attr_creation_order(dcpl, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED);
@@ -2755,12 +2755,12 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Add attributes, until well into dense storage */
for (u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, H5I_INVALID_HID, "H5Acreate2");
@@ -2773,7 +2773,7 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
/* Rename attribute */
- HDsnprintf(new_attrname, sizeof(new_attrname), "new attr %02u", u);
+ snprintf(new_attrname, sizeof(new_attrname), "new attr %02u", u);
/* Rename attribute */
ret = H5Arename_by_name(fid, DSET1_NAME, attrname, new_attrname, H5P_DEFAULT);
@@ -2787,7 +2787,7 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Close Dataset */
ret = H5Dclose(dataset);
@@ -2826,7 +2826,7 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
unsigned value; /* Attribute value */
/* Open attribute */
- HDsnprintf(attrname, sizeof(attrname), "new attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "new attr %02u", u);
attr = H5Aopen(dataset, attrname, H5P_DEFAULT);
CHECK(attr, H5I_INVALID_HID, "H5Aopen");
@@ -2898,7 +2898,7 @@ test_attr_dense_unlink(hid_t fcpl, hid_t fapl)
*/
fcpl = H5Pcopy(fcpl);
CHECK(fcpl, FAIL, "H5Pcopy");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, 1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, true, 1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
}
fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl, fapl);
@@ -2945,12 +2945,12 @@ test_attr_dense_unlink(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Add attributes, until well into dense storage */
for (u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -2970,7 +2970,7 @@ test_attr_dense_unlink(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Close dataspace */
ret = H5Sclose(sid);
@@ -3087,13 +3087,13 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Add first attribute, which should be immediately in dense storage */
/* Create attribute */
u = 0;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3107,13 +3107,13 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Add second attribute, to allow deletions to be checked easily */
/* Create attribute */
u = 1;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3127,7 +3127,7 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Delete second attribute, attributes should still be stored densely */
@@ -3137,19 +3137,19 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Delete first attribute, attributes should not be stored densely */
/* Delete attribute */
u = 0;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Close dataspace */
ret = H5Sclose(sid);
@@ -3247,12 +3247,12 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Add attributes, until just before converting to dense storage */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3267,7 +3267,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Add one more attribute, to push into "dense" storage */
/* Create dataspace for attribute */
@@ -3275,13 +3275,13 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
CHECK(sid2, FAIL, "H5Screate_simple");
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Open the attribute just created and get a second ID */
attr2 = H5Aopen(dataset, attrname, H5P_DEFAULT);
@@ -3316,7 +3316,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Open first attribute for the dataset */
attr = H5Aopen(dataset, attrname, H5P_DEFAULT);
@@ -3368,7 +3368,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Open first attribute for the dataset */
attr = H5Aopen(dataset, attrname, H5P_DEFAULT);
@@ -3431,7 +3431,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Open first attribute for the dataset */
attr = H5Aopen_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)4, H5P_DEFAULT, H5P_DEFAULT);
@@ -3485,7 +3485,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Open attribute of the dataset for the first time */
attr = H5Aopen_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)2, H5P_DEFAULT, H5P_DEFAULT);
@@ -3499,7 +3499,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Open attribute for the second time */
attr2 = H5Aopen_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)2, H5P_DEFAULT, H5P_DEFAULT);
@@ -3549,7 +3549,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Open attribute of the dataset for the first time */
attr = H5Aopen_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)3, H5P_DEFAULT, H5P_DEFAULT);
@@ -3558,7 +3558,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
/* Delete a few attributes until the storage switches to compact */
for (u = min_dense - 1; u <= max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
add_attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(add_attr, FAIL, "H5Acreate2");
@@ -3573,7 +3573,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Open attribute for the second time */
attr2 = H5Aopen_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)3, H5P_DEFAULT, H5P_DEFAULT);
@@ -3626,7 +3626,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
/* Add attributes, until just before converting to dense storage */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(gid1, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3645,7 +3645,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
/* Check on group's attribute storage status */
is_dense = H5O__is_attr_dense_test(gid1);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Open the hard link just created */
gid2 = H5Gopen2(fid, GROUP2_NAME, H5P_DEFAULT);
@@ -3784,15 +3784,15 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Add first "small" attribute, which should be in compact storage */
/* Create attribute */
u = 0;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3802,15 +3802,15 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Add second "small" attribute, which should stay in compact storage */
/* Create attribute */
u = 1;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3820,15 +3820,15 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Add first "big" attribute, which should push storage into dense form */
/* Create attribute */
u = 2;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, big_sid, H5P_DEFAULT, H5P_DEFAULT);
if (low == H5F_LIBVER_LATEST) {
CHECK(attr, FAIL, "H5Acreate2");
@@ -3843,15 +3843,15 @@ test_attr_big(hid_t fcpl, hid_t fapl)
* form - QAK)
*/
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, (nshared_indices ? FALSE : TRUE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (nshared_indices ? false : true), "H5O__is_attr_dense_test");
/* Add second "big" attribute, which should leave storage in dense form */
/* Create attribute */
u = 3;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, big_sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3865,63 +3865,63 @@ test_attr_big(hid_t fcpl, hid_t fapl)
* form - QAK)
*/
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, (nshared_indices ? FALSE : TRUE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (nshared_indices ? false : true), "H5O__is_attr_dense_test");
/* Delete second "small" attribute, attributes should still be stored densely */
/* Delete attribute */
u = 1;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, (nshared_indices ? FALSE : TRUE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (nshared_indices ? false : true), "H5O__is_attr_dense_test");
/* Delete second "big" attribute, attributes should still be stored densely */
/* Delete attribute */
u = 3;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, (nshared_indices ? FALSE : TRUE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (nshared_indices ? false : true), "H5O__is_attr_dense_test");
/* Delete first "big" attribute, attributes should _not_ be stored densely */
/* Delete attribute */
u = 2;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Delete first "small" attribute, should be no attributes now */
/* Delete attribute */
u = 0;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
} /* end if */
else {
/* Shouldn't be able to create "big" attributes with older version of format */
@@ -3933,9 +3933,9 @@ test_attr_big(hid_t fcpl, hid_t fapl)
* form - QAK)
*/
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
} /* end else */
/* Close dataspaces */
@@ -4022,7 +4022,7 @@ test_attr_null_space(hid_t fcpl, hid_t fapl)
/* Add attribute with 'null' dataspace */
/* Create attribute */
- HDstrcpy(attrname, "null attr");
+ strcpy(attrname, "null attr");
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, null_sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -4040,7 +4040,7 @@ test_attr_null_space(hid_t fcpl, hid_t fapl)
/* Compare the dataspaces */
cmp = H5Sextent_equal(attr_sid, null_sid);
CHECK(cmp, FAIL, "H5Sextent_equal");
- VERIFY(cmp, TRUE, "H5Sextent_equal");
+ VERIFY(cmp, true, "H5Sextent_equal");
/* Close dataspace */
ret = H5Sclose(attr_sid);
@@ -4062,7 +4062,7 @@ test_attr_null_space(hid_t fcpl, hid_t fapl)
/* Add another attribute with 'null' dataspace */
/* Create attribute */
- HDstrcpy(attrname, "null attr #2");
+ strcpy(attrname, "null attr #2");
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, null_sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -4096,7 +4096,7 @@ test_attr_null_space(hid_t fcpl, hid_t fapl)
CHECK(dataset, FAIL, "H5Dopen2");
/* Open first attribute */
- HDstrcpy(attrname, "null attr #2");
+ strcpy(attrname, "null attr #2");
attr = H5Aopen(dataset, attrname, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Aopen");
@@ -4114,7 +4114,7 @@ test_attr_null_space(hid_t fcpl, hid_t fapl)
/* Compare the dataspaces */
cmp = H5Sextent_equal(attr_sid, null_sid);
CHECK(cmp, FAIL, "H5Sextent_equal");
- VERIFY(cmp, TRUE, "H5Sextent_equal");
+ VERIFY(cmp, true, "H5Sextent_equal");
/* Close dataspace */
ret = H5Sclose(attr_sid);
@@ -4134,7 +4134,7 @@ test_attr_null_space(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
/* Open second attribute */
- HDstrcpy(attrname, "null attr");
+ strcpy(attrname, "null attr");
attr = H5Aopen(dataset, attrname, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Aopen");
@@ -4239,7 +4239,7 @@ test_attr_deprec(hid_t fcpl, hid_t fapl)
/* Get number of attributes with bad ID */
H5E_BEGIN_TRY
{
- ret = H5Aget_num_attrs((hid_t)-1);
+ ret = H5Aget_num_attrs((hid_t)H5I_INVALID_HID);
}
H5E_END_TRY
VERIFY(ret, FAIL, "H5Aget_num_attrs");
@@ -4289,7 +4289,7 @@ test_attr_deprec(hid_t fcpl, hid_t fapl)
**
****************************************************************/
static void
-test_attr_many(hbool_t new_format, hid_t fcpl, hid_t fapl)
+test_attr_many(bool new_format, hid_t fcpl, hid_t fapl)
{
hid_t fid; /* HDF5 File ID */
hid_t gid; /* Group ID */
@@ -4318,22 +4318,22 @@ test_attr_many(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create many attributes */
for (u = 0; u < nattr; u++) {
- HDsnprintf(attrname, sizeof(attrname), "a-%06u", u);
+ snprintf(attrname, sizeof(attrname), "a-%06u", u);
exists = H5Aexists(gid, attrname);
- VERIFY(exists, FALSE, "H5Aexists");
+ VERIFY(exists, false, "H5Aexists");
exists = H5Aexists_by_name(fid, GROUP1_NAME, attrname, H5P_DEFAULT);
- VERIFY(exists, FALSE, "H5Aexists_by_name");
+ VERIFY(exists, false, "H5Aexists_by_name");
aid = H5Acreate2(gid, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
exists = H5Aexists(gid, attrname);
- VERIFY(exists, TRUE, "H5Aexists");
+ VERIFY(exists, true, "H5Aexists");
exists = H5Aexists_by_name(fid, GROUP1_NAME, attrname, H5P_DEFAULT);
- VERIFY(exists, TRUE, "H5Aexists_by_name");
+ VERIFY(exists, true, "H5Aexists_by_name");
ret = H5Awrite(aid, H5T_NATIVE_UINT, &u);
CHECK(ret, FAIL, "H5Awrite");
@@ -4342,10 +4342,10 @@ test_attr_many(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
exists = H5Aexists(gid, attrname);
- VERIFY(exists, TRUE, "H5Aexists");
+ VERIFY(exists, true, "H5Aexists");
exists = H5Aexists_by_name(fid, GROUP1_NAME, attrname, H5P_DEFAULT);
- VERIFY(exists, TRUE, "H5Aexists_by_name");
+ VERIFY(exists, true, "H5Aexists_by_name");
} /* end for */
/* Close group */
@@ -4370,22 +4370,22 @@ test_attr_many(hbool_t new_format, hid_t fcpl, hid_t fapl)
for (u = 0; u < nattr; u++) {
unsigned value; /* Attribute value */
- HDsnprintf(attrname, sizeof(attrname), "a-%06u", u);
+ snprintf(attrname, sizeof(attrname), "a-%06u", u);
exists = H5Aexists(gid, attrname);
- VERIFY(exists, TRUE, "H5Aexists");
+ VERIFY(exists, true, "H5Aexists");
exists = H5Aexists_by_name(fid, GROUP1_NAME, attrname, H5P_DEFAULT);
- VERIFY(exists, TRUE, "H5Aexists_by_name");
+ VERIFY(exists, true, "H5Aexists_by_name");
aid = H5Aopen(gid, attrname, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Aopen");
exists = H5Aexists(gid, attrname);
- VERIFY(exists, TRUE, "H5Aexists");
+ VERIFY(exists, true, "H5Aexists");
exists = H5Aexists_by_name(fid, GROUP1_NAME, attrname, H5P_DEFAULT);
- VERIFY(exists, TRUE, "H5Aexists_by_name");
+ VERIFY(exists, true, "H5Aexists_by_name");
ret = H5Aread(aid, H5T_NATIVE_UINT, &value);
CHECK(ret, FAIL, "H5Aread");
@@ -4480,9 +4480,9 @@ test_attr_corder_create_basic(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Close Dataset */
ret = H5Dclose(dataset);
@@ -4506,9 +4506,9 @@ test_attr_corder_create_basic(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Retrieve dataset creation property list for group */
dcpl = H5Dget_create_plist(dataset);
@@ -4615,14 +4615,14 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Create several attributes, but keep storage in compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -4639,9 +4639,9 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (u + 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
} /* end for */
} /* end for */
@@ -4701,9 +4701,9 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, max_compact, "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Loop through attributes, checking their creation order values */
/* (the name index is used, but the creation order value is in the same order) */
@@ -4711,12 +4711,12 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl)
H5A_info_t ainfo; /* Attribute information */
/* Retrieve information for attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Aget_info_by_name(my_dataset, ".", attrname, &ainfo, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_info_by_name");
/* Verify creation order of attribute */
- VERIFY(ainfo.corder_valid, TRUE, "H5Aget_info_by_name");
+ VERIFY(ainfo.corder_valid, true, "H5Aget_info_by_name");
VERIFY(ainfo.corder, u, "H5Aget_info_by_name");
} /* end for */
} /* end for */
@@ -4819,14 +4819,14 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Create several attributes, but keep storage in compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -4843,13 +4843,13 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (u + 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
} /* end for */
/* Create another attribute, to push into dense storage */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", max_compact);
+ snprintf(attrname, sizeof(attrname), "attr %02u", max_compact);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -4866,9 +4866,9 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact + 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
@@ -4932,9 +4932,9 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact + 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Loop through attributes, checking their creation order values */
/* (the name index is used, but the creation order value is in the same order) */
@@ -4942,12 +4942,12 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
H5A_info_t ainfo; /* Attribute information */
/* Retrieve information for attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Aget_info_by_name(my_dataset, ".", attrname, &ainfo, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_info_by_name");
/* Verify creation order of attribute */
- VERIFY(ainfo.corder_valid, TRUE, "H5Aget_info_by_name");
+ VERIFY(ainfo.corder_valid, true, "H5Aget_info_by_name");
VERIFY(ainfo.corder, u, "H5Aget_info_by_name");
} /* end for */
} /* end for */
@@ -4975,13 +4975,13 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
static void
test_attr_corder_create_reopen(hid_t fcpl, hid_t fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t gcpl_id = -1; /* Group creation property list ID */
- hid_t gid = -1; /* Group ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t aid = -1; /* Attribute ID */
- int buf; /* Attribute data */
- herr_t ret; /* Generic return value */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gcpl_id = H5I_INVALID_HID; /* Group creation property list ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ int buf; /* Attribute data */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Creating Attributes w/New & Old Format\n"));
@@ -5160,9 +5160,9 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
} /* end for */
/* Close Datasets */
@@ -5215,7 +5215,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
/* Create several attributes, but keep storage in compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5232,13 +5232,13 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (u + 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
} /* end for */
/* Create another attribute, to push into dense storage */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", max_compact);
+ snprintf(attrname, sizeof(attrname), "attr %02u", max_compact);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5255,9 +5255,9 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact + 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
@@ -5266,7 +5266,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
/* Delete several attributes from object, until attribute storage resumes compact form */
for (u = max_compact; u >= min_dense; u--) {
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
@@ -5275,9 +5275,9 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, u, "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
@@ -5286,7 +5286,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
} /* end for */
/* Delete another attribute, to push attribute storage into compact form */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (min_dense - 1));
+ snprintf(attrname, sizeof(attrname), "attr %02u", (min_dense - 1));
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
@@ -5295,14 +5295,14 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (min_dense - 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Re-add attributes to get back into dense form */
for (u = (min_dense - 1); u < (max_compact + 1); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5320,9 +5320,9 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact + 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
@@ -5378,9 +5378,9 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact + 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
@@ -5389,7 +5389,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
/* Delete several attributes from object, until attribute storage resumes compact form */
for (u = max_compact; u >= min_dense; u--) {
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
@@ -5398,9 +5398,9 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, u, "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
@@ -5409,7 +5409,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
} /* end for */
/* Delete another attribute, to push attribute storage into compact form */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (min_dense - 1));
+ snprintf(attrname, sizeof(attrname), "attr %02u", (min_dense - 1));
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
@@ -5418,14 +5418,14 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (min_dense - 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Re-add attributes to get back into dense form */
for (u = (min_dense - 1); u < (max_compact + 1); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5443,9 +5443,9 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact + 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
@@ -5454,11 +5454,11 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
/* Delete all attributes */
for (u = max_compact; u > 0; u--) {
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
} /* end for */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", 0);
+ snprintf(attrname, sizeof(attrname), "attr %02u", 0);
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
} /* end for */
@@ -5535,7 +5535,7 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl)
/* Loop to leave file open when deleting dataset, or to close & re-open file
* before deleting dataset */
- for (reopen_file = FALSE; reopen_file <= TRUE; reopen_file++) {
+ for (reopen_file = false; reopen_file <= true; reopen_file++) {
/* Create test file */
fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl, fapl);
CHECK(fid, FAIL, "H5Fopen");
@@ -5569,14 +5569,14 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Create attributes, until attribute storage is in dense form */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5594,9 +5594,9 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact * 2), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
@@ -5671,7 +5671,7 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl)
*-------------------------------------------------------------------------
*/
static int
-attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t use_index)
+attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, bool use_index)
{
char tmpname[NAME_BUF_SIZE]; /* Temporary attribute name */
H5A_info_t ainfo; /* Attribute info struct */
@@ -5698,7 +5698,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname) != 0)
+ if (strcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
/* Don't test "native" order if there is no creation order index, since
@@ -5724,7 +5724,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, n, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname) != 0)
+ if (strcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
} /* end if */
@@ -5745,7 +5745,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname) != 0)
+ if (strcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
/* Verify the information for first attribute, in increasing name order */
@@ -5765,7 +5765,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname) != 0)
+ if (strcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
/* Don't test "native" order queries on link name order, since there's not
@@ -5789,7 +5789,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname) != 0)
+ if (strcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
/* Retrieve current # of errors */
@@ -5806,7 +5806,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
**
****************************************************************/
static void
-test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
+test_attr_info_by_idx(bool new_format, hid_t fcpl, hid_t fapl)
{
hid_t fid; /* HDF5 File ID */
hid_t dset1, dset2, dset3; /* Dataset IDs */
@@ -5848,7 +5848,7 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Pget_attr_phase_change");
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
/* Output message about test being performed */
if (use_index)
MESSAGE(5, ("Testing Querying Attribute Info By Index w/Creation Order Index\n"));
@@ -5860,7 +5860,7 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(fid, FAIL, "H5Fcreate");
/* Set attribute creation order tracking & indexing for object */
- if (new_format == TRUE) {
+ if (new_format == true) {
ret = H5Pset_attr_creation_order(
dcpl, (H5P_CRT_ORDER_TRACKED | (use_index ? H5P_CRT_ORDER_INDEXED : (unsigned)0)));
CHECK(ret, FAIL, "H5Pset_attr_creation_order");
@@ -5895,9 +5895,9 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Check for query on non-existent attribute */
H5E_BEGIN_TRY
@@ -5918,7 +5918,7 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5940,9 +5940,9 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, max_compact, "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Check for out of bound offset queries */
H5E_BEGIN_TRY
@@ -5970,7 +5970,7 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for (; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5984,7 +5984,7 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Verify state of object */
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
/* Verify information for new attribute */
ret = attr_info_by_idx_check(my_dataset, attrname, (hsize_t)u, use_index);
@@ -5996,9 +5996,9 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact * 2), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
if (new_format) {
/* Retrieve & verify # of records in the name & creation order indices */
@@ -6288,7 +6288,7 @@ test_attr_get_name_invalid_buf(hid_t fcpl, hid_t fapl)
**
****************************************************************/
static void
-test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
+test_attr_delete_by_idx(bool new_format, hid_t fcpl, hid_t fapl)
{
hid_t fid; /* HDF5 File ID */
hid_t dset1, dset2, dset3; /* Dataset IDs */
@@ -6338,7 +6338,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Loop over operating in different orders */
for (order = H5_ITER_INC; order <= H5_ITER_DEC; order++) {
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
/* Print appropriate test message */
if (idx_type == H5_INDEX_CRT_ORDER) {
if (order == H5_ITER_INC) {
@@ -6382,7 +6382,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(fid, FAIL, "H5Fcreate");
/* Set attribute creation order tracking & indexing for object */
- if (new_format == TRUE) {
+ if (new_format == true) {
ret = H5Pset_attr_creation_order(
dcpl, (H5P_CRT_ORDER_TRACKED | (use_index ? H5P_CRT_ORDER_INDEXED : (unsigned)0)));
CHECK(ret, FAIL, "H5Pset_attr_creation_order");
@@ -6417,9 +6417,9 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Check for deleting non-existent attribute */
H5E_BEGIN_TRY
@@ -6432,7 +6432,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -6455,9 +6455,9 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, max_compact, "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Check for out of bound deletions */
H5E_BEGIN_TRY
@@ -6511,10 +6511,10 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
if (order == H5_ITER_INC)
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (u + 1));
+ snprintf(attrname, sizeof(attrname), "attr %02u", (u + 1));
else
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (max_compact - (u + 2)));
- ret = HDstrcmp(attrname, tmpname);
+ snprintf(attrname, sizeof(attrname), "attr %02u", (max_compact - (u + 2)));
+ ret = strcmp(attrname, tmpname);
VERIFY(ret, 0, "H5Aget_name_by_idx");
} /* end for */
@@ -6524,7 +6524,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Verify state of attribute storage (empty) */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
} /* end for */
/* Work on all the datasets */
@@ -6549,7 +6549,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for (u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -6565,7 +6565,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Verify state of object */
if (u >= max_compact) {
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
} /* end if */
/* Verify information for new attribute */
@@ -6578,9 +6578,9 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact * 2), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
if (new_format) {
/* Retrieve & verify # of records in the name & creation order indices */
@@ -6643,11 +6643,10 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
if (order == H5_ITER_INC)
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (u + 1));
+ snprintf(attrname, sizeof(attrname), "attr %02u", (u + 1));
else
- HDsnprintf(attrname, sizeof(attrname), "attr %02u",
- ((max_compact * 2) - (u + 2)));
- ret = HDstrcmp(attrname, tmpname);
+ snprintf(attrname, sizeof(attrname), "attr %02u", ((max_compact * 2) - (u + 2)));
+ ret = strcmp(attrname, tmpname);
VERIFY(ret, 0, "H5Aget_name_by_idx");
} /* end for */
@@ -6657,7 +6656,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Verify state of attribute storage (empty) */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
/* Check for deletion on empty attribute storage again */
H5E_BEGIN_TRY
@@ -6692,7 +6691,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, to push into dense form */
for (u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -6708,7 +6707,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Verify state of object */
if (u >= max_compact) {
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
} /* end if */
/* Verify information for new attribute */
@@ -6761,11 +6760,11 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", idx_type, order, (hsize_t)u,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
if (order == H5_ITER_INC)
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", ((u * 2) + 1));
+ snprintf(attrname, sizeof(attrname), "attr %02u", ((u * 2) + 1));
else
- HDsnprintf(attrname, sizeof(attrname), "attr %02u",
- ((max_compact * 2) - ((u * 2) + 2)));
- ret = HDstrcmp(attrname, tmpname);
+ snprintf(attrname, sizeof(attrname), "attr %02u",
+ ((max_compact * 2) - ((u * 2) + 2)));
+ ret = strcmp(attrname, tmpname);
VERIFY(ret, 0, "H5Aget_name_by_idx");
} /* end for */
} /* end for */
@@ -6814,11 +6813,11 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
if (order == H5_ITER_INC)
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", ((u * 2) + 3));
+ snprintf(attrname, sizeof(attrname), "attr %02u", ((u * 2) + 3));
else
- HDsnprintf(attrname, sizeof(attrname), "attr %02u",
- ((max_compact * 2) - ((u * 2) + 4)));
- ret = HDstrcmp(attrname, tmpname);
+ snprintf(attrname, sizeof(attrname), "attr %02u",
+ ((max_compact * 2) - ((u * 2) + 4)));
+ ret = strcmp(attrname, tmpname);
VERIFY(ret, 0, "H5Aget_name_by_idx");
} /* end for */
@@ -6828,7 +6827,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Verify state of attribute storage (empty) */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
/* Check for deletion on empty attribute storage again */
H5E_BEGIN_TRY
@@ -6902,8 +6901,8 @@ attr_iterate2_cb(hid_t loc_id, const char *attr_name, const H5A_info_t *info, vo
} /* end if */
/* Verify name of link */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (unsigned)my_info.corder);
- if (HDstrcmp(attr_name, attrname) != 0)
+ snprintf(attrname, sizeof(attrname), "attr %02u", (unsigned)my_info.corder);
+ if (strcmp(attr_name, attrname) != 0)
return (H5_ITER_ERROR);
/* Check if we've visited this link before */
@@ -6911,7 +6910,7 @@ attr_iterate2_cb(hid_t loc_id, const char *attr_name, const H5A_info_t *info, vo
return (H5_ITER_ERROR);
if (op_data->visited[op_data->curr])
return (H5_ITER_ERROR);
- op_data->visited[op_data->curr] = TRUE;
+ op_data->visited[op_data->curr] = true;
/* Advance to next value, in correct direction */
if (op_data->order != H5_ITER_DEC)
@@ -6990,14 +6989,14 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate2(obj_id, idx_type, order, &skip, attr_iterate2_cb, iter_info);
CHECK(ret, FAIL, "H5Aiterate2");
/* Verify that we visited all the attributes */
VERIFY(skip, max_attrs, "H5Aiterate2");
for (v = 0; v < max_attrs; v++)
- VERIFY(iter_info->visited[v], TRUE, "H5Aiterate2");
+ VERIFY(iter_info->visited[v], true, "H5Aiterate2");
/* Iterate over attributes on object */
iter_info->nskipped = (unsigned)(skip = 0);
@@ -7005,14 +7004,14 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate_by_name(fid, dsetname, idx_type, order, &skip, attr_iterate2_cb, iter_info, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aiterate_by_name");
/* Verify that we visited all the attributes */
VERIFY(skip, max_attrs, "H5Aiterate_by_name");
for (v = 0; v < max_attrs; v++)
- VERIFY(iter_info->visited[v], TRUE, "H5Aiterate_by_name");
+ VERIFY(iter_info->visited[v], true, "H5Aiterate_by_name");
/* Iterate over attributes on object */
iter_info->nskipped = (unsigned)(skip = 0);
@@ -7020,14 +7019,14 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate_by_name(obj_id, ".", idx_type, order, &skip, attr_iterate2_cb, iter_info, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aiterate_by_name");
/* Verify that we visited all the attributes */
VERIFY(skip, max_attrs, "H5Aiterate_by_name");
for (v = 0; v < max_attrs; v++)
- VERIFY(iter_info->visited[v], TRUE, "H5Aiterate_by_name");
+ VERIFY(iter_info->visited[v], true, "H5Aiterate_by_name");
#ifndef H5_NO_DEPRECATED_SYMBOLS
/* Iterate over attributes on object, with H5Aiterate1 */
@@ -7036,14 +7035,14 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate1(obj_id, &oskip, attr_iterate1_cb, iter_info);
CHECK(ret, FAIL, "H5Aiterate1");
/* Verify that we visited all the attributes */
VERIFY(skip, max_attrs, "H5Aiterate1");
for (v = 0; v < max_attrs; v++)
- VERIFY(iter_info->visited[v], TRUE, "H5Aiterate1");
+ VERIFY(iter_info->visited[v], true, "H5Aiterate1");
#endif /* H5_NO_DEPRECATED_SYMBOLS */
/* Skip over some attributes on object */
@@ -7052,7 +7051,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? skip : ((max_attrs - 1) - skip);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate2(obj_id, idx_type, order, &skip, attr_iterate2_cb, iter_info);
CHECK(ret, FAIL, "H5Aiterate2");
@@ -7060,18 +7059,18 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
VERIFY(skip, max_attrs, "H5Aiterate2");
if (order == H5_ITER_INC) {
for (v = 0; v < (max_attrs / 2); v++)
- VERIFY(iter_info->visited[v + (max_attrs / 2)], TRUE, "H5Aiterate2");
+ VERIFY(iter_info->visited[v + (max_attrs / 2)], true, "H5Aiterate2");
} /* end if */
else if (order == H5_ITER_DEC) {
for (v = 0; v < (max_attrs / 2); v++)
- VERIFY(iter_info->visited[v], TRUE, "H5Aiterate2");
+ VERIFY(iter_info->visited[v], true, "H5Aiterate2");
} /* end if */
else {
unsigned nvisit = 0; /* # of links visited */
assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_attrs; v++)
- if (iter_info->visited[v] == TRUE)
+ if (iter_info->visited[v] == true)
nvisit++;
VERIFY(nvisit, max_attrs, "H5Aiterate2");
@@ -7083,7 +7082,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? skip : ((max_attrs - 1) - skip);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate_by_name(fid, dsetname, idx_type, order, &skip, attr_iterate2_cb, iter_info, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aiterate_by_name");
@@ -7091,18 +7090,18 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
VERIFY(skip, max_attrs, "H5Aiterate_by_name");
if (order == H5_ITER_INC) {
for (v = 0; v < (max_attrs / 2); v++)
- VERIFY(iter_info->visited[v + (max_attrs / 2)], TRUE, "H5Aiterate_by_name");
+ VERIFY(iter_info->visited[v + (max_attrs / 2)], true, "H5Aiterate_by_name");
} /* end if */
else if (order == H5_ITER_DEC) {
for (v = 0; v < (max_attrs / 2); v++)
- VERIFY(iter_info->visited[v], TRUE, "H5Aiterate_by_name");
+ VERIFY(iter_info->visited[v], true, "H5Aiterate_by_name");
} /* end if */
else {
unsigned nvisit = 0; /* # of links visited */
assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_attrs; v++)
- if (iter_info->visited[v] == TRUE)
+ if (iter_info->visited[v] == true)
nvisit++;
VERIFY(nvisit, max_attrs, "H5Aiterate_by_name");
@@ -7114,7 +7113,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? skip : ((max_attrs - 1) - skip);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate_by_name(obj_id, ".", idx_type, order, &skip, attr_iterate2_cb, iter_info, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aiterate_by_name");
@@ -7122,18 +7121,18 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
VERIFY(skip, max_attrs, "H5Aiterate_by_name");
if (order == H5_ITER_INC) {
for (v = 0; v < (max_attrs / 2); v++)
- VERIFY(iter_info->visited[v + (max_attrs / 2)], TRUE, "H5Aiterate_by_name");
+ VERIFY(iter_info->visited[v + (max_attrs / 2)], true, "H5Aiterate_by_name");
} /* end if */
else if (order == H5_ITER_DEC) {
for (v = 0; v < (max_attrs / 2); v++)
- VERIFY(iter_info->visited[v], TRUE, "H5Aiterate_by_name");
+ VERIFY(iter_info->visited[v], true, "H5Aiterate_by_name");
} /* end if */
else {
unsigned nvisit = 0; /* # of links visited */
assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_attrs; v++)
- if (iter_info->visited[v] == TRUE)
+ if (iter_info->visited[v] == true)
nvisit++;
VERIFY(nvisit, max_attrs, "H5Aiterate_by_name");
@@ -7146,7 +7145,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? (unsigned)oskip : ((max_attrs - 1) - oskip);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate1(obj_id, &oskip, attr_iterate1_cb, iter_info);
CHECK(ret, FAIL, "H5Aiterate1");
@@ -7154,18 +7153,18 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
VERIFY(oskip, max_attrs, "H5Aiterate1");
if (order == H5_ITER_INC) {
for (v = 0; v < (max_attrs / 2); v++)
- VERIFY(iter_info->visited[v + (max_attrs / 2)], TRUE, "H5Aiterate1");
+ VERIFY(iter_info->visited[v + (max_attrs / 2)], true, "H5Aiterate1");
} /* end if */
else if (order == H5_ITER_DEC) {
for (v = 0; v < (max_attrs / 2); v++)
- VERIFY(iter_info->visited[v], TRUE, "H5Aiterate1");
+ VERIFY(iter_info->visited[v], true, "H5Aiterate1");
} /* end if */
else {
unsigned nvisit = 0; /* # of links visited */
assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_attrs; v++)
- if (iter_info->visited[v] == TRUE)
+ if (iter_info->visited[v] == true)
nvisit++;
VERIFY(nvisit, max_attrs, "H5Aiterate1");
@@ -7178,7 +7177,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate2(obj_id, idx_type, order, &skip, attr_iterate2_cb, iter_info);
CHECK(ret, FAIL, "H5Aiterate2");
VERIFY(ret, CORDER_ITER_STOP, "H5Aiterate2");
@@ -7190,7 +7189,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate_by_name(fid, dsetname, idx_type, order, &skip, attr_iterate2_cb, iter_info, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aiterate_by_name");
VERIFY(ret, CORDER_ITER_STOP, "H5Aiterate_by_name");
@@ -7202,7 +7201,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate_by_name(obj_id, ".", idx_type, order, &skip, attr_iterate2_cb, iter_info, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aiterate_by_name");
VERIFY(ret, CORDER_ITER_STOP, "H5Aiterate_by_name");
@@ -7215,7 +7214,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate1(obj_id, &oskip, attr_iterate1_cb, iter_info);
CHECK(ret, FAIL, "H5Aiterate1");
VERIFY(ret, CORDER_ITER_STOP, "H5Aiterate1");
@@ -7263,7 +7262,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
**
****************************************************************/
static void
-test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
+test_attr_iterate2(bool new_format, hid_t fcpl, hid_t fapl)
{
hid_t fid; /* HDF5 File ID */
hid_t dset1, dset2, dset3; /* Dataset IDs */
@@ -7281,7 +7280,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
H5_index_t idx_type; /* Type of index to operate on */
H5_iter_order_t order; /* Order within in the index */
attr_iter_info_t iter_info; /* Iterator info */
- hbool_t *visited = NULL; /* Array of flags for visiting links */
+ bool *visited = NULL; /* Array of flags for visiting links */
hsize_t idx; /* Start index for iteration */
unsigned use_index; /* Use index on creation order values */
const char *dsetname; /* Name of dataset for attributes */
@@ -7310,7 +7309,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Allocate the "visited link" array */
iter_info.max_visit = max_compact * 2;
- visited = (hbool_t *)malloc(sizeof(hbool_t) * iter_info.max_visit);
+ visited = (bool *)malloc(sizeof(bool) * iter_info.max_visit);
CHECK_PTR(visited, "malloc");
iter_info.visited = visited;
@@ -7319,7 +7318,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Loop over operating in different orders */
for (order = H5_ITER_INC; order <= H5_ITER_DEC; order++) {
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
/* Print appropriate test message */
if (idx_type == H5_INDEX_CRT_ORDER) {
if (order == H5_ITER_INC) {
@@ -7363,7 +7362,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(fid, FAIL, "H5Fcreate");
/* Set attribute creation order tracking & indexing for object */
- if (new_format == TRUE) {
+ if (new_format == true) {
ret = H5Pset_attr_creation_order(
dcpl, (H5P_CRT_ORDER_TRACKED | (use_index ? H5P_CRT_ORDER_INDEXED : (unsigned)0)));
CHECK(ret, FAIL, "H5Pset_attr_creation_order");
@@ -7401,9 +7400,9 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Check for iterating over object with no attributes (should be OK) */
ret = H5Aiterate2(my_dataset, idx_type, order, NULL, attr_iterate2_cb, NULL);
@@ -7420,7 +7419,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -7443,9 +7442,9 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, max_compact, "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Check for out of bound iteration */
idx = u;
@@ -7504,7 +7503,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for (u = max_compact; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -7520,7 +7519,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Verify state of object */
if (u >= max_compact) {
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
} /* end if */
/* Verify information for new attribute */
@@ -7533,9 +7532,9 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact * 2), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
if (new_format) {
/* Retrieve & verify # of records in the name & creation order indices */
@@ -7667,7 +7666,7 @@ attr_open_by_idx_check(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order,
**
****************************************************************/
static void
-test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
+test_attr_open_by_idx(bool new_format, hid_t fcpl, hid_t fapl)
{
hid_t fid; /* HDF5 File ID */
hid_t dset1, dset2, dset3; /* Dataset IDs */
@@ -7714,7 +7713,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Loop over operating in different orders */
for (order = H5_ITER_INC; order <= H5_ITER_DEC; order++) {
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
/* Print appropriate test message */
if (idx_type == H5_INDEX_CRT_ORDER) {
if (order == H5_ITER_INC) {
@@ -7758,7 +7757,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(fid, FAIL, "H5Fcreate");
/* Set attribute creation order tracking & indexing for object */
- if (new_format == TRUE) {
+ if (new_format == true) {
ret = H5Pset_attr_creation_order(
dcpl, (H5P_CRT_ORDER_TRACKED | (use_index ? H5P_CRT_ORDER_INDEXED : (unsigned)0)));
CHECK(ret, FAIL, "H5Pset_attr_creation_order");
@@ -7793,9 +7792,9 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Check for opening an attribute on an object with no attributes */
H5E_BEGIN_TRY
@@ -7809,7 +7808,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -7832,9 +7831,9 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, max_compact, "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Check for out of bound opening an attribute on an object */
H5E_BEGIN_TRY
@@ -7872,7 +7871,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for (u = max_compact; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -7888,7 +7887,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Verify state of object */
if (u >= max_compact) {
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
} /* end if */
/* Verify information for new attribute */
@@ -7901,9 +7900,9 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact * 2), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
if (new_format) {
/* Retrieve & verify # of records in the name & creation order indices */
@@ -7978,7 +7977,7 @@ attr_open_check(hid_t fid, const char *dsetname, hid_t obj_id, unsigned max_attr
/* Open each attribute on object by index and check that it's the correct one */
for (u = 0; u < max_attrs; u++) {
/* Open the attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr_id = H5Aopen(obj_id, attrname, H5P_DEFAULT);
CHECK(attr_id, FAIL, "H5Aopen");
@@ -8038,7 +8037,7 @@ attr_open_check(hid_t fid, const char *dsetname, hid_t obj_id, unsigned max_attr
**
****************************************************************/
static void
-test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
+test_attr_open_by_name(bool new_format, hid_t fcpl, hid_t fapl)
{
hid_t fid; /* HDF5 File ID */
hid_t dset1, dset2, dset3; /* Dataset IDs */
@@ -8080,7 +8079,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Pget_attr_phase_change");
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
/* Print appropriate test message */
if (use_index)
MESSAGE(5, ("Testing Opening Attributes By Name w/Creation Order Index\n"));
@@ -8092,7 +8091,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(fid, FAIL, "H5Fcreate");
/* Set attribute creation order tracking & indexing for object */
- if (new_format == TRUE) {
+ if (new_format == true) {
ret = H5Pset_attr_creation_order(
dcpl, (H5P_CRT_ORDER_TRACKED | (use_index ? H5P_CRT_ORDER_INDEXED : (unsigned)0)));
CHECK(ret, FAIL, "H5Pset_attr_creation_order");
@@ -8130,9 +8129,9 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Check for opening a non-existent attribute on an object with no attributes */
H5E_BEGIN_TRY
@@ -8159,7 +8158,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -8181,9 +8180,9 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, max_compact, "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Check for opening a non-existent attribute on an object with compact attribute storage */
H5E_BEGIN_TRY
@@ -8237,7 +8236,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for (u = max_compact; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -8252,7 +8251,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Verify state of object */
if (u >= max_compact) {
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
} /* end if */
/* Verify information for new attribute */
@@ -8265,9 +8264,9 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact * 2), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
if (new_format) {
/* Retrieve & verify # of records in the name & creation order indices */
@@ -8334,7 +8333,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
**
****************************************************************/
static void
-test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
+test_attr_create_by_name(bool new_format, hid_t fcpl, hid_t fapl)
{
hid_t fid; /* HDF5 File ID */
hid_t dset1, dset2, dset3; /* Dataset IDs */
@@ -8375,7 +8374,7 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Pget_attr_phase_change");
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
/* Print appropriate test message */
if (use_index)
MESSAGE(5, ("Testing Creating Attributes By Name w/Creation Order Index\n"));
@@ -8387,7 +8386,7 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(fid, FAIL, "H5Fcreate");
/* Set attribute creation order tracking & indexing for object */
- if (new_format == TRUE) {
+ if (new_format == true) {
ret = H5Pset_attr_creation_order(
dcpl, (H5P_CRT_ORDER_TRACKED | (use_index ? H5P_CRT_ORDER_INDEXED : (unsigned)0)));
CHECK(ret, FAIL, "H5Pset_attr_creation_order");
@@ -8425,14 +8424,14 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Create attributes, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate_by_name(fid, dsetname, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate_by_name");
@@ -8455,9 +8454,9 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, max_compact, "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Test opening attributes stored compactly */
ret = attr_open_check(fid, dsetname, my_dataset, u);
@@ -8489,7 +8488,7 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for (u = max_compact; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate_by_name(fid, dsetname, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate_by_name");
@@ -8505,7 +8504,7 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Verify state of object */
if (u >= max_compact) {
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
} /* end if */
/* Verify information for new attribute */
@@ -8518,9 +8517,9 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact * 2), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
if (new_format) {
/* Retrieve & verify # of records in the name & creation order indices */
@@ -8707,14 +8706,14 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
/* Check on datasets' attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
is_dense = H5O__is_attr_dense_test(dataset2);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Add attributes to each dataset, until after converting to dense storage */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
/* Alternate between creating "small" & "big" attributes */
if (u % 2) {
@@ -8724,7 +8723,7 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
/* Write data into the attribute */
attr_value = u + 1;
@@ -8738,7 +8737,7 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -8763,9 +8762,9 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
if (u < max_compact)
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Alternate between creating "small" & "big" attributes */
if (u % 2) {
@@ -8775,7 +8774,7 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
/* Write data into the attribute */
attr_value = u + 1;
@@ -8789,7 +8788,7 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -8814,9 +8813,9 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset2);
if (u < max_compact)
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
} /* end for */
/* Close attribute's datatype */
@@ -9044,14 +9043,14 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
/* Check on datasets' attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
is_dense = H5O__is_attr_dense_test(dataset2);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Add attributes to each dataset, until after converting to dense storage */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
/* Alternate between creating "small" & "big" attributes */
if (u % 2) {
@@ -9061,7 +9060,7 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
/* Write data into the attribute */
attr_value = u + 1;
@@ -9075,7 +9074,7 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9100,9 +9099,9 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
if (u < max_compact)
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Alternate between creating "small" & "big" attributes */
if (u % 2) {
@@ -9112,7 +9111,7 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
/* Write data into the attribute */
attr_value = u + 1;
@@ -9126,7 +9125,7 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9151,12 +9150,12 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset2);
if (u < max_compact)
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Create new attribute name */
- HDsnprintf(attrname2, sizeof(attrname2), "new attr %02u", u);
+ snprintf(attrname2, sizeof(attrname2), "new attr %02u", u);
/* Change second dataset's attribute's name */
ret = H5Arename_by_name(fid, DSET2_NAME, attrname, attrname2, H5P_DEFAULT);
@@ -9171,12 +9170,12 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
if (u % 2) {
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
} /* end if */
else {
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9195,12 +9194,12 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
if (u % 2) {
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
} /* end if */
else {
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9225,12 +9224,12 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
if (u % 2) {
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
} /* end if */
else {
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9249,12 +9248,12 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
if (u % 2) {
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
} /* end if */
else {
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9491,14 +9490,14 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
/* Check on datasets' attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
is_dense = H5O__is_attr_dense_test(dataset2);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Add attributes to each dataset, until after converting to dense storage */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
/* Alternate between creating "small" & "big" attributes */
if (u % 2) {
@@ -9508,7 +9507,7 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
/* Write data into the attribute */
attr_value = u + 1;
@@ -9522,7 +9521,7 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9547,9 +9546,9 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
if (u < max_compact)
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Alternate between creating "small" & "big" attributes */
if (u % 2) {
@@ -9559,7 +9558,7 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
/* Write data into the attribute */
attr_value = u + 1;
@@ -9573,7 +9572,7 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9598,15 +9597,15 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset2);
if (u < max_compact)
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
} /* end for */
/* Delete attributes from second dataset */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
/* Delete second dataset's attribute */
ret = H5Adelete_by_name(fid, DSET2_NAME, attrname, H5P_DEFAULT);
@@ -9621,12 +9620,12 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
if (u % 2) {
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
} /* end if */
else {
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9863,14 +9862,14 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
/* Check on datasets' attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
is_dense = H5O__is_attr_dense_test(dataset2);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Add attributes to each dataset, until after converting to dense storage */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
/* Alternate between creating "small" & "big" attributes */
if (u % 2) {
@@ -9880,7 +9879,7 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
/* Write data into the attribute */
attr_value = u + 1;
@@ -9894,7 +9893,7 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
/* ChecFk that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9919,9 +9918,9 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
if (u < max_compact)
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Alternate between creating "small" & "big" attributes */
if (u % 2) {
@@ -9931,7 +9930,7 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
/* Write data into the attribute */
attr_value = u + 1;
@@ -9945,7 +9944,7 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9970,9 +9969,9 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset2);
if (u < max_compact)
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
} /* end for */
/* Close attribute's datatype */
@@ -9989,12 +9988,12 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
/* Check on first dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Check ref count on attributes of first dataset */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
/* Open attribute on first dataset */
attr = H5Aopen(dataset, attrname, H5P_DEFAULT);
@@ -10003,12 +10002,12 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
if (u % 2) {
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
} /* end if */
else {
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -10267,7 +10266,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
/* Create attributes on group */
for (i = 0; i < BUG2_NATTR; i++) {
- HDsnprintf(aname, sizeof(aname), "%03u", i);
+ snprintf(aname, sizeof(aname), "%03u", i);
aid = H5Acreate2(gid, aname, H5T_STD_I32LE, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
@@ -10277,7 +10276,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
/* Delete every other attribute */
for (i = 1; i < BUG2_NATTR; i += 2) {
- HDsnprintf(aname, sizeof(aname), "%03u", i);
+ snprintf(aname, sizeof(aname), "%03u", i);
ret = H5Adelete(gid, aname);
CHECK(ret, FAIL, "H5Adelete");
}
@@ -10301,7 +10300,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
/* Open an attribute in the middle */
i = (BUG2_NATTR / 4) * 2;
- HDsnprintf(aname, sizeof(aname), "%03u", i);
+ snprintf(aname, sizeof(aname), "%03u", i);
aid = H5Aopen(gid, aname, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Aopen");
@@ -10310,7 +10309,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
CHECK(tid, FAIL, "H5Aget_type");
tri_ret = H5Tequal(tid, H5T_STD_I32LE);
- VERIFY(tri_ret, TRUE, "H5Tequal");
+ VERIFY(tri_ret, true, "H5Tequal");
/* Close IDs */
ret = H5Tclose(tid);
@@ -10344,7 +10343,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
/* Create attributes on group */
for (i = 0; i < BUG2_NATTR2; i++) {
- HDsnprintf(aname, sizeof(aname), "%03u", i);
+ snprintf(aname, sizeof(aname), "%03u", i);
aid = H5Acreate2(gid, aname, H5T_STD_I32LE, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
@@ -10354,7 +10353,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
/* Delete every other attribute */
for (i = 0; i < BUG2_NATTR2; i++) {
- HDsnprintf(aname, sizeof(aname), "%03u", i);
+ snprintf(aname, sizeof(aname), "%03u", i);
ret = H5Adelete(gid, aname);
CHECK(ret, FAIL, "H5Adelete");
}
@@ -11168,17 +11167,17 @@ test_attr_bug8(hid_t fcpl, hid_t fapl)
static void
test_attr_bug9(hid_t fcpl, hid_t fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group ID */
- hid_t aid = -1; /* Attribute ID */
- hid_t sid = -1; /* Dataspace ID */
- hsize_t dims[1] = {32768}; /* Attribute dimensions */
- int create_link; /* Whether to create a soft link */
- unsigned max_compact; /* Setting from fcpl */
- unsigned min_dense; /* Setting from fcpl */
- char aname[11]; /* Attribute name */
- unsigned i; /* Local index variable */
- herr_t ret; /* Generic return status */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hsize_t dims[1] = {32768}; /* Attribute dimensions */
+ int create_link; /* Whether to create a soft link */
+ unsigned max_compact; /* Setting from fcpl */
+ unsigned min_dense; /* Setting from fcpl */
+ char aname[11]; /* Attribute name */
+ unsigned i; /* Local index variable */
+ herr_t ret; /* Generic return status */
/* Output message about test being performed */
MESSAGE(5, ("Testing that attributes can always be added to named datatypes\n"));
@@ -11212,7 +11211,7 @@ test_attr_bug9(hid_t fcpl, hid_t fapl)
/* Create enough attributes to cause a change to dense storage */
for (i = 0; i < max_compact + 1; i++) {
/* Create attribute */
- HDsnprintf(aname, sizeof(aname), "%u", i);
+ snprintf(aname, sizeof(aname), "%u", i);
aid = H5Acreate2(gid, aname, H5T_NATIVE_CHAR, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
@@ -11414,13 +11413,13 @@ test_attr_delete_last_dense(hid_t fcpl, hid_t fapl)
void
test_attr(void)
{
- hid_t fapl = (-1), fapl2 = (-1); /* File access property lists */
- hid_t fcpl = (-1), fcpl2 = (-1); /* File creation property lists */
- hid_t dcpl = -1; /* Dataset creation property list */
- unsigned new_format; /* Whether to use the new format or not */
- unsigned use_shared; /* Whether to use shared attributes or not */
- unsigned minimize_dset_oh; /* Whether to use minimized dataset object headers */
- herr_t ret; /* Generic return value */
+ hid_t fapl = (H5I_INVALID_HID), fapl2 = (H5I_INVALID_HID); /* File access property lists */
+ hid_t fcpl = (H5I_INVALID_HID), fcpl2 = (H5I_INVALID_HID); /* File creation property lists */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
+ unsigned new_format; /* Whether to use the new format or not */
+ unsigned use_shared; /* Whether to use shared attributes or not */
+ unsigned minimize_dset_oh; /* Whether to use minimized dataset object headers */
+ herr_t ret; /* Generic return value */
MESSAGE(5, ("Testing Attributes\n"));
@@ -11454,12 +11453,12 @@ test_attr(void)
MESSAGE(7, ("testing with minimzied dataset object headers\n"));
dcpl = H5Pcreate(H5P_DATASET_CREATE);
CHECK(dcpl, FAIL, "H5Pcreate");
- ret = H5Pset_dset_no_attrs_hint(dcpl, TRUE);
+ ret = H5Pset_dset_no_attrs_hint(dcpl, true);
CHECK_I(ret, "H5Pset_dset_no_attrs_hint");
dcpl_g = dcpl;
}
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
hid_t my_fapl;
/* Set the FAPL for the type of format */
@@ -11500,10 +11499,10 @@ test_attr(void)
/* This next test uses its own file information */
test_attr_duplicate_ids(my_fapl);
- for (use_shared = FALSE; use_shared <= TRUE; use_shared++) {
+ for (use_shared = false; use_shared <= true; use_shared++) {
hid_t my_fcpl;
- if (new_format == TRUE && use_shared) {
+ if (new_format == true && use_shared) {
MESSAGE(7, ("testing with shared attributes\n"));
my_fcpl = fcpl2;
}
@@ -11553,7 +11552,7 @@ test_attr(void)
through a different file handle */
/* tests specific to the "new format" */
- if (new_format == TRUE) {
+ if (new_format == true) {
/* General attribute tests */
test_attr_dense_create(my_fcpl, my_fapl); /* Test dense attribute storage creation */
test_attr_dense_open(my_fcpl, my_fapl); /* Test opening attributes in dense storage */
@@ -11584,7 +11583,7 @@ test_attr(void)
w/attribute creation order info */
/* More complex tests with exclusively both "new format" and "shared" attributes */
- if (use_shared == TRUE) {
+ if (use_shared == true) {
test_attr_shared_write(
my_fcpl,
my_fapl); /* Test writing to shared attributes in compact & dense storage */
diff --git a/test/tcheck_version.c b/test/tcheck_version.c
index 9e5e469ebd0..53ca8613090 100644
--- a/test/tcheck_version.c
+++ b/test/tcheck_version.c
@@ -109,13 +109,13 @@ abort_intercept(int H5_ATTR_UNUSED sig)
#ifdef H5_HAVE_WIN32_API
/* Turns off the modal dialog that is raised when the Windows CRT calls abort().
*
- * Returning TRUE here lets Windows know that we've handled the abort() and that there
+ * Returning true here lets Windows know that we've handled the abort() and that there
* is no need to alert the user with a modal dialog box.
*/
int
handle_crt_abort(int reportType, char *message, int *returnValue)
{
- return TRUE;
+ return true;
}
#endif
diff --git a/test/tcoords.c b/test/tcoords.c
index dbe6ab1ca25..1a3a8b3658d 100644
--- a/test/tcoords.c
+++ b/test/tcoords.c
@@ -42,7 +42,7 @@ static int da_buffer[2][3][6][2];
**
*************************************************************/
static void
-test_singleEnd_selElements(hid_t file, hbool_t is_chunked)
+test_singleEnd_selElements(hid_t file, bool is_chunked)
{
hid_t sid, plid, did, msid;
char dset_name[NAME_LEN]; /* Dataset name */
@@ -87,9 +87,9 @@ test_singleEnd_selElements(hid_t file, hbool_t is_chunked)
/* Construct dataset's name */
memset(dset_name, 0, (size_t)NAME_LEN);
- HDstrcat(dset_name, SINGLE_END_DSET);
+ strcat(dset_name, SINGLE_END_DSET);
if (is_chunked)
- HDstrcat(dset_name, "_chunked");
+ strcat(dset_name, "_chunked");
did = H5Dcreate2(file, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, plid, H5P_DEFAULT);
CHECK(did, FAIL, "H5Dcreate2");
@@ -225,7 +225,7 @@ test_singleEnd_selElements(hid_t file, hbool_t is_chunked)
**
*************************************************************/
static void
-test_singleEnd_selHyperslab(hid_t file, hbool_t is_chunked)
+test_singleEnd_selHyperslab(hid_t file, bool is_chunked)
{
hid_t sid, did, msid;
char dset_name[NAME_LEN]; /* Dataset name */
@@ -259,9 +259,9 @@ test_singleEnd_selHyperslab(hid_t file, hbool_t is_chunked)
/* Construct dataset's name */
memset(dset_name, 0, NAME_LEN);
- HDstrcat(dset_name, SINGLE_END_DSET);
+ strcat(dset_name, SINGLE_END_DSET);
if (is_chunked)
- HDstrcat(dset_name, "_chunked");
+ strcat(dset_name, "_chunked");
/* Dataspace for the dataset in file */
sid = H5Screate_simple(4, da_dims, da_dims);
@@ -371,7 +371,7 @@ test_singleEnd_selHyperslab(hid_t file, hbool_t is_chunked)
**
*************************************************************/
static void
-test_multiple_ends(hid_t file, hbool_t is_chunked)
+test_multiple_ends(hid_t file, bool is_chunked)
{
hid_t sid, plid, did, msid;
char dset_name[NAME_LEN]; /* Dataset name */
@@ -462,9 +462,9 @@ test_multiple_ends(hid_t file, hbool_t is_chunked)
/* Construct dataset's name */
memset(dset_name, 0, NAME_LEN);
- HDstrcat(dset_name, MULTI_ENDS_SEL_HYPER_DSET);
+ strcat(dset_name, MULTI_ENDS_SEL_HYPER_DSET);
if (is_chunked)
- HDstrcat(dset_name, "_chunked");
+ strcat(dset_name, "_chunked");
did = H5Dcreate2(file, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, plid, H5P_DEFAULT);
CHECK(did, FAIL, "H5Dcreate2");
@@ -680,10 +680,10 @@ test_multiple_ends(hid_t file, hbool_t is_chunked)
void
test_coords(void)
{
- hid_t fid;
- hbool_t is_chunk[2] = {TRUE, FALSE};
- int i;
- herr_t ret; /* Generic error return */
+ hid_t fid;
+ bool is_chunk[2] = {true, false};
+ int i;
+ herr_t ret; /* Generic error return */
fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
CHECK(fid, FAIL, "H5Fcreate");
diff --git a/test/aggr.h5 b/test/testfiles/aggr.h5
similarity index 100%
rename from test/aggr.h5
rename to test/testfiles/aggr.h5
diff --git a/test/bad_compound.h5 b/test/testfiles/bad_compound.h5
similarity index 100%
rename from test/bad_compound.h5
rename to test/testfiles/bad_compound.h5
diff --git a/test/bad_offset.h5 b/test/testfiles/bad_offset.h5
similarity index 100%
rename from test/bad_offset.h5
rename to test/testfiles/bad_offset.h5
diff --git a/test/be_data.h5 b/test/testfiles/be_data.h5
similarity index 100%
rename from test/be_data.h5
rename to test/testfiles/be_data.h5
diff --git a/test/be_extlink1.h5 b/test/testfiles/be_extlink1.h5
similarity index 100%
rename from test/be_extlink1.h5
rename to test/testfiles/be_extlink1.h5
diff --git a/test/be_extlink2.h5 b/test/testfiles/be_extlink2.h5
similarity index 100%
rename from test/be_extlink2.h5
rename to test/testfiles/be_extlink2.h5
diff --git a/test/btree_idx_1_6.h5 b/test/testfiles/btree_idx_1_6.h5
similarity index 100%
rename from test/btree_idx_1_6.h5
rename to test/testfiles/btree_idx_1_6.h5
diff --git a/test/btree_idx_1_8.h5 b/test/testfiles/btree_idx_1_8.h5
similarity index 100%
rename from test/btree_idx_1_8.h5
rename to test/testfiles/btree_idx_1_8.h5
diff --git a/test/corrupt_stab_msg.h5 b/test/testfiles/corrupt_stab_msg.h5
similarity index 100%
rename from test/corrupt_stab_msg.h5
rename to test/testfiles/corrupt_stab_msg.h5
diff --git a/test/cve_2020_10810.h5 b/test/testfiles/cve_2020_10810.h5
similarity index 100%
rename from test/cve_2020_10810.h5
rename to test/testfiles/cve_2020_10810.h5
diff --git a/test/testfiles/cve_2020_10812.h5 b/test/testfiles/cve_2020_10812.h5
new file mode 100755
index 0000000000000000000000000000000000000000..a20369da0db50a0d12400e9f886f2a431fbdfe6e
GIT binary patch
literal 2565
zcmeD5aB<`1lHy|G;9!6O11N))3&J=7<-f7G)6K{Lf(#5DP%#OH1_l!_n-L@o1_BU@
zi(vvMgaxDj(+B`_7|ufp*`h{i7i;8UmvsK= MAXTESTDESC) {
+ if (strlen(TheDescr) >= MAXTESTDESC) {
printf("Test description ('%s') too long, increase MAXTESTDESC(%d).\n", TheDescr, MAXTESTDESC);
exit(EXIT_FAILURE);
}
- if (HDstrlen(TheName) >= MAXTESTNAME) {
+ if (strlen(TheName) >= MAXTESTNAME) {
printf("Test name too long, increase MAXTESTNAME(%d).\n", MAXTESTNAME);
exit(EXIT_FAILURE);
}
@@ -95,13 +96,13 @@ AddTest(const char *TheName, void (*TheCall)(void), void (*Cleanup)(void), const
}
/* Set up test function */
- HDstrcpy(Test[Index].Description, TheDescr);
+ strcpy(Test[Index].Description, TheDescr);
if (*TheName != '-') {
- HDstrcpy(Test[Index].Name, TheName);
+ strcpy(Test[Index].Name, TheName);
Test[Index].SkipFlag = 0;
}
else { /* skip test by default */
- HDstrcpy(Test[Index].Name, TheName + 1);
+ strcpy(Test[Index].Name, TheName + 1);
Test[Index].SkipFlag = 1;
}
Test[Index].Call = TheCall;
@@ -166,7 +167,7 @@ TestUsage(void)
print_func("verbose controls the amount of information displayed\n");
print_func("exclude to exclude tests by name\n");
print_func("only to name tests which should be run\n");
- print_func("begin start at the name of the test givin\n");
+ print_func("begin start at the name of the test given\n");
print_func("summary prints a summary of test results at the end\n");
print_func("cleanoff does not delete *.hdf files after execution of tests\n");
print_func("help print out this information\n");
@@ -209,11 +210,11 @@ TestInfo(const char *ProgName)
void
TestParseCmdLine(int argc, char *argv[])
{
- hbool_t skipped_all = FALSE;
- int ret_code;
+ bool skipped_all = false;
+ int ret_code;
while ((void)argv++, --argc > 0) {
- if ((HDstrcmp(*argv, "-verbose") == 0) || (HDstrcmp(*argv, "-v") == 0)) {
+ if ((strcmp(*argv, "-verbose") == 0) || (strcmp(*argv, "-v") == 0)) {
if (argc > 0) {
--argc;
++argv;
@@ -224,7 +225,7 @@ TestParseCmdLine(int argc, char *argv[])
exit(EXIT_FAILURE);
}
}
- else if (((HDstrcmp(*argv, "-exclude") == 0) || (HDstrcmp(*argv, "-x") == 0))) {
+ else if (((strcmp(*argv, "-exclude") == 0) || (strcmp(*argv, "-x") == 0))) {
if (argc > 0) {
--argc;
++argv;
@@ -235,7 +236,7 @@ TestParseCmdLine(int argc, char *argv[])
exit(EXIT_FAILURE);
}
}
- else if (((HDstrcmp(*argv, "-begin") == 0) || (HDstrcmp(*argv, "-b") == 0))) {
+ else if (((strcmp(*argv, "-begin") == 0) || (strcmp(*argv, "-b") == 0))) {
if (argc > 0) {
--argc;
++argv;
@@ -246,7 +247,7 @@ TestParseCmdLine(int argc, char *argv[])
exit(EXIT_FAILURE);
}
}
- else if (((HDstrcmp(*argv, "-only") == 0) || (HDstrcmp(*argv, "-o") == 0))) {
+ else if (((strcmp(*argv, "-only") == 0) || (strcmp(*argv, "-o") == 0))) {
if (argc > 0) {
unsigned Loop;
@@ -257,7 +258,7 @@ TestParseCmdLine(int argc, char *argv[])
if (!skipped_all) {
for (Loop = 0; Loop < Index; Loop++)
Test[Loop].SkipFlag = 1;
- skipped_all = TRUE;
+ skipped_all = true;
} /* end if */
SetTest(*argv, ONLYTEST);
}
@@ -266,15 +267,15 @@ TestParseCmdLine(int argc, char *argv[])
exit(EXIT_FAILURE);
}
}
- else if ((HDstrcmp(*argv, "-summary") == 0) || (HDstrcmp(*argv, "-s") == 0))
+ else if ((strcmp(*argv, "-summary") == 0) || (strcmp(*argv, "-s") == 0))
Summary = 1;
- else if (HDstrcmp(*argv, "-enable-error-stack") == 0)
+ else if (strcmp(*argv, "-enable-error-stack") == 0)
enable_error_stack = 1;
- else if ((HDstrcmp(*argv, "-help") == 0) || (HDstrcmp(*argv, "-h") == 0)) {
+ else if ((strcmp(*argv, "-help") == 0) || (strcmp(*argv, "-h") == 0)) {
TestUsage();
exit(EXIT_SUCCESS);
}
- else if ((HDstrcmp(*argv, "-cleanoff") == 0) || (HDstrcmp(*argv, "-c") == 0))
+ else if ((strcmp(*argv, "-cleanoff") == 0) || (strcmp(*argv, "-c") == 0))
SetTestNoCleanup();
else {
/* non-standard option. Break out. */
@@ -303,7 +304,8 @@ PerformTests(void)
MESSAGE(2, ("Skipping -- %s (%s) \n", Test[Loop].Description, Test[Loop].Name));
}
else {
- MESSAGE(2, ("Testing -- %s (%s) \n", Test[Loop].Description, Test[Loop].Name));
+ if (mpi_rank_framework_g == 0)
+ MESSAGE(2, ("Testing -- %s (%s) \n", Test[Loop].Description, Test[Loop].Name));
MESSAGE(5, ("===============================================\n"));
Test[Loop].NumErrors = num_errs;
Test_parameters = Test[Loop].Parameters;
@@ -316,12 +318,14 @@ PerformTests(void)
}
Test_parameters = NULL; /* clear it. */
- MESSAGE(2, ("\n\n"));
- if (num_errs)
- print_func("!!! %d Error(s) were detected !!!\n\n", (int)num_errs);
- else
- print_func("All tests were successful. \n\n");
+ if (mpi_rank_framework_g == 0) {
+ MESSAGE(2, ("\n\n"));
+ if (num_errs)
+ print_func("!!! %d Error(s) were detected !!!\n\n", (int)num_errs);
+ else
+ print_func("All tests were successful. \n\n");
+ }
}
/*
@@ -441,13 +445,13 @@ GetTestExpress(void)
#endif
/* Check if HDF5TestExpress is set to override the default level */
- env_val = HDgetenv("HDF5TestExpress");
+ env_val = getenv("HDF5TestExpress");
if (env_val) {
- if (HDstrcmp(env_val, "0") == 0)
+ if (strcmp(env_val, "0") == 0)
express_val = 0;
- else if (HDstrcmp(env_val, "1") == 0)
+ else if (strcmp(env_val, "1") == 0)
express_val = 1;
- else if (HDstrcmp(env_val, "2") == 0)
+ else if (strcmp(env_val, "2") == 0)
express_val = 2;
else
express_val = 3;
@@ -566,7 +570,7 @@ TestErrPrintf(const char *format, ...)
/* Print the requested information */
va_start(arglist, format);
- ret_value = HDvprintf(format, arglist);
+ ret_value = vprintf(format, arglist);
va_end(arglist);
/* Return the length of the string produced (like printf() does) */
@@ -588,14 +592,14 @@ SetTest(const char *testname, int action)
switch (action) {
case SKIPTEST:
for (Loop = 0; Loop < Index; Loop++)
- if (HDstrcmp(testname, Test[Loop].Name) == 0) {
+ if (strcmp(testname, Test[Loop].Name) == 0) {
Test[Loop].SkipFlag = 1;
break;
}
break;
case BEGINTEST:
for (Loop = 0; Loop < Index; Loop++) {
- if (HDstrcmp(testname, Test[Loop].Name) != 0)
+ if (strcmp(testname, Test[Loop].Name) != 0)
Test[Loop].SkipFlag = 1;
else {
/* Found it. Set it to run. Done. */
@@ -606,7 +610,7 @@ SetTest(const char *testname, int action)
break;
case ONLYTEST:
for (Loop = 0; Loop < Index; Loop++) {
- if (HDstrcmp(testname, Test[Loop].Name) == 0) {
+ if (strcmp(testname, Test[Loop].Name) == 0) {
/* Found it. Set it to run. Break to skip the rest. */
Test[Loop].SkipFlag = 0;
break;
@@ -629,8 +633,8 @@ void
TestAlarmOn(void)
{
#ifdef H5_HAVE_ALARM
- char *env_val = HDgetenv("HDF5_ALARM_SECONDS"); /* Alarm environment */
- unsigned long alarm_sec = H5_ALARM_SEC; /* Number of seconds before alarm goes off */
+ char *env_val = getenv("HDF5_ALARM_SECONDS"); /* Alarm environment */
+ unsigned long alarm_sec = H5_ALARM_SEC; /* Number of seconds before alarm goes off */
/* Get the alarm value from the environment variable, if set */
if (env_val != NULL)
diff --git a/test/testhdf5.c b/test/testhdf5.c
index 82bc2b6ccec..93da1d8ded5 100644
--- a/test/testhdf5.c
+++ b/test/testhdf5.c
@@ -80,7 +80,7 @@ main(int argc, char *argv[])
TestSummary();
/* Clean up test files, if allowed */
- if (GetTestCleanup() && !HDgetenv(HDF5_NOCLEANUP))
+ if (GetTestCleanup() && !getenv(HDF5_NOCLEANUP))
TestCleanup();
/* Release test infrastructure */
diff --git a/test/testhdf5.h b/test/testhdf5.h
index 1ebd619e0e8..75c94ee9b6b 100644
--- a/test/testhdf5.h
+++ b/test/testhdf5.h
@@ -135,7 +135,7 @@
"%s \n", \
(where), (int)__LINE__, __FILE__, x); \
} \
- if (HDstrcmp(x, val) != 0) { \
+ if (strcmp(x, val) != 0) { \
TestErrPrintf("*** UNEXPECTED VALUE from %s should be %s, but is %s at line %4d " \
"in %s\n", \
where, val, x, (int)__LINE__, __FILE__); \
diff --git a/test/testmeta.c b/test/testmeta.c
index 048e3a66e9f..14388f02caa 100644
--- a/test/testmeta.c
+++ b/test/testmeta.c
@@ -82,7 +82,7 @@ main(void)
for (i = 0; i < NEXTARRAYS; i++) {
/* Create dataset */
- HDsnprintf(name, sizeof(name), "/ExtArray%06d", i);
+ snprintf(name, sizeof(name), "/ExtArray%06d", i);
dataset_id =
H5Dcreate2(file_id, name, H5T_NATIVE_FLOAT, dataspace_id, H5P_DEFAULT, prop_id, H5P_DEFAULT);
@@ -107,7 +107,7 @@ main(void)
floatval = (float)j;
/* Create group to hold data arrays for this object */
- HDsnprintf(name, sizeof(name), "/DataArray/%06d", j);
+ snprintf(name, sizeof(name), "/DataArray/%06d", j);
group_id = H5Gcreate2(file_id, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (group_id < 0) {
fprintf(stderr, "Failed to create DataArray group.\n");
@@ -123,7 +123,7 @@ main(void)
dataspace_id = H5Screate_simple(1, dims, maxdims);
/* Create dataset */
- HDsnprintf(name, sizeof(name), "DataArray%06d", i);
+ snprintf(name, sizeof(name), "DataArray%06d", i);
dataset_id = H5Dcreate2(group_id, name, H5T_NATIVE_FLOAT, dataspace_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT);
if (dataset_id < 0) {
@@ -169,7 +169,7 @@ main(void)
/* Extend attribute arrays */
for (i = 0; i < NEXTARRAYS; i++) {
/* Open extendable dataset */
- HDsnprintf(name, sizeof(name), "/ExtArray%06d", i);
+ snprintf(name, sizeof(name), "/ExtArray%06d", i);
dataset_id = H5Dopen2(file_id, name, H5P_DEFAULT);
if (dataset_id < 0) {
fprintf(stderr, "Failed to open ExtArray dataset.\n");
diff --git a/test/tfile.c b/test/tfile.c
index 7eed105c4d3..d11de11f46a 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -653,12 +653,12 @@ test_file_open(const char *env_h5_drvr)
static void
test_file_reopen(void)
{
- hid_t fid = -1; /* file ID from initial open */
- hid_t rfid = -1; /* file ID from reopen */
- hid_t did = -1; /* dataset ID (both opens) */
- hid_t sid = -1; /* dataspace ID for dataset creation */
- hsize_t dims = 6; /* dataspace size */
- herr_t ret; /* Generic return value */
+ hid_t fid = H5I_INVALID_HID; /* file ID from initial open */
+ hid_t rfid = H5I_INVALID_HID; /* file ID from reopen */
+ hid_t did = H5I_INVALID_HID; /* dataset ID (both opens) */
+ hid_t sid = H5I_INVALID_HID; /* dataspace ID for dataset creation */
+ hsize_t dims = 6; /* dataspace size */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing File Re-opening\n"));
@@ -1188,14 +1188,14 @@ test_get_obj_ids(void)
/* creates NGROUPS groups under the root group */
for (m = 0; m < NGROUPS; m++) {
- HDsnprintf(gname, sizeof(gname), "group%d", m);
+ snprintf(gname, sizeof(gname), "group%d", m);
gid[m] = H5Gcreate2(fid, gname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(gid[m], FAIL, "H5Gcreate2");
}
/* create NDSETS datasets under the root group */
for (n = 0; n < NDSETS; n++) {
- HDsnprintf(dname, sizeof(dname), "dataset%d", n);
+ snprintf(dname, sizeof(dname), "dataset%d", n);
dset[n] = H5Dcreate2(fid, dname, H5T_NATIVE_INT, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(dset[n], FAIL, "H5Dcreate2");
}
@@ -1255,7 +1255,7 @@ test_get_obj_ids(void)
/* Open NDSETS datasets under the root group */
for (n = 0; n < NDSETS; n++) {
- HDsnprintf(dname, sizeof(dname), "dataset%d", n);
+ snprintf(dname, sizeof(dname), "dataset%d", n);
dset[n] = H5Dopen2(fid, dname, H5P_DEFAULT);
CHECK(dset[n], FAIL, "H5Dcreate2");
}
@@ -1730,7 +1730,7 @@ test_file_is_accessible(const char *env_h5_drvr)
unsigned char buf[1024]; /* Buffer of data to write */
htri_t is_hdf5; /* Whether a file is an HDF5 file */
int posix_ret; /* Return value from POSIX calls */
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
herr_t ret; /* Return value from HDF5 calls */
/* Output message about test being performed */
@@ -1765,7 +1765,7 @@ test_file_is_accessible(const char *env_h5_drvr)
/* Verify that the file is an HDF5 file */
is_hdf5 = H5Fis_accessible(filename, fapl_id);
- VERIFY(is_hdf5, TRUE, "H5Fis_accessible");
+ VERIFY(is_hdf5, true, "H5Fis_accessible");
/*****************************************/
/* Newly created file that is still open */
@@ -1784,7 +1784,7 @@ test_file_is_accessible(const char *env_h5_drvr)
/* Verify that the file is an HDF5 file */
is_hdf5 = H5Fis_accessible(filename, fapl_id);
- VERIFY(is_hdf5, TRUE, "H5Fis_accessible");
+ VERIFY(is_hdf5, true, "H5Fis_accessible");
/* Close file */
ret = H5Fclose(fid);
@@ -1797,7 +1797,7 @@ test_file_is_accessible(const char *env_h5_drvr)
/* This test is not currently working for the family VFD.
* There are failures when creating files with userblocks.
*/
- if (0 != HDstrcmp(env_h5_drvr, "family")) {
+ if (0 != strcmp(env_h5_drvr, "family")) {
/* Create a file creation property list with a non-default user block size */
fcpl_id = H5Pcreate(H5P_FILE_CREATE);
CHECK(fcpl_id, H5I_INVALID_HID, "H5Pcreate");
@@ -1819,7 +1819,7 @@ test_file_is_accessible(const char *env_h5_drvr)
/* Verify that the file is an HDF5 file */
is_hdf5 = H5Fis_accessible(filename, fapl_id);
- VERIFY(is_hdf5, TRUE, "H5Fis_accessible");
+ VERIFY(is_hdf5, true, "H5Fis_accessible");
} /* end if */
if (driver_is_default_compatible) {
@@ -1837,7 +1837,7 @@ test_file_is_accessible(const char *env_h5_drvr)
/* Verify that the file is NOT an HDF5 file using the base filename */
is_hdf5 = H5Fis_accessible(non_hdf5_filename, fapl_id);
- VERIFY(is_hdf5, FALSE, "H5Fis_accessible (empty non-HDF5 file)");
+ VERIFY(is_hdf5, false, "H5Fis_accessible (empty non-HDF5 file)");
/***************************/
/* Non-empty non-HDF5 file */
@@ -1861,7 +1861,7 @@ test_file_is_accessible(const char *env_h5_drvr)
/* Verify that the file is not an HDF5 file */
is_hdf5 = H5Fis_accessible(non_hdf5_filename, fapl_id);
- VERIFY(is_hdf5, FALSE, "H5Fis_accessible (non-HDF5 file)");
+ VERIFY(is_hdf5, false, "H5Fis_accessible (non-HDF5 file)");
}
/* Clean up files */
@@ -1930,7 +1930,7 @@ test_file_ishdf5(const char *env_h5_drvr)
/* Verify that the file is an HDF5 file */
is_hdf5 = H5Fis_hdf5(sb_filename);
- VERIFY(is_hdf5, TRUE, "H5Fis_hdf5");
+ VERIFY(is_hdf5, true, "H5Fis_hdf5");
/*******************************/
/* Non-default user block size */
@@ -1957,7 +1957,7 @@ test_file_ishdf5(const char *env_h5_drvr)
/* Verify that the file is an HDF5 file */
is_hdf5 = H5Fis_hdf5(sb_filename);
- VERIFY(is_hdf5, TRUE, "H5Fis_hdf5");
+ VERIFY(is_hdf5, true, "H5Fis_hdf5");
/***************************/
/* Non-empty non-HDF5 file */
@@ -1984,7 +1984,7 @@ test_file_ishdf5(const char *env_h5_drvr)
/* Verify that the file is not an HDF5 file */
is_hdf5 = H5Fis_hdf5(sb_filename);
- VERIFY(is_hdf5, FALSE, "H5Fis_hdf5");
+ VERIFY(is_hdf5, false, "H5Fis_hdf5");
/* Clean up files */
h5_delete_test_file(filename, fapl_id);
@@ -2033,7 +2033,7 @@ test_file_delete(hid_t fapl_id)
/* Verify that the file is an HDF5 file */
is_hdf5 = H5Fis_accessible(filename, fapl_id);
- VERIFY(is_hdf5, TRUE, "H5Fis_accessible");
+ VERIFY(is_hdf5, true, "H5Fis_accessible");
/* Delete the file */
ret = H5Fdelete(filename, fapl_id);
@@ -2077,7 +2077,7 @@ test_file_delete(hid_t fapl_id)
is_hdf5 = H5Fis_accessible(filename, fapl_id);
}
H5E_END_TRY
- CHECK(is_hdf5, TRUE, "H5Fis_accessible");
+ CHECK(is_hdf5, true, "H5Fis_accessible");
/* Try to delete it (should fail) */
H5E_BEGIN_TRY
@@ -2590,19 +2590,19 @@ test_file_double_dataset_open(void)
**
*****************************************************************/
static void
-test_file_double_file_dataset_open(hbool_t new_format)
+test_file_double_file_dataset_open(bool new_format)
{
- hid_t fapl = -1; /* File access property list */
- hid_t dcpl = -1; /* Dataset creation property list */
- hid_t fid1 = -1, fid2 = -1; /* File IDs */
- hid_t did1 = -1, did2 = -1; /* Dataset IDs */
- hid_t sid1 = -1, sid2 = -1; /* Dataspace IDs */
- hid_t tid1 = -1, tid2 = -1; /* Datatype IDs */
- hsize_t dims[1] = {5}, dims2[2] = {1, 4}; /* Dimension sizes */
- hsize_t e_ext_dims[1] = {7}; /* Expanded dimension sizes */
- hsize_t s_ext_dims[1] = {3}; /* Shrunk dimension sizes */
- hsize_t max_dims0[1] = {8}; /* Maximum dimension sizes */
- hsize_t max_dims1[1] = {H5S_UNLIMITED}; /* Maximum dimension sizes for extensible array index */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File IDs */
+ hid_t did1 = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t sid1 = H5I_INVALID_HID, sid2 = H5I_INVALID_HID; /* Dataspace IDs */
+ hid_t tid1 = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
+ hsize_t dims[1] = {5}, dims2[2] = {1, 4}; /* Dimension sizes */
+ hsize_t e_ext_dims[1] = {7}; /* Expanded dimension sizes */
+ hsize_t s_ext_dims[1] = {3}; /* Shrunk dimension sizes */
+ hsize_t max_dims0[1] = {8}; /* Maximum dimension sizes */
+ hsize_t max_dims1[1] = {H5S_UNLIMITED}; /* Maximum dimension sizes for extensible array index */
hsize_t max_dims2[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; /* Maximum dimension sizes for v2 B-tree index */
hsize_t chunks[1] = {2}, chunks2[2] = {4, 5}; /* Chunk dimension sizes */
hsize_t size; /* File size */
@@ -3005,8 +3005,8 @@ test_userblock_file_size(const char *env_h5_drvr)
herr_t ret; /* Generic return value */
/* Don't run with multi/split, family or direct drivers */
- if (!HDstrcmp(env_h5_drvr, "multi") || !HDstrcmp(env_h5_drvr, "split") ||
- !HDstrcmp(env_h5_drvr, "family") || !HDstrcmp(env_h5_drvr, "direct"))
+ if (!strcmp(env_h5_drvr, "multi") || !strcmp(env_h5_drvr, "split") || !strcmp(env_h5_drvr, "family") ||
+ !strcmp(env_h5_drvr, "direct"))
return;
/* Output message about test being performed */
@@ -3187,7 +3187,7 @@ cal_chksum(const char *file, uint32_t *chksum)
if (file_data) {
/* Read file's data into memory */
bytes_read = HDread(fdes, file_data, (size_t)sb.st_size);
- CHECK(bytes_read == sb.st_size, FALSE, "malloc");
+ CHECK(bytes_read == sb.st_size, false, "malloc");
/* Calculate checksum */
*chksum = H5_checksum_lookup3(file_data, sizeof(file_data), 0);
@@ -3318,7 +3318,7 @@ test_userblock_alignment_helper1(hid_t fcpl, hid_t fapl)
**
*****************************************************************/
static int
-test_userblock_alignment_helper2(hid_t fapl, hbool_t open_rw)
+test_userblock_alignment_helper2(hid_t fapl, bool open_rw)
{
hid_t fid; /* File ID */
int curr_num_errs = GetTestNumErrs(); /* Retrieve the current # of errors */
@@ -3418,7 +3418,7 @@ test_userblock_alignment(const char *env_h5_drvr)
/* Call helper routines to perform file manipulations */
ret = test_userblock_alignment_helper1(fcpl, fapl);
CHECK(ret, FAIL, "test_userblock_alignment_helper1");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -3448,7 +3448,7 @@ test_userblock_alignment(const char *env_h5_drvr)
/* Call helper routines to perform file manipulations */
ret = test_userblock_alignment_helper1(fcpl, fapl);
CHECK(ret, FAIL, "test_userblock_alignment_helper1");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -3478,7 +3478,7 @@ test_userblock_alignment(const char *env_h5_drvr)
/* Call helper routines to perform file manipulations */
ret = test_userblock_alignment_helper1(fcpl, fapl);
CHECK(ret, FAIL, "test_userblock_alignment_helper1");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -3582,9 +3582,9 @@ test_userblock_alignment(const char *env_h5_drvr)
CHECK(ret, FAIL, "H5Pset_alignment");
/* Call helper routines to perform file manipulations */
- ret = test_userblock_alignment_helper2(fapl, FALSE);
+ ret = test_userblock_alignment_helper2(fapl, false);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -3642,13 +3642,13 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
ret = H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST);
CHECK(ret, FAIL, "H5Pset_libver_bounds");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
/* Call helper routines to perform file manipulations */
ret = test_userblock_alignment_helper1(fcpl, fapl);
CHECK(ret, FAIL, "test_userblock_alignment_helper1");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -3672,7 +3672,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
ret = H5Pset_userblock(fcpl, (hsize_t)1024);
CHECK(ret, FAIL, "H5Pset_userblock");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)1);
ret = H5Pset_file_space_page_size(fcpl, (hsize_t)512);
/* Create file access property list */
@@ -3684,7 +3684,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
/* Call helper routines to perform file manipulations */
ret = test_userblock_alignment_helper1(fcpl, fapl);
CHECK(ret, FAIL, "test_userblock_alignment_helper1");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -3746,7 +3746,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
ret = H5Pset_userblock(fcpl, (hsize_t)512);
CHECK(ret, FAIL, "H5Pset_userblock");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, true, (hsize_t)1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
ret = H5Pset_file_space_page_size(fcpl, (hsize_t)512);
CHECK(ret, FAIL, "H5Pset_file_space_page_size");
@@ -3760,7 +3760,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
/* Call helper routines to perform file manipulations */
ret = test_userblock_alignment_helper1(fcpl, fapl);
CHECK(ret, FAIL, "test_userblock_alignment_helper1");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -3784,7 +3784,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
ret = H5Pset_userblock(fcpl, (hsize_t)512);
CHECK(ret, FAIL, "H5Pset_userblock");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_NONE, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_NONE, false, (hsize_t)1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
ret = H5Pset_file_space_page_size(fcpl, (hsize_t)512);
CHECK(ret, FAIL, "H5Pset_file_space_page_size");
@@ -3824,7 +3824,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
ret = H5Pset_userblock(fcpl, (hsize_t)1024);
CHECK(ret, FAIL, "H5Pset_userblock");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, true, (hsize_t)1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
ret = H5Pset_file_space_page_size(fcpl, (hsize_t)1023);
CHECK(ret, FAIL, "H5Pset_file_space_page_size");
@@ -3864,7 +3864,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
ret = H5Pset_userblock(fcpl, (hsize_t)1024);
CHECK(ret, FAIL, "H5Pset_userblock");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, false, (hsize_t)1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
ret = H5Pset_file_space_page_size(fcpl, (hsize_t)1023);
CHECK(ret, FAIL, "H5Pset_file_space_page_size");
@@ -3878,7 +3878,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
/* Call helper routines to perform file manipulations */
ret = test_userblock_alignment_helper1(fcpl, fapl);
CHECK(ret, FAIL, "test_userblock_alignment_helper1");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -3902,7 +3902,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
ret = H5Pset_userblock(fcpl, (hsize_t)512);
CHECK(ret, FAIL, "H5Pset_userblock");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
ret = H5Pset_file_space_page_size(fcpl, (hsize_t)1024);
CHECK(ret, FAIL, "H5Pset_file_space_page_size");
@@ -3942,7 +3942,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
ret = H5Pset_userblock(fcpl, (hsize_t)512);
CHECK(ret, FAIL, "H5Pset_userblock");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_NONE, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_NONE, false, (hsize_t)1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
ret = H5Pset_file_space_page_size(fcpl, (hsize_t)1024);
CHECK(ret, FAIL, "H5Pset_file_space_page_size");
@@ -3956,7 +3956,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
/* Call helper routines to perform file manipulations */
ret = test_userblock_alignment_helper1(fcpl, fapl);
CHECK(ret, FAIL, "test_userblock_alignment_helper1");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -3982,7 +3982,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
ret = H5Pset_userblock(fcpl, (hsize_t)512);
CHECK(ret, FAIL, "H5Pset_userblock");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
ret = H5Pset_file_space_page_size(fcpl, (hsize_t)512);
CHECK(ret, FAIL, "H5Pset_file_space_page_size");
@@ -4002,9 +4002,9 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
CHECK(ret, FAIL, "H5Pset_alignment");
/* Call helper routines to perform file manipulations */
- ret = test_userblock_alignment_helper2(fapl, FALSE);
+ ret = test_userblock_alignment_helper2(fapl, false);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -4034,7 +4034,7 @@ test_filespace_info(const char *env_h5_drvr)
hid_t fapl, new_fapl; /* File access property lists */
hid_t fcpl, fcpl1, fcpl2; /* File creation property lists */
H5F_fspace_strategy_t strategy; /* File space strategy */
- hbool_t persist; /* Persist free-space or not */
+ bool persist; /* Persist free-space or not */
hsize_t threshold; /* Free-space section threshold */
unsigned new_format; /* New or old format */
H5F_fspace_strategy_t fs_strategy; /* File space strategy--iteration variable */
@@ -4042,14 +4042,14 @@ test_filespace_info(const char *env_h5_drvr)
hsize_t fs_threshold; /* Free-space section threshold--iteration variable */
hsize_t fsp_size; /* File space page size */
char filename[FILENAME_LEN]; /* Filename to use */
- hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
+ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */
herr_t ret; /* Return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing file creation public routines: H5Pget/set_file_space_strategy & "
"H5Pget/set_file_space_page_size\n"));
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
fapl = h5_fileaccess();
h5_fixname(FILESPACE_NAME[0], fapl, filename, sizeof filename);
@@ -4067,7 +4067,7 @@ test_filespace_info(const char *env_h5_drvr)
* Check file space information from a default file creation property list.
* Values expected:
* strategy--H5F_FILE_SPACE_AGGR
- * persist--FALSE
+ * persist--false
* threshold--1
* file space page size--4096
*/
@@ -4081,7 +4081,7 @@ test_filespace_info(const char *env_h5_drvr)
/* Verify file space information */
VERIFY(strategy, H5F_FSPACE_STRATEGY_FSM_AGGR, "H5Pget_file_space_strategy");
- VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
+ VERIFY(persist, false, "H5Pget_file_space_strategy");
VERIFY(threshold, 1, "H5Pget_file_space_strategy");
/* Retrieve file space page size */
@@ -4152,7 +4152,7 @@ test_filespace_info(const char *env_h5_drvr)
* Check file space information when creating a file with default properties.
* Values expected:
* strategy--H5F_FILE_SPACE_AGGR
- * persist--FALSE
+ * persist--false
* threshold--1
* file space page size--4096
*/
@@ -4170,7 +4170,7 @@ test_filespace_info(const char *env_h5_drvr)
/* Verify file space information */
VERIFY(strategy, H5F_FSPACE_STRATEGY_FSM_AGGR, "H5Pget_file_space_strategy");
- VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
+ VERIFY(persist, false, "H5Pget_file_space_strategy");
VERIFY(threshold, 1, "H5Pget_file_space_strategy");
/* Retrieve file space page size */
@@ -4190,7 +4190,7 @@ test_filespace_info(const char *env_h5_drvr)
* latest library format and default properties.
* Values expected:
* strategy--H5F_FILE_SPACE_AGGR
- * persist--FALSE
+ * persist--false
* threshold--1
* file space page size--4096
*/
@@ -4208,7 +4208,7 @@ test_filespace_info(const char *env_h5_drvr)
/* Verify file space information */
VERIFY(strategy, H5F_FSPACE_STRATEGY_FSM_AGGR, "H5Pget_file_space_strategy");
- VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
+ VERIFY(persist, false, "H5Pget_file_space_strategy");
VERIFY(threshold, 1, "H5Pget_file_space_strategy");
/* Retrieve file space page size */
@@ -4235,7 +4235,7 @@ test_filespace_info(const char *env_h5_drvr)
* File space page size: set to 512
*
*/
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
hid_t my_fapl;
/* Set the FAPL for the type of format */
@@ -4248,8 +4248,8 @@ test_filespace_info(const char *env_h5_drvr)
my_fapl = fapl;
} /* end else */
- /* Test with TRUE or FALSE for persisting free-space */
- for (fs_persist = FALSE; fs_persist <= TRUE; fs_persist++) {
+ /* Test with true or false for persisting free-space */
+ for (fs_persist = false; fs_persist <= true; fs_persist++) {
/* Test with free-space section threshold size: 0 to 10 */
for (fs_threshold = 0; fs_threshold <= TEST_THRESHOLD10; fs_threshold++) {
@@ -4266,7 +4266,7 @@ test_filespace_info(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
/* Set file space information */
- ret = H5Pset_file_space_strategy(fcpl, fs_strategy, (hbool_t)fs_persist, fs_threshold);
+ ret = H5Pset_file_space_strategy(fcpl, fs_strategy, (bool)fs_persist, fs_threshold);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
ret = H5Pset_file_space_page_size(fcpl, FSP_SIZE512);
@@ -4280,11 +4280,11 @@ test_filespace_info(const char *env_h5_drvr)
VERIFY(strategy, fs_strategy, "H5Pget_file_space_strategy");
if (fs_strategy < H5F_FSPACE_STRATEGY_AGGR) {
- VERIFY(persist, (hbool_t)fs_persist, "H5Pget_file_space_strategy");
+ VERIFY(persist, (bool)fs_persist, "H5Pget_file_space_strategy");
VERIFY(threshold, fs_threshold, "H5Pget_file_space_strategy");
}
else {
- VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
+ VERIFY(persist, false, "H5Pget_file_space_strategy");
VERIFY(threshold, 1, "H5Pget_file_space_strategy");
}
@@ -4313,7 +4313,7 @@ test_filespace_info(const char *env_h5_drvr)
VERIFY(threshold, fs_threshold, "H5Pget_file_space_strategy");
}
else {
- VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
+ VERIFY(persist, false, "H5Pget_file_space_strategy");
VERIFY(threshold, 1, "H5Pget_file_space_strategy");
}
@@ -4345,7 +4345,7 @@ test_filespace_info(const char *env_h5_drvr)
VERIFY(threshold, fs_threshold, "H5Pget_file_space_strategy");
}
else {
- VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
+ VERIFY(persist, false, "H5Pget_file_space_strategy");
VERIFY(threshold, 1, "H5Pget_file_space_strategy");
}
@@ -4384,13 +4384,13 @@ test_filespace_info(const char *env_h5_drvr)
**
*****************************************************************/
static int
-set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t split)
+set_multi_split(hid_t fapl, hsize_t pagesize, bool split)
{
H5FD_mem_t memb_map[H5FD_MEM_NTYPES];
hid_t memb_fapl_arr[H5FD_MEM_NTYPES];
char *memb_name[H5FD_MEM_NTYPES];
haddr_t memb_addr[H5FD_MEM_NTYPES];
- hbool_t relax;
+ bool relax;
H5FD_mem_t mt;
assert(split);
@@ -4453,13 +4453,13 @@ test_file_freespace(const char *env_h5_drvr)
char filename[FILENAME_LEN]; /* Filename to use */
char name[32]; /* Dataset name */
unsigned new_format; /* To use old or new format */
- hbool_t split_vfd, multi_vfd; /* Indicate multi/split driver */
+ bool split_vfd, multi_vfd; /* Indicate multi/split driver */
hsize_t expected_freespace; /* Freespace expected */
hsize_t expected_fs_del; /* Freespace expected after delete */
herr_t ret; /* Return value */
- split_vfd = !HDstrcmp(env_h5_drvr, "split");
- multi_vfd = !HDstrcmp(env_h5_drvr, "multi");
+ split_vfd = !strcmp(env_h5_drvr, "split");
+ multi_vfd = !strcmp(env_h5_drvr, "multi");
if (!split_vfd && !multi_vfd) {
fapl = h5_fileaccess();
@@ -4476,7 +4476,7 @@ test_file_freespace(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
/* Test with old & new format */
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
hid_t my_fapl;
/* Set the FAPL for the type of format */
@@ -4490,7 +4490,7 @@ test_file_freespace(const char *env_h5_drvr)
CHECK(ret, FAIL, "set_multi_split");
}
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)1);
CHECK(ret, FAIL, "H5P_set_file_space_strategy");
expected_freespace = 4534;
@@ -4546,7 +4546,7 @@ test_file_freespace(const char *env_h5_drvr)
/* Create datasets in file */
for (u = 0; u < 10; u++) {
- HDsnprintf(name, sizeof(name), "Dataset %u", u);
+ snprintf(name, sizeof(name), "Dataset %u", u);
dset = H5Dcreate2(file, name, H5T_STD_U32LE, dspace, H5P_DEFAULT, dcpl, H5P_DEFAULT);
CHECK(dset, FAIL, "H5Dcreate2");
@@ -4569,7 +4569,7 @@ test_file_freespace(const char *env_h5_drvr)
/* Delete datasets in file */
for (k = 9; k >= 0; k--) {
- HDsnprintf(name, sizeof(name), "Dataset %u", (unsigned)k);
+ snprintf(name, sizeof(name), "Dataset %u", (unsigned)k);
ret = H5Ldelete(file, name, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Ldelete");
} /* end for */
@@ -4604,7 +4604,7 @@ test_file_freespace(const char *env_h5_drvr)
**
*****************************************************************/
static void
-test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
+test_sects_freespace(const char *env_h5_drvr, bool new_format)
{
char filename[FILENAME_LEN]; /* Filename to use */
hid_t file; /* File ID */
@@ -4628,14 +4628,14 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
hsize_t dims[1]; /* Dimension sizes */
unsigned u; /* Local index variable */
H5FD_mem_t type;
- hbool_t split_vfd = FALSE, multi_vfd = FALSE;
+ bool split_vfd = false, multi_vfd = false;
herr_t ret; /* Return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing H5Fget_free_sections()--free-space section info in the file\n"));
- split_vfd = !HDstrcmp(env_h5_drvr, "split");
- multi_vfd = !HDstrcmp(env_h5_drvr, "multi");
+ split_vfd = !strcmp(env_h5_drvr, "split");
+ multi_vfd = !strcmp(env_h5_drvr, "multi");
if (!split_vfd && !multi_vfd) {
@@ -4651,7 +4651,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
CHECK(ret, FAIL, "H5Pset_libver_bounds");
/* Set to paged aggregation and persistent free-space */
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, true, (hsize_t)1);
CHECK(ret, FAIL, "H5Pget_file_space_strategy");
/* Set up paged aligned address space for multi/split driver */
@@ -4661,7 +4661,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
}
}
else {
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, true, (hsize_t)1);
CHECK(ret, FAIL, "H5Pget_file_space_strategy");
}
@@ -4697,7 +4697,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
/* Create datasets in file */
for (u = 0; u < 10; u++) {
- HDsnprintf(name, sizeof(name), "Dataset %u", u);
+ snprintf(name, sizeof(name), "Dataset %u", u);
dset = H5Dcreate2(file, name, H5T_STD_U32LE, dspace, H5P_DEFAULT, dcpl, H5P_DEFAULT);
CHECK(dset, FAIL, "H5Dcreate2");
@@ -4715,7 +4715,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
/* Delete odd-numbered datasets in file */
for (u = 0; u < 10; u++) {
- HDsnprintf(name, sizeof(name), "Dataset %u", u);
+ snprintf(name, sizeof(name), "Dataset %u", u);
if (u % 2) {
ret = H5Ldelete(file, name, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Ldelete");
@@ -4857,8 +4857,8 @@ static void
test_filespace_compatible(void)
{
int fd_old = (-1), fd_new = (-1); /* File descriptors for copying data */
- hid_t fid = -1; /* File id */
- hid_t did = -1; /* Dataset id */
+ hid_t fid = H5I_INVALID_HID; /* File id */
+ hid_t did = H5I_INVALID_HID; /* Dataset id */
hid_t fcpl; /* File creation property list template */
int check[100]; /* Temporary buffer for verifying dataset data */
int rdbuf[100]; /* Temporary buffer for reading in dataset data */
@@ -4866,7 +4866,7 @@ test_filespace_compatible(void)
ssize_t nread; /* Number of bytes read in */
unsigned i, j; /* Local index variable */
hssize_t free_space; /* Amount of free-space in the file */
- hbool_t persist; /* Persist free-space or not */
+ bool persist; /* Persist free-space or not */
hsize_t threshold; /* Free-space section threshold */
H5F_fspace_strategy_t strategy; /* File space handling strategy */
herr_t ret; /* Return value */
@@ -4913,10 +4913,10 @@ test_filespace_compatible(void)
CHECK(ret, FAIL, "H5Pget_file_space_strategy");
/* File space handling strategy should be H5F_FSPACE_STRATEGY_FSM_AGGR */
- /* Persisting free-space should be FALSE */
+ /* Persisting free-space should be false */
/* Free-space section threshold should be 1 */
VERIFY(strategy, H5F_FSPACE_STRATEGY_FSM_AGGR, "H5Pget_file_space_strategy");
- VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
+ VERIFY(persist, false, "H5Pget_file_space_strategy");
VERIFY(threshold, 1, "H5Pget_file_space_strategy");
/* Generate raw data */
@@ -4988,17 +4988,17 @@ test_filespace_compatible(void)
static void
test_filespace_1_10_0_compatible(void)
{
- hid_t fid = -1; /* File id */
- hid_t did = -1; /* Dataset id */
- hid_t fcpl; /* File creation property list */
- hbool_t persist; /* Persist free-space or not */
- hsize_t threshold; /* Free-space section threshold */
- H5F_fspace_strategy_t strategy; /* File space handling strategy */
- int wbuf[24]; /* Buffer for dataset data */
- int rdbuf[24]; /* Buffer for dataset data */
- int status; /* Status from copying the existing file */
- unsigned i, j; /* Local index variable */
- herr_t ret; /* Return value */
+ hid_t fid = H5I_INVALID_HID; /* File id */
+ hid_t did = H5I_INVALID_HID; /* Dataset id */
+ hid_t fcpl; /* File creation property list */
+ bool persist; /* Persist free-space or not */
+ hsize_t threshold; /* Free-space section threshold */
+ H5F_fspace_strategy_t strategy; /* File space handling strategy */
+ int wbuf[24]; /* Buffer for dataset data */
+ int rdbuf[24]; /* Buffer for dataset data */
+ int status; /* Status from copying the existing file */
+ unsigned i, j; /* Local index variable */
+ herr_t ret; /* Return value */
/* Output message about test being performed */
MESSAGE(5, ("File space compatibility testing for 1.10.0 files\n"));
@@ -5044,7 +5044,7 @@ test_filespace_1_10_0_compatible(void)
case 1:
VERIFY(strategy, H5F_FSPACE_STRATEGY_FSM_AGGR, "H5Pget_file_space_strategy");
- VERIFY(persist, TRUE, "H5Pget_file_space_strategy");
+ VERIFY(persist, true, "H5Pget_file_space_strategy");
VERIFY(threshold, H5F_FREE_SPACE_THRESHOLD_DEF, "H5Pget_file_space_strategy");
/* Open the dataset */
@@ -5302,15 +5302,15 @@ test_filespace_1_10_0_compatible(void)
static void
test_filespace_round_compatible(void)
{
- hid_t fid = -1; /* File id */
- hid_t fcpl = -1; /* File creation property list ID */
- unsigned j; /* Local index variable */
- H5F_fspace_strategy_t strategy; /* File space strategy */
- hbool_t persist; /* Persist free-space or not */
- hsize_t threshold; /* Free-space section threshold */
- hssize_t free_space; /* Amount of free space in the file */
- int status; /* Status from copying the existing file */
- herr_t ret; /* Return value */
+ hid_t fid = H5I_INVALID_HID; /* File id */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list ID */
+ unsigned j; /* Local index variable */
+ H5F_fspace_strategy_t strategy; /* File space strategy */
+ bool persist; /* Persist free-space or not */
+ hsize_t threshold; /* Free-space section threshold */
+ hssize_t free_space; /* Amount of free space in the file */
+ int status; /* Status from copying the existing file */
+ herr_t ret; /* Return value */
/* Output message about test being performed */
MESSAGE(5, ("File space compatibility testing for files from trunk to 1_8 to trunk\n"));
@@ -5331,7 +5331,7 @@ test_filespace_round_compatible(void)
ret = H5Pget_file_space_strategy(fcpl, &strategy, &persist, &threshold);
CHECK(ret, FAIL, "H5Pget_file_space_strategy");
VERIFY(strategy, H5F_FSPACE_STRATEGY_FSM_AGGR, "H5Pget_file_space_strategy");
- VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
+ VERIFY(persist, false, "H5Pget_file_space_strategy");
VERIFY(threshold, 1, "H5Pget_file_space_strategy");
/* There should not be any free space in the file */
@@ -5467,12 +5467,12 @@ test_libver_bounds_real(H5F_libver_t libver_create, unsigned oh_vers_create, H5F
static void
test_libver_bounds_open(void)
{
- hid_t file = -1; /* File ID */
- hid_t space = -1; /* Dataspace ID */
- hid_t dset = -1; /* Dataset ID */
- hid_t fapl = -1; /* File access property list ID */
- hid_t new_fapl = -1; /* File access property list ID for reopened file */
- hid_t dcpl = -1; /* Dataset creation property list ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t space = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t dset = H5I_INVALID_HID; /* Dataset ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list ID */
+ hid_t new_fapl = H5I_INVALID_HID; /* File access property list ID for reopened file */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
hsize_t dim[1] = {SPACE1_DIM1}; /* Dataset dimensions */
H5F_libver_t low, high; /* File format bounds */
hsize_t chunk_dim[1] = {SPACE1_DIM1}; /* Chunk dimensions */
@@ -5563,7 +5563,7 @@ test_libver_bounds_open(void)
/* Get new low bound and verify that it has been upgraded properly */
ret = H5Pget_libver_bounds(new_fapl, &new_low, NULL);
CHECK(ret, FAIL, "H5Pget_libver_bounds");
- VERIFY(new_low >= H5F_LIBVER_V110, TRUE, "Low bound should be upgraded to at least H5F_LIBVER_V110");
+ VERIFY(new_low >= H5F_LIBVER_V110, true, "Low bound should be upgraded to at least H5F_LIBVER_V110");
ret = H5Pclose(new_fapl);
CHECK(ret, FAIL, "H5Pclose");
@@ -5604,12 +5604,12 @@ test_libver_bounds_open(void)
static void
test_libver_bounds_copy(void)
{
- hid_t src_fid = -1; /* File ID */
- hid_t dst_fid = -1; /* File ID */
- hid_t fapl = -1; /* File access property list ID */
- const char *src_fname; /* Source file name */
- herr_t ret; /* Generic return value */
- hbool_t driver_is_default_compatible;
+ hid_t src_fid = H5I_INVALID_HID; /* File ID */
+ hid_t dst_fid = H5I_INVALID_HID; /* File ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list ID */
+ const char *src_fname; /* Source file name */
+ herr_t ret; /* Generic return value */
+ bool driver_is_default_compatible;
/* Output message about the test being performed */
MESSAGE(5, ("Testing H5Ocopy a dataset in a 1.8 library file to a 1.10 library file\n"));
@@ -5795,14 +5795,14 @@ test_libver_bounds_super(hid_t fapl, const char *env_h5_drvr)
/* Verify superblock version when creating a file with input fapl,
fcpl #A and with/without SWMR access */
if (H5FD__supports_swmr_test(env_h5_drvr))
- test_libver_bounds_super_create(fapl, fcpl, TRUE, FALSE);
- test_libver_bounds_super_create(fapl, fcpl, FALSE, FALSE);
+ test_libver_bounds_super_create(fapl, fcpl, true, false);
+ test_libver_bounds_super_create(fapl, fcpl, false, false);
/* Verify superblock version when opening a file which is created
with input fapl, fcpl #A and with/without SWMR access */
if (H5FD__supports_swmr_test(env_h5_drvr))
- test_libver_bounds_super_open(fapl, fcpl, TRUE, FALSE);
- test_libver_bounds_super_open(fapl, fcpl, FALSE, FALSE);
+ test_libver_bounds_super_open(fapl, fcpl, true, false);
+ test_libver_bounds_super_open(fapl, fcpl, false, false);
/* Close the fcpl */
ret = H5Pclose(fcpl);
@@ -5818,14 +5818,14 @@ test_libver_bounds_super(hid_t fapl, const char *env_h5_drvr)
/* Verify superblock version when creating a file with input fapl,
fcpl #B and with/without SWMR access */
if (H5FD__supports_swmr_test(env_h5_drvr))
- test_libver_bounds_super_create(fapl, fcpl, TRUE, FALSE);
- test_libver_bounds_super_create(fapl, fcpl, FALSE, FALSE);
+ test_libver_bounds_super_create(fapl, fcpl, true, false);
+ test_libver_bounds_super_create(fapl, fcpl, false, false);
/* Verify superblock version when opening a file which is created
with input fapl, fcpl #B and with/without SWMR access */
if (H5FD__supports_swmr_test(env_h5_drvr))
- test_libver_bounds_super_open(fapl, fcpl, TRUE, FALSE);
- test_libver_bounds_super_open(fapl, fcpl, FALSE, FALSE);
+ test_libver_bounds_super_open(fapl, fcpl, true, false);
+ test_libver_bounds_super_open(fapl, fcpl, false, false);
/* Close the fcpl */
ret = H5Pclose(fcpl);
@@ -5843,14 +5843,14 @@ test_libver_bounds_super(hid_t fapl, const char *env_h5_drvr)
/* Verify superblock version when creating a file with input fapl,
fcpl #C and with/without SWMR access */
if (H5FD__supports_swmr_test(env_h5_drvr))
- test_libver_bounds_super_create(fapl, fcpl, TRUE, FALSE);
- test_libver_bounds_super_create(fapl, fcpl, FALSE, FALSE);
+ test_libver_bounds_super_create(fapl, fcpl, true, false);
+ test_libver_bounds_super_create(fapl, fcpl, false, false);
/* Verify superblock version when opening a file which is created
with input fapl, fcpl #C and with/without SWMR access */
if (H5FD__supports_swmr_test(env_h5_drvr))
- test_libver_bounds_super_open(fapl, fcpl, TRUE, FALSE);
- test_libver_bounds_super_open(fapl, fcpl, FALSE, FALSE);
+ test_libver_bounds_super_open(fapl, fcpl, true, false);
+ test_libver_bounds_super_open(fapl, fcpl, false, false);
/* Close the fcpl */
ret = H5Pclose(fcpl);
@@ -5867,14 +5867,14 @@ test_libver_bounds_super(hid_t fapl, const char *env_h5_drvr)
/* Verify superblock version when creating a file with input fapl,
fcpl #D and with/without SWMR access */
if (H5FD__supports_swmr_test(env_h5_drvr))
- test_libver_bounds_super_create(fapl, fcpl, TRUE, TRUE);
- test_libver_bounds_super_create(fapl, fcpl, FALSE, TRUE);
+ test_libver_bounds_super_create(fapl, fcpl, true, true);
+ test_libver_bounds_super_create(fapl, fcpl, false, true);
/* Verify superblock version when opening a file which is created
with input fapl, fcpl #D and with/without SWMR access */
if (H5FD__supports_swmr_test(env_h5_drvr))
- test_libver_bounds_super_open(fapl, fcpl, TRUE, TRUE);
- test_libver_bounds_super_open(fapl, fcpl, FALSE, TRUE);
+ test_libver_bounds_super_open(fapl, fcpl, true, true);
+ test_libver_bounds_super_open(fapl, fcpl, false, true);
/* Close the fcpl */
ret = H5Pclose(fcpl);
@@ -5938,7 +5938,7 @@ test_libver_bounds_super_create(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t n
hid_t fid = H5I_INVALID_HID; /* File ID */
H5F_t *f = NULL; /* Internal file pointer */
H5F_libver_t low, high; /* Low and high bounds */
- hbool_t ok; /* The result is ok or not */
+ bool ok; /* The result is ok or not */
herr_t ret; /* The return value */
/* Try to create the file */
@@ -5963,15 +5963,15 @@ test_libver_bounds_super_create(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t n
else if (is_swmr) { /* SWMR is enabled */
if (high >= H5F_LIBVER_V110) { /* Should succeed */
- VERIFY(fid >= 0, TRUE, "H5Fcreate");
+ VERIFY(fid >= 0, true, "H5Fcreate");
VERIFY(HDF5_SUPERBLOCK_VERSION_3, f->shared->sblock->super_vers, "HDF5_superblock_ver_bounds");
- VERIFY(f->shared->low_bound >= H5F_LIBVER_V110, TRUE, "HDF5_superblock_ver_bounds");
+ VERIFY(f->shared->low_bound >= H5F_LIBVER_V110, true, "HDF5_superblock_ver_bounds");
}
else /* Should fail */
- VERIFY(fid >= 0, FALSE, "H5Fcreate");
+ VERIFY(fid >= 0, false, "H5Fcreate");
}
else { /* Should succeed */
- VERIFY(fid >= 0, TRUE, "H5Fcreate");
+ VERIFY(fid >= 0, true, "H5Fcreate");
VERIFY(low, f->shared->low_bound, "HDF5_superblock_ver_bounds");
switch (low) {
@@ -5979,19 +5979,19 @@ test_libver_bounds_super_create(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t n
ok = (f->shared->sblock->super_vers == HDF5_SUPERBLOCK_VERSION_DEF ||
f->shared->sblock->super_vers == HDF5_SUPERBLOCK_VERSION_1 ||
f->shared->sblock->super_vers == HDF5_SUPERBLOCK_VERSION_2);
- VERIFY(ok, TRUE, "HDF5_superblock_ver_bounds");
+ VERIFY(ok, true, "HDF5_superblock_ver_bounds");
break;
case H5F_LIBVER_V18:
ok = (f->shared->sblock->super_vers == HDF5_SUPERBLOCK_VERSION_2);
- VERIFY(ok, TRUE, "HDF5_superblock_ver_bounds");
+ VERIFY(ok, true, "HDF5_superblock_ver_bounds");
break;
case H5F_LIBVER_V110:
case H5F_LIBVER_V112:
case H5F_LIBVER_V114:
ok = (f->shared->sblock->super_vers == HDF5_SUPERBLOCK_VERSION_3);
- VERIFY(ok, TRUE, "HDF5_superblock_ver_bounds");
+ VERIFY(ok, true, "HDF5_superblock_ver_bounds");
break;
case H5F_LIBVER_ERROR:
@@ -6123,7 +6123,7 @@ test_libver_bounds_super_open(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t non
VERIFY(fid, H5I_INVALID_HID, "H5Fcreate");
}
else {
- VERIFY(fid >= 0, TRUE, "H5Fcreate");
+ VERIFY(fid >= 0, true, "H5Fcreate");
/* Get the internal file pointer */
f = (H5F_t *)H5VL_object(fid);
@@ -6176,8 +6176,8 @@ test_libver_bounds_super_open(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t non
case 3:
if (high >= H5F_LIBVER_V110) {
/* Should succeed */
- VERIFY(fid >= 0, TRUE, "H5Fopen");
- VERIFY(f->shared->low_bound >= H5F_LIBVER_V110, TRUE,
+ VERIFY(fid >= 0, true, "H5Fopen");
+ VERIFY(f->shared->low_bound >= H5F_LIBVER_V110, true,
"HDF5_superblock_ver_bounds");
/* Close the file */
@@ -6185,15 +6185,15 @@ test_libver_bounds_super_open(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t non
CHECK(ret, FAIL, "H5Fclose");
}
else /* Should fail */
- VERIFY(fid >= 0, FALSE, "H5Fopen");
+ VERIFY(fid >= 0, false, "H5Fopen");
break;
case 2:
if (is_swmr) /* Should fail */
- VERIFY(fid >= 0, FALSE, "H5Fopen");
+ VERIFY(fid >= 0, false, "H5Fopen");
else { /* Should succeed */
- VERIFY(fid >= 0, TRUE, "H5Fopen");
- VERIFY(f->shared->low_bound >= H5F_LIBVER_V18, TRUE,
+ VERIFY(fid >= 0, true, "H5Fopen");
+ VERIFY(f->shared->low_bound >= H5F_LIBVER_V18, true,
"HDF5_superblock_ver_bounds");
/* Close the file */
@@ -6205,9 +6205,9 @@ test_libver_bounds_super_open(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t non
case 1:
case 0:
if (is_swmr) /* Should fail */
- VERIFY(fid >= 0, FALSE, "H5Fopen");
+ VERIFY(fid >= 0, false, "H5Fopen");
else { /* Should succeed */
- VERIFY(fid >= 0, TRUE, "H5Fopen");
+ VERIFY(fid >= 0, true, "H5Fopen");
VERIFY(f->shared->low_bound, low, "HDF5_superblock_ver_bounds");
ret = H5Fclose(fid);
@@ -7521,37 +7521,37 @@ test_libver_macros(void)
/* Output message about test being performed */
MESSAGE(5, ("Testing macros for library version comparison\n"));
- VERIFY(H5_VERSION_GE(major, minor, release), TRUE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major - 1, minor, release), TRUE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major - 1, minor + 1, release), TRUE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major - 1, minor, release + 1), TRUE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major, minor - 1, release), TRUE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major, minor - 1, release + 1), TRUE, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major, minor, release), true, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major - 1, minor, release), true, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major - 1, minor + 1, release), true, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major - 1, minor, release + 1), true, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major, minor - 1, release), true, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major, minor - 1, release + 1), true, "H5_VERSION_GE");
if (H5_VERS_RELEASE > 0)
- VERIFY(H5_VERSION_GE(major, minor, release - 1), TRUE, "H5_VERSION_GE");
-
- VERIFY(H5_VERSION_GE(major + 1, minor, release), FALSE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major + 1, minor - 1, release), FALSE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major + 1, minor - 1, release - 1), FALSE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major, minor + 1, release), FALSE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major, minor + 1, release - 1), FALSE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major, minor, release + 1), FALSE, "H5_VERSION_GE");
-
- VERIFY(H5_VERSION_LE(major, minor, release), TRUE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major + 1, minor, release), TRUE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major + 1, minor - 1, release), TRUE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major + 1, minor - 1, release - 1), TRUE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major, minor + 1, release), TRUE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major, minor + 1, release - 1), TRUE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major, minor, release + 1), TRUE, "H5_VERSION_LE");
-
- VERIFY(H5_VERSION_LE(major - 1, minor, release), FALSE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major - 1, minor + 1, release), FALSE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major - 1, minor + 1, release + 1), FALSE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major, minor - 1, release), FALSE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major, minor - 1, release + 1), FALSE, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_GE(major, minor, release - 1), true, "H5_VERSION_GE");
+
+ VERIFY(H5_VERSION_GE(major + 1, minor, release), false, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major + 1, minor - 1, release), false, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major + 1, minor - 1, release - 1), false, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major, minor + 1, release), false, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major, minor + 1, release - 1), false, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major, minor, release + 1), false, "H5_VERSION_GE");
+
+ VERIFY(H5_VERSION_LE(major, minor, release), true, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major + 1, minor, release), true, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major + 1, minor - 1, release), true, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major + 1, minor - 1, release - 1), true, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major, minor + 1, release), true, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major, minor + 1, release - 1), true, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major, minor, release + 1), true, "H5_VERSION_LE");
+
+ VERIFY(H5_VERSION_LE(major - 1, minor, release), false, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major - 1, minor + 1, release), false, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major - 1, minor + 1, release + 1), false, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major, minor - 1, release), false, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major, minor - 1, release + 1), false, "H5_VERSION_LE");
if (H5_VERS_RELEASE > 0)
- VERIFY(H5_VERSION_LE(major, minor, release - 1), FALSE, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major, minor, release - 1), false, "H5_VERSION_LE");
} /* test_libver_macros() */
/****************************************************************
@@ -7599,7 +7599,7 @@ test_libver_macros2(void)
CHECK(ret, FAIL, "H5Lunlink");
status = H5Lexists(file, "Group", H5P_DEFAULT);
- VERIFY(status, FALSE, "H5Lexists");
+ VERIFY(status, false, "H5Lexists");
#else
ret = H5Gunlink(file, "Group");
CHECK(ret, FAIL, "H5Gunlink");
@@ -7630,20 +7630,20 @@ test_libver_macros2(void)
static void
test_incr_filesize(void)
{
- hid_t fid; /* File opened with read-write permission */
- h5_stat_size_t filesize; /* Size of file when empty */
- hid_t fcpl; /* File creation property list */
- hid_t fapl; /* File access property list */
- hid_t dspace; /* Dataspace ID */
- hid_t dset; /* Dataset ID */
- hid_t dcpl; /* Dataset creation property list */
- unsigned u; /* Local index variable */
- char filename[FILENAME_LEN]; /* Filename to use */
- char name[32]; /* Dataset name */
- haddr_t stored_eoa; /* The stored EOA value */
- hid_t driver_id = -1; /* ID for this VFD */
- unsigned long driver_flags = 0; /* VFD feature flags */
- herr_t ret; /* Return value */
+ hid_t fid; /* File opened with read-write permission */
+ h5_stat_size_t filesize; /* Size of file when empty */
+ hid_t fcpl; /* File creation property list */
+ hid_t fapl; /* File access property list */
+ hid_t dspace; /* Dataspace ID */
+ hid_t dset; /* Dataset ID */
+ hid_t dcpl; /* Dataset creation property list */
+ unsigned u; /* Local index variable */
+ char filename[FILENAME_LEN]; /* Filename to use */
+ char name[32]; /* Dataset name */
+ haddr_t stored_eoa; /* The stored EOA value */
+ hid_t driver_id = H5I_INVALID_HID; /* ID for this VFD */
+ unsigned long driver_flags = 0; /* VFD feature flags */
+ herr_t ret; /* Return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing H5Fincrement_filesize() and H5Fget_eoa())\n"));
@@ -7665,7 +7665,7 @@ test_incr_filesize(void)
CHECK(fcpl, FAIL, "H5Pcreate");
/* Set file space strategy */
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, false, (hsize_t)1);
CHECK(ret, FAIL, "H5P_set_file_space_strategy");
/* Create the test file */
@@ -7686,7 +7686,7 @@ test_incr_filesize(void)
/* Create datasets in file */
for (u = 0; u < 10; u++) {
- HDsnprintf(name, sizeof(name), "Dataset %u", u);
+ snprintf(name, sizeof(name), "Dataset %u", u);
dset = H5Dcreate2(fid, name, H5T_STD_U32LE, dspace, H5P_DEFAULT, dcpl, H5P_DEFAULT);
CHECK(dset, FAIL, "H5Dcreate2");
@@ -7759,9 +7759,9 @@ test_min_dset_ohdr(void)
{
const char basename[] = "min_dset_ohdr_testfile";
char filename[FILENAME_LEN] = "";
- hid_t file_id = -1;
- hid_t file2_id = -1;
- hbool_t minimize;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t file2_id = H5I_INVALID_HID;
+ bool minimize;
herr_t ret;
MESSAGE(5, ("Testing dataset object header minimization\n"));
@@ -7784,17 +7784,17 @@ test_min_dset_ohdr(void)
*/
ret = H5Fget_dset_no_attrs_hint(file_id, &minimize);
CHECK(ret, FAIL, "H5Fget_dset_no_attrs_hint");
- VERIFY(minimize, FALSE, "minimize flag");
+ VERIFY(minimize, false, "minimize flag");
/*----------------------------------------
- * TEST set to TRUE
+ * TEST set to true
*/
- ret = H5Fset_dset_no_attrs_hint(file_id, TRUE);
+ ret = H5Fset_dset_no_attrs_hint(file_id, true);
CHECK(ret, FAIL, "H5Fset_dset_no_attrs_hint");
ret = H5Fget_dset_no_attrs_hint(file_id, &minimize);
CHECK(ret, FAIL, "H5Fget_dset_no_attrs_hint");
- VERIFY(minimize, TRUE, "minimize flag");
+ VERIFY(minimize, true, "minimize flag");
/*----------------------------------------
* TEST second file open on same filename
@@ -7802,41 +7802,41 @@ test_min_dset_ohdr(void)
file2_id = H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT);
CHECK_I(file2_id, "H5Fopen");
- /* verify TRUE setting on second open
+ /* verify true setting on second open
*/
ret = H5Fget_dset_no_attrs_hint(file_id, &minimize);
CHECK(ret, FAIL, "H5Fget_dset_no_attrs_hint");
- VERIFY(minimize, TRUE, "minimize flag");
+ VERIFY(minimize, true, "minimize flag");
- /* re-set to FALSE on first open
+ /* re-set to false on first open
*/
- ret = H5Fset_dset_no_attrs_hint(file_id, FALSE);
+ ret = H5Fset_dset_no_attrs_hint(file_id, false);
CHECK(ret, FAIL, "H5Fset_dset_no_attrs_hint");
- /* verify FALSE set on both opens
+ /* verify false set on both opens
*/
ret = H5Fget_dset_no_attrs_hint(file_id, &minimize);
CHECK(ret, FAIL, "H5Fget_dset_no_attrs_hint");
- VERIFY(minimize, FALSE, "minimize flag");
+ VERIFY(minimize, false, "minimize flag");
ret = H5Fget_dset_no_attrs_hint(file2_id, &minimize);
CHECK(ret, FAIL, "H5Fget_dset_no_attrs_hint");
- VERIFY(minimize, FALSE, "minimize flag");
+ VERIFY(minimize, false, "minimize flag");
- /* re-set to TRUE on second open
+ /* re-set to true on second open
*/
- ret = H5Fset_dset_no_attrs_hint(file2_id, TRUE);
+ ret = H5Fset_dset_no_attrs_hint(file2_id, true);
CHECK(ret, FAIL, "H5Fset_dset_no_attrs_hint");
- /* verify TRUE set on both opens
+ /* verify true set on both opens
*/
ret = H5Fget_dset_no_attrs_hint(file_id, &minimize);
CHECK(ret, FAIL, "H5Fget_dset_no_attrs_hint");
- VERIFY(minimize, TRUE, "minimize flag");
+ VERIFY(minimize, true, "minimize flag");
ret = H5Fget_dset_no_attrs_hint(file2_id, &minimize);
CHECK(ret, FAIL, "H5Fget_dset_no_attrs_hint");
- VERIFY(minimize, TRUE, "minimize flag");
+ VERIFY(minimize, true, "minimize flag");
/*----------------------------------------
* TEST error cases
@@ -7845,7 +7845,7 @@ test_min_dset_ohdr(void)
/* trying to set with invalid file ID */
H5E_BEGIN_TRY
{
- ret = H5Fset_dset_no_attrs_hint(-1, TRUE);
+ ret = H5Fset_dset_no_attrs_hint(-1, true);
}
H5E_END_TRY
VERIFY(ret, FAIL, "H5Fset_dset_no_attrs_hint");
@@ -8115,14 +8115,14 @@ test_file(void)
{
const char *env_h5_drvr; /* File Driver value from environment */
hid_t fapl_id = H5I_INVALID_HID; /* VFD-dependent fapl ID */
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
herr_t ret;
/* Output message about test being performed */
MESSAGE(5, ("Testing Low-Level File I/O\n"));
/* Get the VFD to use */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
@@ -8150,8 +8150,8 @@ test_file(void)
test_file_double_group_open(); /* Test opening same group from two files works properly */
test_file_double_dataset_open(); /* Test opening same dataset from two files works properly */
test_file_double_datatype_open(); /* Test opening same named datatype from two files works properly */
- test_file_double_file_dataset_open(TRUE);
- test_file_double_file_dataset_open(FALSE);
+ test_file_double_file_dataset_open(true);
+ test_file_double_file_dataset_open(false);
test_userblock_file_size(
env_h5_drvr); /* Tests that files created with a userblock have the correct size */
test_cached_stab_info(); /* Tests that files are created with cached stab info in the superblock */
@@ -8171,10 +8171,10 @@ test_file(void)
/* Skipped testing for multi/split drivers */
/* Setup for multi/split drivers are there already */
test_sects_freespace(env_h5_drvr,
- TRUE); /* Test file public routine H5Fget_free_sections() for new format */
+ true); /* Test file public routine H5Fget_free_sections() for new format */
/* Skipped testing for multi/split drivers */
/* Setup for multi/split drivers are there already */
- test_sects_freespace(env_h5_drvr, FALSE); /* Test file public routine H5Fget_free_sections() */
+ test_sects_freespace(env_h5_drvr, false); /* Test file public routine H5Fget_free_sections() */
/* Skipped testing for multi/split drivers */
if (driver_is_default_compatible) {
diff --git a/test/tgenprop.c b/test/tgenprop.c
index b4bd6c3bbc7..586ab335e7f 100644
--- a/test/tgenprop.c
+++ b/test/tgenprop.c
@@ -94,7 +94,7 @@ test_genprop_basic_class(void)
/* Check class name */
name = H5Pget_class_name(cid1);
CHECK_PTR(name, "H5Pget_class_name");
- if (HDstrcmp(name, CLASS1_NAME) != 0)
+ if (strcmp(name, CLASS1_NAME) != 0)
TestErrPrintf("Class names don't match!, name=%s, CLASS1_NAME=%s\n", name, CLASS1_NAME);
H5free_memory(name);
@@ -125,7 +125,7 @@ test_genprop_basic_class(void)
/* Check class name */
name = H5Pget_class_name(cid1);
CHECK_PTR(name, "H5Pget_class_name");
- if (HDstrcmp(name, CLASS2_NAME) != 0)
+ if (strcmp(name, CLASS2_NAME) != 0)
TestErrPrintf("Class names don't match!, name=%s, CLASS2_NAME=%s\n", name, CLASS2_NAME);
H5free_memory(name);
@@ -313,7 +313,7 @@ test_genprop_iter1(hid_t H5_ATTR_UNUSED id, const char *name, void *iter_data)
{
iter_data_t *idata = (iter_data_t *)iter_data;
- return HDstrcmp(name, idata->names[idata->iter_count++]);
+ return strcmp(name, idata->names[idata->iter_count++]);
}
/****************************************************************
@@ -868,7 +868,7 @@ test_genprop_iter2(hid_t H5_ATTR_UNUSED id, const char *name, void *iter_data)
{
iter_data_t *idata = (iter_data_t *)iter_data;
- return HDstrcmp(name, idata->names[idata->iter_count++]);
+ return strcmp(name, idata->names[idata->iter_count++]);
}
/****************************************************************
@@ -1026,7 +1026,7 @@ test_genprop_prop_crt_cb1(const char *name, size_t size, void *def_value)
{
/* Set the information from the creation call */
prop1_cb_info.crt_count++;
- prop1_cb_info.crt_name = HDstrdup(name);
+ prop1_cb_info.crt_name = strdup(name);
prop1_cb_info.crt_value = malloc(size);
memcpy(prop1_cb_info.crt_value, def_value, size);
@@ -1045,7 +1045,7 @@ test_genprop_prop_set_cb1(hid_t plist_id, const char *name, size_t size, void *v
prop1_cb_info.set_count++;
prop1_cb_info.set_plist_id = plist_id;
if (prop1_cb_info.set_name == NULL)
- prop1_cb_info.set_name = HDstrdup(name);
+ prop1_cb_info.set_name = strdup(name);
if (prop1_cb_info.set_value == NULL)
prop1_cb_info.set_value = malloc(size);
memcpy(prop1_cb_info.set_value, value, size);
@@ -1065,7 +1065,7 @@ test_genprop_prop_get_cb1(hid_t plist_id, const char *name, size_t size, void *v
prop1_cb_info.get_count++;
prop1_cb_info.get_plist_id = plist_id;
if (prop1_cb_info.get_name == NULL)
- prop1_cb_info.get_name = HDstrdup(name);
+ prop1_cb_info.get_name = strdup(name);
if (prop1_cb_info.get_value == NULL)
prop1_cb_info.get_value = malloc(size);
memcpy(prop1_cb_info.get_value, value, size);
@@ -1084,7 +1084,7 @@ test_genprop_prop_cop_cb1(const char *name, size_t size, void *value)
/* Set the information from the get call */
prop1_cb_info.cop_count++;
if (prop1_cb_info.cop_name == NULL)
- prop1_cb_info.cop_name = HDstrdup(name);
+ prop1_cb_info.cop_name = strdup(name);
if (prop1_cb_info.cop_value == NULL)
prop1_cb_info.cop_value = malloc(size);
memcpy(prop1_cb_info.cop_value, value, size);
@@ -1131,7 +1131,7 @@ test_genprop_prop_cls_cb1(const char *name, size_t size, void *value)
/* Set the information from the close call */
prop1_cb_info.cls_count++;
if (prop1_cb_info.cls_name == NULL)
- prop1_cb_info.cls_name = HDstrdup(name);
+ prop1_cb_info.cls_name = strdup(name);
if (prop1_cb_info.cls_value == NULL)
prop1_cb_info.cls_value = malloc(size);
memcpy(prop1_cb_info.cls_value, value, size);
@@ -1150,7 +1150,7 @@ test_genprop_prop_del_cb2(hid_t plist_id, const char *name, size_t size, void *v
/* Set the information from the delete call */
prop2_cb_info.del_count++;
prop2_cb_info.del_plist_id = plist_id;
- prop2_cb_info.del_name = HDstrdup(name);
+ prop2_cb_info.del_name = strdup(name);
prop2_cb_info.del_value = malloc(size);
memcpy(prop2_cb_info.del_value, value, size);
@@ -1238,7 +1238,7 @@ test_genprop_list_callback(void)
/* Verify creation callback information for properties tracked */
VERIFY(prop1_cb_info.crt_count, 1, "H5Pcreate");
- if (HDstrcmp(prop1_cb_info.crt_name, PROP1_NAME) != 0)
+ if (strcmp(prop1_cb_info.crt_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop1_cb_info.crt_value, PROP1_DEF_VALUE, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
@@ -1274,7 +1274,7 @@ test_genprop_list_callback(void)
/* Verify get callback information for properties tracked */
VERIFY(prop1_cb_info.get_count, 1, "H5Pget");
VERIFY(prop1_cb_info.get_plist_id, lid1, "H5Pget");
- if (HDstrcmp(prop1_cb_info.get_name, PROP1_NAME) != 0)
+ if (strcmp(prop1_cb_info.get_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop1_cb_info.get_value, PROP1_DEF_VALUE, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
@@ -1286,7 +1286,7 @@ test_genprop_list_callback(void)
/* Verify set callback information for properties tracked */
VERIFY(prop1_cb_info.set_count, 1, "H5Pset");
VERIFY(prop1_cb_info.set_plist_id, lid1, "H5Pset");
- if (HDstrcmp(prop1_cb_info.set_name, PROP1_NAME) != 0)
+ if (strcmp(prop1_cb_info.set_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop1_cb_info.set_value, &prop1_new_value, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
@@ -1309,7 +1309,7 @@ test_genprop_list_callback(void)
/* Verify get callback information again for properties tracked */
VERIFY(prop1_cb_info.get_count, 2, "H5Pget");
VERIFY(prop1_cb_info.get_plist_id, lid1, "H5Pget");
- if (HDstrcmp(prop1_cb_info.get_name, PROP1_NAME) != 0)
+ if (strcmp(prop1_cb_info.get_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop1_cb_info.get_value, &prop1_new_value, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
@@ -1321,7 +1321,7 @@ test_genprop_list_callback(void)
/* Verify delete callback information for properties tracked */
VERIFY(prop2_cb_info.del_count, 1, "H5Premove");
VERIFY(prop2_cb_info.del_plist_id, lid1, "H5Premove");
- if (HDstrcmp(prop2_cb_info.del_name, PROP2_NAME) != 0)
+ if (strcmp(prop2_cb_info.del_name, PROP2_NAME) != 0)
TestErrPrintf("Property #2 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop2_cb_info.del_value, PROP2_DEF_VALUE, PROP2_SIZE) != 0)
TestErrPrintf("Property #2 value doesn't match!, line=%d\n", __LINE__);
@@ -1332,7 +1332,7 @@ test_genprop_list_callback(void)
/* Verify copy callback information for properties tracked */
VERIFY(prop1_cb_info.cop_count, 1, "H5Pcopy");
- if (HDstrcmp(prop1_cb_info.cop_name, PROP1_NAME) != 0)
+ if (strcmp(prop1_cb_info.cop_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop1_cb_info.cop_value, &prop1_new_value, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
@@ -1355,7 +1355,7 @@ test_genprop_list_callback(void)
/* Verify close callback information for properties tracked */
VERIFY(prop1_cb_info.cls_count, 1, "H5Pclose");
- if (HDstrcmp(prop1_cb_info.cls_name, PROP1_NAME) != 0)
+ if (strcmp(prop1_cb_info.cls_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop1_cb_info.cls_value, &prop1_new_value, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
@@ -1809,7 +1809,7 @@ test_genprop_path(void)
/* Get full path for first class */
path = H5P__get_class_path_test(cid1);
CHECK_PTR(path, "H5P__get_class_path_test");
- if (HDstrcmp(path, CLASS1_PATH) != 0)
+ if (strcmp(path, CLASS1_PATH) != 0)
TestErrPrintf("Class names don't match!, path=%s, CLASS1_PATH=%s\n", path, CLASS1_PATH);
H5free_memory(path);
@@ -1825,7 +1825,7 @@ test_genprop_path(void)
/* Get full path for second class */
path = H5P__get_class_path_test(cid2);
CHECK_PTR(path, "H5P__get_class_path_test");
- if (HDstrcmp(path, CLASS2_PATH) != 0)
+ if (strcmp(path, CLASS2_PATH) != 0)
TestErrPrintf("Class names don't match!, path=%s, CLASS2_PATH=%s\n", path, CLASS2_PATH);
/* Open a copy of the class with the path name */
@@ -1886,7 +1886,7 @@ test_genprop_refcount(void)
/* Check class name */
name = H5Pget_class_name(cid1);
CHECK_PTR(name, "H5Pget_class_name");
- if (HDstrcmp(name, CLASS1_NAME) != 0)
+ if (strcmp(name, CLASS1_NAME) != 0)
TestErrPrintf("Class names don't match!, name=%s, CLASS1_NAME=%s\n", name, CLASS1_NAME);
H5free_memory(name);
@@ -1905,7 +1905,7 @@ test_genprop_refcount(void)
/* Check class name */
name = H5Pget_class_name(cid1);
CHECK_PTR(name, "H5Pget_class_name");
- if (HDstrcmp(name, CLASS1_NAME) != 0)
+ if (strcmp(name, CLASS1_NAME) != 0)
TestErrPrintf("Class names don't match!, name=%s, CLASS1_NAME=%s\n", name, CLASS1_NAME);
H5free_memory(name);
@@ -1916,7 +1916,7 @@ test_genprop_refcount(void)
/* Check class name */
name = H5Pget_class_name(cid1);
CHECK_PTR(name, "H5Pget_class_name");
- if (HDstrcmp(name, CLASS1_NAME) != 0)
+ if (strcmp(name, CLASS1_NAME) != 0)
TestErrPrintf("Class names don't match!, name=%s, CLASS1_NAME=%s\n", name, CLASS1_NAME);
H5free_memory(name);
diff --git a/test/th5_system.c b/test/th5_system.c
index 33728ca9afc..eb6787f9fb8 100644
--- a/test/th5_system.c
+++ b/test/th5_system.c
@@ -50,7 +50,7 @@ test_h5_dirname(void)
/* Check that H5_dirname fails for a NULL dirname pointer */
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "topdir%sunderdir%sfinaldir", H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "topdir%sunderdir%sfinaldir", H5_DIR_SEPS, H5_DIR_SEPS);
H5E_BEGIN_TRY
{
ret = H5_dirname(path, NULL);
@@ -72,7 +72,7 @@ test_h5_dirname(void)
* doesn't contain the system file separator character
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "testdirname");
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "testdirname");
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, ".", "comparing H5_dirname with non-separated path to \".\"");
H5MM_free(dirname);
@@ -82,7 +82,7 @@ test_h5_dirname(void)
* for the simple path containing just the system file separator
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, H5_DIR_SEPS, "comparing H5_dirname with file separator path to file separator");
H5MM_free(dirname);
@@ -93,7 +93,7 @@ test_h5_dirname(void)
* component
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stestdir", H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stestdir", H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, H5_DIR_SEPS, "comparing H5_dirname with leading separator path to file separator");
H5MM_free(dirname);
@@ -104,8 +104,8 @@ test_h5_dirname(void)
* a path component
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%s%s%s%stestdir", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
- H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%s%s%s%stestdir", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
+ H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, H5_DIR_SEPS, "comparing H5_dirname with leading separators path to file separator");
H5MM_free(dirname);
@@ -115,7 +115,7 @@ test_h5_dirname(void)
* contains a path component and a trailing separator
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "testdir%s", H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "testdir%s", H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, ".", "comparing H5_dirname with trailing separator path to \".\"");
H5MM_free(dirname);
@@ -125,8 +125,8 @@ test_h5_dirname(void)
* contains a path component and several trailing separators
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "testdir%s%s%s%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
- H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "testdir%s%s%s%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
+ H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, ".", "comparing H5_dirname with trailing separators path to \".\"");
H5MM_free(dirname);
@@ -137,7 +137,7 @@ test_h5_dirname(void)
* component and a trailing separator
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stestdir%s", H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stestdir%s", H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, H5_DIR_SEPS,
"comparing H5_dirname with leading and trailing separator path to file separator");
@@ -149,8 +149,8 @@ test_h5_dirname(void)
* path component and a trailing separator
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%s%s%s%stestdir%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
- H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%s%s%s%stestdir%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
+ H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(
dirname, H5_DIR_SEPS,
@@ -163,8 +163,8 @@ test_h5_dirname(void)
* component and several trailing separators
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stestdir%s%s%s%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
- H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stestdir%s%s%s%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
+ H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, H5_DIR_SEPS,
"comparing H5_dirname with leading separator and trailing separators path to file separator");
@@ -176,8 +176,8 @@ test_h5_dirname(void)
* path component and several trailing separators
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%s%s%s%stestdir%s%s%s%s", H5_DIR_SEPS, H5_DIR_SEPS,
- H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%s%s%s%stestdir%s%s%s%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
+ H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, H5_DIR_SEPS,
"comparing H5_dirname with leading and trailing separators path to file separator");
@@ -188,7 +188,7 @@ test_h5_dirname(void)
* "normal" pathname that has no leading separator
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "topdir%sunderdir", H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "topdir%sunderdir", H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, "topdir", "comparing H5_dirname with normal path to proper dirname");
H5MM_free(dirname);
@@ -198,7 +198,7 @@ test_h5_dirname(void)
* "normal" pathname that has a leading separator
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stopdir%sunderdir", H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stopdir%sunderdir", H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, H5_DIR_SEPS "topdir", "comparing H5_dirname with normal path to proper dirname");
H5MM_free(dirname);
@@ -208,7 +208,7 @@ test_h5_dirname(void)
* "normal" pathname that has a leading and trailing separator
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stopdir%sunderdir%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stopdir%sunderdir%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, H5_DIR_SEPS "topdir", "comparing H5_dirname with normal path to proper dirname");
H5MM_free(dirname);
@@ -218,8 +218,8 @@ test_h5_dirname(void)
* contrived pathname
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stopdir%sunderdir%s%s%sfinaldir%s", H5_DIR_SEPS, H5_DIR_SEPS,
- H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stopdir%sunderdir%s%s%sfinaldir%s", H5_DIR_SEPS, H5_DIR_SEPS,
+ H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, H5_DIR_SEPS "topdir" H5_DIR_SEPS "underdir",
"comparing H5_dirname with contrived path to proper dirname");
@@ -254,7 +254,7 @@ test_h5_basename(void)
/* Check that H5_basename fails for a NULL basename pointer */
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "topdir%sunderdir%sfinaldir", H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "topdir%sunderdir%sfinaldir", H5_DIR_SEPS, H5_DIR_SEPS);
H5E_BEGIN_TRY
{
ret = H5_basename(path, NULL);
@@ -276,7 +276,7 @@ test_h5_basename(void)
* path that doesn't contain the system file separator character
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "testdirname");
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "testdirname");
ret = H5_basename(path, &basename);
VERIFY_STR(basename, "testdirname", "comparing H5_basename with non-separated path to same path");
H5MM_free(basename);
@@ -286,7 +286,7 @@ test_h5_basename(void)
* for the simple path containing just the system file separator
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(basename, H5_DIR_SEPS, "comparing H5_basename with file separator path to file separator");
H5MM_free(basename);
@@ -297,7 +297,7 @@ test_h5_basename(void)
* component
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stestdir", H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stestdir", H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(basename, "testdir",
"comparing H5_basename with leading separator path to filename component");
@@ -309,8 +309,8 @@ test_h5_basename(void)
* component
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%s%s%s%stestdir", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
- H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%s%s%s%stestdir", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
+ H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(basename, "testdir",
"comparing H5_basename with leading separators path to filename component");
@@ -321,7 +321,7 @@ test_h5_basename(void)
* path which contains a path component and a trailing separator
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "testdir%s", H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "testdir%s", H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(basename, "testdir",
"comparing H5_basename with trailing separator path to filename component");
@@ -333,8 +333,8 @@ test_h5_basename(void)
* separators
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "testdir%s%s%s%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
- H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "testdir%s%s%s%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
+ H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(basename, "testdir",
"comparing H5_basename with trailing separators path to filename component");
@@ -346,7 +346,7 @@ test_h5_basename(void)
* and a trailing separator
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stestdir%s", H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stestdir%s", H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(basename, "testdir",
"comparing H5_basename with leading and trailing separator path to filename component");
@@ -358,8 +358,8 @@ test_h5_basename(void)
* component and a trailing separator
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%s%s%s%stestdir%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
- H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%s%s%s%stestdir%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
+ H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(
basename, "testdir",
@@ -372,8 +372,8 @@ test_h5_basename(void)
* and several trailing separators
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stestdir%s%s%s%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
- H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stestdir%s%s%s%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
+ H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(
basename, "testdir",
@@ -386,8 +386,8 @@ test_h5_basename(void)
* component and several trailing separators
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%s%s%s%stestdir%s%s%s%s", H5_DIR_SEPS, H5_DIR_SEPS,
- H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%s%s%s%stestdir%s%s%s%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
+ H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(basename, "testdir",
"comparing H5_basename with leading and trailing separators path to filename component");
@@ -398,7 +398,7 @@ test_h5_basename(void)
* a "normal" pathname that has no leading separator
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "topdir%sunderdir", H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "topdir%sunderdir", H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(basename, "underdir", "comparing H5_basename with normal path to proper basename");
H5MM_free(basename);
@@ -408,7 +408,7 @@ test_h5_basename(void)
* a "normal" pathname that has a leading separator
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stopdir%sunderdir", H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stopdir%sunderdir", H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(basename, "underdir", "comparing H5_basename with normal path to proper basename");
H5MM_free(basename);
@@ -418,7 +418,7 @@ test_h5_basename(void)
* a "normal" pathname that has a leading and trailing separator
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stopdir%sunderdir%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stopdir%sunderdir%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(basename, "underdir", "comparing H5_basename with normal path to proper basename");
H5MM_free(basename);
@@ -428,8 +428,8 @@ test_h5_basename(void)
* contrived pathname
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stopdir%sunderdir%s%s%sfinaldir%s", H5_DIR_SEPS, H5_DIR_SEPS,
- H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stopdir%sunderdir%s%s%sfinaldir%s", H5_DIR_SEPS, H5_DIR_SEPS,
+ H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(basename, "finaldir", "comparing H5_basename with contrived path to proper basename");
H5MM_free(basename);
@@ -532,7 +532,7 @@ test_h5_strndup(void)
str = H5MM_xfree(str);
/* Check that H5_strndup correctly performs identical copies */
- str = H5_strndup(teststr, HDstrlen(teststr));
+ str = H5_strndup(teststr, strlen(teststr));
CHECK_PTR(str, "H5_strndup for identical copy");
if (str)
VERIFY_STR(str, teststr, "comparing H5_strndup for identical copy to original string");
@@ -542,7 +542,7 @@ test_h5_strndup(void)
* Check that H5_strndup correctly performs copies when
* `n` is greater than the original string
*/
- str = H5_strndup(teststr, HDstrlen(teststr) + 2);
+ str = H5_strndup(teststr, strlen(teststr) + 2);
CHECK_PTR(str, "H5_strndup for larger 'n'");
if (str)
VERIFY_STR(str, teststr, "comparing H5_strndup with larger 'n' value to original string");
diff --git a/test/th5o.c b/test/th5o.c
index 9031b284f29..17cfad7f5fd 100644
--- a/test/th5o.c
+++ b/test/th5o.c
@@ -934,13 +934,13 @@ test_h5o_plist(void)
static void
test_h5o_link(void)
{
- hid_t file_id = -1;
- hid_t group_id = -1;
- hid_t space_id = -1;
- hid_t dset_id = -1;
- hid_t type_id = -1;
- hid_t fapl_id = -1;
- hid_t lcpl_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t group_id = H5I_INVALID_HID;
+ hid_t space_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t type_id = H5I_INVALID_HID;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t lcpl_id = H5I_INVALID_HID;
char filename[1024];
hsize_t dims[2] = {TEST6_DIM1, TEST6_DIM2};
htri_t committed; /* Whether the named datatype is committed */
@@ -973,7 +973,7 @@ test_h5o_link(void)
/* Create LCPL with intermediate group creation flag set */
lcpl_id = H5Pcreate(H5P_LINK_CREATE);
CHECK(lcpl_id, FAIL, "H5Pcreate");
- ret = H5Pset_create_intermediate_group(lcpl_id, TRUE);
+ ret = H5Pset_create_intermediate_group(lcpl_id, true);
CHECK(ret, FAIL, "H5Pset_create_intermediate_group");
/* Create a file access property list */
@@ -1008,7 +1008,7 @@ test_h5o_link(void)
ret = H5Tcommit_anon(file_id, type_id, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tcommit_anon");
committed = H5Tcommitted(type_id);
- VERIFY(committed, TRUE, "H5Tcommitted");
+ VERIFY(committed, true, "H5Tcommitted");
/* Create a dataset with no name using the committed datatype*/
dset_id = H5Dcreate_anon(file_id, type_id, space_id, H5P_DEFAULT, H5P_DEFAULT);
@@ -1203,7 +1203,7 @@ test_h5o_comment(void)
len = H5Oget_comment(fid, check_comment, (size_t)comment_len + 1);
CHECK(len, FAIL, "H5Oget_comment");
- ret_value = HDstrcmp(file_comment, check_comment);
+ ret_value = strcmp(file_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment");
/* Open the group */
@@ -1217,7 +1217,7 @@ test_h5o_comment(void)
len = H5Oget_comment(grp, check_comment, (size_t)comment_len + 1);
CHECK(len, FAIL, "H5Oget_comment");
- ret_value = HDstrcmp(grp_comment, check_comment);
+ ret_value = strcmp(grp_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment");
/* Open the datatype */
@@ -1231,7 +1231,7 @@ test_h5o_comment(void)
len = H5Oget_comment(dtype, check_comment, (size_t)comment_len + 1);
CHECK(len, FAIL, "H5Oget_comment");
- ret_value = HDstrcmp(dtype_comment, check_comment);
+ ret_value = strcmp(dtype_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment");
/* Open the dataset */
@@ -1245,7 +1245,7 @@ test_h5o_comment(void)
len = H5Oget_comment(dset, check_comment, (size_t)comment_len + 1);
CHECK(ret, len, "H5Oget_comment");
- ret_value = HDstrcmp(dset_comment, check_comment);
+ ret_value = strcmp(dset_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment");
/* Close the IDs */
@@ -1378,7 +1378,7 @@ test_h5o_comment_by_name(void)
len = H5Oget_comment_by_name(fid, ".", check_comment, (size_t)comment_len + 1, H5P_DEFAULT);
CHECK(len, FAIL, "H5Oget_comment_by_name");
- ret_value = HDstrcmp(file_comment, check_comment);
+ ret_value = strcmp(file_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment_by_name");
/* Open the group */
@@ -1392,7 +1392,7 @@ test_h5o_comment_by_name(void)
len = H5Oget_comment_by_name(fid, "group", check_comment, (size_t)comment_len + 1, H5P_DEFAULT);
CHECK(len, FAIL, "H5Oget_comment_by_name");
- ret_value = HDstrcmp(grp_comment, check_comment);
+ ret_value = strcmp(grp_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment_by_name");
/* Getting the comment on the datatype and verify it */
@@ -1402,7 +1402,7 @@ test_h5o_comment_by_name(void)
len = H5Oget_comment_by_name(grp, "datatype", check_comment, (size_t)comment_len + 1, H5P_DEFAULT);
CHECK(len, FAIL, "H5Oget_comment");
- ret_value = HDstrcmp(dtype_comment, check_comment);
+ ret_value = strcmp(dtype_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment_by_name");
/* Getting the comment on the dataset and verify it */
@@ -1412,7 +1412,7 @@ test_h5o_comment_by_name(void)
len = H5Oget_comment_by_name(fid, "dataset", check_comment, (size_t)comment_len + 1, H5P_DEFAULT);
CHECK(len, FAIL, "H5Oget_comment_by_name");
- ret_value = HDstrcmp(dset_comment, check_comment);
+ ret_value = strcmp(dset_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment_by_name");
/* Close the IDs */
@@ -1699,16 +1699,16 @@ visit_obj_cb(hid_t group_id, const char *name, const H5O_info1_t *oinfo1, void H
H5O_info1_t oinfo2; /* Object info structs */
/* Verify the object info for "group1", "group2" and the root group */
- if (!(HDstrcmp(name, "group1"))) {
+ if (!(strcmp(name, "group1"))) {
H5Oget_info_by_name2(group_id, name, &oinfo2, H5O_INFO_NUM_ATTRS, H5P_DEFAULT);
VERIFY(oinfo1->num_attrs, oinfo2.num_attrs, "obj info from H5Ovisit1");
}
- else if (!(HDstrcmp(name, "group2"))) {
+ else if (!(strcmp(name, "group2"))) {
H5Oget_info_by_name2(group_id, name, &oinfo2, H5O_INFO_HDR, H5P_DEFAULT);
VERIFY(oinfo1->hdr.nmesgs, oinfo2.hdr.nmesgs, "obj info from H5Ovisit1/H5Oget_info2");
VERIFY(oinfo1->hdr.nchunks, oinfo2.hdr.nchunks, "obj info from H5Ovisit1/H5Oget_info2");
}
- else if (!(HDstrcmp(name, "."))) {
+ else if (!(strcmp(name, "."))) {
H5Oget_info_by_name2(group_id, name, &oinfo2, H5O_INFO_META_SIZE, H5P_DEFAULT);
VERIFY(oinfo1->meta_size.obj.index_size, oinfo2.meta_size.obj.index_size,
"obj info from H5Ovisit1/H5Oget_info2");
@@ -1731,10 +1731,10 @@ visit_obj_cb(hid_t group_id, const char *name, const H5O_info1_t *oinfo1, void H
static void
test_h5o_getinfo_visit(void)
{
- hid_t fid = -1; /* HDF5 File ID */
- hid_t gid1 = -1, gid2 = -1; /* Group IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t aid = -1; /* Attribute ID */
+ hid_t fid = H5I_INVALID_HID; /* HDF5 File ID */
+ hid_t gid1 = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
char filename[1024];
H5O_info1_t oinfo1, oinfo2; /* Object info structs */
char attrname[25]; /* Attribute name */
@@ -1761,7 +1761,7 @@ test_h5o_getinfo_visit(void)
/* Attach 10 attributes to "group1" */
for (j = 0; j < 10; j++) {
/* Create the attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr%u", j);
+ snprintf(attrname, sizeof(attrname), "attr%u", j);
/* Create the attribute */
aid = H5Acreate2(gid1, attrname, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
diff --git a/test/th5s.c b/test/th5s.c
index 6d703dadd9c..734365398f6 100644
--- a/test/th5s.c
+++ b/test/th5s.c
@@ -125,7 +125,7 @@ test_h5s_basic(void)
hsize_t tdims[4]; /* Dimension array to test with */
hsize_t tmax[4];
hssize_t n; /* Number of dataspace elements */
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -1210,8 +1210,8 @@ test_h5s_encode(H5F_libver_t low, H5F_libver_t high)
{
hid_t sid1, sid2, sid3; /* Dataspace ID */
hid_t decoded_sid1, decoded_sid2, decoded_sid3;
- int rank; /* Logical rank of dataspace */
- hid_t fapl = -1; /* File access property list ID */
+ int rank; /* Logical rank of dataspace */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list ID */
hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3};
size_t sbuf_size = 0, null_size = 0, scalar_size = 0;
unsigned char *sbuf = NULL, *null_sbuf = NULL, *scalar_buf = NULL;
@@ -1606,11 +1606,11 @@ test_h5s_encode1(void)
****************************************************************/
static herr_t
test_h5s_check_encoding(hid_t in_fapl, hid_t in_sid, uint32_t expected_version, uint8_t expected_enc_size,
- hbool_t expected_to_fail)
+ bool expected_to_fail)
{
- char *buf = NULL; /* Pointer to the encoded buffer */
- size_t buf_size; /* Size of the encoded buffer */
- hid_t d_sid = -1; /* The decoded dataspace ID */
+ char *buf = NULL; /* Pointer to the encoded buffer */
+ size_t buf_size; /* Size of the encoded buffer */
+ hid_t d_sid = H5I_INVALID_HID; /* The decoded dataspace ID */
htri_t check;
hsize_t in_low_bounds[1]; /* The low bounds for the selection for in_sid */
hsize_t in_high_bounds[1]; /* The high bounds for the selection for in_sid */
@@ -1649,7 +1649,7 @@ test_h5s_check_encoding(hid_t in_fapl, hid_t in_sid, uint32_t expected_version,
/* Verify if the two dataspace selections (in_sid, d_sid) are the same shape */
check = H5Sselect_shape_same(in_sid, d_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare the starting/ending coordinates of the bounding box for in_sid and d_sid */
ret = H5Sget_select_bounds(in_sid, in_low_bounds, in_high_bounds);
@@ -1711,10 +1711,10 @@ test_h5s_check_encoding(hid_t in_fapl, hid_t in_sid, uint32_t expected_version,
static void
test_h5s_encode_regular_hyper(H5F_libver_t low, H5F_libver_t high)
{
- hid_t fapl = -1; /* File access property list ID */
- hid_t sid = -1; /* Dataspace ID */
- hsize_t numparticles = 8388608; /* Used to calculate dimension size */
- unsigned num_dsets = 513; /* Used to calculate dimension size */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hsize_t numparticles = 8388608; /* Used to calculate dimension size */
+ unsigned num_dsets = 513; /* Used to calculate dimension size */
hsize_t total_particles = numparticles * num_dsets;
hsize_t vdsdims[1] = {total_particles}; /* Dimension size */
hsize_t start, stride, count, block; /* Selection info */
@@ -1741,7 +1741,7 @@ test_h5s_encode_regular_hyper(H5F_libver_t low, H5F_libver_t high)
/* Testing with each configuration */
for (config = CONFIG_16; config <= CONFIG_32; config++) {
- hbool_t expected_to_fail = FALSE;
+ bool expected_to_fail = false;
/* Testing with unlimited or not */
for (unlim = 0; unlim <= 1; unlim++) {
@@ -1749,7 +1749,7 @@ test_h5s_encode_regular_hyper(H5F_libver_t low, H5F_libver_t high)
count = unlim ? H5S_UNLIMITED : 2;
if ((high <= H5F_LIBVER_V18) && (unlim || config == CONFIG_32))
- expected_to_fail = TRUE;
+ expected_to_fail = true;
if (low >= H5F_LIBVER_V112)
expected_version = 3;
@@ -1906,7 +1906,7 @@ test_h5s_encode_regular_hyper(H5F_libver_t low, H5F_libver_t high)
static void
test_h5s_encode_irregular_hyper(H5F_libver_t low, H5F_libver_t high)
{
- hid_t fapl = -1; /* File access property list ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list ID */
hid_t sid; /* Dataspace ID */
hsize_t numparticles = 8388608; /* Used to calculate dimension size */
unsigned num_dsets = 513; /* Used to calculate dimension size */
@@ -1934,7 +1934,7 @@ test_h5s_encode_irregular_hyper(H5F_libver_t low, H5F_libver_t high)
/* Testing with each configuration */
for (config = CONFIG_8; config <= CONFIG_32; config++) {
- hbool_t expected_to_fail = FALSE; /* Whether H5Sencode2 is expected to fail */
+ bool expected_to_fail = false; /* Whether H5Sencode2 is expected to fail */
uint32_t expected_version = 0; /* Expected version for selection info */
uint32_t expected_enc_size = 0; /* Expected encoded size for selection info */
@@ -1945,7 +1945,7 @@ test_h5s_encode_irregular_hyper(H5F_libver_t low, H5F_libver_t high)
/* H5Sencode2 is expected to fail for library v110 and below
when the selection exceeds the 32 bits integer limit */
if (high <= H5F_LIBVER_V110 && config == CONFIG_32)
- expected_to_fail = TRUE;
+ expected_to_fail = true;
if (low >= H5F_LIBVER_V112 || config == CONFIG_32)
expected_version = 3;
@@ -2005,7 +2005,7 @@ test_h5s_encode_irregular_hyper(H5F_libver_t low, H5F_libver_t high)
/* Should be irregular hyperslab */
is_regular = H5Sis_regular_hyperslab(sid);
- VERIFY(is_regular, FALSE, "H5Sis_regular_hyperslab");
+ VERIFY(is_regular, false, "H5Sis_regular_hyperslab");
/* Verify the version and encoded size expected for the configuration */
assert(expected_enc_size <= 255);
@@ -2031,7 +2031,7 @@ test_h5s_encode_irregular_hyper(H5F_libver_t low, H5F_libver_t high)
static void
test_h5s_encode_points(H5F_libver_t low, H5F_libver_t high)
{
- hid_t fapl = -1; /* File access property list ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list ID */
hid_t sid; /* Dataspace ID */
hsize_t numparticles = 8388608; /* Used to calculate dimension size */
unsigned num_dsets = 513; /* used to calculate dimension size */
@@ -2039,7 +2039,7 @@ test_h5s_encode_points(H5F_libver_t low, H5F_libver_t high)
hsize_t vdsdims[1] = {total_particles}; /* Dimension size */
hsize_t coord[4]; /* The point coordinates */
herr_t ret; /* Generic return value */
- hbool_t expected_to_fail = FALSE; /* Expected to fail or not */
+ bool expected_to_fail = false; /* Expected to fail or not */
uint32_t expected_version = 0; /* Expected version for selection info */
uint8_t expected_enc_size = 0; /* Expected encoded size of selection info */
@@ -2066,7 +2066,7 @@ test_h5s_encode_points(H5F_libver_t low, H5F_libver_t high)
ret = H5Sselect_elements(sid, H5S_SELECT_SET, (size_t)4, coord);
CHECK(ret, FAIL, "H5Sselect_elements");
- expected_to_fail = FALSE;
+ expected_to_fail = false;
expected_enc_size = 4;
expected_version = 1;
@@ -2091,7 +2091,7 @@ test_h5s_encode_points(H5F_libver_t low, H5F_libver_t high)
/* test 3 */
if (high <= H5F_LIBVER_V110)
- expected_to_fail = TRUE;
+ expected_to_fail = true;
if (high >= H5F_LIBVER_V112) {
expected_version = 2;
@@ -2659,423 +2659,423 @@ test_h5s_extent_equal(void)
/* Compare null dataspace against all others, including itself */
ext_equal = H5Sextent_equal(null_space, null_space);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare scalar dataspace against all others, including itself */
ext_equal = H5Sextent_equal(scalar_space, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, scalar_space);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare small 1-D dataspace w/no max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d1_space1, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d1_space1);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare larger 1-D dataspace w/no max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d1_space2, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d1_space2);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare small 1-D dataspace w/fixed max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d1_space3, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d1_space3);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare small 1-D dataspace w/unlimited max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d1_space4, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d1_space4);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare small 2-D dataspace w/no max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d2_space1, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d2_space1);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare larger 2-D dataspace w/no max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d2_space2, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d2_space2);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare small 2-D dataspace w/fixed max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d2_space3, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d2_space3);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare small 2-D dataspace w/unlimited max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d2_space4, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d2_space4);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare small 3-D dataspace w/no max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d3_space1, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d3_space1);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare larger 2-D dataspace w/no max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d3_space2, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d3_space2);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare small 2-D dataspace w/fixed max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d3_space3, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d3_space3);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare small 2-D dataspace w/unlimited max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d3_space4, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d3_space4);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
/* Close dataspaces */
ret = H5Sclose(null_space);
@@ -3120,8 +3120,11 @@ test_h5s_extent_equal(void)
static void
test_h5s_extent_copy(void)
{
- hid_t spaces[14] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}; /* Array of all dataspaces */
- hid_t tmp_space = -1;
+ hid_t spaces[14] = {
+ H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID}; /* Array of all dataspaces */
+ hid_t tmp_space = H5I_INVALID_HID;
hsize_t d1_dims1[1] = {10}, /* 1-D dimensions */
d1_dims2[1] = {20}, d1_dims3[1] = {H5S_UNLIMITED};
hsize_t d2_dims1[2] = {10, 10}, /* 2-D dimensions */
@@ -3198,7 +3201,7 @@ test_h5s_extent_copy(void)
/* Verify that the extents are equal */
ext_equal = H5Sextent_equal(tmp_space, spaces[j]);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
/* Verify that the correct number of elements is selected */
npoints_ret = H5Sget_select_npoints(tmp_space);
@@ -3210,7 +3213,7 @@ test_h5s_extent_copy(void)
/* Verify that the extents are equal */
ext_equal = H5Sextent_equal(tmp_space, spaces[i]);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
/* Verify that the correct number of elements is selected */
npoints_ret = H5Sget_select_npoints(tmp_space);
@@ -3261,7 +3264,7 @@ test_h5s_bug1(void)
/* Check that space1's selection is valid */
select_valid = H5Sselect_valid(space1);
CHECK(select_valid, FAIL, "H5Sselect_valid");
- VERIFY(select_valid, TRUE, "H5Sselect_valid result");
+ VERIFY(select_valid, true, "H5Sselect_valid result");
/* Close dataspaces */
ret = H5Sclose(space1);
@@ -3309,7 +3312,7 @@ test_h5s_bug2(void)
/* Check that space's selection is valid */
select_valid = H5Sselect_valid(space);
CHECK(select_valid, FAIL, "H5Sselect_valid");
- VERIFY(select_valid, TRUE, "H5Sselect_valid result");
+ VERIFY(select_valid, true, "H5Sselect_valid result");
/* Check that 4 elements are selected */
elements_selected = H5Sget_select_npoints(space);
@@ -3342,15 +3345,15 @@ test_h5s_bug2(void)
static void
test_versionbounds(void)
{
- hid_t file = -1; /* File ID */
- hid_t space = -1; /* Dataspace ID */
- hid_t dset = -1; /* Dataset ID */
- hid_t fapl = -1; /* File access property list ID */
- hid_t dset_space = -1; /* Retrieved dataset's dataspace ID */
- hsize_t dim[1]; /* Dataset dimensions */
- H5F_libver_t low, high; /* File format bounds */
- H5S_t *spacep = NULL; /* Pointer to internal dataspace */
- herr_t ret = 0; /* Generic return value */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t space = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t dset = H5I_INVALID_HID; /* Dataset ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list ID */
+ hid_t dset_space = H5I_INVALID_HID; /* Retrieved dataset's dataspace ID */
+ hsize_t dim[1]; /* Dataset dimensions */
+ H5F_libver_t low, high; /* File format bounds */
+ H5S_t *spacep = NULL; /* Pointer to internal dataspace */
+ herr_t ret = 0; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Version Bounds\n"));
diff --git a/test/thread_id.c b/test/thread_id.c
index d42a48386f8..ed1e0a8a611 100644
--- a/test/thread_id.c
+++ b/test/thread_id.c
@@ -36,9 +36,9 @@ my_errx(int code, const char *fmt, ...)
(void)fprintf(stderr, "thread_id: ");
va_start(ap, fmt);
- (void)HDvfprintf(stderr, fmt, ap);
+ (void)vfprintf(stderr, fmt, ap);
va_end(ap);
- (void)HDfputc('\n', stderr);
+ (void)fputc('\n', stderr);
exit(code);
}
@@ -96,7 +96,7 @@ barrier_lock(pthread_barrier_t *barrier)
int rc;
if ((rc = pthread_mutex_lock(&barrier->mtx)) != 0) {
- my_errx(EXIT_FAILURE, "%s: pthread_mutex_lock: %s", __func__, HDstrerror(rc));
+ my_errx(EXIT_FAILURE, "%s: pthread_mutex_lock: %s", __func__, strerror(rc));
}
}
@@ -106,7 +106,7 @@ barrier_unlock(pthread_barrier_t *barrier)
int rc;
if ((rc = pthread_mutex_unlock(&barrier->mtx)) != 0) {
- my_errx(EXIT_FAILURE, "%s: pthread_mutex_unlock: %s", __func__, HDstrerror(rc));
+ my_errx(EXIT_FAILURE, "%s: pthread_mutex_unlock: %s", __func__, strerror(rc));
}
}
@@ -178,15 +178,15 @@ my_err(int code, const char *fmt, ...)
(void)fprintf(stderr, "thread_id: ");
va_start(ap, fmt);
- (void)HDvfprintf(stderr, fmt, ap);
+ (void)vfprintf(stderr, fmt, ap);
va_end(ap);
- (void)fprintf(stderr, ": %s\n", HDstrerror(errno_copy));
+ (void)fprintf(stderr, ": %s\n", strerror(errno_copy));
exit(code);
}
#define threads_failure(_call, _result) \
do { \
- my_errx(EXIT_FAILURE, "%s.%d: " #_call ": %s", __func__, __LINE__, HDstrerror(_result)); \
+ my_errx(EXIT_FAILURE, "%s.%d: " #_call ": %s", __func__, __LINE__, strerror(_result)); \
} while (false)
#define NTHREADS 5
@@ -204,7 +204,7 @@ atomic_printf(const char *fmt, ...)
ssize_t nprinted, nwritten;
va_start(ap, fmt);
- nprinted = HDvsnprintf(buf, sizeof(buf), fmt, ap);
+ nprinted = vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);
if (nprinted == -1)
diff --git a/test/tid.c b/test/tid.c
index 0cb16abf182..bf557fa34da 100644
--- a/test/tid.c
+++ b/test/tid.c
@@ -380,15 +380,15 @@ test_is_valid(void)
/* Check that the ID is valid */
tri_ret = H5Iis_valid(dtype);
- VERIFY(tri_ret, TRUE, "H5Iis_valid");
- if (tri_ret != TRUE)
+ VERIFY(tri_ret, true, "H5Iis_valid");
+ if (tri_ret != true)
goto out;
/* Artificially manipulate the reference counts so app_count is 0, and dtype
* appears to be an internal id. This takes advantage of the fact that
* H5Ipkg is included.
*/
- ret = H5I_inc_ref(dtype, FALSE);
+ ret = H5I_inc_ref(dtype, false);
CHECK(ret, FAIL, "H5I_inc_ref");
if (ret < 0)
goto out;
@@ -399,8 +399,8 @@ test_is_valid(void)
/* Check that dtype is invalid */
tri_ret = H5Iis_valid(dtype);
- VERIFY(tri_ret, FALSE, "H5Iis_valid");
- if (tri_ret != FALSE)
+ VERIFY(tri_ret, false, "H5Iis_valid");
+ if (tri_ret != false)
goto out;
/* Close dtype and verify that it has been closed */
@@ -419,14 +419,14 @@ test_is_valid(void)
/* Check that dtype is invalid */
tri_ret = H5Iis_valid(dtype);
- VERIFY(tri_ret, FALSE, "H5Iis_valid");
- if (tri_ret != FALSE)
+ VERIFY(tri_ret, false, "H5Iis_valid");
+ if (tri_ret != false)
goto out;
/* Check that an id of -1 is invalid */
- tri_ret = H5Iis_valid((hid_t)-1);
- VERIFY(tri_ret, FALSE, "H4Iis_valid");
- if (tri_ret != FALSE)
+ tri_ret = H5Iis_valid((hid_t)H5I_INVALID_HID);
+ VERIFY(tri_ret, false, "H4Iis_valid");
+ if (tri_ret != false)
goto out;
return 0;
@@ -465,7 +465,7 @@ test_get_type(void)
goto out;
/* Check that the ID is correct */
- type_ret = H5Iget_type((hid_t)-1);
+ type_ret = H5Iget_type((hid_t)H5I_INVALID_HID);
VERIFY(type_ret, H5I_BADID, "H5Iget_type");
if (type_ret != H5I_BADID)
goto out;
@@ -602,7 +602,7 @@ typedef struct rct_obj_t {
/* Whether we are currently freeing this object directly
* through H5Idec_ref().
*/
- hbool_t freeing;
+ bool freeing;
/* Pointer to the master list of all objects */
rct_obj_list_t *list;
@@ -660,7 +660,7 @@ rct_free_cb(void *_obj, void H5_ATTR_UNUSED **_ctx)
* not free another object. We don't want to recursively free the
* entire list when we free the first ID.
*/
- obj->list->objects[i].freeing = TRUE;
+ obj->list->objects[i].freeing = true;
/* Decrement the reference count on the object */
ret = H5Idec_ref(obj->list->objects[i].id);
@@ -669,7 +669,7 @@ rct_free_cb(void *_obj, void H5_ATTR_UNUSED **_ctx)
goto error;
/* Unset the "freeing" flag */
- obj->list->objects[i].freeing = FALSE;
+ obj->list->objects[i].freeing = false;
}
/* Verify the number of objects remaining in the master list is non-negative */
@@ -734,7 +734,7 @@ test_remove_clear_type(void)
/* Object setup */
objects[j].nfrees = 0;
- objects[j].freeing = FALSE;
+ objects[j].freeing = false;
objects[j].list = &obj_list;
/* Register an ID for it */
@@ -753,13 +753,13 @@ test_remove_clear_type(void)
}
/******************************************
- * Clear the type with force set to FALSE *
+ * Clear the type with force set to false *
******************************************/
- /* Clear the type. Since force is FALSE, only
+ /* Clear the type. Since force is false, only
* IDs with a reference count of 1 will be cleared.
*/
- ret = H5Iclear_type(obj_type, FALSE);
+ ret = H5Iclear_type(obj_type, false);
CHECK(ret, FAIL, "H5Iclear_type");
if (ret == FAIL)
goto error;
@@ -782,8 +782,8 @@ test_remove_clear_type(void)
}
/* No object should still be marked as "freeing" */
- VERIFY(objects[j].freeing, FALSE, "object marked as freeing");
- if (objects[j].freeing != FALSE)
+ VERIFY(objects[j].freeing, false, "object marked as freeing");
+ if (objects[j].freeing != false)
goto error;
}
@@ -804,11 +804,11 @@ test_remove_clear_type(void)
goto error;
/*****************************************
- * Clear the type with force set to TRUE *
+ * Clear the type with force set to true *
*****************************************/
- /* Clear the type. Since force is TRUE, all IDs will be cleared. */
- ret = H5Iclear_type(obj_type, TRUE);
+ /* Clear the type. Since force is true, all IDs will be cleared. */
+ ret = H5Iclear_type(obj_type, true);
CHECK(ret, FAIL, "H5Iclear_type");
if (ret == FAIL)
goto error;
@@ -822,8 +822,8 @@ test_remove_clear_type(void)
goto error;
/* No object should still be marked as "freeing" */
- VERIFY(objects[j].freeing, FALSE, "object marked as freeing");
- if (objects[j].freeing != FALSE)
+ VERIFY(objects[j].freeing, false, "object marked as freeing");
+ if (objects[j].freeing != false)
goto error;
}
@@ -1339,7 +1339,7 @@ test_future_ids(void)
CHECK(ret, FAIL, "H5Pisa_class");
if (FAIL == ret)
goto error;
- if (TRUE != ret)
+ if (true != ret)
goto error;
/* Verify that the application believes the ID is still a property list */
diff --git a/test/timer.c b/test/timer.c
index 9d92d0d9e3b..e992cbaa734 100644
--- a/test/timer.c
+++ b/test/timer.c
@@ -35,55 +35,55 @@ test_time_formatting(void)
/* < 0, N/A */
s = H5_timer_get_time_string(-1.0);
- if (NULL == s || HDstrcmp(s, "N/A") != 0)
+ if (NULL == s || strcmp(s, "N/A") != 0)
TEST_ERROR;
free(s);
/* 0 0 */
s = H5_timer_get_time_string(0.0);
- if (NULL == s || HDstrcmp(s, "0.0 s") != 0)
+ if (NULL == s || strcmp(s, "0.0 s") != 0)
TEST_ERROR;
free(s);
/* < 1 us nanoseconds */
s = H5_timer_get_time_string(123.0E-9);
- if (NULL == s || HDstrcmp(s, "123 ns") != 0)
+ if (NULL == s || strcmp(s, "123 ns") != 0)
TEST_ERROR;
free(s);
/* < 1 ms microseconds */
s = H5_timer_get_time_string(23.456E-6);
- if (NULL == s || HDstrcmp(s, "23.5 us") != 0)
+ if (NULL == s || strcmp(s, "23.5 us") != 0)
TEST_ERROR;
free(s);
/* < 1 s milliseconds */
s = H5_timer_get_time_string(4.56789E-3);
- if (NULL == s || HDstrcmp(s, "4.6 ms") != 0)
+ if (NULL == s || strcmp(s, "4.6 ms") != 0)
TEST_ERROR;
free(s);
/* < 1 min seconds */
s = H5_timer_get_time_string(3.14);
- if (NULL == s || HDstrcmp(s, "3.14 s") != 0)
+ if (NULL == s || strcmp(s, "3.14 s") != 0)
TEST_ERROR;
free(s);
/* < 1 hr mins, secs */
s = H5_timer_get_time_string(2521.0);
- if (NULL == s || HDstrcmp(s, "42 m 1 s") != 0)
+ if (NULL == s || strcmp(s, "42 m 1 s") != 0)
TEST_ERROR;
free(s);
/* < 1 d hrs, mins, secs */
s = H5_timer_get_time_string(9756.0);
- if (NULL == s || HDstrcmp(s, "2 h 42 m 36 s") != 0)
+ if (NULL == s || strcmp(s, "2 h 42 m 36 s") != 0)
TEST_ERROR;
free(s);
/* > 1 d days, hrs, mins, secs */
s = H5_timer_get_time_string(280802.0);
- if (NULL == s || HDstrcmp(s, "3 d 6 h 0 m 2 s") != 0)
+ if (NULL == s || strcmp(s, "3 d 6 h 0 m 2 s") != 0)
TEST_ERROR;
free(s);
diff --git a/test/titerate.c b/test/titerate.c
index 8f5e44cb68b..57b4d0664fd 100644
--- a/test/titerate.c
+++ b/test/titerate.c
@@ -52,8 +52,8 @@ typedef struct {
#define CORRUPTED_ATNAMELEN_FILE "memleak_H5O_dtype_decode_helper_H5Odtype.h5"
#define DSET_NAME "image"
typedef struct searched_err_t {
- char message[256];
- hbool_t found;
+ char message[256];
+ bool found;
} searched_err_t;
/* Call back function for test_corrupted_attnamelen */
@@ -74,7 +74,7 @@ herr_t aiter_cb(hid_t group, const char *name, const H5A_info_t *ainfo, v
H5_ATTR_PURE int
iter_strcmp(const void *s1, const void *s2)
{
- return (HDstrcmp(*(const char *const *)s1, *(const char *const *)s2));
+ return (strcmp(*(const char *const *)s1, *(const char *const *)s2));
}
/****************************************************************
@@ -90,7 +90,7 @@ liter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2_t H5_ATTR
static int count = 0;
static int count2 = 0;
- HDstrcpy(info->name, name);
+ strcpy(info->name, name);
switch (info->command) {
case RET_ZERO:
@@ -119,7 +119,7 @@ liter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2_t H5_ATTR
**
****************************************************************/
static void
-test_iter_group(hid_t fapl, hbool_t new_format)
+test_iter_group(hid_t fapl, bool new_format)
{
hid_t file; /* File ID */
hid_t dataset; /* Dataset ID */
@@ -155,12 +155,12 @@ test_iter_group(hid_t fapl, hbool_t new_format)
CHECK(filespace, FAIL, "H5Screate");
for (i = 0; i < NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "Dataset %d", i);
+ snprintf(name, sizeof(name), "Dataset %d", i);
dataset = H5Dcreate2(file, name, datatype, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(dataset, FAIL, "H5Dcreate2");
/* Keep a copy of the dataset names around for later */
- lnames[i] = HDstrdup(name);
+ lnames[i] = strdup(name);
CHECK_PTR(lnames[i], "strdup");
ret = H5Dclose(dataset);
@@ -171,13 +171,13 @@ test_iter_group(hid_t fapl, hbool_t new_format)
grp = H5Gcreate2(file, "grp", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Gcreate2");
- lnames[NDATASETS] = HDstrdup("grp");
+ lnames[NDATASETS] = strdup("grp");
CHECK_PTR(lnames[NDATASETS], "strdup");
ret = H5Tcommit2(file, "dtype", datatype, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tcommit2");
- lnames[NDATASETS + 1] = HDstrdup("dtype");
+ lnames[NDATASETS + 1] = strdup("dtype");
CHECK_PTR(lnames[NDATASETS], "strdup");
/* Close everything up */
@@ -319,7 +319,7 @@ test_iter_group(hid_t fapl, hbool_t new_format)
TestErrPrintf("Group iteration function walked too far!\n");
/* Verify that the correct name is retrieved */
- if (HDstrcmp(info.name, lnames[(size_t)(idx - 1)]) != 0)
+ if (strcmp(info.name, lnames[(size_t)(idx - 1)]) != 0)
TestErrPrintf(
"Group iteration function didn't return name correctly for link - lnames[%u] = '%s'!\n",
(unsigned)(idx - 1), lnames[(size_t)(idx - 1)]);
@@ -348,7 +348,7 @@ test_iter_group(hid_t fapl, hbool_t new_format)
TestErrPrintf("Group iteration function walked too far!\n");
/* Verify that the correct name is retrieved */
- if (HDstrcmp(info.name, lnames[(size_t)(idx - 1)]) != 0)
+ if (strcmp(info.name, lnames[(size_t)(idx - 1)]) != 0)
TestErrPrintf(
"Group iteration function didn't return name correctly for link - lnames[%u] = '%s'!\n",
(unsigned)(idx - 1), lnames[(size_t)(idx - 1)]);
@@ -379,7 +379,7 @@ aiter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5A_info_t H5_ATTR_
static int count = 0;
static int count2 = 0;
- HDstrcpy(info->name, name);
+ strcpy(info->name, name);
switch (info->command) {
case RET_ZERO:
@@ -408,7 +408,7 @@ aiter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5A_info_t H5_ATTR_
**
****************************************************************/
static void
-test_iter_attr(hid_t fapl, hbool_t new_format)
+test_iter_attr(hid_t fapl, bool new_format)
{
hid_t file; /* File ID */
hid_t dataset; /* Common Dataset ID */
@@ -435,12 +435,12 @@ test_iter_attr(hid_t fapl, hbool_t new_format)
CHECK(dataset, FAIL, "H5Dcreate2");
for (i = 0; i < NATTR; i++) {
- HDsnprintf(name, sizeof(name), "Attribute %02d", i);
+ snprintf(name, sizeof(name), "Attribute %02d", i);
attribute = H5Acreate2(dataset, name, H5T_NATIVE_INT, filespace, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attribute, FAIL, "H5Acreate2");
/* Keep a copy of the attribute names around for later */
- anames[i] = HDstrdup(name);
+ anames[i] = strdup(name);
CHECK_PTR(anames[i], "strdup");
ret = H5Aclose(attribute);
@@ -509,7 +509,7 @@ test_iter_attr(hid_t fapl, hbool_t new_format)
/* Don't check name when new format is used */
if (!new_format) {
/* Verify that the correct name is retrieved */
- if (HDstrcmp(info.name, anames[(size_t)idx - 1]) != 0)
+ if (strcmp(info.name, anames[(size_t)idx - 1]) != 0)
TestErrPrintf("%u: Attribute iteration function didn't set names correctly, info.name = "
"'%s', anames[%u] = '%s'!\n",
__LINE__, info.name, (unsigned)(idx - 1), anames[(size_t)idx - 1]);
@@ -538,7 +538,7 @@ test_iter_attr(hid_t fapl, hbool_t new_format)
/* Don't check name when new format is used */
if (!new_format) {
/* Verify that the correct name is retrieved */
- if (HDstrcmp(info.name, anames[(size_t)idx - 1]) != 0)
+ if (strcmp(info.name, anames[(size_t)idx - 1]) != 0)
TestErrPrintf("%u: Attribute iteration function didn't set names correctly, info.name = "
"'%s', anames[%u] = '%s'!\n",
__LINE__, info.name, (unsigned)(idx - 1), anames[(size_t)idx - 1]);
@@ -569,7 +569,7 @@ test_iter_attr(hid_t fapl, hbool_t new_format)
H5_ATTR_PURE int
iter_strcmp2(const void *s1, const void *s2)
{
- return (HDstrcmp((const char *)s1, (const char *)s2));
+ return (strcmp((const char *)s1, (const char *)s2));
} /* end iter_strcmp2() */
/****************************************************************
@@ -584,7 +584,7 @@ liter_cb2(hid_t loc_id, const char *name, const H5L_info2_t H5_ATTR_UNUSED *link
H5O_info2_t oinfo;
herr_t ret; /* Generic return value */
- if (HDstrcmp(name, test_info->name) != 0) {
+ if (strcmp(name, test_info->name) != 0) {
TestErrPrintf("name = '%s', test_info = '%s'\n", name, test_info->name);
return (H5_ITER_ERROR);
} /* end if */
@@ -648,10 +648,10 @@ test_iter_group_large(hid_t fapl)
/* Create a bunch of groups */
for (i = 0; i < ITER_NGROUPS; i++) {
- HDsnprintf(gname, sizeof(gname), "Group_%d", i);
+ snprintf(gname, sizeof(gname), "Group_%d", i);
/* Add the name to the list of objects in the root group */
- HDstrcpy(names[i].name, gname);
+ strcpy(names[i].name, gname);
names[i].type = H5O_TYPE_GROUP;
/* Create a group */
@@ -668,7 +668,7 @@ test_iter_group_large(hid_t fapl)
CHECK(dataset, FAIL, "H5Dcreate2");
/* Add the name to the list of objects in the root group */
- HDstrcpy(names[ITER_NGROUPS].name, "Dataset1");
+ strcpy(names[ITER_NGROUPS].name, "Dataset1");
names[ITER_NGROUPS].type = H5O_TYPE_DATASET;
/* Close Dataset */
@@ -698,7 +698,7 @@ test_iter_group_large(hid_t fapl)
CHECK(ret, FAIL, "H5Tcommit2");
/* Add the name to the list of objects in the root group */
- HDstrcpy(names[ITER_NGROUPS + 1].name, "Datatype1");
+ strcpy(names[ITER_NGROUPS + 1].name, "Datatype1");
names[ITER_NGROUPS + 1].type = H5O_TYPE_NAMED_DATATYPE;
/* Close datatype */
@@ -765,12 +765,12 @@ test_grp_memb_funcs(hid_t fapl)
CHECK(filespace, FAIL, "H5Screate");
for (i = 0; i < NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "Dataset %d", i);
+ snprintf(name, sizeof(name), "Dataset %d", i);
dataset = H5Dcreate2(file, name, datatype, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(dataset, FAIL, "H5Dcreate2");
/* Keep a copy of the dataset names around for later */
- dnames[i] = HDstrdup(name);
+ dnames[i] = strdup(name);
CHECK_PTR(dnames[i], "strdup");
ret = H5Dclose(dataset);
@@ -781,13 +781,13 @@ test_grp_memb_funcs(hid_t fapl)
grp = H5Gcreate2(file, "grp", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Gcreate2");
- dnames[NDATASETS] = HDstrdup("grp");
+ dnames[NDATASETS] = strdup("grp");
CHECK_PTR(dnames[NDATASETS], "strdup");
ret = H5Tcommit2(file, "dtype", datatype, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tcommit2");
- dnames[NDATASETS + 1] = HDstrdup("dtype");
+ dnames[NDATASETS + 1] = strdup("dtype");
CHECK_PTR(dnames[NDATASETS], "strdup");
/* Close everything up */
@@ -836,18 +836,18 @@ test_grp_memb_funcs(hid_t fapl)
VERIFY(ret, name_len, "H5Lget_name_by_idx");
/* Keep a copy of the dataset names around for later */
- obj_names[i] = HDstrdup(dataset_name);
+ obj_names[i] = strdup(dataset_name);
CHECK_PTR(obj_names[i], "strdup");
ret = H5Oget_info_by_idx3(root_group, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, &oinfo,
H5O_INFO_BASIC, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_idx3");
- if (!HDstrcmp(dataset_name, "grp"))
+ if (!strcmp(dataset_name, "grp"))
VERIFY(oinfo.type, H5O_TYPE_GROUP, "H5Lget_name_by_idx");
- if (!HDstrcmp(dataset_name, "dtype"))
+ if (!strcmp(dataset_name, "dtype"))
VERIFY(oinfo.type, H5O_TYPE_NAMED_DATATYPE, "H5Lget_name_by_idx");
- if (!HDstrncmp(dataset_name, "Dataset", (size_t)7))
+ if (!strncmp(dataset_name, "Dataset", (size_t)7))
VERIFY(oinfo.type, H5O_TYPE_DATASET, "H5Lget_name_by_idx");
} /* end for */
@@ -865,8 +865,8 @@ test_grp_memb_funcs(hid_t fapl)
/* Compare object names */
for (i = 0; i < (int)ginfo.nlinks; i++) {
- ret = HDstrcmp(dnames[i], obj_names[i]);
- VERIFY(ret, 0, "HDstrcmp");
+ ret = strcmp(dnames[i], obj_names[i]);
+ VERIFY(ret, 0, "strcmp");
} /* end for */
ret = H5Gclose(root_group);
@@ -944,11 +944,11 @@ test_links(hid_t fapl)
CHECK(ret, FAIL, "H5Oget_info_by_idx3");
} /* end if */
- if (!HDstrcmp(obj_name, "g1.1"))
+ if (!strcmp(obj_name, "g1.1"))
VERIFY(oinfo.type, H5O_TYPE_GROUP, "H5Lget_name_by_idx");
- else if (!HDstrcmp(obj_name, "hardlink"))
+ else if (!strcmp(obj_name, "hardlink"))
VERIFY(oinfo.type, H5O_TYPE_GROUP, "H5Lget_name_by_idx");
- else if (!HDstrcmp(obj_name, "softlink"))
+ else if (!strcmp(obj_name, "softlink"))
VERIFY(linfo.type, H5L_TYPE_SOFT, "H5Lget_name_by_idx");
else
ERROR("unknown object name");
@@ -985,8 +985,8 @@ find_err_msg_cb(unsigned H5_ATTR_UNUSED n, const H5E_error2_t *err_desc, void *_
return H5_ITER_ERROR;
/* If the searched error message is found, stop the iteration */
- if (err_desc->desc != NULL && HDstrcmp(err_desc->desc, searched_err->message) == 0) {
- searched_err->found = TRUE;
+ if (err_desc->desc != NULL && strcmp(err_desc->desc, searched_err->message) == 0) {
+ searched_err->found = true;
status = H5_ITER_STOP;
}
@@ -1003,12 +1003,12 @@ find_err_msg_cb(unsigned H5_ATTR_UNUSED n, const H5E_error2_t *err_desc, void *_
static void
test_corrupted_attnamelen(void)
{
- hid_t fid = -1; /* File ID */
- hid_t did = -1; /* Dataset ID */
- searched_err_t err_caught; /* Data to be passed to callback func */
- int err_status; /* Status returned by H5Aiterate2 */
- herr_t ret; /* Return value */
- hbool_t driver_is_default_compatible;
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ searched_err_t err_caught; /* Data to be passed to callback func */
+ int err_status; /* Status returned by H5Aiterate2 */
+ herr_t ret; /* Return value */
+ bool driver_is_default_compatible;
const char *testfile = H5_get_srcdir_filename(CORRUPTED_ATNAMELEN_FILE); /* Corrected test file name */
/* The error message produced when the failure occurs
@@ -1043,15 +1043,15 @@ test_corrupted_attnamelen(void)
/* Make sure the intended error was caught */
if (err_status == -1) {
/* Initialize client data */
- HDstrcpy(err_caught.message, err_message);
- err_caught.found = FALSE;
+ strcpy(err_caught.message, err_message);
+ err_caught.found = false;
/* Look for the correct error message */
ret = H5Ewalk2(H5E_DEFAULT, H5E_WALK_UPWARD, find_err_msg_cb, &err_caught);
CHECK(ret, FAIL, "H5Ewalk2");
/* Fail if the indicated message is not found */
- CHECK(err_caught.found, FALSE, "test_corrupted_attnamelen: Expected error not found");
+ CHECK(err_caught.found, false, "test_corrupted_attnamelen: Expected error not found");
}
/* Close the dataset and file */
@@ -1126,11 +1126,11 @@ test_links_deprec(hid_t fapl)
CHECK(ret, FAIL, "H5Oget_info_by_idx");
} /* end if */
- if (!HDstrcmp(obj_name, "g1.1"))
+ if (!strcmp(obj_name, "g1.1"))
VERIFY(oinfo.type, H5O_TYPE_GROUP, "H5Lget_name_by_idx");
- else if (!HDstrcmp(obj_name, "hardlink"))
+ else if (!strcmp(obj_name, "hardlink"))
VERIFY(oinfo.type, H5O_TYPE_GROUP, "H5Lget_name_by_idx");
- else if (!HDstrcmp(obj_name, "softlink"))
+ else if (!strcmp(obj_name, "softlink"))
VERIFY(linfo.type, H5L_TYPE_SOFT, "H5Lget_name_by_idx");
else
ERROR("unknown object name");
@@ -1175,7 +1175,7 @@ test_iterate(void)
CHECK(ret, FAIL, "H5Pset_libver_bounds");
/* These next tests use the same file */
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
test_iter_group(new_format ? fapl2 : fapl, new_format); /* Test group iteration */
test_iter_group_large(new_format ? fapl2 : fapl); /* Test group iteration for large # of objects */
test_iter_attr(new_format ? fapl2 : fapl, new_format); /* Test attribute iteration */
diff --git a/test/tmisc.c b/test/tmisc.c
index b66a80e6656..c43f54fe07f 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -448,8 +448,8 @@ test_misc2_write_attribute(void)
hid_t type;
herr_t ret;
misc2_struct data, data_check;
- char *string_att1 = HDstrdup("string attribute in file one");
- char *string_att2 = HDstrdup("string attribute in file two");
+ char *string_att1 = strdup("string attribute in file one");
+ char *string_att2 = strdup("string attribute in file two");
type = misc2_create_type();
@@ -1088,7 +1088,7 @@ test_misc6(void)
/* Loop through adding attributes to each dataset */
for (u = 0; u < MISC6_NUMATTR; u++) {
/* Create name for attribute */
- HDsnprintf(attr_name, sizeof(attr_name), "Attr#%u", u);
+ snprintf(attr_name, sizeof(attr_name), "Attr#%u", u);
/* Open the file */
loc_id = H5Fopen(MISC6_FILE, H5F_ACC_RDWR, H5P_DEFAULT);
@@ -1800,7 +1800,7 @@ test_misc10(void)
hid_t dcpl; /* Dataset creation property list */
hid_t space, type; /* Old dataset's dataspace & datatype */
const char *testfile = H5_get_srcdir_filename(MISC10_FILE_OLD); /* Corrected test file name */
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
herr_t ret;
/* Output message about test being performed */
@@ -1883,7 +1883,7 @@ test_misc11(void)
H5F_info2_t finfo; /* global information about file */
H5F_fspace_strategy_t strategy; /* File space strategy */
hsize_t threshold; /* Free-space section threshold */
- hbool_t persist; /* To persist free-space or not */
+ bool persist; /* To persist free-space or not */
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -1944,7 +1944,7 @@ test_misc11(void)
ret = H5Pset_shared_mesg_nindexes(fcpl, MISC11_NINDEXES);
CHECK(ret, FAIL, "H5Pset_shared_mesg");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_NONE, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_NONE, false, (hsize_t)1);
CHECK(ret, FAIL, "H5Pset_file_space");
/* Creating a file with the non-default file creation property list should
@@ -2011,7 +2011,7 @@ test_misc11(void)
ret = H5Pget_file_space_strategy(fcpl, &strategy, &persist, &threshold);
CHECK(ret, FAIL, "H5Pget_file_space_strategy");
VERIFY(strategy, 3, "H5Pget_file_space_strategy");
- VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
+ VERIFY(persist, false, "H5Pget_file_space_strategy");
VERIFY(threshold, 1, "H5Pget_file_space_strategy");
/* Close file */
@@ -2115,11 +2115,11 @@ test_misc12(void)
CHECK(ret, FAIL, "H5Dread");
for (i = 0; i < MISC12_SPACE1_DIM1; i++)
- if (HDstrcmp(wdata[i], rdata[i]) != 0)
+ if (strcmp(wdata[i], rdata[i]) != 0)
TestErrPrintf("Error on line %d: wdata[%d]=%s, rdata[%d]=%s\n", __LINE__, i, wdata[i], i,
rdata[i]);
for (; i < (MISC12_SPACE1_DIM1 + MISC12_APPEND_SIZE); i++)
- if (HDstrcmp(wdata1[i - MISC12_SPACE1_DIM1], rdata[i]) != 0)
+ if (strcmp(wdata1[i - MISC12_SPACE1_DIM1], rdata[i]) != 0)
TestErrPrintf("Error on line %d: wdata1[%d]=%s, rdata[%d]=%s\n", __LINE__, i - MISC12_SPACE1_DIM1,
wdata1[i - MISC12_SPACE1_DIM1], i, rdata[i]);
@@ -2157,25 +2157,25 @@ misc13_init_data(unsigned *original_data)
original_data[u] = u;
}
-static hbool_t
+static bool
misc13_verify_data_match(const unsigned *original_data, const unsigned *read_data)
{
unsigned u;
for (u = 0; u < MISC13_DIM1; u++)
if (original_data[u] != read_data[u])
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
static void
misc13_create_dataset(hid_t loc_id, const char *name, hid_t dcpl, const unsigned *data)
{
- hid_t dsid = -1; /* Dataset ID */
- hid_t sid = -1; /* Dataspace ID */
- hsize_t dims[MISC13_RANK]; /* Dataset dimensions */
- herr_t ret; /* Generic return value */
+ hid_t dsid = H5I_INVALID_HID; /* Dataset ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hsize_t dims[MISC13_RANK]; /* Dataset dimensions */
+ herr_t ret; /* Generic return value */
/* Create dataspace for use with dataset */
dims[0] = MISC13_DIM1;
@@ -2203,9 +2203,9 @@ misc13_create_dataset(hid_t loc_id, const char *name, hid_t dcpl, const unsigned
static void
misc13_verify_dataset(hid_t loc_id, const char *name, const unsigned *data)
{
- unsigned *read_data = NULL; /* Data to write to dataset */
- hid_t dsid = -1; /* Dataset ID */
- herr_t ret; /* Generic return value */
+ unsigned *read_data = NULL; /* Data to write to dataset */
+ hid_t dsid = H5I_INVALID_HID; /* Dataset ID */
+ herr_t ret; /* Generic return value */
/* Create a data buffer for the dataset read */
read_data = (unsigned *)calloc(MISC13_DIM1, sizeof(unsigned));
@@ -2235,13 +2235,13 @@ misc13_verify_dataset(hid_t loc_id, const char *name, const unsigned *data)
static void
misc13_create_hdf_file(const char *name, const unsigned *data)
{
- hid_t fid = -1; /* File ID */
- hid_t gid1 = -1; /* Group ID (level 1) */
- hid_t gid2 = -1; /* Group ID (level 2) */
- hid_t tid = -1; /* Datatype ID */
- hid_t dcplid = -1; /* Dataset creation property list ID */
- hsize_t chunk_dims[MISC13_RANK]; /* Chunk dimensions */
- herr_t ret; /* Generic return value */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid1 = H5I_INVALID_HID; /* Group ID (level 1) */
+ hid_t gid2 = H5I_INVALID_HID; /* Group ID (level 2) */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t dcplid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hsize_t chunk_dims[MISC13_RANK]; /* Chunk dimensions */
+ herr_t ret; /* Generic return value */
/* Create file */
fid = H5Fcreate(name, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -2338,7 +2338,7 @@ misc13_insert_user_block(const char *old_name, const char *new_name, const char
CHECK_PTR(user_block, "calloc");
/* Copy in the user block data */
- memcpy(user_block, str, HDstrlen(str));
+ memcpy(user_block, str, strlen(str));
/* Open the new file */
new_fp = fopen(new_name, "wb");
@@ -2380,16 +2380,15 @@ misc13_insert_user_block(const char *old_name, const char *new_name, const char
} /* end misc13_insert_user_block() */
static void
-misc13_verify_file(const char *name, const unsigned *data, hsize_t userblock_size,
- hbool_t check_for_new_dataset)
+misc13_verify_file(const char *name, const unsigned *data, hsize_t userblock_size, bool check_for_new_dataset)
{
- hid_t fid = -1; /* File ID */
- hid_t gid1 = -1; /* Group IDs */
- hid_t gid2 = -1; /* Group IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t fcplid = -1; /* File creation property list ID */
- hsize_t ub_size_out; /* Userblock size retrieved from FCPL */
- herr_t ret; /* Generic return value */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid1 = H5I_INVALID_HID; /* Group IDs */
+ hid_t gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t fcplid = H5I_INVALID_HID; /* File creation property list ID */
+ hsize_t ub_size_out; /* Userblock size retrieved from FCPL */
+ herr_t ret; /* Generic return value */
/* Open the file */
fid = H5Fopen(name, H5F_ACC_RDONLY, H5P_DEFAULT);
@@ -2425,7 +2424,7 @@ misc13_verify_file(const char *name, const unsigned *data, hsize_t userblock_siz
CHECK(tid, FAIL, "H5Topen2");
/* Verify the type is correct */
- VERIFY(H5Tequal(tid, H5T_NATIVE_INT), TRUE, "H5Tequal");
+ VERIFY(H5Tequal(tid, H5T_NATIVE_INT), true, "H5Tequal");
/* Close named datatype */
ret = H5Tclose(tid);
@@ -2446,7 +2445,7 @@ misc13_verify_file(const char *name, const unsigned *data, hsize_t userblock_siz
CHECK(tid, FAIL, "H5Topen2");
/* Verify the type is correct */
- VERIFY(H5Tequal(tid, H5T_NATIVE_INT), TRUE, "H5Tequal");
+ VERIFY(H5Tequal(tid, H5T_NATIVE_INT), true, "H5Tequal");
/* Close named datatype */
ret = H5Tclose(tid);
@@ -2473,8 +2472,8 @@ misc13_verify_file(const char *name, const unsigned *data, hsize_t userblock_siz
static void
misc13_add_to_new_file(const char *name, const unsigned *data)
{
- hid_t fid = -1; /* File ID */
- herr_t ret; /* Generic return value */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ herr_t ret; /* Generic return value */
/* Open the file */
fid = H5Fopen(name, H5F_ACC_RDWR, H5P_DEFAULT);
@@ -2500,7 +2499,7 @@ test_misc13(void)
{
unsigned *data = NULL; /* Data to write to dataset */
hsize_t userblock_size; /* Correct size of userblock */
- hbool_t check_for_new_dataset; /* Whether to check for the post-userblock-creation dataset */
+ bool check_for_new_dataset; /* Whether to check for the post-userblock-creation dataset */
/* Create a data buffer for the datasets */
data = (unsigned *)calloc(MISC13_DIM1, sizeof(unsigned));
@@ -2514,7 +2513,7 @@ test_misc13(void)
/* Verify file contents are correct */
userblock_size = 0;
- check_for_new_dataset = FALSE;
+ check_for_new_dataset = false;
misc13_verify_file(MISC13_FILE_1, data, userblock_size, check_for_new_dataset);
/* Create a new file by inserting a user block in front of the first file */
@@ -2522,7 +2521,7 @@ test_misc13(void)
/* Verify file contents are still correct */
userblock_size = MISC13_USERBLOCK_SIZE;
- check_for_new_dataset = FALSE;
+ check_for_new_dataset = false;
misc13_verify_file(MISC13_FILE_2, data, userblock_size, check_for_new_dataset);
/* Make certain we can modify the new file */
@@ -2530,7 +2529,7 @@ test_misc13(void)
/* Verify file contents are still correct */
userblock_size = MISC13_USERBLOCK_SIZE;
- check_for_new_dataset = TRUE;
+ check_for_new_dataset = true;
misc13_verify_file(MISC13_FILE_2, data, userblock_size, check_for_new_dataset);
/* Free the dataset buffer */
@@ -2870,13 +2869,13 @@ test_misc16(void)
/* Compare data read in */
for (i = 0; i < MISC16_SPACE_DIM; i++) {
- if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
+ if (strlen(wdata[i]) != strlen(rdata[i])) {
TestErrPrintf(
"Line %u: VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",
- (unsigned)__LINE__, (int)i, (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (unsigned)__LINE__, (int)i, (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
continue;
} /* end if */
- if (HDstrcmp(wdata[i], rdata[i]) != 0) {
+ if (strcmp(wdata[i], rdata[i]) != 0) {
TestErrPrintf("Line %u: VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n",
(unsigned)__LINE__, (int)i, wdata[i], (int)i, rdata[i]);
continue;
@@ -2955,13 +2954,13 @@ test_misc17(void)
/* Compare data in the way of strings. */
for (i = 0; i < MISC17_SPACE_DIM1; i++) {
- if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
+ if (strlen(wdata[i]) != strlen(rdata[i])) {
TestErrPrintf(
"Line %u: VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",
- (unsigned)__LINE__, (int)i, (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (unsigned)__LINE__, (int)i, (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
continue;
} /* end if */
- if (HDstrcmp(wdata[i], rdata[i]) != 0) {
+ if (strcmp(wdata[i], rdata[i]) != 0) {
TestErrPrintf("Line %u: VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n",
(unsigned)__LINE__, (int)i, wdata[i], (int)i, rdata[i]);
continue;
@@ -3067,7 +3066,7 @@ test_misc18(void)
/* Loop creating attributes on each dataset, flushing them to the file each time */
for (u = 0; u < 10; u++) {
/* Set up attribute name */
- HDsnprintf(attr_name, sizeof(attr_name), "Attr %u", u);
+ snprintf(attr_name, sizeof(attr_name), "Attr %u", u);
/* Create & close attribute on first dataset */
aid = H5Acreate2(did1, attr_name, H5T_STD_U32LE, sid, H5P_DEFAULT, H5P_DEFAULT);
@@ -3154,23 +3153,23 @@ test_misc18(void)
static void
test_misc19(void)
{
- hid_t fid = -1; /* File ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t tid = -1; /* Datatype ID */
- hid_t aid = -1; /* Attribute ID */
- hid_t plid = -1; /* Property List ID */
- hid_t pcid = -1; /* Property Class ID */
- hid_t gid = -1; /* Group ID */
- hid_t ecid = -1; /* Error Class ID */
- hid_t emid = -1; /* Error Message ID */
- hid_t esid = -1; /* Error Stack ID */
- hid_t vfdid = -1; /* Virtual File Driver ID */
- hid_t volid = -1; /* Virtual Object Layer ID */
- H5FD_class_t *vfd_cls = NULL; /* VFD class */
- H5VL_class_t *vol_cls = NULL; /* VOL class */
- int rc; /* Reference count */
- herr_t ret; /* Generic return value */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ hid_t plid = H5I_INVALID_HID; /* Property List ID */
+ hid_t pcid = H5I_INVALID_HID; /* Property Class ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t ecid = H5I_INVALID_HID; /* Error Class ID */
+ hid_t emid = H5I_INVALID_HID; /* Error Message ID */
+ hid_t esid = H5I_INVALID_HID; /* Error Stack ID */
+ hid_t vfdid = H5I_INVALID_HID; /* Virtual File Driver ID */
+ hid_t volid = H5I_INVALID_HID; /* Virtual Object Layer ID */
+ H5FD_class_t *vfd_cls = NULL; /* VFD class */
+ H5VL_class_t *vol_cls = NULL; /* VOL class */
+ int rc; /* Reference count */
+ herr_t ret; /* Generic return value */
/* Check H5I operations on files */
@@ -3703,7 +3702,7 @@ test_misc20(void)
unsigned version; /* Version of storage layout info */
hsize_t contig_size; /* Size of contiguous storage size from layout into */
const char *testfile = H5_get_srcdir_filename(MISC20_FILE_OLD); /* Corrected test file name */
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -4180,7 +4179,7 @@ test_misc23(void)
CHECK(create_id, FAIL, "H5Pcreate");
/* Set flag for intermediate group creation */
- status = H5Pset_create_intermediate_group(create_id, TRUE);
+ status = H5Pset_create_intermediate_group(create_id, true);
CHECK(status, FAIL, "H5Pset_create_intermediate_group");
tmp_id = H5Gcreate2(file_id, "/A/B01/grp", create_id, H5P_DEFAULT, access_id);
@@ -4241,7 +4240,7 @@ test_misc23(void)
CHECK(create_id, FAIL, "H5Pcreate");
/* Set flag for intermediate group creation */
- status = H5Pset_create_intermediate_group(create_id, TRUE);
+ status = H5Pset_create_intermediate_group(create_id, true);
CHECK(status, FAIL, "H5Pset_create_intermediate_group");
tmp_id = H5Dcreate2(file_id, "/A/B06/dset", type_id, space_id, create_id, H5P_DEFAULT, H5P_DEFAULT);
@@ -4292,7 +4291,7 @@ test_misc23(void)
CHECK(create_id, FAIL, "H5Pcreate");
/* Set flag for intermediate group creation */
- status = H5Pset_create_intermediate_group(create_id, TRUE);
+ status = H5Pset_create_intermediate_group(create_id, true);
CHECK(status, FAIL, "H5Pset_create_intermediate_group");
tmp_id = H5Tcopy(H5T_NATIVE_INT16);
@@ -4352,17 +4351,17 @@ test_misc23(void)
CHECK(create_id, FAIL, "H5Pcreate");
/* Set flag for intermediate group creation */
- status = H5Pset_create_intermediate_group(create_id, TRUE);
+ status = H5Pset_create_intermediate_group(create_id, true);
CHECK(status, FAIL, "H5Pset_create_intermediate_group");
status = H5Lcopy(file_id, "/A/B01/grp", file_id, "/A/B16/grp", create_id, access_id);
CHECK(status, FAIL, "H5Lcopy");
tri_status = H5Lexists(file_id, "/A/B16/grp", access_id);
- VERIFY(tri_status, TRUE, "H5Lexists");
+ VERIFY(tri_status, true, "H5Lexists");
tri_status = H5Lexists(file_id, "/A/B01/grp", access_id);
- VERIFY(tri_status, TRUE, "H5Lexists");
+ VERIFY(tri_status, true, "H5Lexists");
/**********************************************************************
* test H5Lmove()
@@ -4372,10 +4371,10 @@ test_misc23(void)
CHECK(status, FAIL, "H5Lmove");
tri_status = H5Lexists(file_id, "/A/B17/grp", access_id);
- VERIFY(tri_status, TRUE, "H5Lexists");
+ VERIFY(tri_status, true, "H5Lexists");
tri_status = H5Lexists(file_id, "/A/B16/grp", access_id);
- VERIFY(tri_status, FALSE, "H5Lexists");
+ VERIFY(tri_status, false, "H5Lexists");
/**********************************************************************
* test H5Lcreate_hard()
@@ -4385,7 +4384,7 @@ test_misc23(void)
CHECK(status, FAIL, "H5Lcreate_hard");
tri_status = H5Lexists(file_id, "/A/B18/grp", access_id);
- VERIFY(tri_status, TRUE, "H5Lexists");
+ VERIFY(tri_status, true, "H5Lexists");
/**********************************************************************
* test H5Lcreate_soft()
@@ -4395,7 +4394,7 @@ test_misc23(void)
CHECK(status, FAIL, "H5Lcreate_soft");
tri_status = H5Lexists(file_id, "/A/B19/grp", access_id);
- VERIFY(tri_status, TRUE, "H5Lexists");
+ VERIFY(tri_status, true, "H5Lexists");
/**********************************************************************
* test H5Lcreate_external()
@@ -4405,7 +4404,7 @@ test_misc23(void)
CHECK(status, FAIL, "H5Lcreate_external");
tri_status = H5Lexists(file_id, "/A/B20/grp", access_id);
- VERIFY(tri_status, TRUE, "H5Lexists");
+ VERIFY(tri_status, true, "H5Lexists");
/**********************************************************************
* test H5Lcreate_ud()
@@ -4416,7 +4415,7 @@ test_misc23(void)
CHECK(status, FAIL, "H5Lcreate_ud");
tri_status = H5Lexists(file_id, "/A/B21/grp", access_id);
- VERIFY(tri_status, TRUE, "H5Lexists");
+ VERIFY(tri_status, true, "H5Lexists");
/**********************************************************************
* close
@@ -4999,7 +4998,7 @@ test_misc25b(void)
hid_t fid; /* File ID */
hid_t gid; /* Group ID */
const char *testfile = H5_get_srcdir_filename(MISC25B_FILE); /* Corrected test file name */
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -5260,7 +5259,7 @@ test_misc27(void)
hid_t fid; /* File ID */
hid_t gid; /* Group ID */
const char *testfile = H5_get_srcdir_filename(MISC27_FILE); /* Corrected test file name */
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -5483,9 +5482,9 @@ test_misc28(void)
static void
test_misc29(void)
{
- hbool_t driver_is_default_compatible;
- hid_t fid; /* File ID */
- herr_t ret; /* Generic return value */
+ bool driver_is_default_compatible;
+ hid_t fid; /* File ID */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Speculative metadata reads\n"));
@@ -5546,7 +5545,7 @@ test_misc30(void)
/* Output message about test being performed */
MESSAGE(5, ("Local heap dropping free block info\n"));
- for (get_info = FALSE; get_info <= TRUE; get_info++) {
+ for (get_info = false; get_info <= true; get_info++) {
hid_t fid; /* File ID */
hid_t gid; /* Group ID */
int i; /* Local index counter */
@@ -5573,7 +5572,7 @@ test_misc30(void)
CHECK(ret, FAIL, "test_misc30_get_info");
}
- HDsnprintf(gname, sizeof(gname), "/g0/group%d", i);
+ snprintf(gname, sizeof(gname), "/g0/group%d", i);
gid = H5Gcreate2(fid, gname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(gid, FAIL, "H5Gcreate2");
@@ -5726,15 +5725,15 @@ test_misc32(void)
/* Size zero returns NULL.
* Also checks that a size of zero and setting the buffer clear flag
- * to TRUE can be used together.
+ * to true can be used together.
*
* Note that we have asserts in the code, so only check when NDEBUG
* is defined.
*/
#ifdef NDEBUG
- buffer = H5allocate_memory(0, FALSE);
+ buffer = H5allocate_memory(0, false);
CHECK_PTR_NULL(buffer, "H5allocate_memory"); /*BAD*/
- buffer = H5allocate_memory(0, TRUE);
+ buffer = H5allocate_memory(0, true);
CHECK_PTR_NULL(buffer, "H5allocate_memory"); /*BAD*/
#endif /* NDEBUG */
@@ -5742,7 +5741,7 @@ test_misc32(void)
/* Size zero returns NULL. Valgrind will confirm buffer is freed. */
size = 1024;
- buffer = H5allocate_memory(size, TRUE);
+ buffer = H5allocate_memory(size, true);
resized = H5resize_memory(buffer, 0);
CHECK_PTR_NULL(resized, "H5resize_memory");
@@ -5772,10 +5771,10 @@ test_misc32(void)
static void
test_misc33(void)
{
- hid_t fid = -1; /* File ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
const char *testfile = H5_get_srcdir_filename(MISC33_FILE); /* Corrected test file name */
H5O_info2_t oinfo; /* Structure for object metadata information */
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -5955,15 +5954,15 @@ static int test_misc36_context;
static void
test_misc36_cb1(void *_ctx)
{
- int *ctx = (int *)_ctx; /* Set up context pointer */
- hbool_t is_terminating; /* Flag indicating the library is terminating */
- herr_t ret; /* Return value */
+ int *ctx = (int *)_ctx; /* Set up context pointer */
+ bool is_terminating; /* Flag indicating the library is terminating */
+ herr_t ret; /* Return value */
/* Check whether the library thinks it's terminating */
- is_terminating = FALSE;
+ is_terminating = false;
ret = H5is_library_terminating(&is_terminating);
CHECK(ret, FAIL, "H5is_library_terminating");
- VERIFY(is_terminating, TRUE, "H5is_library_terminating");
+ VERIFY(is_terminating, true, "H5is_library_terminating");
/* Verify correct ordering for 'atclose' callbacks */
if (0 != *ctx)
@@ -5976,15 +5975,15 @@ test_misc36_cb1(void *_ctx)
static void
test_misc36_cb2(void *_ctx)
{
- int *ctx = (int *)_ctx; /* Set up context pointer */
- hbool_t is_terminating; /* Flag indicating the library is terminating */
- herr_t ret; /* Return value */
+ int *ctx = (int *)_ctx; /* Set up context pointer */
+ bool is_terminating; /* Flag indicating the library is terminating */
+ herr_t ret; /* Return value */
/* Check whether the library thinks it's terminating */
- is_terminating = FALSE;
+ is_terminating = false;
ret = H5is_library_terminating(&is_terminating);
CHECK(ret, FAIL, "H5is_library_terminating");
- VERIFY(is_terminating, TRUE, "H5is_library_terminating");
+ VERIFY(is_terminating, true, "H5is_library_terminating");
/* Verify correct ordering for 'atclose' callbacks */
if (1 != *ctx)
@@ -6002,27 +6001,27 @@ test_misc36_cb2(void *_ctx)
static void
test_misc36(void)
{
- hbool_t is_terminating; /* Flag indicating the library is terminating */
- herr_t ret; /* Return value */
+ bool is_terminating; /* Flag indicating the library is terminating */
+ herr_t ret; /* Return value */
/* Output message about test being performed */
MESSAGE(5, ("H5atclose and H5is_library_terminating API calls"));
/* Check whether the library thinks it's terminating */
- is_terminating = TRUE;
+ is_terminating = true;
ret = H5is_library_terminating(&is_terminating);
CHECK(ret, FAIL, "H5is_library_terminating");
- VERIFY(is_terminating, FALSE, "H5is_library_terminating");
+ VERIFY(is_terminating, false, "H5is_library_terminating");
/* Shut the library down */
test_misc36_context = 0;
H5close();
/* Check whether the library thinks it's terminating */
- is_terminating = TRUE;
+ is_terminating = true;
ret = H5is_library_terminating(&is_terminating);
CHECK(ret, FAIL, "H5is_library_terminating");
- VERIFY(is_terminating, FALSE, "H5is_library_terminating");
+ VERIFY(is_terminating, false, "H5is_library_terminating");
/* Check the close context was not changed */
VERIFY(test_misc36_context, 0, "H5atclose");
@@ -6031,10 +6030,10 @@ test_misc36(void)
H5open();
/* Check whether the library thinks it's terminating */
- is_terminating = TRUE;
+ is_terminating = true;
ret = H5is_library_terminating(&is_terminating);
CHECK(ret, FAIL, "H5is_library_terminating");
- VERIFY(is_terminating, FALSE, "H5is_library_terminating");
+ VERIFY(is_terminating, false, "H5is_library_terminating");
/* Register the 'atclose' callbacks */
/* (Note that these will be called in reverse order, which is checked) */
@@ -6073,7 +6072,7 @@ static void
test_misc37(void)
{
const char *testfile = H5_get_srcdir_filename(CVE_2020_10812_FILENAME);
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
hid_t fid;
herr_t ret;
@@ -6110,7 +6109,7 @@ test_misc37(void)
void
test_misc(void)
{
- hbool_t default_driver = h5_using_default_driver(NULL);
+ bool default_driver = h5_using_default_driver(NULL);
/* Output message about test being performed */
MESSAGE(5, ("Testing Miscellaneous Routines\n"));
diff --git a/test/trefer.c b/test/trefer.c
index 577fc6982de..f17e114fd67 100644
--- a/test/trefer.c
+++ b/test/trefer.c
@@ -1305,7 +1305,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
H5E_END_TRY
if (dset1 < 0) {
- VERIFY(libver_high <= H5F_LIBVER_V110, TRUE, "H5Dcreate2");
+ VERIFY(libver_high <= H5F_LIBVER_V110, true, "H5Dcreate2");
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
@@ -1603,7 +1603,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(hssize_ret, (hssize_t)H5S_UNLIMITED, "H5Sget_select_npoints");
tri_ret = H5Sis_regular_hyperslab(sid2);
CHECK(tri_ret, FAIL, "H5Sis_regular_hyperslab");
- VERIFY(tri_ret, TRUE, "H5Sis_regular_hyperslab Result");
+ VERIFY(tri_ret, true, "H5Sis_regular_hyperslab Result");
ret = H5Sget_regular_hyperslab(sid2, start, stride, count, block);
CHECK(ret, FAIL, "H5Sget_regular_hyperslab");
VERIFY(start[0], (hsize_t)1, "Hyperslab Coordinates");
@@ -1762,7 +1762,7 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
if (dset1 < 0) {
- VERIFY(libver_high <= H5F_LIBVER_V110, TRUE, "H5Dcreate2");
+ VERIFY(libver_high <= H5F_LIBVER_V110, true, "H5Dcreate2");
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
@@ -2121,19 +2121,19 @@ test_deref_iter_op(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2
/* Simple check for correct names */
if (*count == 0) {
- if (HDstrcmp(name, DSETNAME2) == 0)
+ if (strcmp(name, DSETNAME2) == 0)
ret_value = 0;
else
ret_value = -1;
} /* end if */
else if (*count == 1) {
- if (HDstrcmp(name, GROUPNAME2) == 0)
+ if (strcmp(name, GROUPNAME2) == 0)
ret_value = 0;
else
ret_value = -1;
} /* end if */
else if (*count == 2) {
- if (HDstrcmp(name, GROUPNAME3) == 0)
+ if (strcmp(name, GROUPNAME3) == 0)
ret_value = 0;
else
ret_value = -1;
@@ -2155,17 +2155,17 @@ test_deref_iter_op(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2
static void
test_reference_group(void)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t did; /* Dataset ID */
- hid_t sid; /* Dataspace ID */
- H5R_ref_t wref; /* Reference to write */
- H5R_ref_t rref; /* Reference to read */
- H5G_info_t ginfo; /* Group info struct */
- char objname[NAME_SIZE]; /* Buffer to store name */
- H5O_info2_t oinfo; /* Object info struct */
- int count = 0; /* Count within iterated group */
- ssize_t size; /* Name length */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t did; /* Dataset ID */
+ hid_t sid; /* Dataspace ID */
+ H5R_ref_t wref; /* Reference to write */
+ H5R_ref_t rref; /* Reference to read */
+ H5G_info_t ginfo; /* Group info struct */
+ char objname[NAME_SIZE]; /* Buffer to store name */
+ H5O_info2_t oinfo; /* Object info struct */
+ int count = 0; /* Count within iterated group */
+ ssize_t size; /* Name length */
herr_t ret;
/* Create file with a group and a dataset containing an object reference to the group */
@@ -3564,7 +3564,7 @@ test_reference(void)
MESSAGE(5, ("Testing References\n"));
/* Get the VFD to use */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
@@ -3588,7 +3588,7 @@ test_reference(void)
} /* end low bound */
/* The following test is currently broken with the Direct VFD */
- if (HDstrcmp(env_h5_drvr, "direct") != 0) {
+ if (strcmp(env_h5_drvr, "direct") != 0) {
test_reference_obj_deleted(); /* Test H5R object reference code for deleted objects */
}
diff --git a/test/trefer_deprec.c b/test/trefer_deprec.c
index 209708bbd12..5bb1f133c9a 100644
--- a/test/trefer_deprec.c
+++ b/test/trefer_deprec.c
@@ -166,25 +166,25 @@ test_reference_params(void)
CHECK(ret, FAIL, "H5Dcreate2");
/* Test parameters to H5Rcreate */
- ret = H5Rcreate(NULL, fid1, "/Group1/Dataset1", H5R_OBJECT, (hid_t)-1);
+ ret = H5Rcreate(NULL, fid1, "/Group1/Dataset1", H5R_OBJECT, (hid_t)H5I_INVALID_HID);
VERIFY(ret, FAIL, "H5Rcreate ref");
- ret = H5Rcreate(&wbuf[0], (hid_t)-1, "/Group1/Dataset1", H5R_OBJECT, (hid_t)-1);
+ ret = H5Rcreate(&wbuf[0], (hid_t)H5I_INVALID_HID, "/Group1/Dataset1", H5R_OBJECT, (hid_t)H5I_INVALID_HID);
VERIFY(ret, FAIL, "H5Rcreate loc_id");
- ret = H5Rcreate(&wbuf[0], fid1, NULL, H5R_OBJECT, (hid_t)-1);
+ ret = H5Rcreate(&wbuf[0], fid1, NULL, H5R_OBJECT, (hid_t)H5I_INVALID_HID);
VERIFY(ret, FAIL, "H5Rcreate name");
- ret = H5Rcreate(&wbuf[0], fid1, "", H5R_OBJECT, (hid_t)-1);
+ ret = H5Rcreate(&wbuf[0], fid1, "", H5R_OBJECT, (hid_t)H5I_INVALID_HID);
VERIFY(ret, FAIL, "H5Rcreate null name");
- ret = H5Rcreate(&wbuf[0], fid1, "/Group1/Dataset1", H5R_MAXTYPE, (hid_t)-1);
+ ret = H5Rcreate(&wbuf[0], fid1, "/Group1/Dataset1", H5R_MAXTYPE, (hid_t)H5I_INVALID_HID);
VERIFY(ret, FAIL, "H5Rcreate type");
- ret = H5Rcreate(&wbuf[0], fid1, "/Group1/Dataset1", H5R_DATASET_REGION, (hid_t)-1);
+ ret = H5Rcreate(&wbuf[0], fid1, "/Group1/Dataset1", H5R_DATASET_REGION, (hid_t)H5I_INVALID_HID);
VERIFY(ret, FAIL, "H5Rcreate region space");
ret = H5Rcreate(&wbuf[0], fid1, "/Group1/Dataset1", H5R_MAXTYPE, (hid_t)0);
VERIFY(ret, FAIL, "H5Rcreate space");
/* Test parameters to H5Rdereference */
- dset2 = H5Rdereference2((hid_t)-1, H5P_DEFAULT, H5R_OBJECT, &rbuf[0]);
+ dset2 = H5Rdereference2((hid_t)H5I_INVALID_HID, H5P_DEFAULT, H5R_OBJECT, &rbuf[0]);
VERIFY(dset2, FAIL, "H5Rdereference2 loc_id");
- dset2 = H5Rdereference2(dataset, (hid_t)-1, H5R_OBJECT, &rbuf[0]);
+ dset2 = H5Rdereference2(dataset, (hid_t)H5I_INVALID_HID, H5R_OBJECT, &rbuf[0]);
VERIFY(dset2, FAIL, "H5Rdereference2 oapl_id");
dset2 = H5Rdereference2(dataset, dapl_id, H5R_OBJECT, NULL);
VERIFY(dset2, FAIL, "H5Rdereference2 ref");
@@ -192,7 +192,7 @@ test_reference_params(void)
VERIFY(dset2, FAIL, "H5Rdereference2 type");
/* Test parameters to H5Rget_obj_type2 */
- ret = H5Rget_obj_type2((hid_t)-1, H5R_OBJECT, &rbuf[0], NULL);
+ ret = H5Rget_obj_type2((hid_t)H5I_INVALID_HID, H5R_OBJECT, &rbuf[0], NULL);
VERIFY(ret, FAIL, "H5Rget_obj_type2 loc_id");
ret = H5Rget_obj_type2(fid1, H5R_OBJECT, NULL, NULL);
VERIFY(ret, FAIL, "H5Rget_obj_type2 ref");
@@ -200,7 +200,7 @@ test_reference_params(void)
VERIFY(ret, FAIL, "H5Rget_obj_type2 type");
/* Test parameters to H5Rget_name */
- name_size = H5Rget_name((hid_t)-1, H5R_DATASET_REGION, &rbuf[0], NULL, 0);
+ name_size = H5Rget_name((hid_t)H5I_INVALID_HID, H5R_DATASET_REGION, &rbuf[0], NULL, 0);
VERIFY(name_size, FAIL, "H5Rget_name loc_id");
name_size = H5Rget_name(fid1, H5R_DATASET_REGION, NULL, NULL, 0);
VERIFY(name_size, FAIL, "H5Rget_name ref");
@@ -208,7 +208,7 @@ test_reference_params(void)
VERIFY(name_size, FAIL, "H5Rget_name type");
/* Test parameters to H5Rget_region */
- ret_id = H5Rget_region((hid_t)-1, H5R_OBJECT, &rbuf[0]);
+ ret_id = H5Rget_region((hid_t)H5I_INVALID_HID, H5R_OBJECT, &rbuf[0]);
VERIFY(ret_id, FAIL, "H5Rget_region loc_id");
ret_id = H5Rget_region(fid1, H5R_OBJECT, NULL);
VERIFY(ret_id, FAIL, "H5Rget_region ref");
@@ -351,28 +351,28 @@ test_reference_obj(void)
CHECK(dataset, FAIL, "H5Dcreate2");
/* Create reference to dataset */
- ret = H5Rcreate(&wbuf[0], fid1, "/Group1/Dataset1", H5R_OBJECT, (hid_t)-1);
+ ret = H5Rcreate(&wbuf[0], fid1, "/Group1/Dataset1", H5R_OBJECT, (hid_t)H5I_INVALID_HID);
CHECK(ret, FAIL, "H5Rcreate");
ret = H5Rget_obj_type2(dataset, H5R_OBJECT, &wbuf[0], &obj_type);
CHECK(ret, FAIL, "H5Rget_obj_type2");
VERIFY(obj_type, H5O_TYPE_DATASET, "H5Rget_obj_type2");
/* Create reference to dataset */
- ret = H5Rcreate(&wbuf[1], fid1, "/Group1/Dataset2", H5R_OBJECT, (hid_t)-1);
+ ret = H5Rcreate(&wbuf[1], fid1, "/Group1/Dataset2", H5R_OBJECT, (hid_t)H5I_INVALID_HID);
CHECK(ret, FAIL, "H5Rcreate");
ret = H5Rget_obj_type2(dataset, H5R_OBJECT, &wbuf[1], &obj_type);
CHECK(ret, FAIL, "H5Rget_obj_type2");
VERIFY(obj_type, H5O_TYPE_DATASET, "H5Rget_obj_type2");
/* Create reference to group */
- ret = H5Rcreate(&wbuf[2], fid1, "/Group1", H5R_OBJECT, (hid_t)-1);
+ ret = H5Rcreate(&wbuf[2], fid1, "/Group1", H5R_OBJECT, (hid_t)H5I_INVALID_HID);
CHECK(ret, FAIL, "H5Rcreate");
ret = H5Rget_obj_type2(dataset, H5R_OBJECT, &wbuf[2], &obj_type);
CHECK(ret, FAIL, "H5Rget_obj_type2");
VERIFY(obj_type, H5O_TYPE_GROUP, "H5Rget_obj_type2");
/* Create reference to named datatype */
- ret = H5Rcreate(&wbuf[3], fid1, "/Group1/Datatype1", H5R_OBJECT, (hid_t)-1);
+ ret = H5Rcreate(&wbuf[3], fid1, "/Group1/Datatype1", H5R_OBJECT, (hid_t)H5I_INVALID_HID);
CHECK(ret, FAIL, "H5Rcreate");
ret = H5Rget_obj_type2(dataset, H5R_OBJECT, &wbuf[3], &obj_type);
CHECK(ret, FAIL, "H5Rget_obj_type2");
@@ -437,7 +437,7 @@ test_reference_obj(void)
CHECK(size, FAIL, "H5Oget_comment");
/* Check for correct comment value */
- if (HDstrcmp(write_comment, read_comment) != 0)
+ if (strcmp(write_comment, read_comment) != 0)
TestErrPrintf("Error! Incorrect group comment, wanted: %s, got: %s\n", write_comment, read_comment);
/* Close group */
@@ -504,13 +504,13 @@ test_reference_obj(void)
static void
test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t fapl = -1; /* File access property list */
- hid_t dset1, /* Dataset ID */
- dset2; /* Dereferenced dataset ID */
- hid_t sid1, /* Dataspace ID #1 */
- sid2; /* Dataspace ID #2 */
- hid_t dapl_id; /* Dataset access property list */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
+ hid_t dset1, /* Dataset ID */
+ dset2; /* Dereferenced dataset ID */
+ hid_t sid1, /* Dataspace ID #1 */
+ sid2; /* Dataspace ID #2 */
+ hid_t dapl_id; /* Dataset access property list */
hsize_t dims1[] = {SPACE1_DIM1}, dims2[] = {SPACE2_DIM1, SPACE2_DIM2};
hsize_t start[SPACE2_RANK]; /* Starting location of hyperslab */
hsize_t stride[SPACE2_RANK]; /* Stride of hyperslab */
@@ -883,7 +883,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(hssize_ret, (hssize_t)H5S_UNLIMITED, "H5Sget_select_npoints");
tri_ret = H5Sis_regular_hyperslab(sid2);
CHECK(tri_ret, FAIL, "H5Sis_regular_hyperslab");
- VERIFY(tri_ret, TRUE, "H5Sis_regular_hyperslab Result");
+ VERIFY(tri_ret, true, "H5Sis_regular_hyperslab Result");
ret = H5Sget_regular_hyperslab(sid2, start, stride, count, block);
CHECK(ret, FAIL, "H5Sget_regular_hyperslab");
VERIFY(start[0], (hsize_t)1, "Hyperslab Coordinates");
@@ -950,13 +950,13 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
static void
test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t fapl = -1; /* File access property list */
- hid_t dset1, /* Dataset ID */
- dset3; /* Dereferenced dataset ID */
- hid_t sid1, /* Dataspace ID #1 */
- sid3; /* Dataspace ID #3 */
- hid_t dapl_id; /* Dataset access property list */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
+ hid_t dset1, /* Dataset ID */
+ dset3; /* Dereferenced dataset ID */
+ hid_t sid1, /* Dataspace ID #1 */
+ sid3; /* Dataspace ID #3 */
+ hid_t dapl_id; /* Dataset access property list */
hsize_t dims1[] = {SPACE1_DIM1}, dims3[] = {SPACE3_DIM1};
hsize_t start[SPACE3_RANK]; /* Starting location of hyperslab */
hsize_t stride[SPACE3_RANK]; /* Stride of hyperslab */
@@ -1279,7 +1279,7 @@ test_reference_obj_deleted(void)
CHECK(dataset, FAIL, "H5Dcreate2");
/* Create reference to dataset */
- ret = H5Rcreate(&oref, fid1, "/Dataset1", H5R_OBJECT, (hid_t)-1);
+ ret = H5Rcreate(&oref, fid1, "/Dataset1", H5R_OBJECT, (hid_t)H5I_INVALID_HID);
CHECK(ret, FAIL, "H5Rcreate");
ret = H5Rget_obj_type2(dataset, H5R_OBJECT, &oref, &obj_type);
CHECK(ret, FAIL, "H5Rget_obj_type2");
@@ -1355,19 +1355,19 @@ test_deref_iter_op(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2
/* Simple check for correct names */
if (*count == 0) {
- if (HDstrcmp(name, DSETNAME2) == 0)
+ if (strcmp(name, DSETNAME2) == 0)
ret_value = 0;
else
ret_value = -1;
} /* end if */
else if (*count == 1) {
- if (HDstrcmp(name, GROUPNAME2) == 0)
+ if (strcmp(name, GROUPNAME2) == 0)
ret_value = 0;
else
ret_value = -1;
} /* end if */
else if (*count == 2) {
- if (HDstrcmp(name, GROUPNAME3) == 0)
+ if (strcmp(name, GROUPNAME3) == 0)
ret_value = 0;
else
ret_value = -1;
@@ -1389,17 +1389,17 @@ test_deref_iter_op(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2
static void
test_reference_group(void)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t did; /* Dataset ID */
- hid_t sid; /* Dataspace ID */
- hobj_ref_t wref; /* Reference to write */
- hobj_ref_t rref; /* Reference to read */
- H5G_info_t ginfo; /* Group info struct */
- char objname[NAME_SIZE]; /* Buffer to store name */
- H5O_info2_t oinfo; /* Object info struct */
- int count = 0; /* Count within iterated group */
- ssize_t size; /* Name length */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t did; /* Dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hobj_ref_t wref; /* Reference to write */
+ hobj_ref_t rref; /* Reference to read */
+ H5G_info_t ginfo; /* Group info struct */
+ char objname[NAME_SIZE]; /* Buffer to store name */
+ H5O_info2_t oinfo; /* Object info struct */
+ int count = 0; /* Count within iterated group */
+ ssize_t size; /* Name length */
herr_t ret;
/* Create file with a group and a dataset containing an object reference to the group */
@@ -1439,7 +1439,7 @@ test_reference_group(void)
CHECK(did, FAIL, "H5Dcreate2");
/* Create reference to group */
- ret = H5Rcreate(&wref, fid, GROUPNAME, H5R_OBJECT, (hid_t)-1);
+ ret = H5Rcreate(&wref, fid, GROUPNAME, H5R_OBJECT, (hid_t)H5I_INVALID_HID);
CHECK(ret, FAIL, "H5Rcreate");
/* Write reference to disk */
@@ -1607,19 +1607,19 @@ test_reference_compat(void)
CHECK(dataset, FAIL, "H5Dcreate2");
/* Create reference to dataset */
- ret = H5Rcreate(&wbuf_obj[0], fid1, "/Group1/Dataset1", H5R_OBJECT, (hid_t)-1);
+ ret = H5Rcreate(&wbuf_obj[0], fid1, "/Group1/Dataset1", H5R_OBJECT, (hid_t)H5I_INVALID_HID);
CHECK(ret, FAIL, "H5Rcreate");
/* Create reference to dataset */
- ret = H5Rcreate(&wbuf_obj[1], fid1, "/Group1/Dataset2", H5R_OBJECT, (hid_t)-1);
+ ret = H5Rcreate(&wbuf_obj[1], fid1, "/Group1/Dataset2", H5R_OBJECT, (hid_t)H5I_INVALID_HID);
CHECK(ret, FAIL, "H5Rcreate");
/* Create reference to group */
- ret = H5Rcreate(&wbuf_obj[2], fid1, "/Group1", H5R_OBJECT, (hid_t)-1);
+ ret = H5Rcreate(&wbuf_obj[2], fid1, "/Group1", H5R_OBJECT, (hid_t)H5I_INVALID_HID);
CHECK(ret, FAIL, "H5Rcreate");
/* Create reference to named datatype */
- ret = H5Rcreate(&wbuf_obj[3], fid1, "/Group1/Datatype1", H5R_OBJECT, (hid_t)-1);
+ ret = H5Rcreate(&wbuf_obj[3], fid1, "/Group1/Datatype1", H5R_OBJECT, (hid_t)H5I_INVALID_HID);
CHECK(ret, FAIL, "H5Rcreate");
/* Write references to disk */
diff --git a/test/trefstr.c b/test/trefstr.c
index 1895fb62115..cd7ddcb44e3 100644
--- a/test/trefstr.c
+++ b/test/trefstr.c
@@ -235,7 +235,7 @@ test_refstr_wrap(void)
MESSAGE(5, ("Testing Wrapping Ref-Counted Strings\n"));
/* Initialize buffer */
- HDstrcpy(buf, "foo");
+ strcpy(buf, "foo");
/* Wrap ref-counted string around existing buffer */
rs = H5RS_wrap(buf);
@@ -245,8 +245,8 @@ test_refstr_wrap(void)
s = H5RS_get_str(rs);
CHECK_PTR(s, "H5RS_get_str");
CHECK_PTR_EQ(s, buf, "wrapping");
- cmp = HDstrcmp(s, buf);
- VERIFY(cmp, 0, "HDstrcmp");
+ cmp = strcmp(s, buf);
+ VERIFY(cmp, 0, "strcmp");
/* Increment reference count (should duplicate string) */
ret = H5RS_incr(rs);
@@ -261,7 +261,7 @@ test_refstr_wrap(void)
if (s == buf)
TestErrPrintf("%d: Should not have gotten the same pointer from reference-counted string!\n",
__LINE__);
- cmp = HDstrcmp(s, buf);
+ cmp = strcmp(s, buf);
if (cmp <= 0)
TestErrPrintf("%d: string comparison incorrect!\n", __LINE__);
@@ -302,9 +302,9 @@ test_refstr_asprintf_cat(void)
/* Get pointer to raw string in ref-counted string */
s = H5RS_get_str(rs);
CHECK_PTR(s, "H5RS_get_str");
- HDsnprintf(buf, sizeof(buf), "%d-%s", (int)10, "foo");
- cmp = HDstrcmp(s, buf);
- VERIFY(cmp, 0, "HDstrcmp");
+ snprintf(buf, sizeof(buf), "%d-%s", (int)10, "foo");
+ cmp = strcmp(s, buf);
+ VERIFY(cmp, 0, "strcmp");
/* Append more output to ref-counted string */
ret = H5RS_asprintf_cat(rs, "-%f", (double)20.0);
@@ -313,9 +313,9 @@ test_refstr_asprintf_cat(void)
/* Get pointer to raw string in ref-counted string */
s = H5RS_get_str(rs);
CHECK_PTR(s, "H5RS_get_str");
- HDsnprintf(buf, sizeof(buf), "%d-%s-%f", (int)10, "foo", (double)20.0);
- cmp = HDstrcmp(s, buf);
- VERIFY(cmp, 0, "HDstrcmp");
+ snprintf(buf, sizeof(buf), "%d-%s-%f", (int)10, "foo", (double)20.0);
+ cmp = strcmp(s, buf);
+ VERIFY(cmp, 0, "strcmp");
/* Decrement reference count for string */
ret = H5RS_decr(rs);
@@ -353,9 +353,9 @@ test_refstr_acat(void)
/* Get pointer to raw string in ref-counted string */
s = H5RS_get_str(rs);
CHECK_PTR(s, "H5RS_get_str");
- HDsnprintf(buf, sizeof(buf), "%s", "foo");
- cmp = HDstrcmp(s, buf);
- VERIFY(cmp, 0, "HDstrcmp");
+ snprintf(buf, sizeof(buf), "%s", "foo");
+ cmp = strcmp(s, buf);
+ VERIFY(cmp, 0, "strcmp");
/* Append another string to ref-counted string */
ret = H5RS_acat(rs, "bar");
@@ -364,9 +364,9 @@ test_refstr_acat(void)
/* Get pointer to raw string in ref-counted string */
s = H5RS_get_str(rs);
CHECK_PTR(s, "H5RS_get_str");
- HDsnprintf(buf, sizeof(buf), "%s", "foobar");
- cmp = HDstrcmp(s, buf);
- VERIFY(cmp, 0, "HDstrcmp");
+ snprintf(buf, sizeof(buf), "%s", "foobar");
+ cmp = strcmp(s, buf);
+ VERIFY(cmp, 0, "strcmp");
/* Append a large string to ref-counted string */
large_str = malloc(1024);
@@ -379,14 +379,14 @@ test_refstr_acat(void)
/* Get pointer to raw string in ref-counted string */
s = H5RS_get_str(rs);
CHECK_PTR(s, "H5RS_get_str");
- HDsnprintf(buf, sizeof(buf), "%s", "foobar");
+ snprintf(buf, sizeof(buf), "%s", "foobar");
large_str2 = malloc(1024 + 6);
CHECK_PTR(large_str2, "malloc");
- HDstrcpy(large_str2, "foobar");
+ strcpy(large_str2, "foobar");
memset(&large_str2[6], 'a', 1024);
large_str2[1029] = '\0';
- cmp = HDstrcmp(s, large_str2);
- VERIFY(cmp, 0, "HDstrcmp");
+ cmp = strcmp(s, large_str2);
+ VERIFY(cmp, 0, "strcmp");
/* Decrement reference count for string */
ret = H5RS_decr(rs);
@@ -426,9 +426,9 @@ test_refstr_ancat(void)
/* Get pointer to raw string in ref-counted string */
s = H5RS_get_str(rs);
CHECK_PTR(s, "H5RS_get_str");
- HDstrcpy(buf, "fo");
- cmp = HDstrcmp(s, buf);
- VERIFY(cmp, 0, "HDstrcmp");
+ strcpy(buf, "fo");
+ cmp = strcmp(s, buf);
+ VERIFY(cmp, 0, "strcmp");
/* Append another string to ref-counted string */
ret = H5RS_ancat(rs, "bar", 2);
@@ -437,9 +437,9 @@ test_refstr_ancat(void)
/* Get pointer to raw string in ref-counted string */
s = H5RS_get_str(rs);
CHECK_PTR(s, "H5RS_get_str");
- HDstrcpy(buf, "foba");
- cmp = HDstrcmp(s, buf);
- VERIFY(cmp, 0, "HDstrcmp");
+ strcpy(buf, "foba");
+ cmp = strcmp(s, buf);
+ VERIFY(cmp, 0, "strcmp");
/* Decrement reference count for string */
ret = H5RS_decr(rs);
@@ -475,9 +475,9 @@ test_refstr_aputc(void)
/* Get pointer to raw string in ref-counted string */
s = H5RS_get_str(rs);
CHECK_PTR(s, "H5RS_get_str");
- HDstrcpy(buf, "f");
- cmp = HDstrcmp(s, buf);
- VERIFY(cmp, 0, "HDstrcmp");
+ strcpy(buf, "f");
+ cmp = strcmp(s, buf);
+ VERIFY(cmp, 0, "strcmp");
/* Append another character to ref-counted string */
ret = H5RS_aputc(rs, 'o');
@@ -486,9 +486,9 @@ test_refstr_aputc(void)
/* Get pointer to raw string in ref-counted string */
s = H5RS_get_str(rs);
CHECK_PTR(s, "H5RS_get_str");
- HDstrcpy(buf, "fo");
- cmp = HDstrcmp(s, buf);
- VERIFY(cmp, 0, "HDstrcmp");
+ strcpy(buf, "fo");
+ cmp = strcmp(s, buf);
+ VERIFY(cmp, 0, "strcmp");
/* Decrement reference count for string */
ret = H5RS_decr(rs);
diff --git a/test/tselect.c b/test/tselect.c
index 3c6f4bbbb5e..55599b3324e 100644
--- a/test/tselect.c
+++ b/test/tselect.c
@@ -1882,13 +1882,13 @@ verify_select_hyper_contig_dr__run_test(const uint16_t *cube_buf, size_t H5_ATTR
uint16_t expected_value; /* Expected value in dataset */
unsigned i, j, k, l, m; /* Local index variables */
size_t s; /* Local index variable */
- hbool_t mis_match; /* Flag to indicate mismatch in expected value */
+ bool mis_match; /* Flag to indicate mismatch in expected value */
assert(cube_buf);
assert(cube_size > 0);
expected_value = 0;
- mis_match = FALSE;
+ mis_match = false;
cube_ptr = cube_buf;
s = 0;
i = 0;
@@ -1906,7 +1906,7 @@ verify_select_hyper_contig_dr__run_test(const uint16_t *cube_buf, size_t H5_ATTR
/* Check for correct value */
if (*cube_ptr != expected_value)
- mis_match = TRUE;
+ mis_match = true;
/* Advance to next element */
cube_ptr++;
@@ -1940,7 +1940,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
unsigned edge_size, unsigned chunk_edge_size, unsigned small_rank,
unsigned large_rank, hid_t dset_type, hid_t xfer_plist)
{
- hbool_t mis_match; /* Flag indicating a value read in wasn't what was expected */
+ bool mis_match; /* Flag indicating a value read in wasn't what was expected */
hid_t fapl; /* File access property list */
hid_t fid1; /* File ID */
hid_t small_cube_sid; /* Dataspace ID for small cube in memory & file */
@@ -2011,7 +2011,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
CHECK(fapl, FAIL, "H5Pcreate");
/* Use the 'core' VFD for this test */
- ret = H5Pset_fapl_core(fapl, (size_t)(1024 * 1024), FALSE);
+ ret = H5Pset_fapl_core(fapl, (size_t)(1024 * 1024), false);
CHECK(ret, FAIL, "H5Pset_fapl_core");
/* Create file */
@@ -2158,7 +2158,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
* selections as having the same shape.
*/
check = H5Sselect_shape_same(small_cube_sid, file_large_cube_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Read selection from disk */
ret = H5Dread(large_cube_dataset, H5T_NATIVE_UINT16, small_cube_sid, file_large_cube_sid,
@@ -2166,14 +2166,14 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
CHECK(ret, FAIL, "H5Dread");
/* verify that expected data is retrieved */
- mis_match = FALSE;
+ mis_match = false;
ptr_1 = small_cube_buf_1;
expected_value = (uint16_t)((u * edge_size * edge_size * edge_size * edge_size) +
(v * edge_size * edge_size * edge_size) +
(w * edge_size * edge_size) + (x * edge_size));
for (s = 0; s < small_cube_size; s++) {
if (*ptr_1 != expected_value)
- mis_match = TRUE;
+ mis_match = true;
ptr_1++;
expected_value++;
} /* end for */
@@ -2223,7 +2223,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
* selections as having the same shape.
*/
check = H5Sselect_shape_same(small_cube_sid, mem_large_cube_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Read selection from disk */
ret = H5Dread(small_cube_dataset, H5T_NATIVE_UINT16, mem_large_cube_sid, small_cube_sid,
@@ -2241,23 +2241,23 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
assert(start_index < stop_index);
assert(stop_index <= large_cube_size);
- mis_match = FALSE;
+ mis_match = false;
ptr_1 = large_cube_buf_1;
expected_value = 0;
for (s = 0; s < start_index; s++) {
if (*ptr_1 != 0)
- mis_match = TRUE;
+ mis_match = true;
ptr_1++;
} /* end for */
for (; s <= stop_index; s++) {
if (*ptr_1 != expected_value)
- mis_match = TRUE;
+ mis_match = true;
expected_value++;
ptr_1++;
} /* end for */
for (; s < large_cube_size; s++) {
if (*ptr_1 != 0)
- mis_match = TRUE;
+ mis_match = true;
ptr_1++;
} /* end for */
if (mis_match)
@@ -2322,7 +2322,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
* on disk full small cube selections as having the same shape.
*/
check = H5Sselect_shape_same(small_cube_sid, mem_large_cube_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* write the slice from the in memory large cube to the on disk small cube */
ret = H5Dwrite(small_cube_dataset, H5T_NATIVE_UINT16, mem_large_cube_sid, small_cube_sid,
@@ -2335,14 +2335,14 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
CHECK(ret, FAIL, "H5Dread");
/* verify that expected data is retrieved */
- mis_match = FALSE;
+ mis_match = false;
ptr_1 = small_cube_buf_1;
expected_value = (uint16_t)((u * edge_size * edge_size * edge_size * edge_size) +
(v * edge_size * edge_size * edge_size) +
(w * edge_size * edge_size) + (x * edge_size));
for (s = 0; s < small_cube_size; s++) {
if (*ptr_1 != expected_value)
- mis_match = TRUE;
+ mis_match = true;
expected_value++;
ptr_1++;
} /* end for */
@@ -2409,7 +2409,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
* as having the same shape.
*/
check = H5Sselect_shape_same(small_cube_sid, file_large_cube_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* write the cube from memory to the target slice of the disk cube */
ret = H5Dwrite(large_cube_dataset, H5T_NATIVE_UINT16, small_cube_sid, file_large_cube_sid,
@@ -2435,23 +2435,23 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
assert(start_index < stop_index);
assert(stop_index <= large_cube_size);
- mis_match = FALSE;
+ mis_match = false;
ptr_1 = large_cube_buf_1;
expected_value = 0;
for (s = 0; s < start_index; s++) {
if (*ptr_1 != 0)
- mis_match = TRUE;
+ mis_match = true;
ptr_1++;
} /* end for */
for (; s <= stop_index; s++) {
if (*ptr_1 != expected_value)
- mis_match = TRUE;
+ mis_match = true;
expected_value++;
ptr_1++;
} /* end for */
for (; s < large_cube_size; s++) {
if (*ptr_1 != 0)
- mis_match = TRUE;
+ mis_match = true;
ptr_1++;
} /* end for */
if (mis_match)
@@ -2584,7 +2584,7 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid, u
unsigned edge_size, unsigned checker_edge_size,
unsigned sel_rank, const hsize_t sel_start[])
{
- hbool_t first_selection = TRUE;
+ bool first_selection = true;
unsigned n_cube_offset;
unsigned sel_offset;
hsize_t base_count;
@@ -2719,7 +2719,7 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid, u
if (((i + j + k + l + m) % 2) == 0) {
if (first_selection) {
- first_selection = FALSE;
+ first_selection = false;
ret = H5Sselect_hyperslab(tgt_n_cube_sid, H5S_SELECT_SET,
&(start[n_cube_offset]), &(stride[n_cube_offset]),
@@ -2768,7 +2768,7 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid, u
** test_select_hyper_checker_board_dr__verify_data():
**
** Examine the supplied buffer to see if it contains the
-** expected data. Return TRUE if it does, and FALSE
+** expected data. Return true if it does, and false
** otherwise.
**
** The supplied buffer is presumed to contain the results
@@ -2805,14 +2805,14 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid, u
** a selected or an unselected checker.
**
****************************************************************/
-H5_ATTR_PURE static hbool_t
+H5_ATTR_PURE static bool
test_select_hyper_checker_board_dr__verify_data(uint16_t *buf_ptr, unsigned rank, unsigned edge_size,
unsigned checker_edge_size, uint16_t first_expected_val,
- hbool_t buf_starts_in_checker)
+ bool buf_starts_in_checker)
{
- hbool_t good_data = TRUE;
- hbool_t in_checker;
- hbool_t start_in_checker[5];
+ bool good_data = true;
+ bool in_checker;
+ bool start_in_checker[5];
uint16_t expected_value;
uint16_t *val_ptr;
unsigned i, j, k, l, m; /* to track position in n-cube */
@@ -2877,11 +2877,11 @@ test_select_hyper_checker_board_dr__verify_data(uint16_t *buf_ptr, unsigned rank
if (in_checker) {
if (*val_ptr != expected_value)
- good_data = FALSE;
+ good_data = false;
} /* end if */
else {
if (*val_ptr != 0)
- good_data = FALSE;
+ good_data = false;
} /* end else */
val_ptr++;
@@ -2921,7 +2921,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
unsigned chunk_edge_size, unsigned small_rank,
unsigned large_rank, hid_t dset_type, hid_t xfer_plist)
{
- hbool_t data_ok;
+ bool data_ok;
hid_t fapl; /* File access property list */
hid_t fid; /* HDF5 File IDs */
hid_t full_small_cube_sid; /* Dataspace for small cube w/all selection */
@@ -2996,7 +2996,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
CHECK(fapl, FAIL, "H5Pcreate");
/* Use the 'core' VFD for this test */
- ret = H5Pset_fapl_core(fapl, (size_t)(1024 * 1024), FALSE);
+ ret = H5Pset_fapl_core(fapl, (size_t)(1024 * 1024), false);
CHECK(ret, FAIL, "H5Pset_fapl_core");
/* Create file */
@@ -3163,7 +3163,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
* selections as having the same shape.
*/
check = H5Sselect_shape_same(mem_small_cube_sid, file_large_cube_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* zero the buffer that we will be using for reading */
memset(small_cube_buf_1, 0, sizeof(*small_cube_buf_1) * small_cube_size);
@@ -3179,7 +3179,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
data_ok = test_select_hyper_checker_board_dr__verify_data(small_cube_buf_1, small_rank,
edge_size, checker_edge_size,
- expected_value, (hbool_t)TRUE);
+ expected_value, (bool)true);
if (!data_ok)
TestErrPrintf("small cube read from largecube has bad data! Line=%d\n", __LINE__);
@@ -3243,7 +3243,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
* selections as having the same shape.
*/
check = H5Sselect_shape_same(file_small_cube_sid, mem_large_cube_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* zero out the in memory large cube */
memset(large_cube_buf_1, 0, sizeof(*large_cube_buf_1) * large_cube_size);
@@ -3256,7 +3256,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
/* verify that the expected data and only the
* expected data was read.
*/
- data_ok = TRUE;
+ data_ok = true;
ptr_1 = large_cube_buf_1;
expected_value = 0;
start_index = (u * edge_size * edge_size * edge_size * edge_size) +
@@ -3270,13 +3270,13 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
/* verify that the large cube contains only zeros before the slice */
for (s = 0; s < start_index; s++) {
if (*ptr_1 != 0)
- data_ok = FALSE;
+ data_ok = false;
ptr_1++;
} /* end for */
assert(s == start_index);
data_ok &= test_select_hyper_checker_board_dr__verify_data(
- ptr_1, small_rank, edge_size, checker_edge_size, (uint16_t)0, (hbool_t)TRUE);
+ ptr_1, small_rank, edge_size, checker_edge_size, (uint16_t)0, (bool)true);
ptr_1 += small_cube_size;
s += small_cube_size;
@@ -3286,7 +3286,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
/* verify that the large cube contains only zeros after the slice */
for (s = stop_index + 1; s < large_cube_size; s++) {
if (*ptr_1 != 0)
- data_ok = FALSE;
+ data_ok = false;
ptr_1++;
} /* end for */
if (!data_ok)
@@ -3363,7 +3363,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
* selections as having the same shape.
*/
check = H5Sselect_shape_same(file_small_cube_sid, mem_large_cube_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* write the slice from the in memory large cube to the
* on disk small cube
@@ -3386,7 +3386,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
data_ok = test_select_hyper_checker_board_dr__verify_data(small_cube_buf_1, small_rank,
edge_size, checker_edge_size,
- expected_value, (hbool_t)TRUE);
+ expected_value, (bool)true);
if (!data_ok)
TestErrPrintf("small cube read from largecube has bad data! Line=%d\n", __LINE__);
@@ -3458,7 +3458,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
* selections as having the same shape.
*/
check = H5Sselect_shape_same(file_large_cube_sid, mem_small_cube_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* write the checker board selection of the in memory
* small cube to a slice through the on disk large
@@ -3480,7 +3480,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
* expected data was written to the on disk large
* cube.
*/
- data_ok = TRUE;
+ data_ok = true;
ptr_1 = large_cube_buf_1;
expected_value = 0;
start_index = (u * edge_size * edge_size * edge_size * edge_size) +
@@ -3494,14 +3494,14 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
/* verify that the large cube contains only zeros before the slice */
for (s = 0; s < start_index; s++) {
if (*ptr_1 != 0)
- data_ok = FALSE;
+ data_ok = false;
ptr_1++;
} /* end for */
assert(s == start_index);
/* verify that the slice contains the expected data */
data_ok &= test_select_hyper_checker_board_dr__verify_data(
- ptr_1, small_rank, edge_size, checker_edge_size, (uint16_t)0, (hbool_t)TRUE);
+ ptr_1, small_rank, edge_size, checker_edge_size, (uint16_t)0, (bool)true);
ptr_1 += small_cube_size;
s += small_cube_size;
@@ -3511,7 +3511,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
/* verify that the large cube contains only zeros after the slice */
for (s = stop_index + 1; s < large_cube_size; s++) {
if (*ptr_1 != 0)
- data_ok = FALSE;
+ data_ok = false;
ptr_1++;
} /* end for */
if (!data_ok)
@@ -4115,7 +4115,7 @@ test_select_hyper_offset(void)
ret = H5Soffset_simple(sid1, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid1);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
/* Check an invalid offset */
offset[0] = 10;
@@ -4124,7 +4124,7 @@ test_select_hyper_offset(void)
ret = H5Soffset_simple(sid1, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid1);
- VERIFY(valid, FALSE, "H5Sselect_valid");
+ VERIFY(valid, false, "H5Sselect_valid");
/* Reset offset */
offset[0] = 0;
@@ -4133,7 +4133,7 @@ test_select_hyper_offset(void)
ret = H5Soffset_simple(sid1, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid1);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
/* Select 15x26 hyperslab for memory dataset */
start[0] = 15;
@@ -4153,7 +4153,7 @@ test_select_hyper_offset(void)
ret = H5Soffset_simple(sid2, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid2);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
/* Create a dataset */
dataset = H5Dcreate2(fid1, SPACE1_NAME, H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -4284,7 +4284,7 @@ test_select_hyper_offset2(void)
ret = H5Soffset_simple(sid1, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid1);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
/* Select 4x10 hyperslab for memory dataset */
start[0] = 1;
@@ -4300,7 +4300,7 @@ test_select_hyper_offset2(void)
ret = H5Soffset_simple(sid2, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid2);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
/* Create a dataset */
dataset = H5Dcreate2(fid1, SPACE7_NAME, H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -4441,7 +4441,7 @@ test_select_point_offset(void)
ret = H5Soffset_simple(sid1, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid1);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
/* Check an invalid offset */
offset[0] = 10;
@@ -4450,7 +4450,7 @@ test_select_point_offset(void)
ret = H5Soffset_simple(sid1, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid1);
- VERIFY(valid, FALSE, "H5Sselect_valid");
+ VERIFY(valid, false, "H5Sselect_valid");
/* Reset offset */
offset[0] = 0;
@@ -4459,7 +4459,7 @@ test_select_point_offset(void)
ret = H5Soffset_simple(sid1, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid1);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
/* Select sequence of ten points for write dataset */
coord2[0][0] = 12;
@@ -4491,7 +4491,7 @@ test_select_point_offset(void)
ret = H5Soffset_simple(sid2, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid2);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
/* Create a dataset */
dataset = H5Dcreate2(fid1, SPACE1_NAME, H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -5541,11 +5541,11 @@ test_select_hyper_union_3d(void)
static void
test_select_hyper_valid_combination(void)
{
- hid_t single_pt_sid; /* Dataspace ID with single point selection */
- hid_t single_hyper_sid; /* Dataspace ID with single block hyperslab selection */
- hid_t regular_hyper_sid; /* Dataspace ID with regular hyperslab selection */
- hid_t non_existent_sid = -1; /* A non-existent space id */
- hid_t tmp_sid; /* Temporary dataspace ID */
+ hid_t single_pt_sid; /* Dataspace ID with single point selection */
+ hid_t single_hyper_sid; /* Dataspace ID with single block hyperslab selection */
+ hid_t regular_hyper_sid; /* Dataspace ID with regular hyperslab selection */
+ hid_t non_existent_sid = H5I_INVALID_HID; /* A non-existent space id */
+ hid_t tmp_sid; /* Temporary dataspace ID */
hsize_t dims2D[] = {SPACE9_DIM1, SPACE9_DIM2};
hsize_t dims3D[] = {SPACE4_DIM1, SPACE4_DIM2, SPACE4_DIM3};
@@ -6974,13 +6974,13 @@ test_select_valid(void)
CHECK(error, FAIL, "H5Sselect_hyperslab");
valid = H5Sselect_valid(sub_space);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
error = H5Sselect_hyperslab(sub_space, H5S_SELECT_OR, safe_start, NULL, safe_count, NULL);
CHECK(error, FAIL, "H5Sselect_hyperslab");
valid = H5Sselect_valid(sub_space);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
error = H5Sclose(sub_space);
CHECK(error, FAIL, "H5Sclose");
@@ -6997,13 +6997,13 @@ test_select_valid(void)
CHECK(error, FAIL, "H5Sselect_hyperslab");
valid = H5Sselect_valid(sub_space);
- VERIFY(valid, FALSE, "H5Sselect_valid");
+ VERIFY(valid, false, "H5Sselect_valid");
error = H5Sselect_hyperslab(sub_space, H5S_SELECT_OR, safe_start, NULL, safe_count, NULL);
CHECK(error, FAIL, "H5Sselect_hyperslab");
valid = H5Sselect_valid(sub_space);
- VERIFY(valid, FALSE, "H5Sselect_valid");
+ VERIFY(valid, false, "H5Sselect_valid");
error = H5Sclose(sub_space);
CHECK(error, FAIL, "H5Sclose");
@@ -7020,13 +7020,13 @@ test_select_valid(void)
CHECK(error, FAIL, "H5Sselect_hyperslab");
valid = H5Sselect_valid(sub_space);
- VERIFY(valid, FALSE, "H5Sselect_valid");
+ VERIFY(valid, false, "H5Sselect_valid");
error = H5Sselect_hyperslab(sub_space, H5S_SELECT_OR, safe_start, NULL, safe_count, NULL);
CHECK(error, FAIL, "H5Sselect_hyperslab");
valid = H5Sselect_valid(sub_space);
- VERIFY(valid, FALSE, "H5Sselect_valid");
+ VERIFY(valid, false, "H5Sselect_valid");
error = H5Sclose(sub_space);
CHECK(error, FAIL, "H5Sclose");
@@ -8629,289 +8629,289 @@ test_shape_same(void)
/* Compare "all" selection to all the selections created */
/* Compare against itself */
check = H5Sselect_shape_same(all_sid, all_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(all_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(all_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "none" selection */
check = H5Sselect_shape_same(all_sid, none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(all_sid, single_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(all_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(all_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(all_sid, single_hyper_all_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(all_sid, single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(all_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(all_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(all_sid, none_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(all_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(all_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare "none" selection to all the selections created */
/* Compare against itself */
check = H5Sselect_shape_same(none_sid, none_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(none_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(none_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(none_sid, all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(none_sid, single_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(none_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(none_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(none_sid, single_hyper_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(none_sid, single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(none_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(none_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(none_sid, none_hyper_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(none_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(none_sid, scalar_none_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare single point selection to all the selections created */
/* Compare against itself */
check = H5Sselect_shape_same(single_pt_sid, single_pt_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(single_pt_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(single_pt_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(single_pt_sid, all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "none" selection */
check = H5Sselect_shape_same(single_pt_sid, none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(single_pt_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(single_pt_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(single_pt_sid, single_hyper_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(single_pt_sid, single_hyper_pt_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(single_pt_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(single_pt_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(single_pt_sid, none_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(single_pt_sid, scalar_all_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(single_pt_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare multiple point selection to all the selections created */
/* Compare against itself */
check = H5Sselect_shape_same(mult_pt_sid, mult_pt_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(mult_pt_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(mult_pt_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(mult_pt_sid, all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "none" selection */
check = H5Sselect_shape_same(mult_pt_sid, none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(mult_pt_sid, single_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(mult_pt_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(mult_pt_sid, single_hyper_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(mult_pt_sid, single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(mult_pt_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(mult_pt_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(mult_pt_sid, none_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(mult_pt_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(mult_pt_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare single "normal" hyperslab selection to all the selections created */
/* Compare against itself */
check = H5Sselect_shape_same(single_hyper_sid, single_hyper_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(single_hyper_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(single_hyper_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(single_hyper_sid, all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "none" selection */
check = H5Sselect_shape_same(single_hyper_sid, none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(single_hyper_sid, single_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(single_hyper_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(single_hyper_sid, single_hyper_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(single_hyper_sid, single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(single_hyper_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(single_hyper_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(single_hyper_sid, none_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
#ifdef NOT_YET
/* In theory, these two selections are the same shape, but the
@@ -8938,7 +8938,7 @@ test_shape_same(void)
/* Compare against hyperslab selection */
check = H5Sselect_shape_same(single_hyper_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
@@ -8969,69 +8969,69 @@ test_shape_same(void)
/* Compare against hyperslab selection */
check = H5Sselect_shape_same(single_hyper_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(single_hyper_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(single_hyper_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare single "all" hyperslab selection to all the selections created */
/* Compare against itself */
check = H5Sselect_shape_same(single_hyper_all_sid, single_hyper_all_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(single_hyper_all_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(single_hyper_all_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(single_hyper_all_sid, all_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against "none" selection */
check = H5Sselect_shape_same(single_hyper_all_sid, none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(single_hyper_all_sid, single_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(single_hyper_all_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(single_hyper_all_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(single_hyper_all_sid, single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(single_hyper_all_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(single_hyper_all_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(single_hyper_all_sid, none_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
#ifdef NOT_YET
/* In theory, these two selections are the same shape, but the
@@ -9057,7 +9057,7 @@ test_shape_same(void)
/* Compare against hyperslab selection */
check = H5Sselect_shape_same(single_hyper_all_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
@@ -9088,128 +9088,128 @@ test_shape_same(void)
/* Compare against hyperslab selection */
check = H5Sselect_shape_same(single_hyper_all_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(single_hyper_all_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(single_hyper_all_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare single "point" hyperslab selection to all the selections created */
/* Compare against itself */
check = H5Sselect_shape_same(single_hyper_pt_sid, single_hyper_pt_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(single_hyper_pt_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(single_hyper_pt_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "none" selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, single_pt_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, single_hyper_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, none_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, scalar_all_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare regular, strided hyperslab selection to all the selections created */
/* Compare against itself */
check = H5Sselect_shape_same(regular_hyper_sid, regular_hyper_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(regular_hyper_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(regular_hyper_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(regular_hyper_sid, all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "none" selection */
check = H5Sselect_shape_same(regular_hyper_sid, none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(regular_hyper_sid, single_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(regular_hyper_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, single_hyper_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, none_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Construct point selection which matches regular, strided hyperslab selection */
/* Create dataspace for point selection */
@@ -9228,7 +9228,7 @@ test_shape_same(void)
/* Compare against hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
@@ -9258,7 +9258,7 @@ test_shape_same(void)
/* Compare against hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
@@ -9283,69 +9283,69 @@ test_shape_same(void)
/* Compare against hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare irregular hyperslab selection to all the selections created */
/* Compare against itself */
check = H5Sselect_shape_same(irreg_hyper_sid, irreg_hyper_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(irreg_hyper_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(irreg_hyper_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(irreg_hyper_sid, all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "none" selection */
check = H5Sselect_shape_same(irreg_hyper_sid, none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(irreg_hyper_sid, single_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(irreg_hyper_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(irreg_hyper_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(irreg_hyper_sid, single_hyper_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(irreg_hyper_sid, single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(irreg_hyper_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(irreg_hyper_sid, none_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Construct hyperslab selection which matches irregular hyperslab selection */
/* Create dataspace for hyperslab selection */
@@ -9379,138 +9379,138 @@ test_shape_same(void)
/* Compare against hyperslab selection */
check = H5Sselect_shape_same(irreg_hyper_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(irreg_hyper_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(irreg_hyper_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare scalar "all" dataspace with all selections created */
/* Compare against itself */
check = H5Sselect_shape_same(scalar_all_sid, scalar_all_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(scalar_all_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(scalar_all_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(scalar_all_sid, all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "none" selection */
check = H5Sselect_shape_same(scalar_all_sid, none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(scalar_all_sid, single_pt_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(scalar_all_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(scalar_all_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(scalar_all_sid, single_hyper_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(scalar_all_sid, single_hyper_pt_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(scalar_all_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(scalar_all_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(scalar_all_sid, none_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(scalar_all_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare scalar "none" dataspace with all selections created */
/* Compare against itself */
check = H5Sselect_shape_same(scalar_none_sid, scalar_none_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(scalar_none_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(scalar_none_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(scalar_none_sid, all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "none" selection */
check = H5Sselect_shape_same(scalar_none_sid, none_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(scalar_none_sid, single_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(scalar_none_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(scalar_none_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(scalar_none_sid, single_hyper_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(scalar_none_sid, single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(scalar_none_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(scalar_none_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(scalar_none_sid, none_hyper_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(scalar_none_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Close dataspaces */
ret = H5Sclose(all_sid);
@@ -9552,16 +9552,16 @@ test_shape_same(void)
** xz plane, and three parallel to the yz plane.
**
** Assuming that z is the fastest changing dimension,
-** H5Sselect_shape_same() should return TRUE when comparing
+** H5Sselect_shape_same() should return true when comparing
** the full 2-D space against any hyperslab parallel to the
-** yz plane in the 3-D space, and FALSE when comparing the
+** yz plane in the 3-D space, and false when comparing the
** full 2-D space against the other two hyperslabs.
**
** Also create two additional 3-D dataspaces (10 X 10 X 10),
** and select a (10 X 10 X 2) hyperslab parallel to the yz
** axis in one of them, and two parallel (10 X 10 X 1) hyper
** slabs parallel to the yz axis in the other.
-** H5Sselect_shape_same() should return FALSE when comparing
+** H5Sselect_shape_same() should return false when comparing
** each to the 2-D selection.
**
****************************************************************/
@@ -9736,39 +9736,39 @@ test_shape_same_dr__smoke_check_1(void)
/* Compare against "xy" selection */
check = H5Sselect_shape_same(small_cube_xy_slice_0_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xy_slice_1_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xy_slice_2_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "xz" selection */
check = H5Sselect_shape_same(small_cube_xz_slice_0_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xz_slice_1_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xz_slice_2_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "yz" selection */
check = H5Sselect_shape_same(small_cube_yz_slice_0_sid, small_square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_yz_slice_1_sid, small_square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_yz_slice_2_sid, small_square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_yz_slice_3_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_yz_slice_4_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Close dataspaces */
ret = H5Sclose(small_square_sid);
@@ -9837,17 +9837,17 @@ test_shape_same_dr__smoke_check_1(void)
** to the yz plane.
**
** Assuming that z is the fastest changing dimension,
-** H5Sselect_shape_same() should return TRUE when comparing
+** H5Sselect_shape_same() should return true when comparing
** the 2-D space checker board selection against a checker
** board hyperslab parallel to the yz plane in the 3-D
-** space, and FALSE when comparing the 2-D checkerboard
+** space, and false when comparing the 2-D checkerboard
** selection against two hyperslabs parallel to the xy
** or xz planes.
**
** Also create an additional 3-D dataspaces (10 X 10 X 10),
** and select a checker board parallel with the yz axis,
** save with some squares being on different planes.
-** H5Sselect_shape_same() should return FALSE when
+** H5Sselect_shape_same() should return false when
** comparing this selection to the 2-D selection.
**
****************************************************************/
@@ -10113,36 +10113,36 @@ test_shape_same_dr__smoke_check_2(void)
/* Compare against "xy" selection */
check = H5Sselect_shape_same(small_cube_xy_slice_0_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xy_slice_1_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xy_slice_2_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "xz" selection */
check = H5Sselect_shape_same(small_cube_xz_slice_0_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xz_slice_1_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xz_slice_2_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "yz" selection */
check = H5Sselect_shape_same(small_cube_yz_slice_0_sid, small_square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_yz_slice_1_sid, small_square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_yz_slice_2_sid, small_square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_yz_slice_3_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Close dataspaces */
ret = H5Sclose(small_square_sid);
@@ -10211,10 +10211,10 @@ test_shape_same_dr__smoke_check_2(void)
** cases.
**
** Assuming that z is the fastest changing dimension,
-** H5Sselect_shape_same() should return TRUE when
+** H5Sselect_shape_same() should return true when
** comparing the 2-D irregular hyperslab selection
** against the irregular hyperslab selections parallel
-** to the yz plane in the 3-D space, and FALSE when
+** to the yz plane in the 3-D space, and false when
** comparing it against the irregular hyperslabs
** selections parallel to the xy or xz planes.
**
@@ -10594,33 +10594,33 @@ test_shape_same_dr__smoke_check_3(void)
/* Compare against "xy" selection */
check = H5Sselect_shape_same(small_cube_xy_slice_0_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xy_slice_1_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xy_slice_2_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "xz" selection */
check = H5Sselect_shape_same(small_cube_xz_slice_0_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xz_slice_1_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xz_slice_2_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "yz" selection */
check = H5Sselect_shape_same(small_cube_yz_slice_0_sid, small_square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_yz_slice_1_sid, small_square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_yz_slice_2_sid, small_square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Close dataspaces */
ret = H5Sclose(small_square_sid);
@@ -10680,8 +10680,8 @@ test_shape_same_dr__smoke_check_3(void)
**
** Compare the 2-D space against all the other spaces
** with H5Sselect_shape_same(). The (1 X 10 X 10) &
-** (1 X 1 X 10 X 10) should return TRUE. All others
-** should return FALSE.
+** (1 X 1 X 10 X 10) should return true. All others
+** should return false.
**
****************************************************************/
static void
@@ -10796,37 +10796,37 @@ test_shape_same_dr__smoke_check_4(void)
/* setup is done -- run the tests: */
check = H5Sselect_shape_same(three_d_space_0_sid, square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(three_d_space_1_sid, square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(three_d_space_2_sid, square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(three_d_space_3_sid, square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(four_d_space_0_sid, square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(four_d_space_1_sid, square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(four_d_space_2_sid, square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(four_d_space_3_sid, square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(four_d_space_4_sid, square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(four_d_space_5_sid, square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(four_d_space_6_sid, square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Close dataspaces */
ret = H5Sclose(square_sid);
@@ -10873,7 +10873,7 @@ test_shape_same_dr__smoke_check_4(void)
** of an m-cube (m > n) in a call to H5Sselect_shape_same().
** Note that this test does not require the n-cube and the
** n-dimensional slice to have the same rank (although
-** H5Sselect_shape_same() should always return FALSE if
+** H5Sselect_shape_same() should always return false if
** they don't).
**
** Per Quincey's suggestion, only test up to 5 dimensional
@@ -10882,7 +10882,7 @@ test_shape_same_dr__smoke_check_4(void)
****************************************************************/
static void
test_shape_same_dr__full_space_vs_slice(int test_num, int small_rank, int large_rank, int offset,
- hsize_t edge_size, hbool_t dim_selected[], hbool_t expected_result)
+ hsize_t edge_size, bool dim_selected[], bool expected_result)
{
char test_desc_0[128];
char test_desc_1[256];
@@ -10909,15 +10909,13 @@ test_shape_same_dr__full_space_vs_slice(int test_num, int small_rank, int large_
assert(edge_size > 0);
assert(edge_size <= 1000);
- HDsnprintf(test_desc_0, sizeof(test_desc_0), "\tn-cube slice through m-cube (n <= m) test %d.\n",
- test_num);
+ snprintf(test_desc_0, sizeof(test_desc_0), "\tn-cube slice through m-cube (n <= m) test %d.\n", test_num);
MESSAGE(7, ("%s", test_desc_0));
/* This statement must be updated if SS_DR_MAX_RANK is changed */
- HDsnprintf(test_desc_1, sizeof(test_desc_1),
- "\t\tranks: %d/%d offset: %d dim_selected: %d/%d/%d/%d/%d.\n", small_rank, large_rank, offset,
- (int)dim_selected[0], (int)dim_selected[1], (int)dim_selected[2], (int)dim_selected[3],
- (int)dim_selected[4]);
+ snprintf(test_desc_1, sizeof(test_desc_1), "\t\tranks: %d/%d offset: %d dim_selected: %d/%d/%d/%d/%d.\n",
+ small_rank, large_rank, offset, (int)dim_selected[0], (int)dim_selected[1], (int)dim_selected[2],
+ (int)dim_selected[3], (int)dim_selected[4]);
MESSAGE(7, ("%s", test_desc_1));
/* copy the edge size into the dims array */
@@ -11011,8 +11009,8 @@ test_shape_same_dr__full_space_vs_slice(int test_num, int small_rank, int large_
static void
test_shape_same_dr__run_full_space_vs_slice_tests(void)
{
- hbool_t dim_selected[5];
- hbool_t expected_result;
+ bool dim_selected[5];
+ bool expected_result;
int i, j;
int v, w, x, y, z;
int test_num = 0;
@@ -11025,52 +11023,52 @@ test_shape_same_dr__run_full_space_vs_slice_tests(void)
v = 0;
do {
if (v == 0)
- dim_selected[0] = FALSE;
+ dim_selected[0] = false;
else
- dim_selected[0] = TRUE;
+ dim_selected[0] = true;
w = 0;
do {
if (w == 0)
- dim_selected[1] = FALSE;
+ dim_selected[1] = false;
else
- dim_selected[1] = TRUE;
+ dim_selected[1] = true;
x = 0;
do {
if (x == 0)
- dim_selected[2] = FALSE;
+ dim_selected[2] = false;
else
- dim_selected[2] = TRUE;
+ dim_selected[2] = true;
y = 0;
do {
if (y == 0)
- dim_selected[3] = FALSE;
+ dim_selected[3] = false;
else
- dim_selected[3] = TRUE;
+ dim_selected[3] = true;
z = 0;
do {
if (z == 0)
- dim_selected[4] = FALSE;
+ dim_selected[4] = false;
else
- dim_selected[4] = TRUE;
+ dim_selected[4] = true;
/* compute the expected result: */
i = 0;
j = 4;
- expected_result = TRUE;
+ expected_result = true;
while ((i < small_rank) && expected_result) {
if (!dim_selected[j])
- expected_result = FALSE;
+ expected_result = false;
i++;
j--;
}
while ((i < large_rank) && expected_result) {
if (dim_selected[j])
- expected_result = FALSE;
+ expected_result = false;
i++;
j--;
}
@@ -11116,7 +11114,7 @@ test_shape_same_dr__run_full_space_vs_slice_tests(void)
**
** Note that this test does not require the n-cube and the
** n-dimensional slice to have the same rank (although
-** H5Sselect_shape_same() should always return FALSE if
+** H5Sselect_shape_same() should always return false if
** they don't).
**
** Per Quincey's suggestion, only test up to 5 dimensional
@@ -11125,7 +11123,7 @@ test_shape_same_dr__run_full_space_vs_slice_tests(void)
****************************************************************/
static void
test_shape_same_dr__checkerboard(int test_num, int small_rank, int large_rank, int offset, hsize_t edge_size,
- hsize_t checker_size, hbool_t dim_selected[], hbool_t expected_result)
+ hsize_t checker_size, bool dim_selected[], bool expected_result)
{
char test_desc_0[128];
char test_desc_1[256];
@@ -11163,22 +11161,22 @@ test_shape_same_dr__checkerboard(int test_num, int small_rank, int large_rank, i
assert(offset < (int)edge_size);
for (i = SS_DR_MAX_RANK - large_rank; i < SS_DR_MAX_RANK; i++)
- if (dim_selected[i] == TRUE)
+ if (dim_selected[i] == true)
dims_selected++;
assert(dims_selected >= 0);
assert(dims_selected <= large_rank);
- HDsnprintf(test_desc_0, sizeof(test_desc_0),
- "\tcheckerboard n-cube slice through m-cube (n <= m) test %d.\n", test_num);
+ snprintf(test_desc_0, sizeof(test_desc_0),
+ "\tcheckerboard n-cube slice through m-cube (n <= m) test %d.\n", test_num);
MESSAGE(7, ("%s", test_desc_0));
/* This statement must be updated if SS_DR_MAX_RANK is changed */
- HDsnprintf(test_desc_1, sizeof(test_desc_1),
- "\tranks: %d/%d edge/chkr size: %d/%d offset: %d dim_selected: %d/%d/%d/%d/%d:%d.\n",
- small_rank, large_rank, (int)edge_size, (int)checker_size, offset, (int)dim_selected[0],
- (int)dim_selected[1], (int)dim_selected[2], (int)dim_selected[3], (int)dim_selected[4],
- dims_selected);
+ snprintf(test_desc_1, sizeof(test_desc_1),
+ "\tranks: %d/%d edge/chkr size: %d/%d offset: %d dim_selected: %d/%d/%d/%d/%d:%d.\n", small_rank,
+ large_rank, (int)edge_size, (int)checker_size, offset, (int)dim_selected[0],
+ (int)dim_selected[1], (int)dim_selected[2], (int)dim_selected[3], (int)dim_selected[4],
+ dims_selected);
MESSAGE(7, ("%s", test_desc_1));
/* copy the edge size into the dims array */
@@ -11450,65 +11448,65 @@ test_shape_same_dr__checkerboard(int test_num, int small_rank, int large_rank, i
static void
test_shape_same_dr__run_checkerboard_tests(void)
{
- hbool_t dim_selected[5];
- hbool_t expected_result;
- int i, j;
- int v, w, x, y, z;
- int test_num = 0;
- int small_rank;
- int large_rank;
+ bool dim_selected[5];
+ bool expected_result;
+ int i, j;
+ int v, w, x, y, z;
+ int test_num = 0;
+ int small_rank;
+ int large_rank;
for (large_rank = 1; large_rank <= 5; large_rank++) {
for (small_rank = 1; small_rank <= large_rank; small_rank++) {
v = 0;
do {
if (v == 0)
- dim_selected[0] = FALSE;
+ dim_selected[0] = false;
else
- dim_selected[0] = TRUE;
+ dim_selected[0] = true;
w = 0;
do {
if (w == 0)
- dim_selected[1] = FALSE;
+ dim_selected[1] = false;
else
- dim_selected[1] = TRUE;
+ dim_selected[1] = true;
x = 0;
do {
if (x == 0)
- dim_selected[2] = FALSE;
+ dim_selected[2] = false;
else
- dim_selected[2] = TRUE;
+ dim_selected[2] = true;
y = 0;
do {
if (y == 0)
- dim_selected[3] = FALSE;
+ dim_selected[3] = false;
else
- dim_selected[3] = TRUE;
+ dim_selected[3] = true;
z = 0;
do {
if (z == 0)
- dim_selected[4] = FALSE;
+ dim_selected[4] = false;
else
- dim_selected[4] = TRUE;
+ dim_selected[4] = true;
/* compute the expected result: */
i = 0;
j = 4;
- expected_result = TRUE;
+ expected_result = true;
while ((i < small_rank) && expected_result) {
if (!dim_selected[j])
- expected_result = FALSE;
+ expected_result = false;
i++;
j--;
} /* end while */
while ((i < large_rank) && expected_result) {
if (dim_selected[j])
- expected_result = FALSE;
+ expected_result = false;
i++;
j--;
} /* end while */
@@ -11628,13 +11626,13 @@ test_shape_same_dr__run_checkerboard_tests(void)
**
** Note that this test does not require the n-cube and the
** n-dimensional slice to have the same rank (although
-** H5Sselect_shape_same() should always return FALSE if
+** H5Sselect_shape_same() should always return false if
** they don't).
**
****************************************************************/
static void
test_shape_same_dr__irregular(int test_num, int small_rank, int large_rank, int pattern_offset,
- int slice_offset, hbool_t dim_selected[], hbool_t expected_result)
+ int slice_offset, bool dim_selected[], bool expected_result)
{
char test_desc_0[128];
char test_desc_1[256];
@@ -11708,22 +11706,21 @@ test_shape_same_dr__irregular(int test_num, int small_rank, int large_rank, int
assert(pattern_offset <= 2);
for (i = SS_DR_MAX_RANK - large_rank; i < SS_DR_MAX_RANK; i++)
- if (dim_selected[i] == TRUE)
+ if (dim_selected[i] == true)
dims_selected++;
assert(dims_selected >= 0);
assert(dims_selected <= large_rank);
- HDsnprintf(test_desc_0, sizeof(test_desc_0),
- "\tirregular sub set of n-cube slice through m-cube (n <= m) test %d.\n", test_num);
+ snprintf(test_desc_0, sizeof(test_desc_0),
+ "\tirregular sub set of n-cube slice through m-cube (n <= m) test %d.\n", test_num);
MESSAGE(7, ("%s", test_desc_0));
/* This statement must be updated if SS_DR_MAX_RANK is changed */
- HDsnprintf(test_desc_1, sizeof(test_desc_1),
- "\tranks: %d/%d edge: %d s/p offset: %d/%d dim_selected: %d/%d/%d/%d/%d:%d.\n", small_rank,
- large_rank, edge_size, slice_offset, pattern_offset, (int)dim_selected[0],
- (int)dim_selected[1], (int)dim_selected[2], (int)dim_selected[3], (int)dim_selected[4],
- dims_selected);
+ snprintf(test_desc_1, sizeof(test_desc_1),
+ "\tranks: %d/%d edge: %d s/p offset: %d/%d dim_selected: %d/%d/%d/%d/%d:%d.\n", small_rank,
+ large_rank, edge_size, slice_offset, pattern_offset, (int)dim_selected[0], (int)dim_selected[1],
+ (int)dim_selected[2], (int)dim_selected[3], (int)dim_selected[4], dims_selected);
MESSAGE(7, ("%s", test_desc_1));
/* copy the edge size into the dims array */
@@ -11891,65 +11888,65 @@ test_shape_same_dr__irregular(int test_num, int small_rank, int large_rank, int
static void
test_shape_same_dr__run_irregular_tests(void)
{
- hbool_t dim_selected[5];
- hbool_t expected_result;
- int i, j;
- int v, w, x, y, z;
- int test_num = 0;
- int small_rank;
- int large_rank;
+ bool dim_selected[5];
+ bool expected_result;
+ int i, j;
+ int v, w, x, y, z;
+ int test_num = 0;
+ int small_rank;
+ int large_rank;
for (large_rank = 1; large_rank <= 5; large_rank++) {
for (small_rank = 1; small_rank <= large_rank; small_rank++) {
v = 0;
do {
if (v == 0)
- dim_selected[0] = FALSE;
+ dim_selected[0] = false;
else
- dim_selected[0] = TRUE;
+ dim_selected[0] = true;
w = 0;
do {
if (w == 0)
- dim_selected[1] = FALSE;
+ dim_selected[1] = false;
else
- dim_selected[1] = TRUE;
+ dim_selected[1] = true;
x = 0;
do {
if (x == 0)
- dim_selected[2] = FALSE;
+ dim_selected[2] = false;
else
- dim_selected[2] = TRUE;
+ dim_selected[2] = true;
y = 0;
do {
if (y == 0)
- dim_selected[3] = FALSE;
+ dim_selected[3] = false;
else
- dim_selected[3] = TRUE;
+ dim_selected[3] = true;
z = 0;
do {
if (z == 0)
- dim_selected[4] = FALSE;
+ dim_selected[4] = false;
else
- dim_selected[4] = TRUE;
+ dim_selected[4] = true;
/* compute the expected result: */
i = 0;
j = 4;
- expected_result = TRUE;
+ expected_result = true;
while ((i < small_rank) && expected_result) {
if (!dim_selected[j])
- expected_result = FALSE;
+ expected_result = false;
i++;
j--;
} /* end while */
while ((i < large_rank) && expected_result) {
if (dim_selected[j])
- expected_result = FALSE;
+ expected_result = false;
i++;
j--;
} /* end while */
@@ -12142,9 +12139,9 @@ test_space_rebuild(void)
CHECK(ret, FAIL, "H5S_hyper_rebuild");
}
if (ret != FAIL) {
- /* In this case, rebuild_check should be TRUE. */
+ /* In this case, rebuild_check should be true. */
rebuild_check = H5Sselect_shape_same(sid_reg1, sid_reg_ori1);
- CHECK(rebuild_check, FALSE, "H5Sselect_shape_same");
+ CHECK(rebuild_check, false, "H5Sselect_shape_same");
}
/* For irregular hyperslab */
@@ -12229,9 +12226,9 @@ test_space_rebuild(void)
CHECK(ret, FAIL, "H5S_hyper_rebuild");
} /* end if */
if (ret != FAIL) {
- /* In this case, rebuild_check should be TRUE. */
+ /* In this case, rebuild_check should be true. */
rebuild_check = H5Sselect_shape_same(sid_reg2, sid_reg_ori2);
- CHECK(rebuild_check, FALSE, "H5Sselect_shape_same");
+ CHECK(rebuild_check, false, "H5Sselect_shape_same");
}
/* 2-D irregular case */
@@ -12326,9 +12323,9 @@ test_space_rebuild(void)
CHECK(ret, FAIL, "H5S_hyper_rebuild");
}
if (ret != FAIL) {
- /* In this case, rebuild_check should be TRUE. */
+ /* In this case, rebuild_check should be true. */
rebuild_check = H5Sselect_shape_same(sid_reg3, sid_reg_ori3);
- CHECK(rebuild_check, FALSE, "H5Sselect_shape_same");
+ CHECK(rebuild_check, false, "H5Sselect_shape_same");
}
sid_irreg3 = H5Screate_simple(SPACERE3_RANK, dims3, NULL);
@@ -12434,9 +12431,9 @@ test_space_rebuild(void)
CHECK(ret, FAIL, "H5S_hyper_rebuild");
}
if (ret != FAIL) {
- /* In this case, rebuild_check should be TRUE. */
+ /* In this case, rebuild_check should be true. */
rebuild_check = H5Sselect_shape_same(sid_reg4, sid_reg_ori4);
- CHECK(rebuild_check, FALSE, "H5Sselect_shape_same");
+ CHECK(rebuild_check, false, "H5Sselect_shape_same");
}
/* Testing irregular selection */
@@ -12558,9 +12555,9 @@ test_space_rebuild(void)
CHECK(ret, FAIL, "H5S_hyper_rebuild");
}
if (ret != FAIL) {
- /* In this case, rebuild_check should be TRUE. */
+ /* In this case, rebuild_check should be true. */
rebuild_check = H5Sselect_shape_same(sid_reg5, sid_reg_ori5);
- CHECK(rebuild_check, FALSE, "H5Sselect_shape_same");
+ CHECK(rebuild_check, false, "H5Sselect_shape_same");
}
sid_irreg5 = H5Screate_simple(SPACERE5_RANK, dims5, NULL);
@@ -12622,7 +12619,7 @@ test_space_rebuild(void)
/* No need to do shape comparison */
/* We use 5-D to test a special case with
- rebuilding routine TRUE, FALSE and TRUE */
+ rebuilding routine true, false and true */
sid_spec = H5Screate_simple(SPACERE5_RANK, dims5, NULL);
/* Build up the original five dimensional regular selection */
@@ -14200,9 +14197,9 @@ test_hyper_regular(void)
ret = H5Sselect_hyperslab(sid, H5S_SELECT_SET, start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
- /* Query if 'hyperslab' selection is regular hyperslab (should be TRUE) */
+ /* Query if 'hyperslab' selection is regular hyperslab (should be true) */
is_regular = H5Sis_regular_hyperslab(sid);
- VERIFY(is_regular, TRUE, "H5Sis_regular_hyperslab");
+ VERIFY(is_regular, true, "H5Sis_regular_hyperslab");
/* Retrieve the hyperslab parameters */
ret = H5Sget_regular_hyperslab(sid, q_start, q_stride, q_count, q_block);
@@ -14230,9 +14227,9 @@ test_hyper_regular(void)
ret = H5Sselect_hyperslab(sid, H5S_SELECT_OR, t_start, NULL, t_count, NULL);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
- /* Query if 'hyperslab' selection is regular hyperslab (should be FALSE) */
+ /* Query if 'hyperslab' selection is regular hyperslab (should be false) */
is_regular = H5Sis_regular_hyperslab(sid);
- VERIFY(is_regular, FALSE, "H5Sis_regular_hyperslab");
+ VERIFY(is_regular, false, "H5Sis_regular_hyperslab");
/* Query regular hyperslab selection info (should fail) */
H5E_BEGIN_TRY
@@ -14252,9 +14249,9 @@ test_hyper_regular(void)
ret = H5Sselect_hyperslab(sid, H5S_SELECT_XOR, t_start, NULL, t_count, NULL);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
- /* Query if 'hyperslab' selection is regular hyperslab (should be TRUE) */
+ /* Query if 'hyperslab' selection is regular hyperslab (should be true) */
is_regular = H5Sis_regular_hyperslab(sid);
- VERIFY(is_regular, TRUE, "H5Sis_regular_hyperslab");
+ VERIFY(is_regular, true, "H5Sis_regular_hyperslab");
/* Retrieve the hyperslab parameters */
ret = H5Sget_regular_hyperslab(sid, q_start, q_stride, q_count, q_block);
@@ -14945,54 +14942,54 @@ test_internal_consistency(void)
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5S__internal_consistency_test(tmp_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Test "none" selection */
check = H5S__internal_consistency_test(none_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test single point selection */
check = H5S__internal_consistency_test(single_pt_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test multiple point selection */
check = H5S__internal_consistency_test(mult_pt_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test "plain" single hyperslab selection */
check = H5S__internal_consistency_test(single_hyper_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test "all" single hyperslab selection */
check = H5S__internal_consistency_test(single_hyper_all_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test "single point" single hyperslab selection */
check = H5S__internal_consistency_test(single_hyper_pt_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test regular, strided hyperslab selection */
check = H5S__internal_consistency_test(regular_hyper_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test irregular hyperslab selection */
check = H5S__internal_consistency_test(irreg_hyper_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test "no" hyperslab selection */
check = H5S__internal_consistency_test(none_hyper_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test scalar "all" hyperslab selection */
check = H5S__internal_consistency_test(scalar_all_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test scalar "none" hyperslab selection */
check = H5S__internal_consistency_test(scalar_none_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Close dataspaces */
ret = H5Sclose(all_sid);
@@ -15719,7 +15716,7 @@ test_select_intersect_block(void)
/* Test block intersection with 'none' selection (always false) */
status = H5Sselect_intersect_block(sid, block_start, block_end);
- VERIFY(status, FALSE, "H5Sselect_intersect_block");
+ VERIFY(status, false, "H5Sselect_intersect_block");
/* Set selection to 'all' */
ret = H5Sselect_all(sid);
@@ -15727,7 +15724,7 @@ test_select_intersect_block(void)
/* Test block intersection with 'all' selection (always true) */
status = H5Sselect_intersect_block(sid, block_start, block_end);
- VERIFY(status, TRUE, "H5Sselect_intersect_block");
+ VERIFY(status, true, "H5Sselect_intersect_block");
/* Select sequence of ten points */
coord[0][0] = 0;
@@ -15755,9 +15752,9 @@ test_select_intersect_block(void)
/* Test block intersection with 'point' selection */
status = H5Sselect_intersect_block(sid, block_start, block_end);
- VERIFY(status, TRUE, "H5Sselect_intersect_block");
+ VERIFY(status, true, "H5Sselect_intersect_block");
status = H5Sselect_intersect_block(sid, block_start, block_end4);
- VERIFY(status, FALSE, "H5Sselect_intersect_block");
+ VERIFY(status, false, "H5Sselect_intersect_block");
/* Select single 4x6 hyperslab block at (2,1) */
start[0] = 2;
@@ -15773,9 +15770,9 @@ test_select_intersect_block(void)
/* Test block intersection with single 'hyperslab' selection */
status = H5Sselect_intersect_block(sid, block_start, block_end);
- VERIFY(status, TRUE, "H5Sselect_intersect_block");
+ VERIFY(status, true, "H5Sselect_intersect_block");
status = H5Sselect_intersect_block(sid, block_start, block_end4);
- VERIFY(status, FALSE, "H5Sselect_intersect_block");
+ VERIFY(status, false, "H5Sselect_intersect_block");
/* 'OR' another hyperslab block in, making an irregular hyperslab selection */
start[0] = 3;
@@ -15791,9 +15788,9 @@ test_select_intersect_block(void)
/* Test block intersection with 'hyperslab' selection */
status = H5Sselect_intersect_block(sid, block_start, block_end);
- VERIFY(status, TRUE, "H5Sselect_intersect_block");
+ VERIFY(status, true, "H5Sselect_intersect_block");
status = H5Sselect_intersect_block(sid, block_start, block_end4);
- VERIFY(status, FALSE, "H5Sselect_intersect_block");
+ VERIFY(status, false, "H5Sselect_intersect_block");
/* Select regular, strided hyperslab selection */
start[0] = 2;
@@ -15809,9 +15806,9 @@ test_select_intersect_block(void)
/* Test block intersection with single 'hyperslab' selection */
status = H5Sselect_intersect_block(sid, block_start, block_end);
- VERIFY(status, TRUE, "H5Sselect_intersect_block");
+ VERIFY(status, true, "H5Sselect_intersect_block");
status = H5Sselect_intersect_block(sid, block_start, block_end4);
- VERIFY(status, FALSE, "H5Sselect_intersect_block");
+ VERIFY(status, false, "H5Sselect_intersect_block");
/* Close dataspace */
ret = H5Sclose(sid);
@@ -16026,7 +16023,7 @@ test_h5s_set_extent_none(void)
null_sid = H5Screate(H5S_NULL);
CHECK(null_sid, H5I_INVALID_HID, "H5Screate");
equal = H5Sextent_equal(sid, null_sid);
- VERIFY(equal, TRUE, "H5Sextent_equal");
+ VERIFY(equal, true, "H5Sextent_equal");
/* Close */
ret = H5Sclose(sid);
@@ -16060,7 +16057,7 @@ test_select(void)
MESSAGE(5, ("Testing Selections\n"));
/* Get the VFD to use */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
@@ -16127,7 +16124,7 @@ test_select(void)
test_select_hyper_valid_combination(); /* Test different input combinations */
/* The following tests are currently broken with the Direct VFD */
- if (HDstrcmp(env_h5_drvr, "direct") != 0) {
+ if (strcmp(env_h5_drvr, "direct") != 0) {
test_select_hyper_and_2d(); /* Test hyperslab intersection (AND) code for 2-D dataset */
test_select_hyper_xor_2d(); /* Test hyperslab XOR code for 2-D dataset */
test_select_hyper_notb_2d(); /* Test hyperslab NOTB code for 2-D dataset */
diff --git a/test/tskiplist.c b/test/tskiplist.c
index e94e3c0a71c..7d4cda0dd29 100644
--- a/test/tskiplist.c
+++ b/test/tskiplist.c
@@ -1519,7 +1519,7 @@ test_skiplist_remove_first_many(void)
/* Remove objects from the skip list */
for (u = 0; u < NUM_ELEMS; u++) {
found_item = (int *)H5SL_remove_first(slist);
- VERIFY(*found_item > prev_item, TRUE, "H5SL_remove_first");
+ VERIFY(*found_item > prev_item, true, "H5SL_remove_first");
prev_item = *found_item;
} /* end for */
diff --git a/test/tsohm.c b/test/tsohm.c
index fd931a0fa42..b3f48d323d1 100644
--- a/test/tsohm.c
+++ b/test/tsohm.c
@@ -193,9 +193,9 @@ verify_fcpl_values(hid_t fcpl_id, const unsigned nindexes_expected, const unsign
static void
test_sohm_fcpl(void)
{
- hid_t fid = -1;
- hid_t fcpl_id = -1;
- hid_t fcpl2_id = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t fcpl_id = H5I_INVALID_HID;
+ hid_t fcpl2_id = H5I_INVALID_HID;
unsigned x;
herr_t ret;
@@ -328,8 +328,8 @@ test_sohm_fcpl(void)
static void
test_sohm_fcpl_errors(void)
{
- hid_t fcpl_id = -1;
- hid_t fid = -1;
+ hid_t fcpl_id = H5I_INVALID_HID;
+ hid_t fid = H5I_INVALID_HID;
unsigned x;
herr_t ret;
@@ -417,8 +417,8 @@ test_sohm_fcpl_errors(void)
static hid_t
make_dtype_1(void)
{
- hid_t dtype1_id = -1;
- hid_t str_id = -1;
+ hid_t dtype1_id = H5I_INVALID_HID;
+ hid_t str_id = H5I_INVALID_HID;
/* Create compound datatype. */
if ((dtype1_id = H5Tcreate(H5T_COMPOUND, sizeof(struct dtype1_struct))) < 0)
@@ -480,9 +480,9 @@ make_dtype_1(void)
static hid_t
make_dtype_2(void)
{
- hid_t dtype2_id = -1;
- hid_t enum_id = -1;
- hid_t int_id = -1;
+ hid_t dtype2_id = H5I_INVALID_HID;
+ hid_t enum_id = H5I_INVALID_HID;
+ hid_t int_id = H5I_INVALID_HID;
int x;
hsize_t dims[] = {2, 1, 2, 4};
size_t size;
@@ -566,7 +566,7 @@ close_reopen_file(hid_t file, const char *filename, hid_t fapl_id)
*
* Purpose: Creates object headers that use a large datatype message.
*
- * Set test_file_closing to TRUE to add file closing and reopening
+ * Set test_file_closing to true to add file closing and reopening
* whenever possible (to test that SOHMs are written correctly
* on disk and not just in memory).
*
@@ -576,7 +576,7 @@ close_reopen_file(hid_t file, const char *filename, hid_t fapl_id)
*-------------------------------------------------------------------------
*/
static hid_t
-size1_helper(hid_t file, const char *filename, hid_t fapl_id, hbool_t test_file_closing)
+size1_helper(hid_t file, const char *filename, hid_t fapl_id, bool test_file_closing)
{
dtype1_struct wdata;
dtype1_struct rdata;
@@ -604,7 +604,7 @@ size1_helper(hid_t file, const char *filename, hid_t fapl_id, hbool_t test_file_
printf("Can't read data\n"); \
goto error; \
} \
- if ((rdata.i1 != wdata.i1) || (rdata.i2 != wdata.i2) || HDstrcmp(rdata.str, wdata.str) != 0) { \
+ if ((rdata.i1 != wdata.i1) || (rdata.i2 != wdata.i2) || strcmp(rdata.str, wdata.str) != 0) { \
H5_FAILED(); \
AT(); \
printf("incorrect read data\n"); \
@@ -616,12 +616,12 @@ size1_helper(hid_t file, const char *filename, hid_t fapl_id, hbool_t test_file_
* local disks. Don't close and reopen if express testing is enabled.
*/
if (GetTestExpress() > 1)
- test_file_closing = FALSE;
+ test_file_closing = false;
/* Initialize wdata */
memset(&wdata, 0, sizeof(wdata));
wdata.i1 = 11;
- HDstrcpy(wdata.str, "string");
+ strcpy(wdata.str, "string");
wdata.i2 = 22;
wdata.i3 = 33;
wdata.i4 = 44;
@@ -750,7 +750,7 @@ size1_helper(hid_t file, const char *filename, hid_t fapl_id, hbool_t test_file_
*----------------------------------------------------------------------------
*/
static h5_stat_size_t
-getsize_testsize1(const char *filename, hid_t fcpl_id, hid_t fapl_id, hbool_t test_file_closing,
+getsize_testsize1(const char *filename, hid_t fcpl_id, hid_t fapl_id, bool test_file_closing,
H5O_native_info_t *ninfo)
{
hid_t fid = H5I_INVALID_HID;
@@ -759,7 +759,7 @@ getsize_testsize1(const char *filename, hid_t fcpl_id, hid_t fapl_id, hbool_t te
fid = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl_id, fapl_id);
CHECK(fid, H5I_INVALID_HID, "H5Fcreate");
- /* If test_file_closing is TRUE, you will get back a different ID,
+ /* If test_file_closing is true, you will get back a different ID,
* which will need to be closed. The helper will close your passed-in
* ID.
*/
@@ -785,9 +785,9 @@ getsize_testsize1(const char *filename, hid_t fcpl_id, hid_t fapl_id, hbool_t te
static void
test_sohm_size1(void)
{
- hid_t file = -1;
- hid_t fcpl_id = -1;
- hid_t fapl_id = -1;
+ hid_t file = H5I_INVALID_HID;
+ hid_t fcpl_id = H5I_INVALID_HID;
+ hid_t fapl_id = H5I_INVALID_HID;
unsigned use_shared = 0;
unsigned use_btree = 0;
@@ -833,7 +833,7 @@ test_sohm_size1(void)
for (use_shared = 0; use_shared < 2; use_shared++) {
for (use_btree = 0; use_btree < 2; use_btree++) {
- hbool_t test_open_close;
+ bool test_open_close;
/* cannot use btree indexing without shared messages; skip case */
if (use_btree && !use_shared)
@@ -871,9 +871,9 @@ test_sohm_size1(void)
file_sizes[size_index++] = h5_get_file_size(FILENAME, fapl_id);
/* size of populated file, with different populating behaviors */
- test_open_close = TRUE;
+ test_open_close = true;
file_sizes[size_index++] = getsize_testsize1(FILENAME, fcpl_id, fapl_id, test_open_close, &ninfo);
- test_open_close = FALSE;
+ test_open_close = false;
file_sizes[size_index++] = getsize_testsize1(FILENAME, fcpl_id, fapl_id, test_open_close, &ninfo);
oh_sizes[oh_size_index++] = ninfo.hdr.space.total;
@@ -970,9 +970,9 @@ test_sohm_size1(void)
static void
test_sohm_size_consistency_open_create(void)
{
- hid_t file = -1;
- hid_t fcpl_id = -1;
- hid_t fapl_id = -1;
+ hid_t file = H5I_INVALID_HID;
+ hid_t fcpl_id = H5I_INVALID_HID;
+ hid_t fapl_id = H5I_INVALID_HID;
unsigned use_btree;
hsize_t oh_size_open;
hsize_t oh_size_create;
@@ -1022,7 +1022,7 @@ test_sohm_size_consistency_open_create(void)
* Add messages to previously-created file */
file = H5Fopen(FILENAME, H5F_ACC_RDWR, fapl_id);
CHECK_I(file, "H5Fopen");
- file = size1_helper(file, FILENAME, fapl_id, FALSE);
+ file = size1_helper(file, FILENAME, fapl_id, false);
CHECK_I(file, "size1_helper");
/* Get the size of a dataset object header */
@@ -1037,7 +1037,7 @@ test_sohm_size_consistency_open_create(void)
* Add messages to a newly-created file */
file = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl_id, fapl_id);
CHECK_I(file, "H5Fcreate");
- file = size1_helper(file, FILENAME, fapl_id, FALSE);
+ file = size1_helper(file, FILENAME, fapl_id, false);
CHECK_I(file, "size1_helper");
/* Get the size of a dataset object header */
@@ -1101,10 +1101,10 @@ sohm_attr_helper(hid_t fcpl_id)
* 2 - committed datatype, read through second ID
*/
for (op_index = 0; op_index < TSOHM_SAH_OP_COUNT; op_index++) {
- hid_t type_id = -1;
- hid_t group_id = -1;
- hid_t attr_id = -1;
- hid_t attr_id2 = -1;
+ hid_t type_id = H5I_INVALID_HID;
+ hid_t group_id = H5I_INVALID_HID;
+ hid_t attr_id = H5I_INVALID_HID;
+ hid_t attr_id2 = H5I_INVALID_HID;
hid_t attr_read_id;
/* create group in file with name unique to op_index */
@@ -1486,7 +1486,7 @@ size2_verify_plist2(hid_t plist)
static void
size2_dump_struct(const char *name, size2_helper_struct *sizes)
{
- HDputs(name);
+ puts(name);
printf(" empty size: %llu\n", (unsigned long long)sizes->empty_size);
printf(" first dataset: %llu \tdelta: %llu\n", (unsigned long long)sizes->first_dset,
(unsigned long long)(sizes->first_dset - sizes->empty_size));
@@ -1525,18 +1525,18 @@ size2_dump_struct(const char *name, size2_helper_struct *sizes)
static int
size2_helper(hid_t fcpl_id, int test_file_closing, size2_helper_struct *ret_sizes)
{
- hid_t file_id = -1;
- hid_t dtype1_id = -1;
- hid_t dtype2_id = -1;
- hid_t dspace1_id = -1;
- hid_t dspace2_id = -1;
- hid_t dcpl1_id = -1;
- hid_t dcpl2_id = -1;
- hid_t dset_id = -1;
- hid_t attr_type_id = -1;
- hid_t attr_space_id = -1;
- hid_t attr_id = -1;
- hid_t group_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t dtype1_id = H5I_INVALID_HID;
+ hid_t dtype2_id = H5I_INVALID_HID;
+ hid_t dspace1_id = H5I_INVALID_HID;
+ hid_t dspace2_id = H5I_INVALID_HID;
+ hid_t dcpl1_id = H5I_INVALID_HID;
+ hid_t dcpl2_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t attr_type_id = H5I_INVALID_HID;
+ hid_t attr_space_id = H5I_INVALID_HID;
+ hid_t attr_id = H5I_INVALID_HID;
+ hid_t group_id = H5I_INVALID_HID;
char attr_string1[NAME_BUF_SIZE];
char attr_string2[NAME_BUF_SIZE];
char attr_name[NAME_BUF_SIZE];
@@ -1631,8 +1631,8 @@ size2_helper(hid_t fcpl_id, int test_file_closing, size2_helper_struct *ret_size
/* Set up attribute data */
memset(attr_string1, 0, (size_t)NAME_BUF_SIZE);
memset(attr_string2, 0, (size_t)NAME_BUF_SIZE);
- HDstrcpy(attr_string1, LONG_STRING);
- HDstrcpy(attr_string2, LONG_STRING);
+ strcpy(attr_string1, LONG_STRING);
+ strcpy(attr_string2, LONG_STRING);
attr_string2[1] = '1'; /* The second string starts "01 index..." */
/* Set up attribute metadata */
@@ -1788,7 +1788,7 @@ size2_helper(hid_t fcpl_id, int test_file_closing, size2_helper_struct *ret_size
group_id = H5Gopen2(file_id, "group", H5P_DEFAULT);
CHECK_I(group_id, "H5Gopen2");
- HDstrcpy(attr_name, "00 index");
+ strcpy(attr_name, "00 index");
for (x = 0; x < NUM_ATTRIBUTES; ++x) {
/* Create a unique name and value for each attribute */
@@ -1894,10 +1894,10 @@ size2_helper(hid_t fcpl_id, int test_file_closing, size2_helper_struct *ret_size
static void
size2_verify(void)
{
- hid_t file_id = -1;
- hid_t dset_id = -1;
- hid_t plist_id = -1;
- hid_t space_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t plist_id = H5I_INVALID_HID;
+ hid_t space_id = H5I_INVALID_HID;
hid_t group1_id, group2_id;
hid_t attr1_id, attr2_id;
hid_t attr_type_id;
@@ -2038,8 +2038,8 @@ size2_verify(void)
memset(attr_string, 0, (size_t)NAME_BUF_SIZE);
memset(attr_correct_string, 0, (size_t)NAME_BUF_SIZE);
- HDstrcpy(attr_correct_string, LONG_STRING);
- HDstrcpy(attr_name, "00 index");
+ strcpy(attr_correct_string, LONG_STRING);
+ strcpy(attr_name, "00 index");
for (x = 0; x < NUM_ATTRIBUTES; ++x) {
/* Create the name and correct value for each attribute */
@@ -2096,7 +2096,7 @@ size2_verify(void)
static void
test_sohm_size2(int close_reopen)
{
- hid_t fcpl_id = -1;
+ hid_t fcpl_id = H5I_INVALID_HID;
/* Sizes for file with no shared messages at all */
size2_helper_struct norm_sizes;
/* Sizes for files with all messages in one index */
@@ -2672,8 +2672,8 @@ test_sohm_size2(int close_reopen)
static void
delete_helper_write(hid_t file_id, hid_t *dspace_id, hid_t *dcpl_id, int x)
{
- hid_t dset_id = -1;
- hid_t attr_id = -1;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t attr_id = H5I_INVALID_HID;
char wdata;
herr_t ret;
@@ -2706,8 +2706,8 @@ delete_helper_write(hid_t file_id, hid_t *dspace_id, hid_t *dcpl_id, int x)
static void
delete_helper_read(hid_t file_id, hid_t *dspace_id, int x)
{
- hid_t dset_id = -1;
- hid_t attr_id = -1;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t attr_id = H5I_INVALID_HID;
char rdata;
herr_t ret;
@@ -2750,7 +2750,7 @@ delete_helper_read(hid_t file_id, hid_t *dspace_id, int x)
static void
delete_helper(hid_t fcpl_id, hid_t *dspace_id, hid_t *dcpl_id)
{
- hid_t file_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
int x;
h5_stat_size_t norm_filesize;
h5_stat_size_t deleted_filesize;
@@ -3135,10 +3135,10 @@ test_sohm_delete_revert(void)
static void
verify_dset_create_and_open_through_extlink_with_sohm(hid_t src_fcpl_id, hid_t dst_fcpl_id)
{
- hid_t src_file_id = -1;
- hid_t dst_file_id = -1;
- hid_t space_id = -1;
- hid_t dset_id = -1;
+ hid_t src_file_id = H5I_INVALID_HID;
+ hid_t dst_file_id = H5I_INVALID_HID;
+ hid_t space_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
hsize_t dims[] = {1, 1};
herr_t ret;
@@ -3198,9 +3198,9 @@ verify_dset_create_and_open_through_extlink_with_sohm(hid_t src_fcpl_id, hid_t d
static void
test_sohm_extlink(void)
{
- hid_t fcpl_id = -1;
- hbool_t driver_is_default_compatible;
- herr_t ret;
+ hid_t fcpl_id = H5I_INVALID_HID;
+ bool driver_is_default_compatible;
+ herr_t ret;
MESSAGE(5, ("Testing SOHM creation through external links\n"));
@@ -3233,13 +3233,13 @@ test_sohm_extlink(void)
* Purpose: Tests extending a dataset's dataspace when sharing is
* enabled.
*
- * If close_reopen is TRUE, closes and reopens the file to
+ * If close_reopen is true, closes and reopens the file to
* ensure that data is correctly written to disk.
*
*-------------------------------------------------------------------------
*/
static int
-verify_dataset_extension(hid_t fcpl_id, hbool_t close_reopen)
+verify_dataset_extension(hid_t fcpl_id, bool close_reopen)
{
hid_t file_id = H5I_INVALID_HID;
hid_t orig_space_id = H5I_INVALID_HID;
@@ -3499,7 +3499,7 @@ verify_dataset_extension(hid_t fcpl_id, hbool_t close_reopen)
static void
test_sohm_extend_dset(void)
{
- hid_t fcpl_id = -1;
+ hid_t fcpl_id = H5I_INVALID_HID;
herr_t ret;
MESSAGE(5, ("Testing extending shared dataspaces\n"));
@@ -3510,54 +3510,54 @@ test_sohm_extend_dset(void)
CHECK_I(ret, "H5Pset_shared_mesg_nindexes");
/* No shared messages */
- ret = verify_dataset_extension(fcpl_id, FALSE);
+ ret = verify_dataset_extension(fcpl_id, false);
CHECK_I(ret, "verify_dataset_extension");
- ret = verify_dataset_extension(fcpl_id, TRUE);
+ ret = verify_dataset_extension(fcpl_id, true);
CHECK_I(ret, "verify_dataset_extension");
/* Only dataspaces */
ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_SDSPACE_FLAG, 16);
CHECK_I(ret, "H5Pset_shared_mesg_index");
- ret = verify_dataset_extension(fcpl_id, FALSE);
+ ret = verify_dataset_extension(fcpl_id, false);
CHECK_I(ret, "verify_dataset_extension");
- ret = verify_dataset_extension(fcpl_id, TRUE);
+ ret = verify_dataset_extension(fcpl_id, true);
CHECK_I(ret, "verify_dataset_extension");
/* All messages */
ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_ALL_FLAG, 16);
CHECK_I(ret, "H5Pset_shared_mesg_index");
- ret = verify_dataset_extension(fcpl_id, FALSE);
+ ret = verify_dataset_extension(fcpl_id, false);
CHECK_I(ret, "verify_dataset_extension");
- ret = verify_dataset_extension(fcpl_id, TRUE);
+ ret = verify_dataset_extension(fcpl_id, true);
CHECK_I(ret, "verify_dataset_extension");
/* All messages in lists */
ret = H5Pset_shared_mesg_phase_change(fcpl_id, 100, 50);
CHECK_I(ret, "H5Pset_shared_mesg_phase_change");
- ret = verify_dataset_extension(fcpl_id, FALSE);
+ ret = verify_dataset_extension(fcpl_id, false);
CHECK_I(ret, "verify_dataset_extension");
- ret = verify_dataset_extension(fcpl_id, TRUE);
+ ret = verify_dataset_extension(fcpl_id, true);
CHECK_I(ret, "verify_dataset_extension");
/* All messages in lists converted to B-trees */
ret = H5Pset_shared_mesg_phase_change(fcpl_id, 1, 0);
CHECK_I(ret, "H5Pset_shared_mesg_phase_change");
- ret = verify_dataset_extension(fcpl_id, FALSE);
+ ret = verify_dataset_extension(fcpl_id, false);
CHECK_I(ret, "verify_dataset_extension");
- ret = verify_dataset_extension(fcpl_id, TRUE);
+ ret = verify_dataset_extension(fcpl_id, true);
CHECK_I(ret, "verify_dataset_extension");
/* All messages in B-trees */
ret = H5Pset_shared_mesg_phase_change(fcpl_id, 0, 0);
CHECK_I(ret, "H5Pset_shared_mesg_phase_change");
- ret = verify_dataset_extension(fcpl_id, FALSE);
+ ret = verify_dataset_extension(fcpl_id, false);
CHECK_I(ret, "verify_dataset_extension");
- ret = verify_dataset_extension(fcpl_id, TRUE);
+ ret = verify_dataset_extension(fcpl_id, true);
CHECK_I(ret, "verify_dataset_extension");
ret = H5Pclose(fcpl_id);
@@ -3711,12 +3711,12 @@ void
test_sohm(void)
{
const char *env_h5_drvr;
- hbool_t default_driver;
+ bool default_driver;
MESSAGE(5, ("Testing Shared Object Header Messages\n"));
/* Get the VFD to use */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
diff --git a/test/ttsafe.c b/test/ttsafe.c
index 2f792f5747d..6fe14fcc390 100644
--- a/test/ttsafe.c
+++ b/test/ttsafe.c
@@ -53,15 +53,15 @@ num_digits(int num)
void
tts_is_threadsafe(void)
{
- hbool_t is_ts;
- hbool_t should_be;
+ bool is_ts;
+ bool should_be;
#ifdef H5_HAVE_THREADSAFE
- is_ts = FALSE;
- should_be = TRUE;
+ is_ts = false;
+ should_be = true;
#else /* H5_HAVE_THREADSAFE */
- is_ts = TRUE;
- should_be = FALSE;
+ is_ts = true;
+ should_be = false;
#endif /* H5_HAVE_THREADSAFE */
if (H5is_library_threadsafe(&is_ts) != SUCCEED)
@@ -81,7 +81,7 @@ gen_name(int value)
length = num_digits(MAX_NUM_NAME - 1);
temp = (char *)malloc(NAME_OFFSET + length + 1);
- temp = HDstrcpy(temp, "attrib");
+ temp = strcpy(temp, "attrib");
temp[NAME_OFFSET + length] = '\0';
for (i = (int)(length - 1); i >= 0; i--) {
@@ -131,7 +131,7 @@ main(int argc, char *argv[])
TestSummary();
/* Clean up test files, if allowed */
- if (GetTestCleanup() && !HDgetenv(HDF5_NOCLEANUP))
+ if (GetTestCleanup() && !getenv(HDF5_NOCLEANUP))
TestCleanup();
/* Release test infrastructure */
diff --git a/test/tunicode.c b/test/tunicode.c
index 6b6e5849136..705bdfd10cf 100644
--- a/test/tunicode.c
+++ b/test/tunicode.c
@@ -94,7 +94,7 @@ test_fl_string(hid_t fid, const char *string)
ret = H5Dread(dset_id, dtype_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf);
CHECK(ret, FAIL, "H5Dread");
- VERIFY(HDstrcmp(string, read_buf), 0, "strcmp");
+ VERIFY(strcmp(string, read_buf), 0, "strcmp");
/* Close all */
ret = H5Dclose(dset_id);
@@ -137,14 +137,14 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
* the right number of bytes (even or odd, depending on the test).
* We create a 'new_string' whose length is convenient by prepending
* an 'x' to 'string' when necessary. */
- length = HDstrlen(string);
+ length = strlen(string);
if (length % 2 != 1) {
- HDstrcpy(new_string, "x");
- HDstrcat(new_string, string);
+ strcpy(new_string, "x");
+ strcat(new_string, string);
length++;
}
else {
- HDstrcpy(new_string, string);
+ strcpy(new_string, string);
}
/* Convert a null-terminated string to a shorter and longer null
@@ -163,8 +163,8 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* Fill the buffer with two copies of the UTF-8 string, each with a
* terminating NULL. It will look like "abcdefg\0abcdefg\0". */
- HDstrncpy(buf, new_string, big_len);
- HDstrncpy(&buf[big_len], new_string, big_len);
+ strncpy(buf, new_string, big_len);
+ strncpy(&buf[big_len], new_string, big_len);
ret = H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tconvert");
@@ -174,11 +174,11 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
* like; UTF-8 characters may well have been truncated.
* To check that the conversion worked properly, we'll build this
* string manually. */
- HDstrncpy(cmpbuf, new_string, small_len - 1);
+ strncpy(cmpbuf, new_string, small_len - 1);
cmpbuf[small_len - 1] = '\0';
- HDstrncpy(&cmpbuf[small_len], new_string, small_len - 1);
+ strncpy(&cmpbuf[small_len], new_string, small_len - 1);
cmpbuf[2 * small_len - 1] = '\0';
- HDstrcpy(&cmpbuf[2 * small_len], new_string);
+ strcpy(&cmpbuf[2 * small_len], new_string);
VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
@@ -190,8 +190,8 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* First fill the buffer with NULLs */
memset(cmpbuf, '\0', (size_t)LONG_BUF_SIZE);
/* Copy in the characters */
- HDstrncpy(cmpbuf, new_string, small_len - 1);
- HDstrncpy(&cmpbuf[big_len], new_string, small_len - 1);
+ strncpy(cmpbuf, new_string, small_len - 1);
+ strncpy(&cmpbuf[big_len], new_string, small_len - 1);
VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
@@ -203,14 +203,14 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* Now test null padding. Null-padded strings do *not* need
* terminating NULLs, so the sizes of the datatypes are slightly
* different and we want a string with an even number of characters. */
- length = HDstrlen(string);
+ length = strlen(string);
if (length % 2 != 0) {
- HDstrcpy(new_string, "x");
- HDstrcat(new_string, string);
+ strcpy(new_string, "x");
+ strcat(new_string, string);
length++;
}
else {
- HDstrcpy(new_string, string);
+ strcpy(new_string, string);
}
/* Create a src_type that holds the UTF-8 string */
@@ -225,8 +225,8 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* Fill the buffer with two copies of the UTF-8 string.
* It will look like "abcdefghabcdefgh". */
- HDstrncpy(buf, new_string, big_len);
- HDstrncpy(&buf[big_len], new_string, big_len);
+ strncpy(buf, new_string, big_len);
+ strncpy(&buf[big_len], new_string, big_len);
ret = H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tconvert");
@@ -236,9 +236,9 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
* like; UTF-8 characters may well have been truncated.
* To check that the conversion worked properly, we'll build this
* string manually. */
- HDstrncpy(cmpbuf, new_string, small_len);
- HDstrncpy(&cmpbuf[small_len], new_string, small_len);
- HDstrncpy(&cmpbuf[2 * small_len], new_string, big_len);
+ strncpy(cmpbuf, new_string, small_len);
+ strncpy(&cmpbuf[small_len], new_string, small_len);
+ strncpy(&cmpbuf[2 * small_len], new_string, big_len);
VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
@@ -250,8 +250,8 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* First fill the buffer with NULLs */
memset(cmpbuf, '\0', (size_t)LONG_BUF_SIZE);
/* Copy in the characters */
- HDstrncpy(cmpbuf, new_string, small_len);
- HDstrncpy(&cmpbuf[big_len], new_string, small_len);
+ strncpy(cmpbuf, new_string, small_len);
+ strncpy(&cmpbuf[big_len], new_string, small_len);
VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
@@ -270,8 +270,8 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* Fill the buffer with two copies of the UTF-8 string.
* It will look like "abcdefghabcdefgh". */
- HDstrcpy(buf, new_string);
- HDstrcpy(&buf[big_len], new_string);
+ strcpy(buf, new_string);
+ strcpy(&buf[big_len], new_string);
ret = H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tconvert");
@@ -281,9 +281,9 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
* like; UTF-8 characters may have been truncated.
* To check that the conversion worked properly, we'll build this
* string manually. */
- HDstrncpy(cmpbuf, new_string, small_len);
- HDstrncpy(&cmpbuf[small_len], new_string, small_len);
- HDstrncpy(&cmpbuf[2 * small_len], new_string, big_len);
+ strncpy(cmpbuf, new_string, small_len);
+ strncpy(&cmpbuf[small_len], new_string, small_len);
+ strncpy(&cmpbuf[2 * small_len], new_string, big_len);
VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
@@ -295,8 +295,8 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* First fill the buffer with spaces */
memset(cmpbuf, ' ', (size_t)LONG_BUF_SIZE);
/* Copy in the characters */
- HDstrncpy(cmpbuf, new_string, small_len);
- HDstrncpy(&cmpbuf[big_len], new_string, small_len);
+ strncpy(cmpbuf, new_string, small_len);
+ strncpy(&cmpbuf[big_len], new_string, small_len);
VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
@@ -340,14 +340,14 @@ test_vl_string(hid_t fid, const char *string)
/* Make certain the correct amount of memory will be used */
ret = H5Dvlen_get_buf_size(dset_id, type_id, space_id, &size);
CHECK(ret, FAIL, "H5Dvlen_get_buf_size");
- VERIFY(size, (hsize_t)HDstrlen(string) + 1, "H5Dvlen_get_buf_size");
+ VERIFY(size, (hsize_t)strlen(string) + 1, "H5Dvlen_get_buf_size");
/* Read dataset from disk */
ret = H5Dread(dset_id, type_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf);
CHECK(ret, FAIL, "H5Dread");
/* Compare data read in */
- VERIFY(HDstrcmp(string, read_buf[0]), 0, "strcmp");
+ VERIFY(strcmp(string, read_buf[0]), 0, "strcmp");
/* Reclaim the read VL data */
ret = H5Treclaim(type_id, space_id, H5P_DEFAULT, read_buf);
@@ -399,7 +399,7 @@ test_objnames(hid_t fid, const char *string)
ret = H5Gclose(grp_id);
CHECK(ret, FAIL, "H5Gclose");
- VERIFY(HDstrcmp(string, read_buf), 0, "strcmp");
+ VERIFY(strcmp(string, read_buf), 0, "strcmp");
/* Create a new dataset with a UTF-8 name */
grp1_id = H5Gcreate2(fid, GROUP1_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -449,7 +449,7 @@ test_objnames(hid_t fid, const char *string)
CHECK(ret, FAIL, "H5Dcreate2");
/* Create reference to named datatype */
- ret = H5Rcreate(&obj_ref, grp2_id, string, H5R_OBJECT, (hid_t)-1);
+ ret = H5Rcreate(&obj_ref, grp2_id, string, H5R_OBJECT, (hid_t)H5I_INVALID_HID);
CHECK(ret, FAIL, "H5Rcreate");
/* Write selection and read it back*/
ret = H5Dwrite(dset_id, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, &obj_ref);
@@ -483,9 +483,9 @@ test_objnames(hid_t fid, const char *string)
ret = H5Lcreate_hard(fid, GROUP2_NAME, grp3_id, GROUP2_NAME, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Lcreate_hard");
- HDstrcpy(path_buf, GROUP2_NAME);
- HDstrcat(path_buf, "/");
- HDstrcat(path_buf, string);
+ strcpy(path_buf, GROUP2_NAME);
+ strcat(path_buf, "/");
+ strcat(path_buf, string);
ret = H5Lcreate_hard(grp3_id, path_buf, H5L_SAME_LOC, string, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Lcreate_hard");
@@ -531,7 +531,7 @@ test_attrname(hid_t fid, const char *string)
CHECK(attr_id, FAIL, "H5Acreate2");
size = H5Aget_name(attr_id, (size_t)MAX_STRING_LENGTH, read_buf);
CHECK(size, FAIL, "H5Aget_name");
- ret = HDstrcmp(read_buf, string);
+ ret = strcmp(read_buf, string);
VERIFY(ret, 0, "strcmp");
read_buf[0] = '\0';
@@ -540,7 +540,7 @@ test_attrname(hid_t fid, const char *string)
CHECK(ret, FAIL, "H5Awrite");
ret = H5Aread(attr_id, dtype_id, read_buf);
CHECK(ret, FAIL, "H5Aread");
- ret = HDstrcmp(read_buf, string);
+ ret = strcmp(read_buf, string);
VERIFY(ret, 0, "strcmp");
/* Clean up */
@@ -598,7 +598,7 @@ test_compound(hid_t fid, const char *string)
/* Check that the field name was stored correctly */
readbuf = H5Tget_member_name(s1_tid, 0);
- ret = HDstrcmp(readbuf, string);
+ ret = strcmp(readbuf, string);
VERIFY(ret, 0, "strcmp");
H5free_memory(readbuf);
@@ -681,7 +681,7 @@ test_enum(hid_t H5_ATTR_UNUSED fid, const char *string)
VERIFY(val, E1_WHITE, "H5Tenum_valueof");
ret = H5Tenum_nameof(type_id, &val, readbuf, (size_t)MAX_STRING_LENGTH);
CHECK(ret, FAIL, "H5Tenum_nameof");
- ret = HDstrcmp(readbuf, string);
+ ret = strcmp(readbuf, string);
VERIFY(ret, 0, "strcmp");
/* Close the datatype */
@@ -708,7 +708,7 @@ test_opaque(hid_t H5_ATTR_UNUSED fid, const char *string)
/* Read the tag back. */
read_buf = H5Tget_tag(type_id);
- ret = HDstrcmp(read_buf, string);
+ ret = strcmp(read_buf, string);
VERIFY(ret, 0, "H5Tget_tag");
H5free_memory(read_buf);
@@ -782,7 +782,7 @@ dump_string(const char *string)
printf("The string was:\n %s", string);
printf("Or in hex:\n");
- length = HDstrlen(string);
+ length = strlen(string);
for (x = 0; x < length; x++)
printf("%x ", string[x] & (0x000000FF));
diff --git a/test/tvlstr.c b/test/tvlstr.c
index e36239d31f4..a3ea04141b6 100644
--- a/test/tvlstr.c
+++ b/test/tvlstr.c
@@ -186,7 +186,7 @@ test_vlstrings_basic(void)
/* Count the actual number of bytes used by the strings */
for (i = 0, str_used = 0; i < SPACE1_DIM1; i++)
- str_used += HDstrlen(wdata[i]) + 1;
+ str_used += strlen(wdata[i]) + 1;
/* Compare against the strings actually written */
VERIFY(size, (hsize_t)str_used, "H5Dvlen_get_buf_size");
@@ -200,12 +200,12 @@ test_vlstrings_basic(void)
/* Compare data read in */
for (i = 0; i < SPACE1_DIM1; i++) {
- if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
+ if (strlen(wdata[i]) != strlen(rdata[i])) {
TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i,
- (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
continue;
} /* end if */
- if (HDstrcmp(wdata[i], rdata[i]) != 0) {
+ if (strcmp(wdata[i], rdata[i]) != 0) {
TestErrPrintf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n", (int)i, wdata[i],
(int)i, rdata[i]);
continue;
@@ -304,16 +304,16 @@ test_vlstrings_special(void)
/* Compare data read in */
for (i = 0; i < SPACE1_DIM1; i++) {
- if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
+ if (strlen(wdata[i]) != strlen(rdata[i])) {
TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i,
- (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
continue;
} /* end if */
if ((wdata[i] == NULL && rdata[i] != NULL) || (rdata[i] == NULL && wdata[i] != NULL)) {
TestErrPrintf("VL data values don't match!\n");
continue;
} /* end if */
- if (HDstrcmp(wdata[i], rdata[i]) != 0) {
+ if (strcmp(wdata[i], rdata[i]) != 0) {
TestErrPrintf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n", (int)i, wdata[i],
(int)i, rdata[i]);
continue;
@@ -424,12 +424,12 @@ test_vlstring_type(void)
ret = H5Tget_class(tid_vlstr);
VERIFY(ret, H5T_STRING, "H5Tget_class");
ret = H5Tis_variable_str(tid_vlstr);
- VERIFY(ret, TRUE, "H5Tis_variable_str");
+ VERIFY(ret, true, "H5Tis_variable_str");
/* Verify that the class detects as a string */
vl_str = H5Tdetect_class(tid_vlstr, H5T_STRING);
CHECK(vl_str, FAIL, "H5Tdetect_class");
- VERIFY(vl_str, TRUE, "H5Tdetect_class");
+ VERIFY(vl_str, true, "H5Tdetect_class");
/* Check default character set and padding */
cset = H5Tget_cset(tid_vlstr);
@@ -533,12 +533,12 @@ test_compact_vlstring(void)
/* Compare data read in */
for (i = 0; i < SPACE1_DIM1; i++) {
- if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
+ if (strlen(wdata[i]) != strlen(rdata[i])) {
TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i,
- (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
continue;
} /* end if */
- if (HDstrcmp(wdata[i], rdata[i]) != 0) {
+ if (strcmp(wdata[i], rdata[i]) != 0) {
TestErrPrintf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n", (int)i, wdata[i],
(int)i, rdata[i]);
continue;
@@ -611,7 +611,7 @@ test_write_vl_string_attribute(void)
ret = H5Aread(att, type, &string_att_check);
CHECK(ret, FAIL, "H5Aread");
- if (HDstrcmp(string_att_check, string_att) != 0)
+ if (strcmp(string_att_check, string_att) != 0)
TestErrPrintf("VL string attributes don't match!, string_att=%s, string_att_check=%s\n", string_att,
string_att_check);
@@ -634,7 +634,7 @@ test_write_vl_string_attribute(void)
ret = H5Aread(att, type, &string_att_check);
CHECK(ret, FAIL, "H5Aread");
- if (HDstrcmp(string_att_check, string_att_write) != 0)
+ if (strcmp(string_att_check, string_att_write) != 0)
TestErrPrintf("VL string attributes don't match!, string_att_write=%s, string_att_check=%s\n",
string_att_write, string_att_check);
@@ -695,7 +695,7 @@ test_read_vl_string_attribute(void)
ret = H5Aread(att, type, &string_att_check);
CHECK(ret, FAIL, "H5Aread");
- if (HDstrcmp(string_att_check, string_att) != 0)
+ if (strcmp(string_att_check, string_att) != 0)
TestErrPrintf("VL string attributes don't match!, string_att=%s, string_att_check=%s\n", string_att,
string_att_check);
@@ -713,7 +713,7 @@ test_read_vl_string_attribute(void)
ret = H5Aread(att, type, &string_att_check);
CHECK(ret, FAIL, "H5Aread");
- if (HDstrcmp(string_att_check, string_att_write) != 0)
+ if (strcmp(string_att_check, string_att_write) != 0)
TestErrPrintf("VL string attributes don't match!, string_att_write=%s, string_att_check=%s\n",
string_att_write, string_att_check);
@@ -772,7 +772,7 @@ read_scalar_dset(hid_t file, hid_t type, hid_t space, char *name, char *data)
ret = H5Dclose(dset);
CHECK(ret, FAIL, "H5Dclose");
- if (HDstrcmp(data, data_read) != 0)
+ if (strcmp(data, data_read) != 0)
TestErrPrintf("Expected %s for dataset %s but read %s\n", data, name, data_read);
ret = H5Treclaim(type, space, H5P_DEFAULT, &data_read);
@@ -816,33 +816,33 @@ test_vl_rewrite(void)
/* Create in file 1 */
for (i = 0; i < REWRITE_NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "/set_%d", i);
+ snprintf(name, sizeof(name), "/set_%d", i);
write_scalar_dset(file1, type, space, name, name);
}
/* Effectively copy data from file 1 to 2 */
for (i = 0; i < REWRITE_NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "/set_%d", i);
+ snprintf(name, sizeof(name), "/set_%d", i);
read_scalar_dset(file1, type, space, name, name);
write_scalar_dset(file2, type, space, name, name);
}
/* Read back from file 2 */
for (i = 0; i < REWRITE_NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "/set_%d", i);
+ snprintf(name, sizeof(name), "/set_%d", i);
read_scalar_dset(file2, type, space, name, name);
} /* end for */
/* Remove from file 2. */
for (i = 0; i < REWRITE_NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "/set_%d", i);
+ snprintf(name, sizeof(name), "/set_%d", i);
ret = H5Ldelete(file2, name, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Ldelete");
} /* end for */
/* Effectively copy from file 1 to file 2 */
for (i = 0; i < REWRITE_NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "/set_%d", i);
+ snprintf(name, sizeof(name), "/set_%d", i);
read_scalar_dset(file1, type, space, name, name);
write_scalar_dset(file2, type, space, name, name);
} /* end for */
diff --git a/test/tvltypes.c b/test/tvltypes.c
index 88401d448b7..4c8813037d1 100644
--- a/test/tvltypes.c
+++ b/test/tvltypes.c
@@ -1241,9 +1241,9 @@ test_vltypes_compound_vlstr(void)
wdata[i].v.p = (s2 *)malloc((i + L3_INCM) * sizeof(s2));
wdata[i].v.len = i + L3_INCM;
for (t1 = (s2 *)((wdata[i].v).p), j = 0; j < (i + L3_INCM); j++, t1++) {
- HDstrcat(str, "m");
- t1->string = (char *)malloc(HDstrlen(str) * sizeof(char) + 1);
- HDstrcpy(t1->string, str);
+ strcat(str, "m");
+ t1->string = (char *)malloc(strlen(str) * sizeof(char) + 1);
+ strcpy(t1->string, str);
/*t1->color = red;*/
t1->color = blue;
}
@@ -1384,7 +1384,7 @@ test_vltypes_compound_vlstr(void)
for (t1 = (s2 *)(wdata[i].v.p), t2 = (s2 *)(rdata[i].v.p), j = 0; j < rdata[i].v.len;
j++, t1++, t2++) {
- if (HDstrcmp(t1->string, t2->string) != 0) {
+ if (strcmp(t1->string, t2->string) != 0) {
TestErrPrintf("VL data values don't match!, t1->string=%s, t2->string=%s\n", t1->string,
t2->string);
continue;
@@ -1406,14 +1406,14 @@ test_vltypes_compound_vlstr(void)
CHECK(ret, FAIL, "H5Treclaim");
/* Use this part for new data */
- HDstrcpy(str, "bbbbbbbb\0");
+ strcpy(str, "bbbbbbbb\0");
for (i = 0; i < SPACE1_DIM1; i++) {
wdata2[i].v.p = (s2 *)malloc((i + 1) * sizeof(s2));
wdata2[i].v.len = i + 1;
for (t1 = (s2 *)(wdata2[i].v).p, j = 0; j < i + 1; j++, t1++) {
- HDstrcat(str, "pp");
- t1->string = (char *)malloc(HDstrlen(str) * sizeof(char) + 1);
- HDstrcpy(t1->string, str);
+ strcat(str, "pp");
+ t1->string = (char *)malloc(strlen(str) * sizeof(char) + 1);
+ strcpy(t1->string, str);
t1->color = green;
}
} /* end for */
@@ -1445,7 +1445,7 @@ test_vltypes_compound_vlstr(void)
for (t1 = (s2 *)(wdata2[i].v.p), t2 = (s2 *)(rdata2[i].v.p), j = 0; j < rdata2[i].v.len;
j++, t1++, t2++) {
- if (HDstrcmp(t1->string, t2->string) != 0) {
+ if (strcmp(t1->string, t2->string) != 0) {
TestErrPrintf("VL data values don't match!, t1->string=%s, t2->string=%s\n", t1->string,
t2->string);
continue;
@@ -2499,33 +2499,33 @@ test_vltypes_fill_value(void)
const char *str_unit;
} dtype1_struct;
- herr_t ret;
- hid_t file_id;
- hid_t dtype1_id = -1;
- hid_t str_id = -1;
- hid_t small_dspace_id; /* Dataspace ID for small datasets */
- hid_t large_dspace_id; /* Dataspace ID for large datasets */
- hid_t small_select_dspace_id; /* Dataspace ID for selection in small datasets */
- hid_t large_select_dspace_id; /* Dataspace ID for selection in large datasets */
- hid_t dset_dspace_id = -1; /* Dataspace ID for a particular dataset */
- hid_t dset_select_dspace_id = -1; /* Dataspace ID for selection in a particular dataset */
- hid_t scalar_dspace_id; /* Dataspace ID for scalar dataspace */
- hid_t single_dspace_id; /* Dataspace ID for single element selection */
- hsize_t single_offset[] = {2}; /* Offset of single element selection */
- hsize_t single_block[] = {1}; /* Block size of single element selection */
- hsize_t select_offset[] = {0}; /* Offset of non-contiguous element selection */
- hsize_t select_stride[] = {2}; /* Stride size of non-contiguous element selection */
- hsize_t small_select_count[] = {SPACE4_DIM_SMALL /
+ herr_t ret;
+ hid_t file_id;
+ hid_t dtype1_id = H5I_INVALID_HID;
+ hid_t str_id = H5I_INVALID_HID;
+ hid_t small_dspace_id; /* Dataspace ID for small datasets */
+ hid_t large_dspace_id; /* Dataspace ID for large datasets */
+ hid_t small_select_dspace_id; /* Dataspace ID for selection in small datasets */
+ hid_t large_select_dspace_id; /* Dataspace ID for selection in large datasets */
+ hid_t dset_dspace_id = H5I_INVALID_HID; /* Dataspace ID for a particular dataset */
+ hid_t dset_select_dspace_id = H5I_INVALID_HID; /* Dataspace ID for selection in a particular dataset */
+ hid_t scalar_dspace_id; /* Dataspace ID for scalar dataspace */
+ hid_t single_dspace_id; /* Dataspace ID for single element selection */
+ hsize_t single_offset[] = {2}; /* Offset of single element selection */
+ hsize_t single_block[] = {1}; /* Block size of single element selection */
+ hsize_t select_offset[] = {0}; /* Offset of non-contiguous element selection */
+ hsize_t select_stride[] = {2}; /* Stride size of non-contiguous element selection */
+ hsize_t small_select_count[] = {SPACE4_DIM_SMALL /
2}; /* Count of small non-contiguous element selection */
- hsize_t large_select_count[] = {SPACE4_DIM_LARGE /
+ hsize_t large_select_count[] = {SPACE4_DIM_LARGE /
2}; /* Count of large non-contiguous element selection */
- hsize_t select_block[] = {1}; /* Block size of non-contiguous element selection */
- hid_t dcpl_id, xfer_pid;
- hid_t dset_id;
- hsize_t small_dims[] = {SPACE4_DIM_SMALL};
- hsize_t large_dims[] = {SPACE4_DIM_LARGE};
- size_t dset_elmts = 0; /* Number of elements in a particular dataset */
- const dtype1_struct fill1 = {1, 2, "foobar", "", NULL, "\0", "dead",
+ hsize_t select_block[] = {1}; /* Block size of non-contiguous element selection */
+ hid_t dcpl_id, xfer_pid;
+ hid_t dset_id;
+ hsize_t small_dims[] = {SPACE4_DIM_SMALL};
+ hsize_t large_dims[] = {SPACE4_DIM_LARGE};
+ size_t dset_elmts = 0; /* Number of elements in a particular dataset */
+ const dtype1_struct fill1 = {1, 2, "foobar", "", NULL, "\0", "dead",
3, 4.0, 100.0, 1.0, "liquid", "meter"};
const dtype1_struct wdata = {3, 4, "", NULL, "\0", "foo", "two", 6, 8.0, 200.0, 2.0, "solid", "yard"};
dtype1_struct *rbuf = NULL; /* Buffer for reading data */
@@ -2654,16 +2654,16 @@ test_vltypes_fill_value(void)
/* Layout specific actions */
switch (layout) {
case H5D_COMPACT:
- HDstrcpy(dset_name1, "dataset1-compact");
- HDstrcpy(dset_name2, "dataset2-compact");
+ strcpy(dset_name1, "dataset1-compact");
+ strcpy(dset_name2, "dataset2-compact");
dset_dspace_id = small_dspace_id;
ret = H5Pset_layout(tmp_dcpl_id, H5D_COMPACT);
CHECK(ret, FAIL, "H5Pset_layout");
break;
case H5D_CONTIGUOUS:
- HDstrcpy(dset_name1, "dataset1-contig");
- HDstrcpy(dset_name2, "dataset2-contig");
+ strcpy(dset_name1, "dataset1-contig");
+ strcpy(dset_name2, "dataset2-contig");
dset_dspace_id = large_dspace_id;
break;
@@ -2675,15 +2675,15 @@ test_vltypes_fill_value(void)
CHECK(ret, FAIL, "H5Pset_chunk");
#ifdef H5_HAVE_FILTER_DEFLATE
if (test_loop == 1) {
- HDstrcpy(dset_name1, "dataset1-chunked-compressed");
- HDstrcpy(dset_name2, "dataset2-chunked-compressed");
+ strcpy(dset_name1, "dataset1-chunked-compressed");
+ strcpy(dset_name2, "dataset2-chunked-compressed");
ret = H5Pset_deflate(tmp_dcpl_id, 3);
CHECK(ret, FAIL, "H5Pset_deflate");
} /* end if */
else {
#endif /* H5_HAVE_FILTER_DEFLATE */
- HDstrcpy(dset_name1, "dataset1-chunked");
- HDstrcpy(dset_name2, "dataset2-chunked");
+ strcpy(dset_name1, "dataset1-chunked");
+ strcpy(dset_name2, "dataset2-chunked");
#ifdef H5_HAVE_FILTER_DEFLATE
} /* end else */
#endif /* H5_HAVE_FILTER_DEFLATE */
@@ -2764,16 +2764,16 @@ test_vltypes_fill_value(void)
/* Layout specific actions */
switch (layout) {
case H5D_COMPACT:
- HDstrcpy(dset_name1, "dataset1-compact");
- HDstrcpy(dset_name2, "dataset2-compact");
+ strcpy(dset_name1, "dataset1-compact");
+ strcpy(dset_name2, "dataset2-compact");
dset_dspace_id = small_dspace_id;
dset_select_dspace_id = small_select_dspace_id;
dset_elmts = SPACE4_DIM_SMALL;
break;
case H5D_CONTIGUOUS:
- HDstrcpy(dset_name1, "dataset1-contig");
- HDstrcpy(dset_name2, "dataset2-contig");
+ strcpy(dset_name1, "dataset1-contig");
+ strcpy(dset_name2, "dataset2-contig");
dset_dspace_id = large_dspace_id;
dset_select_dspace_id = large_select_dspace_id;
dset_elmts = SPACE4_DIM_LARGE;
@@ -2782,13 +2782,13 @@ test_vltypes_fill_value(void)
case H5D_CHUNKED:
#ifdef H5_HAVE_FILTER_DEFLATE
if (test_loop == 1) {
- HDstrcpy(dset_name1, "dataset1-chunked-compressed");
- HDstrcpy(dset_name2, "dataset2-chunked-compressed");
+ strcpy(dset_name1, "dataset1-chunked-compressed");
+ strcpy(dset_name2, "dataset2-chunked-compressed");
} /* end if */
else {
#endif /* H5_HAVE_FILTER_DEFLATE */
- HDstrcpy(dset_name1, "dataset1-chunked");
- HDstrcpy(dset_name2, "dataset2-chunked");
+ strcpy(dset_name1, "dataset1-chunked");
+ strcpy(dset_name2, "dataset2-chunked");
#ifdef H5_HAVE_FILTER_DEFLATE
} /* end else */
#endif /* H5_HAVE_FILTER_DEFLATE */
@@ -2818,10 +2818,10 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 || HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 || strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -2841,11 +2841,10 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if ((i % 2) == select_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
- HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 || strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -2876,10 +2875,10 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 || HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 || strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -2899,11 +2898,10 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if ((i % 2) == select_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
- HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 || strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -2951,16 +2949,16 @@ test_vltypes_fill_value(void)
/* Layout specific actions */
switch (layout) {
case H5D_COMPACT:
- HDstrcpy(dset_name1, "dataset1-compact");
- HDstrcpy(dset_name2, "dataset2-compact");
+ strcpy(dset_name1, "dataset1-compact");
+ strcpy(dset_name2, "dataset2-compact");
dset_dspace_id = small_dspace_id;
dset_select_dspace_id = small_select_dspace_id;
dset_elmts = SPACE4_DIM_SMALL;
break;
case H5D_CONTIGUOUS:
- HDstrcpy(dset_name1, "dataset1-contig");
- HDstrcpy(dset_name2, "dataset2-contig");
+ strcpy(dset_name1, "dataset1-contig");
+ strcpy(dset_name2, "dataset2-contig");
dset_dspace_id = large_dspace_id;
dset_select_dspace_id = large_select_dspace_id;
dset_elmts = SPACE4_DIM_LARGE;
@@ -2969,13 +2967,13 @@ test_vltypes_fill_value(void)
case H5D_CHUNKED:
#ifdef H5_HAVE_FILTER_DEFLATE
if (test_loop == 1) {
- HDstrcpy(dset_name1, "dataset1-chunked-compressed");
- HDstrcpy(dset_name2, "dataset2-chunked-compressed");
+ strcpy(dset_name1, "dataset1-chunked-compressed");
+ strcpy(dset_name2, "dataset2-chunked-compressed");
} /* end if */
else {
#endif /* H5_HAVE_FILTER_DEFLATE */
- HDstrcpy(dset_name1, "dataset1-chunked");
- HDstrcpy(dset_name2, "dataset2-chunked");
+ strcpy(dset_name1, "dataset1-chunked");
+ strcpy(dset_name2, "dataset2-chunked");
#ifdef H5_HAVE_FILTER_DEFLATE
} /* end else */
#endif /* H5_HAVE_FILTER_DEFLATE */
@@ -3018,22 +3016,21 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if (i == single_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
- HDstrcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
- HDstrcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
- HDstrcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
- HDstrcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
- HDstrcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
+ if (strcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
+ strcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
+ strcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
+ strcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
+ strcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
+ strcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
} /* end if */
else {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
- HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 || strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -3054,23 +3051,23 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if (i == single_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
- HDstrcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
- HDstrcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
- HDstrcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
- HDstrcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
- HDstrcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
+ if (strcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
+ strcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
+ strcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
+ strcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
+ strcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
+ strcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
} /* end if */
else {
if ((i % 2) == select_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
- HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 ||
+ strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -3106,22 +3103,21 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if (i == single_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
- HDstrcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
- HDstrcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
- HDstrcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
- HDstrcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
- HDstrcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
+ if (strcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
+ strcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
+ strcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
+ strcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
+ strcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
+ strcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
} /* end if */
else {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
- HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 || strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -3142,23 +3138,23 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if (i == single_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
- HDstrcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
- HDstrcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
- HDstrcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
- HDstrcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
- HDstrcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
+ if (strcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
+ strcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
+ strcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
+ strcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
+ strcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
+ strcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
} /* end if */
else {
if ((i % 2) == select_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
- HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 ||
+ strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
diff --git a/test/twriteorder.c b/test/twriteorder.c
index b5ae2ea6c12..9bfe87bb2cc 100644
--- a/test/twriteorder.c
+++ b/test/twriteorder.c
@@ -379,7 +379,7 @@ main(int argc, char *argv[])
if (launch_g == UC_READWRITE) {
/* fork process */
if ((childpid = fork()) < 0) {
- HDperror("fork");
+ perror("fork");
Hgoto_error(1);
}
}
@@ -417,7 +417,7 @@ main(int argc, char *argv[])
/* ================================================ */
if (launch_g == UC_READWRITE) {
if ((tmppid = waitpid(childpid, &child_status, child_wait_option)) < 0) {
- HDperror("waitpid");
+ perror("waitpid");
Hgoto_error(1);
}
if (WIFEXITED(child_status)) {
diff --git a/test/unlink.c b/test/unlink.c
index df5b5b32603..ae8da98b491 100644
--- a/test/unlink.c
+++ b/test/unlink.c
@@ -77,7 +77,7 @@ static const char *FILENAME[] = {"unlink", "new_move_a", "new_move_
static int
test_one(hid_t file)
{
- hid_t work = -1, grp = -1;
+ hid_t work = H5I_INVALID_HID, grp = H5I_INVALID_HID;
herr_t status;
/* Create a test group */
@@ -149,7 +149,7 @@ test_one(hid_t file)
static int
test_many(hid_t file)
{
- hid_t work = -1, grp = -1;
+ hid_t work = H5I_INVALID_HID, grp = H5I_INVALID_HID;
int i;
const int how_many = 500;
char name[32];
@@ -165,12 +165,12 @@ test_many(hid_t file)
/* Create a bunch of names and unlink them in order */
TESTING("forward unlink");
for (i = 0; i < how_many; i++) {
- HDsnprintf(name, sizeof(name), "obj_%05d", i);
+ snprintf(name, sizeof(name), "obj_%05d", i);
if (H5Lcreate_hard(work, "/test_many_foo", H5L_SAME_LOC, name, H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
for (i = 0; i < how_many; i++) {
- HDsnprintf(name, sizeof(name), "obj_%05d", i);
+ snprintf(name, sizeof(name), "obj_%05d", i);
if (H5Ldelete(work, name, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -179,12 +179,12 @@ test_many(hid_t file)
/* Create a bunch of names and unlink them in reverse order */
TESTING("backward unlink");
for (i = 0; i < how_many; i++) {
- HDsnprintf(name, sizeof(name), "obj_%05d", i);
+ snprintf(name, sizeof(name), "obj_%05d", i);
if (H5Lcreate_hard(work, "/test_many_foo", H5L_SAME_LOC, name, H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
for (i = (how_many - 1); i >= 0; --i) {
- HDsnprintf(name, sizeof(name), "obj_%05d", i);
+ snprintf(name, sizeof(name), "obj_%05d", i);
if (H5Ldelete(work, name, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -193,15 +193,15 @@ test_many(hid_t file)
/* Create a bunch of names and unlink them from both directions */
TESTING("inward unlink");
for (i = 0; i < how_many; i++) {
- HDsnprintf(name, sizeof(name), "obj_%05d", i);
+ snprintf(name, sizeof(name), "obj_%05d", i);
if (H5Lcreate_hard(work, "/test_many_foo", H5L_SAME_LOC, name, H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
for (i = 0; i < how_many; i++) {
if (i % 2)
- HDsnprintf(name, sizeof(name), "obj_%05d", how_many - (1 + i / 2));
+ snprintf(name, sizeof(name), "obj_%05d", how_many - (1 + i / 2));
else
- HDsnprintf(name, sizeof(name), "obj_%05d", i / 2);
+ snprintf(name, sizeof(name), "obj_%05d", i / 2);
if (H5Ldelete(work, name, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -210,15 +210,15 @@ test_many(hid_t file)
/* Create a bunch of names and unlink them from the midle */
TESTING("outward unlink");
for (i = 0; i < how_many; i++) {
- HDsnprintf(name, sizeof(name), "obj_%05d", i);
+ snprintf(name, sizeof(name), "obj_%05d", i);
if (H5Lcreate_hard(work, "/test_many_foo", H5L_SAME_LOC, name, H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
for (i = (how_many - 1); i >= 0; --i) {
if (i % 2)
- HDsnprintf(name, sizeof(name), "obj_%05d", how_many - (1 + i / 2));
+ snprintf(name, sizeof(name), "obj_%05d", how_many - (1 + i / 2));
else
- HDsnprintf(name, sizeof(name), "obj_%05d", i / 2);
+ snprintf(name, sizeof(name), "obj_%05d", i / 2);
if (H5Ldelete(work, name, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -253,7 +253,7 @@ test_many(hid_t file)
static int
test_symlink(hid_t file)
{
- hid_t work = -1;
+ hid_t work = H5I_INVALID_HID;
TESTING("symlink removal");
@@ -295,7 +295,7 @@ test_symlink(hid_t file)
static int
test_rename(hid_t file)
{
- hid_t work = -1, foo = -1, inner = -1;
+ hid_t work = H5I_INVALID_HID, foo = H5I_INVALID_HID, inner = H5I_INVALID_HID;
/* Create a test group and rename something */
TESTING("object renaming");
@@ -356,9 +356,10 @@ test_rename(hid_t file)
static int
test_new_move(hid_t fapl)
{
- hid_t file_a, file_b = (-1);
- hid_t grp_1 = (-1), grp_2 = (-1), grp_move = (-1), moved_grp = (-1);
- char filename[1024];
+ hid_t file_a, file_b = (H5I_INVALID_HID);
+ hid_t grp_1 = (H5I_INVALID_HID), grp_2 = (H5I_INVALID_HID), grp_move = (H5I_INVALID_HID),
+ moved_grp = (H5I_INVALID_HID);
+ char filename[1024];
TESTING("new move");
@@ -484,7 +485,7 @@ check_new_move(hid_t fapl)
/* Check soft links */
if (H5Lget_val(file, "group2/soft", linkval, sizeof(linkval), H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(linkval, "/group1/group_move") != 0)
+ if (strcmp(linkval, "/group1/group_move") != 0)
FAIL_PUTS_ERROR(" Soft link test failed. Wrong link value");
/* Cleanup */
@@ -544,7 +545,7 @@ test_filespace(hid_t fapl)
size_t rdcc_nbytes;
double rdcc_w0;
- HDputs("Testing file space gets reused:");
+ puts("Testing file space gets reused:");
/* Open file */
h5_fixname(FILENAME[4], fapl, filename, sizeof filename);
@@ -901,7 +902,7 @@ test_filespace(hid_t fapl)
/* Alternate adding attributes to each one */
for (u = 0; u < FILESPACE_NATTR; u++) {
/* Set the name of the attribute to create */
- HDsnprintf(objname, sizeof(objname), "%s %u", ATTRNAME, u);
+ snprintf(objname, sizeof(objname), "%s %u", ATTRNAME, u);
/* Create an attribute on the first dataset */
if ((attr = H5Acreate2(dataset, objname, H5T_NATIVE_INT, attr_space, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -1033,7 +1034,7 @@ test_filespace(hid_t fapl)
/* Create a many groups to remove */
for (u = 0; u < UNLINK_NGROUPS; u++) {
- HDsnprintf(objname, sizeof(objname), "%s %u", GROUPNAME, u);
+ snprintf(objname, sizeof(objname), "%s %u", GROUPNAME, u);
if ((group = H5Gcreate2(file, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
if (H5Gclose(group) < 0)
@@ -1043,7 +1044,7 @@ test_filespace(hid_t fapl)
/* Remove the all the groups */
/* (Remove them in reverse order just to make file size calculation easier -QAK) */
for (u = UNLINK_NGROUPS; u > 0; u--) {
- HDsnprintf(objname, sizeof(objname), "%s %u", GROUPNAME, (u - 1));
+ snprintf(objname, sizeof(objname), "%s %u", GROUPNAME, (u - 1));
if (H5Ldelete(file, objname, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -1111,21 +1112,21 @@ test_filespace(hid_t fapl)
/* Create a complex group hierarchy to remove */
for (u = 0; u < FILESPACE_TOP_GROUPS; u++) {
/* Create group */
- HDsnprintf(objname, sizeof(objname), "%s %u", GROUPNAME, u);
+ snprintf(objname, sizeof(objname), "%s %u", GROUPNAME, u);
if ((group = H5Gcreate2(file, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
/* Create nested groups inside top groups */
for (v = 0; v < FILESPACE_NESTED_GROUPS; v++) {
/* Create group */
- HDsnprintf(objname, sizeof(objname), "%s %u", GROUP2NAME, v);
+ snprintf(objname, sizeof(objname), "%s %u", GROUP2NAME, v);
if ((group2 = H5Gcreate2(group, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
/* Create datasets inside nested groups */
for (w = 0; w < FILESPACE_NDATASETS; w++) {
/* Create & close a dataset */
- HDsnprintf(objname, sizeof(objname), "%s %u", DATASETNAME, w);
+ snprintf(objname, sizeof(objname), "%s %u", DATASETNAME, w);
if ((dataset = H5Dcreate2(group2, objname, H5T_NATIVE_INT, space, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
@@ -1147,21 +1148,21 @@ test_filespace(hid_t fapl)
/* (Remove them in reverse order just to make file size calculation easier -QAK) */
for (u = FILESPACE_TOP_GROUPS; u > 0; u--) {
/* Open group */
- HDsnprintf(objname, sizeof(objname), "%s %u", GROUPNAME, (u - 1));
+ snprintf(objname, sizeof(objname), "%s %u", GROUPNAME, (u - 1));
if ((group = H5Gopen2(file, objname, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
/* Open nested groups inside top groups */
for (v = 0; v < FILESPACE_NESTED_GROUPS; v++) {
/* Create group */
- HDsnprintf(objname, sizeof(objname), "%s %u", GROUP2NAME, v);
+ snprintf(objname, sizeof(objname), "%s %u", GROUP2NAME, v);
if ((group2 = H5Gopen2(group, objname, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
/* Remove datasets inside nested groups */
for (w = 0; w < FILESPACE_NDATASETS; w++) {
/* Remove dataset */
- HDsnprintf(objname, sizeof(objname), "%s %u", DATASETNAME, w);
+ snprintf(objname, sizeof(objname), "%s %u", DATASETNAME, w);
if (H5Ldelete(group2, objname, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -1171,7 +1172,7 @@ test_filespace(hid_t fapl)
FAIL_STACK_ERROR;
/* Remove nested group */
- HDsnprintf(objname, sizeof(objname), "%s %u", GROUP2NAME, v);
+ snprintf(objname, sizeof(objname), "%s %u", GROUP2NAME, v);
if (H5Ldelete(group, objname, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -1181,7 +1182,7 @@ test_filespace(hid_t fapl)
FAIL_STACK_ERROR;
/* Remove top group */
- HDsnprintf(objname, sizeof(objname), "%s %u", GROUPNAME, (u - 1));
+ snprintf(objname, sizeof(objname), "%s %u", GROUPNAME, (u - 1));
if (H5Ldelete(file, objname, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -1460,7 +1461,7 @@ test_create_unlink(const char *msg, hid_t fapl)
/* Create a many groups to remove */
for (u = 0; u < UNLINK_NGROUPS; u++) {
- HDsnprintf(groupname, sizeof(groupname), "%s %u", GROUPNAME, u);
+ snprintf(groupname, sizeof(groupname), "%s %u", GROUPNAME, u);
if ((group = H5Gcreate2(file, groupname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
printf("group %s creation failed\n", groupname);
@@ -1475,7 +1476,7 @@ test_create_unlink(const char *msg, hid_t fapl)
/* Remove the all the groups */
for (u = 0; u < UNLINK_NGROUPS; u++) {
- HDsnprintf(groupname, sizeof(groupname), "%s %u", GROUPNAME, u);
+ snprintf(groupname, sizeof(groupname), "%s %u", GROUPNAME, u);
if (H5Ldelete(file, groupname, H5P_DEFAULT) < 0) {
H5_FAILED();
printf("Unlinking group %s failed\n", groupname);
@@ -1664,7 +1665,7 @@ delete_node(hid_t pid, hid_t id)
return (-1);
/* If this object is the right-most child, try opening the previous object */
- if (HDstrcmp(name, "/Zone81") == 0) {
+ if (strcmp(name, "/Zone81") == 0) {
hid_t gid;
if ((gid = H5Gopen2(pid, "/Zone80", H5P_DEFAULT)) < 0)
@@ -1691,11 +1692,11 @@ delete_node(hid_t pid, hid_t id)
static int
test_unlink_rightleaf(hid_t fid)
{
- hid_t rootid = -1, /* Group ID for root group */
- *gids = NULL; /* Array of IDs for groups created */
- int n, /* Local index variable */
- ngroups = 150; /* Number of groups to create */
- char name[256]; /* Name of object to create */
+ hid_t rootid = H5I_INVALID_HID, /* Group ID for root group */
+ *gids = NULL; /* Array of IDs for groups created */
+ int n, /* Local index variable */
+ ngroups = 150; /* Number of groups to create */
+ char name[256]; /* Name of object to create */
TESTING("deleting right-most child in non-leaf B-tree node");
@@ -1708,7 +1709,7 @@ test_unlink_rightleaf(hid_t fid)
/* Create all the groups */
for (n = 0; n < ngroups; n++) {
- HDsnprintf(name, sizeof(name), "Zone%d", n + 1);
+ snprintf(name, sizeof(name), "Zone%d", n + 1);
if ((gids[n] = H5Gcreate2(rootid, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
} /* end for */
@@ -1717,7 +1718,7 @@ test_unlink_rightleaf(hid_t fid)
for (n = 0; n < ngroups; n++) {
if (delete_node(rootid, gids[n]) < 0)
TEST_ERROR;
- HDsnprintf(name, sizeof(name), "Zone%d", n + 1);
+ snprintf(name, sizeof(name), "Zone%d", n + 1);
if ((gids[n] = H5Gcreate2(rootid, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
} /* end for */
@@ -1775,11 +1776,11 @@ test_unlink_rightleaf(hid_t fid)
static int
test_unlink_rightnode(hid_t fid)
{
- hid_t rootid = -1, /* Group ID for root group */
- *gids = NULL; /* Array of IDs for groups created */
- int n, /* Local index variable */
- ngroups = 150; /* Number of groups to create */
- char name[256]; /* Name of object to create */
+ hid_t rootid = H5I_INVALID_HID, /* Group ID for root group */
+ *gids = NULL; /* Array of IDs for groups created */
+ int n, /* Local index variable */
+ ngroups = 150; /* Number of groups to create */
+ char name[256]; /* Name of object to create */
TESTING("deleting right-most child in non-leaf B-tree node");
@@ -1792,7 +1793,7 @@ test_unlink_rightnode(hid_t fid)
/* Create all the groups */
for (n = 0; n < ngroups; n++) {
- HDsnprintf(name, sizeof(name), "ZoneB%d", n + 1);
+ snprintf(name, sizeof(name), "ZoneB%d", n + 1);
if ((gids[n] = H5Gcreate2(rootid, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -1862,11 +1863,11 @@ test_unlink_rightnode(hid_t fid)
static int
test_unlink_middlenode(hid_t fid)
{
- hid_t rootid = -1, /* Group ID for root group */
- *gids = NULL; /* Array of IDs for groups created */
- int n, /* Local index variable */
- ngroups = 250; /* Number of groups to create */
- char name[256]; /* Name of object to create */
+ hid_t rootid = H5I_INVALID_HID, /* Group ID for root group */
+ *gids = NULL; /* Array of IDs for groups created */
+ int n, /* Local index variable */
+ ngroups = 250; /* Number of groups to create */
+ char name[256]; /* Name of object to create */
TESTING("deleting right-most child in non-leaf B-tree node");
@@ -1879,7 +1880,7 @@ test_unlink_middlenode(hid_t fid)
/* Create all the groups */
for (n = 0; n < ngroups; n++) {
- HDsnprintf(name, sizeof(name), "ZoneC%d", n + 1);
+ snprintf(name, sizeof(name), "ZoneC%d", n + 1);
if ((gids[n] = H5Gcreate2(rootid, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -2235,7 +2236,7 @@ test_unlink_middlenode(hid_t fid)
static int
test_resurrect_dataset(hid_t fapl)
{
- hid_t f = -1, s = -1, d = -1;
+ hid_t f = H5I_INVALID_HID, s = H5I_INVALID_HID, d = H5I_INVALID_HID;
char filename[1024];
TESTING("resurrecting dataset after deletion");
@@ -2315,7 +2316,7 @@ test_resurrect_dataset(hid_t fapl)
static int
test_resurrect_datatype(hid_t fapl)
{
- hid_t file = -1, type = -1;
+ hid_t file = H5I_INVALID_HID, type = H5I_INVALID_HID;
char filename[1024];
TESTING("resurrecting datatype after deletion");
@@ -2392,7 +2393,7 @@ test_resurrect_datatype(hid_t fapl)
static int
test_resurrect_group(hid_t fapl)
{
- hid_t file = -1, group = -1;
+ hid_t file = H5I_INVALID_HID, group = H5I_INVALID_HID;
char filename[1024];
TESTING("resurrecting group after deletion");
@@ -2466,10 +2467,10 @@ test_resurrect_group(hid_t fapl)
static int
test_unlink_chunked_dataset(hid_t fapl)
{
- hid_t file_id = -1;
- hid_t dset_id = -1;
- hid_t space_id = -1;
- hid_t dcpl_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t space_id = H5I_INVALID_HID;
+ hid_t dcpl_id = H5I_INVALID_HID;
hsize_t dims[FILESPACE_NDIMS] = {FILESPACE_DIM0, FILESPACE_DIM1, FILESPACE_DIM2};
hsize_t max_dims[FILESPACE_NDIMS] = {H5S_UNLIMITED, H5S_UNLIMITED, H5S_UNLIMITED};
hsize_t chunk_dims[FILESPACE_NDIMS] = {FILESPACE_CHUNK0, FILESPACE_CHUNK1, FILESPACE_CHUNK2};
@@ -2561,15 +2562,15 @@ test_unlink_chunked_dataset(hid_t fapl)
static int
test_full_group_compact(hid_t fapl)
{
- hid_t file_id = -1;
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- H5O_info2_t oi; /* Stat buffer for object */
- char objname[128]; /* Buffer for name of objects to create */
- char objname2[128]; /* Buffer for name of objects to create */
- char filename[1024]; /* Buffer for filename */
- h5_stat_size_t keep_size; /* Size of the file with objects to keep */
- h5_stat_size_t file_size; /* Size of each file created */
- unsigned u; /* Local index variable */
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ H5O_info2_t oi; /* Stat buffer for object */
+ char objname[128]; /* Buffer for name of objects to create */
+ char objname2[128]; /* Buffer for name of objects to create */
+ char filename[1024]; /* Buffer for filename */
+ h5_stat_size_t keep_size; /* Size of the file with objects to keep */
+ h5_stat_size_t file_size; /* Size of each file created */
+ unsigned u; /* Local index variable */
TESTING("unlinking non-empty compact group");
@@ -2586,7 +2587,7 @@ test_full_group_compact(hid_t fapl)
/* Create several objects to link to */
for (u = 0; u < FULL_GROUP_NUM_KEEP; u++) {
- HDsnprintf(objname, sizeof(objname), "keep %u\n", u);
+ snprintf(objname, sizeof(objname), "keep %u\n", u);
if ((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
if (H5Gclose(gid2) < 0)
@@ -2623,15 +2624,15 @@ test_full_group_compact(hid_t fapl)
/* Create hard links to objects in group to keep */
for (u = 0; u < FULL_GROUP_NUM_KEEP; u++) {
- HDsnprintf(objname, sizeof(objname), "/keep/keep %u\n", u);
- HDsnprintf(objname2, sizeof(objname2), "keep %u\n", u);
+ snprintf(objname, sizeof(objname), "/keep/keep %u\n", u);
+ snprintf(objname2, sizeof(objname2), "keep %u\n", u);
if (H5Lcreate_hard(file_id, objname, gid, objname2, H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
/* Create several objects to delete */
for (u = 0; u < FULL_GROUP_NUM_DELETE_COMPACT; u++) {
- HDsnprintf(objname, sizeof(objname), "delete %u\n", u);
+ snprintf(objname, sizeof(objname), "delete %u\n", u);
if ((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
if (H5Gclose(gid2) < 0)
@@ -2639,11 +2640,11 @@ test_full_group_compact(hid_t fapl)
} /* end for */
/* Check on group's status */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, NULL) != TRUE)
+ if (H5G__has_links_test(gid, NULL) != true)
TEST_ERROR;
- if (H5G__has_stab_test(gid) == TRUE)
+ if (H5G__has_stab_test(gid) == true)
TEST_ERROR;
/* Close group with objects to delete */
@@ -2652,7 +2653,7 @@ test_full_group_compact(hid_t fapl)
/* Check reference count on objects to keep */
for (u = 0; u < FULL_GROUP_NUM_KEEP; u++) {
- HDsnprintf(objname, sizeof(objname), "/keep/keep %u\n", u);
+ snprintf(objname, sizeof(objname), "/keep/keep %u\n", u);
if (H5Oget_info_by_name3(file_id, objname, &oi, H5O_INFO_BASIC, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
if (oi.rc != 2)
@@ -2673,7 +2674,7 @@ test_full_group_compact(hid_t fapl)
/* Check reference count on objects to keep */
for (u = 0; u < FULL_GROUP_NUM_KEEP; u++) {
- HDsnprintf(objname, sizeof(objname), "/keep/keep %u\n", u);
+ snprintf(objname, sizeof(objname), "/keep/keep %u\n", u);
if (H5Oget_info_by_name3(file_id, objname, &oi, H5O_INFO_BASIC, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
if (oi.rc != 1)
@@ -2719,16 +2720,16 @@ test_full_group_compact(hid_t fapl)
static int
test_full_group_dense(hid_t fapl)
{
- hid_t file_id = -1;
- hid_t gcpl = (-1); /* Group creation property list ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- H5O_info2_t oi; /* Stat buffer for object */
- char objname[128]; /* Buffer for name of objects to create */
- char objname2[128]; /* Buffer for name of objects to create */
- char filename[1024]; /* Buffer for filename */
- h5_stat_size_t keep_size; /* Size of the file with objects to keep */
- h5_stat_size_t file_size; /* Size of each file created */
- unsigned u; /* Local index variable */
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t gcpl = (H5I_INVALID_HID); /* Group creation property list ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ H5O_info2_t oi; /* Stat buffer for object */
+ char objname[128]; /* Buffer for name of objects to create */
+ char objname2[128]; /* Buffer for name of objects to create */
+ char filename[1024]; /* Buffer for filename */
+ h5_stat_size_t keep_size; /* Size of the file with objects to keep */
+ h5_stat_size_t file_size; /* Size of each file created */
+ unsigned u; /* Local index variable */
TESTING("unlinking non-empty dense group");
@@ -2745,7 +2746,7 @@ test_full_group_dense(hid_t fapl)
/* Create several objects to link to */
for (u = 0; u < FULL_GROUP_NUM_KEEP; u++) {
- HDsnprintf(objname, sizeof(objname), "keep %u\n", u);
+ snprintf(objname, sizeof(objname), "keep %u\n", u);
if ((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
if (H5Gclose(gid2) < 0)
@@ -2797,15 +2798,15 @@ test_full_group_dense(hid_t fapl)
/* Create hard links to objects in group to keep */
for (u = 0; u < FULL_GROUP_NUM_KEEP; u++) {
- HDsnprintf(objname, sizeof(objname), "/keep/keep %u\n", u);
- HDsnprintf(objname2, sizeof(objname2), "keep %u\n", u);
+ snprintf(objname, sizeof(objname), "/keep/keep %u\n", u);
+ snprintf(objname2, sizeof(objname2), "keep %u\n", u);
if (H5Lcreate_hard(file_id, objname, gid, objname2, H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
/* Create several objects to delete */
for (u = 0; u < FULL_GROUP_NUM_DELETE_DENSE; u++) {
- HDsnprintf(objname, sizeof(objname), "delete %u\n", u);
+ snprintf(objname, sizeof(objname), "delete %u\n", u);
if ((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
if (H5Gclose(gid2) < 0)
@@ -2813,11 +2814,11 @@ test_full_group_dense(hid_t fapl)
} /* end for */
/* Check on group's status */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, NULL) == TRUE)
+ if (H5G__has_links_test(gid, NULL) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(gid) != TRUE)
+ if (H5G__is_new_dense_test(gid) != true)
TEST_ERROR;
/* Close group with objects to delete */
@@ -2826,7 +2827,7 @@ test_full_group_dense(hid_t fapl)
/* Check reference count on objects to keep */
for (u = 0; u < FULL_GROUP_NUM_KEEP; u++) {
- HDsnprintf(objname, sizeof(objname), "/keep/keep %u\n", u);
+ snprintf(objname, sizeof(objname), "/keep/keep %u\n", u);
if (H5Oget_info_by_name3(file_id, objname, &oi, H5O_INFO_BASIC, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
if (oi.rc != 2)
@@ -2847,7 +2848,7 @@ test_full_group_dense(hid_t fapl)
/* Check reference count on objects to keep */
for (u = 0; u < FULL_GROUP_NUM_KEEP; u++) {
- HDsnprintf(objname, sizeof(objname), "/keep/keep %u\n", u);
+ snprintf(objname, sizeof(objname), "/keep/keep %u\n", u);
if (H5Oget_info_by_name3(file_id, objname, &oi, H5O_INFO_BASIC, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
if (oi.rc != 1)
@@ -2920,16 +2921,16 @@ main(void)
TEST_ERROR;
/* Test with old & new format groups */
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
hid_t my_fapl;
/* Set the FAPL for the type of format */
if (new_format) {
- HDputs("\nTesting with new group format:");
+ puts("\nTesting with new group format:");
my_fapl = fapl2;
} /* end if */
else {
- HDputs("Testing with old group format:");
+ puts("Testing with old group format:");
my_fapl = fapl;
} /* end else */
@@ -3016,7 +3017,7 @@ main(void)
exit(EXIT_FAILURE);
}
- HDputs("All unlink tests passed.");
+ puts("All unlink tests passed.");
h5_cleanup(FILENAME, fapl);
diff --git a/test/unregister.c b/test/unregister.c
index d225881f435..e1576c09e2a 100644
--- a/test/unregister.c
+++ b/test/unregister.c
@@ -114,7 +114,7 @@ test_unregister_filters(hid_t fapl_id)
/* Register DUMMY filter */
if (H5Zregister(H5Z_DUMMY) < 0)
goto error;
- if (H5Zfilter_avail(H5Z_FILTER_DUMMY) != TRUE)
+ if (H5Zfilter_avail(H5Z_FILTER_DUMMY) != true)
goto error;
/*******************
@@ -133,7 +133,7 @@ test_unregister_filters(hid_t fapl_id)
/* Create multiple groups under the main group */
for (i = 0; i < GROUP_ITERATION; i++) {
- HDsnprintf(group_name, sizeof(group_name), "group_%d", i);
+ snprintf(group_name, sizeof(group_name), "group_%d", i);
if ((gid_loop = H5Gcreate2(gid, group_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
if (H5Gclose(gid_loop) < 0)
@@ -275,9 +275,9 @@ test_unregister_filters(hid_t fapl_id)
int
main(void)
{
- hid_t fapl_id = H5I_INVALID_HID;
- int nerrors = 0;
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ hid_t fapl_id = H5I_INVALID_HID;
+ int nerrors = 0;
+ bool api_ctx_pushed = false; /* Whether API context pushed */
/* Testing setup */
h5_reset();
@@ -286,7 +286,7 @@ main(void)
/* Push API context */
if (H5CX_push() < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Test unregistering filter in its own file */
nerrors += (test_unregister_filters(fapl_id) < 0 ? 1 : 0);
@@ -298,9 +298,9 @@ main(void)
printf("All filter unregistration tests passed.\n");
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
exit(EXIT_SUCCESS);
@@ -309,7 +309,7 @@ main(void)
printf("***** %d FILTER UNREGISTRATION TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
if (api_ctx_pushed)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
exit(EXIT_FAILURE);
} /* end main() */
diff --git a/test/use.h b/test/use.h
index 4317ab1ca4f..217c155a71b 100644
--- a/test/use.h
+++ b/test/use.h
@@ -51,7 +51,7 @@ typedef struct options_t {
hsize_t nplanes; /* number of planes to write, default proportional to chunksize */
char *filename; /* use case data filename */
part_t launch; /* launch writer, reader or both */
- hbool_t use_swmr; /* use swmr open (1) or not */
+ bool use_swmr; /* use swmr open (1) or not */
int iterations; /* iterations, default 1 */
hid_t fapl_id; /* instance-specific FAPL ID */
const char *progname; /* Program name (used in usage and dset name) */
@@ -63,5 +63,5 @@ int setup_parameters(int argc, char *const argv[], options_t *opts);
void show_parameters(options_t *opts);
void usage(const char *prog);
int create_uc_file(options_t *opts);
-int write_uc_file(hbool_t tosend, hid_t file_id, options_t *opts);
-int read_uc_file(hbool_t towait, options_t *opts);
+int write_uc_file(bool tosend, hid_t file_id, options_t *opts);
+int read_uc_file(bool towait, options_t *opts);
diff --git a/test/use_append_chunk.c b/test/use_append_chunk.c
index 4f64a66daef..3b3d69c7d25 100644
--- a/test/use_append_chunk.c
+++ b/test/use_append_chunk.c
@@ -78,7 +78,7 @@ setup_parameters(int argc, char *const argv[], options_t *opts)
/* use case defaults */
memset(opts, 0, sizeof(options_t));
opts->chunksize = Chunksize_DFT;
- opts->use_swmr = TRUE; /* use swmr open */
+ opts->use_swmr = true; /* use swmr open */
opts->iterations = 1;
opts->chunkplanes = 1;
opts->progname = USE_APPEND_CHUNK_PROGNAME;
@@ -110,15 +110,15 @@ setup_parameters(int argc, char *const argv[], options_t *opts)
int
main(int argc, char *argv[])
{
- pid_t childpid = 0;
- pid_t mypid, tmppid;
- int child_status;
- int child_wait_option = 0;
- int ret_value = 0;
- int child_ret_value;
- hbool_t send_wait = FALSE;
- hid_t fapl = -1; /* File access property list */
- hid_t fid = -1; /* File ID */
+ pid_t childpid = 0;
+ pid_t mypid, tmppid;
+ int child_status;
+ int child_wait_option = 0;
+ int ret_value = 0;
+ int child_ret_value;
+ bool send_wait = false;
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
if (setup_parameters(argc, argv, &UC_opts) < 0) {
Hgoto_error(1);
@@ -127,7 +127,7 @@ main(int argc, char *argv[])
/* Determine the need to send/wait message file*/
if (UC_opts.launch == UC_READWRITE) {
HDunlink(WRITER_MESSAGE);
- send_wait = TRUE;
+ send_wait = true;
}
/* ==============================================================*/
@@ -168,7 +168,7 @@ main(int argc, char *argv[])
/* ============ */
if (UC_opts.launch == UC_READWRITE) {
if ((childpid = fork()) < 0) {
- HDperror("fork");
+ perror("fork");
Hgoto_error(1);
}
}
@@ -241,7 +241,7 @@ main(int argc, char *argv[])
/* ================================================ */
if (UC_opts.launch == UC_READWRITE) {
if ((tmppid = waitpid(childpid, &child_status, child_wait_option)) < 0) {
- HDperror("waitpid");
+ perror("waitpid");
Hgoto_error(1);
}
diff --git a/test/use_append_chunk_mirror.c b/test/use_append_chunk_mirror.c
index 0620c68590e..e9e27267507 100644
--- a/test/use_append_chunk_mirror.c
+++ b/test/use_append_chunk_mirror.c
@@ -118,7 +118,7 @@ setup_parameters(int argc, char *const argv[], options_t *opts)
/* use case defaults */
memset(opts, 0, sizeof(options_t));
opts->chunksize = Chunksize_DFT;
- opts->use_swmr = TRUE;
+ opts->use_swmr = true;
opts->iterations = 1;
opts->chunkplanes = 1;
opts->progname = THIS_PROGNAME;
@@ -156,7 +156,7 @@ main(int argc, char *argv[])
int child_wait_option = 0;
int ret_value = 0;
int child_ret_value;
- hbool_t send_wait = FALSE;
+ bool send_wait = false;
hid_t fid = H5I_INVALID_HID;
H5FD_mirror_fapl_t mirr_fa;
H5FD_splitter_vfd_config_t *split_fa = NULL;
@@ -169,7 +169,7 @@ main(int argc, char *argv[])
mirr_fa.magic = H5FD_MIRROR_FAPL_MAGIC;
mirr_fa.version = H5FD_MIRROR_CURR_FAPL_T_VERSION;
mirr_fa.handshake_port = SERVER_PORT;
- HDstrncpy(mirr_fa.remote_ip, SERVER_IP, H5FD_MIRROR_MAX_IP_LEN);
+ strncpy(mirr_fa.remote_ip, SERVER_IP, H5FD_MIRROR_MAX_IP_LEN);
if (NULL == (split_fa = calloc(1, sizeof(H5FD_splitter_vfd_config_t)))) {
fprintf(stderr, "can't allocate memory for splitter config\n");
@@ -181,13 +181,13 @@ main(int argc, char *argv[])
split_fa->magic = H5FD_SPLITTER_MAGIC;
split_fa->version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
split_fa->log_file_path[0] = '\0'; /* none */
- split_fa->ignore_wo_errs = FALSE;
- HDstrncpy(split_fa->wo_path, MIRROR_FILE_NAME, H5FD_SPLITTER_PATH_MAX);
+ split_fa->ignore_wo_errs = false;
+ strncpy(split_fa->wo_path, MIRROR_FILE_NAME, H5FD_SPLITTER_PATH_MAX);
/* Determine the need to send/wait message file*/
if (UC_opts.launch == UC_READWRITE) {
HDunlink(WRITER_MESSAGE);
- send_wait = TRUE;
+ send_wait = true;
}
/* ==============================================================*/
@@ -259,7 +259,7 @@ main(int argc, char *argv[])
/* ============ */
if (UC_opts.launch == UC_READWRITE) {
if ((childpid = fork()) < 0) {
- HDperror("fork");
+ perror("fork");
Hgoto_error(1);
}
}
@@ -354,7 +354,7 @@ main(int argc, char *argv[])
/* ================================================ */
if (UC_opts.launch == UC_READWRITE) {
if ((tmppid = waitpid(childpid, &child_status, child_wait_option)) < 0) {
- HDperror("waitpid");
+ perror("waitpid");
Hgoto_error(1);
}
diff --git a/test/use_append_mchunks.c b/test/use_append_mchunks.c
index 15f2f2a7086..ab6a5e5073f 100644
--- a/test/use_append_mchunks.c
+++ b/test/use_append_mchunks.c
@@ -104,15 +104,15 @@ setup_parameters(int argc, char *const argv[], options_t *opts)
int
main(int argc, char *argv[])
{
- pid_t childpid = 0;
- pid_t mypid, tmppid;
- int child_status;
- int child_wait_option = 0;
- int ret_value = 0;
- int child_ret_value;
- hbool_t send_wait = 0;
- hid_t fapl = -1; /* File access property list */
- hid_t fid = -1; /* File ID */
+ pid_t childpid = 0;
+ pid_t mypid, tmppid;
+ int child_status;
+ int child_wait_option = 0;
+ int ret_value = 0;
+ int child_ret_value;
+ bool send_wait = 0;
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
if (setup_parameters(argc, argv, &UC_opts) < 0) {
Hgoto_error(1);
@@ -162,7 +162,7 @@ main(int argc, char *argv[])
/* ============ */
if (UC_opts.launch == UC_READWRITE) {
if ((childpid = fork()) < 0) {
- HDperror("fork");
+ perror("fork");
Hgoto_error(1);
}
}
@@ -236,7 +236,7 @@ main(int argc, char *argv[])
/* ================================================ */
if (UC_opts.launch == UC_READWRITE) {
if ((tmppid = waitpid(childpid, &child_status, child_wait_option)) < 0) {
- HDperror("waitpid");
+ perror("waitpid");
Hgoto_error(1);
}
diff --git a/test/use_common.c b/test/use_common.c
index e77ec773e92..a782eec9d75 100644
--- a/test/use_common.c
+++ b/test/use_common.c
@@ -69,7 +69,7 @@ parse_option(int argc, char *const argv[], options_t *opts)
exit(EXIT_SUCCESS);
break;
case 'f': /* usecase data file name */
- opts->filename = HDstrdup(optarg);
+ opts->filename = strdup(optarg);
break;
case 'i': /* iterations */
if ((opts->iterations = atoi(optarg)) <= 0) {
@@ -107,7 +107,7 @@ parse_option(int argc, char *const argv[], options_t *opts)
usage(opts->progname);
Hgoto_error(-1);
}
- opts->use_swmr = (hbool_t)use_swmr;
+ opts->use_swmr = (bool)use_swmr;
break;
case 'y': /* Number of planes per chunk */
if ((opts->chunkplanes = strtoul(optarg, NULL, 0)) <= 0) {
@@ -137,12 +137,12 @@ parse_option(int argc, char *const argv[], options_t *opts)
/* set test file name if not given */
if (!opts->filename) {
/* default data file name is .h5 */
- if ((opts->filename = (char *)malloc(HDstrlen(opts->progname) + 4)) == NULL) {
+ if ((opts->filename = (char *)malloc(strlen(opts->progname) + 4)) == NULL) {
fprintf(stderr, "malloc: failed\n");
Hgoto_error(-1);
}
- HDstrcpy(opts->filename, opts->progname);
- HDstrcat(opts->filename, ".h5");
+ strcpy(opts->filename, opts->progname);
+ strcat(opts->filename, ".h5");
}
done:
@@ -258,7 +258,7 @@ create_uc_file(options_t *opts)
* ----------------------------------------------------------------------------
*/
int
-write_uc_file(hbool_t tosend, hid_t file_id, options_t *opts)
+write_uc_file(bool tosend, hid_t file_id, options_t *opts)
{
hid_t dsid; /* dataset ID */
hid_t dcpl; /* Dataset creation property list */
@@ -273,7 +273,7 @@ write_uc_file(hbool_t tosend, hid_t file_id, options_t *opts)
hsize_t start[3] = {0, 0, 0}, count[3]; /* Hyperslab selection values */
hsize_t i, j, k;
- if (TRUE == tosend) {
+ if (true == tosend) {
/* Send a message that H5Fopen is complete--releasing the file lock */
h5_send_message(WRITER_MESSAGE, NULL, NULL);
}
@@ -447,7 +447,7 @@ write_uc_file(hbool_t tosend, hid_t file_id, options_t *opts)
* ----------------------------------------------------------------------------
*/
int
-read_uc_file(hbool_t towait, options_t *opts)
+read_uc_file(bool towait, options_t *opts)
{
hid_t fid; /* File ID for new HDF5 file */
hid_t dsid; /* dataset ID */
diff --git a/test/use_disable_mdc_flushes.c b/test/use_disable_mdc_flushes.c
index 49dfa96fdcd..b8b5b7fdfa6 100644
--- a/test/use_disable_mdc_flushes.c
+++ b/test/use_disable_mdc_flushes.c
@@ -149,12 +149,12 @@ parse_option(int argc, char *const argv[])
/* set test file name if not given */
if (!filename_g) {
/* default data file name is .h5 */
- if ((filename_g = (char *)malloc(HDstrlen(progname_g) + 4)) == NULL) {
+ if ((filename_g = (char *)malloc(strlen(progname_g) + 4)) == NULL) {
fprintf(stderr, "malloc: failed\n");
Hgoto_error(-1);
}
- HDstrcpy(filename_g, progname_g);
- HDstrcat(filename_g, ".h5");
+ strcpy(filename_g, progname_g);
+ strcat(filename_g, ".h5");
}
done:
@@ -308,7 +308,7 @@ write_file(void)
hsize_t dims[3]; /* Dataspace dimensions */
hsize_t memdims[3]; /* Memory space dimensions */
hsize_t start[3] = {0, 0, 0}, count[3]; /* Hyperslab selection values */
- hbool_t disabled; /* Object's disabled status */
+ bool disabled; /* Object's disabled status */
hsize_t i, j, k;
name = filename_g;
diff --git a/test/vds.c b/test/vds.c
index 48cd5226d74..c2546e57f00 100644
--- a/test/vds.c
+++ b/test/vds.c
@@ -53,7 +53,7 @@ static const char *FILENAME[] = {"vds_virt_0", "vds_virt_1", "vds_src_0", "vds_
#define PRINT_CONFIG(...) \
do { \
printf("Config: " __VA_ARGS__); \
- HDputs(""); \
+ puts(""); \
} while (0)
#else /* VDS_TEST_VERBOSE */
@@ -65,7 +65,7 @@ char vds_test_str_g[128] = "";
/* Replacement for TESTING_2 for non-verbose-output */
#define TESTING_2_SUPPRESSED(WHAT) \
do { \
- HDsnprintf(vds_test_str_g, sizeof(vds_test_str_g), WHAT); \
+ snprintf(vds_test_str_g, sizeof(vds_test_str_g), WHAT); \
} while (0)
/* Suppress output from PASSED() */
@@ -84,7 +84,7 @@ char vds_test_str_g[128] = "";
/* Replacement for printf for printing configuration for non-verbose output */
#define PRINT_CONFIG(...) \
do { \
- HDsnprintf(vds_config_str_g, sizeof(vds_config_str_g), __VA_ARGS__); \
+ snprintf(vds_config_str_g, sizeof(vds_config_str_g), __VA_ARGS__); \
} while (0)
#endif /* VDS_TEST_VERBOSE */
@@ -121,7 +121,7 @@ vds_select_equal(hid_t space1, hid_t space2)
hsize_t *buf1 = NULL;
hsize_t *buf2 = NULL;
size_t i;
- htri_t ret_value = TRUE;
+ htri_t ret_value = true;
/* Get and compare selection types */
if ((type1 = H5Sget_select_type(space1)) < 0)
@@ -129,7 +129,7 @@ vds_select_equal(hid_t space1, hid_t space2)
if ((type2 = H5Sget_select_type(space2)) < 0)
TEST_ERROR;
if (type1 != type2)
- return FALSE;
+ return false;
/* Check selection type */
switch (type1) {
@@ -149,7 +149,7 @@ vds_select_equal(hid_t space1, hid_t space2)
if ((rank2 = H5Sget_simple_extent_ndims(space2)) < 0)
TEST_ERROR;
if (rank1 != rank2)
- return FALSE;
+ return false;
/* Get and compare number of points */
if ((npoints1 = H5Sget_select_elem_npoints(space1)) < 0)
@@ -157,7 +157,7 @@ vds_select_equal(hid_t space1, hid_t space2)
if ((npoints2 = H5Sget_select_elem_npoints(space2)) < 0)
TEST_ERROR;
if (npoints1 != npoints2)
- return FALSE;
+ return false;
/* Allocate point lists. Do not return directly after
* allocating, to make sure buffers are freed. */
@@ -173,7 +173,7 @@ vds_select_equal(hid_t space1, hid_t space2)
TEST_ERROR;
for (i = 0; i < ((size_t)rank1 * (size_t)npoints1); i++)
if (buf1[i] != buf2[i]) {
- ret_value = FALSE;
+ ret_value = false;
break;
}
@@ -198,7 +198,7 @@ vds_select_equal(hid_t space1, hid_t space2)
if ((rank2 = H5Sget_simple_extent_ndims(space2)) < 0)
TEST_ERROR;
if (rank1 != rank2)
- return FALSE;
+ return false;
/* Get and compare number of blocks */
if ((nblocks1 = H5Sget_select_hyper_nblocks(space1)) < 0)
@@ -206,7 +206,7 @@ vds_select_equal(hid_t space1, hid_t space2)
if ((nblocks2 = H5Sget_select_hyper_nblocks(space2)) < 0)
TEST_ERROR;
if (nblocks1 != nblocks2)
- return FALSE;
+ return false;
/* Allocate block lists. Do not return directly after
* allocating, to make sure buffers are freed. */
@@ -224,7 +224,7 @@ vds_select_equal(hid_t space1, hid_t space2)
TEST_ERROR;
for (i = 0; i < ((size_t)2 * (size_t)rank1 * (size_t)nblocks1); i++)
if (buf1[i] != buf2[i]) {
- ret_value = FALSE;
+ ret_value = false;
break;
}
@@ -269,7 +269,7 @@ static int
vds_check_mapping(hid_t dcpl, size_t i, hid_t vspace, hid_t srcspace, const char *filename,
const char *dsetname)
{
- hid_t space_out = -1;
+ hid_t space_out = H5I_INVALID_HID;
char name_out[32];
htri_t tri_ret;
ssize_t str_len;
@@ -309,27 +309,27 @@ vds_check_mapping(hid_t dcpl, size_t i, hid_t vspace, hid_t srcspace, const char
/* Check filename */
if ((str_len = H5Pget_virtual_filename(dcpl, i, NULL, (size_t)0)) < 0)
TEST_ERROR;
- if ((size_t)str_len != HDstrlen(filename))
+ if ((size_t)str_len != strlen(filename))
TEST_ERROR;
assert((size_t)str_len < sizeof(name_out));
if ((str_len = H5Pget_virtual_filename(dcpl, i, name_out, sizeof(name_out))) < 0)
TEST_ERROR;
- if ((size_t)str_len != HDstrlen(filename))
+ if ((size_t)str_len != strlen(filename))
TEST_ERROR;
- if (HDstrncmp(name_out, filename, (size_t)str_len + 1) != 0)
+ if (strncmp(name_out, filename, (size_t)str_len + 1) != 0)
TEST_ERROR;
/* Check dsetname */
if ((str_len = H5Pget_virtual_dsetname(dcpl, i, NULL, (size_t)0)) < 0)
TEST_ERROR;
- if ((size_t)str_len != HDstrlen(dsetname))
+ if ((size_t)str_len != strlen(dsetname))
TEST_ERROR;
assert((size_t)str_len < sizeof(name_out));
if ((str_len = H5Pget_virtual_dsetname(dcpl, i, name_out, sizeof(name_out))) < 0)
TEST_ERROR;
- if ((size_t)str_len != HDstrlen(dsetname))
+ if ((size_t)str_len != strlen(dsetname))
TEST_ERROR;
- if (HDstrncmp(name_out, dsetname, (size_t)str_len + 1) != 0)
+ if (strncmp(name_out, dsetname, (size_t)str_len + 1) != 0)
TEST_ERROR;
return 0;
@@ -358,11 +358,11 @@ static int
test_api_get_ex_dcpl(test_api_config_t config, hid_t fapl, hid_t dcpl, hid_t *ex_dcpl, hid_t vspace,
char *filename, hsize_t exp_meta_size)
{
- hid_t file = -1; /* File */
- hid_t dset = -1; /* Virtual dataset */
- H5D_space_status_t space_status; /* Dataset space status */
- void *plist_buf = NULL; /* Serialized property list buffer */
- H5O_native_info_t ninfo; /* Object info struct */
+ hid_t file = H5I_INVALID_HID; /* File */
+ hid_t dset = H5I_INVALID_HID; /* Virtual dataset */
+ H5D_space_status_t space_status; /* Dataset space status */
+ void *plist_buf = NULL; /* Serialized property list buffer */
+ H5O_native_info_t ninfo; /* Object info struct */
htri_t tri_ret;
assert((config >= TEST_API_BASIC) && (config < TEST_API_NTESTS));
@@ -519,10 +519,11 @@ static int
test_api(test_api_config_t config, hid_t fapl, H5F_libver_t low)
{
char filename[FILENAME_BUF_SIZE];
- hid_t dcpl = -1; /* Dataset creation property list */
- hid_t ex_dcpl = -1; /* Temporary dcpl for examination */
- hid_t srcspace[4] = {-1, -1, -1, -1}; /* Source dataspaces */
- hid_t vspace[LIST_DOUBLE_SIZE]; /* Virtual dset dataspaces */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
+ hid_t ex_dcpl = H5I_INVALID_HID; /* Temporary dcpl for examination */
+ hid_t srcspace[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID}; /* Source dataspaces */
+ hid_t vspace[LIST_DOUBLE_SIZE]; /* Virtual dset dataspaces */
const char *src_file[4] = {"src_file1", "src_file2.", "src_file3..",
"src_file4..."}; /* Source file names (different lengths) */
const char *src_dset[4] = {"src_dset1....", "src_dset2.....", "src_dset3......",
@@ -1061,9 +1062,9 @@ test_api(test_api_config_t config, hid_t fapl, H5F_libver_t low)
TEST_ERROR;
/* Create file and dataset names */
- (void)HDsnprintf(tmp_filename, sizeof(tmp_filename), "src_file%u", i);
+ (void)snprintf(tmp_filename, sizeof(tmp_filename), "src_file%u", i);
tmp_filename[sizeof(tmp_filename) - 1] = '\0';
- (void)HDsnprintf(tmp_dsetname, sizeof(tmp_dsetname), "src_dset%u", i);
+ (void)snprintf(tmp_dsetname, sizeof(tmp_dsetname), "src_dset%u", i);
tmp_dsetname[sizeof(tmp_dsetname) - 1] = '\0';
/* Add virtual layout mapping */
@@ -1085,11 +1086,11 @@ test_api(test_api_config_t config, hid_t fapl, H5F_libver_t low)
/* Verify virtual layout */
for (i = 0; i < LIST_DOUBLE_SIZE; i++) {
/* Generate source file name */
- (void)HDsnprintf(tmp_filename, sizeof(tmp_filename), "src_file%u", i);
+ (void)snprintf(tmp_filename, sizeof(tmp_filename), "src_file%u", i);
tmp_filename[sizeof(tmp_filename) - 1] = '\0';
/* Generate source dset name */
- (void)HDsnprintf(tmp_dsetname, sizeof(tmp_dsetname), "src_dset%u", i);
+ (void)snprintf(tmp_dsetname, sizeof(tmp_dsetname), "src_dset%u", i);
tmp_dsetname[sizeof(tmp_dsetname) - 1] = '\0';
/* Check that the mapping in the DCPL is correct */
@@ -1186,19 +1187,23 @@ test_vds_prefix_first(unsigned config, hid_t vds_fapl, hid_t src_fapl)
char *srcfilenamepct = NULL;
char *srcfilenamepct_map = NULL;
const char *srcfilenamepct_map_orig = "vds%%%%_src";
- hid_t srcfile[4] = {-1, -1, -1, -1}; /* Files with source dsets */
- hid_t vfile = -1; /* File with virtual dset */
- hid_t dcpl = -1; /* Dataset creation property list */
- hid_t dapl = -1; /* Dataset access property list */
- hid_t srcspace[4] = {-1, -1, -1, -1}; /* Source dataspaces */
- hid_t vspace[4] = {-1, -1, -1, -1}; /* Virtual dset dataspaces */
- hid_t memspace = -1; /* Memory dataspace */
- hid_t srcdset[4] = {-1, -1, -1, -1}; /* Source datasets */
- hid_t vdset = -1; /* Virtual dataset */
- hsize_t dims[4] = {10, 26, 0, 0}; /* Data space current size */
- int buf[10][26]; /* Write and expected read buffer */
- int rbuf[10][26]; /* Read buffer */
- int fill = -1; /* Fill value */
+ hid_t srcfile[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID}; /* Files with source dsets */
+ hid_t vfile = H5I_INVALID_HID; /* File with virtual dset */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
+ hid_t dapl = H5I_INVALID_HID; /* Dataset access property list */
+ hid_t srcspace[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID}; /* Source dataspaces */
+ hid_t vspace[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID}; /* Virtual dset dataspaces */
+ hid_t memspace = H5I_INVALID_HID; /* Memory dataspace */
+ hid_t srcdset[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID}; /* Source datasets */
+ hid_t vdset = H5I_INVALID_HID; /* Virtual dataset */
+ hsize_t dims[4] = {10, 26, 0, 0}; /* Data space current size */
+ int buf[10][26]; /* Write and expected read buffer */
+ int rbuf[10][26]; /* Read buffer */
+ int fill = -1; /* Fill value */
int i, j;
char buffer[1024]; /* buffer to read vds_prefix */
@@ -1242,7 +1247,7 @@ test_vds_prefix_first(unsigned config, hid_t vds_fapl, hid_t src_fapl)
if (H5Pget_virtual_prefix(dapl, buffer, sizeof(buffer)) < 0)
TEST_ERROR_SUPPRESSED;
- if (HDstrcmp(buffer, TMPDIR) != 0)
+ if (strcmp(buffer, TMPDIR) != 0)
FAIL_PUTS_ERROR("vds prefix not set correctly");
/* Create source dataspace */
@@ -1465,28 +1470,32 @@ test_basic_io(unsigned config, hid_t vds_fapl, hid_t src_fapl)
char *srcfilenamepct = NULL;
char *srcfilenamepct_map = NULL;
const char *srcfilenamepct_map_orig = "vds%%%%_src";
- hid_t srcfile[4] = {-1, -1, -1, -1}; /* Files with source dsets */
- hid_t vfile = -1; /* File with virtual dset */
- hid_t vfile2 = -1; /* File with copied virtual dset */
- hid_t dcpl = -1; /* Dataset creation property list */
- hid_t srcspace[4] = {-1, -1, -1, -1}; /* Source dataspaces */
- hid_t vspace[4] = {-1, -1, -1, -1}; /* Virtual dset dataspaces */
- hid_t memspace = -1; /* Memory dataspace */
- hid_t srcdset[4] = {-1, -1, -1, -1}; /* Source datasets */
- hid_t vdset = -1; /* Virtual dataset */
- hsize_t dims[4] = {10, 26, 0, 0}; /* Data space current size */
- hsize_t start[4]; /* Hyperslab start */
- hsize_t stride[4]; /* Hyperslab stride */
- hsize_t count[4]; /* Hyperslab count */
- hsize_t block[4]; /* Hyperslab block */
- hssize_t offset[2] = {0, 0}; /* Selection offset */
- int buf[10][26]; /* Write and expected read buffer */
- int rbuf[10][26]; /* Read buffer */
- int rbuf99[9][9]; /* 9x9 Read buffer */
- int evbuf[10][26]; /* Expected VDS "buffer" */
- int erbuf[10][26]; /* Expected read buffer */
- int fill = -1; /* Fill value */
- herr_t ret; /* Generic return value */
+ hid_t srcfile[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID}; /* Files with source dsets */
+ hid_t vfile = H5I_INVALID_HID; /* File with virtual dset */
+ hid_t vfile2 = H5I_INVALID_HID; /* File with copied virtual dset */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
+ hid_t srcspace[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID}; /* Source dataspaces */
+ hid_t vspace[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID}; /* Virtual dset dataspaces */
+ hid_t memspace = H5I_INVALID_HID; /* Memory dataspace */
+ hid_t srcdset[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID}; /* Source datasets */
+ hid_t vdset = H5I_INVALID_HID; /* Virtual dataset */
+ hsize_t dims[4] = {10, 26, 0, 0}; /* Data space current size */
+ hsize_t start[4]; /* Hyperslab start */
+ hsize_t stride[4]; /* Hyperslab stride */
+ hsize_t count[4]; /* Hyperslab count */
+ hsize_t block[4]; /* Hyperslab block */
+ hssize_t offset[2] = {0, 0}; /* Selection offset */
+ int buf[10][26]; /* Write and expected read buffer */
+ int rbuf[10][26]; /* Read buffer */
+ int rbuf99[9][9]; /* 9x9 Read buffer */
+ int evbuf[10][26]; /* Expected VDS "buffer" */
+ int erbuf[10][26]; /* Expected read buffer */
+ int fill = -1; /* Fill value */
+ herr_t ret; /* Generic return value */
int i, j, u, v;
TESTING_2_SUPPRESSED("basic virtual dataset I/O");
@@ -4391,30 +4400,34 @@ test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl)
char srcfilename[FILENAME_BUF_SIZE];
char srcfilename_map[FILENAME_BUF_SIZE];
char vfilename[FILENAME_BUF_SIZE];
- hid_t srcfile[4] = {-1, -1, -1, -1}; /* Files with source dsets */
- hid_t vfile = -1; /* File with virtual dset */
- hid_t dcpl = -1; /* Dataset creation property list */
- hid_t srcdcpl = -1; /* DCPL for source dset */
- hid_t dapl = -1; /* Dataset access property list */
- hid_t srcspace[4] = {-1, -1, -1, -1}; /* Source dataspaces */
- hid_t vspace[4] = {-1, -1, -1, -1}; /* Virtual dset dataspaces */
- hid_t memspace = -1; /* Memory dataspace */
- hid_t filespace = -1; /* File dataspace */
- hid_t srcdset[4] = {-1, -1, -1, -1}; /* Source datasets */
- hid_t vdset = -1; /* Virtual dataset */
- hsize_t dims[2] = {10, 10}; /* Data space current size */
- hsize_t mdims[2] = {10, 20}; /* Data space maximum size */
- hsize_t cdims[2] = {4, 4}; /* Chunk dimensions */
- hsize_t start[4]; /* Hyperslab start */
- hsize_t stride[4]; /* Hyperslab stride */
- hsize_t count[4]; /* Hyperslab count */
- hsize_t block[4]; /* Hyperslab block */
- int buf[10][20]; /* Write and expected read buffer */
- int rbuf[10][20]; /* Read buffer */
- int erbuf[10][20]; /* Expected read buffer */
- int ndims; /* Number of dimensions */
- int fill = -1; /* Fill value */
- H5D_vds_view_t virtual_view; /* Virtual view property */
+ hid_t srcfile[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID}; /* Files with source dsets */
+ hid_t vfile = H5I_INVALID_HID; /* File with virtual dset */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
+ hid_t srcdcpl = H5I_INVALID_HID; /* DCPL for source dset */
+ hid_t dapl = H5I_INVALID_HID; /* Dataset access property list */
+ hid_t srcspace[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID}; /* Source dataspaces */
+ hid_t vspace[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID}; /* Virtual dset dataspaces */
+ hid_t memspace = H5I_INVALID_HID; /* Memory dataspace */
+ hid_t filespace = H5I_INVALID_HID; /* File dataspace */
+ hid_t srcdset[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID}; /* Source datasets */
+ hid_t vdset = H5I_INVALID_HID; /* Virtual dataset */
+ hsize_t dims[2] = {10, 10}; /* Data space current size */
+ hsize_t mdims[2] = {10, 20}; /* Data space maximum size */
+ hsize_t cdims[2] = {4, 4}; /* Chunk dimensions */
+ hsize_t start[4]; /* Hyperslab start */
+ hsize_t stride[4]; /* Hyperslab stride */
+ hsize_t count[4]; /* Hyperslab count */
+ hsize_t block[4]; /* Hyperslab block */
+ int buf[10][20]; /* Write and expected read buffer */
+ int rbuf[10][20]; /* Read buffer */
+ int erbuf[10][20]; /* Expected read buffer */
+ int ndims; /* Number of dimensions */
+ int fill = -1; /* Fill value */
+ H5D_vds_view_t virtual_view; /* Virtual view property */
int i, j;
TESTING_2_SUPPRESSED("virtual dataset I/O with unlimited selections");
@@ -7406,28 +7419,30 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
char *srcfilenamepct_map = NULL;
const char *printf_srcfilename_map_orig = "vds_src_%b";
const char *srcfilenamepct_map_orig = "vds%%%%_src";
- hid_t srcfile[4] = {-1, -1, -1, -1}; /* Files with source dsets */
- hid_t vfile = -1; /* File with virtual dset */
- hid_t dcpl = -1; /* Dataset creation property list */
- hid_t dapl = -1; /* Dataset access property list */
- hid_t srcspace = -1; /* Source dataspace */
- hid_t vspace[2] = {-1, -1}; /* Virtual dset dataspaces */
- hid_t memspace = -1; /* Memory dataspace */
- hid_t filespace = -1; /* File dataspace */
- hid_t srcdset[6] = {-1, -1, -1, -1, -1, -1}; /* Source datasets */
- hid_t vdset = -1; /* Virtual dataset */
- hsize_t dims[2] = {10, 0}; /* Data space current size */
- hsize_t mdims[2] = {10, 20}; /* Data space maximum size */
- hsize_t start[2] = {0, 0}; /* Hyperslab start */
- hsize_t stride[2]; /* Hyperslab stride */
- hsize_t count[2]; /* Hyperslab count */
- hsize_t block[2]; /* Hyperslab block */
- int buf[10][20]; /* Write and expected read buffer */
- int rbuf[10][20]; /* Read buffer */
- int erbuf[10][20]; /* Expected read buffer */
- int ndims; /* Number of dimensions */
- int fill = -1; /* Fill value */
- hsize_t gap_size; /* Gap size property */
+ hid_t srcfile[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID}; /* Files with source dsets */
+ hid_t vfile = H5I_INVALID_HID; /* File with virtual dset */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
+ hid_t dapl = H5I_INVALID_HID; /* Dataset access property list */
+ hid_t srcspace = H5I_INVALID_HID; /* Source dataspace */
+ hid_t vspace[2] = {H5I_INVALID_HID, H5I_INVALID_HID}; /* Virtual dset dataspaces */
+ hid_t memspace = H5I_INVALID_HID; /* Memory dataspace */
+ hid_t filespace = H5I_INVALID_HID; /* File dataspace */
+ hid_t srcdset[6] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID}; /* Source datasets */
+ hid_t vdset = H5I_INVALID_HID; /* Virtual dataset */
+ hsize_t dims[2] = {10, 0}; /* Data space current size */
+ hsize_t mdims[2] = {10, 20}; /* Data space maximum size */
+ hsize_t start[2] = {0, 0}; /* Hyperslab start */
+ hsize_t stride[2]; /* Hyperslab stride */
+ hsize_t count[2]; /* Hyperslab count */
+ hsize_t block[2]; /* Hyperslab block */
+ int buf[10][20]; /* Write and expected read buffer */
+ int rbuf[10][20]; /* Read buffer */
+ int erbuf[10][20]; /* Expected read buffer */
+ int ndims; /* Number of dimensions */
+ int fill = -1; /* Fill value */
+ hsize_t gap_size; /* Gap size property */
int i, j;
TESTING_2_SUPPRESSED("virtual dataset I/O with printf source");
@@ -11114,28 +11129,29 @@ test_all(unsigned config, hid_t vds_fapl, hid_t src_fapl)
char vfilename[FILENAME_BUF_SIZE];
char srcfilename[FILENAME_BUF_SIZE];
char srcfilename_map[FILENAME_BUF_SIZE];
- hid_t srcfile = -1; /* File with source dsets */
- hid_t vfile = -1; /* File with virtual dset */
- hid_t dcpl = -1; /* Dataset creation property list */
- hid_t srcdcpl = -1; /* DCPL for source dset */
- hid_t srcspace[3] = {-1, -1, -1}; /* Source dataspaces */
- hid_t vspace[3] = {-1, -1, -1}; /* Virtual dset dataspaces */
- hid_t memspace = -1; /* Memory dataspace */
- hid_t filespace = -1; /* File dataspace */
- hid_t srcdset[5] = {-1, -1, -1, -1, -1}; /* Source datasets */
- hid_t vdset = -1; /* Virtual dataset */
- hsize_t dims[2] = {6, 6}; /* Data space current size */
- hsize_t mdims[2] = {10, 10}; /* Data space maximum size */
- hsize_t cdims[2] = {2, 2}; /* Chunk dimensions */
- hsize_t start[2]; /* Hyperslab start */
- hsize_t stride[2]; /* Hyperslab stride */
- hsize_t count[2]; /* Hyperslab count */
- hsize_t block[2]; /* Hyperslab block */
- int buf[10][10]; /* Write and expected read buffer */
- int rbuf[10][10]; /* Read buffer */
- int erbuf[10][10]; /* Expected read buffer */
- int ndims; /* Number of dimensions */
- int fill = -1; /* Fill value */
+ hid_t srcfile = H5I_INVALID_HID; /* File with source dsets */
+ hid_t vfile = H5I_INVALID_HID; /* File with virtual dset */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
+ hid_t srcdcpl = H5I_INVALID_HID; /* DCPL for source dset */
+ hid_t srcspace[3] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID}; /* Source dataspaces */
+ hid_t vspace[3] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID}; /* Virtual dset dataspaces */
+ hid_t memspace = H5I_INVALID_HID; /* Memory dataspace */
+ hid_t filespace = H5I_INVALID_HID; /* File dataspace */
+ hid_t srcdset[5] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID}; /* Source datasets */
+ hid_t vdset = H5I_INVALID_HID; /* Virtual dataset */
+ hsize_t dims[2] = {6, 6}; /* Data space current size */
+ hsize_t mdims[2] = {10, 10}; /* Data space maximum size */
+ hsize_t cdims[2] = {2, 2}; /* Chunk dimensions */
+ hsize_t start[2]; /* Hyperslab start */
+ hsize_t stride[2]; /* Hyperslab stride */
+ hsize_t count[2]; /* Hyperslab count */
+ hsize_t block[2]; /* Hyperslab block */
+ int buf[10][10]; /* Write and expected read buffer */
+ int rbuf[10][10]; /* Read buffer */
+ int erbuf[10][10]; /* Expected read buffer */
+ int ndims; /* Number of dimensions */
+ int fill = -1; /* Fill value */
int i, j;
TESTING_2_SUPPRESSED("virtual dataset I/O with mixed selection types");
@@ -12138,23 +12154,23 @@ test_all(unsigned config, hid_t vds_fapl, hid_t src_fapl)
static int
test_dapl_values(hid_t fapl_id)
{
- hid_t fid = -1; /* file to write to */
- hid_t dcpl_id = -1; /* dataset creation properties */
- hid_t dapl_id1 = -1; /* dataset access properties */
- hid_t dapl_id2 = -1; /* dataset access properties */
- hid_t vds_sid = -1; /* vds data space */
- hid_t src_sid = -1; /* source data space */
- hid_t did1 = -1; /* dataset */
- hid_t did2 = -1; /* dataset */
- hsize_t start; /* hyperslab start */
- hsize_t stride; /* hyperslab count */
- hsize_t count; /* hyperslab count */
- hsize_t block; /* hyperslab count */
- hsize_t dims; /* dataset size */
- hsize_t max_dims; /* dataset max size */
- H5D_vds_view_t view; /* view from dapl */
- hsize_t gap_size; /* gap size from dapl */
- char filename[1024]; /* file names */
+ hid_t fid = H5I_INVALID_HID; /* file to write to */
+ hid_t dcpl_id = H5I_INVALID_HID; /* dataset creation properties */
+ hid_t dapl_id1 = H5I_INVALID_HID; /* dataset access properties */
+ hid_t dapl_id2 = H5I_INVALID_HID; /* dataset access properties */
+ hid_t vds_sid = H5I_INVALID_HID; /* vds data space */
+ hid_t src_sid = H5I_INVALID_HID; /* source data space */
+ hid_t did1 = H5I_INVALID_HID; /* dataset */
+ hid_t did2 = H5I_INVALID_HID; /* dataset */
+ hsize_t start; /* hyperslab start */
+ hsize_t stride; /* hyperslab count */
+ hsize_t count; /* hyperslab count */
+ hsize_t block; /* hyperslab count */
+ hsize_t dims; /* dataset size */
+ hsize_t max_dims; /* dataset max size */
+ H5D_vds_view_t view; /* view from dapl */
+ hsize_t gap_size; /* gap size from dapl */
+ char filename[1024]; /* file names */
TESTING_2("H5Dget_access_plist() returns dapl w/ correct values");
@@ -12295,16 +12311,16 @@ main(void)
{
char filename[FILENAME_BUF_SIZE];
hid_t fapl;
- hid_t vds_fapl = -1; /* File access property list */
- hid_t src_fapl = -1; /* File access property list */
+ hid_t vds_fapl = H5I_INVALID_HID; /* File access property list */
+ hid_t src_fapl = H5I_INVALID_HID; /* File access property list */
int test_api_config;
unsigned bit_config;
H5F_libver_t low, high; /* Low and high bounds */
const char *env_h5_drvr; /* File Driver value from environment */
- hbool_t driver_is_parallel;
+ bool driver_is_parallel;
int nerrors = 0;
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
@@ -12320,8 +12336,8 @@ main(void)
* doesn't support parallel reads and the splitter VFD has external
* link-related bugs.
*/
- if (driver_is_parallel || !HDstrcmp(env_h5_drvr, "splitter")) {
- HDputs(" -- SKIPPED for incompatible VFD --");
+ if (driver_is_parallel || !strcmp(env_h5_drvr, "splitter")) {
+ puts(" -- SKIPPED for incompatible VFD --");
exit(EXIT_SUCCESS);
}
@@ -12360,10 +12376,10 @@ main(void)
/* Display testing info */
low_string = h5_get_version_string(low);
high_string = h5_get_version_string(high);
- HDsnprintf(msg, sizeof(msg),
- "Testing virtual dataset I/O with file version bounds: (%s, %s):", low_string,
- high_string);
- HDputs(msg);
+ snprintf(msg, sizeof(msg),
+ "Testing virtual dataset I/O with file version bounds: (%s, %s):", low_string,
+ high_string);
+ puts(msg);
for (test_api_config = (int)TEST_API_BASIC; test_api_config < (int)TEST_API_NTESTS;
test_api_config++)
@@ -12371,7 +12387,7 @@ main(void)
TESTING_2("Virtual dataset I/O");
#ifdef VDS_TEST_VERBOSE
- HDputs("");
+ puts("");
#else /* VDS_TEST_VERBOSE */
tmp_nerrors = nerrors;
#endif /* VDS_TEST_VERBOSE */
diff --git a/test/vds_env.c b/test/vds_env.c
index 256455e345b..e9649566fd9 100644
--- a/test/vds_env.c
+++ b/test/vds_env.c
@@ -48,19 +48,23 @@ test_vds_prefix_second(unsigned config, hid_t fapl)
char *vfilename2 = NULL;
char *srcfilenamepct = NULL;
char *srcfilenamepct_map = NULL;
- hid_t srcfile[4] = {-1, -1, -1, -1}; /* Files with source dsets */
- hid_t vfile = -1; /* File with virtual dset */
- hid_t dcpl = -1; /* Dataset creation property list */
- hid_t dapl = -1; /* Dataset access property list */
- hid_t srcspace[4] = {-1, -1, -1, -1}; /* Source dataspaces */
- hid_t vspace[4] = {-1, -1, -1, -1}; /* Virtual dset dataspaces */
- hid_t memspace = -1; /* Memory dataspace */
- hid_t srcdset[4] = {-1, -1, -1, -1}; /* Source datasets */
- hid_t vdset = -1; /* Virtual dataset */
- hsize_t dims[4] = {10, 26, 0, 0}; /* Data space current size */
- int buf[10][26]; /* Write and expected read buffer */
- int rbuf[10][26]; /* Read buffer */
- int fill = -1; /* Fill value */
+ hid_t srcfile[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID}; /* Files with source dsets */
+ hid_t vfile = H5I_INVALID_HID; /* File with virtual dset */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
+ hid_t dapl = H5I_INVALID_HID; /* Dataset access property list */
+ hid_t srcspace[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID}; /* Source dataspaces */
+ hid_t vspace[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID}; /* Virtual dset dataspaces */
+ hid_t memspace = H5I_INVALID_HID; /* Memory dataspace */
+ hid_t srcdset[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID}; /* Source datasets */
+ hid_t vdset = H5I_INVALID_HID; /* Virtual dataset */
+ hsize_t dims[4] = {10, 26, 0, 0}; /* Data space current size */
+ int buf[10][26]; /* Write and expected read buffer */
+ int rbuf[10][26]; /* Read buffer */
+ int fill = -1; /* Fill value */
int i, j;
char buffer[1024]; /* buffer to read vds_prefix */
@@ -107,7 +111,7 @@ test_vds_prefix_second(unsigned config, hid_t fapl)
if (H5Pget_virtual_prefix(dapl, buffer, sizeof(buffer)) < 0)
TEST_ERROR;
- if (HDstrcmp(buffer, "someprefix") != 0)
+ if (strcmp(buffer, "someprefix") != 0)
FAIL_PUTS_ERROR("vds prefix not set correctly");
/* Create source dataspace */
@@ -324,10 +328,10 @@ main(void)
unsigned bit_config;
H5F_libver_t low, high; /* Low and high bounds */
const char *env_h5_drvr; /* File Driver value from environment */
- hbool_t driver_is_parallel;
+ bool driver_is_parallel;
int nerrors = 0;
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
@@ -343,8 +347,8 @@ main(void)
* doesn't support parallel reads and the splitter VFD has external
* link-related bugs.
*/
- if (driver_is_parallel || !HDstrcmp(env_h5_drvr, "splitter")) {
- HDputs(" -- SKIPPED for incompatible VFD --");
+ if (driver_is_parallel || !strcmp(env_h5_drvr, "splitter")) {
+ puts(" -- SKIPPED for incompatible VFD --");
exit(EXIT_SUCCESS);
}
@@ -374,10 +378,9 @@ main(void)
/* Display testing info */
low_string = h5_get_version_string(low);
high_string = h5_get_version_string(high);
- HDsnprintf(msg, sizeof(msg),
- "Testing virtual dataset with file version bounds: (%s, %s):", low_string,
- high_string);
- HDputs(msg);
+ snprintf(msg, sizeof(msg),
+ "Testing virtual dataset with file version bounds: (%s, %s):", low_string, high_string);
+ puts(msg);
for (bit_config = 0; bit_config < TEST_IO_NTESTS; bit_config++) {
printf("Config: %s%s%s\n", bit_config & TEST_IO_CLOSE_SRC ? "closed source dataset, " : "",
diff --git a/test/vds_swmr_gen.c b/test/vds_swmr_gen.c
index bdfa18e30a1..a22b1552270 100644
--- a/test/vds_swmr_gen.c
+++ b/test/vds_swmr_gen.c
@@ -44,16 +44,16 @@ static int32_t VDS_FILL_VALUE = -9;
int
main(void)
{
- hid_t faplid = -1; /* file access property list ID (all files) */
+ hid_t faplid = H5I_INVALID_HID; /* file access property list ID (all files) */
- hid_t src_sid = -1; /* source dataset's dataspace ID */
- hid_t src_dcplid = -1; /* source dataset property list ID */
+ hid_t src_sid = H5I_INVALID_HID; /* source dataset's dataspace ID */
+ hid_t src_dcplid = H5I_INVALID_HID; /* source dataset property list ID */
- hid_t vds_sid = -1; /* VDS dataspace ID */
- hid_t vds_dcplid = -1; /* VDS dataset property list ID */
+ hid_t vds_sid = H5I_INVALID_HID; /* VDS dataspace ID */
+ hid_t vds_dcplid = H5I_INVALID_HID; /* VDS dataset property list ID */
- hid_t fid = -1; /* HDF5 file ID */
- hid_t did = -1; /* dataset ID */
+ hid_t fid = H5I_INVALID_HID; /* HDF5 file ID */
+ hid_t did = H5I_INVALID_HID; /* dataset ID */
hsize_t start[RANK]; /* starting point for hyperslab */
int map_start = -1; /* starting point in the VDS map */
diff --git a/test/vds_swmr_reader.c b/test/vds_swmr_reader.c
index f6e9ddd6c97..76cdb8aa3d5 100644
--- a/test/vds_swmr_reader.c
+++ b/test/vds_swmr_reader.c
@@ -18,11 +18,11 @@ static hsize_t VDS_PLANE[RANK] = {1, FULL_HEIGHT, WIDTH};
int
main(void)
{
- hid_t fid = -1; /* HDF5 file ID */
- hid_t faplid = -1; /* file access property list ID */
- hid_t did = -1; /* dataset ID */
- hid_t msid = -1; /* memory dataspace ID */
- hid_t fsid = -1; /* file dataspace ID */
+ hid_t fid = H5I_INVALID_HID; /* HDF5 file ID */
+ hid_t faplid = H5I_INVALID_HID; /* file access property list ID */
+ hid_t did = H5I_INVALID_HID; /* dataset ID */
+ hid_t msid = H5I_INVALID_HID; /* memory dataspace ID */
+ hid_t fsid = H5I_INVALID_HID; /* file dataspace ID */
hsize_t start[RANK]; /* hyperslab start point */
diff --git a/test/vds_swmr_writer.c b/test/vds_swmr_writer.c
index d5fa74b2f6e..752cc509e24 100644
--- a/test/vds_swmr_writer.c
+++ b/test/vds_swmr_writer.c
@@ -18,11 +18,11 @@ main(int argc, char *argv[])
{
int file_number = -1; /* Source file number */
- hid_t fid = -1; /* HDF5 file ID */
- hid_t faplid = -1; /* file access property list ID */
- hid_t did = -1; /* dataset ID */
- hid_t msid = -1; /* memory dataspace ID */
- hid_t fsid = -1; /* file dataspace ID */
+ hid_t fid = H5I_INVALID_HID; /* HDF5 file ID */
+ hid_t faplid = H5I_INVALID_HID; /* file access property list ID */
+ hid_t did = H5I_INVALID_HID; /* dataset ID */
+ hid_t msid = H5I_INVALID_HID; /* memory dataspace ID */
+ hid_t fsid = H5I_INVALID_HID; /* file dataspace ID */
hsize_t extent[RANK]; /* dataset extents */
hsize_t start[RANK]; /* hyperslab start point */
diff --git a/test/vfd.c b/test/vfd.c
index 06a6ed44c3e..5a86920652e 100644
--- a/test/vfd.c
+++ b/test/vfd.c
@@ -88,7 +88,7 @@ static int __k;
*
* Helper macro to track the sizes of entries in a vector
* I/O call when stepping through the vector incrementally.
- * Assuming that bool_size_fixed is initialized to FALSE
+ * Assuming that bool_size_fixed is initialized to false
* before the scan, this macro will detect the sizes array
* optimization for the case in which all remaining entries
* are of the same size, and set size_value accordingly.
@@ -102,20 +102,20 @@ static int __k;
if ((sizes_array)[idx] == 0) { \
\
assert((idx) > 0); \
- (bool_size_fixed) = TRUE; \
+ (bool_size_fixed) = true; \
} \
else { \
\
(size_value) = (sizes_array)[idx]; \
} \
} \
- } while (FALSE)
+ } while (false)
/* Macro SET_TYPE()
*
* Helper macro to track the types of entries in a vector
* I/O call when stepping through the vector incrementally.
- * Assuming that bool_type_fixed is initialized to FALSE
+ * Assuming that bool_type_fixed is initialized to false
* before the scan, this macro will detect the types array
* optimization for the case in which all remaining entries
* are of the same type, and set type_value accordingly.
@@ -129,14 +129,14 @@ static int __k;
if ((types_array)[idx] == H5FD_MEM_NOLIST) { \
\
assert((idx) > 0); \
- (bool_type_fixed) = TRUE; \
+ (bool_type_fixed) = true; \
} \
else { \
\
(type_value) = (types_array)[idx]; \
} \
} \
- } while (FALSE)
+ } while (false)
/* Helper structure to pass around dataset information.
*/
@@ -159,8 +159,8 @@ static int splitter_prepare_file_paths(H5FD_splitter_vfd_config_t *vfd_config, c
static int splitter_create_single_file_at(const char *filename, hid_t fapl_id,
const struct splitter_dataset_def *data);
static int splitter_compare_expected_data(hid_t file_id, const struct splitter_dataset_def *data);
-static int run_splitter_test(const struct splitter_dataset_def *data, hbool_t ignore_wo_errors,
- hbool_t provide_logfile_path, const hid_t sub_fapl_ids[2]);
+static int run_splitter_test(const struct splitter_dataset_def *data, bool ignore_wo_errors,
+ bool provide_logfile_path, const hid_t sub_fapl_ids[2]);
static int splitter_RO_test(const struct splitter_dataset_def *data, hid_t child_fapl_id);
static int splitter_tentative_open_test(hid_t child_fapl_id);
static int file_exists(const char *filename, hid_t fapl_id);
@@ -191,14 +191,14 @@ static herr_t H5FD__ctl_test_vfd_ctl(H5FD_t *_file, uint64_t op_code, uint64_t
static herr_t
test_sec2(void)
{
- hid_t fid = -1; /* file ID */
- hid_t fapl_id = -1; /* file access property list ID */
- hid_t fapl_id_out = -1; /* from H5Fget_access_plist */
- hid_t driver_id = -1; /* ID for this VFD */
- unsigned long driver_flags = 0; /* VFD feature flags */
- char filename[1024]; /* filename */
- void *os_file_handle = NULL; /* OS file handle */
- hsize_t file_size; /* file size */
+ hid_t fid = H5I_INVALID_HID; /* file ID */
+ hid_t fapl_id = H5I_INVALID_HID; /* file access property list ID */
+ hid_t fapl_id_out = H5I_INVALID_HID; /* from H5Fget_access_plist */
+ hid_t driver_id = H5I_INVALID_HID; /* ID for this VFD */
+ unsigned long driver_flags = 0; /* VFD feature flags */
+ char filename[1024]; /* filename */
+ void *os_file_handle = NULL; /* OS file handle */
+ hsize_t file_size; /* file size */
TESTING("SEC2 file driver");
@@ -303,28 +303,28 @@ test_sec2(void)
static herr_t
test_core(void)
{
- hid_t fid = -1; /* file ID */
- hid_t fapl_id = -1; /* file access property list ID */
- hid_t fapl_id_out = -1; /* from H5Fget_access_plist */
- hid_t driver_id = -1; /* ID for this VFD */
- unsigned long driver_flags = 0; /* VFD feature flags */
- hid_t did = -1; /* dataset ID */
- hid_t sid = -1; /* dataspace ID */
- char filename[1024]; /* filename */
- void *os_file_handle = NULL; /* OS file handle */
- hsize_t file_size; /* file size */
- size_t increment; /* core VFD increment */
- hbool_t backing_store; /* use backing store? */
- hbool_t use_write_tracking; /* write tracking flag */
- size_t write_tracking_page_size; /* write tracking page size */
- int *data_w = NULL; /* data written to the dataset */
- int *data_r = NULL; /* data read from the dataset */
- int val; /* data value */
- int *pw = NULL, *pr = NULL; /* pointers for iterating over
- data arrays (write & read) */
- hsize_t dims[2]; /* dataspace dimensions */
- int i, j; /* iterators */
- htri_t status; /* return value from H5Lexists */
+ hid_t fid = H5I_INVALID_HID; /* file ID */
+ hid_t fapl_id = H5I_INVALID_HID; /* file access property list ID */
+ hid_t fapl_id_out = H5I_INVALID_HID; /* from H5Fget_access_plist */
+ hid_t driver_id = H5I_INVALID_HID; /* ID for this VFD */
+ unsigned long driver_flags = 0; /* VFD feature flags */
+ hid_t did = H5I_INVALID_HID; /* dataset ID */
+ hid_t sid = H5I_INVALID_HID; /* dataspace ID */
+ char filename[1024]; /* filename */
+ void *os_file_handle = NULL; /* OS file handle */
+ hsize_t file_size; /* file size */
+ size_t increment; /* core VFD increment */
+ bool backing_store; /* use backing store? */
+ bool use_write_tracking; /* write tracking flag */
+ size_t write_tracking_page_size; /* write tracking page size */
+ int *data_w = NULL; /* data written to the dataset */
+ int *data_r = NULL; /* data read from the dataset */
+ int val; /* data value */
+ int *pw = NULL, *pr = NULL; /* pointers for iterating over
+ data arrays (write & read) */
+ hsize_t dims[2]; /* dataspace dimensions */
+ int i, j; /* iterators */
+ htri_t status; /* return value from H5Lexists */
TESTING("CORE file driver");
@@ -344,7 +344,7 @@ test_core(void)
FAIL_PUTS_ERROR("unable to remove backing store file");
/* Create and close file w/ backing store off */
- if (H5Pset_fapl_core(fapl_id, (size_t)CORE_INCREMENT, FALSE) < 0)
+ if (H5Pset_fapl_core(fapl_id, (size_t)CORE_INCREMENT, false) < 0)
TEST_ERROR;
/* Check that the VFD feature flags are correct.
@@ -379,7 +379,7 @@ test_core(void)
TEST_ERROR;
/* Check for the backing store file */
if (HDaccess(filename, F_OK) != -1)
- FAIL_PUTS_ERROR("file created when backing store set to FALSE");
+ FAIL_PUTS_ERROR("file created when backing store set to false");
/************************************************************************
* Check basic core VFD operation and properties. This is done with the
@@ -387,7 +387,7 @@ test_core(void)
************************************************************************/
/* Turn the backing store on */
- if (H5Pset_fapl_core(fapl_id, (size_t)CORE_INCREMENT, TRUE) < 0)
+ if (H5Pset_fapl_core(fapl_id, (size_t)CORE_INCREMENT, true) < 0)
TEST_ERROR;
/* Check that write tracking is off by default and that the default
@@ -395,13 +395,13 @@ test_core(void)
*/
if (H5Pget_core_write_tracking(fapl_id, &use_write_tracking, &write_tracking_page_size) < 0)
TEST_ERROR;
- if (FALSE != use_write_tracking)
+ if (false != use_write_tracking)
FAIL_PUTS_ERROR("write tracking should be off by default");
if (0 == write_tracking_page_size)
FAIL_PUTS_ERROR("write tracking page size should never be zero");
/* Set core VFD properties */
- if (H5Pset_core_write_tracking(fapl_id, TRUE, CORE_PAGE_SIZE) < 0)
+ if (H5Pset_core_write_tracking(fapl_id, true, CORE_PAGE_SIZE) < 0)
TEST_ERROR;
/* Create the file */
@@ -423,7 +423,7 @@ test_core(void)
TEST_ERROR;
if (increment != (size_t)CORE_INCREMENT)
FAIL_PUTS_ERROR("incorrect increment from file fapl");
- if (backing_store != TRUE)
+ if (backing_store != true)
FAIL_PUTS_ERROR("incorrect backing store flag from file fapl");
/* Check that the backing store write tracking info was saved */
@@ -433,7 +433,7 @@ test_core(void)
*/
if (H5Pget_core_write_tracking(fapl_id, &use_write_tracking, &write_tracking_page_size) < 0)
TEST_ERROR;
- if (TRUE != use_write_tracking)
+ if (true != use_write_tracking)
FAIL_PUTS_ERROR("write tracking flag incorrect in fapl obtained from H5Fget_access_plist");
if (CORE_PAGE_SIZE != write_tracking_page_size)
FAIL_PUTS_ERROR("write tracking page size incorrect in fapl obtained from H5Fget_access_plist");
@@ -472,7 +472,7 @@ test_core(void)
/* Open the file with backing store off for read and write.
* Changes won't be saved in file.
*/
- if (H5Pset_fapl_core(fapl_id, (size_t)CORE_INCREMENT, FALSE) < 0)
+ if (H5Pset_fapl_core(fapl_id, (size_t)CORE_INCREMENT, false) < 0)
TEST_ERROR;
if ((fid = H5Fopen(filename, H5F_ACC_RDWR, fapl_id)) < 0)
TEST_ERROR;
@@ -555,7 +555,7 @@ test_core(void)
/* Open the file with backing store on for read and write.
* Changes will be saved in file.
*/
- if (H5Pset_fapl_core(fapl_id, (size_t)CORE_INCREMENT, TRUE) < 0)
+ if (H5Pset_fapl_core(fapl_id, (size_t)CORE_INCREMENT, true) < 0)
TEST_ERROR;
if ((fid = H5Fopen(filename, H5F_ACC_RDWR, fapl_id)) < 0)
TEST_ERROR;
@@ -626,7 +626,7 @@ test_core(void)
************************************************************************/
/* Create and close a file */
- if (H5Pset_fapl_core(fapl_id, (size_t)CORE_INCREMENT, TRUE) < 0)
+ if (H5Pset_fapl_core(fapl_id, (size_t)CORE_INCREMENT, true) < 0)
TEST_ERROR;
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0)
TEST_ERROR;
@@ -634,20 +634,20 @@ test_core(void)
TEST_ERROR;
/* Try to delete the file with the backing store off (shouldn't delete anything) */
- if (H5Pset_fapl_core(fapl_id, (size_t)CORE_INCREMENT, FALSE) < 0)
+ if (H5Pset_fapl_core(fapl_id, (size_t)CORE_INCREMENT, false) < 0)
TEST_ERROR;
if (H5Fdelete(filename, fapl_id) < 0)
TEST_ERROR;
if (-1 == HDaccess(filename, F_OK))
- FAIL_PUTS_ERROR("file deleted when backing store set to FALSE");
+ FAIL_PUTS_ERROR("file deleted when backing store set to false");
/* Try to delete the file with the backing store on (should work) */
- if (H5Pset_fapl_core(fapl_id, (size_t)CORE_INCREMENT, TRUE) < 0)
+ if (H5Pset_fapl_core(fapl_id, (size_t)CORE_INCREMENT, true) < 0)
TEST_ERROR;
if (H5Fdelete(filename, fapl_id) < 0)
TEST_ERROR;
if (0 == HDaccess(filename, F_OK))
- FAIL_PUTS_ERROR("file not deleted when backing store set to TRUE");
+ FAIL_PUTS_ERROR("file not deleted when backing store set to true");
/************************************************************************
* Clean up
@@ -693,8 +693,9 @@ static herr_t
test_direct(void)
{
#ifdef H5_HAVE_DIRECT
- hid_t file = -1, fapl = -1, access_fapl = -1;
- hid_t dset1 = -1, dset2 = -1, space1 = -1, space2 = -1;
+ hid_t file = H5I_INVALID_HID, fapl = H5I_INVALID_HID, access_fapl = H5I_INVALID_HID;
+ hid_t dset1 = H5I_INVALID_HID, dset2 = H5I_INVALID_HID, space1 = H5I_INVALID_HID,
+ space2 = H5I_INVALID_HID;
char filename[1024];
int *fhandle = NULL;
hsize_t file_size;
@@ -925,13 +926,13 @@ H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
static herr_t
test_family_opens(char *fname, hid_t fa_pl)
{
- hid_t file = -1;
+ hid_t file = H5I_INVALID_HID;
char first_name[1024];
char wrong_name[1024];
int i;
/* Case 1: reopen file with 1st member file name and default property list */
- HDsnprintf(first_name, sizeof(first_name), fname, 0);
+ snprintf(first_name, sizeof(first_name), fname, 0);
H5E_BEGIN_TRY
{
@@ -963,7 +964,7 @@ test_family_opens(char *fname, hid_t fa_pl)
TEST_ERROR;
/* Case 4: reopen file with wrong name template */
- HDstrcpy(wrong_name, fname);
+ strcpy(wrong_name, fname);
for (i = 0; i < 1024; i++)
if (wrong_name[i] == '5') {
wrong_name[i] = '4';
@@ -1000,10 +1001,11 @@ H5_GCC_CLANG_DIAG_ON("format-nonliteral")
static herr_t
test_family(void)
{
- hid_t file = -1, fapl = -1, fapl2 = -1, space = -1, dset = -1;
- hid_t access_fapl = -1;
- hid_t driver_id = -1; /* ID for this VFD */
- unsigned long driver_flags = 0; /* VFD feature flags */
+ hid_t file = H5I_INVALID_HID, fapl = H5I_INVALID_HID, fapl2 = H5I_INVALID_HID, space = H5I_INVALID_HID,
+ dset = H5I_INVALID_HID;
+ hid_t access_fapl = H5I_INVALID_HID;
+ hid_t driver_id = H5I_INVALID_HID; /* ID for this VFD */
+ unsigned long driver_flags = 0; /* VFD feature flags */
char filename[1024];
char dname[] = "dataset";
unsigned int i, j;
@@ -1210,8 +1212,8 @@ H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
static herr_t
test_family_compat(void)
{
- hid_t file = -1, fapl = -1;
- hid_t dset = -1;
+ hid_t file = H5I_INVALID_HID, fapl = H5I_INVALID_HID;
+ hid_t dset = H5I_INVALID_HID;
char dname[] = "dataset";
char filename[1024];
char pathname[1024], pathname_individual[1024];
@@ -1230,19 +1232,19 @@ test_family_compat(void)
h5_fixname(FILENAME[3], fapl, newname, sizeof(newname));
pathname[0] = '\0';
- HDstrcat(pathname, filename);
+ strcat(pathname, filename);
/* The following code makes the copies of the family files in the source directory.
* Since we're going to open the files with write mode, this protects the original
* files.
*/
- HDsnprintf(newname_individual, sizeof(newname_individual), newname, counter);
- HDsnprintf(pathname_individual, sizeof(pathname_individual), pathname, counter);
+ snprintf(newname_individual, sizeof(newname_individual), newname, counter);
+ snprintf(pathname_individual, sizeof(pathname_individual), pathname, counter);
while (h5_make_local_copy(pathname_individual, newname_individual) >= 0) {
counter++;
- HDsnprintf(newname_individual, sizeof(newname_individual), newname, counter);
- HDsnprintf(pathname_individual, sizeof(pathname_individual), pathname, counter);
+ snprintf(newname_individual, sizeof(newname_individual), newname, counter);
+ snprintf(pathname_individual, sizeof(pathname_individual), pathname, counter);
} /* end while */
/* Make sure we can open the file. Use the read and write mode to flush the
@@ -1435,8 +1437,8 @@ test_multi_opens(char *fname)
char sf_name[1024]; /*name string "multi_file-s.h5"*/
/* Case: reopen with the name of super file and default property list */
- HDsnprintf(super_name, sizeof(super_name), "%%s-%c.h5", 's');
- HDsnprintf(sf_name, sizeof(sf_name), super_name, fname);
+ snprintf(super_name, sizeof(super_name), "%%s-%c.h5", 's');
+ snprintf(sf_name, sizeof(sf_name), super_name, fname);
H5E_BEGIN_TRY
{
@@ -1460,11 +1462,12 @@ H5_GCC_CLANG_DIAG_ON("format-nonliteral")
static herr_t
test_multi(void)
{
- hid_t file = -1, fapl = -1, fapl2 = -1, dset = -1, space = -1;
- hid_t root = -1, attr = -1, aspace = -1, atype = -1;
- hid_t access_fapl = -1;
- hid_t driver_id = -1; /* ID for this VFD */
- unsigned long driver_flags = 0; /* VFD feature flags */
+ hid_t file = H5I_INVALID_HID, fapl = H5I_INVALID_HID, fapl2 = H5I_INVALID_HID, dset = H5I_INVALID_HID,
+ space = H5I_INVALID_HID;
+ hid_t root = H5I_INVALID_HID, attr = H5I_INVALID_HID, aspace = H5I_INVALID_HID, atype = H5I_INVALID_HID;
+ hid_t access_fapl = H5I_INVALID_HID;
+ hid_t driver_id = H5I_INVALID_HID; /* ID for this VFD */
+ unsigned long driver_flags = 0; /* VFD feature flags */
char filename[1024];
int *fhandle2 = NULL, *fhandle = NULL;
hsize_t file_size;
@@ -1509,23 +1512,23 @@ test_multi(void)
memb_map[H5FD_MEM_BTREE] = H5FD_MEM_BTREE;
memb_map[H5FD_MEM_GHEAP] = H5FD_MEM_GHEAP;
- HDsnprintf(sv[H5FD_MEM_SUPER], 32, "%%s-%c.h5", 's');
+ snprintf(sv[H5FD_MEM_SUPER], 32, "%%s-%c.h5", 's');
memb_name[H5FD_MEM_SUPER] = sv[H5FD_MEM_SUPER];
memb_addr[H5FD_MEM_SUPER] = 0;
- HDsnprintf(sv[H5FD_MEM_BTREE], 32, "%%s-%c.h5", 'b');
+ snprintf(sv[H5FD_MEM_BTREE], 32, "%%s-%c.h5", 'b');
memb_name[H5FD_MEM_BTREE] = sv[H5FD_MEM_BTREE];
memb_addr[H5FD_MEM_BTREE] = HADDR_MAX / 4;
- HDsnprintf(sv[H5FD_MEM_DRAW], 32, "%%s-%c.h5", 'r');
+ snprintf(sv[H5FD_MEM_DRAW], 32, "%%s-%c.h5", 'r');
memb_name[H5FD_MEM_DRAW] = sv[H5FD_MEM_DRAW];
memb_addr[H5FD_MEM_DRAW] = HADDR_MAX / 2;
- HDsnprintf(sv[H5FD_MEM_GHEAP], 32, "%%s-%c.h5", 'g');
+ snprintf(sv[H5FD_MEM_GHEAP], 32, "%%s-%c.h5", 'g');
memb_name[H5FD_MEM_GHEAP] = sv[H5FD_MEM_GHEAP];
memb_addr[H5FD_MEM_GHEAP] = (HADDR_MAX / 4) * 3;
- if (H5Pset_fapl_multi(fapl, memb_map, memb_fapl, memb_name, memb_addr, TRUE) < 0)
+ if (H5Pset_fapl_multi(fapl, memb_map, memb_fapl, memb_name, memb_addr, true) < 0)
TEST_ERROR;
h5_fixname(FILENAME[4], fapl, filename, sizeof filename);
@@ -1638,7 +1641,7 @@ test_multi(void)
if ((atype = H5Tcopy(H5T_C_S1)) < 0)
TEST_ERROR;
- if (H5Tset_size(atype, HDstrlen(meta) + 1) < 0)
+ if (H5Tset_size(atype, strlen(meta) + 1) < 0)
TEST_ERROR;
if (H5Tset_strpad(atype, H5T_STR_NULLTERM) < 0)
@@ -1716,10 +1719,10 @@ test_multi(void)
static herr_t
test_multi_compat(void)
{
- hid_t file = -1, fapl = -1, dset = -1, space = -1;
- char newname[1024];
- char filename_s[1024], newname_s[1024];
- char filename_r[1024], newname_r[1024];
+ hid_t file = H5I_INVALID_HID, fapl = H5I_INVALID_HID, dset = H5I_INVALID_HID, space = H5I_INVALID_HID;
+ char newname[1024];
+ char filename_s[1024], newname_s[1024];
+ char filename_r[1024], newname_r[1024];
H5FD_mem_t mt, memb_map[H5FD_MEM_NTYPES];
hid_t memb_fapl[H5FD_MEM_NTYPES];
haddr_t memb_addr[H5FD_MEM_NTYPES];
@@ -1755,16 +1758,16 @@ test_multi_compat(void)
memb_map[H5FD_MEM_DRAW] = H5FD_MEM_DRAW;
memb_fapl[H5FD_MEM_SUPER] = H5P_DEFAULT;
- HDsnprintf(sv[H5FD_MEM_SUPER], 32, "%%s-%c.h5", 's');
+ snprintf(sv[H5FD_MEM_SUPER], 32, "%%s-%c.h5", 's');
memb_name[H5FD_MEM_SUPER] = sv[H5FD_MEM_SUPER];
memb_addr[H5FD_MEM_SUPER] = 0;
memb_fapl[H5FD_MEM_DRAW] = H5P_DEFAULT;
- HDsnprintf(sv[H5FD_MEM_DRAW], 32, "%%s-%c.h5", 'r');
+ snprintf(sv[H5FD_MEM_DRAW], 32, "%%s-%c.h5", 'r');
memb_name[H5FD_MEM_DRAW] = sv[H5FD_MEM_DRAW];
memb_addr[H5FD_MEM_DRAW] = HADDR_MAX / 2;
- if (H5Pset_fapl_multi(fapl, memb_map, memb_fapl, memb_name, memb_addr, TRUE) < 0)
+ if (H5Pset_fapl_multi(fapl, memb_map, memb_fapl, memb_name, memb_addr, true) < 0)
TEST_ERROR;
h5_fixname(FILENAME[9], fapl, newname, sizeof newname);
@@ -1772,12 +1775,12 @@ test_multi_compat(void)
/* Make copy for the data file in the build directory, to protect the
* original file in the source directory
*/
- HDsnprintf(filename_s, sizeof(filename_s), "%s-%c.h5", MULTI_COMPAT_BASENAME, 's');
- HDsnprintf(newname_s, sizeof(newname_s), "%s-%c.h5", FILENAME[9], 's');
+ snprintf(filename_s, sizeof(filename_s), "%s-%c.h5", MULTI_COMPAT_BASENAME, 's');
+ snprintf(newname_s, sizeof(newname_s), "%s-%c.h5", FILENAME[9], 's');
h5_make_local_copy(filename_s, newname_s);
- HDsnprintf(filename_r, sizeof(filename_r), "%s-%c.h5", MULTI_COMPAT_BASENAME, 'r');
- HDsnprintf(newname_r, sizeof(newname_r), "%s-%c.h5", FILENAME[9], 'r');
+ snprintf(filename_r, sizeof(filename_r), "%s-%c.h5", MULTI_COMPAT_BASENAME, 'r');
+ snprintf(newname_r, sizeof(newname_r), "%s-%c.h5", FILENAME[9], 'r');
h5_make_local_copy(filename_r, newname_r);
/* Reopen the file for read only. Verify 1.8 library can open file
@@ -1898,11 +1901,11 @@ test_multi_compat(void)
static herr_t
test_log(void)
{
- hid_t file = -1;
- hid_t fapl = -1;
- hid_t access_fapl = -1;
- hid_t driver_id = -1; /* ID for this VFD */
- unsigned long driver_flags = 0; /* VFD feature flags */
+ hid_t file = H5I_INVALID_HID;
+ hid_t fapl = H5I_INVALID_HID;
+ hid_t access_fapl = H5I_INVALID_HID;
+ hid_t driver_id = H5I_INVALID_HID; /* ID for this VFD */
+ unsigned long driver_flags = 0; /* VFD feature flags */
char filename[1024];
int *fhandle = NULL;
hsize_t file_size = 0;
@@ -2021,11 +2024,11 @@ test_log(void)
static herr_t
test_stdio(void)
{
- hid_t file = -1;
- hid_t fapl = -1;
- hid_t access_fapl = -1;
- hid_t driver_id = -1; /* ID for this VFD */
- unsigned long driver_flags = 0; /* VFD feature flags */
+ hid_t file = H5I_INVALID_HID;
+ hid_t fapl = H5I_INVALID_HID;
+ hid_t access_fapl = H5I_INVALID_HID;
+ hid_t driver_id = H5I_INVALID_HID; /* ID for this VFD */
+ unsigned long driver_flags = 0; /* VFD feature flags */
char filename[1024];
FILE *fhandle = NULL;
hsize_t file_size = 0;
@@ -2127,11 +2130,11 @@ test_windows(void)
{
#ifdef H5_HAVE_WINDOWS
- hid_t file = -1;
- hid_t fapl = -1;
- hid_t access_fapl = -1;
- hid_t driver_id = -1; /* ID for this VFD */
- unsigned long driver_flags = 0; /* VFD feature flags */
+ hid_t file = H5I_INVALID_HID;
+ hid_t fapl = H5I_INVALID_HID;
+ hid_t access_fapl = H5I_INVALID_HID;
+ hid_t driver_id = H5I_INVALID_HID; /* ID for this VFD */
+ unsigned long driver_flags = 0; /* VFD feature flags */
char filename[1024];
int *fhandle = NULL;
hsize_t file_size = 0;
@@ -2255,16 +2258,16 @@ static herr_t
test_ros3(void)
{
#ifdef H5_HAVE_ROS3_VFD
- hid_t fid = -1; /* file ID */
- hid_t fapl_id = -1; /* file access property list ID */
- hid_t fapl_id_out = -1; /* from H5Fget_access_plist */
- hid_t driver_id = -1; /* ID for this VFD */
- unsigned long driver_flags = 0; /* VFD feature flags */
- char filename[1024]; /* filename */
+ hid_t fid = H5I_INVALID_HID; /* file ID */
+ hid_t fapl_id = H5I_INVALID_HID; /* file access property list ID */
+ hid_t fapl_id_out = H5I_INVALID_HID; /* from H5Fget_access_plist */
+ hid_t driver_id = H5I_INVALID_HID; /* ID for this VFD */
+ unsigned long driver_flags = 0; /* VFD feature flags */
+ char filename[1024]; /* filename */
H5FD_ros3_fapl_t test_ros3_fa;
H5FD_ros3_fapl_t ros3_fa_0 = {
/* version = */ H5FD_CURR_ROS3_FAPL_T_VERSION,
- /* authenticate = */ FALSE,
+ /* authenticate = */ false,
/* aws_region = */ "",
/* secret_id = */ "",
/* secret_key = */ "plugh",
@@ -2292,9 +2295,9 @@ test_ros3(void)
/* need a macro to compare instances of H5FD_ros3_fapl_t */
if ((test_ros3_fa.version != ros3_fa_0.version) ||
(test_ros3_fa.authenticate != ros3_fa_0.authenticate) ||
- (HDstrcmp(test_ros3_fa.aws_region, ros3_fa_0.aws_region) != 0) ||
- (HDstrcmp(test_ros3_fa.secret_id, ros3_fa_0.secret_id) != 0) ||
- (HDstrcmp(test_ros3_fa.secret_key, ros3_fa_0.secret_key) != 0))
+ (strcmp(test_ros3_fa.aws_region, ros3_fa_0.aws_region) != 0) ||
+ (strcmp(test_ros3_fa.secret_id, ros3_fa_0.secret_id) != 0) ||
+ (strcmp(test_ros3_fa.secret_key, ros3_fa_0.secret_key) != 0))
TEST_ERROR;
h5_fixname(FILENAME[10], fapl_id, filename, sizeof(filename));
@@ -2396,8 +2399,8 @@ compare_splitter_config_info(hid_t fapl_id, H5FD_splitter_vfd_config_t *info)
SPLITTER_TEST_FAULT("Write-Only driver mismatch\n");
}
}
- if ((HDstrlen(info->wo_path) != HDstrlen(fetched_info->wo_path)) ||
- HDstrncmp(info->wo_path, fetched_info->wo_path, H5FD_SPLITTER_PATH_MAX) != 0) {
+ if ((strlen(info->wo_path) != strlen(fetched_info->wo_path)) ||
+ strncmp(info->wo_path, fetched_info->wo_path, H5FD_SPLITTER_PATH_MAX) != 0) {
fprintf(stderr, "MISMATCH: '%s' :: '%s'\n", info->wo_path, fetched_info->wo_path);
HEXPRINT(H5FD_SPLITTER_PATH_MAX, info->wo_path);
HEXPRINT(H5FD_SPLITTER_PATH_MAX, fetched_info->wo_path);
@@ -2428,8 +2431,8 @@ compare_splitter_config_info(hid_t fapl_id, H5FD_splitter_vfd_config_t *info)
*-------------------------------------------------------------------------
*/
static int
-run_splitter_test(const struct splitter_dataset_def *data, hbool_t ignore_wo_errors,
- hbool_t provide_logfile_path, const hid_t sub_fapl_ids[2])
+run_splitter_test(const struct splitter_dataset_def *data, bool ignore_wo_errors, bool provide_logfile_path,
+ const hid_t sub_fapl_ids[2])
{
hid_t file_id = H5I_INVALID_HID;
hid_t fapl_id = H5I_INVALID_HID;
@@ -2457,7 +2460,7 @@ run_splitter_test(const struct splitter_dataset_def *data, hbool_t ignore_wo_err
SPLITTER_TEST_FAULT("can't prepare file paths\n");
}
- if (provide_logfile_path == FALSE) {
+ if (provide_logfile_path == false) {
vfd_config->log_file_path[0] = '\0'; /* reset as empty string */
}
@@ -2556,8 +2559,8 @@ run_splitter_test(const struct splitter_dataset_def *data, hbool_t ignore_wo_err
/* Verify existence of logfile if appropriate */
logfile = fopen(vfd_config->log_file_path, "r");
- if ((TRUE == provide_logfile_path && NULL == logfile) ||
- (FALSE == provide_logfile_path && NULL != logfile)) {
+ if ((true == provide_logfile_path && NULL == logfile) ||
+ (false == provide_logfile_path && NULL != logfile)) {
SPLITTER_TEST_FAULT("no logfile when one was expected\n");
}
@@ -2616,10 +2619,10 @@ driver_is_splitter_compatible(hid_t fapl_id)
}
vfd_config->magic = H5FD_SPLITTER_MAGIC;
vfd_config->version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
- vfd_config->ignore_wo_errs = FALSE;
+ vfd_config->ignore_wo_errs = false;
vfd_config->rw_fapl_id = H5P_DEFAULT;
vfd_config->wo_fapl_id = fapl_id;
- HDstrncpy(vfd_config->wo_path, "nonesuch", H5FD_SPLITTER_PATH_MAX);
+ strncpy(vfd_config->wo_path, "nonesuch", H5FD_SPLITTER_PATH_MAX);
vfd_config->log_file_path[0] = '\0';
H5E_BEGIN_TRY
@@ -2681,7 +2684,7 @@ splitter_RO_test(const struct splitter_dataset_def *data, hid_t child_fapl_id)
vfd_config->magic = H5FD_SPLITTER_MAGIC;
vfd_config->version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
- vfd_config->ignore_wo_errs = FALSE;
+ vfd_config->ignore_wo_errs = false;
vfd_config->rw_fapl_id = child_fapl_id;
vfd_config->wo_fapl_id = child_fapl_id;
@@ -3044,7 +3047,7 @@ splitter_tentative_open_test(hid_t child_fapl_id)
vfd_config->magic = H5FD_SPLITTER_MAGIC;
vfd_config->version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
- vfd_config->ignore_wo_errs = FALSE;
+ vfd_config->ignore_wo_errs = false;
vfd_config->rw_fapl_id = child_fapl_id;
vfd_config->wo_fapl_id = child_fapl_id;
@@ -3393,9 +3396,9 @@ test_splitter(void)
* specified), logfile, and Write Channel error ignoring behavior.
*/
for (i = 0; i < 4; i++) {
- hbool_t ignore_wo_errors = (i & 1) ? TRUE : FALSE;
- hbool_t provide_logfile_path = (i & 2) ? TRUE : FALSE;
- hid_t child_fapl_ids[2] = {H5P_DEFAULT, H5P_DEFAULT};
+ bool ignore_wo_errors = (i & 1) ? true : false;
+ bool provide_logfile_path = (i & 2) ? true : false;
+ hid_t child_fapl_ids[2] = {H5P_DEFAULT, H5P_DEFAULT};
/* Test child driver definition/default combination */
for (j = 0; j < 4; j++) {
@@ -3446,7 +3449,7 @@ test_splitter(void)
static void
setup_rand(void)
{
- hbool_t use_predefined_seed = FALSE;
+ bool use_predefined_seed = false;
unsigned predefined_seed = 18669;
unsigned seed;
struct timeval tv;
@@ -3604,10 +3607,10 @@ static const H5FD_class_t H5FD_ctl_test_vfd_g = {
static herr_t
run_ctl_test(uint64_t op_code, uint64_t flags, ctl_test_opc_type opc_type, hid_t fapl_id)
{
- hbool_t fail_if_unknown = FALSE;
- hbool_t routing_flag_set = FALSE;
- hbool_t is_passthrough_vfd = FALSE;
- hbool_t expect_fail = FALSE;
+ bool fail_if_unknown = false;
+ bool routing_flag_set = false;
+ bool is_passthrough_vfd = false;
+ bool expect_fail = false;
H5FD_t *file_drv_ptr = NULL;
herr_t ctl_result = SUCCEED;
hid_t driver_id = H5I_INVALID_HID;
@@ -3702,7 +3705,7 @@ test_ctl(void)
hid_t sub_fapl_id = H5I_INVALID_HID;
TESTING("VFD ctl callback");
- HDputs("");
+ puts("");
/* Register VFD for test */
if ((driver_id = H5FDregister(&H5FD_ctl_test_vfd_g)) < 0)
@@ -3807,7 +3810,7 @@ test_ctl(void)
splitter_config->magic = H5FD_SPLITTER_MAGIC;
splitter_config->version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
- splitter_config->ignore_wo_errs = TRUE;
+ splitter_config->ignore_wo_errs = true;
splitter_config->rw_fapl_id = H5P_DEFAULT;
splitter_config->wo_fapl_id = H5P_DEFAULT;
h5_fixname(FILENAME[15], splitter_config->wo_fapl_id, splitter_config->wo_path, H5FD_SPLITTER_PATH_MAX);
@@ -3992,17 +3995,17 @@ test_ctl(void)
* All arrays parameters are presumed to be of length
* count.
*
- * Return: Return TRUE if successful, and FALSE if any errors
+ * Return: Return true if successful, and false if any errors
* are encountered.
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
test_vector_io__setup_v(uint32_t count, H5FD_mem_t types[], haddr_t addrs[], size_t sizes[],
const void *write_bufs[], void *read_bufs[], char base_fill_char)
{
- hbool_t result = TRUE; /* will set to FALSE on failure */
+ bool result = true; /* will set to false on failure */
char fill_char = base_fill_char;
void *temp_buf = NULL;
uint32_t i;
@@ -4032,7 +4035,7 @@ test_vector_io__setup_v(uint32_t count, H5FD_mem_t types[], haddr_t addrs[], siz
if ((NULL == temp_buf) || (NULL == read_bufs[i])) {
fprintf(stderr, "%s: can't malloc read / write bufs.\n", __func__);
- result = FALSE;
+ result = false;
break;
}
@@ -4091,17 +4094,17 @@ test_vector_io__setup_v(uint32_t count, H5FD_mem_t types[], haddr_t addrs[], siz
* count. Count is presumed to be a power of 2, and at
* least 2.
*
- * Return: Return TRUE if successful, and FALSE if any errors
+ * Return: Return true if successful, and false if any errors
* are encountered.
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
test_vector_io__setup_fixed_size_v(uint32_t count, H5FD_mem_t types[], haddr_t addrs[], size_t sizes[],
const void *write_bufs[], void *read_bufs[], char base_fill_char)
{
- hbool_t result = TRUE; /* will set to FALSE on failure */
+ bool result = true; /* will set to false on failure */
char fill_char = base_fill_char;
void *temp_buf = NULL;
uint32_t fix_point;
@@ -4166,7 +4169,7 @@ test_vector_io__setup_fixed_size_v(uint32_t count, H5FD_mem_t types[], haddr_t a
if ((NULL == temp_buf) || (NULL == read_bufs[i])) {
fprintf(stderr, "%s: can't malloc read / write bufs.\n", __func__);
- result = FALSE;
+ result = false;
break;
}
@@ -4221,20 +4224,20 @@ test_vector_io__setup_fixed_size_v(uint32_t count, H5FD_mem_t types[], haddr_t a
* All arrays parameters are presumed to be of length
* count.
*
- * Return: Return TRUE if successful, and FALSE if any errors
+ * Return: Return true if successful, and false if any errors
* are encountered.
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
test_vector_io__read_v_indiv(H5FD_t *lf, uint32_t count, H5FD_mem_t types[], haddr_t addrs[], size_t sizes[],
void *read_bufs[])
{
- hbool_t size_fixed = FALSE;
- hbool_t type_fixed = FALSE;
- hbool_t result = TRUE; /* will set to FALSE on failure */
- hbool_t verbose = FALSE;
+ bool size_fixed = false;
+ bool type_fixed = false;
+ bool result = true; /* will set to false on failure */
+ bool verbose = false;
uint32_t i;
size_t size = SIZE_MAX;
H5FD_mem_t type = H5FD_MEM_NTYPES;
@@ -4251,7 +4254,7 @@ test_vector_io__read_v_indiv(H5FD_t *lf, uint32_t count, H5FD_mem_t types[], had
fprintf(stdout, "%s: H5FDread() failed on entry %d.\n", __func__, i);
}
- result = FALSE;
+ result = false;
break;
}
}
@@ -4269,20 +4272,20 @@ test_vector_io__read_v_indiv(H5FD_t *lf, uint32_t count, H5FD_mem_t types[], had
* All arrays parameters are presumed to be of length
* count.
*
- * Return: Return TRUE if successful, and FALSE if any errors
+ * Return: Return true if successful, and false if any errors
* are encountered.
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
test_vector_io__write_v_indiv(H5FD_t *lf, uint32_t count, H5FD_mem_t types[], haddr_t addrs[], size_t sizes[],
const void *write_bufs[])
{
- hbool_t size_fixed = FALSE;
- hbool_t type_fixed = FALSE;
- hbool_t result = TRUE; /* will set to FALSE on failure */
- hbool_t verbose = FALSE;
+ bool size_fixed = false;
+ bool type_fixed = false;
+ bool result = true; /* will set to false on failure */
+ bool verbose = false;
uint32_t i;
size_t size = SIZE_MAX;
H5FD_mem_t type = H5FD_MEM_NTYPES;
@@ -4299,7 +4302,7 @@ test_vector_io__write_v_indiv(H5FD_t *lf, uint32_t count, H5FD_mem_t types[], ha
fprintf(stdout, "%s: HDwrite() failed on entry %d.\n", __func__, i);
}
- result = FALSE;
+ result = false;
break;
}
}
@@ -4315,20 +4318,20 @@ test_vector_io__write_v_indiv(H5FD_t *lf, uint32_t count, H5FD_mem_t types[], ha
* Purpose: Verify that the read and write buffers of the supplied
* vectors are identical.
*
- * Return: TRUE if the read and write vectors are identical, and
- * FALSE otherwise.
+ * Return: true if the read and write vectors are identical, and
+ * false otherwise.
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
test_vector_io__verify_v(uint32_t count, H5FD_mem_t types[], size_t sizes[], const void *write_bufs[],
void *read_bufs[], const char *name)
{
- hbool_t size_fixed = FALSE;
- hbool_t type_fixed = FALSE;
- hbool_t identical = TRUE;
- hbool_t verbose = TRUE;
+ bool size_fixed = false;
+ bool type_fixed = false;
+ bool identical = true;
+ bool verbose = true;
uint32_t i;
size_t j;
const char *w_buf;
@@ -4354,7 +4357,7 @@ test_vector_io__verify_v(uint32_t count, H5FD_mem_t types[], size_t sizes[], con
if (w_buf[j] != r_buf[j]) {
- identical = FALSE;
+ identical = false;
if (verbose) {
@@ -4391,8 +4394,8 @@ static void
test_vector_io__dump_test_vectors(uint32_t count, H5FD_mem_t types[], haddr_t addrs[], size_t sizes[],
const void *write_bufs[], void *read_bufs[], const char *name)
{
- hbool_t size_fixed = FALSE;
- hbool_t type_fixed = FALSE;
+ bool size_fixed = false;
+ bool type_fixed = false;
uint32_t i;
const char *mem_type_names[7] = {"H5FD_MEM_DEFAULT", "H5FD_MEM_SUPER", "H5FD_MEM_BTREE", "H5FD_MEM_DRAW",
"H5FD_MEM_GHEAP", "H5FD_MEM_LHEAP", "H5FD_MEM_OHDR"};
@@ -4463,60 +4466,60 @@ static herr_t
test_vector_io(const char *vfd_name)
{
char test_title[80];
- hbool_t size_fixed_0 = FALSE; /* whether remaining entry */
- hbool_t size_fixed_1 = FALSE; /* sizes in vector are fixed. */
- hbool_t size_fixed_2 = FALSE; /* */
- hbool_t type_fixed_0 = FALSE; /* whether remaining entry */
- hbool_t type_fixed_1 = FALSE; /* types in vector are fixed. */
- hbool_t type_fixed_2 = FALSE; /* */
- hbool_t verbose = FALSE;
- hid_t fapl_id = -1; /* file access property list ID */
- haddr_t eoa; /* file eoa */
- char filename[1024]; /* filename */
- char *buf; /* tmp ptr to buf */
- unsigned flags = 0; /* file open flags */
- H5FD_t *lf = NULL; /* VFD struct ptr */
- uint32_t i; /* index */
- uint32_t j; /* index */
- uint32_t count = VECTOR_LEN; /* length of vectors */
- H5FD_mem_t types_0[VECTOR_LEN]; /* types vector */
- H5FD_mem_t types_1[VECTOR_LEN]; /* types vector */
- H5FD_mem_t types_2[VECTOR_LEN]; /* types vector */
- H5FD_mem_t f_types_0[VECTOR_LEN]; /* fixed types vector */
- H5FD_mem_t f_types_1[VECTOR_LEN]; /* fixed types vector */
- H5FD_mem_t f_types_2[VECTOR_LEN]; /* fixed types vector */
- H5FD_mem_t f_type_0 = H5FD_MEM_NTYPES; /* current type for f vector 0 */
- H5FD_mem_t f_type_1 = H5FD_MEM_NTYPES; /* current type for f vector 1 */
- H5FD_mem_t f_type_2 = H5FD_MEM_NTYPES; /* current type for f vector 2 */
- haddr_t addrs_0[VECTOR_LEN]; /* addresses vector */
- haddr_t addrs_1[VECTOR_LEN]; /* addresses vector */
- haddr_t addrs_2[VECTOR_LEN]; /* addresses vector */
- haddr_t f_addrs_0[VECTOR_LEN]; /* fixed addresses vector */
- haddr_t f_addrs_1[VECTOR_LEN]; /* fixed addresses vector */
- haddr_t f_addrs_2[VECTOR_LEN]; /* fixed addresses vector */
- size_t sizes_0[VECTOR_LEN]; /* sizes vector */
- size_t sizes_1[VECTOR_LEN]; /* sizes vector */
- size_t sizes_2[VECTOR_LEN]; /* sizes vector */
- size_t f_sizes_0[VECTOR_LEN]; /* fixed sizes vector */
- size_t f_sizes_1[VECTOR_LEN]; /* fixed sizes vector */
- size_t f_sizes_2[VECTOR_LEN]; /* fixed sizes vector */
- size_t f_size_0 = 0; /* current size for f vector 0 */
- size_t f_size_1 = 0; /* current size for f vector 1 */
- size_t f_size_2 = 0; /* current size for f vector 2 */
- const void *write_bufs_0[VECTOR_LEN]; /* write bufs vector */
- const void *write_bufs_1[VECTOR_LEN]; /* write bufs vector */
- const void *write_bufs_2[VECTOR_LEN]; /* write bufs vector */
- const void *f_write_bufs_0[VECTOR_LEN]; /* fixed write bufs vector */
- const void *f_write_bufs_1[VECTOR_LEN]; /* fixed write bufs vector */
- const void *f_write_bufs_2[VECTOR_LEN]; /* fixed write bufs vector */
- void *read_bufs_0[VECTOR_LEN]; /* read bufs vector */
- void *read_bufs_1[VECTOR_LEN]; /* read bufs vector */
- void *read_bufs_2[VECTOR_LEN]; /* read bufs vector */
- void *f_read_bufs_0[VECTOR_LEN]; /* fixed read bufs vector */
- void *f_read_bufs_1[VECTOR_LEN]; /* fixed read bufs vector */
- void *f_read_bufs_2[VECTOR_LEN]; /* fixed read bufs vector */
-
- HDsnprintf(test_title, sizeof(test_title), "vector I/O with %s VFD", vfd_name);
+ bool size_fixed_0 = false; /* whether remaining entry */
+ bool size_fixed_1 = false; /* sizes in vector are fixed. */
+ bool size_fixed_2 = false; /* */
+ bool type_fixed_0 = false; /* whether remaining entry */
+ bool type_fixed_1 = false; /* types in vector are fixed. */
+ bool type_fixed_2 = false; /* */
+ bool verbose = false;
+ hid_t fapl_id = H5I_INVALID_HID; /* file access property list ID */
+ haddr_t eoa; /* file eoa */
+ char filename[1024]; /* filename */
+ char *buf; /* tmp ptr to buf */
+ unsigned flags = 0; /* file open flags */
+ H5FD_t *lf = NULL; /* VFD struct ptr */
+ uint32_t i; /* index */
+ uint32_t j; /* index */
+ uint32_t count = VECTOR_LEN; /* length of vectors */
+ H5FD_mem_t types_0[VECTOR_LEN]; /* types vector */
+ H5FD_mem_t types_1[VECTOR_LEN]; /* types vector */
+ H5FD_mem_t types_2[VECTOR_LEN]; /* types vector */
+ H5FD_mem_t f_types_0[VECTOR_LEN]; /* fixed types vector */
+ H5FD_mem_t f_types_1[VECTOR_LEN]; /* fixed types vector */
+ H5FD_mem_t f_types_2[VECTOR_LEN]; /* fixed types vector */
+ H5FD_mem_t f_type_0 = H5FD_MEM_NTYPES; /* current type for f vector 0 */
+ H5FD_mem_t f_type_1 = H5FD_MEM_NTYPES; /* current type for f vector 1 */
+ H5FD_mem_t f_type_2 = H5FD_MEM_NTYPES; /* current type for f vector 2 */
+ haddr_t addrs_0[VECTOR_LEN]; /* addresses vector */
+ haddr_t addrs_1[VECTOR_LEN]; /* addresses vector */
+ haddr_t addrs_2[VECTOR_LEN]; /* addresses vector */
+ haddr_t f_addrs_0[VECTOR_LEN]; /* fixed addresses vector */
+ haddr_t f_addrs_1[VECTOR_LEN]; /* fixed addresses vector */
+ haddr_t f_addrs_2[VECTOR_LEN]; /* fixed addresses vector */
+ size_t sizes_0[VECTOR_LEN]; /* sizes vector */
+ size_t sizes_1[VECTOR_LEN]; /* sizes vector */
+ size_t sizes_2[VECTOR_LEN]; /* sizes vector */
+ size_t f_sizes_0[VECTOR_LEN]; /* fixed sizes vector */
+ size_t f_sizes_1[VECTOR_LEN]; /* fixed sizes vector */
+ size_t f_sizes_2[VECTOR_LEN]; /* fixed sizes vector */
+ size_t f_size_0 = 0; /* current size for f vector 0 */
+ size_t f_size_1 = 0; /* current size for f vector 1 */
+ size_t f_size_2 = 0; /* current size for f vector 2 */
+ const void *write_bufs_0[VECTOR_LEN]; /* write bufs vector */
+ const void *write_bufs_1[VECTOR_LEN]; /* write bufs vector */
+ const void *write_bufs_2[VECTOR_LEN]; /* write bufs vector */
+ const void *f_write_bufs_0[VECTOR_LEN]; /* fixed write bufs vector */
+ const void *f_write_bufs_1[VECTOR_LEN]; /* fixed write bufs vector */
+ const void *f_write_bufs_2[VECTOR_LEN]; /* fixed write bufs vector */
+ void *read_bufs_0[VECTOR_LEN]; /* read bufs vector */
+ void *read_bufs_1[VECTOR_LEN]; /* read bufs vector */
+ void *read_bufs_2[VECTOR_LEN]; /* read bufs vector */
+ void *f_read_bufs_0[VECTOR_LEN]; /* fixed read bufs vector */
+ void *f_read_bufs_1[VECTOR_LEN]; /* fixed read bufs vector */
+ void *f_read_bufs_2[VECTOR_LEN]; /* fixed read bufs vector */
+
+ snprintf(test_title, sizeof(test_title), "vector I/O with %s VFD", vfd_name);
TESTING(test_title);
@@ -4525,14 +4528,14 @@ test_vector_io(const char *vfd_name)
if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0)
TEST_ERROR;
- if (HDstrcmp(vfd_name, "sec2") == 0) {
+ if (strcmp(vfd_name, "sec2") == 0) {
if (H5Pset_fapl_sec2(fapl_id) < 0)
TEST_ERROR;
h5_fixname(FILENAME[0], fapl_id, filename, sizeof(filename));
}
- else if (HDstrcmp(vfd_name, "stdio") == 0) {
+ else if (strcmp(vfd_name, "stdio") == 0) {
if (H5Pset_fapl_stdio(fapl_id) < 0)
TEST_ERROR;
@@ -4741,9 +4744,9 @@ test_vector_io(const char *vfd_name)
/* Null the read vectors */
- size_fixed_0 = FALSE;
- size_fixed_1 = FALSE;
- size_fixed_2 = FALSE;
+ size_fixed_0 = false;
+ size_fixed_1 = false;
+ size_fixed_2 = false;
for (i = 0; i < count; i++) {
@@ -4889,8 +4892,8 @@ test_vector_io(const char *vfd_name)
* Purpose: Updates write buffers to ensure a unique value is written
* to each element and issues a selection write call.
*
- * Return: Success: TRUE
- * Failure: FALSE
+ * Return: Success: true
+ * Failure: false
*-------------------------------------------------------------------------
*/
/* Array dimensions, used for all selection I/O tests. Currently both must be
@@ -4939,15 +4942,15 @@ test_selection_io_write(H5FD_t *lf, H5FD_mem_t type, uint32_t count, hid_t mem_s
* count the last element in erbufs will be repeated to make
* up the difference.
*
- * Return: Success: TRUE
- * Failure: FALSE
+ * Return: Success: true
+ * Failure: false
*
*-------------------------------------------------------------------------
*/
static herr_t
test_selection_io_read_verify(H5FD_t *lf, H5FD_mem_t type, uint32_t count, hid_t mem_spaces[],
hid_t file_spaces[], haddr_t offsets[], size_t element_sizes[],
- uint32_t rbufcount, int *erbufs[], hbool_t shorten_rbufs)
+ uint32_t rbufcount, int *erbufs[], bool shorten_rbufs)
{
int rbuf1[SEL_IO_DIM0 * SEL_IO_DIM1];
int rbuf2[SEL_IO_DIM0 * SEL_IO_DIM1];
@@ -5019,7 +5022,7 @@ static herr_t
test_selection_io(const char *vfd_name)
{
char test_title[80];
- hid_t fapl_id = -1; /* file access property list ID */
+ hid_t fapl_id = H5I_INVALID_HID; /* file access property list ID */
char filename[1024]; /* filename */
unsigned flags = 0; /* file open flags */
H5FD_t *lf = NULL; /* VFD struct ptr */
@@ -5049,7 +5052,7 @@ test_selection_io(const char *vfd_name)
int *erbufs[2] = {erbuf1, erbuf2[0]}; /* Array of expected read buffers */
int shorten_element_sizes; /* Whether to shorten the element sizes array */
- HDsnprintf(test_title, sizeof(test_title), "selection I/O with %s VFD", vfd_name);
+ snprintf(test_title, sizeof(test_title), "selection I/O with %s VFD", vfd_name);
TESTING(test_title);
@@ -5058,14 +5061,14 @@ test_selection_io(const char *vfd_name)
if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0)
TEST_ERROR;
- if (HDstrcmp(vfd_name, "sec2") == 0) {
+ if (strcmp(vfd_name, "sec2") == 0) {
if (H5Pset_fapl_sec2(fapl_id) < 0)
TEST_ERROR;
h5_fixname(FILENAME[0], fapl_id, filename, sizeof(filename));
}
- else if (HDstrcmp(vfd_name, "stdio") == 0) {
+ else if (strcmp(vfd_name, "stdio") == 0) {
if (H5Pset_fapl_stdio(fapl_id) < 0)
TEST_ERROR;
@@ -5121,7 +5124,7 @@ test_selection_io(const char *vfd_name)
/* Read and verify */
if (test_selection_io_read_verify(lf, type, 1, &mem_spaces[0], &file_spaces[0], &addrs[0],
- element_sizes, 1, (int **)&fbufs[0], FALSE) < 0)
+ element_sizes, 1, (int **)&fbufs[0], false) < 0)
TEST_ERROR;
/*
@@ -5139,7 +5142,7 @@ test_selection_io(const char *vfd_name)
/* Read and verify */
if (test_selection_io_read_verify(lf, type, 1, &mem_spaces[1], &file_spaces[1], &addrs[1],
- element_sizes, 1, (int **)&fbufs[1], FALSE) < 0)
+ element_sizes, 1, (int **)&fbufs[1], false) < 0)
TEST_ERROR;
/*
@@ -5177,7 +5180,7 @@ test_selection_io(const char *vfd_name)
/* Read and verify */
if (test_selection_io_read_verify(lf, type, 1, &mem_spaces[0], &file_spaces[0], &addrs[0],
- element_sizes, 1, (int **)&erbufs[0], FALSE) < 0)
+ element_sizes, 1, (int **)&erbufs[0], false) < 0)
TEST_ERROR;
/* Reset selections */
@@ -5188,7 +5191,7 @@ test_selection_io(const char *vfd_name)
/* Read entire file buffer and verify */
if (test_selection_io_read_verify(lf, type, 1, &mem_spaces[0], &file_spaces[0], &addrs[0],
- element_sizes, 1, (int **)&fbufs[0], FALSE) < 0)
+ element_sizes, 1, (int **)&fbufs[0], false) < 0)
TEST_ERROR;
/*
@@ -5226,7 +5229,7 @@ test_selection_io(const char *vfd_name)
/* Read and verify */
if (test_selection_io_read_verify(lf, type, 1, &mem_spaces[0], &file_spaces[0], &addrs[0],
- element_sizes, 1, (int **)&erbufs[0], FALSE) < 0)
+ element_sizes, 1, (int **)&erbufs[0], false) < 0)
TEST_ERROR;
/* Reset selections */
@@ -5237,7 +5240,7 @@ test_selection_io(const char *vfd_name)
/* Read entire file buffer and verify */
if (test_selection_io_read_verify(lf, type, 1, &mem_spaces[0], &file_spaces[0], &addrs[0],
- element_sizes, 1, (int **)&fbufs[0], FALSE) < 0)
+ element_sizes, 1, (int **)&fbufs[0], false) < 0)
TEST_ERROR;
/*
@@ -5276,7 +5279,7 @@ test_selection_io(const char *vfd_name)
/* Read and verify */
if (test_selection_io_read_verify(lf, type, 1, &mem_spaces[0], &file_spaces[0], &addrs[0],
- element_sizes, 1, (int **)&erbufs[0], FALSE) < 0)
+ element_sizes, 1, (int **)&erbufs[0], false) < 0)
TEST_ERROR;
/* Reset selections */
@@ -5287,7 +5290,7 @@ test_selection_io(const char *vfd_name)
/* Read entire file buffer and verify */
if (test_selection_io_read_verify(lf, type, 1, &mem_spaces[0], &file_spaces[0], &addrs[0],
- element_sizes, 1, (int **)&fbufs[0], FALSE) < 0)
+ element_sizes, 1, (int **)&fbufs[0], false) < 0)
TEST_ERROR;
/*
@@ -5329,7 +5332,7 @@ test_selection_io(const char *vfd_name)
/* Read and verify */
if (test_selection_io_read_verify(lf, type, 1, &mem_spaces[1], &file_spaces[1], &addrs[1],
- element_sizes, 1, (int **)&erbufs[1], FALSE) < 0)
+ element_sizes, 1, (int **)&erbufs[1], false) < 0)
TEST_ERROR;
/* Reset selections */
@@ -5340,7 +5343,7 @@ test_selection_io(const char *vfd_name)
/* Read entire file buffer and verify */
if (test_selection_io_read_verify(lf, type, 1, &mem_spaces[1], &file_spaces[1], &addrs[1],
- element_sizes, 1, (int **)&fbufs[1], FALSE) < 0)
+ element_sizes, 1, (int **)&fbufs[1], false) < 0)
TEST_ERROR;
/*
@@ -5382,7 +5385,7 @@ test_selection_io(const char *vfd_name)
/* Read and verify */
if (test_selection_io_read_verify(lf, type, 1, &mem_spaces[1], &file_spaces[1], &addrs[1],
- element_sizes, 1, (int **)&erbufs[1], FALSE) < 0)
+ element_sizes, 1, (int **)&erbufs[1], false) < 0)
TEST_ERROR;
/* Reset selections */
@@ -5393,7 +5396,7 @@ test_selection_io(const char *vfd_name)
/* Read entire file buffer and verify */
if (test_selection_io_read_verify(lf, type, 1, &mem_spaces[1], &file_spaces[1], &addrs[1],
- element_sizes, 1, (int **)&fbufs[1], FALSE) < 0)
+ element_sizes, 1, (int **)&fbufs[1], false) < 0)
TEST_ERROR;
/*
@@ -5453,7 +5456,7 @@ test_selection_io(const char *vfd_name)
/* Read and verify */
if (test_selection_io_read_verify(lf, type, 1, &mem_spaces[1], &file_spaces[1], &addrs[1],
- element_sizes, 1, (int **)&erbufs[1], FALSE) < 0)
+ element_sizes, 1, (int **)&erbufs[1], false) < 0)
TEST_ERROR;
/* Reset selections */
@@ -5464,7 +5467,7 @@ test_selection_io(const char *vfd_name)
/* Read entire file buffer and verify */
if (test_selection_io_read_verify(lf, type, 1, &mem_spaces[1], &file_spaces[1], &addrs[1],
- element_sizes, 1, (int **)&fbufs[1], FALSE) < 0)
+ element_sizes, 1, (int **)&fbufs[1], false) < 0)
TEST_ERROR;
/*
@@ -5514,7 +5517,7 @@ test_selection_io(const char *vfd_name)
/* Read and verify */
if (test_selection_io_read_verify(lf, type, 1, &mem_spaces[0], &file_spaces[1], &addrs[1],
- element_sizes, 1, (int **)&erbufs[0], FALSE) < 0)
+ element_sizes, 1, (int **)&erbufs[0], false) < 0)
TEST_ERROR;
/* Reset selections */
@@ -5525,7 +5528,7 @@ test_selection_io(const char *vfd_name)
/* Read entire file buffer and verify */
if (test_selection_io_read_verify(lf, type, 1, &mem_spaces[0], &file_spaces[1], &addrs[1],
- element_sizes, 1, (int **)&fbufs[1], FALSE) < 0)
+ element_sizes, 1, (int **)&fbufs[1], false) < 0)
TEST_ERROR;
/*
@@ -5574,7 +5577,7 @@ test_selection_io(const char *vfd_name)
/* Read and verify */
if (test_selection_io_read_verify(lf, type, 1, &mem_spaces[1], &file_spaces[0], &addrs[0],
- element_sizes, 1, (int **)&erbufs[1], FALSE) < 0)
+ element_sizes, 1, (int **)&erbufs[1], false) < 0)
TEST_ERROR;
/* Reset selections */
@@ -5585,7 +5588,7 @@ test_selection_io(const char *vfd_name)
/* Read entire file buffer and verify */
if (test_selection_io_read_verify(lf, type, 1, &mem_spaces[1], &file_spaces[0], &addrs[0],
- element_sizes, 1, (int **)&fbufs[0], FALSE) < 0)
+ element_sizes, 1, (int **)&fbufs[0], false) < 0)
TEST_ERROR;
/* Run tests with full and partial element sizes array */
@@ -5666,7 +5669,7 @@ test_selection_io(const char *vfd_name)
/* Read and verify */
if (test_selection_io_read_verify(lf, type, 2, mem_spaces, file_spaces, addrs, element_sizes, 2,
- (int **)erbufs, FALSE) < 0)
+ (int **)erbufs, false) < 0)
TEST_ERROR;
/* Reset selections */
@@ -5681,7 +5684,7 @@ test_selection_io(const char *vfd_name)
/* Read entire file buffer and verify */
if (test_selection_io_read_verify(lf, type, 2, mem_spaces, file_spaces, addrs, element_sizes, 2,
- (int **)fbufs, FALSE) < 0)
+ (int **)fbufs, false) < 0)
TEST_ERROR;
/*
@@ -5784,7 +5787,7 @@ test_selection_io(const char *vfd_name)
/* Read and verify */
if (test_selection_io_read_verify(lf, type, 2, mem_spaces, file_spaces, addrs, element_sizes, 1,
- (int **)&erbufs[1], shorten_element_sizes ? TRUE : FALSE) < 0)
+ (int **)&erbufs[1], shorten_element_sizes ? true : false) < 0)
TEST_ERROR;
/* Reset selections */
@@ -5799,7 +5802,7 @@ test_selection_io(const char *vfd_name)
/* Read entire file buffer and verify */
if (test_selection_io_read_verify(lf, type, 2, mem_spaces, file_spaces, addrs, element_sizes, 2,
- (int **)fbufs, FALSE) < 0)
+ (int **)fbufs, false) < 0)
TEST_ERROR;
/* Reset first spaces to 1D */
@@ -5877,7 +5880,7 @@ main(void)
* specific VFD to be set and HDF5_DRIVER being set can interfere
* with that.
*/
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr) {
printf(" -- SKIPPED VFD tests because %s is set -- \n", HDF5_DRIVER);
exit(EXIT_SUCCESS);
diff --git a/test/vfd_plugin.c b/test/vfd_plugin.c
index 28aa7697e76..8bfc09f07aa 100644
--- a/test/vfd_plugin.c
+++ b/test/vfd_plugin.c
@@ -42,7 +42,7 @@ test_set_by_name(void)
/* The null VFD should not be registered at the start of the test */
if ((is_registered = H5FDis_driver_registered_by_name(NULL_VFD_NAME)) < 0)
TEST_ERROR;
- if (TRUE == is_registered)
+ if (true == is_registered)
FAIL_PUTS_ERROR("NULL VFD is inappropriately registered");
/* Register the null VFD by name */
@@ -54,7 +54,7 @@ test_set_by_name(void)
/* The null VFD should be registered now */
if ((is_registered = H5FDis_driver_registered_by_name(NULL_VFD_NAME)) < 0)
TEST_ERROR;
- if (FALSE == is_registered)
+ if (false == is_registered)
FAIL_PUTS_ERROR("NULL VFD was not registered");
/* Unregister the null VFD */
@@ -70,7 +70,7 @@ test_set_by_name(void)
/* The null VFD should not be registered now */
if ((is_registered = H5FDis_driver_registered_by_name(NULL_VFD_NAME)) < 0)
TEST_ERROR;
- if (TRUE == is_registered)
+ if (true == is_registered)
FAIL_PUTS_ERROR("NULL VFD is inappropriately registered");
PASSED();
@@ -109,7 +109,7 @@ test_set_by_value(void)
/* The null VFD should not be registered at the start of the test */
if ((is_registered = H5FDis_driver_registered_by_value(NULL_VFD_VALUE)) < 0)
TEST_ERROR;
- if (TRUE == is_registered)
+ if (true == is_registered)
FAIL_PUTS_ERROR("NULL VFD is inappropriately registered");
/* Register the null VFD by value */
@@ -121,7 +121,7 @@ test_set_by_value(void)
/* The null VFD should be registered now */
if ((is_registered = H5FDis_driver_registered_by_value(NULL_VFD_VALUE)) < 0)
TEST_ERROR;
- if (FALSE == is_registered)
+ if (false == is_registered)
FAIL_PUTS_ERROR("NULL VFD was not registered");
/* Unregister the null VFD */
@@ -137,7 +137,7 @@ test_set_by_value(void)
/* The null VFD should not be registered now */
if ((is_registered = H5FDis_driver_registered_by_value(NULL_VFD_VALUE)) < 0)
TEST_ERROR;
- if (TRUE == is_registered)
+ if (true == is_registered)
FAIL_PUTS_ERROR("NULL VFD is inappropriately registered");
PASSED();
@@ -177,7 +177,7 @@ test_set_multi(void)
/* The null VFD should not be registered at the start of the test */
if ((is_registered = H5FDis_driver_registered_by_name(NULL_VFD_NAME)) < 0)
TEST_ERROR;
- if (TRUE == is_registered)
+ if (true == is_registered)
FAIL_PUTS_ERROR("NULL VFD is inappropriately registered");
/* Register the VFD multiple times */
@@ -191,7 +191,7 @@ test_set_multi(void)
/* The null VFD should be registered now */
if ((is_registered = H5FDis_driver_registered_by_name(NULL_VFD_NAME)) < 0)
TEST_ERROR;
- if (FALSE == is_registered)
+ if (false == is_registered)
FAIL_PUTS_ERROR("NULL VFD was not registered");
/* Unregister the null VFD */
@@ -209,7 +209,7 @@ test_set_multi(void)
/* The null VFD should not be registered now */
if ((is_registered = H5FDis_driver_registered_by_name(NULL_VFD_NAME)) < 0)
TEST_ERROR;
- if (TRUE == is_registered)
+ if (true == is_registered)
FAIL_PUTS_ERROR("NULL VFD is inappropriately registered");
/* Repeat testing with the _by_value routines */
@@ -217,7 +217,7 @@ test_set_multi(void)
/* The null VFD should not be registered at the start of the test */
if ((is_registered = H5FDis_driver_registered_by_value(NULL_VFD_VALUE)) < 0)
TEST_ERROR;
- if (TRUE == is_registered)
+ if (true == is_registered)
FAIL_PUTS_ERROR("NULL VFD is inappropriately registered");
/* Register the VFD multiple times */
@@ -231,7 +231,7 @@ test_set_multi(void)
/* The null VFD should be registered now */
if ((is_registered = H5FDis_driver_registered_by_value(NULL_VFD_VALUE)) < 0)
TEST_ERROR;
- if (FALSE == is_registered)
+ if (false == is_registered)
FAIL_PUTS_ERROR("NULL VFD was not registered");
/* Unregister the null VFD */
@@ -249,7 +249,7 @@ test_set_multi(void)
/* The null VFD should not be registered now */
if ((is_registered = H5FDis_driver_registered_by_value(NULL_VFD_VALUE)) < 0)
TEST_ERROR;
- if (TRUE == is_registered)
+ if (true == is_registered)
FAIL_PUTS_ERROR("NULL VFD is inappropriately registered");
PASSED();
@@ -297,7 +297,7 @@ test_get_config_str(void)
TEST_ERROR;
if (0 != config_str_len)
TEST_ERROR;
- if (HDstrlen(config_str_buf) > 0)
+ if (strlen(config_str_buf) > 0)
TEST_ERROR;
/* Set a new configuration string on the FAPL and retrieve it */
@@ -305,9 +305,9 @@ test_get_config_str(void)
TEST_ERROR;
if ((config_str_len = H5Pget_driver_config_str(fapl_id, config_str_buf, 128)) < 0)
TEST_ERROR;
- if (HDstrlen(config_str) != config_str_len)
+ if (strlen(config_str) != config_str_len)
TEST_ERROR;
- if (HDstrncmp(config_str_buf, config_str, 128))
+ if (strncmp(config_str_buf, config_str, 128))
TEST_ERROR;
if (H5Pclose(fapl_id) < 0)
@@ -355,7 +355,7 @@ test_env_var(void)
TEST_ERROR;
if (0 != config_str_len)
TEST_ERROR;
- if (HDstrlen(config_str_buf) > 0)
+ if (strlen(config_str_buf) > 0)
TEST_ERROR;
/* Set default driver and driver configuration using environment variables */
@@ -382,9 +382,9 @@ test_env_var(void)
memset(config_str_buf, 0, 128);
if ((config_str_len = H5Pget_driver_config_str(H5P_FILE_ACCESS_DEFAULT, config_str_buf, 128)) < 0)
TEST_ERROR;
- if (HDstrlen(config_str) != config_str_len)
+ if (strlen(config_str) != config_str_len)
TEST_ERROR;
- if (HDstrncmp(config_str_buf, config_str, 128))
+ if (strncmp(config_str_buf, config_str, 128))
TEST_ERROR;
/* Unset environment variables */
@@ -420,7 +420,7 @@ main(void)
h5_reset();
- HDputs("Testing VFD plugin functionality.");
+ puts("Testing VFD plugin functionality.");
nerrors += (test_set_by_name() < 0) ? 1 : 0;
nerrors += (test_set_by_value() < 0) ? 1 : 0;
@@ -433,7 +433,7 @@ main(void)
exit(EXIT_FAILURE);
}
- HDputs("All VFD plugin tests passed.");
+ puts("All VFD plugin tests passed.");
exit(EXIT_SUCCESS);
}
diff --git a/test/vol.c b/test/vol.c
index ff58feff367..43336c6c978 100644
--- a/test/vol.c
+++ b/test/vol.c
@@ -517,7 +517,7 @@ reg_opt_link_optional(void *obj, const H5VL_loc_params_t *loc_params, H5VL_optio
return -1;
if (loc_params->obj_type != H5I_GROUP)
return -1;
- if (HDstrcmp(loc_params->loc_data.loc_by_name.name, ".") != 0)
+ if (strcmp(loc_params->loc_data.loc_by_name.name, ".") != 0)
return -1;
if (loc_params->loc_data.loc_by_name.lapl_id != H5P_LINK_ACCESS_DEFAULT)
return -1;
@@ -587,7 +587,7 @@ fake_vol_info_to_str(const void *info, char **str)
if (NULL == (*str = (char *)calloc(1, str_size)))
return FAIL;
- HDsnprintf(*str, str_size, "%d", val);
+ snprintf(*str, str_size, "%d", val);
return ret_value;
} /* end fake_vol_info_to_str() */
@@ -913,14 +913,14 @@ test_basic_file_operation(const char *env_h5_drvr)
TEST_ERROR;
/* Can't compare VFD properties for several VFDs */
- if ((hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
- HDstrcmp(env_h5_drvr, "family") != 0 && HDstrcmp(env_h5_drvr, "direct") != 0 &&
- HDstrcmp(env_h5_drvr, "core") != 0 && HDstrcmp(env_h5_drvr, "core_paged") != 0 &&
- HDstrcmp(env_h5_drvr, "mpio") != 0 && HDstrcmp(env_h5_drvr, "splitter") != 0)) {
+ if ((bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0 &&
+ strcmp(env_h5_drvr, "family") != 0 && strcmp(env_h5_drvr, "direct") != 0 &&
+ strcmp(env_h5_drvr, "core") != 0 && strcmp(env_h5_drvr, "core_paged") != 0 &&
+ strcmp(env_h5_drvr, "mpio") != 0 && strcmp(env_h5_drvr, "splitter") != 0)) {
/* H5Fget_access_plist */
if ((fapl_id2 = H5Fget_access_plist(fid)) < 0)
TEST_ERROR;
- if (H5Pequal(fapl_id, fapl_id2) != TRUE)
+ if (H5Pequal(fapl_id, fapl_id2) != true)
TEST_ERROR;
if (H5Pclose(fapl_id2) < 0)
TEST_ERROR;
@@ -937,8 +937,8 @@ test_basic_file_operation(const char *env_h5_drvr)
TEST_ERROR;
/* Can't retrieve VFD handle for split / multi / family VFDs */
- if ((hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
- HDstrcmp(env_h5_drvr, "family") != 0)) {
+ if ((bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0 &&
+ strcmp(env_h5_drvr, "family") != 0)) {
/* H5Fget_vfd_handle */
if (H5Fget_vfd_handle(fid, H5P_DEFAULT, &os_file_handle) < 0)
TEST_ERROR;
@@ -977,14 +977,14 @@ test_basic_file_operation(const char *env_h5_drvr)
TEST_ERROR;
/* Can't compare VFD properties for several VFDs */
- if ((hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
- HDstrcmp(env_h5_drvr, "family") != 0 && HDstrcmp(env_h5_drvr, "direct") != 0 &&
- HDstrcmp(env_h5_drvr, "core") != 0 && HDstrcmp(env_h5_drvr, "core_paged") != 0 &&
- HDstrcmp(env_h5_drvr, "mpio") != 0 && HDstrcmp(env_h5_drvr, "splitter") != 0)) {
+ if ((bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0 &&
+ strcmp(env_h5_drvr, "family") != 0 && strcmp(env_h5_drvr, "direct") != 0 &&
+ strcmp(env_h5_drvr, "core") != 0 && strcmp(env_h5_drvr, "core_paged") != 0 &&
+ strcmp(env_h5_drvr, "mpio") != 0 && strcmp(env_h5_drvr, "splitter") != 0)) {
/* H5Fget_access_plist */
if ((fapl_id2 = H5Fget_access_plist(fid)) < 0)
TEST_ERROR;
- if (H5Pequal(fapl_id, fapl_id2) != TRUE)
+ if (H5Pequal(fapl_id, fapl_id2) != true)
TEST_ERROR;
if (H5Pclose(fapl_id2) < 0)
TEST_ERROR;
@@ -994,14 +994,14 @@ test_basic_file_operation(const char *env_h5_drvr)
TEST_ERROR;
/* Can't compare VFD properties for several VFDs */
- if ((hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
- HDstrcmp(env_h5_drvr, "family") != 0 && HDstrcmp(env_h5_drvr, "direct") != 0 &&
- HDstrcmp(env_h5_drvr, "core") != 0 && HDstrcmp(env_h5_drvr, "core_paged") != 0 &&
- HDstrcmp(env_h5_drvr, "mpio") != 0 && HDstrcmp(env_h5_drvr, "splitter") != 0)) {
+ if ((bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0 &&
+ strcmp(env_h5_drvr, "family") != 0 && strcmp(env_h5_drvr, "direct") != 0 &&
+ strcmp(env_h5_drvr, "core") != 0 && strcmp(env_h5_drvr, "core_paged") != 0 &&
+ strcmp(env_h5_drvr, "mpio") != 0 && strcmp(env_h5_drvr, "splitter") != 0)) {
/* H5Fget_access_plist */
if ((fapl_id2 = H5Fget_access_plist(fid_reopen)) < 0)
TEST_ERROR;
- if (H5Pequal(fapl_id, fapl_id2) != TRUE)
+ if (H5Pequal(fapl_id, fapl_id2) != true)
TEST_ERROR;
if (H5Pclose(fapl_id2) < 0)
TEST_ERROR;
@@ -1055,7 +1055,7 @@ test_basic_group_operation(void)
hid_t gcpl_id = H5I_INVALID_HID;
char filename[1024];
H5G_info_t info;
- hbool_t driver_is_parallel;
+ bool driver_is_parallel;
TESTING("Basic VOL group operations");
@@ -1173,7 +1173,7 @@ test_basic_dataset_operation(void)
haddr_t offset;
H5D_space_status_t status;
- hbool_t driver_is_parallel;
+ bool driver_is_parallel;
int in_buf[N_ELEMENTS];
int out_buf[N_ELEMENTS];
@@ -1488,7 +1488,7 @@ test_basic_object_operation(void)
//! [H5Oget_info_by_name3_snip]
/* H5Oexists_by_name */
- if (H5Oexists_by_name(fid, NATIVE_VOL_TEST_GROUP_NAME, H5P_DEFAULT) != TRUE)
+ if (H5Oexists_by_name(fid, NATIVE_VOL_TEST_GROUP_NAME, H5P_DEFAULT) != true)
TEST_ERROR;
/* H5Oopen/close */
@@ -1615,13 +1615,13 @@ test_basic_link_operation(void)
static herr_t
test_basic_datatype_operation(void)
{
- hid_t fid = H5I_INVALID_HID;
- hid_t fapl_id = H5I_INVALID_HID;
- hid_t tid = H5I_INVALID_HID;
- hid_t tid_anon = H5I_INVALID_HID;
- hid_t tcpl_id = H5I_INVALID_HID;
- char filename[1024];
- hbool_t driver_is_parallel;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ hid_t tid_anon = H5I_INVALID_HID;
+ hid_t tcpl_id = H5I_INVALID_HID;
+ char filename[1024];
+ bool driver_is_parallel;
TESTING("Basic VOL datatype operations");
@@ -1733,7 +1733,7 @@ exercise_reg_opt_oper(hid_t fake_vol_id, hid_t reg_opt_vol_id, H5VL_subclass_t s
herr_t ret = SUCCEED;
/* Test registering optional operation */
- HDsnprintf(op_name, sizeof(op_name), "%s-op1", subcls_name);
+ snprintf(op_name, sizeof(op_name), "%s-op1", subcls_name);
if (H5VLregister_opt_operation(subcls, op_name, &op_val) < 0)
TEST_ERROR;
@@ -1752,7 +1752,7 @@ exercise_reg_opt_oper(hid_t fake_vol_id, hid_t reg_opt_vol_id, H5VL_subclass_t s
TEST_ERROR;
/* Test registering second optional operation */
- HDsnprintf(op_name, sizeof(op_name), "%s-op2", subcls_name);
+ snprintf(op_name, sizeof(op_name), "%s-op2", subcls_name);
if (H5VLregister_opt_operation(subcls, op_name, &op_val2) < 0)
TEST_ERROR;
@@ -1776,12 +1776,12 @@ exercise_reg_opt_oper(hid_t fake_vol_id, hid_t reg_opt_vol_id, H5VL_subclass_t s
H5CX_push();
/* Create fake object on fake VOL connector */
- if (H5I_INVALID_HID == (obj_id = H5VL_register_using_vol_id(id_type, &fake_obj, fake_vol_id, TRUE)))
+ if (H5I_INVALID_HID == (obj_id = H5VL_register_using_vol_id(id_type, &fake_obj, fake_vol_id, true)))
TEST_ERROR;
/* Pop the API context off the stack */
if (H5VL_SUBCLS_DATATYPE == subcls)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
/* Attempt to issue operation on fake VOL connector */
fake_obj = -1;
@@ -1832,12 +1832,12 @@ exercise_reg_opt_oper(hid_t fake_vol_id, hid_t reg_opt_vol_id, H5VL_subclass_t s
H5CX_push();
/* Create fake object on reg_opt VOL connector */
- if (H5I_INVALID_HID == (obj_id = H5VL_register_using_vol_id(id_type, &fake_obj, reg_opt_vol_id, TRUE)))
+ if (H5I_INVALID_HID == (obj_id = H5VL_register_using_vol_id(id_type, &fake_obj, reg_opt_vol_id, true)))
TEST_ERROR;
/* Pop the API context off the stack */
if (H5VL_SUBCLS_DATATYPE == subcls)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
/* Issue first operation */
fake_obj = -1;
@@ -2093,9 +2093,9 @@ test_async_vol_props(void)
FAIL_STACK_ERROR;
/* Override possible environment variable & re-initialize default VOL connector */
- conn_env_str = HDgetenv(HDF5_VOL_CONNECTOR);
+ conn_env_str = getenv(HDF5_VOL_CONNECTOR);
if (conn_env_str) {
- if (NULL == (conn_env_str = HDstrdup(conn_env_str)))
+ if (NULL == (conn_env_str = strdup(conn_env_str)))
TEST_ERROR;
if (HDunsetenv(HDF5_VOL_CONNECTOR) < 0)
TEST_ERROR;
@@ -2122,7 +2122,7 @@ test_async_vol_props(void)
FAIL_STACK_ERROR;
/* Set environment variable to use 'fake async' connector & re-init default connector */
- if (HDsetenv(HDF5_VOL_CONNECTOR, "fake_async", TRUE) < 0)
+ if (HDsetenv(HDF5_VOL_CONNECTOR, "fake_async", true) < 0)
TEST_ERROR;
if (H5VL__reparse_def_vol_conn_variable_test() < 0)
TEST_ERROR;
@@ -2190,7 +2190,7 @@ test_async_vol_props(void)
/* Restore environment variable, if there was one */
if (conn_env_str) {
- if (HDsetenv(HDF5_VOL_CONNECTOR, conn_env_str, TRUE) < 0)
+ if (HDsetenv(HDF5_VOL_CONNECTOR, conn_env_str, true) < 0)
TEST_ERROR;
free(conn_env_str);
@@ -2256,8 +2256,8 @@ test_vol_cap_flags(void)
TEST_ERROR;
/* If using the native VOL by default, check flags again with H5P_DEFAULT */
- vol_env = HDgetenv(HDF5_VOL_CONNECTOR);
- if (!vol_env || (0 == HDstrcmp(vol_env, "native"))) {
+ vol_env = getenv(HDF5_VOL_CONNECTOR);
+ if (!vol_env || (0 == strcmp(vol_env, "native"))) {
H5VL_class_t *cls;
hid_t connector_id;
@@ -2338,12 +2338,12 @@ test_get_vol_name(void)
TESTING("getting connector name");
- conn_env_str = HDgetenv(HDF5_VOL_CONNECTOR);
- if (NULL == (conn_env_str = HDgetenv("HDF5_VOL_CONNECTOR")))
+ conn_env_str = getenv(HDF5_VOL_CONNECTOR);
+ if (NULL == (conn_env_str = getenv("HDF5_VOL_CONNECTOR")))
conn_env_str = "native";
/* Skip the connectors other than the native and pass_through connector */
- if (HDstrcmp(conn_env_str, "native") && HDstrcmp(conn_env_str, "pass_through")) {
+ if (strcmp(conn_env_str, "native") && strcmp(conn_env_str, "pass_through")) {
SKIPPED();
printf(" only test the native or internal pass_through connector\n");
return SUCCEED;
@@ -2361,8 +2361,8 @@ test_get_vol_name(void)
TEST_ERROR;
/* When comparing the pass_through connector, ignore the rest information (under_vol=0;under_info={}) */
- if ((!HDstrcmp(conn_env_str, "native") && HDstrcmp(vol_name, "native")) ||
- (!HDstrcmp(conn_env_str, "pass_through") && HDstrcmp(vol_name, "pass_through")))
+ if ((!strcmp(conn_env_str, "native") && strcmp(vol_name, "native")) ||
+ (!strcmp(conn_env_str, "pass_through") && strcmp(vol_name, "pass_through")))
TEST_ERROR;
if (H5Fclose(file_id) < 0)
@@ -2629,13 +2629,13 @@ main(void)
int nerrors = 0;
/* Get the VFD to use */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
h5_reset();
- HDputs("Testing basic Virtual Object Layer (VOL) functionality.");
+ puts("Testing basic Virtual Object Layer (VOL) functionality.");
nerrors += test_vol_registration() < 0 ? 1 : 0;
nerrors += test_register_opt_operation() < 0 ? 1 : 0;
@@ -2659,7 +2659,7 @@ main(void)
exit(EXIT_FAILURE);
}
- HDputs("All Virtual Object Layer (VOL) tests passed.");
+ puts("All Virtual Object Layer (VOL) tests passed.");
exit(EXIT_SUCCESS);
diff --git a/test/vol_plugin.c b/test/vol_plugin.c
index acf4dfc5d02..af46f3463d9 100644
--- a/test/vol_plugin.c
+++ b/test/vol_plugin.c
@@ -44,7 +44,7 @@ test_registration_by_value(void)
/* The null VOL connector should not be registered at the start of the test */
if ((is_registered = H5VLis_connector_registered_by_value(NULL_VOL_CONNECTOR_VALUE)) < 0)
TEST_ERROR;
- if (TRUE == is_registered)
+ if (true == is_registered)
FAIL_PUTS_ERROR("NULL VOL connector is inappropriately registered");
/* Register the connector by value */
@@ -54,7 +54,7 @@ test_registration_by_value(void)
/* The connector should be registered now */
if ((is_registered = H5VLis_connector_registered_by_value(NULL_VOL_CONNECTOR_VALUE)) < 0)
TEST_ERROR;
- if (FALSE == is_registered)
+ if (false == is_registered)
FAIL_PUTS_ERROR("NULL VOL connector was not registered");
/* Unregister the connector */
@@ -64,7 +64,7 @@ test_registration_by_value(void)
/* The connector should not be registered now */
if ((is_registered = H5VLis_connector_registered_by_value(NULL_VOL_CONNECTOR_VALUE)) < 0)
TEST_ERROR;
- if (TRUE == is_registered)
+ if (true == is_registered)
FAIL_PUTS_ERROR("NULL VOL connector is inappropriately registered");
PASSED();
@@ -101,7 +101,7 @@ test_registration_by_name(void)
/* The null VOL connector should not be registered at the start of the test */
if ((is_registered = H5VLis_connector_registered_by_name(NULL_VOL_CONNECTOR_NAME)) < 0)
TEST_ERROR;
- if (TRUE == is_registered)
+ if (true == is_registered)
FAIL_PUTS_ERROR("NULL VOL connector is inappropriately registered");
/* Register the connector by name */
@@ -111,7 +111,7 @@ test_registration_by_name(void)
/* The connector should be registered now */
if ((is_registered = H5VLis_connector_registered_by_name(NULL_VOL_CONNECTOR_NAME)) < 0)
TEST_ERROR;
- if (FALSE == is_registered)
+ if (false == is_registered)
FAIL_PUTS_ERROR("NULL VOL connector was not registered");
/* Unregister the connector */
@@ -121,7 +121,7 @@ test_registration_by_name(void)
/* The connector should not be registered now */
if ((is_registered = H5VLis_connector_registered_by_name(NULL_VOL_CONNECTOR_NAME)) < 0)
TEST_ERROR;
- if (TRUE == is_registered)
+ if (true == is_registered)
FAIL_PUTS_ERROR("NULL VOL connector is inappropriately registered");
PASSED();
@@ -159,7 +159,7 @@ test_multiple_registration(void)
/* The null VOL connector should not be registered at the start of the test */
if ((is_registered = H5VLis_connector_registered_by_name(NULL_VOL_CONNECTOR_NAME)) < 0)
TEST_ERROR;
- if (TRUE == is_registered)
+ if (true == is_registered)
FAIL_PUTS_ERROR("NULL VOL connector is inappropriately registered");
/* Register the connector multiple times */
@@ -171,7 +171,7 @@ test_multiple_registration(void)
/* The connector should be registered now */
if ((is_registered = H5VLis_connector_registered_by_name(NULL_VOL_CONNECTOR_NAME)) < 0)
TEST_ERROR;
- if (FALSE == is_registered)
+ if (false == is_registered)
FAIL_PUTS_ERROR("NULL VOL connector was not registered");
/* Unregister the connector */
@@ -189,13 +189,13 @@ test_multiple_registration(void)
/* The connector should not be registered now */
if ((is_registered = H5VLis_connector_registered_by_name(NULL_VOL_CONNECTOR_NAME)) < 0)
TEST_ERROR;
- if (TRUE == is_registered)
+ if (true == is_registered)
FAIL_PUTS_ERROR("NULL VOL connector is inappropriately registered");
/* Repeat testing with the _by_value routines */
if ((is_registered = H5VLis_connector_registered_by_value(NULL_VOL_CONNECTOR_VALUE)) < 0)
TEST_ERROR;
- if (TRUE == is_registered)
+ if (true == is_registered)
FAIL_PUTS_ERROR("NULL VOL connector is inappropriately registered");
/* Register the connector multiple times */
@@ -207,7 +207,7 @@ test_multiple_registration(void)
/* The connector should be registered now */
if ((is_registered = H5VLis_connector_registered_by_value(NULL_VOL_CONNECTOR_VALUE)) < 0)
TEST_ERROR;
- if (FALSE == is_registered)
+ if (false == is_registered)
FAIL_PUTS_ERROR("NULL VOL connector was not registered");
/* Unregister the connector */
@@ -225,7 +225,7 @@ test_multiple_registration(void)
/* The connector should not be registered now */
if ((is_registered = H5VLis_connector_registered_by_value(NULL_VOL_CONNECTOR_VALUE)) < 0)
TEST_ERROR;
- if (TRUE == is_registered)
+ if (true == is_registered)
FAIL_PUTS_ERROR("NULL VOL connector is inappropriately registered");
PASSED();
@@ -263,7 +263,7 @@ test_getters(void)
/* The null VOL connector should not be registered at the start of the test */
if ((is_registered = H5VLis_connector_registered_by_name(NULL_VOL_CONNECTOR_NAME)) < 0)
TEST_ERROR;
- if (TRUE == is_registered)
+ if (true == is_registered)
FAIL_PUTS_ERROR("NULL VOL connector is inappropriately registered");
/* Register the connector by name */
@@ -285,7 +285,7 @@ test_getters(void)
/* Repeat testing with the _by_value routines */
if ((is_registered = H5VLis_connector_registered_by_value(NULL_VOL_CONNECTOR_VALUE)) < 0)
TEST_ERROR;
- if (TRUE == is_registered)
+ if (true == is_registered)
FAIL_PUTS_ERROR("NULL VOL connector is inappropriately registered");
/* Register the connector by value */
@@ -334,7 +334,7 @@ main(void)
h5_reset();
- HDputs("Testing VOL connector plugin functionality.");
+ puts("Testing VOL connector plugin functionality.");
nerrors += test_registration_by_name() < 0 ? 1 : 0;
nerrors += test_registration_by_value() < 0 ? 1 : 0;
@@ -346,7 +346,7 @@ main(void)
exit(EXIT_FAILURE);
}
- HDputs("All VOL connector plugin tests passed.");
+ puts("All VOL connector plugin tests passed.");
exit(EXIT_SUCCESS);
diff --git a/testpar/API/H5_api_async_test_parallel.c b/testpar/API/H5_api_async_test_parallel.c
index 23e3544cb01..79327d0ea03 100644
--- a/testpar/API/H5_api_async_test_parallel.c
+++ b/testpar/API/H5_api_async_test_parallel.c
@@ -47,7 +47,7 @@ static int (*par_async_tests[])(void) = {
test_file_reopen,
};
-hbool_t coll_metadata_read = TRUE;
+bool coll_metadata_read = true;
/* Highest "printf" file created (starting at 0) */
int max_printf_file = -1;
@@ -65,8 +65,8 @@ test_one_dataset_io(void)
hsize_t stride[ONE_DATASET_IO_TEST_SPACE_RANK];
hsize_t count[ONE_DATASET_IO_TEST_SPACE_RANK];
hsize_t block[ONE_DATASET_IO_TEST_SPACE_RANK];
- hbool_t op_failed = false;
- hbool_t is_native_vol = false;
+ bool op_failed = false;
+ bool is_native_vol = false;
size_t i, data_size, num_in_progress;
hid_t file_id = H5I_INVALID_HID;
hid_t fapl_id = H5I_INVALID_HID;
@@ -429,7 +429,7 @@ test_multi_dataset_io(void)
hsize_t stride[MULTI_DATASET_IO_TEST_SPACE_RANK];
hsize_t count[MULTI_DATASET_IO_TEST_SPACE_RANK];
hsize_t block[MULTI_DATASET_IO_TEST_SPACE_RANK];
- hbool_t op_failed;
+ bool op_failed;
size_t i, j, data_size, num_in_progress;
hid_t file_id = H5I_INVALID_HID;
hid_t fapl_id = H5I_INVALID_HID;
@@ -753,8 +753,8 @@ test_multi_file_dataset_io(void)
hsize_t stride[MULTI_FILE_DATASET_IO_TEST_SPACE_RANK];
hsize_t count[MULTI_FILE_DATASET_IO_TEST_SPACE_RANK];
hsize_t block[MULTI_FILE_DATASET_IO_TEST_SPACE_RANK];
- hbool_t op_failed = false;
- hbool_t is_native_vol = false;
+ bool op_failed = false;
+ bool is_native_vol = false;
size_t i, j, data_size, num_in_progress;
hid_t fapl_id = H5I_INVALID_HID;
hid_t file_id[MULTI_FILE_DATASET_IO_TEST_NFILES] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
@@ -1178,7 +1178,7 @@ test_multi_file_grp_dset_io(void)
hsize_t stride[MULTI_FILE_GRP_DSET_IO_TEST_SPACE_RANK];
hsize_t count[MULTI_FILE_GRP_DSET_IO_TEST_SPACE_RANK];
hsize_t block[MULTI_FILE_GRP_DSET_IO_TEST_SPACE_RANK];
- hbool_t op_failed;
+ bool op_failed;
size_t i, j, data_size, num_in_progress;
hid_t file_id = H5I_INVALID_HID;
hid_t fapl_id = H5I_INVALID_HID;
@@ -1597,8 +1597,8 @@ test_set_extent(void)
hsize_t stride[SET_EXTENT_TEST_SPACE_RANK];
hsize_t count[SET_EXTENT_TEST_SPACE_RANK];
hsize_t block[SET_EXTENT_TEST_SPACE_RANK];
- hbool_t op_failed = false;
- hbool_t is_native_vol = false;
+ bool op_failed = false;
+ bool is_native_vol = false;
size_t i, j, data_size, num_in_progress;
hid_t file_id = H5I_INVALID_HID;
hid_t fapl_id = H5I_INVALID_HID;
@@ -1933,11 +1933,11 @@ static int
test_attribute_exists(void)
{
hsize_t *dims = NULL;
- hbool_t op_failed = false;
- hbool_t is_native_vol = false;
+ bool op_failed = false;
+ bool is_native_vol = false;
size_t num_in_progress;
- hbool_t exists1 = false;
- hbool_t exists2 = false;
+ bool exists1 = false;
+ bool exists2 = false;
hid_t file_id = H5I_INVALID_HID;
hid_t fapl_id = H5I_INVALID_HID;
hid_t dset_id = H5I_INVALID_HID;
@@ -2022,9 +2022,9 @@ test_attribute_exists(void)
/* Check if H5Aexists returned the correct values */
if (exists1)
- FAIL_PUTS_ERROR(" H5Aexists returned TRUE for an attribute that should not exist")
+ FAIL_PUTS_ERROR(" H5Aexists returned true for an attribute that should not exist")
if (!exists2)
- FAIL_PUTS_ERROR(" H5Aexists returned FALSE for an attribute that should exist");
+ FAIL_PUTS_ERROR(" H5Aexists returned false for an attribute that should exist");
/* Close */
if (H5Aclose_async(attr_id, es_id) < 0)
@@ -2085,8 +2085,8 @@ static int
test_attribute_io(void)
{
hsize_t *dims = NULL;
- hbool_t op_failed = false;
- hbool_t is_native_vol = false;
+ bool op_failed = false;
+ bool is_native_vol = false;
size_t num_in_progress;
size_t i, data_size;
hid_t file_id = H5I_INVALID_HID;
@@ -2293,7 +2293,7 @@ static int
test_attribute_io_tconv(void)
{
hsize_t *dims = NULL;
- hbool_t op_failed;
+ bool op_failed;
size_t num_in_progress;
size_t i, data_size;
hid_t file_id = H5I_INVALID_HID;
@@ -2493,7 +2493,7 @@ static int
test_attribute_io_compound(void)
{
hsize_t *dims = NULL;
- hbool_t op_failed;
+ bool op_failed;
size_t num_in_progress;
size_t i, data_size;
hid_t file_id = H5I_INVALID_HID;
@@ -2907,7 +2907,7 @@ test_group(void)
H5G_info_t info2;
H5G_info_t info3;
size_t num_in_progress;
- hbool_t op_failed;
+ bool op_failed;
TESTING("group operations");
@@ -3073,21 +3073,21 @@ test_group(void)
static int
test_link(void)
{
- hid_t file_id = H5I_INVALID_HID;
- hid_t fapl_id = H5I_INVALID_HID;
- hid_t parent_group_id = H5I_INVALID_HID;
- hid_t group_id = H5I_INVALID_HID;
- hid_t gcpl_id = H5I_INVALID_HID;
- hid_t es_id = H5I_INVALID_HID;
- hbool_t existsh1;
- hbool_t existsh2;
- hbool_t existsh3;
- hbool_t existss1;
- hbool_t existss2;
- hbool_t existss3;
- size_t num_in_progress;
- hbool_t op_failed = false;
- hbool_t is_native_vol = false;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t parent_group_id = H5I_INVALID_HID;
+ hid_t group_id = H5I_INVALID_HID;
+ hid_t gcpl_id = H5I_INVALID_HID;
+ hid_t es_id = H5I_INVALID_HID;
+ bool existsh1;
+ bool existsh2;
+ bool existsh3;
+ bool existss1;
+ bool existss2;
+ bool existss3;
+ size_t num_in_progress;
+ bool op_failed = false;
+ bool is_native_vol = false;
TESTING("link operations");
@@ -3276,17 +3276,17 @@ test_link(void)
/* Check if existence returns were correct */
if (!existsh1)
- FAIL_PUTS_ERROR(" link exists returned FALSE for link that should exist");
+ FAIL_PUTS_ERROR(" link exists returned false for link that should exist");
if (!existss1)
- FAIL_PUTS_ERROR(" link exists returned FALSE for link that should exist");
+ FAIL_PUTS_ERROR(" link exists returned false for link that should exist");
if (!existsh2)
- FAIL_PUTS_ERROR(" link exists returned FALSE for link that should exist");
+ FAIL_PUTS_ERROR(" link exists returned false for link that should exist");
if (existss2)
- FAIL_PUTS_ERROR(" link exists returned TRUE for link that should not exist");
+ FAIL_PUTS_ERROR(" link exists returned true for link that should not exist");
if (existsh3)
- FAIL_PUTS_ERROR(" link exists returned TRUE for link that should not exist");
+ FAIL_PUTS_ERROR(" link exists returned true for link that should not exist");
if (existsh3)
- FAIL_PUTS_ERROR(" link exists returned TRUE for link that should not exist");
+ FAIL_PUTS_ERROR(" link exists returned true for link that should not exist");
/* Close */
if (H5Gclose_async(parent_group_id, es_id) < 0)
@@ -3342,8 +3342,8 @@ test_ocopy_orefresh(void)
hid_t space_id = H5I_INVALID_HID;
hid_t es_id = H5I_INVALID_HID;
size_t num_in_progress;
- hbool_t op_failed = false;
- hbool_t is_native_vol = false;
+ bool op_failed = false;
+ bool is_native_vol = false;
TESTING("H5Ocopy() and H5Orefresh()");
@@ -3495,12 +3495,12 @@ test_ocopy_orefresh(void)
static int
test_file_reopen(void)
{
- hid_t file_id = H5I_INVALID_HID;
- hid_t fapl_id = H5I_INVALID_HID;
- hid_t reopened_file_id = H5I_INVALID_HID;
- hid_t es_id = H5I_INVALID_HID;
- size_t num_in_progress;
- hbool_t op_failed;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t reopened_file_id = H5I_INVALID_HID;
+ hid_t es_id = H5I_INVALID_HID;
+ size_t num_in_progress;
+ bool op_failed;
TESTING("H5Freopen()");
@@ -3631,7 +3631,7 @@ H5_api_async_test_parallel(void)
printf("\n * Re-testing with independent metadata reads *\n");
}
- coll_metadata_read = FALSE;
+ coll_metadata_read = false;
for (i = 0, nerrors = 0; i < ARRAY_LENGTH(par_async_tests); i++) {
nerrors += (*par_async_tests[i])() ? 1 : 0;
diff --git a/testpar/API/H5_api_dataset_test_parallel.c b/testpar/API/H5_api_dataset_test_parallel.c
index 5639348b2b0..0d53d449e6d 100644
--- a/testpar/API/H5_api_dataset_test_parallel.c
+++ b/testpar/API/H5_api_dataset_test_parallel.c
@@ -121,7 +121,7 @@ test_write_dataset_data_verification(void)
TESTING_2("test setup");
- if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0)
+ if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, true)) < 0)
TEST_ERROR;
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
@@ -197,7 +197,7 @@ test_write_dataset_data_verification(void)
{
PART_BEGIN(H5Dwrite_all_read)
{
- hbool_t op_failed = FALSE;
+ bool op_failed = false;
TESTING_2("H5Dwrite using H5S_ALL then H5Dread");
@@ -221,10 +221,10 @@ test_write_dataset_data_verification(void)
if (H5Dwrite(dset_id, DATASET_WRITE_DATA_VERIFY_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL,
H5P_DEFAULT, write_buf) < 0)
- op_failed = TRUE;
+ op_failed = true;
}
else
- op_failed = TRUE;
+ op_failed = true;
if (write_buf) {
free(write_buf);
@@ -239,7 +239,7 @@ test_write_dataset_data_verification(void)
PART_ERROR(H5Dwrite_all_read);
}
- if (op_failed == TRUE) {
+ if (op_failed == true) {
H5_FAILED();
printf(" dataset write on rank 0 failed!\n");
PART_ERROR(H5Dwrite_all_read);
@@ -936,7 +936,7 @@ test_write_dataset_independent(void)
return 0;
}
- if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0)
+ if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, true)) < 0)
TEST_ERROR;
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
@@ -1275,7 +1275,7 @@ test_write_dataset_one_proc_0_selection(void)
return 0;
}
- if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0)
+ if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, true)) < 0)
TEST_ERROR;
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
@@ -1572,7 +1572,7 @@ test_write_dataset_one_proc_none_selection(void)
return 0;
}
- if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0)
+ if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, true)) < 0)
TEST_ERROR;
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
@@ -1882,7 +1882,7 @@ test_write_dataset_one_proc_all_selection(void)
return 0;
}
- if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0)
+ if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, true)) < 0)
TEST_ERROR;
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
@@ -2179,7 +2179,7 @@ test_write_dataset_hyper_file_all_mem(void)
return 0;
}
- if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0)
+ if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, true)) < 0)
TEST_ERROR;
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
@@ -2447,7 +2447,7 @@ test_write_dataset_all_file_hyper_mem(void)
return 0;
}
- if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0)
+ if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, true)) < 0)
TEST_ERROR;
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
@@ -2755,7 +2755,7 @@ test_write_dataset_all_file_point_mem(void)
return 0;
}
- if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0)
+ if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, true)) < 0)
TEST_ERROR;
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
@@ -3070,7 +3070,7 @@ test_write_dataset_hyper_file_point_mem(void)
return 0;
}
- if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0)
+ if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, true)) < 0)
TEST_ERROR;
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
@@ -3390,7 +3390,7 @@ test_write_dataset_point_file_hyper_mem(void)
return 0;
}
- if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0)
+ if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, true)) < 0)
TEST_ERROR;
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
@@ -3845,7 +3845,7 @@ test_read_dataset_one_proc_0_selection(void)
/*
* Re-open file on all ranks.
*/
- if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0)
+ if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, true)) < 0)
TEST_ERROR;
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
@@ -4180,7 +4180,7 @@ test_read_dataset_one_proc_none_selection(void)
/*
* Re-open file on all ranks.
*/
- if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0)
+ if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, true)) < 0)
TEST_ERROR;
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
@@ -4526,7 +4526,7 @@ test_read_dataset_one_proc_all_selection(void)
/*
* Re-open file on all ranks.
*/
- if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0)
+ if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, true)) < 0)
TEST_ERROR;
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
@@ -4880,7 +4880,7 @@ test_read_dataset_all_file_hyper_mem(void)
/*
* Re-open file on all ranks.
*/
- if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0)
+ if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, true)) < 0)
TEST_ERROR;
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
@@ -5228,7 +5228,7 @@ test_read_dataset_all_file_point_mem(void)
/*
* Re-open file on all ranks.
*/
- if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0)
+ if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, true)) < 0)
TEST_ERROR;
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
@@ -5581,7 +5581,7 @@ test_read_dataset_hyper_file_point_mem(void)
/*
* Re-open file on all ranks.
*/
- if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0)
+ if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, true)) < 0)
TEST_ERROR;
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
@@ -5935,7 +5935,7 @@ test_read_dataset_point_file_hyper_mem(void)
/*
* Re-open file on all ranks.
*/
- if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0)
+ if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, true)) < 0)
TEST_ERROR;
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
@@ -6413,7 +6413,7 @@ test_write_multi_chunk_dataset_same_shape_read(void)
/*
* Re-open file on all ranks.
*/
- if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0)
+ if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, true)) < 0)
TEST_ERROR;
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
@@ -6876,7 +6876,7 @@ test_write_multi_chunk_dataset_diff_shape_read(void)
/*
* Re-open file on all ranks.
*/
- if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0)
+ if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, true)) < 0)
TEST_ERROR;
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
@@ -7277,7 +7277,7 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void)
/*
* Re-open file on all ranks.
*/
- if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0)
+ if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, true)) < 0)
TEST_ERROR;
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
@@ -7803,7 +7803,7 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void)
/*
* Re-open file on all ranks.
*/
- if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0)
+ if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, true)) < 0)
TEST_ERROR;
if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) {
H5_FAILED();
diff --git a/testpar/API/H5_api_file_test_parallel.c b/testpar/API/H5_api_file_test_parallel.c
index 9bbcd9c7f79..2d9b5c20a2c 100644
--- a/testpar/API/H5_api_file_test_parallel.c
+++ b/testpar/API/H5_api_file_test_parallel.c
@@ -44,7 +44,7 @@ test_create_file(void)
return 0;
}
- if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0)
+ if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, true)) < 0)
TEST_ERROR;
if ((file_id = H5Fcreate(FILE_CREATE_TEST_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0) {
@@ -93,7 +93,7 @@ test_open_file(void)
TESTING_2("test setup");
- if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0)
+ if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, true)) < 0)
TEST_ERROR;
PASSED();
@@ -229,7 +229,7 @@ test_split_comm_file_access(void)
MPI_Comm_rank(comm, &sub_mpi_rank);
/* setup file access template */
- if ((fapl_id = create_mpi_fapl(comm, info, TRUE)) < 0) {
+ if ((fapl_id = create_mpi_fapl(comm, info, true)) < 0) {
err_occurred = 1;
goto access_end;
}
@@ -315,7 +315,7 @@ cleanup_files(void)
{
hid_t fapl_id = H5I_INVALID_HID;
- if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0) {
+ if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, true)) < 0) {
if (MAINPROCESS)
printf(" failed to create FAPL for deleting test files\n");
return;
diff --git a/testpar/API/H5_api_test_parallel.c b/testpar/API/H5_api_test_parallel.c
index 9b1d432b7be..224c1b8a7c4 100644
--- a/testpar/API/H5_api_test_parallel.c
+++ b/testpar/API/H5_api_test_parallel.c
@@ -105,7 +105,7 @@ H5_api_test_run(void)
}
hid_t
-create_mpi_fapl(MPI_Comm comm, MPI_Info info, hbool_t coll_md_read)
+create_mpi_fapl(MPI_Comm comm, MPI_Info info, bool coll_md_read)
{
hid_t ret_pl = H5I_INVALID_HID;
@@ -118,7 +118,7 @@ create_mpi_fapl(MPI_Comm comm, MPI_Info info, hbool_t coll_md_read)
goto error;
if (H5Pset_all_coll_metadata_ops(ret_pl, coll_md_read) < 0)
goto error;
- if (H5Pset_coll_metadata_write(ret_pl, TRUE) < 0)
+ if (H5Pset_coll_metadata_write(ret_pl, true) < 0)
goto error;
return ret_pl;
@@ -236,13 +236,13 @@ main(int argc, char **argv)
srand(seed);
- if (NULL == (test_path_prefix = HDgetenv(HDF5_API_TEST_PATH_PREFIX)))
+ if (NULL == (test_path_prefix = getenv(HDF5_API_TEST_PATH_PREFIX)))
test_path_prefix = "";
- HDsnprintf(H5_api_test_parallel_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix,
- PARALLEL_TEST_FILE_NAME);
+ snprintf(H5_api_test_parallel_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix,
+ PARALLEL_TEST_FILE_NAME);
- if (NULL == (vol_connector_string = HDgetenv(HDF5_VOL_CONNECTOR))) {
+ if (NULL == (vol_connector_string = getenv(HDF5_VOL_CONNECTOR))) {
if (MAINPROCESS)
printf("No VOL connector selected; using native VOL connector\n");
vol_connector_name = "native";
@@ -253,7 +253,7 @@ main(int argc, char **argv)
BEGIN_INDEPENDENT_OP(copy_connector_string)
{
- if (NULL == (vol_connector_string_copy = HDstrdup(vol_connector_string))) {
+ if (NULL == (vol_connector_string_copy = strdup(vol_connector_string))) {
if (MAINPROCESS)
fprintf(stderr, "Unable to copy VOL connector string\n");
INDEPENDENT_OP_ERROR(copy_connector_string);
@@ -263,7 +263,7 @@ main(int argc, char **argv)
BEGIN_INDEPENDENT_OP(get_connector_name)
{
- if (NULL == (token = HDstrtok(vol_connector_string_copy, " "))) {
+ if (NULL == (token = strtok(vol_connector_string_copy, " "))) {
if (MAINPROCESS)
fprintf(stderr, "Error while parsing VOL connector string\n");
INDEPENDENT_OP_ERROR(get_connector_name);
@@ -273,7 +273,7 @@ main(int argc, char **argv)
vol_connector_name = token;
- if (NULL != (token = HDstrtok(NULL, " "))) {
+ if (NULL != (token = strtok(NULL, " "))) {
vol_connector_info = token;
}
}
@@ -290,7 +290,7 @@ main(int argc, char **argv)
BEGIN_INDEPENDENT_OP(create_fapl)
{
- if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, FALSE)) < 0) {
+ if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, false)) < 0) {
if (MAINPROCESS)
fprintf(stderr, "Unable to create FAPL\n");
INDEPENDENT_OP_ERROR(create_fapl);
@@ -307,7 +307,7 @@ main(int argc, char **argv)
* Otherwise, HDF5 will default to running the tests
* with the native connector, which could be misleading.
*/
- if (0 != HDstrcmp(vol_connector_name, "native")) {
+ if (0 != strcmp(vol_connector_name, "native")) {
htri_t is_registered;
if ((is_registered = H5VLis_connector_registered_by_name(vol_connector_name)) < 0) {
diff --git a/testpar/API/H5_api_test_parallel.h b/testpar/API/H5_api_test_parallel.h
index 44f94408163..ae7881417e7 100644
--- a/testpar/API/H5_api_test_parallel.h
+++ b/testpar/API/H5_api_test_parallel.h
@@ -139,7 +139,7 @@ extern char H5_api_test_parallel_filename[];
{ \
if (MAINPROCESS) { \
printf("Testing %-62s", WHAT); \
- HDputs(""); \
+ puts(""); \
fflush(stdout); \
} \
}
@@ -151,7 +151,7 @@ extern char H5_api_test_parallel_filename[];
*/
#define BEGIN_INDEPENDENT_OP(op_name) \
{ \
- hbool_t ind_op_failed = FALSE; \
+ bool ind_op_failed = false; \
\
{
@@ -176,10 +176,10 @@ extern char H5_api_test_parallel_filename[];
}
#define INDEPENDENT_OP_ERROR(op_name) \
- ind_op_failed = TRUE; \
+ ind_op_failed = true; \
goto op_##op_name##_end;
-hid_t create_mpi_fapl(MPI_Comm comm, MPI_Info info, hbool_t coll_md_read);
+hid_t create_mpi_fapl(MPI_Comm comm, MPI_Info info, bool coll_md_read);
int generate_random_parallel_dimensions(int space_rank, hsize_t **dims_out);
extern int mpi_size;
diff --git a/testpar/API/t_bigio.c b/testpar/API/t_bigio.c
index 3ab4c38f1ec..e7bdfb0f0e8 100644
--- a/testpar/API/t_bigio.c
+++ b/testpar/API/t_bigio.c
@@ -1212,9 +1212,9 @@ create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type)
/* set Parallel access with communicator */
ret = H5Pset_fapl_mpio(ret_pl, comm, info);
VRFY_G((ret >= 0), "");
- ret = H5Pset_all_coll_metadata_ops(ret_pl, TRUE);
+ ret = H5Pset_all_coll_metadata_ops(ret_pl, true);
VRFY_G((ret >= 0), "");
- ret = H5Pset_coll_metadata_write(ret_pl, TRUE);
+ ret = H5Pset_coll_metadata_write(ret_pl, true);
VRFY_G((ret >= 0), "");
return (ret_pl);
}
diff --git a/testpar/API/t_chunk_alloc.c b/testpar/API/t_chunk_alloc.c
index 37ea2faec5f..673563b4f9e 100644
--- a/testpar/API/t_chunk_alloc.c
+++ b/testpar/API/t_chunk_alloc.c
@@ -171,7 +171,6 @@ static void
parallel_access_dataset(const char *filename, int chunk_factor, access_type action, hid_t *file_id,
hid_t *dataset)
{
- /* HDF5 gubbins */
hid_t memspace, dataspace; /* HDF5 file identifier */
hid_t access_plist; /* HDF5 ID for file access property list */
herr_t hrc; /* HDF5 return code */
@@ -320,7 +319,6 @@ static void
verify_data(const char *filename, int chunk_factor, write_type write_pattern, int vclose, hid_t *file_id,
hid_t *dataset)
{
- /* HDF5 gubbins */
hid_t dataspace, memspace; /* HDF5 file identifier */
hid_t access_plist; /* HDF5 ID for file access property list */
herr_t hrc; /* HDF5 return code */
diff --git a/testpar/API/t_coll_chunk.c b/testpar/API/t_coll_chunk.c
index b4e057ef104..99f845fde55 100644
--- a/testpar/API/t_coll_chunk.c
+++ b/testpar/API/t_coll_chunk.c
@@ -922,7 +922,7 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap
/* Only check chunk optimization mode if selection I/O is not being used -
* selection I/O bypasses this IO mode decision - it's effectively always
* multi chunk currently */
- if (facc_type == FACC_MPIO && /* !H5_use_selection_io_g */ TRUE) {
+ if (facc_type == FACC_MPIO && /* !H5_use_selection_io_g */ true) {
switch (api_option) {
case API_LINK_HARD:
status = H5Pget(xfer_plist, H5D_XFER_COLL_CHUNK_LINK_HARD_NAME, &prop_value);
diff --git a/testpar/API/t_dset.c b/testpar/API/t_dset.c
index 228cadc37cf..0da25b06463 100644
--- a/testpar/API/t_dset.c
+++ b/testpar/API/t_dset.c
@@ -3041,10 +3041,10 @@ test_actual_io_mode(int selection_mode)
H5D_mpio_actual_io_mode_t actual_io_mode_expected = H5D_MPIO_NO_COLLECTIVE;
const char *filename;
const char *test_name;
- hbool_t direct_multi_chunk_io;
- hbool_t multi_chunk_io;
- hbool_t is_chunked;
- hbool_t is_collective;
+ bool direct_multi_chunk_io;
+ bool multi_chunk_io;
+ bool is_chunked;
+ bool is_collective;
int mpi_size = -1;
int mpi_rank = -1;
int length;
@@ -3401,10 +3401,10 @@ test_actual_io_mode(int selection_mode)
/* Test values */
if (actual_chunk_opt_mode_expected != (H5D_mpio_actual_chunk_opt_mode_t)-1 &&
actual_io_mode_expected != (H5D_mpio_actual_io_mode_t)-1) {
- HDsnprintf(message, sizeof(message), "Actual Chunk Opt Mode has the correct value for %s.\n",
- test_name);
+ snprintf(message, sizeof(message), "Actual Chunk Opt Mode has the correct value for %s.\n",
+ test_name);
VRFY((actual_chunk_opt_mode_write == actual_chunk_opt_mode_expected), message);
- HDsnprintf(message, sizeof(message), "Actual IO Mode has the correct value for %s.\n", test_name);
+ snprintf(message, sizeof(message), "Actual IO Mode has the correct value for %s.\n", test_name);
VRFY((actual_io_mode_write == actual_io_mode_expected), message);
}
else {
@@ -3492,7 +3492,7 @@ actual_io_mode_tests(void)
/* Only run these tests if selection I/O is not being used - selection I/O
* bypasses this IO mode decision - it's effectively always multi chunk
* currently */
- if (/* !H5_use_selection_io_g */ TRUE) {
+ if (/* !H5_use_selection_io_g */ true) {
test_actual_io_mode(TEST_ACTUAL_IO_NO_COLLECTIVE);
/*
@@ -3579,8 +3579,8 @@ test_no_collective_cause_mode(int selection_mode)
const char *filename;
const char *test_name;
- hbool_t is_chunked = 1;
- hbool_t is_independent = 0;
+ bool is_chunked = 1;
+ bool is_independent = 0;
int mpi_size = -1;
int mpi_rank = -1;
int length;
@@ -3822,12 +3822,12 @@ test_no_collective_cause_mode(int selection_mode)
/* Test values */
memset(message, 0, sizeof(message));
- HDsnprintf(message, sizeof(message),
- "Local cause of Broken Collective I/O has the correct value for %s.\n", test_name);
+ snprintf(message, sizeof(message), "Local cause of Broken Collective I/O has the correct value for %s.\n",
+ test_name);
VRFY((no_collective_cause_local_write == no_collective_cause_local_expected), message);
memset(message, 0, sizeof(message));
- HDsnprintf(message, sizeof(message),
- "Global cause of Broken Collective I/O has the correct value for %s.\n", test_name);
+ snprintf(message, sizeof(message),
+ "Global cause of Broken Collective I/O has the correct value for %s.\n", test_name);
VRFY((no_collective_cause_global_write == no_collective_cause_global_expected), message);
/* Release some resources */
@@ -3922,7 +3922,7 @@ dataset_atomicity(void)
herr_t ret; /* Generic return value */
int mpi_size, mpi_rank;
int i, j, k;
- hbool_t atomicity = FALSE;
+ bool atomicity = false;
MPI_Comm comm = MPI_COMM_WORLD;
MPI_Info info = MPI_INFO_NULL;
@@ -4015,7 +4015,7 @@ dataset_atomicity(void)
/* should fail */
H5E_BEGIN_TRY
{
- ret = H5Fset_mpi_atomicity(fid, TRUE);
+ ret = H5Fset_mpi_atomicity(fid, true);
}
H5E_END_TRY
VRFY((ret == FAIL), "H5Fset_mpi_atomicity failed");
@@ -4038,7 +4038,7 @@ dataset_atomicity(void)
ret = H5Pclose(acc_tpl);
VRFY((ret >= 0), "H5Pclose succeeded");
- ret = H5Fset_mpi_atomicity(fid, TRUE);
+ ret = H5Fset_mpi_atomicity(fid, true);
VRFY((ret >= 0), "H5Fset_mpi_atomicity succeeded");
/* open dataset1 (contiguous case) */
@@ -4059,7 +4059,7 @@ dataset_atomicity(void)
/* check that the atomicity flag is set */
ret = H5Fget_mpi_atomicity(fid, &atomicity);
VRFY((ret >= 0), "atomcity get failed");
- VRFY((atomicity == TRUE), "atomcity set failed");
+ VRFY((atomicity == true), "atomcity set failed");
MPI_Barrier(comm);
@@ -4129,11 +4129,11 @@ dataset_atomicity(void)
read_buf[i] = 8;
}
- atomicity = FALSE;
+ atomicity = false;
/* check that the atomicity flag is set */
ret = H5Fget_mpi_atomicity(fid, &atomicity);
VRFY((ret >= 0), "atomcity get failed");
- VRFY((atomicity == TRUE), "atomcity set failed");
+ VRFY((atomicity == true), "atomcity set failed");
block[0] = (hsize_t)(dim0 / mpi_size - 1);
block[1] = (hsize_t)(dim1 / mpi_size - 1);
diff --git a/testpar/API/t_file.c b/testpar/API/t_file.c
index c906c782d64..61d009c2516 100644
--- a/testpar/API/t_file.c
+++ b/testpar/API/t_file.c
@@ -143,7 +143,7 @@ test_page_buffer_access(void)
H5F_t *f = NULL;
herr_t ret; /* generic return value */
const char *filename;
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
@@ -174,7 +174,7 @@ test_page_buffer_access(void)
VRFY((file_id < 0), "H5Fcreate failed");
/* disable collective metadata writes for page buffering to work */
- ret = H5Pset_coll_metadata_write(fapl, FALSE);
+ ret = H5Pset_coll_metadata_write(fapl, false);
VRFY((ret >= 0), "");
ret = create_file(filename, fcpl, fapl, H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
@@ -204,7 +204,7 @@ test_page_buffer_access(void)
ret = H5Pset_page_buffer_size(fapl_self, sizeof(int) * 1000, 0, 0);
VRFY((ret == 0), "");
/* collective metadata writes do not work with page buffering */
- ret = H5Pset_coll_metadata_write(fapl_self, FALSE);
+ ret = H5Pset_coll_metadata_write(fapl_self, false);
VRFY((ret >= 0), "");
file_id = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl_self);
@@ -213,7 +213,7 @@ test_page_buffer_access(void)
/* Push API context */
ret = H5CX_push();
VRFY((ret == 0), "H5CX_push()");
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Get a pointer to the internal file object */
f = (H5F_t *)H5I_object(file_id);
@@ -302,9 +302,9 @@ test_page_buffer_access(void)
/* Pop API context */
if (api_ctx_pushed) {
- ret = H5CX_pop(FALSE);
+ ret = H5CX_pop(false);
VRFY((ret == 0), "H5CX_pop()");
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
}
}
@@ -314,7 +314,7 @@ test_page_buffer_access(void)
ret = H5Pset_page_buffer_size(fapl, sizeof(int) * 1000, 0, 0);
VRFY((ret == 0), "");
/* collective metadata writes do not work with page buffering */
- ret = H5Pset_coll_metadata_write(fapl, FALSE);
+ ret = H5Pset_coll_metadata_write(fapl, false);
VRFY((ret >= 0), "");
file_id = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl);
@@ -323,7 +323,7 @@ test_page_buffer_access(void)
/* Push API context */
ret = H5CX_push();
VRFY((ret == 0), "H5CX_push()");
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Get a pointer to the internal file object */
f = (H5F_t *)H5I_object(file_id);
@@ -436,9 +436,9 @@ test_page_buffer_access(void)
/* Pop API context */
if (api_ctx_pushed) {
- ret = H5CX_pop(FALSE);
+ ret = H5CX_pop(false);
VRFY((ret == 0), "H5CX_pop()");
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
}
free(data);
@@ -463,7 +463,7 @@ create_file(const char *filename, hid_t fcpl, hid_t fapl, int metadata_write_str
H5F_t *f = NULL;
H5C_t *cache_ptr = NULL;
H5AC_cache_config_t config;
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
herr_t ret;
file_id = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl);
@@ -475,7 +475,7 @@ create_file(const char *filename, hid_t fcpl, hid_t fapl, int metadata_write_str
/* Push API context */
ret = H5CX_push();
VRFY((ret == 0), "H5CX_push()");
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
f = (H5F_t *)H5I_object(file_id);
VRFY((f != NULL), "");
@@ -483,7 +483,7 @@ create_file(const char *filename, hid_t fcpl, hid_t fapl, int metadata_write_str
cache_ptr = f->shared->cache;
VRFY((cache_ptr->magic == H5C__H5C_T_MAGIC), "");
- cache_ptr->ignore_tags = TRUE;
+ cache_ptr->ignore_tags = true;
H5C_stats__reset(cache_ptr);
config.version = H5AC__CURR_CACHE_CONFIG_VERSION;
@@ -529,25 +529,25 @@ create_file(const char *filename, hid_t fcpl, hid_t fapl, int metadata_write_str
VRFY((mem_dataspace >= 0), "");
for (k = 0; k < NUM_DSETS; k++) {
- HDsnprintf(dset_name, sizeof(dset_name), "D1dset%d", k);
+ snprintf(dset_name, sizeof(dset_name), "D1dset%d", k);
dset_id = H5Dcreate2(grp_id, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
VRFY((dset_id >= 0), "");
ret = H5Dclose(dset_id);
VRFY((ret == 0), "");
- HDsnprintf(dset_name, sizeof(dset_name), "D2dset%d", k);
+ snprintf(dset_name, sizeof(dset_name), "D2dset%d", k);
dset_id = H5Dcreate2(grp_id, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
VRFY((dset_id >= 0), "");
ret = H5Dclose(dset_id);
VRFY((ret == 0), "");
- HDsnprintf(dset_name, sizeof(dset_name), "D3dset%d", k);
+ snprintf(dset_name, sizeof(dset_name), "D3dset%d", k);
dset_id = H5Dcreate2(grp_id, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
VRFY((dset_id >= 0), "");
ret = H5Dclose(dset_id);
VRFY((ret == 0), "");
- HDsnprintf(dset_name, sizeof(dset_name), "dset%d", k);
+ snprintf(dset_name, sizeof(dset_name), "dset%d", k);
dset_id = H5Dcreate2(grp_id, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
VRFY((dset_id >= 0), "");
@@ -570,13 +570,13 @@ create_file(const char *filename, hid_t fcpl, hid_t fapl, int metadata_write_str
for (i = 0; i < num_elements; i++)
VRFY((data_array[i] == mpi_rank + 1), "Dataset Verify failed");
- HDsnprintf(dset_name, sizeof(dset_name), "D1dset%d", k);
+ snprintf(dset_name, sizeof(dset_name), "D1dset%d", k);
ret = H5Ldelete(grp_id, dset_name, H5P_DEFAULT);
VRFY((ret == 0), "");
- HDsnprintf(dset_name, sizeof(dset_name), "D2dset%d", k);
+ snprintf(dset_name, sizeof(dset_name), "D2dset%d", k);
ret = H5Ldelete(grp_id, dset_name, H5P_DEFAULT);
VRFY((ret == 0), "");
- HDsnprintf(dset_name, sizeof(dset_name), "D3dset%d", k);
+ snprintf(dset_name, sizeof(dset_name), "D3dset%d", k);
ret = H5Ldelete(grp_id, dset_name, H5P_DEFAULT);
VRFY((ret == 0), "");
}
@@ -592,9 +592,9 @@ create_file(const char *filename, hid_t fcpl, hid_t fapl, int metadata_write_str
/* Pop API context */
if (api_ctx_pushed) {
- ret = H5CX_pop(FALSE);
+ ret = H5CX_pop(false);
VRFY((ret == 0), "H5CX_pop()");
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
}
MPI_Barrier(MPI_COMM_WORLD);
@@ -620,7 +620,7 @@ open_file(const char *filename, hid_t fapl, int metadata_write_strategy, hsize_t
H5F_t *f = NULL;
H5C_t *cache_ptr = NULL;
H5AC_cache_config_t config;
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
herr_t ret;
config.version = H5AC__CURR_CACHE_CONFIG_VERSION;
@@ -639,7 +639,7 @@ open_file(const char *filename, hid_t fapl, int metadata_write_strategy, hsize_t
/* Push API context */
ret = H5CX_push();
VRFY((ret == 0), "H5CX_push()");
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
ret = H5Fflush(file_id, H5F_SCOPE_GLOBAL);
VRFY((ret == 0), "");
@@ -682,7 +682,7 @@ open_file(const char *filename, hid_t fapl, int metadata_write_strategy, hsize_t
VRFY((mem_dataspace >= 0), "");
for (k = 0; k < NUM_DSETS; k++) {
- HDsnprintf(dset_name, sizeof(dset_name), "dset%d", k);
+ snprintf(dset_name, sizeof(dset_name), "dset%d", k);
dset_id = H5Dopen2(grp_id, dset_name, H5P_DEFAULT);
VRFY((dset_id >= 0), "");
@@ -728,7 +728,7 @@ open_file(const char *filename, hid_t fapl, int metadata_write_strategy, hsize_t
while (entry_ptr != NULL) {
assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- assert(entry_ptr->is_dirty == FALSE);
+ assert(entry_ptr->is_dirty == false);
if (!entry_ptr->is_pinned && !entry_ptr->is_protected) {
ret = H5AC_expunge_entry(f, entry_ptr->type, entry_ptr->addr, 0);
@@ -756,9 +756,9 @@ open_file(const char *filename, hid_t fapl, int metadata_write_strategy, hsize_t
/* Pop API context */
if (api_ctx_pushed) {
- ret = H5CX_pop(FALSE);
+ ret = H5CX_pop(false);
VRFY((ret == 0), "H5CX_pop()");
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
}
free(data_array);
@@ -778,7 +778,7 @@ test_file_properties(void)
hid_t fid = H5I_INVALID_HID; /* HDF5 file ID */
hid_t fapl_id = H5I_INVALID_HID; /* File access plist */
hid_t fapl_copy_id = H5I_INVALID_HID; /* File access plist */
- hbool_t is_coll;
+ bool is_coll;
htri_t are_equal;
const char *filename;
MPI_Comm comm = MPI_COMM_WORLD;
@@ -847,7 +847,7 @@ test_file_properties(void)
fapl_copy_id = H5Pcopy(fapl_id);
VRFY((fapl_copy_id != H5I_INVALID_HID), "H5Pcopy");
are_equal = H5Pequal(fapl_id, fapl_copy_id);
- VRFY((TRUE == are_equal), "H5Pequal");
+ VRFY((true == are_equal), "H5Pequal");
/* Add a property to the copy and ensure it's different now */
mpi_ret = MPI_Info_set(info, "hdf_info_prop2", "abc");
@@ -855,7 +855,7 @@ test_file_properties(void)
ret = H5Pset_mpi_params(fapl_copy_id, comm, info);
VRFY((ret >= 0), "H5Pset_mpi_params succeeded");
are_equal = H5Pequal(fapl_id, fapl_copy_id);
- VRFY((FALSE == are_equal), "H5Pequal");
+ VRFY((false == are_equal), "H5Pequal");
/* Add a property with the same key but a different value to the original
* and ensure they are still different.
@@ -865,7 +865,7 @@ test_file_properties(void)
ret = H5Pset_mpi_params(fapl_id, comm, info);
VRFY((ret >= 0), "H5Pset_mpi_params succeeded");
are_equal = H5Pequal(fapl_id, fapl_copy_id);
- VRFY((FALSE == are_equal), "H5Pequal");
+ VRFY((false == are_equal), "H5Pequal");
/* Set the second property in the original to the same
* value as the copy and ensure they are the same now.
@@ -875,7 +875,7 @@ test_file_properties(void)
ret = H5Pset_mpi_params(fapl_id, comm, info);
VRFY((ret >= 0), "H5Pset_mpi_params succeeded");
are_equal = H5Pequal(fapl_id, fapl_copy_id);
- VRFY((TRUE == are_equal), "H5Pequal");
+ VRFY((true == are_equal), "H5Pequal");
/* create the file */
fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
@@ -886,12 +886,12 @@ test_file_properties(void)
/* Collective metadata writes */
ret = H5Pget_coll_metadata_write(fapl_id, &is_coll);
VRFY((ret >= 0), "H5Pget_coll_metadata_write succeeded");
- VRFY((is_coll == FALSE), "Incorrect property setting for coll metadata writes");
+ VRFY((is_coll == false), "Incorrect property setting for coll metadata writes");
/* Collective metadata read API calling requirement */
ret = H5Pget_all_coll_metadata_ops(fapl_id, &is_coll);
VRFY((ret >= 0), "H5Pget_all_coll_metadata_ops succeeded");
- VRFY((is_coll == FALSE), "Incorrect property setting for coll metadata API calls requirement");
+ VRFY((is_coll == false), "Incorrect property setting for coll metadata API calls requirement");
ret = H5Fclose(fid);
VRFY((ret >= 0), "H5Fclose succeeded");
@@ -907,12 +907,12 @@ test_file_properties(void)
/* Collective metadata writes */
ret = H5Pget_coll_metadata_write(fapl_id, &is_coll);
VRFY((ret >= 0), "H5Pget_coll_metadata_write succeeded");
- VRFY((is_coll == FALSE), "Incorrect property setting for coll metadata writes");
+ VRFY((is_coll == false), "Incorrect property setting for coll metadata writes");
/* Collective metadata read API calling requirement */
ret = H5Pget_all_coll_metadata_ops(fapl_id, &is_coll);
VRFY((ret >= 0), "H5Pget_all_coll_metadata_ops succeeded");
- VRFY((is_coll == FALSE), "Incorrect property setting for coll metadata API calls requirement");
+ VRFY((is_coll == false), "Incorrect property setting for coll metadata API calls requirement");
ret = H5Fclose(fid);
VRFY((ret >= 0), "H5Fclose succeeded");
@@ -921,10 +921,10 @@ test_file_properties(void)
ret = H5Pset_fapl_mpio(fapl_id, comm, info);
VRFY((ret >= 0), "H5Pset_fapl_mpio failed");
/* Collective metadata writes */
- ret = H5Pset_coll_metadata_write(fapl_id, TRUE);
+ ret = H5Pset_coll_metadata_write(fapl_id, true);
VRFY((ret >= 0), "H5Pget_coll_metadata_write succeeded");
/* Collective metadata read API calling requirement */
- ret = H5Pset_all_coll_metadata_ops(fapl_id, TRUE);
+ ret = H5Pset_all_coll_metadata_ops(fapl_id, true);
VRFY((ret >= 0), "H5Pget_all_coll_metadata_ops succeeded");
fid = H5Fopen(filename, H5F_ACC_RDWR, fapl_id);
VRFY((fid != H5I_INVALID_HID), "H5Fcreate succeeded");
@@ -934,12 +934,12 @@ test_file_properties(void)
/* Collective metadata writes */
ret = H5Pget_coll_metadata_write(fapl_id, &is_coll);
VRFY((ret >= 0), "H5Pget_coll_metadata_write succeeded");
- VRFY((is_coll == TRUE), "Incorrect property setting for coll metadata writes");
+ VRFY((is_coll == true), "Incorrect property setting for coll metadata writes");
/* Collective metadata read API calling requirement */
ret = H5Pget_all_coll_metadata_ops(fapl_id, &is_coll);
VRFY((ret >= 0), "H5Pget_all_coll_metadata_ops succeeded");
- VRFY((is_coll == TRUE), "Incorrect property setting for coll metadata API calls requirement");
+ VRFY((is_coll == true), "Incorrect property setting for coll metadata API calls requirement");
/* close fapl and retrieve it from file */
ret = H5Pclose(fapl_id);
@@ -954,12 +954,12 @@ test_file_properties(void)
/* Collective metadata writes */
ret = H5Pget_coll_metadata_write(fapl_id, &is_coll);
VRFY((ret >= 0), "H5Pget_coll_metadata_write succeeded");
- VRFY((is_coll == TRUE), "Incorrect property setting for coll metadata writes");
+ VRFY((is_coll == true), "Incorrect property setting for coll metadata writes");
/* Collective metadata read API calling requirement */
ret = H5Pget_all_coll_metadata_ops(fapl_id, &is_coll);
VRFY((ret >= 0), "H5Pget_all_coll_metadata_ops succeeded");
- VRFY((is_coll == TRUE), "Incorrect property setting for coll metadata API calls requirement");
+ VRFY((is_coll == true), "Incorrect property setting for coll metadata API calls requirement");
/* close file */
ret = H5Fclose(fid);
@@ -1022,7 +1022,7 @@ test_delete(void)
/* Verify that the file is an HDF5 file */
is_hdf5 = H5Fis_accessible(filename, fapl_id);
- VRFY((TRUE == is_hdf5), "H5Fis_accessible");
+ VRFY((true == is_hdf5), "H5Fis_accessible");
/* Delete the file */
ret = H5Fdelete(filename, fapl_id);
diff --git a/testpar/API/t_file_image.c b/testpar/API/t_file_image.c
index 16cd5217874..3b582adbcc1 100644
--- a/testpar/API/t_file_image.c
+++ b/testpar/API/t_file_image.c
@@ -78,7 +78,7 @@ file_image_daisy_chain_test(void)
void *image_ptr = NULL;
ssize_t bytes_read;
ssize_t image_len;
- hbool_t vector_ok = TRUE;
+ bool vector_ok = true;
htri_t tri_result;
/* set up MPI parameters */
@@ -100,7 +100,7 @@ file_image_daisy_chain_test(void)
}
/* setup file name */
- HDsnprintf(file_name, 1024, "file_image_daisy_chain_test_%05d.h5", (int)mpi_rank);
+ snprintf(file_name, 1024, "file_image_daisy_chain_test_%05d.h5", (int)mpi_rank);
if (mpi_rank == 0) {
@@ -110,7 +110,7 @@ file_image_daisy_chain_test(void)
fapl_id = H5Pcreate(H5P_FILE_ACCESS);
VRFY((fapl_id >= 0), "creating fapl");
- err = H5Pset_fapl_core(fapl_id, (size_t)(64 * 1024), FALSE);
+ err = H5Pset_fapl_core(fapl_id, (size_t)(64 * 1024), false);
VRFY((err >= 0), "setting core file driver in fapl.");
file_id = H5Fcreate(file_name, 0, H5P_DEFAULT, fapl_id);
@@ -199,7 +199,7 @@ file_image_daisy_chain_test(void)
fapl_id = H5Pcreate(H5P_FILE_ACCESS);
VRFY((fapl_id >= 0), "creating fapl");
- err = H5Pset_fapl_core(fapl_id, (size_t)(64 * 1024), FALSE);
+ err = H5Pset_fapl_core(fapl_id, (size_t)(64 * 1024), false);
VRFY((err >= 0), "setting core file driver in fapl.");
err = H5Pset_file_image(fapl_id, image_ptr, (size_t)image_len);
@@ -215,7 +215,7 @@ file_image_daisy_chain_test(void)
VRFY((dset_type_id >= 0), "obtained data set type");
tri_result = H5Tequal(dset_type_id, H5T_NATIVE_INT);
- VRFY((tri_result == TRUE), "verified data set type");
+ VRFY((tri_result == true), "verified data set type");
space_id = H5Dget_space(dset_id);
VRFY((space_id >= 0), "opened data space");
@@ -233,10 +233,10 @@ file_image_daisy_chain_test(void)
err = H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *)vector_ptr);
VRFY((err >= 0), "read received vector.");
- vector_ok = TRUE;
+ vector_ok = true;
for (i = 0; i < mpi_size; i++)
if (vector_ptr[i] != i)
- vector_ok = FALSE;
+ vector_ok = false;
VRFY((vector_ok), "verified received vector.");
free(vector_ptr);
@@ -281,7 +281,7 @@ file_image_daisy_chain_test(void)
fapl_id = H5Pcreate(H5P_FILE_ACCESS);
VRFY((fapl_id >= 0), "creating fapl");
- err = H5Pset_fapl_core(fapl_id, (size_t)(64 * 1024), FALSE);
+ err = H5Pset_fapl_core(fapl_id, (size_t)(64 * 1024), false);
VRFY((err >= 0), "setting core file driver in fapl.");
err = H5Pset_file_image(fapl_id, image_ptr, (size_t)image_len);
@@ -298,7 +298,7 @@ file_image_daisy_chain_test(void)
VRFY((dset_type_id >= 0), "obtained data set type");
tri_result = H5Tequal(dset_type_id, H5T_NATIVE_INT);
- VRFY((tri_result == TRUE), "verified data set type");
+ VRFY((tri_result == true), "verified data set type");
space_id = H5Dget_space(dset_id);
VRFY((space_id >= 0), "opened data space");
@@ -316,15 +316,15 @@ file_image_daisy_chain_test(void)
err = H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *)vector_ptr);
VRFY((err >= 0), "read received vector.");
- vector_ok = TRUE;
+ vector_ok = true;
for (i = 0; i < mpi_size; i++) {
if (i < mpi_rank) {
if (vector_ptr[i] != i)
- vector_ok = FALSE;
+ vector_ok = false;
}
else {
if (vector_ptr[i] != -1)
- vector_ok = FALSE;
+ vector_ok = false;
}
}
VRFY((vector_ok), "verified received vector.");
diff --git a/testpar/API/t_filter_read.c b/testpar/API/t_filter_read.c
index 06507e4227c..7275dd98b2a 100644
--- a/testpar/API/t_filter_read.c
+++ b/testpar/API/t_filter_read.c
@@ -189,7 +189,7 @@ filter_read_internal(const char *filename, hid_t dcpl, hsize_t *dset_size)
(unsigned long)(hs_offset[1] + j));
fprintf(stderr, " At original: %d\n", (int)points[i * size[1] + (size_t)hs_offset[1] + j]);
fprintf(stderr, " At returned: %d\n", (int)check[i * hs_size[1] + j]);
- VRFY(FALSE, "");
+ VRFY(false, "");
}
}
}
diff --git a/testpar/API/t_mdset.c b/testpar/API/t_mdset.c
index cc49e7baf1f..7c97898252d 100644
--- a/testpar/API/t_mdset.c
+++ b/testpar/API/t_mdset.c
@@ -211,7 +211,7 @@ multiple_dset_write(void)
VRFY((ret >= 0), "set fill-value succeeded");
for (n = 0; n < ndatasets; n++) {
- HDsnprintf(dname, sizeof(dname), "dataset %d", n);
+ snprintf(dname, sizeof(dname), "dataset %d", n);
dataset = H5Dcreate2(iof, dname, H5T_NATIVE_DOUBLE, filespace, H5P_DEFAULT, dcpl, H5P_DEFAULT);
VRFY((dataset > 0), dname);
@@ -253,7 +253,7 @@ compact_dataset(void)
herr_t ret;
const char *filename;
#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
- hbool_t prop_value;
+ bool prop_value;
#endif
size = get_size();
@@ -354,10 +354,10 @@ compact_dataset(void)
VRFY((ret >= 0), "H5Dread succeeded");
#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
- prop_value = FALSE;
+ prop_value = false;
ret = H5Pget(dxpl, H5D_XFER_COLL_RANK0_BCAST_NAME, &prop_value);
VRFY((ret >= 0), "H5Pget succeeded");
- VRFY((prop_value == FALSE && dxfer_coll_type == DXFER_COLLECTIVE_IO),
+ VRFY((prop_value == false && dxfer_coll_type == DXFER_COLLECTIVE_IO),
"rank 0 Bcast optimization was performed for a compact dataset");
#endif /* H5_HAVE_INSTRUMENTED_LIBRARY */
@@ -658,7 +658,7 @@ dataset_fillvalue(void)
herr_t ret; /* Generic return value */
const char *filename;
#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
- hbool_t prop_value;
+ bool prop_value;
#endif
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
@@ -737,13 +737,13 @@ dataset_fillvalue(void)
VRFY((ret >= 0), "H5Dread succeeded");
#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
- prop_value = FALSE;
+ prop_value = false;
ret = H5Pget(dxpl, H5D_XFER_COLL_RANK0_BCAST_NAME, &prop_value);
VRFY((ret >= 0), "testing property list get succeeded");
if (ii == 0)
- VRFY((prop_value == FALSE), "correctly handled rank 0 Bcast");
+ VRFY((prop_value == false), "correctly handled rank 0 Bcast");
else
- VRFY((prop_value == TRUE), "correctly handled rank 0 Bcast");
+ VRFY((prop_value == true), "correctly handled rank 0 Bcast");
#endif /* H5_HAVE_INSTRUMENTED_LIBRARY */
/* Verify all data read are the fill value 0 */
@@ -827,13 +827,13 @@ dataset_fillvalue(void)
VRFY((ret >= 0), "H5Dread succeeded");
#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
- prop_value = FALSE;
+ prop_value = false;
ret = H5Pget(dxpl, H5D_XFER_COLL_RANK0_BCAST_NAME, &prop_value);
VRFY((ret >= 0), "testing property list get succeeded");
if (ii == 0)
- VRFY((prop_value == FALSE), "correctly handled rank 0 Bcast");
+ VRFY((prop_value == false), "correctly handled rank 0 Bcast");
else
- VRFY((prop_value == TRUE), "correctly handled rank 0 Bcast");
+ VRFY((prop_value == true), "correctly handled rank 0 Bcast");
#endif /* H5_HAVE_INSTRUMENTED_LIBRARY */
/* Verify correct data read */
@@ -975,11 +975,11 @@ collective_group_write(void)
/* creates ngroups groups under the root group, writes chunked
* datasets in parallel. */
for (m = 0; m < ngroups; m++) {
- HDsnprintf(gname, sizeof(gname), "group%d", m);
+ snprintf(gname, sizeof(gname), "group%d", m);
gid = H5Gcreate2(fid, gname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
VRFY((gid > 0), gname);
- HDsnprintf(dname, sizeof(dname), "dataset%d", m);
+ snprintf(dname, sizeof(dname), "dataset%d", m);
did = H5Dcreate2(gid, dname, H5T_NATIVE_INT, filespace, H5P_DEFAULT, dcpl, H5P_DEFAULT);
VRFY((did > 0), dname);
@@ -1051,7 +1051,7 @@ independent_group_read(void)
}
plist = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type);
- H5Pset_all_coll_metadata_ops(plist, FALSE);
+ H5Pset_all_coll_metadata_ops(plist, false);
fid = H5Fopen(filename, H5F_ACC_RDONLY, plist);
VRFY((fid > 0), "H5Fopen");
@@ -1093,12 +1093,12 @@ group_dataset_read(hid_t fid, int mpi_rank, int m)
VRFY((outdata != NULL), "malloc succeeded for outdata");
/* open every group under root group. */
- HDsnprintf(gname, sizeof(gname), "group%d", m);
+ snprintf(gname, sizeof(gname), "group%d", m);
gid = H5Gopen2(fid, gname, H5P_DEFAULT);
VRFY((gid > 0), gname);
/* check the data. */
- HDsnprintf(dname, sizeof(dname), "dataset%d", m);
+ snprintf(dname, sizeof(dname), "dataset%d", m);
did = H5Dopen2(gid, dname, H5P_DEFAULT);
VRFY((did > 0), dname);
@@ -1211,7 +1211,7 @@ multiple_group_write(void)
/* creates ngroups groups under the root group, writes datasets in
* parallel. */
for (m = 0; m < ngroups; m++) {
- HDsnprintf(gname, sizeof(gname), "group%d", m);
+ snprintf(gname, sizeof(gname), "group%d", m);
gid = H5Gcreate2(fid, gname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
VRFY((gid > 0), gname);
@@ -1267,7 +1267,7 @@ write_dataset(hid_t memspace, hid_t filespace, hid_t gid)
VRFY((outme != NULL), "malloc succeeded for outme");
for (n = 0; n < NDATASET; n++) {
- HDsnprintf(dname, sizeof(dname), "dataset%d", n);
+ snprintf(dname, sizeof(dname), "dataset%d", n);
did = H5Dcreate2(gid, dname, H5T_NATIVE_INT, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
VRFY((did > 0), dname);
@@ -1305,7 +1305,7 @@ create_group_recursive(hid_t memspace, hid_t filespace, hid_t gid, int counter)
}
#endif /* BARRIER_CHECKS */
- HDsnprintf(gname, sizeof(gname), "%dth_child_group", counter + 1);
+ snprintf(gname, sizeof(gname), "%dth_child_group", counter + 1);
child_gid = H5Gcreate2(gid, gname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
VRFY((child_gid > 0), gname);
@@ -1376,7 +1376,7 @@ multiple_group_read(void)
/* open every group under root group. */
for (m = 0; m < ngroups; m++) {
- HDsnprintf(gname, sizeof(gname), "group%d", m);
+ snprintf(gname, sizeof(gname), "group%d", m);
gid = H5Gopen2(fid, gname, H5P_DEFAULT);
VRFY((gid > 0), gname);
@@ -1433,7 +1433,7 @@ read_dataset(hid_t memspace, hid_t filespace, hid_t gid)
VRFY((outdata != NULL), "malloc succeeded for outdata");
for (n = 0; n < NDATASET; n++) {
- HDsnprintf(dname, sizeof(dname), "dataset%d", n);
+ snprintf(dname, sizeof(dname), "dataset%d", n);
did = H5Dopen2(gid, dname, H5P_DEFAULT);
VRFY((did > 0), dname);
@@ -1484,7 +1484,7 @@ recursive_read_group(hid_t memspace, hid_t filespace, hid_t gid, int counter)
nerrors += err_num;
if (counter < GROUP_DEPTH) {
- HDsnprintf(gname, sizeof(gname), "%dth_child_group", counter + 1);
+ snprintf(gname, sizeof(gname), "%dth_child_group", counter + 1);
child_gid = H5Gopen2(gid, gname, H5P_DEFAULT);
VRFY((child_gid > 0), gname);
recursive_read_group(memspace, filespace, child_gid, counter + 1);
@@ -1506,7 +1506,7 @@ write_attribute(hid_t obj_id, int this_type, int num)
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
if (this_type == is_group) {
- HDsnprintf(attr_name, sizeof(attr_name), "Group Attribute %d", num);
+ snprintf(attr_name, sizeof(attr_name), "Group Attribute %d", num);
sid = H5Screate(H5S_SCALAR);
aid = H5Acreate2(obj_id, attr_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT);
H5Awrite(aid, H5T_NATIVE_INT, &num);
@@ -1514,7 +1514,7 @@ write_attribute(hid_t obj_id, int this_type, int num)
H5Sclose(sid);
} /* end if */
else if (this_type == is_dset) {
- HDsnprintf(attr_name, sizeof(attr_name), "Dataset Attribute %d", num);
+ snprintf(attr_name, sizeof(attr_name), "Dataset Attribute %d", num);
for (i = 0; i < 8; i++)
attr_data[i] = i;
sid = H5Screate_simple(dspace_rank, dspace_dims, NULL);
@@ -1537,14 +1537,14 @@ read_attribute(hid_t obj_id, int this_type, int num)
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
if (this_type == is_group) {
- HDsnprintf(attr_name, sizeof(attr_name), "Group Attribute %d", num);
+ snprintf(attr_name, sizeof(attr_name), "Group Attribute %d", num);
aid = H5Aopen(obj_id, attr_name, H5P_DEFAULT);
H5Aread(aid, H5T_NATIVE_INT, &in_num);
vrfy_errors = dataset_vrfy(NULL, NULL, NULL, group_block, &in_num, &num);
H5Aclose(aid);
}
else if (this_type == is_dset) {
- HDsnprintf(attr_name, sizeof(attr_name), "Dataset Attribute %d", num);
+ snprintf(attr_name, sizeof(attr_name), "Dataset Attribute %d", num);
for (i = 0; i < 8; i++)
out_data[i] = i;
aid = H5Aopen(obj_id, attr_name, H5P_DEFAULT);
@@ -1664,8 +1664,8 @@ io_mode_confusion(void)
* test bed related variables
*/
- const char *fcn_name = "io_mode_confusion";
- const hbool_t verbose = FALSE;
+ const char *fcn_name = "io_mode_confusion";
+ const bool verbose = false;
#if 0
const H5Ptest_param_t *pt;
#endif
@@ -1931,8 +1931,8 @@ rr_obj_hdr_flush_confusion(void)
MPI_Comm comm;
/* test bed related variables */
- const char *fcn_name = "rr_obj_hdr_flush_confusion";
- const hbool_t verbose = FALSE;
+ const char *fcn_name = "rr_obj_hdr_flush_confusion";
+ const bool verbose = false;
/* Create two new private communicators from MPI_COMM_WORLD.
* Even and odd ranked processes go to comm_writers and comm_readers
@@ -2022,8 +2022,8 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
int steps_done = 0;
/* test bed related variables */
- const char *fcn_name = "rr_obj_hdr_flush_confusion_writer";
- const hbool_t verbose = FALSE;
+ const char *fcn_name = "rr_obj_hdr_flush_confusion_writer";
+ const bool verbose = false;
#if 0
const H5Ptest_param_t *pt;
#endif
@@ -2405,8 +2405,8 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
int steps_done = -1; /* How far (steps) have been verified */
/* test bed related variables */
- const char *fcn_name = "rr_obj_hdr_flush_confusion_reader";
- const hbool_t verbose = FALSE;
+ const char *fcn_name = "rr_obj_hdr_flush_confusion_reader";
+ const bool verbose = false;
#if 0
const H5Ptest_param_t *pt;
#endif
diff --git a/testpar/API/t_prop.c b/testpar/API/t_prop.c
index 9c919061fcf..a4d90c4d70b 100644
--- a/testpar/API/t_prop.c
+++ b/testpar/API/t_prop.c
@@ -119,12 +119,12 @@ test_plist_ed(void)
hsize_t max_size[1]; /*data space maximum size */
const char *c_to_f = "x+32";
H5AC_cache_config_t my_cache_config = {H5AC__CURR_CACHE_CONFIG_VERSION,
- TRUE,
- FALSE,
- FALSE,
+ true,
+ false,
+ false,
"temp",
- TRUE,
- FALSE,
+ true,
+ false,
(2 * 2048 * 1024),
0.3,
(64 * 1024 * 1024),
@@ -133,7 +133,7 @@ test_plist_ed(void)
H5C_incr__threshold,
0.8,
3.0,
- TRUE,
+ true,
(8 * 1024 * 1024),
H5C_flash_incr__add_space,
2.0,
@@ -141,10 +141,10 @@ test_plist_ed(void)
H5C_decr__age_out_with_threshold,
0.997,
0.8,
- TRUE,
+ true,
(3 * 1024 * 1024),
3,
- FALSE,
+ false,
0.2,
(256 * 2048),
1 /* H5AC__DEFAULT_METADATA_WRITE_STRATEGY */};
@@ -290,7 +290,7 @@ test_plist_ed(void)
lcpl = H5Pcreate(H5P_LINK_CREATE);
VRFY((lcpl >= 0), "H5Pcreate succeeded");
- ret = H5Pset_create_intermediate_group(lcpl, TRUE);
+ ret = H5Pset_create_intermediate_group(lcpl, true);
VRFY((ret >= 0), "H5Pset_create_intermediate_group succeeded");
ret = test_encode_decode(lcpl, mpi_rank, recv_proc);
@@ -569,7 +569,7 @@ external_links(void)
/* test opening a group that is to an external link, the external linked
file should inherit the source file's access properties */
- HDsnprintf(link_path, sizeof(link_path), "%s%s%s", group_path, "/", link_name);
+ snprintf(link_path, sizeof(link_path), "%s%s%s", group_path, "/", link_name);
group = H5Gopen2(fid, link_path, H5P_DEFAULT);
VRFY((group >= 0), "H5Gopen succeeded");
ret = H5Gclose(group);
@@ -600,10 +600,10 @@ external_links(void)
VRFY((ret >= 0), "H5Pset_elink_fapl succeeded");
tri_status = H5Lexists(fid, link_path, H5P_DEFAULT);
- VRFY((tri_status == TRUE), "H5Lexists succeeded");
+ VRFY((tri_status == true), "H5Lexists succeeded");
tri_status = H5Lexists(fid, link_path, lapl);
- VRFY((tri_status == TRUE), "H5Lexists succeeded");
+ VRFY((tri_status == true), "H5Lexists succeeded");
group = H5Oopen(fid, link_path, H5P_DEFAULT);
VRFY((group >= 0), "H5Oopen succeeded");
diff --git a/testpar/API/t_shapesame.c b/testpar/API/t_shapesame.c
index 06bb4ff135f..004ce1e35b2 100644
--- a/testpar/API/t_shapesame.c
+++ b/testpar/API/t_shapesame.c
@@ -130,14 +130,14 @@ struct hs_dr_pio_test_vars_t {
static void
hs_dr_pio_test__setup(const int test_num, const int edge_size, const int checker_edge_size,
const int chunk_edge_size, const int small_rank, const int large_rank,
- const hbool_t use_collective_io, const hid_t dset_type, const int express_test,
+ const bool use_collective_io, const hid_t dset_type, const int express_test,
struct hs_dr_pio_test_vars_t *tv_ptr)
{
#if CONTIG_HS_DR_PIO_TEST__SETUP__DEBUG
const char *fcnName = "hs_dr_pio_test__setup()";
#endif /* CONTIG_HS_DR_PIO_TEST__SETUP__DEBUG */
const char *filename;
- hbool_t mis_match = FALSE;
+ bool mis_match = false;
int i;
int mrc;
int mpi_rank; /* needed by the VRFY macro */
@@ -470,7 +470,7 @@ hs_dr_pio_test__setup(const int test_num, const int edge_size, const int checker
/* verify that the correct data was written to the small data set */
expected_value = 0;
- mis_match = FALSE;
+ mis_match = false;
ptr_1 = tv_ptr->small_ds_buf_1;
i = 0;
@@ -478,12 +478,12 @@ hs_dr_pio_test__setup(const int test_num, const int edge_size, const int checker
if (*ptr_1 != expected_value) {
- mis_match = TRUE;
+ mis_match = true;
}
ptr_1++;
expected_value++;
}
- VRFY((mis_match == FALSE), "small ds init data good.");
+ VRFY((mis_match == false), "small ds init data good.");
/* setup selections for writing initial data to the large data set */
@@ -541,7 +541,7 @@ hs_dr_pio_test__setup(const int test_num, const int edge_size, const int checker
/* verify that the correct data was written to the large data set */
expected_value = 0;
- mis_match = FALSE;
+ mis_match = false;
ptr_1 = tv_ptr->large_ds_buf_1;
i = 0;
@@ -549,12 +549,12 @@ hs_dr_pio_test__setup(const int test_num, const int edge_size, const int checker
if (*ptr_1 != expected_value) {
- mis_match = TRUE;
+ mis_match = true;
}
ptr_1++;
expected_value++;
}
- VRFY((mis_match == FALSE), "large ds init data good.");
+ VRFY((mis_match == false), "large ds init data good.");
/* sync with the other processes before changing data */
mrc = MPI_Barrier(MPI_COMM_WORLD);
@@ -702,7 +702,7 @@ contig_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
#if CONTIG_HS_DR_PIO_TEST__D2M_L2S__DEBUG
const char *fcnName = "contig_hs_dr_pio_test__run_test()";
#endif /* CONTIG_HS_DR_PIO_TEST__D2M_L2S__DEBUG */
- hbool_t mis_match = FALSE;
+ bool mis_match = false;
int i, j, k, l;
size_t n;
int mpi_rank; /* needed by the VRFY macro */
@@ -824,7 +824,7 @@ contig_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
* selections as having the same shape.
*/
check = H5Sselect_shape_same(tv_ptr->small_ds_slice_sid, tv_ptr->file_large_ds_sid_0);
- VRFY((check == TRUE), "H5Sselect_shape_same passed");
+ VRFY((check == true), "H5Sselect_shape_same passed");
/* Read selection from disk */
#if CONTIG_HS_DR_PIO_TEST__D2M_L2S__DEBUG
@@ -842,7 +842,7 @@ contig_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
/* verify that expected data is retrieved */
- mis_match = FALSE;
+ mis_match = false;
ptr_1 = tv_ptr->small_ds_slice_buf;
expected_value =
(uint32_t)((i * tv_ptr->edge_size * tv_ptr->edge_size * tv_ptr->edge_size *
@@ -854,7 +854,7 @@ contig_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
if (*ptr_1 != expected_value) {
- mis_match = TRUE;
+ mis_match = true;
}
*ptr_1 = 0; /* zero data for next use */
@@ -863,7 +863,7 @@ contig_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
expected_value++;
}
- VRFY((mis_match == FALSE), "small slice read from large ds data good.");
+ VRFY((mis_match == false), "small slice read from large ds data good.");
(tv_ptr->tests_run)++;
}
@@ -910,7 +910,7 @@ contig_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
#if CONTIG_HS_DR_PIO_TEST__D2M_S2L__DEBUG
const char *fcnName = "contig_hs_dr_pio_test__d2m_s2l()";
#endif /* CONTIG_HS_DR_PIO_TEST__D2M_S2L__DEBUG */
- hbool_t mis_match = FALSE;
+ bool mis_match = false;
int i, j, k, l;
size_t n;
int mpi_rank; /* needed by the VRFY macro */
@@ -1053,7 +1053,7 @@ contig_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
* selections as having the same shape.
*/
check = H5Sselect_shape_same(tv_ptr->file_small_ds_sid_0, tv_ptr->mem_large_ds_sid);
- VRFY((check == TRUE), "H5Sselect_shape_same passed");
+ VRFY((check == true), "H5Sselect_shape_same passed");
/* Read selection from disk */
#if CONTIG_HS_DR_PIO_TEST__D2M_S2L__DEBUG
@@ -1089,7 +1089,7 @@ contig_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
if (*ptr_1 != expected_value) {
- mis_match = TRUE;
+ mis_match = true;
}
expected_value++;
}
@@ -1097,7 +1097,7 @@ contig_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
if (*ptr_1 != 0) {
- mis_match = TRUE;
+ mis_match = true;
}
}
/* zero out the value for the next pass */
@@ -1106,7 +1106,7 @@ contig_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
ptr_1++;
}
- VRFY((mis_match == FALSE), "small slice read from large ds data good.");
+ VRFY((mis_match == false), "small slice read from large ds data good.");
(tv_ptr->tests_run)++;
}
@@ -1155,7 +1155,7 @@ contig_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
#if CONTIG_HS_DR_PIO_TEST__M2D_L2S__DEBUG
const char *fcnName = "contig_hs_dr_pio_test__m2d_l2s()";
#endif /* CONTIG_HS_DR_PIO_TEST__M2D_L2S__DEBUG */
- hbool_t mis_match = FALSE;
+ bool mis_match = false;
int i, j, k, l;
size_t n;
int mpi_rank; /* needed by the VRFY macro */
@@ -1319,7 +1319,7 @@ contig_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
* on disk full square selections as having the same shape.
*/
check = H5Sselect_shape_same(tv_ptr->file_small_ds_sid_0, tv_ptr->mem_large_ds_sid);
- VRFY((check == TRUE), "H5Sselect_shape_same passed.");
+ VRFY((check == true), "H5Sselect_shape_same passed.");
/* write the slice from the in memory large data set to the
* slice of the on disk small dataset. */
@@ -1342,7 +1342,7 @@ contig_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
/* verify that expected data is retrieved */
- mis_match = FALSE;
+ mis_match = false;
ptr_1 = tv_ptr->small_ds_buf_1;
expected_value =
@@ -1363,7 +1363,7 @@ contig_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
if (*ptr_1 != expected_value) {
- mis_match = TRUE;
+ mis_match = true;
}
expected_value++;
}
@@ -1371,7 +1371,7 @@ contig_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
if (*ptr_1 != 0) {
- mis_match = TRUE;
+ mis_match = true;
}
}
/* zero out the value for the next pass */
@@ -1380,7 +1380,7 @@ contig_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
ptr_1++;
}
- VRFY((mis_match == FALSE), "small slice write from large ds data good.");
+ VRFY((mis_match == false), "small slice write from large ds data good.");
(tv_ptr->tests_run)++;
}
@@ -1431,7 +1431,7 @@ contig_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
#if CONTIG_HS_DR_PIO_TEST__M2D_S2L__DEBUG
const char *fcnName = "contig_hs_dr_pio_test__m2d_s2l()";
#endif /* CONTIG_HS_DR_PIO_TEST__M2D_S2L__DEBUG */
- hbool_t mis_match = FALSE;
+ bool mis_match = false;
int i, j, k, l;
size_t n;
int mpi_rank; /* needed by the VRFY macro */
@@ -1602,7 +1602,7 @@ contig_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
* as having the same shape.
*/
check = H5Sselect_shape_same(tv_ptr->mem_small_ds_sid, tv_ptr->file_large_ds_sid_0);
- VRFY((check == TRUE), "H5Sselect_shape_same passed");
+ VRFY((check == true), "H5Sselect_shape_same passed");
/* write the small data set slice from memory to the
* target slice of the disk data set
@@ -1650,7 +1650,7 @@ contig_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
if (*ptr_1 != expected_value) {
- mis_match = TRUE;
+ mis_match = true;
}
expected_value++;
@@ -1659,7 +1659,7 @@ contig_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
if (*ptr_1 != 0) {
- mis_match = TRUE;
+ mis_match = true;
}
}
/* zero out buffer for next test */
@@ -1667,7 +1667,7 @@ contig_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
ptr_1++;
}
- VRFY((mis_match == FALSE), "small ds slice write to large ds slice data good.");
+ VRFY((mis_match == false), "small ds slice write to large ds slice data good.");
(tv_ptr->tests_run)++;
}
@@ -1701,7 +1701,7 @@ contig_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
static void
contig_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const int chunk_edge_size,
- const int small_rank, const int large_rank, const hbool_t use_collective_io,
+ const int small_rank, const int large_rank, const bool use_collective_io,
const hid_t dset_type, int express_test, int *skips_ptr, int max_skips,
int64_t *total_tests_ptr, int64_t *tests_run_ptr, int64_t *tests_skipped_ptr,
int mpi_rank)
@@ -1947,7 +1947,7 @@ contig_hs_dr_pio_test(ShapeSameTestMethods sstest_type)
chunk_edge_size = 0;
contig_hs_dr_pio_test__run_test(
- test_num, edge_size, chunk_edge_size, small_rank, large_rank, FALSE, dset_type,
+ test_num, edge_size, chunk_edge_size, small_rank, large_rank, false, dset_type,
express_test, &skips, max_skips, &total_tests, &tests_run, &tests_skipped, mpi_rank);
test_num++;
break;
@@ -1958,7 +1958,7 @@ contig_hs_dr_pio_test(ShapeSameTestMethods sstest_type)
chunk_edge_size = 0;
contig_hs_dr_pio_test__run_test(
- test_num, edge_size, chunk_edge_size, small_rank, large_rank, TRUE, dset_type,
+ test_num, edge_size, chunk_edge_size, small_rank, large_rank, true, dset_type,
express_test, &skips, max_skips, &total_tests, &tests_run, &tests_skipped, mpi_rank);
test_num++;
break;
@@ -1969,7 +1969,7 @@ contig_hs_dr_pio_test(ShapeSameTestMethods sstest_type)
chunk_edge_size = 5;
contig_hs_dr_pio_test__run_test(
- test_num, edge_size, chunk_edge_size, small_rank, large_rank, FALSE, dset_type,
+ test_num, edge_size, chunk_edge_size, small_rank, large_rank, false, dset_type,
express_test, &skips, max_skips, &total_tests, &tests_run, &tests_skipped, mpi_rank);
test_num++;
break;
@@ -1980,14 +1980,14 @@ contig_hs_dr_pio_test(ShapeSameTestMethods sstest_type)
chunk_edge_size = 5;
contig_hs_dr_pio_test__run_test(
- test_num, edge_size, chunk_edge_size, small_rank, large_rank, TRUE, dset_type,
+ test_num, edge_size, chunk_edge_size, small_rank, large_rank, true, dset_type,
express_test, &skips, max_skips, &total_tests, &tests_run, &tests_skipped, mpi_rank);
test_num++;
break;
/* end of case COL_CHUNKED */
default:
- VRFY((FALSE), "unknown test type");
+ VRFY((false), "unknown test type");
break;
} /* end of switch(sstest_type) */
@@ -2046,7 +2046,7 @@ ckrbrd_hs_dr_pio_test__slct_ckrbrd(const int mpi_rank, const hid_t tgt_sid, cons
#if CKRBRD_HS_DR_PIO_TEST__SELECT_CHECKER_BOARD__DEBUG
const char *fcnName = "ckrbrd_hs_dr_pio_test__slct_ckrbrd():";
#endif
- hbool_t first_selection = TRUE;
+ bool first_selection = true;
int i, j, k, l, m;
int n_cube_offset;
int sel_offset;
@@ -2249,7 +2249,7 @@ ckrbrd_hs_dr_pio_test__slct_ckrbrd(const int mpi_rank, const hid_t tgt_sid, cons
if (first_selection) {
- first_selection = FALSE;
+ first_selection = false;
ret = H5Sselect_hyperslab(tgt_sid, H5S_SELECT_SET, &(start[n_cube_offset]),
&(stride[n_cube_offset]), &(count[n_cube_offset]),
@@ -2321,7 +2321,7 @@ ckrbrd_hs_dr_pio_test__slct_ckrbrd(const int mpi_rank, const hid_t tgt_sid, cons
** ckrbrd_hs_dr_pio_test__verify_data():
**
** Examine the supplied buffer to see if it contains the
-** expected data. Return TRUE if it does, and FALSE
+** expected data. Return true if it does, and false
** otherwise.
**
** The supplied buffer is presumed to this process's slice
@@ -2374,17 +2374,17 @@ ckrbrd_hs_dr_pio_test__slct_ckrbrd(const int mpi_rank, const hid_t tgt_sid, cons
#define CKRBRD_HS_DR_PIO_TEST__VERIFY_DATA__DEBUG 0
-static hbool_t
+static bool
ckrbrd_hs_dr_pio_test__verify_data(uint32_t *buf_ptr, const int rank, const int edge_size,
const int checker_edge_size, uint32_t first_expected_val,
- hbool_t buf_starts_in_checker)
+ bool buf_starts_in_checker)
{
#if CKRBRD_HS_DR_PIO_TEST__VERIFY_DATA__DEBUG
const char *fcnName = "ckrbrd_hs_dr_pio_test__verify_data():";
#endif
- hbool_t good_data = TRUE;
- hbool_t in_checker;
- hbool_t start_in_checker[5];
+ bool good_data = true;
+ bool in_checker;
+ bool start_in_checker[5];
uint32_t expected_value;
uint32_t *val_ptr;
int i, j, k, l, m; /* to track position in n-cube */
@@ -2476,7 +2476,7 @@ do {
if (*val_ptr != expected_value) {
- good_data = FALSE;
+ good_data = false;
}
/* zero out buffer for reuse */
@@ -2484,7 +2484,7 @@ do {
}
else if (*val_ptr != 0) {
- good_data = FALSE;
+ good_data = false;
/* zero out buffer for reuse */
*val_ptr = 0;
@@ -2546,7 +2546,7 @@ ckrbrd_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
const char *fcnName = "ckrbrd_hs_dr_pio_test__d2m_l2s()";
uint32_t *ptr_0;
#endif /* CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG */
- hbool_t data_ok = FALSE;
+ bool data_ok = false;
int i, j, k, l;
uint32_t expected_value;
int mpi_rank; /* needed by VRFY */
@@ -2698,7 +2698,7 @@ ckrbrd_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
* selections as having the same shape.
*/
check = H5Sselect_shape_same(tv_ptr->small_ds_slice_sid, tv_ptr->file_large_ds_sid_0);
- VRFY((check == TRUE), "H5Sselect_shape_same passed");
+ VRFY((check == true), "H5Sselect_shape_same passed");
/* Read selection from disk */
#if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG
@@ -2729,9 +2729,9 @@ ckrbrd_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
data_ok = ckrbrd_hs_dr_pio_test__verify_data(
tv_ptr->small_ds_slice_buf, tv_ptr->small_rank - 1, tv_ptr->edge_size,
- tv_ptr->checker_edge_size, expected_value, (hbool_t)TRUE);
+ tv_ptr->checker_edge_size, expected_value, (bool)true);
- VRFY((data_ok == TRUE), "small slice read from large ds data good.");
+ VRFY((data_ok == true), "small slice read from large ds data good.");
(tv_ptr->tests_run)++;
}
@@ -2778,7 +2778,7 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
#if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_S2L__DEBUG
const char *fcnName = "ckrbrd_hs_dr_pio_test__d2m_s2l()";
#endif /* CHECKER_BOARD_HS_DR_PIO_TEST__D2M_S2L__DEBUG */
- hbool_t data_ok = FALSE;
+ bool data_ok = false;
int i, j, k, l;
size_t u;
size_t start_index;
@@ -2920,7 +2920,7 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
* selections as having the same shape.
*/
check = H5Sselect_shape_same(tv_ptr->file_small_ds_sid_0, tv_ptr->mem_large_ds_sid);
- VRFY((check == TRUE), "H5Sselect_shape_same passed");
+ VRFY((check == true), "H5Sselect_shape_same passed");
/* Read selection from disk */
#if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_S2L__DEBUG
@@ -2938,7 +2938,7 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
/* verify that the expected data and only the
* expected data was read.
*/
- data_ok = TRUE;
+ data_ok = true;
ptr_1 = tv_ptr->large_ds_buf_1;
expected_value = (uint32_t)((size_t)(tv_ptr->mpi_rank) * tv_ptr->small_ds_slice_size);
start_index =
@@ -2978,7 +2978,7 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
if (*ptr_1 != 0) {
- data_ok = FALSE;
+ data_ok = false;
}
/* zero out the value for the next pass */
@@ -2987,13 +2987,13 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
ptr_1++;
}
- VRFY((data_ok == TRUE), "slice read from small to large ds data good(1).");
+ VRFY((data_ok == true), "slice read from small to large ds data good(1).");
data_ok = ckrbrd_hs_dr_pio_test__verify_data(ptr_1, tv_ptr->small_rank - 1,
tv_ptr->edge_size, tv_ptr->checker_edge_size,
- expected_value, (hbool_t)TRUE);
+ expected_value, (bool)true);
- VRFY((data_ok == TRUE), "slice read from small to large ds data good(2).");
+ VRFY((data_ok == true), "slice read from small to large ds data good(2).");
ptr_1 = tv_ptr->large_ds_buf_1 + stop_index + 1;
@@ -3001,7 +3001,7 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
if (*ptr_1 != 0) {
- data_ok = FALSE;
+ data_ok = false;
}
/* zero out the value for the next pass */
@@ -3010,7 +3010,7 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
ptr_1++;
}
- VRFY((data_ok == TRUE), "slice read from small to large ds data good(3).");
+ VRFY((data_ok == true), "slice read from small to large ds data good(3).");
(tv_ptr->tests_run)++;
}
@@ -3061,7 +3061,7 @@ ckrbrd_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
#if CHECKER_BOARD_HS_DR_PIO_TEST__M2D_L2S__DEBUG
const char *fcnName = "ckrbrd_hs_dr_pio_test__m2d_l2s()";
#endif /* CHECKER_BOARD_HS_DR_PIO_TEST__M2D_L2S__DEBUG */
- hbool_t data_ok = FALSE;
+ bool data_ok = false;
int i, j, k, l;
size_t u;
size_t start_index;
@@ -3242,7 +3242,7 @@ ckrbrd_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
* slice of the small data set as having the same shape.
*/
check = H5Sselect_shape_same(tv_ptr->file_small_ds_sid_1, tv_ptr->mem_large_ds_sid);
- VRFY((check == TRUE), "H5Sselect_shape_same passed.");
+ VRFY((check == true), "H5Sselect_shape_same passed.");
/* write the checker board selection of the slice from the in
* memory large data set to the slice of the on disk small
@@ -3279,33 +3279,33 @@ ckrbrd_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
assert(start_index < stop_index);
assert(stop_index <= tv_ptr->small_ds_size);
- data_ok = TRUE;
+ data_ok = true;
ptr_1 = tv_ptr->small_ds_buf_1;
for (u = 0; u < start_index; u++, ptr_1++) {
if (*ptr_1 != 0) {
- data_ok = FALSE;
+ data_ok = false;
*ptr_1 = 0;
}
}
data_ok &= ckrbrd_hs_dr_pio_test__verify_data(
tv_ptr->small_ds_buf_1 + start_index, tv_ptr->small_rank - 1, tv_ptr->edge_size,
- tv_ptr->checker_edge_size, expected_value, (hbool_t)TRUE);
+ tv_ptr->checker_edge_size, expected_value, (bool)true);
ptr_1 = tv_ptr->small_ds_buf_1;
for (u = stop_index; u < tv_ptr->small_ds_size; u++, ptr_1++) {
if (*ptr_1 != 0) {
- data_ok = FALSE;
+ data_ok = false;
*ptr_1 = 0;
}
}
- VRFY((data_ok == TRUE), "large slice write slice to small slice data good.");
+ VRFY((data_ok == true), "large slice write slice to small slice data good.");
(tv_ptr->tests_run)++;
}
@@ -3356,7 +3356,7 @@ ckrbrd_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
#if CHECKER_BOARD_HS_DR_PIO_TEST__M2D_S2L__DEBUG
const char *fcnName = "ckrbrd_hs_dr_pio_test__m2d_s2l()";
#endif /* CONTIG_HS_DR_PIO_TEST__M2D_S2L__DEBUG */
- hbool_t data_ok = FALSE;
+ bool data_ok = false;
int i, j, k, l;
size_t u;
size_t start_index;
@@ -3533,7 +3533,7 @@ ckrbrd_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
* as having the same shape.
*/
check = H5Sselect_shape_same(tv_ptr->mem_small_ds_sid, tv_ptr->file_large_ds_sid_1);
- VRFY((check == TRUE), "H5Sselect_shape_same passed");
+ VRFY((check == true), "H5Sselect_shape_same passed");
/* write the small data set slice from memory to the
* target slice of the disk data set
@@ -3573,33 +3573,33 @@ ckrbrd_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
assert(start_index < stop_index);
assert(stop_index < tv_ptr->large_ds_size);
- data_ok = TRUE;
+ data_ok = true;
ptr_1 = tv_ptr->large_ds_buf_1;
for (u = 0; u < start_index; u++, ptr_1++) {
if (*ptr_1 != 0) {
- data_ok = FALSE;
+ data_ok = false;
*ptr_1 = 0;
}
}
data_ok &= ckrbrd_hs_dr_pio_test__verify_data(
tv_ptr->large_ds_buf_1 + start_index, tv_ptr->small_rank - 1, tv_ptr->edge_size,
- tv_ptr->checker_edge_size, expected_value, (hbool_t)TRUE);
+ tv_ptr->checker_edge_size, expected_value, (bool)true);
ptr_1 = tv_ptr->large_ds_buf_1;
for (u = stop_index; u < tv_ptr->small_ds_size; u++, ptr_1++) {
if (*ptr_1 != 0) {
- data_ok = FALSE;
+ data_ok = false;
*ptr_1 = 0;
}
}
- VRFY((data_ok == TRUE), "small ds cb slice write to large ds slice data good.");
+ VRFY((data_ok == true), "small ds cb slice write to large ds slice data good.");
(tv_ptr->tests_run)++;
}
@@ -3634,10 +3634,9 @@ ckrbrd_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
static void
ckrbrd_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const int checker_edge_size,
const int chunk_edge_size, const int small_rank, const int large_rank,
- const hbool_t use_collective_io, const hid_t dset_type,
- const int express_test, int *skips_ptr, int max_skips,
- int64_t *total_tests_ptr, int64_t *tests_run_ptr, int64_t *tests_skipped_ptr,
- int mpi_rank)
+ const bool use_collective_io, const hid_t dset_type, const int express_test,
+ int *skips_ptr, int max_skips, int64_t *total_tests_ptr,
+ int64_t *tests_run_ptr, int64_t *tests_skipped_ptr, int mpi_rank)
{
#if CKRBRD_HS_DR_PIO_TEST__RUN_TEST__DEBUG
@@ -3870,7 +3869,7 @@ ckrbrd_hs_dr_pio_test(ShapeSameTestMethods sstest_type)
/* contiguous data set, independent I/O */
chunk_edge_size = 0;
ckrbrd_hs_dr_pio_test__run_test(test_num, edge_size, checker_edge_size, chunk_edge_size,
- small_rank, large_rank, FALSE, dset_type, express_test,
+ small_rank, large_rank, false, dset_type, express_test,
&skips, max_skips, &total_tests, &tests_run,
&tests_skipped, mpi_rank);
test_num++;
@@ -3881,7 +3880,7 @@ ckrbrd_hs_dr_pio_test(ShapeSameTestMethods sstest_type)
/* contiguous data set, collective I/O */
chunk_edge_size = 0;
ckrbrd_hs_dr_pio_test__run_test(test_num, edge_size, checker_edge_size, chunk_edge_size,
- small_rank, large_rank, TRUE, dset_type, express_test,
+ small_rank, large_rank, true, dset_type, express_test,
&skips, max_skips, &total_tests, &tests_run,
&tests_skipped, mpi_rank);
test_num++;
@@ -3892,7 +3891,7 @@ ckrbrd_hs_dr_pio_test(ShapeSameTestMethods sstest_type)
/* chunked data set, independent I/O */
chunk_edge_size = 5;
ckrbrd_hs_dr_pio_test__run_test(test_num, edge_size, checker_edge_size, chunk_edge_size,
- small_rank, large_rank, FALSE, dset_type, express_test,
+ small_rank, large_rank, false, dset_type, express_test,
&skips, max_skips, &total_tests, &tests_run,
&tests_skipped, mpi_rank);
test_num++;
@@ -3903,7 +3902,7 @@ ckrbrd_hs_dr_pio_test(ShapeSameTestMethods sstest_type)
/* chunked data set, collective I/O */
chunk_edge_size = 5;
ckrbrd_hs_dr_pio_test__run_test(test_num, edge_size, checker_edge_size, chunk_edge_size,
- small_rank, large_rank, TRUE, dset_type, express_test,
+ small_rank, large_rank, true, dset_type, express_test,
&skips, max_skips, &total_tests, &tests_run,
&tests_skipped, mpi_rank);
test_num++;
@@ -3911,7 +3910,7 @@ ckrbrd_hs_dr_pio_test(ShapeSameTestMethods sstest_type)
/* end of case COL_CHUNKED */
default:
- VRFY((FALSE), "unknown test type");
+ VRFY((false), "unknown test type");
break;
} /* end of switch(sstest_type) */
@@ -4188,9 +4187,9 @@ create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type)
/* set Parallel access with communicator */
ret = H5Pset_fapl_mpio(ret_pl, comm, info);
VRFY((ret >= 0), "");
- ret = H5Pset_all_coll_metadata_ops(ret_pl, TRUE);
+ ret = H5Pset_all_coll_metadata_ops(ret_pl, true);
VRFY((ret >= 0), "");
- ret = H5Pset_coll_metadata_write(ret_pl, TRUE);
+ ret = H5Pset_coll_metadata_write(ret_pl, true);
VRFY((ret >= 0), "");
return (ret_pl);
}
diff --git a/testpar/API/t_span_tree.c b/testpar/API/t_span_tree.c
index 40ccb8fbd8e..e2f148c9e4b 100644
--- a/testpar/API/t_span_tree.c
+++ b/testpar/API/t_span_tree.c
@@ -21,7 +21,7 @@
one in collective mode,
2) We will read two datasets with the same hyperslab selection settings,
1. independent read to read independent output,
- independent read to read collecive output,
+ independent read to read collective output,
Compare the result,
If the result is the same, then collective write succeeds.
2. collective read to read independent output,
@@ -498,7 +498,7 @@ coll_write_test(int chunk_factor)
For testing collective hyperslab selection write
In this test, we are using independent read to check
- the correctedness of collective write compared with
+ the correctness of collective write compared with
independent write,
In order to thoroughly test this feature, we choose
@@ -593,7 +593,7 @@ coll_write_test(int chunk_factor)
mspaceid = H5Screate_simple(MSPACE_RANK, mdim, NULL);
/*
- * Select two hyperslabs in memory. Hyperslabs has the same
+ * Select two hyperslabs in memory. Hyperslabs have the same
* size and shape as the selected hyperslabs for the file dataspace
* Only the starting point is different.
* The first selection
@@ -833,7 +833,7 @@ coll_read_test(void)
mspaceid = H5Screate_simple(MSPACE_RANK, mdim, NULL);
/*
- * Select two hyperslabs in memory. Hyperslabs has the same
+ * Select two hyperslabs in memory. Hyperslabs have the same
* size and shape as the selected hyperslabs for the file dataspace.
* Only the starting point is different.
* The first selection
@@ -967,7 +967,7 @@ coll_read_test(void)
** sel_rank fastest changing indices, with origin (in the
** higher indices) as indicated by the start array.
**
-** Note that this function, is hard coded to presume a
+** Note that this function is hard-coded to presume a
** maximum dataspace rank of 5.
**
** While this maximum is declared as a constant, increasing
@@ -993,7 +993,7 @@ lower_dim_size_comp_test__select_checker_board(const int mpi_rank, const hid_t t
#if LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG
const char *fcnName = "lower_dim_size_comp_test__select_checker_board():";
#endif
- hbool_t first_selection = TRUE;
+ bool first_selection = true;
int i, j, k, l, m;
int ds_offset;
int sel_offset;
@@ -1045,7 +1045,7 @@ lower_dim_size_comp_test__select_checker_board(const int mpi_rank, const hid_t t
* Note that the following computation depends on the C99
* requirement that integer division discard any fraction
* (truncation towards zero) to function correctly. As we
- * now require C99, this shouldn't be a problem, but noting
+ * now require C99, this shouldn't be a problem, but note
* it may save us some pain if we are ever obliged to support
* pre-C99 compilers again.
*/
@@ -1074,7 +1074,7 @@ lower_dim_size_comp_test__select_checker_board(const int mpi_rank, const hid_t t
/* Now set up the stride and block arrays, and portions of the start
* and count arrays that will not be altered during the selection of
- * the checker board.
+ * the checkerboard.
*/
i = 0;
while (i < ds_offset) {
@@ -1215,7 +1215,7 @@ lower_dim_size_comp_test__select_checker_board(const int mpi_rank, const hid_t t
if (first_selection) {
- first_selection = FALSE;
+ first_selection = false;
ret = H5Sselect_hyperslab(tgt_sid, H5S_SELECT_SET, &(start[ds_offset]),
&(stride[ds_offset]), &(count[ds_offset]),
@@ -1291,16 +1291,16 @@ lower_dim_size_comp_test__select_checker_board(const int mpi_rank, const hid_t t
** lower_dim_size_comp_test__verify_data():
**
** Examine the supplied buffer to see if it contains the
-** expected data. Return TRUE if it does, and FALSE
+** expected data. Return true if it does, and false
** otherwise.
**
-** The supplied buffer is presumed to this process's slice
+** The supplied buffer is presumed to be this process's slice
** of the target data set. Each such slice will be an
** n-cube of rank (rank -1) and the supplied edge_size with
** origin (mpi_rank, 0, ... , 0) in the target data set.
**
** Further, the buffer is presumed to be the result of reading
-** or writing a checker board selection of an m (1 <= m <
+** or writing a checkerboard selection of an m (1 <= m <
** rank) dimensional slice through this processes slice
** of the target data set. Also, this slice must be parallel
** to the fastest changing indices.
@@ -1311,7 +1311,7 @@ lower_dim_size_comp_test__select_checker_board(const int mpi_rank, const hid_t t
** with the natural numbers listed in order from the origin
** along the fastest changing axis.
**
-** Thus for a 20x10x10 dataset, the value stored in location
+** Thus, for a 20x10x10 dataset, the value stored in location
** (x, y, z) (assuming that z is the fastest changing index
** and x the slowest) is assumed to be:
**
@@ -1319,7 +1319,7 @@ lower_dim_size_comp_test__select_checker_board(const int mpi_rank, const hid_t t
**
** Further, supposing that this is process 10, this process's
** slice of the dataset would be a 10 x 10 2-cube with origin
-** (10, 0, 0) in the data set, and would be initialize (prior
+** (10, 0, 0) in the data set, and would be initialized (prior
** to the checkerboard selection) as follows:
**
** 1000, 1001, 1002, ... 1008, 1009
@@ -1344,20 +1344,20 @@ lower_dim_size_comp_test__select_checker_board(const int mpi_rank, const hid_t t
#define LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG 0
-static hbool_t
+static bool
lower_dim_size_comp_test__verify_data(uint32_t *buf_ptr,
#if LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG
const int mpi_rank,
#endif /* LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG */
const int rank, const int edge_size, const int checker_edge_size,
- uint32_t first_expected_val, hbool_t buf_starts_in_checker)
+ uint32_t first_expected_val, bool buf_starts_in_checker)
{
#if LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG
const char *fcnName = "lower_dim_size_comp_test__verify_data():";
#endif
- hbool_t good_data = TRUE;
- hbool_t in_checker;
- hbool_t start_in_checker[5];
+ bool good_data = true;
+ bool in_checker;
+ bool start_in_checker[5];
uint32_t expected_value;
uint32_t *val_ptr;
int i, j, k, l, m; /* to track position in n-cube */
@@ -1450,7 +1450,7 @@ lower_dim_size_comp_test__verify_data(uint32_t *buf_ptr,
if (*val_ptr != expected_value) {
- good_data = FALSE;
+ good_data = false;
}
/* zero out buffer for reuse */
@@ -1458,7 +1458,7 @@ lower_dim_size_comp_test__verify_data(uint32_t *buf_ptr,
}
else if (*val_ptr != 0) {
- good_data = FALSE;
+ good_data = false;
/* zero out buffer for reuse */
*val_ptr = 0;
@@ -1506,7 +1506,7 @@ lower_dim_size_comp_test__verify_data(uint32_t *buf_ptr,
#define LDSCT_DS_RANK 5
static void
-lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_collective_io,
+lower_dim_size_comp_test__run_test(const int chunk_edge_size, const bool use_collective_io,
const hid_t dset_type)
{
#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
@@ -1516,8 +1516,8 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
hsize_t max_dims[32];
#endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */
const char *filename;
- hbool_t data_ok = FALSE;
- hbool_t mis_match = FALSE;
+ bool data_ok = false;
+ bool mis_match = false;
int i;
int start_index;
int stop_index;
@@ -1859,10 +1859,10 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
}
check = H5Sselect_valid(mem_small_ds_sid);
- VRFY((check == TRUE), "H5Sselect_valid(mem_small_ds_sid) returns TRUE");
+ VRFY((check == true), "H5Sselect_valid(mem_small_ds_sid) returns true");
check = H5Sselect_valid(file_small_ds_sid);
- VRFY((check == TRUE), "H5Sselect_valid(file_small_ds_sid) returns TRUE");
+ VRFY((check == true), "H5Sselect_valid(file_small_ds_sid) returns true");
/* write the initial value of the small data set to file */
#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
@@ -1893,7 +1893,7 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
* and reset the buffer to zero in passing.
*/
expected_value = 0;
- mis_match = FALSE;
+ mis_match = false;
ptr_1 = small_ds_buf_1;
i = 0;
@@ -1901,7 +1901,7 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
if (*ptr_1 != expected_value) {
- mis_match = TRUE;
+ mis_match = true;
}
*ptr_1 = (uint32_t)0;
@@ -1909,7 +1909,7 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
ptr_1++;
expected_value++;
}
- VRFY((mis_match == FALSE), "small ds init data good.");
+ VRFY((mis_match == false), "small ds init data good.");
/* setup selections for writing initial data to the large data set */
start[0] = (hsize_t)(mpi_rank + 1);
@@ -2017,10 +2017,10 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
#endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */
check = H5Sselect_valid(mem_large_ds_sid);
- VRFY((check == TRUE), "H5Sselect_valid(mem_large_ds_sid) returns TRUE");
+ VRFY((check == true), "H5Sselect_valid(mem_large_ds_sid) returns true");
check = H5Sselect_valid(file_large_ds_sid);
- VRFY((check == TRUE), "H5Sselect_valid(file_large_ds_sid) returns TRUE");
+ VRFY((check == true), "H5Sselect_valid(file_large_ds_sid) returns true");
/* write the initial value of the large data set to file */
#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
@@ -2054,7 +2054,7 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
* in passing, reset the buffer to zeros
*/
expected_value = 0;
- mis_match = FALSE;
+ mis_match = false;
ptr_1 = large_ds_buf_1;
i = 0;
@@ -2062,7 +2062,7 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
if (*ptr_1 != expected_value) {
- mis_match = TRUE;
+ mis_match = true;
}
*ptr_1 = (uint32_t)0;
@@ -2070,7 +2070,7 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
ptr_1++;
expected_value++;
}
- VRFY((mis_match == FALSE), "large ds init data good.");
+ VRFY((mis_match == false), "large ds init data good.");
/***********************************/
/***** INITIALIZATION COMPLETE *****/
@@ -2108,7 +2108,7 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
* selections as having the same shape.
*/
check = H5Sselect_shape_same(mem_large_ds_sid, file_small_ds_sid);
- VRFY((check == TRUE), "H5Sselect_shape_same passed (1)");
+ VRFY((check == true), "H5Sselect_shape_same passed (1)");
ret = H5Dread(small_dataset, H5T_NATIVE_UINT32, mem_large_ds_sid, file_small_ds_sid, xfer_plist,
large_ds_buf_1);
@@ -2123,7 +2123,7 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
/* verify that expected data is retrieved */
- data_ok = TRUE;
+ data_ok = true;
start_index = (int)((large_sel_start[0] * large_dims[1] * large_dims[2] * large_dims[3] * large_dims[4]) +
(large_sel_start[1] * large_dims[2] * large_dims[3] * large_dims[4]) +
@@ -2142,14 +2142,14 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
if (*ptr_1 != (uint32_t)0) {
- data_ok = FALSE;
+ data_ok = false;
*ptr_1 = (uint32_t)0;
}
ptr_1++;
}
- VRFY((data_ok == TRUE), "slice read from small ds data good(1).");
+ VRFY((data_ok == true), "slice read from small ds data good(1).");
data_ok = lower_dim_size_comp_test__verify_data(ptr_1,
#if LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG
@@ -2158,11 +2158,11 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
/* rank */ 2,
/* edge_size */ 10,
/* checker_edge_size */ 3, expected_value,
- /* buf_starts_in_checker */ TRUE);
+ /* buf_starts_in_checker */ true);
- VRFY((data_ok == TRUE), "slice read from small ds data good(2).");
+ VRFY((data_ok == true), "slice read from small ds data good(2).");
- data_ok = TRUE;
+ data_ok = true;
ptr_1 += small_ds_slice_size;
@@ -2170,14 +2170,14 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
if (*ptr_1 != (uint32_t)0) {
- data_ok = FALSE;
+ data_ok = false;
*ptr_1 = (uint32_t)0;
}
ptr_1++;
}
- VRFY((data_ok == TRUE), "slice read from small ds data good(3).");
+ VRFY((data_ok == true), "slice read from small ds data good(3).");
/* read a checkerboard selection of a slice of the process slice of
* the large on disk data set into the process slice of the small
@@ -2205,7 +2205,7 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
* selections as having the same shape.
*/
check = H5Sselect_shape_same(mem_small_ds_sid, file_large_ds_sid);
- VRFY((check == TRUE), "H5Sselect_shape_same passed (2)");
+ VRFY((check == true), "H5Sselect_shape_same passed (2)");
ret = H5Dread(large_dataset, H5T_NATIVE_UINT32, mem_small_ds_sid, file_large_ds_sid, xfer_plist,
small_ds_buf_1);
@@ -2220,7 +2220,7 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
/* verify that expected data is retrieved */
- data_ok = TRUE;
+ data_ok = true;
expected_value =
(uint32_t)((large_sel_start[0] * large_dims[1] * large_dims[2] * large_dims[3] * large_dims[4]) +
@@ -2242,14 +2242,14 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
if (*ptr_1 != (uint32_t)0) {
- data_ok = FALSE;
+ data_ok = false;
*ptr_1 = (uint32_t)0;
}
ptr_1++;
}
- VRFY((data_ok == TRUE), "slice read from large ds data good(1).");
+ VRFY((data_ok == true), "slice read from large ds data good(1).");
data_ok = lower_dim_size_comp_test__verify_data(ptr_1,
#if LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG
@@ -2258,11 +2258,11 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
/* rank */ 2,
/* edge_size */ 10,
/* checker_edge_size */ 3, expected_value,
- /* buf_starts_in_checker */ TRUE);
+ /* buf_starts_in_checker */ true);
- VRFY((data_ok == TRUE), "slice read from large ds data good(2).");
+ VRFY((data_ok == true), "slice read from large ds data good(2).");
- data_ok = TRUE;
+ data_ok = true;
ptr_1 += small_ds_slice_size;
@@ -2277,14 +2277,14 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG */
- data_ok = FALSE;
+ data_ok = false;
*ptr_1 = (uint32_t)0;
}
ptr_1++;
}
- VRFY((data_ok == TRUE), "slice read from large ds data good(3).");
+ VRFY((data_ok == true), "slice read from large ds data good(3).");
/* Close dataspaces */
ret = H5Sclose(full_mem_small_ds_sid);
@@ -2373,10 +2373,10 @@ lower_dim_size_comp_test(void)
HDcompile_assert(sizeof(uint32_t) == sizeof(unsigned));
for (use_collective_io = 0; use_collective_io <= 1; use_collective_io++) {
chunk_edge_size = 0;
- lower_dim_size_comp_test__run_test(chunk_edge_size, (hbool_t)use_collective_io, H5T_NATIVE_UINT);
+ lower_dim_size_comp_test__run_test(chunk_edge_size, (bool)use_collective_io, H5T_NATIVE_UINT);
chunk_edge_size = 5;
- lower_dim_size_comp_test__run_test(chunk_edge_size, (hbool_t)use_collective_io, H5T_NATIVE_UINT);
+ lower_dim_size_comp_test__run_test(chunk_edge_size, (bool)use_collective_io, H5T_NATIVE_UINT);
} /* end for */
return;
@@ -2398,11 +2398,11 @@ lower_dim_size_comp_test(void)
*
* 1) Reads or writes exactly one chunk,
*
- * 2) Has no in memory buffer for any other chunk.
+ * 2) Has no in-memory buffer for any other chunk.
*
- * The test differers from Rob Latham's bug report in
- * that is runs with an arbitrary number of processes,
- * and uses a 1 dimensional dataset.
+ * The test differs from Rob Latham's bug report in
+ * that it runs with an arbitrary number of processes,
+ * and uses a 1-dimensional dataset.
*
* Return: void
*-------------------------------------------------------------------------
@@ -2415,7 +2415,7 @@ link_chunk_collective_io_test(void)
{
/* const char *fcnName = "link_chunk_collective_io_test()"; */
const char *filename;
- hbool_t mis_match = FALSE;
+ bool mis_match = false;
int i;
int mrc;
int mpi_rank;
@@ -2552,7 +2552,7 @@ link_chunk_collective_io_test(void)
VRFY((ret >= 0), "H5Pclose(xfer_plist) succeeded");
/* verify the data */
- mis_match = FALSE;
+ mis_match = false;
for (i = 0; i < LINK_CHUNK_COLLECTIVE_IO_TEST_CHUNK_SIZE; i++) {
diff = local_data_written[i] - local_data_read[i];
@@ -2560,10 +2560,10 @@ link_chunk_collective_io_test(void)
if (diff >= 0.001) {
- mis_match = TRUE;
+ mis_match = true;
}
}
- VRFY((mis_match == FALSE), "dataset data good.");
+ VRFY((mis_match == false), "dataset data good.");
/* Close dataspaces */
ret = H5Sclose(write_mem_ds_sid);
diff --git a/testpar/API/testphdf5.c b/testpar/API/testphdf5.c
index a341112be01..1d42c61028f 100644
--- a/testpar/API/testphdf5.c
+++ b/testpar/API/testphdf5.c
@@ -277,9 +277,9 @@ create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type)
/* set Parallel access with communicator */
ret = H5Pset_fapl_mpio(ret_pl, comm, info);
VRFY((ret >= 0), "");
- ret = H5Pset_all_coll_metadata_ops(ret_pl, TRUE);
+ ret = H5Pset_all_coll_metadata_ops(ret_pl, true);
VRFY((ret >= 0), "");
- ret = H5Pset_coll_metadata_write(ret_pl, TRUE);
+ ret = H5Pset_coll_metadata_write(ret_pl, true);
VRFY((ret >= 0), "");
return (ret_pl);
}
diff --git a/testpar/API/testphdf5.h b/testpar/API/testphdf5.h
index 545ab0f7ec9..59dd5774e13 100644
--- a/testpar/API/testphdf5.h
+++ b/testpar/API/testphdf5.h
@@ -39,12 +39,12 @@ enum H5TEST_COLL_CHUNK_API {
API_MULTI_IND
};
-#ifndef FALSE
-#define FALSE 0
+#ifndef false
+#define false 0
#endif
-#ifndef TRUE
-#define TRUE 1
+#ifndef true
+#define true 1
#endif
/* Constants definitions */
@@ -94,8 +94,8 @@ enum H5TEST_COLL_CHUNK_API {
#define LINK_TRUE_NUM_CHUNK 2
#define LINK_FALSE_NUM_CHUNK 6
#define MULTI_TRUE_PERCENT 50
-#define LINK_TRUE_CHUNK_NAME "h5_link_chunk_true"
-#define LINK_FALSE_CHUNK_NAME "h5_link_chunk_false"
+#define LINK_TRUE_CHUNK_NAME "h5_link_chunk_TRUE"
+#define LINK_FALSE_CHUNK_NAME "h5_link_chunk_FALSE"
#define LINK_HARD_CHUNK_NAME "h5_link_chunk_hard"
#define MULTI_HARD_CHUNK_NAME "h5_multi_chunk_hard"
#define MULTI_COLL_CHUNK_NAME "h5_multi_chunk_coll"
@@ -217,8 +217,8 @@ enum H5TEST_COLL_CHUNK_API {
/* Collective chunk instrumentation properties */
#define H5D_XFER_COLL_CHUNK_LINK_HARD_NAME "coll_chunk_link_hard"
#define H5D_XFER_COLL_CHUNK_MULTI_HARD_NAME "coll_chunk_multi_hard"
-#define H5D_XFER_COLL_CHUNK_LINK_NUM_TRUE_NAME "coll_chunk_link_true"
-#define H5D_XFER_COLL_CHUNK_LINK_NUM_FALSE_NAME "coll_chunk_link_false"
+#define H5D_XFER_COLL_CHUNK_LINK_NUM_TRUE_NAME "coll_chunk_link_TRUE"
+#define H5D_XFER_COLL_CHUNK_LINK_NUM_FALSE_NAME "coll_chunk_link_FALSE"
#define H5D_XFER_COLL_CHUNK_MULTI_RATIO_COLL_NAME "coll_chunk_multi_coll"
#define H5D_XFER_COLL_CHUNK_MULTI_RATIO_IND_NAME "coll_chunk_multi_ind"
@@ -230,8 +230,8 @@ enum H5TEST_COLL_CHUNK_API {
#define H5D_XFER_COLL_RANK0_BCAST_NAME "coll_rank0_bcast"
/* Definitions for general collective I/O instrumentation properties */
-#define H5D_XFER_COLL_RANK0_BCAST_SIZE sizeof(hbool_t)
-#define H5D_XFER_COLL_RANK0_BCAST_DEF FALSE
+#define H5D_XFER_COLL_RANK0_BCAST_SIZE sizeof(bool)
+#define H5D_XFER_COLL_RANK0_BCAST_DEF false
#endif /* H5_HAVE_INSTRUMENTED_LIBRARY */
/* type definitions */
diff --git a/testpar/t_2Gio.c b/testpar/t_2Gio.c
index 24eb3ba08f6..c2aac771b29 100644
--- a/testpar/t_2Gio.c
+++ b/testpar/t_2Gio.c
@@ -245,7 +245,7 @@ parse_options(int argc, char **argv)
hid_t
create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type)
{
- hid_t ret_pl = -1;
+ hid_t ret_pl = H5I_INVALID_HID;
herr_t ret; /* generic return value */
int mpi_rank; /* mpi variables */
@@ -262,9 +262,9 @@ create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type)
/* set Parallel access with communicator */
ret = H5Pset_fapl_mpio(ret_pl, comm, info);
VRFY((ret >= 0), "");
- ret = H5Pset_all_coll_metadata_ops(ret_pl, TRUE);
+ ret = H5Pset_all_coll_metadata_ops(ret_pl, true);
VRFY((ret >= 0), "");
- ret = H5Pset_coll_metadata_write(ret_pl, TRUE);
+ ret = H5Pset_coll_metadata_write(ret_pl, true);
VRFY((ret >= 0), "");
return (ret_pl);
}
@@ -3344,10 +3344,10 @@ test_actual_io_mode(int selection_mode)
H5D_mpio_actual_io_mode_t actual_io_mode_expected = H5D_MPIO_NO_COLLECTIVE;
const char *filename;
const char *test_name;
- hbool_t direct_multi_chunk_io;
- hbool_t multi_chunk_io;
- hbool_t is_chunked;
- hbool_t is_collective;
+ bool direct_multi_chunk_io;
+ bool multi_chunk_io;
+ bool is_chunked;
+ bool is_collective;
int mpi_size = -1;
int mpi_rank = -1;
int length;
@@ -3355,16 +3355,16 @@ test_actual_io_mode(int selection_mode)
int i;
MPI_Comm mpi_comm = MPI_COMM_NULL;
MPI_Info mpi_info = MPI_INFO_NULL;
- hid_t fid = -1;
- hid_t sid = -1;
- hid_t dataset = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t dataset = H5I_INVALID_HID;
hid_t data_type = H5T_NATIVE_INT;
- hid_t fapl_id = -1;
- hid_t mem_space = -1;
- hid_t file_space = -1;
- hid_t dcpl = -1;
- hid_t dxpl_write = -1;
- hid_t dxpl_read = -1;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t mem_space = H5I_INVALID_HID;
+ hid_t file_space = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
+ hid_t dxpl_write = H5I_INVALID_HID;
+ hid_t dxpl_read = H5I_INVALID_HID;
hsize_t dims[MAX_RANK];
hsize_t chunk_dims[MAX_RANK];
hsize_t start[MAX_RANK];
@@ -3693,10 +3693,10 @@ test_actual_io_mode(int selection_mode)
/* Test values */
if (actual_chunk_opt_mode_expected != (H5D_mpio_actual_chunk_opt_mode_t)-1 &&
actual_io_mode_expected != (H5D_mpio_actual_io_mode_t)-1) {
- HDsnprintf(message, sizeof(message), "Actual Chunk Opt Mode has the correct value for %s.\n",
- test_name);
+ snprintf(message, sizeof(message), "Actual Chunk Opt Mode has the correct value for %s.\n",
+ test_name);
VRFY((actual_chunk_opt_mode_write == actual_chunk_opt_mode_expected), message);
- HDsnprintf(message, sizeof(message), "Actual IO Mode has the correct value for %s.\n", test_name);
+ snprintf(message, sizeof(message), "Actual IO Mode has the correct value for %s.\n", test_name);
VRFY((actual_io_mode_write == actual_io_mode_expected), message);
}
else {
@@ -3858,8 +3858,8 @@ test_no_collective_cause_mode(int selection_mode)
const char *filename;
const char *test_name;
- hbool_t is_chunked = 1;
- hbool_t is_independent = 0;
+ bool is_chunked = 1;
+ bool is_independent = 0;
int mpi_size = -1;
int mpi_rank = -1;
int length;
@@ -3867,17 +3867,17 @@ test_no_collective_cause_mode(int selection_mode)
int i;
MPI_Comm mpi_comm;
MPI_Info mpi_info;
- hid_t fid = -1;
- hid_t sid = -1;
- hid_t dataset = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t dataset = H5I_INVALID_HID;
hid_t data_type = H5T_NATIVE_INT;
- hid_t fapl_id = -1;
- hid_t dcpl = -1;
- hid_t dxpl_write = -1;
- hid_t dxpl_read = -1;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
+ hid_t dxpl_write = H5I_INVALID_HID;
+ hid_t dxpl_read = H5I_INVALID_HID;
hsize_t dims[MAX_RANK];
- hid_t mem_space = -1;
- hid_t file_space = -1;
+ hid_t mem_space = H5I_INVALID_HID;
+ hid_t file_space = H5I_INVALID_HID;
hsize_t chunk_dims[MAX_RANK];
herr_t ret;
/* set to global value as default */
@@ -4135,12 +4135,12 @@ test_no_collective_cause_mode(int selection_mode)
/* Test values */
memset(message, 0, sizeof(message));
- HDsnprintf(message, sizeof(message),
- "Local cause of Broken Collective I/O has the correct value for %s.\n", test_name);
+ snprintf(message, sizeof(message), "Local cause of Broken Collective I/O has the correct value for %s.\n",
+ test_name);
VRFY((no_collective_cause_local_write == no_collective_cause_local_expected), message);
memset(message, 0, sizeof(message));
- HDsnprintf(message, sizeof(message),
- "Global cause of Broken Collective I/O has the correct value for %s.\n", test_name);
+ snprintf(message, sizeof(message),
+ "Global cause of Broken Collective I/O has the correct value for %s.\n", test_name);
VRFY((no_collective_cause_global_write == no_collective_cause_global_expected), message);
/* Release some resources */
@@ -4278,6 +4278,8 @@ main(int argc, char **argv)
MPI_Comm_size(test_comm, &mpi_size);
MPI_Comm_rank(test_comm, &mpi_rank);
+ mpi_rank_framework_g = mpi_rank;
+
memset(filenames, 0, sizeof(filenames));
dim0 = BIG_X_FACTOR;
diff --git a/testpar/t_bigio.c b/testpar/t_bigio.c
index 3a2802207b6..2726f91b55c 100644
--- a/testpar/t_bigio.c
+++ b/testpar/t_bigio.c
@@ -1107,10 +1107,10 @@ single_rank_independent_io(void)
if (MAIN_PROCESS) {
hsize_t dims[1];
- hid_t file_id = -1;
- hid_t fapl_id = -1;
- hid_t dset_id = -1;
- hid_t fspace_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t fspace_id = H5I_INVALID_HID;
herr_t ret;
int *data = NULL;
uint64_t i;
@@ -1181,7 +1181,7 @@ single_rank_independent_io(void)
hid_t
create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type)
{
- hid_t ret_pl = -1;
+ hid_t ret_pl = H5I_INVALID_HID;
herr_t ret; /* generic return value */
int mpi_rank; /* mpi variables */
@@ -1198,9 +1198,9 @@ create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type)
/* set Parallel access with communicator */
ret = H5Pset_fapl_mpio(ret_pl, comm, info);
VRFY_G((ret >= 0), "");
- ret = H5Pset_all_coll_metadata_ops(ret_pl, TRUE);
+ ret = H5Pset_all_coll_metadata_ops(ret_pl, true);
VRFY_G((ret >= 0), "");
- ret = H5Pset_coll_metadata_write(ret_pl, TRUE);
+ ret = H5Pset_coll_metadata_write(ret_pl, true);
VRFY_G((ret >= 0), "");
return (ret_pl);
}
diff --git a/testpar/t_cache.c b/testpar/t_cache.c
index 0d188514ebd..0f845ef9b39 100644
--- a/testpar/t_cache.c
+++ b/testpar/t_cache.c
@@ -31,9 +31,9 @@
#define BASE_ADDR (haddr_t)1024
-int nerrors = 0;
-int failures = 0;
-hbool_t verbose = TRUE; /* used to control error messages */
+int nerrors = 0;
+int failures = 0;
+bool verbose = true; /* used to control error messages */
#define NFILENAME 2
const char *FILENAME[NFILENAME] = {"CacheTestDummy", NULL};
@@ -41,15 +41,15 @@ const char *FILENAME[NFILENAME] = {"CacheTestDummy", NULL};
#define PATH_MAX 512
#endif /* !PATH_MAX */
char *filenames[NFILENAME];
-hid_t fapl; /* file access property list */
-haddr_t max_addr = 0; /* used to store the end of
- * the address space used by
- * the data array (see below).
- */
-hbool_t callbacks_verbose = FALSE; /* flag used to control whether
- * the callback functions are in
- * verbose mode.
- */
+hid_t fapl; /* file access property list */
+haddr_t max_addr = 0; /* used to store the end of
+ * the address space used by
+ * the data array (see below).
+ */
+bool callbacks_verbose = false; /* flag used to control whether
+ * the callback functions are in
+ * verbose mode.
+ */
int world_mpi_size = -1;
int world_mpi_rank = -1;
@@ -161,13 +161,13 @@ struct datum {
size_t len;
size_t local_len;
int ver;
- hbool_t dirty;
- hbool_t valid;
- hbool_t locked;
- hbool_t global_pinned;
- hbool_t local_pinned;
- hbool_t cleared;
- hbool_t flushed;
+ bool dirty;
+ bool valid;
+ bool locked;
+ bool global_pinned;
+ bool local_pinned;
+ bool cleared;
+ bool flushed;
int reads;
int writes;
int index;
@@ -234,7 +234,7 @@ int *data_index = NULL;
* reads and writes. Without some such mechanism, the test code contains
* race conditions that will frequently cause spurious failures.
*
- * When set to TRUE, DO_WRITE_REQ_ACK forces the server to send an ack after
+ * When set to true, DO_WRITE_REQ_ACK forces the server to send an ack after
* each write request, and the client to wait until the ack is received
* before proceeding. This was my first solution to the problem, and at
* first glance, it would seem to have a lot of unnecessary overhead.
@@ -251,13 +251,13 @@ int *data_index = NULL;
*
* Thus I have left code supporting the second solution in place.
*
- * Note that while one of these two #defines must be set to TRUE, there
- * should never be any need to set both of them to TRUE (although the
+ * Note that while one of these two #defines must be set to true, there
+ * should never be any need to set both of them to true (although the
* tests will still function with this setting).
*****************************************************************************/
-#define DO_WRITE_REQ_ACK TRUE
-#define DO_SYNC_AFTER_WRITE FALSE
+#define DO_WRITE_REQ_ACK true
+#define DO_SYNC_AFTER_WRITE false
/*****************************************************************************
* struct mssg
@@ -332,7 +332,7 @@ static void reset_stats(void);
/* MPI setup functions */
-static hbool_t set_up_file_communicator(void);
+static bool set_up_file_communicator(void);
/* data array manipulation functions */
@@ -347,29 +347,29 @@ static int get_max_nerrors(void);
/* mssg xfer related functions */
-static hbool_t recv_mssg(struct mssg_t *mssg_ptr, int mssg_tag_offset);
-static hbool_t send_mssg(struct mssg_t *mssg_ptr, hbool_t add_req_to_tag);
-static hbool_t setup_derived_types(void);
-static hbool_t takedown_derived_types(void);
+static bool recv_mssg(struct mssg_t *mssg_ptr, int mssg_tag_offset);
+static bool send_mssg(struct mssg_t *mssg_ptr, bool add_req_to_tag);
+static bool setup_derived_types(void);
+static bool takedown_derived_types(void);
/* server functions */
-static hbool_t reset_server_counters(void);
-static hbool_t server_main(void);
-static hbool_t serve_read_request(struct mssg_t *mssg_ptr);
-static hbool_t serve_sync_request(struct mssg_t *mssg_ptr);
-static hbool_t serve_write_request(struct mssg_t *mssg_ptr);
-static hbool_t serve_total_writes_request(struct mssg_t *mssg_ptr);
-static hbool_t serve_total_reads_request(struct mssg_t *mssg_ptr);
-static hbool_t serve_entry_writes_request(struct mssg_t *mssg_ptr);
-static hbool_t serve_entry_reads_request(struct mssg_t *mssg_ptr);
-static hbool_t serve_rw_count_reset_request(struct mssg_t *mssg_ptr);
+static bool reset_server_counters(void);
+static bool server_main(void);
+static bool serve_read_request(struct mssg_t *mssg_ptr);
+static bool serve_sync_request(struct mssg_t *mssg_ptr);
+static bool serve_write_request(struct mssg_t *mssg_ptr);
+static bool serve_total_writes_request(struct mssg_t *mssg_ptr);
+static bool serve_total_reads_request(struct mssg_t *mssg_ptr);
+static bool serve_entry_writes_request(struct mssg_t *mssg_ptr);
+static bool serve_entry_reads_request(struct mssg_t *mssg_ptr);
+static bool serve_rw_count_reset_request(struct mssg_t *mssg_ptr);
/* call back functions & related data structures */
static herr_t datum_get_initial_load_size(void *udata_ptr, size_t *image_len_ptr);
-static void *datum_deserialize(const void *image_ptr, size_t len, void *udata_ptr, hbool_t *dirty_ptr);
+static void *datum_deserialize(const void *image_ptr, size_t len, void *udata_ptr, bool *dirty_ptr);
static herr_t datum_image_len(const void *thing, size_t *image_len_ptr);
@@ -417,45 +417,45 @@ const H5C_class_t types[NUMBER_OF_ENTRY_TYPES] = {{
/* test utility functions */
-static void expunge_entry(H5F_t *file_ptr, int32_t idx);
-static void insert_entry(H5C_t *cache_ptr, H5F_t *file_ptr, int32_t idx, unsigned int flags);
-static void local_pin_and_unpin_random_entries(H5F_t *file_ptr, int min_idx, int max_idx, int min_count,
- int max_count);
-static void local_pin_random_entry(H5F_t *file_ptr, int min_idx, int max_idx);
-static void local_unpin_all_entries(H5F_t *file_ptr, hbool_t via_unprotect);
-static int local_unpin_next_pinned_entry(H5F_t *file_ptr, int start_idx, hbool_t via_unprotect);
-static void lock_and_unlock_random_entries(H5F_t *file_ptr, int min_idx, int max_idx, int min_count,
- int max_count);
-static void lock_and_unlock_random_entry(H5F_t *file_ptr, int min_idx, int max_idx);
-static void lock_entry(H5F_t *file_ptr, int32_t idx);
-static void mark_entry_dirty(int32_t idx);
-static void pin_entry(H5F_t *file_ptr, int32_t idx, hbool_t global, hbool_t dirty);
-static void pin_protected_entry(int32_t idx, hbool_t global);
-static void move_entry(H5F_t *file_ptr, int32_t old_idx, int32_t new_idx);
-static hbool_t reset_server_counts(void);
-static void resize_entry(int32_t idx, size_t new_size);
-static hbool_t setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr,
- int metadata_write_strategy);
-static void setup_rand(void);
-static hbool_t take_down_cache(hid_t fid, H5C_t *cache_ptr);
-static hbool_t verify_entry_reads(haddr_t addr, int expected_entry_reads);
-static hbool_t verify_entry_writes(haddr_t addr, int expected_entry_writes);
-static hbool_t verify_total_reads(int expected_total_reads);
-static hbool_t verify_total_writes(unsigned expected_total_writes);
-static void verify_writes(unsigned num_writes, haddr_t *written_entries_tbl);
-static void unlock_entry(H5F_t *file_ptr, int32_t type, unsigned int flags);
-static void unpin_entry(H5F_t *file_ptr, int32_t idx, hbool_t global, hbool_t dirty, hbool_t via_unprotect);
+static void expunge_entry(H5F_t *file_ptr, int32_t idx);
+static void insert_entry(H5C_t *cache_ptr, H5F_t *file_ptr, int32_t idx, unsigned int flags);
+static void local_pin_and_unpin_random_entries(H5F_t *file_ptr, int min_idx, int max_idx, int min_count,
+ int max_count);
+static void local_pin_random_entry(H5F_t *file_ptr, int min_idx, int max_idx);
+static void local_unpin_all_entries(H5F_t *file_ptr, bool via_unprotect);
+static int local_unpin_next_pinned_entry(H5F_t *file_ptr, int start_idx, bool via_unprotect);
+static void lock_and_unlock_random_entries(H5F_t *file_ptr, int min_idx, int max_idx, int min_count,
+ int max_count);
+static void lock_and_unlock_random_entry(H5F_t *file_ptr, int min_idx, int max_idx);
+static void lock_entry(H5F_t *file_ptr, int32_t idx);
+static void mark_entry_dirty(int32_t idx);
+static void pin_entry(H5F_t *file_ptr, int32_t idx, bool global, bool dirty);
+static void pin_protected_entry(int32_t idx, bool global);
+static void move_entry(H5F_t *file_ptr, int32_t old_idx, int32_t new_idx);
+static bool reset_server_counts(void);
+static void resize_entry(int32_t idx, size_t new_size);
+static bool setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr,
+ int metadata_write_strategy);
+static void setup_rand(void);
+static bool take_down_cache(hid_t fid, H5C_t *cache_ptr);
+static bool verify_entry_reads(haddr_t addr, int expected_entry_reads);
+static bool verify_entry_writes(haddr_t addr, int expected_entry_writes);
+static bool verify_total_reads(int expected_total_reads);
+static bool verify_total_writes(unsigned expected_total_writes);
+static void verify_writes(unsigned num_writes, haddr_t *written_entries_tbl);
+static void unlock_entry(H5F_t *file_ptr, int32_t type, unsigned int flags);
+static void unpin_entry(H5F_t *file_ptr, int32_t idx, bool global, bool dirty, bool via_unprotect);
/* test functions */
-static hbool_t server_smoke_check(void);
-static hbool_t smoke_check_1(int metadata_write_strategy);
-static hbool_t smoke_check_2(int metadata_write_strategy);
-static hbool_t smoke_check_3(int metadata_write_strategy);
-static hbool_t smoke_check_4(int metadata_write_strategy);
-static hbool_t smoke_check_5(int metadata_write_strategy);
-static hbool_t smoke_check_6(int metadata_write_strategy);
-static hbool_t trace_file_check(int metadata_write_strategy);
+static bool server_smoke_check(void);
+static bool smoke_check_1(int metadata_write_strategy);
+static bool smoke_check_2(int metadata_write_strategy);
+static bool smoke_check_3(int metadata_write_strategy);
+static bool smoke_check_4(int metadata_write_strategy);
+static bool smoke_check_5(int metadata_write_strategy);
+static bool smoke_check_6(int metadata_write_strategy);
+static bool trace_file_check(int metadata_write_strategy);
/*****************************************************************************/
/****************************** stats functions ******************************/
@@ -529,16 +529,16 @@ reset_stats(void)
* Purpose: Create the MPI communicator used to open a HDF5 file with.
* In passing, also initialize the file_mpi... globals.
*
- * Return: Success: TRUE
+ * Return: Success: true
*
- * Failure: FALSE
+ * Failure: false
*
*****************************************************************************/
-static hbool_t
+static bool
set_up_file_communicator(void)
{
- hbool_t success = TRUE;
+ bool success = true;
int mpi_result;
int num_excluded_ranks;
int excluded_ranks[1];
@@ -552,7 +552,7 @@ set_up_file_communicator(void)
if (mpi_result != MPI_SUCCESS) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: MPI_Comm_group() failed with error %d.\n", world_mpi_rank, __func__,
mpi_result);
@@ -569,7 +569,7 @@ set_up_file_communicator(void)
if (mpi_result != MPI_SUCCESS) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: MPI_Group_excl() failed with error %d.\n", world_mpi_rank, __func__,
mpi_result);
@@ -584,7 +584,7 @@ set_up_file_communicator(void)
if (mpi_result != MPI_SUCCESS) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: MPI_Comm_create() failed with error %d.\n", world_mpi_rank, __func__,
mpi_result);
@@ -597,7 +597,7 @@ set_up_file_communicator(void)
if (file_mpi_comm == MPI_COMM_NULL) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: file_mpi_comm == MPI_COMM_NULL.\n", world_mpi_rank, __func__);
}
@@ -610,7 +610,7 @@ set_up_file_communicator(void)
if (file_mpi_comm != MPI_COMM_NULL) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: file_mpi_comm != MPI_COMM_NULL.\n", world_mpi_rank, __func__);
}
@@ -626,7 +626,7 @@ set_up_file_communicator(void)
if (mpi_result != MPI_SUCCESS) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: MPI_Comm_size() failed with error %d.\n", world_mpi_rank, __func__,
mpi_result);
@@ -641,7 +641,7 @@ set_up_file_communicator(void)
if (mpi_result != MPI_SUCCESS) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: MPI_Comm_rank() failed with error %d.\n", world_mpi_rank, __func__,
mpi_result);
@@ -712,9 +712,9 @@ addr_to_datum_index(haddr_t base_addr)
* Purpose: Initialize the data array, from which cache entries are
* loaded.
*
- * Return: Success: TRUE
+ * Return: Success: true
*
- * Failure: FALSE
+ * Failure: false
*
*****************************************************************************/
static void
@@ -743,13 +743,13 @@ init_data(void)
data[i].len = (size_t)(addr_offsets[j]);
data[i].local_len = (size_t)(addr_offsets[j]);
data[i].ver = 0;
- data[i].dirty = FALSE;
- data[i].valid = FALSE;
- data[i].locked = FALSE;
- data[i].global_pinned = FALSE;
- data[i].local_pinned = FALSE;
- data[i].cleared = FALSE;
- data[i].flushed = FALSE;
+ data[i].dirty = false;
+ data[i].valid = false;
+ data[i].locked = false;
+ data[i].global_pinned = false;
+ data[i].local_pinned = false;
+ data[i].cleared = false;
+ data[i].flushed = false;
data[i].reads = 0;
data[i].writes = 0;
data[i].index = i;
@@ -851,7 +851,7 @@ do_sync(void)
mssg.count = 0;
mssg.magic = MSSG_MAGIC;
- if (!send_mssg(&mssg, FALSE)) {
+ if (!send_mssg(&mssg, false)) {
nerrors++;
if (verbose) {
@@ -928,18 +928,18 @@ get_max_nerrors(void)
* Purpose: Receive a message from any process in the provided instance
* of struct mssg.
*
- * Return: Success: TRUE
+ * Return: Success: true
*
- * Failure: FALSE
+ * Failure: false
*
*****************************************************************************/
#define CACHE_TEST_TAG 99 /* different from any used by the library */
-static hbool_t
+static bool
recv_mssg(struct mssg_t *mssg_ptr, int mssg_tag_offset)
{
- hbool_t success = TRUE;
+ bool success = true;
int mssg_tag = CACHE_TEST_TAG;
int result;
MPI_Status status;
@@ -947,7 +947,7 @@ recv_mssg(struct mssg_t *mssg_ptr, int mssg_tag_offset)
if ((mssg_ptr == NULL) || (mssg_tag_offset < 0) || (mssg_tag_offset > MAX_REQ_CODE)) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: bad param(s) on entry.\n", world_mpi_rank, __func__);
}
@@ -964,7 +964,7 @@ recv_mssg(struct mssg_t *mssg_ptr, int mssg_tag_offset)
if (result != MPI_SUCCESS) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: MPI_Recv() failed.\n", world_mpi_rank, __func__);
}
@@ -972,7 +972,7 @@ recv_mssg(struct mssg_t *mssg_ptr, int mssg_tag_offset)
else if (mssg_ptr->magic != MSSG_MAGIC) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: invalid magic.\n", world_mpi_rank, __func__);
}
@@ -980,7 +980,7 @@ recv_mssg(struct mssg_t *mssg_ptr, int mssg_tag_offset)
else if (mssg_ptr->src != status.MPI_SOURCE) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: mssg_ptr->src != status.MPI_SOURCE.\n", world_mpi_rank, __func__);
}
@@ -1000,15 +1000,15 @@ recv_mssg(struct mssg_t *mssg_ptr, int mssg_tag_offset)
* Note that all source and destination ranks are in the
* global communicator.
*
- * Return: Success: TRUE
+ * Return: Success: true
*
- * Failure: FALSE
+ * Failure: false
*
*****************************************************************************/
-static hbool_t
-send_mssg(struct mssg_t *mssg_ptr, hbool_t add_req_to_tag)
+static bool
+send_mssg(struct mssg_t *mssg_ptr, bool add_req_to_tag)
{
- hbool_t success = TRUE;
+ bool success = true;
int mssg_tag = CACHE_TEST_TAG;
int result;
static long mssg_num = 0;
@@ -1018,7 +1018,7 @@ send_mssg(struct mssg_t *mssg_ptr, hbool_t add_req_to_tag)
(mssg_ptr->req > MAX_REQ_CODE) || (mssg_ptr->magic != MSSG_MAGIC)) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: Invalid mssg on entry.\n", world_mpi_rank, __func__);
}
@@ -1038,7 +1038,7 @@ send_mssg(struct mssg_t *mssg_ptr, hbool_t add_req_to_tag)
if (result != MPI_SUCCESS) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: MPI_Send() failed.\n", world_mpi_rank, __func__);
}
@@ -1056,15 +1056,15 @@ send_mssg(struct mssg_t *mssg_ptr, hbool_t add_req_to_tag)
* Purpose: Set up the derived types used by the test bed. At present,
* only the mpi_mssg derived type is needed.
*
- * Return: Success: TRUE
+ * Return: Success: true
*
- * Failure: FALSE
+ * Failure: false
*
*****************************************************************************/
-static hbool_t
+static bool
setup_derived_types(void)
{
- hbool_t success = TRUE;
+ bool success = true;
int i;
int result;
MPI_Datatype mpi_types[9] = {MPI_INT, MPI_INT, MPI_INT, MPI_LONG, HADDR_AS_MPI_TYPE,
@@ -1087,7 +1087,7 @@ setup_derived_types(void)
(MPI_SUCCESS != MPI_Get_address(&sample.magic, &displs[8]))) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: MPI_Get_address() call failed.\n", world_mpi_rank, __func__);
}
@@ -1107,7 +1107,7 @@ setup_derived_types(void)
if (result != MPI_SUCCESS) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: MPI_Type_create_struct() call failed.\n", world_mpi_rank, __func__);
}
@@ -1121,7 +1121,7 @@ setup_derived_types(void)
if (result != MPI_SUCCESS) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: MPI_Type_commit() call failed.\n", world_mpi_rank, __func__);
}
@@ -1139,16 +1139,16 @@ setup_derived_types(void)
* Purpose: take down the derived types used by the test bed. At present,
* only the mpi_mssg derived type is needed.
*
- * Return: Success: TRUE
+ * Return: Success: true
*
- * Failure: FALSE
+ * Failure: false
*
*****************************************************************************/
-static hbool_t
+static bool
takedown_derived_types(void)
{
- hbool_t success = TRUE;
- int result;
+ bool success = true;
+ int result;
if (mpi_mssg_t == MPI_DATATYPE_NULL)
return (success);
@@ -1158,7 +1158,7 @@ takedown_derived_types(void)
if (result != MPI_SUCCESS) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: MPI_Type_free() call failed.\n", world_mpi_rank, __func__);
}
@@ -1179,18 +1179,18 @@ takedown_derived_types(void)
* Purpose: Reset the counters maintained by the server, doing a
* sanity check in passing.
*
- * Return: Success: TRUE
+ * Return: Success: true
*
- * Failure: FALSE
+ * Failure: false
*
*****************************************************************************/
-static hbool_t
+static bool
reset_server_counters(void)
{
- hbool_t success = TRUE;
- int i;
- long actual_total_reads = 0;
- long actual_total_writes = 0;
+ bool success = true;
+ int i;
+ long actual_total_reads = 0;
+ long actual_total_writes = 0;
for (i = 0; i < NUM_DATA_ENTRIES; i++) {
if (data[i].reads > 0) {
@@ -1208,7 +1208,7 @@ reset_server_counters(void)
if (actual_total_reads != total_reads) {
- success = FALSE;
+ success = false;
nerrors++;
if (verbose) {
fprintf(stdout, "%d:%s: actual/total reads mismatch (%ld/%d).\n", world_mpi_rank, __func__,
@@ -1218,7 +1218,7 @@ reset_server_counters(void)
if (actual_total_writes != total_writes) {
- success = FALSE;
+ success = false;
nerrors++;
if (verbose) {
fprintf(stdout, "%d:%s: actual/total writes mismatch (%ld/%d).\n", world_mpi_rank, __func__,
@@ -1244,23 +1244,23 @@ reset_server_counters(void)
* the test until the count of done messages received equals
* the number of client processes.
*
- * Return: Success: TRUE
+ * Return: Success: true
*
- * Failure: FALSE
+ * Failure: false
*
*****************************************************************************/
-static hbool_t
+static bool
server_main(void)
{
- hbool_t done = FALSE;
- hbool_t success = TRUE;
+ bool done = false;
+ bool success = true;
int done_count = 0;
struct mssg_t mssg;
if (world_mpi_rank != world_server_mpi_rank) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: This isn't the server process?!?!?\n", world_mpi_rank, __func__);
}
@@ -1277,7 +1277,7 @@ server_main(void)
break;
case WRITE_REQ_ACK_CODE:
- success = FALSE;
+ success = false;
if (verbose)
fprintf(stdout, "%s: Received write ack?!?.\n", __func__);
break;
@@ -1287,7 +1287,7 @@ server_main(void)
break;
case READ_REQ_REPLY_CODE:
- success = FALSE;
+ success = false;
if (verbose)
fprintf(stdout, "%s: Received read req reply?!?.\n", __func__);
break;
@@ -1297,7 +1297,7 @@ server_main(void)
break;
case SYNC_ACK_CODE:
- success = FALSE;
+ success = false;
if (verbose)
fprintf(stdout, "%s: Received sync ack?!?.\n", __func__);
break;
@@ -1307,7 +1307,7 @@ server_main(void)
break;
case REQ_TTL_WRITES_RPLY_CODE:
- success = FALSE;
+ success = false;
if (verbose)
fprintf(stdout, "%s: Received total writes reply?!?.\n", __func__);
break;
@@ -1317,7 +1317,7 @@ server_main(void)
break;
case REQ_TTL_READS_RPLY_CODE:
- success = FALSE;
+ success = false;
if (verbose)
fprintf(stdout, "%s: Received total reads reply?!?.\n", __func__);
break;
@@ -1327,7 +1327,7 @@ server_main(void)
break;
case REQ_ENTRY_WRITES_RPLY_CODE:
- success = FALSE;
+ success = false;
if (verbose)
fprintf(stdout, "%s: Received entry writes reply?!?.\n", __func__);
break;
@@ -1337,7 +1337,7 @@ server_main(void)
break;
case REQ_ENTRY_READS_RPLY_CODE:
- success = FALSE;
+ success = false;
if (verbose)
fprintf(stdout, "%s: Received entry reads reply?!?.\n", __func__);
break;
@@ -1347,7 +1347,7 @@ server_main(void)
break;
case REQ_RW_COUNT_RESET_RPLY_CODE:
- success = FALSE;
+ success = false;
if (verbose)
fprintf(stdout, "%s: Received RW count reset reply?!?.\n", __func__);
break;
@@ -1355,12 +1355,12 @@ server_main(void)
case DONE_REQ_CODE:
done_count++;
if (done_count >= file_mpi_size)
- done = TRUE;
+ done = true;
break;
default:
nerrors++;
- success = FALSE;
+ success = false;
if (verbose)
fprintf(stdout, "%d:%s: Unknown request code.\n", world_mpi_rank, __func__);
break;
@@ -1383,16 +1383,16 @@ server_main(void)
* a copy of the indicated datum from the data array to
* the requesting process.
*
- * Return: Success: TRUE
+ * Return: Success: true
*
- * Failure: FALSE
+ * Failure: false
*
*****************************************************************************/
-static hbool_t
+static bool
serve_read_request(struct mssg_t *mssg_ptr)
{
- hbool_t report_mssg = FALSE;
- hbool_t success = TRUE;
+ bool report_mssg = false;
+ bool success = true;
int target_index;
haddr_t target_addr;
struct mssg_t reply;
@@ -1400,7 +1400,7 @@ serve_read_request(struct mssg_t *mssg_ptr)
if ((mssg_ptr == NULL) || (mssg_ptr->req != READ_REQ_CODE) || (mssg_ptr->magic != MSSG_MAGIC)) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__);
}
@@ -1414,7 +1414,7 @@ serve_read_request(struct mssg_t *mssg_ptr)
if (target_index < 0) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, __func__,
target_addr);
@@ -1423,7 +1423,7 @@ serve_read_request(struct mssg_t *mssg_ptr)
else if (data[target_index].len != mssg_ptr->len) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: data[i].len = %zu != mssg->len = %d.\n", world_mpi_rank, __func__,
data[target_index].len, mssg_ptr->len);
@@ -1432,7 +1432,7 @@ serve_read_request(struct mssg_t *mssg_ptr)
else if (!(data[target_index].valid)) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout,
"%d:%s: proc %d read invalid entry. "
@@ -1461,7 +1461,7 @@ serve_read_request(struct mssg_t *mssg_ptr)
if (success) {
- success = send_mssg(&reply, TRUE);
+ success = send_mssg(&reply, true);
}
if (report_mssg) {
@@ -1498,22 +1498,22 @@ serve_read_request(struct mssg_t *mssg_ptr)
* that all previous messages have been processed before
* proceeding.
*
- * Return: Success: TRUE
+ * Return: Success: true
*
- * Failure: FALSE
+ * Failure: false
*
*****************************************************************************/
-static hbool_t
+static bool
serve_sync_request(struct mssg_t *mssg_ptr)
{
- hbool_t report_mssg = FALSE;
- hbool_t success = TRUE;
+ bool report_mssg = false;
+ bool success = true;
struct mssg_t reply;
if ((mssg_ptr == NULL) || (mssg_ptr->req != SYNC_REQ_CODE) || (mssg_ptr->magic != MSSG_MAGIC)) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__);
}
@@ -1535,7 +1535,7 @@ serve_sync_request(struct mssg_t *mssg_ptr)
if (success) {
- success = send_mssg(&reply, TRUE);
+ success = send_mssg(&reply, true);
}
if (report_mssg) {
@@ -1565,16 +1565,16 @@ serve_sync_request(struct mssg_t *mssg_ptr)
* the version number of the target data array entry as
* specified in the message.
*
- * Return: Success: TRUE
+ * Return: Success: true
*
- * Failure: FALSE
+ * Failure: false
*
*****************************************************************************/
-static hbool_t
+static bool
serve_write_request(struct mssg_t *mssg_ptr)
{
- hbool_t report_mssg = FALSE;
- hbool_t success = TRUE;
+ bool report_mssg = false;
+ bool success = true;
int target_index;
int new_ver_num = 0;
haddr_t target_addr;
@@ -1585,7 +1585,7 @@ serve_write_request(struct mssg_t *mssg_ptr)
if ((mssg_ptr == NULL) || (mssg_ptr->req != WRITE_REQ_CODE) || (mssg_ptr->magic != MSSG_MAGIC)) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__);
}
@@ -1599,7 +1599,7 @@ serve_write_request(struct mssg_t *mssg_ptr)
if (target_index < 0) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, __func__,
target_addr);
@@ -1608,7 +1608,7 @@ serve_write_request(struct mssg_t *mssg_ptr)
else if (data[target_index].len != mssg_ptr->len) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: data[i].len = %zu != mssg->len = %d.\n", world_mpi_rank, __func__,
data[target_index].len, mssg_ptr->len);
@@ -1624,7 +1624,7 @@ serve_write_request(struct mssg_t *mssg_ptr)
if (new_ver_num <= data[target_index].ver) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: new ver = %d <= old ver = %d.\n", world_mpi_rank, __func__,
new_ver_num, data[target_index].ver);
@@ -1636,7 +1636,7 @@ serve_write_request(struct mssg_t *mssg_ptr)
/* process the write */
data[target_index].ver = new_ver_num;
- data[target_index].valid = TRUE;
+ data[target_index].valid = true;
/* and update the counters */
total_writes++;
@@ -1656,7 +1656,7 @@ serve_write_request(struct mssg_t *mssg_ptr)
reply.magic = MSSG_MAGIC;
/* and send it */
- success = send_mssg(&reply, TRUE);
+ success = send_mssg(&reply, true);
#endif /* DO_WRITE_REQ_ACK */
}
@@ -1693,22 +1693,22 @@ serve_write_request(struct mssg_t *mssg_ptr)
* the current value of the total_writes global variable to
* the requesting process.
*
- * Return: Success: TRUE
+ * Return: Success: true
*
- * Failure: FALSE
+ * Failure: false
*
*****************************************************************************/
-static hbool_t
+static bool
serve_total_writes_request(struct mssg_t *mssg_ptr)
{
- hbool_t report_mssg = FALSE;
- hbool_t success = TRUE;
+ bool report_mssg = false;
+ bool success = true;
struct mssg_t reply;
if ((mssg_ptr == NULL) || (mssg_ptr->req != REQ_TTL_WRITES_CODE) || (mssg_ptr->magic != MSSG_MAGIC)) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__);
}
@@ -1730,7 +1730,7 @@ serve_total_writes_request(struct mssg_t *mssg_ptr)
if (success) {
- success = send_mssg(&reply, TRUE);
+ success = send_mssg(&reply, true);
}
if (report_mssg) {
@@ -1761,22 +1761,22 @@ serve_total_writes_request(struct mssg_t *mssg_ptr)
* the current value of the total_reads global variable to
* the requesting process.
*
- * Return: Success: TRUE
+ * Return: Success: true
*
- * Failure: FALSE
+ * Failure: false
*
*****************************************************************************/
-static hbool_t
+static bool
serve_total_reads_request(struct mssg_t *mssg_ptr)
{
- hbool_t report_mssg = FALSE;
- hbool_t success = TRUE;
+ bool report_mssg = false;
+ bool success = true;
struct mssg_t reply;
if ((mssg_ptr == NULL) || (mssg_ptr->req != REQ_TTL_READS_CODE) || (mssg_ptr->magic != MSSG_MAGIC)) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__);
}
@@ -1798,7 +1798,7 @@ serve_total_reads_request(struct mssg_t *mssg_ptr)
if (success) {
- success = send_mssg(&reply, TRUE);
+ success = send_mssg(&reply, true);
}
if (report_mssg) {
@@ -1829,16 +1829,16 @@ serve_total_reads_request(struct mssg_t *mssg_ptr)
* written since the last counter reset to the requesting
* process.
*
- * Return: Success: TRUE
+ * Return: Success: true
*
- * Failure: FALSE
+ * Failure: false
*
*****************************************************************************/
-static hbool_t
+static bool
serve_entry_writes_request(struct mssg_t *mssg_ptr)
{
- hbool_t report_mssg = FALSE;
- hbool_t success = TRUE;
+ bool report_mssg = false;
+ bool success = true;
int target_index;
haddr_t target_addr;
struct mssg_t reply;
@@ -1846,7 +1846,7 @@ serve_entry_writes_request(struct mssg_t *mssg_ptr)
if ((mssg_ptr == NULL) || (mssg_ptr->req != REQ_ENTRY_WRITES_CODE) || (mssg_ptr->magic != MSSG_MAGIC)) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__);
}
@@ -1860,7 +1860,7 @@ serve_entry_writes_request(struct mssg_t *mssg_ptr)
if (target_index < 0) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, __func__,
target_addr);
@@ -1883,7 +1883,7 @@ serve_entry_writes_request(struct mssg_t *mssg_ptr)
if (success) {
- success = send_mssg(&reply, TRUE);
+ success = send_mssg(&reply, true);
}
if (report_mssg) {
@@ -1916,16 +1916,16 @@ serve_entry_writes_request(struct mssg_t *mssg_ptr)
* read since the last counter reset to the requesting
* process.
*
- * Return: Success: TRUE
+ * Return: Success: true
*
- * Failure: FALSE
+ * Failure: false
*
*****************************************************************************/
-static hbool_t
+static bool
serve_entry_reads_request(struct mssg_t *mssg_ptr)
{
- hbool_t report_mssg = FALSE;
- hbool_t success = TRUE;
+ bool report_mssg = false;
+ bool success = true;
int target_index;
haddr_t target_addr;
struct mssg_t reply;
@@ -1933,7 +1933,7 @@ serve_entry_reads_request(struct mssg_t *mssg_ptr)
if ((mssg_ptr == NULL) || (mssg_ptr->req != REQ_ENTRY_READS_CODE) || (mssg_ptr->magic != MSSG_MAGIC)) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__);
}
@@ -1947,7 +1947,7 @@ serve_entry_reads_request(struct mssg_t *mssg_ptr)
if (target_index < 0) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, __func__,
target_addr);
@@ -1970,7 +1970,7 @@ serve_entry_reads_request(struct mssg_t *mssg_ptr)
if (success) {
- success = send_mssg(&reply, TRUE);
+ success = send_mssg(&reply, true);
}
if (report_mssg) {
@@ -2002,22 +2002,22 @@ serve_entry_reads_request(struct mssg_t *mssg_ptr)
* read/write counters, and sends a confirmation message to
* the calling process.
*
- * Return: Success: TRUE
+ * Return: Success: true
*
- * Failure: FALSE
+ * Failure: false
*
*****************************************************************************/
-static hbool_t
+static bool
serve_rw_count_reset_request(struct mssg_t *mssg_ptr)
{
- hbool_t report_mssg = FALSE;
- hbool_t success = TRUE;
+ bool report_mssg = false;
+ bool success = true;
struct mssg_t reply;
if ((mssg_ptr == NULL) || (mssg_ptr->req != REQ_RW_COUNT_RESET_CODE) || (mssg_ptr->magic != MSSG_MAGIC)) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__);
}
@@ -2044,7 +2044,7 @@ serve_rw_count_reset_request(struct mssg_t *mssg_ptr)
if (success) {
- success = send_mssg(&reply, TRUE);
+ success = send_mssg(&reply, true);
}
if (report_mssg) {
@@ -2122,10 +2122,10 @@ datum_get_initial_load_size(void *udata_ptr, size_t *image_len_ptr)
*/
static void *
datum_deserialize(const void H5_ATTR_NDEBUG_UNUSED *image_ptr, H5_ATTR_UNUSED size_t len, void *udata_ptr,
- hbool_t *dirty_ptr)
+ bool *dirty_ptr)
{
haddr_t addr = *(haddr_t *)udata_ptr;
- hbool_t success = TRUE;
+ bool success = true;
int idx;
struct datum *entry_ptr = NULL;
@@ -2152,7 +2152,7 @@ datum_deserialize(const void H5_ATTR_NDEBUG_UNUSED *image_ptr, H5_ATTR_UNUSED si
fflush(stdout);
}
- *dirty_ptr = FALSE;
+ *dirty_ptr = false;
if (!success) {
@@ -2285,7 +2285,7 @@ datum_serialize(const H5F_t *f, void H5_ATTR_NDEBUG_UNUSED *image_ptr, size_t le
static herr_t
datum_notify(H5C_notify_action_t action, void *thing)
{
- hbool_t was_dirty = FALSE;
+ bool was_dirty = false;
herr_t ret_value = SUCCEED;
struct datum *entry_ptr;
struct H5AC_aux_t *aux_ptr;
@@ -2349,7 +2349,7 @@ datum_notify(H5C_notify_action_t action, void *thing)
mssg.count = 0; /* not used */
mssg.magic = MSSG_MAGIC;
- if (!send_mssg(&mssg, FALSE)) {
+ if (!send_mssg(&mssg, false)) {
nerrors++;
ret_value = FAIL;
@@ -2446,7 +2446,7 @@ datum_notify(H5C_notify_action_t action, void *thing)
else {
entry_ptr->ver = mssg.ver;
- entry_ptr->dirty = FALSE;
+ entry_ptr->dirty = false;
datum_loads++;
}
}
@@ -2478,7 +2478,7 @@ datum_notify(H5C_notify_action_t action, void *thing)
if (entry_ptr->header.is_dirty) {
- was_dirty = TRUE; /* so we will receive the ack
+ was_dirty = true; /* so we will receive the ack
* if requested
*/
@@ -2493,7 +2493,7 @@ datum_notify(H5C_notify_action_t action, void *thing)
mssg.count = 0;
mssg.magic = MSSG_MAGIC;
- if (!send_mssg(&mssg, FALSE)) {
+ if (!send_mssg(&mssg, false)) {
nerrors++;
ret_value = FAIL;
@@ -2502,8 +2502,8 @@ datum_notify(H5C_notify_action_t action, void *thing)
}
}
else {
- entry_ptr->dirty = FALSE;
- entry_ptr->flushed = TRUE;
+ entry_ptr->dirty = false;
+ entry_ptr->flushed = true;
}
}
}
@@ -2574,8 +2574,8 @@ datum_notify(H5C_notify_action_t action, void *thing)
fflush(stdout);
}
- entry_ptr->cleared = TRUE;
- entry_ptr->dirty = FALSE;
+ entry_ptr->cleared = true;
+ entry_ptr->dirty = false;
datum_clears++;
@@ -2711,7 +2711,7 @@ datum_free_icr(void *thing)
static void
expunge_entry(H5F_t *file_ptr, int32_t idx)
{
- hbool_t in_cache;
+ bool in_cache;
herr_t result;
struct datum *entry_ptr;
@@ -2725,7 +2725,7 @@ expunge_entry(H5F_t *file_ptr, int32_t idx)
assert(!(entry_ptr->global_pinned));
assert(!(entry_ptr->local_pinned));
- entry_ptr->dirty = FALSE;
+ entry_ptr->dirty = false;
if (nerrors == 0) {
@@ -2779,7 +2779,7 @@ expunge_entry(H5F_t *file_ptr, int32_t idx)
static void
insert_entry(H5C_t *cache_ptr, H5F_t *file_ptr, int32_t idx, unsigned int flags)
{
- hbool_t insert_pinned;
+ bool insert_pinned;
herr_t result;
struct datum *entry_ptr;
@@ -2797,7 +2797,7 @@ insert_entry(H5C_t *cache_ptr, H5F_t *file_ptr, int32_t idx, unsigned int flags)
if (nerrors == 0) {
(entry_ptr->ver)++;
- entry_ptr->dirty = TRUE;
+ entry_ptr->dirty = true;
result = H5AC_insert_entry(file_ptr, &(types[0]), entry_ptr->base_addr,
(void *)(&(entry_ptr->header)), flags);
@@ -2836,13 +2836,13 @@ insert_entry(H5C_t *cache_ptr, H5F_t *file_ptr, int32_t idx, unsigned int flags)
if (insert_pinned) {
assert(entry_ptr->header.is_pinned);
- entry_ptr->global_pinned = TRUE;
+ entry_ptr->global_pinned = true;
global_pins++;
}
else {
assert(!(entry_ptr->header.is_pinned));
- entry_ptr->global_pinned = FALSE;
+ entry_ptr->global_pinned = false;
}
/* assert( entry_ptr->header.is_dirty ); */
@@ -2870,10 +2870,10 @@ local_pin_and_unpin_random_entries(H5F_t *file_ptr, int min_idx, int max_idx, in
if (nerrors == 0) {
- hbool_t via_unprotect;
- int count;
- int i;
- int idx;
+ bool via_unprotect;
+ int count;
+ int i;
+ int idx;
assert(file_ptr);
assert(0 <= min_idx);
@@ -2943,7 +2943,7 @@ local_pin_random_entry(H5F_t *file_ptr, int min_idx, int max_idx)
assert(idx <= max_idx);
} while (data[idx].global_pinned || data[idx].local_pinned);
- pin_entry(file_ptr, idx, FALSE, FALSE);
+ pin_entry(file_ptr, idx, false, false);
}
return;
@@ -2961,7 +2961,7 @@ local_pin_random_entry(H5F_t *file_ptr, int min_idx, int max_idx)
*
*****************************************************************************/
static void
-local_unpin_all_entries(H5F_t *file_ptr, hbool_t via_unprotect)
+local_unpin_all_entries(H5F_t *file_ptr, bool via_unprotect)
{
if (nerrors == 0) {
@@ -2995,7 +2995,7 @@ local_unpin_all_entries(H5F_t *file_ptr, hbool_t via_unprotect)
*
*****************************************************************************/
static int
-local_unpin_next_pinned_entry(H5F_t *file_ptr, int start_idx, hbool_t via_unprotect)
+local_unpin_next_pinned_entry(H5F_t *file_ptr, int start_idx, bool via_unprotect)
{
int i = 0;
int idx = -1;
@@ -3019,7 +3019,7 @@ local_unpin_next_pinned_entry(H5F_t *file_ptr, int start_idx, hbool_t via_unprot
if (data[idx].local_pinned) {
- unpin_entry(file_ptr, idx, FALSE, FALSE, via_unprotect);
+ unpin_entry(file_ptr, idx, false, false, via_unprotect);
}
else {
@@ -3146,7 +3146,7 @@ lock_entry(H5F_t *file_ptr, int32_t idx)
}
else {
- entry_ptr->locked = TRUE;
+ entry_ptr->locked = true;
}
assert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE);
@@ -3183,7 +3183,7 @@ mark_entry_dirty(int32_t idx)
assert(!(entry_ptr->local_pinned));
(entry_ptr->ver)++;
- entry_ptr->dirty = TRUE;
+ entry_ptr->dirty = true;
result = H5AC_mark_entry_dirty((void *)entry_ptr);
@@ -3214,7 +3214,7 @@ mark_entry_dirty(int32_t idx)
*
*****************************************************************************/
static void
-pin_entry(H5F_t *file_ptr, int32_t idx, hbool_t global, hbool_t dirty)
+pin_entry(H5F_t *file_ptr, int32_t idx, bool global, bool dirty)
{
unsigned int flags = H5AC__PIN_ENTRY_FLAG;
struct datum *entry_ptr;
@@ -3245,13 +3245,13 @@ pin_entry(H5F_t *file_ptr, int32_t idx, hbool_t global, hbool_t dirty)
if (global) {
- entry_ptr->global_pinned = TRUE;
+ entry_ptr->global_pinned = true;
global_pins++;
}
else {
- entry_ptr->local_pinned = TRUE;
+ entry_ptr->local_pinned = true;
local_pins++;
}
@@ -3273,7 +3273,7 @@ pin_entry(H5F_t *file_ptr, int32_t idx, hbool_t global, hbool_t dirty)
*
*****************************************************************************/
static void
-pin_protected_entry(int32_t idx, hbool_t global)
+pin_protected_entry(int32_t idx, bool global)
{
herr_t result;
struct datum *entry_ptr;
@@ -3302,13 +3302,13 @@ pin_protected_entry(int32_t idx, hbool_t global)
if (global) {
- entry_ptr->global_pinned = TRUE;
+ entry_ptr->global_pinned = true;
global_pins++;
}
else {
- entry_ptr->local_pinned = TRUE;
+ entry_ptr->local_pinned = true;
local_pins++;
}
@@ -3364,7 +3364,7 @@ move_entry(H5F_t *file_ptr, int32_t old_idx, int32_t new_idx)
new_addr = new_entry_ptr->base_addr;
/* Moving will mark the entry dirty if it is not already */
- old_entry_ptr->dirty = TRUE;
+ old_entry_ptr->dirty = true;
/* touch up versions, base_addrs, and data_index. Do this
* now as it is possible that the rename will trigger a
@@ -3441,15 +3441,15 @@ move_entry(H5F_t *file_ptr, int32_t old_idx, int32_t new_idx)
* Purpose: Send a message to the server process requesting it to reset
* its counters. Await confirmation message.
*
- * Return: Success: TRUE
+ * Return: Success: true
*
- * Failure: FALSE
+ * Failure: false
*
*****************************************************************************/
-static hbool_t
+static bool
reset_server_counts(void)
{
- hbool_t success = TRUE; /* will set to FALSE if appropriate. */
+ bool success = true; /* will set to false if appropriate. */
struct mssg_t mssg;
if (success) {
@@ -3465,10 +3465,10 @@ reset_server_counts(void)
mssg.count = 0;
mssg.magic = MSSG_MAGIC;
- if (!send_mssg(&mssg, FALSE)) {
+ if (!send_mssg(&mssg, false)) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__);
}
@@ -3480,7 +3480,7 @@ reset_server_counts(void)
if (!recv_mssg(&mssg, REQ_RW_COUNT_RESET_RPLY_CODE)) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__);
}
@@ -3490,7 +3490,7 @@ reset_server_counts(void)
(mssg.ver != 0) || (mssg.count != 0) || (mssg.magic != MSSG_MAGIC)) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: Bad data in req r/w counter reset reply.\n", world_mpi_rank,
__func__);
@@ -3550,7 +3550,7 @@ resize_entry(int32_t idx, size_t new_size)
assert(entry_ptr->header.is_dirty);
assert(entry_ptr->header.size == new_size);
- entry_ptr->dirty = TRUE;
+ entry_ptr->dirty = true;
entry_ptr->local_len = new_size;
/* touch up version. */
@@ -3575,17 +3575,17 @@ resize_entry(int32_t idx, size_t new_size)
* look up the address of the metadata cache, and then instruct
* the cache to omit sanity checks on dxpl IDs.
*
- * Return: Success: TRUE
+ * Return: Success: true
*
- * Failure: FALSE
+ * Failure: false
*
*****************************************************************************/
-static hbool_t
+static bool
setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr, int metadata_write_strategy)
{
- hbool_t success = FALSE; /* will set to TRUE if appropriate. */
- hbool_t enable_rpt_fcn = FALSE;
- hid_t fid = -1;
+ bool success = false; /* will set to true if appropriate. */
+ bool enable_rpt_fcn = false;
+ hid_t fid = H5I_INVALID_HID;
H5AC_cache_config_t config;
H5AC_cache_config_t test_config;
H5F_t *file_ptr = NULL;
@@ -3634,12 +3634,12 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr
}
}
else {
- cache_ptr->ignore_tags = TRUE;
+ cache_ptr->ignore_tags = true;
*fid_ptr = fid;
*file_ptr_ptr = file_ptr;
*cache_ptr_ptr = cache_ptr;
H5C_stats__reset(cache_ptr);
- success = TRUE;
+ success = true;
}
if (success) {
@@ -3727,7 +3727,7 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr
if (actual_base_addr == HADDR_UNDEF) {
- success = FALSE;
+ success = false;
nerrors++;
if (verbose) {
@@ -3740,7 +3740,7 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr
* actual_base_addr is <= BASE_ADDR. This should only happen
* if the size of the superblock is increase.
*/
- success = FALSE;
+ success = false;
nerrors++;
if (verbose) {
@@ -3819,9 +3819,9 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr
static void
verify_writes(unsigned num_writes, haddr_t *written_entries_tbl)
{
- const hbool_t report = FALSE;
- hbool_t proceed = TRUE;
- unsigned u = 0;
+ const bool report = false;
+ bool proceed = true;
+ unsigned u = 0;
assert(world_mpi_rank != world_server_mpi_rank);
assert((num_writes == 0) || (written_entries_tbl != NULL));
@@ -3833,7 +3833,7 @@ verify_writes(unsigned num_writes, haddr_t *written_entries_tbl)
if (MPI_SUCCESS != MPI_Barrier(file_mpi_comm)) {
- proceed = FALSE;
+ proceed = false;
nerrors++;
if (verbose) {
fprintf(stdout, "%d:%s: barrier 1 failed.\n", world_mpi_rank, __func__);
@@ -3856,7 +3856,7 @@ verify_writes(unsigned num_writes, haddr_t *written_entries_tbl)
if (MPI_SUCCESS != MPI_Barrier(file_mpi_comm)) {
- proceed = FALSE;
+ proceed = false;
nerrors++;
if (verbose) {
fprintf(stdout, "%d:%s: barrier 2 failed.\n", world_mpi_rank, __func__);
@@ -3892,7 +3892,7 @@ verify_writes(unsigned num_writes, haddr_t *written_entries_tbl)
if (MPI_SUCCESS != MPI_Barrier(file_mpi_comm)) {
- proceed = FALSE;
+ proceed = false;
nerrors++;
if (verbose) {
fprintf(stdout, "%d:%s: barrier 3 failed.\n", world_mpi_rank, __func__);
@@ -3919,7 +3919,7 @@ verify_writes(unsigned num_writes, haddr_t *written_entries_tbl)
static void
setup_rand(void)
{
- hbool_t use_predefined_seeds = FALSE;
+ bool use_predefined_seeds = false;
int num_predefined_seeds = 3;
unsigned predefined_seeds[3] = {18669, 89925, 12577};
unsigned seed;
@@ -3967,22 +3967,22 @@ setup_rand(void)
* To do this, we must close the file, and delete if if
* possible.
*
- * Return: Success: TRUE
+ * Return: Success: true
*
- * Failure: FALSE
+ * Failure: false
*
*****************************************************************************/
-static hbool_t
+static bool
take_down_cache(hid_t fid, H5C_t *cache_ptr)
{
- hbool_t success = TRUE; /* will set to FALSE if appropriate. */
+ bool success = true; /* will set to false if appropriate. */
/* flush the file -- this should write out any remaining test
* entries in the cache.
*/
if ((success) && (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0)) {
- success = FALSE;
+ success = false;
nerrors++;
if (verbose) {
fprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__);
@@ -3998,7 +3998,7 @@ take_down_cache(hid_t fid, H5C_t *cache_ptr)
if (H5AC__set_sync_point_done_callback(cache_ptr, NULL) != SUCCEED) {
- success = FALSE;
+ success = false;
nerrors++;
if (verbose) {
fprintf(stdout, "%d:%s: H5AC__set_sync_point_done_callback failed.\n", world_mpi_rank,
@@ -4010,7 +4010,7 @@ take_down_cache(hid_t fid, H5C_t *cache_ptr)
/* close the file */
if ((success) && (H5Fclose(fid) < 0)) {
- success = FALSE;
+ success = false;
nerrors++;
if (verbose) {
fprintf(stdout, "%d:%s: H5Fclose() failed.\n", world_mpi_rank, __func__);
@@ -4018,7 +4018,7 @@ take_down_cache(hid_t fid, H5C_t *cache_ptr)
}
/* Pop API context */
- H5CX_pop(FALSE);
+ H5CX_pop(false);
if (success) {
@@ -4026,7 +4026,7 @@ take_down_cache(hid_t fid, H5C_t *cache_ptr)
if (HDremove(filenames[0]) < 0) {
- success = FALSE;
+ success = false;
nerrors++;
if (verbose) {
fprintf(stdout, "%d:%s: HDremove() failed.\n", world_mpi_rank, __func__);
@@ -4053,20 +4053,20 @@ take_down_cache(hid_t fid, H5C_t *cache_ptr)
* indicated entry has been read since the last time the
* server counters were reset.
*
- * Return TRUE if successful, and if the supplied expected
+ * Return true if successful, and if the supplied expected
* number of reads matches the number of reads reported by
* the server process.
*
- * Return FALSE and flag an error otherwise.
+ * Return false and flag an error otherwise.
*
- * Return: TRUE if successful, FALSE otherwise.
+ * Return: true if successful, false otherwise.
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
verify_entry_reads(haddr_t addr, int expected_entry_reads)
{
- hbool_t success = TRUE;
+ bool success = true;
int reported_entry_reads = 0;
struct mssg_t mssg;
@@ -4083,10 +4083,10 @@ verify_entry_reads(haddr_t addr, int expected_entry_reads)
mssg.count = 0; /* not used */
mssg.magic = MSSG_MAGIC;
- if (!send_mssg(&mssg, FALSE)) {
+ if (!send_mssg(&mssg, false)) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__);
}
@@ -4098,7 +4098,7 @@ verify_entry_reads(haddr_t addr, int expected_entry_reads)
if (!recv_mssg(&mssg, REQ_ENTRY_READS_RPLY_CODE)) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__);
}
@@ -4112,7 +4112,7 @@ verify_entry_reads(haddr_t addr, int expected_entry_reads)
(mssg.magic != MSSG_MAGIC)) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: Bad data in req entry reads reply.\n", world_mpi_rank, __func__);
}
@@ -4128,7 +4128,7 @@ verify_entry_reads(haddr_t addr, int expected_entry_reads)
if (reported_entry_reads != expected_entry_reads) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: rep/exp entry 0x%" PRIxHADDR " reads mismatch (%d/%d).\n",
world_mpi_rank, __func__, addr, reported_entry_reads, expected_entry_reads);
@@ -4147,20 +4147,20 @@ verify_entry_reads(haddr_t addr, int expected_entry_reads)
* indicated entry has been written since the last time the
* server counters were reset.
*
- * Return TRUE if successful, and if the supplied expected
+ * Return true if successful, and if the supplied expected
* number of reads matches the number of reads reported by
* the server process.
*
- * Return FALSE and flag an error otherwise.
+ * Return false and flag an error otherwise.
*
- * Return: TRUE if successful, FALSE otherwise.
+ * Return: true if successful, false otherwise.
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
verify_entry_writes(haddr_t addr, int expected_entry_writes)
{
- hbool_t success = TRUE;
+ bool success = true;
int reported_entry_writes = 0;
struct mssg_t mssg;
@@ -4177,10 +4177,10 @@ verify_entry_writes(haddr_t addr, int expected_entry_writes)
mssg.count = 0; /* not used */
mssg.magic = MSSG_MAGIC;
- if (!send_mssg(&mssg, FALSE)) {
+ if (!send_mssg(&mssg, false)) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__);
}
@@ -4192,7 +4192,7 @@ verify_entry_writes(haddr_t addr, int expected_entry_writes)
if (!recv_mssg(&mssg, REQ_ENTRY_WRITES_RPLY_CODE)) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__);
}
@@ -4206,7 +4206,7 @@ verify_entry_writes(haddr_t addr, int expected_entry_writes)
(mssg.magic != MSSG_MAGIC)) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: Bad data in req entry writes reply.\n", world_mpi_rank, __func__);
}
@@ -4222,7 +4222,7 @@ verify_entry_writes(haddr_t addr, int expected_entry_writes)
if (reported_entry_writes != expected_entry_writes) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: rep/exp entry 0x%llx writes mismatch (%d/%d).\n", world_mpi_rank,
__func__, (long long)addr, reported_entry_writes, expected_entry_writes);
@@ -4242,19 +4242,19 @@ verify_entry_writes(haddr_t addr, int expected_entry_writes)
* server counter reset, and compare this value with the supplied
* expected value.
*
- * If the values match, return TRUE.
+ * If the values match, return true.
*
- * If the values don't match, flag an error and return FALSE.
+ * If the values don't match, flag an error and return false.
*
- * Return: Success: TRUE
+ * Return: Success: true
*
- * Failure: FALSE
+ * Failure: false
*
*****************************************************************************/
-static hbool_t
+static bool
verify_total_reads(int expected_total_reads)
{
- hbool_t success = TRUE; /* will set to FALSE if appropriate. */
+ bool success = true; /* will set to false if appropriate. */
long reported_total_reads;
struct mssg_t mssg;
@@ -4271,10 +4271,10 @@ verify_total_reads(int expected_total_reads)
mssg.count = 0;
mssg.magic = MSSG_MAGIC;
- if (!send_mssg(&mssg, FALSE)) {
+ if (!send_mssg(&mssg, false)) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__);
}
@@ -4286,7 +4286,7 @@ verify_total_reads(int expected_total_reads)
if (!recv_mssg(&mssg, REQ_TTL_READS_RPLY_CODE)) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__);
}
@@ -4296,7 +4296,7 @@ verify_total_reads(int expected_total_reads)
(mssg.ver != 0) || (mssg.magic != MSSG_MAGIC)) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: Bad data in req total reads reply.\n", world_mpi_rank, __func__);
}
@@ -4312,7 +4312,7 @@ verify_total_reads(int expected_total_reads)
if (reported_total_reads != expected_total_reads) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: reported/expected total reads mismatch (%ld/%d).\n", world_mpi_rank,
__func__, reported_total_reads, expected_total_reads);
@@ -4332,19 +4332,19 @@ verify_total_reads(int expected_total_reads)
* server counter reset, and compare this value with the supplied
* expected value.
*
- * If the values match, return TRUE.
+ * If the values match, return true.
*
- * If the values don't match, flag an error and return FALSE.
+ * If the values don't match, flag an error and return false.
*
- * Return: Success: TRUE
+ * Return: Success: true
*
- * Failure: FALSE
+ * Failure: false
*
*****************************************************************************/
-static hbool_t
+static bool
verify_total_writes(unsigned expected_total_writes)
{
- hbool_t success = TRUE; /* will set to FALSE if appropriate. */
+ bool success = true; /* will set to false if appropriate. */
unsigned reported_total_writes;
struct mssg_t mssg;
@@ -4361,10 +4361,10 @@ verify_total_writes(unsigned expected_total_writes)
mssg.count = 0;
mssg.magic = MSSG_MAGIC;
- if (!send_mssg(&mssg, FALSE)) {
+ if (!send_mssg(&mssg, false)) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__);
}
@@ -4376,7 +4376,7 @@ verify_total_writes(unsigned expected_total_writes)
if (!recv_mssg(&mssg, REQ_TTL_WRITES_RPLY_CODE)) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__);
}
@@ -4386,7 +4386,7 @@ verify_total_writes(unsigned expected_total_writes)
(mssg.ver != 0) || (mssg.magic != MSSG_MAGIC)) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: Bad data in req total reads reply.\n", world_mpi_rank, __func__);
}
@@ -4402,7 +4402,7 @@ verify_total_writes(unsigned expected_total_writes)
if (reported_total_writes != expected_total_writes) {
nerrors++;
- success = FALSE;
+ success = false;
if (verbose) {
fprintf(stdout, "%d:%s: reported/expected total writes mismatch (%u/%u).\n", world_mpi_rank,
__func__, reported_total_writes, expected_total_writes);
@@ -4446,7 +4446,7 @@ unlock_entry(H5F_t *file_ptr, int32_t idx, unsigned int flags)
if (dirtied) {
(entry_ptr->ver)++;
- entry_ptr->dirty = TRUE;
+ entry_ptr->dirty = true;
}
result = H5AC_unprotect(file_ptr, &(types[0]), entry_ptr->base_addr, (void *)(&(entry_ptr->header)),
@@ -4464,7 +4464,7 @@ unlock_entry(H5F_t *file_ptr, int32_t idx, unsigned int flags)
}
else {
- entry_ptr->locked = FALSE;
+ entry_ptr->locked = false;
}
assert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE);
@@ -4492,7 +4492,7 @@ unlock_entry(H5F_t *file_ptr, int32_t idx, unsigned int flags)
*
*****************************************************************************/
static void
-unpin_entry(H5F_t *file_ptr, int32_t idx, hbool_t global, hbool_t dirty, hbool_t via_unprotect)
+unpin_entry(H5F_t *file_ptr, int32_t idx, bool global, bool dirty, bool via_unprotect)
{
herr_t result;
unsigned int flags = H5AC__UNPIN_ENTRY_FLAG;
@@ -4544,11 +4544,11 @@ unpin_entry(H5F_t *file_ptr, int32_t idx, hbool_t global, hbool_t dirty, hbool_t
if (global) {
- entry_ptr->global_pinned = FALSE;
+ entry_ptr->global_pinned = false;
}
else {
- entry_ptr->local_pinned = FALSE;
+ entry_ptr->local_pinned = false;
}
}
@@ -4566,15 +4566,15 @@ unpin_entry(H5F_t *file_ptr, int32_t idx, hbool_t global, hbool_t dirty, hbool_t
*
* Purpose: Quick smoke check for the server process.
*
- * Return: Success: TRUE
+ * Return: Success: true
*
- * Failure: FALSE
+ * Failure: false
*
*****************************************************************************/
-static hbool_t
+static bool
server_smoke_check(void)
{
- hbool_t success = TRUE;
+ bool success = true;
int max_nerrors;
struct mssg_t mssg;
@@ -4611,7 +4611,7 @@ server_smoke_check(void)
mssg.count = 0;
mssg.magic = MSSG_MAGIC;
- if (!(success = send_mssg(&mssg, FALSE))) {
+ if (!(success = send_mssg(&mssg, false))) {
nerrors++;
if (verbose) {
@@ -4643,7 +4643,7 @@ server_smoke_check(void)
(mssg.len != data[world_mpi_rank].len) || (mssg.ver != data[world_mpi_rank].ver) ||
(mssg.magic != MSSG_MAGIC)) {
- success = FALSE;
+ success = false;
nerrors++;
if (verbose) {
fprintf(stdout, "%d:%s: Bad data in write req ack.\n", world_mpi_rank, __func__);
@@ -4658,7 +4658,7 @@ server_smoke_check(void)
/* barrier to allow all writes to complete */
if (MPI_SUCCESS != MPI_Barrier(file_mpi_comm)) {
- success = FALSE;
+ success = false;
nerrors++;
if (verbose) {
fprintf(stdout, "%d:%s: barrier 1 failed.\n", world_mpi_rank, __func__);
@@ -4689,7 +4689,7 @@ server_smoke_check(void)
/* barrier to allow all writes to complete */
if (MPI_SUCCESS != MPI_Barrier(file_mpi_comm)) {
- success = FALSE;
+ success = false;
nerrors++;
if (verbose) {
@@ -4710,7 +4710,7 @@ server_smoke_check(void)
if (success) {
- success = send_mssg(&mssg, FALSE);
+ success = send_mssg(&mssg, false);
if (!success) {
@@ -4743,7 +4743,7 @@ server_smoke_check(void)
(mssg.len != data[world_mpi_rank].len) || (mssg.ver != data[world_mpi_rank].ver) ||
(mssg.magic != MSSG_MAGIC)) {
- success = FALSE;
+ success = false;
nerrors++;
if (verbose) {
fprintf(stdout, "%d:%s: Bad data in read req reply.\n", world_mpi_rank, __func__);
@@ -4754,7 +4754,7 @@ server_smoke_check(void)
/* barrier to allow all writes to complete */
if (MPI_SUCCESS != MPI_Barrier(file_mpi_comm)) {
- success = FALSE;
+ success = false;
nerrors++;
if (verbose) {
fprintf(stdout, "%d:%s: barrier 3 failed.\n", world_mpi_rank, __func__);
@@ -4784,7 +4784,7 @@ server_smoke_check(void)
if (MPI_SUCCESS != MPI_Barrier(file_mpi_comm)) {
- success = FALSE;
+ success = false;
nerrors++;
if (verbose) {
@@ -4800,7 +4800,7 @@ server_smoke_check(void)
if (MPI_SUCCESS != MPI_Barrier(file_mpi_comm)) {
- success = FALSE;
+ success = false;
nerrors++;
if (verbose) {
@@ -4831,7 +4831,7 @@ server_smoke_check(void)
if (MPI_SUCCESS != MPI_Barrier(file_mpi_comm)) {
- success = FALSE;
+ success = false;
nerrors++;
if (verbose) {
@@ -4852,7 +4852,7 @@ server_smoke_check(void)
if (success) {
- success = send_mssg(&mssg, FALSE);
+ success = send_mssg(&mssg, false);
if (!success) {
@@ -4891,18 +4891,18 @@ server_smoke_check(void)
*
* Purpose: First smoke check for the parallel cache.
*
- * Return: Success: TRUE
+ * Return: Success: true
*
- * Failure: FALSE
+ * Failure: false
*
*****************************************************************************/
-static hbool_t
+static bool
smoke_check_1(int metadata_write_strategy)
{
- hbool_t success = TRUE;
+ bool success = true;
int i;
int max_nerrors;
- hid_t fid = -1;
+ hid_t fid = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
struct mssg_t mssg;
@@ -5011,7 +5011,7 @@ smoke_check_1(int metadata_write_strategy)
if (success) {
- success = send_mssg(&mssg, FALSE);
+ success = send_mssg(&mssg, false);
if (!success) {
@@ -5053,18 +5053,18 @@ smoke_check_1(int metadata_write_strategy)
* Introduce random reads, but keep all processes with roughly
* the same work load.
*
- * Return: Success: TRUE
+ * Return: Success: true
*
- * Failure: FALSE
+ * Failure: false
*
*****************************************************************************/
-static hbool_t
+static bool
smoke_check_2(int metadata_write_strategy)
{
- hbool_t success = TRUE;
+ bool success = true;
int i;
int max_nerrors;
- hid_t fid = -1;
+ hid_t fid = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
struct mssg_t mssg;
@@ -5129,10 +5129,10 @@ smoke_check_2(int metadata_write_strategy)
for (i = 0; i < (virt_num_data_entries / 2); i += 61) {
/* Make sure we don't step on any locally pinned entries */
if (data[i].local_pinned) {
- unpin_entry(file_ptr, i, FALSE, FALSE, FALSE);
+ unpin_entry(file_ptr, i, false, false, false);
}
- pin_entry(file_ptr, i, TRUE, FALSE);
+ pin_entry(file_ptr, i, true, false);
}
for (i = (virt_num_data_entries / 2) - 1; i >= 0; i -= 2) {
@@ -5149,7 +5149,7 @@ smoke_check_2(int metadata_write_strategy)
}
/* we can't move pinned entries, so release any local pins now. */
- local_unpin_all_entries(file_ptr, FALSE);
+ local_unpin_all_entries(file_ptr, false);
/* Move the first half of the entries... */
for (i = 0; i < (virt_num_data_entries / 2); i++) {
@@ -5168,10 +5168,10 @@ smoke_check_2(int metadata_write_strategy)
}
for (i = 0; i < (virt_num_data_entries / 2); i += 61) {
- hbool_t via_unprotect = ((((unsigned)i) & 0x01) == 0);
- hbool_t dirty = ((((unsigned)i) & 0x02) == 0);
+ bool via_unprotect = ((((unsigned)i) & 0x01) == 0);
+ bool dirty = ((((unsigned)i) & 0x02) == 0);
- unpin_entry(file_ptr, i, TRUE, dirty, via_unprotect);
+ unpin_entry(file_ptr, i, true, dirty, via_unprotect);
}
if (fid >= 0) {
@@ -5207,7 +5207,7 @@ smoke_check_2(int metadata_write_strategy)
if (success) {
- success = send_mssg(&mssg, FALSE);
+ success = send_mssg(&mssg, false);
if (!success) {
@@ -5252,22 +5252,22 @@ smoke_check_2(int metadata_write_strategy)
* In this test, load process 0 heavily, and the other
* processes lightly.
*
- * Return: Success: TRUE
+ * Return: Success: true
*
- * Failure: FALSE
+ * Failure: false
*
*****************************************************************************/
-static hbool_t
+static bool
smoke_check_3(int metadata_write_strategy)
{
- hbool_t success = TRUE;
+ bool success = true;
int i;
int max_nerrors;
int min_count;
int max_count;
int min_idx;
int max_idx;
- hid_t fid = -1;
+ hid_t fid = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
struct mssg_t mssg;
@@ -5341,13 +5341,13 @@ smoke_check_3(int metadata_write_strategy)
if (i % 59 == 0) {
- hbool_t dirty = ((i % 2) == 0);
+ bool dirty = ((i % 2) == 0);
if (data[i].local_pinned) {
- unpin_entry(file_ptr, i, FALSE, FALSE, FALSE);
+ unpin_entry(file_ptr, i, false, false, false);
}
- pin_entry(file_ptr, i, TRUE, dirty);
+ pin_entry(file_ptr, i, true, dirty);
assert(!dirty || data[i].header.is_dirty);
assert(data[i].header.is_pinned);
@@ -5384,13 +5384,13 @@ smoke_check_3(int metadata_write_strategy)
for (i = (virt_num_data_entries / 2) - 1; i >= 0; i--) {
if ((i >= (virt_num_data_entries / 4)) && (i % 59 == 0)) {
- hbool_t via_unprotect = ((((unsigned)i) & 0x02) == 0);
- hbool_t dirty = ((((unsigned)i) & 0x04) == 0);
+ bool via_unprotect = ((((unsigned)i) & 0x02) == 0);
+ bool dirty = ((((unsigned)i) & 0x04) == 0);
assert(data[i].global_pinned);
assert(!data[i].local_pinned);
- unpin_entry(file_ptr, i, TRUE, dirty, via_unprotect);
+ unpin_entry(file_ptr, i, true, dirty, via_unprotect);
}
if (i % 2 == 0) {
@@ -5415,7 +5415,7 @@ smoke_check_3(int metadata_write_strategy)
}
/* we can't move pinned entries, so release any local pins now. */
- local_unpin_all_entries(file_ptr, FALSE);
+ local_unpin_all_entries(file_ptr, false);
min_count = 10 / (file_mpi_rank + 1);
max_count = min_count + 100;
@@ -5455,7 +5455,7 @@ smoke_check_3(int metadata_write_strategy)
}
/* release any local pins before we take down the cache. */
- local_unpin_all_entries(file_ptr, FALSE);
+ local_unpin_all_entries(file_ptr, false);
if (fid >= 0) {
@@ -5490,7 +5490,7 @@ smoke_check_3(int metadata_write_strategy)
if (success) {
- success = send_mssg(&mssg, FALSE);
+ success = send_mssg(&mssg, false);
if (!success) {
@@ -5535,22 +5535,22 @@ smoke_check_3(int metadata_write_strategy)
* In this test, load process 0 lightly, and the other
* processes heavily.
*
- * Return: Success: TRUE
+ * Return: Success: true
*
- * Failure: FALSE
+ * Failure: false
*
*****************************************************************************/
-static hbool_t
+static bool
smoke_check_4(int metadata_write_strategy)
{
- hbool_t success = TRUE;
+ bool success = true;
int i;
int max_nerrors;
int min_count;
int max_count;
int min_idx;
int max_idx;
- hid_t fid = -1;
+ hid_t fid = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
struct mssg_t mssg;
@@ -5631,18 +5631,18 @@ smoke_check_4(int metadata_write_strategy)
* entries are in fact pinned (which unpin_entry() should do).
*/
insert_entry(cache_ptr, file_ptr, i, H5C__PIN_ENTRY_FLAG);
- unpin_entry(file_ptr, i, TRUE, FALSE, FALSE);
+ unpin_entry(file_ptr, i, true, false, false);
}
if (i % 59 == 0) {
- hbool_t dirty = ((i % 2) == 0);
+ bool dirty = ((i % 2) == 0);
if (data[i].local_pinned) {
- unpin_entry(file_ptr, i, FALSE, FALSE, FALSE);
+ unpin_entry(file_ptr, i, false, false, false);
}
- pin_entry(file_ptr, i, TRUE, dirty);
+ pin_entry(file_ptr, i, true, dirty);
assert(!dirty || data[i].header.is_dirty);
assert(data[i].header.is_pinned);
@@ -5675,13 +5675,13 @@ smoke_check_4(int metadata_write_strategy)
for (i = (virt_num_data_entries / 2) - 1; i >= 0; i--) {
if ((i >= (virt_num_data_entries / 4)) && (i % 59 == 0)) {
- hbool_t via_unprotect = ((((unsigned)i) & 0x02) == 0);
- hbool_t dirty = ((((unsigned)i) & 0x04) == 0);
+ bool via_unprotect = ((((unsigned)i) & 0x02) == 0);
+ bool dirty = ((((unsigned)i) & 0x04) == 0);
assert(data[i].global_pinned);
assert(!data[i].local_pinned);
- unpin_entry(file_ptr, i, TRUE, dirty, via_unprotect);
+ unpin_entry(file_ptr, i, true, dirty, via_unprotect);
}
if (i % 2 == 0) {
@@ -5702,7 +5702,7 @@ smoke_check_4(int metadata_write_strategy)
}
/* we can't move pinned entries, so release any local pins now. */
- local_unpin_all_entries(file_ptr, FALSE);
+ local_unpin_all_entries(file_ptr, false);
min_count = 10 * (file_mpi_rank % 4);
max_count = min_count + 100;
@@ -5772,7 +5772,7 @@ smoke_check_4(int metadata_write_strategy)
if (success) {
- success = send_mssg(&mssg, FALSE);
+ success = send_mssg(&mssg, false);
if (!success) {
@@ -5812,18 +5812,18 @@ smoke_check_4(int metadata_write_strategy)
* Purpose: Similar to smoke check 1, but modified to verify that
* H5AC_mark_entry_dirty() works in the parallel case.
*
- * Return: Success: TRUE
+ * Return: Success: true
*
- * Failure: FALSE
+ * Failure: false
*
*****************************************************************************/
-static hbool_t
+static bool
smoke_check_5(int metadata_write_strategy)
{
- hbool_t success = TRUE;
+ bool success = true;
int i;
int max_nerrors;
- hid_t fid = -1;
+ hid_t fid = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
struct mssg_t mssg;
@@ -5910,7 +5910,7 @@ smoke_check_5(int metadata_write_strategy)
}
for (i = (virt_num_data_entries / 2) - 1; i >= (virt_num_data_entries / 4); i--) {
- pin_entry(file_ptr, i, TRUE, FALSE);
+ pin_entry(file_ptr, i, true, false);
if (i % 2 == 0) {
if (i % 8 <= 4) {
@@ -5926,7 +5926,7 @@ smoke_check_5(int metadata_write_strategy)
}
}
- unpin_entry(file_ptr, i, TRUE, FALSE, FALSE);
+ unpin_entry(file_ptr, i, true, false, false);
}
if (fid >= 0) {
@@ -5962,7 +5962,7 @@ smoke_check_5(int metadata_write_strategy)
if (success) {
- success = send_mssg(&mssg, FALSE);
+ success = send_mssg(&mssg, false);
if (!success) {
@@ -6025,15 +6025,15 @@ smoke_check_5(int metadata_write_strategy)
* - H5AC_expunge_entry()
* - H5AC_resize_entry()
*
- * Return: Success: TRUE
+ * Return: Success: true
*
- * Failure: FALSE
+ * Failure: false
*
*****************************************************************************/
-static hbool_t
+static bool
trace_file_check(int metadata_write_strategy)
{
- hbool_t success = TRUE;
+ bool success = true;
const char *((*expected_output)[]) = NULL;
const char *expected_output_0[] = {"### HDF5 metadata cache trace file version 1 ###\n",
@@ -6090,12 +6090,12 @@ trace_file_check(int metadata_write_strategy)
NULL};
char buffer[256];
char trace_file_name[64];
- hbool_t done = FALSE;
+ bool done = false;
int i;
int max_nerrors;
size_t expected_line_len;
size_t actual_line_len;
- hid_t fid = -1;
+ hid_t fid = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
FILE *trace_file_ptr = NULL;
@@ -6168,7 +6168,7 @@ trace_file_check(int metadata_write_strategy)
__func__);
}
else {
- config.open_trace_file = TRUE;
+ config.open_trace_file = true;
strcpy(config.trace_file_name, "t_cache_trace.txt");
if (H5AC_set_cache_auto_resize_config(cache_ptr, &config) != SUCCEED) {
@@ -6189,19 +6189,19 @@ trace_file_check(int metadata_write_strategy)
unlock_entry(file_ptr, 0, H5AC__NO_FLAGS_SET);
lock_entry(file_ptr, 1);
- pin_protected_entry(1, TRUE);
+ pin_protected_entry(1, true);
unlock_entry(file_ptr, 1, H5AC__NO_FLAGS_SET);
- unpin_entry(file_ptr, 1, TRUE, FALSE, FALSE);
+ unpin_entry(file_ptr, 1, true, false, false);
expunge_entry(file_ptr, 1);
lock_entry(file_ptr, 2);
- pin_protected_entry(2, TRUE);
+ pin_protected_entry(2, true);
unlock_entry(file_ptr, 2, H5AC__NO_FLAGS_SET);
mark_entry_dirty(2);
resize_entry(2, data[2].len / 2);
resize_entry(2, data[2].len);
- unpin_entry(file_ptr, 2, TRUE, FALSE, FALSE);
+ unpin_entry(file_ptr, 2, true, false, false);
move_entry(file_ptr, 0, 20);
move_entry(file_ptr, 0, 20);
@@ -6221,8 +6221,8 @@ trace_file_check(int metadata_write_strategy)
__func__);
}
else {
- config.open_trace_file = FALSE;
- config.close_trace_file = TRUE;
+ config.open_trace_file = false;
+ config.close_trace_file = true;
config.trace_file_name[0] = '\0';
if (H5AC_set_cache_auto_resize_config(cache_ptr, &config) != SUCCEED) {
@@ -6263,7 +6263,7 @@ trace_file_check(int metadata_write_strategy)
mssg.magic = MSSG_MAGIC;
if (success) {
- success = send_mssg(&mssg, FALSE);
+ success = send_mssg(&mssg, false);
if (!success) {
nerrors++;
@@ -6273,7 +6273,7 @@ trace_file_check(int metadata_write_strategy)
} /* end if */
if (nerrors == 0) {
- HDsnprintf(trace_file_name, sizeof(trace_file_name), "t_cache_trace.txt.%d", (int)file_mpi_rank);
+ snprintf(trace_file_name, sizeof(trace_file_name), "t_cache_trace.txt.%d", (int)file_mpi_rank);
if ((trace_file_ptr = fopen(trace_file_name, "r")) == NULL) {
@@ -6289,10 +6289,10 @@ trace_file_check(int metadata_write_strategy)
if ((*expected_output)[i] == NULL)
expected_line_len = (size_t)0;
else
- expected_line_len = HDstrlen((*expected_output)[i]);
+ expected_line_len = strlen((*expected_output)[i]);
- if (HDfgets(buffer, 255, trace_file_ptr) != NULL)
- actual_line_len = HDstrlen(buffer);
+ if (fgets(buffer, 255, trace_file_ptr) != NULL)
+ actual_line_len = strlen(buffer);
else
actual_line_len = (size_t)0;
@@ -6301,7 +6301,7 @@ trace_file_check(int metadata_write_strategy)
if ((actual_line_len == 0) || (expected_line_len == 0)) {
if ((actual_line_len == 0) && (expected_line_len == 0)) {
/* Both ran out at the same time - we're done */
- done = TRUE;
+ done = true;
}
else {
/* One ran out before the other - BADNESS */
@@ -6327,8 +6327,7 @@ trace_file_check(int metadata_write_strategy)
}
/* We directly compare the header line (line 0) */
else if (0 == i) {
- if ((actual_line_len != expected_line_len) ||
- (HDstrcmp(buffer, (*expected_output)[i]) != 0)) {
+ if ((actual_line_len != expected_line_len) || (strcmp(buffer, (*expected_output)[i]) != 0)) {
nerrors++;
if (verbose) {
@@ -6347,9 +6346,9 @@ trace_file_check(int metadata_write_strategy)
else {
char *tok = NULL; /* token for actual line */
- tok = HDstrtok(buffer, " ");
+ tok = strtok(buffer, " ");
- if (HDstrcmp(tok, (*expected_output)[i]) != 0) {
+ if (strcmp(tok, (*expected_output)[i]) != 0) {
nerrors++;
if (verbose) {
@@ -6398,20 +6397,20 @@ trace_file_check(int metadata_write_strategy)
*
* Purpose: Sixth smoke check for the parallel cache.
*
- * Return: Success: TRUE
+ * Return: Success: true
*
- * Failure: FALSE
+ * Failure: false
*
*****************************************************************************/
-static hbool_t
+static bool
smoke_check_6(int metadata_write_strategy)
{
H5P_coll_md_read_flag_t md_reads_file_flag;
- hbool_t md_reads_context_flag;
- hbool_t success = TRUE;
+ bool md_reads_context_flag;
+ bool success = true;
int i;
int max_nerrors;
- hid_t fid = -1;
+ hid_t fid = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
struct mssg_t mssg;
@@ -6471,7 +6470,7 @@ smoke_check_6(int metadata_write_strategy)
/* insert the first half collectively */
md_reads_file_flag = H5P_USER_TRUE;
- md_reads_context_flag = TRUE;
+ md_reads_context_flag = true;
H5F_set_coll_metadata_reads(file_ptr, &md_reads_file_flag, &md_reads_context_flag);
for (i = 0; i < virt_num_data_entries / 2; i++) {
struct datum *entry_ptr;
@@ -6479,7 +6478,7 @@ smoke_check_6(int metadata_write_strategy)
insert_entry(cache_ptr, file_ptr, i, H5AC__NO_FLAGS_SET);
- if (TRUE != entry_ptr->header.coll_access) {
+ if (true != entry_ptr->header.coll_access) {
nerrors++;
if (verbose) {
fprintf(stdout, "%d:%s: Entry inserted not marked as collective.\n", world_mpi_rank,
@@ -6496,7 +6495,7 @@ smoke_check_6(int metadata_write_strategy)
/* insert the other half independently */
md_reads_file_flag = H5P_USER_FALSE;
- md_reads_context_flag = FALSE;
+ md_reads_context_flag = false;
H5F_set_coll_metadata_reads(file_ptr, &md_reads_file_flag, &md_reads_context_flag);
for (i = virt_num_data_entries / 2; i < virt_num_data_entries; i++) {
struct datum *entry_ptr;
@@ -6504,7 +6503,7 @@ smoke_check_6(int metadata_write_strategy)
insert_entry(cache_ptr, file_ptr, i, H5AC__NO_FLAGS_SET);
- if (FALSE != entry_ptr->header.coll_access) {
+ if (false != entry_ptr->header.coll_access) {
nerrors++;
if (verbose) {
fprintf(stdout, "%d:%s: Entry inserted independently marked as collective.\n",
@@ -6528,7 +6527,7 @@ smoke_check_6(int metadata_write_strategy)
/* Protect the first half of the entries collectively */
md_reads_file_flag = H5P_USER_TRUE;
- md_reads_context_flag = TRUE;
+ md_reads_context_flag = true;
H5F_set_coll_metadata_reads(file_ptr, &md_reads_file_flag, &md_reads_context_flag);
for (i = 0; i < (virt_num_data_entries / 2); i++) {
struct datum *entry_ptr;
@@ -6536,7 +6535,7 @@ smoke_check_6(int metadata_write_strategy)
lock_entry(file_ptr, i);
- if (TRUE != entry_ptr->header.coll_access) {
+ if (true != entry_ptr->header.coll_access) {
nerrors++;
if (verbose) {
fprintf(stdout, "%d:%s: Entry protected not marked as collective.\n", world_mpi_rank,
@@ -6552,7 +6551,7 @@ smoke_check_6(int metadata_write_strategy)
/* protect the other half independently */
md_reads_file_flag = H5P_USER_FALSE;
- md_reads_context_flag = FALSE;
+ md_reads_context_flag = false;
H5F_set_coll_metadata_reads(file_ptr, &md_reads_file_flag, &md_reads_context_flag);
for (i = virt_num_data_entries / 2; i < virt_num_data_entries; i++) {
struct datum *entry_ptr;
@@ -6560,7 +6559,7 @@ smoke_check_6(int metadata_write_strategy)
lock_entry(file_ptr, i);
- if (FALSE != entry_ptr->header.coll_access) {
+ if (false != entry_ptr->header.coll_access) {
nerrors++;
if (verbose) {
fprintf(stdout, "%d:%s: Entry inserted independently marked as collective.\n",
@@ -6611,7 +6610,7 @@ smoke_check_6(int metadata_write_strategy)
if (success) {
- success = send_mssg(&mssg, FALSE);
+ success = send_mssg(&mssg, false);
if (!success) {
@@ -6816,7 +6815,7 @@ main(int argc, char **argv)
#endif
/* enable the collective metadata read property */
if (world_mpi_rank != world_server_mpi_rank) {
- if (H5Pset_all_coll_metadata_ops(fapl, TRUE) < 0) {
+ if (H5Pset_all_coll_metadata_ops(fapl, true) < 0) {
nerrors++;
if (verbose) {
diff --git a/testpar/t_cache_image.c b/testpar/t_cache_image.c
index 49d10176427..5de615038b2 100644
--- a/testpar/t_cache_image.c
+++ b/testpar/t_cache_image.c
@@ -39,12 +39,11 @@ static void create_data_sets(hid_t file_id, int min_dset, int max_dset);
static void delete_data_sets(hid_t file_id, int min_dset, int max_dset);
#endif
-static void open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected,
- const hbool_t read_only, const hbool_t set_mdci_fapl, const hbool_t config_fsm,
- const hbool_t enable_page_buffer, const char *hdf_file_name,
- const unsigned cache_image_flags, hid_t *file_id_ptr, H5F_t **file_ptr_ptr,
- H5C_t **cache_ptr_ptr, MPI_Comm comm, MPI_Info info, int l_facc_type,
- const hbool_t all_coll_metadata_ops, const hbool_t coll_metadata_write,
+static void open_hdf5_file(const bool create_file, const bool mdci_sbem_expected, const bool read_only,
+ const bool set_mdci_fapl, const bool config_fsm, const bool enable_page_buffer,
+ const char *hdf_file_name, const unsigned cache_image_flags, hid_t *file_id_ptr,
+ H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr, MPI_Comm comm, MPI_Info info,
+ int l_facc_type, const bool all_coll_metadata_ops, const bool coll_metadata_write,
const int md_write_strat);
static void verify_data_sets(hid_t file_id, int min_dset, int max_dset);
@@ -56,14 +55,14 @@ static void par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, in
static void par_delete_dataset(int dset_num, hid_t file_id, int mpi_rank);
static void par_verify_dataset(int dset_num, hid_t file_id, int mpi_rank);
-static hbool_t serial_insert_cache_image(int file_name_idx, int mpi_size);
-static void serial_verify_dataset(int dset_num, hid_t file_id, int mpi_size);
+static bool serial_insert_cache_image(int file_name_idx, int mpi_size);
+static void serial_verify_dataset(int dset_num, hid_t file_id, int mpi_size);
/* top level test function declarations */
static unsigned verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank);
static unsigned verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank);
-static hbool_t smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size);
+static bool smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size);
/****************************************************************************/
/***************************** Utility Functions ****************************/
@@ -129,8 +128,8 @@ construct_test_file(int test_file_index)
{
const char *fcn_name = "construct_test_file()";
char filename[512];
- hbool_t show_progress = FALSE;
- hid_t file_id = -1;
+ bool show_progress = false;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
int cp = 0;
@@ -139,7 +138,7 @@ construct_test_file(int test_file_index)
MPI_Comm dummy_comm = MPI_COMM_WORLD;
MPI_Info dummy_info = MPI_INFO_NULL;
- pass = TRUE;
+ pass = true;
if (show_progress)
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -151,7 +150,7 @@ construct_test_file(int test_file_index)
if (h5_fixname(FILENAMES[test_file_index], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -168,12 +167,12 @@ construct_test_file(int test_file_index)
if (pass) {
- open_hdf5_file(/* create_file */ TRUE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ TRUE,
- /* enable_page_buffer */ FALSE,
+ open_hdf5_file(/* create_file */ true,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ true,
+ /* enable_page_buffer */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -182,8 +181,8 @@ construct_test_file(int test_file_index)
/* comm */ dummy_comm,
/* info */ dummy_info,
/* l_facc_type */ 0,
- /* all_coll_metadata_ops */ FALSE,
- /* coll_metadata_write */ FALSE,
+ /* all_coll_metadata_ops */ false,
+ /* coll_metadata_write */ false,
/* md_write_strat */ 0);
}
@@ -202,7 +201,7 @@ construct_test_file(int test_file_index)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(1).";
}
}
@@ -217,7 +216,7 @@ construct_test_file(int test_file_index)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -235,12 +234,12 @@ construct_test_file(int test_file_index)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* enable_page_buffer */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ false,
+ /* enable_page_buffer */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -249,8 +248,8 @@ construct_test_file(int test_file_index)
/* comm */ dummy_comm,
/* info */ dummy_info,
/* l_facc_type */ 0,
- /* all_coll_metadata_ops */ FALSE,
- /* coll_metadata_write */ FALSE,
+ /* all_coll_metadata_ops */ false,
+ /* coll_metadata_write */ false,
/* md_write_strat */ 0);
}
@@ -269,7 +268,7 @@ construct_test_file(int test_file_index)
if (cache_ptr->images_loaded == 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block not loaded(1).";
}
}
@@ -284,7 +283,7 @@ construct_test_file(int test_file_index)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -302,12 +301,12 @@ construct_test_file(int test_file_index)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ TRUE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* enable_page_buffer */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ true,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* enable_page_buffer */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -316,8 +315,8 @@ construct_test_file(int test_file_index)
/* comm */ dummy_comm,
/* info */ dummy_info,
/* l_facc_type */ 0,
- /* all_coll_metadata_ops */ FALSE,
- /* coll_metadata_write */ FALSE,
+ /* all_coll_metadata_ops */ false,
+ /* coll_metadata_write */ false,
/* md_write_strat */ 0);
}
@@ -339,7 +338,7 @@ construct_test_file(int test_file_index)
if (cache_ptr->images_loaded == 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block not loaded(2).";
}
}
@@ -354,7 +353,7 @@ construct_test_file(int test_file_index)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -366,16 +365,16 @@ construct_test_file(int test_file_index)
/*-------------------------------------------------------------------------
* Function: create_data_sets()
*
- * Purpose: If pass is TRUE on entry, create the specified data sets
+ * Purpose: If pass is true on entry, create the specified data sets
* in the indicated file.
*
* Data sets and their contents must be well know, as we
* will verify that they contain the expected data later.
*
- * On failure, set pass to FALSE, and set failure_mssg
+ * On failure, set pass to false, and set failure_mssg
* to point to an appropriate failure message.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -387,18 +386,18 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset)
{
const char *fcn_name = "create_data_sets()";
char dset_name[64];
- hbool_t show_progress = FALSE;
- hbool_t valid_chunk;
- hbool_t verbose = FALSE;
+ bool show_progress = false;
+ bool valid_chunk;
+ bool verbose = false;
int cp = 0;
int i, j, k, l, m;
int data_chunk[CHUNK_SIZE][CHUNK_SIZE];
herr_t status;
- hid_t dataspace_id = -1;
+ hid_t dataspace_id = H5I_INVALID_HID;
hid_t filespace_ids[MAX_NUM_DSETS];
- hid_t memspace_id = -1;
+ hid_t memspace_id = H5I_INVALID_HID;
hid_t dataset_ids[MAX_NUM_DSETS];
- hid_t properties = -1;
+ hid_t properties = H5I_INVALID_HID;
hsize_t dims[2];
hsize_t a_size[2];
hsize_t offset[2];
@@ -425,7 +424,7 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset)
if (dataspace_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Screate_simple() failed.";
}
@@ -441,7 +440,7 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset)
if (properties < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pcreate() failed.";
}
}
@@ -450,7 +449,7 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset)
if (H5Pset_chunk(properties, 2, chunk_size) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_chunk() failed.";
}
}
@@ -458,13 +457,13 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset)
/* create the dataset */
if (pass) {
- HDsnprintf(dset_name, sizeof(dset_name), "/dset%03d", i);
+ snprintf(dset_name, sizeof(dset_name), "/dset%03d", i);
dataset_ids[i] = H5Dcreate2(file_id, dset_name, H5T_STD_I32BE, dataspace_id, H5P_DEFAULT,
properties, H5P_DEFAULT);
if (dataset_ids[i] < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dcreate() failed.";
}
}
@@ -476,7 +475,7 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset)
if (filespace_ids[i] < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dget_space() failed.";
}
}
@@ -497,7 +496,7 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset)
if (memspace_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Screate_simple() failed.";
}
}
@@ -516,7 +515,7 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sselect_hyperslab() failed.";
}
}
@@ -547,7 +546,7 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "disk H5Sselect_hyperslab() failed.";
}
@@ -557,7 +556,7 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dwrite() failed.";
}
m++;
@@ -588,7 +587,7 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "disk hyperslab create failed.";
}
@@ -600,7 +599,7 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "disk hyperslab create failed.";
}
}
@@ -608,13 +607,13 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset)
/* validate the slab */
if (pass) {
- valid_chunk = TRUE;
+ valid_chunk = true;
for (k = 0; k < CHUNK_SIZE; k++) {
for (l = 0; l < CHUNK_SIZE; l++) {
if (data_chunk[k][l] !=
((DSET_SIZE * DSET_SIZE * m) + (DSET_SIZE * (i + k)) + j + l)) {
- valid_chunk = FALSE;
+ valid_chunk = false;
if (verbose) {
@@ -630,7 +629,7 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset)
if (!valid_chunk) {
- pass = FALSE;
+ pass = false;
failure_mssg = "slab validation failed.";
if (verbose) {
@@ -654,7 +653,7 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset)
while ((pass) && (i <= max_dset)) {
if (H5Sclose(filespace_ids[i]) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sclose() failed.";
}
i++;
@@ -665,7 +664,7 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset)
while ((pass) && (i <= max_dset)) {
if (H5Dclose(dataset_ids[i]) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dclose() failed.";
}
i++;
@@ -676,7 +675,7 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset)
if (H5Sclose(memspace_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sclose(memspace_id) failed.";
}
}
@@ -688,17 +687,17 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset)
/*-------------------------------------------------------------------------
* Function: delete_data_sets()
*
- * Purpose: If pass is TRUE on entry, verify and then delete the
+ * Purpose: If pass is true on entry, verify and then delete the
* dataset(s) indicated by min_dset and max_dset in the
* indicated file.
*
* Data sets and their contents must be well know, as we
* will verify that they contain the expected data later.
*
- * On failure, set pass to FALSE, and set failure_mssg
+ * On failure, set pass to false, and set failure_mssg
* to point to an appropriate failure message.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -715,7 +714,7 @@ delete_data_sets(hid_t file_id, int min_dset, int max_dset)
{
const char * fcn_name = "delete_data_sets()";
char dset_name[64];
- hbool_t show_progress = FALSE;
+ bool show_progress = false;
int cp = 0;
int i;
@@ -739,11 +738,11 @@ delete_data_sets(hid_t file_id, int min_dset, int max_dset)
while ( ( pass ) && ( i <= max_dset ) )
{
- HDsnprintf(dset_name, sizeof(dset_name), "/dset%03d", i);
+ snprintf(dset_name, sizeof(dset_name), "/dset%03d", i);
if ( H5Ldelete(file_id, dset_name, H5P_DEFAULT) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Ldelete() failed.";
}
@@ -765,32 +764,32 @@ delete_data_sets(hid_t file_id, int min_dset, int max_dset)
* and test to see if it has a metadata cache image superblock
* extension message.
*
- * Set pass to FALSE and issue a suitable failure
+ * Set pass to false and issue a suitable failure
* message if either the file contains a metadata cache image
- * superblock extension and mdci_sbem_expected is TRUE, or
+ * superblock extension and mdci_sbem_expected is true, or
* vice versa.
*
- * If mdci_sbem_expected is TRUE, also verify that the metadata
+ * If mdci_sbem_expected is true, also verify that the metadata
* cache has been advised of this.
*
- * If read_only is TRUE, open the file read only. Otherwise
+ * If read_only is true, open the file read only. Otherwise
* open the file read/write.
*
- * If set_mdci_fapl is TRUE, set the metadata cache image
+ * If set_mdci_fapl is true, set the metadata cache image
* FAPL entry when opening the file, and verify that the
* metadata cache is notified.
*
- * If config_fsm is TRUE, setup the persistent free space
+ * If config_fsm is true, setup the persistent free space
* manager. Note that this flag may only be set if
- * create_file is also TRUE.
+ * create_file is also true.
*
* Return pointers to the cache data structure and file data
* structures.
*
- * On failure, set pass to FALSE, and set failure_mssg
+ * On failure, set pass to false, and set failure_mssg
* to point to an appropriate failure message.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -798,25 +797,24 @@ delete_data_sets(hid_t file_id, int min_dset, int max_dset)
*/
static void
-open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, const hbool_t read_only,
- const hbool_t set_mdci_fapl, const hbool_t config_fsm, const hbool_t enable_page_buffer,
+open_hdf5_file(const bool create_file, const bool mdci_sbem_expected, const bool read_only,
+ const bool set_mdci_fapl, const bool config_fsm, const bool enable_page_buffer,
const char *hdf_file_name, const unsigned cache_image_flags, hid_t *file_id_ptr,
H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr, MPI_Comm comm, MPI_Info info, int l_facc_type,
- const hbool_t all_coll_metadata_ops, const hbool_t coll_metadata_write,
- const int md_write_strat)
+ const bool all_coll_metadata_ops, const bool coll_metadata_write, const int md_write_strat)
{
const char *fcn_name = "open_hdf5_file()";
- hbool_t show_progress = FALSE;
- hbool_t verbose = FALSE;
+ bool show_progress = false;
+ bool verbose = false;
int cp = 0;
- hid_t fapl_id = -1;
- hid_t fcpl_id = -1;
- hid_t file_id = -1;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t fcpl_id = H5I_INVALID_HID;
+ hid_t file_id = H5I_INVALID_HID;
herr_t result;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
H5C_cache_image_ctl_t image_ctl;
- H5AC_cache_image_config_t cache_image_config = {H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION, TRUE, FALSE,
+ H5AC_cache_image_config_t cache_image_config = {H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION, true, false,
H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE};
assert(!create_file || config_fsm);
@@ -835,7 +833,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
failure_mssg = "Bad param(s) on entry to open_hdf5_file().\n";
- pass = FALSE;
+ pass = false;
}
else if (verbose) {
@@ -853,7 +851,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
if (fapl_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pcreate() failed.\n";
}
}
@@ -866,7 +864,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
if (H5Pset_libver_bounds(fapl_id, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_libver_bounds() failed.\n";
}
}
@@ -881,16 +879,16 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pget_mdc_image_config() failed.\n";
}
if ((cache_image_config.version != H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION) ||
- (cache_image_config.generate_image != FALSE) ||
- (cache_image_config.save_resize_status != FALSE) ||
+ (cache_image_config.generate_image != false) ||
+ (cache_image_config.save_resize_status != false) ||
(cache_image_config.entry_ageout != H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected default cache image config.\n";
}
}
@@ -902,15 +900,15 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
if ((pass) && (set_mdci_fapl)) {
/* set cache image config fields to taste */
- cache_image_config.generate_image = TRUE;
- cache_image_config.save_resize_status = FALSE;
+ cache_image_config.generate_image = true;
+ cache_image_config.save_resize_status = false;
cache_image_config.entry_ageout = H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE;
result = H5Pset_mdc_image_config(fapl_id, &cache_image_config);
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_mdc_image_config() failed.\n";
}
}
@@ -925,15 +923,15 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
if (fcpl_id <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pcreate(H5P_FILE_CREATE) failed.";
}
}
if ((pass) && (config_fsm)) {
- if (H5Pset_file_space_strategy(fcpl_id, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1) == FAIL) {
- pass = FALSE;
+ if (H5Pset_file_space_strategy(fcpl_id, H5F_FSPACE_STRATEGY_PAGE, true, (hsize_t)1) == FAIL) {
+ pass = false;
failure_mssg = "H5Pset_file_space_strategy() failed.\n";
}
}
@@ -942,7 +940,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
if (H5Pset_file_space_page_size(fcpl_id, PAGE_SIZE) == FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_file_space_page_size() failed.\n";
}
}
@@ -955,7 +953,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
if (H5Pset_page_buffer_size(fapl_id, PB_SIZE, 0, 0) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_page_buffer_size() failed.\n";
}
}
@@ -968,7 +966,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
/* set Parallel access with communicator */
if (H5Pset_fapl_mpio(fapl_id, comm, info) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_fapl_mpio() failed.\n";
}
}
@@ -980,7 +978,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
if (H5Pset_all_coll_metadata_ops(fapl_id, all_coll_metadata_ops) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_all_coll_metadata_ops() failed.\n";
}
}
@@ -992,7 +990,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
if (H5Pset_coll_metadata_write(fapl_id, coll_metadata_write) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_coll_metadata_write() failed.\n";
}
}
@@ -1009,7 +1007,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
if (H5Pget_mdc_config(fapl_id, &mdc_config) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pget_mdc_config() failed.\n";
}
@@ -1017,7 +1015,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
if (H5Pset_mdc_config(fapl_id, &mdc_config) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_mdc_config() failed.\n";
}
}
@@ -1050,7 +1048,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
if (file_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fcreate() or H5Fopen() failed.\n";
}
else {
@@ -1059,7 +1057,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
if (file_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Can't get file_ptr.";
if (verbose) {
@@ -1079,7 +1077,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
if (file_ptr->shared->cache == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't get cache pointer(1).\n";
}
else {
@@ -1099,13 +1097,13 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
if ((file_ptr->shared->page_buf) && ((!enable_page_buffer) || (l_facc_type == FACC_MPIO))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "page buffer unexpectedly enabled.";
}
else if ((file_ptr->shared->page_buf != NULL) &&
((enable_page_buffer) || (l_facc_type != FACC_MPIO))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "page buffer unexpectedly disabled.";
}
}
@@ -1124,7 +1122,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
if (H5C__get_cache_image_config(cache_ptr, &image_ctl) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "error returned by H5C__get_cache_image_config().";
}
}
@@ -1139,22 +1137,22 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
if (read_only) {
if ((image_ctl.version != H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION) ||
- (image_ctl.generate_image != FALSE) || (image_ctl.save_resize_status != FALSE) ||
+ (image_ctl.generate_image != false) || (image_ctl.save_resize_status != false) ||
(image_ctl.entry_ageout != H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE) ||
(image_ctl.flags != H5C_CI__ALL_FLAGS)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected image_ctl values(1).\n";
}
}
else {
if ((image_ctl.version != H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION) ||
- (image_ctl.generate_image != TRUE) || (image_ctl.save_resize_status != FALSE) ||
+ (image_ctl.generate_image != true) || (image_ctl.save_resize_status != false) ||
(image_ctl.entry_ageout != H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE) ||
(image_ctl.flags != H5C_CI__ALL_FLAGS)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected image_ctl values(2).\n";
}
}
@@ -1162,11 +1160,11 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
else {
if ((image_ctl.version != H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION) ||
- (image_ctl.generate_image != FALSE) || (image_ctl.save_resize_status != FALSE) ||
+ (image_ctl.generate_image != false) || (image_ctl.save_resize_status != false) ||
(image_ctl.entry_ageout != H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE) ||
(image_ctl.flags != H5C_CI__ALL_FLAGS)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected image_ctl values(3).\n";
}
}
@@ -1181,7 +1179,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
if (H5C_set_cache_image_config(file_ptr, cache_ptr, &image_ctl) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "error returned by H5C_set_cache_image_config().";
}
}
@@ -1191,9 +1189,9 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
if (pass) {
- if (cache_ptr->close_warning_received == TRUE) {
+ if (cache_ptr->close_warning_received == true) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected value of close_warning_received.\n";
}
@@ -1201,26 +1199,26 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
if (read_only) {
- if ((cache_ptr->load_image != TRUE) || (cache_ptr->delete_image != FALSE)) {
+ if ((cache_ptr->load_image != true) || (cache_ptr->delete_image != false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "mdci sb extension message not present?\n";
}
}
else {
- if ((cache_ptr->load_image != TRUE) || (cache_ptr->delete_image != TRUE)) {
+ if ((cache_ptr->load_image != true) || (cache_ptr->delete_image != true)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "mdci sb extension message not present?\n";
}
}
}
else {
- if ((cache_ptr->load_image == TRUE) || (cache_ptr->delete_image == TRUE)) {
+ if ((cache_ptr->load_image == true) || (cache_ptr->delete_image == true)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "mdci sb extension message present?\n";
}
}
@@ -1253,10 +1251,10 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons
* Purpose: Collectively create a chunked dataset, and fill it with
* known values.
*
- * On failure, set pass to FALSE, and set failure_mssg
+ * On failure, set pass to false, and set failure_mssg
* to point to an appropriate failure message.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -1268,9 +1266,9 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size)
{
const char *fcn_name = "par_create_dataset()";
char dset_name[256];
- hbool_t show_progress = FALSE;
- hbool_t valid_chunk;
- hbool_t verbose = FALSE;
+ bool show_progress = false;
+ bool valid_chunk;
+ bool verbose = false;
int cp = 0;
int i, j, k, l;
int data_chunk[1][CHUNK_SIZE][CHUNK_SIZE];
@@ -1279,17 +1277,17 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size)
hsize_t offset[3];
hsize_t chunk_size[3];
hid_t status;
- hid_t dataspace_id = -1;
- hid_t memspace_id = -1;
- hid_t dset_id = -1;
- hid_t filespace_id = -1;
- hid_t dcpl_id = -1;
- hid_t dxpl_id = -1;
+ hid_t dataspace_id = H5I_INVALID_HID;
+ hid_t memspace_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t filespace_id = H5I_INVALID_HID;
+ hid_t dcpl_id = H5I_INVALID_HID;
+ hid_t dxpl_id = H5I_INVALID_HID;
show_progress = (show_progress && (mpi_rank == 0));
verbose = (verbose && (mpi_rank == 0));
- HDsnprintf(dset_name, sizeof(dset_name), "/dset%03d", dset_num);
+ snprintf(dset_name, sizeof(dset_name), "/dset%03d", dset_num);
if (show_progress) {
fprintf(stdout, "%s: dset name = \"%s\".\n", fcn_name, dset_name);
@@ -1306,7 +1304,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size)
if (dataspace_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Screate_simple() failed.";
}
}
@@ -1324,7 +1322,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size)
if (dcpl_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pcreate(H5P_DATASET_CREATE) failed.";
}
}
@@ -1340,7 +1338,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size)
if (H5Pset_chunk(dcpl_id, 3, chunk_size) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_chunk() failed.";
}
}
@@ -1356,7 +1354,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size)
if (dset_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dcreate() failed.";
}
}
@@ -1371,7 +1369,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size)
if (filespace_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dget_space() failed.";
}
}
@@ -1389,7 +1387,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size)
if (memspace_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Screate_simple() failed.";
}
}
@@ -1410,7 +1408,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sselect_hyperslab() failed.";
}
}
@@ -1425,7 +1423,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size)
if (dxpl_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pcreate(H5P_DATASET_XFER) failed.";
}
}
@@ -1437,7 +1435,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size)
if (H5Pset_dxpl_mpio(dxpl_id, H5FD_MPIO_COLLECTIVE) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_dxpl_mpio() failed.";
}
}
@@ -1476,7 +1474,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "disk H5Sselect_hyperslab() failed.";
}
@@ -1488,7 +1486,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dwrite() failed.";
}
@@ -1522,7 +1520,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "disk hyperslab create failed.";
}
@@ -1533,7 +1531,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "chunk read failed.";
}
}
@@ -1541,13 +1539,13 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size)
/* validate the slab */
if (pass) {
- valid_chunk = TRUE;
+ valid_chunk = true;
for (k = 0; k < CHUNK_SIZE; k++) {
for (l = 0; l < CHUNK_SIZE; l++) {
if (data_chunk[0][k][l] !=
((DSET_SIZE * DSET_SIZE * mpi_rank) + (DSET_SIZE * (i + k)) + j + l + dset_num)) {
- valid_chunk = FALSE;
+ valid_chunk = false;
if (verbose) {
@@ -1564,7 +1562,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size)
if (!valid_chunk) {
- pass = FALSE;
+ pass = false;
failure_mssg = "slab validation failed.";
if (verbose) {
@@ -1584,42 +1582,42 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size)
/* close the data space */
if ((pass) && (H5Sclose(dataspace_id) < 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sclose(dataspace_id) failed.";
}
/* close the file space */
if ((pass) && (H5Sclose(filespace_id) < 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sclose(filespace_id) failed.";
}
/* close the dataset */
if ((pass) && (H5Dclose(dset_id) < 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dclose(dset_id) failed.";
}
/* close the mem space */
if ((pass) && (H5Sclose(memspace_id) < 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sclose(memspace_id) failed.";
}
/* close the dataset creation property list */
if ((pass) && (H5Pclose(dcpl_id) < 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pclose(dcpl) failed.";
}
/* close the data access property list */
if ((pass) && (H5Pclose(dxpl_id) < 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pclose(dxpl) failed.";
}
@@ -1635,10 +1633,10 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size)
*
* Purpose: Collectively delete the specified dataset.
*
- * On failure, set pass to FALSE, and set failure_mssg
+ * On failure, set pass to false, and set failure_mssg
* to point to an appropriate failure message.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -1650,12 +1648,12 @@ par_delete_dataset(int dset_num, hid_t file_id, int mpi_rank)
{
const char *fcn_name = "par_delete_dataset()";
char dset_name[256];
- hbool_t show_progress = FALSE;
+ bool show_progress = false;
int cp = 0;
show_progress = (show_progress && (mpi_rank == 0));
- HDsnprintf(dset_name, sizeof(dset_name), "/dset%03d", dset_num);
+ snprintf(dset_name, sizeof(dset_name), "/dset%03d", dset_num);
if (show_progress) {
fprintf(stdout, "%s: dset name = \"%s\".\n", fcn_name, dset_name);
@@ -1676,7 +1674,7 @@ par_delete_dataset(int dset_num, hid_t file_id, int mpi_rank)
if (H5Ldelete(file_id, dset_name, H5P_DEFAULT) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Ldelete() failed.";
}
}
@@ -1699,10 +1697,10 @@ par_delete_dataset(int dset_num, hid_t file_id, int mpi_rank)
* All processes wait until the child process completes, and
* then return.
*
- * On failure, set pass to FALSE, and set failure_mssg
+ * On failure, set pass to false, and set failure_mssg
* to point to an appropriate failure message.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -1741,10 +1739,10 @@ par_insert_cache_image(int file_name_idx, int mpi_rank, int mpi_size)
*
* Purpose: Collectively verify the contents of a chunked dataset.
*
- * On failure, set pass to FALSE, and set failure_mssg
+ * On failure, set pass to false, and set failure_mssg
* to point to an appropriate failure message.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -1756,9 +1754,9 @@ par_verify_dataset(int dset_num, hid_t file_id, int mpi_rank)
{
const char *fcn_name = "par_verify_dataset()";
char dset_name[256];
- hbool_t show_progress = FALSE;
- hbool_t valid_chunk;
- hbool_t verbose = FALSE;
+ bool show_progress = false;
+ bool valid_chunk;
+ bool verbose = false;
int cp = 0;
int i, j, k, l;
int data_chunk[1][CHUNK_SIZE][CHUNK_SIZE];
@@ -1766,15 +1764,15 @@ par_verify_dataset(int dset_num, hid_t file_id, int mpi_rank)
hsize_t a_size[3];
hsize_t offset[3];
hid_t status;
- hid_t memspace_id = -1;
- hid_t dset_id = -1;
- hid_t filespace_id = -1;
- hid_t dxpl_id = -1;
+ hid_t memspace_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t filespace_id = H5I_INVALID_HID;
+ hid_t dxpl_id = H5I_INVALID_HID;
show_progress = (show_progress && (mpi_rank == 0));
verbose = (verbose && (mpi_rank == 0));
- HDsnprintf(dset_name, sizeof(dset_name), "/dset%03d", dset_num);
+ snprintf(dset_name, sizeof(dset_name), "/dset%03d", dset_num);
if (show_progress) {
fprintf(stdout, "%s: dset name = \"%s\".\n", fcn_name, dset_name);
@@ -1789,7 +1787,7 @@ par_verify_dataset(int dset_num, hid_t file_id, int mpi_rank)
if (dset_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dopen2() failed.";
}
}
@@ -1801,7 +1799,7 @@ par_verify_dataset(int dset_num, hid_t file_id, int mpi_rank)
if (filespace_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dget_space() failed.";
}
}
@@ -1819,7 +1817,7 @@ par_verify_dataset(int dset_num, hid_t file_id, int mpi_rank)
if (memspace_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Screate_simple() failed.";
}
}
@@ -1840,7 +1838,7 @@ par_verify_dataset(int dset_num, hid_t file_id, int mpi_rank)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sselect_hyperslab() failed.";
}
}
@@ -1855,7 +1853,7 @@ par_verify_dataset(int dset_num, hid_t file_id, int mpi_rank)
if (dxpl_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pcreate(H5P_DATASET_XFER) failed.";
}
}
@@ -1867,7 +1865,7 @@ par_verify_dataset(int dset_num, hid_t file_id, int mpi_rank)
if (H5Pset_dxpl_mpio(dxpl_id, H5FD_MPIO_COLLECTIVE) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_dxpl_mpio() failed.";
}
}
@@ -1892,7 +1890,7 @@ par_verify_dataset(int dset_num, hid_t file_id, int mpi_rank)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "disk hyperslab create failed.";
}
@@ -1903,7 +1901,7 @@ par_verify_dataset(int dset_num, hid_t file_id, int mpi_rank)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "chunk read failed.";
}
}
@@ -1911,13 +1909,13 @@ par_verify_dataset(int dset_num, hid_t file_id, int mpi_rank)
/* validate the slab */
if (pass) {
- valid_chunk = TRUE;
+ valid_chunk = true;
for (k = 0; k < CHUNK_SIZE; k++) {
for (l = 0; l < CHUNK_SIZE; l++) {
if (data_chunk[0][k][l] !=
((DSET_SIZE * DSET_SIZE * mpi_rank) + (DSET_SIZE * (i + k)) + j + l + dset_num)) {
- valid_chunk = FALSE;
+ valid_chunk = false;
if (verbose) {
@@ -1934,7 +1932,7 @@ par_verify_dataset(int dset_num, hid_t file_id, int mpi_rank)
if (!valid_chunk) {
- pass = FALSE;
+ pass = false;
failure_mssg = "slab validation failed.";
if (verbose) {
@@ -1954,28 +1952,28 @@ par_verify_dataset(int dset_num, hid_t file_id, int mpi_rank)
/* close the file space */
if ((pass) && (H5Sclose(filespace_id) < 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sclose(filespace_id) failed.";
}
/* close the dataset */
if ((pass) && (H5Dclose(dset_id) < 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dclose(dset_id) failed.";
}
/* close the mem space */
if ((pass) && (H5Sclose(memspace_id) < 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sclose(memspace_id) failed.";
}
/* close the data access property list */
if ((pass) && (H5Pclose(dxpl_id) < 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pclose(dxpl) failed.";
}
@@ -1995,29 +1993,29 @@ par_verify_dataset(int dset_num, hid_t file_id, int mpi_rank)
* of the file before closing.
*
* On failure, print an appropriate error message and
- * return FALSE.
+ * return false.
*
- * Return: TRUE if successful, FALSE otherwise.
+ * Return: true if successful, false otherwise.
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
serial_insert_cache_image(int file_name_idx, int mpi_size)
{
const char *fcn_name = "serial_insert_cache_image()";
char filename[512];
- hbool_t show_progress = FALSE;
+ bool show_progress = false;
int cp = 0;
int i;
int num_dsets = PAR_NUM_DSETS;
- hid_t file_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
MPI_Comm dummy_comm = MPI_COMM_WORLD;
MPI_Info dummy_info = MPI_INFO_NULL;
- pass = TRUE;
+ pass = true;
if (show_progress)
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -2029,7 +2027,7 @@ serial_insert_cache_image(int file_name_idx, int mpi_size)
if (h5_fixname(FILENAMES[file_name_idx], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
fprintf(stdout, "h5_fixname() failed.\n");
}
}
@@ -2042,12 +2040,12 @@ serial_insert_cache_image(int file_name_idx, int mpi_size)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* enable_page_buffer */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ false,
+ /* enable_page_buffer */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -2056,8 +2054,8 @@ serial_insert_cache_image(int file_name_idx, int mpi_size)
/* comm */ dummy_comm,
/* info */ dummy_info,
/* l_facc_type */ 0,
- /* all_coll_metadata_ops */ FALSE,
- /* coll_metadata_write */ FALSE,
+ /* all_coll_metadata_ops */ false,
+ /* coll_metadata_write */ false,
/* md_write_strat */ 1);
}
@@ -2082,7 +2080,7 @@ serial_insert_cache_image(int file_name_idx, int mpi_size)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -2099,10 +2097,10 @@ serial_insert_cache_image(int file_name_idx, int mpi_size)
*
* Purpose: Verify the contents of a chunked dataset.
*
- * On failure, set pass to FALSE, and set failure_mssg
+ * On failure, set pass to false, and set failure_mssg
* to point to an appropriate failure message.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -2114,9 +2112,9 @@ serial_verify_dataset(int dset_num, hid_t file_id, int mpi_size)
{
const char *fcn_name = "serial_verify_dataset()";
char dset_name[256];
- hbool_t show_progress = FALSE;
- hbool_t valid_chunk;
- hbool_t verbose = FALSE;
+ bool show_progress = false;
+ bool valid_chunk;
+ bool verbose = false;
int cp = 0;
int i, j, k, l, m;
int data_chunk[1][CHUNK_SIZE][CHUNK_SIZE];
@@ -2124,11 +2122,11 @@ serial_verify_dataset(int dset_num, hid_t file_id, int mpi_size)
hsize_t a_size[3];
hsize_t offset[3];
hid_t status;
- hid_t memspace_id = -1;
- hid_t dset_id = -1;
- hid_t filespace_id = -1;
+ hid_t memspace_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t filespace_id = H5I_INVALID_HID;
- HDsnprintf(dset_name, sizeof(dset_name), "/dset%03d", dset_num);
+ snprintf(dset_name, sizeof(dset_name), "/dset%03d", dset_num);
if (show_progress) {
fprintf(stdout, "%s: dset name = \"%s\".\n", fcn_name, dset_name);
@@ -2143,7 +2141,7 @@ serial_verify_dataset(int dset_num, hid_t file_id, int mpi_size)
if (dset_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dopen2() failed.";
}
}
@@ -2155,7 +2153,7 @@ serial_verify_dataset(int dset_num, hid_t file_id, int mpi_size)
if (filespace_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dget_space() failed.";
}
}
@@ -2173,7 +2171,7 @@ serial_verify_dataset(int dset_num, hid_t file_id, int mpi_size)
if (memspace_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Screate_simple() failed.";
}
}
@@ -2194,7 +2192,7 @@ serial_verify_dataset(int dset_num, hid_t file_id, int mpi_size)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sselect_hyperslab() failed.";
}
}
@@ -2221,7 +2219,7 @@ serial_verify_dataset(int dset_num, hid_t file_id, int mpi_size)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "disk hyperslab create failed.";
}
@@ -2233,7 +2231,7 @@ serial_verify_dataset(int dset_num, hid_t file_id, int mpi_size)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "chunk read failed.";
}
}
@@ -2241,14 +2239,14 @@ serial_verify_dataset(int dset_num, hid_t file_id, int mpi_size)
/* validate the slab */
if (pass) {
- valid_chunk = TRUE;
+ valid_chunk = true;
for (l = 0; l < CHUNK_SIZE; l++) {
for (m = 0; m < CHUNK_SIZE; m++) {
if (data_chunk[0][l][m] !=
((DSET_SIZE * DSET_SIZE * i) + (DSET_SIZE * (j + l)) + k + m + dset_num)) {
- valid_chunk = FALSE;
+ valid_chunk = false;
if (verbose) {
@@ -2265,7 +2263,7 @@ serial_verify_dataset(int dset_num, hid_t file_id, int mpi_size)
if (!valid_chunk) {
- pass = FALSE;
+ pass = false;
failure_mssg = "slab validation failed.";
if (verbose) {
@@ -2287,21 +2285,21 @@ serial_verify_dataset(int dset_num, hid_t file_id, int mpi_size)
/* close the file space */
if ((pass) && (H5Sclose(filespace_id) < 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sclose(filespace_id) failed.";
}
/* close the dataset */
if ((pass) && (H5Dclose(dset_id) < 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dclose(dset_id) failed.";
}
/* close the mem space */
if ((pass) && (H5Sclose(memspace_id) < 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sclose(memspace_id) failed.";
}
@@ -2315,7 +2313,7 @@ serial_verify_dataset(int dset_num, hid_t file_id, int mpi_size)
/*-------------------------------------------------------------------------
* Function: verify_data_sets()
*
- * Purpose: If pass is TRUE on entry, verify that the data sets in the
+ * Purpose: If pass is true on entry, verify that the data sets in the
* file exist and contain the expected data.
*
* Note that these data sets were created by
@@ -2323,10 +2321,10 @@ serial_verify_dataset(int dset_num, hid_t file_id, int mpi_size)
* function must be reflected in this function, and
* vise-versa.
*
- * On failure, set pass to FALSE, and set failure_mssg
+ * On failure, set pass to false, and set failure_mssg
* to point to an appropriate failure message.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -2338,15 +2336,15 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset)
{
const char *fcn_name = "verify_data_sets()";
char dset_name[64];
- hbool_t show_progress = FALSE;
- hbool_t valid_chunk;
- hbool_t verbose = FALSE;
+ bool show_progress = false;
+ bool valid_chunk;
+ bool verbose = false;
int cp = 0;
int i, j, k, l, m;
int data_chunk[CHUNK_SIZE][CHUNK_SIZE];
herr_t status;
hid_t filespace_ids[MAX_NUM_DSETS];
- hid_t memspace_id = -1;
+ hid_t memspace_id = H5I_INVALID_HID;
hid_t dataset_ids[MAX_NUM_DSETS];
hsize_t dims[2];
hsize_t a_size[2];
@@ -2369,12 +2367,12 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset)
/* open the dataset */
if (pass) {
- HDsnprintf(dset_name, sizeof(dset_name), "/dset%03d", i);
+ snprintf(dset_name, sizeof(dset_name), "/dset%03d", i);
dataset_ids[i] = H5Dopen2(file_id, dset_name, H5P_DEFAULT);
if (dataset_ids[i] < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dopen2() failed.";
}
}
@@ -2386,7 +2384,7 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset)
if (filespace_ids[i] < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dget_space() failed.";
}
}
@@ -2407,7 +2405,7 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset)
if (memspace_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Screate_simple() failed.";
}
}
@@ -2426,7 +2424,7 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sselect_hyperslab() failed.";
}
}
@@ -2451,7 +2449,7 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "disk hyperslab create failed.";
}
@@ -2463,7 +2461,7 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "disk hyperslab create failed.";
}
}
@@ -2471,13 +2469,13 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset)
/* validate the slab */
if (pass) {
- valid_chunk = TRUE;
+ valid_chunk = true;
for (k = 0; k < CHUNK_SIZE; k++) {
for (l = 0; l < CHUNK_SIZE; l++) {
if (data_chunk[k][l] !=
((DSET_SIZE * DSET_SIZE * m) + (DSET_SIZE * (i + k)) + j + l)) {
- valid_chunk = FALSE;
+ valid_chunk = false;
if (verbose) {
@@ -2493,7 +2491,7 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset)
if (!valid_chunk) {
- pass = FALSE;
+ pass = false;
failure_mssg = "slab validation failed.";
if (verbose) {
@@ -2517,7 +2515,7 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset)
while ((pass) && (i <= max_dset)) {
if (H5Sclose(filespace_ids[i]) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sclose() failed.";
}
i++;
@@ -2528,7 +2526,7 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset)
while ((pass) && (i <= max_dset)) {
if (H5Dclose(dataset_ids[i]) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dclose() failed.";
}
i++;
@@ -2539,7 +2537,7 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset)
if (H5Sclose(memspace_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sclose(memspace_id) failed.";
}
}
@@ -2592,13 +2590,13 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank)
{
const char *fcn_name = "verify_cache_image_RO()";
char filename[512];
- hbool_t show_progress = FALSE;
- hid_t file_id = -1;
+ bool show_progress = false;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
int cp = 0;
- pass = TRUE;
+ pass = true;
if (mpi_rank == 0) {
@@ -2614,7 +2612,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank)
default:
TESTING("parallel CI load test -- unknown md write -- R/o");
- pass = FALSE;
+ pass = false;
break;
}
}
@@ -2629,7 +2627,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank)
if (h5_fixname(FILENAMES[file_name_id], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -2644,12 +2642,12 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ TRUE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* enable_page_buffer */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ true,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* enable_page_buffer */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -2658,8 +2656,8 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank)
/* comm */ MPI_COMM_WORLD,
/* info */ MPI_INFO_NULL,
/* l_facc_type */ FACC_MPIO,
- /* all_coll_metadata_ops */ FALSE,
- /* coll_metadata_write */ FALSE,
+ /* all_coll_metadata_ops */ false,
+ /* coll_metadata_write */ false,
/* md_write_strat */ md_write_strat);
}
@@ -2686,7 +2684,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank)
if (((mpi_rank == 0) && (cache_ptr->images_read != 1)) ||
((mpi_rank > 0) && (cache_ptr->images_read != 0))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected images_read.";
}
}
@@ -2707,7 +2705,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank)
if (cache_ptr->images_loaded != 1) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Image not loaded?.";
}
}
@@ -2722,7 +2720,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -2734,12 +2732,12 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ TRUE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* enable_page_buffer */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ true,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* enable_page_buffer */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -2748,8 +2746,8 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank)
/* comm */ MPI_COMM_WORLD,
/* info */ MPI_INFO_NULL,
/* l_facc_type */ FACC_MPIO,
- /* all_coll_metadata_ops */ FALSE,
- /* coll_metadata_write */ FALSE,
+ /* all_coll_metadata_ops */ false,
+ /* coll_metadata_write */ false,
/* md_write_strat */ md_write_strat);
}
@@ -2768,7 +2766,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank)
if (cache_ptr->images_loaded != 1) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block not loaded(2).";
}
}
@@ -2780,7 +2778,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -2852,13 +2850,13 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank)
{
const char *fcn_name = "verify_cache_imageRW()";
char filename[512];
- hbool_t show_progress = FALSE;
- hid_t file_id = -1;
+ bool show_progress = false;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
int cp = 0;
- pass = TRUE;
+ pass = true;
if (mpi_rank == 0) {
@@ -2874,7 +2872,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank)
default:
TESTING("parallel CI load test -- unknown md write -- R/W");
- pass = FALSE;
+ pass = false;
break;
}
}
@@ -2889,7 +2887,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank)
if (h5_fixname(FILENAMES[file_name_id], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -2909,12 +2907,12 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* enable_page_buffer */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* enable_page_buffer */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -2923,8 +2921,8 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank)
/* comm */ MPI_COMM_WORLD,
/* info */ MPI_INFO_NULL,
/* l_facc_type */ FACC_MPIO,
- /* all_coll_metadata_ops */ FALSE,
- /* coll_metadata_write */ FALSE,
+ /* all_coll_metadata_ops */ false,
+ /* coll_metadata_write */ false,
/* md_write_strat */ md_write_strat);
}
@@ -2950,7 +2948,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank)
if (((mpi_rank == 0) && (cache_ptr->images_read != 1)) ||
((mpi_rank > 0) && (cache_ptr->images_read != 0))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected images_read.";
}
}
@@ -2971,7 +2969,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank)
if (cache_ptr->images_loaded != 1) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Image not loaded?.";
}
}
@@ -2986,7 +2984,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -2998,12 +2996,12 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* enable_page_buffer */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* enable_page_buffer */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -3012,8 +3010,8 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank)
/* comm */ MPI_COMM_WORLD,
/* info */ MPI_INFO_NULL,
/* l_facc_type */ FACC_MPIO,
- /* all_coll_metadata_ops */ FALSE,
- /* coll_metadata_write */ FALSE,
+ /* all_coll_metadata_ops */ false,
+ /* coll_metadata_write */ false,
/* md_write_strat */ md_write_strat);
}
@@ -3032,7 +3030,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(1).";
}
}
@@ -3044,7 +3042,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -3061,7 +3059,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank)
if ((mpi_rank == 0) && (HDremove(filename) < 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -3104,18 +3102,18 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank)
* of the test will have to be re-worked when and if page
* buffering is supported in parallel.
*
- * Return: Success: TRUE
+ * Return: Success: true
*
- * Failure: FALSE
+ * Failure: false
*
*****************************************************************************/
-static hbool_t
+static bool
smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
{
const char *fcn_name = "smoke_check_1()";
char filename[512];
- hbool_t show_progress = FALSE;
- hid_t file_id = -1;
+ bool show_progress = false;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
int cp = 0;
@@ -3124,7 +3122,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
int test_file_index = 2;
h5_stat_size_t file_size;
- pass = TRUE;
+ pass = true;
if (mpi_rank == 0) {
@@ -3141,7 +3139,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
if (h5_fixname(FILENAMES[test_file_index], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -3156,12 +3154,12 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
if (pass) {
- open_hdf5_file(/* create_file */ TRUE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ TRUE,
- /* enable_page_buffer */ FALSE,
+ open_hdf5_file(/* create_file */ true,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ true,
+ /* enable_page_buffer */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -3170,8 +3168,8 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
/* comm */ mpi_comm,
/* info */ mpi_info,
/* l_facc_type */ FACC_MPIO,
- /* all_coll_metadata_ops */ FALSE,
- /* coll_metadata_write */ TRUE,
+ /* all_coll_metadata_ops */ false,
+ /* coll_metadata_write */ true,
/* md_write_strat */ 1);
}
@@ -3205,7 +3203,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -3227,12 +3225,12 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ TRUE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* enable_page_buffer */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ true,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* enable_page_buffer */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -3241,8 +3239,8 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
/* comm */ mpi_comm,
/* info */ mpi_info,
/* l_facc_type */ FACC_MPIO,
- /* all_coll_metadata_ops */ FALSE,
- /* coll_metadata_write */ TRUE,
+ /* all_coll_metadata_ops */ false,
+ /* coll_metadata_write */ true,
/* md_write_strat */ 1);
}
@@ -3274,7 +3272,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
if (((mpi_rank == 0) && (cache_ptr->images_read != 1)) ||
((mpi_rank > 0) && (cache_ptr->images_read != 0))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected images_read.";
}
}
@@ -3295,7 +3293,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
if (cache_ptr->images_loaded != 1) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Image not loaded?.";
}
}
@@ -3310,7 +3308,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.";
}
}
@@ -3322,12 +3320,12 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* enable_page_buffer */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* enable_page_buffer */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -3336,8 +3334,8 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
/* comm */ mpi_comm,
/* info */ mpi_info,
/* l_facc_type */ FACC_MPIO,
- /* all_coll_metadata_ops */ FALSE,
- /* coll_metadata_write */ TRUE,
+ /* all_coll_metadata_ops */ false,
+ /* coll_metadata_write */ true,
/* md_write_strat */ 1);
}
@@ -3369,7 +3367,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
if (((mpi_rank == 0) && (cache_ptr->images_read != 1)) ||
((mpi_rank > 0) && (cache_ptr->images_read != 0))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected images_read.";
}
}
@@ -3390,7 +3388,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
if (cache_ptr->images_loaded != 1) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Image not loaded?.";
}
}
@@ -3417,7 +3415,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.";
}
}
@@ -3438,12 +3436,12 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
if ((file_size = h5_get_file_size(filename, H5P_DEFAULT)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_get_file_size() failed.";
}
else if (file_size > 20 * 1024) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpectedly large file size.";
}
}
@@ -3460,7 +3458,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
if ((mpi_rank == 0) && (HDremove(filename) < 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
diff --git a/testpar/t_chunk_alloc.c b/testpar/t_chunk_alloc.c
index 0ffe695fdfd..d02951d54ee 100644
--- a/testpar/t_chunk_alloc.c
+++ b/testpar/t_chunk_alloc.c
@@ -166,7 +166,6 @@ static void
parallel_access_dataset(const char *filename, int chunk_factor, access_type action, hid_t *file_id,
hid_t *dataset)
{
- /* HDF5 gubbins */
hid_t memspace, dataspace; /* HDF5 file identifier */
hid_t access_plist; /* HDF5 ID for file access property list */
herr_t hrc; /* HDF5 return code */
@@ -306,7 +305,6 @@ static void
verify_data(const char *filename, int chunk_factor, write_type write_pattern, int vclose, hid_t *file_id,
hid_t *dataset)
{
- /* HDF5 gubbins */
hid_t dataspace, memspace; /* HDF5 file identifier */
hid_t access_plist; /* HDF5 ID for file access property list */
herr_t hrc; /* HDF5 return code */
diff --git a/testpar/t_dset.c b/testpar/t_dset.c
index f82410feee4..83d751120e6 100644
--- a/testpar/t_dset.c
+++ b/testpar/t_dset.c
@@ -2902,10 +2902,10 @@ test_actual_io_mode(int selection_mode)
H5D_mpio_actual_io_mode_t actual_io_mode_expected = H5D_MPIO_NO_COLLECTIVE;
const char *filename;
const char *test_name;
- hbool_t direct_multi_chunk_io;
- hbool_t multi_chunk_io;
- hbool_t is_chunked;
- hbool_t is_collective;
+ bool direct_multi_chunk_io;
+ bool multi_chunk_io;
+ bool is_chunked;
+ bool is_collective;
int mpi_size = -1;
int mpi_rank = -1;
int length;
@@ -2913,16 +2913,16 @@ test_actual_io_mode(int selection_mode)
int i;
MPI_Comm mpi_comm = MPI_COMM_NULL;
MPI_Info mpi_info = MPI_INFO_NULL;
- hid_t fid = -1;
- hid_t sid = -1;
- hid_t dataset = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t dataset = H5I_INVALID_HID;
hid_t data_type = H5T_NATIVE_INT;
- hid_t fapl = -1;
- hid_t mem_space = -1;
- hid_t file_space = -1;
- hid_t dcpl = -1;
- hid_t dxpl_write = -1;
- hid_t dxpl_read = -1;
+ hid_t fapl = H5I_INVALID_HID;
+ hid_t mem_space = H5I_INVALID_HID;
+ hid_t file_space = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
+ hid_t dxpl_write = H5I_INVALID_HID;
+ hid_t dxpl_read = H5I_INVALID_HID;
hsize_t dims[RANK];
hsize_t chunk_dims[RANK];
hsize_t start[RANK];
@@ -3251,10 +3251,10 @@ test_actual_io_mode(int selection_mode)
/* Test values */
if (actual_chunk_opt_mode_expected != (H5D_mpio_actual_chunk_opt_mode_t)-1 &&
actual_io_mode_expected != (H5D_mpio_actual_io_mode_t)-1) {
- HDsnprintf(message, sizeof(message), "Actual Chunk Opt Mode has the correct value for %s.\n",
- test_name);
+ snprintf(message, sizeof(message), "Actual Chunk Opt Mode has the correct value for %s.\n",
+ test_name);
VRFY((actual_chunk_opt_mode_write == actual_chunk_opt_mode_expected), message);
- HDsnprintf(message, sizeof(message), "Actual IO Mode has the correct value for %s.\n", test_name);
+ snprintf(message, sizeof(message), "Actual IO Mode has the correct value for %s.\n", test_name);
VRFY((actual_io_mode_write == actual_io_mode_expected), message);
}
else {
@@ -3424,7 +3424,7 @@ actual_io_mode_tests(void)
* Test for Compact layout as the cause of breaking collective I/O.
*
* TEST_NOT_CONTIGUOUS_OR_CHUNKED_DATASET_EXTERNAL:
- * Test for Externl-File storage as the cause of breaking collective I/O.
+ * Test for External-File storage as the cause of breaking collective I/O.
*
*/
#define FILE_EXTERNAL "nocolcause_extern.data"
@@ -3444,8 +3444,8 @@ test_no_collective_cause_mode(int selection_mode)
const char *filename;
const char *test_name;
- hbool_t is_chunked = 1;
- hbool_t is_independent = 0;
+ bool is_chunked = 1;
+ bool is_independent = 0;
int mpi_size = -1;
int mpi_rank = -1;
int length;
@@ -3453,17 +3453,17 @@ test_no_collective_cause_mode(int selection_mode)
int i;
MPI_Comm mpi_comm;
MPI_Info mpi_info;
- hid_t fid = -1;
- hid_t sid = -1;
- hid_t dataset = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t dataset = H5I_INVALID_HID;
hid_t data_type = H5T_NATIVE_INT;
- hid_t fapl = -1;
- hid_t dcpl = -1;
- hid_t dxpl_write = -1;
- hid_t dxpl_read = -1;
+ hid_t fapl = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
+ hid_t dxpl_write = H5I_INVALID_HID;
+ hid_t dxpl_read = H5I_INVALID_HID;
hsize_t dims[RANK];
- hid_t mem_space = -1;
- hid_t file_space = -1;
+ hid_t mem_space = H5I_INVALID_HID;
+ hid_t file_space = H5I_INVALID_HID;
hsize_t chunk_dims[RANK];
herr_t ret;
/* set to global value as default */
@@ -3728,12 +3728,12 @@ test_no_collective_cause_mode(int selection_mode)
/* Test values */
memset(message, 0, sizeof(message));
- HDsnprintf(message, sizeof(message),
- "Local cause of Broken Collective I/O has the correct value for %s.\n", test_name);
+ snprintf(message, sizeof(message), "Local cause of Broken Collective I/O has the correct value for %s.\n",
+ test_name);
VRFY((no_collective_cause_local_write == no_collective_cause_local_expected), message);
memset(message, 0, sizeof(message));
- HDsnprintf(message, sizeof(message),
- "Global cause of Broken Collective I/O has the correct value for %s.\n", test_name);
+ snprintf(message, sizeof(message),
+ "Global cause of Broken Collective I/O has the correct value for %s.\n", test_name);
VRFY((no_collective_cause_global_write == no_collective_cause_global_expected), message);
/* Release some resources */
@@ -3827,7 +3827,7 @@ dataset_atomicity(void)
herr_t ret; /* Generic return value */
int mpi_size, mpi_rank;
int i, j, k;
- hbool_t atomicity = FALSE;
+ bool atomicity = false;
MPI_Comm comm = MPI_COMM_WORLD;
MPI_Info info = MPI_INFO_NULL;
@@ -3907,7 +3907,7 @@ dataset_atomicity(void)
/* should fail */
H5E_BEGIN_TRY
{
- ret = H5Fset_mpi_atomicity(fid, TRUE);
+ ret = H5Fset_mpi_atomicity(fid, true);
}
H5E_END_TRY
VRFY((ret == FAIL), "H5Fset_mpi_atomicity failed");
@@ -3930,7 +3930,7 @@ dataset_atomicity(void)
ret = H5Pclose(acc_tpl);
VRFY((ret >= 0), "H5Pclose succeeded");
- ret = H5Fset_mpi_atomicity(fid, TRUE);
+ ret = H5Fset_mpi_atomicity(fid, true);
VRFY((ret >= 0), "H5Fset_mpi_atomicity succeeded");
/* open dataset1 (contiguous case) */
@@ -3951,7 +3951,7 @@ dataset_atomicity(void)
/* check that the atomicity flag is set */
ret = H5Fget_mpi_atomicity(fid, &atomicity);
VRFY((ret >= 0), "atomcity get failed");
- VRFY((atomicity == TRUE), "atomcity set failed");
+ VRFY((atomicity == true), "atomcity set failed");
MPI_Barrier(comm);
@@ -4021,11 +4021,11 @@ dataset_atomicity(void)
read_buf[i] = 8;
}
- atomicity = FALSE;
+ atomicity = false;
/* check that the atomicity flag is set */
ret = H5Fget_mpi_atomicity(fid, &atomicity);
VRFY((ret >= 0), "atomcity get failed");
- VRFY((atomicity == TRUE), "atomcity set failed");
+ VRFY((atomicity == true), "atomcity set failed");
block[0] = (hsize_t)(dim0 / mpi_size - 1);
block[1] = (hsize_t)(dim1 / mpi_size - 1);
diff --git a/testpar/t_file.c b/testpar/t_file.c
index 9338344a8cd..a6a541becf3 100644
--- a/testpar/t_file.c
+++ b/testpar/t_file.c
@@ -120,7 +120,7 @@ test_split_comm_access(void)
void
test_page_buffer_access(void)
{
- hid_t file_id = -1; /* File ID */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
hid_t fcpl, fapl;
size_t page_count = 0;
int i, num_elements = 200;
@@ -129,7 +129,7 @@ test_page_buffer_access(void)
H5F_t *f = NULL;
herr_t ret; /* generic return value */
const char *filename;
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
@@ -160,7 +160,7 @@ test_page_buffer_access(void)
VRFY((file_id < 0), "H5Fcreate failed");
/* disable collective metadata writes for page buffering to work */
- ret = H5Pset_coll_metadata_write(fapl, FALSE);
+ ret = H5Pset_coll_metadata_write(fapl, false);
VRFY((ret >= 0), "");
ret = create_file(filename, fcpl, fapl, H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
@@ -190,7 +190,7 @@ test_page_buffer_access(void)
ret = H5Pset_page_buffer_size(fapl_self, sizeof(int) * 1000, 0, 0);
VRFY((ret == 0), "");
/* collective metadata writes do not work with page buffering */
- ret = H5Pset_coll_metadata_write(fapl_self, FALSE);
+ ret = H5Pset_coll_metadata_write(fapl_self, false);
VRFY((ret >= 0), "");
file_id = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl_self);
@@ -199,7 +199,7 @@ test_page_buffer_access(void)
/* Push API context */
ret = H5CX_push();
VRFY((ret == 0), "H5CX_push()");
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Get a pointer to the internal file object */
f = (H5F_t *)H5I_object(file_id);
@@ -288,9 +288,9 @@ test_page_buffer_access(void)
/* Pop API context */
if (api_ctx_pushed) {
- ret = H5CX_pop(FALSE);
+ ret = H5CX_pop(false);
VRFY((ret == 0), "H5CX_pop()");
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
}
}
@@ -300,7 +300,7 @@ test_page_buffer_access(void)
ret = H5Pset_page_buffer_size(fapl, sizeof(int) * 1000, 0, 0);
VRFY((ret == 0), "");
/* collective metadata writes do not work with page buffering */
- ret = H5Pset_coll_metadata_write(fapl, FALSE);
+ ret = H5Pset_coll_metadata_write(fapl, false);
VRFY((ret >= 0), "");
file_id = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl);
@@ -309,7 +309,7 @@ test_page_buffer_access(void)
/* Push API context */
ret = H5CX_push();
VRFY((ret == 0), "H5CX_push()");
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Get a pointer to the internal file object */
f = (H5F_t *)H5I_object(file_id);
@@ -422,9 +422,9 @@ test_page_buffer_access(void)
/* Pop API context */
if (api_ctx_pushed) {
- ret = H5CX_pop(FALSE);
+ ret = H5CX_pop(false);
VRFY((ret == 0), "H5CX_pop()");
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
}
free(data);
@@ -449,7 +449,7 @@ create_file(const char *filename, hid_t fcpl, hid_t fapl, int metadata_write_str
H5F_t *f = NULL;
H5C_t *cache_ptr = NULL;
H5AC_cache_config_t config;
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
herr_t ret;
file_id = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl);
@@ -461,14 +461,14 @@ create_file(const char *filename, hid_t fcpl, hid_t fapl, int metadata_write_str
/* Push API context */
ret = H5CX_push();
VRFY((ret == 0), "H5CX_push()");
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
f = (H5F_t *)H5I_object(file_id);
VRFY((f != NULL), "");
cache_ptr = f->shared->cache;
- cache_ptr->ignore_tags = TRUE;
+ cache_ptr->ignore_tags = true;
H5C_stats__reset(cache_ptr);
config.version = H5AC__CURR_CACHE_CONFIG_VERSION;
@@ -514,25 +514,25 @@ create_file(const char *filename, hid_t fcpl, hid_t fapl, int metadata_write_str
VRFY((mem_dataspace >= 0), "");
for (k = 0; k < NUM_DSETS; k++) {
- HDsnprintf(dset_name, sizeof(dset_name), "D1dset%d", k);
+ snprintf(dset_name, sizeof(dset_name), "D1dset%d", k);
dset_id = H5Dcreate2(grp_id, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
VRFY((dset_id >= 0), "");
ret = H5Dclose(dset_id);
VRFY((ret == 0), "");
- HDsnprintf(dset_name, sizeof(dset_name), "D2dset%d", k);
+ snprintf(dset_name, sizeof(dset_name), "D2dset%d", k);
dset_id = H5Dcreate2(grp_id, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
VRFY((dset_id >= 0), "");
ret = H5Dclose(dset_id);
VRFY((ret == 0), "");
- HDsnprintf(dset_name, sizeof(dset_name), "D3dset%d", k);
+ snprintf(dset_name, sizeof(dset_name), "D3dset%d", k);
dset_id = H5Dcreate2(grp_id, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
VRFY((dset_id >= 0), "");
ret = H5Dclose(dset_id);
VRFY((ret == 0), "");
- HDsnprintf(dset_name, sizeof(dset_name), "dset%d", k);
+ snprintf(dset_name, sizeof(dset_name), "dset%d", k);
dset_id = H5Dcreate2(grp_id, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
VRFY((dset_id >= 0), "");
@@ -555,13 +555,13 @@ create_file(const char *filename, hid_t fcpl, hid_t fapl, int metadata_write_str
for (i = 0; i < num_elements; i++)
VRFY((data_array[i] == mpi_rank + 1), "Dataset Verify failed");
- HDsnprintf(dset_name, sizeof(dset_name), "D1dset%d", k);
+ snprintf(dset_name, sizeof(dset_name), "D1dset%d", k);
ret = H5Ldelete(grp_id, dset_name, H5P_DEFAULT);
VRFY((ret == 0), "");
- HDsnprintf(dset_name, sizeof(dset_name), "D2dset%d", k);
+ snprintf(dset_name, sizeof(dset_name), "D2dset%d", k);
ret = H5Ldelete(grp_id, dset_name, H5P_DEFAULT);
VRFY((ret == 0), "");
- HDsnprintf(dset_name, sizeof(dset_name), "D3dset%d", k);
+ snprintf(dset_name, sizeof(dset_name), "D3dset%d", k);
ret = H5Ldelete(grp_id, dset_name, H5P_DEFAULT);
VRFY((ret == 0), "");
}
@@ -577,9 +577,9 @@ create_file(const char *filename, hid_t fcpl, hid_t fapl, int metadata_write_str
/* Pop API context */
if (api_ctx_pushed) {
- ret = H5CX_pop(FALSE);
+ ret = H5CX_pop(false);
VRFY((ret == 0), "H5CX_pop()");
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
}
MPI_Barrier(MPI_COMM_WORLD);
@@ -605,7 +605,7 @@ open_file(const char *filename, hid_t fapl, int metadata_write_strategy, hsize_t
H5F_t *f = NULL;
H5C_t *cache_ptr = NULL;
H5AC_cache_config_t config;
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
herr_t ret;
config.version = H5AC__CURR_CACHE_CONFIG_VERSION;
@@ -624,7 +624,7 @@ open_file(const char *filename, hid_t fapl, int metadata_write_strategy, hsize_t
/* Push API context */
ret = H5CX_push();
VRFY((ret == 0), "H5CX_push()");
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
ret = H5Fflush(file_id, H5F_SCOPE_GLOBAL);
VRFY((ret == 0), "");
@@ -666,7 +666,7 @@ open_file(const char *filename, hid_t fapl, int metadata_write_strategy, hsize_t
VRFY((mem_dataspace >= 0), "");
for (k = 0; k < NUM_DSETS; k++) {
- HDsnprintf(dset_name, sizeof(dset_name), "dset%d", k);
+ snprintf(dset_name, sizeof(dset_name), "dset%d", k);
dset_id = H5Dopen2(grp_id, dset_name, H5P_DEFAULT);
VRFY((dset_id >= 0), "");
@@ -711,7 +711,7 @@ open_file(const char *filename, hid_t fapl, int metadata_write_strategy, hsize_t
entry_ptr = cache_ptr->index[i];
while (entry_ptr != NULL) {
- assert(entry_ptr->is_dirty == FALSE);
+ assert(entry_ptr->is_dirty == false);
if (!entry_ptr->is_pinned && !entry_ptr->is_protected) {
ret = H5AC_expunge_entry(f, entry_ptr->type, entry_ptr->addr, 0);
@@ -739,9 +739,9 @@ open_file(const char *filename, hid_t fapl, int metadata_write_strategy, hsize_t
/* Pop API context */
if (api_ctx_pushed) {
- ret = H5CX_pop(FALSE);
+ ret = H5CX_pop(false);
VRFY((ret == 0), "H5CX_pop()");
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
}
free(data_array);
@@ -760,7 +760,7 @@ test_file_properties(void)
hid_t fid = H5I_INVALID_HID; /* HDF5 file ID */
hid_t fapl_id = H5I_INVALID_HID; /* File access plist */
hid_t fapl_copy_id = H5I_INVALID_HID; /* File access plist */
- hbool_t is_coll;
+ bool is_coll;
htri_t are_equal;
const char *filename;
MPI_Comm comm = MPI_COMM_WORLD;
@@ -781,7 +781,7 @@ test_file_properties(void)
mpi_ret = MPI_Info_create(&info);
VRFY((mpi_ret >= 0), "MPI_Info_create succeeded");
mpi_ret = MPI_Info_set(info, "hdf_info_prop1", "xyz");
- VRFY((mpi_ret == MPI_SUCCESS), "MPI_Info_set");
+ VRFY((mpi_ret == MPI_SUCCESS), "MPI_Info_set succeeded");
/* setup file access plist */
fapl_id = H5Pcreate(H5P_FILE_ACCESS);
@@ -817,7 +817,7 @@ test_file_properties(void)
fapl_copy_id = H5Pcopy(fapl_id);
VRFY((fapl_copy_id != H5I_INVALID_HID), "H5Pcopy");
are_equal = H5Pequal(fapl_id, fapl_copy_id);
- VRFY((TRUE == are_equal), "H5Pequal");
+ VRFY((true == are_equal), "H5Pequal");
/* Add a property to the copy and ensure it's different now */
mpi_ret = MPI_Info_set(info, "hdf_info_prop2", "abc");
@@ -825,7 +825,7 @@ test_file_properties(void)
ret = H5Pset_mpi_params(fapl_copy_id, comm, info);
VRFY((ret >= 0), "H5Pset_mpi_params succeeded");
are_equal = H5Pequal(fapl_id, fapl_copy_id);
- VRFY((FALSE == are_equal), "H5Pequal");
+ VRFY((false == are_equal), "H5Pequal");
/* Add a property with the same key but a different value to the original
* and ensure they are still different.
@@ -835,7 +835,7 @@ test_file_properties(void)
ret = H5Pset_mpi_params(fapl_id, comm, info);
VRFY((ret >= 0), "H5Pset_mpi_params succeeded");
are_equal = H5Pequal(fapl_id, fapl_copy_id);
- VRFY((FALSE == are_equal), "H5Pequal");
+ VRFY((false == are_equal), "H5Pequal");
/* Set the second property in the original to the same
* value as the copy and ensure they are the same now.
@@ -845,7 +845,7 @@ test_file_properties(void)
ret = H5Pset_mpi_params(fapl_id, comm, info);
VRFY((ret >= 0), "H5Pset_mpi_params succeeded");
are_equal = H5Pequal(fapl_id, fapl_copy_id);
- VRFY((TRUE == are_equal), "H5Pequal");
+ VRFY((true == are_equal), "H5Pequal");
/* create the file */
fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
@@ -856,12 +856,12 @@ test_file_properties(void)
/* Collective metadata writes */
ret = H5Pget_coll_metadata_write(fapl_id, &is_coll);
VRFY((ret >= 0), "H5Pget_coll_metadata_write succeeded");
- VRFY((is_coll == FALSE), "Incorrect property setting for coll metadata writes");
+ VRFY((is_coll == false), "Incorrect property setting for coll metadata writes");
/* Collective metadata read API calling requirement */
ret = H5Pget_all_coll_metadata_ops(fapl_id, &is_coll);
VRFY((ret >= 0), "H5Pget_all_coll_metadata_ops succeeded");
- VRFY((is_coll == FALSE), "Incorrect property setting for coll metadata API calls requirement");
+ VRFY((is_coll == false), "Incorrect property setting for coll metadata API calls requirement");
ret = H5Fclose(fid);
VRFY((ret >= 0), "H5Fclose succeeded");
@@ -870,19 +870,19 @@ test_file_properties(void)
ret = H5Pset_fapl_mpio(fapl_id, comm, info);
VRFY((ret >= 0), "H5Pset_fapl_mpio failed");
fid = H5Fopen(filename, H5F_ACC_RDWR, fapl_id);
- VRFY((fid != H5I_INVALID_HID), "H5Fcreate succeeded");
+ VRFY((fid != H5I_INVALID_HID), "H5Fopen succeeded");
/* verify settings for file access properties */
/* Collective metadata writes */
ret = H5Pget_coll_metadata_write(fapl_id, &is_coll);
VRFY((ret >= 0), "H5Pget_coll_metadata_write succeeded");
- VRFY((is_coll == FALSE), "Incorrect property setting for coll metadata writes");
+ VRFY((is_coll == false), "Incorrect property setting for coll metadata writes");
/* Collective metadata read API calling requirement */
ret = H5Pget_all_coll_metadata_ops(fapl_id, &is_coll);
VRFY((ret >= 0), "H5Pget_all_coll_metadata_ops succeeded");
- VRFY((is_coll == FALSE), "Incorrect property setting for coll metadata API calls requirement");
+ VRFY((is_coll == false), "Incorrect property setting for coll metadata API calls requirement");
ret = H5Fclose(fid);
VRFY((ret >= 0), "H5Fclose succeeded");
@@ -891,25 +891,25 @@ test_file_properties(void)
ret = H5Pset_fapl_mpio(fapl_id, comm, info);
VRFY((ret >= 0), "H5Pset_fapl_mpio failed");
/* Collective metadata writes */
- ret = H5Pset_coll_metadata_write(fapl_id, TRUE);
+ ret = H5Pset_coll_metadata_write(fapl_id, true);
VRFY((ret >= 0), "H5Pget_coll_metadata_write succeeded");
/* Collective metadata read API calling requirement */
- ret = H5Pset_all_coll_metadata_ops(fapl_id, TRUE);
+ ret = H5Pset_all_coll_metadata_ops(fapl_id, true);
VRFY((ret >= 0), "H5Pget_all_coll_metadata_ops succeeded");
fid = H5Fopen(filename, H5F_ACC_RDWR, fapl_id);
- VRFY((fid != H5I_INVALID_HID), "H5Fcreate succeeded");
+ VRFY((fid != H5I_INVALID_HID), "H5Fopen succeeded");
/* verify settings for file access properties */
/* Collective metadata writes */
ret = H5Pget_coll_metadata_write(fapl_id, &is_coll);
VRFY((ret >= 0), "H5Pget_coll_metadata_write succeeded");
- VRFY((is_coll == TRUE), "Incorrect property setting for coll metadata writes");
+ VRFY((is_coll == true), "Incorrect property setting for coll metadata writes");
/* Collective metadata read API calling requirement */
ret = H5Pget_all_coll_metadata_ops(fapl_id, &is_coll);
VRFY((ret >= 0), "H5Pget_all_coll_metadata_ops succeeded");
- VRFY((is_coll == TRUE), "Incorrect property setting for coll metadata API calls requirement");
+ VRFY((is_coll == true), "Incorrect property setting for coll metadata API calls requirement");
/* close fapl and retrieve it from file */
ret = H5Pclose(fapl_id);
@@ -924,12 +924,12 @@ test_file_properties(void)
/* Collective metadata writes */
ret = H5Pget_coll_metadata_write(fapl_id, &is_coll);
VRFY((ret >= 0), "H5Pget_coll_metadata_write succeeded");
- VRFY((is_coll == TRUE), "Incorrect property setting for coll metadata writes");
+ VRFY((is_coll == true), "Incorrect property setting for coll metadata writes");
/* Collective metadata read API calling requirement */
ret = H5Pget_all_coll_metadata_ops(fapl_id, &is_coll);
VRFY((ret >= 0), "H5Pget_all_coll_metadata_ops succeeded");
- VRFY((is_coll == TRUE), "Incorrect property setting for coll metadata API calls requirement");
+ VRFY((is_coll == true), "Incorrect property setting for coll metadata API calls requirement");
/* close file */
ret = H5Fclose(fid);
@@ -980,7 +980,7 @@ test_delete(void)
/* Verify that the file is an HDF5 file */
is_accessible = H5Fis_accessible(filename, fapl_id);
- VRFY((TRUE == is_accessible), "H5Fis_accessible");
+ VRFY((true == is_accessible), "H5Fis_accessible");
/* Delete the file */
ret = H5Fdelete(filename, fapl_id);
@@ -1044,7 +1044,7 @@ test_invalid_libver_bounds_file_close_assert(void)
fcpl_id = H5Pcreate(H5P_FILE_CREATE);
VRFY((fcpl_id != H5I_INVALID_HID), "H5Pcreate");
- ret = H5Pset_file_space_strategy(fcpl_id, H5F_FSPACE_STRATEGY_PAGE, TRUE, 1);
+ ret = H5Pset_file_space_strategy(fcpl_id, H5F_FSPACE_STRATEGY_PAGE, true, 1);
VRFY((SUCCEED == ret), "H5Pset_file_space_strategy");
/* create the file */
diff --git a/testpar/t_file_image.c b/testpar/t_file_image.c
index 471494cb59b..755831b7fd2 100644
--- a/testpar/t_file_image.c
+++ b/testpar/t_file_image.c
@@ -67,17 +67,17 @@ file_image_daisy_chain_test(void)
int space_ndims;
MPI_Status rcvstat;
int *vector_ptr = NULL;
- hid_t fapl_id = -1;
+ hid_t fapl_id = H5I_INVALID_HID;
hid_t file_id; /* file IDs */
- hid_t dset_id = -1;
- hid_t dset_type_id = -1;
- hid_t space_id = -1;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t dset_type_id = H5I_INVALID_HID;
+ hid_t space_id = H5I_INVALID_HID;
herr_t err;
hsize_t dims[1];
void *image_ptr = NULL;
ssize_t bytes_read;
ssize_t image_len;
- hbool_t vector_ok = TRUE;
+ bool vector_ok = true;
htri_t tri_result;
/* set up MPI parameters */
@@ -85,7 +85,7 @@ file_image_daisy_chain_test(void)
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
/* setup file name */
- HDsnprintf(file_name, 1024, "file_image_daisy_chain_test_%05d.h5", (int)mpi_rank);
+ snprintf(file_name, 1024, "file_image_daisy_chain_test_%05d.h5", (int)mpi_rank);
if (mpi_rank == 0) {
@@ -95,7 +95,7 @@ file_image_daisy_chain_test(void)
fapl_id = H5Pcreate(H5P_FILE_ACCESS);
VRFY((fapl_id >= 0), "creating fapl");
- err = H5Pset_fapl_core(fapl_id, (size_t)(64 * 1024), FALSE);
+ err = H5Pset_fapl_core(fapl_id, (size_t)(64 * 1024), false);
VRFY((err >= 0), "setting core file driver in fapl.");
file_id = H5Fcreate(file_name, 0, H5P_DEFAULT, fapl_id);
@@ -184,7 +184,7 @@ file_image_daisy_chain_test(void)
fapl_id = H5Pcreate(H5P_FILE_ACCESS);
VRFY((fapl_id >= 0), "creating fapl");
- err = H5Pset_fapl_core(fapl_id, (size_t)(64 * 1024), FALSE);
+ err = H5Pset_fapl_core(fapl_id, (size_t)(64 * 1024), false);
VRFY((err >= 0), "setting core file driver in fapl.");
err = H5Pset_file_image(fapl_id, image_ptr, (size_t)image_len);
@@ -200,7 +200,7 @@ file_image_daisy_chain_test(void)
VRFY((dset_type_id >= 0), "obtained data set type");
tri_result = H5Tequal(dset_type_id, H5T_NATIVE_INT);
- VRFY((tri_result == TRUE), "verified data set type");
+ VRFY((tri_result == true), "verified data set type");
space_id = H5Dget_space(dset_id);
VRFY((space_id >= 0), "opened data space");
@@ -218,10 +218,10 @@ file_image_daisy_chain_test(void)
err = H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *)vector_ptr);
VRFY((err >= 0), "read received vector.");
- vector_ok = TRUE;
+ vector_ok = true;
for (i = 0; i < mpi_size; i++)
if (vector_ptr[i] != i)
- vector_ok = FALSE;
+ vector_ok = false;
VRFY((vector_ok), "verified received vector.");
free(vector_ptr);
@@ -266,7 +266,7 @@ file_image_daisy_chain_test(void)
fapl_id = H5Pcreate(H5P_FILE_ACCESS);
VRFY((fapl_id >= 0), "creating fapl");
- err = H5Pset_fapl_core(fapl_id, (size_t)(64 * 1024), FALSE);
+ err = H5Pset_fapl_core(fapl_id, (size_t)(64 * 1024), false);
VRFY((err >= 0), "setting core file driver in fapl.");
err = H5Pset_file_image(fapl_id, image_ptr, (size_t)image_len);
@@ -283,7 +283,7 @@ file_image_daisy_chain_test(void)
VRFY((dset_type_id >= 0), "obtained data set type");
tri_result = H5Tequal(dset_type_id, H5T_NATIVE_INT);
- VRFY((tri_result == TRUE), "verified data set type");
+ VRFY((tri_result == true), "verified data set type");
space_id = H5Dget_space(dset_id);
VRFY((space_id >= 0), "opened data space");
@@ -301,15 +301,15 @@ file_image_daisy_chain_test(void)
err = H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *)vector_ptr);
VRFY((err >= 0), "read received vector.");
- vector_ok = TRUE;
+ vector_ok = true;
for (i = 0; i < mpi_size; i++) {
if (i < mpi_rank) {
if (vector_ptr[i] != i)
- vector_ok = FALSE;
+ vector_ok = false;
}
else {
if (vector_ptr[i] != -1)
- vector_ok = FALSE;
+ vector_ok = false;
}
}
VRFY((vector_ok), "verified received vector.");
diff --git a/testpar/t_filter_read.c b/testpar/t_filter_read.c
index 6d19b76ed34..01695abab1c 100644
--- a/testpar/t_filter_read.c
+++ b/testpar/t_filter_read.c
@@ -145,7 +145,7 @@ filter_read_internal(const char *filename, hid_t dcpl, hsize_t *dset_size)
(unsigned long)(hs_offset[1] + j));
fprintf(stderr, " At original: %d\n", (int)points[i * size[1] + (size_t)hs_offset[1] + j]);
fprintf(stderr, " At returned: %d\n", (int)check[i * hs_size[1] + j]);
- VRFY(FALSE, "");
+ VRFY(false, "");
}
}
}
diff --git a/testpar/t_filters_parallel.c b/testpar/t_filters_parallel.c
index bfe306c76be..198201abf7b 100644
--- a/testpar/t_filters_parallel.c
+++ b/testpar/t_filters_parallel.c
@@ -19,26 +19,22 @@
#include "t_filters_parallel.h"
static const char *FILENAME[] = {"t_filters_parallel", NULL};
-char filenames[1][256];
+static char filenames[1][256];
-static MPI_Comm comm = MPI_COMM_WORLD;
-static MPI_Info info = MPI_INFO_NULL;
-static int mpi_rank;
-static int mpi_size;
+static MPI_Comm comm = MPI_COMM_WORLD;
+static MPI_Info info = MPI_INFO_NULL;
+static int mpi_rank = 0;
+static int mpi_size = 0;
int nerrors = 0;
/* Arrays of filter ID values and filter names (should match each other) */
-H5Z_filter_t filterIDs[] = {
+static H5Z_filter_t filterIDs[] = {
H5Z_FILTER_DEFLATE, H5Z_FILTER_SHUFFLE, H5Z_FILTER_FLETCHER32,
H5Z_FILTER_SZIP, H5Z_FILTER_NBIT, H5Z_FILTER_SCALEOFFSET,
};
-const char *filterNames[] = {"Deflate", "Shuffle", "Fletcher32", "SZIP", "Nbit", "ScaleOffset"};
-
-/* Function pointer typedef for test functions */
-typedef void (*test_func)(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id, hid_t dcpl_id,
- hid_t dxpl_id);
+static const char *filterNames[] = {"Deflate", "Shuffle", "Fletcher32", "SZIP", "Nbit", "ScaleOffset"};
/* Typedef for filter arguments for user-defined filters */
typedef struct filter_options_t {
@@ -47,6 +43,15 @@ typedef struct filter_options_t {
const unsigned int cd_values[];
} filter_options_t;
+/* Enum for running these tests in different modes */
+typedef enum test_mode_t {
+ USE_SINGLE_DATASET, /* Operate on a single dataset with H5Dwrite/read */
+ USE_MULTIPLE_DATASETS, /* Operate on multiple datasets with H5Dwrite_multi/read_multi */
+ USE_MULTIPLE_DATASETS_MIXED_FILTERED, /* Operate on multiple datasets with H5Dwrite_multi/read_multi
+ and with some of the datasets being unfiltered */
+ TEST_MODE_SENTINEL
+} test_mode_t;
+
/*
* Enum for verify_space_alloc_status which specifies
* how many chunks have been written to in a dataset
@@ -58,102 +63,160 @@ typedef enum num_chunks_written_t {
ALL_CHUNKS_WRITTEN
} num_chunks_written_t;
-static herr_t set_dcpl_filter(hid_t dcpl_id, H5Z_filter_t filter_id, filter_options_t *filter_options);
-static herr_t verify_space_alloc_status(hid_t dset_id, hid_t dcpl_id, num_chunks_written_t chunks_written);
+/* Function pointer typedef for test functions */
+typedef void (*test_func)(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id, hid_t dcpl_id,
+ hid_t dxpl_id, test_mode_t test_mode);
+
+static herr_t set_dcpl_filter(hid_t dcpl_id, H5Z_filter_t filter_id, filter_options_t *filter_options);
+static void verify_space_alloc_status(size_t num_dsets, hid_t *dset_ids, hid_t dcpl_id,
+ num_chunks_written_t chunks_written);
+static void verify_chunk_opt_status(size_t num_dsets, hid_t dxpl_id);
+static const char *test_mode_to_string(test_mode_t test_mode);
+
+static void create_datasets(hid_t parent_obj_id, const char *dset_name, hid_t type_id, hid_t filespace_id,
+ hid_t dcpl_id, test_mode_t test_mode, size_t *num_dsets, hid_t *dset_ids);
+static void open_datasets(hid_t parent_obj_id, const char *dset_name, size_t num_dsets, test_mode_t test_mode,
+ hid_t *dset_ids);
+static void write_datasets(size_t num_dsets, hid_t *dset_ids, hid_t type_id, hid_t mspace_id,
+ hid_t *fspace_ids, hid_t dxpl_id, const void **bufs, test_mode_t test_mode);
+static void read_datasets(size_t num_dsets, hid_t *dset_ids, hid_t type_id, hid_t mspace_id, hid_t fspace_id,
+ hid_t dxpl_id, void **bufs, test_mode_t test_mode);
+
+static void select_hyperslab(size_t num_dsets, hid_t *dset_ids, hsize_t *start, hsize_t *stride,
+ hsize_t *count, hsize_t *block, hid_t *fspace_ids);
+static void select_all(size_t num_dsets, hid_t *dset_ids, hid_t *fspace_ids);
+static void select_none(size_t num_dsets, hid_t *dset_ids, hid_t *fspace_ids);
+static void select_elements(size_t num_dsets, hid_t *dset_ids, size_t num_points, hsize_t *coords,
+ hid_t *fspace_ids);
#ifdef H5_HAVE_PARALLEL_FILTERED_WRITES
/* Tests for writing data in parallel */
static void test_write_one_chunk_filtered_dataset(const char *parent_group, H5Z_filter_t filter_id,
- hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id);
+ hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode);
static void test_write_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t filter_id,
- hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id);
+ hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode);
static void test_write_filtered_dataset_no_overlap_partial(const char *parent_group, H5Z_filter_t filter_id,
- hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id);
+ hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode);
static void test_write_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filter_id,
- hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id);
+ hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode);
static void test_write_filtered_dataset_single_unlim_dim_no_overlap(const char *parent_group,
H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id);
+ hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode);
static void test_write_filtered_dataset_single_unlim_dim_overlap(const char *parent_group,
H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id);
+ hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode);
static void test_write_filtered_dataset_multi_unlim_dim_no_overlap(const char *parent_group,
H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id);
+ hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode);
static void test_write_filtered_dataset_multi_unlim_dim_overlap(const char *parent_group,
H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id);
+ hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode);
static void test_write_filtered_dataset_single_no_selection(const char *parent_group, H5Z_filter_t filter_id,
- hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id);
+ hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode);
static void test_write_filtered_dataset_all_no_selection(const char *parent_group, H5Z_filter_t filter_id,
- hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id);
+ hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode);
static void test_write_filtered_dataset_point_selection(const char *parent_group, H5Z_filter_t filter_id,
- hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id);
+ hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode);
static void test_write_filtered_dataset_interleaved_write(const char *parent_group, H5Z_filter_t filter_id,
- hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id);
+ hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode);
static void test_write_transformed_filtered_dataset_no_overlap(const char *parent_group,
H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id);
+ hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode);
static void test_write_3d_filtered_dataset_no_overlap_separate_pages(const char *parent_group,
H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id);
+ hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode);
static void test_write_3d_filtered_dataset_no_overlap_same_pages(const char *parent_group,
H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id);
+ hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode);
static void test_write_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filter_id,
- hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id);
+ hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode);
static void test_write_cmpd_filtered_dataset_no_conversion_unshared(const char *parent_group,
H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id);
+ hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode);
static void test_write_cmpd_filtered_dataset_no_conversion_shared(const char *parent_group,
H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id);
+ hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode);
static void test_write_cmpd_filtered_dataset_type_conversion_unshared(const char *parent_group,
H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id);
+ hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode);
static void test_write_cmpd_filtered_dataset_type_conversion_shared(const char *parent_group,
H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id);
+ hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode);
#endif
/* Tests for reading data in parallel */
static void test_read_one_chunk_filtered_dataset(const char *parent_group, H5Z_filter_t filter_id,
- hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id);
+ hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode);
static void test_read_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t filter_id,
- hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id);
+ hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode);
static void test_read_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filter_id,
- hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id);
+ hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode);
static void test_read_filtered_dataset_single_no_selection(const char *parent_group, H5Z_filter_t filter_id,
- hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id);
+ hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode);
static void test_read_filtered_dataset_all_no_selection(const char *parent_group, H5Z_filter_t filter_id,
- hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id);
+ hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode);
static void test_read_filtered_dataset_point_selection(const char *parent_group, H5Z_filter_t filter_id,
- hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id);
+ hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode);
static void test_read_filtered_dataset_interleaved_read(const char *parent_group, H5Z_filter_t filter_id,
- hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id);
+ hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode);
static void test_read_transformed_filtered_dataset_no_overlap(const char *parent_group,
H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id);
+ hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode);
static void test_read_3d_filtered_dataset_no_overlap_separate_pages(const char *parent_group,
H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id);
+ hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode);
static void test_read_3d_filtered_dataset_no_overlap_same_pages(const char *parent_group,
H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id);
+ hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode);
static void test_read_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filter_id,
- hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id);
+ hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode);
static void test_read_cmpd_filtered_dataset_no_conversion_unshared(const char *parent_group,
H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id);
+ hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode);
static void test_read_cmpd_filtered_dataset_no_conversion_shared(const char *parent_group,
H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id);
+ hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode);
static void test_read_cmpd_filtered_dataset_type_conversion_unshared(const char *parent_group,
H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id);
+ hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode);
static void test_read_cmpd_filtered_dataset_type_conversion_shared(const char *parent_group,
H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id);
+ hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode);
/*
* Tests for attempting to round-trip the data going from
@@ -165,27 +228,25 @@ static void test_read_cmpd_filtered_dataset_type_conversion_shared(const char *
* written in parallel -> read serially
*/
static void test_write_serial_read_parallel(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id);
+ hid_t dcpl_id, hid_t dxpl_id, test_mode_t test_mode);
#ifdef H5_HAVE_PARALLEL_FILTERED_WRITES
static void test_write_parallel_read_serial(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id);
+ hid_t dcpl_id, hid_t dxpl_id, test_mode_t test_mode);
/* Other miscellaneous tests */
static void test_shrinking_growing_chunks(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id);
+ hid_t dcpl_id, hid_t dxpl_id, test_mode_t test_mode);
static void test_edge_chunks_no_overlap(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id);
+ hid_t dcpl_id, hid_t dxpl_id, test_mode_t test_mode);
static void test_edge_chunks_overlap(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id);
-static void test_edge_chunks_partial_write(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id);
+ hid_t dcpl_id, hid_t dxpl_id, test_mode_t test_mode);
static void test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id, hid_t dcpl_id,
- hid_t dxpl_id);
+ hid_t dxpl_id, test_mode_t test_mode);
static void test_fill_value_undefined(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id);
+ hid_t dcpl_id, hid_t dxpl_id, test_mode_t test_mode);
static void test_fill_time_never(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id);
+ hid_t dcpl_id, hid_t dxpl_id, test_mode_t test_mode);
#endif
static test_func tests[] = {
@@ -232,7 +293,6 @@ static test_func tests[] = {
test_shrinking_growing_chunks,
test_edge_chunks_no_overlap,
test_edge_chunks_overlap,
- test_edge_chunks_partial_write,
test_fill_values,
test_fill_value_undefined,
test_fill_time_never,
@@ -259,11 +319,12 @@ set_dcpl_filter(hid_t dcpl_id, H5Z_filter_t filter_id, filter_options_t *filter_
case H5Z_FILTER_SZIP: {
unsigned pixels_per_block = H5_SZIP_MAX_PIXELS_PER_BLOCK;
hsize_t chunk_dims[H5S_MAX_RANK] = {0};
- size_t i, chunk_nelemts;
+ size_t chunk_nelemts;
VRFY(H5Pget_chunk(dcpl_id, H5S_MAX_RANK, chunk_dims) >= 0, "H5Pget_chunk succeeded");
- for (i = 0, chunk_nelemts = 1; i < H5S_MAX_RANK; i++)
+ chunk_nelemts = 1;
+ for (size_t i = 0; i < H5S_MAX_RANK; i++)
if (chunk_dims[i] > 0)
chunk_nelemts *= chunk_dims[i];
@@ -305,26 +366,37 @@ set_dcpl_filter(hid_t dcpl_id, H5Z_filter_t filter_id, filter_options_t *filter_
* based on the dataset's allocation time setting and how many chunks
* in the dataset have been written to.
*/
-static herr_t
-verify_space_alloc_status(hid_t dset_id, hid_t dcpl_id, num_chunks_written_t chunks_written)
+static void
+verify_space_alloc_status(size_t num_dsets, hid_t *dset_ids, hid_t dcpl_id,
+ num_chunks_written_t chunks_written)
{
- int nfilters;
- herr_t ret_value = SUCCEED;
+ H5D_space_status_t space_status;
+ H5D_alloc_time_t alloc_time;
- VRFY(((nfilters = H5Pget_nfilters(dcpl_id)) >= 0), "H5Pget_nfilters succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ hid_t dset_dcpl;
+ int nfilters;
- /*
- * Only verify space allocation status when there are filters
- * in the dataset's filter pipeline. When filters aren't in the
- * pipeline, the space allocation time and status can vary based
- * on whether the file was created in parallel or serial mode.
- */
- if (nfilters > 0) {
- H5D_space_status_t space_status;
- H5D_alloc_time_t alloc_time;
+ /* Check if this particular dataset has any filters applied */
+ dset_dcpl = H5Dget_create_plist(dset_ids[dset_idx]);
+ VRFY((dset_dcpl >= 0), "H5Dget_create_plist");
+
+ nfilters = H5Pget_nfilters(dset_dcpl);
+ VRFY((nfilters >= 0), "H5Pget_nfilters");
+
+ VRFY((H5Pclose(dset_dcpl) >= 0), "H5Pclose");
+
+ /*
+ * Only verify space allocation status when there are filters
+ * in the dataset's filter pipeline. When filters aren't in the
+ * pipeline, the space allocation time and status can vary based
+ * on whether the file was created in parallel or serial mode.
+ */
+ if (nfilters == 0)
+ return;
VRFY((H5Pget_alloc_time(dcpl_id, &alloc_time) >= 0), "H5Pget_alloc_time succeeded");
- VRFY((H5Dget_space_status(dset_id, &space_status) >= 0), "H5Dget_space_status succeeded");
+ VRFY((H5Dget_space_status(dset_ids[dset_idx], &space_status) >= 0), "H5Dget_space_status succeeded");
switch (alloc_time) {
case H5D_ALLOC_TIME_EARLY:
@@ -347,7 +419,7 @@ verify_space_alloc_status(hid_t dset_id, hid_t dcpl_id, num_chunks_written_t chu
VRFY((space_status == H5D_SPACE_STATUS_ALLOCATED) ||
(space_status == H5D_SPACE_STATUS_PART_ALLOCATED),
"verified space allocation status");
- else if (chunks_written == NO_CHUNKS_WRITTEN)
+ else if (chunks_written == NO_CHUNKS_WRITTEN) {
/*
* A special case where we wrote to a dataset that
* uses late space allocation, but the write was
@@ -358,6 +430,7 @@ verify_space_alloc_status(hid_t dset_id, hid_t dcpl_id, num_chunks_written_t chu
* been allocated.
*/
VRFY(space_status == H5D_SPACE_STATUS_ALLOCATED, "verified space allocation status");
+ }
else
VRFY(space_status == H5D_SPACE_STATUS_NOT_ALLOCATED, "verified space allocation status");
break;
@@ -385,8 +458,388 @@ verify_space_alloc_status(hid_t dset_id, hid_t dcpl_id, num_chunks_written_t chu
MPI_Abort(MPI_COMM_WORLD, 1);
}
}
+}
+
+/*
+ * Function to verify the status of the chunk I/O optimization method
+ * used when the multi-dataset I/O API routines were used. As long as
+ * multi-dataset I/O was actually performed, the library should return
+ * that linked-chunk I/O was performed. Otherwise, if datasets were
+ * processed one at a time, the library should return that multi-chunk
+ * I/O was performed.
+ */
+static void
+verify_chunk_opt_status(size_t num_dsets, hid_t dxpl_id)
+{
+ H5D_mpio_actual_chunk_opt_mode_t chunk_opt_mode;
+ H5D_selection_io_mode_t sel_io_mode;
+ uint32_t no_sel_io_cause = 0;
+ herr_t ret;
+
+ if (H5P_DEFAULT != dxpl_id) {
+ ret = H5Pget_mpio_actual_chunk_opt_mode(dxpl_id, &chunk_opt_mode);
+ VRFY((ret >= 0), "H5Pget_mpio_actual_chunk_opt_mode succeeded");
+
+ ret = H5Pget_selection_io(dxpl_id, &sel_io_mode);
+ VRFY((ret >= 0), "H5Pget_selection_io succeeded");
+
+ if (sel_io_mode == H5D_SELECTION_IO_MODE_DEFAULT || sel_io_mode == H5D_SELECTION_IO_MODE_ON) {
+ ret = H5Pget_no_selection_io_cause(dxpl_id, &no_sel_io_cause);
+ VRFY((ret >= 0), "H5Pget_no_selection_io_cause succeeded");
+ }
+
+ if (num_dsets == 0) {
+ /*
+ * num_dsets == 0 implies that the write call was expected to
+ * failed and did so. Verify that the library returns
+ * H5D_MPIO_NO_CHUNK_OPTIMIZATION as the chunk I/O optimization
+ * method
+ */
+ VRFY((H5D_MPIO_NO_CHUNK_OPTIMIZATION == chunk_opt_mode),
+ "verified I/O optimization was H5D_MPIO_NO_CHUNK_OPTIMIZATION");
+ }
+ else if (num_dsets == 1) {
+ /*
+ * If selection I/O is set to ON and was actually performed, just
+ * verify that the library returns that either linked-chunk or
+ * multi-chunk I/O was performed. Otherwise, any of the optimization
+ * methods could potentially be returned by the library.
+ */
+ if ((sel_io_mode == H5D_SELECTION_IO_MODE_DEFAULT || sel_io_mode == H5D_SELECTION_IO_MODE_ON) &&
+ !no_sel_io_cause) {
+ VRFY((H5D_MPIO_NO_CHUNK_OPTIMIZATION != chunk_opt_mode),
+ "verified I/O optimization wasn't H5D_MPIO_NO_CHUNK_OPTIMIZATION");
+ VRFY((H5D_MPIO_LINK_CHUNK == chunk_opt_mode || H5D_MPIO_MULTI_CHUNK == chunk_opt_mode),
+ "verified I/O optimization was linked-chunk I/O or multi-chunk I/O");
+ }
+ }
+ else {
+ /*
+ * If selection I/O is set to ON and was actually performed, verify
+ * that the library returns that linked-chunk I/O was performed.
+ * Otherwise, any of the optimization methods could potentially be
+ * returned by the library.
+ */
+ if ((sel_io_mode == H5D_SELECTION_IO_MODE_DEFAULT || sel_io_mode == H5D_SELECTION_IO_MODE_ON) &&
+ !no_sel_io_cause) {
+ VRFY((H5D_MPIO_LINK_CHUNK == chunk_opt_mode),
+ "verified I/O optimization was linked-chunk I/O");
+ }
+ }
+ }
+}
+
+static const char *
+test_mode_to_string(test_mode_t test_mode)
+{
+ switch (test_mode) {
+ case USE_SINGLE_DATASET:
+ return "USE_SINGLE_DATASET";
+ case USE_MULTIPLE_DATASETS:
+ return "USE_MULTIPLE_DATASETS";
+ case USE_MULTIPLE_DATASETS_MIXED_FILTERED:
+ return "USE_MULTIPLE_DATASETS_MIXED_FILTERED";
+ case TEST_MODE_SENTINEL:
+ default:
+ return "INVALID";
+ }
+}
+
+/*
+ * Utility routine to create the datasets for each test,
+ * after adjusting for the current test mode
+ */
+static void
+create_datasets(hid_t parent_obj_id, const char *dset_name, hid_t type_id, hid_t filespace_id, hid_t dcpl_id,
+ test_mode_t test_mode, size_t *num_dsets, hid_t *dset_ids)
+{
+ const char *dset_name_ptr = NULL;
+ hid_t unfiltered_dcpl = H5I_INVALID_HID;
+ char dset_name_multi_buf[512];
+ int n_dsets = 0;
+ int n_unfiltered = 0;
+
+ VRFY((num_dsets != NULL), "verify num_dsets");
+ VRFY((dset_ids != NULL), "verify dset_ids");
+
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++)
+ dset_ids[dset_idx] = H5I_INVALID_HID;
+
+ switch (test_mode) {
+ case USE_SINGLE_DATASET:
+ dset_name_ptr = dset_name;
+ n_dsets = 1;
+ break;
+
+ case USE_MULTIPLE_DATASETS:
+ case USE_MULTIPLE_DATASETS_MIXED_FILTERED:
+ dset_name_ptr = dset_name_multi_buf;
+ n_dsets = (rand() % (MAX_NUM_DSETS_MULTI - 1)) + 2;
+
+ /* Select between 1 and (n_dsets - 1) datasets to NOT be filtered */
+ if (test_mode == USE_MULTIPLE_DATASETS_MIXED_FILTERED) {
+ n_unfiltered = (rand() % (n_dsets - 1)) + 1;
+
+ unfiltered_dcpl = H5Pcopy(dcpl_id);
+ VRFY((unfiltered_dcpl >= 0), "H5Pcopy succeeded");
+
+ VRFY((H5Premove_filter(unfiltered_dcpl, H5Z_FILTER_ALL) >= 0), "H5Premove_filter succeeded");
+ }
+ break;
+
+ case TEST_MODE_SENTINEL:
+ default:
+ if (MAINPROCESS)
+ printf("Invalid test mode\n");
+ fflush(stdout);
+ MPI_Abort(MPI_COMM_WORLD, -1);
+ }
+
+ for (size_t dset_idx = 0; dset_idx < (size_t)n_dsets; dset_idx++) {
+ hid_t curr_dcpl = dcpl_id;
+
+ /* Add suffix to dataset name for multi-dataset tests */
+ if (test_mode == USE_MULTIPLE_DATASETS || test_mode == USE_MULTIPLE_DATASETS_MIXED_FILTERED)
+ snprintf(dset_name_multi_buf, 512, "%s_%d", dset_name, (int)dset_idx);
+
+ /* Determine if this should be an unfiltered dataset */
+ if ((test_mode == USE_MULTIPLE_DATASETS_MIXED_FILTERED) && (n_unfiltered > 0)) {
+ size_t dsets_left = (size_t)n_dsets - dset_idx;
+ bool unfiltered;
+
+ /*
+ * The number of unfiltered datasets should never be
+ * greater than the number of datasets left to create
+ */
+ VRFY(((size_t)n_unfiltered <= dsets_left), "number of unfiltered datasets sanity check");
+
+ /*
+ * If the number of unfiltered datasets left is the
+ * same as the number of datasets left, create the
+ * remaining datasets as unfiltered datasets. Otherwise,
+ * randomly determine if a dataset will be unfiltered.
+ */
+ unfiltered = ((size_t)n_unfiltered == dsets_left) || ((rand() % 2) == 0);
+
+ if (unfiltered) {
+ curr_dcpl = unfiltered_dcpl;
+ n_unfiltered--;
+ }
+ }
+
+ dset_ids[dset_idx] = H5Dcreate2(parent_obj_id, dset_name_ptr, type_id, filespace_id, H5P_DEFAULT,
+ curr_dcpl, H5P_DEFAULT);
+
+ VRFY((dset_ids[dset_idx] >= 0), "Dataset creation succeeded");
+ }
+
+ if (unfiltered_dcpl >= 0)
+ VRFY((H5Pclose(unfiltered_dcpl) >= 0), "H5Pclose succeeded");
+
+ *num_dsets = (size_t)n_dsets;
+}
+
+/*
+ * Utility routine to open the datasets that were created
+ * for each test, after adjusting for the current test mode
+ */
+static void
+open_datasets(hid_t parent_obj_id, const char *dset_name, size_t num_dsets, test_mode_t test_mode,
+ hid_t *dset_ids)
+{
+ const char *dset_name_ptr = NULL;
+ char dset_name_multi_buf[512];
+
+ VRFY((dset_ids != NULL), "verify dset_ids");
+ VRFY((num_dsets <= INT_MAX), "verify num_dsets value");
+
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++)
+ dset_ids[dset_idx] = H5I_INVALID_HID;
+
+ switch (test_mode) {
+ case USE_SINGLE_DATASET:
+ dset_name_ptr = dset_name;
+ break;
+
+ case USE_MULTIPLE_DATASETS:
+ case USE_MULTIPLE_DATASETS_MIXED_FILTERED:
+ dset_name_ptr = dset_name_multi_buf;
+ break;
+
+ case TEST_MODE_SENTINEL:
+ default:
+ if (MAINPROCESS)
+ printf("Invalid test mode\n");
+ fflush(stdout);
+ MPI_Abort(MPI_COMM_WORLD, -1);
+ }
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ /* Add suffix to dataset name for multi-dataset tests */
+ if (test_mode == USE_MULTIPLE_DATASETS || test_mode == USE_MULTIPLE_DATASETS_MIXED_FILTERED)
+ snprintf(dset_name_multi_buf, 512, "%s_%d", dset_name, (int)dset_idx);
+
+ dset_ids[dset_idx] = H5Dopen2(parent_obj_id, dset_name_ptr, H5P_DEFAULT);
+
+ VRFY((dset_ids[dset_idx] >= 0), "Dataset open succeeded");
+ }
+}
+
+/*
+ * Utility routine to write to the datasets that were created
+ * for each test, after adjusting for the current test mode
+ */
+static void
+write_datasets(size_t num_dsets, hid_t *dset_ids, hid_t type_id, hid_t mspace_id, hid_t *fspace_ids,
+ hid_t dxpl_id, const void **bufs, test_mode_t test_mode)
+{
+ hid_t mem_type_ids[MAX_NUM_DSETS_MULTI];
+ hid_t mem_space_ids[MAX_NUM_DSETS_MULTI];
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ mem_type_ids[dset_idx] = type_id;
+ mem_space_ids[dset_idx] = mspace_id;
+ }
+
+ switch (test_mode) {
+ case USE_SINGLE_DATASET:
+ VRFY((H5Dwrite(dset_ids[0], type_id, mspace_id, fspace_ids[0], dxpl_id, bufs[0]) >= 0),
+ "Dataset write succeeded");
+ break;
+
+ case USE_MULTIPLE_DATASETS:
+ case USE_MULTIPLE_DATASETS_MIXED_FILTERED:
+ VRFY((H5Dwrite_multi(num_dsets, dset_ids, mem_type_ids, mem_space_ids, fspace_ids, dxpl_id,
+ bufs) >= 0),
+ "Dataset write succeeded");
+ break;
+
+ case TEST_MODE_SENTINEL:
+ default:
+ if (MAINPROCESS)
+ printf("Invalid test mode\n");
+ fflush(stdout);
+ MPI_Abort(MPI_COMM_WORLD, -1);
+ }
+
+ verify_chunk_opt_status(num_dsets, dxpl_id);
+}
+
+/*
+ * Utility routine to read from the datasets that were created
+ * for each test, after adjusting for the current test mode
+ */
+static void
+read_datasets(size_t num_dsets, hid_t *dset_ids, hid_t type_id, hid_t mspace_id, hid_t fspace_id,
+ hid_t dxpl_id, void **bufs, test_mode_t test_mode)
+{
+ hid_t mem_type_ids[MAX_NUM_DSETS_MULTI];
+ hid_t mem_space_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_space_ids[MAX_NUM_DSETS_MULTI];
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ mem_type_ids[dset_idx] = type_id;
+ mem_space_ids[dset_idx] = mspace_id;
+ file_space_ids[dset_idx] = fspace_id;
+ }
+
+ switch (test_mode) {
+ case USE_SINGLE_DATASET:
+ VRFY((H5Dread(dset_ids[0], type_id, mspace_id, fspace_id, dxpl_id, bufs[0]) >= 0),
+ "Dataset read succeeded");
+ break;
+
+ case USE_MULTIPLE_DATASETS:
+ case USE_MULTIPLE_DATASETS_MIXED_FILTERED:
+ VRFY((H5Dread_multi(num_dsets, dset_ids, mem_type_ids, mem_space_ids, file_space_ids, dxpl_id,
+ bufs) >= 0),
+ "Dataset read succeeded");
+ break;
+
+ case TEST_MODE_SENTINEL:
+ default:
+ if (MAINPROCESS)
+ printf("Invalid test mode\n");
+ fflush(stdout);
+ MPI_Abort(MPI_COMM_WORLD, -1);
+ }
+
+ verify_chunk_opt_status(num_dsets, dxpl_id);
+}
+
+static void
+select_hyperslab(size_t num_dsets, hid_t *dset_ids, hsize_t *start, hsize_t *stride, hsize_t *count,
+ hsize_t *block, hid_t *fspace_ids)
+{
+ VRFY((fspace_ids != NULL), "verify fspace_ids");
+
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++)
+ fspace_ids[dset_idx] = H5I_INVALID_HID;
+
+ if (VERBOSE_MED) {
+ printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
+ ", %" PRIuHSIZE " ]\n",
+ mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
+ fflush(stdout);
+ }
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ fspace_ids[dset_idx] = H5Dget_space(dset_ids[dset_idx]);
+ VRFY((fspace_ids[dset_idx] >= 0), "File dataspace retrieval succeeded");
+
+ VRFY((H5Sselect_hyperslab(fspace_ids[dset_idx], H5S_SELECT_SET, start, stride, count, block) >= 0),
+ "Hyperslab selection succeeded");
+ }
+}
+
+static void
+select_all(size_t num_dsets, hid_t *dset_ids, hid_t *fspace_ids)
+{
+ VRFY((fspace_ids != NULL), "verify fspace_ids");
+
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++)
+ fspace_ids[dset_idx] = H5I_INVALID_HID;
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ fspace_ids[dset_idx] = H5Dget_space(dset_ids[dset_idx]);
+ VRFY((fspace_ids[dset_idx] >= 0), "File dataspace retrieval succeeded");
+
+ VRFY((H5Sselect_all(fspace_ids[dset_idx]) >= 0), "H5Sselect_all succeeded");
+ }
+}
+
+static void
+select_none(size_t num_dsets, hid_t *dset_ids, hid_t *fspace_ids)
+{
+ VRFY((fspace_ids != NULL), "verify fspace_ids");
+
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++)
+ fspace_ids[dset_idx] = H5I_INVALID_HID;
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ fspace_ids[dset_idx] = H5Dget_space(dset_ids[dset_idx]);
+ VRFY((fspace_ids[dset_idx] >= 0), "File dataspace retrieval succeeded");
+
+ VRFY((H5Sselect_none(fspace_ids[dset_idx]) >= 0), "H5Sselect_none succeeded");
+ }
+}
+
+static void
+select_elements(size_t num_dsets, hid_t *dset_ids, size_t num_points, hsize_t *coords, hid_t *fspace_ids)
+{
+ VRFY((fspace_ids != NULL), "verify fspace_ids");
- return ret_value;
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++)
+ fspace_ids[dset_idx] = H5I_INVALID_HID;
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ fspace_ids[dset_idx] = H5Dget_space(dset_ids[dset_idx]);
+ VRFY((fspace_ids[dset_idx] >= 0), "File dataspace retrieval succeeded");
+
+ VRFY((H5Sselect_elements(fspace_ids[dset_idx], H5S_SELECT_SET, num_points, coords) >= 0),
+ "Point selection succeeded");
+ }
}
#ifdef H5_HAVE_PARALLEL_FILTERED_WRITES
@@ -397,11 +850,12 @@ verify_space_alloc_status(hid_t dset_id, hid_t dcpl_id, num_chunks_written_t chu
*/
static void
test_write_one_chunk_filtered_dataset(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id)
+ hid_t dcpl_id, hid_t dxpl_id, test_mode_t test_mode)
{
- C_DATATYPE *data = NULL;
- C_DATATYPE *read_buf = NULL;
- C_DATATYPE *correct_buf = NULL;
+ C_DATATYPE *correct_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
hsize_t dataset_dims[WRITE_ONE_CHUNK_FILTERED_DATASET_DIMS];
hsize_t chunk_dims[WRITE_ONE_CHUNK_FILTERED_DATASET_DIMS];
hsize_t sel_dims[WRITE_ONE_CHUNK_FILTERED_DATASET_DIMS];
@@ -409,13 +863,16 @@ test_write_one_chunk_filtered_dataset(const char *parent_group, H5Z_filter_t fil
hsize_t stride[WRITE_ONE_CHUNK_FILTERED_DATASET_DIMS];
hsize_t count[WRITE_ONE_CHUNK_FILTERED_DATASET_DIMS];
hsize_t block[WRITE_ONE_CHUNK_FILTERED_DATASET_DIMS];
- size_t i, data_size, correct_buf_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ size_t data_size, correct_buf_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
hid_t group_id = H5I_INVALID_HID;
- hid_t filespace = H5I_INVALID_HID, memspace = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
if (MAINPROCESS)
- HDputs("Testing write to one-chunk filtered dataset");
+ puts("Testing write to one-chunk filtered dataset");
file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");
@@ -434,9 +891,6 @@ test_write_one_chunk_filtered_dataset(const char *parent_group, H5Z_filter_t fil
filespace = H5Screate_simple(WRITE_ONE_CHUNK_FILTERED_DATASET_DIMS, dataset_dims, NULL);
VRFY((filespace >= 0), "File dataspace creation succeeded");
- memspace = H5Screate_simple(WRITE_ONE_CHUNK_FILTERED_DATASET_DIMS, sel_dims, NULL);
- VRFY((memspace >= 0), "Memory dataspace creation succeeded");
-
/* Create chunked dataset */
plist_id = H5Pcopy(dcpl_id);
VRFY((plist_id >= 0), "DCPL copy succeeded");
@@ -446,12 +900,12 @@ test_write_one_chunk_filtered_dataset(const char *parent_group, H5Z_filter_t fil
/* Add test filter to the pipeline */
VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
- dset_id = H5Dcreate2(group_id, WRITE_ONE_CHUNK_FILTERED_DATASET_NAME, HDF5_DATATYPE_NAME, filespace,
- H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, WRITE_ONE_CHUNK_FILTERED_DATASET_NAME, HDF5_DATATYPE_NAME, filespace, plist_id,
+ test_mode, &num_dsets, dset_ids);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -467,73 +921,73 @@ test_write_one_chunk_filtered_dataset(const char *parent_group, H5Z_filter_t fil
start[0] = ((hsize_t)mpi_rank * sel_dims[0]);
start[1] = 0;
- if (VERBOSE_MED) {
- printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- fflush(stdout);
- }
-
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
-
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
/* Fill data buffer */
data_size = (hsize_t)WRITE_ONE_CHUNK_FILTERED_DATASET_CH_NROWS *
- (hsize_t)WRITE_ONE_CHUNK_FILTERED_DATASET_NCOLS * sizeof(*data);
- correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf);
+ (hsize_t)WRITE_ONE_CHUNK_FILTERED_DATASET_NCOLS * sizeof(C_DATATYPE);
- data = (C_DATATYPE *)calloc(1, data_size);
- VRFY((NULL != data), "calloc succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ C_DATATYPE *tmp_buf = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
- correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "calloc succeeded");
+ for (size_t j = 0; j < data_size / sizeof(C_DATATYPE); j++)
+ tmp_buf[j] = (C_DATATYPE)(GEN_DATA(j) + dset_idx);
- for (i = 0; i < data_size / sizeof(*data); i++)
- data[i] = (C_DATATYPE)GEN_DATA(i);
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
+ }
- for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++)
- correct_buf[i] = ((C_DATATYPE)i % (WRITE_ONE_CHUNK_FILTERED_DATASET_CH_NROWS / mpi_size *
- WRITE_ONE_CHUNK_FILTERED_DATASET_CH_NCOLS)) +
- ((C_DATATYPE)i / (WRITE_ONE_CHUNK_FILTERED_DATASET_CH_NROWS / mpi_size *
- WRITE_ONE_CHUNK_FILTERED_DATASET_CH_NCOLS));
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids, dxpl_id, data_bufs,
+ test_mode);
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, data) >= 0),
- "Dataset write succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ free(data_bufs_nc[dset_idx]);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, ALL_CHUNKS_WRITTEN);
- if (data)
- free(data);
+ /* Close and re-open datasets */
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
+ open_datasets(group_id, WRITE_ONE_CHUNK_FILTERED_DATASET_NAME, num_dsets, test_mode, dset_ids);
/* Verify the correct data was written */
- read_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != read_buf), "calloc succeeded");
+ correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(C_DATATYPE);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ correct_bufs[dset_idx] = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_bufs[dset_idx]), "calloc succeeded");
+ read_bufs[dset_idx] = calloc(1, correct_buf_size);
+ VRFY((NULL != read_bufs[dset_idx]), "calloc succeeded");
+
+ for (size_t j = 0; j < correct_buf_size / sizeof(C_DATATYPE); j++)
+ correct_bufs[dset_idx][j] =
+ ((C_DATATYPE)j % (WRITE_ONE_CHUNK_FILTERED_DATASET_CH_NROWS / mpi_size *
+ WRITE_ONE_CHUNK_FILTERED_DATASET_CH_NCOLS)) +
+ ((C_DATATYPE)j / (WRITE_ONE_CHUNK_FILTERED_DATASET_CH_NROWS / mpi_size *
+ WRITE_ONE_CHUNK_FILTERED_DATASET_CH_NCOLS)) +
+ (C_DATATYPE)dset_idx;
+ }
- dset_id = H5Dopen2(group_id, WRITE_ONE_CHUNK_FILTERED_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_bufs, test_mode);
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((0 == memcmp(read_bufs[dset_idx], correct_bufs[dset_idx], correct_buf_size)),
+ "Data verification succeeded");
- VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ free(read_bufs[dset_idx]);
+ free(correct_bufs[dset_idx]);
+ }
- if (correct_buf)
- free(correct_buf);
- if (read_buf)
- free(read_buf);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
- VRFY((H5Sclose(memspace) >= 0), "Memory dataspace close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -549,11 +1003,12 @@ test_write_one_chunk_filtered_dataset(const char *parent_group, H5Z_filter_t fil
*/
static void
test_write_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id)
+ hid_t dcpl_id, hid_t dxpl_id, test_mode_t test_mode)
{
- C_DATATYPE *data = NULL;
- C_DATATYPE *read_buf = NULL;
- C_DATATYPE *correct_buf = NULL;
+ C_DATATYPE *correct_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
hsize_t dataset_dims[WRITE_UNSHARED_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t chunk_dims[WRITE_UNSHARED_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t sel_dims[WRITE_UNSHARED_FILTERED_CHUNKS_DATASET_DIMS];
@@ -561,13 +1016,16 @@ test_write_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t fi
hsize_t stride[WRITE_UNSHARED_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t count[WRITE_UNSHARED_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t block[WRITE_UNSHARED_FILTERED_CHUNKS_DATASET_DIMS];
- size_t i, data_size, correct_buf_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ size_t data_size, correct_buf_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
hid_t group_id = H5I_INVALID_HID;
- hid_t filespace = H5I_INVALID_HID, memspace = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
if (MAINPROCESS)
- HDputs("Testing write to unshared filtered chunks");
+ puts("Testing write to unshared filtered chunks");
file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");
@@ -586,9 +1044,6 @@ test_write_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t fi
filespace = H5Screate_simple(WRITE_UNSHARED_FILTERED_CHUNKS_DATASET_DIMS, dataset_dims, NULL);
VRFY((filespace >= 0), "File dataspace creation succeeded");
- memspace = H5Screate_simple(WRITE_UNSHARED_FILTERED_CHUNKS_DATASET_DIMS, sel_dims, NULL);
- VRFY((memspace >= 0), "Memory dataspace creation succeeded");
-
/* Create chunked dataset */
plist_id = H5Pcopy(dcpl_id);
VRFY((plist_id >= 0), "DCPL copy succeeded");
@@ -599,12 +1054,12 @@ test_write_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t fi
/* Add test filter to the pipeline */
VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
- dset_id = H5Dcreate2(group_id, WRITE_UNSHARED_FILTERED_CHUNKS_DATASET_NAME, HDF5_DATATYPE_NAME, filespace,
- H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, WRITE_UNSHARED_FILTERED_CHUNKS_DATASET_NAME, HDF5_DATATYPE_NAME, filespace,
+ plist_id, test_mode, &num_dsets, dset_ids);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -621,70 +1076,69 @@ test_write_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t fi
start[0] = ((hsize_t)mpi_rank * (hsize_t)WRITE_UNSHARED_FILTERED_CHUNKS_CH_NROWS * count[0]);
start[1] = 0;
- if (VERBOSE_MED) {
- printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- fflush(stdout);
- }
-
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
-
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
/* Fill data buffer */
- data_size = sel_dims[0] * sel_dims[1] * sizeof(*data);
- correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf);
+ data_size = sel_dims[0] * sel_dims[1] * sizeof(C_DATATYPE);
- data = (C_DATATYPE *)calloc(1, data_size);
- VRFY((NULL != data), "calloc succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ C_DATATYPE *tmp_buf = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
- correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "calloc succeeded");
+ for (size_t j = 0; j < data_size / sizeof(C_DATATYPE); j++)
+ tmp_buf[j] = (C_DATATYPE)(GEN_DATA(j) + dset_idx);
- for (i = 0; i < data_size / sizeof(*data); i++)
- data[i] = (C_DATATYPE)GEN_DATA(i);
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
+ }
- for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++)
- correct_buf[i] = (C_DATATYPE)((i % (dataset_dims[0] / (hsize_t)mpi_size * dataset_dims[1])) +
- (i / (dataset_dims[0] / (hsize_t)mpi_size * dataset_dims[1])));
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids, dxpl_id, data_bufs,
+ test_mode);
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, data) >= 0),
- "Dataset write succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ free(data_bufs_nc[dset_idx]);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, ALL_CHUNKS_WRITTEN);
- if (data)
- free(data);
+ /* Close and re-open datasets */
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
+ open_datasets(group_id, WRITE_UNSHARED_FILTERED_CHUNKS_DATASET_NAME, num_dsets, test_mode, dset_ids);
/* Verify the correct data was written */
- read_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != read_buf), "calloc succeeded");
+ correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(C_DATATYPE);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ correct_bufs[dset_idx] = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_bufs[dset_idx]), "calloc succeeded");
+ read_bufs[dset_idx] = calloc(1, correct_buf_size);
+ VRFY((NULL != read_bufs[dset_idx]), "calloc succeeded");
+
+ for (size_t j = 0; j < correct_buf_size / sizeof(C_DATATYPE); j++)
+ correct_bufs[dset_idx][j] =
+ (C_DATATYPE)((j % (dataset_dims[0] / (hsize_t)mpi_size * dataset_dims[1])) +
+ (j / (dataset_dims[0] / (hsize_t)mpi_size * dataset_dims[1])) + dset_idx);
+ }
- dset_id = H5Dopen2(group_id, WRITE_UNSHARED_FILTERED_CHUNKS_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_bufs, test_mode);
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((0 == memcmp(read_bufs[dset_idx], correct_bufs[dset_idx], correct_buf_size)),
+ "Data verification succeeded");
- VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ free(read_bufs[dset_idx]);
+ free(correct_bufs[dset_idx]);
+ }
- if (correct_buf)
- free(correct_buf);
- if (read_buf)
- free(read_buf);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
- VRFY((H5Sclose(memspace) >= 0), "Memory dataspace close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -698,11 +1152,13 @@ test_write_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t fi
*/
static void
test_write_filtered_dataset_no_overlap_partial(const char *parent_group, H5Z_filter_t filter_id,
- hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id)
+ hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode)
{
- C_DATATYPE *data = NULL;
- C_DATATYPE *read_buf = NULL;
- C_DATATYPE *correct_buf = NULL;
+ C_DATATYPE *correct_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
hsize_t dataset_dims[WRITE_UNSHARED_FILTERED_CHUNKS_PARTIAL_DATASET_DIMS];
hsize_t chunk_dims[WRITE_UNSHARED_FILTERED_CHUNKS_PARTIAL_DATASET_DIMS];
hsize_t sel_dims[WRITE_UNSHARED_FILTERED_CHUNKS_PARTIAL_DATASET_DIMS];
@@ -710,13 +1166,16 @@ test_write_filtered_dataset_no_overlap_partial(const char *parent_group, H5Z_fil
hsize_t stride[WRITE_UNSHARED_FILTERED_CHUNKS_PARTIAL_DATASET_DIMS];
hsize_t count[WRITE_UNSHARED_FILTERED_CHUNKS_PARTIAL_DATASET_DIMS];
hsize_t block[WRITE_UNSHARED_FILTERED_CHUNKS_PARTIAL_DATASET_DIMS];
- size_t i, data_size, correct_buf_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ size_t data_size, correct_buf_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
hid_t group_id = H5I_INVALID_HID;
hid_t filespace = H5I_INVALID_HID;
if (MAINPROCESS)
- HDputs("Testing partial write to unshared filtered chunks");
+ puts("Testing partial write to unshared filtered chunks");
file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");
@@ -746,12 +1205,12 @@ test_write_filtered_dataset_no_overlap_partial(const char *parent_group, H5Z_fil
/* Add test filter to the pipeline */
VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
- dset_id = H5Dcreate2(group_id, WRITE_UNSHARED_FILTERED_CHUNKS_PARTIAL_DATASET_NAME, HDF5_DATATYPE_NAME,
- filespace, H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, WRITE_UNSHARED_FILTERED_CHUNKS_PARTIAL_DATASET_NAME, HDF5_DATATYPE_NAME,
+ filespace, plist_id, test_mode, &num_dsets, dset_ids);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -768,78 +1227,77 @@ test_write_filtered_dataset_no_overlap_partial(const char *parent_group, H5Z_fil
start[0] = ((hsize_t)mpi_rank * (hsize_t)WRITE_UNSHARED_FILTERED_CHUNKS_PARTIAL_CH_NROWS * count[0]);
start[1] = 0;
- if (VERBOSE_MED) {
- printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- fflush(stdout);
- }
-
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
-
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
/* Fill data buffer */
- data_size = sel_dims[0] * sel_dims[1] * sizeof(*data);
- correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf);
+ data_size = sel_dims[0] * sel_dims[1] * sizeof(C_DATATYPE);
- data = (C_DATATYPE *)calloc(1, data_size);
- VRFY((NULL != data), "calloc succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ C_DATATYPE *tmp_buf = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
- correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "calloc succeeded");
+ for (size_t j = 0; j < data_size / sizeof(C_DATATYPE); j++)
+ tmp_buf[j] = (C_DATATYPE)(GEN_DATA(j) + dset_idx);
- for (i = 0; i < data_size / sizeof(*data); i++)
- data[i] = (C_DATATYPE)GEN_DATA(i);
-
- for (i = 0; i < (size_t)mpi_size; i++) {
- size_t rank_n_elems = (size_t)(mpi_size * (WRITE_UNSHARED_FILTERED_CHUNKS_PARTIAL_CH_NROWS *
- WRITE_UNSHARED_FILTERED_CHUNKS_PARTIAL_CH_NCOLS));
- size_t data_idx = i;
-
- for (size_t j = 0; j < rank_n_elems; j++) {
- if ((j % WRITE_UNSHARED_FILTERED_CHUNKS_PARTIAL_CH_NCOLS) == 0) {
- correct_buf[(i * rank_n_elems) + j] = (C_DATATYPE)data_idx;
- data_idx++;
- }
- }
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
}
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, data) >= 0),
- "Dataset write succeeded");
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids, dxpl_id, data_bufs,
+ test_mode);
- /* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ free(data_bufs_nc[dset_idx]);
+
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, ALL_CHUNKS_WRITTEN);
- if (data)
- free(data);
+ /* Close and re-open datasets */
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
+ open_datasets(group_id, WRITE_UNSHARED_FILTERED_CHUNKS_PARTIAL_DATASET_NAME, num_dsets, test_mode,
+ dset_ids);
/* Verify the correct data was written */
- read_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != read_buf), "calloc succeeded");
+ correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(C_DATATYPE);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ correct_bufs[dset_idx] = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_bufs[dset_idx]), "calloc succeeded");
+ read_bufs[dset_idx] = calloc(1, correct_buf_size);
+ VRFY((NULL != read_bufs[dset_idx]), "calloc succeeded");
+
+ for (size_t j = 0; j < (size_t)mpi_size; j++) {
+ size_t data_idx = j;
+ size_t rank_n_elems = (size_t)(mpi_size * (WRITE_UNSHARED_FILTERED_CHUNKS_PARTIAL_CH_NROWS *
+ WRITE_UNSHARED_FILTERED_CHUNKS_PARTIAL_CH_NCOLS));
+
+ for (size_t k = 0; k < rank_n_elems; k++) {
+ if ((k % WRITE_UNSHARED_FILTERED_CHUNKS_PARTIAL_CH_NCOLS) == 0) {
+ correct_bufs[dset_idx][(j * rank_n_elems) + k] = (C_DATATYPE)(data_idx + dset_idx);
+ data_idx++;
+ }
+ }
+ }
+ }
- dset_id = H5Dopen2(group_id, WRITE_UNSHARED_FILTERED_CHUNKS_PARTIAL_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_bufs, test_mode);
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((0 == memcmp(read_bufs[dset_idx], correct_bufs[dset_idx], correct_buf_size)),
+ "Data verification succeeded");
- VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ free(read_bufs[dset_idx]);
+ free(correct_bufs[dset_idx]);
+ }
- if (correct_buf)
- free(correct_buf);
- if (read_buf)
- free(read_buf);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -856,11 +1314,12 @@ test_write_filtered_dataset_no_overlap_partial(const char *parent_group, H5Z_fil
*/
static void
test_write_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id)
+ hid_t dcpl_id, hid_t dxpl_id, test_mode_t test_mode)
{
- C_DATATYPE *data = NULL;
- C_DATATYPE *read_buf = NULL;
- C_DATATYPE *correct_buf = NULL;
+ C_DATATYPE *correct_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
hsize_t dataset_dims[WRITE_SHARED_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t chunk_dims[WRITE_SHARED_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t sel_dims[WRITE_SHARED_FILTERED_CHUNKS_DATASET_DIMS];
@@ -868,13 +1327,16 @@ test_write_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filte
hsize_t stride[WRITE_SHARED_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t count[WRITE_SHARED_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t block[WRITE_SHARED_FILTERED_CHUNKS_DATASET_DIMS];
- size_t i, data_size, correct_buf_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ size_t data_size, correct_buf_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
hid_t group_id = H5I_INVALID_HID;
- hid_t filespace = H5I_INVALID_HID, memspace = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
if (MAINPROCESS)
- HDputs("Testing write to shared filtered chunks");
+ puts("Testing write to shared filtered chunks");
file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");
@@ -893,9 +1355,6 @@ test_write_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filte
filespace = H5Screate_simple(WRITE_SHARED_FILTERED_CHUNKS_DATASET_DIMS, dataset_dims, NULL);
VRFY((filespace >= 0), "File dataspace creation succeeded");
- memspace = H5Screate_simple(WRITE_SHARED_FILTERED_CHUNKS_DATASET_DIMS, sel_dims, NULL);
- VRFY((memspace >= 0), "Memory dataspace creation succeeded");
-
/* Create chunked dataset */
plist_id = H5Pcopy(dcpl_id);
VRFY((plist_id >= 0), "DCPL copy succeeded");
@@ -906,12 +1365,12 @@ test_write_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filte
/* Add test filter to the pipeline */
VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
- dset_id = H5Dcreate2(group_id, WRITE_SHARED_FILTERED_CHUNKS_DATASET_NAME, HDF5_DATATYPE_NAME, filespace,
- H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, WRITE_SHARED_FILTERED_CHUNKS_DATASET_NAME, HDF5_DATATYPE_NAME, filespace,
+ plist_id, test_mode, &num_dsets, dset_ids);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -927,72 +1386,71 @@ test_write_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filte
start[0] = (hsize_t)mpi_rank * block[0];
start[1] = 0;
- if (VERBOSE_MED) {
- printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- fflush(stdout);
- }
-
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
-
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
/* Fill data buffer */
- data_size = sel_dims[0] * sel_dims[1] * sizeof(*data);
- correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf);
+ data_size = sel_dims[0] * sel_dims[1] * sizeof(C_DATATYPE);
- data = (C_DATATYPE *)calloc(1, data_size);
- VRFY((NULL != data), "calloc succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ C_DATATYPE *tmp_buf = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
- correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "calloc succeeded");
+ for (size_t j = 0; j < data_size / sizeof(C_DATATYPE); j++)
+ tmp_buf[j] = (C_DATATYPE)(GEN_DATA(j) + dset_idx);
- for (i = 0; i < data_size / sizeof(*data); i++)
- data[i] = (C_DATATYPE)GEN_DATA(i);
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
+ }
- for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++)
- correct_buf[i] =
- (C_DATATYPE)((dataset_dims[1] * (i / ((hsize_t)mpi_size * dataset_dims[1]))) +
- (i % dataset_dims[1]) +
- (((i % ((hsize_t)mpi_size * dataset_dims[1])) / dataset_dims[1]) % dataset_dims[1]));
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids, dxpl_id, data_bufs,
+ test_mode);
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, data) >= 0),
- "Dataset write succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ free(data_bufs_nc[dset_idx]);
- /* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, ALL_CHUNKS_WRITTEN);
- if (data)
- free(data);
+ /* Close and re-open datasets */
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
+ open_datasets(group_id, WRITE_SHARED_FILTERED_CHUNKS_DATASET_NAME, num_dsets, test_mode, dset_ids);
- /* Verify correct data was written */
- read_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != read_buf), "calloc succeeded");
+ /* Verify the correct data was written */
+ correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(C_DATATYPE);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ correct_bufs[dset_idx] = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_bufs[dset_idx]), "calloc succeeded");
+ read_bufs[dset_idx] = calloc(1, correct_buf_size);
+ VRFY((NULL != read_bufs[dset_idx]), "calloc succeeded");
+
+ for (size_t j = 0; j < correct_buf_size / sizeof(C_DATATYPE); j++)
+ correct_bufs[dset_idx][j] =
+ (C_DATATYPE)((dataset_dims[1] * (j / ((hsize_t)mpi_size * dataset_dims[1]))) +
+ (j % dataset_dims[1]) +
+ (((j % ((hsize_t)mpi_size * dataset_dims[1])) / dataset_dims[1]) %
+ dataset_dims[1]) +
+ dset_idx);
+ }
- dset_id = H5Dopen2(group_id, WRITE_SHARED_FILTERED_CHUNKS_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_bufs, test_mode);
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((0 == memcmp(read_bufs[dset_idx], correct_bufs[dset_idx], correct_buf_size)),
+ "Data verification succeeded");
- VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ free(read_bufs[dset_idx]);
+ free(correct_bufs[dset_idx]);
+ }
- if (correct_buf)
- free(correct_buf);
- if (read_buf)
- free(read_buf);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
- VRFY((H5Sclose(memspace) >= 0), "Memory dataspace close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -1009,10 +1467,12 @@ test_write_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filte
*/
static void
test_write_filtered_dataset_single_unlim_dim_no_overlap(const char *parent_group, H5Z_filter_t filter_id,
- hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id)
+ hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode)
{
- C_DATATYPE *data = NULL;
- C_DATATYPE *read_buf = NULL;
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
hsize_t dataset_dims[WRITE_UNSHARED_ONE_UNLIM_DIM_DATASET_DIMS];
hsize_t max_dims[WRITE_UNSHARED_ONE_UNLIM_DIM_DATASET_DIMS];
hsize_t chunk_dims[WRITE_UNSHARED_ONE_UNLIM_DIM_DATASET_DIMS];
@@ -1021,13 +1481,16 @@ test_write_filtered_dataset_single_unlim_dim_no_overlap(const char *parent_group
hsize_t stride[WRITE_UNSHARED_ONE_UNLIM_DIM_DATASET_DIMS];
hsize_t count[WRITE_UNSHARED_ONE_UNLIM_DIM_DATASET_DIMS];
hsize_t block[WRITE_UNSHARED_ONE_UNLIM_DIM_DATASET_DIMS];
- size_t i, data_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ size_t data_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
hid_t group_id = H5I_INVALID_HID;
hid_t filespace = H5I_INVALID_HID;
if (MAINPROCESS)
- HDputs("Testing write to unshared filtered chunks w/ single unlimited dimension");
+ puts("Testing write to unshared filtered chunks w/ single unlimited dimension");
file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");
@@ -1058,32 +1521,35 @@ test_write_filtered_dataset_single_unlim_dim_no_overlap(const char *parent_group
/* Add test filter to the pipeline */
VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
- dset_id = H5Dcreate2(group_id, WRITE_UNSHARED_ONE_UNLIM_DIM_DATASET_NAME, HDF5_DATATYPE_NAME, filespace,
- H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, WRITE_UNSHARED_ONE_UNLIM_DIM_DATASET_NAME, HDF5_DATATYPE_NAME, filespace,
+ plist_id, test_mode, &num_dsets, dset_ids);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
/* Fill data buffer */
- data_size = sel_dims[0] * sel_dims[1] * sizeof(*data);
+ data_size = sel_dims[0] * sel_dims[1] * sizeof(C_DATATYPE);
- data = (C_DATATYPE *)calloc(1, data_size);
- VRFY((NULL != data), "calloc succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ C_DATATYPE *tmp_buf = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
- read_buf = (C_DATATYPE *)calloc(1, data_size);
- VRFY((NULL != read_buf), "calloc succeeded");
+ for (size_t j = 0; j < data_size / sizeof(C_DATATYPE); j++)
+ tmp_buf[j] = (C_DATATYPE)(GEN_DATA(j) + dset_idx);
- for (i = 0; i < data_size / sizeof(*data); i++)
- data[i] = (C_DATATYPE)GEN_DATA(i);
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
- for (i = 0; i < (size_t)WRITE_UNSHARED_ONE_UNLIM_DIM_NLOOPS; i++) {
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
+ tmp_buf = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
+ read_bufs[dset_idx] = tmp_buf;
+ }
+
+ for (size_t i = 0; i < (size_t)WRITE_UNSHARED_ONE_UNLIM_DIM_NLOOPS; i++) {
/* Each process defines the dataset selection in memory and writes
* it to the hyperslab in the file
*/
@@ -1097,56 +1563,55 @@ test_write_filtered_dataset_single_unlim_dim_no_overlap(const char *parent_group
start[0] = ((hsize_t)mpi_rank * block[0] * count[0]);
start[1] = i * count[1] * block[1];
- if (VERBOSE_MED) {
- printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0],
- block[1]);
- fflush(stdout);
- }
-
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, data) >= 0),
- "Dataset write succeeded");
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids, dxpl_id, data_bufs,
+ test_mode);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, ALL_CHUNKS_WRITTEN);
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
+ /* Close and re-open datasets */
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
- dset_id = H5Dopen2(group_id, WRITE_UNSHARED_ONE_UNLIM_DIM_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ open_datasets(group_id, WRITE_UNSHARED_ONE_UNLIM_DIM_DATASET_NAME, num_dsets, test_mode, dset_ids);
- memset(read_buf, 255, data_size);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ memset(read_bufs[dset_idx], 255, data_size);
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids[0], dxpl_id, read_bufs,
+ test_mode);
/* Verify the correct data was written */
- VRFY((0 == memcmp(read_buf, data, data_size)), "Data verification succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((0 == memcmp(read_bufs[dset_idx], data_bufs[dset_idx], data_size)),
+ "Data verification succeeded");
if (i < (size_t)WRITE_UNSHARED_ONE_UNLIM_DIM_NLOOPS - 1) {
- /* Extend the dataset by count[1] chunks in the extensible dimension */
+ /* Extend the dataset(s) by count[1] chunks in the extensible dimension */
dataset_dims[1] += count[1] * block[1];
- VRFY(H5Dset_extent(dset_id, dataset_dims) >= 0, "H5Dset_extent succeeded");
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY(H5Dset_extent(dset_ids[dset_idx], dataset_dims) >= 0, "H5Dset_extent succeeded");
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, SOME_CHUNKS_WRITTEN);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, SOME_CHUNKS_WRITTEN);
}
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ }
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ free(read_bufs[dset_idx]);
+ free(data_bufs_nc[dset_idx]);
}
- if (data)
- free(data);
- if (read_buf)
- free(read_buf);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -1163,10 +1628,12 @@ test_write_filtered_dataset_single_unlim_dim_no_overlap(const char *parent_group
*/
static void
test_write_filtered_dataset_single_unlim_dim_overlap(const char *parent_group, H5Z_filter_t filter_id,
- hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id)
+ hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode)
{
- C_DATATYPE *data = NULL;
- C_DATATYPE *read_buf = NULL;
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
hsize_t dataset_dims[WRITE_SHARED_ONE_UNLIM_DIM_DATASET_DIMS];
hsize_t max_dims[WRITE_SHARED_ONE_UNLIM_DIM_DATASET_DIMS];
hsize_t chunk_dims[WRITE_SHARED_ONE_UNLIM_DIM_DATASET_DIMS];
@@ -1175,13 +1642,16 @@ test_write_filtered_dataset_single_unlim_dim_overlap(const char *parent_group, H
hsize_t stride[WRITE_SHARED_ONE_UNLIM_DIM_DATASET_DIMS];
hsize_t count[WRITE_SHARED_ONE_UNLIM_DIM_DATASET_DIMS];
hsize_t block[WRITE_SHARED_ONE_UNLIM_DIM_DATASET_DIMS];
- size_t i, data_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ size_t data_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
hid_t group_id = H5I_INVALID_HID;
hid_t filespace = H5I_INVALID_HID;
if (MAINPROCESS)
- HDputs("Testing write to shared filtered chunks w/ single unlimited dimension");
+ puts("Testing write to shared filtered chunks w/ single unlimited dimension");
file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");
@@ -1212,32 +1682,35 @@ test_write_filtered_dataset_single_unlim_dim_overlap(const char *parent_group, H
/* Add test filter to the pipeline */
VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
- dset_id = H5Dcreate2(group_id, WRITE_SHARED_ONE_UNLIM_DIM_DATASET_NAME, HDF5_DATATYPE_NAME, filespace,
- H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, WRITE_SHARED_ONE_UNLIM_DIM_DATASET_NAME, HDF5_DATATYPE_NAME, filespace,
+ plist_id, test_mode, &num_dsets, dset_ids);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
/* Fill data buffer */
- data_size = sel_dims[0] * sel_dims[1] * sizeof(*data);
+ data_size = sel_dims[0] * sel_dims[1] * sizeof(C_DATATYPE);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ C_DATATYPE *tmp_buf = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
- data = (C_DATATYPE *)calloc(1, data_size);
- VRFY((NULL != data), "calloc succeeded");
+ for (size_t j = 0; j < data_size / sizeof(C_DATATYPE); j++)
+ tmp_buf[j] = (C_DATATYPE)(GEN_DATA(j) + dset_idx);
- read_buf = (C_DATATYPE *)calloc(1, data_size);
- VRFY((NULL != read_buf), "calloc succeeded");
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
- for (i = 0; i < data_size / sizeof(*data); i++)
- data[i] = (C_DATATYPE)GEN_DATA(i);
+ tmp_buf = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
- for (i = 0; i < (size_t)WRITE_SHARED_ONE_UNLIM_DIM_NLOOPS; i++) {
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
+ read_bufs[dset_idx] = tmp_buf;
+ }
+ for (size_t i = 0; i < (size_t)WRITE_SHARED_ONE_UNLIM_DIM_NLOOPS; i++) {
/* Each process defines the dataset selection in memory and writes
* it to the hyperslab in the file
*/
@@ -1250,56 +1723,55 @@ test_write_filtered_dataset_single_unlim_dim_overlap(const char *parent_group, H
start[0] = (hsize_t)mpi_rank * block[0];
start[1] = i * count[1] * block[1];
- if (VERBOSE_MED) {
- printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0],
- block[1]);
- fflush(stdout);
- }
-
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, data) >= 0),
- "Dataset write succeeded");
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids, dxpl_id, data_bufs,
+ test_mode);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, ALL_CHUNKS_WRITTEN);
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
+ /* Close and re-open datasets */
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
- dset_id = H5Dopen2(group_id, WRITE_SHARED_ONE_UNLIM_DIM_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ open_datasets(group_id, WRITE_SHARED_ONE_UNLIM_DIM_DATASET_NAME, num_dsets, test_mode, dset_ids);
- memset(read_buf, 255, data_size);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ memset(read_bufs[dset_idx], 255, data_size);
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids[0], dxpl_id, read_bufs,
+ test_mode);
- /* Verify correct data was written */
- VRFY((0 == memcmp(read_buf, data, data_size)), "Data verification succeeded");
+ /* Verify the correct data was written */
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((0 == memcmp(read_bufs[dset_idx], data_bufs[dset_idx], data_size)),
+ "Data verification succeeded");
if (i < (size_t)WRITE_SHARED_ONE_UNLIM_DIM_NLOOPS - 1) {
- /* Extend the dataset by count[1] chunks in the extensible dimension */
+ /* Extend the dataset(s) by count[1] chunks in the extensible dimension */
dataset_dims[1] += count[1] * block[1];
- VRFY(H5Dset_extent(dset_id, dataset_dims) >= 0, "H5Dset_extent succeeded");
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY(H5Dset_extent(dset_ids[dset_idx], dataset_dims) >= 0, "H5Dset_extent succeeded");
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, SOME_CHUNKS_WRITTEN);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, SOME_CHUNKS_WRITTEN);
}
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ }
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ free(read_bufs[dset_idx]);
+ free(data_bufs_nc[dset_idx]);
}
- if (data)
- free(data);
- if (read_buf)
- free(read_buf);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -1318,10 +1790,12 @@ test_write_filtered_dataset_single_unlim_dim_overlap(const char *parent_group, H
*/
static void
test_write_filtered_dataset_multi_unlim_dim_no_overlap(const char *parent_group, H5Z_filter_t filter_id,
- hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id)
+ hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode)
{
- C_DATATYPE *data = NULL;
- C_DATATYPE *read_buf = NULL;
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
hsize_t dataset_dims[WRITE_UNSHARED_TWO_UNLIM_DIM_DATASET_DIMS];
hsize_t max_dims[WRITE_UNSHARED_TWO_UNLIM_DIM_DATASET_DIMS];
hsize_t chunk_dims[WRITE_UNSHARED_TWO_UNLIM_DIM_DATASET_DIMS];
@@ -1330,13 +1804,16 @@ test_write_filtered_dataset_multi_unlim_dim_no_overlap(const char *parent_group,
hsize_t stride[WRITE_UNSHARED_TWO_UNLIM_DIM_DATASET_DIMS];
hsize_t count[WRITE_UNSHARED_TWO_UNLIM_DIM_DATASET_DIMS];
hsize_t block[WRITE_UNSHARED_TWO_UNLIM_DIM_DATASET_DIMS];
- size_t i, data_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ size_t data_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
hid_t group_id = H5I_INVALID_HID;
hid_t filespace = H5I_INVALID_HID;
if (MAINPROCESS)
- HDputs("Testing write to unshared filtered chunks w/ two unlimited dimensions");
+ puts("Testing write to unshared filtered chunks w/ two unlimited dimensions");
file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");
@@ -1367,40 +1844,38 @@ test_write_filtered_dataset_multi_unlim_dim_no_overlap(const char *parent_group,
/* Add test filter to the pipeline */
VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
- dset_id = H5Dcreate2(group_id, WRITE_UNSHARED_TWO_UNLIM_DIM_DATASET_NAME, HDF5_DATATYPE_NAME, filespace,
- H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, WRITE_UNSHARED_TWO_UNLIM_DIM_DATASET_NAME, HDF5_DATATYPE_NAME, filespace,
+ plist_id, test_mode, &num_dsets, dset_ids);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
- for (i = 0; i < (size_t)WRITE_UNSHARED_TWO_UNLIM_DIM_NLOOPS; i++) {
- C_DATATYPE *tmp_realloc = NULL;
- size_t j;
-
+ for (size_t i = 0; i < (size_t)WRITE_UNSHARED_TWO_UNLIM_DIM_NLOOPS; i++) {
/* Set selected dimensions */
sel_dims[0] = (i + 1) * WRITE_UNSHARED_TWO_UNLIM_DIM_CH_NROWS;
sel_dims[1] = (i + 1) * WRITE_UNSHARED_TWO_UNLIM_DIM_CH_NCOLS;
/* Fill data buffer */
- data_size = sel_dims[0] * sel_dims[1] * sizeof(*data);
+ data_size = sel_dims[0] * sel_dims[1] * sizeof(C_DATATYPE);
- tmp_realloc = (C_DATATYPE *)realloc(data, data_size);
- VRFY((NULL != tmp_realloc), "realloc succeeded");
- data = tmp_realloc;
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ C_DATATYPE *tmp_buf = realloc(data_bufs_nc[dset_idx], data_size);
+ VRFY((NULL != tmp_buf), "realloc succeeded");
- tmp_realloc = (C_DATATYPE *)realloc(read_buf, data_size);
- VRFY((NULL != tmp_realloc), "realloc succeeded");
- read_buf = tmp_realloc;
+ for (size_t k = 0; k < data_size / sizeof(C_DATATYPE); k++)
+ tmp_buf[k] = (C_DATATYPE)(GEN_DATA(k) + dset_idx);
- for (j = 0; j < data_size / sizeof(*data); j++)
- data[j] = (C_DATATYPE)GEN_DATA(j);
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
+ tmp_buf = realloc(read_bufs[dset_idx], data_size);
+ VRFY((NULL != tmp_buf), "realloc succeeded");
+
+ read_bufs[dset_idx] = tmp_buf;
+ }
/* Each process defines the dataset selection in memory and writes
* it to the hyperslab in the file
@@ -1414,61 +1889,60 @@ test_write_filtered_dataset_multi_unlim_dim_no_overlap(const char *parent_group,
start[0] = ((hsize_t)mpi_rank * block[0] * count[0]);
start[1] = 0;
- if (VERBOSE_MED) {
- printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0],
- block[1]);
- fflush(stdout);
- }
-
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, data) >= 0),
- "Dataset write succeeded");
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids, dxpl_id, data_bufs,
+ test_mode);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, ALL_CHUNKS_WRITTEN);
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
+ /* Close and re-open datasets */
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
- dset_id = H5Dopen2(group_id, WRITE_UNSHARED_TWO_UNLIM_DIM_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ open_datasets(group_id, WRITE_UNSHARED_TWO_UNLIM_DIM_DATASET_NAME, num_dsets, test_mode, dset_ids);
- memset(read_buf, 255, data_size);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ memset(read_bufs[dset_idx], 255, data_size);
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids[0], dxpl_id, read_bufs,
+ test_mode);
/* Verify the correct data was written */
- VRFY((0 == memcmp(read_buf, data, data_size)), "Data verification succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((0 == memcmp(read_bufs[dset_idx], data_bufs[dset_idx], data_size)),
+ "Data verification succeeded");
if (i < (size_t)WRITE_UNSHARED_TWO_UNLIM_DIM_NLOOPS - 1) {
/*
- * Extend the dataset by the size of one chunk per rank
- * in the first extensible dimension. Extend the dataset
+ * Extend the dataset(s) by the size of one chunk per rank
+ * in the first extensible dimension. Extend the dataset(s)
* by the size of chunk in the second extensible dimension.
*/
dataset_dims[0] += (hsize_t)mpi_size * block[0];
dataset_dims[1] += block[1];
- VRFY(H5Dset_extent(dset_id, dataset_dims) >= 0, "H5Dset_extent succeeded");
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY(H5Dset_extent(dset_ids[dset_idx], dataset_dims) >= 0, "H5Dset_extent succeeded");
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, SOME_CHUNKS_WRITTEN);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, SOME_CHUNKS_WRITTEN);
}
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ }
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ free(read_bufs[dset_idx]);
+ free(data_bufs_nc[dset_idx]);
}
- if (data)
- free(data);
- if (read_buf)
- free(read_buf);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -1485,10 +1959,12 @@ test_write_filtered_dataset_multi_unlim_dim_no_overlap(const char *parent_group,
*/
static void
test_write_filtered_dataset_multi_unlim_dim_overlap(const char *parent_group, H5Z_filter_t filter_id,
- hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id)
+ hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode)
{
- C_DATATYPE *data = NULL;
- C_DATATYPE *read_buf = NULL;
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
hsize_t dataset_dims[WRITE_SHARED_TWO_UNLIM_DIM_DATASET_DIMS];
hsize_t max_dims[WRITE_SHARED_TWO_UNLIM_DIM_DATASET_DIMS];
hsize_t chunk_dims[WRITE_SHARED_TWO_UNLIM_DIM_DATASET_DIMS];
@@ -1497,13 +1973,16 @@ test_write_filtered_dataset_multi_unlim_dim_overlap(const char *parent_group, H5
hsize_t stride[WRITE_SHARED_TWO_UNLIM_DIM_DATASET_DIMS];
hsize_t count[WRITE_SHARED_TWO_UNLIM_DIM_DATASET_DIMS];
hsize_t block[WRITE_SHARED_TWO_UNLIM_DIM_DATASET_DIMS];
- size_t i, data_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ size_t data_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
hid_t group_id = H5I_INVALID_HID;
hid_t filespace = H5I_INVALID_HID;
if (MAINPROCESS)
- HDputs("Testing write to shared filtered chunks w/ two unlimited dimensions");
+ puts("Testing write to shared filtered chunks w/ two unlimited dimensions");
file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");
@@ -1534,40 +2013,38 @@ test_write_filtered_dataset_multi_unlim_dim_overlap(const char *parent_group, H5
/* Add test filter to the pipeline */
VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
- dset_id = H5Dcreate2(group_id, WRITE_SHARED_TWO_UNLIM_DIM_DATASET_NAME, HDF5_DATATYPE_NAME, filespace,
- H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, WRITE_SHARED_TWO_UNLIM_DIM_DATASET_NAME, HDF5_DATATYPE_NAME, filespace,
+ plist_id, test_mode, &num_dsets, dset_ids);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
- for (i = 0; i < (size_t)WRITE_SHARED_TWO_UNLIM_DIM_NLOOPS; i++) {
- C_DATATYPE *tmp_realloc = NULL;
- size_t j;
-
+ for (size_t i = 0; i < (size_t)WRITE_SHARED_TWO_UNLIM_DIM_NLOOPS; i++) {
/* Set selected dimensions */
sel_dims[0] = (i + 1);
sel_dims[1] = (i + 1) * (size_t)WRITE_SHARED_TWO_UNLIM_DIM_CH_NCOLS;
/* Fill data buffer */
- data_size = sel_dims[0] * sel_dims[1] * sizeof(*data);
+ data_size = sel_dims[0] * sel_dims[1] * sizeof(C_DATATYPE);
- tmp_realloc = (C_DATATYPE *)realloc(data, data_size);
- VRFY((NULL != tmp_realloc), "realloc succeeded");
- data = tmp_realloc;
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ C_DATATYPE *tmp_buf = realloc(data_bufs_nc[dset_idx], data_size);
+ VRFY((NULL != tmp_buf), "realloc succeeded");
- tmp_realloc = (C_DATATYPE *)realloc(read_buf, data_size);
- VRFY((NULL != tmp_realloc), "realloc succeeded");
- read_buf = tmp_realloc;
+ for (size_t k = 0; k < data_size / sizeof(C_DATATYPE); k++)
+ tmp_buf[k] = (C_DATATYPE)(GEN_DATA(k) + dset_idx);
- for (j = 0; j < data_size / sizeof(*data); j++)
- data[j] = (C_DATATYPE)GEN_DATA(j);
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
+ tmp_buf = realloc(read_bufs[dset_idx], data_size);
+ VRFY((NULL != tmp_buf), "realloc succeeded");
+
+ read_bufs[dset_idx] = tmp_buf;
+ }
/* Each process defines the dataset selection in memory and writes
* it to the hyperslab in the file
@@ -1581,57 +2058,56 @@ test_write_filtered_dataset_multi_unlim_dim_overlap(const char *parent_group, H5
start[0] = (hsize_t)mpi_rank;
start[1] = 0;
- if (VERBOSE_MED) {
- printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0],
- block[1]);
- fflush(stdout);
- }
-
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, data) >= 0),
- "Dataset write succeeded");
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids, dxpl_id, data_bufs,
+ test_mode);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, ALL_CHUNKS_WRITTEN);
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
+ /* Close and re-open datasets */
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
- dset_id = H5Dopen2(group_id, WRITE_SHARED_TWO_UNLIM_DIM_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ open_datasets(group_id, WRITE_SHARED_TWO_UNLIM_DIM_DATASET_NAME, num_dsets, test_mode, dset_ids);
- memset(read_buf, 255, data_size);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ memset(read_bufs[dset_idx], 255, data_size);
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids[0], dxpl_id, read_bufs,
+ test_mode);
- /* Verify correct data was written */
- VRFY((0 == memcmp(read_buf, data, data_size)), "Data verification succeeded");
+ /* Verify the correct data was written */
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((0 == memcmp(read_bufs[dset_idx], data_bufs[dset_idx], data_size)),
+ "Data verification succeeded");
if (i < (size_t)WRITE_SHARED_TWO_UNLIM_DIM_NLOOPS - 1) {
- /* Extend the dataset by the size of a chunk in each extensible dimension */
+ /* Extend the dataset(s) by the size of a chunk in each extensible dimension */
dataset_dims[0] += (hsize_t)WRITE_SHARED_TWO_UNLIM_DIM_CH_NROWS;
dataset_dims[1] += (hsize_t)WRITE_SHARED_TWO_UNLIM_DIM_CH_NCOLS;
- VRFY(H5Dset_extent(dset_id, dataset_dims) >= 0, "H5Dset_extent succeeded");
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY(H5Dset_extent(dset_ids[dset_idx], dataset_dims) >= 0, "H5Dset_extent succeeded");
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, SOME_CHUNKS_WRITTEN);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, SOME_CHUNKS_WRITTEN);
}
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ }
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ free(read_bufs[dset_idx]);
+ free(data_bufs_nc[dset_idx]);
}
- if (data)
- free(data);
- if (read_buf)
- free(read_buf);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -1650,11 +2126,13 @@ test_write_filtered_dataset_multi_unlim_dim_overlap(const char *parent_group, H5
*/
static void
test_write_filtered_dataset_single_no_selection(const char *parent_group, H5Z_filter_t filter_id,
- hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id)
+ hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode)
{
- C_DATATYPE *data = NULL;
- C_DATATYPE *read_buf = NULL;
- C_DATATYPE *correct_buf = NULL;
+ C_DATATYPE *correct_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
hsize_t dataset_dims[WRITE_SINGLE_NO_SELECTION_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t chunk_dims[WRITE_SINGLE_NO_SELECTION_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t sel_dims[WRITE_SINGLE_NO_SELECTION_FILTERED_CHUNKS_DATASET_DIMS];
@@ -1662,14 +2140,16 @@ test_write_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fi
hsize_t stride[WRITE_SINGLE_NO_SELECTION_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t count[WRITE_SINGLE_NO_SELECTION_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t block[WRITE_SINGLE_NO_SELECTION_FILTERED_CHUNKS_DATASET_DIMS];
- size_t i, data_size, correct_buf_size;
- size_t segment_length;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ size_t data_size, correct_buf_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
hid_t group_id = H5I_INVALID_HID;
- hid_t filespace = H5I_INVALID_HID, memspace = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
if (MAINPROCESS)
- HDputs("Testing write to filtered chunks with a single process having no selection");
+ puts("Testing write to filtered chunks with a single process having no selection");
file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");
@@ -1691,9 +2171,6 @@ test_write_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fi
filespace = H5Screate_simple(WRITE_SINGLE_NO_SELECTION_FILTERED_CHUNKS_DATASET_DIMS, dataset_dims, NULL);
VRFY((filespace >= 0), "File dataspace creation succeeded");
- memspace = H5Screate_simple(WRITE_SINGLE_NO_SELECTION_FILTERED_CHUNKS_DATASET_DIMS, sel_dims, NULL);
- VRFY((memspace >= 0), "Memory dataspace creation succeeded");
-
/* Create chunked dataset */
plist_id = H5Pcopy(dcpl_id);
VRFY((plist_id >= 0), "DCPL copy succeeded");
@@ -1704,12 +2181,12 @@ test_write_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fi
/* Add test filter to the pipeline */
VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
- dset_id = H5Dcreate2(group_id, WRITE_SINGLE_NO_SELECTION_FILTERED_CHUNKS_DATASET_NAME, HDF5_DATATYPE_NAME,
- filespace, H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, WRITE_SINGLE_NO_SELECTION_FILTERED_CHUNKS_DATASET_NAME, HDF5_DATATYPE_NAME,
+ filespace, plist_id, test_mode, &num_dsets, dset_ids);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -1726,80 +2203,85 @@ test_write_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fi
start[0] = (hsize_t)mpi_rank * (hsize_t)WRITE_SINGLE_NO_SELECTION_FILTERED_CHUNKS_CH_NROWS * count[0];
start[1] = 0;
- if (VERBOSE_MED) {
- printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- fflush(stdout);
- }
-
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
-
if (mpi_rank == WRITE_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NO_SELECT_PROC)
- VRFY((H5Sselect_none(filespace) >= 0), "Select none succeeded");
+ select_none(num_dsets, dset_ids, fspace_ids);
else
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
/* Fill data buffer */
- data_size = sel_dims[0] * sel_dims[1] * sizeof(*data);
- correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf);
+ data_size = sel_dims[0] * sel_dims[1] * sizeof(C_DATATYPE);
if (mpi_rank != WRITE_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NO_SELECT_PROC) {
- data = (C_DATATYPE *)calloc(1, data_size);
- VRFY((NULL != data), "calloc succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ C_DATATYPE *tmp_buf = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
- for (i = 0; i < data_size / sizeof(*data); i++)
- data[i] = (C_DATATYPE)GEN_DATA(i);
- }
-
- correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "calloc succeeded");
+ for (size_t j = 0; j < data_size / sizeof(C_DATATYPE); j++)
+ tmp_buf[j] = (C_DATATYPE)(GEN_DATA(j) + dset_idx);
- for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++)
- correct_buf[i] = (C_DATATYPE)((i % (dataset_dims[0] / (hsize_t)mpi_size * dataset_dims[1])) +
- (i / (dataset_dims[0] / (hsize_t)mpi_size * dataset_dims[1])));
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
+ }
+ }
- /* Compute the correct offset into the buffer for the process having no selection and clear it */
- segment_length = dataset_dims[0] * dataset_dims[1] / (hsize_t)mpi_size;
- memset(correct_buf + ((size_t)WRITE_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NO_SELECT_PROC * segment_length),
- 0, segment_length * sizeof(*data));
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids, dxpl_id, data_bufs,
+ test_mode);
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, data) >= 0),
- "Dataset write succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ free(data_bufs_nc[dset_idx]);
/* Verify space allocation status - data should only have been written if MPI size > 1 */
- verify_space_alloc_status(dset_id, plist_id, (mpi_size > 1 ? SOME_CHUNKS_WRITTEN : NO_CHUNKS_WRITTEN));
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id,
+ (mpi_size > 1 ? SOME_CHUNKS_WRITTEN : NO_CHUNKS_WRITTEN));
- if (data)
- free(data);
+ /* Close and re-open datasets */
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
+ open_datasets(group_id, WRITE_SINGLE_NO_SELECTION_FILTERED_CHUNKS_DATASET_NAME, num_dsets, test_mode,
+ dset_ids);
/* Verify the correct data was written */
- read_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != read_buf), "calloc succeeded");
+ correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(C_DATATYPE);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ correct_bufs[dset_idx] = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_bufs[dset_idx]), "calloc succeeded");
+ read_bufs[dset_idx] = calloc(1, correct_buf_size);
+ VRFY((NULL != read_bufs[dset_idx]), "calloc succeeded");
+
+ for (size_t j = 0; j < correct_buf_size / sizeof(C_DATATYPE); j++) {
+ size_t segment_length;
+
+ correct_bufs[dset_idx][j] =
+ (C_DATATYPE)((j % (dataset_dims[0] / (hsize_t)mpi_size * dataset_dims[1])) +
+ (j / (dataset_dims[0] / (hsize_t)mpi_size * dataset_dims[1])) + dset_idx);
+
+ /* Compute the correct offset into the buffer for the process having no selection and clear it */
+ segment_length = dataset_dims[0] * dataset_dims[1] / (hsize_t)mpi_size;
+ memset(correct_bufs[dset_idx] +
+ ((size_t)WRITE_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NO_SELECT_PROC * segment_length),
+ 0, segment_length * sizeof(C_DATATYPE));
+ }
+ }
- dset_id = H5Dopen2(group_id, WRITE_SINGLE_NO_SELECTION_FILTERED_CHUNKS_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_bufs, test_mode);
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((0 == memcmp(read_bufs[dset_idx], correct_bufs[dset_idx], correct_buf_size)),
+ "Data verification succeeded");
- VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ free(read_bufs[dset_idx]);
+ free(correct_bufs[dset_idx]);
+ }
- if (correct_buf)
- free(correct_buf);
- if (read_buf)
- free(read_buf);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
- VRFY((H5Sclose(memspace) >= 0), "Memory dataspace close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -1819,21 +2301,24 @@ test_write_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fi
*/
static void
test_write_filtered_dataset_all_no_selection(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id)
+ hid_t dcpl_id, hid_t dxpl_id, test_mode_t test_mode)
{
- C_DATATYPE *data = NULL;
- C_DATATYPE *read_buf = NULL;
- C_DATATYPE *correct_buf = NULL;
+ C_DATATYPE *correct_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
hsize_t dataset_dims[WRITE_ALL_NO_SELECTION_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t chunk_dims[WRITE_ALL_NO_SELECTION_FILTERED_CHUNKS_DATASET_DIMS];
- hsize_t sel_dims[WRITE_ALL_NO_SELECTION_FILTERED_CHUNKS_DATASET_DIMS];
- size_t i, data_size, correct_buf_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ size_t data_size, correct_buf_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
hid_t group_id = H5I_INVALID_HID;
- hid_t filespace = H5I_INVALID_HID, memspace = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
if (MAINPROCESS)
- HDputs("Testing write to filtered chunks with all processes having no selection");
+ puts("Testing write to filtered chunks with all processes having no selection");
file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");
@@ -1846,14 +2331,10 @@ test_write_filtered_dataset_all_no_selection(const char *parent_group, H5Z_filte
dataset_dims[1] = (hsize_t)WRITE_ALL_NO_SELECTION_FILTERED_CHUNKS_NCOLS;
chunk_dims[0] = (hsize_t)WRITE_ALL_NO_SELECTION_FILTERED_CHUNKS_CH_NROWS;
chunk_dims[1] = (hsize_t)WRITE_ALL_NO_SELECTION_FILTERED_CHUNKS_CH_NCOLS;
- sel_dims[0] = sel_dims[1] = 0;
filespace = H5Screate_simple(WRITE_ALL_NO_SELECTION_FILTERED_CHUNKS_DATASET_DIMS, dataset_dims, NULL);
VRFY((filespace >= 0), "File dataspace creation succeeded");
- memspace = H5Screate_simple(WRITE_ALL_NO_SELECTION_FILTERED_CHUNKS_DATASET_DIMS, sel_dims, NULL);
- VRFY((memspace >= 0), "Memory dataspace creation succeeded");
-
/* Create chunked dataset */
plist_id = H5Pcopy(dcpl_id);
VRFY((plist_id >= 0), "DCPL copy succeeded");
@@ -1864,65 +2345,73 @@ test_write_filtered_dataset_all_no_selection(const char *parent_group, H5Z_filte
/* Add test filter to the pipeline */
VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
- dset_id = H5Dcreate2(group_id, WRITE_ALL_NO_SELECTION_FILTERED_CHUNKS_DATASET_NAME, HDF5_DATATYPE_NAME,
- filespace, H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, WRITE_ALL_NO_SELECTION_FILTERED_CHUNKS_DATASET_NAME, HDF5_DATATYPE_NAME,
+ filespace, plist_id, test_mode, &num_dsets, dset_ids);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
-
- VRFY((H5Sselect_none(filespace) >= 0), "Select none succeeded");
+ select_none(num_dsets, dset_ids, fspace_ids);
/* Fill data buffer */
- data_size = sel_dims[0] * sel_dims[1] * sizeof(*data);
- correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf);
+ data_size = sizeof(C_DATATYPE);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ C_DATATYPE *tmp_buf = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
- data = (C_DATATYPE *)calloc(1, data_size);
- VRFY((NULL != data), "calloc succeeded");
+ for (size_t j = 0; j < data_size / sizeof(C_DATATYPE); j++)
+ tmp_buf[j] = (C_DATATYPE)(GEN_DATA(j) + dset_idx);
- correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "calloc succeeded");
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
+ }
- for (i = 0; i < data_size / sizeof(*data); i++)
- data[i] = (C_DATATYPE)GEN_DATA(i);
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids, dxpl_id, data_bufs,
+ test_mode);
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, data) >= 0),
- "Dataset write succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ free(data_bufs_nc[dset_idx]);
- /* Verify space allocation status - no ranks should have written any data */
- verify_space_alloc_status(dset_id, plist_id, NO_CHUNKS_WRITTEN);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, NO_CHUNKS_WRITTEN);
- if (data)
- free(data);
+ /* Close and re-open datasets */
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
+ open_datasets(group_id, WRITE_ALL_NO_SELECTION_FILTERED_CHUNKS_DATASET_NAME, num_dsets, test_mode,
+ dset_ids);
/* Verify the correct data was written */
- read_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != read_buf), "calloc succeeded");
+ correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(C_DATATYPE);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ correct_bufs[dset_idx] = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_bufs[dset_idx]), "calloc succeeded");
+ read_bufs[dset_idx] = calloc(1, correct_buf_size);
+ VRFY((NULL != read_bufs[dset_idx]), "calloc succeeded");
+ }
- dset_id = H5Dopen2(group_id, WRITE_ALL_NO_SELECTION_FILTERED_CHUNKS_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_bufs, test_mode);
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((0 == memcmp(read_bufs[dset_idx], correct_bufs[dset_idx], correct_buf_size)),
+ "Data verification succeeded");
- VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ free(read_bufs[dset_idx]);
+ free(correct_bufs[dset_idx]);
+ }
- if (correct_buf)
- free(correct_buf);
- if (read_buf)
- free(read_buf);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
- VRFY((H5Sclose(memspace) >= 0), "Memory dataspace close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -1936,23 +2425,27 @@ test_write_filtered_dataset_all_no_selection(const char *parent_group, H5Z_filte
*/
static void
test_write_filtered_dataset_point_selection(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id)
+ hid_t dcpl_id, hid_t dxpl_id, test_mode_t test_mode)
{
- C_DATATYPE *data = NULL;
- C_DATATYPE *correct_buf = NULL;
- C_DATATYPE *read_buf = NULL;
- hsize_t *coords = NULL;
+ C_DATATYPE *correct_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ hsize_t *coords = NULL;
hsize_t dataset_dims[WRITE_POINT_SELECTION_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t chunk_dims[WRITE_POINT_SELECTION_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t sel_dims[WRITE_POINT_SELECTION_FILTERED_CHUNKS_DATASET_DIMS];
- size_t i, j, data_size, correct_buf_size;
+ size_t data_size, correct_buf_size;
size_t num_points;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
hid_t group_id = H5I_INVALID_HID;
- hid_t filespace = H5I_INVALID_HID, memspace = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
if (MAINPROCESS)
- HDputs("Testing write to filtered chunks with point selection");
+ puts("Testing write to filtered chunks with point selection");
file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");
@@ -1971,9 +2464,6 @@ test_write_filtered_dataset_point_selection(const char *parent_group, H5Z_filter
filespace = H5Screate_simple(WRITE_POINT_SELECTION_FILTERED_CHUNKS_DATASET_DIMS, dataset_dims, NULL);
VRFY((filespace >= 0), "File dataspace creation succeeded");
- memspace = H5Screate_simple(WRITE_POINT_SELECTION_FILTERED_CHUNKS_DATASET_DIMS, sel_dims, NULL);
- VRFY((memspace >= 0), "Memory dataspace creation succeeded");
-
/* Create chunked dataset */
plist_id = H5Pcopy(dcpl_id);
VRFY((plist_id >= 0), "DCPL copy succeeded");
@@ -1984,87 +2474,96 @@ test_write_filtered_dataset_point_selection(const char *parent_group, H5Z_filter
/* Add test filter to the pipeline */
VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
- dset_id = H5Dcreate2(group_id, WRITE_POINT_SELECTION_FILTERED_CHUNKS_DATASET_NAME, HDF5_DATATYPE_NAME,
- filespace, H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, WRITE_POINT_SELECTION_FILTERED_CHUNKS_DATASET_NAME, HDF5_DATATYPE_NAME,
+ filespace, plist_id, test_mode, &num_dsets, dset_ids);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
/* Set up point selection */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
-
num_points = (hsize_t)WRITE_POINT_SELECTION_FILTERED_CHUNKS_NROWS *
(hsize_t)WRITE_POINT_SELECTION_FILTERED_CHUNKS_NCOLS / (hsize_t)mpi_size;
coords = (hsize_t *)calloc(1, 2 * num_points * sizeof(*coords));
VRFY((NULL != coords), "Coords calloc succeeded");
- for (i = 0; i < num_points; i++)
- for (j = 0; j < WRITE_POINT_SELECTION_FILTERED_CHUNKS_DATASET_DIMS; j++)
+ for (size_t i = 0; i < num_points; i++)
+ for (size_t j = 0; j < WRITE_POINT_SELECTION_FILTERED_CHUNKS_DATASET_DIMS; j++)
coords[(i * WRITE_POINT_SELECTION_FILTERED_CHUNKS_DATASET_DIMS) + j] =
(j > 0) ? (i % (hsize_t)WRITE_POINT_SELECTION_FILTERED_CHUNKS_NCOLS)
: ((hsize_t)mpi_rank +
((hsize_t)mpi_size * (i / (hsize_t)WRITE_POINT_SELECTION_FILTERED_CHUNKS_NCOLS)));
- VRFY((H5Sselect_elements(filespace, H5S_SELECT_SET, (hsize_t)num_points, (const hsize_t *)coords) >= 0),
- "Point selection succeeded");
+ select_elements(num_dsets, dset_ids, num_points, coords, fspace_ids);
/* Fill data buffer */
- data_size = sel_dims[0] * sel_dims[1] * sizeof(*data);
- correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf);
+ data_size = sel_dims[0] * sel_dims[1] * sizeof(C_DATATYPE);
- data = (C_DATATYPE *)calloc(1, data_size);
- VRFY((NULL != data), "calloc succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ C_DATATYPE *tmp_buf = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
- correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "calloc succeeded");
+ for (size_t j = 0; j < data_size / sizeof(C_DATATYPE); j++)
+ tmp_buf[j] = (C_DATATYPE)(GEN_DATA(j) + dset_idx);
- for (i = 0; i < data_size / sizeof(*data); i++)
- data[i] = (C_DATATYPE)GEN_DATA(i);
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
+ }
- for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++)
- correct_buf[i] =
- (C_DATATYPE)((dataset_dims[1] * (i / ((hsize_t)mpi_size * dataset_dims[1]))) +
- (i % dataset_dims[1]) +
- (((i % ((hsize_t)mpi_size * dataset_dims[1])) / dataset_dims[1]) % dataset_dims[1]));
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids, dxpl_id, data_bufs,
+ test_mode);
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, data) >= 0),
- "Dataset write succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ free(data_bufs_nc[dset_idx]);
- /* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, ALL_CHUNKS_WRITTEN);
- if (data)
- free(data);
+ /* Close and re-open datasets */
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
+ open_datasets(group_id, WRITE_POINT_SELECTION_FILTERED_CHUNKS_DATASET_NAME, num_dsets, test_mode,
+ dset_ids);
/* Verify the correct data was written */
- read_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != read_buf), "calloc succeeded");
+ correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(C_DATATYPE);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ correct_bufs[dset_idx] = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_bufs[dset_idx]), "calloc succeeded");
+ read_bufs[dset_idx] = calloc(1, correct_buf_size);
+ VRFY((NULL != read_bufs[dset_idx]), "calloc succeeded");
+
+ for (size_t j = 0; j < correct_buf_size / sizeof(C_DATATYPE); j++)
+ correct_bufs[dset_idx][j] =
+ (C_DATATYPE)((dataset_dims[1] * (j / ((hsize_t)mpi_size * dataset_dims[1]))) +
+ (j % dataset_dims[1]) +
+ (((j % ((hsize_t)mpi_size * dataset_dims[1])) / dataset_dims[1]) %
+ dataset_dims[1]) +
+ dset_idx);
+ }
- dset_id = H5Dopen2(group_id, WRITE_POINT_SELECTION_FILTERED_CHUNKS_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_bufs, test_mode);
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((0 == memcmp(read_bufs[dset_idx], correct_bufs[dset_idx], correct_buf_size)),
+ "Data verification succeeded");
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ free(read_bufs[dset_idx]);
+ free(correct_bufs[dset_idx]);
+ }
- VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ free(coords);
- if (coords)
- free(coords);
- if (correct_buf)
- free(correct_buf);
- if (read_buf)
- free(read_buf);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
- VRFY((H5Sclose(memspace) >= 0), "Memory dataspace close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -2082,11 +2581,12 @@ test_write_filtered_dataset_point_selection(const char *parent_group, H5Z_filter
*/
static void
test_write_filtered_dataset_interleaved_write(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id)
+ hid_t dcpl_id, hid_t dxpl_id, test_mode_t test_mode)
{
- C_DATATYPE *data = NULL;
- C_DATATYPE *read_buf = NULL;
- C_DATATYPE *correct_buf = NULL;
+ C_DATATYPE *correct_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
hsize_t dataset_dims[INTERLEAVED_WRITE_FILTERED_DATASET_DIMS];
hsize_t chunk_dims[INTERLEAVED_WRITE_FILTERED_DATASET_DIMS];
hsize_t sel_dims[INTERLEAVED_WRITE_FILTERED_DATASET_DIMS];
@@ -2094,13 +2594,16 @@ test_write_filtered_dataset_interleaved_write(const char *parent_group, H5Z_filt
hsize_t stride[INTERLEAVED_WRITE_FILTERED_DATASET_DIMS];
hsize_t count[INTERLEAVED_WRITE_FILTERED_DATASET_DIMS];
hsize_t block[INTERLEAVED_WRITE_FILTERED_DATASET_DIMS];
- size_t i, data_size, correct_buf_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ size_t data_size, correct_buf_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
hid_t group_id = H5I_INVALID_HID;
- hid_t filespace = H5I_INVALID_HID, memspace = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
if (MAINPROCESS)
- HDputs("Testing interleaved write to filtered chunks");
+ puts("Testing interleaved write to filtered chunks");
file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");
@@ -2119,9 +2622,6 @@ test_write_filtered_dataset_interleaved_write(const char *parent_group, H5Z_filt
filespace = H5Screate_simple(INTERLEAVED_WRITE_FILTERED_DATASET_DIMS, dataset_dims, NULL);
VRFY((filespace >= 0), "File dataspace creation succeeded");
- memspace = H5Screate_simple(INTERLEAVED_WRITE_FILTERED_DATASET_DIMS, sel_dims, NULL);
- VRFY((memspace >= 0), "Memory dataspace creation succeeded");
-
/* Create chunked dataset */
plist_id = H5Pcopy(dcpl_id);
VRFY((plist_id >= 0), "DCPL copy succeeded");
@@ -2132,12 +2632,12 @@ test_write_filtered_dataset_interleaved_write(const char *parent_group, H5Z_filt
/* Add test filter to the pipeline */
VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
- dset_id = H5Dcreate2(group_id, INTERLEAVED_WRITE_FILTERED_DATASET_NAME, HDF5_DATATYPE_NAME, filespace,
- H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, INTERLEAVED_WRITE_FILTERED_DATASET_NAME, HDF5_DATATYPE_NAME, filespace,
+ plist_id, test_mode, &num_dsets, dset_ids);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -2155,80 +2655,81 @@ test_write_filtered_dataset_interleaved_write(const char *parent_group, H5Z_filt
start[0] = (hsize_t)mpi_rank;
start[1] = 0;
- if (VERBOSE_MED) {
- printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- fflush(stdout);
- }
-
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
-
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
/* Fill data buffer */
- data_size = sel_dims[0] * sel_dims[1] * sizeof(*data);
- correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf);
-
- data = (C_DATATYPE *)calloc(1, data_size);
- VRFY((NULL != data), "calloc succeeded");
-
- correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "calloc succeeded");
+ data_size = sel_dims[0] * sel_dims[1] * sizeof(C_DATATYPE);
- for (i = 0; i < data_size / sizeof(*data); i++)
- data[i] = (C_DATATYPE)GEN_DATA(i);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ C_DATATYPE *tmp_buf = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
- for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++)
- /* Add Column Index */
- correct_buf[i] =
- (C_DATATYPE)((i % (hsize_t)INTERLEAVED_WRITE_FILTERED_DATASET_NCOLS)
+ for (size_t j = 0; j < data_size / sizeof(C_DATATYPE); j++)
+ tmp_buf[j] = (C_DATATYPE)(GEN_DATA(j) + dset_idx);
- /* Add the Row Index */
- + ((i % (hsize_t)(mpi_size * INTERLEAVED_WRITE_FILTERED_DATASET_NCOLS)) /
- (hsize_t)INTERLEAVED_WRITE_FILTERED_DATASET_NCOLS)
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
+ }
- /* Add the amount that gets added when a rank moves down to its next section
- vertically in the dataset */
- + ((hsize_t)INTERLEAVED_WRITE_FILTERED_DATASET_NCOLS *
- (i / (hsize_t)(mpi_size * INTERLEAVED_WRITE_FILTERED_DATASET_NCOLS))));
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids, dxpl_id, data_bufs,
+ test_mode);
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, data) >= 0),
- "Dataset write succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ free(data_bufs_nc[dset_idx]);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, ALL_CHUNKS_WRITTEN);
- if (data)
- free(data);
+ /* Close and re-open datasets */
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
+ open_datasets(group_id, INTERLEAVED_WRITE_FILTERED_DATASET_NAME, num_dsets, test_mode, dset_ids);
/* Verify the correct data was written */
- read_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != read_buf), "calloc succeeded");
+ correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(C_DATATYPE);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ correct_bufs[dset_idx] = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_bufs[dset_idx]), "calloc succeeded");
+ read_bufs[dset_idx] = calloc(1, correct_buf_size);
+ VRFY((NULL != read_bufs[dset_idx]), "calloc succeeded");
+
+ for (size_t j = 0; j < correct_buf_size / sizeof(C_DATATYPE); j++)
+ correct_bufs[dset_idx][j] =
+ /* Add the Column Index */
+ (C_DATATYPE)((j % (hsize_t)INTERLEAVED_WRITE_FILTERED_DATASET_NCOLS)
+
+ /* Add the Row Index */
+ + ((j % (hsize_t)(mpi_size * INTERLEAVED_WRITE_FILTERED_DATASET_NCOLS)) /
+ (hsize_t)INTERLEAVED_WRITE_FILTERED_DATASET_NCOLS)
+
+ /* Add the amount that gets added when a rank moves down to its next section
+ vertically in the dataset */
+ + ((hsize_t)INTERLEAVED_WRITE_FILTERED_DATASET_NCOLS *
+ (j / (hsize_t)(mpi_size * INTERLEAVED_WRITE_FILTERED_DATASET_NCOLS)))
+
+ /* Add an increment factor for the multi-dataset case */
+ + dset_idx);
+ }
- dset_id = H5Dopen2(group_id, INTERLEAVED_WRITE_FILTERED_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_bufs, test_mode);
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((0 == memcmp(read_bufs[dset_idx], correct_bufs[dset_idx], correct_buf_size)),
+ "Data verification succeeded");
- VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ free(read_bufs[dset_idx]);
+ free(correct_bufs[dset_idx]);
+ }
- if (correct_buf)
- free(correct_buf);
- if (read_buf)
- free(read_buf);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
- VRFY((H5Sclose(memspace) >= 0), "Memory dataspace close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -2251,11 +2752,13 @@ test_write_filtered_dataset_interleaved_write(const char *parent_group, H5Z_filt
*/
static void
test_write_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t filter_id,
- hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id)
+ hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode)
{
- C_DATATYPE *data = NULL;
- C_DATATYPE *read_buf = NULL;
- C_DATATYPE *correct_buf = NULL;
+ C_DATATYPE *correct_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
hsize_t dataset_dims[WRITE_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t chunk_dims[WRITE_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t sel_dims[WRITE_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_DATASET_DIMS];
@@ -2263,13 +2766,16 @@ test_write_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z
hsize_t stride[WRITE_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t count[WRITE_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t block[WRITE_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_DATASET_DIMS];
- size_t i, data_size, correct_buf_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ size_t data_size, correct_buf_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
hid_t group_id = H5I_INVALID_HID;
- hid_t filespace = H5I_INVALID_HID, memspace = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
if (MAINPROCESS)
- HDputs("Testing write to unshared transformed and filtered chunks");
+ puts("Testing write to unshared transformed and filtered chunks");
file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");
@@ -2288,9 +2794,6 @@ test_write_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z
filespace = H5Screate_simple(WRITE_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_DATASET_DIMS, dataset_dims, NULL);
VRFY((filespace >= 0), "File dataspace creation succeeded");
- memspace = H5Screate_simple(WRITE_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_DATASET_DIMS, sel_dims, NULL);
- VRFY((memspace >= 0), "Memory dataspace creation succeeded");
-
/* Create chunked dataset */
plist_id = H5Pcopy(dcpl_id);
VRFY((plist_id >= 0), "DCPL copy succeeded");
@@ -2301,12 +2804,12 @@ test_write_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z
/* Add test filter to the pipeline */
VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
- dset_id = H5Dcreate2(group_id, WRITE_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_DATASET_NAME,
- HDF5_DATATYPE_NAME, filespace, H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, WRITE_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_DATASET_NAME, HDF5_DATATYPE_NAME,
+ filespace, plist_id, test_mode, &num_dsets, dset_ids);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -2324,37 +2827,21 @@ test_write_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z
start[0] = ((hsize_t)mpi_rank * (hsize_t)WRITE_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_CH_NROWS * count[0]);
start[1] = 0;
- if (VERBOSE_MED) {
- printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- fflush(stdout);
- }
-
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
-
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
/* Fill data buffer */
- data_size = sel_dims[0] * sel_dims[1] * sizeof(*data);
- correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf);
+ data_size = sel_dims[0] * sel_dims[1] * sizeof(C_DATATYPE);
- data = (C_DATATYPE *)calloc(1, data_size);
- VRFY((NULL != data), "calloc succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ C_DATATYPE *tmp_buf = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
- correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "calloc succeeded");
+ for (size_t j = 0; j < data_size / sizeof(C_DATATYPE); j++)
+ tmp_buf[j] = (C_DATATYPE)(GEN_DATA(j) + dset_idx);
- for (i = 0; i < data_size / sizeof(*data); i++)
- data[i] = (C_DATATYPE)GEN_DATA(i);
-
- for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++)
- correct_buf[i] = (C_DATATYPE)((i % (dataset_dims[0] / (hsize_t)mpi_size * dataset_dims[1])) +
- (i / (dataset_dims[0] / (hsize_t)mpi_size * dataset_dims[1])));
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
+ }
/* Create property list for data transform */
plist_id = H5Pcopy(dxpl_id);
@@ -2363,41 +2850,57 @@ test_write_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z
/* Set data transform expression */
VRFY((H5Pset_data_transform(plist_id, "x") >= 0), "Set data transform expression succeeded");
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, plist_id, data) >= 0),
- "Dataset write succeeded");
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids, plist_id, data_bufs,
+ test_mode);
- if (data)
- free(data);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ free(data_bufs_nc[dset_idx]);
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
+ VRFY((H5Pclose(plist_id) >= 0), "DXPL close succeeded");
- /* Verify the correct data was written */
- read_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != read_buf), "calloc succeeded");
+ /* Verify space allocation status */
+ plist_id = H5Dget_create_plist(dset_ids[0]);
+ VRFY((plist_id >= 0), "H5Dget_create_plist succeeded");
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, ALL_CHUNKS_WRITTEN);
- dset_id = H5Dopen2(group_id, WRITE_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ /* Close and re-open datasets */
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, plist_id, read_buf) >= 0),
- "Dataset read succeeded");
+ open_datasets(group_id, WRITE_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_DATASET_NAME, num_dsets, test_mode,
+ dset_ids);
+
+ /* Verify the correct data was written */
+ correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(C_DATATYPE);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ correct_bufs[dset_idx] = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_bufs[dset_idx]), "calloc succeeded");
+ read_bufs[dset_idx] = calloc(1, correct_buf_size);
+ VRFY((NULL != read_bufs[dset_idx]), "calloc succeeded");
+
+ for (size_t j = 0; j < correct_buf_size / sizeof(C_DATATYPE); j++)
+ correct_bufs[dset_idx][j] =
+ (C_DATATYPE)((j % (dataset_dims[0] / (hsize_t)mpi_size * dataset_dims[1])) +
+ (j / (dataset_dims[0] / (hsize_t)mpi_size * dataset_dims[1])) + dset_idx);
+ }
- VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_bufs, test_mode);
- VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((0 == memcmp(read_bufs[dset_idx], correct_bufs[dset_idx], correct_buf_size)),
+ "Data verification succeeded");
- /* Verify space allocation status */
- plist_id = H5Dget_create_plist(dset_id);
- VRFY((plist_id >= 0), "H5Dget_create_plist succeeded");
- verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ free(read_bufs[dset_idx]);
+ free(correct_bufs[dset_idx]);
+ }
- if (correct_buf)
- free(correct_buf);
- if (read_buf)
- free(read_buf);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
- VRFY((H5Sclose(memspace) >= 0), "Memory dataspace close succeeded");
VRFY((H5Pclose(plist_id) >= 0), "DXPL close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -2413,11 +2916,13 @@ test_write_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z
*/
static void
test_write_3d_filtered_dataset_no_overlap_separate_pages(const char *parent_group, H5Z_filter_t filter_id,
- hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id)
+ hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode)
{
- C_DATATYPE *data = NULL;
- C_DATATYPE *read_buf = NULL;
- C_DATATYPE *correct_buf = NULL;
+ C_DATATYPE *correct_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
hsize_t dataset_dims[WRITE_UNSHARED_FILTERED_CHUNKS_3D_SEP_PAGE_DATASET_DIMS];
hsize_t chunk_dims[WRITE_UNSHARED_FILTERED_CHUNKS_3D_SEP_PAGE_DATASET_DIMS];
hsize_t sel_dims[WRITE_UNSHARED_FILTERED_CHUNKS_3D_SEP_PAGE_DATASET_DIMS];
@@ -2425,13 +2930,16 @@ test_write_3d_filtered_dataset_no_overlap_separate_pages(const char *parent_grou
hsize_t stride[WRITE_UNSHARED_FILTERED_CHUNKS_3D_SEP_PAGE_DATASET_DIMS];
hsize_t count[WRITE_UNSHARED_FILTERED_CHUNKS_3D_SEP_PAGE_DATASET_DIMS];
hsize_t block[WRITE_UNSHARED_FILTERED_CHUNKS_3D_SEP_PAGE_DATASET_DIMS];
- size_t i, data_size, correct_buf_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ size_t data_size, correct_buf_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
hid_t group_id = H5I_INVALID_HID;
- hid_t filespace = H5I_INVALID_HID, memspace = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
if (MAINPROCESS)
- HDputs("Testing write to unshared filtered chunks on separate pages in 3D dataset");
+ puts("Testing write to unshared filtered chunks on separate pages in 3D dataset");
file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");
@@ -2453,9 +2961,6 @@ test_write_3d_filtered_dataset_no_overlap_separate_pages(const char *parent_grou
filespace = H5Screate_simple(WRITE_UNSHARED_FILTERED_CHUNKS_3D_SEP_PAGE_DATASET_DIMS, dataset_dims, NULL);
VRFY((filespace >= 0), "File dataspace creation succeeded");
- memspace = H5Screate_simple(WRITE_UNSHARED_FILTERED_CHUNKS_3D_SEP_PAGE_DATASET_DIMS, sel_dims, NULL);
- VRFY((memspace >= 0), "Memory dataspace creation succeeded");
-
/* Create chunked dataset */
plist_id = H5Pcopy(dcpl_id);
VRFY((plist_id >= 0), "DCPL copy succeeded");
@@ -2466,12 +2971,12 @@ test_write_3d_filtered_dataset_no_overlap_separate_pages(const char *parent_grou
/* Add test filter to the pipeline */
VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
- dset_id = H5Dcreate2(group_id, WRITE_UNSHARED_FILTERED_CHUNKS_3D_SEP_PAGE_DATASET_NAME,
- HDF5_DATATYPE_NAME, filespace, H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, WRITE_UNSHARED_FILTERED_CHUNKS_3D_SEP_PAGE_DATASET_NAME, HDF5_DATATYPE_NAME,
+ filespace, plist_id, test_mode, &num_dsets, dset_ids);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -2493,71 +2998,69 @@ test_write_3d_filtered_dataset_no_overlap_separate_pages(const char *parent_grou
start[1] = 0;
start[2] = (hsize_t)mpi_rank;
- if (VERBOSE_MED) {
- printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
- " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE
- ", %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
- " ]\n",
- mpi_rank, count[0], count[1], count[2], stride[0], stride[1], stride[2], start[0], start[1],
- start[2], block[0], block[1], block[2]);
- fflush(stdout);
- }
-
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
-
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
/* Fill data buffer */
- data_size = sel_dims[0] * sel_dims[1] * sel_dims[2] * sizeof(*data);
- correct_buf_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(*correct_buf);
+ data_size = sel_dims[0] * sel_dims[1] * sel_dims[2] * sizeof(C_DATATYPE);
- data = (C_DATATYPE *)calloc(1, data_size);
- VRFY((NULL != data), "calloc succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ C_DATATYPE *tmp_buf = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
- correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "calloc succeeded");
+ for (size_t j = 0; j < data_size / sizeof(C_DATATYPE); j++)
+ tmp_buf[j] = (C_DATATYPE)(GEN_DATA(j) + dset_idx);
- for (i = 0; i < data_size / sizeof(*data); i++)
- data[i] = (C_DATATYPE)GEN_DATA(i);
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
+ }
- for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++)
- correct_buf[i] = (C_DATATYPE)((i % (hsize_t)mpi_size) + (i / (hsize_t)mpi_size));
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids, dxpl_id, data_bufs,
+ test_mode);
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, data) >= 0),
- "Dataset write succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ free(data_bufs_nc[dset_idx]);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, ALL_CHUNKS_WRITTEN);
- if (data)
- free(data);
+ /* Close and re-open datasets */
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
+ open_datasets(group_id, WRITE_UNSHARED_FILTERED_CHUNKS_3D_SEP_PAGE_DATASET_NAME, num_dsets, test_mode,
+ dset_ids);
/* Verify the correct data was written */
- read_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != read_buf), "calloc succeeded");
+ correct_buf_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(C_DATATYPE);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ correct_bufs[dset_idx] = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_bufs[dset_idx]), "calloc succeeded");
+ read_bufs[dset_idx] = calloc(1, correct_buf_size);
+ VRFY((NULL != read_bufs[dset_idx]), "calloc succeeded");
- dset_id = H5Dopen2(group_id, WRITE_UNSHARED_FILTERED_CHUNKS_3D_SEP_PAGE_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ for (size_t j = 0; j < correct_buf_size / sizeof(C_DATATYPE); j++)
+ correct_bufs[dset_idx][j] =
+ (C_DATATYPE)((j % (hsize_t)mpi_size) + (j / (hsize_t)mpi_size) + dset_idx);
+ }
+
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_bufs, test_mode);
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((0 == memcmp(read_bufs[dset_idx], correct_bufs[dset_idx], correct_buf_size)),
+ "Data verification succeeded");
- VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ free(read_bufs[dset_idx]);
+ free(correct_bufs[dset_idx]);
+ }
- if (correct_buf)
- free(correct_buf);
- if (read_buf)
- free(read_buf);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
- VRFY((H5Sclose(memspace) >= 0), "Memory dataspace close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -2573,11 +3076,13 @@ test_write_3d_filtered_dataset_no_overlap_separate_pages(const char *parent_grou
*/
static void
test_write_3d_filtered_dataset_no_overlap_same_pages(const char *parent_group, H5Z_filter_t filter_id,
- hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id)
+ hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode)
{
- C_DATATYPE *data = NULL;
- C_DATATYPE *read_buf = NULL;
- C_DATATYPE *correct_buf = NULL;
+ C_DATATYPE *correct_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
hsize_t dataset_dims[WRITE_UNSHARED_FILTERED_CHUNKS_3D_SAME_PAGE_DATASET_DIMS];
hsize_t chunk_dims[WRITE_UNSHARED_FILTERED_CHUNKS_3D_SAME_PAGE_DATASET_DIMS];
hsize_t sel_dims[WRITE_UNSHARED_FILTERED_CHUNKS_3D_SAME_PAGE_DATASET_DIMS];
@@ -2585,13 +3090,16 @@ test_write_3d_filtered_dataset_no_overlap_same_pages(const char *parent_group, H
hsize_t stride[WRITE_UNSHARED_FILTERED_CHUNKS_3D_SAME_PAGE_DATASET_DIMS];
hsize_t count[WRITE_UNSHARED_FILTERED_CHUNKS_3D_SAME_PAGE_DATASET_DIMS];
hsize_t block[WRITE_UNSHARED_FILTERED_CHUNKS_3D_SAME_PAGE_DATASET_DIMS];
- size_t i, data_size, correct_buf_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ size_t data_size, correct_buf_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
hid_t group_id = H5I_INVALID_HID;
- hid_t filespace = H5I_INVALID_HID, memspace = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
if (MAINPROCESS)
- HDputs("Testing write to unshared filtered chunks on the same pages in 3D dataset");
+ puts("Testing write to unshared filtered chunks on the same pages in 3D dataset");
file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");
@@ -2614,9 +3122,6 @@ test_write_3d_filtered_dataset_no_overlap_same_pages(const char *parent_group, H
H5Screate_simple(WRITE_UNSHARED_FILTERED_CHUNKS_3D_SAME_PAGE_DATASET_DIMS, dataset_dims, NULL);
VRFY((filespace >= 0), "File dataspace creation succeeded");
- memspace = H5Screate_simple(WRITE_UNSHARED_FILTERED_CHUNKS_3D_SAME_PAGE_DATASET_DIMS, sel_dims, NULL);
- VRFY((memspace >= 0), "Memory dataspace creation succeeded");
-
/* Create chunked dataset */
plist_id = H5Pcopy(dcpl_id);
VRFY((plist_id >= 0), "DCPL copy succeeded");
@@ -2627,12 +3132,12 @@ test_write_3d_filtered_dataset_no_overlap_same_pages(const char *parent_group, H
/* Add test filter to the pipeline */
VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
- dset_id = H5Dcreate2(group_id, WRITE_UNSHARED_FILTERED_CHUNKS_3D_SAME_PAGE_DATASET_NAME,
- HDF5_DATATYPE_NAME, filespace, H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, WRITE_UNSHARED_FILTERED_CHUNKS_3D_SAME_PAGE_DATASET_NAME, HDF5_DATATYPE_NAME,
+ filespace, plist_id, test_mode, &num_dsets, dset_ids);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -2653,72 +3158,69 @@ test_write_3d_filtered_dataset_no_overlap_same_pages(const char *parent_group, H
start[1] = 0;
start[2] = 0;
- if (VERBOSE_MED) {
- printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
- " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE
- ", %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
- " ]\n",
- mpi_rank, count[0], count[1], count[2], stride[0], stride[1], stride[2], start[0], start[1],
- start[2], block[0], block[1], block[2]);
- fflush(stdout);
- }
-
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
-
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
/* Fill data buffer */
- data_size = sel_dims[0] * sel_dims[1] * sel_dims[2] * sizeof(*data);
- correct_buf_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(*correct_buf);
+ data_size = sel_dims[0] * sel_dims[1] * sel_dims[2] * sizeof(C_DATATYPE);
- data = (C_DATATYPE *)calloc(1, data_size);
- VRFY((NULL != data), "calloc succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ C_DATATYPE *tmp_buf = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
- correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "calloc succeeded");
+ for (size_t j = 0; j < data_size / sizeof(C_DATATYPE); j++)
+ tmp_buf[j] = (C_DATATYPE)(GEN_DATA(j) + dset_idx);
- for (i = 0; i < data_size / sizeof(*data); i++)
- data[i] = (C_DATATYPE)GEN_DATA(i);
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
+ }
- for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++)
- correct_buf[i] = (C_DATATYPE)((i % (dataset_dims[0] * dataset_dims[1])) +
- (i / (dataset_dims[0] * dataset_dims[1])));
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids, dxpl_id, data_bufs,
+ test_mode);
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, data) >= 0),
- "Dataset write succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ free(data_bufs_nc[dset_idx]);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, ALL_CHUNKS_WRITTEN);
- if (data)
- free(data);
+ /* Close and re-open datasets */
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
+ open_datasets(group_id, WRITE_UNSHARED_FILTERED_CHUNKS_3D_SAME_PAGE_DATASET_NAME, num_dsets, test_mode,
+ dset_ids);
/* Verify the correct data was written */
- read_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != read_buf), "calloc succeeded");
+ correct_buf_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(C_DATATYPE);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ correct_bufs[dset_idx] = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_bufs[dset_idx]), "calloc succeeded");
+ read_bufs[dset_idx] = calloc(1, correct_buf_size);
+ VRFY((NULL != read_bufs[dset_idx]), "calloc succeeded");
+
+ for (size_t j = 0; j < correct_buf_size / sizeof(C_DATATYPE); j++)
+ correct_bufs[dset_idx][j] = (C_DATATYPE)((j % (dataset_dims[0] * dataset_dims[1])) +
+ (j / (dataset_dims[0] * dataset_dims[1])) + dset_idx);
+ }
- dset_id = H5Dopen2(group_id, WRITE_UNSHARED_FILTERED_CHUNKS_3D_SAME_PAGE_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_bufs, test_mode);
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((0 == memcmp(read_bufs[dset_idx], correct_bufs[dset_idx], correct_buf_size)),
+ "Data verification succeeded");
- VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ free(read_bufs[dset_idx]);
+ free(correct_bufs[dset_idx]);
+ }
- if (correct_buf)
- free(correct_buf);
- if (read_buf)
- free(read_buf);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
- VRFY((H5Sclose(memspace) >= 0), "Memory dataspace close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -2734,11 +3236,12 @@ test_write_3d_filtered_dataset_no_overlap_same_pages(const char *parent_group, H
*/
static void
test_write_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id)
+ hid_t dcpl_id, hid_t dxpl_id, test_mode_t test_mode)
{
- C_DATATYPE *data = NULL;
- C_DATATYPE *read_buf = NULL;
- C_DATATYPE *correct_buf = NULL;
+ C_DATATYPE *correct_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
hsize_t dataset_dims[WRITE_SHARED_FILTERED_CHUNKS_3D_DATASET_DIMS];
hsize_t chunk_dims[WRITE_SHARED_FILTERED_CHUNKS_3D_DATASET_DIMS];
hsize_t sel_dims[WRITE_SHARED_FILTERED_CHUNKS_3D_DATASET_DIMS];
@@ -2746,13 +3249,16 @@ test_write_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t fi
hsize_t stride[WRITE_SHARED_FILTERED_CHUNKS_3D_DATASET_DIMS];
hsize_t count[WRITE_SHARED_FILTERED_CHUNKS_3D_DATASET_DIMS];
hsize_t block[WRITE_SHARED_FILTERED_CHUNKS_3D_DATASET_DIMS];
- size_t i, data_size, correct_buf_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ size_t data_size, correct_buf_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
hid_t group_id = H5I_INVALID_HID;
- hid_t filespace = H5I_INVALID_HID, memspace = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
if (MAINPROCESS)
- HDputs("Testing write to shared filtered chunks in 3D dataset");
+ puts("Testing write to shared filtered chunks in 3D dataset");
file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");
@@ -2774,9 +3280,6 @@ test_write_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t fi
filespace = H5Screate_simple(WRITE_SHARED_FILTERED_CHUNKS_3D_DATASET_DIMS, dataset_dims, NULL);
VRFY((filespace >= 0), "File dataspace creation succeeded");
- memspace = H5Screate_simple(WRITE_SHARED_FILTERED_CHUNKS_3D_DATASET_DIMS, sel_dims, NULL);
- VRFY((memspace >= 0), "Memory dataspace creation succeeded");
-
/* Create chunked dataset */
plist_id = H5Pcopy(dcpl_id);
VRFY((plist_id >= 0), "DCPL copy succeeded");
@@ -2787,12 +3290,12 @@ test_write_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t fi
/* Add test filter to the pipeline */
VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
- dset_id = H5Dcreate2(group_id, WRITE_SHARED_FILTERED_CHUNKS_3D_DATASET_NAME, HDF5_DATATYPE_NAME,
- filespace, H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, WRITE_SHARED_FILTERED_CHUNKS_3D_DATASET_NAME, HDF5_DATATYPE_NAME, filespace,
+ plist_id, test_mode, &num_dsets, dset_ids);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -2812,86 +3315,86 @@ test_write_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t fi
start[1] = 0;
start[2] = 0;
- if (VERBOSE_MED) {
- printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
- " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE
- ", %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
- " ]\n",
- mpi_rank, count[0], count[1], count[2], stride[0], stride[1], stride[2], start[0], start[1],
- start[2], block[0], block[1], block[2]);
- fflush(stdout);
- }
-
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
-
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
/* Fill data buffer */
- data_size = sel_dims[0] * sel_dims[1] * sel_dims[2] * sizeof(*data);
- correct_buf_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(*correct_buf);
-
- data = (C_DATATYPE *)calloc(1, data_size);
- VRFY((NULL != data), "calloc succeeded");
-
- correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "calloc succeeded");
+ data_size = sel_dims[0] * sel_dims[1] * sel_dims[2] * sizeof(C_DATATYPE);
- for (i = 0; i < data_size / sizeof(*data); i++)
- data[i] = (C_DATATYPE)GEN_DATA(i);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ C_DATATYPE *tmp_buf = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
- for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++)
- /* Add the Column Index */
- correct_buf[i] = (C_DATATYPE)((i % (hsize_t)(WRITE_SHARED_FILTERED_CHUNKS_3D_DEPTH *
- WRITE_SHARED_FILTERED_CHUNKS_3D_NCOLS))
+ for (size_t j = 0; j < data_size / sizeof(C_DATATYPE); j++)
+ tmp_buf[j] = (C_DATATYPE)(GEN_DATA(j) + dset_idx);
- /* Add the Row Index */
- + ((i % (hsize_t)(mpi_size * WRITE_SHARED_FILTERED_CHUNKS_3D_DEPTH *
- WRITE_SHARED_FILTERED_CHUNKS_3D_NCOLS)) /
- (hsize_t)(WRITE_SHARED_FILTERED_CHUNKS_3D_DEPTH *
- WRITE_SHARED_FILTERED_CHUNKS_3D_NCOLS))
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
+ }
- /* Add the amount that gets added when a rank moves down to its next
- section vertically in the dataset */
- + ((hsize_t)(WRITE_SHARED_FILTERED_CHUNKS_3D_DEPTH *
- WRITE_SHARED_FILTERED_CHUNKS_3D_NCOLS) *
- (i / (hsize_t)(mpi_size * WRITE_SHARED_FILTERED_CHUNKS_3D_DEPTH *
- WRITE_SHARED_FILTERED_CHUNKS_3D_NCOLS))));
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids, dxpl_id, data_bufs,
+ test_mode);
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, data) >= 0),
- "Dataset write succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ free(data_bufs_nc[dset_idx]);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, ALL_CHUNKS_WRITTEN);
- if (data)
- free(data);
+ /* Close and re-open datasets */
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
+ open_datasets(group_id, WRITE_SHARED_FILTERED_CHUNKS_3D_DATASET_NAME, num_dsets, test_mode, dset_ids);
/* Verify the correct data was written */
- read_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != read_buf), "calloc succeeded");
+ correct_buf_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(C_DATATYPE);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ correct_bufs[dset_idx] = (C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_bufs[dset_idx]), "calloc succeeded");
+ read_bufs[dset_idx] = calloc(1, correct_buf_size);
+ VRFY((NULL != read_bufs[dset_idx]), "calloc succeeded");
+
+ for (size_t j = 0; j < correct_buf_size / sizeof(C_DATATYPE); j++)
+ correct_bufs[dset_idx][j] =
+ /* Add the Column Index */
+ (C_DATATYPE)((j % (hsize_t)(WRITE_SHARED_FILTERED_CHUNKS_3D_DEPTH *
+ WRITE_SHARED_FILTERED_CHUNKS_3D_NCOLS))
+
+ /* Add the Row Index */
+ + ((j % (hsize_t)(mpi_size * WRITE_SHARED_FILTERED_CHUNKS_3D_DEPTH *
+ WRITE_SHARED_FILTERED_CHUNKS_3D_NCOLS)) /
+ (hsize_t)(WRITE_SHARED_FILTERED_CHUNKS_3D_DEPTH *
+ WRITE_SHARED_FILTERED_CHUNKS_3D_NCOLS))
+
+ /* Add the amount that gets added when a rank moves down to its next
+ section vertically in the dataset */
+ + ((hsize_t)(WRITE_SHARED_FILTERED_CHUNKS_3D_DEPTH *
+ WRITE_SHARED_FILTERED_CHUNKS_3D_NCOLS) *
+ (j / (hsize_t)(mpi_size * WRITE_SHARED_FILTERED_CHUNKS_3D_DEPTH *
+ WRITE_SHARED_FILTERED_CHUNKS_3D_NCOLS)))
+
+ /* Add an increment factor for the multi-dataset case */
+ + dset_idx);
+ }
- dset_id = H5Dopen2(group_id, WRITE_SHARED_FILTERED_CHUNKS_3D_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_bufs, test_mode);
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((0 == memcmp(read_bufs[dset_idx], correct_bufs[dset_idx], correct_buf_size)),
+ "Data verification succeeded");
- VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ free(read_bufs[dset_idx]);
+ free(correct_bufs[dset_idx]);
+ }
- if (correct_buf)
- free(correct_buf);
- if (read_buf)
- free(read_buf);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
- VRFY((H5Sclose(memspace) >= 0), "Memory dataspace close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -2906,27 +3409,31 @@ test_write_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t fi
*/
static void
test_write_cmpd_filtered_dataset_no_conversion_unshared(const char *parent_group, H5Z_filter_t filter_id,
- hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id)
+ hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode)
{
- COMPOUND_C_DATATYPE *data = NULL;
- COMPOUND_C_DATATYPE *read_buf = NULL;
- COMPOUND_C_DATATYPE *correct_buf = NULL;
+ COMPOUND_C_DATATYPE *correct_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
hsize_t dataset_dims[WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_DIMS];
hsize_t chunk_dims[WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_DIMS];
- hsize_t sel_dims[WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_DIMS];
hsize_t start[WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_DIMS];
hsize_t stride[WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_DIMS];
hsize_t count[WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_DIMS];
hsize_t block[WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_DIMS];
- size_t i, correct_buf_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID,
- memtype = H5I_INVALID_HID;
- hid_t group_id = H5I_INVALID_HID;
- hid_t filespace = H5I_INVALID_HID, memspace = H5I_INVALID_HID;
+ size_t data_size, correct_buf_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ hid_t group_id = H5I_INVALID_HID;
+ hid_t memtype = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
if (MAINPROCESS)
- HDputs("Testing write to unshared filtered chunks in Compound Datatype dataset without Datatype "
- "conversion");
+ puts("Testing write to unshared filtered chunks in Compound Datatype dataset without Datatype "
+ "conversion");
/* SZIP and ScaleOffset filters don't support compound types */
if (filter_id == H5Z_FILTER_SZIP || filter_id == H5Z_FILTER_SCALEOFFSET) {
@@ -2946,17 +3453,11 @@ test_write_cmpd_filtered_dataset_no_conversion_unshared(const char *parent_group
dataset_dims[1] = (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_NCOLS;
chunk_dims[0] = WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_CH_NROWS;
chunk_dims[1] = WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_CH_NCOLS;
- sel_dims[0] = WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_CH_NROWS;
- sel_dims[1] = (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_ENTRIES_PER_PROC;
filespace = H5Screate_simple(WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_DIMS,
dataset_dims, NULL);
VRFY((filespace >= 0), "File dataspace creation succeeded");
- memspace =
- H5Screate_simple(WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_DIMS, sel_dims, NULL);
- VRFY((memspace >= 0), "Memory dataspace creation succeeded");
-
/* Create chunked dataset */
plist_id = H5Pcopy(dcpl_id);
VRFY((plist_id >= 0), "DCPL copy succeeded");
@@ -2979,12 +3480,12 @@ test_write_cmpd_filtered_dataset_no_conversion_unshared(const char *parent_group
VRFY((H5Tinsert(memtype, "LongData", HOFFSET(COMPOUND_C_DATATYPE, field3), H5T_NATIVE_LONG) >= 0),
"Datatype insertion succeeded");
- dset_id = H5Dcreate2(group_id, WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_NAME,
- memtype, filespace, H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_NAME, memtype,
+ filespace, plist_id, test_mode, &num_dsets, dset_ids);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -3000,76 +3501,77 @@ test_write_cmpd_filtered_dataset_no_conversion_unshared(const char *parent_group
start[0] = 0;
start[1] = ((hsize_t)mpi_rank * WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_CH_NCOLS);
- if (VERBOSE_MED) {
- printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- fflush(stdout);
- }
-
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
-
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
-
- data = (COMPOUND_C_DATATYPE *)calloc(
- 1, (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_ENTRIES_PER_PROC * sizeof(*data));
- VRFY((NULL != data), "calloc succeeded");
-
- correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(COMPOUND_C_DATATYPE);
-
- correct_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "calloc succeeded");
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
/* Fill data buffer */
- for (i = 0; i < (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_ENTRIES_PER_PROC; i++) {
- data[i].field1 = (short)GEN_DATA(i);
- data[i].field2 = (int)GEN_DATA(i);
- data[i].field3 = (long)GEN_DATA(i);
- }
-
- for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) {
- correct_buf[i].field1 = (short)((i % dataset_dims[1]) + (i / dataset_dims[1]));
-
- correct_buf[i].field2 = (int)((i % dataset_dims[1]) + (i / dataset_dims[1]));
+ data_size = (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_ENTRIES_PER_PROC *
+ sizeof(COMPOUND_C_DATATYPE);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ COMPOUND_C_DATATYPE *tmp_buf = (COMPOUND_C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
+
+ for (size_t j = 0;
+ j < (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_ENTRIES_PER_PROC; j++) {
+ tmp_buf[j].field1 = (short)(GEN_DATA(j) + dset_idx);
+ tmp_buf[j].field2 = (int)(GEN_DATA(j) + dset_idx);
+ tmp_buf[j].field3 = (long)(GEN_DATA(j) + dset_idx);
+ }
- correct_buf[i].field3 = (long)((i % dataset_dims[1]) + (i / dataset_dims[1]));
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
}
- VRFY((H5Dwrite(dset_id, memtype, memspace, filespace, dxpl_id, data) >= 0), "Dataset write succeeded");
+ write_datasets(num_dsets, dset_ids, memtype, H5S_BLOCK, fspace_ids, dxpl_id, data_bufs, test_mode);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ free(data_bufs_nc[dset_idx]);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, ALL_CHUNKS_WRITTEN);
- if (data)
- free(data);
+ /* Close and re-open datasets */
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
+ open_datasets(group_id, WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_NAME, num_dsets,
+ test_mode, dset_ids);
/* Verify the correct data was written */
- read_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != read_buf), "calloc succeeded");
+ correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(COMPOUND_C_DATATYPE);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ correct_bufs[dset_idx] = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_bufs[dset_idx]), "calloc succeeded");
+ read_bufs[dset_idx] = calloc(1, correct_buf_size);
+ VRFY((NULL != read_bufs[dset_idx]), "calloc succeeded");
+
+ for (size_t j = 0; j < correct_buf_size / sizeof(COMPOUND_C_DATATYPE); j++) {
+ size_t val = (j % dataset_dims[1]) + (j / dataset_dims[1]) + dset_idx;
- dset_id =
- H5Dopen2(group_id, WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ correct_bufs[dset_idx][j].field1 = (short)val;
+ correct_bufs[dset_idx][j].field2 = (int)val;
+ correct_bufs[dset_idx][j].field3 = (long)val;
+ }
+ }
- VRFY((H5Dread(dset_id, memtype, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0), "Dataset read succeeded");
+ read_datasets(num_dsets, dset_ids, memtype, H5S_ALL, H5S_ALL, dxpl_id, read_bufs, test_mode);
- VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((0 == memcmp(read_bufs[dset_idx], correct_bufs[dset_idx], correct_buf_size)),
+ "Data verification succeeded");
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ free(read_bufs[dset_idx]);
+ free(correct_bufs[dset_idx]);
+ }
- if (correct_buf)
- free(correct_buf);
- if (read_buf)
- free(read_buf);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
- VRFY((H5Sclose(memspace) >= 0), "Memory dataspace close succeeded");
VRFY((H5Tclose(memtype) >= 0), "Datatype close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -3085,27 +3587,31 @@ test_write_cmpd_filtered_dataset_no_conversion_unshared(const char *parent_group
*/
static void
test_write_cmpd_filtered_dataset_no_conversion_shared(const char *parent_group, H5Z_filter_t filter_id,
- hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id)
+ hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode)
{
- COMPOUND_C_DATATYPE *data = NULL;
- COMPOUND_C_DATATYPE *read_buf = NULL;
- COMPOUND_C_DATATYPE *correct_buf = NULL;
+ COMPOUND_C_DATATYPE *correct_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
hsize_t dataset_dims[WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_DIMS];
hsize_t chunk_dims[WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_DIMS];
- hsize_t sel_dims[WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_DIMS];
hsize_t start[WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_DIMS];
hsize_t stride[WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_DIMS];
hsize_t count[WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_DIMS];
hsize_t block[WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_DIMS];
- size_t i, correct_buf_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID,
- memtype = H5I_INVALID_HID;
- hid_t group_id = H5I_INVALID_HID;
- hid_t filespace = H5I_INVALID_HID, memspace = H5I_INVALID_HID;
+ size_t data_size, correct_buf_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ hid_t group_id = H5I_INVALID_HID;
+ hid_t memtype = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
if (MAINPROCESS)
- HDputs("Testing write to shared filtered chunks in Compound Datatype dataset without Datatype "
- "conversion");
+ puts("Testing write to shared filtered chunks in Compound Datatype dataset without Datatype "
+ "conversion");
/* SZIP and ScaleOffset filters don't support compound types */
if (filter_id == H5Z_FILTER_SZIP || filter_id == H5Z_FILTER_SCALEOFFSET) {
@@ -3125,17 +3631,11 @@ test_write_cmpd_filtered_dataset_no_conversion_shared(const char *parent_group,
dataset_dims[1] = (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_NCOLS;
chunk_dims[0] = (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_CH_NROWS;
chunk_dims[1] = WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_CH_NCOLS;
- sel_dims[0] = (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_CH_NROWS / (hsize_t)mpi_size;
- sel_dims[1] = (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_ENTRIES_PER_PROC;
filespace = H5Screate_simple(WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_DIMS,
dataset_dims, NULL);
VRFY((filespace >= 0), "File dataspace creation succeeded");
- memspace =
- H5Screate_simple(WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_DIMS, sel_dims, NULL);
- VRFY((memspace >= 0), "Memory dataspace creation succeeded");
-
/* Create chunked dataset */
plist_id = H5Pcopy(dcpl_id);
VRFY((plist_id >= 0), "DCPL copy succeeded");
@@ -3158,12 +3658,12 @@ test_write_cmpd_filtered_dataset_no_conversion_shared(const char *parent_group,
VRFY((H5Tinsert(memtype, "LongData", HOFFSET(COMPOUND_C_DATATYPE, field3), H5T_NATIVE_LONG) >= 0),
"Datatype insertion succeeded");
- dset_id = H5Dcreate2(group_id, WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_NAME, memtype,
- filespace, H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_NAME, memtype,
+ filespace, plist_id, test_mode, &num_dsets, dset_ids);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -3179,82 +3679,80 @@ test_write_cmpd_filtered_dataset_no_conversion_shared(const char *parent_group,
start[0] = (hsize_t)mpi_rank;
start[1] = 0;
- if (VERBOSE_MED) {
- printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- fflush(stdout);
- }
-
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
-
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
-
- data = (COMPOUND_C_DATATYPE *)calloc(
- 1, (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_ENTRIES_PER_PROC * sizeof(*data));
- VRFY((NULL != data), "calloc succeeded");
-
- correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(COMPOUND_C_DATATYPE);
-
- correct_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "calloc succeeded");
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
/* Fill data buffer */
- for (i = 0; i < (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_ENTRIES_PER_PROC; i++) {
- data[i].field1 = (short)GEN_DATA(i);
- data[i].field2 = (int)GEN_DATA(i);
- data[i].field3 = (long)GEN_DATA(i);
- }
-
- for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) {
- correct_buf[i].field1 =
- (short)((dataset_dims[1] * (i / ((hsize_t)mpi_size * dataset_dims[1]))) + (i % dataset_dims[1]) +
- (((i % ((hsize_t)mpi_size * dataset_dims[1])) / dataset_dims[1]) % dataset_dims[1]));
-
- correct_buf[i].field2 =
- (int)((dataset_dims[1] * (i / ((hsize_t)mpi_size * dataset_dims[1]))) + (i % dataset_dims[1]) +
- (((i % ((hsize_t)mpi_size * dataset_dims[1])) / dataset_dims[1]) % dataset_dims[1]));
+ data_size = (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_ENTRIES_PER_PROC *
+ sizeof(COMPOUND_C_DATATYPE);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ COMPOUND_C_DATATYPE *tmp_buf = (COMPOUND_C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
+
+ for (size_t j = 0; j < (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_ENTRIES_PER_PROC;
+ j++) {
+ tmp_buf[j].field1 = (short)(GEN_DATA(j) + dset_idx);
+ tmp_buf[j].field2 = (int)(GEN_DATA(j) + dset_idx);
+ tmp_buf[j].field3 = (long)(GEN_DATA(j) + dset_idx);
+ }
- correct_buf[i].field3 =
- (long)((dataset_dims[1] * (i / ((hsize_t)mpi_size * dataset_dims[1]))) + (i % dataset_dims[1]) +
- (((i % ((hsize_t)mpi_size * dataset_dims[1])) / dataset_dims[1]) % dataset_dims[1]));
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
}
- VRFY((H5Dwrite(dset_id, memtype, memspace, filespace, dxpl_id, data) >= 0), "Dataset write succeeded");
+ write_datasets(num_dsets, dset_ids, memtype, H5S_BLOCK, fspace_ids, dxpl_id, data_bufs, test_mode);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ free(data_bufs_nc[dset_idx]);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, ALL_CHUNKS_WRITTEN);
- if (data)
- free(data);
+ /* Close and re-open datasets */
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
+ open_datasets(group_id, WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_NAME, num_dsets,
+ test_mode, dset_ids);
/* Verify the correct data was written */
- read_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != read_buf), "calloc succeeded");
+ correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(COMPOUND_C_DATATYPE);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ correct_bufs[dset_idx] = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_bufs[dset_idx]), "calloc succeeded");
+ read_bufs[dset_idx] = calloc(1, correct_buf_size);
+ VRFY((NULL != read_bufs[dset_idx]), "calloc succeeded");
+
+ for (size_t j = 0; j < correct_buf_size / sizeof(COMPOUND_C_DATATYPE); j++) {
+ size_t val1 = (dataset_dims[1] * (j / ((hsize_t)mpi_size * dataset_dims[1])));
+ size_t val2 = (j % dataset_dims[1]);
+ size_t val3 = (((j % ((hsize_t)mpi_size * dataset_dims[1])) / dataset_dims[1]) % dataset_dims[1]);
+ size_t val = val1 + val2 + val3 + dset_idx;
+
+ correct_bufs[dset_idx][j].field1 = (short)val;
+ correct_bufs[dset_idx][j].field2 = (int)val;
+ correct_bufs[dset_idx][j].field3 = (long)val;
+ }
+ }
- dset_id =
- H5Dopen2(group_id, WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ read_datasets(num_dsets, dset_ids, memtype, H5S_ALL, H5S_ALL, dxpl_id, read_bufs, test_mode);
- VRFY((H5Dread(dset_id, memtype, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0), "Dataset read succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((0 == memcmp(read_bufs[dset_idx], correct_bufs[dset_idx], correct_buf_size)),
+ "Data verification succeeded");
- VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ free(read_bufs[dset_idx]);
+ free(correct_bufs[dset_idx]);
+ }
- if (correct_buf)
- free(correct_buf);
- if (read_buf)
- free(read_buf);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
- VRFY((H5Sclose(memspace) >= 0), "Memory dataspace close succeeded");
VRFY((H5Tclose(memtype) >= 0), "Datatype close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -3276,27 +3774,31 @@ test_write_cmpd_filtered_dataset_no_conversion_shared(const char *parent_group,
*/
static void
test_write_cmpd_filtered_dataset_type_conversion_unshared(const char *parent_group, H5Z_filter_t filter_id,
- hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id)
+ hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode)
{
- COMPOUND_C_DATATYPE *data = NULL;
- COMPOUND_C_DATATYPE *read_buf = NULL;
- COMPOUND_C_DATATYPE *correct_buf = NULL;
+ COMPOUND_C_DATATYPE *correct_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
hsize_t dataset_dims[WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_DIMS];
hsize_t chunk_dims[WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_DIMS];
- hsize_t sel_dims[WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_DIMS];
hsize_t start[WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_DIMS];
hsize_t stride[WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_DIMS];
hsize_t count[WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_DIMS];
hsize_t block[WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_DIMS];
- size_t i, correct_buf_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID,
- filetype = H5I_INVALID_HID, memtype = H5I_INVALID_HID;
- hid_t group_id = H5I_INVALID_HID;
- hid_t filespace = H5I_INVALID_HID, memspace = H5I_INVALID_HID;
+ size_t data_size, correct_buf_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ hid_t group_id = H5I_INVALID_HID;
+ hid_t filetype = H5I_INVALID_HID, memtype = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
if (MAINPROCESS)
- HDputs("Testing write to unshared filtered chunks in Compound Datatype dataset with Datatype "
- "conversion");
+ puts("Testing write to unshared filtered chunks in Compound Datatype dataset with Datatype "
+ "conversion");
/* Skip for MPI communicator size of 1 */
if (mpi_size == 1) {
@@ -3322,17 +3824,11 @@ test_write_cmpd_filtered_dataset_type_conversion_unshared(const char *parent_gro
dataset_dims[1] = (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_NCOLS;
chunk_dims[0] = WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_CH_NROWS;
chunk_dims[1] = WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_CH_NCOLS;
- sel_dims[0] = WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_CH_NROWS;
- sel_dims[1] = (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_ENTRIES_PER_PROC;
filespace = H5Screate_simple(WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_DIMS,
dataset_dims, NULL);
VRFY((filespace >= 0), "File dataspace creation succeeded");
- memspace = H5Screate_simple(WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_DIMS,
- sel_dims, NULL);
- VRFY((memspace >= 0), "Memory dataspace creation succeeded");
-
/* Create chunked dataset */
plist_id = H5Pcopy(dcpl_id);
VRFY((plist_id >= 0), "DCPL copy succeeded");
@@ -3363,12 +3859,12 @@ test_write_cmpd_filtered_dataset_type_conversion_unshared(const char *parent_gro
VRFY((H5Tinsert(filetype, "IntData", 8, H5T_STD_I64BE) >= 0), "Datatype insertion succeeded");
VRFY((H5Tinsert(filetype, "LongData", 16, H5T_STD_I64BE) >= 0), "Datatype insertion succeeded");
- dset_id = H5Dcreate2(group_id, WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_NAME,
- filetype, filespace, H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_NAME, filetype,
+ filespace, plist_id, test_mode, &num_dsets, dset_ids);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -3384,73 +3880,147 @@ test_write_cmpd_filtered_dataset_type_conversion_unshared(const char *parent_gro
start[0] = 0;
start[1] = ((hsize_t)mpi_rank * WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_CH_NCOLS);
- if (VERBOSE_MED) {
- printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- fflush(stdout);
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
+
+ /* Fill data buffer */
+ data_size = (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_ENTRIES_PER_PROC *
+ sizeof(COMPOUND_C_DATATYPE);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ COMPOUND_C_DATATYPE *tmp_buf = (COMPOUND_C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
+
+ for (size_t j = 0;
+ j < (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_ENTRIES_PER_PROC; j++) {
+ tmp_buf[j].field1 = (short)(GEN_DATA(j) + dset_idx);
+ tmp_buf[j].field2 = (int)(GEN_DATA(j) + dset_idx);
+ tmp_buf[j].field3 = (long)(GEN_DATA(j) + dset_idx);
+ }
+
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
}
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
+ /*
+ * Ensure that this test currently fails in most cases since type
+ * conversions break collective mode when selection I/O is disabled
+ * and the library will currently disable selection I/O when filters
+ * are applied to a dataset.
+ */
+
+ /* NOTE: Once type conversions no longer break collective mode, remove
+ * the H5E_BEGIN/END_TRY block and switch to the following code instead
+ * of the H5Dwrite loop:
+ */
+ /* write_datasets(num_dsets, dset_ids, memtype, H5S_BLOCK, fspace_ids,
+ dxpl_id, data_bufs, test_mode); */
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ herr_t expected = FAIL;
+ herr_t ret;
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
+ /*
+ * Since this currently writes datasets one by one regardless of
+ * test mode, the write call could succeed if the dataset doesn't
+ * have any filters applied to it (can currently only happen when
+ * testing a mix of filtered and unfiltered datasets with the
+ * multi-dataset APIs).
+ */
+ if (test_mode == USE_MULTIPLE_DATASETS_MIXED_FILTERED) {
+ hid_t dset_dcpl;
+ int nfilters;
- data = (COMPOUND_C_DATATYPE *)calloc(
- 1, (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_ENTRIES_PER_PROC * sizeof(*data));
- VRFY((NULL != data), "calloc succeeded");
+ dset_dcpl = H5Dget_create_plist(dset_ids[dset_idx]);
+ VRFY((dset_dcpl >= 0), "H5Dget_create_plist");
- correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(COMPOUND_C_DATATYPE);
+ nfilters = H5Pget_nfilters(dset_dcpl);
+ VRFY((nfilters >= 0), "H5Pget_nfilters");
- correct_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "calloc succeeded");
+ if (nfilters == 0)
+ expected = SUCCEED;
- /* Fill data buffer */
- for (i = 0; i < (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_ENTRIES_PER_PROC; i++) {
- data[i].field1 = (short)GEN_DATA(i);
- data[i].field2 = (int)GEN_DATA(i);
- data[i].field3 = (long)GEN_DATA(i);
- }
+ VRFY((H5Pclose(dset_dcpl) >= 0), "H5Pclose");
+ }
- /* Ensure that this test currently fails since type conversions break collective mode */
- H5E_BEGIN_TRY
- {
- VRFY((H5Dwrite(dset_id, memtype, memspace, filespace, dxpl_id, data) < 0), "Dataset write succeeded");
+ if (expected == SUCCEED)
+ ret = H5Dwrite(dset_ids[dset_idx], memtype, H5S_BLOCK, fspace_ids[dset_idx], dxpl_id,
+ data_bufs[dset_idx]);
+ else {
+ H5E_BEGIN_TRY
+ {
+ ret = H5Dwrite(dset_ids[dset_idx], memtype, H5S_BLOCK, fspace_ids[dset_idx], dxpl_id,
+ data_bufs[dset_idx]);
+ }
+ H5E_END_TRY
+ }
+
+ VRFY((ret == expected), "Dataset write");
+
+ if (expected == SUCCEED)
+ verify_chunk_opt_status(1, dxpl_id);
+ else
+ verify_chunk_opt_status(0, dxpl_id);
}
- H5E_END_TRY
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ free(data_bufs_nc[dset_idx]);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, NO_CHUNKS_WRITTEN);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, NO_CHUNKS_WRITTEN);
- if (data)
- free(data);
+ /* Close and re-open datasets */
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+
+ open_datasets(group_id, WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_NAME, num_dsets,
+ test_mode, dset_ids);
/* Verify that no data was written */
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
+ correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(COMPOUND_C_DATATYPE);
- read_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != read_buf), "calloc succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ correct_bufs[dset_idx] = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_bufs[dset_idx]), "calloc succeeded");
+ read_bufs[dset_idx] = calloc(1, correct_buf_size);
+ VRFY((NULL != read_bufs[dset_idx]), "calloc succeeded");
+ }
+
+ read_datasets(num_dsets, dset_ids, memtype, H5S_ALL, H5S_ALL, dxpl_id, read_bufs, test_mode);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ hid_t dset_dcpl;
+ int nfilters;
+
+ dset_dcpl = H5Dget_create_plist(dset_ids[dset_idx]);
+ VRFY((dset_dcpl >= 0), "H5Dget_create_plist");
- dset_id =
- H5Dopen2(group_id, WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ nfilters = H5Pget_nfilters(dset_dcpl);
+ VRFY((nfilters >= 0), "H5Pget_nfilters");
+
+ VRFY((H5Pclose(dset_dcpl) >= 0), "H5Pclose");
+
+ /*
+ * TODO: For now, skip data verification for the datasets where
+ * writes with type conversion succeeded due to selection
+ * I/O being enabled.
+ */
+ if (nfilters == 0)
+ continue;
- VRFY((H5Dread(dset_id, memtype, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0), "Dataset read succeeded");
+ VRFY((0 == memcmp(read_bufs[dset_idx], correct_bufs[dset_idx], correct_buf_size)),
+ "Data verification succeeded");
+ }
- VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ free(read_bufs[dset_idx]);
+ free(correct_bufs[dset_idx]);
+ }
- if (correct_buf)
- free(correct_buf);
- if (read_buf)
- free(read_buf);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
- VRFY((H5Sclose(memspace) >= 0), "Memory dataspace close succeeded");
VRFY((H5Tclose(filetype) >= 0), "File datatype close succeeded");
VRFY((H5Tclose(memtype) >= 0), "Memory datatype close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
@@ -3473,27 +4043,30 @@ test_write_cmpd_filtered_dataset_type_conversion_unshared(const char *parent_gro
*/
static void
test_write_cmpd_filtered_dataset_type_conversion_shared(const char *parent_group, H5Z_filter_t filter_id,
- hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id)
+ hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode)
{
- COMPOUND_C_DATATYPE *data = NULL;
- COMPOUND_C_DATATYPE *read_buf = NULL;
- COMPOUND_C_DATATYPE *correct_buf = NULL;
+ COMPOUND_C_DATATYPE *correct_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
hsize_t dataset_dims[WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_DIMS];
hsize_t chunk_dims[WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_DIMS];
- hsize_t sel_dims[WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_DIMS];
hsize_t start[WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_DIMS];
hsize_t stride[WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_DIMS];
hsize_t count[WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_DIMS];
hsize_t block[WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_DIMS];
- size_t i, correct_buf_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ size_t data_size, correct_buf_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ hid_t group_id = H5I_INVALID_HID;
hid_t filetype = H5I_INVALID_HID, memtype = H5I_INVALID_HID;
- hid_t group_id = H5I_INVALID_HID;
- hid_t filespace = H5I_INVALID_HID, memspace = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
if (MAINPROCESS)
- HDputs(
- "Testing write to shared filtered chunks in Compound Datatype dataset with Datatype conversion");
+ puts("Testing write to shared filtered chunks in Compound Datatype dataset with Datatype conversion");
/* Skip for MPI communicator size of 1 */
if (mpi_size == 1) {
@@ -3519,17 +4092,11 @@ test_write_cmpd_filtered_dataset_type_conversion_shared(const char *parent_group
dataset_dims[1] = (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_NCOLS;
chunk_dims[0] = (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_CH_NROWS;
chunk_dims[1] = WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_CH_NCOLS;
- sel_dims[0] = (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_CH_NROWS / (hsize_t)mpi_size;
- sel_dims[1] = (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_ENTRIES_PER_PROC;
filespace = H5Screate_simple(WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_DIMS,
dataset_dims, NULL);
VRFY((filespace >= 0), "File dataspace creation succeeded");
- memspace =
- H5Screate_simple(WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_DIMS, sel_dims, NULL);
- VRFY((memspace >= 0), "Memory dataspace creation succeeded");
-
/* Create chunked dataset */
plist_id = H5Pcopy(dcpl_id);
VRFY((plist_id >= 0), "DCPL copy succeeded");
@@ -3560,12 +4127,12 @@ test_write_cmpd_filtered_dataset_type_conversion_shared(const char *parent_group
VRFY((H5Tinsert(filetype, "IntData", 8, H5T_STD_I64BE) >= 0), "Datatype insertion succeeded");
VRFY((H5Tinsert(filetype, "LongData", 16, H5T_STD_I64BE) >= 0), "Datatype insertion succeeded");
- dset_id = H5Dcreate2(group_id, WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_NAME,
- filetype, filespace, H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_NAME, filetype,
+ filespace, plist_id, test_mode, &num_dsets, dset_ids);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -3581,73 +4148,147 @@ test_write_cmpd_filtered_dataset_type_conversion_shared(const char *parent_group
start[0] = (hsize_t)mpi_rank;
start[1] = 0;
- if (VERBOSE_MED) {
- printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- fflush(stdout);
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
+
+ /* Fill data buffer */
+ data_size = (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_ENTRIES_PER_PROC *
+ sizeof(COMPOUND_C_DATATYPE);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ COMPOUND_C_DATATYPE *tmp_buf = (COMPOUND_C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
+
+ for (size_t j = 0;
+ j < (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_ENTRIES_PER_PROC; j++) {
+ tmp_buf[j].field1 = (short)(GEN_DATA(j) + dset_idx);
+ tmp_buf[j].field2 = (int)(GEN_DATA(j) + dset_idx);
+ tmp_buf[j].field3 = (long)(GEN_DATA(j) + dset_idx);
+ }
+
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
}
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
+ /*
+ * Ensure that this test currently fails in most cases since type
+ * conversions break collective mode when selection I/O is disabled
+ * and the library will currently disable selection I/O when filters
+ * are applied to a dataset.
+ */
+
+ /* NOTE: Once type conversions no longer break collective mode, remove
+ * the H5E_BEGIN/END_TRY block and switch to the following code instead
+ * of the H5Dwrite loop:
+ */
+ /* write_datasets(num_dsets, dset_ids, memtype, H5S_BLOCK, fspace_ids,
+ dxpl_id, data_bufs, test_mode); */
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ herr_t expected = FAIL;
+ herr_t ret;
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
+ /*
+ * Since this currently writes datasets one by one regardless of
+ * test mode, the write call could succeed if the dataset doesn't
+ * have any filters applied to it (can currently only happen when
+ * testing a mix of filtered and unfiltered datasets with the
+ * multi-dataset APIs).
+ */
+ if (test_mode == USE_MULTIPLE_DATASETS_MIXED_FILTERED) {
+ hid_t dset_dcpl;
+ int nfilters;
- data = (COMPOUND_C_DATATYPE *)calloc(
- 1, (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_ENTRIES_PER_PROC * sizeof(*data));
- VRFY((NULL != data), "calloc succeeded");
+ dset_dcpl = H5Dget_create_plist(dset_ids[dset_idx]);
+ VRFY((dset_dcpl >= 0), "H5Dget_create_plist");
- correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(COMPOUND_C_DATATYPE);
+ nfilters = H5Pget_nfilters(dset_dcpl);
+ VRFY((nfilters >= 0), "H5Pget_nfilters");
- correct_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "calloc succeeded");
+ if (nfilters == 0)
+ expected = SUCCEED;
- /* Fill data buffer */
- for (i = 0; i < (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_ENTRIES_PER_PROC; i++) {
- data[i].field1 = (short)GEN_DATA(i);
- data[i].field2 = (int)GEN_DATA(i);
- data[i].field3 = (long)GEN_DATA(i);
- }
+ VRFY((H5Pclose(dset_dcpl) >= 0), "H5Pclose");
+ }
- /* Ensure that this test currently fails since type conversions break collective mode */
- H5E_BEGIN_TRY
- {
- VRFY((H5Dwrite(dset_id, memtype, memspace, filespace, dxpl_id, data) < 0), "Dataset write succeeded");
+ if (expected == SUCCEED)
+ ret = H5Dwrite(dset_ids[dset_idx], memtype, H5S_BLOCK, fspace_ids[dset_idx], dxpl_id,
+ data_bufs[dset_idx]);
+ else {
+ H5E_BEGIN_TRY
+ {
+ ret = H5Dwrite(dset_ids[dset_idx], memtype, H5S_BLOCK, fspace_ids[dset_idx], dxpl_id,
+ data_bufs[dset_idx]);
+ }
+ H5E_END_TRY
+ }
+
+ VRFY((ret == expected), "Dataset write");
+
+ if (expected == SUCCEED)
+ verify_chunk_opt_status(1, dxpl_id);
+ else
+ verify_chunk_opt_status(0, dxpl_id);
}
- H5E_END_TRY
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ free(data_bufs_nc[dset_idx]);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, NO_CHUNKS_WRITTEN);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, NO_CHUNKS_WRITTEN);
- if (data)
- free(data);
+ /* Close and re-open datasets */
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+
+ open_datasets(group_id, WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_NAME, num_dsets,
+ test_mode, dset_ids);
/* Verify that no data was written */
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
+ correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(COMPOUND_C_DATATYPE);
- read_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != read_buf), "calloc succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ correct_bufs[dset_idx] = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size);
+ VRFY((NULL != correct_bufs[dset_idx]), "calloc succeeded");
+ read_bufs[dset_idx] = calloc(1, correct_buf_size);
+ VRFY((NULL != read_bufs[dset_idx]), "calloc succeeded");
+ }
- dset_id =
- H5Dopen2(group_id, WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ read_datasets(num_dsets, dset_ids, memtype, H5S_ALL, H5S_ALL, dxpl_id, read_bufs, test_mode);
- VRFY((H5Dread(dset_id, memtype, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0), "Dataset read succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ hid_t dset_dcpl;
+ int nfilters;
- VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ dset_dcpl = H5Dget_create_plist(dset_ids[dset_idx]);
+ VRFY((dset_dcpl >= 0), "H5Dget_create_plist");
- if (correct_buf)
- free(correct_buf);
- if (read_buf)
- free(read_buf);
+ nfilters = H5Pget_nfilters(dset_dcpl);
+ VRFY((nfilters >= 0), "H5Pget_nfilters");
+
+ VRFY((H5Pclose(dset_dcpl) >= 0), "H5Pclose");
+
+ /*
+ * TODO: For now, skip data verification for the datasets where
+ * writes with type conversion succeeded due to selection
+ * I/O being enabled.
+ */
+ if (nfilters == 0)
+ continue;
+
+ VRFY((0 == memcmp(read_bufs[dset_idx], correct_bufs[dset_idx], correct_buf_size)),
+ "Data verification succeeded");
+ }
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ free(read_bufs[dset_idx]);
+ free(correct_bufs[dset_idx]);
+ }
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
- VRFY((H5Sclose(memspace) >= 0), "Memory dataspace close succeeded");
VRFY((H5Tclose(filetype) >= 0), "File datatype close succeeded");
VRFY((H5Tclose(memtype) >= 0), "Memory datatype close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
@@ -3669,11 +4310,12 @@ test_write_cmpd_filtered_dataset_type_conversion_shared(const char *parent_group
*/
static void
test_read_one_chunk_filtered_dataset(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id)
+ hid_t dcpl_id, hid_t dxpl_id, test_mode_t test_mode)
{
- C_DATATYPE *read_buf = NULL;
- C_DATATYPE *correct_buf = NULL;
- C_DATATYPE *global_buf = NULL;
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *global_buf = NULL;
hsize_t dataset_dims[READ_ONE_CHUNK_FILTERED_DATASET_DIMS];
hsize_t chunk_dims[READ_ONE_CHUNK_FILTERED_DATASET_DIMS];
hsize_t sel_dims[READ_ONE_CHUNK_FILTERED_DATASET_DIMS];
@@ -3682,30 +4324,79 @@ test_read_one_chunk_filtered_dataset(const char *parent_group, H5Z_filter_t filt
hsize_t count[READ_ONE_CHUNK_FILTERED_DATASET_DIMS];
hsize_t block[READ_ONE_CHUNK_FILTERED_DATASET_DIMS];
hsize_t flat_dims[1];
- size_t i, read_buf_size, correct_buf_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
- hid_t group_id = H5I_INVALID_HID;
- hid_t filespace = H5I_INVALID_HID, memspace = H5I_INVALID_HID;
+ size_t data_size, read_buf_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ hid_t group_id = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
int *recvcounts = NULL;
int *displs = NULL;
+ int mpi_code;
if (MAINPROCESS)
- HDputs("Testing read from one-chunk filtered dataset");
+ puts("Testing read from one-chunk filtered dataset");
dataset_dims[0] = (hsize_t)READ_ONE_CHUNK_FILTERED_DATASET_NROWS;
dataset_dims[1] = (hsize_t)READ_ONE_CHUNK_FILTERED_DATASET_NCOLS;
/* Setup the buffer for writing and for comparison */
- correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf);
+ data_size = dataset_dims[0] * dataset_dims[1] * sizeof(C_DATATYPE);
- correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "calloc succeeded");
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++) {
+ C_DATATYPE *tmp_buf = calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
- for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++)
- correct_buf[i] = ((C_DATATYPE)i % (READ_ONE_CHUNK_FILTERED_DATASET_CH_NROWS / mpi_size *
+ for (size_t j = 0; j < data_size / sizeof(C_DATATYPE); j++)
+ tmp_buf[j] = ((C_DATATYPE)j % (READ_ONE_CHUNK_FILTERED_DATASET_CH_NROWS / mpi_size *
+ READ_ONE_CHUNK_FILTERED_DATASET_CH_NCOLS)) +
+ ((C_DATATYPE)j / (READ_ONE_CHUNK_FILTERED_DATASET_CH_NROWS / mpi_size *
READ_ONE_CHUNK_FILTERED_DATASET_CH_NCOLS)) +
- ((C_DATATYPE)i / (READ_ONE_CHUNK_FILTERED_DATASET_CH_NROWS / mpi_size *
- READ_ONE_CHUNK_FILTERED_DATASET_CH_NCOLS));
+ (C_DATATYPE)dset_idx;
+
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
+ }
+
+ file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
+ VRFY((file_id >= 0), "Test file open succeeded");
+
+ group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
+ VRFY((group_id >= 0), "H5Gopen2 succeeded");
+
+ /* Create the dataspace for the dataset */
+ filespace = H5Screate_simple(READ_ONE_CHUNK_FILTERED_DATASET_DIMS, dataset_dims, NULL);
+ VRFY((filespace >= 0), "File dataspace creation succeeded");
+
+ /* Create chunked dataset */
+ chunk_dims[0] = (hsize_t)READ_ONE_CHUNK_FILTERED_DATASET_CH_NROWS;
+ chunk_dims[1] = (hsize_t)READ_ONE_CHUNK_FILTERED_DATASET_CH_NCOLS;
+
+ plist_id = H5Pcopy(dcpl_id);
+ VRFY((plist_id >= 0), "DCPL copy succeeded");
+
+ VRFY((H5Pset_chunk(plist_id, READ_ONE_CHUNK_FILTERED_DATASET_DIMS, chunk_dims) >= 0), "Chunk size set");
+
+ /* Add test filter to the pipeline */
+ VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
+
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, READ_ONE_CHUNK_FILTERED_DATASET_NAME, HDF5_DATATYPE_NAME, filespace, plist_id,
+ test_mode, &num_dsets, dset_ids);
+
+ /* Verify space allocation status */
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+
+ VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
+ VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
+ VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
+ VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
+
+ MPI_Barrier(comm);
if (MAINPROCESS) {
plist_id = H5Pcreate(H5P_FILE_ACCESS);
@@ -3722,52 +4413,37 @@ test_read_one_chunk_filtered_dataset(const char *parent_group, H5Z_filter_t filt
group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
VRFY((group_id >= 0), "H5Gopen2 succeeded");
- /* Create the dataspace for the dataset */
- filespace = H5Screate_simple(READ_ONE_CHUNK_FILTERED_DATASET_DIMS, dataset_dims, NULL);
- VRFY((filespace >= 0), "File dataspace creation succeeded");
-
- /* Create chunked dataset */
- chunk_dims[0] = (hsize_t)READ_ONE_CHUNK_FILTERED_DATASET_CH_NROWS;
- chunk_dims[1] = (hsize_t)READ_ONE_CHUNK_FILTERED_DATASET_CH_NCOLS;
-
- plist_id = H5Pcopy(dcpl_id);
- VRFY((plist_id >= 0), "DCPL copy succeeded");
-
- VRFY((H5Pset_chunk(plist_id, READ_ONE_CHUNK_FILTERED_DATASET_DIMS, chunk_dims) >= 0),
- "Chunk size set");
+ open_datasets(group_id, READ_ONE_CHUNK_FILTERED_DATASET_NAME, num_dsets, test_mode, dset_ids);
- /* Add test filter to the pipeline */
- VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
+ select_all(num_dsets, dset_ids, fspace_ids);
- dset_id = H5Dcreate2(group_id, READ_ONE_CHUNK_FILTERED_DATASET_NAME, HDF5_DATATYPE_NAME, filespace,
- H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_ALL, fspace_ids, H5P_DEFAULT, data_bufs,
+ test_mode);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
-
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
-
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, H5P_DEFAULT, correct_buf) >= 0),
- "Dataset write succeeded");
+ plist_id = H5Dget_create_plist(dset_ids[0]);
+ VRFY((plist_id >= 0), "H5Dget_create_plist succeeded");
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, ALL_CHUNKS_WRITTEN);
- /* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
}
+ MPI_Barrier(comm);
+
file_id = H5Fopen(filenames[0], H5F_ACC_RDONLY, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");
group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
VRFY((group_id >= 0), "H5Gopen2 succeeded");
- dset_id = H5Dopen2(group_id, READ_ONE_CHUNK_FILTERED_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ open_datasets(group_id, READ_ONE_CHUNK_FILTERED_DATASET_NAME, num_dsets, test_mode, dset_ids);
sel_dims[0] = (hsize_t)READ_ONE_CHUNK_FILTERED_DATASET_NROWS / (hsize_t)mpi_size;
sel_dims[1] = (hsize_t)READ_ONE_CHUNK_FILTERED_DATASET_NCOLS;
@@ -3775,13 +4451,6 @@ test_read_one_chunk_filtered_dataset(const char *parent_group, H5Z_filter_t filt
/* Setup one-dimensional memory dataspace for reading the dataset data into a contiguous buffer */
flat_dims[0] = sel_dims[0] * sel_dims[1];
- memspace = H5Screate_simple(1, flat_dims, NULL);
- VRFY((memspace >= 0), "Memory dataspace creation succeeded");
-
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
-
/*
* Each process defines the dataset selection in the file and
* reads it to the selection in memory
@@ -3795,61 +4464,54 @@ test_read_one_chunk_filtered_dataset(const char *parent_group, H5Z_filter_t filt
start[0] = ((hsize_t)mpi_rank * sel_dims[0]);
start[1] = 0;
- if (VERBOSE_MED) {
- printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- fflush(stdout);
- }
-
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
-
- read_buf_size = flat_dims[0] * sizeof(*read_buf);
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
- read_buf = (C_DATATYPE *)calloc(1, read_buf_size);
- VRFY((NULL != read_buf), "calloc succeeded");
+ read_buf_size = flat_dims[0] * sizeof(C_DATATYPE);
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ read_bufs[dset_idx] = calloc(1, read_buf_size);
+ VRFY((NULL != read_bufs[dset_idx]), "calloc succeeded");
+ }
- global_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != global_buf), "calloc succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids[0], dxpl_id, read_bufs,
+ test_mode);
/* Collect each piece of data from all ranks into a global buffer on all ranks */
- recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts));
+ global_buf = calloc(1, data_size);
+ VRFY((NULL != global_buf), "calloc succeeded");
+ recvcounts = calloc(1, (size_t)mpi_size * sizeof(*recvcounts));
VRFY((NULL != recvcounts), "calloc succeeded");
+ displs = calloc(1, (size_t)mpi_size * sizeof(*displs));
+ VRFY((NULL != displs), "calloc succeeded");
- for (i = 0; i < (size_t)mpi_size; i++)
+ for (size_t i = 0; i < (size_t)mpi_size; i++) {
recvcounts[i] = (int)flat_dims[0];
+ displs[i] = (int)(i * flat_dims[0]);
+ }
- displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs));
- VRFY((NULL != displs), "calloc succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ mpi_code = MPI_Allgatherv(read_bufs[dset_idx], (int)flat_dims[0], C_DATATYPE_MPI, global_buf,
+ recvcounts, displs, C_DATATYPE_MPI, comm);
+ VRFY((MPI_SUCCESS == mpi_code), "MPI_Allgatherv succeeded");
- for (i = 0; i < (size_t)mpi_size; i++)
- displs[i] = (int)(i * flat_dims[0]);
+ VRFY((0 == memcmp(global_buf, data_bufs[dset_idx], data_size)), "Data verification succeeded");
+ }
- VRFY((MPI_SUCCESS == MPI_Allgatherv(read_buf, (int)flat_dims[0], C_DATATYPE_MPI, global_buf, recvcounts,
- displs, C_DATATYPE_MPI, comm)),
- "MPI_Allgatherv succeeded");
+ free(displs);
+ free(recvcounts);
+ free(global_buf);
- VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ free(read_bufs[dset_idx]);
- if (displs)
- free(displs);
- if (recvcounts)
- free(recvcounts);
- if (global_buf)
- free(global_buf);
- if (read_buf)
- free(read_buf);
- if (correct_buf)
- free(correct_buf);
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++)
+ free(data_bufs_nc[dset_idx]);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
- VRFY((H5Sclose(memspace) >= 0), "Memory dataspace close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -3868,11 +4530,12 @@ test_read_one_chunk_filtered_dataset(const char *parent_group, H5Z_filter_t filt
*/
static void
test_read_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id)
+ hid_t dcpl_id, hid_t dxpl_id, test_mode_t test_mode)
{
- C_DATATYPE *read_buf = NULL;
- C_DATATYPE *correct_buf = NULL;
- C_DATATYPE *global_buf = NULL;
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *global_buf = NULL;
hsize_t dataset_dims[READ_UNSHARED_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t chunk_dims[READ_UNSHARED_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t sel_dims[READ_UNSHARED_FILTERED_CHUNKS_DATASET_DIMS];
@@ -3881,29 +4544,79 @@ test_read_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t fil
hsize_t count[READ_UNSHARED_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t block[READ_UNSHARED_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t flat_dims[1];
- size_t i, read_buf_size, correct_buf_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
- hid_t group_id = H5I_INVALID_HID;
- hid_t filespace = H5I_INVALID_HID, memspace = H5I_INVALID_HID;
+ size_t data_size, read_buf_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ hid_t group_id = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
int *recvcounts = NULL;
int *displs = NULL;
+ int mpi_code;
if (MAINPROCESS)
- HDputs("Testing read from unshared filtered chunks");
+ puts("Testing read from unshared filtered chunks");
dataset_dims[0] = (hsize_t)READ_UNSHARED_FILTERED_CHUNKS_NROWS;
dataset_dims[1] = (hsize_t)READ_UNSHARED_FILTERED_CHUNKS_NCOLS;
/* Setup the buffer for writing and for comparison */
- correct_buf_size = (hsize_t)READ_UNSHARED_FILTERED_CHUNKS_NROWS *
- (hsize_t)READ_UNSHARED_FILTERED_CHUNKS_NCOLS * sizeof(*correct_buf);
+ data_size = (hsize_t)READ_UNSHARED_FILTERED_CHUNKS_NROWS * (hsize_t)READ_UNSHARED_FILTERED_CHUNKS_NCOLS *
+ sizeof(C_DATATYPE);
+
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++) {
+ C_DATATYPE *tmp_buf = calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
- correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "calloc succeeded");
+ for (size_t j = 0; j < data_size / sizeof(C_DATATYPE); j++)
+ tmp_buf[j] =
+ (C_DATATYPE)((j % (dataset_dims[0] / (hsize_t)mpi_size * dataset_dims[1])) +
+ (j / (dataset_dims[0] / (hsize_t)mpi_size * dataset_dims[1])) + dset_idx);
+
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
+ }
+
+ file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
+ VRFY((file_id >= 0), "Test file open succeeded");
+
+ group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
+ VRFY((group_id >= 0), "H5Gopen2 succeeded");
+
+ /* Create the dataspace for the dataset */
+ filespace = H5Screate_simple(READ_UNSHARED_FILTERED_CHUNKS_DATASET_DIMS, dataset_dims, NULL);
+ VRFY((filespace >= 0), "File dataspace creation succeeded");
+
+ /* Create chunked dataset */
+ chunk_dims[0] = (hsize_t)READ_UNSHARED_FILTERED_CHUNKS_CH_NROWS;
+ chunk_dims[1] = (hsize_t)READ_UNSHARED_FILTERED_CHUNKS_CH_NCOLS;
+
+ plist_id = H5Pcopy(dcpl_id);
+ VRFY((plist_id >= 0), "DCPL copy succeeded");
+
+ VRFY((H5Pset_chunk(plist_id, READ_UNSHARED_FILTERED_CHUNKS_DATASET_DIMS, chunk_dims) >= 0),
+ "Chunk size set");
+
+ /* Add test filter to the pipeline */
+ VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
- for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++)
- correct_buf[i] = (C_DATATYPE)((i % (dataset_dims[0] / (hsize_t)mpi_size * dataset_dims[1])) +
- (i / (dataset_dims[0] / (hsize_t)mpi_size * dataset_dims[1])));
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, READ_UNSHARED_FILTERED_CHUNKS_DATASET_NAME, HDF5_DATATYPE_NAME, filespace,
+ plist_id, test_mode, &num_dsets, dset_ids);
+
+ /* Verify space allocation status */
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+
+ VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
+ VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
+ VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
+ VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
+
+ MPI_Barrier(comm);
if (MAINPROCESS) {
plist_id = H5Pcreate(H5P_FILE_ACCESS);
@@ -3920,52 +4633,37 @@ test_read_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t fil
group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
VRFY((group_id >= 0), "H5Gopen2 succeeded");
- /* Create the dataspace for the dataset */
- filespace = H5Screate_simple(READ_UNSHARED_FILTERED_CHUNKS_DATASET_DIMS, dataset_dims, NULL);
- VRFY((filespace >= 0), "File dataspace creation succeeded");
-
- /* Create chunked dataset */
- chunk_dims[0] = (hsize_t)READ_UNSHARED_FILTERED_CHUNKS_CH_NROWS;
- chunk_dims[1] = (hsize_t)READ_UNSHARED_FILTERED_CHUNKS_CH_NCOLS;
-
- plist_id = H5Pcopy(dcpl_id);
- VRFY((plist_id >= 0), "DCPL copy succeeded");
+ open_datasets(group_id, READ_UNSHARED_FILTERED_CHUNKS_DATASET_NAME, num_dsets, test_mode, dset_ids);
- VRFY((H5Pset_chunk(plist_id, READ_UNSHARED_FILTERED_CHUNKS_DATASET_DIMS, chunk_dims) >= 0),
- "Chunk size set");
+ select_all(num_dsets, dset_ids, fspace_ids);
- /* Add test filter to the pipeline */
- VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
-
- dset_id = H5Dcreate2(group_id, READ_UNSHARED_FILTERED_CHUNKS_DATASET_NAME, HDF5_DATATYPE_NAME,
- filespace, H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_ALL, fspace_ids, H5P_DEFAULT, data_bufs,
+ test_mode);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
-
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
-
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, H5P_DEFAULT, correct_buf) >= 0),
- "Dataset write succeeded");
+ plist_id = H5Dget_create_plist(dset_ids[0]);
+ VRFY((plist_id >= 0), "H5Dget_create_plist succeeded");
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, ALL_CHUNKS_WRITTEN);
- /* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
}
+ MPI_Barrier(comm);
+
file_id = H5Fopen(filenames[0], H5F_ACC_RDONLY, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");
group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
VRFY((group_id >= 0), "H5Gopen2 succeeded");
- dset_id = H5Dopen2(group_id, READ_UNSHARED_FILTERED_CHUNKS_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ open_datasets(group_id, READ_UNSHARED_FILTERED_CHUNKS_DATASET_NAME, num_dsets, test_mode, dset_ids);
sel_dims[0] = (hsize_t)READ_UNSHARED_FILTERED_CHUNKS_CH_NROWS;
sel_dims[1] = (hsize_t)READ_UNSHARED_FILTERED_CHUNKS_NCOLS;
@@ -3973,13 +4671,6 @@ test_read_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t fil
/* Setup one-dimensional memory dataspace for reading the dataset data into a contiguous buffer */
flat_dims[0] = sel_dims[0] * sel_dims[1];
- memspace = H5Screate_simple(1, flat_dims, NULL);
- VRFY((memspace >= 0), "Memory dataspace creation succeeded");
-
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
-
/*
* Each process defines the dataset selection in the file and reads
* it to the selection in memory
@@ -3993,61 +4684,54 @@ test_read_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t fil
start[0] = ((hsize_t)mpi_rank * (hsize_t)READ_UNSHARED_FILTERED_CHUNKS_CH_NROWS * count[0]);
start[1] = 0;
- if (VERBOSE_MED) {
- printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- fflush(stdout);
- }
-
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
- read_buf_size = flat_dims[0] * sizeof(*read_buf);
+ read_buf_size = flat_dims[0] * sizeof(C_DATATYPE);
- read_buf = (C_DATATYPE *)calloc(1, read_buf_size);
- VRFY((NULL != read_buf), "calloc succeeded");
-
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ read_bufs[dset_idx] = calloc(1, read_buf_size);
+ VRFY((NULL != read_bufs[dset_idx]), "calloc succeeded");
+ }
- global_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != global_buf), "calloc succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids[0], dxpl_id, read_bufs,
+ test_mode);
/* Collect each piece of data from all ranks into a global buffer on all ranks */
- recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts));
+ global_buf = calloc(1, data_size);
+ VRFY((NULL != global_buf), "calloc succeeded");
+ recvcounts = calloc(1, (size_t)mpi_size * sizeof(*recvcounts));
VRFY((NULL != recvcounts), "calloc succeeded");
+ displs = calloc(1, (size_t)mpi_size * sizeof(*displs));
+ VRFY((NULL != displs), "calloc succeeded");
- for (i = 0; i < (size_t)mpi_size; i++)
+ for (size_t i = 0; i < (size_t)mpi_size; i++) {
recvcounts[i] = (int)flat_dims[0];
+ displs[i] = (int)(i * flat_dims[0]);
+ }
- displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs));
- VRFY((NULL != displs), "calloc succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ mpi_code = MPI_Allgatherv(read_bufs[dset_idx], (int)flat_dims[0], C_DATATYPE_MPI, global_buf,
+ recvcounts, displs, C_DATATYPE_MPI, comm);
+ VRFY((MPI_SUCCESS == mpi_code), "MPI_Allgatherv succeeded");
+
+ VRFY((0 == memcmp(global_buf, data_bufs[dset_idx], data_size)), "Data verification succeeded");
+ }
- for (i = 0; i < (size_t)mpi_size; i++)
- displs[i] = (int)(i * flat_dims[0]);
+ free(displs);
+ free(recvcounts);
+ free(global_buf);
- VRFY((MPI_SUCCESS == MPI_Allgatherv(read_buf, (int)flat_dims[0], C_DATATYPE_MPI, global_buf, recvcounts,
- displs, C_DATATYPE_MPI, comm)),
- "MPI_Allgatherv succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ free(read_bufs[dset_idx]);
- VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++)
+ free(data_bufs_nc[dset_idx]);
- if (displs)
- free(displs);
- if (recvcounts)
- free(recvcounts);
- if (global_buf)
- free(global_buf);
- if (read_buf)
- free(read_buf);
- if (correct_buf)
- free(correct_buf);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
- VRFY((H5Sclose(memspace) >= 0), "Memory dataspace close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -4067,11 +4751,12 @@ test_read_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t fil
*/
static void
test_read_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id)
+ hid_t dcpl_id, hid_t dxpl_id, test_mode_t test_mode)
{
- C_DATATYPE *read_buf = NULL;
- C_DATATYPE *correct_buf = NULL;
- C_DATATYPE *global_buf = NULL;
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *global_buf = NULL;
hsize_t dataset_dims[READ_SHARED_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t chunk_dims[READ_SHARED_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t sel_dims[READ_SHARED_FILTERED_CHUNKS_DATASET_DIMS];
@@ -4080,30 +4765,80 @@ test_read_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filter
hsize_t count[READ_SHARED_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t block[READ_SHARED_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t flat_dims[1];
- size_t i, read_buf_size, correct_buf_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
- hid_t group_id = H5I_INVALID_HID;
- hid_t filespace = H5I_INVALID_HID, memspace = H5I_INVALID_HID;
+ size_t data_size, read_buf_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ hid_t group_id = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
int *recvcounts = NULL;
int *displs = NULL;
+ int mpi_code;
if (MAINPROCESS)
- HDputs("Testing read from shared filtered chunks");
+ puts("Testing read from shared filtered chunks");
dataset_dims[0] = (hsize_t)READ_SHARED_FILTERED_CHUNKS_NROWS;
dataset_dims[1] = (hsize_t)READ_SHARED_FILTERED_CHUNKS_NCOLS;
/* Setup the buffer for writing and for comparison */
- correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf);
+ data_size = dataset_dims[0] * dataset_dims[1] * sizeof(C_DATATYPE);
+
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++) {
+ C_DATATYPE *tmp_buf = calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
+
+ for (size_t j = 0; j < data_size / sizeof(C_DATATYPE); j++)
+ tmp_buf[j] = (C_DATATYPE)((dataset_dims[1] * (j / ((hsize_t)mpi_size * dataset_dims[1]))) +
+ (j % dataset_dims[1]) +
+ (((j % ((hsize_t)mpi_size * dataset_dims[1])) / dataset_dims[1]) %
+ dataset_dims[1]) +
+ dset_idx);
+
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
+ }
+
+ file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
+ VRFY((file_id >= 0), "Test file open succeeded");
+
+ group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
+ VRFY((group_id >= 0), "H5Gopen2 succeeded");
- correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "calloc succeeded");
+ /* Create the dataspace for the dataset */
+ filespace = H5Screate_simple(READ_SHARED_FILTERED_CHUNKS_DATASET_DIMS, dataset_dims, NULL);
+ VRFY((filespace >= 0), "File dataspace creation succeeded");
+
+ /* Create chunked dataset */
+ chunk_dims[0] = (hsize_t)READ_SHARED_FILTERED_CHUNKS_CH_NROWS;
+ chunk_dims[1] = (hsize_t)READ_SHARED_FILTERED_CHUNKS_CH_NCOLS;
- for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++)
- correct_buf[i] =
- (C_DATATYPE)((dataset_dims[1] * (i / ((hsize_t)mpi_size * dataset_dims[1]))) +
- (i % dataset_dims[1]) +
- (((i % ((hsize_t)mpi_size * dataset_dims[1])) / dataset_dims[1]) % dataset_dims[1]));
+ plist_id = H5Pcopy(dcpl_id);
+ VRFY((plist_id >= 0), "DCPL copy succeeded");
+
+ VRFY((H5Pset_chunk(plist_id, READ_SHARED_FILTERED_CHUNKS_DATASET_DIMS, chunk_dims) >= 0),
+ "Chunk size set");
+
+ /* Add test filter to the pipeline */
+ VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
+
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, READ_SHARED_FILTERED_CHUNKS_DATASET_NAME, HDF5_DATATYPE_NAME, filespace,
+ plist_id, test_mode, &num_dsets, dset_ids);
+
+ /* Verify space allocation status */
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+
+ VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
+ VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
+ VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
+ VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
+
+ MPI_Barrier(comm);
if (MAINPROCESS) {
plist_id = H5Pcreate(H5P_FILE_ACCESS);
@@ -4120,52 +4855,37 @@ test_read_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filter
group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
VRFY((group_id >= 0), "H5Gopen2 succeeded");
- /* Create the dataspace for the dataset */
- filespace = H5Screate_simple(READ_SHARED_FILTERED_CHUNKS_DATASET_DIMS, dataset_dims, NULL);
- VRFY((filespace >= 0), "File dataspace creation succeeded");
-
- /* Create chunked dataset */
- chunk_dims[0] = (hsize_t)READ_SHARED_FILTERED_CHUNKS_CH_NROWS;
- chunk_dims[1] = (hsize_t)READ_SHARED_FILTERED_CHUNKS_CH_NCOLS;
+ open_datasets(group_id, READ_SHARED_FILTERED_CHUNKS_DATASET_NAME, num_dsets, test_mode, dset_ids);
- plist_id = H5Pcopy(dcpl_id);
- VRFY((plist_id >= 0), "DCPL copy succeeded");
+ select_all(num_dsets, dset_ids, fspace_ids);
- VRFY((H5Pset_chunk(plist_id, READ_SHARED_FILTERED_CHUNKS_DATASET_DIMS, chunk_dims) >= 0),
- "Chunk size set");
-
- /* Add test filter to the pipeline */
- VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
-
- dset_id = H5Dcreate2(group_id, READ_SHARED_FILTERED_CHUNKS_DATASET_NAME, HDF5_DATATYPE_NAME,
- filespace, H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_ALL, fspace_ids, H5P_DEFAULT, data_bufs,
+ test_mode);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
-
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
-
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, H5P_DEFAULT, correct_buf) >= 0),
- "Dataset write succeeded");
+ plist_id = H5Dget_create_plist(dset_ids[0]);
+ VRFY((plist_id >= 0), "H5Dget_create_plist succeeded");
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, ALL_CHUNKS_WRITTEN);
- /* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
}
+ MPI_Barrier(comm);
+
file_id = H5Fopen(filenames[0], H5F_ACC_RDONLY, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");
group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
VRFY((group_id >= 0), "H5Gopen2 succeeded");
- dset_id = H5Dopen2(group_id, READ_SHARED_FILTERED_CHUNKS_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ open_datasets(group_id, READ_SHARED_FILTERED_CHUNKS_DATASET_NAME, num_dsets, test_mode, dset_ids);
sel_dims[0] = (hsize_t)DIM0_SCALE_FACTOR;
sel_dims[1] = (hsize_t)READ_SHARED_FILTERED_CHUNKS_CH_NCOLS * (hsize_t)DIM1_SCALE_FACTOR;
@@ -4173,13 +4893,6 @@ test_read_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filter
/* Setup one-dimensional memory dataspace for reading the dataset data into a contiguous buffer */
flat_dims[0] = sel_dims[0] * sel_dims[1];
- memspace = H5Screate_simple(1, flat_dims, NULL);
- VRFY((memspace >= 0), "Memory dataspace creation succeeded");
-
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
-
/*
* Each process defines the dataset selection in the file and
* reads it to the selection in memory
@@ -4193,77 +4906,71 @@ test_read_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filter
start[0] = (hsize_t)mpi_rank * block[0];
start[1] = 0;
- if (VERBOSE_MED) {
- printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- fflush(stdout);
- }
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
+ read_buf_size = flat_dims[0] * sizeof(C_DATATYPE);
- read_buf_size = flat_dims[0] * sizeof(*read_buf);
-
- read_buf = (C_DATATYPE *)calloc(1, read_buf_size);
- VRFY((NULL != read_buf), "calloc succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ read_bufs[dset_idx] = calloc(1, read_buf_size);
+ VRFY((NULL != read_bufs[dset_idx]), "calloc succeeded");
+ }
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids[0], dxpl_id, read_bufs,
+ test_mode);
- global_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ /* Collect each piece of data from all ranks into a global buffer on all ranks */
+ global_buf = calloc(1, data_size);
VRFY((NULL != global_buf), "calloc succeeded");
+ recvcounts = calloc(1, (size_t)mpi_size * sizeof(*recvcounts));
+ VRFY((NULL != recvcounts), "calloc succeeded");
+ displs = calloc(1, (size_t)mpi_size * sizeof(*displs));
+ VRFY((NULL != displs), "calloc succeeded");
/*
* Since these chunks are shared, run multiple rounds of MPI_Allgatherv
* to collect all of the pieces into their appropriate locations. The
- * number of times MPI_Allgatherv is run should be equal to the number
- * of chunks in the first dimension of the dataset.
+ * number of times MPI_Allgatherv is run for each dataset should be equal
+ * to the number of chunks in the first dimension of the dataset.
*/
- {
- size_t loop_count = count[0];
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
size_t total_recvcounts = 0;
- recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts));
- VRFY((NULL != recvcounts), "calloc succeeded");
+ for (size_t j = 0; j < (size_t)mpi_size; j++) {
+ recvcounts[j] = (int)dataset_dims[1];
+ total_recvcounts += (size_t)recvcounts[j];
- displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs));
- VRFY((NULL != displs), "calloc succeeded");
-
- for (i = 0; i < (size_t)mpi_size; i++) {
- recvcounts[i] = (int)dataset_dims[1];
- total_recvcounts += (size_t)recvcounts[i];
+ displs[j] = (int)(j * dataset_dims[1]);
}
- for (i = 0; i < (size_t)mpi_size; i++)
- displs[i] = (int)(i * dataset_dims[1]);
+ for (size_t loop_count = count[0]; loop_count; loop_count--) {
+ C_DATATYPE *tmp_buf = (C_DATATYPE *)read_bufs[dset_idx];
+ C_DATATYPE *tmp_glob_buf = (C_DATATYPE *)global_buf;
- for (; loop_count; loop_count--) {
- VRFY((MPI_SUCCESS == MPI_Allgatherv(&read_buf[(count[0] - loop_count) * dataset_dims[1]],
- recvcounts[mpi_rank], C_DATATYPE_MPI,
- &global_buf[(count[0] - loop_count) * total_recvcounts],
- recvcounts, displs, C_DATATYPE_MPI, comm)),
- "MPI_Allgatherv succeeded");
+ mpi_code =
+ MPI_Allgatherv(&tmp_buf[(count[0] - loop_count) * dataset_dims[1]], recvcounts[mpi_rank],
+ C_DATATYPE_MPI, &tmp_glob_buf[(count[0] - loop_count) * total_recvcounts],
+ recvcounts, displs, C_DATATYPE_MPI, comm);
+ VRFY((MPI_SUCCESS == mpi_code), "MPI_Allgatherv succeeded");
}
+
+ VRFY((0 == memcmp(global_buf, data_bufs[dset_idx], data_size)), "Data verification succeeded");
}
- VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ free(displs);
+ free(recvcounts);
+ free(global_buf);
- if (displs)
- free(displs);
- if (recvcounts)
- free(recvcounts);
- if (global_buf)
- free(global_buf);
- if (read_buf)
- free(read_buf);
- if (correct_buf)
- free(correct_buf);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ free(read_bufs[dset_idx]);
+
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++)
+ free(data_bufs_nc[dset_idx]);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
- VRFY((H5Sclose(memspace) >= 0), "Memory dataspace close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -4283,11 +4990,13 @@ test_read_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filter
*/
static void
test_read_filtered_dataset_single_no_selection(const char *parent_group, H5Z_filter_t filter_id,
- hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id)
+ hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode)
{
- C_DATATYPE *read_buf = NULL;
- C_DATATYPE *correct_buf = NULL;
- C_DATATYPE *global_buf = NULL;
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *global_buf = NULL;
hsize_t dataset_dims[READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t chunk_dims[READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t sel_dims[READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_DATASET_DIMS];
@@ -4296,34 +5005,85 @@ test_read_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fil
hsize_t count[READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t block[READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t flat_dims[1];
- size_t i, read_buf_size, correct_buf_size;
- size_t segment_length;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
- hid_t group_id = H5I_INVALID_HID;
- hid_t filespace = H5I_INVALID_HID, memspace = H5I_INVALID_HID;
+ size_t data_size, read_buf_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ hid_t group_id = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
int *recvcounts = NULL;
int *displs = NULL;
+ int mpi_code;
if (MAINPROCESS)
- HDputs("Testing read from filtered chunks with a single process having no selection");
+ puts("Testing read from filtered chunks with a single process having no selection");
dataset_dims[0] = (hsize_t)READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NROWS;
dataset_dims[1] = (hsize_t)READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NCOLS;
/* Setup the buffer for writing and for comparison */
- correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf);
+ data_size = dataset_dims[0] * dataset_dims[1] * sizeof(C_DATATYPE);
+
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++) {
+ size_t segment_length;
+
+ C_DATATYPE *tmp_buf = calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
+
+ for (size_t j = 0; j < data_size / sizeof(C_DATATYPE); j++)
+ tmp_buf[j] =
+ (C_DATATYPE)((j % (dataset_dims[0] / (hsize_t)mpi_size * dataset_dims[1])) +
+ (j / (dataset_dims[0] / (hsize_t)mpi_size * dataset_dims[1])) + dset_idx);
+
+ /* Compute the correct offset into the buffer for the process having no selection and clear it */
+ segment_length = dataset_dims[0] * dataset_dims[1] / (hsize_t)mpi_size;
+ memset(tmp_buf + ((size_t)READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NO_SELECT_PROC * segment_length),
+ 0, segment_length * sizeof(C_DATATYPE));
+
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
+ }
+
+ file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
+ VRFY((file_id >= 0), "Test file open succeeded");
+
+ group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
+ VRFY((group_id >= 0), "H5Gopen2 succeeded");
+
+ /* Create the dataspace for the dataset */
+ filespace = H5Screate_simple(READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_DATASET_DIMS, dataset_dims, NULL);
+ VRFY((filespace >= 0), "File dataspace creation succeeded");
+
+ /* Create chunked dataset */
+ chunk_dims[0] = (hsize_t)READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_CH_NROWS;
+ chunk_dims[1] = (hsize_t)READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_CH_NCOLS;
- correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "calloc succeeded");
+ plist_id = H5Pcopy(dcpl_id);
+ VRFY((plist_id >= 0), "DCPL copy succeeded");
+
+ VRFY((H5Pset_chunk(plist_id, READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_DATASET_DIMS, chunk_dims) >= 0),
+ "Chunk size set");
+
+ /* Add test filter to the pipeline */
+ VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
+
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_DATASET_NAME, HDF5_DATATYPE_NAME,
+ filespace, plist_id, test_mode, &num_dsets, dset_ids);
+
+ /* Verify space allocation status */
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
- for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++)
- correct_buf[i] = (C_DATATYPE)((i % (dataset_dims[0] / (hsize_t)mpi_size * dataset_dims[1])) +
- (i / (dataset_dims[0] / (hsize_t)mpi_size * dataset_dims[1])));
+ VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
+ VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
+ VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
+ VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
- /* Compute the correct offset into the buffer for the process having no selection and clear it */
- segment_length = dataset_dims[0] * dataset_dims[1] / (hsize_t)mpi_size;
- memset(correct_buf + ((size_t)READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NO_SELECT_PROC * segment_length),
- 0, segment_length * sizeof(*correct_buf));
+ MPI_Barrier(comm);
if (MAINPROCESS) {
plist_id = H5Pcreate(H5P_FILE_ACCESS);
@@ -4340,53 +5100,39 @@ test_read_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fil
group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
VRFY((group_id >= 0), "H5Gopen2 succeeded");
- /* Create the dataspace for the dataset */
- filespace =
- H5Screate_simple(READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_DATASET_DIMS, dataset_dims, NULL);
- VRFY((filespace >= 0), "File dataspace creation succeeded");
-
- /* Create chunked dataset */
- chunk_dims[0] = (hsize_t)READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_CH_NROWS;
- chunk_dims[1] = (hsize_t)READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_CH_NCOLS;
-
- plist_id = H5Pcopy(dcpl_id);
- VRFY((plist_id >= 0), "DCPL copy succeeded");
+ open_datasets(group_id, READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_DATASET_NAME, num_dsets, test_mode,
+ dset_ids);
- VRFY((H5Pset_chunk(plist_id, READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_DATASET_DIMS, chunk_dims) >= 0),
- "Chunk size set");
+ select_all(num_dsets, dset_ids, fspace_ids);
- /* Add test filter to the pipeline */
- VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
-
- dset_id = H5Dcreate2(group_id, READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_DATASET_NAME,
- HDF5_DATATYPE_NAME, filespace, H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_ALL, fspace_ids, H5P_DEFAULT, data_bufs,
+ test_mode);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
-
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
-
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, H5P_DEFAULT, correct_buf) >= 0),
- "Dataset write succeeded");
+ plist_id = H5Dget_create_plist(dset_ids[0]);
+ VRFY((plist_id >= 0), "H5Dget_create_plist succeeded");
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, ALL_CHUNKS_WRITTEN);
- /* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
}
+ MPI_Barrier(comm);
+
file_id = H5Fopen(filenames[0], H5F_ACC_RDONLY, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");
group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
VRFY((group_id >= 0), "H5Gopen2 succeeded");
- dset_id = H5Dopen2(group_id, READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ open_datasets(group_id, READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_DATASET_NAME, num_dsets, test_mode,
+ dset_ids);
sel_dims[0] = (hsize_t)READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_CH_NROWS;
sel_dims[1] = (hsize_t)READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NCOLS;
@@ -4397,13 +5143,6 @@ test_read_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fil
/* Setup one-dimensional memory dataspace for reading the dataset data into a contiguous buffer */
flat_dims[0] = sel_dims[0] * sel_dims[1];
- memspace = H5Screate_simple(1, flat_dims, NULL);
- VRFY((memspace >= 0), "Memory dataspace creation succeeded");
-
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
-
/*
* Each process defines the dataset selection in the file and
* reads it to the selection in memory
@@ -4418,78 +5157,70 @@ test_read_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fil
start[0] = (hsize_t)mpi_rank * (hsize_t)READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_CH_NROWS * count[0];
start[1] = 0;
- if (VERBOSE_MED) {
- printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- fflush(stdout);
- }
-
if (mpi_rank == READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NO_SELECT_PROC)
- VRFY((H5Sselect_none(filespace) >= 0), "Select none succeeded");
+ select_none(num_dsets, dset_ids, fspace_ids);
else
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
-
- read_buf_size = flat_dims[0] * sizeof(*read_buf);
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
- read_buf = (C_DATATYPE *)calloc(1, read_buf_size);
- VRFY((NULL != read_buf), "calloc succeeded");
+ read_buf_size = flat_dims[0] * sizeof(C_DATATYPE);
- if (mpi_rank == READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NO_SELECT_PROC) {
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, NULL) >= 0),
- "Dataset read succeeded");
- }
- else {
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ if (mpi_rank != READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NO_SELECT_PROC) {
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ read_bufs[dset_idx] = calloc(1, read_buf_size);
+ VRFY((NULL != read_bufs[dset_idx]), "calloc succeeded");
+ }
}
- global_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != global_buf), "calloc succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids[0], dxpl_id, read_bufs,
+ test_mode);
/* Collect each piece of data from all ranks into a global buffer on all ranks */
- recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts));
+ global_buf = calloc(1, data_size);
+ VRFY((NULL != global_buf), "calloc succeeded");
+ recvcounts = calloc(1, (size_t)mpi_size * sizeof(*recvcounts));
VRFY((NULL != recvcounts), "calloc succeeded");
+ displs = calloc(1, (size_t)mpi_size * sizeof(*displs));
+ VRFY((NULL != displs), "calloc succeeded");
- for (i = 0; i < (size_t)mpi_size; i++)
+ for (size_t i = 0; i < (size_t)mpi_size; i++) {
recvcounts[i] = (int)(READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_CH_NROWS *
READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NCOLS);
+ displs[i] = (int)(i * (size_t)(READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_CH_NROWS *
+ READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NCOLS));
+ }
+
recvcounts[READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NO_SELECT_PROC] = 0;
- displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs));
- VRFY((NULL != displs), "calloc succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ if (mpi_rank == READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NO_SELECT_PROC) {
+ mpi_code = MPI_Allgatherv(read_bufs[dset_idx], 0, C_DATATYPE_MPI, global_buf, recvcounts, displs,
+ C_DATATYPE_MPI, comm);
+ VRFY((MPI_SUCCESS == mpi_code), "MPI_Allgatherv succeeded");
+ }
+ else {
+ mpi_code = MPI_Allgatherv(read_bufs[dset_idx], (int)flat_dims[0], C_DATATYPE_MPI, global_buf,
+ recvcounts, displs, C_DATATYPE_MPI, comm);
+ VRFY((MPI_SUCCESS == mpi_code), "MPI_Allgatherv succeeded");
+ }
- for (i = 0; i < (size_t)mpi_size; i++)
- displs[i] = (int)(i * (size_t)(READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_CH_NROWS *
- READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NCOLS));
+ VRFY((0 == memcmp(global_buf, data_bufs[dset_idx], data_size)), "Data verification succeeded");
+ }
+
+ free(displs);
+ free(recvcounts);
+ free(global_buf);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ free(read_bufs[dset_idx]);
+
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++)
+ free(data_bufs_nc[dset_idx]);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
- if (mpi_rank == READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NO_SELECT_PROC)
- VRFY((MPI_SUCCESS == MPI_Allgatherv(read_buf, 0, C_DATATYPE_MPI, global_buf, recvcounts, displs,
- C_DATATYPE_MPI, comm)),
- "MPI_Allgatherv succeeded");
- else
- VRFY((MPI_SUCCESS == MPI_Allgatherv(read_buf, (int)flat_dims[0], C_DATATYPE_MPI, global_buf,
- recvcounts, displs, C_DATATYPE_MPI, comm)),
- "MPI_Allgatherv succeeded");
-
- VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
-
- if (displs)
- free(displs);
- if (recvcounts)
- free(recvcounts);
- if (global_buf)
- free(global_buf);
- if (read_buf)
- free(read_buf);
- if (correct_buf)
- free(correct_buf);
-
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
- VRFY((H5Sclose(memspace) >= 0), "Memory dataspace close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -4510,29 +5241,81 @@ test_read_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fil
*/
static void
test_read_filtered_dataset_all_no_selection(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id)
+ hid_t dcpl_id, hid_t dxpl_id, test_mode_t test_mode)
{
- C_DATATYPE *read_buf = NULL;
- C_DATATYPE *correct_buf = NULL;
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
hsize_t dataset_dims[READ_ALL_NO_SELECTION_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t chunk_dims[READ_ALL_NO_SELECTION_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t sel_dims[READ_ALL_NO_SELECTION_FILTERED_CHUNKS_DATASET_DIMS];
- size_t read_buf_size, correct_buf_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ size_t data_size, read_buf_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
hid_t group_id = H5I_INVALID_HID;
- hid_t filespace = H5I_INVALID_HID, memspace = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
+
+ if (MAINPROCESS)
+ puts("Testing read from filtered chunks with all processes having no selection");
+
+ dataset_dims[0] = (hsize_t)READ_ALL_NO_SELECTION_FILTERED_CHUNKS_NROWS;
+ dataset_dims[1] = (hsize_t)READ_ALL_NO_SELECTION_FILTERED_CHUNKS_NCOLS;
+
+ /* Setup the buffer for writing and for comparison */
+ data_size = dataset_dims[0] * dataset_dims[1] * sizeof(C_DATATYPE);
+
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++) {
+ C_DATATYPE *tmp_buf = calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
+
+ /* Fill buffer with garbage data before write call */
+ memset(tmp_buf, 255, data_size);
+
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
+ }
+
+ file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
+ VRFY((file_id >= 0), "Test file open succeeded");
+
+ group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
+ VRFY((group_id >= 0), "H5Gopen2 succeeded");
+
+ /* Create the dataspace for the dataset */
+ filespace = H5Screate_simple(READ_ALL_NO_SELECTION_FILTERED_CHUNKS_DATASET_DIMS, dataset_dims, NULL);
+ VRFY((filespace >= 0), "File dataspace creation succeeded");
+
+ /* Create chunked dataset */
+ chunk_dims[0] = (hsize_t)READ_ALL_NO_SELECTION_FILTERED_CHUNKS_CH_NROWS;
+ chunk_dims[1] = (hsize_t)READ_ALL_NO_SELECTION_FILTERED_CHUNKS_CH_NCOLS;
+
+ plist_id = H5Pcopy(dcpl_id);
+ VRFY((plist_id >= 0), "DCPL copy succeeded");
- if (MAINPROCESS)
- HDputs("Testing read from filtered chunks with all processes having no selection");
+ VRFY((H5Pset_chunk(plist_id, READ_ALL_NO_SELECTION_FILTERED_CHUNKS_DATASET_DIMS, chunk_dims) >= 0),
+ "Chunk size set");
- dataset_dims[0] = (hsize_t)READ_ALL_NO_SELECTION_FILTERED_CHUNKS_NROWS;
- dataset_dims[1] = (hsize_t)READ_ALL_NO_SELECTION_FILTERED_CHUNKS_NCOLS;
+ /* Add test filter to the pipeline */
+ VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
- /* Setup the buffer for writing and for comparison */
- correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf);
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, READ_ALL_NO_SELECTION_FILTERED_CHUNKS_DATASET_NAME, HDF5_DATATYPE_NAME,
+ filespace, plist_id, test_mode, &num_dsets, dset_ids);
+
+ /* Verify space allocation status */
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+
+ VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
+ VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
+ VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
+ VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
- correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "calloc succeeded");
+ MPI_Barrier(comm);
if (MAINPROCESS) {
plist_id = H5Pcreate(H5P_FILE_ACCESS);
@@ -4549,82 +5332,75 @@ test_read_filtered_dataset_all_no_selection(const char *parent_group, H5Z_filter
group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
VRFY((group_id >= 0), "H5Gopen2 succeeded");
- /* Create the dataspace for the dataset */
- filespace = H5Screate_simple(READ_ALL_NO_SELECTION_FILTERED_CHUNKS_DATASET_DIMS, dataset_dims, NULL);
- VRFY((filespace >= 0), "File dataspace creation succeeded");
+ open_datasets(group_id, READ_ALL_NO_SELECTION_FILTERED_CHUNKS_DATASET_NAME, num_dsets, test_mode,
+ dset_ids);
- /* Create chunked dataset */
- chunk_dims[0] = (hsize_t)READ_ALL_NO_SELECTION_FILTERED_CHUNKS_CH_NROWS;
- chunk_dims[1] = (hsize_t)READ_ALL_NO_SELECTION_FILTERED_CHUNKS_CH_NCOLS;
+ select_all(num_dsets, dset_ids, fspace_ids);
- plist_id = H5Pcopy(dcpl_id);
- VRFY((plist_id >= 0), "DCPL copy succeeded");
-
- VRFY((H5Pset_chunk(plist_id, READ_ALL_NO_SELECTION_FILTERED_CHUNKS_DATASET_DIMS, chunk_dims) >= 0),
- "Chunk size set");
-
- /* Add test filter to the pipeline */
- VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
-
- dset_id = H5Dcreate2(group_id, READ_ALL_NO_SELECTION_FILTERED_CHUNKS_DATASET_NAME, HDF5_DATATYPE_NAME,
- filespace, H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_ALL, fspace_ids, H5P_DEFAULT, data_bufs,
+ test_mode);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
-
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
-
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, H5P_DEFAULT, correct_buf) >= 0),
- "Dataset write succeeded");
+ plist_id = H5Dget_create_plist(dset_ids[0]);
+ VRFY((plist_id >= 0), "H5Dget_create_plist succeeded");
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, ALL_CHUNKS_WRITTEN);
- /* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
}
+ MPI_Barrier(comm);
+
file_id = H5Fopen(filenames[0], H5F_ACC_RDONLY, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");
group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
VRFY((group_id >= 0), "H5Gopen2 succeeded");
- dset_id = H5Dopen2(group_id, READ_ALL_NO_SELECTION_FILTERED_CHUNKS_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ open_datasets(group_id, READ_ALL_NO_SELECTION_FILTERED_CHUNKS_DATASET_NAME, num_dsets, test_mode,
+ dset_ids);
sel_dims[0] = sel_dims[1] = 0;
- memspace = H5Screate_simple(READ_ALL_NO_SELECTION_FILTERED_CHUNKS_DATASET_DIMS, sel_dims, NULL);
- VRFY((memspace >= 0), "Memory dataspace creation succeeded");
+ select_none(num_dsets, dset_ids, fspace_ids);
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
+ read_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(C_DATATYPE);
- VRFY((H5Sselect_none(filespace) >= 0), "Select none succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ read_bufs[dset_idx] = calloc(1, read_buf_size);
+ VRFY((NULL != read_bufs[dset_idx]), "calloc succeeded");
+ }
- read_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*read_buf);
+ /* Clear data buffer that will be used for comparison since
+ * no data should end up being read
+ */
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ memset(data_bufs_nc[dset_idx], 0, data_size);
- read_buf = (C_DATATYPE *)calloc(1, read_buf_size);
- VRFY((NULL != read_buf), "calloc succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids[0], dxpl_id, read_bufs,
+ test_mode);
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((0 == memcmp(read_bufs[dset_idx], data_bufs[dset_idx], data_size)),
+ "Data verification succeeded");
- VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ free(read_bufs[dset_idx]);
- if (read_buf)
- free(read_buf);
- if (correct_buf)
- free(correct_buf);
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++)
+ free(data_bufs_nc[dset_idx]);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
- VRFY((H5Sclose(memspace) >= 0), "Memory dataspace close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -4644,41 +5420,92 @@ test_read_filtered_dataset_all_no_selection(const char *parent_group, H5Z_filter
*/
static void
test_read_filtered_dataset_point_selection(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id)
+ hid_t dcpl_id, hid_t dxpl_id, test_mode_t test_mode)
{
- C_DATATYPE *correct_buf = NULL;
- C_DATATYPE *read_buf = NULL;
- C_DATATYPE *global_buf = NULL;
- hsize_t *coords = NULL;
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *global_buf = NULL;
+ hsize_t *coords = NULL;
hsize_t dataset_dims[READ_POINT_SELECTION_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t chunk_dims[READ_POINT_SELECTION_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t sel_dims[READ_POINT_SELECTION_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t flat_dims[1];
- size_t i, j, read_buf_size, correct_buf_size;
+ size_t data_size, read_buf_size;
size_t num_points;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
- hid_t group_id = H5I_INVALID_HID;
- hid_t filespace = H5I_INVALID_HID, memspace = H5I_INVALID_HID;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ hid_t group_id = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
int *recvcounts = NULL;
int *displs = NULL;
+ int mpi_code;
if (MAINPROCESS)
- HDputs("Testing read from filtered chunks with point selection");
+ puts("Testing read from filtered chunks with point selection");
dataset_dims[0] = (hsize_t)READ_POINT_SELECTION_FILTERED_CHUNKS_NROWS;
dataset_dims[1] = (hsize_t)READ_POINT_SELECTION_FILTERED_CHUNKS_NCOLS;
/* Setup the buffer for writing and for comparison */
- correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf);
+ data_size = dataset_dims[0] * dataset_dims[1] * sizeof(C_DATATYPE);
+
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++) {
+ C_DATATYPE *tmp_buf = calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
+
+ for (size_t j = 0; j < data_size / sizeof(C_DATATYPE); j++)
+ tmp_buf[j] = (C_DATATYPE)((dataset_dims[1] * (j / ((hsize_t)mpi_size * dataset_dims[1]))) +
+ (j % dataset_dims[1]) +
+ (((j % ((hsize_t)mpi_size * dataset_dims[1])) / dataset_dims[1]) %
+ dataset_dims[1]) +
+ dset_idx);
+
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
+ }
+
+ file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
+ VRFY((file_id >= 0), "Test file open succeeded");
+
+ group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
+ VRFY((group_id >= 0), "H5Gopen2 succeeded");
+
+ /* Create the dataspace for the dataset */
+ filespace = H5Screate_simple(READ_POINT_SELECTION_FILTERED_CHUNKS_DATASET_DIMS, dataset_dims, NULL);
+ VRFY((filespace >= 0), "File dataspace creation succeeded");
+
+ /* Create chunked dataset */
+ chunk_dims[0] = (hsize_t)READ_POINT_SELECTION_FILTERED_CHUNKS_CH_NROWS;
+ chunk_dims[1] = (hsize_t)READ_POINT_SELECTION_FILTERED_CHUNKS_CH_NCOLS;
- correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "calloc succeeded");
+ plist_id = H5Pcopy(dcpl_id);
+ VRFY((plist_id >= 0), "DCPL copy succeeded");
+
+ VRFY((H5Pset_chunk(plist_id, READ_POINT_SELECTION_FILTERED_CHUNKS_DATASET_DIMS, chunk_dims) >= 0),
+ "Chunk size set");
+
+ /* Add test filter to the pipeline */
+ VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
+
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, READ_POINT_SELECTION_FILTERED_CHUNKS_DATASET_NAME, HDF5_DATATYPE_NAME,
+ filespace, plist_id, test_mode, &num_dsets, dset_ids);
+
+ /* Verify space allocation status */
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+
+ VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
+ VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
+ VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
+ VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
- for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++)
- correct_buf[i] =
- (C_DATATYPE)((dataset_dims[1] * (i / ((hsize_t)mpi_size * dataset_dims[1]))) +
- (i % dataset_dims[1]) +
- (((i % ((hsize_t)mpi_size * dataset_dims[1])) / dataset_dims[1]) % dataset_dims[1]));
+ MPI_Barrier(comm);
if (MAINPROCESS) {
plist_id = H5Pcreate(H5P_FILE_ACCESS);
@@ -4695,52 +5522,39 @@ test_read_filtered_dataset_point_selection(const char *parent_group, H5Z_filter_
group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
VRFY((group_id >= 0), "H5Gopen2 succeeded");
- /* Create the dataspace for the dataset */
- filespace = H5Screate_simple(READ_POINT_SELECTION_FILTERED_CHUNKS_DATASET_DIMS, dataset_dims, NULL);
- VRFY((filespace >= 0), "File dataspace creation succeeded");
+ open_datasets(group_id, READ_POINT_SELECTION_FILTERED_CHUNKS_DATASET_NAME, num_dsets, test_mode,
+ dset_ids);
- /* Create chunked dataset */
- chunk_dims[0] = (hsize_t)READ_POINT_SELECTION_FILTERED_CHUNKS_CH_NROWS;
- chunk_dims[1] = (hsize_t)READ_POINT_SELECTION_FILTERED_CHUNKS_CH_NCOLS;
+ select_all(num_dsets, dset_ids, fspace_ids);
- plist_id = H5Pcopy(dcpl_id);
- VRFY((plist_id >= 0), "DCPL copy succeeded");
-
- VRFY((H5Pset_chunk(plist_id, READ_POINT_SELECTION_FILTERED_CHUNKS_DATASET_DIMS, chunk_dims) >= 0),
- "Chunk size set");
-
- /* Add test filter to the pipeline */
- VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
-
- dset_id = H5Dcreate2(group_id, READ_POINT_SELECTION_FILTERED_CHUNKS_DATASET_NAME, HDF5_DATATYPE_NAME,
- filespace, H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_ALL, fspace_ids, H5P_DEFAULT, data_bufs,
+ test_mode);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
-
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
-
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, H5P_DEFAULT, correct_buf) >= 0),
- "Dataset write succeeded");
+ plist_id = H5Dget_create_plist(dset_ids[0]);
+ VRFY((plist_id >= 0), "H5Dget_create_plist succeeded");
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, ALL_CHUNKS_WRITTEN);
- /* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
}
+ MPI_Barrier(comm);
+
file_id = H5Fopen(filenames[0], H5F_ACC_RDONLY, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");
group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
VRFY((group_id >= 0), "H5Gopen2 succeeded");
- dset_id = H5Dopen2(group_id, READ_POINT_SELECTION_FILTERED_CHUNKS_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ open_datasets(group_id, READ_POINT_SELECTION_FILTERED_CHUNKS_DATASET_NAME, num_dsets, test_mode,
+ dset_ids);
sel_dims[0] = (hsize_t)READ_POINT_SELECTION_FILTERED_CHUNKS_NROWS / (hsize_t)mpi_size;
sel_dims[1] = (hsize_t)READ_POINT_SELECTION_FILTERED_CHUNKS_NCOLS;
@@ -4748,92 +5562,87 @@ test_read_filtered_dataset_point_selection(const char *parent_group, H5Z_filter_
/* Setup one-dimensional memory dataspace for reading the dataset data into a contiguous buffer */
flat_dims[0] = sel_dims[0] * sel_dims[1];
- memspace = H5Screate_simple(1, flat_dims, NULL);
- VRFY((memspace >= 0), "Memory dataspace creation succeeded");
-
/* Set up point selection */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
-
num_points = (hsize_t)READ_POINT_SELECTION_FILTERED_CHUNKS_NROWS *
(hsize_t)READ_POINT_SELECTION_FILTERED_CHUNKS_NCOLS / (hsize_t)mpi_size;
coords = (hsize_t *)calloc(1, 2 * num_points * sizeof(*coords));
VRFY((NULL != coords), "Coords calloc succeeded");
- for (i = 0; i < num_points; i++)
- for (j = 0; j < READ_POINT_SELECTION_FILTERED_CHUNKS_DATASET_DIMS; j++)
+ for (size_t i = 0; i < num_points; i++)
+ for (size_t j = 0; j < READ_POINT_SELECTION_FILTERED_CHUNKS_DATASET_DIMS; j++)
coords[(i * READ_POINT_SELECTION_FILTERED_CHUNKS_DATASET_DIMS) + j] =
(j > 0) ? (i % (hsize_t)READ_POINT_SELECTION_FILTERED_CHUNKS_NCOLS)
: ((hsize_t)mpi_rank +
((hsize_t)mpi_size * (i / (hsize_t)READ_POINT_SELECTION_FILTERED_CHUNKS_NCOLS)));
- VRFY((H5Sselect_elements(filespace, H5S_SELECT_SET, (hsize_t)num_points, (const hsize_t *)coords) >= 0),
- "Point selection succeeded");
+ select_elements(num_dsets, dset_ids, num_points, coords, fspace_ids);
- read_buf_size = flat_dims[0] * sizeof(*read_buf);
+ read_buf_size = flat_dims[0] * sizeof(C_DATATYPE);
- read_buf = (C_DATATYPE *)calloc(1, read_buf_size);
- VRFY((NULL != read_buf), "calloc succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ read_bufs[dset_idx] = calloc(1, read_buf_size);
+ VRFY((NULL != read_bufs[dset_idx]), "calloc succeeded");
+ }
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids[0], dxpl_id, read_bufs,
+ test_mode);
- global_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ /* Collect each piece of data from all ranks into a global buffer on all ranks */
+ global_buf = calloc(1, data_size);
VRFY((NULL != global_buf), "calloc succeeded");
+ recvcounts = calloc(1, (size_t)mpi_size * sizeof(*recvcounts));
+ VRFY((NULL != recvcounts), "calloc succeeded");
+ displs = calloc(1, (size_t)mpi_size * sizeof(*displs));
+ VRFY((NULL != displs), "calloc succeeded");
/*
* Since these chunks are shared, run multiple rounds of MPI_Allgatherv
* to collect all of the pieces into their appropriate locations. The
- * number of times MPI_Allgatherv is run should be equal to the number
- * of chunks in the first dimension of the dataset.
+ * number of times MPI_Allgatherv is run for each dataset should be equal
+ * to the number of chunks in the first dimension of the dataset.
*/
- {
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
size_t original_loop_count = dataset_dims[0] / (hsize_t)mpi_size;
- size_t cur_loop_count = original_loop_count;
size_t total_recvcounts = 0;
- recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts));
- VRFY((NULL != recvcounts), "calloc succeeded");
+ for (size_t j = 0; j < (size_t)mpi_size; j++) {
+ recvcounts[j] = (int)dataset_dims[1];
+ total_recvcounts += (size_t)recvcounts[j];
- displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs));
- VRFY((NULL != displs), "calloc succeeded");
-
- for (i = 0; i < (size_t)mpi_size; i++) {
- recvcounts[i] = (int)dataset_dims[1];
- total_recvcounts += (size_t)recvcounts[i];
+ displs[j] = (int)(j * dataset_dims[1]);
}
- for (i = 0; i < (size_t)mpi_size; i++)
- displs[i] = (int)(i * dataset_dims[1]);
+ for (size_t cur_loop_count = original_loop_count; cur_loop_count; cur_loop_count--) {
+ C_DATATYPE *tmp_buf = read_bufs[dset_idx];
+ C_DATATYPE *tmp_glob_buf = (C_DATATYPE *)global_buf;
- for (; cur_loop_count; cur_loop_count--) {
- VRFY((MPI_SUCCESS ==
- MPI_Allgatherv(&read_buf[(original_loop_count - cur_loop_count) * dataset_dims[1]],
- recvcounts[mpi_rank], C_DATATYPE_MPI,
- &global_buf[(original_loop_count - cur_loop_count) * total_recvcounts],
- recvcounts, displs, C_DATATYPE_MPI, comm)),
- "MPI_Allgatherv succeeded");
+ mpi_code = MPI_Allgatherv(
+ &tmp_buf[(original_loop_count - cur_loop_count) * dataset_dims[1]], recvcounts[mpi_rank],
+ C_DATATYPE_MPI, &tmp_glob_buf[(original_loop_count - cur_loop_count) * total_recvcounts],
+ recvcounts, displs, C_DATATYPE_MPI, comm);
+ VRFY((MPI_SUCCESS == mpi_code), "MPI_Allgatherv succeeded");
}
+
+ VRFY((0 == memcmp(global_buf, data_bufs[dset_idx], data_size)), "Data verification succeeded");
}
- VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ free(displs);
+ free(recvcounts);
+ free(global_buf);
- if (displs)
- free(displs);
- if (recvcounts)
- free(recvcounts);
- if (global_buf)
- free(global_buf);
- if (read_buf)
- free(read_buf);
- if (correct_buf)
- free(correct_buf);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ free(read_bufs[dset_idx]);
+
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++)
+ free(data_bufs_nc[dset_idx]);
free(coords);
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
- VRFY((H5Sclose(memspace) >= 0), "Memory dataspace close succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
+
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -4856,11 +5665,12 @@ test_read_filtered_dataset_point_selection(const char *parent_group, H5Z_filter_
*/
static void
test_read_filtered_dataset_interleaved_read(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id)
+ hid_t dcpl_id, hid_t dxpl_id, test_mode_t test_mode)
{
- C_DATATYPE *read_buf = NULL;
- C_DATATYPE *correct_buf = NULL;
- C_DATATYPE *global_buf = NULL;
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *global_buf = NULL;
hsize_t dataset_dims[INTERLEAVED_READ_FILTERED_DATASET_DIMS];
hsize_t chunk_dims[INTERLEAVED_READ_FILTERED_DATASET_DIMS];
hsize_t sel_dims[INTERLEAVED_READ_FILTERED_DATASET_DIMS];
@@ -4869,38 +5679,89 @@ test_read_filtered_dataset_interleaved_read(const char *parent_group, H5Z_filter
hsize_t count[INTERLEAVED_READ_FILTERED_DATASET_DIMS];
hsize_t block[INTERLEAVED_READ_FILTERED_DATASET_DIMS];
hsize_t flat_dims[1];
- size_t i, read_buf_size, correct_buf_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
- hid_t group_id = H5I_INVALID_HID;
- hid_t filespace = H5I_INVALID_HID, memspace = H5I_INVALID_HID;
+ size_t data_size, read_buf_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ hid_t group_id = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
int *recvcounts = NULL;
int *displs = NULL;
+ int mpi_code;
if (MAINPROCESS)
- HDputs("Testing interleaved read from filtered chunks");
+ puts("Testing interleaved read from filtered chunks");
dataset_dims[0] = (hsize_t)INTERLEAVED_READ_FILTERED_DATASET_NROWS;
dataset_dims[1] = (hsize_t)INTERLEAVED_READ_FILTERED_DATASET_NCOLS;
/* Setup the buffer for writing and for comparison */
- correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf);
+ data_size = dataset_dims[0] * dataset_dims[1] * sizeof(C_DATATYPE);
+
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++) {
+ C_DATATYPE *tmp_buf = calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
+
+ for (size_t j = 0; j < data_size / sizeof(C_DATATYPE); j++)
+ tmp_buf[j] =
+ /* Add the Column Index */
+ (C_DATATYPE)((j % (hsize_t)INTERLEAVED_READ_FILTERED_DATASET_NCOLS)
+
+ /* Add the Row Index */
+ + ((j % (hsize_t)(mpi_size * INTERLEAVED_READ_FILTERED_DATASET_NCOLS)) /
+ (hsize_t)INTERLEAVED_READ_FILTERED_DATASET_NCOLS)
- correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "calloc succeeded");
+ /* Add the amount that gets added when a rank moves down to its next section
+ vertically in the dataset */
+ + ((hsize_t)INTERLEAVED_READ_FILTERED_DATASET_NCOLS *
+ (j / (hsize_t)(mpi_size * INTERLEAVED_READ_FILTERED_DATASET_NCOLS)))
- for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++)
- /* Add Column Index */
- correct_buf[i] =
- (C_DATATYPE)((i % (hsize_t)INTERLEAVED_READ_FILTERED_DATASET_NCOLS)
+ /* Add an increment factor for the multi-dataset case */
+ + dset_idx);
- /* Add the Row Index */
- + ((i % (hsize_t)(mpi_size * INTERLEAVED_READ_FILTERED_DATASET_NCOLS)) /
- (hsize_t)INTERLEAVED_READ_FILTERED_DATASET_NCOLS)
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
+ }
+
+ file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
+ VRFY((file_id >= 0), "Test file open succeeded");
+
+ group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
+ VRFY((group_id >= 0), "H5Gopen2 succeeded");
+
+ /* Create the dataspace for the dataset */
+ filespace = H5Screate_simple(INTERLEAVED_READ_FILTERED_DATASET_DIMS, dataset_dims, NULL);
+ VRFY((filespace >= 0), "File dataspace creation succeeded");
+
+ /* Create chunked dataset */
+ chunk_dims[0] = (hsize_t)INTERLEAVED_READ_FILTERED_DATASET_CH_NROWS;
+ chunk_dims[1] = (hsize_t)INTERLEAVED_READ_FILTERED_DATASET_CH_NCOLS;
+
+ plist_id = H5Pcopy(dcpl_id);
+ VRFY((plist_id >= 0), "DCPL copy succeeded");
+
+ VRFY((H5Pset_chunk(plist_id, INTERLEAVED_READ_FILTERED_DATASET_DIMS, chunk_dims) >= 0), "Chunk size set");
- /* Add the amount that gets added when a rank moves down to its next section
- vertically in the dataset */
- + ((hsize_t)INTERLEAVED_READ_FILTERED_DATASET_NCOLS *
- (i / (hsize_t)(mpi_size * INTERLEAVED_READ_FILTERED_DATASET_NCOLS))));
+ /* Add test filter to the pipeline */
+ VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
+
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, INTERLEAVED_READ_FILTERED_DATASET_NAME, HDF5_DATATYPE_NAME, filespace, plist_id,
+ test_mode, &num_dsets, dset_ids);
+
+ /* Verify space allocation status */
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+
+ VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
+ VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
+ VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
+ VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
+
+ MPI_Barrier(comm);
if (MAINPROCESS) {
plist_id = H5Pcreate(H5P_FILE_ACCESS);
@@ -4917,52 +5778,37 @@ test_read_filtered_dataset_interleaved_read(const char *parent_group, H5Z_filter
group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
VRFY((group_id >= 0), "H5Gopen2 succeeded");
- /* Create the dataspace for the dataset */
- filespace = H5Screate_simple(INTERLEAVED_READ_FILTERED_DATASET_DIMS, dataset_dims, NULL);
- VRFY((filespace >= 0), "File dataspace creation succeeded");
+ open_datasets(group_id, INTERLEAVED_READ_FILTERED_DATASET_NAME, num_dsets, test_mode, dset_ids);
- /* Create chunked dataset */
- chunk_dims[0] = (hsize_t)INTERLEAVED_READ_FILTERED_DATASET_CH_NROWS;
- chunk_dims[1] = (hsize_t)INTERLEAVED_READ_FILTERED_DATASET_CH_NCOLS;
+ select_all(num_dsets, dset_ids, fspace_ids);
- plist_id = H5Pcopy(dcpl_id);
- VRFY((plist_id >= 0), "DCPL copy succeeded");
-
- VRFY((H5Pset_chunk(plist_id, INTERLEAVED_READ_FILTERED_DATASET_DIMS, chunk_dims) >= 0),
- "Chunk size set");
-
- /* Add test filter to the pipeline */
- VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
-
- dset_id = H5Dcreate2(group_id, INTERLEAVED_READ_FILTERED_DATASET_NAME, HDF5_DATATYPE_NAME, filespace,
- H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_ALL, fspace_ids, H5P_DEFAULT, data_bufs,
+ test_mode);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
-
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
-
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, H5P_DEFAULT, correct_buf) >= 0),
- "Dataset write succeeded");
+ plist_id = H5Dget_create_plist(dset_ids[0]);
+ VRFY((plist_id >= 0), "H5Dget_create_plist succeeded");
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, ALL_CHUNKS_WRITTEN);
- /* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
}
+ MPI_Barrier(comm);
+
file_id = H5Fopen(filenames[0], H5F_ACC_RDONLY, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");
group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
VRFY((group_id >= 0), "H5Gopen2 succeeded");
- dset_id = H5Dopen2(group_id, INTERLEAVED_READ_FILTERED_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ open_datasets(group_id, INTERLEAVED_READ_FILTERED_DATASET_NAME, num_dsets, test_mode, dset_ids);
sel_dims[0] = (hsize_t)(INTERLEAVED_READ_FILTERED_DATASET_NROWS / mpi_size);
sel_dims[1] = (hsize_t)INTERLEAVED_READ_FILTERED_DATASET_NCOLS;
@@ -4970,13 +5816,6 @@ test_read_filtered_dataset_interleaved_read(const char *parent_group, H5Z_filter
/* Setup one-dimensional memory dataspace for reading the dataset data into a contiguous buffer */
flat_dims[0] = sel_dims[0] * sel_dims[1];
- memspace = H5Screate_simple(1, flat_dims, NULL);
- VRFY((memspace >= 0), "Memory dataspace creation succeeded");
-
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
-
/*
* Each process defines the dataset selection in the file and
* reads it to the selection in memory
@@ -4992,27 +5831,25 @@ test_read_filtered_dataset_interleaved_read(const char *parent_group, H5Z_filter
start[0] = (hsize_t)mpi_rank;
start[1] = 0;
- if (VERBOSE_MED) {
- printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- fflush(stdout);
- }
-
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
- read_buf_size = flat_dims[0] * sizeof(*read_buf);
+ read_buf_size = flat_dims[0] * sizeof(C_DATATYPE);
- read_buf = (C_DATATYPE *)calloc(1, read_buf_size);
- VRFY((NULL != read_buf), "calloc succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ read_bufs[dset_idx] = calloc(1, read_buf_size);
+ VRFY((NULL != read_bufs[dset_idx]), "calloc succeeded");
+ }
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids[0], dxpl_id, read_bufs,
+ test_mode);
- global_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ /* Collect each piece of data from all ranks into a global buffer on all ranks */
+ global_buf = calloc(1, data_size);
VRFY((NULL != global_buf), "calloc succeeded");
+ recvcounts = calloc(1, (size_t)mpi_size * sizeof(*recvcounts));
+ VRFY((NULL != recvcounts), "calloc succeeded");
+ displs = calloc(1, (size_t)mpi_size * sizeof(*displs));
+ VRFY((NULL != displs), "calloc succeeded");
/*
* Since these chunks are shared, run multiple rounds of MPI_Allgatherv
@@ -5020,49 +5857,45 @@ test_read_filtered_dataset_interleaved_read(const char *parent_group, H5Z_filter
* number of times MPI_Allgatherv is run should be equal to the number
* of chunks in the first dimension of the dataset.
*/
- {
- size_t loop_count = count[0];
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
size_t total_recvcounts = 0;
- recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts));
- VRFY((NULL != recvcounts), "calloc succeeded");
-
- displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs));
- VRFY((NULL != displs), "calloc succeeded");
+ for (size_t j = 0; j < (size_t)mpi_size; j++) {
+ recvcounts[j] = (int)dataset_dims[1];
+ total_recvcounts += (size_t)recvcounts[j];
- for (i = 0; i < (size_t)mpi_size; i++) {
- recvcounts[i] = (int)dataset_dims[1];
- total_recvcounts += (size_t)recvcounts[i];
+ displs[j] = (int)(j * dataset_dims[1]);
}
- for (i = 0; i < (size_t)mpi_size; i++)
- displs[i] = (int)(i * dataset_dims[1]);
+ for (size_t loop_count = count[0]; loop_count; loop_count--) {
+ C_DATATYPE *tmp_buf = read_bufs[dset_idx];
+ C_DATATYPE *tmp_glob_buf = (C_DATATYPE *)global_buf;
- for (; loop_count; loop_count--) {
- VRFY((MPI_SUCCESS == MPI_Allgatherv(&read_buf[(count[0] - loop_count) * dataset_dims[1]],
- recvcounts[mpi_rank], C_DATATYPE_MPI,
- &global_buf[(count[0] - loop_count) * total_recvcounts],
- recvcounts, displs, C_DATATYPE_MPI, comm)),
- "MPI_Allgatherv succeeded");
+ mpi_code =
+ MPI_Allgatherv(&tmp_buf[(count[0] - loop_count) * dataset_dims[1]], recvcounts[mpi_rank],
+ C_DATATYPE_MPI, &tmp_glob_buf[(count[0] - loop_count) * total_recvcounts],
+ recvcounts, displs, C_DATATYPE_MPI, comm);
+ VRFY((MPI_SUCCESS == mpi_code), "MPI_Allgatherv succeeded");
}
+
+ VRFY((0 == memcmp(global_buf, data_bufs[dset_idx], data_size)), "Data verification succeeded");
}
- VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ free(displs);
+ free(recvcounts);
+ free(global_buf);
- if (displs)
- free(displs);
- if (recvcounts)
- free(recvcounts);
- if (global_buf)
- free(global_buf);
- if (read_buf)
- free(read_buf);
- if (correct_buf)
- free(correct_buf);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ free(read_bufs[dset_idx]);
+
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++)
+ free(data_bufs_nc[dset_idx]);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
- VRFY((H5Sclose(memspace) >= 0), "Memory dataspace close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -5082,13 +5915,15 @@ test_read_filtered_dataset_interleaved_read(const char *parent_group, H5Z_filter
*/
static void
test_read_3d_filtered_dataset_no_overlap_separate_pages(const char *parent_group, H5Z_filter_t filter_id,
- hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id)
+ hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode)
{
MPI_Datatype vector_type;
MPI_Datatype resized_vector_type;
- C_DATATYPE *read_buf = NULL;
- C_DATATYPE *correct_buf = NULL;
- C_DATATYPE *global_buf = NULL;
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *global_buf = NULL;
hsize_t dataset_dims[READ_UNSHARED_FILTERED_CHUNKS_3D_SEP_PAGE_DATASET_DIMS];
hsize_t chunk_dims[READ_UNSHARED_FILTERED_CHUNKS_3D_SEP_PAGE_DATASET_DIMS];
hsize_t sel_dims[READ_UNSHARED_FILTERED_CHUNKS_3D_SEP_PAGE_DATASET_DIMS];
@@ -5097,26 +5932,76 @@ test_read_3d_filtered_dataset_no_overlap_separate_pages(const char *parent_group
hsize_t count[READ_UNSHARED_FILTERED_CHUNKS_3D_SEP_PAGE_DATASET_DIMS];
hsize_t block[READ_UNSHARED_FILTERED_CHUNKS_3D_SEP_PAGE_DATASET_DIMS];
hsize_t flat_dims[1];
- size_t i, read_buf_size, correct_buf_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ size_t data_size, read_buf_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
hid_t group_id = H5I_INVALID_HID;
- hid_t filespace = H5I_INVALID_HID, memspace = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
+ int mpi_code;
if (MAINPROCESS)
- HDputs("Testing read from unshared filtered chunks on separate pages in 3D dataset");
+ puts("Testing read from unshared filtered chunks on separate pages in 3D dataset");
dataset_dims[0] = (hsize_t)READ_UNSHARED_FILTERED_CHUNKS_3D_SEP_PAGE_NROWS;
dataset_dims[1] = (hsize_t)READ_UNSHARED_FILTERED_CHUNKS_3D_SEP_PAGE_NCOLS;
dataset_dims[2] = (hsize_t)READ_UNSHARED_FILTERED_CHUNKS_3D_SEP_PAGE_DEPTH;
/* Setup the buffer for writing and for comparison */
- correct_buf_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(*correct_buf);
+ data_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(C_DATATYPE);
+
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++) {
+ C_DATATYPE *tmp_buf = calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
+
+ for (size_t j = 0; j < data_size / sizeof(C_DATATYPE); j++)
+ tmp_buf[j] = (C_DATATYPE)((j % (hsize_t)mpi_size) + (j / (hsize_t)mpi_size) + dset_idx);
+
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
+ }
+
+ file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
+ VRFY((file_id >= 0), "Test file open succeeded");
+
+ group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
+ VRFY((group_id >= 0), "H5Gopen2 succeeded");
+
+ /* Create the dataspace for the dataset */
+ filespace = H5Screate_simple(READ_UNSHARED_FILTERED_CHUNKS_3D_SEP_PAGE_DATASET_DIMS, dataset_dims, NULL);
+ VRFY((filespace >= 0), "File dataspace creation succeeded");
+
+ /* Create chunked dataset */
+ chunk_dims[0] = (hsize_t)READ_UNSHARED_FILTERED_CHUNKS_3D_SEP_PAGE_CH_NROWS;
+ chunk_dims[1] = (hsize_t)READ_UNSHARED_FILTERED_CHUNKS_3D_SEP_PAGE_CH_NCOLS;
+ chunk_dims[2] = 1;
+
+ plist_id = H5Pcopy(dcpl_id);
+ VRFY((plist_id >= 0), "DCPL copy succeeded");
+
+ VRFY((H5Pset_chunk(plist_id, READ_UNSHARED_FILTERED_CHUNKS_3D_SEP_PAGE_DATASET_DIMS, chunk_dims) >= 0),
+ "Chunk size set");
+
+ /* Add test filter to the pipeline */
+ VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
+
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, READ_UNSHARED_FILTERED_CHUNKS_3D_SEP_PAGE_DATASET_NAME, HDF5_DATATYPE_NAME,
+ filespace, plist_id, test_mode, &num_dsets, dset_ids);
+
+ /* Verify space allocation status */
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
- correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "calloc succeeded");
+ VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
+ VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
+ VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
+ VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
- for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++)
- correct_buf[i] = (C_DATATYPE)((i % (hsize_t)mpi_size) + (i / (hsize_t)mpi_size));
+ MPI_Barrier(comm);
if (MAINPROCESS) {
plist_id = H5Pcreate(H5P_FILE_ACCESS);
@@ -5133,55 +6018,39 @@ test_read_3d_filtered_dataset_no_overlap_separate_pages(const char *parent_group
group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
VRFY((group_id >= 0), "H5Gopen2 succeeded");
- /* Create the dataspace for the dataset */
- filespace =
- H5Screate_simple(READ_UNSHARED_FILTERED_CHUNKS_3D_SEP_PAGE_DATASET_DIMS, dataset_dims, NULL);
- VRFY((filespace >= 0), "File dataspace creation succeeded");
-
- /* Create chunked dataset */
- chunk_dims[0] = (hsize_t)READ_UNSHARED_FILTERED_CHUNKS_3D_SEP_PAGE_CH_NROWS;
- chunk_dims[1] = (hsize_t)READ_UNSHARED_FILTERED_CHUNKS_3D_SEP_PAGE_CH_NCOLS;
- chunk_dims[2] = 1;
-
- plist_id = H5Pcopy(dcpl_id);
- VRFY((plist_id >= 0), "DCPL copy succeeded");
+ open_datasets(group_id, READ_UNSHARED_FILTERED_CHUNKS_3D_SEP_PAGE_DATASET_NAME, num_dsets, test_mode,
+ dset_ids);
- VRFY(
- (H5Pset_chunk(plist_id, READ_UNSHARED_FILTERED_CHUNKS_3D_SEP_PAGE_DATASET_DIMS, chunk_dims) >= 0),
- "Chunk size set");
+ select_all(num_dsets, dset_ids, fspace_ids);
- /* Add test filter to the pipeline */
- VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
-
- dset_id = H5Dcreate2(group_id, READ_UNSHARED_FILTERED_CHUNKS_3D_SEP_PAGE_DATASET_NAME,
- HDF5_DATATYPE_NAME, filespace, H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_ALL, fspace_ids, H5P_DEFAULT, data_bufs,
+ test_mode);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
-
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
-
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, H5P_DEFAULT, correct_buf) >= 0),
- "Dataset write succeeded");
+ plist_id = H5Dget_create_plist(dset_ids[0]);
+ VRFY((plist_id >= 0), "H5Dget_create_plist succeeded");
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, ALL_CHUNKS_WRITTEN);
- /* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
}
+ MPI_Barrier(comm);
+
file_id = H5Fopen(filenames[0], H5F_ACC_RDONLY, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");
group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
VRFY((group_id >= 0), "H5Gopen2 succeeded");
- dset_id = H5Dopen2(group_id, READ_UNSHARED_FILTERED_CHUNKS_3D_SEP_PAGE_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ open_datasets(group_id, READ_UNSHARED_FILTERED_CHUNKS_3D_SEP_PAGE_DATASET_NAME, num_dsets, test_mode,
+ dset_ids);
sel_dims[0] = (hsize_t)READ_UNSHARED_FILTERED_CHUNKS_3D_SEP_PAGE_NROWS;
sel_dims[1] = (hsize_t)READ_UNSHARED_FILTERED_CHUNKS_3D_SEP_PAGE_NCOLS;
@@ -5190,13 +6059,6 @@ test_read_3d_filtered_dataset_no_overlap_separate_pages(const char *parent_group
/* Setup one-dimensional memory dataspace for reading the dataset data into a contiguous buffer */
flat_dims[0] = sel_dims[0] * sel_dims[1] * sel_dims[2];
- memspace = H5Screate_simple(1, flat_dims, NULL);
- VRFY((memspace >= 0), "Memory dataspace creation succeeded");
-
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
-
/*
* Each process defines the dataset selection in the file and
* reads it to the selection in memory
@@ -5216,63 +6078,66 @@ test_read_3d_filtered_dataset_no_overlap_separate_pages(const char *parent_group
start[1] = 0;
start[2] = (hsize_t)mpi_rank;
- if (VERBOSE_MED) {
- printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- fflush(stdout);
- }
-
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
- read_buf_size = flat_dims[0] * sizeof(*read_buf);
+ read_buf_size = flat_dims[0] * sizeof(C_DATATYPE);
- read_buf = (C_DATATYPE *)calloc(1, read_buf_size);
- VRFY((NULL != read_buf), "calloc succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ read_bufs[dset_idx] = calloc(1, read_buf_size);
+ VRFY((NULL != read_bufs[dset_idx]), "calloc succeeded");
+ }
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids[0], dxpl_id, read_bufs,
+ test_mode);
- global_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ /* Collect each piece of data from all ranks into a global buffer on all ranks */
+ global_buf = calloc(1, data_size);
VRFY((NULL != global_buf), "calloc succeeded");
/*
* Due to the nature of 3-dimensional reading, create an MPI vector type that allows each
* rank to write to the nth position of the global data buffer, where n is the rank number.
*/
- VRFY((MPI_SUCCESS == MPI_Type_vector((int)flat_dims[0], 1, mpi_size, C_DATATYPE_MPI, &vector_type)),
- "MPI_Type_vector succeeded");
- VRFY((MPI_SUCCESS == MPI_Type_commit(&vector_type)), "MPI_Type_commit succeeded");
+ mpi_code = MPI_Type_vector((int)flat_dims[0], 1, mpi_size, C_DATATYPE_MPI, &vector_type);
+ VRFY((MPI_SUCCESS == mpi_code), "MPI_Type_vector succeeded");
+ mpi_code = MPI_Type_commit(&vector_type);
+ VRFY((MPI_SUCCESS == mpi_code), "MPI_Type_commit succeeded");
/*
* Resize the type to allow interleaving,
* so make it only one MPI_LONG wide
*/
- VRFY((MPI_SUCCESS == MPI_Type_create_resized(vector_type, 0, sizeof(long), &resized_vector_type)),
- "MPI_Type_create_resized");
- VRFY((MPI_SUCCESS == MPI_Type_commit(&resized_vector_type)), "MPI_Type_commit succeeded");
+ mpi_code = MPI_Type_create_resized(vector_type, 0, sizeof(long), &resized_vector_type);
+ VRFY((MPI_SUCCESS == mpi_code), "MPI_Type_create_resized");
+ mpi_code = MPI_Type_commit(&resized_vector_type);
+ VRFY((MPI_SUCCESS == mpi_code), "MPI_Type_commit succeeded");
- VRFY((MPI_SUCCESS == MPI_Allgather(read_buf, (int)flat_dims[0], C_DATATYPE_MPI, global_buf, 1,
- resized_vector_type, comm)),
- "MPI_Allgather succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ mpi_code = MPI_Allgather(read_bufs[dset_idx], (int)flat_dims[0], C_DATATYPE_MPI, global_buf, 1,
+ resized_vector_type, comm);
+ VRFY((MPI_SUCCESS == mpi_code), "MPI_Allgather succeeded");
- VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(global_buf, data_bufs[dset_idx], data_size)), "Data verification succeeded");
+ }
- VRFY((MPI_SUCCESS == MPI_Type_free(&vector_type)), "MPI_Type_free succeeded");
- VRFY((MPI_SUCCESS == MPI_Type_free(&resized_vector_type)), "MPI_Type_free succeeded");
+ mpi_code = MPI_Type_free(&vector_type);
+ VRFY((MPI_SUCCESS == mpi_code), "MPI_Type_free succeeded");
+ mpi_code = MPI_Type_free(&resized_vector_type);
+ VRFY((MPI_SUCCESS == mpi_code), "MPI_Type_free succeeded");
- if (global_buf)
- free(global_buf);
- if (read_buf)
- free(read_buf);
- if (correct_buf)
- free(correct_buf);
+ free(global_buf);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ free(read_bufs[dset_idx]);
+
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++)
+ free(data_bufs_nc[dset_idx]);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
- VRFY((H5Sclose(memspace) >= 0), "Memory dataspace close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -5299,11 +6164,13 @@ test_read_3d_filtered_dataset_no_overlap_separate_pages(const char *parent_group
*/
static void
test_read_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t filter_id,
- hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id)
+ hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode)
{
- C_DATATYPE *read_buf = NULL;
- C_DATATYPE *correct_buf = NULL;
- C_DATATYPE *global_buf = NULL;
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *global_buf = NULL;
hsize_t dataset_dims[READ_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t chunk_dims[READ_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t sel_dims[READ_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_DATASET_DIMS];
@@ -5312,29 +6179,79 @@ test_read_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z_
hsize_t count[READ_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t block[READ_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_DATASET_DIMS];
hsize_t flat_dims[1];
- size_t i, read_buf_size, correct_buf_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
- hid_t group_id = H5I_INVALID_HID;
- hid_t filespace = H5I_INVALID_HID, memspace = H5I_INVALID_HID;
+ size_t data_size, read_buf_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ hid_t group_id = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
int *recvcounts = NULL;
int *displs = NULL;
+ int mpi_code;
if (MAINPROCESS)
- HDputs("Testing read from unshared transformed and filtered chunks");
+ puts("Testing read from unshared transformed and filtered chunks");
dataset_dims[0] = (hsize_t)READ_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_NROWS;
dataset_dims[1] = (hsize_t)READ_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_NCOLS;
/* Setup the buffer for writing and for comparison */
- correct_buf_size = (hsize_t)READ_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_NROWS *
- (hsize_t)READ_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_NCOLS * sizeof(*correct_buf);
+ data_size = (hsize_t)READ_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_NROWS *
+ (hsize_t)READ_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_NCOLS * sizeof(C_DATATYPE);
+
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++) {
+ C_DATATYPE *tmp_buf = calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
+
+ for (size_t j = 0; j < data_size / sizeof(C_DATATYPE); j++)
+ tmp_buf[j] =
+ (C_DATATYPE)((j % (dataset_dims[0] / (hsize_t)mpi_size * dataset_dims[1])) +
+ (j / (dataset_dims[0] / (hsize_t)mpi_size * dataset_dims[1])) + dset_idx);
+
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
+ }
+
+ file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
+ VRFY((file_id >= 0), "Test file open succeeded");
+
+ group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
+ VRFY((group_id >= 0), "H5Gopen2 succeeded");
+
+ /* Create the dataspace for the dataset */
+ filespace = H5Screate_simple(READ_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_DATASET_DIMS, dataset_dims, NULL);
+ VRFY((filespace >= 0), "File dataspace creation succeeded");
+
+ /* Create chunked dataset */
+ chunk_dims[0] = (hsize_t)READ_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_CH_NROWS;
+ chunk_dims[1] = (hsize_t)READ_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_CH_NCOLS;
+
+ plist_id = H5Pcopy(dcpl_id);
+ VRFY((plist_id >= 0), "DCPL copy succeeded");
+
+ VRFY((H5Pset_chunk(plist_id, READ_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_DATASET_DIMS, chunk_dims) >= 0),
+ "Chunk size set");
+
+ /* Add test filter to the pipeline */
+ VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
+
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, READ_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_DATASET_NAME, HDF5_DATATYPE_NAME,
+ filespace, plist_id, test_mode, &num_dsets, dset_ids);
+
+ /* Verify space allocation status */
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
- correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "calloc succeeded");
+ VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
+ VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
+ VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
+ VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
- for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++)
- correct_buf[i] = (C_DATATYPE)((i % (dataset_dims[0] / (hsize_t)mpi_size * dataset_dims[1])) +
- (i / (dataset_dims[0] / (hsize_t)mpi_size * dataset_dims[1])));
+ MPI_Barrier(comm);
if (MAINPROCESS) {
plist_id = H5Pcreate(H5P_FILE_ACCESS);
@@ -5351,34 +6268,8 @@ test_read_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z_
group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
VRFY((group_id >= 0), "H5Gopen2 succeeded");
- /* Create the dataspace for the dataset */
- filespace =
- H5Screate_simple(READ_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_DATASET_DIMS, dataset_dims, NULL);
- VRFY((filespace >= 0), "File dataspace creation succeeded");
-
- /* Create chunked dataset */
- chunk_dims[0] = (hsize_t)READ_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_CH_NROWS;
- chunk_dims[1] = (hsize_t)READ_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_CH_NCOLS;
-
- plist_id = H5Pcopy(dcpl_id);
- VRFY((plist_id >= 0), "DCPL copy succeeded");
-
- VRFY(
- (H5Pset_chunk(plist_id, READ_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_DATASET_DIMS, chunk_dims) >= 0),
- "Chunk size set");
-
- /* Add test filter to the pipeline */
- VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
-
- dset_id = H5Dcreate2(group_id, READ_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_DATASET_NAME,
- HDF5_DATATYPE_NAME, filespace, H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
-
- /* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
-
- VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
+ open_datasets(group_id, READ_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_DATASET_NAME, num_dsets, test_mode,
+ dset_ids);
/* Create property list for collective dataset read */
plist_id = H5Pcreate(H5P_DATASET_XFER);
@@ -5387,30 +6278,38 @@ test_read_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z_
/* Set data transform expression */
VRFY((H5Pset_data_transform(plist_id, "x") >= 0), "Set data transform expression succeeded");
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, plist_id, correct_buf) >= 0),
- "Dataset write succeeded");
+ select_all(num_dsets, dset_ids, fspace_ids);
+
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_ALL, fspace_ids, H5P_DEFAULT, data_bufs,
+ test_mode);
- VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
+ VRFY((H5Pclose(plist_id) >= 0), "DXPL close succeeded");
/* Verify space allocation status */
- plist_id = H5Dget_create_plist(dset_id);
+ plist_id = H5Dget_create_plist(dset_ids[0]);
VRFY((plist_id >= 0), "H5Dget_create_plist succeeded");
- verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, ALL_CHUNKS_WRITTEN);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
VRFY((H5Pclose(plist_id) >= 0), "DXPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
}
+ MPI_Barrier(comm);
+
file_id = H5Fopen(filenames[0], H5F_ACC_RDONLY, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");
group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
VRFY((group_id >= 0), "H5Gopen2 succeeded");
- dset_id = H5Dopen2(group_id, READ_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ open_datasets(group_id, READ_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_DATASET_NAME, num_dsets, test_mode,
+ dset_ids);
sel_dims[0] = (hsize_t)READ_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_CH_NROWS;
sel_dims[1] = (hsize_t)READ_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_NCOLS;
@@ -5418,13 +6317,6 @@ test_read_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z_
/* Setup one-dimensional memory dataspace for reading the dataset data into a contiguous buffer */
flat_dims[0] = sel_dims[0] * sel_dims[1];
- memspace = H5Screate_simple(1, flat_dims, NULL);
- VRFY((memspace >= 0), "Memory dataspace creation succeeded");
-
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
-
/*
* Each process defines the dataset selection in the file and reads
* it to the selection in memory
@@ -5439,16 +6331,7 @@ test_read_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z_
start[0] = ((hsize_t)mpi_rank * (hsize_t)READ_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_CH_NROWS * count[0]);
start[1] = 0;
- if (VERBOSE_MED) {
- printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- fflush(stdout);
- }
-
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
/* Create property list for data transform */
plist_id = H5Pcopy(dxpl_id);
@@ -5457,50 +6340,52 @@ test_read_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z_
/* Set data transform expression */
VRFY((H5Pset_data_transform(plist_id, "x") >= 0), "Set data transform expression succeeded");
- read_buf_size = flat_dims[0] * sizeof(*read_buf);
+ read_buf_size = flat_dims[0] * sizeof(C_DATATYPE);
- read_buf = (C_DATATYPE *)calloc(1, read_buf_size);
- VRFY((NULL != read_buf), "calloc succeeded");
-
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, plist_id, read_buf) >= 0),
- "Dataset read succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ read_bufs[dset_idx] = calloc(1, read_buf_size);
+ VRFY((NULL != read_bufs[dset_idx]), "calloc succeeded");
+ }
- global_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != global_buf), "calloc succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids[0], dxpl_id, read_bufs,
+ test_mode);
/* Collect each piece of data from all ranks into a global buffer on all ranks */
- recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts));
+ global_buf = calloc(1, data_size);
+ VRFY((NULL != global_buf), "calloc succeeded");
+ recvcounts = calloc(1, (size_t)mpi_size * sizeof(*recvcounts));
VRFY((NULL != recvcounts), "calloc succeeded");
+ displs = calloc(1, (size_t)mpi_size * sizeof(*displs));
+ VRFY((NULL != displs), "calloc succeeded");
- for (i = 0; i < (size_t)mpi_size; i++)
+ for (size_t i = 0; i < (size_t)mpi_size; i++) {
recvcounts[i] = (int)flat_dims[0];
+ displs[i] = (int)(i * flat_dims[0]);
+ }
- displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs));
- VRFY((NULL != displs), "calloc succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ mpi_code = MPI_Allgatherv(read_bufs[dset_idx], (int)flat_dims[0], C_DATATYPE_MPI, global_buf,
+ recvcounts, displs, C_DATATYPE_MPI, comm);
+ VRFY((MPI_SUCCESS == mpi_code), "MPI_Allgatherv succeeded");
+
+ VRFY((0 == memcmp(global_buf, data_bufs[dset_idx], data_size)), "Data verification succeeded");
+ }
- for (i = 0; i < (size_t)mpi_size; i++)
- displs[i] = (int)(i * flat_dims[0]);
+ free(displs);
+ free(recvcounts);
+ free(global_buf);
- VRFY((MPI_SUCCESS == MPI_Allgatherv(read_buf, (int)flat_dims[0], C_DATATYPE_MPI, global_buf, recvcounts,
- displs, C_DATATYPE_MPI, comm)),
- "MPI_Allgatherv succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ free(read_bufs[dset_idx]);
- VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++)
+ free(data_bufs_nc[dset_idx]);
- if (displs)
- free(displs);
- if (recvcounts)
- free(recvcounts);
- if (global_buf)
- free(global_buf);
- if (read_buf)
- free(read_buf);
- if (correct_buf)
- free(correct_buf);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
- VRFY((H5Sclose(memspace) >= 0), "Memory dataspace close succeeded");
VRFY((H5Pclose(plist_id) >= 0), "DXPL close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -5522,11 +6407,13 @@ test_read_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z_
*/
static void
test_read_3d_filtered_dataset_no_overlap_same_pages(const char *parent_group, H5Z_filter_t filter_id,
- hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id)
+ hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode)
{
- C_DATATYPE *read_buf = NULL;
- C_DATATYPE *correct_buf = NULL;
- C_DATATYPE *global_buf = NULL;
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *global_buf = NULL;
hsize_t dataset_dims[READ_UNSHARED_FILTERED_CHUNKS_3D_SAME_PAGE_DATASET_DIMS];
hsize_t chunk_dims[READ_UNSHARED_FILTERED_CHUNKS_3D_SAME_PAGE_DATASET_DIMS];
hsize_t sel_dims[READ_UNSHARED_FILTERED_CHUNKS_3D_SAME_PAGE_DATASET_DIMS];
@@ -5535,29 +6422,79 @@ test_read_3d_filtered_dataset_no_overlap_same_pages(const char *parent_group, H5
hsize_t count[READ_UNSHARED_FILTERED_CHUNKS_3D_SAME_PAGE_DATASET_DIMS];
hsize_t block[READ_UNSHARED_FILTERED_CHUNKS_3D_SAME_PAGE_DATASET_DIMS];
hsize_t flat_dims[1];
- size_t i, read_buf_size, correct_buf_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
- hid_t group_id = H5I_INVALID_HID;
- hid_t filespace = H5I_INVALID_HID, memspace = H5I_INVALID_HID;
+ size_t data_size, read_buf_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ hid_t group_id = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
int *recvcounts = NULL;
int *displs = NULL;
+ int mpi_code;
if (MAINPROCESS)
- HDputs("Testing read from unshared filtered chunks on the same pages in 3D dataset");
+ puts("Testing read from unshared filtered chunks on the same pages in 3D dataset");
dataset_dims[0] = (hsize_t)READ_UNSHARED_FILTERED_CHUNKS_3D_SAME_PAGE_NROWS;
dataset_dims[1] = (hsize_t)READ_UNSHARED_FILTERED_CHUNKS_3D_SAME_PAGE_NCOLS;
dataset_dims[2] = (hsize_t)READ_UNSHARED_FILTERED_CHUNKS_3D_SAME_PAGE_DEPTH;
/* Setup the buffer for writing and for comparison */
- correct_buf_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(*correct_buf);
+ data_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(C_DATATYPE);
+
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++) {
+ C_DATATYPE *tmp_buf = calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
+
+ for (size_t j = 0; j < data_size / sizeof(C_DATATYPE); j++)
+ tmp_buf[j] = (C_DATATYPE)((j % (dataset_dims[0] * dataset_dims[1])) +
+ (j / (dataset_dims[0] * dataset_dims[1])) + dset_idx);
- correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "calloc succeeded");
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
+ }
+
+ file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
+ VRFY((file_id >= 0), "Test file open succeeded");
+
+ group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
+ VRFY((group_id >= 0), "H5Gopen2 succeeded");
+
+ /* Create the dataspace for the dataset */
+ filespace = H5Screate_simple(READ_UNSHARED_FILTERED_CHUNKS_3D_SAME_PAGE_DATASET_DIMS, dataset_dims, NULL);
+ VRFY((filespace >= 0), "File dataspace creation succeeded");
+
+ /* Create chunked dataset */
+ chunk_dims[0] = (hsize_t)READ_UNSHARED_FILTERED_CHUNKS_3D_SAME_PAGE_CH_NROWS;
+ chunk_dims[1] = (hsize_t)READ_UNSHARED_FILTERED_CHUNKS_3D_SAME_PAGE_CH_NCOLS;
+ chunk_dims[2] = 1;
+
+ plist_id = H5Pcopy(dcpl_id);
+ VRFY((plist_id >= 0), "DCPL copy succeeded");
+
+ VRFY((H5Pset_chunk(plist_id, READ_UNSHARED_FILTERED_CHUNKS_3D_SAME_PAGE_DATASET_DIMS, chunk_dims) >= 0),
+ "Chunk size set");
+
+ /* Add test filter to the pipeline */
+ VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
+
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, READ_UNSHARED_FILTERED_CHUNKS_3D_SAME_PAGE_DATASET_NAME, HDF5_DATATYPE_NAME,
+ filespace, plist_id, test_mode, &num_dsets, dset_ids);
+
+ /* Verify space allocation status */
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
- for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++)
- correct_buf[i] = (C_DATATYPE)((i % (dataset_dims[0] * dataset_dims[1])) +
- (i / (dataset_dims[0] * dataset_dims[1])));
+ VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
+ VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
+ VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
+ VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
+
+ MPI_Barrier(comm);
if (MAINPROCESS) {
plist_id = H5Pcreate(H5P_FILE_ACCESS);
@@ -5574,55 +6511,39 @@ test_read_3d_filtered_dataset_no_overlap_same_pages(const char *parent_group, H5
group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
VRFY((group_id >= 0), "H5Gopen2 succeeded");
- /* Create the dataspace for the dataset */
- filespace =
- H5Screate_simple(READ_UNSHARED_FILTERED_CHUNKS_3D_SAME_PAGE_DATASET_DIMS, dataset_dims, NULL);
- VRFY((filespace >= 0), "File dataspace creation succeeded");
-
- /* Create chunked dataset */
- chunk_dims[0] = (hsize_t)READ_UNSHARED_FILTERED_CHUNKS_3D_SAME_PAGE_CH_NROWS;
- chunk_dims[1] = (hsize_t)READ_UNSHARED_FILTERED_CHUNKS_3D_SAME_PAGE_CH_NCOLS;
- chunk_dims[2] = 1;
-
- plist_id = H5Pcopy(dcpl_id);
- VRFY((plist_id >= 0), "DCPL copy succeeded");
-
- VRFY((H5Pset_chunk(plist_id, READ_UNSHARED_FILTERED_CHUNKS_3D_SAME_PAGE_DATASET_DIMS, chunk_dims) >=
- 0),
- "Chunk size set");
+ open_datasets(group_id, READ_UNSHARED_FILTERED_CHUNKS_3D_SAME_PAGE_DATASET_NAME, num_dsets, test_mode,
+ dset_ids);
- /* Add test filter to the pipeline */
- VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
+ select_all(num_dsets, dset_ids, fspace_ids);
- dset_id = H5Dcreate2(group_id, READ_UNSHARED_FILTERED_CHUNKS_3D_SAME_PAGE_DATASET_NAME,
- HDF5_DATATYPE_NAME, filespace, H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_ALL, fspace_ids, H5P_DEFAULT, data_bufs,
+ test_mode);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
-
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
-
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, H5P_DEFAULT, correct_buf) >= 0),
- "Dataset write succeeded");
+ plist_id = H5Dget_create_plist(dset_ids[0]);
+ VRFY((plist_id >= 0), "H5Dget_create_plist succeeded");
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, ALL_CHUNKS_WRITTEN);
- /* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
}
+ MPI_Barrier(comm);
+
file_id = H5Fopen(filenames[0], H5F_ACC_RDONLY, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");
group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
VRFY((group_id >= 0), "H5Gopen2 succeeded");
- dset_id = H5Dopen2(group_id, READ_UNSHARED_FILTERED_CHUNKS_3D_SAME_PAGE_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ open_datasets(group_id, READ_UNSHARED_FILTERED_CHUNKS_3D_SAME_PAGE_DATASET_NAME, num_dsets, test_mode,
+ dset_ids);
sel_dims[0] = (hsize_t)READ_UNSHARED_FILTERED_CHUNKS_3D_SAME_PAGE_CH_NROWS;
sel_dims[1] = (hsize_t)READ_UNSHARED_FILTERED_CHUNKS_3D_SAME_PAGE_NCOLS;
@@ -5631,13 +6552,6 @@ test_read_3d_filtered_dataset_no_overlap_same_pages(const char *parent_group, H5
/* Setup one-dimensional memory dataspace for reading the dataset data into a contiguous buffer */
flat_dims[0] = sel_dims[0] * sel_dims[1] * sel_dims[2];
- memspace = H5Screate_simple(1, flat_dims, NULL);
- VRFY((memspace >= 0), "Memory dataspace creation succeeded");
-
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
-
/*
* Each process defines the dataset selection in the file and
* reads it to the selection in memory
@@ -5656,61 +6570,54 @@ test_read_3d_filtered_dataset_no_overlap_same_pages(const char *parent_group, H5
start[1] = 0;
start[2] = 0;
- if (VERBOSE_MED) {
- printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- fflush(stdout);
- }
-
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
-
- read_buf_size = flat_dims[0] * sizeof(*read_buf);
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
- read_buf = (C_DATATYPE *)calloc(1, read_buf_size);
- VRFY((NULL != read_buf), "calloc succeeded");
+ read_buf_size = flat_dims[0] * sizeof(C_DATATYPE);
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ read_bufs[dset_idx] = calloc(1, read_buf_size);
+ VRFY((NULL != read_bufs[dset_idx]), "calloc succeeded");
+ }
- global_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != global_buf), "calloc succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids[0], dxpl_id, read_bufs,
+ test_mode);
/* Collect each piece of data from all ranks into a global buffer on all ranks */
- recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts));
+ global_buf = calloc(1, data_size);
+ VRFY((NULL != global_buf), "calloc succeeded");
+ recvcounts = calloc(1, (size_t)mpi_size * sizeof(*recvcounts));
VRFY((NULL != recvcounts), "calloc succeeded");
+ displs = calloc(1, (size_t)mpi_size * sizeof(*displs));
+ VRFY((NULL != displs), "calloc succeeded");
- for (i = 0; i < (size_t)mpi_size; i++)
+ for (size_t i = 0; i < (size_t)mpi_size; i++) {
recvcounts[i] = (int)flat_dims[0];
+ displs[i] = (int)(i * flat_dims[0]);
+ }
- displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs));
- VRFY((NULL != displs), "calloc succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ mpi_code = MPI_Allgatherv(read_bufs[dset_idx], (int)flat_dims[0], C_DATATYPE_MPI, global_buf,
+ recvcounts, displs, C_DATATYPE_MPI, comm);
+ VRFY((MPI_SUCCESS == mpi_code), "MPI_Allgatherv succeeded");
- for (i = 0; i < (size_t)mpi_size; i++)
- displs[i] = (int)(i * flat_dims[0]);
+ VRFY((0 == memcmp(global_buf, data_bufs[dset_idx], data_size)), "Data verification succeeded");
+ }
- VRFY((MPI_SUCCESS == MPI_Allgatherv(read_buf, (int)flat_dims[0], C_DATATYPE_MPI, global_buf, recvcounts,
- displs, C_DATATYPE_MPI, comm)),
- "MPI_Allgatherv succeeded");
+ free(displs);
+ free(recvcounts);
+ free(global_buf);
- VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ free(read_bufs[dset_idx]);
- if (displs)
- free(displs);
- if (recvcounts)
- free(recvcounts);
- if (global_buf)
- free(global_buf);
- if (read_buf)
- free(read_buf);
- if (correct_buf)
- free(correct_buf);
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++)
+ free(data_bufs_nc[dset_idx]);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
- VRFY((H5Sclose(memspace) >= 0), "Memory dataspace close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -5731,13 +6638,14 @@ test_read_3d_filtered_dataset_no_overlap_same_pages(const char *parent_group, H5
*/
static void
test_read_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id)
+ hid_t dcpl_id, hid_t dxpl_id, test_mode_t test_mode)
{
MPI_Datatype vector_type;
MPI_Datatype resized_vector_type;
- C_DATATYPE *read_buf = NULL;
- C_DATATYPE *correct_buf = NULL;
- C_DATATYPE *global_buf = NULL;
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *global_buf = NULL;
hsize_t dataset_dims[READ_SHARED_FILTERED_CHUNKS_3D_DATASET_DIMS];
hsize_t chunk_dims[READ_SHARED_FILTERED_CHUNKS_3D_DATASET_DIMS];
hsize_t sel_dims[READ_SHARED_FILTERED_CHUNKS_3D_DATASET_DIMS];
@@ -5746,41 +6654,95 @@ test_read_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t fil
hsize_t count[READ_SHARED_FILTERED_CHUNKS_3D_DATASET_DIMS];
hsize_t block[READ_SHARED_FILTERED_CHUNKS_3D_DATASET_DIMS];
hsize_t flat_dims[1];
- size_t i, read_buf_size, correct_buf_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ size_t data_size, read_buf_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
hid_t group_id = H5I_INVALID_HID;
- hid_t filespace = H5I_INVALID_HID, memspace = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
+ int mpi_code;
if (MAINPROCESS)
- HDputs("Testing read from shared filtered chunks in 3D dataset");
+ puts("Testing read from shared filtered chunks in 3D dataset");
dataset_dims[0] = (hsize_t)READ_SHARED_FILTERED_CHUNKS_3D_NROWS;
dataset_dims[1] = (hsize_t)READ_SHARED_FILTERED_CHUNKS_3D_NCOLS;
dataset_dims[2] = (hsize_t)READ_SHARED_FILTERED_CHUNKS_3D_DEPTH;
/* Setup the buffer for writing and for comparison */
- correct_buf_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(*correct_buf);
+ data_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(C_DATATYPE);
+
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++) {
+ C_DATATYPE *tmp_buf = calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
+
+ for (size_t j = 0; j < data_size / sizeof(C_DATATYPE); j++)
+ tmp_buf[j] =
+ /* Add the Column Index */
+ (C_DATATYPE)((j % (hsize_t)(READ_SHARED_FILTERED_CHUNKS_3D_DEPTH *
+ READ_SHARED_FILTERED_CHUNKS_3D_NCOLS))
+
+ /* Add the Row Index */
+ + ((j % (hsize_t)(mpi_size * READ_SHARED_FILTERED_CHUNKS_3D_DEPTH *
+ READ_SHARED_FILTERED_CHUNKS_3D_NCOLS)) /
+ (hsize_t)(READ_SHARED_FILTERED_CHUNKS_3D_DEPTH *
+ READ_SHARED_FILTERED_CHUNKS_3D_NCOLS))
+
+ /* Add the amount that gets added when a rank moves down to its next
+ section vertically in the dataset */
+ + ((hsize_t)(READ_SHARED_FILTERED_CHUNKS_3D_DEPTH *
+ READ_SHARED_FILTERED_CHUNKS_3D_NCOLS) *
+ (j / (hsize_t)(mpi_size * READ_SHARED_FILTERED_CHUNKS_3D_DEPTH *
+ READ_SHARED_FILTERED_CHUNKS_3D_NCOLS)))
+
+ /* Add an increment factor for the multi-dataset case */
+ + dset_idx);
+
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
+ }
+
+ file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
+ VRFY((file_id >= 0), "Test file open succeeded");
- correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "calloc succeeded");
+ group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
+ VRFY((group_id >= 0), "H5Gopen2 succeeded");
+
+ /* Create the dataspace for the dataset */
+ filespace = H5Screate_simple(READ_SHARED_FILTERED_CHUNKS_3D_DATASET_DIMS, dataset_dims, NULL);
+ VRFY((filespace >= 0), "File dataspace creation succeeded");
+
+ /* Create chunked dataset */
+ chunk_dims[0] = (hsize_t)READ_SHARED_FILTERED_CHUNKS_3D_CH_NROWS;
+ chunk_dims[1] = (hsize_t)READ_SHARED_FILTERED_CHUNKS_3D_CH_NCOLS;
+ chunk_dims[2] = 1;
+
+ plist_id = H5Pcopy(dcpl_id);
+ VRFY((plist_id >= 0), "DCPL copy succeeded");
+
+ VRFY((H5Pset_chunk(plist_id, READ_SHARED_FILTERED_CHUNKS_3D_DATASET_DIMS, chunk_dims) >= 0),
+ "Chunk size set");
+
+ /* Add test filter to the pipeline */
+ VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
+
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, READ_SHARED_FILTERED_CHUNKS_3D_DATASET_NAME, HDF5_DATATYPE_NAME, filespace,
+ plist_id, test_mode, &num_dsets, dset_ids);
- for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++)
- /* Add the Column Index */
- correct_buf[i] = (C_DATATYPE)((i % (hsize_t)(READ_SHARED_FILTERED_CHUNKS_3D_DEPTH *
- READ_SHARED_FILTERED_CHUNKS_3D_NCOLS))
+ /* Verify space allocation status */
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
- /* Add the Row Index */
- + ((i % (hsize_t)(mpi_size * READ_SHARED_FILTERED_CHUNKS_3D_DEPTH *
- READ_SHARED_FILTERED_CHUNKS_3D_NCOLS)) /
- (hsize_t)(READ_SHARED_FILTERED_CHUNKS_3D_DEPTH *
- READ_SHARED_FILTERED_CHUNKS_3D_NCOLS))
+ VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
+ VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
+ VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
+ VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
- /* Add the amount that gets added when a rank moves down to its next
- section vertically in the dataset */
- + ((hsize_t)(READ_SHARED_FILTERED_CHUNKS_3D_DEPTH *
- READ_SHARED_FILTERED_CHUNKS_3D_NCOLS) *
- (i / (hsize_t)(mpi_size * READ_SHARED_FILTERED_CHUNKS_3D_DEPTH *
- READ_SHARED_FILTERED_CHUNKS_3D_NCOLS))));
+ MPI_Barrier(comm);
if (MAINPROCESS) {
plist_id = H5Pcreate(H5P_FILE_ACCESS);
@@ -5797,53 +6759,37 @@ test_read_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t fil
group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
VRFY((group_id >= 0), "H5Gopen2 succeeded");
- /* Create the dataspace for the dataset */
- filespace = H5Screate_simple(READ_SHARED_FILTERED_CHUNKS_3D_DATASET_DIMS, dataset_dims, NULL);
- VRFY((filespace >= 0), "File dataspace creation succeeded");
-
- /* Create chunked dataset */
- chunk_dims[0] = (hsize_t)READ_SHARED_FILTERED_CHUNKS_3D_CH_NROWS;
- chunk_dims[1] = (hsize_t)READ_SHARED_FILTERED_CHUNKS_3D_CH_NCOLS;
- chunk_dims[2] = 1;
-
- plist_id = H5Pcopy(dcpl_id);
- VRFY((plist_id >= 0), "DCPL copy succeeded");
+ open_datasets(group_id, READ_SHARED_FILTERED_CHUNKS_3D_DATASET_NAME, num_dsets, test_mode, dset_ids);
- VRFY((H5Pset_chunk(plist_id, READ_SHARED_FILTERED_CHUNKS_3D_DATASET_DIMS, chunk_dims) >= 0),
- "Chunk size set");
+ select_all(num_dsets, dset_ids, fspace_ids);
- /* Add test filter to the pipeline */
- VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
-
- dset_id = H5Dcreate2(group_id, READ_SHARED_FILTERED_CHUNKS_3D_DATASET_NAME, HDF5_DATATYPE_NAME,
- filespace, H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_ALL, fspace_ids, H5P_DEFAULT, data_bufs,
+ test_mode);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
-
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
-
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, H5P_DEFAULT, correct_buf) >= 0),
- "Dataset write succeeded");
+ plist_id = H5Dget_create_plist(dset_ids[0]);
+ VRFY((plist_id >= 0), "H5Dget_create_plist succeeded");
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, ALL_CHUNKS_WRITTEN);
- /* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
}
+ MPI_Barrier(comm);
+
file_id = H5Fopen(filenames[0], H5F_ACC_RDONLY, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");
group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
VRFY((group_id >= 0), "H5Gopen2 succeeded");
- dset_id = H5Dopen2(group_id, READ_SHARED_FILTERED_CHUNKS_3D_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ open_datasets(group_id, READ_SHARED_FILTERED_CHUNKS_3D_DATASET_NAME, num_dsets, test_mode, dset_ids);
sel_dims[0] = (hsize_t)(READ_SHARED_FILTERED_CHUNKS_3D_NROWS / mpi_size);
sel_dims[1] = (hsize_t)READ_SHARED_FILTERED_CHUNKS_3D_NCOLS;
@@ -5852,13 +6798,6 @@ test_read_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t fil
/* Setup one-dimensional memory dataspace for reading the dataset data into a contiguous buffer */
flat_dims[0] = sel_dims[0] * sel_dims[1] * sel_dims[2];
- memspace = H5Screate_simple(1, flat_dims, NULL);
- VRFY((memspace >= 0), "Memory dataspace creation succeeded");
-
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
-
/*
* Each process defines the dataset selection in the file and
* reads it to the selection in memory
@@ -5876,26 +6815,20 @@ test_read_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t fil
start[1] = 0;
start[2] = 0;
- if (VERBOSE_MED) {
- printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- fflush(stdout);
- }
-
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
- read_buf_size = flat_dims[0] * sizeof(*read_buf);
+ read_buf_size = flat_dims[0] * sizeof(C_DATATYPE);
- read_buf = (C_DATATYPE *)calloc(1, read_buf_size);
- VRFY((NULL != read_buf), "calloc succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ read_bufs[dset_idx] = calloc(1, read_buf_size);
+ VRFY((NULL != read_bufs[dset_idx]), "calloc succeeded");
+ }
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids[0], dxpl_id, read_bufs,
+ test_mode);
- global_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
+ /* Collect each piece of data from all ranks into a global buffer on all ranks */
+ global_buf = calloc(1, data_size);
VRFY((NULL != global_buf), "calloc succeeded");
{
@@ -5907,41 +6840,49 @@ test_read_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t fil
* Due to the nature of 3-dimensional reading, create an MPI vector type that allows each
* rank to write to the nth position of the global data buffer, where n is the rank number.
*/
- VRFY(
- (MPI_SUCCESS == MPI_Type_vector((int)num_blocks, (int)run_length,
- (int)(mpi_size * (int)run_length), C_DATATYPE_MPI, &vector_type)),
- "MPI_Type_vector succeeded");
- VRFY((MPI_SUCCESS == MPI_Type_commit(&vector_type)), "MPI_Type_commit succeeded");
+ mpi_code = MPI_Type_vector((int)num_blocks, (int)run_length, (int)(mpi_size * (int)run_length),
+ C_DATATYPE_MPI, &vector_type);
+ VRFY((MPI_SUCCESS == mpi_code), "MPI_Type_vector succeeded");
+ mpi_code = MPI_Type_commit(&vector_type);
+ VRFY((MPI_SUCCESS == mpi_code), "MPI_Type_commit succeeded");
/*
* Resize the type to allow interleaving,
* so make it "run_length" MPI_LONGs wide
*/
- VRFY((MPI_SUCCESS == MPI_Type_create_resized(vector_type, 0, (MPI_Aint)(run_length * sizeof(long)),
- &resized_vector_type)),
- "MPI_Type_create_resized");
- VRFY((MPI_SUCCESS == MPI_Type_commit(&resized_vector_type)), "MPI_Type_commit succeeded");
+ mpi_code = MPI_Type_create_resized(vector_type, 0, (MPI_Aint)(run_length * sizeof(long)),
+ &resized_vector_type);
+ VRFY((MPI_SUCCESS == mpi_code), "MPI_Type_create_resized");
+ mpi_code = MPI_Type_commit(&resized_vector_type);
+ VRFY((MPI_SUCCESS == mpi_code), "MPI_Type_commit succeeded");
}
- VRFY((MPI_SUCCESS == MPI_Allgather(read_buf, (int)flat_dims[0], C_DATATYPE_MPI, global_buf, 1,
- resized_vector_type, comm)),
- "MPI_Allgatherv succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ mpi_code = MPI_Allgather(read_bufs[dset_idx], (int)flat_dims[0], C_DATATYPE_MPI, global_buf, 1,
+ resized_vector_type, comm);
+ VRFY((MPI_SUCCESS == mpi_code), "MPI_Allgatherv succeeded");
- VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(global_buf, data_bufs[dset_idx], data_size)), "Data verification succeeded");
+ }
- VRFY((MPI_SUCCESS == MPI_Type_free(&vector_type)), "MPI_Type_free succeeded");
- VRFY((MPI_SUCCESS == MPI_Type_free(&resized_vector_type)), "MPI_Type_free succeeded");
+ mpi_code = MPI_Type_free(&vector_type);
+ VRFY((MPI_SUCCESS == mpi_code), "MPI_Type_free succeeded");
+ mpi_code = MPI_Type_free(&resized_vector_type);
+ VRFY((MPI_SUCCESS == mpi_code), "MPI_Type_free succeeded");
- if (global_buf)
- free(global_buf);
- if (read_buf)
- free(read_buf);
- if (correct_buf)
- free(correct_buf);
+ free(global_buf);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ free(read_bufs[dset_idx]);
+
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++)
+ free(data_bufs_nc[dset_idx]);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
- VRFY((H5Sclose(memspace) >= 0), "Memory dataspace close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -5961,30 +6902,36 @@ test_read_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t fil
*/
static void
test_read_cmpd_filtered_dataset_no_conversion_unshared(const char *parent_group, H5Z_filter_t filter_id,
- hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id)
+ hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode)
{
- COMPOUND_C_DATATYPE *read_buf = NULL;
- COMPOUND_C_DATATYPE *correct_buf = NULL;
- COMPOUND_C_DATATYPE *global_buf = NULL;
- hsize_t dataset_dims[READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_DIMS];
- hsize_t chunk_dims[READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_DIMS];
- hsize_t sel_dims[READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_DIMS];
- hsize_t start[READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_DIMS];
- hsize_t stride[READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_DIMS];
- hsize_t count[READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_DIMS];
- hsize_t block[READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_DIMS];
- hsize_t flat_dims[1];
- size_t i, read_buf_size, correct_buf_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID,
- memtype = H5I_INVALID_HID;
- hid_t group_id = H5I_INVALID_HID;
- hid_t filespace = H5I_INVALID_HID, memspace = H5I_INVALID_HID;
- int *recvcounts = NULL;
- int *displs = NULL;
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *global_buf = NULL;
+ hsize_t dataset_dims[READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_DIMS];
+ hsize_t chunk_dims[READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_DIMS];
+ hsize_t sel_dims[READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_DIMS];
+ hsize_t start[READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_DIMS];
+ hsize_t stride[READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_DIMS];
+ hsize_t count[READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_DIMS];
+ hsize_t block[READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_DIMS];
+ hsize_t flat_dims[1];
+ size_t data_size, read_buf_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ hid_t group_id = H5I_INVALID_HID;
+ hid_t memtype = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
+ int *recvcounts = NULL;
+ int *displs = NULL;
+ int mpi_code;
if (MAINPROCESS)
- HDputs("Testing read from unshared filtered chunks in Compound Datatype dataset without Datatype "
- "conversion");
+ puts("Testing read from unshared filtered chunks in Compound Datatype dataset without Datatype "
+ "conversion");
/* SZIP and ScaleOffset filters don't support compound types */
if (filter_id == H5Z_FILTER_SZIP || filter_id == H5Z_FILTER_SCALEOFFSET) {
@@ -5997,17 +6944,20 @@ test_read_cmpd_filtered_dataset_no_conversion_unshared(const char *parent_group,
dataset_dims[1] = (hsize_t)READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_NCOLS;
/* Setup the buffer for writing and for comparison */
- correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf);
-
- correct_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "calloc succeeded");
+ data_size = dataset_dims[0] * dataset_dims[1] * sizeof(COMPOUND_C_DATATYPE);
- for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) {
- correct_buf[i].field1 = (short)((i % dataset_dims[1]) + (i / dataset_dims[1]));
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++) {
+ COMPOUND_C_DATATYPE *tmp_buf = calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
- correct_buf[i].field2 = (int)((i % dataset_dims[1]) + (i / dataset_dims[1]));
+ for (size_t j = 0; j < data_size / sizeof(COMPOUND_C_DATATYPE); j++) {
+ tmp_buf[j].field1 = (short)((j % dataset_dims[1]) + (j / dataset_dims[1]) + dset_idx);
+ tmp_buf[j].field2 = (int)((j % dataset_dims[1]) + (j / dataset_dims[1]) + dset_idx);
+ tmp_buf[j].field3 = (long)((j % dataset_dims[1]) + (j / dataset_dims[1]) + dset_idx);
+ }
- correct_buf[i].field3 = (long)((i % dataset_dims[1]) + (i / dataset_dims[1]));
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
}
/* Create the compound type for memory. */
@@ -6021,6 +6971,48 @@ test_read_cmpd_filtered_dataset_no_conversion_unshared(const char *parent_group,
VRFY((H5Tinsert(memtype, "LongData", HOFFSET(COMPOUND_C_DATATYPE, field3), H5T_NATIVE_LONG) >= 0),
"Datatype insertion succeeded");
+ file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
+ VRFY((file_id >= 0), "Test file open succeeded");
+
+ group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
+ VRFY((group_id >= 0), "H5Gopen2 succeeded");
+
+ /* Create the dataspace for the dataset */
+ filespace = H5Screate_simple(READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_DIMS,
+ dataset_dims, NULL);
+ VRFY((filespace >= 0), "File dataspace creation succeeded");
+
+ /* Create chunked dataset */
+ chunk_dims[0] = READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_CH_NROWS;
+ chunk_dims[1] = READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_CH_NCOLS;
+
+ plist_id = H5Pcopy(dcpl_id);
+ VRFY((plist_id >= 0), "DCPL copy succeeded");
+
+ VRFY((H5Pset_chunk(plist_id, READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_DIMS,
+ chunk_dims) >= 0),
+ "Chunk size set");
+
+ /* Add test filter to the pipeline */
+ VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
+
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_NAME, memtype,
+ filespace, plist_id, test_mode, &num_dsets, dset_ids);
+
+ /* Verify space allocation status */
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+
+ VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
+ VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
+ VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
+ VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
+
+ MPI_Barrier(comm);
+
if (MAINPROCESS) {
plist_id = H5Pcreate(H5P_FILE_ACCESS);
VRFY((plist_id >= 0), "FAPL creation succeeded");
@@ -6036,55 +7028,38 @@ test_read_cmpd_filtered_dataset_no_conversion_unshared(const char *parent_group,
group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
VRFY((group_id >= 0), "H5Gopen2 succeeded");
- /* Create the dataspace for the dataset */
- filespace = H5Screate_simple(READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_DIMS,
- dataset_dims, NULL);
- VRFY((filespace >= 0), "File dataspace creation succeeded");
-
- /* Create chunked dataset */
- chunk_dims[0] = READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_CH_NROWS;
- chunk_dims[1] = READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_CH_NCOLS;
-
- plist_id = H5Pcopy(dcpl_id);
- VRFY((plist_id >= 0), "DCPL copy succeeded");
+ open_datasets(group_id, READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_NAME, num_dsets,
+ test_mode, dset_ids);
- VRFY((H5Pset_chunk(plist_id, READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_DIMS,
- chunk_dims) >= 0),
- "Chunk size set");
+ select_all(num_dsets, dset_ids, fspace_ids);
- /* Add test filter to the pipeline */
- VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
-
- dset_id = H5Dcreate2(group_id, READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_NAME,
- memtype, filespace, H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ write_datasets(num_dsets, dset_ids, memtype, H5S_ALL, fspace_ids, H5P_DEFAULT, data_bufs, test_mode);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
-
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
-
- VRFY((H5Dwrite(dset_id, memtype, H5S_ALL, H5S_ALL, H5P_DEFAULT, correct_buf) >= 0),
- "Dataset write succeeded");
+ plist_id = H5Dget_create_plist(dset_ids[0]);
+ VRFY((plist_id >= 0), "H5Dget_create_plist succeeded");
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, ALL_CHUNKS_WRITTEN);
- /* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
}
+ MPI_Barrier(comm);
+
file_id = H5Fopen(filenames[0], H5F_ACC_RDONLY, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");
group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
VRFY((group_id >= 0), "H5Gopen2 succeeded");
- dset_id =
- H5Dopen2(group_id, READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ open_datasets(group_id, READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_NAME, num_dsets,
+ test_mode, dset_ids);
sel_dims[0] = (hsize_t)READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_CH_NROWS;
sel_dims[1] = (hsize_t)READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_ENTRIES_PER_PROC;
@@ -6092,13 +7067,6 @@ test_read_cmpd_filtered_dataset_no_conversion_unshared(const char *parent_group,
/* Setup one-dimensional memory dataspace for reading the dataset data into a contiguous buffer */
flat_dims[0] = sel_dims[0] * sel_dims[1];
- memspace = H5Screate_simple(1, flat_dims, NULL);
- VRFY((memspace >= 0), "Memory dataspace creation succeeded");
-
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
-
/*
* Each process defines the dataset selection in the file and
* reads it to the selection in memory
@@ -6112,60 +7080,53 @@ test_read_cmpd_filtered_dataset_no_conversion_unshared(const char *parent_group,
start[0] = 0;
start[1] = ((hsize_t)mpi_rank * READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_CH_NCOLS);
- if (VERBOSE_MED) {
- printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- fflush(stdout);
- }
-
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
- read_buf_size = flat_dims[0] * sizeof(*read_buf);
+ read_buf_size = flat_dims[0] * sizeof(COMPOUND_C_DATATYPE);
- read_buf = (COMPOUND_C_DATATYPE *)calloc(1, read_buf_size);
- VRFY((NULL != read_buf), "calloc succeeded");
-
- VRFY((H5Dread(dset_id, memtype, memspace, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ read_bufs[dset_idx] = calloc(1, read_buf_size);
+ VRFY((NULL != read_bufs[dset_idx]), "calloc succeeded");
+ }
- global_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != global_buf), "calloc succeeded");
+ read_datasets(num_dsets, dset_ids, memtype, H5S_BLOCK, fspace_ids[0], dxpl_id, read_bufs, test_mode);
/* Collect each piece of data from all ranks into a global buffer on all ranks */
- recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts));
+ global_buf = calloc(1, data_size);
+ VRFY((NULL != global_buf), "calloc succeeded");
+ recvcounts = calloc(1, (size_t)mpi_size * sizeof(*recvcounts));
VRFY((NULL != recvcounts), "calloc succeeded");
+ displs = calloc(1, (size_t)mpi_size * sizeof(*displs));
+ VRFY((NULL != displs), "calloc succeeded");
+
+ for (size_t i = 0; i < (size_t)mpi_size; i++) {
+ recvcounts[i] = (int)(flat_dims[0] * sizeof(COMPOUND_C_DATATYPE));
+ displs[i] = (int)(i * flat_dims[0] * sizeof(COMPOUND_C_DATATYPE));
+ }
- for (i = 0; i < (size_t)mpi_size; i++)
- recvcounts[i] = (int)(flat_dims[0] * sizeof(*read_buf));
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ mpi_code = MPI_Allgatherv(read_bufs[dset_idx], (int)(flat_dims[0] * sizeof(COMPOUND_C_DATATYPE)),
+ MPI_BYTE, global_buf, recvcounts, displs, MPI_BYTE, comm);
+ VRFY((MPI_SUCCESS == mpi_code), "MPI_Allgatherv succeeded");
- displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs));
- VRFY((NULL != displs), "calloc succeeded");
+ VRFY((0 == memcmp(global_buf, data_bufs[dset_idx], data_size)), "Data verification succeeded");
+ }
- for (i = 0; i < (size_t)mpi_size; i++)
- displs[i] = (int)(i * flat_dims[0] * sizeof(*read_buf));
+ free(displs);
+ free(recvcounts);
+ free(global_buf);
- VRFY((MPI_SUCCESS == MPI_Allgatherv(read_buf, (int)(flat_dims[0] * sizeof(COMPOUND_C_DATATYPE)), MPI_BYTE,
- global_buf, recvcounts, displs, MPI_BYTE, comm)),
- "MPI_Allgatherv succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ free(read_bufs[dset_idx]);
- VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++)
+ free(data_bufs_nc[dset_idx]);
- if (displs)
- free(displs);
- if (recvcounts)
- free(recvcounts);
- if (global_buf)
- free(global_buf);
- if (read_buf)
- free(read_buf);
- if (correct_buf)
- free(correct_buf);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
- VRFY((H5Sclose(memspace) >= 0), "Memory dataspace close succeeded");
VRFY((H5Tclose(memtype) >= 0), "Memory datatype close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -6186,30 +7147,36 @@ test_read_cmpd_filtered_dataset_no_conversion_unshared(const char *parent_group,
*/
static void
test_read_cmpd_filtered_dataset_no_conversion_shared(const char *parent_group, H5Z_filter_t filter_id,
- hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id)
+ hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode)
{
- COMPOUND_C_DATATYPE *read_buf = NULL;
- COMPOUND_C_DATATYPE *correct_buf = NULL;
- COMPOUND_C_DATATYPE *global_buf = NULL;
- hsize_t dataset_dims[READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_DIMS];
- hsize_t chunk_dims[READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_DIMS];
- hsize_t sel_dims[READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_DIMS];
- hsize_t start[READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_DIMS];
- hsize_t stride[READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_DIMS];
- hsize_t count[READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_DIMS];
- hsize_t block[READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_DIMS];
- hsize_t flat_dims[1];
- size_t i, read_buf_size, correct_buf_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID,
- memtype = H5I_INVALID_HID;
- hid_t group_id = H5I_INVALID_HID;
- hid_t filespace = H5I_INVALID_HID, memspace = H5I_INVALID_HID;
- int *recvcounts = NULL;
- int *displs = NULL;
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *global_buf = NULL;
+ hsize_t dataset_dims[READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_DIMS];
+ hsize_t chunk_dims[READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_DIMS];
+ hsize_t sel_dims[READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_DIMS];
+ hsize_t start[READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_DIMS];
+ hsize_t stride[READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_DIMS];
+ hsize_t count[READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_DIMS];
+ hsize_t block[READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_DIMS];
+ hsize_t flat_dims[1];
+ size_t data_size, read_buf_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ hid_t group_id = H5I_INVALID_HID;
+ hid_t memtype = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
+ int *recvcounts = NULL;
+ int *displs = NULL;
+ int mpi_code;
if (MAINPROCESS)
- HDputs("Testing read from shared filtered chunks in Compound Datatype dataset without Datatype "
- "conversion");
+ puts("Testing read from shared filtered chunks in Compound Datatype dataset without Datatype "
+ "conversion");
/* SZIP and ScaleOffset filters don't support compound types */
if (filter_id == H5Z_FILTER_SZIP || filter_id == H5Z_FILTER_SCALEOFFSET) {
@@ -6222,23 +7189,25 @@ test_read_cmpd_filtered_dataset_no_conversion_shared(const char *parent_group, H
dataset_dims[1] = (hsize_t)READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_NCOLS;
/* Setup the buffer for writing and for comparison */
- correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf);
+ data_size = dataset_dims[0] * dataset_dims[1] * sizeof(COMPOUND_C_DATATYPE);
- correct_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "calloc succeeded");
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++) {
+ COMPOUND_C_DATATYPE *tmp_buf = calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
- for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) {
- correct_buf[i].field1 =
- (short)((dataset_dims[1] * (i / ((hsize_t)mpi_size * dataset_dims[1]))) + (i % dataset_dims[1]) +
- (((i % ((hsize_t)mpi_size * dataset_dims[1])) / dataset_dims[1]) % dataset_dims[1]));
+ for (size_t j = 0; j < data_size / sizeof(COMPOUND_C_DATATYPE); j++) {
+ size_t val1 = (dataset_dims[1] * (j / ((hsize_t)mpi_size * dataset_dims[1])));
+ size_t val2 = (j % dataset_dims[1]);
+ size_t val3 = (((j % ((hsize_t)mpi_size * dataset_dims[1])) / dataset_dims[1]) % dataset_dims[1]);
+ size_t val = val1 + val2 + val3 + dset_idx;
- correct_buf[i].field2 =
- (int)((dataset_dims[1] * (i / ((hsize_t)mpi_size * dataset_dims[1]))) + (i % dataset_dims[1]) +
- (((i % ((hsize_t)mpi_size * dataset_dims[1])) / dataset_dims[1]) % dataset_dims[1]));
+ tmp_buf[j].field1 = (short)val;
+ tmp_buf[j].field2 = (int)val;
+ tmp_buf[j].field3 = (long)val;
+ }
- correct_buf[i].field3 =
- (long)((dataset_dims[1] * (i / ((hsize_t)mpi_size * dataset_dims[1]))) + (i % dataset_dims[1]) +
- (((i % ((hsize_t)mpi_size * dataset_dims[1])) / dataset_dims[1]) % dataset_dims[1]));
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
}
/* Create the compound type for memory. */
@@ -6252,6 +7221,48 @@ test_read_cmpd_filtered_dataset_no_conversion_shared(const char *parent_group, H
VRFY((H5Tinsert(memtype, "LongData", HOFFSET(COMPOUND_C_DATATYPE, field3), H5T_NATIVE_LONG) >= 0),
"Datatype insertion succeeded");
+ file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
+ VRFY((file_id >= 0), "Test file open succeeded");
+
+ group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
+ VRFY((group_id >= 0), "H5Gopen2 succeeded");
+
+ /* Create the dataspace for the dataset */
+ filespace =
+ H5Screate_simple(READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_DIMS, dataset_dims, NULL);
+ VRFY((filespace >= 0), "File dataspace creation succeeded");
+
+ /* Create chunked dataset */
+ chunk_dims[0] = (hsize_t)READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_CH_NROWS;
+ chunk_dims[1] = (hsize_t)READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_CH_NCOLS;
+
+ plist_id = H5Pcopy(dcpl_id);
+ VRFY((plist_id >= 0), "DCPL copy succeeded");
+
+ VRFY((H5Pset_chunk(plist_id, READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_DIMS,
+ chunk_dims) >= 0),
+ "Chunk size set");
+
+ /* Add test filter to the pipeline */
+ VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
+
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_NAME, memtype,
+ filespace, plist_id, test_mode, &num_dsets, dset_ids);
+
+ /* Verify space allocation status */
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+
+ VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
+ VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
+ VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
+ VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
+
+ MPI_Barrier(comm);
+
if (MAINPROCESS) {
plist_id = H5Pcreate(H5P_FILE_ACCESS);
VRFY((plist_id >= 0), "FAPL creation succeeded");
@@ -6267,55 +7278,38 @@ test_read_cmpd_filtered_dataset_no_conversion_shared(const char *parent_group, H
group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
VRFY((group_id >= 0), "H5Gopen2 succeeded");
- /* Create the dataspace for the dataset */
- filespace = H5Screate_simple(READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_DIMS,
- dataset_dims, NULL);
- VRFY((filespace >= 0), "File dataspace creation succeeded");
-
- /* Create chunked dataset */
- chunk_dims[0] = (hsize_t)READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_CH_NROWS;
- chunk_dims[1] = (hsize_t)READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_CH_NCOLS;
-
- plist_id = H5Pcopy(dcpl_id);
- VRFY((plist_id >= 0), "DCPL copy succeeded");
-
- VRFY((H5Pset_chunk(plist_id, READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_DIMS,
- chunk_dims) >= 0),
- "Chunk size set");
-
- /* Add test filter to the pipeline */
- VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
-
- dset_id = H5Dcreate2(group_id, READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_NAME,
- memtype, filespace, H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
-
- /* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
+ open_datasets(group_id, READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_NAME, num_dsets,
+ test_mode, dset_ids);
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
+ select_all(num_dsets, dset_ids, fspace_ids);
- VRFY((H5Dwrite(dset_id, memtype, H5S_ALL, H5S_ALL, H5P_DEFAULT, correct_buf) >= 0),
- "Dataset write succeeded");
+ write_datasets(num_dsets, dset_ids, memtype, H5S_ALL, fspace_ids, H5P_DEFAULT, data_bufs, test_mode);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
+ plist_id = H5Dget_create_plist(dset_ids[0]);
+ VRFY((plist_id >= 0), "H5Dget_create_plist succeeded");
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, ALL_CHUNKS_WRITTEN);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
}
+ MPI_Barrier(comm);
+
file_id = H5Fopen(filenames[0], H5F_ACC_RDONLY, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");
group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
VRFY((group_id >= 0), "H5Gopen2 succeeded");
- dset_id =
- H5Dopen2(group_id, READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ open_datasets(group_id, READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_NAME, num_dsets,
+ test_mode, dset_ids);
sel_dims[0] = (hsize_t)READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_CH_NROWS / (hsize_t)mpi_size;
sel_dims[1] = (hsize_t)READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_ENTRIES_PER_PROC;
@@ -6323,13 +7317,6 @@ test_read_cmpd_filtered_dataset_no_conversion_shared(const char *parent_group, H
/* Setup one-dimensional memory dataspace for reading the dataset data into a contiguous buffer */
flat_dims[0] = sel_dims[0] * sel_dims[1];
- memspace = H5Screate_simple(1, flat_dims, NULL);
- VRFY((memspace >= 0), "Memory dataspace creation succeeded");
-
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
-
/*
* Each process defines the dataset selection in the file and
* reads it to the selection in memory
@@ -6343,60 +7330,53 @@ test_read_cmpd_filtered_dataset_no_conversion_shared(const char *parent_group, H
start[0] = (hsize_t)mpi_rank;
start[1] = 0;
- if (VERBOSE_MED) {
- printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- fflush(stdout);
- }
-
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
- read_buf_size = flat_dims[0] * sizeof(*read_buf);
+ read_buf_size = flat_dims[0] * sizeof(COMPOUND_C_DATATYPE);
- read_buf = (COMPOUND_C_DATATYPE *)calloc(1, read_buf_size);
- VRFY((NULL != read_buf), "calloc succeeded");
-
- VRFY((H5Dread(dset_id, memtype, memspace, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ read_bufs[dset_idx] = calloc(1, read_buf_size);
+ VRFY((NULL != read_bufs[dset_idx]), "calloc succeeded");
+ }
- global_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != global_buf), "calloc succeeded");
+ read_datasets(num_dsets, dset_ids, memtype, H5S_BLOCK, fspace_ids[0], dxpl_id, read_bufs, test_mode);
/* Collect each piece of data from all ranks into a global buffer on all ranks */
- recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts));
+ global_buf = calloc(1, data_size);
+ VRFY((NULL != global_buf), "calloc succeeded");
+ recvcounts = calloc(1, (size_t)mpi_size * sizeof(*recvcounts));
VRFY((NULL != recvcounts), "calloc succeeded");
+ displs = calloc(1, (size_t)mpi_size * sizeof(*displs));
+ VRFY((NULL != displs), "calloc succeeded");
+
+ for (size_t i = 0; i < (size_t)mpi_size; i++) {
+ recvcounts[i] = (int)(flat_dims[0] * sizeof(COMPOUND_C_DATATYPE));
+ displs[i] = (int)(i * flat_dims[0] * sizeof(COMPOUND_C_DATATYPE));
+ }
- for (i = 0; i < (size_t)mpi_size; i++)
- recvcounts[i] = (int)(flat_dims[0] * sizeof(*read_buf));
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ mpi_code = MPI_Allgatherv(read_bufs[dset_idx], (int)(flat_dims[0] * sizeof(COMPOUND_C_DATATYPE)),
+ MPI_BYTE, global_buf, recvcounts, displs, MPI_BYTE, comm);
+ VRFY((MPI_SUCCESS == mpi_code), "MPI_Allgatherv succeeded");
- displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs));
- VRFY((NULL != displs), "calloc succeeded");
+ VRFY((0 == memcmp(global_buf, data_bufs[dset_idx], data_size)), "Data verification succeeded");
+ }
- for (i = 0; i < (size_t)mpi_size; i++)
- displs[i] = (int)(i * flat_dims[0] * sizeof(*read_buf));
+ free(displs);
+ free(recvcounts);
+ free(global_buf);
- VRFY((MPI_SUCCESS == MPI_Allgatherv(read_buf, (int)(flat_dims[0] * sizeof(COMPOUND_C_DATATYPE)), MPI_BYTE,
- global_buf, recvcounts, displs, MPI_BYTE, comm)),
- "MPI_Allgatherv succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ free(read_bufs[dset_idx]);
- VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++)
+ free(data_bufs_nc[dset_idx]);
- if (displs)
- free(displs);
- if (recvcounts)
- free(recvcounts);
- if (global_buf)
- free(global_buf);
- if (read_buf)
- free(read_buf);
- if (correct_buf)
- free(correct_buf);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
- VRFY((H5Sclose(memspace) >= 0), "Memory dataspace close succeeded");
VRFY((H5Tclose(memtype) >= 0), "Memory datatype close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -6417,30 +7397,36 @@ test_read_cmpd_filtered_dataset_no_conversion_shared(const char *parent_group, H
*/
static void
test_read_cmpd_filtered_dataset_type_conversion_unshared(const char *parent_group, H5Z_filter_t filter_id,
- hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id)
+ hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode)
{
- COMPOUND_C_DATATYPE *read_buf = NULL;
- COMPOUND_C_DATATYPE *correct_buf = NULL;
- COMPOUND_C_DATATYPE *global_buf = NULL;
- hsize_t dataset_dims[READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_DIMS];
- hsize_t chunk_dims[READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_DIMS];
- hsize_t sel_dims[READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_DIMS];
- hsize_t start[READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_DIMS];
- hsize_t stride[READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_DIMS];
- hsize_t count[READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_DIMS];
- hsize_t block[READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_DIMS];
- hsize_t flat_dims[1];
- size_t i, read_buf_size, correct_buf_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
- hid_t filetype = H5I_INVALID_HID, memtype = H5I_INVALID_HID;
- hid_t group_id = H5I_INVALID_HID;
- hid_t filespace = H5I_INVALID_HID, memspace = H5I_INVALID_HID;
- int *recvcounts = NULL;
- int *displs = NULL;
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *global_buf = NULL;
+ hsize_t dataset_dims[READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_DIMS];
+ hsize_t chunk_dims[READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_DIMS];
+ hsize_t sel_dims[READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_DIMS];
+ hsize_t start[READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_DIMS];
+ hsize_t stride[READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_DIMS];
+ hsize_t count[READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_DIMS];
+ hsize_t block[READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_DIMS];
+ hsize_t flat_dims[1];
+ size_t data_size, read_buf_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ hid_t group_id = H5I_INVALID_HID;
+ hid_t filetype = H5I_INVALID_HID, memtype = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
+ int *recvcounts = NULL;
+ int *displs = NULL;
+ int mpi_code;
if (MAINPROCESS)
- HDputs("Testing read from unshared filtered chunks in Compound Datatype dataset with Datatype "
- "conversion");
+ puts("Testing read from unshared filtered chunks in Compound Datatype dataset with Datatype "
+ "conversion");
/* SZIP and ScaleOffset filters don't support compound types */
if (filter_id == H5Z_FILTER_SZIP || filter_id == H5Z_FILTER_SCALEOFFSET) {
@@ -6453,17 +7439,20 @@ test_read_cmpd_filtered_dataset_type_conversion_unshared(const char *parent_grou
dataset_dims[1] = (hsize_t)READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_NCOLS;
/* Setup the buffer for writing and for comparison */
- correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf);
-
- correct_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "calloc succeeded");
+ data_size = dataset_dims[0] * dataset_dims[1] * sizeof(COMPOUND_C_DATATYPE);
- for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) {
- correct_buf[i].field1 = (short)((i % dataset_dims[1]) + (i / dataset_dims[1]));
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++) {
+ COMPOUND_C_DATATYPE *tmp_buf = calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
- correct_buf[i].field2 = (int)((i % dataset_dims[1]) + (i / dataset_dims[1]));
+ for (size_t j = 0; j < data_size / sizeof(COMPOUND_C_DATATYPE); j++) {
+ tmp_buf[j].field1 = (short)((j % dataset_dims[1]) + (j / dataset_dims[1]) + dset_idx);
+ tmp_buf[j].field2 = (int)((j % dataset_dims[1]) + (j / dataset_dims[1]) + dset_idx);
+ tmp_buf[j].field3 = (long)((j % dataset_dims[1]) + (j / dataset_dims[1]) + dset_idx);
+ }
- correct_buf[i].field3 = (long)((i % dataset_dims[1]) + (i / dataset_dims[1]));
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
}
/* Create the compound type for memory. */
@@ -6485,6 +7474,48 @@ test_read_cmpd_filtered_dataset_type_conversion_unshared(const char *parent_grou
VRFY((H5Tinsert(filetype, "IntData", 8, H5T_STD_I64BE) >= 0), "Datatype insertion succeeded");
VRFY((H5Tinsert(filetype, "LongData", 16, H5T_STD_I64BE) >= 0), "Datatype insertion succeeded");
+ file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
+ VRFY((file_id >= 0), "Test file open succeeded");
+
+ group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
+ VRFY((group_id >= 0), "H5Gopen2 succeeded");
+
+ /* Create the dataspace for the dataset */
+ filespace = H5Screate_simple(READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_DIMS,
+ dataset_dims, NULL);
+ VRFY((filespace >= 0), "File dataspace creation succeeded");
+
+ /* Create chunked dataset */
+ chunk_dims[0] = READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_CH_NROWS;
+ chunk_dims[1] = READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_CH_NCOLS;
+
+ plist_id = H5Pcopy(dcpl_id);
+ VRFY((plist_id >= 0), "DCPL copy succeeded");
+
+ VRFY((H5Pset_chunk(plist_id, READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_DIMS,
+ chunk_dims) >= 0),
+ "Chunk size set");
+
+ /* Add test filter to the pipeline */
+ VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
+
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_NAME, filetype,
+ filespace, plist_id, test_mode, &num_dsets, dset_ids);
+
+ /* Verify space allocation status */
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+
+ VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
+ VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
+ VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
+ VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
+
+ MPI_Barrier(comm);
+
if (MAINPROCESS) {
plist_id = H5Pcreate(H5P_FILE_ACCESS);
VRFY((plist_id >= 0), "FAPL creation succeeded");
@@ -6500,55 +7531,38 @@ test_read_cmpd_filtered_dataset_type_conversion_unshared(const char *parent_grou
group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
VRFY((group_id >= 0), "H5Gopen2 succeeded");
- /* Create the dataspace for the dataset */
- filespace = H5Screate_simple(READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_DIMS,
- dataset_dims, NULL);
- VRFY((filespace >= 0), "File dataspace creation succeeded");
-
- /* Create chunked dataset */
- chunk_dims[0] = READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_CH_NROWS;
- chunk_dims[1] = READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_CH_NCOLS;
-
- plist_id = H5Pcopy(dcpl_id);
- VRFY((plist_id >= 0), "DCPL copy succeeded");
+ open_datasets(group_id, READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_NAME,
+ num_dsets, test_mode, dset_ids);
- VRFY((H5Pset_chunk(plist_id, READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_DIMS,
- chunk_dims) >= 0),
- "Chunk size set");
+ select_all(num_dsets, dset_ids, fspace_ids);
- /* Add test filter to the pipeline */
- VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
-
- dset_id = H5Dcreate2(group_id, READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_NAME,
- filetype, filespace, H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ write_datasets(num_dsets, dset_ids, memtype, H5S_ALL, fspace_ids, H5P_DEFAULT, data_bufs, test_mode);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
-
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
-
- VRFY((H5Dwrite(dset_id, memtype, H5S_ALL, H5S_ALL, H5P_DEFAULT, correct_buf) >= 0),
- "Dataset write succeeded");
+ plist_id = H5Dget_create_plist(dset_ids[0]);
+ VRFY((plist_id >= 0), "H5Dget_create_plist succeeded");
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, ALL_CHUNKS_WRITTEN);
- /* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
}
+ MPI_Barrier(comm);
+
file_id = H5Fopen(filenames[0], H5F_ACC_RDONLY, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");
group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
VRFY((group_id >= 0), "H5Gopen2 succeeded");
- dset_id =
- H5Dopen2(group_id, READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ open_datasets(group_id, READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_NAME, num_dsets,
+ test_mode, dset_ids);
sel_dims[0] = (hsize_t)READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_CH_NROWS;
sel_dims[1] = (hsize_t)READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_ENTRIES_PER_PROC;
@@ -6556,13 +7570,6 @@ test_read_cmpd_filtered_dataset_type_conversion_unshared(const char *parent_grou
/* Setup one-dimensional memory dataspace for reading the dataset data into a contiguous buffer */
flat_dims[0] = sel_dims[0] * sel_dims[1];
- memspace = H5Screate_simple(1, flat_dims, NULL);
- VRFY((memspace >= 0), "Memory dataspace creation succeeded");
-
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
-
/*
* Each process defines the dataset selection in the file and
* reads it to the selection in memory
@@ -6576,60 +7583,53 @@ test_read_cmpd_filtered_dataset_type_conversion_unshared(const char *parent_grou
start[0] = 0;
start[1] = ((hsize_t)mpi_rank * READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_CH_NCOLS);
- if (VERBOSE_MED) {
- printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- fflush(stdout);
- }
-
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
- read_buf_size = flat_dims[0] * sizeof(*read_buf);
+ read_buf_size = flat_dims[0] * sizeof(COMPOUND_C_DATATYPE);
- read_buf = (COMPOUND_C_DATATYPE *)calloc(1, read_buf_size);
- VRFY((NULL != read_buf), "calloc succeeded");
-
- VRFY((H5Dread(dset_id, memtype, memspace, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ read_bufs[dset_idx] = calloc(1, read_buf_size);
+ VRFY((NULL != read_bufs[dset_idx]), "calloc succeeded");
+ }
- global_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != global_buf), "calloc succeeded");
+ read_datasets(num_dsets, dset_ids, memtype, H5S_BLOCK, fspace_ids[0], dxpl_id, read_bufs, test_mode);
/* Collect each piece of data from all ranks into a global buffer on all ranks */
- recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts));
+ global_buf = calloc(1, data_size);
+ VRFY((NULL != global_buf), "calloc succeeded");
+ recvcounts = calloc(1, (size_t)mpi_size * sizeof(*recvcounts));
VRFY((NULL != recvcounts), "calloc succeeded");
+ displs = calloc(1, (size_t)mpi_size * sizeof(*displs));
+ VRFY((NULL != displs), "calloc succeeded");
- for (i = 0; i < (size_t)mpi_size; i++)
- recvcounts[i] = (int)(flat_dims[0] * sizeof(*read_buf));
+ for (size_t i = 0; i < (size_t)mpi_size; i++) {
+ recvcounts[i] = (int)(flat_dims[0] * sizeof(COMPOUND_C_DATATYPE));
+ displs[i] = (int)(i * flat_dims[0] * sizeof(COMPOUND_C_DATATYPE));
+ }
- displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs));
- VRFY((NULL != displs), "calloc succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ mpi_code = MPI_Allgatherv(read_bufs[dset_idx], (int)(flat_dims[0] * sizeof(COMPOUND_C_DATATYPE)),
+ MPI_BYTE, global_buf, recvcounts, displs, MPI_BYTE, comm);
+ VRFY((MPI_SUCCESS == mpi_code), "MPI_Allgatherv succeeded");
- for (i = 0; i < (size_t)mpi_size; i++)
- displs[i] = (int)(i * flat_dims[0] * sizeof(*read_buf));
+ VRFY((0 == memcmp(global_buf, data_bufs[dset_idx], data_size)), "Data verification succeeded");
+ }
- VRFY((MPI_SUCCESS == MPI_Allgatherv(read_buf, (int)(flat_dims[0] * sizeof(COMPOUND_C_DATATYPE)), MPI_BYTE,
- global_buf, recvcounts, displs, MPI_BYTE, comm)),
- "MPI_Allgatherv succeeded");
+ free(displs);
+ free(recvcounts);
+ free(global_buf);
- VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ free(read_bufs[dset_idx]);
- if (displs)
- free(displs);
- if (recvcounts)
- free(recvcounts);
- if (global_buf)
- free(global_buf);
- if (read_buf)
- free(read_buf);
- if (correct_buf)
- free(correct_buf);
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++)
+ free(data_bufs_nc[dset_idx]);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
- VRFY((H5Sclose(memspace) >= 0), "Memory dataspace close succeeded");
VRFY((H5Tclose(filetype) >= 0), "File datatype close succeeded");
VRFY((H5Tclose(memtype) >= 0), "Memory datatype close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
@@ -6651,29 +7651,35 @@ test_read_cmpd_filtered_dataset_type_conversion_unshared(const char *parent_grou
*/
static void
test_read_cmpd_filtered_dataset_type_conversion_shared(const char *parent_group, H5Z_filter_t filter_id,
- hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id)
+ hid_t fapl_id, hid_t dcpl_id, hid_t dxpl_id,
+ test_mode_t test_mode)
{
- COMPOUND_C_DATATYPE *read_buf = NULL;
- COMPOUND_C_DATATYPE *correct_buf = NULL;
- COMPOUND_C_DATATYPE *global_buf = NULL;
- hsize_t dataset_dims[READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_DIMS];
- hsize_t chunk_dims[READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_DIMS];
- hsize_t sel_dims[READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_DIMS];
- hsize_t start[READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_DIMS];
- hsize_t stride[READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_DIMS];
- hsize_t count[READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_DIMS];
- hsize_t block[READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_DIMS];
- hsize_t flat_dims[1];
- size_t i, read_buf_size, correct_buf_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
- hid_t filetype = H5I_INVALID_HID, memtype = H5I_INVALID_HID;
- hid_t group_id = H5I_INVALID_HID;
- hid_t filespace = H5I_INVALID_HID, memspace = H5I_INVALID_HID;
- int *recvcounts = NULL;
- int *displs = NULL;
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *global_buf = NULL;
+ hsize_t dataset_dims[READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_DIMS];
+ hsize_t chunk_dims[READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_DIMS];
+ hsize_t sel_dims[READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_DIMS];
+ hsize_t start[READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_DIMS];
+ hsize_t stride[READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_DIMS];
+ hsize_t count[READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_DIMS];
+ hsize_t block[READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_DIMS];
+ hsize_t flat_dims[1];
+ size_t data_size, read_buf_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ hid_t group_id = H5I_INVALID_HID;
+ hid_t filetype = H5I_INVALID_HID, memtype = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
+ int *recvcounts = NULL;
+ int *displs = NULL;
+ int mpi_code;
if (MAINPROCESS)
- HDputs(
+ puts(
"Testing read from shared filtered chunks in Compound Datatype dataset with Datatype conversion");
/* SZIP and ScaleOffset filters don't support compound types */
@@ -6687,23 +7693,25 @@ test_read_cmpd_filtered_dataset_type_conversion_shared(const char *parent_group,
dataset_dims[1] = (hsize_t)READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_NCOLS;
/* Setup the buffer for writing and for comparison */
- correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf);
+ data_size = dataset_dims[0] * dataset_dims[1] * sizeof(COMPOUND_C_DATATYPE);
- correct_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "calloc succeeded");
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++) {
+ COMPOUND_C_DATATYPE *tmp_buf = calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
- for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) {
- correct_buf[i].field1 =
- (short)((dataset_dims[1] * (i / ((hsize_t)mpi_size * dataset_dims[1]))) + (i % dataset_dims[1]) +
- (((i % ((hsize_t)mpi_size * dataset_dims[1])) / dataset_dims[1]) % dataset_dims[1]));
+ for (size_t j = 0; j < data_size / sizeof(COMPOUND_C_DATATYPE); j++) {
+ size_t val1 = (dataset_dims[1] * (j / ((hsize_t)mpi_size * dataset_dims[1])));
+ size_t val2 = (j % dataset_dims[1]);
+ size_t val3 = (((j % ((hsize_t)mpi_size * dataset_dims[1])) / dataset_dims[1]) % dataset_dims[1]);
+ size_t val = val1 + val2 + val3 + dset_idx;
- correct_buf[i].field2 =
- (int)((dataset_dims[1] * (i / ((hsize_t)mpi_size * dataset_dims[1]))) + (i % dataset_dims[1]) +
- (((i % ((hsize_t)mpi_size * dataset_dims[1])) / dataset_dims[1]) % dataset_dims[1]));
+ tmp_buf[j].field1 = (short)val;
+ tmp_buf[j].field2 = (int)val;
+ tmp_buf[j].field3 = (long)val;
+ }
- correct_buf[i].field3 =
- (long)((dataset_dims[1] * (i / ((hsize_t)mpi_size * dataset_dims[1]))) + (i % dataset_dims[1]) +
- (((i % ((hsize_t)mpi_size * dataset_dims[1])) / dataset_dims[1]) % dataset_dims[1]));
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
}
/* Create the compound type for memory. */
@@ -6725,6 +7733,48 @@ test_read_cmpd_filtered_dataset_type_conversion_shared(const char *parent_group,
VRFY((H5Tinsert(filetype, "IntData", 8, H5T_STD_I64BE) >= 0), "Datatype insertion succeeded");
VRFY((H5Tinsert(filetype, "LongData", 16, H5T_STD_I64BE) >= 0), "Datatype insertion succeeded");
+ file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
+ VRFY((file_id >= 0), "Test file open succeeded");
+
+ group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
+ VRFY((group_id >= 0), "H5Gopen2 succeeded");
+
+ /* Create the dataspace for the dataset */
+ filespace = H5Screate_simple(READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_DIMS,
+ dataset_dims, NULL);
+ VRFY((filespace >= 0), "File dataspace creation succeeded");
+
+ /* Create chunked dataset */
+ chunk_dims[0] = (hsize_t)READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_CH_NROWS;
+ chunk_dims[1] = (hsize_t)READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_CH_NCOLS;
+
+ plist_id = H5Pcopy(dcpl_id);
+ VRFY((plist_id >= 0), "DCPL copy succeeded");
+
+ VRFY((H5Pset_chunk(plist_id, READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_DIMS,
+ chunk_dims) >= 0),
+ "Chunk size set");
+
+ /* Add test filter to the pipeline */
+ VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
+
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_NAME, filetype,
+ filespace, plist_id, test_mode, &num_dsets, dset_ids);
+
+ /* Verify space allocation status */
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+
+ VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
+ VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
+ VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
+ VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
+
+ MPI_Barrier(comm);
+
if (MAINPROCESS) {
plist_id = H5Pcreate(H5P_FILE_ACCESS);
VRFY((plist_id >= 0), "FAPL creation succeeded");
@@ -6740,55 +7790,38 @@ test_read_cmpd_filtered_dataset_type_conversion_shared(const char *parent_group,
group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
VRFY((group_id >= 0), "H5Gopen2 succeeded");
- /* Create the dataspace for the dataset */
- filespace = H5Screate_simple(READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_DIMS,
- dataset_dims, NULL);
- VRFY((filespace >= 0), "File dataspace creation succeeded");
-
- /* Create chunked dataset */
- chunk_dims[0] = (hsize_t)READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_CH_NROWS;
- chunk_dims[1] = (hsize_t)READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_CH_NCOLS;
+ open_datasets(group_id, READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_NAME, num_dsets,
+ test_mode, dset_ids);
- plist_id = H5Pcopy(dcpl_id);
- VRFY((plist_id >= 0), "DCPL copy succeeded");
+ select_all(num_dsets, dset_ids, fspace_ids);
- VRFY((H5Pset_chunk(plist_id, READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_DIMS,
- chunk_dims) >= 0),
- "Chunk size set");
-
- /* Add test filter to the pipeline */
- VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
-
- dset_id = H5Dcreate2(group_id, READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_NAME,
- filetype, filespace, H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ write_datasets(num_dsets, dset_ids, memtype, H5S_ALL, fspace_ids, H5P_DEFAULT, data_bufs, test_mode);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
-
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
-
- VRFY((H5Dwrite(dset_id, memtype, H5S_ALL, H5S_ALL, H5P_DEFAULT, correct_buf) >= 0),
- "Dataset write succeeded");
+ plist_id = H5Dget_create_plist(dset_ids[0]);
+ VRFY((plist_id >= 0), "H5Dget_create_plist succeeded");
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, ALL_CHUNKS_WRITTEN);
- /* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
}
+ MPI_Barrier(comm);
+
file_id = H5Fopen(filenames[0], H5F_ACC_RDONLY, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");
group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
VRFY((group_id >= 0), "H5Gopen2 succeeded");
- dset_id =
- H5Dopen2(group_id, READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ open_datasets(group_id, READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_NAME, num_dsets,
+ test_mode, dset_ids);
sel_dims[0] = (hsize_t)READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_CH_NROWS / (hsize_t)mpi_size;
sel_dims[1] = (hsize_t)READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_ENTRIES_PER_PROC;
@@ -6796,13 +7829,6 @@ test_read_cmpd_filtered_dataset_type_conversion_shared(const char *parent_group,
/* Setup one-dimensional memory dataspace for reading the dataset data into a contiguous buffer */
flat_dims[0] = sel_dims[0] * sel_dims[1];
- memspace = H5Screate_simple(1, flat_dims, NULL);
- VRFY((memspace >= 0), "Memory dataspace creation succeeded");
-
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
-
/*
* Each process defines the dataset selection in the file and
* reads it to the selection in memory
@@ -6816,60 +7842,53 @@ test_read_cmpd_filtered_dataset_type_conversion_shared(const char *parent_group,
start[0] = (hsize_t)mpi_rank;
start[1] = 0;
- if (VERBOSE_MED) {
- printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- fflush(stdout);
- }
-
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
-
- read_buf_size = flat_dims[0] * sizeof(*read_buf);
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
- read_buf = (COMPOUND_C_DATATYPE *)calloc(1, read_buf_size);
- VRFY((NULL != read_buf), "calloc succeeded");
+ read_buf_size = flat_dims[0] * sizeof(COMPOUND_C_DATATYPE);
- VRFY((H5Dread(dset_id, memtype, memspace, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ read_bufs[dset_idx] = calloc(1, read_buf_size);
+ VRFY((NULL != read_bufs[dset_idx]), "calloc succeeded");
+ }
- global_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != global_buf), "calloc succeeded");
+ read_datasets(num_dsets, dset_ids, memtype, H5S_BLOCK, fspace_ids[0], dxpl_id, read_bufs, test_mode);
/* Collect each piece of data from all ranks into a global buffer on all ranks */
- recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts));
+ global_buf = calloc(1, data_size);
+ VRFY((NULL != global_buf), "calloc succeeded");
+ recvcounts = calloc(1, (size_t)mpi_size * sizeof(*recvcounts));
VRFY((NULL != recvcounts), "calloc succeeded");
+ displs = calloc(1, (size_t)mpi_size * sizeof(*displs));
+ VRFY((NULL != displs), "calloc succeeded");
- for (i = 0; i < (size_t)mpi_size; i++)
- recvcounts[i] = (int)(flat_dims[0] * sizeof(*read_buf));
+ for (size_t i = 0; i < (size_t)mpi_size; i++) {
+ recvcounts[i] = (int)(flat_dims[0] * sizeof(COMPOUND_C_DATATYPE));
+ displs[i] = (int)(i * flat_dims[0] * sizeof(COMPOUND_C_DATATYPE));
+ }
- displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs));
- VRFY((NULL != displs), "calloc succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ mpi_code = MPI_Allgatherv(read_bufs[dset_idx], (int)(flat_dims[0] * sizeof(COMPOUND_C_DATATYPE)),
+ MPI_BYTE, global_buf, recvcounts, displs, MPI_BYTE, comm);
+ VRFY((MPI_SUCCESS == mpi_code), "MPI_Allgatherv succeeded");
- for (i = 0; i < (size_t)mpi_size; i++)
- displs[i] = (int)(i * flat_dims[0] * sizeof(*read_buf));
+ VRFY((0 == memcmp(global_buf, data_bufs[dset_idx], data_size)), "Data verification succeeded");
+ }
- VRFY((MPI_SUCCESS == MPI_Allgatherv(read_buf, (int)(flat_dims[0] * sizeof(COMPOUND_C_DATATYPE)), MPI_BYTE,
- global_buf, recvcounts, displs, MPI_BYTE, comm)),
- "MPI_Allgatherv succeeded");
+ free(displs);
+ free(recvcounts);
+ free(global_buf);
- VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ free(read_bufs[dset_idx]);
- if (displs)
- free(displs);
- if (recvcounts)
- free(recvcounts);
- if (global_buf)
- free(global_buf);
- if (read_buf)
- free(read_buf);
- if (correct_buf)
- free(correct_buf);
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++)
+ free(data_bufs_nc[dset_idx]);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
- VRFY((H5Sclose(memspace) >= 0), "Memory dataspace close succeeded");
VRFY((H5Tclose(memtype) >= 0), "Memory datatype close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -6887,25 +7906,70 @@ test_read_cmpd_filtered_dataset_type_conversion_shared(const char *parent_group,
*/
static void
test_write_serial_read_parallel(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id)
+ hid_t dcpl_id, hid_t dxpl_id, test_mode_t test_mode)
{
- C_DATATYPE *data = NULL;
- C_DATATYPE *read_buf = NULL;
- C_DATATYPE *correct_buf = NULL;
+ C_DATATYPE *correct_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
hsize_t dataset_dims[WRITE_SERIAL_READ_PARALLEL_DATASET_DIMS];
hsize_t chunk_dims[WRITE_SERIAL_READ_PARALLEL_DATASET_DIMS];
- size_t i, data_size, correct_buf_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ size_t data_size, correct_buf_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
hid_t group_id = H5I_INVALID_HID;
hid_t filespace = H5I_INVALID_HID;
if (MAINPROCESS)
- HDputs("Testing write file serially; read file in parallel");
+ puts("Testing write file serially; read file in parallel");
dataset_dims[0] = (hsize_t)WRITE_SERIAL_READ_PARALLEL_NROWS;
dataset_dims[1] = (hsize_t)WRITE_SERIAL_READ_PARALLEL_NCOLS;
dataset_dims[2] = (hsize_t)WRITE_SERIAL_READ_PARALLEL_DEPTH;
+ file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
+ VRFY((file_id >= 0), "Test file open succeeded");
+
+ group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
+ VRFY((group_id >= 0), "H5Gopen2 succeeded");
+
+ /* Create the dataspace for the dataset */
+ filespace = H5Screate_simple(WRITE_SERIAL_READ_PARALLEL_DATASET_DIMS, dataset_dims, NULL);
+ VRFY((filespace >= 0), "File dataspace creation succeeded");
+
+ /* Create chunked dataset */
+ chunk_dims[0] = (hsize_t)WRITE_SERIAL_READ_PARALLEL_CH_NROWS;
+ chunk_dims[1] = (hsize_t)WRITE_SERIAL_READ_PARALLEL_CH_NCOLS;
+ chunk_dims[2] = 1;
+
+ plist_id = H5Pcopy(dcpl_id);
+ VRFY((plist_id >= 0), "DCPL copy succeeded");
+
+ VRFY((H5Pset_chunk(plist_id, WRITE_SERIAL_READ_PARALLEL_DATASET_DIMS, chunk_dims) >= 0),
+ "Chunk size set");
+
+ /* Add test filter to the pipeline */
+ VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
+
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, WRITE_SERIAL_READ_PARALLEL_DATASET_NAME, HDF5_DATATYPE_NAME, filespace,
+ plist_id, test_mode, &num_dsets, dset_ids);
+
+ /* Verify space allocation status */
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+
+ VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
+ VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
+ VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
+ VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
+
+ MPI_Barrier(comm);
+
/* Write the file on the MAINPROCESS rank */
if (MAINPROCESS) {
/* Set up file access property list */
@@ -6923,66 +7987,58 @@ test_write_serial_read_parallel(const char *parent_group, H5Z_filter_t filter_id
group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
VRFY((group_id >= 0), "H5Gopen2 succeeded");
- /* Create the dataspace for the dataset */
- chunk_dims[0] = (hsize_t)WRITE_SERIAL_READ_PARALLEL_CH_NROWS;
- chunk_dims[1] = (hsize_t)WRITE_SERIAL_READ_PARALLEL_CH_NCOLS;
- chunk_dims[2] = 1;
-
- filespace = H5Screate_simple(WRITE_SERIAL_READ_PARALLEL_DATASET_DIMS, dataset_dims, NULL);
- VRFY((filespace >= 0), "File dataspace creation succeeded");
+ open_datasets(group_id, WRITE_SERIAL_READ_PARALLEL_DATASET_NAME, num_dsets, test_mode, dset_ids);
- /* Create chunked dataset */
- plist_id = H5Pcopy(dcpl_id);
- VRFY((plist_id >= 0), "DCPL copy succeeded");
+ data_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(C_DATATYPE);
- VRFY((H5Pset_chunk(plist_id, WRITE_SERIAL_READ_PARALLEL_DATASET_DIMS, chunk_dims) >= 0),
- "Chunk size set");
-
- /* Add test filter to the pipeline */
- VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
-
- dset_id = H5Dcreate2(group_id, WRITE_SERIAL_READ_PARALLEL_DATASET_NAME, HDF5_DATATYPE_NAME, filespace,
- H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
-
- /* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ C_DATATYPE *tmp_buf = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
+ for (size_t j = 0; j < data_size / sizeof(C_DATATYPE); j++)
+ tmp_buf[j] = (C_DATATYPE)(GEN_DATA(j) + dset_idx);
- data_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(*data);
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
+ }
- data = (C_DATATYPE *)calloc(1, data_size);
- VRFY((NULL != data), "calloc succeeded");
+ select_all(num_dsets, dset_ids, fspace_ids);
- for (i = 0; i < data_size / sizeof(*data); i++)
- data[i] = (C_DATATYPE)GEN_DATA(i);
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_ALL, fspace_ids, H5P_DEFAULT, data_bufs,
+ test_mode);
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, H5P_DEFAULT, data) >= 0),
- "Dataset write succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ free(data_bufs_nc[dset_idx]);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
+ plist_id = H5Dget_create_plist(dset_ids[0]);
+ VRFY((plist_id >= 0), "H5Dget_create_plist succeeded");
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, ALL_CHUNKS_WRITTEN);
- if (data)
- free(data);
+ /* Close and re-open datasets */
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
}
- correct_buf_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(*correct_buf);
+ MPI_Barrier(comm);
- correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "calloc succeeded");
+ correct_buf_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(C_DATATYPE);
- read_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != read_buf), "calloc succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ correct_bufs[dset_idx] = calloc(1, correct_buf_size);
+ VRFY((NULL != correct_bufs[dset_idx]), "calloc succeeded");
+ read_bufs[dset_idx] = calloc(1, correct_buf_size);
+ VRFY((NULL != read_bufs[dset_idx]), "calloc succeeded");
- for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++)
- correct_buf[i] = (long)i;
+ for (size_t j = 0; j < correct_buf_size / sizeof(C_DATATYPE); j++)
+ correct_bufs[dset_idx][j] = (long)(j + dset_idx);
+ }
/* All ranks open the file and verify their "portion" of the dataset is correct */
file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
@@ -6991,20 +8047,22 @@ test_write_serial_read_parallel(const char *parent_group, H5Z_filter_t filter_id
group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
VRFY((group_id >= 0), "H5Gopen2 succeeded");
- dset_id = H5Dopen2(group_id, WRITE_SERIAL_READ_PARALLEL_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ open_datasets(group_id, WRITE_SERIAL_READ_PARALLEL_DATASET_NAME, num_dsets, test_mode, dset_ids);
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_bufs, test_mode);
- VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((0 == memcmp(read_bufs[dset_idx], correct_bufs[dset_idx], correct_buf_size)),
+ "Data verification succeeded");
- if (correct_buf)
- free(correct_buf);
- if (read_buf)
- free(read_buf);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ free(read_bufs[dset_idx]);
+ free(correct_bufs[dset_idx]);
+ }
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -7022,11 +8080,12 @@ test_write_serial_read_parallel(const char *parent_group, H5Z_filter_t filter_id
*/
static void
test_write_parallel_read_serial(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id,
- hid_t dcpl_id, hid_t dxpl_id)
+ hid_t dcpl_id, hid_t dxpl_id, test_mode_t test_mode)
{
- C_DATATYPE *data = NULL;
- C_DATATYPE *read_buf = NULL;
- C_DATATYPE *correct_buf = NULL;
+ C_DATATYPE *correct_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
hsize_t dataset_dims[WRITE_PARALLEL_READ_SERIAL_DATASET_DIMS];
hsize_t chunk_dims[WRITE_PARALLEL_READ_SERIAL_DATASET_DIMS];
hsize_t sel_dims[WRITE_PARALLEL_READ_SERIAL_DATASET_DIMS];
@@ -7034,13 +8093,16 @@ test_write_parallel_read_serial(const char *parent_group, H5Z_filter_t filter_id
hsize_t stride[WRITE_PARALLEL_READ_SERIAL_DATASET_DIMS];
hsize_t block[WRITE_PARALLEL_READ_SERIAL_DATASET_DIMS];
hsize_t offset[WRITE_PARALLEL_READ_SERIAL_DATASET_DIMS];
- size_t i, data_size, correct_buf_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ size_t data_size, correct_buf_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
hid_t group_id = H5I_INVALID_HID;
- hid_t filespace = H5I_INVALID_HID, memspace = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
if (MAINPROCESS)
- HDputs("Testing write file in parallel; read serially");
+ puts("Testing write file in parallel; read serially");
file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");
@@ -7062,9 +8124,6 @@ test_write_parallel_read_serial(const char *parent_group, H5Z_filter_t filter_id
filespace = H5Screate_simple(WRITE_PARALLEL_READ_SERIAL_DATASET_DIMS, dataset_dims, NULL);
VRFY((filespace >= 0), "File dataspace creation succeeded");
- memspace = H5Screate_simple(WRITE_PARALLEL_READ_SERIAL_DATASET_DIMS, sel_dims, NULL);
- VRFY((memspace >= 0), "Memory dataspace creation succeeded");
-
/* Create chunked dataset */
plist_id = H5Pcopy(dcpl_id);
VRFY((plist_id >= 0), "DCPL copy succeeded");
@@ -7075,12 +8134,12 @@ test_write_parallel_read_serial(const char *parent_group, H5Z_filter_t filter_id
/* Add test filter to the pipeline */
VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
- dset_id = H5Dcreate2(group_id, WRITE_PARALLEL_READ_SERIAL_DATASET_NAME, HDF5_DATATYPE_NAME, filespace,
- H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, WRITE_PARALLEL_READ_SERIAL_DATASET_NAME, HDF5_DATATYPE_NAME, filespace,
+ plist_id, test_mode, &num_dsets, dset_ids);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -7100,48 +8159,42 @@ test_write_parallel_read_serial(const char *parent_group, H5Z_filter_t filter_id
offset[1] = 0;
offset[2] = 0;
- if (VERBOSE_MED) {
- printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
- " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], offset[ %" PRIuHSIZE
- ", %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
- " ]\n",
- mpi_rank, count[0], count[1], count[2], stride[0], stride[1], stride[2], offset[0], offset[1],
- offset[2], block[0], block[1], block[2]);
- fflush(stdout);
- }
+ select_hyperslab(num_dsets, dset_ids, offset, stride, count, block, fspace_ids);
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
+ /* Fill data buffer */
+ data_size = sel_dims[0] * sel_dims[1] * sel_dims[2] * sizeof(C_DATATYPE);
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, offset, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ C_DATATYPE *tmp_buf = calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
- /* Fill data buffer */
- data_size = sel_dims[0] * sel_dims[1] * sel_dims[2] * sizeof(*data);
+ for (size_t j = 0; j < data_size / sizeof(C_DATATYPE); j++)
+ tmp_buf[j] = (C_DATATYPE)(GEN_DATA(j) + dset_idx);
- data = (C_DATATYPE *)calloc(1, data_size);
- VRFY((NULL != data), "calloc succeeded");
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
+ }
- for (i = 0; i < data_size / sizeof(*data); i++)
- data[i] = (C_DATATYPE)GEN_DATA(i);
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids, dxpl_id, data_bufs,
+ test_mode);
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, data) >= 0),
- "Dataset write succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ free(data_bufs_nc[dset_idx]);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, ALL_CHUNKS_WRITTEN);
- if (data)
- free(data);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
- VRFY((H5Sclose(memspace) >= 0), "Memory dataspace close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
+ MPI_Barrier(comm);
+
if (MAINPROCESS) {
plist_id = H5Pcreate(H5P_FILE_ACCESS);
VRFY((plist_id >= 0), "FAPL creation succeeded");
@@ -7157,34 +8210,43 @@ test_write_parallel_read_serial(const char *parent_group, H5Z_filter_t filter_id
group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
VRFY((group_id >= 0), "H5Gopen2 succeeded");
- dset_id = H5Dopen2(group_id, WRITE_PARALLEL_READ_SERIAL_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ open_datasets(group_id, WRITE_PARALLEL_READ_SERIAL_DATASET_NAME, num_dsets, test_mode, dset_ids);
+
+ correct_buf_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(C_DATATYPE);
- correct_buf_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(*correct_buf);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ correct_bufs[dset_idx] = calloc(1, correct_buf_size);
+ VRFY((NULL != correct_bufs[dset_idx]), "calloc succeeded");
+ read_bufs[dset_idx] = calloc(1, correct_buf_size);
+ VRFY((NULL != read_bufs[dset_idx]), "calloc succeeded");
- correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != correct_buf), "calloc succeeded");
+ for (size_t j = 0; j < correct_buf_size / sizeof(C_DATATYPE); j++)
+ correct_bufs[dset_idx][j] =
+ (C_DATATYPE)((j % (dataset_dims[0] * dataset_dims[1])) +
+ (j / (dataset_dims[0] * dataset_dims[1])) + dset_idx);
+ }
- read_buf = (C_DATATYPE *)calloc(1, correct_buf_size);
- VRFY((NULL != read_buf), "calloc succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_bufs,
+ test_mode);
- for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++)
- correct_buf[i] = (C_DATATYPE)((i % (dataset_dims[0] * dataset_dims[1])) +
- (i / (dataset_dims[0] * dataset_dims[1])));
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((0 == memcmp(read_bufs[dset_idx], correct_bufs[dset_idx], correct_buf_size)),
+ "Data verification succeeded");
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf) >= 0),
- "Dataset read succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ free(read_bufs[dset_idx]);
+ free(correct_bufs[dset_idx]);
+ }
- VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
-
- free(correct_buf);
- free(read_buf);
}
+ MPI_Barrier(comm);
+
return;
}
@@ -7197,24 +8259,28 @@ test_write_parallel_read_serial(const char *parent_group, H5Z_filter_t filter_id
*/
static void
test_shrinking_growing_chunks(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id, hid_t dcpl_id,
- hid_t dxpl_id)
+ hid_t dxpl_id, test_mode_t test_mode)
{
- double *data = NULL;
- double *read_buf = NULL;
- hsize_t dataset_dims[SHRINKING_GROWING_CHUNKS_DATASET_DIMS];
- hsize_t chunk_dims[SHRINKING_GROWING_CHUNKS_DATASET_DIMS];
- hsize_t sel_dims[SHRINKING_GROWING_CHUNKS_DATASET_DIMS];
- hsize_t start[SHRINKING_GROWING_CHUNKS_DATASET_DIMS];
- hsize_t stride[SHRINKING_GROWING_CHUNKS_DATASET_DIMS];
- hsize_t count[SHRINKING_GROWING_CHUNKS_DATASET_DIMS];
- hsize_t block[SHRINKING_GROWING_CHUNKS_DATASET_DIMS];
- size_t i, data_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
- hid_t group_id = H5I_INVALID_HID;
- hid_t filespace = H5I_INVALID_HID, memspace = H5I_INVALID_HID;
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ hsize_t dataset_dims[SHRINKING_GROWING_CHUNKS_DATASET_DIMS];
+ hsize_t chunk_dims[SHRINKING_GROWING_CHUNKS_DATASET_DIMS];
+ hsize_t sel_dims[SHRINKING_GROWING_CHUNKS_DATASET_DIMS];
+ hsize_t start[SHRINKING_GROWING_CHUNKS_DATASET_DIMS];
+ hsize_t stride[SHRINKING_GROWING_CHUNKS_DATASET_DIMS];
+ hsize_t count[SHRINKING_GROWING_CHUNKS_DATASET_DIMS];
+ hsize_t block[SHRINKING_GROWING_CHUNKS_DATASET_DIMS];
+ size_t data_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ hid_t group_id = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
if (MAINPROCESS)
- HDputs("Testing continually shrinking/growing chunks");
+ puts("Testing continually shrinking/growing chunks");
file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");
@@ -7233,9 +8299,6 @@ test_shrinking_growing_chunks(const char *parent_group, H5Z_filter_t filter_id,
filespace = H5Screate_simple(SHRINKING_GROWING_CHUNKS_DATASET_DIMS, dataset_dims, NULL);
VRFY((filespace >= 0), "File dataspace creation succeeded");
- memspace = H5Screate_simple(SHRINKING_GROWING_CHUNKS_DATASET_DIMS, sel_dims, NULL);
- VRFY((memspace >= 0), "Memory dataspace creation succeeded");
-
/* Create chunked dataset */
plist_id = H5Pcopy(dcpl_id);
VRFY((plist_id >= 0), "DCPL copy succeeded");
@@ -7245,12 +8308,12 @@ test_shrinking_growing_chunks(const char *parent_group, H5Z_filter_t filter_id,
/* Add test filter to the pipeline */
VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
- dset_id = H5Dcreate2(group_id, SHRINKING_GROWING_CHUNKS_DATASET_NAME, H5T_NATIVE_DOUBLE, filespace,
- H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, SHRINKING_GROWING_CHUNKS_DATASET_NAME, H5T_NATIVE_DOUBLE, filespace, plist_id,
+ test_mode, &num_dsets, dset_ids);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -7267,68 +8330,74 @@ test_shrinking_growing_chunks(const char *parent_group, H5Z_filter_t filter_id,
start[0] = ((hsize_t)mpi_rank * (hsize_t)SHRINKING_GROWING_CHUNKS_CH_NROWS * count[0]);
start[1] = 0;
- if (VERBOSE_MED) {
- printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- fflush(stdout);
- }
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((dset_id >= 0), "File dataspace retrieval succeeded");
+ data_size = sel_dims[0] * sel_dims[1] * sizeof(double);
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ double *tmp_buf = calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
- data_size = sel_dims[0] * sel_dims[1] * sizeof(double);
+ for (size_t j = 0; j < data_size / sizeof(C_DATATYPE); j++)
+ tmp_buf[j] = (double)(GEN_DATA(j) + dset_idx);
- data = (double *)calloc(1, data_size);
- VRFY((NULL != data), "calloc succeeded");
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
- read_buf = (double *)calloc(1, data_size);
- VRFY((NULL != read_buf), "calloc succeeded");
+ tmp_buf = calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
- for (i = 0; i < SHRINKING_GROWING_CHUNKS_NLOOPS; i++) {
- /* Continually write random float data, followed by zeroed-out data */
- if (i % 2)
- memset(data, 0, data_size);
- else {
- size_t j;
- for (j = 0; j < data_size / sizeof(*data); j++) {
- data[j] = (rand() / (double)(RAND_MAX / (double)1.0L));
+ read_bufs[dset_idx] = tmp_buf;
+ }
+
+ for (size_t i = 0; i < SHRINKING_GROWING_CHUNKS_NLOOPS; i++) {
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ /* Continually write random float data, followed by zeroed-out data */
+ if (i % 2)
+ memset(data_bufs_nc[dset_idx], 0, data_size);
+ else {
+ double *tmp_buf = data_bufs_nc[dset_idx];
+
+ for (size_t k = 0; k < data_size / sizeof(double); k++) {
+ tmp_buf[k] = (rand() / (double)(RAND_MAX / (double)1.0L));
+ }
}
}
- VRFY((H5Dwrite(dset_id, H5T_NATIVE_DOUBLE, memspace, filespace, dxpl_id, data) >= 0),
- "Dataset write succeeded");
+ write_datasets(num_dsets, dset_ids, H5T_NATIVE_DOUBLE, H5S_BLOCK, fspace_ids, dxpl_id, data_bufs,
+ test_mode);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, ALL_CHUNKS_WRITTEN);
- if (i % 2) {
- memset(read_buf, 255, data_size);
- }
- else {
- memset(read_buf, 0, data_size);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ if (i % 2) {
+ memset(read_bufs[dset_idx], 255, data_size);
+ }
+ else {
+ memset(read_bufs[dset_idx], 0, data_size);
+ }
}
- VRFY((H5Dread(dset_id, H5T_NATIVE_DOUBLE, memspace, filespace, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ read_datasets(num_dsets, dset_ids, H5T_NATIVE_DOUBLE, H5S_BLOCK, fspace_ids[0], dxpl_id, read_bufs,
+ test_mode);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((0 == memcmp(read_bufs[dset_idx], data_bufs[dset_idx], data_size)),
+ "data verification succeeded");
+ }
- VRFY((0 == memcmp(read_buf, data, data_size)), "data verification succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ free(read_bufs[dset_idx]);
+ free(data_bufs_nc[dset_idx]);
}
- if (read_buf)
- free(read_buf);
- if (data)
- free(data);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
- VRFY((H5Sclose(memspace) >= 0), "Memory dataspace close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -7347,10 +8416,11 @@ test_shrinking_growing_chunks(const char *parent_group, H5Z_filter_t filter_id,
*/
static void
test_edge_chunks_no_overlap(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id, hid_t dcpl_id,
- hid_t dxpl_id)
+ hid_t dxpl_id, test_mode_t test_mode)
{
- C_DATATYPE *data = NULL;
- C_DATATYPE *read_buf = NULL;
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
hsize_t dataset_dims[WRITE_UNSHARED_FILTERED_EDGE_CHUNKS_DATASET_DIMS];
hsize_t chunk_dims[WRITE_UNSHARED_FILTERED_EDGE_CHUNKS_DATASET_DIMS];
hsize_t sel_dims[WRITE_UNSHARED_FILTERED_EDGE_CHUNKS_DATASET_DIMS];
@@ -7358,13 +8428,16 @@ test_edge_chunks_no_overlap(const char *parent_group, H5Z_filter_t filter_id, hi
hsize_t stride[WRITE_UNSHARED_FILTERED_EDGE_CHUNKS_DATASET_DIMS];
hsize_t count[WRITE_UNSHARED_FILTERED_EDGE_CHUNKS_DATASET_DIMS];
hsize_t block[WRITE_UNSHARED_FILTERED_EDGE_CHUNKS_DATASET_DIMS];
- size_t i, data_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ size_t data_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
hid_t group_id = H5I_INVALID_HID;
hid_t filespace = H5I_INVALID_HID;
if (MAINPROCESS)
- HDputs("Testing write to unshared filtered edge chunks");
+ puts("Testing write to unshared filtered edge chunks");
file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");
@@ -7393,12 +8466,12 @@ test_edge_chunks_no_overlap(const char *parent_group, H5Z_filter_t filter_id, hi
/* Add test filter to the pipeline */
VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
- dset_id = H5Dcreate2(group_id, WRITE_UNSHARED_FILTERED_EDGE_CHUNKS_DATASET_NAME, HDF5_DATATYPE_NAME,
- filespace, H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, WRITE_UNSHARED_FILTERED_EDGE_CHUNKS_DATASET_NAME, HDF5_DATATYPE_NAME, filespace,
+ plist_id, test_mode, &num_dsets, dset_ids);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -7415,64 +8488,68 @@ test_edge_chunks_no_overlap(const char *parent_group, H5Z_filter_t filter_id, hi
start[1] =
(hsize_t)(WRITE_UNSHARED_FILTERED_EDGE_CHUNKS_NCOLS - WRITE_UNSHARED_FILTERED_EDGE_CHUNKS_CH_NCOLS);
- if (VERBOSE_MED) {
- printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- fflush(stdout);
- }
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
+ /* Fill data buffer */
+ data_size = sel_dims[0] * sel_dims[1] * sizeof(C_DATATYPE);
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++) {
+ C_DATATYPE *tmp_buf = calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
- /* Fill data buffer */
- data_size = sel_dims[0] * sel_dims[1] * sizeof(*data);
+ for (size_t j = 0; j < data_size / sizeof(C_DATATYPE); j++)
+ tmp_buf[j] = (C_DATATYPE)(GEN_DATA(j) + dset_idx);
- data = (C_DATATYPE *)calloc(1, data_size);
- VRFY((NULL != data), "calloc succeeded");
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
- read_buf = (C_DATATYPE *)calloc(1, data_size);
- VRFY((NULL != read_buf), "calloc succeeded");
+ tmp_buf = calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
- for (i = 0; i < data_size / sizeof(*data); i++)
- data[i] = (C_DATATYPE)GEN_DATA(i);
+ read_bufs[dset_idx] = tmp_buf;
+ }
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, data) >= 0),
- "Dataset write succeeded");
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids, dxpl_id, data_bufs,
+ test_mode);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, (mpi_size > 1) ? SOME_CHUNKS_WRITTEN : ALL_CHUNKS_WRITTEN);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id,
+ (mpi_size > 1) ? SOME_CHUNKS_WRITTEN : ALL_CHUNKS_WRITTEN);
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
+ /* Close and re-open datasets */
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
/* Verify the correct data was written */
- dset_id = H5Dopen2(group_id, WRITE_UNSHARED_FILTERED_EDGE_CHUNKS_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ open_datasets(group_id, WRITE_UNSHARED_FILTERED_EDGE_CHUNKS_DATASET_NAME, num_dsets, test_mode, dset_ids);
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids[0], dxpl_id, read_bufs,
+ test_mode);
- VRFY((0 == memcmp(read_buf, data, data_size)), "Data verification succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((0 == memcmp(read_bufs[dset_idx], data_bufs[dset_idx], data_size)),
+ "Data verification succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
/* Repeat the previous, but set option to not filter partial edge chunks */
if (MAINPROCESS)
- HDputs("Testing write to unshared unfiltered edge chunks");
+ puts("Testing write to unshared unfiltered edge chunks");
+
+ filespace = H5Screate_simple(WRITE_UNSHARED_FILTERED_EDGE_CHUNKS_DATASET_DIMS, dataset_dims, NULL);
+ VRFY((filespace >= 0), "File dataspace creation succeeded");
H5Pset_chunk_opts(plist_id, H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS);
- dset_id = H5Dcreate2(group_id, WRITE_UNSHARED_FILTERED_EDGE_CHUNKS_DATASET_NAME2, HDF5_DATATYPE_NAME,
- filespace, H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, WRITE_UNSHARED_FILTERED_EDGE_CHUNKS_DATASET_NAME2, HDF5_DATATYPE_NAME,
+ filespace, plist_id, test_mode, &num_dsets, dset_ids);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -7489,48 +8566,43 @@ test_edge_chunks_no_overlap(const char *parent_group, H5Z_filter_t filter_id, hi
start[1] =
(hsize_t)(WRITE_UNSHARED_FILTERED_EDGE_CHUNKS_NCOLS - WRITE_UNSHARED_FILTERED_EDGE_CHUNKS_CH_NCOLS);
- if (VERBOSE_MED) {
- printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- fflush(stdout);
- }
-
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
-
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, data) >= 0),
- "Dataset write succeeded");
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids, dxpl_id, data_bufs,
+ test_mode);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, (mpi_size > 1) ? SOME_CHUNKS_WRITTEN : ALL_CHUNKS_WRITTEN);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id,
+ (mpi_size > 1) ? SOME_CHUNKS_WRITTEN : ALL_CHUNKS_WRITTEN);
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
/* Verify the correct data was written */
- dset_id = H5Dopen2(group_id, WRITE_UNSHARED_FILTERED_EDGE_CHUNKS_DATASET_NAME2, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ open_datasets(group_id, WRITE_UNSHARED_FILTERED_EDGE_CHUNKS_DATASET_NAME2, num_dsets, test_mode,
+ dset_ids);
- memset(read_buf, 255, data_size);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ memset(read_bufs[dset_idx], 255, data_size);
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids[0], dxpl_id, read_bufs,
+ test_mode);
- VRFY((0 == memcmp(read_buf, data, data_size)), "Data verification succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((0 == memcmp(read_bufs[dset_idx], data_bufs[dset_idx], data_size)),
+ "Data verification succeeded");
+
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++) {
+ free(read_bufs[dset_idx]);
+ free(data_bufs_nc[dset_idx]);
+ }
- if (data)
- free(data);
- if (read_buf)
- free(read_buf);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -7549,10 +8621,11 @@ test_edge_chunks_no_overlap(const char *parent_group, H5Z_filter_t filter_id, hi
*/
static void
test_edge_chunks_overlap(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id, hid_t dcpl_id,
- hid_t dxpl_id)
+ hid_t dxpl_id, test_mode_t test_mode)
{
- C_DATATYPE *data = NULL;
- C_DATATYPE *read_buf = NULL;
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
hsize_t dataset_dims[WRITE_SHARED_FILTERED_EDGE_CHUNKS_DATASET_DIMS];
hsize_t chunk_dims[WRITE_SHARED_FILTERED_EDGE_CHUNKS_DATASET_DIMS];
hsize_t sel_dims[WRITE_SHARED_FILTERED_EDGE_CHUNKS_DATASET_DIMS];
@@ -7560,13 +8633,16 @@ test_edge_chunks_overlap(const char *parent_group, H5Z_filter_t filter_id, hid_t
hsize_t stride[WRITE_SHARED_FILTERED_EDGE_CHUNKS_DATASET_DIMS];
hsize_t count[WRITE_SHARED_FILTERED_EDGE_CHUNKS_DATASET_DIMS];
hsize_t block[WRITE_SHARED_FILTERED_EDGE_CHUNKS_DATASET_DIMS];
- size_t i, data_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ size_t data_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
hid_t group_id = H5I_INVALID_HID;
hid_t filespace = H5I_INVALID_HID;
if (MAINPROCESS)
- HDputs("Testing write to shared filtered edge chunks");
+ puts("Testing write to shared filtered edge chunks");
file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");
@@ -7595,12 +8671,12 @@ test_edge_chunks_overlap(const char *parent_group, H5Z_filter_t filter_id, hid_t
/* Add test filter to the pipeline */
VRFY((set_dcpl_filter(plist_id, filter_id, NULL) >= 0), "Filter set");
- dset_id = H5Dcreate2(group_id, WRITE_SHARED_FILTERED_EDGE_CHUNKS_DATASET_NAME, HDF5_DATATYPE_NAME,
- filespace, H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, WRITE_SHARED_FILTERED_EDGE_CHUNKS_DATASET_NAME, HDF5_DATATYPE_NAME, filespace,
+ plist_id, test_mode, &num_dsets, dset_ids);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -7618,64 +8694,66 @@ test_edge_chunks_overlap(const char *parent_group, H5Z_filter_t filter_id, hid_t
start[1] =
(hsize_t)(WRITE_SHARED_FILTERED_EDGE_CHUNKS_NCOLS - WRITE_SHARED_FILTERED_EDGE_CHUNKS_CH_NCOLS);
- if (VERBOSE_MED) {
- printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- fflush(stdout);
- }
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
+ /* Fill data buffer */
+ data_size = sel_dims[0] * sel_dims[1] * sizeof(C_DATATYPE);
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++) {
+ C_DATATYPE *tmp_buf = calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
- /* Fill data buffer */
- data_size = sel_dims[0] * sel_dims[1] * sizeof(*data);
+ for (size_t j = 0; j < data_size / sizeof(C_DATATYPE); j++)
+ tmp_buf[j] = (C_DATATYPE)(GEN_DATA(j) + dset_idx);
- data = (C_DATATYPE *)calloc(1, data_size);
- VRFY((NULL != data), "calloc succeeded");
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
- read_buf = (C_DATATYPE *)calloc(1, data_size);
- VRFY((NULL != read_buf), "calloc succeeded");
+ tmp_buf = calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
- for (i = 0; i < data_size / sizeof(*data); i++)
- data[i] = (C_DATATYPE)GEN_DATA(i);
+ read_bufs[dset_idx] = tmp_buf;
+ }
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, data) >= 0),
- "Dataset write succeeded");
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids, dxpl_id, data_bufs,
+ test_mode);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, SOME_CHUNKS_WRITTEN);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, SOME_CHUNKS_WRITTEN);
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
/* Verify the correct data was written */
- dset_id = H5Dopen2(group_id, WRITE_SHARED_FILTERED_EDGE_CHUNKS_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ open_datasets(group_id, WRITE_SHARED_FILTERED_EDGE_CHUNKS_DATASET_NAME, num_dsets, test_mode, dset_ids);
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids[0], dxpl_id, read_bufs,
+ test_mode);
- VRFY((0 == memcmp(read_buf, data, data_size)), "Data verification succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((0 == memcmp(read_bufs[dset_idx], data_bufs[dset_idx], data_size)),
+ "Data verification succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
/* Repeat the previous, but set option to not filter partial edge chunks */
if (MAINPROCESS)
- HDputs("Testing write to shared unfiltered edge chunks");
+ puts("Testing write to shared unfiltered edge chunks");
+
+ filespace = H5Screate_simple(WRITE_SHARED_FILTERED_EDGE_CHUNKS_DATASET_DIMS, dataset_dims, NULL);
+ VRFY((filespace >= 0), "File dataspace creation succeeded");
H5Pset_chunk_opts(plist_id, H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS);
- dset_id = H5Dcreate2(group_id, WRITE_SHARED_FILTERED_EDGE_CHUNKS_DATASET_NAME2, HDF5_DATATYPE_NAME,
- filespace, H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, WRITE_SHARED_FILTERED_EDGE_CHUNKS_DATASET_NAME2, HDF5_DATATYPE_NAME, filespace,
+ plist_id, test_mode, &num_dsets, dset_ids);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
@@ -7693,73 +8771,47 @@ test_edge_chunks_overlap(const char *parent_group, H5Z_filter_t filter_id, hid_t
start[1] =
(hsize_t)(WRITE_SHARED_FILTERED_EDGE_CHUNKS_NCOLS - WRITE_SHARED_FILTERED_EDGE_CHUNKS_CH_NCOLS);
- if (VERBOSE_MED) {
- printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- fflush(stdout);
- }
-
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
-
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, data) >= 0),
- "Dataset write succeeded");
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids, dxpl_id, data_bufs,
+ test_mode);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, SOME_CHUNKS_WRITTEN);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, SOME_CHUNKS_WRITTEN);
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
/* Verify the correct data was written */
- dset_id = H5Dopen2(group_id, WRITE_SHARED_FILTERED_EDGE_CHUNKS_DATASET_NAME2, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ open_datasets(group_id, WRITE_SHARED_FILTERED_EDGE_CHUNKS_DATASET_NAME2, num_dsets, test_mode, dset_ids);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ memset(read_bufs[dset_idx], 255, data_size);
- memset(read_buf, 255, data_size);
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids[0], dxpl_id, read_bufs,
+ test_mode);
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((0 == memcmp(read_bufs[dset_idx], data_bufs[dset_idx], data_size)),
+ "Data verification succeeded");
- VRFY((0 == memcmp(read_buf, data, data_size)), "Data verification succeeded");
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++) {
+ free(read_bufs[dset_idx]);
+ free(data_bufs_nc[dset_idx]);
+ }
- if (data)
- free(data);
- if (read_buf)
- free(read_buf);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
return;
}
-/*
- * Tests that filtered and unfiltered partial edge chunks can be
- * written to and read from correctly in parallel when only one
- * MPI rank writes to a particular edge chunk in the dataset and
- * only performs a partial write to the edge chunk.
- *
- * The dataset contains partial edge chunks in the second dimension.
- * Each MPI rank selects a hyperslab in the shape of part of a single
- * edge chunk and writes to just a portion of the edge chunk.
- */
-static void
-test_edge_chunks_partial_write(const char H5_ATTR_PARALLEL_UNUSED *parent_group,
- H5Z_filter_t H5_ATTR_PARALLEL_UNUSED filter_id,
- hid_t H5_ATTR_PARALLEL_UNUSED fapl_id, hid_t H5_ATTR_PARALLEL_UNUSED dcpl_id,
- hid_t H5_ATTR_PARALLEL_UNUSED dxpl_id)
-{
- /* TODO */
-}
-
/*
* Tests that the parallel compression feature correctly handles
* writing fill values to a dataset and reading fill values from
@@ -7767,11 +8819,12 @@ test_edge_chunks_partial_write(const char H5_ATTR_PARALLEL_UNUSED *parent_group
*/
static void
test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id, hid_t dcpl_id,
- hid_t dxpl_id)
+ hid_t dxpl_id, test_mode_t test_mode)
{
- C_DATATYPE *data = NULL;
- C_DATATYPE *read_buf = NULL;
- C_DATATYPE *correct_buf = NULL;
+ C_DATATYPE *correct_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
C_DATATYPE fill_value;
hsize_t dataset_dims[FILL_VALUES_TEST_DATASET_DIMS];
hsize_t chunk_dims[FILL_VALUES_TEST_DATASET_DIMS];
@@ -7780,15 +8833,19 @@ test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id
hsize_t stride[FILL_VALUES_TEST_DATASET_DIMS];
hsize_t count[FILL_VALUES_TEST_DATASET_DIMS];
hsize_t block[FILL_VALUES_TEST_DATASET_DIMS];
- size_t i, data_size, read_buf_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ size_t data_size, read_buf_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
hid_t group_id = H5I_INVALID_HID;
hid_t filespace = H5I_INVALID_HID;
int *recvcounts = NULL;
int *displs = NULL;
+ int mpi_code;
if (MAINPROCESS)
- HDputs("Testing fill values");
+ puts("Testing fill values");
file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");
@@ -7820,32 +8877,35 @@ test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id
fill_value = FILL_VALUES_TEST_FILL_VAL;
VRFY((H5Pset_fill_value(plist_id, HDF5_DATATYPE_NAME, &fill_value) >= 0), "Fill Value set");
- dset_id = H5Dcreate2(group_id, FILL_VALUES_TEST_DATASET_NAME, HDF5_DATATYPE_NAME, filespace, H5P_DEFAULT,
- plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, FILL_VALUES_TEST_DATASET_NAME, HDF5_DATATYPE_NAME, filespace, plist_id,
+ test_mode, &num_dsets, dset_ids);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
/* Allocate buffer for reading entire dataset */
- read_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*read_buf);
+ read_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(C_DATATYPE);
- read_buf = calloc(1, read_buf_size);
- VRFY((NULL != read_buf), "calloc succeeded");
-
- correct_buf = calloc(1, read_buf_size);
- VRFY((NULL != correct_buf), "calloc succeeded");
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++) {
+ correct_bufs[dset_idx] = calloc(1, read_buf_size);
+ VRFY((NULL != correct_bufs[dset_idx]), "calloc succeeded");
+ read_bufs[dset_idx] = calloc(1, read_buf_size);
+ VRFY((NULL != read_bufs[dset_idx]), "calloc succeeded");
+ }
/* Read entire dataset and verify that the fill value is returned */
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_bufs, test_mode);
- for (i = 0; i < read_buf_size / sizeof(*read_buf); i++)
- correct_buf[i] = FILL_VALUES_TEST_FILL_VAL;
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ for (size_t j = 0; j < read_buf_size / sizeof(C_DATATYPE); j++)
+ correct_bufs[dset_idx][j] = FILL_VALUES_TEST_FILL_VAL;
- VRFY((0 == memcmp(read_buf, correct_buf, read_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(read_bufs[dset_idx], correct_bufs[dset_idx], read_buf_size)),
+ "Data verification succeeded");
+ }
/*
* Write to part of the first chunk in the dataset with
@@ -7863,44 +8923,35 @@ test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id
start[0] = (hsize_t)mpi_rank;
start[1] = 0;
- if (VERBOSE_MED) {
- printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- fflush(stdout);
- }
-
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
-
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
/* Fill data buffer */
- data_size = sel_dims[0] * sel_dims[1] * sizeof(*data);
+ data_size = sel_dims[0] * sel_dims[1] * sizeof(C_DATATYPE);
- data = (C_DATATYPE *)calloc(1, data_size);
- VRFY((NULL != data), "calloc succeeded");
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++) {
+ C_DATATYPE *tmp_buf = calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
- for (i = 0; i < data_size / sizeof(*data); i++)
- data[i] = (C_DATATYPE)GEN_DATA(i);
+ for (size_t j = 0; j < data_size / sizeof(C_DATATYPE); j++)
+ tmp_buf[j] = (C_DATATYPE)(GEN_DATA(j) + dset_idx);
+
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
+ }
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, data) >= 0),
- "Dataset write succeeded");
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids, dxpl_id, data_bufs,
+ test_mode);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, SOME_CHUNKS_WRITTEN);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, SOME_CHUNKS_WRITTEN);
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
/* Verify correct data was written */
- dset_id = H5Dopen2(group_id, FILL_VALUES_TEST_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ open_datasets(group_id, FILL_VALUES_TEST_DATASET_NAME, num_dsets, test_mode, dset_ids);
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_bufs, test_mode);
/*
* Each MPI rank communicates their written piece of data
@@ -7912,16 +8963,22 @@ test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id
displs = calloc(1, (size_t)mpi_size * sizeof(*displs));
VRFY((NULL != displs), "calloc succeeded");
- for (i = 0; i < (size_t)mpi_size; i++) {
+ for (size_t i = 0; i < (size_t)mpi_size; i++) {
recvcounts[i] = (int)(count[1] * block[1]);
displs[i] = (int)(i * dataset_dims[1]);
}
- VRFY((MPI_SUCCESS == MPI_Allgatherv(data, recvcounts[mpi_rank], C_DATATYPE_MPI, correct_buf, recvcounts,
- displs, C_DATATYPE_MPI, comm)),
- "MPI_Allgatherv succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ mpi_code = MPI_Allgatherv(data_bufs[dset_idx], recvcounts[mpi_rank], C_DATATYPE_MPI,
+ correct_bufs[dset_idx], recvcounts, displs, C_DATATYPE_MPI, comm);
+ VRFY((MPI_SUCCESS == mpi_code), "MPI_Allgatherv succeeded");
- VRFY((0 == memcmp(read_buf, correct_buf, read_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(read_bufs[dset_idx], correct_bufs[dset_idx], read_buf_size)),
+ "Data verification succeeded");
+ }
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
/*
* Write to whole dataset and ensure fill value isn't returned
@@ -7940,60 +8997,62 @@ test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id
start[0] = (hsize_t)mpi_rank * block[0];
start[1] = 0;
- if (VERBOSE_MED) {
- printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- fflush(stdout);
- }
-
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, data) >= 0),
- "Dataset write succeeded");
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids, dxpl_id, data_bufs,
+ test_mode);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, ALL_CHUNKS_WRITTEN);
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
/* Verify correct data was written */
- dset_id = H5Dopen2(group_id, FILL_VALUES_TEST_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ open_datasets(group_id, FILL_VALUES_TEST_DATASET_NAME, num_dsets, test_mode, dset_ids);
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_bufs, test_mode);
- for (i = 0; i < read_buf_size / sizeof(*read_buf); i++)
- VRFY((read_buf[i] != FILL_VALUES_TEST_FILL_VAL), "Data verification succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ C_DATATYPE *tmp_buf = read_bufs[dset_idx];
+
+ for (size_t j = 0; j < read_buf_size / sizeof(C_DATATYPE); j++)
+ VRFY((tmp_buf[j] != FILL_VALUES_TEST_FILL_VAL), "Data verification succeeded");
+ }
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
/********************************************************************
* Set the fill time to H5D_FILL_TIME_ALLOC and repeat the previous *
********************************************************************/
+ filespace = H5Screate_simple(FILL_VALUES_TEST_DATASET_DIMS, dataset_dims, NULL);
+ VRFY((filespace >= 0), "File dataspace creation succeeded");
+
VRFY((H5Pset_fill_time(plist_id, H5D_FILL_TIME_ALLOC) >= 0), "H5Pset_fill_time succeeded");
- dset_id = H5Dcreate2(group_id, FILL_VALUES_TEST_DATASET_NAME2, HDF5_DATATYPE_NAME, filespace, H5P_DEFAULT,
- plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, FILL_VALUES_TEST_DATASET_NAME2, HDF5_DATATYPE_NAME, filespace, plist_id,
+ test_mode, &num_dsets, dset_ids);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
/* Read entire dataset and verify that the fill value is returned */
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_bufs, test_mode);
- for (i = 0; i < read_buf_size / sizeof(*read_buf); i++)
- correct_buf[i] = FILL_VALUES_TEST_FILL_VAL;
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ for (size_t j = 0; j < read_buf_size / sizeof(C_DATATYPE); j++)
+ correct_bufs[dset_idx][j] = FILL_VALUES_TEST_FILL_VAL;
- VRFY((0 == memcmp(read_buf, correct_buf, read_buf_size)), "Data verification succeeded");
+ VRFY((0 == memcmp(read_bufs[dset_idx], correct_bufs[dset_idx], read_buf_size)),
+ "Data verification succeeded");
+ }
/*
* Write to part of the first chunk in the dataset with
@@ -8011,40 +9070,30 @@ test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id
start[0] = (hsize_t)mpi_rank;
start[1] = 0;
- if (VERBOSE_MED) {
- printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- fflush(stdout);
- }
-
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ C_DATATYPE *tmp_buf = data_bufs_nc[dset_idx];
- for (i = 0; i < data_size / sizeof(*data); i++)
- data[i] = (C_DATATYPE)GEN_DATA(i);
+ for (size_t j = 0; j < data_size / sizeof(C_DATATYPE); j++)
+ tmp_buf[j] = (C_DATATYPE)(GEN_DATA(j) + dset_idx);
+ }
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, data) >= 0),
- "Dataset write succeeded");
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids, dxpl_id, data_bufs,
+ test_mode);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, SOME_CHUNKS_WRITTEN);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, SOME_CHUNKS_WRITTEN);
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
/* Verify correct data was written */
- dset_id = H5Dopen2(group_id, FILL_VALUES_TEST_DATASET_NAME2, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ open_datasets(group_id, FILL_VALUES_TEST_DATASET_NAME2, num_dsets, test_mode, dset_ids);
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_bufs, test_mode);
- for (i = 0; i < (size_t)mpi_size; i++) {
+ for (size_t i = 0; i < (size_t)mpi_size; i++) {
recvcounts[i] = (int)(count[1] * block[1]);
displs[i] = (int)(i * dataset_dims[1]);
}
@@ -8053,11 +9102,17 @@ test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id
* Each MPI rank communicates their written piece of data
* into each other rank's correctness-checking buffer
*/
- VRFY((MPI_SUCCESS == MPI_Allgatherv(data, recvcounts[mpi_rank], C_DATATYPE_MPI, correct_buf, recvcounts,
- displs, C_DATATYPE_MPI, comm)),
- "MPI_Allgatherv succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ mpi_code = MPI_Allgatherv(data_bufs[dset_idx], recvcounts[mpi_rank], C_DATATYPE_MPI,
+ correct_bufs[dset_idx], recvcounts, displs, C_DATATYPE_MPI, comm);
+ VRFY((MPI_SUCCESS == mpi_code), "MPI_Allgatherv succeeded");
+
+ VRFY((0 == memcmp(read_bufs[dset_idx], correct_bufs[dset_idx], read_buf_size)),
+ "Data verification succeeded");
+ }
- VRFY((0 == memcmp(read_buf, correct_buf, read_buf_size)), "Data verification succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
/*
* Write to whole dataset and ensure fill value isn't returned
@@ -8076,49 +9131,44 @@ test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id
start[0] = (hsize_t)mpi_rank * block[0];
start[1] = 0;
- if (VERBOSE_MED) {
- printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- fflush(stdout);
- }
-
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, data) >= 0),
- "Dataset write succeeded");
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids, dxpl_id, data_bufs,
+ test_mode);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, ALL_CHUNKS_WRITTEN);
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
/* Verify correct data was written */
- dset_id = H5Dopen2(group_id, FILL_VALUES_TEST_DATASET_NAME2, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
-
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
-
- for (i = 0; i < read_buf_size / sizeof(*read_buf); i++)
- VRFY((read_buf[i] != FILL_VALUES_TEST_FILL_VAL), "Data verification succeeded");
-
- if (displs)
- free(displs);
- if (recvcounts)
- free(recvcounts);
- if (data)
- free(data);
- if (read_buf)
- free(read_buf);
- if (correct_buf)
- free(correct_buf);
+ open_datasets(group_id, FILL_VALUES_TEST_DATASET_NAME2, num_dsets, test_mode, dset_ids);
+
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_bufs, test_mode);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ C_DATATYPE *tmp_buf = read_bufs[dset_idx];
+
+ for (size_t j = 0; j < read_buf_size / sizeof(C_DATATYPE); j++)
+ VRFY((tmp_buf[j] != FILL_VALUES_TEST_FILL_VAL), "Data verification succeeded");
+ }
+
+ free(displs);
+ free(recvcounts);
+
+ for (size_t dset_idx = 0; dset_idx < MAX_NUM_DSETS_MULTI; dset_idx++) {
+ free(data_bufs_nc[dset_idx]);
+ free(read_bufs[dset_idx]);
+ free(correct_bufs[dset_idx]);
+ }
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -8132,11 +9182,12 @@ test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id
*/
static void
test_fill_value_undefined(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id, hid_t dcpl_id,
- hid_t dxpl_id)
+ hid_t dxpl_id, test_mode_t test_mode)
{
H5D_alloc_time_t alloc_time;
- C_DATATYPE *data = NULL;
- C_DATATYPE *read_buf = NULL;
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
hsize_t dataset_dims[FILL_VALUE_UNDEFINED_TEST_DATASET_DIMS];
hsize_t chunk_dims[FILL_VALUE_UNDEFINED_TEST_DATASET_DIMS];
hsize_t sel_dims[FILL_VALUE_UNDEFINED_TEST_DATASET_DIMS];
@@ -8144,13 +9195,16 @@ test_fill_value_undefined(const char *parent_group, H5Z_filter_t filter_id, hid_
hsize_t stride[FILL_VALUE_UNDEFINED_TEST_DATASET_DIMS];
hsize_t count[FILL_VALUE_UNDEFINED_TEST_DATASET_DIMS];
hsize_t block[FILL_VALUE_UNDEFINED_TEST_DATASET_DIMS];
- size_t i, data_size, read_buf_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ size_t data_size, read_buf_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
hid_t group_id = H5I_INVALID_HID;
hid_t filespace = H5I_INVALID_HID;
if (MAINPROCESS)
- HDputs("Testing undefined fill value");
+ puts("Testing undefined fill value");
VRFY((H5Pget_alloc_time(dcpl_id, &alloc_time) >= 0), "H5Pget_alloc_time succeeded");
@@ -8183,37 +9237,93 @@ test_fill_value_undefined(const char *parent_group, H5Z_filter_t filter_id, hid_
/* Set an undefined fill value */
VRFY((H5Pset_fill_value(plist_id, HDF5_DATATYPE_NAME, NULL) >= 0), "Fill Value set");
- dset_id = H5Dcreate2(group_id, FILL_VALUE_UNDEFINED_TEST_DATASET_NAME, HDF5_DATATYPE_NAME, filespace,
- H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, FILL_VALUE_UNDEFINED_TEST_DATASET_NAME, HDF5_DATATYPE_NAME, filespace, plist_id,
+ test_mode, &num_dsets, dset_ids);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
+ /*
+ * Since we aren't writing fill values to the chunks of the
+ * datasets we just created, close and re-open file to ensure
+ * that file size is updated so we don't read past the end of
+ * the file later if doing multi-dataset I/O.
+ */
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
+ VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
+
+ file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
+ VRFY((file_id >= 0), "Test file open succeeded");
+
+ group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
+ VRFY((group_id >= 0), "H5Gopen2 succeeded");
+
+ open_datasets(group_id, FILL_VALUE_UNDEFINED_TEST_DATASET_NAME, num_dsets, test_mode, dset_ids);
+
/* Allocate buffer for reading entire dataset */
- read_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*read_buf);
+ read_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(C_DATATYPE);
- read_buf = calloc(1, read_buf_size);
- VRFY((NULL != read_buf), "calloc succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ read_bufs[dset_idx] = calloc(1, read_buf_size);
+ VRFY((NULL != read_bufs[dset_idx]), "calloc succeeded");
+ }
/*
* Read entire dataset - nothing to verify since there's no fill value.
- * If not using early space allocation, the read should fail since storage
- * isn't allocated yet and no fill value is defined.
+ * If not using early space allocation, the read should fail for filtered
+ * datasets since storage isn't allocated yet and no fill value is defined.
+ * For unfiltered datasets, the library will still be forcing early space
+ * allocation in parallel, so the read should succeed in that case.
*/
if (alloc_time == H5D_ALLOC_TIME_EARLY) {
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_bufs,
+ test_mode);
}
else {
- H5E_BEGIN_TRY
- {
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) < 0),
- "Dataset read succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ herr_t expected = FAIL;
+ herr_t ret;
+
+ if (test_mode == USE_MULTIPLE_DATASETS_MIXED_FILTERED) {
+ hid_t dset_dcpl;
+ int nfilters;
+
+ dset_dcpl = H5Dget_create_plist(dset_ids[dset_idx]);
+ VRFY((dset_dcpl >= 0), "H5Dget_create_plist");
+
+ nfilters = H5Pget_nfilters(dset_dcpl);
+ VRFY((nfilters >= 0), "H5Pget_nfilters");
+
+ if (nfilters == 0)
+ expected = SUCCEED;
+
+ VRFY((H5Pclose(dset_dcpl) >= 0), "H5Pclose");
+ }
+
+ if (expected == SUCCEED)
+ ret = H5Dread(dset_ids[dset_idx], HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id,
+ read_bufs[dset_idx]);
+ else {
+ H5E_BEGIN_TRY
+ {
+ ret = H5Dread(dset_ids[dset_idx], HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id,
+ read_bufs[dset_idx]);
+ }
+ H5E_END_TRY
+ }
+
+ VRFY((ret == expected), "Dataset write");
+
+ if (expected == SUCCEED)
+ verify_chunk_opt_status(1, dxpl_id);
+ else
+ verify_chunk_opt_status(0, dxpl_id);
}
- H5E_END_TRY
}
/*
@@ -8230,43 +9340,37 @@ test_fill_value_undefined(const char *parent_group, H5Z_filter_t filter_id, hid_
start[0] = (hsize_t)mpi_rank;
start[1] = 0;
- if (VERBOSE_MED) {
- printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- fflush(stdout);
- }
-
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
-
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
/* Fill data buffer */
- data_size = sel_dims[0] * sel_dims[1] * sizeof(*data);
+ data_size = sel_dims[0] * sel_dims[1] * sizeof(C_DATATYPE);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ C_DATATYPE *tmp_buf = (C_DATATYPE *)calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
- data = (C_DATATYPE *)calloc(1, data_size);
- VRFY((NULL != data), "calloc succeeded");
+ for (size_t j = 0; j < data_size / sizeof(C_DATATYPE); j++)
+ tmp_buf[j] = (C_DATATYPE)(GEN_DATA(j) + dset_idx);
- for (i = 0; i < data_size / sizeof(*data); i++)
- data[i] = (C_DATATYPE)GEN_DATA(i);
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
+ }
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, data) >= 0),
- "Dataset write succeeded");
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids, dxpl_id, data_bufs,
+ test_mode);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, SOME_CHUNKS_WRITTEN);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, SOME_CHUNKS_WRITTEN);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
+ open_datasets(group_id, FILL_VALUE_UNDEFINED_TEST_DATASET_NAME, num_dsets, test_mode, dset_ids);
- dset_id = H5Dopen2(group_id, FILL_VALUE_UNDEFINED_TEST_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_bufs, test_mode);
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
/*
* Write to whole dataset and ensure data is correct
@@ -8285,40 +9389,33 @@ test_fill_value_undefined(const char *parent_group, H5Z_filter_t filter_id, hid_
start[0] = (hsize_t)mpi_rank * block[0];
start[1] = 0;
- if (VERBOSE_MED) {
- printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- fflush(stdout);
- }
-
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, data) >= 0),
- "Dataset write succeeded");
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids, dxpl_id, data_bufs,
+ test_mode);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, ALL_CHUNKS_WRITTEN);
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
/* Verify correct data was written */
- dset_id = H5Dopen2(group_id, FILL_VALUE_UNDEFINED_TEST_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ open_datasets(group_id, FILL_VALUE_UNDEFINED_TEST_DATASET_NAME, num_dsets, test_mode, dset_ids);
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_bufs, test_mode);
- if (data)
- free(data);
- if (read_buf)
- free(read_buf);
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ free(data_bufs_nc[dset_idx]);
+ free(read_bufs[dset_idx]);
+ }
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -8332,11 +9429,12 @@ test_fill_value_undefined(const char *parent_group, H5Z_filter_t filter_id, hid_
*/
static void
test_fill_time_never(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id, hid_t dcpl_id,
- hid_t dxpl_id)
+ hid_t dxpl_id, test_mode_t test_mode)
{
- C_DATATYPE *data = NULL;
- C_DATATYPE *read_buf = NULL;
- C_DATATYPE *fill_buf = NULL;
+ const void *data_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ void *data_bufs_nc[MAX_NUM_DSETS_MULTI] = {0}; /* non-const buffer pointers for freeing */
+ void *read_bufs[MAX_NUM_DSETS_MULTI] = {0};
+ C_DATATYPE *fill_buf = NULL;
C_DATATYPE fill_value;
hsize_t dataset_dims[FILL_TIME_NEVER_TEST_DATASET_DIMS];
hsize_t chunk_dims[FILL_TIME_NEVER_TEST_DATASET_DIMS];
@@ -8345,15 +9443,19 @@ test_fill_time_never(const char *parent_group, H5Z_filter_t filter_id, hid_t fap
hsize_t stride[FILL_TIME_NEVER_TEST_DATASET_DIMS];
hsize_t count[FILL_TIME_NEVER_TEST_DATASET_DIMS];
hsize_t block[FILL_TIME_NEVER_TEST_DATASET_DIMS];
- size_t i, data_size, read_buf_size;
- hid_t file_id = H5I_INVALID_HID, dset_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
+ size_t data_size, read_buf_size;
+ size_t num_dsets;
+ hid_t dset_ids[MAX_NUM_DSETS_MULTI];
+ hid_t fspace_ids[MAX_NUM_DSETS_MULTI];
+ hid_t file_id = H5I_INVALID_HID, plist_id = H5I_INVALID_HID;
hid_t group_id = H5I_INVALID_HID;
hid_t filespace = H5I_INVALID_HID;
int *recvcounts = NULL;
int *displs = NULL;
+ int mpi_code;
if (MAINPROCESS)
- HDputs("Testing fill time H5D_FILL_TIME_NEVER");
+ puts("Testing fill time H5D_FILL_TIME_NEVER");
/*
* Only run this test when incremental file space allocation is
@@ -8406,29 +9508,49 @@ test_fill_time_never(const char *parent_group, H5Z_filter_t filter_id, hid_t fap
/* Set fill time of 'never' */
VRFY((H5Pset_fill_time(plist_id, H5D_FILL_TIME_NEVER) >= 0), "H5Pset_fill_time succeeded");
- dset_id = H5Dcreate2(group_id, FILL_TIME_NEVER_TEST_DATASET_NAME, HDF5_DATATYPE_NAME, filespace,
- H5P_DEFAULT, plist_id, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset creation succeeded");
+ /* Create datasets depending on the current test mode */
+ create_datasets(group_id, FILL_TIME_NEVER_TEST_DATASET_NAME, HDF5_DATATYPE_NAME, filespace, plist_id,
+ test_mode, &num_dsets, dset_ids);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, DATASET_JUST_CREATED);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, DATASET_JUST_CREATED);
VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
+ /*
+ * Since we aren't writing fill values to the chunks of the
+ * datasets we just created, close and re-open file to ensure
+ * that file size is updated so we don't read past the end of
+ * the file later if doing multi-dataset I/O.
+ */
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
+ VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
+
+ file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
+ VRFY((file_id >= 0), "Test file open succeeded");
+
+ group_id = H5Gopen2(file_id, parent_group, H5P_DEFAULT);
+ VRFY((group_id >= 0), "H5Gopen2 succeeded");
+
+ open_datasets(group_id, FILL_TIME_NEVER_TEST_DATASET_NAME, num_dsets, test_mode, dset_ids);
+
/* Allocate buffer for reading entire dataset */
- read_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*read_buf);
+ read_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(C_DATATYPE);
- read_buf = calloc(1, read_buf_size);
- VRFY((NULL != read_buf), "calloc succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ read_bufs[dset_idx] = calloc(1, read_buf_size);
+ VRFY((NULL != read_bufs[dset_idx]), "calloc succeeded");
+ }
fill_buf = calloc(1, read_buf_size);
VRFY((NULL != fill_buf), "calloc succeeded");
/* Read entire dataset and verify that the fill value isn't returned */
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_bufs, test_mode);
- for (i = 0; i < read_buf_size / sizeof(*read_buf); i++)
+ for (size_t i = 0; i < read_buf_size / sizeof(C_DATATYPE); i++)
fill_buf[i] = FILL_TIME_NEVER_TEST_FILL_VAL;
/*
@@ -8436,7 +9558,8 @@ test_fill_time_never(const char *parent_group, H5Z_filter_t filter_id, hid_t fap
* values to all be the fill value, so this should be
* a safe comparison in theory.
*/
- VRFY((0 != memcmp(read_buf, fill_buf, read_buf_size)), "Data verification succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((0 != memcmp(read_bufs[dset_idx], fill_buf, read_buf_size)), "Data verification succeeded");
/*
* Write to part of the first chunk in the dataset with
@@ -8454,44 +9577,35 @@ test_fill_time_never(const char *parent_group, H5Z_filter_t filter_id, hid_t fap
start[0] = (hsize_t)mpi_rank;
start[1] = 0;
- if (VERBOSE_MED) {
- printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- fflush(stdout);
- }
-
- /* Select hyperslab in the file */
- filespace = H5Dget_space(dset_id);
- VRFY((filespace >= 0), "File dataspace retrieval succeeded");
-
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
/* Fill data buffer */
- data_size = sel_dims[0] * sel_dims[1] * sizeof(*data);
+ data_size = sel_dims[0] * sel_dims[1] * sizeof(C_DATATYPE);
- data = (C_DATATYPE *)calloc(1, data_size);
- VRFY((NULL != data), "calloc succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ C_DATATYPE *tmp_buf = calloc(1, data_size);
+ VRFY((NULL != tmp_buf), "calloc succeeded");
- for (i = 0; i < data_size / sizeof(*data); i++)
- data[i] = (C_DATATYPE)GEN_DATA(i);
+ for (size_t j = 0; j < data_size / sizeof(C_DATATYPE); j++)
+ tmp_buf[j] = (C_DATATYPE)(GEN_DATA(j) + dset_idx);
+
+ data_bufs[dset_idx] = tmp_buf;
+ data_bufs_nc[dset_idx] = tmp_buf;
+ }
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, data) >= 0),
- "Dataset write succeeded");
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids, dxpl_id, data_bufs,
+ test_mode);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, SOME_CHUNKS_WRITTEN);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, SOME_CHUNKS_WRITTEN);
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
/* Verify correct data was written */
- dset_id = H5Dopen2(group_id, FILL_TIME_NEVER_TEST_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
+ open_datasets(group_id, FILL_TIME_NEVER_TEST_DATASET_NAME, num_dsets, test_mode, dset_ids);
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_bufs, test_mode);
/*
* Each MPI rank communicates their written piece of data
@@ -8503,21 +9617,26 @@ test_fill_time_never(const char *parent_group, H5Z_filter_t filter_id, hid_t fap
displs = calloc(1, (size_t)mpi_size * sizeof(*displs));
VRFY((NULL != displs), "calloc succeeded");
- for (i = 0; i < (size_t)mpi_size; i++) {
+ for (size_t i = 0; i < (size_t)mpi_size; i++) {
recvcounts[i] = (int)(count[1] * block[1]);
displs[i] = (int)(i * dataset_dims[1]);
}
- VRFY((MPI_SUCCESS == MPI_Allgatherv(data, recvcounts[mpi_rank], C_DATATYPE_MPI, fill_buf, recvcounts,
- displs, C_DATATYPE_MPI, comm)),
- "MPI_Allgatherv succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ mpi_code = MPI_Allgatherv(data_bufs[dset_idx], recvcounts[mpi_rank], C_DATATYPE_MPI, fill_buf,
+ recvcounts, displs, C_DATATYPE_MPI, comm);
+ VRFY((MPI_SUCCESS == mpi_code), "MPI_Allgatherv succeeded");
- /*
- * It should be very unlikely for the dataset's random
- * values to all be the fill value, so this should be
- * a safe comparison in theory.
- */
- VRFY((0 != memcmp(read_buf, fill_buf, read_buf_size)), "Data verification succeeded");
+ /*
+ * It should be very unlikely for the dataset's random
+ * values to all be the fill value, so this should be
+ * a safe comparison in theory.
+ */
+ VRFY((0 != memcmp(read_bufs[dset_idx], fill_buf, read_buf_size)), "Data verification succeeded");
+ }
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
/*
* Write to whole dataset and ensure fill value isn't returned
@@ -8536,49 +9655,45 @@ test_fill_time_never(const char *parent_group, H5Z_filter_t filter_id, hid_t fap
start[0] = (hsize_t)mpi_rank * block[0];
start[1] = 0;
- if (VERBOSE_MED) {
- printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE
- ", %" PRIuHSIZE " ]\n",
- mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
- fflush(stdout);
- }
-
- VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0),
- "Hyperslab selection succeeded");
+ select_hyperslab(num_dsets, dset_ids, start, stride, count, block, fspace_ids);
- VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, data) >= 0),
- "Dataset write succeeded");
+ write_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_BLOCK, fspace_ids, dxpl_id, data_bufs,
+ test_mode);
/* Verify space allocation status */
- verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN);
+ verify_space_alloc_status(num_dsets, dset_ids, plist_id, ALL_CHUNKS_WRITTEN);
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++)
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
/* Verify correct data was written */
- dset_id = H5Dopen2(group_id, FILL_TIME_NEVER_TEST_DATASET_NAME, H5P_DEFAULT);
- VRFY((dset_id >= 0), "Dataset open succeeded");
-
- VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0),
- "Dataset read succeeded");
-
- for (i = 0; i < read_buf_size / sizeof(*read_buf); i++)
- VRFY((read_buf[i] != FILL_TIME_NEVER_TEST_FILL_VAL), "Data verification succeeded");
-
- if (displs)
- free(displs);
- if (recvcounts)
- free(recvcounts);
- if (data)
- free(data);
- if (read_buf)
- free(read_buf);
- if (fill_buf)
- free(fill_buf);
+ open_datasets(group_id, FILL_TIME_NEVER_TEST_DATASET_NAME, num_dsets, test_mode, dset_ids);
+
+ read_datasets(num_dsets, dset_ids, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_bufs, test_mode);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ C_DATATYPE *tmp_buf = read_bufs[dset_idx];
+
+ for (size_t j = 0; j < read_buf_size / sizeof(C_DATATYPE); j++)
+ VRFY((tmp_buf[j] != FILL_TIME_NEVER_TEST_FILL_VAL), "Data verification succeeded");
+ }
+
+ free(displs);
+ free(recvcounts);
+
+ free(fill_buf);
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ free(data_bufs_nc[dset_idx]);
+ free(read_bufs[dset_idx]);
+ }
+
+ for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
+ VRFY((H5Sclose(fspace_ids[dset_idx]) >= 0), "File dataspace close succeeded");
+ VRFY((H5Dclose(dset_ids[dset_idx]) >= 0), "Dataset close succeeded");
+ }
VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded");
- VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
- VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded");
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
@@ -8589,28 +9704,44 @@ test_fill_time_never(const char *parent_group, H5Z_filter_t filter_id, hid_t fap
int
main(int argc, char **argv)
{
- size_t cur_filter_idx = 0;
- size_t num_filters = 0;
- hid_t file_id = H5I_INVALID_HID;
- hid_t fcpl_id = H5I_INVALID_HID;
- hid_t group_id = H5I_INVALID_HID;
- hid_t fapl_id = H5I_INVALID_HID;
- hid_t dxpl_id = H5I_INVALID_HID;
- hid_t dcpl_id = H5I_INVALID_HID;
- int mpi_code;
+ unsigned seed;
+ size_t cur_filter_idx = 0;
+ size_t num_filters = 0;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t fcpl_id = H5I_INVALID_HID;
+ hid_t group_id = H5I_INVALID_HID;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t dxpl_id = H5I_INVALID_HID;
+ hid_t dcpl_id = H5I_INVALID_HID;
+ int mpi_code;
/* Initialize MPI */
- MPI_Init(&argc, &argv);
- MPI_Comm_size(comm, &mpi_size);
- MPI_Comm_rank(comm, &mpi_rank);
+ if (MPI_SUCCESS != (mpi_code = MPI_Init(&argc, &argv))) {
+ printf("Failed to initialize MPI: MPI error code %d\n", mpi_code);
+ fflush(stdout);
+ MPI_Abort(MPI_COMM_WORLD, -1);
+ }
+
+ if (MPI_SUCCESS != (mpi_code = MPI_Comm_size(comm, &mpi_size))) {
+ printf("Failed to retrieve MPI communicator size: MPI error code %d\n", mpi_code);
+ fflush(stdout);
+ MPI_Abort(MPI_COMM_WORLD, -1);
+ }
+
+ if (MPI_SUCCESS != (mpi_code = MPI_Comm_rank(comm, &mpi_rank))) {
+ printf("Failed to retrieve MPI communicator rank: MPI error code %d\n", mpi_code);
+ fflush(stdout);
+ MPI_Abort(MPI_COMM_WORLD, -1);
+ }
if (mpi_size <= 0) {
if (MAINPROCESS) {
printf("The Parallel Filters tests require at least 1 rank.\n");
printf("Quitting...\n");
+ fflush(stdout);
}
- MPI_Abort(MPI_COMM_WORLD, 1);
+ MPI_Abort(MPI_COMM_WORLD, -1);
}
if (H5dont_atexit() < 0) {
@@ -8632,6 +9763,30 @@ main(int argc, char **argv)
TestAlarmOn();
+ /*
+ * Obtain and broadcast seed value since ranks
+ * aren't guaranteed to arrive here at exactly
+ * the same time and could end up out of sync
+ * with each other in regards to random number
+ * generation
+ */
+ if (MAINPROCESS)
+ seed = (unsigned)time(NULL);
+
+ if (mpi_size > 1) {
+ if (MPI_SUCCESS != (mpi_code = MPI_Bcast(&seed, 1, MPI_UNSIGNED, 0, comm))) {
+ if (MAINPROCESS)
+ printf("MPI_Bcast failed with error code %d\n", mpi_code);
+ fflush(stdout);
+ MPI_Abort(MPI_COMM_WORLD, -1);
+ }
+ }
+
+ srand(seed);
+
+ if (MAINPROCESS)
+ printf("Using seed: %u\n\n", seed);
+
num_filters = ARRAY_SIZE(filterIDs);
/* Set up file access property list with parallel I/O access,
@@ -8641,9 +9796,8 @@ main(int argc, char **argv)
VRFY((fapl_id >= 0), "FAPL creation succeeded");
VRFY((H5Pset_fapl_mpio(fapl_id, comm, info) >= 0), "Set FAPL MPIO succeeded");
- VRFY((H5Pset_all_coll_metadata_ops(fapl_id, TRUE) >= 0), "H5Pset_all_coll_metadata_ops succeeded");
- VRFY((H5Pset_coll_metadata_write(fapl_id, TRUE) >= 0), "H5Pset_coll_metadata_write succeeded");
-
+ VRFY((H5Pset_all_coll_metadata_ops(fapl_id, true) >= 0), "H5Pset_all_coll_metadata_ops succeeded");
+ VRFY((H5Pset_coll_metadata_write(fapl_id, true) >= 0), "H5Pset_coll_metadata_write succeeded");
VRFY((H5Pset_libver_bounds(fapl_id, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) >= 0),
"Set libver bounds succeeded");
@@ -8653,7 +9807,7 @@ main(int argc, char **argv)
fcpl_id = H5Pcreate(H5P_FILE_CREATE);
VRFY((fcpl_id >= 0), "FCPL creation succeeded");
- VRFY((H5Pset_file_space_strategy(fcpl_id, H5F_FSPACE_STRATEGY_PAGE, TRUE, 1) >= 0),
+ VRFY((H5Pset_file_space_strategy(fcpl_id, H5F_FSPACE_STRATEGY_PAGE, true, 1) >= 0),
"H5Pset_file_space_strategy succeeded");
VRFY((h5_fixname(FILENAME[0], fapl_id, filenames[0], sizeof(filenames[0])) != NULL),
@@ -8677,108 +9831,160 @@ main(int argc, char **argv)
/* Run tests with all available filters */
for (cur_filter_idx = 0; cur_filter_idx < num_filters; cur_filter_idx++) {
- H5FD_mpio_chunk_opt_t chunk_opt;
- H5Z_filter_t cur_filter = filterIDs[cur_filter_idx];
-
- /* Run tests with both linked-chunk and multi-chunk I/O */
- for (chunk_opt = H5FD_MPIO_CHUNK_ONE_IO; chunk_opt <= H5FD_MPIO_CHUNK_MULTI_IO; chunk_opt++) {
- H5D_alloc_time_t space_alloc_time;
-
- /* Run tests with all available space allocation times */
- for (space_alloc_time = H5D_ALLOC_TIME_EARLY; space_alloc_time <= H5D_ALLOC_TIME_INCR;
- space_alloc_time++) {
- const char *alloc_time;
- unsigned filter_config;
- htri_t filter_avail;
- size_t i;
- char group_name[512];
-
- switch (space_alloc_time) {
- case H5D_ALLOC_TIME_EARLY:
- alloc_time = "Early";
- break;
- case H5D_ALLOC_TIME_LATE:
- alloc_time = "Late";
- break;
- case H5D_ALLOC_TIME_INCR:
- alloc_time = "Incremental";
- break;
- case H5D_ALLOC_TIME_DEFAULT:
- case H5D_ALLOC_TIME_ERROR:
- default:
- alloc_time = "Unknown";
- }
-
- if (MAINPROCESS)
- printf("== Running tests with filter '%s' using '%s' and '%s' allocation time ==\n\n",
- filterNames[cur_filter_idx],
- H5FD_MPIO_CHUNK_ONE_IO == chunk_opt ? "Linked-Chunk I/O" : "Multi-Chunk I/O",
- alloc_time);
-
- /* Make sure current filter is available before testing with it */
- filter_avail = H5Zfilter_avail(cur_filter);
- VRFY((filter_avail >= 0), "H5Zfilter_avail succeeded");
-
- if (!filter_avail) {
- if (MAINPROCESS)
- printf(" ** SKIPPED tests with filter '%s' - filter unavailable **\n\n",
- filterNames[cur_filter_idx]);
- continue;
- }
-
- /* Get the current filter's info */
- VRFY((H5Zget_filter_info(cur_filter, &filter_config) >= 0), "H5Zget_filter_info succeeded");
-
- /* Determine if filter is encode-enabled */
- if (0 == (filter_config & H5Z_FILTER_CONFIG_ENCODE_ENABLED)) {
- if (MAINPROCESS)
- printf(" ** SKIPPED tests with filter '%s' - filter not encode-enabled **\n\n",
- filterNames[cur_filter_idx]);
- continue;
- }
-
- /* Set space allocation time */
- VRFY((H5Pset_alloc_time(dcpl_id, space_alloc_time) >= 0), "H5Pset_alloc_time succeeded");
-
- /* Set chunk I/O optimization method */
- VRFY((H5Pset_dxpl_mpio_chunk_opt(dxpl_id, chunk_opt) >= 0),
- "H5Pset_dxpl_mpio_chunk_opt succeeded");
-
- /* Create a group to hold all the datasets for this combination
- * of filter and chunk optimization mode. Then, close the file
- * again since some tests may need to open the file in a special
- * way, like on rank 0 only */
- file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
- VRFY((file_id >= 0), "H5Fopen succeeded");
+ H5D_selection_io_mode_t sel_io_mode;
+
+ /* Run tests with different selection I/O modes */
+ for (sel_io_mode = H5D_SELECTION_IO_MODE_DEFAULT; sel_io_mode <= H5D_SELECTION_IO_MODE_ON;
+ sel_io_mode++) {
+ H5FD_mpio_chunk_opt_t chunk_opt;
+
+ /* Run tests with both linked-chunk and multi-chunk I/O */
+ for (chunk_opt = H5FD_MPIO_CHUNK_ONE_IO; chunk_opt <= H5FD_MPIO_CHUNK_MULTI_IO; chunk_opt++) {
+ H5D_alloc_time_t space_alloc_time;
+
+ /* Run tests with all available space allocation times */
+ for (space_alloc_time = H5D_ALLOC_TIME_EARLY; space_alloc_time <= H5D_ALLOC_TIME_INCR;
+ space_alloc_time++) {
+ test_mode_t test_mode;
+
+ /* Run with each of the test modes (single dataset, multiple datasets, etc.) */
+ for (test_mode = USE_SINGLE_DATASET; test_mode < TEST_MODE_SENTINEL; test_mode++) {
+ H5Z_filter_t cur_filter = filterIDs[cur_filter_idx];
+ const char *sel_io_str;
+ const char *alloc_time;
+ const char *mode;
+ unsigned filter_config;
+ htri_t filter_avail;
+ char group_name[512];
+
+ switch (sel_io_mode) {
+ case H5D_SELECTION_IO_MODE_DEFAULT:
+ sel_io_str = "default";
+ break;
+ case H5D_SELECTION_IO_MODE_OFF:
+ sel_io_str = "off";
+ break;
+ case H5D_SELECTION_IO_MODE_ON:
+ sel_io_str = "on";
+ break;
+ default:
+ sel_io_str = "unknown";
+ }
+
+ switch (space_alloc_time) {
+ case H5D_ALLOC_TIME_EARLY:
+ alloc_time = "Early";
+ break;
+ case H5D_ALLOC_TIME_LATE:
+ alloc_time = "Late";
+ break;
+ case H5D_ALLOC_TIME_INCR:
+ alloc_time = "Incremental";
+ break;
+ case H5D_ALLOC_TIME_DEFAULT:
+ case H5D_ALLOC_TIME_ERROR:
+ default:
+ alloc_time = "Unknown";
+ }
+
+ switch (test_mode) {
+ case USE_SINGLE_DATASET:
+ mode = "single";
+ break;
+ case USE_MULTIPLE_DATASETS:
+ mode = "multi";
+ break;
+ case USE_MULTIPLE_DATASETS_MIXED_FILTERED:
+ mode = "multi-mixed-filtered";
+ break;
+ case TEST_MODE_SENTINEL:
+ default:
+ mode = "unknown";
+ }
- HDsnprintf(group_name, sizeof(group_name), "%s_%s_%s", filterNames[cur_filter_idx],
- H5FD_MPIO_CHUNK_ONE_IO == chunk_opt ? "linked-chunk-io" : "multi-chunk-io",
- alloc_time);
-
- group_id = H5Gcreate2(file_id, group_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- VRFY((group_id >= 0), "H5Gcreate2 succeeded");
-
- VRFY((H5Gclose(group_id) >= 0), "H5Gclose failed");
- group_id = H5I_INVALID_HID;
-
- VRFY((H5Fclose(file_id) >= 0), "H5Fclose succeeded");
- file_id = H5I_INVALID_HID;
-
- for (i = 0; i < ARRAY_SIZE(tests); i++) {
- test_func func = tests[i];
+ if (MAINPROCESS)
+ printf("== Running tests in mode '%s' with filter '%s' using selection I/O mode "
+ "'%s', '%s' and '%s' allocation time ==\n\n",
+ test_mode_to_string(test_mode), filterNames[cur_filter_idx], sel_io_str,
+ H5FD_MPIO_CHUNK_ONE_IO == chunk_opt ? "Linked-Chunk I/O"
+ : "Multi-Chunk I/O",
+ alloc_time);
+
+ /* Make sure current filter is available before testing with it */
+ filter_avail = H5Zfilter_avail(cur_filter);
+ VRFY((filter_avail >= 0), "H5Zfilter_avail succeeded");
+
+ if (!filter_avail) {
+ if (MAINPROCESS)
+ printf(" ** SKIPPED tests with filter '%s' - filter unavailable **\n\n",
+ filterNames[cur_filter_idx]);
+ continue;
+ }
+
+ /* Get the current filter's info */
+ VRFY((H5Zget_filter_info(cur_filter, &filter_config) >= 0),
+ "H5Zget_filter_info succeeded");
+
+ /* Determine if filter is encode-enabled */
+ if (0 == (filter_config & H5Z_FILTER_CONFIG_ENCODE_ENABLED)) {
+ if (MAINPROCESS)
+ printf(
+ " ** SKIPPED tests with filter '%s' - filter not encode-enabled **\n\n",
+ filterNames[cur_filter_idx]);
+ continue;
+ }
+
+ /* Set space allocation time */
+ VRFY((H5Pset_alloc_time(dcpl_id, space_alloc_time) >= 0),
+ "H5Pset_alloc_time succeeded");
+
+ /* Set selection I/O mode */
+ VRFY((H5Pset_selection_io(dxpl_id, sel_io_mode) >= 0),
+ "H5Pset_selection_io succeeded");
+
+ /* Set chunk I/O optimization method */
+ VRFY((H5Pset_dxpl_mpio_chunk_opt(dxpl_id, chunk_opt) >= 0),
+ "H5Pset_dxpl_mpio_chunk_opt succeeded");
+
+ /* Create a group to hold all the datasets for this combination
+ * of filter and chunk optimization mode. Then, close the file
+ * again since some tests may need to open the file in a special
+ * way, like on rank 0 only */
+ file_id = H5Fopen(filenames[0], H5F_ACC_RDWR, fapl_id);
+ VRFY((file_id >= 0), "H5Fopen succeeded");
+
+ snprintf(group_name, sizeof(group_name), "%s_sel-io-%s_%s_%s_%s",
+ filterNames[cur_filter_idx], sel_io_str,
+ H5FD_MPIO_CHUNK_ONE_IO == chunk_opt ? "linked-chunk-io" : "multi-chunk-io",
+ alloc_time, mode);
+
+ group_id = H5Gcreate2(file_id, group_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ VRFY((group_id >= 0), "H5Gcreate2 succeeded");
+
+ VRFY((H5Gclose(group_id) >= 0), "H5Gclose failed");
+ group_id = H5I_INVALID_HID;
+
+ VRFY((H5Fclose(file_id) >= 0), "H5Fclose succeeded");
+ file_id = H5I_INVALID_HID;
+
+ /* Run all tests */
+ for (size_t i = 0; i < ARRAY_SIZE(tests); i++) {
+ test_func func = tests[i];
+
+ if (MPI_SUCCESS == (mpi_code = MPI_Barrier(comm))) {
+ func(group_name, cur_filter, fapl_id, dcpl_id, dxpl_id, test_mode);
+ }
+ else {
+ if (MAINPROCESS)
+ MESG("MPI_Barrier failed");
+ nerrors++;
+ }
+ }
- if (MPI_SUCCESS == (mpi_code = MPI_Barrier(comm))) {
- func(group_name, cur_filter, fapl_id, dcpl_id, dxpl_id);
- }
- else {
if (MAINPROCESS)
- MESG("MPI_Barrier failed");
- nerrors++;
+ puts("");
}
}
-
- if (MAINPROCESS)
- HDputs("");
}
}
}
@@ -8793,7 +9999,7 @@ main(int argc, char **argv)
goto exit;
if (MAINPROCESS)
- HDputs("All Parallel Filters tests passed\n");
+ puts("All Parallel Filters tests passed\n");
exit:
if (nerrors)
diff --git a/testpar/t_filters_parallel.h b/testpar/t_filters_parallel.h
index e110d0e0b96..c0b1db878f9 100644
--- a/testpar/t_filters_parallel.h
+++ b/testpar/t_filters_parallel.h
@@ -58,6 +58,11 @@ size_t cd_nelmts = FILTER_NUM_CDVALUES;
#define DIM0_SCALE_FACTOR 4
#define DIM1_SCALE_FACTOR 2
+/* The maximum number of datasets to work on simultaneously
+ * when using H5Dwrite_multi/H5Dread_multi
+ */
+#define MAX_NUM_DSETS_MULTI 5
+
/* Struct type for the compound datatype filtered dataset tests */
typedef struct {
short field1;
diff --git a/testpar/t_init_term.c b/testpar/t_init_term.c
index 929bb59890d..0268e3d9eca 100644
--- a/testpar/t_init_term.c
+++ b/testpar/t_init_term.c
@@ -37,11 +37,9 @@ main(int argc, char **argv)
MPI_Finalize();
- nerrors += GetTestNumErrs();
-
/* test if we can initialize the library with MPI being finalized
and create a file serially */
- H5open();
+ VRFY((H5open() >= 0), "H5open succeeded");
if (mpi_rank == 0) {
char filename[1024];
@@ -54,7 +52,7 @@ main(int argc, char **argv)
file_id = -1;
}
- H5close();
+ VRFY((H5close() >= 0), "H5close succeeded");
if (MAINPROCESS) {
if (0 == nerrors)
diff --git a/testpar/t_mdset.c b/testpar/t_mdset.c
index bc6305eaddd..582e4412c7f 100644
--- a/testpar/t_mdset.c
+++ b/testpar/t_mdset.c
@@ -182,7 +182,7 @@ multiple_dset_write(void)
VRFY((ret >= 0), "set fill-value succeeded");
for (n = 0; n < ndatasets; n++) {
- HDsnprintf(dname, sizeof(dname), "dataset %d", n);
+ snprintf(dname, sizeof(dname), "dataset %d", n);
dataset = H5Dcreate2(iof, dname, H5T_NATIVE_DOUBLE, filespace, H5P_DEFAULT, dcpl, H5P_DEFAULT);
VRFY((dataset > 0), dname);
@@ -224,7 +224,7 @@ compact_dataset(void)
herr_t ret;
const char *filename;
#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
- hbool_t prop_value;
+ bool prop_value;
#endif
size = get_size();
@@ -314,10 +314,10 @@ compact_dataset(void)
VRFY((ret >= 0), "H5Dread succeeded");
#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
- prop_value = FALSE;
+ prop_value = false;
ret = H5Pget(dxpl, H5D_XFER_COLL_RANK0_BCAST_NAME, &prop_value);
VRFY((ret >= 0), "H5Pget succeeded");
- VRFY((prop_value == FALSE && dxfer_coll_type == DXFER_COLLECTIVE_IO),
+ VRFY((prop_value == false && dxfer_coll_type == DXFER_COLLECTIVE_IO),
"rank 0 Bcast optimization was performed for a compact dataset");
#endif /* H5_HAVE_INSTRUMENTED_LIBRARY */
@@ -588,7 +588,7 @@ dataset_fillvalue(void)
herr_t ret; /* Generic return value */
const char *filename;
#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
- hbool_t prop_value;
+ bool prop_value;
#endif
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
@@ -656,13 +656,13 @@ dataset_fillvalue(void)
VRFY((ret >= 0), "H5Dread succeeded");
#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
- prop_value = FALSE;
+ prop_value = false;
ret = H5Pget(dxpl, H5D_XFER_COLL_RANK0_BCAST_NAME, &prop_value);
VRFY((ret >= 0), "testing property list get succeeded");
if (ii == 0)
- VRFY((prop_value == FALSE), "correctly handled rank 0 Bcast");
+ VRFY((prop_value == false), "correctly handled rank 0 Bcast");
else
- VRFY((prop_value == TRUE), "correctly handled rank 0 Bcast");
+ VRFY((prop_value == true), "correctly handled rank 0 Bcast");
#endif /* H5_HAVE_INSTRUMENTED_LIBRARY */
/* Verify all data read are the fill value 0 */
@@ -746,13 +746,13 @@ dataset_fillvalue(void)
VRFY((ret >= 0), "H5Dread succeeded");
#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
- prop_value = FALSE;
+ prop_value = false;
ret = H5Pget(dxpl, H5D_XFER_COLL_RANK0_BCAST_NAME, &prop_value);
VRFY((ret >= 0), "testing property list get succeeded");
if (ii == 0)
- VRFY((prop_value == FALSE), "correctly handled rank 0 Bcast");
+ VRFY((prop_value == false), "correctly handled rank 0 Bcast");
else
- VRFY((prop_value == TRUE), "correctly handled rank 0 Bcast");
+ VRFY((prop_value == true), "correctly handled rank 0 Bcast");
#endif /* H5_HAVE_INSTRUMENTED_LIBRARY */
/* Verify correct data read */
@@ -877,11 +877,11 @@ collective_group_write(void)
/* creates ngroups groups under the root group, writes chunked
* datasets in parallel. */
for (m = 0; m < ngroups; m++) {
- HDsnprintf(gname, sizeof(gname), "group%d", m);
+ snprintf(gname, sizeof(gname), "group%d", m);
gid = H5Gcreate2(fid, gname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
VRFY((gid > 0), gname);
- HDsnprintf(dname, sizeof(dname), "dataset%d", m);
+ snprintf(dname, sizeof(dname), "dataset%d", m);
did = H5Dcreate2(gid, dname, H5T_NATIVE_INT, filespace, H5P_DEFAULT, dcpl, H5P_DEFAULT);
VRFY((did > 0), dname);
@@ -936,7 +936,7 @@ independent_group_read(void)
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
plist = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type);
- H5Pset_all_coll_metadata_ops(plist, FALSE);
+ H5Pset_all_coll_metadata_ops(plist, false);
fid = H5Fopen(filename, H5F_ACC_RDONLY, plist);
VRFY((fid > 0), "H5Fopen");
@@ -978,12 +978,12 @@ group_dataset_read(hid_t fid, int mpi_rank, int m)
VRFY((outdata != NULL), "malloc succeeded for outdata");
/* open every group under root group. */
- HDsnprintf(gname, sizeof(gname), "group%d", m);
+ snprintf(gname, sizeof(gname), "group%d", m);
gid = H5Gopen2(fid, gname, H5P_DEFAULT);
VRFY((gid > 0), gname);
/* check the data. */
- HDsnprintf(dname, sizeof(dname), "dataset%d", m);
+ snprintf(dname, sizeof(dname), "dataset%d", m);
did = H5Dopen2(gid, dname, H5P_DEFAULT);
VRFY((did > 0), dname);
@@ -1079,7 +1079,7 @@ multiple_group_write(void)
/* creates ngroups groups under the root group, writes datasets in
* parallel. */
for (m = 0; m < ngroups; m++) {
- HDsnprintf(gname, sizeof(gname), "group%d", m);
+ snprintf(gname, sizeof(gname), "group%d", m);
gid = H5Gcreate2(fid, gname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
VRFY((gid > 0), gname);
@@ -1135,7 +1135,7 @@ write_dataset(hid_t memspace, hid_t filespace, hid_t gid)
VRFY((outme != NULL), "malloc succeeded for outme");
for (n = 0; n < NDATASET; n++) {
- HDsnprintf(dname, sizeof(dname), "dataset%d", n);
+ snprintf(dname, sizeof(dname), "dataset%d", n);
did = H5Dcreate2(gid, dname, H5T_NATIVE_INT, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
VRFY((did > 0), dname);
@@ -1173,7 +1173,7 @@ create_group_recursive(hid_t memspace, hid_t filespace, hid_t gid, int counter)
}
#endif /* BARRIER_CHECKS */
- HDsnprintf(gname, sizeof(gname), "%dth_child_group", counter + 1);
+ snprintf(gname, sizeof(gname), "%dth_child_group", counter + 1);
child_gid = H5Gcreate2(gid, gname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
VRFY((child_gid > 0), gname);
@@ -1227,7 +1227,7 @@ multiple_group_read(void)
/* open every group under root group. */
for (m = 0; m < ngroups; m++) {
- HDsnprintf(gname, sizeof(gname), "group%d", m);
+ snprintf(gname, sizeof(gname), "group%d", m);
gid = H5Gopen2(fid, gname, H5P_DEFAULT);
VRFY((gid > 0), gname);
@@ -1284,7 +1284,7 @@ read_dataset(hid_t memspace, hid_t filespace, hid_t gid)
VRFY((outdata != NULL), "malloc succeeded for outdata");
for (n = 0; n < NDATASET; n++) {
- HDsnprintf(dname, sizeof(dname), "dataset%d", n);
+ snprintf(dname, sizeof(dname), "dataset%d", n);
did = H5Dopen2(gid, dname, H5P_DEFAULT);
VRFY((did > 0), dname);
@@ -1335,7 +1335,7 @@ recursive_read_group(hid_t memspace, hid_t filespace, hid_t gid, int counter)
nerrors += err_num;
if (counter < GROUP_DEPTH) {
- HDsnprintf(gname, sizeof(gname), "%dth_child_group", counter + 1);
+ snprintf(gname, sizeof(gname), "%dth_child_group", counter + 1);
child_gid = H5Gopen2(gid, gname, H5P_DEFAULT);
VRFY((child_gid > 0), gname);
recursive_read_group(memspace, filespace, child_gid, counter + 1);
@@ -1357,7 +1357,7 @@ write_attribute(hid_t obj_id, int this_type, int num)
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
if (this_type == is_group) {
- HDsnprintf(attr_name, sizeof(attr_name), "Group Attribute %d", num);
+ snprintf(attr_name, sizeof(attr_name), "Group Attribute %d", num);
sid = H5Screate(H5S_SCALAR);
aid = H5Acreate2(obj_id, attr_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT);
H5Awrite(aid, H5T_NATIVE_INT, &num);
@@ -1365,7 +1365,7 @@ write_attribute(hid_t obj_id, int this_type, int num)
H5Sclose(sid);
} /* end if */
else if (this_type == is_dset) {
- HDsnprintf(attr_name, sizeof(attr_name), "Dataset Attribute %d", num);
+ snprintf(attr_name, sizeof(attr_name), "Dataset Attribute %d", num);
for (i = 0; i < 8; i++)
attr_data[i] = i;
sid = H5Screate_simple(dspace_rank, dspace_dims, NULL);
@@ -1388,14 +1388,14 @@ read_attribute(hid_t obj_id, int this_type, int num)
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
if (this_type == is_group) {
- HDsnprintf(attr_name, sizeof(attr_name), "Group Attribute %d", num);
+ snprintf(attr_name, sizeof(attr_name), "Group Attribute %d", num);
aid = H5Aopen(obj_id, attr_name, H5P_DEFAULT);
H5Aread(aid, H5T_NATIVE_INT, &in_num);
vrfy_errors = dataset_vrfy(NULL, NULL, NULL, group_block, &in_num, &num);
H5Aclose(aid);
}
else if (this_type == is_dset) {
- HDsnprintf(attr_name, sizeof(attr_name), "Dataset Attribute %d", num);
+ snprintf(attr_name, sizeof(attr_name), "Dataset Attribute %d", num);
for (i = 0; i < 8; i++)
out_data[i] = i;
aid = H5Aopen(obj_id, attr_name, H5P_DEFAULT);
@@ -1516,7 +1516,7 @@ io_mode_confusion(void)
*/
const char *fcn_name = "io_mode_confusion";
- const hbool_t verbose = FALSE;
+ const bool verbose = false;
const H5Ptest_param_t *pt;
char *filename;
@@ -1765,8 +1765,8 @@ rr_obj_hdr_flush_confusion(void)
MPI_Comm comm;
/* test bed related variables */
- const char *fcn_name = "rr_obj_hdr_flush_confusion";
- const hbool_t verbose = FALSE;
+ const char *fcn_name = "rr_obj_hdr_flush_confusion";
+ const bool verbose = false;
/* Create two new private communicators from MPI_COMM_WORLD.
* Even and odd ranked processes go to comm_writers and comm_readers
@@ -1806,9 +1806,9 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
{
int i;
int j;
- hid_t file_id = -1;
- hid_t fapl_id = -1;
- hid_t dxpl_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t dxpl_id = H5I_INVALID_HID;
hid_t att_id[NUM_DATA_SETS];
hid_t att_space[NUM_DATA_SETS];
hid_t lg_att_id[NUM_DATA_SETS];
@@ -1843,7 +1843,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
/* test bed related variables */
const char *fcn_name = "rr_obj_hdr_flush_confusion_writer";
- const hbool_t verbose = FALSE;
+ const bool verbose = false;
const H5Ptest_param_t *pt;
char *filename;
@@ -2187,9 +2187,9 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
{
int i;
int j;
- hid_t file_id = -1;
- hid_t fapl_id = -1;
- hid_t dxpl_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t dxpl_id = H5I_INVALID_HID;
hid_t lg_att_id[NUM_DATA_SETS];
hid_t lg_att_type[NUM_DATA_SETS];
hid_t disk_space[NUM_DATA_SETS];
@@ -2222,7 +2222,7 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
/* test bed related variables */
const char *fcn_name = "rr_obj_hdr_flush_confusion_reader";
- const hbool_t verbose = FALSE;
+ const bool verbose = false;
const H5Ptest_param_t *pt;
char *filename;
diff --git a/testpar/t_pflush1.c b/testpar/t_pflush1.c
index 7d8d7fa8c66..a61e6749a53 100644
--- a/testpar/t_pflush1.c
+++ b/testpar/t_pflush1.c
@@ -78,7 +78,7 @@ create_test_file(char *name, size_t name_length, hid_t fapl_id)
if ((top_level_gid = H5Gcreate2(fid, "some_groups", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
for (i = 0; i < N_GROUPS; i++) {
- HDsnprintf(name, name_length, "grp%02u", (unsigned)i);
+ snprintf(name, name_length, "grp%02u", (unsigned)i);
if ((gid = H5Gcreate2(top_level_gid, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
if (H5Gclose(gid) < 0)
@@ -121,14 +121,14 @@ main(int argc, char *argv[])
TESTING("H5Fflush (part1)");
/* Don't run using the split VFD */
- envval = HDgetenv(HDF5_DRIVER);
+ envval = getenv(HDF5_DRIVER);
if (envval == NULL)
envval = "nomatch";
- if (!HDstrcmp(envval, "split")) {
+ if (!strcmp(envval, "split")) {
if (mpi_rank == 0) {
SKIPPED();
- HDputs(" Test not compatible with current Virtual File Driver");
+ puts(" Test not compatible with current Virtual File Driver");
}
MPI_Finalize();
exit(EXIT_FAILURE);
diff --git a/testpar/t_pflush2.c b/testpar/t_pflush2.c
index 81ed2bd6b69..95ad1257801 100644
--- a/testpar/t_pflush2.c
+++ b/testpar/t_pflush2.c
@@ -82,7 +82,7 @@ check_test_file(char *name, size_t name_length, hid_t fapl_id)
if ((top_level_gid = H5Gopen2(fid, "some_groups", H5P_DEFAULT)) < 0)
goto error;
for (i = 0; i < N_GROUPS; i++) {
- HDsnprintf(name, name_length, "grp%02u", (unsigned)i);
+ snprintf(name, name_length, "grp%02u", (unsigned)i);
if ((gid = H5Gopen2(top_level_gid, name, H5P_DEFAULT)) < 0)
goto error;
if (H5Gclose(gid) < 0)
@@ -146,14 +146,14 @@ main(int argc, char *argv[])
TESTING("H5Fflush (part2 with flush)");
/* Don't run using the split VFD */
- envval = HDgetenv(HDF5_DRIVER);
+ envval = getenv(HDF5_DRIVER);
if (envval == NULL)
envval = "nomatch";
- if (!HDstrcmp(envval, "split")) {
+ if (!strcmp(envval, "split")) {
if (mpi_rank == 0) {
SKIPPED();
- HDputs(" Test not compatible with current Virtual File Driver");
+ puts(" Test not compatible with current Virtual File Driver");
}
MPI_Finalize();
exit(EXIT_SUCCESS);
diff --git a/testpar/t_pmulti_dset.c b/testpar/t_pmulti_dset.c
index 8d7fdef16ce..4d8bc7707ec 100644
--- a/testpar/t_pmulti_dset.c
+++ b/testpar/t_pmulti_dset.c
@@ -68,8 +68,8 @@ unsigned seed;
int nerrors = 0;
/* Whether these filters are available */
-htri_t deflate_avail = FALSE;
-htri_t fletcher32_avail = FALSE;
+htri_t deflate_avail = false;
+htri_t fletcher32_avail = false;
/*-------------------------------------------------------------------------
* Function: test_pmdset
@@ -102,10 +102,10 @@ test_pmdset(size_t niter, unsigned flags)
size_t max_dsets;
size_t buf_size;
size_t ndsets;
- hid_t file_id = -1;
- hid_t fapl_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t fapl_id = H5I_INVALID_HID;
hid_t dcpl_id[MAX_DSETS];
- hid_t dxpl_id = -1;
+ hid_t dxpl_id = H5I_INVALID_HID;
hsize_t dset_dims[MAX_DSETS][3];
hsize_t chunk_dims[2];
hsize_t max_dims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
@@ -119,9 +119,9 @@ test_pmdset(size_t niter, unsigned flags)
unsigned *efbufi[MAX_DSETS][MAX_DSET_X];
unsigned char *dset_usage;
unsigned char *dset_usagei[MAX_DSETS][MAX_DSET_X];
- hbool_t do_read;
- hbool_t last_read;
- hbool_t overlap;
+ bool do_read;
+ bool last_read;
+ bool overlap;
hsize_t start[MAX_HS][3];
hsize_t count[MAX_HS][3];
hsize_t points[3 * MAX_POINTS];
@@ -276,7 +276,7 @@ test_pmdset(size_t niter, unsigned flags)
/* Create datasets */
for (j = 0; j < ndsets; j++) {
- hbool_t use_chunk =
+ bool use_chunk =
(flags & MDSET_FLAG_CHUNK) || ((flags & MDSET_FLAG_MLAYOUT) && (j == 1 || j == 2));
/* Generate file dataspace */
@@ -318,14 +318,14 @@ test_pmdset(size_t niter, unsigned flags)
/* Initialize expected file buffer */
(void)memset(efbuf, 0, buf_size);
- /* Set last_read to TRUE so we don't reopen the file on the first
+ /* Set last_read to true so we don't reopen the file on the first
* iteration */
- last_read = TRUE;
+ last_read = true;
/* Perform read/write operations */
for (j = 0; j < OPS_PER_FILE; j++) {
/* Decide whether to read or write */
- do_read = (hbool_t)(HDrandom() % 2);
+ do_read = (bool)(HDrandom() % 2);
/* Barrier to ensure processes have finished the previous operation
*/
@@ -398,7 +398,7 @@ test_pmdset(size_t niter, unsigned flags)
: dset_dims[k][1]; /* Determine maximum hyperslab size in Y */
for (m = 0; m < nhs; m++) {
- overlap = TRUE;
+ overlap = true;
for (n = 0; overlap && (n < MAX_SEL_RETRIES); n++) {
/* Generate hyperslab */
count[m][0] = (hsize_t)(((hsize_t)HDrandom() % max_hs_x) + 1);
@@ -411,13 +411,13 @@ test_pmdset(size_t niter, unsigned flags)
: (hsize_t)HDrandom() % (dset_dims[k][1] - count[m][1] + 1);
/* If writing, check for overlap with other processes */
- overlap = FALSE;
+ overlap = false;
if (!do_read)
for (o = start[m][0]; (o < (start[m][0] + count[m][0])) && !overlap; o++)
for (p = start[m][1]; (p < (start[m][1] + count[m][1])) && !overlap;
p++)
if (dset_usagei[k][o][p])
- overlap = TRUE;
+ overlap = true;
} /* end for */
/* If we did not find a non-overlapping hyperslab
@@ -470,7 +470,7 @@ test_pmdset(size_t niter, unsigned flags)
/* Generate points */
for (m = 0; m < npoints; m++) {
- overlap = TRUE;
+ overlap = true;
for (n = 0; overlap && (n < MAX_SEL_RETRIES); n++) {
/* Generate point */
points[2 * m] = (unsigned)((hsize_t)HDrandom() % dset_dims[k][0]);
@@ -478,9 +478,9 @@ test_pmdset(size_t niter, unsigned flags)
/* Check for overlap with other processes (write) or this process
* (always) */
- overlap = FALSE;
+ overlap = false;
if (dset_usagei[k][points[2 * m]][points[(2 * m) + 1]])
- overlap = TRUE;
+ overlap = true;
} /* end for */
/* If we did not find a non-overlapping point quit
diff --git a/testpar/t_pread.c b/testpar/t_pread.c
index 1aefcecd52c..b16675bd452 100644
--- a/testpar/t_pread.c
+++ b/testpar/t_pread.c
@@ -34,9 +34,9 @@ const char *FILENAMES[NFILENAME + 1] = {"reloc_t_pread_data_file", "reloc_t_prea
#define LIMIT_NPROC 6
-hbool_t pass = TRUE;
+bool pass = true;
static const char *random_hdf5_text = "Now is the time for all first-time-users of HDF5 to read their \
-manual or go thru the tutorials!\n\
+manual or go through the tutorials!\n\
While you\'re at it, now is also the time to read up on MPI-IO.";
static const char *hitchhiker_quote = "A common mistake that people make when trying to design something\n\
@@ -92,30 +92,30 @@ generate_test_file(MPI_Comm comm, int mpi_rank, int group_id)
hsize_t i;
hsize_t offset;
hsize_t dims[1] = {0};
- hid_t file_id = -1;
- hid_t memspace = -1;
- hid_t filespace = -1;
- hid_t fctmpl = -1;
- hid_t fapl_id = -1;
- hid_t dxpl_id = -1;
- hid_t dset_id = -1;
- hid_t dset_id_ch = -1;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t memspace = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
+ hid_t fctmpl = H5I_INVALID_HID;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t dxpl_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t dset_id_ch = H5I_INVALID_HID;
hid_t dcpl_id = H5P_DEFAULT;
hsize_t chunk[1];
float nextValue;
float *data_slice = NULL;
- pass = TRUE;
+ pass = true;
assert(comm != MPI_COMM_NULL);
if ((MPI_Comm_rank(comm, &group_rank)) != MPI_SUCCESS) {
- pass = FALSE;
+ pass = false;
failure_mssg = "generate_test_file: MPI_Comm_rank failed.\n";
}
if ((MPI_Comm_size(comm, &group_size)) != MPI_SUCCESS) {
- pass = FALSE;
+ pass = false;
failure_mssg = "generate_test_file: MPI_Comm_size failed.\n";
}
@@ -151,7 +151,7 @@ generate_test_file(MPI_Comm comm, int mpi_rank, int group_id)
/* Assign the 'data_filename' */
if (h5_fixname(group_filename, H5P_DEFAULT, data_filename, sizeof(data_filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname(0) failed.\n";
}
}
@@ -159,7 +159,7 @@ generate_test_file(MPI_Comm comm, int mpi_rank, int group_id)
/* setup data to write */
if (pass) {
if ((data_slice = (float *)malloc(COUNT * sizeof(float))) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "malloc of data_slice failed.\n";
}
}
@@ -176,25 +176,25 @@ generate_test_file(MPI_Comm comm, int mpi_rank, int group_id)
/* Initialize a file creation template */
if (pass) {
if ((fctmpl = H5Pcreate(H5P_FILE_CREATE)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pcreate(H5P_FILE_CREATE) failed.\n";
}
else if (H5Pset_userblock(fctmpl, 512) != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_userblock(,size) failed.\n";
}
}
/* setup FAPL */
if (pass) {
if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pcreate(H5P_FILE_ACCESS) failed.\n";
}
}
if (pass) {
if ((H5Pset_fapl_mpio(fapl_id, comm, MPI_INFO_NULL)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_fapl_mpio() failed\n";
}
}
@@ -202,7 +202,7 @@ generate_test_file(MPI_Comm comm, int mpi_rank, int group_id)
/* create the data file */
if (pass) {
if ((file_id = H5Fcreate(data_filename, H5F_ACC_TRUNC, fctmpl, fapl_id)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fcreate() failed.\n";
}
}
@@ -210,14 +210,14 @@ generate_test_file(MPI_Comm comm, int mpi_rank, int group_id)
/* create and write the dataset */
if (pass) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pcreate(H5P_DATASET_XFER) failed.\n";
}
}
if (pass) {
if ((H5Pset_dxpl_mpio(dxpl_id, H5FD_MPIO_COLLECTIVE)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_dxpl_mpio() failed.\n";
}
}
@@ -225,7 +225,7 @@ generate_test_file(MPI_Comm comm, int mpi_rank, int group_id)
if (pass) {
dims[0] = COUNT;
if ((memspace = H5Screate_simple(1, dims, NULL)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Screate_simple(1, dims, NULL) failed (1).\n";
}
}
@@ -233,7 +233,7 @@ generate_test_file(MPI_Comm comm, int mpi_rank, int group_id)
if (pass) {
dims[0] *= (hsize_t)group_size;
if ((filespace = H5Screate_simple(1, dims, NULL)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Screate_simple(1, dims, NULL) failed (2).\n";
}
}
@@ -241,7 +241,7 @@ generate_test_file(MPI_Comm comm, int mpi_rank, int group_id)
if (pass) {
offset = (hsize_t)group_rank * (hsize_t)COUNT;
if ((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, &offset, NULL, &count, NULL)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sselect_hyperslab() failed.\n";
}
}
@@ -249,14 +249,14 @@ generate_test_file(MPI_Comm comm, int mpi_rank, int group_id)
if (pass) {
if ((dset_id = H5Dcreate2(file_id, "dataset0", H5T_NATIVE_FLOAT, filespace, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dcreate2() failed.\n";
}
}
if (pass) {
if ((H5Dwrite(dset_id, H5T_NATIVE_FLOAT, memspace, filespace, dxpl_id, data_slice)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dwrite() failed.\n";
}
}
@@ -266,14 +266,14 @@ generate_test_file(MPI_Comm comm, int mpi_rank, int group_id)
if (pass) {
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pcreate() failed.\n";
}
}
if (pass) {
if ((H5Pset_chunk(dcpl_id, 1, chunk)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_chunk() failed.\n";
}
}
@@ -282,27 +282,27 @@ generate_test_file(MPI_Comm comm, int mpi_rank, int group_id)
if ((dset_id_ch = H5Dcreate2(file_id, "dataset0_chunked", H5T_NATIVE_FLOAT, filespace, H5P_DEFAULT,
dcpl_id, H5P_DEFAULT)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dcreate2() failed.\n";
}
}
if (pass) {
if ((H5Dwrite(dset_id_ch, H5T_NATIVE_FLOAT, memspace, filespace, dxpl_id, data_slice)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dwrite() failed.\n";
}
}
if (pass || (dcpl_id != -1)) {
if (H5Pclose(dcpl_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pclose(dcpl_id) failed.\n";
}
}
if (pass || (dset_id_ch != -1)) {
if (H5Dclose(dset_id_ch) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dclose(dset_id_ch) failed.\n";
}
}
@@ -310,56 +310,56 @@ generate_test_file(MPI_Comm comm, int mpi_rank, int group_id)
/* close file, etc. */
if (pass || (dset_id != -1)) {
if (H5Dclose(dset_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dclose(dset_id) failed.\n";
}
}
if (pass || (memspace != -1)) {
if (H5Sclose(memspace) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sclose(memspace) failed.\n";
}
}
if (pass || (filespace != -1)) {
if (H5Sclose(filespace) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sclose(filespace) failed.\n";
}
}
if (pass || (file_id != -1)) {
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose(file_id) failed.\n";
}
}
if (pass || (dxpl_id != -1)) {
if (H5Pclose(dxpl_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pclose(dxpl_id) failed.\n";
}
}
if (pass || (fapl_id != -1)) {
if (H5Pclose(fapl_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pclose(fapl_id) failed.\n";
}
}
if (pass || (fctmpl != -1)) {
if (H5Pclose(fctmpl) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pclose(fctmpl) failed.\n";
}
}
/* Add a userblock to the head of the datafile.
* We will use this to for a functional test of the
- * file open optimization. This is superblock
+ * file open optimization. This superblock
* relocation is done by the rank 0 process associated
* with the communicator being used. For test 1, we
* utilize MPI_COMM_WORLD, so group_rank 0 is the
@@ -379,11 +379,11 @@ generate_test_file(MPI_Comm comm, int mpi_rank, int group_id)
else
text_to_write = hitchhiker_quote;
- bytes_to_write = HDstrlen(text_to_write);
+ bytes_to_write = strlen(text_to_write);
if (pass) {
if ((header = HDopen(data_filename, O_WRONLY)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDopen(data_filename, O_WRONLY) failed.\n";
}
}
@@ -391,14 +391,14 @@ generate_test_file(MPI_Comm comm, int mpi_rank, int group_id)
if (pass) {
HDlseek(header, 0, SEEK_SET);
if (HDwrite(header, text_to_write, bytes_to_write) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unable to write user text into file.\n";
}
}
if (pass || (header > 0)) {
if (HDclose(header) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDclose() failed.\n";
}
}
@@ -413,12 +413,12 @@ generate_test_file(MPI_Comm comm, int mpi_rank, int group_id)
/* This is a global all reduce (NOT group specific) */
if (MPI_Allreduce(&local_failure, &global_failures, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD) != MPI_SUCCESS) {
if (pass) {
- pass = FALSE;
+ pass = false;
failure_mssg = "MPI_Allreduce() failed.\n";
}
}
else if ((pass) && (global_failures > 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "One or more processes report failure.\n";
}
@@ -464,7 +464,7 @@ generate_test_file(MPI_Comm comm, int mpi_rank, int group_id)
*
* The global MPI rank is used for reading and
* writing data for process specific data in the
- * dataset. We do this rather simplisticly, i.e.
+ * dataset. We do this rather simplistically, i.e.
* rank 0: writes/reads 0-9999
* rank 1: writes/reads 1000-1999
* rank 2: writes/reads 2000-2999
@@ -486,14 +486,14 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
int global_failures = 0;
int group_size;
int group_rank;
- hid_t fapl_id = -1;
- hid_t file_id = -1;
- hid_t dset_id = -1;
- hid_t dset_id_ch = -1;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t dset_id_ch = H5I_INVALID_HID;
hid_t dxpl_id = H5P_DEFAULT;
- hid_t memspace = -1;
- hid_t filespace = -1;
- hid_t filetype = -1;
+ hid_t memspace = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
+ hid_t filetype = H5I_INVALID_HID;
size_t filetype_size;
hssize_t dset_size;
hsize_t i;
@@ -503,17 +503,17 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
float nextValue;
float *data_slice = NULL;
- pass = TRUE;
+ pass = true;
assert(comm != MPI_COMM_NULL);
if ((MPI_Comm_rank(comm, &group_rank)) != MPI_SUCCESS) {
- pass = FALSE;
+ pass = false;
failure_mssg = "test_parallel_read: MPI_Comm_rank failed.\n";
}
if ((MPI_Comm_size(comm, &group_size)) != MPI_SUCCESS) {
- pass = FALSE;
+ pass = false;
failure_mssg = "test_parallel_read: MPI_Comm_size failed.\n";
}
@@ -529,7 +529,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
/* allocate space for the data_slice array */
if (pass) {
if ((data_slice = (float *)malloc(COUNT * sizeof(float))) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "malloc of data_slice failed.\n";
}
}
@@ -551,7 +551,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
if (h5_fixname(group_filename, H5P_DEFAULT, reloc_data_filename, sizeof(reloc_data_filename)) ==
NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname(1) failed.\n";
}
}
@@ -559,14 +559,14 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
/* setup FAPL */
if (pass) {
if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pcreate(H5P_FILE_ACCESS) failed.\n";
}
}
if (pass) {
if ((H5Pset_fapl_mpio(fapl_id, comm, MPI_INFO_NULL)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_fapl_mpio() failed\n";
}
}
@@ -574,7 +574,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
/* open the file -- should have user block, exercising the optimization */
if (pass) {
if ((file_id = H5Fopen(reloc_data_filename, H5F_ACC_RDONLY, fapl_id)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fopen() failed\n";
}
}
@@ -582,7 +582,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
/* open the data set */
if (pass) {
if ((dset_id = H5Dopen2(file_id, "dataset0", H5P_DEFAULT)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dopen2() failed\n";
}
}
@@ -590,7 +590,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
/* open the chunked data set */
if (pass) {
if ((dset_id_ch = H5Dopen2(file_id, "dataset0_chunked", H5P_DEFAULT)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dopen2() failed\n";
}
}
@@ -599,7 +599,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
if (pass) {
dims[0] = count;
if ((memspace = H5Screate_simple(1, dims, NULL)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Screate_simple(1, dims, NULL) failed\n";
}
}
@@ -607,7 +607,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
/* setup filespace */
if (pass) {
if ((filespace = H5Dget_space(dset_id)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dget_space(dataset) failed\n";
}
}
@@ -615,7 +615,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
if (pass) {
offset = (hsize_t)group_rank * count;
if ((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, &offset, NULL, &count, NULL)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sselect_hyperslab() failed\n";
}
}
@@ -623,7 +623,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
/* read this processes section of the data */
if (pass) {
if ((H5Dread(dset_id, H5T_NATIVE_FLOAT, memspace, filespace, H5P_DEFAULT, data_slice)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dread() failed\n";
}
}
@@ -638,7 +638,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
* the compiler.
*/
if ((data_slice[i] > nextValue) || (data_slice[i] < nextValue)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected dset contents.\n";
}
nextValue += 1;
@@ -648,14 +648,14 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
if (pass || (memspace != -1)) {
if (H5Sclose(memspace) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sclose(memspace) failed.\n";
}
}
if (pass || (filespace != -1)) {
if (H5Sclose(filespace) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sclose(filespace) failed.\n";
}
}
@@ -674,49 +674,49 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
if (group_size <= LIMIT_NPROC) {
#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
- hbool_t prop_value;
+ bool prop_value;
#endif /* H5_HAVE_INSTRUMENTED_LIBRARY */
if ((filespace = H5Dget_space(dset_id)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dget_space failed.\n";
}
if ((dset_size = H5Sget_simple_extent_npoints(filespace)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sget_simple_extent_npoints failed.\n";
}
if ((filetype = H5Dget_type(dset_id)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dget_type failed.\n";
}
if ((filetype_size = H5Tget_size(filetype)) == 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Tget_size failed.\n";
}
if (H5Tclose(filetype) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Tclose failed.\n";
};
if ((data_slice = (float *)malloc((size_t)dset_size * filetype_size)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "malloc of data_slice failed.\n";
}
if (pass) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pcreate(H5P_DATASET_XFER) failed.\n";
}
}
if (pass) {
if ((H5Pset_dxpl_mpio(dxpl_id, H5FD_MPIO_COLLECTIVE)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_dxpl_mpio() failed.\n";
}
}
@@ -726,7 +726,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
prop_value = H5D_XFER_COLL_RANK0_BCAST_DEF;
if (H5Pinsert2(dxpl_id, H5D_XFER_COLL_RANK0_BCAST_NAME, H5D_XFER_COLL_RANK0_BCAST_SIZE,
&prop_value, NULL, NULL, NULL, NULL, NULL, NULL) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pinsert2() failed\n";
}
}
@@ -735,21 +735,21 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
/* read H5S_ALL section */
if (pass) {
if ((H5Dread(dset_id, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, dxpl_id, data_slice)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dread() failed\n";
}
}
#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
if (pass) {
- prop_value = FALSE;
+ prop_value = false;
if (H5Pget(dxpl_id, H5D_XFER_COLL_RANK0_BCAST_NAME, &prop_value) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pget() failed\n";
}
if (pass) {
- if (prop_value != TRUE) {
- pass = FALSE;
+ if (prop_value != true) {
+ pass = false;
failure_mssg = "rank 0 Bcast optimization was mistakenly not performed\n";
}
}
@@ -773,7 +773,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
* the compiler.
*/
if ((data_slice[i] > nextValue) || (data_slice[i] < nextValue)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected dset contents.\n";
}
nextValue += 1;
@@ -787,7 +787,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
if (pass) {
prop_value = H5D_XFER_COLL_RANK0_BCAST_DEF;
if (H5Pset(dxpl_id, H5D_XFER_COLL_RANK0_BCAST_NAME, &prop_value) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset() failed\n";
}
}
@@ -798,21 +798,21 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
}
if (pass) {
if ((H5Dread(dset_id_ch, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, dxpl_id, data_slice)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dread() failed\n";
}
}
#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
if (pass) {
- prop_value = FALSE;
+ prop_value = false;
if (H5Pget(dxpl_id, H5D_XFER_COLL_RANK0_BCAST_NAME, &prop_value) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pget() failed\n";
}
if (pass) {
- if (prop_value == TRUE) {
- pass = FALSE;
+ if (prop_value == true) {
+ pass = false;
failure_mssg = "rank 0 Bcast optimization was mistakenly performed for chunked dataset\n";
}
}
@@ -836,7 +836,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
* the compiler.
*/
if ((data_slice[i] > nextValue) || (data_slice[i] < nextValue)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected chunked dset contents.\n";
}
nextValue += 1;
@@ -846,7 +846,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
if (pass || (filespace != -1)) {
if (H5Sclose(filespace) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sclose(filespace) failed.\n";
}
}
@@ -862,7 +862,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
*/
if ((data_slice = (float *)malloc((size_t)(dset_size * 2) * filetype_size)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "malloc of data_slice failed.\n";
}
@@ -870,14 +870,14 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
if (pass) {
dims[0] = (hsize_t)dset_size * 2;
if ((memspace = H5Screate_simple(1, dims, NULL)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Screate_simple(1, dims, NULL) failed\n";
}
}
if (pass) {
offset = (hsize_t)dset_size;
if ((H5Sselect_hyperslab(memspace, H5S_SELECT_SET, &offset, NULL, &offset, NULL)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sselect_hyperslab() failed\n";
}
}
@@ -886,7 +886,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
if (pass) {
prop_value = H5D_XFER_COLL_RANK0_BCAST_DEF;
if (H5Pset(dxpl_id, H5D_XFER_COLL_RANK0_BCAST_NAME, &prop_value) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset() failed\n";
}
}
@@ -895,21 +895,21 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
/* read this processes section of the data */
if (pass) {
if ((H5Dread(dset_id, H5T_NATIVE_FLOAT, memspace, H5S_ALL, dxpl_id, data_slice)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dread() failed\n";
}
}
#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
if (pass) {
- prop_value = FALSE;
+ prop_value = false;
if (H5Pget(dxpl_id, H5D_XFER_COLL_RANK0_BCAST_NAME, &prop_value) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pget() failed\n";
}
if (pass) {
- if (prop_value != TRUE) {
- pass = FALSE;
+ if (prop_value != true) {
+ pass = false;
failure_mssg = "rank 0 Bcast optimization was mistakenly not performed\n";
}
}
@@ -933,7 +933,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
* the compiler.
*/
if ((data_slice[i] > nextValue) || (data_slice[i] < nextValue)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected dset contents.\n";
}
nextValue += 1;
@@ -943,7 +943,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
if (pass || (memspace != -1)) {
if (H5Sclose(memspace) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sclose(memspace) failed.\n";
}
}
@@ -956,7 +956,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
if (pass || (dxpl_id != -1)) {
if (H5Pclose(dxpl_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pclose(dxpl_id) failed.\n";
}
}
@@ -965,28 +965,28 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
/* close file, etc. */
if (pass || (dset_id != -1)) {
if (H5Dclose(dset_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dclose(dset_id) failed.\n";
}
}
if (pass || (dset_id_ch != -1)) {
if (H5Dclose(dset_id_ch) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dclose(dset_id_ch) failed.\n";
}
}
if (pass || (file_id != -1)) {
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose(file_id) failed.\n";
}
}
if (pass || (fapl_id != -1)) {
if (H5Pclose(fapl_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pclose(fapl_id) failed.\n";
}
}
@@ -999,12 +999,12 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
if (MPI_Allreduce(&local_failure, &global_failures, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD) != MPI_SUCCESS) {
if (pass) {
- pass = FALSE;
+ pass = false;
failure_mssg = "MPI_Allreduce() failed.\n";
}
}
else if ((pass) && (global_failures > 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "One or more processes report failure.\n";
}
@@ -1032,7 +1032,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
*
* The test consists of creating two separate HDF datasets
* in which random text is inserted at the start of each
- * file using the 'j5jam' application. This forces the
+ * file using the 'h5jam' application. This forces the
* HDF5 file superblock to a non-zero offset.
* Having created the two independent files, we create two
* non-overlapping MPI groups, each of which is then tasked
@@ -1055,15 +1055,15 @@ main(int argc, char **argv)
MPI_Comm group_comm = MPI_COMM_NULL;
/* I don't believe that argv[0] can ever be NULL.
- * It should thus be safe to dup and save as a check
- * for cmake testing. Note that in our Cmake builds,
+ * It should thus be safe to duplicate and save as a check
+ * for CMake testing. Note that in our CMake builds,
* all executables are located in the same directory.
* We assume (but we'll check) that the h5jam utility
* is in the directory as this executable. If that
* isn't true, then we can use a relative path that
- * should be valid for the autotools environment.
+ * should be valid for the Autotools environment.
*/
- test_argv0 = HDstrdup(argv[0]);
+ test_argv0 = strdup(argv[0]);
if ((MPI_Init(&argc, &argv)) != MPI_SUCCESS) {
fprintf(stderr, "FATAL: Unable to initialize MPI\n");
diff --git a/testpar/t_prop.c b/testpar/t_prop.c
index c6eb99c4cdd..de36abfc23e 100644
--- a/testpar/t_prop.c
+++ b/testpar/t_prop.c
@@ -114,12 +114,12 @@ test_plist_ed(void)
hsize_t max_size[1]; /*data space maximum size */
const char *c_to_f = "x+32";
H5AC_cache_config_t my_cache_config = {H5AC__CURR_CACHE_CONFIG_VERSION,
- TRUE,
- FALSE,
- FALSE,
+ true,
+ false,
+ false,
"temp",
- TRUE,
- FALSE,
+ true,
+ false,
(2 * 2048 * 1024),
0.3,
(64 * 1024 * 1024),
@@ -128,7 +128,7 @@ test_plist_ed(void)
H5C_incr__threshold,
0.8,
3.0,
- TRUE,
+ true,
(8 * 1024 * 1024),
H5C_flash_incr__add_space,
2.0,
@@ -136,10 +136,10 @@ test_plist_ed(void)
H5C_decr__age_out_with_threshold,
0.997,
0.8,
- TRUE,
+ true,
(3 * 1024 * 1024),
3,
- FALSE,
+ false,
0.2,
(256 * 2048),
H5AC__DEFAULT_METADATA_WRITE_STRATEGY};
@@ -285,7 +285,7 @@ test_plist_ed(void)
lcpl = H5Pcreate(H5P_LINK_CREATE);
VRFY((lcpl >= 0), "H5Pcreate succeeded");
- ret = H5Pset_create_intermediate_group(lcpl, TRUE);
+ ret = H5Pset_create_intermediate_group(lcpl, true);
VRFY((ret >= 0), "H5Pset_create_intermediate_group succeeded");
ret = test_encode_decode(lcpl, mpi_rank, recv_proc);
@@ -563,7 +563,7 @@ external_links(void)
/* test opening a group that is to an external link, the external linked
file should inherit the source file's access properties */
- HDsnprintf(link_path, sizeof(link_path), "%s%s%s", group_path, "/", link_name);
+ snprintf(link_path, sizeof(link_path), "%s%s%s", group_path, "/", link_name);
group = H5Gopen2(fid, link_path, H5P_DEFAULT);
VRFY((group >= 0), "H5Gopen succeeded");
ret = H5Gclose(group);
@@ -594,10 +594,10 @@ external_links(void)
VRFY((ret >= 0), "H5Pset_elink_fapl succeeded");
tri_status = H5Lexists(fid, link_path, H5P_DEFAULT);
- VRFY((tri_status == TRUE), "H5Lexists succeeded");
+ VRFY((tri_status == true), "H5Lexists succeeded");
tri_status = H5Lexists(fid, link_path, lapl);
- VRFY((tri_status == TRUE), "H5Lexists succeeded");
+ VRFY((tri_status == true), "H5Lexists succeeded");
group = H5Oopen(fid, link_path, H5P_DEFAULT);
VRFY((group >= 0), "H5Oopen succeeded");
diff --git a/testpar/t_select_io_dset.c b/testpar/t_select_io_dset.c
index daeacf01270..2e6839efcec 100644
--- a/testpar/t_select_io_dset.c
+++ b/testpar/t_select_io_dset.c
@@ -45,7 +45,7 @@ int curr_nerrors = 0;
if (err_result == 0) \
PASSED(); \
else \
- HDputs(" ***TEST FAILED***"); \
+ puts(" ***TEST FAILED***"); \
} \
} while (0)
@@ -153,7 +153,7 @@ set_dxpl(hid_t dxpl, H5D_selection_io_mode_t select_io_mode, H5FD_mpio_xfer_t mp
P_TEST_ERROR;
if (mwbuf)
- if (H5Pset_modify_write_buf(dxpl, TRUE) < 0)
+ if (H5Pset_modify_write_buf(dxpl, true) < 0)
P_TEST_ERROR;
} /* set_dxpl() */
@@ -227,8 +227,8 @@ test_no_type_conv(hid_t fid, unsigned chunked, unsigned dtrans, unsigned mwbuf)
}
/* Generate dataset name */
- HDsnprintf(dset_name, sizeof(dset_name), "no_tconv_%s_%s_%s", chunked ? "chunked" : "contig",
- dtrans ? "xform" : "noxform", mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_name, sizeof(dset_name), "no_tconv_%s_%s_%s", chunked ? "chunked" : "contig",
+ dtrans ? "xform" : "noxform", mwbuf ? "mwbuf" : "nomwbuf");
/* Create dataset */
if ((did = H5Dcreate2(fid, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
@@ -379,8 +379,8 @@ test_no_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
}
/* Generate dataset name */
- HDsnprintf(dset_name, sizeof(dset_name), "no_size_change_%s_%s", chunked ? "chunked" : "contig",
- mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_name, sizeof(dset_name), "no_size_change_%s_%s", chunked ? "chunked" : "contig",
+ mwbuf ? "mwbuf" : "nomwbuf");
/* Create 1d dataset */
if ((did = H5Dcreate2(fid, dset_name, H5T_STD_I32BE, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
@@ -525,8 +525,8 @@ test_larger_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsign
}
/* Generate dataset name */
- HDsnprintf(dset_name, sizeof(dset_name), "larger_no_bkg_%s_%s_%s", chunked ? "chunked" : "contig",
- dtrans ? "xform" : "noxform", mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_name, sizeof(dset_name), "larger_no_bkg_%s_%s_%s", chunked ? "chunked" : "contig",
+ dtrans ? "xform" : "noxform", mwbuf ? "mwbuf" : "nomwbuf");
/* Create 1d chunked dataset with/without data transform */
if ((did = H5Dcreate2(fid, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
@@ -673,8 +673,8 @@ test_smaller_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsig
}
/* Generate dataset name */
- HDsnprintf(dset_name, sizeof(dset_name), "smaller_no_bkg_%s_%s_%s", chunked ? "chunked" : "contig",
- dtrans ? "xform" : "noxform", mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_name, sizeof(dset_name), "smaller_no_bkg_%s_%s_%s", chunked ? "chunked" : "contig",
+ dtrans ? "xform" : "noxform", mwbuf ? "mwbuf" : "nomwbuf");
/* Create 1d chunked dataset with/without data transform */
if ((did = H5Dcreate2(fid, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
@@ -870,8 +870,8 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Case 5(a) */
/* Generate dataset name */
- HDsnprintf(dset_name, sizeof(dset_name), "cmpd_with_bkg_%s_%s", chunked ? "chunked" : "contig",
- mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_name, sizeof(dset_name), "cmpd_with_bkg_%s_%s", chunked ? "chunked" : "contig",
+ mwbuf ? "mwbuf" : "nomwbuf");
/* Create 1d dataset */
if ((did = H5Dcreate2(fid, dset_name, s1_tid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
@@ -1158,8 +1158,8 @@ test_type_conv_sel_empty(hid_t fid, unsigned chunked, unsigned dtrans, unsigned
}
/* Generate dataset name */
- HDsnprintf(dset_name, sizeof(dset_name), "tconv_sel_empty_%s_%s_%s", chunked ? "chunked" : "contig",
- dtrans ? "xform" : "noxform", mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_name, sizeof(dset_name), "tconv_sel_empty_%s_%s_%s", chunked ? "chunked" : "contig",
+ dtrans ? "xform" : "noxform", mwbuf ? "mwbuf" : "nomwbuf");
/* Create dataset */
if ((did = H5Dcreate2(fid, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
@@ -1473,8 +1473,8 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m
P_TEST_ERROR;
/* Generate dataset name */
- HDsnprintf(dset_names[i], sizeof(dset_names[i]), "multi_dset%d_%s_%s_%s", i,
- chunked ? "chunked" : "contig", dtrans ? "xform" : "noxform", mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_names[i], sizeof(dset_names[i]), "multi_dset%d_%s_%s_%s", i,
+ chunked ? "chunked" : "contig", dtrans ? "xform" : "noxform", mwbuf ? "mwbuf" : "nomwbuf");
/* Create ith dataset */
if ((dset_dids[i] =
@@ -1794,8 +1794,8 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
P_TEST_ERROR;
/* Generate dataset name */
- HDsnprintf(dset_names[i], sizeof(dset_names[i]), "multi_cmpd_dset%d_%s_%s", i,
- chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_names[i], sizeof(dset_names[i]), "multi_cmpd_dset%d_%s_%s", i,
+ chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
/* Create ith dataset */
if ((dset_dids[i] =
@@ -2230,8 +2230,8 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
P_TEST_ERROR;
/* Generate dataset name */
- HDsnprintf(dset_names[i], sizeof(dset_names[i]), "multi_size_dset%d_%s_%s", i,
- chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_names[i], sizeof(dset_names[i]), "multi_size_dset%d_%s_%s", i,
+ chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
/* Create ith dataset */
if ((dset_dids[i] = H5Dcreate2(fid, dset_names[i], H5T_STD_I32BE, file_sids[i], H5P_DEFAULT, dcpl,
@@ -2584,8 +2584,8 @@ test_multi_dsets_conv_sel_empty(hid_t fid, unsigned chunked, unsigned dtrans, un
P_TEST_ERROR;
/* Generate dataset name */
- HDsnprintf(dset_names[i], sizeof(dset_names[i]), "multi_sel_dset%d_%s_%s_%s", i,
- chunked ? "chunked" : "contig", dtrans ? "xform" : "noxform", mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_names[i], sizeof(dset_names[i]), "multi_sel_dset%d_%s_%s_%s", i,
+ chunked ? "chunked" : "contig", dtrans ? "xform" : "noxform", mwbuf ? "mwbuf" : "nomwbuf");
if (i == 0) {
if ((dset_dids[i] = H5Dcreate2(fid, dset_names[i], H5T_NATIVE_INT, file_sids[i], H5P_DEFAULT,
@@ -3039,24 +3039,24 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf)
mm = HDrandom() % (int)ndsets;
if (mm == 0) {
dset_types[i] = DSET_WITH_NO_CONV;
- HDsnprintf(dset_names[i], sizeof(dset_names[i]), "multi_all_nconv_dset%d_%s_%s", i,
- chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_names[i], sizeof(dset_names[i]), "multi_all_nconv_dset%d_%s_%s", i,
+ chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
if ((dset_dids[i] = H5Dcreate2(fid, dset_names[i], H5T_NATIVE_INT, file_sids[i], H5P_DEFAULT,
dcpl, H5P_DEFAULT)) < 0)
P_TEST_ERROR;
}
else if (mm == 1) {
dset_types[i] = DSET_WITH_CONV_AND_NO_BKG;
- HDsnprintf(dset_names[i], sizeof(dset_names[i]), "multi_all_conv_nbkg_dset%d_%s_%s", i,
- chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_names[i], sizeof(dset_names[i]), "multi_all_conv_nbkg_dset%d_%s_%s", i,
+ chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
if ((dset_dids[i] = H5Dcreate2(fid, dset_names[i], H5T_NATIVE_LONG, file_sids[i], H5P_DEFAULT,
dcpl, H5P_DEFAULT)) < 0)
P_TEST_ERROR;
}
else {
dset_types[i] = DSET_WITH_CONV_AND_BKG;
- HDsnprintf(dset_names[i], sizeof(dset_names[i]), "multi_all_conv_bkg_dset%d_%s_%s", i,
- chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_names[i], sizeof(dset_names[i]), "multi_all_conv_bkg_dset%d_%s_%s", i,
+ chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
if ((dset_dids[i] = H5Dcreate2(fid, dset_names[i], s1_tid, file_sids[i], H5P_DEFAULT, dcpl,
H5P_DEFAULT)) < 0)
P_TEST_ERROR;
@@ -3407,7 +3407,7 @@ test_no_selection_io_cause_mode(const char *filename, hid_t fapl, uint32_t test_
hid_t sid = H5I_INVALID_HID;
hsize_t dims[1];
hsize_t cdims[1];
- hbool_t is_chunked = FALSE;
+ bool is_chunked = false;
hid_t tid = H5T_NATIVE_INT;
uint32_t no_selection_io_cause_write = 0;
uint32_t no_selection_io_cause_read = 0;
@@ -3464,7 +3464,7 @@ test_no_selection_io_cause_mode(const char *filename, hid_t fapl, uint32_t test_
P_TEST_ERROR;
if (test_mode & TEST_IN_PLACE_TCONV) {
- if (H5Pset_modify_write_buf(dxpl, TRUE) < 0)
+ if (H5Pset_modify_write_buf(dxpl, true) < 0)
P_TEST_ERROR;
}
/* In-place type conversion for read doesn't require modify_write_buf */
@@ -3972,14 +3972,14 @@ main(int argc, char *argv[])
P_TEST_ERROR;
/* Test with contiguous or chunked dataset */
- for (chunked = FALSE; chunked <= TRUE; chunked++) {
+ for (chunked = false; chunked <= true; chunked++) {
/* Data transforms only apply to integer or floating-point datasets */
/* therefore, not all tests are run with data transform */
- for (dtrans = FALSE; dtrans <= TRUE; dtrans++) {
+ for (dtrans = false; dtrans <= true; dtrans++) {
/* Test with and without modify_write_buf turned on */
- for (mwbuf = FALSE; mwbuf <= TRUE; mwbuf++) {
+ for (mwbuf = false; mwbuf <= true; mwbuf++) {
if (MAINPROCESS) {
/* Print configuration message */
diff --git a/testpar/t_shapesame.c b/testpar/t_shapesame.c
index 55e73284ff0..98e307772a9 100644
--- a/testpar/t_shapesame.c
+++ b/testpar/t_shapesame.c
@@ -112,14 +112,14 @@ struct hs_dr_pio_test_vars_t {
static void
hs_dr_pio_test__setup(const int test_num, const int edge_size, const int checker_edge_size,
const int chunk_edge_size, const int small_rank, const int large_rank,
- const hbool_t use_collective_io, const hid_t dset_type, const int express_test,
+ const bool use_collective_io, const hid_t dset_type, const int express_test,
struct hs_dr_pio_test_vars_t *tv_ptr)
{
#if CONTIG_HS_DR_PIO_TEST__SETUP__DEBUG
const char *fcnName = "hs_dr_pio_test__setup()";
#endif /* CONTIG_HS_DR_PIO_TEST__SETUP__DEBUG */
const char *filename;
- hbool_t mis_match = FALSE;
+ bool mis_match = false;
int i;
int mrc;
int mpi_rank; /* needed by the VRFY macro */
@@ -452,7 +452,7 @@ hs_dr_pio_test__setup(const int test_num, const int edge_size, const int checker
/* verify that the correct data was written to the small data set */
expected_value = 0;
- mis_match = FALSE;
+ mis_match = false;
ptr_1 = tv_ptr->small_ds_buf_1;
i = 0;
@@ -460,12 +460,12 @@ hs_dr_pio_test__setup(const int test_num, const int edge_size, const int checker
if (*ptr_1 != expected_value) {
- mis_match = TRUE;
+ mis_match = true;
}
ptr_1++;
expected_value++;
}
- VRFY((mis_match == FALSE), "small ds init data good.");
+ VRFY((mis_match == false), "small ds init data good.");
/* setup selections for writing initial data to the large data set */
@@ -523,7 +523,7 @@ hs_dr_pio_test__setup(const int test_num, const int edge_size, const int checker
/* verify that the correct data was written to the large data set */
expected_value = 0;
- mis_match = FALSE;
+ mis_match = false;
ptr_1 = tv_ptr->large_ds_buf_1;
i = 0;
@@ -531,12 +531,12 @@ hs_dr_pio_test__setup(const int test_num, const int edge_size, const int checker
if (*ptr_1 != expected_value) {
- mis_match = TRUE;
+ mis_match = true;
}
ptr_1++;
expected_value++;
}
- VRFY((mis_match == FALSE), "large ds init data good.");
+ VRFY((mis_match == false), "large ds init data good.");
/* sync with the other processes before changing data */
mrc = MPI_Barrier(MPI_COMM_WORLD);
@@ -684,7 +684,7 @@ contig_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
#if CONTIG_HS_DR_PIO_TEST__D2M_L2S__DEBUG
const char *fcnName = "contig_hs_dr_pio_test__run_test()";
#endif /* CONTIG_HS_DR_PIO_TEST__D2M_L2S__DEBUG */
- hbool_t mis_match = FALSE;
+ bool mis_match = false;
int i, j, k, l;
size_t n;
int mpi_rank; /* needed by the VRFY macro */
@@ -806,7 +806,7 @@ contig_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
* selections as having the same shape.
*/
check = H5Sselect_shape_same(tv_ptr->small_ds_slice_sid, tv_ptr->file_large_ds_sid_0);
- VRFY((check == TRUE), "H5Sselect_shape_same passed");
+ VRFY((check == true), "H5Sselect_shape_same passed");
/* Read selection from disk */
#if CONTIG_HS_DR_PIO_TEST__D2M_L2S__DEBUG
@@ -824,7 +824,7 @@ contig_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
/* verify that expected data is retrieved */
- mis_match = FALSE;
+ mis_match = false;
ptr_1 = tv_ptr->small_ds_slice_buf;
expected_value =
(uint32_t)((i * tv_ptr->edge_size * tv_ptr->edge_size * tv_ptr->edge_size *
@@ -836,7 +836,7 @@ contig_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
if (*ptr_1 != expected_value) {
- mis_match = TRUE;
+ mis_match = true;
}
*ptr_1 = 0; /* zero data for next use */
@@ -845,7 +845,7 @@ contig_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
expected_value++;
}
- VRFY((mis_match == FALSE), "small slice read from large ds data good.");
+ VRFY((mis_match == false), "small slice read from large ds data good.");
(tv_ptr->tests_run)++;
}
@@ -892,7 +892,7 @@ contig_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
#if CONTIG_HS_DR_PIO_TEST__D2M_S2L__DEBUG
const char *fcnName = "contig_hs_dr_pio_test__d2m_s2l()";
#endif /* CONTIG_HS_DR_PIO_TEST__D2M_S2L__DEBUG */
- hbool_t mis_match = FALSE;
+ bool mis_match = false;
int i, j, k, l;
size_t n;
int mpi_rank; /* needed by the VRFY macro */
@@ -1035,7 +1035,7 @@ contig_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
* selections as having the same shape.
*/
check = H5Sselect_shape_same(tv_ptr->file_small_ds_sid_0, tv_ptr->mem_large_ds_sid);
- VRFY((check == TRUE), "H5Sselect_shape_same passed");
+ VRFY((check == true), "H5Sselect_shape_same passed");
/* Read selection from disk */
#if CONTIG_HS_DR_PIO_TEST__D2M_S2L__DEBUG
@@ -1071,7 +1071,7 @@ contig_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
if (*ptr_1 != expected_value) {
- mis_match = TRUE;
+ mis_match = true;
}
expected_value++;
}
@@ -1079,7 +1079,7 @@ contig_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
if (*ptr_1 != 0) {
- mis_match = TRUE;
+ mis_match = true;
}
}
/* zero out the value for the next pass */
@@ -1088,7 +1088,7 @@ contig_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
ptr_1++;
}
- VRFY((mis_match == FALSE), "small slice read from large ds data good.");
+ VRFY((mis_match == false), "small slice read from large ds data good.");
(tv_ptr->tests_run)++;
}
@@ -1137,7 +1137,7 @@ contig_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
#if CONTIG_HS_DR_PIO_TEST__M2D_L2S__DEBUG
const char *fcnName = "contig_hs_dr_pio_test__m2d_l2s()";
#endif /* CONTIG_HS_DR_PIO_TEST__M2D_L2S__DEBUG */
- hbool_t mis_match = FALSE;
+ bool mis_match = false;
int i, j, k, l;
size_t n;
int mpi_rank; /* needed by the VRFY macro */
@@ -1301,7 +1301,7 @@ contig_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
* on disk full square selections as having the same shape.
*/
check = H5Sselect_shape_same(tv_ptr->file_small_ds_sid_0, tv_ptr->mem_large_ds_sid);
- VRFY((check == TRUE), "H5Sselect_shape_same passed.");
+ VRFY((check == true), "H5Sselect_shape_same passed.");
/* write the slice from the in memory large data set to the
* slice of the on disk small dataset. */
@@ -1324,7 +1324,7 @@ contig_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
/* verify that expected data is retrieved */
- mis_match = FALSE;
+ mis_match = false;
ptr_1 = tv_ptr->small_ds_buf_1;
expected_value =
@@ -1345,7 +1345,7 @@ contig_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
if (*ptr_1 != expected_value) {
- mis_match = TRUE;
+ mis_match = true;
}
expected_value++;
}
@@ -1353,7 +1353,7 @@ contig_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
if (*ptr_1 != 0) {
- mis_match = TRUE;
+ mis_match = true;
}
}
/* zero out the value for the next pass */
@@ -1362,7 +1362,7 @@ contig_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
ptr_1++;
}
- VRFY((mis_match == FALSE), "small slice write from large ds data good.");
+ VRFY((mis_match == false), "small slice write from large ds data good.");
(tv_ptr->tests_run)++;
}
@@ -1413,7 +1413,7 @@ contig_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
#if CONTIG_HS_DR_PIO_TEST__M2D_S2L__DEBUG
const char *fcnName = "contig_hs_dr_pio_test__m2d_s2l()";
#endif /* CONTIG_HS_DR_PIO_TEST__M2D_S2L__DEBUG */
- hbool_t mis_match = FALSE;
+ bool mis_match = false;
int i, j, k, l;
size_t n;
int mpi_rank; /* needed by the VRFY macro */
@@ -1584,7 +1584,7 @@ contig_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
* as having the same shape.
*/
check = H5Sselect_shape_same(tv_ptr->mem_small_ds_sid, tv_ptr->file_large_ds_sid_0);
- VRFY((check == TRUE), "H5Sselect_shape_same passed");
+ VRFY((check == true), "H5Sselect_shape_same passed");
/* write the small data set slice from memory to the
* target slice of the disk data set
@@ -1632,7 +1632,7 @@ contig_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
if (*ptr_1 != expected_value) {
- mis_match = TRUE;
+ mis_match = true;
}
expected_value++;
@@ -1641,7 +1641,7 @@ contig_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
if (*ptr_1 != 0) {
- mis_match = TRUE;
+ mis_match = true;
}
}
/* zero out buffer for next test */
@@ -1649,7 +1649,7 @@ contig_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
ptr_1++;
}
- VRFY((mis_match == FALSE), "small ds slice write to large ds slice data good.");
+ VRFY((mis_match == false), "small ds slice write to large ds slice data good.");
(tv_ptr->tests_run)++;
}
@@ -1683,7 +1683,7 @@ contig_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
static void
contig_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const int chunk_edge_size,
- const int small_rank, const int large_rank, const hbool_t use_collective_io,
+ const int small_rank, const int large_rank, const bool use_collective_io,
const hid_t dset_type, int express_test, int *skips_ptr, int max_skips,
int64_t *total_tests_ptr, int64_t *tests_run_ptr, int64_t *tests_skipped_ptr)
{
@@ -1701,7 +1701,7 @@ contig_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const i
/* int chunk_edge_size = */ -1,
/* int small_rank = */ -1,
/* int large_rank = */ -1,
- /* hid_t dset_type = */ -1,
+ /* hid_t dset_type = */ H5I_INVALID_HID,
/* uint32_t * small_ds_buf_0 = */ NULL,
/* uint32_t * small_ds_buf_1 = */ NULL,
/* uint32_t * small_ds_buf_2 = */ NULL,
@@ -1712,24 +1712,24 @@ contig_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const i
/* uint32_t * large_ds_slice_buf = */ NULL,
/* int small_ds_offset = */ -1,
/* int large_ds_offset = */ -1,
- /* hid_t fid = */ -1, /* HDF5 file ID */
+ /* hid_t fid = */ H5I_INVALID_HID, /* HDF5 file ID */
/* hid_t xfer_plist = */ H5P_DEFAULT,
- /* hid_t full_mem_small_ds_sid = */ -1,
- /* hid_t full_file_small_ds_sid = */ -1,
- /* hid_t mem_small_ds_sid = */ -1,
- /* hid_t file_small_ds_sid_0 = */ -1,
- /* hid_t file_small_ds_sid_1 = */ -1,
- /* hid_t small_ds_slice_sid = */ -1,
- /* hid_t full_mem_large_ds_sid = */ -1,
- /* hid_t full_file_large_ds_sid = */ -1,
- /* hid_t mem_large_ds_sid = */ -1,
- /* hid_t file_large_ds_sid_0 = */ -1,
- /* hid_t file_large_ds_sid_1 = */ -1,
- /* hid_t file_large_ds_process_slice_sid = */ -1,
- /* hid_t mem_large_ds_process_slice_sid = */ -1,
- /* hid_t large_ds_slice_sid = */ -1,
- /* hid_t small_dataset = */ -1, /* Dataset ID */
- /* hid_t large_dataset = */ -1, /* Dataset ID */
+ /* hid_t full_mem_small_ds_sid = */ H5I_INVALID_HID,
+ /* hid_t full_file_small_ds_sid = */ H5I_INVALID_HID,
+ /* hid_t mem_small_ds_sid = */ H5I_INVALID_HID,
+ /* hid_t file_small_ds_sid_0 = */ H5I_INVALID_HID,
+ /* hid_t file_small_ds_sid_1 = */ H5I_INVALID_HID,
+ /* hid_t small_ds_slice_sid = */ H5I_INVALID_HID,
+ /* hid_t full_mem_large_ds_sid = */ H5I_INVALID_HID,
+ /* hid_t full_file_large_ds_sid = */ H5I_INVALID_HID,
+ /* hid_t mem_large_ds_sid = */ H5I_INVALID_HID,
+ /* hid_t file_large_ds_sid_0 = */ H5I_INVALID_HID,
+ /* hid_t file_large_ds_sid_1 = */ H5I_INVALID_HID,
+ /* hid_t file_large_ds_process_slice_sid = */ H5I_INVALID_HID,
+ /* hid_t mem_large_ds_process_slice_sid = */ H5I_INVALID_HID,
+ /* hid_t large_ds_slice_sid = */ H5I_INVALID_HID,
+ /* hid_t small_dataset = */ H5I_INVALID_HID, /* Dataset ID */
+ /* hid_t large_dataset = */ H5I_INVALID_HID, /* Dataset ID */
/* size_t small_ds_size = */ 1,
/* size_t small_ds_slice_size = */ 1,
/* size_t large_ds_size = */ 1,
@@ -1924,7 +1924,7 @@ contig_hs_dr_pio_test(ShapeSameTestMethods sstest_type)
chunk_edge_size = 0;
contig_hs_dr_pio_test__run_test(test_num, edge_size, chunk_edge_size, small_rank,
- large_rank, FALSE, dset_type, express_test, &skips,
+ large_rank, false, dset_type, express_test, &skips,
max_skips, &total_tests, &tests_run, &tests_skipped);
test_num++;
break;
@@ -1935,7 +1935,7 @@ contig_hs_dr_pio_test(ShapeSameTestMethods sstest_type)
chunk_edge_size = 0;
contig_hs_dr_pio_test__run_test(test_num, edge_size, chunk_edge_size, small_rank,
- large_rank, TRUE, dset_type, express_test, &skips,
+ large_rank, true, dset_type, express_test, &skips,
max_skips, &total_tests, &tests_run, &tests_skipped);
test_num++;
break;
@@ -1946,7 +1946,7 @@ contig_hs_dr_pio_test(ShapeSameTestMethods sstest_type)
chunk_edge_size = 5;
contig_hs_dr_pio_test__run_test(test_num, edge_size, chunk_edge_size, small_rank,
- large_rank, FALSE, dset_type, express_test, &skips,
+ large_rank, false, dset_type, express_test, &skips,
max_skips, &total_tests, &tests_run, &tests_skipped);
test_num++;
break;
@@ -1957,14 +1957,14 @@ contig_hs_dr_pio_test(ShapeSameTestMethods sstest_type)
chunk_edge_size = 5;
contig_hs_dr_pio_test__run_test(test_num, edge_size, chunk_edge_size, small_rank,
- large_rank, TRUE, dset_type, express_test, &skips,
+ large_rank, true, dset_type, express_test, &skips,
max_skips, &total_tests, &tests_run, &tests_skipped);
test_num++;
break;
/* end of case COL_CHUNKED */
default:
- VRFY((FALSE), "unknown test type");
+ VRFY((false), "unknown test type");
break;
} /* end of switch(sstest_type) */
@@ -2019,7 +2019,7 @@ ckrbrd_hs_dr_pio_test__slct_ckrbrd(const int mpi_rank, const hid_t tgt_sid, cons
#if CKRBRD_HS_DR_PIO_TEST__SELECT_CHECKER_BOARD__DEBUG
const char *fcnName = "ckrbrd_hs_dr_pio_test__slct_ckrbrd():";
#endif
- hbool_t first_selection = TRUE;
+ bool first_selection = true;
int i, j, k, l, m;
int n_cube_offset;
int sel_offset;
@@ -2222,7 +2222,7 @@ ckrbrd_hs_dr_pio_test__slct_ckrbrd(const int mpi_rank, const hid_t tgt_sid, cons
if (first_selection) {
- first_selection = FALSE;
+ first_selection = false;
ret = H5Sselect_hyperslab(tgt_sid, H5S_SELECT_SET, &(start[n_cube_offset]),
&(stride[n_cube_offset]), &(count[n_cube_offset]),
@@ -2294,7 +2294,7 @@ ckrbrd_hs_dr_pio_test__slct_ckrbrd(const int mpi_rank, const hid_t tgt_sid, cons
** ckrbrd_hs_dr_pio_test__verify_data():
**
** Examine the supplied buffer to see if it contains the
-** expected data. Return TRUE if it does, and FALSE
+** expected data. Return true if it does, and false
** otherwise.
**
** The supplied buffer is presumed to this process's slice
@@ -2347,17 +2347,17 @@ ckrbrd_hs_dr_pio_test__slct_ckrbrd(const int mpi_rank, const hid_t tgt_sid, cons
#define CKRBRD_HS_DR_PIO_TEST__VERIFY_DATA__DEBUG 0
-static hbool_t
+static bool
ckrbrd_hs_dr_pio_test__verify_data(uint32_t *buf_ptr, const int rank, const int edge_size,
const int checker_edge_size, uint32_t first_expected_val,
- hbool_t buf_starts_in_checker)
+ bool buf_starts_in_checker)
{
#if CKRBRD_HS_DR_PIO_TEST__VERIFY_DATA__DEBUG
const char *fcnName = "ckrbrd_hs_dr_pio_test__verify_data():";
#endif
- hbool_t good_data = TRUE;
- hbool_t in_checker;
- hbool_t start_in_checker[5];
+ bool good_data = true;
+ bool in_checker;
+ bool start_in_checker[5];
uint32_t expected_value;
uint32_t *val_ptr;
int i, j, k, l, m; /* to track position in n-cube */
@@ -2449,7 +2449,7 @@ do {
if (*val_ptr != expected_value) {
- good_data = FALSE;
+ good_data = false;
}
/* zero out buffer for reuse */
@@ -2457,7 +2457,7 @@ do {
}
else if (*val_ptr != 0) {
- good_data = FALSE;
+ good_data = false;
/* zero out buffer for reuse */
*val_ptr = 0;
@@ -2519,7 +2519,7 @@ ckrbrd_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
const char *fcnName = "ckrbrd_hs_dr_pio_test__d2m_l2s()";
uint32_t *ptr_0;
#endif /* CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG */
- hbool_t data_ok = FALSE;
+ bool data_ok = false;
int i, j, k, l;
uint32_t expected_value;
int mpi_rank; /* needed by VRFY */
@@ -2671,7 +2671,7 @@ ckrbrd_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
* selections as having the same shape.
*/
check = H5Sselect_shape_same(tv_ptr->small_ds_slice_sid, tv_ptr->file_large_ds_sid_0);
- VRFY((check == TRUE), "H5Sselect_shape_same passed");
+ VRFY((check == true), "H5Sselect_shape_same passed");
/* Read selection from disk */
#if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG
@@ -2702,9 +2702,9 @@ ckrbrd_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
data_ok = ckrbrd_hs_dr_pio_test__verify_data(
tv_ptr->small_ds_slice_buf, tv_ptr->small_rank - 1, tv_ptr->edge_size,
- tv_ptr->checker_edge_size, expected_value, (hbool_t)TRUE);
+ tv_ptr->checker_edge_size, expected_value, (bool)true);
- VRFY((data_ok == TRUE), "small slice read from large ds data good.");
+ VRFY((data_ok == true), "small slice read from large ds data good.");
(tv_ptr->tests_run)++;
}
@@ -2751,7 +2751,7 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
#if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_S2L__DEBUG
const char *fcnName = "ckrbrd_hs_dr_pio_test__d2m_s2l()";
#endif /* CHECKER_BOARD_HS_DR_PIO_TEST__D2M_S2L__DEBUG */
- hbool_t data_ok = FALSE;
+ bool data_ok = false;
int i, j, k, l;
size_t u;
size_t start_index;
@@ -2893,7 +2893,7 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
* selections as having the same shape.
*/
check = H5Sselect_shape_same(tv_ptr->file_small_ds_sid_0, tv_ptr->mem_large_ds_sid);
- VRFY((check == TRUE), "H5Sselect_shape_same passed");
+ VRFY((check == true), "H5Sselect_shape_same passed");
/* Read selection from disk */
#if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_S2L__DEBUG
@@ -2911,7 +2911,7 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
/* verify that the expected data and only the
* expected data was read.
*/
- data_ok = TRUE;
+ data_ok = true;
ptr_1 = tv_ptr->large_ds_buf_1;
expected_value = (uint32_t)((size_t)(tv_ptr->mpi_rank) * tv_ptr->small_ds_slice_size);
start_index =
@@ -2951,7 +2951,7 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
if (*ptr_1 != 0) {
- data_ok = FALSE;
+ data_ok = false;
}
/* zero out the value for the next pass */
@@ -2960,13 +2960,13 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
ptr_1++;
}
- VRFY((data_ok == TRUE), "slice read from small to large ds data good(1).");
+ VRFY((data_ok == true), "slice read from small to large ds data good(1).");
data_ok = ckrbrd_hs_dr_pio_test__verify_data(ptr_1, tv_ptr->small_rank - 1,
tv_ptr->edge_size, tv_ptr->checker_edge_size,
- expected_value, (hbool_t)TRUE);
+ expected_value, (bool)true);
- VRFY((data_ok == TRUE), "slice read from small to large ds data good(2).");
+ VRFY((data_ok == true), "slice read from small to large ds data good(2).");
ptr_1 = tv_ptr->large_ds_buf_1 + stop_index + 1;
@@ -2974,7 +2974,7 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
if (*ptr_1 != 0) {
- data_ok = FALSE;
+ data_ok = false;
}
/* zero out the value for the next pass */
@@ -2983,7 +2983,7 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
ptr_1++;
}
- VRFY((data_ok == TRUE), "slice read from small to large ds data good(3).");
+ VRFY((data_ok == true), "slice read from small to large ds data good(3).");
(tv_ptr->tests_run)++;
}
@@ -3034,7 +3034,7 @@ ckrbrd_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
#if CHECKER_BOARD_HS_DR_PIO_TEST__M2D_L2S__DEBUG
const char *fcnName = "ckrbrd_hs_dr_pio_test__m2d_l2s()";
#endif /* CHECKER_BOARD_HS_DR_PIO_TEST__M2D_L2S__DEBUG */
- hbool_t data_ok = FALSE;
+ bool data_ok = false;
int i, j, k, l;
size_t u;
size_t start_index;
@@ -3215,7 +3215,7 @@ ckrbrd_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
* slice of the small data set as having the same shape.
*/
check = H5Sselect_shape_same(tv_ptr->file_small_ds_sid_1, tv_ptr->mem_large_ds_sid);
- VRFY((check == TRUE), "H5Sselect_shape_same passed.");
+ VRFY((check == true), "H5Sselect_shape_same passed.");
/* write the checker board selection of the slice from the in
* memory large data set to the slice of the on disk small
@@ -3252,33 +3252,33 @@ ckrbrd_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr)
assert(start_index < stop_index);
assert(stop_index <= tv_ptr->small_ds_size);
- data_ok = TRUE;
+ data_ok = true;
ptr_1 = tv_ptr->small_ds_buf_1;
for (u = 0; u < start_index; u++, ptr_1++) {
if (*ptr_1 != 0) {
- data_ok = FALSE;
+ data_ok = false;
*ptr_1 = 0;
}
}
data_ok &= ckrbrd_hs_dr_pio_test__verify_data(
tv_ptr->small_ds_buf_1 + start_index, tv_ptr->small_rank - 1, tv_ptr->edge_size,
- tv_ptr->checker_edge_size, expected_value, (hbool_t)TRUE);
+ tv_ptr->checker_edge_size, expected_value, (bool)true);
ptr_1 = tv_ptr->small_ds_buf_1;
for (u = stop_index; u < tv_ptr->small_ds_size; u++, ptr_1++) {
if (*ptr_1 != 0) {
- data_ok = FALSE;
+ data_ok = false;
*ptr_1 = 0;
}
}
- VRFY((data_ok == TRUE), "large slice write slice to small slice data good.");
+ VRFY((data_ok == true), "large slice write slice to small slice data good.");
(tv_ptr->tests_run)++;
}
@@ -3329,7 +3329,7 @@ ckrbrd_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
#if CHECKER_BOARD_HS_DR_PIO_TEST__M2D_S2L__DEBUG
const char *fcnName = "ckrbrd_hs_dr_pio_test__m2d_s2l()";
#endif /* CONTIG_HS_DR_PIO_TEST__M2D_S2L__DEBUG */
- hbool_t data_ok = FALSE;
+ bool data_ok = false;
int i, j, k, l;
size_t u;
size_t start_index;
@@ -3506,7 +3506,7 @@ ckrbrd_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
* as having the same shape.
*/
check = H5Sselect_shape_same(tv_ptr->mem_small_ds_sid, tv_ptr->file_large_ds_sid_1);
- VRFY((check == TRUE), "H5Sselect_shape_same passed");
+ VRFY((check == true), "H5Sselect_shape_same passed");
/* write the small data set slice from memory to the
* target slice of the disk data set
@@ -3546,33 +3546,33 @@ ckrbrd_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
assert(start_index < stop_index);
assert(stop_index < tv_ptr->large_ds_size);
- data_ok = TRUE;
+ data_ok = true;
ptr_1 = tv_ptr->large_ds_buf_1;
for (u = 0; u < start_index; u++, ptr_1++) {
if (*ptr_1 != 0) {
- data_ok = FALSE;
+ data_ok = false;
*ptr_1 = 0;
}
}
data_ok &= ckrbrd_hs_dr_pio_test__verify_data(
tv_ptr->large_ds_buf_1 + start_index, tv_ptr->small_rank - 1, tv_ptr->edge_size,
- tv_ptr->checker_edge_size, expected_value, (hbool_t)TRUE);
+ tv_ptr->checker_edge_size, expected_value, (bool)true);
ptr_1 = tv_ptr->large_ds_buf_1;
for (u = stop_index; u < tv_ptr->small_ds_size; u++, ptr_1++) {
if (*ptr_1 != 0) {
- data_ok = FALSE;
+ data_ok = false;
*ptr_1 = 0;
}
}
- VRFY((data_ok == TRUE), "small ds cb slice write to large ds slice data good.");
+ VRFY((data_ok == true), "small ds cb slice write to large ds slice data good.");
(tv_ptr->tests_run)++;
}
@@ -3607,9 +3607,9 @@ ckrbrd_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
static void
ckrbrd_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const int checker_edge_size,
const int chunk_edge_size, const int small_rank, const int large_rank,
- const hbool_t use_collective_io, const hid_t dset_type,
- const int express_test, int *skips_ptr, int max_skips,
- int64_t *total_tests_ptr, int64_t *tests_run_ptr, int64_t *tests_skipped_ptr)
+ const bool use_collective_io, const hid_t dset_type, const int express_test,
+ int *skips_ptr, int max_skips, int64_t *total_tests_ptr,
+ int64_t *tests_run_ptr, int64_t *tests_skipped_ptr)
{
#if CKRBRD_HS_DR_PIO_TEST__RUN_TEST__DEBUG
@@ -3626,7 +3626,7 @@ ckrbrd_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const i
/* int chunk_edge_size = */ -1,
/* int small_rank = */ -1,
/* int large_rank = */ -1,
- /* hid_t dset_type = */ -1,
+ /* hid_t dset_type = */ H5I_INVALID_HID,
/* uint32_t * small_ds_buf_0 = */ NULL,
/* uint32_t * small_ds_buf_1 = */ NULL,
/* uint32_t * small_ds_buf_2 = */ NULL,
@@ -3637,24 +3637,24 @@ ckrbrd_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const i
/* uint32_t * large_ds_slice_buf = */ NULL,
/* int small_ds_offset = */ -1,
/* int large_ds_offset = */ -1,
- /* hid_t fid = */ -1, /* HDF5 file ID */
+ /* hid_t fid = */ H5I_INVALID_HID, /* HDF5 file ID */
/* hid_t xfer_plist = */ H5P_DEFAULT,
- /* hid_t full_mem_small_ds_sid = */ -1,
- /* hid_t full_file_small_ds_sid = */ -1,
- /* hid_t mem_small_ds_sid = */ -1,
- /* hid_t file_small_ds_sid_0 = */ -1,
- /* hid_t file_small_ds_sid_1 = */ -1,
- /* hid_t small_ds_slice_sid = */ -1,
- /* hid_t full_mem_large_ds_sid = */ -1,
- /* hid_t full_file_large_ds_sid = */ -1,
- /* hid_t mem_large_ds_sid = */ -1,
- /* hid_t file_large_ds_sid_0 = */ -1,
- /* hid_t file_large_ds_sid_1 = */ -1,
- /* hid_t file_large_ds_process_slice_sid = */ -1,
- /* hid_t mem_large_ds_process_slice_sid = */ -1,
- /* hid_t large_ds_slice_sid = */ -1,
- /* hid_t small_dataset = */ -1, /* Dataset ID */
- /* hid_t large_dataset = */ -1, /* Dataset ID */
+ /* hid_t full_mem_small_ds_sid = */ H5I_INVALID_HID,
+ /* hid_t full_file_small_ds_sid = */ H5I_INVALID_HID,
+ /* hid_t mem_small_ds_sid = */ H5I_INVALID_HID,
+ /* hid_t file_small_ds_sid_0 = */ H5I_INVALID_HID,
+ /* hid_t file_small_ds_sid_1 = */ H5I_INVALID_HID,
+ /* hid_t small_ds_slice_sid = */ H5I_INVALID_HID,
+ /* hid_t full_mem_large_ds_sid = */ H5I_INVALID_HID,
+ /* hid_t full_file_large_ds_sid = */ H5I_INVALID_HID,
+ /* hid_t mem_large_ds_sid = */ H5I_INVALID_HID,
+ /* hid_t file_large_ds_sid_0 = */ H5I_INVALID_HID,
+ /* hid_t file_large_ds_sid_1 = */ H5I_INVALID_HID,
+ /* hid_t file_large_ds_process_slice_sid = */ H5I_INVALID_HID,
+ /* hid_t mem_large_ds_process_slice_sid = */ H5I_INVALID_HID,
+ /* hid_t large_ds_slice_sid = */ H5I_INVALID_HID,
+ /* hid_t small_dataset = */ H5I_INVALID_HID, /* Dataset ID */
+ /* hid_t large_dataset = */ H5I_INVALID_HID, /* Dataset ID */
/* size_t small_ds_size = */ 1,
/* size_t small_ds_slice_size = */ 1,
/* size_t large_ds_size = */ 1,
@@ -3838,7 +3838,7 @@ ckrbrd_hs_dr_pio_test(ShapeSameTestMethods sstest_type)
/* contiguous data set, independent I/O */
chunk_edge_size = 0;
ckrbrd_hs_dr_pio_test__run_test(test_num, edge_size, checker_edge_size, chunk_edge_size,
- small_rank, large_rank, FALSE, dset_type, express_test,
+ small_rank, large_rank, false, dset_type, express_test,
&skips, max_skips, &total_tests, &tests_run,
&tests_skipped);
test_num++;
@@ -3849,7 +3849,7 @@ ckrbrd_hs_dr_pio_test(ShapeSameTestMethods sstest_type)
/* contiguous data set, collective I/O */
chunk_edge_size = 0;
ckrbrd_hs_dr_pio_test__run_test(
- test_num, edge_size, checker_edge_size, chunk_edge_size, small_rank, large_rank, TRUE,
+ test_num, edge_size, checker_edge_size, chunk_edge_size, small_rank, large_rank, true,
dset_type, express_test, &skips, max_skips, &total_tests, &tests_run, &tests_skipped);
test_num++;
break;
@@ -3859,7 +3859,7 @@ ckrbrd_hs_dr_pio_test(ShapeSameTestMethods sstest_type)
/* chunked data set, independent I/O */
chunk_edge_size = 5;
ckrbrd_hs_dr_pio_test__run_test(test_num, edge_size, checker_edge_size, chunk_edge_size,
- small_rank, large_rank, FALSE, dset_type, express_test,
+ small_rank, large_rank, false, dset_type, express_test,
&skips, max_skips, &total_tests, &tests_run,
&tests_skipped);
test_num++;
@@ -3870,14 +3870,14 @@ ckrbrd_hs_dr_pio_test(ShapeSameTestMethods sstest_type)
/* chunked data set, collective I/O */
chunk_edge_size = 5;
ckrbrd_hs_dr_pio_test__run_test(
- test_num, edge_size, checker_edge_size, chunk_edge_size, small_rank, large_rank, TRUE,
+ test_num, edge_size, checker_edge_size, chunk_edge_size, small_rank, large_rank, true,
dset_type, express_test, &skips, max_skips, &total_tests, &tests_run, &tests_skipped);
test_num++;
break;
/* end of case COL_CHUNKED */
default:
- VRFY((FALSE), "unknown test type");
+ VRFY((false), "unknown test type");
break;
} /* end of switch(sstest_type) */
@@ -4142,7 +4142,7 @@ parse_options(int argc, char **argv)
hid_t
create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type)
{
- hid_t ret_pl = -1;
+ hid_t ret_pl = H5I_INVALID_HID;
herr_t ret; /* generic return value */
int mpi_rank; /* mpi variables */
@@ -4159,9 +4159,9 @@ create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type)
/* set Parallel access with communicator */
ret = H5Pset_fapl_mpio(ret_pl, comm, info);
VRFY((ret >= 0), "");
- ret = H5Pset_all_coll_metadata_ops(ret_pl, TRUE);
+ ret = H5Pset_all_coll_metadata_ops(ret_pl, true);
VRFY((ret >= 0), "");
- ret = H5Pset_coll_metadata_write(ret_pl, TRUE);
+ ret = H5Pset_coll_metadata_write(ret_pl, true);
VRFY((ret >= 0), "");
return (ret_pl);
}
@@ -4260,6 +4260,8 @@ main(int argc, char **argv)
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
+ mpi_rank_framework_g = mpi_rank;
+
dim0 = ROW_FACTOR * mpi_size;
dim1 = COL_FACTOR * mpi_size;
diff --git a/testpar/t_span_tree.c b/testpar/t_span_tree.c
index 7614165c5b9..e4ff25836d7 100644
--- a/testpar/t_span_tree.c
+++ b/testpar/t_span_tree.c
@@ -399,7 +399,7 @@ coll_write_test(int chunk_factor)
For testing collective hyperslab selection write
In this test, we are using independent read to check
- the correctedness of collective write compared with
+ the correctness of collective write compared with
independent write,
In order to thoroughly test this feature, we choose
@@ -494,7 +494,7 @@ coll_write_test(int chunk_factor)
mspaceid = H5Screate_simple(MSPACE_RANK, mdim, NULL);
/*
- * Select two hyperslabs in memory. Hyperslabs has the same
+ * Select two hyperslabs in memory. Hyperslabs have the same
* size and shape as the selected hyperslabs for the file dataspace
* Only the starting point is different.
* The first selection
@@ -734,7 +734,7 @@ coll_read_test(void)
mspaceid = H5Screate_simple(MSPACE_RANK, mdim, NULL);
/*
- * Select two hyperslabs in memory. Hyperslabs has the same
+ * Select two hyperslabs in memory. Hyperslabs have the same
* size and shape as the selected hyperslabs for the file dataspace.
* Only the starting point is different.
* The first selection
@@ -868,7 +868,7 @@ coll_read_test(void)
** sel_rank fastest changing indices, with origin (in the
** higher indices) as indicated by the start array.
**
-** Note that this function, is hard coded to presume a
+** Note that this function is hard-coded to presume a
** maximum dataspace rank of 5.
**
** While this maximum is declared as a constant, increasing
@@ -894,7 +894,7 @@ lower_dim_size_comp_test__select_checker_board(const int mpi_rank, const hid_t t
#if LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG
const char *fcnName = "lower_dim_size_comp_test__select_checker_board():";
#endif
- hbool_t first_selection = TRUE;
+ bool first_selection = true;
int i, j, k, l, m;
int ds_offset;
int sel_offset;
@@ -946,7 +946,7 @@ lower_dim_size_comp_test__select_checker_board(const int mpi_rank, const hid_t t
* Note that the following computation depends on the C99
* requirement that integer division discard any fraction
* (truncation towards zero) to function correctly. As we
- * now require C99, this shouldn't be a problem, but noting
+ * now require C99, this shouldn't be a problem, but note
* it may save us some pain if we are ever obliged to support
* pre-C99 compilers again.
*/
@@ -975,7 +975,7 @@ lower_dim_size_comp_test__select_checker_board(const int mpi_rank, const hid_t t
/* Now set up the stride and block arrays, and portions of the start
* and count arrays that will not be altered during the selection of
- * the checker board.
+ * the checkerboard.
*/
i = 0;
while (i < ds_offset) {
@@ -1116,7 +1116,7 @@ lower_dim_size_comp_test__select_checker_board(const int mpi_rank, const hid_t t
if (first_selection) {
- first_selection = FALSE;
+ first_selection = false;
ret = H5Sselect_hyperslab(tgt_sid, H5S_SELECT_SET, &(start[ds_offset]),
&(stride[ds_offset]), &(count[ds_offset]),
@@ -1192,16 +1192,16 @@ lower_dim_size_comp_test__select_checker_board(const int mpi_rank, const hid_t t
** lower_dim_size_comp_test__verify_data():
**
** Examine the supplied buffer to see if it contains the
-** expected data. Return TRUE if it does, and FALSE
+** expected data. Return true if it does, and false
** otherwise.
**
-** The supplied buffer is presumed to this process's slice
+** The supplied buffer is presumed to be this process's slice
** of the target data set. Each such slice will be an
** n-cube of rank (rank -1) and the supplied edge_size with
** origin (mpi_rank, 0, ... , 0) in the target data set.
**
** Further, the buffer is presumed to be the result of reading
-** or writing a checker board selection of an m (1 <= m <
+** or writing a checkerboard selection of an m (1 <= m <
** rank) dimensional slice through this processes slice
** of the target data set. Also, this slice must be parallel
** to the fastest changing indices.
@@ -1220,7 +1220,7 @@ lower_dim_size_comp_test__select_checker_board(const int mpi_rank, const hid_t t
**
** Further, supposing that this is process 10, this process's
** slice of the dataset would be a 10 x 10 2-cube with origin
-** (10, 0, 0) in the data set, and would be initialize (prior
+** (10, 0, 0) in the data set, and would be initialized (prior
** to the checkerboard selection) as follows:
**
** 1000, 1001, 1002, ... 1008, 1009
@@ -1245,20 +1245,20 @@ lower_dim_size_comp_test__select_checker_board(const int mpi_rank, const hid_t t
#define LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG 0
-static hbool_t
+static bool
lower_dim_size_comp_test__verify_data(uint32_t *buf_ptr,
#if LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG
const int mpi_rank,
#endif /* LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG */
const int rank, const int edge_size, const int checker_edge_size,
- uint32_t first_expected_val, hbool_t buf_starts_in_checker)
+ uint32_t first_expected_val, bool buf_starts_in_checker)
{
#if LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG
const char *fcnName = "lower_dim_size_comp_test__verify_data():";
#endif
- hbool_t good_data = TRUE;
- hbool_t in_checker;
- hbool_t start_in_checker[5];
+ bool good_data = true;
+ bool in_checker;
+ bool start_in_checker[5];
uint32_t expected_value;
uint32_t *val_ptr;
int i, j, k, l, m; /* to track position in n-cube */
@@ -1351,7 +1351,7 @@ lower_dim_size_comp_test__verify_data(uint32_t *buf_ptr,
if (*val_ptr != expected_value) {
- good_data = FALSE;
+ good_data = false;
}
/* zero out buffer for reuse */
@@ -1359,7 +1359,7 @@ lower_dim_size_comp_test__verify_data(uint32_t *buf_ptr,
}
else if (*val_ptr != 0) {
- good_data = FALSE;
+ good_data = false;
/* zero out buffer for reuse */
*val_ptr = 0;
@@ -1408,7 +1408,7 @@ lower_dim_size_comp_test__verify_data(uint32_t *buf_ptr,
#define LDSCT_DS_RANK 5
static void
-lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_collective_io,
+lower_dim_size_comp_test__run_test(const int chunk_edge_size, const bool use_collective_io,
const hid_t dset_type)
{
#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
@@ -1418,8 +1418,8 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
hsize_t max_dims[32];
#endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */
const char *filename;
- hbool_t data_ok = FALSE;
- hbool_t mis_match = FALSE;
+ bool data_ok = false;
+ bool mis_match = false;
int i;
int start_index;
int stop_index;
@@ -1761,10 +1761,10 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
}
check = H5Sselect_valid(mem_small_ds_sid);
- VRFY((check == TRUE), "H5Sselect_valid(mem_small_ds_sid) returns TRUE");
+ VRFY((check == true), "H5Sselect_valid(mem_small_ds_sid) returns true");
check = H5Sselect_valid(file_small_ds_sid);
- VRFY((check == TRUE), "H5Sselect_valid(file_small_ds_sid) returns TRUE");
+ VRFY((check == true), "H5Sselect_valid(file_small_ds_sid) returns true");
/* write the initial value of the small data set to file */
#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
@@ -1791,7 +1791,7 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
* and reset the buffer to zero in passing.
*/
expected_value = 0;
- mis_match = FALSE;
+ mis_match = false;
ptr_1 = small_ds_buf_1;
i = 0;
@@ -1799,7 +1799,7 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
if (*ptr_1 != expected_value) {
- mis_match = TRUE;
+ mis_match = true;
}
*ptr_1 = (uint32_t)0;
@@ -1807,7 +1807,7 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
ptr_1++;
expected_value++;
}
- VRFY((mis_match == FALSE), "small ds init data good.");
+ VRFY((mis_match == false), "small ds init data good.");
/* setup selections for writing initial data to the large data set */
start[0] = (hsize_t)(mpi_rank + 1);
@@ -1915,10 +1915,10 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
#endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */
check = H5Sselect_valid(mem_large_ds_sid);
- VRFY((check == TRUE), "H5Sselect_valid(mem_large_ds_sid) returns TRUE");
+ VRFY((check == true), "H5Sselect_valid(mem_large_ds_sid) returns true");
check = H5Sselect_valid(file_large_ds_sid);
- VRFY((check == TRUE), "H5Sselect_valid(file_large_ds_sid) returns TRUE");
+ VRFY((check == true), "H5Sselect_valid(file_large_ds_sid) returns true");
/* write the initial value of the large data set to file */
#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
@@ -1952,7 +1952,7 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
* in passing, reset the buffer to zeros
*/
expected_value = 0;
- mis_match = FALSE;
+ mis_match = false;
ptr_1 = large_ds_buf_1;
i = 0;
@@ -1960,7 +1960,7 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
if (*ptr_1 != expected_value) {
- mis_match = TRUE;
+ mis_match = true;
}
*ptr_1 = (uint32_t)0;
@@ -1968,7 +1968,7 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
ptr_1++;
expected_value++;
}
- VRFY((mis_match == FALSE), "large ds init data good.");
+ VRFY((mis_match == false), "large ds init data good.");
/***********************************/
/***** INITIALIZATION COMPLETE *****/
@@ -2006,7 +2006,7 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
* selections as having the same shape.
*/
check = H5Sselect_shape_same(mem_large_ds_sid, file_small_ds_sid);
- VRFY((check == TRUE), "H5Sselect_shape_same passed (1)");
+ VRFY((check == true), "H5Sselect_shape_same passed (1)");
ret = H5Dread(small_dataset, H5T_NATIVE_UINT32, mem_large_ds_sid, file_small_ds_sid, xfer_plist,
large_ds_buf_1);
@@ -2021,7 +2021,7 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
/* verify that expected data is retrieved */
- data_ok = TRUE;
+ data_ok = true;
start_index = (int)((large_sel_start[0] * large_dims[1] * large_dims[2] * large_dims[3] * large_dims[4]) +
(large_sel_start[1] * large_dims[2] * large_dims[3] * large_dims[4]) +
@@ -2040,14 +2040,14 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
if (*ptr_1 != (uint32_t)0) {
- data_ok = FALSE;
+ data_ok = false;
*ptr_1 = (uint32_t)0;
}
ptr_1++;
}
- VRFY((data_ok == TRUE), "slice read from small ds data good(1).");
+ VRFY((data_ok == true), "slice read from small ds data good(1).");
data_ok = lower_dim_size_comp_test__verify_data(ptr_1,
#if LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG
@@ -2056,11 +2056,11 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
/* rank */ 2,
/* edge_size */ 10,
/* checker_edge_size */ 3, expected_value,
- /* buf_starts_in_checker */ TRUE);
+ /* buf_starts_in_checker */ true);
- VRFY((data_ok == TRUE), "slice read from small ds data good(2).");
+ VRFY((data_ok == true), "slice read from small ds data good(2).");
- data_ok = TRUE;
+ data_ok = true;
ptr_1 += small_ds_slice_size;
@@ -2068,14 +2068,14 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
if (*ptr_1 != (uint32_t)0) {
- data_ok = FALSE;
+ data_ok = false;
*ptr_1 = (uint32_t)0;
}
ptr_1++;
}
- VRFY((data_ok == TRUE), "slice read from small ds data good(3).");
+ VRFY((data_ok == true), "slice read from small ds data good(3).");
/* read a checkerboard selection of a slice of the process slice of
* the large on disk data set into the process slice of the small
@@ -2103,7 +2103,7 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
* selections as having the same shape.
*/
check = H5Sselect_shape_same(mem_small_ds_sid, file_large_ds_sid);
- VRFY((check == TRUE), "H5Sselect_shape_same passed (2)");
+ VRFY((check == true), "H5Sselect_shape_same passed (2)");
ret = H5Dread(large_dataset, H5T_NATIVE_UINT32, mem_small_ds_sid, file_large_ds_sid, xfer_plist,
small_ds_buf_1);
@@ -2118,7 +2118,7 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
/* verify that expected data is retrieved */
- data_ok = TRUE;
+ data_ok = true;
expected_value =
(uint32_t)((large_sel_start[0] * large_dims[1] * large_dims[2] * large_dims[3] * large_dims[4]) +
@@ -2140,14 +2140,14 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
if (*ptr_1 != (uint32_t)0) {
- data_ok = FALSE;
+ data_ok = false;
*ptr_1 = (uint32_t)0;
}
ptr_1++;
}
- VRFY((data_ok == TRUE), "slice read from large ds data good(1).");
+ VRFY((data_ok == true), "slice read from large ds data good(1).");
data_ok = lower_dim_size_comp_test__verify_data(ptr_1,
#if LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG
@@ -2156,11 +2156,11 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
/* rank */ 2,
/* edge_size */ 10,
/* checker_edge_size */ 3, expected_value,
- /* buf_starts_in_checker */ TRUE);
+ /* buf_starts_in_checker */ true);
- VRFY((data_ok == TRUE), "slice read from large ds data good(2).");
+ VRFY((data_ok == true), "slice read from large ds data good(2).");
- data_ok = TRUE;
+ data_ok = true;
ptr_1 += small_ds_slice_size;
@@ -2175,14 +2175,14 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_
}
#endif /* LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG */
- data_ok = FALSE;
+ data_ok = false;
*ptr_1 = (uint32_t)0;
}
ptr_1++;
}
- VRFY((data_ok == TRUE), "slice read from large ds data good(3).");
+ VRFY((data_ok == true), "slice read from large ds data good(3).");
/* Close dataspaces */
ret = H5Sclose(full_mem_small_ds_sid);
@@ -2258,10 +2258,10 @@ lower_dim_size_comp_test(void)
HDcompile_assert(sizeof(uint32_t) == sizeof(unsigned));
for (use_collective_io = 0; use_collective_io <= 1; use_collective_io++) {
chunk_edge_size = 0;
- lower_dim_size_comp_test__run_test(chunk_edge_size, (hbool_t)use_collective_io, H5T_NATIVE_UINT);
+ lower_dim_size_comp_test__run_test(chunk_edge_size, (bool)use_collective_io, H5T_NATIVE_UINT);
chunk_edge_size = 5;
- lower_dim_size_comp_test__run_test(chunk_edge_size, (hbool_t)use_collective_io, H5T_NATIVE_UINT);
+ lower_dim_size_comp_test__run_test(chunk_edge_size, (bool)use_collective_io, H5T_NATIVE_UINT);
} /* end for */
return;
@@ -2285,9 +2285,9 @@ lower_dim_size_comp_test(void)
*
* 2) Has no in memory buffer for any other chunk.
*
- * The test differers from Rob Latham's bug report in
- * that is runs with an arbitrary number of processes,
- * and uses a 1 dimensional dataset.
+ * The test differs from Rob Latham's bug report in
+ * that it runs with an arbitrary number of processes,
+ * and uses a 1-dimensional dataset.
*
* Return: void
*
@@ -2301,7 +2301,7 @@ link_chunk_collective_io_test(void)
{
/* const char *fcnName = "link_chunk_collective_io_test()"; */
const char *filename;
- hbool_t mis_match = FALSE;
+ bool mis_match = false;
int i;
int mrc;
int mpi_rank;
@@ -2427,7 +2427,7 @@ link_chunk_collective_io_test(void)
VRFY((ret >= 0), "H5Pclose(xfer_plist) succeeded");
/* verify the data */
- mis_match = FALSE;
+ mis_match = false;
for (i = 0; i < LINK_CHUNK_COLLECTIVE_IO_TEST_CHUNK_SIZE; i++) {
diff = local_data_written[i] - local_data_read[i];
@@ -2435,10 +2435,10 @@ link_chunk_collective_io_test(void)
if (diff >= 0.001) {
- mis_match = TRUE;
+ mis_match = true;
}
}
- VRFY((mis_match == FALSE), "dataset data good.");
+ VRFY((mis_match == false), "dataset data good.");
/* Close dataspaces */
ret = H5Sclose(write_mem_ds_sid);
diff --git a/testpar/t_subfiling_vfd.c b/testpar/t_subfiling_vfd.c
index 8a3c10e2f05..0c64bf2927f 100644
--- a/testpar/t_subfiling_vfd.c
+++ b/testpar/t_subfiling_vfd.c
@@ -86,7 +86,7 @@ int curr_nerrors = 0;
typedef void (*test_func)(void);
/* Utility functions */
-static hid_t create_subfiling_ioc_fapl(MPI_Comm comm, MPI_Info info, hbool_t custom_config,
+static hid_t create_subfiling_ioc_fapl(MPI_Comm comm, MPI_Info info, bool custom_config,
H5FD_subfiling_params_t *custom_cfg, int32_t thread_pool_size);
/* Test functions */
@@ -125,7 +125,7 @@ static test_func tests[] = {
* ---------------------------------------------------------------------------
*/
static hid_t
-create_subfiling_ioc_fapl(MPI_Comm comm, MPI_Info info, hbool_t custom_config,
+create_subfiling_ioc_fapl(MPI_Comm comm, MPI_Info info, bool custom_config,
H5FD_subfiling_params_t *custom_cfg, int32_t thread_pool_size)
{
H5FD_subfiling_config_t subfiling_conf;
@@ -200,7 +200,7 @@ test_create_and_close(void)
TESTING_2("file creation and immediate close");
/* Get a default Subfiling FAPL */
- fapl_id = create_subfiling_ioc_fapl(comm_g, info_g, FALSE, NULL, 0);
+ fapl_id = create_subfiling_ioc_fapl(comm_g, info_g, false, NULL, 0);
VRFY((fapl_id >= 0), "FAPL creation succeeded");
file_id = H5Fcreate(SUBF_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
@@ -302,7 +302,7 @@ test_config_file(void)
cfg.stripe_size = (stripe_size_g > 0) ? stripe_size_g : stripe_size;
cfg.stripe_count = num_iocs_g > 1 ? (num_iocs_g / 2) : 1;
- fapl_id = create_subfiling_ioc_fapl(comm_g, info_g, TRUE, &cfg, H5FD_IOC_DEFAULT_THREAD_POOL_SIZE);
+ fapl_id = create_subfiling_ioc_fapl(comm_g, info_g, true, &cfg, H5FD_IOC_DEFAULT_THREAD_POOL_SIZE);
VRFY((fapl_id >= 0), "FAPL creation succeeded");
file_id = H5Fcreate(SUBF_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
@@ -325,8 +325,8 @@ test_config_file(void)
config_filename = malloc(PATH_MAX);
VRFY(config_filename, "malloc succeeded");
- HDsnprintf(config_filename, PATH_MAX, "%s/" H5FD_SUBFILING_CONFIG_FILENAME_TEMPLATE, config_dir,
- SUBF_FILENAME, (uint64_t)file_info.st_ino);
+ snprintf(config_filename, PATH_MAX, "%s/" H5FD_SUBFILING_CONFIG_FILENAME_TEMPLATE, config_dir,
+ SUBF_FILENAME, (uint64_t)file_info.st_ino);
config_file = fopen(config_filename, "r");
VRFY(config_file, "fopen succeeded");
@@ -347,27 +347,27 @@ test_config_file(void)
config_buf[config_file_len] = '\0';
/* Check the stripe_size field in the configuration file */
- substr = HDstrstr(config_buf, "stripe_size");
- VRFY(substr, "HDstrstr succeeded");
+ substr = strstr(config_buf, "stripe_size");
+ VRFY(substr, "strstr succeeded");
- VRFY((HDsscanf(substr, "stripe_size=%" PRId64, &read_stripe_size) == 1), "HDsscanf succeeded");
+ VRFY((sscanf(substr, "stripe_size=%" PRId64, &read_stripe_size) == 1), "sscanf succeeded");
VRFY((read_stripe_size == cfg.stripe_size), "Stripe size comparison succeeded");
/* Check the aggregator_count field in the configuration file */
- substr = HDstrstr(config_buf, "aggregator_count");
- VRFY(substr, "HDstrstr succeeded");
+ substr = strstr(config_buf, "aggregator_count");
+ VRFY(substr, "strstr succeeded");
- VRFY((HDsscanf(substr, "aggregator_count=%d", &read_aggr_count) == 1), "HDsscanf succeeded");
+ VRFY((sscanf(substr, "aggregator_count=%d", &read_aggr_count) == 1), "sscanf succeeded");
if (cfg.stripe_count < num_iocs_g)
VRFY((read_aggr_count == cfg.stripe_count), "Aggregator count comparison succeeded");
else
VRFY((read_aggr_count == num_iocs_g), "Aggregator count comparison succeeded");
/* Check the subfile_count field in the configuration file */
- substr = HDstrstr(config_buf, "subfile_count");
- VRFY(substr, "HDstrstr succeeded");
+ substr = strstr(config_buf, "subfile_count");
+ VRFY(substr, "strstr succeeded");
- VRFY((HDsscanf(substr, "subfile_count=%d", &read_stripe_count) == 1), "HDsscanf succeeded");
+ VRFY((sscanf(substr, "subfile_count=%d", &read_stripe_count) == 1), "sscanf succeeded");
VRFY((read_stripe_count == cfg.stripe_count), "Stripe count comparison succeeded");
/* Check the hdf5_file and subfile_dir fields in the configuration file */
@@ -379,21 +379,21 @@ test_config_file(void)
tmp_buf = malloc(PATH_MAX);
VRFY(tmp_buf, "malloc succeeded");
- substr = HDstrstr(config_buf, "hdf5_file");
- VRFY(substr, "HDstrstr succeeded");
+ substr = strstr(config_buf, "hdf5_file");
+ VRFY(substr, "strstr succeeded");
- HDsnprintf(scan_format, sizeof(scan_format), "hdf5_file=%%%zus", (size_t)(PATH_MAX - 1));
- VRFY((HDsscanf(substr, scan_format, tmp_buf) == 1), "HDsscanf succeeded");
+ snprintf(scan_format, sizeof(scan_format), "hdf5_file=%%%zus", (size_t)(PATH_MAX - 1));
+ VRFY((sscanf(substr, scan_format, tmp_buf) == 1), "sscanf succeeded");
- VRFY((HDstrcmp(tmp_buf, resolved_path) == 0), "HDstrcmp succeeded");
+ VRFY((strcmp(tmp_buf, resolved_path) == 0), "strcmp succeeded");
- substr = HDstrstr(config_buf, "subfile_dir");
- VRFY(substr, "HDstrstr succeeded");
+ substr = strstr(config_buf, "subfile_dir");
+ VRFY(substr, "strstr succeeded");
- HDsnprintf(scan_format, sizeof(scan_format), "subfile_dir=%%%zus", (size_t)(PATH_MAX - 1));
- VRFY((HDsscanf(substr, scan_format, tmp_buf) == 1), "HDsscanf succeeded");
+ snprintf(scan_format, sizeof(scan_format), "subfile_dir=%%%zus", (size_t)(PATH_MAX - 1));
+ VRFY((sscanf(substr, scan_format, tmp_buf) == 1), "sscanf succeeded");
- VRFY((HDstrcmp(tmp_buf, subfile_dir) == 0), "HDstrcmp succeeded");
+ VRFY((strcmp(tmp_buf, subfile_dir) == 0), "strcmp succeeded");
free(tmp_buf);
H5MM_free(subfile_dir);
@@ -403,20 +403,20 @@ test_config_file(void)
VRFY(subfile_name, "malloc succeeded");
/* Verify the name of each subfile is in the configuration file */
- num_digits = (int)(HDlog10(cfg.stripe_count) + 1);
+ num_digits = (int)(log10(cfg.stripe_count) + 1);
for (size_t i = 0; i < (size_t)cfg.stripe_count; i++) {
- HDsnprintf(subfile_name, PATH_MAX, H5FD_SUBFILING_FILENAME_TEMPLATE, SUBF_FILENAME,
- (uint64_t)file_info.st_ino, num_digits, (int)i + 1, cfg.stripe_count);
+ snprintf(subfile_name, PATH_MAX, H5FD_SUBFILING_FILENAME_TEMPLATE, SUBF_FILENAME,
+ (uint64_t)file_info.st_ino, num_digits, (int)i + 1, cfg.stripe_count);
- substr = HDstrstr(config_buf, subfile_name);
- VRFY(substr, "HDstrstr succeeded");
+ substr = strstr(config_buf, subfile_name);
+ VRFY(substr, "strstr succeeded");
}
/* Verify that there aren't too many subfiles */
- HDsnprintf(subfile_name, PATH_MAX, H5FD_SUBFILING_FILENAME_TEMPLATE, SUBF_FILENAME,
- (uint64_t)file_info.st_ino, num_digits, (int)cfg.stripe_count + 1, cfg.stripe_count);
- substr = HDstrstr(config_buf, subfile_name);
- VRFY(substr == NULL, "HDstrstr correctly failed");
+ snprintf(subfile_name, PATH_MAX, H5FD_SUBFILING_FILENAME_TEMPLATE, SUBF_FILENAME,
+ (uint64_t)file_info.st_ino, num_digits, (int)cfg.stripe_count + 1, cfg.stripe_count);
+ substr = strstr(config_buf, subfile_name);
+ VRFY(substr == NULL, "strstr correctly failed");
free(subfile_name);
free(config_buf);
@@ -507,7 +507,7 @@ test_stripe_sizes(void)
FILE *subfile_ptr;
num_subfiles = 1;
- num_digits = (int)(HDlog10(num_subfiles) + 1);
+ num_digits = (int)(log10(num_subfiles) + 1);
nbytes = (size_t)(cfg.stripe_size * num_subfiles);
@@ -518,7 +518,7 @@ test_stripe_sizes(void)
c_write_buf = write_buf;
- fapl_id = create_subfiling_ioc_fapl(MPI_COMM_SELF, MPI_INFO_NULL, TRUE, &cfg,
+ fapl_id = create_subfiling_ioc_fapl(MPI_COMM_SELF, MPI_INFO_NULL, true, &cfg,
H5FD_IOC_DEFAULT_THREAD_POOL_SIZE);
VRFY((fapl_id >= 0), "FAPL creation succeeded");
@@ -566,8 +566,8 @@ test_stripe_sizes(void)
h5_stat_size_t subfile_size;
h5_stat_t subfile_info;
- HDsnprintf(tmp_filename, PATH_MAX, H5FD_SUBFILING_FILENAME_TEMPLATE, SUBF_FILENAME,
- (uint64_t)file_info.st_ino, num_digits, j + 1, num_subfiles);
+ snprintf(tmp_filename, PATH_MAX, H5FD_SUBFILING_FILENAME_TEMPLATE, SUBF_FILENAME,
+ (uint64_t)file_info.st_ino, num_digits, j + 1, num_subfiles);
/* Ensure file exists */
subfile_ptr = fopen(tmp_filename, "r");
@@ -582,8 +582,8 @@ test_stripe_sizes(void)
}
/* Verify that there aren't too many subfiles */
- HDsnprintf(tmp_filename, PATH_MAX, H5FD_SUBFILING_FILENAME_TEMPLATE, SUBF_FILENAME,
- (uint64_t)file_info.st_ino, num_digits, num_subfiles + 1, num_subfiles);
+ snprintf(tmp_filename, PATH_MAX, H5FD_SUBFILING_FILENAME_TEMPLATE, SUBF_FILENAME,
+ (uint64_t)file_info.st_ino, num_digits, num_subfiles + 1, num_subfiles);
/* Ensure file doesn't exist */
subfile_ptr = fopen(tmp_filename, "r");
@@ -612,8 +612,8 @@ test_stripe_sizes(void)
h5_stat_size_t subfile_size;
h5_stat_t subfile_info;
- HDsnprintf(tmp_filename, PATH_MAX, H5FD_SUBFILING_FILENAME_TEMPLATE, SUBF_FILENAME,
- (uint64_t)file_info.st_ino, num_digits, j + 1, num_subfiles);
+ snprintf(tmp_filename, PATH_MAX, H5FD_SUBFILING_FILENAME_TEMPLATE, SUBF_FILENAME,
+ (uint64_t)file_info.st_ino, num_digits, j + 1, num_subfiles);
/* Ensure file exists */
subfile_ptr = fopen(tmp_filename, "r");
@@ -628,8 +628,8 @@ test_stripe_sizes(void)
}
/* Verify that there aren't too many subfiles */
- HDsnprintf(tmp_filename, PATH_MAX, H5FD_SUBFILING_FILENAME_TEMPLATE, SUBF_FILENAME,
- (uint64_t)file_info.st_ino, num_digits, num_subfiles + 1, num_subfiles);
+ snprintf(tmp_filename, PATH_MAX, H5FD_SUBFILING_FILENAME_TEMPLATE, SUBF_FILENAME,
+ (uint64_t)file_info.st_ino, num_digits, num_subfiles + 1, num_subfiles);
/* Ensure file doesn't exist */
subfile_ptr = fopen(tmp_filename, "r");
@@ -656,7 +656,7 @@ test_stripe_sizes(void)
cfg.stripe_count = num_iocs_g;
- fapl_id = create_subfiling_ioc_fapl(comm_g, info_g, TRUE, &cfg, H5FD_IOC_DEFAULT_THREAD_POOL_SIZE);
+ fapl_id = create_subfiling_ioc_fapl(comm_g, info_g, true, &cfg, H5FD_IOC_DEFAULT_THREAD_POOL_SIZE);
VRFY((fapl_id >= 0), "FAPL creation succeeded");
/* Create and close file with H5Fcreate to setup superblock */
@@ -669,7 +669,7 @@ test_stripe_sizes(void)
VRFY(file_ptr, "H5FDopen succeeded");
num_subfiles = num_iocs_g;
- num_digits = (int)(HDlog10(num_subfiles) + 1);
+ num_digits = (int)(log10(num_subfiles) + 1);
nbytes = (size_t)(cfg.stripe_size * num_subfiles);
@@ -732,8 +732,8 @@ test_stripe_sizes(void)
h5_stat_size_t subfile_size;
h5_stat_t subfile_info;
- HDsnprintf(tmp_filename, PATH_MAX, H5FD_SUBFILING_FILENAME_TEMPLATE, SUBF_FILENAME,
- (uint64_t)file_info.st_ino, num_digits, j + 1, num_subfiles);
+ snprintf(tmp_filename, PATH_MAX, H5FD_SUBFILING_FILENAME_TEMPLATE, SUBF_FILENAME,
+ (uint64_t)file_info.st_ino, num_digits, j + 1, num_subfiles);
/* Ensure file exists */
subfile_ptr = fopen(tmp_filename, "r");
@@ -748,8 +748,8 @@ test_stripe_sizes(void)
}
/* Verify that there aren't too many subfiles */
- HDsnprintf(tmp_filename, PATH_MAX, H5FD_SUBFILING_FILENAME_TEMPLATE, SUBF_FILENAME,
- (uint64_t)file_info.st_ino, num_digits, num_subfiles + 1, num_subfiles);
+ snprintf(tmp_filename, PATH_MAX, H5FD_SUBFILING_FILENAME_TEMPLATE, SUBF_FILENAME,
+ (uint64_t)file_info.st_ino, num_digits, num_subfiles + 1, num_subfiles);
/* Ensure file doesn't exist */
subfile_ptr = fopen(tmp_filename, "r");
@@ -789,8 +789,8 @@ test_stripe_sizes(void)
h5_stat_size_t subfile_size;
h5_stat_t subfile_info;
- HDsnprintf(tmp_filename, PATH_MAX, H5FD_SUBFILING_FILENAME_TEMPLATE, SUBF_FILENAME,
- (uint64_t)file_info.st_ino, num_digits, j + 1, num_subfiles);
+ snprintf(tmp_filename, PATH_MAX, H5FD_SUBFILING_FILENAME_TEMPLATE, SUBF_FILENAME,
+ (uint64_t)file_info.st_ino, num_digits, j + 1, num_subfiles);
/* Ensure file exists */
subfile_ptr = fopen(tmp_filename, "r");
@@ -805,8 +805,8 @@ test_stripe_sizes(void)
}
/* Verify that there aren't too many subfiles */
- HDsnprintf(tmp_filename, PATH_MAX, H5FD_SUBFILING_FILENAME_TEMPLATE, SUBF_FILENAME,
- (uint64_t)file_info.st_ino, num_digits, num_subfiles + 1, num_subfiles);
+ snprintf(tmp_filename, PATH_MAX, H5FD_SUBFILING_FILENAME_TEMPLATE, SUBF_FILENAME,
+ (uint64_t)file_info.st_ino, num_digits, num_subfiles + 1, num_subfiles);
/* Ensure file doesn't exist */
subfile_ptr = fopen(tmp_filename, "r");
@@ -908,7 +908,7 @@ test_selection_strategies(void)
else
stride = 16;
- HDsnprintf(sel_criteria, 128, "%d", stride);
+ snprintf(sel_criteria, 128, "%d", stride);
expected_num_subfiles = ((num_active_ranks - 1) / stride) + 1;
@@ -930,7 +930,7 @@ test_selection_strategies(void)
else
n_iocs = 16;
- HDsnprintf(sel_criteria, 128, "%d", n_iocs);
+ snprintf(sel_criteria, 128, "%d", n_iocs);
expected_num_subfiles = n_iocs;
@@ -946,10 +946,10 @@ test_selection_strategies(void)
}
if (criteria_format_choice == 0) {
- HDsnprintf(criteria_buf, 256, "%d:%s", strategy, sel_criteria);
+ snprintf(criteria_buf, 256, "%d:%s", strategy, sel_criteria);
}
else if (criteria_format_choice == 1) {
- HDsnprintf(criteria_buf, 256, "%s", sel_criteria);
+ snprintf(criteria_buf, 256, "%s", sel_criteria);
}
VRFY(HDsetenv(H5FD_SUBFILING_IOC_SELECTION_CRITERIA, criteria_buf, 1) >= 0,
@@ -965,7 +965,7 @@ test_selection_strategies(void)
if (num_active_ranks < mpi_size)
file_comm = MPI_COMM_SELF;
- fapl_id = create_subfiling_ioc_fapl(file_comm, info_g, TRUE, &cfg,
+ fapl_id = create_subfiling_ioc_fapl(file_comm, info_g, true, &cfg,
H5FD_IOC_DEFAULT_THREAD_POOL_SIZE);
VRFY((fapl_id >= 0), "FAPL creation succeeded");
@@ -977,12 +977,12 @@ test_selection_strategies(void)
*/
VRFY((HDstat(SUBF_FILENAME, &file_info) >= 0), "HDstat succeeded");
- num_digits = (int)(HDlog10(expected_num_subfiles) + 1);
+ num_digits = (int)(log10(expected_num_subfiles) + 1);
/* Ensure all the subfiles are present */
for (int i = 0; i < expected_num_subfiles; i++) {
- HDsnprintf(tmp_filename, PATH_MAX, H5FD_SUBFILING_FILENAME_TEMPLATE, SUBF_FILENAME,
- (uint64_t)file_info.st_ino, num_digits, i + 1, expected_num_subfiles);
+ snprintf(tmp_filename, PATH_MAX, H5FD_SUBFILING_FILENAME_TEMPLATE, SUBF_FILENAME,
+ (uint64_t)file_info.st_ino, num_digits, i + 1, expected_num_subfiles);
/* Ensure file exists */
subfile_ptr = fopen(tmp_filename, "r");
@@ -991,9 +991,9 @@ test_selection_strategies(void)
}
/* Ensure no extra subfiles are present */
- HDsnprintf(tmp_filename, PATH_MAX, H5FD_SUBFILING_FILENAME_TEMPLATE, SUBF_FILENAME,
- (uint64_t)file_info.st_ino, num_digits, expected_num_subfiles + 1,
- expected_num_subfiles);
+ snprintf(tmp_filename, PATH_MAX, H5FD_SUBFILING_FILENAME_TEMPLATE, SUBF_FILENAME,
+ (uint64_t)file_info.st_ino, num_digits, expected_num_subfiles + 1,
+ expected_num_subfiles);
/* Ensure file doesn't exist */
subfile_ptr = fopen(tmp_filename, "r");
@@ -1079,7 +1079,7 @@ test_read_different_stripe_size(void)
cfg.stripe_size = (stripe_size_g > 0) ? stripe_size_g : 1048576;
cfg.stripe_count = num_iocs_g;
- fapl_id = create_subfiling_ioc_fapl(comm_g, info_g, TRUE, &cfg, H5FD_IOC_DEFAULT_THREAD_POOL_SIZE);
+ fapl_id = create_subfiling_ioc_fapl(comm_g, info_g, true, &cfg, H5FD_IOC_DEFAULT_THREAD_POOL_SIZE);
VRFY((fapl_id >= 0), "FAPL creation succeeded");
file_id = H5Fcreate(SUBF_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
@@ -1132,7 +1132,7 @@ test_read_different_stripe_size(void)
h5_stat_t file_info;
FILE *subfile_ptr;
int num_subfiles = cfg.stripe_count;
- int num_digits = (int)(HDlog10(num_subfiles) + 1);
+ int num_digits = (int)(log10(num_subfiles) + 1);
VRFY((HDstat(SUBF_FILENAME, &file_info) >= 0), "HDstat succeeded");
@@ -1140,8 +1140,8 @@ test_read_different_stripe_size(void)
h5_stat_size_t subfile_size;
h5_stat_t subfile_info;
- HDsnprintf(tmp_filename, PATH_MAX, H5FD_SUBFILING_FILENAME_TEMPLATE, SUBF_FILENAME,
- (uint64_t)file_info.st_ino, num_digits, j + 1, num_subfiles);
+ snprintf(tmp_filename, PATH_MAX, H5FD_SUBFILING_FILENAME_TEMPLATE, SUBF_FILENAME,
+ (uint64_t)file_info.st_ino, num_digits, j + 1, num_subfiles);
/* Ensure file exists */
subfile_ptr = fopen(tmp_filename, "r");
@@ -1163,7 +1163,7 @@ test_read_different_stripe_size(void)
cfg.stripe_size += (cfg.stripe_size / 2);
cfg.stripe_count *= 2;
- fapl_id = create_subfiling_ioc_fapl(comm_g, info_g, TRUE, &cfg, H5FD_IOC_DEFAULT_THREAD_POOL_SIZE);
+ fapl_id = create_subfiling_ioc_fapl(comm_g, info_g, true, &cfg, H5FD_IOC_DEFAULT_THREAD_POOL_SIZE);
VRFY((fapl_id >= 0), "FAPL creation succeeded");
file_id = H5Fopen(SUBF_FILENAME, H5F_ACC_RDONLY, fapl_id);
@@ -1205,13 +1205,13 @@ test_read_different_stripe_size(void)
h5_stat_t file_info;
FILE *subfile_ptr;
int num_subfiles = cfg.stripe_count;
- int num_digits = (int)(HDlog10(num_subfiles / 2) + 1);
+ int num_digits = (int)(log10(num_subfiles / 2) + 1);
VRFY((HDstat(SUBF_FILENAME, &file_info) >= 0), "HDstat succeeded");
for (int j = 0; j < num_subfiles; j++) {
- HDsnprintf(tmp_filename, PATH_MAX, H5FD_SUBFILING_FILENAME_TEMPLATE, SUBF_FILENAME,
- (uint64_t)file_info.st_ino, num_digits, j + 1, num_subfiles / 2);
+ snprintf(tmp_filename, PATH_MAX, H5FD_SUBFILING_FILENAME_TEMPLATE, SUBF_FILENAME,
+ (uint64_t)file_info.st_ino, num_digits, j + 1, num_subfiles / 2);
if (j < (num_subfiles / 2)) {
/* Ensure file exists */
@@ -1317,7 +1317,7 @@ test_subfiling_precreate_rank_0(void)
cfg.stripe_size = (stripe_size_g > 0) ? stripe_size_g : H5FD_SUBFILING_DEFAULT_STRIPE_SIZE;
cfg.stripe_count = num_iocs_g;
- fapl_id = create_subfiling_ioc_fapl(MPI_COMM_SELF, MPI_INFO_NULL, TRUE, &cfg,
+ fapl_id = create_subfiling_ioc_fapl(MPI_COMM_SELF, MPI_INFO_NULL, true, &cfg,
H5FD_IOC_DEFAULT_THREAD_POOL_SIZE);
VRFY((fapl_id >= 0), "FAPL creation succeeded");
@@ -1353,7 +1353,7 @@ test_subfiling_precreate_rank_0(void)
*/
num_subfiles = cfg.stripe_count;
- num_digits = (int)(HDlog10(num_subfiles) + 1);
+ num_digits = (int)(log10(num_subfiles) + 1);
VRFY((HDstat(SUBF_FILENAME, &file_info) >= 0), "HDstat succeeded");
@@ -1363,8 +1363,8 @@ test_subfiling_precreate_rank_0(void)
for (int i = 0; i < num_subfiles; i++) {
h5_stat_t subfile_info;
- HDsnprintf(tmp_filename, PATH_MAX, H5FD_SUBFILING_FILENAME_TEMPLATE, SUBF_FILENAME,
- (uint64_t)file_info.st_ino, num_digits, i + 1, num_subfiles);
+ snprintf(tmp_filename, PATH_MAX, H5FD_SUBFILING_FILENAME_TEMPLATE, SUBF_FILENAME,
+ (uint64_t)file_info.st_ino, num_digits, i + 1, num_subfiles);
/* Ensure file exists */
subfile_ptr = fopen(tmp_filename, "r");
@@ -1379,8 +1379,8 @@ test_subfiling_precreate_rank_0(void)
}
/* Verify that there aren't too many subfiles */
- HDsnprintf(tmp_filename, PATH_MAX, H5FD_SUBFILING_FILENAME_TEMPLATE, SUBF_FILENAME,
- (uint64_t)file_info.st_ino, num_digits, num_subfiles + 1, num_subfiles);
+ snprintf(tmp_filename, PATH_MAX, H5FD_SUBFILING_FILENAME_TEMPLATE, SUBF_FILENAME,
+ (uint64_t)file_info.st_ino, num_digits, num_subfiles + 1, num_subfiles);
/* Ensure file doesn't exist */
subfile_ptr = fopen(tmp_filename, "r");
@@ -1395,7 +1395,7 @@ test_subfiling_precreate_rank_0(void)
/* Open the file on all ranks */
- fapl_id = create_subfiling_ioc_fapl(comm_g, info_g, FALSE, NULL, 0);
+ fapl_id = create_subfiling_ioc_fapl(comm_g, info_g, false, NULL, 0);
VRFY((fapl_id >= 0), "FAPL creation succeeded");
file_id = H5Fopen(SUBF_FILENAME, H5F_ACC_RDONLY, fapl_id);
@@ -1481,7 +1481,7 @@ test_subfiling_write_many_read_one(void)
TESTING_2("reading back file with single MPI rank");
/* Get a default Subfiling FAPL */
- fapl_id = create_subfiling_ioc_fapl(comm_g, info_g, FALSE, NULL, 0);
+ fapl_id = create_subfiling_ioc_fapl(comm_g, info_g, false, NULL, 0);
VRFY((fapl_id >= 0), "FAPL creation succeeded");
/* Create file on all ranks */
@@ -1541,7 +1541,7 @@ test_subfiling_write_many_read_one(void)
VRFY((mpi_code_g == MPI_SUCCESS), "MPI_Barrier succeeded");
if (MAINPROCESS) {
- fapl_id = create_subfiling_ioc_fapl(MPI_COMM_SELF, MPI_INFO_NULL, FALSE, NULL, 0);
+ fapl_id = create_subfiling_ioc_fapl(MPI_COMM_SELF, MPI_INFO_NULL, false, NULL, 0);
VRFY((fapl_id >= 0), "FAPL creation succeeded");
file_id = H5Fopen(SUBF_FILENAME, H5F_ACC_RDONLY, fapl_id);
@@ -1606,7 +1606,7 @@ test_subfiling_write_many_read_few(void)
hsize_t start[1];
hsize_t count[1];
hsize_t dset_dims[1];
- hbool_t reading_file = FALSE;
+ bool reading_file = false;
size_t target_size;
hid_t file_id = H5I_INVALID_HID;
hid_t fapl_id = H5I_INVALID_HID;
@@ -1637,7 +1637,7 @@ test_subfiling_write_many_read_few(void)
}
/* Get a default Subfiling FAPL */
- fapl_id = create_subfiling_ioc_fapl(comm_g, info_g, FALSE, NULL, 0);
+ fapl_id = create_subfiling_ioc_fapl(comm_g, info_g, false, NULL, 0);
VRFY((fapl_id >= 0), "FAPL creation succeeded");
/* Create file on all ranks */
@@ -1717,17 +1717,17 @@ test_subfiling_write_many_read_few(void)
}
if (color)
- reading_file = TRUE;
+ reading_file = true;
}
else {
if (node_local_rank == 0) {
sub_comm = ioc_comm;
- reading_file = TRUE;
+ reading_file = true;
}
}
if (reading_file) {
- fapl_id = create_subfiling_ioc_fapl(sub_comm, MPI_INFO_NULL, FALSE, NULL, 0);
+ fapl_id = create_subfiling_ioc_fapl(sub_comm, MPI_INFO_NULL, false, NULL, 0);
VRFY((fapl_id >= 0), "FAPL creation succeeded");
file_id = H5Fopen(SUBF_FILENAME, H5F_ACC_RDONLY, fapl_id);
@@ -1848,7 +1848,7 @@ test_subfiling_h5fuse(void)
}
/* Get a default Subfiling FAPL */
- fapl_id = create_subfiling_ioc_fapl(comm_g, info_g, FALSE, NULL, 0);
+ fapl_id = create_subfiling_ioc_fapl(comm_g, info_g, false, NULL, 0);
VRFY((fapl_id >= 0), "FAPL creation succeeded");
/* Create file on all ranks */
@@ -1935,16 +1935,15 @@ test_subfiling_h5fuse(void)
VRFY(tmp_filename, "malloc succeeded");
/* Generate name for configuration file */
- HDsnprintf(tmp_filename, PATH_MAX, "%s/" H5FD_SUBFILING_CONFIG_FILENAME_TEMPLATE, config_dir,
- SUBF_FILENAME, file_inode);
+ snprintf(tmp_filename, PATH_MAX, "%s/" H5FD_SUBFILING_CONFIG_FILENAME_TEMPLATE, config_dir,
+ SUBF_FILENAME, file_inode);
- args[0] = HDstrdup("env");
- args[1] = HDstrdup("sh");
- args[2] = HDstrdup("h5fuse.sh");
- args[3] = HDstrdup("-q");
- args[4] = HDstrdup("-f");
- args[5] = tmp_filename;
- args[6] = NULL;
+ args[0] = strdup("env");
+ args[1] = strdup("./h5fuse.sh");
+ args[2] = strdup("-q");
+ args[3] = strdup("-f");
+ args[4] = tmp_filename;
+ args[5] = NULL;
/* Call h5fuse script from MPI rank 0 */
execvp("env", args);
@@ -2013,7 +2012,7 @@ test_subfiling_h5fuse(void)
if (MAINPROCESS) {
char *filename_buf;
int num_subfiles = num_iocs_g;
- int num_digits = (int)(HDlog10(num_subfiles) + 1);
+ int num_digits = (int)(log10(num_subfiles) + 1);
/* Delete the regular HDF5 file */
H5Pset_fapl_sec2(fapl_id);
@@ -2028,8 +2027,8 @@ test_subfiling_h5fuse(void)
VRFY(filename_buf, "malloc succeeded");
/* Generate name for configuration file */
- HDsnprintf(filename_buf, PATH_MAX, "%s/" H5FD_SUBFILING_CONFIG_FILENAME_TEMPLATE, config_dir,
- SUBF_FILENAME, file_inode);
+ snprintf(filename_buf, PATH_MAX, "%s/" H5FD_SUBFILING_CONFIG_FILENAME_TEMPLATE, config_dir,
+ SUBF_FILENAME, file_inode);
/* Delete the configuration file */
if (HDremove(filename_buf) < 0) {
@@ -2039,8 +2038,8 @@ test_subfiling_h5fuse(void)
for (int i = 0; i < num_subfiles; i++) {
/* Generate name for each subfile */
- HDsnprintf(filename_buf, PATH_MAX, H5FD_SUBFILING_FILENAME_TEMPLATE, SUBF_FILENAME, file_inode,
- num_digits, i + 1, num_subfiles);
+ snprintf(filename_buf, PATH_MAX, H5FD_SUBFILING_FILENAME_TEMPLATE, SUBF_FILENAME, file_inode,
+ num_digits, i + 1, num_subfiles);
/* Delete the subfile */
if (HDremove(filename_buf) < 0) {
@@ -2072,13 +2071,13 @@ parse_subfiling_env_vars(void)
{
char *env_value;
- if (NULL != (env_value = HDgetenv(H5FD_SUBFILING_STRIPE_SIZE))) {
+ if (NULL != (env_value = getenv(H5FD_SUBFILING_STRIPE_SIZE))) {
stripe_size_g = strtoll(env_value, NULL, 0);
if ((ERANGE == errno) || (stripe_size_g <= 0))
stripe_size_g = -1;
}
- if (NULL != (env_value = HDgetenv(H5FD_SUBFILING_IOC_PER_NODE))) {
+ if (NULL != (env_value = getenv(H5FD_SUBFILING_IOC_PER_NODE))) {
ioc_per_node_g = strtol(env_value, NULL, 0);
if ((ERANGE == errno) || (ioc_per_node_g <= 0))
ioc_per_node_g = -1;
@@ -2092,16 +2091,16 @@ parse_subfiling_env_vars(void)
ioc_per_node_g = node_local_size;
}
- if (NULL != (env_value = HDgetenv(H5FD_IOC_THREAD_POOL_SIZE))) {
+ if (NULL != (env_value = getenv(H5FD_IOC_THREAD_POOL_SIZE))) {
ioc_thread_pool_size_g = atoi(env_value);
if (ioc_thread_pool_size_g <= 0)
ioc_thread_pool_size_g = -1;
}
- if (NULL != (env_value = HDgetenv(H5FD_SUBFILING_CONFIG_FILE_PREFIX))) {
+ if (NULL != (env_value = getenv(H5FD_SUBFILING_CONFIG_FILE_PREFIX))) {
assert(config_dir);
- HDstrncpy(config_dir, env_value, PATH_MAX);
+ strncpy(config_dir, env_value, PATH_MAX);
/* Just in case.. */
config_dir[PATH_MAX - 1] = '\0';
@@ -2117,11 +2116,10 @@ int
main(int argc, char **argv)
{
unsigned seed;
- hbool_t must_unset_stripe_size_env = FALSE;
- hbool_t must_unset_ioc_per_node_env = FALSE;
- hbool_t must_unset_ioc_thread_count_env = FALSE;
- hbool_t must_unset_config_dir_env = FALSE;
- char *env_value = NULL;
+ bool must_unset_stripe_size_env = false;
+ bool must_unset_ioc_per_node_env = false;
+ bool must_unset_ioc_thread_count_env = false;
+ bool must_unset_config_dir_env = false;
int required = MPI_THREAD_MULTIPLE;
int provided = 0;
@@ -2257,7 +2255,7 @@ main(int argc, char **argv)
}
/* Initialize to current working directory for now */
- HDsnprintf(config_dir, PATH_MAX, ".");
+ snprintf(config_dir, PATH_MAX, ".");
/* Grab values from environment variables if set */
parse_subfiling_env_vars();
@@ -2283,7 +2281,7 @@ main(int argc, char **argv)
}
if (MAINPROCESS)
- HDputs("");
+ puts("");
/*
* Set any unset Subfiling environment variables and re-run
@@ -2308,7 +2306,7 @@ main(int argc, char **argv)
VRFY((mpi_code_g == MPI_SUCCESS), "MPI_Bcast succeeded");
}
- HDsnprintf(tmp, sizeof(tmp), "%" PRId64, stripe_size);
+ snprintf(tmp, sizeof(tmp), "%" PRId64, stripe_size);
if (HDsetenv(H5FD_SUBFILING_STRIPE_SIZE, tmp, 1) < 0) {
if (MAINPROCESS)
@@ -2317,7 +2315,7 @@ main(int argc, char **argv)
goto exit;
}
- must_unset_stripe_size_env = TRUE;
+ must_unset_stripe_size_env = true;
}
if (ioc_per_node_g < 0) {
const char *ioc_per_node_str;
@@ -2334,7 +2332,7 @@ main(int argc, char **argv)
goto exit;
}
- must_unset_ioc_per_node_env = TRUE;
+ must_unset_ioc_per_node_env = true;
}
if (ioc_thread_pool_size_g < 0) {
if (HDsetenv(H5FD_IOC_THREAD_POOL_SIZE, "2", 1) < 0) {
@@ -2344,10 +2342,10 @@ main(int argc, char **argv)
goto exit;
}
- must_unset_ioc_thread_count_env = TRUE;
+ must_unset_ioc_thread_count_env = true;
}
- if (!(env_value = HDgetenv(H5FD_SUBFILING_CONFIG_FILE_PREFIX))) {
+ if (NULL == getenv(H5FD_SUBFILING_CONFIG_FILE_PREFIX)) {
int rand_value = 0;
if (MAINPROCESS)
@@ -2397,7 +2395,7 @@ main(int argc, char **argv)
}
}
- must_unset_config_dir_env = TRUE;
+ must_unset_config_dir_env = true;
}
/* Grab values from environment variables */
@@ -2428,13 +2426,13 @@ main(int argc, char **argv)
}
if (MAINPROCESS)
- HDputs("");
+ puts("");
if (nerrors)
goto exit;
if (MAINPROCESS)
- HDputs("All Subfiling VFD tests passed\n");
+ puts("All Subfiling VFD tests passed\n");
exit:
if (must_unset_stripe_size_env)
diff --git a/testpar/t_vfd.c b/testpar/t_vfd.c
index 5e9070d651e..ac524ac8647 100644
--- a/testpar/t_vfd.c
+++ b/testpar/t_vfd.c
@@ -29,8 +29,8 @@
static MPI_Comm comm = MPI_COMM_WORLD;
static MPI_Info info = MPI_INFO_NULL;
-hbool_t pass = TRUE; /* set to FALSE on error */
-hbool_t disp_failure_mssgs = TRUE; /* global force display of failure messages */
+bool pass = true; /* set to false on error */
+bool disp_failure_mssgs = true; /* global force display of failure messages */
const char *failure_mssg = NULL;
const char *FILENAMES[] = {"mpio_vfd_test_file_0", /*0*/
@@ -162,7 +162,7 @@ int *erbufs[2] = {NULL, NULL}; /* Array of expected read buffers */
if (err_result == 0) \
PASSED(); \
else \
- HDputs(" ***TEST FAILED***"); \
+ puts(" ***TEST FAILED***"); \
} \
} while (0)
@@ -170,7 +170,7 @@ int *erbufs[2] = {NULL, NULL}; /* Array of expected read buffers */
static herr_t test_selection_io_read_verify(hid_t dxpl, int mpi_rank, hsize_t start[], hsize_t block[],
H5FD_t *lf, H5FD_mem_t type, uint32_t count, hid_t mem_spaces[],
hid_t file_spaces[], haddr_t offsets[], size_t element_sizes[],
- uint32_t rbufcount, int *erb[], hbool_t shorten_rbufs);
+ uint32_t rbufcount, int *erb[], bool shorten_rbufs);
static herr_t test_selection_io_write(hid_t dxpl, H5FD_t *lf, H5FD_mem_t type, uint32_t count,
hid_t mem_spaces[], hid_t file_spaces[], haddr_t offsets[],
@@ -218,9 +218,9 @@ alloc_and_init_file_images(int mpi_size)
int buf_len;
size_t buf_size;
int i;
- hbool_t show_progress = FALSE;
+ bool show_progress = false;
- pass = TRUE;
+ pass = true;
if (show_progress)
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -240,7 +240,7 @@ alloc_and_init_file_images(int mpi_size)
if ((!increasing_fi_buf) || (!decreasing_fi_buf) || (!negative_fi_buf) || (!zero_fi_buf) ||
(!read_fi_buf)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Can't allocate one or more file image buffers.";
}
}
@@ -348,11 +348,11 @@ setup_vfd_test_file(int file_name_id, char *file_name, int mpi_size, H5FD_mpio_x
const char *fcn_name = "setup_vfd_test_file()";
char filename[512];
int cp = 0;
- hbool_t show_progress = FALSE;
- hid_t fapl_id = -1; /* file access property list ID */
- hid_t dxpl_id = -1; /* data access property list ID */
- unsigned flags = 0; /* file open flags */
- H5FD_t *lf = NULL; /* VFD struct ptr */
+ bool show_progress = false;
+ hid_t fapl_id = H5I_INVALID_HID; /* file access property list ID */
+ hid_t dxpl_id = H5I_INVALID_HID; /* data access property list ID */
+ unsigned flags = 0; /* file open flags */
+ H5FD_t *lf = NULL; /* VFD struct ptr */
assert(vfd_name);
assert(lf_ptr);
@@ -368,7 +368,7 @@ setup_vfd_test_file(int file_name_id, char *file_name, int mpi_size, H5FD_mpio_x
if (h5_fixname(FILENAMES[file_name_id], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -381,23 +381,23 @@ setup_vfd_test_file(int file_name_id, char *file_name, int mpi_size, H5FD_mpio_x
if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Can't create fapl.";
}
}
if (pass) {
- if (HDstrcmp(vfd_name, "mpio") == 0) {
+ if (strcmp(vfd_name, "mpio") == 0) {
if (H5Pset_fapl_mpio(fapl_id, comm, info) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Can't set mpio fapl.";
}
}
#ifdef H5_HAVE_SUBFILING_VFD
- else if (HDstrcmp(vfd_name, H5FD_SUBFILING_NAME) == 0) {
+ else if (strcmp(vfd_name, H5FD_SUBFILING_NAME) == 0) {
H5FD_subfiling_params_t shared_conf = {
/* ioc_selection = */ SELECT_IOC_ONE_PER_NODE,
@@ -408,7 +408,7 @@ setup_vfd_test_file(int file_name_id, char *file_name, int mpi_size, H5FD_mpio_x
/* magic = */ H5FD_SUBFILING_FAPL_MAGIC,
/* version = */ H5FD_SUBFILING_CURR_FAPL_VERSION,
/* ioc_fapl_id = */ H5P_DEFAULT, /* will over write? */
- /* require_ioc = */ TRUE,
+ /* require_ioc = */ true,
/* shared_cfg = */ shared_conf,
};
H5FD_ioc_config_t ioc_config = {
@@ -420,21 +420,21 @@ setup_vfd_test_file(int file_name_id, char *file_name, int mpi_size, H5FD_mpio_x
if ((pass) && ((ioc_fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Can't create ioc fapl.";
}
/* set the MPI communicator and info in the FAPL */
if (H5Pset_mpi_params(ioc_fapl, comm, info) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Can't set MPI communicator and info in IOC fapl.";
}
/* set the MPI communicator and info in the FAPL */
if (H5Pset_mpi_params(fapl_id, comm, info) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Can't set MPI communicator and info in subfiling fapl.";
}
@@ -444,7 +444,7 @@ setup_vfd_test_file(int file_name_id, char *file_name, int mpi_size, H5FD_mpio_x
/* Get subfiling VFD defaults */
if ((pass) && (H5Pget_fapl_subfiling(fapl_id, &subfiling_conf) == FAIL)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Can't get sub-filing VFD defaults.";
}
@@ -453,14 +453,14 @@ setup_vfd_test_file(int file_name_id, char *file_name, int mpi_size, H5FD_mpio_x
/* Get IOC VFD defaults */
if ((pass) && ((H5Pget_fapl_ioc(ioc_fapl, &ioc_config) == FAIL))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Can't get IOC VFD defaults.";
}
/* Now we can set the IOC fapl. */
if ((pass) && ((H5Pset_fapl_ioc(ioc_fapl, &ioc_config) == FAIL))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Can't set IOC fapl.";
}
}
@@ -468,7 +468,7 @@ setup_vfd_test_file(int file_name_id, char *file_name, int mpi_size, H5FD_mpio_x
if ((pass) && ((H5Pset_fapl_sec2(ioc_fapl) == FAIL))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Can't set sec2 fapl.";
}
}
@@ -479,13 +479,13 @@ setup_vfd_test_file(int file_name_id, char *file_name, int mpi_size, H5FD_mpio_x
/* Now we can set the SUBFILING fapl before returning. */
if ((pass) && (H5Pset_fapl_subfiling(fapl_id, &subfiling_conf) == FAIL)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Can't set subfiling fapl.";
}
}
#endif
else {
- pass = FALSE;
+ pass = false;
failure_mssg = "un-supported VFD";
}
}
@@ -498,7 +498,7 @@ setup_vfd_test_file(int file_name_id, char *file_name, int mpi_size, H5FD_mpio_x
if (h5_fixname(FILENAMES[file_name_id], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -514,7 +514,7 @@ setup_vfd_test_file(int file_name_id, char *file_name, int mpi_size, H5FD_mpio_x
if (NULL == (lf = H5FDopen(filename, flags, fapl_id, HADDR_UNDEF))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5FDopen() failed.\n";
}
}
@@ -530,7 +530,7 @@ setup_vfd_test_file(int file_name_id, char *file_name, int mpi_size, H5FD_mpio_x
if (H5FDset_eoa(lf, H5FD_MEM_DEFAULT, eoa) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5FDset_eoa() failed.\n";
}
}
@@ -544,7 +544,7 @@ setup_vfd_test_file(int file_name_id, char *file_name, int mpi_size, H5FD_mpio_x
if (dxpl_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pcreate(H5P_DATASET_XFER) failed.";
}
}
@@ -556,7 +556,7 @@ setup_vfd_test_file(int file_name_id, char *file_name, int mpi_size, H5FD_mpio_x
if (H5Pset_dxpl_mpio(dxpl_id, xfer_mode) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_dxpl_mpio() failed.";
}
}
@@ -568,14 +568,14 @@ setup_vfd_test_file(int file_name_id, char *file_name, int mpi_size, H5FD_mpio_x
if (H5Pset_dxpl_mpio_collective_opt(dxpl_id, coll_opt_mode) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_dxpl_mpio() failed.";
}
}
if (pass) { /* setup pointers with return values */
- HDstrncpy(file_name, filename, 512);
+ strncpy(file_name, filename, 512);
*lf_ptr = lf;
*fapl_id_ptr = fapl_id;
*dxpl_id_ptr = dxpl_id;
@@ -612,7 +612,7 @@ takedown_vfd_test_file(int mpi_rank, char *filename, H5FD_t **lf_ptr, hid_t *fap
{
const char *fcn_name = "takedown_vfd_test_file()";
int cp = 0;
- hbool_t show_progress = FALSE;
+ bool show_progress = false;
assert(lf_ptr);
assert(fapl_id_ptr);
@@ -629,7 +629,7 @@ takedown_vfd_test_file(int mpi_rank, char *filename, H5FD_t **lf_ptr, hid_t *fap
if (H5FDclose(*lf_ptr) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5FDclose() failed.\n";
}
}
@@ -647,7 +647,7 @@ takedown_vfd_test_file(int mpi_rank, char *filename, H5FD_t **lf_ptr, hid_t *fap
if ((mpi_rank == 0) && (HDremove(filename) < 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -661,7 +661,7 @@ takedown_vfd_test_file(int mpi_rank, char *filename, H5FD_t **lf_ptr, hid_t *fap
/* Close the fapl */
if (H5Pclose(*fapl_id_ptr) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't close fapl.\n";
}
@@ -671,7 +671,7 @@ takedown_vfd_test_file(int mpi_rank, char *filename, H5FD_t **lf_ptr, hid_t *fap
/* Close the dxpl */
if (H5Pclose(*dxpl_id_ptr) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't close dxpl.\n";
}
@@ -718,7 +718,7 @@ takedown_vfd_test_file(int mpi_rank, char *filename, H5FD_t **lf_ptr, hid_t *fap
*
* 7) On rank 0, delete the test file.
*
- * Return: FALSE on success, TRUE if any errors are detected.
+ * Return: false on success, true if any errors are detected.
*
*-------------------------------------------------------------------------
*/
@@ -731,10 +731,10 @@ vector_read_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
char test_title[120];
char filename[512];
haddr_t eoa;
- hbool_t show_progress = FALSE;
- hid_t fapl_id = -1; /* file access property list ID */
- hid_t dxpl_id = -1; /* data access property list ID */
- H5FD_t *lf = NULL; /* VFD struct ptr */
+ bool show_progress = false;
+ hid_t fapl_id = H5I_INVALID_HID; /* file access property list ID */
+ hid_t dxpl_id = H5I_INVALID_HID; /* data access property list ID */
+ H5FD_t *lf = NULL; /* VFD struct ptr */
int cp = 0;
int i;
uint32_t count;
@@ -743,26 +743,26 @@ vector_read_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
size_t sizes[1];
void *bufs[1];
- pass = TRUE;
+ pass = true;
if (mpi_rank == 0) {
if (xfer_mode == H5FD_MPIO_INDEPENDENT) {
- HDsnprintf(test_title, sizeof(test_title), "parallel vector read test 1 -- %s / independent",
- vfd_name);
+ snprintf(test_title, sizeof(test_title), "parallel vector read test 1 -- %s / independent",
+ vfd_name);
}
else if (coll_opt_mode == H5FD_MPIO_INDIVIDUAL_IO) {
- HDsnprintf(test_title, sizeof(test_title), "parallel vector read test 1 -- %s / col op / ind I/O",
- vfd_name);
+ snprintf(test_title, sizeof(test_title), "parallel vector read test 1 -- %s / col op / ind I/O",
+ vfd_name);
}
else {
assert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO);
- HDsnprintf(test_title, sizeof(test_title), "parallel vector read test 1 -- %s / col op / col I/O",
- vfd_name);
+ snprintf(test_title, sizeof(test_title), "parallel vector read test 1 -- %s / col op / col I/O",
+ vfd_name);
}
TESTING(test_title);
@@ -797,7 +797,7 @@ vector_read_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
if (H5FDwrite(lf, H5FD_MEM_DRAW, H5P_DEFAULT, (haddr_t)0, image_size, (void *)increasing_fi_buf) <
0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5FDwrite() on rank 0 failed.\n";
}
}
@@ -837,7 +837,7 @@ vector_read_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
if (H5FDread_vector(lf, dxpl_id, count, types, addrs, sizes, bufs) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5FDread_vector() failed.\n";
}
@@ -847,7 +847,7 @@ vector_read_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
if (read_fi_buf[i] != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected value in read_fi_buf (1).\n";
break;
}
@@ -856,7 +856,7 @@ vector_read_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
if (read_fi_buf[i] != increasing_fi_buf[i]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected value in read_fi_buf (2).\n";
break;
}
@@ -948,7 +948,7 @@ vector_read_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
*
* 11) On rank 0, delete the test file.
*
- * Return: FALSE on success, TRUE if any errors are detected.
+ * Return: false on success, true if any errors are detected.
*
*-------------------------------------------------------------------------
*/
@@ -961,10 +961,10 @@ vector_read_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
char test_title[120];
char filename[512];
haddr_t eoa;
- hbool_t show_progress = FALSE;
- hid_t fapl_id = -1; /* file access property list ID */
- hid_t dxpl_id = -1; /* data access property list ID */
- H5FD_t *lf = NULL; /* VFD struct ptr */
+ bool show_progress = false;
+ hid_t fapl_id = H5I_INVALID_HID; /* file access property list ID */
+ hid_t dxpl_id = H5I_INVALID_HID; /* data access property list ID */
+ H5FD_t *lf = NULL; /* VFD struct ptr */
int cp = 0;
int i;
uint32_t count;
@@ -973,26 +973,26 @@ vector_read_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
size_t sizes[1];
void *bufs[1];
- pass = TRUE;
+ pass = true;
if (mpi_rank == 0) {
if (xfer_mode == H5FD_MPIO_INDEPENDENT) {
- HDsnprintf(test_title, sizeof(test_title), "parallel vector read test 2 -- %s / independent",
- vfd_name);
+ snprintf(test_title, sizeof(test_title), "parallel vector read test 2 -- %s / independent",
+ vfd_name);
}
else if (coll_opt_mode == H5FD_MPIO_INDIVIDUAL_IO) {
- HDsnprintf(test_title, sizeof(test_title), "parallel vector read test 2 -- %s / col op / ind I/O",
- vfd_name);
+ snprintf(test_title, sizeof(test_title), "parallel vector read test 2 -- %s / col op / ind I/O",
+ vfd_name);
}
else {
assert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO);
- HDsnprintf(test_title, sizeof(test_title), "parallel vector read test 2 -- %s / col op / col I/O",
- vfd_name);
+ snprintf(test_title, sizeof(test_title), "parallel vector read test 2 -- %s / col op / col I/O",
+ vfd_name);
}
TESTING(test_title);
@@ -1027,7 +1027,7 @@ vector_read_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
if (H5FDwrite(lf, H5FD_MEM_DRAW, H5P_DEFAULT, (haddr_t)0, image_size, (void *)decreasing_fi_buf) <
0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5FDwrite() on rank 0 failed.\n";
}
}
@@ -1076,7 +1076,7 @@ vector_read_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
if (H5FDread_vector(lf, dxpl_id, count, types, addrs, sizes, bufs) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5FDread_vector() failed.\n";
}
}
@@ -1115,7 +1115,7 @@ vector_read_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
if (H5FDread_vector(lf, dxpl_id, count, types, addrs, sizes, bufs) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5FDread_vector() failed.\n";
}
}
@@ -1138,7 +1138,7 @@ vector_read_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
if (read_fi_buf[i] != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected value in read_fi_buf (1).\n";
break;
}
@@ -1147,7 +1147,7 @@ vector_read_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
if (read_fi_buf[i] != decreasing_fi_buf[i]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected value in read_fi_buf (2).\n";
break;
}
@@ -1245,7 +1245,7 @@ vector_read_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
*
* 9) On rank 0, delete the test file.
*
- * Return: FALSE on success, TRUE if any errors are detected.
+ * Return: false on success, true if any errors are detected.
*
*-------------------------------------------------------------------------
*/
@@ -1262,10 +1262,10 @@ vector_read_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
int32_t buf_2[(INTS_PER_RANK / 4) + 1];
int32_t buf_3[(INTS_PER_RANK / 4) + 1];
haddr_t eoa;
- hbool_t show_progress = FALSE;
- hid_t fapl_id = -1; /* file access property list ID */
- hid_t dxpl_id = -1; /* data access property list ID */
- H5FD_t *lf = NULL; /* VFD struct ptr */
+ bool show_progress = false;
+ hid_t fapl_id = H5I_INVALID_HID; /* file access property list ID */
+ hid_t dxpl_id = H5I_INVALID_HID; /* data access property list ID */
+ H5FD_t *lf = NULL; /* VFD struct ptr */
int cp = 0;
int i;
uint32_t count;
@@ -1274,26 +1274,26 @@ vector_read_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
size_t sizes[4];
void *bufs[4];
- pass = TRUE;
+ pass = true;
if (mpi_rank == 0) {
if (xfer_mode == H5FD_MPIO_INDEPENDENT) {
- HDsnprintf(test_title, sizeof(test_title), "parallel vector read test 3 -- %s / independent",
- vfd_name);
+ snprintf(test_title, sizeof(test_title), "parallel vector read test 3 -- %s / independent",
+ vfd_name);
}
else if (coll_opt_mode == H5FD_MPIO_INDIVIDUAL_IO) {
- HDsnprintf(test_title, sizeof(test_title), "parallel vector read test 3 -- %s / col op / ind I/O",
- vfd_name);
+ snprintf(test_title, sizeof(test_title), "parallel vector read test 3 -- %s / col op / ind I/O",
+ vfd_name);
}
else {
assert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO);
- HDsnprintf(test_title, sizeof(test_title), "parallel vector read test 3 -- %s / col op / col I/O",
- vfd_name);
+ snprintf(test_title, sizeof(test_title), "parallel vector read test 3 -- %s / col op / col I/O",
+ vfd_name);
}
TESTING(test_title);
@@ -1328,7 +1328,7 @@ vector_read_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
if (H5FDwrite(lf, H5FD_MEM_DRAW, H5P_DEFAULT, (haddr_t)0, image_size, (void *)negative_fi_buf) <
0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5FDwrite() on rank 0 failed.\n";
}
}
@@ -1420,7 +1420,7 @@ vector_read_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
if (H5FDread_vector(lf, dxpl_id, count, types, addrs, sizes, bufs) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5FDread_vector() failed.\n";
}
}
@@ -1441,7 +1441,7 @@ vector_read_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
if (((mpi_rank % 2 == 0) && (buf_0[i] != negative_fi_buf[base_index + i])) ||
((mpi_rank % 2 == 1) && (buf_3[i] != negative_fi_buf[base_index + i]))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected value in buf (1).\n";
}
}
@@ -1453,7 +1453,7 @@ vector_read_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
if (((mpi_rank % 2 == 0) && (buf_1[i] != negative_fi_buf[base_index + i])) ||
((mpi_rank % 2 == 1) && (buf_2[i] != negative_fi_buf[base_index + i]))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected value in buf (2).\n";
}
}
@@ -1465,7 +1465,7 @@ vector_read_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
if (((mpi_rank % 2 == 0) && (buf_2[i] != negative_fi_buf[base_index + i])) ||
((mpi_rank % 2 == 1) && (buf_1[i] != negative_fi_buf[base_index + i]))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected value in buf (3).\n";
}
}
@@ -1477,7 +1477,7 @@ vector_read_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
if (((mpi_rank % 2 == 0) && (buf_3[i] != negative_fi_buf[base_index + i])) ||
((mpi_rank % 2 == 1) && (buf_0[i] != negative_fi_buf[base_index + i]))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected value in buf (4).\n";
}
}
@@ -1598,7 +1598,7 @@ vector_read_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
*
* 9) On rank 0, delete the test file.
*
- * Return: FALSE on success, TRUE if any errors are detected.
+ * Return: false on success, true if any errors are detected.
*
*-------------------------------------------------------------------------
*/
@@ -1612,10 +1612,10 @@ vector_read_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
char filename[512];
haddr_t eoa;
haddr_t base_addr;
- hbool_t show_progress = FALSE;
- hid_t fapl_id = -1; /* file access property list ID */
- hid_t dxpl_id = -1; /* data access property list ID */
- H5FD_t *lf = NULL; /* VFD struct ptr */
+ bool show_progress = false;
+ hid_t fapl_id = H5I_INVALID_HID; /* file access property list ID */
+ hid_t dxpl_id = H5I_INVALID_HID; /* data access property list ID */
+ H5FD_t *lf = NULL; /* VFD struct ptr */
int cp = 0;
int i;
int j;
@@ -1627,26 +1627,26 @@ vector_read_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
size_t sizes[4];
void *bufs[4];
- pass = TRUE;
+ pass = true;
if (mpi_rank == 0) {
if (xfer_mode == H5FD_MPIO_INDEPENDENT) {
- HDsnprintf(test_title, sizeof(test_title), "parallel vector read test 4 -- %s / independent",
- vfd_name);
+ snprintf(test_title, sizeof(test_title), "parallel vector read test 4 -- %s / independent",
+ vfd_name);
}
else if (coll_opt_mode == H5FD_MPIO_INDIVIDUAL_IO) {
- HDsnprintf(test_title, sizeof(test_title), "parallel vector read test 4 -- %s / col op / ind I/O",
- vfd_name);
+ snprintf(test_title, sizeof(test_title), "parallel vector read test 4 -- %s / col op / ind I/O",
+ vfd_name);
}
else {
assert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO);
- HDsnprintf(test_title, sizeof(test_title), "parallel vector read test 4 -- %s / col op / col I/O",
- vfd_name);
+ snprintf(test_title, sizeof(test_title), "parallel vector read test 4 -- %s / col op / col I/O",
+ vfd_name);
}
TESTING(test_title);
@@ -1681,7 +1681,7 @@ vector_read_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
if (H5FDwrite(lf, H5FD_MEM_DRAW, H5P_DEFAULT, (haddr_t)0, image_size, (void *)increasing_fi_buf) <
0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5FDwrite() on rank 0 failed.\n";
}
}
@@ -1808,7 +1808,7 @@ vector_read_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
if (H5FDread_vector(lf, dxpl_id, count, types, addrs, sizes, bufs) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5FDread_vector() failed (1).\n";
}
}
@@ -1842,7 +1842,7 @@ vector_read_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
if (read_fi_buf[j] != increasing_fi_buf[j]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected data read from file (1.1)";
fprintf(stdout, "\nread_fi_buf[%d] = %d, increasing_fi_buf[%d] = %d\n", j,
read_fi_buf[j], j, increasing_fi_buf[j]);
@@ -1852,7 +1852,7 @@ vector_read_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
if (read_fi_buf[j] != increasing_fi_buf[j]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected data read from file (1.2)";
}
}
@@ -1860,7 +1860,7 @@ vector_read_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
if (read_fi_buf[j] != increasing_fi_buf[j]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected data read from file (1.3)";
}
}
@@ -1868,7 +1868,7 @@ vector_read_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
if (read_fi_buf[j] != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected data read from file (1.4)";
}
}
@@ -1879,7 +1879,7 @@ vector_read_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
if (read_fi_buf[j] != increasing_fi_buf[j]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected data read from file (2.1)";
}
}
@@ -1887,7 +1887,7 @@ vector_read_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
if (read_fi_buf[j] != increasing_fi_buf[j]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected data read from file (2.2)";
}
}
@@ -1895,7 +1895,7 @@ vector_read_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
if (read_fi_buf[j] != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected data read from file (2.3)";
}
}
@@ -1906,7 +1906,7 @@ vector_read_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
if (read_fi_buf[j] != increasing_fi_buf[j]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected data read from file (3.1)";
}
}
@@ -1914,7 +1914,7 @@ vector_read_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
if (read_fi_buf[j] != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected data read from file (3.2)";
}
}
@@ -1923,19 +1923,19 @@ vector_read_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
case 3:
if (read_fi_buf[j] != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected data read from file (4)";
}
break;
default:
- assert(FALSE); /* should be un-reachable */
+ assert(false); /* should be un-reachable */
break;
}
}
else if (read_fi_buf[j] != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected data read from file (5)";
}
} /* end for loop */
@@ -2026,7 +2026,7 @@ vector_read_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
*
* 9) On rank 0, delete the test file.
*
- * Return: FALSE on success, TRUE if any errors are detected.
+ * Return: false on success, true if any errors are detected.
*
*-------------------------------------------------------------------------
*/
@@ -2040,10 +2040,10 @@ vector_read_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
char filename[512];
haddr_t eoa;
haddr_t base_addr;
- hbool_t show_progress = FALSE;
- hid_t fapl_id = -1; /* file access property list ID */
- hid_t dxpl_id = -1; /* data access property list ID */
- H5FD_t *lf = NULL; /* VFD struct ptr */
+ bool show_progress = false;
+ hid_t fapl_id = H5I_INVALID_HID; /* file access property list ID */
+ hid_t dxpl_id = H5I_INVALID_HID; /* data access property list ID */
+ H5FD_t *lf = NULL; /* VFD struct ptr */
int cp = 0;
int i;
int j;
@@ -2054,26 +2054,26 @@ vector_read_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
size_t sizes[2];
void *bufs[(INTS_PER_RANK / 16) + 1];
- pass = TRUE;
+ pass = true;
if (mpi_rank == 0) {
if (xfer_mode == H5FD_MPIO_INDEPENDENT) {
- HDsnprintf(test_title, sizeof(test_title), "parallel vector read test 5 -- %s / independent",
- vfd_name);
+ snprintf(test_title, sizeof(test_title), "parallel vector read test 5 -- %s / independent",
+ vfd_name);
}
else if (coll_opt_mode == H5FD_MPIO_INDIVIDUAL_IO) {
- HDsnprintf(test_title, sizeof(test_title), "parallel vector read test 5 -- %s / col op / ind I/O",
- vfd_name);
+ snprintf(test_title, sizeof(test_title), "parallel vector read test 5 -- %s / col op / ind I/O",
+ vfd_name);
}
else {
assert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO);
- HDsnprintf(test_title, sizeof(test_title), "parallel vector read test 5 -- %s / col op / col I/O",
- vfd_name);
+ snprintf(test_title, sizeof(test_title), "parallel vector read test 5 -- %s / col op / col I/O",
+ vfd_name);
}
TESTING(test_title);
@@ -2108,7 +2108,7 @@ vector_read_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
if (H5FDwrite(lf, H5FD_MEM_DRAW, H5P_DEFAULT, (haddr_t)0, image_size, (void *)increasing_fi_buf) <
0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5FDwrite() on rank 0 failed.\n";
}
}
@@ -2168,7 +2168,7 @@ vector_read_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
if (H5FDread_vector(lf, dxpl_id, count, types, addrs, sizes, bufs) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5FDread_vector() failed (1).\n";
}
}
@@ -2193,13 +2193,13 @@ vector_read_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
if (read_fi_buf[j] != increasing_fi_buf[j]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected data read from file (1)";
}
}
else if (read_fi_buf[j] != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected data read from file (2)";
}
} /* end for loop */
@@ -2265,7 +2265,7 @@ vector_read_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_
*
* 6) On rank 0, delete the test file.
*
- * Return: FALSE on success, TRUE if any errors are detected.
+ * Return: false on success, true if any errors are detected.
*
*-------------------------------------------------------------------------
*/
@@ -2278,10 +2278,10 @@ vector_write_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
char test_title[120];
char filename[512];
haddr_t eoa;
- hbool_t show_progress = FALSE;
- hid_t fapl_id = -1; /* file access property list ID */
- hid_t dxpl_id = -1; /* data access property list ID */
- H5FD_t *lf = NULL; /* VFD struct ptr */
+ bool show_progress = false;
+ hid_t fapl_id = H5I_INVALID_HID; /* file access property list ID */
+ hid_t dxpl_id = H5I_INVALID_HID; /* data access property list ID */
+ H5FD_t *lf = NULL; /* VFD struct ptr */
int cp = 0;
int i;
uint32_t count;
@@ -2290,26 +2290,26 @@ vector_write_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
size_t sizes[1];
const void *bufs[1];
- pass = TRUE;
+ pass = true;
if (mpi_rank == 0) {
if (xfer_mode == H5FD_MPIO_INDEPENDENT) {
- HDsnprintf(test_title, sizeof(test_title), "parallel vector write test 1 -- %s / independent",
- vfd_name);
+ snprintf(test_title, sizeof(test_title), "parallel vector write test 1 -- %s / independent",
+ vfd_name);
}
else if (coll_opt_mode == H5FD_MPIO_INDIVIDUAL_IO) {
- HDsnprintf(test_title, sizeof(test_title),
- "parallel vector write test 1 -- %s / col op / ind I/O", vfd_name);
+ snprintf(test_title, sizeof(test_title), "parallel vector write test 1 -- %s / col op / ind I/O",
+ vfd_name);
}
else {
assert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO);
- HDsnprintf(test_title, sizeof(test_title),
- "parallel vector write test 1 -- %s / col op / col I/O", vfd_name);
+ snprintf(test_title, sizeof(test_title), "parallel vector write test 1 -- %s / col op / col I/O",
+ vfd_name);
}
TESTING(test_title);
@@ -2347,7 +2347,7 @@ vector_write_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (H5FDwrite_vector(lf, dxpl_id, count, types, addrs, sizes, bufs) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5FDwrite_vector() failed.\n";
}
}
@@ -2373,7 +2373,7 @@ vector_write_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (H5FDread(lf, H5FD_MEM_DRAW, H5P_DEFAULT, (haddr_t)0, image_size, (void *)read_fi_buf) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5FDread() failed.\n";
}
@@ -2381,7 +2381,7 @@ vector_write_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (read_fi_buf[i] != increasing_fi_buf[i]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected data read from file";
break;
}
@@ -2451,7 +2451,7 @@ vector_write_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
*
* 5) Close the test file. On rank 0, delete the test file.
*
- * Return: FALSE on success, TRUE if any errors are detected.
+ * Return: false on success, true if any errors are detected.
*
*-------------------------------------------------------------------------
*/
@@ -2464,10 +2464,10 @@ vector_write_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
char test_title[120];
char filename[512];
haddr_t eoa;
- hbool_t show_progress = FALSE;
- hid_t fapl_id = -1; /* file access property list ID */
- hid_t dxpl_id = -1; /* data access property list ID */
- H5FD_t *lf = NULL; /* VFD struct ptr */
+ bool show_progress = false;
+ hid_t fapl_id = H5I_INVALID_HID; /* file access property list ID */
+ hid_t dxpl_id = H5I_INVALID_HID; /* data access property list ID */
+ H5FD_t *lf = NULL; /* VFD struct ptr */
int cp = 0;
int i;
int j;
@@ -2477,26 +2477,26 @@ vector_write_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
size_t sizes[1];
const void *bufs[1];
- pass = TRUE;
+ pass = true;
if (mpi_rank == 0) {
if (xfer_mode == H5FD_MPIO_INDEPENDENT) {
- HDsnprintf(test_title, sizeof(test_title), "parallel vector write test 2 -- %s / independent",
- vfd_name);
+ snprintf(test_title, sizeof(test_title), "parallel vector write test 2 -- %s / independent",
+ vfd_name);
}
else if (coll_opt_mode == H5FD_MPIO_INDIVIDUAL_IO) {
- HDsnprintf(test_title, sizeof(test_title),
- "parallel vector write test 2 -- %s / col op / ind I/O", vfd_name);
+ snprintf(test_title, sizeof(test_title), "parallel vector write test 2 -- %s / col op / ind I/O",
+ vfd_name);
}
else {
assert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO);
- HDsnprintf(test_title, sizeof(test_title),
- "parallel vector write test 2 -- %s / col op / col I/O", vfd_name);
+ snprintf(test_title, sizeof(test_title), "parallel vector write test 2 -- %s / col op / col I/O",
+ vfd_name);
}
TESTING(test_title);
@@ -2539,7 +2539,7 @@ vector_write_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (H5FDwrite_vector(lf, dxpl_id, count, types, addrs, sizes, bufs) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5FDwrite_vector() failed (1).\n";
}
}
@@ -2547,7 +2547,7 @@ vector_write_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (H5FDwrite_vector(lf, dxpl_id, 0, NULL, NULL, NULL, NULL) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5FDwrite_vector() failed (2).\n";
}
}
@@ -2566,7 +2566,7 @@ vector_write_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (H5FDwrite_vector(lf, dxpl_id, 0, NULL, NULL, NULL, NULL) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5FDwrite_vector() failed (3).\n";
}
}
@@ -2580,7 +2580,7 @@ vector_write_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (H5FDwrite_vector(lf, dxpl_id, count, types, addrs, sizes, bufs) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5FDwrite_vector() failed (4).\n";
}
}
@@ -2607,7 +2607,7 @@ vector_write_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (H5FDread(lf, H5FD_MEM_DRAW, H5P_DEFAULT, (haddr_t)0, image_size, (void *)read_fi_buf) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5FDread() failed.\n";
}
@@ -2619,7 +2619,7 @@ vector_write_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (read_fi_buf[j] != increasing_fi_buf[j]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected data read from file";
break;
}
@@ -2631,7 +2631,7 @@ vector_write_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (read_fi_buf[j] != negative_fi_buf[j]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected data read from file";
break;
}
@@ -2700,7 +2700,7 @@ vector_write_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
*
* 5) Close the test file. On rank 0, delete the test file.
*
- * Return: FALSE on success, TRUE if any errors are detected.
+ * Return: false on success, true if any errors are detected.
*
*-------------------------------------------------------------------------
*/
@@ -2717,10 +2717,10 @@ vector_write_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
int ints_per_write;
size_t bytes_per_write;
haddr_t eoa;
- hbool_t show_progress = FALSE;
- hid_t fapl_id = -1; /* file access property list ID */
- hid_t dxpl_id = -1; /* data access property list ID */
- H5FD_t *lf = NULL; /* VFD struct ptr */
+ bool show_progress = false;
+ hid_t fapl_id = H5I_INVALID_HID; /* file access property list ID */
+ hid_t dxpl_id = H5I_INVALID_HID; /* data access property list ID */
+ H5FD_t *lf = NULL; /* VFD struct ptr */
int cp = 0;
int i;
int j;
@@ -2730,26 +2730,26 @@ vector_write_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
size_t sizes[4];
const void *bufs[4];
- pass = TRUE;
+ pass = true;
if (mpi_rank == 0) {
if (xfer_mode == H5FD_MPIO_INDEPENDENT) {
- HDsnprintf(test_title, sizeof(test_title), "parallel vector write test 3 -- %s / independent",
- vfd_name);
+ snprintf(test_title, sizeof(test_title), "parallel vector write test 3 -- %s / independent",
+ vfd_name);
}
else if (coll_opt_mode == H5FD_MPIO_INDIVIDUAL_IO) {
- HDsnprintf(test_title, sizeof(test_title),
- "parallel vector write test 3 -- %s / col op / ind I/O", vfd_name);
+ snprintf(test_title, sizeof(test_title), "parallel vector write test 3 -- %s / col op / ind I/O",
+ vfd_name);
}
else {
assert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO);
- HDsnprintf(test_title, sizeof(test_title),
- "parallel vector write test 3 -- %s / col op / col I/O", vfd_name);
+ snprintf(test_title, sizeof(test_title), "parallel vector write test 3 -- %s / col op / col I/O",
+ vfd_name);
}
TESTING(test_title);
@@ -2810,7 +2810,7 @@ vector_write_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (H5FDwrite_vector(lf, dxpl_id, count, types, addrs, sizes, bufs) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5FDwrite_vector() failed (1).\n";
}
}
@@ -2838,7 +2838,7 @@ vector_write_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (H5FDread(lf, H5FD_MEM_DRAW, H5P_DEFAULT, (haddr_t)0, image_size, (void *)read_fi_buf) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5FDread() failed.\n";
}
@@ -2850,7 +2850,7 @@ vector_write_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (read_fi_buf[j] != increasing_fi_buf[j]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected data read from file (1)";
break;
}
@@ -2862,7 +2862,7 @@ vector_write_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (read_fi_buf[j] != decreasing_fi_buf[j]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected data read from file (2)";
break;
}
@@ -2874,7 +2874,7 @@ vector_write_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (read_fi_buf[j] != negative_fi_buf[j]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected data read from file (3)";
break;
}
@@ -2886,7 +2886,7 @@ vector_write_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (read_fi_buf[j] != zero_fi_buf[j]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected data read from file (3)";
break;
}
@@ -2960,7 +2960,7 @@ vector_write_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
*
* 5) Close the test file. On rank 0, delete the test file.
*
- * Return: FALSE on success, TRUE if any errors are detected.
+ * Return: false on success, true if any errors are detected.
*
*-------------------------------------------------------------------------
*/
@@ -2977,10 +2977,10 @@ vector_write_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
int ints_per_write;
size_t bytes_per_write;
haddr_t eoa;
- hbool_t show_progress = FALSE;
- hid_t fapl_id = -1; /* file access property list ID */
- hid_t dxpl_id = -1; /* data access property list ID */
- H5FD_t *lf = NULL; /* VFD struct ptr */
+ bool show_progress = false;
+ hid_t fapl_id = H5I_INVALID_HID; /* file access property list ID */
+ hid_t dxpl_id = H5I_INVALID_HID; /* data access property list ID */
+ H5FD_t *lf = NULL; /* VFD struct ptr */
int cp = 0;
int i;
int j;
@@ -2990,26 +2990,26 @@ vector_write_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
size_t sizes[4];
const void *bufs[4];
- pass = TRUE;
+ pass = true;
if (mpi_rank == 0) {
if (xfer_mode == H5FD_MPIO_INDEPENDENT) {
- HDsnprintf(test_title, sizeof(test_title), "parallel vector write test 4 -- %s / independent",
- vfd_name);
+ snprintf(test_title, sizeof(test_title), "parallel vector write test 4 -- %s / independent",
+ vfd_name);
}
else if (coll_opt_mode == H5FD_MPIO_INDIVIDUAL_IO) {
- HDsnprintf(test_title, sizeof(test_title),
- "parallel vector write test 4 -- %s / col op / ind I/O", vfd_name);
+ snprintf(test_title, sizeof(test_title), "parallel vector write test 4 -- %s / col op / ind I/O",
+ vfd_name);
}
else {
assert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO);
- HDsnprintf(test_title, sizeof(test_title),
- "parallel vector write test 4 -- %s / col op / col I/O", vfd_name);
+ snprintf(test_title, sizeof(test_title), "parallel vector write test 4 -- %s / col op / col I/O",
+ vfd_name);
}
TESTING(test_title);
@@ -3071,7 +3071,7 @@ vector_write_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (H5FDwrite_vector(lf, dxpl_id, count, types, addrs, sizes, bufs) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5FDwrite_vector() failed (1).\n";
}
}
@@ -3099,7 +3099,7 @@ vector_write_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (H5FDread(lf, H5FD_MEM_DRAW, H5P_DEFAULT, (haddr_t)0, image_size, (void *)read_fi_buf) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5FDread() failed.\n";
}
@@ -3111,7 +3111,7 @@ vector_write_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (read_fi_buf[j] != zero_fi_buf[j]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected data read from file (1)";
break;
}
@@ -3123,7 +3123,7 @@ vector_write_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (read_fi_buf[j] != negative_fi_buf[j]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected data read from file (2)";
break;
}
@@ -3135,7 +3135,7 @@ vector_write_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (read_fi_buf[j] != decreasing_fi_buf[j]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected data read from file (3)";
break;
}
@@ -3147,7 +3147,7 @@ vector_write_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (read_fi_buf[j] != increasing_fi_buf[j]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected data read from file (3)";
break;
}
@@ -3258,7 +3258,7 @@ vector_write_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
*
* 7) Close the test file. On rank 0, delete the test file.
*
- * Return: FALSE on success, TRUE if any errors are detected.
+ * Return: false on success, true if any errors are detected.
*
*-------------------------------------------------------------------------
*/
@@ -3273,10 +3273,10 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
haddr_t base_addr;
int base_index;
haddr_t eoa;
- hbool_t show_progress = FALSE;
- hid_t fapl_id = -1; /* file access property list ID */
- hid_t dxpl_id = -1; /* data access property list ID */
- H5FD_t *lf = NULL; /* VFD struct ptr */
+ bool show_progress = false;
+ hid_t fapl_id = H5I_INVALID_HID; /* file access property list ID */
+ hid_t dxpl_id = H5I_INVALID_HID; /* data access property list ID */
+ H5FD_t *lf = NULL; /* VFD struct ptr */
int cp = 0;
int i;
int j;
@@ -3287,26 +3287,26 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
size_t sizes[4];
const void *bufs[4];
- pass = TRUE;
+ pass = true;
if (mpi_rank == 0) {
if (xfer_mode == H5FD_MPIO_INDEPENDENT) {
- HDsnprintf(test_title, sizeof(test_title), "parallel vector write test 5 -- %s / independent",
- vfd_name);
+ snprintf(test_title, sizeof(test_title), "parallel vector write test 5 -- %s / independent",
+ vfd_name);
}
else if (coll_opt_mode == H5FD_MPIO_INDIVIDUAL_IO) {
- HDsnprintf(test_title, sizeof(test_title),
- "parallel vector write test 5 -- %s / col op / ind I/O", vfd_name);
+ snprintf(test_title, sizeof(test_title), "parallel vector write test 5 -- %s / col op / ind I/O",
+ vfd_name);
}
else {
assert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO);
- HDsnprintf(test_title, sizeof(test_title),
- "parallel vector write test 5 -- %s / col op / col I/O", vfd_name);
+ snprintf(test_title, sizeof(test_title), "parallel vector write test 5 -- %s / col op / col I/O",
+ vfd_name);
}
TESTING(test_title);
@@ -3343,7 +3343,7 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (H5FDwrite_vector(lf, dxpl_id, count, types, addrs, sizes, bufs) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5FDwrite_vector() failed.\n";
}
}
@@ -3460,7 +3460,7 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (H5FDwrite_vector(lf, dxpl_id, count, types, addrs, sizes, bufs) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5FDwrite_vector() failed (1).\n";
}
}
@@ -3487,7 +3487,7 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (H5FDread(lf, H5FD_MEM_DRAW, H5P_DEFAULT, (haddr_t)0, image_size, (void *)read_fi_buf) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5FDread() failed.\n";
}
@@ -3506,7 +3506,7 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (read_fi_buf[j] != negative_fi_buf[j]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected data read from file (1.1)";
printf("\nread_fi_buf[%d] = %d, %d expected.\n", j, read_fi_buf[j],
@@ -3517,7 +3517,7 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (read_fi_buf[j] != decreasing_fi_buf[j]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected data read from file (1.2)";
printf("\nread_fi_buf[%d] = %d, %d expected.\n", j, read_fi_buf[j],
@@ -3528,7 +3528,7 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (read_fi_buf[j] != increasing_fi_buf[j]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected data read from file (1.3)";
printf("\nread_fi_buf[%d] = %d, %d expected.\n", j, read_fi_buf[j],
@@ -3539,7 +3539,7 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (read_fi_buf[j] != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected data read from file (1.4)";
}
}
@@ -3550,7 +3550,7 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (read_fi_buf[j] != increasing_fi_buf[j]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected data read from file (2.1)";
printf("\nread_fi_buf[%d] = %d, %d expected.\n", j, read_fi_buf[j],
@@ -3561,7 +3561,7 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (read_fi_buf[j] != decreasing_fi_buf[j]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected data read from file (2.2)";
printf("\nread_fi_buf[%d] = %d, %d expected.\n", j, read_fi_buf[j],
@@ -3572,7 +3572,7 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (read_fi_buf[j] != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected data read from file (2.3)";
}
}
@@ -3583,7 +3583,7 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (read_fi_buf[j] != negative_fi_buf[j]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected data read from file (3.1)";
printf("\nread_fi_buf[%d] = %d, %d expected.\n", j, read_fi_buf[j],
@@ -3594,7 +3594,7 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (read_fi_buf[j] != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected data read from file (3.2)";
}
}
@@ -3603,13 +3603,13 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
case 3:
if (read_fi_buf[j] != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected data read from file (4)";
}
break;
default:
- assert(FALSE); /* should be un-reachable */
+ assert(false); /* should be un-reachable */
break;
}
}
@@ -3694,7 +3694,7 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
*
* 9) On rank 0, delete the test file.
*
- * Return: FALSE on success, TRUE if any errors are detected.
+ * Return: false on success, true if any errors are detected.
*
*-------------------------------------------------------------------------
*/
@@ -3708,10 +3708,10 @@ vector_write_test_6(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
char filename[512];
haddr_t eoa;
haddr_t base_addr;
- hbool_t show_progress = FALSE;
- hid_t fapl_id = -1; /* file access property list ID */
- hid_t dxpl_id = -1; /* data access property list ID */
- H5FD_t *lf = NULL; /* VFD struct ptr */
+ bool show_progress = false;
+ hid_t fapl_id = H5I_INVALID_HID; /* file access property list ID */
+ hid_t dxpl_id = H5I_INVALID_HID; /* data access property list ID */
+ H5FD_t *lf = NULL; /* VFD struct ptr */
int cp = 0;
int i;
int base_index;
@@ -3721,26 +3721,26 @@ vector_write_test_6(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
size_t sizes[2];
const void *bufs[(INTS_PER_RANK / 16) + 1];
- pass = TRUE;
+ pass = true;
if (mpi_rank == 0) {
if (xfer_mode == H5FD_MPIO_INDEPENDENT) {
- HDsnprintf(test_title, sizeof(test_title), "parallel vector write test 6 -- %s / independent",
- vfd_name);
+ snprintf(test_title, sizeof(test_title), "parallel vector write test 6 -- %s / independent",
+ vfd_name);
}
else if (coll_opt_mode == H5FD_MPIO_INDIVIDUAL_IO) {
- HDsnprintf(test_title, sizeof(test_title),
- "parallel vector write test 6 -- %s / col op / ind I/O", vfd_name);
+ snprintf(test_title, sizeof(test_title), "parallel vector write test 6 -- %s / col op / ind I/O",
+ vfd_name);
}
else {
assert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO);
- HDsnprintf(test_title, sizeof(test_title),
- "parallel vector write test 6 -- %s / col op / col I/O", vfd_name);
+ snprintf(test_title, sizeof(test_title), "parallel vector write test 6 -- %s / col op / col I/O",
+ vfd_name);
}
TESTING(test_title);
@@ -3774,7 +3774,7 @@ vector_write_test_6(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (H5FDwrite(lf, H5FD_MEM_DRAW, H5P_DEFAULT, (haddr_t)0, image_size, (void *)zero_fi_buf) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5FDwrite() on rank 0 failed.\n";
}
}
@@ -3822,7 +3822,7 @@ vector_write_test_6(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (H5FDwrite_vector(lf, dxpl_id, count, types, addrs, sizes, bufs) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5FDwrite_vector() failed (1).\n";
}
}
@@ -3847,7 +3847,7 @@ vector_write_test_6(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (H5FDread(lf, H5FD_MEM_DRAW, H5P_DEFAULT, (haddr_t)0, image_size, (void *)read_fi_buf) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5FDread() failed.\n";
}
@@ -3857,13 +3857,13 @@ vector_write_test_6(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (read_fi_buf[i] != increasing_fi_buf[i]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected data read from file (1)";
}
}
else if (read_fi_buf[i] != zero_fi_buf[i]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected data read from file (2)";
}
}
@@ -3948,7 +3948,7 @@ vector_write_test_6(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
*
* 7) Close the test file. On rank 0, delete the test file.
*
- * Return: FALSE on success, TRUE if any errors are detected.
+ * Return: false on success, true if any errors are detected.
*
*-------------------------------------------------------------------------
*/
@@ -3964,10 +3964,10 @@ vector_write_test_7(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
haddr_t addr_increment;
int base_index;
haddr_t eoa;
- hbool_t show_progress = FALSE;
- hid_t fapl_id = -1; /* file access property list ID */
- hid_t dxpl_id = -1; /* data access property list ID */
- H5FD_t *lf = NULL; /* VFD struct ptr */
+ bool show_progress = false;
+ hid_t fapl_id = H5I_INVALID_HID; /* file access property list ID */
+ hid_t dxpl_id = H5I_INVALID_HID; /* data access property list ID */
+ H5FD_t *lf = NULL; /* VFD struct ptr */
int cp = 0;
int i;
int j;
@@ -3978,23 +3978,23 @@ vector_write_test_7(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
size_t sizes[8];
const void *bufs[8];
- pass = TRUE;
+ pass = true;
if (mpi_rank == 0) {
if (xfer_mode == H5FD_MPIO_INDEPENDENT) {
- HDsprintf(test_title, "parallel vector write test 7 -- %s / independent", vfd_name);
+ sprintf(test_title, "parallel vector write test 7 -- %s / independent", vfd_name);
}
else if (coll_opt_mode == H5FD_MPIO_INDIVIDUAL_IO) {
- HDsprintf(test_title, "parallel vector write test 7 -- %s / col op / ind I/O", vfd_name);
+ sprintf(test_title, "parallel vector write test 7 -- %s / col op / ind I/O", vfd_name);
}
else {
assert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO);
- HDsprintf(test_title, "parallel vector write test 7 -- %s / col op / col I/O", vfd_name);
+ sprintf(test_title, "parallel vector write test 7 -- %s / col op / col I/O", vfd_name);
}
TESTING(test_title);
@@ -4031,7 +4031,7 @@ vector_write_test_7(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (H5FDwrite_vector(lf, dxpl_id, count, types, addrs, sizes, bufs) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5FDwrite_vector() failed.\n";
}
}
@@ -4064,7 +4064,7 @@ vector_write_test_7(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (H5FDwrite_vector(lf, dxpl_id, count, types, addrs, sizes, bufs) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5FDwrite_vector() failed (1).\n";
}
}
@@ -4090,7 +4090,7 @@ vector_write_test_7(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (H5FDread(lf, H5FD_MEM_DRAW, H5P_DEFAULT, (haddr_t)0, image_size, (void *)read_fi_buf) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5FDread() failed.\n";
}
@@ -4106,7 +4106,7 @@ vector_write_test_7(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (read_fi_buf[j] != increasing_fi_buf[j]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected data read from file (1)";
printf("\nread_fi_buf[%d] = %d, %d expected.\n", j, read_fi_buf[j],
@@ -4117,7 +4117,7 @@ vector_write_test_7(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer
if (read_fi_buf[j] != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected data read from file (2)";
printf("\nread_fi_buf[%d] = %d, 0 expected.\n", j, read_fi_buf[j]);
@@ -4355,7 +4355,7 @@ static herr_t
test_selection_io_read_verify(hid_t dxpl, int mpi_rank, hsize_t start[], hsize_t block[], H5FD_t *lf,
H5FD_mem_t type, uint32_t count, hid_t mem_spaces[], hid_t file_spaces[],
haddr_t offsets[], size_t element_sizes[], uint32_t rbufcount, int *erb[],
- hbool_t shorten_rbufs)
+ bool shorten_rbufs)
{
int *rbuf1 = NULL;
int *rbuf2 = NULL;
@@ -4578,7 +4578,7 @@ test_selection_io_types_shorten(int mpi_rank, int mpi_size, H5FD_t *lf, hid_t dx
/* Read and verify */
if (test_selection_io_read_verify(dxpl, mpi_rank, verify_start, verify_block, lf, type, 2, mem_spaces,
- file_spaces, addrs, element_sizes, 2, (int **)erbufs, FALSE) < 0)
+ file_spaces, addrs, element_sizes, 2, (int **)erbufs, false) < 0)
P_TEST_ERROR;
MPI_Barrier(comm);
@@ -4630,7 +4630,7 @@ test_selection_io_types_shorten(int mpi_rank, int mpi_size, H5FD_t *lf, hid_t dx
/* Read entire file buffer and verify */
if (test_selection_io_read_verify(dxpl, mpi_rank, verify_start, verify_block, lf, type, 2, mem_spaces,
- file_spaces, addrs, element_sizes, 2, (int **)fbufs, FALSE) < 0)
+ file_spaces, addrs, element_sizes, 2, (int **)fbufs, false) < 0)
P_TEST_ERROR;
MPI_Barrier(comm);
@@ -4745,7 +4745,7 @@ test_selection_io_types_shorten(int mpi_rank, int mpi_size, H5FD_t *lf, hid_t dx
/* Read and verify */
if (test_selection_io_read_verify(dxpl, mpi_rank, verify_start, verify_block, lf, type, 2, mem_spaces,
file_spaces, addrs, element_sizes, 1, (int **)&erbufs[1],
- shorten_element_sizes ? TRUE : FALSE) < 0)
+ shorten_element_sizes ? true : false) < 0)
P_TEST_ERROR;
MPI_Barrier(comm);
@@ -4789,7 +4789,7 @@ test_selection_io_types_shorten(int mpi_rank, int mpi_size, H5FD_t *lf, hid_t dx
verify_start[1] = start[0] * block[1];
verify_block[1] = (block[0] * block[1]);
if (test_selection_io_read_verify(dxpl, mpi_rank, verify_start, verify_block, lf, type, 2, mem_spaces,
- file_spaces, addrs, element_sizes, 2, (int **)fbufs, FALSE) < 0)
+ file_spaces, addrs, element_sizes, 2, (int **)fbufs, false) < 0)
P_TEST_ERROR;
MPI_Barrier(comm);
@@ -4892,7 +4892,7 @@ test_selection_io_types_1d_2d(int mpi_rank, int mpi_size, H5FD_t *lf, hid_t dxpl
verify_block[0] = (count[0] * stride[0]);
if (test_selection_io_read_verify(dxpl, mpi_rank, verify_start, verify_block, lf, type, 1, &mem_spaces[0],
&file_spaces[1], &addrs[1], element_sizes, 1, (int **)&erbufs[0],
- FALSE) < 0)
+ false) < 0)
P_TEST_ERROR;
MPI_Barrier(comm);
@@ -4929,7 +4929,7 @@ test_selection_io_types_1d_2d(int mpi_rank, int mpi_size, H5FD_t *lf, hid_t dxpl
verify_block[0] = block[0];
if (test_selection_io_read_verify(dxpl, mpi_rank, verify_start, verify_block, lf, type, 1, &mem_spaces[0],
&file_spaces[1], &addrs[1], element_sizes, 1, (int **)&fbufs[1],
- FALSE) < 0)
+ false) < 0)
P_TEST_ERROR;
MPI_Barrier(comm);
@@ -4985,7 +4985,7 @@ test_selection_io_types_1d_2d(int mpi_rank, int mpi_size, H5FD_t *lf, hid_t dxpl
verify_block[0] = (count[0] * count[1] * stride[0]);
if (test_selection_io_read_verify(dxpl, mpi_rank, verify_start, verify_block, lf, type, 1, &mem_spaces[1],
&file_spaces[0], &addrs[0], element_sizes, 1, (int **)&erbufs[1],
- FALSE) < 0)
+ false) < 0)
P_TEST_ERROR;
MPI_Barrier(comm);
@@ -5024,7 +5024,7 @@ test_selection_io_types_1d_2d(int mpi_rank, int mpi_size, H5FD_t *lf, hid_t dxpl
verify_block[0] = (block[0] * block[1]);
if (test_selection_io_read_verify(dxpl, mpi_rank, verify_start, verify_block, lf, type, 1, &mem_spaces[1],
&file_spaces[0], &addrs[0], element_sizes, 1, (int **)&fbufs[0],
- FALSE) < 0)
+ false) < 0)
P_TEST_ERROR;
MPI_Barrier(comm);
@@ -5094,7 +5094,7 @@ test_selection_io_types_2d(int mpi_rank, int mpi_size, H5FD_t *lf, hid_t dxpl, H
verify_block[0] = (block[0] * block[1]);
if (test_selection_io_read_verify(dxpl, mpi_rank, verify_start, verify_block, lf, type, 1, &mem_spaces[1],
&file_spaces[1], &addrs[1], element_sizes, 1, (int **)&fbufs[1],
- FALSE) < 0)
+ false) < 0)
P_TEST_ERROR;
MPI_Barrier(comm);
@@ -5146,7 +5146,7 @@ test_selection_io_types_2d(int mpi_rank, int mpi_size, H5FD_t *lf, hid_t dxpl, H
verify_block[0] = (count[0] * count[1] * stride[0]);
if (test_selection_io_read_verify(dxpl, mpi_rank, verify_start, verify_block, lf, type, 1, &mem_spaces[1],
&file_spaces[1], &addrs[1], element_sizes, 1, (int **)&erbufs[1],
- FALSE) < 0)
+ false) < 0)
P_TEST_ERROR;
MPI_Barrier(comm);
@@ -5178,7 +5178,7 @@ test_selection_io_types_2d(int mpi_rank, int mpi_size, H5FD_t *lf, hid_t dxpl, H
verify_block[0] = (block[0] * block[1]);
if (test_selection_io_read_verify(dxpl, mpi_rank, verify_start, verify_block, lf, type, 1, &mem_spaces[1],
&file_spaces[1], &addrs[1], element_sizes, 1, (int **)&fbufs[1],
- FALSE) < 0)
+ false) < 0)
P_TEST_ERROR;
MPI_Barrier(comm);
@@ -5228,7 +5228,7 @@ test_selection_io_types_2d(int mpi_rank, int mpi_size, H5FD_t *lf, hid_t dxpl, H
verify_block[0] = (count[0] * count[1] * stride[1]);
if (test_selection_io_read_verify(dxpl, mpi_rank, verify_start, verify_block, lf, type, 1, &mem_spaces[1],
&file_spaces[1], &addrs[1], element_sizes, 1, (int **)&erbufs[1],
- FALSE) < 0)
+ false) < 0)
P_TEST_ERROR;
MPI_Barrier(comm);
@@ -5260,7 +5260,7 @@ test_selection_io_types_2d(int mpi_rank, int mpi_size, H5FD_t *lf, hid_t dxpl, H
verify_block[0] = (block[0] * block[1]);
if (test_selection_io_read_verify(dxpl, mpi_rank, verify_start, verify_block, lf, type, 1, &mem_spaces[1],
&file_spaces[1], &addrs[1], element_sizes, 1, (int **)&fbufs[1],
- FALSE) < 0)
+ false) < 0)
P_TEST_ERROR;
MPI_Barrier(comm);
@@ -5326,7 +5326,7 @@ test_selection_io_types_2d(int mpi_rank, int mpi_size, H5FD_t *lf, hid_t dxpl, H
verify_block[0] = (count[0] * count[1] * stride[1]);
if (test_selection_io_read_verify(dxpl, mpi_rank, verify_start, verify_block, lf, type, 1, &mem_spaces[1],
&file_spaces[1], &addrs[1], element_sizes, 1, (int **)&erbufs[1],
- FALSE) < 0)
+ false) < 0)
P_TEST_ERROR;
MPI_Barrier(comm);
@@ -5358,7 +5358,7 @@ test_selection_io_types_2d(int mpi_rank, int mpi_size, H5FD_t *lf, hid_t dxpl, H
verify_block[0] = (block[0] * block[1]);
if (test_selection_io_read_verify(dxpl, mpi_rank, verify_start, verify_block, lf, type, 1, &mem_spaces[1],
&file_spaces[1], &addrs[1], element_sizes, 1, (int **)&fbufs[1],
- FALSE) < 0)
+ false) < 0)
P_TEST_ERROR;
MPI_Barrier(comm);
@@ -5422,7 +5422,7 @@ test_selection_io_types_1d(int mpi_rank, int mpi_size, H5FD_t *lf, hid_t dxpl, H
if (test_selection_io_read_verify(dxpl, mpi_rank, verify_start, verify_block, lf, type, 1, &mem_spaces[0],
&file_spaces[0], &addrs[0], element_sizes, 1, (int **)&fbufs[0],
- FALSE) < 0)
+ false) < 0)
P_TEST_ERROR;
MPI_Barrier(comm);
@@ -5468,7 +5468,7 @@ test_selection_io_types_1d(int mpi_rank, int mpi_size, H5FD_t *lf, hid_t dxpl, H
verify_block[0] = (count[0] * stride[0]);
if (test_selection_io_read_verify(dxpl, mpi_rank, verify_start, verify_block, lf, type, 1, &mem_spaces[0],
&file_spaces[0], &addrs[0], element_sizes, 1, (int **)&erbufs[0],
- FALSE) < 0)
+ false) < 0)
P_TEST_ERROR;
MPI_Barrier(comm);
@@ -5496,7 +5496,7 @@ test_selection_io_types_1d(int mpi_rank, int mpi_size, H5FD_t *lf, hid_t dxpl, H
verify_block[0] = block[0];
if (test_selection_io_read_verify(dxpl, mpi_rank, verify_start, verify_block, lf, type, 1, &mem_spaces[0],
&file_spaces[0], &addrs[0], element_sizes, 1, (int **)&fbufs[0],
- FALSE) < 0)
+ false) < 0)
P_TEST_ERROR;
MPI_Barrier(comm);
@@ -5542,7 +5542,7 @@ test_selection_io_types_1d(int mpi_rank, int mpi_size, H5FD_t *lf, hid_t dxpl, H
verify_block[0] = count[0];
if (test_selection_io_read_verify(dxpl, mpi_rank, verify_start, verify_block, lf, type, 1, &mem_spaces[0],
&file_spaces[0], &addrs[0], element_sizes, 1, (int **)&erbufs[0],
- FALSE) < 0)
+ false) < 0)
P_TEST_ERROR;
MPI_Barrier(comm);
@@ -5570,7 +5570,7 @@ test_selection_io_types_1d(int mpi_rank, int mpi_size, H5FD_t *lf, hid_t dxpl, H
verify_block[0] = block[0];
if (test_selection_io_read_verify(dxpl, mpi_rank, verify_start, verify_block, lf, type, 1, &mem_spaces[0],
&file_spaces[0], &addrs[0], element_sizes, 1, (int **)&fbufs[0],
- FALSE) < 0)
+ false) < 0)
P_TEST_ERROR;
MPI_Barrier(comm);
@@ -5616,7 +5616,7 @@ test_selection_io_types_1d(int mpi_rank, int mpi_size, H5FD_t *lf, hid_t dxpl, H
verify_block[0] = (count[0] * stride[0]);
if (test_selection_io_read_verify(dxpl, mpi_rank, verify_start, verify_block, lf, type, 1, &mem_spaces[0],
&file_spaces[0], &addrs[0], element_sizes, 1, (int **)&erbufs[0],
- FALSE) < 0)
+ false) < 0)
P_TEST_ERROR;
MPI_Barrier(comm);
@@ -5644,7 +5644,7 @@ test_selection_io_types_1d(int mpi_rank, int mpi_size, H5FD_t *lf, hid_t dxpl, H
verify_block[0] = block[0];
if (test_selection_io_read_verify(dxpl, mpi_rank, verify_start, verify_block, lf, type, 1, &mem_spaces[0],
&file_spaces[0], &addrs[0], element_sizes, 1, (int **)&fbufs[0],
- FALSE) < 0)
+ false) < 0)
P_TEST_ERROR;
MPI_Barrier(comm);
@@ -5902,7 +5902,7 @@ main(int argc, char **argv)
int provided = 0;
#endif
int mpi_size;
- int mpi_rank;
+ int mpi_rank = 0;
int ret;
#ifdef H5_HAVE_SUBFILING_VFD
diff --git a/testpar/testphdf5.c b/testpar/testphdf5.c
index ed0510cd55a..584ca1f6107 100644
--- a/testpar/testphdf5.c
+++ b/testpar/testphdf5.c
@@ -234,9 +234,11 @@ parse_options(int argc, char **argv)
nerrors++;
return (1);
}
- printf("Test filenames are:\n");
- for (i = 0; i < n; i++)
- printf(" %s\n", filenames[i]);
+ if (mpi_rank == 0) {
+ printf("Test filenames are:\n");
+ for (i = 0; i < n; i++)
+ printf(" %s\n", filenames[i]);
+ }
}
return (0);
@@ -248,7 +250,7 @@ parse_options(int argc, char **argv)
hid_t
create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type)
{
- hid_t ret_pl = -1;
+ hid_t ret_pl = H5I_INVALID_HID;
herr_t ret; /* generic return value */
int mpi_rank; /* mpi variables */
@@ -265,9 +267,9 @@ create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type)
/* set Parallel access with communicator */
ret = H5Pset_fapl_mpio(ret_pl, comm, info);
VRFY((ret >= 0), "H5Pset_fapl_mpio succeeded");
- ret = H5Pset_all_coll_metadata_ops(ret_pl, TRUE);
+ ret = H5Pset_all_coll_metadata_ops(ret_pl, true);
VRFY((ret >= 0), "H5Pset_all_coll_metadata_ops succeeded");
- ret = H5Pset_coll_metadata_write(ret_pl, TRUE);
+ ret = H5Pset_coll_metadata_write(ret_pl, true);
VRFY((ret >= 0), "H5Pset_coll_metadata_write succeeded");
return (ret_pl);
}
@@ -314,6 +316,8 @@ main(int argc, char **argv)
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
+ mpi_rank_framework_g = mpi_rank;
+
dim0 = ROW_FACTOR * mpi_size;
dim1 = COL_FACTOR * mpi_size;
diff --git a/testpar/testphdf5.h b/testpar/testphdf5.h
index 631ad44a59c..6ac8080c82a 100644
--- a/testpar/testphdf5.h
+++ b/testpar/testphdf5.h
@@ -27,12 +27,12 @@ enum H5TEST_COLL_CHUNK_API {
API_MULTI_IND
};
-#ifndef FALSE
-#define FALSE 0
+#ifndef false
+#define false 0
#endif
-#ifndef TRUE
-#define TRUE 1
+#ifndef true
+#define true 1
#endif
/* Constants definitions */
@@ -82,8 +82,8 @@ enum H5TEST_COLL_CHUNK_API {
#define LINK_TRUE_NUM_CHUNK 2
#define LINK_FALSE_NUM_CHUNK 6
#define MULTI_TRUE_PERCENT 50
-#define LINK_TRUE_CHUNK_NAME "h5_link_chunk_true"
-#define LINK_FALSE_CHUNK_NAME "h5_link_chunk_false"
+#define LINK_TRUE_CHUNK_NAME "h5_link_chunk_TRUE"
+#define LINK_FALSE_CHUNK_NAME "h5_link_chunk_FALSE"
#define LINK_HARD_CHUNK_NAME "h5_link_chunk_hard"
#define MULTI_HARD_CHUNK_NAME "h5_multi_chunk_hard"
#define MULTI_COLL_CHUNK_NAME "h5_multi_chunk_coll"
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c
index 502b2ec2b29..924f9f35de1 100644
--- a/tools/lib/h5diff.c
+++ b/tools/lib/h5diff.c
@@ -183,7 +183,7 @@ is_exclude_path(char *path, h5trav_type_t type, diff_opt_t *opts)
while (NULL != exclude_path_ptr) {
/* if exclude path is in group, exclude its members as well */
if (exclude_path_ptr->obj_type == H5TRAV_TYPE_GROUP) {
- ret_cmp = HDstrncmp(exclude_path_ptr->obj_path, path, HDstrlen(exclude_path_ptr->obj_path));
+ ret_cmp = strncmp(exclude_path_ptr->obj_path, path, strlen(exclude_path_ptr->obj_path));
if (ret_cmp == 0) { /* found matching members */
size_t len_grp;
@@ -192,7 +192,7 @@ is_exclude_path(char *path, h5trav_type_t type, diff_opt_t *opts)
* This verifies if “/grp1/dset1” is only under “/grp1”, but
* not under “/grp1xxx/” group.
*/
- len_grp = HDstrlen(exclude_path_ptr->obj_path);
+ len_grp = strlen(exclude_path_ptr->obj_path);
if (path[len_grp] == '/') {
/* belong to excluded group! */
ret_value = 1;
@@ -202,7 +202,7 @@ is_exclude_path(char *path, h5trav_type_t type, diff_opt_t *opts)
}
/* exclude target is not group, just exclude the object */
else {
- ret_cmp = HDstrcmp(exclude_path_ptr->obj_path, path);
+ ret_cmp = strcmp(exclude_path_ptr->obj_path, path);
if (ret_cmp == 0) { /* found matching object */
/* excluded non-group object */
ret_value = 1;
@@ -247,7 +247,7 @@ is_exclude_attr(const char *path, h5trav_type_t type, diff_opt_t *opts)
while (NULL != exclude_ptr) {
/* if exclude path is in group, exclude its members as well */
if (exclude_ptr->obj_type == H5TRAV_TYPE_GROUP) {
- ret_cmp = HDstrncmp(exclude_ptr->obj_path, path, HDstrlen(exclude_ptr->obj_path));
+ ret_cmp = strncmp(exclude_ptr->obj_path, path, strlen(exclude_ptr->obj_path));
if (ret_cmp == 0) { /* found matching members */
size_t len_grp;
@@ -256,7 +256,7 @@ is_exclude_attr(const char *path, h5trav_type_t type, diff_opt_t *opts)
* This verifies if “/grp1/dset1” is only under “/grp1”, but
* not under “/grp1xxx/” group.
*/
- len_grp = HDstrlen(exclude_ptr->obj_path);
+ len_grp = strlen(exclude_ptr->obj_path);
if (path[len_grp] == '/') {
/* belong to excluded group! */
ret_value = 1;
@@ -266,7 +266,7 @@ is_exclude_attr(const char *path, h5trav_type_t type, diff_opt_t *opts)
}
/* exclude target is not group, just exclude the object */
else {
- ret_cmp = HDstrcmp(exclude_ptr->obj_path, path);
+ ret_cmp = strcmp(exclude_ptr->obj_path, path);
if (ret_cmp == 0) { /* found matching object */
/* excluded non-group object */
ret_value = 1;
@@ -368,11 +368,11 @@ build_match_list(const char *objname1, trav_info_t *info1, const char *objname2,
H5TOOLS_DEBUG("objname1 = %s objname2 = %s ", objname1, objname2);
/* if obj1 is not root */
- if (HDstrcmp(objname1, "/") != 0)
- path1_offset = HDstrlen(objname1);
+ if (strcmp(objname1, "/") != 0)
+ path1_offset = strlen(objname1);
/* if obj2 is not root */
- if (HDstrcmp(objname2, "/") != 0)
- path2_offset = HDstrlen(objname2);
+ if (strcmp(objname2, "/") != 0)
+ path2_offset = strlen(objname2);
/*--------------------------------------------------
* build the list
@@ -384,7 +384,7 @@ build_match_list(const char *objname1, trav_info_t *info1, const char *objname2,
type2_l = info2->paths[curr2].type;
/* criteria is string compare */
- cmp = HDstrcmp(path1_lp, path2_lp);
+ cmp = strcmp(path1_lp, path2_lp);
if (cmp == 0) {
if (!is_exclude_path(path1_lp, type1_l, opts)) {
infile[0] = 1;
@@ -508,7 +508,7 @@ trav_grp_symlinks(const char *path, const H5L_info2_t *linfo, void *udata)
}
else if (ret_value == 0) {
/* no dangling link option given and detect dangling link */
- tinfo->symlink_visited.dangle_link = TRUE;
+ tinfo->symlink_visited.dangle_link = true;
trav_info_visit_lnk(path, linfo, tinfo);
if (opts->no_dangle_links)
opts->err_stat = H5DIFF_ERR; /* make dangling link is error */
@@ -523,7 +523,7 @@ trav_grp_symlinks(const char *path, const H5L_info2_t *linfo, void *udata)
if (symlink_visit_add(&(tinfo->symlink_visited), linfo->type, NULL, lnk_info.trg_path) < 0)
H5TOOLS_GOTO_DONE(SUCCEED);
- if (h5trav_visit(tinfo->fid, path, TRUE, TRUE, trav_grp_objs, trav_grp_symlinks, tinfo,
+ if (h5trav_visit(tinfo->fid, path, true, true, trav_grp_objs, trav_grp_symlinks, tinfo,
H5O_INFO_BASIC) < 0) {
parallel_print("Error: Could not get file contents\n");
opts->err_stat = H5DIFF_ERR;
@@ -537,7 +537,7 @@ trav_grp_symlinks(const char *path, const H5L_info2_t *linfo, void *udata)
}
else if (ret_value == 0) {
/* no dangling link option given and detect dangling link */
- tinfo->symlink_visited.dangle_link = TRUE;
+ tinfo->symlink_visited.dangle_link = true;
trav_info_visit_lnk(path, linfo, tinfo);
if (opts->no_dangle_links)
opts->err_stat = H5DIFF_ERR; /* make dangling link is error */
@@ -555,7 +555,7 @@ trav_grp_symlinks(const char *path, const H5L_info2_t *linfo, void *udata)
if (symlink_visit_add(&(tinfo->symlink_visited), linfo->type, ext_fname, ext_path) < 0)
H5TOOLS_GOTO_DONE(SUCCEED);
- if (h5trav_visit(tinfo->fid, path, TRUE, TRUE, trav_grp_objs, trav_grp_symlinks, tinfo,
+ if (h5trav_visit(tinfo->fid, path, true, true, trav_grp_objs, trav_grp_symlinks, tinfo,
H5O_INFO_BASIC) < 0) {
parallel_print("Error: Could not get file contents\n");
opts->err_stat = H5DIFF_ERR;
@@ -703,47 +703,47 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char
/* if any object is specified */
if (objname1) {
/* make the given object1 fullpath, start with "/" */
- if (HDstrncmp(objname1, "/", 1) != 0) {
+ if (strncmp(objname1, "/", 1) != 0) {
#ifdef H5_HAVE_ASPRINTF
/* Use the asprintf() routine, since it does what we're trying to do below */
if (asprintf(&obj1fullname, "/%s", objname1) < 0)
H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "name buffer allocation failed");
#else /* H5_HAVE_ASPRINTF */
/* (malloc 2 more for "/" and end-of-line) */
- if ((obj1fullname = (char *)malloc(HDstrlen(objname1) + 2)) == NULL)
+ if ((obj1fullname = (char *)malloc(strlen(objname1) + 2)) == NULL)
H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "name buffer allocation failed");
- HDstrcpy(obj1fullname, "/");
- HDstrcat(obj1fullname, objname1);
+ strcpy(obj1fullname, "/");
+ strcat(obj1fullname, objname1);
#endif /* H5_HAVE_ASPRINTF */
}
else
- obj1fullname = HDstrdup(objname1);
+ obj1fullname = strdup(objname1);
H5TOOLS_DEBUG("obj1fullname = %s", obj1fullname);
/* make the given object2 fullpath, start with "/" */
- if (HDstrncmp(objname2, "/", 1) != 0) {
+ if (strncmp(objname2, "/", 1) != 0) {
#ifdef H5_HAVE_ASPRINTF
/* Use the asprintf() routine, since it does what we're trying to do below */
if (asprintf(&obj2fullname, "/%s", objname2) < 0)
H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "name buffer allocation failed");
#else /* H5_HAVE_ASPRINTF */
/* (malloc 2 more for "/" and end-of-line) */
- if ((obj2fullname = (char *)malloc(HDstrlen(objname2) + 2)) == NULL)
+ if ((obj2fullname = (char *)malloc(strlen(objname2) + 2)) == NULL)
H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "name buffer allocation failed");
- HDstrcpy(obj2fullname, "/");
- HDstrcat(obj2fullname, objname2);
+ strcpy(obj2fullname, "/");
+ strcat(obj2fullname, objname2);
#endif /* H5_HAVE_ASPRINTF */
}
else
- obj2fullname = HDstrdup(objname2);
+ obj2fullname = strdup(objname2);
H5TOOLS_DEBUG("obj2fullname = %s", obj2fullname);
/*----------------------------------------------------------
* check if obj1 is root, group, single object or symlink
*/
H5TOOLS_DEBUG("h5diff check if obj1=%s is root, group, single object or symlink", obj1fullname);
- if (!HDstrcmp(obj1fullname, "/")) {
+ if (!strcmp(obj1fullname, "/")) {
obj1type = H5TRAV_TYPE_GROUP;
}
else {
@@ -793,7 +793,7 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char
* check if obj2 is root, group, single object or symlink
*/
H5TOOLS_DEBUG("h5diff check if obj2=%s is root, group, single object or symlink", obj2fullname);
- if (!HDstrcmp(obj2fullname, "/")) {
+ if (!strcmp(obj2fullname, "/")) {
obj2type = H5TRAV_TYPE_GROUP;
}
else {
@@ -843,9 +843,9 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char
else {
H5TOOLS_DEBUG("h5diff no object specified");
/* set root group */
- obj1fullname = (char *)HDstrdup("/");
+ obj1fullname = (char *)strdup("/");
obj1type = H5TRAV_TYPE_GROUP;
- obj2fullname = (char *)HDstrdup("/");
+ obj2fullname = (char *)strdup("/");
obj2type = H5TRAV_TYPE_GROUP;
}
@@ -961,7 +961,7 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char
both_objs_grp = (obj1type == H5TRAV_TYPE_GROUP && obj2type == H5TRAV_TYPE_GROUP);
if (both_objs_grp) {
- H5TOOLS_DEBUG("h5diff both_objs_grp TRUE");
+ H5TOOLS_DEBUG("h5diff both_objs_grp true");
/*
* traverse group1
*/
@@ -969,7 +969,7 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char
/* optional data pass */
info1_grp->opts = (diff_opt_t *)opts;
- if (h5trav_visit(file1_id, obj1fullname, TRUE, TRUE, trav_grp_objs, trav_grp_symlinks, info1_grp,
+ if (h5trav_visit(file1_id, obj1fullname, true, true, trav_grp_objs, trav_grp_symlinks, info1_grp,
H5O_INFO_BASIC) < 0) {
parallel_print("Error: Could not get file contents\n");
H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "Could not get file contents");
@@ -983,7 +983,7 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char
/* optional data pass */
info2_grp->opts = (diff_opt_t *)opts;
- if (h5trav_visit(file2_id, obj2fullname, TRUE, TRUE, trav_grp_objs, trav_grp_symlinks, info2_grp,
+ if (h5trav_visit(file2_id, obj2fullname, true, true, trav_grp_objs, trav_grp_symlinks, info2_grp,
H5O_INFO_BASIC) < 0) {
parallel_print("Error: Could not get file contents\n");
H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "Could not get file contents");
@@ -996,13 +996,13 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char
if (g_Parallel) {
int i;
- if ((HDstrlen(fname1) > MAX_FILENAME) || (HDstrlen(fname2) > MAX_FILENAME)) {
+ if ((strlen(fname1) > MAX_FILENAME) || (strlen(fname2) > MAX_FILENAME)) {
fprintf(stderr, "The parallel diff only supports path names up to %d characters\n", MAX_FILENAME);
MPI_Abort(MPI_COMM_WORLD, 0);
} /* end if */
- HDstrcpy(filenames[0], fname1);
- HDstrcpy(filenames[1], fname2);
+ strcpy(filenames[0], fname1);
+ strcpy(filenames[1], fname2);
/* Alert the worker tasks that there's going to be work. */
for (i = 1; i < g_nTasks; i++)
@@ -1028,7 +1028,7 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char
parallel_print("\n");
/* if given objects is group under root */
- if (HDstrcmp(obj1fullname, "/") != 0 || HDstrcmp(obj2fullname, "/") != 0)
+ if (strcmp(obj1fullname, "/") != 0 || strcmp(obj2fullname, "/") != 0)
parallel_print("group1 group2\n");
else
parallel_print("file1 file2\n");
@@ -1126,9 +1126,9 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id,
* if not root, prepare object name to be pre-appended to group path to
* make full path
*/
- if (HDstrcmp(grp1, "/") != 0)
+ if (strcmp(grp1, "/") != 0)
grp1_path = grp1;
- if (HDstrcmp(grp2, "/") != 0)
+ if (strcmp(grp2, "/") != 0)
grp2_path = grp2;
/*-------------------------------------------------------------------------
@@ -1186,13 +1186,13 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id,
H5TOOLS_ERROR(H5DIFF_ERR, "name buffer allocation failed");
}
#else /* H5_HAVE_ASPRINTF */
- if ((obj1_fullpath = (char *)malloc(HDstrlen(grp1_path) + HDstrlen(table->objs[i].name) + 1)) ==
+ if ((obj1_fullpath = (char *)malloc(strlen(grp1_path) + strlen(table->objs[i].name) + 1)) ==
NULL) {
H5TOOLS_ERROR(H5DIFF_ERR, "name buffer allocation failed");
}
else {
- HDstrcpy(obj1_fullpath, grp1_path);
- HDstrcat(obj1_fullpath, table->objs[i].name);
+ strcpy(obj1_fullpath, grp1_path);
+ strcat(obj1_fullpath, table->objs[i].name);
}
#endif /* H5_HAVE_ASPRINTF */
H5TOOLS_DEBUG("diff_match path1 - %s", obj1_fullpath);
@@ -1204,22 +1204,22 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id,
H5TOOLS_ERROR(H5DIFF_ERR, "name buffer allocation failed");
}
#else /* H5_HAVE_ASPRINTF */
- if ((obj2_fullpath = (char *)malloc(HDstrlen(grp2_path) + HDstrlen(table->objs[i].name) + 1)) ==
+ if ((obj2_fullpath = (char *)malloc(strlen(grp2_path) + strlen(table->objs[i].name) + 1)) ==
NULL) {
H5TOOLS_ERROR(H5DIFF_ERR, "name buffer allocation failed");
}
else {
- HDstrcpy(obj2_fullpath, grp2_path);
- HDstrcat(obj2_fullpath, table->objs[i].name);
+ strcpy(obj2_fullpath, grp2_path);
+ strcat(obj2_fullpath, table->objs[i].name);
}
#endif /* H5_HAVE_ASPRINTF */
H5TOOLS_DEBUG("diff_match path2 - %s", obj2_fullpath);
/* get index to figure out type of the object in file1 */
- while (info1->paths[idx1].path && (HDstrcmp(obj1_fullpath, info1->paths[idx1].path) != 0))
+ while (info1->paths[idx1].path && (strcmp(obj1_fullpath, info1->paths[idx1].path) != 0))
idx1++;
/* get index to figure out type of the object in file2 */
- while (info2->paths[idx2].path && (HDstrcmp(obj2_fullpath, info2->paths[idx2].path) != 0))
+ while (info2->paths[idx2].path && (strcmp(obj2_fullpath, info2->paths[idx2].path) != 0))
idx2++;
/* Set argdata to pass other args into diff() */
@@ -1246,14 +1246,14 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id,
*/
/*Set up args to pass to worker task. */
- if (HDstrlen(obj1_fullpath) > 255 || HDstrlen(obj2_fullpath) > 255) {
+ if (strlen(obj1_fullpath) > 255 || strlen(obj2_fullpath) > 255) {
printf("The parallel diff only supports object names up to 255 characters\n");
MPI_Abort(MPI_COMM_WORLD, 0);
} /* end if */
/* set args struct to pass */
- HDstrcpy(args.name1, obj1_fullpath);
- HDstrcpy(args.name2, obj2_fullpath);
+ strcpy(args.name1, obj1_fullpath);
+ strcpy(args.name2, obj2_fullpath);
args.opts = *opts;
args.argdata.type[0] = info1->paths[idx1].type;
args.argdata.type[1] = info2->paths[idx2].type;
@@ -1534,9 +1534,9 @@ diff(hid_t file1_id, const char *path1, hid_t file2_id, const char *path2, diff_
hid_t type2_id = H5I_INVALID_HID;
hid_t grp1_id = H5I_INVALID_HID;
hid_t grp2_id = H5I_INVALID_HID;
- hbool_t is_dangle_link1 = FALSE;
- hbool_t is_dangle_link2 = FALSE;
- hbool_t is_hard_link = FALSE;
+ bool is_dangle_link1 = false;
+ bool is_dangle_link2 = false;
+ bool is_hard_link = false;
hsize_t nfound = 0;
h5trav_type_t object_type;
diff_err_t ret_value = opts->err_stat;
@@ -1577,7 +1577,7 @@ diff(hid_t file1_id, const char *path1, hid_t file2_id, const char *path2, diff_
H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "dangling link is error");
}
else
- is_dangle_link1 = TRUE;
+ is_dangle_link1 = true;
}
/* target object2 - get type and name */
@@ -1592,7 +1592,7 @@ diff(hid_t file1_id, const char *path1, hid_t file2_id, const char *path2, diff_
H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "dangling link is error");
}
else
- is_dangle_link2 = TRUE;
+ is_dangle_link2 = true;
}
/* found dangling link */
@@ -1810,7 +1810,7 @@ diff(hid_t file1_id, const char *path1, hid_t file2_id, const char *path2, diff_
*/
case H5TRAV_TYPE_LINK: {
H5TOOLS_DEBUG("H5TRAV_TYPE_LINK 1:%s 2:%s ", path1, path2);
- status = HDstrcmp(linkinfo1.trg_path, linkinfo2.trg_path);
+ status = strcmp(linkinfo1.trg_path, linkinfo2.trg_path);
/* if the target link name is not same then the links are "different" */
nfound = (status != 0) ? 1 : 0;
diff --git a/tools/lib/h5diff.h b/tools/lib/h5diff.h
index d16c8551733..12bf56a8ecd 100644
--- a/tools/lib/h5diff.h
+++ b/tools/lib/h5diff.h
@@ -27,7 +27,7 @@
*------------------------------------------------------------------------*/
typedef struct {
h5trav_type_t type[2];
- hbool_t is_same_trgobj;
+ bool is_same_trgobj;
} diff_args_t;
/*-------------------------------------------------------------------------
* command line options
@@ -61,7 +61,7 @@ typedef struct {
int use_system_epsilon; /* flag to use system epsilon (1 or 0) */
int percent_bool; /* relative error to compare*/
double percent; /* relative error value */
- hbool_t follow_links; /* follow symbolic links */
+ bool follow_links; /* follow symbolic links */
int no_dangle_links; /* return error when find dangling link */
int cmn_objs; /* do we have common objects */
int not_cmp; /* are the objects comparable */
@@ -90,8 +90,8 @@ typedef struct {
struct subset_t *sset[2]; /* subsetting parameters */
h5tools_vol_info_t vol_info[2]; /* VOL information for input file, output file */
h5tools_vfd_info_t vfd_info[2]; /* VFD information for input file, output file */
- hbool_t custom_vol[2]; /* Using a custom input, output VOL? */
- hbool_t custom_vfd[2]; /* Using a custom input, output VFD? */
+ bool custom_vol[2]; /* Using a custom input, output VOL? */
+ bool custom_vfd[2]; /* Using a custom input, output VFD? */
} diff_opt_t;
/*-------------------------------------------------------------------------
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index abb81b91b85..d8c9ac679a5 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -80,32 +80,32 @@
*-------------------------------------------------------------------------
*/
-static hbool_t not_comparable;
+static bool not_comparable;
#define PER(A, B) \
do { \
per = -1; \
- not_comparable = FALSE; \
- both_zero = FALSE; \
+ not_comparable = false; \
+ both_zero = false; \
if (H5_DBL_ABS_EQUAL(0, (double)(A)) && H5_DBL_ABS_EQUAL(0, (double)(B))) \
- both_zero = TRUE; \
+ both_zero = true; \
if (!H5_DBL_ABS_EQUAL(0, (double)(A))) \
per = (double)ABS((double)((B) - (A)) / (double)(A)); \
else \
- not_comparable = TRUE; \
+ not_comparable = true; \
} while (0)
#define PER_UNSIGN(TYPE, A, B) \
do { \
per = -1; \
- not_comparable = FALSE; \
- both_zero = FALSE; \
+ not_comparable = false; \
+ both_zero = false; \
if (H5_DBL_ABS_EQUAL(0, (double)(A)) && H5_DBL_ABS_EQUAL(0, (double)(B))) \
- both_zero = TRUE; \
+ both_zero = true; \
if (!H5_DBL_ABS_EQUAL(0, (double)(A))) \
per = ABS((double)((TYPE)((B) - (A))) / (double)(A)); \
else \
- not_comparable = TRUE; \
+ not_comparable = true; \
} while (0)
#define PDIFF(a, b) (((b) > (a)) ? ((b) - (a)) : ((a) - (b)))
@@ -121,14 +121,14 @@ typedef struct mcomp_t {
* local prototypes
*-------------------------------------------------------------------------
*/
-static hbool_t all_zero(const void *_mem, size_t size);
+static bool all_zero(const void *_mem, size_t size);
static int ull2float(unsigned long long ull_value, float *f_value);
static hsize_t character_compare(char *mem1, char *mem2, hsize_t elemtno, size_t u, diff_opt_t *opts);
static hsize_t character_compare_opt(unsigned char *mem1, unsigned char *mem2, hsize_t elemtno,
diff_opt_t *opts);
-static hbool_t equal_float(float value, float expected, diff_opt_t *opts);
-static hbool_t equal_double(double value, double expected, diff_opt_t *opts);
-static hbool_t equal_ldouble(long double value, long double expected, diff_opt_t *opts);
+static bool equal_float(float value, float expected, diff_opt_t *opts);
+static bool equal_double(double value, double expected, diff_opt_t *opts);
+static bool equal_ldouble(long double value, long double expected, diff_opt_t *opts);
static int print_data(diff_opt_t *opts);
static void print_pos(diff_opt_t *opts, hsize_t elemtno, size_t u);
@@ -444,8 +444,8 @@ diff_datum(void *_mem1, void *_mem2, hsize_t elemtno, diff_opt_t *opts, hid_t co
unsigned nmembs;
unsigned j;
size_t size = 0;
- hbool_t iszero1;
- hbool_t iszero2;
+ bool iszero1;
+ bool iszero2;
hsize_t nfound = 0; /* differences found */
diff_err_t ret_value = opts->err_stat;
@@ -519,14 +519,14 @@ diff_datum(void *_mem1, void *_mem2, hsize_t elemtno, diff_opt_t *opts, hid_t co
/* Get pointer to first string */
s1 = *(char **)((void *)mem1);
if (s1)
- size1 = HDstrlen(s1);
+ size1 = strlen(s1);
else
size1 = 0;
/* Get pointer to second string */
s2 = *(char **)((void *)mem2);
if (s2)
- size2 = HDstrlen(s2);
+ size2 = strlen(s2);
else
size2 = 0;
}
@@ -535,7 +535,7 @@ diff_datum(void *_mem1, void *_mem2, hsize_t elemtno, diff_opt_t *opts, hid_t co
/* Get pointer to first string */
s1 = (char *)mem1;
if (s1)
- size1 = HDstrlen(s1);
+ size1 = strlen(s1);
else
size1 = 0;
@@ -545,7 +545,7 @@ diff_datum(void *_mem1, void *_mem2, hsize_t elemtno, diff_opt_t *opts, hid_t co
/* Get pointer to second string */
s2 = (char *)mem2;
if (s2)
- size2 = HDstrlen(s2);
+ size2 = strlen(s2);
else
size2 = 0;
@@ -648,11 +648,11 @@ diff_datum(void *_mem1, void *_mem2, hsize_t elemtno, diff_opt_t *opts, hid_t co
*/
err1 = H5Tenum_nameof(opts->m_tid, mem1, enum_name1, sizeof enum_name1);
if (err1 < 0)
- HDsnprintf(enum_name1, sizeof(enum_name1), "**INVALID VALUE**");
+ snprintf(enum_name1, sizeof(enum_name1), "**INVALID VALUE**");
err2 = H5Tenum_nameof(opts->m_tid, mem2, enum_name2, sizeof enum_name2);
if (err2 < 0)
- HDsnprintf(enum_name2, sizeof(enum_name2), "**INVALID VALUE**");
+ snprintf(enum_name2, sizeof(enum_name2), "**INVALID VALUE**");
/* One or more bad enum values */
if (err1 < 0 || err2 < 0) {
@@ -669,7 +669,7 @@ diff_datum(void *_mem1, void *_mem2, hsize_t elemtno, diff_opt_t *opts, hid_t co
}
else {
/* Both enum values were valid */
- if (HDstrcmp(enum_name1, enum_name2) != 0) {
+ if (strcmp(enum_name1, enum_name2) != 0) {
nfound = 1;
opts->print_percentage = 0;
print_pos(opts, elemtno, 0);
@@ -1270,20 +1270,20 @@ diff_datum(void *_mem1, void *_mem2, hsize_t elemtno, diff_opt_t *opts, hid_t co
*
* Purpose: Determines if memory is initialized to all zero bytes.
*
- * Return: TRUE if all bytes are zero; FALSE otherwise
+ * Return: true if all bytes are zero; false otherwise
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
all_zero(const void *_mem, size_t size)
{
const unsigned char *mem = (const unsigned char *)_mem;
while (size-- > 0)
if (mem[size])
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
/*-------------------------------------------------------------------------
@@ -1592,7 +1592,7 @@ character_compare_opt(unsigned char *mem1, unsigned char *mem2, hsize_t elemtno,
hsize_t nfound = 0; /* differences found */
unsigned char temp1_uchar;
unsigned char temp2_uchar;
- hbool_t both_zero = FALSE;
+ bool both_zero = false;
double per;
/* both_zero is set in the PER_UNSIGN macro but not used in this function */
@@ -1667,9 +1667,9 @@ diff_float_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d
float temp1_float;
float temp2_float;
double per;
- hbool_t both_zero = FALSE;
- hbool_t isnan1 = FALSE;
- hbool_t isnan2 = FALSE;
+ bool both_zero = false;
+ bool isnan1 = false;
+ bool isnan2 = false;
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
@@ -1688,8 +1688,8 @@ diff_float_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d
*-------------------------------------------------------------------------
*/
if (opts->do_nans) {
- isnan1 = HDisnan(temp1_float);
- isnan2 = HDisnan(temp2_float);
+ isnan1 = isnan(temp1_float);
+ isnan2 = isnan(temp2_float);
}
/* both not NaN, do the comparison */
@@ -1725,8 +1725,8 @@ diff_float_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d
*-------------------------------------------------------------------------
*/
if (opts->do_nans) {
- isnan1 = HDisnan(temp1_float);
- isnan2 = HDisnan(temp2_float);
+ isnan1 = isnan(temp1_float);
+ isnan2 = isnan(temp2_float);
}
/* both not NaN, do the comparison */
if ((!isnan1 && !isnan2)) {
@@ -1773,8 +1773,8 @@ diff_float_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d
*-------------------------------------------------------------------------
*/
if (opts->do_nans) {
- isnan1 = HDisnan(temp1_float);
- isnan2 = HDisnan(temp2_float);
+ isnan1 = isnan(temp1_float);
+ isnan2 = isnan(temp2_float);
}
/* both not NaN, do the comparison */
@@ -1817,7 +1817,7 @@ diff_float_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d
*-------------------------------------------------------------------------
*/
else {
- if (equal_float(temp1_float, temp2_float, opts) == FALSE) {
+ if (equal_float(temp1_float, temp2_float, opts) == false) {
opts->print_percentage = 0;
print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
@@ -1847,9 +1847,9 @@ diff_double_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx,
double temp1_double;
double temp2_double;
double per;
- hbool_t both_zero = FALSE;
- hbool_t isnan1 = FALSE;
- hbool_t isnan2 = FALSE;
+ bool both_zero = false;
+ bool isnan1 = false;
+ bool isnan2 = false;
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
@@ -1866,8 +1866,8 @@ diff_double_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx,
*-------------------------------------------------------------------------
*/
if (opts->do_nans) {
- isnan1 = HDisnan(temp1_double);
- isnan2 = HDisnan(temp2_double);
+ isnan1 = isnan(temp1_double);
+ isnan2 = isnan(temp2_double);
}
/* both not NaN, do the comparison */
@@ -1902,8 +1902,8 @@ diff_double_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx,
*-------------------------------------------------------------------------
*/
if (opts->do_nans) {
- isnan1 = HDisnan(temp1_double);
- isnan2 = HDisnan(temp2_double);
+ isnan1 = isnan(temp1_double);
+ isnan2 = isnan(temp2_double);
}
/* both not NaN, do the comparison */
if (!isnan1 && !isnan2) {
@@ -1948,8 +1948,8 @@ diff_double_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx,
*-------------------------------------------------------------------------
*/
if (opts->do_nans) {
- isnan1 = HDisnan(temp1_double);
- isnan2 = HDisnan(temp2_double);
+ isnan1 = isnan(temp1_double);
+ isnan2 = isnan(temp2_double);
}
/* both not NaN, do the comparison */
@@ -1990,7 +1990,7 @@ diff_double_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx,
*-------------------------------------------------------------------------
*/
else {
- if (equal_double(temp1_double, temp2_double, opts) == FALSE) {
+ if (equal_double(temp1_double, temp2_double, opts) == false) {
opts->print_percentage = 0;
print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
@@ -2020,9 +2020,9 @@ diff_ldouble_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx,
long double temp1_double;
long double temp2_double;
double per;
- hbool_t both_zero = FALSE;
- hbool_t isnan1 = FALSE;
- hbool_t isnan2 = FALSE;
+ bool both_zero = false;
+ bool isnan1 = false;
+ bool isnan2 = false;
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
@@ -2041,8 +2041,8 @@ diff_ldouble_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx,
*-------------------------------------------------------------------------
*/
if (opts->do_nans) {
- isnan1 = HDisnan(temp1_double);
- isnan2 = HDisnan(temp2_double);
+ isnan1 = isnan(temp1_double);
+ isnan2 = isnan(temp2_double);
}
/* both not NaN, do the comparison */
@@ -2076,8 +2076,8 @@ diff_ldouble_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx,
*-------------------------------------------------------------------------
*/
if (opts->do_nans) {
- isnan1 = HDisnan(temp1_double);
- isnan2 = HDisnan(temp2_double);
+ isnan1 = isnan(temp1_double);
+ isnan2 = isnan(temp2_double);
}
/* both not NaN, do the comparison */
@@ -2123,8 +2123,8 @@ diff_ldouble_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx,
*-------------------------------------------------------------------------
*/
if (opts->do_nans) {
- isnan1 = HDisnan(temp1_double);
- isnan2 = HDisnan(temp2_double);
+ isnan1 = isnan(temp1_double);
+ isnan2 = isnan(temp2_double);
}
/* both not NaN, do the comparison */
@@ -2164,7 +2164,7 @@ diff_ldouble_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx,
* no -d and -p
*-------------------------------------------------------------------------
*/
- else if (equal_ldouble(temp1_double, temp2_double, opts) == FALSE) {
+ else if (equal_ldouble(temp1_double, temp2_double, opts) == false) {
opts->print_percentage = 0;
print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
@@ -2193,7 +2193,7 @@ diff_schar_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d
char temp1_char;
char temp2_char;
double per;
- hbool_t both_zero = FALSE;
+ bool both_zero = false;
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
memcpy(&temp1_char, mem1, sizeof(char));
@@ -2281,7 +2281,7 @@ diff_uchar_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d
unsigned char temp1_uchar;
unsigned char temp2_uchar;
double per;
- hbool_t both_zero = FALSE;
+ bool both_zero = false;
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
@@ -2369,7 +2369,7 @@ diff_short_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d
short temp1_short;
short temp2_short;
double per;
- hbool_t both_zero = FALSE;
+ bool both_zero = false;
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
@@ -2457,7 +2457,7 @@ diff_ushort_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx,
unsigned short temp1_ushort;
unsigned short temp2_ushort;
double per;
- hbool_t both_zero = FALSE;
+ bool both_zero = false;
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
@@ -2549,7 +2549,7 @@ diff_int_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, dif
int temp1_int;
int temp2_int;
double per;
- hbool_t both_zero = FALSE;
+ bool both_zero = false;
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
@@ -2637,7 +2637,7 @@ diff_uint_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, di
unsigned int temp1_uint;
unsigned int temp2_uint;
double per;
- hbool_t both_zero = FALSE;
+ bool both_zero = false;
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
@@ -2725,7 +2725,7 @@ diff_long_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, di
long temp1_long;
long temp2_long;
double per;
- hbool_t both_zero = FALSE;
+ bool both_zero = false;
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
@@ -2813,7 +2813,7 @@ diff_ulong_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d
unsigned long temp1_ulong;
unsigned long temp2_ulong;
double per;
- hbool_t both_zero = FALSE;
+ bool both_zero = false;
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
@@ -2903,7 +2903,7 @@ diff_llong_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d
long long temp1_llong;
long long temp2_llong;
double per;
- hbool_t both_zero = FALSE;
+ bool both_zero = false;
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
@@ -2997,7 +2997,7 @@ diff_ullong_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx,
unsigned long long temp2_ullong;
float f1, f2;
double per;
- hbool_t both_zero = FALSE;
+ bool both_zero = false;
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
@@ -3132,7 +3132,7 @@ ull2float(unsigned long long ull_value, float *f_value)
* Purpose: use a absolute error formula to deal with floating point uncertainty
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
equal_double(double value, double expected, diff_opt_t *opts)
{
if (opts->do_nans) {
@@ -3140,36 +3140,36 @@ equal_double(double value, double expected, diff_opt_t *opts)
* detect NaNs
*-------------------------------------------------------------------------
*/
- hbool_t isnan1 = HDisnan(value);
- hbool_t isnan2 = HDisnan(expected);
+ bool isnan1 = isnan(value);
+ bool isnan2 = isnan(expected);
/*-------------------------------------------------------------------------
* we consider NaN == NaN to be true
*-------------------------------------------------------------------------
*/
if (isnan1 && isnan2)
- return TRUE;
+ return true;
/*-------------------------------------------------------------------------
* one is a NaN, do not compare but assume difference
*-------------------------------------------------------------------------
*/
if ((isnan1 && !isnan2) || (!isnan1 && isnan2))
- return FALSE;
+ return false;
}
if (opts->use_system_epsilon) {
/* Check equality within some epsilon */
if (H5_DBL_ABS_EQUAL(value, expected))
- return TRUE;
+ return true;
}
else {
/* Check bits */
if (!memcmp(&value, &expected, sizeof(double)))
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
/*-------------------------------------------------------------------------
@@ -3179,7 +3179,7 @@ equal_double(double value, double expected, diff_opt_t *opts)
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
equal_ldouble(long double value, long double expected, diff_opt_t *opts)
{
if (opts->do_nans) {
@@ -3187,36 +3187,36 @@ equal_ldouble(long double value, long double expected, diff_opt_t *opts)
* detect NaNs
*-------------------------------------------------------------------------
*/
- hbool_t isnan1 = HDisnan(value);
- hbool_t isnan2 = HDisnan(expected);
+ bool isnan1 = isnan(value);
+ bool isnan2 = isnan(expected);
/*-------------------------------------------------------------------------
* we consider NaN == NaN to be true
*-------------------------------------------------------------------------
*/
if (isnan1 && isnan2)
- return TRUE;
+ return true;
/*-------------------------------------------------------------------------
* one is a NaN, do not compare but assume difference
*-------------------------------------------------------------------------
*/
if ((isnan1 && !isnan2) || (!isnan1 && isnan2))
- return FALSE;
+ return false;
}
if (opts->use_system_epsilon) {
/* Check equality within some epsilon */
if (H5_LDBL_ABS_EQUAL(value, expected))
- return TRUE;
+ return true;
}
else {
/* Check bits */
if (!memcmp(&value, &expected, sizeof(long double)))
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
/*-------------------------------------------------------------------------
@@ -3225,7 +3225,7 @@ equal_ldouble(long double value, long double expected, diff_opt_t *opts)
* Purpose: use a absolute error formula to deal with floating point uncertainty
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
equal_float(float value, float expected, diff_opt_t *opts)
{
if (opts->do_nans) {
@@ -3233,36 +3233,36 @@ equal_float(float value, float expected, diff_opt_t *opts)
* detect NaNs
*-------------------------------------------------------------------------
*/
- hbool_t isnan1 = HDisnan(value);
- hbool_t isnan2 = HDisnan(expected);
+ bool isnan1 = isnan(value);
+ bool isnan2 = isnan(expected);
/*-------------------------------------------------------------------------
* we consider NaN == NaN to be true
*-------------------------------------------------------------------------
*/
if (isnan1 && isnan2)
- return TRUE;
+ return true;
/*-------------------------------------------------------------------------
* one is a NaN, do not compare but assume difference
*-------------------------------------------------------------------------
*/
if ((isnan1 && !isnan2) || (!isnan1 && isnan2))
- return FALSE;
+ return false;
}
if (opts->use_system_epsilon) {
/* Check equality within some epsilon */
if (H5_FLT_ABS_EQUAL(value, expected))
- return TRUE;
+ return true;
}
else {
/* Check bits */
if (!memcmp(&value, &expected, sizeof(float)))
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
/*-------------------------------------------------------------------------
diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c
index 0c377afc2eb..2521177a598 100644
--- a/tools/lib/h5diff_attr.c
+++ b/tools/lib/h5diff_attr.c
@@ -112,7 +112,7 @@ table_attr_mark_exist(const unsigned *exist, char *name, table_attrs_t *table)
table->attrs[curr_val].exist[0] = exist[0];
table->attrs[curr_val].exist[1] = exist[1];
if (name)
- table->attrs[curr_val].name = (char *)HDstrdup(name);
+ table->attrs[curr_val].name = (char *)strdup(name);
table->nattrs++;
}
}
@@ -186,7 +186,7 @@ build_match_list_attrs(hid_t loc1_id, hid_t loc2_id, table_attrs_t **table_out,
H5TOOLS_GOTO_ERROR(FAIL, "H5Aget_name second attribute failed");
/* criteria is string compare */
- cmp = HDstrcmp(name1, name2);
+ cmp = strcmp(name1, name2);
if (cmp == 0) {
infile[0] = 1;
@@ -326,8 +326,8 @@ diff_attr_data(hid_t attr1_id, hid_t attr2_id, const char *name1, const char *na
size_t msize2; /* memory size of memory type */
void *buf1 = NULL; /* data buffer */
void *buf2 = NULL; /* data buffer */
- hbool_t buf1hasdata = FALSE; /* buffer has data */
- hbool_t buf2hasdata = FALSE; /* buffer has data */
+ bool buf1hasdata = false; /* buffer has data */
+ bool buf2hasdata = false; /* buffer has data */
int rank1; /* rank of dataset */
int rank2; /* rank of dataset */
hsize_t dims1[H5S_MAX_RANK]; /* dimensions of dataset */
@@ -384,19 +384,19 @@ diff_attr_data(hid_t attr1_id, hid_t attr2_id, const char *name1, const char *na
H5TOOLS_DEBUG("attr_names: %s - %s", name1, name2);
if (name1) {
- sz = HDstrlen(name1);
+ sz = strlen(name1);
H5TOOLS_DEBUG("attr1_name: %s - %d", name1, sz);
if (sz > 0) {
opts->obj_name[0] = (char *)malloc(sz + 1);
- HDstrncpy(opts->obj_name[0], name1, sz + 1);
+ strncpy(opts->obj_name[0], name1, sz + 1);
}
}
if (name2) {
- sz = HDstrlen(name2);
+ sz = strlen(name2);
H5TOOLS_DEBUG("attr2_name: %s - %d", name2, sz);
if (sz > 0) {
opts->obj_name[1] = (char *)malloc(sz + 1);
- HDstrncpy(opts->obj_name[1], name2, sz + 1);
+ strncpy(opts->obj_name[1], name2, sz + 1);
}
}
H5TOOLS_DEBUG("attr_names: %s - %s", opts->obj_name[0], opts->obj_name[1]);
@@ -443,7 +443,7 @@ diff_attr_data(hid_t attr1_id, hid_t attr2_id, const char *name1, const char *na
H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "H5Aget_type first attribute failed");
}
else
- buf1hasdata = TRUE;
+ buf1hasdata = true;
H5TOOLS_DEBUG("attr H5Aread 1");
if (H5Aread(attr2_id, mtype2_id, buf2) < 0) {
@@ -451,7 +451,7 @@ diff_attr_data(hid_t attr1_id, hid_t attr2_id, const char *name1, const char *na
H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "H5Aget_type second attribute failed");
}
else
- buf2hasdata = TRUE;
+ buf2hasdata = true;
H5TOOLS_DEBUG("attr H5Aread 2");
/* format output string */
@@ -464,17 +464,17 @@ diff_attr_data(hid_t attr1_id, hid_t attr2_id, const char *name1, const char *na
H5TOOLS_DEBUG("attr_names: %s - %s : %s - %s", name1, name2, path1, path2);
if (name1) {
- sz = HDstrlen(name1) + HDstrlen(path1) + 7;
+ sz = strlen(name1) + strlen(path1) + 7;
H5TOOLS_DEBUG("attr1_name: %s - %d", name1, sz);
opts->obj_name[0] = (char *)calloc(sz + 1, sizeof(char));
- HDsnprintf(opts->obj_name[0], sz, "%s of <%s>", name1, path1);
+ snprintf(opts->obj_name[0], sz, "%s of <%s>", name1, path1);
opts->obj_name[0][sz] = '\0';
}
if (name2) {
- sz = HDstrlen(name2) + HDstrlen(path2) + 7;
+ sz = strlen(name2) + strlen(path2) + 7;
H5TOOLS_DEBUG("attr2_name: %s - %d", name2, sz);
opts->obj_name[1] = (char *)calloc(sz + 1, sizeof(char));
- HDsnprintf(opts->obj_name[1], sz, "%s of <%s>", name2, path2);
+ snprintf(opts->obj_name[1], sz, "%s of <%s>", name2, path2);
opts->obj_name[1][sz] = '\0';
}
@@ -530,12 +530,12 @@ diff_attr_data(hid_t attr1_id, hid_t attr2_id, const char *name1, const char *na
/* Free buf1 and buf2, check both VLEN-data VLEN-string to reclaim any
* VLEN memory first */
- if (TRUE == h5tools_detect_vlen(mtype1_id))
+ if (true == h5tools_detect_vlen(mtype1_id))
H5Treclaim(mtype1_id, space1_id, H5P_DEFAULT, buf1);
free(buf1);
buf1 = NULL;
- if (TRUE == h5tools_detect_vlen(mtype2_id))
+ if (true == h5tools_detect_vlen(mtype2_id))
H5Treclaim(mtype2_id, space2_id, H5P_DEFAULT, buf2);
free(buf2);
buf2 = NULL;
@@ -559,12 +559,12 @@ diff_attr_data(hid_t attr1_id, hid_t attr2_id, const char *name1, const char *na
H5E_BEGIN_TRY
{
if (buf1) {
- if (buf1hasdata && TRUE == h5tools_detect_vlen(mtype1_id))
+ if (buf1hasdata && true == h5tools_detect_vlen(mtype1_id))
H5Treclaim(mtype1_id, space1_id, H5P_DEFAULT, buf1);
free(buf1);
} /* end if */
if (buf2) {
- if (buf2hasdata && TRUE == h5tools_detect_vlen(mtype2_id))
+ if (buf2hasdata && true == h5tools_detect_vlen(mtype2_id))
H5Treclaim(mtype2_id, space2_id, H5P_DEFAULT, buf2);
free(buf2);
} /* end if */
diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c
index 78f52bc14eb..3d4b25a83d8 100644
--- a/tools/lib/h5diff_dset.c
+++ b/tools/lib/h5diff_dset.c
@@ -274,21 +274,21 @@ diff_datasetid(hid_t did1, hid_t did2, const char *obj1_name, const char *obj2_n
H5TOOLS_DEBUG("obj_names: %s - %s", obj1_name, obj2_name);
opts->obj_name[0] = NULL;
if (obj1_name) {
- j = (int)HDstrlen(obj1_name);
+ j = (int)strlen(obj1_name);
H5TOOLS_DEBUG("obj1_name: %s - %d", obj1_name, j);
if (j > 0) {
opts->obj_name[0] = (char *)malloc((size_t)j + 1);
- HDstrncpy(opts->obj_name[0], obj1_name, (size_t)j + 1);
+ strncpy(opts->obj_name[0], obj1_name, (size_t)j + 1);
}
}
opts->obj_name[1] = NULL;
if (obj2_name) {
- j = (int)HDstrlen(obj2_name);
+ j = (int)strlen(obj2_name);
H5TOOLS_DEBUG("obj2_name: %s - %d", obj2_name, j);
if (j > 0) {
opts->obj_name[1] = (char *)malloc((size_t)j + 1);
- HDstrncpy(opts->obj_name[1], obj2_name, (size_t)j + 1);
+ strncpy(opts->obj_name[1], obj2_name, (size_t)j + 1);
}
}
@@ -351,10 +351,10 @@ diff_datasetid(hid_t did1, hid_t did2, const char *obj1_name, const char *obj2_n
/* Check if type is either VLEN-data or VLEN-string to reclaim any
* VLEN memory buffer later
*/
- if (TRUE == h5tools_detect_vlen(m_tid1))
- vl_data1 = TRUE;
- if (TRUE == h5tools_detect_vlen(m_tid2))
- vl_data2 = TRUE;
+ if (true == h5tools_detect_vlen(m_tid1))
+ vl_data1 = true;
+ if (true == h5tools_detect_vlen(m_tid2))
+ vl_data2 = true;
H5TOOLS_DEBUG("h5tools_detect_vlen %d:%d - errstat:%d", vl_data1, vl_data2, opts->err_stat);
/*------------------------------------------------------------------------
@@ -431,9 +431,9 @@ diff_datasetid(hid_t did1, hid_t did2, const char *obj1_name, const char *obj2_n
opts->obj_name[1] = NULL;
if (obj1_name)
- opts->obj_name[0] = HDstrdup(diff_basename(obj1_name));
+ opts->obj_name[0] = strdup(diff_basename(obj1_name));
if (obj2_name)
- opts->obj_name[1] = HDstrdup(diff_basename(obj2_name));
+ opts->obj_name[1] = strdup(diff_basename(obj2_name));
H5TOOLS_DEBUG("obj_names: %s - %s", opts->obj_name[0], opts->obj_name[1]);
H5TOOLS_DEBUG("read/compare");
diff --git a/tools/lib/h5diff_util.c b/tools/lib/h5diff_util.c
index fc74a391511..4641c938dad 100644
--- a/tools/lib/h5diff_util.c
+++ b/tools/lib/h5diff_util.c
@@ -190,7 +190,7 @@ diff_basename(const char *name)
return NULL;
/* Find the end of the base name */
- i = HDstrlen(name);
+ i = strlen(name);
while (i > 0 && '/' == name[i - 1])
--i;
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index 0e063c7f432..36e304d459e 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -246,7 +246,7 @@ h5tools_set_data_output_file(const char *fname, int is_bin)
if (rawdatastream && rawdatastream != stdout) {
if (fclose(rawdatastream))
- HDperror("closing rawdatastream");
+ perror("closing rawdatastream");
else
rawdatastream = NULL;
}
@@ -294,7 +294,7 @@ h5tools_set_attr_output_file(const char *fname, int is_bin)
if (rawattrstream && rawattrstream != stdout) {
if (fclose(rawattrstream))
- HDperror("closing rawattrstream");
+ perror("closing rawattrstream");
else
rawattrstream = NULL;
}
@@ -343,7 +343,7 @@ h5tools_set_input_file(const char *fname, int is_bin)
if (rawinstream && rawinstream != stdin) {
if (fclose(rawinstream))
- HDperror("closing rawinstream");
+ perror("closing rawinstream");
else
rawinstream = NULL;
}
@@ -391,7 +391,7 @@ h5tools_set_output_file(const char *fname, int is_bin)
if (rawoutstream && rawoutstream != stdout) {
if (fclose(rawoutstream))
- HDperror("closing rawoutstream");
+ perror("closing rawoutstream");
else
rawoutstream = NULL;
}
@@ -438,7 +438,7 @@ h5tools_set_error_file(const char *fname, int is_bin)
if (rawerrorstream && rawerrorstream != stderr) {
if (fclose(rawerrorstream))
- HDperror("closing rawerrorstream");
+ perror("closing rawerrorstream");
else
rawerrorstream = NULL;
}
@@ -485,12 +485,12 @@ h5tools_set_fapl_vfd(hid_t fapl_id, h5tools_vfd_info_t *vfd_info)
switch (vfd_info->type) {
case VFD_BY_NAME:
/* Determine which driver the user wants to open the file with */
- if (!HDstrcmp(vfd_info->u.name, drivernames[SEC2_VFD_IDX])) {
+ if (!strcmp(vfd_info->u.name, drivernames[SEC2_VFD_IDX])) {
/* SEC2 Driver */
if (H5Pset_fapl_sec2(fapl_id) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_sec2 failed");
}
- else if (!HDstrcmp(vfd_info->u.name, drivernames[DIRECT_VFD_IDX])) {
+ else if (!strcmp(vfd_info->u.name, drivernames[DIRECT_VFD_IDX])) {
#ifdef H5_HAVE_DIRECT
/* Direct Driver */
if (H5Pset_fapl_direct(fapl_id, 1024, 4096, 8 * 4096) < 0)
@@ -499,14 +499,14 @@ h5tools_set_fapl_vfd(hid_t fapl_id, h5tools_vfd_info_t *vfd_info)
H5TOOLS_GOTO_ERROR(FAIL, "Direct VFD is not enabled");
#endif
}
- else if (!HDstrcmp(vfd_info->u.name, drivernames[LOG_VFD_IDX])) {
+ else if (!strcmp(vfd_info->u.name, drivernames[LOG_VFD_IDX])) {
unsigned long long log_flags = H5FD_LOG_LOC_IO | H5FD_LOG_ALLOC;
/* Log Driver */
if (H5Pset_fapl_log(fapl_id, NULL, log_flags, (size_t)0) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_log failed");
}
- else if (!HDstrcmp(vfd_info->u.name, drivernames[WINDOWS_VFD_IDX])) {
+ else if (!strcmp(vfd_info->u.name, drivernames[WINDOWS_VFD_IDX])) {
#ifdef H5_HAVE_WINDOWS
/* There is no Windows VFD - use SEC2 */
if (H5Pset_fapl_sec2(fapl_id) < 0)
@@ -515,17 +515,17 @@ h5tools_set_fapl_vfd(hid_t fapl_id, h5tools_vfd_info_t *vfd_info)
H5TOOLS_GOTO_ERROR(FAIL, "Windows VFD is not enabled");
#endif
}
- else if (!HDstrcmp(vfd_info->u.name, drivernames[STDIO_VFD_IDX])) {
+ else if (!strcmp(vfd_info->u.name, drivernames[STDIO_VFD_IDX])) {
/* Stdio Driver */
if (H5Pset_fapl_stdio(fapl_id) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_stdio failed");
}
- else if (!HDstrcmp(vfd_info->u.name, drivernames[CORE_VFD_IDX])) {
+ else if (!strcmp(vfd_info->u.name, drivernames[CORE_VFD_IDX])) {
/* Core Driver */
- if (H5Pset_fapl_core(fapl_id, (size_t)H5_MB, TRUE) < 0)
+ if (H5Pset_fapl_core(fapl_id, (size_t)H5_MB, true) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_core failed");
}
- else if (!HDstrcmp(vfd_info->u.name, drivernames[FAMILY_VFD_IDX])) {
+ else if (!strcmp(vfd_info->u.name, drivernames[FAMILY_VFD_IDX])) {
/* FAMILY Driver */
/* Set member size to be 0 to indicate the current first member size
* is the member size.
@@ -533,17 +533,17 @@ h5tools_set_fapl_vfd(hid_t fapl_id, h5tools_vfd_info_t *vfd_info)
if (H5Pset_fapl_family(fapl_id, (hsize_t)0, H5P_DEFAULT) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_family failed");
}
- else if (!HDstrcmp(vfd_info->u.name, drivernames[SPLIT_VFD_IDX])) {
+ else if (!strcmp(vfd_info->u.name, drivernames[SPLIT_VFD_IDX])) {
/* SPLIT Driver */
if (H5Pset_fapl_split(fapl_id, "-m.h5", H5P_DEFAULT, "-r.h5", H5P_DEFAULT) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_split failed");
}
- else if (!HDstrcmp(vfd_info->u.name, drivernames[MULTI_VFD_IDX])) {
+ else if (!strcmp(vfd_info->u.name, drivernames[MULTI_VFD_IDX])) {
/* MULTI Driver */
- if (H5Pset_fapl_multi(fapl_id, NULL, NULL, NULL, NULL, TRUE) < 0)
+ if (H5Pset_fapl_multi(fapl_id, NULL, NULL, NULL, NULL, true) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_multi failed");
}
- else if (!HDstrcmp(vfd_info->u.name, drivernames[MPIO_VFD_IDX])) {
+ else if (!strcmp(vfd_info->u.name, drivernames[MPIO_VFD_IDX])) {
#ifdef H5_HAVE_PARALLEL
int mpi_initialized, mpi_finalized;
@@ -561,7 +561,7 @@ h5tools_set_fapl_vfd(hid_t fapl_id, h5tools_vfd_info_t *vfd_info)
H5TOOLS_GOTO_ERROR(FAIL, "MPI-I/O VFD is not enabled");
#endif /* H5_HAVE_PARALLEL */
}
- else if (!HDstrcmp(vfd_info->u.name, drivernames[ROS3_VFD_IDX])) {
+ else if (!strcmp(vfd_info->u.name, drivernames[ROS3_VFD_IDX])) {
#ifdef H5_HAVE_ROS3_VFD
if (!vfd_info->info)
H5TOOLS_GOTO_ERROR(FAIL, "Read-only S3 VFD info is invalid");
@@ -575,7 +575,7 @@ h5tools_set_fapl_vfd(hid_t fapl_id, h5tools_vfd_info_t *vfd_info)
H5TOOLS_GOTO_ERROR(FAIL, "Read-only S3 VFD is not enabled");
#endif
}
- else if (!HDstrcmp(vfd_info->u.name, drivernames[HDFS_VFD_IDX])) {
+ else if (!strcmp(vfd_info->u.name, drivernames[HDFS_VFD_IDX])) {
#ifdef H5_HAVE_LIBHDFS
if (!vfd_info->info)
H5TOOLS_GOTO_ERROR(FAIL, "HDFS VFD info is invalid");
@@ -585,7 +585,7 @@ h5tools_set_fapl_vfd(hid_t fapl_id, h5tools_vfd_info_t *vfd_info)
H5TOOLS_GOTO_ERROR(FAIL, "The HDFS VFD is not enabled");
#endif
}
- else if (!HDstrcmp(vfd_info->u.name, drivernames[SUBFILING_VFD_IDX])) {
+ else if (!strcmp(vfd_info->u.name, drivernames[SUBFILING_VFD_IDX])) {
#if defined(H5_HAVE_PARALLEL) && defined(H5_HAVE_SUBFILING_VFD)
int mpi_initialized, mpi_finalized;
@@ -601,7 +601,7 @@ h5tools_set_fapl_vfd(hid_t fapl_id, h5tools_vfd_info_t *vfd_info)
H5TOOLS_GOTO_ERROR(FAIL, "The Subfiling VFD is not enabled");
#endif
}
- else if (!HDstrcmp(vfd_info->u.name, drivernames[ONION_VFD_IDX])) {
+ else if (!strcmp(vfd_info->u.name, drivernames[ONION_VFD_IDX])) {
/* Onion driver */
if (!vfd_info->info)
H5TOOLS_GOTO_ERROR(FAIL, "Onion VFD info is invalid");
@@ -676,10 +676,10 @@ h5tools_set_fapl_vol(hid_t fapl_id, h5tools_vol_info_t *vol_info)
/* Check for VOL connectors that ship with the library, then try
* registering by name if that fails.
*/
- if (!HDstrcmp(vol_info->u.name, H5VL_NATIVE_NAME)) {
+ if (!strcmp(vol_info->u.name, H5VL_NATIVE_NAME)) {
connector_id = H5VL_NATIVE;
}
- else if (!HDstrcmp(vol_info->u.name, H5VL_PASSTHRU_NAME)) {
+ else if (!strcmp(vol_info->u.name, H5VL_PASSTHRU_NAME)) {
connector_id = H5VL_PASSTHRU;
}
else {
@@ -822,9 +822,9 @@ h5tools_get_fapl(hid_t prev_fapl_id, h5tools_vol_info_t *vol_info, h5tools_vfd_i
herr_t
h5tools_get_vfd_name(hid_t fid, hid_t fapl_id, char *drivername, size_t drivername_size)
{
- hid_t fapl_vol_id = H5I_INVALID_HID;
- hbool_t is_native = FALSE;
- herr_t ret_value = SUCCEED;
+ hid_t fapl_vol_id = H5I_INVALID_HID;
+ bool is_native = false;
+ herr_t ret_value = SUCCEED;
if (fapl_id < 0)
H5TOOLS_GOTO_ERROR(FAIL, "invalid FAPL");
@@ -895,7 +895,7 @@ h5tools_get_vfd_name(hid_t fid, hid_t fapl_id, char *drivername, size_t driverna
else
driver_name = "unknown";
- HDstrncpy(drivername, driver_name, drivername_size);
+ strncpy(drivername, driver_name, drivername_size);
drivername[drivername_size - 1] = '\0';
}
@@ -915,14 +915,14 @@ h5tools_get_vfd_name(hid_t fid, hid_t fapl_id, char *drivername, size_t driverna
*
* The 'use_specific_driver' parameter is used to control the
* VFD/VOL connector that this routine uses to open the file
- * with. If 'use_specific_driver' is set to TRUE, this routine
+ * with. If 'use_specific_driver' is set to true, this routine
* assumes that the caller has already set a specific VFD or VOL
* connector on the given FAPL and will attempt to directly use
* the FAPL for opening the file. We assume that the caller knows
* what they are doing; if the file is unable to be opened using
* that FAPL, this routine will return H5I_INVALID_HID.
*
- * However, if 'use_specific_driver' is set to FALSE, this
+ * However, if 'use_specific_driver' is set to false, this
* routine assumes that the caller HAS NOT set a specific VFD or
* VOL connector on the given FAPL and will instead loop through
* the various available VFL drivers and VOL connectors trying to
@@ -951,7 +951,7 @@ h5tools_get_vfd_name(hid_t fid, hid_t fapl_id, char *drivername, size_t driverna
*-------------------------------------------------------------------------
*/
hid_t
-h5tools_fopen(const char *fname, unsigned flags, hid_t fapl_id, hbool_t use_specific_driver, char *drivername,
+h5tools_fopen(const char *fname, unsigned flags, hid_t fapl_id, bool use_specific_driver, char *drivername,
size_t drivername_size)
{
hid_t fid = H5I_INVALID_HID;
@@ -989,7 +989,7 @@ h5tools_fopen(const char *fname, unsigned flags, hid_t fapl_id, hbool_t use_spec
/*
* If we failed to open the file and the caller specified 'use_specific_driver'
- * as TRUE, we should return failure now since the file couldn't be opened with
+ * as true, we should return failure now since the file couldn't be opened with
* the VFL driver/VOL connector that was set on the FAPL by the caller.
*/
if (use_specific_driver)
@@ -1037,7 +1037,7 @@ h5tools_fopen(const char *fname, unsigned flags, hid_t fapl_id, hbool_t use_spec
/* Can we open the file with this combo? */
H5E_BEGIN_TRY
{
- fid = h5tools_fopen(fname, flags, tmp_fapl_id, TRUE, drivername, drivername_size);
+ fid = h5tools_fopen(fname, flags, tmp_fapl_id, true, drivername, drivername_size);
}
H5E_END_TRY
@@ -1060,7 +1060,7 @@ h5tools_fopen(const char *fname, unsigned flags, hid_t fapl_id, hbool_t use_spec
continue;
/* Can we open the file with this connector? */
- if ((fid = h5tools_fopen(fname, flags, tmp_fapl_id, TRUE, drivername, drivername_size)) >= 0) {
+ if ((fid = h5tools_fopen(fname, flags, tmp_fapl_id, true, drivername, drivername_size)) >= 0) {
used_fapl_id = tmp_fapl_id;
H5TOOLS_GOTO_DONE(fid);
}
@@ -1121,24 +1121,24 @@ h5tools_count_ncols(const char *s)
*
* Purpose: Recursive check for any variable length data in given type.
*
- * Return: TRUE : type contains any variable length data
- * FALSE : type doesn't contain any variable length data
+ * Return: true : type contains any variable length data
+ * false : type doesn't contain any variable length data
* Negative value: failed
*-------------------------------------------------------------------------
*/
htri_t
h5tools_detect_vlen(hid_t tid)
{
- htri_t ret = FALSE;
+ htri_t ret = false;
/* recursive detect any vlen data values in type (compound, array ...) */
ret = H5Tdetect_class(tid, H5T_VLEN);
- if ((ret == TRUE) || (ret < 0))
+ if ((ret == true) || (ret < 0))
goto done;
/* recursive detect any vlen string in type (compound, array ...) */
ret = h5tools_detect_vlen_str(tid);
- if ((ret == TRUE) || (ret < 0))
+ if ((ret == true) || (ret < 0))
goto done;
done:
@@ -1150,8 +1150,8 @@ h5tools_detect_vlen(hid_t tid)
*
* Purpose: Recursive check for variable length string of a datatype.
*
- * Return: TRUE : type contains any variable length string
- * FALSE : type doesn't contain any variable length string
+ * Return: true : type contains any variable length string
+ * false : type doesn't contain any variable length string
* Negative value: failed
*-------------------------------------------------------------------------
*/
@@ -1159,10 +1159,10 @@ htri_t
h5tools_detect_vlen_str(hid_t tid)
{
H5T_class_t tclass = -1;
- htri_t ret = FALSE;
+ htri_t ret = false;
ret = H5Tis_variable_str(tid);
- if ((ret == TRUE) || (ret < 0))
+ if ((ret == true) || (ret < 0))
goto done;
tclass = H5Tget_class(tid);
@@ -1174,7 +1174,7 @@ h5tools_detect_vlen_str(hid_t tid)
goto done;
}
ret = h5tools_detect_vlen_str(btid);
- if ((ret == TRUE) || (ret < 0)) {
+ if ((ret == true) || (ret < 0)) {
H5Tclose(btid);
goto done;
}
@@ -1194,7 +1194,7 @@ h5tools_detect_vlen_str(hid_t tid)
hid_t mtid = H5Tget_member_type(tid, u);
ret = h5tools_detect_vlen_str(mtid);
- if ((ret == TRUE) || (ret < 0)) {
+ if ((ret == true) || (ret < 0)) {
H5Tclose(mtid);
goto done;
}
@@ -1241,7 +1241,7 @@ h5tools_simple_prefix(FILE *stream, const h5tool_format_t *info, h5tools_context
ctx->cur_column, info->idx_fmt, info->line_suf);
if (ctx->cur_column) {
PUTSTREAM(OPT(info->line_suf, ""), stream);
- HDputc('\n', stream);
+ putc('\n', stream);
PUTSTREAM(OPT(info->line_sep, ""), stream);
}
H5TOOLS_DEBUG("after CR elmtno=%ld, ctx->ndims=%d", elmtno, ctx->ndims);
@@ -1334,7 +1334,7 @@ h5tools_region_simple_prefix(FILE *stream, const h5tool_format_t *info, h5tools_
/* Terminate previous line, if any */
if (ctx->cur_column) {
PUTSTREAM(OPT(info->line_suf, ""), stream);
- HDputc('\n', stream);
+ putc('\n', stream);
PUTSTREAM(OPT(info->line_sep, ""), stream);
}
@@ -1411,16 +1411,16 @@ h5tools_region_simple_prefix(FILE *stream, const h5tool_format_t *info, h5tools_
* hsize_t elmt_count is the data element loop counter
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
h5tools_render_element(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx,
h5tools_str_t *buffer, hsize_t *curr_pos, size_t ncols, hsize_t local_elmt_counter,
hsize_t elmt_counter)
{
- hbool_t dimension_break = TRUE;
- char *s = NULL;
- char *section = NULL; /* a section of output */
- int secnum; /* section sequence number */
- int multiline; /* datum was multiline */
+ bool dimension_break = true;
+ char *s = NULL;
+ char *section = NULL; /* a section of output */
+ int secnum; /* section sequence number */
+ int multiline; /* datum was multiline */
if (stream == NULL)
return dimension_break;
@@ -1436,23 +1436,23 @@ h5tools_render_element(FILE *stream, const h5tool_format_t *info, h5tools_contex
* current location...
*/
if (info->line_multi_new == 1 &&
- (ctx->cur_column + h5tools_count_ncols(s) + HDstrlen(OPT(info->elmt_suf2, " ")) +
- HDstrlen(OPT(info->line_suf, ""))) > ncols) {
+ (ctx->cur_column + h5tools_count_ncols(s) + strlen(OPT(info->elmt_suf2, " ")) +
+ strlen(OPT(info->line_suf, ""))) > ncols) {
if (ctx->prev_multiline) {
/*
* ... and the previous element also occupied more than one
* line, then start this element at the beginning of a line.
*/
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
}
- else if ((ctx->prev_prefix_len + h5tools_count_ncols(s) + HDstrlen(OPT(info->elmt_suf2, " ")) +
- HDstrlen(OPT(info->line_suf, ""))) <= ncols) {
+ else if ((ctx->prev_prefix_len + h5tools_count_ncols(s) + strlen(OPT(info->elmt_suf2, " ")) +
+ strlen(OPT(info->line_suf, ""))) <= ncols) {
/*
* ...but *could* fit on one line otherwise, then we
* should end the current line and start this element on its
* own line.
*/
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
}
H5TOOLS_DEBUG("ctx->need_prefix=%d", ctx->need_prefix);
}
@@ -1464,11 +1464,11 @@ h5tools_render_element(FILE *stream, const h5tool_format_t *info, h5tools_contex
*/
if (info->arr_linebreak && ctx->cur_elmt) {
if (ctx->size_last_dim && (ctx->cur_elmt % ctx->size_last_dim) == 0)
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
if (elmt_counter == ctx->size_last_dim) {
- ctx->need_prefix = TRUE;
- dimension_break = FALSE;
+ ctx->need_prefix = true;
+ dimension_break = false;
}
H5TOOLS_DEBUG("ctx->need_prefix=%d", ctx->need_prefix);
}
@@ -1481,9 +1481,9 @@ h5tools_render_element(FILE *stream, const h5tool_format_t *info, h5tools_contex
* beginning of the line.
*/
if (info->line_multi_new == 1 && ctx->prev_multiline &&
- (ctx->cur_column + h5tools_count_ncols(s) + HDstrlen(OPT(info->elmt_suf2, " ")) +
- HDstrlen(OPT(info->line_suf, ""))) > ncols)
- ctx->need_prefix = TRUE;
+ (ctx->cur_column + h5tools_count_ncols(s) + strlen(OPT(info->elmt_suf2, " ")) +
+ strlen(OPT(info->line_suf, ""))) > ncols)
+ ctx->need_prefix = true;
H5TOOLS_DEBUG("ctx->need_prefix=%d", ctx->need_prefix);
/*
@@ -1491,7 +1491,7 @@ h5tools_render_element(FILE *stream, const h5tool_format_t *info, h5tools_contex
* start a new line.
*/
if (info->line_per_line > 0 && ctx->cur_elmt >= info->line_per_line)
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
H5TOOLS_DEBUG("ctx->need_prefix=%d", ctx->need_prefix);
/*
@@ -1500,7 +1500,7 @@ h5tools_render_element(FILE *stream, const h5tool_format_t *info, h5tools_contex
* one-at a time.
*/
multiline = 0;
- for (secnum = 0, multiline = 0; (section = HDstrtok(secnum ? NULL : s, OPTIONAL_LINE_BREAK)); secnum++) {
+ for (secnum = 0, multiline = 0; (section = strtok(secnum ? NULL : s, OPTIONAL_LINE_BREAK)); secnum++) {
/*
* If the current section plus possible suffix and end-of-line
* information would cause the output to wrap then we need to
@@ -1510,8 +1510,8 @@ h5tools_render_element(FILE *stream, const h5tool_format_t *info, h5tools_contex
/*
* check for displaying prefix for each section
*/
- if ((ctx->cur_column + HDstrlen(section) + HDstrlen(OPT(info->elmt_suf2, " ")) +
- HDstrlen(OPT(info->line_suf, ""))) > ncols)
+ if ((ctx->cur_column + strlen(section) + strlen(OPT(info->elmt_suf2, " ")) +
+ strlen(OPT(info->line_suf, ""))) > ncols)
ctx->need_prefix = 1;
/*
@@ -1535,13 +1535,13 @@ h5tools_render_element(FILE *stream, const h5tool_format_t *info, h5tools_contex
}
else if ((local_elmt_counter || ctx->continuation) && secnum == 0) {
PUTSTREAM(OPT(info->elmt_suf2, " "), stream);
- ctx->cur_column += HDstrlen(OPT(info->elmt_suf2, " "));
+ ctx->cur_column += strlen(OPT(info->elmt_suf2, " "));
}
H5TOOLS_DEBUG("section=%s", section);
/* Print the section */
PUTSTREAM(section, stream);
- ctx->cur_column += HDstrlen(section);
+ ctx->cur_column += strlen(section);
}
ctx->prev_multiline = multiline;
@@ -1576,16 +1576,16 @@ h5tools_render_element(FILE *stream, const h5tool_format_t *info, h5tools_contex
* hsize_t elmt_count is the data element loop counter
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
h5tools_render_region_element(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx,
h5tools_str_t *buffer, hsize_t *curr_pos, size_t ncols, hsize_t *ptdata,
hsize_t local_elmt_counter, hsize_t elmt_counter)
{
- hbool_t dimension_break = TRUE;
- char *s = NULL;
- char *section = NULL; /* a section of output */
- int secnum; /* section sequence number */
- int multiline; /* datum was multiline */
+ bool dimension_break = true;
+ char *s = NULL;
+ char *section = NULL; /* a section of output */
+ int secnum; /* section sequence number */
+ int multiline; /* datum was multiline */
H5TOOLS_START_DEBUG(" ");
H5TOOLS_DEBUG("elmt_counter=%ld - local_elmt_counter=%ld", elmt_counter, local_elmt_counter);
@@ -1597,23 +1597,23 @@ h5tools_render_region_element(FILE *stream, const h5tool_format_t *info, h5tools
* current location...
*/
if (info->line_multi_new == 1 &&
- (ctx->cur_column + h5tools_count_ncols(s) + HDstrlen(OPT(info->elmt_suf2, " ")) +
- HDstrlen(OPT(info->line_suf, ""))) > ncols) {
+ (ctx->cur_column + h5tools_count_ncols(s) + strlen(OPT(info->elmt_suf2, " ")) +
+ strlen(OPT(info->line_suf, ""))) > ncols) {
if (ctx->prev_multiline) {
/*
* ... and the previous element also occupied more than one
* line, then start this element at the beginning of a line.
*/
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
}
- else if ((ctx->prev_prefix_len + h5tools_count_ncols(s) + HDstrlen(OPT(info->elmt_suf2, " ")) +
- HDstrlen(OPT(info->line_suf, ""))) <= ncols) {
+ else if ((ctx->prev_prefix_len + h5tools_count_ncols(s) + strlen(OPT(info->elmt_suf2, " ")) +
+ strlen(OPT(info->line_suf, ""))) <= ncols) {
/*
* ...but *could* fit on one line otherwise, then we
* should end the current line and start this element on its
* own line.
*/
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
}
}
@@ -1624,11 +1624,11 @@ h5tools_render_region_element(FILE *stream, const h5tool_format_t *info, h5tools
*/
if (info->arr_linebreak && ctx->cur_elmt) {
if (ctx->size_last_dim && (ctx->cur_elmt % ctx->size_last_dim) == 0)
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
if (elmt_counter == ctx->size_last_dim) {
- ctx->need_prefix = TRUE;
- dimension_break = FALSE;
+ ctx->need_prefix = true;
+ dimension_break = false;
}
}
@@ -1638,16 +1638,16 @@ h5tools_render_region_element(FILE *stream, const h5tool_format_t *info, h5tools
* beginning of the line.
*/
if (info->line_multi_new == 1 && ctx->prev_multiline &&
- (ctx->cur_column + h5tools_count_ncols(s) + HDstrlen(OPT(info->elmt_suf2, " ")) +
- HDstrlen(OPT(info->line_suf, ""))) > ncols)
- ctx->need_prefix = TRUE;
+ (ctx->cur_column + h5tools_count_ncols(s) + strlen(OPT(info->elmt_suf2, " ")) +
+ strlen(OPT(info->line_suf, ""))) > ncols)
+ ctx->need_prefix = true;
/*
* If too many elements have already been printed then we need to
* start a new line.
*/
if (info->line_per_line > 0 && ctx->cur_elmt >= info->line_per_line)
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
/*
* Each OPTIONAL_LINE_BREAK embedded in the rendered string can cause
@@ -1655,7 +1655,7 @@ h5tools_render_region_element(FILE *stream, const h5tool_format_t *info, h5tools
* one-at a time.
*/
multiline = 0;
- for (secnum = 0, multiline = 0; (section = HDstrtok(secnum ? NULL : s, OPTIONAL_LINE_BREAK)); secnum++) {
+ for (secnum = 0, multiline = 0; (section = strtok(secnum ? NULL : s, OPTIONAL_LINE_BREAK)); secnum++) {
/*
* If the current section plus possible suffix and end-of-line
* information would cause the output to wrap then we need to
@@ -1667,8 +1667,8 @@ h5tools_render_region_element(FILE *stream, const h5tool_format_t *info, h5tools
* this check to happen for the first line
*/
if ((!info->skip_first || local_elmt_counter) &&
- (ctx->cur_column + HDstrlen(section) + HDstrlen(OPT(info->elmt_suf2, " ")) +
- HDstrlen(OPT(info->line_suf, ""))) > ncols)
+ (ctx->cur_column + strlen(section) + strlen(OPT(info->elmt_suf2, " ")) +
+ strlen(OPT(info->line_suf, ""))) > ncols)
ctx->need_prefix = 1;
/*
@@ -1690,12 +1690,12 @@ h5tools_render_region_element(FILE *stream, const h5tool_format_t *info, h5tools
}
else if ((local_elmt_counter || ctx->continuation) && secnum == 0) {
PUTSTREAM(OPT(info->elmt_suf2, " "), stream);
- ctx->cur_column += HDstrlen(OPT(info->elmt_suf2, " "));
+ ctx->cur_column += strlen(OPT(info->elmt_suf2, " "));
}
/* Print the section */
PUTSTREAM(section, stream);
- ctx->cur_column += HDstrlen(section);
+ ctx->cur_column += strlen(section);
}
ctx->prev_multiline = multiline;
@@ -1788,7 +1788,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
size_t size; /* datum size */
hsize_t block_index;
H5T_class_t type_class;
- hbool_t past_catch = FALSE;
+ bool past_catch = false;
int ret_value = 0;
H5TOOLS_START_DEBUG(" ");
@@ -1838,7 +1838,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
if (H5Tis_variable_str(tid)) {
s = *(char **)((void *)mem);
if (s != NULL)
- size = HDstrlen(s);
+ size = strlen(s);
else
H5TOOLS_THROW((-1), "NULL string");
}
@@ -2036,7 +2036,7 @@ render_bin_output_region_data_blocks(hid_t region_id, FILE *stream, hid_t contai
size_t type_size;
hid_t mem_space = H5I_INVALID_HID;
void *region_buf = NULL;
- hbool_t past_catch = FALSE;
+ bool past_catch = false;
hsize_t blkndx;
hid_t sid1 = H5I_INVALID_HID;
int ret_value = -1;
@@ -2121,7 +2121,7 @@ done:;
* True otherwise
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
render_bin_output_region_blocks(hid_t region_space, hid_t region_id, FILE *stream, hid_t container)
{
hssize_t snblocks;
@@ -2132,30 +2132,30 @@ render_bin_output_region_blocks(hid_t region_space, hid_t region_id, FILE *strea
unsigned ndims;
hid_t dtype = H5I_INVALID_HID;
hid_t type_id = H5I_INVALID_HID;
- hbool_t past_catch = FALSE;
- hbool_t ret_value = TRUE;
+ bool past_catch = false;
+ bool ret_value = true;
H5TOOLS_START_DEBUG(" ");
if ((snblocks = H5Sget_select_hyper_nblocks(region_space)) <= 0)
- H5TOOLS_THROW(FALSE, "H5Sget_select_hyper_nblocks failed");
+ H5TOOLS_THROW(false, "H5Sget_select_hyper_nblocks failed");
nblocks = (hsize_t)snblocks;
/* Print block information */
if ((sndims = H5Sget_simple_extent_ndims(region_space)) < 0)
- H5TOOLS_THROW(FALSE, "H5Sget_simple_extent_ndims failed");
+ H5TOOLS_THROW(false, "H5Sget_simple_extent_ndims failed");
ndims = (unsigned)sndims;
alloc_size = nblocks * ndims * 2 * sizeof(ptdata[0]);
if ((ptdata = (hsize_t *)malloc((size_t)alloc_size)) == NULL)
- H5TOOLS_GOTO_ERROR(FALSE, "Could not allocate buffer for ptdata");
+ H5TOOLS_GOTO_ERROR(false, "Could not allocate buffer for ptdata");
if (H5Sget_select_hyper_blocklist(region_space, (hsize_t)0, nblocks, ptdata) < 0)
- H5TOOLS_GOTO_ERROR(FALSE, "H5Rget_select_hyper_blocklist failed");
+ H5TOOLS_GOTO_ERROR(false, "H5Rget_select_hyper_blocklist failed");
if ((dtype = H5Dget_type(region_id)) < 0)
- H5TOOLS_GOTO_ERROR(FALSE, "H5Dget_type failed");
+ H5TOOLS_GOTO_ERROR(false, "H5Dget_type failed");
if ((type_id = H5Tget_native_type(dtype, H5T_DIR_DEFAULT)) < 0)
- H5TOOLS_GOTO_ERROR(FALSE, "H5Tget_native_type failed");
+ H5TOOLS_GOTO_ERROR(false, "H5Tget_native_type failed");
render_bin_output_region_data_blocks(region_id, stream, container, ndims, type_id, nblocks, ptdata);
@@ -2163,12 +2163,12 @@ render_bin_output_region_blocks(hid_t region_space, hid_t region_id, FILE *strea
free(ptdata);
if (type_id > 0 && H5Tclose(type_id) < 0)
- H5TOOLS_ERROR(FALSE, "H5Tclose failed");
+ H5TOOLS_ERROR(false, "H5Tclose failed");
if (dtype > 0 && H5Tclose(dtype) < 0)
- H5TOOLS_ERROR(FALSE, "H5Tclose failed");
+ H5TOOLS_ERROR(false, "H5Tclose failed");
- H5_LEAVE(TRUE);
+ H5_LEAVE(true);
CATCH
H5TOOLS_ENDDEBUG(" ");
@@ -2246,7 +2246,7 @@ render_bin_output_region_data_points(hid_t region_space, hid_t region_id, FILE *
* True otherwise
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
render_bin_output_region_points(hid_t region_space, hid_t region_id, FILE *stream, hid_t container)
{
hssize_t snpoints;
@@ -2255,33 +2255,33 @@ render_bin_output_region_points(hid_t region_space, hid_t region_id, FILE *strea
unsigned ndims;
hid_t dtype = H5I_INVALID_HID;
hid_t type_id = H5I_INVALID_HID;
- hbool_t past_catch = FALSE;
- hbool_t ret_value = TRUE;
+ bool past_catch = false;
+ bool ret_value = true;
H5TOOLS_START_DEBUG(" ");
if ((snpoints = H5Sget_select_elem_npoints(region_space)) <= 0)
- H5TOOLS_THROW(FALSE, "H5Sget_select_elem_npoints failed");
+ H5TOOLS_THROW(false, "H5Sget_select_elem_npoints failed");
npoints = (hsize_t)snpoints;
/* Allocate space for the dimension array */
if ((sndims = H5Sget_simple_extent_ndims(region_space)) < 0)
- H5TOOLS_THROW(FALSE, "H5Sget_simple_extent_ndims failed");
+ H5TOOLS_THROW(false, "H5Sget_simple_extent_ndims failed");
ndims = (unsigned)sndims;
if ((dtype = H5Dget_type(region_id)) < 0)
- H5TOOLS_GOTO_ERROR(FALSE, "H5Dget_type failed");
+ H5TOOLS_GOTO_ERROR(false, "H5Dget_type failed");
if ((type_id = H5Tget_native_type(dtype, H5T_DIR_DEFAULT)) < 0)
- H5TOOLS_GOTO_ERROR(FALSE, "H5Tget_native_type failed");
+ H5TOOLS_GOTO_ERROR(false, "H5Tget_native_type failed");
render_bin_output_region_data_points(region_space, region_id, stream, container, ndims, type_id, npoints);
done:
if (type_id > 0 && H5Tclose(type_id) < 0)
- H5TOOLS_ERROR(FALSE, "H5Tclose failed");
+ H5TOOLS_ERROR(false, "H5Tclose failed");
if (dtype > 0 && H5Tclose(dtype) < 0)
- H5TOOLS_ERROR(FALSE, "H5Tclose failed");
+ H5TOOLS_ERROR(false, "H5Tclose failed");
H5_LEAVE(ret_value);
CATCH
@@ -2294,20 +2294,20 @@ render_bin_output_region_points(hid_t region_space, hid_t region_id, FILE *strea
*
* Purpose: Determines if memory is initialized to all zero bytes.
*
- * Return: TRUE if all bytes are zero
- * FALSE otherwise
+ * Return: true if all bytes are zero
+ * false otherwise
*-------------------------------------------------------------------------
*/
-H5_ATTR_PURE hbool_t
+H5_ATTR_PURE bool
h5tools_is_zero(const void *_mem, size_t size)
{
const unsigned char *mem = (const unsigned char *)_mem;
while (size-- > 0)
if (mem[size])
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
/*-------------------------------------------------------------------------
@@ -2323,22 +2323,22 @@ h5tools_is_zero(const void *_mem, size_t size)
* char *name1: link name of the first object.
* Use "." or NULL if loc_id2 is the object to be compared.
*
- * Return: TRUE if it is the same object
- * FALSE otherwise.
+ * Return: true if it is the same object
+ * false otherwise.
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
h5tools_is_obj_same(hid_t loc_id1, const char *name1, hid_t loc_id2, const char *name2)
{
H5O_info2_t oinfo1, oinfo2;
- hbool_t ret_val = FALSE;
+ bool ret_val = false;
- if (name1 && HDstrcmp(name1, ".") != 0)
+ if (name1 && strcmp(name1, ".") != 0)
H5Oget_info_by_name3(loc_id1, name1, &oinfo1, H5O_INFO_BASIC, H5P_DEFAULT);
else
H5Oget_info3(loc_id1, &oinfo1, H5O_INFO_BASIC);
- if (name2 && HDstrcmp(name2, ".") != 0)
+ if (name2 && strcmp(name2, ".") != 0)
H5Oget_info_by_name3(loc_id2, name2, &oinfo2, H5O_INFO_BASIC, H5P_DEFAULT);
else
H5Oget_info3(loc_id2, &oinfo2, H5O_INFO_BASIC);
@@ -2349,7 +2349,7 @@ h5tools_is_obj_same(hid_t loc_id1, const char *name1, hid_t loc_id2, const char
H5Otoken_cmp(loc_id1, &oinfo1.token, &oinfo2.token, &token_cmp_val);
if (!token_cmp_val)
- ret_val = TRUE;
+ ret_val = true;
}
return ret_val;
diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h
index 98ced407be9..b636806e2e9 100644
--- a/tools/lib/h5tools.h
+++ b/tools/lib/h5tools.h
@@ -40,7 +40,7 @@
#define PUTSTREAM(X, S) \
do { \
if (S != NULL) \
- HDfputs(X, S); \
+ fputs(X, S); \
} while (0)
/*
@@ -291,7 +291,7 @@ typedef struct h5tool_format_t {
*
* Numeric data is also subject to the formats for individual elements.
*/
- hbool_t raw;
+ bool raw;
const char *fmt_raw;
const char *fmt_int;
const char *fmt_uint;
@@ -674,17 +674,17 @@ H5TOOLS_DLL int h5tools_set_error_file(const char *fname, int is_bin);
H5TOOLS_DLL hid_t h5tools_get_fapl(hid_t prev_fapl_id, h5tools_vol_info_t *vol_info,
h5tools_vfd_info_t *vfd_info);
H5TOOLS_DLL herr_t h5tools_get_vfd_name(hid_t fid, hid_t fapl_id, char *drivername, size_t drivername_size);
-H5TOOLS_DLL hid_t h5tools_fopen(const char *fname, unsigned flags, hid_t fapl, hbool_t use_specific_driver,
+H5TOOLS_DLL hid_t h5tools_fopen(const char *fname, unsigned flags, hid_t fapl, bool use_specific_driver,
char *drivername, size_t drivername_size);
H5TOOLS_DLL hid_t h5tools_get_little_endian_type(hid_t type);
H5TOOLS_DLL hid_t h5tools_get_big_endian_type(hid_t type);
H5TOOLS_DLL htri_t h5tools_detect_vlen(hid_t tid);
H5TOOLS_DLL htri_t h5tools_detect_vlen_str(hid_t tid);
-H5TOOLS_DLL hbool_t h5tools_is_obj_same(hid_t loc_id1, const char *name1, hid_t loc_id2, const char *name2);
+H5TOOLS_DLL bool h5tools_is_obj_same(hid_t loc_id1, const char *name1, hid_t loc_id2, const char *name2);
H5TOOLS_DLL void init_acc_pos(unsigned ndims, const hsize_t *dims, hsize_t *acc, hsize_t *pos,
hsize_t *p_min_idx);
H5TOOLS_DLL hsize_t calc_acc_pos(unsigned ndims, hsize_t elemtno, const hsize_t *acc, hsize_t *pos);
-H5TOOLS_DLL hbool_t h5tools_is_zero(const void *_mem, size_t size);
+H5TOOLS_DLL bool h5tools_is_zero(const void *_mem, size_t size);
H5TOOLS_DLL int h5tools_canreadf(const char *name, hid_t dcpl_id);
H5TOOLS_DLL int h5tools_can_encode(H5Z_filter_t filtn);
@@ -694,25 +694,25 @@ H5TOOLS_DLL void h5tools_region_simple_prefix(FILE *stream, const h5tool_format_
h5tools_context_t *ctx, hsize_t elmtno, hsize_t *ptdata,
int secnum);
-H5TOOLS_DLL int render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t nelmts);
-H5TOOLS_DLL int render_bin_output_region_data_blocks(hid_t region_id, FILE *stream, hid_t container,
- unsigned ndims, hid_t type_id, hsize_t nblocks,
- const hsize_t *ptdata);
-H5TOOLS_DLL hbool_t render_bin_output_region_blocks(hid_t region_space, hid_t region_id, FILE *stream,
- hid_t container);
-H5TOOLS_DLL int render_bin_output_region_data_points(hid_t region_space, hid_t region_id, FILE *stream,
- hid_t container, unsigned ndims, hid_t type_id,
- hsize_t npoints);
-H5TOOLS_DLL hbool_t render_bin_output_region_points(hid_t region_space, hid_t region_id, FILE *stream,
- hid_t container);
-
-H5TOOLS_DLL hbool_t h5tools_render_element(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx,
- h5tools_str_t *buffer, hsize_t *curr_pos, size_t ncols,
- hsize_t local_elmt_counter, hsize_t elmt_counter);
-H5TOOLS_DLL hbool_t h5tools_render_region_element(FILE *stream, const h5tool_format_t *info,
- h5tools_context_t *ctx, h5tools_str_t *buffer,
- hsize_t *curr_pos, size_t ncols, hsize_t *ptdata,
- hsize_t local_elmt_counter, hsize_t elmt_counter);
+H5TOOLS_DLL int render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t nelmts);
+H5TOOLS_DLL int render_bin_output_region_data_blocks(hid_t region_id, FILE *stream, hid_t container,
+ unsigned ndims, hid_t type_id, hsize_t nblocks,
+ const hsize_t *ptdata);
+H5TOOLS_DLL bool render_bin_output_region_blocks(hid_t region_space, hid_t region_id, FILE *stream,
+ hid_t container);
+H5TOOLS_DLL int render_bin_output_region_data_points(hid_t region_space, hid_t region_id, FILE *stream,
+ hid_t container, unsigned ndims, hid_t type_id,
+ hsize_t npoints);
+H5TOOLS_DLL bool render_bin_output_region_points(hid_t region_space, hid_t region_id, FILE *stream,
+ hid_t container);
+
+H5TOOLS_DLL bool h5tools_render_element(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx,
+ h5tools_str_t *buffer, hsize_t *curr_pos, size_t ncols,
+ hsize_t local_elmt_counter, hsize_t elmt_counter);
+H5TOOLS_DLL bool h5tools_render_region_element(FILE *stream, const h5tool_format_t *info,
+ h5tools_context_t *ctx, h5tools_str_t *buffer,
+ hsize_t *curr_pos, size_t ncols, hsize_t *ptdata,
+ hsize_t local_elmt_counter, hsize_t elmt_counter);
#ifdef __cplusplus
}
diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c
index 2986de7d395..efaddeeb304 100644
--- a/tools/lib/h5tools_dump.c
+++ b/tools/lib/h5tools_dump.c
@@ -248,7 +248,7 @@ h5tools_dump_simple_data(FILE *stream, const h5tool_format_t *info, h5tools_cont
unsigned char *mem = (unsigned char *)_mem;
hsize_t i; /* element counter */
size_t size; /* size of each datum */
- hbool_t dimension_break = TRUE;
+ bool dimension_break = true;
size_t ncols = 80; /* available output width */
h5tools_str_t buffer; /* string into which to render */
hsize_t curr_pos = 0; /* total data element position */
@@ -299,7 +299,7 @@ h5tools_dump_simple_data(FILE *stream, const h5tool_format_t *info, h5tools_cont
dimension_break =
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, ncols, i, elmt_counter);
/* Render the data element end*/
- if (FALSE == dimension_break)
+ if (false == dimension_break)
elmt_counter = 0;
} /* end for (i = 0; i < nelmts... */
H5TOOLS_DEBUG("data render finish");
@@ -334,7 +334,7 @@ h5tools_dump_simple_data(FILE *stream, const h5tool_format_t *info, h5tools_cont
* hsize_t elmt_count is the data element loop counter
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
h5tools_dump_region_attribute(hid_t region_id, FILE *stream, const h5tool_format_t *info,
h5tools_context_t *ctx, /* in,out */
h5tools_str_t *buffer, /* string into which to render */
@@ -342,13 +342,13 @@ h5tools_dump_region_attribute(hid_t region_id, FILE *stream, const h5tool_format
size_t ncols, hsize_t region_elmt_counter, /* element counter */
hsize_t elmt_counter)
{
- hbool_t dimension_break = TRUE;
+ bool dimension_break = true;
hid_t atype = H5I_INVALID_HID;
hid_t type_id = H5I_INVALID_HID;
hid_t region_space = H5I_INVALID_HID;
h5tool_format_t outputformat; /* Use to disable prefix for DATA attribute display */
- hbool_t past_catch = FALSE;
- hbool_t ret_value = TRUE;
+ bool past_catch = false;
+ bool ret_value = true;
assert(info);
assert(ctx);
@@ -379,31 +379,31 @@ h5tools_dump_region_attribute(hid_t region_id, FILE *stream, const h5tool_format
H5TOOLS_GOTO_ERROR(dimension_break, "H5Tget_native_type failed");
ctx->indent_level++;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
/* Render the datatype element begin */
h5tools_str_reset(buffer);
h5tools_str_append(buffer, "%s %s ", h5tools_dump_header_format->datatypebegin,
h5tools_dump_header_format->datatypeblockbegin);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
ctx->indent_level++;
- h5tools_print_datatype(stream, buffer, info, ctx, atype, TRUE);
+ h5tools_print_datatype(stream, buffer, info, ctx, atype, true);
ctx->indent_level--;
- if (HDstrlen(h5tools_dump_header_format->datatypeblockend)) {
+ if (strlen(h5tools_dump_header_format->datatypeblockend)) {
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->datatypeblockend);
- if (HDstrlen(h5tools_dump_header_format->datatypeend))
+ if (strlen(h5tools_dump_header_format->datatypeend))
h5tools_str_append(buffer, " ");
}
- if (HDstrlen(h5tools_dump_header_format->datatypeend))
+ if (strlen(h5tools_dump_header_format->datatypeend))
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->datatypeend);
dimension_break =
h5tools_render_element(stream, info, ctx, buffer, curr_pos, ncols, region_elmt_counter, elmt_counter);
/* Render the datatype element end */
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
/* Render the dataspace element begin */
h5tools_str_reset(buffer);
@@ -411,12 +411,12 @@ h5tools_dump_region_attribute(hid_t region_id, FILE *stream, const h5tool_format
h5tools_print_dataspace(buffer, region_space);
- if (HDstrlen(h5tools_dump_header_format->dataspaceblockend)) {
+ if (strlen(h5tools_dump_header_format->dataspaceblockend)) {
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->dataspaceblockend);
- if (HDstrlen(h5tools_dump_header_format->dataspaceend))
+ if (strlen(h5tools_dump_header_format->dataspaceend))
h5tools_str_append(buffer, " ");
}
- if (HDstrlen(h5tools_dump_header_format->dataspaceend))
+ if (strlen(h5tools_dump_header_format->dataspaceend))
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->dataspaceblockend);
dimension_break =
@@ -424,9 +424,9 @@ h5tools_dump_region_attribute(hid_t region_id, FILE *stream, const h5tool_format
/* Render the dataspace element end */
if (region_output) {
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
- h5tools_dump_data(stream, &outputformat, ctx, region_id, FALSE);
+ h5tools_dump_data(stream, &outputformat, ctx, region_id, false);
}
done:
@@ -440,7 +440,7 @@ h5tools_dump_region_attribute(hid_t region_id, FILE *stream, const h5tool_format
H5TOOLS_ERROR(dimension_break, "H5Sclose failed");
ctx->indent_level--;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
/* Render the region } element begin */
h5tools_str_reset(buffer);
@@ -482,7 +482,7 @@ h5tools_print_region_data_blocks(hid_t region_id, FILE *stream, const h5tool_for
size_t ncols, unsigned ndims, hid_t type_id, hsize_t nblocks,
hsize_t *ptdata)
{
- hbool_t dimension_break = TRUE;
+ bool dimension_break = true;
hsize_t *dims1 = NULL;
hsize_t *start = NULL;
hsize_t *count = NULL;
@@ -495,7 +495,7 @@ h5tools_print_region_data_blocks(hid_t region_id, FILE *stream, const h5tool_for
hsize_t numindex;
unsigned indx;
unsigned jndx;
- hbool_t past_catch = FALSE;
+ bool past_catch = false;
size_t type_size;
hid_t mem_space = H5I_INVALID_HID;
hid_t sid1 = H5I_INVALID_HID;
@@ -551,7 +551,7 @@ h5tools_print_region_data_blocks(hid_t region_id, FILE *stream, const h5tool_for
ctx.prev_multiline = cur_ctx->prev_multiline;
ctx.ndims = ndims;
for (blkndx = 0; blkndx < nblocks; blkndx++) {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
ctx.cur_elmt = 0;
for (indx = 0; indx < ndims; indx++) {
start[indx] = ptdata[indx + blkndx * ndims * 2];
@@ -600,7 +600,7 @@ h5tools_print_region_data_blocks(hid_t region_id, FILE *stream, const h5tool_for
ncols, ptdata, numindex, elmtno);
/* Render the region data element end */
- if (FALSE == dimension_break)
+ if (false == dimension_break)
elmtno = 0;
} /* end for (numindex = 0; numindex < numelem; numindex++, elmtno++, ctx.cur_elmt++) */
}
@@ -658,7 +658,7 @@ h5tools_print_region_data_blocks(hid_t region_id, FILE *stream, const h5tool_for
* hsize_t elmt_count is the data element loop counter
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, FILE *stream,
const h5tool_format_t *info, h5tools_context_t *ctx, /* in,out */
h5tools_str_t *buffer, /* string into which to render */
@@ -666,7 +666,7 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, FILE *strea
size_t ncols, hsize_t region_elmt_counter, /* element counter */
hsize_t elmt_counter)
{
- hbool_t dimension_break = TRUE;
+ bool dimension_break = true;
hssize_t snblocks;
hsize_t nblocks;
hsize_t alloc_size;
@@ -677,8 +677,8 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, FILE *strea
hid_t dtype = H5I_INVALID_HID;
hid_t type_id = H5I_INVALID_HID;
h5tool_format_t outputformat; /* Use to disable prefix for DATA attribute display */
- hbool_t past_catch = FALSE;
- hbool_t ret_value = TRUE;
+ bool past_catch = false;
+ bool ret_value = true;
assert(info);
assert(ctx);
@@ -711,7 +711,7 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, FILE *strea
/* Render the region { element end */
ctx->indent_level++;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
/* Render the region datatype info and indices element begin */
h5tools_str_reset(buffer);
@@ -749,7 +749,7 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, FILE *strea
h5tools_render_element(stream, info, ctx, buffer, curr_pos, ncols, region_elmt_counter, elmt_counter);
/* Render the region datatype info and indices element end */
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
if ((dtype = H5Dget_type(region_id)) < 0)
H5TOOLS_GOTO_ERROR(dimension_break, "H5Dget_type failed");
@@ -762,22 +762,22 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, FILE *strea
h5tools_dump_header_format->datatypeblockbegin);
ctx->indent_level++;
- h5tools_print_datatype(stream, buffer, info, ctx, dtype, TRUE);
+ h5tools_print_datatype(stream, buffer, info, ctx, dtype, true);
ctx->indent_level--;
- if (HDstrlen(h5tools_dump_header_format->datatypeblockend)) {
+ if (strlen(h5tools_dump_header_format->datatypeblockend)) {
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->datatypeblockend);
- if (HDstrlen(h5tools_dump_header_format->datatypeend))
+ if (strlen(h5tools_dump_header_format->datatypeend))
h5tools_str_append(buffer, " ");
}
- if (HDstrlen(h5tools_dump_header_format->datatypeend))
+ if (strlen(h5tools_dump_header_format->datatypeend))
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->datatypeend);
dimension_break =
h5tools_render_element(stream, info, ctx, buffer, curr_pos, ncols, region_elmt_counter, elmt_counter);
/* Render the datatype element end */
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
/* Render the dataspace element begin */
h5tools_str_reset(buffer);
@@ -785,12 +785,12 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, FILE *strea
h5tools_print_dataspace(buffer, region_space);
- if (HDstrlen(h5tools_dump_header_format->dataspaceblockend)) {
+ if (strlen(h5tools_dump_header_format->dataspaceblockend)) {
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->dataspaceblockend);
- if (HDstrlen(h5tools_dump_header_format->dataspaceend))
+ if (strlen(h5tools_dump_header_format->dataspaceend))
h5tools_str_append(buffer, " ");
}
- if (HDstrlen(h5tools_dump_header_format->dataspaceend))
+ if (strlen(h5tools_dump_header_format->dataspaceend))
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->dataspaceblockend);
dimension_break =
@@ -798,7 +798,7 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, FILE *strea
/* Render the dataspace element end */
if (region_output) {
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
/* Render the databegin element begin */
h5tools_str_reset(buffer);
@@ -808,7 +808,7 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, FILE *strea
region_elmt_counter, elmt_counter);
/* Render the databegin element end */
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_print_region_data_blocks(region_id, rawdatastream, info, ctx, buffer, ncols, ndims, type_id,
nblocks, ptdata);
@@ -824,17 +824,17 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, FILE *strea
H5TOOLS_ERROR(dimension_break, "H5Tclose failed");
if (region_output) {
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
/* Render the dataend element begin */
h5tools_str_reset(buffer);
- if (HDstrlen(h5tools_dump_header_format->datablockend)) {
+ if (strlen(h5tools_dump_header_format->datablockend)) {
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->datablockend);
- if (HDstrlen(h5tools_dump_header_format->dataend))
+ if (strlen(h5tools_dump_header_format->dataend))
h5tools_str_append(buffer, " ");
}
- if (HDstrlen(h5tools_dump_header_format->dataend))
+ if (strlen(h5tools_dump_header_format->dataend))
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->dataend);
dimension_break = h5tools_render_element(stream, &outputformat, ctx, buffer, curr_pos, ncols,
region_elmt_counter, elmt_counter);
@@ -842,7 +842,7 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, FILE *strea
}
ctx->indent_level--;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
/* Render the region } element begin */
h5tools_str_reset(buffer);
@@ -884,7 +884,7 @@ h5tools_print_region_data_points(hid_t region_space, hid_t region_id, FILE *stre
h5tools_str_t *buffer, size_t ncols, unsigned ndims, hid_t type_id,
hsize_t npoints, hsize_t *ptdata)
{
- hbool_t dimension_break = TRUE;
+ bool dimension_break = true;
hsize_t *dims1 = NULL;
hsize_t elmtno; /* element index */
hsize_t curr_pos = 0;
@@ -896,7 +896,7 @@ h5tools_print_region_data_points(hid_t region_space, hid_t region_id, FILE *stre
hid_t mem_space = H5I_INVALID_HID;
void *region_buf = NULL;
h5tools_context_t ctx;
- hbool_t past_catch = FALSE;
+ bool past_catch = false;
int ret_value = 0;
assert(info);
@@ -936,7 +936,7 @@ h5tools_print_region_data_points(hid_t region_space, hid_t region_id, FILE *stre
H5TOOLS_DEBUG("data render start:%ld", npoints);
elmtno = 0;
for (jndx = 0; jndx < npoints; jndx++, elmtno++) {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
ctx.cur_elmt = 0; /* points are always 0 */
ctx.indent_level++;
@@ -974,7 +974,7 @@ h5tools_print_region_data_points(hid_t region_space, hid_t region_id, FILE *stre
dimension_break = h5tools_render_region_element(stream, info, &ctx, buffer, &curr_pos, ncols,
ptdata, (hsize_t)0, elmtno);
/* Render the point element end */
- if (FALSE == dimension_break)
+ if (false == dimension_break)
elmtno = 0;
}
else {
@@ -1019,13 +1019,13 @@ h5tools_print_region_data_points(hid_t region_space, hid_t region_id, FILE *stre
* hsize_t elmt_count is the data element loop counter
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, FILE *stream,
const h5tool_format_t *info, h5tools_context_t *ctx, h5tools_str_t *buffer,
hsize_t *curr_pos, size_t ncols, hsize_t region_elmt_counter,
hsize_t elmt_counter)
{
- hbool_t dimension_break = TRUE;
+ bool dimension_break = true;
hssize_t snpoints;
hsize_t npoints;
hsize_t alloc_size;
@@ -1036,8 +1036,8 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, FILE *strea
hid_t dtype = H5I_INVALID_HID;
hid_t type_id = H5I_INVALID_HID;
h5tool_format_t outputformat; /* Use to disable prefix for DATA attribute display */
- hbool_t past_catch = FALSE;
- hbool_t ret_value = TRUE;
+ bool past_catch = false;
+ bool ret_value = true;
assert(info);
assert(ctx);
@@ -1070,7 +1070,7 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, FILE *strea
/* Render the region { element end */
ctx->indent_level++;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
/* Render the region datatype info and indices element begin */
h5tools_str_reset(buffer);
@@ -1103,7 +1103,7 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, FILE *strea
h5tools_render_element(stream, info, ctx, buffer, curr_pos, ncols, region_elmt_counter, elmt_counter);
/* Render the region datatype info and indices element end */
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
if ((dtype = H5Dget_type(region_id)) < 0)
H5TOOLS_GOTO_ERROR(dimension_break, "H5Dget_type failed");
@@ -1116,22 +1116,22 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, FILE *strea
h5tools_dump_header_format->datatypeblockbegin);
ctx->indent_level++;
- h5tools_print_datatype(stream, buffer, info, ctx, dtype, TRUE);
+ h5tools_print_datatype(stream, buffer, info, ctx, dtype, true);
ctx->indent_level--;
- if (HDstrlen(h5tools_dump_header_format->datatypeblockend)) {
+ if (strlen(h5tools_dump_header_format->datatypeblockend)) {
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->datatypeblockend);
- if (HDstrlen(h5tools_dump_header_format->datatypeend))
+ if (strlen(h5tools_dump_header_format->datatypeend))
h5tools_str_append(buffer, " ");
}
- if (HDstrlen(h5tools_dump_header_format->datatypeend))
+ if (strlen(h5tools_dump_header_format->datatypeend))
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->datatypeend);
dimension_break =
h5tools_render_element(stream, info, ctx, buffer, curr_pos, ncols, region_elmt_counter, elmt_counter);
/* Render the datatype element end */
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
/* Render the dataspace element begin */
h5tools_str_reset(buffer);
@@ -1139,12 +1139,12 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, FILE *strea
h5tools_print_dataspace(buffer, region_space);
- if (HDstrlen(h5tools_dump_header_format->dataspaceblockend)) {
+ if (strlen(h5tools_dump_header_format->dataspaceblockend)) {
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->dataspaceblockend);
- if (HDstrlen(h5tools_dump_header_format->dataspaceend))
+ if (strlen(h5tools_dump_header_format->dataspaceend))
h5tools_str_append(buffer, " ");
}
- if (HDstrlen(h5tools_dump_header_format->dataspaceend))
+ if (strlen(h5tools_dump_header_format->dataspaceend))
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->dataspaceblockend);
dimension_break =
@@ -1152,7 +1152,7 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, FILE *strea
/* Render the dataspace element end */
if (region_output) {
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
/* Render the databegin element begin */
h5tools_str_reset(buffer);
@@ -1163,7 +1163,7 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, FILE *strea
dimension_break = h5tools_render_element(stream, info, ctx, buffer, curr_pos, ncols,
region_elmt_counter, elmt_counter);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_print_region_data_points(region_space, region_id, rawdatastream, info, ctx, buffer, ncols,
ndims, type_id, npoints, ptdata);
@@ -1179,17 +1179,17 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, FILE *strea
H5TOOLS_ERROR(dimension_break, "H5Tclose failed");
if (region_output) {
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
/* Render the dataend element begin */
h5tools_str_reset(buffer);
- if (HDstrlen(h5tools_dump_header_format->datablockend)) {
+ if (strlen(h5tools_dump_header_format->datablockend)) {
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->datablockend);
- if (HDstrlen(h5tools_dump_header_format->dataend))
+ if (strlen(h5tools_dump_header_format->dataend))
h5tools_str_append(buffer, " ");
}
- if (HDstrlen(h5tools_dump_header_format->dataend))
+ if (strlen(h5tools_dump_header_format->dataend))
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->dataend);
dimension_break = h5tools_render_element(stream, &outputformat, ctx, buffer, curr_pos, ncols,
region_elmt_counter, elmt_counter);
@@ -1197,7 +1197,7 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, FILE *strea
}
ctx->indent_level--;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
/* Render the region } element begin */
h5tools_str_reset(buffer);
@@ -1271,7 +1271,7 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c
hid_t sm_space = H5I_INVALID_HID; /* stripmine data space */
hsize_t size_row_block; /* size for blocks along rows */
hsize_t row_counter = 0;
- hbool_t past_catch = FALSE;
+ bool past_catch = false;
/* VL data special information */
unsigned int vl_data = 0; /* contains VL datatypes */
herr_t ret_value = SUCCEED;
@@ -1283,8 +1283,8 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c
size_row_block = ctx->sset->block.data[row_dim];
/* Check if we have VL data in the dataset's datatype */
- if (h5tools_detect_vlen(p_type) == TRUE)
- vl_data = TRUE;
+ if (h5tools_detect_vlen(p_type) == true)
+ vl_data = true;
/* display loop */
for (; hyperslab_count > 0; temp_start[row_dim] += temp_stride[row_dim], hyperslab_count--) {
@@ -1364,7 +1364,7 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c
}
ctx->sm_pos += low[ctx->ndims - 1];
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
if (h5tools_dump_simple_data(stream, info, ctx, dset, flags, sm_nelmts, p_type, sm_buf) < 0)
H5TOOLS_THROW(FAIL, "h5tools_dump_simple_data failed");
@@ -1566,7 +1566,7 @@ h5tools_dump_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_co
int sndims;
hid_t f_space = H5I_INVALID_HID; /* file data space */
hsize_t total_size[H5S_MAX_RANK]; /* total size of dataset*/
- hbool_t past_catch = FALSE;
+ bool past_catch = false;
herr_t ret_value = SUCCEED;
H5TOOLS_START_DEBUG(" ");
@@ -1624,7 +1624,7 @@ h5tools_dump_simple_dset(FILE *stream, const h5tool_format_t *info, h5tools_cont
hsize_t zero[8]; /* vector of zeros */
unsigned int flags; /* buffer extent flags */
hsize_t total_size[H5S_MAX_RANK]; /* total size of dataset*/
- hbool_t past_catch = FALSE;
+ bool past_catch = false;
/* Print info */
size_t p_type_nbytes; /* size of memory type */
@@ -1679,8 +1679,8 @@ h5tools_dump_simple_dset(FILE *stream, const h5tool_format_t *info, h5tools_cont
}
/* Check if we have VL data in the dataset's datatype */
- if (h5tools_detect_vlen(p_type) == TRUE)
- vl_data = TRUE;
+ if (h5tools_detect_vlen(p_type) == true)
+ vl_data = true;
/*
* Determine the strip mine size and allocate a buffer. The strip mine is
@@ -1805,7 +1805,7 @@ h5tools_dump_simple_mem(FILE *stream, const h5tool_format_t *info, h5tools_conte
unsigned i; /* counters */
hsize_t total_size[H5S_MAX_RANK]; /* total size of dataset*/
hsize_t p_nelmts; /* total selected elmts */
- hbool_t past_catch = FALSE;
+ bool past_catch = false;
unsigned char *buf = NULL; /* buffer for raw data */
int ret_value = 0;
@@ -1844,8 +1844,8 @@ h5tools_dump_simple_mem(FILE *stream, const h5tool_format_t *info, h5tools_conte
H5_LEAVE(SUCCEED); /* nothing to print */
/* Check if we have VL data in the dataset's datatype */
- if (h5tools_detect_vlen(p_type) == TRUE)
- vl_data = TRUE;
+ if (h5tools_detect_vlen(p_type) == true)
+ vl_data = true;
alloc_size = p_nelmts * H5Tget_size(p_type);
assert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/
@@ -2062,8 +2062,8 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
H5T_order_t order;
H5T_class_t type_class;
H5T_sign_t sign; /* sign scheme value */
- htri_t is_vlstr = FALSE;
- hbool_t past_catch = FALSE;
+ htri_t is_vlstr = false;
+ bool past_catch = false;
const char *sign_s = NULL; /* sign scheme string */
const char *order_s = NULL; /* byte order string */
int ret_value = 0;
@@ -2102,57 +2102,57 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
switch (type_class) {
case H5T_INTEGER:
- if (H5Tequal(type, H5T_STD_I8BE) == TRUE)
+ if (H5Tequal(type, H5T_STD_I8BE) == true)
h5tools_str_append(buffer, "H5T_STD_I8BE");
- else if (H5Tequal(type, H5T_STD_I8LE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_I8LE) == true)
h5tools_str_append(buffer, "H5T_STD_I8LE");
- else if (H5Tequal(type, H5T_STD_I16BE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_I16BE) == true)
h5tools_str_append(buffer, "H5T_STD_I16BE");
- else if (H5Tequal(type, H5T_STD_I16LE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_I16LE) == true)
h5tools_str_append(buffer, "H5T_STD_I16LE");
- else if (H5Tequal(type, H5T_STD_I32BE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_I32BE) == true)
h5tools_str_append(buffer, "H5T_STD_I32BE");
- else if (H5Tequal(type, H5T_STD_I32LE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_I32LE) == true)
h5tools_str_append(buffer, "H5T_STD_I32LE");
- else if (H5Tequal(type, H5T_STD_I64BE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_I64BE) == true)
h5tools_str_append(buffer, "H5T_STD_I64BE");
- else if (H5Tequal(type, H5T_STD_I64LE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_I64LE) == true)
h5tools_str_append(buffer, "H5T_STD_I64LE");
- else if (H5Tequal(type, H5T_STD_U8BE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_U8BE) == true)
h5tools_str_append(buffer, "H5T_STD_U8BE");
- else if (H5Tequal(type, H5T_STD_U8LE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_U8LE) == true)
h5tools_str_append(buffer, "H5T_STD_U8LE");
- else if (H5Tequal(type, H5T_STD_U16BE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_U16BE) == true)
h5tools_str_append(buffer, "H5T_STD_U16BE");
- else if (H5Tequal(type, H5T_STD_U16LE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_U16LE) == true)
h5tools_str_append(buffer, "H5T_STD_U16LE");
- else if (H5Tequal(type, H5T_STD_U32BE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_U32BE) == true)
h5tools_str_append(buffer, "H5T_STD_U32BE");
- else if (H5Tequal(type, H5T_STD_U32LE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_U32LE) == true)
h5tools_str_append(buffer, "H5T_STD_U32LE");
- else if (H5Tequal(type, H5T_STD_U64BE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_U64BE) == true)
h5tools_str_append(buffer, "H5T_STD_U64BE");
- else if (H5Tequal(type, H5T_STD_U64LE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_U64LE) == true)
h5tools_str_append(buffer, "H5T_STD_U64LE");
- else if (H5Tequal(type, H5T_NATIVE_SCHAR) == TRUE)
+ else if (H5Tequal(type, H5T_NATIVE_SCHAR) == true)
h5tools_str_append(buffer, "H5T_NATIVE_SCHAR");
- else if (H5Tequal(type, H5T_NATIVE_UCHAR) == TRUE)
+ else if (H5Tequal(type, H5T_NATIVE_UCHAR) == true)
h5tools_str_append(buffer, "H5T_NATIVE_UCHAR");
- else if (H5Tequal(type, H5T_NATIVE_SHORT) == TRUE)
+ else if (H5Tequal(type, H5T_NATIVE_SHORT) == true)
h5tools_str_append(buffer, "H5T_NATIVE_SHORT");
- else if (H5Tequal(type, H5T_NATIVE_USHORT) == TRUE)
+ else if (H5Tequal(type, H5T_NATIVE_USHORT) == true)
h5tools_str_append(buffer, "H5T_NATIVE_USHORT");
- else if (H5Tequal(type, H5T_NATIVE_INT) == TRUE)
+ else if (H5Tequal(type, H5T_NATIVE_INT) == true)
h5tools_str_append(buffer, "H5T_NATIVE_INT");
- else if (H5Tequal(type, H5T_NATIVE_UINT) == TRUE)
+ else if (H5Tequal(type, H5T_NATIVE_UINT) == true)
h5tools_str_append(buffer, "H5T_NATIVE_UINT");
- else if (H5Tequal(type, H5T_NATIVE_LONG) == TRUE)
+ else if (H5Tequal(type, H5T_NATIVE_LONG) == true)
h5tools_str_append(buffer, "H5T_NATIVE_LONG");
- else if (H5Tequal(type, H5T_NATIVE_ULONG) == TRUE)
+ else if (H5Tequal(type, H5T_NATIVE_ULONG) == true)
h5tools_str_append(buffer, "H5T_NATIVE_ULONG");
- else if (H5Tequal(type, H5T_NATIVE_LLONG) == TRUE)
+ else if (H5Tequal(type, H5T_NATIVE_LLONG) == true)
h5tools_str_append(buffer, "H5T_NATIVE_LLONG");
- else if (H5Tequal(type, H5T_NATIVE_ULLONG) == TRUE)
+ else if (H5Tequal(type, H5T_NATIVE_ULLONG) == true)
h5tools_str_append(buffer, "H5T_NATIVE_ULLONG");
else {
@@ -2190,21 +2190,21 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
break;
case H5T_FLOAT:
- if (H5Tequal(type, H5T_IEEE_F32BE) == TRUE)
+ if (H5Tequal(type, H5T_IEEE_F32BE) == true)
h5tools_str_append(buffer, "H5T_IEEE_F32BE");
- else if (H5Tequal(type, H5T_IEEE_F32LE) == TRUE)
+ else if (H5Tequal(type, H5T_IEEE_F32LE) == true)
h5tools_str_append(buffer, "H5T_IEEE_F32LE");
- else if (H5Tequal(type, H5T_IEEE_F64BE) == TRUE)
+ else if (H5Tequal(type, H5T_IEEE_F64BE) == true)
h5tools_str_append(buffer, "H5T_IEEE_F64BE");
- else if (H5Tequal(type, H5T_IEEE_F64LE) == TRUE)
+ else if (H5Tequal(type, H5T_IEEE_F64LE) == true)
h5tools_str_append(buffer, "H5T_IEEE_F64LE");
- else if (H5Tequal(type, H5T_VAX_F32) == TRUE)
+ else if (H5Tequal(type, H5T_VAX_F32) == true)
h5tools_str_append(buffer, "H5T_VAX_F32");
- else if (H5Tequal(type, H5T_VAX_F64) == TRUE)
+ else if (H5Tequal(type, H5T_VAX_F64) == true)
h5tools_str_append(buffer, "H5T_VAX_F64");
- else if (H5Tequal(type, H5T_NATIVE_FLOAT) == TRUE)
+ else if (H5Tequal(type, H5T_NATIVE_FLOAT) == true)
h5tools_str_append(buffer, "H5T_NATIVE_FLOAT");
- else if (H5Tequal(type, H5T_NATIVE_DOUBLE) == TRUE)
+ else if (H5Tequal(type, H5T_NATIVE_DOUBLE) == true)
h5tools_str_append(buffer, "H5T_NATIVE_DOUBLE");
else {
/* print what the library knows */
@@ -2250,7 +2250,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
ctx->indent_level++;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(buffer);
@@ -2261,7 +2261,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
h5tools_render_element(stream, info, ctx, buffer, &curr_pos, (size_t)ncols, (hsize_t)0,
(hsize_t)0);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(buffer);
@@ -2301,7 +2301,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
h5tools_render_element(stream, info, ctx, buffer, &curr_pos, (size_t)ncols, (hsize_t)0,
(hsize_t)0);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(buffer);
@@ -2340,7 +2340,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
h5tools_render_element(stream, info, ctx, buffer, &curr_pos, (size_t)ncols, (hsize_t)0,
(hsize_t)0);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(buffer);
@@ -2415,7 +2415,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
(hsize_t)0);
ctx->indent_level--;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(buffer);
if (H5Tclose(str_type) < 0)
@@ -2427,21 +2427,21 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
break;
case H5T_BITFIELD:
- if (H5Tequal(type, H5T_STD_B8BE) == TRUE)
+ if (H5Tequal(type, H5T_STD_B8BE) == true)
h5tools_str_append(buffer, "H5T_STD_B8BE");
- else if (H5Tequal(type, H5T_STD_B8LE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_B8LE) == true)
h5tools_str_append(buffer, "H5T_STD_B8LE");
- else if (H5Tequal(type, H5T_STD_B16BE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_B16BE) == true)
h5tools_str_append(buffer, "H5T_STD_B16BE");
- else if (H5Tequal(type, H5T_STD_B16LE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_B16LE) == true)
h5tools_str_append(buffer, "H5T_STD_B16LE");
- else if (H5Tequal(type, H5T_STD_B32BE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_B32BE) == true)
h5tools_str_append(buffer, "H5T_STD_B32BE");
- else if (H5Tequal(type, H5T_STD_B32LE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_B32LE) == true)
h5tools_str_append(buffer, "H5T_STD_B32LE");
- else if (H5Tequal(type, H5T_STD_B64BE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_B64BE) == true)
h5tools_str_append(buffer, "H5T_STD_B64BE");
- else if (H5Tequal(type, H5T_STD_B64LE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_B64LE) == true)
h5tools_str_append(buffer, "H5T_STD_B64LE");
else
h5tools_str_append(buffer, "undefined bitfield");
@@ -2458,7 +2458,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
if (NULL == (ttag = H5Tget_tag(type)))
H5TOOLS_THROW((-1), "H5Tget_tag failed");
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(buffer);
h5tools_str_append(buffer, "OPAQUE_TAG \"%s\";", ttag);
@@ -2468,7 +2468,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
H5free_memory(ttag);
if ((size = H5Tget_size(type)) <= 0) {
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(buffer);
h5tools_str_append(buffer, "OPAQUE_SIZE \"%zu\";", size);
@@ -2478,7 +2478,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
}
ctx->indent_level--;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(buffer);
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->opaqblockend);
@@ -2497,10 +2497,10 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
for (i = 0; i < nmembers; i++) {
mname = H5Tget_member_name(type, i);
if ((mtype = H5Tget_member_type(type, i)) >= 0) {
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(buffer);
- h5tools_print_datatype(stream, buffer, info, ctx, mtype, TRUE);
+ h5tools_print_datatype(stream, buffer, info, ctx, mtype, true);
h5tools_str_append(buffer, " \"%s\";", mname);
h5tools_render_element(stream, info, ctx, buffer, &curr_pos, (size_t)ncols, (hsize_t)0,
@@ -2514,7 +2514,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
}
ctx->indent_level--;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(buffer);
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->cmpdblockend);
@@ -2522,13 +2522,13 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
case H5T_REFERENCE:
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->refblockbegin);
- if (H5Tequal(type, H5T_STD_REF_DSETREG) == TRUE) {
+ if (H5Tequal(type, H5T_STD_REF_DSETREG) == true) {
h5tools_str_append(buffer, "H5T_STD_REF_DSETREG");
}
- else if (H5Tequal(type, H5T_STD_REF_OBJ) == TRUE) {
+ else if (H5Tequal(type, H5T_STD_REF_OBJ) == true) {
h5tools_str_append(buffer, "H5T_STD_REF_OBJECT");
}
- else if (H5Tequal(type, H5T_STD_REF) == TRUE) {
+ else if (H5Tequal(type, H5T_STD_REF) == true) {
h5tools_str_append(buffer, "H5T_STD_REF");
}
else {
@@ -2546,10 +2546,10 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
(hsize_t)0);
ctx->indent_level++;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(buffer);
- h5tools_print_datatype(stream, buffer, info, ctx, super, TRUE);
+ h5tools_print_datatype(stream, buffer, info, ctx, super, true);
if (H5Tclose(super) < 0)
H5TOOLS_ERROR((-1), "H5Tclose failed");
@@ -2562,7 +2562,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
ctx->indent_level--;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(buffer);
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->enumblockend);
@@ -2575,7 +2575,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->vlenblockbegin);
- h5tools_print_datatype(stream, buffer, info, ctx, super, TRUE);
+ h5tools_print_datatype(stream, buffer, info, ctx, super, true);
if (H5Tclose(super) < 0)
H5TOOLS_ERROR((-1), "H5Tclose failed");
@@ -2607,7 +2607,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
/* Get array base type */
if ((super = H5Tget_super(type)) >= 0) {
/* Print base type */
- h5tools_print_datatype(stream, buffer, info, ctx, super, TRUE);
+ h5tools_print_datatype(stream, buffer, info, ctx, super, true);
/* Close array base type */
if (H5Tclose(super) < 0)
H5TOOLS_ERROR((-1), "H5Tclose failed");
@@ -2649,7 +2649,7 @@ h5tools_print_dataspace(h5tools_str_t *buffer, hid_t space)
hsize_t maxsize[H5TOOLS_DUMP_MAX_RANK];
int ndims = -1;
H5S_class_t space_type = -1;
- hbool_t past_catch = FALSE;
+ bool past_catch = false;
int i;
int ret_value = 0;
@@ -2738,7 +2738,7 @@ h5tools_print_enum(FILE *stream, h5tools_str_t *buffer, const h5tool_format_t *i
size_t dst_size; /*destination value type size */
size_t ncols = 80; /*available output width */
hsize_t curr_pos = 0; /* total data element position */
- hbool_t past_catch = FALSE;
+ bool past_catch = false;
int ret_value = 0;
H5TOOLS_START_DEBUG(" ");
@@ -2802,12 +2802,12 @@ h5tools_print_enum(FILE *stream, h5tools_str_t *buffer, const h5tool_format_t *i
for (i = 0; i < nmembs; i++) {
int nchars; /*number of output characters */
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_simple_prefix(stream, info, ctx, (hsize_t)0, 0);
h5tools_str_reset(buffer);
h5tools_str_append(buffer, "\"%s\"", name[i]);
- nchars = (int)HDstrlen(name[i]);
+ nchars = (int)strlen(name[i]);
h5tools_str_append(buffer, "%*s ", MAX(0, 16 - nchars), "");
if (native < 0) {
@@ -2885,18 +2885,18 @@ h5tools_dump_datatype(FILE *stream, const h5tool_format_t *info, h5tools_context
if (info->line_ncols > 0)
ncols = info->line_ncols;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %s ", h5tools_dump_header_format->datatypebegin,
h5tools_dump_header_format->datatypeblockbegin);
- h5tools_print_datatype(stream, &buffer, info, ctx, type, TRUE);
- if (HDstrlen(h5tools_dump_header_format->datatypeblockend)) {
+ h5tools_print_datatype(stream, &buffer, info, ctx, type, true);
+ if (strlen(h5tools_dump_header_format->datatypeblockend)) {
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->datatypeblockend);
- if (HDstrlen(h5tools_dump_header_format->datatypeend))
+ if (strlen(h5tools_dump_header_format->datatypeend))
h5tools_str_append(&buffer, " ");
}
- if (HDstrlen(h5tools_dump_header_format->datatypeend))
+ if (strlen(h5tools_dump_header_format->datatypeend))
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->datatypeend);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
@@ -2931,19 +2931,19 @@ h5tools_dump_dataspace(FILE *stream, const h5tool_format_t *info, h5tools_contex
if (info->line_ncols > 0)
ncols = info->line_ncols;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s ", h5tools_dump_header_format->dataspacebegin);
h5tools_print_dataspace(&buffer, type);
- if (HDstrlen(h5tools_dump_header_format->dataspaceblockend)) {
+ if (strlen(h5tools_dump_header_format->dataspaceblockend)) {
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->dataspaceblockend);
- if (HDstrlen(h5tools_dump_header_format->dataspaceend))
+ if (strlen(h5tools_dump_header_format->dataspaceend))
h5tools_str_append(&buffer, " ");
}
- if (HDstrlen(h5tools_dump_header_format->dataspaceend))
+ if (strlen(h5tools_dump_header_format->dataspaceend))
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->dataspaceend);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
@@ -2978,7 +2978,7 @@ h5tools_dump_oid(FILE *stream, const h5tool_format_t *info, h5tools_context_t *c
if (info->line_ncols > 0)
ncols = info->line_ncols;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %s %" PRId64 " %s", OBJID, BEGIN, oid, END);
@@ -3004,7 +3004,7 @@ h5tools_print_virtual_selection(hid_t vspace, FILE *stream, const h5tool_format_
{
switch (H5Sget_select_type(vspace)) {
case H5S_SEL_NONE: /* Nothing selected */
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(buffer);
h5tools_str_append(buffer, "%s", VDS_NONE);
@@ -3017,7 +3017,7 @@ h5tools_print_virtual_selection(hid_t vspace, FILE *stream, const h5tool_format_
h5tools_str_append(buffer, " %s", h5tools_dump_header_format->virtualselectionblockend);
break;
case H5S_SEL_HYPERSLABS: /* "New-style" hyperslab selection defined */
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(buffer);
if (H5Sis_regular_hyperslab(vspace)) {
@@ -3035,7 +3035,7 @@ h5tools_print_virtual_selection(hid_t vspace, FILE *stream, const h5tool_format_
h5tools_render_element(stream, info, ctx, buffer, curr_pos, (size_t)ncols, (hsize_t)0,
(hsize_t)0);
ctx->indent_level++;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_simple_prefix(stream, info, ctx, *curr_pos, 0);
h5tools_str_reset(buffer);
@@ -3044,13 +3044,13 @@ h5tools_print_virtual_selection(hid_t vspace, FILE *stream, const h5tool_format_
}
h5tools_render_element(stream, info, ctx, buffer, curr_pos, (size_t)ncols, (hsize_t)0,
(hsize_t)0);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(buffer);
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->virtualselectionblockend);
break;
case H5S_SEL_ALL: /* Entire extent selected */
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(buffer);
h5tools_str_append(buffer, "%s", VDS_ALL);
@@ -3082,7 +3082,7 @@ h5tools_print_fill_value(h5tools_str_t *buffer /*in,out*/, const h5tool_format_t
n_type = H5Tget_native_type(type_id, H5T_DIR_DEFAULT);
- if (h5tools_detect_vlen(type_id) == TRUE)
+ if (h5tools_detect_vlen(type_id) == true)
vl_data = true;
size = H5Tget_size(n_type);
@@ -3154,13 +3154,13 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
if (dcpl_id >= 0)
nfilters = H5Pget_nfilters(dcpl_id);
- HDstrcpy(f_name, "\0");
+ strcpy(f_name, "\0");
/*-------------------------------------------------------------------------
* STORAGE_LAYOUT
*-------------------------------------------------------------------------
*/
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %s", STORAGE_LAYOUT, BEGIN);
@@ -3172,7 +3172,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
switch (stl) {
case H5D_CHUNKED:
ctx->indent_level++;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s ", CHUNKED);
@@ -3186,7 +3186,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0,
(hsize_t)0);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
@@ -3241,14 +3241,14 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
break;
case H5D_COMPACT:
ctx->indent_level++;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s", COMPACT);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0,
(hsize_t)0);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "SIZE %" PRIuHSIZE, storage_size);
@@ -3266,14 +3266,14 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
/* EXTERNAL FILE */
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s", CONTIGUOUS);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0,
(hsize_t)0);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %s", EXTERNAL, BEGIN);
@@ -3284,7 +3284,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
for (j = 0; j < (unsigned)n_external; j++) {
H5Pget_external(dcpl_id, j, sizeof(name), name, &offset, &size);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "FILENAME %s SIZE %" PRIuHSIZE, name, size);
@@ -3298,7 +3298,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
}
ctx->indent_level--;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s", END);
@@ -3311,14 +3311,14 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
/* NORMAL FILE */
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s", CONTIGUOUS);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0,
(hsize_t)0);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "SIZE %" PRIuHSIZE, storage_size);
@@ -3332,7 +3332,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
if (supported & H5VL_OPT_QUERY_SUPPORTED) {
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
ioffset = H5Dget_offset(dset_id);
@@ -3362,7 +3362,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
hid_t virtual_vspace = H5Pget_virtual_vspace(dcpl_id, curr_vmap);
hid_t virtual_srcspace = H5Pget_virtual_srcspace(dcpl_id, curr_vmap);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %zu %s ", VDS_MAPPING, curr_vmap, BEGIN);
@@ -3371,7 +3371,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
ctx->indent_level++;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %s", VDS_VIRTUAL, BEGIN);
@@ -3385,14 +3385,14 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
ctx->indent_level--;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s", END);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0,
(hsize_t)0);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %s", VDS_SOURCE, BEGIN);
@@ -3410,7 +3410,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
assert((size_t)ssize_out < sizeof(name));
H5Pget_virtual_dsetname(dcpl_id, curr_vmap, dsetname, sizeof(dsetname));
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %s", VDS_SRC_FILE,
@@ -3420,7 +3420,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0,
(hsize_t)0);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %s", VDS_SRC_DATASET,
@@ -3435,7 +3435,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
ctx->indent_level--;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s", END);
@@ -3444,7 +3444,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
ctx->indent_level--;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s", END);
@@ -3464,7 +3464,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
(hsize_t)0);
} /*switch*/
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s", END);
@@ -3475,7 +3475,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
*-------------------------------------------------------------------------
*/
if (H5D_VIRTUAL != stl) {
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %s", FILTERS, BEGIN);
@@ -3492,7 +3492,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
if (filtn < 0)
continue; /* nothing to print for invalid filter */
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
switch (filtn) {
@@ -3522,14 +3522,14 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
ctx->indent_level++;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "PIXELS_PER_BLOCK %d", szip_pixels_per_block);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols,
(hsize_t)0, (hsize_t)0);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
if (szip_options_mask & H5_SZIP_CHIP_OPTION_MASK)
@@ -3539,7 +3539,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols,
(hsize_t)0, (hsize_t)0);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
if (szip_options_mask & H5_SZIP_EC_OPTION_MASK)
@@ -3549,7 +3549,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols,
(hsize_t)0, (hsize_t)0);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
if (szip_options_mask & H5_SZIP_LSB_OPTION_MASK)
@@ -3560,7 +3560,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
(hsize_t)0, (hsize_t)0);
if (szip_options_mask & H5_SZIP_RAW_OPTION_MASK) {
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "HEADER %s", "RAW");
@@ -3570,7 +3570,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
ctx->indent_level--;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s", END);
@@ -3595,7 +3595,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
ctx->indent_level++;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "FILTER_ID %d", filtn);
@@ -3603,7 +3603,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
(hsize_t)0, (hsize_t)0);
if (f_name[0] != '\0') {
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "COMMENT %s", f_name);
@@ -3611,7 +3611,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
(hsize_t)0, (hsize_t)0);
}
if (cd_nelmts) {
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %s ", "PARAMS", BEGIN);
@@ -3623,7 +3623,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
}
ctx->indent_level--;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s", END);
@@ -3634,7 +3634,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
} /*i*/
} /*nfilters*/
else {
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "NONE");
@@ -3643,7 +3643,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
}
ctx->indent_level--;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s", END);
@@ -3654,7 +3654,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
* FILLVALUE
*-------------------------------------------------------------------------
*/
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %s", FILLVALUE, BEGIN);
@@ -3662,7 +3662,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
ctx->indent_level++;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "FILL_TIME ");
@@ -3687,7 +3687,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
}
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s ", "VALUE ");
@@ -3715,7 +3715,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
ctx->indent_level--;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s", END);
@@ -3726,7 +3726,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
*-------------------------------------------------------------------------
*/
if (H5D_VIRTUAL != stl) {
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "ALLOCATION_TIME %s", BEGIN);
@@ -3734,7 +3734,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
ctx->indent_level++;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
@@ -3761,7 +3761,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
ctx->indent_level--;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s", END);
@@ -3816,7 +3816,7 @@ h5tools_dump_comment(FILE *stream, const h5tool_format_t *info, h5tools_context_
if (cmt_bufsize > 0) {
comment[cmt_bufsize] = '\0'; /* necessary because null char is not returned */
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "COMMENT \"%s\"", comment);
@@ -3858,7 +3858,7 @@ h5tools_dump_attribute(FILE *stream, const h5tool_format_t *info, h5tools_contex
if (info->line_ncols > 0)
ncols = info->line_ncols;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s \"%s\" %s", h5tools_dump_header_format->attributebegin, attr_name,
@@ -3884,7 +3884,7 @@ h5tools_dump_attribute(FILE *stream, const h5tool_format_t *info, h5tools_contex
h5tools_dump_oid(stream, info, ctx, attr_id);
if (data_output || attr_data_output)
- h5tools_dump_data(stream, info, ctx, attr_id, FALSE);
+ h5tools_dump_data(stream, info, ctx, attr_id, false);
ctx->indent_level--;
@@ -3893,16 +3893,16 @@ h5tools_dump_attribute(FILE *stream, const h5tool_format_t *info, h5tools_contex
H5Aclose(attr_id);
}
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
- if (HDstrlen(h5tools_dump_header_format->attributeblockend)) {
+ if (strlen(h5tools_dump_header_format->attributeblockend)) {
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->attributeblockend);
- if (HDstrlen(h5tools_dump_header_format->attributeend))
+ if (strlen(h5tools_dump_header_format->attributeend))
h5tools_str_append(&buffer, " ");
}
- if (HDstrlen(h5tools_dump_header_format->attributeend))
+ if (strlen(h5tools_dump_header_format->attributeend))
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->attributeend);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
@@ -3946,25 +3946,25 @@ h5tools_print_packed_bits(h5tools_str_t *buffer, hid_t type)
hid_t n_type = H5Tget_native_type(type, H5T_DIR_DEFAULT);
if (H5Tget_class(n_type) == H5T_INTEGER) {
- if (H5Tequal(n_type, H5T_NATIVE_SCHAR) == TRUE)
+ if (H5Tequal(n_type, H5T_NATIVE_SCHAR) == true)
packed_bits_size = 8 * sizeof(char);
- else if (H5Tequal(n_type, H5T_NATIVE_UCHAR) == TRUE)
+ else if (H5Tequal(n_type, H5T_NATIVE_UCHAR) == true)
packed_bits_size = 8 * sizeof(unsigned char);
- else if (H5Tequal(n_type, H5T_NATIVE_SHORT) == TRUE)
+ else if (H5Tequal(n_type, H5T_NATIVE_SHORT) == true)
packed_bits_size = 8 * sizeof(short);
- else if (H5Tequal(n_type, H5T_NATIVE_USHORT) == TRUE)
+ else if (H5Tequal(n_type, H5T_NATIVE_USHORT) == true)
packed_bits_size = 8 * sizeof(unsigned short);
- else if (H5Tequal(n_type, H5T_NATIVE_INT) == TRUE)
+ else if (H5Tequal(n_type, H5T_NATIVE_INT) == true)
packed_bits_size = 8 * sizeof(int);
- else if (H5Tequal(n_type, H5T_NATIVE_UINT) == TRUE)
+ else if (H5Tequal(n_type, H5T_NATIVE_UINT) == true)
packed_bits_size = 8 * sizeof(unsigned int);
- else if (H5Tequal(n_type, H5T_NATIVE_LONG) == TRUE)
+ else if (H5Tequal(n_type, H5T_NATIVE_LONG) == true)
packed_bits_size = 8 * sizeof(long);
- else if (H5Tequal(n_type, H5T_NATIVE_ULONG) == TRUE)
+ else if (H5Tequal(n_type, H5T_NATIVE_ULONG) == true)
packed_bits_size = 8 * sizeof(unsigned long);
- else if (H5Tequal(n_type, H5T_NATIVE_LLONG) == TRUE)
+ else if (H5Tequal(n_type, H5T_NATIVE_LLONG) == true)
packed_bits_size = 8 * sizeof(long long);
- else if (H5Tequal(n_type, H5T_NATIVE_ULLONG) == TRUE)
+ else if (H5Tequal(n_type, H5T_NATIVE_ULLONG) == true)
packed_bits_size = 8 * sizeof(unsigned long long);
else
error_msg("Packed Bit not valid for this datatype");
@@ -3999,7 +3999,7 @@ h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info, h5tool
if (info->line_ncols > 0)
ncols = info->line_ncols;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %s", h5tools_dump_header_format->subsettingbegin,
@@ -4008,7 +4008,7 @@ h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info, h5tool
ctx->indent_level++;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %s ", h5tools_dump_header_format->startbegin,
@@ -4018,7 +4018,7 @@ h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info, h5tool
h5tools_dump_header_format->startblockend);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %s ", h5tools_dump_header_format->stridebegin,
@@ -4028,7 +4028,7 @@ h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info, h5tool
h5tools_dump_header_format->strideblockend);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %s ", h5tools_dump_header_format->countbegin,
@@ -4043,7 +4043,7 @@ h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info, h5tool
h5tools_dump_header_format->countblockend);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %s ", h5tools_dump_header_format->blockbegin,
@@ -4088,7 +4088,7 @@ h5tools_dump_reference(FILE *stream, const h5tool_format_t *info, h5tools_contex
datactx = *ctx; /* print context */
/* Assume entire data space to be printed */
- datactx.need_prefix = TRUE;
+ datactx.need_prefix = true;
memset(&buffer, 0, sizeof(h5tools_str_t));
for (i = 0; i < ndims; i++, datactx.cur_elmt++, elmt_counter++) {
@@ -4097,7 +4097,7 @@ h5tools_dump_reference(FILE *stream, const h5tool_format_t *info, h5tools_contex
H5TOOLS_DEBUG("reference loop:%d with curr_pos=%ld", i, curr_pos);
- datactx.need_prefix = TRUE;
+ datactx.need_prefix = true;
h5tools_str_reset(&buffer);
H5TOOLS_DEBUG("reference loop - h5tools_str_sprint with H5T_STD_REF:%d", i);
h5tools_str_sprint(&buffer, info, container, H5T_STD_REF, &ref_buf[i], &datactx);
@@ -4113,7 +4113,7 @@ h5tools_dump_reference(FILE *stream, const h5tool_format_t *info, h5tools_contex
case H5O_TYPE_DATASET:
if ((new_obj_id = H5Ropen_object(&ref_buf[i], H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
datactx.indent_level++;
- h5tools_dump_data(stream, info, &datactx, new_obj_id, TRUE);
+ h5tools_dump_data(stream, info, &datactx, new_obj_id, true);
// h5tools_dump_dset(stream, info, &datactx, new_obj_id);
datactx.indent_level--;
if (H5Dclose(new_obj_id) < 0)
@@ -4139,7 +4139,7 @@ h5tools_dump_reference(FILE *stream, const h5tool_format_t *info, h5tools_contex
H5TOOLS_DEBUG("ref_type is H5R_DATASET_REGION1");
if ((new_obj_id = H5Ropen_object(&ref_buf[i], H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
datactx.indent_level++;
- h5tools_dump_data(stream, info, &datactx, new_obj_id, TRUE);
+ h5tools_dump_data(stream, info, &datactx, new_obj_id, true);
// h5tools_dump_dset(stream, info, &datactx, new_obj_id);
datactx.indent_level--;
if (H5Dclose(new_obj_id) < 0)
@@ -4158,7 +4158,7 @@ h5tools_dump_reference(FILE *stream, const h5tool_format_t *info, h5tools_contex
case H5O_TYPE_DATASET:
if ((new_obj_id = H5Ropen_object(&ref_buf[i], H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
datactx.indent_level++;
- h5tools_dump_data(stream, info, &datactx, new_obj_id, TRUE);
+ h5tools_dump_data(stream, info, &datactx, new_obj_id, true);
// h5tools_dump_dset(stream, info, &datactx, new_obj_id);
datactx.indent_level--;
if (H5Oclose(new_obj_id) < 0)
@@ -4200,14 +4200,14 @@ h5tools_dump_reference(FILE *stream, const h5tool_format_t *info, h5tools_contex
h5tools_render_element(stream, info, &datactx, &buffer, &curr_pos, (size_t)ncols,
(hsize_t)0, (hsize_t)0);
- datactx.need_prefix = TRUE;
+ datactx.need_prefix = true;
datactx.indent_level++;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "NULL");
h5tools_render_element(stream, info, &datactx, &buffer, &curr_pos, (size_t)ncols,
(hsize_t)0, (hsize_t)0);
datactx.indent_level--;
- datactx.need_prefix = TRUE;
+ datactx.need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "}");
@@ -4260,14 +4260,14 @@ h5tools_dump_reference(FILE *stream, const h5tool_format_t *info, h5tools_contex
h5tools_render_element(stream, info, &datactx, &buffer, &curr_pos, (size_t)ncols,
(hsize_t)0, (hsize_t)0);
- datactx.need_prefix = TRUE;
+ datactx.need_prefix = true;
datactx.indent_level++;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "NULL");
h5tools_render_element(stream, info, &datactx, &buffer, &curr_pos, (size_t)ncols,
(hsize_t)0, (hsize_t)0);
datactx.indent_level--;
- datactx.need_prefix = TRUE;
+ datactx.need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "}");
@@ -4297,7 +4297,7 @@ h5tools_dump_reference(FILE *stream, const h5tool_format_t *info, h5tools_contex
/*-------------------------------------------------------------------------
* Function: dump_data
*
- * Purpose: Dump attribute, obj_data is FALSE, or dataset data, obj_data is TRUE
+ * Purpose: Dump attribute, obj_data is false, or dataset data, obj_data is true
*
* Return: void
*-------------------------------------------------------------------------
@@ -4358,7 +4358,7 @@ h5tools_dump_data(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
ctx->indent_level++;
}
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %s", h5tools_dump_header_format->databegin,
h5tools_dump_header_format->datablockbegin);
@@ -4381,7 +4381,7 @@ h5tools_dump_data(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
H5Sget_simple_extent_dims(space, total_size, NULL);
init_acc_pos(datactx.ndims, total_size, datactx.acc, datactx.pos, datactx.p_min_idx);
- datactx.need_prefix = TRUE;
+ datactx.need_prefix = true;
if (NULL !=
(ref_buf = (H5R_ref_t *)calloc(MAX(sizeof(unsigned), sizeof(H5R_ref_t)), (size_t)ndims))) {
@@ -4420,18 +4420,18 @@ h5tools_dump_data(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
*/
string_dataformat.idx_fmt = "\"";
datactx.indent_level++;
- datactx.need_prefix = TRUE;
+ datactx.need_prefix = true;
h5tools_simple_prefix(stream, &string_dataformat, &datactx, (hsize_t)0, 0);
string_dataformat.line_multi_new = 1;
string_dataformat.str_repeat = 8;
- string_dataformat.ascii = TRUE;
+ string_dataformat.ascii = true;
string_dataformat.elmt_suf1 = "";
string_dataformat.elmt_suf2 = "";
string_dataformat.line_suf = "\"";
}
else {
- datactx.need_prefix = TRUE;
+ datactx.need_prefix = true;
}
/* Print all the values. */
@@ -4453,7 +4453,7 @@ h5tools_dump_data(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
if (datactx.display_char && H5Tget_size(f_type) == 1 && H5Tget_class(f_type) == H5T_INTEGER) {
H5TOOLS_DEBUG("Print 1-byte integer data as an ASCII character string eol=%s",
string_dataformat.line_suf);
- datactx.need_prefix = FALSE;
+ datactx.need_prefix = false;
string_dataformat.arr_linebreak = 0;
string_dataformat.idx_fmt = "";
string_dataformat.line_multi_new = 0;
@@ -4474,17 +4474,17 @@ h5tools_dump_data(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
H5Sclose(space);
H5Tclose(f_type);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_simple_prefix(stream, &outputformat, ctx, (hsize_t)0, 0);
h5tools_str_reset(&buffer);
- if (HDstrlen(h5tools_dump_header_format->datablockend)) {
+ if (strlen(h5tools_dump_header_format->datablockend)) {
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->datablockend);
- if (HDstrlen(h5tools_dump_header_format->dataend))
+ if (strlen(h5tools_dump_header_format->dataend))
h5tools_str_append(&buffer, " ");
}
- if (HDstrlen(h5tools_dump_header_format->dataend))
+ if (strlen(h5tools_dump_header_format->dataend))
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->dataend);
h5tools_render_element(stream, &outputformat, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0,
(hsize_t)0);
@@ -4492,16 +4492,16 @@ h5tools_dump_data(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
if (ctx->sset && obj_data) {
ctx->indent_level--;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_simple_prefix(stream, &outputformat, ctx, (hsize_t)0, 0);
h5tools_str_reset(&buffer);
- if (HDstrlen(h5tools_dump_header_format->subsettingblockend)) {
+ if (strlen(h5tools_dump_header_format->subsettingblockend)) {
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->subsettingblockend);
- if (HDstrlen(h5tools_dump_header_format->subsettingend))
+ if (strlen(h5tools_dump_header_format->subsettingend))
h5tools_str_append(&buffer, " ");
}
- if (HDstrlen(h5tools_dump_header_format->subsettingend))
+ if (strlen(h5tools_dump_header_format->subsettingend))
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->subsettingend);
h5tools_render_element(stream, &outputformat, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0,
(hsize_t)0);
diff --git a/tools/lib/h5tools_dump.h b/tools/lib/h5tools_dump.h
index c8e19921a69..e57158af2e4 100644
--- a/tools/lib/h5tools_dump.h
+++ b/tools/lib/h5tools_dump.h
@@ -42,40 +42,40 @@ H5TOOLS_DLL int h5tools_dump_mem(FILE *stream, const h5tool_format_t *info, h5to
H5TOOLS_DLL int h5tools_dump_simple_data(FILE *stream, const h5tool_format_t *info,
h5tools_context_t *ctx /*in,out*/, hid_t container, unsigned flags,
hsize_t nelmts, hid_t type, void *_mem);
-H5TOOLS_DLL void h5tools_dump_datatype(FILE *stream, const h5tool_format_t *info,
- h5tools_context_t *ctx /*in,out*/, hid_t type);
-H5TOOLS_DLL void h5tools_dump_dataspace(FILE *stream, const h5tool_format_t *info,
- h5tools_context_t *ctx /*in,out*/, hid_t space);
-H5TOOLS_DLL void h5tools_dump_attribute(FILE *stream, const h5tool_format_t *info,
- h5tools_context_t *ctx /*in,out*/, const char *attr_name,
- hid_t attr_id);
-H5TOOLS_DLL void h5tools_dump_oid(FILE *stream, const h5tool_format_t *info,
- h5tools_context_t *ctx /*in,out*/, hid_t oid);
-H5TOOLS_DLL void h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
- h5tools_context_t *ctx /*in,out*/, hid_t dcpl, hid_t type_id,
- hid_t obj_id);
-H5TOOLS_DLL void h5tools_dump_comment(FILE *stream, const h5tool_format_t *info,
- h5tools_context_t *ctx /*in,out*/, hid_t obj_id);
-H5TOOLS_DLL void h5tools_dump_data(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx,
- hid_t obj_id, int obj_data);
-H5TOOLS_DLL void h5tools_dump_reference(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx,
- hid_t container, H5R_ref_t *ref_buf, int ndims);
-H5TOOLS_DLL hbool_t h5tools_dump_region_attribute(hid_t region_id, FILE *stream, const h5tool_format_t *info,
- h5tools_context_t *ctx /*in,out*/, h5tools_str_t *buffer,
- hsize_t *curr_pos, size_t ncols,
- hsize_t region_elmt_counter, hsize_t elmt_counter);
+H5TOOLS_DLL void h5tools_dump_datatype(FILE *stream, const h5tool_format_t *info,
+ h5tools_context_t *ctx /*in,out*/, hid_t type);
+H5TOOLS_DLL void h5tools_dump_dataspace(FILE *stream, const h5tool_format_t *info,
+ h5tools_context_t *ctx /*in,out*/, hid_t space);
+H5TOOLS_DLL void h5tools_dump_attribute(FILE *stream, const h5tool_format_t *info,
+ h5tools_context_t *ctx /*in,out*/, const char *attr_name,
+ hid_t attr_id);
+H5TOOLS_DLL void h5tools_dump_oid(FILE *stream, const h5tool_format_t *info,
+ h5tools_context_t *ctx /*in,out*/, hid_t oid);
+H5TOOLS_DLL void h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
+ h5tools_context_t *ctx /*in,out*/, hid_t dcpl, hid_t type_id,
+ hid_t obj_id);
+H5TOOLS_DLL void h5tools_dump_comment(FILE *stream, const h5tool_format_t *info,
+ h5tools_context_t *ctx /*in,out*/, hid_t obj_id);
+H5TOOLS_DLL void h5tools_dump_data(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx,
+ hid_t obj_id, int obj_data);
+H5TOOLS_DLL void h5tools_dump_reference(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx,
+ hid_t container, H5R_ref_t *ref_buf, int ndims);
+H5TOOLS_DLL bool h5tools_dump_region_attribute(hid_t region_id, FILE *stream, const h5tool_format_t *info,
+ h5tools_context_t *ctx /*in,out*/, h5tools_str_t *buffer,
+ hsize_t *curr_pos, size_t ncols, hsize_t region_elmt_counter,
+ hsize_t elmt_counter);
-H5TOOLS_DLL hbool_t h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, FILE *stream,
- const h5tool_format_t *info,
- h5tools_context_t *ctx /*in,out*/, h5tools_str_t *buffer,
- hsize_t *curr_pos, size_t ncols,
- hsize_t region_elmt_counter, hsize_t elmt_counter);
+H5TOOLS_DLL bool h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, FILE *stream,
+ const h5tool_format_t *info,
+ h5tools_context_t *ctx /*in,out*/, h5tools_str_t *buffer,
+ hsize_t *curr_pos, size_t ncols, hsize_t region_elmt_counter,
+ hsize_t elmt_counter);
-H5TOOLS_DLL hbool_t h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, FILE *stream,
- const h5tool_format_t *info,
- h5tools_context_t *ctx /*in,out*/, h5tools_str_t *buffer,
- hsize_t *curr_pos, size_t ncols,
- hsize_t region_elmt_counter, hsize_t elmt_counter);
+H5TOOLS_DLL bool h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, FILE *stream,
+ const h5tool_format_t *info,
+ h5tools_context_t *ctx /*in,out*/, h5tools_str_t *buffer,
+ hsize_t *curr_pos, size_t ncols, hsize_t region_elmt_counter,
+ hsize_t elmt_counter);
H5TOOLS_DLL int h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer /*in,out*/,
const h5tool_format_t *info, h5tools_context_t *ctx /*in,out*/,
diff --git a/tools/lib/h5tools_error.h b/tools/lib/h5tools_error.h
index 8a7414c3596..b56451188fd 100644
--- a/tools/lib/h5tools_error.h
+++ b/tools/lib/h5tools_error.h
@@ -36,7 +36,7 @@ H5TOOLS_DLLVAR hid_t H5E_tools_min_dbg_id_g;
char lib_str[256]; \
\
/* Initialize library version string for error class */ \
- HDsnprintf(lib_str, sizeof(lib_str), "%d.%d.%d", H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE); \
+ snprintf(lib_str, sizeof(lib_str), "%d.%d.%d", H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE); \
\
/* Create new HDF5 error stack for the tools to use */ \
if ((H5tools_ERR_STACK_g = H5Ecreate_stack()) < 0) \
@@ -213,7 +213,7 @@ H5TOOLS_DLLVAR hid_t H5E_tools_min_dbg_id_g;
*/
#define CATCH \
catch_except:; \
- past_catch = TRUE;
+ past_catch = true;
/*
* H5_LEAVE macro, used to facilitate control flow in a function. The argument
diff --git a/tools/lib/h5tools_ref.c b/tools/lib/h5tools_ref.c
index d89c546741f..a1466bcddea 100644
--- a/tools/lib/h5tools_ref.c
+++ b/tools/lib/h5tools_ref.c
@@ -132,7 +132,7 @@ init_ref_path_table(void)
return (-1);
/* Iterate over objects in this file */
- if (h5trav_visit(thefile, "/", TRUE, TRUE, init_ref_path_cb, NULL, NULL, H5O_INFO_BASIC) < 0) {
+ if (h5trav_visit(thefile, "/", true, true, init_ref_path_cb, NULL, NULL, H5O_INFO_BASIC) < 0) {
error_msg("unable to construct reference path table\n");
h5tools_setstatus(EXIT_FAILURE);
} /* end if */
@@ -180,10 +180,10 @@ ref_path_table_lookup(const char *thepath, H5O_token_t *token)
{
H5O_info2_t oi;
- if ((thepath == NULL) || (HDstrlen(thepath) == 0))
+ if ((thepath == NULL) || (strlen(thepath) == 0))
return -1;
/* Allow lookups on the root group, even though it doesn't have any link info */
- if (HDstrcmp(thepath, "/") != 0) {
+ if (strcmp(thepath, "/") != 0) {
H5L_info2_t li;
/* Check for external link first, so we don't return the OID of an object in another file */
@@ -231,7 +231,7 @@ ref_path_table_put(const char *path, const H5O_token_t *token)
return (-1);
memcpy(&new_node->obj_token, token, sizeof(H5O_token_t));
- new_node->path = HDstrdup(path);
+ new_node->path = strdup(path);
return (H5SL_insert(ref_path_table, new_node, &(new_node->obj_token)));
}
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index bd7587909d4..5ef86fbaf81 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -43,10 +43,10 @@ typedef struct H5LD_memb_t {
/* Variable length string datatype */
#define STR_INIT_LEN 4096 /*initial length */
-static char *h5tools_escape(char *s, size_t size);
-static hbool_t h5tools_str_is_zero(const void *_mem, size_t size);
-static void h5tools_print_char(h5tools_str_t *str, const h5tool_format_t *info, char ch);
-void h5tools_str_indent(h5tools_str_t *str, const h5tool_format_t *info, h5tools_context_t *ctx);
+static char *h5tools_escape(char *s, size_t size);
+static bool h5tools_str_is_zero(const void *_mem, size_t size);
+static void h5tools_print_char(h5tools_str_t *str, const h5tool_format_t *info, char ch);
+void h5tools_str_indent(h5tools_str_t *str, const h5tool_format_t *info, h5tools_context_t *ctx);
/*-------------------------------------------------------------------------
* Function: h5tools_str_close
@@ -106,7 +106,7 @@ h5tools_str_append(h5tools_str_t *str /*in,out*/, const char *fmt, ...)
if (!str->s || str->nalloc <= 0)
h5tools_str_reset(str);
- if (HDstrlen(fmt) == 0)
+ if (strlen(fmt) == 0)
/* nothing to print */
return str->s;
@@ -117,17 +117,17 @@ h5tools_str_append(h5tools_str_t *str /*in,out*/, const char *fmt, ...)
size_t avail = str->nalloc - str->len;
va_start(ap, fmt);
- nchars = HDvsnprintf(str->s + str->len, avail, fmt, ap);
+ nchars = vsnprintf(str->s + str->len, avail, fmt, ap);
va_end(ap);
- /* Note: HDvsnprintf() behaves differently on Windows as Unix, when
+ /* Note: vsnprintf() behaves differently on Windows as Unix, when
* buffer is smaller than source string. On Unix, this function
* returns length of the source string and copy string up to the
* buffer size with NULL at the end of the buffer. However on
* Windows with the same condition, this function returns -1 and
* doesn't add NULL at the end of the buffer.
* Because of this different return results, the strlen of the new string
- * is used to handle when HDvsnprintf() returns -1 on Windows due
+ * is used to handle when vsnprintf() returns -1 on Windows due
* to lack of buffer size, so try one more time after realloc more
* buffer size before return NULL.
*/
@@ -135,7 +135,7 @@ h5tools_str_append(h5tools_str_t *str /*in,out*/, const char *fmt, ...)
/* failure, such as bad format */
return NULL;
- if ((size_t)nchars >= avail || (0 == nchars && (HDstrcmp(fmt, "%s") != 0))) {
+ if ((size_t)nchars >= avail || (0 == nchars && (strcmp(fmt, "%s") != 0))) {
/* Truncation return value as documented by C99, or zero return value with either of the
* following conditions, each of which indicates that the proper C99 return value probably
* should have been positive when the format string is
@@ -230,14 +230,14 @@ h5tools_str_fmt(h5tools_str_t *str /*in,out*/, size_t start, const char *fmt)
assert(fmt);
/* If the format string is simply "%s" then don't bother doing anything */
- if (!HDstrcmp(fmt, "%s"))
+ if (!strcmp(fmt, "%s"))
return str->s;
/*
* Save the input value if there is a `%' anywhere in FMT. Otherwise
* don't bother because we don't need a temporary copy.
*/
- if (HDstrchr(fmt, '%')) {
+ if (strchr(fmt, '%')) {
size_t n = sizeof(_temp);
if (str->len - start + 1 > n) {
n = str->len - start + 1;
@@ -245,7 +245,7 @@ h5tools_str_fmt(h5tools_str_t *str /*in,out*/, size_t start, const char *fmt)
assert(temp);
}
- HDstrncpy(temp, str->s + start, n - 1);
+ strncpy(temp, str->s + start, n - 1);
temp[n - 1] = '\0';
}
@@ -669,8 +669,8 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
H5TOOLS_START_DEBUG(" ");
/* Build default formats for long long types */
if (!fmt_llong[0]) {
- HDsnprintf(fmt_llong, sizeof(fmt_llong), "%%lld");
- HDsnprintf(fmt_ullong, sizeof(fmt_ullong), "%%llu");
+ snprintf(fmt_llong, sizeof(fmt_llong), "%%lld");
+ snprintf(fmt_ullong, sizeof(fmt_ullong), "%%llu");
}
/* Append value depending on data type */
@@ -741,10 +741,10 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
quote = '\0';
if (H5Tis_variable_str(type)) {
/* cp_vp is the pointer into the struct where a `char*' is stored. So we have
- * to dereference the pointer to get the `char*' to pass to HDstrlen(). */
+ * to dereference the pointer to get the `char*' to pass to strlen(). */
s = *(char **)((void *)cp_vp);
if (s != NULL)
- size = HDstrlen(s);
+ size = strlen(s);
}
else {
s = cp_vp;
@@ -1494,7 +1494,7 @@ h5tools_escape(char *s /*in,out*/, size_t size)
size_t i;
const char *escape;
char octal[8];
- size_t n = HDstrlen(s);
+ size_t n = strlen(s);
for (i = 0; i < n; i++) {
switch (s[i]) {
@@ -1533,7 +1533,7 @@ h5tools_escape(char *s /*in,out*/, size_t size)
break;
default:
if (!isprint(s[i])) {
- HDsnprintf(octal, sizeof(octal), "\\%03o", (unsigned char)s[i]);
+ snprintf(octal, sizeof(octal), "\\%03o", (unsigned char)s[i]);
escape = octal;
}
else
@@ -1543,7 +1543,7 @@ h5tools_escape(char *s /*in,out*/, size_t size)
}
if (escape) {
- size_t esc_size = HDstrlen(escape);
+ size_t esc_size = strlen(escape);
if (n + esc_size + 1 > size)
/*would overflow*/
@@ -1564,20 +1564,20 @@ h5tools_escape(char *s /*in,out*/, size_t size)
*
* Purpose: Determines if memory is initialized to all zero bytes.
*
- * Return: TRUE if all bytes are zero; FALSE otherwise
+ * Return: true if all bytes are zero; false otherwise
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
h5tools_str_is_zero(const void *_mem, size_t size)
{
const unsigned char *mem = (const unsigned char *)_mem;
while (size-- > 0)
if (mem[size])
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
/*-------------------------------------------------------------------------
@@ -1601,26 +1601,26 @@ h5tools_str_replace(const char *string, const char *substr, const char *replacem
char *head = NULL;
if (substr == NULL || replacement == NULL)
- return HDstrdup(string);
- newstr = HDstrdup(string);
+ return strdup(string);
+ newstr = strdup(string);
head = newstr;
- while ((tok = HDstrstr(head, substr))) {
+ while ((tok = strstr(head, substr))) {
char *oldstr;
oldstr = newstr;
- newstr = (char *)malloc(HDstrlen(oldstr) - HDstrlen(substr) + HDstrlen(replacement) + 1);
+ newstr = (char *)malloc(strlen(oldstr) - strlen(substr) + strlen(replacement) + 1);
if (newstr == NULL) {
free(oldstr);
return NULL;
}
memcpy(newstr, oldstr, (size_t)(tok - oldstr));
- memcpy(newstr + (tok - oldstr), replacement, HDstrlen(replacement));
- memcpy(newstr + (tok - oldstr) + HDstrlen(replacement), tok + HDstrlen(substr),
- HDstrlen(oldstr) - HDstrlen(substr) - (size_t)(tok - oldstr));
- memset(newstr + HDstrlen(oldstr) - HDstrlen(substr) + HDstrlen(replacement), 0, 1);
+ memcpy(newstr + (tok - oldstr), replacement, strlen(replacement));
+ memcpy(newstr + (tok - oldstr) + strlen(replacement), tok + strlen(substr),
+ strlen(oldstr) - strlen(substr) - (size_t)(tok - oldstr));
+ memset(newstr + strlen(oldstr) - strlen(substr) + strlen(replacement), 0, 1);
/* move back head right after the last replacement */
- head = newstr + (tok - oldstr) + HDstrlen(replacement);
+ head = newstr + (tok - oldstr) + strlen(replacement);
free(oldstr);
}
diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c
index fc9a6462d69..dfffac67385 100644
--- a/tools/lib/h5tools_utils.c
+++ b/tools/lib/h5tools_utils.c
@@ -51,7 +51,7 @@ static void init_table(hid_t fid, table_t **tbl);
#ifdef H5DUMP_DEBUG
static void dump_table(hid_t fid, char *tablename, table_t *table);
#endif /* H5DUMP_DEBUG */
-static void add_obj(table_t *table, const H5O_token_t *obj_token, const char *objname, hbool_t recorded);
+static void add_obj(table_t *table, const H5O_token_t *obj_token, const char *objname, bool recorded);
/*-------------------------------------------------------------------------
* Function: parallel_print
@@ -68,10 +68,10 @@ parallel_print(const char *format, ...)
va_start(ap, format);
if (!g_Parallel)
- HDvprintf(format, ap);
+ vprintf(format, ap);
else {
if (overflow_file == NULL) /*no overflow has occurred yet */ {
- bytes_written = HDvsnprintf(outBuff + outBuffOffset, OUTBUFF_SIZE - outBuffOffset, format, ap);
+ bytes_written = vsnprintf(outBuff + outBuffOffset, OUTBUFF_SIZE - outBuffOffset, format, ap);
va_end(ap);
va_start(ap, format);
@@ -84,13 +84,13 @@ parallel_print(const char *format, ...)
fprintf(rawerrorstream,
"warning: could not create overflow file. Output may be truncated.\n");
else
- bytes_written = HDvfprintf(overflow_file, format, ap);
+ bytes_written = vfprintf(overflow_file, format, ap);
}
else
outBuffOffset += (unsigned)bytes_written;
}
else
- bytes_written = HDvfprintf(overflow_file, format, ap);
+ bytes_written = vfprintf(overflow_file, format, ap);
}
va_end(ap);
}
@@ -114,7 +114,7 @@ error_msg(const char *fmt, ...)
FLUSHSTREAM(rawdatastream);
FLUSHSTREAM(rawoutstream);
fprintf(rawerrorstream, "%s error: ", h5tools_getprogname());
- HDvfprintf(rawerrorstream, fmt, ap);
+ vfprintf(rawerrorstream, fmt, ap);
va_end(ap);
}
@@ -138,7 +138,7 @@ warn_msg(const char *fmt, ...)
FLUSHSTREAM(rawdatastream);
FLUSHSTREAM(rawoutstream);
fprintf(rawerrorstream, "%s warning: ", h5tools_getprogname());
- HDvfprintf(rawerrorstream, fmt, ap);
+ vfprintf(rawerrorstream, fmt, ap);
va_end(ap);
}
@@ -241,10 +241,10 @@ parse_subset_params(const char *dset)
H5TOOLS_START_DEBUG(" - dset:%s", dset);
/* if dset name is quoted wait till after second quote to look for subset brackets */
if (*dset == '"')
- q_dset = HDstrchr(dset, '"');
+ q_dset = strchr(dset, '"');
else
q_dset = dset;
- if ((brace = HDstrrchr(q_dset, '[')) != NULL) {
+ if ((brace = strrchr(q_dset, '[')) != NULL) {
*brace++ = '\0';
s = (struct subset_t *)calloc(1, sizeof(struct subset_t));
@@ -388,8 +388,8 @@ parse_tuple(const char *start, int sep, char **cpy_out, unsigned *nelems, char *
/* create destination string
*/
- start++; /* advance past opening paren '(' */
- cpy = (char *)malloc(sizeof(char) * (HDstrlen(start))); /* no +1; less '(' */
+ start++; /* advance past opening paren '(' */
+ cpy = (char *)malloc(sizeof(char) * (strlen(start))); /* no +1; less '(' */
if (cpy == NULL) {
ret_value = FAIL;
goto done;
@@ -660,7 +660,7 @@ find_objs_cb(const char *name, const H5O_info2_t *oinfo, const char *already_see
switch (oinfo->type) {
case H5O_TYPE_GROUP:
if (NULL == already_seen)
- add_obj(info->group_table, &oinfo->token, name, TRUE);
+ add_obj(info->group_table, &oinfo->token, name, true);
break;
case H5O_TYPE_DATASET:
@@ -668,7 +668,7 @@ find_objs_cb(const char *name, const H5O_info2_t *oinfo, const char *already_see
hid_t dset = H5I_INVALID_HID;
/* Add the dataset to the list of objects */
- add_obj(info->dset_table, &oinfo->token, name, TRUE);
+ add_obj(info->dset_table, &oinfo->token, name, true);
/* Check for a dataset that uses a named datatype */
if ((dset = H5Dopen2(info->fid, name, H5P_DEFAULT)) >= 0) {
@@ -679,7 +679,7 @@ find_objs_cb(const char *name, const H5O_info2_t *oinfo, const char *already_see
H5Oget_info3(type, &type_oinfo, H5O_INFO_BASIC);
if (search_obj(info->type_table, &type_oinfo.token) == NULL)
- add_obj(info->type_table, &type_oinfo.token, name, FALSE);
+ add_obj(info->type_table, &type_oinfo.token, name, false);
} /* end if */
H5Tclose(type);
@@ -695,14 +695,14 @@ find_objs_cb(const char *name, const H5O_info2_t *oinfo, const char *already_see
obj_t *found_obj;
if ((found_obj = search_obj(info->type_table, &oinfo->token)) == NULL)
- add_obj(info->type_table, &oinfo->token, name, TRUE);
+ add_obj(info->type_table, &oinfo->token, name, true);
else {
/* Use latest version of name */
free(found_obj->objname);
- found_obj->objname = HDstrdup(name);
+ found_obj->objname = strdup(name);
/* Mark named datatype as having valid name */
- found_obj->recorded = TRUE;
+ found_obj->recorded = true;
} /* end else */
} /* end if */
break;
@@ -744,7 +744,7 @@ init_objs(hid_t fid, find_objs_t *info, table_t **group_table, table_t **dset_ta
info->dset_table = *dset_table;
/* Find all shared objects */
- if ((ret_value = h5trav_visit(fid, "/", TRUE, TRUE, find_objs_cb, NULL, info, H5O_INFO_BASIC)) < 0)
+ if ((ret_value = h5trav_visit(fid, "/", true, true, find_objs_cb, NULL, info, H5O_INFO_BASIC)) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "finding shared objects failed");
done:
@@ -770,7 +770,7 @@ init_objs(hid_t fid, find_objs_t *info, table_t **group_table, table_t **dset_ta
*-------------------------------------------------------------------------
*/
static void
-add_obj(table_t *table, const H5O_token_t *obj_token, const char *objname, hbool_t record)
+add_obj(table_t *table, const H5O_token_t *obj_token, const char *objname, bool record)
{
size_t u;
@@ -785,7 +785,7 @@ add_obj(table_t *table, const H5O_token_t *obj_token, const char *objname, hbool
/* Set information about object */
memcpy(&table->objs[u].obj_token, obj_token, sizeof(H5O_token_t));
- table->objs[u].objname = HDstrdup(objname);
+ table->objs[u].objname = strdup(objname);
table->objs[u].recorded = record;
table->objs[u].displayed = 0;
}
@@ -831,7 +831,7 @@ tmpfile(void)
*-------------------------------------------------------------------------*/
int
H5tools_get_symlink_info(hid_t file_id, const char *linkpath, h5tool_link_info_t *link_info,
- hbool_t get_obj_type)
+ bool get_obj_type)
{
htri_t l_ret;
H5O_info2_t trg_oinfo;
@@ -843,7 +843,7 @@ H5tools_get_symlink_info(hid_t file_id, const char *linkpath, h5tool_link_info_t
link_info->trg_type = H5O_TYPE_UNKNOWN;
/* if path is root, return group type */
- if (!HDstrcmp(linkpath, "/")) {
+ if (!strcmp(linkpath, "/")) {
link_info->trg_type = H5O_TYPE_GROUP;
H5TOOLS_GOTO_DONE(2);
}
@@ -905,7 +905,7 @@ H5tools_get_symlink_info(hid_t file_id, const char *linkpath, h5tool_link_info_t
l_ret = H5Oexists_by_name(file_id, linkpath, lapl);
/* detect dangling link */
- if (l_ret == FALSE) {
+ if (l_ret == false) {
H5TOOLS_GOTO_DONE(0);
}
else if (l_ret < 0) { /* function failed */
@@ -994,7 +994,7 @@ h5tools_getenv_update_hyperslab_bufsize(void)
int ret_value = 1;
/* check if environment variable is set for the hyperslab buffer size */
- if (NULL != (env_str = HDgetenv("H5TOOLS_BUFSIZE"))) {
+ if (NULL != (env_str = getenv("H5TOOLS_BUFSIZE"))) {
errno = 0;
hyperslab_bufsize_mb = strtol(env_str, (char **)NULL, 10);
if (errno != 0 || hyperslab_bufsize_mb <= 0)
@@ -1146,7 +1146,7 @@ h5tools_populate_ros3_fapl(H5FD_ros3_fapl_ext_t *fa, const char **values)
printf(" preset fapl with default values\n");
}
fa->fa.version = H5FD_CURR_ROS3_FAPL_T_VERSION;
- fa->fa.authenticate = FALSE;
+ fa->fa.authenticate = false;
*(fa->fa.aws_region) = '\0';
*(fa->fa.secret_id) = '\0';
*(fa->fa.secret_key) = '\0';
@@ -1188,55 +1188,55 @@ h5tools_populate_ros3_fapl(H5FD_ros3_fapl_ext_t *fa, const char **values)
* fail if value would overflow
*/
if (*values[0] != '\0' && *values[1] != '\0') {
- if (HDstrlen(values[0]) > H5FD_ROS3_MAX_REGION_LEN) {
+ if (strlen(values[0]) > H5FD_ROS3_MAX_REGION_LEN) {
if (show_progress) {
printf(" ERROR: aws_region value too long\n");
}
ret_value = 0;
goto done;
}
- memcpy(fa->fa.aws_region, values[0], (HDstrlen(values[0]) + 1));
+ memcpy(fa->fa.aws_region, values[0], (strlen(values[0]) + 1));
if (show_progress) {
printf(" aws_region set\n");
}
- if (HDstrlen(values[1]) > H5FD_ROS3_MAX_SECRET_ID_LEN) {
+ if (strlen(values[1]) > H5FD_ROS3_MAX_SECRET_ID_LEN) {
if (show_progress) {
printf(" ERROR: secret_id value too long\n");
}
ret_value = 0;
goto done;
}
- memcpy(fa->fa.secret_id, values[1], (HDstrlen(values[1]) + 1));
+ memcpy(fa->fa.secret_id, values[1], (strlen(values[1]) + 1));
if (show_progress) {
printf(" secret_id set\n");
}
- if (HDstrlen(values[2]) > H5FD_ROS3_MAX_SECRET_KEY_LEN) {
+ if (strlen(values[2]) > H5FD_ROS3_MAX_SECRET_KEY_LEN) {
if (show_progress) {
printf(" ERROR: secret_key value too long\n");
}
ret_value = 0;
goto done;
}
- memcpy(fa->fa.secret_key, values[2], (HDstrlen(values[2]) + 1));
+ memcpy(fa->fa.secret_key, values[2], (strlen(values[2]) + 1));
if (show_progress) {
printf(" secret_key set\n");
}
- if (HDstrlen(values[3]) > H5FD_ROS3_MAX_SECRET_TOK_LEN) {
+ if (strlen(values[3]) > H5FD_ROS3_MAX_SECRET_TOK_LEN) {
if (show_progress) {
printf(" ERROR: token value too long\n");
}
ret_value = 0;
goto done;
}
- memcpy(fa->token, values[3], (HDstrlen(values[3]) + 1));
+ memcpy(fa->token, values[3], (strlen(values[3]) + 1));
if (show_progress) {
printf(" token set\n");
}
- fa->fa.authenticate = TRUE;
+ fa->fa.authenticate = true;
if (show_progress) {
printf(" set to authenticate\n");
}
@@ -1288,22 +1288,22 @@ h5tools_parse_hdfs_fapl_tuple(const char *tuple_str, int delim, H5FD_hdfs_fapl_t
* WARNING: No error-checking is done on length of input strings...
* Silent overflow is possible, albeit unlikely.
*/
- if (HDstrncmp(props[0], "", 1)) {
- HDstrncpy(fapl_config_out->namenode_name, (const char *)props[0], HDstrlen(props[0]));
+ if (strncmp(props[0], "", 1)) {
+ strncpy(fapl_config_out->namenode_name, (const char *)props[0], strlen(props[0]));
}
- if (HDstrncmp(props[1], "", 1)) {
+ if (strncmp(props[1], "", 1)) {
k = strtoul((const char *)props[1], NULL, 0);
if (errno == ERANGE)
H5TOOLS_GOTO_ERROR(FAIL, "supposed port number wasn't");
fapl_config_out->namenode_port = (int32_t)k;
}
- if (HDstrncmp(props[2], "", 1)) {
- HDstrncpy(fapl_config_out->kerberos_ticket_cache, (const char *)props[2], HDstrlen(props[2]));
+ if (strncmp(props[2], "", 1)) {
+ strncpy(fapl_config_out->kerberos_ticket_cache, (const char *)props[2], strlen(props[2]));
}
- if (HDstrncmp(props[3], "", 1)) {
- HDstrncpy(fapl_config_out->user_name, (const char *)props[3], HDstrlen(props[3]));
+ if (strncmp(props[3], "", 1)) {
+ strncpy(fapl_config_out->user_name, (const char *)props[3], strlen(props[3]));
}
- if (HDstrncmp(props[4], "", 1)) {
+ if (strncmp(props[4], "", 1)) {
k = strtoul((const char *)props[4], NULL, 0);
if (errno == ERANGE)
H5TOOLS_GOTO_ERROR(FAIL, "supposed buffersize number wasn't");
diff --git a/tools/lib/h5tools_utils.h b/tools/lib/h5tools_utils.h
index 2efa53f3297..ce5a24aa63a 100644
--- a/tools/lib/h5tools_utils.h
+++ b/tools/lib/h5tools_utils.h
@@ -41,8 +41,8 @@ H5TOOLS_DLLVAR hsize_t H5TOOLS_BUFSIZE;
typedef struct obj_t {
H5O_token_t obj_token;
char *objname;
- hbool_t displayed; /* Flag to indicate that the object has been displayed */
- hbool_t recorded; /* Flag for named datatypes to indicate they were found in the group hierarchy */
+ bool displayed; /* Flag to indicate that the object has been displayed */
+ bool recorded; /* Flag for named datatypes to indicate they were found in the group hierarchy */
} obj_t;
/*struct for the tables that the find_objs function uses*/
@@ -126,7 +126,7 @@ typedef struct {
/* Definitions of routines */
H5TOOLS_DLL int H5tools_get_symlink_info(hid_t file_id, const char *linkpath, h5tool_link_info_t *link_info,
- hbool_t get_obj_type);
+ bool get_obj_type);
H5TOOLS_DLL const char *h5tools_getprogname(void);
H5TOOLS_DLL void h5tools_setprogname(const char *progname);
H5TOOLS_DLL int h5tools_getstatus(void);
diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c
index 5ae379e6f8f..017e0625521 100644
--- a/tools/lib/h5trav.c
+++ b/tools/lib/h5trav.c
@@ -38,7 +38,7 @@ typedef struct {
typedef struct {
trav_addr_t *seen; /* List of addresses seen already */
const trav_visitor_t *visitor; /* Information for visiting each link/object */
- hbool_t is_absolute; /* Whether the traversal has absolute paths */
+ bool is_absolute; /* Whether the traversal has absolute paths */
const char *base_grp_name; /* Name of the group that serves as the base
* for iteration */
unsigned fields; /* Fields needed in H5O_info2_t struct */
@@ -126,7 +126,7 @@ trav_token_add(trav_addr_t *visited, H5O_token_t *token, const char *path)
/* Append it */
idx = visited->nused++;
memcpy(&visited->objs[idx].token, token, sizeof(H5O_token_t));
- visited->objs[idx].path = HDstrdup(path);
+ visited->objs[idx].path = strdup(path);
} /* end trav_token_add() */
/*-------------------------------------------------------------------------
@@ -134,7 +134,7 @@ trav_token_add(trav_addr_t *visited, H5O_token_t *token, const char *path)
*
* Purpose: Check if an object token has already been seen
*
- * Return: TRUE/FALSE
+ * Return: true/false
*-------------------------------------------------------------------------
*/
H5_ATTR_PURE static const char *
@@ -172,17 +172,17 @@ traverse_cb(hid_t loc_id, const char *path, const H5L_info2_t *linfo, void *_uda
/* Create the full path name for the link */
if (udata->is_absolute) {
- size_t base_len = HDstrlen(udata->base_grp_name);
+ size_t base_len = strlen(udata->base_grp_name);
size_t add_slash = base_len ? ((udata->base_grp_name)[base_len - 1] != '/') : 1;
- size_t new_name_len = base_len + add_slash + HDstrlen(path) + 1 +
+ size_t new_name_len = base_len + add_slash + strlen(path) + 1 +
3; /* Extra "+3" to quiet GCC warning - 2019/07/05, QAK */
if (NULL == (new_name = (char *)malloc(new_name_len)))
return (H5_ITER_ERROR);
if (add_slash)
- HDsnprintf(new_name, new_name_len, "%s/%s", udata->base_grp_name, path);
+ snprintf(new_name, new_name_len, "%s/%s", udata->base_grp_name, path);
else
- HDsnprintf(new_name, new_name_len, "%s%s", udata->base_grp_name, path);
+ snprintf(new_name, new_name_len, "%s%s", udata->base_grp_name, path);
full_name = new_name;
} /* end if */
else
@@ -241,8 +241,8 @@ traverse_cb(hid_t loc_id, const char *path, const H5L_info2_t *linfo, void *_uda
*-------------------------------------------------------------------------
*/
static int
-traverse(hid_t file_id, const char *grp_name, hbool_t visit_start, hbool_t recurse,
- const trav_visitor_t *visitor, unsigned fields)
+traverse(hid_t file_id, const char *grp_name, bool visit_start, bool recurse, const trav_visitor_t *visitor,
+ unsigned fields)
{
H5O_info2_t oinfo; /* Object info for starting group */
int ret_value = 0;
@@ -326,7 +326,7 @@ trav_info_add(trav_info_t *info, const char *path, h5trav_type_t obj_type)
/* Append it */
idx = info->nused++;
- info->paths[idx].path = HDstrdup(path);
+ info->paths[idx].path = strdup(path);
info->paths[idx].type = obj_type;
info->paths[idx].fileno = 0;
@@ -349,7 +349,7 @@ trav_fileinfo_add(trav_info_t *info, hid_t loc_id)
H5O_info2_t oinfo;
size_t idx = info->nused - 1;
- if (info->paths[idx].path && HDstrcmp(info->paths[idx].path, ".") != 0)
+ if (info->paths[idx].path && strcmp(info->paths[idx].path, ".") != 0)
H5Oget_info_by_name3(loc_id, info->paths[idx].path, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT);
else
H5Oget_info3(loc_id, &oinfo, H5O_INFO_BASIC);
@@ -428,7 +428,7 @@ h5trav_getinfo(hid_t file_id, trav_info_t *info)
info_visitor.udata = info;
/* Traverse all objects in the file, visiting each object & link */
- if (traverse(file_id, "/", TRUE, TRUE, &info_visitor, H5O_INFO_BASIC) < 0)
+ if (traverse(file_id, "/", true, true, &info_visitor, H5O_INFO_BASIC) < 0)
H5TOOLS_GOTO_ERROR((-1), "traverse failed");
done:
@@ -452,11 +452,11 @@ h5trav_getindex(const trav_info_t *info, const char *obj)
/* Loop over all paths in 'info' struct, looking for object */
for (u = 0; u < info->nused; u++) {
/* Check for object name having full path (with leading '/') */
- if (HDstrcmp(obj, info->paths[u].path) == 0)
+ if (strcmp(obj, info->paths[u].path) == 0)
return ((ssize_t)u);
/* Check for object name without leading '/' */
- if (HDstrcmp(obj, (info->paths[u].path + 1)) == 0)
+ if (strcmp(obj, (info->paths[u].path + 1)) == 0)
return ((ssize_t)u);
} /* end for */
@@ -486,7 +486,7 @@ trav_info_init(const char *filename, hid_t fileid, trav_info_t **_info)
info->symlink_visited.nused = 0;
info->symlink_visited.nalloc = 0;
info->symlink_visited.objs = NULL;
- info->symlink_visited.dangle_link = FALSE;
+ info->symlink_visited.dangle_link = false;
*_info = info;
} /* end trav_info_init() */
@@ -587,7 +587,7 @@ h5trav_gettable(hid_t fid, trav_table_t *table)
table_visitor.udata = table;
/* Traverse all objects in the file, visiting each object & link */
- if (traverse(fid, "/", TRUE, TRUE, &table_visitor, H5O_INFO_BASIC) < 0)
+ if (traverse(fid, "/", true, true, &table_visitor, H5O_INFO_BASIC) < 0)
H5TOOLS_GOTO_ERROR((-1), "traverse failed");
done:
@@ -611,11 +611,11 @@ h5trav_getindext(const char *name, const trav_table_t *table)
if (table) {
for (i = 0; i < table->nobjs; i++) {
/* Check for object name having full path (with leading '/') */
- if (HDstrcmp(name, table->objs[i].name) == 0)
+ if (strcmp(name, table->objs[i].name) == 0)
return ((int)i);
/* Check for object name without leading '/' */
- if (HDstrcmp(name, table->objs[i].name + 1) == 0)
+ if (strcmp(name, table->objs[i].name + 1) == 0)
return ((int)i);
/* search also in the list of links */
@@ -624,11 +624,11 @@ h5trav_getindext(const char *name, const trav_table_t *table)
for (j = 0; j < table->objs[i].nlinks; j++) {
/* Check for object name having full path (with leading '/') */
- if (HDstrcmp(name, table->objs[i].links[j].new_name) == 0)
+ if (strcmp(name, table->objs[i].links[j].new_name) == 0)
return ((int)i);
/* Check for object name without leading '/' */
- if (HDstrcmp(name, table->objs[i].links[j].new_name + 1) == 0)
+ if (strcmp(name, table->objs[i].links[j].new_name + 1) == 0)
return ((int)i);
} /* end for */
} /* end if */
@@ -664,7 +664,7 @@ trav_table_add(trav_table_t *table, const char *path, const H5O_info2_t *oinfo)
table->objs[new_obj].obj_token = H5O_TOKEN_UNDEF;
table->objs[new_obj].flags[0] = table->objs[new_obj].flags[1] = 0;
table->objs[new_obj].is_same_trgobj = 0;
- table->objs[new_obj].name = (char *)HDstrdup(path);
+ table->objs[new_obj].name = (char *)strdup(path);
table->objs[new_obj].type = oinfo ? (h5trav_type_t)oinfo->type : H5TRAV_TYPE_LINK;
table->objs[new_obj].nlinks = 0;
table->objs[new_obj].sizelinks = 0;
@@ -694,7 +694,7 @@ trav_table_addlink(trav_table_t *table, const H5O_token_t *obj_token, const char
size_t n;
/* already inserted? */
- if (HDstrcmp(table->objs[i].name, path) == 0)
+ if (strcmp(table->objs[i].name, path) == 0)
return;
/* allocate space if necessary */
@@ -706,7 +706,7 @@ trav_table_addlink(trav_table_t *table, const H5O_token_t *obj_token, const char
/* insert it */
n = table->objs[i].nlinks++;
- table->objs[i].links[n].new_name = (char *)HDstrdup(path);
+ table->objs[i].links[n].new_name = (char *)strdup(path);
return;
} /* end if */
@@ -741,7 +741,7 @@ trav_table_addflags(const unsigned *flags, char *name, h5trav_type_t type, trav_
table->objs[new_obj].flags[0] = flags[0];
table->objs[new_obj].flags[1] = flags[1];
table->objs[new_obj].is_same_trgobj = 0;
- table->objs[new_obj].name = (char *)HDstrdup(name);
+ table->objs[new_obj].name = (char *)strdup(name);
table->objs[new_obj].type = type;
table->objs[new_obj].nlinks = 0;
table->objs[new_obj].sizelinks = 0;
@@ -1017,7 +1017,7 @@ h5trav_print(hid_t fid)
print_visitor.udata = &print_udata;
/* Traverse all objects in the file, visiting each object & link */
- if (traverse(fid, "/", TRUE, TRUE, &print_visitor, H5O_INFO_BASIC) < 0)
+ if (traverse(fid, "/", true, true, &print_visitor, H5O_INFO_BASIC) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "traverse failed");
done:
@@ -1034,8 +1034,8 @@ h5trav_print(hid_t fid)
*-------------------------------------------------------------------------
*/
int
-h5trav_visit(hid_t fid, const char *grp_name, hbool_t visit_start, hbool_t recurse,
- h5trav_obj_func_t visit_obj, h5trav_lnk_func_t visit_lnk, void *udata, unsigned fields)
+h5trav_visit(hid_t fid, const char *grp_name, bool visit_start, bool recurse, h5trav_obj_func_t visit_obj,
+ h5trav_lnk_func_t visit_lnk, void *udata, unsigned fields)
{
trav_visitor_t visitor; /* Visitor structure for objects */
int ret_value = 0;
@@ -1086,13 +1086,13 @@ symlink_visit_add(symlink_trav_t *visited, H5L_type_t type, const char *file, co
visited->objs[idx].path = NULL;
if (type == H5L_TYPE_EXTERNAL) {
- if (NULL == (visited->objs[idx].file = HDstrdup(file))) {
+ if (NULL == (visited->objs[idx].file = strdup(file))) {
visited->nused--;
H5TOOLS_GOTO_ERROR(FAIL, "visited data structure name allocation failed");
} /* end if */
} /* end if */
- if (NULL == (visited->objs[idx].path = HDstrdup(path))) {
+ if (NULL == (visited->objs[idx].path = strdup(path))) {
visited->nused--;
if (visited->objs[idx].file)
free(visited->objs[idx].file);
@@ -1108,10 +1108,10 @@ symlink_visit_add(symlink_trav_t *visited, H5L_type_t type, const char *file, co
*
* Purpose: Check if an symbolic link has already been visited
*
- * Return: TRUE/FALSE
+ * Return: true/false
*-------------------------------------------------------------------------
*/
-H5_ATTR_PURE hbool_t
+H5_ATTR_PURE bool
symlink_is_visited(symlink_trav_t *visited, H5L_type_t type, const char *file, const char *path)
{
size_t u; /* Local index variable */
@@ -1120,16 +1120,16 @@ symlink_is_visited(symlink_trav_t *visited, H5L_type_t type, const char *file, c
for (u = 0; u < visited->nused; u++) {
/* Check for symlink values already in array */
/* check type and path pair to distinguish between symbolic links */
- if ((visited->objs[u].type == type) && !HDstrcmp(visited->objs[u].path, path)) {
+ if ((visited->objs[u].type == type) && !strcmp(visited->objs[u].path, path)) {
/* if external link, file need to be matched as well */
if (visited->objs[u].type == H5L_TYPE_EXTERNAL)
- if (!HDstrcmp(visited->objs[u].file, file))
- return (TRUE);
+ if (!strcmp(visited->objs[u].file, file))
+ return (true);
- return (TRUE);
+ return (true);
} /* end if */
} /* end for */
/* Didn't find symlink */
- return (FALSE);
+ return (false);
} /* end symlink_is_visited() */
diff --git a/tools/lib/h5trav.h b/tools/lib/h5trav.h
index 8f3e175063d..40ceaaecc7e 100644
--- a/tools/lib/h5trav.h
+++ b/tools/lib/h5trav.h
@@ -57,7 +57,7 @@ typedef struct symlink_trav_t {
size_t nalloc;
size_t nused;
symlink_trav_path_t *objs;
- hbool_t dangle_link;
+ bool dangle_link;
} symlink_trav_t;
typedef struct trav_path_t {
@@ -93,7 +93,7 @@ typedef struct trav_link_t {
typedef struct trav_obj_t {
H5O_token_t obj_token; /* object token */
unsigned flags[2]; /* h5diff.object is present or not in both files*/
- hbool_t is_same_trgobj; /* same target object? no need to compare */
+ bool is_same_trgobj; /* same target object? no need to compare */
char *name; /* name */
h5trav_type_t type; /* type of object */
trav_link_t *links; /* array of possible link names */
@@ -126,14 +126,14 @@ extern "C" {
* "h5trav general" public functions
*-------------------------------------------------------------------------
*/
-H5TOOLS_DLL void h5trav_set_index(H5_index_t print_index_by, H5_iter_order_t print_index_order);
-H5TOOLS_DLL int h5trav_visit(hid_t file_id, const char *grp_name, hbool_t visit_start, hbool_t recurse,
- h5trav_obj_func_t visit_obj, h5trav_lnk_func_t visit_lnk, void *udata,
- unsigned fields);
-H5TOOLS_DLL herr_t symlink_visit_add(symlink_trav_t *visited, H5L_type_t type, const char *file,
+H5TOOLS_DLL void h5trav_set_index(H5_index_t print_index_by, H5_iter_order_t print_index_order);
+H5TOOLS_DLL int h5trav_visit(hid_t file_id, const char *grp_name, bool visit_start, bool recurse,
+ h5trav_obj_func_t visit_obj, h5trav_lnk_func_t visit_lnk, void *udata,
+ unsigned fields);
+H5TOOLS_DLL herr_t symlink_visit_add(symlink_trav_t *visited, H5L_type_t type, const char *file,
+ const char *path);
+H5TOOLS_DLL bool symlink_is_visited(symlink_trav_t *visited, H5L_type_t type, const char *file,
const char *path);
-H5TOOLS_DLL hbool_t symlink_is_visited(symlink_trav_t *visited, H5L_type_t type, const char *file,
- const char *path);
/*-------------------------------------------------------------------------
* "h5trav info" public functions
diff --git a/tools/libtest/h5tools_test_utils.c b/tools/libtest/h5tools_test_utils.c
index 26f467cb5c5..6f3c0a6bae5 100644
--- a/tools/libtest/h5tools_test_utils.c
+++ b/tools/libtest/h5tools_test_utils.c
@@ -241,7 +241,7 @@ H5_GCC_CLANG_DIAG_OFF("format")
*----------------------------------------------------------------------------
*/
#define JSVERIFY_STR(expected, actual, reason) \
- if (HDstrcmp((actual), (expected)) != 0) { \
+ if (strcmp((actual), (expected)) != 0) { \
JSERR_STR((expected), (actual), (reason)); \
goto error; \
} /* JSVERIFY_STR */
@@ -277,7 +277,7 @@ H5_GCC_CLANG_DIAG_OFF("format")
*----------------------------------------------------------------------------
*/
#define JSVERIFY_STR(actual, expected, reason) \
- if (HDstrcmp((actual), (expected)) != 0) { \
+ if (strcmp((actual), (expected)) != 0) { \
JSERR_STR((expected), (actual), (reason)); \
goto error; \
} /* JSVERIFY_STR */
@@ -447,13 +447,13 @@ test_parse_tuple(void)
unsigned elem_i = 0;
char **parsed = NULL;
char *cpy = NULL;
- herr_t success = TRUE;
- hbool_t show_progress = FALSE;
+ herr_t success = true;
+ bool show_progress = false;
TESTING("arbitrary-count tuple parsing");
#if H5TOOLS_UTILS_TEST_DEBUG > 0
- show_progress = TRUE;
+ show_progress = true;
#endif /* H5TOOLS_UTILS_TEST_DEBUG */
/*********
@@ -467,7 +467,7 @@ test_parse_tuple(void)
assert(parsed == NULL);
assert(cpy == NULL);
tc = cases[i];
- if (show_progress == TRUE) {
+ if (show_progress == true) {
printf("testing %d: %s...\n", i, tc.test_msg);
}
@@ -536,20 +536,20 @@ test_populate_ros3_fa(void)
* TEST-LOCAL VARIABLES *
************************/
- hbool_t show_progress = FALSE;
- int bad_version = 0xf87a; /* arbitrarily wrong version number */
-#endif /* H5_HAVE_ROS3_VFD */
+ bool show_progress = false;
+ int bad_version = 0xf87a; /* arbitrarily wrong version number */
+#endif /* H5_HAVE_ROS3_VFD */
TESTING("programmatic ros3 fapl population");
#ifndef H5_HAVE_ROS3_VFD
- HDputs(" -SKIP-");
- HDputs(" Read-Only S3 VFD not enabled");
+ puts(" -SKIP-");
+ puts(" Read-Only S3 VFD not enabled");
fflush(stdout);
return 0;
#else
#if H5TOOLS_UTILS_TEST_DEBUG > 0
- show_progress = TRUE;
+ show_progress = true;
#endif /* H5TOOLS_UTILS_TEST_DEBUG */
assert(bad_version != H5FD_CURR_ROS3_FAPL_T_VERSION);
@@ -573,7 +573,7 @@ test_populate_ros3_fa(void)
/* NULL values pointer yields default fapl
*/
{
- H5FD_ros3_fapl_ext_t fa = {{bad_version, TRUE, "u", "v", "w"}, "x"};
+ H5FD_ros3_fapl_ext_t fa = {{bad_version, true, "u", "v", "w"}, "x"};
if (show_progress) {
printf("NULL values pointer\n");
@@ -581,7 +581,7 @@ test_populate_ros3_fa(void)
JSVERIFY(1, h5tools_populate_ros3_fapl(&fa, NULL), "NULL values pointer yields \"default\" fapl")
JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.fa.version, (char *)NULL)
- JSVERIFY(FALSE, fa.fa.authenticate, (char *)NULL)
+ JSVERIFY(false, fa.fa.authenticate, (char *)NULL)
JSVERIFY_STR("", fa.fa.aws_region, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_id, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_key, (char *)NULL)
@@ -592,7 +592,7 @@ test_populate_ros3_fa(void)
* yields default fapl
*/
{
- H5FD_ros3_fapl_ext_t fa = {{bad_version, TRUE, "u", "v", "w"}, "x"};
+ H5FD_ros3_fapl_ext_t fa = {{bad_version, true, "u", "v", "w"}, "x"};
const char *values[] = {"", "", "", ""};
if (show_progress) {
@@ -601,7 +601,7 @@ test_populate_ros3_fa(void)
JSVERIFY(1, h5tools_populate_ros3_fapl(&fa, values), "empty values yields \"default\" fapl")
JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.fa.version, (char *)NULL)
- JSVERIFY(FALSE, fa.fa.authenticate, (char *)NULL)
+ JSVERIFY(false, fa.fa.authenticate, (char *)NULL)
JSVERIFY_STR("", fa.fa.aws_region, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_id, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_key, (char *)NULL)
@@ -612,7 +612,7 @@ test_populate_ros3_fa(void)
* excess value is ignored
*/
{
- H5FD_ros3_fapl_ext_t fa = {{bad_version, FALSE, "a", "b", "c"}, "d"};
+ H5FD_ros3_fapl_ext_t fa = {{bad_version, false, "a", "b", "c"}, "d"};
const char *values[] = {"x", "y", "z", "a", "b"};
if (show_progress) {
@@ -621,7 +621,7 @@ test_populate_ros3_fa(void)
JSVERIFY(1, h5tools_populate_ros3_fapl(&fa, values), "four values")
JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.fa.version, (char *)NULL)
- JSVERIFY(TRUE, fa.fa.authenticate, (char *)NULL)
+ JSVERIFY(true, fa.fa.authenticate, (char *)NULL)
JSVERIFY_STR("x", fa.fa.aws_region, (char *)NULL)
JSVERIFY_STR("y", fa.fa.secret_id, (char *)NULL)
JSVERIFY_STR("z", fa.fa.secret_key, (char *)NULL)
@@ -632,7 +632,7 @@ test_populate_ros3_fa(void)
* yields default fapl
*/
{
- H5FD_ros3_fapl_ext_t fa = {{bad_version, FALSE, "a", "b", "c"}, "d"};
+ H5FD_ros3_fapl_ext_t fa = {{bad_version, false, "a", "b", "c"}, "d"};
const char *values[] = {NULL, "y", "z", ""};
if (show_progress) {
@@ -641,7 +641,7 @@ test_populate_ros3_fa(void)
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.fa.version, (char *)NULL)
- JSVERIFY(FALSE, fa.fa.authenticate, (char *)NULL)
+ JSVERIFY(false, fa.fa.authenticate, (char *)NULL)
JSVERIFY_STR("", fa.fa.aws_region, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_id, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_key, (char *)NULL)
@@ -652,7 +652,7 @@ test_populate_ros3_fa(void)
* yields default fapl
*/
{
- H5FD_ros3_fapl_ext_t fa = {{bad_version, FALSE, "a", "b", "c"}, "d"};
+ H5FD_ros3_fapl_ext_t fa = {{bad_version, false, "a", "b", "c"}, "d"};
const char *values[] = {"", "y", "z", ""};
if (show_progress) {
@@ -661,7 +661,7 @@ test_populate_ros3_fa(void)
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.fa.version, (char *)NULL)
- JSVERIFY(FALSE, fa.fa.authenticate, (char *)NULL)
+ JSVERIFY(false, fa.fa.authenticate, (char *)NULL)
JSVERIFY_STR("", fa.fa.aws_region, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_id, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_key, (char *)NULL)
@@ -672,7 +672,7 @@ test_populate_ros3_fa(void)
* yields default fapl
*/
{
- H5FD_ros3_fapl_ext_t fa = {{bad_version, FALSE, "a", "b", "c"}, "d"};
+ H5FD_ros3_fapl_ext_t fa = {{bad_version, false, "a", "b", "c"}, "d"};
const char *values[] = {"somewhere over the rainbow not too high "
"there is another rainbow bounding some darkened sky",
"y", "z", ""};
@@ -681,11 +681,11 @@ test_populate_ros3_fa(void)
printf("region overflow\n");
}
- assert(HDstrlen(values[0]) > H5FD_ROS3_MAX_REGION_LEN);
+ assert(strlen(values[0]) > H5FD_ROS3_MAX_REGION_LEN);
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.fa.version, (char *)NULL)
- JSVERIFY(FALSE, fa.fa.authenticate, (char *)NULL)
+ JSVERIFY(false, fa.fa.authenticate, (char *)NULL)
JSVERIFY_STR("", fa.fa.aws_region, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_id, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_key, (char *)NULL)
@@ -696,7 +696,7 @@ test_populate_ros3_fa(void)
* yields default fapl
*/
{
- H5FD_ros3_fapl_ext_t fa = {{bad_version, FALSE, "a", "b", "c"}, "d"};
+ H5FD_ros3_fapl_ext_t fa = {{bad_version, false, "a", "b", "c"}, "d"};
const char *values[] = {"x", NULL, "z", ""};
if (show_progress) {
@@ -705,7 +705,7 @@ test_populate_ros3_fa(void)
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.fa.version, (char *)NULL)
- JSVERIFY(FALSE, fa.fa.authenticate, (char *)NULL)
+ JSVERIFY(false, fa.fa.authenticate, (char *)NULL)
JSVERIFY_STR("", fa.fa.aws_region, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_id, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_key, (char *)NULL)
@@ -716,7 +716,7 @@ test_populate_ros3_fa(void)
* yields default fapl
*/
{
- H5FD_ros3_fapl_ext_t fa = {{bad_version, FALSE, "a", "b", "c"}, "d"};
+ H5FD_ros3_fapl_ext_t fa = {{bad_version, false, "a", "b", "c"}, "d"};
const char *values[] = {"x", "", "z", ""};
if (show_progress) {
@@ -725,7 +725,7 @@ test_populate_ros3_fa(void)
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.fa.version, (char *)NULL)
- JSVERIFY(FALSE, fa.fa.authenticate, (char *)NULL)
+ JSVERIFY(false, fa.fa.authenticate, (char *)NULL)
JSVERIFY_STR("", fa.fa.aws_region, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_id, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_key, (char *)NULL)
@@ -736,7 +736,7 @@ test_populate_ros3_fa(void)
* partial set: region
*/
{
- H5FD_ros3_fapl_ext_t fa = {{bad_version, FALSE, "a", "b", "c"}, "d"};
+ H5FD_ros3_fapl_ext_t fa = {{bad_version, false, "a", "b", "c"}, "d"};
const char *values[] = {"x",
"Why is it necessary to solve the problem? "
"What benefits will you receive by solving the problem? "
@@ -754,11 +754,11 @@ test_populate_ros3_fa(void)
printf("id overflow\n");
}
- assert(HDstrlen(values[1]) > H5FD_ROS3_MAX_SECRET_ID_LEN);
+ assert(strlen(values[1]) > H5FD_ROS3_MAX_SECRET_ID_LEN);
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.fa.version, (char *)NULL)
- JSVERIFY(FALSE, fa.fa.authenticate, (char *)NULL)
+ JSVERIFY(false, fa.fa.authenticate, (char *)NULL)
JSVERIFY_STR("x", fa.fa.aws_region, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_id, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_key, (char *)NULL)
@@ -769,7 +769,7 @@ test_populate_ros3_fa(void)
* yields default fapl
*/
{
- H5FD_ros3_fapl_ext_t fa = {{bad_version, FALSE, "a", "b", "c"}, "d"};
+ H5FD_ros3_fapl_ext_t fa = {{bad_version, false, "a", "b", "c"}, "d"};
const char *values[] = {"x", "y", NULL, ""};
if (show_progress) {
@@ -778,7 +778,7 @@ test_populate_ros3_fa(void)
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.fa.version, (char *)NULL)
- JSVERIFY(FALSE, fa.fa.authenticate, (char *)NULL)
+ JSVERIFY(false, fa.fa.authenticate, (char *)NULL)
JSVERIFY_STR("", fa.fa.aws_region, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_id, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_key, (char *)NULL)
@@ -789,7 +789,7 @@ test_populate_ros3_fa(void)
* yields default fapl
*/
{
- H5FD_ros3_fapl_ext_t fa = {{bad_version, FALSE, "a", "b", "c"}, "d"};
+ H5FD_ros3_fapl_ext_t fa = {{bad_version, false, "a", "b", "c"}, "d"};
const char *values[] = {"x", "y", "z", NULL};
if (show_progress) {
@@ -798,7 +798,7 @@ test_populate_ros3_fa(void)
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill token")
JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.fa.version, (char *)NULL)
- JSVERIFY(FALSE, fa.fa.authenticate, (char *)NULL)
+ JSVERIFY(false, fa.fa.authenticate, (char *)NULL)
JSVERIFY_STR("", fa.fa.aws_region, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_id, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_key, (char *)NULL)
@@ -809,7 +809,7 @@ test_populate_ros3_fa(void)
* yields authenticating fapl
*/
{
- H5FD_ros3_fapl_ext_t fa = {{bad_version, FALSE, "a", "b", "c"}, "d"};
+ H5FD_ros3_fapl_ext_t fa = {{bad_version, false, "a", "b", "c"}, "d"};
const char *values[] = {"x", "y", "", ""};
if (show_progress) {
@@ -818,7 +818,7 @@ test_populate_ros3_fa(void)
JSVERIFY(1, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.fa.version, (char *)NULL)
- JSVERIFY(TRUE, fa.fa.authenticate, (char *)NULL)
+ JSVERIFY(true, fa.fa.authenticate, (char *)NULL)
JSVERIFY_STR("x", fa.fa.aws_region, (char *)NULL)
JSVERIFY_STR("y", fa.fa.secret_id, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_key, (char *)NULL)
@@ -829,7 +829,7 @@ test_populate_ros3_fa(void)
* yields default fapl
*/
{
- H5FD_ros3_fapl_ext_t fa = {{bad_version, FALSE, "a", "b", "c"}, "d"};
+ H5FD_ros3_fapl_ext_t fa = {{bad_version, false, "a", "b", "c"}, "d"};
const char *values[] = {"", "y", "", ""};
if (show_progress) {
@@ -838,7 +838,7 @@ test_populate_ros3_fa(void)
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.fa.version, (char *)NULL)
- JSVERIFY(FALSE, fa.fa.authenticate, (char *)NULL)
+ JSVERIFY(false, fa.fa.authenticate, (char *)NULL)
JSVERIFY_STR("", fa.fa.aws_region, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_id, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_key, (char *)NULL)
@@ -849,7 +849,7 @@ test_populate_ros3_fa(void)
* yields default fapl
*/
{
- H5FD_ros3_fapl_ext_t fa = {{bad_version, FALSE, "a", "b", "c"}, "d"};
+ H5FD_ros3_fapl_ext_t fa = {{bad_version, false, "a", "b", "c"}, "d"};
const char *values[] = {"x", "", "", ""};
if (show_progress) {
@@ -858,7 +858,7 @@ test_populate_ros3_fa(void)
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.fa.version, (char *)NULL)
- JSVERIFY(FALSE, fa.fa.authenticate, (char *)NULL)
+ JSVERIFY(false, fa.fa.authenticate, (char *)NULL)
JSVERIFY_STR("", fa.fa.aws_region, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_id, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_key, (char *)NULL)
@@ -869,7 +869,7 @@ test_populate_ros3_fa(void)
* partial set: region, id
*/
{
- H5FD_ros3_fapl_ext_t fa = {{bad_version, FALSE, "a", "b", "c"}, "d"};
+ H5FD_ros3_fapl_ext_t fa = {{bad_version, false, "a", "b", "c"}, "d"};
const char *values[] = {"x", "y",
"Why is it necessary to solve the problem? "
"What benefits will you receive by solving the problem? "
@@ -887,11 +887,11 @@ test_populate_ros3_fa(void)
printf("key overflow\n");
}
- assert(HDstrlen(values[2]) > H5FD_ROS3_MAX_SECRET_KEY_LEN);
+ assert(strlen(values[2]) > H5FD_ROS3_MAX_SECRET_KEY_LEN);
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.fa.version, (char *)NULL)
- JSVERIFY(FALSE, fa.fa.authenticate, (char *)NULL)
+ JSVERIFY(false, fa.fa.authenticate, (char *)NULL)
JSVERIFY_STR("x", fa.fa.aws_region, (char *)NULL)
JSVERIFY_STR("y", fa.fa.secret_id, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_key, (char *)NULL)
@@ -965,7 +965,7 @@ test_set_configured_fapl(void)
hid_t fapl_id = H5I_INVALID_HID;
other_fa_t wrong_fa = {0x432, 0xf82, 0x9093};
#ifdef H5_HAVE_ROS3_VFD
- H5FD_ros3_fapl_ext_t ros3_anon_fa = {{1, FALSE, "", "", ""}, ""};
+ H5FD_ros3_fapl_ext_t ros3_anon_fa = {{1, false, "", "", ""}, ""};
#endif /* H5_HAVE_ROS3_VFD */
#ifdef H5_HAVE_LIBHDFS
H5FD_hdfs_fapl_t hdfs_fa = {
diff --git a/tools/src/h5copy/h5copy.c b/tools/src/h5copy/h5copy.c
index 2b28df3c42a..ef7e36f6532 100644
--- a/tools/src/h5copy/h5copy.c
+++ b/tools/src/h5copy/h5copy.c
@@ -156,25 +156,25 @@ parse_flag(const char *s_flag, unsigned *flag)
{
unsigned fla = 0;
- if (HDstrcmp(s_flag, "shallow") == 0) {
+ if (strcmp(s_flag, "shallow") == 0) {
fla = H5O_COPY_SHALLOW_HIERARCHY_FLAG;
}
- else if (HDstrcmp(s_flag, "soft") == 0) {
+ else if (strcmp(s_flag, "soft") == 0) {
fla = H5O_COPY_EXPAND_SOFT_LINK_FLAG;
}
- else if (HDstrcmp(s_flag, "ext") == 0) {
+ else if (strcmp(s_flag, "ext") == 0) {
fla = H5O_COPY_EXPAND_EXT_LINK_FLAG;
}
- else if (HDstrcmp(s_flag, "ref") == 0) {
+ else if (strcmp(s_flag, "ref") == 0) {
fla = H5O_COPY_EXPAND_REFERENCE_FLAG;
}
- else if (HDstrcmp(s_flag, "noattr") == 0) {
+ else if (strcmp(s_flag, "noattr") == 0) {
fla = H5O_COPY_WITHOUT_ATTR_FLAG;
}
- else if (HDstrcmp(s_flag, "allflags") == 0) {
+ else if (strcmp(s_flag, "allflags") == 0) {
fla = H5O_COPY_ALL;
}
- else if (HDstrcmp(s_flag, "nullmsg") == 0) {
+ else if (strcmp(s_flag, "nullmsg") == 0) {
fla = H5O_COPY_PRESERVE_NULL_FLAG;
}
else {
@@ -229,7 +229,7 @@ main(int argc, char *argv[])
while ((opt = H5_get_option(argc, (const char *const *)argv, s_opts, l_opts)) != EOF) {
switch ((char)opt) {
case 'd':
- oname_dst = HDstrdup(H5_optarg);
+ oname_dst = strdup(H5_optarg);
break;
case 'f':
@@ -238,7 +238,7 @@ main(int argc, char *argv[])
usage();
leave(EXIT_FAILURE);
}
- str_flag = HDstrdup(H5_optarg);
+ str_flag = strdup(H5_optarg);
break;
case 'h':
@@ -247,11 +247,11 @@ main(int argc, char *argv[])
break;
case 'i':
- fname_src = HDstrdup(H5_optarg);
+ fname_src = strdup(H5_optarg);
break;
case 'o':
- fname_dst = HDstrdup(H5_optarg);
+ fname_dst = strdup(H5_optarg);
break;
case 'p':
@@ -259,7 +259,7 @@ main(int argc, char *argv[])
break;
case 's':
- oname_src = HDstrdup(H5_optarg);
+ oname_src = strdup(H5_optarg);
break;
case 'V':
@@ -322,13 +322,13 @@ main(int argc, char *argv[])
/* Attempt to open an existing HDF5 file first. Need to open the dst file
before the src file just in case that the dst and src are the same file
*/
- fid_dst = h5tools_fopen(fname_dst, H5F_ACC_RDWR, H5P_DEFAULT, FALSE, NULL, 0);
+ fid_dst = h5tools_fopen(fname_dst, H5F_ACC_RDWR, H5P_DEFAULT, false, NULL, 0);
/*-------------------------------------------------------------------------
* open input file
*-------------------------------------------------------------------------*/
- fid_src = h5tools_fopen(fname_src, H5F_ACC_RDONLY, H5P_DEFAULT, FALSE, NULL, 0);
+ fid_src = h5tools_fopen(fname_src, H5F_ACC_RDONLY, H5P_DEFAULT, false, NULL, 0);
/*-------------------------------------------------------------------------
* test for error in opening input file
@@ -403,7 +403,7 @@ main(int argc, char *argv[])
/* error, if parent groups doesn't already exist in destination file */
size_t i, len;
- len = HDstrlen(oname_dst);
+ len = strlen(oname_dst);
/* check if all the parents groups exist. skip root group */
for (i = 1; i < len; i++) {
@@ -411,7 +411,7 @@ main(int argc, char *argv[])
char *str_ptr;
str_ptr = (char *)calloc(i + 1, sizeof(char));
- HDstrncpy(str_ptr, oname_dst, i);
+ strncpy(str_ptr, oname_dst, i);
str_ptr[i] = '\0';
if (H5Lexists(fid_dst, str_ptr, H5P_DEFAULT) <= 0) {
error_msg("group <%s> doesn't exist. Use -p to create parent groups.\n", str_ptr);
diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c
index 4854534a951..c66311fb1bb 100644
--- a/tools/src/h5diff/h5diff_common.c
+++ b/tools/src/h5diff/h5diff_common.c
@@ -198,7 +198,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
break;
case 'l':
- opts->follow_links = TRUE;
+ opts->follow_links = true;
break;
case 'x':
@@ -241,7 +241,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
break;
case 'C':
- opts->disable_compact_subset = TRUE;
+ opts->disable_compact_subset = true;
break;
case 'A':
@@ -323,13 +323,13 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
case '1':
opts->vol_info[0].type = VOL_BY_VALUE;
opts->vol_info[0].u.value = (H5VL_class_value_t)atoi(H5_optarg);
- opts->custom_vol[0] = TRUE;
+ opts->custom_vol[0] = true;
break;
case '2':
opts->vol_info[0].type = VOL_BY_NAME;
opts->vol_info[0].u.name = H5_optarg;
- opts->custom_vol[0] = TRUE;
+ opts->custom_vol[0] = true;
break;
case '3':
@@ -339,13 +339,13 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
case '4':
opts->vol_info[1].type = VOL_BY_VALUE;
opts->vol_info[1].u.value = (H5VL_class_value_t)atoi(H5_optarg);
- opts->custom_vol[1] = TRUE;
+ opts->custom_vol[1] = true;
break;
case '5':
opts->vol_info[1].type = VOL_BY_NAME;
opts->vol_info[1].u.name = H5_optarg;
- opts->custom_vol[1] = TRUE;
+ opts->custom_vol[1] = true;
break;
case '6':
@@ -355,13 +355,13 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
case '7':
opts->vfd_info[0].type = VFD_BY_VALUE;
opts->vfd_info[0].u.value = (H5FD_class_value_t)atoi(H5_optarg);
- opts->custom_vfd[0] = TRUE;
+ opts->custom_vfd[0] = true;
break;
case '8':
opts->vfd_info[0].type = VFD_BY_NAME;
opts->vfd_info[0].u.name = H5_optarg;
- opts->custom_vfd[0] = TRUE;
+ opts->custom_vfd[0] = true;
break;
case '9':
@@ -371,13 +371,13 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
case '0':
opts->vfd_info[1].type = VFD_BY_VALUE;
opts->vfd_info[1].u.value = (H5FD_class_value_t)atoi(H5_optarg);
- opts->custom_vfd[1] = TRUE;
+ opts->custom_vfd[1] = true;
break;
case 'Y':
opts->vfd_info[1].type = VFD_BY_NAME;
opts->vfd_info[1].u.name = H5_optarg;
- opts->custom_vfd[1] = TRUE;
+ opts->custom_vfd[1] = true;
break;
case 'Z':
@@ -387,7 +387,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
}
/* If file 1 uses the onion VFD, get the revision number */
- if (opts->vfd_info[0].u.name && !HDstrcmp(opts->vfd_info[0].u.name, "onion")) {
+ if (opts->vfd_info[0].u.name && !strcmp(opts->vfd_info[0].u.name, "onion")) {
if (opts->vfd_info[0].info) {
errno = 0;
onion_fa_g_1.revision_num = strtoull(opts->vfd_info[0].info, NULL, 10);
@@ -404,7 +404,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
}
/* If file 2 uses the onion VFD, get the revision number */
- if (opts->vfd_info[1].u.name && !HDstrcmp(opts->vfd_info[1].u.name, "onion")) {
+ if (opts->vfd_info[1].u.name && !strcmp(opts->vfd_info[1].u.name, "onion")) {
if (opts->vfd_info[1].info) {
errno = 0;
onion_fa_g_2.revision_num = strtoull(opts->vfd_info[1].info, NULL, 10);
@@ -512,7 +512,7 @@ check_n_input(const char *str)
unsigned i;
char c;
- for (i = 0; i < HDstrlen(str); i++) {
+ for (i = 0; i < strlen(str); i++) {
c = str[i];
if (i == 0) {
if (c < 49 || c > 57) /* ascii values between 1 and 9 */
@@ -541,7 +541,7 @@ check_p_input(const char *str)
* the atof return value on a hexadecimal input is different
* on some systems; we do a character check for this
*/
- if (HDstrlen(str) > 2 && str[0] == '0' && str[1] == 'x')
+ if (strlen(str) > 2 && str[0] == '0' && str[1] == 'x')
return -1;
x = atof(str);
@@ -568,7 +568,7 @@ check_d_input(const char *str)
* the atof return value on a hexadecimal input is different
* on some systems; we do a character check for this
*/
- if (HDstrlen(str) > 2 && str[0] == '0' && str[1] == 'x')
+ if (strlen(str) > 2 && str[0] == '0' && str[1] == 'x')
return -1;
x = atof(str);
diff --git a/tools/src/h5diff/ph5diff_main.c b/tools/src/h5diff/ph5diff_main.c
index c5f97df85ca..0f432610788 100644
--- a/tools/src/h5diff/ph5diff_main.c
+++ b/tools/src/h5diff/ph5diff_main.c
@@ -246,8 +246,8 @@ print_manager_output(void)
if (overflow_file) {
int tmp;
rewind(overflow_file);
- while ((tmp = HDgetc(overflow_file)) >= 0)
- HDputchar(tmp);
+ while ((tmp = getc(overflow_file)) >= 0)
+ putchar(tmp);
fclose(overflow_file);
overflow_file = NULL;
}
diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c
index 1458354319a..a1a6de0e119 100644
--- a/tools/src/h5dump/h5dump.c
+++ b/tools/src/h5dump/h5dump.c
@@ -18,24 +18,24 @@
#define PROGRAMNAME "h5dump"
const char *outfname_g = NULL;
-static hbool_t doxml_g = FALSE;
-static hbool_t useschema_g = TRUE;
+static bool doxml_g = false;
+static bool useschema_g = true;
static const char *xml_dtd_uri_g = NULL;
-static hbool_t use_custom_vol_g = FALSE;
-static hbool_t use_custom_vfd_g = FALSE;
+static bool use_custom_vol_g = false;
+static bool use_custom_vfd_g = false;
static h5tools_vol_info_t vol_info_g = {0};
static h5tools_vfd_info_t vfd_info_g = {0};
-static hbool_t get_onion_revision_count = FALSE;
+static bool get_onion_revision_count = false;
#ifdef H5_HAVE_ROS3_VFD
/* Default "anonymous" S3 configuration */
static H5FD_ros3_fapl_ext_t ros3_fa_g = {
{
1, /* Structure Version */
- FALSE, /* Authenticate? */
+ false, /* Authenticate? */
"", /* AWS Region */
"", /* Access Key ID */
"", /* Secret Access Key */
@@ -515,15 +515,15 @@ set_binary_form(const char *form)
{
int bform = -1;
- if (HDstrcmp(form, "NATIVE") == 0 || HDstrcmp(form, "MEMORY") == 0) {
+ if (strcmp(form, "NATIVE") == 0 || strcmp(form, "MEMORY") == 0) {
/* native form */
bform = 0;
}
- else if (HDstrcmp(form, "FILE") == 0) /* file type form */
+ else if (strcmp(form, "FILE") == 0) /* file type form */
bform = 1;
- else if (HDstrcmp(form, "LE") == 0) /* convert to little endian */
+ else if (strcmp(form, "LE") == 0) /* convert to little endian */
bform = 2;
- else if (HDstrcmp(form, "BE") == 0) /* convert to big endian */
+ else if (strcmp(form, "BE") == 0) /* convert to big endian */
bform = 3;
return bform;
@@ -544,9 +544,9 @@ set_sort_by(const char *form)
{
H5_index_t idx_type = H5_INDEX_UNKNOWN;
- if (HDstrcmp(form, "name") == 0) /* H5_INDEX_NAME */
+ if (strcmp(form, "name") == 0) /* H5_INDEX_NAME */
idx_type = H5_INDEX_NAME;
- else if (HDstrcmp(form, "creation_order") == 0) /* H5_INDEX_CRT_ORDER */
+ else if (strcmp(form, "creation_order") == 0) /* H5_INDEX_CRT_ORDER */
idx_type = H5_INDEX_CRT_ORDER;
return idx_type;
@@ -567,9 +567,9 @@ set_sort_order(const char *form)
{
H5_iter_order_t iter_order = H5_ITER_UNKNOWN;
- if (HDstrcmp(form, "ascending") == 0) /* H5_ITER_INC */
+ if (strcmp(form, "ascending") == 0) /* H5_ITER_INC */
iter_order = H5_ITER_INC;
- else if (HDstrcmp(form, "descending") == 0) /* H5_ITER_DEC */
+ else if (strcmp(form, "descending") == 0) /* H5_ITER_DEC */
iter_order = H5_ITER_DEC;
return iter_order;
@@ -752,7 +752,7 @@ parse_command_line(int argc, const char *const *argv)
struct handler_t *last_dset = NULL;
int i;
int opt;
- int last_was_dset = FALSE;
+ int last_was_dset = false;
/* no arguments */
if (argc == 1) {
@@ -770,50 +770,50 @@ parse_command_line(int argc, const char *const *argv)
parse_start:
switch ((char)opt) {
case 'R':
- dump_opts.display_region = TRUE;
- region_output = TRUE;
+ dump_opts.display_region = true;
+ region_output = true;
break;
case 'B':
- dump_opts.display_bb = TRUE;
- last_was_dset = FALSE;
+ dump_opts.display_bb = true;
+ last_was_dset = false;
break;
case 'n':
- dump_opts.display_fi = TRUE;
- last_was_dset = FALSE;
+ dump_opts.display_fi = true;
+ last_was_dset = false;
if (H5_optarg != NULL)
h5trav_set_verbose(atoi(H5_optarg));
break;
case 'p':
- dump_opts.display_dcpl = TRUE;
+ dump_opts.display_dcpl = true;
break;
case 'y':
- dump_opts.display_ai = FALSE;
+ dump_opts.display_ai = false;
break;
case 'e':
- dump_opts.display_escape = TRUE;
+ dump_opts.display_escape = true;
break;
case 'H':
- dump_opts.display_data = FALSE;
- dump_opts.display_attr_data = FALSE;
- last_was_dset = FALSE;
+ dump_opts.display_data = false;
+ dump_opts.display_attr_data = false;
+ last_was_dset = false;
break;
case 'A':
if (H5_optarg != NULL) {
if (0 == atoi(H5_optarg))
- dump_opts.include_attrs = FALSE;
+ dump_opts.include_attrs = false;
}
else {
- dump_opts.display_data = FALSE;
- dump_opts.display_attr_data = TRUE;
- last_was_dset = FALSE;
+ dump_opts.display_data = false;
+ dump_opts.display_attr_data = true;
+ last_was_dset = false;
}
break;
case 'i':
- dump_opts.display_oid = TRUE;
- last_was_dset = FALSE;
+ dump_opts.display_oid = true;
+ last_was_dset = false;
break;
case 'r':
- dump_opts.display_char = TRUE;
+ dump_opts.display_char = true;
break;
case 'V':
print_version(h5tools_getprogname());
@@ -829,7 +829,7 @@ parse_command_line(int argc, const char *const *argv)
h5tools_nCols = 65535;
else
h5tools_nCols = (unsigned)sh5tools_nCols;
- last_was_dset = FALSE;
+ last_was_dset = false;
} break;
case 'N':
dump_opts.display_all = 0;
@@ -837,11 +837,11 @@ parse_command_line(int argc, const char *const *argv)
for (i = 0; i < argc; i++)
if (!hand[i].func) {
hand[i].func = handle_paths;
- hand[i].obj = HDstrdup(H5_optarg);
+ hand[i].obj = strdup(H5_optarg);
break;
}
- last_was_dset = FALSE;
+ last_was_dset = false;
break;
case 'a':
dump_opts.display_all = 0;
@@ -849,11 +849,11 @@ parse_command_line(int argc, const char *const *argv)
for (i = 0; i < argc; i++)
if (!hand[i].func) {
hand[i].func = handle_attributes;
- hand[i].obj = HDstrdup(H5_optarg);
+ hand[i].obj = strdup(H5_optarg);
break;
}
- last_was_dset = FALSE;
+ last_was_dset = false;
break;
case 'd':
dump_opts.display_all = 0;
@@ -861,27 +861,27 @@ parse_command_line(int argc, const char *const *argv)
for (i = 0; i < argc; i++)
if (!hand[i].func) {
hand[i].func = handle_datasets;
- hand[i].obj = HDstrdup(H5_optarg);
+ hand[i].obj = strdup(H5_optarg);
if (!dump_opts.disable_compact_subset)
hand[i].subset_info = parse_subset_params(hand[i].obj);
last_dset = &hand[i];
break;
}
- last_was_dset = TRUE;
+ last_was_dset = true;
break;
case 'f':
vfd_info_g.type = VFD_BY_NAME;
vfd_info_g.u.name = H5_optarg;
- use_custom_vfd_g = TRUE;
+ use_custom_vfd_g = true;
#ifdef H5_HAVE_ROS3_VFD
- if (0 == HDstrcmp(vfd_info_g.u.name, drivernames[ROS3_VFD_IDX]))
+ if (0 == strcmp(vfd_info_g.u.name, drivernames[ROS3_VFD_IDX]))
if (!vfd_info_g.info)
vfd_info_g.info = &ros3_fa_g;
#endif
#ifdef H5_HAVE_LIBHDFS
- if (0 == HDstrcmp(vfd_info_g.u.name, drivernames[HDFS_VFD_IDX]))
+ if (0 == strcmp(vfd_info_g.u.name, drivernames[HDFS_VFD_IDX]))
if (!vfd_info_g.info)
vfd_info_g.info = &hdfs_fa_g;
#endif
@@ -893,11 +893,11 @@ parse_command_line(int argc, const char *const *argv)
for (i = 0; i < argc; i++)
if (!hand[i].func) {
hand[i].func = handle_groups;
- hand[i].obj = HDstrdup(H5_optarg);
+ hand[i].obj = strdup(H5_optarg);
break;
}
- last_was_dset = FALSE;
+ last_was_dset = false;
break;
case 'l':
dump_opts.display_all = 0;
@@ -905,11 +905,11 @@ parse_command_line(int argc, const char *const *argv)
for (i = 0; i < argc; i++)
if (!hand[i].func) {
hand[i].func = handle_links;
- hand[i].obj = HDstrdup(H5_optarg);
+ hand[i].obj = strdup(H5_optarg);
break;
}
- last_was_dset = FALSE;
+ last_was_dset = false;
break;
case 't':
dump_opts.display_all = 0;
@@ -917,11 +917,11 @@ parse_command_line(int argc, const char *const *argv)
for (i = 0; i < argc; i++)
if (!hand[i].func) {
hand[i].func = handle_datatypes;
- hand[i].obj = HDstrdup(H5_optarg);
+ hand[i].obj = strdup(H5_optarg);
break;
}
- last_was_dset = FALSE;
+ last_was_dset = false;
break;
case 'O':
@@ -953,8 +953,8 @@ parse_command_line(int argc, const char *const *argv)
}
}
- dump_opts.usingdasho = TRUE;
- last_was_dset = FALSE;
+ dump_opts.usingdasho = true;
+ last_was_dset = false;
outfname_g = H5_optarg;
break;
@@ -966,7 +966,7 @@ parse_command_line(int argc, const char *const *argv)
goto error;
}
}
- bin_output = TRUE;
+ bin_output = true;
if (outfname_g != NULL) {
if (h5tools_set_data_output_file(outfname_g, 1) < 0) {
/* failed to set output file */
@@ -974,7 +974,7 @@ parse_command_line(int argc, const char *const *argv)
goto error;
}
- last_was_dset = FALSE;
+ last_was_dset = false;
}
break;
@@ -1003,10 +1003,10 @@ parse_command_line(int argc, const char *const *argv)
usage(h5tools_getprogname());
goto error;
}
- dump_opts.display_packed_bits = TRUE;
+ dump_opts.display_packed_bits = true;
break;
case 'v':
- dump_opts.display_vds_first = TRUE;
+ dump_opts.display_vds_first = true;
break;
case 'G':
dump_opts.vds_gap_size = atoi(H5_optarg);
@@ -1019,15 +1019,15 @@ parse_command_line(int argc, const char *const *argv)
/** begin XML parameters **/
case 'x':
/* select XML output */
- doxml_g = TRUE;
- useschema_g = TRUE;
+ doxml_g = true;
+ useschema_g = true;
h5tools_dump_header_format = NULL;
dump_function_table = &xml_function_table;
h5tools_nCols = 0;
break;
case 'u':
- doxml_g = TRUE;
- useschema_g = FALSE;
+ doxml_g = true;
+ useschema_g = false;
xmlnsprefix = "";
h5tools_dump_header_format = NULL;
dump_function_table = &xml_function_table;
@@ -1053,7 +1053,7 @@ parse_command_line(int argc, const char *const *argv)
usage(h5tools_getprogname());
goto error;
}
- if (HDstrcmp(H5_optarg, ":") == 0)
+ if (strcmp(H5_optarg, ":") == 0)
xmlnsprefix = "";
else
xmlnsprefix = H5_optarg;
@@ -1131,7 +1131,7 @@ parse_command_line(int argc, const char *const *argv)
} while ((opt = H5_get_option(argc, argv, s_opts, l_opts)) != EOF);
end_collect:
- last_was_dset = FALSE;
+ last_was_dset = false;
if (opt != EOF)
goto parse_start;
@@ -1147,7 +1147,7 @@ parse_command_line(int argc, const char *const *argv)
enable_error_stack = 1;
break;
case 'C':
- dump_opts.disable_compact_subset = TRUE;
+ dump_opts.disable_compact_subset = true;
break;
case 'h':
usage(h5tools_getprogname());
@@ -1197,13 +1197,13 @@ parse_command_line(int argc, const char *const *argv)
case '1':
vol_info_g.type = VOL_BY_VALUE;
vol_info_g.u.value = (H5VL_class_value_t)atoi(H5_optarg);
- use_custom_vol_g = TRUE;
+ use_custom_vol_g = true;
break;
case '2':
vol_info_g.type = VOL_BY_NAME;
vol_info_g.u.name = H5_optarg;
- use_custom_vol_g = TRUE;
+ use_custom_vol_g = true;
break;
case '3':
@@ -1213,13 +1213,13 @@ parse_command_line(int argc, const char *const *argv)
case '4':
vfd_info_g.type = VFD_BY_VALUE;
vfd_info_g.u.value = (H5FD_class_value_t)atoi(H5_optarg);
- use_custom_vfd_g = TRUE;
+ use_custom_vfd_g = true;
break;
case '5':
vfd_info_g.type = VFD_BY_NAME;
vfd_info_g.u.name = H5_optarg;
- use_custom_vfd_g = TRUE;
+ use_custom_vfd_g = true;
break;
case '6':
@@ -1234,11 +1234,11 @@ parse_command_line(int argc, const char *const *argv)
}
/* If the file uses the onion VFD, get the revision number */
- if (vfd_info_g.u.name && !HDstrcmp(vfd_info_g.u.name, "onion")) {
+ if (vfd_info_g.u.name && !strcmp(vfd_info_g.u.name, "onion")) {
if (vfd_info_g.info) {
- if (!HDstrcmp(vfd_info_g.info, "revision_count"))
- get_onion_revision_count = TRUE;
+ if (!strcmp(vfd_info_g.info, "revision_count"))
+ get_onion_revision_count = true;
else {
errno = 0;
onion_fa_g.revision_num = strtoull(vfd_info_g.info, NULL, 10);
@@ -1333,7 +1333,7 @@ main(int argc, char *argv[])
h5tools_setstatus(EXIT_FAILURE);
goto done;
}
- else if (dump_opts.display_char == TRUE) {
+ else if (dump_opts.display_char == true) {
error_msg("option \"%s\" not available for XML\n", "--string");
h5tools_setstatus(EXIT_FAILURE);
goto done;
@@ -1373,7 +1373,7 @@ main(int argc, char *argv[])
}
while (H5_optind < argc) {
- fname = HDstrdup(argv[H5_optind++]);
+ fname = strdup(argv[H5_optind++]);
/* A short cut to get the revision count of an onion file without opening the file */
if (get_onion_revision_count && H5FD_ONION == H5Pget_driver(fapl_id)) {
@@ -1406,7 +1406,7 @@ main(int argc, char *argv[])
if (doxml_g) {
/* initialize XML */
/* reset prefix! */
- HDstrcpy(prefix, "");
+ strcpy(prefix, "");
/* make sure the URI is initialized to something */
if (xml_dtd_uri_g == NULL) {
@@ -1419,7 +1419,7 @@ main(int argc, char *argv[])
}
}
else {
- if (useschema_g && HDstrcmp(xmlnsprefix, "") != 0) {
+ if (useschema_g && strcmp(xmlnsprefix, "") != 0) {
error_msg(
"Cannot set Schema URL for a qualified namespace--use -X or -U option with -D \n");
h5tools_setstatus(EXIT_FAILURE);
@@ -1462,7 +1462,7 @@ main(int argc, char *argv[])
/* alternative first element, depending on schema or DTD. */
if (useschema_g) {
- if (HDstrcmp(xmlnsprefix, "") == 0) {
+ if (strcmp(xmlnsprefix, "") == 0) {
PRINTSTREAM(rawoutstream,
"\n",
@@ -1473,8 +1473,8 @@ main(int argc, char *argv[])
char *ns;
char *indx;
- ns = HDstrdup(xmlnsprefix);
- indx = HDstrrchr(ns, (int)':');
+ ns = strdup(xmlnsprefix);
+ indx = strrchr(ns, (int)':');
if (indx)
*indx = '\0';
@@ -1633,7 +1633,7 @@ init_prefix(char **prfx, size_t prfx_len)
void
add_prefix(char **prfx, size_t *prfx_len, const char *name)
{
- size_t new_len = HDstrlen(*prfx) + HDstrlen(name) + 2;
+ size_t new_len = strlen(*prfx) + strlen(name) + 2;
/* Check if we need more space */
if (*prfx_len <= new_len) {
@@ -1642,5 +1642,5 @@ add_prefix(char **prfx, size_t *prfx_len, const char *name)
}
/* Append object name to prefix */
- HDstrcat(HDstrcat(*prfx, "/"), name);
+ strcat(strcat(*prfx, "/"), name);
} /* end add_prefix */
diff --git a/tools/src/h5dump/h5dump.h b/tools/src/h5dump/h5dump.h
index 78776554589..5deb95190a9 100644
--- a/tools/src/h5dump/h5dump.h
+++ b/tools/src/h5dump/h5dump.h
@@ -54,7 +54,7 @@ table_t *group_table = NULL, *dset_table = NULL, *type_table = NULL;
unsigned dump_indent = 0; /* how far in to indent the line */
int unamedtype = 0; /* shared datatype with no name */
-hbool_t hit_elink = FALSE; /* whether we have traversed an external link */
+bool hit_elink = false; /* whether we have traversed an external link */
size_t prefix_len = 1024;
char *prefix = NULL;
const char *fp_format = NULL;
@@ -79,8 +79,8 @@ typedef struct {
int display_vds_first; /* vds display to all by default */
int vds_gap_size; /* vds skip missing files default is none */
} dump_opt_t;
-dump_opt_t dump_opts = {TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE,
- TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, 0};
+dump_opt_t dump_opts = {true, false, true, true, false, false, false, false, false,
+ true, false, false, false, false, true, false, 0};
#define PACKED_BITS_MAX 8 /* Maximum number of packed-bits to display */
#define PACKED_BITS_SIZE_MAX (8 * sizeof(long long)) /* Maximum bits size of integer types of packed-bits */
diff --git a/tools/src/h5dump/h5dump_ddl.c b/tools/src/h5dump/h5dump_ddl.c
index adc8585ac38..3b72faa6ddf 100644
--- a/tools/src/h5dump/h5dump_ddl.c
+++ b/tools/src/h5dump/h5dump_ddl.c
@@ -187,15 +187,15 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
outputformat = &string_dataformat;
/* Build the object's path name */
- obj_path = (char *)malloc(HDstrlen(prefix) + HDstrlen(name) + 2);
+ obj_path = (char *)malloc(strlen(prefix) + strlen(name) + 2);
if (!obj_path) {
ret = FAIL;
goto done;
}
- HDstrcpy(obj_path, prefix);
- HDstrcat(obj_path, "/");
- HDstrcat(obj_path, name);
+ strcpy(obj_path, prefix);
+ strcat(obj_path, "/");
+ strcat(obj_path, name);
if (linfo->type == H5L_TYPE_HARD) {
H5O_info2_t oinfo;
@@ -219,7 +219,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
char *old_prefix; /* Pointer to previous prefix */
/* Keep copy of prefix before iterating into group */
- old_prefix = HDstrdup(prefix);
+ old_prefix = strdup(prefix);
if (old_prefix) {
/* Append group name to prefix */
add_prefix(&prefix, &prefix_len, name);
@@ -228,7 +228,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
dump_function_table->dump_group_function(obj, name);
/* Restore old prefix name */
- HDstrcpy(prefix, old_prefix);
+ strcpy(prefix, old_prefix);
free(old_prefix);
}
else
@@ -262,7 +262,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
if (found_obj == NULL) {
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -274,17 +274,17 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
error_msg("internal error (file %s:line %d)\n", __FILE__, __LINE__);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
- if (HDstrlen(h5tools_dump_header_format->datasetblockend)) {
+ if (strlen(h5tools_dump_header_format->datasetblockend)) {
h5tools_str_append(&buffer, "%s",
h5tools_dump_header_format->datasetblockend);
- if (HDstrlen(h5tools_dump_header_format->datasetend))
+ if (strlen(h5tools_dump_header_format->datasetend))
h5tools_str_append(&buffer, " ");
}
- if (HDstrlen(h5tools_dump_header_format->datasetend))
+ if (strlen(h5tools_dump_header_format->datasetend))
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->datasetend);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
@@ -299,7 +299,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
goto done;
}
else if (found_obj->displayed) {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -311,7 +311,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -321,17 +321,17 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
- if (HDstrlen(h5tools_dump_header_format->datasetblockend)) {
+ if (strlen(h5tools_dump_header_format->datasetblockend)) {
h5tools_str_append(&buffer, "%s",
h5tools_dump_header_format->datasetblockend);
- if (HDstrlen(h5tools_dump_header_format->datasetend))
+ if (strlen(h5tools_dump_header_format->datasetend))
h5tools_str_append(&buffer, " ");
}
- if (HDstrlen(h5tools_dump_header_format->datasetend))
+ if (strlen(h5tools_dump_header_format->datasetend))
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->datasetend);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
@@ -342,7 +342,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
goto done;
}
else {
- found_obj->displayed = TRUE;
+ found_obj->displayed = true;
}
} /* end if */
@@ -392,7 +392,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
ret = FAIL;
}
else {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -411,7 +411,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
else {
/* print the value of a soft link */
/* Standard DDL: no modification */
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -422,16 +422,16 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
- if (HDstrlen(h5tools_dump_header_format->softlinkblockend)) {
+ if (strlen(h5tools_dump_header_format->softlinkblockend)) {
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->softlinkblockend);
- if (HDstrlen(h5tools_dump_header_format->softlinkend))
+ if (strlen(h5tools_dump_header_format->softlinkend))
h5tools_str_append(&buffer, " ");
}
- if (HDstrlen(h5tools_dump_header_format->softlinkend))
+ if (strlen(h5tools_dump_header_format->softlinkend))
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->softlinkend);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
@@ -447,7 +447,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
ret = FAIL;
}
else {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -475,7 +475,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
else {
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -483,7 +483,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -496,16 +496,16 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
ctx.indent_level--;
} /* end else */
} /* end else */
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
- if (HDstrlen(h5tools_dump_header_format->extlinkblockend)) {
+ if (strlen(h5tools_dump_header_format->extlinkblockend)) {
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->extlinkblockend);
- if (HDstrlen(h5tools_dump_header_format->extlinkend))
+ if (strlen(h5tools_dump_header_format->extlinkend))
h5tools_str_append(&buffer, " ");
}
- if (HDstrlen(h5tools_dump_header_format->extlinkend))
+ if (strlen(h5tools_dump_header_format->extlinkend))
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->extlinkend);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
@@ -518,7 +518,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
case H5L_TYPE_MAX:
case H5L_TYPE_HARD:
default:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -529,7 +529,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "LINKCLASS %d", linfo->type);
@@ -538,15 +538,15 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
- if (HDstrlen(h5tools_dump_header_format->udlinkblockend)) {
+ if (strlen(h5tools_dump_header_format->udlinkblockend)) {
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->udlinkblockend);
- if (HDstrlen(h5tools_dump_header_format->udlinkend))
+ if (strlen(h5tools_dump_header_format->udlinkend))
h5tools_str_append(&buffer, " ");
}
- if (HDstrlen(h5tools_dump_header_format->udlinkend))
+ if (strlen(h5tools_dump_header_format->udlinkend))
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->udlinkend);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
@@ -673,7 +673,7 @@ dump_named_datatype(hid_t tid, const char *name)
h5tools_setstatus(EXIT_FAILURE);
}
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -706,12 +706,12 @@ dump_named_datatype(hid_t tid, const char *name)
goto done;
}
else
- found_obj->displayed = TRUE;
+ found_obj->displayed = true;
} /* end if */
/* Render the element */
h5tools_str_reset(&buffer);
- h5tools_print_datatype(rawoutstream, &buffer, outputformat, &ctx, tid, FALSE);
+ h5tools_print_datatype(rawoutstream, &buffer, outputformat, &ctx, tid, false);
if (H5Tget_class(tid) != H5T_COMPOUND) {
h5tools_str_append(&buffer, ";");
@@ -730,12 +730,12 @@ dump_named_datatype(hid_t tid, const char *name)
done:
/* Render the element */
h5tools_str_reset(&buffer);
- if (HDstrlen(h5tools_dump_header_format->datatypeblockend)) {
+ if (strlen(h5tools_dump_header_format->datatypeblockend)) {
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->datatypeblockend);
- if (HDstrlen(h5tools_dump_header_format->datatypeend))
+ if (strlen(h5tools_dump_header_format->datatypeend))
h5tools_str_append(&buffer, " ");
}
- if (HDstrlen(h5tools_dump_header_format->datatypeend))
+ if (strlen(h5tools_dump_header_format->datatypeend))
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->datatypeend);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
@@ -813,7 +813,7 @@ dump_group(hid_t gid, const char *name)
string_dataformat.do_escape = dump_opts.display_escape;
outputformat = &string_dataformat;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -825,7 +825,7 @@ dump_group(hid_t gid, const char *name)
ctx.indent_level++;
dump_indent += COL;
- if (!HDstrcmp(name, "/") && unamedtype) {
+ if (!strcmp(name, "/") && unamedtype) {
unsigned u; /* Local index variable */
/* dump unnamed type in root group */
@@ -837,7 +837,7 @@ dump_group(hid_t gid, const char *name)
type = H5Dget_type(dset);
H5Otoken_to_str(dset, &type_table->objs[u].obj_token, &obj_tok_str);
- HDsnprintf(type_name, sizeof(type_name), "#%s", obj_tok_str);
+ snprintf(type_name, sizeof(type_name), "#%s", obj_tok_str);
H5free_memory(obj_tok_str);
dump_function_table->dump_named_datatype_function(type, type_name);
@@ -863,7 +863,7 @@ dump_group(hid_t gid, const char *name)
h5tools_setstatus(EXIT_FAILURE);
}
else if (found_obj->displayed) {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -872,7 +872,7 @@ dump_group(hid_t gid, const char *name)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
}
else {
- found_obj->displayed = TRUE;
+ found_obj->displayed = true;
attr_iteration(gid, attr_crt_order_flags);
link_iteration(gid, crt_order_flags);
}
@@ -881,16 +881,16 @@ dump_group(hid_t gid, const char *name)
dump_indent -= COL;
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
- if (HDstrlen(h5tools_dump_header_format->groupblockend)) {
+ if (strlen(h5tools_dump_header_format->groupblockend)) {
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->groupblockend);
- if (HDstrlen(h5tools_dump_header_format->groupend))
+ if (strlen(h5tools_dump_header_format->groupend))
h5tools_str_append(&buffer, " ");
}
- if (HDstrlen(h5tools_dump_header_format->groupend))
+ if (strlen(h5tools_dump_header_format->groupend))
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->groupend);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
@@ -955,7 +955,7 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset)
/* setup */
memset(&buffer, 0, sizeof(h5tools_str_t));
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
/* Render the element */
@@ -1003,7 +1003,7 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset)
data_loop = packed_bits_num;
for (u = 0; u < data_loop; u++) {
if (dump_opts.display_packed_bits) {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1018,7 +1018,7 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset)
case H5T_TIME:
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1039,7 +1039,7 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset)
case H5T_ENUM:
case H5T_VLEN:
case H5T_ARRAY: {
- h5tools_dump_data(rawoutstream, outputformat, &ctx, did, TRUE);
+ h5tools_dump_data(rawoutstream, outputformat, &ctx, did, true);
} break;
case H5T_NO_CLASS:
@@ -1058,17 +1058,17 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset)
ctx.indent_level--;
dump_indent -= COL;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
/* Render the element */
h5tools_str_reset(&buffer);
- if (HDstrlen(h5tools_dump_header_format->datasetblockend)) {
+ if (strlen(h5tools_dump_header_format->datasetblockend)) {
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->datasetblockend);
- if (HDstrlen(h5tools_dump_header_format->datasetend))
+ if (strlen(h5tools_dump_header_format->datasetend))
h5tools_str_append(&buffer, " ");
}
- if (HDstrlen(h5tools_dump_header_format->datasetend))
+ if (strlen(h5tools_dump_header_format->datasetend))
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->datasetend);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
@@ -1090,7 +1090,7 @@ dump_data(hid_t obj_id, int obj_data, struct subset_t *sset, int display_index)
h5tools_context_t ctx; /* print context */
h5tool_format_t *outputformat = &h5tools_dataformat;
h5tool_format_t string_dataformat;
- int print_dataset = FALSE;
+ int print_dataset = false;
string_dataformat = *outputformat;
@@ -1117,7 +1117,7 @@ dump_data(hid_t obj_id, int obj_data, struct subset_t *sset, int display_index)
ctx.display_char = dump_opts.display_char;
if (obj_data == DATASET_DATA)
- print_dataset = TRUE;
+ print_dataset = true;
h5tools_dump_data(rawoutstream, outputformat, &ctx, obj_id, print_dataset);
}
@@ -1137,7 +1137,7 @@ dump_fcpl(hid_t fid)
size_t off_size; /* size of offsets in the file */
size_t len_size; /* size of lengths in the file */
H5F_fspace_strategy_t fs_strategy; /* file space strategy */
- hbool_t fs_persist; /* Persisting free-space or not */
+ bool fs_persist; /* Persisting free-space or not */
hsize_t fs_threshold; /* free-space section threshold */
hsize_t fsp_size; /* file space page size */
H5F_info2_t finfo; /* file information */
@@ -1202,25 +1202,25 @@ dump_fcpl(hid_t fid)
#ifdef SHOW_FILE_DRIVER
if (H5FD_CORE == fdriver)
- HDstrcpy(dname, "H5FD_CORE");
+ strcpy(dname, "H5FD_CORE");
#ifdef H5_HAVE_DIRECT
else if (H5FD_DIRECT == fdriver)
- HDstrcpy(dname, "H5FD_DIRECT");
+ strcpy(dname, "H5FD_DIRECT");
#endif
else if (H5FD_FAMILY == fdriver)
- HDstrcpy(dname, "H5FD_FAMILY");
+ strcpy(dname, "H5FD_FAMILY");
else if (H5FD_LOG == fdriver)
- HDstrcpy(dname, "H5FD_LOG");
+ strcpy(dname, "H5FD_LOG");
else if (H5FD_MPIO == fdriver)
- HDstrcpy(dname, "H5FD_MPIO");
+ strcpy(dname, "H5FD_MPIO");
else if (H5FD_MULTI == fdriver)
- HDstrcpy(dname, "H5FD_MULTI");
+ strcpy(dname, "H5FD_MULTI");
else if (H5FD_SEC2 == fdriver)
- HDstrcpy(dname, "H5FD_SEC2");
+ strcpy(dname, "H5FD_SEC2");
else if (H5FD_STDIO == fdriver)
- HDstrcpy(dname, "H5FD_STDIO");
+ strcpy(dname, "H5FD_STDIO");
else
- HDstrcpy(dname, "Unknown driver");
+ strcpy(dname, "Unknown driver");
/* Take out this because the driver used can be different from the
* standard output. */
@@ -1311,7 +1311,7 @@ attr_search(hid_t oid, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *a
const char *buf = attr_data->path;
const char *op_name = attr_data->op_name;
- j = (int)HDstrlen(op_name) - 1;
+ j = (int)strlen(op_name) - 1;
/* find the last / */
while (j >= 0) {
if (op_name[j] == '/' && (j == 0 || (op_name[j - 1] != '\\')))
@@ -1326,12 +1326,12 @@ attr_search(hid_t oid, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *a
ret = FAIL;
}
else {
- if (HDstrcmp(attr_name, obj_op_name) == 0) {
+ if (strcmp(attr_name, obj_op_name) == 0) {
size_t u, v, w;
/* object name */
- u = HDstrlen(buf);
- v = HDstrlen(op_name);
+ u = strlen(buf);
+ v = strlen(op_name);
w = u + 1 + v + 1 + 2;
obj_name = (char *)malloc(w);
if (obj_name == NULL) {
@@ -1343,16 +1343,16 @@ attr_search(hid_t oid, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *a
memset(obj_name, '\0', w);
if (op_name[0] != '/') {
- HDstrncat(obj_name, buf, buffer_space);
+ strncat(obj_name, buf, buffer_space);
buffer_space -= MIN(buffer_space, u);
if (buf[u - 1] != '/') {
- HDstrncat(obj_name, "/", buffer_space);
+ strncat(obj_name, "/", buffer_space);
buffer_space -= MIN(buffer_space, 2);
}
}
- HDstrncat(obj_name, op_name, buffer_space);
+ strncat(obj_name, op_name, buffer_space);
buffer_space -= MIN(buffer_space, v);
handle_attributes(oid, obj_name, NULL, 0, NULL);
@@ -1377,7 +1377,7 @@ obj_search(const char *path, const H5O_info2_t *oi, const char H5_ATTR_UNUSED *a
H5Aiterate_by_name(handle_data->fid, path, H5_INDEX_NAME, H5_ITER_INC, NULL, attr_search,
(void *)&attr_data, H5P_DEFAULT);
- if (HDstrcmp(path, op_name) == 0) {
+ if (strcmp(path, op_name) == 0) {
switch (oi->type) {
case H5O_TYPE_GROUP:
handle_groups(handle_data->fid, path, NULL, 0, NULL);
@@ -1412,7 +1412,7 @@ lnk_search(const char *path, const H5L_info2_t *li, void *_op_data)
trav_handle_udata_t *handle_data = (trav_handle_udata_t *)_op_data;
const char *op_name = handle_data->op_name;
- search_len = HDstrlen(op_name);
+ search_len = strlen(op_name);
if (search_len > 0 && op_name[0] != '/')
k = 2;
else
@@ -1424,14 +1424,14 @@ lnk_search(const char *path, const H5L_info2_t *li, void *_op_data)
}
else {
if (k == 2) {
- HDstrcpy(search_name, "/");
- HDstrcat(search_name, op_name);
+ strcpy(search_name, "/");
+ strcat(search_name, op_name);
}
else
- HDstrcpy(search_name, op_name);
+ strcpy(search_name, op_name);
search_name[search_len + k - 1] = '\0';
- if (HDstrcmp(path, search_name) == 0) {
+ if (strcmp(path, search_name) == 0) {
switch (li->type) {
case H5L_TYPE_SOFT:
case H5L_TYPE_EXTERNAL:
@@ -1500,7 +1500,7 @@ handle_paths(hid_t fid, const char *path_name, void H5_ATTR_UNUSED *data, int H5
handle_udata.fid = fid;
handle_udata.op_name = path_name;
- if (h5trav_visit(fid, "/", TRUE, TRUE, obj_search, lnk_search, &handle_udata, H5O_INFO_BASIC) < 0) {
+ if (h5trav_visit(fid, "/", true, true, obj_search, lnk_search, &handle_udata, H5O_INFO_BASIC) < 0) {
error_msg("error traversing information\n");
h5tools_setstatus(EXIT_FAILURE);
}
@@ -1530,7 +1530,7 @@ handle_attributes(hid_t fid, const char *attr, void H5_ATTR_UNUSED *data, int H5
h5tool_format_t string_dataformat;
hsize_t curr_pos = 0; /* total data element position */
- j = (int)HDstrlen(attr) - 1;
+ j = (int)strlen(attr) - 1;
obj_name = (char *)malloc((size_t)j + 2);
if (obj_name == NULL)
goto error;
@@ -1544,9 +1544,9 @@ handle_attributes(hid_t fid, const char *attr, void H5_ATTR_UNUSED *data, int H5
/* object name */
if (j == -1)
- HDstrcpy(obj_name, "/");
+ strcpy(obj_name, "/");
else {
- HDstrncpy(obj_name, attr, (size_t)j + 1);
+ strncpy(obj_name, attr, (size_t)j + 1);
obj_name[j + 1] = '\0';
} /* end else */
@@ -1581,7 +1581,7 @@ handle_attributes(hid_t fid, const char *attr, void H5_ATTR_UNUSED *data, int H5
/* setup */
memset(&buffer, 0, sizeof(h5tools_str_t));
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1592,15 +1592,15 @@ handle_attributes(hid_t fid, const char *attr, void H5_ATTR_UNUSED *data, int H5
error_msg("unable to open object \"%s\"\n", obj_name);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
- if (HDstrlen(h5tools_dump_header_format->attributeblockend)) {
+ if (strlen(h5tools_dump_header_format->attributeblockend)) {
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->attributeblockend);
- if (HDstrlen(h5tools_dump_header_format->attributeend))
+ if (strlen(h5tools_dump_header_format->attributeend))
h5tools_str_append(&buffer, " ");
}
- if (HDstrlen(h5tools_dump_header_format->attributeend))
+ if (strlen(h5tools_dump_header_format->attributeend))
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->attributeend);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
@@ -1802,7 +1802,7 @@ handle_datasets(hid_t fid, const char *dset, void *data, int pe, const char *dis
end_obj(h5tools_dump_header_format->datasetend, h5tools_dump_header_format->datasetblockend);
}
else {
- found_obj->displayed = TRUE;
+ found_obj->displayed = true;
dump_indent += COL;
dump_dataset(dsetid, real_name, sset);
dump_indent -= COL;
@@ -1849,14 +1849,14 @@ handle_groups(hid_t fid, const char *group, void H5_ATTR_UNUSED *data, int pe, c
}
}
else {
- size_t new_len = HDstrlen(group) + 1;
+ size_t new_len = strlen(group) + 1;
if (prefix_len <= new_len) {
prefix_len = new_len;
prefix = (char *)realloc(prefix, prefix_len);
} /* end if */
- HDstrcpy(prefix, group);
+ strcpy(prefix, group);
dump_indent += COL;
dump_group(gid, real_name);
@@ -1978,10 +1978,10 @@ handle_datatypes(hid_t fid, const char *type, void H5_ATTR_UNUSED *data, int pe,
/* unnamed datatype */
H5Otoken_to_str(fid, &type_table->objs[idx].obj_token, &obj_tok_str);
- HDsnprintf(name, sizeof(name), "/#%s", obj_tok_str);
+ snprintf(name, sizeof(name), "/#%s", obj_tok_str);
H5free_memory(obj_tok_str);
- if (!HDstrcmp(name, real_name))
+ if (!strcmp(name, real_name))
break;
} /* end if */
@@ -2042,7 +2042,7 @@ dump_extlink(hid_t group, const char *linkname, const char *objname)
table_t *old_group_table = group_table;
table_t *old_dset_table = dset_table;
table_t *old_type_table = type_table;
- hbool_t old_hit_elink;
+ bool old_hit_elink;
ssize_t idx;
/* Open target object */
@@ -2073,7 +2073,7 @@ dump_extlink(hid_t group, const char *linkname, const char *objname)
/* We will now traverse the external link, set this global to indicate this */
old_hit_elink = hit_elink;
- hit_elink = TRUE;
+ hit_elink = true;
/* add some indentation to distinguish that these objects are external */
dump_indent += COL;
diff --git a/tools/src/h5dump/h5dump_defines.h b/tools/src/h5dump/h5dump_defines.h
index 5f891782934..f82dee5b303 100644
--- a/tools/src/h5dump/h5dump_defines.h
+++ b/tools/src/h5dump/h5dump_defines.h
@@ -32,12 +32,12 @@
#define end_obj(obj, end) \
do { \
- if (HDstrlen(end)) { \
+ if (strlen(end)) { \
PRINTSTREAM(rawoutstream, "%s", end); \
- if (HDstrlen(obj)) \
+ if (strlen(obj)) \
PRINTVALSTREAM(rawoutstream, " "); \
} \
- if (HDstrlen(obj)) \
+ if (strlen(obj)) \
PRINTSTREAM(rawoutstream, "%s", obj); \
} while (0)
diff --git a/tools/src/h5dump/h5dump_extern.h b/tools/src/h5dump/h5dump_extern.h
index 3c4c7727ac9..723a39edc4c 100644
--- a/tools/src/h5dump/h5dump_extern.h
+++ b/tools/src/h5dump/h5dump_extern.h
@@ -52,7 +52,7 @@ extern table_t *group_table, *dset_table, *type_table;
extern unsigned dump_indent; /* how far in to indent the line */
extern int unamedtype; /* shared datatype with no name */
-extern hbool_t hit_elink; /* whether we have traversed an external link */
+extern bool hit_elink; /* whether we have traversed an external link */
extern size_t prefix_len;
extern char *prefix;
extern const char *fp_format;
diff --git a/tools/src/h5dump/h5dump_xml.c b/tools/src/h5dump/h5dump_xml.c
index cb279e37342..93fc3b02768 100644
--- a/tools/src/h5dump/h5dump_xml.c
+++ b/tools/src/h5dump/h5dump_xml.c
@@ -164,15 +164,15 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
outputformat = &string_dataformat;
/* Build the object's path name */
- obj_path = (char *)malloc(HDstrlen(prefix) + HDstrlen(name) + 2);
+ obj_path = (char *)malloc(strlen(prefix) + strlen(name) + 2);
if (!obj_path) {
ret = FAIL;
goto done;
}
- HDstrcpy(obj_path, prefix);
- HDstrcat(obj_path, "/");
- HDstrcat(obj_path, name);
+ strcpy(obj_path, prefix);
+ strcat(obj_path, "/");
+ strcat(obj_path, name);
if (linfo->type == H5L_TYPE_HARD) {
H5O_info2_t oinfo;
@@ -196,7 +196,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
char *old_prefix; /* Pointer to previous prefix */
/* Keep copy of prefix before iterating into group */
- if ((old_prefix = HDstrdup(prefix)) == NULL) {
+ if ((old_prefix = strdup(prefix)) == NULL) {
error_msg("unable to allocate buffer\n");
h5tools_setstatus(EXIT_FAILURE);
ret = FAIL;
@@ -209,7 +209,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
dump_function_table->dump_group_function(obj, name);
/* Restore old prefix name */
- HDstrcpy(prefix, old_prefix);
+ strcpy(prefix, old_prefix);
free(old_prefix);
}
@@ -228,7 +228,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
if (found_obj == NULL) {
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -240,17 +240,17 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
error_msg("internal error (file %s:line %d)\n", __FILE__, __LINE__);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
- if (HDstrlen(h5tools_dump_header_format->datasetblockend)) {
+ if (strlen(h5tools_dump_header_format->datasetblockend)) {
h5tools_str_append(&buffer, "%s",
h5tools_dump_header_format->datasetblockend);
- if (HDstrlen(h5tools_dump_header_format->datasetend))
+ if (strlen(h5tools_dump_header_format->datasetend))
h5tools_str_append(&buffer, " ");
}
- if (HDstrlen(h5tools_dump_header_format->datasetend))
+ if (strlen(h5tools_dump_header_format->datasetend))
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->datasetend);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
@@ -265,7 +265,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
else if (found_obj->displayed) {
/* the XML version */
char *t_obj_path = xml_escape_the_name(obj_path);
- char *t_prefix = xml_escape_the_name(HDstrcmp(prefix, "") ? prefix : "/");
+ char *t_prefix = xml_escape_the_name(strcmp(prefix, "") ? prefix : "/");
char *t_name = xml_escape_the_name(name);
char *t_objname = xml_escape_the_name(found_obj->objname);
char dsetxid[100];
@@ -276,7 +276,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
xml_name_to_XID(obj, obj_path, dsetxid, (int)sizeof(dsetxid), 1);
xml_name_to_XID(obj, prefix, parentxid, (int)sizeof(parentxid), 1);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -296,7 +296,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -307,7 +307,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -324,7 +324,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
goto done;
}
else
- found_obj->displayed = TRUE;
+ found_obj->displayed = true;
} /* end if */
dump_function_table->dump_dataset_function(obj, name, NULL);
@@ -380,19 +380,19 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
char linkxid[100];
char parentxid[100];
char targetxid[100];
- char *t_prefix = xml_escape_the_name(HDstrcmp(prefix, "") ? prefix : "/");
+ char *t_prefix = xml_escape_the_name(strcmp(prefix, "") ? prefix : "/");
char *t_name = xml_escape_the_name(name);
char *t_targbuf = xml_escape_the_name(targbuf);
char *t_obj_path = xml_escape_the_name(obj_path);
char *t_link_path;
int res;
- t_link_path = (char *)malloc(HDstrlen(prefix) + linfo->u.val_size + 1);
+ t_link_path = (char *)malloc(strlen(prefix) + linfo->u.val_size + 1);
if (targbuf[0] == '/')
- HDstrcpy(t_link_path, targbuf);
+ strcpy(t_link_path, targbuf);
else {
- HDstrcpy(t_link_path, prefix);
- HDstrcat(HDstrcat(t_link_path, "/"), targbuf);
+ strcpy(t_link_path, prefix);
+ strcat(strcat(t_link_path, "/"), targbuf);
} /* end else */
/* Create OBJ-XIDs for the parent and object */
@@ -403,7 +403,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
res = xml_name_to_XID(group, t_link_path, targetxid, (int)sizeof(targetxid), 0);
if (res == 0) {
/* target obj found */
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -425,7 +425,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
}
else {
/* dangling link -- omit from xml attributes */
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -481,7 +481,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
char linkxid[100];
char parentxid[100];
char *t_name = xml_escape_the_name(name);
- char *t_prefix = xml_escape_the_name(HDstrcmp(prefix, "") ? prefix : "/");
+ char *t_prefix = xml_escape_the_name(strcmp(prefix, "") ? prefix : "/");
char *t_obj_path = xml_escape_the_name(obj_path);
char *t_filename = xml_escape_the_name(filename);
char *t_targname = xml_escape_the_name(targname);
@@ -490,7 +490,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
xml_name_to_XID(group, t_obj_path, linkxid, (int)sizeof(linkxid), 1);
xml_name_to_XID(group, prefix, parentxid, (int)sizeof(parentxid), 1);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -529,14 +529,14 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
char linkxid[100];
char parentxid[100];
char *t_name = xml_escape_the_name(name);
- char *t_prefix = xml_escape_the_name(HDstrcmp(prefix, "") ? prefix : "/");
+ char *t_prefix = xml_escape_the_name(strcmp(prefix, "") ? prefix : "/");
char *t_obj_path = xml_escape_the_name(obj_path);
/* Create OBJ-XIDs for the parent and object */
xml_name_to_XID(group, t_obj_path, linkxid, (int)sizeof(linkxid), 1);
xml_name_to_XID(group, prefix, parentxid, (int)sizeof(parentxid), 1);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -593,14 +593,14 @@ xml_name_to_XID(hid_t loc_id, const char *str, char *outstr, int outlen, int gen
lookup_ret = ref_path_table_lookup(str, &obj_token);
if (lookup_ret < 0) {
- if (HDstrlen(str) == 0) {
+ if (strlen(str) == 0) {
lookup_ret = ref_path_table_lookup("/", &obj_token);
if (lookup_ret < 0) {
if (gen) {
ref_path_table_gen_fake(str, &obj_token);
H5Otoken_to_str(loc_id, &obj_token, &obj_tok_str);
- HDsnprintf(outstr, (size_t)outlen, "xid_%s", obj_tok_str);
+ snprintf(outstr, (size_t)outlen, "xid_%s", obj_tok_str);
H5free_memory(obj_tok_str);
return 0;
@@ -615,7 +615,7 @@ xml_name_to_XID(hid_t loc_id, const char *str, char *outstr, int outlen, int gen
ref_path_table_gen_fake(str, &obj_token);
H5Otoken_to_str(loc_id, &obj_token, &obj_tok_str);
- HDsnprintf(outstr, (size_t)outlen, "xid_%s", obj_tok_str);
+ snprintf(outstr, (size_t)outlen, "xid_%s", obj_tok_str);
H5free_memory(obj_tok_str);
return 0;
@@ -627,7 +627,7 @@ xml_name_to_XID(hid_t loc_id, const char *str, char *outstr, int outlen, int gen
}
H5Otoken_to_str(loc_id, &obj_token, &obj_tok_str);
- HDsnprintf(outstr, (size_t)outlen, "xid_%s", obj_tok_str);
+ snprintf(outstr, (size_t)outlen, "xid_%s", obj_tok_str);
H5free_memory(obj_tok_str);
return 0;
@@ -664,26 +664,26 @@ xml_escape_the_name(const char *str)
return NULL;
cp = str;
- len = HDstrlen(str);
+ len = strlen(str);
extra = 0;
for (i = 0; i < len; i++) {
if (*cp == '\"')
- extra += (HDstrlen(quote) - 1);
+ extra += (strlen(quote) - 1);
else if (*cp == '\'')
- extra += (HDstrlen(apos) - 1);
+ extra += (strlen(apos) - 1);
else if (*cp == '<')
- extra += (HDstrlen(lt) - 1);
+ extra += (strlen(lt) - 1);
else if (*cp == '>')
- extra += (HDstrlen(gt) - 1);
+ extra += (strlen(gt) - 1);
else if (*cp == '&')
- extra += (HDstrlen(amp) - 1);
+ extra += (strlen(amp) - 1);
cp++;
}
if (extra == 0)
- return HDstrdup(str);
+ return strdup(str);
cp = str;
ncp_len = len + extra + 1;
@@ -696,24 +696,24 @@ xml_escape_the_name(const char *str)
size_t esc_len;
if (*cp == '\'') {
- HDstrncpy(ncp, apos, ncp_len);
- esc_len = HDstrlen(apos);
+ strncpy(ncp, apos, ncp_len);
+ esc_len = strlen(apos);
}
else if (*cp == '<') {
- HDstrncpy(ncp, lt, ncp_len);
- esc_len = HDstrlen(lt);
+ strncpy(ncp, lt, ncp_len);
+ esc_len = strlen(lt);
}
else if (*cp == '>') {
- HDstrncpy(ncp, gt, ncp_len);
- esc_len = HDstrlen(gt);
+ strncpy(ncp, gt, ncp_len);
+ esc_len = strlen(gt);
}
else if (*cp == '\"') {
- HDstrncpy(ncp, quote, ncp_len);
- esc_len = HDstrlen(quote);
+ strncpy(ncp, quote, ncp_len);
+ esc_len = strlen(quote);
}
else if (*cp == '&') {
- HDstrncpy(ncp, amp, ncp_len);
- esc_len = HDstrlen(amp);
+ strncpy(ncp, amp, ncp_len);
+ esc_len = strlen(amp);
}
else {
*ncp = *cp;
@@ -755,7 +755,7 @@ xml_escape_the_string(const char *str, int slen)
cp = str;
if (slen < 0)
- len = HDstrlen(str);
+ len = strlen(str);
else
len = (size_t)slen;
@@ -767,13 +767,13 @@ xml_escape_the_string(const char *str, int slen)
else if (*cp == '\"')
extra++;
else if (*cp == '\'')
- extra += (HDstrlen(apos) - 1);
+ extra += (strlen(apos) - 1);
else if (*cp == '<')
- extra += (HDstrlen(lt) - 1);
+ extra += (strlen(lt) - 1);
else if (*cp == '>')
- extra += (HDstrlen(gt) - 1);
+ extra += (strlen(gt) - 1);
else if (*cp == '&')
- extra += (HDstrlen(amp) - 1);
+ extra += (strlen(amp) - 1);
cp++;
}
@@ -800,20 +800,20 @@ xml_escape_the_string(const char *str, int slen)
esc_len = 1;
}
else if (*cp == '\'') {
- HDstrncpy(ncp, apos, ncp_len);
- esc_len = HDstrlen(apos);
+ strncpy(ncp, apos, ncp_len);
+ esc_len = strlen(apos);
}
else if (*cp == '<') {
- HDstrncpy(ncp, lt, ncp_len);
- esc_len = HDstrlen(lt);
+ strncpy(ncp, lt, ncp_len);
+ esc_len = strlen(lt);
}
else if (*cp == '>') {
- HDstrncpy(ncp, gt, ncp_len);
- esc_len = HDstrlen(gt);
+ strncpy(ncp, gt, ncp_len);
+ esc_len = strlen(gt);
}
else if (*cp == '&') {
- HDstrncpy(ncp, amp, ncp_len);
- esc_len = HDstrlen(amp);
+ strncpy(ncp, amp, ncp_len);
+ esc_len = strlen(amp);
}
else {
*ncp = *cp;
@@ -865,7 +865,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
size_t mpos;
size_t msize;
int nmembs;
- htri_t is_vlstr = FALSE;
+ htri_t is_vlstr = false;
h5tools_str_t buffer; /* string into which to render */
h5tools_context_t ctx; /* print context */
h5tool_format_t *outputformat = &xml_dataformat;
@@ -915,7 +915,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
/* 'anonymous' NDT. Use it's object num.
as it's name. */
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -927,7 +927,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
/* point to the NDT by name */
char *t_objname = xml_escape_the_name(found_obj->objname);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -940,7 +940,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
free(dtxid);
}
else {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -953,7 +953,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
else {
switch (H5Tget_class(type)) {
case H5T_INTEGER:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -966,7 +966,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
ord = H5Tget_order(type);
sgn = H5Tget_sign(type);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1011,7 +1011,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1027,7 +1027,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
MantissaBits="mb" MantissaLocation="ml" /> */
ord = H5Tget_order(type);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1036,7 +1036,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1072,7 +1072,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1082,7 +1082,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
break;
case H5T_TIME:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1091,7 +1091,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1101,7 +1101,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
h5tools_str_append(&buffer, "");
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1117,7 +1117,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
cset = H5Tget_cset(type);
is_vlstr = H5Tis_variable_str(type);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1127,7 +1127,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1155,7 +1155,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1168,7 +1168,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
/* */
ord = H5Tget_order(type);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1177,7 +1177,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1204,7 +1204,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1216,7 +1216,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
case H5T_OPAQUE:
/* */
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1226,7 +1226,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
ctx.indent_level++;
mname = H5Tget_tag(type);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1238,7 +1238,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1253,7 +1253,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
/* type of a dataset */
nmembers = (unsigned)H5Tget_nmembers(type);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1273,7 +1273,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
mtype = H5Tget_member_type(type, i);
t_fname = xml_escape_the_name(mname);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1286,7 +1286,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
dump_indent += COL;
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1299,7 +1299,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
dump_indent -= COL;
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1309,7 +1309,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
dump_indent -= COL;
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1320,7 +1320,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
dump_indent -= COL;
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1330,7 +1330,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
break;
case H5T_REFERENCE:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1340,7 +1340,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
ctx.indent_level++;
/* Only Object references supported at this time */
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1349,7 +1349,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1358,7 +1358,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1367,7 +1367,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1380,7 +1380,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
/* list Name, values of enum */
nmembs = H5Tget_nmembers(type);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1390,7 +1390,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
dump_indent += COL;
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1399,7 +1399,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
xml_print_enum(type);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1409,7 +1409,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
dump_indent -= COL;
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1419,7 +1419,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
break;
case H5T_VLEN:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1430,7 +1430,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
dump_indent += COL;
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1443,7 +1443,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
dump_indent -= COL;
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1453,7 +1453,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
dump_indent -= COL;
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1469,7 +1469,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
super = H5Tget_super(type);
/* Print lead-in */
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1485,7 +1485,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
/* list of dimensions */
ctx.indent_level++;
for (i = 0; i < ndims; i++) {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1499,7 +1499,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
dump_indent += COL;
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1512,7 +1512,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
dump_indent -= COL;
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1522,7 +1522,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
dump_indent -= COL;
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1536,7 +1536,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
case H5T_NO_CLASS:
case H5T_NCLASSES:
default:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1617,7 +1617,7 @@ xml_dump_datatype(hid_t type)
use it's object ref as its name
*/
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1629,7 +1629,7 @@ xml_dump_datatype(hid_t type)
/* pointer to a named datatype already in XML */
char *t_objname = xml_escape_the_name(found_obj->objname);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1642,7 +1642,7 @@ xml_dump_datatype(hid_t type)
free(dtxid);
}
else {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1652,7 +1652,7 @@ xml_dump_datatype(hid_t type)
}
}
else {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1665,7 +1665,7 @@ xml_dump_datatype(hid_t type)
ctx.indent_level--;
dump_indent -= COL;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1729,7 +1729,7 @@ xml_dump_dataspace(hid_t space)
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1742,7 +1742,7 @@ xml_dump_dataspace(hid_t space)
case H5S_SCALAR:
/* scalar dataspace (just a tag, no XML attrs. defined */
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1755,7 +1755,7 @@ xml_dump_dataspace(hid_t space)
/* simple dataspace */
/* */
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1767,7 +1767,7 @@ xml_dump_dataspace(hid_t space)
ctx.indent_level++;
for (i = 0; i < ndims; i++) {
if (maxsize[i] == H5S_UNLIMITED) {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1778,7 +1778,7 @@ xml_dump_dataspace(hid_t space)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
}
else if (maxsize[i] == (hsize_t)0) {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1789,7 +1789,7 @@ xml_dump_dataspace(hid_t space)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
}
else {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1802,7 +1802,7 @@ xml_dump_dataspace(hid_t space)
}
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1816,7 +1816,7 @@ xml_dump_dataspace(hid_t space)
case H5S_NULL:
/* null dataspace (just a tag, no XML attrs. defined */
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1829,7 +1829,7 @@ xml_dump_dataspace(hid_t space)
case H5S_NULL:
case H5S_NO_CLASS:
default:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1840,7 +1840,7 @@ xml_dump_dataspace(hid_t space)
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1904,7 +1904,7 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED *sset,
string_dataformat.arr_pre = "";
outputformat = &string_dataformat;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1914,7 +1914,7 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED *sset,
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1936,7 +1936,7 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED *sset,
else {
h5tools_context_t datactx;
memset(&datactx, 0, sizeof(datactx));
- datactx.need_prefix = TRUE;
+ datactx.need_prefix = true;
datactx.indent_level = ctx.indent_level;
datactx.cur_column = ctx.cur_column;
status = h5tools_dump_dset(rawoutstream, outputformat, &datactx, obj_id);
@@ -1966,7 +1966,7 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED *sset,
else {
h5tools_context_t datactx;
memset(&datactx, 0, sizeof(datactx));
- datactx.need_prefix = TRUE;
+ datactx.need_prefix = true;
datactx.indent_level = ctx.indent_level;
datactx.cur_column = ctx.cur_column;
status = h5tools_dump_mem(rawoutstream, outputformat, &datactx, obj_id);
@@ -1980,7 +1980,7 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED *sset,
if (status == FAIL) {
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1997,7 +1997,7 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED *sset,
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2007,7 +2007,7 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED *sset,
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2067,7 +2067,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
string_dataformat.do_escape = dump_opts.display_escape;
outputformat = &string_dataformat;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2103,7 +2103,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
ctx.indent_level++;
dump_indent += COL;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2111,7 +2111,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2119,7 +2119,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2127,7 +2127,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2135,7 +2135,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2148,7 +2148,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
break;
case H5T_COMPOUND:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2159,7 +2159,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
break;
case H5T_REFERENCE:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2167,7 +2167,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
if (!H5Tequal(type, H5T_STD_REF_OBJ)) {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2175,7 +2175,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2184,7 +2184,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
}
else {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2194,7 +2194,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
xml_print_refs(attr_id, ATTRIBUTE_DATA);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2203,7 +2203,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
}
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2213,7 +2213,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
break;
case H5T_VLEN:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2226,7 +2226,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
case H5T_NO_CLASS:
case H5T_NCLASSES:
default:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2234,7 +2234,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2242,7 +2242,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2250,7 +2250,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2263,7 +2263,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
else {
/* The case of an attribute never yet written ??
* Or dataspace is H5S_NULL. */
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2273,7 +2273,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2283,7 +2283,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2298,7 +2298,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
H5Sclose(space);
H5Aclose(attr_id);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2313,7 +2313,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
/* ?? failed */
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2323,7 +2323,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2362,7 +2362,7 @@ xml_dump_named_datatype(hid_t type, const char *name)
char *t_prefix = NULL;
char *t_name = NULL;
- tmp = (char *)malloc(HDstrlen(prefix) + HDstrlen(name) + 2);
+ tmp = (char *)malloc(strlen(prefix) + strlen(name) + 2);
if (tmp == NULL) {
indentation(dump_indent);
error_msg("internal error (file %s:line %d)\n", __FILE__, __LINE__);
@@ -2370,9 +2370,9 @@ xml_dump_named_datatype(hid_t type, const char *name)
goto done;
}
- HDstrcpy(tmp, prefix);
- HDstrcat(tmp, "/");
- HDstrcat(tmp, name);
+ strcpy(tmp, prefix);
+ strcat(tmp, "/");
+ strcat(tmp, name);
/* setup */
memset(&buffer, 0, sizeof(h5tools_str_t));
@@ -2406,7 +2406,7 @@ xml_dump_named_datatype(hid_t type, const char *name)
xml_name_to_XID(type, tmp, dtxid, 100, 1);
xml_name_to_XID(type, prefix, parentxid, 100, 1);
- if (HDstrncmp(name, "#", (size_t)1) == 0) {
+ if (strncmp(name, "#", (size_t)1) == 0) {
/* Special: this is an 'anonymous' NDT, deleted but
still in use.
We follow the dumper's undocumented practice, and
@@ -2416,21 +2416,21 @@ xml_dump_named_datatype(hid_t type, const char *name)
the future.
*/
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer,
"<%sNamedDataType Name=\"%s\" OBJ-XID=\"%s\" "
"Parents=\"%s\" H5ParentPaths=\"%s\">",
- xmlnsprefix, name, dtxid, parentxid, HDstrcmp(prefix, "") ? t_prefix : "/");
+ xmlnsprefix, name, dtxid, parentxid, strcmp(prefix, "") ? t_prefix : "/");
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
}
else {
H5O_info2_t oinfo; /* Object info */
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2438,7 +2438,7 @@ xml_dump_named_datatype(hid_t type, const char *name)
"<%sNamedDataType Name=\"%s\" OBJ-XID=\"%s\" "
"H5Path=\"%s\" Parents=\"%s\" H5ParentPaths=\"%s\">",
xmlnsprefix, t_name, dtxid, t_tmp, parentxid,
- (HDstrcmp(prefix, "") ? t_prefix : "/"));
+ (strcmp(prefix, "") ? t_prefix : "/"));
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
@@ -2467,7 +2467,7 @@ xml_dump_named_datatype(hid_t type, const char *name)
xml_name_to_XID(type, found_obj->objname, pointerxid, (int)sizeof(pointerxid), 1);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2478,7 +2478,7 @@ xml_dump_named_datatype(hid_t type, const char *name)
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2489,14 +2489,14 @@ xml_dump_named_datatype(hid_t type, const char *name)
goto done;
}
else
- found_obj->displayed = TRUE;
+ found_obj->displayed = true;
}
}
ctx.indent_level++;
dump_indent += COL;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2510,7 +2510,7 @@ xml_dump_named_datatype(hid_t type, const char *name)
ctx.indent_level--;
dump_indent -= COL;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2521,7 +2521,7 @@ xml_dump_named_datatype(hid_t type, const char *name)
ctx.indent_level--;
dump_indent -= COL;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2617,12 +2617,12 @@ xml_dump_group(hid_t gid, const char *name)
string_dataformat.do_escape = dump_opts.display_escape;
outputformat = &string_dataformat;
- if (HDstrcmp(name, "/") == 0) {
+ if (strcmp(name, "/") == 0) {
isRoot = 1;
- tmp = HDstrdup("/");
+ tmp = strdup("/");
}
else {
- tmp = (char *)malloc(HDstrlen(prefix) + HDstrlen(name) + 2);
+ tmp = (char *)malloc(strlen(prefix) + strlen(name) + 2);
if (tmp == NULL) {
indentation(dump_indent);
error_msg("internal error (file %s:line %d)\n", __FILE__, __LINE__);
@@ -2630,11 +2630,11 @@ xml_dump_group(hid_t gid, const char *name)
return;
}
- HDstrcpy(tmp, prefix);
- par = HDstrdup(tmp);
- cp = HDstrrchr(par, '/');
+ strcpy(tmp, prefix);
+ par = strdup(tmp);
+ cp = strrchr(par, '/');
if (cp) {
- if ((cp == par) && HDstrlen(par) > 1)
+ if ((cp == par) && strlen(par) > 1)
*(cp + 1) = '\0';
else
*cp = '\0';
@@ -2667,7 +2667,7 @@ xml_dump_group(hid_t gid, const char *name)
/* probably can't happen! */
xml_name_to_XID(gid, "/", grpxid, 100, 1);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2682,7 +2682,7 @@ xml_dump_group(hid_t gid, const char *name)
xml_name_to_XID(gid, tmp, grpxid, 100, 1);
xml_name_to_XID(gid, par, parentxid, 100, 1);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2703,7 +2703,7 @@ xml_dump_group(hid_t gid, const char *name)
xml_name_to_XID(gid, found_obj->objname, ptrstr, 100, 1);
xml_name_to_XID(gid, par, parentxid, 100, 1);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2727,7 +2727,7 @@ xml_dump_group(hid_t gid, const char *name)
if (isRoot) {
xml_name_to_XID(gid, "/", grpxid, 100, 1);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2743,7 +2743,7 @@ xml_dump_group(hid_t gid, const char *name)
xml_name_to_XID(gid, tmp, grpxid, 100, 1);
xml_name_to_XID(gid, par, parentxid, 100, 1);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2757,7 +2757,7 @@ xml_dump_group(hid_t gid, const char *name)
free(t_tmp);
free(par_name);
}
- found_obj->displayed = TRUE;
+ found_obj->displayed = true;
/* 1. do all the attributes of the group */
@@ -2791,7 +2791,7 @@ xml_dump_group(hid_t gid, const char *name)
type = H5Dget_type(dset);
H5Otoken_to_str(dset, &type_table->objs[u].obj_token, &obj_tok_str);
- HDsnprintf(type_name, sizeof(type_name), "#%s", obj_tok_str);
+ snprintf(type_name, sizeof(type_name), "#%s", obj_tok_str);
H5free_memory(obj_tok_str);
dump_function_table->dump_named_datatype_function(type, type_name);
@@ -2822,7 +2822,7 @@ xml_dump_group(hid_t gid, const char *name)
char *grpxid = (char *)malloc((size_t)100);
char *parentxid = (char *)malloc((size_t)100);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2884,7 +2884,7 @@ xml_dump_group(hid_t gid, const char *name)
type = H5Dget_type(dset);
H5Otoken_to_str(dset, &type_table->objs[u].obj_token, &obj_tok_str);
- HDsnprintf(type_name, sizeof(type_name), "#%s", obj_tok_str);
+ snprintf(type_name, sizeof(type_name), "#%s", obj_tok_str);
H5free_memory(obj_tok_str);
dump_function_table->dump_named_datatype_function(type, type_name);
@@ -2905,7 +2905,7 @@ xml_dump_group(hid_t gid, const char *name)
ctx.indent_level--;
}
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3026,7 +3026,7 @@ xml_print_refs(hid_t did, int source)
ctx.indent_level++;
if (!path) {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3037,7 +3037,7 @@ xml_print_refs(hid_t did, int source)
else {
char *t_path = xml_escape_the_string(path, -1);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3089,7 +3089,7 @@ xml_print_strs(hid_t did, int source)
hid_t type = H5I_INVALID_HID;
hid_t space = H5I_INVALID_HID;
hssize_t ssiz = -1;
- htri_t is_vlstr = FALSE;
+ htri_t is_vlstr = false;
size_t tsiz = 0;
hsize_t i;
size_t str_size = 0;
@@ -3181,15 +3181,15 @@ xml_print_strs(hid_t did, int source)
if (is_vlstr) {
onestring = *(char **)((void *)bp);
if (onestring)
- str_size = HDstrlen(onestring);
+ str_size = strlen(onestring);
}
else {
- HDstrncpy(onestring, bp, tsiz);
+ strncpy(onestring, bp, tsiz);
str_size = tsiz;
}
if (!onestring) {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3200,7 +3200,7 @@ xml_print_strs(hid_t did, int source)
else {
char *t_onestring = xml_escape_the_string(onestring, (int)str_size);
if (t_onestring) {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
/* Render the element */
@@ -3300,7 +3300,7 @@ check_filters(hid_t dcpl)
namebuf, NULL);
if (filter == H5Z_FILTER_DEFLATE) {
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3319,7 +3319,7 @@ check_filters(hid_t dcpl)
}
else if (filter == H5Z_FILTER_FLETCHER32) {
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3330,7 +3330,7 @@ check_filters(hid_t dcpl)
}
else if (filter == H5Z_FILTER_SHUFFLE) {
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3342,7 +3342,7 @@ check_filters(hid_t dcpl)
else if (filter == H5Z_FILTER_SZIP) {
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3436,7 +3436,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
ctx.indent_level++;
dump_indent += COL;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3454,7 +3454,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
if (H5Tget_class(type) == H5T_REFERENCE) {
const char *path = lookup_ref_path(*(H5R_ref_t *)buf);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3462,7 +3462,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
if (!path) {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3473,7 +3473,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
else {
char *t_path = xml_escape_the_string(path, -1);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3483,7 +3483,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
free(t_path);
}
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3495,7 +3495,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
}
else if (H5Tget_class(type) == H5T_STRING) {
/* ????? */
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3503,7 +3503,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3515,7 +3515,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
/* all other data */
switch (H5Tget_class(type)) {
case H5T_INTEGER:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3523,7 +3523,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
/* Render the element */
@@ -3532,7 +3532,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3541,7 +3541,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
break;
case H5T_FLOAT:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3549,7 +3549,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
/* Render the element */
@@ -3558,7 +3558,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3568,7 +3568,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
break;
case H5T_BITFIELD:
case H5T_OPAQUE:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3577,7 +3577,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
sz = H5Tget_size(type);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
/* Render the element */
@@ -3593,7 +3593,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3602,7 +3602,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
break;
case H5T_ENUM:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3611,7 +3611,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
name = H5Tget_member_name(type, *(unsigned *)buf);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
/* Render the element */
@@ -3621,7 +3621,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
if (name)
H5free_memory(name);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3630,7 +3630,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
break;
case H5T_ARRAY:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3638,7 +3638,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3647,7 +3647,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
break;
case H5T_TIME:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3655,7 +3655,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3664,7 +3664,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
break;
case H5T_COMPOUND:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3672,7 +3672,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3681,7 +3681,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
break;
case H5T_VLEN:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3689,7 +3689,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3702,7 +3702,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
case H5T_STRING:
case H5T_REFERENCE:
default:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3710,7 +3710,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3724,7 +3724,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
ctx.indent_level--;
dump_indent -= COL;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3773,7 +3773,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
char *rstr = (char *)malloc((size_t)100);
char *pstr = (char *)malloc((size_t)100);
- tmp = (char *)malloc(HDstrlen(prefix) + HDstrlen(name) + 2);
+ tmp = (char *)malloc(strlen(prefix) + strlen(name) + 2);
if (tmp == NULL) {
error_msg("buffer allocation failed\n");
h5tools_setstatus(EXIT_FAILURE);
@@ -3782,9 +3782,9 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
return;
}
- HDstrcpy(tmp, prefix);
- HDstrcat(tmp, "/");
- HDstrcat(tmp, name);
+ strcpy(tmp, prefix);
+ strcat(tmp, "/");
+ strcat(tmp, name);
/* setup */
memset(&buffer, 0, sizeof(h5tools_str_t));
@@ -3817,7 +3817,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
xml_name_to_XID(did, tmp, rstr, 100, 1);
xml_name_to_XID(did, prefix, pstr, 100, 1);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3852,7 +3852,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
ctx.indent_level++;
dump_indent += COL;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3862,7 +3862,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
ctx.indent_level++;
dump_indent += COL;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3877,7 +3877,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
for (i = 0; i < ndims; i++) {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3887,7 +3887,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
}
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3901,7 +3901,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
ctx.indent_level--;
dump_indent -= COL;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3912,7 +3912,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
ctx.indent_level--;
dump_indent -= COL;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3922,7 +3922,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
ctx.indent_level--;
dump_indent -= COL;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3937,7 +3937,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
else if (H5D_CONTIGUOUS == H5Pget_layout(dcpl)) {
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3946,7 +3946,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3955,7 +3955,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3967,7 +3967,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
else if (H5D_COMPACT == H5Pget_layout(dcpl)) {
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3976,7 +3976,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3985,7 +3985,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4001,7 +4001,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
ctx.indent_level++;
dump_indent += COL;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4050,7 +4050,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
ctx.indent_level++;
dump_indent += COL;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4063,7 +4063,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
(fvstatus == H5D_FILL_VALUE_DEFAULT && ft == H5D_FILL_TIME_IFSET)) {
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4076,7 +4076,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
xml_dump_fill_value(dcpl, type);
}
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4087,7 +4087,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
ctx.indent_level--;
dump_indent -= COL;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4142,7 +4142,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
case H5T_TIME:
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4150,7 +4150,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4158,7 +4158,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4166,7 +4166,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4178,7 +4178,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
break;
case H5T_COMPOUND:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4194,7 +4194,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
break;
case H5T_REFERENCE:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4202,7 +4202,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
if (!H5Tequal(type, H5T_STD_REF_OBJ)) {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4210,7 +4210,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4219,7 +4219,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
}
else {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4229,7 +4229,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
xml_print_refs(did, DATASET_DATA);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4238,7 +4238,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
}
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4250,7 +4250,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
case H5T_VLEN:
ctx.indent_level--;
dump_indent -= COL;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4269,7 +4269,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
case H5T_NO_CLASS:
case H5T_NCLASSES:
default:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4277,7 +4277,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4285,7 +4285,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4293,7 +4293,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4307,7 +4307,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
/* no data written */
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4316,7 +4316,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4325,7 +4325,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4339,7 +4339,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
H5Sclose(space);
H5Pclose(dcpl);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4404,7 +4404,7 @@ xml_print_enum(hid_t type)
nmembs = (unsigned)H5Tget_nmembers(type);
super = H5Tget_super(type);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4414,7 +4414,7 @@ xml_print_enum(hid_t type)
xml_print_datatype(super, 0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4465,7 +4465,7 @@ xml_print_enum(hid_t type)
for (i = 0; i < nmembs; i++) {
char *t_name = xml_escape_the_name(name[i]);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4473,7 +4473,7 @@ xml_print_enum(hid_t type)
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
/* Render the element */
@@ -4484,7 +4484,7 @@ xml_print_enum(hid_t type)
free(t_name);
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4492,7 +4492,7 @@ xml_print_enum(hid_t type)
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4500,7 +4500,7 @@ xml_print_enum(hid_t type)
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
/* Render the element */
@@ -4527,7 +4527,7 @@ xml_print_enum(hid_t type)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
diff --git a/tools/src/h5format_convert/h5format_convert.c b/tools/src/h5format_convert/h5format_convert.c
index 96aab9b1263..0ac4f3a6d37 100644
--- a/tools/src/h5format_convert/h5format_convert.c
+++ b/tools/src/h5format_convert/h5format_convert.c
@@ -25,8 +25,8 @@
static char *fname_g = NULL;
static char *dname_g = NULL;
-static int dset_g = FALSE;
-static int noop_g = FALSE;
+static int dset_g = false;
+static int noop_g = false;
static int verbose_g = 0;
/*
@@ -114,23 +114,23 @@ parse_command_line(int argc, const char *const *argv)
goto error;
case 'v':
- verbose_g = TRUE;
+ verbose_g = true;
break;
case 'd': /* -d dname */
if (H5_optarg != NULL && *H5_optarg)
- dname_g = HDstrdup(H5_optarg);
+ dname_g = strdup(H5_optarg);
if (dname_g == NULL) {
h5tools_setstatus(EXIT_FAILURE);
error_msg("No dataset name `%s`\n", H5_optarg);
usage(h5tools_getprogname());
goto error;
}
- dset_g = TRUE;
+ dset_g = true;
break;
case 'n': /* -n */
- noop_g = TRUE;
+ noop_g = true;
break;
case 'E':
@@ -152,7 +152,7 @@ parse_command_line(int argc, const char *const *argv)
goto error;
}
- fname_g = HDstrdup(argv[H5_optind]);
+ fname_g = strdup(argv[H5_optind]);
return 0;
@@ -399,7 +399,7 @@ main(int argc, char *argv[])
h5tools_error_report();
/* Open the HDF5 file */
- if ((fid = h5tools_fopen(fname_g, H5F_ACC_RDWR, H5P_DEFAULT, FALSE, NULL, 0)) < 0) {
+ if ((fid = h5tools_fopen(fname_g, H5F_ACC_RDWR, H5P_DEFAULT, false, NULL, 0)) < 0) {
error_msg("unable to open file \"%s\"\n", fname_g);
h5tools_setstatus(EXIT_FAILURE);
goto done;
@@ -416,7 +416,7 @@ main(int argc, char *argv[])
else { /* Convert all datasets in the file */
if (verbose_g)
fprintf(stdout, "Processing all datasets in the file...\n");
- if (h5trav_visit(fid, "/", TRUE, TRUE, convert_dsets_cb, NULL, &fid, H5O_INFO_BASIC) < 0)
+ if (h5trav_visit(fid, "/", true, true, convert_dsets_cb, NULL, &fid, H5O_INFO_BASIC) < 0)
goto done;
} /* end else */
diff --git a/tools/src/h5import/h5import.c b/tools/src/h5import/h5import.c
index 2a89bccd773..2d3574a2f83 100644
--- a/tools/src/h5import/h5import.c
+++ b/tools/src/h5import/h5import.c
@@ -73,7 +73,7 @@ int
main(int argc, char *argv[])
{
struct Options *opt;
- int outfile_named = FALSE;
+ int outfile_named = false;
int token;
int i;
int state = 0;
@@ -104,7 +104,7 @@ main(int argc, char *argv[])
if ((opt = (struct Options *)calloc(1, sizeof(struct Options))) == NULL)
goto err;
- if (argv[1] && (HDstrcmp("-V", argv[1]) == 0)) {
+ if (argv[1] && (strcmp("-V", argv[1]) == 0)) {
print_version(PROGRAMNAME);
exit(EXIT_SUCCESS);
}
@@ -133,7 +133,7 @@ main(int argc, char *argv[])
case 1: /* counting input files */
if (opt->fcount < 29) {
- (void)HDstrcpy(opt->infiles[opt->fcount].datafile, argv[i]);
+ (void)strcpy(opt->infiles[opt->fcount].datafile, argv[i]);
in = &(opt->infiles[opt->fcount].in);
opt->infiles[opt->fcount].config = 0;
setDefaultValues(in, opt->fcount);
@@ -150,7 +150,7 @@ main(int argc, char *argv[])
break;
case 3: /* get configfile name */
- (void)HDstrcpy(opt->infiles[opt->fcount - 1].configfile, argv[i]);
+ (void)strcpy(opt->infiles[opt->fcount - 1].configfile, argv[i]);
opt->infiles[opt->fcount - 1].config = 1;
break;
@@ -158,12 +158,12 @@ main(int argc, char *argv[])
break;
case 5: /* get outfile found */
- if (HDstrlen(argv[i]) > MAX_PATH_NAME_LENGTH) {
+ if (strlen(argv[i]) > MAX_PATH_NAME_LENGTH) {
(void)fprintf(stderr, err10, argv[i]);
goto err;
}
- (void)HDstrcpy(opt->outfile, argv[i]);
- outfile_named = TRUE;
+ (void)strcpy(opt->outfile, argv[i]);
+ outfile_named = true;
break;
case 6: /* -h found; help, then exit */
@@ -228,7 +228,7 @@ main(int argc, char *argv[])
}
}
- if (FALSE == outfile_named) {
+ if (false == outfile_named) {
(void)fprintf(stderr, "%s", err3);
usage(argv[0]);
goto err;
@@ -287,40 +287,40 @@ gtoken(char *s)
* identify the token type
*/
if (s[0] == '-') { /* option name (or negative number) */
- len = HDstrlen(&s[1]);
+ len = strlen(&s[1]);
switch (s[1]) {
case 'o':
- if (!HDstrncmp("outfile", &s[1], len))
+ if (!strncmp("outfile", &s[1], len))
token = OPT_o;
break;
case 'c':
- if (!HDstrncmp("config", &s[1], len))
+ if (!strncmp("config", &s[1], len))
token = OPT_c;
break;
case 'h':
- if (!HDstrncmp("help", &s[1], len))
+ if (!strncmp("help", &s[1], len))
token = OPT_h;
break;
case 'd':
- if (!HDstrncmp("dims", &s[1], len))
+ if (!strncmp("dims", &s[1], len))
token = OPT_d;
break;
case 'p':
- if (!HDstrncmp("path", &s[1], len))
+ if (!strncmp("path", &s[1], len))
token = OPT_p;
break;
case 't':
- if (!HDstrncmp("type", &s[1], len))
+ if (!strncmp("type", &s[1], len))
token = OPT_t;
break;
case 's':
- if (!HDstrncmp("size", &s[1], len))
+ if (!strncmp("size", &s[1], len))
token = OPT_s;
break;
default:
@@ -489,7 +489,7 @@ readIntegerData(FILE *strm, struct Input *in)
case 0: /* TEXTIN */
in08 = (H5DT_INT8 *)in->data;
for (i = 0; i < len; i++, in08++) {
- if (HDfscanf(strm, "%hd", &temp16) != 1) {
+ if (fscanf(strm, "%hd", &temp16) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -521,7 +521,7 @@ readIntegerData(FILE *strm, struct Input *in)
switch (in->inputClass) {
case 0: /* TEXTIN */
for (i = 0; i < len; i++, in16++) {
- if (HDfscanf(strm, "%hd", in16) != 1) {
+ if (fscanf(strm, "%hd", in16) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -558,7 +558,7 @@ readIntegerData(FILE *strm, struct Input *in)
switch (in->inputClass) {
case 0: /* TEXTIN */
for (i = 0; i < len; i++, in32++) {
- if (HDfscanf(strm, "%d", in32) != 1) {
+ if (fscanf(strm, "%d", in32) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -594,7 +594,7 @@ readIntegerData(FILE *strm, struct Input *in)
switch (in->inputClass) {
case 0: /* TEXTIN */
for (i = 0; i < len; i++, in64++) {
- if (HDfscanf(strm, "%s", buffer) < 1) {
+ if (fscanf(strm, "%s", buffer) < 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -660,7 +660,7 @@ readUIntegerData(FILE *strm, struct Input *in)
case 6: /* TEXTUIN */
in08 = (H5DT_UINT8 *)in->data;
for (i = 0; i < len; i++, in08++) {
- if (HDfscanf(strm, "%hu", &temp16) != 1) {
+ if (fscanf(strm, "%hu", &temp16) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -689,7 +689,7 @@ readUIntegerData(FILE *strm, struct Input *in)
switch (in->inputClass) {
case 6: /* TEXTUIN */
for (i = 0; i < len; i++, in16++) {
- if (HDfscanf(strm, "%hu", in16) != 1) {
+ if (fscanf(strm, "%hu", in16) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -725,7 +725,7 @@ readUIntegerData(FILE *strm, struct Input *in)
switch (in->inputClass) {
case 6: /* TEXTUIN */
for (i = 0; i < len; i++, in32++) {
- if (HDfscanf(strm, "%u", in32) != 1) {
+ if (fscanf(strm, "%u", in32) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -761,7 +761,7 @@ readUIntegerData(FILE *strm, struct Input *in)
switch (in->inputClass) {
case 6: /* TEXTUIN */
for (i = 0; i < len; i++, in64++) {
- if (HDfscanf(strm, "%s", buffer) < 1) {
+ if (fscanf(strm, "%s", buffer) < 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -826,7 +826,7 @@ readFloatData(FILE *strm, struct Input *in)
switch (in->inputClass) {
case 1: /* TEXTFP */
for (i = 0; i < len; i++, fp32++) {
- if (HDfscanf(strm, "%f", fp32) != 1) {
+ if (fscanf(strm, "%f", fp32) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -839,7 +839,7 @@ readFloatData(FILE *strm, struct Input *in)
case 2: /*TEXTFPE */
for (i = 0; i < len; i++, fp32++) {
- if (HDfscanf(strm, "%f", fp32) != 1) {
+ if (fscanf(strm, "%f", fp32) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -878,7 +878,7 @@ readFloatData(FILE *strm, struct Input *in)
switch (in->inputClass) {
case 1: /* TEXTFP */
for (i = 0; i < len; i++, fp64++) {
- if (HDfscanf(strm, "%lf", fp64) != 1) {
+ if (fscanf(strm, "%lf", fp64) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -891,7 +891,7 @@ readFloatData(FILE *strm, struct Input *in)
case 2: /*TEXTFPE */
for (i = 0; i < len; i++, fp64++) {
- if (HDfscanf(strm, "%lf", fp64) != 1) {
+ if (fscanf(strm, "%lf", fp64) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -964,7 +964,7 @@ processStrData(FILE *strm, struct Input *in, hid_t file_id)
*-------------------------------------------------------------------------
*/
- while (EOF != (c = HDfgetc(strm)))
+ while (EOF != (c = fgetc(strm)))
if (c == 10) /* eol */
nlines++;
@@ -1029,7 +1029,7 @@ processStrData(FILE *strm, struct Input *in, hid_t file_id)
line = 0;
- while (EOF != (c = HDfgetc(strm))) {
+ while (EOF != (c = fgetc(strm))) {
str[i] = (char)c;
i++;
@@ -1162,7 +1162,7 @@ processStrHDFData(FILE *strm, struct Input *in, hid_t file_id)
line = 0;
j = 0;
- while (HDfgets(str, sizeof(str), strm)) {
+ while (fgets(str, sizeof(str), strm)) {
str1 = str;
str2 = NULL;
str3 = NULL;
@@ -1173,24 +1173,24 @@ processStrHDFData(FILE *strm, struct Input *in, hid_t file_id)
str2 = strchr(str1, '"');
if (str2 != NULL) {
#ifdef H5DEBUGIMPORT
- printf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", HDstrlen(str2), str2);
+ printf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", strlen(str2), str2);
#endif
str2++;
#ifdef H5DEBUGIMPORT
- printf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", HDstrlen(str2), str2);
+ printf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", strlen(str2), str2);
#endif
str3 = strrchr(str2, '"');
if (str3 != NULL) {
#ifdef H5DEBUGIMPORT
- printf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", HDstrlen(str3), str3);
+ printf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", strlen(str3), str3);
#endif
*str3 = '\0';
#ifdef H5DEBUGIMPORT
- printf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", HDstrlen(str2), str2);
+ printf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", strlen(str2), str2);
#endif
- if (HDstrlen(str2) > 0) {
+ if (strlen(str2) > 0) {
hid_t fspace_id;
hsize_t start[1];
hsize_t count[1] = {1};
@@ -1461,18 +1461,18 @@ processConfigurationFile(char *infile, struct Input *in)
goto error;
}
- scanret = HDfscanf(strm, "%254s", key);
- if ((scanret == 1) && !HDstrcmp("HDF5", key)) {
+ scanret = fscanf(strm, "%254s", key);
+ if ((scanret == 1) && !strcmp("HDF5", key)) {
#ifdef H5DEBUGIMPORT
int pndx;
printf("\nh5dump file\n");
#endif
in->h5dumpInput = 1;
- scanret = HDfscanf(strm, "%254s", temp); /* filename */
- scanret = HDfscanf(strm, "%254s", temp); /* start bracket */
- scanret = HDfscanf(strm, "%254s", key); /* DATASET */
+ scanret = fscanf(strm, "%254s", temp); /* filename */
+ scanret = fscanf(strm, "%254s", temp); /* start bracket */
+ scanret = fscanf(strm, "%254s", key); /* DATASET */
while (scanret == 1) {
- if (!HDstrcmp("DATASET", key)) { /* PATH */
+ if (!strcmp("DATASET", key)) { /* PATH */
#ifdef H5DEBUGIMPORT
printf("h5dump DATASET key\n");
#endif
@@ -1480,7 +1480,7 @@ processConfigurationFile(char *infile, struct Input *in)
(void)fprintf(stderr, err3a, infile);
goto error;
}
- if (HDfscanf(strm, "%254s", temp) != 1) {
+ if (fscanf(strm, "%254s", temp) != 1) {
(void)fprintf(stderr, "%s", err18);
goto error;
}
@@ -1492,12 +1492,12 @@ processConfigurationFile(char *infile, struct Input *in)
goto error;
}
in->configOptionVector[PATH] = 1;
- scanret = HDfscanf(strm, "%254s", temp); /* start bracket */
+ scanret = fscanf(strm, "%254s", temp); /* start bracket */
#ifdef H5DEBUGIMPORT
printf("h5dump DATASET %s found\n", temp);
#endif
- } /* if(!HDstrcmp("DATASET", key)) PATH */
- else if (!HDstrcmp("DATATYPE", key)) { /* INPUT-CLASS */
+ } /* if(!strcmp("DATASET", key)) PATH */
+ else if (!strcmp("DATATYPE", key)) { /* INPUT-CLASS */
#ifdef H5DEBUGIMPORT
printf("h5dump DATATYPE key\n");
#endif
@@ -1506,7 +1506,7 @@ processConfigurationFile(char *infile, struct Input *in)
goto error;
}
- if (HDfscanf(strm, "%254s", temp) != 1) {
+ if (fscanf(strm, "%254s", temp) != 1) {
(void)fprintf(stderr, "%s", err18);
goto error;
}
@@ -1542,27 +1542,27 @@ processConfigurationFile(char *infile, struct Input *in)
#ifdef H5DEBUGIMPORT
printf("h5dump DATATYPE STRING found\n");
#endif
- if (HDfscanf(strm, "%254s", temp) != 1) { /* start bracket */
+ if (fscanf(strm, "%254s", temp) != 1) { /* start bracket */
(void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump DATATYPE STRING %s found\n", temp);
#endif
- if (HDfscanf(strm, "%254s", temp) != 1) { /* string properties */
+ if (fscanf(strm, "%254s", temp) != 1) { /* string properties */
(void)fprintf(stderr, "%s", err18);
goto error;
}
while (get_next_prop) {
- if (!HDstrcmp("STRSIZE", temp)) { /* STRSIZE */
- if (HDfscanf(strm, "%254s", temp) != 1) {
+ if (!strcmp("STRSIZE", temp)) { /* STRSIZE */
+ if (fscanf(strm, "%254s", temp) != 1) {
(void)fprintf(stderr, "%s", err19);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump DATATYPE STRING STRSIZE %s found\n", temp);
#endif
- if (HDstrcmp("H5T_VARIABLE;", temp) != 0) {
+ if (strcmp("H5T_VARIABLE;", temp) != 0) {
char *more = temp;
ival = (int)strtol(more, &more, 10);
if (getInputSize(in, ival) == -1) {
@@ -1574,8 +1574,8 @@ processConfigurationFile(char *infile, struct Input *in)
#endif
}
}
- else if (!HDstrcmp("STRPAD", temp)) { /* STRPAD */
- if (HDfscanf(strm, "%254s", temp) != 1) { /* STRPAD type */
+ else if (!strcmp("STRPAD", temp)) { /* STRPAD */
+ if (fscanf(strm, "%254s", temp) != 1) { /* STRPAD type */
(void)fprintf(stderr, "%s", err18);
goto error;
}
@@ -1583,8 +1583,8 @@ processConfigurationFile(char *infile, struct Input *in)
printf("h5dump DATATYPE STRING STRPAD %s found\n", temp);
#endif
}
- else if (!HDstrcmp("CSET", key)) { /* CSET */
- if (HDfscanf(strm, "%254s", temp) != 1) { /* CSET type */
+ else if (!strcmp("CSET", key)) { /* CSET */
+ if (fscanf(strm, "%254s", temp) != 1) { /* CSET type */
(void)fprintf(stderr, "%s", err18);
goto error;
}
@@ -1592,69 +1592,69 @@ processConfigurationFile(char *infile, struct Input *in)
printf("h5dump DATATYPE STRING CSET %s found\n", temp);
#endif
}
- else if (!HDstrcmp("CTYPE", temp)) { /* CTYPE */
- if (HDfscanf(strm, "%254s", temp) != 1) { /* CTYPE type */
+ else if (!strcmp("CTYPE", temp)) { /* CTYPE */
+ if (fscanf(strm, "%254s", temp) != 1) { /* CTYPE type */
(void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump DATATYPE STRING CTYPE %s found\n", temp);
#endif
- } /* if(!HDstrcmp("CSET", key)) */
- if (HDfscanf(strm, "%254s", temp) != 1) {
+ } /* if(!strcmp("CSET", key)) */
+ if (fscanf(strm, "%254s", temp) != 1) {
(void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump DATATYPE STRING %s found\n", temp);
#endif
- if (!HDstrcmp("}", temp)) { /* end bracket */
+ if (!strcmp("}", temp)) { /* end bracket */
get_next_prop = 0;
}
- } /* while (get_next_prop) */
- } /* if(kindex == 5) STRING */
- } /* else if(!HDstrcmp("DATATYPE", key)) INPUT-CLASS */
- else if (!HDstrcmp("DATASPACE", key)) { /* RANK and DIMENSIONS */
+ } /* while (get_next_prop) */
+ } /* if(kindex == 5) STRING */
+ } /* else if(!strcmp("DATATYPE", key)) INPUT-CLASS */
+ else if (!strcmp("DATASPACE", key)) { /* RANK and DIMENSIONS */
hsize_t temp_dims[MAX_NUM_DIMENSION];
#ifdef H5DEBUGIMPORT
printf("h5dump DATASPACE key\n");
#endif
- if (HDfscanf(strm, "%254s", temp) != 1) {
+ if (fscanf(strm, "%254s", temp) != 1) {
(void)fprintf(stderr, "%s", err18);
goto error;
}
- if (!HDstrcmp("SCALAR", temp)) { /* SCALAR */
+ if (!strcmp("SCALAR", temp)) { /* SCALAR */
in->rank = 0;
- } /* if(!HDstrcmp("SCALAR", key)) */
- else if (!HDstrcmp("NULL", temp)) { /* NULL */
+ } /* if(!strcmp("SCALAR", key)) */
+ else if (!strcmp("NULL", temp)) { /* NULL */
(void)fprintf(stderr, err6b, infile);
goto error;
- } /* else if(!HDstrcmp("NULL", key)) */
- else if (!HDstrcmp("SIMPLE", temp)) { /* SIMPLE */
+ } /* else if(!strcmp("NULL", key)) */
+ else if (!strcmp("SIMPLE", temp)) { /* SIMPLE */
int icount = 0;
#ifdef H5DEBUGIMPORT
printf("h5dump DATASPACE SIMPLE found\n");
#endif
- if (HDfscanf(strm, "%254s", temp) != 1) { /* start bracket */
+ if (fscanf(strm, "%254s", temp) != 1) { /* start bracket */
(void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump DATASPACE SIMPLE %s found\n", temp);
#endif
- if (HDfscanf(strm, "%254s", temp) != 1) { /* start paren */
+ if (fscanf(strm, "%254s", temp) != 1) { /* start paren */
(void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump DATASPACE SIMPLE %s found\n", temp);
#endif
- if (!HDstrcmp("(", temp)) { /* start paren */
+ if (!strcmp("(", temp)) { /* start paren */
int get_next_dim = 1;
int i = 0;
- if (HDfscanf(strm, "%254s", temp) != 1) { /* Dimension with optional comma */
+ if (fscanf(strm, "%254s", temp) != 1) { /* Dimension with optional comma */
(void)fprintf(stderr, err16c, infile);
goto error;
}
@@ -1664,14 +1664,14 @@ processConfigurationFile(char *infile, struct Input *in)
while (get_next_dim) {
char *more = temp;
temp_dims[icount] = strtoull(more, &more, 10);
- if (HDfscanf(strm, "%254s", temp) != 1) { /* Dimension or end paren */
+ if (fscanf(strm, "%254s", temp) != 1) { /* Dimension or end paren */
(void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump DATASPACE SIMPLE %s found\n", temp);
#endif
- if (!HDstrcmp(")", temp)) { /* end paren */
+ if (!strcmp(")", temp)) { /* end paren */
in->rank = ++icount;
in->configOptionVector[RANK] = 1;
get_next_dim = 0;
@@ -1703,38 +1703,38 @@ processConfigurationFile(char *infile, struct Input *in)
printf("\n");
#endif
in->configOptionVector[DIM] = 1;
- } /* if(!HDstrcmp("(", key)) start paren */
+ } /* if(!strcmp("(", key)) start paren */
else {
(void)fprintf(stderr, err5b, infile);
goto error;
}
- if (HDfscanf(strm, "%254s", temp) != 1) {
+ if (fscanf(strm, "%254s", temp) != 1) {
(void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump DATASPACE SIMPLE %s found\n", temp);
#endif
- if (!HDstrcmp("/", temp)) { /* / max dims */
+ if (!strcmp("/", temp)) { /* / max dims */
if ((in->maxsizeOfDimension =
(hsize_t *)malloc((size_t)in->rank * sizeof(hsize_t))) == NULL) {
goto error;
}
- if (HDfscanf(strm, "%254s", temp) != 1) { /* start paren */
+ if (fscanf(strm, "%254s", temp) != 1) { /* start paren */
(void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump DATASPACE SIMPLE %s found\n", temp);
#endif
- if (!HDstrcmp("(", temp)) { /* start paren */
+ if (!strcmp("(", temp)) { /* start paren */
int get_next_dim = 1;
int i = 0;
#ifdef H5DEBUGIMPORT
printf("h5dump DATASPACE SIMPLE process max dim values\n");
#endif
- if (HDfscanf(strm, "%254s", temp) != 1) { /* max dim with optional comma */
+ if (fscanf(strm, "%254s", temp) != 1) { /* max dim with optional comma */
(void)fprintf(stderr, err16c, infile);
goto error;
}
@@ -1745,8 +1745,8 @@ processConfigurationFile(char *infile, struct Input *in)
#ifdef H5DEBUGIMPORT
printf("h5dump DATASPACE SIMPLE get max dim value\n");
#endif
- if (!HDstrcmp("H5S_UNLIMITED", temp) ||
- !HDstrcmp("H5S_UNLIMITED,", temp)) { /* unlimited */
+ if (!strcmp("H5S_UNLIMITED", temp) ||
+ !strcmp("H5S_UNLIMITED,", temp)) { /* unlimited */
in->maxsizeOfDimension[i] = H5S_UNLIMITED;
in->configOptionVector[EXTEND] = 1;
}
@@ -1754,14 +1754,14 @@ processConfigurationFile(char *infile, struct Input *in)
char *more = temp;
in->maxsizeOfDimension[i] = strtoull(more, &more, 10);
}
- if (HDfscanf(strm, "%254s", temp) != 1) { /* max dim or end paren */
+ if (fscanf(strm, "%254s", temp) != 1) { /* max dim or end paren */
(void)fprintf(stderr, err16c, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump DATASPACE SIMPLE %s found\n", temp);
#endif
- if (!HDstrcmp(")", temp)) { /* end paren */
+ if (!strcmp(")", temp)) { /* end paren */
get_next_dim = 0;
}
else { /* comma */
@@ -1780,57 +1780,57 @@ processConfigurationFile(char *infile, struct Input *in)
printf("\n");
printf("h5dump DATASPACE SIMPLE get max dim finished\n");
#endif
- } /* if(!HDstrcmp("(", key)) start paren */
+ } /* if(!strcmp("(", key)) start paren */
else {
(void)fprintf(stderr, err16c, infile);
goto error;
}
- scanret = HDfscanf(strm, "%254s", temp); /* end bracket */
+ scanret = fscanf(strm, "%254s", temp); /* end bracket */
#ifdef H5DEBUGIMPORT
printf("h5dump DATASPACE SIMPLE %s found\n", temp);
#endif
- } /* if(!HDstrcmp("/", key)) max dims separator */
- } /* else if(!HDstrcmp("SIMPLE", key)) */
+ } /* if(!strcmp("/", key)) max dims separator */
+ } /* else if(!strcmp("SIMPLE", key)) */
else {
(void)fprintf(stderr, err5b, infile);
goto error;
}
- } /* else if(!HDstrcmp("DATASPACE", key)) RANK and DIMENSIONS */
- else if (!HDstrcmp("STORAGE_LAYOUT", key)) { /* CHUNKED-DIMENSION-SIZES */
+ } /* else if(!strcmp("DATASPACE", key)) RANK and DIMENSIONS */
+ else if (!strcmp("STORAGE_LAYOUT", key)) { /* CHUNKED-DIMENSION-SIZES */
#ifdef H5DEBUGIMPORT
printf("h5dump STORAGE_LAYOUT key\n");
#endif
- if (HDfscanf(strm, "%254s", temp) != 1) { /* start bracket */
+ if (fscanf(strm, "%254s", temp) != 1) { /* start bracket */
(void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump STORAGE_LAYOUT %s found\n", temp);
#endif
- if (HDfscanf(strm, "%254s", temp) != 1) { /* CHUNKED */
+ if (fscanf(strm, "%254s", temp) != 1) { /* CHUNKED */
(void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump STORAGE_LAYOUT %s found\n", temp);
#endif
- if (!HDstrcmp("CHUNKED", temp)) { /* CHUNKED */
+ if (!strcmp("CHUNKED", temp)) { /* CHUNKED */
if ((in->sizeOfChunk = (hsize_t *)malloc((size_t)in->rank * sizeof(hsize_t))) == NULL) {
(void)fprintf(stderr, "Unable to allocate dynamic memory.\n");
goto error;
}
- if (HDfscanf(strm, "%254s", temp) != 1) { /* start paren */
+ if (fscanf(strm, "%254s", temp) != 1) { /* start paren */
(void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump STORAGE_LAYOUT CHUNKED %s found\n", temp);
#endif
- if (!HDstrcmp("(", temp)) { /* start paren */
+ if (!strcmp("(", temp)) { /* start paren */
int get_next_dim = 1;
int icount = 0;
- if (HDfscanf(strm, "%254s", temp) != 1) { /* Dimension with optional comma */
+ if (fscanf(strm, "%254s", temp) != 1) { /* Dimension with optional comma */
(void)fprintf(stderr, err16c, infile);
goto error;
}
@@ -1840,14 +1840,14 @@ processConfigurationFile(char *infile, struct Input *in)
while (get_next_dim) {
char *more = temp;
in->sizeOfChunk[icount] = strtoull(more, &more, 10);
- if (HDfscanf(strm, "%254s", temp) != 1) { /* Dimension or end paren */
+ if (fscanf(strm, "%254s", temp) != 1) { /* Dimension or end paren */
(void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump STORAGE_LAYOUT CHUNKED %s found\n", temp);
#endif
- if (!HDstrcmp(")", temp)) { /* end paren */
+ if (!strcmp(")", temp)) { /* end paren */
in->configOptionVector[RANK] = 1;
get_next_dim = 0;
}
@@ -1867,20 +1867,20 @@ processConfigurationFile(char *infile, struct Input *in)
printf("\n");
#endif
in->configOptionVector[DIM] = 1;
- } /* if(!HDstrcmp("(", key)) start paren */
+ } /* if(!strcmp("(", key)) start paren */
else {
(void)fprintf(stderr, err5b, infile);
goto error;
}
- if (HDfscanf(strm, "%254s", temp) != 1) { /* SIZE */
+ if (fscanf(strm, "%254s", temp) != 1) { /* SIZE */
(void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump STORAGE_LAYOUT CHUNKED %s found\n", temp);
#endif
- if (!HDstrcmp("SIZE", temp)) { /* SIZE */
- if (HDfscanf(strm, "%d", (&ival)) != 1) {
+ if (!strcmp("SIZE", temp)) { /* SIZE */
+ if (fscanf(strm, "%d", (&ival)) != 1) {
(void)fprintf(stderr, "%s", err19);
goto error;
}
@@ -1888,8 +1888,8 @@ processConfigurationFile(char *infile, struct Input *in)
printf("h5dump STORAGE_LAYOUT CHUNKED SIZE %d found\n", ival);
#endif
}
- while (HDstrcmp("}", temp) != 0) {
- if (HDfscanf(strm, "%254s", temp) != 1) { /* end bracket */
+ while (strcmp("}", temp) != 0) {
+ if (fscanf(strm, "%254s", temp) != 1) { /* end bracket */
(void)fprintf(stderr, "%s", err18);
goto error;
}
@@ -1898,52 +1898,52 @@ processConfigurationFile(char *infile, struct Input *in)
#endif
}
in->configOptionVector[CHUNK] = 1;
- } /* if(!HDstrcmp("CHUNKED", key)) CHUNKED */
- } /* else if(!HDstrcmp("STORAGE_LAYOUT", key)) CHUNKED-DIMENSION-SIZES */
- else if (!HDstrcmp("FILTERS", key)) { /* FILTERS */
+ } /* if(!strcmp("CHUNKED", key)) CHUNKED */
+ } /* else if(!strcmp("STORAGE_LAYOUT", key)) CHUNKED-DIMENSION-SIZES */
+ else if (!strcmp("FILTERS", key)) { /* FILTERS */
#ifdef H5DEBUGIMPORT
printf("h5dump FILTERS key\n");
#endif
- if (HDfscanf(strm, "%254s", temp) != 1) { /* start bracket */
+ if (fscanf(strm, "%254s", temp) != 1) { /* start bracket */
(void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump FILTERS %s found\n", temp);
#endif
- if (HDfscanf(strm, "%254s", temp) != 1) {
+ if (fscanf(strm, "%254s", temp) != 1) {
(void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump FILTERS %s found\n", temp);
#endif
- if (!HDstrcmp("COMPRESSION", temp)) { /* COMPRESSION */
+ if (!strcmp("COMPRESSION", temp)) { /* COMPRESSION */
#ifdef H5DEBUGIMPORT
printf("h5dump FILTERS COMPRESSION found\n");
#endif
- if (HDfscanf(strm, "%254s", temp) != 1) { /* DEFLATE */
+ if (fscanf(strm, "%254s", temp) != 1) { /* DEFLATE */
(void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump FILTERS COMPRESSION %s found\n", temp);
#endif
- if (HDfscanf(strm, "%254s", temp) != 1) { /* bgin bracket */
+ if (fscanf(strm, "%254s", temp) != 1) { /* bgin bracket */
(void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump FILTERS COMPRESSION %s found\n", temp);
#endif
- if (HDfscanf(strm, "%254s", temp) != 1) { /* LEVEL */
+ if (fscanf(strm, "%254s", temp) != 1) { /* LEVEL */
(void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump FILTERS COMPRESSION %s found\n", temp);
#endif
- if (HDfscanf(strm, "%d", (&ival)) != 1) {
+ if (fscanf(strm, "%d", (&ival)) != 1) {
(void)fprintf(stderr, "%s", err19);
goto error;
}
@@ -1951,7 +1951,7 @@ processConfigurationFile(char *infile, struct Input *in)
printf("h5dump FILTERS COMPRESSION LEVEL %d found\n", ival);
#endif
in->compressionParam = ival;
- if (HDfscanf(strm, "%254s", temp) != 1) { /* end bracket */
+ if (fscanf(strm, "%254s", temp) != 1) { /* end bracket */
(void)fprintf(stderr, "%s", err18);
goto error;
}
@@ -1961,19 +1961,19 @@ processConfigurationFile(char *infile, struct Input *in)
in->compressionType = 0; /* ONLY GZIP supported */
in->configOptionVector[COMPRESS] = 1;
}
- else if (!HDstrcmp("CONTIGUOUS", temp)) { /* CONTIGUOUS */
+ else if (!strcmp("CONTIGUOUS", temp)) { /* CONTIGUOUS */
#ifdef H5DEBUGIMPORT
printf("h5dump FILTERS CONTIGUOUS found\n");
#endif
in->configOptionVector[COMPRESS] = 0;
}
- else if (!HDstrcmp("NONE", temp)) { /* NONE */
+ else if (!strcmp("NONE", temp)) { /* NONE */
#ifdef H5DEBUGIMPORT
printf("h5dump FILTERS NONE found\n");
#endif
in->configOptionVector[COMPRESS] = 0;
}
- if (HDfscanf(strm, "%254s", temp) != 1) { /* end bracket */
+ if (fscanf(strm, "%254s", temp) != 1) { /* end bracket */
(void)fprintf(stderr, "%s", err18);
goto error;
}
@@ -1981,20 +1981,20 @@ processConfigurationFile(char *infile, struct Input *in)
printf("h5dump FILTERS %s found\n", temp);
#endif
}
- else if (!HDstrcmp("SUBSET", key)) { /* reduce dimensions */
+ else if (!strcmp("SUBSET", key)) { /* reduce dimensions */
hsize_t temp_dims[MAX_NUM_DIMENSION];
int get_next_prop = 1;
#ifdef H5DEBUGIMPORT
printf("h5dump SUBSET key\n");
#endif
- if (HDfscanf(strm, "%254s", temp) != 1) { /* start bracket */
+ if (fscanf(strm, "%254s", temp) != 1) { /* start bracket */
(void)fprintf(stderr, err20, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump SUBSET %s found\n", temp);
#endif
- if (HDfscanf(strm, "%254s", temp) != 1) { /* SUBSET keyword */
+ if (fscanf(strm, "%254s", temp) != 1) { /* SUBSET keyword */
(void)fprintf(stderr, "%s", err18);
goto error;
}
@@ -2002,20 +2002,20 @@ processConfigurationFile(char *infile, struct Input *in)
printf("h5dump SUBSET %s found\n", temp);
#endif
while (get_next_prop) {
- if (!HDstrcmp("COUNT", temp)) { /* COUNT */
+ if (!strcmp("COUNT", temp)) { /* COUNT */
int icount = 0;
- if (HDfscanf(strm, "%254s", temp) != 1) { /* start paren */
+ if (fscanf(strm, "%254s", temp) != 1) { /* start paren */
(void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump SUBSET %s found\n", temp);
#endif
- if (!HDstrcmp("(", temp)) { /* start paren */
+ if (!strcmp("(", temp)) { /* start paren */
int get_next_dim = 1;
int i = 0;
- if (HDfscanf(strm, "%254s", temp) != 1) { /* Dimension with optional comma */
+ if (fscanf(strm, "%254s", temp) != 1) { /* Dimension with optional comma */
(void)fprintf(stderr, err16c, infile);
goto error;
}
@@ -2025,14 +2025,14 @@ processConfigurationFile(char *infile, struct Input *in)
while (get_next_dim) {
char *more = temp;
temp_dims[icount] = strtoull(more, &more, 10);
- if (HDfscanf(strm, "%254s", temp) != 1) { /* Dimension or end paren */
+ if (fscanf(strm, "%254s", temp) != 1) { /* Dimension or end paren */
(void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump SUBSET COUNT %s found\n", temp);
#endif
- if (!HDstrcmp(");", temp)) { /* end paren */
+ if (!strcmp(");", temp)) { /* end paren */
in->rank = ++icount;
in->configOptionVector[RANK] = 1;
get_next_dim = 0;
@@ -2056,22 +2056,22 @@ processConfigurationFile(char *infile, struct Input *in)
printf("\n");
#endif
in->configOptionVector[DIM] = 1;
- } /* if(!HDstrcmp("(", key)) start paren */
- } /* if(!HDstrcmp("COUNT", temp)) COUNT */
- if (!HDstrcmp("BLOCK", temp)) { /* BLOCK */
+ } /* if(!strcmp("(", key)) start paren */
+ } /* if(!strcmp("COUNT", temp)) COUNT */
+ if (!strcmp("BLOCK", temp)) { /* BLOCK */
int icount = 0;
- if (HDfscanf(strm, "%254s", temp) != 1) { /* start paren */
+ if (fscanf(strm, "%254s", temp) != 1) { /* start paren */
(void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump SUBSET %s found\n", temp);
#endif
- if (!HDstrcmp("(", temp)) { /* start paren */
+ if (!strcmp("(", temp)) { /* start paren */
int get_next_dim = 1;
int i = 0;
- if (HDfscanf(strm, "%254s", temp) != 1) { /* Dimension with optional comma */
+ if (fscanf(strm, "%254s", temp) != 1) { /* Dimension with optional comma */
(void)fprintf(stderr, err16c, infile);
goto error;
}
@@ -2081,14 +2081,14 @@ processConfigurationFile(char *infile, struct Input *in)
while (get_next_dim) {
char *more = temp;
temp_dims[icount] = strtoull(more, &more, 10);
- if (HDfscanf(strm, "%254s", temp) != 1) { /* Dimension or end paren */
+ if (fscanf(strm, "%254s", temp) != 1) { /* Dimension or end paren */
(void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump SUBSET BLOCK %s found\n", temp);
#endif
- if (!HDstrcmp(");", temp)) { /* end paren */
+ if (!strcmp(");", temp)) { /* end paren */
in->rank = ++icount;
in->configOptionVector[RANK] = 1;
get_next_dim = 0;
@@ -2112,28 +2112,28 @@ processConfigurationFile(char *infile, struct Input *in)
printf("\n");
#endif
in->configOptionVector[DIM] = 1;
- } /* if(!HDstrcmp("(", key)) start paren */
- } /* if(!HDstrcmp("BLOCK", temp)) BLOCK */
- if (HDfscanf(strm, "%254s", temp) != 1) {
+ } /* if(!strcmp("(", key)) start paren */
+ } /* if(!strcmp("BLOCK", temp)) BLOCK */
+ if (fscanf(strm, "%254s", temp) != 1) {
(void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump SUBSET %s found\n", temp);
#endif
- if (!HDstrcmp("}", temp)) { /* end bracket */
+ if (!strcmp("}", temp)) { /* end bracket */
get_next_prop = 0;
}
- } /* while (get_next_prop) */
- } /* else if(!HDstrcmp("SUBSET", key)) */
- else if (!HDstrcmp("DATA", key)) { /* FINISHED */
+ } /* while (get_next_prop) */
+ } /* else if(!strcmp("SUBSET", key)) */
+ else if (!strcmp("DATA", key)) { /* FINISHED */
#ifdef H5DEBUGIMPORT
printf("h5dump DATA key\n");
#endif
scanret = 0;
break;
}
- scanret = HDfscanf(strm, "%254s", key);
+ scanret = fscanf(strm, "%254s", key);
}
#ifdef H5DEBUGIMPORT
printf("h5dump path");
@@ -2174,7 +2174,7 @@ processConfigurationFile(char *infile, struct Input *in)
(void)fprintf(stderr, err3a, infile);
goto error;
}
- if (HDfscanf(strm, "%254s", temp) != 1) {
+ if (fscanf(strm, "%254s", temp) != 1) {
(void)fprintf(stderr, "%s", err18);
goto error;
}
@@ -2191,7 +2191,7 @@ processConfigurationFile(char *infile, struct Input *in)
goto error;
}
- if (HDfscanf(strm, "%254s", temp) != 1) {
+ if (fscanf(strm, "%254s", temp) != 1) {
(void)fprintf(stderr, "%s", err18);
goto error;
}
@@ -2218,7 +2218,7 @@ processConfigurationFile(char *infile, struct Input *in)
(void)fprintf(stderr, err5a, infile);
goto error;
}
- if (HDfscanf(strm, "%254d", (&ival)) != 1) {
+ if (fscanf(strm, "%254d", (&ival)) != 1) {
(void)fprintf(stderr, "%s", err19);
goto error;
}
@@ -2415,7 +2415,7 @@ processConfigurationFile(char *infile, struct Input *in)
default:
break;
}
- scanret = HDfscanf(strm, "%254s", key);
+ scanret = fscanf(strm, "%254s", key);
}
/*
@@ -2505,7 +2505,7 @@ mapKeywordToIndex(char *key)
int i;
for (i = 0; i < NUM_KEYS; i++)
- if (!HDstrcmp(keytable[i], key))
+ if (!strcmp(keytable[i], key))
return i;
return -1;
}
@@ -2518,22 +2518,22 @@ parsePathInfo(struct path_info *path, char *temp)
int i = 0;
const char *err1 = "Path string larger than MAX_PATH_NAME_LENGTH.\n";
- token = HDstrtok(temp, delimiter);
- if (HDstrlen(token) >= MAX_PATH_NAME_LENGTH) {
+ token = strtok(temp, delimiter);
+ if (strlen(token) >= MAX_PATH_NAME_LENGTH) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
- HDstrcpy(path->group[i++], token);
+ strcpy(path->group[i++], token);
while (1) {
- token = HDstrtok(NULL, delimiter);
+ token = strtok(NULL, delimiter);
if (token == NULL)
break;
- if (HDstrlen(token) >= MAX_PATH_NAME_LENGTH) {
+ if (strlen(token) >= MAX_PATH_NAME_LENGTH) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
- HDstrcpy(path->group[i++], token);
+ strcpy(path->group[i++], token);
}
path->count = i;
return (0);
@@ -2548,12 +2548,12 @@ parseDimensions(struct Input *in, char *strm)
int i = 0;
const char *err1 = "Unable to allocate dynamic memory.\n";
- HDstrncpy(temp, strm, sizeof(temp));
+ strncpy(temp, strm, sizeof(temp));
temp[sizeof(temp) - 1] = '\0';
- HDstrtok(temp, delimiter);
+ strtok(temp, delimiter);
while (1) {
- token = HDstrtok(NULL, delimiter);
+ token = strtok(NULL, delimiter);
if (token == NULL)
break;
i++;
@@ -2565,12 +2565,12 @@ parseDimensions(struct Input *in, char *strm)
}
i = 0;
- HDstrncpy(temp, strm, sizeof(temp));
+ strncpy(temp, strm, sizeof(temp));
temp[sizeof(temp) - 1] = '\0';
- in->sizeOfDimension[i++] = strtoull(HDstrtok(temp, delimiter), NULL, BASE_10);
+ in->sizeOfDimension[i++] = strtoull(strtok(temp, delimiter), NULL, BASE_10);
while (1) {
- token = HDstrtok(NULL, delimiter);
+ token = strtok(NULL, delimiter);
if (token == NULL)
break;
in->sizeOfDimension[i++] = strtoull(token, NULL, BASE_10);
@@ -2586,7 +2586,7 @@ getOutputClass(struct Input *in, FILE *strm)
const char *err1 = "Unable to get 'string' value.\n";
const char *err2 = "Invalid value for output class.\n";
- if (HDfscanf(strm, "%254s", temp) != 1) {
+ if (fscanf(strm, "%254s", temp) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -2606,7 +2606,7 @@ OutputClassStrToInt(char *temp)
int i;
char classKeywordTable[3][15] = {"IN", "FP", "UIN"};
for (i = 0; i < 3; i++)
- if (!HDstrcmp(classKeywordTable[i], temp))
+ if (!strcmp(classKeywordTable[i], temp))
return i;
return -1;
@@ -2621,7 +2621,7 @@ getOutputSize(struct Input *in, FILE *strm)
const char *err1 = "Unable to get integer value.\n";
const char *err2 = "Invalid value for output size.\n";
- if (HDfscanf(strm, "%d", (&ival)) != 1) {
+ if (fscanf(strm, "%d", (&ival)) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -2658,7 +2658,7 @@ getInputClassType(struct Input *in, char *buffer)
const char *err2 = "Invalid value for output architecture.\n";
const char *err3 = "Invalid value for input byte-order.\n";
- if (!HDstrcmp(buffer, "H5T_STD_I8BE")) {
+ if (!strcmp(buffer, "H5T_STD_I8BE")) {
in->inputSize = 8;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -2679,7 +2679,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 4;
}
- else if (!HDstrcmp(buffer, "H5T_STD_I8LE")) {
+ else if (!strcmp(buffer, "H5T_STD_I8LE")) {
in->inputSize = 8;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -2700,7 +2700,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 4;
}
- else if (!HDstrcmp(buffer, "H5T_STD_I16BE")) {
+ else if (!strcmp(buffer, "H5T_STD_I16BE")) {
in->inputSize = 16;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -2721,7 +2721,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 4;
}
- else if (!HDstrcmp(buffer, "H5T_STD_I16LE")) {
+ else if (!strcmp(buffer, "H5T_STD_I16LE")) {
in->inputSize = 16;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -2742,7 +2742,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 4;
}
- else if (!HDstrcmp(buffer, "H5T_STD_I32BE")) {
+ else if (!strcmp(buffer, "H5T_STD_I32BE")) {
in->inputSize = 32;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -2763,7 +2763,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 4;
}
- else if (!HDstrcmp(buffer, "H5T_STD_I32LE")) {
+ else if (!strcmp(buffer, "H5T_STD_I32LE")) {
in->inputSize = 32;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -2784,7 +2784,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 4;
}
- else if (!HDstrcmp(buffer, "H5T_STD_I64BE")) {
+ else if (!strcmp(buffer, "H5T_STD_I64BE")) {
in->inputSize = 64;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -2805,7 +2805,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 4;
}
- else if (!HDstrcmp(buffer, "H5T_STD_I64LE")) {
+ else if (!strcmp(buffer, "H5T_STD_I64LE")) {
in->inputSize = 64;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -2826,7 +2826,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 4;
}
- else if (!HDstrcmp(buffer, "H5T_STD_U8BE")) {
+ else if (!strcmp(buffer, "H5T_STD_U8BE")) {
in->inputSize = 8;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -2847,7 +2847,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 7;
}
- else if (!HDstrcmp(buffer, "H5T_STD_U8LE")) {
+ else if (!strcmp(buffer, "H5T_STD_U8LE")) {
in->inputSize = 8;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -2868,7 +2868,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 7;
}
- else if (!HDstrcmp(buffer, "H5T_STD_U16BE")) {
+ else if (!strcmp(buffer, "H5T_STD_U16BE")) {
in->inputSize = 16;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -2889,7 +2889,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 7;
}
- else if (!HDstrcmp(buffer, "H5T_STD_U16LE")) {
+ else if (!strcmp(buffer, "H5T_STD_U16LE")) {
in->inputSize = 16;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -2910,7 +2910,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 7;
}
- else if (!HDstrcmp(buffer, "H5T_STD_U32BE")) {
+ else if (!strcmp(buffer, "H5T_STD_U32BE")) {
in->inputSize = 32;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -2931,7 +2931,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 7;
}
- else if (!HDstrcmp(buffer, "H5T_STD_U32LE")) {
+ else if (!strcmp(buffer, "H5T_STD_U32LE")) {
in->inputSize = 32;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -2952,7 +2952,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 7;
}
- else if (!HDstrcmp(buffer, "H5T_STD_U64BE")) {
+ else if (!strcmp(buffer, "H5T_STD_U64BE")) {
in->inputSize = 64;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -2973,7 +2973,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 7;
}
- else if (!HDstrcmp(buffer, "H5T_STD_U64LE")) {
+ else if (!strcmp(buffer, "H5T_STD_U64LE")) {
in->inputSize = 64;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -2994,7 +2994,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 7;
}
- else if (!HDstrcmp(buffer, "H5T_NATIVE_SCHAR")) {
+ else if (!strcmp(buffer, "H5T_NATIVE_SCHAR")) {
in->inputSize = 8;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -3006,7 +3006,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 4;
}
- else if (!HDstrcmp(buffer, "H5T_NATIVE_UCHAR")) {
+ else if (!strcmp(buffer, "H5T_NATIVE_UCHAR")) {
in->inputSize = 8;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -3018,7 +3018,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 7;
}
- else if (!HDstrcmp(buffer, "H5T_NATIVE_SHORT")) {
+ else if (!strcmp(buffer, "H5T_NATIVE_SHORT")) {
in->inputSize = 16;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -3030,7 +3030,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 4;
}
- else if (!HDstrcmp(buffer, "H5T_NATIVE_USHORT")) {
+ else if (!strcmp(buffer, "H5T_NATIVE_USHORT")) {
in->inputSize = 16;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -3042,7 +3042,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 7;
}
- else if (!HDstrcmp(buffer, "H5T_NATIVE_INT")) {
+ else if (!strcmp(buffer, "H5T_NATIVE_INT")) {
in->inputSize = 32;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -3054,7 +3054,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 4;
}
- else if (!HDstrcmp(buffer, "H5T_NATIVE_UINT")) {
+ else if (!strcmp(buffer, "H5T_NATIVE_UINT")) {
in->inputSize = 32;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -3066,7 +3066,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 7;
}
- else if (!HDstrcmp(buffer, "H5T_NATIVE_LONG")) {
+ else if (!strcmp(buffer, "H5T_NATIVE_LONG")) {
in->inputSize = 32;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -3078,7 +3078,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 4;
}
- else if (!HDstrcmp(buffer, "H5T_NATIVE_ULONG")) {
+ else if (!strcmp(buffer, "H5T_NATIVE_ULONG")) {
in->inputSize = 32;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -3090,7 +3090,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 7;
}
- else if (!HDstrcmp(buffer, "H5T_NATIVE_LLONG")) {
+ else if (!strcmp(buffer, "H5T_NATIVE_LLONG")) {
in->inputSize = 64;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -3102,7 +3102,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 4;
}
- else if (!HDstrcmp(buffer, "H5T_NATIVE_ULLONG")) {
+ else if (!strcmp(buffer, "H5T_NATIVE_ULLONG")) {
in->inputSize = 64;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -3114,7 +3114,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 7;
}
- else if (!HDstrcmp(buffer, "H5T_IEEE_F32BE")) {
+ else if (!strcmp(buffer, "H5T_IEEE_F32BE")) {
in->inputSize = 32;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -3135,7 +3135,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 3;
}
- else if (!HDstrcmp(buffer, "H5T_IEEE_F32LE")) {
+ else if (!strcmp(buffer, "H5T_IEEE_F32LE")) {
in->inputSize = 32;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -3156,7 +3156,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 3;
}
- else if (!HDstrcmp(buffer, "H5T_IEEE_F64BE")) {
+ else if (!strcmp(buffer, "H5T_IEEE_F64BE")) {
in->inputSize = 64;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -3177,7 +3177,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 3;
}
- else if (!HDstrcmp(buffer, "H5T_IEEE_F64LE")) {
+ else if (!strcmp(buffer, "H5T_IEEE_F64LE")) {
in->inputSize = 64;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -3198,19 +3198,19 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 3;
}
- else if (!HDstrcmp(buffer, "H5T_VAX_F32")) {
+ else if (!strcmp(buffer, "H5T_VAX_F32")) {
in->inputSize = 32;
in->configOptionVector[INPUT_SIZE] = 1;
kindex = 3;
}
- else if (!HDstrcmp(buffer, "H5T_VAX_F64")) {
+ else if (!strcmp(buffer, "H5T_VAX_F64")) {
in->inputSize = 64;
in->configOptionVector[INPUT_SIZE] = 1;
kindex = 3;
}
- else if (!HDstrcmp(buffer, "H5T_NATIVE_FLOAT")) {
+ else if (!strcmp(buffer, "H5T_NATIVE_FLOAT")) {
in->inputSize = 32;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -3222,7 +3222,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 3;
}
- else if (!HDstrcmp(buffer, "H5T_NATIVE_DOUBLE")) {
+ else if (!strcmp(buffer, "H5T_NATIVE_DOUBLE")) {
in->inputSize = 64;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -3234,7 +3234,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 3;
}
- else if (!HDstrcmp(buffer, "H5T_NATIVE_LDOUBLE")) {
+ else if (!strcmp(buffer, "H5T_NATIVE_LDOUBLE")) {
in->inputSize = H5_SIZEOF_LONG_DOUBLE;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -3246,14 +3246,14 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 3;
}
- else if (!HDstrcmp(buffer, "H5T_TIME: not yet implemented")) {
+ else if (!strcmp(buffer, "H5T_TIME: not yet implemented")) {
kindex = -1;
}
- else if (!HDstrcmp(buffer, "H5T_STRING")) {
+ else if (!strcmp(buffer, "H5T_STRING")) {
kindex = 5;
}
/* case H5T_BITFIELD: */
- else if (!HDstrcmp(buffer, "H5T_STD_B8BE")) {
+ else if (!strcmp(buffer, "H5T_STD_B8BE")) {
if ((kindex = OutputArchStrToInt("STD")) == -1) {
(void)fprintf(stderr, "%s", err2);
@@ -3272,7 +3272,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = -1;
}
- else if (!HDstrcmp(buffer, "H5T_STD_B8LE")) {
+ else if (!strcmp(buffer, "H5T_STD_B8LE")) {
if ((kindex = OutputArchStrToInt("STD")) == -1) {
(void)fprintf(stderr, "%s", err2);
@@ -3291,7 +3291,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = -1;
}
- else if (!HDstrcmp(buffer, "H5T_STD_B16BE")) {
+ else if (!strcmp(buffer, "H5T_STD_B16BE")) {
if ((kindex = OutputArchStrToInt("STD")) == -1) {
(void)fprintf(stderr, "%s", err2);
@@ -3310,7 +3310,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = -1;
}
- else if (!HDstrcmp(buffer, "H5T_STD_B16LE")) {
+ else if (!strcmp(buffer, "H5T_STD_B16LE")) {
if ((kindex = OutputArchStrToInt("STD")) == -1) {
(void)fprintf(stderr, "%s", err2);
@@ -3329,7 +3329,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = -1;
}
- else if (!HDstrcmp(buffer, "H5T_STD_B32BE")) {
+ else if (!strcmp(buffer, "H5T_STD_B32BE")) {
if ((kindex = OutputArchStrToInt("STD")) == -1) {
(void)fprintf(stderr, "%s", err2);
@@ -3348,7 +3348,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = -1;
}
- else if (!HDstrcmp(buffer, "H5T_STD_B32LE")) {
+ else if (!strcmp(buffer, "H5T_STD_B32LE")) {
if ((kindex = OutputArchStrToInt("STD")) == -1) {
(void)fprintf(stderr, "%s", err2);
@@ -3367,7 +3367,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = -1;
}
- else if (!HDstrcmp(buffer, "H5T_STD_B64BE")) {
+ else if (!strcmp(buffer, "H5T_STD_B64BE")) {
if ((kindex = OutputArchStrToInt("STD")) == -1) {
(void)fprintf(stderr, "%s", err2);
@@ -3386,7 +3386,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = -1;
}
- else if (!HDstrcmp(buffer, "H5T_STD_B64LE")) {
+ else if (!strcmp(buffer, "H5T_STD_B64LE")) {
if ((kindex = OutputArchStrToInt("STD")) == -1) {
(void)fprintf(stderr, "%s", err2);
@@ -3406,27 +3406,27 @@ getInputClassType(struct Input *in, char *buffer)
kindex = -1;
}
/* case H5T_OPAQUE: */
- else if (!HDstrcmp(buffer, "H5T_OPAQUE")) {
+ else if (!strcmp(buffer, "H5T_OPAQUE")) {
kindex = -1;
}
/* case H5T_COMPOUND: */
- else if (!HDstrcmp(buffer, "H5T_COMPOUND")) {
+ else if (!strcmp(buffer, "H5T_COMPOUND")) {
kindex = -1;
}
/* case H5T_REFERENCE: */
- else if (!HDstrcmp(buffer, "H5T_REFERENCE")) {
+ else if (!strcmp(buffer, "H5T_REFERENCE")) {
kindex = -1;
}
/* case H5T_ENUM: */
- else if (!HDstrcmp(buffer, "H5T_ENUM")) {
+ else if (!strcmp(buffer, "H5T_ENUM")) {
kindex = -1;
}
/* case H5T_VLEN: */
- else if (!HDstrcmp(buffer, "H5T_VLEN")) {
+ else if (!strcmp(buffer, "H5T_VLEN")) {
kindex = -1;
}
/* case H5T_ARRAY: */
- else if (!HDstrcmp(buffer, "H5T_ARRAY")) {
+ else if (!strcmp(buffer, "H5T_ARRAY")) {
kindex = -1;
}
@@ -3454,7 +3454,7 @@ InputClassStrToInt(char *temp)
int i;
char classKeywordTable[8][15] = {"TEXTIN", "TEXTFP", "TEXTFPE", "FP", "IN", "STR", "TEXTUIN", "UIN"};
for (i = 0; i < 8; i++)
- if (!HDstrcmp(classKeywordTable[i], temp))
+ if (!strcmp(classKeywordTable[i], temp))
return i;
return -1;
}
@@ -3484,7 +3484,7 @@ getInputByteOrder(struct Input *in, FILE *strm)
const char *err1 = "Unable to get 'string' value.\n";
const char *err2 = "Invalid value for input byte-order.\n";
- if (HDfscanf(strm, "%254s", temp) != 1) {
+ if (fscanf(strm, "%254s", temp) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -3506,7 +3506,7 @@ getRank(struct Input *in, FILE *strm)
const char *err1 = "Unable to get integer value.\n";
const char *err2 = "Invalid value for rank.\n";
- if (HDfscanf(strm, "%d", (&ival)) != 1) {
+ if (fscanf(strm, "%d", (&ival)) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -3535,7 +3535,7 @@ getDimensionSizes(struct Input *in, FILE *strm)
return (-1);
}
- while (HDfscanf(strm, "%llu", (&ullval)) == 1)
+ while (fscanf(strm, "%llu", (&ullval)) == 1)
in->sizeOfDimension[i++] = ullval;
if (in->rank != i) {
@@ -3561,7 +3561,7 @@ getChunkedDimensionSizes(struct Input *in, FILE *strm)
return (-1);
}
- while (HDfscanf(strm, "%llu", (&ullval)) == 1)
+ while (fscanf(strm, "%llu", (&ullval)) == 1)
in->sizeOfChunk[i++] = ullval;
if (in->rank != i) {
@@ -3594,7 +3594,7 @@ getMaximumDimensionSizes(struct Input *in, FILE *strm)
return (-1);
}
- while (HDfscanf(strm, "%lld", (&llval)) == 1) {
+ while (fscanf(strm, "%lld", (&llval)) == 1) {
if (llval == -1)
in->maxsizeOfDimension[i++] = H5S_UNLIMITED;
else
@@ -3624,7 +3624,7 @@ getOutputArchitecture(struct Input *in, FILE *strm)
const char *err1 = "Unable to get 'string' value.\n";
const char *err2 = "Invalid value for output architecture.\n";
- if (HDfscanf(strm, "%254s", temp) != 1) {
+ if (fscanf(strm, "%254s", temp) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -3644,7 +3644,7 @@ OutputArchStrToInt(const char *temp)
int i;
char outputArchKeywordTable[8][15] = {"NATIVE", "STD", "IEEE", "INTEL", "CRAY", "MIPS", "ALPHA", "UNIX"};
for (i = 0; i < 8; i++)
- if (!HDstrcmp(outputArchKeywordTable[i], temp))
+ if (!strcmp(outputArchKeywordTable[i], temp))
return i;
return -1;
}
@@ -3657,7 +3657,7 @@ getOutputByteOrder(struct Input *in, FILE *strm)
const char *err1 = "Unable to get 'string' value.\n";
const char *err2 = "Invalid value for output byte-order.\n";
- if (HDfscanf(strm, "%254s", temp) != 1) {
+ if (fscanf(strm, "%254s", temp) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -3677,7 +3677,7 @@ OutputByteOrderStrToInt(const char *temp)
int i;
char outputByteOrderKeywordTable[2][15] = {"BE", "LE"};
for (i = 0; i < 2; i++)
- if (!HDstrcmp(outputByteOrderKeywordTable[i], temp))
+ if (!strcmp(outputByteOrderKeywordTable[i], temp))
return i;
return -1;
}
@@ -3690,7 +3690,7 @@ getCompressionType(struct Input *in, FILE *strm)
const char *err1 = "Unable to get 'string' value.\n";
const char *err2 = "Invalid value for compression.\n";
- if (HDfscanf(strm, "%254s", temp) != 1) {
+ if (fscanf(strm, "%254s", temp) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -3713,7 +3713,7 @@ CompressionTypeStrToInt(char *temp)
int i;
char CompressionTypeKeywordTable[1][15] = {"GZIP"};
for (i = 0; i < 1; i++)
- if (!HDstrcmp(CompressionTypeKeywordTable[i], temp))
+ if (!strcmp(CompressionTypeKeywordTable[i], temp))
return i;
return -1;
}
@@ -3732,7 +3732,7 @@ getCompressionParameter(struct Input *in, FILE *strm)
switch (in->compressionType) {
case 0: /* GZIP */
- if (HDfscanf(strm, "%d", (&ival)) != 1) {
+ if (fscanf(strm, "%d", (&ival)) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -3757,14 +3757,14 @@ getExternalFilename(struct Input *in, FILE *strm)
char temp[255];
const char *err1 = "Unable to get 'string' value.\n";
- if (HDfscanf(strm, "%254s", temp) != 1) {
+ if (fscanf(strm, "%254s", temp) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
- temp_len = HDstrlen(temp);
+ temp_len = strlen(temp);
in->externFilename = (char *)malloc((temp_len + 1) * sizeof(char));
- (void)HDstrcpy(in->externFilename, temp);
+ (void)strcpy(in->externFilename, temp);
in->externFilename[temp_len] = '\0';
return (0);
}
@@ -3785,10 +3785,10 @@ setDefaultValues(struct Input *in, int count)
in->rank = 0;
in->path.count = 1;
- HDstrcpy(temp, "dataset");
- HDsnprintf(num, sizeof(num), "%d", count);
- HDstrcat(temp, num);
- HDstrcpy(in->path.group[0], temp);
+ strcpy(temp, "dataset");
+ snprintf(num, sizeof(num), "%d", count);
+ strcat(temp, num);
+ strcpy(in->path.group[0], temp);
in->outputArchitecture = 0; /* NATIVE */
in->outputByteOrder = -1; /* use default */
diff --git a/tools/src/h5jam/h5jam.c b/tools/src/h5jam/h5jam.c
index 6f318a43823..d97d339f98d 100644
--- a/tools/src/h5jam/h5jam.c
+++ b/tools/src/h5jam/h5jam.c
@@ -23,7 +23,7 @@ hsize_t compute_user_block_size(hsize_t);
hsize_t copy_some_to_file(int, int, hsize_t, hsize_t, ssize_t);
void parse_command_line(int, const char *const *);
-static int do_clobber = FALSE;
+static int do_clobber = false;
static char *output_file = NULL;
static char *input_file = NULL;
static char *ub_file = NULL;
@@ -105,22 +105,22 @@ leave(int ret)
void
parse_command_line(int argc, const char *const *argv)
{
- int opt = FALSE;
+ int opt = false;
/* parse command line options */
while ((opt = H5_get_option(argc, argv, s_opts, l_opts)) != EOF) {
switch ((char)opt) {
case 'o':
- output_file = HDstrdup(H5_optarg);
+ output_file = strdup(H5_optarg);
break;
case 'i':
- input_file = HDstrdup(H5_optarg);
+ input_file = strdup(H5_optarg);
break;
case 'u':
- ub_file = HDstrdup(H5_optarg);
+ ub_file = strdup(H5_optarg);
break;
case 'c':
- do_clobber = TRUE;
+ do_clobber = true;
break;
case 'h':
usage(h5tools_getprogname());
@@ -294,7 +294,7 @@ main(int argc, char *argv[])
startub = usize;
if (usize > 0) {
- if (do_clobber == TRUE) {
+ if (do_clobber == true) {
/* where is max of the current size or the new UB */
if (usize > newubsize) {
newubsize = usize;
@@ -420,8 +420,8 @@ copy_some_to_file(int infid, int outfid, hsize_t starting, hsize_t startout, ssi
} /* end if */
while (howmuch > 0) {
- HDlseek(outfid, (off_t)to, SEEK_SET);
- HDlseek(infid, (off_t)from, SEEK_SET);
+ HDlseek(outfid, (HDoff_t)to, SEEK_SET);
+ HDlseek(infid, (HDoff_t)from, SEEK_SET);
if (howmuch > 512) {
nchars = HDread(infid, buf, (unsigned)512);
@@ -499,7 +499,7 @@ write_pad(int ofile, hsize_t old_where, hsize_t *new_where)
buf[0] = '\0';
- HDlseek(ofile, (off_t)old_where, SEEK_SET);
+ HDlseek(ofile, (HDoff_t)old_where, SEEK_SET);
psize = compute_user_block_size(old_where);
psize -= old_where;
diff --git a/tools/src/h5jam/h5unjam.c b/tools/src/h5jam/h5unjam.c
index d752014b011..b2d1e4d8cf0 100644
--- a/tools/src/h5jam/h5unjam.c
+++ b/tools/src/h5jam/h5unjam.c
@@ -24,7 +24,7 @@ hsize_t write_pad(int, hsize_t);
hsize_t compute_pad(hsize_t);
herr_t copy_to_file(FILE *, FILE *, ssize_t, ssize_t);
-int do_delete = FALSE;
+int do_delete = false;
char *output_file = NULL;
char *input_file = NULL;
char *ub_file = NULL;
@@ -92,25 +92,25 @@ usage(const char *prog)
static int
parse_command_line(int argc, const char *const *argv)
{
- int opt = FALSE;
+ int opt = false;
/* parse command line options */
while ((opt = H5_get_option(argc, argv, s_opts, l_opts)) != EOF) {
switch ((char)opt) {
case 'o':
- output_file = HDstrdup(H5_optarg);
+ output_file = strdup(H5_optarg);
if (output_file)
h5tools_set_data_output_file(output_file, 1);
break;
case 'i':
- input_file = HDstrdup(H5_optarg);
+ input_file = strdup(H5_optarg);
if (input_file)
h5tools_set_input_file(input_file, 1);
break;
case 'u':
- ub_file = HDstrdup(H5_optarg);
+ ub_file = strdup(H5_optarg);
if (ub_file)
h5tools_set_output_file(ub_file, 1);
else
@@ -118,7 +118,7 @@ parse_command_line(int argc, const char *const *argv)
break;
case 'd':
- do_delete = TRUE;
+ do_delete = true;
break;
case 'h':
diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c
index 84567c834f5..04c5ff3c02b 100644
--- a/tools/src/h5ls/h5ls.c
+++ b/tools/src/h5ls/h5ls.c
@@ -106,30 +106,30 @@ typedef struct {
const char *fname; /* Filename */
hid_t fid; /* File ID */
hid_t gid; /* Group ID */
- hbool_t symlink_target; /* Whether this is the target of an symbolic link */
+ bool symlink_target; /* Whether this is the target of an symbolic link */
symlink_trav_t *symlink_list; /* List of visited symbolic links */
size_t base_len; /* Length of base path name, if not root */
size_t name_start; /* # of leading characters to strip off path names on output */
} iter_t;
/* Command-line switches */
-static int verbose_g = 0; /* lots of extra output */
-static int width_g = 80; /* output width in characters */
-static hbool_t address_g = FALSE; /* print raw data addresses */
-static hbool_t data_g = FALSE; /* display dataset values? */
-static hbool_t label_g = FALSE; /* label compound values? */
-static hbool_t string_g = FALSE; /* print 1-byte numbers as ASCII? */
-static hbool_t fullname_g = FALSE; /* print full path names */
-static hbool_t recursive_g = FALSE; /* recursive descent listing */
-static hbool_t follow_symlink_g = FALSE; /* follow symbolic links */
-static hbool_t no_dangling_link_g = FALSE; /* treat dangling link is error */
-static hbool_t follow_elink_g = FALSE; /* follow external links */
-static hbool_t grp_literal_g = FALSE; /* list group, not contents */
-static hbool_t hexdump_g = FALSE; /* show data as raw hexadecimal */
-static hbool_t simple_output_g = FALSE; /* make output more machine-readable */
-static hbool_t show_file_name_g = FALSE; /* show file name for full names */
-static hbool_t no_line_wrap_g = FALSE; /* show data content without line wrap */
-static hbool_t display_root_g = FALSE; /* show root group in output? */
+static int verbose_g = 0; /* lots of extra output */
+static int width_g = 80; /* output width in characters */
+static bool address_g = false; /* print raw data addresses */
+static bool data_g = false; /* display dataset values? */
+static bool label_g = false; /* label compound values? */
+static bool string_g = false; /* print 1-byte numbers as ASCII? */
+static bool fullname_g = false; /* print full path names */
+static bool recursive_g = false; /* recursive descent listing */
+static bool follow_symlink_g = false; /* follow symbolic links */
+static bool no_dangling_link_g = false; /* treat dangling link is error */
+static bool follow_elink_g = false; /* follow external links */
+static bool grp_literal_g = false; /* list group, not contents */
+static bool hexdump_g = false; /* show data as raw hexadecimal */
+static bool simple_output_g = false; /* make output more machine-readable */
+static bool show_file_name_g = false; /* show file name for full names */
+static bool no_line_wrap_g = false; /* show data content without line wrap */
+static bool display_root_g = false; /* show root group in output? */
/* Information about how to display each type of object */
static struct dispatch_t {
@@ -147,10 +147,10 @@ static struct dispatch_t {
dispatch_g[TYPE].list2 = (LIST2); \
} while (0)
-static void print_type(h5tools_str_t *buffer, hid_t type, int ind);
-static hbool_t print_int_type(h5tools_str_t *buffer, hid_t type, int ind);
-static hbool_t print_float_type(h5tools_str_t *buffer, hid_t type, int ind);
-static herr_t visit_obj(hid_t file, const char *oname, iter_t *iter);
+static void print_type(h5tools_str_t *buffer, hid_t type, int ind);
+static bool print_int_type(h5tools_str_t *buffer, hid_t type, int ind);
+static bool print_float_type(h5tools_str_t *buffer, hid_t type, int ind);
+static herr_t visit_obj(hid_t file, const char *oname, iter_t *iter);
/*-------------------------------------------------------------------------
* Function: usage
@@ -274,7 +274,7 @@ usage(void)
*-------------------------------------------------------------------------
*/
static int
-print_string(h5tools_str_t *buffer, const char *s, hbool_t escape_spaces)
+print_string(h5tools_str_t *buffer, const char *s, bool escape_spaces)
{
int nprint = 0;
@@ -349,8 +349,8 @@ print_string(h5tools_str_t *buffer, const char *s, hbool_t escape_spaces)
*
* Purpose: Print an object name and another string.
*
- * Return: Success: TRUE
- * Failure: FALSE, nothing printed
+ * Return: Success: true
+ * Failure: false, nothing printed
*-------------------------------------------------------------------------
*/
static int
@@ -361,27 +361,27 @@ print_obj_name(h5tools_str_t *buffer, const iter_t *iter, const char *oname, con
int n;
if (show_file_name_g)
- HDsnprintf(fullname, sizeof(fullname), "%s/%s", iter->fname, oname + iter->name_start);
+ snprintf(fullname, sizeof(fullname), "%s/%s", iter->fname, oname + iter->name_start);
else
name = oname + iter->name_start;
/* Print the object name, either full name or base name */
if (fullname_g)
- n = print_string(buffer, name, TRUE);
+ n = print_string(buffer, name, true);
else {
const char *last_sep; /* The location of the last group separator */
/* Find the last component of the path name */
- if (NULL == (last_sep = HDstrrchr(name, '/')))
+ if (NULL == (last_sep = strrchr(name, '/')))
last_sep = name;
else {
last_sep++;
} /* end else */
- n = print_string(buffer, last_sep, TRUE);
+ n = print_string(buffer, last_sep, true);
} /* end else */
h5tools_str_append(buffer, "%*s ", MAX(0, (24 - n)), s);
- return TRUE;
+ return true;
}
/*-------------------------------------------------------------------------
@@ -389,145 +389,145 @@ print_obj_name(h5tools_str_t *buffer, const iter_t *iter, const char *oname, con
*
* Purpose: Prints the name of a native C data type.
*
- * Return: Success: TRUE
- * Failure: FALSE, nothing printed.
+ * Return: Success: true
+ * Failure: false, nothing printed.
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
print_native_type(h5tools_str_t *buffer, hid_t type, int ind)
{
if (!simple_output_g) {
- if (H5Tequal(type, H5T_NATIVE_SCHAR) == TRUE) {
+ if (H5Tequal(type, H5T_NATIVE_SCHAR) == true) {
h5tools_str_append(buffer, "native signed char");
}
- else if (H5Tequal(type, H5T_NATIVE_UCHAR) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_UCHAR) == true) {
h5tools_str_append(buffer, "native unsigned char");
}
- else if (H5Tequal(type, H5T_NATIVE_INT) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_INT) == true) {
h5tools_str_append(buffer, "native int");
}
- else if (H5Tequal(type, H5T_NATIVE_UINT) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_UINT) == true) {
h5tools_str_append(buffer, "native unsigned int");
}
- else if (H5Tequal(type, H5T_NATIVE_SHORT) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_SHORT) == true) {
h5tools_str_append(buffer, "native short");
}
- else if (H5Tequal(type, H5T_NATIVE_USHORT) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_USHORT) == true) {
h5tools_str_append(buffer, "native unsigned short");
}
- else if (H5Tequal(type, H5T_NATIVE_LONG) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_LONG) == true) {
h5tools_str_append(buffer, "native long");
}
- else if (H5Tequal(type, H5T_NATIVE_ULONG) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_ULONG) == true) {
h5tools_str_append(buffer, "native unsigned long");
}
- else if (H5Tequal(type, H5T_NATIVE_LLONG) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_LLONG) == true) {
h5tools_str_append(buffer, "native long long");
}
- else if (H5Tequal(type, H5T_NATIVE_ULLONG) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_ULLONG) == true) {
h5tools_str_append(buffer, "native unsigned long long");
}
- else if (H5Tequal(type, H5T_NATIVE_FLOAT) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_FLOAT) == true) {
h5tools_str_append(buffer, "native float");
}
- else if (H5Tequal(type, H5T_NATIVE_DOUBLE) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_DOUBLE) == true) {
h5tools_str_append(buffer, "native double");
}
- else if (H5Tequal(type, H5T_NATIVE_INT8) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_INT8) == true) {
h5tools_str_append(buffer, "native int8_t");
}
- else if (H5Tequal(type, H5T_NATIVE_UINT8) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_UINT8) == true) {
h5tools_str_append(buffer, "native uint8_t");
}
- else if (H5Tequal(type, H5T_NATIVE_INT16) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_INT16) == true) {
h5tools_str_append(buffer, "native int16_t");
}
- else if (H5Tequal(type, H5T_NATIVE_UINT16) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_UINT16) == true) {
h5tools_str_append(buffer, "native uint16_t");
}
- else if (H5Tequal(type, H5T_NATIVE_INT32) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_INT32) == true) {
h5tools_str_append(buffer, "native int32_t");
}
- else if (H5Tequal(type, H5T_NATIVE_UINT32) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_UINT32) == true) {
h5tools_str_append(buffer, "native uint32_t");
}
- else if (H5Tequal(type, H5T_NATIVE_INT64) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_INT64) == true) {
h5tools_str_append(buffer, "native int64_t");
}
- else if (H5Tequal(type, H5T_NATIVE_UINT64) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_UINT64) == true) {
h5tools_str_append(buffer, "native uint64_t");
}
- else if (H5Tequal(type, H5T_NATIVE_INT_LEAST8) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_INT_LEAST8) == true) {
h5tools_str_append(buffer, "native int_least8_t");
}
- else if (H5Tequal(type, H5T_NATIVE_UINT_LEAST8) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_UINT_LEAST8) == true) {
h5tools_str_append(buffer, "native uint_least8_t");
}
- else if (H5Tequal(type, H5T_NATIVE_INT_LEAST16) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_INT_LEAST16) == true) {
h5tools_str_append(buffer, "native int_least16_t");
}
- else if (H5Tequal(type, H5T_NATIVE_UINT_LEAST16) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_UINT_LEAST16) == true) {
h5tools_str_append(buffer, "native uint_least16_t");
}
- else if (H5Tequal(type, H5T_NATIVE_INT_LEAST32) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_INT_LEAST32) == true) {
h5tools_str_append(buffer, "native int_least32_t");
}
- else if (H5Tequal(type, H5T_NATIVE_UINT_LEAST32) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_UINT_LEAST32) == true) {
h5tools_str_append(buffer, "native uint_least32_t");
}
- else if (H5Tequal(type, H5T_NATIVE_INT_LEAST64) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_INT_LEAST64) == true) {
h5tools_str_append(buffer, "native int_least64_t");
}
- else if (H5Tequal(type, H5T_NATIVE_UINT_LEAST64) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_UINT_LEAST64) == true) {
h5tools_str_append(buffer, "native uint_least64_t");
}
- else if (H5Tequal(type, H5T_NATIVE_INT_FAST8) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_INT_FAST8) == true) {
h5tools_str_append(buffer, "native int_fast8_t");
}
- else if (H5Tequal(type, H5T_NATIVE_UINT_FAST8) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_UINT_FAST8) == true) {
h5tools_str_append(buffer, "native uint_fast8_t");
}
- else if (H5Tequal(type, H5T_NATIVE_INT_FAST16) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_INT_FAST16) == true) {
h5tools_str_append(buffer, "native int_fast16_t");
}
- else if (H5Tequal(type, H5T_NATIVE_UINT_FAST16) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_UINT_FAST16) == true) {
h5tools_str_append(buffer, "native uint_fast16_t");
}
- else if (H5Tequal(type, H5T_NATIVE_INT_FAST32) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_INT_FAST32) == true) {
h5tools_str_append(buffer, "native int_fast32_t");
}
- else if (H5Tequal(type, H5T_NATIVE_UINT_FAST32) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_UINT_FAST32) == true) {
h5tools_str_append(buffer, "native uint_fast32_t");
}
- else if (H5Tequal(type, H5T_NATIVE_INT_FAST64) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_INT_FAST64) == true) {
h5tools_str_append(buffer, "native int_fast64_t");
}
- else if (H5Tequal(type, H5T_NATIVE_UINT_FAST64) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_UINT_FAST64) == true) {
h5tools_str_append(buffer, "native uint_fast64_t");
}
- else if (H5Tequal(type, H5T_NATIVE_B8) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_B8) == true) {
h5tools_str_append(buffer, "native 8-bit field");
}
- else if (H5Tequal(type, H5T_NATIVE_B16) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_B16) == true) {
h5tools_str_append(buffer, "native 16-bit field");
}
- else if (H5Tequal(type, H5T_NATIVE_B32) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_B32) == true) {
h5tools_str_append(buffer, "native 32-bit field");
}
- else if (H5Tequal(type, H5T_NATIVE_B64) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_B64) == true) {
h5tools_str_append(buffer, "native 64-bit field");
}
- else if (H5Tequal(type, H5T_NATIVE_HSIZE) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_HSIZE) == true) {
h5tools_str_append(buffer, "native hsize_t");
}
- else if (H5Tequal(type, H5T_NATIVE_HSSIZE) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_HSSIZE) == true) {
h5tools_str_append(buffer, "native hssize_t");
}
- else if (H5Tequal(type, H5T_NATIVE_HERR) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_HERR) == true) {
h5tools_str_append(buffer, "native herr_t");
}
- else if (H5Tequal(type, H5T_NATIVE_HBOOL) == TRUE) {
- h5tools_str_append(buffer, "native hbool_t");
+ else if (H5Tequal(type, H5T_NATIVE_HBOOL) == true) {
+ h5tools_str_append(buffer, "native bool");
}
else {
return print_int_type(buffer, type, ind);
@@ -536,7 +536,7 @@ print_native_type(h5tools_str_t *buffer, hid_t type, int ind)
else {
return print_int_type(buffer, type, ind);
}
- return TRUE;
+ return true;
}
/*-------------------------------------------------------------------------
@@ -544,29 +544,29 @@ print_native_type(h5tools_str_t *buffer, hid_t type, int ind)
*
* Purpose: Print the name of an IEEE floating-point data type.
*
- * Return: Success: TRUE
- * Failure: FALSE, nothing printed
+ * Return: Success: true
+ * Failure: false, nothing printed
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
print_ieee_type(h5tools_str_t *buffer, hid_t type, int ind)
{
- if (H5Tequal(type, H5T_IEEE_F32BE) == TRUE) {
+ if (H5Tequal(type, H5T_IEEE_F32BE) == true) {
h5tools_str_append(buffer, "IEEE 32-bit big-endian float");
}
- else if (H5Tequal(type, H5T_IEEE_F32LE) == TRUE) {
+ else if (H5Tequal(type, H5T_IEEE_F32LE) == true) {
h5tools_str_append(buffer, "IEEE 32-bit little-endian float");
}
- else if (H5Tequal(type, H5T_IEEE_F64BE) == TRUE) {
+ else if (H5Tequal(type, H5T_IEEE_F64BE) == true) {
h5tools_str_append(buffer, "IEEE 64-bit big-endian float");
}
- else if (H5Tequal(type, H5T_IEEE_F64LE) == TRUE) {
+ else if (H5Tequal(type, H5T_IEEE_F64LE) == true) {
h5tools_str_append(buffer, "IEEE 64-bit little-endian float");
}
else {
return print_float_type(buffer, type, ind);
}
- return TRUE;
+ return true;
}
/*-------------------------------------------------------------------------
@@ -661,11 +661,11 @@ print_precision(h5tools_str_t *buffer, hid_t type, int ind)
* the first line. Additional information might appear in
* parentheses on the following lines.
*
- * Return: Success: TRUE
- * Failure: FALSE, nothing printed
+ * Return: Success: true
+ * Failure: false, nothing printed
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
print_int_type(h5tools_str_t *buffer, hid_t type, int ind)
{
H5T_order_t order; /* byte order value */
@@ -674,7 +674,7 @@ print_int_type(h5tools_str_t *buffer, hid_t type, int ind)
const char *sign_s = NULL; /* sign scheme string */
if (H5T_INTEGER != H5Tget_class(type))
- return FALSE;
+ return false;
/* Byte order */
if (H5Tget_size(type) > 1) {
@@ -717,7 +717,7 @@ print_int_type(h5tools_str_t *buffer, hid_t type, int ind)
h5tools_str_append(buffer, "%lu-bit%s%s integer", (unsigned long)(8 * H5Tget_size(type)), order_s,
sign_s);
print_precision(buffer, type, ind);
- return TRUE;
+ return true;
}
/*-------------------------------------------------------------------------
@@ -725,11 +725,11 @@ print_int_type(h5tools_str_t *buffer, hid_t type, int ind)
*
* Purpose: Print info about a floating point data type.
*
- * Return: Success: TRUE
- * Failure: FALSE, nothing printed
+ * Return: Success: true
+ * Failure: false, nothing printed
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
print_float_type(h5tools_str_t *buffer, hid_t type, int ind)
{
H5T_order_t order; /* byte order value */
@@ -744,7 +744,7 @@ print_float_type(h5tools_str_t *buffer, hid_t type, int ind)
const char *pad_s = NULL; /* internal padding string */
if (H5T_FLOAT != H5Tget_class(type))
- return FALSE;
+ return false;
/* Byte order */
if (H5Tget_size(type) > 1) {
@@ -820,7 +820,7 @@ print_float_type(h5tools_str_t *buffer, hid_t type, int ind)
}
h5tools_str_append(buffer, "\n%*s(internal padding bits are %s)", ind, "", pad_s);
}
- return TRUE;
+ return true;
}
/*-------------------------------------------------------------------------
@@ -828,11 +828,11 @@ print_float_type(h5tools_str_t *buffer, hid_t type, int ind)
*
* Purpose: Print info about a compound data type.
*
- * Return: Success: TRUE
- * Failure: FALSE, nothing printed
+ * Return: Success: true
+ * Failure: false, nothing printed
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
print_cmpd_type(h5tools_str_t *buffer, hid_t type, int ind)
{
char *name = NULL; /* member name */
@@ -843,16 +843,16 @@ print_cmpd_type(h5tools_str_t *buffer, hid_t type, int ind)
unsigned i; /* miscellaneous counters */
if (H5T_COMPOUND != H5Tget_class(type))
- return FALSE;
+ return false;
if ((nmembs = H5Tget_nmembers(type)) < 0)
- return FALSE;
+ return false;
h5tools_str_append(buffer, "struct {");
for (i = 0; i < (unsigned)nmembs; i++) {
/* Name and offset */
name = H5Tget_member_name(type, i);
h5tools_str_append(buffer, "\n%*s\"", ind + 4, "");
- n = print_string(buffer, name, FALSE);
+ n = print_string(buffer, name, false);
h5tools_str_append(buffer, "\"%*s +%-4lu ", MAX(0, 16 - n), "",
(unsigned long)H5Tget_member_offset(type, i));
H5free_memory(name);
@@ -865,7 +865,7 @@ print_cmpd_type(h5tools_str_t *buffer, hid_t type, int ind)
size = H5Tget_size(type);
h5tools_str_append(buffer, "\n%*s} %lu byte%s", ind, "", (unsigned long)size, 1 == size ? "" : "s");
- return TRUE;
+ return true;
}
/*-------------------------------------------------------------------------
@@ -873,20 +873,20 @@ print_cmpd_type(h5tools_str_t *buffer, hid_t type, int ind)
*
* Purpose: Print info about an enumeration data type.
*
- * Return: Success: TRUE
- * Failure: FALSE, nothing printed
+ * Return: Success: true
+ * Failure: false, nothing printed
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
print_enum_type(h5tools_str_t *buffer, hid_t type, int ind)
{
int nmembs; /* number of members */
hid_t super; /* enum base integer type */
if (H5T_ENUM != H5Tget_class(type))
- return FALSE;
+ return false;
if ((nmembs = H5Tget_nmembers(type)) < 0)
- return FALSE;
+ return false;
super = H5Tget_super(type);
h5tools_str_append(buffer, "enum ");
@@ -933,7 +933,7 @@ print_enum_type(h5tools_str_t *buffer, hid_t type, int ind)
free(value);
H5Tclose(super);
- return FALSE;
+ return false;
}
/* Sort members by increasing value */
@@ -944,7 +944,7 @@ print_enum_type(h5tools_str_t *buffer, hid_t type, int ind)
int nchars; /* number of output characters */
h5tools_str_append(buffer, "\n%*s", ind + 4, "");
- nchars = print_string(buffer, name[i], TRUE);
+ nchars = print_string(buffer, name[i], true);
h5tools_str_append(buffer, "%*s = ", MAX(0, 16 - nchars), "");
if (native < 0) {
@@ -981,7 +981,7 @@ print_enum_type(h5tools_str_t *buffer, hid_t type, int ind)
H5Tclose(super);
- return TRUE;
+ return true;
}
/*-------------------------------------------------------------------------
@@ -989,11 +989,11 @@ print_enum_type(h5tools_str_t *buffer, hid_t type, int ind)
*
* Purpose: Print information about a string data type.
*
- * Return: Success: TRUE
- * Failure: FALSE, nothing printed
+ * Return: Success: true
+ * Failure: false, nothing printed
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
print_string_type(h5tools_str_t *buffer, hid_t type, int H5_ATTR_UNUSED ind)
{
H5T_str_t pad;
@@ -1002,7 +1002,7 @@ print_string_type(h5tools_str_t *buffer, hid_t type, int H5_ATTR_UNUSED ind)
const char *cset_s = NULL;
if (H5T_STRING != H5Tget_class(type))
- return FALSE;
+ return false;
/* Padding */
pad = H5Tget_strpad(type);
@@ -1073,7 +1073,7 @@ print_string_type(h5tools_str_t *buffer, hid_t type, int H5_ATTR_UNUSED ind)
h5tools_str_append(buffer, "%lu-byte", (unsigned long)H5Tget_size(type));
}
h5tools_str_append(buffer, " %s %s string", pad_s, cset_s);
- return TRUE;
+ return true;
}
/*-------------------------------------------------------------------------
@@ -1081,30 +1081,30 @@ print_string_type(h5tools_str_t *buffer, hid_t type, int H5_ATTR_UNUSED ind)
*
* Purpose: Prints information about a reference data type.
*
- * Return: Success: TRUE
- * Failure: FALSE, nothing printed
+ * Return: Success: true
+ * Failure: false, nothing printed
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
print_reference_type(h5tools_str_t *buffer, hid_t type, int H5_ATTR_UNUSED ind)
{
if (H5T_REFERENCE != H5Tget_class(type))
- return FALSE;
+ return false;
- if (H5Tequal(type, H5T_STD_REF) == TRUE) {
+ if (H5Tequal(type, H5T_STD_REF) == true) {
h5tools_str_append(buffer, "standard reference");
}
- else if (H5Tequal(type, H5T_STD_REF_OBJ) == TRUE) {
+ else if (H5Tequal(type, H5T_STD_REF_OBJ) == true) {
h5tools_str_append(buffer, "object reference");
}
- else if (H5Tequal(type, H5T_STD_REF_DSETREG) == TRUE) {
+ else if (H5Tequal(type, H5T_STD_REF_DSETREG) == true) {
h5tools_str_append(buffer, "dataset region reference");
}
else {
h5tools_str_append(buffer, "%lu-byte unknown reference", (unsigned long)H5Tget_size(type));
}
- return TRUE;
+ return true;
}
/*-------------------------------------------------------------------------
@@ -1112,28 +1112,28 @@ print_reference_type(h5tools_str_t *buffer, hid_t type, int H5_ATTR_UNUSED ind)
*
* Purpose: Prints information about an opaque data type.
*
- * Return: Success: TRUE
- * Failure: FALSE, nothing printed
+ * Return: Success: true
+ * Failure: false, nothing printed
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
print_opaque_type(h5tools_str_t *buffer, hid_t type, int ind)
{
char *tag;
size_t size;
if (H5T_OPAQUE != H5Tget_class(type))
- return FALSE;
+ return false;
size = H5Tget_size(type);
h5tools_str_append(buffer, "%lu-byte opaque type", (unsigned long)size);
if ((tag = H5Tget_tag(type))) {
h5tools_str_append(buffer, "\n%*s(tag = \"", ind, "");
- print_string(buffer, tag, FALSE);
+ print_string(buffer, tag, false);
h5tools_str_append(buffer, "\")");
H5free_memory(tag);
}
- return TRUE;
+ return true;
}
/*-------------------------------------------------------------------------
@@ -1141,33 +1141,33 @@ print_opaque_type(h5tools_str_t *buffer, hid_t type, int ind)
*
* Purpose: Print information about a variable-length type
*
- * Return: Success: TRUE
- * Failure: FALSE
+ * Return: Success: true
+ * Failure: false
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
print_vlen_type(h5tools_str_t *buffer, hid_t type, int ind)
{
hid_t super;
if (H5T_VLEN != H5Tget_class(type))
- return FALSE;
+ return false;
h5tools_str_append(buffer, "variable length of\n%*s", ind + 4, "");
super = H5Tget_super(type);
print_type(buffer, super, ind + 4);
H5Tclose(super);
- return TRUE;
+ return true;
}
/*---------------------------------------------------------------------------
* Purpose: Print information about an array type
*
- * Return: Success: TRUE
- * Failure: FALSE
+ * Return: Success: true
+ * Failure: false
*---------------------------------------------------------------------------
*/
-static hbool_t
+static bool
print_array_type(h5tools_str_t *buffer, hid_t type, int ind)
{
hid_t super;
@@ -1175,7 +1175,7 @@ print_array_type(h5tools_str_t *buffer, hid_t type, int ind)
hsize_t *dims = NULL;
if (H5T_ARRAY != H5Tget_class(type))
- return FALSE;
+ return false;
ndims = H5Tget_array_ndims(type);
if (ndims) {
dims = (hsize_t *)malloc((unsigned)ndims * sizeof(dims[0]));
@@ -1196,7 +1196,7 @@ print_array_type(h5tools_str_t *buffer, hid_t type, int ind)
super = H5Tget_super(type);
print_type(buffer, super, ind + 4);
H5Tclose(super);
- return TRUE;
+ return true;
}
/*-------------------------------------------------------------------------
@@ -1204,18 +1204,18 @@ print_array_type(h5tools_str_t *buffer, hid_t type, int ind)
*
* Purpose: Print information about a bitfield type.
*
- * Return: Success: TRUE
- * Failure: FALSE, nothing printed
+ * Return: Success: true
+ * Failure: false, nothing printed
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
print_bitfield_type(h5tools_str_t *buffer, hid_t type, int ind)
{
H5T_order_t order; /* byte order value */
const char *order_s = NULL; /* byte order string */
if (H5T_BITFIELD != H5Tget_class(type))
- return FALSE;
+ return false;
if (H5Tget_size(type) > 1) {
order = H5Tget_order(type);
if (H5T_ORDER_LE == order) {
@@ -1237,7 +1237,7 @@ print_bitfield_type(h5tools_str_t *buffer, hid_t type, int ind)
h5tools_str_append(buffer, "%lu-bit%s bitfield", (unsigned long)(8 * H5Tget_size(type)), order_s);
print_precision(buffer, type, ind);
- return TRUE;
+ return true;
}
/*-------------------------------------------------------------------------
@@ -1381,23 +1381,23 @@ dump_dataset_values(hid_t dset)
}
outputformat.arr_linebreak = 0;
/* Floating point types should display full precision */
- HDsnprintf(fmt_float, sizeof(fmt_float), "%%1.%dg", FLT_DIG);
+ snprintf(fmt_float, sizeof(fmt_float), "%%1.%dg", FLT_DIG);
outputformat.fmt_float = fmt_float;
- HDsnprintf(fmt_double, sizeof(fmt_double), "%%1.%dg", DBL_DIG);
+ snprintf(fmt_double, sizeof(fmt_double), "%%1.%dg", DBL_DIG);
outputformat.fmt_double = fmt_double;
if (hexdump_g) {
/* Print all data in hexadecimal format if the `-x' or `--hexdump'
* command line switch was given. */
- outputformat.raw = TRUE;
+ outputformat.raw = true;
}
else if (string_g && H5Tget_size(f_type) == 1 && (H5Tget_class(f_type) == H5T_INTEGER)) {
/* Print 1-byte integer data as an ASCI character string instead of
* integers if the `-s' or `--string' command-line option was given. */
- outputformat.ascii = TRUE;
+ outputformat.ascii = true;
outputformat.elmt_suf1 = "";
outputformat.elmt_suf2 = "";
- HDsnprintf(string_prefix, sizeof(string_prefix), "%s\"", outputformat.line_pre);
+ snprintf(string_prefix, sizeof(string_prefix), "%s\"", outputformat.line_pre);
outputformat.line_pre = string_prefix;
outputformat.line_suf = "\"";
}
@@ -1412,7 +1412,7 @@ dump_dataset_values(hid_t dset)
h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos, (size_t)info->line_ncols, (hsize_t)0,
(hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
ctx.cur_column = (size_t)curr_pos;
if (H5Tget_class(f_type) == H5T_REFERENCE) {
H5TOOLS_DEBUG("reference class type");
@@ -1428,7 +1428,7 @@ dump_dataset_values(hid_t dset)
H5Sget_simple_extent_dims(space, total_size, NULL);
init_acc_pos(ctx.ndims, total_size, ctx.acc, ctx.pos, ctx.p_min_idx);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
if (NULL !=
(ref_buf = (H5R_ref_t *)calloc(MAX(sizeof(unsigned), sizeof(H5R_ref_t)), (size_t)ndims))) {
@@ -1550,23 +1550,23 @@ dump_attribute_values(hid_t attr)
}
outputformat.arr_linebreak = 0;
/* Floating point types should display full precision */
- HDsnprintf(fmt_float, sizeof(fmt_float), "%%1.%dg", FLT_DIG);
+ snprintf(fmt_float, sizeof(fmt_float), "%%1.%dg", FLT_DIG);
outputformat.fmt_float = fmt_float;
- HDsnprintf(fmt_double, sizeof(fmt_double), "%%1.%dg", DBL_DIG);
+ snprintf(fmt_double, sizeof(fmt_double), "%%1.%dg", DBL_DIG);
outputformat.fmt_double = fmt_double;
if (hexdump_g) {
/* Print all data in hexadecimal format if the `-x' or `--hexdump'
* command line switch was given. */
- outputformat.raw = TRUE;
+ outputformat.raw = true;
}
else if (string_g && H5Tget_size(f_type) == 1 && (H5Tget_class(f_type) == H5T_INTEGER)) {
/* Print 1-byte integer data as an ASCI character string instead of
* integers if the `-s' or `--string' command-line option was given. */
- outputformat.ascii = TRUE;
+ outputformat.ascii = true;
outputformat.elmt_suf1 = "";
outputformat.elmt_suf2 = "";
- HDsnprintf(string_prefix, sizeof(string_prefix), "%s\"", outputformat.line_pre);
+ snprintf(string_prefix, sizeof(string_prefix), "%s\"", outputformat.line_pre);
outputformat.line_pre = string_prefix;
outputformat.line_suf = "\"";
}
@@ -1582,7 +1582,7 @@ dump_attribute_values(hid_t attr)
h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos, (size_t)info->line_ncols, (hsize_t)0,
(hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
ctx.cur_column = (size_t)curr_pos;
if (H5Tget_class(f_type) == H5T_REFERENCE) {
H5TOOLS_DEBUG("reference class type");
@@ -1598,7 +1598,7 @@ dump_attribute_values(hid_t attr)
H5Sget_simple_extent_dims(space, total_size, NULL);
init_acc_pos(ctx.ndims, total_size, ctx.acc, ctx.pos, ctx.p_min_idx);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
if (NULL !=
(ref_buf = (H5R_ref_t *)calloc(MAX(sizeof(unsigned), sizeof(H5R_ref_t)), (size_t)ndims))) {
@@ -1675,7 +1675,7 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ain
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, " Attribute: ");
- print_string(&buffer, attr_name, TRUE);
+ print_string(&buffer, attr_name, true);
H5TOOLS_DEBUG("Attribute name:%s", attr_name);
if ((attr = H5Aopen(obj, attr_name, H5P_DEFAULT)) >= 0) {
@@ -1876,7 +1876,7 @@ dataset_list2(hid_t dset, const char H5_ATTR_UNUSED *name)
for (i = 0, max_len = 0; i < nf; i++) {
if (H5Pget_external(dcpl, (unsigned)i, sizeof(f_name), f_name, NULL, NULL) < 0)
continue;
- n = print_string(NULL, f_name, TRUE);
+ n = print_string(NULL, f_name, true);
max_len = MAX(max_len, n);
} /* end for */
h5tools_str_append(&buffer, " %-10s %d external file%s\n", "Extern:", nf,
@@ -1899,13 +1899,13 @@ dataset_list2(hid_t dset, const char H5_ATTR_UNUSED *name)
h5tools_str_append(&buffer,
" #%03d %10" PRIuHSIZE " %10" PRIuHSIZE " %10s ", i,
total, (hsize_t)f_offset, "INF");
- print_string(&buffer, f_name, TRUE);
+ print_string(&buffer, f_name, true);
}
else {
h5tools_str_append(
&buffer, " #%03d %10" PRIuHSIZE " %10" PRIuHSIZE " %10" PRIuHSIZE " ",
i, total, (hsize_t)f_offset, f_size);
- print_string(&buffer, f_name, TRUE);
+ print_string(&buffer, f_name, true);
}
h5tools_str_append(&buffer, "\n");
total += f_size;
@@ -1932,9 +1932,9 @@ dataset_list2(hid_t dset, const char H5_ATTR_UNUSED *name)
H5Pget_virtual_filename(dcpl, next, f_name, sizeof(f_name));
H5Pget_virtual_dsetname(dcpl, next, dset_name, sizeof(dset_name));
h5tools_str_append(&buffer, " %-10s ", " ");
- print_string(&buffer, f_name, TRUE);
+ print_string(&buffer, f_name, true);
h5tools_str_append(&buffer, " ");
- print_string(&buffer, dset_name, TRUE);
+ print_string(&buffer, dset_name, true);
h5tools_str_append(&buffer, "\n");
}
h5tools_str_append(&buffer, " %-10s}\n", " ");
@@ -1995,7 +1995,7 @@ dataset_list2(hid_t dset, const char H5_ATTR_UNUSED *name)
filt_id = H5Pget_filter2(dcpl, (unsigned)i, &filt_flags, &cd_nelmts, cd_values,
sizeof(f_name), f_name, NULL);
f_name[sizeof(f_name) - 1] = '\0';
- HDsnprintf(s, sizeof(s), "Filter-%d:", i);
+ snprintf(s, sizeof(s), "Filter-%d:", i);
h5tools_str_append(&buffer, " %-10s %s-%u %s {", s, (f_name[0] ? f_name : "method"),
(unsigned)filt_id, ((filt_flags & H5Z_FLAG_OPTIONAL) ? "OPT" : ""));
for (cd_num = 0; cd_num < cd_nelmts; cd_num++)
@@ -2114,7 +2114,7 @@ list_obj(const char *name, const H5O_info2_t *oinfo, const char *first_seen, voi
if (first_seen) {
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, ", same as ");
- print_string(&buffer, first_seen, TRUE);
+ print_string(&buffer, first_seen, true);
if (!iter->symlink_target) {
h5tools_str_append(&buffer, "\n");
}
@@ -2182,7 +2182,7 @@ list_obj(const char *name, const H5O_info2_t *oinfo, const char *first_seen, voi
else
tm = HDlocaltime(&(oinfo->mtime));
if (tm) {
- HDstrftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm);
+ strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm);
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, " %-10s %s\n", "Modified:", buf);
h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos,
@@ -2210,7 +2210,7 @@ list_obj(const char *name, const H5O_info2_t *oinfo, const char *first_seen, voi
comment[cmt_bufsize] = 0;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, " %-10s \"", "Comment:");
- print_string(&buffer, comment, FALSE);
+ print_string(&buffer, comment, false);
h5tools_str_append(&buffer, "\"\n");
h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos,
(size_t)info->line_ncols, (hsize_t)0, (hsize_t)0);
@@ -2236,7 +2236,7 @@ list_obj(const char *name, const H5O_info2_t *oinfo, const char *first_seen, voi
h5tools_str_append(&buffer, "}\n");
h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos, (size_t)info->line_ncols,
(hsize_t)0, (hsize_t)0);
- iter->symlink_target = FALSE;
+ iter->symlink_target = false;
}
h5tools_str_close(&buffer);
@@ -2292,7 +2292,7 @@ list_lnk(const char *name, const H5L_info2_t *linfo, void *_iter)
goto done;
/* no dangling link option given and detect dangling link */
else if (no_dangling_link_g && ret == 0)
- iter->symlink_list->dangle_link = TRUE;
+ iter->symlink_list->dangle_link = true;
h5tools_str_append(&buffer, "Soft Link {");
h5tools_str_append(&buffer, "%s", buf);
@@ -2300,7 +2300,7 @@ list_lnk(const char *name, const H5L_info2_t *linfo, void *_iter)
h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos, (size_t)info->line_ncols,
(hsize_t)0, (hsize_t)0);
if (follow_symlink_g) {
- hbool_t orig_grp_literal = grp_literal_g;
+ bool orig_grp_literal = grp_literal_g;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, " ");
@@ -2320,12 +2320,12 @@ list_lnk(const char *name, const H5L_info2_t *linfo, void *_iter)
/* Adjust user data to specify that we are operating on the
* target of an soft link */
- iter->symlink_target = TRUE;
+ iter->symlink_target = true;
/* Prevent recursive listing of soft link target if
* recursive_g is off */
if (!recursive_g)
- grp_literal_g = TRUE;
+ grp_literal_g = true;
/* Recurse through the soft link */
if (visit_obj(iter->fid, name, iter) < 0) {
grp_literal_g = orig_grp_literal;
@@ -2346,7 +2346,7 @@ list_lnk(const char *name, const H5L_info2_t *linfo, void *_iter)
case H5L_TYPE_EXTERNAL: {
const char *filename;
const char *path;
- hbool_t follow_link = follow_symlink_g || follow_elink_g;
+ bool follow_link = follow_symlink_g || follow_elink_g;
ret = H5tools_get_symlink_info(iter->fid, name, &lnk_info, follow_link);
/* lnk_info.trg_path is malloced in H5tools_get_symlink_info()
@@ -2357,7 +2357,7 @@ list_lnk(const char *name, const H5L_info2_t *linfo, void *_iter)
goto done;
/* no dangling link option given and detect dangling link */
else if (no_dangling_link_g && ret == 0)
- iter->symlink_list->dangle_link = TRUE;
+ iter->symlink_list->dangle_link = true;
if (H5Lunpack_elink_val(buf, linfo->u.val_size, NULL, &filename, &path) < 0)
goto done;
@@ -2375,7 +2375,7 @@ list_lnk(const char *name, const H5L_info2_t *linfo, void *_iter)
/* Recurse through the external link */
/* keep the follow_elink_g for backward compatibility with -E */
if (follow_link) {
- hbool_t orig_grp_literal = grp_literal_g;
+ bool orig_grp_literal = grp_literal_g;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, " ");
@@ -2396,12 +2396,12 @@ list_lnk(const char *name, const H5L_info2_t *linfo, void *_iter)
/* Adjust user data to specify that we are operating on the
* target of an external link */
- iter->symlink_target = TRUE;
+ iter->symlink_target = true;
/* Prevent recursive listing of external link target if
* recursive_g is off */
if (!recursive_g)
- grp_literal_g = TRUE;
+ grp_literal_g = true;
/* Recurse through the external link */
if (visit_obj(iter->fid, name, iter) < 0) {
@@ -2461,7 +2461,7 @@ visit_obj(hid_t file, const char *oname, iter_t *iter)
if (H5Oget_info_by_name3(file, oname, &oi, H5O_INFO_BASIC | H5O_INFO_TIME, H5P_DEFAULT) < 0) {
if (iter->symlink_target) {
h5tools_str_append(&buffer, "{**NOT FOUND**}\n");
- iter->symlink_target = FALSE;
+ iter->symlink_target = false;
}
else
print_obj_name(&buffer, iter, oname, "**NOT FOUND**");
@@ -2488,7 +2488,7 @@ visit_obj(hid_t file, const char *oname, iter_t *iter)
iter->name_start = iter->base_len;
/* Specified name is a group. List the complete contents of the group. */
- h5trav_visit(file, oname, (hbool_t)(display_root_g || iter->symlink_target), recursive_g, list_obj,
+ h5trav_visit(file, oname, (bool)(display_root_g || iter->symlink_target), recursive_g, list_obj,
list_lnk, iter, H5O_INFO_BASIC | H5O_INFO_TIME);
/* Close group */
@@ -2529,7 +2529,7 @@ get_width(void)
/* Try to get it from the COLUMNS environment variable first since it's
* value is sometimes wrong. */
- if ((s = HDgetenv("COLUMNS")) && *s && isdigit((int)*s))
+ if ((s = getenv("COLUMNS")) && *s && isdigit((int)*s))
width = (int)strtol(s, NULL, 0);
#if defined(H5_HAVE_STRUCT_VIDEOCONFIG) && defined(H5_HAVE__GETVIDEOCONFIG)
@@ -2587,24 +2587,24 @@ get_width(void)
*
* Purpose: check if command line arguments are valid
*
- * Return: Success: TRUE (1)
- * Failure: FALSE (0)
+ * Return: Success: true (1)
+ * Failure: false (0)
*-------------------------------------------------------------------------*/
-static hbool_t
+static bool
is_valid_args(void)
{
- hbool_t ret = TRUE;
+ bool ret = true;
if (recursive_g && grp_literal_g) {
fprintf(rawerrorstream, "Error: 'recursive' option not compatible with 'group info' option!\n\n");
- ret = FALSE;
+ ret = false;
goto out;
}
if (no_dangling_link_g && !follow_symlink_g) {
fprintf(rawerrorstream,
"Error: --no-dangling-links must be used along with --follow-symlinks option!\n\n");
- ret = FALSE;
+ ret = false;
goto out;
}
@@ -2649,8 +2649,8 @@ main(int argc, char *argv[])
char drivername[50];
int err_exit = 0;
hid_t fapl_id = H5P_DEFAULT;
- hbool_t custom_vol_fapl = FALSE;
- hbool_t custom_vfd_fapl = FALSE;
+ bool custom_vol_fapl = false;
+ bool custom_vfd_fapl = false;
h5tools_vol_info_t vol_info = {0};
h5tools_vfd_info_t vfd_info = {0};
@@ -2659,7 +2659,7 @@ main(int argc, char *argv[])
H5FD_ros3_fapl_ext_t ros3_fa = {
{
1, /* Structure Version */
- FALSE, /* Authenticate? */
+ false, /* Authenticate? */
"", /* AWS Region */
"", /* Access Key ID */
"", /* Secret Access Key */
@@ -2700,98 +2700,98 @@ main(int argc, char *argv[])
/* Switches come before non-switch arguments */
for (argno = 1; argno < argc && '-' == argv[argno][0]; argno++) {
- if (!HDstrcmp(argv[argno], "--")) {
+ if (!strcmp(argv[argno], "--")) {
/* Last switch */
argno++;
break;
}
- else if (!HDstrcmp(argv[argno], "--help")) {
+ else if (!strcmp(argv[argno], "--help")) {
usage();
leave(EXIT_SUCCESS);
}
- else if (!HDstrcmp(argv[argno], "--address")) {
- address_g = TRUE;
+ else if (!strcmp(argv[argno], "--address")) {
+ address_g = true;
}
- else if (!HDstrcmp(argv[argno], "--data")) {
- data_g = TRUE;
+ else if (!strcmp(argv[argno], "--data")) {
+ data_g = true;
}
- else if (!HDstrcmp(argv[argno], "--enable-error-stack")) {
+ else if (!strcmp(argv[argno], "--enable-error-stack")) {
enable_error_stack = 1;
}
- else if (!HDstrcmp(argv[argno], "--errors")) {
+ else if (!strcmp(argv[argno], "--errors")) {
/* deprecated --errors */
enable_error_stack = 1;
}
- else if (!HDstrcmp(argv[argno], "--follow-symlinks")) {
- follow_symlink_g = TRUE;
+ else if (!strcmp(argv[argno], "--follow-symlinks")) {
+ follow_symlink_g = true;
}
- else if (!HDstrcmp(argv[argno], "--no-dangling-links")) {
- no_dangling_link_g = TRUE;
+ else if (!strcmp(argv[argno], "--no-dangling-links")) {
+ no_dangling_link_g = true;
}
- else if (!HDstrcmp(argv[argno], "--external")) {
- follow_elink_g = TRUE;
+ else if (!strcmp(argv[argno], "--external")) {
+ follow_elink_g = true;
}
- else if (!HDstrcmp(argv[argno], "--full")) {
- fullname_g = TRUE;
+ else if (!strcmp(argv[argno], "--full")) {
+ fullname_g = true;
}
- else if (!HDstrcmp(argv[argno], "--group")) {
- grp_literal_g = TRUE;
+ else if (!strcmp(argv[argno], "--group")) {
+ grp_literal_g = true;
}
- else if (!HDstrcmp(argv[argno], "--label")) {
- label_g = TRUE;
+ else if (!strcmp(argv[argno], "--label")) {
+ label_g = true;
}
- else if (!HDstrcmp(argv[argno], "--recursive")) {
- recursive_g = TRUE;
- fullname_g = TRUE;
+ else if (!strcmp(argv[argno], "--recursive")) {
+ recursive_g = true;
+ fullname_g = true;
}
- else if (!HDstrcmp(argv[argno], "--simple")) {
- simple_output_g = TRUE;
+ else if (!strcmp(argv[argno], "--simple")) {
+ simple_output_g = true;
}
- else if (!HDstrcmp(argv[argno], "--string")) {
- string_g = TRUE;
+ else if (!strcmp(argv[argno], "--string")) {
+ string_g = true;
}
- else if (!HDstrncmp(argv[argno], "--vol-value=", (size_t)12)) {
+ else if (!strncmp(argv[argno], "--vol-value=", (size_t)12)) {
vol_info.type = VOL_BY_VALUE;
vol_info.u.value = (H5VL_class_value_t)atoi(argv[argno] + 12);
- custom_vol_fapl = TRUE;
+ custom_vol_fapl = true;
}
- else if (!HDstrncmp(argv[argno], "--vol-name=", (size_t)11)) {
+ else if (!strncmp(argv[argno], "--vol-name=", (size_t)11)) {
vol_info.type = VOL_BY_NAME;
vol_info.u.name = argv[argno] + 11;
- custom_vol_fapl = TRUE;
+ custom_vol_fapl = true;
}
- else if (!HDstrncmp(argv[argno], "--vol-info=", (size_t)11)) {
+ else if (!strncmp(argv[argno], "--vol-info=", (size_t)11)) {
vol_info.info_string = argv[argno] + 11;
}
- else if (!HDstrncmp(argv[argno], "--vfd=", (size_t)6)) {
+ else if (!strncmp(argv[argno], "--vfd=", (size_t)6)) {
vfd_info.type = VFD_BY_NAME;
vfd_info.u.name = argv[argno] + 6;
- custom_vfd_fapl = TRUE;
+ custom_vfd_fapl = true;
}
- else if (!HDstrncmp(argv[argno], "--vfd-value=", (size_t)12)) {
+ else if (!strncmp(argv[argno], "--vfd-value=", (size_t)12)) {
vfd_info.type = VFD_BY_VALUE;
vfd_info.u.value = (H5FD_class_value_t)atoi(argv[argno] + 12);
- custom_vfd_fapl = TRUE;
+ custom_vfd_fapl = true;
}
- else if (!HDstrncmp(argv[argno], "--vfd-name=", (size_t)11)) {
+ else if (!strncmp(argv[argno], "--vfd-name=", (size_t)11)) {
vfd_info.type = VFD_BY_NAME;
vfd_info.u.name = argv[argno] + 11;
- custom_vfd_fapl = TRUE;
+ custom_vfd_fapl = true;
}
- else if (!HDstrncmp(argv[argno], "--vfd-info=", (size_t)11)) {
+ else if (!strncmp(argv[argno], "--vfd-info=", (size_t)11)) {
vfd_info.info = (const void *)(argv[argno] + 11);
}
- else if (!HDstrncmp(argv[argno], "--width=", (size_t)8)) {
+ else if (!strncmp(argv[argno], "--width=", (size_t)8)) {
width_g = (int)strtol(argv[argno] + 8, &rest, 0);
if (0 == width_g)
- no_line_wrap_g = TRUE;
+ no_line_wrap_g = true;
else if (width_g < 0 || *rest) {
usage();
leave(EXIT_FAILURE);
}
}
- else if (!HDstrcmp(argv[argno], "--width")) {
+ else if (!strcmp(argv[argno], "--width")) {
if ((argno + 1) >= argc) {
usage();
leave(EXIT_FAILURE);
@@ -2805,17 +2805,17 @@ main(int argc, char *argv[])
leave(EXIT_FAILURE);
}
}
- else if (!HDstrcmp(argv[argno], "--verbose")) {
+ else if (!strcmp(argv[argno], "--verbose")) {
verbose_g++;
}
- else if (!HDstrcmp(argv[argno], "--version")) {
+ else if (!strcmp(argv[argno], "--version")) {
print_version(h5tools_getprogname());
leave(EXIT_SUCCESS);
}
- else if (!HDstrcmp(argv[argno], "--hexdump")) {
- hexdump_g = TRUE;
+ else if (!strcmp(argv[argno], "--hexdump")) {
+ hexdump_g = true;
}
- else if (!HDstrncmp(argv[argno], "-w", (size_t)2)) {
+ else if (!strncmp(argv[argno], "-w", (size_t)2)) {
if (argv[argno][2]) {
s = argv[argno] + 2;
}
@@ -2829,14 +2829,14 @@ main(int argc, char *argv[])
width_g = (int)strtol(s, &rest, 0);
if (0 == width_g) {
- no_line_wrap_g = TRUE;
+ no_line_wrap_g = true;
}
else if (width_g < 0 || *rest) {
usage();
leave(EXIT_FAILURE);
}
}
- else if (!HDstrncmp(argv[argno], "--s3-cred=", (size_t)10)) {
+ else if (!strncmp(argv[argno], "--s3-cred=", (size_t)10)) {
#ifdef H5_HAVE_ROS3_VFD
char const *start = NULL;
@@ -2863,7 +2863,7 @@ main(int argc, char *argv[])
leave(EXIT_FAILURE);
#endif
}
- else if (!HDstrncmp(argv[argno], "--hdfs-attrs=", (size_t)13)) {
+ else if (!strncmp(argv[argno], "--hdfs-attrs=", (size_t)13)) {
#ifdef H5_HAVE_LIBHDFS
char const *start = NULL;
@@ -2897,11 +2897,11 @@ main(int argc, char *argv[])
break;
case 'a': /* --address */
- address_g = TRUE;
+ address_g = true;
break;
case 'd': /* --data */
- data_g = TRUE;
+ data_g = true;
break;
/* deprecated -e */
@@ -2910,32 +2910,32 @@ main(int argc, char *argv[])
break;
case 'E': /* --external */
- follow_elink_g = TRUE;
+ follow_elink_g = true;
break;
case 'f': /* --full */
- fullname_g = TRUE;
+ fullname_g = true;
break;
case 'g': /* --group */
- grp_literal_g = TRUE;
+ grp_literal_g = true;
break;
case 'l': /* --label */
- label_g = TRUE;
+ label_g = true;
break;
case 'r': /* --recursive */
- recursive_g = TRUE;
- fullname_g = TRUE;
+ recursive_g = true;
+ fullname_g = true;
break;
case 'S': /* --simple */
- simple_output_g = TRUE;
+ simple_output_g = true;
break;
case 's': /* --string */
- string_g = TRUE;
+ string_g = true;
break;
case 'v': /* --verbose */
@@ -2948,7 +2948,7 @@ main(int argc, char *argv[])
break;
case 'x': /* --hexdump */
- hexdump_g = TRUE;
+ hexdump_g = true;
break;
default:
@@ -2983,13 +2983,13 @@ main(int argc, char *argv[])
/* Setup a custom fapl for file accesses */
if (custom_vol_fapl || custom_vfd_fapl) {
#ifdef H5_HAVE_ROS3_VFD
- if (custom_vfd_fapl && (0 == HDstrcmp(vfd_info.u.name, drivernames[ROS3_VFD_IDX]))) {
+ if (custom_vfd_fapl && (0 == strcmp(vfd_info.u.name, drivernames[ROS3_VFD_IDX]))) {
if (!vfd_info.info)
vfd_info.info = &ros3_fa;
}
#endif
#ifdef H5_HAVE_LIBHDFS
- if (custom_vfd_fapl && (0 == HDstrcmp(vfd_info.u.name, drivernames[HDFS_VFD_IDX]))) {
+ if (custom_vfd_fapl && (0 == strcmp(vfd_info.u.name, drivernames[HDFS_VFD_IDX]))) {
if (!vfd_info.info)
vfd_info.info = &hdfs_fa;
}
@@ -3021,7 +3021,7 @@ main(int argc, char *argv[])
symlink_trav_t symlink_list;
size_t u;
- fname = HDstrdup(argv[argno++]);
+ fname = strdup(argv[argno++]);
oname = NULL;
file_id = H5I_INVALID_HID;
@@ -3037,7 +3037,7 @@ main(int argc, char *argv[])
/* Shorten the file name; lengthen the object name */
x = oname;
- oname = HDstrrchr(fname, '/');
+ oname = strrchr(fname, '/');
if (x)
*x = '/';
if (!oname)
@@ -3055,10 +3055,10 @@ main(int argc, char *argv[])
/* Always use absolute paths to avoid confusion, keep track of where
* to begin path name output */
*oname = '/';
- iter.base_len = HDstrlen(oname);
+ iter.base_len = strlen(oname);
iter.base_len -= oname[iter.base_len - 1] == '/';
x = oname;
- if (NULL == (oname = HDstrdup(oname))) {
+ if (NULL == (oname = strdup(oname))) {
fprintf(rawerrorstream, "memory allocation failed\n");
leave(EXIT_FAILURE);
}
@@ -3070,7 +3070,7 @@ main(int argc, char *argv[])
if (!oname || !*oname) {
oname = root_name;
if (recursive_g)
- display_root_g = TRUE;
+ display_root_g = true;
iter.base_len = 0;
iter.name_start = 0;
/* Use x to remember if we have allocated space in oname */
@@ -3081,16 +3081,16 @@ main(int argc, char *argv[])
iter.fname = fname;
iter.fid = file_id;
iter.gid = H5I_INVALID_HID;
- iter.symlink_target = FALSE;
+ iter.symlink_target = false;
iter.symlink_list = &symlink_list;
- iter.symlink_list->dangle_link = FALSE;
+ iter.symlink_list->dangle_link = false;
/* Initialize list of visited symbolic links */
symlink_list.nused = symlink_list.nalloc = 0;
symlink_list.objs = NULL;
/* Check for root group as object name */
- if (HDstrcmp(oname, root_name) != 0) {
+ if (strcmp(oname, root_name) != 0) {
/* Check the type of link given */
if (H5Lget_info2(file_id, oname, &li, H5P_DEFAULT) < 0) {
hsize_t curr_pos = 0; /* total data element position */
diff --git a/tools/src/h5perf/pio_engine.c b/tools/src/h5perf/pio_engine.c
index 8830c8263f5..fc2f0c7d024 100644
--- a/tools/src/h5perf/pio_engine.c
+++ b/tools/src/h5perf/pio_engine.c
@@ -278,7 +278,7 @@ do_pio(parameters param)
/* Open file for write */
char base_name[256];
- HDsnprintf(base_name, sizeof(base_name), "#pio_tmp_%lu", nf);
+ snprintf(base_name, sizeof(base_name), "#pio_tmp_%lu", nf);
pio_create_filename(iot, base_name, fname, FILENAME_MAX);
if (pio_debug_level > 0)
fprintf(output, "rank %d: data filename=%s\n", pio_mpi_rank_g, fname);
@@ -402,7 +402,7 @@ pio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si
}
/* First use the environment variable and then try the constant */
- prefix = HDgetenv("HDF5_PARAPREFIX");
+ prefix = getenv("HDF5_PARAPREFIX");
#ifdef HDF5_PARAPREFIX
if (!prefix)
@@ -416,8 +416,8 @@ pio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si
* directory instead. */
char *user, *login, *subdir;
- user = HDgetenv("USER");
- login = HDgetenv("LOGIN");
+ user = getenv("USER");
+ login = getenv("LOGIN");
subdir = (user ? user : login);
if (subdir) {
@@ -431,11 +431,11 @@ pio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si
}
else {
/* We didn't append the prefix yet */
- HDstrncpy(fullname, prefix, size);
+ strncpy(fullname, prefix, size);
fullname[size - 1] = '\0';
}
- if ((HDstrlen(fullname) + HDstrlen(base_name) + 1) < size) {
+ if ((strlen(fullname) + strlen(base_name) + 1) < size) {
/* Append the base_name with a slash first. Multiple slashes are
* handled below. */
h5_stat_t buf;
@@ -445,31 +445,31 @@ pio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si
if (HDmkdir(fullname, (mode_t)0755) < 0 && errno != EEXIST) {
/* We couldn't make the "/tmp/${USER,LOGIN}" subdirectory.
* Default to PREFIX's original prefix value. */
- HDstrcpy(fullname, prefix);
+ strcpy(fullname, prefix);
}
- HDstrcat(fullname, "/");
- HDstrcat(fullname, base_name);
+ strcat(fullname, "/");
+ strcat(fullname, base_name);
}
else {
/* Buffer is too small */
return NULL;
}
}
- else if (HDstrlen(base_name) >= size) {
+ else if (strlen(base_name) >= size) {
/* Buffer is too small */
return NULL;
}
else {
- HDstrcpy(fullname, base_name);
+ strcpy(fullname, base_name);
}
/* Append a suffix */
if (suffix) {
- if (HDstrlen(fullname) + HDstrlen(suffix) >= size)
+ if (strlen(fullname) + strlen(suffix) >= size)
return NULL;
- HDstrcat(fullname, suffix);
+ strcat(fullname, suffix);
}
/* Remove any double slashes in the filename */
@@ -887,7 +887,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nby
} /* end if */
} /* end else */
- HDsnprintf(dname, sizeof(dname), "Dataset_%ld", ndset);
+ snprintf(dname, sizeof(dname), "Dataset_%ld", ndset);
h5ds_id = H5DCREATE(fd->h5fd, dname, ELMT_H5_TYPE, h5dset_space_id, h5dcpl);
if (h5ds_id < 0) {
@@ -1862,7 +1862,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nbyt
break;
case PHDF5:
- HDsnprintf(dname, sizeof(dname), "Dataset_%ld", ndset);
+ snprintf(dname, sizeof(dname), "Dataset_%ld", ndset);
h5ds_id = H5DOPEN(fd->h5fd, dname);
if (h5ds_id < 0) {
fprintf(stderr, "HDF5 Dataset open failed\n");
diff --git a/tools/src/h5perf/pio_perf.c b/tools/src/h5perf/pio_perf.c
index 37e6aeb9b1d..e72de3207f3 100644
--- a/tools/src/h5perf/pio_perf.c
+++ b/tools/src/h5perf/pio_perf.c
@@ -83,12 +83,12 @@
/* report 0.0 in case t is zero too */
#define MB_PER_SEC(bytes, t) (H5_DBL_ABS_EQUAL((t), 0.0) ? 0.0 : ((((double)bytes) / ONE_MB) / (t)))
-#ifndef TRUE
-#define TRUE 1
-#endif /* TRUE */
-#ifndef FALSE
-#define FALSE (!TRUE)
-#endif /* FALSE */
+#ifndef true
+#define true 1
+#endif /* true */
+#ifndef false
+#define false (!true)
+#endif /* false */
/* global variables */
FILE *output; /* output file */
@@ -736,10 +736,10 @@ h5_set_info_object(void)
int ret_value = 0;
/* handle any MPI INFO hints via $HDF5_MPI_INFO */
- if ((envp = HDgetenv("HDF5_MPI_INFO")) != NULL) {
+ if ((envp = getenv("HDF5_MPI_INFO")) != NULL) {
char *next, *valp;
- valp = envp = next = HDstrdup(envp);
+ valp = envp = next = strdup(envp);
if (!valp)
return 0;
@@ -764,7 +764,7 @@ h5_set_info_object(void)
if (*next == ';')
++next;
- namep = HDstrncpy(key_val, valp, len);
+ namep = strncpy(key_val, valp, len);
/* pass up any beginning whitespaces */
while (*namep && (*namep == ' ' || *namep == '\t'))
@@ -774,13 +774,13 @@ h5_set_info_object(void)
continue; /* was all white space, so move to next k/v pair */
/* eat up any ending white spaces */
- endp = &namep[HDstrlen(namep) - 1];
+ endp = &namep[strlen(namep) - 1];
while (endp && (*endp == ' ' || *endp == '\t'))
*endp-- = '\0';
/* find the '=' */
- valp = HDstrchr(namep, '=');
+ valp = strchr(namep, '=');
if (valp != NULL) { /* it's a valid key/value pairing */
char *tmp_val = valp + 1;
@@ -1049,7 +1049,7 @@ output_report(const char *fmt, ...)
va_start(ap, fmt);
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
- HDvfprintf(output, fmt, ap);
+ vfprintf(output, fmt, ap);
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
va_end(ap);
}
@@ -1072,7 +1072,7 @@ print_indent(int indent)
indent *= TAB_SPACE;
for (; indent > 0; --indent)
- HDfputc(' ', output);
+ fputc(' ', output);
}
}
@@ -1215,7 +1215,7 @@ report_parameters(struct options *opts)
fprintf(output, "Contiguous\n");
{
- char *prefix = HDgetenv("HDF5_PARAPREFIX");
+ char *prefix = getenv("HDF5_PARAPREFIX");
fprintf(output, "rank %d: Env HDF5_PARAPREFIX=%s\n", rank, (prefix ? prefix : "not set"));
}
@@ -1255,13 +1255,13 @@ parse_command_line(int argc, const char *const *argv)
cl_opts->interleaved = 0; /* Default to contiguous blocks in dataset */
cl_opts->collective = 0; /* Default to independent I/O access */
cl_opts->dim2d = 0; /* Default to 1D */
- cl_opts->print_times = FALSE; /* Printing times is off by default */
- cl_opts->print_raw = FALSE; /* Printing raw data throughput is off by default */
+ cl_opts->print_times = false; /* Printing times is off by default */
+ cl_opts->print_raw = false; /* Printing raw data throughput is off by default */
cl_opts->h5_alignment = 1; /* No alignment for HDF5 objects by default */
cl_opts->h5_threshold = 1; /* No threshold for aligning HDF5 objects by default */
- cl_opts->h5_use_chunks = FALSE; /* Don't chunk the HDF5 dataset by default */
- cl_opts->h5_write_only = FALSE; /* Do both read and write by default */
- cl_opts->verify = FALSE; /* No Verify data correctness by default */
+ cl_opts->h5_use_chunks = false; /* Don't chunk the HDF5 dataset by default */
+ cl_opts->h5_write_only = false; /* Do both read and write by default */
+ cl_opts->verify = false; /* No Verify data correctness by default */
while ((opt = H5_get_option(argc, argv, s_opts, l_opts)) != EOF) {
switch ((char)opt) {
@@ -1313,7 +1313,7 @@ parse_command_line(int argc, const char *const *argv)
break;
case 'c':
/* Turn on chunked HDF5 dataset creation */
- cl_opts->h5_use_chunks = TRUE;
+ cl_opts->h5_use_chunks = true;
break;
case 'C':
cl_opts->collective = 1;
@@ -1334,7 +1334,7 @@ parse_command_line(int argc, const char *const *argv)
if (isalnum(*end) && i < 10)
buf[i++] = *end;
- if (HDstrlen(buf) > 1 || isdigit(buf[0])) {
+ if (strlen(buf) > 1 || isdigit(buf[0])) {
size_t j;
for (j = 0; j < 10 && buf[j] != '\0'; ++j)
@@ -1354,15 +1354,15 @@ parse_command_line(int argc, const char *const *argv)
switch (*buf) {
case 'r':
/* Turn on raw data throughput info */
- cl_opts->print_raw = TRUE;
+ cl_opts->print_raw = true;
break;
case 't':
/* Turn on time printing */
- cl_opts->print_times = TRUE;
+ cl_opts->print_times = true;
break;
case 'v':
/* Turn on verify data correctness*/
- cl_opts->verify = TRUE;
+ cl_opts->verify = true;
break;
default:
fprintf(stderr, "pio_perf: invalid --debug option %s\n", buf);
@@ -1406,7 +1406,7 @@ parse_command_line(int argc, const char *const *argv)
cl_opts->h5_threshold = parse_size_directive(H5_optarg);
break;
case 'w':
- cl_opts->h5_write_only = TRUE;
+ cl_opts->h5_write_only = true;
break;
case 'x':
cl_opts->min_xfer_size = (size_t)parse_size_directive(H5_optarg);
diff --git a/tools/src/h5perf/sio_engine.c b/tools/src/h5perf/sio_engine.c
index 1f73a62f71d..2363f6a0d99 100644
--- a/tools/src/h5perf/sio_engine.c
+++ b/tools/src/h5perf/sio_engine.c
@@ -139,9 +139,7 @@ do_sio(parameters param, results *res)
/* IO type */
iot = param.io_type;
- if (NULL == (fname = calloc(FILENAME_MAX, sizeof(char))))
- GOTOERROR(FAIL);
-
+ /* MUST initialize fd early since we check its file IDs in cleanup code */
switch (iot) {
case POSIXIO:
fd.posixfd = -1;
@@ -157,6 +155,9 @@ do_sio(parameters param, results *res)
GOTOERROR(FAIL);
}
+ if (NULL == (fname = calloc(FILENAME_MAX, sizeof(char))))
+ GOTOERROR(FAIL);
+
linear_buf_size = 1;
for (i = 0; i < param.rank; i++) {
@@ -197,7 +198,7 @@ do_sio(parameters param, results *res)
*/
/* Open file for write */
- HDstrcpy(base_name, "#sio_tmp");
+ strcpy(base_name, "#sio_tmp");
sio_create_filename(iot, base_name, fname, FILENAME_MAX, ¶m);
if (sio_debug_level > 0)
@@ -310,7 +311,7 @@ sio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si
}
/* First use the environment variable and then try the constant */
- prefix = HDgetenv("HDF5_PREFIX");
+ prefix = getenv("HDF5_PREFIX");
#ifdef HDF5_PREFIX
if (!prefix)
@@ -324,8 +325,8 @@ sio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si
* directory instead. */
char *user, *login, *subdir;
- user = HDgetenv("USER");
- login = HDgetenv("LOGIN");
+ user = getenv("USER");
+ login = getenv("LOGIN");
subdir = (user ? user : login);
if (subdir) {
@@ -339,11 +340,11 @@ sio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si
}
else {
/* We didn't append the prefix yet */
- HDstrncpy(fullname, prefix, size);
+ strncpy(fullname, prefix, size);
fullname[size - 1] = '\0';
}
- if ((HDstrlen(fullname) + HDstrlen(base_name) + 1) < size) {
+ if ((strlen(fullname) + strlen(base_name) + 1) < size) {
/* Append the base_name with a slash first. Multiple slashes are
* handled below. */
h5_stat_t buf;
@@ -353,11 +354,11 @@ sio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si
if (HDmkdir(fullname, 0755) < 0 && errno != EEXIST) {
/* We couldn't make the "/tmp/${USER,LOGIN}" subdirectory.
* Default to PREFIX's original prefix value. */
- HDstrcpy(fullname, prefix);
+ strcpy(fullname, prefix);
}
- HDstrcat(fullname, "/");
- HDstrcat(fullname, base_name);
+ strcat(fullname, "/");
+ strcat(fullname, base_name);
}
else {
/* Buffer is too small */
@@ -369,15 +370,15 @@ sio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si
return NULL;
}
else {
- HDstrcpy(fullname, base_name);
+ strcpy(fullname, base_name);
}
/* Append a suffix */
if (suffix) {
- if (HDstrlen(fullname) + HDstrlen(suffix) >= size)
+ if (strlen(fullname) + strlen(suffix) >= size)
return NULL;
- HDstrcat(fullname, suffix);
+ strcat(fullname, suffix);
}
/* Remove any double slashes in the filename */
@@ -513,7 +514,7 @@ do_write(results *res, file_descr *fd, parameters *parms, void *buffer)
} /* end if */
} /* end if */
- HDsnprintf(dname, sizeof(dname), "Dataset_%ld", (unsigned long)parms->num_bytes);
+ snprintf(dname, sizeof(dname), "Dataset_%ld", (unsigned long)parms->num_bytes);
h5ds_id =
H5Dcreate2(fd->h5fd, dname, ELMT_H5_TYPE, h5dset_space_id, H5P_DEFAULT, h5dcpl, H5P_DEFAULT);
@@ -836,7 +837,7 @@ do_read(results *res, file_descr *fd, parameters *parms, void *buffer)
break;
case HDF5:
- HDsnprintf(dname, sizeof(dname), "Dataset_%ld", (long)parms->num_bytes);
+ snprintf(dname, sizeof(dname), "Dataset_%ld", (long)parms->num_bytes);
h5ds_id = H5Dopen2(fd->h5fd, dname, H5P_DEFAULT);
if (h5ds_id < 0) {
fprintf(stderr, "HDF5 Dataset open failed\n");
@@ -1129,7 +1130,7 @@ set_vfd(parameters *param)
}
else if (vfd == core) {
/* In-core temporary file with 1MB increment */
- if (H5Pset_fapl_core(my_fapl, (size_t)1024 * 1024, TRUE) < 0)
+ if (H5Pset_fapl_core(my_fapl, (size_t)1024 * 1024, true) < 0)
return -1;
}
else if (vfd == split) {
@@ -1153,18 +1154,18 @@ set_vfd(parameters *param)
memset(memb_name, 0, sizeof memb_name);
memset(memb_addr, 0, sizeof memb_addr);
- assert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES);
+ assert(strlen(multi_letters) == H5FD_MEM_NTYPES);
if (NULL == (sv = calloc(1, sizeof(*sv))))
return -1;
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) {
memb_fapl[mt] = H5P_DEFAULT;
- HDsnprintf(sv->arr[mt], 1024, "%%s-%c.h5", multi_letters[mt]);
+ snprintf(sv->arr[mt], 1024, "%%s-%c.h5", multi_letters[mt]);
memb_name[mt] = sv->arr[mt];
memb_addr[mt] = (haddr_t)MAX(mt - 1, 0) * (HADDR_MAX / 10);
}
- if (H5Pset_fapl_multi(my_fapl, memb_map, memb_fapl, memb_name, memb_addr, FALSE) < 0) {
+ if (H5Pset_fapl_multi(my_fapl, memb_map, memb_fapl, memb_name, memb_addr, false) < 0) {
free(sv);
return -1;
}
@@ -1175,7 +1176,7 @@ set_vfd(parameters *param)
hsize_t fam_size = 1 * 1024 * 1024; /*100 MB*/
/* Family of files, each 1MB and using the default driver */
- /* if ((val=HDstrtok(NULL, " \t\n\r")))
+ /* if ((val=strtok(NULL, " \t\n\r")))
fam_size = (hsize_t)(strtod(val, NULL) * 1024*1024); */
if (H5Pset_fapl_family(my_fapl, fam_size, H5P_DEFAULT) < 0)
return -1;
@@ -1259,7 +1260,7 @@ do_cleanupfile(iotype iot, char *filename)
goto done;
if (clean_file_g == -1)
- clean_file_g = (HDgetenv(HDF5_NOCLEANUP) == NULL) ? 1 : 0;
+ clean_file_g = (getenv(HDF5_NOCLEANUP) == NULL) ? 1 : 0;
if (clean_file_g) {
@@ -1274,7 +1275,7 @@ do_cleanupfile(iotype iot, char *filename)
if (driver == H5FD_FAMILY) {
for (j = 0; /*void*/; j++) {
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
- HDsnprintf(temp, temp_sz, filename, j);
+ snprintf(temp, temp_sz, filename, j);
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
if (HDaccess(temp, F_OK) < 0)
@@ -1284,7 +1285,7 @@ do_cleanupfile(iotype iot, char *filename)
}
}
else if (driver == H5FD_CORE) {
- hbool_t backing; /* Whether the core file has backing store */
+ bool backing; /* Whether the core file has backing store */
H5Pget_fapl_core(fapl, NULL, &backing);
@@ -1294,10 +1295,10 @@ do_cleanupfile(iotype iot, char *filename)
}
else if (driver == H5FD_MULTI) {
H5FD_mem_t mt;
- assert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES);
+ assert(strlen(multi_letters) == H5FD_MEM_NTYPES);
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) {
- HDsnprintf(temp, temp_sz, "%s-%c.h5", filename, multi_letters[mt]);
+ snprintf(temp, temp_sz, "%s-%c.h5", filename, multi_letters[mt]);
HDremove(temp); /*don't care if it fails*/
}
}
diff --git a/tools/src/h5perf/sio_perf.c b/tools/src/h5perf/sio_perf.c
index 5ffad71a39a..ad536ba02e5 100644
--- a/tools/src/h5perf/sio_perf.c
+++ b/tools/src/h5perf/sio_perf.c
@@ -67,12 +67,12 @@
/* report 0.0 in case t is zero too */
#define MB_PER_SEC(bytes, t) (H5_DBL_ABS_EQUAL(t, 0.0) ? 0.0 : ((((double)(bytes)) / (double)ONE_MB) / (t)))
-#ifndef TRUE
-#define TRUE 1
-#endif /* TRUE */
-#ifndef FALSE
-#define FALSE (!TRUE)
-#endif /* FALSE */
+#ifndef true
+#define true 1
+#endif /* true */
+#ifndef false
+#define false (!true)
+#endif /* false */
/* global variables */
FILE *output; /* output file */
@@ -203,7 +203,7 @@ main(int argc, char *argv[])
if (opts->output_file) {
if ((output = fopen(opts->output_file, "w")) == NULL) {
fprintf(stderr, "%s: cannot open output file\n", progname);
- HDperror(opts->output_file);
+ perror(opts->output_file);
goto finish;
}
}
@@ -627,7 +627,7 @@ output_report(const char *fmt, ...)
va_start(ap, fmt);
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
- HDvfprintf(output, fmt, ap);
+ vfprintf(output, fmt, ap);
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
va_end(ap);
}
@@ -644,7 +644,7 @@ print_indent(int indent)
indent *= TAB_SPACE;
for (; indent > 0; --indent)
- HDfputc(' ', output);
+ fputc(' ', output);
}
static void
@@ -777,7 +777,7 @@ report_parameters(struct options *opts)
}
{
- char *prefix = HDgetenv("HDF5_PREFIX");
+ char *prefix = getenv("HDF5_PREFIX");
fprintf(output, "Env HDF5_PREFIX=%s\n", (prefix ? prefix : "not set"));
}
@@ -824,14 +824,14 @@ parse_command_line(int argc, const char *const *argv)
cl_opts->vfd = sec2;
- cl_opts->print_times = FALSE; /* Printing times is off by default */
- cl_opts->print_raw = FALSE; /* Printing raw data throughput is off by default */
+ cl_opts->print_times = false; /* Printing times is off by default */
+ cl_opts->print_raw = false; /* Printing raw data throughput is off by default */
cl_opts->h5_alignment = 1; /* No alignment for HDF5 objects by default */
cl_opts->h5_threshold = 1; /* No threshold for aligning HDF5 objects by default */
- cl_opts->h5_use_chunks = FALSE; /* Don't chunk the HDF5 dataset by default */
- cl_opts->h5_write_only = FALSE; /* Do both read and write by default */
- cl_opts->h5_extendable = FALSE; /* Use extendable dataset */
- cl_opts->verify = FALSE; /* No Verify data correctness by default */
+ cl_opts->h5_use_chunks = false; /* Don't chunk the HDF5 dataset by default */
+ cl_opts->h5_write_only = false; /* Do both read and write by default */
+ cl_opts->h5_extendable = false; /* Use extendable dataset */
+ cl_opts->verify = false; /* No Verify data correctness by default */
while ((opt = H5_get_option(argc, argv, s_opts, l_opts)) != EOF) {
switch ((char)opt) {
@@ -921,7 +921,7 @@ parse_command_line(int argc, const char *const *argv)
if (isalnum(*end) && i < 10)
buf[i++] = *end;
- if (HDstrlen(buf) > 1 || isdigit(buf[0])) {
+ if (strlen(buf) > 1 || isdigit(buf[0])) {
size_t j;
for (j = 0; j < 10 && buf[j] != '\0'; ++j)
@@ -941,15 +941,15 @@ parse_command_line(int argc, const char *const *argv)
switch (*buf) {
case 'r':
/* Turn on raw data throughput info */
- cl_opts->print_raw = TRUE;
+ cl_opts->print_raw = true;
break;
case 't':
/* Turn on time printing */
- cl_opts->print_times = TRUE;
+ cl_opts->print_times = true;
break;
case 'v':
/* Turn on verify data correctness*/
- cl_opts->verify = TRUE;
+ cl_opts->verify = true;
break;
default:
fprintf(stderr, "sio_perf: invalid --debug option %s\n", buf);
@@ -1029,10 +1029,10 @@ parse_command_line(int argc, const char *const *argv)
}
break;
case 'w':
- cl_opts->h5_write_only = TRUE;
+ cl_opts->h5_write_only = true;
break;
case 't':
- cl_opts->h5_extendable = TRUE;
+ cl_opts->h5_extendable = true;
break;
case 'x': {
const char *end = H5_optarg;
diff --git a/tools/src/h5repack/h5repack.c b/tools/src/h5repack/h5repack.c
index 7849e29b784..6747c25cb30 100644
--- a/tools/src/h5repack/h5repack.c
+++ b/tools/src/h5repack/h5repack.c
@@ -67,7 +67,7 @@ h5repack(const char *infile, const char *outfile, pack_opt_t *options)
*-------------------------------------------------------------------------
*/
int
-h5repack_init(pack_opt_t *options, int verbose, hbool_t latest)
+h5repack_init(pack_opt_t *options, int verbose, bool latest)
{
int k, n;
@@ -373,7 +373,7 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p, trav_table_
H5O_info2_t oinfo; /* object info */
int j;
unsigned u;
- hbool_t is_ref = 0;
+ bool is_ref = 0;
H5T_class_t type_class = -1;
int ret_value = 0;
@@ -523,7 +523,7 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p, trav_table_
/* Check if we have VL data and string in the attribute's datatype that must
* be reclaimed */
- if (TRUE == h5tools_detect_vlen(wtype_id))
+ if (true == h5tools_detect_vlen(wtype_id))
H5Treclaim(wtype_id, space_id, H5P_DEFAULT, buf);
free(buf);
@@ -562,7 +562,7 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p, trav_table_
/* Check if we have VL data and string in the attribute's
* datatype that must be reclaimed
*/
- if (TRUE == h5tools_detect_vlen(wtype_id))
+ if (true == h5tools_detect_vlen(wtype_id))
H5Treclaim(wtype_id, space_id, H5P_DEFAULT, buf);
/* Free buf */
diff --git a/tools/src/h5repack/h5repack.h b/tools/src/h5repack/h5repack.h
index 0387c68e732..fa79c6f53f5 100644
--- a/tools/src/h5repack/h5repack.h
+++ b/tools/src/h5repack/h5repack.h
@@ -35,7 +35,7 @@
/* File space default information */
#define FS_PAGESIZE_DEF 4096
#define FS_STRATEGY_DEF H5F_FSPACE_STRATEGY_FSM_AGGR
-#define FS_PERSIST_DEF FALSE
+#define FS_PERSIST_DEF false
#define FS_THRESHOLD_DEF 1
/*-------------------------------------------------------------------------
@@ -111,11 +111,11 @@ typedef struct {
chunk_info_t chunk_g; /* global chunk INFO for the ALL case */
H5D_layout_t layout_g; /* global layout information for the ALL case */
int verbose; /* verbose mode */
- hbool_t merge; /* Merge external file. */
- hbool_t prune; /* Don't follow external file. */
+ bool merge; /* Merge external file. */
+ bool prune; /* Don't follow external file. */
hsize_t min_comp; /* minimum size to compress, in bytes */
int use_native; /* use a native type in write */
- hbool_t latest; /* pack file with the latest file format */
+ bool latest; /* pack file with the latest file format */
H5F_libver_t low_bound; /* The file's low bound as in H5Fset_libver_bounds() */
H5F_libver_t high_bound; /* The file's high bound as in H5Fset_libver_bounds() */
hid_t fin_fapl; /* FAPL to use for opening the input file */
@@ -153,7 +153,7 @@ extern "C" {
int h5repack(const char *infile, const char *outfile, pack_opt_t *options);
int h5repack_addfilter(const char *str, pack_opt_t *options);
int h5repack_addlayout(const char *str, pack_opt_t *options);
-int h5repack_init(pack_opt_t *options, int verbose, hbool_t latest);
+int h5repack_init(pack_opt_t *options, int verbose, bool latest);
int h5repack_end(pack_opt_t *options);
int h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options);
int h5repack_cmp_pl(const char *fname1, hid_t fname1_fapl, const char *fname2, hid_t fname2_fapl);
diff --git a/tools/src/h5repack/h5repack_copy.c b/tools/src/h5repack/h5repack_copy.c
index dd32a3c1964..392191330d8 100644
--- a/tools/src/h5repack/h5repack_copy.c
+++ b/tools/src/h5repack/h5repack_copy.c
@@ -67,11 +67,11 @@ copy_objects(const char *fnamein, const char *fnameout, pack_opt_t *options)
trav_table_t *travt = NULL;
hsize_t ub_size = 0; /* size of user block */
H5F_fspace_strategy_t set_strategy; /* Strategy to be set in output file */
- hbool_t set_persist; /* Persist free-space status to be set in output file */
+ bool set_persist; /* Persist free-space status to be set in output file */
hsize_t set_threshold; /* Free-space section threshold to be set in output file */
hsize_t set_pagesize; /* File space page size to be set in output file */
H5F_fspace_strategy_t in_strategy; /* Strategy from input file */
- hbool_t in_persist; /* Persist free-space status from input file */
+ bool in_persist; /* Persist free-space status from input file */
hsize_t in_threshold; /* Free-space section threshold from input file */
hsize_t in_pagesize; /* File space page size from input file */
unsigned crt_order_flags; /* group creation order flag */
@@ -274,7 +274,7 @@ copy_objects(const char *fnamein, const char *fnameout, pack_opt_t *options)
if (options->fs_persist == -1) /* A default "persist" is specified by user */
set_persist = FS_PERSIST_DEF;
else if (options->fs_persist != 0) /* Set "persist" as specified by user */
- set_persist = (hbool_t)options->fs_persist;
+ set_persist = (bool)options->fs_persist;
if (options->fs_threshold == -1) /* A "0" threshold is specified by user */
set_threshold = (hsize_t)0;
@@ -654,7 +654,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
int is_ref = 0;
htri_t is_named;
htri_t is_vlen = 0;
- hbool_t limit_maxdims;
+ bool limit_maxdims;
hsize_t size_dset;
int ret_value = 0;
@@ -683,7 +683,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
for (i = 0; i < travt->nobjs; i++) {
/* init variables per obj */
buf = NULL;
- limit_maxdims = FALSE;
+ limit_maxdims = false;
switch (travt->objs[i].type) {
case H5TRAV_TYPE_UNKNOWN:
@@ -725,7 +725,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
* and copy its attributes using that ID
*-------------------------------------------------------------------------
*/
- if (HDstrcmp(travt->objs[i].name, "/") == 0) {
+ if (strcmp(travt->objs[i].name, "/") == 0) {
if ((grp_out = H5Gopen2(fidout, "/", H5P_DEFAULT)) < 0)
H5TOOLS_GOTO_ERROR((-1), "H5Gopen2 failed");
}
@@ -763,7 +763,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
*-------------------------------------------------------------------------
*/
case H5TRAV_TYPE_DATASET: {
- hbool_t use_h5ocopy;
+ bool use_h5ocopy;
read_time = 0.0;
write_time = 0.0;
@@ -778,7 +778,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
/* check if filters were requested for individual objects */
if (options->op_tbl->objs) {
for (u = 0; u < options->op_tbl->nelems; u++) {
- if (HDstrcmp(travt->objs[i].name, options->op_tbl->objs[u].path) == 0)
+ if (strcmp(travt->objs[i].name, options->op_tbl->objs[u].path) == 0)
for (ifil = 0; ifil < options->op_tbl->objs[ifil].nfilters; ifil++) {
if (options->op_tbl->objs[u].filter[ifil].filtn > 0)
req_filter = 1;
@@ -867,7 +867,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
H5TOOLS_GOTO_ERROR((-1), "H5Pget_vol_id failed");
if (in_vol_id != out_vol_id)
- use_h5ocopy = FALSE;
+ use_h5ocopy = false;
if (in_vol_id != default_vol_id)
if (H5VLclose(in_vol_id) < 0)
@@ -979,15 +979,15 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
if (options->op_tbl->nelems > 0) {
/* if current obj match specified obj */
if (options_get_object(travt->objs[i].name, options->op_tbl))
- limit_maxdims = TRUE;
+ limit_maxdims = true;
}
else /* no dataset is specified */
- limit_maxdims = TRUE;
+ limit_maxdims = true;
/* if convert to COMPACT */
if (options->layout_g == H5D_COMPACT)
if (size_dset > MAX_COMPACT_DSIZE)
- limit_maxdims = FALSE;
+ limit_maxdims = false;
/* unset unlimited max dims */
if (limit_maxdims)
@@ -1032,7 +1032,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
/* Set up collective write if using filters in parallel */
{
#ifdef H5_HAVE_PARALLEL
- hbool_t parallel = (H5FD_MPIO == H5Pget_driver(options->fout_fapl));
+ bool parallel = (H5FD_MPIO == H5Pget_driver(options->fout_fapl));
if (parallel && apply_s && apply_f) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
@@ -1070,7 +1070,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
/* Check if we have VL data in the dataset's
* datatype that must be reclaimed */
- if (TRUE == H5Tdetect_class(wtype_id, H5T_VLEN))
+ if (true == H5Tdetect_class(wtype_id, H5T_VLEN))
if (H5Treclaim(wtype_id, f_space_id, H5P_DEFAULT, buf) < 0)
H5TOOLS_GOTO_ERROR((-1), "H5Treclaim failed");
@@ -1104,8 +1104,8 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
H5I_INVALID_HID; /* dataset creation property list ID */
/* check if we have VL data in the dataset's datatype */
- if (H5Tdetect_class(wtype_id, H5T_VLEN) == TRUE)
- vl_data = TRUE;
+ if (H5Tdetect_class(wtype_id, H5T_VLEN) == true)
+ vl_data = true;
/* check first if writing dataset is chunked,
* if so use its chunk layout for better performance. */
@@ -1420,7 +1420,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
}
/* Set flag for intermediate group creation */
- if (H5Pset_create_intermediate_group(lcpl_id, TRUE) < 0)
+ if (H5Pset_create_intermediate_group(lcpl_id, true) < 0)
H5TOOLS_GOTO_ERROR((-1), "H5Pset_create_intermediate_group failed");
if (H5Ocopy(fidin, travt->objs[i].name, fidout, travt->objs[i].name, ocpl_id,
@@ -1528,7 +1528,7 @@ print_dataset_info(hid_t dcpl_id, char *objname, double ratio, int pr, pack_opt_
char f_objname[256]; /* filter objname */
int i;
- HDstrcpy(strfilter, "\0");
+ strcpy(strfilter, "\0");
/* get information about input filters */
if ((nfilters = H5Pget_nfilters(dcpl_id)) < 0)
@@ -1539,65 +1539,65 @@ print_dataset_info(hid_t dcpl_id, char *objname, double ratio, int pr, pack_opt_
if ((filtn = H5Pget_filter2(dcpl_id, (unsigned)i, &filt_flags, &cd_nelmts, cd_values,
sizeof(f_objname), f_objname, NULL)) < 0) {
- HDstrcat(strfilter, "ERROR ");
+ strcat(strfilter, "ERROR ");
continue;
}
switch (filtn) {
case H5Z_FILTER_NONE:
- HDstrcat(strfilter, "NONE ");
+ strcat(strfilter, "NONE ");
break;
case H5Z_FILTER_DEFLATE:
- HDstrcat(strfilter, "GZIP ");
+ strcat(strfilter, "GZIP ");
#if defined(PRINT_DEBUG)
{
unsigned level = cd_values[0];
- HDsnprintf(temp, sizeof(temp), "(%d)", level);
- HDstrcat(strfilter, temp);
+ snprintf(temp, sizeof(temp), "(%d)", level);
+ strcat(strfilter, temp);
}
#endif
break;
case H5Z_FILTER_SZIP:
- HDstrcat(strfilter, "SZIP ");
+ strcat(strfilter, "SZIP ");
#if defined(PRINT_DEBUG)
{
unsigned options_mask = cd_values[0]; /* from dcpl, not filt*/
unsigned ppb = cd_values[1];
- HDsnprintf(temp, sizeof(temp), "(%d,", ppb);
- HDstrcat(strfilter, temp);
+ snprintf(temp, sizeof(temp), "(%d,", ppb);
+ strcat(strfilter, temp);
if (options_mask & H5_SZIP_EC_OPTION_MASK)
- HDstrcpy(temp, "EC) ");
+ strcpy(temp, "EC) ");
else if (options_mask & H5_SZIP_NN_OPTION_MASK)
- HDstrcpy(temp, "NN) ");
+ strcpy(temp, "NN) ");
}
- HDstrcat(strfilter, temp);
+ strcat(strfilter, temp);
#endif
break;
case H5Z_FILTER_SHUFFLE:
- HDstrcat(strfilter, "SHUF ");
+ strcat(strfilter, "SHUF ");
break;
case H5Z_FILTER_FLETCHER32:
- HDstrcat(strfilter, "FLET ");
+ strcat(strfilter, "FLET ");
break;
case H5Z_FILTER_NBIT:
- HDstrcat(strfilter, "NBIT ");
+ strcat(strfilter, "NBIT ");
break;
case H5Z_FILTER_SCALEOFFSET:
- HDstrcat(strfilter, "SCALEOFFSET ");
+ strcat(strfilter, "SCALEOFFSET ");
break;
default:
- HDstrcat(strfilter, "UD ");
+ strcat(strfilter, "UD ");
break;
} /* end switch */
} /* end for each filter */
@@ -1610,10 +1610,10 @@ print_dataset_info(hid_t dcpl_id, char *objname, double ratio, int pr, pack_opt_
else {
char str[512], temp[512];
- HDstrcpy(str, "dset ");
- HDstrcat(str, strfilter);
- HDsnprintf(temp, sizeof(temp), " (%.3f:1)", ratio);
- HDstrcat(str, temp);
+ strcpy(str, "dset ");
+ strcat(str, strfilter);
+ snprintf(temp, sizeof(temp), " (%.3f:1)", ratio);
+ strcat(str, temp);
if (options->verbose == 2)
printf(FORMAT_OBJ_TIME, str, read_time, write_time, objname);
else
diff --git a/tools/src/h5repack/h5repack_filters.c b/tools/src/h5repack/h5repack_filters.c
index 512e4fab108..9669d0c193b 100644
--- a/tools/src/h5repack/h5repack_filters.c
+++ b/tools/src/h5repack/h5repack_filters.c
@@ -57,7 +57,7 @@ aux_copy_obj(hid_t dcpl_id, /* dataset creation property list */
}
objout->nfilters = nfilters;
- HDstrcpy(objout->path, name);
+ strcpy(objout->path, name);
if ((layout = H5Pget_layout(dcpl_id)) < 0)
H5TOOLS_GOTO_ERROR((-1), "H5Pget_layout failed");
@@ -92,7 +92,7 @@ aux_find_obj(const char *name, /* object name from traverse list */
unsigned int i;
for (i = 0; i < options->op_tbl->nelems; i++) {
- if (HDstrcmp(options->op_tbl->objs[i].path, name) == 0) {
+ if (strcmp(options->op_tbl->objs[i].path, name) == 0) {
*obj = options->op_tbl->objs[i];
return (int)i;
}
@@ -104,7 +104,7 @@ aux_find_obj(const char *name, /* object name from traverse list */
if (pname[0] == '/')
pname++;
- if (HDstrcmp(pdest, pname) == 0) {
+ if (strcmp(pdest, pname) == 0) {
*obj = options->op_tbl->objs[i];
return (int)i;
}
diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c
index 85bc15d7f7e..85ab93a375c 100644
--- a/tools/src/h5repack/h5repack_main.c
+++ b/tools/src/h5repack/h5repack_main.c
@@ -400,11 +400,11 @@ read_info(const char *filename, pack_opt_t *options)
/* cycle until end of file reached */
while (1) {
- if (EOF == HDfscanf(fp, "%9s", stype))
+ if (EOF == fscanf(fp, "%9s", stype))
break;
/* Info indicator must be for layout or filter */
- if (HDstrcmp(stype, "-l") != 0 && HDstrcmp(stype, "-f") != 0) {
+ if (strcmp(stype, "-l") != 0 && strcmp(stype, "-f") != 0) {
error_msg("bad file format for %s", filename);
h5tools_setstatus(EXIT_FAILURE);
ret_value = EXIT_FAILURE;
@@ -415,7 +415,7 @@ read_info(const char *filename, pack_opt_t *options)
i = 0;
c = '0';
while (c != ' ') {
- if (HDfscanf(fp, "%c", &c) < 0 && ferror(fp)) {
+ if (fscanf(fp, "%c", &c) < 0 && ferror(fp)) {
error_msg("fscanf error\n");
h5tools_setstatus(EXIT_FAILURE);
ret_value = EXIT_FAILURE;
@@ -427,7 +427,7 @@ read_info(const char *filename, pack_opt_t *options)
c = '0';
/* go until end */
while (c != ' ') {
- if (HDfscanf(fp, "%c", &c) < 0 && ferror(fp)) {
+ if (fscanf(fp, "%c", &c) < 0 && ferror(fp)) {
error_msg("fscanf error\n");
h5tools_setstatus(EXIT_FAILURE);
ret_value = EXIT_FAILURE;
@@ -441,7 +441,7 @@ read_info(const char *filename, pack_opt_t *options)
}
comp_info[i - 1] = '\0'; /*cut the last " */
- if (!HDstrcmp(stype, "-l")) {
+ if (!strcmp(stype, "-l")) {
if (h5repack_addlayout(comp_info, options) == -1) {
error_msg("could not add chunk option\n");
h5tools_setstatus(EXIT_FAILURE);
@@ -481,9 +481,9 @@ set_sort_by(const char *form)
{
H5_index_t idx_type = H5_INDEX_UNKNOWN;
- if (!HDstrcmp(form, "name"))
+ if (!strcmp(form, "name"))
idx_type = H5_INDEX_NAME;
- else if (!HDstrcmp(form, "creation_order"))
+ else if (!strcmp(form, "creation_order"))
idx_type = H5_INDEX_CRT_ORDER;
return idx_type;
@@ -504,9 +504,9 @@ set_sort_order(const char *form)
{
H5_iter_order_t iter_order = H5_ITER_UNKNOWN;
- if (!HDstrcmp(form, "ascending"))
+ if (!strcmp(form, "ascending"))
iter_order = H5_ITER_INC;
- else if (!HDstrcmp(form, "descending"))
+ else if (!strcmp(form, "descending"))
iter_order = H5_ITER_DEC;
return iter_order;
@@ -525,10 +525,10 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
h5tools_vol_info_t out_vol_info;
h5tools_vfd_info_t in_vfd_info;
h5tools_vfd_info_t out_vfd_info;
- hbool_t custom_in_vol = FALSE;
- hbool_t custom_in_vfd = FALSE;
- hbool_t custom_out_vol = FALSE;
- hbool_t custom_out_vfd = FALSE;
+ bool custom_in_vol = false;
+ bool custom_in_vfd = false;
+ bool custom_out_vol = false;
+ bool custom_out_vfd = false;
hid_t tmp_fapl = H5I_INVALID_HID;
int bound, opt;
int ret_value = 0;
@@ -620,7 +620,7 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
break;
case 'L':
- options->latest = TRUE;
+ options->latest = true;
break;
case 'j':
@@ -646,30 +646,30 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
break;
case 'X':
- options->merge = TRUE;
+ options->merge = true;
break;
case 'W':
- options->prune = TRUE;
+ options->prune = true;
break;
case 'c':
options->grp_compact = atoi(H5_optarg);
if (options->grp_compact > 0)
- options->latest = TRUE; /* must use latest format */
+ options->latest = true; /* must use latest format */
break;
case 'd':
options->grp_indexed = atoi(H5_optarg);
if (options->grp_indexed > 0)
- options->latest = TRUE; /* must use latest format */
+ options->latest = true; /* must use latest format */
break;
case 's': {
int idx = 0;
int ssize = 0;
- char *msgPtr = HDstrchr(H5_optarg, ':');
- options->latest = TRUE; /* must use latest format */
+ char *msgPtr = strchr(H5_optarg, ':');
+ options->latest = true; /* must use latest format */
if (msgPtr == NULL) {
ssize = atoi(H5_optarg);
for (idx = 0; idx < 5; idx++)
@@ -678,18 +678,18 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
else {
char msgType[10];
- HDstrcpy(msgType, msgPtr + 1);
+ strcpy(msgType, msgPtr + 1);
msgPtr[0] = '\0';
ssize = atoi(H5_optarg);
- if (!HDstrncmp(msgType, "dspace", 6))
+ if (!strncmp(msgType, "dspace", 6))
options->msg_size[0] = ssize;
- else if (!HDstrncmp(msgType, "dtype", 5))
+ else if (!strncmp(msgType, "dtype", 5))
options->msg_size[1] = ssize;
- else if (!HDstrncmp(msgType, "fill", 4))
+ else if (!strncmp(msgType, "fill", 4))
options->msg_size[2] = ssize;
- else if (!HDstrncmp(msgType, "pline", 5))
+ else if (!strncmp(msgType, "pline", 5))
options->msg_size[3] = ssize;
- else if (!HDstrncmp(msgType, "attr", 4))
+ else if (!strncmp(msgType, "attr", 4))
options->msg_size[4] = ssize;
}
} break;
@@ -723,14 +723,14 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
case 'S': {
char strategy[MAX_NC_NAME];
- HDstrcpy(strategy, H5_optarg);
- if (!HDstrcmp(strategy, "FSM_AGGR"))
+ strcpy(strategy, H5_optarg);
+ if (!strcmp(strategy, "FSM_AGGR"))
options->fs_strategy = H5F_FSPACE_STRATEGY_FSM_AGGR;
- else if (!HDstrcmp(strategy, "PAGE"))
+ else if (!strcmp(strategy, "PAGE"))
options->fs_strategy = H5F_FSPACE_STRATEGY_PAGE;
- else if (!HDstrcmp(strategy, "AGGR"))
+ else if (!strcmp(strategy, "AGGR"))
options->fs_strategy = H5F_FSPACE_STRATEGY_AGGR;
- else if (!HDstrcmp(strategy, "NONE"))
+ else if (!strcmp(strategy, "NONE"))
options->fs_strategy = H5F_FSPACE_STRATEGY_NONE;
else {
error_msg("invalid file space management strategy `%s`\n", H5_optarg);
@@ -792,13 +792,13 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
case '1':
in_vol_info.type = VOL_BY_VALUE;
in_vol_info.u.value = (H5VL_class_value_t)atoi(H5_optarg);
- custom_in_vol = TRUE;
+ custom_in_vol = true;
break;
case '2':
in_vol_info.type = VOL_BY_NAME;
in_vol_info.u.name = H5_optarg;
- custom_in_vol = TRUE;
+ custom_in_vol = true;
break;
case '3':
@@ -808,13 +808,13 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
case '4':
out_vol_info.type = VOL_BY_VALUE;
out_vol_info.u.value = (H5VL_class_value_t)atoi(H5_optarg);
- custom_out_vol = TRUE;
+ custom_out_vol = true;
break;
case '5':
out_vol_info.type = VOL_BY_NAME;
out_vol_info.u.name = H5_optarg;
- custom_out_vol = TRUE;
+ custom_out_vol = true;
break;
case '6':
@@ -824,13 +824,13 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
case '7':
in_vfd_info.type = VFD_BY_VALUE;
in_vfd_info.u.value = (H5FD_class_value_t)atoi(H5_optarg);
- custom_in_vfd = TRUE;
+ custom_in_vfd = true;
break;
case '8':
in_vfd_info.type = VFD_BY_NAME;
in_vfd_info.u.name = H5_optarg;
- custom_in_vfd = TRUE;
+ custom_in_vfd = true;
break;
case '9':
@@ -840,13 +840,13 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
case '0':
out_vfd_info.type = VFD_BY_VALUE;
out_vfd_info.u.value = (H5FD_class_value_t)atoi(H5_optarg);
- custom_out_vfd = TRUE;
+ custom_out_vfd = true;
break;
case 'Y':
out_vfd_info.type = VFD_BY_NAME;
out_vfd_info.u.name = H5_optarg;
- custom_out_vfd = TRUE;
+ custom_out_vfd = true;
break;
case 'Z':
@@ -864,7 +864,7 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
infile = argv[H5_optind];
outfile = argv[H5_optind + 1];
- if (!HDstrcmp(infile, outfile)) {
+ if (!strcmp(infile, outfile)) {
error_msg("file names cannot be the same\n");
usage(h5tools_getprogname());
h5tools_setstatus(EXIT_FAILURE);
@@ -886,7 +886,7 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
}
/* If the input file uses the onion VFD, get the revision number */
- if (in_vfd_info.u.name && !HDstrcmp(in_vfd_info.u.name, "onion")) {
+ if (in_vfd_info.u.name && !strcmp(in_vfd_info.u.name, "onion")) {
if (in_vfd_info.info) {
errno = 0;
onion_fa_in_g.revision_num = strtoull(in_vfd_info.info, NULL, 10);
@@ -981,7 +981,7 @@ main(int argc, char **argv)
}
/* initialize options */
- if (h5repack_init(&options, 0, FALSE) < 0) {
+ if (h5repack_init(&options, 0, false) < 0) {
printf("Error occurred while initializing repack options\n");
h5tools_setstatus(EXIT_FAILURE);
goto done;
diff --git a/tools/src/h5repack/h5repack_opttable.c b/tools/src/h5repack/h5repack_opttable.c
index 2018527a4f6..8a9042d6579 100644
--- a/tools/src/h5repack/h5repack_opttable.c
+++ b/tools/src/h5repack/h5repack_opttable.c
@@ -28,7 +28,7 @@ init_packobject(pack_info_t *obj)
{
int j, k;
- HDstrcpy(obj->path, "\0");
+ strcpy(obj->path, "\0");
for (j = 0; j < H5_REPACK_MAX_NFILTERS; j++) {
obj->filter[j].filtn = -1;
obj->filter[j].cd_nelmts = CD_VALUES;
@@ -181,7 +181,7 @@ options_add_layout(obj_list_t *obj_list, unsigned n_objs, pack_info_t *pack, pac
{
unsigned i, j, I;
unsigned added = 0;
- hbool_t found = FALSE;
+ bool found = false;
int ret_value = 0;
/* increase the size of the collection by N_OBJS if necessary */
@@ -196,7 +196,7 @@ options_add_layout(obj_list_t *obj_list, unsigned n_objs, pack_info_t *pack, pac
/* linear table search */
for (i = 0; i < table->nelems; i++) {
/*already on the table */
- if (HDstrcmp(obj_list[j].obj, table->objs[i].path) == 0) {
+ if (strcmp(obj_list[j].obj, table->objs[i].path) == 0) {
/* already chunk info inserted for this one; exit */
if (table->objs[i].chunk.rank > 0) {
H5TOOLS_INFO("chunk information already inserted for <%s>\n", obj_list[j].obj);
@@ -205,7 +205,7 @@ options_add_layout(obj_list_t *obj_list, unsigned n_objs, pack_info_t *pack, pac
/* insert the layout info */
else {
aux_tblinsert_layout(table, i, pack);
- found = TRUE;
+ found = true;
break;
}
} /* if */
@@ -215,7 +215,7 @@ options_add_layout(obj_list_t *obj_list, unsigned n_objs, pack_info_t *pack, pac
/* keep the grow in a temp var */
I = table->nelems + added;
added++;
- HDstrcpy(table->objs[I].path, obj_list[j].obj);
+ strcpy(table->objs[I].path, obj_list[j].obj);
aux_tblinsert_layout(table, I, pack);
}
/* cases where we have an already inserted name but there is a new name also
@@ -223,11 +223,11 @@ options_add_layout(obj_list_t *obj_list, unsigned n_objs, pack_info_t *pack, pac
-f dset1:GZIP=1 -l dset1,dset2:CHUNK=20x20
dset1 is already inserted, but dset2 must also be
*/
- else if (found && HDstrcmp(obj_list[j].obj, table->objs[i].path) != 0) {
+ else if (found && strcmp(obj_list[j].obj, table->objs[i].path) != 0) {
/* keep the grow in a temp var */
I = table->nelems + added;
added++;
- HDstrcpy(table->objs[I].path, obj_list[j].obj);
+ strcpy(table->objs[I].path, obj_list[j].obj);
aux_tblinsert_layout(table, I, pack);
}
} /* j */
@@ -238,7 +238,7 @@ options_add_layout(obj_list_t *obj_list, unsigned n_objs, pack_info_t *pack, pac
for (j = 0; j < n_objs; j++) {
I = table->nelems + added;
added++;
- HDstrcpy(table->objs[I].path, obj_list[j].obj);
+ strcpy(table->objs[I].path, obj_list[j].obj);
aux_tblinsert_layout(table, I, pack);
}
}
@@ -261,7 +261,7 @@ options_add_filter(obj_list_t *obj_list, unsigned n_objs, filter_info_t filt, pa
{
unsigned int i, j, I;
unsigned added = 0;
- hbool_t found = FALSE;
+ bool found = false;
/* increase the size of the collection by N_OBJS if necessary */
if (table->nelems + n_objs >= table->size)
@@ -275,10 +275,10 @@ options_add_filter(obj_list_t *obj_list, unsigned n_objs, filter_info_t filt, pa
/* linear table search */
for (i = 0; i < table->nelems; i++) {
/*already on the table */
- if (HDstrcmp(obj_list[j].obj, table->objs[i].path) == 0) {
+ if (strcmp(obj_list[j].obj, table->objs[i].path) == 0) {
/* insert */
aux_tblinsert_filter(table, i, filt);
- found = TRUE;
+ found = true;
break;
} /* if */
} /* i */
@@ -287,7 +287,7 @@ options_add_filter(obj_list_t *obj_list, unsigned n_objs, filter_info_t filt, pa
/* keep the grow in a temp var */
I = table->nelems + added;
added++;
- HDstrcpy(table->objs[I].path, obj_list[j].obj);
+ strcpy(table->objs[I].path, obj_list[j].obj);
aux_tblinsert_filter(table, I, filt);
}
/* cases where we have an already inserted name but there is a new name also
@@ -295,11 +295,11 @@ options_add_filter(obj_list_t *obj_list, unsigned n_objs, filter_info_t filt, pa
-l dset1:CHUNK=20x20 -f dset1,dset2:GZIP=1
dset1 is already inserted, but dset2 must also be
*/
- else if (found && HDstrcmp(obj_list[j].obj, table->objs[i].path) != 0) {
+ else if (found && strcmp(obj_list[j].obj, table->objs[i].path) != 0) {
/* keep the grow in a temp var */
I = table->nelems + added;
added++;
- HDstrcpy(table->objs[I].path, obj_list[j].obj);
+ strcpy(table->objs[I].path, obj_list[j].obj);
aux_tblinsert_filter(table, I, filt);
}
} /* j */
@@ -311,7 +311,7 @@ options_add_filter(obj_list_t *obj_list, unsigned n_objs, filter_info_t filt, pa
for (j = 0; j < n_objs; j++) {
I = table->nelems + added;
added++;
- HDstrcpy(table->objs[I].path, obj_list[j].obj);
+ strcpy(table->objs[I].path, obj_list[j].obj);
aux_tblinsert_filter(table, I, filt);
}
}
@@ -338,15 +338,15 @@ options_get_object(const char *path, pack_opttbl_t *table)
for (i = 0; i < table->nelems; i++) {
/* make full path (start with "/") to compare correctly */
- if (HDstrncmp(table->objs[i].path, "/", 1) != 0) {
- HDstrcpy(tbl_path, "/");
- HDstrcat(tbl_path, table->objs[i].path);
+ if (strncmp(table->objs[i].path, "/", 1) != 0) {
+ strcpy(tbl_path, "/");
+ strcat(tbl_path, table->objs[i].path);
}
else
- HDstrcpy(tbl_path, table->objs[i].path);
+ strcpy(tbl_path, table->objs[i].path);
/* found it */
- if (HDstrcmp(tbl_path, path) == 0) {
+ if (strcmp(tbl_path, path) == 0) {
return (&table->objs[i]);
}
}
diff --git a/tools/src/h5repack/h5repack_parse.c b/tools/src/h5repack/h5repack_parse.c
index f88ba6f6545..0317ef709ba 100644
--- a/tools/src/h5repack/h5repack_parse.c
+++ b/tools/src/h5repack/h5repack_parse.c
@@ -41,7 +41,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
{
size_t i, m, u;
char c;
- size_t len = HDstrlen(str);
+ size_t len = strlen(str);
int f, k, l, p, q, end_obj = -1, no_param = 0;
unsigned j, n;
char sobj[MAX_NC_NAME];
@@ -94,7 +94,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
else
sobj[k + 1] = '\0';
- HDstrcpy(obj_list[n].obj, sobj);
+ strcpy(obj_list[n].obj, sobj);
memset(sobj, 0, sizeof(sobj));
n++;
k = -1;
@@ -123,7 +123,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
* example SZIP=8,NN
*-------------------------------------------------------------------------
*/
- if (HDstrcmp(scomp, "SZIP") == 0) {
+ if (strcmp(scomp, "SZIP") == 0) {
l = -1; /* mask index check */
for (m = 0, u = i + 1; u < len; u++, m++) {
if (str[u] == ',') {
@@ -146,9 +146,9 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
if (l == 2) {
smask[l] = '\0';
i = len - 1; /* end */
- if (HDstrcmp(smask, "NN") == 0)
+ if (strcmp(smask, "NN") == 0)
filt->cd_values[j++] = H5_SZIP_NN_OPTION_MASK;
- else if (HDstrcmp(smask, "EC") == 0)
+ else if (strcmp(smask, "EC") == 0)
filt->cd_values[j++] = H5_SZIP_EC_OPTION_MASK;
else {
error_msg("szip mask must be 'NN' or 'EC' \n");
@@ -173,7 +173,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
* SOFF=3,DF
*-------------------------------------------------------------------------
*/
- else if (HDstrcmp(scomp, "SOFF") == 0) {
+ else if (strcmp(scomp, "SOFF") == 0) {
l = -1; /* mask index check */
for (m = 0, u = i + 1; u < len; u++, m++) {
if (str[u] == ',') {
@@ -196,9 +196,9 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
if (l == 2) {
smask[l] = '\0';
i = len - 1; /* end */
- if (HDstrcmp(smask, "IN") == 0)
+ if (strcmp(smask, "IN") == 0)
filt->cd_values[j++] = H5Z_SO_INT;
- else if (HDstrcmp(smask, "DS") == H5Z_SO_FLOAT_DSCALE)
+ else if (strcmp(smask, "DS") == H5Z_SO_FLOAT_DSCALE)
filt->cd_values[j++] = H5Z_SO_FLOAT_DSCALE;
else {
error_msg("scale type must be 'IN' or 'DS' \n");
@@ -216,7 +216,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
* UD=307,0,1,9
*-------------------------------------------------------------------------
*/
- else if (HDstrcmp(scomp, "UD") == 0) {
+ else if (strcmp(scomp, "UD") == 0) {
l = -1; /* filter number index check */
f = -1; /* filter flag index check */
p = -1; /* CD_VAL count check */
@@ -298,7 +298,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
* H5Z_FILTER_NONE
*-------------------------------------------------------------------------
*/
- if (HDstrcmp(scomp, "NONE") == 0) {
+ if (strcmp(scomp, "NONE") == 0) {
filt->filtn = H5Z_FILTER_NONE;
filt->cd_nelmts = 0;
}
@@ -307,7 +307,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
* H5Z_FILTER_DEFLATE
*-------------------------------------------------------------------------
*/
- else if (HDstrcmp(scomp, "GZIP") == 0) {
+ else if (strcmp(scomp, "GZIP") == 0) {
filt->filtn = H5Z_FILTER_DEFLATE;
filt->cd_nelmts = 1;
if (no_param) { /*no more parameters, GZIP must have parameter */
@@ -322,7 +322,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
* H5Z_FILTER_SZIP
*-------------------------------------------------------------------------
*/
- else if (HDstrcmp(scomp, "SZIP") == 0) {
+ else if (strcmp(scomp, "SZIP") == 0) {
filt->filtn = H5Z_FILTER_SZIP;
filt->cd_nelmts = 2;
if (no_param) { /*no more parameters, SZIP must have parameter */
@@ -337,7 +337,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
* H5Z_FILTER_SHUFFLE
*-------------------------------------------------------------------------
*/
- else if (HDstrcmp(scomp, "SHUF") == 0) {
+ else if (strcmp(scomp, "SHUF") == 0) {
filt->filtn = H5Z_FILTER_SHUFFLE;
filt->cd_nelmts = 0;
if (m > 0) { /*shuffle does not have parameter */
@@ -351,7 +351,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
* H5Z_FILTER_FLETCHER32
*-------------------------------------------------------------------------
*/
- else if (HDstrcmp(scomp, "FLET") == 0) {
+ else if (strcmp(scomp, "FLET") == 0) {
filt->filtn = H5Z_FILTER_FLETCHER32;
filt->cd_nelmts = 0;
if (m > 0) { /*shuffle does not have parameter */
@@ -365,7 +365,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
* H5Z_FILTER_NBIT
*-------------------------------------------------------------------------
*/
- else if (HDstrcmp(scomp, "NBIT") == 0) {
+ else if (strcmp(scomp, "NBIT") == 0) {
filt->filtn = H5Z_FILTER_NBIT;
filt->cd_nelmts = 0;
if (m > 0) { /*nbit does not have parameter */
@@ -379,7 +379,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
* H5Z_FILTER_SCALEOFFSET
*-------------------------------------------------------------------------
*/
- else if (HDstrcmp(scomp, "SOFF") == 0) {
+ else if (strcmp(scomp, "SOFF") == 0) {
filt->filtn = H5Z_FILTER_SCALEOFFSET;
filt->cd_nelmts = 2;
if (no_param) { /*no more parameters, SOFF must have parameter */
@@ -393,7 +393,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
* User Defined Filter
*-------------------------------------------------------------------------
*/
- else if (HDstrcmp(scomp, "UD") == 0) {
+ else if (strcmp(scomp, "UD") == 0) {
/* parameters does not match count */
if (filt->cd_nelmts != j) {
if (obj_list)
@@ -448,7 +448,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
error_msg("pixels_per_block is too large in <%s>\n", str);
exit(EXIT_FAILURE);
}
- if ((HDstrcmp(smask, "NN") != 0) && (HDstrcmp(smask, "EC") != 0)) {
+ if ((strcmp(smask, "NN") != 0) && (strcmp(smask, "EC") != 0)) {
if (obj_list)
free(obj_list);
error_msg("szip mask must be 'NN' or 'EC' \n");
@@ -486,7 +486,7 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about
obj_list_t *obj_list = NULL;
unsigned i, j, n;
char c;
- size_t len = HDstrlen(str);
+ size_t len = strlen(str);
int k, end_obj = -1, c_index;
char sobj[MAX_NC_NAME];
char sdim[10];
@@ -527,7 +527,7 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about
sobj[k] = '\0';
else
sobj[k + 1] = '\0';
- HDstrcpy(obj_list[n].obj, sobj);
+ strcpy(obj_list[n].obj, sobj);
memset(sobj, 0, sizeof(sobj));
n++;
k = -1;
@@ -546,11 +546,11 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about
for (j = (unsigned)(end_obj + 1), n = 0; n <= 5; j++, n++) {
if (n == 5) {
slayout[n] = '\0'; /*cut string */
- if (HDstrcmp(slayout, "COMPA") == 0)
+ if (strcmp(slayout, "COMPA") == 0)
pack->layout = H5D_COMPACT;
- else if (HDstrcmp(slayout, "CONTI") == 0)
+ else if (strcmp(slayout, "CONTI") == 0)
pack->layout = H5D_CONTIGUOUS;
- else if (HDstrcmp(slayout, "CHUNK") == 0)
+ else if (strcmp(slayout, "CHUNK") == 0)
pack->layout = H5D_CHUNKED;
else {
error_msg("in parse layout, not a valid layout in <%s>\n", str);
@@ -604,7 +604,7 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about
else if (i == len - 1) { /*no more parameters */
sdim[k] = '\0';
k = 0;
- if (HDstrcmp(sdim, "NONE") == 0) {
+ if (strcmp(sdim, "NONE") == 0) {
pack->chunk.rank = -2;
}
else {
diff --git a/tools/src/h5repack/h5repack_refs.c b/tools/src/h5repack/h5repack_refs.c
index ce4a5cf0e0d..e71d6db7679 100644
--- a/tools/src/h5repack/h5repack_refs.c
+++ b/tools/src/h5repack/h5repack_refs.c
@@ -451,7 +451,7 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) /
unsigned u, i, j;
int rank;
H5T_class_t type_class = -1;
- hbool_t is_ref = 0, is_ref_vlen = 0, is_ref_array = 0, is_ref_comp = 0;
+ bool is_ref = 0, is_ref_vlen = 0, is_ref_array = 0, is_ref_comp = 0;
void *refbuf = NULL;
void *buf = NULL;
unsigned *ref_comp_index = NULL;
diff --git a/tools/src/h5repack/h5repack_verify.c b/tools/src/h5repack/h5repack_verify.c
index 572aa489144..819dd94ab26 100644
--- a/tools/src/h5repack/h5repack_verify.c
+++ b/tools/src/h5repack/h5repack_verify.c
@@ -49,7 +49,7 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options
hid_t fcpl_in = H5I_INVALID_HID; /* file creation property for input file */
hid_t fcpl_out = H5I_INVALID_HID; /* file creation property for output file */
H5F_fspace_strategy_t in_strategy, out_strategy; /* file space handling strategy for in/output file */
- hbool_t in_persist, out_persist; /* free-space persist status for in/output file */
+ bool in_persist, out_persist; /* free-space persist status for in/output file */
hsize_t in_threshold, out_threshold; /* free-space section threshold for in/output file */
hsize_t in_pagesize, out_pagesize; /* file space page size for input/output file */
int ret_value = 0;
@@ -234,7 +234,7 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options
* the same as the input file's free-space persist status
*/
if (options->fs_persist) {
- if (out_persist != (hbool_t)(options->fs_persist == (-1) ? FALSE : options->fs_persist))
+ if (out_persist != (bool)(options->fs_persist == (-1) ? false : options->fs_persist))
H5TOOLS_GOTO_ERROR((-1), "free-space persist status not set as unexpected");
}
else {
diff --git a/tools/src/h5stat/h5stat.c b/tools/src/h5stat/h5stat.c
index 5cfa61d182f..15232e419a3 100644
--- a/tools/src/h5stat/h5stat.c
+++ b/tools/src/h5stat/h5stat.c
@@ -101,7 +101,7 @@ typedef struct iter_t {
hsize_t super_ext_size; /* superblock extension size */
hsize_t ublk_size; /* user block size (if exists) */
H5F_fspace_strategy_t fs_strategy; /* File space management strategy */
- hbool_t fs_persist; /* Free-space persist or not */
+ bool fs_persist; /* Free-space persist or not */
hsize_t fs_threshold; /* Free-space section threshold */
hsize_t fsp_size; /* File space page size */
hsize_t free_space; /* Amount of freespace in the file */
@@ -122,7 +122,7 @@ static const char *drivername = NULL;
static H5FD_ros3_fapl_ext_t ros3_fa = {
{
1, /* Structure Version */
- FALSE, /* Authenticate? */
+ false, /* Authenticate? */
"", /* AWS Region */
"", /* Access Key ID */
"", /* Secret Access Key */
@@ -143,22 +143,22 @@ static H5FD_hdfs_fapl_t hdfs_fa = {
};
#endif /* H5_HAVE_LIBHDFS */
-static int display_all = TRUE;
+static int display_all = true;
/* Enable the printing of selected statistics */
-static int display_file = FALSE; /* display file information */
-static int display_group = FALSE; /* display groups information */
-static int display_dset = FALSE; /* display datasets information */
-static int display_dset_dtype_meta = FALSE; /* display datasets' datatype information */
-static int display_attr = FALSE; /* display attributes information */
-static int display_free_sections = FALSE; /* display free space information */
-static int display_summary = FALSE; /* display summary of file space information */
+static int display_file = false; /* display file information */
+static int display_group = false; /* display groups information */
+static int display_dset = false; /* display datasets information */
+static int display_dset_dtype_meta = false; /* display datasets' datatype information */
+static int display_attr = false; /* display attributes information */
+static int display_free_sections = false; /* display free space information */
+static int display_summary = false; /* display summary of file space information */
-static int display_file_metadata = FALSE; /* display file space info for file's metadata */
-static int display_group_metadata = FALSE; /* display file space info for groups' metadata */
-static int display_dset_metadata = FALSE; /* display file space info for datasets' metadata */
+static int display_file_metadata = false; /* display file space info for file's metadata */
+static int display_group_metadata = false; /* display file space info for groups' metadata */
+static int display_dset_metadata = false; /* display file space info for datasets' metadata */
-static int display_object = FALSE; /* not implemented yet */
+static int display_object = false; /* not implemented yet */
/* Initialize threshold for small groups/datasets/attributes */
static int sgroups_threshold = DEF_SIZE_SMALL_GROUPS;
@@ -516,10 +516,10 @@ dataset_stats(iter_t *iter, const char *name, const H5O_info2_t *oi, const H5O_n
if ((tid = H5Dget_type(did)) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "H5Dget_type() failed");
- type_found = FALSE;
+ type_found = false;
for (u = 0; u < iter->dset_ntypes; u++)
if (H5Tequal(iter->dset_type_info[u].tid, tid) > 0) {
- type_found = TRUE;
+ type_found = true;
break;
} /* end for */
@@ -825,23 +825,23 @@ parse_command_line(int argc, const char *const *argv, struct handler_t **hand_re
break;
case 'F':
- display_all = FALSE;
- display_file_metadata = TRUE;
+ display_all = false;
+ display_file_metadata = true;
break;
case 'f':
- display_all = FALSE;
- display_file = TRUE;
+ display_all = false;
+ display_file = true;
break;
case 'G':
- display_all = FALSE;
- display_group_metadata = TRUE;
+ display_all = false;
+ display_group_metadata = true;
break;
case 'g':
- display_all = FALSE;
- display_group = TRUE;
+ display_all = false;
+ display_group = true;
break;
case 'l':
@@ -858,13 +858,13 @@ parse_command_line(int argc, const char *const *argv, struct handler_t **hand_re
break;
case 'D':
- display_all = FALSE;
- display_dset_metadata = TRUE;
+ display_all = false;
+ display_dset_metadata = true;
break;
case 'd':
- display_all = FALSE;
- display_dset = TRUE;
+ display_all = false;
+ display_dset = true;
break;
case 'm':
@@ -881,13 +881,13 @@ parse_command_line(int argc, const char *const *argv, struct handler_t **hand_re
break;
case 'T':
- display_all = FALSE;
- display_dset_dtype_meta = TRUE;
+ display_all = false;
+ display_dset_dtype_meta = true;
break;
case 'A':
- display_all = FALSE;
- display_attr = TRUE;
+ display_all = false;
+ display_attr = true;
break;
case 'a':
@@ -904,18 +904,18 @@ parse_command_line(int argc, const char *const *argv, struct handler_t **hand_re
break;
case 's':
- display_all = FALSE;
- display_free_sections = TRUE;
+ display_all = false;
+ display_free_sections = true;
break;
case 'S':
- display_all = FALSE;
- display_summary = TRUE;
+ display_all = false;
+ display_summary = true;
break;
case 'O':
- display_all = FALSE;
- display_object = TRUE;
+ display_all = false;
+ display_object = true;
/* Allocate space to hold the command line info */
if (NULL == (hand = (struct handler_t *)calloc((size_t)1, sizeof(struct handler_t)))) {
@@ -932,7 +932,7 @@ parse_command_line(int argc, const char *const *argv, struct handler_t **hand_re
/* Store object names */
for (u = 0; u < hand->obj_count; u++)
- if (NULL == (hand->obj[u] = HDstrdup(H5_optarg))) {
+ if (NULL == (hand->obj[u] = strdup(H5_optarg))) {
error_msg("unable to allocate memory for object name\n");
goto error;
} /* end if */
@@ -1514,17 +1514,17 @@ static void
print_file_statistics(const iter_t *iter)
{
if (display_all) {
- display_file = TRUE;
- display_group = TRUE;
- display_dset = TRUE;
- display_dset_dtype_meta = TRUE;
- display_attr = TRUE;
- display_free_sections = TRUE;
- display_summary = TRUE;
-
- display_file_metadata = TRUE;
- display_group_metadata = TRUE;
- display_dset_metadata = TRUE;
+ display_file = true;
+ display_group = true;
+ display_dset = true;
+ display_dset_dtype_meta = true;
+ display_attr = true;
+ display_free_sections = true;
+ display_summary = true;
+
+ display_file_metadata = true;
+ display_group_metadata = true;
+ display_dset_metadata = true;
}
if (display_file)
@@ -1625,11 +1625,11 @@ main(int argc, char *argv[])
vfd_info.u.name = drivername;
#ifdef H5_HAVE_ROS3_VFD
- if (!HDstrcmp(drivername, drivernames[ROS3_VFD_IDX]))
+ if (!strcmp(drivername, drivernames[ROS3_VFD_IDX]))
vfd_info.info = &ros3_fa;
#endif
#ifdef H5_HAVE_LIBHDFS
- if (!HDstrcmp(drivername, drivernames[HDFS_VFD_IDX]))
+ if (!strcmp(drivername, drivernames[HDFS_VFD_IDX]))
vfd_info.info = &hdfs_fa;
#endif
@@ -1708,7 +1708,7 @@ main(int argc, char *argv[])
unsigned u;
for (u = 0; u < hand->obj_count; u++) {
- if (h5trav_visit(fid, hand->obj[u], TRUE, TRUE, obj_stats, lnk_stats, &iter, H5O_INFO_ALL) <
+ if (h5trav_visit(fid, hand->obj[u], true, true, obj_stats, lnk_stats, &iter, H5O_INFO_ALL) <
0) {
error_msg("unable to traverse object \"%s\"\n", hand->obj[u]);
h5tools_setstatus(EXIT_FAILURE);
@@ -1718,7 +1718,7 @@ main(int argc, char *argv[])
} /* end for */
} /* end if */
else {
- if (h5trav_visit(fid, "/", TRUE, TRUE, obj_stats, lnk_stats, &iter, H5O_INFO_ALL) < 0) {
+ if (h5trav_visit(fid, "/", true, true, obj_stats, lnk_stats, &iter, H5O_INFO_ALL) < 0) {
error_msg("unable to traverse objects/links in file \"%s\"\n", fname);
h5tools_setstatus(EXIT_FAILURE);
}
diff --git a/tools/src/misc/h5clear.c b/tools/src/misc/h5clear.c
index 2272626607f..31f7c1744f8 100644
--- a/tools/src/misc/h5clear.c
+++ b/tools/src/misc/h5clear.c
@@ -34,10 +34,10 @@
#define DEFAULT_INCREMENT (1024 * 1024)
static char *fname_g = NULL;
-static hbool_t clear_status_flags = FALSE;
-static hbool_t remove_cache_image = FALSE;
-static hbool_t print_filesize = FALSE;
-static hbool_t increment_eoa_eof = FALSE;
+static bool clear_status_flags = false;
+static bool remove_cache_image = false;
+static bool print_filesize = false;
+static bool increment_eoa_eof = false;
static hsize_t increment = DEFAULT_INCREMENT;
/*
@@ -130,19 +130,19 @@ parse_command_line(int argc, const char *const *argv)
goto done;
case 's':
- clear_status_flags = TRUE;
+ clear_status_flags = true;
break;
case 'm':
- remove_cache_image = TRUE;
+ remove_cache_image = true;
break;
case 'z':
- print_filesize = TRUE;
+ print_filesize = true;
break;
case 'i':
- increment_eoa_eof = TRUE;
+ increment_eoa_eof = true;
if (H5_optarg != NULL) {
if (atoi(H5_optarg) < 0) {
usage(h5tools_getprogname());
@@ -167,7 +167,7 @@ parse_command_line(int argc, const char *const *argv)
goto error;
} /* end if */
- fname_g = HDstrdup(argv[H5_optind]);
+ fname_g = strdup(argv[H5_optind]);
done:
return (0);
@@ -260,7 +260,7 @@ main(int argc, char *argv[])
}
/* Duplicate the file name */
- fname = HDstrdup(fname_g);
+ fname = strdup(fname_g);
/* Get a copy of the file access property list */
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) {
@@ -308,7 +308,7 @@ main(int argc, char *argv[])
}
/* Open the file */
- if ((fid = h5tools_fopen(fname, flags, fapl, FALSE, NULL, (size_t)0)) < 0) {
+ if ((fid = h5tools_fopen(fname, flags, fapl, false, NULL, (size_t)0)) < 0) {
error_msg("h5tools_fopen\n");
h5tools_setstatus(EXIT_FAILURE);
goto done;
diff --git a/tools/src/misc/h5debug.c b/tools/src/misc/h5debug.c
index fa9324494f8..1bba4199a36 100644
--- a/tools/src/misc/h5debug.c
+++ b/tools/src/misc/h5debug.c
@@ -233,7 +233,7 @@ main(int argc, char *argv[])
size_t u;
H5E_auto2_t func = NULL;
void *edata = NULL;
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
herr_t status = SUCCEED;
int exit_value = 0;
@@ -262,7 +262,7 @@ main(int argc, char *argv[])
exit_value = 1;
goto done;
} /* end if */
- if (HDstrchr(argv[1], '%'))
+ if (strchr(argv[1], '%'))
if (H5Pset_fapl_family(fapl, (hsize_t)0, H5P_DEFAULT) < 0) {
fprintf(stderr, "cannot set file access property list\n");
exit_value = 1;
@@ -280,7 +280,7 @@ main(int argc, char *argv[])
exit_value = 1;
goto done;
}
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
if (NULL == (vol_obj = (H5VL_object_t *)H5VL_vol_object(fid))) {
fprintf(stderr, "cannot obtain vol_obj pointer\n");
@@ -772,15 +772,15 @@ main(int argc, char *argv[])
printf("%-*s ", VCOL, "Signature:");
for (u = 0; u < sizeof(sig); u++) {
if (sig[u] > ' ' && sig[u] <= '~' && '\\' != sig[u])
- HDputchar(sig[u]);
+ putchar(sig[u]);
else if ('\\' == sig[u]) {
- HDputchar('\\');
- HDputchar('\\');
+ putchar('\\');
+ putchar('\\');
}
else
printf("\\%03o", sig[u]);
}
- HDputchar('\n');
+ putchar('\n');
fprintf(stderr, "unknown signature\n");
exit_value = 4;
@@ -807,7 +807,7 @@ main(int argc, char *argv[])
/* Pop API context */
if (api_ctx_pushed)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
H5Eset_auto2(H5E_DEFAULT, func, edata);
diff --git a/tools/src/misc/h5delete.c b/tools/src/misc/h5delete.c
index f996d8dc0de..42a5eaaf90e 100644
--- a/tools/src/misc/h5delete.c
+++ b/tools/src/misc/h5delete.c
@@ -31,17 +31,17 @@ usage(void)
int
main(int argc, char *argv[])
{
- hbool_t quiet = FALSE;
+ bool quiet = false;
const char *name = NULL;
int ret = 0;
switch (argc) {
case 3:
- if (HDstrcmp(argv[1], "-f") != 0) {
+ if (strcmp(argv[1], "-f") != 0) {
usage();
return EXIT_FAILURE;
}
- quiet = TRUE;
+ quiet = true;
name = argv[2];
break;
case 2:
diff --git a/tools/src/misc/h5mkgrp.c b/tools/src/misc/h5mkgrp.c
index 31deb8bf514..92e30423661 100644
--- a/tools/src/misc/h5mkgrp.c
+++ b/tools/src/misc/h5mkgrp.c
@@ -30,13 +30,13 @@ static struct h5_long_options l_opts[] = {
/* Command line parameter settings */
typedef struct mkgrp_opt_t {
- char *fname; /* File name to operate on */
- hbool_t latest; /* Whether file should use latest format versions */
- hbool_t verbose; /* Whether output should be verbose */
- hbool_t parents; /* Whether to create intermediate groups */
- size_t ngroups; /* Number of groups to create */
- char **groups; /* Pointer to array of group names */
- hid_t fapl_id; /* fapl to use when opening the file */
+ char *fname; /* File name to operate on */
+ bool latest; /* Whether file should use latest format versions */
+ bool verbose; /* Whether output should be verbose */
+ bool parents; /* Whether to create intermediate groups */
+ size_t ngroups; /* Number of groups to create */
+ char **groups; /* Pointer to array of group names */
+ hid_t fapl_id; /* fapl to use when opening the file */
} mkgrp_opt_t;
static mkgrp_opt_t params_g; /* Command line parameter settings */
@@ -135,8 +135,8 @@ parse_command_line(int argc, const char *const *argv, mkgrp_opt_t *options)
{
int opt; /* Option from command line */
size_t curr_group; /* Current group name to copy */
- hbool_t custom_vol = FALSE;
- hbool_t custom_vfd = FALSE;
+ bool custom_vol = false;
+ bool custom_vfd = false;
h5tools_vol_info_t vol_info;
h5tools_vfd_info_t vfd_info;
hid_t tmp_fapl_id = H5I_INVALID_HID;
@@ -162,17 +162,17 @@ parse_command_line(int argc, const char *const *argv, mkgrp_opt_t *options)
/* Create objects with the latest version of the format */
case 'l':
- options->latest = TRUE;
+ options->latest = true;
break;
/* Create parent groups */
case 'p':
- options->parents = TRUE;
+ options->parents = true;
break;
/* Verbose output */
case 'v':
- options->verbose = TRUE;
+ options->verbose = true;
break;
/* Display version */
@@ -184,13 +184,13 @@ parse_command_line(int argc, const char *const *argv, mkgrp_opt_t *options)
case '1':
vol_info.type = VOL_BY_VALUE;
vol_info.u.value = (H5VL_class_value_t)atoi(H5_optarg);
- custom_vol = TRUE;
+ custom_vol = true;
break;
case '2':
vol_info.type = VOL_BY_NAME;
vol_info.u.name = H5_optarg;
- custom_vol = TRUE;
+ custom_vol = true;
break;
case '3':
@@ -200,13 +200,13 @@ parse_command_line(int argc, const char *const *argv, mkgrp_opt_t *options)
case '4':
vfd_info.type = VFD_BY_VALUE;
vfd_info.u.value = (H5FD_class_value_t)atoi(H5_optarg);
- custom_vfd = TRUE;
+ custom_vfd = true;
break;
case '5':
vfd_info.type = VFD_BY_NAME;
vfd_info.u.name = H5_optarg;
- custom_vfd = TRUE;
+ custom_vfd = true;
break;
case '6':
@@ -228,7 +228,7 @@ parse_command_line(int argc, const char *const *argv, mkgrp_opt_t *options)
}
/* Retrieve file name */
- options->fname = HDstrdup(argv[H5_optind]);
+ options->fname = strdup(argv[H5_optind]);
H5_optind++;
/* Check for group(s) to be created */
@@ -245,7 +245,7 @@ parse_command_line(int argc, const char *const *argv, mkgrp_opt_t *options)
/* Retrieve the group names */
curr_group = 0;
while (H5_optind < argc) {
- options->groups[curr_group] = HDstrdup(argv[H5_optind]);
+ options->groups[curr_group] = strdup(argv[H5_optind]);
curr_group++;
H5_optind++;
}
@@ -346,7 +346,7 @@ main(int argc, char *argv[])
/* Check for creating intermediate groups */
if (params_g.parents) {
/* Set the intermediate group creation property */
- if (H5Pset_create_intermediate_group(lcpl_id, TRUE) < 0) {
+ if (H5Pset_create_intermediate_group(lcpl_id, true) < 0) {
error_msg("Could not set property for creating parent groups\n");
leave(EXIT_FAILURE);
}
diff --git a/tools/src/misc/h5repart.c b/tools/src/misc/h5repart.c
index e7bf0559b5a..feb447f7e09 100644
--- a/tools/src/misc/h5repart.c
+++ b/tools/src/misc/h5repart.c
@@ -146,11 +146,11 @@ main(int argc, char *argv[])
ssize_t nio; /*I/O return value */
int argno = 1; /*program argument number */
int src, dst = -1; /*source & destination files */
- int need_seek = FALSE; /*destination needs to seek? */
+ int need_seek = false; /*destination needs to seek? */
int need_write; /*data needs to be written? */
h5_stat_t sb; /*temporary file stat buffer */
- int verbose = FALSE; /*display file names? */
+ int verbose = false; /*display file names? */
const char *src_gen_name; /*general source name */
char *src_name = NULL; /*source member name */
@@ -172,12 +172,12 @@ main(int argc, char *argv[])
hid_t fapl; /*file access property list */
hid_t file;
hsize_t hdsize; /*destination logical memb size */
- hbool_t family_to_single = FALSE; /*change family to single file driver? */
+ bool family_to_single = false; /*change family to single file driver? */
/*
* Get the program name from argv[0]. Use only the last component.
*/
- if ((prog_name = HDstrrchr(argv[0], '/')))
+ if ((prog_name = strrchr(argv[0], '/')))
prog_name++;
else
prog_name = argv[0];
@@ -186,21 +186,21 @@ main(int argc, char *argv[])
* Parse switches.
*/
while (argno < argc && '-' == argv[argno][0]) {
- if (!HDstrcmp(argv[argno], "-v")) {
- verbose = TRUE;
+ if (!strcmp(argv[argno], "-v")) {
+ verbose = true;
argno++;
}
- else if (!HDstrcmp(argv[argno], "-V")) {
+ else if (!strcmp(argv[argno], "-V")) {
printf("This is %s version %u.%u release %u\n", prog_name, H5_VERS_MAJOR, H5_VERS_MINOR,
H5_VERS_RELEASE);
exit(EXIT_SUCCESS);
}
- else if (!HDstrcmp(argv[argno], "-family_to_sec2")) {
- family_to_single = TRUE;
+ else if (!strcmp(argv[argno], "-family_to_sec2")) {
+ family_to_single = true;
argno++;
}
- else if (!HDstrcmp(argv[argno], "-family_to_single")) {
- family_to_single = TRUE;
+ else if (!strcmp(argv[argno], "-family_to_single")) {
+ family_to_single = true;
argno++;
}
else if ('b' == argv[argno][1]) {
@@ -227,16 +227,16 @@ main(int argc, char *argv[])
if (argno >= argc)
usage(prog_name);
src_gen_name = argv[argno++];
- HDsnprintf(src_name, NAMELEN, src_gen_name, src_membno);
+ snprintf(src_name, NAMELEN, src_gen_name, src_membno);
src_is_family = strcmp(src_name, src_gen_name);
if ((src = HDopen(src_name, O_RDONLY)) < 0) {
- HDperror(src_name);
+ perror(src_name);
exit(EXIT_FAILURE);
}
if (HDfstat(src, &sb) < 0) {
- HDperror("fstat");
+ perror("fstat");
exit(EXIT_FAILURE);
}
src_size = src_act_size = sb.st_size;
@@ -249,11 +249,11 @@ main(int argc, char *argv[])
if (argno >= argc)
usage(prog_name);
dst_gen_name = argv[argno++];
- HDsnprintf(dst_name, NAMELEN, dst_gen_name, dst_membno);
- dst_is_family = HDstrcmp(dst_name, dst_gen_name);
+ snprintf(dst_name, NAMELEN, dst_gen_name, dst_membno);
+ dst_is_family = strcmp(dst_name, dst_gen_name);
if ((dst = HDopen(dst_name, O_RDWR | O_CREAT | O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0) {
- HDperror(dst_name);
+ perror(dst_name);
exit(EXIT_FAILURE);
}
if (verbose)
@@ -278,12 +278,12 @@ main(int argc, char *argv[])
if (left_overs) {
n = (size_t)MIN((off_t)n, left_overs);
left_overs = left_overs - (off_t)n;
- need_write = FALSE;
+ need_write = false;
}
else if (src_offset < src_act_size) {
n = (size_t)MIN((off_t)n, src_act_size - src_offset);
if ((nio = HDread(src, buf, n)) < 0) {
- HDperror("read");
+ perror("read");
exit(EXIT_FAILURE);
}
else if ((size_t)nio != n) {
@@ -299,7 +299,7 @@ main(int argc, char *argv[])
else {
n = 0;
left_overs = src_size - src_act_size;
- need_write = FALSE;
+ need_write = false;
}
/*
@@ -309,21 +309,21 @@ main(int argc, char *argv[])
*/
if (need_write) {
if (need_seek && HDlseek(dst, dst_offset, SEEK_SET) < 0) {
- HDperror("HDlseek");
+ perror("HDlseek");
exit(EXIT_FAILURE);
}
if ((nio = HDwrite(dst, buf, n)) < 0) {
- HDperror("write");
+ perror("write");
exit(EXIT_FAILURE);
}
else if ((size_t)nio != n) {
fprintf(stderr, "%s: short write\n", dst_name);
exit(EXIT_FAILURE);
}
- need_seek = FALSE;
+ need_seek = false;
}
else {
- need_seek = TRUE;
+ need_seek = true;
}
/*
@@ -341,17 +341,17 @@ main(int argc, char *argv[])
dst_offset = dst_offset + (off_t)n;
break;
}
- HDsnprintf(src_name, NAMELEN, src_gen_name, ++src_membno);
+ snprintf(src_name, NAMELEN, src_gen_name, ++src_membno);
if ((src = HDopen(src_name, O_RDONLY)) < 0 && ENOENT == errno) {
dst_offset = dst_offset + (off_t)n;
break;
}
else if (src < 0) {
- HDperror(src_name);
+ perror(src_name);
exit(EXIT_FAILURE);
}
if (HDfstat(src, &sb) < 0) {
- HDperror("fstat");
+ perror("fstat");
exit(EXIT_FAILURE);
}
src_act_size = sb.st_size;
@@ -372,30 +372,30 @@ main(int argc, char *argv[])
if (dst_is_family && dst_offset == dst_size) {
if (0 == dst_membno) {
if (HDlseek(dst, dst_size - 1, SEEK_SET) < 0) {
- HDperror("HDHDlseek");
+ perror("HDHDlseek");
exit(EXIT_FAILURE);
}
if (HDread(dst, buf, 1) < 0) {
- HDperror("read");
+ perror("read");
exit(EXIT_FAILURE);
}
if (HDlseek(dst, dst_size - 1, SEEK_SET) < 0) {
- HDperror("HDlseek");
+ perror("HDlseek");
exit(EXIT_FAILURE);
}
if (HDwrite(dst, buf, 1) < 0) {
- HDperror("write");
+ perror("write");
exit(EXIT_FAILURE);
}
}
HDclose(dst);
- HDsnprintf(dst_name, NAMELEN, dst_gen_name, ++dst_membno);
+ snprintf(dst_name, NAMELEN, dst_gen_name, ++dst_membno);
if ((dst = HDopen(dst_name, O_RDWR | O_CREAT | O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0) {
- HDperror(dst_name);
+ perror(dst_name);
exit(EXIT_FAILURE);
}
dst_offset = 0;
- need_seek = FALSE;
+ need_seek = false;
if (verbose)
fprintf(stderr, "> %s\n", dst_name);
}
@@ -408,19 +408,19 @@ main(int argc, char *argv[])
*/
if (need_seek) {
if (HDlseek(dst, dst_offset - 1, SEEK_SET) < 0) {
- HDperror("HDlseek");
+ perror("HDlseek");
exit(EXIT_FAILURE);
}
if (HDread(dst, buf, 1) < 0) {
- HDperror("read");
+ perror("read");
exit(EXIT_FAILURE);
}
if (HDlseek(dst, dst_offset - 1, SEEK_SET) < 0) {
- HDperror("HDlseek");
+ perror("HDlseek");
exit(EXIT_FAILURE);
}
if (HDwrite(dst, buf, 1) < 0) {
- HDperror("write");
+ perror("write");
exit(EXIT_FAILURE);
}
}
@@ -429,7 +429,7 @@ main(int argc, char *argv[])
/* Modify family driver information saved in superblock through private property.
* These private properties are for this tool only. */
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) {
- HDperror("H5Pcreate");
+ perror("H5Pcreate");
exit(EXIT_FAILURE);
}
@@ -439,7 +439,7 @@ main(int argc, char *argv[])
* the library to ignore the family driver information saved in the superblock.
*/
if (H5Pset(fapl, H5F_ACS_FAMILY_TO_SINGLE_NAME, &family_to_single) < 0) {
- HDperror("H5Pset");
+ perror("H5Pset");
exit(EXIT_FAILURE);
}
}
@@ -448,14 +448,14 @@ main(int argc, char *argv[])
* library to save the new member size(specified in command line) in superblock.
* This private property is for this tool only. */
if (H5Pset_fapl_family(fapl, H5F_FAMILY_DEFAULT, H5P_DEFAULT) < 0) {
- HDperror("H5Pset_fapl_family");
+ perror("H5Pset_fapl_family");
exit(EXIT_FAILURE);
}
/* Set the property of the new member size as hsize_t */
hdsize = (hsize_t)dst_size;
if (H5Pset(fapl, H5F_ACS_FAMILY_NEWSIZE_NAME, &hdsize) < 0) {
- HDperror("H5Pset");
+ perror("H5Pset");
exit(EXIT_FAILURE);
}
}
@@ -476,13 +476,13 @@ main(int argc, char *argv[])
if (file >= 0) {
if (H5Fclose(file) < 0) {
- HDperror("H5Fclose");
+ perror("H5Fclose");
exit(EXIT_FAILURE);
} /* end if */
} /* end if */
if (H5Pclose(fapl) < 0) {
- HDperror("H5Pclose");
+ perror("H5Pclose");
exit(EXIT_FAILURE);
} /* end if */
diff --git a/tools/test/h5copy/CMakeTests.cmake b/tools/test/h5copy/CMakeTests.cmake
index b47000a3193..e443827cd4d 100644
--- a/tools/test/h5copy/CMakeTests.cmake
+++ b/tools/test/h5copy/CMakeTests.cmake
@@ -20,32 +20,35 @@
# Copy all the HDF5 files from the source directory into the test directory
# --------------------------------------------------------------------
set (LIST_HDF5_TEST_FILES
- ${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/testfiles/h5copy_extlinks_src.h5
- ${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/testfiles/h5copy_extlinks_trg.h5
- ${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/testfiles/h5copy_ref.h5
- ${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/testfiles/h5copytst.h5
- ${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/testfiles/tudfilter.h5
- ${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/testfiles/tudfilter2.h5
+ h5copy_extlinks_src.h5
+ h5copy_extlinks_trg.h5
+ h5copy_ref.h5
+ h5copytst.h5
+ tudfilter.h5
+ tudfilter2.h5
)
set (LIST_OTHER_TEST_FILES
- ${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/testfiles/h5copy_misc1.out
- ${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/testfiles/h5copy_misc1.err
- ${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/testfiles/tudfilter.h5.txt
- ${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/testfiles/tudfilter.h5_ERR.txt
- ${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/testfiles/h5copy_plugin_fail_ERR.out.h5.txt
- ${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/testfiles/h5copy_plugin_test.out.h5.txt
- ${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/testfiles/h5copy_help1.ddl
- ${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/testfiles/h5copy_help2.ddl
+ h5copy_misc1.out
+ h5copy_misc1.err
+ tudfilter.h5.txt
+ tudfilter.h5_ERR.txt
+ h5copy_plugin_fail_ERR.out.h5.txt
+ h5copy_plugin_test.out.h5.txt
+ h5copy_help1.ddl
+ h5copy_help2.ddl
)
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- foreach (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
- get_filename_component(fname "${listfiles}" NAME)
- HDFTEST_COPY_FILE("${listfiles}" "${PROJECT_BINARY_DIR}/testfiles/${fname}" "h5copy_files")
+ foreach (listfiles ${LIST_HDF5_TEST_FILES})
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${listfiles}" "${PROJECT_BINARY_DIR}/testfiles/${listfiles}" "h5copy_files")
endforeach ()
- add_custom_target(h5copy_files ALL COMMENT "Copying files needed by h5copy tests" DEPENDS ${h5copy_files_list})
+
+ foreach (listothers ${LIST_OTHER_TEST_FILES})
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/expected/${listothers}" "${PROJECT_BINARY_DIR}/testfiles/${listothers}" "h5copy_files")
+ endforeach ()
+ add_custom_target(h5copy_files ALL COMMENT "Copying files needed by h5copy tests" DEPENDS ${h5copy_files_list})
##############################################################################
##############################################################################
diff --git a/tools/test/h5copy/testfiles/h5copy_extlinks_src.out.ls b/tools/test/h5copy/expected/h5copy_extlinks_src.out.ls
similarity index 100%
rename from tools/test/h5copy/testfiles/h5copy_extlinks_src.out.ls
rename to tools/test/h5copy/expected/h5copy_extlinks_src.out.ls
diff --git a/tools/test/h5copy/testfiles/h5copy_help1.ddl b/tools/test/h5copy/expected/h5copy_help1.ddl
similarity index 100%
rename from tools/test/h5copy/testfiles/h5copy_help1.ddl
rename to tools/test/h5copy/expected/h5copy_help1.ddl
diff --git a/tools/test/h5copy/testfiles/h5copy_help2.ddl b/tools/test/h5copy/expected/h5copy_help2.ddl
similarity index 100%
rename from tools/test/h5copy/testfiles/h5copy_help2.ddl
rename to tools/test/h5copy/expected/h5copy_help2.ddl
diff --git a/tools/test/h5copy/testfiles/h5copy_misc1.err b/tools/test/h5copy/expected/h5copy_misc1.err
similarity index 100%
rename from tools/test/h5copy/testfiles/h5copy_misc1.err
rename to tools/test/h5copy/expected/h5copy_misc1.err
diff --git a/tools/test/h5copy/testfiles/h5copy_misc1.out b/tools/test/h5copy/expected/h5copy_misc1.out
similarity index 100%
rename from tools/test/h5copy/testfiles/h5copy_misc1.out
rename to tools/test/h5copy/expected/h5copy_misc1.out
diff --git a/tools/test/h5copy/testfiles/h5copy_plugin_fail_ERR.out.h5.txt b/tools/test/h5copy/expected/h5copy_plugin_fail_ERR.out.h5.txt
similarity index 100%
rename from tools/test/h5copy/testfiles/h5copy_plugin_fail_ERR.out.h5.txt
rename to tools/test/h5copy/expected/h5copy_plugin_fail_ERR.out.h5.txt
diff --git a/tools/test/h5copy/testfiles/h5copy_plugin_test.out.h5.txt b/tools/test/h5copy/expected/h5copy_plugin_test.out.h5.txt
similarity index 100%
rename from tools/test/h5copy/testfiles/h5copy_plugin_test.out.h5.txt
rename to tools/test/h5copy/expected/h5copy_plugin_test.out.h5.txt
diff --git a/tools/test/h5copy/testfiles/h5copy_ref.out.ls b/tools/test/h5copy/expected/h5copy_ref.out.ls
similarity index 100%
rename from tools/test/h5copy/testfiles/h5copy_ref.out.ls
rename to tools/test/h5copy/expected/h5copy_ref.out.ls
diff --git a/tools/test/h5copy/testfiles/h5copytst.out.ls b/tools/test/h5copy/expected/h5copytst.out.ls
similarity index 100%
rename from tools/test/h5copy/testfiles/h5copytst.out.ls
rename to tools/test/h5copy/expected/h5copytst.out.ls
diff --git a/tools/test/h5copy/testfiles/h5copytst_new.out.ls b/tools/test/h5copy/expected/h5copytst_new.out.ls
similarity index 100%
rename from tools/test/h5copy/testfiles/h5copytst_new.out.ls
rename to tools/test/h5copy/expected/h5copytst_new.out.ls
diff --git a/tools/test/h5copy/testfiles/tudfilter.h5.txt b/tools/test/h5copy/expected/tudfilter.h5.txt
similarity index 100%
rename from tools/test/h5copy/testfiles/tudfilter.h5.txt
rename to tools/test/h5copy/expected/tudfilter.h5.txt
diff --git a/tools/test/h5copy/testfiles/tudfilter.h5_ERR.txt b/tools/test/h5copy/expected/tudfilter.h5_ERR.txt
similarity index 100%
rename from tools/test/h5copy/testfiles/tudfilter.h5_ERR.txt
rename to tools/test/h5copy/expected/tudfilter.h5_ERR.txt
diff --git a/tools/test/h5copy/h5copygentest.c b/tools/test/h5copy/h5copygentest.c
index db506936931..ac19f34d722 100644
--- a/tools/test/h5copy/h5copygentest.c
+++ b/tools/test/h5copy/h5copygentest.c
@@ -723,7 +723,7 @@ Test_Obj_Copy(void)
}
/* Test with old & new format groups */
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
/* Set the FAPL for the type of format */
/* Create source file */
diff --git a/tools/test/h5copy/testh5copy.sh.in b/tools/test/h5copy/testh5copy.sh.in
index 1f64d15f037..f2c4a8e1237 100644
--- a/tools/test/h5copy/testh5copy.sh.in
+++ b/tools/test/h5copy/testh5copy.sh.in
@@ -24,16 +24,16 @@ USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@"
# source dirs
SRC_TOOLS="$srcdir/../.."
-SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles"
# testfiles source dirs for tools
-SRC_H5LS_TESTFILES="$SRC_TOOLS_TESTFILES"
-SRC_H5DUMP_TESTFILES="$SRC_TOOLS_TESTFILES"
+SRC_H5LS_TESTFILES="$SRC_TOOLS/test/h5ls/testfiles"
+SRC_H5DUMP_TESTFILES="$SRC_TOOLS/test/h5dump/testfiles"
SRC_H5DIFF_TESTFILES="$SRC_TOOLS/test/h5diff/testfiles"
SRC_H5COPY_TESTFILES="$SRC_TOOLS/test/h5copy/testfiles"
SRC_H5REPACK_TESTFILES="$SRC_TOOLS/test/h5repack/testfiles"
SRC_H5JAM_TESTFILES="$SRC_TOOLS/test/h5jam/testfiles"
SRC_H5STAT_TESTFILES="$SRC_TOOLS/test/h5stat/testfiles"
SRC_H5IMPORT_TESTFILES="$SRC_TOOLS/test/h5import/testfiles"
+SRC_H5COPY_OUTFILES="$SRC_TOOLS/test/h5copy/expected"
TESTNAME=h5copy
EXIT_SUCCESS=0
@@ -58,10 +58,10 @@ $SRC_H5COPY_TESTFILES/h5copy_extlinks_trg.h5
# List of expect files that will be copied over to local test dir
LIST_OTHER_TEST_FILES="
-$SRC_H5COPY_TESTFILES/h5copy_misc1.out
-$SRC_H5COPY_TESTFILES/h5copy_misc1.err
-$SRC_H5COPY_TESTFILES/h5copy_help1.ddl
-$SRC_H5COPY_TESTFILES/h5copy_help2.ddl
+$SRC_H5COPY_OUTFILES/h5copy_misc1.out
+$SRC_H5COPY_OUTFILES/h5copy_misc1.err
+$SRC_H5COPY_OUTFILES/h5copy_help1.ddl
+$SRC_H5COPY_OUTFILES/h5copy_help2.ddl
"
H5COPY=../../src/h5copy/h5copy # The tool name
diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake
index b23f885d4fd..d89df46583d 100644
--- a/tools/test/h5diff/CMakeTests.cmake
+++ b/tools/test/h5diff/CMakeTests.cmake
@@ -19,303 +19,307 @@
# --------------------------------------------------------------------
# Copy all the HDF5 files from the test directory into the source directory
# --------------------------------------------------------------------
- set (LIST_HDF5_TEST_FILES
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_basic1.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_basic2.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_types.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dtypes.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_attr1.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_attr2.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_attr3.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dset1.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dset2.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dset3.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_hyper1.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_hyper2.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_empty.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_links.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_softlinks.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_linked_softlink.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_extlink_src.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_extlink_trg.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_ext2softlink_src.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_ext2softlink_trg.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dset_zero_dim_size1.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dset_zero_dim_size2.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_danglelinks1.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_danglelinks2.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_grp_recurse1.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_grp_recurse2.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_grp_recurse_ext1.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_grp_recurse_ext2-1.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_grp_recurse_ext2-2.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_grp_recurse_ext2-3.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_exclude1-1.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_exclude1-2.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_exclude2-1.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_exclude2-2.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_exclude3-1.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_exclude3-2.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_comp_vl_strs.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_attr_v_level1.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_attr_v_level2.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_enum_invalid_values.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/compounds_array_vlen1.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/compounds_array_vlen2.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/non_comparables1.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/non_comparables2.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/tudfilter.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/tudfilter2.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_strings1.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_strings2.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_eps1.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_eps2.h5
+ # tools/testfiles/vds
+ set (LIST_VDS_TEST_FILES
+ 1_a.h5
+ 1_b.h5
+ 1_c.h5
+ 1_d.h5
+ 1_e.h5
+ 1_f.h5
+ 1_vds.h5
+ 2_a.h5
+ 2_b.h5
+ 2_c.h5
+ 2_d.h5
+ 2_e.h5
+ 2_vds.h5
+ 3_1_vds.h5
+ 3_2_vds.h5
+ 4_0.h5
+ 4_1.h5
+ 4_2.h5
+ 4_vds.h5
+ 5_a.h5
+ 5_b.h5
+ 5_c.h5
+ 5_vds.h5
+ )
+ set (LIST_DIFF_TEST_FILES
+ h5diff_basic1.h5
+ h5diff_basic2.h5
+ h5diff_types.h5
+ h5diff_dtypes.h5
+ h5diff_attr1.h5
+ h5diff_attr2.h5
+ h5diff_attr3.h5
+ h5diff_dset1.h5
+ h5diff_dset2.h5
+ h5diff_dset3.h5
+ h5diff_hyper1.h5
+ h5diff_hyper2.h5
+ h5diff_empty.h5
+ h5diff_links.h5
+ h5diff_softlinks.h5
+ h5diff_linked_softlink.h5
+ h5diff_extlink_src.h5
+ h5diff_extlink_trg.h5
+ h5diff_ext2softlink_src.h5
+ h5diff_ext2softlink_trg.h5
+ h5diff_dset_zero_dim_size1.h5
+ h5diff_dset_zero_dim_size2.h5
+ h5diff_danglelinks1.h5
+ h5diff_danglelinks2.h5
+ h5diff_grp_recurse1.h5
+ h5diff_grp_recurse2.h5
+ h5diff_grp_recurse_ext1.h5
+ h5diff_grp_recurse_ext2-1.h5
+ h5diff_grp_recurse_ext2-2.h5
+ h5diff_grp_recurse_ext2-3.h5
+ h5diff_exclude1-1.h5
+ h5diff_exclude1-2.h5
+ h5diff_exclude2-1.h5
+ h5diff_exclude2-2.h5
+ h5diff_exclude3-1.h5
+ h5diff_exclude3-2.h5
+ h5diff_comp_vl_strs.h5
+ h5diff_attr_v_level1.h5
+ h5diff_attr_v_level2.h5
+ h5diff_enum_invalid_values.h5
+ compounds_array_vlen1.h5
+ compounds_array_vlen2.h5
+ non_comparables1.h5
+ non_comparables2.h5
+ tudfilter.h5
+ tudfilter2.h5
+ h5diff_strings1.h5
+ h5diff_strings2.h5
+ h5diff_eps1.h5
+ h5diff_eps2.h5
# onion VFD files
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_onion_objs.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_onion_objs.h5.onion
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_onion_dset_ext.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_onion_dset_ext.h5.onion
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_onion_dset_1d.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_onion_dset_1d.h5.onion
- # tools/testfiles/vds
- ${HDF5_TOOLS_DIR}/testfiles/vds/1_a.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/1_b.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/1_c.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/1_d.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/1_e.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/1_f.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/1_vds.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/2_a.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/2_b.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/2_c.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/2_d.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/2_e.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/2_vds.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/3_1_vds.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/3_2_vds.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/4_0.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/4_1.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/4_2.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/4_vds.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/5_a.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/5_b.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/5_c.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/5_vds.h5
+ h5diff_onion_objs.h5
+ h5diff_onion_objs.h5.onion
+ h5diff_onion_dset_ext.h5
+ h5diff_onion_dset_ext.h5.onion
+ h5diff_onion_dset_1d.h5
+ h5diff_onion_dset_1d.h5.onion
+ )
+ set (LIST_HDF5_TEST_FILES
# tools/testfiles
- ${HDF5_TOOLS_DIR}/testfiles/tvlstr.h5
+ tvlstr.h5
#STD_REF_OBJ files
- ${HDF5_TOOLS_DIR}/testfiles/trefer_attr.h5
- ${HDF5_TOOLS_DIR}/testfiles/trefer_compat.h5
- ${HDF5_TOOLS_DIR}/testfiles/trefer_ext1.h5
- ${HDF5_TOOLS_DIR}/testfiles/trefer_ext2.h5
- ${HDF5_TOOLS_DIR}/testfiles/trefer_grp.h5
- ${HDF5_TOOLS_DIR}/testfiles/trefer_obj_del.h5
- ${HDF5_TOOLS_DIR}/testfiles/trefer_obj.h5
- ${HDF5_TOOLS_DIR}/testfiles/trefer_param.h5
- ${HDF5_TOOLS_DIR}/testfiles/trefer_reg_1d.h5
- ${HDF5_TOOLS_DIR}/testfiles/trefer_reg.h5
+ trefer_attr.h5
+ trefer_compat.h5
+ trefer_ext1.h5
+ trefer_ext2.h5
+ trefer_grp.h5
+ trefer_obj_del.h5
+ trefer_obj.h5
+ trefer_param.h5
+ trefer_reg_1d.h5
+ trefer_reg.h5
)
set (LIST_OTHER_TEST_FILES
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_10.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_100.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_11.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_12.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_13.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_14.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_15.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_16_1.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_16_2.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_16_3.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_17.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_171.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_172.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_18_1.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_18.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_20.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_200.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_201.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_202.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_203.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_204.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_205.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_206.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_207.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_208.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_220.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_221.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_222.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_223.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_224.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_21.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_22.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_23.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_24.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_25.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_26.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_27.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_28.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_30.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_300.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_400.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_401.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_402.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_403.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_404.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_405.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_406.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_407.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_408.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_409.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_410.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_411.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_412.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_413.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_414.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_415.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_416.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_417.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_418.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_419.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_420.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_421.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_422.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_423.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_424.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_425.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_450.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_451.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_452.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_453.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_454.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/dangling_link.err
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_455.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_456.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_457.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_458.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_459.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_465.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_466.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_467.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_468.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_469.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_471.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_472.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_473.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_474.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_475.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_480.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_481.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_482.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_483.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_484.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_485.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_486.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_487.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_50.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_51.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_52.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_53.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_54.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_55.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_56.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_57.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_58.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_58_ref.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_59.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_500.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_501.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_502.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_503.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_504.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_505.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_506.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_507.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_508.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_509.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_510.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_511.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_512.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_513.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_514.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_515.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_516.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_517.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_518.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_530.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_540.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_60.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_61.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_62.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_63.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_600.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_601.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_601_ERR.err
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_603.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_604.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_605.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_606.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_607.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_608.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_609.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_610.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_612.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_613.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_614.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_615.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_616.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_617.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_618.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_619.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_621.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_622.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_623.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_624.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_625.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_626.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_627.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_628.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_629.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_630.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_631.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_640.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_641.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_642.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_643.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_644.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_645.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_646.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_70.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_700.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_701.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_702.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_703.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_704.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_705.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_706.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_707.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_708.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_709.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_710.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_80.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_800.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_801.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_830.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_90.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_900.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_901.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_902.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_8625.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_8639.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_reg.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_ud.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_udfail.err
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_udfail.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_v1.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_v2.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_v3.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_vlstr.txt
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_eps.txt
+ h5diff_10.txt
+ h5diff_100.txt
+ h5diff_11.txt
+ h5diff_12.txt
+ h5diff_13.txt
+ h5diff_14.txt
+ h5diff_15.txt
+ h5diff_16_1.txt
+ h5diff_16_2.txt
+ h5diff_16_3.txt
+ h5diff_17.txt
+ h5diff_171.txt
+ h5diff_172.txt
+ h5diff_18_1.txt
+ h5diff_18.txt
+ h5diff_20.txt
+ h5diff_200.txt
+ h5diff_201.txt
+ h5diff_202.txt
+ h5diff_203.txt
+ h5diff_204.txt
+ h5diff_205.txt
+ h5diff_206.txt
+ h5diff_207.txt
+ h5diff_208.txt
+ h5diff_220.txt
+ h5diff_221.txt
+ h5diff_222.txt
+ h5diff_223.txt
+ h5diff_224.txt
+ h5diff_21.txt
+ h5diff_22.txt
+ h5diff_23.txt
+ h5diff_24.txt
+ h5diff_25.txt
+ h5diff_26.txt
+ h5diff_27.txt
+ h5diff_28.txt
+ h5diff_30.txt
+ h5diff_300.txt
+ h5diff_400.txt
+ h5diff_401.txt
+ h5diff_402.txt
+ h5diff_403.txt
+ h5diff_404.txt
+ h5diff_405.txt
+ h5diff_406.txt
+ h5diff_407.txt
+ h5diff_408.txt
+ h5diff_409.txt
+ h5diff_410.txt
+ h5diff_411.txt
+ h5diff_412.txt
+ h5diff_413.txt
+ h5diff_414.txt
+ h5diff_415.txt
+ h5diff_416.txt
+ h5diff_417.txt
+ h5diff_418.txt
+ h5diff_419.txt
+ h5diff_420.txt
+ h5diff_421.txt
+ h5diff_422.txt
+ h5diff_423.txt
+ h5diff_424.txt
+ h5diff_425.txt
+ h5diff_450.txt
+ h5diff_451.txt
+ h5diff_452.txt
+ h5diff_453.txt
+ h5diff_454.txt
+ dangling_link.err
+ h5diff_455.txt
+ h5diff_456.txt
+ h5diff_457.txt
+ h5diff_458.txt
+ h5diff_459.txt
+ h5diff_465.txt
+ h5diff_466.txt
+ h5diff_467.txt
+ h5diff_468.txt
+ h5diff_469.txt
+ h5diff_471.txt
+ h5diff_472.txt
+ h5diff_473.txt
+ h5diff_474.txt
+ h5diff_475.txt
+ h5diff_480.txt
+ h5diff_481.txt
+ h5diff_482.txt
+ h5diff_483.txt
+ h5diff_484.txt
+ h5diff_485.txt
+ h5diff_486.txt
+ h5diff_487.txt
+ h5diff_50.txt
+ h5diff_51.txt
+ h5diff_52.txt
+ h5diff_53.txt
+ h5diff_54.txt
+ h5diff_55.txt
+ h5diff_56.txt
+ h5diff_57.txt
+ h5diff_58.txt
+ h5diff_58_ref.txt
+ h5diff_59.txt
+ h5diff_500.txt
+ h5diff_501.txt
+ h5diff_502.txt
+ h5diff_503.txt
+ h5diff_504.txt
+ h5diff_505.txt
+ h5diff_506.txt
+ h5diff_507.txt
+ h5diff_508.txt
+ h5diff_509.txt
+ h5diff_510.txt
+ h5diff_511.txt
+ h5diff_512.txt
+ h5diff_513.txt
+ h5diff_514.txt
+ h5diff_515.txt
+ h5diff_516.txt
+ h5diff_517.txt
+ h5diff_518.txt
+ h5diff_530.txt
+ h5diff_540.txt
+ h5diff_60.txt
+ h5diff_61.txt
+ h5diff_62.txt
+ h5diff_63.txt
+ h5diff_600.txt
+ h5diff_601.txt
+ h5diff_601_ERR.err
+ h5diff_603.txt
+ h5diff_604.txt
+ h5diff_605.txt
+ h5diff_606.txt
+ h5diff_607.txt
+ h5diff_608.txt
+ h5diff_609.txt
+ h5diff_610.txt
+ h5diff_612.txt
+ h5diff_613.txt
+ h5diff_614.txt
+ h5diff_615.txt
+ h5diff_616.txt
+ h5diff_617.txt
+ h5diff_618.txt
+ h5diff_619.txt
+ h5diff_621.txt
+ h5diff_622.txt
+ h5diff_623.txt
+ h5diff_624.txt
+ h5diff_625.txt
+ h5diff_626.txt
+ h5diff_627.txt
+ h5diff_628.txt
+ h5diff_629.txt
+ h5diff_630.txt
+ h5diff_631.txt
+ h5diff_640.txt
+ h5diff_641.txt
+ h5diff_642.txt
+ h5diff_643.txt
+ h5diff_644.txt
+ h5diff_645.txt
+ h5diff_646.txt
+ h5diff_70.txt
+ h5diff_700.txt
+ h5diff_701.txt
+ h5diff_702.txt
+ h5diff_703.txt
+ h5diff_704.txt
+ h5diff_705.txt
+ h5diff_706.txt
+ h5diff_707.txt
+ h5diff_708.txt
+ h5diff_709.txt
+ h5diff_710.txt
+ h5diff_80.txt
+ h5diff_800.txt
+ h5diff_801.txt
+ h5diff_830.txt
+ h5diff_90.txt
+ h5diff_900.txt
+ h5diff_901.txt
+ h5diff_902.txt
+ h5diff_8625.txt
+ h5diff_8639.txt
+ h5diff_reg.txt
+ h5diff_ud.txt
+ h5diff_udfail.err
+ h5diff_udfail.txt
+ h5diff_v1.txt
+ h5diff_v2.txt
+ h5diff_v3.txt
+ h5diff_vlstr.txt
+ h5diff_eps.txt
)
set (LIST_WIN_TEST_FILES
@@ -334,17 +338,34 @@
#
# copy test files from source to build dir
#
- foreach (h5_tstfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
- get_filename_component(fname "${h5_tstfiles}" NAME)
- HDFTEST_COPY_FILE("${h5_tstfiles}" "${PROJECT_BINARY_DIR}/testfiles/${fname}" "h5diff_files")
+ foreach (h5_tstfiles ${LIST_DIFF_TEST_FILES})
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_tstfiles}" "${PROJECT_BINARY_DIR}/testfiles/${h5_tstfiles}" "h5diff_files")
+ if (H5_HAVE_PARALLEL)
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_tstfiles}" "${PROJECT_BINARY_DIR}/PAR/testfiles/${h5_tstfiles}" "h5diff_files")
+ endif ()
+ endforeach ()
+ foreach (h5_tstfiles ${LIST_VDS_TEST_FILES})
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_TST_DIR}/h5dump/testfiles/vds/${h5_tstfiles}" "${PROJECT_BINARY_DIR}/testfiles/${h5_tstfiles}" "h5diff_files")
+ if (H5_HAVE_PARALLEL)
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_TST_DIR}/h5dump/testfiles/vds/${h5_tstfiles}" "${PROJECT_BINARY_DIR}/PAR/testfiles/${h5_tstfiles}" "h5diff_files")
+ endif ()
+ endforeach ()
+ foreach (h5_tstfiles ${LIST_HDF5_TEST_FILES})
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_TST_DIR}/h5dump/testfiles/${h5_tstfiles}" "${PROJECT_BINARY_DIR}/testfiles/${h5_tstfiles}" "h5diff_files")
+ if (H5_HAVE_PARALLEL)
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_TST_DIR}/h5dump/testfiles/${h5_tstfiles}" "${PROJECT_BINARY_DIR}/PAR/testfiles/${h5_tstfiles}" "h5diff_files")
+ endif ()
+ endforeach ()
+ foreach (h5_tstfiles ${LIST_OTHER_TEST_FILES})
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/expected/${h5_tstfiles}" "${PROJECT_BINARY_DIR}/testfiles/${h5_tstfiles}" "h5diff_files")
if (H5_HAVE_PARALLEL)
- HDFTEST_COPY_FILE("${h5_tstfiles}" "${PROJECT_BINARY_DIR}/PAR/testfiles/${fname}" "h5diff_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/expected/${h5_tstfiles}" "${PROJECT_BINARY_DIR}/PAR/testfiles/${h5_tstfiles}" "h5diff_files")
endif ()
endforeach ()
# copy second version of tvlstr.h5
- HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tvlstr.h5" "${PROJECT_BINARY_DIR}/testfiles/tvlstr2.h5" "h5diff_files")
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_TST_DIR}/h5dump/testfiles/tvlstr.h5" "${PROJECT_BINARY_DIR}/testfiles/tvlstr2.h5" "h5diff_files")
if (H5_HAVE_PARALLEL)
- HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tvlstr.h5" "${PROJECT_BINARY_DIR}/PAR/testfiles/tvlstr2.h5" "h5diff_files")
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_TST_DIR}/h5dump/testfiles/tvlstr.h5" "${PROJECT_BINARY_DIR}/PAR/testfiles/tvlstr2.h5" "h5diff_files")
endif ()
@@ -361,18 +382,16 @@
endif ()
if (COPY_WINDOWS_FILES)
foreach (h5_tstfiles ${LIST_WIN_TEST_FILES})
- get_filename_component(fname "${h5_tstfiles}" NAME)
- HDFTEST_COPY_FILE("${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/${h5_tstfiles}w.txt" "${PROJECT_BINARY_DIR}/testfiles/${fname}.txt" "h5diff_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/expected/${h5_tstfiles}w.txt" "${PROJECT_BINARY_DIR}/testfiles/${h5_tstfiles}.txt" "h5diff_files")
if (H5_HAVE_PARALLEL)
- HDFTEST_COPY_FILE("${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/${h5_tstfiles}w.txt" "${PROJECT_BINARY_DIR}/PAR/testfiles/${fname}.txt" "h5diff_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/expected/${h5_tstfiles}w.txt" "${PROJECT_BINARY_DIR}/PAR/testfiles/${h5_tstfiles}.txt" "h5diff_files")
endif ()
endforeach ()
else ()
foreach (h5_tstfiles ${LIST_WIN_TEST_FILES})
- get_filename_component(fname "${h5_tstfiles}" NAME)
- HDFTEST_COPY_FILE("${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/${h5_tstfiles}.txt" "${PROJECT_BINARY_DIR}/testfiles/${fname}.txt" "h5diff_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/expected/${h5_tstfiles}.txt" "${PROJECT_BINARY_DIR}/testfiles/${h5_tstfiles}.txt" "h5diff_files")
if (H5_HAVE_PARALLEL)
- HDFTEST_COPY_FILE("${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/${h5_tstfiles}.txt" "${PROJECT_BINARY_DIR}/PAR/testfiles/${fname}.txt" "h5diff_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/expected/${h5_tstfiles}.txt" "${PROJECT_BINARY_DIR}/PAR/testfiles/${h5_tstfiles}.txt" "h5diff_files")
endif ()
endforeach ()
endif ()
diff --git a/tools/test/h5diff/testfiles/dangling_link.err b/tools/test/h5diff/expected/dangling_link.err
similarity index 100%
rename from tools/test/h5diff/testfiles/dangling_link.err
rename to tools/test/h5diff/expected/dangling_link.err
diff --git a/tools/test/h5diff/testfiles/h5diff_10.txt b/tools/test/h5diff/expected/h5diff_10.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_10.txt
rename to tools/test/h5diff/expected/h5diff_10.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_100.txt b/tools/test/h5diff/expected/h5diff_100.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_100.txt
rename to tools/test/h5diff/expected/h5diff_100.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_101.txt b/tools/test/h5diff/expected/h5diff_101.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_101.txt
rename to tools/test/h5diff/expected/h5diff_101.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_101w.txt b/tools/test/h5diff/expected/h5diff_101w.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_101w.txt
rename to tools/test/h5diff/expected/h5diff_101w.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_102.txt b/tools/test/h5diff/expected/h5diff_102.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_102.txt
rename to tools/test/h5diff/expected/h5diff_102.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_102w.txt b/tools/test/h5diff/expected/h5diff_102w.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_102w.txt
rename to tools/test/h5diff/expected/h5diff_102w.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_103.txt b/tools/test/h5diff/expected/h5diff_103.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_103.txt
rename to tools/test/h5diff/expected/h5diff_103.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_103w.txt b/tools/test/h5diff/expected/h5diff_103w.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_103w.txt
rename to tools/test/h5diff/expected/h5diff_103w.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_104.txt b/tools/test/h5diff/expected/h5diff_104.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_104.txt
rename to tools/test/h5diff/expected/h5diff_104.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_104w.txt b/tools/test/h5diff/expected/h5diff_104w.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_104w.txt
rename to tools/test/h5diff/expected/h5diff_104w.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_11.txt b/tools/test/h5diff/expected/h5diff_11.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_11.txt
rename to tools/test/h5diff/expected/h5diff_11.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_12.txt b/tools/test/h5diff/expected/h5diff_12.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_12.txt
rename to tools/test/h5diff/expected/h5diff_12.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_13.txt b/tools/test/h5diff/expected/h5diff_13.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_13.txt
rename to tools/test/h5diff/expected/h5diff_13.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_14.txt b/tools/test/h5diff/expected/h5diff_14.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_14.txt
rename to tools/test/h5diff/expected/h5diff_14.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_15.txt b/tools/test/h5diff/expected/h5diff_15.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_15.txt
rename to tools/test/h5diff/expected/h5diff_15.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_16_1.txt b/tools/test/h5diff/expected/h5diff_16_1.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_16_1.txt
rename to tools/test/h5diff/expected/h5diff_16_1.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_16_2.txt b/tools/test/h5diff/expected/h5diff_16_2.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_16_2.txt
rename to tools/test/h5diff/expected/h5diff_16_2.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_16_3.txt b/tools/test/h5diff/expected/h5diff_16_3.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_16_3.txt
rename to tools/test/h5diff/expected/h5diff_16_3.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_17.txt b/tools/test/h5diff/expected/h5diff_17.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_17.txt
rename to tools/test/h5diff/expected/h5diff_17.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_171.txt b/tools/test/h5diff/expected/h5diff_171.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_171.txt
rename to tools/test/h5diff/expected/h5diff_171.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_172.txt b/tools/test/h5diff/expected/h5diff_172.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_172.txt
rename to tools/test/h5diff/expected/h5diff_172.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_18.txt b/tools/test/h5diff/expected/h5diff_18.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_18.txt
rename to tools/test/h5diff/expected/h5diff_18.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_18_1.txt b/tools/test/h5diff/expected/h5diff_18_1.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_18_1.txt
rename to tools/test/h5diff/expected/h5diff_18_1.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_19.txt b/tools/test/h5diff/expected/h5diff_19.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_19.txt
rename to tools/test/h5diff/expected/h5diff_19.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_20.txt b/tools/test/h5diff/expected/h5diff_20.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_20.txt
rename to tools/test/h5diff/expected/h5diff_20.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_200.txt b/tools/test/h5diff/expected/h5diff_200.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_200.txt
rename to tools/test/h5diff/expected/h5diff_200.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_201.txt b/tools/test/h5diff/expected/h5diff_201.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_201.txt
rename to tools/test/h5diff/expected/h5diff_201.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_202.txt b/tools/test/h5diff/expected/h5diff_202.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_202.txt
rename to tools/test/h5diff/expected/h5diff_202.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_203.txt b/tools/test/h5diff/expected/h5diff_203.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_203.txt
rename to tools/test/h5diff/expected/h5diff_203.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_204.txt b/tools/test/h5diff/expected/h5diff_204.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_204.txt
rename to tools/test/h5diff/expected/h5diff_204.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_205.txt b/tools/test/h5diff/expected/h5diff_205.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_205.txt
rename to tools/test/h5diff/expected/h5diff_205.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_206.txt b/tools/test/h5diff/expected/h5diff_206.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_206.txt
rename to tools/test/h5diff/expected/h5diff_206.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_207.txt b/tools/test/h5diff/expected/h5diff_207.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_207.txt
rename to tools/test/h5diff/expected/h5diff_207.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_208.txt b/tools/test/h5diff/expected/h5diff_208.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_208.txt
rename to tools/test/h5diff/expected/h5diff_208.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_21.txt b/tools/test/h5diff/expected/h5diff_21.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_21.txt
rename to tools/test/h5diff/expected/h5diff_21.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_22.txt b/tools/test/h5diff/expected/h5diff_22.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_22.txt
rename to tools/test/h5diff/expected/h5diff_22.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_220.txt b/tools/test/h5diff/expected/h5diff_220.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_220.txt
rename to tools/test/h5diff/expected/h5diff_220.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_221.txt b/tools/test/h5diff/expected/h5diff_221.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_221.txt
rename to tools/test/h5diff/expected/h5diff_221.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_222.txt b/tools/test/h5diff/expected/h5diff_222.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_222.txt
rename to tools/test/h5diff/expected/h5diff_222.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_223.txt b/tools/test/h5diff/expected/h5diff_223.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_223.txt
rename to tools/test/h5diff/expected/h5diff_223.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_224.txt b/tools/test/h5diff/expected/h5diff_224.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_224.txt
rename to tools/test/h5diff/expected/h5diff_224.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_23.txt b/tools/test/h5diff/expected/h5diff_23.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_23.txt
rename to tools/test/h5diff/expected/h5diff_23.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_24.txt b/tools/test/h5diff/expected/h5diff_24.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_24.txt
rename to tools/test/h5diff/expected/h5diff_24.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_25.txt b/tools/test/h5diff/expected/h5diff_25.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_25.txt
rename to tools/test/h5diff/expected/h5diff_25.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_26.txt b/tools/test/h5diff/expected/h5diff_26.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_26.txt
rename to tools/test/h5diff/expected/h5diff_26.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_27.txt b/tools/test/h5diff/expected/h5diff_27.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_27.txt
rename to tools/test/h5diff/expected/h5diff_27.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_28.txt b/tools/test/h5diff/expected/h5diff_28.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_28.txt
rename to tools/test/h5diff/expected/h5diff_28.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_30.txt b/tools/test/h5diff/expected/h5diff_30.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_30.txt
rename to tools/test/h5diff/expected/h5diff_30.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_300.txt b/tools/test/h5diff/expected/h5diff_300.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_300.txt
rename to tools/test/h5diff/expected/h5diff_300.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_400.txt b/tools/test/h5diff/expected/h5diff_400.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_400.txt
rename to tools/test/h5diff/expected/h5diff_400.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_401.txt b/tools/test/h5diff/expected/h5diff_401.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_401.txt
rename to tools/test/h5diff/expected/h5diff_401.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_402.txt b/tools/test/h5diff/expected/h5diff_402.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_402.txt
rename to tools/test/h5diff/expected/h5diff_402.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_403.txt b/tools/test/h5diff/expected/h5diff_403.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_403.txt
rename to tools/test/h5diff/expected/h5diff_403.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_404.txt b/tools/test/h5diff/expected/h5diff_404.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_404.txt
rename to tools/test/h5diff/expected/h5diff_404.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_405.txt b/tools/test/h5diff/expected/h5diff_405.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_405.txt
rename to tools/test/h5diff/expected/h5diff_405.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_406.txt b/tools/test/h5diff/expected/h5diff_406.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_406.txt
rename to tools/test/h5diff/expected/h5diff_406.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_407.txt b/tools/test/h5diff/expected/h5diff_407.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_407.txt
rename to tools/test/h5diff/expected/h5diff_407.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_408.txt b/tools/test/h5diff/expected/h5diff_408.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_408.txt
rename to tools/test/h5diff/expected/h5diff_408.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_409.txt b/tools/test/h5diff/expected/h5diff_409.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_409.txt
rename to tools/test/h5diff/expected/h5diff_409.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_410.txt b/tools/test/h5diff/expected/h5diff_410.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_410.txt
rename to tools/test/h5diff/expected/h5diff_410.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_411.txt b/tools/test/h5diff/expected/h5diff_411.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_411.txt
rename to tools/test/h5diff/expected/h5diff_411.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_412.txt b/tools/test/h5diff/expected/h5diff_412.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_412.txt
rename to tools/test/h5diff/expected/h5diff_412.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_413.txt b/tools/test/h5diff/expected/h5diff_413.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_413.txt
rename to tools/test/h5diff/expected/h5diff_413.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_414.txt b/tools/test/h5diff/expected/h5diff_414.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_414.txt
rename to tools/test/h5diff/expected/h5diff_414.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_415.txt b/tools/test/h5diff/expected/h5diff_415.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_415.txt
rename to tools/test/h5diff/expected/h5diff_415.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_416.txt b/tools/test/h5diff/expected/h5diff_416.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_416.txt
rename to tools/test/h5diff/expected/h5diff_416.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_417.txt b/tools/test/h5diff/expected/h5diff_417.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_417.txt
rename to tools/test/h5diff/expected/h5diff_417.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_418.txt b/tools/test/h5diff/expected/h5diff_418.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_418.txt
rename to tools/test/h5diff/expected/h5diff_418.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_419.txt b/tools/test/h5diff/expected/h5diff_419.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_419.txt
rename to tools/test/h5diff/expected/h5diff_419.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_420.txt b/tools/test/h5diff/expected/h5diff_420.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_420.txt
rename to tools/test/h5diff/expected/h5diff_420.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_421.txt b/tools/test/h5diff/expected/h5diff_421.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_421.txt
rename to tools/test/h5diff/expected/h5diff_421.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_422.txt b/tools/test/h5diff/expected/h5diff_422.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_422.txt
rename to tools/test/h5diff/expected/h5diff_422.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_423.txt b/tools/test/h5diff/expected/h5diff_423.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_423.txt
rename to tools/test/h5diff/expected/h5diff_423.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_424.txt b/tools/test/h5diff/expected/h5diff_424.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_424.txt
rename to tools/test/h5diff/expected/h5diff_424.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_425.txt b/tools/test/h5diff/expected/h5diff_425.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_425.txt
rename to tools/test/h5diff/expected/h5diff_425.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_450.txt b/tools/test/h5diff/expected/h5diff_450.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_450.txt
rename to tools/test/h5diff/expected/h5diff_450.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_451.txt b/tools/test/h5diff/expected/h5diff_451.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_451.txt
rename to tools/test/h5diff/expected/h5diff_451.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_452.txt b/tools/test/h5diff/expected/h5diff_452.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_452.txt
rename to tools/test/h5diff/expected/h5diff_452.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_453.txt b/tools/test/h5diff/expected/h5diff_453.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_453.txt
rename to tools/test/h5diff/expected/h5diff_453.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_454.txt b/tools/test/h5diff/expected/h5diff_454.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_454.txt
rename to tools/test/h5diff/expected/h5diff_454.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_455.txt b/tools/test/h5diff/expected/h5diff_455.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_455.txt
rename to tools/test/h5diff/expected/h5diff_455.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_456.txt b/tools/test/h5diff/expected/h5diff_456.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_456.txt
rename to tools/test/h5diff/expected/h5diff_456.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_457.txt b/tools/test/h5diff/expected/h5diff_457.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_457.txt
rename to tools/test/h5diff/expected/h5diff_457.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_458.txt b/tools/test/h5diff/expected/h5diff_458.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_458.txt
rename to tools/test/h5diff/expected/h5diff_458.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_459.txt b/tools/test/h5diff/expected/h5diff_459.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_459.txt
rename to tools/test/h5diff/expected/h5diff_459.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_465.txt b/tools/test/h5diff/expected/h5diff_465.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_465.txt
rename to tools/test/h5diff/expected/h5diff_465.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_466.txt b/tools/test/h5diff/expected/h5diff_466.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_466.txt
rename to tools/test/h5diff/expected/h5diff_466.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_467.txt b/tools/test/h5diff/expected/h5diff_467.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_467.txt
rename to tools/test/h5diff/expected/h5diff_467.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_468.txt b/tools/test/h5diff/expected/h5diff_468.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_468.txt
rename to tools/test/h5diff/expected/h5diff_468.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_469.txt b/tools/test/h5diff/expected/h5diff_469.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_469.txt
rename to tools/test/h5diff/expected/h5diff_469.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_471.txt b/tools/test/h5diff/expected/h5diff_471.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_471.txt
rename to tools/test/h5diff/expected/h5diff_471.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_472.txt b/tools/test/h5diff/expected/h5diff_472.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_472.txt
rename to tools/test/h5diff/expected/h5diff_472.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_473.txt b/tools/test/h5diff/expected/h5diff_473.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_473.txt
rename to tools/test/h5diff/expected/h5diff_473.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_474.txt b/tools/test/h5diff/expected/h5diff_474.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_474.txt
rename to tools/test/h5diff/expected/h5diff_474.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_475.txt b/tools/test/h5diff/expected/h5diff_475.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_475.txt
rename to tools/test/h5diff/expected/h5diff_475.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_480.txt b/tools/test/h5diff/expected/h5diff_480.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_480.txt
rename to tools/test/h5diff/expected/h5diff_480.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_481.txt b/tools/test/h5diff/expected/h5diff_481.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_481.txt
rename to tools/test/h5diff/expected/h5diff_481.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_482.txt b/tools/test/h5diff/expected/h5diff_482.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_482.txt
rename to tools/test/h5diff/expected/h5diff_482.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_483.txt b/tools/test/h5diff/expected/h5diff_483.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_483.txt
rename to tools/test/h5diff/expected/h5diff_483.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_484.txt b/tools/test/h5diff/expected/h5diff_484.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_484.txt
rename to tools/test/h5diff/expected/h5diff_484.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_485.txt b/tools/test/h5diff/expected/h5diff_485.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_485.txt
rename to tools/test/h5diff/expected/h5diff_485.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_486.txt b/tools/test/h5diff/expected/h5diff_486.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_486.txt
rename to tools/test/h5diff/expected/h5diff_486.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_487.txt b/tools/test/h5diff/expected/h5diff_487.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_487.txt
rename to tools/test/h5diff/expected/h5diff_487.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_50.txt b/tools/test/h5diff/expected/h5diff_50.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_50.txt
rename to tools/test/h5diff/expected/h5diff_50.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_500.txt b/tools/test/h5diff/expected/h5diff_500.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_500.txt
rename to tools/test/h5diff/expected/h5diff_500.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_501.txt b/tools/test/h5diff/expected/h5diff_501.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_501.txt
rename to tools/test/h5diff/expected/h5diff_501.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_502.txt b/tools/test/h5diff/expected/h5diff_502.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_502.txt
rename to tools/test/h5diff/expected/h5diff_502.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_503.txt b/tools/test/h5diff/expected/h5diff_503.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_503.txt
rename to tools/test/h5diff/expected/h5diff_503.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_504.txt b/tools/test/h5diff/expected/h5diff_504.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_504.txt
rename to tools/test/h5diff/expected/h5diff_504.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_505.txt b/tools/test/h5diff/expected/h5diff_505.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_505.txt
rename to tools/test/h5diff/expected/h5diff_505.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_506.txt b/tools/test/h5diff/expected/h5diff_506.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_506.txt
rename to tools/test/h5diff/expected/h5diff_506.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_507.txt b/tools/test/h5diff/expected/h5diff_507.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_507.txt
rename to tools/test/h5diff/expected/h5diff_507.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_508.txt b/tools/test/h5diff/expected/h5diff_508.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_508.txt
rename to tools/test/h5diff/expected/h5diff_508.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_509.txt b/tools/test/h5diff/expected/h5diff_509.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_509.txt
rename to tools/test/h5diff/expected/h5diff_509.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_51.txt b/tools/test/h5diff/expected/h5diff_51.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_51.txt
rename to tools/test/h5diff/expected/h5diff_51.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_510.txt b/tools/test/h5diff/expected/h5diff_510.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_510.txt
rename to tools/test/h5diff/expected/h5diff_510.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_511.txt b/tools/test/h5diff/expected/h5diff_511.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_511.txt
rename to tools/test/h5diff/expected/h5diff_511.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_512.txt b/tools/test/h5diff/expected/h5diff_512.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_512.txt
rename to tools/test/h5diff/expected/h5diff_512.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_513.txt b/tools/test/h5diff/expected/h5diff_513.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_513.txt
rename to tools/test/h5diff/expected/h5diff_513.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_514.txt b/tools/test/h5diff/expected/h5diff_514.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_514.txt
rename to tools/test/h5diff/expected/h5diff_514.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_515.txt b/tools/test/h5diff/expected/h5diff_515.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_515.txt
rename to tools/test/h5diff/expected/h5diff_515.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_516.txt b/tools/test/h5diff/expected/h5diff_516.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_516.txt
rename to tools/test/h5diff/expected/h5diff_516.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_517.txt b/tools/test/h5diff/expected/h5diff_517.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_517.txt
rename to tools/test/h5diff/expected/h5diff_517.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_518.txt b/tools/test/h5diff/expected/h5diff_518.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_518.txt
rename to tools/test/h5diff/expected/h5diff_518.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_52.txt b/tools/test/h5diff/expected/h5diff_52.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_52.txt
rename to tools/test/h5diff/expected/h5diff_52.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_53.txt b/tools/test/h5diff/expected/h5diff_53.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_53.txt
rename to tools/test/h5diff/expected/h5diff_53.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_530.txt b/tools/test/h5diff/expected/h5diff_530.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_530.txt
rename to tools/test/h5diff/expected/h5diff_530.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_54.txt b/tools/test/h5diff/expected/h5diff_54.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_54.txt
rename to tools/test/h5diff/expected/h5diff_54.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_540.txt b/tools/test/h5diff/expected/h5diff_540.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_540.txt
rename to tools/test/h5diff/expected/h5diff_540.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_55.txt b/tools/test/h5diff/expected/h5diff_55.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_55.txt
rename to tools/test/h5diff/expected/h5diff_55.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_56.txt b/tools/test/h5diff/expected/h5diff_56.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_56.txt
rename to tools/test/h5diff/expected/h5diff_56.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_57.txt b/tools/test/h5diff/expected/h5diff_57.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_57.txt
rename to tools/test/h5diff/expected/h5diff_57.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_58.txt b/tools/test/h5diff/expected/h5diff_58.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_58.txt
rename to tools/test/h5diff/expected/h5diff_58.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_58_ref.txt b/tools/test/h5diff/expected/h5diff_58_ref.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_58_ref.txt
rename to tools/test/h5diff/expected/h5diff_58_ref.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_59.txt b/tools/test/h5diff/expected/h5diff_59.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_59.txt
rename to tools/test/h5diff/expected/h5diff_59.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_60.txt b/tools/test/h5diff/expected/h5diff_60.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_60.txt
rename to tools/test/h5diff/expected/h5diff_60.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_600.txt b/tools/test/h5diff/expected/h5diff_600.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_600.txt
rename to tools/test/h5diff/expected/h5diff_600.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_601.txt b/tools/test/h5diff/expected/h5diff_601.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_601.txt
rename to tools/test/h5diff/expected/h5diff_601.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_601_ERR.err b/tools/test/h5diff/expected/h5diff_601_ERR.err
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_601_ERR.err
rename to tools/test/h5diff/expected/h5diff_601_ERR.err
diff --git a/tools/test/h5diff/testfiles/h5diff_603.txt b/tools/test/h5diff/expected/h5diff_603.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_603.txt
rename to tools/test/h5diff/expected/h5diff_603.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_604.txt b/tools/test/h5diff/expected/h5diff_604.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_604.txt
rename to tools/test/h5diff/expected/h5diff_604.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_605.txt b/tools/test/h5diff/expected/h5diff_605.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_605.txt
rename to tools/test/h5diff/expected/h5diff_605.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_606.txt b/tools/test/h5diff/expected/h5diff_606.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_606.txt
rename to tools/test/h5diff/expected/h5diff_606.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_607.txt b/tools/test/h5diff/expected/h5diff_607.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_607.txt
rename to tools/test/h5diff/expected/h5diff_607.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_608.txt b/tools/test/h5diff/expected/h5diff_608.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_608.txt
rename to tools/test/h5diff/expected/h5diff_608.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_609.txt b/tools/test/h5diff/expected/h5diff_609.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_609.txt
rename to tools/test/h5diff/expected/h5diff_609.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_61.txt b/tools/test/h5diff/expected/h5diff_61.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_61.txt
rename to tools/test/h5diff/expected/h5diff_61.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_610.txt b/tools/test/h5diff/expected/h5diff_610.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_610.txt
rename to tools/test/h5diff/expected/h5diff_610.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_612.txt b/tools/test/h5diff/expected/h5diff_612.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_612.txt
rename to tools/test/h5diff/expected/h5diff_612.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_613.txt b/tools/test/h5diff/expected/h5diff_613.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_613.txt
rename to tools/test/h5diff/expected/h5diff_613.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_614.txt b/tools/test/h5diff/expected/h5diff_614.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_614.txt
rename to tools/test/h5diff/expected/h5diff_614.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_615.txt b/tools/test/h5diff/expected/h5diff_615.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_615.txt
rename to tools/test/h5diff/expected/h5diff_615.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_616.txt b/tools/test/h5diff/expected/h5diff_616.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_616.txt
rename to tools/test/h5diff/expected/h5diff_616.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_617.txt b/tools/test/h5diff/expected/h5diff_617.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_617.txt
rename to tools/test/h5diff/expected/h5diff_617.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_618.txt b/tools/test/h5diff/expected/h5diff_618.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_618.txt
rename to tools/test/h5diff/expected/h5diff_618.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_619.txt b/tools/test/h5diff/expected/h5diff_619.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_619.txt
rename to tools/test/h5diff/expected/h5diff_619.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_62.txt b/tools/test/h5diff/expected/h5diff_62.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_62.txt
rename to tools/test/h5diff/expected/h5diff_62.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_621.txt b/tools/test/h5diff/expected/h5diff_621.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_621.txt
rename to tools/test/h5diff/expected/h5diff_621.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_622.txt b/tools/test/h5diff/expected/h5diff_622.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_622.txt
rename to tools/test/h5diff/expected/h5diff_622.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_623.txt b/tools/test/h5diff/expected/h5diff_623.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_623.txt
rename to tools/test/h5diff/expected/h5diff_623.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_624.txt b/tools/test/h5diff/expected/h5diff_624.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_624.txt
rename to tools/test/h5diff/expected/h5diff_624.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_625.txt b/tools/test/h5diff/expected/h5diff_625.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_625.txt
rename to tools/test/h5diff/expected/h5diff_625.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_626.txt b/tools/test/h5diff/expected/h5diff_626.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_626.txt
rename to tools/test/h5diff/expected/h5diff_626.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_627.txt b/tools/test/h5diff/expected/h5diff_627.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_627.txt
rename to tools/test/h5diff/expected/h5diff_627.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_628.txt b/tools/test/h5diff/expected/h5diff_628.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_628.txt
rename to tools/test/h5diff/expected/h5diff_628.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_629.txt b/tools/test/h5diff/expected/h5diff_629.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_629.txt
rename to tools/test/h5diff/expected/h5diff_629.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_63.txt b/tools/test/h5diff/expected/h5diff_63.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_63.txt
rename to tools/test/h5diff/expected/h5diff_63.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_630.txt b/tools/test/h5diff/expected/h5diff_630.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_630.txt
rename to tools/test/h5diff/expected/h5diff_630.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_631.txt b/tools/test/h5diff/expected/h5diff_631.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_631.txt
rename to tools/test/h5diff/expected/h5diff_631.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_640.txt b/tools/test/h5diff/expected/h5diff_640.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_640.txt
rename to tools/test/h5diff/expected/h5diff_640.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_641.txt b/tools/test/h5diff/expected/h5diff_641.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_641.txt
rename to tools/test/h5diff/expected/h5diff_641.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_642.txt b/tools/test/h5diff/expected/h5diff_642.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_642.txt
rename to tools/test/h5diff/expected/h5diff_642.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_643.txt b/tools/test/h5diff/expected/h5diff_643.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_643.txt
rename to tools/test/h5diff/expected/h5diff_643.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_644.txt b/tools/test/h5diff/expected/h5diff_644.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_644.txt
rename to tools/test/h5diff/expected/h5diff_644.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_645.txt b/tools/test/h5diff/expected/h5diff_645.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_645.txt
rename to tools/test/h5diff/expected/h5diff_645.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_646.txt b/tools/test/h5diff/expected/h5diff_646.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_646.txt
rename to tools/test/h5diff/expected/h5diff_646.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_70.txt b/tools/test/h5diff/expected/h5diff_70.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_70.txt
rename to tools/test/h5diff/expected/h5diff_70.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_700.txt b/tools/test/h5diff/expected/h5diff_700.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_700.txt
rename to tools/test/h5diff/expected/h5diff_700.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_701.txt b/tools/test/h5diff/expected/h5diff_701.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_701.txt
rename to tools/test/h5diff/expected/h5diff_701.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_702.txt b/tools/test/h5diff/expected/h5diff_702.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_702.txt
rename to tools/test/h5diff/expected/h5diff_702.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_703.txt b/tools/test/h5diff/expected/h5diff_703.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_703.txt
rename to tools/test/h5diff/expected/h5diff_703.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_704.txt b/tools/test/h5diff/expected/h5diff_704.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_704.txt
rename to tools/test/h5diff/expected/h5diff_704.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_705.txt b/tools/test/h5diff/expected/h5diff_705.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_705.txt
rename to tools/test/h5diff/expected/h5diff_705.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_706.txt b/tools/test/h5diff/expected/h5diff_706.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_706.txt
rename to tools/test/h5diff/expected/h5diff_706.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_707.txt b/tools/test/h5diff/expected/h5diff_707.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_707.txt
rename to tools/test/h5diff/expected/h5diff_707.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_708.txt b/tools/test/h5diff/expected/h5diff_708.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_708.txt
rename to tools/test/h5diff/expected/h5diff_708.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_709.txt b/tools/test/h5diff/expected/h5diff_709.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_709.txt
rename to tools/test/h5diff/expected/h5diff_709.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_710.txt b/tools/test/h5diff/expected/h5diff_710.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_710.txt
rename to tools/test/h5diff/expected/h5diff_710.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_80.txt b/tools/test/h5diff/expected/h5diff_80.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_80.txt
rename to tools/test/h5diff/expected/h5diff_80.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_800.txt b/tools/test/h5diff/expected/h5diff_800.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_800.txt
rename to tools/test/h5diff/expected/h5diff_800.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_801.txt b/tools/test/h5diff/expected/h5diff_801.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_801.txt
rename to tools/test/h5diff/expected/h5diff_801.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_830.txt b/tools/test/h5diff/expected/h5diff_830.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_830.txt
rename to tools/test/h5diff/expected/h5diff_830.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_8625.txt b/tools/test/h5diff/expected/h5diff_8625.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_8625.txt
rename to tools/test/h5diff/expected/h5diff_8625.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_8639.txt b/tools/test/h5diff/expected/h5diff_8639.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_8639.txt
rename to tools/test/h5diff/expected/h5diff_8639.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_90.txt b/tools/test/h5diff/expected/h5diff_90.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_90.txt
rename to tools/test/h5diff/expected/h5diff_90.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_900.txt b/tools/test/h5diff/expected/h5diff_900.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_900.txt
rename to tools/test/h5diff/expected/h5diff_900.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_901.txt b/tools/test/h5diff/expected/h5diff_901.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_901.txt
rename to tools/test/h5diff/expected/h5diff_901.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_902.txt b/tools/test/h5diff/expected/h5diff_902.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_902.txt
rename to tools/test/h5diff/expected/h5diff_902.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_eps.txt b/tools/test/h5diff/expected/h5diff_eps.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_eps.txt
rename to tools/test/h5diff/expected/h5diff_eps.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_reg.txt b/tools/test/h5diff/expected/h5diff_reg.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_reg.txt
rename to tools/test/h5diff/expected/h5diff_reg.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_ud.txt b/tools/test/h5diff/expected/h5diff_ud.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_ud.txt
rename to tools/test/h5diff/expected/h5diff_ud.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_udfail.err b/tools/test/h5diff/expected/h5diff_udfail.err
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_udfail.err
rename to tools/test/h5diff/expected/h5diff_udfail.err
diff --git a/tools/test/h5diff/testfiles/h5diff_udfail.txt b/tools/test/h5diff/expected/h5diff_udfail.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_udfail.txt
rename to tools/test/h5diff/expected/h5diff_udfail.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_v1.txt b/tools/test/h5diff/expected/h5diff_v1.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_v1.txt
rename to tools/test/h5diff/expected/h5diff_v1.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_v2.txt b/tools/test/h5diff/expected/h5diff_v2.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_v2.txt
rename to tools/test/h5diff/expected/h5diff_v2.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_v3.txt b/tools/test/h5diff/expected/h5diff_v3.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_v3.txt
rename to tools/test/h5diff/expected/h5diff_v3.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_vlstr.txt b/tools/test/h5diff/expected/h5diff_vlstr.txt
similarity index 100%
rename from tools/test/h5diff/testfiles/h5diff_vlstr.txt
rename to tools/test/h5diff/expected/h5diff_vlstr.txt
diff --git a/tools/test/h5diff/h5diff_plugin.sh.in b/tools/test/h5diff/h5diff_plugin.sh.in
index e3f0f01314b..525503d68eb 100644
--- a/tools/test/h5diff/h5diff_plugin.sh.in
+++ b/tools/test/h5diff/h5diff_plugin.sh.in
@@ -45,6 +45,7 @@ SRC_TOOLS="$srcdir/../.."
# testfiles source dirs for tools
SRC_H5DIFF_TESTFILES="$SRC_TOOLS/test/h5diff/testfiles"
+SRC_H5DIFF_OUTFILES="$SRC_TOOLS/test/h5diff/expected"
TESTDIR=./testplug
test -d $TESTDIR || mkdir $TESTDIR
@@ -61,9 +62,9 @@ test -d $TESTDIR || mkdir $TESTDIR
LIST_HDF5_TEST_FILES="
$SRC_H5DIFF_TESTFILES/tudfilter.h5
$SRC_H5DIFF_TESTFILES/tudfilter2.h5
-$SRC_H5DIFF_TESTFILES/h5diff_ud.txt
-$SRC_H5DIFF_TESTFILES/h5diff_udfail.err
-$SRC_H5DIFF_TESTFILES/h5diff_udfail.txt
+$SRC_H5DIFF_OUTFILES/h5diff_ud.txt
+$SRC_H5DIFF_OUTFILES/h5diff_udfail.err
+$SRC_H5DIFF_OUTFILES/h5diff_udfail.txt
"
# Main Body
diff --git a/tools/test/h5diff/h5diffgentest.c b/tools/test/h5diff/h5diffgentest.c
index 37c2cc3797a..e595dd34c0d 100644
--- a/tools/test/h5diff/h5diffgentest.c
+++ b/tools/test/h5diff/h5diffgentest.c
@@ -333,16 +333,16 @@ onion_filepaths_init(const char *basename)
if (NULL == (paths = calloc(1, sizeof(struct onion_filepaths))))
goto error;
- if (NULL == (paths->canon = HDstrdup(basename)))
+ if (NULL == (paths->canon = strdup(basename)))
goto error;
if (NULL == (paths->onion = malloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE)))
goto error;
- HDsnprintf(paths->onion, ONION_TEST_FIXNAME_SIZE, "%s.onion", paths->canon);
+ snprintf(paths->onion, ONION_TEST_FIXNAME_SIZE, "%s.onion", paths->canon);
if (NULL == (paths->recovery = malloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE)))
goto error;
- HDsnprintf(paths->recovery, ONION_TEST_FIXNAME_SIZE, "%s.onion.recovery", paths->canon);
+ snprintf(paths->recovery, ONION_TEST_FIXNAME_SIZE, "%s.onion.recovery", paths->canon);
return paths;
@@ -1139,15 +1139,15 @@ test_basic(const char *fname1, const char *fname2, const char *fname3)
float data15[6];
float data16[6];
- data15[0] = (float)HDsqrt(-1.0);
+ data15[0] = (float)sqrt(-1.0);
data15[1] = 1.0;
- data15[2] = (float)HDsqrt(-1.0);
+ data15[2] = (float)sqrt(-1.0);
data15[3] = 1.0;
data15[4] = 1.0;
data15[5] = 1.0;
- data16[0] = (float)HDsqrt(-1.0);
- data16[1] = (float)HDsqrt(-1.0);
+ data16[0] = (float)sqrt(-1.0);
+ data16[1] = (float)sqrt(-1.0);
data16[2] = 1.0;
data16[3] = 1.0;
data16[4] = 1.0;
@@ -1166,15 +1166,15 @@ test_basic(const char *fname1, const char *fname2, const char *fname3)
double data17[6];
double data18[6];
- data17[0] = HDsqrt(-1.0);
+ data17[0] = sqrt(-1.0);
data17[1] = 1.0;
- data17[2] = HDsqrt(-1.0);
+ data17[2] = sqrt(-1.0);
data17[3] = 1.0;
data17[4] = 1.0;
data17[5] = 1.0;
- data18[0] = HDsqrt(-1.0);
- data18[1] = HDsqrt(-10000.0);
+ data18[0] = sqrt(-1.0);
+ data18[1] = sqrt(-10000.0);
data18[2] = 1.0;
data18[3] = 1.0;
data18[4] = 1.0;
@@ -1193,11 +1193,11 @@ test_basic(const char *fname1, const char *fname2, const char *fname3)
float data19[6];
double data20[6];
- data19[0] = data19[1] = data19[2] = (float)HDlog(0.0);
- data19[3] = data19[4] = data19[5] = (float)-HDlog(0.0);
+ data19[0] = data19[1] = data19[2] = (float)log(0.0);
+ data19[3] = data19[4] = data19[5] = (float)-log(0.0);
- data20[0] = data20[1] = data20[2] = HDlog(0.0);
- data20[3] = data20[4] = data20[5] = -HDlog(0.0);
+ data20[0] = data20[1] = data20[2] = log(0.0);
+ data20[3] = data20[4] = data20[5] = -log(0.0);
write_dset(gid1, 1, dims1, "fp19", H5T_NATIVE_FLOAT, data19);
write_dset(gid1, 1, dims1, "fp19_COPY", H5T_NATIVE_FLOAT, data19);
@@ -1221,13 +1221,13 @@ test_basic(const char *fname1, const char *fname2, const char *fname3)
size_t type_size;
hid_t tid;
- buf1[0].d = HDsqrt(-1.0);
- buf1[0].f = (float)HDsqrt(-1.0);
- buf2[0].d = HDsqrt(-1.0);
- buf2[0].f = (float)HDsqrt(-1.0);
+ buf1[0].d = sqrt(-1.0);
+ buf1[0].f = (float)sqrt(-1.0);
+ buf2[0].d = sqrt(-1.0);
+ buf2[0].f = (float)sqrt(-1.0);
- buf1[1].d = HDsqrt(-1.0);
- buf1[1].f = (float)HDsqrt(-1.0);
+ buf1[1].d = sqrt(-1.0);
+ buf1[1].f = (float)sqrt(-1.0);
buf2[1].d = 0.0;
buf2[1].f = 0.0;
@@ -4262,35 +4262,35 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new
comp9_buf.str_vlen = comp9_buf.str_vlen_repeat = vlen_str_buf;
/* copy fixlen string data to compound buffers */
- HDstrcpy(comp1_buf.str_fixlen, fixlen_str_buf);
- HDstrcpy(comp1_buf.str_fixlen_repeat, fixlen_str_buf);
+ strcpy(comp1_buf.str_fixlen, fixlen_str_buf);
+ strcpy(comp1_buf.str_fixlen_repeat, fixlen_str_buf);
- HDstrcpy(comp2_buf.str_fixlen, fixlen_str_buf);
- HDstrcpy(comp2_buf.str_fixlen_repeat, fixlen_str_buf);
+ strcpy(comp2_buf.str_fixlen, fixlen_str_buf);
+ strcpy(comp2_buf.str_fixlen_repeat, fixlen_str_buf);
- HDstrcpy(comp3_buf.str_fixlen, fixlen_str_buf);
- HDstrcpy(comp3_buf.str_fixlen_repeat, fixlen_str_buf);
+ strcpy(comp3_buf.str_fixlen, fixlen_str_buf);
+ strcpy(comp3_buf.str_fixlen_repeat, fixlen_str_buf);
- HDstrcpy(comp3_buf.str_fixlen, fixlen_str_buf);
- HDstrcpy(comp3_buf.str_fixlen_repeat, fixlen_str_buf);
+ strcpy(comp3_buf.str_fixlen, fixlen_str_buf);
+ strcpy(comp3_buf.str_fixlen_repeat, fixlen_str_buf);
- HDstrcpy(comp4_buf.str_fixlen, fixlen_str_buf);
- HDstrcpy(comp4_buf.str_fixlen_repeat, fixlen_str_buf);
+ strcpy(comp4_buf.str_fixlen, fixlen_str_buf);
+ strcpy(comp4_buf.str_fixlen_repeat, fixlen_str_buf);
- HDstrcpy(comp5_buf.str_fixlen, fixlen_str_buf);
- HDstrcpy(comp5_buf.str_fixlen_repeat, fixlen_str_buf);
+ strcpy(comp5_buf.str_fixlen, fixlen_str_buf);
+ strcpy(comp5_buf.str_fixlen_repeat, fixlen_str_buf);
- HDstrcpy(comp6_buf.str_fixlen, fixlen_str_buf);
- HDstrcpy(comp6_buf.str_fixlen_repeat, fixlen_str_buf);
+ strcpy(comp6_buf.str_fixlen, fixlen_str_buf);
+ strcpy(comp6_buf.str_fixlen_repeat, fixlen_str_buf);
- HDstrcpy(comp7_buf.str_fixlen, fixlen_str_buf);
- HDstrcpy(comp7_buf.str_fixlen_repeat, fixlen_str_buf);
+ strcpy(comp7_buf.str_fixlen, fixlen_str_buf);
+ strcpy(comp7_buf.str_fixlen_repeat, fixlen_str_buf);
- HDstrcpy(comp8_buf.str_fixlen, fixlen_str_buf);
- HDstrcpy(comp8_buf.str_fixlen_repeat, fixlen_str_buf);
+ strcpy(comp8_buf.str_fixlen, fixlen_str_buf);
+ strcpy(comp8_buf.str_fixlen_repeat, fixlen_str_buf);
- HDstrcpy(comp9_buf.str_fixlen, fixlen_str_buf);
- HDstrcpy(comp9_buf.str_fixlen_repeat, fixlen_str_buf);
+ strcpy(comp9_buf.str_fixlen, fixlen_str_buf);
+ strcpy(comp9_buf.str_fixlen_repeat, fixlen_str_buf);
/* copy vlen string array data to compound buffers */
for (i = 0; i < VLEN_STR_ARRY_DIM; i++) {
@@ -4307,32 +4307,32 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new
/* copy fixlen string attay data to compound buffers */
for (i = 0; i < FIXLEN_STR_ARRY_DIM; i++) {
- HDstrcpy(comp1_buf.str_array_fixlen[i], fixlen_str_array_buf[i]);
- HDstrcpy(comp1_buf.str_fixlen_array_again[i], fixlen_str_array_buf[i]);
+ strcpy(comp1_buf.str_array_fixlen[i], fixlen_str_array_buf[i]);
+ strcpy(comp1_buf.str_fixlen_array_again[i], fixlen_str_array_buf[i]);
- HDstrcpy(comp2_buf.str_array_fixlen[i], fixlen_str_array_buf[i]);
- HDstrcpy(comp2_buf.str_fixlen_array_again[i], fixlen_str_array_buf[i]);
+ strcpy(comp2_buf.str_array_fixlen[i], fixlen_str_array_buf[i]);
+ strcpy(comp2_buf.str_fixlen_array_again[i], fixlen_str_array_buf[i]);
- HDstrcpy(comp3_buf.str_array_fixlen[i], fixlen_str_array_buf[i]);
- HDstrcpy(comp3_buf.str_fixlen_array_again[i], fixlen_str_array_buf[i]);
+ strcpy(comp3_buf.str_array_fixlen[i], fixlen_str_array_buf[i]);
+ strcpy(comp3_buf.str_fixlen_array_again[i], fixlen_str_array_buf[i]);
- HDstrcpy(comp4_buf.str_array_fixlen[i], fixlen_str_array_buf[i]);
- HDstrcpy(comp4_buf.str_fixlen_array_again[i], fixlen_str_array_buf[i]);
+ strcpy(comp4_buf.str_array_fixlen[i], fixlen_str_array_buf[i]);
+ strcpy(comp4_buf.str_fixlen_array_again[i], fixlen_str_array_buf[i]);
- HDstrcpy(comp5_buf.str_array_fixlen[i], fixlen_str_array_buf[i]);
- HDstrcpy(comp5_buf.str_fixlen_array_again[i], fixlen_str_array_buf[i]);
+ strcpy(comp5_buf.str_array_fixlen[i], fixlen_str_array_buf[i]);
+ strcpy(comp5_buf.str_fixlen_array_again[i], fixlen_str_array_buf[i]);
- HDstrcpy(comp6_buf.str_array_fixlen[i], fixlen_str_array_buf[i]);
- HDstrcpy(comp6_buf.str_fixlen_array_again[i], fixlen_str_array_buf[i]);
+ strcpy(comp6_buf.str_array_fixlen[i], fixlen_str_array_buf[i]);
+ strcpy(comp6_buf.str_fixlen_array_again[i], fixlen_str_array_buf[i]);
- HDstrcpy(comp7_buf.str_array_fixlen[i], fixlen_str_array_buf[i]);
- HDstrcpy(comp7_buf.str_fixlen_array_again[i], fixlen_str_array_buf[i]);
+ strcpy(comp7_buf.str_array_fixlen[i], fixlen_str_array_buf[i]);
+ strcpy(comp7_buf.str_fixlen_array_again[i], fixlen_str_array_buf[i]);
- HDstrcpy(comp8_buf.str_array_fixlen[i], fixlen_str_array_buf[i]);
- HDstrcpy(comp8_buf.str_fixlen_array_again[i], fixlen_str_array_buf[i]);
+ strcpy(comp8_buf.str_array_fixlen[i], fixlen_str_array_buf[i]);
+ strcpy(comp8_buf.str_fixlen_array_again[i], fixlen_str_array_buf[i]);
- HDstrcpy(comp9_buf.str_array_fixlen[i], fixlen_str_array_buf[i]);
- HDstrcpy(comp9_buf.str_fixlen_array_again[i], fixlen_str_array_buf[i]);
+ strcpy(comp9_buf.str_array_fixlen[i], fixlen_str_array_buf[i]);
+ strcpy(comp9_buf.str_fixlen_array_again[i], fixlen_str_array_buf[i]);
}
/* int data */
diff --git a/tools/test/h5diff/testh5diff.sh.in b/tools/test/h5diff/testh5diff.sh.in
index 7cc82a1a08c..efaac2e4082 100644
--- a/tools/test/h5diff/testh5diff.sh.in
+++ b/tools/test/h5diff/testh5diff.sh.in
@@ -38,16 +38,16 @@ mydomainname=`domainname 2>/dev/null`
# source dirs
SRC_TOOLS="$srcdir/../.."
-SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles"
# testfiles source dirs for tools
-SRC_H5LS_TESTFILES="$SRC_TOOLS_TESTFILES"
-SRC_H5DUMP_TESTFILES="$SRC_TOOLS_TESTFILES"
+SRC_H5LS_TESTFILES="$SRC_TOOLS/test/h5ls/testfiles"
+SRC_H5DUMP_TESTFILES="$SRC_TOOLS/test/h5dump/testfiles"
SRC_H5DIFF_TESTFILES="$SRC_TOOLS/test/h5diff/testfiles"
SRC_H5COPY_TESTFILES="$SRC_TOOLS/test/h5copy/testfiles"
SRC_H5REPACK_TESTFILES="$SRC_TOOLS/test/h5repack/testfiles"
SRC_H5JAM_TESTFILES="$SRC_TOOLS/test/h5jam/testfiles"
SRC_H5STAT_TESTFILES="$SRC_TOOLS/test/h5stat/testfiles"
SRC_H5IMPORT_TESTFILES="$SRC_TOOLS/test/h5import/testfiles"
+SRC_H5DIFF_OUTFILES="$SRC_TOOLS/test/h5diff/expected"
TESTDIR=./testfiles
test -d $TESTDIR || mkdir $TESTDIR
@@ -116,249 +116,249 @@ $SRC_H5DIFF_TESTFILES/h5diff_onion_dset_ext.h5
$SRC_H5DIFF_TESTFILES/h5diff_onion_dset_ext.h5.onion
$SRC_H5DIFF_TESTFILES/h5diff_onion_dset_1d.h5
$SRC_H5DIFF_TESTFILES/h5diff_onion_dset_1d.h5.onion
-$SRC_TOOLS_TESTFILES/tvlstr.h5
"
LIST_HDF5_VDS_TEST_FILES="
-$SRC_TOOLS_TESTFILES/vds/1_a.h5
-$SRC_TOOLS_TESTFILES/vds/1_b.h5
-$SRC_TOOLS_TESTFILES/vds/1_c.h5
-$SRC_TOOLS_TESTFILES/vds/1_d.h5
-$SRC_TOOLS_TESTFILES/vds/1_e.h5
-$SRC_TOOLS_TESTFILES/vds/1_f.h5
-$SRC_TOOLS_TESTFILES/vds/1_vds.h5
-$SRC_TOOLS_TESTFILES/vds/2_a.h5
-$SRC_TOOLS_TESTFILES/vds/2_b.h5
-$SRC_TOOLS_TESTFILES/vds/2_c.h5
-$SRC_TOOLS_TESTFILES/vds/2_d.h5
-$SRC_TOOLS_TESTFILES/vds/2_e.h5
-$SRC_TOOLS_TESTFILES/vds/2_vds.h5
-$SRC_TOOLS_TESTFILES/vds/3_1_vds.h5
-$SRC_TOOLS_TESTFILES/vds/3_2_vds.h5
-$SRC_TOOLS_TESTFILES/vds/4_0.h5
-$SRC_TOOLS_TESTFILES/vds/4_1.h5
-$SRC_TOOLS_TESTFILES/vds/4_2.h5
-$SRC_TOOLS_TESTFILES/vds/4_vds.h5
-$SRC_TOOLS_TESTFILES/vds/5_a.h5
-$SRC_TOOLS_TESTFILES/vds/5_b.h5
-$SRC_TOOLS_TESTFILES/vds/5_c.h5
-$SRC_TOOLS_TESTFILES/vds/5_vds.h5
+$SRC_H5DUMP_TESTFILES/vds/1_a.h5
+$SRC_H5DUMP_TESTFILES/vds/1_b.h5
+$SRC_H5DUMP_TESTFILES/vds/1_c.h5
+$SRC_H5DUMP_TESTFILES/vds/1_d.h5
+$SRC_H5DUMP_TESTFILES/vds/1_e.h5
+$SRC_H5DUMP_TESTFILES/vds/1_f.h5
+$SRC_H5DUMP_TESTFILES/vds/1_vds.h5
+$SRC_H5DUMP_TESTFILES/vds/2_a.h5
+$SRC_H5DUMP_TESTFILES/vds/2_b.h5
+$SRC_H5DUMP_TESTFILES/vds/2_c.h5
+$SRC_H5DUMP_TESTFILES/vds/2_d.h5
+$SRC_H5DUMP_TESTFILES/vds/2_e.h5
+$SRC_H5DUMP_TESTFILES/vds/2_vds.h5
+$SRC_H5DUMP_TESTFILES/vds/3_1_vds.h5
+$SRC_H5DUMP_TESTFILES/vds/3_2_vds.h5
+$SRC_H5DUMP_TESTFILES/vds/4_0.h5
+$SRC_H5DUMP_TESTFILES/vds/4_1.h5
+$SRC_H5DUMP_TESTFILES/vds/4_2.h5
+$SRC_H5DUMP_TESTFILES/vds/4_vds.h5
+$SRC_H5DUMP_TESTFILES/vds/5_a.h5
+$SRC_H5DUMP_TESTFILES/vds/5_b.h5
+$SRC_H5DUMP_TESTFILES/vds/5_c.h5
+$SRC_H5DUMP_TESTFILES/vds/5_vds.h5
"
LIST_HDF5_STD_REF_OBJ_TEST_FILES="
-$SRC_TOOLS_TESTFILES/trefer_attr.h5
-$SRC_TOOLS_TESTFILES/trefer_compat.h5
-$SRC_TOOLS_TESTFILES/trefer_ext1.h5
-$SRC_TOOLS_TESTFILES/trefer_ext2.h5
-$SRC_TOOLS_TESTFILES/trefer_grp.h5
-$SRC_TOOLS_TESTFILES/trefer_obj_del.h5
-$SRC_TOOLS_TESTFILES/trefer_obj.h5
-$SRC_TOOLS_TESTFILES/trefer_param.h5
-$SRC_TOOLS_TESTFILES/trefer_reg_1d.h5
-$SRC_TOOLS_TESTFILES/trefer_reg.h5
+$SRC_H5DUMP_TESTFILES/tvlstr.h5
+$SRC_H5DUMP_TESTFILES/trefer_attr.h5
+$SRC_H5DUMP_TESTFILES/trefer_compat.h5
+$SRC_H5DUMP_TESTFILES/trefer_ext1.h5
+$SRC_H5DUMP_TESTFILES/trefer_ext2.h5
+$SRC_H5DUMP_TESTFILES/trefer_grp.h5
+$SRC_H5DUMP_TESTFILES/trefer_obj_del.h5
+$SRC_H5DUMP_TESTFILES/trefer_obj.h5
+$SRC_H5DUMP_TESTFILES/trefer_param.h5
+$SRC_H5DUMP_TESTFILES/trefer_reg_1d.h5
+$SRC_H5DUMP_TESTFILES/trefer_reg.h5
"
LIST_OTHER_TEST_FILES="
-$SRC_H5DIFF_TESTFILES/h5diff_10.txt
-$SRC_H5DIFF_TESTFILES/h5diff_100.txt
-$SRC_H5DIFF_TESTFILES/h5diff_101.txt
-$SRC_H5DIFF_TESTFILES/h5diff_102.txt
-$SRC_H5DIFF_TESTFILES/h5diff_103.txt
-$SRC_H5DIFF_TESTFILES/h5diff_104.txt
-$SRC_H5DIFF_TESTFILES/h5diff_11.txt
-$SRC_H5DIFF_TESTFILES/h5diff_12.txt
-$SRC_H5DIFF_TESTFILES/h5diff_13.txt
-$SRC_H5DIFF_TESTFILES/h5diff_14.txt
-$SRC_H5DIFF_TESTFILES/h5diff_15.txt
-$SRC_H5DIFF_TESTFILES/h5diff_16_1.txt
-$SRC_H5DIFF_TESTFILES/h5diff_16_2.txt
-$SRC_H5DIFF_TESTFILES/h5diff_16_3.txt
-$SRC_H5DIFF_TESTFILES/h5diff_17.txt
-$SRC_H5DIFF_TESTFILES/h5diff_171.txt
-$SRC_H5DIFF_TESTFILES/h5diff_172.txt
-$SRC_H5DIFF_TESTFILES/h5diff_18_1.txt
-$SRC_H5DIFF_TESTFILES/h5diff_18.txt
-$SRC_H5DIFF_TESTFILES/h5diff_20.txt
-$SRC_H5DIFF_TESTFILES/h5diff_200.txt
-$SRC_H5DIFF_TESTFILES/h5diff_201.txt
-$SRC_H5DIFF_TESTFILES/h5diff_202.txt
-$SRC_H5DIFF_TESTFILES/h5diff_203.txt
-$SRC_H5DIFF_TESTFILES/h5diff_204.txt
-$SRC_H5DIFF_TESTFILES/h5diff_205.txt
-$SRC_H5DIFF_TESTFILES/h5diff_206.txt
-$SRC_H5DIFF_TESTFILES/h5diff_207.txt
-$SRC_H5DIFF_TESTFILES/h5diff_208.txt
-$SRC_H5DIFF_TESTFILES/h5diff_220.txt
-$SRC_H5DIFF_TESTFILES/h5diff_221.txt
-$SRC_H5DIFF_TESTFILES/h5diff_222.txt
-$SRC_H5DIFF_TESTFILES/h5diff_223.txt
-$SRC_H5DIFF_TESTFILES/h5diff_224.txt
-$SRC_H5DIFF_TESTFILES/h5diff_21.txt
-$SRC_H5DIFF_TESTFILES/h5diff_22.txt
-$SRC_H5DIFF_TESTFILES/h5diff_23.txt
-$SRC_H5DIFF_TESTFILES/h5diff_24.txt
-$SRC_H5DIFF_TESTFILES/h5diff_25.txt
-$SRC_H5DIFF_TESTFILES/h5diff_26.txt
-$SRC_H5DIFF_TESTFILES/h5diff_27.txt
-$SRC_H5DIFF_TESTFILES/h5diff_28.txt
-$SRC_H5DIFF_TESTFILES/h5diff_30.txt
-$SRC_H5DIFF_TESTFILES/h5diff_300.txt
-$SRC_H5DIFF_TESTFILES/h5diff_400.txt
-$SRC_H5DIFF_TESTFILES/h5diff_401.txt
-$SRC_H5DIFF_TESTFILES/h5diff_402.txt
-$SRC_H5DIFF_TESTFILES/h5diff_403.txt
-$SRC_H5DIFF_TESTFILES/h5diff_404.txt
-$SRC_H5DIFF_TESTFILES/h5diff_405.txt
-$SRC_H5DIFF_TESTFILES/h5diff_406.txt
-$SRC_H5DIFF_TESTFILES/h5diff_407.txt
-$SRC_H5DIFF_TESTFILES/h5diff_408.txt
-$SRC_H5DIFF_TESTFILES/h5diff_409.txt
-$SRC_H5DIFF_TESTFILES/h5diff_410.txt
-$SRC_H5DIFF_TESTFILES/h5diff_411.txt
-$SRC_H5DIFF_TESTFILES/h5diff_412.txt
-$SRC_H5DIFF_TESTFILES/h5diff_413.txt
-$SRC_H5DIFF_TESTFILES/h5diff_414.txt
-$SRC_H5DIFF_TESTFILES/h5diff_415.txt
-$SRC_H5DIFF_TESTFILES/h5diff_416.txt
-$SRC_H5DIFF_TESTFILES/h5diff_417.txt
-$SRC_H5DIFF_TESTFILES/h5diff_418.txt
-$SRC_H5DIFF_TESTFILES/h5diff_419.txt
-$SRC_H5DIFF_TESTFILES/h5diff_420.txt
-$SRC_H5DIFF_TESTFILES/h5diff_421.txt
-$SRC_H5DIFF_TESTFILES/h5diff_422.txt
-$SRC_H5DIFF_TESTFILES/h5diff_423.txt
-$SRC_H5DIFF_TESTFILES/h5diff_424.txt
-$SRC_H5DIFF_TESTFILES/h5diff_425.txt
-$SRC_H5DIFF_TESTFILES/h5diff_450.txt
-$SRC_H5DIFF_TESTFILES/h5diff_451.txt
-$SRC_H5DIFF_TESTFILES/h5diff_452.txt
-$SRC_H5DIFF_TESTFILES/h5diff_453.txt
-$SRC_H5DIFF_TESTFILES/h5diff_454.txt
-$SRC_H5DIFF_TESTFILES/dangling_link.err
-$SRC_H5DIFF_TESTFILES/h5diff_455.txt
-$SRC_H5DIFF_TESTFILES/h5diff_456.txt
-$SRC_H5DIFF_TESTFILES/h5diff_457.txt
-$SRC_H5DIFF_TESTFILES/h5diff_458.txt
-$SRC_H5DIFF_TESTFILES/h5diff_459.txt
-$SRC_H5DIFF_TESTFILES/h5diff_465.txt
-$SRC_H5DIFF_TESTFILES/h5diff_466.txt
-$SRC_H5DIFF_TESTFILES/h5diff_467.txt
-$SRC_H5DIFF_TESTFILES/h5diff_468.txt
-$SRC_H5DIFF_TESTFILES/h5diff_469.txt
-$SRC_H5DIFF_TESTFILES/h5diff_471.txt
-$SRC_H5DIFF_TESTFILES/h5diff_472.txt
-$SRC_H5DIFF_TESTFILES/h5diff_473.txt
-$SRC_H5DIFF_TESTFILES/h5diff_474.txt
-$SRC_H5DIFF_TESTFILES/h5diff_475.txt
-$SRC_H5DIFF_TESTFILES/h5diff_480.txt
-$SRC_H5DIFF_TESTFILES/h5diff_481.txt
-$SRC_H5DIFF_TESTFILES/h5diff_482.txt
-$SRC_H5DIFF_TESTFILES/h5diff_483.txt
-$SRC_H5DIFF_TESTFILES/h5diff_484.txt
-$SRC_H5DIFF_TESTFILES/h5diff_485.txt
-$SRC_H5DIFF_TESTFILES/h5diff_486.txt
-$SRC_H5DIFF_TESTFILES/h5diff_487.txt
-$SRC_H5DIFF_TESTFILES/h5diff_50.txt
-$SRC_H5DIFF_TESTFILES/h5diff_51.txt
-$SRC_H5DIFF_TESTFILES/h5diff_52.txt
-$SRC_H5DIFF_TESTFILES/h5diff_53.txt
-$SRC_H5DIFF_TESTFILES/h5diff_54.txt
-$SRC_H5DIFF_TESTFILES/h5diff_55.txt
-$SRC_H5DIFF_TESTFILES/h5diff_56.txt
-$SRC_H5DIFF_TESTFILES/h5diff_57.txt
-$SRC_H5DIFF_TESTFILES/h5diff_58.txt
-$SRC_H5DIFF_TESTFILES/h5diff_58_ref.txt
-$SRC_H5DIFF_TESTFILES/h5diff_59.txt
-$SRC_H5DIFF_TESTFILES/h5diff_500.txt
-$SRC_H5DIFF_TESTFILES/h5diff_501.txt
-$SRC_H5DIFF_TESTFILES/h5diff_502.txt
-$SRC_H5DIFF_TESTFILES/h5diff_503.txt
-$SRC_H5DIFF_TESTFILES/h5diff_504.txt
-$SRC_H5DIFF_TESTFILES/h5diff_505.txt
-$SRC_H5DIFF_TESTFILES/h5diff_506.txt
-$SRC_H5DIFF_TESTFILES/h5diff_507.txt
-$SRC_H5DIFF_TESTFILES/h5diff_508.txt
-$SRC_H5DIFF_TESTFILES/h5diff_509.txt
-$SRC_H5DIFF_TESTFILES/h5diff_510.txt
-$SRC_H5DIFF_TESTFILES/h5diff_511.txt
-$SRC_H5DIFF_TESTFILES/h5diff_512.txt
-$SRC_H5DIFF_TESTFILES/h5diff_513.txt
-$SRC_H5DIFF_TESTFILES/h5diff_514.txt
-$SRC_H5DIFF_TESTFILES/h5diff_515.txt
-$SRC_H5DIFF_TESTFILES/h5diff_516.txt
-$SRC_H5DIFF_TESTFILES/h5diff_517.txt
-$SRC_H5DIFF_TESTFILES/h5diff_518.txt
-$SRC_H5DIFF_TESTFILES/h5diff_530.txt
-$SRC_H5DIFF_TESTFILES/h5diff_540.txt
-$SRC_H5DIFF_TESTFILES/h5diff_60.txt
-$SRC_H5DIFF_TESTFILES/h5diff_61.txt
-$SRC_H5DIFF_TESTFILES/h5diff_62.txt
-$SRC_H5DIFF_TESTFILES/h5diff_63.txt
-$SRC_H5DIFF_TESTFILES/h5diff_600.txt
-$SRC_H5DIFF_TESTFILES/h5diff_601.txt
-$SRC_H5DIFF_TESTFILES/h5diff_601_ERR.err
-$SRC_H5DIFF_TESTFILES/h5diff_603.txt
-$SRC_H5DIFF_TESTFILES/h5diff_604.txt
-$SRC_H5DIFF_TESTFILES/h5diff_605.txt
-$SRC_H5DIFF_TESTFILES/h5diff_606.txt
-$SRC_H5DIFF_TESTFILES/h5diff_607.txt
-$SRC_H5DIFF_TESTFILES/h5diff_608.txt
-$SRC_H5DIFF_TESTFILES/h5diff_609.txt
-$SRC_H5DIFF_TESTFILES/h5diff_610.txt
-$SRC_H5DIFF_TESTFILES/h5diff_612.txt
-$SRC_H5DIFF_TESTFILES/h5diff_613.txt
-$SRC_H5DIFF_TESTFILES/h5diff_614.txt
-$SRC_H5DIFF_TESTFILES/h5diff_615.txt
-$SRC_H5DIFF_TESTFILES/h5diff_616.txt
-$SRC_H5DIFF_TESTFILES/h5diff_617.txt
-$SRC_H5DIFF_TESTFILES/h5diff_618.txt
-$SRC_H5DIFF_TESTFILES/h5diff_619.txt
-$SRC_H5DIFF_TESTFILES/h5diff_621.txt
-$SRC_H5DIFF_TESTFILES/h5diff_622.txt
-$SRC_H5DIFF_TESTFILES/h5diff_623.txt
-$SRC_H5DIFF_TESTFILES/h5diff_624.txt
-$SRC_H5DIFF_TESTFILES/h5diff_625.txt
-$SRC_H5DIFF_TESTFILES/h5diff_626.txt
-$SRC_H5DIFF_TESTFILES/h5diff_627.txt
-$SRC_H5DIFF_TESTFILES/h5diff_628.txt
-$SRC_H5DIFF_TESTFILES/h5diff_629.txt
-$SRC_H5DIFF_TESTFILES/h5diff_630.txt
-$SRC_H5DIFF_TESTFILES/h5diff_631.txt
-$SRC_H5DIFF_TESTFILES/h5diff_640.txt
-$SRC_H5DIFF_TESTFILES/h5diff_641.txt
-$SRC_H5DIFF_TESTFILES/h5diff_642.txt
-$SRC_H5DIFF_TESTFILES/h5diff_643.txt
-$SRC_H5DIFF_TESTFILES/h5diff_644.txt
-$SRC_H5DIFF_TESTFILES/h5diff_645.txt
-$SRC_H5DIFF_TESTFILES/h5diff_646.txt
-$SRC_H5DIFF_TESTFILES/h5diff_70.txt
-$SRC_H5DIFF_TESTFILES/h5diff_700.txt
-$SRC_H5DIFF_TESTFILES/h5diff_701.txt
-$SRC_H5DIFF_TESTFILES/h5diff_702.txt
-$SRC_H5DIFF_TESTFILES/h5diff_703.txt
-$SRC_H5DIFF_TESTFILES/h5diff_704.txt
-$SRC_H5DIFF_TESTFILES/h5diff_705.txt
-$SRC_H5DIFF_TESTFILES/h5diff_706.txt
-$SRC_H5DIFF_TESTFILES/h5diff_707.txt
-$SRC_H5DIFF_TESTFILES/h5diff_708.txt
-$SRC_H5DIFF_TESTFILES/h5diff_709.txt
-$SRC_H5DIFF_TESTFILES/h5diff_710.txt
-$SRC_H5DIFF_TESTFILES/h5diff_80.txt
-$SRC_H5DIFF_TESTFILES/h5diff_800.txt
-$SRC_H5DIFF_TESTFILES/h5diff_801.txt
-$SRC_H5DIFF_TESTFILES/h5diff_830.txt
-$SRC_H5DIFF_TESTFILES/h5diff_90.txt
-$SRC_H5DIFF_TESTFILES/h5diff_900.txt
-$SRC_H5DIFF_TESTFILES/h5diff_901.txt
-$SRC_H5DIFF_TESTFILES/h5diff_902.txt
-$SRC_H5DIFF_TESTFILES/h5diff_8625.txt
-$SRC_H5DIFF_TESTFILES/h5diff_8639.txt
-$SRC_H5DIFF_TESTFILES/h5diff_reg.txt
-$SRC_H5DIFF_TESTFILES/h5diff_v1.txt
-$SRC_H5DIFF_TESTFILES/h5diff_v2.txt
-$SRC_H5DIFF_TESTFILES/h5diff_v3.txt
-$SRC_H5DIFF_TESTFILES/h5diff_vlstr.txt
-$SRC_H5DIFF_TESTFILES/h5diff_eps.txt
+$SRC_H5DIFF_OUTFILES/h5diff_10.txt
+$SRC_H5DIFF_OUTFILES/h5diff_100.txt
+$SRC_H5DIFF_OUTFILES/h5diff_101.txt
+$SRC_H5DIFF_OUTFILES/h5diff_102.txt
+$SRC_H5DIFF_OUTFILES/h5diff_103.txt
+$SRC_H5DIFF_OUTFILES/h5diff_104.txt
+$SRC_H5DIFF_OUTFILES/h5diff_11.txt
+$SRC_H5DIFF_OUTFILES/h5diff_12.txt
+$SRC_H5DIFF_OUTFILES/h5diff_13.txt
+$SRC_H5DIFF_OUTFILES/h5diff_14.txt
+$SRC_H5DIFF_OUTFILES/h5diff_15.txt
+$SRC_H5DIFF_OUTFILES/h5diff_16_1.txt
+$SRC_H5DIFF_OUTFILES/h5diff_16_2.txt
+$SRC_H5DIFF_OUTFILES/h5diff_16_3.txt
+$SRC_H5DIFF_OUTFILES/h5diff_17.txt
+$SRC_H5DIFF_OUTFILES/h5diff_171.txt
+$SRC_H5DIFF_OUTFILES/h5diff_172.txt
+$SRC_H5DIFF_OUTFILES/h5diff_18_1.txt
+$SRC_H5DIFF_OUTFILES/h5diff_18.txt
+$SRC_H5DIFF_OUTFILES/h5diff_20.txt
+$SRC_H5DIFF_OUTFILES/h5diff_200.txt
+$SRC_H5DIFF_OUTFILES/h5diff_201.txt
+$SRC_H5DIFF_OUTFILES/h5diff_202.txt
+$SRC_H5DIFF_OUTFILES/h5diff_203.txt
+$SRC_H5DIFF_OUTFILES/h5diff_204.txt
+$SRC_H5DIFF_OUTFILES/h5diff_205.txt
+$SRC_H5DIFF_OUTFILES/h5diff_206.txt
+$SRC_H5DIFF_OUTFILES/h5diff_207.txt
+$SRC_H5DIFF_OUTFILES/h5diff_208.txt
+$SRC_H5DIFF_OUTFILES/h5diff_220.txt
+$SRC_H5DIFF_OUTFILES/h5diff_221.txt
+$SRC_H5DIFF_OUTFILES/h5diff_222.txt
+$SRC_H5DIFF_OUTFILES/h5diff_223.txt
+$SRC_H5DIFF_OUTFILES/h5diff_224.txt
+$SRC_H5DIFF_OUTFILES/h5diff_21.txt
+$SRC_H5DIFF_OUTFILES/h5diff_22.txt
+$SRC_H5DIFF_OUTFILES/h5diff_23.txt
+$SRC_H5DIFF_OUTFILES/h5diff_24.txt
+$SRC_H5DIFF_OUTFILES/h5diff_25.txt
+$SRC_H5DIFF_OUTFILES/h5diff_26.txt
+$SRC_H5DIFF_OUTFILES/h5diff_27.txt
+$SRC_H5DIFF_OUTFILES/h5diff_28.txt
+$SRC_H5DIFF_OUTFILES/h5diff_30.txt
+$SRC_H5DIFF_OUTFILES/h5diff_300.txt
+$SRC_H5DIFF_OUTFILES/h5diff_400.txt
+$SRC_H5DIFF_OUTFILES/h5diff_401.txt
+$SRC_H5DIFF_OUTFILES/h5diff_402.txt
+$SRC_H5DIFF_OUTFILES/h5diff_403.txt
+$SRC_H5DIFF_OUTFILES/h5diff_404.txt
+$SRC_H5DIFF_OUTFILES/h5diff_405.txt
+$SRC_H5DIFF_OUTFILES/h5diff_406.txt
+$SRC_H5DIFF_OUTFILES/h5diff_407.txt
+$SRC_H5DIFF_OUTFILES/h5diff_408.txt
+$SRC_H5DIFF_OUTFILES/h5diff_409.txt
+$SRC_H5DIFF_OUTFILES/h5diff_410.txt
+$SRC_H5DIFF_OUTFILES/h5diff_411.txt
+$SRC_H5DIFF_OUTFILES/h5diff_412.txt
+$SRC_H5DIFF_OUTFILES/h5diff_413.txt
+$SRC_H5DIFF_OUTFILES/h5diff_414.txt
+$SRC_H5DIFF_OUTFILES/h5diff_415.txt
+$SRC_H5DIFF_OUTFILES/h5diff_416.txt
+$SRC_H5DIFF_OUTFILES/h5diff_417.txt
+$SRC_H5DIFF_OUTFILES/h5diff_418.txt
+$SRC_H5DIFF_OUTFILES/h5diff_419.txt
+$SRC_H5DIFF_OUTFILES/h5diff_420.txt
+$SRC_H5DIFF_OUTFILES/h5diff_421.txt
+$SRC_H5DIFF_OUTFILES/h5diff_422.txt
+$SRC_H5DIFF_OUTFILES/h5diff_423.txt
+$SRC_H5DIFF_OUTFILES/h5diff_424.txt
+$SRC_H5DIFF_OUTFILES/h5diff_425.txt
+$SRC_H5DIFF_OUTFILES/h5diff_450.txt
+$SRC_H5DIFF_OUTFILES/h5diff_451.txt
+$SRC_H5DIFF_OUTFILES/h5diff_452.txt
+$SRC_H5DIFF_OUTFILES/h5diff_453.txt
+$SRC_H5DIFF_OUTFILES/h5diff_454.txt
+$SRC_H5DIFF_OUTFILES/dangling_link.err
+$SRC_H5DIFF_OUTFILES/h5diff_455.txt
+$SRC_H5DIFF_OUTFILES/h5diff_456.txt
+$SRC_H5DIFF_OUTFILES/h5diff_457.txt
+$SRC_H5DIFF_OUTFILES/h5diff_458.txt
+$SRC_H5DIFF_OUTFILES/h5diff_459.txt
+$SRC_H5DIFF_OUTFILES/h5diff_465.txt
+$SRC_H5DIFF_OUTFILES/h5diff_466.txt
+$SRC_H5DIFF_OUTFILES/h5diff_467.txt
+$SRC_H5DIFF_OUTFILES/h5diff_468.txt
+$SRC_H5DIFF_OUTFILES/h5diff_469.txt
+$SRC_H5DIFF_OUTFILES/h5diff_471.txt
+$SRC_H5DIFF_OUTFILES/h5diff_472.txt
+$SRC_H5DIFF_OUTFILES/h5diff_473.txt
+$SRC_H5DIFF_OUTFILES/h5diff_474.txt
+$SRC_H5DIFF_OUTFILES/h5diff_475.txt
+$SRC_H5DIFF_OUTFILES/h5diff_480.txt
+$SRC_H5DIFF_OUTFILES/h5diff_481.txt
+$SRC_H5DIFF_OUTFILES/h5diff_482.txt
+$SRC_H5DIFF_OUTFILES/h5diff_483.txt
+$SRC_H5DIFF_OUTFILES/h5diff_484.txt
+$SRC_H5DIFF_OUTFILES/h5diff_485.txt
+$SRC_H5DIFF_OUTFILES/h5diff_486.txt
+$SRC_H5DIFF_OUTFILES/h5diff_487.txt
+$SRC_H5DIFF_OUTFILES/h5diff_50.txt
+$SRC_H5DIFF_OUTFILES/h5diff_51.txt
+$SRC_H5DIFF_OUTFILES/h5diff_52.txt
+$SRC_H5DIFF_OUTFILES/h5diff_53.txt
+$SRC_H5DIFF_OUTFILES/h5diff_54.txt
+$SRC_H5DIFF_OUTFILES/h5diff_55.txt
+$SRC_H5DIFF_OUTFILES/h5diff_56.txt
+$SRC_H5DIFF_OUTFILES/h5diff_57.txt
+$SRC_H5DIFF_OUTFILES/h5diff_58.txt
+$SRC_H5DIFF_OUTFILES/h5diff_58_ref.txt
+$SRC_H5DIFF_OUTFILES/h5diff_59.txt
+$SRC_H5DIFF_OUTFILES/h5diff_500.txt
+$SRC_H5DIFF_OUTFILES/h5diff_501.txt
+$SRC_H5DIFF_OUTFILES/h5diff_502.txt
+$SRC_H5DIFF_OUTFILES/h5diff_503.txt
+$SRC_H5DIFF_OUTFILES/h5diff_504.txt
+$SRC_H5DIFF_OUTFILES/h5diff_505.txt
+$SRC_H5DIFF_OUTFILES/h5diff_506.txt
+$SRC_H5DIFF_OUTFILES/h5diff_507.txt
+$SRC_H5DIFF_OUTFILES/h5diff_508.txt
+$SRC_H5DIFF_OUTFILES/h5diff_509.txt
+$SRC_H5DIFF_OUTFILES/h5diff_510.txt
+$SRC_H5DIFF_OUTFILES/h5diff_511.txt
+$SRC_H5DIFF_OUTFILES/h5diff_512.txt
+$SRC_H5DIFF_OUTFILES/h5diff_513.txt
+$SRC_H5DIFF_OUTFILES/h5diff_514.txt
+$SRC_H5DIFF_OUTFILES/h5diff_515.txt
+$SRC_H5DIFF_OUTFILES/h5diff_516.txt
+$SRC_H5DIFF_OUTFILES/h5diff_517.txt
+$SRC_H5DIFF_OUTFILES/h5diff_518.txt
+$SRC_H5DIFF_OUTFILES/h5diff_530.txt
+$SRC_H5DIFF_OUTFILES/h5diff_540.txt
+$SRC_H5DIFF_OUTFILES/h5diff_60.txt
+$SRC_H5DIFF_OUTFILES/h5diff_61.txt
+$SRC_H5DIFF_OUTFILES/h5diff_62.txt
+$SRC_H5DIFF_OUTFILES/h5diff_63.txt
+$SRC_H5DIFF_OUTFILES/h5diff_600.txt
+$SRC_H5DIFF_OUTFILES/h5diff_601.txt
+$SRC_H5DIFF_OUTFILES/h5diff_601_ERR.err
+$SRC_H5DIFF_OUTFILES/h5diff_603.txt
+$SRC_H5DIFF_OUTFILES/h5diff_604.txt
+$SRC_H5DIFF_OUTFILES/h5diff_605.txt
+$SRC_H5DIFF_OUTFILES/h5diff_606.txt
+$SRC_H5DIFF_OUTFILES/h5diff_607.txt
+$SRC_H5DIFF_OUTFILES/h5diff_608.txt
+$SRC_H5DIFF_OUTFILES/h5diff_609.txt
+$SRC_H5DIFF_OUTFILES/h5diff_610.txt
+$SRC_H5DIFF_OUTFILES/h5diff_612.txt
+$SRC_H5DIFF_OUTFILES/h5diff_613.txt
+$SRC_H5DIFF_OUTFILES/h5diff_614.txt
+$SRC_H5DIFF_OUTFILES/h5diff_615.txt
+$SRC_H5DIFF_OUTFILES/h5diff_616.txt
+$SRC_H5DIFF_OUTFILES/h5diff_617.txt
+$SRC_H5DIFF_OUTFILES/h5diff_618.txt
+$SRC_H5DIFF_OUTFILES/h5diff_619.txt
+$SRC_H5DIFF_OUTFILES/h5diff_621.txt
+$SRC_H5DIFF_OUTFILES/h5diff_622.txt
+$SRC_H5DIFF_OUTFILES/h5diff_623.txt
+$SRC_H5DIFF_OUTFILES/h5diff_624.txt
+$SRC_H5DIFF_OUTFILES/h5diff_625.txt
+$SRC_H5DIFF_OUTFILES/h5diff_626.txt
+$SRC_H5DIFF_OUTFILES/h5diff_627.txt
+$SRC_H5DIFF_OUTFILES/h5diff_628.txt
+$SRC_H5DIFF_OUTFILES/h5diff_629.txt
+$SRC_H5DIFF_OUTFILES/h5diff_630.txt
+$SRC_H5DIFF_OUTFILES/h5diff_631.txt
+$SRC_H5DIFF_OUTFILES/h5diff_640.txt
+$SRC_H5DIFF_OUTFILES/h5diff_641.txt
+$SRC_H5DIFF_OUTFILES/h5diff_642.txt
+$SRC_H5DIFF_OUTFILES/h5diff_643.txt
+$SRC_H5DIFF_OUTFILES/h5diff_644.txt
+$SRC_H5DIFF_OUTFILES/h5diff_645.txt
+$SRC_H5DIFF_OUTFILES/h5diff_646.txt
+$SRC_H5DIFF_OUTFILES/h5diff_70.txt
+$SRC_H5DIFF_OUTFILES/h5diff_700.txt
+$SRC_H5DIFF_OUTFILES/h5diff_701.txt
+$SRC_H5DIFF_OUTFILES/h5diff_702.txt
+$SRC_H5DIFF_OUTFILES/h5diff_703.txt
+$SRC_H5DIFF_OUTFILES/h5diff_704.txt
+$SRC_H5DIFF_OUTFILES/h5diff_705.txt
+$SRC_H5DIFF_OUTFILES/h5diff_706.txt
+$SRC_H5DIFF_OUTFILES/h5diff_707.txt
+$SRC_H5DIFF_OUTFILES/h5diff_708.txt
+$SRC_H5DIFF_OUTFILES/h5diff_709.txt
+$SRC_H5DIFF_OUTFILES/h5diff_710.txt
+$SRC_H5DIFF_OUTFILES/h5diff_80.txt
+$SRC_H5DIFF_OUTFILES/h5diff_800.txt
+$SRC_H5DIFF_OUTFILES/h5diff_801.txt
+$SRC_H5DIFF_OUTFILES/h5diff_830.txt
+$SRC_H5DIFF_OUTFILES/h5diff_90.txt
+$SRC_H5DIFF_OUTFILES/h5diff_900.txt
+$SRC_H5DIFF_OUTFILES/h5diff_901.txt
+$SRC_H5DIFF_OUTFILES/h5diff_902.txt
+$SRC_H5DIFF_OUTFILES/h5diff_8625.txt
+$SRC_H5DIFF_OUTFILES/h5diff_8639.txt
+$SRC_H5DIFF_OUTFILES/h5diff_reg.txt
+$SRC_H5DIFF_OUTFILES/h5diff_v1.txt
+$SRC_H5DIFF_OUTFILES/h5diff_v2.txt
+$SRC_H5DIFF_OUTFILES/h5diff_v3.txt
+$SRC_H5DIFF_OUTFILES/h5diff_vlstr.txt
+$SRC_H5DIFF_OUTFILES/h5diff_eps.txt
"
#
@@ -588,7 +588,7 @@ SKIP() {
# prepare for test
COPY_TESTFILES_TO_TESTDIR
# second copy of tvlstr.h5
-$CP -f $SRC_TOOLS_TESTFILES/tvlstr.h5 $TESTDIR/tvlstr2.h5
+$CP -f $SRC_H5DUMP_TESTFILES/tvlstr.h5 $TESTDIR/tvlstr2.h5
# ############################################################################
# # Common usage
diff --git a/tools/test/h5dump/CMakeTests.cmake b/tools/test/h5dump/CMakeTests.cmake
index c328ef129e2..7ed021fce1c 100644
--- a/tools/test/h5dump/CMakeTests.cmake
+++ b/tools/test/h5dump/CMakeTests.cmake
@@ -20,210 +20,210 @@
# Copy all the HDF5 files from the test directory into the source directory
# --------------------------------------------------------------------
set (HDF5_REFERENCE_FILES
- ${HDF5_TOOLS_DIR}/testfiles/charsets.ddl
- ${HDF5_TOOLS_DIR}/testfiles/err_attr_dspace.ddl
- ${HDF5_TOOLS_DIR}/testfiles/file_space.ddl
- ${HDF5_TOOLS_DIR}/testfiles/filter_fail.ddl
- ${HDF5_TOOLS_DIR}/testfiles/non_existing.ddl
- ${HDF5_TOOLS_DIR}/testfiles/packedbits.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tall-1.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tall-2.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tall-2A.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tall-2A0.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tall-2B.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tall-3.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tall-4s.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tall-5s.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tall-6.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tall-7.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tall-7N.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tallfilters.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tarray1.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tarray1_big.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tarray2.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tarray3.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tarray4.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tarray5.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tarray6.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tarray7.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tarray8.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tattr-1.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tattr-2.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tattr-3.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tattr-4_be.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tattrcontents1.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tattrcontents2.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tattrintsize.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tattrreg.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tattrregR.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tbin1.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tbin1.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tbin2.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tbin3.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tbin4.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tbinregR.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tbigdims.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tbitnopaque_be.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tbitnopaque_le.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tboot1.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tboot2.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tboot2A.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tboot2B.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tchar1.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tchunked.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tcmpdattrintsize.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tcmpdintarray.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tcmpdints.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tcmpdintsize.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tcompound_complex2.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tcomp-1.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tcomp-2.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tcomp-3.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tcomp-4.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tcompact.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tcontents.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tcontiguos.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tdatareg.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tdataregR.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tdeflate.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tdset-1.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tdset-2.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tdset-3s.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tempty.ddl
- ${HDF5_TOOLS_DIR}/testfiles/texceedsubstart.ddl
- ${HDF5_TOOLS_DIR}/testfiles/texceedsubcount.ddl
- ${HDF5_TOOLS_DIR}/testfiles/texceedsubstride.ddl
- ${HDF5_TOOLS_DIR}/testfiles/texceedsubblock.ddl
- ${HDF5_TOOLS_DIR}/testfiles/texternal.ddl
- ${HDF5_TOOLS_DIR}/testfiles/textlinksrc.ddl
- ${HDF5_TOOLS_DIR}/testfiles/textlinkfar.ddl
- ${HDF5_TOOLS_DIR}/testfiles/textlink.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tfamily.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tfill.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tfletcher32.ddl
- #${HDF5_TOOLS_DIR}/testfiles/tfloatsattrs.ddl #native
- #${HDF5_TOOLS_DIR}/testfiles/tfloatsattrs.wddl #special for windows
- ${HDF5_TOOLS_DIR}/testfiles/tfpformat.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tgroup-1.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tgroup-2.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tgrp_comments.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tgrpnullspace.ddl
- ${HDF5_TOOLS_DIR}/testfiles/thlink-1.ddl
- ${HDF5_TOOLS_DIR}/testfiles/thlink-2.ddl
- ${HDF5_TOOLS_DIR}/testfiles/thlink-3.ddl
- ${HDF5_TOOLS_DIR}/testfiles/thlink-4.ddl
- ${HDF5_TOOLS_DIR}/testfiles/thlink-5.ddl
- ${HDF5_TOOLS_DIR}/testfiles/thyperslab.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tindicesno.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tindicessub1.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tindicessub2.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tindicessub3.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tindicessub4.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tindicesyes.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tints4dims.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tints4dimsBlock2.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tints4dimsBlockEq.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tints4dimsCount2.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tints4dimsCountEq.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tints4dimsStride2.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tintsattrs.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tintsnodata.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tlarge_objname.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tldouble.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tldouble_scalar.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tlonglinks.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tloop-1.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tmulti.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tmultifile.ddl
- #${HDF5_TOOLS_DIR}/testfiles/tqmarkfile.ddl
- #${HDF5_TOOLS_DIR}/testfiles/tstarfile.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tnamed_dtype_attr.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tnestcomp-1.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tnestedcmpddt.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tnbit.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tnoattrdata.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tnoattrddl.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tnodata.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tnoddl.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tnoddlfile.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tno-subset.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tnullspace.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tordergr1.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tordergr2.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tordergr3.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tordergr4.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tordergr5.ddl
- ${HDF5_TOOLS_DIR}/testfiles/torderattr1.ddl
- ${HDF5_TOOLS_DIR}/testfiles/torderattr2.ddl
- ${HDF5_TOOLS_DIR}/testfiles/torderattr3.ddl
- ${HDF5_TOOLS_DIR}/testfiles/torderattr4.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tordercontents1.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tordercontents2.ddl
- ${HDF5_TOOLS_DIR}/testfiles/torderlinks1.ddl
- ${HDF5_TOOLS_DIR}/testfiles/torderlinks2.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tperror.ddl
- ${HDF5_TOOLS_DIR}/testfiles/trawdatafile.ddl
- ${HDF5_TOOLS_DIR}/testfiles/trawssetfile.ddl
- ${HDF5_TOOLS_DIR}/testfiles/treadfilter.ddl
- ${HDF5_TOOLS_DIR}/testfiles/treadintfilter.ddl
- ${HDF5_TOOLS_DIR}/testfiles/treference.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tsaf.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tscalarattrintsize.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tscalarintattrsize.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tscalarintsize.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tscalarstring.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tscaleoffset.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tshuffle.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tslink-1.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tslink-2.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tslink-D.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tsplit_file.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tstr-1.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tstr-2.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tstring.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tstring2.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tstringe.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tszip.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tudfilter.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tudlink-1.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tudlink-2.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tuserfilter.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tvldtypes1.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tvldtypes2.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tvldtypes3.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tvldtypes4.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tvldtypes5.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tvlenstr_array.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tvlstr.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tvms.ddl
- ${HDF5_TOOLS_DIR}/testfiles/twidedisplay.ddl
- ${HDF5_TOOLS_DIR}/testfiles/twithddlfile.ddl
- ${HDF5_TOOLS_DIR}/testfiles/h5dump-help.txt
- ${HDF5_TOOLS_DIR}/testfiles/out3.h5import
- ${HDF5_TOOLS_DIR}/testfiles/zerodim.ddl
+ charsets.ddl
+ err_attr_dspace.ddl
+ file_space.ddl
+ filter_fail.ddl
+ non_existing.ddl
+ packedbits.ddl
+ tall-1.ddl
+ tall-2.ddl
+ tall-2A.ddl
+ tall-2A0.ddl
+ tall-2B.ddl
+ tall-3.ddl
+ tall-4s.ddl
+ tall-5s.ddl
+ tall-6.ddl
+ tall-7.ddl
+ tall-7N.ddl
+ tallfilters.ddl
+ tarray1.ddl
+ tarray1_big.ddl
+ tarray2.ddl
+ tarray3.ddl
+ tarray4.ddl
+ tarray5.ddl
+ tarray6.ddl
+ tarray7.ddl
+ tarray8.ddl
+ tattr-1.ddl
+ tattr-2.ddl
+ tattr-3.ddl
+ tattr-4_be.ddl
+ tattrcontents1.ddl
+ tattrcontents2.ddl
+ tattrintsize.ddl
+ tattrreg.ddl
+ tattrregR.ddl
+ tbin1.ddl
+ tbin1.ddl
+ tbin2.ddl
+ tbin3.ddl
+ tbin4.ddl
+ tbinregR.ddl
+ tbigdims.ddl
+ tbitnopaque_be.ddl
+ tbitnopaque_le.ddl
+ tboot1.ddl
+ tboot2.ddl
+ tboot2A.ddl
+ tboot2B.ddl
+ tchar1.ddl
+ tchunked.ddl
+ tcmpdattrintsize.ddl
+ tcmpdintarray.ddl
+ tcmpdints.ddl
+ tcmpdintsize.ddl
+ tcompound_complex2.ddl
+ tcomp-1.ddl
+ tcomp-2.ddl
+ tcomp-3.ddl
+ tcomp-4.ddl
+ tcompact.ddl
+ tcontents.ddl
+ tcontiguos.ddl
+ tdatareg.ddl
+ tdataregR.ddl
+ tdeflate.ddl
+ tdset-1.ddl
+ tdset-2.ddl
+ tdset-3s.ddl
+ tempty.ddl
+ texceedsubstart.ddl
+ texceedsubcount.ddl
+ texceedsubstride.ddl
+ texceedsubblock.ddl
+ texternal.ddl
+ textlinksrc.ddl
+ textlinkfar.ddl
+ textlink.ddl
+ tfamily.ddl
+ tfill.ddl
+ tfletcher32.ddl
+ #tfloatsattrs.ddl #native
+ #tfloatsattrs.wddl #special for windows
+ tfpformat.ddl
+ tgroup-1.ddl
+ tgroup-2.ddl
+ tgrp_comments.ddl
+ tgrpnullspace.ddl
+ thlink-1.ddl
+ thlink-2.ddl
+ thlink-3.ddl
+ thlink-4.ddl
+ thlink-5.ddl
+ thyperslab.ddl
+ tindicesno.ddl
+ tindicessub1.ddl
+ tindicessub2.ddl
+ tindicessub3.ddl
+ tindicessub4.ddl
+ tindicesyes.ddl
+ tints4dims.ddl
+ tints4dimsBlock2.ddl
+ tints4dimsBlockEq.ddl
+ tints4dimsCount2.ddl
+ tints4dimsCountEq.ddl
+ tints4dimsStride2.ddl
+ tintsattrs.ddl
+ tintsnodata.ddl
+ tlarge_objname.ddl
+ tldouble.ddl
+ tldouble_scalar.ddl
+ tlonglinks.ddl
+ tloop-1.ddl
+ tmulti.ddl
+ tmultifile.ddl
+ #tqmarkfile.ddl
+ #tstarfile.ddl
+ tnamed_dtype_attr.ddl
+ tnestcomp-1.ddl
+ tnestedcmpddt.ddl
+ tnbit.ddl
+ tnoattrdata.ddl
+ tnoattrddl.ddl
+ tnodata.ddl
+ tnoddl.ddl
+ tnoddlfile.ddl
+ tno-subset.ddl
+ tnullspace.ddl
+ tordergr1.ddl
+ tordergr2.ddl
+ tordergr3.ddl
+ tordergr4.ddl
+ tordergr5.ddl
+ torderattr1.ddl
+ torderattr2.ddl
+ torderattr3.ddl
+ torderattr4.ddl
+ tordercontents1.ddl
+ tordercontents2.ddl
+ torderlinks1.ddl
+ torderlinks2.ddl
+ tperror.ddl
+ trawdatafile.ddl
+ trawssetfile.ddl
+ treadfilter.ddl
+ treadintfilter.ddl
+ treference.ddl
+ tsaf.ddl
+ tscalarattrintsize.ddl
+ tscalarintattrsize.ddl
+ tscalarintsize.ddl
+ tscalarstring.ddl
+ tscaleoffset.ddl
+ tshuffle.ddl
+ tslink-1.ddl
+ tslink-2.ddl
+ tslink-D.ddl
+ tsplit_file.ddl
+ tstr-1.ddl
+ tstr-2.ddl
+ tstring.ddl
+ tstring2.ddl
+ tstringe.ddl
+ tszip.ddl
+ tudfilter.ddl
+ tudlink-1.ddl
+ tudlink-2.ddl
+ tuserfilter.ddl
+ tvldtypes1.ddl
+ tvldtypes2.ddl
+ tvldtypes3.ddl
+ tvldtypes4.ddl
+ tvldtypes5.ddl
+ tvlenstr_array.ddl
+ tvlstr.ddl
+ tvms.ddl
+ twidedisplay.ddl
+ twithddlfile.ddl
+ h5dump-help.txt
+ out3.h5import
+ zerodim.ddl
#STD_REF_OBJ files
- ${HDF5_TOOLS_DIR}/testfiles/trefer_attrR.ddl
- ${HDF5_TOOLS_DIR}/testfiles/trefer_compatR.ddl
- ${HDF5_TOOLS_DIR}/testfiles/trefer_extR.ddl
- ${HDF5_TOOLS_DIR}/testfiles/trefer_grpR.ddl
- ${HDF5_TOOLS_DIR}/testfiles/trefer_obj_delR.ddl
- ${HDF5_TOOLS_DIR}/testfiles/trefer_objR.ddl
- ${HDF5_TOOLS_DIR}/testfiles/trefer_paramR.ddl
- ${HDF5_TOOLS_DIR}/testfiles/trefer_reg_1dR.ddl
- ${HDF5_TOOLS_DIR}/testfiles/trefer_regR.ddl
+ trefer_attrR.ddl
+ trefer_compatR.ddl
+ trefer_extR.ddl
+ trefer_grpR.ddl
+ trefer_obj_delR.ddl
+ trefer_objR.ddl
+ trefer_paramR.ddl
+ trefer_reg_1dR.ddl
+ trefer_regR.ddl
# Onion VFD files
- ${HDF5_TOOLS_DIR}/testfiles/tst_onion_objs.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tst_onion_dset_ext.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tst_onion_dset_1d.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tst_onion_revision_count.ddl
+ tst_onion_objs.ddl
+ tst_onion_dset_ext.ddl
+ tst_onion_dset_1d.ddl
+ tst_onion_revision_count.ddl
)
set (HDF5_N_REFERENCE_FILES
- tall-3
- tattr-2
- tcomp-2
- thlink-4
- thlink-5
- tslink-2
+ tall-3.ddl
+ tattr-2.ddl
+ tcomp-2.ddl
+ thlink-4.ddl
+ thlink-5.ddl
+ tslink-2.ddl
)
set (HDF5_REFERENCE_EXP_FILES
tall-6.exp
@@ -236,159 +236,159 @@
twithddlfile.exp
)
set (HDF5_REFERENCE_TEST_FILES
- ${HDF5_TOOLS_DIR}/testfiles/charsets.h5
- ${HDF5_TOOLS_DIR}/testfiles/err_attr_dspace.h5
- ${HDF5_TOOLS_DIR}/testfiles/file_space.h5
- ${HDF5_TOOLS_DIR}/testfiles/filter_fail.h5
- ${HDF5_TOOLS_DIR}/testfiles/packedbits.h5
- ${HDF5_TOOLS_DIR}/testfiles/taindices.h5
- ${HDF5_TOOLS_DIR}/testfiles/tall.h5
- ${HDF5_TOOLS_DIR}/testfiles/tarray1.h5
- ${HDF5_TOOLS_DIR}/testfiles/tarray1_big.h5
- ${HDF5_TOOLS_DIR}/testfiles/tarray2.h5
- ${HDF5_TOOLS_DIR}/testfiles/tarray3.h5
- ${HDF5_TOOLS_DIR}/testfiles/tarray4.h5
- ${HDF5_TOOLS_DIR}/testfiles/tarray5.h5
- ${HDF5_TOOLS_DIR}/testfiles/tarray6.h5
- ${HDF5_TOOLS_DIR}/testfiles/tarray7.h5
- ${HDF5_TOOLS_DIR}/testfiles/tarray8.h5
- ${HDF5_TOOLS_DIR}/testfiles/tattr.h5
- ${HDF5_TOOLS_DIR}/testfiles/tattr2.h5
- ${HDF5_TOOLS_DIR}/testfiles/tattr4_be.h5
- ${HDF5_TOOLS_DIR}/testfiles/tattrintsize.h5
- ${HDF5_TOOLS_DIR}/testfiles/tattrreg.h5
- ${HDF5_TOOLS_DIR}/testfiles/tbigdims.h5
- ${HDF5_TOOLS_DIR}/testfiles/tbinary.h5
- ${HDF5_TOOLS_DIR}/testfiles/tbitnopaque.h5
- ${HDF5_TOOLS_DIR}/testfiles/tchar.h5
- ${HDF5_TOOLS_DIR}/testfiles/tcmpdattrintsize.h5
- ${HDF5_TOOLS_DIR}/testfiles/tcmpdintarray.h5
- ${HDF5_TOOLS_DIR}/testfiles/tcmpdints.h5
- ${HDF5_TOOLS_DIR}/testfiles/tcmpdintsize.h5
- ${HDF5_TOOLS_DIR}/testfiles/tcompound.h5
- ${HDF5_TOOLS_DIR}/testfiles/tcompound_complex.h5
- ${HDF5_TOOLS_DIR}/testfiles/tcompound_complex2.h5
- ${HDF5_TOOLS_DIR}/testfiles/tdatareg.h5
- ${HDF5_TOOLS_DIR}/testfiles/tdset.h5
- ${HDF5_TOOLS_DIR}/testfiles/tempty.h5
- ${HDF5_TOOLS_DIR}/testfiles/tsoftlinks.h5
- ${HDF5_TOOLS_DIR}/testfiles/textlinkfar.h5
- ${HDF5_TOOLS_DIR}/testfiles/textlinksrc.h5
- ${HDF5_TOOLS_DIR}/testfiles/textlinktar.h5
- ${HDF5_TOOLS_DIR}/testfiles/textlink.h5
- ${HDF5_TOOLS_DIR}/testfiles/tfamily00000.h5
- ${HDF5_TOOLS_DIR}/testfiles/tfamily00001.h5
- ${HDF5_TOOLS_DIR}/testfiles/tfamily00002.h5
- ${HDF5_TOOLS_DIR}/testfiles/tfamily00003.h5
- ${HDF5_TOOLS_DIR}/testfiles/tfamily00004.h5
- ${HDF5_TOOLS_DIR}/testfiles/tfamily00005.h5
- ${HDF5_TOOLS_DIR}/testfiles/tfamily00006.h5
- ${HDF5_TOOLS_DIR}/testfiles/tfamily00007.h5
- ${HDF5_TOOLS_DIR}/testfiles/tfamily00008.h5
- ${HDF5_TOOLS_DIR}/testfiles/tfamily00009.h5
- ${HDF5_TOOLS_DIR}/testfiles/tfamily00010.h5
- ${HDF5_TOOLS_DIR}/testfiles/tfcontents1.h5
- ${HDF5_TOOLS_DIR}/testfiles/tfcontents2.h5
- ${HDF5_TOOLS_DIR}/testfiles/tfilters.h5
- ${HDF5_TOOLS_DIR}/testfiles/tfloatsattrs.h5
- ${HDF5_TOOLS_DIR}/testfiles/tfpformat.h5
- ${HDF5_TOOLS_DIR}/testfiles/tfvalues.h5
- ${HDF5_TOOLS_DIR}/testfiles/tgroup.h5
- ${HDF5_TOOLS_DIR}/testfiles/tgrp_comments.h5
- ${HDF5_TOOLS_DIR}/testfiles/tgrpnullspace.h5
- ${HDF5_TOOLS_DIR}/testfiles/thlink.h5
- ${HDF5_TOOLS_DIR}/testfiles/thyperslab.h5
- ${HDF5_TOOLS_DIR}/testfiles/tints4dims.h5
- ${HDF5_TOOLS_DIR}/testfiles/tintsattrs.h5
- ${HDF5_TOOLS_DIR}/testfiles/tintsnodata.h5
- ${HDF5_TOOLS_DIR}/testfiles/tlarge_objname.h5
- ${HDF5_TOOLS_DIR}/testfiles/tldouble.h5
- ${HDF5_TOOLS_DIR}/testfiles/tldouble_scalar.h5
- ${HDF5_TOOLS_DIR}/testfiles/tlonglinks.h5
- ${HDF5_TOOLS_DIR}/testfiles/tloop.h5
- ${HDF5_TOOLS_DIR}/testfiles/tmulti-b.h5
- ${HDF5_TOOLS_DIR}/testfiles/tmulti-g.h5
- ${HDF5_TOOLS_DIR}/testfiles/tmulti-l.h5
- ${HDF5_TOOLS_DIR}/testfiles/tmulti-o.h5
- ${HDF5_TOOLS_DIR}/testfiles/tmulti-r.h5
- ${HDF5_TOOLS_DIR}/testfiles/tmulti-s.h5
- ${HDF5_TOOLS_DIR}/testfiles/tnamed_dtype_attr.h5
- ${HDF5_TOOLS_DIR}/testfiles/tnestedcomp.h5
- ${HDF5_TOOLS_DIR}/testfiles/tnestedcmpddt.h5
- ${HDF5_TOOLS_DIR}/testfiles/tno-subset.h5
- ${HDF5_TOOLS_DIR}/testfiles/tnullspace.h5
- ${HDF5_TOOLS_DIR}/testfiles/torderattr.h5
- ${HDF5_TOOLS_DIR}/testfiles/tordergr.h5
- ${HDF5_TOOLS_DIR}/testfiles/tsaf.h5
- ${HDF5_TOOLS_DIR}/testfiles/tscalarattrintsize.h5
- ${HDF5_TOOLS_DIR}/testfiles/tscalarintattrsize.h5
- ${HDF5_TOOLS_DIR}/testfiles/tscalarintsize.h5
- ${HDF5_TOOLS_DIR}/testfiles/tscalarstring.h5
- ${HDF5_TOOLS_DIR}/testfiles/tslink.h5
- ${HDF5_TOOLS_DIR}/testfiles/tsplit_file-m.h5
- ${HDF5_TOOLS_DIR}/testfiles/tsplit_file-r.h5
- ${HDF5_TOOLS_DIR}/testfiles/tstr.h5
- ${HDF5_TOOLS_DIR}/testfiles/tstr2.h5
- ${HDF5_TOOLS_DIR}/testfiles/tstr3.h5
- ${HDF5_TOOLS_DIR}/testfiles/tudfilter.h5
- ${HDF5_TOOLS_DIR}/testfiles/tudlink.h5
- ${HDF5_TOOLS_DIR}/testfiles/tvldtypes1.h5
- ${HDF5_TOOLS_DIR}/testfiles/tvldtypes2.h5
- ${HDF5_TOOLS_DIR}/testfiles/tvldtypes3.h5
- ${HDF5_TOOLS_DIR}/testfiles/tvldtypes4.h5
- ${HDF5_TOOLS_DIR}/testfiles/tvldtypes5.h5
- ${HDF5_TOOLS_DIR}/testfiles/tvlenstr_array.h5
- ${HDF5_TOOLS_DIR}/testfiles/tvlstr.h5
- ${HDF5_TOOLS_DIR}/testfiles/tvms.h5
- ${HDF5_TOOLS_DIR}/testfiles/t128bit_float.h5
- ${HDF5_TOOLS_DIR}/testfiles/tCVE_2018_11206_fill_old.h5
- ${HDF5_TOOLS_DIR}/testfiles/tCVE_2018_11206_fill_new.h5
- ${HDF5_TOOLS_DIR}/testfiles/zerodim.h5
- ${HDF5_TOOLS_DIR}/testfiles/tCVE-2021-37501_attr_decode.h5
+ charsets.h5
+ err_attr_dspace.h5
+ file_space.h5
+ filter_fail.h5
+ packedbits.h5
+ taindices.h5
+ tall.h5
+ tarray1.h5
+ tarray1_big.h5
+ tarray2.h5
+ tarray3.h5
+ tarray4.h5
+ tarray5.h5
+ tarray6.h5
+ tarray7.h5
+ tarray8.h5
+ tattr.h5
+ tattr2.h5
+ tattr4_be.h5
+ tattrintsize.h5
+ tattrreg.h5
+ tbigdims.h5
+ tbinary.h5
+ tbitnopaque.h5
+ tchar.h5
+ tcmpdattrintsize.h5
+ tcmpdintarray.h5
+ tcmpdints.h5
+ tcmpdintsize.h5
+ tcompound.h5
+ tcompound_complex.h5
+ tcompound_complex2.h5
+ tdatareg.h5
+ tdset.h5
+ tempty.h5
+ tsoftlinks.h5
+ textlinkfar.h5
+ textlinksrc.h5
+ textlinktar.h5
+ textlink.h5
+ tfamily00000.h5
+ tfamily00001.h5
+ tfamily00002.h5
+ tfamily00003.h5
+ tfamily00004.h5
+ tfamily00005.h5
+ tfamily00006.h5
+ tfamily00007.h5
+ tfamily00008.h5
+ tfamily00009.h5
+ tfamily00010.h5
+ tfcontents1.h5
+ tfcontents2.h5
+ tfilters.h5
+ tfloatsattrs.h5
+ tfpformat.h5
+ tfvalues.h5
+ tgroup.h5
+ tgrp_comments.h5
+ tgrpnullspace.h5
+ thlink.h5
+ thyperslab.h5
+ tints4dims.h5
+ tintsattrs.h5
+ tintsnodata.h5
+ tlarge_objname.h5
+ tldouble.h5
+ tldouble_scalar.h5
+ tlonglinks.h5
+ tloop.h5
+ tmulti-b.h5
+ tmulti-g.h5
+ tmulti-l.h5
+ tmulti-o.h5
+ tmulti-r.h5
+ tmulti-s.h5
+ tnamed_dtype_attr.h5
+ tnestedcomp.h5
+ tnestedcmpddt.h5
+ tno-subset.h5
+ tnullspace.h5
+ torderattr.h5
+ tordergr.h5
+ tsaf.h5
+ tscalarattrintsize.h5
+ tscalarintattrsize.h5
+ tscalarintsize.h5
+ tscalarstring.h5
+ tslink.h5
+ tsplit_file-m.h5
+ tsplit_file-r.h5
+ tstr.h5
+ tstr2.h5
+ tstr3.h5
+ tudfilter.h5
+ tudlink.h5
+ tvldtypes1.h5
+ tvldtypes2.h5
+ tvldtypes3.h5
+ tvldtypes4.h5
+ tvldtypes5.h5
+ tvlenstr_array.h5
+ tvlstr.h5
+ tvms.h5
+ t128bit_float.h5
+ tCVE_2018_11206_fill_old.h5
+ tCVE_2018_11206_fill_new.h5
+ zerodim.h5
+ tCVE-2021-37501_attr_decode.h5
#STD_REF_OBJ files
- ${HDF5_TOOLS_DIR}/testfiles/trefer_attr.h5
- ${HDF5_TOOLS_DIR}/testfiles/trefer_compat.h5
- ${HDF5_TOOLS_DIR}/testfiles/trefer_ext1.h5
- ${HDF5_TOOLS_DIR}/testfiles/trefer_ext2.h5
- ${HDF5_TOOLS_DIR}/testfiles/trefer_grp.h5
- ${HDF5_TOOLS_DIR}/testfiles/trefer_obj_del.h5
- ${HDF5_TOOLS_DIR}/testfiles/trefer_obj.h5
- ${HDF5_TOOLS_DIR}/testfiles/trefer_param.h5
- ${HDF5_TOOLS_DIR}/testfiles/trefer_reg_1d.h5
- ${HDF5_TOOLS_DIR}/testfiles/trefer_reg.h5
+ trefer_attr.h5
+ trefer_compat.h5
+ trefer_ext1.h5
+ trefer_ext2.h5
+ trefer_grp.h5
+ trefer_obj_del.h5
+ trefer_obj.h5
+ trefer_param.h5
+ trefer_reg_1d.h5
+ trefer_reg.h5
# Onion VFD files
- ${HDF5_TOOLS_DIR}/testfiles/tst_onion_objs.h5
- ${HDF5_TOOLS_DIR}/testfiles/tst_onion_objs.h5.onion
- ${HDF5_TOOLS_DIR}/testfiles/tst_onion_dset_ext.h5
- ${HDF5_TOOLS_DIR}/testfiles/tst_onion_dset_ext.h5.onion
- ${HDF5_TOOLS_DIR}/testfiles/tst_onion_dset_1d.h5
- ${HDF5_TOOLS_DIR}/testfiles/tst_onion_dset_1d.h5.onion
+ tst_onion_objs.h5
+ tst_onion_objs.h5.onion
+ tst_onion_dset_ext.h5
+ tst_onion_dset_ext.h5.onion
+ tst_onion_dset_1d.h5
+ tst_onion_dset_1d.h5.onion
)
set (HDF5_ERROR_REFERENCE_TEST_FILES
- ${PROJECT_SOURCE_DIR}/errfiles/filter_fail.err
- ${PROJECT_SOURCE_DIR}/errfiles/non_existing.err
- ${PROJECT_SOURCE_DIR}/errfiles/tall-1.err
- ${PROJECT_SOURCE_DIR}/errfiles/tall-2A.err
- ${PROJECT_SOURCE_DIR}/errfiles/tall-2A0.err
- ${PROJECT_SOURCE_DIR}/errfiles/tall-2B.err
- ${PROJECT_SOURCE_DIR}/errfiles/tarray1_big.err
- ${PROJECT_SOURCE_DIR}/errfiles/tattrregR.err
- ${PROJECT_SOURCE_DIR}/errfiles/tattr-3.err
- ${PROJECT_SOURCE_DIR}/errfiles/tcomp-3.err
- ${PROJECT_SOURCE_DIR}/errfiles/tdataregR.err
- ${PROJECT_SOURCE_DIR}/errfiles/tdset-2.err
- ${PROJECT_SOURCE_DIR}/errfiles/texceedsubblock.err
- ${PROJECT_SOURCE_DIR}/errfiles/texceedsubcount.err
- ${PROJECT_SOURCE_DIR}/errfiles/texceedsubstart.err
- ${PROJECT_SOURCE_DIR}/errfiles/texceedsubstride.err
- ${PROJECT_SOURCE_DIR}/errfiles/textlink.err
- ${PROJECT_SOURCE_DIR}/errfiles/textlinkfar.err
- ${PROJECT_SOURCE_DIR}/errfiles/textlinksrc.err
- ${PROJECT_SOURCE_DIR}/errfiles/torderlinks1.err
- ${PROJECT_SOURCE_DIR}/errfiles/torderlinks2.err
- ${PROJECT_SOURCE_DIR}/errfiles/tgroup-2.err
- ${PROJECT_SOURCE_DIR}/errfiles/tperror.err
- ${PROJECT_SOURCE_DIR}/errfiles/tslink-D.err
+ filter_fail.err
+ non_existing.err
+ tall-1.err
+ tall-2A.err
+ tall-2A0.err
+ tall-2B.err
+ tarray1_big.err
+ tattrregR.err
+ tattr-3.err
+ tcomp-3.err
+ tdataregR.err
+ tdset-2.err
+ texceedsubblock.err
+ texceedsubcount.err
+ texceedsubstart.err
+ texceedsubstride.err
+ textlink.err
+ textlinkfar.err
+ textlinksrc.err
+ torderlinks1.err
+ torderlinks2.err
+ tgroup-2.err
+ tperror.err
+ tslink-D.err
)
# make test dir
@@ -398,40 +398,38 @@
# copy test files from source dir to test dir
#
foreach (tst_h5_file ${HDF5_REFERENCE_TEST_FILES})
- get_filename_component (fname "${tst_h5_file}" NAME)
- HDFTEST_COPY_FILE("${tst_h5_file}" "${PROJECT_BINARY_DIR}/testfiles/std/${fname}" "h5dump_std_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${tst_h5_file}" "${PROJECT_BINARY_DIR}/testfiles/std/${tst_h5_file}" "h5dump_std_files")
endforeach ()
foreach (tst_exp_file ${HDF5_REFERENCE_EXP_FILES})
- HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${tst_exp_file}" "${PROJECT_BINARY_DIR}/testfiles/std/${tst_exp_file}" "h5dump_std_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/exportfiles/${tst_exp_file}" "${PROJECT_BINARY_DIR}/testfiles/std/${tst_exp_file}" "h5dump_std_files")
endforeach ()
foreach (tst_other_file ${HDF5_REFERENCE_FILES})
- get_filename_component (fname "${tst_other_file}" NAME)
- HDFTEST_COPY_FILE("${tst_other_file}" "${PROJECT_BINARY_DIR}/testfiles/std/${fname}" "h5dump_std_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/expected/${tst_other_file}" "${PROJECT_BINARY_DIR}/testfiles/std/${tst_other_file}" "h5dump_std_files")
endforeach ()
+
foreach (tst_h5N_file ${HDF5_N_REFERENCE_FILES})
- HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${tst_h5N_file}.ddl" "${PROJECT_BINARY_DIR}/testfiles/std/${tst_h5N_file}-N.ddl" "h5dump_std_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/expected/${tst_h5N_file}" "${PROJECT_BINARY_DIR}/testfiles/std/${tst_h5N_file}-N" "h5dump_std_files")
endforeach ()
foreach (tst_error_file ${HDF5_ERROR_REFERENCE_TEST_FILES})
- get_filename_component (fname "${tst_error_file}" NAME)
- HDFTEST_COPY_FILE("${tst_error_file}" "${PROJECT_BINARY_DIR}/testfiles/std/${fname}" "h5dump_std_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/errfiles/${tst_error_file}" "${PROJECT_BINARY_DIR}/testfiles/std/${tst_error_file}" "h5dump_std_files")
endforeach ()
# --------------------------------------------------------------------
# Special file handling
# --------------------------------------------------------------------
- HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tbin1.ddl" "${PROJECT_BINARY_DIR}/testfiles/std/tbin1LE.ddl" "h5dump_std_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/expected/tbin1.ddl" "${PROJECT_BINARY_DIR}/testfiles/std/tbin1LE.ddl" "h5dump_std_files")
if (WIN32 AND CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION VERSION_LESS 10.0.18362.0)
- configure_file(${HDF5_TOOLS_DIR}/testfiles/tbinregR.exp ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp NEWLINE_STYLE CRLF)
- #file (READ ${HDF5_TOOLS_DIR}/testfiles/tbinregR.exp TEST_STREAM)
+ configure_file(${PROJECT_SOURCE_DIR}/exportfiles/tbinregR.exp ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp NEWLINE_STYLE CRLF)
+ #file (READ ${PROJECT_SOURCE_DIR}/exportfiles/tbinregR.exp TEST_STREAM)
#file (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp "${TEST_STREAM}")
- HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tfloatsattrs.wddl" "${PROJECT_BINARY_DIR}/testfiles/std/tfloatsattrs.ddl" "h5dump_std_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/expected/tfloatsattrs.wddl" "${PROJECT_BINARY_DIR}/testfiles/std/tfloatsattrs.ddl" "h5dump_std_files")
else ()
- HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tbinregR.exp" "${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp" "h5dump_std_files")
- HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tfloatsattrs.ddl" "${PROJECT_BINARY_DIR}/testfiles/std/tfloatsattrs.ddl" "h5dump_std_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/exportfiles/tbinregR.exp" "${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp" "h5dump_std_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/expected/tfloatsattrs.ddl" "${PROJECT_BINARY_DIR}/testfiles/std/tfloatsattrs.ddl" "h5dump_std_files")
endif ()
add_custom_target(h5dump_std_files ALL COMMENT "Copying files needed by h5dump_std tests" DEPENDS ${h5dump_std_files_list})
diff --git a/tools/test/h5dump/CMakeTestsPBITS.cmake b/tools/test/h5dump/CMakeTestsPBITS.cmake
index caca4b7acbc..118b314f60c 100644
--- a/tools/test/h5dump/CMakeTestsPBITS.cmake
+++ b/tools/test/h5dump/CMakeTestsPBITS.cmake
@@ -76,9 +76,9 @@
tpbitsUnsignedLongLong16.ddl
)
set (HDF5_REFERENCE_TEST_PBITS
- ${HDF5_TOOLS_DIR}/testfiles/packedbits.h5
- ${HDF5_TOOLS_DIR}/testfiles/tarray1.h5
- ${HDF5_TOOLS_DIR}/testfiles/tcompound.h5
+ packedbits.h5
+ tarray1.h5
+ tcompound.h5
)
set (HDF5_ERROR_REFERENCE_PBITS
tnofilename-with-packed-bits.err
@@ -97,19 +97,15 @@
)
foreach (pbits_h5_file ${HDF5_REFERENCE_TEST_PBITS})
- get_filename_component(fname "${pbits_h5_file}" NAME)
- HDFTEST_COPY_FILE("${pbits_h5_file}" "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}" "h5dump_pbits_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${pbits_h5_file}" "${PROJECT_BINARY_DIR}/testfiles/pbits/${pbits_h5_file}" "h5dump_pbits_files")
endforeach ()
-
foreach (ddl_pbits ${HDF5_REFERENCE_PBITS})
- get_filename_component(fname "${ddl_pbits}" NAME)
- HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/pbits/${ddl_pbits}" "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}" "h5dump_pbits_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/expected/pbits/${ddl_pbits}" "${PROJECT_BINARY_DIR}/testfiles/pbits/${ddl_pbits}" "h5dump_pbits_files")
endforeach ()
- foreach (ddl_pbits ${HDF5_ERROR_REFERENCE_PBITS})
- get_filename_component(fname "${ddl_pbits}" NAME)
- HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/errfiles/${ddl_pbits}" "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}" "h5dump_pbits_files")
+ foreach (ddl_err_pbits ${HDF5_ERROR_REFERENCE_PBITS})
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/errfiles/pbits/${ddl_err_pbits}" "${PROJECT_BINARY_DIR}/testfiles/pbits/${ddl_err_pbits}" "h5dump_pbits_files")
endforeach ()
add_custom_target(h5dump_pbits_files ALL COMMENT "Copying files needed by h5dump_pbits tests" DEPENDS ${h5dump_pbits_files_list})
diff --git a/tools/test/h5dump/CMakeTestsVDS.cmake b/tools/test/h5dump/CMakeTestsVDS.cmake
index 42f08c9a67b..c910acd5e67 100644
--- a/tools/test/h5dump/CMakeTestsVDS.cmake
+++ b/tools/test/h5dump/CMakeTestsVDS.cmake
@@ -84,28 +84,19 @@
)
foreach (vds_h5_file ${HDF5_REFERENCE_TEST_VDS})
- get_filename_component(fname "${vds_h5_file}" NAME)
- HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/vds/${vds_h5_file}" "${PROJECT_BINARY_DIR}/testfiles/vds/${fname}" "h5dump_vds_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/vds/${vds_h5_file}" "${PROJECT_BINARY_DIR}/testfiles/vds/${vds_h5_file}" "h5dump_vds_files")
endforeach ()
foreach (vds_h5_file ${HDF5_REFERENCE_PREFIX_VDS})
- get_filename_component(fname "${vds_h5_file}" NAME)
- HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/vds/${vds_h5_file}" "${PROJECT_BINARY_DIR}/testfiles/vds/prefix/${fname}" "h5dump_vds_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/vds/${vds_h5_file}" "${PROJECT_BINARY_DIR}/testfiles/vds/prefix/${vds_h5_file}" "h5dump_vds_files")
endforeach ()
foreach (ddl_vds ${HDF5_REFERENCE_VDS})
- get_filename_component(fname "${ddl_vds}" NAME)
- HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/vds/${ddl_vds}" "${PROJECT_BINARY_DIR}/testfiles/vds/${fname}" "h5dump_vds_files")
- endforeach ()
-
- foreach (ddl_vds ${HDF5_REFERENCE_VDS})
- get_filename_component(fname "${ddl_vds}" NAME)
- HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/vds/${ddl_vds}" "${PROJECT_BINARY_DIR}/testfiles/vds/prefix/${fname}" "h5dump_vds_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/expected/vds/${ddl_vds}" "${PROJECT_BINARY_DIR}/testfiles/vds/prefix/${ddl_vds}" "h5dump_vds_files")
endforeach ()
foreach (ddl_vds ${HDF5_ERROR_REFERENCE_VDS})
- get_filename_component(fname "${ddl_vds}" NAME)
- HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/errfiles/${ddl_vds}" "${PROJECT_BINARY_DIR}/testfiles/vds/${fname}" "h5dump_vds_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/errfiles/${ddl_vds}" "${PROJECT_BINARY_DIR}/testfiles/vds/${ddl_vds}" "h5dump_vds_files")
endforeach ()
add_custom_target(h5dump_vds_files ALL COMMENT "Copying files needed by h5dump_vds tests" DEPENDS ${h5dump_vds_files_list})
diff --git a/tools/test/h5dump/CMakeTestsXML.cmake b/tools/test/h5dump/CMakeTestsXML.cmake
index 833a616443e..d78e73830ba 100644
--- a/tools/test/h5dump/CMakeTestsXML.cmake
+++ b/tools/test/h5dump/CMakeTestsXML.cmake
@@ -19,138 +19,143 @@
#
# copy XML test files from source dir to test dir
#
+ set (HDF5_XML_REFERENCE_ONLY_FILES
+ tbitfields.h5
+ tcompound2.h5
+ tdset2.h5
+ tenum.h5
+ test35.nc
+ tloop2.h5
+ tmany.h5
+ tname-amp.h5
+ tname-apos.h5
+ tname-gt.h5
+ tname-lt.h5
+ tname-quot.h5
+ tname-sp.h5
+ tnodata.h5
+ tobjref.h5
+ topaque.h5
+ tref.h5
+ tref-escapes.h5
+ tref-escapes-at.h5
+ tstring.h5
+ tstring-at.h5
+ )
+
set (HDF5_XML_REFERENCE_TEST_FILES
- ${HDF5_TOOLS_DIR}/testfiles/tall.h5
- ${HDF5_TOOLS_DIR}/testfiles/tarray1.h5
- ${HDF5_TOOLS_DIR}/testfiles/tarray2.h5
- ${HDF5_TOOLS_DIR}/testfiles/tarray3.h5
- ${HDF5_TOOLS_DIR}/testfiles/tarray6.h5
- ${HDF5_TOOLS_DIR}/testfiles/tarray7.h5
- ${HDF5_TOOLS_DIR}/testfiles/tattr.h5
- ${HDF5_TOOLS_DIR}/testfiles/tbitfields.h5
- ${HDF5_TOOLS_DIR}/testfiles/tcompound.h5
- ${HDF5_TOOLS_DIR}/testfiles/tcompound2.h5
- ${HDF5_TOOLS_DIR}/testfiles/tcompound_complex.h5
- ${HDF5_TOOLS_DIR}/testfiles/tdatareg.h5
- ${HDF5_TOOLS_DIR}/testfiles/tdset.h5
- ${HDF5_TOOLS_DIR}/testfiles/tdset2.h5
- ${HDF5_TOOLS_DIR}/testfiles/tempty.h5
- ${HDF5_TOOLS_DIR}/testfiles/tenum.h5
- ${HDF5_TOOLS_DIR}/testfiles/textlink.h5
- ${HDF5_TOOLS_DIR}/testfiles/tfpformat.h5
- ${HDF5_TOOLS_DIR}/testfiles/tgroup.h5
- ${HDF5_TOOLS_DIR}/testfiles/thlink.h5
- ${HDF5_TOOLS_DIR}/testfiles/tloop.h5
- ${HDF5_TOOLS_DIR}/testfiles/tloop2.h5
- ${HDF5_TOOLS_DIR}/testfiles/tmany.h5
- ${HDF5_TOOLS_DIR}/testfiles/tname-amp.h5
- ${HDF5_TOOLS_DIR}/testfiles/tname-apos.h5
- ${HDF5_TOOLS_DIR}/testfiles/tname-gt.h5
- ${HDF5_TOOLS_DIR}/testfiles/tname-lt.h5
- ${HDF5_TOOLS_DIR}/testfiles/tname-quot.h5
- ${HDF5_TOOLS_DIR}/testfiles/tname-sp.h5
- ${HDF5_TOOLS_DIR}/testfiles/tnamed_dtype_attr.h5
- ${HDF5_TOOLS_DIR}/testfiles/test35.nc
- ${HDF5_TOOLS_DIR}/testfiles/tnestedcomp.h5
- ${HDF5_TOOLS_DIR}/testfiles/tnodata.h5
- ${HDF5_TOOLS_DIR}/testfiles/tnullspace.h5
- ${HDF5_TOOLS_DIR}/testfiles/tobjref.h5
- ${HDF5_TOOLS_DIR}/testfiles/topaque.h5
- ${HDF5_TOOLS_DIR}/testfiles/torderattr.h5
- ${HDF5_TOOLS_DIR}/testfiles/tref.h5
- ${HDF5_TOOLS_DIR}/testfiles/tref-escapes.h5
- ${HDF5_TOOLS_DIR}/testfiles/tref-escapes-at.h5
- ${HDF5_TOOLS_DIR}/testfiles/tsaf.h5
- ${HDF5_TOOLS_DIR}/testfiles/tslink.h5
- ${HDF5_TOOLS_DIR}/testfiles/tstring.h5
- ${HDF5_TOOLS_DIR}/testfiles/tstring-at.h5
- ${HDF5_TOOLS_DIR}/testfiles/tstr.h5
- ${HDF5_TOOLS_DIR}/testfiles/tstr2.h5
- ${HDF5_TOOLS_DIR}/testfiles/tudlink.h5
- ${HDF5_TOOLS_DIR}/testfiles/tvldtypes1.h5
- ${HDF5_TOOLS_DIR}/testfiles/tvldtypes2.h5
- ${HDF5_TOOLS_DIR}/testfiles/tvldtypes3.h5
- ${HDF5_TOOLS_DIR}/testfiles/tvldtypes4.h5
- ${HDF5_TOOLS_DIR}/testfiles/tvldtypes5.h5
- ${HDF5_TOOLS_DIR}/testfiles/tvlstr.h5
+ tall.h5
+ tarray1.h5
+ tarray2.h5
+ tarray3.h5
+ tarray6.h5
+ tarray7.h5
+ tattr.h5
+ tcompound.h5
+ tcompound_complex.h5
+ tdatareg.h5
+ tdset.h5
+ tempty.h5
+ textlink.h5
+ tfpformat.h5
+ tgroup.h5
+ thlink.h5
+ tloop.h5
+ tnamed_dtype_attr.h5
+ tnestedcomp.h5
+ tnullspace.h5
+ torderattr.h5
+ tsaf.h5
+ tslink.h5
+ tstr.h5
+ tstr2.h5
+ tudlink.h5
+ tvldtypes1.h5
+ tvldtypes2.h5
+ tvldtypes3.h5
+ tvldtypes4.h5
+ tvldtypes5.h5
+ tvlstr.h5
)
set (HDF5_XML_REFERENCE_FILES
- ${HDF5_TOOLS_DIR}/testfiles/tall.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tall-2A.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tarray1.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tarray2.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tarray3.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tarray6.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tarray7.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tattr.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tbitfields_be.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tbitfields_le.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tcompound_complex.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tcompound.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tcompound2.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tdatareg.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tdset.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tdset2.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tempty.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tempty-dtd.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tempty-dtd-2.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tempty-dtd-uri.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tempty-nons.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tempty-nons-2.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tempty-nons-uri.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tempty-ns.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tempty-ns-2.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tenum.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/test35.nc.xml
- ${HDF5_TOOLS_DIR}/testfiles/textlink.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tfpformat.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tgroup.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/thlink.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tloop.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tloop2.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tmany.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tname-amp.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tname-apos.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tnamed_dtype_attr.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tname-gt.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tname-lt.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tname-quot.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tname-sp.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tnestedcomp.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tnodata.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tnullspace.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tobjref.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/topaque.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/torderattr1.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/torderattr2.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/torderattr3.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/torderattr4.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tref.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tref-escapes.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tref-escapes-at.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tsaf.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tslink.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tstr.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tstr2.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tstring.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tstring-at.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tudlink.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tvldtypes1.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tvldtypes2.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tvldtypes3.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tvldtypes4.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tvldtypes5.h5.xml
- ${HDF5_TOOLS_DIR}/testfiles/tvlstr.h5.xml
+ tall.h5.xml
+ tall-2A.h5.xml
+ tarray1.h5.xml
+ tarray2.h5.xml
+ tarray3.h5.xml
+ tarray6.h5.xml
+ tarray7.h5.xml
+ tattr.h5.xml
+ tbitfields_be.h5.xml
+ tbitfields_le.h5.xml
+ tcompound_complex.h5.xml
+ tcompound.h5.xml
+ tcompound2.h5.xml
+ tdatareg.h5.xml
+ tdset.h5.xml
+ tdset2.h5.xml
+ tempty.h5.xml
+ tempty-dtd.h5.xml
+ tempty-dtd-2.h5.xml
+ tempty-dtd-uri.h5.xml
+ tempty-nons.h5.xml
+ tempty-nons-2.h5.xml
+ tempty-nons-uri.h5.xml
+ tempty-ns.h5.xml
+ tempty-ns-2.h5.xml
+ tenum.h5.xml
+ test35.nc.xml
+ textlink.h5.xml
+ tfpformat.h5.xml
+ tgroup.h5.xml
+ thlink.h5.xml
+ tloop.h5.xml
+ tloop2.h5.xml
+ tmany.h5.xml
+ tname-amp.h5.xml
+ tname-apos.h5.xml
+ tnamed_dtype_attr.h5.xml
+ tname-gt.h5.xml
+ tname-lt.h5.xml
+ tname-quot.h5.xml
+ tname-sp.h5.xml
+ tnestedcomp.h5.xml
+ tnodata.h5.xml
+ tnullspace.h5.xml
+ tobjref.h5.xml
+ topaque.h5.xml
+ torderattr1.h5.xml
+ torderattr2.h5.xml
+ torderattr3.h5.xml
+ torderattr4.h5.xml
+ tref.h5.xml
+ tref-escapes.h5.xml
+ tref-escapes-at.h5.xml
+ tsaf.h5.xml
+ tslink.h5.xml
+ tstr.h5.xml
+ tstr2.h5.xml
+ tstring.h5.xml
+ tstring-at.h5.xml
+ tudlink.h5.xml
+ tvldtypes1.h5.xml
+ tvldtypes2.h5.xml
+ tvldtypes3.h5.xml
+ tvldtypes4.h5.xml
+ tvldtypes5.h5.xml
+ tvlstr.h5.xml
)
foreach (tst_xml_h5_file ${HDF5_XML_REFERENCE_TEST_FILES})
- get_filename_component(fname "${tst_xml_h5_file}" NAME)
- HDFTEST_COPY_FILE("${tst_xml_h5_file}" "${PROJECT_BINARY_DIR}/testfiles/xml/${fname}" "h5dump_xml_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${tst_xml_h5_file}" "${PROJECT_BINARY_DIR}/testfiles/xml/${tst_xml_h5_file}" "h5dump_xml_files")
+ endforeach ()
+
+ foreach (tst_xmlonly_h5_file ${HDF5_XML_REFERENCE_ONLY_FILES})
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/xml/${tst_xmlonly_h5_file}" "${PROJECT_BINARY_DIR}/testfiles/xml/${tst_xmlonly_h5_file}" "h5dump_xml_files")
endforeach ()
foreach (tst_xml_other_file ${HDF5_XML_REFERENCE_FILES})
- get_filename_component(fname "${tst_xml_other_file}" NAME)
- HDFTEST_COPY_FILE("${tst_xml_other_file}" "${PROJECT_BINARY_DIR}/testfiles/xml/${fname}" "h5dump_xml_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/expected/xml/${tst_xml_other_file}" "${PROJECT_BINARY_DIR}/testfiles/xml/${tst_xml_other_file}" "h5dump_xml_files")
endforeach ()
add_custom_target(h5dump_xml_files ALL COMMENT "Copying files needed by h5dump_xml tests" DEPENDS ${h5dump_xml_files_list})
diff --git a/tools/test/h5dump/CMakeVFDTests.cmake b/tools/test/h5dump/CMakeVFDTests.cmake
index 7ab8c1ffa40..b303032c9ee 100644
--- a/tools/test/h5dump/CMakeVFDTests.cmake
+++ b/tools/test/h5dump/CMakeVFDTests.cmake
@@ -26,8 +26,8 @@ set (HDF5_VFD_H5DUMP_FILES
foreach (vfdtest ${VFD_LIST})
foreach (h5_tfile ${HDF5_VFD_H5DUMP_FILES})
- HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_tfile}.h5" "${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}.h5" "HDF5_VFD_H5DUMP_files")
- HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_tfile}.ddl" "${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}.ddl" "HDF5_VFD_H5DUMP_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_tfile}.h5" "${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}.h5" "HDF5_VFD_H5DUMP_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/expected/${h5_tfile}.ddl" "${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}.ddl" "HDF5_VFD_H5DUMP_files")
endforeach ()
endforeach ()
diff --git a/tools/test/h5dump/errfiles/tnofilename-with-packed-bits.err b/tools/test/h5dump/errfiles/pbits/tnofilename-with-packed-bits.err
similarity index 100%
rename from tools/test/h5dump/errfiles/tnofilename-with-packed-bits.err
rename to tools/test/h5dump/errfiles/pbits/tnofilename-with-packed-bits.err
diff --git a/tools/test/h5dump/errfiles/tpbitsCharLengthExceeded.err b/tools/test/h5dump/errfiles/pbits/tpbitsCharLengthExceeded.err
similarity index 100%
rename from tools/test/h5dump/errfiles/tpbitsCharLengthExceeded.err
rename to tools/test/h5dump/errfiles/pbits/tpbitsCharLengthExceeded.err
diff --git a/tools/test/h5dump/errfiles/tpbitsCharOffsetExceeded.err b/tools/test/h5dump/errfiles/pbits/tpbitsCharOffsetExceeded.err
similarity index 100%
rename from tools/test/h5dump/errfiles/tpbitsCharOffsetExceeded.err
rename to tools/test/h5dump/errfiles/pbits/tpbitsCharOffsetExceeded.err
diff --git a/tools/test/h5dump/errfiles/tpbitsIncomplete.err b/tools/test/h5dump/errfiles/pbits/tpbitsIncomplete.err
similarity index 100%
rename from tools/test/h5dump/errfiles/tpbitsIncomplete.err
rename to tools/test/h5dump/errfiles/pbits/tpbitsIncomplete.err
diff --git a/tools/test/h5dump/errfiles/tpbitsIntLengthExceeded.err b/tools/test/h5dump/errfiles/pbits/tpbitsIntLengthExceeded.err
similarity index 100%
rename from tools/test/h5dump/errfiles/tpbitsIntLengthExceeded.err
rename to tools/test/h5dump/errfiles/pbits/tpbitsIntLengthExceeded.err
diff --git a/tools/test/h5dump/errfiles/tpbitsIntOffsetExceeded.err b/tools/test/h5dump/errfiles/pbits/tpbitsIntOffsetExceeded.err
similarity index 100%
rename from tools/test/h5dump/errfiles/tpbitsIntOffsetExceeded.err
rename to tools/test/h5dump/errfiles/pbits/tpbitsIntOffsetExceeded.err
diff --git a/tools/test/h5dump/errfiles/tpbitsLengthExceeded.err b/tools/test/h5dump/errfiles/pbits/tpbitsLengthExceeded.err
similarity index 100%
rename from tools/test/h5dump/errfiles/tpbitsLengthExceeded.err
rename to tools/test/h5dump/errfiles/pbits/tpbitsLengthExceeded.err
diff --git a/tools/test/h5dump/errfiles/tpbitsLengthPositive.err b/tools/test/h5dump/errfiles/pbits/tpbitsLengthPositive.err
similarity index 100%
rename from tools/test/h5dump/errfiles/tpbitsLengthPositive.err
rename to tools/test/h5dump/errfiles/pbits/tpbitsLengthPositive.err
diff --git a/tools/test/h5dump/errfiles/tpbitsLongLengthExceeded.err b/tools/test/h5dump/errfiles/pbits/tpbitsLongLengthExceeded.err
similarity index 100%
rename from tools/test/h5dump/errfiles/tpbitsLongLengthExceeded.err
rename to tools/test/h5dump/errfiles/pbits/tpbitsLongLengthExceeded.err
diff --git a/tools/test/h5dump/errfiles/tpbitsLongOffsetExceeded.err b/tools/test/h5dump/errfiles/pbits/tpbitsLongOffsetExceeded.err
similarity index 100%
rename from tools/test/h5dump/errfiles/tpbitsLongOffsetExceeded.err
rename to tools/test/h5dump/errfiles/pbits/tpbitsLongOffsetExceeded.err
diff --git a/tools/test/h5dump/errfiles/tpbitsMaxExceeded.err b/tools/test/h5dump/errfiles/pbits/tpbitsMaxExceeded.err
similarity index 100%
rename from tools/test/h5dump/errfiles/tpbitsMaxExceeded.err
rename to tools/test/h5dump/errfiles/pbits/tpbitsMaxExceeded.err
diff --git a/tools/test/h5dump/errfiles/tpbitsOffsetExceeded.err b/tools/test/h5dump/errfiles/pbits/tpbitsOffsetExceeded.err
similarity index 100%
rename from tools/test/h5dump/errfiles/tpbitsOffsetExceeded.err
rename to tools/test/h5dump/errfiles/pbits/tpbitsOffsetExceeded.err
diff --git a/tools/test/h5dump/errfiles/tpbitsOffsetNegative.err b/tools/test/h5dump/errfiles/pbits/tpbitsOffsetNegative.err
similarity index 100%
rename from tools/test/h5dump/errfiles/tpbitsOffsetNegative.err
rename to tools/test/h5dump/errfiles/pbits/tpbitsOffsetNegative.err
diff --git a/tools/testfiles/charsets.ddl b/tools/test/h5dump/expected/charsets.ddl
similarity index 100%
rename from tools/testfiles/charsets.ddl
rename to tools/test/h5dump/expected/charsets.ddl
diff --git a/tools/testfiles/err_attr_dspace.ddl b/tools/test/h5dump/expected/err_attr_dspace.ddl
similarity index 100%
rename from tools/testfiles/err_attr_dspace.ddl
rename to tools/test/h5dump/expected/err_attr_dspace.ddl
diff --git a/tools/testfiles/file_space.ddl b/tools/test/h5dump/expected/file_space.ddl
similarity index 100%
rename from tools/testfiles/file_space.ddl
rename to tools/test/h5dump/expected/file_space.ddl
diff --git a/tools/testfiles/filter_fail.ddl b/tools/test/h5dump/expected/filter_fail.ddl
similarity index 100%
rename from tools/testfiles/filter_fail.ddl
rename to tools/test/h5dump/expected/filter_fail.ddl
diff --git a/tools/testfiles/h5dump-help.txt b/tools/test/h5dump/expected/h5dump-help.txt
similarity index 100%
rename from tools/testfiles/h5dump-help.txt
rename to tools/test/h5dump/expected/h5dump-help.txt
diff --git a/tools/testfiles/non_existing.ddl b/tools/test/h5dump/expected/non_existing.ddl
similarity index 100%
rename from tools/testfiles/non_existing.ddl
rename to tools/test/h5dump/expected/non_existing.ddl
diff --git a/tools/testfiles/out3.h5import b/tools/test/h5dump/expected/out3.h5import
similarity index 100%
rename from tools/testfiles/out3.h5import
rename to tools/test/h5dump/expected/out3.h5import
diff --git a/tools/testfiles/packedbits.ddl b/tools/test/h5dump/expected/packedbits.ddl
similarity index 100%
rename from tools/testfiles/packedbits.ddl
rename to tools/test/h5dump/expected/packedbits.ddl
diff --git a/tools/testfiles/pbits/tnofilename-with-packed-bits.ddl b/tools/test/h5dump/expected/pbits/tnofilename-with-packed-bits.ddl
similarity index 100%
rename from tools/testfiles/pbits/tnofilename-with-packed-bits.ddl
rename to tools/test/h5dump/expected/pbits/tnofilename-with-packed-bits.ddl
diff --git a/tools/testfiles/pbits/tpbitsArray.ddl b/tools/test/h5dump/expected/pbits/tpbitsArray.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsArray.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsArray.ddl
diff --git a/tools/testfiles/pbits/tpbitsCharLengthExceeded.ddl b/tools/test/h5dump/expected/pbits/tpbitsCharLengthExceeded.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsCharLengthExceeded.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsCharLengthExceeded.ddl
diff --git a/tools/testfiles/pbits/tpbitsCharOffsetExceeded.ddl b/tools/test/h5dump/expected/pbits/tpbitsCharOffsetExceeded.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsCharOffsetExceeded.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsCharOffsetExceeded.ddl
diff --git a/tools/testfiles/pbits/tpbitsCompound.ddl b/tools/test/h5dump/expected/pbits/tpbitsCompound.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsCompound.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsCompound.ddl
diff --git a/tools/testfiles/pbits/tpbitsIncomplete.ddl b/tools/test/h5dump/expected/pbits/tpbitsIncomplete.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsIncomplete.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsIncomplete.ddl
diff --git a/tools/testfiles/pbits/tpbitsIntLengthExceeded.ddl b/tools/test/h5dump/expected/pbits/tpbitsIntLengthExceeded.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsIntLengthExceeded.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsIntLengthExceeded.ddl
diff --git a/tools/testfiles/pbits/tpbitsIntOffsetExceeded.ddl b/tools/test/h5dump/expected/pbits/tpbitsIntOffsetExceeded.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsIntOffsetExceeded.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsIntOffsetExceeded.ddl
diff --git a/tools/testfiles/pbits/tpbitsLengthExceeded.ddl b/tools/test/h5dump/expected/pbits/tpbitsLengthExceeded.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsLengthExceeded.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsLengthExceeded.ddl
diff --git a/tools/testfiles/pbits/tpbitsLengthPositive.ddl b/tools/test/h5dump/expected/pbits/tpbitsLengthPositive.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsLengthPositive.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsLengthPositive.ddl
diff --git a/tools/testfiles/pbits/tpbitsLongLengthExceeded.ddl b/tools/test/h5dump/expected/pbits/tpbitsLongLengthExceeded.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsLongLengthExceeded.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsLongLengthExceeded.ddl
diff --git a/tools/testfiles/pbits/tpbitsLongOffsetExceeded.ddl b/tools/test/h5dump/expected/pbits/tpbitsLongOffsetExceeded.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsLongOffsetExceeded.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsLongOffsetExceeded.ddl
diff --git a/tools/testfiles/pbits/tpbitsMax.ddl b/tools/test/h5dump/expected/pbits/tpbitsMax.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsMax.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsMax.ddl
diff --git a/tools/testfiles/pbits/tpbitsMaxExceeded.ddl b/tools/test/h5dump/expected/pbits/tpbitsMaxExceeded.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsMaxExceeded.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsMaxExceeded.ddl
diff --git a/tools/testfiles/pbits/tpbitsOffsetExceeded.ddl b/tools/test/h5dump/expected/pbits/tpbitsOffsetExceeded.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsOffsetExceeded.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsOffsetExceeded.ddl
diff --git a/tools/testfiles/pbits/tpbitsOffsetNegative.ddl b/tools/test/h5dump/expected/pbits/tpbitsOffsetNegative.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsOffsetNegative.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsOffsetNegative.ddl
diff --git a/tools/testfiles/pbits/tpbitsOverlapped.ddl b/tools/test/h5dump/expected/pbits/tpbitsOverlapped.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsOverlapped.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsOverlapped.ddl
diff --git a/tools/testfiles/pbits/tpbitsSigned.ddl b/tools/test/h5dump/expected/pbits/tpbitsSigned.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsSigned.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsSigned.ddl
diff --git a/tools/testfiles/pbits/tpbitsSigned2.ddl b/tools/test/h5dump/expected/pbits/tpbitsSigned2.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsSigned2.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsSigned2.ddl
diff --git a/tools/testfiles/pbits/tpbitsSigned4.ddl b/tools/test/h5dump/expected/pbits/tpbitsSigned4.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsSigned4.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsSigned4.ddl
diff --git a/tools/testfiles/pbits/tpbitsSignedInt.ddl b/tools/test/h5dump/expected/pbits/tpbitsSignedInt.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsSignedInt.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsSignedInt.ddl
diff --git a/tools/testfiles/pbits/tpbitsSignedInt4.ddl b/tools/test/h5dump/expected/pbits/tpbitsSignedInt4.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsSignedInt4.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsSignedInt4.ddl
diff --git a/tools/testfiles/pbits/tpbitsSignedInt8.ddl b/tools/test/h5dump/expected/pbits/tpbitsSignedInt8.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsSignedInt8.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsSignedInt8.ddl
diff --git a/tools/testfiles/pbits/tpbitsSignedIntWhole.ddl b/tools/test/h5dump/expected/pbits/tpbitsSignedIntWhole.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsSignedIntWhole.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsSignedIntWhole.ddl
diff --git a/tools/testfiles/pbits/tpbitsSignedLong.ddl b/tools/test/h5dump/expected/pbits/tpbitsSignedLong.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsSignedLong.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsSignedLong.ddl
diff --git a/tools/testfiles/pbits/tpbitsSignedLong16.ddl b/tools/test/h5dump/expected/pbits/tpbitsSignedLong16.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsSignedLong16.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsSignedLong16.ddl
diff --git a/tools/testfiles/pbits/tpbitsSignedLong8.ddl b/tools/test/h5dump/expected/pbits/tpbitsSignedLong8.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsSignedLong8.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsSignedLong8.ddl
diff --git a/tools/testfiles/pbits/tpbitsSignedLongLong.ddl b/tools/test/h5dump/expected/pbits/tpbitsSignedLongLong.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsSignedLongLong.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsSignedLongLong.ddl
diff --git a/tools/testfiles/pbits/tpbitsSignedLongLong16.ddl b/tools/test/h5dump/expected/pbits/tpbitsSignedLongLong16.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsSignedLongLong16.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsSignedLongLong16.ddl
diff --git a/tools/testfiles/pbits/tpbitsSignedLongLong32.ddl b/tools/test/h5dump/expected/pbits/tpbitsSignedLongLong32.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsSignedLongLong32.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsSignedLongLong32.ddl
diff --git a/tools/testfiles/pbits/tpbitsSignedLongLongWhole.ddl b/tools/test/h5dump/expected/pbits/tpbitsSignedLongLongWhole.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsSignedLongLongWhole.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsSignedLongLongWhole.ddl
diff --git a/tools/testfiles/pbits/tpbitsSignedLongLongWhole1.ddl b/tools/test/h5dump/expected/pbits/tpbitsSignedLongLongWhole1.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsSignedLongLongWhole1.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsSignedLongLongWhole1.ddl
diff --git a/tools/testfiles/pbits/tpbitsSignedLongLongWhole63.ddl b/tools/test/h5dump/expected/pbits/tpbitsSignedLongLongWhole63.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsSignedLongLongWhole63.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsSignedLongLongWhole63.ddl
diff --git a/tools/testfiles/pbits/tpbitsSignedLongWhole.ddl b/tools/test/h5dump/expected/pbits/tpbitsSignedLongWhole.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsSignedLongWhole.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsSignedLongWhole.ddl
diff --git a/tools/testfiles/pbits/tpbitsSignedWhole.ddl b/tools/test/h5dump/expected/pbits/tpbitsSignedWhole.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsSignedWhole.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsSignedWhole.ddl
diff --git a/tools/testfiles/pbits/tpbitsUnsigned.ddl b/tools/test/h5dump/expected/pbits/tpbitsUnsigned.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsUnsigned.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsUnsigned.ddl
diff --git a/tools/testfiles/pbits/tpbitsUnsigned2.ddl b/tools/test/h5dump/expected/pbits/tpbitsUnsigned2.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsUnsigned2.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsUnsigned2.ddl
diff --git a/tools/testfiles/pbits/tpbitsUnsigned4.ddl b/tools/test/h5dump/expected/pbits/tpbitsUnsigned4.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsUnsigned4.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsUnsigned4.ddl
diff --git a/tools/testfiles/pbits/tpbitsUnsignedInt.ddl b/tools/test/h5dump/expected/pbits/tpbitsUnsignedInt.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsUnsignedInt.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsUnsignedInt.ddl
diff --git a/tools/testfiles/pbits/tpbitsUnsignedInt4.ddl b/tools/test/h5dump/expected/pbits/tpbitsUnsignedInt4.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsUnsignedInt4.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsUnsignedInt4.ddl
diff --git a/tools/testfiles/pbits/tpbitsUnsignedInt8.ddl b/tools/test/h5dump/expected/pbits/tpbitsUnsignedInt8.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsUnsignedInt8.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsUnsignedInt8.ddl
diff --git a/tools/testfiles/pbits/tpbitsUnsignedIntWhole.ddl b/tools/test/h5dump/expected/pbits/tpbitsUnsignedIntWhole.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsUnsignedIntWhole.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsUnsignedIntWhole.ddl
diff --git a/tools/testfiles/pbits/tpbitsUnsignedLong.ddl b/tools/test/h5dump/expected/pbits/tpbitsUnsignedLong.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsUnsignedLong.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsUnsignedLong.ddl
diff --git a/tools/testfiles/pbits/tpbitsUnsignedLong16.ddl b/tools/test/h5dump/expected/pbits/tpbitsUnsignedLong16.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsUnsignedLong16.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsUnsignedLong16.ddl
diff --git a/tools/testfiles/pbits/tpbitsUnsignedLong8.ddl b/tools/test/h5dump/expected/pbits/tpbitsUnsignedLong8.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsUnsignedLong8.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsUnsignedLong8.ddl
diff --git a/tools/testfiles/pbits/tpbitsUnsignedLongLong.ddl b/tools/test/h5dump/expected/pbits/tpbitsUnsignedLongLong.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsUnsignedLongLong.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsUnsignedLongLong.ddl
diff --git a/tools/testfiles/pbits/tpbitsUnsignedLongLong16.ddl b/tools/test/h5dump/expected/pbits/tpbitsUnsignedLongLong16.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsUnsignedLongLong16.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsUnsignedLongLong16.ddl
diff --git a/tools/testfiles/pbits/tpbitsUnsignedLongLong32.ddl b/tools/test/h5dump/expected/pbits/tpbitsUnsignedLongLong32.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsUnsignedLongLong32.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsUnsignedLongLong32.ddl
diff --git a/tools/testfiles/pbits/tpbitsUnsignedLongLongWhole.ddl b/tools/test/h5dump/expected/pbits/tpbitsUnsignedLongLongWhole.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsUnsignedLongLongWhole.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsUnsignedLongLongWhole.ddl
diff --git a/tools/testfiles/pbits/tpbitsUnsignedLongLongWhole1.ddl b/tools/test/h5dump/expected/pbits/tpbitsUnsignedLongLongWhole1.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsUnsignedLongLongWhole1.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsUnsignedLongLongWhole1.ddl
diff --git a/tools/testfiles/pbits/tpbitsUnsignedLongLongWhole63.ddl b/tools/test/h5dump/expected/pbits/tpbitsUnsignedLongLongWhole63.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsUnsignedLongLongWhole63.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsUnsignedLongLongWhole63.ddl
diff --git a/tools/testfiles/pbits/tpbitsUnsignedLongWhole.ddl b/tools/test/h5dump/expected/pbits/tpbitsUnsignedLongWhole.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsUnsignedLongWhole.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsUnsignedLongWhole.ddl
diff --git a/tools/testfiles/pbits/tpbitsUnsignedWhole.ddl b/tools/test/h5dump/expected/pbits/tpbitsUnsignedWhole.ddl
similarity index 100%
rename from tools/testfiles/pbits/tpbitsUnsignedWhole.ddl
rename to tools/test/h5dump/expected/pbits/tpbitsUnsignedWhole.ddl
diff --git a/tools/testfiles/tall-1.ddl b/tools/test/h5dump/expected/tall-1.ddl
similarity index 100%
rename from tools/testfiles/tall-1.ddl
rename to tools/test/h5dump/expected/tall-1.ddl
diff --git a/tools/testfiles/tall-2.ddl b/tools/test/h5dump/expected/tall-2.ddl
similarity index 100%
rename from tools/testfiles/tall-2.ddl
rename to tools/test/h5dump/expected/tall-2.ddl
diff --git a/tools/testfiles/tall-2A.ddl b/tools/test/h5dump/expected/tall-2A.ddl
similarity index 100%
rename from tools/testfiles/tall-2A.ddl
rename to tools/test/h5dump/expected/tall-2A.ddl
diff --git a/tools/testfiles/tall-2A0.ddl b/tools/test/h5dump/expected/tall-2A0.ddl
similarity index 100%
rename from tools/testfiles/tall-2A0.ddl
rename to tools/test/h5dump/expected/tall-2A0.ddl
diff --git a/tools/testfiles/tall-2B.ddl b/tools/test/h5dump/expected/tall-2B.ddl
similarity index 100%
rename from tools/testfiles/tall-2B.ddl
rename to tools/test/h5dump/expected/tall-2B.ddl
diff --git a/tools/testfiles/tall-3.ddl b/tools/test/h5dump/expected/tall-3.ddl
similarity index 100%
rename from tools/testfiles/tall-3.ddl
rename to tools/test/h5dump/expected/tall-3.ddl
diff --git a/tools/testfiles/tall-4s.ddl b/tools/test/h5dump/expected/tall-4s.ddl
similarity index 100%
rename from tools/testfiles/tall-4s.ddl
rename to tools/test/h5dump/expected/tall-4s.ddl
diff --git a/tools/testfiles/tall-5s.ddl b/tools/test/h5dump/expected/tall-5s.ddl
similarity index 100%
rename from tools/testfiles/tall-5s.ddl
rename to tools/test/h5dump/expected/tall-5s.ddl
diff --git a/tools/testfiles/tall-6.ddl b/tools/test/h5dump/expected/tall-6.ddl
similarity index 100%
rename from tools/testfiles/tall-6.ddl
rename to tools/test/h5dump/expected/tall-6.ddl
diff --git a/tools/testfiles/tall-7.ddl b/tools/test/h5dump/expected/tall-7.ddl
similarity index 100%
rename from tools/testfiles/tall-7.ddl
rename to tools/test/h5dump/expected/tall-7.ddl
diff --git a/tools/testfiles/tall-7N.ddl b/tools/test/h5dump/expected/tall-7N.ddl
similarity index 100%
rename from tools/testfiles/tall-7N.ddl
rename to tools/test/h5dump/expected/tall-7N.ddl
diff --git a/tools/testfiles/tallfilters.ddl b/tools/test/h5dump/expected/tallfilters.ddl
similarity index 100%
rename from tools/testfiles/tallfilters.ddl
rename to tools/test/h5dump/expected/tallfilters.ddl
diff --git a/tools/testfiles/tarray1.ddl b/tools/test/h5dump/expected/tarray1.ddl
similarity index 100%
rename from tools/testfiles/tarray1.ddl
rename to tools/test/h5dump/expected/tarray1.ddl
diff --git a/tools/testfiles/tarray1_big.ddl b/tools/test/h5dump/expected/tarray1_big.ddl
similarity index 100%
rename from tools/testfiles/tarray1_big.ddl
rename to tools/test/h5dump/expected/tarray1_big.ddl
diff --git a/tools/testfiles/tarray2.ddl b/tools/test/h5dump/expected/tarray2.ddl
similarity index 100%
rename from tools/testfiles/tarray2.ddl
rename to tools/test/h5dump/expected/tarray2.ddl
diff --git a/tools/testfiles/tarray3.ddl b/tools/test/h5dump/expected/tarray3.ddl
similarity index 100%
rename from tools/testfiles/tarray3.ddl
rename to tools/test/h5dump/expected/tarray3.ddl
diff --git a/tools/testfiles/tarray4.ddl b/tools/test/h5dump/expected/tarray4.ddl
similarity index 100%
rename from tools/testfiles/tarray4.ddl
rename to tools/test/h5dump/expected/tarray4.ddl
diff --git a/tools/testfiles/tarray5.ddl b/tools/test/h5dump/expected/tarray5.ddl
similarity index 100%
rename from tools/testfiles/tarray5.ddl
rename to tools/test/h5dump/expected/tarray5.ddl
diff --git a/tools/testfiles/tarray6.ddl b/tools/test/h5dump/expected/tarray6.ddl
similarity index 100%
rename from tools/testfiles/tarray6.ddl
rename to tools/test/h5dump/expected/tarray6.ddl
diff --git a/tools/testfiles/tarray7.ddl b/tools/test/h5dump/expected/tarray7.ddl
similarity index 100%
rename from tools/testfiles/tarray7.ddl
rename to tools/test/h5dump/expected/tarray7.ddl
diff --git a/tools/testfiles/tarray8.ddl b/tools/test/h5dump/expected/tarray8.ddl
similarity index 100%
rename from tools/testfiles/tarray8.ddl
rename to tools/test/h5dump/expected/tarray8.ddl
diff --git a/tools/testfiles/tattr-1.ddl b/tools/test/h5dump/expected/tattr-1.ddl
similarity index 100%
rename from tools/testfiles/tattr-1.ddl
rename to tools/test/h5dump/expected/tattr-1.ddl
diff --git a/tools/testfiles/tattr-2.ddl b/tools/test/h5dump/expected/tattr-2.ddl
similarity index 100%
rename from tools/testfiles/tattr-2.ddl
rename to tools/test/h5dump/expected/tattr-2.ddl
diff --git a/tools/testfiles/tattr-3.ddl b/tools/test/h5dump/expected/tattr-3.ddl
similarity index 100%
rename from tools/testfiles/tattr-3.ddl
rename to tools/test/h5dump/expected/tattr-3.ddl
diff --git a/tools/testfiles/tattr-4_be.ddl b/tools/test/h5dump/expected/tattr-4_be.ddl
similarity index 100%
rename from tools/testfiles/tattr-4_be.ddl
rename to tools/test/h5dump/expected/tattr-4_be.ddl
diff --git a/tools/testfiles/tattrcontents1.ddl b/tools/test/h5dump/expected/tattrcontents1.ddl
similarity index 100%
rename from tools/testfiles/tattrcontents1.ddl
rename to tools/test/h5dump/expected/tattrcontents1.ddl
diff --git a/tools/testfiles/tattrcontents2.ddl b/tools/test/h5dump/expected/tattrcontents2.ddl
similarity index 100%
rename from tools/testfiles/tattrcontents2.ddl
rename to tools/test/h5dump/expected/tattrcontents2.ddl
diff --git a/tools/testfiles/tattrintsize.ddl b/tools/test/h5dump/expected/tattrintsize.ddl
similarity index 100%
rename from tools/testfiles/tattrintsize.ddl
rename to tools/test/h5dump/expected/tattrintsize.ddl
diff --git a/tools/testfiles/tattrreg.ddl b/tools/test/h5dump/expected/tattrreg.ddl
similarity index 100%
rename from tools/testfiles/tattrreg.ddl
rename to tools/test/h5dump/expected/tattrreg.ddl
diff --git a/tools/testfiles/tattrregR.ddl b/tools/test/h5dump/expected/tattrregR.ddl
similarity index 100%
rename from tools/testfiles/tattrregR.ddl
rename to tools/test/h5dump/expected/tattrregR.ddl
diff --git a/tools/testfiles/tbigdims.ddl b/tools/test/h5dump/expected/tbigdims.ddl
similarity index 100%
rename from tools/testfiles/tbigdims.ddl
rename to tools/test/h5dump/expected/tbigdims.ddl
diff --git a/tools/testfiles/tbin1.ddl b/tools/test/h5dump/expected/tbin1.ddl
similarity index 100%
rename from tools/testfiles/tbin1.ddl
rename to tools/test/h5dump/expected/tbin1.ddl
diff --git a/tools/testfiles/tbin2.ddl b/tools/test/h5dump/expected/tbin2.ddl
similarity index 100%
rename from tools/testfiles/tbin2.ddl
rename to tools/test/h5dump/expected/tbin2.ddl
diff --git a/tools/testfiles/tbin3.ddl b/tools/test/h5dump/expected/tbin3.ddl
similarity index 100%
rename from tools/testfiles/tbin3.ddl
rename to tools/test/h5dump/expected/tbin3.ddl
diff --git a/tools/testfiles/tbin4.ddl b/tools/test/h5dump/expected/tbin4.ddl
similarity index 100%
rename from tools/testfiles/tbin4.ddl
rename to tools/test/h5dump/expected/tbin4.ddl
diff --git a/tools/testfiles/tbinregR.ddl b/tools/test/h5dump/expected/tbinregR.ddl
similarity index 100%
rename from tools/testfiles/tbinregR.ddl
rename to tools/test/h5dump/expected/tbinregR.ddl
diff --git a/tools/testfiles/tbitnopaque_be.ddl b/tools/test/h5dump/expected/tbitnopaque_be.ddl
similarity index 100%
rename from tools/testfiles/tbitnopaque_be.ddl
rename to tools/test/h5dump/expected/tbitnopaque_be.ddl
diff --git a/tools/testfiles/tbitnopaque_le.ddl b/tools/test/h5dump/expected/tbitnopaque_le.ddl
similarity index 100%
rename from tools/testfiles/tbitnopaque_le.ddl
rename to tools/test/h5dump/expected/tbitnopaque_le.ddl
diff --git a/tools/testfiles/tboot1.ddl b/tools/test/h5dump/expected/tboot1.ddl
similarity index 100%
rename from tools/testfiles/tboot1.ddl
rename to tools/test/h5dump/expected/tboot1.ddl
diff --git a/tools/testfiles/tboot2.ddl b/tools/test/h5dump/expected/tboot2.ddl
similarity index 100%
rename from tools/testfiles/tboot2.ddl
rename to tools/test/h5dump/expected/tboot2.ddl
diff --git a/tools/testfiles/tboot2A.ddl b/tools/test/h5dump/expected/tboot2A.ddl
similarity index 100%
rename from tools/testfiles/tboot2A.ddl
rename to tools/test/h5dump/expected/tboot2A.ddl
diff --git a/tools/testfiles/tboot2B.ddl b/tools/test/h5dump/expected/tboot2B.ddl
similarity index 100%
rename from tools/testfiles/tboot2B.ddl
rename to tools/test/h5dump/expected/tboot2B.ddl
diff --git a/tools/testfiles/tchar1.ddl b/tools/test/h5dump/expected/tchar1.ddl
similarity index 100%
rename from tools/testfiles/tchar1.ddl
rename to tools/test/h5dump/expected/tchar1.ddl
diff --git a/tools/testfiles/tchunked.ddl b/tools/test/h5dump/expected/tchunked.ddl
similarity index 100%
rename from tools/testfiles/tchunked.ddl
rename to tools/test/h5dump/expected/tchunked.ddl
diff --git a/tools/testfiles/tcmpdattrintsize.ddl b/tools/test/h5dump/expected/tcmpdattrintsize.ddl
similarity index 100%
rename from tools/testfiles/tcmpdattrintsize.ddl
rename to tools/test/h5dump/expected/tcmpdattrintsize.ddl
diff --git a/tools/testfiles/tcmpdintarray.ddl b/tools/test/h5dump/expected/tcmpdintarray.ddl
similarity index 100%
rename from tools/testfiles/tcmpdintarray.ddl
rename to tools/test/h5dump/expected/tcmpdintarray.ddl
diff --git a/tools/testfiles/tcmpdints.ddl b/tools/test/h5dump/expected/tcmpdints.ddl
similarity index 100%
rename from tools/testfiles/tcmpdints.ddl
rename to tools/test/h5dump/expected/tcmpdints.ddl
diff --git a/tools/testfiles/tcmpdintsize.ddl b/tools/test/h5dump/expected/tcmpdintsize.ddl
similarity index 100%
rename from tools/testfiles/tcmpdintsize.ddl
rename to tools/test/h5dump/expected/tcmpdintsize.ddl
diff --git a/tools/testfiles/tcomp-1.ddl b/tools/test/h5dump/expected/tcomp-1.ddl
similarity index 100%
rename from tools/testfiles/tcomp-1.ddl
rename to tools/test/h5dump/expected/tcomp-1.ddl
diff --git a/tools/testfiles/tcomp-2.ddl b/tools/test/h5dump/expected/tcomp-2.ddl
similarity index 100%
rename from tools/testfiles/tcomp-2.ddl
rename to tools/test/h5dump/expected/tcomp-2.ddl
diff --git a/tools/testfiles/tcomp-3.ddl b/tools/test/h5dump/expected/tcomp-3.ddl
similarity index 100%
rename from tools/testfiles/tcomp-3.ddl
rename to tools/test/h5dump/expected/tcomp-3.ddl
diff --git a/tools/testfiles/tcomp-4.ddl b/tools/test/h5dump/expected/tcomp-4.ddl
similarity index 100%
rename from tools/testfiles/tcomp-4.ddl
rename to tools/test/h5dump/expected/tcomp-4.ddl
diff --git a/tools/testfiles/tcompact.ddl b/tools/test/h5dump/expected/tcompact.ddl
similarity index 100%
rename from tools/testfiles/tcompact.ddl
rename to tools/test/h5dump/expected/tcompact.ddl
diff --git a/tools/testfiles/tcompound_complex2.ddl b/tools/test/h5dump/expected/tcompound_complex2.ddl
similarity index 100%
rename from tools/testfiles/tcompound_complex2.ddl
rename to tools/test/h5dump/expected/tcompound_complex2.ddl
diff --git a/tools/testfiles/tcontents.ddl b/tools/test/h5dump/expected/tcontents.ddl
similarity index 100%
rename from tools/testfiles/tcontents.ddl
rename to tools/test/h5dump/expected/tcontents.ddl
diff --git a/tools/testfiles/tcontiguos.ddl b/tools/test/h5dump/expected/tcontiguos.ddl
similarity index 100%
rename from tools/testfiles/tcontiguos.ddl
rename to tools/test/h5dump/expected/tcontiguos.ddl
diff --git a/tools/testfiles/tdatareg.ddl b/tools/test/h5dump/expected/tdatareg.ddl
similarity index 100%
rename from tools/testfiles/tdatareg.ddl
rename to tools/test/h5dump/expected/tdatareg.ddl
diff --git a/tools/testfiles/tdataregR.ddl b/tools/test/h5dump/expected/tdataregR.ddl
similarity index 100%
rename from tools/testfiles/tdataregR.ddl
rename to tools/test/h5dump/expected/tdataregR.ddl
diff --git a/tools/testfiles/tdeflate.ddl b/tools/test/h5dump/expected/tdeflate.ddl
similarity index 100%
rename from tools/testfiles/tdeflate.ddl
rename to tools/test/h5dump/expected/tdeflate.ddl
diff --git a/tools/testfiles/tdset-1.ddl b/tools/test/h5dump/expected/tdset-1.ddl
similarity index 100%
rename from tools/testfiles/tdset-1.ddl
rename to tools/test/h5dump/expected/tdset-1.ddl
diff --git a/tools/testfiles/tdset-2.ddl b/tools/test/h5dump/expected/tdset-2.ddl
similarity index 100%
rename from tools/testfiles/tdset-2.ddl
rename to tools/test/h5dump/expected/tdset-2.ddl
diff --git a/tools/testfiles/tdset-3s.ddl b/tools/test/h5dump/expected/tdset-3s.ddl
similarity index 100%
rename from tools/testfiles/tdset-3s.ddl
rename to tools/test/h5dump/expected/tdset-3s.ddl
diff --git a/tools/testfiles/tempty.ddl b/tools/test/h5dump/expected/tempty.ddl
similarity index 100%
rename from tools/testfiles/tempty.ddl
rename to tools/test/h5dump/expected/tempty.ddl
diff --git a/tools/testfiles/texceedsubblock.ddl b/tools/test/h5dump/expected/texceedsubblock.ddl
similarity index 100%
rename from tools/testfiles/texceedsubblock.ddl
rename to tools/test/h5dump/expected/texceedsubblock.ddl
diff --git a/tools/testfiles/texceedsubcount.ddl b/tools/test/h5dump/expected/texceedsubcount.ddl
similarity index 100%
rename from tools/testfiles/texceedsubcount.ddl
rename to tools/test/h5dump/expected/texceedsubcount.ddl
diff --git a/tools/testfiles/texceedsubstart.ddl b/tools/test/h5dump/expected/texceedsubstart.ddl
similarity index 100%
rename from tools/testfiles/texceedsubstart.ddl
rename to tools/test/h5dump/expected/texceedsubstart.ddl
diff --git a/tools/testfiles/texceedsubstride.ddl b/tools/test/h5dump/expected/texceedsubstride.ddl
similarity index 100%
rename from tools/testfiles/texceedsubstride.ddl
rename to tools/test/h5dump/expected/texceedsubstride.ddl
diff --git a/tools/testfiles/texternal.ddl b/tools/test/h5dump/expected/texternal.ddl
similarity index 100%
rename from tools/testfiles/texternal.ddl
rename to tools/test/h5dump/expected/texternal.ddl
diff --git a/tools/testfiles/textlink.ddl b/tools/test/h5dump/expected/textlink.ddl
similarity index 100%
rename from tools/testfiles/textlink.ddl
rename to tools/test/h5dump/expected/textlink.ddl
diff --git a/tools/testfiles/textlinkfar.ddl b/tools/test/h5dump/expected/textlinkfar.ddl
similarity index 100%
rename from tools/testfiles/textlinkfar.ddl
rename to tools/test/h5dump/expected/textlinkfar.ddl
diff --git a/tools/testfiles/textlinksrc.ddl b/tools/test/h5dump/expected/textlinksrc.ddl
similarity index 100%
rename from tools/testfiles/textlinksrc.ddl
rename to tools/test/h5dump/expected/textlinksrc.ddl
diff --git a/tools/testfiles/tfamily.ddl b/tools/test/h5dump/expected/tfamily.ddl
similarity index 100%
rename from tools/testfiles/tfamily.ddl
rename to tools/test/h5dump/expected/tfamily.ddl
diff --git a/tools/testfiles/tfill.ddl b/tools/test/h5dump/expected/tfill.ddl
similarity index 100%
rename from tools/testfiles/tfill.ddl
rename to tools/test/h5dump/expected/tfill.ddl
diff --git a/tools/testfiles/tfletcher32.ddl b/tools/test/h5dump/expected/tfletcher32.ddl
similarity index 100%
rename from tools/testfiles/tfletcher32.ddl
rename to tools/test/h5dump/expected/tfletcher32.ddl
diff --git a/tools/testfiles/tfloatsattrs.ddl b/tools/test/h5dump/expected/tfloatsattrs.ddl
similarity index 100%
rename from tools/testfiles/tfloatsattrs.ddl
rename to tools/test/h5dump/expected/tfloatsattrs.ddl
diff --git a/tools/testfiles/tfloatsattrs.wddl b/tools/test/h5dump/expected/tfloatsattrs.wddl
similarity index 100%
rename from tools/testfiles/tfloatsattrs.wddl
rename to tools/test/h5dump/expected/tfloatsattrs.wddl
diff --git a/tools/testfiles/tfpformat.ddl b/tools/test/h5dump/expected/tfpformat.ddl
similarity index 100%
rename from tools/testfiles/tfpformat.ddl
rename to tools/test/h5dump/expected/tfpformat.ddl
diff --git a/tools/testfiles/tgroup-1.ddl b/tools/test/h5dump/expected/tgroup-1.ddl
similarity index 100%
rename from tools/testfiles/tgroup-1.ddl
rename to tools/test/h5dump/expected/tgroup-1.ddl
diff --git a/tools/testfiles/tgroup-2.ddl b/tools/test/h5dump/expected/tgroup-2.ddl
similarity index 100%
rename from tools/testfiles/tgroup-2.ddl
rename to tools/test/h5dump/expected/tgroup-2.ddl
diff --git a/tools/testfiles/tgrp_comments.ddl b/tools/test/h5dump/expected/tgrp_comments.ddl
similarity index 100%
rename from tools/testfiles/tgrp_comments.ddl
rename to tools/test/h5dump/expected/tgrp_comments.ddl
diff --git a/tools/testfiles/tgrpnullspace.ddl b/tools/test/h5dump/expected/tgrpnullspace.ddl
similarity index 100%
rename from tools/testfiles/tgrpnullspace.ddl
rename to tools/test/h5dump/expected/tgrpnullspace.ddl
diff --git a/tools/testfiles/thlink-1.ddl b/tools/test/h5dump/expected/thlink-1.ddl
similarity index 100%
rename from tools/testfiles/thlink-1.ddl
rename to tools/test/h5dump/expected/thlink-1.ddl
diff --git a/tools/testfiles/thlink-2.ddl b/tools/test/h5dump/expected/thlink-2.ddl
similarity index 100%
rename from tools/testfiles/thlink-2.ddl
rename to tools/test/h5dump/expected/thlink-2.ddl
diff --git a/tools/testfiles/thlink-3.ddl b/tools/test/h5dump/expected/thlink-3.ddl
similarity index 100%
rename from tools/testfiles/thlink-3.ddl
rename to tools/test/h5dump/expected/thlink-3.ddl
diff --git a/tools/testfiles/thlink-4.ddl b/tools/test/h5dump/expected/thlink-4.ddl
similarity index 100%
rename from tools/testfiles/thlink-4.ddl
rename to tools/test/h5dump/expected/thlink-4.ddl
diff --git a/tools/testfiles/thlink-5.ddl b/tools/test/h5dump/expected/thlink-5.ddl
similarity index 100%
rename from tools/testfiles/thlink-5.ddl
rename to tools/test/h5dump/expected/thlink-5.ddl
diff --git a/tools/testfiles/thyperslab.ddl b/tools/test/h5dump/expected/thyperslab.ddl
similarity index 100%
rename from tools/testfiles/thyperslab.ddl
rename to tools/test/h5dump/expected/thyperslab.ddl
diff --git a/tools/testfiles/tindicesno.ddl b/tools/test/h5dump/expected/tindicesno.ddl
similarity index 100%
rename from tools/testfiles/tindicesno.ddl
rename to tools/test/h5dump/expected/tindicesno.ddl
diff --git a/tools/testfiles/tindicessub1.ddl b/tools/test/h5dump/expected/tindicessub1.ddl
similarity index 100%
rename from tools/testfiles/tindicessub1.ddl
rename to tools/test/h5dump/expected/tindicessub1.ddl
diff --git a/tools/testfiles/tindicessub2.ddl b/tools/test/h5dump/expected/tindicessub2.ddl
similarity index 100%
rename from tools/testfiles/tindicessub2.ddl
rename to tools/test/h5dump/expected/tindicessub2.ddl
diff --git a/tools/testfiles/tindicessub3.ddl b/tools/test/h5dump/expected/tindicessub3.ddl
similarity index 100%
rename from tools/testfiles/tindicessub3.ddl
rename to tools/test/h5dump/expected/tindicessub3.ddl
diff --git a/tools/testfiles/tindicessub4.ddl b/tools/test/h5dump/expected/tindicessub4.ddl
similarity index 100%
rename from tools/testfiles/tindicessub4.ddl
rename to tools/test/h5dump/expected/tindicessub4.ddl
diff --git a/tools/testfiles/tindicesyes.ddl b/tools/test/h5dump/expected/tindicesyes.ddl
similarity index 100%
rename from tools/testfiles/tindicesyes.ddl
rename to tools/test/h5dump/expected/tindicesyes.ddl
diff --git a/tools/testfiles/tints4dims.ddl b/tools/test/h5dump/expected/tints4dims.ddl
similarity index 100%
rename from tools/testfiles/tints4dims.ddl
rename to tools/test/h5dump/expected/tints4dims.ddl
diff --git a/tools/testfiles/tints4dimsBlock2.ddl b/tools/test/h5dump/expected/tints4dimsBlock2.ddl
similarity index 100%
rename from tools/testfiles/tints4dimsBlock2.ddl
rename to tools/test/h5dump/expected/tints4dimsBlock2.ddl
diff --git a/tools/testfiles/tints4dimsBlockEq.ddl b/tools/test/h5dump/expected/tints4dimsBlockEq.ddl
similarity index 100%
rename from tools/testfiles/tints4dimsBlockEq.ddl
rename to tools/test/h5dump/expected/tints4dimsBlockEq.ddl
diff --git a/tools/testfiles/tints4dimsCount2.ddl b/tools/test/h5dump/expected/tints4dimsCount2.ddl
similarity index 100%
rename from tools/testfiles/tints4dimsCount2.ddl
rename to tools/test/h5dump/expected/tints4dimsCount2.ddl
diff --git a/tools/testfiles/tints4dimsCountEq.ddl b/tools/test/h5dump/expected/tints4dimsCountEq.ddl
similarity index 100%
rename from tools/testfiles/tints4dimsCountEq.ddl
rename to tools/test/h5dump/expected/tints4dimsCountEq.ddl
diff --git a/tools/testfiles/tints4dimsStride2.ddl b/tools/test/h5dump/expected/tints4dimsStride2.ddl
similarity index 100%
rename from tools/testfiles/tints4dimsStride2.ddl
rename to tools/test/h5dump/expected/tints4dimsStride2.ddl
diff --git a/tools/testfiles/tintsattrs.ddl b/tools/test/h5dump/expected/tintsattrs.ddl
similarity index 100%
rename from tools/testfiles/tintsattrs.ddl
rename to tools/test/h5dump/expected/tintsattrs.ddl
diff --git a/tools/testfiles/tintsnodata.ddl b/tools/test/h5dump/expected/tintsnodata.ddl
similarity index 100%
rename from tools/testfiles/tintsnodata.ddl
rename to tools/test/h5dump/expected/tintsnodata.ddl
diff --git a/tools/testfiles/tlarge_objname.ddl b/tools/test/h5dump/expected/tlarge_objname.ddl
similarity index 100%
rename from tools/testfiles/tlarge_objname.ddl
rename to tools/test/h5dump/expected/tlarge_objname.ddl
diff --git a/tools/testfiles/tldouble.ddl b/tools/test/h5dump/expected/tldouble.ddl
similarity index 100%
rename from tools/testfiles/tldouble.ddl
rename to tools/test/h5dump/expected/tldouble.ddl
diff --git a/tools/testfiles/tldouble_scalar.ddl b/tools/test/h5dump/expected/tldouble_scalar.ddl
similarity index 100%
rename from tools/testfiles/tldouble_scalar.ddl
rename to tools/test/h5dump/expected/tldouble_scalar.ddl
diff --git a/tools/testfiles/tlonglinks.ddl b/tools/test/h5dump/expected/tlonglinks.ddl
similarity index 100%
rename from tools/testfiles/tlonglinks.ddl
rename to tools/test/h5dump/expected/tlonglinks.ddl
diff --git a/tools/testfiles/tloop-1.ddl b/tools/test/h5dump/expected/tloop-1.ddl
similarity index 100%
rename from tools/testfiles/tloop-1.ddl
rename to tools/test/h5dump/expected/tloop-1.ddl
diff --git a/tools/testfiles/tmulti.ddl b/tools/test/h5dump/expected/tmulti.ddl
similarity index 100%
rename from tools/testfiles/tmulti.ddl
rename to tools/test/h5dump/expected/tmulti.ddl
diff --git a/tools/testfiles/tmultifile.ddl b/tools/test/h5dump/expected/tmultifile.ddl
similarity index 100%
rename from tools/testfiles/tmultifile.ddl
rename to tools/test/h5dump/expected/tmultifile.ddl
diff --git a/tools/testfiles/tnamed_dtype_attr.ddl b/tools/test/h5dump/expected/tnamed_dtype_attr.ddl
similarity index 100%
rename from tools/testfiles/tnamed_dtype_attr.ddl
rename to tools/test/h5dump/expected/tnamed_dtype_attr.ddl
diff --git a/tools/testfiles/tnbit.ddl b/tools/test/h5dump/expected/tnbit.ddl
similarity index 100%
rename from tools/testfiles/tnbit.ddl
rename to tools/test/h5dump/expected/tnbit.ddl
diff --git a/tools/testfiles/tnestcomp-1.ddl b/tools/test/h5dump/expected/tnestcomp-1.ddl
similarity index 100%
rename from tools/testfiles/tnestcomp-1.ddl
rename to tools/test/h5dump/expected/tnestcomp-1.ddl
diff --git a/tools/testfiles/tnestedcmpddt.ddl b/tools/test/h5dump/expected/tnestedcmpddt.ddl
similarity index 100%
rename from tools/testfiles/tnestedcmpddt.ddl
rename to tools/test/h5dump/expected/tnestedcmpddt.ddl
diff --git a/tools/testfiles/tno-subset.ddl b/tools/test/h5dump/expected/tno-subset.ddl
similarity index 100%
rename from tools/testfiles/tno-subset.ddl
rename to tools/test/h5dump/expected/tno-subset.ddl
diff --git a/tools/testfiles/tnoattrdata.ddl b/tools/test/h5dump/expected/tnoattrdata.ddl
similarity index 100%
rename from tools/testfiles/tnoattrdata.ddl
rename to tools/test/h5dump/expected/tnoattrdata.ddl
diff --git a/tools/testfiles/tnoattrddl.ddl b/tools/test/h5dump/expected/tnoattrddl.ddl
similarity index 100%
rename from tools/testfiles/tnoattrddl.ddl
rename to tools/test/h5dump/expected/tnoattrddl.ddl
diff --git a/tools/testfiles/tnodata.ddl b/tools/test/h5dump/expected/tnodata.ddl
similarity index 100%
rename from tools/testfiles/tnodata.ddl
rename to tools/test/h5dump/expected/tnodata.ddl
diff --git a/tools/testfiles/tnoddl.ddl b/tools/test/h5dump/expected/tnoddl.ddl
similarity index 100%
rename from tools/testfiles/tnoddl.ddl
rename to tools/test/h5dump/expected/tnoddl.ddl
diff --git a/tools/testfiles/tnoddlfile.ddl b/tools/test/h5dump/expected/tnoddlfile.ddl
similarity index 100%
rename from tools/testfiles/tnoddlfile.ddl
rename to tools/test/h5dump/expected/tnoddlfile.ddl
diff --git a/tools/testfiles/tnullspace.ddl b/tools/test/h5dump/expected/tnullspace.ddl
similarity index 100%
rename from tools/testfiles/tnullspace.ddl
rename to tools/test/h5dump/expected/tnullspace.ddl
diff --git a/tools/testfiles/torderattr1.ddl b/tools/test/h5dump/expected/torderattr1.ddl
similarity index 100%
rename from tools/testfiles/torderattr1.ddl
rename to tools/test/h5dump/expected/torderattr1.ddl
diff --git a/tools/testfiles/torderattr2.ddl b/tools/test/h5dump/expected/torderattr2.ddl
similarity index 100%
rename from tools/testfiles/torderattr2.ddl
rename to tools/test/h5dump/expected/torderattr2.ddl
diff --git a/tools/testfiles/torderattr3.ddl b/tools/test/h5dump/expected/torderattr3.ddl
similarity index 100%
rename from tools/testfiles/torderattr3.ddl
rename to tools/test/h5dump/expected/torderattr3.ddl
diff --git a/tools/testfiles/torderattr4.ddl b/tools/test/h5dump/expected/torderattr4.ddl
similarity index 100%
rename from tools/testfiles/torderattr4.ddl
rename to tools/test/h5dump/expected/torderattr4.ddl
diff --git a/tools/testfiles/tordercontents1.ddl b/tools/test/h5dump/expected/tordercontents1.ddl
similarity index 100%
rename from tools/testfiles/tordercontents1.ddl
rename to tools/test/h5dump/expected/tordercontents1.ddl
diff --git a/tools/testfiles/tordercontents2.ddl b/tools/test/h5dump/expected/tordercontents2.ddl
similarity index 100%
rename from tools/testfiles/tordercontents2.ddl
rename to tools/test/h5dump/expected/tordercontents2.ddl
diff --git a/tools/testfiles/tordergr1.ddl b/tools/test/h5dump/expected/tordergr1.ddl
similarity index 100%
rename from tools/testfiles/tordergr1.ddl
rename to tools/test/h5dump/expected/tordergr1.ddl
diff --git a/tools/testfiles/tordergr2.ddl b/tools/test/h5dump/expected/tordergr2.ddl
similarity index 100%
rename from tools/testfiles/tordergr2.ddl
rename to tools/test/h5dump/expected/tordergr2.ddl
diff --git a/tools/testfiles/tordergr3.ddl b/tools/test/h5dump/expected/tordergr3.ddl
similarity index 100%
rename from tools/testfiles/tordergr3.ddl
rename to tools/test/h5dump/expected/tordergr3.ddl
diff --git a/tools/testfiles/tordergr4.ddl b/tools/test/h5dump/expected/tordergr4.ddl
similarity index 100%
rename from tools/testfiles/tordergr4.ddl
rename to tools/test/h5dump/expected/tordergr4.ddl
diff --git a/tools/testfiles/tordergr5.ddl b/tools/test/h5dump/expected/tordergr5.ddl
similarity index 100%
rename from tools/testfiles/tordergr5.ddl
rename to tools/test/h5dump/expected/tordergr5.ddl
diff --git a/tools/testfiles/torderlinks1.ddl b/tools/test/h5dump/expected/torderlinks1.ddl
similarity index 100%
rename from tools/testfiles/torderlinks1.ddl
rename to tools/test/h5dump/expected/torderlinks1.ddl
diff --git a/tools/testfiles/torderlinks2.ddl b/tools/test/h5dump/expected/torderlinks2.ddl
similarity index 100%
rename from tools/testfiles/torderlinks2.ddl
rename to tools/test/h5dump/expected/torderlinks2.ddl
diff --git a/tools/testfiles/tperror.ddl b/tools/test/h5dump/expected/tperror.ddl
similarity index 100%
rename from tools/testfiles/tperror.ddl
rename to tools/test/h5dump/expected/tperror.ddl
diff --git a/tools/testfiles/tqmarkfile.ddl b/tools/test/h5dump/expected/tqmarkfile.ddl
similarity index 100%
rename from tools/testfiles/tqmarkfile.ddl
rename to tools/test/h5dump/expected/tqmarkfile.ddl
diff --git a/tools/testfiles/trawdatafile.ddl b/tools/test/h5dump/expected/trawdatafile.ddl
similarity index 100%
rename from tools/testfiles/trawdatafile.ddl
rename to tools/test/h5dump/expected/trawdatafile.ddl
diff --git a/tools/testfiles/trawssetfile.ddl b/tools/test/h5dump/expected/trawssetfile.ddl
similarity index 100%
rename from tools/testfiles/trawssetfile.ddl
rename to tools/test/h5dump/expected/trawssetfile.ddl
diff --git a/tools/testfiles/treadfilter.ddl b/tools/test/h5dump/expected/treadfilter.ddl
similarity index 100%
rename from tools/testfiles/treadfilter.ddl
rename to tools/test/h5dump/expected/treadfilter.ddl
diff --git a/tools/testfiles/treadintfilter.ddl b/tools/test/h5dump/expected/treadintfilter.ddl
similarity index 100%
rename from tools/testfiles/treadintfilter.ddl
rename to tools/test/h5dump/expected/treadintfilter.ddl
diff --git a/tools/testfiles/trefer_attrR.ddl b/tools/test/h5dump/expected/trefer_attrR.ddl
similarity index 100%
rename from tools/testfiles/trefer_attrR.ddl
rename to tools/test/h5dump/expected/trefer_attrR.ddl
diff --git a/tools/testfiles/trefer_compatR.ddl b/tools/test/h5dump/expected/trefer_compatR.ddl
similarity index 100%
rename from tools/testfiles/trefer_compatR.ddl
rename to tools/test/h5dump/expected/trefer_compatR.ddl
diff --git a/tools/testfiles/trefer_extR.ddl b/tools/test/h5dump/expected/trefer_extR.ddl
similarity index 100%
rename from tools/testfiles/trefer_extR.ddl
rename to tools/test/h5dump/expected/trefer_extR.ddl
diff --git a/tools/testfiles/trefer_grpR.ddl b/tools/test/h5dump/expected/trefer_grpR.ddl
similarity index 100%
rename from tools/testfiles/trefer_grpR.ddl
rename to tools/test/h5dump/expected/trefer_grpR.ddl
diff --git a/tools/testfiles/trefer_objR.ddl b/tools/test/h5dump/expected/trefer_objR.ddl
similarity index 100%
rename from tools/testfiles/trefer_objR.ddl
rename to tools/test/h5dump/expected/trefer_objR.ddl
diff --git a/tools/testfiles/trefer_obj_delR.ddl b/tools/test/h5dump/expected/trefer_obj_delR.ddl
similarity index 100%
rename from tools/testfiles/trefer_obj_delR.ddl
rename to tools/test/h5dump/expected/trefer_obj_delR.ddl
diff --git a/tools/testfiles/trefer_paramR.ddl b/tools/test/h5dump/expected/trefer_paramR.ddl
similarity index 100%
rename from tools/testfiles/trefer_paramR.ddl
rename to tools/test/h5dump/expected/trefer_paramR.ddl
diff --git a/tools/testfiles/trefer_regR.ddl b/tools/test/h5dump/expected/trefer_regR.ddl
similarity index 100%
rename from tools/testfiles/trefer_regR.ddl
rename to tools/test/h5dump/expected/trefer_regR.ddl
diff --git a/tools/testfiles/trefer_reg_1dR.ddl b/tools/test/h5dump/expected/trefer_reg_1dR.ddl
similarity index 100%
rename from tools/testfiles/trefer_reg_1dR.ddl
rename to tools/test/h5dump/expected/trefer_reg_1dR.ddl
diff --git a/tools/testfiles/treference.ddl b/tools/test/h5dump/expected/treference.ddl
similarity index 100%
rename from tools/testfiles/treference.ddl
rename to tools/test/h5dump/expected/treference.ddl
diff --git a/tools/testfiles/tsaf.ddl b/tools/test/h5dump/expected/tsaf.ddl
similarity index 100%
rename from tools/testfiles/tsaf.ddl
rename to tools/test/h5dump/expected/tsaf.ddl
diff --git a/tools/testfiles/tscalarattrintsize.ddl b/tools/test/h5dump/expected/tscalarattrintsize.ddl
similarity index 100%
rename from tools/testfiles/tscalarattrintsize.ddl
rename to tools/test/h5dump/expected/tscalarattrintsize.ddl
diff --git a/tools/testfiles/tscalarintattrsize.ddl b/tools/test/h5dump/expected/tscalarintattrsize.ddl
similarity index 100%
rename from tools/testfiles/tscalarintattrsize.ddl
rename to tools/test/h5dump/expected/tscalarintattrsize.ddl
diff --git a/tools/testfiles/tscalarintsize.ddl b/tools/test/h5dump/expected/tscalarintsize.ddl
similarity index 100%
rename from tools/testfiles/tscalarintsize.ddl
rename to tools/test/h5dump/expected/tscalarintsize.ddl
diff --git a/tools/testfiles/tscalarstring.ddl b/tools/test/h5dump/expected/tscalarstring.ddl
similarity index 100%
rename from tools/testfiles/tscalarstring.ddl
rename to tools/test/h5dump/expected/tscalarstring.ddl
diff --git a/tools/testfiles/tscaleoffset.ddl b/tools/test/h5dump/expected/tscaleoffset.ddl
similarity index 100%
rename from tools/testfiles/tscaleoffset.ddl
rename to tools/test/h5dump/expected/tscaleoffset.ddl
diff --git a/tools/testfiles/tshuffle.ddl b/tools/test/h5dump/expected/tshuffle.ddl
similarity index 100%
rename from tools/testfiles/tshuffle.ddl
rename to tools/test/h5dump/expected/tshuffle.ddl
diff --git a/tools/testfiles/tslink-1.ddl b/tools/test/h5dump/expected/tslink-1.ddl
similarity index 100%
rename from tools/testfiles/tslink-1.ddl
rename to tools/test/h5dump/expected/tslink-1.ddl
diff --git a/tools/testfiles/tslink-2.ddl b/tools/test/h5dump/expected/tslink-2.ddl
similarity index 100%
rename from tools/testfiles/tslink-2.ddl
rename to tools/test/h5dump/expected/tslink-2.ddl
diff --git a/tools/testfiles/tslink-D.ddl b/tools/test/h5dump/expected/tslink-D.ddl
similarity index 100%
rename from tools/testfiles/tslink-D.ddl
rename to tools/test/h5dump/expected/tslink-D.ddl
diff --git a/tools/testfiles/tsplit_file.ddl b/tools/test/h5dump/expected/tsplit_file.ddl
similarity index 100%
rename from tools/testfiles/tsplit_file.ddl
rename to tools/test/h5dump/expected/tsplit_file.ddl
diff --git a/tools/testfiles/tst_onion_dset_1d.ddl b/tools/test/h5dump/expected/tst_onion_dset_1d.ddl
similarity index 100%
rename from tools/testfiles/tst_onion_dset_1d.ddl
rename to tools/test/h5dump/expected/tst_onion_dset_1d.ddl
diff --git a/tools/testfiles/tst_onion_dset_ext.ddl b/tools/test/h5dump/expected/tst_onion_dset_ext.ddl
similarity index 100%
rename from tools/testfiles/tst_onion_dset_ext.ddl
rename to tools/test/h5dump/expected/tst_onion_dset_ext.ddl
diff --git a/tools/testfiles/tst_onion_objs.ddl b/tools/test/h5dump/expected/tst_onion_objs.ddl
similarity index 100%
rename from tools/testfiles/tst_onion_objs.ddl
rename to tools/test/h5dump/expected/tst_onion_objs.ddl
diff --git a/tools/testfiles/tst_onion_revision_count.ddl b/tools/test/h5dump/expected/tst_onion_revision_count.ddl
similarity index 100%
rename from tools/testfiles/tst_onion_revision_count.ddl
rename to tools/test/h5dump/expected/tst_onion_revision_count.ddl
diff --git a/tools/testfiles/tstarfile.ddl b/tools/test/h5dump/expected/tstarfile.ddl
similarity index 100%
rename from tools/testfiles/tstarfile.ddl
rename to tools/test/h5dump/expected/tstarfile.ddl
diff --git a/tools/testfiles/tstr-1.ddl b/tools/test/h5dump/expected/tstr-1.ddl
similarity index 100%
rename from tools/testfiles/tstr-1.ddl
rename to tools/test/h5dump/expected/tstr-1.ddl
diff --git a/tools/testfiles/tstr-2.ddl b/tools/test/h5dump/expected/tstr-2.ddl
similarity index 100%
rename from tools/testfiles/tstr-2.ddl
rename to tools/test/h5dump/expected/tstr-2.ddl
diff --git a/tools/testfiles/tstring.ddl b/tools/test/h5dump/expected/tstring.ddl
similarity index 100%
rename from tools/testfiles/tstring.ddl
rename to tools/test/h5dump/expected/tstring.ddl
diff --git a/tools/testfiles/tstring2.ddl b/tools/test/h5dump/expected/tstring2.ddl
similarity index 100%
rename from tools/testfiles/tstring2.ddl
rename to tools/test/h5dump/expected/tstring2.ddl
diff --git a/tools/testfiles/tstringe.ddl b/tools/test/h5dump/expected/tstringe.ddl
similarity index 100%
rename from tools/testfiles/tstringe.ddl
rename to tools/test/h5dump/expected/tstringe.ddl
diff --git a/tools/testfiles/tszip.ddl b/tools/test/h5dump/expected/tszip.ddl
similarity index 100%
rename from tools/testfiles/tszip.ddl
rename to tools/test/h5dump/expected/tszip.ddl
diff --git a/tools/testfiles/tudfilter.ddl b/tools/test/h5dump/expected/tudfilter.ddl
similarity index 100%
rename from tools/testfiles/tudfilter.ddl
rename to tools/test/h5dump/expected/tudfilter.ddl
diff --git a/tools/testfiles/tudlink-1.ddl b/tools/test/h5dump/expected/tudlink-1.ddl
similarity index 100%
rename from tools/testfiles/tudlink-1.ddl
rename to tools/test/h5dump/expected/tudlink-1.ddl
diff --git a/tools/testfiles/tudlink-2.ddl b/tools/test/h5dump/expected/tudlink-2.ddl
similarity index 100%
rename from tools/testfiles/tudlink-2.ddl
rename to tools/test/h5dump/expected/tudlink-2.ddl
diff --git a/tools/testfiles/tuserfilter.ddl b/tools/test/h5dump/expected/tuserfilter.ddl
similarity index 100%
rename from tools/testfiles/tuserfilter.ddl
rename to tools/test/h5dump/expected/tuserfilter.ddl
diff --git a/tools/testfiles/tvldtypes1.ddl b/tools/test/h5dump/expected/tvldtypes1.ddl
similarity index 100%
rename from tools/testfiles/tvldtypes1.ddl
rename to tools/test/h5dump/expected/tvldtypes1.ddl
diff --git a/tools/testfiles/tvldtypes2.ddl b/tools/test/h5dump/expected/tvldtypes2.ddl
similarity index 100%
rename from tools/testfiles/tvldtypes2.ddl
rename to tools/test/h5dump/expected/tvldtypes2.ddl
diff --git a/tools/testfiles/tvldtypes3.ddl b/tools/test/h5dump/expected/tvldtypes3.ddl
similarity index 100%
rename from tools/testfiles/tvldtypes3.ddl
rename to tools/test/h5dump/expected/tvldtypes3.ddl
diff --git a/tools/testfiles/tvldtypes4.ddl b/tools/test/h5dump/expected/tvldtypes4.ddl
similarity index 100%
rename from tools/testfiles/tvldtypes4.ddl
rename to tools/test/h5dump/expected/tvldtypes4.ddl
diff --git a/tools/testfiles/tvldtypes5.ddl b/tools/test/h5dump/expected/tvldtypes5.ddl
similarity index 100%
rename from tools/testfiles/tvldtypes5.ddl
rename to tools/test/h5dump/expected/tvldtypes5.ddl
diff --git a/tools/testfiles/tvlenstr_array.ddl b/tools/test/h5dump/expected/tvlenstr_array.ddl
similarity index 100%
rename from tools/testfiles/tvlenstr_array.ddl
rename to tools/test/h5dump/expected/tvlenstr_array.ddl
diff --git a/tools/testfiles/tvlstr.ddl b/tools/test/h5dump/expected/tvlstr.ddl
similarity index 100%
rename from tools/testfiles/tvlstr.ddl
rename to tools/test/h5dump/expected/tvlstr.ddl
diff --git a/tools/testfiles/tvms.ddl b/tools/test/h5dump/expected/tvms.ddl
similarity index 100%
rename from tools/testfiles/tvms.ddl
rename to tools/test/h5dump/expected/tvms.ddl
diff --git a/tools/testfiles/twidedisplay.ddl b/tools/test/h5dump/expected/twidedisplay.ddl
similarity index 100%
rename from tools/testfiles/twidedisplay.ddl
rename to tools/test/h5dump/expected/twidedisplay.ddl
diff --git a/tools/testfiles/twithddlfile.ddl b/tools/test/h5dump/expected/twithddlfile.ddl
similarity index 100%
rename from tools/testfiles/twithddlfile.ddl
rename to tools/test/h5dump/expected/twithddlfile.ddl
diff --git a/tools/testfiles/vds/tvds-1.ddl b/tools/test/h5dump/expected/vds/tvds-1.ddl
similarity index 100%
rename from tools/testfiles/vds/tvds-1.ddl
rename to tools/test/h5dump/expected/vds/tvds-1.ddl
diff --git a/tools/testfiles/vds/tvds-2.ddl b/tools/test/h5dump/expected/vds/tvds-2.ddl
similarity index 100%
rename from tools/testfiles/vds/tvds-2.ddl
rename to tools/test/h5dump/expected/vds/tvds-2.ddl
diff --git a/tools/testfiles/vds/tvds-3_1.ddl b/tools/test/h5dump/expected/vds/tvds-3_1.ddl
similarity index 100%
rename from tools/testfiles/vds/tvds-3_1.ddl
rename to tools/test/h5dump/expected/vds/tvds-3_1.ddl
diff --git a/tools/testfiles/vds/tvds-3_2.ddl b/tools/test/h5dump/expected/vds/tvds-3_2.ddl
similarity index 100%
rename from tools/testfiles/vds/tvds-3_2.ddl
rename to tools/test/h5dump/expected/vds/tvds-3_2.ddl
diff --git a/tools/testfiles/vds/tvds-4.ddl b/tools/test/h5dump/expected/vds/tvds-4.ddl
similarity index 100%
rename from tools/testfiles/vds/tvds-4.ddl
rename to tools/test/h5dump/expected/vds/tvds-4.ddl
diff --git a/tools/testfiles/vds/tvds-5.ddl b/tools/test/h5dump/expected/vds/tvds-5.ddl
similarity index 100%
rename from tools/testfiles/vds/tvds-5.ddl
rename to tools/test/h5dump/expected/vds/tvds-5.ddl
diff --git a/tools/testfiles/vds/tvds_layout-1.ddl b/tools/test/h5dump/expected/vds/tvds_layout-1.ddl
similarity index 100%
rename from tools/testfiles/vds/tvds_layout-1.ddl
rename to tools/test/h5dump/expected/vds/tvds_layout-1.ddl
diff --git a/tools/testfiles/vds/tvds_layout-2.ddl b/tools/test/h5dump/expected/vds/tvds_layout-2.ddl
similarity index 100%
rename from tools/testfiles/vds/tvds_layout-2.ddl
rename to tools/test/h5dump/expected/vds/tvds_layout-2.ddl
diff --git a/tools/testfiles/vds/tvds_layout-3_1.ddl b/tools/test/h5dump/expected/vds/tvds_layout-3_1.ddl
similarity index 100%
rename from tools/testfiles/vds/tvds_layout-3_1.ddl
rename to tools/test/h5dump/expected/vds/tvds_layout-3_1.ddl
diff --git a/tools/testfiles/vds/tvds_layout-3_2.ddl b/tools/test/h5dump/expected/vds/tvds_layout-3_2.ddl
similarity index 100%
rename from tools/testfiles/vds/tvds_layout-3_2.ddl
rename to tools/test/h5dump/expected/vds/tvds_layout-3_2.ddl
diff --git a/tools/testfiles/vds/tvds_layout-4.ddl b/tools/test/h5dump/expected/vds/tvds_layout-4.ddl
similarity index 100%
rename from tools/testfiles/vds/tvds_layout-4.ddl
rename to tools/test/h5dump/expected/vds/tvds_layout-4.ddl
diff --git a/tools/testfiles/vds/tvds_layout-5.ddl b/tools/test/h5dump/expected/vds/tvds_layout-5.ddl
similarity index 100%
rename from tools/testfiles/vds/tvds_layout-5.ddl
rename to tools/test/h5dump/expected/vds/tvds_layout-5.ddl
diff --git a/tools/testfiles/vds/vds-first.ddl b/tools/test/h5dump/expected/vds/vds-first.ddl
similarity index 100%
rename from tools/testfiles/vds/vds-first.ddl
rename to tools/test/h5dump/expected/vds/vds-first.ddl
diff --git a/tools/testfiles/vds/vds-gap1.ddl b/tools/test/h5dump/expected/vds/vds-gap1.ddl
similarity index 100%
rename from tools/testfiles/vds/vds-gap1.ddl
rename to tools/test/h5dump/expected/vds/vds-gap1.ddl
diff --git a/tools/testfiles/vds/vds-gap2.ddl b/tools/test/h5dump/expected/vds/vds-gap2.ddl
similarity index 100%
rename from tools/testfiles/vds/vds-gap2.ddl
rename to tools/test/h5dump/expected/vds/vds-gap2.ddl
diff --git a/tools/testfiles/vds/vds_layout-eiger.ddl b/tools/test/h5dump/expected/vds/vds_layout-eiger.ddl
similarity index 100%
rename from tools/testfiles/vds/vds_layout-eiger.ddl
rename to tools/test/h5dump/expected/vds/vds_layout-eiger.ddl
diff --git a/tools/testfiles/vds/vds_layout-maxmin.ddl b/tools/test/h5dump/expected/vds/vds_layout-maxmin.ddl
similarity index 100%
rename from tools/testfiles/vds/vds_layout-maxmin.ddl
rename to tools/test/h5dump/expected/vds/vds_layout-maxmin.ddl
diff --git a/tools/testfiles/tall-2A.h5.xml b/tools/test/h5dump/expected/xml/tall-2A.h5.xml
similarity index 100%
rename from tools/testfiles/tall-2A.h5.xml
rename to tools/test/h5dump/expected/xml/tall-2A.h5.xml
diff --git a/tools/testfiles/tall.h5.xml b/tools/test/h5dump/expected/xml/tall.h5.xml
similarity index 100%
rename from tools/testfiles/tall.h5.xml
rename to tools/test/h5dump/expected/xml/tall.h5.xml
diff --git a/tools/testfiles/tarray1.h5.xml b/tools/test/h5dump/expected/xml/tarray1.h5.xml
similarity index 100%
rename from tools/testfiles/tarray1.h5.xml
rename to tools/test/h5dump/expected/xml/tarray1.h5.xml
diff --git a/tools/testfiles/tarray2.h5.xml b/tools/test/h5dump/expected/xml/tarray2.h5.xml
similarity index 100%
rename from tools/testfiles/tarray2.h5.xml
rename to tools/test/h5dump/expected/xml/tarray2.h5.xml
diff --git a/tools/testfiles/tarray3.h5.xml b/tools/test/h5dump/expected/xml/tarray3.h5.xml
similarity index 100%
rename from tools/testfiles/tarray3.h5.xml
rename to tools/test/h5dump/expected/xml/tarray3.h5.xml
diff --git a/tools/testfiles/tarray6.h5.xml b/tools/test/h5dump/expected/xml/tarray6.h5.xml
similarity index 100%
rename from tools/testfiles/tarray6.h5.xml
rename to tools/test/h5dump/expected/xml/tarray6.h5.xml
diff --git a/tools/testfiles/tarray7.h5.xml b/tools/test/h5dump/expected/xml/tarray7.h5.xml
similarity index 100%
rename from tools/testfiles/tarray7.h5.xml
rename to tools/test/h5dump/expected/xml/tarray7.h5.xml
diff --git a/tools/testfiles/tattr.h5.xml b/tools/test/h5dump/expected/xml/tattr.h5.xml
similarity index 100%
rename from tools/testfiles/tattr.h5.xml
rename to tools/test/h5dump/expected/xml/tattr.h5.xml
diff --git a/tools/testfiles/tbitfields_be.h5.xml b/tools/test/h5dump/expected/xml/tbitfields_be.h5.xml
similarity index 100%
rename from tools/testfiles/tbitfields_be.h5.xml
rename to tools/test/h5dump/expected/xml/tbitfields_be.h5.xml
diff --git a/tools/testfiles/tbitfields_le.h5.xml b/tools/test/h5dump/expected/xml/tbitfields_le.h5.xml
similarity index 100%
rename from tools/testfiles/tbitfields_le.h5.xml
rename to tools/test/h5dump/expected/xml/tbitfields_le.h5.xml
diff --git a/tools/testfiles/tcompound.h5.xml b/tools/test/h5dump/expected/xml/tcompound.h5.xml
similarity index 100%
rename from tools/testfiles/tcompound.h5.xml
rename to tools/test/h5dump/expected/xml/tcompound.h5.xml
diff --git a/tools/testfiles/tcompound2.h5.xml b/tools/test/h5dump/expected/xml/tcompound2.h5.xml
similarity index 100%
rename from tools/testfiles/tcompound2.h5.xml
rename to tools/test/h5dump/expected/xml/tcompound2.h5.xml
diff --git a/tools/testfiles/tcompound_complex.h5.xml b/tools/test/h5dump/expected/xml/tcompound_complex.h5.xml
similarity index 100%
rename from tools/testfiles/tcompound_complex.h5.xml
rename to tools/test/h5dump/expected/xml/tcompound_complex.h5.xml
diff --git a/tools/testfiles/tdatareg.h5.xml b/tools/test/h5dump/expected/xml/tdatareg.h5.xml
similarity index 100%
rename from tools/testfiles/tdatareg.h5.xml
rename to tools/test/h5dump/expected/xml/tdatareg.h5.xml
diff --git a/tools/testfiles/tdset.h5.xml b/tools/test/h5dump/expected/xml/tdset.h5.xml
similarity index 100%
rename from tools/testfiles/tdset.h5.xml
rename to tools/test/h5dump/expected/xml/tdset.h5.xml
diff --git a/tools/testfiles/tdset2.h5.xml b/tools/test/h5dump/expected/xml/tdset2.h5.xml
similarity index 100%
rename from tools/testfiles/tdset2.h5.xml
rename to tools/test/h5dump/expected/xml/tdset2.h5.xml
diff --git a/tools/testfiles/tempty-dtd-2.h5.xml b/tools/test/h5dump/expected/xml/tempty-dtd-2.h5.xml
similarity index 100%
rename from tools/testfiles/tempty-dtd-2.h5.xml
rename to tools/test/h5dump/expected/xml/tempty-dtd-2.h5.xml
diff --git a/tools/testfiles/tempty-dtd-uri.h5.xml b/tools/test/h5dump/expected/xml/tempty-dtd-uri.h5.xml
similarity index 100%
rename from tools/testfiles/tempty-dtd-uri.h5.xml
rename to tools/test/h5dump/expected/xml/tempty-dtd-uri.h5.xml
diff --git a/tools/testfiles/tempty-dtd.h5.xml b/tools/test/h5dump/expected/xml/tempty-dtd.h5.xml
similarity index 100%
rename from tools/testfiles/tempty-dtd.h5.xml
rename to tools/test/h5dump/expected/xml/tempty-dtd.h5.xml
diff --git a/tools/testfiles/tempty-nons-2.h5.xml b/tools/test/h5dump/expected/xml/tempty-nons-2.h5.xml
similarity index 100%
rename from tools/testfiles/tempty-nons-2.h5.xml
rename to tools/test/h5dump/expected/xml/tempty-nons-2.h5.xml
diff --git a/tools/testfiles/tempty-nons-uri.h5.xml b/tools/test/h5dump/expected/xml/tempty-nons-uri.h5.xml
similarity index 100%
rename from tools/testfiles/tempty-nons-uri.h5.xml
rename to tools/test/h5dump/expected/xml/tempty-nons-uri.h5.xml
diff --git a/tools/testfiles/tempty-nons.h5.xml b/tools/test/h5dump/expected/xml/tempty-nons.h5.xml
similarity index 100%
rename from tools/testfiles/tempty-nons.h5.xml
rename to tools/test/h5dump/expected/xml/tempty-nons.h5.xml
diff --git a/tools/testfiles/tempty-ns-2.h5.xml b/tools/test/h5dump/expected/xml/tempty-ns-2.h5.xml
similarity index 100%
rename from tools/testfiles/tempty-ns-2.h5.xml
rename to tools/test/h5dump/expected/xml/tempty-ns-2.h5.xml
diff --git a/tools/testfiles/tempty-ns.h5.xml b/tools/test/h5dump/expected/xml/tempty-ns.h5.xml
similarity index 100%
rename from tools/testfiles/tempty-ns.h5.xml
rename to tools/test/h5dump/expected/xml/tempty-ns.h5.xml
diff --git a/tools/testfiles/tempty.h5.xml b/tools/test/h5dump/expected/xml/tempty.h5.xml
similarity index 100%
rename from tools/testfiles/tempty.h5.xml
rename to tools/test/h5dump/expected/xml/tempty.h5.xml
diff --git a/tools/testfiles/tenum.h5.xml b/tools/test/h5dump/expected/xml/tenum.h5.xml
similarity index 100%
rename from tools/testfiles/tenum.h5.xml
rename to tools/test/h5dump/expected/xml/tenum.h5.xml
diff --git a/tools/testfiles/test35.nc.xml b/tools/test/h5dump/expected/xml/test35.nc.xml
similarity index 100%
rename from tools/testfiles/test35.nc.xml
rename to tools/test/h5dump/expected/xml/test35.nc.xml
diff --git a/tools/testfiles/textlink.h5.xml b/tools/test/h5dump/expected/xml/textlink.h5.xml
similarity index 100%
rename from tools/testfiles/textlink.h5.xml
rename to tools/test/h5dump/expected/xml/textlink.h5.xml
diff --git a/tools/testfiles/tfpformat.h5.xml b/tools/test/h5dump/expected/xml/tfpformat.h5.xml
similarity index 100%
rename from tools/testfiles/tfpformat.h5.xml
rename to tools/test/h5dump/expected/xml/tfpformat.h5.xml
diff --git a/tools/testfiles/tgroup.h5.xml b/tools/test/h5dump/expected/xml/tgroup.h5.xml
similarity index 100%
rename from tools/testfiles/tgroup.h5.xml
rename to tools/test/h5dump/expected/xml/tgroup.h5.xml
diff --git a/tools/testfiles/thlink.h5.xml b/tools/test/h5dump/expected/xml/thlink.h5.xml
similarity index 100%
rename from tools/testfiles/thlink.h5.xml
rename to tools/test/h5dump/expected/xml/thlink.h5.xml
diff --git a/tools/testfiles/tloop.h5.xml b/tools/test/h5dump/expected/xml/tloop.h5.xml
similarity index 100%
rename from tools/testfiles/tloop.h5.xml
rename to tools/test/h5dump/expected/xml/tloop.h5.xml
diff --git a/tools/testfiles/tloop2.h5.xml b/tools/test/h5dump/expected/xml/tloop2.h5.xml
similarity index 100%
rename from tools/testfiles/tloop2.h5.xml
rename to tools/test/h5dump/expected/xml/tloop2.h5.xml
diff --git a/tools/testfiles/tmany.h5.xml b/tools/test/h5dump/expected/xml/tmany.h5.xml
similarity index 100%
rename from tools/testfiles/tmany.h5.xml
rename to tools/test/h5dump/expected/xml/tmany.h5.xml
diff --git a/tools/testfiles/tname-amp.h5.xml b/tools/test/h5dump/expected/xml/tname-amp.h5.xml
similarity index 100%
rename from tools/testfiles/tname-amp.h5.xml
rename to tools/test/h5dump/expected/xml/tname-amp.h5.xml
diff --git a/tools/testfiles/tname-apos.h5.xml b/tools/test/h5dump/expected/xml/tname-apos.h5.xml
similarity index 100%
rename from tools/testfiles/tname-apos.h5.xml
rename to tools/test/h5dump/expected/xml/tname-apos.h5.xml
diff --git a/tools/testfiles/tname-gt.h5.xml b/tools/test/h5dump/expected/xml/tname-gt.h5.xml
similarity index 100%
rename from tools/testfiles/tname-gt.h5.xml
rename to tools/test/h5dump/expected/xml/tname-gt.h5.xml
diff --git a/tools/testfiles/tname-lt.h5.xml b/tools/test/h5dump/expected/xml/tname-lt.h5.xml
similarity index 100%
rename from tools/testfiles/tname-lt.h5.xml
rename to tools/test/h5dump/expected/xml/tname-lt.h5.xml
diff --git a/tools/testfiles/tname-quot.h5.xml b/tools/test/h5dump/expected/xml/tname-quot.h5.xml
similarity index 100%
rename from tools/testfiles/tname-quot.h5.xml
rename to tools/test/h5dump/expected/xml/tname-quot.h5.xml
diff --git a/tools/testfiles/tname-sp.h5.xml b/tools/test/h5dump/expected/xml/tname-sp.h5.xml
similarity index 100%
rename from tools/testfiles/tname-sp.h5.xml
rename to tools/test/h5dump/expected/xml/tname-sp.h5.xml
diff --git a/tools/testfiles/tnamed_dtype_attr.h5.xml b/tools/test/h5dump/expected/xml/tnamed_dtype_attr.h5.xml
similarity index 100%
rename from tools/testfiles/tnamed_dtype_attr.h5.xml
rename to tools/test/h5dump/expected/xml/tnamed_dtype_attr.h5.xml
diff --git a/tools/testfiles/tnestedcomp.h5.xml b/tools/test/h5dump/expected/xml/tnestedcomp.h5.xml
similarity index 100%
rename from tools/testfiles/tnestedcomp.h5.xml
rename to tools/test/h5dump/expected/xml/tnestedcomp.h5.xml
diff --git a/tools/testfiles/tnodata.h5.xml b/tools/test/h5dump/expected/xml/tnodata.h5.xml
similarity index 100%
rename from tools/testfiles/tnodata.h5.xml
rename to tools/test/h5dump/expected/xml/tnodata.h5.xml
diff --git a/tools/testfiles/tnullspace.h5.xml b/tools/test/h5dump/expected/xml/tnullspace.h5.xml
similarity index 100%
rename from tools/testfiles/tnullspace.h5.xml
rename to tools/test/h5dump/expected/xml/tnullspace.h5.xml
diff --git a/tools/testfiles/tobjref.h5.xml b/tools/test/h5dump/expected/xml/tobjref.h5.xml
similarity index 100%
rename from tools/testfiles/tobjref.h5.xml
rename to tools/test/h5dump/expected/xml/tobjref.h5.xml
diff --git a/tools/testfiles/topaque.h5.xml b/tools/test/h5dump/expected/xml/topaque.h5.xml
similarity index 100%
rename from tools/testfiles/topaque.h5.xml
rename to tools/test/h5dump/expected/xml/topaque.h5.xml
diff --git a/tools/testfiles/torderattr1.h5.xml b/tools/test/h5dump/expected/xml/torderattr1.h5.xml
similarity index 100%
rename from tools/testfiles/torderattr1.h5.xml
rename to tools/test/h5dump/expected/xml/torderattr1.h5.xml
diff --git a/tools/testfiles/torderattr2.h5.xml b/tools/test/h5dump/expected/xml/torderattr2.h5.xml
similarity index 100%
rename from tools/testfiles/torderattr2.h5.xml
rename to tools/test/h5dump/expected/xml/torderattr2.h5.xml
diff --git a/tools/testfiles/torderattr3.h5.xml b/tools/test/h5dump/expected/xml/torderattr3.h5.xml
similarity index 100%
rename from tools/testfiles/torderattr3.h5.xml
rename to tools/test/h5dump/expected/xml/torderattr3.h5.xml
diff --git a/tools/testfiles/torderattr4.h5.xml b/tools/test/h5dump/expected/xml/torderattr4.h5.xml
similarity index 100%
rename from tools/testfiles/torderattr4.h5.xml
rename to tools/test/h5dump/expected/xml/torderattr4.h5.xml
diff --git a/tools/testfiles/tref-escapes-at.h5.xml b/tools/test/h5dump/expected/xml/tref-escapes-at.h5.xml
similarity index 100%
rename from tools/testfiles/tref-escapes-at.h5.xml
rename to tools/test/h5dump/expected/xml/tref-escapes-at.h5.xml
diff --git a/tools/testfiles/tref-escapes.h5.xml b/tools/test/h5dump/expected/xml/tref-escapes.h5.xml
similarity index 100%
rename from tools/testfiles/tref-escapes.h5.xml
rename to tools/test/h5dump/expected/xml/tref-escapes.h5.xml
diff --git a/tools/testfiles/tref.h5.xml b/tools/test/h5dump/expected/xml/tref.h5.xml
similarity index 100%
rename from tools/testfiles/tref.h5.xml
rename to tools/test/h5dump/expected/xml/tref.h5.xml
diff --git a/tools/testfiles/tsaf.h5.xml b/tools/test/h5dump/expected/xml/tsaf.h5.xml
similarity index 100%
rename from tools/testfiles/tsaf.h5.xml
rename to tools/test/h5dump/expected/xml/tsaf.h5.xml
diff --git a/tools/testfiles/tslink.h5.xml b/tools/test/h5dump/expected/xml/tslink.h5.xml
similarity index 100%
rename from tools/testfiles/tslink.h5.xml
rename to tools/test/h5dump/expected/xml/tslink.h5.xml
diff --git a/tools/testfiles/tstr.h5.xml b/tools/test/h5dump/expected/xml/tstr.h5.xml
similarity index 100%
rename from tools/testfiles/tstr.h5.xml
rename to tools/test/h5dump/expected/xml/tstr.h5.xml
diff --git a/tools/testfiles/tstr2.h5.xml b/tools/test/h5dump/expected/xml/tstr2.h5.xml
similarity index 100%
rename from tools/testfiles/tstr2.h5.xml
rename to tools/test/h5dump/expected/xml/tstr2.h5.xml
diff --git a/tools/testfiles/tstring-at.h5.xml b/tools/test/h5dump/expected/xml/tstring-at.h5.xml
similarity index 100%
rename from tools/testfiles/tstring-at.h5.xml
rename to tools/test/h5dump/expected/xml/tstring-at.h5.xml
diff --git a/tools/testfiles/tstring.h5.xml b/tools/test/h5dump/expected/xml/tstring.h5.xml
similarity index 100%
rename from tools/testfiles/tstring.h5.xml
rename to tools/test/h5dump/expected/xml/tstring.h5.xml
diff --git a/tools/testfiles/tudlink.h5.xml b/tools/test/h5dump/expected/xml/tudlink.h5.xml
similarity index 100%
rename from tools/testfiles/tudlink.h5.xml
rename to tools/test/h5dump/expected/xml/tudlink.h5.xml
diff --git a/tools/testfiles/tvldtypes1.h5.xml b/tools/test/h5dump/expected/xml/tvldtypes1.h5.xml
similarity index 100%
rename from tools/testfiles/tvldtypes1.h5.xml
rename to tools/test/h5dump/expected/xml/tvldtypes1.h5.xml
diff --git a/tools/testfiles/tvldtypes2.h5.xml b/tools/test/h5dump/expected/xml/tvldtypes2.h5.xml
similarity index 100%
rename from tools/testfiles/tvldtypes2.h5.xml
rename to tools/test/h5dump/expected/xml/tvldtypes2.h5.xml
diff --git a/tools/testfiles/tvldtypes3.h5.xml b/tools/test/h5dump/expected/xml/tvldtypes3.h5.xml
similarity index 100%
rename from tools/testfiles/tvldtypes3.h5.xml
rename to tools/test/h5dump/expected/xml/tvldtypes3.h5.xml
diff --git a/tools/testfiles/tvldtypes4.h5.xml b/tools/test/h5dump/expected/xml/tvldtypes4.h5.xml
similarity index 100%
rename from tools/testfiles/tvldtypes4.h5.xml
rename to tools/test/h5dump/expected/xml/tvldtypes4.h5.xml
diff --git a/tools/testfiles/tvldtypes5.h5.xml b/tools/test/h5dump/expected/xml/tvldtypes5.h5.xml
similarity index 100%
rename from tools/testfiles/tvldtypes5.h5.xml
rename to tools/test/h5dump/expected/xml/tvldtypes5.h5.xml
diff --git a/tools/testfiles/tvlstr.h5.xml b/tools/test/h5dump/expected/xml/tvlstr.h5.xml
similarity index 100%
rename from tools/testfiles/tvlstr.h5.xml
rename to tools/test/h5dump/expected/xml/tvlstr.h5.xml
diff --git a/tools/testfiles/zerodim.ddl b/tools/test/h5dump/expected/zerodim.ddl
similarity index 100%
rename from tools/testfiles/zerodim.ddl
rename to tools/test/h5dump/expected/zerodim.ddl
diff --git a/tools/testfiles/tall-6.exp b/tools/test/h5dump/exportfiles/tall-6.exp
similarity index 100%
rename from tools/testfiles/tall-6.exp
rename to tools/test/h5dump/exportfiles/tall-6.exp
diff --git a/tools/testfiles/tbinregR.exp b/tools/test/h5dump/exportfiles/tbinregR.exp
similarity index 100%
rename from tools/testfiles/tbinregR.exp
rename to tools/test/h5dump/exportfiles/tbinregR.exp
diff --git a/tools/testfiles/tnoddlfile.exp b/tools/test/h5dump/exportfiles/tnoddlfile.exp
similarity index 100%
rename from tools/testfiles/tnoddlfile.exp
rename to tools/test/h5dump/exportfiles/tnoddlfile.exp
diff --git a/tools/testfiles/trawdatafile.exp b/tools/test/h5dump/exportfiles/trawdatafile.exp
similarity index 100%
rename from tools/testfiles/trawdatafile.exp
rename to tools/test/h5dump/exportfiles/trawdatafile.exp
diff --git a/tools/testfiles/trawssetfile.exp b/tools/test/h5dump/exportfiles/trawssetfile.exp
similarity index 100%
rename from tools/testfiles/trawssetfile.exp
rename to tools/test/h5dump/exportfiles/trawssetfile.exp
diff --git a/tools/testfiles/tstr2bin2.exp b/tools/test/h5dump/exportfiles/tstr2bin2.exp
similarity index 100%
rename from tools/testfiles/tstr2bin2.exp
rename to tools/test/h5dump/exportfiles/tstr2bin2.exp
diff --git a/tools/testfiles/tstr2bin6.exp b/tools/test/h5dump/exportfiles/tstr2bin6.exp
similarity index 100%
rename from tools/testfiles/tstr2bin6.exp
rename to tools/test/h5dump/exportfiles/tstr2bin6.exp
diff --git a/tools/testfiles/twithddl.exp b/tools/test/h5dump/exportfiles/twithddl.exp
similarity index 100%
rename from tools/testfiles/twithddl.exp
rename to tools/test/h5dump/exportfiles/twithddl.exp
diff --git a/tools/testfiles/twithddlfile.exp b/tools/test/h5dump/exportfiles/twithddlfile.exp
similarity index 100%
rename from tools/testfiles/twithddlfile.exp
rename to tools/test/h5dump/exportfiles/twithddlfile.exp
diff --git a/tools/test/h5dump/h5dump_plugin.sh.in b/tools/test/h5dump/h5dump_plugin.sh.in
index d9b77ee1017..d080c1da6a8 100644
--- a/tools/test/h5dump/h5dump_plugin.sh.in
+++ b/tools/test/h5dump/h5dump_plugin.sh.in
@@ -45,8 +45,8 @@ AWK='awk'
SRC_TOOLS="$srcdir/../.."
# testfiles source dirs for tools
-SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles"
-SRC_H5DUMP_TESTFILES="$SRC_TOOLS_TESTFILES"
+SRC_H5DUMP_TESTFILES="$SRC_TOOLS/test/h5dump/testfiles"
+SRC_H5DUMP_OUTFILES="$SRC_TOOLS/test/h5dump/expected"
TESTDIR=./testplug
test -d $TESTDIR || mkdir $TESTDIR
@@ -62,7 +62,7 @@ test -d $TESTDIR || mkdir $TESTDIR
# --------------------------------------------------------------------
LIST_HDF5_TEST_FILES="
$SRC_H5DUMP_TESTFILES/tudfilter.h5
-$SRC_H5DUMP_TESTFILES/tudfilter.ddl
+$SRC_H5DUMP_OUTFILES/tudfilter.ddl
"
# RUNSERIAL is used. Check if it can return exit code from executable correctly.
diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c
index e77eaf21f3c..aed3eda04e2 100644
--- a/tools/test/h5dump/h5dumpgentest.c
+++ b/tools/test/h5dump/h5dumpgentest.c
@@ -588,7 +588,7 @@ gent_attribute(void)
dims[0] = 24;
space = H5Screate_simple(1, dims, NULL);
attr = H5Acreate2(root, "/attr1", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT);
- HDsnprintf(buf, sizeof(buf), "attribute of root group");
+ snprintf(buf, sizeof(buf), "attribute of root group");
H5Awrite(attr, H5T_NATIVE_SCHAR, buf);
H5Sclose(space);
H5Aclose(attr);
@@ -963,7 +963,7 @@ gent_udlink(void)
/* This ud link will dangle, but that's okay */
fid = H5Fcreate(FILE54, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
H5Lcreate_ud(fid, "udlink1", (H5L_type_t)MY_LINKCLASS, NULL, 0, H5P_DEFAULT, H5P_DEFAULT);
- HDstrcpy(buf, "foo");
+ strcpy(buf, "foo");
H5Lcreate_ud(fid, "udlink2", (H5L_type_t)MY_LINKCLASS, buf, 4, H5P_DEFAULT, H5P_DEFAULT);
H5Fclose(fid);
@@ -1386,7 +1386,7 @@ gent_all(void)
dims[0] = 10;
space = H5Screate_simple(1, dims, NULL);
attr = H5Acreate2(group, "attr1", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT);
- HDsnprintf(buf, sizeof(buf), "abcdefghi");
+ snprintf(buf, sizeof(buf), "abcdefghi");
H5Awrite(attr, H5T_NATIVE_SCHAR, buf);
H5Sclose(space);
H5Aclose(attr);
@@ -1422,7 +1422,7 @@ gent_all(void)
dims[0] = 27;
space = H5Screate_simple(1, dims, NULL);
attr = H5Acreate2(dataset, "attr1", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT);
- HDsnprintf(buf, sizeof(buf), "1st attribute of dset1.1.1");
+ snprintf(buf, sizeof(buf), "1st attribute of dset1.1.1");
H5Awrite(attr, H5T_NATIVE_SCHAR, buf);
H5Sclose(space);
H5Aclose(attr);
@@ -1430,7 +1430,7 @@ gent_all(void)
dims[0] = 27;
space = H5Screate_simple(1, dims, NULL);
attr = H5Acreate2(dataset, "attr2", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT);
- HDsnprintf(buf, sizeof(buf), "2nd attribute of dset1.1.1");
+ snprintf(buf, sizeof(buf), "2nd attribute of dset1.1.1");
H5Awrite(attr, H5T_NATIVE_SCHAR, buf);
H5Sclose(space);
H5Aclose(attr);
@@ -1629,7 +1629,7 @@ gent_many(void)
dims[0] = 10;
space2 = H5Screate_simple(1, dims, NULL);
attr = H5Acreate2(dataset, "attr1", H5T_STD_I8BE, space2, H5P_DEFAULT, H5P_DEFAULT);
- HDsnprintf(buf, sizeof(buf), "abcdefghi");
+ snprintf(buf, sizeof(buf), "abcdefghi");
H5Awrite(attr, H5T_NATIVE_CHAR, buf);
H5Sclose(space2);
H5Aclose(attr);
@@ -1894,7 +1894,7 @@ gent_str(void)
for (l = 0; l < 10; l++)
comp1[i][j].a[k][l] = (l + j + k) * (l + j + k);
for (k = 0; k < 12; k++)
- HDstrcpy(comp1[i][j].s[k], "abcdefgh12345678abcdefgh12345678");
+ strcpy(comp1[i][j].s[k], "abcdefgh12345678abcdefgh12345678");
}
dataset = H5Dcreate2(fid, "/comp1", f_type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -1967,9 +1967,9 @@ gent_str2(void)
dims[0] = 3;
space2 = H5Screate_simple(1, dims, NULL);
attr = H5Acreate2(dataset, "attr1", fxdlenstr2, space2, H5P_DEFAULT, H5P_DEFAULT);
- HDsnprintf(&(buf2[0 * LENSTR2]), LENSTR2, "0123456789");
- HDsnprintf(&(buf2[1 * LENSTR2]), LENSTR2, "abcdefghij");
- HDsnprintf(&(buf2[2 * LENSTR2]), LENSTR2, "ABCDEFGHIJ");
+ snprintf(&(buf2[0 * LENSTR2]), LENSTR2, "0123456789");
+ snprintf(&(buf2[1 * LENSTR2]), LENSTR2, "abcdefghij");
+ snprintf(&(buf2[2 * LENSTR2]), LENSTR2, "ABCDEFGHIJ");
H5Awrite(attr, fxdlenstr2, buf2);
H5Sclose(space2);
H5Tclose(fxdlenstr2);
@@ -1981,8 +1981,8 @@ gent_str2(void)
for (i = 0; (hsize_t)i < sdim; i++) {
start[0] = (hsize_t)i;
- HDsnprintf(buf, sizeof(buf), "This is row %1d of type H5T_STR_NULLTERM of", i);
- H5Tset_size(memtype, HDstrlen(buf) + 1);
+ snprintf(buf, sizeof(buf), "This is row %1d of type H5T_STR_NULLTERM of", i);
+ H5Tset_size(memtype, strlen(buf) + 1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
}
@@ -1994,8 +1994,8 @@ gent_str2(void)
for (i = 0; (hsize_t)i < sdim; i++) {
start[0] = (hsize_t)i;
- HDsnprintf(buf, sizeof(buf), "This is row %1d of type H5T_STR_NULLTERM of string array", i);
- H5Tset_size(memtype, HDstrlen(buf) + 1);
+ snprintf(buf, sizeof(buf), "This is row %1d of type H5T_STR_NULLTERM of string array", i);
+ H5Tset_size(memtype, strlen(buf) + 1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
}
@@ -2013,8 +2013,8 @@ gent_str2(void)
for (i = 0; (hsize_t)i < sdim; i++) {
start[0] = (hsize_t)i;
- HDsnprintf(buf, sizeof(buf), "This is row %1d of type H5T_STR_NULLPAD of", i);
- H5Tset_size(memtype, HDstrlen(buf) + 1);
+ snprintf(buf, sizeof(buf), "This is row %1d of type H5T_STR_NULLPAD of", i);
+ H5Tset_size(memtype, strlen(buf) + 1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
}
@@ -2026,8 +2026,8 @@ gent_str2(void)
for (i = 0; (hsize_t)i < sdim; i++) {
start[0] = (hsize_t)i;
- HDsnprintf(buf, sizeof(buf), "This is row %1d of type H5T_STR_NULLPAD of string array", i);
- H5Tset_size(memtype, HDstrlen(buf) + 1);
+ snprintf(buf, sizeof(buf), "This is row %1d of type H5T_STR_NULLPAD of string array", i);
+ H5Tset_size(memtype, strlen(buf) + 1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
}
@@ -2045,8 +2045,8 @@ gent_str2(void)
for (i = 0; (hsize_t)i < sdim; i++) {
start[0] = (hsize_t)i;
- HDsnprintf(buf, sizeof(buf), "This is row %1d of type H5T_STR_SPACEPAD of", i);
- H5Tset_size(memtype, HDstrlen(buf) + 1);
+ snprintf(buf, sizeof(buf), "This is row %1d of type H5T_STR_SPACEPAD of", i);
+ H5Tset_size(memtype, strlen(buf) + 1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
}
@@ -2058,8 +2058,8 @@ gent_str2(void)
for (i = 0; (hsize_t)i < sdim; i++) {
start[0] = (hsize_t)i;
- HDsnprintf(buf, sizeof(buf), "This is row %1d of type H5T_STR_SPACEPAD of string array", i);
- H5Tset_size(memtype, HDstrlen(buf) + 1);
+ snprintf(buf, sizeof(buf), "This is row %1d of type H5T_STR_SPACEPAD of string array", i);
+ H5Tset_size(memtype, strlen(buf) + 1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
}
@@ -3790,7 +3790,7 @@ gent_split_file(void)
root = H5Gopen2(fid, "/", H5P_DEFAULT);
atype = H5Tcopy(H5T_C_S1);
- H5Tset_size(atype, HDstrlen(meta) + 1);
+ H5Tset_size(atype, strlen(meta) + 1);
H5Tset_strpad(atype, H5T_STR_NULLTERM);
dims[0] = 1;
@@ -3879,19 +3879,19 @@ gent_multi(void)
memset(memb_name, 0, sizeof memb_name);
memset(memb_addr, 0, sizeof memb_addr);
- assert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES);
+ assert(strlen(multi_letters) == H5FD_MEM_NTYPES);
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) {
memb_fapl[mt] = H5P_DEFAULT;
memb_map[mt] = mt;
- HDsprintf(sv[mt], "%%s-%c.h5", multi_letters[mt]);
+ sprintf(sv[mt], "%%s-%c.h5", multi_letters[mt]);
memb_name[mt] = sv[mt];
/*printf("memb_name[%d]=%s, memb_map[%d]=%d; ", mt, memb_name[mt], mt, memb_map[mt]);*/
memb_addr[mt] = (haddr_t)MAX(mt - 1, 0) * (HADDR_MAX / 10);
}
memb_map[H5FD_MEM_DEFAULT] = H5FD_MEM_SUPER;
- H5Pset_fapl_multi(fapl, memb_map, memb_fapl, memb_name, memb_addr, FALSE);
+ H5Pset_fapl_multi(fapl, memb_map, memb_fapl, memb_name, memb_addr, false);
fid = H5Fcreate(FILE36, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
@@ -3928,7 +3928,7 @@ gent_large_objname(void)
group = H5Gcreate2(fid, "this_is_a_large_group_name", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
for (i = 0; i < 50; ++i) {
- HDsnprintf(grp_name, sizeof(grp_name), "this_is_a_large_group_name%d", i);
+ snprintf(grp_name, sizeof(grp_name), "this_is_a_large_group_name%d", i);
group2 = H5Gcreate2(group, grp_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group2);
}
@@ -3999,7 +3999,7 @@ gent_char(void)
hid_t sid1; /* Dataspace ID */
hsize_t dims1[1];
- dims1[0] = HDstrlen(wdata);
+ dims1[0] = strlen(wdata);
/* Create file */
fid1 = H5Fcreate(FILE39, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -7133,7 +7133,7 @@ gent_fs_strategy_threshold(void)
fcpl = H5Pcreate(H5P_FILE_CREATE);
/* Set file space information */
- H5Pset_file_space_strategy(fcpl, STRATEGY, TRUE, (hsize_t)THRESHOLD10);
+ H5Pset_file_space_strategy(fcpl, STRATEGY, true, (hsize_t)THRESHOLD10);
H5Pset_file_space_page_size(fcpl, (hsize_t)FSPACE_PAGE_SIZE);
/* Create the file with the specified strategy and threshold */
@@ -10877,10 +10877,10 @@ gent_compound_complex2(void)
/* Set up first nested compound */
buf[i].d.nested_a = (double)i;
- HDstrcpy(buf[i].d.nested_string, "This is a test string.");
+ strcpy(buf[i].d.nested_string, "This is a test string.");
for (j = 0; j < 4; j++)
- HDstrcpy(buf[i].d.nested_string_array[j], "String test");
+ strcpy(buf[i].d.nested_string_array[j], "String test");
/* Set up multiple nested compound */
buf[i].e.a = (float)i;
@@ -10892,9 +10892,9 @@ gent_compound_complex2(void)
buf[i].e.b.multiple_nested_d[j] = (long)(j - i * 10);
}
- HDstrcpy(buf[i].e.c.further_nested_string, "1234567890");
+ strcpy(buf[i].e.c.further_nested_string, "1234567890");
for (j = 0; j < 4; j++)
- HDstrcpy(buf[i].e.c.further_nested_string_array[j], "STRING ARRAY");
+ strcpy(buf[i].e.c.further_nested_string_array[j], "STRING ARRAY");
for (j = 0; j < 10; j++) {
buf[i].e.c.deep_nest.deep_nested_short[j] = (short)(j + i * 10);
@@ -11346,16 +11346,16 @@ onion_filepaths_init(const char *basename)
if (NULL == (paths = calloc(1, sizeof(struct onion_filepaths))))
goto error;
- if (NULL == (paths->canon = HDstrdup(basename)))
+ if (NULL == (paths->canon = strdup(basename)))
goto error;
if (NULL == (paths->onion = malloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE)))
goto error;
- HDsnprintf(paths->onion, ONION_TEST_FIXNAME_SIZE, "%s.onion", paths->canon);
+ snprintf(paths->onion, ONION_TEST_FIXNAME_SIZE, "%s.onion", paths->canon);
if (NULL == (paths->recovery = malloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE)))
goto error;
- HDsnprintf(paths->recovery, ONION_TEST_FIXNAME_SIZE, "%s.onion.recovery", paths->canon);
+ snprintf(paths->recovery, ONION_TEST_FIXNAME_SIZE, "%s.onion.recovery", paths->canon);
return paths;
diff --git a/tools/testfiles/charsets.h5 b/tools/test/h5dump/testfiles/charsets.h5
similarity index 100%
rename from tools/testfiles/charsets.h5
rename to tools/test/h5dump/testfiles/charsets.h5
diff --git a/tools/testfiles/err_attr_dspace.h5 b/tools/test/h5dump/testfiles/err_attr_dspace.h5
similarity index 100%
rename from tools/testfiles/err_attr_dspace.h5
rename to tools/test/h5dump/testfiles/err_attr_dspace.h5
diff --git a/tools/testfiles/file_space.h5 b/tools/test/h5dump/testfiles/file_space.h5
similarity index 100%
rename from tools/testfiles/file_space.h5
rename to tools/test/h5dump/testfiles/file_space.h5
diff --git a/tools/testfiles/filter_fail.h5 b/tools/test/h5dump/testfiles/filter_fail.h5
similarity index 100%
rename from tools/testfiles/filter_fail.h5
rename to tools/test/h5dump/testfiles/filter_fail.h5
diff --git a/tools/testfiles/packedbits.h5 b/tools/test/h5dump/testfiles/packedbits.h5
similarity index 100%
rename from tools/testfiles/packedbits.h5
rename to tools/test/h5dump/testfiles/packedbits.h5
diff --git a/tools/testfiles/t128bit_float.h5 b/tools/test/h5dump/testfiles/t128bit_float.h5
similarity index 100%
rename from tools/testfiles/t128bit_float.h5
rename to tools/test/h5dump/testfiles/t128bit_float.h5
diff --git a/tools/testfiles/tCVE-2021-37501_attr_decode.h5 b/tools/test/h5dump/testfiles/tCVE-2021-37501_attr_decode.h5
similarity index 100%
rename from tools/testfiles/tCVE-2021-37501_attr_decode.h5
rename to tools/test/h5dump/testfiles/tCVE-2021-37501_attr_decode.h5
diff --git a/tools/testfiles/tCVE_2018_11206_fill_new.h5 b/tools/test/h5dump/testfiles/tCVE_2018_11206_fill_new.h5
similarity index 100%
rename from tools/testfiles/tCVE_2018_11206_fill_new.h5
rename to tools/test/h5dump/testfiles/tCVE_2018_11206_fill_new.h5
diff --git a/tools/testfiles/tCVE_2018_11206_fill_old.h5 b/tools/test/h5dump/testfiles/tCVE_2018_11206_fill_old.h5
similarity index 100%
rename from tools/testfiles/tCVE_2018_11206_fill_old.h5
rename to tools/test/h5dump/testfiles/tCVE_2018_11206_fill_old.h5
diff --git a/tools/testfiles/taindices.h5 b/tools/test/h5dump/testfiles/taindices.h5
similarity index 100%
rename from tools/testfiles/taindices.h5
rename to tools/test/h5dump/testfiles/taindices.h5
diff --git a/tools/testfiles/tall.h5 b/tools/test/h5dump/testfiles/tall.h5
similarity index 100%
rename from tools/testfiles/tall.h5
rename to tools/test/h5dump/testfiles/tall.h5
diff --git a/tools/testfiles/tarray1.h5 b/tools/test/h5dump/testfiles/tarray1.h5
similarity index 100%
rename from tools/testfiles/tarray1.h5
rename to tools/test/h5dump/testfiles/tarray1.h5
diff --git a/tools/testfiles/tarray1_big.h5 b/tools/test/h5dump/testfiles/tarray1_big.h5
similarity index 100%
rename from tools/testfiles/tarray1_big.h5
rename to tools/test/h5dump/testfiles/tarray1_big.h5
diff --git a/tools/testfiles/tarray2.h5 b/tools/test/h5dump/testfiles/tarray2.h5
similarity index 100%
rename from tools/testfiles/tarray2.h5
rename to tools/test/h5dump/testfiles/tarray2.h5
diff --git a/tools/testfiles/tarray3.h5 b/tools/test/h5dump/testfiles/tarray3.h5
similarity index 100%
rename from tools/testfiles/tarray3.h5
rename to tools/test/h5dump/testfiles/tarray3.h5
diff --git a/tools/testfiles/tarray4.h5 b/tools/test/h5dump/testfiles/tarray4.h5
similarity index 100%
rename from tools/testfiles/tarray4.h5
rename to tools/test/h5dump/testfiles/tarray4.h5
diff --git a/tools/testfiles/tarray5.h5 b/tools/test/h5dump/testfiles/tarray5.h5
similarity index 100%
rename from tools/testfiles/tarray5.h5
rename to tools/test/h5dump/testfiles/tarray5.h5
diff --git a/tools/testfiles/tarray6.h5 b/tools/test/h5dump/testfiles/tarray6.h5
similarity index 100%
rename from tools/testfiles/tarray6.h5
rename to tools/test/h5dump/testfiles/tarray6.h5
diff --git a/tools/testfiles/tarray7.h5 b/tools/test/h5dump/testfiles/tarray7.h5
similarity index 100%
rename from tools/testfiles/tarray7.h5
rename to tools/test/h5dump/testfiles/tarray7.h5
diff --git a/tools/testfiles/tarray8.h5 b/tools/test/h5dump/testfiles/tarray8.h5
similarity index 100%
rename from tools/testfiles/tarray8.h5
rename to tools/test/h5dump/testfiles/tarray8.h5
diff --git a/tools/testfiles/tattr.h5 b/tools/test/h5dump/testfiles/tattr.h5
similarity index 100%
rename from tools/testfiles/tattr.h5
rename to tools/test/h5dump/testfiles/tattr.h5
diff --git a/tools/testfiles/tattr2.h5 b/tools/test/h5dump/testfiles/tattr2.h5
similarity index 100%
rename from tools/testfiles/tattr2.h5
rename to tools/test/h5dump/testfiles/tattr2.h5
diff --git a/tools/testfiles/tattr4_be.h5 b/tools/test/h5dump/testfiles/tattr4_be.h5
similarity index 100%
rename from tools/testfiles/tattr4_be.h5
rename to tools/test/h5dump/testfiles/tattr4_be.h5
diff --git a/tools/testfiles/tattrintsize.h5 b/tools/test/h5dump/testfiles/tattrintsize.h5
similarity index 100%
rename from tools/testfiles/tattrintsize.h5
rename to tools/test/h5dump/testfiles/tattrintsize.h5
diff --git a/tools/testfiles/tattrreg.h5 b/tools/test/h5dump/testfiles/tattrreg.h5
similarity index 100%
rename from tools/testfiles/tattrreg.h5
rename to tools/test/h5dump/testfiles/tattrreg.h5
diff --git a/tools/testfiles/tbigdims.h5 b/tools/test/h5dump/testfiles/tbigdims.h5
similarity index 100%
rename from tools/testfiles/tbigdims.h5
rename to tools/test/h5dump/testfiles/tbigdims.h5
diff --git a/tools/testfiles/tbinary.h5 b/tools/test/h5dump/testfiles/tbinary.h5
similarity index 100%
rename from tools/testfiles/tbinary.h5
rename to tools/test/h5dump/testfiles/tbinary.h5
diff --git a/tools/testfiles/tbitnopaque.h5 b/tools/test/h5dump/testfiles/tbitnopaque.h5
similarity index 100%
rename from tools/testfiles/tbitnopaque.h5
rename to tools/test/h5dump/testfiles/tbitnopaque.h5
diff --git a/tools/testfiles/tchar.h5 b/tools/test/h5dump/testfiles/tchar.h5
similarity index 100%
rename from tools/testfiles/tchar.h5
rename to tools/test/h5dump/testfiles/tchar.h5
diff --git a/tools/testfiles/tcmpdattrintsize.h5 b/tools/test/h5dump/testfiles/tcmpdattrintsize.h5
similarity index 100%
rename from tools/testfiles/tcmpdattrintsize.h5
rename to tools/test/h5dump/testfiles/tcmpdattrintsize.h5
diff --git a/tools/testfiles/tcmpdintarray.h5 b/tools/test/h5dump/testfiles/tcmpdintarray.h5
similarity index 100%
rename from tools/testfiles/tcmpdintarray.h5
rename to tools/test/h5dump/testfiles/tcmpdintarray.h5
diff --git a/tools/testfiles/tcmpdints.h5 b/tools/test/h5dump/testfiles/tcmpdints.h5
similarity index 100%
rename from tools/testfiles/tcmpdints.h5
rename to tools/test/h5dump/testfiles/tcmpdints.h5
diff --git a/tools/testfiles/tcmpdintsize.h5 b/tools/test/h5dump/testfiles/tcmpdintsize.h5
similarity index 100%
rename from tools/testfiles/tcmpdintsize.h5
rename to tools/test/h5dump/testfiles/tcmpdintsize.h5
diff --git a/tools/testfiles/tcompound.h5 b/tools/test/h5dump/testfiles/tcompound.h5
similarity index 100%
rename from tools/testfiles/tcompound.h5
rename to tools/test/h5dump/testfiles/tcompound.h5
diff --git a/tools/testfiles/tcompound_complex.h5 b/tools/test/h5dump/testfiles/tcompound_complex.h5
similarity index 100%
rename from tools/testfiles/tcompound_complex.h5
rename to tools/test/h5dump/testfiles/tcompound_complex.h5
diff --git a/tools/testfiles/tcompound_complex2.h5 b/tools/test/h5dump/testfiles/tcompound_complex2.h5
similarity index 100%
rename from tools/testfiles/tcompound_complex2.h5
rename to tools/test/h5dump/testfiles/tcompound_complex2.h5
diff --git a/tools/testfiles/tdatareg.h5 b/tools/test/h5dump/testfiles/tdatareg.h5
similarity index 100%
rename from tools/testfiles/tdatareg.h5
rename to tools/test/h5dump/testfiles/tdatareg.h5
diff --git a/tools/testfiles/tdset.h5 b/tools/test/h5dump/testfiles/tdset.h5
similarity index 100%
rename from tools/testfiles/tdset.h5
rename to tools/test/h5dump/testfiles/tdset.h5
diff --git a/tools/testfiles/tempty.h5 b/tools/test/h5dump/testfiles/tempty.h5
similarity index 100%
rename from tools/testfiles/tempty.h5
rename to tools/test/h5dump/testfiles/tempty.h5
diff --git a/tools/testfiles/textlink.h5 b/tools/test/h5dump/testfiles/textlink.h5
similarity index 100%
rename from tools/testfiles/textlink.h5
rename to tools/test/h5dump/testfiles/textlink.h5
diff --git a/tools/testfiles/textlinkfar.h5 b/tools/test/h5dump/testfiles/textlinkfar.h5
similarity index 100%
rename from tools/testfiles/textlinkfar.h5
rename to tools/test/h5dump/testfiles/textlinkfar.h5
diff --git a/tools/testfiles/textlinksrc.h5 b/tools/test/h5dump/testfiles/textlinksrc.h5
similarity index 100%
rename from tools/testfiles/textlinksrc.h5
rename to tools/test/h5dump/testfiles/textlinksrc.h5
diff --git a/tools/testfiles/textlinktar.h5 b/tools/test/h5dump/testfiles/textlinktar.h5
similarity index 100%
rename from tools/testfiles/textlinktar.h5
rename to tools/test/h5dump/testfiles/textlinktar.h5
diff --git a/tools/testfiles/tfamily00000.h5 b/tools/test/h5dump/testfiles/tfamily00000.h5
similarity index 100%
rename from tools/testfiles/tfamily00000.h5
rename to tools/test/h5dump/testfiles/tfamily00000.h5
diff --git a/tools/testfiles/tfamily00001.h5 b/tools/test/h5dump/testfiles/tfamily00001.h5
similarity index 100%
rename from tools/testfiles/tfamily00001.h5
rename to tools/test/h5dump/testfiles/tfamily00001.h5
diff --git a/tools/testfiles/tfamily00002.h5 b/tools/test/h5dump/testfiles/tfamily00002.h5
similarity index 100%
rename from tools/testfiles/tfamily00002.h5
rename to tools/test/h5dump/testfiles/tfamily00002.h5
diff --git a/tools/testfiles/tfamily00003.h5 b/tools/test/h5dump/testfiles/tfamily00003.h5
similarity index 100%
rename from tools/testfiles/tfamily00003.h5
rename to tools/test/h5dump/testfiles/tfamily00003.h5
diff --git a/tools/testfiles/tfamily00004.h5 b/tools/test/h5dump/testfiles/tfamily00004.h5
similarity index 100%
rename from tools/testfiles/tfamily00004.h5
rename to tools/test/h5dump/testfiles/tfamily00004.h5
diff --git a/tools/testfiles/tfamily00005.h5 b/tools/test/h5dump/testfiles/tfamily00005.h5
similarity index 100%
rename from tools/testfiles/tfamily00005.h5
rename to tools/test/h5dump/testfiles/tfamily00005.h5
diff --git a/tools/testfiles/tfamily00006.h5 b/tools/test/h5dump/testfiles/tfamily00006.h5
similarity index 100%
rename from tools/testfiles/tfamily00006.h5
rename to tools/test/h5dump/testfiles/tfamily00006.h5
diff --git a/tools/testfiles/tfamily00007.h5 b/tools/test/h5dump/testfiles/tfamily00007.h5
similarity index 100%
rename from tools/testfiles/tfamily00007.h5
rename to tools/test/h5dump/testfiles/tfamily00007.h5
diff --git a/tools/testfiles/tfamily00008.h5 b/tools/test/h5dump/testfiles/tfamily00008.h5
similarity index 100%
rename from tools/testfiles/tfamily00008.h5
rename to tools/test/h5dump/testfiles/tfamily00008.h5
diff --git a/tools/testfiles/tfamily00009.h5 b/tools/test/h5dump/testfiles/tfamily00009.h5
similarity index 100%
rename from tools/testfiles/tfamily00009.h5
rename to tools/test/h5dump/testfiles/tfamily00009.h5
diff --git a/tools/testfiles/tfamily00010.h5 b/tools/test/h5dump/testfiles/tfamily00010.h5
similarity index 100%
rename from tools/testfiles/tfamily00010.h5
rename to tools/test/h5dump/testfiles/tfamily00010.h5
diff --git a/tools/testfiles/tfcontents1.h5 b/tools/test/h5dump/testfiles/tfcontents1.h5
similarity index 100%
rename from tools/testfiles/tfcontents1.h5
rename to tools/test/h5dump/testfiles/tfcontents1.h5
diff --git a/tools/testfiles/tfcontents2.h5 b/tools/test/h5dump/testfiles/tfcontents2.h5
similarity index 100%
rename from tools/testfiles/tfcontents2.h5
rename to tools/test/h5dump/testfiles/tfcontents2.h5
diff --git a/tools/testfiles/tfilters.h5 b/tools/test/h5dump/testfiles/tfilters.h5
similarity index 100%
rename from tools/testfiles/tfilters.h5
rename to tools/test/h5dump/testfiles/tfilters.h5
diff --git a/tools/testfiles/tfloatsattrs.h5 b/tools/test/h5dump/testfiles/tfloatsattrs.h5
similarity index 100%
rename from tools/testfiles/tfloatsattrs.h5
rename to tools/test/h5dump/testfiles/tfloatsattrs.h5
diff --git a/tools/testfiles/tfpformat.h5 b/tools/test/h5dump/testfiles/tfpformat.h5
similarity index 100%
rename from tools/testfiles/tfpformat.h5
rename to tools/test/h5dump/testfiles/tfpformat.h5
diff --git a/tools/testfiles/tfvalues.h5 b/tools/test/h5dump/testfiles/tfvalues.h5
similarity index 100%
rename from tools/testfiles/tfvalues.h5
rename to tools/test/h5dump/testfiles/tfvalues.h5
diff --git a/tools/testfiles/tgroup.h5 b/tools/test/h5dump/testfiles/tgroup.h5
similarity index 100%
rename from tools/testfiles/tgroup.h5
rename to tools/test/h5dump/testfiles/tgroup.h5
diff --git a/tools/testfiles/tgrp_comments.h5 b/tools/test/h5dump/testfiles/tgrp_comments.h5
similarity index 100%
rename from tools/testfiles/tgrp_comments.h5
rename to tools/test/h5dump/testfiles/tgrp_comments.h5
diff --git a/tools/testfiles/tgrpnullspace.h5 b/tools/test/h5dump/testfiles/tgrpnullspace.h5
similarity index 100%
rename from tools/testfiles/tgrpnullspace.h5
rename to tools/test/h5dump/testfiles/tgrpnullspace.h5
diff --git a/tools/testfiles/thlink.h5 b/tools/test/h5dump/testfiles/thlink.h5
similarity index 100%
rename from tools/testfiles/thlink.h5
rename to tools/test/h5dump/testfiles/thlink.h5
diff --git a/tools/testfiles/thyperslab.h5 b/tools/test/h5dump/testfiles/thyperslab.h5
similarity index 100%
rename from tools/testfiles/thyperslab.h5
rename to tools/test/h5dump/testfiles/thyperslab.h5
diff --git a/tools/testfiles/tints4dims.h5 b/tools/test/h5dump/testfiles/tints4dims.h5
similarity index 100%
rename from tools/testfiles/tints4dims.h5
rename to tools/test/h5dump/testfiles/tints4dims.h5
diff --git a/tools/testfiles/tintsattrs.h5 b/tools/test/h5dump/testfiles/tintsattrs.h5
similarity index 100%
rename from tools/testfiles/tintsattrs.h5
rename to tools/test/h5dump/testfiles/tintsattrs.h5
diff --git a/tools/testfiles/tintsnodata.h5 b/tools/test/h5dump/testfiles/tintsnodata.h5
similarity index 100%
rename from tools/testfiles/tintsnodata.h5
rename to tools/test/h5dump/testfiles/tintsnodata.h5
diff --git a/tools/testfiles/tlarge_objname.h5 b/tools/test/h5dump/testfiles/tlarge_objname.h5
similarity index 100%
rename from tools/testfiles/tlarge_objname.h5
rename to tools/test/h5dump/testfiles/tlarge_objname.h5
diff --git a/tools/testfiles/tldouble.h5 b/tools/test/h5dump/testfiles/tldouble.h5
similarity index 100%
rename from tools/testfiles/tldouble.h5
rename to tools/test/h5dump/testfiles/tldouble.h5
diff --git a/tools/testfiles/tldouble_scalar.h5 b/tools/test/h5dump/testfiles/tldouble_scalar.h5
similarity index 100%
rename from tools/testfiles/tldouble_scalar.h5
rename to tools/test/h5dump/testfiles/tldouble_scalar.h5
diff --git a/tools/testfiles/tlonglinks.h5 b/tools/test/h5dump/testfiles/tlonglinks.h5
similarity index 100%
rename from tools/testfiles/tlonglinks.h5
rename to tools/test/h5dump/testfiles/tlonglinks.h5
diff --git a/tools/testfiles/tloop.h5 b/tools/test/h5dump/testfiles/tloop.h5
similarity index 100%
rename from tools/testfiles/tloop.h5
rename to tools/test/h5dump/testfiles/tloop.h5
diff --git a/tools/testfiles/tmulti-b.h5 b/tools/test/h5dump/testfiles/tmulti-b.h5
similarity index 100%
rename from tools/testfiles/tmulti-b.h5
rename to tools/test/h5dump/testfiles/tmulti-b.h5
diff --git a/tools/testfiles/tmulti-g.h5 b/tools/test/h5dump/testfiles/tmulti-g.h5
similarity index 100%
rename from tools/testfiles/tmulti-g.h5
rename to tools/test/h5dump/testfiles/tmulti-g.h5
diff --git a/tools/testfiles/tmulti-l.h5 b/tools/test/h5dump/testfiles/tmulti-l.h5
similarity index 100%
rename from tools/testfiles/tmulti-l.h5
rename to tools/test/h5dump/testfiles/tmulti-l.h5
diff --git a/tools/testfiles/tmulti-o.h5 b/tools/test/h5dump/testfiles/tmulti-o.h5
similarity index 100%
rename from tools/testfiles/tmulti-o.h5
rename to tools/test/h5dump/testfiles/tmulti-o.h5
diff --git a/tools/testfiles/tmulti-r.h5 b/tools/test/h5dump/testfiles/tmulti-r.h5
similarity index 100%
rename from tools/testfiles/tmulti-r.h5
rename to tools/test/h5dump/testfiles/tmulti-r.h5
diff --git a/tools/testfiles/tmulti-s.h5 b/tools/test/h5dump/testfiles/tmulti-s.h5
similarity index 100%
rename from tools/testfiles/tmulti-s.h5
rename to tools/test/h5dump/testfiles/tmulti-s.h5
diff --git a/tools/testfiles/tnamed_dtype_attr.h5 b/tools/test/h5dump/testfiles/tnamed_dtype_attr.h5
similarity index 100%
rename from tools/testfiles/tnamed_dtype_attr.h5
rename to tools/test/h5dump/testfiles/tnamed_dtype_attr.h5
diff --git a/tools/testfiles/tnestedcmpddt.h5 b/tools/test/h5dump/testfiles/tnestedcmpddt.h5
similarity index 100%
rename from tools/testfiles/tnestedcmpddt.h5
rename to tools/test/h5dump/testfiles/tnestedcmpddt.h5
diff --git a/tools/testfiles/tnestedcomp.h5 b/tools/test/h5dump/testfiles/tnestedcomp.h5
similarity index 100%
rename from tools/testfiles/tnestedcomp.h5
rename to tools/test/h5dump/testfiles/tnestedcomp.h5
diff --git a/tools/testfiles/tno-subset.h5 b/tools/test/h5dump/testfiles/tno-subset.h5
similarity index 100%
rename from tools/testfiles/tno-subset.h5
rename to tools/test/h5dump/testfiles/tno-subset.h5
diff --git a/tools/test/h5dump/testfiles/tnullspace.h5 b/tools/test/h5dump/testfiles/tnullspace.h5
new file mode 100644
index 0000000000000000000000000000000000000000..b5dac5dff2fde109becb4808a370b9d575c69aef
GIT binary patch
literal 3624
zcmeD5aB<`1lHy_j0S*oZ76t(ZW-tdr{D%S!K2$zT$pU1>FhL~R!__eW%w>cK3P9x=
zpfrq1DNZc`v7yQsKENb~IUN$@>I(8TESzC9%-auGAS@23KtVi&F#*bdkqluhfbt_&
zK^PmL{0Y_&h6gNQq2i;|&JzU0vc=(0S^cTCm9*oAbAKH->eKA
zU_KKQ6Ig^9s2{`-;A8-r3<3&Zk`bs51em}GSQIcwfceaf=qVB`%pe3+4>HT??==So
z23U%O$PX4W*w5dE5$I!B{<%P)yc#U-9&GLqgr=JYa4KS8NPs$!hd~3(Vq{=t-~onm
nVo6C6NC1>dk<%9}U4a#k5~Cq78UmvsFd71*Aut*OLm~tK55+*8
literal 0
HcmV?d00001
diff --git a/tools/testfiles/torderattr.h5 b/tools/test/h5dump/testfiles/torderattr.h5
similarity index 100%
rename from tools/testfiles/torderattr.h5
rename to tools/test/h5dump/testfiles/torderattr.h5
diff --git a/tools/testfiles/tordergr.h5 b/tools/test/h5dump/testfiles/tordergr.h5
similarity index 100%
rename from tools/testfiles/tordergr.h5
rename to tools/test/h5dump/testfiles/tordergr.h5
diff --git a/tools/testfiles/trefer_attr.h5 b/tools/test/h5dump/testfiles/trefer_attr.h5
similarity index 100%
rename from tools/testfiles/trefer_attr.h5
rename to tools/test/h5dump/testfiles/trefer_attr.h5
diff --git a/tools/testfiles/trefer_compat.h5 b/tools/test/h5dump/testfiles/trefer_compat.h5
similarity index 100%
rename from tools/testfiles/trefer_compat.h5
rename to tools/test/h5dump/testfiles/trefer_compat.h5
diff --git a/tools/testfiles/trefer_ext1.h5 b/tools/test/h5dump/testfiles/trefer_ext1.h5
similarity index 100%
rename from tools/testfiles/trefer_ext1.h5
rename to tools/test/h5dump/testfiles/trefer_ext1.h5
diff --git a/tools/testfiles/trefer_ext2.h5 b/tools/test/h5dump/testfiles/trefer_ext2.h5
similarity index 100%
rename from tools/testfiles/trefer_ext2.h5
rename to tools/test/h5dump/testfiles/trefer_ext2.h5
diff --git a/tools/testfiles/trefer_grp.h5 b/tools/test/h5dump/testfiles/trefer_grp.h5
similarity index 100%
rename from tools/testfiles/trefer_grp.h5
rename to tools/test/h5dump/testfiles/trefer_grp.h5
diff --git a/tools/testfiles/trefer_obj.h5 b/tools/test/h5dump/testfiles/trefer_obj.h5
similarity index 100%
rename from tools/testfiles/trefer_obj.h5
rename to tools/test/h5dump/testfiles/trefer_obj.h5
diff --git a/tools/testfiles/trefer_obj_del.h5 b/tools/test/h5dump/testfiles/trefer_obj_del.h5
similarity index 100%
rename from tools/testfiles/trefer_obj_del.h5
rename to tools/test/h5dump/testfiles/trefer_obj_del.h5
diff --git a/tools/testfiles/trefer_param.h5 b/tools/test/h5dump/testfiles/trefer_param.h5
similarity index 100%
rename from tools/testfiles/trefer_param.h5
rename to tools/test/h5dump/testfiles/trefer_param.h5
diff --git a/tools/testfiles/trefer_reg.h5 b/tools/test/h5dump/testfiles/trefer_reg.h5
similarity index 100%
rename from tools/testfiles/trefer_reg.h5
rename to tools/test/h5dump/testfiles/trefer_reg.h5
diff --git a/tools/testfiles/trefer_reg_1d.h5 b/tools/test/h5dump/testfiles/trefer_reg_1d.h5
similarity index 100%
rename from tools/testfiles/trefer_reg_1d.h5
rename to tools/test/h5dump/testfiles/trefer_reg_1d.h5
diff --git a/tools/testfiles/tsaf.h5 b/tools/test/h5dump/testfiles/tsaf.h5
similarity index 100%
rename from tools/testfiles/tsaf.h5
rename to tools/test/h5dump/testfiles/tsaf.h5
diff --git a/tools/testfiles/tscalarattrintsize.h5 b/tools/test/h5dump/testfiles/tscalarattrintsize.h5
similarity index 100%
rename from tools/testfiles/tscalarattrintsize.h5
rename to tools/test/h5dump/testfiles/tscalarattrintsize.h5
diff --git a/tools/testfiles/tscalarintattrsize.h5 b/tools/test/h5dump/testfiles/tscalarintattrsize.h5
similarity index 100%
rename from tools/testfiles/tscalarintattrsize.h5
rename to tools/test/h5dump/testfiles/tscalarintattrsize.h5
diff --git a/tools/testfiles/tscalarintsize.h5 b/tools/test/h5dump/testfiles/tscalarintsize.h5
similarity index 100%
rename from tools/testfiles/tscalarintsize.h5
rename to tools/test/h5dump/testfiles/tscalarintsize.h5
diff --git a/tools/testfiles/tscalarstring.h5 b/tools/test/h5dump/testfiles/tscalarstring.h5
similarity index 100%
rename from tools/testfiles/tscalarstring.h5
rename to tools/test/h5dump/testfiles/tscalarstring.h5
diff --git a/tools/testfiles/tslink.h5 b/tools/test/h5dump/testfiles/tslink.h5
similarity index 100%
rename from tools/testfiles/tslink.h5
rename to tools/test/h5dump/testfiles/tslink.h5
diff --git a/tools/testfiles/tsoftlinks.h5 b/tools/test/h5dump/testfiles/tsoftlinks.h5
similarity index 100%
rename from tools/testfiles/tsoftlinks.h5
rename to tools/test/h5dump/testfiles/tsoftlinks.h5
diff --git a/tools/testfiles/tsplit_file-m.h5 b/tools/test/h5dump/testfiles/tsplit_file-m.h5
similarity index 100%
rename from tools/testfiles/tsplit_file-m.h5
rename to tools/test/h5dump/testfiles/tsplit_file-m.h5
diff --git a/tools/testfiles/tsplit_file-r.h5 b/tools/test/h5dump/testfiles/tsplit_file-r.h5
similarity index 100%
rename from tools/testfiles/tsplit_file-r.h5
rename to tools/test/h5dump/testfiles/tsplit_file-r.h5
diff --git a/tools/testfiles/tst_onion_dset_1d.h5 b/tools/test/h5dump/testfiles/tst_onion_dset_1d.h5
similarity index 100%
rename from tools/testfiles/tst_onion_dset_1d.h5
rename to tools/test/h5dump/testfiles/tst_onion_dset_1d.h5
diff --git a/tools/testfiles/tst_onion_dset_1d.h5.onion b/tools/test/h5dump/testfiles/tst_onion_dset_1d.h5.onion
similarity index 100%
rename from tools/testfiles/tst_onion_dset_1d.h5.onion
rename to tools/test/h5dump/testfiles/tst_onion_dset_1d.h5.onion
diff --git a/tools/testfiles/tst_onion_dset_ext.h5 b/tools/test/h5dump/testfiles/tst_onion_dset_ext.h5
similarity index 100%
rename from tools/testfiles/tst_onion_dset_ext.h5
rename to tools/test/h5dump/testfiles/tst_onion_dset_ext.h5
diff --git a/tools/testfiles/tst_onion_dset_ext.h5.onion b/tools/test/h5dump/testfiles/tst_onion_dset_ext.h5.onion
similarity index 100%
rename from tools/testfiles/tst_onion_dset_ext.h5.onion
rename to tools/test/h5dump/testfiles/tst_onion_dset_ext.h5.onion
diff --git a/tools/testfiles/tst_onion_objs.h5 b/tools/test/h5dump/testfiles/tst_onion_objs.h5
similarity index 100%
rename from tools/testfiles/tst_onion_objs.h5
rename to tools/test/h5dump/testfiles/tst_onion_objs.h5
diff --git a/tools/testfiles/tst_onion_objs.h5.onion b/tools/test/h5dump/testfiles/tst_onion_objs.h5.onion
similarity index 100%
rename from tools/testfiles/tst_onion_objs.h5.onion
rename to tools/test/h5dump/testfiles/tst_onion_objs.h5.onion
diff --git a/tools/testfiles/tstr.h5 b/tools/test/h5dump/testfiles/tstr.h5
similarity index 100%
rename from tools/testfiles/tstr.h5
rename to tools/test/h5dump/testfiles/tstr.h5
diff --git a/tools/testfiles/tstr2.h5 b/tools/test/h5dump/testfiles/tstr2.h5
similarity index 100%
rename from tools/testfiles/tstr2.h5
rename to tools/test/h5dump/testfiles/tstr2.h5
diff --git a/tools/testfiles/tstr3.h5 b/tools/test/h5dump/testfiles/tstr3.h5
similarity index 100%
rename from tools/testfiles/tstr3.h5
rename to tools/test/h5dump/testfiles/tstr3.h5
diff --git a/tools/testfiles/tudfilter.h5 b/tools/test/h5dump/testfiles/tudfilter.h5
similarity index 100%
rename from tools/testfiles/tudfilter.h5
rename to tools/test/h5dump/testfiles/tudfilter.h5
diff --git a/tools/testfiles/tudlink.h5 b/tools/test/h5dump/testfiles/tudlink.h5
similarity index 100%
rename from tools/testfiles/tudlink.h5
rename to tools/test/h5dump/testfiles/tudlink.h5
diff --git a/tools/testfiles/tvldtypes1.h5 b/tools/test/h5dump/testfiles/tvldtypes1.h5
similarity index 100%
rename from tools/testfiles/tvldtypes1.h5
rename to tools/test/h5dump/testfiles/tvldtypes1.h5
diff --git a/tools/testfiles/tvldtypes2.h5 b/tools/test/h5dump/testfiles/tvldtypes2.h5
similarity index 100%
rename from tools/testfiles/tvldtypes2.h5
rename to tools/test/h5dump/testfiles/tvldtypes2.h5
diff --git a/tools/testfiles/tvldtypes3.h5 b/tools/test/h5dump/testfiles/tvldtypes3.h5
similarity index 100%
rename from tools/testfiles/tvldtypes3.h5
rename to tools/test/h5dump/testfiles/tvldtypes3.h5
diff --git a/tools/testfiles/tvldtypes4.h5 b/tools/test/h5dump/testfiles/tvldtypes4.h5
similarity index 100%
rename from tools/testfiles/tvldtypes4.h5
rename to tools/test/h5dump/testfiles/tvldtypes4.h5
diff --git a/tools/testfiles/tvldtypes5.h5 b/tools/test/h5dump/testfiles/tvldtypes5.h5
similarity index 100%
rename from tools/testfiles/tvldtypes5.h5
rename to tools/test/h5dump/testfiles/tvldtypes5.h5
diff --git a/tools/testfiles/tvlenstr_array.h5 b/tools/test/h5dump/testfiles/tvlenstr_array.h5
similarity index 100%
rename from tools/testfiles/tvlenstr_array.h5
rename to tools/test/h5dump/testfiles/tvlenstr_array.h5
diff --git a/tools/testfiles/tvlstr.h5 b/tools/test/h5dump/testfiles/tvlstr.h5
similarity index 100%
rename from tools/testfiles/tvlstr.h5
rename to tools/test/h5dump/testfiles/tvlstr.h5
diff --git a/tools/testfiles/tvms.h5 b/tools/test/h5dump/testfiles/tvms.h5
similarity index 100%
rename from tools/testfiles/tvms.h5
rename to tools/test/h5dump/testfiles/tvms.h5
diff --git a/tools/testfiles/vds/1_a.h5 b/tools/test/h5dump/testfiles/vds/1_a.h5
similarity index 100%
rename from tools/testfiles/vds/1_a.h5
rename to tools/test/h5dump/testfiles/vds/1_a.h5
diff --git a/tools/testfiles/vds/1_b.h5 b/tools/test/h5dump/testfiles/vds/1_b.h5
similarity index 100%
rename from tools/testfiles/vds/1_b.h5
rename to tools/test/h5dump/testfiles/vds/1_b.h5
diff --git a/tools/testfiles/vds/1_c.h5 b/tools/test/h5dump/testfiles/vds/1_c.h5
similarity index 100%
rename from tools/testfiles/vds/1_c.h5
rename to tools/test/h5dump/testfiles/vds/1_c.h5
diff --git a/tools/testfiles/vds/1_d.h5 b/tools/test/h5dump/testfiles/vds/1_d.h5
similarity index 100%
rename from tools/testfiles/vds/1_d.h5
rename to tools/test/h5dump/testfiles/vds/1_d.h5
diff --git a/tools/testfiles/vds/1_e.h5 b/tools/test/h5dump/testfiles/vds/1_e.h5
similarity index 100%
rename from tools/testfiles/vds/1_e.h5
rename to tools/test/h5dump/testfiles/vds/1_e.h5
diff --git a/tools/testfiles/vds/1_f.h5 b/tools/test/h5dump/testfiles/vds/1_f.h5
similarity index 100%
rename from tools/testfiles/vds/1_f.h5
rename to tools/test/h5dump/testfiles/vds/1_f.h5
diff --git a/tools/testfiles/vds/1_vds.h5 b/tools/test/h5dump/testfiles/vds/1_vds.h5
similarity index 100%
rename from tools/testfiles/vds/1_vds.h5
rename to tools/test/h5dump/testfiles/vds/1_vds.h5
diff --git a/tools/testfiles/vds/2_a.h5 b/tools/test/h5dump/testfiles/vds/2_a.h5
similarity index 100%
rename from tools/testfiles/vds/2_a.h5
rename to tools/test/h5dump/testfiles/vds/2_a.h5
diff --git a/tools/testfiles/vds/2_b.h5 b/tools/test/h5dump/testfiles/vds/2_b.h5
similarity index 100%
rename from tools/testfiles/vds/2_b.h5
rename to tools/test/h5dump/testfiles/vds/2_b.h5
diff --git a/tools/testfiles/vds/2_c.h5 b/tools/test/h5dump/testfiles/vds/2_c.h5
similarity index 100%
rename from tools/testfiles/vds/2_c.h5
rename to tools/test/h5dump/testfiles/vds/2_c.h5
diff --git a/tools/testfiles/vds/2_d.h5 b/tools/test/h5dump/testfiles/vds/2_d.h5
similarity index 100%
rename from tools/testfiles/vds/2_d.h5
rename to tools/test/h5dump/testfiles/vds/2_d.h5
diff --git a/tools/testfiles/vds/2_e.h5 b/tools/test/h5dump/testfiles/vds/2_e.h5
similarity index 100%
rename from tools/testfiles/vds/2_e.h5
rename to tools/test/h5dump/testfiles/vds/2_e.h5
diff --git a/tools/testfiles/vds/2_vds.h5 b/tools/test/h5dump/testfiles/vds/2_vds.h5
similarity index 100%
rename from tools/testfiles/vds/2_vds.h5
rename to tools/test/h5dump/testfiles/vds/2_vds.h5
diff --git a/tools/testfiles/vds/3_1_vds.h5 b/tools/test/h5dump/testfiles/vds/3_1_vds.h5
similarity index 100%
rename from tools/testfiles/vds/3_1_vds.h5
rename to tools/test/h5dump/testfiles/vds/3_1_vds.h5
diff --git a/tools/testfiles/vds/3_2_vds.h5 b/tools/test/h5dump/testfiles/vds/3_2_vds.h5
similarity index 100%
rename from tools/testfiles/vds/3_2_vds.h5
rename to tools/test/h5dump/testfiles/vds/3_2_vds.h5
diff --git a/tools/testfiles/vds/4_0.h5 b/tools/test/h5dump/testfiles/vds/4_0.h5
similarity index 100%
rename from tools/testfiles/vds/4_0.h5
rename to tools/test/h5dump/testfiles/vds/4_0.h5
diff --git a/tools/testfiles/vds/4_1.h5 b/tools/test/h5dump/testfiles/vds/4_1.h5
similarity index 100%
rename from tools/testfiles/vds/4_1.h5
rename to tools/test/h5dump/testfiles/vds/4_1.h5
diff --git a/tools/testfiles/vds/4_2.h5 b/tools/test/h5dump/testfiles/vds/4_2.h5
similarity index 100%
rename from tools/testfiles/vds/4_2.h5
rename to tools/test/h5dump/testfiles/vds/4_2.h5
diff --git a/tools/testfiles/vds/4_vds.h5 b/tools/test/h5dump/testfiles/vds/4_vds.h5
similarity index 100%
rename from tools/testfiles/vds/4_vds.h5
rename to tools/test/h5dump/testfiles/vds/4_vds.h5
diff --git a/tools/testfiles/vds/5_a.h5 b/tools/test/h5dump/testfiles/vds/5_a.h5
similarity index 100%
rename from tools/testfiles/vds/5_a.h5
rename to tools/test/h5dump/testfiles/vds/5_a.h5
diff --git a/tools/testfiles/vds/5_b.h5 b/tools/test/h5dump/testfiles/vds/5_b.h5
similarity index 100%
rename from tools/testfiles/vds/5_b.h5
rename to tools/test/h5dump/testfiles/vds/5_b.h5
diff --git a/tools/testfiles/vds/5_c.h5 b/tools/test/h5dump/testfiles/vds/5_c.h5
similarity index 100%
rename from tools/testfiles/vds/5_c.h5
rename to tools/test/h5dump/testfiles/vds/5_c.h5
diff --git a/tools/testfiles/vds/5_vds.h5 b/tools/test/h5dump/testfiles/vds/5_vds.h5
similarity index 100%
rename from tools/testfiles/vds/5_vds.h5
rename to tools/test/h5dump/testfiles/vds/5_vds.h5
diff --git a/tools/testfiles/vds/a.h5 b/tools/test/h5dump/testfiles/vds/a.h5
similarity index 100%
rename from tools/testfiles/vds/a.h5
rename to tools/test/h5dump/testfiles/vds/a.h5
diff --git a/tools/testfiles/vds/b.h5 b/tools/test/h5dump/testfiles/vds/b.h5
similarity index 100%
rename from tools/testfiles/vds/b.h5
rename to tools/test/h5dump/testfiles/vds/b.h5
diff --git a/tools/testfiles/vds/c.h5 b/tools/test/h5dump/testfiles/vds/c.h5
similarity index 100%
rename from tools/testfiles/vds/c.h5
rename to tools/test/h5dump/testfiles/vds/c.h5
diff --git a/tools/testfiles/vds/d.h5 b/tools/test/h5dump/testfiles/vds/d.h5
similarity index 100%
rename from tools/testfiles/vds/d.h5
rename to tools/test/h5dump/testfiles/vds/d.h5
diff --git a/tools/testfiles/vds/f-0.h5 b/tools/test/h5dump/testfiles/vds/f-0.h5
similarity index 100%
rename from tools/testfiles/vds/f-0.h5
rename to tools/test/h5dump/testfiles/vds/f-0.h5
diff --git a/tools/testfiles/vds/f-3.h5 b/tools/test/h5dump/testfiles/vds/f-3.h5
similarity index 100%
rename from tools/testfiles/vds/f-3.h5
rename to tools/test/h5dump/testfiles/vds/f-3.h5
diff --git a/tools/testfiles/vds/vds-eiger.h5 b/tools/test/h5dump/testfiles/vds/vds-eiger.h5
similarity index 100%
rename from tools/testfiles/vds/vds-eiger.h5
rename to tools/test/h5dump/testfiles/vds/vds-eiger.h5
diff --git a/tools/testfiles/vds/vds-percival-unlim-maxmin.h5 b/tools/test/h5dump/testfiles/vds/vds-percival-unlim-maxmin.h5
similarity index 100%
rename from tools/testfiles/vds/vds-percival-unlim-maxmin.h5
rename to tools/test/h5dump/testfiles/vds/vds-percival-unlim-maxmin.h5
diff --git a/tools/testfiles/tbitfields.h5 b/tools/test/h5dump/testfiles/xml/tbitfields.h5
similarity index 100%
rename from tools/testfiles/tbitfields.h5
rename to tools/test/h5dump/testfiles/xml/tbitfields.h5
diff --git a/tools/testfiles/tcompound2.h5 b/tools/test/h5dump/testfiles/xml/tcompound2.h5
similarity index 100%
rename from tools/testfiles/tcompound2.h5
rename to tools/test/h5dump/testfiles/xml/tcompound2.h5
diff --git a/tools/testfiles/tdset2.h5 b/tools/test/h5dump/testfiles/xml/tdset2.h5
similarity index 100%
rename from tools/testfiles/tdset2.h5
rename to tools/test/h5dump/testfiles/xml/tdset2.h5
diff --git a/tools/testfiles/tenum.h5 b/tools/test/h5dump/testfiles/xml/tenum.h5
similarity index 100%
rename from tools/testfiles/tenum.h5
rename to tools/test/h5dump/testfiles/xml/tenum.h5
diff --git a/tools/testfiles/test35.nc b/tools/test/h5dump/testfiles/xml/test35.nc
similarity index 100%
rename from tools/testfiles/test35.nc
rename to tools/test/h5dump/testfiles/xml/test35.nc
diff --git a/tools/testfiles/tloop2.h5 b/tools/test/h5dump/testfiles/xml/tloop2.h5
similarity index 100%
rename from tools/testfiles/tloop2.h5
rename to tools/test/h5dump/testfiles/xml/tloop2.h5
diff --git a/tools/testfiles/tmany.h5 b/tools/test/h5dump/testfiles/xml/tmany.h5
similarity index 100%
rename from tools/testfiles/tmany.h5
rename to tools/test/h5dump/testfiles/xml/tmany.h5
diff --git a/tools/testfiles/tname-amp.h5 b/tools/test/h5dump/testfiles/xml/tname-amp.h5
similarity index 100%
rename from tools/testfiles/tname-amp.h5
rename to tools/test/h5dump/testfiles/xml/tname-amp.h5
diff --git a/tools/testfiles/tname-apos.h5 b/tools/test/h5dump/testfiles/xml/tname-apos.h5
similarity index 100%
rename from tools/testfiles/tname-apos.h5
rename to tools/test/h5dump/testfiles/xml/tname-apos.h5
diff --git a/tools/testfiles/tname-gt.h5 b/tools/test/h5dump/testfiles/xml/tname-gt.h5
similarity index 100%
rename from tools/testfiles/tname-gt.h5
rename to tools/test/h5dump/testfiles/xml/tname-gt.h5
diff --git a/tools/testfiles/tname-lt.h5 b/tools/test/h5dump/testfiles/xml/tname-lt.h5
similarity index 100%
rename from tools/testfiles/tname-lt.h5
rename to tools/test/h5dump/testfiles/xml/tname-lt.h5
diff --git a/tools/testfiles/tname-quot.h5 b/tools/test/h5dump/testfiles/xml/tname-quot.h5
similarity index 100%
rename from tools/testfiles/tname-quot.h5
rename to tools/test/h5dump/testfiles/xml/tname-quot.h5
diff --git a/tools/testfiles/tname-sp.h5 b/tools/test/h5dump/testfiles/xml/tname-sp.h5
similarity index 100%
rename from tools/testfiles/tname-sp.h5
rename to tools/test/h5dump/testfiles/xml/tname-sp.h5
diff --git a/tools/testfiles/tnodata.h5 b/tools/test/h5dump/testfiles/xml/tnodata.h5
similarity index 100%
rename from tools/testfiles/tnodata.h5
rename to tools/test/h5dump/testfiles/xml/tnodata.h5
diff --git a/tools/testfiles/tobjref.h5 b/tools/test/h5dump/testfiles/xml/tobjref.h5
similarity index 100%
rename from tools/testfiles/tobjref.h5
rename to tools/test/h5dump/testfiles/xml/tobjref.h5
diff --git a/tools/testfiles/topaque.h5 b/tools/test/h5dump/testfiles/xml/topaque.h5
similarity index 100%
rename from tools/testfiles/topaque.h5
rename to tools/test/h5dump/testfiles/xml/topaque.h5
diff --git a/tools/testfiles/tref-escapes-at.h5 b/tools/test/h5dump/testfiles/xml/tref-escapes-at.h5
similarity index 100%
rename from tools/testfiles/tref-escapes-at.h5
rename to tools/test/h5dump/testfiles/xml/tref-escapes-at.h5
diff --git a/tools/testfiles/tref-escapes.h5 b/tools/test/h5dump/testfiles/xml/tref-escapes.h5
similarity index 100%
rename from tools/testfiles/tref-escapes.h5
rename to tools/test/h5dump/testfiles/xml/tref-escapes.h5
diff --git a/tools/testfiles/tref.h5 b/tools/test/h5dump/testfiles/xml/tref.h5
similarity index 100%
rename from tools/testfiles/tref.h5
rename to tools/test/h5dump/testfiles/xml/tref.h5
diff --git a/tools/testfiles/tstring-at.h5 b/tools/test/h5dump/testfiles/xml/tstring-at.h5
similarity index 100%
rename from tools/testfiles/tstring-at.h5
rename to tools/test/h5dump/testfiles/xml/tstring-at.h5
diff --git a/tools/testfiles/tstring.h5 b/tools/test/h5dump/testfiles/xml/tstring.h5
similarity index 100%
rename from tools/testfiles/tstring.h5
rename to tools/test/h5dump/testfiles/xml/tstring.h5
diff --git a/tools/testfiles/zerodim.h5 b/tools/test/h5dump/testfiles/zerodim.h5
similarity index 100%
rename from tools/testfiles/zerodim.h5
rename to tools/test/h5dump/testfiles/zerodim.h5
diff --git a/tools/test/h5dump/testh5dump.sh.in b/tools/test/h5dump/testh5dump.sh.in
index 6ea410bb851..8796aa91fa7 100644
--- a/tools/test/h5dump/testh5dump.sh.in
+++ b/tools/test/h5dump/testh5dump.sh.in
@@ -52,11 +52,12 @@ verbose=yes
# source dirs
SRC_TOOLS="$srcdir/../.."
-SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles"
# testfiles source dirs for tools
-SRC_H5LS_TESTFILES="$SRC_TOOLS_TESTFILES"
-SRC_H5DUMP_TESTFILES="$SRC_TOOLS_TESTFILES"
-SRC_H5DUMP_ERRORFILES="$srcdir/errfiles"
+SRC_H5LS_TESTFILES="$SRC_TOOLS/test/h5ls/testfiles"
+SRC_H5DUMP_TESTFILES="$SRC_TOOLS/test/h5dump/testfiles"
+SRC_H5DUMP_OUTFILES="$SRC_TOOLS/test/h5dump/expected"
+SRC_H5DUMP_ERRORFILES="$SRC_TOOLS/test/h5dump/errfiles"
+SRC_H5DUMP_EXPFILES="$SRC_TOOLS/test/h5dump/exportfiles"
SRC_H5DIFF_TESTFILES="$SRC_TOOLS/test/h5diff/testfiles"
SRC_H5COPY_TESTFILES="$SRC_TOOLS/test/h5copy/testfiles"
SRC_H5REPACK_TESTFILES="$SRC_TOOLS/test/h5repack/testfiles"
@@ -193,195 +194,198 @@ $SRC_H5DUMP_TESTFILES/tst_onion_dset_1d.h5.onion
"
LIST_OTHER_TEST_FILES="
-$SRC_H5DUMP_TESTFILES/charsets.ddl
-$SRC_H5DUMP_TESTFILES/file_space.ddl
-$SRC_H5DUMP_TESTFILES/filter_fail.ddl
-$SRC_H5DUMP_TESTFILES/non_existing.ddl
-$SRC_H5DUMP_TESTFILES/packedbits.ddl
-$SRC_H5DUMP_TESTFILES/tall-1.ddl
-$SRC_H5DUMP_TESTFILES/tall-2.ddl
-$SRC_H5DUMP_TESTFILES/tall-2A.ddl
-$SRC_H5DUMP_TESTFILES/tall-2A0.ddl
-$SRC_H5DUMP_TESTFILES/tall-2B.ddl
-$SRC_H5DUMP_TESTFILES/tall-3.ddl
-$SRC_H5DUMP_TESTFILES/tall-4s.ddl
-$SRC_H5DUMP_TESTFILES/tall-5s.ddl
-$SRC_H5DUMP_TESTFILES/tall-6.ddl
-$SRC_H5DUMP_TESTFILES/tall-6.exp
-$SRC_H5DUMP_TESTFILES/tall-7.ddl
-$SRC_H5DUMP_TESTFILES/tall-7N.ddl
-$SRC_H5DUMP_TESTFILES/tallfilters.ddl
-$SRC_H5DUMP_TESTFILES/tarray1.ddl
-$SRC_H5DUMP_TESTFILES/tarray1_big.ddl
-$SRC_H5DUMP_TESTFILES/tarray2.ddl
-$SRC_H5DUMP_TESTFILES/tarray3.ddl
-$SRC_H5DUMP_TESTFILES/tarray4.ddl
-$SRC_H5DUMP_TESTFILES/tarray5.ddl
-$SRC_H5DUMP_TESTFILES/tarray6.ddl
-$SRC_H5DUMP_TESTFILES/tarray7.ddl
-$SRC_H5DUMP_TESTFILES/tarray8.ddl
-$SRC_H5DUMP_TESTFILES/tattr-1.ddl
-$SRC_H5DUMP_TESTFILES/tattr-2.ddl
-$SRC_H5DUMP_TESTFILES/tattr-3.ddl
-$SRC_H5DUMP_TESTFILES/tattr-4_be.ddl
-$SRC_H5DUMP_TESTFILES/tattrcontents1.ddl
-$SRC_H5DUMP_TESTFILES/tattrcontents2.ddl
-$SRC_H5DUMP_TESTFILES/tattrintsize.ddl
-$SRC_H5DUMP_TESTFILES/tattrreg.ddl
-$SRC_H5DUMP_TESTFILES/tattrregR.ddl
-$SRC_H5DUMP_TESTFILES/tbin1.ddl
-$SRC_H5DUMP_TESTFILES/tbin1.ddl
-$SRC_H5DUMP_TESTFILES/tbin2.ddl
-$SRC_H5DUMP_TESTFILES/tbin3.ddl
-$SRC_H5DUMP_TESTFILES/tbin4.ddl
-$SRC_H5DUMP_TESTFILES/tbinregR.ddl
-$SRC_H5DUMP_TESTFILES/tbigdims.ddl
-$SRC_H5DUMP_TESTFILES/tbitnopaque_be.ddl
-$SRC_H5DUMP_TESTFILES/tbitnopaque_le.ddl
-$SRC_H5DUMP_TESTFILES/tboot1.ddl
-$SRC_H5DUMP_TESTFILES/tboot2.ddl
-$SRC_H5DUMP_TESTFILES/tboot2A.ddl
-$SRC_H5DUMP_TESTFILES/tboot2B.ddl
-$SRC_H5DUMP_TESTFILES/tchar1.ddl
-$SRC_H5DUMP_TESTFILES/tchunked.ddl
-$SRC_H5DUMP_TESTFILES/tcmpdattrintsize.ddl
-$SRC_H5DUMP_TESTFILES/tcmpdintsize.ddl
-$SRC_H5DUMP_TESTFILES/tcomp-1.ddl
-$SRC_H5DUMP_TESTFILES/tcomp-2.ddl
-$SRC_H5DUMP_TESTFILES/tcomp-3.ddl
-$SRC_H5DUMP_TESTFILES/tcomp-4.ddl
-$SRC_H5DUMP_TESTFILES/tcompound_complex2.ddl
-$SRC_H5DUMP_TESTFILES/tcompact.ddl
-$SRC_H5DUMP_TESTFILES/tcontents.ddl
-$SRC_H5DUMP_TESTFILES/tcontiguos.ddl
-$SRC_H5DUMP_TESTFILES/tdatareg.ddl
-$SRC_H5DUMP_TESTFILES/tdataregR.ddl
-$SRC_H5DUMP_TESTFILES/tdeflate.ddl
-$SRC_H5DUMP_TESTFILES/tdset-1.ddl
-$SRC_H5DUMP_TESTFILES/tdset-2.ddl
-$SRC_H5DUMP_TESTFILES/tdset-3s.ddl
-$SRC_H5DUMP_TESTFILES/tempty.ddl
-$SRC_H5DUMP_TESTFILES/texceedsubstart.ddl
-$SRC_H5DUMP_TESTFILES/texceedsubcount.ddl
-$SRC_H5DUMP_TESTFILES/texceedsubstride.ddl
-$SRC_H5DUMP_TESTFILES/texceedsubblock.ddl
-$SRC_H5DUMP_TESTFILES/texternal.ddl
-$SRC_H5DUMP_TESTFILES/textlinksrc.ddl
-$SRC_H5DUMP_TESTFILES/textlinkfar.ddl
-$SRC_H5DUMP_TESTFILES/textlink.ddl
-$SRC_H5DUMP_TESTFILES/tfamily.ddl
-$SRC_H5DUMP_TESTFILES/tfill.ddl
-$SRC_H5DUMP_TESTFILES/tfletcher32.ddl
-$SRC_H5DUMP_TESTFILES/tfloatsattrs.ddl
-$SRC_H5DUMP_TESTFILES/tfpformat.ddl
-$SRC_H5DUMP_TESTFILES/tgroup-1.ddl
-$SRC_H5DUMP_TESTFILES/tgroup-2.ddl
-$SRC_H5DUMP_TESTFILES/tgrp_comments.ddl
-$SRC_H5DUMP_TESTFILES/tgrpnullspace.ddl
-$SRC_H5DUMP_TESTFILES/thlink-1.ddl
-$SRC_H5DUMP_TESTFILES/thlink-2.ddl
-$SRC_H5DUMP_TESTFILES/thlink-3.ddl
-$SRC_H5DUMP_TESTFILES/thlink-4.ddl
-$SRC_H5DUMP_TESTFILES/thlink-5.ddl
-$SRC_H5DUMP_TESTFILES/thyperslab.ddl
-$SRC_H5DUMP_TESTFILES/tindicesno.ddl
-$SRC_H5DUMP_TESTFILES/tindicessub1.ddl
-$SRC_H5DUMP_TESTFILES/tindicessub2.ddl
-$SRC_H5DUMP_TESTFILES/tindicessub3.ddl
-$SRC_H5DUMP_TESTFILES/tindicessub4.ddl
-$SRC_H5DUMP_TESTFILES/tindicesyes.ddl
-$SRC_H5DUMP_TESTFILES/tints4dims.ddl
-$SRC_H5DUMP_TESTFILES/tints4dimsBlock2.ddl
-$SRC_H5DUMP_TESTFILES/tints4dimsBlockEq.ddl
-$SRC_H5DUMP_TESTFILES/tints4dimsCount2.ddl
-$SRC_H5DUMP_TESTFILES/tints4dimsCountEq.ddl
-$SRC_H5DUMP_TESTFILES/tints4dimsStride2.ddl
-$SRC_H5DUMP_TESTFILES/tintsattrs.ddl
-$SRC_H5DUMP_TESTFILES/tlarge_objname.ddl
-$SRC_H5DUMP_TESTFILES/tldouble.ddl
-$SRC_H5DUMP_TESTFILES/tldouble_scalar.ddl
-$SRC_H5DUMP_TESTFILES/tlonglinks.ddl
-$SRC_H5DUMP_TESTFILES/tloop-1.ddl
-$SRC_H5DUMP_TESTFILES/tmulti.ddl
-$SRC_H5DUMP_TESTFILES/tmultifile.ddl
-$SRC_H5DUMP_TESTFILES/tqmarkfile.ddl
-$SRC_H5DUMP_TESTFILES/tstarfile.ddl
-$SRC_H5DUMP_TESTFILES/tnamed_dtype_attr.ddl
-$SRC_H5DUMP_TESTFILES/tnestcomp-1.ddl
-$SRC_H5DUMP_TESTFILES/tnestedcmpddt.ddl
-$SRC_H5DUMP_TESTFILES/tnbit.ddl
-$SRC_H5DUMP_TESTFILES/tnoattrdata.ddl
-$SRC_H5DUMP_TESTFILES/tnoattrddl.ddl
-$SRC_H5DUMP_TESTFILES/tnodata.ddl
-$SRC_H5DUMP_TESTFILES/tnoddl.ddl
-$SRC_H5DUMP_TESTFILES/tnoddlfile.ddl
-$SRC_H5DUMP_TESTFILES/tnoddlfile.exp
-$SRC_H5DUMP_TESTFILES/tno-subset.ddl
-$SRC_H5DUMP_TESTFILES/tnullspace.ddl
-$SRC_H5DUMP_TESTFILES/trawdatafile.ddl
-$SRC_H5DUMP_TESTFILES/trawdatafile.exp
-$SRC_H5DUMP_TESTFILES/trawssetfile.ddl
-$SRC_H5DUMP_TESTFILES/trawssetfile.exp
-$SRC_H5DUMP_TESTFILES/zerodim.ddl
-$SRC_H5DUMP_TESTFILES/tordergr1.ddl
-$SRC_H5DUMP_TESTFILES/tordergr2.ddl
-$SRC_H5DUMP_TESTFILES/tordergr3.ddl
-$SRC_H5DUMP_TESTFILES/tordergr4.ddl
-$SRC_H5DUMP_TESTFILES/tordergr5.ddl
-$SRC_H5DUMP_TESTFILES/torderattr1.ddl
-$SRC_H5DUMP_TESTFILES/torderattr2.ddl
-$SRC_H5DUMP_TESTFILES/torderattr3.ddl
-$SRC_H5DUMP_TESTFILES/torderattr4.ddl
-$SRC_H5DUMP_TESTFILES/tordercontents1.ddl
-$SRC_H5DUMP_TESTFILES/tordercontents2.ddl
-$SRC_H5DUMP_TESTFILES/torderlinks1.ddl
-$SRC_H5DUMP_TESTFILES/torderlinks2.ddl
-$SRC_H5DUMP_TESTFILES/tperror.ddl
-$SRC_H5DUMP_TESTFILES/treadfilter.ddl
-$SRC_H5DUMP_TESTFILES/treadintfilter.ddl
-$SRC_H5DUMP_TESTFILES/treference.ddl
-$SRC_H5DUMP_TESTFILES/tsaf.ddl
-$SRC_H5DUMP_TESTFILES/tscalarattrintsize.ddl
-$SRC_H5DUMP_TESTFILES/tscalarintattrsize.ddl
-$SRC_H5DUMP_TESTFILES/tscalarintsize.ddl
-$SRC_H5DUMP_TESTFILES/tscalarstring.ddl
-$SRC_H5DUMP_TESTFILES/tscaleoffset.ddl
-$SRC_H5DUMP_TESTFILES/tshuffle.ddl
-$SRC_H5DUMP_TESTFILES/tslink-1.ddl
-$SRC_H5DUMP_TESTFILES/tslink-2.ddl
-$SRC_H5DUMP_TESTFILES/tslink-D.ddl
-$SRC_H5DUMP_TESTFILES/tsplit_file.ddl
-$SRC_H5DUMP_TESTFILES/tstr-1.ddl
-$SRC_H5DUMP_TESTFILES/tstr-2.ddl
-$SRC_H5DUMP_TESTFILES/tstr2bin2.exp
-$SRC_H5DUMP_TESTFILES/tstr2bin6.exp
-$SRC_H5DUMP_TESTFILES/tstring.ddl
-$SRC_H5DUMP_TESTFILES/tstring2.ddl
-$SRC_H5DUMP_TESTFILES/tstringe.ddl
-$SRC_H5DUMP_TESTFILES/tszip.ddl
-$SRC_H5DUMP_TESTFILES/tudlink-1.ddl
-$SRC_H5DUMP_TESTFILES/tudlink-2.ddl
-$SRC_H5DUMP_TESTFILES/tuserfilter.ddl
-$SRC_H5DUMP_TESTFILES/tvldtypes1.ddl
-$SRC_H5DUMP_TESTFILES/tvldtypes2.ddl
-$SRC_H5DUMP_TESTFILES/tvldtypes3.ddl
-$SRC_H5DUMP_TESTFILES/tvldtypes4.ddl
-$SRC_H5DUMP_TESTFILES/tvldtypes5.ddl
-$SRC_H5DUMP_TESTFILES/tvlenstr_array.ddl
-$SRC_H5DUMP_TESTFILES/tvlstr.ddl
-$SRC_H5DUMP_TESTFILES/tvms.ddl
-$SRC_H5DUMP_TESTFILES/twidedisplay.ddl
-$SRC_H5DUMP_TESTFILES/twithddl.exp
-$SRC_H5DUMP_TESTFILES/twithddlfile.ddl
-$SRC_H5DUMP_TESTFILES/twithddlfile.exp
-$SRC_H5DUMP_TESTFILES/h5dump-help.txt
-$SRC_H5DUMP_TESTFILES/out3.h5import
-$SRC_H5DUMP_TESTFILES/tbinregR.exp
-$SRC_H5DUMP_TESTFILES/err_attr_dspace.ddl
-$SRC_H5DUMP_TESTFILES/tst_onion_objs.ddl
-$SRC_H5DUMP_TESTFILES/tst_onion_dset_ext.ddl
-$SRC_H5DUMP_TESTFILES/tst_onion_dset_1d.ddl
-$SRC_H5DUMP_TESTFILES/tst_onion_revision_count.ddl
+$SRC_H5DUMP_OUTFILES/charsets.ddl
+$SRC_H5DUMP_OUTFILES/file_space.ddl
+$SRC_H5DUMP_OUTFILES/filter_fail.ddl
+$SRC_H5DUMP_OUTFILES/non_existing.ddl
+$SRC_H5DUMP_OUTFILES/packedbits.ddl
+$SRC_H5DUMP_OUTFILES/tall-1.ddl
+$SRC_H5DUMP_OUTFILES/tall-2.ddl
+$SRC_H5DUMP_OUTFILES/tall-2A.ddl
+$SRC_H5DUMP_OUTFILES/tall-2A0.ddl
+$SRC_H5DUMP_OUTFILES/tall-2B.ddl
+$SRC_H5DUMP_OUTFILES/tall-3.ddl
+$SRC_H5DUMP_OUTFILES/tall-4s.ddl
+$SRC_H5DUMP_OUTFILES/tall-5s.ddl
+$SRC_H5DUMP_OUTFILES/tall-6.ddl
+$SRC_H5DUMP_OUTFILES/tall-7.ddl
+$SRC_H5DUMP_OUTFILES/tall-7N.ddl
+$SRC_H5DUMP_OUTFILES/tallfilters.ddl
+$SRC_H5DUMP_OUTFILES/tarray1.ddl
+$SRC_H5DUMP_OUTFILES/tarray1_big.ddl
+$SRC_H5DUMP_OUTFILES/tarray2.ddl
+$SRC_H5DUMP_OUTFILES/tarray3.ddl
+$SRC_H5DUMP_OUTFILES/tarray4.ddl
+$SRC_H5DUMP_OUTFILES/tarray5.ddl
+$SRC_H5DUMP_OUTFILES/tarray6.ddl
+$SRC_H5DUMP_OUTFILES/tarray7.ddl
+$SRC_H5DUMP_OUTFILES/tarray8.ddl
+$SRC_H5DUMP_OUTFILES/tattr-1.ddl
+$SRC_H5DUMP_OUTFILES/tattr-2.ddl
+$SRC_H5DUMP_OUTFILES/tattr-3.ddl
+$SRC_H5DUMP_OUTFILES/tattr-4_be.ddl
+$SRC_H5DUMP_OUTFILES/tattrcontents1.ddl
+$SRC_H5DUMP_OUTFILES/tattrcontents2.ddl
+$SRC_H5DUMP_OUTFILES/tattrintsize.ddl
+$SRC_H5DUMP_OUTFILES/tattrreg.ddl
+$SRC_H5DUMP_OUTFILES/tattrregR.ddl
+$SRC_H5DUMP_OUTFILES/tbin1.ddl
+$SRC_H5DUMP_OUTFILES/tbin1.ddl
+$SRC_H5DUMP_OUTFILES/tbin2.ddl
+$SRC_H5DUMP_OUTFILES/tbin3.ddl
+$SRC_H5DUMP_OUTFILES/tbin4.ddl
+$SRC_H5DUMP_OUTFILES/tbinregR.ddl
+$SRC_H5DUMP_OUTFILES/tbigdims.ddl
+$SRC_H5DUMP_OUTFILES/tbitnopaque_be.ddl
+$SRC_H5DUMP_OUTFILES/tbitnopaque_le.ddl
+$SRC_H5DUMP_OUTFILES/tboot1.ddl
+$SRC_H5DUMP_OUTFILES/tboot2.ddl
+$SRC_H5DUMP_OUTFILES/tboot2A.ddl
+$SRC_H5DUMP_OUTFILES/tboot2B.ddl
+$SRC_H5DUMP_OUTFILES/tchar1.ddl
+$SRC_H5DUMP_OUTFILES/tchunked.ddl
+$SRC_H5DUMP_OUTFILES/tcmpdattrintsize.ddl
+$SRC_H5DUMP_OUTFILES/tcmpdintsize.ddl
+$SRC_H5DUMP_OUTFILES/tcomp-1.ddl
+$SRC_H5DUMP_OUTFILES/tcomp-2.ddl
+$SRC_H5DUMP_OUTFILES/tcomp-3.ddl
+$SRC_H5DUMP_OUTFILES/tcomp-4.ddl
+$SRC_H5DUMP_OUTFILES/tcompound_complex2.ddl
+$SRC_H5DUMP_OUTFILES/tcompact.ddl
+$SRC_H5DUMP_OUTFILES/tcontents.ddl
+$SRC_H5DUMP_OUTFILES/tcontiguos.ddl
+$SRC_H5DUMP_OUTFILES/tdatareg.ddl
+$SRC_H5DUMP_OUTFILES/tdataregR.ddl
+$SRC_H5DUMP_OUTFILES/tdeflate.ddl
+$SRC_H5DUMP_OUTFILES/tdset-1.ddl
+$SRC_H5DUMP_OUTFILES/tdset-2.ddl
+$SRC_H5DUMP_OUTFILES/tdset-3s.ddl
+$SRC_H5DUMP_OUTFILES/tempty.ddl
+$SRC_H5DUMP_OUTFILES/texceedsubstart.ddl
+$SRC_H5DUMP_OUTFILES/texceedsubcount.ddl
+$SRC_H5DUMP_OUTFILES/texceedsubstride.ddl
+$SRC_H5DUMP_OUTFILES/texceedsubblock.ddl
+$SRC_H5DUMP_OUTFILES/texternal.ddl
+$SRC_H5DUMP_OUTFILES/textlinksrc.ddl
+$SRC_H5DUMP_OUTFILES/textlinkfar.ddl
+$SRC_H5DUMP_OUTFILES/textlink.ddl
+$SRC_H5DUMP_OUTFILES/tfamily.ddl
+$SRC_H5DUMP_OUTFILES/tfill.ddl
+$SRC_H5DUMP_OUTFILES/tfletcher32.ddl
+$SRC_H5DUMP_OUTFILES/tfloatsattrs.ddl
+$SRC_H5DUMP_OUTFILES/tfpformat.ddl
+$SRC_H5DUMP_OUTFILES/tgroup-1.ddl
+$SRC_H5DUMP_OUTFILES/tgroup-2.ddl
+$SRC_H5DUMP_OUTFILES/tgrp_comments.ddl
+$SRC_H5DUMP_OUTFILES/tgrpnullspace.ddl
+$SRC_H5DUMP_OUTFILES/thlink-1.ddl
+$SRC_H5DUMP_OUTFILES/thlink-2.ddl
+$SRC_H5DUMP_OUTFILES/thlink-3.ddl
+$SRC_H5DUMP_OUTFILES/thlink-4.ddl
+$SRC_H5DUMP_OUTFILES/thlink-5.ddl
+$SRC_H5DUMP_OUTFILES/thyperslab.ddl
+$SRC_H5DUMP_OUTFILES/tindicesno.ddl
+$SRC_H5DUMP_OUTFILES/tindicessub1.ddl
+$SRC_H5DUMP_OUTFILES/tindicessub2.ddl
+$SRC_H5DUMP_OUTFILES/tindicessub3.ddl
+$SRC_H5DUMP_OUTFILES/tindicessub4.ddl
+$SRC_H5DUMP_OUTFILES/tindicesyes.ddl
+$SRC_H5DUMP_OUTFILES/tints4dims.ddl
+$SRC_H5DUMP_OUTFILES/tints4dimsBlock2.ddl
+$SRC_H5DUMP_OUTFILES/tints4dimsBlockEq.ddl
+$SRC_H5DUMP_OUTFILES/tints4dimsCount2.ddl
+$SRC_H5DUMP_OUTFILES/tints4dimsCountEq.ddl
+$SRC_H5DUMP_OUTFILES/tints4dimsStride2.ddl
+$SRC_H5DUMP_OUTFILES/tintsattrs.ddl
+$SRC_H5DUMP_OUTFILES/tlarge_objname.ddl
+$SRC_H5DUMP_OUTFILES/tldouble.ddl
+$SRC_H5DUMP_OUTFILES/tldouble_scalar.ddl
+$SRC_H5DUMP_OUTFILES/tlonglinks.ddl
+$SRC_H5DUMP_OUTFILES/tloop-1.ddl
+$SRC_H5DUMP_OUTFILES/tmulti.ddl
+$SRC_H5DUMP_OUTFILES/tmultifile.ddl
+$SRC_H5DUMP_OUTFILES/tqmarkfile.ddl
+$SRC_H5DUMP_OUTFILES/tstarfile.ddl
+$SRC_H5DUMP_OUTFILES/tnamed_dtype_attr.ddl
+$SRC_H5DUMP_OUTFILES/tnestcomp-1.ddl
+$SRC_H5DUMP_OUTFILES/tnestedcmpddt.ddl
+$SRC_H5DUMP_OUTFILES/tnbit.ddl
+$SRC_H5DUMP_OUTFILES/tnoattrdata.ddl
+$SRC_H5DUMP_OUTFILES/tnoattrddl.ddl
+$SRC_H5DUMP_OUTFILES/tnodata.ddl
+$SRC_H5DUMP_OUTFILES/tnoddl.ddl
+$SRC_H5DUMP_OUTFILES/tnoddlfile.ddl
+$SRC_H5DUMP_OUTFILES/tno-subset.ddl
+$SRC_H5DUMP_OUTFILES/tnullspace.ddl
+$SRC_H5DUMP_OUTFILES/trawdatafile.ddl
+$SRC_H5DUMP_OUTFILES/trawssetfile.ddl
+$SRC_H5DUMP_OUTFILES/zerodim.ddl
+$SRC_H5DUMP_OUTFILES/tordergr1.ddl
+$SRC_H5DUMP_OUTFILES/tordergr2.ddl
+$SRC_H5DUMP_OUTFILES/tordergr3.ddl
+$SRC_H5DUMP_OUTFILES/tordergr4.ddl
+$SRC_H5DUMP_OUTFILES/tordergr5.ddl
+$SRC_H5DUMP_OUTFILES/torderattr1.ddl
+$SRC_H5DUMP_OUTFILES/torderattr2.ddl
+$SRC_H5DUMP_OUTFILES/torderattr3.ddl
+$SRC_H5DUMP_OUTFILES/torderattr4.ddl
+$SRC_H5DUMP_OUTFILES/tordercontents1.ddl
+$SRC_H5DUMP_OUTFILES/tordercontents2.ddl
+$SRC_H5DUMP_OUTFILES/torderlinks1.ddl
+$SRC_H5DUMP_OUTFILES/torderlinks2.ddl
+$SRC_H5DUMP_OUTFILES/tperror.ddl
+$SRC_H5DUMP_OUTFILES/treadfilter.ddl
+$SRC_H5DUMP_OUTFILES/treadintfilter.ddl
+$SRC_H5DUMP_OUTFILES/treference.ddl
+$SRC_H5DUMP_OUTFILES/tsaf.ddl
+$SRC_H5DUMP_OUTFILES/tscalarattrintsize.ddl
+$SRC_H5DUMP_OUTFILES/tscalarintattrsize.ddl
+$SRC_H5DUMP_OUTFILES/tscalarintsize.ddl
+$SRC_H5DUMP_OUTFILES/tscalarstring.ddl
+$SRC_H5DUMP_OUTFILES/tscaleoffset.ddl
+$SRC_H5DUMP_OUTFILES/tshuffle.ddl
+$SRC_H5DUMP_OUTFILES/tslink-1.ddl
+$SRC_H5DUMP_OUTFILES/tslink-2.ddl
+$SRC_H5DUMP_OUTFILES/tslink-D.ddl
+$SRC_H5DUMP_OUTFILES/tsplit_file.ddl
+$SRC_H5DUMP_OUTFILES/tstr-1.ddl
+$SRC_H5DUMP_OUTFILES/tstr-2.ddl
+$SRC_H5DUMP_OUTFILES/tstring.ddl
+$SRC_H5DUMP_OUTFILES/tstring2.ddl
+$SRC_H5DUMP_OUTFILES/tstringe.ddl
+$SRC_H5DUMP_OUTFILES/tszip.ddl
+$SRC_H5DUMP_OUTFILES/tudlink-1.ddl
+$SRC_H5DUMP_OUTFILES/tudlink-2.ddl
+$SRC_H5DUMP_OUTFILES/tuserfilter.ddl
+$SRC_H5DUMP_OUTFILES/tvldtypes1.ddl
+$SRC_H5DUMP_OUTFILES/tvldtypes2.ddl
+$SRC_H5DUMP_OUTFILES/tvldtypes3.ddl
+$SRC_H5DUMP_OUTFILES/tvldtypes4.ddl
+$SRC_H5DUMP_OUTFILES/tvldtypes5.ddl
+$SRC_H5DUMP_OUTFILES/tvlenstr_array.ddl
+$SRC_H5DUMP_OUTFILES/tvlstr.ddl
+$SRC_H5DUMP_OUTFILES/tvms.ddl
+$SRC_H5DUMP_OUTFILES/twidedisplay.ddl
+$SRC_H5DUMP_OUTFILES/twithddlfile.ddl
+$SRC_H5DUMP_OUTFILES/h5dump-help.txt
+$SRC_H5DUMP_OUTFILES/out3.h5import
+$SRC_H5DUMP_OUTFILES/err_attr_dspace.ddl
+$SRC_H5DUMP_OUTFILES/tst_onion_objs.ddl
+$SRC_H5DUMP_OUTFILES/tst_onion_dset_ext.ddl
+$SRC_H5DUMP_OUTFILES/tst_onion_dset_1d.ddl
+$SRC_H5DUMP_OUTFILES/tst_onion_revision_count.ddl
+"
+
+LIST_EXPORT_TEST_FILES="
+$SRC_H5DUMP_EXPFILES/tall-6.exp
+$SRC_H5DUMP_EXPFILES/tbinregR.exp
+$SRC_H5DUMP_EXPFILES/tnoddlfile.exp
+$SRC_H5DUMP_EXPFILES/trawdatafile.exp
+$SRC_H5DUMP_EXPFILES/trawssetfile.exp
+$SRC_H5DUMP_EXPFILES/tstr2bin2.exp
+$SRC_H5DUMP_EXPFILES/tstr2bin6.exp
+$SRC_H5DUMP_EXPFILES/twithddl.exp
+$SRC_H5DUMP_EXPFILES/twithddlfile.exp
"
LIST_ERROR_TEST_FILES="
@@ -415,7 +419,7 @@ ${SRC_H5DUMP_ERRORFILES}/tslink-D.err
#
# copy test files and expected output files from source dirs to test dir
#
-COPY_TESTFILES="$LIST_HDF5_TEST_FILES $LIST_OTHER_TEST_FILES $LIST_ERROR_TEST_FILES"
+COPY_TESTFILES="$LIST_HDF5_TEST_FILES $LIST_OTHER_TEST_FILES $LIST_EXPORT_TEST_FILES $LIST_ERROR_TEST_FILES"
COPY_TESTFILES_TO_TESTDIR()
{
diff --git a/tools/test/h5dump/testh5dumppbits.sh.in b/tools/test/h5dump/testh5dumppbits.sh.in
index e638bb9287b..4094bfc8da7 100644
--- a/tools/test/h5dump/testh5dumppbits.sh.in
+++ b/tools/test/h5dump/testh5dumppbits.sh.in
@@ -45,11 +45,11 @@ verbose=yes
# source dirs
SRC_TOOLS="$srcdir/../.."
-SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles"
# testfiles source dirs for tools
-SRC_H5LS_TESTFILES="$SRC_TOOLS_TESTFILES"
-SRC_H5DUMP_TESTFILES="$SRC_TOOLS_TESTFILES"
-SRC_H5DUMP_ERRORFILES="$srcdir/errfiles"
+SRC_H5LS_TESTFILES="$SRC_TOOLS/test/h5ls/testfiles"
+SRC_H5DUMP_TESTFILES="$SRC_TOOLS/test/h5dump/testfiles"
+SRC_H5DUMP_OUTFILES="$SRC_TOOLS/test/h5dump/expected"
+SRC_H5DUMP_ERRORFILES="$SRC_TOOLS/test/h5dump/errfiles"
SRC_H5DIFF_TESTFILES="$SRC_TOOLS/test/h5diff/testfiles"
SRC_H5COPY_TESTFILES="$SRC_TOOLS/test/h5copy/testfiles"
SRC_H5REPACK_TESTFILES="$SRC_TOOLS/test/h5repack/testfiles"
@@ -78,75 +78,75 @@ $SRC_H5DUMP_TESTFILES/tcompound.h5
"
LIST_OTHER_TEST_FILES="
-$SRC_H5DUMP_TESTFILES/pbits/tnofilename-with-packed-bits.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsArray.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsCompound.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsIncomplete.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsLengthExceeded.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsCharLengthExceeded.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsIntLengthExceeded.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsLongLengthExceeded.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsLengthPositive.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsMax.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsMaxExceeded.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsOffsetExceeded.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsCharOffsetExceeded.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsIntOffsetExceeded.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsLongOffsetExceeded.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsOffsetNegative.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsOverlapped.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsSigned.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsigned.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedInt.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedInt.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedLong.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedLong.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedLongLong.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedLongLong.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedWhole.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedWhole.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedIntWhole.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedIntWhole.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedLongWhole.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedLongWhole.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedLongLongWhole.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedLongLongWhole.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedLongLongWhole1.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedLongLongWhole1.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedLongLongWhole63.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedLongLongWhole63.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsSigned4.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsigned4.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedInt8.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedInt8.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedLong16.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedLong16.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedLongLong32.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedLongLong32.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsSigned2.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsigned2.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedInt4.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedInt4.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedLong8.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedLong8.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedLongLong16.ddl
-$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedLongLong16.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tnofilename-with-packed-bits.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsArray.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsCompound.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsIncomplete.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsLengthExceeded.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsCharLengthExceeded.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsIntLengthExceeded.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsLongLengthExceeded.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsLengthPositive.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsMax.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsMaxExceeded.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsOffsetExceeded.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsCharOffsetExceeded.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsIntOffsetExceeded.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsLongOffsetExceeded.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsOffsetNegative.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsOverlapped.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsSigned.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsUnsigned.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsSignedInt.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsUnsignedInt.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsSignedLong.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsUnsignedLong.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsSignedLongLong.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsUnsignedLongLong.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsSignedWhole.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsUnsignedWhole.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsSignedIntWhole.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsUnsignedIntWhole.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsSignedLongWhole.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsUnsignedLongWhole.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsSignedLongLongWhole.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsUnsignedLongLongWhole.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsSignedLongLongWhole1.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsUnsignedLongLongWhole1.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsSignedLongLongWhole63.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsUnsignedLongLongWhole63.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsSigned4.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsUnsigned4.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsSignedInt8.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsUnsignedInt8.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsSignedLong16.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsUnsignedLong16.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsSignedLongLong32.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsUnsignedLongLong32.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsSigned2.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsUnsigned2.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsSignedInt4.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsUnsignedInt4.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsSignedLong8.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsUnsignedLong8.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsSignedLongLong16.ddl
+$SRC_H5DUMP_OUTFILES/pbits/tpbitsUnsignedLongLong16.ddl
"
LIST_ERROR_TEST_FILES="
-${SRC_H5DUMP_ERRORFILES}/tnofilename-with-packed-bits.err
-${SRC_H5DUMP_ERRORFILES}/tpbitsCharLengthExceeded.err
-${SRC_H5DUMP_ERRORFILES}/tpbitsCharOffsetExceeded.err
-${SRC_H5DUMP_ERRORFILES}/tpbitsIncomplete.err
-${SRC_H5DUMP_ERRORFILES}/tpbitsIntLengthExceeded.err
-${SRC_H5DUMP_ERRORFILES}/tpbitsIntOffsetExceeded.err
-${SRC_H5DUMP_ERRORFILES}/tpbitsLengthExceeded.err
-${SRC_H5DUMP_ERRORFILES}/tpbitsLengthPositive.err
-${SRC_H5DUMP_ERRORFILES}/tpbitsLongLengthExceeded.err
-${SRC_H5DUMP_ERRORFILES}/tpbitsLongOffsetExceeded.err
-${SRC_H5DUMP_ERRORFILES}/tpbitsMaxExceeded.err
-${SRC_H5DUMP_ERRORFILES}/tpbitsOffsetExceeded.err
-${SRC_H5DUMP_ERRORFILES}/tpbitsOffsetNegative.err
+${SRC_H5DUMP_ERRORFILES}/pbits/tnofilename-with-packed-bits.err
+${SRC_H5DUMP_ERRORFILES}/pbits/tpbitsCharLengthExceeded.err
+${SRC_H5DUMP_ERRORFILES}/pbits/tpbitsCharOffsetExceeded.err
+${SRC_H5DUMP_ERRORFILES}/pbits/tpbitsIncomplete.err
+${SRC_H5DUMP_ERRORFILES}/pbits/tpbitsIntLengthExceeded.err
+${SRC_H5DUMP_ERRORFILES}/pbits/tpbitsIntOffsetExceeded.err
+${SRC_H5DUMP_ERRORFILES}/pbits/tpbitsLengthExceeded.err
+${SRC_H5DUMP_ERRORFILES}/pbits/tpbitsLengthPositive.err
+${SRC_H5DUMP_ERRORFILES}/pbits/tpbitsLongLengthExceeded.err
+${SRC_H5DUMP_ERRORFILES}/pbits/tpbitsLongOffsetExceeded.err
+${SRC_H5DUMP_ERRORFILES}/pbits/tpbitsMaxExceeded.err
+${SRC_H5DUMP_ERRORFILES}/pbits/tpbitsOffsetExceeded.err
+${SRC_H5DUMP_ERRORFILES}/pbits/tpbitsOffsetNegative.err
"
#
diff --git a/tools/test/h5dump/testh5dumpvds.sh.in b/tools/test/h5dump/testh5dumpvds.sh.in
index 00e01e54532..e09e429eb39 100644
--- a/tools/test/h5dump/testh5dumpvds.sh.in
+++ b/tools/test/h5dump/testh5dumpvds.sh.in
@@ -45,10 +45,10 @@ verbose=yes
# source dirs
SRC_TOOLS="$srcdir/../.."
-SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles"
# testfiles source dirs for tools
-SRC_H5LS_TESTFILES="$SRC_TOOLS_TESTFILES"
-SRC_H5DUMP_TESTFILES="$SRC_TOOLS_TESTFILES"
+SRC_H5LS_TESTFILES="$SRC_TOOLS/test/h5ls/testfiles"
+SRC_H5DUMP_TESTFILES="$SRC_TOOLS/test/h5dump/testfiles"
+SRC_H5DUMP_OUTFILES="$SRC_TOOLS/test/h5dump/expected"
SRC_H5DUMP_ERRORFILES="$srcdir/errfiles"
SRC_H5DIFF_TESTFILES="$SRC_TOOLS/test/h5diff/testfiles"
SRC_H5COPY_TESTFILES="$SRC_TOOLS/test/h5copy/testfiles"
@@ -106,23 +106,23 @@ $SRC_H5DUMP_TESTFILES/vds/vds-eiger.h5
"
LIST_OTHER_TEST_FILES="
-$SRC_H5DUMP_TESTFILES/vds/tvds-1.ddl
-$SRC_H5DUMP_TESTFILES/vds/tvds-2.ddl
-$SRC_H5DUMP_TESTFILES/vds/tvds-3_1.ddl
-$SRC_H5DUMP_TESTFILES/vds/tvds-3_2.ddl
-$SRC_H5DUMP_TESTFILES/vds/tvds-4.ddl
-$SRC_H5DUMP_TESTFILES/vds/tvds-5.ddl
-$SRC_H5DUMP_TESTFILES/vds/tvds_layout-1.ddl
-$SRC_H5DUMP_TESTFILES/vds/tvds_layout-2.ddl
-$SRC_H5DUMP_TESTFILES/vds/tvds_layout-3_1.ddl
-$SRC_H5DUMP_TESTFILES/vds/tvds_layout-3_2.ddl
-$SRC_H5DUMP_TESTFILES/vds/tvds_layout-4.ddl
-$SRC_H5DUMP_TESTFILES/vds/tvds_layout-5.ddl
-$SRC_H5DUMP_TESTFILES/vds/vds-first.ddl
-$SRC_H5DUMP_TESTFILES/vds/vds-gap1.ddl
-$SRC_H5DUMP_TESTFILES/vds/vds-gap2.ddl
-$SRC_H5DUMP_TESTFILES/vds/vds_layout-eiger.ddl
-$SRC_H5DUMP_TESTFILES/vds/vds_layout-maxmin.ddl
+$SRC_H5DUMP_OUTFILES/vds/tvds-1.ddl
+$SRC_H5DUMP_OUTFILES/vds/tvds-2.ddl
+$SRC_H5DUMP_OUTFILES/vds/tvds-3_1.ddl
+$SRC_H5DUMP_OUTFILES/vds/tvds-3_2.ddl
+$SRC_H5DUMP_OUTFILES/vds/tvds-4.ddl
+$SRC_H5DUMP_OUTFILES/vds/tvds-5.ddl
+$SRC_H5DUMP_OUTFILES/vds/tvds_layout-1.ddl
+$SRC_H5DUMP_OUTFILES/vds/tvds_layout-2.ddl
+$SRC_H5DUMP_OUTFILES/vds/tvds_layout-3_1.ddl
+$SRC_H5DUMP_OUTFILES/vds/tvds_layout-3_2.ddl
+$SRC_H5DUMP_OUTFILES/vds/tvds_layout-4.ddl
+$SRC_H5DUMP_OUTFILES/vds/tvds_layout-5.ddl
+$SRC_H5DUMP_OUTFILES/vds/vds-first.ddl
+$SRC_H5DUMP_OUTFILES/vds/vds-gap1.ddl
+$SRC_H5DUMP_OUTFILES/vds/vds-gap2.ddl
+$SRC_H5DUMP_OUTFILES/vds/vds_layout-eiger.ddl
+$SRC_H5DUMP_OUTFILES/vds/vds_layout-maxmin.ddl
"
LIST_ERROR_TEST_FILES="
diff --git a/tools/test/h5dump/testh5dumpxml.sh.in b/tools/test/h5dump/testh5dumpxml.sh.in
index cebdb972069..b433fa210e3 100644
--- a/tools/test/h5dump/testh5dumpxml.sh.in
+++ b/tools/test/h5dump/testh5dumpxml.sh.in
@@ -37,16 +37,16 @@ verbose=yes
# source dirs
SRC_TOOLS="$srcdir/../.."
-SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles"
# testfiles source dirs for tools
-SRC_H5LS_TESTFILES="$SRC_TOOLS_TESTFILES"
-SRC_H5DUMP_TESTFILES="$SRC_TOOLS_TESTFILES"
+SRC_H5LS_TESTFILES="$SRC_TOOLS/test/h5ls/testfiles"
+SRC_H5DUMP_TESTFILES="$SRC_TOOLS/test/h5dump/testfiles"
SRC_H5DIFF_TESTFILES="$SRC_TOOLS/test/h5diff/testfiles"
SRC_H5COPY_TESTFILES="$SRC_TOOLS/test/h5copy/testfiles"
SRC_H5REPACK_TESTFILES="$SRC_TOOLS/test/h5repack/testfiles"
SRC_H5JAM_TESTFILES="$SRC_TOOLS/test/h5jam/testfiles"
SRC_H5STAT_TESTFILES="$SRC_TOOLS/test/h5stat/testfiles"
SRC_H5IMPORT_TESTFILES="$SRC_TOOLS/test/h5import/testfiles"
+SRC_H5DUMP_OUTFILES="$SRC_TOOLS/test/h5dump/expected"
TEST_P_DIR=./testfiles
TESTDIR=./testfiles/xml
@@ -63,6 +63,30 @@ test -d $TESTDIR || mkdir -p $TESTDIR
# Comment '#' without space can be used.
# --------------------------------------------------------------------
LIST_HDF5_TEST_FILES_XML="
+$SRC_H5DUMP_TESTFILES/xml/tbitfields.h5
+$SRC_H5DUMP_TESTFILES/xml/tcompound2.h5
+$SRC_H5DUMP_TESTFILES/xml/tdset2.h5
+$SRC_H5DUMP_TESTFILES/xml/tenum.h5
+$SRC_H5DUMP_TESTFILES/xml/test35.nc
+$SRC_H5DUMP_TESTFILES/xml/tloop2.h5
+$SRC_H5DUMP_TESTFILES/xml/tmany.h5
+$SRC_H5DUMP_TESTFILES/xml/tname-amp.h5
+$SRC_H5DUMP_TESTFILES/xml/tname-apos.h5
+$SRC_H5DUMP_TESTFILES/xml/tname-gt.h5
+$SRC_H5DUMP_TESTFILES/xml/tname-lt.h5
+$SRC_H5DUMP_TESTFILES/xml/tname-quot.h5
+$SRC_H5DUMP_TESTFILES/xml/tname-sp.h5
+$SRC_H5DUMP_TESTFILES/xml/tnodata.h5
+$SRC_H5DUMP_TESTFILES/xml/tobjref.h5
+$SRC_H5DUMP_TESTFILES/xml/topaque.h5
+$SRC_H5DUMP_TESTFILES/xml/tref.h5
+$SRC_H5DUMP_TESTFILES/xml/tref-escapes.h5
+$SRC_H5DUMP_TESTFILES/xml/tref-escapes-at.h5
+$SRC_H5DUMP_TESTFILES/xml/tstring.h5
+$SRC_H5DUMP_TESTFILES/xml/tstring-at.h5
+"
+
+LIST_HDF5_TEST_FILES="
$SRC_H5DUMP_TESTFILES/tall.h5
$SRC_H5DUMP_TESTFILES/tarray1.h5
$SRC_H5DUMP_TESTFILES/tarray2.h5
@@ -70,43 +94,22 @@ $SRC_H5DUMP_TESTFILES/tarray3.h5
$SRC_H5DUMP_TESTFILES/tarray6.h5
$SRC_H5DUMP_TESTFILES/tarray7.h5
$SRC_H5DUMP_TESTFILES/tattr.h5
-$SRC_H5DUMP_TESTFILES/tbitfields.h5
$SRC_H5DUMP_TESTFILES/tcompound.h5
-$SRC_H5DUMP_TESTFILES/tcompound2.h5
$SRC_H5DUMP_TESTFILES/tcompound_complex.h5
$SRC_H5DUMP_TESTFILES/tdatareg.h5
$SRC_H5DUMP_TESTFILES/tdset.h5
-$SRC_H5DUMP_TESTFILES/tdset2.h5
$SRC_H5DUMP_TESTFILES/tempty.h5
-$SRC_H5DUMP_TESTFILES/tenum.h5
-$SRC_H5DUMP_TESTFILES/test35.nc
$SRC_H5DUMP_TESTFILES/textlink.h5
$SRC_H5DUMP_TESTFILES/tfpformat.h5
$SRC_H5DUMP_TESTFILES/tgroup.h5
$SRC_H5DUMP_TESTFILES/thlink.h5
$SRC_H5DUMP_TESTFILES/tloop.h5
-$SRC_H5DUMP_TESTFILES/tloop2.h5
-$SRC_H5DUMP_TESTFILES/tmany.h5
-$SRC_H5DUMP_TESTFILES/tname-amp.h5
-$SRC_H5DUMP_TESTFILES/tname-apos.h5
-$SRC_H5DUMP_TESTFILES/tname-gt.h5
-$SRC_H5DUMP_TESTFILES/tname-lt.h5
-$SRC_H5DUMP_TESTFILES/tname-quot.h5
-$SRC_H5DUMP_TESTFILES/tname-sp.h5
$SRC_H5DUMP_TESTFILES/tnamed_dtype_attr.h5
$SRC_H5DUMP_TESTFILES/tnestedcomp.h5
-$SRC_H5DUMP_TESTFILES/tnodata.h5
$SRC_H5DUMP_TESTFILES/tnullspace.h5
-$SRC_H5DUMP_TESTFILES/tobjref.h5
-$SRC_H5DUMP_TESTFILES/topaque.h5
$SRC_H5DUMP_TESTFILES/torderattr.h5
-$SRC_H5DUMP_TESTFILES/tref.h5
-$SRC_H5DUMP_TESTFILES/tref-escapes.h5
-$SRC_H5DUMP_TESTFILES/tref-escapes-at.h5
$SRC_H5DUMP_TESTFILES/tsaf.h5
$SRC_H5DUMP_TESTFILES/tslink.h5
-$SRC_H5DUMP_TESTFILES/tstring.h5
-$SRC_H5DUMP_TESTFILES/tstring-at.h5
$SRC_H5DUMP_TESTFILES/tstr.h5
$SRC_H5DUMP_TESTFILES/tstr2.h5
$SRC_H5DUMP_TESTFILES/tudlink.h5
@@ -119,78 +122,78 @@ $SRC_H5DUMP_TESTFILES/tvlstr.h5
"
LIST_OTHER_TEST_FILES_XML="
-$SRC_H5DUMP_TESTFILES/tall.h5.xml
-$SRC_H5DUMP_TESTFILES/tall-2A.h5.xml
-$SRC_H5DUMP_TESTFILES/tarray1.h5.xml
-$SRC_H5DUMP_TESTFILES/tarray2.h5.xml
-$SRC_H5DUMP_TESTFILES/tarray3.h5.xml
-$SRC_H5DUMP_TESTFILES/tarray6.h5.xml
-$SRC_H5DUMP_TESTFILES/tarray7.h5.xml
-$SRC_H5DUMP_TESTFILES/tattr.h5.xml
-$SRC_H5DUMP_TESTFILES/tbitfields_be.h5.xml
-$SRC_H5DUMP_TESTFILES/tbitfields_le.h5.xml
-$SRC_H5DUMP_TESTFILES/tcompound_complex.h5.xml
-$SRC_H5DUMP_TESTFILES/tcompound.h5.xml
-$SRC_H5DUMP_TESTFILES/tcompound2.h5.xml
-$SRC_H5DUMP_TESTFILES/tdatareg.h5.xml
-$SRC_H5DUMP_TESTFILES/tdset.h5.xml
-$SRC_H5DUMP_TESTFILES/tdset2.h5.xml
-$SRC_H5DUMP_TESTFILES/tempty.h5.xml
-$SRC_H5DUMP_TESTFILES/tempty-dtd.h5.xml
-$SRC_H5DUMP_TESTFILES/tempty-dtd-2.h5.xml
-$SRC_H5DUMP_TESTFILES/tempty-dtd-uri.h5.xml
-$SRC_H5DUMP_TESTFILES/tempty-nons.h5.xml
-$SRC_H5DUMP_TESTFILES/tempty-nons-2.h5.xml
-$SRC_H5DUMP_TESTFILES/tempty-nons-uri.h5.xml
-$SRC_H5DUMP_TESTFILES/tempty-ns.h5.xml
-$SRC_H5DUMP_TESTFILES/tempty-ns-2.h5.xml
-$SRC_H5DUMP_TESTFILES/tenum.h5.xml
-$SRC_H5DUMP_TESTFILES/test35.nc.xml
-$SRC_H5DUMP_TESTFILES/textlink.h5.xml
-$SRC_H5DUMP_TESTFILES/tfpformat.h5.xml
-$SRC_H5DUMP_TESTFILES/tgroup.h5.xml
-$SRC_H5DUMP_TESTFILES/thlink.h5.xml
-$SRC_H5DUMP_TESTFILES/tloop.h5.xml
-$SRC_H5DUMP_TESTFILES/tloop2.h5.xml
-$SRC_H5DUMP_TESTFILES/tmany.h5.xml
-$SRC_H5DUMP_TESTFILES/tname-amp.h5.xml
-$SRC_H5DUMP_TESTFILES/tname-apos.h5.xml
-$SRC_H5DUMP_TESTFILES/tnamed_dtype_attr.h5.xml
-$SRC_H5DUMP_TESTFILES/tname-gt.h5.xml
-$SRC_H5DUMP_TESTFILES/tname-lt.h5.xml
-$SRC_H5DUMP_TESTFILES/tname-quot.h5.xml
-$SRC_H5DUMP_TESTFILES/tname-sp.h5.xml
-$SRC_H5DUMP_TESTFILES/tnestedcomp.h5.xml
-$SRC_H5DUMP_TESTFILES/tnodata.h5.xml
-$SRC_H5DUMP_TESTFILES/tnullspace.h5.xml
-$SRC_H5DUMP_TESTFILES/tobjref.h5.xml
-$SRC_H5DUMP_TESTFILES/topaque.h5.xml
-$SRC_H5DUMP_TESTFILES/torderattr1.h5.xml
-$SRC_H5DUMP_TESTFILES/torderattr2.h5.xml
-$SRC_H5DUMP_TESTFILES/torderattr3.h5.xml
-$SRC_H5DUMP_TESTFILES/torderattr4.h5.xml
-$SRC_H5DUMP_TESTFILES/tref.h5.xml
-$SRC_H5DUMP_TESTFILES/tref-escapes.h5.xml
-$SRC_H5DUMP_TESTFILES/tref-escapes-at.h5.xml
-$SRC_H5DUMP_TESTFILES/tsaf.h5.xml
-$SRC_H5DUMP_TESTFILES/tslink.h5.xml
-$SRC_H5DUMP_TESTFILES/tstr.h5.xml
-$SRC_H5DUMP_TESTFILES/tstr2.h5.xml
-$SRC_H5DUMP_TESTFILES/tstring.h5.xml
-$SRC_H5DUMP_TESTFILES/tstring-at.h5.xml
-$SRC_H5DUMP_TESTFILES/tudlink.h5.xml
-$SRC_H5DUMP_TESTFILES/tvldtypes1.h5.xml
-$SRC_H5DUMP_TESTFILES/tvldtypes2.h5.xml
-$SRC_H5DUMP_TESTFILES/tvldtypes3.h5.xml
-$SRC_H5DUMP_TESTFILES/tvldtypes4.h5.xml
-$SRC_H5DUMP_TESTFILES/tvldtypes5.h5.xml
-$SRC_H5DUMP_TESTFILES/tvlstr.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tall.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tall-2A.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tarray1.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tarray2.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tarray3.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tarray6.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tarray7.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tattr.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tbitfields_be.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tbitfields_le.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tcompound_complex.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tcompound.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tcompound2.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tdatareg.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tdset.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tdset2.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tempty.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tempty-dtd.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tempty-dtd-2.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tempty-dtd-uri.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tempty-nons.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tempty-nons-2.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tempty-nons-uri.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tempty-ns.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tempty-ns-2.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tenum.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/test35.nc.xml
+$SRC_H5DUMP_OUTFILES/xml/textlink.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tfpformat.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tgroup.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/thlink.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tloop.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tloop2.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tmany.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tname-amp.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tname-apos.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tnamed_dtype_attr.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tname-gt.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tname-lt.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tname-quot.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tname-sp.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tnestedcomp.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tnodata.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tnullspace.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tobjref.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/topaque.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/torderattr1.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/torderattr2.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/torderattr3.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/torderattr4.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tref.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tref-escapes.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tref-escapes-at.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tsaf.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tslink.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tstr.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tstr2.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tstring.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tstring-at.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tudlink.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tvldtypes1.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tvldtypes2.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tvldtypes3.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tvldtypes4.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tvldtypes5.h5.xml
+$SRC_H5DUMP_OUTFILES/xml/tvlstr.h5.xml
"
#
# copy test files and expected output files from source dirs to test dir
#
-COPY_TESTFILES="$LIST_HDF5_TEST_FILES_XML $LIST_OTHER_TEST_FILES_XML"
+COPY_TESTFILES="$LIST_HDF5_TEST_FILES $LIST_HDF5_TEST_FILES_XML $LIST_OTHER_TEST_FILES_XML"
COPY_TESTFILES_TO_TESTDIR()
{
diff --git a/tools/test/h5format_convert/CMakeTests.cmake b/tools/test/h5format_convert/CMakeTests.cmake
index 73cb2ee6f59..3046521a365 100644
--- a/tools/test/h5format_convert/CMakeTests.cmake
+++ b/tools/test/h5format_convert/CMakeTests.cmake
@@ -79,15 +79,15 @@
add_custom_target(h5fc-files ALL COMMENT "Copying files needed by h5fc tests")
foreach (ddl_file ${HDF5_REFERENCE_FILES})
- HDFTEST_COPY_FILE("${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/testfiles/${ddl_file}" "${PROJECT_BINARY_DIR}/testfiles/${ddl_file}" "h5fc_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/expected/${ddl_file}" "${PROJECT_BINARY_DIR}/testfiles/${ddl_file}" "h5fc_files")
endforeach ()
foreach (h5_file ${HDF5_REFERENCE_ERR_FILES})
- HDFTEST_COPY_FILE("${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5fc_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/expected/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5fc_files")
endforeach ()
foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
- HDFTEST_COPY_FILE("${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5fc_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5fc_files")
endforeach ()
add_custom_target(h5fc_files ALL COMMENT "Copying files needed by h5fc tests" DEPENDS ${h5fc_files_list})
diff --git a/tools/test/h5format_convert/testfiles/h5fc_d_file-d.ddl b/tools/test/h5format_convert/expected/h5fc_d_file-d.ddl
similarity index 100%
rename from tools/test/h5format_convert/testfiles/h5fc_d_file-d.ddl
rename to tools/test/h5format_convert/expected/h5fc_d_file-d.ddl
diff --git a/tools/test/h5format_convert/testfiles/h5fc_d_file.ddl b/tools/test/h5format_convert/expected/h5fc_d_file.ddl
similarity index 100%
rename from tools/test/h5format_convert/testfiles/h5fc_d_file.ddl
rename to tools/test/h5format_convert/expected/h5fc_d_file.ddl
diff --git a/tools/test/h5format_convert/testfiles/h5fc_d_file.ddl.err b/tools/test/h5format_convert/expected/h5fc_d_file.ddl.err
similarity index 100%
rename from tools/test/h5format_convert/testfiles/h5fc_d_file.ddl.err
rename to tools/test/h5format_convert/expected/h5fc_d_file.ddl.err
diff --git a/tools/test/h5format_convert/testfiles/h5fc_dname.ddl b/tools/test/h5format_convert/expected/h5fc_dname.ddl
similarity index 100%
rename from tools/test/h5format_convert/testfiles/h5fc_dname.ddl
rename to tools/test/h5format_convert/expected/h5fc_dname.ddl
diff --git a/tools/test/h5format_convert/testfiles/h5fc_dname.err b/tools/test/h5format_convert/expected/h5fc_dname.err
similarity index 100%
rename from tools/test/h5format_convert/testfiles/h5fc_dname.err
rename to tools/test/h5format_convert/expected/h5fc_dname.err
diff --git a/tools/test/h5format_convert/testfiles/h5fc_ext1_f.ddl b/tools/test/h5format_convert/expected/h5fc_ext1_f.ddl
similarity index 100%
rename from tools/test/h5format_convert/testfiles/h5fc_ext1_f.ddl
rename to tools/test/h5format_convert/expected/h5fc_ext1_f.ddl
diff --git a/tools/test/h5format_convert/testfiles/h5fc_ext1_i.ddl b/tools/test/h5format_convert/expected/h5fc_ext1_i.ddl
similarity index 100%
rename from tools/test/h5format_convert/testfiles/h5fc_ext1_i.ddl
rename to tools/test/h5format_convert/expected/h5fc_ext1_i.ddl
diff --git a/tools/test/h5format_convert/testfiles/h5fc_ext1_s.ddl b/tools/test/h5format_convert/expected/h5fc_ext1_s.ddl
similarity index 100%
rename from tools/test/h5format_convert/testfiles/h5fc_ext1_s.ddl
rename to tools/test/h5format_convert/expected/h5fc_ext1_s.ddl
diff --git a/tools/test/h5format_convert/testfiles/h5fc_ext2_if.ddl b/tools/test/h5format_convert/expected/h5fc_ext2_if.ddl
similarity index 100%
rename from tools/test/h5format_convert/testfiles/h5fc_ext2_if.ddl
rename to tools/test/h5format_convert/expected/h5fc_ext2_if.ddl
diff --git a/tools/test/h5format_convert/testfiles/h5fc_ext2_is.ddl b/tools/test/h5format_convert/expected/h5fc_ext2_is.ddl
similarity index 100%
rename from tools/test/h5format_convert/testfiles/h5fc_ext2_is.ddl
rename to tools/test/h5format_convert/expected/h5fc_ext2_is.ddl
diff --git a/tools/test/h5format_convert/testfiles/h5fc_ext2_sf.ddl b/tools/test/h5format_convert/expected/h5fc_ext2_sf.ddl
similarity index 100%
rename from tools/test/h5format_convert/testfiles/h5fc_ext2_sf.ddl
rename to tools/test/h5format_convert/expected/h5fc_ext2_sf.ddl
diff --git a/tools/test/h5format_convert/testfiles/h5fc_ext3_isf.ddl b/tools/test/h5format_convert/expected/h5fc_ext3_isf.ddl
similarity index 100%
rename from tools/test/h5format_convert/testfiles/h5fc_ext3_isf.ddl
rename to tools/test/h5format_convert/expected/h5fc_ext3_isf.ddl
diff --git a/tools/test/h5format_convert/testfiles/h5fc_help.ddl b/tools/test/h5format_convert/expected/h5fc_help.ddl
similarity index 100%
rename from tools/test/h5format_convert/testfiles/h5fc_help.ddl
rename to tools/test/h5format_convert/expected/h5fc_help.ddl
diff --git a/tools/test/h5format_convert/testfiles/h5fc_nonexistdset_file.ddl.err b/tools/test/h5format_convert/expected/h5fc_nonexistdset_file.ddl.err
similarity index 100%
rename from tools/test/h5format_convert/testfiles/h5fc_nonexistdset_file.ddl.err
rename to tools/test/h5format_convert/expected/h5fc_nonexistdset_file.ddl.err
diff --git a/tools/test/h5format_convert/testfiles/h5fc_nonexistfile.ddl.err b/tools/test/h5format_convert/expected/h5fc_nonexistfile.ddl.err
similarity index 100%
rename from tools/test/h5format_convert/testfiles/h5fc_nonexistfile.ddl.err
rename to tools/test/h5format_convert/expected/h5fc_nonexistfile.ddl.err
diff --git a/tools/test/h5format_convert/testfiles/h5fc_nooption.ddl b/tools/test/h5format_convert/expected/h5fc_nooption.ddl
similarity index 100%
rename from tools/test/h5format_convert/testfiles/h5fc_nooption.ddl
rename to tools/test/h5format_convert/expected/h5fc_nooption.ddl
diff --git a/tools/test/h5format_convert/testfiles/h5fc_v_all.ddl b/tools/test/h5format_convert/expected/h5fc_v_all.ddl
similarity index 100%
rename from tools/test/h5format_convert/testfiles/h5fc_v_all.ddl
rename to tools/test/h5format_convert/expected/h5fc_v_all.ddl
diff --git a/tools/test/h5format_convert/testfiles/h5fc_v_bt1.ddl b/tools/test/h5format_convert/expected/h5fc_v_bt1.ddl
similarity index 100%
rename from tools/test/h5format_convert/testfiles/h5fc_v_bt1.ddl
rename to tools/test/h5format_convert/expected/h5fc_v_bt1.ddl
diff --git a/tools/test/h5format_convert/testfiles/h5fc_v_err.ddl b/tools/test/h5format_convert/expected/h5fc_v_err.ddl
similarity index 100%
rename from tools/test/h5format_convert/testfiles/h5fc_v_err.ddl
rename to tools/test/h5format_convert/expected/h5fc_v_err.ddl
diff --git a/tools/test/h5format_convert/testfiles/h5fc_v_err.ddl.err b/tools/test/h5format_convert/expected/h5fc_v_err.ddl.err
similarity index 100%
rename from tools/test/h5format_convert/testfiles/h5fc_v_err.ddl.err
rename to tools/test/h5format_convert/expected/h5fc_v_err.ddl.err
diff --git a/tools/test/h5format_convert/testfiles/h5fc_v_n_1d.ddl b/tools/test/h5format_convert/expected/h5fc_v_n_1d.ddl
similarity index 100%
rename from tools/test/h5format_convert/testfiles/h5fc_v_n_1d.ddl
rename to tools/test/h5format_convert/expected/h5fc_v_n_1d.ddl
diff --git a/tools/test/h5format_convert/testfiles/h5fc_v_n_all.ddl b/tools/test/h5format_convert/expected/h5fc_v_n_all.ddl
similarity index 100%
rename from tools/test/h5format_convert/testfiles/h5fc_v_n_all.ddl
rename to tools/test/h5format_convert/expected/h5fc_v_n_all.ddl
diff --git a/tools/test/h5format_convert/testfiles/h5fc_v_ndata_bt1.ddl b/tools/test/h5format_convert/expected/h5fc_v_ndata_bt1.ddl
similarity index 100%
rename from tools/test/h5format_convert/testfiles/h5fc_v_ndata_bt1.ddl
rename to tools/test/h5format_convert/expected/h5fc_v_ndata_bt1.ddl
diff --git a/tools/test/h5format_convert/testfiles/h5fc_v_non_chunked.ddl b/tools/test/h5format_convert/expected/h5fc_v_non_chunked.ddl
similarity index 100%
rename from tools/test/h5format_convert/testfiles/h5fc_v_non_chunked.ddl
rename to tools/test/h5format_convert/expected/h5fc_v_non_chunked.ddl
diff --git a/tools/test/h5format_convert/testfiles/old_h5fc_ext1_f.ddl b/tools/test/h5format_convert/expected/old_h5fc_ext1_f.ddl
similarity index 100%
rename from tools/test/h5format_convert/testfiles/old_h5fc_ext1_f.ddl
rename to tools/test/h5format_convert/expected/old_h5fc_ext1_f.ddl
diff --git a/tools/test/h5format_convert/testfiles/old_h5fc_ext1_i.ddl b/tools/test/h5format_convert/expected/old_h5fc_ext1_i.ddl
similarity index 100%
rename from tools/test/h5format_convert/testfiles/old_h5fc_ext1_i.ddl
rename to tools/test/h5format_convert/expected/old_h5fc_ext1_i.ddl
diff --git a/tools/test/h5format_convert/testfiles/old_h5fc_ext1_s.ddl b/tools/test/h5format_convert/expected/old_h5fc_ext1_s.ddl
similarity index 100%
rename from tools/test/h5format_convert/testfiles/old_h5fc_ext1_s.ddl
rename to tools/test/h5format_convert/expected/old_h5fc_ext1_s.ddl
diff --git a/tools/test/h5format_convert/testfiles/old_h5fc_ext2_if.ddl b/tools/test/h5format_convert/expected/old_h5fc_ext2_if.ddl
similarity index 100%
rename from tools/test/h5format_convert/testfiles/old_h5fc_ext2_if.ddl
rename to tools/test/h5format_convert/expected/old_h5fc_ext2_if.ddl
diff --git a/tools/test/h5format_convert/testfiles/old_h5fc_ext2_is.ddl b/tools/test/h5format_convert/expected/old_h5fc_ext2_is.ddl
similarity index 100%
rename from tools/test/h5format_convert/testfiles/old_h5fc_ext2_is.ddl
rename to tools/test/h5format_convert/expected/old_h5fc_ext2_is.ddl
diff --git a/tools/test/h5format_convert/testfiles/old_h5fc_ext2_sf.ddl b/tools/test/h5format_convert/expected/old_h5fc_ext2_sf.ddl
similarity index 100%
rename from tools/test/h5format_convert/testfiles/old_h5fc_ext2_sf.ddl
rename to tools/test/h5format_convert/expected/old_h5fc_ext2_sf.ddl
diff --git a/tools/test/h5format_convert/testfiles/old_h5fc_ext3_isf.ddl b/tools/test/h5format_convert/expected/old_h5fc_ext3_isf.ddl
similarity index 100%
rename from tools/test/h5format_convert/testfiles/old_h5fc_ext3_isf.ddl
rename to tools/test/h5format_convert/expected/old_h5fc_ext3_isf.ddl
diff --git a/tools/test/h5format_convert/h5fc_chk_idx.c b/tools/test/h5format_convert/h5fc_chk_idx.c
index 49fbbab61a4..7adc33d04e1 100644
--- a/tools/test/h5format_convert/h5fc_chk_idx.c
+++ b/tools/test/h5format_convert/h5fc_chk_idx.c
@@ -55,11 +55,11 @@ main(int argc, char *argv[])
} /* end if */
/* Duplicate the file name & dataset name */
- fname = HDstrdup(argv[1]);
- dname = HDstrdup(argv[2]);
+ fname = strdup(argv[1]);
+ dname = strdup(argv[2]);
/* Try opening the file */
- if ((fid = h5tools_fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT, FALSE, NULL, (size_t)0)) < 0) {
+ if ((fid = h5tools_fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT, false, NULL, (size_t)0)) < 0) {
fprintf(stderr, "h5fc_chk_idx: unable to open the file\n");
exit(EXIT_FAILURE);
} /* end if */
diff --git a/tools/test/h5format_convert/h5fc_gentest.c b/tools/test/h5format_convert/h5fc_gentest.c
index 5b8bfce5993..7a31e58cc2a 100644
--- a/tools/test/h5format_convert/h5fc_gentest.c
+++ b/tools/test/h5format_convert/h5fc_gentest.c
@@ -136,7 +136,6 @@ gen_non(const char *fname)
*/
/* Create dataspace */
- max_dims[0] = 10;
max_dims[0] = H5S_UNLIMITED;
max_dims[1] = H5S_UNLIMITED;
if ((sid = H5Screate_simple(2, dims2, max_dims)) < 0)
@@ -572,7 +571,7 @@ gen_ext(const char *fname, unsigned new_format, unsigned what)
H5Pset_shared_mesg_nindexes(fcpl, 4);
break;
case 2:
- H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1);
+ H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)1);
break;
case 3:
H5Pset_istore_k(fcpl, ISTORE_IK);
@@ -580,7 +579,7 @@ gen_ext(const char *fname, unsigned new_format, unsigned what)
break;
case 4:
H5Pset_istore_k(fcpl, ISTORE_IK);
- H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1);
+ H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, true, (hsize_t)1);
break;
case 5:
H5Pset_shared_mesg_nindexes(fcpl, 4);
@@ -589,7 +588,7 @@ gen_ext(const char *fname, unsigned new_format, unsigned what)
case 6:
H5Pset_istore_k(fcpl, ISTORE_IK);
H5Pset_shared_mesg_nindexes(fcpl, 4);
- H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_NONE, FALSE, (hsize_t)1);
+ H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_NONE, false, (hsize_t)1);
break;
default:
break;
@@ -793,14 +792,14 @@ main(void)
gen_err_level(ERR_LEVEL_FILE);
/* Generate old/new format file with/without messages in the superblock extension */
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
for (i = 0; i < 8; i++) {
char filename[50];
memset(filename, 0, sizeof(filename));
if (!new_format)
- HDstrcat(filename, "old_");
- HDstrcat(filename, FILENAME[i]);
+ strcat(filename, "old_");
+ strcat(filename, FILENAME[i]);
gen_ext(filename, new_format, i);
} /* end for */
diff --git a/tools/test/h5format_convert/testh5fc.sh.in b/tools/test/h5format_convert/testh5fc.sh.in
index cd2b8014e0d..4ba46cbe88c 100644
--- a/tools/test/h5format_convert/testh5fc.sh.in
+++ b/tools/test/h5format_convert/testh5fc.sh.in
@@ -49,11 +49,10 @@ verbose=yes
# source dirs
SRC_TOOLS="$srcdir/../.."
-SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles"
# testfiles source dirs for tools
-SRC_H5LS_TESTFILES="$SRC_TOOLS_TESTFILES"
-SRC_H5DUMP_TESTFILES="$SRC_TOOLS_TESTFILES"
+SRC_H5LS_TESTFILES="$SRC_TOOLS/test/h5ls/testfiles"
+SRC_H5DUMP_TESTFILES="$SRC_TOOLS/test/h5dump/testfiles"
SRC_H5DIFF_TESTFILES="$SRC_TOOLS/test/h5diff/testfiles"
SRC_H5COPY_TESTFILES="$SRC_TOOLS/test/h5copy/testfiles"
SRC_H5REPACK_TESTFILES="$SRC_TOOLS/test/h5repack/testfiles"
@@ -61,6 +60,7 @@ SRC_H5JAM_TESTFILES="$SRC_TOOLS/test/h5jam/testfiles"
SRC_H5STAT_TESTFILES="$SRC_TOOLS/test/h5stat/testfiles"
SRC_H5IMPORT_TESTFILES="$SRC_TOOLS/test/h5import/testfiles"
SRC_H5FORMCONV_TESTFILES="$SRC_TOOLS/test/h5format_convert/testfiles"
+SRC_H5FORMCONV_OUTFILES="$SRC_TOOLS/test/h5format_convert/expected"
TESTDIR=./testfiles
test -d $TESTDIR || mkdir $TESTDIR
@@ -103,39 +103,39 @@ $SRC_H5FORMCONV_TESTFILES/h5fc_err_level.h5
"
LIST_ERR_TEST_FILES="
-$SRC_H5FORMCONV_TESTFILES/h5fc_d_file.ddl.err
-$SRC_H5FORMCONV_TESTFILES/h5fc_dname.err
-$SRC_H5FORMCONV_TESTFILES/h5fc_nonexistfile.ddl.err
-$SRC_H5FORMCONV_TESTFILES/h5fc_nonexistdset_file.ddl.err
+$SRC_H5FORMCONV_OUTFILES/h5fc_d_file.ddl.err
+$SRC_H5FORMCONV_OUTFILES/h5fc_dname.err
+$SRC_H5FORMCONV_OUTFILES/h5fc_nonexistfile.ddl.err
+$SRC_H5FORMCONV_OUTFILES/h5fc_nonexistdset_file.ddl.err
"
LIST_OTHER_TEST_FILES="
-$SRC_H5FORMCONV_TESTFILES/h5fc_help.ddl
-$SRC_H5FORMCONV_TESTFILES/h5fc_nooption.ddl
-$SRC_H5FORMCONV_TESTFILES/h5fc_d_file.ddl
-$SRC_H5FORMCONV_TESTFILES/h5fc_dname.ddl
-$SRC_H5FORMCONV_TESTFILES/h5fc_v_non_chunked.ddl
-$SRC_H5FORMCONV_TESTFILES/h5fc_v_bt1.ddl
-$SRC_H5FORMCONV_TESTFILES/h5fc_v_ndata_bt1.ddl
-$SRC_H5FORMCONV_TESTFILES/h5fc_v_all.ddl
-$SRC_H5FORMCONV_TESTFILES/h5fc_v_n_1d.ddl
-$SRC_H5FORMCONV_TESTFILES/h5fc_v_n_all.ddl
-$SRC_H5FORMCONV_TESTFILES/h5fc_ext1_i.ddl
-$SRC_H5FORMCONV_TESTFILES/h5fc_ext1_s.ddl
-$SRC_H5FORMCONV_TESTFILES/h5fc_ext1_f.ddl
-$SRC_H5FORMCONV_TESTFILES/h5fc_ext2_if.ddl
-$SRC_H5FORMCONV_TESTFILES/h5fc_ext2_is.ddl
-$SRC_H5FORMCONV_TESTFILES/h5fc_ext2_sf.ddl
-$SRC_H5FORMCONV_TESTFILES/h5fc_ext3_isf.ddl
-$SRC_H5FORMCONV_TESTFILES/old_h5fc_ext1_i.ddl
-$SRC_H5FORMCONV_TESTFILES/old_h5fc_ext1_s.ddl
-$SRC_H5FORMCONV_TESTFILES/old_h5fc_ext1_f.ddl
-$SRC_H5FORMCONV_TESTFILES/old_h5fc_ext2_if.ddl
-$SRC_H5FORMCONV_TESTFILES/old_h5fc_ext2_is.ddl
-$SRC_H5FORMCONV_TESTFILES/old_h5fc_ext2_sf.ddl
-$SRC_H5FORMCONV_TESTFILES/old_h5fc_ext3_isf.ddl
-$SRC_H5FORMCONV_TESTFILES/h5fc_v_err.ddl
-$SRC_H5FORMCONV_TESTFILES/h5fc_v_err.ddl.err
+$SRC_H5FORMCONV_OUTFILES/h5fc_help.ddl
+$SRC_H5FORMCONV_OUTFILES/h5fc_nooption.ddl
+$SRC_H5FORMCONV_OUTFILES/h5fc_d_file.ddl
+$SRC_H5FORMCONV_OUTFILES/h5fc_dname.ddl
+$SRC_H5FORMCONV_OUTFILES/h5fc_v_non_chunked.ddl
+$SRC_H5FORMCONV_OUTFILES/h5fc_v_bt1.ddl
+$SRC_H5FORMCONV_OUTFILES/h5fc_v_ndata_bt1.ddl
+$SRC_H5FORMCONV_OUTFILES/h5fc_v_all.ddl
+$SRC_H5FORMCONV_OUTFILES/h5fc_v_n_1d.ddl
+$SRC_H5FORMCONV_OUTFILES/h5fc_v_n_all.ddl
+$SRC_H5FORMCONV_OUTFILES/h5fc_ext1_i.ddl
+$SRC_H5FORMCONV_OUTFILES/h5fc_ext1_s.ddl
+$SRC_H5FORMCONV_OUTFILES/h5fc_ext1_f.ddl
+$SRC_H5FORMCONV_OUTFILES/h5fc_ext2_if.ddl
+$SRC_H5FORMCONV_OUTFILES/h5fc_ext2_is.ddl
+$SRC_H5FORMCONV_OUTFILES/h5fc_ext2_sf.ddl
+$SRC_H5FORMCONV_OUTFILES/h5fc_ext3_isf.ddl
+$SRC_H5FORMCONV_OUTFILES/old_h5fc_ext1_i.ddl
+$SRC_H5FORMCONV_OUTFILES/old_h5fc_ext1_s.ddl
+$SRC_H5FORMCONV_OUTFILES/old_h5fc_ext1_f.ddl
+$SRC_H5FORMCONV_OUTFILES/old_h5fc_ext2_if.ddl
+$SRC_H5FORMCONV_OUTFILES/old_h5fc_ext2_is.ddl
+$SRC_H5FORMCONV_OUTFILES/old_h5fc_ext2_sf.ddl
+$SRC_H5FORMCONV_OUTFILES/old_h5fc_ext3_isf.ddl
+$SRC_H5FORMCONV_OUTFILES/h5fc_v_err.ddl
+$SRC_H5FORMCONV_OUTFILES/h5fc_v_err.ddl.err
"
#
diff --git a/tools/test/h5import/CMakeTests.cmake b/tools/test/h5import/CMakeTests.cmake
index 750611698f4..c3bbd79857c 100644
--- a/tools/test/h5import/CMakeTests.cmake
+++ b/tools/test/h5import/CMakeTests.cmake
@@ -45,6 +45,8 @@
dbinuin16.h5.txt
dbinuin32.h5.txt
dtxtstr.h5.txt
+ )
+ set (HDF5_REFERENCE_DDL_FILES
tall_fp32.ddl
tall_i32.ddl
tintsattrs_u32.ddl
@@ -74,19 +76,23 @@
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
foreach (conf_file ${HDF5_REFERENCE_CONF_FILES})
- HDFTEST_COPY_FILE("${HDF5_TOOLS_TEST_H5IMPORT_SOURCE_DIR}/testfiles/${conf_file}" "${PROJECT_BINARY_DIR}/testfiles/${conf_file}" "h5import_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${conf_file}" "${PROJECT_BINARY_DIR}/testfiles/${conf_file}" "h5import_files")
endforeach ()
foreach (txt_file ${HDF5_REFERENCE_TXT_FILES})
- HDFTEST_COPY_FILE("${HDF5_TOOLS_TEST_H5IMPORT_SOURCE_DIR}/testfiles/${txt_file}" "${PROJECT_BINARY_DIR}/testfiles/${txt_file}" "h5import_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${txt_file}" "${PROJECT_BINARY_DIR}/testfiles/${txt_file}" "h5import_files")
+ endforeach ()
+
+ foreach (txt_file ${HDF5_REFERENCE_DDL_FILES})
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${txt_file}" "${PROJECT_BINARY_DIR}/testfiles/${txt_file}" "h5import_files")
endforeach ()
foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
- HDFTEST_COPY_FILE("${HDF5_TOOLS_TEST_H5IMPORT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5import_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5import_files")
endforeach ()
foreach (h5_file ${HDF5_TOOLS_TEST_FILES})
- HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5import_files")
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_TST_DIR}/h5dump/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5import_files")
endforeach ()
add_custom_target(h5import_files ALL COMMENT "Copying files needed by h5import tests" DEPENDS ${h5import_files_list})
diff --git a/tools/test/h5import/h5importtest.c b/tools/test/h5import/h5importtest.c
index 003c34372c5..b11fe100d2d 100644
--- a/tools/test/h5import/h5importtest.c
+++ b/tools/test/h5import/h5importtest.c
@@ -68,9 +68,9 @@ main(void)
volatile uint32_t ibyte = 0x01234567;
/* 0 for big endian, 1 for little endian. */
if ((*((volatile uint8_t *)(&ibyte))) == 0x67)
- HDstrcpy(machine_order, "LE");
+ strcpy(machine_order, "LE");
else
- HDstrcpy(machine_order, "BE");
+ strcpy(machine_order, "BE");
/*
* initialize the row, column, and plane vectors
diff --git a/tools/test/h5import/h5importtestutil.sh.in b/tools/test/h5import/h5importtestutil.sh.in
index ba91ee55c0e..65b899fc9c4 100644
--- a/tools/test/h5import/h5importtestutil.sh.in
+++ b/tools/test/h5import/h5importtestutil.sh.in
@@ -41,11 +41,10 @@ nerrors=0
# source dirs
SRC_TOOLS="$srcdir/../.."
-SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles"
# testfiles source dirs for tools
-SRC_H5LS_TESTFILES="$SRC_TOOLS_TESTFILES"
-SRC_H5DUMP_TESTFILES="$SRC_TOOLS_TESTFILES"
+SRC_H5LS_TESTFILES="$SRC_TOOLS/test/h5ls/testfiles"
+SRC_H5DUMP_TESTFILES="$SRC_TOOLS/test/h5dump/testfiles"
SRC_H5DIFF_TESTFILES="$SRC_TOOLS/test/h5diff/testfiles"
SRC_H5COPY_TESTFILES="$SRC_TOOLS/test/h5copy/testfiles"
SRC_H5REPACK_TESTFILES="$SRC_TOOLS/test/h5repack/testfiles"
@@ -82,8 +81,8 @@ $SRC_H5IMPORT_TESTFILES/txtuin16.h5
$SRC_H5IMPORT_TESTFILES/txtuin32.h5
$SRC_H5IMPORT_TESTFILES/txtstr.h5
$SRC_H5IMPORT_TESTFILES/textpfe.h5
-$SRC_TOOLS_TESTFILES/tall.h5
-$SRC_TOOLS_TESTFILES/tintsattrs.h5
+$SRC_H5DUMP_TESTFILES/tall.h5
+$SRC_H5DUMP_TESTFILES/tintsattrs.h5
"
LIST_OTHER_TEST_FILES="
diff --git a/tools/test/h5jam/CMakeTests.cmake b/tools/test/h5jam/CMakeTests.cmake
index e19ec867fe0..eb6070ea5bf 100644
--- a/tools/test/h5jam/CMakeTests.cmake
+++ b/tools/test/h5jam/CMakeTests.cmake
@@ -33,11 +33,11 @@
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
- HDFTEST_COPY_FILE("${HDF5_TOOLS_TEST_H5JAM_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5jam_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5jam_files")
endforeach ()
foreach (txt_file ${HDF5_REFERENCE_TXT_FILES})
- HDFTEST_COPY_FILE("${HDF5_TOOLS_TEST_H5JAM_SOURCE_DIR}/testfiles/${txt_file}" "${PROJECT_BINARY_DIR}/testfiles/${txt_file}" "h5jam_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/expected/${txt_file}" "${PROJECT_BINARY_DIR}/testfiles/${txt_file}" "h5jam_files")
endforeach ()
add_custom_target(h5jam_files ALL COMMENT "Copying files needed by h5jam tests" DEPENDS ${h5jam_files_list})
diff --git a/tools/test/h5jam/testfiles/h5jam-help.txt b/tools/test/h5jam/expected/h5jam-help.txt
similarity index 100%
rename from tools/test/h5jam/testfiles/h5jam-help.txt
rename to tools/test/h5jam/expected/h5jam-help.txt
diff --git a/tools/test/h5jam/testfiles/h5jam-ub-nohdf5.txt b/tools/test/h5jam/expected/h5jam-ub-nohdf5.txt
similarity index 100%
rename from tools/test/h5jam/testfiles/h5jam-ub-nohdf5.txt
rename to tools/test/h5jam/expected/h5jam-ub-nohdf5.txt
diff --git a/tools/test/h5jam/testfiles/h5unjam-help.txt b/tools/test/h5jam/expected/h5unjam-help.txt
similarity index 100%
rename from tools/test/h5jam/testfiles/h5unjam-help.txt
rename to tools/test/h5jam/expected/h5unjam-help.txt
diff --git a/tools/test/h5jam/testfiles/u10.txt b/tools/test/h5jam/expected/u10.txt
similarity index 100%
rename from tools/test/h5jam/testfiles/u10.txt
rename to tools/test/h5jam/expected/u10.txt
diff --git a/tools/test/h5jam/testfiles/u511.txt b/tools/test/h5jam/expected/u511.txt
similarity index 100%
rename from tools/test/h5jam/testfiles/u511.txt
rename to tools/test/h5jam/expected/u511.txt
diff --git a/tools/test/h5jam/testfiles/u512.txt b/tools/test/h5jam/expected/u512.txt
similarity index 100%
rename from tools/test/h5jam/testfiles/u512.txt
rename to tools/test/h5jam/expected/u512.txt
diff --git a/tools/test/h5jam/testfiles/u513.txt b/tools/test/h5jam/expected/u513.txt
similarity index 100%
rename from tools/test/h5jam/testfiles/u513.txt
rename to tools/test/h5jam/expected/u513.txt
diff --git a/tools/test/h5jam/getub.c b/tools/test/h5jam/getub.c
index b90ddeb62f6..8878a69fca2 100644
--- a/tools/test/h5jam/getub.c
+++ b/tools/test/h5jam/getub.c
@@ -59,7 +59,7 @@ parse_command_line(int argc, const char *const *argv)
while ((opt = H5_get_option(argc, argv, s_opts, l_opts)) != EOF) {
switch ((char)opt) {
case 'c':
- nbytes = HDstrdup(H5_optarg);
+ nbytes = strdup(H5_optarg);
break;
case '?':
default:
@@ -105,10 +105,10 @@ main(int argc, char *argv[])
goto error;
} /* end if */
- filename = HDstrdup(argv[H5_optind]);
+ filename = strdup(argv[H5_optind]);
size = 0;
- if (EOF == (res = HDsscanf(nbytes, "%u", &size))) {
+ if (EOF == (res = sscanf(nbytes, "%u", &size))) {
/* fail */
error_msg("missing file name\n");
usage(h5tools_getprogname());
diff --git a/tools/test/h5jam/h5jamgentest.c b/tools/test/h5jam/h5jamgentest.c
index d3b7388f1b8..0ab29c30d32 100644
--- a/tools/test/h5jam/h5jamgentest.c
+++ b/tools/test/h5jam/h5jamgentest.c
@@ -151,7 +151,7 @@ gent_ub(const char *filename, size_t ub_size, size_t ub_fill)
goto error;
if ((attr = H5Acreate2(group, "attr1", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
- if (HDsnprintf(buf, sizeof(buf), "abcdefghi") < 0)
+ if (snprintf(buf, sizeof(buf), "abcdefghi") < 0)
goto error;
if (H5Awrite(attr, H5T_NATIVE_SCHAR, buf) < 0)
goto error;
@@ -205,7 +205,7 @@ gent_ub(const char *filename, size_t ub_size, size_t ub_fill)
goto error;
if ((attr = H5Acreate2(dataset, "attr1", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
- if (HDsnprintf(buf, sizeof(buf), "1st attribute of dset1.1.1") < 0)
+ if (snprintf(buf, sizeof(buf), "1st attribute of dset1.1.1") < 0)
goto error;
if (H5Awrite(attr, H5T_NATIVE_SCHAR, buf) < 0)
goto error;
@@ -219,7 +219,7 @@ gent_ub(const char *filename, size_t ub_size, size_t ub_fill)
goto error;
if ((attr = H5Acreate2(dataset, "attr2", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
- if (HDsnprintf(buf, sizeof(buf), "2nd attribute of dset1.1.1") < 0)
+ if (snprintf(buf, sizeof(buf), "2nd attribute of dset1.1.1") < 0)
goto error;
if (H5Awrite(attr, H5T_NATIVE_SCHAR, buf) < 0)
goto error;
@@ -412,7 +412,7 @@ main(void)
if (gent_ub(FILE7, 0, 0) < 0)
goto error;
- if (gent_ub(FILE8, 512, HDstrlen(pattern)) < 0)
+ if (gent_ub(FILE8, 512, strlen(pattern)) < 0)
goto error;
if (gent_ub(FILE9, 1024, 513) < 0)
goto error;
diff --git a/tools/test/h5jam/tellub.c b/tools/test/h5jam/tellub.c
index 501ecc5831f..61ea89663cf 100644
--- a/tools/test/h5jam/tellub.c
+++ b/tools/test/h5jam/tellub.c
@@ -124,7 +124,7 @@ main(int argc, char *argv[])
goto done;
}
- ifname = HDstrdup(argv[H5_optind]);
+ ifname = strdup(argv[H5_optind]);
testval = H5Fis_accessible(ifname, H5P_DEFAULT);
diff --git a/tools/test/h5jam/testh5jam.sh.in b/tools/test/h5jam/testh5jam.sh.in
index 805ce11e06e..49598da07d0 100644
--- a/tools/test/h5jam/testh5jam.sh.in
+++ b/tools/test/h5jam/testh5jam.sh.in
@@ -43,17 +43,17 @@ verbose=yes
# source dirs
SRC_TOOLS="$srcdir/../.."
-SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles"
# testfiles source dirs for tools
-SRC_H5LS_TESTFILES="$SRC_TOOLS_TESTFILES"
-SRC_H5DUMP_TESTFILES="$SRC_TOOLS_TESTFILES"
+SRC_H5LS_TESTFILES="$SRC_TOOLS/test/h5ls/testfiles"
+SRC_H5DUMP_TESTFILES="$SRC_TOOLS/test/h5dump/testfiles"
SRC_H5DIFF_TESTFILES="$SRC_TOOLS/test/h5diff/testfiles"
SRC_H5COPY_TESTFILES="$SRC_TOOLS/test/h5copy/testfiles"
SRC_H5REPACK_TESTFILES="$SRC_TOOLS/test/h5repack/testfiles"
SRC_H5JAM_TESTFILES="$SRC_TOOLS/test/h5jam/testfiles"
SRC_H5STAT_TESTFILES="$SRC_TOOLS/test/h5stat/testfiles"
SRC_H5IMPORT_TESTFILES="$SRC_TOOLS/test/h5import/testfiles"
+SRC_H5JAM_OUTFILES="$SRC_TOOLS/test/h5jam/expected"
TESTDIR=./testfiles
test -d $TESTDIR || mkdir $TESTDIR
@@ -73,13 +73,13 @@ $SRC_H5JAM_TESTFILES/twithub.h5
$SRC_H5JAM_TESTFILES/twithub513.h5
"
LIST_OTHER_TEST_FILES="
-$SRC_H5JAM_TESTFILES/u10.txt
-$SRC_H5JAM_TESTFILES/u511.txt
-$SRC_H5JAM_TESTFILES/u512.txt
-$SRC_H5JAM_TESTFILES/u513.txt
-$SRC_H5JAM_TESTFILES/h5jam-help.txt
-$SRC_H5JAM_TESTFILES/h5unjam-help.txt
-$SRC_H5JAM_TESTFILES/h5jam-ub-nohdf5.txt
+$SRC_H5JAM_OUTFILES/u10.txt
+$SRC_H5JAM_OUTFILES/u511.txt
+$SRC_H5JAM_OUTFILES/u512.txt
+$SRC_H5JAM_OUTFILES/u513.txt
+$SRC_H5JAM_OUTFILES/h5jam-help.txt
+$SRC_H5JAM_OUTFILES/h5unjam-help.txt
+$SRC_H5JAM_OUTFILES/h5jam-ub-nohdf5.txt
"
# Source in the output filter function definitions.
diff --git a/tools/test/h5ls/CMakeTests.cmake b/tools/test/h5ls/CMakeTests.cmake
index 15f18b5e7a8..14a7e5d97a3 100644
--- a/tools/test/h5ls/CMakeTests.cmake
+++ b/tools/test/h5ls/CMakeTests.cmake
@@ -19,112 +19,119 @@
# --------------------------------------------------------------------
# Copy all the test files from source directory to test directory
# --------------------------------------------------------------------
+ set (LIST_HDF5_TESTLS_FILES
+ tdset_idx.h5
+ )
+
set (LIST_HDF5_TEST_FILES
- ${HDF5_TOOLS_DIR}/testfiles/tall.h5
- ${HDF5_TOOLS_DIR}/testfiles/tarray1.h5
- ${HDF5_TOOLS_DIR}/testfiles/tattr2.h5
- ${HDF5_TOOLS_DIR}/testfiles/tattrreg.h5
- ${HDF5_TOOLS_DIR}/testfiles/tcompound.h5
- ${HDF5_TOOLS_DIR}/testfiles/tdatareg.h5
- ${HDF5_TOOLS_DIR}/testfiles/tdset.h5
- ${HDF5_TOOLS_DIR}/testfiles/tempty.h5
- ${HDF5_TOOLS_DIR}/testfiles/textlink.h5
- ${HDF5_TOOLS_DIR}/testfiles/textlinksrc.h5
- ${HDF5_TOOLS_DIR}/testfiles/textlinktar.h5
- ${HDF5_TOOLS_DIR}/testfiles/tgroup.h5
- ${HDF5_TOOLS_DIR}/testfiles/tgrp_comments.h5
- ${HDF5_TOOLS_DIR}/testfiles/tgrpnullspace.h5
- ${HDF5_TOOLS_DIR}/testfiles/thlink.h5
- ${HDF5_TOOLS_DIR}/testfiles/tloop.h5
- ${HDF5_TOOLS_DIR}/testfiles/tnestedcomp.h5
- ${HDF5_TOOLS_DIR}/testfiles/tsaf.h5
- ${HDF5_TOOLS_DIR}/testfiles/tslink.h5
- ${HDF5_TOOLS_DIR}/testfiles/tsoftlinks.h5
- ${HDF5_TOOLS_DIR}/testfiles/tstr.h5
- ${HDF5_TOOLS_DIR}/testfiles/tudfilter.h5
- ${HDF5_TOOLS_DIR}/testfiles/tudlink.h5
- ${HDF5_TOOLS_DIR}/testfiles/tvldtypes1.h5
- ${HDF5_TOOLS_DIR}/testfiles/tdset_idx.h5
+ tall.h5
+ tarray1.h5
+ tattr2.h5
+ tattrreg.h5
+ tcompound.h5
+ tdatareg.h5
+ tdset.h5
+ tempty.h5
+ textlink.h5
+ textlinksrc.h5
+ textlinktar.h5
+ tgroup.h5
+ tgrp_comments.h5
+ tgrpnullspace.h5
+ thlink.h5
+ tloop.h5
+ tnestedcomp.h5
+ tsaf.h5
+ tslink.h5
+ tsoftlinks.h5
+ tstr.h5
+ tudfilter.h5
+ tudlink.h5
+ tvldtypes1.h5
)
set (LIST_ERR_TEST_FILES
- ${HDF5_TOOLS_DIR}/test/h5ls/errfiles/nosuchfile.err
- ${HDF5_TOOLS_DIR}/test/h5ls/errfiles/textlinksrc-nodangle-1.err
- ${HDF5_TOOLS_DIR}/test/h5ls/errfiles/tgroup-1.err
+ nosuchfile.err
+ textlinksrc-nodangle-1.err
+ tgroup-1.err
)
set (LIST_OTHER_TEST_FILES
- ${HDF5_TOOLS_DIR}/testfiles/help-1.ls
- ${HDF5_TOOLS_DIR}/testfiles/help-2.ls
- ${HDF5_TOOLS_DIR}/testfiles/help-3.ls
- ${HDF5_TOOLS_DIR}/testfiles/nosuchfile.ls
- ${HDF5_TOOLS_DIR}/testfiles/tall-1.ls
- ${HDF5_TOOLS_DIR}/testfiles/tall-2.ls
- ${HDF5_TOOLS_DIR}/testfiles/tarray1.ls
- ${HDF5_TOOLS_DIR}/testfiles/tattr2.ls
- ${HDF5_TOOLS_DIR}/testfiles/tattrreg_le.ls
- ${HDF5_TOOLS_DIR}/testfiles/tattrreg_be.ls
- ${HDF5_TOOLS_DIR}/testfiles/tcomp-1.ls
- ${HDF5_TOOLS_DIR}/testfiles/tdataregbe.ls
- ${HDF5_TOOLS_DIR}/testfiles/tdataregle.ls
- ${HDF5_TOOLS_DIR}/testfiles/tdset-1.ls
- ${HDF5_TOOLS_DIR}/testfiles/tempty.ls
- ${HDF5_TOOLS_DIR}/testfiles/textlink-1.ls
- ${HDF5_TOOLS_DIR}/testfiles/textlinksrc-1.ls
- ${HDF5_TOOLS_DIR}/testfiles/textlinksrc-2.ls
- ${HDF5_TOOLS_DIR}/testfiles/textlinksrc-3.ls
- ${HDF5_TOOLS_DIR}/testfiles/textlinksrc-4.ls
- ${HDF5_TOOLS_DIR}/testfiles/textlinksrc-5.ls
- ${HDF5_TOOLS_DIR}/testfiles/textlinksrc-6.ls
- ${HDF5_TOOLS_DIR}/testfiles/textlinksrc-7.ls
- ${HDF5_TOOLS_DIR}/testfiles/textlinksrc-1-old.ls
- ${HDF5_TOOLS_DIR}/testfiles/textlinksrc-2-old.ls
- ${HDF5_TOOLS_DIR}/testfiles/textlinksrc-3-old.ls
- ${HDF5_TOOLS_DIR}/testfiles/textlinksrc-6-old.ls
- ${HDF5_TOOLS_DIR}/testfiles/textlinksrc-7-old.ls
- ${HDF5_TOOLS_DIR}/testfiles/tsoftlinks-1.ls
- ${HDF5_TOOLS_DIR}/testfiles/tsoftlinks-2.ls
- ${HDF5_TOOLS_DIR}/testfiles/tsoftlinks-3.ls
- ${HDF5_TOOLS_DIR}/testfiles/tsoftlinks-4.ls
- ${HDF5_TOOLS_DIR}/testfiles/tsoftlinks-5.ls
- ${HDF5_TOOLS_DIR}/testfiles/textlinksrc-nodangle-1.ls
- ${HDF5_TOOLS_DIR}/testfiles/textlinksrc-nodangle-2.ls
- ${HDF5_TOOLS_DIR}/testfiles/tgrp_comments.ls
- ${HDF5_TOOLS_DIR}/testfiles/tsoftlinks-nodangle-1.ls
- ${HDF5_TOOLS_DIR}/testfiles/thlinks-nodangle-1.ls
- ${HDF5_TOOLS_DIR}/testfiles/tgroup.ls
- ${HDF5_TOOLS_DIR}/testfiles/tgroup-1.ls
- ${HDF5_TOOLS_DIR}/testfiles/tgroup-2.ls
- ${HDF5_TOOLS_DIR}/testfiles/tgroup-3.ls
- ${HDF5_TOOLS_DIR}/testfiles/tgrpnullspace.ls
- ${HDF5_TOOLS_DIR}/testfiles/thlink-1.ls
- ${HDF5_TOOLS_DIR}/testfiles/tloop-1.ls
- ${HDF5_TOOLS_DIR}/testfiles/tmultifile.ls
- ${HDF5_TOOLS_DIR}/testfiles/tnestcomp-1.ls
- ${HDF5_TOOLS_DIR}/testfiles/tnestcomp-2.ls
- ${HDF5_TOOLS_DIR}/testfiles/tnestcomp-3.ls
- ${HDF5_TOOLS_DIR}/testfiles/tnestcomp-4.ls
- ${HDF5_TOOLS_DIR}/testfiles/tsaf.ls
- ${HDF5_TOOLS_DIR}/testfiles/tslink-1.ls
- ${HDF5_TOOLS_DIR}/testfiles/tstr-1.ls
- ${HDF5_TOOLS_DIR}/testfiles/tudfilter.ls
- ${HDF5_TOOLS_DIR}/testfiles/tudlink-1.ls
- ${HDF5_TOOLS_DIR}/testfiles/tvldtypes1.ls
- ${HDF5_TOOLS_DIR}/testfiles/tvldtypes2le.ls
- ${HDF5_TOOLS_DIR}/testfiles/tvldtypes2be.ls
- ${HDF5_TOOLS_DIR}/testfiles/tdset_idx.ls
+ help-1.ls
+ help-2.ls
+ help-3.ls
+ nosuchfile.ls
+ tall-1.ls
+ tall-2.ls
+ tarray1.ls
+ tattr2.ls
+ tattrreg_le.ls
+ tattrreg_be.ls
+ tcomp-1.ls
+ tdataregbe.ls
+ tdataregle.ls
+ tdset-1.ls
+ tdset_idx.ls
+ tempty.ls
+ textlink-1.ls
+ textlinksrc-1.ls
+ textlinksrc-2.ls
+ textlinksrc-3.ls
+ textlinksrc-4.ls
+ textlinksrc-5.ls
+ textlinksrc-6.ls
+ textlinksrc-7.ls
+ textlinksrc-1-old.ls
+ textlinksrc-2-old.ls
+ textlinksrc-3-old.ls
+ textlinksrc-6-old.ls
+ textlinksrc-7-old.ls
+ textlinksrc-nodangle-1.ls
+ textlinksrc-nodangle-2.ls
+ tgroup.ls
+ tgroup-1.ls
+ tgroup-2.ls
+ tgroup-3.ls
+ tgrpnullspace.ls
+ tgrp_comments.ls
+ thlinks-nodangle-1.ls
+ thlink-1.ls
+ tloop-1.ls
+ tmultifile.ls
+ tnestcomp-1.ls
+ tnestcomp-2.ls
+ tnestcomp-3.ls
+ tnestcomp-4.ls
+ tsaf.ls
+ tslink-1.ls
+ tsoftlinks-1.ls
+ tsoftlinks-2.ls
+ tsoftlinks-3.ls
+ tsoftlinks-4.ls
+ tsoftlinks-5.ls
+ tsoftlinks-nodangle-1.ls
+ tstr-1.ls
+ tudfilter.ls
+ tudlink-1.ls
+ tvldtypes1.ls
+ tvldtypes2le.ls
+ tvldtypes2be.ls
)
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
# copy the list of test files
- foreach (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
- get_filename_component(fname "${listfiles}" NAME)
- HDFTEST_COPY_FILE("${listfiles}" "${PROJECT_BINARY_DIR}/testfiles/${fname}" "h5ls_files")
+ foreach (listlsfiles ${LIST_HDF5_TESTLS_FILES})
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${listlsfiles}" "${PROJECT_BINARY_DIR}/testfiles/${listlsfiles}" "h5ls_files")
+ endforeach ()
+ foreach (listfiles ${LIST_HDF5_TEST_FILES})
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_TST_DIR}/h5dump/testfiles/${listfiles}" "${PROJECT_BINARY_DIR}/testfiles/${listfiles}" "h5ls_files")
+ endforeach ()
+ foreach (listothers ${LIST_OTHER_TEST_FILES})
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/expected/${listothers}" "${PROJECT_BINARY_DIR}/testfiles/${listothers}" "h5ls_files")
endforeach ()
- foreach (listfiles ${LIST_ERR_TEST_FILES})
- get_filename_component(fname "${listfiles}" NAME)
- HDFTEST_COPY_FILE("${listfiles}" "${PROJECT_BINARY_DIR}/testfiles/${fname}" "h5ls_files")
+ foreach (listerrfiles ${LIST_ERR_TEST_FILES})
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/errfiles/${listerrfiles}" "${PROJECT_BINARY_DIR}/testfiles/${listerrfiles}" "h5ls_files")
endforeach ()
add_custom_target(h5ls_files ALL COMMENT "Copying files needed by h5ls tests" DEPENDS ${h5ls_files_list})
diff --git a/tools/test/h5ls/CMakeTestsVDS.cmake b/tools/test/h5ls/CMakeTestsVDS.cmake
index 5ef21abbb29..3718f64e51c 100644
--- a/tools/test/h5ls/CMakeTestsVDS.cmake
+++ b/tools/test/h5ls/CMakeTestsVDS.cmake
@@ -57,19 +57,20 @@
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
# copy the list of test files
- foreach (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
- get_filename_component(fname "${listfiles}" NAME)
- HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/vds/${listfiles}" "${PROJECT_BINARY_DIR}/testfiles/vds/${fname}" "h5ls_vds_files")
+ foreach (listfiles ${LIST_HDF5_TEST_FILES})
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_TST_DIR}/h5dump/testfiles/vds/${listfiles}" "${PROJECT_BINARY_DIR}/testfiles/vds/${listfiles}" "h5ls_vds_files")
+ endforeach ()
+
+ foreach (listothers ${LIST_OTHER_TEST_FILES})
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/expected/vds/${listothers}" "${PROJECT_BINARY_DIR}/testfiles/vds/${listothers}" "h5ls_vds_files")
endforeach ()
foreach (listfiles ${LIST_HDF5_TEST_FILES})
- get_filename_component(fname "${listfiles}" NAME)
- HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/vds/${listfiles}" "${PROJECT_BINARY_DIR}/testfiles/vds/prefix/${fname}" "h5ls_vds_files")
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_TST_DIR}/h5dump/testfiles/vds/${listfiles}" "${PROJECT_BINARY_DIR}/testfiles/vds/prefix/${listfiles}" "h5ls_vds_files")
endforeach ()
- foreach (listfiles ${LIST_OTHER_TEST_FILES})
- get_filename_component(fname "${listfiles}" NAME)
- HDFTEST_COPY_FILE("${HDF5_TOOLS_TEST_H5LS_SOURCE_DIR}/vds_prefix/${listfiles}" "${PROJECT_BINARY_DIR}/testfiles/vds/prefix/${fname}" "h5ls_vds_files")
+ foreach (listothers ${LIST_OTHER_TEST_FILES})
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/vds_prefix/${listothers}" "${PROJECT_BINARY_DIR}/testfiles/vds/prefix/${listothers}" "h5ls_vds_files")
endforeach ()
add_custom_target(h5ls_vds_files ALL COMMENT "Copying files needed by h5ls_vds tests" DEPENDS ${h5ls_vds_files_list})
diff --git a/tools/testfiles/help-1.ls b/tools/test/h5ls/expected/help-1.ls
similarity index 100%
rename from tools/testfiles/help-1.ls
rename to tools/test/h5ls/expected/help-1.ls
diff --git a/tools/testfiles/help-2.ls b/tools/test/h5ls/expected/help-2.ls
similarity index 100%
rename from tools/testfiles/help-2.ls
rename to tools/test/h5ls/expected/help-2.ls
diff --git a/tools/testfiles/help-3.ls b/tools/test/h5ls/expected/help-3.ls
similarity index 100%
rename from tools/testfiles/help-3.ls
rename to tools/test/h5ls/expected/help-3.ls
diff --git a/tools/testfiles/nosuchfile.ls b/tools/test/h5ls/expected/nosuchfile.ls
similarity index 100%
rename from tools/testfiles/nosuchfile.ls
rename to tools/test/h5ls/expected/nosuchfile.ls
diff --git a/tools/testfiles/tall-1.ls b/tools/test/h5ls/expected/tall-1.ls
similarity index 100%
rename from tools/testfiles/tall-1.ls
rename to tools/test/h5ls/expected/tall-1.ls
diff --git a/tools/testfiles/tall-2.ls b/tools/test/h5ls/expected/tall-2.ls
similarity index 100%
rename from tools/testfiles/tall-2.ls
rename to tools/test/h5ls/expected/tall-2.ls
diff --git a/tools/testfiles/tarray1.ls b/tools/test/h5ls/expected/tarray1.ls
similarity index 100%
rename from tools/testfiles/tarray1.ls
rename to tools/test/h5ls/expected/tarray1.ls
diff --git a/tools/testfiles/tattr2.ls b/tools/test/h5ls/expected/tattr2.ls
similarity index 100%
rename from tools/testfiles/tattr2.ls
rename to tools/test/h5ls/expected/tattr2.ls
diff --git a/tools/testfiles/tattrreg_be.ls b/tools/test/h5ls/expected/tattrreg_be.ls
similarity index 100%
rename from tools/testfiles/tattrreg_be.ls
rename to tools/test/h5ls/expected/tattrreg_be.ls
diff --git a/tools/testfiles/tattrreg_le.ls b/tools/test/h5ls/expected/tattrreg_le.ls
similarity index 100%
rename from tools/testfiles/tattrreg_le.ls
rename to tools/test/h5ls/expected/tattrreg_le.ls
diff --git a/tools/testfiles/tcomp-1.ls b/tools/test/h5ls/expected/tcomp-1.ls
similarity index 100%
rename from tools/testfiles/tcomp-1.ls
rename to tools/test/h5ls/expected/tcomp-1.ls
diff --git a/tools/testfiles/tdataregbe.ls b/tools/test/h5ls/expected/tdataregbe.ls
similarity index 100%
rename from tools/testfiles/tdataregbe.ls
rename to tools/test/h5ls/expected/tdataregbe.ls
diff --git a/tools/testfiles/tdataregle.ls b/tools/test/h5ls/expected/tdataregle.ls
similarity index 100%
rename from tools/testfiles/tdataregle.ls
rename to tools/test/h5ls/expected/tdataregle.ls
diff --git a/tools/testfiles/tdset-1.ls b/tools/test/h5ls/expected/tdset-1.ls
similarity index 100%
rename from tools/testfiles/tdset-1.ls
rename to tools/test/h5ls/expected/tdset-1.ls
diff --git a/tools/testfiles/tdset_idx.ls b/tools/test/h5ls/expected/tdset_idx.ls
similarity index 100%
rename from tools/testfiles/tdset_idx.ls
rename to tools/test/h5ls/expected/tdset_idx.ls
diff --git a/tools/testfiles/tempty.ls b/tools/test/h5ls/expected/tempty.ls
similarity index 100%
rename from tools/testfiles/tempty.ls
rename to tools/test/h5ls/expected/tempty.ls
diff --git a/tools/testfiles/textlink-1.ls b/tools/test/h5ls/expected/textlink-1.ls
similarity index 100%
rename from tools/testfiles/textlink-1.ls
rename to tools/test/h5ls/expected/textlink-1.ls
diff --git a/tools/testfiles/textlinksrc-1-old.ls b/tools/test/h5ls/expected/textlinksrc-1-old.ls
similarity index 100%
rename from tools/testfiles/textlinksrc-1-old.ls
rename to tools/test/h5ls/expected/textlinksrc-1-old.ls
diff --git a/tools/testfiles/textlinksrc-1.ls b/tools/test/h5ls/expected/textlinksrc-1.ls
similarity index 100%
rename from tools/testfiles/textlinksrc-1.ls
rename to tools/test/h5ls/expected/textlinksrc-1.ls
diff --git a/tools/testfiles/textlinksrc-2-old.ls b/tools/test/h5ls/expected/textlinksrc-2-old.ls
similarity index 100%
rename from tools/testfiles/textlinksrc-2-old.ls
rename to tools/test/h5ls/expected/textlinksrc-2-old.ls
diff --git a/tools/testfiles/textlinksrc-2.ls b/tools/test/h5ls/expected/textlinksrc-2.ls
similarity index 100%
rename from tools/testfiles/textlinksrc-2.ls
rename to tools/test/h5ls/expected/textlinksrc-2.ls
diff --git a/tools/testfiles/textlinksrc-3-old.ls b/tools/test/h5ls/expected/textlinksrc-3-old.ls
similarity index 100%
rename from tools/testfiles/textlinksrc-3-old.ls
rename to tools/test/h5ls/expected/textlinksrc-3-old.ls
diff --git a/tools/testfiles/textlinksrc-3.ls b/tools/test/h5ls/expected/textlinksrc-3.ls
similarity index 100%
rename from tools/testfiles/textlinksrc-3.ls
rename to tools/test/h5ls/expected/textlinksrc-3.ls
diff --git a/tools/testfiles/textlinksrc-4.ls b/tools/test/h5ls/expected/textlinksrc-4.ls
similarity index 100%
rename from tools/testfiles/textlinksrc-4.ls
rename to tools/test/h5ls/expected/textlinksrc-4.ls
diff --git a/tools/testfiles/textlinksrc-5.ls b/tools/test/h5ls/expected/textlinksrc-5.ls
similarity index 100%
rename from tools/testfiles/textlinksrc-5.ls
rename to tools/test/h5ls/expected/textlinksrc-5.ls
diff --git a/tools/testfiles/textlinksrc-6-old.ls b/tools/test/h5ls/expected/textlinksrc-6-old.ls
similarity index 100%
rename from tools/testfiles/textlinksrc-6-old.ls
rename to tools/test/h5ls/expected/textlinksrc-6-old.ls
diff --git a/tools/testfiles/textlinksrc-6.ls b/tools/test/h5ls/expected/textlinksrc-6.ls
similarity index 100%
rename from tools/testfiles/textlinksrc-6.ls
rename to tools/test/h5ls/expected/textlinksrc-6.ls
diff --git a/tools/testfiles/textlinksrc-7-old.ls b/tools/test/h5ls/expected/textlinksrc-7-old.ls
similarity index 100%
rename from tools/testfiles/textlinksrc-7-old.ls
rename to tools/test/h5ls/expected/textlinksrc-7-old.ls
diff --git a/tools/testfiles/textlinksrc-7.ls b/tools/test/h5ls/expected/textlinksrc-7.ls
similarity index 100%
rename from tools/testfiles/textlinksrc-7.ls
rename to tools/test/h5ls/expected/textlinksrc-7.ls
diff --git a/tools/testfiles/textlinksrc-nodangle-1.ls b/tools/test/h5ls/expected/textlinksrc-nodangle-1.ls
similarity index 100%
rename from tools/testfiles/textlinksrc-nodangle-1.ls
rename to tools/test/h5ls/expected/textlinksrc-nodangle-1.ls
diff --git a/tools/testfiles/textlinksrc-nodangle-2.ls b/tools/test/h5ls/expected/textlinksrc-nodangle-2.ls
similarity index 100%
rename from tools/testfiles/textlinksrc-nodangle-2.ls
rename to tools/test/h5ls/expected/textlinksrc-nodangle-2.ls
diff --git a/tools/testfiles/tgroup-1.ls b/tools/test/h5ls/expected/tgroup-1.ls
similarity index 100%
rename from tools/testfiles/tgroup-1.ls
rename to tools/test/h5ls/expected/tgroup-1.ls
diff --git a/tools/testfiles/tgroup-2.ls b/tools/test/h5ls/expected/tgroup-2.ls
similarity index 100%
rename from tools/testfiles/tgroup-2.ls
rename to tools/test/h5ls/expected/tgroup-2.ls
diff --git a/tools/testfiles/tgroup-3.ls b/tools/test/h5ls/expected/tgroup-3.ls
similarity index 100%
rename from tools/testfiles/tgroup-3.ls
rename to tools/test/h5ls/expected/tgroup-3.ls
diff --git a/tools/testfiles/tgroup.ls b/tools/test/h5ls/expected/tgroup.ls
similarity index 100%
rename from tools/testfiles/tgroup.ls
rename to tools/test/h5ls/expected/tgroup.ls
diff --git a/tools/testfiles/tgrp_comments.ls b/tools/test/h5ls/expected/tgrp_comments.ls
similarity index 100%
rename from tools/testfiles/tgrp_comments.ls
rename to tools/test/h5ls/expected/tgrp_comments.ls
diff --git a/tools/testfiles/tgrpnullspace.ls b/tools/test/h5ls/expected/tgrpnullspace.ls
similarity index 100%
rename from tools/testfiles/tgrpnullspace.ls
rename to tools/test/h5ls/expected/tgrpnullspace.ls
diff --git a/tools/testfiles/thlink-1.ls b/tools/test/h5ls/expected/thlink-1.ls
similarity index 100%
rename from tools/testfiles/thlink-1.ls
rename to tools/test/h5ls/expected/thlink-1.ls
diff --git a/tools/testfiles/thlinks-nodangle-1.ls b/tools/test/h5ls/expected/thlinks-nodangle-1.ls
similarity index 100%
rename from tools/testfiles/thlinks-nodangle-1.ls
rename to tools/test/h5ls/expected/thlinks-nodangle-1.ls
diff --git a/tools/testfiles/tloop-1.ls b/tools/test/h5ls/expected/tloop-1.ls
similarity index 100%
rename from tools/testfiles/tloop-1.ls
rename to tools/test/h5ls/expected/tloop-1.ls
diff --git a/tools/testfiles/tmultifile.ls b/tools/test/h5ls/expected/tmultifile.ls
similarity index 100%
rename from tools/testfiles/tmultifile.ls
rename to tools/test/h5ls/expected/tmultifile.ls
diff --git a/tools/testfiles/tnestcomp-1.ls b/tools/test/h5ls/expected/tnestcomp-1.ls
similarity index 100%
rename from tools/testfiles/tnestcomp-1.ls
rename to tools/test/h5ls/expected/tnestcomp-1.ls
diff --git a/tools/testfiles/tnestcomp-2.ls b/tools/test/h5ls/expected/tnestcomp-2.ls
similarity index 100%
rename from tools/testfiles/tnestcomp-2.ls
rename to tools/test/h5ls/expected/tnestcomp-2.ls
diff --git a/tools/testfiles/tnestcomp-3.ls b/tools/test/h5ls/expected/tnestcomp-3.ls
similarity index 100%
rename from tools/testfiles/tnestcomp-3.ls
rename to tools/test/h5ls/expected/tnestcomp-3.ls
diff --git a/tools/testfiles/tnestcomp-4.ls b/tools/test/h5ls/expected/tnestcomp-4.ls
similarity index 100%
rename from tools/testfiles/tnestcomp-4.ls
rename to tools/test/h5ls/expected/tnestcomp-4.ls
diff --git a/tools/testfiles/tsaf.ls b/tools/test/h5ls/expected/tsaf.ls
similarity index 100%
rename from tools/testfiles/tsaf.ls
rename to tools/test/h5ls/expected/tsaf.ls
diff --git a/tools/testfiles/tslink-1.ls b/tools/test/h5ls/expected/tslink-1.ls
similarity index 100%
rename from tools/testfiles/tslink-1.ls
rename to tools/test/h5ls/expected/tslink-1.ls
diff --git a/tools/testfiles/tsoftlinks-1.ls b/tools/test/h5ls/expected/tsoftlinks-1.ls
similarity index 100%
rename from tools/testfiles/tsoftlinks-1.ls
rename to tools/test/h5ls/expected/tsoftlinks-1.ls
diff --git a/tools/testfiles/tsoftlinks-2.ls b/tools/test/h5ls/expected/tsoftlinks-2.ls
similarity index 100%
rename from tools/testfiles/tsoftlinks-2.ls
rename to tools/test/h5ls/expected/tsoftlinks-2.ls
diff --git a/tools/testfiles/tsoftlinks-3.ls b/tools/test/h5ls/expected/tsoftlinks-3.ls
similarity index 100%
rename from tools/testfiles/tsoftlinks-3.ls
rename to tools/test/h5ls/expected/tsoftlinks-3.ls
diff --git a/tools/testfiles/tsoftlinks-4.ls b/tools/test/h5ls/expected/tsoftlinks-4.ls
similarity index 100%
rename from tools/testfiles/tsoftlinks-4.ls
rename to tools/test/h5ls/expected/tsoftlinks-4.ls
diff --git a/tools/testfiles/tsoftlinks-5.ls b/tools/test/h5ls/expected/tsoftlinks-5.ls
similarity index 100%
rename from tools/testfiles/tsoftlinks-5.ls
rename to tools/test/h5ls/expected/tsoftlinks-5.ls
diff --git a/tools/testfiles/tsoftlinks-nodangle-1.ls b/tools/test/h5ls/expected/tsoftlinks-nodangle-1.ls
similarity index 100%
rename from tools/testfiles/tsoftlinks-nodangle-1.ls
rename to tools/test/h5ls/expected/tsoftlinks-nodangle-1.ls
diff --git a/tools/testfiles/tstr-1.ls b/tools/test/h5ls/expected/tstr-1.ls
similarity index 100%
rename from tools/testfiles/tstr-1.ls
rename to tools/test/h5ls/expected/tstr-1.ls
diff --git a/tools/testfiles/tudfilter.ls b/tools/test/h5ls/expected/tudfilter.ls
similarity index 100%
rename from tools/testfiles/tudfilter.ls
rename to tools/test/h5ls/expected/tudfilter.ls
diff --git a/tools/testfiles/tudlink-1.ls b/tools/test/h5ls/expected/tudlink-1.ls
similarity index 100%
rename from tools/testfiles/tudlink-1.ls
rename to tools/test/h5ls/expected/tudlink-1.ls
diff --git a/tools/testfiles/tvldtypes1.ls b/tools/test/h5ls/expected/tvldtypes1.ls
similarity index 100%
rename from tools/testfiles/tvldtypes1.ls
rename to tools/test/h5ls/expected/tvldtypes1.ls
diff --git a/tools/testfiles/tvldtypes2be.ls b/tools/test/h5ls/expected/tvldtypes2be.ls
similarity index 100%
rename from tools/testfiles/tvldtypes2be.ls
rename to tools/test/h5ls/expected/tvldtypes2be.ls
diff --git a/tools/testfiles/tvldtypes2le.ls b/tools/test/h5ls/expected/tvldtypes2le.ls
similarity index 100%
rename from tools/testfiles/tvldtypes2le.ls
rename to tools/test/h5ls/expected/tvldtypes2le.ls
diff --git a/tools/testfiles/vds/tvds-1.ls b/tools/test/h5ls/expected/vds/tvds-1.ls
similarity index 100%
rename from tools/testfiles/vds/tvds-1.ls
rename to tools/test/h5ls/expected/vds/tvds-1.ls
diff --git a/tools/testfiles/vds/tvds-2.ls b/tools/test/h5ls/expected/vds/tvds-2.ls
similarity index 100%
rename from tools/testfiles/vds/tvds-2.ls
rename to tools/test/h5ls/expected/vds/tvds-2.ls
diff --git a/tools/testfiles/vds/tvds-3_1.ls b/tools/test/h5ls/expected/vds/tvds-3_1.ls
similarity index 100%
rename from tools/testfiles/vds/tvds-3_1.ls
rename to tools/test/h5ls/expected/vds/tvds-3_1.ls
diff --git a/tools/testfiles/vds/tvds-3_2.ls b/tools/test/h5ls/expected/vds/tvds-3_2.ls
similarity index 100%
rename from tools/testfiles/vds/tvds-3_2.ls
rename to tools/test/h5ls/expected/vds/tvds-3_2.ls
diff --git a/tools/testfiles/vds/tvds-4.ls b/tools/test/h5ls/expected/vds/tvds-4.ls
similarity index 100%
rename from tools/testfiles/vds/tvds-4.ls
rename to tools/test/h5ls/expected/vds/tvds-4.ls
diff --git a/tools/testfiles/vds/tvds-5.ls b/tools/test/h5ls/expected/vds/tvds-5.ls
similarity index 100%
rename from tools/testfiles/vds/tvds-5.ls
rename to tools/test/h5ls/expected/vds/tvds-5.ls
diff --git a/tools/test/h5ls/h5ls_plugin.sh.in b/tools/test/h5ls/h5ls_plugin.sh.in
index 02e0cf7c499..3408876e0b0 100644
--- a/tools/test/h5ls/h5ls_plugin.sh.in
+++ b/tools/test/h5ls/h5ls_plugin.sh.in
@@ -45,8 +45,9 @@ AWK='awk'
SRC_TOOLS="$srcdir/../.."
# testfiles source dirs for tools
-SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles"
-SRC_H5LS_TESTFILES="$SRC_TOOLS_TESTFILES"
+SRC_H5LS_TESTFILES="$SRC_TOOLS/test/h5ls/testfiles"
+SRC_H5DUMP_TESTFILES="$SRC_TOOLS/test/h5dump/testfiles"
+SRC_H5LS_OUTFILES="$SRC_TOOLS/test/h5ls/expected"
TESTDIR=./testplug
test -d $TESTDIR || mkdir $TESTDIR
@@ -61,8 +62,8 @@ test -d $TESTDIR || mkdir $TESTDIR
# Comment '#' without space can be used.
# --------------------------------------------------------------------
LIST_HDF5_TEST_FILES="
-$SRC_TOOLS_TESTFILES/tudfilter.h5
-$SRC_TOOLS_TESTFILES/tudfilter.ls
+$SRC_H5DUMP_TESTFILES/tudfilter.h5
+$SRC_H5LS_OUTFILES/tudfilter.ls
"
# RUNSERIAL is used. Check if it can return exit code from executable correctly.
diff --git a/tools/testfiles/tdset_idx.h5 b/tools/test/h5ls/testfiles/tdset_idx.h5
similarity index 100%
rename from tools/testfiles/tdset_idx.h5
rename to tools/test/h5ls/testfiles/tdset_idx.h5
diff --git a/tools/test/h5ls/testh5ls.sh.in b/tools/test/h5ls/testh5ls.sh.in
index 9b0e5cb85bf..fc6daab00ac 100644
--- a/tools/test/h5ls/testh5ls.sh.in
+++ b/tools/test/h5ls/testh5ls.sh.in
@@ -41,11 +41,10 @@ h5haveexitcode=yes # default is yes
# source dirs
SRC_TOOLS="$srcdir/../.."
-SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles"
# testfiles source dirs for tools
-SRC_H5LS_TESTFILES="$SRC_TOOLS_TESTFILES"
-SRC_H5DUMP_TESTFILES="$SRC_TOOLS_TESTFILES"
+SRC_H5LS_TESTFILES="$SRC_TOOLS/test/h5ls/testfiles"
+SRC_H5DUMP_TESTFILES="$SRC_TOOLS/test/h5dump/testfiles"
SRC_H5DIFF_TESTFILES="$SRC_TOOLS/test/h5diff/testfiles"
SRC_H5COPY_TESTFILES="$SRC_TOOLS/test/h5copy/testfiles"
SRC_H5REPACK_TESTFILES="$SRC_TOOLS/test/h5repack/testfiles"
@@ -53,6 +52,7 @@ SRC_H5JAM_TESTFILES="$SRC_TOOLS/test/h5jam/testfiles"
SRC_H5STAT_TESTFILES="$SRC_TOOLS/test/h5stat/testfiles"
SRC_H5IMPORT_TESTFILES="$SRC_TOOLS/test/h5import/testfiles"
SRC_H5LS_ERRFILES="$SRC_TOOLS/test/h5ls/errfiles"
+SRC_H5LS_OUTFILES="$SRC_TOOLS/test/h5ls/expected"
TESTDIR=./testfiles
test -d $TESTDIR || mkdir $TESTDIR
@@ -67,29 +67,29 @@ test -d $TESTDIR || mkdir $TESTDIR
# Comment '#' without space can be used.
# --------------------------------------------------------------------
LIST_HDF5_TEST_FILES="
-$SRC_H5LS_TESTFILES/tall.h5
-$SRC_H5LS_TESTFILES/tarray1.h5
-$SRC_H5LS_TESTFILES/tattr2.h5
-$SRC_H5LS_TESTFILES/tattrreg.h5
-$SRC_H5LS_TESTFILES/tcompound.h5
-$SRC_H5LS_TESTFILES/tdatareg.h5
-$SRC_H5LS_TESTFILES/tdset.h5
-$SRC_H5LS_TESTFILES/tempty.h5
-$SRC_H5LS_TESTFILES/textlink.h5
-$SRC_H5LS_TESTFILES/textlinksrc.h5
-$SRC_H5LS_TESTFILES/textlinktar.h5
-$SRC_H5LS_TESTFILES/tgroup.h5
-$SRC_H5LS_TESTFILES/tgrp_comments.h5
-$SRC_H5LS_TESTFILES/tgrpnullspace.h5
-$SRC_H5LS_TESTFILES/thlink.h5
-$SRC_H5LS_TESTFILES/tloop.h5
-$SRC_H5LS_TESTFILES/tnestedcomp.h5
-$SRC_H5LS_TESTFILES/tsaf.h5
-$SRC_H5LS_TESTFILES/tslink.h5
-$SRC_H5LS_TESTFILES/tsoftlinks.h5
-$SRC_H5LS_TESTFILES/tstr.h5
-$SRC_H5LS_TESTFILES/tudlink.h5
-$SRC_H5LS_TESTFILES/tvldtypes1.h5
+$SRC_H5DUMP_TESTFILES/tall.h5
+$SRC_H5DUMP_TESTFILES/tarray1.h5
+$SRC_H5DUMP_TESTFILES/tattr2.h5
+$SRC_H5DUMP_TESTFILES/tattrreg.h5
+$SRC_H5DUMP_TESTFILES/tcompound.h5
+$SRC_H5DUMP_TESTFILES/tdatareg.h5
+$SRC_H5DUMP_TESTFILES/tdset.h5
+$SRC_H5DUMP_TESTFILES/tempty.h5
+$SRC_H5DUMP_TESTFILES/textlink.h5
+$SRC_H5DUMP_TESTFILES/textlinksrc.h5
+$SRC_H5DUMP_TESTFILES/textlinktar.h5
+$SRC_H5DUMP_TESTFILES/tgroup.h5
+$SRC_H5DUMP_TESTFILES/tgrp_comments.h5
+$SRC_H5DUMP_TESTFILES/tgrpnullspace.h5
+$SRC_H5DUMP_TESTFILES/thlink.h5
+$SRC_H5DUMP_TESTFILES/tloop.h5
+$SRC_H5DUMP_TESTFILES/tnestedcomp.h5
+$SRC_H5DUMP_TESTFILES/tsaf.h5
+$SRC_H5DUMP_TESTFILES/tslink.h5
+$SRC_H5DUMP_TESTFILES/tsoftlinks.h5
+$SRC_H5DUMP_TESTFILES/tstr.h5
+$SRC_H5DUMP_TESTFILES/tudlink.h5
+$SRC_H5DUMP_TESTFILES/tvldtypes1.h5
$SRC_H5LS_TESTFILES/tdset_idx.h5
"
@@ -100,64 +100,64 @@ $SRC_H5LS_ERRFILES/tgroup-1.err
"
LIST_OTHER_TEST_FILES="
-$SRC_H5LS_TESTFILES/help-1.ls
-$SRC_H5LS_TESTFILES/help-2.ls
-$SRC_H5LS_TESTFILES/help-3.ls
-$SRC_H5LS_TESTFILES/nosuchfile.ls
-$SRC_H5LS_TESTFILES/tall-1.ls
-$SRC_H5LS_TESTFILES/tall-2.ls
-$SRC_H5LS_TESTFILES/tarray1.ls
-$SRC_H5LS_TESTFILES/tattr2.ls
-$SRC_H5LS_TESTFILES/tattrreg_le.ls
-$SRC_H5LS_TESTFILES/tattrreg_be.ls
-$SRC_H5LS_TESTFILES/tcomp-1.ls
-$SRC_H5LS_TESTFILES/tdataregbe.ls
-$SRC_H5LS_TESTFILES/tdataregle.ls
-$SRC_H5LS_TESTFILES/tdset-1.ls
-$SRC_H5LS_TESTFILES/tempty.ls
-$SRC_H5LS_TESTFILES/textlink-1.ls
-$SRC_H5LS_TESTFILES/textlinksrc-1.ls
-$SRC_H5LS_TESTFILES/textlinksrc-2.ls
-$SRC_H5LS_TESTFILES/textlinksrc-3.ls
-$SRC_H5LS_TESTFILES/textlinksrc-4.ls
-$SRC_H5LS_TESTFILES/textlinksrc-5.ls
-$SRC_H5LS_TESTFILES/textlinksrc-6.ls
-$SRC_H5LS_TESTFILES/textlinksrc-7.ls
-$SRC_H5LS_TESTFILES/textlinksrc-1-old.ls
-$SRC_H5LS_TESTFILES/textlinksrc-2-old.ls
-$SRC_H5LS_TESTFILES/textlinksrc-3-old.ls
-$SRC_H5LS_TESTFILES/textlinksrc-6-old.ls
-$SRC_H5LS_TESTFILES/textlinksrc-7-old.ls
-$SRC_H5LS_TESTFILES/tsoftlinks-1.ls
-$SRC_H5LS_TESTFILES/tsoftlinks-2.ls
-$SRC_H5LS_TESTFILES/tsoftlinks-3.ls
-$SRC_H5LS_TESTFILES/tsoftlinks-4.ls
-$SRC_H5LS_TESTFILES/tsoftlinks-5.ls
-$SRC_H5LS_TESTFILES/textlinksrc-nodangle-1.ls
-$SRC_H5LS_TESTFILES/textlinksrc-nodangle-2.ls
-$SRC_H5LS_TESTFILES/tgrp_comments.ls
-$SRC_H5LS_TESTFILES/tsoftlinks-nodangle-1.ls
-$SRC_H5LS_TESTFILES/thlinks-nodangle-1.ls
-$SRC_H5LS_TESTFILES/tgroup.ls
-$SRC_H5LS_TESTFILES/tgroup-1.ls
-$SRC_H5LS_TESTFILES/tgroup-2.ls
-$SRC_H5LS_TESTFILES/tgroup-3.ls
-$SRC_H5LS_TESTFILES/tgrpnullspace.ls
-$SRC_H5LS_TESTFILES/thlink-1.ls
-$SRC_H5LS_TESTFILES/tloop-1.ls
-$SRC_H5LS_TESTFILES/tmultifile.ls
-$SRC_H5LS_TESTFILES/tnestcomp-1.ls
-$SRC_H5LS_TESTFILES/tnestcomp-2.ls
-$SRC_H5LS_TESTFILES/tnestcomp-3.ls
-$SRC_H5LS_TESTFILES/tnestcomp-4.ls
-$SRC_H5LS_TESTFILES/tsaf.ls
-$SRC_H5LS_TESTFILES/tslink-1.ls
-$SRC_H5LS_TESTFILES/tstr-1.ls
-$SRC_H5LS_TESTFILES/tudlink-1.ls
-$SRC_H5LS_TESTFILES/tvldtypes1.ls
-$SRC_H5LS_TESTFILES/tvldtypes2le.ls
-$SRC_H5LS_TESTFILES/tvldtypes2be.ls
-$SRC_H5LS_TESTFILES/tdset_idx.ls
+$SRC_H5LS_OUTFILES/help-1.ls
+$SRC_H5LS_OUTFILES/help-2.ls
+$SRC_H5LS_OUTFILES/help-3.ls
+$SRC_H5LS_OUTFILES/nosuchfile.ls
+$SRC_H5LS_OUTFILES/tall-1.ls
+$SRC_H5LS_OUTFILES/tall-2.ls
+$SRC_H5LS_OUTFILES/tarray1.ls
+$SRC_H5LS_OUTFILES/tattr2.ls
+$SRC_H5LS_OUTFILES/tattrreg_le.ls
+$SRC_H5LS_OUTFILES/tattrreg_be.ls
+$SRC_H5LS_OUTFILES/tcomp-1.ls
+$SRC_H5LS_OUTFILES/tdataregbe.ls
+$SRC_H5LS_OUTFILES/tdataregle.ls
+$SRC_H5LS_OUTFILES/tdset-1.ls
+$SRC_H5LS_OUTFILES/tempty.ls
+$SRC_H5LS_OUTFILES/textlink-1.ls
+$SRC_H5LS_OUTFILES/textlinksrc-1.ls
+$SRC_H5LS_OUTFILES/textlinksrc-2.ls
+$SRC_H5LS_OUTFILES/textlinksrc-3.ls
+$SRC_H5LS_OUTFILES/textlinksrc-4.ls
+$SRC_H5LS_OUTFILES/textlinksrc-5.ls
+$SRC_H5LS_OUTFILES/textlinksrc-6.ls
+$SRC_H5LS_OUTFILES/textlinksrc-7.ls
+$SRC_H5LS_OUTFILES/textlinksrc-1-old.ls
+$SRC_H5LS_OUTFILES/textlinksrc-2-old.ls
+$SRC_H5LS_OUTFILES/textlinksrc-3-old.ls
+$SRC_H5LS_OUTFILES/textlinksrc-6-old.ls
+$SRC_H5LS_OUTFILES/textlinksrc-7-old.ls
+$SRC_H5LS_OUTFILES/tsoftlinks-1.ls
+$SRC_H5LS_OUTFILES/tsoftlinks-2.ls
+$SRC_H5LS_OUTFILES/tsoftlinks-3.ls
+$SRC_H5LS_OUTFILES/tsoftlinks-4.ls
+$SRC_H5LS_OUTFILES/tsoftlinks-5.ls
+$SRC_H5LS_OUTFILES/textlinksrc-nodangle-1.ls
+$SRC_H5LS_OUTFILES/textlinksrc-nodangle-2.ls
+$SRC_H5LS_OUTFILES/tgrp_comments.ls
+$SRC_H5LS_OUTFILES/tsoftlinks-nodangle-1.ls
+$SRC_H5LS_OUTFILES/thlinks-nodangle-1.ls
+$SRC_H5LS_OUTFILES/tgroup.ls
+$SRC_H5LS_OUTFILES/tgroup-1.ls
+$SRC_H5LS_OUTFILES/tgroup-2.ls
+$SRC_H5LS_OUTFILES/tgroup-3.ls
+$SRC_H5LS_OUTFILES/tgrpnullspace.ls
+$SRC_H5LS_OUTFILES/thlink-1.ls
+$SRC_H5LS_OUTFILES/tloop-1.ls
+$SRC_H5LS_OUTFILES/tmultifile.ls
+$SRC_H5LS_OUTFILES/tnestcomp-1.ls
+$SRC_H5LS_OUTFILES/tnestcomp-2.ls
+$SRC_H5LS_OUTFILES/tnestcomp-3.ls
+$SRC_H5LS_OUTFILES/tnestcomp-4.ls
+$SRC_H5LS_OUTFILES/tsaf.ls
+$SRC_H5LS_OUTFILES/tslink-1.ls
+$SRC_H5LS_OUTFILES/tstr-1.ls
+$SRC_H5LS_OUTFILES/tudlink-1.ls
+$SRC_H5LS_OUTFILES/tvldtypes1.ls
+$SRC_H5LS_OUTFILES/tvldtypes2le.ls
+$SRC_H5LS_OUTFILES/tvldtypes2be.ls
+$SRC_H5LS_OUTFILES/tdset_idx.ls
"
diff --git a/tools/test/h5ls/testh5lsvds.sh.in b/tools/test/h5ls/testh5lsvds.sh.in
index beba73fe187..2408ee29466 100644
--- a/tools/test/h5ls/testh5lsvds.sh.in
+++ b/tools/test/h5ls/testh5lsvds.sh.in
@@ -38,17 +38,17 @@ h5haveexitcode=yes # default is yes
# source dirs
SRC_TOOLS="$srcdir/../.."
-SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles"
# testfiles source dirs for tools
-SRC_H5LS_TESTFILES="$SRC_TOOLS_TESTFILES"
-SRC_H5DUMP_TESTFILES="$SRC_TOOLS_TESTFILES"
+SRC_H5LS_TESTFILES="$SRC_TOOLS/test/h5ls/testfiles"
+SRC_H5DUMP_TESTFILES="$SRC_TOOLS/test/h5dump/testfiles"
SRC_H5DIFF_TESTFILES="$SRC_TOOLS/test/h5diff/testfiles"
SRC_H5COPY_TESTFILES="$SRC_TOOLS/test/h5copy/testfiles"
SRC_H5REPACK_TESTFILES="$SRC_TOOLS/test/h5repack/testfiles"
SRC_H5JAM_TESTFILES="$SRC_TOOLS/test/h5jam/testfiles"
SRC_H5STAT_TESTFILES="$SRC_TOOLS/test/h5stat/testfiles"
SRC_H5IMPORT_TESTFILES="$SRC_TOOLS/test/h5import/testfiles"
+SRC_H5LS_OUTFILES="$SRC_TOOLS/test/h5ls/expected"
TEST_P_DIR=./testfiles
TESTDIR=./testfiles/vds
@@ -65,38 +65,38 @@ test -d $TESTDIR || mkdir $TESTDIR
# Comment '#' without space can be used.
# --------------------------------------------------------------------
LIST_HDF5_TEST_FILES="
-$SRC_H5LS_TESTFILES/vds/1_a.h5
-$SRC_H5LS_TESTFILES/vds/1_b.h5
-$SRC_H5LS_TESTFILES/vds/1_c.h5
-$SRC_H5LS_TESTFILES/vds/1_d.h5
-$SRC_H5LS_TESTFILES/vds/1_e.h5
-$SRC_H5LS_TESTFILES/vds/1_f.h5
-$SRC_H5LS_TESTFILES/vds/1_vds.h5
-$SRC_H5LS_TESTFILES/vds/2_a.h5
-$SRC_H5LS_TESTFILES/vds/2_b.h5
-$SRC_H5LS_TESTFILES/vds/2_c.h5
-$SRC_H5LS_TESTFILES/vds/2_d.h5
-$SRC_H5LS_TESTFILES/vds/2_e.h5
-$SRC_H5LS_TESTFILES/vds/2_vds.h5
-$SRC_H5LS_TESTFILES/vds/3_1_vds.h5
-$SRC_H5LS_TESTFILES/vds/3_2_vds.h5
-$SRC_H5LS_TESTFILES/vds/4_0.h5
-$SRC_H5LS_TESTFILES/vds/4_1.h5
-$SRC_H5LS_TESTFILES/vds/4_2.h5
-$SRC_H5LS_TESTFILES/vds/4_vds.h5
-$SRC_H5LS_TESTFILES/vds/5_a.h5
-$SRC_H5LS_TESTFILES/vds/5_b.h5
-$SRC_H5LS_TESTFILES/vds/5_c.h5
-$SRC_H5LS_TESTFILES/vds/5_vds.h5
+$SRC_H5DUMP_TESTFILES/vds/1_a.h5
+$SRC_H5DUMP_TESTFILES/vds/1_b.h5
+$SRC_H5DUMP_TESTFILES/vds/1_c.h5
+$SRC_H5DUMP_TESTFILES/vds/1_d.h5
+$SRC_H5DUMP_TESTFILES/vds/1_e.h5
+$SRC_H5DUMP_TESTFILES/vds/1_f.h5
+$SRC_H5DUMP_TESTFILES/vds/1_vds.h5
+$SRC_H5DUMP_TESTFILES/vds/2_a.h5
+$SRC_H5DUMP_TESTFILES/vds/2_b.h5
+$SRC_H5DUMP_TESTFILES/vds/2_c.h5
+$SRC_H5DUMP_TESTFILES/vds/2_d.h5
+$SRC_H5DUMP_TESTFILES/vds/2_e.h5
+$SRC_H5DUMP_TESTFILES/vds/2_vds.h5
+$SRC_H5DUMP_TESTFILES/vds/3_1_vds.h5
+$SRC_H5DUMP_TESTFILES/vds/3_2_vds.h5
+$SRC_H5DUMP_TESTFILES/vds/4_0.h5
+$SRC_H5DUMP_TESTFILES/vds/4_1.h5
+$SRC_H5DUMP_TESTFILES/vds/4_2.h5
+$SRC_H5DUMP_TESTFILES/vds/4_vds.h5
+$SRC_H5DUMP_TESTFILES/vds/5_a.h5
+$SRC_H5DUMP_TESTFILES/vds/5_b.h5
+$SRC_H5DUMP_TESTFILES/vds/5_c.h5
+$SRC_H5DUMP_TESTFILES/vds/5_vds.h5
"
LIST_OTHER_TEST_FILES="
-$SRC_H5LS_TESTFILES/vds/tvds-1.ls
-$SRC_H5LS_TESTFILES/vds/tvds-2.ls
-$SRC_H5LS_TESTFILES/vds/tvds-3_1.ls
-$SRC_H5LS_TESTFILES/vds/tvds-3_2.ls
-$SRC_H5LS_TESTFILES/vds/tvds-4.ls
-$SRC_H5LS_TESTFILES/vds/tvds-5.ls
+$SRC_H5LS_OUTFILES/vds/tvds-1.ls
+$SRC_H5LS_OUTFILES/vds/tvds-2.ls
+$SRC_H5LS_OUTFILES/vds/tvds-3_1.ls
+$SRC_H5LS_OUTFILES/vds/tvds-3_2.ls
+$SRC_H5LS_OUTFILES/vds/tvds-4.ls
+$SRC_H5LS_OUTFILES/vds/tvds-5.ls
"
diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake
index bd2cb9b9f05..5c412545af2 100644
--- a/tools/test/h5repack/CMakeTests.cmake
+++ b/tools/test/h5repack/CMakeTests.cmake
@@ -19,203 +19,224 @@
# --------------------------------------------------------------------
# Copy all the HDF5 files from the source directory into the test directory
# --------------------------------------------------------------------
- set (LIST_HDF5_TEST_FILES
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/bounds_latest_latest.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_attr.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_attr_refs.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_deflate.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_early.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_ext.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_f32le.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_f32le_ex-0.dat
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_f32le_ex.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_fill.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_filters.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_fletcher.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_hlink.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_int32le_1d.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_int32le_1d_ex-0.dat
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_int32le_1d_ex-1.dat
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_int32le_1d_ex.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_int32le_2d.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_int32le_2d_ex-0.dat
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_int32le_2d_ex.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_int32le_3d.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_int32le_3d_ex-0.dat
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_int32le_3d_ex.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layouto.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout2.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout3.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.UD.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_named_dtypes.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_nested_8bit_enum.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_nested_8bit_enum_deflated.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_CVE-2018-17432.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_CVE-2018-14460.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_nbit.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_objs.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_refs.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_shuffle.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_soffset.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_szip.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_uint8be.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_uint8be_ex-0.dat
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_uint8be_ex-1.dat
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_uint8be_ex-2.dat
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_uint8be_ex-3.dat
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_uint8be_ex.h5
+ set (LIST_REPACK_TEST_FILES
+ bounds_latest_latest.h5
+ h5repack_attr.h5
+ h5repack_attr_refs.h5
+ h5repack_deflate.h5
+ h5repack_early.h5
+ h5repack_ext.h5
+ h5repack_f32le.h5
+ h5repack_f32le_ex-0.dat
+ h5repack_f32le_ex.h5
+ h5repack_fill.h5
+ h5repack_filters.h5
+ h5repack_fletcher.h5
+ h5repack_hlink.h5
+ h5repack_int32le_1d.h5
+ h5repack_int32le_1d_ex-0.dat
+ h5repack_int32le_1d_ex-1.dat
+ h5repack_int32le_1d_ex.h5
+ h5repack_int32le_2d.h5
+ h5repack_int32le_2d_ex-0.dat
+ h5repack_int32le_2d_ex.h5
+ h5repack_int32le_3d.h5
+ h5repack_int32le_3d_ex-0.dat
+ h5repack_int32le_3d_ex.h5
+ h5repack_layout.h5
+ h5repack_layouto.h5
+ h5repack_layout2.h5
+ h5repack_layout3.h5
+ h5repack_layout.UD.h5
+ h5repack_named_dtypes.h5
+ h5repack_nested_8bit_enum.h5
+ h5repack_nested_8bit_enum_deflated.h5
+ h5repack_CVE-2018-17432.h5
+ h5repack_CVE-2018-14460.h5
+ h5repack_nbit.h5
+ h5repack_objs.h5
+ h5repack_refs.h5
+ h5repack_shuffle.h5
+ h5repack_soffset.h5
+ h5repack_szip.h5
+ h5repack_uint8be.h5
+ h5repack_uint8be_ex-0.dat
+ h5repack_uint8be_ex-1.dat
+ h5repack_uint8be_ex-2.dat
+ h5repack_uint8be_ex-3.dat
+ h5repack_uint8be_ex.h5
# fsm
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_aggr.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_fsm_aggr_nopersist.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_fsm_aggr_persist.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_none.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_paged_nopersist.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_paged_persist.h5
- # h5diff/testfile
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_attr1.h5
+ h5repack_aggr.h5
+ h5repack_fsm_aggr_nopersist.h5
+ h5repack_fsm_aggr_persist.h5
+ h5repack_none.h5
+ h5repack_paged_nopersist.h5
+ h5repack_paged_persist.h5
+ )
+ # h5diff/testfile
+ set (LIST_DIFF_TEST_FILES
+ h5diff_attr1.h5
+ )
+ # tools/testfiles/vds
+ set (LIST_VDS_TEST_FILES
+ 1_a.h5
+ 1_b.h5
+ 1_c.h5
+ 1_d.h5
+ 1_e.h5
+ 1_f.h5
+ 1_vds.h5
+ 2_a.h5
+ 2_b.h5
+ 2_c.h5
+ 2_d.h5
+ 2_e.h5
+ 2_vds.h5
+ 3_1_vds.h5
+ 3_2_vds.h5
+ 4_0.h5
+ 4_1.h5
+ 4_2.h5
+ 4_vds.h5
+ 5_a.h5
+ 5_b.h5
+ 5_c.h5
+ 5_vds.h5
+ )
+ set (LIST_COPY_TEST_FILES
+ h5copy_extlinks_src.h5
+ h5copy_extlinks_trg.h5
+ )
+ set (LIST_HDF5_TEST_FILES
# tools/testfiles for external links
- ${HDF5_TOOLS_DIR}/testfiles/tsoftlinks.h5
- ${HDF5_TOOLS_DIR}/testfiles/textlinkfar.h5
- ${HDF5_TOOLS_DIR}/testfiles/textlinksrc.h5
- ${HDF5_TOOLS_DIR}/testfiles/textlinktar.h5
- ${HDF5_TOOLS_DIR}/testfiles/textlink.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5copy_extlinks_src.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5copy_extlinks_trg.h5
+ tsoftlinks.h5
+ textlinkfar.h5
+ textlinksrc.h5
+ textlinktar.h5
+ textlink.h5
# tools/testfiles
- ${HDF5_TOOLS_DIR}/testfiles/tfamily00000.h5
- ${HDF5_TOOLS_DIR}/testfiles/tfamily00001.h5
- ${HDF5_TOOLS_DIR}/testfiles/tfamily00002.h5
- ${HDF5_TOOLS_DIR}/testfiles/tfamily00003.h5
- ${HDF5_TOOLS_DIR}/testfiles/tfamily00004.h5
- ${HDF5_TOOLS_DIR}/testfiles/tfamily00005.h5
- ${HDF5_TOOLS_DIR}/testfiles/tfamily00006.h5
- ${HDF5_TOOLS_DIR}/testfiles/tfamily00007.h5
- ${HDF5_TOOLS_DIR}/testfiles/tfamily00008.h5
- ${HDF5_TOOLS_DIR}/testfiles/tfamily00009.h5
- ${HDF5_TOOLS_DIR}/testfiles/tfamily00010.h5
- ${HDF5_TOOLS_DIR}/testfiles/tordergr.h5
+ tfamily00000.h5
+ tfamily00001.h5
+ tfamily00002.h5
+ tfamily00003.h5
+ tfamily00004.h5
+ tfamily00005.h5
+ tfamily00006.h5
+ tfamily00007.h5
+ tfamily00008.h5
+ tfamily00009.h5
+ tfamily00010.h5
+ tordergr.h5
# reference conversion files
- ${HDF5_TOOLS_DIR}/testfiles/tattrreg.h5
- ${HDF5_TOOLS_DIR}/testfiles/tdatareg.h5
- # tools/testfiles/vds
- ${HDF5_TOOLS_DIR}/testfiles/vds/1_a.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/1_b.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/1_c.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/1_d.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/1_e.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/1_f.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/1_vds.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/2_a.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/2_b.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/2_c.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/2_d.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/2_e.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/2_vds.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/3_1_vds.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/3_2_vds.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/4_0.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/4_1.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/4_2.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/4_vds.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/5_a.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/5_b.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/5_c.h5
- ${HDF5_TOOLS_DIR}/testfiles/vds/5_vds.h5
+ tattrreg.h5
+ tdatareg.h5
# tools/testfiles onion VFD files
- ${HDF5_TOOLS_DIR}/testfiles/tst_onion_dset_1d.h5
- ${HDF5_TOOLS_DIR}/testfiles/tst_onion_dset_1d.h5.onion
- ${HDF5_TOOLS_DIR}/testfiles/tst_onion_dset_ext.h5
- ${HDF5_TOOLS_DIR}/testfiles/tst_onion_dset_ext.h5.onion
- ${HDF5_TOOLS_DIR}/testfiles/tst_onion_objs.h5
- ${HDF5_TOOLS_DIR}/testfiles/tst_onion_objs.h5.onion
+ tst_onion_dset_1d.h5
+ tst_onion_dset_1d.h5.onion
+ tst_onion_dset_ext.h5
+ tst_onion_dset_ext.h5.onion
+ tst_onion_objs.h5
+ tst_onion_objs.h5.onion
)
set (LIST_OTHER_TEST_FILES
- h5repack-help.txt
h5repack_ext.bin
h5repack.info
ublock.bin
)
set (LIST_TST_TEST_FILES
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_filters.h5-gzip_verbose_filters
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5-dset2_chunk_20x10-errstk
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/plugin_test.h5repack_layout.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/plugin_version_test.h5repack_layout.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/plugin_zero.h5repack_layout.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/plugin_none.h5repack_layout.UD.h5
+ h5repack-help.txt
+ h5repack_filters.h5-gzip_verbose_filters.tst
+ h5repack_layout.h5-dset2_chunk_20x10-errstk.tst
+ plugin_test.h5repack_layout.h5.tst
+ plugin_version_test.h5repack_layout.h5.tst
+ plugin_zero.h5repack_layout.h5.tst
+ plugin_none.h5repack_layout.UD.h5.tst
# tools/testfiles for external links
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/tsoftlinks-merge.tsoftlinks.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinkfar-merge.textlinkfar.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinksrc-merge.textlinksrc.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinktar-merge.textlinktar.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlink-merge.textlink.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5copy_extlinks_src-merge.h5copy_extlinks_src.h5
+ tsoftlinks-merge.tsoftlinks.h5.tst
+ textlinkfar-merge.textlinkfar.h5.tst
+ textlinksrc-merge.textlinksrc.h5.tst
+ textlinktar-merge.textlinktar.h5.tst
+ textlink-merge.textlink.h5.tst
+ h5copy_extlinks_src-merge.h5copy_extlinks_src.h5.tst
)
set (LIST_DDL_TEST_FILES
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/crtorder.tordergr.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/deflate_limit.h5repack_layout.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5-plugin_test
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5-plugin_version_test
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5-plugin_zero
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.UD.h5-plugin_none
+ crtorder.tordergr.h5.ddl
+ deflate_limit.h5repack_layout.h5.ddl
+ h5repack_layout.h5.ddl
+ h5repack_layout.h5-plugin_test.ddl
+ h5repack_layout.h5-plugin_version_test.ddl
+ h5repack_layout.h5-plugin_zero.ddl
+ h5repack_layout.UD.h5-plugin_none.ddl
# fsm
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/STG.h5repack_none.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/SPT.h5repack_aggr.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/SP.h5repack_fsm_aggr_nopersist.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/S.h5repack_fsm_aggr_persist.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/GS.h5repack_paged_nopersist.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/SP.h5repack_paged_persist.h5
+ STG.h5repack_none.h5.ddl
+ SPT.h5repack_aggr.h5.ddl
+ SP.h5repack_fsm_aggr_nopersist.h5.ddl
+ S.h5repack_fsm_aggr_persist.h5.ddl
+ GS.h5repack_paged_nopersist.h5.ddl
+ SP.h5repack_paged_persist.h5.ddl
# vds
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/1_vds.h5-vds_dset_chunk20x10x5-v
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/2_vds.h5-vds_chunk3x6x9-v
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/3_1_vds.h5-vds_chunk2x5x8-v
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/4_vds.h5-vds_compa-v
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/4_vds.h5-vds_conti-v
+ 1_vds.h5-vds_dset_chunk20x10x5-v.ddl
+ 2_vds.h5-vds_chunk3x6x9-v.ddl
+ 3_1_vds.h5-vds_chunk2x5x8-v.ddl
+ 4_vds.h5-vds_compa-v.ddl
+ 4_vds.h5-vds_conti-v.ddl
# refs
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/attrregion.tattrreg.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/dataregion.tdatareg.h5
+ attrregion.tattrreg.h5.ddl
+ dataregion.tdatareg.h5.ddl
# tools/testfiles for external links
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinkfar-base.textlinkfar.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinksrc-base.textlinksrc.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinktar-base.textlinktar.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlink-base.textlink.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/tsoftlinks-base.tsoftlinks.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5copy_extlinks_src-base.h5copy_extlinks_src.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinkfar-prune.textlinkfar.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinksrc-prune.textlinksrc.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinktar-prune.textlinktar.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlink-prune.textlink.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/tsoftlinks-prune.tsoftlinks.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5copy_extlinks_src-prune.h5copy_extlinks_src.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinkfar-mergeprune.textlinkfar.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinksrc-mergeprune.textlinksrc.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinktar-mergeprune.textlinktar.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlink-mergeprune.textlink.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/tsoftlinks-mergeprune.tsoftlinks.h5
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5copy_extlinks_src-mergeprune.h5copy_extlinks_src.h5
+ textlinkfar-base.textlinkfar.h5.ddl
+ textlinksrc-base.textlinksrc.h5.ddl
+ textlinktar-base.textlinktar.h5.ddl
+ textlink-base.textlink.h5.ddl
+ tsoftlinks-base.tsoftlinks.h5.ddl
+ h5copy_extlinks_src-base.h5copy_extlinks_src.h5.ddl
+ textlinkfar-prune.textlinkfar.h5.ddl
+ textlinksrc-prune.textlinksrc.h5.ddl
+ textlinktar-prune.textlinktar.h5.ddl
+ textlink-prune.textlink.h5.ddl
+ tsoftlinks-prune.tsoftlinks.h5.ddl
+ h5copy_extlinks_src-prune.h5copy_extlinks_src.h5.ddl
+ textlinkfar-mergeprune.textlinkfar.h5.ddl
+ textlinksrc-mergeprune.textlinksrc.h5.ddl
+ textlinktar-mergeprune.textlinktar.h5.ddl
+ textlink-mergeprune.textlink.h5.ddl
+ tsoftlinks-mergeprune.tsoftlinks.h5.ddl
+ h5copy_extlinks_src-mergeprune.h5copy_extlinks_src.h5.ddl
)
+ foreach (h5_file ${LIST_REPACK_TEST_FILES})
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5repack_files")
+ endforeach ()
+
+ foreach (h5_file ${LIST_COPY_TEST_FILES})
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_TST_DIR}/h5copy/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5repack_files")
+ endforeach ()
+
+ foreach (h5_file ${LIST_DIFF_TEST_FILES})
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_TST_DIR}/h5diff/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5repack_files")
+ endforeach ()
+
+ foreach (h5_file ${LIST_VDS_TEST_FILES})
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_TST_DIR}/h5dump/testfiles/vds/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5repack_files")
+ endforeach ()
+
foreach (h5_file ${LIST_HDF5_TEST_FILES})
- get_filename_component(fname "${h5_file}" NAME)
- HDFTEST_COPY_FILE("${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${fname}" "h5repack_files")
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_TST_DIR}/h5dump/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5repack_files")
endforeach ()
foreach (h5_file ${LIST_OTHER_TEST_FILES})
- HDFTEST_COPY_FILE("${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5repack_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5repack_files")
endforeach ()
foreach (h5_file ${LIST_TST_TEST_FILES})
- get_filename_component(fname "${h5_file}" NAME)
- HDFTEST_COPY_FILE("${h5_file}.tst" "${PROJECT_BINARY_DIR}/testfiles/${fname}.tst" "h5repack_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/expected/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5repack_files")
endforeach ()
foreach (h5_file ${LIST_DDL_TEST_FILES})
- get_filename_component(fname "${h5_file}" NAME)
- HDFTEST_COPY_FILE("${h5_file}.ddl" "${PROJECT_BINARY_DIR}/testfiles/${fname}.ddl" "h5repack_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/expected/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5repack_files")
endforeach ()
add_custom_target(h5repack_files ALL COMMENT "Copying files needed by h5repack tests" DEPENDS ${h5repack_files_list})
diff --git a/tools/test/h5repack/testfiles/1_vds.h5-vds_dset_chunk20x10x5-v.ddl b/tools/test/h5repack/expected/1_vds.h5-vds_dset_chunk20x10x5-v.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/1_vds.h5-vds_dset_chunk20x10x5-v.ddl
rename to tools/test/h5repack/expected/1_vds.h5-vds_dset_chunk20x10x5-v.ddl
diff --git a/tools/test/h5repack/testfiles/2_vds.h5-vds_chunk3x6x9-v.ddl b/tools/test/h5repack/expected/2_vds.h5-vds_chunk3x6x9-v.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/2_vds.h5-vds_chunk3x6x9-v.ddl
rename to tools/test/h5repack/expected/2_vds.h5-vds_chunk3x6x9-v.ddl
diff --git a/tools/test/h5repack/testfiles/3_1_vds.h5-vds_chunk2x5x8-v.ddl b/tools/test/h5repack/expected/3_1_vds.h5-vds_chunk2x5x8-v.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/3_1_vds.h5-vds_chunk2x5x8-v.ddl
rename to tools/test/h5repack/expected/3_1_vds.h5-vds_chunk2x5x8-v.ddl
diff --git a/tools/test/h5repack/testfiles/4_vds.h5-vds_compa-v.ddl b/tools/test/h5repack/expected/4_vds.h5-vds_compa-v.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/4_vds.h5-vds_compa-v.ddl
rename to tools/test/h5repack/expected/4_vds.h5-vds_compa-v.ddl
diff --git a/tools/test/h5repack/testfiles/4_vds.h5-vds_conti-v.ddl b/tools/test/h5repack/expected/4_vds.h5-vds_conti-v.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/4_vds.h5-vds_conti-v.ddl
rename to tools/test/h5repack/expected/4_vds.h5-vds_conti-v.ddl
diff --git a/tools/test/h5repack/testfiles/GS.h5repack_paged_nopersist.h5.ddl b/tools/test/h5repack/expected/GS.h5repack_paged_nopersist.h5.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/GS.h5repack_paged_nopersist.h5.ddl
rename to tools/test/h5repack/expected/GS.h5repack_paged_nopersist.h5.ddl
diff --git a/tools/test/h5repack/testfiles/S.h5repack_fsm_aggr_persist.h5.ddl b/tools/test/h5repack/expected/S.h5repack_fsm_aggr_persist.h5.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/S.h5repack_fsm_aggr_persist.h5.ddl
rename to tools/test/h5repack/expected/S.h5repack_fsm_aggr_persist.h5.ddl
diff --git a/tools/test/h5repack/testfiles/SP.h5repack_fsm_aggr_nopersist.h5.ddl b/tools/test/h5repack/expected/SP.h5repack_fsm_aggr_nopersist.h5.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/SP.h5repack_fsm_aggr_nopersist.h5.ddl
rename to tools/test/h5repack/expected/SP.h5repack_fsm_aggr_nopersist.h5.ddl
diff --git a/tools/test/h5repack/testfiles/SP.h5repack_paged_persist.h5.ddl b/tools/test/h5repack/expected/SP.h5repack_paged_persist.h5.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/SP.h5repack_paged_persist.h5.ddl
rename to tools/test/h5repack/expected/SP.h5repack_paged_persist.h5.ddl
diff --git a/tools/test/h5repack/testfiles/SPT.h5repack_aggr.h5.ddl b/tools/test/h5repack/expected/SPT.h5repack_aggr.h5.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/SPT.h5repack_aggr.h5.ddl
rename to tools/test/h5repack/expected/SPT.h5repack_aggr.h5.ddl
diff --git a/tools/test/h5repack/testfiles/STG.h5repack_none.h5.ddl b/tools/test/h5repack/expected/STG.h5repack_none.h5.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/STG.h5repack_none.h5.ddl
rename to tools/test/h5repack/expected/STG.h5repack_none.h5.ddl
diff --git a/tools/test/h5repack/testfiles/attrregion.tattrreg.h5.ddl b/tools/test/h5repack/expected/attrregion.tattrreg.h5.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/attrregion.tattrreg.h5.ddl
rename to tools/test/h5repack/expected/attrregion.tattrreg.h5.ddl
diff --git a/tools/test/h5repack/testfiles/crtorder.tordergr.h5.ddl b/tools/test/h5repack/expected/crtorder.tordergr.h5.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/crtorder.tordergr.h5.ddl
rename to tools/test/h5repack/expected/crtorder.tordergr.h5.ddl
diff --git a/tools/test/h5repack/testfiles/dataregion.tdatareg.h5.ddl b/tools/test/h5repack/expected/dataregion.tdatareg.h5.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/dataregion.tdatareg.h5.ddl
rename to tools/test/h5repack/expected/dataregion.tdatareg.h5.ddl
diff --git a/tools/test/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl b/tools/test/h5repack/expected/deflate_limit.h5repack_layout.h5.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl
rename to tools/test/h5repack/expected/deflate_limit.h5repack_layout.h5.ddl
diff --git a/tools/test/h5repack/testfiles/h5copy_extlinks_src-base.h5copy_extlinks_src.h5.ddl b/tools/test/h5repack/expected/h5copy_extlinks_src-base.h5copy_extlinks_src.h5.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/h5copy_extlinks_src-base.h5copy_extlinks_src.h5.ddl
rename to tools/test/h5repack/expected/h5copy_extlinks_src-base.h5copy_extlinks_src.h5.ddl
diff --git a/tools/test/h5repack/testfiles/h5copy_extlinks_src-merge.h5copy_extlinks_src.h5.tst b/tools/test/h5repack/expected/h5copy_extlinks_src-merge.h5copy_extlinks_src.h5.tst
similarity index 100%
rename from tools/test/h5repack/testfiles/h5copy_extlinks_src-merge.h5copy_extlinks_src.h5.tst
rename to tools/test/h5repack/expected/h5copy_extlinks_src-merge.h5copy_extlinks_src.h5.tst
diff --git a/tools/test/h5repack/testfiles/h5copy_extlinks_src-mergeprune.h5copy_extlinks_src.h5.ddl b/tools/test/h5repack/expected/h5copy_extlinks_src-mergeprune.h5copy_extlinks_src.h5.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/h5copy_extlinks_src-mergeprune.h5copy_extlinks_src.h5.ddl
rename to tools/test/h5repack/expected/h5copy_extlinks_src-mergeprune.h5copy_extlinks_src.h5.ddl
diff --git a/tools/test/h5repack/testfiles/h5copy_extlinks_src-prune.h5copy_extlinks_src.h5.ddl b/tools/test/h5repack/expected/h5copy_extlinks_src-prune.h5copy_extlinks_src.h5.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/h5copy_extlinks_src-prune.h5copy_extlinks_src.h5.ddl
rename to tools/test/h5repack/expected/h5copy_extlinks_src-prune.h5copy_extlinks_src.h5.ddl
diff --git a/tools/test/h5repack/testfiles/h5repack-help.txt b/tools/test/h5repack/expected/h5repack-help.txt
similarity index 100%
rename from tools/test/h5repack/testfiles/h5repack-help.txt
rename to tools/test/h5repack/expected/h5repack-help.txt
diff --git a/tools/test/h5repack/testfiles/h5repack_filters.h5-gzip_verbose_filters.tst b/tools/test/h5repack/expected/h5repack_filters.h5-gzip_verbose_filters.tst
similarity index 100%
rename from tools/test/h5repack/testfiles/h5repack_filters.h5-gzip_verbose_filters.tst
rename to tools/test/h5repack/expected/h5repack_filters.h5-gzip_verbose_filters.tst
diff --git a/tools/test/h5repack/testfiles/h5repack_layout.UD.h5-plugin_none.ddl b/tools/test/h5repack/expected/h5repack_layout.UD.h5-plugin_none.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/h5repack_layout.UD.h5-plugin_none.ddl
rename to tools/test/h5repack/expected/h5repack_layout.UD.h5-plugin_none.ddl
diff --git a/tools/test/h5repack/testfiles/h5repack_layout.h5-dset2_chunk_20x10-errstk.tst b/tools/test/h5repack/expected/h5repack_layout.h5-dset2_chunk_20x10-errstk.tst
similarity index 100%
rename from tools/test/h5repack/testfiles/h5repack_layout.h5-dset2_chunk_20x10-errstk.tst
rename to tools/test/h5repack/expected/h5repack_layout.h5-dset2_chunk_20x10-errstk.tst
diff --git a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl b/tools/test/h5repack/expected/h5repack_layout.h5-plugin_test.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl
rename to tools/test/h5repack/expected/h5repack_layout.h5-plugin_test.ddl
diff --git a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl b/tools/test/h5repack/expected/h5repack_layout.h5-plugin_version_test.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl
rename to tools/test/h5repack/expected/h5repack_layout.h5-plugin_version_test.ddl
diff --git a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_zero.ddl b/tools/test/h5repack/expected/h5repack_layout.h5-plugin_zero.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_zero.ddl
rename to tools/test/h5repack/expected/h5repack_layout.h5-plugin_zero.ddl
diff --git a/tools/test/h5repack/testfiles/h5repack_layout.h5.ddl b/tools/test/h5repack/expected/h5repack_layout.h5.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/h5repack_layout.h5.ddl
rename to tools/test/h5repack/expected/h5repack_layout.h5.ddl
diff --git a/tools/test/h5repack/testfiles/onion.tst_onion_dset_1d.h5.ddl b/tools/test/h5repack/expected/onion.tst_onion_dset_1d.h5.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/onion.tst_onion_dset_1d.h5.ddl
rename to tools/test/h5repack/expected/onion.tst_onion_dset_1d.h5.ddl
diff --git a/tools/test/h5repack/testfiles/onion.tst_onion_dset_ext.h5.ddl b/tools/test/h5repack/expected/onion.tst_onion_dset_ext.h5.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/onion.tst_onion_dset_ext.h5.ddl
rename to tools/test/h5repack/expected/onion.tst_onion_dset_ext.h5.ddl
diff --git a/tools/test/h5repack/testfiles/onion.tst_onion_objs.h5.ddl b/tools/test/h5repack/expected/onion.tst_onion_objs.h5.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/onion.tst_onion_objs.h5.ddl
rename to tools/test/h5repack/expected/onion.tst_onion_objs.h5.ddl
diff --git a/tools/test/h5repack/testfiles/plugin_none.h5repack_layout.UD.h5.tst b/tools/test/h5repack/expected/plugin_none.h5repack_layout.UD.h5.tst
similarity index 100%
rename from tools/test/h5repack/testfiles/plugin_none.h5repack_layout.UD.h5.tst
rename to tools/test/h5repack/expected/plugin_none.h5repack_layout.UD.h5.tst
diff --git a/tools/test/h5repack/testfiles/plugin_test.h5repack_layout.h5.tst b/tools/test/h5repack/expected/plugin_test.h5repack_layout.h5.tst
similarity index 100%
rename from tools/test/h5repack/testfiles/plugin_test.h5repack_layout.h5.tst
rename to tools/test/h5repack/expected/plugin_test.h5repack_layout.h5.tst
diff --git a/tools/test/h5repack/testfiles/plugin_version_test.h5repack_layout.h5.tst b/tools/test/h5repack/expected/plugin_version_test.h5repack_layout.h5.tst
similarity index 100%
rename from tools/test/h5repack/testfiles/plugin_version_test.h5repack_layout.h5.tst
rename to tools/test/h5repack/expected/plugin_version_test.h5repack_layout.h5.tst
diff --git a/tools/test/h5repack/testfiles/plugin_zero.h5repack_layout.h5.tst b/tools/test/h5repack/expected/plugin_zero.h5repack_layout.h5.tst
similarity index 100%
rename from tools/test/h5repack/testfiles/plugin_zero.h5repack_layout.h5.tst
rename to tools/test/h5repack/expected/plugin_zero.h5repack_layout.h5.tst
diff --git a/tools/test/h5repack/testfiles/textlink-base.textlink.h5.ddl b/tools/test/h5repack/expected/textlink-base.textlink.h5.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/textlink-base.textlink.h5.ddl
rename to tools/test/h5repack/expected/textlink-base.textlink.h5.ddl
diff --git a/tools/test/h5repack/testfiles/textlink-merge.textlink.h5.tst b/tools/test/h5repack/expected/textlink-merge.textlink.h5.tst
similarity index 100%
rename from tools/test/h5repack/testfiles/textlink-merge.textlink.h5.tst
rename to tools/test/h5repack/expected/textlink-merge.textlink.h5.tst
diff --git a/tools/test/h5repack/testfiles/textlink-mergeprune.textlink.h5.ddl b/tools/test/h5repack/expected/textlink-mergeprune.textlink.h5.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/textlink-mergeprune.textlink.h5.ddl
rename to tools/test/h5repack/expected/textlink-mergeprune.textlink.h5.ddl
diff --git a/tools/test/h5repack/testfiles/textlink-prune.textlink.h5.ddl b/tools/test/h5repack/expected/textlink-prune.textlink.h5.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/textlink-prune.textlink.h5.ddl
rename to tools/test/h5repack/expected/textlink-prune.textlink.h5.ddl
diff --git a/tools/test/h5repack/testfiles/textlinkfar-base.textlinkfar.h5.ddl b/tools/test/h5repack/expected/textlinkfar-base.textlinkfar.h5.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/textlinkfar-base.textlinkfar.h5.ddl
rename to tools/test/h5repack/expected/textlinkfar-base.textlinkfar.h5.ddl
diff --git a/tools/test/h5repack/testfiles/textlinkfar-merge.textlinkfar.h5.tst b/tools/test/h5repack/expected/textlinkfar-merge.textlinkfar.h5.tst
similarity index 100%
rename from tools/test/h5repack/testfiles/textlinkfar-merge.textlinkfar.h5.tst
rename to tools/test/h5repack/expected/textlinkfar-merge.textlinkfar.h5.tst
diff --git a/tools/test/h5repack/testfiles/textlinkfar-mergeprune.textlinkfar.h5.ddl b/tools/test/h5repack/expected/textlinkfar-mergeprune.textlinkfar.h5.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/textlinkfar-mergeprune.textlinkfar.h5.ddl
rename to tools/test/h5repack/expected/textlinkfar-mergeprune.textlinkfar.h5.ddl
diff --git a/tools/test/h5repack/testfiles/textlinkfar-prune.textlinkfar.h5.ddl b/tools/test/h5repack/expected/textlinkfar-prune.textlinkfar.h5.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/textlinkfar-prune.textlinkfar.h5.ddl
rename to tools/test/h5repack/expected/textlinkfar-prune.textlinkfar.h5.ddl
diff --git a/tools/test/h5repack/testfiles/textlinksrc-base.textlinksrc.h5.ddl b/tools/test/h5repack/expected/textlinksrc-base.textlinksrc.h5.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/textlinksrc-base.textlinksrc.h5.ddl
rename to tools/test/h5repack/expected/textlinksrc-base.textlinksrc.h5.ddl
diff --git a/tools/test/h5repack/testfiles/textlinksrc-merge.textlinksrc.h5.tst b/tools/test/h5repack/expected/textlinksrc-merge.textlinksrc.h5.tst
similarity index 100%
rename from tools/test/h5repack/testfiles/textlinksrc-merge.textlinksrc.h5.tst
rename to tools/test/h5repack/expected/textlinksrc-merge.textlinksrc.h5.tst
diff --git a/tools/test/h5repack/testfiles/textlinksrc-mergeprune.textlinksrc.h5.ddl b/tools/test/h5repack/expected/textlinksrc-mergeprune.textlinksrc.h5.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/textlinksrc-mergeprune.textlinksrc.h5.ddl
rename to tools/test/h5repack/expected/textlinksrc-mergeprune.textlinksrc.h5.ddl
diff --git a/tools/test/h5repack/testfiles/textlinksrc-prune.textlinksrc.h5.ddl b/tools/test/h5repack/expected/textlinksrc-prune.textlinksrc.h5.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/textlinksrc-prune.textlinksrc.h5.ddl
rename to tools/test/h5repack/expected/textlinksrc-prune.textlinksrc.h5.ddl
diff --git a/tools/test/h5repack/testfiles/textlinktar-base.textlinktar.h5.ddl b/tools/test/h5repack/expected/textlinktar-base.textlinktar.h5.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/textlinktar-base.textlinktar.h5.ddl
rename to tools/test/h5repack/expected/textlinktar-base.textlinktar.h5.ddl
diff --git a/tools/test/h5repack/testfiles/textlinktar-merge.textlinktar.h5.tst b/tools/test/h5repack/expected/textlinktar-merge.textlinktar.h5.tst
similarity index 100%
rename from tools/test/h5repack/testfiles/textlinktar-merge.textlinktar.h5.tst
rename to tools/test/h5repack/expected/textlinktar-merge.textlinktar.h5.tst
diff --git a/tools/test/h5repack/testfiles/textlinktar-mergeprune.textlinktar.h5.ddl b/tools/test/h5repack/expected/textlinktar-mergeprune.textlinktar.h5.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/textlinktar-mergeprune.textlinktar.h5.ddl
rename to tools/test/h5repack/expected/textlinktar-mergeprune.textlinktar.h5.ddl
diff --git a/tools/test/h5repack/testfiles/textlinktar-prune.textlinktar.h5.ddl b/tools/test/h5repack/expected/textlinktar-prune.textlinktar.h5.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/textlinktar-prune.textlinktar.h5.ddl
rename to tools/test/h5repack/expected/textlinktar-prune.textlinktar.h5.ddl
diff --git a/tools/test/h5repack/testfiles/tsoftlinks-base.tsoftlinks.h5.ddl b/tools/test/h5repack/expected/tsoftlinks-base.tsoftlinks.h5.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/tsoftlinks-base.tsoftlinks.h5.ddl
rename to tools/test/h5repack/expected/tsoftlinks-base.tsoftlinks.h5.ddl
diff --git a/tools/test/h5repack/testfiles/tsoftlinks-merge.tsoftlinks.h5.tst b/tools/test/h5repack/expected/tsoftlinks-merge.tsoftlinks.h5.tst
similarity index 100%
rename from tools/test/h5repack/testfiles/tsoftlinks-merge.tsoftlinks.h5.tst
rename to tools/test/h5repack/expected/tsoftlinks-merge.tsoftlinks.h5.tst
diff --git a/tools/test/h5repack/testfiles/tsoftlinks-mergeprune.tsoftlinks.h5.ddl b/tools/test/h5repack/expected/tsoftlinks-mergeprune.tsoftlinks.h5.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/tsoftlinks-mergeprune.tsoftlinks.h5.ddl
rename to tools/test/h5repack/expected/tsoftlinks-mergeprune.tsoftlinks.h5.ddl
diff --git a/tools/test/h5repack/testfiles/tsoftlinks-prune.tsoftlinks.h5.ddl b/tools/test/h5repack/expected/tsoftlinks-prune.tsoftlinks.h5.ddl
similarity index 100%
rename from tools/test/h5repack/testfiles/tsoftlinks-prune.tsoftlinks.h5.ddl
rename to tools/test/h5repack/expected/tsoftlinks-prune.tsoftlinks.h5.ddl
diff --git a/tools/test/h5repack/h5repack.sh.in b/tools/test/h5repack/h5repack.sh.in
index 9b58965997f..f3b8d3eb9b9 100644
--- a/tools/test/h5repack/h5repack.sh.in
+++ b/tools/test/h5repack/h5repack.sh.in
@@ -56,17 +56,17 @@ verbose=yes
# source dirs
SRC_TOOLS="$srcdir/../.."
-SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles"
# testfiles source dirs for tools
-SRC_H5LS_TESTFILES="$SRC_TOOLS_TESTFILES"
-SRC_H5DUMP_TESTFILES="$SRC_TOOLS_TESTFILES"
+SRC_H5LS_TESTFILES="$SRC_TOOLS/test/h5ls/testfiles"
+SRC_H5DUMP_TESTFILES="$SRC_TOOLS/test/h5dump/testfiles"
SRC_H5DIFF_TESTFILES="$SRC_TOOLS/test/h5diff/testfiles"
SRC_H5COPY_TESTFILES="$SRC_TOOLS/test/h5copy/testfiles"
SRC_H5REPACK_TESTFILES="$SRC_TOOLS/test/h5repack/testfiles"
SRC_H5JAM_TESTFILES="$SRC_TOOLS/test/h5jam/testfiles"
SRC_H5STAT_TESTFILES="$SRC_TOOLS/test/h5stat/testfiles"
SRC_H5IMPORT_TESTFILES="$SRC_TOOLS/test/h5import/testfiles"
+SRC_H5REPACK_OUTFILES="$SRC_TOOLS/test/h5repack/expected"
TESTDIR=./testpack
test -d $TESTDIR || mkdir $TESTDIR
@@ -127,62 +127,62 @@ $SRC_H5DIFF_TESTFILES/h5diff_attr1.h5
$SRC_H5REPACK_TESTFILES/h5repack_CVE-2018-17432.h5
$SRC_H5REPACK_TESTFILES/h5repack_CVE-2018-14460.h5
########tools/testfiles#for#external#links########
-$SRC_TOOLS_TESTFILES/tsoftlinks.h5
-$SRC_TOOLS_TESTFILES/textlinkfar.h5
-$SRC_TOOLS_TESTFILES/textlinksrc.h5
-$SRC_TOOLS_TESTFILES/textlinktar.h5
-$SRC_TOOLS_TESTFILES/textlink.h5
-$SRC_H5REPACK_TESTFILES/h5copy_extlinks_src.h5
-$SRC_H5REPACK_TESTFILES/h5copy_extlinks_trg.h5
+$SRC_H5DUMP_TESTFILES/tsoftlinks.h5
+$SRC_H5DUMP_TESTFILES/textlinkfar.h5
+$SRC_H5DUMP_TESTFILES/textlinksrc.h5
+$SRC_H5DUMP_TESTFILES/textlinktar.h5
+$SRC_H5DUMP_TESTFILES/textlink.h5
+$SRC_H5COPY_TESTFILES/h5copy_extlinks_src.h5
+$SRC_H5COPY_TESTFILES/h5copy_extlinks_trg.h5
########tools/testfiles########
-$SRC_TOOLS_TESTFILES/tfamily00000.h5
-$SRC_TOOLS_TESTFILES/tfamily00001.h5
-$SRC_TOOLS_TESTFILES/tfamily00002.h5
-$SRC_TOOLS_TESTFILES/tfamily00003.h5
-$SRC_TOOLS_TESTFILES/tfamily00004.h5
-$SRC_TOOLS_TESTFILES/tfamily00005.h5
-$SRC_TOOLS_TESTFILES/tfamily00006.h5
-$SRC_TOOLS_TESTFILES/tfamily00007.h5
-$SRC_TOOLS_TESTFILES/tfamily00008.h5
-$SRC_TOOLS_TESTFILES/tfamily00009.h5
-$SRC_TOOLS_TESTFILES/tfamily00010.h5
-$SRC_TOOLS_TESTFILES/tordergr.h5
+$SRC_H5DUMP_TESTFILES/tfamily00000.h5
+$SRC_H5DUMP_TESTFILES/tfamily00001.h5
+$SRC_H5DUMP_TESTFILES/tfamily00002.h5
+$SRC_H5DUMP_TESTFILES/tfamily00003.h5
+$SRC_H5DUMP_TESTFILES/tfamily00004.h5
+$SRC_H5DUMP_TESTFILES/tfamily00005.h5
+$SRC_H5DUMP_TESTFILES/tfamily00006.h5
+$SRC_H5DUMP_TESTFILES/tfamily00007.h5
+$SRC_H5DUMP_TESTFILES/tfamily00008.h5
+$SRC_H5DUMP_TESTFILES/tfamily00009.h5
+$SRC_H5DUMP_TESTFILES/tfamily00010.h5
+$SRC_H5DUMP_TESTFILES/tordergr.h5
########reference#conversion#files########
########tools/testfiles/vds########
-$SRC_TOOLS_TESTFILES/vds/1_a.h5
-$SRC_TOOLS_TESTFILES/vds/1_b.h5
-$SRC_TOOLS_TESTFILES/vds/1_c.h5
-$SRC_TOOLS_TESTFILES/vds/1_d.h5
-$SRC_TOOLS_TESTFILES/vds/1_e.h5
-$SRC_TOOLS_TESTFILES/vds/1_f.h5
-$SRC_TOOLS_TESTFILES/vds/1_vds.h5
-$SRC_TOOLS_TESTFILES/vds/2_a.h5
-$SRC_TOOLS_TESTFILES/vds/2_b.h5
-$SRC_TOOLS_TESTFILES/vds/2_c.h5
-$SRC_TOOLS_TESTFILES/vds/2_d.h5
-$SRC_TOOLS_TESTFILES/vds/2_e.h5
-$SRC_TOOLS_TESTFILES/vds/2_vds.h5
-$SRC_TOOLS_TESTFILES/vds/3_1_vds.h5
-$SRC_TOOLS_TESTFILES/vds/3_2_vds.h5
-$SRC_TOOLS_TESTFILES/vds/4_0.h5
-$SRC_TOOLS_TESTFILES/vds/4_1.h5
-$SRC_TOOLS_TESTFILES/vds/4_2.h5
-$SRC_TOOLS_TESTFILES/vds/4_vds.h5
-$SRC_TOOLS_TESTFILES/vds/5_a.h5
-$SRC_TOOLS_TESTFILES/vds/5_b.h5
-$SRC_TOOLS_TESTFILES/vds/5_c.h5
-$SRC_TOOLS_TESTFILES/vds/5_vds.h5
+$SRC_H5DUMP_TESTFILES/vds/1_a.h5
+$SRC_H5DUMP_TESTFILES/vds/1_b.h5
+$SRC_H5DUMP_TESTFILES/vds/1_c.h5
+$SRC_H5DUMP_TESTFILES/vds/1_d.h5
+$SRC_H5DUMP_TESTFILES/vds/1_e.h5
+$SRC_H5DUMP_TESTFILES/vds/1_f.h5
+$SRC_H5DUMP_TESTFILES/vds/1_vds.h5
+$SRC_H5DUMP_TESTFILES/vds/2_a.h5
+$SRC_H5DUMP_TESTFILES/vds/2_b.h5
+$SRC_H5DUMP_TESTFILES/vds/2_c.h5
+$SRC_H5DUMP_TESTFILES/vds/2_d.h5
+$SRC_H5DUMP_TESTFILES/vds/2_e.h5
+$SRC_H5DUMP_TESTFILES/vds/2_vds.h5
+$SRC_H5DUMP_TESTFILES/vds/3_1_vds.h5
+$SRC_H5DUMP_TESTFILES/vds/3_2_vds.h5
+$SRC_H5DUMP_TESTFILES/vds/4_0.h5
+$SRC_H5DUMP_TESTFILES/vds/4_1.h5
+$SRC_H5DUMP_TESTFILES/vds/4_2.h5
+$SRC_H5DUMP_TESTFILES/vds/4_vds.h5
+$SRC_H5DUMP_TESTFILES/vds/5_a.h5
+$SRC_H5DUMP_TESTFILES/vds/5_b.h5
+$SRC_H5DUMP_TESTFILES/vds/5_c.h5
+$SRC_H5DUMP_TESTFILES/vds/5_vds.h5
########tools/testfiles########
-$SRC_TOOLS_TESTFILES/tst_onion_dset_1d.h5
-$SRC_TOOLS_TESTFILES/tst_onion_dset_1d.h5.onion
-$SRC_TOOLS_TESTFILES/tst_onion_dset_ext.h5
-$SRC_TOOLS_TESTFILES/tst_onion_dset_ext.h5.onion
-$SRC_TOOLS_TESTFILES/tst_onion_objs.h5
-$SRC_TOOLS_TESTFILES/tst_onion_objs.h5.onion
+$SRC_H5DUMP_TESTFILES/tst_onion_dset_1d.h5
+$SRC_H5DUMP_TESTFILES/tst_onion_dset_1d.h5.onion
+$SRC_H5DUMP_TESTFILES/tst_onion_dset_ext.h5
+$SRC_H5DUMP_TESTFILES/tst_onion_dset_ext.h5.onion
+$SRC_H5DUMP_TESTFILES/tst_onion_objs.h5
+$SRC_H5DUMP_TESTFILES/tst_onion_objs.h5.onion
"
LIST_OTHER_TEST_FILES="
-$SRC_H5REPACK_TESTFILES/h5repack-help.txt
+$SRC_H5REPACK_OUTFILES/h5repack-help.txt
$SRC_H5REPACK_TESTFILES/h5repack_ext.bin
$SRC_H5REPACK_TESTFILES/ublock.bin
$SRC_H5REPACK_TESTFILES/h5repack.info
@@ -197,66 +197,66 @@ $SRC_H5REPACK_TESTFILES/h5repack_uint8be_ex-1.dat
$SRC_H5REPACK_TESTFILES/h5repack_uint8be_ex-2.dat
$SRC_H5REPACK_TESTFILES/h5repack_uint8be_ex-3.dat
###############
-$SRC_H5REPACK_TESTFILES/crtorder.tordergr.h5.ddl
-$SRC_H5REPACK_TESTFILES/deflate_limit.h5repack_layout.h5.ddl
-$SRC_H5REPACK_TESTFILES/h5repack_layout.h5.ddl
-$SRC_H5REPACK_TESTFILES/h5repack_layout.h5-plugin_test.ddl
+$SRC_H5REPACK_OUTFILES/crtorder.tordergr.h5.ddl
+$SRC_H5REPACK_OUTFILES/deflate_limit.h5repack_layout.h5.ddl
+$SRC_H5REPACK_OUTFILES/h5repack_layout.h5.ddl
+$SRC_H5REPACK_OUTFILES/h5repack_layout.h5-plugin_test.ddl
########fsm#files########
-$SRC_H5REPACK_TESTFILES/SP.h5repack_fsm_aggr_nopersist.h5.ddl
-$SRC_H5REPACK_TESTFILES/S.h5repack_fsm_aggr_persist.h5.ddl
-$SRC_H5REPACK_TESTFILES/STG.h5repack_none.h5.ddl
-$SRC_H5REPACK_TESTFILES/GS.h5repack_paged_nopersist.h5.ddl
-$SRC_H5REPACK_TESTFILES/SP.h5repack_paged_persist.h5.ddl
-$SRC_H5REPACK_TESTFILES/SPT.h5repack_aggr.h5.ddl
+$SRC_H5REPACK_OUTFILES/SP.h5repack_fsm_aggr_nopersist.h5.ddl
+$SRC_H5REPACK_OUTFILES/S.h5repack_fsm_aggr_persist.h5.ddl
+$SRC_H5REPACK_OUTFILES/STG.h5repack_none.h5.ddl
+$SRC_H5REPACK_OUTFILES/GS.h5repack_paged_nopersist.h5.ddl
+$SRC_H5REPACK_OUTFILES/SP.h5repack_paged_persist.h5.ddl
+$SRC_H5REPACK_OUTFILES/SPT.h5repack_aggr.h5.ddl
########vds#files########
-$SRC_H5REPACK_TESTFILES/1_vds.h5-vds_dset_chunk20x10x5-v.ddl
-$SRC_H5REPACK_TESTFILES/2_vds.h5-vds_chunk3x6x9-v.ddl
-$SRC_H5REPACK_TESTFILES/3_1_vds.h5-vds_chunk2x5x8-v.ddl
-$SRC_H5REPACK_TESTFILES/4_vds.h5-vds_compa-v.ddl
-$SRC_H5REPACK_TESTFILES/4_vds.h5-vds_conti-v.ddl
+$SRC_H5REPACK_OUTFILES/1_vds.h5-vds_dset_chunk20x10x5-v.ddl
+$SRC_H5REPACK_OUTFILES/2_vds.h5-vds_chunk3x6x9-v.ddl
+$SRC_H5REPACK_OUTFILES/3_1_vds.h5-vds_chunk2x5x8-v.ddl
+$SRC_H5REPACK_OUTFILES/4_vds.h5-vds_compa-v.ddl
+$SRC_H5REPACK_OUTFILES/4_vds.h5-vds_conti-v.ddl
########refs#files########
-$SRC_H5REPACK_TESTFILES/attrregion.tattrreg.h5.ddl
-$SRC_H5REPACK_TESTFILES/dataregion.tdatareg.h5.ddl
+$SRC_H5REPACK_OUTFILES/attrregion.tattrreg.h5.ddl
+$SRC_H5REPACK_OUTFILES/dataregion.tdatareg.h5.ddl
########external#links#files########
-$SRC_H5REPACK_TESTFILES/textlinkfar-base.textlinkfar.h5.ddl
-$SRC_H5REPACK_TESTFILES/textlinksrc-base.textlinksrc.h5.ddl
-$SRC_H5REPACK_TESTFILES/textlinktar-base.textlinktar.h5.ddl
-$SRC_H5REPACK_TESTFILES/textlink-base.textlink.h5.ddl
-$SRC_H5REPACK_TESTFILES/tsoftlinks-base.tsoftlinks.h5.ddl
-$SRC_H5REPACK_TESTFILES/h5copy_extlinks_src-base.h5copy_extlinks_src.h5.ddl
-$SRC_H5REPACK_TESTFILES/textlinkfar-merge.textlinkfar.h5.tst
-$SRC_H5REPACK_TESTFILES/textlinksrc-merge.textlinksrc.h5.tst
-$SRC_H5REPACK_TESTFILES/textlinktar-merge.textlinktar.h5.tst
-$SRC_H5REPACK_TESTFILES/textlink-merge.textlink.h5.tst
-$SRC_H5REPACK_TESTFILES/tsoftlinks-merge.tsoftlinks.h5.tst
-$SRC_H5REPACK_TESTFILES/h5copy_extlinks_src-merge.h5copy_extlinks_src.h5.tst
-$SRC_H5REPACK_TESTFILES/textlinkfar-prune.textlinkfar.h5.ddl
-$SRC_H5REPACK_TESTFILES/textlinksrc-prune.textlinksrc.h5.ddl
-$SRC_H5REPACK_TESTFILES/textlinktar-prune.textlinktar.h5.ddl
-$SRC_H5REPACK_TESTFILES/textlink-prune.textlink.h5.ddl
-$SRC_H5REPACK_TESTFILES/tsoftlinks-prune.tsoftlinks.h5.ddl
-$SRC_H5REPACK_TESTFILES/h5copy_extlinks_src-prune.h5copy_extlinks_src.h5.ddl
-$SRC_H5REPACK_TESTFILES/textlinkfar-mergeprune.textlinkfar.h5.ddl
-$SRC_H5REPACK_TESTFILES/textlinksrc-mergeprune.textlinksrc.h5.ddl
-$SRC_H5REPACK_TESTFILES/textlinktar-mergeprune.textlinktar.h5.ddl
-$SRC_H5REPACK_TESTFILES/textlink-mergeprune.textlink.h5.ddl
-$SRC_H5REPACK_TESTFILES/tsoftlinks-mergeprune.tsoftlinks.h5.ddl
-$SRC_H5REPACK_TESTFILES/h5copy_extlinks_src-mergeprune.h5copy_extlinks_src.h5.ddl
+$SRC_H5REPACK_OUTFILES/textlinkfar-base.textlinkfar.h5.ddl
+$SRC_H5REPACK_OUTFILES/textlinksrc-base.textlinksrc.h5.ddl
+$SRC_H5REPACK_OUTFILES/textlinktar-base.textlinktar.h5.ddl
+$SRC_H5REPACK_OUTFILES/textlink-base.textlink.h5.ddl
+$SRC_H5REPACK_OUTFILES/tsoftlinks-base.tsoftlinks.h5.ddl
+$SRC_H5REPACK_OUTFILES/h5copy_extlinks_src-base.h5copy_extlinks_src.h5.ddl
+$SRC_H5REPACK_OUTFILES/textlinkfar-merge.textlinkfar.h5.tst
+$SRC_H5REPACK_OUTFILES/textlinksrc-merge.textlinksrc.h5.tst
+$SRC_H5REPACK_OUTFILES/textlinktar-merge.textlinktar.h5.tst
+$SRC_H5REPACK_OUTFILES/textlink-merge.textlink.h5.tst
+$SRC_H5REPACK_OUTFILES/tsoftlinks-merge.tsoftlinks.h5.tst
+$SRC_H5REPACK_OUTFILES/h5copy_extlinks_src-merge.h5copy_extlinks_src.h5.tst
+$SRC_H5REPACK_OUTFILES/textlinkfar-prune.textlinkfar.h5.ddl
+$SRC_H5REPACK_OUTFILES/textlinksrc-prune.textlinksrc.h5.ddl
+$SRC_H5REPACK_OUTFILES/textlinktar-prune.textlinktar.h5.ddl
+$SRC_H5REPACK_OUTFILES/textlink-prune.textlink.h5.ddl
+$SRC_H5REPACK_OUTFILES/tsoftlinks-prune.tsoftlinks.h5.ddl
+$SRC_H5REPACK_OUTFILES/h5copy_extlinks_src-prune.h5copy_extlinks_src.h5.ddl
+$SRC_H5REPACK_OUTFILES/textlinkfar-mergeprune.textlinkfar.h5.ddl
+$SRC_H5REPACK_OUTFILES/textlinksrc-mergeprune.textlinksrc.h5.ddl
+$SRC_H5REPACK_OUTFILES/textlinktar-mergeprune.textlinktar.h5.ddl
+$SRC_H5REPACK_OUTFILES/textlink-mergeprune.textlink.h5.ddl
+$SRC_H5REPACK_OUTFILES/tsoftlinks-mergeprune.tsoftlinks.h5.ddl
+$SRC_H5REPACK_OUTFILES/h5copy_extlinks_src-mergeprune.h5copy_extlinks_src.h5.ddl
########tst#files########
-$SRC_H5REPACK_TESTFILES/h5repack_filters.h5-gzip_verbose_filters.tst
-$SRC_H5REPACK_TESTFILES/h5repack_layout.h5-dset2_chunk_20x10-errstk.tst
-$SRC_H5REPACK_TESTFILES/plugin_test.h5repack_layout.h5.tst
+$SRC_H5REPACK_OUTFILES/h5repack_filters.h5-gzip_verbose_filters.tst
+$SRC_H5REPACK_OUTFILES/h5repack_layout.h5-dset2_chunk_20x10-errstk.tst
+$SRC_H5REPACK_OUTFILES/plugin_test.h5repack_layout.h5.tst
########external#links#tst#files########
-$SRC_H5REPACK_TESTFILES/tsoftlinks-merge.tsoftlinks.h5.tst
-$SRC_H5REPACK_TESTFILES/textlinkfar-merge.textlinkfar.h5.tst
-$SRC_H5REPACK_TESTFILES/textlinksrc-merge.textlinksrc.h5.tst
-$SRC_H5REPACK_TESTFILES/textlinktar-merge.textlinktar.h5.tst
-$SRC_H5REPACK_TESTFILES/textlink-merge.textlink.h5.tst
-$SRC_H5REPACK_TESTFILES/h5copy_extlinks_src-merge.h5copy_extlinks_src.h5.tst
+$SRC_H5REPACK_OUTFILES/tsoftlinks-merge.tsoftlinks.h5.tst
+$SRC_H5REPACK_OUTFILES/textlinkfar-merge.textlinkfar.h5.tst
+$SRC_H5REPACK_OUTFILES/textlinksrc-merge.textlinksrc.h5.tst
+$SRC_H5REPACK_OUTFILES/textlinktar-merge.textlinktar.h5.tst
+$SRC_H5REPACK_OUTFILES/textlink-merge.textlink.h5.tst
+$SRC_H5REPACK_OUTFILES/h5copy_extlinks_src-merge.h5copy_extlinks_src.h5.tst
########onion#files########
-$SRC_H5REPACK_TESTFILES/onion.tst_onion_dset_1d.h5.ddl
-$SRC_H5REPACK_TESTFILES/onion.tst_onion_dset_ext.h5.ddl
-$SRC_H5REPACK_TESTFILES/onion.tst_onion_objs.h5.ddl
+$SRC_H5REPACK_OUTFILES/onion.tst_onion_dset_1d.h5.ddl
+$SRC_H5REPACK_OUTFILES/onion.tst_onion_dset_ext.h5.ddl
+$SRC_H5REPACK_OUTFILES/onion.tst_onion_objs.h5.ddl
"
#
diff --git a/tools/test/h5repack/h5repack_plugin.sh.in b/tools/test/h5repack/h5repack_plugin.sh.in
index bd7c3a1229c..43be1ee1c7b 100644
--- a/tools/test/h5repack/h5repack_plugin.sh.in
+++ b/tools/test/h5repack/h5repack_plugin.sh.in
@@ -47,6 +47,7 @@ SRC_TOOLS="$srcdir/../.."
# testfiles source dirs for tools
SRC_H5REPACK_TESTFILES="$SRC_TOOLS/test/h5repack/testfiles"
+SRC_H5REPACK_OUTFILES="$SRC_TOOLS/test/h5repack/expected"
TESTDIR=testplug
test -d $TESTDIR || mkdir $TESTDIR
@@ -62,14 +63,14 @@ test -d $TESTDIR || mkdir $TESTDIR
# --------------------------------------------------------------------
LIST_HDF5_TEST_FILES="
$SRC_H5REPACK_TESTFILES/h5repack_layout.h5
-$SRC_H5REPACK_TESTFILES/h5repack_layout.h5-plugin_test.ddl
-$SRC_H5REPACK_TESTFILES/plugin_test.h5repack_layout.h5.tst
-$SRC_H5REPACK_TESTFILES/h5repack_layout.h5-plugin_version_test.ddl
-$SRC_H5REPACK_TESTFILES/plugin_version_test.h5repack_layout.h5.tst
+$SRC_H5REPACK_OUTFILES/h5repack_layout.h5-plugin_test.ddl
+$SRC_H5REPACK_OUTFILES/plugin_test.h5repack_layout.h5.tst
+$SRC_H5REPACK_OUTFILES/h5repack_layout.h5-plugin_version_test.ddl
+$SRC_H5REPACK_OUTFILES/plugin_version_test.h5repack_layout.h5.tst
"
#$SRC_H5REPACK_TESTFILES/h5repack_layout.UD.h5
-#$SRC_H5REPACK_TESTFILES/h5repack_layout.UD.h5-plugin_none.ddl
-#$SRC_H5REPACK_TESTFILES/plugin_none.h5repack_layout.UD.h5.tst
+#$SRC_H5REPACK_OUTFILES/h5repack_layout.UD.h5-plugin_none.ddl
+#$SRC_H5REPACK_OUTFILES/plugin_none.h5repack_layout.UD.h5.tst
#"
#
diff --git a/tools/test/h5repack/h5repackgentest.c b/tools/test/h5repack/h5repackgentest.c
index 7c73e91b968..8fbfab5e420 100644
--- a/tools/test/h5repack/h5repackgentest.c
+++ b/tools/test/h5repack/h5repackgentest.c
@@ -115,7 +115,7 @@ set_dcpl_external_list(hid_t dcpl, const char *filename, unsigned n_elts_per_fil
return -1;
for (i = 0; i < n_external_files; i++) {
- if (HDsnprintf(name, MAX_NAME_SIZE, "%s_ex-%u.dat", filename, i) >= MAX_NAME_SIZE)
+ if (snprintf(name, MAX_NAME_SIZE, "%s_ex-%u.dat", filename, i) >= MAX_NAME_SIZE)
return -1;
if (H5Pset_external(dcpl, name, 0, n_elts_per_file * elt_size) < 0)
@@ -140,7 +140,7 @@ make_file(const char *basename, struct external_def *ext, hid_t type_id, hsize_t
hid_t space_id = H5I_INVALID_HID;
int ret_value = 0;
- if (HDsnprintf(filename, MAX_NAME_SIZE, "%s%s.h5", basename, (NULL != ext) ? "_ex" : "") >= MAX_NAME_SIZE)
+ if (snprintf(filename, MAX_NAME_SIZE, "%s%s.h5", basename, (NULL != ext) ? "_ex" : "") >= MAX_NAME_SIZE)
H5REPACKGENTEST_OOPS;
if (NULL != ext) {
@@ -173,7 +173,7 @@ make_file(const char *basename, struct external_def *ext, hid_t type_id, hsize_t
* Returns 0 on success, -1 on failure.
*/
static int
-generate_int32le_1d(hbool_t external)
+generate_int32le_1d(bool external)
{
int32_t wdata[12];
hsize_t dims[] = {12};
@@ -188,7 +188,7 @@ generate_int32le_1d(hbool_t external)
wdata[n] = n - 6;
}
- def_ptr = (TRUE == external) ? (&def) : NULL;
+ def_ptr = (true == external) ? (&def) : NULL;
if (make_file(FILE_INT32LE_1, def_ptr, H5T_STD_I32LE, 1, dims, wdata) < 0)
ret_value = -1;
@@ -199,7 +199,7 @@ generate_int32le_1d(hbool_t external)
* Returns 0 on success, -1 on failure.
*/
static int
-generate_int32le_2d(hbool_t external)
+generate_int32le_2d(bool external)
{
int32_t wdata[64];
hsize_t dims[] = {8, 8};
@@ -214,7 +214,7 @@ generate_int32le_2d(hbool_t external)
wdata[n] = n - 32;
}
- def_ptr = (TRUE == external) ? (&def) : NULL;
+ def_ptr = (true == external) ? (&def) : NULL;
if (make_file(FILE_INT32LE_2, def_ptr, H5T_STD_I32LE, 2, dims, wdata) < 0)
ret_value = -1;
@@ -225,7 +225,7 @@ generate_int32le_2d(hbool_t external)
* Returns 0 on success, -1 on failure.
*/
static int
-generate_int32le_3d(hbool_t external)
+generate_int32le_3d(bool external)
{
hsize_t dims[] = {8, 8, 8};
int32_t wdata[512]; /* 8^3, from dims */
@@ -247,7 +247,7 @@ generate_int32le_3d(hbool_t external)
}
}
- def_ptr = (TRUE == external) ? (&def) : NULL;
+ def_ptr = (true == external) ? (&def) : NULL;
if (make_file(FILE_INT32LE_3, def_ptr, H5T_STD_I32LE, 3, dims, wdata) < 0)
ret_value = -1;
@@ -258,7 +258,7 @@ generate_int32le_3d(hbool_t external)
* Returns 0 on success, -1 on failure.
*/
static int
-generate_uint8be(hbool_t external)
+generate_uint8be(bool external)
{
hsize_t dims[] = {4, 8, 8};
uint8_t wdata[256]; /* 4*8*8, from dims */
@@ -280,7 +280,7 @@ generate_uint8be(hbool_t external)
}
}
- def_ptr = (TRUE == external) ? (&def) : NULL;
+ def_ptr = (true == external) ? (&def) : NULL;
if (make_file(FILE_UINT8BE, def_ptr, H5T_STD_U8BE, 3, dims, wdata) < 0)
ret_value = -1;
@@ -291,7 +291,7 @@ generate_uint8be(hbool_t external)
* Returns 0 on success, -1 on failure.
*/
static int
-generate_f32le(hbool_t external)
+generate_f32le(bool external)
{
hsize_t dims[] = {12, 6};
float wdata[72]; /* 12*6, from dims */
@@ -310,7 +310,7 @@ generate_f32le(hbool_t external)
}
}
- def_ptr = (TRUE == external) ? (&def) : NULL;
+ def_ptr = (true == external) ? (&def) : NULL;
if (make_file(FILE_F32LE, def_ptr, H5T_IEEE_F32LE, 2, dims, wdata) < 0)
ret_value = -1;
@@ -327,7 +327,7 @@ main(void)
int i = 0;
for (i = 0; i < 2; i++) {
- hbool_t external = (i & 1) ? TRUE : FALSE;
+ bool external = (i & 1) ? true : false;
if (generate_int32le_1d(external) < 0)
printf("A generate_int32le_1d failed!\n");
diff --git a/tools/test/h5repack/h5repacktst.c b/tools/test/h5repack/h5repacktst.c
index 00a7ae2c830..98d5362e7fe 100644
--- a/tools/test/h5repack/h5repacktst.c
+++ b/tools/test/h5repack/h5repacktst.c
@@ -182,7 +182,7 @@ main(void)
h5_stat_t file_stat;
h5_stat_size_t fsize1, fsize2; /* file sizes */
- hbool_t driver_is_parallel;
+ bool driver_is_parallel;
#if defined(H5_HAVE_FILTER_SZIP)
int szip_can_encode = 0;
#endif
@@ -224,7 +224,7 @@ main(void)
j = 0; /* #0 */
assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
fname = H5REPACK_FSPACE_FNAMES[j];
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack(fname, FSPACE_OUT, &pack_options) < 0)
@@ -241,10 +241,10 @@ main(void)
++j; /* #1 */
assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
fname = H5REPACK_FSPACE_FNAMES[j];
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
pack_options.fs_strategy = H5F_FSPACE_STRATEGY_NONE;
- pack_options.fs_persist = -1; /* "FALSE" is set via -P 0 */
+ pack_options.fs_persist = -1; /* "false" is set via -P 0 */
pack_options.fs_threshold = 1;
pack_options.fs_pagesize = 8192;
if (h5repack(fname, FSPACE_OUT, &pack_options) < 0)
@@ -261,7 +261,7 @@ main(void)
++j; /* #2 */
assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
fname = H5REPACK_FSPACE_FNAMES[j];
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
pack_options.fs_strategy = (H5F_fspace_strategy_t)-1; /* "FSM_AGGR" specified via -S FSM_AGGR */
pack_options.fs_threshold = -1; /* "0" specified via -T 0 */
@@ -280,10 +280,10 @@ main(void)
++j; /* #3 */
assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
fname = H5REPACK_FSPACE_FNAMES[j];
- if (h5repack_init(&pack_options, 0, TRUE) < 0)
+ if (h5repack_init(&pack_options, 0, true) < 0)
GOERROR;
pack_options.fs_strategy = H5F_FSPACE_STRATEGY_PAGE; /* "PAGE" specified via -S */
- pack_options.fs_persist = TRUE;
+ pack_options.fs_persist = true;
if (h5repack(fname, FSPACE_OUT, &pack_options) < 0)
GOERROR;
if (h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0)
@@ -298,9 +298,9 @@ main(void)
++j; /* #4 */
assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
fname = H5REPACK_FSPACE_FNAMES[j];
- if (h5repack_init(&pack_options, 0, TRUE) < 0)
+ if (h5repack_init(&pack_options, 0, true) < 0)
GOERROR;
- pack_options.fs_persist = -1; /* "FALSE" is set via -P 0 */
+ pack_options.fs_persist = -1; /* "false" is set via -P 0 */
pack_options.fs_threshold = 2;
if (h5repack(fname, FSPACE_OUT, &pack_options) < 0)
GOERROR;
@@ -316,7 +316,7 @@ main(void)
++j; /* #5 */
assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
fname = H5REPACK_FSPACE_FNAMES[j];
- if (h5repack_init(&pack_options, 0, TRUE) < 0)
+ if (h5repack_init(&pack_options, 0, true) < 0)
GOERROR;
pack_options.fs_strategy = H5F_FSPACE_STRATEGY_PAGE;
pack_options.fs_pagesize = 8192;
@@ -334,10 +334,10 @@ main(void)
++j; /* #6 */
assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
fname = H5REPACK_FSPACE_FNAMES[j];
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
pack_options.fs_strategy = H5F_FSPACE_STRATEGY_NONE;
- pack_options.fs_persist = -1; /* "FALSE" is set via -P 0 */
+ pack_options.fs_persist = -1; /* "false" is set via -P 0 */
pack_options.fs_threshold = 1;
pack_options.fs_pagesize = 8192;
if (h5repack(fname, FSPACE_OUT, &pack_options) < 0)
@@ -354,7 +354,7 @@ main(void)
++j; /* #7 */
assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
fname = H5REPACK_FSPACE_FNAMES[j];
- if (h5repack_init(&pack_options, 0, TRUE) < 0)
+ if (h5repack_init(&pack_options, 0, true) < 0)
GOERROR;
pack_options.fs_strategy = H5F_FSPACE_STRATEGY_AGGR;
pack_options.fs_threshold = 1;
@@ -376,7 +376,7 @@ main(void)
*/
TESTING(" copy of datasets (fill values)");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack(FNAME0, FNAME0OUT, &pack_options) < 0)
GOERROR;
@@ -396,7 +396,7 @@ main(void)
*/
if (!driver_is_parallel) {
TESTING(" copy of datasets (all datatypes)");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack(FNAME1, FNAME1OUT, &pack_options) < 0)
GOERROR;
@@ -416,7 +416,7 @@ main(void)
*-------------------------------------------------------------------------
*/
TESTING(" copy of datasets (attributes)");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack(FNAME2, FNAME2OUT, &pack_options) < 0)
GOERROR;
@@ -435,7 +435,7 @@ main(void)
*-------------------------------------------------------------------------
*/
TESTING(" copy of datasets (hardlinks)");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack(FNAME3, FNAME3OUT, &pack_options) < 0)
GOERROR;
@@ -455,7 +455,7 @@ main(void)
*-------------------------------------------------------------------------
*/
TESTING(" copy of allocation early file");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack(FNAME5, FNAME5OUT, &pack_options) < 0)
GOERROR;
@@ -485,7 +485,7 @@ main(void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("dset1:GZIP=9", &pack_options) < 0)
GOERROR;
@@ -512,7 +512,7 @@ main(void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, TRUE) < 0)
+ if (h5repack_init(&pack_options, 0, true) < 0)
GOERROR;
if (h5repack_addfilter("dset1:GZIP=9", &pack_options) < 0)
GOERROR;
@@ -540,7 +540,7 @@ main(void)
#ifdef H5_HAVE_FILTER_DEFLATE
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("GZIP=1", &pack_options) < 0)
GOERROR;
@@ -577,7 +577,7 @@ main(void)
*/
if (szip_can_encode) {
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("dset2:SZIP=8,EC", &pack_options) < 0)
GOERROR;
@@ -609,7 +609,7 @@ main(void)
#if defined(H5_HAVE_FILTER_SZIP)
if (szip_can_encode) {
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("SZIP=8,NN", &pack_options) < 0)
GOERROR;
@@ -638,7 +638,7 @@ main(void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("dset1:SHUF", &pack_options) < 0)
GOERROR;
@@ -662,7 +662,7 @@ main(void)
TESTING(" adding shuffle filter to all");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("SHUF", &pack_options) < 0)
GOERROR;
@@ -685,7 +685,7 @@ main(void)
* test an individual object option
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("dset1:FLET", &pack_options) < 0)
GOERROR;
@@ -708,7 +708,7 @@ main(void)
*/
TESTING(" adding checksum filter to all");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("FLET", &pack_options) < 0)
GOERROR;
@@ -732,7 +732,7 @@ main(void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addlayout("dset1:CHUNK 20x10", &pack_options) < 0)
GOERROR;
@@ -771,7 +771,7 @@ main(void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addlayout("dset1:CHUNK=20x10", &pack_options) < 0)
GOERROR;
@@ -793,7 +793,7 @@ main(void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, TRUE) < 0)
+ if (h5repack_init(&pack_options, 0, true) < 0)
GOERROR;
if (h5repack_addlayout("dset1:CHUNK=20x10", &pack_options) < 0)
GOERROR;
@@ -813,7 +813,7 @@ main(void)
*/
TESTING(" adding layout chunked to all");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addlayout("CHUNK=20x10", &pack_options) < 0)
GOERROR;
@@ -834,7 +834,7 @@ main(void)
* test an individual object option
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addlayout("dset1:CONTI", &pack_options) < 0)
GOERROR;
@@ -855,7 +855,7 @@ main(void)
* test all objects option
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addlayout("CONTI", &pack_options) < 0)
GOERROR;
@@ -872,7 +872,7 @@ main(void)
* do the same test for a file with filters (chunked)
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addlayout("CONTI", &pack_options) < 0)
GOERROR;
@@ -894,7 +894,7 @@ main(void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addlayout("dset1:COMPA", &pack_options) < 0)
GOERROR;
@@ -915,7 +915,7 @@ main(void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addlayout("COMPA", &pack_options) < 0)
GOERROR;
@@ -936,7 +936,7 @@ main(void)
* layout compact to contiguous conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addlayout("dset_compact:CONTI", &pack_options) < 0)
GOERROR;
@@ -956,7 +956,7 @@ main(void)
* layout compact to chunk conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addlayout("dset_compact:CHUNK=2x5", &pack_options) < 0)
GOERROR;
@@ -976,7 +976,7 @@ main(void)
* layout compact to compact conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addlayout("dset_compact:COMPA", &pack_options) < 0)
GOERROR;
@@ -995,7 +995,7 @@ main(void)
* layout contiguous to compact conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addlayout("dset_contiguous:COMPA", &pack_options) < 0)
GOERROR;
@@ -1014,7 +1014,7 @@ main(void)
* layout contiguous to chunk conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addlayout("dset_contiguous:CHUNK=3x6", &pack_options) < 0)
GOERROR;
@@ -1034,7 +1034,7 @@ main(void)
* layout contiguous to contiguous conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addlayout("dset_contiguous:CONTI", &pack_options) < 0)
GOERROR;
@@ -1053,7 +1053,7 @@ main(void)
* layout chunked to compact conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addlayout("dset_chunk:COMPA", &pack_options) < 0)
GOERROR;
@@ -1073,7 +1073,7 @@ main(void)
* layout chunked to contiguous conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addlayout("dset_chunk:CONTI", &pack_options) < 0)
GOERROR;
@@ -1092,7 +1092,7 @@ main(void)
* layout chunked to chunked conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addlayout("dset_chunk:CHUNK=18x13", &pack_options) < 0)
GOERROR;
@@ -1119,7 +1119,7 @@ main(void)
#if defined(H5_HAVE_FILTER_SZIP)
if (szip_can_encode) {
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack(FNAME7, FNAME7OUT, &pack_options) < 0)
GOERROR;
@@ -1145,7 +1145,7 @@ main(void)
#if defined(H5_HAVE_FILTER_SZIP)
if (szip_can_encode) {
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("dset_szip:NONE", &pack_options) < 0)
GOERROR;
@@ -1170,7 +1170,7 @@ main(void)
TESTING(" copy of deflate filter");
#ifdef H5_HAVE_FILTER_DEFLATE
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack(FNAME8, FNAME8OUT, &pack_options) < 0)
GOERROR;
@@ -1189,7 +1189,7 @@ main(void)
TESTING(" removing deflate filter");
#ifdef H5_HAVE_FILTER_DEFLATE
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("dset_deflate:NONE", &pack_options) < 0)
GOERROR;
@@ -1209,7 +1209,7 @@ main(void)
TESTING(" copy of shuffle filter");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack(FNAME9, FNAME9OUT, &pack_options) < 0)
GOERROR;
@@ -1224,7 +1224,7 @@ main(void)
TESTING(" removing shuffle filter");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("dset_shuffle:NONE", &pack_options) < 0)
GOERROR;
@@ -1241,7 +1241,7 @@ main(void)
TESTING(" copy of fletcher filter");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack(FNAME10, FNAME10OUT, &pack_options) < 0)
GOERROR;
@@ -1256,7 +1256,7 @@ main(void)
TESTING(" removing fletcher filter");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("dset_fletcher32:NONE", &pack_options) < 0)
GOERROR;
@@ -1273,7 +1273,7 @@ main(void)
TESTING(" copy of nbit filter");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack(FNAME12, FNAME12OUT, &pack_options) < 0)
GOERROR;
@@ -1288,7 +1288,7 @@ main(void)
TESTING(" removing nbit filter");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("dset_nbit:NONE", &pack_options) < 0)
GOERROR;
@@ -1305,7 +1305,7 @@ main(void)
TESTING(" adding nbit filter");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("dset_int31:NBIT", &pack_options) < 0)
GOERROR;
@@ -1322,7 +1322,7 @@ main(void)
TESTING(" copy of scaleoffset filter");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack(FNAME13, FNAME13OUT, &pack_options) < 0)
GOERROR;
@@ -1337,7 +1337,7 @@ main(void)
TESTING(" removing scaleoffset filter");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("dset_scaleoffset:NONE", &pack_options) < 0)
GOERROR;
@@ -1354,7 +1354,7 @@ main(void)
TESTING(" adding scaleoffset filter");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("dset_none:SOFF=31,IN", &pack_options) < 0)
GOERROR;
@@ -1383,7 +1383,7 @@ main(void)
#if defined(H5_HAVE_FILTER_SZIP) && defined(H5_HAVE_FILTER_DEFLATE)
if (szip_can_encode) {
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("dset_deflate:SZIP=8,NN", &pack_options) < 0)
GOERROR;
@@ -1410,7 +1410,7 @@ main(void)
#if defined(H5_HAVE_FILTER_SZIP) && defined(H5_HAVE_FILTER_DEFLATE)
if (szip_can_encode) {
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("dset_szip:GZIP=1", &pack_options) < 0)
GOERROR;
@@ -1441,7 +1441,7 @@ main(void)
#if defined(H5_HAVE_FILTER_SZIP) && defined(H5_HAVE_FILTER_DEFLATE)
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("NONE", &pack_options) < 0)
GOERROR;
@@ -1465,7 +1465,7 @@ main(void)
*/
TESTING(" big file");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack(FNAME14, FNAME14OUT, &pack_options) < 0)
GOERROR;
@@ -1482,7 +1482,7 @@ main(void)
*-------------------------------------------------------------------------
*/
TESTING(" external datasets");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack(FNAME15, FNAME15OUT, &pack_options) < 0)
GOERROR;
@@ -1500,7 +1500,7 @@ main(void)
*-------------------------------------------------------------------------
*/
TESTING(" file with userblock");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack(FNAME16, FNAME16OUT, &pack_options) < 0)
GOERROR;
@@ -1521,7 +1521,7 @@ main(void)
*/
if (!driver_is_parallel) {
TESTING(" latest file format options");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
pack_options.latest = 1;
pack_options.grp_compact = 10;
@@ -1551,7 +1551,7 @@ main(void)
#if defined(H5_HAVE_FILTER_DEFLATE)
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("GZIP=1", &pack_options) < 0)
GOERROR;
@@ -1580,7 +1580,7 @@ main(void)
#ifdef H5_HAVE_FILTER_DEFLATE
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
/* add the options for a user block size and user block filename */
@@ -1612,7 +1612,7 @@ main(void)
#ifdef H5_HAVE_FILTER_DEFLATE
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
/* add the options for alignment */
@@ -1663,7 +1663,7 @@ main(void)
*/
TESTING(" file with committed datatypes");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack(FNAME17, FNAME17OUT, &pack_options) < 0)
@@ -1690,7 +1690,7 @@ main(void)
/* First run without metadata option. No need to verify the correctness */
/* since this has been verified by earlier tests. Just record the file */
/* size of the output file. */
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0)
GOERROR;
@@ -1701,7 +1701,7 @@ main(void)
GOERROR;
/* run it again with metadata option */
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
pack_options.meta_block_size = 8192;
if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0)
@@ -1762,7 +1762,7 @@ make_testfiles(void)
hid_t fcpl = H5I_INVALID_HID; /* File creation property list */
hid_t fapl = H5I_INVALID_HID; /* File access property list */
unsigned j; /* Local index variable */
- hbool_t driver_is_parallel;
+ bool driver_is_parallel;
if (h5_using_parallel_driver(H5P_DEFAULT, &driver_is_parallel) < 0)
return -1;
@@ -2026,7 +2026,7 @@ make_testfiles(void)
/*
* #0 -- h5repack_latest.h5
- * default: strategy=FSM_AGGR, persist=FALSE, threshold=1
+ * default: strategy=FSM_AGGR, persist=false, threshold=1
* default: inpage=4096
*/
j = 0;
@@ -2037,7 +2037,7 @@ make_testfiles(void)
/*
* #1 -- h5repack_default.h5
- * default: strategy=FSM_AGGR, persist=FALSE, threshold=1
+ * default: strategy=FSM_AGGR, persist=false, threshold=1
* default: inpage=4096
*/
assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
@@ -2050,7 +2050,7 @@ make_testfiles(void)
/*
* #2 -- h5repack_page_persist.h5
* Setting:
- * strategy=PAGE, persist=TRUE, threshold=1
+ * strategy=PAGE, persist=true, threshold=1
* inpage=512
* latest format
*/
@@ -2059,7 +2059,7 @@ make_testfiles(void)
return -1;
if (H5Pset_file_space_page_size(fcpl, (hsize_t)512) < 0)
return -1;
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, true, (hsize_t)1) < 0)
return -1;
assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, fapl)) < 0)
@@ -2072,13 +2072,13 @@ make_testfiles(void)
/*
* #3 -- h5repack_fsm_aggr_persist.h5
* Setting:
- * strategy=FSM_AGGR, persist=TRUE, threshold=1
+ * strategy=FSM_AGGR, persist=true, threshold=1
* default: inpage=4096
*/
/* Create file creation property list */
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
return -1;
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, true, (hsize_t)1) < 0)
return -1;
assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, H5P_DEFAULT)) < 0)
@@ -2091,7 +2091,7 @@ make_testfiles(void)
/*
* #4 -- h5repack_page_threshold.h5
* Setting:
- * strategy=PAGE, persist=FALSE, threshold=3
+ * strategy=PAGE, persist=false, threshold=3
* inpage=8192
* latest format
*/
@@ -2099,7 +2099,7 @@ make_testfiles(void)
/* Create file creation property list */
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
return -1;
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)3) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)3) < 0)
return -1;
if (H5Pset_file_space_page_size(fcpl, (hsize_t)8192) < 0)
return -1;
@@ -2114,14 +2114,14 @@ make_testfiles(void)
/*
* #5 -- h5repack_fsm_aggr_threshold.h5
* Setting:
- * strategy=FSM_AGGR, persist=FALSE, threshold=3
+ * strategy=FSM_AGGR, persist=false, threshold=3
* inpage=4096
*/
/* Create file creation property list */
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
return -1;
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, FALSE, (hsize_t)3) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, false, (hsize_t)3) < 0)
return -1;
if (H5Pset_file_space_page_size(fcpl, (hsize_t)FS_PAGESIZE_DEF) < 0)
return -1;
@@ -2136,14 +2136,14 @@ make_testfiles(void)
/*
* #6 -- h5repack_aggr.h5
* Setting:
- * strategy=AGGR, persist=FALSE, threshold=1
+ * strategy=AGGR, persist=false, threshold=1
* latest format
*/
/* Create file creation property list */
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
return -1;
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_AGGR, FALSE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_AGGR, false, (hsize_t)1) < 0)
return -1;
assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, fapl)) < 0)
@@ -2157,14 +2157,14 @@ make_testfiles(void)
/*
* #7 -- h5repack_none.h5
* Setting:
- * strategy=NONE, persist=FALSE, threshold=1
+ * strategy=NONE, persist=false, threshold=1
* inpage=8192
*/
/* Create file creation property list */
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
return -1;
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_NONE, FALSE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_NONE, false, (hsize_t)1) < 0)
return -1;
if (H5Pset_file_space_page_size(fcpl, (hsize_t)8192) < 0)
return -1;
@@ -2788,7 +2788,7 @@ make_nbit(hid_t loc_id)
#ifdef H5_HAVE_PARALLEL
{
- hbool_t driver_is_parallel;
+ bool driver_is_parallel;
/* Set up collective writes for parallel driver */
if (h5_using_parallel_driver(H5P_DEFAULT, &driver_is_parallel) < 0)
@@ -2896,7 +2896,7 @@ make_scaleoffset(hid_t loc_id)
#ifdef H5_HAVE_PARALLEL
{
- hbool_t driver_is_parallel;
+ bool driver_is_parallel;
if (h5_using_parallel_driver(H5P_DEFAULT, &driver_is_parallel) < 0)
goto error;
@@ -3005,7 +3005,7 @@ make_all_filters(hid_t loc_id)
#ifdef H5_HAVE_PARALLEL
{
- hbool_t driver_is_parallel;
+ bool driver_is_parallel;
if (h5_using_parallel_driver(H5P_DEFAULT, &driver_is_parallel) < 0)
goto error;
@@ -3186,7 +3186,7 @@ make_early(void)
goto out;
if ((tid = H5Tcopy(H5T_NATIVE_DOUBLE)) < 0)
goto out;
- HDsnprintf(name, sizeof(name), "%d", i);
+ snprintf(name, sizeof(name), "%d", i);
if ((H5Tcommit2(fid, name, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
if (H5Tclose(tid) < 0)
@@ -3210,7 +3210,7 @@ make_early(void)
for (i = 0; i < iter; i++) {
if ((tid = H5Tcopy(H5T_NATIVE_DOUBLE)) < 0)
goto out;
- HDsnprintf(name, sizeof(name), "%d", i);
+ snprintf(name, sizeof(name), "%d", i);
if ((H5Tcommit2(fid, name, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
if (H5Tclose(tid) < 0)
@@ -3269,7 +3269,7 @@ make_layout(hid_t loc_id)
*-------------------------------------------------------------------------
*/
for (i = 0; i < 4; i++) {
- HDsnprintf(name, sizeof(name), "dset%d", i + 1);
+ snprintf(name, sizeof(name), "dset%d", i + 1);
if (write_dset(loc_id, RANK, dims, name, H5T_NATIVE_INT, buf) < 0)
goto error;
}
@@ -5914,7 +5914,7 @@ make_dset(hid_t loc_id, const char *name, hid_t sid, hid_t dcpl, void *buf)
#ifdef H5_HAVE_PARALLEL
{
- hbool_t driver_is_parallel;
+ bool driver_is_parallel;
if (h5_using_parallel_driver(H5P_DEFAULT, &driver_is_parallel) < 0)
goto out;
@@ -5966,7 +5966,7 @@ write_dset(hid_t loc_id, int rank, hsize_t *dims, const char *dset_name, hid_t t
if (buf) {
#ifdef H5_HAVE_PARALLEL
{
- hbool_t driver_is_parallel;
+ bool driver_is_parallel;
if (h5_using_parallel_driver(H5P_DEFAULT, &driver_is_parallel) < 0)
goto out;
diff --git a/tools/test/h5repack/testfiles/h5copy_extlinks_src.h5 b/tools/test/h5repack/testfiles/h5copy_extlinks_src.h5
deleted file mode 100644
index 7b8621e1fad5b510c0944101777605de629c9be9..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 2184
zcmeD5aB<`1lHy_j0S*oZ76t(@6Gr@pf({Od2#gPtPk=HQp>zk7Ucm%mFfxE31A_!q
zTo7tLy1I}cS62q0N|^aD8mf)q0V{+Bbp}j$lpY}=;Nj{R0P<=C)W5LwbOM^rV8M`H
zlwVp9pIT7@6@aBn2bcm9X+{PPl=LeAO}`rK5Q7q+7C_Q3!)W>?F?>gga`f~IE5|yZ
zfSHUO
z4m`lpC?_*7J3gg2wM2n|A;UB|zn~ISMu9|&<4cOt^)gHu^ouid3vyDS2Cy+0!1Qy&
z^rsgU$m7-yF8LUc>=l6NOGzwAEU7F=Rl=zk7Ucm%mFfxE31A_!q
zTo7tLy1I}cS62q0N|^aD8mf)q0V{-s>N=S0C_UUmz{Axs0OZFAs7E!R^a*G>gK`#AsREF=@OED8Aj7Df$$uu
z(&*_ITAVU;K+_K_Twv)FoY-N46wtwb{w|CR%<%Hp0%kD|GhxyS(DaQ%8N8OzV8^9m
zc!@JIuz~9_2*JR>%D@3;GBGiMql_6CA|QqUFaTM=URMB*0%HUu
z#LSog4RTlw2~i*fQ~?4YHTG4#-V6*KVE$ks(91=T|3OI^)Bg+%pduQSoIv3MQUeMD
E00kCJF#rGn
diff --git a/tools/test/h5stat/CMakeTests.cmake b/tools/test/h5stat/CMakeTests.cmake
index 8802d0d0f6f..9035eafd29b 100644
--- a/tools/test/h5stat/CMakeTests.cmake
+++ b/tools/test/h5stat/CMakeTests.cmake
@@ -75,15 +75,15 @@
)
foreach (ddl_file ${HDF5_REFERENCE_FILES})
- HDFTEST_COPY_FILE("${HDF5_TOOLS_TEST_H5STAT_SOURCE_DIR}/testfiles/${ddl_file}.ddl" "${PROJECT_BINARY_DIR}/${ddl_file}.ddl" "h5stat_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/expected/${ddl_file}.ddl" "${PROJECT_BINARY_DIR}/${ddl_file}.ddl" "h5stat_files")
endforeach ()
foreach (h5_file ${HDF5_REFERENCE_ERR_FILES})
- HDFTEST_COPY_FILE("${HDF5_TOOLS_TEST_H5STAT_SOURCE_DIR}/testfiles/${h5_file}.err" "${PROJECT_BINARY_DIR}/${h5_file}.err" "h5stat_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/expected/${h5_file}.err" "${PROJECT_BINARY_DIR}/${h5_file}.err" "h5stat_files")
endforeach ()
foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
- HDFTEST_COPY_FILE("${HDF5_TOOLS_TEST_H5STAT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/${h5_file}" "h5stat_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/${h5_file}" "h5stat_files")
endforeach ()
add_custom_target(h5stat_files ALL COMMENT "Copying files needed by h5stat tests" DEPENDS ${h5stat_files_list})
diff --git a/tools/test/h5stat/testfiles/h5stat_dims1.ddl b/tools/test/h5stat/expected/h5stat_dims1.ddl
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_dims1.ddl
rename to tools/test/h5stat/expected/h5stat_dims1.ddl
diff --git a/tools/test/h5stat/testfiles/h5stat_dims2.ddl b/tools/test/h5stat/expected/h5stat_dims2.ddl
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_dims2.ddl
rename to tools/test/h5stat/expected/h5stat_dims2.ddl
diff --git a/tools/test/h5stat/testfiles/h5stat_err1_dims.err b/tools/test/h5stat/expected/h5stat_err1_dims.err
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_err1_dims.err
rename to tools/test/h5stat/expected/h5stat_err1_dims.err
diff --git a/tools/test/h5stat/testfiles/h5stat_err1_links.err b/tools/test/h5stat/expected/h5stat_err1_links.err
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_err1_links.err
rename to tools/test/h5stat/expected/h5stat_err1_links.err
diff --git a/tools/test/h5stat/testfiles/h5stat_err1_numattrs.err b/tools/test/h5stat/expected/h5stat_err1_numattrs.err
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_err1_numattrs.err
rename to tools/test/h5stat/expected/h5stat_err1_numattrs.err
diff --git a/tools/test/h5stat/testfiles/h5stat_err2_numattrs.err b/tools/test/h5stat/expected/h5stat_err2_numattrs.err
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_err2_numattrs.err
rename to tools/test/h5stat/expected/h5stat_err2_numattrs.err
diff --git a/tools/test/h5stat/testfiles/h5stat_err_old_fill.ddl b/tools/test/h5stat/expected/h5stat_err_old_fill.ddl
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_err_old_fill.ddl
rename to tools/test/h5stat/expected/h5stat_err_old_fill.ddl
diff --git a/tools/test/h5stat/testfiles/h5stat_err_old_fill.err b/tools/test/h5stat/expected/h5stat_err_old_fill.err
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_err_old_fill.err
rename to tools/test/h5stat/expected/h5stat_err_old_fill.err
diff --git a/tools/test/h5stat/testfiles/h5stat_err_old_layout.ddl b/tools/test/h5stat/expected/h5stat_err_old_layout.ddl
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_err_old_layout.ddl
rename to tools/test/h5stat/expected/h5stat_err_old_layout.ddl
diff --git a/tools/test/h5stat/testfiles/h5stat_err_old_layout.err b/tools/test/h5stat/expected/h5stat_err_old_layout.err
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_err_old_layout.err
rename to tools/test/h5stat/expected/h5stat_err_old_layout.err
diff --git a/tools/test/h5stat/testfiles/h5stat_err_refcount.ddl b/tools/test/h5stat/expected/h5stat_err_refcount.ddl
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_err_refcount.ddl
rename to tools/test/h5stat/expected/h5stat_err_refcount.ddl
diff --git a/tools/test/h5stat/testfiles/h5stat_err_refcount.err b/tools/test/h5stat/expected/h5stat_err_refcount.err
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_err_refcount.err
rename to tools/test/h5stat/expected/h5stat_err_refcount.err
diff --git a/tools/test/h5stat/testfiles/h5stat_filters-F.ddl b/tools/test/h5stat/expected/h5stat_filters-F.ddl
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_filters-F.ddl
rename to tools/test/h5stat/expected/h5stat_filters-F.ddl
diff --git a/tools/test/h5stat/testfiles/h5stat_filters-UD.ddl b/tools/test/h5stat/expected/h5stat_filters-UD.ddl
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_filters-UD.ddl
rename to tools/test/h5stat/expected/h5stat_filters-UD.ddl
diff --git a/tools/test/h5stat/testfiles/h5stat_filters-UT.ddl b/tools/test/h5stat/expected/h5stat_filters-UT.ddl
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_filters-UT.ddl
rename to tools/test/h5stat/expected/h5stat_filters-UT.ddl
diff --git a/tools/test/h5stat/testfiles/h5stat_filters-d.ddl b/tools/test/h5stat/expected/h5stat_filters-d.ddl
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_filters-d.ddl
rename to tools/test/h5stat/expected/h5stat_filters-d.ddl
diff --git a/tools/test/h5stat/testfiles/h5stat_filters-dT.ddl b/tools/test/h5stat/expected/h5stat_filters-dT.ddl
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_filters-dT.ddl
rename to tools/test/h5stat/expected/h5stat_filters-dT.ddl
diff --git a/tools/test/h5stat/testfiles/h5stat_filters-file.ddl b/tools/test/h5stat/expected/h5stat_filters-file.ddl
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_filters-file.ddl
rename to tools/test/h5stat/expected/h5stat_filters-file.ddl
diff --git a/tools/test/h5stat/testfiles/h5stat_filters-g.ddl b/tools/test/h5stat/expected/h5stat_filters-g.ddl
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_filters-g.ddl
rename to tools/test/h5stat/expected/h5stat_filters-g.ddl
diff --git a/tools/test/h5stat/testfiles/h5stat_filters.ddl b/tools/test/h5stat/expected/h5stat_filters.ddl
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_filters.ddl
rename to tools/test/h5stat/expected/h5stat_filters.ddl
diff --git a/tools/test/h5stat/testfiles/h5stat_help1.ddl b/tools/test/h5stat/expected/h5stat_help1.ddl
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_help1.ddl
rename to tools/test/h5stat/expected/h5stat_help1.ddl
diff --git a/tools/test/h5stat/testfiles/h5stat_help2.ddl b/tools/test/h5stat/expected/h5stat_help2.ddl
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_help2.ddl
rename to tools/test/h5stat/expected/h5stat_help2.ddl
diff --git a/tools/test/h5stat/testfiles/h5stat_idx.ddl b/tools/test/h5stat/expected/h5stat_idx.ddl
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_idx.ddl
rename to tools/test/h5stat/expected/h5stat_idx.ddl
diff --git a/tools/test/h5stat/testfiles/h5stat_links1.ddl b/tools/test/h5stat/expected/h5stat_links1.ddl
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_links1.ddl
rename to tools/test/h5stat/expected/h5stat_links1.ddl
diff --git a/tools/test/h5stat/testfiles/h5stat_links2.ddl b/tools/test/h5stat/expected/h5stat_links2.ddl
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_links2.ddl
rename to tools/test/h5stat/expected/h5stat_links2.ddl
diff --git a/tools/test/h5stat/testfiles/h5stat_links3.ddl b/tools/test/h5stat/expected/h5stat_links3.ddl
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_links3.ddl
rename to tools/test/h5stat/expected/h5stat_links3.ddl
diff --git a/tools/test/h5stat/testfiles/h5stat_links4.ddl b/tools/test/h5stat/expected/h5stat_links4.ddl
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_links4.ddl
rename to tools/test/h5stat/expected/h5stat_links4.ddl
diff --git a/tools/test/h5stat/testfiles/h5stat_links5.ddl b/tools/test/h5stat/expected/h5stat_links5.ddl
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_links5.ddl
rename to tools/test/h5stat/expected/h5stat_links5.ddl
diff --git a/tools/test/h5stat/testfiles/h5stat_newgrat-UA.ddl b/tools/test/h5stat/expected/h5stat_newgrat-UA.ddl
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_newgrat-UA.ddl
rename to tools/test/h5stat/expected/h5stat_newgrat-UA.ddl
diff --git a/tools/test/h5stat/testfiles/h5stat_newgrat-UG.ddl b/tools/test/h5stat/expected/h5stat_newgrat-UG.ddl
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_newgrat-UG.ddl
rename to tools/test/h5stat/expected/h5stat_newgrat-UG.ddl
diff --git a/tools/test/h5stat/testfiles/h5stat_newgrat.ddl b/tools/test/h5stat/expected/h5stat_newgrat.ddl
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_newgrat.ddl
rename to tools/test/h5stat/expected/h5stat_newgrat.ddl
diff --git a/tools/test/h5stat/testfiles/h5stat_nofile.ddl b/tools/test/h5stat/expected/h5stat_nofile.ddl
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_nofile.ddl
rename to tools/test/h5stat/expected/h5stat_nofile.ddl
diff --git a/tools/test/h5stat/testfiles/h5stat_nofile.err b/tools/test/h5stat/expected/h5stat_nofile.err
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_nofile.err
rename to tools/test/h5stat/expected/h5stat_nofile.err
diff --git a/tools/test/h5stat/testfiles/h5stat_notexist.ddl b/tools/test/h5stat/expected/h5stat_notexist.ddl
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_notexist.ddl
rename to tools/test/h5stat/expected/h5stat_notexist.ddl
diff --git a/tools/test/h5stat/testfiles/h5stat_notexist.err b/tools/test/h5stat/expected/h5stat_notexist.err
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_notexist.err
rename to tools/test/h5stat/expected/h5stat_notexist.err
diff --git a/tools/test/h5stat/testfiles/h5stat_numattrs1.ddl b/tools/test/h5stat/expected/h5stat_numattrs1.ddl
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_numattrs1.ddl
rename to tools/test/h5stat/expected/h5stat_numattrs1.ddl
diff --git a/tools/test/h5stat/testfiles/h5stat_numattrs2.ddl b/tools/test/h5stat/expected/h5stat_numattrs2.ddl
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_numattrs2.ddl
rename to tools/test/h5stat/expected/h5stat_numattrs2.ddl
diff --git a/tools/test/h5stat/testfiles/h5stat_numattrs3.ddl b/tools/test/h5stat/expected/h5stat_numattrs3.ddl
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_numattrs3.ddl
rename to tools/test/h5stat/expected/h5stat_numattrs3.ddl
diff --git a/tools/test/h5stat/testfiles/h5stat_numattrs4.ddl b/tools/test/h5stat/expected/h5stat_numattrs4.ddl
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_numattrs4.ddl
rename to tools/test/h5stat/expected/h5stat_numattrs4.ddl
diff --git a/tools/test/h5stat/testfiles/h5stat_tsohm.ddl b/tools/test/h5stat/expected/h5stat_tsohm.ddl
similarity index 100%
rename from tools/test/h5stat/testfiles/h5stat_tsohm.ddl
rename to tools/test/h5stat/expected/h5stat_tsohm.ddl
diff --git a/tools/test/h5stat/h5stat_gentest.c b/tools/test/h5stat/h5stat_gentest.c
index 44428feb1f7..787c2e19f17 100644
--- a/tools/test/h5stat/h5stat_gentest.c
+++ b/tools/test/h5stat/h5stat_gentest.c
@@ -87,7 +87,7 @@ gen_newgrat_file(const char *fname)
/* Create NUM_GRPS groups in the root group */
for (i = 1; i <= NUM_GRPS; i++) {
- HDsnprintf(name, sizeof(name), "%s%d", GROUP_NAME, i);
+ snprintf(name, sizeof(name), "%s%d", GROUP_NAME, i);
if ((gid = H5Gcreate2(fid, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
if (H5Gclose(gid) < 0)
@@ -108,7 +108,7 @@ gen_newgrat_file(const char *fname)
/* Create NUM_ATTRS for the dataset */
for (i = 1; i <= NUM_ATTRS; i++) {
- HDsnprintf(attrname, sizeof(attrname), "%s%d", ATTR_NAME, i);
+ snprintf(attrname, sizeof(attrname), "%s%d", ATTR_NAME, i);
if ((attr_id = H5Acreate2(did, attrname, tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
if (H5Aclose(attr_id) < 0)
@@ -210,7 +210,7 @@ gen_threshold_file(const char *fname)
/* Create 11 attributes for the dataset */
for (i = 1; i <= (THRES_NUM + 1); i++) {
- HDsnprintf(name, sizeof(name), "%s%d", THRES_ATTR_NAME, i);
+ snprintf(name, sizeof(name), "%s%d", THRES_ATTR_NAME, i);
if ((attr_id = H5Acreate2(did, name, H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
if (H5Aclose(attr_id) < 0)
@@ -239,7 +239,7 @@ gen_threshold_file(const char *fname)
/* Create 10 attributes for the 2-D dataset */
for (i = 1; i <= THRES_NUM; i++) {
- HDsnprintf(name, sizeof(name), "%s%d", THRES_ATTR_NAME, i);
+ snprintf(name, sizeof(name), "%s%d", THRES_ATTR_NAME, i);
if ((attr_id = H5Acreate2(did, name, H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
if (H5Aclose(attr_id) < 0)
@@ -263,7 +263,7 @@ gen_threshold_file(const char *fname)
/* Create 10 1-D datasets with non-zero dimension size for the group */
for (i = 1; i <= THRES_NUM; i++) {
/* set up dataset name */
- HDsnprintf(name, sizeof(name), "%s%d", THRES_DSET_NAME, i);
+ snprintf(name, sizeof(name), "%s%d", THRES_DSET_NAME, i);
/* Create the dataset */
if ((did = H5Dcreate2(gid, name, H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -285,7 +285,7 @@ gen_threshold_file(const char *fname)
/* Create 25 attributes for the group */
for (i = 1; i <= THRES_NUM_25; i++) {
/* Set up attribute name */
- HDsnprintf(name, sizeof(name), "%s%d", THRES_ATTR_GRP_NAME, i);
+ snprintf(name, sizeof(name), "%s%d", THRES_ATTR_GRP_NAME, i);
/* Create the attribute */
if ((attr_id = H5Acreate2(gid, name, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -307,7 +307,7 @@ gen_threshold_file(const char *fname)
/* Create 9 1-D datasets with non-zero dimension size for the group */
for (i = 1; i < THRES_NUM; i++) {
/* set up dataset name */
- HDsnprintf(name, sizeof(name), "%s%d", THRES_DSET_NAME, i);
+ snprintf(name, sizeof(name), "%s%d", THRES_DSET_NAME, i);
/* Create the dataset */
if ((did = H5Dcreate2(gid, name, H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
diff --git a/tools/test/h5stat/testh5stat.sh.in b/tools/test/h5stat/testh5stat.sh.in
index 9ea6adc075d..7ce0ad495e3 100644
--- a/tools/test/h5stat/testh5stat.sh.in
+++ b/tools/test/h5stat/testh5stat.sh.in
@@ -39,17 +39,17 @@ verbose=yes
# source dirs
SRC_TOOLS="$srcdir/../.."
-SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles"
# testfiles source dirs for tools
-SRC_H5LS_TESTFILES="$SRC_TOOLS_TESTFILES"
-SRC_H5DUMP_TESTFILES="$SRC_TOOLS_TESTFILES"
+SRC_H5LS_TESTFILES="$SRC_TOOLS/test/h5ls/testfiles"
+SRC_H5DUMP_TESTFILES="$SRC_TOOLS/test/h5dump/testfiles"
SRC_H5DIFF_TESTFILES="$SRC_TOOLS/test/h5diff/testfiles"
SRC_H5COPY_TESTFILES="$SRC_TOOLS/test/h5copy/testfiles"
SRC_H5REPACK_TESTFILES="$SRC_TOOLS/test/h5repack/testfiles"
SRC_H5JAM_TESTFILES="$SRC_TOOLS/test/h5jam/testfiles"
SRC_H5STAT_TESTFILES="$SRC_TOOLS/test/h5stat/testfiles"
SRC_H5IMPORT_TESTFILES="$SRC_TOOLS/test/h5import/testfiles"
+SRC_H5STAT_OUTFILES="$SRC_TOOLS/test/h5stat/expected"
TESTDIR=./testfiles
test -d $TESTDIR || mkdir $TESTDIR
@@ -75,49 +75,49 @@ $SRC_H5STAT_TESTFILES/h5stat_threshold.h5
"
LIST_ERR_TEST_FILES="
-$SRC_H5STAT_TESTFILES/h5stat_err_refcount.err
-$SRC_H5STAT_TESTFILES/h5stat_err_old_layout.err
-$SRC_H5STAT_TESTFILES/h5stat_err_old_fill.err
-$SRC_H5STAT_TESTFILES/h5stat_err1_links.err
-$SRC_H5STAT_TESTFILES/h5stat_err1_dims.err
-$SRC_H5STAT_TESTFILES/h5stat_err1_numattrs.err
-$SRC_H5STAT_TESTFILES/h5stat_err2_numattrs.err
-$SRC_H5STAT_TESTFILES/h5stat_notexist.err
-$SRC_H5STAT_TESTFILES/h5stat_nofile.err
+$SRC_H5STAT_OUTFILES/h5stat_err_refcount.err
+$SRC_H5STAT_OUTFILES/h5stat_err_old_layout.err
+$SRC_H5STAT_OUTFILES/h5stat_err_old_fill.err
+$SRC_H5STAT_OUTFILES/h5stat_err1_links.err
+$SRC_H5STAT_OUTFILES/h5stat_err1_dims.err
+$SRC_H5STAT_OUTFILES/h5stat_err1_numattrs.err
+$SRC_H5STAT_OUTFILES/h5stat_err2_numattrs.err
+$SRC_H5STAT_OUTFILES/h5stat_notexist.err
+$SRC_H5STAT_OUTFILES/h5stat_nofile.err
"
LIST_OTHER_TEST_FILES="
-$SRC_H5STAT_TESTFILES/h5stat_err_refcount.ddl
-$SRC_H5STAT_TESTFILES/h5stat_err_old_layout.ddl
-$SRC_H5STAT_TESTFILES/h5stat_err_old_fill.ddl
-$SRC_H5STAT_TESTFILES/h5stat_help1.ddl
-$SRC_H5STAT_TESTFILES/h5stat_help2.ddl
-$SRC_H5STAT_TESTFILES/h5stat_notexist.ddl
-$SRC_H5STAT_TESTFILES/h5stat_nofile.ddl
-$SRC_H5STAT_TESTFILES/h5stat_filters.ddl
-$SRC_H5STAT_TESTFILES/h5stat_filters-file.ddl
-$SRC_H5STAT_TESTFILES/h5stat_filters-F.ddl
-$SRC_H5STAT_TESTFILES/h5stat_filters-d.ddl
-$SRC_H5STAT_TESTFILES/h5stat_filters-g.ddl
-$SRC_H5STAT_TESTFILES/h5stat_filters-dT.ddl
-$SRC_H5STAT_TESTFILES/h5stat_filters-UD.ddl
-$SRC_H5STAT_TESTFILES/h5stat_filters-UT.ddl
-$SRC_H5STAT_TESTFILES/h5stat_tsohm.ddl
-$SRC_H5STAT_TESTFILES/h5stat_newgrat.ddl
-$SRC_H5STAT_TESTFILES/h5stat_newgrat-UG.ddl
-$SRC_H5STAT_TESTFILES/h5stat_newgrat-UA.ddl
-$SRC_H5STAT_TESTFILES/h5stat_idx.ddl
-$SRC_H5STAT_TESTFILES/h5stat_links1.ddl
-$SRC_H5STAT_TESTFILES/h5stat_links2.ddl
-$SRC_H5STAT_TESTFILES/h5stat_links3.ddl
-$SRC_H5STAT_TESTFILES/h5stat_links4.ddl
-$SRC_H5STAT_TESTFILES/h5stat_links5.ddl
-$SRC_H5STAT_TESTFILES/h5stat_dims1.ddl
-$SRC_H5STAT_TESTFILES/h5stat_dims2.ddl
-$SRC_H5STAT_TESTFILES/h5stat_numattrs1.ddl
-$SRC_H5STAT_TESTFILES/h5stat_numattrs2.ddl
-$SRC_H5STAT_TESTFILES/h5stat_numattrs3.ddl
-$SRC_H5STAT_TESTFILES/h5stat_numattrs4.ddl
+$SRC_H5STAT_OUTFILES/h5stat_err_refcount.ddl
+$SRC_H5STAT_OUTFILES/h5stat_err_old_layout.ddl
+$SRC_H5STAT_OUTFILES/h5stat_err_old_fill.ddl
+$SRC_H5STAT_OUTFILES/h5stat_help1.ddl
+$SRC_H5STAT_OUTFILES/h5stat_help2.ddl
+$SRC_H5STAT_OUTFILES/h5stat_notexist.ddl
+$SRC_H5STAT_OUTFILES/h5stat_nofile.ddl
+$SRC_H5STAT_OUTFILES/h5stat_filters.ddl
+$SRC_H5STAT_OUTFILES/h5stat_filters-file.ddl
+$SRC_H5STAT_OUTFILES/h5stat_filters-F.ddl
+$SRC_H5STAT_OUTFILES/h5stat_filters-d.ddl
+$SRC_H5STAT_OUTFILES/h5stat_filters-g.ddl
+$SRC_H5STAT_OUTFILES/h5stat_filters-dT.ddl
+$SRC_H5STAT_OUTFILES/h5stat_filters-UD.ddl
+$SRC_H5STAT_OUTFILES/h5stat_filters-UT.ddl
+$SRC_H5STAT_OUTFILES/h5stat_tsohm.ddl
+$SRC_H5STAT_OUTFILES/h5stat_newgrat.ddl
+$SRC_H5STAT_OUTFILES/h5stat_newgrat-UG.ddl
+$SRC_H5STAT_OUTFILES/h5stat_newgrat-UA.ddl
+$SRC_H5STAT_OUTFILES/h5stat_idx.ddl
+$SRC_H5STAT_OUTFILES/h5stat_links1.ddl
+$SRC_H5STAT_OUTFILES/h5stat_links2.ddl
+$SRC_H5STAT_OUTFILES/h5stat_links3.ddl
+$SRC_H5STAT_OUTFILES/h5stat_links4.ddl
+$SRC_H5STAT_OUTFILES/h5stat_links5.ddl
+$SRC_H5STAT_OUTFILES/h5stat_dims1.ddl
+$SRC_H5STAT_OUTFILES/h5stat_dims2.ddl
+$SRC_H5STAT_OUTFILES/h5stat_numattrs1.ddl
+$SRC_H5STAT_OUTFILES/h5stat_numattrs2.ddl
+$SRC_H5STAT_OUTFILES/h5stat_numattrs3.ddl
+$SRC_H5STAT_OUTFILES/h5stat_numattrs4.ddl
"
#
diff --git a/tools/test/misc/CMakeTestsClear.cmake b/tools/test/misc/CMakeTestsClear.cmake
index a5549724cf4..2f3c62f9652 100644
--- a/tools/test/misc/CMakeTestsClear.cmake
+++ b/tools/test/misc/CMakeTestsClear.cmake
@@ -63,11 +63,14 @@
h5clear_open_fail.err
)
- foreach (h5_file ${HDF5_TEST_FILES} ${HDF5_SEC2_TEST_FILES} ${HDF5_REFERENCE_TEST_FILES})
+ foreach (h5_file ${HDF5_TEST_FILES} ${HDF5_SEC2_TEST_FILES})
HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5clear_files")
endforeach ()
+ foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/expected/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5clear_files")
+ endforeach ()
foreach (h5_file ${HDF5_REFERENCE_ERR_FILES})
- HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5clear_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/expected/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5clear_files")
endforeach ()
# make second copy of h5clear_sec2.h5
foreach (h5_file ${HDF5_SEC2_TEST_FILES})
diff --git a/tools/test/misc/CMakeTestsMkgrp.cmake b/tools/test/misc/CMakeTestsMkgrp.cmake
index b4d1a563a30..9e4f7393518 100644
--- a/tools/test/misc/CMakeTestsMkgrp.cmake
+++ b/tools/test/misc/CMakeTestsMkgrp.cmake
@@ -40,10 +40,10 @@
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
foreach (h5_mkgrp_file ${HDF5_MKGRP_TEST_FILES})
- HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_mkgrp_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_mkgrp_file}" "h5mkgrp_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/expected/${h5_mkgrp_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_mkgrp_file}" "h5mkgrp_files")
endforeach ()
- HDFTEST_COPY_FILE("${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/testfiles/h5mkgrp_help.txt" "${PROJECT_BINARY_DIR}/testfiles/h5mkgrp_help.txt" "h5mkgrp_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/expected/h5mkgrp_help.txt" "${PROJECT_BINARY_DIR}/testfiles/h5mkgrp_help.txt" "h5mkgrp_files")
add_custom_target(h5mkgrp_files ALL COMMENT "Copying files needed by h5mkgrp tests" DEPENDS ${h5mkgrp_files_list})
configure_file (${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/testfiles/h5mkgrp_version.txt.in ${PROJECT_BINARY_DIR}/testfiles/h5mkgrp_version.txt @ONLY)
diff --git a/tools/test/misc/CMakeTestsRepart.cmake b/tools/test/misc/CMakeTestsRepart.cmake
index 04c74ecc257..764778e9b96 100644
--- a/tools/test/misc/CMakeTestsRepart.cmake
+++ b/tools/test/misc/CMakeTestsRepart.cmake
@@ -41,7 +41,7 @@
)
foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
- HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/${h5_file}" "h5repart_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/${h5_file}" "h5repart_files")
endforeach ()
add_custom_target(h5repart_files ALL COMMENT "Copying files needed by h5repart tests" DEPENDS ${h5repart_files_list})
diff --git a/tools/test/misc/clear_open_chk.c b/tools/test/misc/clear_open_chk.c
index 3095618c420..8abd4e5a1ff 100644
--- a/tools/test/misc/clear_open_chk.c
+++ b/tools/test/misc/clear_open_chk.c
@@ -47,10 +47,10 @@ main(int argc, char *argv[])
}
/* Get the file name */
- fname = HDstrdup(argv[1]);
+ fname = strdup(argv[1]);
/* Try opening the file */
- if ((fid = h5tools_fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT, FALSE, NULL, (size_t)0)) < 0) {
+ if ((fid = h5tools_fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT, false, NULL, (size_t)0)) < 0) {
fprintf(stderr, "clear_open_chk: unable to open the file\n");
free(fname);
exit(EXIT_FAILURE);
diff --git a/tools/test/misc/testfiles/h5clear_equal_after_size.ddl b/tools/test/misc/expected/h5clear_equal_after_size.ddl
similarity index 100%
rename from tools/test/misc/testfiles/h5clear_equal_after_size.ddl
rename to tools/test/misc/expected/h5clear_equal_after_size.ddl
diff --git a/tools/test/misc/testfiles/h5clear_equal_before_size.ddl b/tools/test/misc/expected/h5clear_equal_before_size.ddl
similarity index 100%
rename from tools/test/misc/testfiles/h5clear_equal_before_size.ddl
rename to tools/test/misc/expected/h5clear_equal_before_size.ddl
diff --git a/tools/test/misc/testfiles/h5clear_greater_after_size.ddl b/tools/test/misc/expected/h5clear_greater_after_size.ddl
similarity index 100%
rename from tools/test/misc/testfiles/h5clear_greater_after_size.ddl
rename to tools/test/misc/expected/h5clear_greater_after_size.ddl
diff --git a/tools/test/misc/testfiles/h5clear_greater_before_size.ddl b/tools/test/misc/expected/h5clear_greater_before_size.ddl
similarity index 100%
rename from tools/test/misc/testfiles/h5clear_greater_before_size.ddl
rename to tools/test/misc/expected/h5clear_greater_before_size.ddl
diff --git a/tools/test/misc/testfiles/h5clear_less_after_size.ddl b/tools/test/misc/expected/h5clear_less_after_size.ddl
similarity index 100%
rename from tools/test/misc/testfiles/h5clear_less_after_size.ddl
rename to tools/test/misc/expected/h5clear_less_after_size.ddl
diff --git a/tools/test/misc/testfiles/h5clear_less_before_size.ddl b/tools/test/misc/expected/h5clear_less_before_size.ddl
similarity index 100%
rename from tools/test/misc/testfiles/h5clear_less_before_size.ddl
rename to tools/test/misc/expected/h5clear_less_before_size.ddl
diff --git a/tools/test/misc/testfiles/h5clear_missing_file.ddl b/tools/test/misc/expected/h5clear_missing_file.ddl
similarity index 100%
rename from tools/test/misc/testfiles/h5clear_missing_file.ddl
rename to tools/test/misc/expected/h5clear_missing_file.ddl
diff --git a/tools/test/misc/testfiles/h5clear_missing_file.err b/tools/test/misc/expected/h5clear_missing_file.err
similarity index 100%
rename from tools/test/misc/testfiles/h5clear_missing_file.err
rename to tools/test/misc/expected/h5clear_missing_file.err
diff --git a/tools/test/misc/testfiles/h5clear_no_mdc_image.err b/tools/test/misc/expected/h5clear_no_mdc_image.err
similarity index 100%
rename from tools/test/misc/testfiles/h5clear_no_mdc_image.err
rename to tools/test/misc/expected/h5clear_no_mdc_image.err
diff --git a/tools/test/misc/testfiles/h5clear_noclose_after_size.ddl b/tools/test/misc/expected/h5clear_noclose_after_size.ddl
similarity index 100%
rename from tools/test/misc/testfiles/h5clear_noclose_after_size.ddl
rename to tools/test/misc/expected/h5clear_noclose_after_size.ddl
diff --git a/tools/test/misc/testfiles/h5clear_noclose_before_size.ddl b/tools/test/misc/expected/h5clear_noclose_before_size.ddl
similarity index 100%
rename from tools/test/misc/testfiles/h5clear_noclose_before_size.ddl
rename to tools/test/misc/expected/h5clear_noclose_before_size.ddl
diff --git a/tools/test/misc/testfiles/h5clear_open_fail.err b/tools/test/misc/expected/h5clear_open_fail.err
similarity index 100%
rename from tools/test/misc/testfiles/h5clear_open_fail.err
rename to tools/test/misc/expected/h5clear_open_fail.err
diff --git a/tools/test/misc/testfiles/h5clear_status_noclose_after_size.ddl b/tools/test/misc/expected/h5clear_status_noclose_after_size.ddl
similarity index 100%
rename from tools/test/misc/testfiles/h5clear_status_noclose_after_size.ddl
rename to tools/test/misc/expected/h5clear_status_noclose_after_size.ddl
diff --git a/tools/test/misc/testfiles/h5clear_usage.ddl b/tools/test/misc/expected/h5clear_usage.ddl
similarity index 100%
rename from tools/test/misc/testfiles/h5clear_usage.ddl
rename to tools/test/misc/expected/h5clear_usage.ddl
diff --git a/tools/test/misc/testfiles/h5clear_user_equal_after_size.ddl b/tools/test/misc/expected/h5clear_user_equal_after_size.ddl
similarity index 100%
rename from tools/test/misc/testfiles/h5clear_user_equal_after_size.ddl
rename to tools/test/misc/expected/h5clear_user_equal_after_size.ddl
diff --git a/tools/test/misc/testfiles/h5clear_user_equal_before_size.ddl b/tools/test/misc/expected/h5clear_user_equal_before_size.ddl
similarity index 100%
rename from tools/test/misc/testfiles/h5clear_user_equal_before_size.ddl
rename to tools/test/misc/expected/h5clear_user_equal_before_size.ddl
diff --git a/tools/test/misc/testfiles/h5clear_user_greater_after_size.ddl b/tools/test/misc/expected/h5clear_user_greater_after_size.ddl
similarity index 100%
rename from tools/test/misc/testfiles/h5clear_user_greater_after_size.ddl
rename to tools/test/misc/expected/h5clear_user_greater_after_size.ddl
diff --git a/tools/test/misc/testfiles/h5clear_user_greater_before_size.ddl b/tools/test/misc/expected/h5clear_user_greater_before_size.ddl
similarity index 100%
rename from tools/test/misc/testfiles/h5clear_user_greater_before_size.ddl
rename to tools/test/misc/expected/h5clear_user_greater_before_size.ddl
diff --git a/tools/test/misc/testfiles/h5clear_user_less_after_size.ddl b/tools/test/misc/expected/h5clear_user_less_after_size.ddl
similarity index 100%
rename from tools/test/misc/testfiles/h5clear_user_less_after_size.ddl
rename to tools/test/misc/expected/h5clear_user_less_after_size.ddl
diff --git a/tools/test/misc/testfiles/h5clear_user_less_before_size.ddl b/tools/test/misc/expected/h5clear_user_less_before_size.ddl
similarity index 100%
rename from tools/test/misc/testfiles/h5clear_user_less_before_size.ddl
rename to tools/test/misc/expected/h5clear_user_less_before_size.ddl
diff --git a/tools/test/misc/testfiles/h5mkgrp_help.txt b/tools/test/misc/expected/h5mkgrp_help.txt
similarity index 100%
rename from tools/test/misc/testfiles/h5mkgrp_help.txt
rename to tools/test/misc/expected/h5mkgrp_help.txt
diff --git a/tools/testfiles/h5mkgrp_nested_lp.ls b/tools/test/misc/expected/h5mkgrp_nested_lp.ls
similarity index 100%
rename from tools/testfiles/h5mkgrp_nested_lp.ls
rename to tools/test/misc/expected/h5mkgrp_nested_lp.ls
diff --git a/tools/testfiles/h5mkgrp_nested_mult_lp.ls b/tools/test/misc/expected/h5mkgrp_nested_mult_lp.ls
similarity index 100%
rename from tools/testfiles/h5mkgrp_nested_mult_lp.ls
rename to tools/test/misc/expected/h5mkgrp_nested_mult_lp.ls
diff --git a/tools/testfiles/h5mkgrp_nested_mult_p.ls b/tools/test/misc/expected/h5mkgrp_nested_mult_p.ls
similarity index 100%
rename from tools/testfiles/h5mkgrp_nested_mult_p.ls
rename to tools/test/misc/expected/h5mkgrp_nested_mult_p.ls
diff --git a/tools/testfiles/h5mkgrp_nested_p.ls b/tools/test/misc/expected/h5mkgrp_nested_p.ls
similarity index 100%
rename from tools/testfiles/h5mkgrp_nested_p.ls
rename to tools/test/misc/expected/h5mkgrp_nested_p.ls
diff --git a/tools/testfiles/h5mkgrp_several.ls b/tools/test/misc/expected/h5mkgrp_several.ls
similarity index 100%
rename from tools/testfiles/h5mkgrp_several.ls
rename to tools/test/misc/expected/h5mkgrp_several.ls
diff --git a/tools/testfiles/h5mkgrp_several_l.ls b/tools/test/misc/expected/h5mkgrp_several_l.ls
similarity index 100%
rename from tools/testfiles/h5mkgrp_several_l.ls
rename to tools/test/misc/expected/h5mkgrp_several_l.ls
diff --git a/tools/testfiles/h5mkgrp_several_p.ls b/tools/test/misc/expected/h5mkgrp_several_p.ls
similarity index 100%
rename from tools/testfiles/h5mkgrp_several_p.ls
rename to tools/test/misc/expected/h5mkgrp_several_p.ls
diff --git a/tools/testfiles/h5mkgrp_several_v.ls b/tools/test/misc/expected/h5mkgrp_several_v.ls
similarity index 100%
rename from tools/testfiles/h5mkgrp_several_v.ls
rename to tools/test/misc/expected/h5mkgrp_several_v.ls
diff --git a/tools/testfiles/h5mkgrp_single.ls b/tools/test/misc/expected/h5mkgrp_single.ls
similarity index 100%
rename from tools/testfiles/h5mkgrp_single.ls
rename to tools/test/misc/expected/h5mkgrp_single.ls
diff --git a/tools/testfiles/h5mkgrp_single_l.ls b/tools/test/misc/expected/h5mkgrp_single_l.ls
similarity index 100%
rename from tools/testfiles/h5mkgrp_single_l.ls
rename to tools/test/misc/expected/h5mkgrp_single_l.ls
diff --git a/tools/testfiles/h5mkgrp_single_p.ls b/tools/test/misc/expected/h5mkgrp_single_p.ls
similarity index 100%
rename from tools/testfiles/h5mkgrp_single_p.ls
rename to tools/test/misc/expected/h5mkgrp_single_p.ls
diff --git a/tools/testfiles/h5mkgrp_single_v.ls b/tools/test/misc/expected/h5mkgrp_single_v.ls
similarity index 100%
rename from tools/testfiles/h5mkgrp_single_v.ls
rename to tools/test/misc/expected/h5mkgrp_single_v.ls
diff --git a/tools/test/misc/h5clear_gentest.c b/tools/test/misc/h5clear_gentest.c
index 5cb7aa217df..892e9740d27 100644
--- a/tools/test/misc/h5clear_gentest.c
+++ b/tools/test/misc/h5clear_gentest.c
@@ -64,7 +64,7 @@ gen_cache_image_file(const char *fname)
int arr[50][100];
} * buf; /* Buffer for data to write */
H5AC_cache_image_config_t cache_image_config = /* Cache image input configuration */
- {H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION, TRUE, FALSE, H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE};
+ {H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION, true, false, H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE};
/* Create and fill array */
buf = malloc(sizeof(*buf));
@@ -168,7 +168,7 @@ gen_cache_image_file(const char *fname)
*-------------------------------------------------------------------------
*/
static int
-gen_enhance_files(hbool_t user)
+gen_enhance_files(bool user)
{
hid_t fid = H5I_INVALID_HID; /* File ID */
hid_t fcpl = H5I_INVALID_HID; /* File creation property list */
@@ -193,7 +193,7 @@ gen_enhance_files(hbool_t user)
}
/* Set file space strategy and persisting free-space */
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, true, (hsize_t)1) < 0)
goto error;
/*
@@ -274,7 +274,7 @@ gen_enhance_files(hbool_t user)
}
/* location of "end of file address" */
- if (lseek(fd, (off_t)(28 + (user ? USERBLOCK : 0)), SEEK_SET) < 0)
+ if (lseek(fd, (HDoff_t)(28 + (user ? USERBLOCK : 0)), SEEK_SET) < 0)
goto error;
/* Write the bad eoa value to the file */
@@ -282,7 +282,7 @@ gen_enhance_files(hbool_t user)
goto error;
/* location of "superblock checksum" */
- if (lseek(fd, (off_t)(44 + (user ? USERBLOCK : 0)), SEEK_SET) < 0)
+ if (lseek(fd, (HDoff_t)(44 + (user ? USERBLOCK : 0)), SEEK_SET) < 0)
goto error;
/* Write the chksum value to the file */
@@ -383,9 +383,9 @@ main(void)
goto error;
/* Generate the first 6 files in FILENAME_ENHANCE[] */
- if (gen_enhance_files(FALSE) < 0)
+ if (gen_enhance_files(false) < 0)
goto error;
- if (gen_enhance_files(TRUE) < 0)
+ if (gen_enhance_files(true) < 0)
goto error;
/*
@@ -407,7 +407,7 @@ main(void)
* --FILENAME[0]: "h5clear_sec2_v3.h5", "latest_h5clear_sec2_v3.h5"
* --FILENAME[1]: "h5clear_log_v3.h5", "latest_h5clear_log_v3.h5"
*/
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
hid_t fapl2, my_fapl; /* File access property lists */
/* Set to use the appropriate file access property list */
@@ -421,7 +421,7 @@ main(void)
if ((my_fapl = H5Pcopy(fapl2)) < 0)
goto error;
/* Create the file */
- HDsnprintf(fname, sizeof(fname), "%s%s", new_format ? "latest_" : "", FILENAME[0]);
+ snprintf(fname, sizeof(fname), "%s%s", new_format ? "latest_" : "", FILENAME[0]);
if ((fid = H5Fcreate(fname, H5F_ACC_TRUNC | (new_format ? 0 : H5F_ACC_SWMR_WRITE), H5P_DEFAULT,
my_fapl)) < 0)
goto error;
@@ -446,7 +446,7 @@ main(void)
goto error;
/* Create the file */
- HDsnprintf(fname, sizeof(fname), "%s%s", new_format ? "latest_" : "", FILENAME[1]);
+ snprintf(fname, sizeof(fname), "%s%s", new_format ? "latest_" : "", FILENAME[1]);
if ((fid = H5Fcreate(fname, H5F_ACC_TRUNC | (new_format ? 0 : H5F_ACC_SWMR_WRITE), H5P_DEFAULT,
my_fapl)) < 0)
goto error;
@@ -559,7 +559,7 @@ main(void)
goto error;
/* Set file space strategy and persisting free-space */
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, true, (hsize_t)1) < 0)
goto error;
/* Create the file with the set file space info */
diff --git a/tools/test/misc/h5perf_gentest.c b/tools/test/misc/h5perf_gentest.c
index 24d0581386b..77569144e84 100644
--- a/tools/test/misc/h5perf_gentest.c
+++ b/tools/test/misc/h5perf_gentest.c
@@ -103,7 +103,7 @@ main(int argc, char *argv[])
}
if (strlen(fname) <= 0)
- HDsnprintf(fname, sizeof(fname), FNAME);
+ snprintf(fname, sizeof(fname), FNAME);
create_perf_test_file(fname, ngrps, ndsets, nattrs, (hsize_t)nrows, (hsize_t)dim0, (hsize_t)chunk, vlen,
z, l);
@@ -322,7 +322,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
fid = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
add_attrs(fid, 0);
- HDsnprintf(name, sizeof(name), "a cmp ds of %d rows", nrows);
+ snprintf(name, sizeof(name), "a cmp ds of %d rows", nrows);
did = H5Dcreate(fid, name, cmp_tid, sid_large, H5P_DEFAULT, dcpl, H5P_DEFAULT);
H5Dwrite(did, cmp_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_comp_large);
add_attrs(did, 0);
@@ -342,7 +342,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
add_attrs(gid1, 0);
for (i = 0; i < ngrps; i++) {
/* create sub groups */
- HDsnprintf(name, sizeof(name), "g%02d", i);
+ snprintf(name, sizeof(name), "g%02d", i);
gid2 = H5Gcreate(gid1, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (i < 10)
add_attrs(gid2, 0);
@@ -355,14 +355,14 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
add_attrs(gid1, 0);
for (j = 0; j < ndsets; j += 12) {
/* 1 add a null dataset */
- HDsnprintf(name, sizeof(name), "%05d null dataset", j);
+ snprintf(name, sizeof(name), "%05d null dataset", j);
did = H5Dcreate(gid1, name, H5T_STD_I32LE, sid_null, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (!j)
add_attrs(did, j);
H5Dclose(did);
/* 2 add scalar int point */
- HDsnprintf(name, sizeof(name), "%05d scalar int point", j);
+ snprintf(name, sizeof(name), "%05d scalar int point", j);
did = H5Dcreate(gid1, name, H5T_NATIVE_INT, sid_scalar, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &j);
if (!j)
@@ -370,7 +370,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
H5Dclose(did);
/* 3 scalar vlen string */
- HDsnprintf(name, sizeof(name), "%05d scalar vlen string", j);
+ snprintf(name, sizeof(name), "%05d scalar vlen string", j);
did = H5Dcreate(gid1, name, tid_vlen_s, sid_scalar, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Dwrite(did, tid_vlen_s, H5S_ALL, H5S_ALL, H5P_DEFAULT, &buf_vlen_s[0]);
if (!j)
@@ -378,7 +378,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
H5Dclose(did);
/* 4 add fixed-length float array */
- HDsnprintf(name, sizeof(name), "%05d fixed-length float array", j);
+ snprintf(name, sizeof(name), "%05d fixed-length float array", j);
did = H5Dcreate(gid1, name, tid_array_f, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
H5Dwrite(did, tid_array_f, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_float_a);
if (!j)
@@ -386,7 +386,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
H5Dclose(did);
/* 5 add fixed-length strings */
- HDsnprintf(name, sizeof(name), "%05d fixed-length strings", j);
+ snprintf(name, sizeof(name), "%05d fixed-length strings", j);
did = H5Dcreate(gid1, name, tid_str, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
H5Dwrite(did, tid_str, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_str);
if (!j)
@@ -394,7 +394,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
H5Dclose(did);
/* 6 add compound data */
- HDsnprintf(name, sizeof(name), "%05d compound data", j);
+ snprintf(name, sizeof(name), "%05d compound data", j);
did = H5Dcreate(gid1, name, cmp_tid, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
H5Dwrite(did, cmp_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_comp);
if (!j)
@@ -402,7 +402,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
H5Dclose(did);
/* 7 add 2D double */
- HDsnprintf(name, sizeof(name), "%05d 2D double", j);
+ snprintf(name, sizeof(name), "%05d 2D double", j);
strcpy(tmp_name1, name);
did = H5Dcreate(gid1, name, H5T_NATIVE_DOUBLE, sid_2d, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Dwrite(did, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_double2d[0]);
@@ -411,7 +411,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
H5Dclose(did);
/* 8 add 1D int array */
- HDsnprintf(name, sizeof(name), "%05d 1D int array", j);
+ snprintf(name, sizeof(name), "%05d 1D int array", j);
did = H5Dcreate(gid1, name, H5T_NATIVE_INT, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_int);
if (!j)
@@ -419,7 +419,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
H5Dclose(did);
/* 9 add vlen int array */
- HDsnprintf(name, sizeof(name), "%05d vlen int array", j);
+ snprintf(name, sizeof(name), "%05d vlen int array", j);
strcpy(tmp_name2, name);
did = H5Dcreate(gid1, name, tid_vlen_i, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
H5Dwrite(did, tid_vlen_i, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_vlen_i);
@@ -428,7 +428,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
H5Dclose(did);
/* 10 add vlen strings */
- HDsnprintf(name, sizeof(name), "%05d vlen strings", j);
+ snprintf(name, sizeof(name), "%05d vlen strings", j);
strcpy(tmp_name3, name);
did = H5Dcreate(gid1, name, tid_vlen_s, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
H5Dwrite(did, tid_vlen_s, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_vlen_s);
@@ -439,7 +439,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
/* 11 add object refs */
H5Rcreate(&buf_ref[0], gid1, ".", H5R_OBJECT, (hid_t)-1);
H5Rcreate(&buf_ref[1], gid1, tmp_name3, H5R_OBJECT, (hid_t)-1);
- HDsnprintf(name, sizeof(name), "%05d obj refs", j);
+ snprintf(name, sizeof(name), "%05d obj refs", j);
did = H5Dcreate(gid1, name, H5T_STD_REF_OBJ, sid_2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Dwrite(did, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_ref);
if (!j)
@@ -454,7 +454,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
H5Sselect_hyperslab(sid_1d, H5S_SELECT_SET, &start, &stride, &count, NULL);
H5Rcreate(&buf_reg_ref[1], gid1, tmp_name2, H5R_DATASET_REGION, sid_1d);
H5Sselect_none(sid_1d);
- HDsnprintf(name, sizeof(name), "%05d region refs", j);
+ snprintf(name, sizeof(name), "%05d region refs", j);
did = H5Dcreate(gid1, name, H5T_STD_REF_DSETREG, sid_2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Dwrite(did, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_reg_ref);
if (!j)
@@ -570,11 +570,11 @@ add_attrs(hid_t oid, int idx)
/* 1 scalar point */
sid = H5Screate(H5S_SCALAR);
- HDsnprintf(name, sizeof(name), "%05d scalar int", idx);
+ snprintf(name, sizeof(name), "%05d scalar int", idx);
nattrs += add_attr(oid, name, H5T_NATIVE_UINT, sid, &i);
- HDsnprintf(name, sizeof(name), "%05d scalar ulong", idx);
+ snprintf(name, sizeof(name), "%05d scalar ulong", idx);
nattrs += add_attr(oid, name, H5T_NATIVE_INT64, sid, &l);
- HDsnprintf(name, sizeof(name), "%05d scalar str", idx);
+ snprintf(name, sizeof(name), "%05d scalar str", idx);
tid = H5Tcopy(H5T_C_S1);
H5Tset_size(tid, H5T_VARIABLE);
nattrs += add_attr(oid, name, tid, sid, &s[2]);
@@ -584,24 +584,24 @@ add_attrs(hid_t oid, int idx)
/* 4 single point */
sid = H5Screate_simple(1, dims1, NULL);
H5Rcreate(&ref, oid, ".", H5R_OBJECT, (hid_t)-1);
- HDsnprintf(name, sizeof(name), "%05d single float", idx);
+ snprintf(name, sizeof(name), "%05d single float", idx);
nattrs += add_attr(oid, name, H5T_NATIVE_FLOAT, sid, &f);
- HDsnprintf(name, sizeof(name), "%05d single double", idx);
+ snprintf(name, sizeof(name), "%05d single double", idx);
nattrs += add_attr(oid, name, H5T_NATIVE_DOUBLE, sid, &d);
- HDsnprintf(name, sizeof(name), "%05d single obj_ref", idx);
+ snprintf(name, sizeof(name), "%05d single obj_ref", idx);
nattrs += add_attr(oid, name, H5T_STD_REF_OBJ, sid, &ref);
H5Sclose(sid);
/* 7 fixed length 1D array */
sid = H5Screate_simple(1, dims1, NULL);
tid = H5Tarray_create(H5T_NATIVE_FLOAT, 1, dims2);
- HDsnprintf(name, sizeof(name), "%05d array float", idx);
+ snprintf(name, sizeof(name), "%05d array float", idx);
nattrs += add_attr(oid, name, tid, sid, &f_array[0]);
H5Tclose(tid);
tid = H5Tcopy(H5T_C_S1);
H5Tset_size(tid, strlen(s[0]) + 1);
tid1 = H5Tarray_create(tid, 1, dims2);
- HDsnprintf(name, sizeof(name), "%05d array str", idx);
+ snprintf(name, sizeof(name), "%05d array str", idx);
nattrs += add_attr(oid, name, tid1, sid, s);
H5Tclose(tid1);
H5Tclose(tid);
@@ -610,7 +610,7 @@ add_attrs(hid_t oid, int idx)
/* 9 fixed length 2D int arrays */
sid = H5Screate_simple(1, dims2, NULL);
tid = H5Tarray_create(H5T_NATIVE_INT, 2, dims3);
- HDsnprintf(name, sizeof(name), "%05d array int 2D", idx);
+ snprintf(name, sizeof(name), "%05d array int 2D", idx);
nattrs += add_attr(oid, name, tid, sid, int3d[0][0]);
H5Tclose(tid);
H5Sclose(sid);
@@ -619,12 +619,12 @@ add_attrs(hid_t oid, int idx)
sid = H5Screate_simple(1, dims2, NULL);
tid = H5Tcopy(H5T_C_S1);
H5Tset_size(tid, H5T_VARIABLE);
- HDsnprintf(name, sizeof(name), "%05d vlen strings", idx);
+ snprintf(name, sizeof(name), "%05d vlen strings", idx);
nattrs += add_attr(oid, name, tid, sid, s_vlen);
H5Tclose(tid);
tid = H5Tvlen_create(H5T_NATIVE_INT);
;
- HDsnprintf(name, sizeof(name), "%05d vlen int array", idx);
+ snprintf(name, sizeof(name), "%05d vlen int array", idx);
nattrs += add_attr(oid, name, tid, sid, i_vlen);
H5Tclose(tid);
H5Sclose(sid);
@@ -638,7 +638,7 @@ add_attrs(hid_t oid, int idx)
offset += sizeof(H5T_NATIVE_INT);
H5Tinsert(tid, "City", offset, tid1);
offset += sizeof(char *);
- HDsnprintf(name, sizeof(name), "%05d compound data", idx);
+ snprintf(name, sizeof(name), "%05d compound data", idx);
nattrs += add_attr(oid, name, tid, sid, cmp_data);
H5Tclose(tid1);
H5Tclose(tid);
diff --git a/tools/test/misc/h5repart_gentest.c b/tools/test/misc/h5repart_gentest.c
index 9f0eee1ea8d..a4a4ab10a8d 100644
--- a/tools/test/misc/h5repart_gentest.c
+++ b/tools/test/misc/h5repart_gentest.c
@@ -34,11 +34,11 @@ main(void)
/* Set up data array */
if (NULL == (buf_data = (int *)calloc(FAMILY_NUMBER * FAMILY_SIZE, sizeof(int)))) {
- HDperror("calloc");
+ perror("calloc");
exit(EXIT_FAILURE);
}
if (NULL == (buf = (int **)calloc(FAMILY_NUMBER, sizeof(buf_data)))) {
- HDperror("calloc");
+ perror("calloc");
exit(EXIT_FAILURE);
}
for (i = 0; i < FAMILY_NUMBER; i++)
@@ -46,28 +46,28 @@ main(void)
/* Set property list and file name for FAMILY driver */
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) {
- HDperror("H5Pcreate");
+ perror("H5Pcreate");
exit(EXIT_FAILURE);
}
if (H5Pset_fapl_family(fapl, (hsize_t)FAMILY_SIZE, H5P_DEFAULT) < 0) {
- HDperror("H5Pset_fapl_family");
+ perror("H5Pset_fapl_family");
exit(EXIT_FAILURE);
}
if ((file = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) {
- HDperror("H5Fcreate");
+ perror("H5Fcreate");
exit(EXIT_FAILURE);
}
/* Create and write dataset */
if ((space = H5Screate_simple(2, dims, NULL)) < 0) {
- HDperror("H5Screate_simple");
+ perror("H5Screate_simple");
exit(EXIT_FAILURE);
}
if ((dset = H5Dcreate2(file, dname, H5T_NATIVE_INT, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
- HDperror("H5Dcreate2");
+ perror("H5Dcreate2");
exit(EXIT_FAILURE);
}
@@ -76,34 +76,34 @@ main(void)
buf[i][j] = i * 10000 + j;
if (H5Dwrite(dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_data) < 0) {
- HDperror("H5Dwrite");
+ perror("H5Dwrite");
exit(EXIT_FAILURE);
}
if (H5Sclose(space) < 0) {
- HDperror("H5Sclose");
+ perror("H5Sclose");
exit(EXIT_FAILURE);
}
if (H5Dclose(dset) < 0) {
- HDperror("H5Dclose");
+ perror("H5Dclose");
exit(EXIT_FAILURE);
}
if (H5Pclose(fapl) < 0) {
- HDperror("H5Pclose");
+ perror("H5Pclose");
exit(EXIT_FAILURE);
}
if (H5Fclose(file) < 0) {
- HDperror("H5Fclose");
+ perror("H5Fclose");
exit(EXIT_FAILURE);
}
free(buf);
free(buf_data);
- HDputs(" PASSED");
+ puts(" PASSED");
fflush(stdout);
return EXIT_SUCCESS;
diff --git a/tools/test/misc/talign.c b/tools/test/misc/talign.c
index 805b30ba1a8..b64c8ad3204 100644
--- a/tools/test/misc/talign.c
+++ b/tools/test/misc/talign.c
@@ -53,12 +53,12 @@ main(void)
printf("%-70s", "Testing alignment in compound datatypes");
- HDstrcpy(string5, "Hi!");
+ strcpy(string5, "Hi!");
HDunlink(fname);
fil = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fil < 0) {
- HDputs("*FAILED*");
+ puts("*FAILED*");
return 1;
}
@@ -125,7 +125,7 @@ main(void)
data = (char *)malloc(H5Tget_size(fix));
if (!data) {
- HDperror("malloc() failed");
+ perror("malloc() failed");
HDabort();
}
@@ -138,7 +138,7 @@ main(void)
out:
if (error < 0) {
result = 1;
- HDputs("*FAILED - HDF5 library error*");
+ puts("*FAILED - HDF5 library error*");
}
else if (!(H5_FLT_ABS_EQUAL(fok[0], fptr[0])) || !(H5_FLT_ABS_EQUAL(fok[1], fptr[1])) ||
!(H5_FLT_ABS_EQUAL(fnok[0], fptr[2])) || !(H5_FLT_ABS_EQUAL(fnok[1], fptr[3]))) {
@@ -179,10 +179,10 @@ main(void)
" %6f = %f\n",
(double)fok[0], (double)fptr[0], (double)fok[1], (double)fptr[1], (double)fnok[0],
(double)fptr[2], (double)fnok[1], (double)fptr[3]);
- HDputs("*FAILED - compound type alignmnent problem*");
+ puts("*FAILED - compound type alignnent problem*");
}
else {
- HDputs(" PASSED");
+ puts(" PASSED");
}
if (data)
diff --git a/tools/testfiles/family_file00000.h5 b/tools/test/misc/testfiles/family_file00000.h5
similarity index 100%
rename from tools/testfiles/family_file00000.h5
rename to tools/test/misc/testfiles/family_file00000.h5
diff --git a/tools/testfiles/family_file00001.h5 b/tools/test/misc/testfiles/family_file00001.h5
similarity index 100%
rename from tools/testfiles/family_file00001.h5
rename to tools/test/misc/testfiles/family_file00001.h5
diff --git a/tools/testfiles/family_file00002.h5 b/tools/test/misc/testfiles/family_file00002.h5
similarity index 100%
rename from tools/testfiles/family_file00002.h5
rename to tools/test/misc/testfiles/family_file00002.h5
diff --git a/tools/testfiles/family_file00003.h5 b/tools/test/misc/testfiles/family_file00003.h5
similarity index 100%
rename from tools/testfiles/family_file00003.h5
rename to tools/test/misc/testfiles/family_file00003.h5
diff --git a/tools/testfiles/family_file00004.h5 b/tools/test/misc/testfiles/family_file00004.h5
similarity index 100%
rename from tools/testfiles/family_file00004.h5
rename to tools/test/misc/testfiles/family_file00004.h5
diff --git a/tools/testfiles/family_file00005.h5 b/tools/test/misc/testfiles/family_file00005.h5
similarity index 100%
rename from tools/testfiles/family_file00005.h5
rename to tools/test/misc/testfiles/family_file00005.h5
diff --git a/tools/testfiles/family_file00006.h5 b/tools/test/misc/testfiles/family_file00006.h5
similarity index 100%
rename from tools/testfiles/family_file00006.h5
rename to tools/test/misc/testfiles/family_file00006.h5
diff --git a/tools/testfiles/family_file00007.h5 b/tools/test/misc/testfiles/family_file00007.h5
similarity index 100%
rename from tools/testfiles/family_file00007.h5
rename to tools/test/misc/testfiles/family_file00007.h5
diff --git a/tools/testfiles/family_file00008.h5 b/tools/test/misc/testfiles/family_file00008.h5
similarity index 100%
rename from tools/testfiles/family_file00008.h5
rename to tools/test/misc/testfiles/family_file00008.h5
diff --git a/tools/testfiles/family_file00009.h5 b/tools/test/misc/testfiles/family_file00009.h5
similarity index 100%
rename from tools/testfiles/family_file00009.h5
rename to tools/test/misc/testfiles/family_file00009.h5
diff --git a/tools/testfiles/family_file00010.h5 b/tools/test/misc/testfiles/family_file00010.h5
similarity index 100%
rename from tools/testfiles/family_file00010.h5
rename to tools/test/misc/testfiles/family_file00010.h5
diff --git a/tools/testfiles/family_file00011.h5 b/tools/test/misc/testfiles/family_file00011.h5
similarity index 100%
rename from tools/testfiles/family_file00011.h5
rename to tools/test/misc/testfiles/family_file00011.h5
diff --git a/tools/testfiles/family_file00012.h5 b/tools/test/misc/testfiles/family_file00012.h5
similarity index 100%
rename from tools/testfiles/family_file00012.h5
rename to tools/test/misc/testfiles/family_file00012.h5
diff --git a/tools/testfiles/family_file00013.h5 b/tools/test/misc/testfiles/family_file00013.h5
similarity index 100%
rename from tools/testfiles/family_file00013.h5
rename to tools/test/misc/testfiles/family_file00013.h5
diff --git a/tools/testfiles/family_file00014.h5 b/tools/test/misc/testfiles/family_file00014.h5
similarity index 100%
rename from tools/testfiles/family_file00014.h5
rename to tools/test/misc/testfiles/family_file00014.h5
diff --git a/tools/testfiles/family_file00015.h5 b/tools/test/misc/testfiles/family_file00015.h5
similarity index 100%
rename from tools/testfiles/family_file00015.h5
rename to tools/test/misc/testfiles/family_file00015.h5
diff --git a/tools/testfiles/family_file00016.h5 b/tools/test/misc/testfiles/family_file00016.h5
similarity index 100%
rename from tools/testfiles/family_file00016.h5
rename to tools/test/misc/testfiles/family_file00016.h5
diff --git a/tools/testfiles/family_file00017.h5 b/tools/test/misc/testfiles/family_file00017.h5
similarity index 100%
rename from tools/testfiles/family_file00017.h5
rename to tools/test/misc/testfiles/family_file00017.h5
diff --git a/tools/test/misc/testh5clear.sh.in b/tools/test/misc/testh5clear.sh.in
index 018d1fd3a48..b5bf5cc3d83 100644
--- a/tools/test/misc/testh5clear.sh.in
+++ b/tools/test/misc/testh5clear.sh.in
@@ -40,9 +40,9 @@ verbose=yes
# source dirs
SRC_TOOLS="$srcdir/../.."
-SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles"
# testfiles source dirs for tools
SRC_H5CLEAR_TESTFILES="$SRC_TOOLS/test/misc/testfiles"
+SRC_H5CLEAR_OUTFILES="$SRC_TOOLS/test/misc/expected"
TESTDIR=./testh5clear
test -d $TESTDIR || mkdir -p $TESTDIR
@@ -61,25 +61,25 @@ test -d $TESTDIR || mkdir -p $TESTDIR
# copy test files and expected output files from source dirs to test dir
#
COPY_TESTFILES="
-$SRC_H5CLEAR_TESTFILES/h5clear_open_fail.err
-$SRC_H5CLEAR_TESTFILES/h5clear_no_mdc_image.err
-$SRC_H5CLEAR_TESTFILES/h5clear_usage.ddl
-$SRC_H5CLEAR_TESTFILES/h5clear_missing_file.ddl
-$SRC_H5CLEAR_TESTFILES/h5clear_status_noclose_after_size.ddl
-$SRC_H5CLEAR_TESTFILES/h5clear_noclose_before_size.ddl
-$SRC_H5CLEAR_TESTFILES/h5clear_noclose_after_size.ddl
-$SRC_H5CLEAR_TESTFILES/h5clear_equal_before_size.ddl
-$SRC_H5CLEAR_TESTFILES/h5clear_equal_after_size.ddl
-$SRC_H5CLEAR_TESTFILES/h5clear_greater_before_size.ddl
-$SRC_H5CLEAR_TESTFILES/h5clear_greater_after_size.ddl
-$SRC_H5CLEAR_TESTFILES/h5clear_less_before_size.ddl
-$SRC_H5CLEAR_TESTFILES/h5clear_less_after_size.ddl
-$SRC_H5CLEAR_TESTFILES/h5clear_user_equal_before_size.ddl
-$SRC_H5CLEAR_TESTFILES/h5clear_user_equal_after_size.ddl
-$SRC_H5CLEAR_TESTFILES/h5clear_user_greater_before_size.ddl
-$SRC_H5CLEAR_TESTFILES/h5clear_user_greater_after_size.ddl
-$SRC_H5CLEAR_TESTFILES/h5clear_user_less_before_size.ddl
-$SRC_H5CLEAR_TESTFILES/h5clear_user_less_after_size.ddl
+$SRC_H5CLEAR_OUTFILES/h5clear_open_fail.err
+$SRC_H5CLEAR_OUTFILES/h5clear_no_mdc_image.err
+$SRC_H5CLEAR_OUTFILES/h5clear_usage.ddl
+$SRC_H5CLEAR_OUTFILES/h5clear_missing_file.ddl
+$SRC_H5CLEAR_OUTFILES/h5clear_status_noclose_after_size.ddl
+$SRC_H5CLEAR_OUTFILES/h5clear_noclose_before_size.ddl
+$SRC_H5CLEAR_OUTFILES/h5clear_noclose_after_size.ddl
+$SRC_H5CLEAR_OUTFILES/h5clear_equal_before_size.ddl
+$SRC_H5CLEAR_OUTFILES/h5clear_equal_after_size.ddl
+$SRC_H5CLEAR_OUTFILES/h5clear_greater_before_size.ddl
+$SRC_H5CLEAR_OUTFILES/h5clear_greater_after_size.ddl
+$SRC_H5CLEAR_OUTFILES/h5clear_less_before_size.ddl
+$SRC_H5CLEAR_OUTFILES/h5clear_less_after_size.ddl
+$SRC_H5CLEAR_OUTFILES/h5clear_user_equal_before_size.ddl
+$SRC_H5CLEAR_OUTFILES/h5clear_user_equal_after_size.ddl
+$SRC_H5CLEAR_OUTFILES/h5clear_user_greater_before_size.ddl
+$SRC_H5CLEAR_OUTFILES/h5clear_user_greater_after_size.ddl
+$SRC_H5CLEAR_OUTFILES/h5clear_user_less_before_size.ddl
+$SRC_H5CLEAR_OUTFILES/h5clear_user_less_after_size.ddl
$SRC_H5CLEAR_TESTFILES/h5clear_sec2_v0.h5
$SRC_H5CLEAR_TESTFILES/h5clear_sec2_v2.h5
$SRC_H5CLEAR_TESTFILES/h5clear_sec2_v3.h5
diff --git a/tools/test/misc/testh5mkgrp.sh.in b/tools/test/misc/testh5mkgrp.sh.in
index d581fe1e12a..676f6b04e55 100644
--- a/tools/test/misc/testh5mkgrp.sh.in
+++ b/tools/test/misc/testh5mkgrp.sh.in
@@ -39,9 +39,9 @@ verbose=yes
# source dirs
SRC_TOOLS="$srcdir/../.."
-SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles"
# testfiles source dirs for tools
SRC_H5MKGRP_TESTFILES="$SRC_TOOLS/test/misc/testfiles"
+SRC_H5MKGRP_OUTFILES="$SRC_TOOLS/test/misc/expected"
TESTDIR=./testgrp
test -d $TESTDIR || mkdir -p $TESTDIR
@@ -60,19 +60,19 @@ test -d $TESTDIR || mkdir -p $TESTDIR
# copy test files and expected output files from source dirs to test dir
#
COPY_TESTFILES="
-$SRC_H5MKGRP_TESTFILES/h5mkgrp_help.txt
-$SRC_TOOLS_TESTFILES/h5mkgrp_single.ls
-$SRC_TOOLS_TESTFILES/h5mkgrp_single_v.ls
-$SRC_TOOLS_TESTFILES/h5mkgrp_single_p.ls
-$SRC_TOOLS_TESTFILES/h5mkgrp_single_l.ls
-$SRC_TOOLS_TESTFILES/h5mkgrp_several.ls
-$SRC_TOOLS_TESTFILES/h5mkgrp_several_v.ls
-$SRC_TOOLS_TESTFILES/h5mkgrp_several_p.ls
-$SRC_TOOLS_TESTFILES/h5mkgrp_several_l.ls
-$SRC_TOOLS_TESTFILES/h5mkgrp_nested_p.ls
-$SRC_TOOLS_TESTFILES/h5mkgrp_nested_lp.ls
-$SRC_TOOLS_TESTFILES/h5mkgrp_nested_mult_p.ls
-$SRC_TOOLS_TESTFILES/h5mkgrp_nested_mult_lp.ls
+$SRC_H5MKGRP_OUTFILES/h5mkgrp_help.txt
+$SRC_H5MKGRP_OUTFILES/h5mkgrp_single.ls
+$SRC_H5MKGRP_OUTFILES/h5mkgrp_single_v.ls
+$SRC_H5MKGRP_OUTFILES/h5mkgrp_single_p.ls
+$SRC_H5MKGRP_OUTFILES/h5mkgrp_single_l.ls
+$SRC_H5MKGRP_OUTFILES/h5mkgrp_several.ls
+$SRC_H5MKGRP_OUTFILES/h5mkgrp_several_v.ls
+$SRC_H5MKGRP_OUTFILES/h5mkgrp_several_p.ls
+$SRC_H5MKGRP_OUTFILES/h5mkgrp_several_l.ls
+$SRC_H5MKGRP_OUTFILES/h5mkgrp_nested_p.ls
+$SRC_H5MKGRP_OUTFILES/h5mkgrp_nested_lp.ls
+$SRC_H5MKGRP_OUTFILES/h5mkgrp_nested_mult_p.ls
+$SRC_H5MKGRP_OUTFILES/h5mkgrp_nested_mult_lp.ls
"
COPY_TESTFILES_TO_TESTDIR()
diff --git a/tools/test/misc/testh5repart.sh.in b/tools/test/misc/testh5repart.sh.in
index b0d52f60b2d..addd0db9e22 100644
--- a/tools/test/misc/testh5repart.sh.in
+++ b/tools/test/misc/testh5repart.sh.in
@@ -38,7 +38,7 @@ verbose=yes
# source dirs
SRC_TOOLS="$srcdir/../.."
-SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles"
+SRC_H5REPART_TESTFILES="$SRC_TOOLS/test/misc/testfiles"
TESTDIR=./testrepart
test -d $TESTDIR || mkdir -p $TESTDIR
@@ -47,24 +47,24 @@ test -d $TESTDIR || mkdir -p $TESTDIR
# copy test files and expected output files from source dirs to test dir
#
COPY_TESTFILES="
-$SRC_TOOLS_TESTFILES/family_file00000.h5
-$SRC_TOOLS_TESTFILES/family_file00001.h5
-$SRC_TOOLS_TESTFILES/family_file00002.h5
-$SRC_TOOLS_TESTFILES/family_file00003.h5
-$SRC_TOOLS_TESTFILES/family_file00004.h5
-$SRC_TOOLS_TESTFILES/family_file00005.h5
-$SRC_TOOLS_TESTFILES/family_file00006.h5
-$SRC_TOOLS_TESTFILES/family_file00007.h5
-$SRC_TOOLS_TESTFILES/family_file00008.h5
-$SRC_TOOLS_TESTFILES/family_file00009.h5
-$SRC_TOOLS_TESTFILES/family_file00010.h5
-$SRC_TOOLS_TESTFILES/family_file00011.h5
-$SRC_TOOLS_TESTFILES/family_file00012.h5
-$SRC_TOOLS_TESTFILES/family_file00013.h5
-$SRC_TOOLS_TESTFILES/family_file00014.h5
-$SRC_TOOLS_TESTFILES/family_file00015.h5
-$SRC_TOOLS_TESTFILES/family_file00016.h5
-$SRC_TOOLS_TESTFILES/family_file00017.h5
+$SRC_H5REPART_TESTFILES/family_file00000.h5
+$SRC_H5REPART_TESTFILES/family_file00001.h5
+$SRC_H5REPART_TESTFILES/family_file00002.h5
+$SRC_H5REPART_TESTFILES/family_file00003.h5
+$SRC_H5REPART_TESTFILES/family_file00004.h5
+$SRC_H5REPART_TESTFILES/family_file00005.h5
+$SRC_H5REPART_TESTFILES/family_file00006.h5
+$SRC_H5REPART_TESTFILES/family_file00007.h5
+$SRC_H5REPART_TESTFILES/family_file00008.h5
+$SRC_H5REPART_TESTFILES/family_file00009.h5
+$SRC_H5REPART_TESTFILES/family_file00010.h5
+$SRC_H5REPART_TESTFILES/family_file00011.h5
+$SRC_H5REPART_TESTFILES/family_file00012.h5
+$SRC_H5REPART_TESTFILES/family_file00013.h5
+$SRC_H5REPART_TESTFILES/family_file00014.h5
+$SRC_H5REPART_TESTFILES/family_file00015.h5
+$SRC_H5REPART_TESTFILES/family_file00016.h5
+$SRC_H5REPART_TESTFILES/family_file00017.h5
"
COPY_TESTFILES_TO_TESTDIR()
@@ -100,7 +100,7 @@ CLEAN_TESTFILES_AND_TESTDIR()
# skip rm if srcdir is same as destdir
# this occurs when build/test performed in source dir and
# make cp fail
- SDIR=$SRC_TOOLS_TESTFILES
+ SDIR=$SRC_H5REPART_TESTFILES
INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'`
if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
diff --git a/tools/test/misc/vds/UC_common.h b/tools/test/misc/vds/UC_common.h
index 234ec87f28c..4cfce358c1c 100644
--- a/tools/test/misc/vds/UC_common.h
+++ b/tools/test/misc/vds/UC_common.h
@@ -26,10 +26,6 @@
/* Compression level */
#define COMPRESSION_LEVEL 7
-/* Booleans */
-#define TRUE 1
-#define FALSE 0
-
/* Testing macros */
#define AT() printf(" at %s:%d in %s()...\n", __FILE__, __LINE__, __func__);
#define UC_ERROR \
diff --git a/tools/test/perform/CMakeTests.cmake b/tools/test/perform/CMakeTests.cmake
index acfe169fc9e..2dea619438a 100644
--- a/tools/test/perform/CMakeTests.cmake
+++ b/tools/test/perform/CMakeTests.cmake
@@ -16,7 +16,7 @@
##############################################################################
##############################################################################
-HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tfilters.h5" "${PROJECT_BINARY_DIR}/tfilters.h5" "zip_perf_files")
+HDFTEST_COPY_FILE("${HDF5_TOOLS_TST_DIR}/h5dump/testfiles/tfilters.h5" "${PROJECT_BINARY_DIR}/tfilters.h5" "zip_perf_files")
add_custom_target(zip_perf_files ALL COMMENT "Copying files needed by zip_perf tests" DEPENDS ${zip_perf_list})
#-----------------------------------------------------------------------------
diff --git a/tools/test/perform/iopipe.c b/tools/test/perform/iopipe.c
index bc15fdff0c5..b5190fa6767 100644
--- a/tools/test/perform/iopipe.c
+++ b/tools/test/perform/iopipe.c
@@ -123,7 +123,7 @@ main(void)
unsigned u;
herr_t H5_ATTR_NDEBUG_UNUSED status;
hssize_t H5_ATTR_NDEBUG_UNUSED n;
- off_t H5_ATTR_NDEBUG_UNUSED offset;
+ HDoff_t H5_ATTR_NDEBUG_UNUSED offset;
hsize_t start[2];
hsize_t count[2];
@@ -158,7 +158,7 @@ main(void)
t_start = H5_get_time();
fprintf(stderr, HEADING, "fill raw");
for (u = 0; u < nwrite; u++) {
- HDputc(PROGRESS, stderr);
+ putc(PROGRESS, stderr);
fflush(stderr);
memset(the_data, 0xAA, (size_t)(size[0] * size[1]));
}
@@ -166,7 +166,7 @@ main(void)
getrusage(RUSAGE_SELF, &r_stop);
#endif
t_stop = H5_get_time();
- HDputc('\n', stderr);
+ putc('\n', stderr);
print_stats("fill raw",
#ifdef H5_HAVE_GETRUSAGE
&r_start, &r_stop,
@@ -181,7 +181,7 @@ main(void)
t_start = H5_get_time();
fprintf(stderr, HEADING, "fill hdf5");
for (u = 0; u < nread; u++) {
- HDputc(PROGRESS, stderr);
+ putc(PROGRESS, stderr);
fflush(stderr);
status = H5Dread(dset, H5T_NATIVE_UCHAR, file_space, file_space, H5P_DEFAULT, the_data);
assert(status >= 0);
@@ -190,7 +190,7 @@ main(void)
getrusage(RUSAGE_SELF, &r_stop);
#endif
t_stop = H5_get_time();
- HDputc('\n', stderr);
+ putc('\n', stderr);
print_stats("fill hdf5",
#ifdef H5_HAVE_GETRUSAGE
&r_start, &r_stop,
@@ -205,9 +205,9 @@ main(void)
t_start = H5_get_time();
fprintf(stderr, HEADING, "out raw");
for (u = 0; u < nwrite; u++) {
- HDputc(PROGRESS, stderr);
+ putc(PROGRESS, stderr);
fflush(stderr);
- offset = HDlseek(fd, (off_t)0, SEEK_SET);
+ offset = HDlseek(fd, 0, SEEK_SET);
assert(0 == offset);
n = HDwrite(fd, the_data, (size_t)(size[0] * size[1]));
assert(n >= 0 && (size_t)n == (size[0] * size[1]));
@@ -216,7 +216,7 @@ main(void)
getrusage(RUSAGE_SELF, &r_stop);
#endif
t_stop = H5_get_time();
- HDputc('\n', stderr);
+ putc('\n', stderr);
print_stats("out raw",
#ifdef H5_HAVE_GETRUSAGE
&r_start, &r_stop,
@@ -231,7 +231,7 @@ main(void)
t_start = H5_get_time();
fprintf(stderr, HEADING, "out hdf5");
for (u = 0; u < nwrite; u++) {
- HDputc(PROGRESS, stderr);
+ putc(PROGRESS, stderr);
fflush(stderr);
status = H5Dwrite(dset, H5T_NATIVE_UCHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, the_data);
assert(status >= 0);
@@ -240,7 +240,7 @@ main(void)
getrusage(RUSAGE_SELF, &r_stop);
#endif
t_stop = H5_get_time();
- HDputc('\n', stderr);
+ putc('\n', stderr);
print_stats("out hdf5",
#ifdef H5_HAVE_GETRUSAGE
&r_start, &r_stop,
@@ -255,9 +255,9 @@ main(void)
t_start = H5_get_time();
fprintf(stderr, HEADING, "in raw");
for (u = 0; u < nread; u++) {
- HDputc(PROGRESS, stderr);
+ putc(PROGRESS, stderr);
fflush(stderr);
- offset = HDlseek(fd, (off_t)0, SEEK_SET);
+ offset = HDlseek(fd, 0, SEEK_SET);
assert(0 == offset);
n = HDread(fd, the_data, (size_t)(size[0] * size[1]));
assert(n >= 0 && (size_t)n == (size[0] * size[1]));
@@ -266,7 +266,7 @@ main(void)
getrusage(RUSAGE_SELF, &r_stop);
#endif
t_stop = H5_get_time();
- HDputc('\n', stderr);
+ putc('\n', stderr);
print_stats("in raw",
#ifdef H5_HAVE_GETRUSAGE
&r_start, &r_stop,
@@ -281,7 +281,7 @@ main(void)
t_start = H5_get_time();
fprintf(stderr, HEADING, "in hdf5");
for (u = 0; u < nread; u++) {
- HDputc(PROGRESS, stderr);
+ putc(PROGRESS, stderr);
fflush(stderr);
status = H5Dread(dset, H5T_NATIVE_UCHAR, file_space, file_space, H5P_DEFAULT, the_data);
assert(status >= 0);
@@ -290,7 +290,7 @@ main(void)
getrusage(RUSAGE_SELF, &r_stop);
#endif
t_stop = H5_get_time();
- HDputc('\n', stderr);
+ putc('\n', stderr);
print_stats("in hdf5",
#ifdef H5_HAVE_GETRUSAGE
&r_start, &r_stop,
@@ -310,7 +310,7 @@ main(void)
t_start = H5_get_time();
fprintf(stderr, HEADING, "in hdf5 partial");
for (u = 0; u < nread; u++) {
- HDputc(PROGRESS, stderr);
+ putc(PROGRESS, stderr);
fflush(stderr);
status = H5Dread(dset, H5T_NATIVE_UCHAR, file_space, file_space, H5P_DEFAULT, the_data);
assert(status >= 0);
@@ -319,7 +319,7 @@ main(void)
getrusage(RUSAGE_SELF, &r_stop);
#endif
t_stop = H5_get_time();
- HDputc('\n', stderr);
+ putc('\n', stderr);
print_stats("in hdf5 partial",
#ifdef H5_HAVE_GETRUSAGE
&r_start, &r_stop,
diff --git a/tools/test/perform/overhead.c b/tools/test/perform/overhead.c
index 90d589782e8..00a35bbfb7c 100644
--- a/tools/test/perform/overhead.c
+++ b/tools/test/perform/overhead.c
@@ -40,12 +40,12 @@
#endif
#define FILE_NAME_1 "overhead.h5"
-#ifndef FALSE
-#define FALSE 0
-#endif /* FALSE */
-#ifndef TRUE
-#define TRUE 1
-#endif /* TRUE */
+#ifndef false
+#define false 0
+#endif /* false */
+#ifndef true
+#define true 1
+#endif /* true */
typedef enum fill_t { FILL_ALL, FILL_FORWARD, FILL_REVERSE, FILL_INWARD, FILL_OUTWARD, FILL_RANDOM } fill_t;
@@ -142,7 +142,7 @@ display_error_cb(hid_t estack, void H5_ATTR_UNUSED *client_data)
*-------------------------------------------------------------------------
*/
static int
-test(fill_t fill_style, const double splits[], hbool_t verbose, hbool_t use_rdcc)
+test(fill_t fill_style, const double splits[], bool verbose, bool use_rdcc)
{
hid_t file = (-1), fapl = (-1), dcpl = (-1), xfer = (-1), mspace = (-1), fspace = (-1), dset = (-1);
hsize_t ch_size[1] = {1}; /*chunk size */
@@ -312,11 +312,11 @@ test(fill_t fill_style, const double splits[], hbool_t verbose, hbool_t use_rdcc
int
main(int argc, char *argv[])
{
- hid_t xfer;
- fill_t fill_style = FILL_ALL;
- hbool_t use_cache = FALSE;
- double splits[3];
- int i, j, nerrors = 0;
+ hid_t xfer;
+ fill_t fill_style = FILL_ALL;
+ bool use_cache = false;
+ double splits[3];
+ int i, j, nerrors = 0;
/* Default split ratios */
H5Eset_auto2(H5E_DEFAULT, display_error_cb, NULL);
@@ -346,7 +346,7 @@ main(int argc, char *argv[])
fill_style = FILL_RANDOM;
}
else if (!strcmp(argv[i], "cache")) {
- use_cache = TRUE;
+ use_cache = true;
}
else if (j < 3 && (isdigit(argv[i][0]) || '.' == argv[i][0])) {
splits[j++] = strtod(argv[i], NULL);
@@ -359,16 +359,16 @@ main(int argc, char *argv[])
if (FILL_ALL == fill_style) {
printf("%-7s %8s\n", "Style", "Bytes/Chunk");
printf("%-7s %8s\n", "-----", "-----------");
- nerrors += test(FILL_FORWARD, splits, FALSE, use_cache);
- nerrors += test(FILL_REVERSE, splits, FALSE, use_cache);
- nerrors += test(FILL_INWARD, splits, FALSE, use_cache);
- nerrors += test(FILL_OUTWARD, splits, FALSE, use_cache);
- nerrors += test(FILL_RANDOM, splits, FALSE, use_cache);
+ nerrors += test(FILL_FORWARD, splits, false, use_cache);
+ nerrors += test(FILL_REVERSE, splits, false, use_cache);
+ nerrors += test(FILL_INWARD, splits, false, use_cache);
+ nerrors += test(FILL_OUTWARD, splits, false, use_cache);
+ nerrors += test(FILL_RANDOM, splits, false, use_cache);
}
else {
if (use_cache)
usage(argv[0]);
- nerrors += test(fill_style, splits, TRUE, FALSE);
+ nerrors += test(fill_style, splits, true, false);
}
if (nerrors > 0)
goto error;
diff --git a/tools/test/perform/perf_meta.c b/tools/test/perform/perf_meta.c
index 16df60a2a46..4f1863d36f3 100644
--- a/tools/test/perform/perf_meta.c
+++ b/tools/test/perform/perf_meta.c
@@ -33,13 +33,13 @@ static int TEST_3 = 0x4; /* Test 3 */
static const char *FILENAME[] = {"meta_perf_1", "meta_perf_2", "meta_perf_3", NULL};
/* Default values for performance. Can be changed through command line options */
-static int NUM_DSETS = 16;
-static int NUM_ATTRS = 8;
-static int BATCH_ATTRS = 2;
-static hbool_t flush_dset = FALSE;
-static hbool_t flush_attr = FALSE;
-static int nerrors = 0; /* errors count */
-static hid_t fapl;
+static int NUM_DSETS = 16;
+static int NUM_ATTRS = 8;
+static int BATCH_ATTRS = 2;
+static bool flush_dset = false;
+static bool flush_attr = false;
+static int nerrors = 0; /* errors count */
+static hid_t fapl;
/* Data space IDs */
static hid_t space;
@@ -117,9 +117,9 @@ parse_options(int argc, char **argv)
case 'f': /* Call H5Fflush for each dataset or attribute */
if (!strcmp("a", (*argv + 2)))
- flush_attr = TRUE;
+ flush_attr = true;
else if (!strcmp("d", (*argv + 2)))
- flush_dset = TRUE;
+ flush_dset = true;
else {
nerrors++;
return (1);
@@ -280,7 +280,7 @@ create_dsets(hid_t file)
* Create a dataset using the default dataset creation properties.
*/
for (i = 0; i < NUM_DSETS; i++) {
- HDsnprintf(dset_name, sizeof(dset_name), "dataset %d", i);
+ snprintf(dset_name, sizeof(dset_name), "dataset %d", i);
if ((dataset = H5Dcreate2(file, dset_name, H5T_NATIVE_DOUBLE, space, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
goto error;
@@ -337,14 +337,14 @@ create_attrs_1(void)
* Create all(user specifies the number) attributes for each dataset
*/
for (i = 0; i < NUM_DSETS; i++) {
- HDsnprintf(dset_name, sizeof(dset_name), "dataset %d", i);
+ snprintf(dset_name, sizeof(dset_name), "dataset %d", i);
open_t.start = retrieve_time();
if ((dataset = H5Dopen2(file, dset_name, H5P_DEFAULT)) < 0)
goto error;
perf(&open_t, open_t.start, retrieve_time());
for (j = 0; j < NUM_ATTRS; j++) {
- HDsnprintf(attr_name, sizeof(attr_name), "all attrs for each dset %d", j);
+ snprintf(attr_name, sizeof(attr_name), "all attrs for each dset %d", j);
attr_t.start = retrieve_time();
if ((attr = H5Acreate2(dataset, attr_name, H5T_NATIVE_DOUBLE, small_space, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
@@ -433,7 +433,7 @@ create_attrs_2(void)
* Create all(user specifies the number) attributes for each new dataset
*/
for (i = 0; i < NUM_DSETS; i++) {
- HDsnprintf(dset_name, sizeof(dset_name), "dataset %d", i);
+ snprintf(dset_name, sizeof(dset_name), "dataset %d", i);
create_t.start = retrieve_time();
if ((dataset = H5Dcreate2(file, dset_name, H5T_NATIVE_DOUBLE, space, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
@@ -441,7 +441,7 @@ create_attrs_2(void)
perf(&create_t, create_t.start, retrieve_time());
for (j = 0; j < NUM_ATTRS; j++) {
- HDsnprintf(attr_name, sizeof(attr_name), "all attrs for each dset %d", j);
+ snprintf(attr_name, sizeof(attr_name), "all attrs for each dset %d", j);
attr_t.start = retrieve_time();
if ((attr = H5Acreate2(dataset, attr_name, H5T_NATIVE_DOUBLE, small_space, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
@@ -539,14 +539,14 @@ create_attrs_3(void)
for (i = 0; i < loop_num; i++) {
for (j = 0; j < NUM_DSETS; j++) {
- HDsnprintf(dset_name, sizeof(dset_name), "dataset %d", j);
+ snprintf(dset_name, sizeof(dset_name), "dataset %d", j);
open_t.start = retrieve_time();
if ((dataset = H5Dopen2(file, dset_name, H5P_DEFAULT)) < 0)
goto error;
perf(&open_t, open_t.start, retrieve_time());
for (k = 0; k < BATCH_ATTRS; k++) {
- HDsnprintf(attr_name, sizeof(attr_name), "some attrs for each dset %d %d", i, k);
+ snprintf(attr_name, sizeof(attr_name), "some attrs for each dset %d %d", i, k);
attr_t.start = retrieve_time();
if ((attr = H5Acreate2(dataset, attr_name, H5T_NATIVE_DOUBLE, small_space, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
diff --git a/tools/test/perform/zip_perf.c b/tools/test/perform/zip_perf.c
index b8b80e8ccbe..063c1658795 100644
--- a/tools/test/perform/zip_perf.c
+++ b/tools/test/perform/zip_perf.c
@@ -36,13 +36,13 @@
/* report 0.0 in case t is zero too */
#define MB_PER_SEC(bytes, t) ((fabs(t) < 0.0000000001) ? 0.0 : ((((double)(bytes)) / (double)ONE_MB) / (t)))
-#ifndef TRUE
-#define TRUE 1
-#endif /* TRUE */
+#ifndef true
+#define true 1
+#endif /* true */
-#ifndef FALSE
-#define FALSE (!TRUE)
-#endif /* FALSE */
+#ifndef false
+#define false (!true)
+#endif /* false */
#ifndef S_IRWXU
#define S_IRWXU (_S_IREAD | _S_IWRITE)
@@ -54,7 +54,7 @@ static const char *option_prefix = NULL;
static char *filename = NULL;
static int compress_percent = 0;
static int compress_level = Z_DEFAULT_COMPRESSION;
-static int output, random_test = FALSE;
+static int output, random_test = false;
static int report_once_flag;
static double compression_time;
@@ -85,7 +85,7 @@ error(const char *fmt, ...)
va_start(ap, fmt);
fprintf(stderr, "%s: error: ", prog);
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
- HDvfprintf(stderr, fmt, ap);
+ vfprintf(stderr, fmt, ap);
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
fprintf(stderr, "\n");
va_end(ap);
@@ -100,7 +100,7 @@ error(const char *fmt, ...)
static void
cleanup(void)
{
- if (!HDgetenv(HDF5_NOCLEANUP))
+ if (!getenv(HDF5_NOCLEANUP))
HDunlink(filename);
free(filename);
}
@@ -140,7 +140,7 @@ write_file(Bytef *source, uLongf sourceLen)
int rc = (int)HDwrite(output, d_ptr, (size_t)d_len);
if (rc == -1)
- error(HDstrerror(errno));
+ error(strerror(errno));
if (rc == (int)d_len)
break;
@@ -197,7 +197,7 @@ static void
get_unique_name(void)
{
const char *prefix = NULL;
- const char *env = HDgetenv("HDF5_PREFIX");
+ const char *env = getenv("HDF5_PREFIX");
if (env)
prefix = env;
@@ -207,19 +207,19 @@ get_unique_name(void)
if (prefix)
/* 2 = 1 for '/' + 1 for null terminator */
- filename = (char *)malloc(HDstrlen(prefix) + HDstrlen(ZIP_PERF_FILE) + 2);
+ filename = (char *)malloc(strlen(prefix) + strlen(ZIP_PERF_FILE) + 2);
else
- filename = (char *)malloc(HDstrlen(ZIP_PERF_FILE) + 1);
+ filename = (char *)malloc(strlen(ZIP_PERF_FILE) + 1);
if (!filename)
error("out of memory");
filename[0] = 0;
if (prefix) {
- HDstrcpy(filename, prefix);
- HDstrcat(filename, "/");
+ strcpy(filename, prefix);
+ strcat(filename, "/");
}
- HDstrcat(filename, ZIP_PERF_FILE);
+ strcat(filename, ZIP_PERF_FILE);
}
/*
@@ -316,13 +316,13 @@ fill_with_random_data(Bytef *src, uLongf src_len)
fprintf(stdout, "Using /dev/urandom for random data\n");
if (fd < 0)
- error(HDstrerror(errno));
+ error(strerror(errno));
for (;;) {
ssize_t rc = HDread(fd, buf, src_len);
if (rc == -1)
- error(HDstrerror(errno));
+ error(strerror(errno));
if (rc == (ssize_t)len)
break;
@@ -391,7 +391,7 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size, unsigned long
output = HDopen(filename, O_RDWR | O_CREAT, S_IRWXU);
if (output == -1)
- error(HDstrerror(errno));
+ error(strerror(errno));
for (i = 0; i <= iters; ++i) {
Bytef *s_ptr = src;
@@ -402,7 +402,7 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size, unsigned long
ssize_t rc = HDwrite(output, s_ptr, s_len);
if (rc == -1)
- error(HDstrerror(errno));
+ error(strerror(errno));
if (rc == (ssize_t)s_len)
break;
@@ -427,7 +427,7 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size, unsigned long
output = HDopen(filename, O_RDWR | O_CREAT, S_IRWXU);
if (output == -1)
- error(HDstrerror(errno));
+ error(strerror(errno));
report_once_flag = 1;
HDgettimeofday(&timer_start, NULL);
@@ -500,7 +500,7 @@ main(int argc, char *argv[])
option_prefix = H5_optarg;
break;
case 'r':
- random_test = TRUE;
+ random_test = true;
break;
case 's':
file_size = parse_size_directive(H5_optarg);
diff --git a/utils/mirror_vfd/mirror_remote.c b/utils/mirror_vfd/mirror_remote.c
index 4f87c175bf8..a5115276e53 100644
--- a/utils/mirror_vfd/mirror_remote.c
+++ b/utils/mirror_vfd/mirror_remote.c
@@ -60,7 +60,7 @@ mirror_log(struct mirror_log_info *info, unsigned int level, const char *format,
if (format != NULL) {
va_list args;
va_start(args, format);
- HDvfprintf(stream, format, args);
+ vfprintf(stream, format, args);
va_end(args);
}
@@ -158,7 +158,7 @@ mirror_log_init(char *path, const char *prefix, unsigned int verbosity)
info->prefix[0] = '\0';
if (prefix && *prefix) {
- HDstrncpy(info->prefix, prefix, MIRROR_LOG_PREFIX_MAX);
+ strncpy(info->prefix, prefix, MIRROR_LOG_PREFIX_MAX);
}
if (path && *path) {
diff --git a/utils/mirror_vfd/mirror_server.c b/utils/mirror_vfd/mirror_server.c
index 3bf075a084f..597e307e9ae 100644
--- a/utils/mirror_vfd/mirror_server.c
+++ b/utils/mirror_vfd/mirror_server.c
@@ -187,22 +187,22 @@ parse_args(int argc, char **argv, struct op_args *args_out)
/* Loop over arguments after program name */
for (int i = 1; i < argc; i++) {
- if (!HDstrncmp(argv[i], "-h", 3) || !HDstrncmp(argv[i], "--help", 7)) {
+ if (!strncmp(argv[i], "-h", 3) || !strncmp(argv[i], "--help", 7)) {
mirror_log(NULL, V_INFO, "found help argument");
args_out->help = 1;
return 0;
} /* end if help */
- else if (!HDstrncmp(argv[i], "--port=", 7)) {
+ else if (!strncmp(argv[i], "--port=", 7)) {
mirror_log(NULL, V_INFO, "parsing 'main_port' (%s)", argv[i] + 7);
args_out->main_port = atoi(argv[i] + 7);
} /* end if port */
- else if (!HDstrncmp(argv[i], "--verbosity=", 12)) {
+ else if (!strncmp(argv[i], "--verbosity=", 12)) {
mirror_log(NULL, V_INFO, "parsing 'verbosity' (%s)", argv[i] + 12);
args_out->verbosity = (unsigned int)atoi(argv[i] + 12);
} /* end if verbosity */
- else if (!HDstrncmp(argv[i], "--logpath=", 10)) {
+ else if (!strncmp(argv[i], "--logpath=", 10)) {
mirror_log(NULL, V_INFO, "parsing 'logpath' (%s)", argv[i] + 10);
- HDstrncpy(args_out->log_path, argv[i] + 10, PATH_MAX);
+ strncpy(args_out->log_path, argv[i] + 10, PATH_MAX);
} /* end if logpath */
else {
mirror_log(NULL, V_ERR, "unrecognized argument: %s", argv[i]);
@@ -257,7 +257,7 @@ prepare_listening_socket(struct server_run *run)
mirror_log(run->loginfo, V_INFO, "bind()");
ret = bind(ret_value, (struct sockaddr *)&server_addr, sizeof(server_addr));
if (ret < 0) {
- mirror_log(run->loginfo, V_ERR, "bind() %s", HDstrerror(errno));
+ mirror_log(run->loginfo, V_ERR, "bind() %s", strerror(errno));
goto error;
}
@@ -517,7 +517,7 @@ handle_requests(struct server_run *run)
/* Respond to handshake message.
*/
- if (!HDstrncmp("SHUTDOWN", mybuf, 8)) {
+ if (!strncmp("SHUTDOWN", mybuf, 8)) {
/* Stop operation if told to stop */
mirror_log(run->loginfo, V_INFO, "received SHUTDOWN!", ret);
@@ -533,7 +533,7 @@ handle_requests(struct server_run *run)
connfd = -1;
goto done;
} /* end if explicit "SHUTDOWN" directive */
- if (!HDstrncmp("CONFIRM", mybuf, 7)) {
+ if (!strncmp("CONFIRM", mybuf, 7)) {
/* Confirm operation */
if ((ret = HDwrite(connfd, "ALIVE", 6)) < 0) {
mirror_log(run->loginfo, V_ERR, "write:%d", ret);
diff --git a/utils/mirror_vfd/mirror_server_stop.c b/utils/mirror_vfd/mirror_server_stop.c
index 52dea08c69a..6b2b1b116b3 100644
--- a/utils/mirror_vfd/mirror_server_stop.c
+++ b/utils/mirror_vfd/mirror_server_stop.c
@@ -89,16 +89,16 @@ parse_args(int argc, char **argv, struct mshs_opts *opts)
opts->magic = MSHS_OPTS_MAGIC;
opts->help = 0;
opts->portno = MSHS_DEFAULT_PORTNO;
- HDstrncpy(opts->ip, MSHS_DEFAULT_IP, MSHS_IP_STR_SIZE);
+ strncpy(opts->ip, MSHS_DEFAULT_IP, MSHS_IP_STR_SIZE);
for (i = 1; i < argc; i++) { /* start with first possible option argument */
- if (!HDstrncmp(argv[i], "-h", 3) || !HDstrncmp(argv[i], "--help", 7)) {
+ if (!strncmp(argv[i], "-h", 3) || !strncmp(argv[i], "--help", 7)) {
opts->help = 1;
}
- else if (!HDstrncmp(argv[i], "--ip=", 5)) {
- HDstrncpy(opts->ip, argv[i] + 5, MSHS_IP_STR_SIZE);
+ else if (!strncmp(argv[i], "--ip=", 5)) {
+ strncpy(opts->ip, argv[i] + 5, MSHS_IP_STR_SIZE);
}
- else if (!HDstrncmp(argv[i], "--port=", 7)) {
+ else if (!strncmp(argv[i], "--port=", 7)) {
opts->portno = atoi(argv[i] + 7);
}
else {
@@ -110,8 +110,8 @@ parse_args(int argc, char **argv, struct mshs_opts *opts)
} /* end for each argument from command line */
/* auto-replace 'localhost' with numeric IP */
- if (!HDstrncmp(opts->ip, "localhost", 10)) { /* include null terminator */
- HDstrncpy(opts->ip, "127.0.0.1", MSHS_IP_STR_SIZE);
+ if (!strncmp(opts->ip, "localhost", 10)) { /* include null terminator */
+ strncpy(opts->ip, "127.0.0.1", MSHS_IP_STR_SIZE);
}
return 0;
@@ -149,12 +149,12 @@ send_shutdown(struct mshs_opts *opts)
memset(target_addr.sin_zero, 0, sizeof(target_addr.sin_zero));
if (connect(live_socket, (struct sockaddr *)&target_addr, (socklen_t)sizeof(target_addr)) < 0) {
- printf("ERROR connect() (%d)\n%s\n", errno, HDstrerror(errno));
+ printf("ERROR connect() (%d)\n%s\n", errno, strerror(errno));
return -1;
}
if (HDwrite(live_socket, "SHUTDOWN", 9) == -1) {
- printf("ERROR write() (%d)\n%s\n", errno, HDstrerror(errno));
+ printf("ERROR write() (%d)\n%s\n", errno, strerror(errno));
return -1;
}
@@ -163,7 +163,7 @@ send_shutdown(struct mshs_opts *opts)
printf("ERROR read() can't receive data\n");
return -1;
}
- if (HDstrncmp("CLOSING", mybuf, 8)) {
+ if (strncmp("CLOSING", mybuf, 8)) {
printf("ERROR read() didn't receive data from server\n");
return -1;
}
diff --git a/utils/mirror_vfd/mirror_writer.c b/utils/mirror_vfd/mirror_writer.c
index 24fbc773f7a..a5a1d27f90b 100644
--- a/utils/mirror_vfd/mirror_writer.c
+++ b/utils/mirror_vfd/mirror_writer.c
@@ -382,7 +382,7 @@ reply_error(struct mirror_session *session, const char *msg)
mirror_log(session->loginfo, V_ALL, "reply_error(%s)", msg);
reply->status = H5FD_MIRROR_STATUS_ERROR;
- HDsnprintf(reply->message, H5FD_MIRROR_STATUS_MESSAGE_MAX - 1, "%s", msg);
+ snprintf(reply->message, H5FD_MIRROR_STATUS_MESSAGE_MAX - 1, "%s", msg);
return _xmit_reply(session);
} /* end reply_error() */
@@ -838,7 +838,7 @@ receive_communique(struct mirror_session *session, struct sock_comm *comm)
} /* end if hexdump transmissions received */
/* old-fashioned manual kill (for debugging) */
- if (!HDstrncmp("GOODBYE", comm->raw, 7)) {
+ if (!strncmp("GOODBYE", comm->raw, 7)) {
mirror_log(session->loginfo, V_INFO, "received GOODBYE");
comm->recd_die = 1;
goto done;
diff --git a/utils/subfiling_vfd/h5fuse.sh.in b/utils/subfiling_vfd/h5fuse.sh.in
index 2085033e281..c6d715fd0a9 100755
--- a/utils/subfiling_vfd/h5fuse.sh.in
+++ b/utils/subfiling_vfd/h5fuse.sh.in
@@ -20,7 +20,7 @@ NC='\033[0m' # No Color
############################################################
# Usage #
############################################################
-function usage() {
+function usage {
echo ""
# Display usage
echo "Purpose: Combine subfiles into a single HDF5 file. Requires the subfiling
@@ -37,7 +37,7 @@ function usage() {
echo ""
}
-function gen_mpi() {
+function gen_mpi {
# Program to determine MPI rank and size if being run in parallel (-p).
diff --git a/utils/test/swmr_check_compat_vfd.c b/utils/test/swmr_check_compat_vfd.c
index 765ebd9dd48..b5cfb1ba35c 100644
--- a/utils/test/swmr_check_compat_vfd.c
+++ b/utils/test/swmr_check_compat_vfd.c
@@ -42,7 +42,7 @@ main(void)
{
char *driver = NULL;
- driver = HDgetenv(HDF5_DRIVER);
+ driver = getenv(HDF5_DRIVER);
if (H5FD__supports_swmr_test(driver))
return EXIT_SUCCESS;
diff --git a/utils/tools/h5dwalk/h5dwalk.1 b/utils/tools/h5dwalk/h5dwalk.1
deleted file mode 100644
index eb0e5e83629..00000000000
--- a/utils/tools/h5dwalk/h5dwalk.1
+++ /dev/null
@@ -1,42 +0,0 @@
-.TH "h5dwalk" 1
-.SH NAME
-h5dwalk \- Provides a means of extending HDF5 tools by using parallelism on groups of files.
-.SH SYNOPSIS
-h5dwalk [OPTIONS] -T h5tool [H5TOOL_options...]
-.SH DESCRIPTION
-h5dwalk utilizes the mpiFileUtils library to invoke a selected HDF5 tool on a collection of files. The mpiFileUtils library provides the facilities to walk directory trees and provide a selection of files contained therein. This selection can be filtered in various ways. At present, h5dwalk filters the original file selection to include only HDF5 formatted files. The resulting collection or collections can be utilized as the file inputs to the selected h5tool.
-.SH OPTIONS
-.TP
-.B \-h
-or
-.B \-\-help
-Print a usage message and exit.
-.TP
-.B \-i
-or
-.B \-\-input filename
-Read command input from a file. Not yet implemented.
-.TP
-.B \-o
-or
-.B \-\-output filename
-Captures the hdf5 tool output into a named file.
-.TP
-.B \-l
-or
-.B \-\-log [file]
-Captures hdf5 tool output into a individual log files. If an optional file (directory) is specified, then output from all tool instances will be written in the given file directory. Without the optional filename, each tool instance output will be captured in a new log file whose name is associated with the hdf5 tool that was run and is written in the current working directory.
-.TP
-.B \-E
-or
-.B \-\-error [file]
-Show all HDF5 error reporting. Behavior is similar to --log, i.e. errors can either be logged in a single named file or in individual tool specific files. Not yet implemented.
-.TP
-.B \-T
-or
-.B \-\-tool hdf5_tool
-Specifies the hdf5 tool that should be invoked for each file in a collection of files. The collection consists of individual HDF5 files found by walking a specified directory tree which is used in place of the normal tool filename argument. The '-T' option should appear on the command line just prior to the HDF5 tool argument options.
-.TP
-.SH "SEE ALSO"
-\&\fIh5dump\fR\|(1), \fIh5diff\fR\|(1), \fIh5repart\fR\|(1), \fIh5diff\fR\|(1),
-\&\fIh5import\fR\|(1), \fIgif2h5\fR\|(1), \fIh52gif\fR\|(1), \fIh5perf\fR\|(1)
diff --git a/utils/tools/h5dwalk/h5dwalk.c b/utils/tools/h5dwalk/h5dwalk.c
index 256ac45a0e3..b510f3e6d08 100644
--- a/utils/tools/h5dwalk/h5dwalk.c
+++ b/utils/tools/h5dwalk/h5dwalk.c
@@ -97,7 +97,7 @@ static void
save_command(const char *argv0)
{
assert(argv0);
- user_cmd = HDstrdup(argv0);
+ user_cmd = strdup(argv0);
}
static void
@@ -328,7 +328,7 @@ distribution_parse(struct distribute_option *option, const char *string)
return -1;
}
- str = HDstrdup(string);
+ str = strdup(string);
/* Parse separators */
ptr = str + strlen("size:");
next = ptr;
@@ -761,9 +761,9 @@ fill_file_list(mfu_flist new_flist, const char *config_filename, int myrank, int
FILE *config = fopen(config_filename, "r");
if (config == NULL)
return -1;
- while (HDfgets(linebuf, sizeof(linebuf), config) != NULL) {
+ while (fgets(linebuf, sizeof(linebuf), config) != NULL) {
struct stat statbuf;
- char *eol = HDstrchr(linebuf, '\n');
+ char *eol = strchr(linebuf, '\n');
if (eol)
*eol = '\0';
if (HDstat(linebuf, &statbuf) == 0) {
@@ -835,10 +835,10 @@ copy_args(int argc, const char *argv[], int *mfu_argc, int *copy_len)
save_command(argv[0]);
for (i = 0; i < argc; i++) {
- argv_copy[i] = HDstrdup(argv[i]);
+ argv_copy[i] = strdup(argv[i]);
bytes_copied += (int)(strlen(argv[i]) + 1);
- argv_copy[i] = HDstrdup(argv[i]);
- if (check_mfu_args && (HDstrncmp(argv[i], "-T", 2) == 0)) {
+ argv_copy[i] = strdup(argv[i]);
+ if (check_mfu_args && (strncmp(argv[i], "-T", 2) == 0)) {
check_mfu_args = 0;
*mfu_argc = i + 1;
}
@@ -878,7 +878,7 @@ get_copy_count(char *fname, char *appname)
hash_index = filehash % NAME_ENTRIES;
if (filename_cache[hash_index].name == NULL) {
filename_cache[hash_index].hash = apphash;
- filename_cache[hash_index].name = HDstrdup(fname);
+ filename_cache[hash_index].name = strdup(fname);
filename_cache[hash_index].next = NULL;
filename_cache[hash_index].nextCount = 1;
return 0;
@@ -906,7 +906,7 @@ get_copy_count(char *fname, char *appname)
nextEntry = (hash_entry_t *)malloc(sizeof(hash_entry_t));
if (nextEntry) {
lastEntry->next = nextEntry;
- nextEntry->name = HDstrdup(fname);
+ nextEntry->name = strdup(fname);
nextEntry->hash = apphash;
nextEntry->next = NULL;
nextEntry->nextCount = 1;
@@ -929,7 +929,7 @@ run_command(int argc __attribute__((unused)), char **argv, char *cmdline, const
#else
/* create a copy of the 1st file passed to the application */
- HDstrcpy(filepath, fname);
+ strcpy(filepath, fname);
if (log_output_in_single_file || use_stdout) {
pid_t pid;
@@ -992,7 +992,7 @@ run_command(int argc __attribute__((unused)), char **argv, char *cmdline, const
nbytes = strlen(cmdline);
/* Record the command line for the log! */
if (nbytes < remaining) {
- HDstrcpy(&buf[offset], cmdline);
+ strcpy(&buf[offset], cmdline);
thisbuft->chars += nbytes;
thisbuft->count -= nbytes;
remaining -= nbytes;
@@ -1014,7 +1014,7 @@ run_command(int argc __attribute__((unused)), char **argv, char *cmdline, const
thisbuft->bufsize = BUFT_SIZE;
thisbuft->dt = MPI_CHAR;
/* Copy the remaining cmdline text into the new buffer */
- HDstrcpy(buf, nextpart);
+ strcpy(buf, nextpart);
/* And update our buffer info */
// thisbuft->chars = strlen(nextpart) +1;
thisbuft->chars = strlen(nextpart);
@@ -1061,8 +1061,8 @@ run_command(int argc __attribute__((unused)), char **argv, char *cmdline, const
char logpath[2048];
char logErrors[2048];
char current_dir[2048];
- char *logbase = HDstrdup(basename(filepath));
- char *thisapp = HDstrdup(basename(toolname));
+ char *logbase = strdup(basename(filepath));
+ char *thisapp = strdup(basename(toolname));
if (processing_inputfile == 0)
log_instance = get_copy_count(logbase, thisapp);
@@ -1071,12 +1071,12 @@ run_command(int argc __attribute__((unused)), char **argv, char *cmdline, const
if ((log_instance > 0) || processing_inputfile) {
if (processing_inputfile)
log_instance = current_input_index;
- HDsnprintf(logpath, sizeof(logpath), "%s/%s_%s.log_%d",
- HDgetcwd(current_dir, sizeof(current_dir)), logbase, thisapp, log_instance);
+ snprintf(logpath, sizeof(logpath), "%s/%s_%s.log_%d",
+ HDgetcwd(current_dir, sizeof(current_dir)), logbase, thisapp, log_instance);
}
else {
- HDsnprintf(logpath, sizeof(logpath), "%s/%s_%s.log",
- HDgetcwd(current_dir, sizeof(current_dir)), logbase, thisapp);
+ snprintf(logpath, sizeof(logpath), "%s/%s_%s.log", HDgetcwd(current_dir, sizeof(current_dir)),
+ logbase, thisapp);
}
}
else {
@@ -1085,17 +1085,17 @@ run_command(int argc __attribute__((unused)), char **argv, char *cmdline, const
if (processing_inputfile)
log_instance = current_input_index;
if (txtlog[log_len - 1] == '/')
- HDsnprintf(logpath, sizeof(logpath), "%s%s_%s.log_%d", txtlog, logbase, thisapp,
- log_instance);
+ snprintf(logpath, sizeof(logpath), "%s%s_%s.log_%d", txtlog, logbase, thisapp,
+ log_instance);
else
- HDsnprintf(logpath, sizeof(logpath), "%s/%s_%s.log_%d", txtlog, logbase, thisapp,
- log_instance);
+ snprintf(logpath, sizeof(logpath), "%s/%s_%s.log_%d", txtlog, logbase, thisapp,
+ log_instance);
}
else {
if (txtlog[log_len - 1] == '/')
- HDsnprintf(logpath, sizeof(logpath), "%s%s_%s.log", txtlog, logbase, thisapp);
+ snprintf(logpath, sizeof(logpath), "%s%s_%s.log", txtlog, logbase, thisapp);
else
- HDsnprintf(logpath, sizeof(logpath), "%s/%s_%s.log", txtlog, logbase, thisapp);
+ snprintf(logpath, sizeof(logpath), "%s/%s_%s.log", txtlog, logbase, thisapp);
}
}
@@ -1105,8 +1105,8 @@ run_command(int argc __attribute__((unused)), char **argv, char *cmdline, const
* copy of the logpath variable.
*/
log_len = strlen(logpath);
- HDstrcpy(logErrors, logpath);
- HDstrcpy(&logErrors[log_len - 3], "err");
+ strcpy(logErrors, logpath);
+ strcpy(&logErrors[log_len - 3], "err");
}
if (mfu_debug_level == MFU_LOG_VERBOSE) {
printf("\tCreating logfile: %s\n", logpath);
@@ -1161,7 +1161,7 @@ MFU_PRED_EXEC(mfu_flist flist, uint64_t idx, void *arg)
toolname = buf;
/* Get a copy of fname */
- HDstrcpy(filepath, fname);
+ strcpy(filepath, fname);
/* allocate a char* for each item in the argv array,
* plus one more for a trailing NULL
@@ -1173,10 +1173,10 @@ MFU_PRED_EXEC(mfu_flist flist, uint64_t idx, void *arg)
char cmdline[2048];
char **argv = (char **)MFU_CALLOC((size_t)(count + 2), sizeof(char *));
- argv[k++] = HDstrdup(toolname);
+ argv[k++] = strdup(toolname);
memset(cmdline, 0, sizeof(cmdline));
- buf += HDstrlen(toolname) + 1;
+ buf += strlen(toolname) + 1;
/* Reconstruct the command line that the user provided for the h5tool */
for (k = 1; k < count; k++) {
if (buf[0] == '&') {
@@ -1193,26 +1193,26 @@ MFU_PRED_EXEC(mfu_flist flist, uint64_t idx, void *arg)
if (fname_arg == NULL) {
printf("[%d] Warning: Unable to resolve file_substitution %d (idx=%ld)\n", sg_mpi_rank,
file_substituted, idx);
- argv[k] = HDstrdup(fname);
+ argv[k] = strdup(fname);
}
else {
- argv[k] = HDstrdup(fname_arg);
+ argv[k] = strdup(fname_arg);
file_substituted++;
}
}
else {
- argv[k] = HDstrdup(buf);
- buf += HDstrlen(argv[k]) + 1;
+ argv[k] = strdup(buf);
+ buf += strlen(argv[k]) + 1;
}
}
- HDsnprintf(cmdline, sizeof(cmdline), "\n---------\nCommand:");
+ snprintf(cmdline, sizeof(cmdline), "\n---------\nCommand:");
b_offset = strlen(cmdline);
for (k = 0; k < count; k++) {
- HDsprintf(&cmdline[b_offset], " %s", argv[k]);
+ sprintf(&cmdline[b_offset], " %s", argv[k]);
b_offset = strlen(cmdline);
}
- HDsprintf(&cmdline[b_offset], "\n");
+ sprintf(&cmdline[b_offset], "\n");
run_command(count, argv, cmdline, fname);
mfu_free(argv);
@@ -1244,7 +1244,7 @@ static void
add_executable(int argc, char **argv, char *cmdstring, int *f_index, int f_count __attribute__((unused)))
{
char cmdline[2048];
- HDsnprintf(cmdline, sizeof(cmdline), "\n---------\nCommand: %s\n", cmdstring);
+ snprintf(cmdline, sizeof(cmdline), "\n---------\nCommand: %s\n", cmdstring);
argv[argc] = NULL;
run_command(argc, argv, cmdline, argv[f_index[0]]);
return;
@@ -1270,7 +1270,7 @@ process_input_file(char *inputname, int myrank, int size)
*/
processing_inputfile = 1;
- while (HDfgets(linebuf, sizeof(linebuf), config) != NULL) {
+ while (fgets(linebuf, sizeof(linebuf), config) != NULL) {
const char *delim = " \n";
char *cmdline = NULL;
char *cmd = NULL;
@@ -1285,8 +1285,8 @@ process_input_file(char *inputname, int myrank, int size)
if (eol) {
*eol = '\0';
}
- cmdline = HDstrdup(linebuf);
- cmd = HDstrtok(linebuf, delim);
+ cmdline = strdup(linebuf);
+ cmd = strtok(linebuf, delim);
if (cmd) {
arg = cmd;
while (arg != NULL) {
@@ -1350,7 +1350,7 @@ main(int argc, char *argv[])
sg_mpi_rank = rank;
#if 0
- env_var = HDgetenv("HDF5_H5DWALK_PRINT_CMDLINE");
+ env_var = getenv("HDF5_H5DWALK_PRINT_CMDLINE");
if (env_var) {
int enable = atoi(env_var);
if (enable) {
@@ -1401,29 +1401,29 @@ main(int argc, char *argv[])
h5dwalk_exit(EXIT_FAILURE);
break;
case 'i':
- inputname = HDstrdup(H5_optarg);
+ inputname = strdup(H5_optarg);
last_mfu_arg = H5_optind;
if (inputname)
tool_selected = 1;
break;
case 'o':
- outputname = HDstrdup(H5_optarg);
+ outputname = strdup(H5_optarg);
last_mfu_arg = H5_optind;
if (outputname) {
log_output_in_single_file = 1;
- output_log_file = HDstrdup(H5_optarg);
+ output_log_file = strdup(H5_optarg);
text = 1; /* Format TXT, not HDF5 */
}
break;
case 'E':
log_errors_in_file = 1;
- errlog = HDstrdup(H5_optarg);
+ errlog = strdup(H5_optarg);
last_mfu_arg = H5_optind;
break;
case 'l':
log_stdout_in_file = 1;
if (H5_optarg)
- txtlog = HDstrdup(H5_optarg);
+ txtlog = strdup(H5_optarg);
break;
case 'T':
/* We need to stop parsing user options at this point.
@@ -1562,7 +1562,7 @@ main(int argc, char *argv[])
mfu_dst_file = mfu_file_new();
destpath = &paths[1];
path2 = destpath->path;
- pathlen_total += HDstrlen(path2);
+ pathlen_total += strlen(path2);
mfu_flist_walk_param_paths(1, destpath, walk_opts, flist2, mfu_dst_file);
}
@@ -1616,8 +1616,8 @@ main(int argc, char *argv[])
k++;
}
else {
- HDstrcpy(ptr, argv[i]);
- ptr += HDstrlen(argv[i]);
+ strcpy(ptr, argv[i]);
+ ptr += strlen(argv[i]);
}
*ptr++ = 0;
}
diff --git a/utils/tools/test/h5dwalk/testh5dwalk.sh.in b/utils/tools/test/h5dwalk/testh5dwalk.sh.in
index 4f6dbdee3ac..a123f8d98cb 100644
--- a/utils/tools/test/h5dwalk/testh5dwalk.sh.in
+++ b/utils/tools/test/h5dwalk/testh5dwalk.sh.in
@@ -57,11 +57,10 @@ export LD_LIBRARY_PATH=@LL_PATH@
# source dirs
SRC_TOOLS="$TOP_DIR/tools/test"
-SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles"
# testfiles source dirs for tools
-SRC_H5LS_TESTFILES="$SRC_TOOLS_TESTFILES"
-SRC_H5DUMP_TESTFILES="$SRC_TOOLS_TESTFILES"
+SRC_H5LS_TESTFILES="$SRC_TOOLS/test/h5ls/testfiles"
+SRC_H5DUMP_TESTFILES="$SRC_TOOLS/test/h5dump/testfiles"
SRC_H5DIFF_TESTFILES="$SRC_TOOLS/h5diff/testfiles"
SRC_H5COPY_TESTFILES="$SRC_TOOLS/h5copy/testfiles"
SRC_H5REPACK_TESTFILES="$SRC_TOOLS/h5repack/testfiles"